-
not secure to hand this out
-
tables to be removed:
- api_request
-
api_user
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
const BaseComponent = require('./BaseComponent'); | |
const Marty = require('marty'); | |
const { Combobox, configure } = require('react-widgets'); | |
configure.setGlobalizeInstance(window.globalize) | |
const lsApi = require('../api/lsApi'); | |
// unsurprisingly: this doesn't work | |
// produces error that says "combobox has no contents" | |
class SearchBox extends BaseComponent { |
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
;;; init.el --- Prelude's configuration entry point. | |
;; | |
;; Copyright (c) 2011 Bozhidar Batsov | |
;; | |
;; Author: Bozhidar Batsov <[email protected]> | |
;; URL: http://batsov.com/prelude | |
;; Version: 1.0.0 | |
;; Keywords: convenience | |
;; This file is not part of GNU Emacs. |
I hereby claim:
- I am aguestuser on github.
- I am aguestuser (https://keybase.io/aguestuser) on keybase.
- I have a public key whose fingerprint is 0995 5956 FCCE 9986 E81C C8FC E58B D15A 1D4E FD5B
To claim this, I am signing this object:
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
import sys | |
import MySQLdb as my | |
import networkx as nx | |
import csv | |
from IPython import embed | |
db = my.connect(host='localhost', user='littlesis', passwd='midm681_beet', db='littlesis') | |
cur = db.cursor(my.cursors.DictCursor) | |
# all positions |
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
// pseudo-classical v1 | |
var Mammal = function(name){ | |
this.name = name; | |
this.get_name = function(){ | |
return this.name; | |
}; | |
this.purr = function() { | |
return "purr" | |
}; |
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
var _ = require('underscore'); | |
// getDupeList([Tweet]) -> { String : [Int] } | |
// runs in O(n+m) where n is # tweets, m is # dupes | |
function getDupeList(ts){ | |
var tts =_.chain(ts) | |
.map(function(t,i){ return _.extend(t, { i: i });}) | |
.groupBy(function(tt){ return tt.id_str;}) | |
.value(); | |
return _.chain(tts) |
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
var _ = require('underscore'); | |
// getDupeList([Tweet]) -> { String : [Int] } | |
// runs in O(n+m) where n is # tweets, m is # dupes | |
function getDupeList(ts){ | |
var tts =_.chain(ts) | |
.map(function(t,i){ return _.extend(t, { i: i });}) | |
.groupBy(function(tt){ return tt.id_str;}) | |
.value(); | |
return _.chain(tts) |
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
//Riddle me this... | |
//This compiles: | |
def plotGrowth[A,T[B] <: Seq[B]](l: T[A], fn: T[A] => T[A]): Boolean = { | |
val intervals = (0 to 50).map(_ * l.size / 50) | |
intervals map { i => | |
val sub = l.take(i) | |
System.gc() | |
val start = System.nanoTime |
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
var arr = [1,2,3,4]; | |
function dumbAddOne(arr) { | |
if (arr == []) return []; | |
else return ([1 + arr[0]]) + dumbAddOne(arr.slice(1)); | |
} | |
function findActivty(pdfArr){ | |
if (pdfArr == []) return []; | |
if (/Activity/.test(pdfArr[0])) { |