View arithmetic.py
1 2 3 4 5 6 7 8 9 10
"""
This implements a fairly simple expression language via a Pratt-style parser.
The language supports fairly standard floating point literals, such as:
5
1.09
.16
12e7
View wikiword.py
1 2 3 4 5 6 7 8 9 10
"""
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
View dispatchmethod.py
1 2 3 4 5 6 7 8 9 10
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
View pyc.py
1 2 3 4 5 6 7 8 9 10
"""
Inserts C code directly into Python files, which can then be dynamically linked
in and called via ctypes.
"""
import atexit
import ctypes
import os
import shlex
import sys
import tempfile
View curses.js
1 2 3 4 5 6 7 8 9 10
/**
* An implementation of an API similar to ncurses, but which instead runs on
* HTMl5 canvas.
*
* Specifically, this is designed to duplicate the following elements of ncurses:
*
* - Basic text printing
* - Colors
* - Handling window hierarchies, which respect their parents bounds (so that
* drawing doesn't occur outside of a window's boundaries). They have their own
View mop.js
1 2 3 4 5 6 7 8 9 10
/**
* 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
*
View parametric.html
1 2 3 4 5 6 7 8 9 10
<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/>
View eqnmix.html
1 2 3 4 5 6 7 8 9 10
<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/>
View image-preview.user.js
1 2 3 4 5 6 7 8 9 10
// ==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/?*
View bf-compiler.py
1 2 3 4 5 6 7 8 9 10
"""
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).
"""
Something went wrong with that request. Please try again.