Skip to content

Instantly share code, notes, and snippets.

View NotFounds's full-sized avatar
🦕

Iori IKEDA NotFounds

🦕
View GitHub Profile
"挙動を vi 互換ではなく、vim のデフォルト設定にする
set nocompatible
"左右のカーソル移動で行を跨いで移動
set whichwrap=b,s,h,l,<,>,[,],~
"バックスペースでの削除をいつでも有効にする
set backspace=indent,eol,start
"ファイル関係
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)
@NotFounds
NotFounds / code.cs
Last active September 24, 2018 16:24
どくぬまのしれん - normal
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
{
@NotFounds
NotFounds / csr.sh
Last active May 7, 2017 15:50
Usage: $csr foo.cs in in1 ...
#!/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
// 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)
using System;
public class Test
{
const string PINC = "たのしー!";
const string PDEC = "たーのしー!";
const string INC = "すごーい!";
const string DEC = "すっごーい!";
const string PUT = "なにこれなにこれ!";
const string GET = "おもしろーい!";
#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()
#pragma once
#include <iostream>
#include <random>
class Matrix
{
private:
double* _matrix;
public:
int row;
#include "Matrix.h"
Matrix::Matrix()
{
row = -1;
col = -1;
_matrix = NULL;
}
Matrix::Matrix(int _row, int _col)
@NotFounds
NotFounds / Matrix.cs
Last active May 23, 2017 03:54
Matrix Class supported Generic in C#
using System;
using GenericOperator;
namespace NeuralNetwork.Matrix
{
public static class Matrix
{
public static Matrix<int> Zero(int n)
{
if (n <= 0) throw new ArgumentException();