Skip to content

Instantly share code, notes, and snippets.

View iwasakishuto's full-sized avatar
🍷

shuto iwasaki iwasakishuto

🍷
View GitHub Profile
@iwasakishuto
iwasakishuto / note2markdown.js
Created April 15, 2022 06:56
Bookmarklet that converts the contents of note to markdown
/**
* @file Bookmarklet that converts the contents of note to markdown
* @author Shuto Iwasaki <cabernet.rock@gmail.com>
* @copyright Iwasaki Shuto 2022
* @license MIT
*/
(function () {
/** <--- Utility Functions --- */
const br2n = (text) =>
@iwasakishuto
iwasakishuto / gen_sample_size_image.py
Created October 22, 2021 01:11
Aspect 比が決まっている時の Sample Image を生成する。
# coding: utf-8
#!/Users/iwasakishuto/Github/portfolio/PyVideoEditor/.venv/bin/python
"""Generate sample image
Examples:
$ python gen_sample_size_image.py -W 1280 \
--aspect 16x9 \
-BC 64,64,64 \
-FC 239,239,239 \
--ttfontname /Users/iwasakishuto/Library/Fonts/数式フォントver1.5.ttf \
@iwasakishuto
iwasakishuto / Google2slack-scheduler.gs
Created October 17, 2021 18:11
Google Calendarに登録した予定から特定のものをSlackに通知する。
/**
* @file Google カレンダーに登録されているスケジュールをSlackに通知する。
* @author Shuto Iwasaki <cabernet.rock@gmail.com>
* @copyright Shuto Iwasaki 2021
* @license MIT
*/
const prop = PropertiesService.getScriptProperties();
/** @summary 定期的に実行するトリガーのターゲットの関数 */
@iwasakishuto
iwasakishuto / VoiceConversion.py
Created September 11, 2021 16:24
Convert voice not using deeplearning.
# coding: utf-8
"""Voice conversion.
1. Install `sptk <http://sp-tk.sourceforge.net/>`
```sh
$ tar xvzf SPTK-3.11.tar.gz
$ cd SPTK-3.111
$ ./configure
$ make
$ sudo make install
@iwasakishuto
iwasakishuto / show_dining_philosophers.py
Last active July 31, 2021 09:29
Visualize the situation of "Dining Philosophers Problem" and observe the occurrence of "deadlock".
# coding: utf-8
"""[Dining Philosophers Problem]
Visualize the situation of "Dining Philosophers Problem" and observe the
occurrence of "deadlock". If you want to observe "deadlock", run this program
with the following arguments.
$ python show_dining_philosophers.py --acquiring-right-fork-interval "(4, 9)" --seed 1
"""
import argparse
import random
@iwasakishuto
iwasakishuto / unconstrained-optimization-methods.ipynb
Created July 10, 2021 08:46
Unconstrained Optimization Methods.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iwasakishuto
iwasakishuto / poetry_jupyternotebook.md
Created July 7, 2021 07:36
Run jupyter notebook using Poetry Environment.

Run jupyter notebook using Poetry Environment

$ poetry install
$ poetry shell
(.venv) $ ipython kernel install --user --name=NAME
(.venv) $ exit
# Check the configuration file.
$ jupyter kernelspec list
for package in $(cat requirements.txt); do poetry add "${package}"; done
@iwasakishuto
iwasakishuto / .commit_template
Created May 11, 2021 15:42
Commit Message Templates
# ==================== Emojis ====================
# 🎉 :tada: 初めてのコミット(Initial Commit)
# 🔖 :bookmark: バージョンタグ(Version Tag)
# ✨ :sparkles: 新機能(New Feature)
# 🐛 :bug: バグ修正(Bugfix)
# ♻️ :recycle: リファクタリング(Refactoring)
# 📚 :books: ドキュメント(Documentation)
# 🎨 :art: デザインUI/UX(Accessibility)
# 🐎 :horse: パフォーマンス(Performance)
# 🔧 :wrench: ツール(Tooling)