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
from itertools import permutations | |
from random import choice as randchoice | |
og_names = ['a', 'b', 'c', 'd'] # secret santa choices | |
names, recipients = [], [] | |
def set_names(): | |
global names | |
global recipients |
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 csv | |
import sys | |
from bs4 import BeautifulSoup | |
import requests | |
def search(search_term): | |
""" | |
Fetches the search results page for the given search term. |
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 requests | |
import datetime | |
URL = 'https://api.coinmarketcap.com/v1/ticker/' | |
PARAMS = {'limit': 10} | |
def api_fetch(): | |
r = requests.get(URL, params=PARAMS) | |
return r.json() |
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 random | |
import argparse | |
if __name__ == '__main__': | |
parser = argparse.ArgumentParser(description="Random number generator") | |
parser.add_argument( | |
'--min', | |
help="The minimum number in range [min, max] including end points", | |
type=int, |