Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am greedo on github.
  • I am greedo (https://keybase.io/greedo) on keybase.
  • I have a public key ASBmHKjKh5YdHH3JBUG968TmRhtRkJIOSv9l2S94uiZ7Dgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am greedo on github.
  • I am greedo (https://keybase.io/greedo) on keybase.
  • I have a public key ASArrZRxt8JRzVLrIrdC3aYqJDjptxwy9UgYYVAbHCflKAo

To claim this, I am signing this object:

@greedo
greedo / sqlalchemy_select.py
Last active April 14, 2016 18:42
get a list of values right away in sqlalchemy
>>> results = engine_instance.execute(select([User.name, User.fullname])).fetchall()
for result in results:
... print(result.name, result.fullname)
ed Ed Jones
wendy Wendy Williams
mary Mary Contrary
fred Fred Flinstone
@greedo
greedo / exception.py
Created February 10, 2015 04:34
APIException class
from flask import jsonify
class APIException(Exception):
""" Class for handling API Excpetions and Errors
"""
status_code = 400
def __init__(self, message, status_code=None, payload=None):
Exception.__init__(self)
@greedo
greedo / example.py
Created January 15, 2015 21:12
Setting video title example
from vimeo import VimeoClient
v = VimeoClient(token=YOUR_AUTHENTICATED_BEARER_TOKEN,
key=YOUR_API_TOKEN,
secret=YOUR_TOKEN_SECRET)
upload_uri = v.upload('your-filename.mp4')
v.patch(upload_uri, data={"name": "myname"})

##Preview

Description

Simple Dashing widget (and associated job) to display recent Twitter data for a specific ticker symbol.

##Dependencies

##Preview

Description

Simple Dashing widget (and associated job) to display recent StockTwits data for a specific ticker symbol using the StockTwits API.

##Dependencies

#!/usr/bin/python
import os
import sys
import datetime
import time
import subprocess
import passwords
from sqlalchemy import *
from sqlalchemy.orm import create_session