Skip to content

Instantly share code, notes, and snippets.

View eccstartup's full-sized avatar
🈲
I may be slow to respond.

Yi Lu eccstartup

🈲
I may be slow to respond.
View GitHub Profile
@eccstartup
eccstartup / llama_sizes.txt
Created March 21, 2023 02:38 — forked from shawwn/llama_sizes.txt
The size of each file distributed with LLaMA, for reference. See https://github.com/shawwn/llama-dl
./tokenizer_checklist.chk 50
./tokenizer.model 499723
./7B/checklist.chk 100
./7B/consolidated.00.pth 13476939516
./7B/params.json 101
./13B/checklist.chk 154
./13B/consolidated.00.pth 13016334699
./13B/consolidated.01.pth 13016334699
./13B/params.json 101
./30B/checklist.chk 262
from PyQt6.QtWidgets import QApplication, QLabel, QTextEdit, QVBoxLayout, QWidget, QPushButton
import sys
import ast
def multiline_eval(expr, context={}):
"Evaluate several lines of input, returning the result of the last line"
tree = ast.parse(expr)
eval_exprs = []
exec_exprs = []
from sympy import *
import numpy as np
x = IndexedBase('x')
fun0 = (x[0] + x[1] - 10) ** 2 + (x[0] - 2 * x[1] + 5) ** 2 - 100
def grad(f, x0):
n = x0.size
@eccstartup
eccstartup / wordle.py
Last active January 29, 2022 00:47
Wordle python script
from functools import partial, reduce
La = ["cigar", "rebut", "sissy", "humph", "awake", "blush", "focal", "evade", "naval", "serve", "heath", "dwarf", "model", "karma", "stink", "grade", "quiet", "bench", "abate", "feign", "major", "death", "fresh", "crust", "stool", "colon", "abase", "marry", "react", "batty", "pride", "floss", "helix", "croak", "staff", "paper", "unfed", "whelp", "trawl", "outdo", "adobe", "crazy", "sower", "repay", "digit", "crate", "cluck", "spike", "mimic", "pound", "maxim", "linen", "unmet", "flesh", "booby", "forth", "first", "stand", "belly", "ivory", "seedy", "print", "yearn", "drain", "bribe", "stout", "panel", "crass", "flume", "offal", "agree", "error", "swirl", "argue", "bleed", "delta", "flick", "totem", "wooer", "front", "shrub", "parry", "biome", "lapel", "start", "greet", "goner", "golem", "lusty", "loopy", "round", "audit", "lying", "gamma", "labor", "islet", "civic", "forge", "corny", "moult", "basic", "salad", "agate", "spicy", "spray", "essay", "fjord", "spend", "kebab
@eccstartup
eccstartup / ffmpeg.md
Created April 25, 2021 07:58 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
This file has been truncated, but you can view the full file.
$ libtool -static -o a.a -L/usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0/ -lHSbase-4.9.1.0
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Arr__1.o) in output file used for input files: /usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0//libHSbase-4.9.1.0.a(Arr__1.o) and: /usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0//libHSbase-4.9.1.0.a(Arr__1.o) due to use of basename, truncation and blank padding
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Arr__10.o) in output file used for input files: /usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0//libHSbase-4.9.1.0.a(Arr__10.o) and: /usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0//libHSbase-4.9.1.0.a(Arr__10.o) due to use of basename, truncation and blank padding
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Arr__11.o) in output file used for input files: /usr/local/Cellar/ghc/8.0.2/lib/ghc-8.0.2/base-4.9.1.0//libHSbase-4.9.1.0.a(Arr__1
$ libtool -static -o a.a -L/Users/eccstartup/.stack/programs/x86_64-osx/ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0/ -lHSbase-4.9.0.0
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Arr.o) in output file used for input files: /Users/eccstartup/.stack/programs/x86_64-osx/ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0//libHSbase-4.9.0.0.a(Arr.o) and: /Users/eccstartup/.stack/programs/x86_64-osx/ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0//libHSbase-4.9.0.0.a(Arr.o) due to use of basename, truncation and blank padding
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Array.o) in output file used for input files: /Users/eccstartup/.stack/programs/x86_64-osx/ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0//libHSbase-4.9.0.0.a(Array.o) and: /Users/eccstartup/.stack/programs/x86_64-osx/ghc-8.0.1/lib/ghc-8.0.1/base-4.9.0.0//libHSbase-4.9.0.0.a(Array.o) due to use of basename, truncation and blank padding
/Library/Developer/CommandLineTools/usr/bin/libtool: warning same member name (Base.o) in
{-# LANGUAGE NPlusKPatterns #-}
f1 0 = 0
f1 (n+1) = n+1 + f1 n
f2 0 = 0
f2 (n+2) = n+2 + f2 (n+1)
#!/bin/bash
echo "Cleaning up..."
#rm 00-index.tar.gz
mkdir -p package
echo "Downloading index..."
wget -c http://hackage.haskell.org/packages/archive/00-index.tar.gz
for splitpk in `tar tf 00-index.tar.gz | cut -d/ -f 1,2`; do
pk=`echo $splitpk | sed 's|/|-|'`
name=$pk.tar.gz
module PrimeFactors where
lessFacs1 n = [k | k <- [2..(truncate (sqrt (fromInteger n)))], mod n k == 0]
lessPrimeFacs [] n = []
lessPrimeFacs (p:ps) n
| mod n p == 0 = p:(lessPrimeFacs (p:ps) (div n p))
| otherwise = lessPrimeFacs ps n
lessFacs n = lessPrimeFacs (lessFacs1 n) n