Esempio n. 1
0
    def read_data(year, month, day, hour):
        month = str(month).zfill(2)
        day = str(day).zfill(2)
        filename = "data/%d-%s-%s-%d.json.gz" % (year, month, day, hour)

        command = Command("parse_file", filename)
        command.execute()
Esempio n. 2
0
    def download_data(year, month, day, hour):
        month = str(month).zfill(2)
        day = str(day).zfill(2)
        url = "http://data.githubarchive.org/%d-%s-%s-%d.json.gz" % (
            year, month, day, hour)

        command = Command("download_file", url)
        command.execute()