Skip to content

Instantly share code, notes, and snippets.

set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'VundleVim/Vundle.vim'
Plugin 'scrooloose/nerdtree'
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'vim-syntastic/syntastic'
set -g default-terminal "screen-256color"
# panes
set -g pane-border-fg black
set -g pane-active-border-fg brightred
## Status bar design
# status line
set -g status-justify left
set -g status-bg default
from airflow.hooks import PostgresHook
from airflow.hooks.S3_hook import S3Hook
from my_package.my_loader import MyLoader
def load_data_to_s3(my_arg_1, my_arg_2, **kwargs):
# Get the run date and cursor
run_date = kwargs['ds']
redshift_hook = PostgresHook(postgres_conn_id='redshift_warehouse')
redshift_cursor = redshift_hook.get_cursor()
@peteowlett
peteowlett / d3-bollinger.html
Created November 10, 2014 16:23
Creating dynamic bollinger bands in D3
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
font: 10px sans-serif;
}
.axis path,
.axis line {
@peteowlett
peteowlett / Vagrantfile
Created October 30, 2014 09:16
Running basic Wagtail project on AWS with Vagrant
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# VIRTUAL BOX SPECIFIC CONFIG
#config.vm.box = "wagtail-base-v0.3"
#config.vm.box_url = "http://downloads.torchbox.com/wagtail-base-v0.3.box"
@peteowlett
peteowlett / DOMListProcessor.java
Created March 24, 2014 13:14
For pritesh - working sample!
import java.util.*;
import java.io.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
import org.xml.sax.SAXException;
__author__ = 'Pete'
from nltk import pos_tag, word_tokenize
import pandas as pd
import operator
# Open the words file
myDF = pd.read_csv('WCC_PlanningApplications.csv', error_bad_lines=False)
# Clean up the data file
using UnityEngine;
using System.Collections;
using LinqToTwitter;
using System.Linq;
public class makeTextAppear : MonoBehaviour {
private float startTime;
private float elapsedTime;
private Vector3 startPosition;
@peteowlett
peteowlett / PullDownTweetsInC#
Created November 30, 2013 17:58
Create a console app in mono, download Linq2Tweet from here:http://linqtotwitter.codeplex.com/downloads/get/762267 , add as reference to your mono project then run the code below as main.cs. Make sure to put your keys into the four key sections first, and change the search string to get whatever you want.
using System;
using LinqToTwitter;
using System.Linq;
namespace TestLinq2Twitter
{
class MainClass
{
public static void Main (string[] args)
{
myIPList=$(cat .whirr/clouderapoc/instances | awk '{print $3}')
for myIP in $myIPList
do
scp -i /home/ubuntu/.ssh/whirr -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no clouderapoc.properties whirr@$myIP:~
scp -i /home/ubuntu/.ssh/whirr -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no .whirr/clouderapoc/instances whirr@$myIP:~
scp -i /home/ubuntu/.ssh/whirr -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no .ssh/whirr whirr@$myIP:~
scp -i /home/ubuntu/.ssh/whirr -o "UserKnownHostsFile /dev/null" -o StrictHostKeyChecking=no .ssh/whirr.pub whirr@$myIP:~
done