# update system
sudo apt update && sudo apt upgrade -y
# install build tools and python prerequisites
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev
# download and extract python
In reverse chronological order from gist creation:
- 2022-04-18: Multiple keyboard layouts on RaspberryOS 64 bit, Debian Bullseye.
- 2022-02-28: Youtube from the Linux CLI.
- 2022-02-26: How to use RSS to get updates from Twitter hashtags.
- 2022-02-25: Factoring 10...01.
- 2021-12-23: An oldtimer's APL Code (tradfn v., dfn v.).
- 2021-12-22: Testing SymPy.
// Link to the original: http://www.jsoftware.com/jwiki/Essays/Incunabulum | |
// Found at https://news.ycombinator.com/item?id=8533843 | |
typedef char C; | |
typedef long I; | |
typedef struct a { | |
I t,r,d[3],p[2]; | |
}* A; |
Below are the Big O performance of common functions of different Java Collections. | |
List | Add | Remove | Get | Contains | Next | Data Structure | |
---------------------|------|--------|------|----------|------|--------------- | |
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array | |
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List | |
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array | |
-- Authors: Mike Spivey and Silvija Seres | |
-- Taken from: https://www.cs.ox.ac.uk/publications/books/fop/dist/fop/chapters/9/Logic.hs, | |
-- "The fun of programming book", https://www.cs.ox.ac.uk/publications/books/fop/, | |
-- Chapter 9, Combinators for logic programming | |
-- Haskell 98 compliant. | |
module Logic where | |
import List | |
-- Section 9.2 |
// Based on the article 'Combinators for logic programming' by Michael Spivey and Silvija Seres. | |
// Original author's blog post: http://ademar.name/blog/2011/06/combinators-for-logic-programm.html | |
// More info about this language: https://en.wikipedia.org/wiki/F_Sharp_(programming_language) | |
let rec inf_seq n = seq { yield n; yield! inf_seq (n+1) } | |
let rec lzw f l1 l2 = | |
LazyList.delayed ( fun () -> | |
match l1,l2 with | |
|LazyList.Nil, _ -> l2 |
Some pretty cool code from the 70s'-80s' that a Reddit user shared at this question.
Here's what u/snarkuzoid wrote:
5x5 Knight's Tour in APL
It puts an A in the middle, then randomly does a knight's tour,
A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:
$e^{i \pi} = -1$
Unfortunately, GitHub does not support inline formulas. The issue is tracked here.
Sometime ago, a user of r/math
posted this outreageous result and claimed that this fraction approximates pi
.
I confirmed this result of his, using J and using PARI/GP.
But today, I was reading the lemma on tacit programming over aplwiki.com and saw this amazing result: