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
A couple of images |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/usr/bin/env python3 | |
# This is a pre-commit hook that ensures attempts to commit files that | |
# are larger than 100 MB to your _local_ repo fail, with a helpful error | |
# message. This is the python version. | |
# | |
# This prevents the local repo from getting out of sync with the Github | |
# repo. To install | |
# 1) Install gitpython | |
# $ pip install gitpython |
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
#!/bin/sh | |
# This is a pre-commit hook that ensures attempts to commit files that | |
# are larger than 100 MB to your _local_ repo fail, with a helpful error | |
# message. | |
# | |
# This prevents the local repo from getting out of sync with the Github | |
# repo. To install | |
# 1) Change this file to executable: | |
# $ chmod a+x pre-commit |
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 base64 | |
def base64_encode_string(s): | |
return base64.b64encode(s.encode()).decode() | |
class MyAPI: | |
def __init__(self, token_url, client_id, client_secret): |
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 base64 | |
import pprint | |
# You need to register an "app" on Spotify and | |
# go to your dashboard at | |
# https://developer.spotify.com/dashboard/applications | |
# to get the client id and client seceret | |
CLIENTID = 'YOUR_CLIENT_ID' |
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
year | state | votes | candidate | party | short_state | |
---|---|---|---|---|---|---|
2016 | Alabama | 729547 | Clinton, Hillary | Democratic | AL | |
2016 | Alaska | 116454 | Clinton, Hillary | Democratic | AK | |
2016 | Arizona | 1161167 | Clinton, Hillary | Democratic | AZ | |
2016 | Arkansas | 380494 | Clinton, Hillary | Democratic | AR | |
2016 | California | 8753788 | Clinton, Hillary | Democratic | CA | |
2016 | Colorado | 1338870 | Clinton, Hillary | Democratic | CO | |
2016 | Connecticut | 897572 | Clinton, Hillary | Democratic | CT | |
2016 | Delaware | 235603 | Clinton, Hillary | Democratic | DE | |
2016 | Florida | 4504975 | Clinton, Hillary | Democratic | FL |