- 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
| import pandas as pd | |
| url = 'http://atmenv.envi.osakafu-u.ac.jp/omu-content/uploads/sites/1215/2015/10/KyotoFullFlower7.xls' | |
| cherry_raw = pd.read_excel(url, skiprows=25, dtype_backend='pyarrow') | |
| def tweak_cherry(df): | |
| return (df | |
| #.query('~`Full-flowering date (DOY)`.isna()') | |
| .rename(columns={'AD': 'year', | |
| 'Full-flowering date (DOY)': 'flowering_doy', |
| 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) |