HN user

tandav

490 karma

Music Nerd https://rodionov.cc

Posts20
Comments159
View on HN
jacobtomlinson.dev 2y ago

EffVer: Version your code by the effort required to upgrade

tandav
3pts1
bitcoin-vps.com 4y ago

Regularly updated list of Bitcoin-friendly VPS

tandav
1pts0
chrome.google.com 4y ago

Auto HD/4k/8k for YouTube – Chrome extension

tandav
5pts0
chrome.google.com 4y ago

Unhook: Hide YouTube Recommendations

tandav
181pts122
scikit-learn.org 4y ago

Scikit-Learn 1.0

tandav
2pts0
sacramento.cbslocal.com 4y ago

Google checks images for fingerprints FBI may be interested in (2013)

tandav
7pts0
twitter.com 5y ago

Emacs Won Out over Vim

tandav
3pts2
onlinelibrary.wiley.com 5y ago

Obesity of politicians and corruption in post‐Soviet countries

tandav
3pts0
protonmail.com 6y ago

ProtonMail fulfilled Russian government request to disable bomb threats accounts

tandav
5pts0
github.com 6y ago

Pandas Pre-Release v1.0.0rc0

tandav
3pts0
twitter.com 6y ago

Itertools Combinatorics

tandav
2pts0
github.com 7y ago

Zen of Python (import this) message encrypted with ROT13

tandav
3pts0
packagecontrol.io 7y ago

Sublime Text Package Control Outage

tandav
3pts1
www.youtube.com 8y ago

MIT OpenCourseWare videos are not available globally

tandav
2pts0
www.tomshardware.com 8y ago

Nvidia CEO on Intel and AMD Partnership

tandav
4pts0
blog.udemy.com 8y ago

SQL Queries: Top 10 Most Used (2013)

tandav
2pts0
alibaba.github.io 8y ago

Alibaba Java Coding Guidelines

tandav
2pts0
hepburndata.blogspot.com 8y ago

The Relational Model regards all entities as "first class citizens" (2011)

tandav
1pts0
m.phys.org 9y ago

Learning with light: New system allows optical 'deep learning'

tandav
1pts0
github.com 9y ago

Publishing with GitHub Pages, now as easy as 1, 2, 3

tandav
34pts3

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)

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.

Python 3.12 3 years ago

I wish they make it possible to use any, callable builtins for type annotations

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.

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/
Pure Sh Bible 3 years ago

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]

* 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
    }