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 | |
""" | |
Insert data into HBase with a Python script. | |
To create the table, first use the hbase shell. We are going to create a | |
namespace called "sample_data". The table for this script is called "rfic", | |
as we will be inserting Request for Information Cases from the City of | |
Indianapolis. |
--- | |
- hosts: foo | |
tasks: | |
- name: single line plain style | |
file: path=/tmp/foo state=touch | |
- name: multi line plain style | |
file: path=/tmp/foo | |
state=absent |
/* ~/Library/KeyBindings/DefaultKeyBinding.Dict | |
This file remaps the key bindings of a single user on Mac OS X 10.5 to more | |
closely match default behavior on Windows systems. This makes the Command key | |
behave like Windows Control key. To use Control instead of Command, either swap | |
Control and Command in Apple->System Preferences->Keyboard->Modifier Keys... | |
or replace @ with ^ in this file. | |
Here is a rough cheatsheet for syntax. | |
Key Modifiers |
@echo off | |
cygwin-shim.bat /bin/ansible-galaxy %* |
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)
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
from dateutil import tz | |
from jinja2 import Undefined | |
client_timezone = tz.gettz('PST8PDT') # timezone to translate to | |
@app.template_filter() | |
def dateformat(value, format=None, rebase=True): | |
if value is None or isinstance(value, Undefined): | |
return '' |
1. Open regedit | |
2. Navigate to "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\" | |
3. Change IPEnableRouter to 1 | |
4. Run services->Routing and Remote->start | |
(reboot may be nessesary) |