Skip to content

Instantly share code, notes, and snippets.

View sdruskat's full-sized avatar
🟠
I may be slow to respond.

Stephan Druskat sdruskat

🟠
I may be slow to respond.
View GitHub Profile
@sdruskat
sdruskat / example.ipynb
Last active June 1, 2023 15:36
A Jupyter notebook showing slightly more complex stratified proportionate random sampling from a Dask dataset based on value counts.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sdruskat
sdruskat / README.md
Created February 3, 2023 11:21
A very simple bingo game (0-30) with speech output (in German)

Simple bingo

A simple interactive bingo game with text to speech output in Python 3. Tested with Python 3.8.10.

To install and run:

python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
@sdruskat
sdruskat / README.md
Last active July 2, 2019 17:07
Markdown schedule from pretalx export

pretalx is a web app for conference management, it's open source, and it's great, and you should support it!

At the time of writing, the schedule export didn't do it for me, and so I devised a quick hack to get a static version of the schedule into a Jekyll project.

Here is how it goes:

  1. Export pretalx schedule HTML
  2. Unzip
  3. Build a list of tracks via fix.py > tracks.md below (Python 3), run in {conf-name}/{conf-name}/schedule/export/
  4. Build the schedule manually. I've done this in Markdown tables, was quick enough.
@sdruskat
sdruskat / README.md
Last active July 2, 2019 09:00
Bash script to install Singularity from GitHub releases

Install Singularity

This is a simple bash script to install Singularity.

Requirements

  • Go >= 1.11
  • build-essential
  • libssl-dev
  • uuid-dev
@sdruskat
sdruskat / OffScreenOffThreadCharts.java
Created March 21, 2018 16:07 — forked from jewelsea/OffScreenOffThreadCharts.java
Render 300 charts off screen and save them to files in JavaFX.
import java.awt.image.BufferedImage;
import java.io.*;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.*;
import java.util.logging.*;
import javafx.application.*;
import javafx.beans.binding.*;
import javafx.beans.property.*;
import javafx.beans.value.*;
@sdruskat
sdruskat / example.md
Created February 23, 2018 11:04
[NGINX] Setting up multiple domains pointing to the same IP (v4 & v6) on the same server - listen directive

According to https://serverfault.com/a/277667/186338, you need the following setup for this to work:

Config for default server

server {
	listen 80 default_server; # Ipv4
	listen [::]:80 ipv6only=on; # IPv6
}
@sdruskat
sdruskat / async-eclipse-job.md
Created February 20, 2018 08:35
A simple example for an Eclipse Job that updates the UI

#Async Eclipse Job Example

  @Inject
	private UISynchronize uiSync;

	public void doSomething() {
		Job j = new Job("Doing work") {

 @Override

Keybase proof

I hereby claim:

  • I am sdruskat on github.
  • I am sdruskat (https://keybase.io/sdruskat) on keybase.
  • I have a public key whose fingerprint is 25CA FD8A 040C 8566 87CB 8F6D D878 3C9F 9117 6570

To claim this, I am signing this object:

@sdruskat
sdruskat / auto-deploy.md
Created September 18, 2017 10:06 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@sdruskat
sdruskat / AppTest.java
Created December 7, 2016 13:05 — forked from Christopher-Barham-AKQA/AppTest.java
Example jUnit test that demos/uses most of the hamcrest matchers
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.any;
import static org.hamcrest.Matchers.anyOf;
import static org.hamcrest.Matchers.anything;
import static org.hamcrest.Matchers.describedAs;
import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.equalToIgnoringWhiteSpace;
import static org.hamcrest.Matchers.instanceOf;