Skip to content

Instantly share code, notes, and snippets.

View akashlevy's full-sized avatar
😄

Akash Levy akashlevy

😄
View GitHub Profile
@akashlevy
akashlevy / mergecsv.py
Created November 18, 2022 06:39
5-line CSV merge :)
View mergecsv.py
import pandas as pd
metrics = pd.read_csv("metrics.csv", skipinitialspace=True)
perms = pd.read_csv("perms.csv", skipinitialspace=True).iloc[:,:-1]
result = pd.merge(metrics, perms, how="inner", on=["id", "session"])
result.to_csv("merged.csv", index=False)
@akashlevy
akashlevy / scorm_complete.js
Created June 22, 2022 18:23
How to mark complete in SCORM course
View scorm_complete.js
// Step 1: Run Google Chrome with web security disabled (e.g. "chrome.exe --disable-web-security")
// Step 2: Navigate to SCORM course
// Step 3: Open Dev Tools -> Console
// Step 4: Switch the scope to SCORM scope (e.g. sco)
// Step 5: Type following commands...
SCORM_SetCompleted()
SCORM_CommitData()
@akashlevy
akashlevy / hexwords.py
Created April 27, 2022 05:31
Hexadecimal Words
View hexwords.py
import re, string
minlen = 3
subs = [
#('for', '4'),
#('four', '4'),
#('to', '2'),
#('ate', '8'),
#('ten', '10'),
@akashlevy
akashlevy / zsim
Last active November 11, 2021 14:16
If you are having trouble installing zsim, try this after installing Ubuntu 16.04:
View zsim
# Install Linux 3.19 kernel and reboot into it
wget http://launchpadlibrarian.net/220635919/linux-headers-3.19.0-31-generic_3.19.0-31.36~14.04.1_amd64.deb
wget http://launchpadlibrarian.net/220668669/linux-headers-3.19.0-31_3.19.0-31.36~14.04.1_all.deb
wget http://launchpadlibrarian.net/220635970/linux-image-3.19.0-31-generic_3.19.0-31.36~14.04.1_amd64.deb
sudo apt-get module-init-tools
sudo dpkg -i linux-*
sudo reboot
## MAKE SURE YOU HIT SHIFT AND REBOOT INTO KERNEL 3.19
## OR EDIT /etc/default/grub TO MAKE KERNEL 3.19 DEFAULT BEFORE REBOOT