Skip to content

Instantly share code, notes, and snippets.

@dloranc
dloranc / setup_zsh.sh
Last active February 2, 2024 15:58
My ZSH setup
#!/usr/bin/env bash
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# install plugins
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
@dloranc
dloranc / mnist_mlp.py
Created March 28, 2017 20:54
MNIST Multi Layer Perceptron example with history and script interruption (modified example from Keras repository)
'''Trains a simple deep NN on the MNIST dataset.
Gets to 98.40% test accuracy after 20 epochs
(there is *a lot* of margin for parameter tuning).
2 seconds per epoch on a K520 GPU.
'''
from __future__ import print_function
import os
import keras
@dloranc
dloranc / live_data.py
Last active May 22, 2016 19:29
Example of subplot with colspan
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from random import random
fig = plt.figure()
subplots = []
for i in xrange(6):
@dloranc
dloranc / live_data.py
Last active May 22, 2016 19:29
Plot many subplots with "live" data in maximized window
import matplotlib.pyplot as plt
import matplotlib.animation as animation
from random import random
fig = plt.figure()
subplots = []
for i in xrange(36):
subplot = fig.add_subplot(6, 6, i)