brew upgrade && brew update
How to show all available install versions?
pyenv install --list
# Python pickling example: | |
import pickle | |
with open('pickledfile.pickle', 'wb') as f: | |
pickle.dump(model, f, pickle.HIGHEST_PROTOCOL) | |
with open('pickledfile.pickle', 'rb') as f: | |
model = pickle.load(f) |
# Import requests package | |
import requests | |
# API Key (request one at https://developer.va.gov/apply) | |
apikey = 'your-api-key-here' | |
# Typical request | |
url = 'https://dev-api.va.gov/services/va_facilities/v0/facilities/' | |
response = requests.get( |
from time import sleep | |
from selenium import webdriver | |
from bs4 import BeautifulSoup | |
# Headless/incognito Chrome driver | |
chrome_options = webdriver.ChromeOptions() | |
chrome_options.add_argument("--incognito") | |
chrome_options.add_argument('headless') | |
driver = webdriver.Chrome(executable_path='CHROMEDRIVER_PATH',chrome_options=chrome_options) |
import re | |
import string | |
def standardise_column_names(df, remove_punct=True): | |
""" Converts all DataFrame column names to lower case replacing | |
whitespace of any length with a single underscore. Can also strip | |
all punctuation from column names. | |
Parameters | |
---------- |
import pandas as pd | |
# Read in excel file and gathering sheet names | |
xls = pd.ExcelFile('file_path') | |
sheet_names = xls.sheet_names | |
sheet_names | |
for name in sheet_names: | |
<df_name> = pd.read_excel('file_path', name) |
-- Remove the history from | |
rm -rf .git | |
-- recreate the repos from the current content only | |
git init | |
git add . | |
git commit -m "Initial commit" | |
-- push to the github remote repos ensuring you overwrite history | |
git remote add origin https://github.com/<YOUR ACCOUNT>/<YOUR REPO>.git |