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
/** | |
* | |
* Jquery Mapael - Dynamic maps jQuery plugin (based on raphael.js) | |
* Requires jQuery and raphael.js | |
* | |
* Map of Canadian Provinces | |
* Lambert Conformal conic projection | |
* @author Ryan Jarvis | |
* @source https://commons.wikimedia.org/wiki/File:Canada_blank_map.svg |
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 requests # http://python-requests.org | |
headers = {'User-Agent': "public.ID.here/1.0", 'X-PAPPID': "private-id-goes-here"} | |
r = requests.get('https://localhost:9630/api/invoices/', headers=headers, auth=("USERNAME", "PASSWORD")) | |
from BeautifulSoup import BeautifulStoneSoup as BSS | |
soup = BSS(r.content) | |
invoices = [] | |
for x in soup.findAll('invoice'): | |
invoices.append(dict((t.name, t.text) for t in x.findAll(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 __future__ import print_function | |
with open("/Users/work/man_ls.txt") as a_man_page: | |
for each_line in a_man_page: | |
skip_next = False | |
underline = False | |
for each_char in each_line: | |
if skip_next and underline: | |
print(each_char, end="") | |
skip_next = False | |
undeline = False |