This file contains hidden or 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
;; Enter your code here. Read input from STDIN. Print output to STDOUT | |
;; | |
;; | |
;; Sample data | |
;; | |
;;4 | |
;;0 0 | |
;;0 1 | |
;;1 1 | |
;;1 0 |
This file contains hidden or 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
Step G must be finished before step X can begin. | |
Step X must be finished before step B can begin. | |
Step A must be finished before step I can begin. | |
Step D must be finished before step H can begin. | |
Step O must be finished before step T can begin. | |
Step H must be finished before step C can begin. | |
Step S must be finished before step E can begin. | |
Step U must be finished before step M can begin. | |
Step M must be finished before step Z can begin. | |
Step R must be finished before step N can begin. |
This file contains hidden or 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
from mailchimp3 import MailChimp | |
import os | |
import sys | |
import datetime | |
import gspread | |
from oauth2client.service_account import ServiceAccountCredentials | |
import random | |
from functools import partial | |
import json |
This file contains hidden or 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 argparse | |
def copyfiles(src, dest): | |
print("Copying from %s to %s" % (src, dest)) | |
if __name__ == "__main__": | |
parser = argparse.ArgumentParser() | |
parser.add_argument("src_dir", metavar="src-dir", help="Where we are copying from") |
This file contains hidden or 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
from logzio.handler import LogzioHandler | |
import logging | |
logger = logging.getLogger(__name__) | |
logz_handler = LogzioHandler(url=MagicURL("https://example.com/logging")) | |
logger.addHandler(logz_handler) |
This file contains hidden or 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
from datetime import datetime | |
class MagicURL(object): | |
def __init__(self, base_url): | |
self.base_url = base_url | |
def __str__(self): | |
today = datetime.today() | |
return self.base_url + "/" + today.strftime("%Y-%m-%d") | |
This file contains hidden or 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 argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("table_name", metavar="table-name", help="blah", default=None) | |
parser.add_argument("--start-ts", help="blah2", default=None) | |
settings = parser.parse_args() | |
import pdb; pdb.set_trace() | |
print("goodbye") |
This file contains hidden or 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
from setuptools import setup, find_packages | |
import subprocess | |
def _get_version_hash(): | |
"""Talk to git and find out the tag/hash of our latest commit""" | |
try: | |
p = subprocess.Popen(["git", "describe", | |
"--tags", "--dirty", "--always"], | |
stdout=subprocess.PIPE) | |
except EnvironmentError: |
This file contains hidden or 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 wat(my_input_list): | |
my_output_list = [] | |
for x in my_input_list: | |
if isinstance(x, basestring): | |
#Why are we getting strings!?!?! | |
continue | |
output = process_stuff(x) | |
my_input_list.append(output) | |
return my_output_list |
This file contains hidden or 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
@app.route("/self-driving-car") | |
def self_drive_car_overview(): | |
return render_template("sdc-why.template.html") |