This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update_object(model, obj): | |
for name, property in model.properties().iteritems(): | |
setattr(obj, name, property.get_value_for_datastore(model)) | |
def to_object(model): | |
def __eq__(self, other): | |
return self.__dict__ == other.__dict__ | |
def __cmp__(self, other): | |
return cmp(self.__dict__, other.__dict__) | |
DomainType = type(model.kind(), (object,), dict(__eq__=__eq__, __cmp__=__cmp__)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"window": { | |
"id": 2717, | |
"challenge_id": 95, | |
"start_date": "2014-01-13 00:00:00", | |
"end_date": "2014-01-19 23:59:59", | |
"interval": "1 day", | |
"ruleset": { | |
"id": 1, "multipliers": {"device-steps": 1}, "rules": [ | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
exec 2>&1 | |
exec /opt/runit_enabled/bin/runnable.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import duckdb | |
from google.cloud import bigquery | |
bqclient = bigquery.Client() | |
table = bigquery.TableReference.from_string( | |
"bigquery-public-data.utility_us.country_code_iso" | |
) | |
rows = bqclient.list_rows(table) | |
country_code_iso = rows.to_arrow(create_bqstorage_client=True) | |
cursor = duckdb.connect() |