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 |
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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
"version": "2.0.0", | |
"tasks": [ | |
{ | |
"label": "Run File", | |
"command": "${config:python.pythonPath} ${file}", | |
"type": "shell", | |
"group": { |
This file has been truncated, but you can view the full file.
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
python-build: use openssl@1.1 from homebrew | |
python-build: use readline from homebrew | |
/var/folders/3f/pc11ycws4wsfbw5sk_7s8cfr0000gn/T/python-build.20190718105125.49297 ~ | |
/var/folders/3f/pc11ycws4wsfbw5sk_7s8cfr0000gn/T/python-build.20190718105125.49297/Python-3.7.4 /var/folders/3f/pc11ycws4wsfbw5sk_7s8cfr0000gn/T/python-build.20190718105125.49297 ~ | |
python-build: use readline from homebrew | |
python-build: use zlib from xcode sdk | |
checking build system type... x86_64-apple-darwin18.6.0 | |
checking host system type... x86_64-apple-darwin18.6.0 | |
checking for python3.7... python3.7 | |
checking for --enable-universalsdk... no |
NewerOlder