I got curious about what actually is a blocker in terms of time complexity, for python. I’ve always known that the smaller the complexity the better, but it’s never quantitative. How bad is n^2
? How bad is n^n
? How much of an improvement is sqrt(n)
or log(n)
? What is outrageous to write and is absolutely no-go?
Monthly Archives: January 2022
How To Install Non Tagged Version of Pip Packages
Either with pip:
pip install git+https://github.com/psf/black.git@1aa4d5b
Or with pipx, which looks like a python equivalent of npx, and allows direct runs without installation, or for multiple versions to co-exist:
pipx install git+https://github.com/psf/black.git@1aa4d5b
Ref: [1]
How to Set pytest-vcr to autouse=True
A bit of a hack. So that whenever there is a request, its response will be recorded:
@pytest.fixture(autouse=True)
def stripe_vcr(vcr, request):
filename = f"{request.function.__module__}/{request.node.name}.yaml"
with vcr._use_cassette(path=filename):
yield
https://pytest-vcr.readthedocs.io/en/latest/configuration/#vcr