def map_reader(fd, size, url, params):
     from disco.worker import task_io
     assert isinstance(fd, file)
     return task_io.chain_reader(fd, size, url, params)
예제 #2
0
파일: kclustering.py 프로젝트: sajal/disco
def reader(fd, size, url, params):
    for e in chain_reader(fd, size, url):
        L = e.split()
        yield L[0], [float(s) for s in L[1:]]
예제 #3
0
 def map_reader(fd, size, url, params):
     from disco.worker import task_io
     assert isinstance(fd, file)
     return task_io.chain_reader(fd, size, url, params)
예제 #4
0
def reader(fd, size, fname, extra):
    from disco.worker.task_io import chain_reader
    for k, v in chain_reader(fd, size, fname):
        yield k + extra, v
예제 #5
0
def reader(fd, size, url):
    from disco.worker.task_io import chain_reader
    for e in chain_reader(fd, size, url):
        L = e.split()
        yield L[0], [float(s) for s in L[1:]]
예제 #6
0
def reader(fd, size, fname, extra):
    from disco.worker.task_io import chain_reader
    for k, v in chain_reader(fd, size, fname):
        yield k + extra, v
예제 #7
0
def reader(fd, size, url, params):
    for e in chain_reader(fd, size, url):
        L = e.split()
        yield L[0], [float(s) for s in L[1:]]
예제 #8
0
파일: __init__.py 프로젝트: AlexArgus/disco
def open_chain(url, task=None):
    from disco.worker.task_io import chain_reader
    return chain_reader(open(url, task=task), None, url)
예제 #9
0
def open_chain(url, task=None):
    from disco.worker.task_io import chain_reader
    return chain_reader(open(url, task=task), None, url)