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
.python-version | |
__pycache__/ |
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
from pyparsing import ParseException, _PositionToken, ParserElement | |
from pyparsing import ( | |
Or, Group, Word, Literal, Optional, Regex, Empty, LineEnd, | |
Combine, ZeroOrMore, OneOrMore, Forward) | |
# FIXME: need to know how pyparsing handles whitespaces | |
class CarriageReturn(_PositionToken): | |
def __init__(self): | |
super(CarriageReturn, self).__init__() | |
self.setWhitespaceChars(ParserElement.DEFAULT_WHITE_CHARS.replace('\r', '')) |
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
#include <stdio.h> | |
#define USE_BINARY_FUNC typedef struct { \ | |
T (*fn)(T, T); \ | |
} T##_binfn; | |
USE_BINARY_FUNC(int) | |
USE_BINARY_FUNC(float) | |
int add(int x, int y) { return x + y; } |
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
#!/bin/sh | |
usage() { | |
cat 1>&2 <<EOS | |
SYNOPSIS | |
${SCRIPT_NAME} TARGET VERSION | |
TARGET either of the followings: | |
gmp, mpfr, mpc, isl, cloog, lzip, gcc, binutils | |
EOS |
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
#!/bin/sh | |
usage() { | |
cat 1>&2 <<EOS | |
SYNOPSIS | |
${SCRIPT_NAME} TARGET VERSION | |
TARGET either of the followings: | |
lzip, curl, gcc | |
EOS |
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
CXX = g++ | |
CFLAGS = -std=c++0x -Wall | |
LDFLAGS = -Llib -lboost_system -lboost_filesystem | |
LIBS = | |
INCLUDE = -Iinclude | |
TARGET = ./bin/$(shell basename `readlink -f .`) | |
SRCDIR = ./src | |
OBJDIR = ./build | |
SOURCES = $(wildcard $(SRCDIR)/*.cpp) | |
OBJECTS = $(patsubst $(SRCDIR)/%.cpp, $(OBJDIR)/%.o, $(SOURCES)) |
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
import itertools as I | |
import functools as F | |
import operator as O | |
FROM=3 | |
TO=117 | |
_=lambda m,f,g:I.cycle(I.chain(I.repeat(g,m-1),[f])) | |
_id=lambda x:x | |
_th=lambda x:x+2 |
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
import itertools as I | |
import functools as F | |
FROM=1 | |
TO=32 | |
_=lambda m,f,g:I.cycle(I.chain(I.repeat(g,m-1),[f])) | |
_id=lambda x:x | |
_fizz=lambda x:x+'Fizz' |
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/python | |
if __name__=='__main__': | |
import itertools as _;import sys as __; | |
____=lambda ____,__,___:_.cycle(_.chain(_.repeat(___,____-1),[__])) | |
_____=lambda __,_:_ if _ else str(__) | |
print(' '.join(list(_.islice((_____(_,__(___(''))) for _,___,__ in _.izip(_.count(1),____(3,lambda _:_+'Fizz',lambda _:_),____(5,lambda _:_+'Bazz',lambda _:_))),int(__.argv[1])-1,int(__.argv[2]))))) |
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
#include <boost/spirit/include/qi.hpp> | |
#include <boost/spirit/include/phoenix.hpp> | |
#include <iostream> | |
#include <string> | |
#include <complex> | |
namespace | |
{ |
OlderNewer