This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| % font setup | |
| \usepackage{ifxetex} | |
| \ifxetex | |
| \usepackage[log-declarations=false]{xparse} | |
| \usepackage{fontspec} | |
| \setmainfont[Mapping=tex-text]{Arial Unicode MS} | |
| \else | |
| \usepackage[utf8]{inputenc} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| Mixo-Fixo: Typo and casual reverse-eingineering tolerant, inefficient string-token encoding method. | |
| """ | |
| def chunks(l, n): | |
| """ Yield successive n-sized chunks from l.""" | |
| for i in xrange(0, len(l), n): | |
| yield l[i:i+n] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <!-- SNIP --> | |
| <key>IOKitPersonalities</key> | |
| <dict> | |
| <!-- SNIP --> | |
| <key>RFA-Z106-RA-PC RAVEn</key> | |
| <dict> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from string import Template | |
| class OracleTemplate(string.Template): | |
| """Substitution variables, ala Oracle SQL*Plus""" | |
| pattern = r""" | |
| &(?: | |
| (?P<escaped>&) | | |
| (?P<braced>[_a-z0-9]+)\. | | |
| (?P<named>[_a-z0-9]+) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import signal | |
| class InterruptableRegion(object): | |
| def __init__(self, sig=signal.SIGINT): | |
| self.sigs = list(sig) if isinstance(sig, (list, tuple)) else [sig] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <math.h> | |
| #include "ffi_test.h" | |
| const char greeting_format[] = "%s, %s, you old %s, you!"; | |
| /* get species name */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #' Create a nullable class field for a reference class. | |
| #' | |
| #' @param name name of class. | |
| #' @examples \dontrun{ | |
| #' Foo = setRefClass('Foo', fields=c(a=nullable('list'), b='character')) | |
| #' x = Foo$new(a=list(1,2,3), y="Non-NULL 'a'") | |
| #' y = Foo$new(a=NULL, y="NULL 'a'") | |
| #' } | |
| nullable = function(name) { | |
| union_name = paste(name, 'NULL', sep='_') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys | |
| import os | |
| import os.path | |
| import json | |
| import signal | |
| import subprocess | |
| # process arguments |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A = setRefClass("A", | |
| methods=list( | |
| hello=identity, | |
| process=function(x) {-x} | |
| ) | |
| ) | |
| B = setRefClass("B", | |
| contains='A', | |
| methods=list( | |
| process=function(x) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| import sys, time, string, logging, itertools, subprocess, multiprocessing | |
| hdiutil_opts = [ | |
| '-quiet', '-readonly', '-stdinpass', '-nomount', '-noverify', '-noautofsck', '-noidme', '-noautoopen' | |
| ] | |
| def mount(image, queue): | |
| """Worker to attempt to mount the image. Return if successful or poisoned.""" |