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 ConvolutionalAutoencoder(FunctionSet): | |
def __init__(self, n_in, n_out, ksize, stride=1, pad=0, wscale=1, bias=0, nobias=False): | |
super(ConvolutionalAutoencoder, self).__init__( | |
encode=F.Convolution2D(n_in, n_out, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias), | |
decode=F.Convolution2D(n_out, n_in, ksize, stride=stride, pad=pad, wscale=wscale, bias=bias, nobias=nobias) | |
) | |
def forward(self, x_data, train=True): | |
x = Variable(x_data) | |
t = Variable(x_data) |
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 python | |
# -*- coding: utf-8 -*- | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn import svm, datasets | |
import brica1 | |
# SVM Component Definition |
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 numpy as np | |
from chainer import Variable, FunctionSet, optimizers | |
import chainer.functions as F | |
import data | |
import brica1 | |
class SLP(FunctionSet): | |
def __init__(self, n_input, n_output): | |
super(SLP, self).__init__( |
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 argparse | |
import numpy as np | |
from sklearn.datasets import fetch_mldata | |
from chainer import Variable, FunctionSet, optimizers, cuda | |
import chainer.functions as F | |
import brica1 | |
class Perceptron(): | |
def __init__(self, n_in, n_out, use_cuda=False): | |
self.model = FunctionSet( |
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 | |
if [ -d treasure_hunt ] | |
then | |
rm -r treasure_hunt | |
fi | |
mkdir treasure_hunt | |
echo 'Aye aye mate! Welcome to the treasure hunt!' >> treasure_hunt/README |
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 perl | |
use strict; | |
use warnings; | |
my %rank_hour; # Access per hour | |
my %rank_file; # Access per file | |
open LOG, "<", "access_log"; # Open log file | |
open CSV, ">", "access_log.csv"; # Open CSV output file |
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
require 'formula' | |
# Contact celery [at] g-language.org for questions | |
# Or should I call this formula plain ecell...? | |
class Ecell4 < Formula | |
homepage 'http://www.e-cell.org/' | |
url 'https://github.com/ecell/ecell4/tarball/master' | |
sha1 '2b1bdf70b0bdfd09e091943eb110b1aab03db6c6' | |
version '4' |
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 numpy as np | |
import matplotlib.pyplot as plt | |
def Hadamard(n): | |
def Hn(H=np.array([[1, 1], [1, -1]], dtype=np.complex64), n=n): | |
if n > 1: | |
return Hn(H=np.kron(np.array([[1, 1], [1, -1]], dtype=np.complex64), H), n=n-1) | |
return H | |
return Hn(n=n) |
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 ruby | |
require 'net/http' | |
require 'uri' | |
require 'json' | |
url = 'http://hack.sfc.keioac.jp/sfcbusapi/index.php' | |
uri = URI.parse( url ) | |
res = Net::HTTP.get( uri ) | |
m = /^callback\((.+)\);$/.match( res ) |
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> | |
#include <stdlib.h> | |
void reverse(char** Pstring); | |
int match(char a, char b); | |
int main(int argc, char* argv[]) { | |
if(argc < 2) { | |
fprintf(stderr, "Usage: needle <sequence 1> <sequence 2>"); | |
} |