Skip to content

Instantly share code, notes, and snippets.

@b1naryth1ef
b1naryth1ef / wolfram.py
Created May 8, 2011 08:16
A simple bot built on jenni
import re
import web
import wolframalpha
import urllib
def search(query):
surch = wolframalpha.WolframAlpha(query)
for rs in surch.results:
uri = /?i="+query
uri2 = urllib.quote(uri)
@b1naryth1ef
b1naryth1ef / dict_example.gat
Created May 21, 2011 17:50
Simple dict in Gator 3
<gator>
[.load]
.source
.eng(engine())
.dict(dict())
.dicty #A simple handler for the dict plugin
.math
.sys
.g3(self) #A _self feature was added after a bunch of python lovers complained XD
[/]
@b1naryth1ef
b1naryth1ef / dict.gat
Created May 21, 2011 18:47
Dict examples
<gator>
[.load]
.source
.eng(engine())
.dict(dict())
.dicty #A simple handler for the dict plugin
.sys
[/]
engine(){
@b1naryth1ef
b1naryth1ef / self.gat
Created May 21, 2011 19:12
Self examples
<gator>
[.load]
.source #This is a new module in 3, which is best run for people messing with the eng functions.
.eng(engine())
.sys
.math
[/]
#Function
engine(){
@b1naryth1ef
b1naryth1ef / errors.gat
Created May 25, 2011 20:23
Simple Error System in Gator
<gator>
[.load]
.errory
.dict
.dicty
[/]
$env = "env()"
env(){
@b1naryth1ef
b1naryth1ef / BrokenAiffTOMp3
Created June 2, 2011 03:59
Broken AIFF to MP3 in a very basic way. Skips some bytes, may not work on extremely large corrupted files.
<gator>
[.load]
.byte
.audio(mp3)
.audio(aif)
.adioctrl
.randy
[/]
if x == 1:
do.something()
elif x == 2:
do.something()
else:
pass
if x=1:
orif x=2:
do.something()
<gator>
[.load]
.webify
.servy
.nettools
[/]
$port = "8080" #Make a global variable with our port number
g.init(var,empty,$maps) #Make a global unwritten (non-env) variable ready for our map storage
<gator>
[.load]
.webify
.servy
..cdnpak
.nettools
[/]
site = "http://mysite.com"