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 characters
This uses llm.datasette.io and OpenAI. | |
I use `git commit --template` to provide the output from the LLM to Git. This way, if you do not like the results, you | |
can quit your editor and no commit will be made. | |
# Shell function for generating a diff and editing it in your default editor: | |
gcllm() { | |
GIT_DIR="$(git rev-parse --git-dir)" | |
TEMPLATE="$GIT_DIR/COMMIT_EDITMSG_TEMPLATE" |
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 characters
from django.conf import settings | |
from django.core.management import BaseCommand | |
from django.urls import URLPattern, URLResolver | |
urlconf = __import__(settings.ROOT_URLCONF, {}, {}, ['']) | |
def list_urls(lis, acc=None): | |
if acc is None: | |
acc = [] | |
if not lis: |
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 characters
#!/usr/bin/env bash | |
[[ $- == *i* ]] && echo "This Bash Shell is Interactive Shell" || echo "This Bash Shell is Not a Interactive Shell" | |
shopt -q login_shell && echo "This Bash Shell is a Login Shell" || echo "This Bash Shell is Not a Login Shell" |
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 characters
export PYENV_VIRTUALENVWRAPPER_PREFER_PYVENV="true" | |
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi | |
if which pyenv-virtualenv-init > /dev/null; then eval "$(pyenv virtualenv-init -)"; fi | |
pyenv virtualenvwrapper |