### How to deal with date and time in SQLite

Motivation When dealing with databases you will need the ability to store certain dates and/or timestamps in your tables. Let’s find out how you can do that in an SQLite database. SQL table creation SQLite has the data type TIMESTAMP for storing date-times CREATE TABLE social_media ( social_media_id INTEGER, insertion_date TIMESTAMP, yt_subs INTEGER fb_pg INTEGER…

### SQL-Tutorial

I really like SQL. But sometimes I struggle to undestand some of the concepts. So I write about it. Meanwhile there are a bunch of articles, so time for a overview page: SQL-Basics: Create, Read, Update & Delete SQL-Basics: Relations SQL-Functions – SQL-Basics 3 SQLite3: Python and SQL Subqueries: Update column with values from another…

### 2021 – Advent of code – Day 3

Part 1 You need to use the binary numbers in the diagnostic report to generate two new binary numbers (called the gamma rate and the epsilon rate). The power consumption can then be found by multiplying the gamma rate by the epsilon rate. Each bit in the gamma rate can be determined by finding the…

### 2021 – Advent of code – Day 2

Part 1 Today the puzzle got a bit trickier than Day 1. The submarine seems to already have a planned course (your puzzle input). You should probably figure out where it’s going. For example: forward 5 down 5 forward 8 up 3 down 8 forward 2 Your horizontal position and depth both start at 0.…

### 2021 – Advent of code – Day 1

I’ve haven’t participated in the advent of code before. But always been curious. What is advent of code? It’s an advent Calendar for programmers. You get 25 challenges starting December 1st. Caveat: you have to solve the challenge to be eligible for the next day’s challenge 🙂

### k-fold crossvalidation with sklearn

from sklearn.model_selection import KFold kf = KFold(n_splits=2) kf.split(df_train) step = 0 # set counter to 0 for train_index, val_index in kf.split(df_train): # for each fold step = step + 1 # update counter print(‘Step ‘, step) features_fold_train = df_train.iloc[train_index, [4, 5]] # features matrix of training data (of this step) features_fold_val = df_train.iloc[val_index, [4, 5]]…

### Pandas Cheat Sheet

If you are new to Pandas feel free to read Introduction to Pandas I’ve assembled some pandas code snippets Reading Data Reading CSV import pandas as pd # read from csv df = pd.read_csv(“path_to_file”) Can also be textfiles. file suffix is ignored

### Data Science Pipeline

Motivation Learning Data Science can be grueling and overwhelming sometimes. When I feel too overwhelmed it’s time to draw a picture. This my current overview of what a data scientist has to do: General tools Linear Algebra with numpy &#8211; Part 1 numpy random choice Numpy linspace function Data acquisiton Data Science Datasets: Iris flower…

### Introduction to the Julia programming language

Installation You can download the installer at https://julialang.org/ On Windows you have to set the path manually, e.g. C:\Julia-1.3.1\bin Let’s fire up a command line and type: julia You will be greeted with a nice little ascii art and the prompt. If You want to close the prompt You can use CTRL + D

### SQLite3: Python and SQL

Everything we did in the last articles of the series SQL-Tutorial was a dry run because we just used SQLFiddle. So let’s start with a real database like SQLite. SQLite is a file based DBRMS and can be used for e.g. web sites. The official docs say: “SQLite works great as the database engine for…