I hereby claim:
- I am obestwalter on github.
- I am obestwalter (https://keybase.io/obestwalter) on keybase.
- I have a public key ASCELPCfKZiDlcykIiM_9416jD-2zFVuWm_P0kt-yuW46wo
To claim this, I am signing this object:
#!/bin/bash | |
# An enhancement to the "python" executable that automatically launches you into the python debugger on error. | |
# | |
# Use it like you would the "python" executable, for example: | |
# $ trypy somefile.py | |
# or | |
# $ trypy somefile.py arg1 arg2 | |
# | |
# EXAMPLE: |
from plumbum.machines import LocalMachine | |
def get_item_mock(*_, **__): | |
def i_am_the_mocked_function(): | |
print("I am mocked") | |
return "mock value" | |
return i_am_the_mocked_function |
I hereby claim:
To claim this, I am signing this object:
https://goo.gl/W3yDvB | |
https://goo.gl/jCt2xd |
Make your tool extensible by 3rd party plugins by provding a pub/sub mechanism for plugin writers
WARNING: I have no idea what I am doing (yet)
I travel a lot so I'm down to like 30 minutes of packing per any kind of trip. I always bring one carry-on suitcase for any trips up to 2 weeks (that I never check in unless forced) -- I have an Away suitcase because it's got a built-in (removable) battery, and amazing wheels.
import logging | |
import os | |
from pathlib import Path | |
from tox.config import parseconfig | |
log = logging.getLogger("gh") | |
INI_PATH = Path(__file__).parent / "inis" | |
EXCLUDES = [ | |
"python-package-skeleton", |
"""DICE ROLLER | |
By Al Sweigart al@inventwithpython.com | |
Example input: | |
3d6 rolls three 6-sided dice | |
1d10+2 rolls one 10-sided dice, and adds 2 | |
2d17-1 rolls two 17-sided dice, and subtracts 1 | |
QUIT quits the program | |
""" |
< ~/code/3rd_party_code >
git clone git@github.com:okken/submark.git && cd submark
[0] (git)-[submark/master:ebd5c4c2a88c ] < ~/code/3rd_party_code/submark >
tox
.package create: /home/ob/code/3rd_party_code/submark/.tox/.package
.package installdeps: flit
py36 create: /home/ob/code/3rd_party_code/submark/.tox/py36
py36 installdeps: pytest, pytest-cov
py36 inst: /home/ob/code/3rd_party_code/submark/.tox/.tmp/package/1/submark-0.4.tar.gz
"""Solve https://projecteuler.net/problem=1 the pytest way | |
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. | |
Find the sum of all the multiples of 3 or 5 below 1000. | |
""" | |
import pytest | |
@pytest.fixture(name="key", scope="session") |