Skip to content

Instantly share code, notes, and snippets.

View oskopek's full-sized avatar

Ondrej Skopek oskopek

View GitHub Profile
@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 / 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 / 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 / README.adoc
Last active January 10, 2025 13:38
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).