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 theano | |
import theano.tensor as T | |
class RAE(object): | |
def __init__(self, input, rng, d, W=None, b=None, U=None, c=None): | |
dv = d | |
dh = d * 2 | |
self.dv = dv |
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
use strict; | |
use warnings; | |
use utf8; | |
use Encode; | |
use Scalar::Util 'blessed'; | |
use Net::Twitter; | |
my $username = shift; |
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 | |
############################################################################### | |
# | |
# Modules | |
# | |
use strict; | |
use warnings; | |
use utf8; | |
use POSIX; |
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
use strict; | |
use warnings; | |
print p([@ARGV]), "\n"; | |
sub p { | |
my $e = shift; | |
my $s = shift @{$e}; | |
return p($e) + p($e) if $s eq "+"; | |
return p($e) - p($e) if $s eq "-"; |
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
use strict; | |
use warnings; | |
my @list = qw(1 2 3 4); | |
my @p = permute([@list], []); | |
foreach my $s (map{join("\t", @{$_})}@p) { | |
printf("%s\n", $s); | |
} | |
sub permute { |
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
/****************************************************************************** | |
** iqstat - Interactive qstat viewer | |
** | |
** Created by kotone on 2015/01/16. | |
** Copyright (c) 2015 Kotone Itaya. All rights reserved. | |
** | |
** iqstat is free software: you can redistribute it and/or modify | |
** it under the terms of the GNU General Public License as published by | |
** the Free Software Foundation, either version 3 of the License, or | |
** (at your option) any later version. |
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 | |
import numpy as np | |
from chainer import cuda, Function, FunctionSet, gradient_check, Variable, optimizers | |
import chainer.functions as F | |
x_train = np.array([ | |
[[0., 0.]], | |
[[0., 1.]], | |
[[1., 0.]], | |
[[1., 1.]] |
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 utils | |
parser = argparse.ArgumentParser(description='Chainer example: MNIST') | |
parser.add_argument('--gpu', '-g', default=-1, type=int, | |
help='GPU ID (negative value indicates CPU)') |
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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
my $base = "togows.dbcls.jp/entry/nucleotide"; | |
my ($prefix, $from_id, $to_id) = (@ARGV); | |
if($from_id > $to_id) { | |
($from_id, $to_id) = ($to_id, $from_id); |