Last active
October 3, 2024 12:51
-
-
Save pydanny/b11f61cde65b984fe442cb7cc8d71d84 to your computer and use it in GitHub Desktop.
Revisions
-
pydanny revised this gist
Oct 3, 2024 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -96,6 +96,10 @@ export PIP_REQUIRE_VIRTUALENV=tru First, make sure you have a [Nerd font](https://www.nerdfonts.com/) installed and enabled in the terminal. ```bash brew install font-hack-nerd-font ``` Add to end of `.zshrc` -
pydanny revised this gist
Sep 29, 2024 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -149,6 +149,14 @@ venv_wrapper() { alias venv=venv_wrapper ``` ## Install Jupyter Notebook extensions ```bash pip install jupyter_contrib_nbextensions pip install -U "notebook<7" jupyter contrib nbextension install --user ``` ## Clone all your repos -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 42 additions and 17 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,27 +5,27 @@ ## Install homebrew ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ## Install uv Might need to also add miniconda, let's first see how well UV works with pytorch and cuda ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` Then install some pythons ```bash uv python install 3.10 3.11 3.12 ``` Setup and activate a python environment ```bash uv venv --python 3.10.0 source .venv/bin/activate ``` @@ -34,7 +34,7 @@ source .venv/bin/activate Going to try to use gh cli (Github CLI) for everything ```bash brew install gh gh auth login ``` @@ -43,7 +43,7 @@ You may need to add ssh keys, instructions [here](https://docs.github.com/en/aut ## Install utilities ```bash brew install --cask visual-studio-code brew install bat # Really nice cat replacement brew install tokei # counts lines of code @@ -55,30 +55,30 @@ brew install starship # General shell improvements In a virtualenv: ```bash uv pip install nbdev setuptools nbdev_install ``` Add to `.zshrc` ```bash alias prep='nbdev_export && nbdev_clean && nbdev_trust' ``` ## More `.zshrc` tricks function to remove deleted merged branches ```bash function git-delete-merged-branches(){ git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d } ``` Python directory cleanup. Not as necessary as it used to be, but needed about once every few months ```bash function rmpyc () { find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete } @@ -87,7 +87,7 @@ function rmpyc () { Force pip to only work in a virtualenv ```bash export PIP_REQUIRE_VIRTUALENV=tru ``` @@ -99,40 +99,65 @@ First, make sure you have a [Nerd font](https://www.nerdfonts.com/) installed an Add to end of `.zshrc` ```bash eval "$(starship init zsh)" ``` Add a starship config file: ```bash mkdir -p ~/.config && touch ~/.config/starship.toml ``` Then use the nerd-font-symbols preset to make the shell explode in usefulness ```bash starship preset nerd-font-symbols -o ~/.config/starship.toml ``` ## Install Atuin Awesome shell history tool ```bash brew install atuin echo 'eval "$(atuin init zsh)"' >> ~/.zshrc ``` ## Configure pip and venv to use uv ```bash # pip just calls uv function pip() { uv pip "$@" } # Overwrite the venv caller so it uses our version of things venv_wrapper() { if [[ "$1" == "activate" ]]; then source "$2/bin/activate" # Override pip in the virtualenv pip() { command uv pip "$@" } else virtualenv "$@" fi } alias venv=venv_wrapper ``` ## Clone all your repos ```bash gh repo clone ORG_NAME/REPO_NAME ``` An example might be: ```bash gh repo clone pydanny/daniel-blog-fasthtml ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 17 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,15 @@ ## Terminal first! 1. Try to avoid downloading anything directly. Rather, use homebrew, uv, and gh cli to install everything. 2. At the end of each install, add the items suggested for going into the `.zshrc` ## Install homebrew ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` ## Install uv Might need to also add miniconda, let's first see how well UV works with pytorch and cuda @@ -30,7 +30,7 @@ uv venv --python 3.10.0 source .venv/bin/activate ``` ## Setup gh cli Going to try to use gh cli (Github CLI) for everything @@ -41,7 +41,7 @@ gh auth login You may need to add ssh keys, instructions [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) ## Install utilities ``` brew install --cask visual-studio-code @@ -51,15 +51,22 @@ brew install tmux # many panes for your shell brew install starship # General shell improvements ``` ## Install nbdev In a virtualenv: ``` uv pip install nbdev setuptools nbdev_install ``` Add to `.zshrc` ``` alias prep='nbdev_export && nbdev_clean && nbdev_trust' ``` ## More `.zshrc` tricks function to remove deleted merged branches @@ -84,7 +91,7 @@ Force pip to only work in a virtualenv export PIP_REQUIRE_VIRTUALENV=tru ``` ## Starship config First, make sure you have a [Nerd font](https://www.nerdfonts.com/) installed and enabled in the terminal. @@ -108,7 +115,7 @@ Then use the nerd-font-symbols preset to make the shell explode in usefulness starship preset nerd-font-symbols -o ~/.config/starship.toml ``` ## Install Atuin Awesome shell history tool @@ -118,7 +125,7 @@ echo 'eval "$(atuin init zsh)"' >> ~/.zshrc ``` ## Clone all your repos ``` gh repo clone ORG_NAME/REPO_NAME -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 13 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ # Concept for install 1. Try to avoid downloading anything directly. Rather, use homebrew, uv, and gh cli to install everything. 2. At the end of each install, add the items suggested for going into the `.zshrc` # Install homebrew @@ -12,7 +11,7 @@ At the end of each install, add the items suggested for going into the `.zshrc`. # Install uv Might need to also add miniconda, let's first see how well UV works with pytorch and cuda ``` curl -LsSf https://astral.sh/uv/install.sh | sh @@ -109,6 +108,16 @@ Then use the nerd-font-symbols preset to make the shell explode in usefulness starship preset nerd-font-symbols -o ~/.config/starship.toml ``` # Install Atuin Awesome shell history tool ``` brew install atuin echo 'eval "$(atuin init zsh)"' >> ~/.zshrc ``` # Clone all your repos ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 11 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,18 +42,6 @@ gh auth login You may need to add ssh keys, instructions [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) # Install utilities ``` @@ -121,3 +109,14 @@ Then use the nerd-font-symbols preset to make the shell explode in usefulness starship preset nerd-font-symbols -o ~/.config/starship.toml ``` # Clone all your repos ``` gh repo clone ORG_NAME/REPO_NAME ``` An example might be: ``` gh repo clone pydanny/daniel-blog-fasthtml ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 26 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -64,12 +64,6 @@ brew install tmux # many panes for your shell brew install starship # General shell improvements ``` # nbdev enhancement Add to `.zshrc` @@ -101,4 +95,29 @@ Force pip to only work in a virtualenv ``` export PIP_REQUIRE_VIRTUALENV=tru ``` # Starship config First, make sure you have a [Nerd font](https://www.nerdfonts.com/) installed and enabled in the terminal. Add to end of `.zshrc` ``` eval "$(starship init zsh)" ``` Add a starship config file: ``` mkdir -p ~/.config && touch ~/.config/starship.toml ``` Then use the nerd-font-symbols preset to make the shell explode in usefulness ``` starship preset nerd-font-symbols -o ~/.config/starship.toml ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 38 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -62,5 +62,43 @@ brew install bat # Really nice cat replacement brew install tokei # counts lines of code brew install tmux # many panes for your shell brew install starship # General shell improvements ``` Add to `.zshrc` ``` eval "$(starship init zsh)" ``` # nbdev enhancement Add to `.zshrc` ``` alias prep='nbdev_export && nbdev_clean && nbdev_trust' ``` # More `.zshrc` tricks function to remove deleted merged branches ``` function git-delete-merged-branches(){ git branch --merged | egrep -v "(^\*|master|main|dev)" | xargs git branch -d } ``` Python directory cleanup. Not as necessary as it used to be, but needed about once every few months ``` function rmpyc () { find . -type f -name '*.py[co]' -delete -o -type d -name __pycache__ -delete } ``` Force pip to only work in a virtualenv ``` export PIP_REQUIRE_VIRTUALENV=tru ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,16 +31,12 @@ uv venv --python 3.10.0 source .venv/bin/activate ``` # Setup gh cli Going to try to use gh cli (Github CLI) for everything ``` brew install gh gh auth login ``` @@ -56,4 +52,15 @@ An example might be: ``` gh repo clone pydanny/daniel-blog-fasthtml ``` # Install utilities ``` brew install --cask visual-studio-code brew install bat # Really nice cat replacement brew install tokei # counts lines of code brew install tmux # many panes for your shell brew install starship # General shell improvements ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 11 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -46,4 +46,14 @@ gh auth login You may need to add ssh keys, instructions [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) # Clone all the repos ``` gh repo clone ORG_NAME/REPO_NAME ``` An example might be: ``` gh repo clone pydanny/daniel-blog-fasthtml ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,3 +43,7 @@ Going to try to use gh cli (Github CLI) for everything ``` gh auth login ``` You may need to add ssh keys, instructions [here](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent) # Clone all the repos -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 7 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,11 +31,15 @@ uv venv --python 3.10.0 source .venv/bin/activate ``` # Install utilities - brew install --cask visual-studio-code - brew install gh # Setup gh cli Going to try to use gh cli (Github CLI) for everything ``` gh auth login ``` -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ Use homebrew, uv, and gh cli to install everything. Try to avoid downloading dir At the end of each install, add the items suggested for going into the `.zshrc`. # Install homebrew ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 14 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ # Concept for install Use homebrew, uv, and gh cli to install everything. Try to avoid downloading directly. At the end of each install, add the items suggested for going into the `.zshrc`. # Install homebrew @@ -22,8 +24,18 @@ Then install some pythons uv python install 3.10 3.11 3.12 ``` Setup and activate a python environment ``` uv venv --python 3.10.0 source .venv/bin/activate ``` # Install utilities - brew install --cask visual-studio-code - brew install gh -
pydanny revised this gist
Sep 26, 2024 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ # Concept for install Use homebrew, uv, and gh cli to install everything. Try to avoid downloading directly # Install homebrew -
pydanny renamed this gist
Sep 26, 2024 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
pydanny created this gist
Sep 26, 2024 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ Idea: Use homebrew, uv, and gh cli to install everything # Install homebrew ``` /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` # Install uv Might need to also add miniconda, let's first see how it works with pytorch and cuda ``` curl -LsSf https://astral.sh/uv/install.sh | sh ``` Then install some pythons ``` uv python install 3.10 3.11 3.12 ``` # Install utilities - brew install vscode - brew install gh