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 handy map of US state codes to full names | |
var usc = map[string]string{ | |
"AL": "Alabama", | |
"AK": "Alaska", | |
"AZ": "Arizona", | |
"AR": "Arkansas", | |
"CA": "California", | |
"CO": "Colorado", | |
"CT": "Connecticut", |
package main | |
import ( | |
"bytes" | |
"code.google.com/p/go.crypto/openpgp" | |
"encoding/base64" | |
"io/ioutil" | |
"log" | |
"os" | |
) |
package main | |
import ( | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/mux" | |
) | |
func main() { | |
router := mux.NewRouter() | |
apiV1 := router.PathPrefix("/api/v1").Subrouter() |
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)
(function() { | |
'use strict'; | |
function AnotherController($scope, socket) { | |
// use the socket factory through your app, but you must use socket.then | |
// so that the actions occur once the socket is established | |
socket.then(function(socket) { | |
socket.emit('some_socket_event', {}); | |
}); | |
package main | |
import ( | |
"github.com/codegangsta/negroni" | |
"github.com/gorilla/context" | |
"github.com/unrolled/render" | |
"labix.org/v2/mgo" | |
"labix.org/v2/mgo/bson" | |
"log" | |
"net/http" |
PYTHON := python2.6 | |
BUILD_DIR := buildtmp | |
AURORA_CLUSTER := test | |
AURORA_ROLE := $(shell whoami) | |
UWSGI_VER = 2.0.4 | |
UWSGI_DIR = uwsgi-$(UWSGI_VER) | |
UWSGI_FILE = $(UWSGI_DIR).tar.gz | |
UWSGI_URL = http://projects.unbit.it/downloads/$(UWSGI_FILE) |
# goes in /etc/nginx/sites-available & link in ../sites-enabled | |
upstream graphite { | |
server unix:///tmp/uwsgi.sock; | |
} | |
server { | |
listen 9002; | |
server_name localhost; |
package fr.pinguet62.util; | |
/** | |
* Wrapper for hexavigesimal representation and conversions.<br /> | |
* {@code 0} = {@code "A"}<br/> | |
* {@code 25} = {@code "Z"}<br/> | |
* {@code 26} = {@code "AA"}<br/> | |
* {@code 27} = {@code "AB"}<br/> | |
* {@code 730} = {@code "ABC"} | |
*/ |