A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Written on 2013-02-04 by Philipp Klaus <philipp.l.klaus →AT→ web.de>. | |
Check <https://gist.github.com/4707775> for newer versions. | |
Uses dnspython: install with `pip install dnspython3` | |
""" |
import sys, string, urllib | |
GROUPS = dict([('ags','ftp://ftp.cmegroup.com/pub/settle/stlags'), | |
('rates','ftp://ftp.cmegroup.com/pub/settle/stlint'), | |
('fx','ftp://ftp.cmegroup.com/pub/settle/stlcur'), | |
('nymex','ftp://ftp.cmegroup.com/pub/settle/stlnymex'), | |
('comex','ftp://ftp.cmegroup.com/settle/stlcomex'), | |
('clearport','ftp://ftp.cmegroup.com/settle/stlcpc')]) | |
# month codes |
#!/usr/bin/env bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
client | |
dev tun | |
proto tcp | |
remote 192.168.1.1 1194 | |
resolv-retry infinite | |
nobind | |
persist-key | |
persist-tun | |
ca [inline] | |
cert [inline] |
A personal diary of DataFrame munging over the years.
Convert Series datatype to numeric (will error if column has non-numeric values)
(h/t @makmanalp)
#! /bin/bash | |
ssh -L 5555:localhost:5432 vagrant@localhost -p 2222 -i ~/.vagrant.d/insecure_private_key -fNg # local port 5555 <-> Vagrant port 5432 |
\n | |
============= HOST: ==========\n | |
\n | |
local_ip: %{local_ip}\n | |
local_port: %{local_port}\n | |
remote_ip: %{remote_ip}\n | |
remote_port: %{remote_port}\n | |
\n | |
======= CONNECTION: ==========\n | |
\n |
# vim: set ft=python: | |
# see the README at https://gist.github.com/phiresky/4bfcfbbd05b3c2ed8645 | |
# source: https://github.com/mpv-player/mpv/issues/2149 | |
# source: https://github.com/mpv-player/mpv/issues/566 | |
# source: https://github.com/haasn/gentoo-conf/blob/nanodesu/home/nand/.mpv/filters/mvtools.vpy | |
import vapoursynth | |
core = vapoursynth.get_core() |
This is a quick-and-dirty guide to setting up a Raspberry Pi as a "router on a stick" to PrivateInternetAccess VPN.
Install Raspbian Jessie (2016-05-27-raspbian-jessie.img
) to your Pi's sdcard.
Use the Raspberry Pi Configuration tool or sudo raspi-config
to: