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 xml.etree.ElementTree as ET | |
| import re | |
| import os | |
| import sys | |
| import subprocess | |
| from urllib2 import Request, urlopen | |
| from urllib import urlencode | |
| from json import load, dumps | |
| from base64 import b64encode | |
| from xml.etree.ElementTree import Element, SubElement, tostring, ElementTree |
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
| # Howebrew package manager for OS X is useful for installing unix terminal tools. | |
| # Install Homebrew | |
| /usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)" | |
| # Install wget | |
| brew install wget | |
| brew install openssl | |
| # Update homebrew and all your packages |
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
| x = {'a':1, 'b': 2} | |
| y = {'c':10, 'd': 11} | |
| z = dict(x.items() + y.items()) | |
| z | |
| {'a': 1, 'b':2, 'c': 10, 'd': 11} |
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
| Lst1 = ['11', '13', '11', '12', '11', '13', '12', '12', '12', '13', '11'] | |
| Lst2 = ['1/41', '1/34', '1/37', '1/47', '1/41', '1/33', '1/46', '1/45', 'p4', 'p5', 'p6'] | |
| Dict1 = {'11': ['1/41', '1/37', '1/141', 'p6'], | |
| '12': ['1/47', '1/33', '1/46', 'p4'], | |
| '13': ['1/34', '1/33', 'p5']} | |
| Dict1 = {} | |
| for key, val in zip(Lst1, Lst2): |
NewerOlder