Skip to content

Instantly share code, notes, and snippets.

View sjbitcode's full-sized avatar
:octocat:

Sangeeta Jadoonanan sjbitcode

:octocat:
View GitHub Profile
@sjbitcode
sjbitcode / secret_santa.py
Created October 10, 2021 07:26
Secret Santa script (draft)
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
@sjbitcode
sjbitcode / google_search.py
Created May 31, 2018 03:24
Scrape google searches and write to CSV file
import csv
import sys
from bs4 import BeautifulSoup
import requests
def search(search_term):
"""
Fetches the search results page for the given search term.
@sjbitcode
sjbitcode / c-logger.py
Created December 22, 2017 09:27
Cryptologger using coinmarketcap API
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()
@sjbitcode
sjbitcode / randnum.py
Last active October 24, 2016 16:29
Python random number generator
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,