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
package de.niklaskorz.brainfuck | |
import scala.io.Source | |
object App { | |
def main(args: Array[String]) { | |
var interpreter = new Interpreter | |
var source = Source.fromFile(args(0)).mkString | |
interpreter.eval(source) | |
} |
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
+++++ +++++ initialize counter (cell #0) to 10 | |
[ use loop to set the next four cells to 70/100/30/10 | |
> +++++ ++ add 7 to cell #1 | |
> +++++ +++++ add 10 to cell #2 | |
> +++ add 3 to cell #3 | |
> + add 1 to cell #4 | |
<<<< - decrement counter (cell #0) | |
] | |
> ++ . print 'H' | |
> + . print 'e' |
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
Q = Quintus() | |
.include("Sprites, Scenes, Input, 2D, Touch, UI") | |
.setup(maximize: true) | |
.controls().touch() | |
Q.Sprite.extend "Player", | |
init: (p) -> | |
@_super p, sheet: "player", x: 410, y: 90 | |
@add "2d, platformerControls" |
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 __future__ import print_function | |
from collections import Counter | |
import re | |
word_re = re.compile(r"\b[\w-]+\b") | |
letter_re = re.compile("[a-z]") | |
symbol_re = re.compile("[^\w\s]") | |
messages = [ | |
"Top three most common words: '{0[0][0]}', '{0[1][0]}', '{0[2][0]}'", |
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
framework module AppKit [system] { | |
umbrella header "AppKit.h" | |
export * | |
module * { export * } | |
explicit module NSNibConnector { | |
header "NSNibConnector.h" | |
export * | |
} |
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 __future__ import print_function | |
from ply import lex, yacc | |
tokens = ( | |
"LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "COLON", | |
"STRING", "INT", "FLOAT", "COMMA", "NULL", "TRUE", "FALSE", | |
"WHITESPACE" | |
) | |
t_LBRACE = r"\{" |
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
@app.errorhandler(400) | |
@app.errorhandler(401) | |
@app.errorhandler(402) | |
@app.errorhandler(403) | |
@app.errorhandler(404) | |
@app.errorhandler(405) | |
@app.errorhandler(406) | |
@app.errorhandler(407) | |
@app.errorhandler(408) | |
@app.errorhandler(409) |
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 plex import * | |
from washr.parser.types import Variable, BlockStart, BlockEnd | |
from cStringIO import StringIO | |
left_edge = Str("{") | |
right_edge = Str("}") | |
block_token = NoCase(Str("block:")) |
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 time import sleep | |
w, h = world.getSizeX(), world.getSizeY() | |
grid = {} | |
def set_grid(x, y, val): | |
if x not in grid: | |
grid[x] = {} | |
grid[x][y] = val |
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
Polymer 'proto-element', | |
name: 'Me' | |
age: 20 | |
color: '#0000ff' | |
publish: | |
valueless: | |
value: false | |
reflect: true | |
nameChanged: -> | |
if @name |
OlderNewer