This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gspread | |
import pandas | |
gc = gspread.login('[email protected]', 'supersecretepassword') | |
book = gc.open('Spreadsheet name') | |
sheet = book.sheet1 #choose the first sheet | |
dataframe = pandas.DataFrame(sheet.get_all_records()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
''' | |
Hank Marquardt | |
May 26, 2014 | |
''' | |
import os | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
''' | |
Hank Marquardt | |
May 26, 2014 | |
Magic -- not really documented properly by *ebay*, the IncludeItemSpecifics is needed to get UPC back in feed | |
api.execute('GetItem',{'ItemID': '321394881000','DetailLevel': 'ReturnAll','IncludeItemSpecifics': 'True'}) | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from mandrill import Mandrill | |
import base64 | |
mail_client = Mandrill('<api_key>') | |
frm_email = '[email protected]' | |
frm_name = 'Given Name' | |
# Sending image as attachment | |
img_attachment = base64.b64encode(open('~/sample_image.jpg', 'rb').read()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in | |
# all copies or substantial portions of the Software. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ResponseDataObject(object): | |
def __init__(self, mydict={}): | |
self._load_dict(mydict) | |
def __repr__(self): | |
return str(self) | |
def __str__(self): | |
return unicode(self).encode('utf-8') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, csv, BeautifulSoup | |
from ebaysdk import finding | |
import pandas as pd | |
import sklearn | |
import cgi, cgitb | |
import matplotlib.pyplotlib as plt | |
import MySQLdb | |
#form = cgi.FieldStorage() | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import imaplib | |
import csv | |
from email import message_from_string | |
import time | |
srv = imaplib.IMAP4_SSL("imap.gmail.com") | |
srv.login('[email protected]', 'joepw') | |
srv.select('[Gmail]/Drafts') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
EBAY_APP_ID = '' | |
EBAY_DEV_ID = '' | |
EBAY_CER_ID = '' | |
EBAY_USER_TOKEN = '' | |
EBAY_CATEGORIES = [ | |
31388, # Digital Cameras | |
11724, # Camcorders |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Very basic example of using Python and IMAP to iterate over emails in a | |
# gmail folder/label. This code is released into the public domain. | |
# | |
# RKI July 2013 | |
# http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ | |
# | |
import sys | |
import imaplib |
NewerOlder