Skip to content

Instantly share code, notes, and snippets.

View hnishi's full-sized avatar
🏠
Working from home

hnishi hnishi

🏠
Working from home
View GitHub Profile
@hnishi
hnishi / export_multi_env.md
Created October 8, 2022 14:10
export multiple environment variables from a file (such as .env)
$ cat .env
MY_VAR=my_var1
ANOTHER_VAR=my_var2
export $(cat .env | xargs)
@hnishi
hnishi / 20221008_index_performance.ipynb
Last active October 8, 2022 07:34
20221008_index_performance.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hnishi
hnishi / rename.bash
Created August 25, 2022 04:14
Remove prefix of filenames with bash
for i in $(ls *md)
do
git mv $i ${i#DB_table-}
done
@hnishi
hnishi / vips_not_found.md
Last active April 22, 2022 13:37
npm install で `'vips/vips8' file not found #include <vips/vips8>` のエラーが出る

環境

m1 mac

作業ログ

npm install で 'vips/vips8' file not found #include <vips/vips8> のエラーが出る。

$ npm install
@hnishi
hnishi / eng_hhkb_windows.md
Created April 4, 2022 06:34
windows で英字配列 hhkb を使うときの設定メモ

windows で英字配列 hhkb を使うときの設定メモ

前提

  • windows 10

キーボード入力を英字配列にする

  • Windows の設定
  • 時刻と言語
@hnishi
hnishi / custom_wait_time.py
Last active December 30, 2021 10:14
locust customized wait_time function that can specify total rps for each user class (this does not work in distributed mode)
# Reference: https://github.com/SvenskaSpel/locust-plugins/blob/f287bae58e696fac13be0774d8065751cca9822c/locust_plugins/wait_time.py # noqa: B950
import logging
import time
from collections import defaultdict, deque, namedtuple
from typing import Any
from locust import events, runners
_last_run_dict = defaultdict(lambda: 0.0, {})
@hnishi
hnishi / auto-sklearn-titanic.ipynb
Created August 7, 2021 06:53
auto-sklearn-titanic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@hnishi
hnishi / view_csv_in_terminal.sh
Created June 30, 2021 08:02
view csv in terminal
# column command is pre-installed in mac
head -n5 my-test/dump.csv | column -s, -t | less -S
@hnishi
hnishi / name-window-gnu-screen.md
Created June 2, 2021 11:50
GNU Screen window に名前をつける。
@hnishi
hnishi / install-pymol-oss-ver.md
Last active April 25, 2021 01:05
久しぶりに pymol をインストールしてみる