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
diff --git a/pyhole/utils.py b/pyhole/utils.py | |
index 86a0180..5ff46e3 100644 | |
--- a/pyhole/utils.py | |
+++ b/pyhole/utils.py | |
@@ -71,18 +71,20 @@ def spawn(func): | |
def decode_entities(html): | |
"""Strip HTML entities from a string""" | |
- html = re.sub("<[^>]*?>", "", html) | |
- html = re.sub(" ", " ", html) |
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
Install this: | |
http://vim.sourceforge.net/scripts/script.php?script_id=273 | |
.vimrc setup: | |
""" ctags | |
map ,bt :!ctags -R . <CR> |
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
set -g default-terminal "screen-256color" | |
# remap prefix to Control + a | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# force a reload of the config file | |
unbind r | |
bind r source-file ~/.tmux.conf |
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
sloc = "!f() { git ls-files | xargs -i git blame \\{\\} | egrep -o \"\\(.* \" | cut -f1-2 -d\" \" | sort | uniq -c; }; f" |
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
[composite:quantum] | |
use = egg:Paste#urlmap | |
/: quantumversions | |
/v2.0: quantumapi_v2_0 | |
[composite:quantumapi_v2_0] | |
use = call:quantum.auth:pipeline_factory | |
noauth = noauth egg:repoze.tm2#tm extensions quantumapiapp_v2_0 | |
#noauth = extensions quantumapiapp_v2_0 | |
keystone = authtoken keystonecontext egg:repoze.tm2#tm extensions quantumapiapp_v2_0 |
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
commit 93894e70b7313e37f97a58565c75d114d9e180e7 | |
Author: Matt Dietz <[email protected]> | |
Date: Tue Jul 23 22:53:56 2013 +0000 | |
Moves quota config back to plugin | |
Moves the quota configuration lines back into plugin.py which in turn | |
solves a weird dependency issue when loading the Quark quota driver via | |
the neutron.conf. |
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 os | |
import sys | |
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), | |
os.pardir, | |
os.pardir)) | |
if os.path.exists(os.path.join(possible_topdir, '<project name>', '__init__.py')): | |
sys.path.insert(0, possible_topdir) |
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
(compute)~/code/python/path_test/foo python bar.py | |
['/home/nova/code/python/path_test/foo'...] | |
(compute)~/code/python/path_test/foo cd .. | |
(compute)~/code/python/path_test python foo/bar.py | |
['/home/nova/code/python/path_test/foo'...] |
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 re | |
data = open("a bunch of text", 'r') | |
words = {} | |
strip_punc = re.compile("[!.,]") | |
whitespace_collapse = re.compile("\s+") | |
for line in data.readlines(): | |
line = strip_punc.sub('', line) |
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
This is an ivory tower, but we're going to aim high. Patches Accepted. | |
No dissent goes undiscussed. Everyone has equal say. | |
You won't always get your way. | |
All debates must end with a constructive conclusion and a direction forward, and the sooner the better. | |
Encourage Sharing: Everyone has legimitate ideas worthy of validation | |
We only succeed or fail as a team | |
Always present a possible solution after presenting a problem | |
We will communicate with our teammates if any issues arise | |
Educating your peers is never a waste of time. |
OlderNewer