Skip to content

Instantly share code, notes, and snippets.

@alixedi
alixedi / LilLambda.ipynb
Created July 13, 2017 08:52 — forked from vakila/LilLambda.ipynb
Anjana Vakil, "Mary had a little lambda", EuroPython 2017: https://ep2017.europython.eu/conference/talks/mary-had-a-little-lambda
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alixedi
alixedi / default_ami_setup.sh
Created January 6, 2017 10:18 — forked from darron/default_ami_setup.sh
Ubuntu 14.04 AWS Instance Store HVM build - actually worked - built and booted. Much thanks to: https://github.com/Lumida/packer/wiki/Building-Ubuntu-12.04-and-14.04-HVM-Instance-Store-AMIs
#!/bin/bash
# server-jre-8u5-linux-x64.tar.gz
DEBIAN_FRONTEND=noninteractive
UCF_FORCE_CONFFNEW=true
export UCF_FORCE_CONFFNEW DEBIAN_FRONTEND
apt-get update
apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" dist-upgrade
@alixedi
alixedi / fibonacci.py
Last active August 29, 2015 14:24 — forked from trtg/fibonacci.py
#from functools import lru_cache#python >=3.2
from functools32 import lru_cache#python 2.7
#from repoze.lru import lru_cache#python 2.7
#NOTE: you can use python -m trace --count fibonacci.py
#to see how many times each instruction is called
#@lru_cache(maxsize=500)#repoze.lru needs maxsize arg
@lru_cache()#using functools32
def fibonacci(n):
@alixedi
alixedi / usbstartup.sh
Last active August 29, 2015 14:14 — forked from hanbzu/usbstartup.sh
# The Ubuntu USB startup creator often crashes.
# This is an alternate way of doing the same process through the command line
# First plug in the USB pendrive. It will mount automatically
# Then check where it is (which device)
df
# Let's say we see it's in /dev/sdb1
# Then we have to use /dev/sdb and NOT /dev/sdb1