Skip to content

Instantly share code, notes, and snippets.

View nkoneko's full-sized avatar

Nekomura, Koneko nkoneko

  • Tokyo
View GitHub Profile
#!/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
#!/bin/sh
usage() {
cat 1>&2 <<EOS
SYNOPSIS
${SCRIPT_NAME} TARGET VERSION
TARGET either of the followings:
lzip, curl, gcc
EOS
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))
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
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'
#!/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])))))
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <iostream>
#include <string>
#include <complex>
namespace
{
#include <boost/spirit/include/qi.hpp>
#include <boost/spirit/include/phoenix.hpp>
#include <iostream>
#include <string>
#include <numeric>
namespace client
{
#include <iostream>
template <int N>
struct Integer
{
int& ref()
{
return x_;
}
Integer& add(int const x)
#include <iostream>
#include <fstream>
#include <vector>
#include <string>
#include <memory>
#include <boost/filesystem.hpp>
#include <pstream.h>
namespace toy