All posts tagged #imadethis all posts RSS-feed

Java primitives conversion & operations

First, booleans Booleans cannot be assigned to any other types, and you can't do any arithmetic on them. So true doesn't count as 1, nor does 1 count as true. No truthy and falsy in Java. Converting: a = b Some types can only be converted if you cast explicitly. These are usually the cases where a type with a wider or different range is converted to one with a narrower range. If you use explicit casting, you might be... full post»
by Mark,

Efficient overfitting of training data (Kaggle Bowl 2017)

During the Kaggle Data Science Bowl 2017, the leaderboard was based on only $198$ samples. The opportunity for overfitting was quickly understood, but initially only the naive option was mentioned, testing 1 submission per sample taking 66 days (still doable within the competition duration, but less than ideal). But then Oleg Trott got a perfect score in just 14 submissions! topic) I was really curious how he managed to do this. Together with Cas, I found out one way it... full post»
by Mark,

Linear model vs decision tree (in R)

Linear models vs decision trees I’ve used the R statistical language a bit, a long time ago. It was my first real encounter with data science, but future encounters used Matlab and Python. But lately I’ve been picking up R again, as it’s popular in the data science community. As practise / demo, I thought I’d do a simple exploration of the strengths and weaknesses of linear models versus decision trees. This was inspired by Claudia Perlich at kdnuggets. Let’s... full post»
by Mark,

Rainbow colormap in javascript

Simple one one this time! How to make an RGB rainbow colormap in javascript? Example: This is useful, for example, when plotting charts with something like chart.js. This is the code for it. The first part is converting hsl colors to rgb ones, which you might skip depending on which browsers you want to support. The second part generates a rainbow by simply rotating the hue of a hsl color. The other parameters are optional: you can make the colormap... full post»
by Mark,

The blag!

#imadethis, #coding, #tools, #bash, #python, #music, #django, #machine-learning, #chinese, #ubuntu, #learning, #focus, #fortran, #backup, #charity, #personal, #cross-validation, #china, #what-I-use, #object-oriented-programming, #data-science, #discussion, #data-analysis, #effecive-altruism, #games, #travel, #rust, #bug-prevention, #type-systems, #order-of-magnitude, #design-patterns, #R, #programming-languages, #javascript


  1. Rainbow colormap in javascript @Mark The post has been expanded to include non-rainbow colorm...
  2. "Invite" someone to ssh into your machine without port forwarding or firewall changes @Mark Added details about how to use the established tunnel in...
  3. Rainbow colormap in javascript @Mark Now finally with color-coded source!
  4. Bye Make, hello SCons (Fortran) @Mark For SCons' own comparison against alternatives, have a l...
  5. Ubuntu macros @Mark Macro locks have been made more reliable, to prevent any...
  6. Dory backup scripts @Mark I've added some functionality to remove old backups! htt...
  7. Ubuntu macros @Mark Updated after moving the files to
  8. Concentration noise @Mark Sorry if you're in China and can't access Youtube. If th...