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
#!/usr/bin/env python | |
""" | |
If you use landslide to create slideshows using markdown, you may have found | |
yourself repeating endlessly: | |
+ save source document | |
+ switch to the terminal to run landslide | |
+ reload the generated html in your browser | |
This QT (using webkit) based "application" monitor changes to the source file |
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
""" | |
experimenting with templates (pystache but could be any other) and cherrypy | |
reading http://streamhacker.com/2011/08/27/python-3-web-development-review/ | |
annoyed the crap out of me! | |
hence let's illustrate some of the many ways to graft templates on the cherry | |
tree ... pistachio: | |
+ string interpolation PHP-esque? |
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
# java -cp ~/Downloads/Sikuli-X-1.0rc3\ \(r905\)-linux-x86_64/Sikuli-IDE/sikuli-script.jar org.python.util.jython test.py | |
from __future__ import with_statement | |
import unittest | |
from sikuli.Sikuli import * | |
class Firefox(object): | |
""" | |
very simple firefox browser context manager |
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
__pycache__ | |
details.csv | |
errors.csv | |
*.pyc | |
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
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py | |
echo -e "Installing pip..." | |
sudo python get-pip.py | |
rm get-pip.py | |
echo -e "Done." | |
echo -e "Installing Python packages..." | |
sudo pip install pytest | |
sudo pip install selenium |
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
{ | |
"metadata": { | |
"name": "Python has R envy" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
A radix sort implementation to illustrate: | |
+ testing with doctest | |
+ __main__ | |
+ yield | |
+ refactoring for legibility (your future self may thank you) | |
+ Python is __magic__ | |
+ PEP 8 | |
+ ... |
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
# ctrl-b -> ctrl-a | |
set -g prefix C-a | |
# ctrl-a ctrl-a last window | |
bind-key C-a last-window | |
# we are humans numbering from 1 | |
set -g base-index 1 | |
# faster input (not waiting for escape) |
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
" Vundle | |
filetype off | |
set rtp+=~/.vim/bundle/vundle | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
" github | |
Bundle 'scrooloose/nerdtree' | |
Bundle 'scrooloose/nerdcommenter' | |
Bundle 'mattn/zencoding-vim' |
NewerOlder