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
# So, this is a port of a fairly simple script from "normal Python" to "pure-lambda | |
# Python". This code contains no Python statements, and is a proof-of-concept to show | |
# what you can do without statements, and how powerful Python's lambdas are despite | |
# that they are crippled. | |
# | |
# A few notes on how to read this: | |
# 1. Almost everything happens in the arguments. Practially nothing happens | |
# inside function bodies, since the function bodies are usually just other | |
# functions. Go down to the bottom of the expression (using your editor's | |
# paren matching) to see what the arguments are. |
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
""" | |
Compiles BrainFuck programs into x86 assembly. | |
Supported operators: | |
> < + - [ ] . , | |
Note that this doesn't support Linux for simplicity, and is instead targeted | |
at DOSBox (due to the fact that Linux buffers stdio while DOSBox does not). | |
""" |
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
// ==UserScript== | |
// @name Image Preview. | |
// @namespace adamnew123456@gmail.com | |
// @description Adds inline previews of images on Reddit. | |
// @include http://www.reddit.com/r/* | |
// @include http://reddit.com/r/* | |
// @include http://www.reddit.com/ | |
// @include http://www.reddit.com/?* | |
// @include http://reddit.com/ | |
// @include http://reddit.com/?* |
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
<html> | |
<title> Equation Mixer </title> | |
<body> | |
<canvas id="grid" width="600" height="600"> </canvas> <br/> | |
f(x): <input id="func1" type="text" value="Math.sin(x)"> </input> | |
g(x): <input id="func2" type="text" value="Math.cos(x)"> </input> <br/> | |
X Min: <input id="xmin" type="text" value="-1"> </input> | |
X Max: <input id="xmax" type="text" value="1"> </input> <br/> |
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
<html> | |
<title> Equation Mixer </title> | |
<body> | |
<canvas id="grid" width="600" height="600"> </canvas> <br/> | |
x(t): <input id="func_x" type="text" value="Math.sin(t)"> </input> | |
y(t): <input id="func_y" type="text" value="Math.cos(t)"> </input> <br/> | |
X Min: <input id="xmin" type="text" value="-1"> </input> | |
X Max: <input id="xmax" type="text" value="1"> </input> <br/> |
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
/** | |
* A small meta-object protocol for describing a Python-like class system in | |
* Javascript. | |
* | |
* In this MOP, objects are (at bottom) represented as a mapping of three things: | |
* | |
* - a list of parent classes | |
* - a list representing the object's MRO | |
* - a mapping of attribute names to attributes | |
* |
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
""" | |
Converts a tree of wiki pages into a tree of HTML pages. | |
""" | |
from collections import defaultdict | |
import configparser | |
import glob | |
import itertools | |
import os, os.path | |
import re | |
import shutil |
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
#!/bin/sh | |
set -u | |
USAGE='Usage: usm COMMAND ... | |
usm help | |
usm init | |
usm copy-script | |
usm add SOFTWARE VERSION | |
usm set-current SOFTWARE VERSION |
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
<canvas id="canvas" width="600" height="600"> | |
</canvas> </br> | |
Method: <input id="algorithm" type="text"> </input> <br/> | |
Timestep (Hz): <input id="timestep" type="text"> </input> <br/> | |
<input id="start_stop" type="button" value="Start" onclick="run()"> </input> <br/> | |
<script> | |
//////////////////// | |
var PERSON_RADIUS = 1; | |
var PERSON_SPEED = 5; |
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
// FizzBuzz in x86 assembly - written on 32-bit Linux using the GNU ASsembler | |
.data | |
FIZZSTR: | |
.asciz "Fizz" | |
BUZZSTR: | |
.asciz "Buzz" | |
NEWLINE: | |
.asciz "\n" | |
// strtoa stores its data here. Since FizzBuzz runs 1-100, it won't need more than 3 bytes |
OlderNewer