(fname)
convenience for reading back.
convenience for reading back.
convenience for reading back .
def read_records(fname):
    """ convenience for reading back. """
    skipped = 0
    with open(fname, 'rb') as f:
        for line in f:
            if not line.endswith('\n'):
                skipped += 1
                continue
            yield json.loads(line.strip())
        if skipped > 0:
            logging.warn('skipped {} lines'.format(skipped))
def read_records ( fname ) : skipped = 0 with open ( fname , 'rb' ) as f : for line in f : if not line . endswith ( '\n' ) : skipped += 1 continue yield json . loads ( line . strip ( ) ) if skipped > 0 : logging . warn ( 'skipped {} lines' . format ( skipped ) )