This file contains hidden or 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
def trampolin(fun, *args, **kwargs): | |
result = [fun, args, kwargs] | |
while es_fun(result): | |
(fn, fun_args) = (result[0], result[1]) | |
if (len(result) == 3): | |
fun_kwargs = result[2] | |
else: | |
fun_kwargs = {} | |
result = fn(*fun_args, **fun_kwargs) |
This file contains hidden or 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
(defun get-hr-parameters (&optional (coerce #'identity)) | |
"gets all the parameters and puts them in a list" | |
(loop | |
for input-line = (read-line t nil :eof) | |
until (eq input-line :eof) | |
collect (funcall coerce input-line))) |
This file contains hidden or 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
def myitemgetter(*args): | |
def fun(x): | |
return tuple([x[v] for v in args]) | |
return fun | |
def suma_esto(x): | |
def fun(y): | |
return x + y |
This file contains hidden or 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
#!/bin/bash | |
# virtualenv-auto-activate.sh | |
# | |
# Installation: | |
# Add this line to your .bashrc or .bash-profile: | |
# | |
# source /path/to/virtualenv-auto-activate.sh | |
# | |
# Go to your project folder, run "virtualenv .venv", so your project folder | |
# has a .venv folder at the top level, next to your version control directory. |