Skip to content

Instantly share code, notes, and snippets.

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):
#!/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..."
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")
import eyed3
import argparse
from pathlib import Path
def check_subdirectories(folder):
pass
def get_files_folder(path):
files = []
[
{
"trigger": {
"url-filter": "/_ads/",
"url-filter-is-case-sensitive": true,
"load-type": [
"third-party",
"first-party"
]
},
import random
def coinflip(l):
s = ''
for i in range(0, l):
flip = random.choice(['H', 'T'])
s += flip
return s
def montecarlo(i):
\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
@grahamannett
grahamannett / tasks.json
Created August 22, 2019 18:10
vscode tasks
{
// 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": {
@grahamannett
grahamannett / gist:88a8c06aa864cc38a814046c364537e6
Created July 18, 2019 18:06
pyenv install log for tcl-tk
This file has been truncated, but you can view the full file.
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
@grahamannett
grahamannett / matlab.fish
Created October 1, 2018 23:28
matlab fish functions
function matlab -w matlab -a cmd -d 'matlab fish shell function.'
# main executable
set -l MATLAB_APP /Applications/MATLAB_R2018a.app/bin/matlab
# help command
set -l PRINT_HELP """
matlab [command]
use matlab from terminal
commands:
nodesktop - run with -nodisplay -nospash (default)