Skip to content

Instantly share code, notes, and snippets.

Avatar

Sun Junyi fxsjy

  • Tencent
  • Beijing, China
View GitHub Profile
@fxsjy
fxsjy / find_nth_int.py
Created Sep 12, 2012 — forked from yongsun/find_nth_int.py
find nth integer in distributed env
View find_nth_int.py
#!/usr/bin/python
import numpy.random as random
from bisect import bisect_left, bisect_right
class SlaveNode:
def __init__ (self, data):
self.data = sorted(data)
def get_range (self):