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)
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)
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| Copyright (C) 2014 ADDY OSMANI <addyosmani.com> | |
| Everyone is permitted to copy and distribute verbatim or modified | |
| copies of this license document, and changing it is allowed as long | |
| as the name is changed. | |
| DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
| TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION |
Download a Kindle-compatible version of the dictionary here. Unzip the .rar archive.
Get the "Send to Kindle" program on your computer. Here's the link for the Mac.
Right-click your recently downloaded (unzipped) dictionary file, and click the "Send to Kindle" menu item. It will arrive on your Kindle shortly.
Once the dictionary has arrived, go to your settings -- on my newish paperwhite, it's at Home > Settings > Device Options > Language and Dictionaries > Dictionaries > English. Choose the Webster's 1913.
| #!/usr/bin/env bash | |
| if [[ -z "$1" ]] | |
| then | |
| echo "Specify which module to open" | |
| exit | |
| fi | |
| if [[ -z "$EDITOR" ]] | |
| then | |
| echo "The \$EDITOR environment variable must be set." |
| package mysql | |
| import ( | |
| "errors" | |
| "fmt" | |
| "runtime" | |
| "time" | |
| ) | |
| var trace = false |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
Find it here: https://github.com/bitemyapp/learnhaskell
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
One of my ongoing resolutions is to learn a new programming language every year. I've been looking at Go for a while and I thought it would be fun to use the 'holiday' today to really get cranking. I recorded some random impressions as I was chugging along...
When learning a language, I'm one of those people that can't simply read documentation and contrived code examples with any usable level of recall -- I need to internalize it by writing code to solve a legitimate problem. So, I decided to write a little library, a parser for the Linux /proc filesystem. There aren't very many good ones that I've found for Go (and I am thinking of some projects I may want to use it for in the future).
Steps taken:
| import re | |
| import json | |
| import luigi | |
| import pandas as pd | |
| from mysolr import Solr | |
| from bs4 import BeautifulSoup | |
| class InputText(luigi.ExternalTask): |