https://github.com/junegunn/fzf#using-homebrew
Worth installing everywhere. On OSX, simply:
$ brew install fzf
# To install useful key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install
https://github.com/junegunn/fzf#using-homebrew
Worth installing everywhere. On OSX, simply:
$ brew install fzf
# To install useful key bindings and fuzzy completion:
$(brew --prefix)/opt/fzf/install
What worked for me was updating the “Refresh Rate” from 30HZ to 60HZ:
Continue readingTo sort folders by their size, recursively:
$ du -h | sort -h
Then, to delete any folder of the name to_delete
:
$ rm -rf `find . -type d -name to_delete`
This is not a happy situation to begin with, but what if you have to? Someone has to do the dirty job. In order for you to not have your laptop connected to the production environment for 10 hours just to run a job, you need:
Continue readingTwo steps [1]:
thisisunsafe
Funny that Google doesn’t provide a button anywhere on the page for this. Guess you’ll only be able to find a solution if you know how to “Google”.
To use the package you’re working on directly in the project itself. Go to the directory where your package is being developed, where the pyproject.toml
file resides:
poetry install
poetry shell
I fought days with it and it ended up being that simple. *Facepalm*.
If necessary, remove the previously created venv first.
To use it in a different project though, you’d probably need something like this.
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?
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]
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