This file contains hidden or 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
module Barber | |
def loop(shop_pid) | |
shop_pid <- 'barbercheck | |
receive | |
match 'wakeup | |
IO.puts "wakeup" | |
loop(shop_pid) | |
match {'customer, customer} | |
cut_hair(shop_pid, customer) | |
loop(shop_pid) |
This file contains hidden or 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
% sleeping barber problem | |
-module(sleeping_barber). | |
-export([barber_scenario/0]). | |
start_shop() -> | |
spawn(fun() -> barber_shop() end) | |
. | |
barber_scenario() -> | |
ShopPid = start_shop(), |
This file contains hidden or 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
# fixed version of http://altons.github.io/python/2012/12/01/converting-northing-and-easting-to-latitude-and-longitude/ | |
# - filenames | |
# - data type (pyproj transform doesn't like pandas series) | |
import os | |
import pandas as pd | |
import pyproj | |
import re | |
listfiles = os.listdir("codepo/Data/CSV") | |
pieces = [] |
This file contains hidden or 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
#!/bin/zsh | |
# usage: wake_me <command> | |
echo $@ | |
$@ | |
notification='display notification "'$@'" with title "Finished"' | |
osascript -e "$notification" | |
say -v Deranged "it's finally, finally finished. at last." |
This file contains hidden or 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
➜ ~ brew install freealut | |
==> Downloading http://connect.creativelabs.com/openal/Downloads/ALUT/freealut-1.1.0.tar.gz | |
curl: (6) Could not resolve host: connect.creativelabs.com | |
Trying a mirror... | |
==> Downloading http://ftp.de.debian.org/debian/pool/main/f/freealut/freealut_1.1.0.orig.tar.gz | |
######################################################################## 100.0% | |
==> Patching | |
patching file configure.ac | |
==> ./autogen.sh |
This file contains hidden or 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
(def gorilla-version "0.4.0") ;; adapt this as needed | |
(set-env! | |
:resource-paths #{"src" "resources"} | |
:dependencies '[[gorilla-repl "0.4.0"]]) ;; version! | |
(task-options! | |
pom {:project 'restaurant | |
:version "0.1.0-SNAPSHOT"} | |
jar {:manifest {"Foo" "bar"}}) |
OlderNewer