Skip to content

Instantly share code, notes, and snippets.

winter is coming

Oliver Bestwalter obestwalter

winter is coming
Block or report user

Report or block obestwalter

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
obestwalter /
Last active Aug 4, 2019
Solution for Euler 1 one the pytest way
"""Solve 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")
obestwalter /
Created Jul 3, 2019
running submark in tox
< ~/code/3rd_party_code >  
git clone && cd submark
[0] (git)-[submark/master:ebd5c4c2a88c ] < ~/code/3rd_party_code/submark >  
.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
obestwalter /
Last active Jun 6, 2019
Is this too much for new programmers already?
By Al Sweigart
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
obestwalter /
Last active Jul 17, 2018
Running tox 3.1 parseconfig over a random collection of tox.inis grabbed from github
import logging
import os
from pathlib import Path
from tox.config import parseconfig
log = logging.getLogger("gh")
INI_PATH = Path(__file__).parent / "inis"
obestwalter /
Created May 21, 2018 — forked from notwaldorf/
Meownica's packing list

Meownica's packing list

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
obestwalter /
Created Apr 7, 2018
Pythoncamp 2018 - Lightning talk: pluggy

Shameless plug: pluggy powers pytest and tox

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)


Package on pypi

View tutorlinks

Keybase proof

I hereby claim:

  • I am obestwalter on github.
  • I am obestwalter ( on keybase.
  • I have a public key ASCELPCfKZiDlcykIiM_9416jD-2zFVuWm_P0kt-yuW46wo

To claim this, I am signing this object:

obestwalter /
Created Mar 8, 2017
Simple DIY plumbum local mock
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
View trypy
# 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
# or
# $ trypy arg1 arg2
You can’t perform that action at this time.