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
for i in `perl -e '$,=" ";print +(a..z)'` ; do wget "http://www.euskara.euskadi.net/appcont/sarasola/XMLak/${i}_LETRA.xml"; done |
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
#!/env/bin/python | |
import requests | |
from requests_oauthlib import OAuth1 | |
API_BASE = 'https://api.twitter.com/1.1/' | |
auth_url = API_BASE + 'account/verify_credentials.json' | |
tweets_url = API_BASE + 'search/tweets.json' | |
tweets_params = { |
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 sqlparse | |
qs = MyObject.objects.filter(foo='bar', baz__startswith='baz') | |
sql, params = qs.query.sql_with_params() | |
print sqlparse.format(str(sql % params), | |
reindent=True, keyword_case='upper') |
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 evernote.edam.type import ttypes | |
def makeNote(authToken, noteStore, noteTitle, noteBody, parentNotebook=None): | |
nBody = '<?xml version="1.0" encoding="UTF-8"?>' | |
nBody += '<!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd">' | |
nBody += '<en-note>%s</en-note>' % noteBody | |
## Create note object | |
ourNote = ttypes.Note() |