Skip to content

Instantly share code, notes, and snippets.

View kazimuth's full-sized avatar
🕷️
numbers aren't real

james gilles kazimuth

🕷️
numbers aren't real
  • Detroit, MI
View GitHub Profile
@kazimuth
kazimuth / rename_music.py
Created August 12, 2012 22:26
Python script to rename your music files!
#James Gilles, 2012
#DWTFYWWI License
from mutagen.easyid3 import EasyID3
import os
print "input directory for processing: "
path = raw_input()
os.chdir(path)
@kazimuth
kazimuth / df_raw_lang_npp_0.1.xml
Created August 28, 2013 21:06
A notepad++ user-defined language for Dwarf Fortress raw files (See http://notepad-plus-plus.org/ and http://www.bay12games.com/dwarves/)
<NotepadPlus>
<UserLang name="DF Raw File" ext="" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments"></Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@kazimuth
kazimuth / Newtonian.hs
Last active December 24, 2017 16:51
A universe in 125 lines of haskell
--A universe in 125 lines of haskell: http://i.imgur.com/9dJdaV1.png
--Note: I had made a better version but that computer died :/
--to build: cabal install random gloss && ghc -O3 -threaded Newtonian.hs && ./Newtonian
import Graphics.Gloss
import Graphics.Gloss.Data.Picture
import Graphics.Gloss.Data.Vector
import Graphics.Gloss.Interface.Pure.Simulate
import Data.List
import System.Random
@kazimuth
kazimuth / gist:948e1580ee4a21333893
Last active August 29, 2015 14:02
Loaded libraries when a SketchServiceProcess runs
SketchServiceProcess: Starting sketch runner process.SketchServiceProcess: Running:
[/home/james/dev/processing/build/linux/work/java/bin/java, -Xms64m, -Xmx1024m, -Djava.library.path=/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib, -cp, /home/james/dev/processing/build/linux/work/java/lib/rt.jar:/home/james/dev/processing/build/linux/work/lib/ant-launcher.jar:/home/james/dev/processing/build/linux/work/lib/ant.jar:/home/james/dev/processing/build/linux/work/lib/antlr.jar:/home/james/dev/processing/build/linux/work/lib/com.ibm.icu_4.4.2.v20110823.jar:/home/james/dev/processing/build/linux/work/lib/jdi.jar:/home/james/dev/processing/build/linux/work/lib/jdimodel.jar:/home/james/dev/processing/build/linux/work/lib/jna.jar:/home/james/dev/processing/build/linux/work/lib/org-netbeans-swing-outline.jar:/home/james/dev/processing/build/linux/work/lib/org.eclipse.osgi_3.8.1.v20120830-144521.jar:/home/james/dev/processing/build/linux/work/lib/pde.jar:/home/james/dev/processing/build/linux/work/core/libra
@kazimuth
kazimuth / gist:c4747f15809f2562184b
Created July 24, 2014 14:18
Jython importing session
Jython 2.7b3+ (default:0c21916a620a, Jul 17 2014, 10:01:34)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> dir()
['__doc__', '__name__', '__package__']
>>> from java.util import *
>>> dir()
['AbstractCollection', 'AbstractList', 'AbstractMap', 'AbstractQueue', 'AbstractSequentialList', 'AbstractSet', 'ArrayDeque', 'ArrayList', 'Arrays', 'BitSet', 'Calendar', 'Collection', 'Collections', 'Comparator', 'ConcurrentModificationException', 'Currency', 'Date', 'Deque', 'Dictionary', 'DuplicateFormatFlagsException', 'EmptyStackException', 'EnumMap', 'EnumSet', 'Enumeration', 'EventListener', 'EventListenerProxy', 'EventObject', 'FormatFlagsConversionMismatchException', 'Formattable', 'FormattableFlags', 'Formatter', 'FormatterClosedException', 'GregorianCalendar', 'HashMap', 'HashSet', 'Hashtable', 'IdentityHashMap', 'IllegalFormatCodePointException', 'IllegalFormatConversionException', 'IllegalFormatException', 'Il
@kazimuth
kazimuth / gist:bcccb28fc4ccd477508b
Last active August 29, 2015 14:04
More fun with imports
Jython 2.7b3+ (default:0c21916a620a, Jul 17 2014, 10:01:34)
[Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)] on java1.7.0_65
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import os
>>> sys.path.append("/Users/james/Dev/processing/build/macosx/work/Processing.app/Contents/Java/core.jar")
>>> sketchbook_library_folder = "/Users/james/Dev/sketchbook/libraries"
>>> library_folders = map(lambda f: sketchbook_library_folder + "/" + f, os.listdir(sketchbook_library_folder))
>>> for lib_folder in library_folders:
... jar_folder = lib_folder + "/library"
@kazimuth
kazimuth / main.rs
Last active August 29, 2015 14:08
Copy problems
// ...
#[deriving(Copy)]
pub struct PrefixTree {
children: [Option<Box<PrefixTree>>, ..26]
}
// ...
fn foo(){}
fn main() {
// No error
let _: fn() = foo;
// fnp.rs:11:27: 11:36 error: mismatched types: expected `core::option::Option<fn()>`, found
// `core::option::Option<fn() {foo}>` (expected fn pointer, found fn item)
// fnp.rs:11 let _: Option<fn()> = Some(foo);
// ^~~~~~~~~
import math
import lib601.util as util
sonarMax = 1.5
class DynamicRobotMaze:
ROBOT_DIAMETER = 0.44
ROBOT_RADIUS = ROBOT_DIAMETER / 2
INITIAL_BELIEF = .3
@kazimuth
kazimuth / hello.py
Created July 17, 2015 04:52
hacker level: The One
# This is an extremely complicated script.
# Use at your own risk.
print "What is your name?"
name = raw_input()
print "Hi, " + name