- download ocaml-4.00.1.tar.gz
- tar zxvf path/to/ocaml-4.00.1.tar.gz
- cd ocaml-4.00.1
- ./configure -prefix $HOME
- make world
- make bootstrap
- make opt
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/env python | |
import pika | |
import sys | |
from optparse import OptionParser | |
def run(): | |
p = OptionParser() | |
p.add_option("--hostname", dest="hostname", | |
default="localhost", help="Hostname of AMQP endpoint") |
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/python | |
import requests | |
import lxml.html | |
import sys | |
def get_contrib_count(user): | |
url = 'https://github.com/%s' % user | |
html = requests.get(url).read() | |
root = lxml.html.fromstring(html) |
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
let get_value p = | |
if p > 3 | |
then 1 | |
else | |
try | |
100 / p | |
with _ -> | |
-1 | |
let main () = |
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
-- sqlite schema for parly hack | |
CREATE TABLE event ( | |
event_id integer primary key, | |
start_date date, | |
end_date date, | |
headline text, | |
event_body text, | |
media text, | |
media_credit text, |
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
#include <stdio.h> | |
#include <sys/time.h> | |
#include <sys/resource.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
int limit = LIMIT; | |
void infinite_loop(void) { | |
struct timeval tv; |
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
# Leaves a transaction | |
p_group = models.PackageGroup.query.filter_by(name=id).first_or_404() | |
# Doesn't leave a transaction, if uncommented instead of above | |
#p_group = db.session.query(models.PackageGroup).filter_by(name=id).first() | |
del(p_group) | |
db.session.commit() |
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
Note shell prompt appended to long last line | |
mk270@cornford ~/Src/iati-test> ocamlbuild src/driver.byte | |
Finished, 0 targets (0 cached) in 00:00:00. | |
Finished, 17 targets (17 cached) in 00:00:00. | |
W: Cannot get variable ext_objW: Cannot get variable ext_libW: Cannot get variable ext_dllW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindW: Cannot get variable ocamlfindmk270@cornford ~/Src/iati-test> |
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
mk270@cornford ~/Prog/rust/web1> rm -rf target; cargo clean; rm -f Cargo.lock; cargo build | |
Updating git repository `https://github.com/iron/cookie.git` | |
Updating git repository `https://github.com/DaGenix/rust-crypto.git` | |
Updating git repository `https://github.com/iron/iron.git` | |
Updating git repository `https://github.com/servo/rust-url.git` | |
Updating git repository `https://github.com/lifthrasiir/rust-encoding` | |
Updating git repository `https://github.com/chris-morgan/rust-http.git` | |
Updating git repository `https://github.com/sfackler/rust-openssl.git` | |
Updating git repository `https://github.com/chris-morgan/anymap.git` | |
Updating git repository `https://github.com/reem/rust-http-content-type.git` |