{{ message }}

Instantly share code, notes, and snippets.

# eduardoleon

Last active May 2, 2021
session
View session
 pyon% sage ┌────────────────────────────────────────────────────────────────────┐ │ SageMath version 9.2, Release Date: 2020-10-24 │ │ Using Python 3.9.4. Type "help()" for help. │ └────────────────────────────────────────────────────────────────────┘ sage: P. = PolynomialRing(CC) sage: d = 4 sage: I = Ideal([w*y^d - x*x^d, w*z^d - y*x^d]) sage: J = Ideal([w*y^d - x*x^d, w*z^d - y*x^d, w*w^d - z*x^d]) sage: p = I.hilbert_polynomial()
Created May 3, 2020
This is crude, but it will do for now.
View unoffice.py
 #!/usr/bin/python import os import subprocess import sys def extract_media(path): args = ['unzip', path, '*media*'] subprocess.run(args) def list_media(path):
Created Feb 6, 2020
Differences between ML and Lisp
View poly
 pyon% poly Poly/ML 5.8 Release > datatype foo = Foo; datatype foo = Foo > val mine = Foo; val mine = Foo: foo > datatype foo = Foo; datatype foo = Foo > val yours = Foo; val yours = Foo: foo
Last active Nov 12, 2019
View balanced.c
 #include #include struct tree { struct tree *left; struct tree *right; }; struct stack { int state;
Last active Nov 13, 2019
View merge.c
 #include #include struct tree { int value; struct tree *left; struct tree *right; }; struct stack {
Last active Nov 12, 2019
View kosaraju.c
 #include #include struct stack { int state; void *current; struct stack *next; }; struct graph {
Created Nov 10, 2019
View paths.c
 #include #include struct tree { int value; struct tree *left; struct tree *right; }; struct stack {
Last active Nov 5, 2019
View is_bst.c
 #include #include struct tree { int value; struct tree *left; struct tree *right; }; struct stack {
Last active Oct 26, 2019
View uniquify.c
 #include struct node { int value; struct node *next; }; void uniquify_head(struct node *head) { struct node *node = head;
Created Aug 10, 2019
R dotfiles
View .Renviron
 R_LIBS=~/programs/rpkg