Giter Club home page Giter Club logo

blog's People

Contributors

rmhogervorst avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

nitishm

blog's Issues

blogidea: testing dagster code

Basicly transformations.
keep the logic in ops/assets

mark job tests as pytest.mark.integ

test resources seperately
create a fake one if you resource does a lot.

Add h-entry microformat too

http://microformats.org/wiki/h-entry

Can add class to current formatting.
For instance right now it is:

<article role=main class=blog-post><p>Over the last week I have experimented with dbt (data built tool), a cmdline tool
But I can easily make that <article role=main class="blog-post h-entry">
I have to check if the p-name and p-author stuff can be added to the meta information I'm already publishing

validate here https://indiewebify.me/validate-h-entry

official example:

<article class="h-entry">
  <h1 class="p-name">Microformats are amazing</h1>
  <p>Published by <a class="p-author h-card" href="http://example.com">W. Developer</a>
     on <time class="dt-published" datetime="2013-06-13 12:00:00">13<sup>th</sup> June 2013</time></p>
  
  <p class="p-summary">In which I extoll the virtues of using microformats.</p>
  
  <div class="e-content">
    <p>Blah blah blah</p>
  </div>
</article>

Footer fix

This is.not correct at footer me a coffee at Doneeror 

THE CASE FOR USELESS PACKAGES

RMHogervorst/cleancode#66

Use https://www.youtube.com/watch?v=c0bsKc4tiuY as inspiration, simone explains why making useless stuff is so nice. It makes the expectations low and keeps the fun

https://giphy.com/search/simone-giertz

simone is my spirit animal and I didn't even know it

Things I 've made that are not entirely useful
an app for adding bananas to your picture https://github.com/RMHogervorst/bananafy
multiple coffee related things...
How many times me and a friend drank coffee related to weather and other stuff
https://github.com/RMHogervorst/koffie
coffee related functions https://github.com/RMHogervorst/coffeegeeks
https://github.com/RMHogervorst/coffeedata dataset as a package example (of the previously mentioned coffee moments)

I've created scale to measure how much R-nerdiness you have https://github.com/RMHogervorst/r_scale

i created a dataset of werewolves https://github.com/RMHogervorst/werewolf, a dataset
of unicorns and unicycles
a list of things that should be a package but aren't yet https://github.com/RMHogervorst/shouldbeapackage

sometimes I go a bit overboard and even create a whole new organisation with a single useless purpose:
R-related karaoke:
Raoke package https://github.com/raoke/
with accompanying shiny app https://rmhogervorst.shinyapps.io/powrballad/ to select a song
startrek

https://github.com/rtrek
with TNG phrases and stuff.

But I learned so much from all of this! I learned the basics from the Coursera courses, and gradually taught myself how to interact with APIs, how to work with the magic package, geographical manipulation, shiny apps etc.

tune_grid failing in "how-to-use-lightgbm-with-tidymodels-framework"

Hi Roel,

I saw your post on r-bloggers, Thanks for the great article!

I tried to reproduce the code and I installed lightgbm correctly I think because the sample code is working fine, but the code is failing at tune_grid step.

Thanks for your help.

lgbm_tuned <- tune::tune_grid(
     object = lgbm_wf,
     resamples = ames_cv_folds,
     grid = lgbm_grid,
     metrics = yardstick::metric_set(rmse, rsq, mae),
     control = tune::control_grid(verbose = FALSE) 
 )

I get the WARNING:

Warning message:
All models failed in tune_grid(). See the `.notes` column. 

In the .notes column I see
internal: Error in pkg_list[[1]]: subscript out of bounds
My SessionInfo()

R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 18363)

Matrix products: default

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] parallel stats graphics grDevices utils datasets methods
[8] base

other attached packages:
[1] janitor_2.0.1 AmesHousing_0.0.4 doParallel_1.0.15
[4] iterators_1.0.12 foreach_1.5.0 treesnip_0.1.0
[7] yardstick_0.0.7 workflows_0.1.2 dials_0.0.8
[10] scales_1.1.1 tune_0.1.1 parsnip_0.1.2
[13] recipes_0.1.13 dplyr_1.0.0 rsample_0.0.7
[16] ggplot2_3.3.2 lightgbm_3.0.0-1 R6_2.4.1

loaded via a namespace (and not attached):
[1] httr_1.4.2 tidyr_1.1.0 jsonlite_1.7.0
[4] splines_4.0.2 prodlim_2019.11.13 assertthat_0.2.1
[7] GPfit_1.0-8 blob_1.2.1 remotes_2.2.0
[10] globals_0.12.5 ipred_0.9-9 pillar_1.4.6
[13] lattice_0.20-41 glue_1.4.1 pROC_1.16.2
[16] digest_0.6.25 snakecase_0.11.0 colorspace_1.4-1
[19] htmltools_0.5.0 Matrix_1.2-18 plyr_1.8.6
[22] timeDate_3043.102 pkgconfig_2.0.3 lhs_1.0.2
[25] DiceDesign_1.8-1 listenv_0.8.0 purrr_0.3.4
[28] processx_3.4.3 gower_0.2.2 lava_1.6.7
[31] tibble_3.0.3 generics_0.0.2 ellipsis_0.3.1
[34] DT_0.14 withr_2.2.0 furrr_0.1.0
[37] nnet_7.3-14 cli_2.0.2 survival_3.1-12
[40] magrittr_1.5 crayon_1.3.4 ps_1.3.3
[43] future_1.18.0 fansi_0.4.1 MASS_7.3-51.6
[46] forcats_0.5.0 class_7.3-17 tools_4.0.2
[49] data.table_1.12.8 lifecycle_0.2.0 stringr_1.4.0
[52] munsell_0.5.0 callr_3.4.3 compiler_4.0.2
[55] rlang_0.4.7 grid_4.0.2 rstudioapi_0.11
[58] htmlwidgets_1.5.1 igraph_1.2.5 gtable_0.3.0
[61] codetools_0.2-16 DBI_1.1.0 lubridate_1.7.9
[64] utf8_1.1.4 stringi_1.4.6 Rcpp_1.0.5
[67] vctrs_0.3.2 rpart_4.1-15 dbplyr_1.4.4
[70] tidyselect_1.1.0

blogidea


title: "where do file outputs go"
output: github_document

knitr::opts_chunk$set(echo = TRUE)

I created this file message_warning.R

#!/usr/bin/env Rscript
print("this is a print \n")
cat("this is a cat \n")
message("this is a message \n")
warning("this is a warning")
stop("this is a stop, or error!")

If you execute this file with Rscript

Rscript message_warning.R
You get this

[1] "this is a print \n"
this is a cat
this is a message

Warning message:
this is a warning
Error: this is a stop, or error!
Execution halted

However, if you pipe the output into a file you only get the stout

Rscript message_warning.R > stuff.txt

The shell returns

this is a message

Warning message:
this is a warning
Error: this is a stop, or error!
Execution halted

and stuff.txt contains

[1] "this is a print \n"
this is a cat 
  • So standard print and cat are captured but message and warning are not.

But we can also write the sterr to file.

Rscript messgae_warning.R 2> stuff.txt

Now the shell outputs

[1] "this is a print \n"
this is a cat

and the stuff.txt file contains

this is a message 

Warning message:
this is a warning 
Error: this is a stop, or error!
Execution halted

How do you get them both?

Rscript message_warning.R &> stuff.txt

update or remove jquery

Because this is a static site it doesn't really matter but maybe I should just remove jquery it is used by an interactive component I believe

meta:description improvements

All posts have rich html metadata that I created with hugo.

What works great is title, author etc.

  • the meta description in both twitter: description and og:description is the subtitle now. that is not great. I might have to add an extra field in the yaml frontmatter and only fall back on subtitle when none is given.
  • twitter:site links to my profile, which is not great
  • og:type is now website, could be article, linkedin sees type=article

metavalidator

title too long?
description is short (it's the subtitle)
them color?,
keywords not set
robots not set

Google structured data result

  • author (missing field url, optional, type=thing, name=valid)
  • description is great

Open graph tags analyzer

  • og:type should be article for blog pages, and website for the rest
  • og:locale content "en_US"

article:published_time
article:modified_time datetime
article:tag should be tags(stringarray)
article:author:

  • profile:first_name string
  • profile:last_name string
  • profile:username: string

Linkedin

  • linkedin cannot find a published date
  • description is to little words (should be 100 characters)

Schema.org

schema.org has all the right information: date published, date modified, image, keywords, it even has wordcount
author is @type thing? not human?, name is correct.

https://www.clairecodes.com/blog/2019-05-03-meta-descriptions-in-hugo-templates/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.