Skip to content

Instantly share code, notes, and snippets.

View bluebear94's full-sized avatar
🦊
fluffy fox

+merlan #flirora bluebear94

🦊
fluffy fox
View GitHub Profile
@bluebear94
bluebear94 / autogen.py
Created December 27, 2014 02:25
A tool to autogenerate text files.
import argparse, re, io
template_pattern = re.compile("<%%(.*?)%%>")
def autogen(template, config):
exec(config)
loc = locals()
def replace(match):
nonlocal loc
expression = match.group(1)
@bluebear94
bluebear94 / SteveOrAlex.scala
Created August 27, 2014 02:28
Determines whether you're Steve or Alex.
import java.util.UUID
import scala.io.Source
object SteveOrAlex {
def main(args: Array[String]) {
val name = args(0)
println(s"Stats for $name")
val theID = uuid(name)
println(s"UUID: $theID")
val hash = theID.hashCode
import java.util._
import java.io._
object Mystery {
// It's a mystery.
val LUT: Array[String] = Array("\u3042", "\u3044", "\u3046", "\u3048", "\u304a",
"\u304b", "\u304d", "\u304f", "\u3051", "\u3053",
"\u3055", "\u3057", "\u3059", "\u305b", "\u305d",