I hereby claim:
- I am csytan on github.
- I am csytan (https://keybase.io/csytan) on keybase.
- I have a public key whose fingerprint is 25AC 27CE 8135 97E3 2BA5 AF1C 72AB B26C B7B4 8C6F
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import os | |
# Current working directory | |
print(os.getcwd()) | |
# Module path (relative to cwd) | |
print(os.path.dirname(__file__)) | |
# Abs path of the current module's directory |
import csv | |
import json | |
import os | |
import time | |
import urllib | |
def load(**kwargs): | |
url = 'http://booths.nigeriaelections.org/getStuff.php' |
<!DOCTYPE html> | |
<html> | |
<head> | |
<style type="text/css"> | |
body { | |
margin: 0; | |
} | |
.node { | |
cursor: pointer; | |
fill: red; |
import time | |
# For python 2.7 use: | |
# pip install futures | |
import concurrent.futures | |
import tornado.ioloop | |
import tornado.web | |
import tornado.gen |
# Ubuntu upstart file at /etc/init/<service>.conf | |
# More info: http://upstart.ubuntu.com/cookbook/ | |
start on runlevel [2345] | |
stop on runlevel [!2345] | |
respawn | |
respawn limit 10 5 | |
setuid <username> |
With the possibility of a new NIMS project, FIMS (Future Information Management System), we have the opportunity to create something better by learning from the issues that have affected us in the past with NIMS.
Objective: To create an online facility inventory for Ethiopia
Goals:
function findRedditComments(query){ | |
var url = 'http://www.reddit.com/search.json?syntax=plain&sort=top'+ | |
'&q=' + query + '&jsonp=?'; | |
$.getJSON(url, function(data){ | |
var articles = data.data.children; | |
articles.sort(function(a, b){ | |
return b.data.num_comments - a.data.num_comments; | |
}); | |
var article = articles[0]; | |
if (article && article.data.num_comments){ |
(function($){ // Module pattern, means vars defined here will not leak outside | |
// Global vars. Some people use CAPS for them -- it's your personal preference | |
var MAP = null; | |
var INFOWINDOW = null; | |
... | |
function setLocation() { |
$(document).ready(function(){ | |
var vid_links = $('a.video'); | |
function showVideos(){ | |
if (!vid_links.length) return; | |
var window_bottom = $(window).scrollTop() + $(window).height() + 500; | |
vid_links.each(function(){ | |
var link = $(this); | |
if (link.offset().top < window_bottom){ | |
link.replaceWith( | |
'<iframe src="' + link.attr('data-embed') + '" class="video" frameborder="0"></iframe>'); |