This file contains hidden or 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 <iostream> | |
| #include <string> | |
| #include <sstream> | |
| #include <vector> | |
| #include <random> | |
| #include <sys/time.h> | |
| //---------------------------------------------------------------------- | |
| std::uniform_int_distribution<> rand9(0, 9); | |
| const int TRIAL = 500000; |
This file contains hidden or 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 <iostream> | |
| #include <string> | |
| #include <stdlib.h> | |
| #include <sstream> | |
| #include <vector> | |
| #include <sys/time.h> | |
| //---------------------------------------------------------------------- | |
| const int TRIAL = 500000; | |
| const int LEN = 100; |
This file contains hidden or 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
| list = Array.new | |
| str = "" | |
| while line=gets | |
| next if line=~/^\s*\/\// | |
| next if line.chomp.strip == "" | |
| str = str + line.chomp.strip | |
| if line=~/\;/ | |
| list.push str | |
| str = "" |
This file contains hidden or 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 <stdint.h> | |
| #include <string.h> | |
| #include <stdarg.h> | |
| //------------------------------------------------------------------------ | |
| void | |
| cpuid(uint32_t v, uint32_t &a, uint32_t &b, uint32_t &c, uint32_t &d){ | |
| uint32_t eax, ebx, ecx, edx; | |
| asm("nop" :: "a" (v)); |
This file contains hidden or 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
| $ cd public_html | |
| $ ruby linkchecker.rb | |
| /path/to/public_html/foo.html is isolated. | |
| /path/to/public_html/bar.html is isolated. |
This file contains hidden or 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 chainer | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument('--number', '-n', type=int, default=0, help='') | |
| args = parser.parse_args() | |
| n = args.number | |
| train, test = chainer.datasets.get_mnist() | |
| s = 28 | |
| print test[n][1] |
This file contains hidden or 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 __future__ import print_function | |
| import struct | |
| import numpy as np | |
| import chainer | |
| import chainer.functions as F | |
| import chainer.links as L | |
| from chainer import training | |
| from chainer.training import extensions | |
| # Network definition |
This file contains hidden or 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 <immintrin.h> | |
| #include <stdio.h> | |
| //------------------------------------------------------------------------ | |
| enum {X, Y, Z}; | |
| const int N = 20000; | |
| const double dt = 0.01; | |
| double __attribute__((aligned(32))) q[N][4] = {}; | |
| double __attribute__((aligned(32))) p[N][4] = {}; | |
| double __attribute__((aligned(32))) c24[4] = {24 * dt, 24 * dt, 24 * dt, 24 * dt}; |
This file contains hidden or 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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| //------------------------------------------------------------------------ | |
| #include <x86intrin.h> | |
| #include <immintrin.h> | |
| #include <iostream> |
This file contains hidden or 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
| /* | |
| # Copyright H. Watanabe 2017 | |
| # Distributed under the Boost Software License, Version 1.0. | |
| # (See accompanying file LICENSE_1_0.txt or copy at | |
| # http://www.boost.org/LICENSE_1_0.txt) | |
| */ | |
| //------------------------------------------------------------------------ | |
| #include <immintrin.h> | |
| #include <iostream> | |
| #include <stdio.h> |