- Fans!
- M2 is quiet
- P1 is noisy (used TPFanControl to help)
- Emacs keybindings everywhere
- P1 - AutoHotKeys with emacseverywhere
- M2 - Hammerspoon with https://github.com/justintanner/universal-emacs-keybindings
- Zoom
from sklearn.metrics import roc_auc_score | |
from hyperopt import hp, Trials, fmin, tpe | |
from hyperopt import fmin, tpe, hp, STATUS_OK, Trials | |
from sklearn.metrics import accuracy_score, roc_auc_score | |
from typing import Any, Dict, Union | |
import xgboost as xgb | |
def hyperparameter_tuning(space: Dict[str, Union[float, int]], |
%matplotliblib inline | |
import pandas as pd | |
url = 'https://github.com/COVID19Tracking/covid-tracking-data/raw/master/data/states_daily_4pm_et.csv' | |
df = pd.read_csv(url, parse_dates=['date', 'dateChecked']) | |
(df | |
[df.state == 'NC'] | |
.set_index('date') | |
[['positive', 'hospitalized']] | |
.fillna(0) |
def tweak_nyc(raw): | |
def clean_col(val): | |
return val.strip().replace(' ', '_') | |
return (raw | |
.rename(columns=clean_col) | |
.assign(PrecipitationIn=pd.to_numeric( | |
raw.PrecipitationIn.replace('T', '0.001')), | |
Events=raw[' Events'].fillna(''), | |
) | |
.assign(PrecipitationCM=lambda df_:df_.PrecipitationIn*2.54) |
""" | |
This is a module docstring. It must be at the TOP | |
of the file. | |
This is the markov module. You can create | |
a markov chain like this: | |
>>> m = Markov('ab') | |
>>> m.predict('a') | |
'b' |
%%javascript | |
var selectedCell = 0; | |
var viewOutput = false; | |
Jupyter.keyboard_manager.command_shortcuts.add_shortcut('ctrl-l', function (event) { | |
function getOutputScrollValue(cell) { | |
var percent = 0; | |
var ct = cell.output_area.element.offset().top; | |
var sme = Jupyter.notebook.scroll_manager.element; |