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
#! /user/bin/python3 | |
from collections import defaultdict | |
from itertools import groupby | |
import operator | |
class Operation(object): | |
TAPE = [] | |
RECORD = defaultdict(lambda: 0) | |
RESULTS = {} | |
OPERATIONS = { |
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
import maya.cmds as cmds | |
import itertools as it | |
def transpose(m, size=4): | |
return list(it.chain.from_iterable(map( | |
lambda x: m[x:len(m):size], | |
xrange(size) | |
))) | |
class TransformationsPlayground(object): |
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 itertools import * | |
vietNums = { | |
0 : u"", | |
1 : u"một", | |
2 : u"hai", | |
3 : u"ba", | |
4 : u"bốn", | |
5 : u"năm", | |
6 : u"sáu", |
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
// bInarytree.cpp : Defines the entry point for the console application. | |
// | |
#include "stdafx.h" | |
#include <iostream> | |
#include <algorithm> | |
class BinaryTree | |
{ | |
private: |
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
import System.Environment | |
import Data.Char | |
type Cells = [Int] | |
type Ptr = Int | |
type OutBuffer = String | |
type Stack = (Ptr, Cells, OutBuffer) | |
defValue :: Int | |
defValue = 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
from itertools import * | |
from operator import * | |
def fibogen(): | |
a,b = 1,1 | |
yield a | |
yield b | |
while True: | |
res = a+b | |
a, b = b, res | |
yield res |
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 <iostream> | |
#include <functional> | |
#include <string> | |
template<class T> | |
T getFromString(const std::string& value, std::function<T(const std::string&)> f) | |
{ | |
return f(value); | |
} |
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 <iostream> | |
#include <functional> | |
#include <string> | |
template<class T> | |
T getFromString(const std::string& value, std::function<T(const std::string&)> f) | |
{ | |
return f(value); | |
} |
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 <fstream> | |
#include "puzzle.h" | |
using namespace std; | |
Puzzle_game::Puzzle_game() | |
{ | |
Solve = false; | |
for(int i = 0; i < 4; i++) |
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
;; Copyright (c) 2012, Alvaro Castro-Castilla. All rights reserved. | |
;; Game by: Daniel Sanchez, Alejandro Cabeza, Carlos Belmonte and Juan Maria Vergara | |
(pg:app | |
setup: (lambda (resources) | |
(make-environment 600 400 resources #f)) | |
main-loop: |