This file contains hidden or 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
""" | |
This is an example of requesting a report through LMS, in this case we're | |
requesting an ActiveInvenotryReport. | |
NOTE: This code is completely untested at this point, but it should work. | |
""" | |
import uuid | |
import lmslib |
This file contains hidden or 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 ebaysdk | |
from ebaysdk import finding | |
api = finding(siteid='EBAY-GB', appid='<REPLACE WITH YOUR OWN APPID>') | |
api.execute('findItemsAdvanced', { | |
'keywords': 'laptop', | |
'categoryId' : ['177', '111422'], | |
'itemFilter': [ | |
{'name': 'Condition', 'value': 'Used'}, |
This file contains hidden or 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 | |
try: | |
import eventlet | |
sys.modules['httplib2'] = eventlet.import_patched('httplib2') | |
print "[Optional Import] Using eventlet" | |
except Exception: | |
print "[Optional Import] Not using eventlet" | |
from semantics3 import Semantics3Request | |
from semantics3 import Products | |
from semantics3 import Categories |
This file contains hidden or 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
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail | |
# Make sure you have IMAP enabled in your gmail settings. | |
# Right now it won't download same file name twice even if their contents are different. | |
import email | |
import getpass, imaplib | |
import os | |
import sys | |
detach_dir = '.' |
This file contains hidden or 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 requests as req | |
import simplejson as json | |
BASE_URL = "https://mandrillapp.com/api/1.0/" | |
MANDRILL_API_KEY = "lol-yeah" | |
def send(to, message, subject="Just Testing Mandrill"): | |
url = BASE_URL + "messages/send.json" | |
data = { |
This file contains hidden or 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
# Given a URL, return string of lowercase text from page. | |
def webPageToText(url): | |
import urllib2 | |
response = urllib2.urlopen(url) | |
html = response.read() | |
text = stripTags(html).lower() | |
return text |
NewerOlder