Skip to content

Instantly share code, notes, and snippets.

Avatar
🈳

Yi Lu eccstartup

🈳
View GitHub Profile
View calc.py
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 = []
View newton.py
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 Jan 29, 2022
Wordle python script
View wordle.py
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 Apr 25, 2021 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
View ffmpeg.md
View out.log
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
View out.log
$ 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
View nplusk.hs
{-# LANGUAGE NPlusKPatterns #-}
f1 0 = 0
f1 (n+1) = n+1 + f1 n
f2 0 = 0
f2 (n+2) = n+2 + f2 (n+1)
View test_PrimeFactors.hs
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
View springer-lnm-4.md

Direct links to Lecture Notes in Mathematics (Part 4)

The Kazhdan-Lusztig Cells in Certain Affine Weyl Groups - Jian-Yi Shi (1986) ([1], [2], [3], [4], [5], [6],

View springer-lnm-3.md

Direct links to Lecture Notes in Mathematics (Part 3)

Padé Approximation and its Applications Amsterdam 1980 - M. G. de Bruin, H. van Rossum (1981) ([1], [2], [3], [4], [5], [6],