Skip to content

Instantly share code, notes, and snippets.

View westover's full-sized avatar

James Westover westover

  • Postmates
  • San Francisco, CA
View GitHub Profile
@westover
westover / sqs_spout.py
Last active January 3, 2016 23:59
Stream parse SQS spout
from __future__ import absolute_import, print_function, unicode_literals
from streamparse.spout import Spout
import boto
from boto.sqs.connection import SQSError
import threading
try:
from Queue import Queue, Empty
except ImportError:
from queue import Queue, Empty
import random
import csv
import re
data0 = []
target0 = []
with open('first.file') as th:
temp = th.readlines()
data2= [line.strip() for line in temp]
from __future__ import print_function
import json
import urllib
import boto3
import csv
import StringIO
print('Loading function')
eval "$(/opt/homebrew/bin/brew shellenv)"
alias python="python3"
alias pip="pip3"
alias ll='ls -l'
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
export PYENV_ROOT="$HOME/.pyenv"
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"