New Blog Post

Python Type Checking

Python is a dynamically typed language which makes it easy and fun to program. But sometimes -especially in bigger projects- it can become quite cumbersome when you just receive errors at run time. Given the hypothetical example where we define a function which multiplies integer: def multiply(a, b): return a * b print(multiply(“I”, “You”)) It…

The Normal Distribution

Diving deeper into data science I started to brush up my knowledge about math especially statistics. The Mother of all Distributions The normal distribution was formulated by Carl Friedrich Gauß in 1809 and can be implemented in Python like the following : def normal_distribution_pdf(x, mu=0, sigma=1): sqrt_two_pi = math.sqrt(2*math.pi) return (1 / (sqrt_two_pi * sigma))…

What is Cross-Validation in Data Science?

Motivation Cross-validation is a technique to validate the quality of your machine learning model. For validating your model you split your training data into a training and a test data set. ———————————————– | | | | training data | test data | | | | ———————————————– More training data means a better model, more test…

Introduction to Jupyter Notebook

JuPyteR Do You know the feeling of being already late to a party when encountering something new? But when you actually start telling others about it, you realize that it is not too common knowledge at all, e.g. Jupyter Notebooks. What is a Jupyter notebook? In my own words: a browser-based document-oriented command line style…

Lombok

Fiddling around with a Java project from my friend Thomas Berger I encountered lombok: Lombok e.g. generates automagically setter and getter for data classes. all You have to do is annotate a class with @Data import lombok.Data; @Data public class CinemaEvent { private String location; private String url; } For IntelliJ there is a lombok…

Useful Outlook Settings

Being “forced” to use Outlook at work, I use the following configuration: Disable Popups Options -> Mail -> Message Arrival Default Reminder -> 5mins Options -> Calendar -> Calendar options -> Default reminders Activate Week Number Options -> Calendar -> Display options -> Show week numbers in the month view Enable Calendar in Mail View…

pip optional dependencies

Sometimes you want to make your python package usable for different situations, e.g. flask or bottle or django. If You want to minimize dependencies You can use an optional dependency in setup.py: extras_require={ ‘flask’: [‘Flask>=0.8’, ‘blinker>=1.1’] } Now you can install the library with: pip install raven[flask]  

My first MOC rebuild

After building the LEGO Ideas Saturn V rocket I was curious about more real space sets. LEGO once had a set of the Curiosity Rover which isn’t available anymore and is insanely expensive when You want to buy it used. But thanks to Christoph Zeller I discovered a MOC on rebrickable.com Searching for parts Searching…