View win_subprocess.py
## issue: https://bugs.python.org/issue19264 | |
import ctypes | |
import subprocess | |
import _subprocess | |
from ctypes import byref, windll, c_char_p, c_wchar_p, c_void_p, \ | |
Structure, sizeof, c_wchar, WinError | |
from ctypes.wintypes import BYTE, WORD, LPWSTR, BOOL, DWORD, LPVOID, \ | |
HANDLE |
View yaml_ordered_dict.py
import yaml | |
import yaml.constructor | |
try: | |
# included in standard lib from Python 2.7 | |
from collections import OrderedDict | |
except ImportError: | |
# try importing the backported drop-in replacement | |
# it's available on PyPI | |
from ordereddict import OrderedDict |
View docker-update
#!/bin/bash | |
## Updates an existing image with given script coming from stdin. | |
## | |
exname=$(basename $0) | |
usage="$exname DOCKER_IMAGE | |
Update image with stdin instruction. |
View autogen.sh
#!/bin/sh | |
## | |
## You can download latest version of this file: | |
## $ wget https://gist.github.com/vaab/9118087/raw -O autogen.sh | |
## $ chmod +x autogen.sh | |
## | |
## | |
## Functions |
View setup.py
#!/usr/bin/env python | |
## | |
## You can download latest version of this file: | |
## $ wget https://gist.github.com/vaab/e0eae9607ae806b662d4/raw -O setup.py | |
## $ chmod +x setup.py | |
## | |
## This setup.py is meant to be run along with ``./autogen.sh`` that | |
## you can also find here: https://gist.github.com/vaab/9118087/raw | |
## |
View pycheckers.py
#!/usr/bin/env python | |
# link: http://www.emacswiki.org/emacs/PythonMode#toc7 | |
# | |
# This is a script which runs and parses the output of various Python code | |
# checking programs to work with flymake. It has lots of issues, one being that | |
# flymake does not seem to show more than one error message per line of code, | |
# meaning that an error or warning which is intentionally left unfixed can mask | |
# an error or warning that would get more attention. | |
# | |
# Additionally, the scripts which check python code are either rather anemic, |
View map_canvas.css
.tooltip_map { | |
font-size: 12px; | |
width: 200px; | |
position: absolute; | |
display: none; | |
z-index: 999; | |
padding: 3px; | |
margin: 0px; | |
border: 1px solid #efefef; | |
border-radius: 4px; |
View jslint-emacs-reporter.js
/*jshint node: true */ | |
var reporter_name = "jhlint"; | |
module.exports = { | |
reporter: function (results, data) { | |
"use strict"; | |
var str = '', | |
errors = []; |
View .travis.yml
language: python | |
python: | |
- "3.4" | |
- "3.3" | |
- "2.7" | |
install: ./autogen.sh && python setup.py install && python setup.py develop easy_install "$(./autogen.sh --get-name)[test]" | |
script: | |
- nosetests $(./autogen.sh --get-name) | |
- git reset --hard HEAD ; git clean -d -f ; python setup.py sdist --formats=gztar && pip install "dist/$(./autogen.sh --get-name)-$(./autogen.sh --get-version | tr "_" "-").tar.gz" --upgrade |