This file contains 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
# one line function for activating/deactivating venv in bash without having to install any other tools | |
# only meant to keep on hand for copy+pasting into bashrc when using normal dotfiles is not ideal, for better version in fish see: https://github.com/grahamannett/graham.fish-plugins/blob/main/functions/avenv.fish | |
function avenv() { if [[ $(type -t deactivate) == function ]]; then deactivate; elif [ -e .venv/bin/activate ]; then source .venv/bin/activate; fi } |
This file contains 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
function gcm | |
# Check if llm is installed, if not, install it | |
if not type -q llm | |
echo "'llm' is not installed. Attempting to install it using pip..." | |
if pip install llm | |
echo "'llm' installed successfully." | |
else | |
echo "Failed to install 'llm'. Please install it manually and try again." | |
return 1 | |
end |
This file contains 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
class Component: | |
def __init__(self, *children, **attributes): | |
self.children = children | |
self.attributes = attributes | |
def compile(self, depth=0): | |
tag_name = self.__class__.__name__.lower() | |
attr_str = " ".join( | |
f'{key}="{value}"' for key, value in self.attributes.items() | |
) |
This file contains 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
import time | |
from rich.progress import Progress | |
n = 60 | |
pbar = Progress() | |
pbar.start() | |
task = pbar.add_task("[cyan]Slowlyyyy update...", total=n) | |
for i in range(n): |
This file contains 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
#!/bin/sh | |
BASE_REPO_PATH="../cs321-resources" | |
RUBRIC_FILE=*-rubric.txt | |
! test -n "$PROJECT_NAME" && echo "PROJECT_NAME must be set" && exit 1 | |
check_for() { | |
if ! test -e $1; then | |
echo "GETTING $1..." |
This file contains 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 concurrent.futures import ThreadPoolExecutor | |
import cohere | |
import os | |
co = cohere.Client(os.environ.get("COHERE_KEY"), check_api_key=False) | |
import torch | |
import time | |
zipped_args = torch.load("zipped_args.pt") |
This file contains 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
import eyed3 | |
import argparse | |
from pathlib import Path | |
def check_subdirectories(folder): | |
pass | |
def get_files_folder(path): | |
files = [] |
This file contains 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
[ | |
{ | |
"trigger": { | |
"url-filter": "/_ads/", | |
"url-filter-is-case-sensitive": true, | |
"load-type": [ | |
"third-party", | |
"first-party" | |
] | |
}, |
This file contains 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
import random | |
def coinflip(l): | |
s = '' | |
for i in range(0, l): | |
flip = random.choice(['H', 'T']) | |
s += flip | |
return s | |
def montecarlo(i): |
This file contains 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
\documentclass[12pt]{article} | |
\usepackage[margin=1in]{geometry} | |
\usepackage{amsmath,amsthm,amssymb,scrextend} | |
\usepackage{fancyhdr} | |
\pagestyle{fancy} | |
\newcommand{\cont}{\subseteq} | |
% https://tex.stackexchange.com/questions/121061/working-with-arial-or-helvetica-fonts |
NewerOlder