Skip to content

Instantly share code, notes, and snippets.

d = {u'makesCount': 39, u'makes': [{u'models': [{u'years': [{u'id': 200471908, u'year': 2014}], u'id': u'Acura_ILX', u'niceName': u'ilx', u'name': u'ILX'}, {u'years': [{u'id': 200493809, u'year': 2014}], u'id': u'Acura_ILX_Hybrid', u'niceName': u'ilx-hybrid', u'name': u'ILX Hybrid'}, {u'years': [{u'id': 200465929, u'year': 2014}], u'id': u'Acura_MDX', u'niceName': u'mdx', u'name': u'MDX'}, {u'years': [{u'id': 200467168, u'year': 2014}], u'id': u'Acura_RDX', u'niceName': u'rdx', u'name': u'RDX'}, {u'years': [{u'id': 100539511, u'year': 2014}], u'id': u'Acura_RLX', u'niceName': u'rlx', u'name': u'RLX'}, {u'years': [{u'id': 200488448, u'year': 2014}], u'id': u'Acura_TL', u'niceName': u'tl', u'name': u'TL'}, {u'years': [{u'id': 200490517, u'year': 2014}], u'id': u'Acura_TSX', u'niceName': u'tsx', u'name': u'TSX'}, {u'years': [{u'id': 200673755, u'year': 2014}], u'id': u'Acura_TSX_Sport_Wagon', u'niceName': u'tsx-sport-wagon', u'name': u'TSX Sport Wagon'}], u'id': 200002038, u'niceName': u'acura', u'name': u'Acura
@sakamer71
sakamer71 / gist:13d8983bf78133ac0c40
Created December 2, 2014 02:26
speech recognition
__author__ = 'skamer'
import speech_recognition as sr
from os import system
r = sr.Recognizer()
def talk(x):
phrase = "say -v samantha \"{}\"".format(x)
return system(phrase)
def listen(x):
@sakamer71
sakamer71 / find_next_prime
Created January 12, 2015 18:54
finding next prime - for rmotr
### Assignment ###
#
# Your assignment is to implement the
# following function: `find_next_prime`.
# As the name states, given the number `n` the
# function should return the next closest prime.
#
# Examples:
# * `find_next_prime(6)` should return 7.
# * `find_next_prime(10)` should return 11.
@sakamer71
sakamer71 / testmygif.html
Created March 3, 2015 01:30
animated gif on mouseover
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>Animated Gif Test</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script type="text/javascript">
@sakamer71
sakamer71 / aticreek.py
Created September 13, 2015 14:45
template for ati creek
__author__ = '502400200'
from random import random,randint,randrange
pcount = 40
multrange = 13
divrange = 144
levels = list('ghijklmnopqrstuvwxyz')
print levels
def check_level():
#!/usr/bin/env python
## PEP8 says pick a variable naming convention, and stick to it
#### mixed case for variables
#### underscores for functions
#### double and single quotes are interchangeable - use the one which will look cleanest
import os
import collections
words = ''
checkWord = ''
@sakamer71
sakamer71 / hello.py
Created April 15, 2022 19:08
my hello
print('hello')
import requests
from bs4 import BeautifulSoup
url = 'https://www.pro-football-reference.com'
year = 2021
r = requests.get(url + '/years/' + str(year) + '/fantasy.htm')
soup = BeautifulSoup(r.content, 'html.parser')
parsed_table = soup.find_all('table')[0]
#print(parsed_table)
import requests
from bs4 import BeautifulSoup
from pprint import pprint
#import re
import pandas as pd
baseurl = 'https://www.pro-football-reference.com'
year = 2021
playerDataFile = f"playerData_{year}.csv"
#ffFile = 'fffile.csv'
import boto3
from datetime import datetime, timedelta
import pandas as pd
from openpyxl import Workbook
from openpyxl.utils import get_column_letter
from openpyxl.styles import Font, PatternFill
from openpyxl.worksheet.table import Table, TableStyleInfo
def get_resource_name(resource_id):