< ~/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
This file contains 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
import traceback | |
class SomeClass: | |
a_class_attr = "don't find me" | |
def an_instance_method(self): | |
... | |
def _a_private_method(self): |
This file contains 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
"""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") |
This file contains 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
"""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 | |
""" |
This file contains 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
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", |
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.
- 🆔Wallet & Passport
- 💧Travel water bottle
- 💳Travel credit cards (don't pay foreign currency fees!)
- 💳Insurance cards
- 💵Local currency you have
- 🚎Local public transport cards
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)
This file contains 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
https://goo.gl/W3yDvB | |
https://goo.gl/jCt2xd |
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:
This file contains 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
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 |
NewerOlder