Rainy. I took the 6 from GCS to Canal St and walked about 4 blocks.
Intense! Met a lot of people!
| import requests | |
| headers = {"token": "API TOKEN"} | |
| params = {"something": "SOMETHING"} | |
| response = requests.get("https://www.something.com", headers=headers, params=params) | |
| json_data = response.json() | |
| status = response.status_code |
| import pandas as pd | |
| from datetime import datetime, date | |
| """ | |
| Cleaning time! | |
| This script will clean data downloaded from the fitbit website. | |
| A little bit of preprocessing is useful. First, Separate the activities | |
| and sleep data into different csv files and make sure there's only | |
| one header row in each. Multiple months may be concatenated together, |
| function toTitleCase(str) | |
| { | |
| return str.replace(/\w\S*/g, function(txt){return txt.charAt(0).toUpperCase() + txt.substr(1).toLowerCase();}); | |
| } |
| import json | |
| import csv | |
| # open a file for writing | |
| data = open('trumptweets.csv', 'w') | |
| # create the csv writer object | |
| csvwriter = csv.writer(data) | |
| #write the header |
| # conversion rate exploratory analysis and ML algorithm hyperparameter optimization | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from sklearn.model_selection import train_test_split | |
| from tpot import TPOTClassifier | |
| # load the data | |
| df = pd.read_csv("conversion_data.csv") |
| from sklearn.metrics import confusion_matrix | |
| #type of classifier is not important | |
| clf = GradientBoostingClassifier(loss='deviance', learning_rate=0.075, n_estimators=150, max_depth=3) | |
| grbfit = clf.fit(X_train, y_train) | |
| y_pred = grbfit.predict(X_test) | |
| print(clf.score(X_test, y_test)) | |
| class_names = [0,1] |
| # script to extract music from a pico-8 | |
| # requires exporting sounds from the pico-8 first! | |
| # run as: python extract-music.py mygame.p8 sound%d.wav music%d.wav | |
| # by eevee, do what you like with this code | |
| from __future__ import print_function | |
| import argparse | |
| import struct | |
| import wave | |
| ---- | |
| ---- library code | |
| ---- | |
| _communic8_chars = "\n\32\33\34\35\36\37\38\39\40\41\42\43\44\45\46\47\48\49\50\51\52\53\54\55\56\57\58\59\60\61\62\63\64\65\66\67\68\69\70\71\72\73\74\75\76\77\78\79\80\81\82\83\84\85\86\87\88\89\90\91\92\93\94\95\96\97\98\99\100\101\102\103\104\105\106\107\108\109\110\111\112\113\114\115\116\117\118\119\120\121\122\123\124\125\126\127\128\129\130\131\132\133\134\135\136\137\138\139\140\141\142\143\144\145\146\147\148\149\150\151\152\153" | |
| _communic8_charindices = {} | |
| for i = 1, #_communic8_chars do | |
| _communic8_charindices[sub(_communic8_chars, i, i)] = 30 + i | |
| end | |
| arg_types = { | |
| byte={ |
| [Unit] | |
| Description=Potentially dangerous fix touchscreen after resume on the XPS 13 9350 | |
| After=suspend.target | |
| [Service] | |
| Type=simple | |
| ExecStart=/home/anthony/path/to/xps-touchscreen-workaround.sh | |
| [Install] | |
| WantedBy=suspend.target |