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
# Debian 7 x64, Ubuntu 14.04 x64, Ubuntu 12.04.4 x64 | |
*NOTE (tested on Digital Ocean VM's w/ > 512MB of RAM - gcc runs out of memory on VM's <= 512 MB) | |
apt-get update | |
aptitude safe-upgrade | |
apt-get install build-essential libboost-all-dev libcurl4-gnutls-dev autoconf antlr swig python-dev | |
*NOTE (for python 3 support add 'python3-dev' to the end of line 5) | |
cd /tmp | |
wget https://github.com/NationalAssociationOfRealtors/libRETS/archive/1.6.1.tar.gz |
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 bash | |
### BEGIN INIT INFO | |
# Provides: emperor | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the uwsgi emperor app server | |
# Description: starts uwsgi emperor app server using start-stop-daemon |
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
#!/bin/sh | |
### BEGIN INIT INFO | |
# Provides: gunicorn | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the gunicorn server | |
# Description: starts gunicorn using start-stop-daemon |
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
"""A simple implementation of a greedy transition-based parser. Released under BSD license.""" | |
from os import path | |
import os | |
import sys | |
from collections import defaultdict | |
import random | |
import time | |
import pickle | |
SHIFT = 0; RIGHT = 1; LEFT = 2; |
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
#sixthgear, one-up me willya | |
map = lambda s,f: __builtins__.map(f,s) | |
# kaptin, safe from desg | |
def map(source, func): | |
return __builtins__.map(func, source) | |
# sixthgear | |
def mop(source, func): | |
return map(func, source) |
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
//The sum of the squares of the first ten natural numbers is, | |
//12 + 22 + ... + 102 = 385 | |
//The square of the sum of the first ten natural numbers is, | |
//(1 + 2 + ... + 10)2 = 552 = 3025 | |
/*Hence the difference between the sum of the squares of the first ten | |
natural numbers and the square of the sum is 3025 − 385 = 2640.*/ | |
/*Find the difference between the sum of the squares of the first one |
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
/*Using JQuery to pull files from italy.xml*/ | |
$(document).ready(function() { | |
$.ajax({ | |
type: "GET", | |
url: "xml/italy.xml", | |
dataType: "xml", | |
success: handleResponse | |
}); | |
}); //end ready |
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> | |
int main(int l, char **a) { | |
for(int i = 0; i < l/2; a[++i] = (((int)a[i]+(int)a[l-i])-(int)(a[l-i]=a[i])) ); | |
for(int i = 1; i < l; ++i) | |
printf("%s ", a[i]); | |
return 0; | |
} |
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
<script type="text/javascript"> | |
function getData() { | |
$.getJSON("script.php", function(data) { | |
$.each(data, function(index) { | |
$("#high").html(data[index].high + "<br />" + Math.floor(Math.random()*111)); | |
}); | |
}); | |
} | |
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
# encoding: utf-8 | |
import datetime | |
from south.db import db | |
from south.v2 import DataMigration | |
from django.db import models | |
class Migration(DataMigration): | |
def forwards(self, orm): | |
"Write your forwards methods here." |
NewerOlder