Comment

Comment by vunderba

I've been meaning to look into uv. However, since I make pretty heavy use of conda for my pythons scripts, I'll usually add a bash function that handles conda activation / code execution to my .zshrc file.

  function transcribe() {
    # get the active conda environment
    active_env=$(conda info | grep "active environment" | awk '{print $4}')

    if [[ "$active_env" != "speechrec-env" ]]; then
      conda activate speechrec-env
    fi

    python /users/vunderba/dev/transcriber/transcribe.py "$@"
  }
It's handy because if it'll always point to the most current version of my script.
parent vunderba 1 year ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton