Skip to content

Instantly share code, notes, and snippets.

@BastiTee
BastiTee / download_pocket_articles.py
Created July 19, 2022 16:02
A vanilla py-script to download all Pocket.com data via API.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""A vanilla py-script to download all Pocket.com data via API.
Read before:
- https://blog.getpocket.com/2012/11/introducing-the-new-pocket-api-for-developers-and-publishers/
- https://getpocket.com/developer/docs/authentication
"""
import json
@BastiTee
BastiTee / tolino.py
Last active August 20, 2023 18:45
A vanilla Python3-script to convert a Tolino notes.txt file to one Markdown file per book.
# https://github.com/BastiTee/tolino-notes
@BastiTee
BastiTee / README.md
Last active June 8, 2022 07:51
Example Jupyter notebook to use Pandas along with D3.js

This code is now available at Kaggle.

@BastiTee
BastiTee / README.md
Last active June 8, 2022 07:50
Bundesliga Volatility Kata

This code is now available at Kaggle.

@BastiTee
BastiTee / README.md
Last active June 8, 2022 07:50
Rougeux Grid Kata

This code is now available at Kaggle.

@BastiTee
BastiTee / README.md
Last active June 8, 2022 07:49
Jupyter | 2022 state election – Bonn, Germany (Part 2)

This code is now available at Kaggle.

@BastiTee
BastiTee / README.md
Last active June 8, 2022 07:49
Jupyter | 2022 state election – Bonn, Germany (Part 1)

This code is now available at Kaggle.

@BastiTee
BastiTee / run-me.sh
Created May 2, 2022 17:27
New Python version bootstrap command
#!/bin/bash
# This assumes that python and pyenv is already installed and configured.
# https://github.com/pyenv/pyenv#installation
# Install minimal bootstrapping environment
python -m pip install --upgrade \
pip \
pipdeptree \
pipenv \
poetry
@BastiTee
BastiTee / GenericBuilderTest.java
Last active July 8, 2021 06:11
Generic and specialised data classes using builder pattern
public class GenericBuilderTest {
@Test
void test() {
final SpecialDataClass build = new SpecialBuilder()
// We want to call this in an arbitrary order!
.withCommonAttribute(-2)
.withSpecialAttribute(-1)
.withAnotherCommonAttribute(-3)
.build();
@BastiTee
BastiTee / mp3_to_spotify.py
Created April 5, 2021 12:48
Create Spotify playlists from local MP3 files
# -*- coding: utf-8 -*-
"""MP3 folder to Spotify.
Creates a Spotify playlist with the first song of each album found in the
provided directory or its children by the containing MP3s.
That's the only way in Spotify to have some way of record crates by genre or
theme.
Identification happens by the ID3 tags. If multiple tracks of the same
album are found amongst the MP3s then the subsequent files are ignored.