I hereby claim:
- I am alexjj on github.
- I am alexjj (https://keybase.io/alexjj) on keybase.
- I have a public key whose fingerprint is 8B9B 891B 7CB8 D401 E268 068D 0EDC 6376 B245 2245
To claim this, I am signing this object:
#List unique values in a DataFrame column | |
pd.unique(df.column_name.ravel()) | |
#Convert Series datatype to numeric, getting rid of any non-numeric values | |
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
#Grab DataFrame rows where column has certain values | |
valuelist = ['value1', 'value2', 'value3'] | |
df = df[df.column.isin(value_list)] |
#!/bin/sh | |
/usr/sbin/portsnap fetch update && \ | |
/usr/local/sbin/portmaster -L --index-only | egrep '(ew|ort) version|total install' | |
echo -n "Last update: " | |
date -r `pkg query %t | sort | tail -n1` "+%Y%m%d" |
# How to use: | |
# | |
# Just place a lock.png in your home folder to overlay whatever you want | |
#!/bin/bash | |
scrot -e 'convert -blur 0x3 $f ~/lockbg.png' | |
convert -gravity center -composite ~/lockbg.png ~/lock.png ~/lockfinal.png | |
i3lock -u -i ~/lockfinal.png | |
rm ~/lockfinal.png ~/lockbg.png |
# Note | |
note () { | |
# if file doesn't exist, create it | |
if [[ ! -f $HOME/.notes ]]; then | |
touch "$HOME/.notes" | |
fi | |
if ! (($#)); then | |
# no arguments, print file |
autoconf | |
automake | |
bash | |
binutils | |
bison | |
bzip2 | |
coreutils | |
cryptsetup | |
device-mapper | |
dhcpcd |
I hereby claim:
To claim this, I am signing this object:
zfs list -H -o name -t snapshot | xargs -n1 zfs destroy |
PIDFILE=/home/alex/radio.pid | |
if [ -e "$PIDFILE" ] ; then | |
PID=`/bin/cat "$PIDFILE"` | |
if /bin/kill -0 "$PID" > /dev/null 2>&1 ; then | |
exit 0 | |
fi | |
fi | |
/bin/echo "$$" > $PIDFILE |
# ex - archive extractor | |
# usage: ex <file> | |
ex () | |
{ | |
if [ -f $1 ] ; then | |
case $1 in | |
*.tar.bz2) tar xjf $1 ;; | |
*.tar.gz) tar xzf $1 ;; | |
*.bz2) bunzip2 $1 ;; | |
*.rar) unrar x $1 ;; |
#This script allows an EncFS password to be stored in KDE’s kwallet. This is useful for anyone who has encrypted parts of their #harddrive and want them to be automatically mounted when logging on to KDE. On the first run, a dialogue will allow the password #to be stored in kwallet; subsequently, the kwallet password will be requested (if kwallet is not already authenticated) and then #the encrypted directory will be automatically mounted. The script has not been tested on recent versions of KDE, but it is known #to have worked in versions 4.2 and 4.3. | |
#Usage | |
#kdeencfs ROOTDIR MOUNTPOINT | |
#The call to kdeencfs can be placed in a file located in ~/.kde/Autostart: | |
# mount my private directories | |
kdeencfs /home/ben/.private /home/ben/private | |
kdeencfs /mnt/data/.secret /home/data/secret |