Still no option to store virtual envs outside projects after a year
HN user
tandav
Music Nerd https://rodionov.cc
I'm waiting for this issue to be done: Add an option to store virtual environments in a centralized location outside projects https://github.com/astral-sh/uv/issues/1495
I have used virtualenvwrapper before and it was very convenient to have all virtual environments stored in one place, like ~/.cache/virtualenvs.
The .venv in the project directory is annoying because when you copy folder somewhere you start copying gigabytes of junk. Some tools like rsync can't handle CACHEDIR.TAG (but you can use --exclude .venv)
As an admin of my personal website, I completely disable all Cloudflare features and use it only for DNS and domain registration. I also stop following websites that use Cloudflare checks or cookie popups (cookies are fine, but the popups are annoying).
The lack of s3-like remotes support was the reason I switched from borg to restic
Also Atom feeds supports pagination https://www.rfc-editor.org/rfc/rfc5005#section-3
Yes, dystopian soulless vibe of AI images is unpleasant.
There is also virtualenvwrapper. It’s quite handy to create, list, remove virtual environment. I prefer to store all venvs in ~/.cache/virtualenvs instead of .venv in project directory, makes it more clean, no need to exclude for backups or git repository.
It's annoying that there's no easy way to export data from the Apple Watch. The only option is to export complete data from the Apple Health app, which results in a large ZIP file. This file takes about 10 minutes of preprocessing before the whole archive becomes available. It would be much better if I could export only the new records, like those from the last day.
It would be nice to have some sort of demo
Imagine Google removes RSS for YouTube channels
shameless plug: I maintain a small library to do functional pipes. You can write:
(
range(10)
| Map(lambda x: x * 10)
| Filter(lambda x: x % 2 == 0)
| Reduce(lambda a, b: a + b)
)
and more. https://tandav.github.io/pipe21/most operators are basically oneliners: https://github.com/tandav/pipe21/blob/master/pipe21.py#L17
I also maintain a list of libraries which uses pipeline/chain syntax: https://tandav.github.io/pipe21/similar-tools/
You can also use
HISTCONTROL=ignoreboth
to use both ignorespace and ignoredupsI found it difficult to find documentation on how to run gitlab in docker without nginx (I use caddy for reverse proxy) and enable the registry. For anyone having the same problem, here's a working Dockerfile. https://gitlab.tandav.me/tandav/notes/-/issues/5516
I've tried github actions, drone, woodpecker and gitlab. In my opinion gitlab has a much more flexible CI system.
Does anyone know vscode extension that can use OpenAI API to perform code completions like Copilot?
There are several ChatGPT-like UIs that you can self host and pay only for API and not for ChatGPT plus. For example, I'm using https://github.com/Yidadaa/ChatGPT-Next-Web. It would be nice to use Copilot in the same way.
I wish they make it possible to use any, callable builtins for type annotations
If you need just reverse proxy, Caddyfile syntax looks simpler:
myapp.company.com {
reverse_proxy localhost:3000
}TIL there's git notes https://git-scm.com/docs/git-notes
Side question: Does anyone know a simple caddy-like solution, but for non-HTTP traffic? For example, I want automatic SSL certificates for redis, mongodb, postgresql.
(2013)
My library solves 2 problems.
1. It does not require to wrap your iterable into some wrapper to use functional methods. It takes an iterable/object and returns another iterable/object. You don't have to unwrap it after transformations.
2. it uses oneliners (library is 80LOC single file) for most of the methods. You can just copy-paste it to use instead of install and import. E.g map, filter, reduce is just:
class B:
def __init__(self, f): self.f = f
class Pipe (B): __ror__ = lambda self, x: self.f(x)
class Map (B): __ror__ = lambda self, x: map (self.f, x)
class Filter(B): __ror__ = lambda self, x: filter(self.f, x)
class Reduce(B): __ror__ = lambda self, it: functools.reduce(self.f, it, *self.args)shameless plug: I maintain a small library to do functional pipes.
You can write:
(
range(10)
| Map(lambda x: x * 10)
| Filter(lambda x: x % 2 == 0)
| Reduce(lambda a, b: a + b)
)
instead of: x = range(10)
x = map(lambda x: x * 10, x)
x = filter(lambda x: x % 2 == 0, x)
x = reduce(lambda a, b: a + b, x)
and more. https://tandav.github.io/pipe21/I recommend shellcheck and shfmt pre-commit hooks:
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
hooks:
- id: shellcheck
args: [-e, SC2154, -e, SC1091, -e, SC1090]
- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.6.0-2
hooks:
- id: shfmt # requires Go to build
args: [-i, '4', -ci, -sr, -w, -s]To support multiple PIDs: killport() { lsof -ti :"$1" | xargs kill -9; }
I wrote a script to clean Google search url and keep only q param https://github.com/tandav/blog/blob/master/posts/clean_googl...
also try mamba which is much faster than conda https://mamba.readthedocs.io/en/latest/index.html
* https://virtualenvwrapper.readthedocs.io
also alias to create jupyter kernel for activated environment:
mkkernel() {
if [ -n "$1" ]; then
KERNEL_NAME=$1
elif [ -z "$VIRTUAL_ENV" ]; then
echo "Pass either kernel name as argument or activate virtualenv"
return 1
else [ -z "$1" ]
KERNEL_NAME="$(basename $VIRTUAL_ENV)"
echo "No kernel name provided, using name from virtualenv $KERNEL_NAME"
fi
pip install ipykernel
python -m ipykernel install --user --name=$KERNEL_NAME
}I use https://github.com/navidrome/navidrome and it’s great
Gitea will support federation soon https://github.com/go-gitea/gitea/issues/18240
termux (android) can run python, node, docker and more, but you should have static IP or some tunneling like cloudflare/tailscale/zerotier
And since I get asked this a ton, these federated features like federated following are (obviously) not in Gitea right now, but will probably be released in Gitea 1.18 in October.
According to this blog post https://a.exozy.me/posts/gitea-actually-joins-the-fediverse/