View gist:ff4f733590451f9e23c2c8296cba94ad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pozy% math | |
Mathematica 13.2.0 Kernel for Linux x86 (64-bit) | |
Copyright 1988-2022 Wolfram Research, Inc. | |
In[1]:= A = {{a1,a2},{a3,a4}} | |
Out[1]= {{a1, a2}, {a3, a4}} | |
In[2]:= B = {{b1,b2},{b3,b4}} |
View session
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pyon% sage | |
┌────────────────────────────────────────────────────────────────────┐ | |
│ SageMath version 9.2, Release Date: 2020-10-24 │ | |
│ Using Python 3.9.4. Type "help()" for help. │ | |
└────────────────────────────────────────────────────────────────────┘ | |
sage: P.<x,y,z,w> = 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() |
View unoffice.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os | |
import subprocess | |
import sys | |
def extract_media(path): | |
args = ['unzip', path, '*media*'] | |
subprocess.run(args) | |
def list_media(path): |
View poly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
View balanced.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct tree { | |
struct tree *left; | |
struct tree *right; | |
}; | |
struct stack { | |
int state; |
View merge.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct tree { | |
int value; | |
struct tree *left; | |
struct tree *right; | |
}; | |
struct stack { |
View kosaraju.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct stack { | |
int state; | |
void *current; | |
struct stack *next; | |
}; | |
struct graph { |
View paths.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct tree { | |
int value; | |
struct tree *left; | |
struct tree *right; | |
}; | |
struct stack { |
View is_bst.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct tree { | |
int value; | |
struct tree *left; | |
struct tree *right; | |
}; | |
struct stack { |
View uniquify.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
struct node { | |
int value; | |
struct node *next; | |
}; | |
void uniquify_head(struct node *head) | |
{ | |
struct node *node = head; |
NewerOlder