Skip to content

Instantly share code, notes, and snippets.

class CsvFileSource(beam.io.filebasedsource.FileBasedSource):
def read_records(self, file_name, range_tracker):
[...]
reader = csv.reader(_File2Iterator(self._file), delimiter=self.delimiter)
[...]
class _File2Iterator(object):
def __init__(self, obj):
class TestCsvFileSource(unittest.TestCase):
CSV_LINES_FILE = """header1,header2,header3
value1,value2,value3
"""
def test_gzipped_csv(self):
out = StringIO()
with tempfile.NamedTemporaryFile() as f:
Det här är en anteckning
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ivarg
ivarg / keybase.md
Created February 26, 2015 22:10
keybase.md

Keybase proof

I hereby claim:

  • I am ivarg on github.
  • I am ig (https://keybase.io/ig) on keybase.
  • I have a public key whose fingerprint is AA94 66E7 AAA5 C795 369C 6E77 0BA4 9725 CF50 0167

To claim this, I am signing this object: