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
The solution is: | |
Update your virtualenv and re-create your virtualenvs, by passing the path of an existing virtualenv dir. | |
http://www.guyrutenberg.com/2012/05/30/fixing-virtualenv-after-upgrading-your-distributionpython/ |
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
{{ variable|stringformat:"02d" }} |
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 random | |
import unittest | |
import HTMLTestRunner | |
class TestSequenceFunctions(unittest.TestCase): | |
def setUp(self): | |
self.seq = range(10) |
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 a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
def find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): |
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
https://extensions.gnome.org/extension/37/quicklaunch/ | |
https://extensions.gnome.org/extension/354/maximus/ | |
https://extensions.gnome.org/extension/307/dash-to-dock/ | |
https://extensions.gnome.org/extension/2/move-clock/ |
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
sudo add-apt-repository ppa:videolan/stable-daily | |
sudo apt-get update | |
sudo apt-get install vlc |
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
hello new gist :) |
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 splinter.browser import Browser | |
browser = Browser() | |
browser.visit('http://media.douglasmiranda.com/labs/exemplos/splinter_pop-up/') | |
parent_window = browser.current_window # Save the parent window | |
browser.find_by_id('open-popup').first.click() | |
for window in browser.windows: | |
# Switch to a different window (the pop-up) |
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
sudo apt-get build-dep python-numpy python-scipy python-libsvm python-matplotlib | |
pip install numpy | |
pip install scipy | |
pip install python-libsvm | |
pip install matplotlib |
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 fabric.api import * | |
# current_git_branch = local('git symbolic-ref HEAD', capture=True).split('/')[-1] | |
# === Environments === | |
def development(): | |
env.env = 'development' | |
env.settings = '{{ project_name }}.settings.development' |