This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This fabric file makes setting up and deploying a django application much | |
easier, but it does make a few assumptions. Namely that you're using Git, | |
Apache and mod_wsgi and your using Debian or Ubuntu. Also you should have | |
Django installed on your local machine and SSH installed on both the local | |
machine and any servers you want to deploy to. | |
_note that I've used the name project_name throughout this example. Replace | |
this with whatever your project is called._ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns clapping " | |
Clapping Music (1972) | |
for two performers | |
Steve Reich | |
sheet music: | |
https://sites.ualberta.ca/~michaelf/SEM-O/SEM-O_2014/Steve's%20piece/clapping_reich.jpg | |
This alda version slightly tweaked from daveyarwood: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/awk -e { if (/^```/) { i++; next } if ( i % 2 == 1) { print } } | |
# mdlp - agnostic literate programming for github flavored markdown. | |
# I release this script into the public domain. | |
# Rich Traube, Fri Feb 15 09:07:27 EST 2013 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import reduce | |
def thread(*args): | |
""" | |
Functional thread ->, inspired by clojure and https://stackoverflow.com/a/17122666/333294 | |
Toy example that only works for functions or airity 1 | |
""" | |
caller = lambda x, y: y(x) | |
return reduce(caller, args[1:], args[0]) |