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
"挙動を vi 互換ではなく、vim のデフォルト設定にする | |
set nocompatible | |
"左右のカーソル移動で行を跨いで移動 | |
set whichwrap=b,s,h,l,<,>,[,],~ | |
"バックスペースでの削除をいつでも有効にする | |
set backspace=indent,eol,start | |
"ファイル関係 |
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 matplotlib.pyplot as plt | |
import numpy as np | |
import json | |
FileName = 'log' | |
def read_json(path = './log.json'): | |
file = open(path, 'r') | |
return json.load(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
using System; | |
using System.Text; | |
using System.Linq; | |
using System.Collections; | |
using System.Collections.Generic; | |
using static System.Console; | |
using static System.Math; | |
namespace NotFounds | |
{ |
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 | |
mcs -r:System.Numerics $1 -out:out.exe | |
if [ "$?" -eq 1 ]; then | |
exit 1 | |
fi | |
shift | |
if [ "$1" == "" ]; then | |
{ time mono out.exe ; } | |
if [ "$?" -eq 1 ]; then | |
rm out.exe |
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
// Min Heap | |
public class MinHeap<T> where T: IComparable | |
{ | |
private List<T> items = new List<T>(); | |
public MinHeap(int size) | |
{ | |
items = new List<T>(size); | |
} | |
public void Add(T item) |
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
using System; | |
public class Test | |
{ | |
const string PINC = "たのしー!"; | |
const string PDEC = "たーのしー!"; | |
const string INC = "すごーい!"; | |
const string DEC = "すっごーい!"; | |
const string PUT = "なにこれなにこれ!"; | |
const string GET = "おもしろーい!"; |
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 <iostream> | |
#include <cassert> | |
#include "Matrix.h" | |
using namespace std; | |
// Definition: Matrix foo | |
// Definition: Matrix foo(row, col) | |
// Definition: Matrix foo(row, col, double[]) | |
void test_matrix() |
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
#pragma once | |
#include <iostream> | |
#include <random> | |
class Matrix | |
{ | |
private: | |
double* _matrix; | |
public: | |
int row; |
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 "Matrix.h" | |
Matrix::Matrix() | |
{ | |
row = -1; | |
col = -1; | |
_matrix = NULL; | |
} | |
Matrix::Matrix(int _row, int _col) |
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
using System; | |
using GenericOperator; | |
namespace NeuralNetwork.Matrix | |
{ | |
public static class Matrix | |
{ | |
public static Matrix<int> Zero(int n) | |
{ | |
if (n <= 0) throw new ArgumentException(); |