Skip to content

Instantly share code, notes, and snippets.

View oskopek's full-sized avatar

Ondrej Skopek oskopek

View GitHub Profile
@oskopek
oskopek / README.adoc
Last active February 8, 2022 01:34
Automatic Jupyter Notebook Python cell formatting. Runs YAPF on individual notebook cells using yapf_api.

yapf_nbformat

Runs YAPF on individual notebook cells using yapf_api.

  • To skip a cell formatting (for example with jupyter-custom syntax, add # noqa to the first line of the cell.

  • Remove newlines at end of cells.

  • Uses the style_format file .style.yapf.

  • Has a dry run option for checking proper formatting (f.e. in a Git hook).

@oskopek
oskopek / SIS-README.txt
Last active May 10, 2017 10:43
SIS txt file conversion script
IMPORTANT
=========
In case a "sis-unconvert.sh.txt" or "sis-unconvert.bat.txt" is present in this
directory, you have obtained a SIS-compatible version of this work.
To convert it back into a regular version, run either "sis-unconvert.sh.txt"
or "sis-unconvert.bat.txt", depending on your platform.
@oskopek
oskopek / install_tensorflow.sh
Last active November 1, 2016 14:00
Tensorflow 0.11 on MetaCentrum
# Installs a precompiled binary tensorflow wheel for the debian8 system at MetaCentrum.
# Make sure to run the commands below manually one by one (qsub opens a new shell).
# First run:
qsub -I -l nodes=1:ppn=1:debian8
# Wait for the job...
rm -rf tensorflow* metacentrum_run*
scrname=metacentrum_run.sh
wget "http://www.ms.mff.cuni.cz/~skopeko/files/$scrname"
chmod +x "$scrname"
@oskopek
oskopek / volby.sh
Created March 6, 2016 00:04
A simple webscraping bash script for the 2016 Elections in Slovakia
file=vysledky.html
out=vysledky.tmp
res=vysledky
while true; do
: > $out
echo -e '<html><head>\n
<meta charset="UTF-8">\n
</head>\n<body>' >> $out
echo `date`
curl -s http://www.vysledkyvolieb.sk/parlamentne-volby/2016/priebezne-vysledky > $file
@oskopek
oskopek / National Geographic Picture-Of-The-Day Wallpaper Script
Last active December 12, 2015 10:40 — forked from bjarkevad/National Geographic Picture-Of-The-Day Wallpaper Script
Updated National Geographic Picture-Of-The-Day Wallpaper Script for Gnome 3.*
#!/bin/bash
# Copyright (c) 2011 Josh Schreuder
# http://www.postteenageliving.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@oskopek
oskopek / MANUAL_FIXES_AFTER_CONVERSION.txt
Last active September 30, 2015 09:03
Converting OptaPlanner's UpgradeRecipe from .txt -> .adoc
upgradeRecipe6.0.adoc
* line 850
upgradeRecipe6.1.adoc
* line 19
upgradeRecipe6.2.adoc

Asciidoctor cheatsheet

  • Strikethrough: Strike me!

@oskopek
oskopek / statistical_benchmarking_ideas.adoc
Last active September 3, 2015 13:17
Statistical benchmarking

Statistical benchmarking

  • Goal: Rank solvers agnostic of PCs, JVMs, processes, OSs, runs, …​ (as much as possible), depending only on the Solver. ✓

  • Means: Run each single benchmark multiple (N) times (on different JVMs) and evaluate the results statistically. ✓

    • How big should N be? (calculate statistically) (Bloch: 30+) X

      • Student’s t-test ✓ (on the fly? + append another run) X

  • Statistics - results

    • Have to be modular ✓

      • f.e.: avg, min, max, median, geom. mean, std. dev ✓

    • Discussion with Jirka: evaluate against a function (1 hard ~ 300 soft) X

@oskopek
oskopek / optaplanner_design_questions.adoc
Last active September 1, 2015 07:37
OptaPlanner design questions