Skip to content

Instantly share code, notes, and snippets.

@boates
boates / testClassificationModel.py
Last active January 16, 2019 01:37
For running sklearn classification algorithms easily on pandas data frame. Also perform tests on model accuracy.
def splitData(df, trainPerc=0.6, cvPerc=0.2, testPerc=0.2):
"""
return: training, cv, test
(as pandas dataframes)
params:
df: pandas dataframe
trainPerc: float | percentage of data for trainin set (default=0.6
cvPerc: float | percentage of data for cross validation set (default=0.2)
testPerc: float | percentage of data for test set (default=0.2)
(trainPerc + cvPerc + testPerc must equal 1.0)
@jkullick
jkullick / raspberry-pi-chroot-armv7-qemu.md
Last active March 24, 2024 14:36
Chroot into Raspberry Pi ARMv7 Image with Qemu
# install dependecies
apt-get install qemu qemu-user-static binfmt-support

# download raspbian image
wget https://downloads.raspberrypi.org/raspbian_latest

# extract raspbian image
unzip raspbian_latest
@GregRos
GregRos / more-about-pretty-and-usable-wsl-terminals.md
Last active May 3, 2021 15:58
Some notes on "Configuring a pretty and usable terminal emulator for WSL"

These comments are based on a few years of experience working with WSL. It's based on this tutorial:

https://blog.ropnop.com/configuring-a-pretty-and-usable-terminal-emulator-for-wsl/

And are basically updates to make it more relevant.

Opening a shell

In the past, to make the WSL run a command from cmd or somewhere else, you had to run the bash.exe program from windows, which fired up bash (and always bash) in the WSL and made it execute a command.

@pmbaumgartner
pmbaumgartner / cloud-init.yaml
Last active May 8, 2024 15:01
Multipass & Docker Setup
#cloud-config
package_upgrade: true
ssh_authorized_keys:
- <your key>
packages:
- apt-transport-https
- ca-certificates
- curl