Skip to content

Instantly share code, notes, and snippets.

View y-tag's full-sized avatar

TAGAMI Yukihiro y-tag

View GitHub Profile
#!/usr/local/bin/perl
use strict;
use warnings;
use 5.008;
use Data::Dumper;
main();
#!/usr/local/bin/perl
use strict;
use warnings;
use 5.008;
main();
sub main {
#!/usr/local/bin/perl
use strict;
use warnings;
use 5.008;
main();
sub main {
if (@ARGV < 1) {
@y-tag
y-tag / phi.cpp
Created March 17, 2013 09:04
inverse of cumulative function of the normal distribution for Confidence Weighted learning
#include <cstdio>
#include <boost/math/distributions/normal.hpp>
int main(int argc, char **argv) {
boost::math::normal_distribution<> norm;
for (double xi = 0.5; xi < 1.0; xi += 0.05) {
double phi = boost::math::quantile(norm, xi);
fprintf(stdout, "%f\t%f\n", xi, phi);
}
}
@y-tag
y-tag / mixed_entropy.clang.32.O2.s
Created March 12, 2013 21:55
$ clang++ -o mixed_entropy.clang.32.O2.s -S mixed_entropy.cc -Wall -m32 -O2
.file "mixed_entropy.cc"
.text
.globl _Z13mixed_entropydd
.align 16, 0x90
.type _Z13mixed_entropydd,@function
_Z13mixed_entropydd: # @_Z13mixed_entropydd
# BB#0:
pushl %ebp
movl %esp, %ebp
subl $56, %esp
@y-tag
y-tag / mixed_entropy.clang.32.s
Created March 12, 2013 21:53
$ clang++ -o mixed_entropy.clang.32.s -S mixed_entropy.cc -Wall -m32
.file "mixed_entropy.cc"
.text
.globl _Z13mixed_entropydd
.align 16, 0x90
.type _Z13mixed_entropydd,@function
_Z13mixed_entropydd: # @_Z13mixed_entropydd
# BB#0:
pushl %ebp
movl %esp, %ebp
subl $56, %esp
@y-tag
y-tag / mixed_entropy.clang.64.O2.s
Created March 12, 2013 21:52
$ clang++ -o mixed_entropy.clang.64.O2.s -S mixed_entropy.cc -Wall -O2
.file "mixed_entropy.cc"
.text
.globl _Z13mixed_entropydd
.align 16, 0x90
.type _Z13mixed_entropydd,@function
_Z13mixed_entropydd: # @_Z13mixed_entropydd
.Ltmp2:
.cfi_startproc
# BB#0:
pushq %rbp
@y-tag
y-tag / mixed_entropy.clang.64.s
Created March 12, 2013 21:51
$ clang++ -o mixed_entropy.clang.64.s -S mixed_entropy.cc -Wall
.file "mixed_entropy.cc"
.text
.globl _Z13mixed_entropydd
.align 16, 0x90
.type _Z13mixed_entropydd,@function
_Z13mixed_entropydd: # @_Z13mixed_entropydd
.Ltmp2:
.cfi_startproc
# BB#0:
pushq %rbp
@y-tag
y-tag / mixed_entropy.32.O2.store.s
Created March 12, 2013 21:49
$ g++ -o mixed_entropy.32.O2.store.s -S mixed_entropy.cc -Wall -m32 -O2 -ffloat-store
.file "mixed_entropy.cc"
.text
.p2align 4,,15
.globl _Z13mixed_entropydd
.type _Z13mixed_entropydd, @function
_Z13mixed_entropydd:
.LFB119:
.cfi_startproc
subl $76, %esp
.cfi_def_cfa_offset 80
@y-tag
y-tag / mixed_entropy.32.store.s
Created March 12, 2013 21:47
$ g++ -o mixed_entropy.32.store.s -S mixed_entropy.cc -Wall -m32 -ffloat-store
.file "mixed_entropy.cc"
.text
.globl _Z13mixed_entropydd
.type _Z13mixed_entropydd, @function
_Z13mixed_entropydd:
.LFB85:
.cfi_startproc
pushl %ebp
.cfi_def_cfa_offset 8
.cfi_offset 5, -8