Skip to content

Instantly share code, notes, and snippets.

View kylrth's full-sized avatar

Kyle Roth kylrth

View GitHub Profile
@kylrth
kylrth / run.py
Created December 19, 2022 17:47
some population and immigration data sleuthing
import pandas as pd
def get_historical_rates(country: str) -> pd.DataFrame:
# https://ourworldindata.org/grapher/population-growth-rate-with-and-without-migration
df = pd.read_csv("ourworldindata.csv")
df = df[df["Entity"] == country]
df = df.drop(["Entity", "Code"], axis=1)
df = df.rename(
columns={
@kylrth
kylrth / README.md
Last active September 12, 2022 06:56
Wake-on-LAN with tp-link TG-3468 on Ubuntu 18.04.3

WOL with tp-link TG-3468 on Ubuntu 18.04.3

I'm putting this here for my own reference because I was up way too late figuring this out.

After installing the network card, I could see I already had the right driver for it. sudo lshw -c network showed that the card was disabled though. What ended up getting the card working was the following which I recorded here:

sudo ip l s dev enp6s0 up
@kylrth
kylrth / app.py
Created August 13, 2019 16:18
Debugging Bokeh server applications using Visual Studio Code
import ptvsd
# attach to VS Code debugger if this script was run with BOKEH_VS_DEBUG=true
if os.environ['BOKEH_VS_DEBUG'] == 'true':
# 5678 is the default attach port in the VS Code debug configurations
print('Waiting for debugger attach')
ptvsd.enable_attach(address=('localhost', 5678), redirect_output=True)
ptvsd.wait_for_attach()