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
# | |
# Source: http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python | |
# | |
# Simple server in two steps: | |
# - create an index.html file. | |
# - run: | |
# python server.py [<port>] | |
# - go to: |
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 htmlentitydefs | |
import re | |
def unescape_entities(m): | |
return unichr(htmlentitydefs.name2codepoint[m.group(1)]) | |
print re.sub(r'&(\w+);', unescape_entities, "× ™Foo&bar") |
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 a test |
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 glob | |
import collections | |
import re | |
def load(root="./"): | |
h = {} | |
for f in glob.glob(root + "*/domains"): | |
d = f.replace(root, "").replace("/domains", "") | |
h[d] = set() | |
with open(f) as _f: |
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
customFields: | |
actual: customfield_10501 | |
at: assignee | |
customer: customfield_10013 | |
epicLink: customfield_11000 | |
epicName: customfield_11001 | |
expected: customfield_10502 | |
links: issueLinks | |
points: customfield_10004 | |
ptype: customfield_11401 |
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
- issuetype: Story | |
project: LF | |
reporter: nino | |
components: Spam | |
assignee: eugene | |
- manifest: | |
fixVersions: Narnia | |
links: | |
- key: PP-146 | |
type: relates to |
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
(global-set-key (kbd "C-x C-\\") 'jira-open) | |
(global-set-key (kbd "C-x C-/") 'jira-run) | |
(setq jy_username "...") | |
(setq jy_password "...") | |
(setq jy_server "https://livefyre.atlassian.net") | |
(defun jira-open () | |
(interactive) | |
(shell-command |
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
- issuetype: Story | |
project: LF | |
reporter: nino | |
components: Spam | |
assignee: eugene | |
- manifest: | |
fixVersions: Narnia | |
links: | |
- key: PP-146 | |
type: relates to |
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
from lfcore.v2.fulfillment.stream.service import * | |
import time | |
m = MongoStreamSvc.instance() | |
for x in m.pubsub.find({'group': 'settings'}): | |
x | |
print "Looking in events..." | |
t = list(m.events.find({'group': 'settings'})) | |
t |
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 pkg_resources | |
def get_pkg_license(pkgname): | |
""" | |
Given a package reference (as from requirements.txt), | |
return license listed in package metadata. | |
NOTE: This function does no error checking and is for | |
demonstration purposes only. | |
""" |
OlderNewer