Skip to content

Instantly share code, notes, and snippets.

@yaniv-aknin
yaniv-aknin / README.md
Last active April 28, 2021 08:38
Visual overview of fafalytics
from google.cloud import bigquery
c = bigquery.Client()
job_config = bigquery.LoadJobConfig(
source_format=bigquery.SourceFormat.NEWLINE_DELIMITED_JSON,
write_disposition='WRITE_APPEND')
job = c.load_table_from_json([{'id': '7', 'value': 'qux'}], 'test_dataset.test_table', job_config=job_config)
print(job.result())
@yaniv-aknin
yaniv-aknin / server.py
Created October 16, 2022 13:40
Simple multi-client server for my nephew
#!/usr/bin/env python3
import argparse
import select
import socket
def parse_options():
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--port', type=int, required=True)
options = parser.parse_args()