$ python3 -m venv .venv
$ . ./venv/bin/activate
$ python -m pip install --upgrade pip pip-tools
$ python -m piptools compile --generate-hashes -o requirements.txt -r requirements.in
$ python -m piptools sync requirements.txt
$ python -m cogapp -erP examples.md
#!/usr/bin/env bash | |
set -euo pipefail | |
# In some commands, I've used the full parameter names just for the sake of learning/debugging/memorizing. | |
# From $ man xargs: | |
# --max-procs | |
# Run up to max-procs processes at a time; the default is 1. | |
# If max-procs is 0, xargs will run as many processes as possible at a time. |
ls config 2>/dev/null # Answer <y> to run proposed fix | <ENTER> to skip proposed fix | <Ctrl+C> to exit | |
ls -la config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix | |
ls -lAh config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix | |
tree -L 1 config 2>/dev/null # <Ctrl+C> if the issue was resolved | Answer <y> to try current fix | <ENTER> to skip current fix | |
echo 'End' # No more fixes to try. If the issue was not resolved please open an issue on https://github.com/project/issues / <ENTER> to exit |
import types | |
def attach_docstring(value, docstring: str): | |
class_name = type(value).__name__ | |
class_bases = (type(value),) | |
build_body = lambda ns: ns.update({"__doc__": docstring}) | |
return types.new_class(class_name, class_bases, exec_body=build_body)(value) | |
A type is a collection of possible values. An integer can have values 0, 1, 2, 3, etc.; a boolean can have values true and false. We can imagine any type we like: for example, a HighFive type that allows the values "hi" or 5, but nothing else. It's not a string and it's not an integer; it's its own, separate type.
Statically typed languages constrain variables' types: the programming language might know, for example, that x is an Integer.
In that case, the programmer isn't allowed to say x = true
; that would be an invalid program.
The compiler will refuse to compile it, so we can't even run it.
python -c "import pip, pprint; pprint.pprint([pkg.get_entry_map().get('console_scripts', '') for pkg in pip.get_installed_distributions()])" |
Shortcut | Action |
---|---|
CTRL+@ | set-mark-command |
CTRL+A | beginning-of-line |
CTRL+B | backward-char |
CTRL+D | delete-char-or-list |
CTRL+E | end-of-line |
CTRL+F | forward-char |
CTRL+G | send-break |
CTRL+H | backward-delete-char |
El identificador de usuario userId
a utilizar en las peticiones está en función del tipo de línea de colectivo que se desea consultar (urbana o interurbana).
Línea | UserId |
---|---|
Urbana | 0d7c6b60-7b7f-4833-ace7-e633dc1a33c9 |
Interurbana | 30d72c97-568b-4dcb-b239-13c0a318348c |