Embed URL


SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View file.txt
1 2 3 4 5 6 7 8
from inspect import getargspec
def filter_dict(d, fltr):
return dict( (x, d[x]) for x in fltr if x in d )
def apply_some(f, *args, **kwargs):
fspec = getargspec(f)
return f(*args, **kwargs) if fspec.keywords else f( *args, **filter_dict(kwargs, fspec.args) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.