Skip to content

Instantly share code, notes, and snippets.

View keckelt's full-sized avatar
🐋

Klaus Eckelt keckelt

🐋
View GitHub Profile
@keckelt
keckelt / fill_strok.vl.json
Created November 22, 2023 10:18
Vega Lite Fill and Stroke Encoding
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A scatterplot showing body mass and flipper lengths of penguins.",
"data": {"url": "data/penguins.json"},
"transform": [{"sample": 30}],
"mark": "point",
"encoding": {
"x": {
"field": "Flipper Length (mm)",
"type": "quantitative",
@keckelt
keckelt / data.vl.json
Last active June 7, 2023 06:13
Ditox Paper - Data Distribution
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{"level": "No Hate", "English": 379, "German": 882},
{"level": "Intimidation", "English": 241, "German": 193},
{"level": "Offends or~Discriminates", "English": 780, "German": 354},
{"level": "Promotes~Violence", "English": 83, "German": 55}
]
},
@keckelt
keckelt / data.json
Last active August 3, 2022 08:25
Cohort Probabilities
[
{"x":3.3172535896,"y":-0.1902617812,"max_prob":0.4831581474,"cht":0},
{"x":0.3345750272,"y":-2.7536168098,"max_prob":0.7291174751,"cht":0},
{"x":-0.0381230526,"y":-3.4805505276,"max_prob":0.7780501487,"cht":0},
{"x":1.3160461187,"y":-1.590508461,"max_prob":0.6277059059,"cht":0},
{"x":2.7171809673,"y":-3.1506085396,"max_prob":0.8059095897,"cht":0},
{"x":2.0220816135,"y":-4.8679504395,"max_prob":0.86,"cht":0},
{"x":3.7739021778,"y":0.3715353906,"max_prob":0.6087857631,"cht":0},
{"x":2.7153964043,"y":-1.7479717731,"max_prob":0.68,"cht":0},
{"x":0.82089746,"y":-1.6400024891,"max_prob":0.5059073724,"cht":0},
@keckelt
keckelt / svm.py
Created April 13, 2022 11:17
wandb -tracking hyperparameter tuning
# preprocessing
for gamma in tqdm(['scale', 'auto'], 'gamma', leave=False):
for kernel in tqdm(['rbf', 'poly'], 'kernel', leave=False):
for c in tqdm([0.1, 1, 10, 100, 1000], 'c', leave=False):
wandb.init(project="ails-challenge-1", entity="keckelt", tags=["svm"])
params = {
"gamma": gamma,
@keckelt
keckelt / cleanup.sh
Last active January 14, 2022 06:28
Cleanup Script for Docker, Conda, and Ubuntu packages
#!/bin/sh
sudo apt autoremove
conda clean --all --yes
docker system prune --all --force
@keckelt
keckelt / Responsive Slider Handle Color.ipynb
Last active December 1, 2021 12:50
Update slider handle color based on value.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@keckelt
keckelt / ffmpeg.sh
Created November 3, 2021 19:18
Streamdetector Custom Command
ffmpeg -user_agent "%useragent" -referer "%referer%" -i "%url%" -c:v libx264 -c:a aac "%tabtitle%.mp4"
@keckelt
keckelt / parallel_coordinates.vg.json
Last active July 30, 2021 12:12
Vega: Color Coded Parallel Coordinates
{
"$schema": "https://vega.github.io/schema/vega-lite/v4.json",
"description": "Publications planned and in progress.",
"width": 600,
"layer": [
{
"data": {"values": [
{
"paper": "Coral Application Note",
"end": "2021-08-31",
@keckelt
keckelt / parallel coordinates.vg.json
Created July 29, 2021 10:10
Vega: Color Coded Parallel Coordinates
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "Parallel coordinates plot showing 7 dimensions of automobile statistics.",
"width": 700,
"height": 400,
"padding": 5,
"config": {
"axisY": {
"titleX": -2,
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "Google's stock price over time.",
"width": 300,
"height": 300,
"data": {
"values": [
{"label": "A", "x": 0, "y": 420},
{"label": "B", "x": 2, "y": 440},
{"label": "C", "x": 5, "y": 430},