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
# If using Flask-Script, simply drop this into manage.py under a @manage.command decorator | |
def update(): | |
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("pip install --upgrade " + dist.project_name, shell=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
# Some Useful Aliases | |
alias c="clear;ls" | |
alias ct="clear;tree" | |
alias lsa="ls -ltra" | |
alias lss="ls -ltra|less" | |
alias la="ls -lsa|less" | |
alias cls="clear" | |
alias e="exit" | |
alias gs="git status -uno" |
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
mkdir -p src | |
cd src | |
touch manage.py | |
mkdir -p app | |
cd app | |
touch __init__.py | |
mkdir -p home | |
mkdir -p static | |
mkdir -p templates | |
cd static |
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
rm -rfv `find ./ | egrep -i "(pyc|.swp|˜)$"` | |
printf $"\nCleaned!" |
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
# Workaround for the ensurepip problem: https://lwn.net/Articles/592007/ | |
# -------------------------------------- | |
# Usage: | |
# Add this script to your path, then run | |
# env.sh my_virtualenv_name | |
# -------------------------------------- | |
pyvenv-3.4 --without-pip $1 | |
source ./$1/bin/activate | |
wget https://pypi.python.org/packages/source/s/setuptools/setuptools-3.4.4.tar.gz |
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
function A*(start,goal) | |
closedset := the empty set // The set of nodes already evaluated. | |
openset := {start} // The set of tentative nodes to be evaluated, initially containing the start node | |
came_from := the empty map // The map of navigated nodes. | |
g_score[start] := 0 // Cost from start along best known path. | |
// Estimated total cost from start to goal through y. | |
f_score[start] := g_score[start] + heuristic_cost_estimate(start, goal) | |
while openset is not empty |
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
@tags @tag | |
Feature: Do A Thing | |
As [agent] | |
In order to accomplish the goal of a thing | |
I need to do a thing | |
Background: some requirement for this test | |
Given [agent] is an admin | |
And there are no other admins logged in | |
Then admin permissions are granted |
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
--- ari_dev/ari/__init__.py (original) | |
+++ ari_dev/ari/__init__.py (refactored) | |
@@ -7,7 +7,7 @@ | |
import ari.client | |
import swaggerpy.http_client | |
-import urlparse | |
+import urllib.parse | |
Client = client.Client |
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
; Invert Scroll a la OSX | |
WheelUp:: | |
Send {WheelDown} | |
Return | |
WheelDown:: | |
Send {WheelUp} | |
Return | |
; Remap Mac Media Keys |
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
-- Executing [27@queuemetrics:1] Answer("Local/27@queuemetrics-00000058;2", "") in new stack | |
-- Local/27@queuemetrics-00000058;1 answered | |
-- Executing [10@queuemetrics:1] Answer("Local/27@queuemetrics-00000058;1", "") in new stack | |
-- Executing [10@queuemetrics:2] Wait("Local/27@queuemetrics-00000058;1", "10") in new stack | |
-- Executing [27@queuemetrics:2] Set("Local/27@queuemetrics-00000058;2", "AGENTCODE=93651") in new stack | |
-- Executing [27@queuemetrics:3] GotoIf("Local/27@queuemetrics-00000058;2", "0?end") in new stack | |
-- Executing [27@queuemetrics:4] NoOp("Local/27@queuemetrics-00000058;2", " "QM: RemoveQueueMember (asterisk v1.4+) Agent/93651 on queue made by 'agent/93651'" ") in new stack | |
-- Executing [27@queuemetrics:5] RemoveQueueMember("Local/27@queuemetrics-00000058;2", ",Local/93651@from-queue/n,,,SIP/93651@hqcm02") in new stack | |
[2014-12-30 10:08:34] WARNING[18630][C-0000002c]: app_queue.c:7619 rqm_exec: Unable to remove interface from queue '': No such queue | |
-- Ex |
OlderNewer