Skip to content

Instantly share code, notes, and snippets.

View serihiro's full-sized avatar

Kazuhiro Serizawa serihiro

View GitHub Profile
@serihiro
serihiro / contest_record.md
Last active May 4, 2020 01:03
AtCoder参戦記録用テンプレ

[:contents]

結果

問題 ACまでに要した時間 AC WA TLE
A : 0 0 0
B : 0 0 0
@serihiro
serihiro / main.cpp
Last active February 8, 2020 09:49
My Cpp template for competitive programing.
#include <bits/stdc++.h>
#define REP(i, x) REPI(i, 0, x)
#define REPI(i,a,b) for(int i=int(a);i<int(b);++i)
#define ALL(x) (x).begin(), (x).end()
typedef long long ll;
using namespace std;
int main() {
@serihiro
serihiro / Csv2.c
Last active January 29, 2020 05:23
extended csv output plugin of wgrib2 http://www.cpc.ncep.noaa.gov/products/wesley/wgrib2/
/******************************************************************************************
Copyright (C) 2008 Niklas Sondell, Storm Weather Center
This file is part of wgrib2 and could be distributed under terms of the GNU General Public License
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "grb2.h"
@serihiro
serihiro / graph.rmd
Last active January 3, 2020 06:07
1から10^6の範囲の整数に含まれる素数を昇順で並べた時の差分を表示するスクリプト
---
title: "distance_graph"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(ggplot2)
```
@serihiro
serihiro / practice_record.md
Created January 2, 2020 01:53
AtCoder過去問練習用テンプレ

結果

解答

A

B

C

@serihiro
serihiro / simple_inferer.py
Created September 22, 2019 09:59
simple onnx runtime (support only MNUIST / GEMM + RELU )
import argparse
import onnx
import numpy as np
from onnx import numpy_helper
from PIL import Image
def relu(x: np.ndarray) -> np.ndarray:
return np.maximum(x, 0)
@serihiro
serihiro / node.md
Last active September 13, 2019 13:57
blueoil dlk sample note

I have tried the quickstart of https://github.com/blue-oil/blueoil/tree/master/dlk .

venv ❯ PYTHONPATH=python/dlk python python/dlk/scripts/generate_project.py --help

Options:
  -i, --input_path PATH           protobuf path which you want to convert to C
                                  codes
  -o, --output_path TEXT          output path which you want to export any
                                  generated files
@serihiro
serihiro / .numpy-site.cfg
Last active July 30, 2019 01:48
install numpy with Intel MKL at MacOS
# ~/.numpy-site.cfg
[mkl]
library_dirs = /opt/intel/mkl/lib
include_dirs = /opt/intel/mkl/include
mkl_libs = mkl_rt
lapack_libs =
#!/bin/bash
if [ $# -ne 2 ]; then
echo 'Usage: sh ./this_file.sh {image_path} {output_file_path}'
exit 1
fi
IMAGE_PATH=${1}
OUTPUT_FILE=${2}
cd $BASE_DIRECTORY
#!/bin/bash
SUB_DIRECTORY_LIST=(0 1 2 3 4 5 6 7 8 9 a b c d e f)
if [ $# -ne 2 ]; then
echo 'Usage: sh ./this_file.sh {target_directory} {output_file_path}'
exit 1
fi
BASE_DIRECTORY=$(cd ${1} && pwd)