Skip to content

Instantly share code, notes, and snippets.

View serihiro's full-sized avatar

Kazuhiro Serizawa serihiro

View GitHub Profile
@serihiro
serihiro / arm_compute_library_tutorial_note.md
Last active May 21, 2021 18:54
A note about "Running AlexNet on Raspberry Pi with Arm Compute Library" at arm Developer
@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)
import concurrent.futures
import argparse
import os
import glob
import csv
SUB_DIRECTORIES = list(map(lambda x: str(x), range(0,10) )) + ['a', 'b', 'c', 'd', 'e', 'f']
def generate_list(sub_directory):
global label_list
@serihiro
serihiro / executable.sh
Last active June 3, 2022 09:38
Get MPI rank in the executing shell script
#!/bin/bash
rank=`python get_mpi_rank.py`
if [ ${rank} -eq 0 ]; then
echo 'I am rank 0'
elif [ ${rank} -eq 1 ]; then
echo 'I am rank 1'
elif [ ${rank} -eq 2 ]; then
echo 'I am rank 2'
elif [ ${rank} -eq 3 ]; then
@serihiro
serihiro / mp_queue_pipeline_test.py
Last active May 31, 2019 05:14
python mulitprocessing.Queue test for each Context. See also https://gist.github.com/serihiro/bb9614b816b9c35e95ec4b53d3382f72
import multiprocessing
import queue
import argparse
import time
def task1(out_queue):
for i in range(0, 5):
out_queue.put(i)
@serihiro
serihiro / mp_queue_test.py
Last active May 31, 2019 04:38
python mulitprocessing.Queue test for each Context
import multiprocessing
import argparse
queue = None
def task(queue, value):
queue.put(value)
@serihiro
serihiro / chainer_iterator_statemachine_examination.py
Created April 30, 2019 02:05
chainer iterator_statemachine examination
from chainer.iterators._statemachine import IteratorState
from chainer.iterators._statemachine import iterator_statemachine
from chainer.iterators.order_samplers import ShuffleOrderSampler
import numpy
dataset_length = 100
batch_size = 32
repeat = True
order_sampler = ShuffleOrderSampler()
@serihiro
serihiro / my_release_note_template.md
Created April 29, 2019 13:03
my_release_note template

個人開発

読書

読み終わった

読んでる

研究

勉強