Skip to content

Instantly share code, notes, and snippets.

Aaron Boman frenchtoast747

Block or report user

Report or block frenchtoast747

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@frenchtoast747
frenchtoast747 / flag_per_function.py
Created Sep 11, 2017
Flag per function - Argparse
View flag_per_function.py
import argparse
class c1(object):
def cleanup(self):
print 'c1'
class c2(object):
def cleanup(self):
View importing.py
class lazy_import(object):
"""
The main purpose for this is to make module level coverage work :(
If/When nose2 figures out how to fix the coverage problem, or if
a new test discovery method or loader is used, this should be removed
in favor of real imports.
"""
def __init__(self, python_path):
self.python_path = python_path
self._obj = None
View directives.js
app.directive('backButton', ['$window', function($window) {
return {
restrict: 'A',
link: function (scope, elem, attrs) {
elem.bind('click', function () {
$window.history.back();
});
}
};
}]);
@frenchtoast747
frenchtoast747 / keybase.md
Created Jun 20, 2014
My Keybase MD Thingy
View keybase.md

Keybase proof

I hereby claim:

  • I am frenchtoast747 on github.
  • I am aaronboman (https://keybase.io/aaronboman) on keybase.
  • I have a public key whose fingerprint is 76FE 51F0 06E2 D3B8 E44A 4FD9 9DA7 6491 A438 940D

To claim this, I am signing this object:

@frenchtoast747
frenchtoast747 / decorator.py
Last active Jul 4, 2019
A Python decorator that preserves everything about the original function being decorated.
View decorator.py
import types
class decorator(object):
"""
When using a decorator, the function that is being decorated
loses its __name__, docstring, and signature.
For example, consider the generic decorator ``my_decorator``:
def my_decorator(fn):
You can’t perform that action at this time.