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
| cd ~/git | |
| git clone git://github.com/bitly/dablooms.git | |
| cd dablooms/ | |
| make | |
| sudo make install | |
| make pydablooms | |
| sudo make install_pydablooms |
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
| sudo pip install -U https://github.com/downloads/SiteSupport/gevent/gevent-1.0rc2.tar.gz | |
| rm ~/service/msgme-* | |
| cd ~/git/msgme-api | |
| git pull | |
| cd ~/git/borkbork | |
| git pull |
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
| mkdir -p ~/java | |
| cd ~/java | |
| wget https://s3.amazonaws.com/littleinc-packages/jre-7u10-linux-x64.gz | |
| gunzip -c jre-7u10-linux-x64.gz | tar xvf - | |
| ln -s ./jre1.7.0_10/ ./jre | |
| cd ~/git/msgme-api && git pull | |
| cd ~/git/borkbork && git pull | |
| ln -s ~/sv/kestrel ~/service |
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
| sudo pip install prctl hash_ring | |
| # stop redis if you run it manually | |
| rm ~/service/redis | |
| cd ~/git/msgme-api | |
| git checkout develop | |
| git pull | |
| cd ~/git/borkbork |
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 os | |
| uniques = {} | |
| n = 0 | |
| for line in open(os.path.dirname(__file__)+'/part-r-00000'): | |
| blog_id, unique_id = [int(x) for x in line.strip().split()] | |
| uniques.setdefault(blog_id, set()).add(unique_id) | |
| n += 1 |
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
| int main() { | |
| int valid = 0; | |
| int invalid = 0; | |
| string line; | |
| string formatted; | |
| PhoneNumberUtil* util = PhoneNumberUtil::GetInstance(); | |
| PhoneNumber number; | |
| while (cin) { |
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
| (gdb) bt#0 swap (index2_=4, index1_=3, this=0x13aaaa0) at array.hpp:129#1 zmq::dist_t::activated (this=0x13aaaa0, pipe_=<optimized out>) at dist.cpp:95#2 0x00007ffff4a7f9bc in zmq::socket_base_t::process_commands (this=0x13aa700, timeout_=<optimized out>, throttle_=false) at socket_base.cpp:825#3 0x00007ffff4a7fcc3 in zmq::socket_base_t::getsockopt (this=0x13aa700, option_=<optimized out>, optval_=0x7fffffff3d64, optvallen_=0x7fffffff3d50) at socket_base.cpp:290#4 0x00007ffff3f2f69a in __pyx_pf_3zmq_4core_6socket_6Socket_12get (__pyx_v_self=0x12f3f58, __pyx_v_option=15) at zmq/core/socket.c:3526#5 0x0000000000498546 in PyEval_EvalFrameEx ()#6 0x000000000049f1c0 in PyEval_EvalCodeEx ()#7 0x00000000004a8960 in function_call ()#8 0x00000000004e9f36 in PyObject_Call () | |
| #9 0x00000000004ec11a in instancemethod_call.8548 () | |
| #10 0x00000000004e9f36 in PyObject_Call () | |
| #11 0x00007ffff286e483 in gevent_callback (loop=0x12618c0, callback=<instancemethod at remote 0xbbca50>, args=(), watcher=<gevent.core.io at r |
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
| (gdb) bt | |
| #0 swap (index2_=4, index1_=3, this=0x13aaaa0) at array.hpp:129 | |
| #1 zmq::dist_t::activated (this=0x13aaaa0, pipe_=<optimized out>) at dist.cpp:95 | |
| #2 0x00007ffff4a7f9bc in zmq::socket_base_t::process_commands (this=0x13aa700, timeout_=<optimized out>, throttle_=false) at socket_base.cpp:825 | |
| #3 0x00007ffff4a7fcc3 in zmq::socket_base_t::getsockopt (this=0x13aa700, option_=<optimized out>, optval_=0x7fffffff3d64, optvallen_=0x7fffffff3d50) at socket_base.cpp:290 | |
| #4 0x00007ffff3f2f69a in __pyx_pf_3zmq_4core_6socket_6Socket_12get (__pyx_v_self=0x12f3f58, __pyx_v_option=15) at zmq/core/socket.c:3526 | |
| #5 0x0000000000498546 in PyEval_EvalFrameEx () | |
| #6 0x000000000049f1c0 in PyEval_EvalCodeEx () | |
| #7 0x00000000004a8960 in function_call () | |
| #8 0x00000000004e9f36 in PyObject_Call () |
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
| [color] | |
| branch = auto | |
| diff = auto | |
| status = auto | |
| [color "branch"] | |
| current = yellow reverse | |
| local = yellow | |
| remote = green | |
| [color "diff"] | |
| meta = yellow bold |
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
| def batch(source, size): | |
| while len(source): | |
| yield source[:size] | |
| source = source[size:] | |
| for chunk in batch(range(97), 10): | |
| print chunk |