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
| ######################################################## | |
| # caliquakes.py - list CA quakes in past week | |
| # Author: Paul Reiber | |
| # | |
| import json | |
| import datetime | |
| import urllib.request | |
| import pprint | |
| feed = "https://earthquake.usgs.gov/earthquakes/feed/v1.0/summary/all_week.geojson" |
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 random import randint as rand | |
| def roll(**dice): | |
| ret=0 | |
| for key in dice: | |
| val = rand(1, dice[key]) | |
| print("%s: %s" % (key, val)) | |
| ret += val | |
| return(ret) | |
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
| """ | |
| Script to DO SOMETHING. Starting point. | |
| """ | |
| import argparse | |
| import logging | |
| def logger(log_level): | |
| logging.getLogger(__name__).setLevel(log_level) | |
| def arguments(): |
OlderNewer