This file contains 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
class DFA: | |
def __init__(self, states, alphabet, transition_function, start_state, accept_states): | |
self.states = states | |
self.alphabet = alphabet | |
self.transition_function = transition_function | |
self.start_state = start_state | |
self.accept_states = accept_states | |
self.current_state = start_state | |
def transition(self, symbol): |
This file contains 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 python3 | |
import sys | |
def find_nested_parentheses_locations(program): | |
stack = [] | |
nested_locations = [] | |
for index, char in enumerate(program): | |
if char == '(': |
This file contains 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
set -g default-terminal "xterm-256color" | |
set -ga terminal-overrides ",*256col*:Tc" | |
set -ga terminal-overrides ',xterm*:smcup@:rmcup@' | |
set -g mouse off | |
set -g history-limit 64000 | |
bind c new-window -c "#{pane_current_path}" | |
bind - split-window -v -c "#{pane_current_path}" | |
bind | split-window -h -c "#{pane_current_path}" |
This file contains 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
//cc -Wextra -o build/dump-header-map dump-header-map.c | |
// see: https://github.com/llvm-mirror/clang/blob/release_40/include/clang/Lex/HeaderMapTypes.h | |
// https://github.com/llvm-mirror/clang/blob/release_40/include/clang/Lex/HeaderMap.h// https://github.com/llvm-mirror/clang/blob/release_40/lib/Lex/HeaderMap.cpp | |
// This is basically dump() from there. | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sysexits.h> | |
#include <err.h> |
This file contains 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
i386 : iPhone Simulator | |
x86_64 : iPhone Simulator | |
iPhone1,1 : iPhone | |
iPhone1,2 : iPhone 3G | |
iPhone2,1 : iPhone 3GS | |
iPhone3,1 : iPhone 4 | |
iPhone3,2 : iPhone 4 GSM Rev A | |
iPhone3,3 : iPhone 4 CDMA | |
iPhone4,1 : iPhone 4S | |
iPhone5,1 : iPhone 5 (GSM) |