Skip to content

Instantly share code, notes, and snippets.

View diegoeche's full-sized avatar

Diego Echeverri diegoeche

View GitHub Profile
1) "1092200529"
2) "100003618227694"
3) "100003158233371"
4) "100002542453833"
5) "1002157672"
6) "1341005026"
7) "100004161994675"
8) "1005935063"
9) "100001182421106"
10) "100001606315832"
def compress!
r_i = 0.0
c = Cursor.new(self.samples)
while ~c != nil && ~c.next != nil
r_i = (~c).rank + (~c.next).value + (~c.next).delta
if r_i <= @invariant.upper_bound(r_i, n)
removed = ~c.next
(~c).value = removed.value
(~c).delta = removed.delta
c.remove!
# Leagues finishing the 05.10.2013
bronze Segment a = 4293
bronze Segment b = 2125
bronze Segment c = 1514
bronze Segment d = 1468
silver Segment a = 383
silver Segment b = 662
silver Segment c = 655
bronze Segment a = 22712
bronze Segment b = 11558
bronze Segment c = 7930
bronze Segment d = 7903
silver Segment a = 729
silver Segment b = 1195
silver Segment c = 1258
silver Segment d = 4901
a b c d
Bronze: 13117, 7307, 5090, 5293
Silver: 313, 490, 551, 2228
Gold: 5, 6, 9, 297
Platinum 1, 2, 2, 39
a b c d
Bronze: 13117, 7307, 5090, 5293
Silver: 313, 490, 551, 2228
for OG_URL in `cat og_urls.txt`
do
curl -X POST \
-F "id=$OG_URL" \
-F "scrape=true" \
"https://graph.facebook.com"
done
;; then enter the text in that file's own buffer.
def bfs(children, element_to_find, level)
# unqued = children.shift()
unqued = children.pop()
if unqued == element_to_find
unqued
else
if unqued.is_a?(Array)
puts level
bfs(children + unqued, element_to_find, level + 1)
else
string_to_order_id(Id) ->
<<Part:9/binary, _Rest/binary>> = crypto:md5(Id),
<<255,Part/binary>>.