Skip to content

Instantly share code, notes, and snippets.

on sys-event-start:
plat_room(example)
#I don't really get this part, though
@technillogue
technillogue / gist:1639614
Created January 19, 2012 11:59
DuskWolf compiler
improt string, sysy
containers = ["on"]
cmd_trans = {"on": "while"}
lineargs = {"on": ["event"], "comment": ["text"], "var": ["name", "value"]}
NAME = "foo"
source = open(name + ".dw").read()
compiled = open(name + ".json", "w")
@technillogue
technillogue / gist:3772608
Created September 23, 2012 18:35
git log --oneline --graph --decorate --all
* f14937b (HEAD, master) Changed game to games, started changing existing games to use the Game class and the games package
* f860e9a Removed obvious bugs
* 198a353 Removed core.shared, added api.reset_defaults(), cleaned and fixed some other code
| * ec50c9e (refs/stash) WIP on master: 3a9b4ff Integrated WWHM map and tweeked some classes
| |\
|/ /
| * e662e05 index on master: 3a9b4ff Integrated WWHM map and tweeked some classes
|/
* 3a9b4ff (origin/master, origin/HEAD) Integrated WWHM map and tweeked some classes
* 96805c3 Added back option to thinker
@technillogue
technillogue / gist:3772635
Created September 23, 2012 18:44
yelik error
Fatal Python error: Py_Initialize: unable to load file system codec
ImportError
This application hes requiestion the Runtime to terminate it in an ususual way.
Please contanct the application's support team for more information.
def move_exec(self):
being = self.actor
dest = self.args["go where"]
loc = being.location
if dest in loc.links.values():
loc.beings.remove(being)
dest.beings.append(being)
being.location = dest
print(being.name, "has moved too", dest.name)
if being.name is config.name:
@technillogue
technillogue / calc.py
Last active February 22, 2022 18:20 — forked from anonymous/gist:5882172
A simple python calculator using lambda expressions
operations = {
"+": lambda x, y: x + y,
"-": lambda x, y: x - y,
"/": lambda x, y: x / y,
"*": lambda x, y: x * y
}
def calculate(expr):
numxChars = ""
operation = None
@technillogue
technillogue / calc.py
Created June 28, 2013 18:53
A more complicated recursive python calculator
from collections import OrderedDict
#reverse order of operations
#I didn't have to use an OrderedDict, but it's cute
operations = OrderedDict([
("+", lambda x, y: x + y),
("-", lambda x, y: x - y),
("/", lambda x, y: x / y),
("*", lambda x, y: x * y),
("^", lambda x, y: x ^ y)
#!/usr/bin/python
import timing
import zipfile
import os
import shlex
import subprocess
import glob
import shutil
import MySQLdb
import sys
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Error 404 - Not found</title>
<META HTTP-EQUIV="Content-type" CONTENT="text/html; charset=UTF-8">
<script type="text/javascript" language="JavaScript" src="http://img.sedoparking.com/registrar/dopark.js"></script>
</head>
<body>
uiserver):u52281162:~/logs > ls
access.log.26.gz access.log.33.5.gz dav.log.29.gz ftp.xferlog.32.gz mail.log.30.gz
access.log.27.gz access.log.33.6.gz dav.log.31.gz info.php mail.log.31.gz
access.log.28.gz access.log.33.7.gz dav.log.33.4.gz info.php5 mail.log.32.gz
access.log.29.gz access.log.34.1.gz ftp.log.26.gz info.pl mail.log.33.gz
access.log.30.gz access.log.34.2.gz ftp.log.27.gz info.py sftp.log
access.log.31.gz access.log.34.3.gz ftp.log.29.gz last_traffic traffic.db
access.log.32.gz access.log.34.4.gz ftp.log.30.gz mail.log traffic.html
access.log.33.1.gz access.log.34.5.gz ftp.log.31.gz mail.log.26.gz
access.log.33.2.gz access.log.34.6.gz ftp.log.32.gz mail.log.27.gz