In the middle of the desert you can say anything you want
nvidia-smi
has a python library: nvsmi · PyPI
import nvsmi
nvsmi.get_gpus()
nvsmi.get_available_gpus()
nvsmi.get_gpu_processes()
RabbitMQ is a message broker / scheduler that allows sending/receiving messages.
RabbitMQ is a message broker: it accepts and forwards messages. You can think about it as a post office: when you put the mail that you want posting in a post box, you can be sure that the letter carrier will eventually deliver the mail to your recipient. In this analogy, RabbitMQ is a post box, a post office, and a letter carrier.
The major difference between RabbitMQ and the post office is that it doesn’t deal with paper, instead it accepts, stores, and forwards binary blobs of data ‒ messages.
#GAN that generates handwritten text: amzn/convolutional-handwriting-gan: ScrabbleGAN: Semi-Supervised Varying Length Handwritten Text Generation (CVPR20) #pytorch
You can do python -m pip uninstall -r requirements.txt
Errors with bdist_wheel
missing as a command when installing python packages got fixed with the help of SO1, needed to do python3 -m pip install wheel
After writing whatever: str or Path
or whataver: Union[str, Path]
for the N-th time I googled how to do this better. Well, 1
from typing import Union
from pathlib import Path
pathlike = Union[str, Path]
whatever: pathlike = some_function()
def f_paths(path_one: pathlike):
From FreeCodeCamp:1
git branch
shows all branchesgit push --all
pushes all local branches to remote.git push origin some-branch:my-feature
pushes the local branch some-branch
to a remote branch called my-feature
I should really try this sometime. Having a reproducible OS install would make life much easier. On my radar a long time, but a person I was interviewing last week was the final drop I guess.
bindsym ${mod}+d exec ${nixpkgs.rofi}/bin/rofi -show run
Nix is a 100% reproducible package manager, for all languages and all things. This means your python environment, your R environment, your models, your entire computer can be completely reproduced, all using the magic of nix. In this article, we will walk through setting up a simple, reproducible, and failproof data science stack with nix, including importing packages not found on nixpkgs and caching the builds online
From SO, to find the disk space taken by files with a certain extension/type:1
find ./photos/john_doe -type f -name '*.jpg' -exec du -ch {} + | grep total$
An incredibly clear explanation, copypasted from StackOverflow, about the flavours of git reset --xxx HEAD~1
In the simplest terms:
--soft
: uncommit changes, changes are left staged (index).--mixed
(default): uncommit + unstage changes, changes are left in working tree.--hard
: uncommit + unstage + delete changes, nothing left.A @classmethod
gets the class as first parameter, nice for constructors/factories etc. A @staticmethod
doesn’t know anything about the class at all, and the only use it has is to put functions that logically belong to the class inside the class. 1
Additionally,