adamelliotfields / dotfiles Goto Github PK
View Code? Open in Web Editor NEWShell scripts 🐚
License: MIT License
Shell scripts 🐚
License: MIT License
I didn't even know this was a thing until yesterday.
Similar to ~/.config/git/ignore
, you can put additional "global" settings in ~/.config/git/config
.
When you run git
commands, it will automatically read this file in addition to ~/.gitconfig
.
When you write to the config with --global
, it will only write to ~/.config/git/config
if ~/.gitconfig
doesn't exist. This allows us to have "static" and "dynamic" configs. For example, switching your Git email can be in the dynamic config that isn't checked into version control.
Will make it much easier to source
.
1660x540 (2x for retina). See if you can make it transparent.
Need to update the main README to list the functions. The bash-snippets repo does this brilliantly.
Should also reword it to distinguish the provisioning scripts from the fun stuff.
Implement “degit” in Fish.
See Rich Harris’ degit
, and Luke Edwards’ gittar
.
Needs additional flags for text-to-image task. Similar to your 🤗 worker.
Ensure binary responses (e.g., text-to-image, text-to-speech) are saved and not dumped to terminal (use curl -o
).
Delete existing hf
alias (never used). Update README and gif.
Use aichat for chat endpoints; this will just be to interact with models directly.
Default model is HuggingFaceH4/zephyr-7b-beta
.
Examples
hf Once upon a time,
hf --model=stabilityai/stable-diffusion-xl-base-1.0 --size=512,512 --negative_prompt=bowtie --out=cat.jpg An adorable tuxedo kitten.
hf -m facebook/mms-tts-eng -o hal.flac "I'm sorry Dave. I'm afraid I can't do that."
Edit: Just make a separate hf.fish
; also this should be in the new fish
repo.
See https://github.com/conda-forge/miniforge.
Just need to parse platform and arch. For example:
sh -c "$(curl -fsSL https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh) -b -p $HOME/.miniforge3"
Fix bashrc (you must source conda first).
While looking into adding a cheat.sh
function, I realized it would be perfect for the GPT 3.5 Turbo API.
For persistence use JSON files as this will allow you to seed the chat (i.e., few-shot learning) and enter system messages.
I could not get streaming to work. I think the issue might be because of buffering in jq
, as the output gets printed almost all at once. I ended up making sick loading spinners so I'm not even concerned about the streaming anymore. There's always the website.
For reference, the API response looks like this:
curl https://api.openai.com/v1/chat/completions \
-fsSLH "Authorization: Bearer $OPENAI_API_KEY" \
--json '{
"model": "gpt-3.5-turbo",
"messages": [{ "role": "user", "content": "Can you explain the principle of conservation of energy?" }]
}'
{
"id": "chatcmpl-42",
"object": "chat.completion",
"created": 1682920793,
"model": "gpt-3.5-turbo-0301",
"usage": {
"prompt_tokens": 18,
"completion_tokens": 116,
"total_tokens": 134
},
"choices": [
{
"message": {
"role": "assistant",
"content": "The principle of conservation of energy states that energy cannot be created or destroyed, but it can be transformed from one form to another. This means that the total amount of energy in a closed system remains constant over time. Energy can be transferred from one object to another or converted from one form to another, such as from potential energy to kinetic energy. This principle is fundamental to many physical processes and plays a critical role in fields such as physics, engineering, and chemistry. Understanding the principle of conservation of energy allows us to better understand and predict the behavior of systems in the natural world."
},
"finish_reason": "stop",
"index": 0
}
]
}
Most development happens inside shared/.config/fish/functions
, which is pretty nested.
Move to new repo and install via Fisher.
To make it easy, each function should have a completion
command that echoes a completion script to source
.
In Codespaces, the code
binary is not in a standard location, so we need to find it.
jorgebucaran/humantime.fish@main
jorgebucaran/autopair.fish@main
jorgebucaran/replay.fish@main
jorgebucaran/getopts.fish@main
Keeping autopair
and replay
.
getopts
can be replaced by Fish's built-in argparse
.
humantime
is a tiny function.
Sometimes you have to be root (RunPod, for example). Any sudo
calls need to be removed (use a helper). For the install script, maybe add a message like "dotfiles: Don't run as root". Finally, create a lib function to create a new user (with a home folder, without a password, with passwordless sudo).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.