I hereby claim:
- I am akellehe on github.
- I am eggrollinabox (https://keybase.io/eggrollinabox) on keybase.
- I have a public key whose fingerprint is C60E 4730 5FAF 8873 EB5D 7B8D 1ECC C4D0 7D83 2E78
To claim this, I am signing this object:
class Edge(object): | |
def __init__(self, parent, child, created_at): | |
self.parent = parent | |
self.child = child | |
self.created_at = created_at | |
self.generation = 0 |
conn = StrictRedis() | |
def online_size(sender, tree_name=None, edge=None): | |
conn.incr('{0}.size'.format(tree_name)) | |
def online_depth(sender, tree_name=None, edge=None): | |
with conn.lock('{0}.depth'.format(tree_name)): | |
current_depth = conn.get('{0}.depth'.format(tree_name)) or 0 | |
if int(current_depth) < edge.generation: | |
conn.set('{0}.depth'.format(tree_name), edge.generation) |
def should_add(self, edge): | |
return all([ | |
self.would_be_leaf(edge), | |
self.is_earliest_parent(edge)]) |
var downstream = function(buzz_id, root_id, limit) { | |
if (root_id == null){ | |
return db.user_edge_v2.find({ | |
"buzzid": buzz_id | |
}).count() | |
} | |
var limit = typeof limit != 'undefined' ? 1000 : limit; | |
var seen = {root_id: true}; | |
var nodeq = [root_id]; | |
var downstream_count = 0; |
5 procs started on release0.13.3 @ 13:45 |
import mwlib.parser.nodes | |
import mwlib.uparser | |
import codecs | |
with codecs.open('us.dat', 'rb', encoding='utf-8') as fp: | |
text = fp.read() | |
article = mwlib.uparser.parseString(title='us', raw=text) | |
nodes = article.find(mwlib.parser.nodes.ArticleLink) | |
for n in nodes: |
I hereby claim:
To claim this, I am signing this object:
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
def mod(X, Y): | |
return X - Y * (X / Y) |
* Why does a split dict get resized multiple times when there are only one reference (instance of a class) and once when there are many reference | |
* When does it go from a combined dict back to a split dict? | |
BUILD INTERFACE TO ASK ANONYMOUS QUESTIONS |