Skip to content

Instantly share code, notes, and snippets.

View fgmacedo's full-sized avatar

Fernando Macedo fgmacedo

View GitHub Profile
import sys
import argparse
from getpass import getpass
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
def navigate(card_number, user_name, passkey):
try:
browser = webdriver.Firefox()
@dimitrov
dimitrov / Mapping Script
Created March 9, 2015 14:05
Jenkins Warnings Plugin mapping script for flake8
import hudson.plugins.warnings.parser.Warning
import hudson.plugins.analysis.util.model.Priority
String fileName = matcher.group(1)
String type = matcher.group(4)
String lineNumber = matcher.group(2)
String message = matcher.group(5)
String typeCategory = String.valueOf(type.charAt(0));
String category
Priority priority = Priority.NORMAL
@shimizukawa
shimizukawa / PIL_build.rst
Last active June 26, 2016 14:32 — forked from adrianer/PIL_build.rst
PIL(Pillow) build on Windows (32bit & 64bit)

PIL(Pillow) build on Windows (32bit & 64bit)

If you want to build PIL on Windows, you need to prepare few external libraries. Although some libraries did not provide static library for windows 32/64 bits then you need to build these libraries by your hand too. Also, PIL will load by python at last then you are recommended to use same compiler with python to build libraries.

Target PIL and versions

Pillow:1.7.8 for Python 2.7: src
@jbarratt
jbarratt / multi_package_ci.py
Created September 13, 2012 19:51
Multi-package local python CI with watchdog
#!/usr/bin/env python
'''
Based on http://ginstrom.com/scribbles/2012/05/10/continuous-integration-in-python-using-watchdog/
Dependencies: ``watchdog`` (pip install watchdog)
Montiors the whole tree for changes.
Check for all changes to any files and test the associated package; we might want to test changes to a pyramid test.ini, say, or a file rename as part of a refactor.
@miracle2k
miracle2k / odict.py
Created July 26, 2012 20:56
Make PyYAML do very basic things.
"""Make PyYAML output an OrderedDict.
It will do so fine if you use yaml.dump(), but that generates ugly,
non-standard YAML code.
To use yaml.safe_dump(), you need the following.
"""
def represent_odict(dump, tag, mapping, flow_style=None):
"""Like BaseRepresenter.represent_mapping, but does not issue the sort().