This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# OpenAI Whisper APIを呼び出し、指定された音声ファイルから文字の書き起こしを行う。 | |
# 使い方: transcribe input.mp3 | |
# 必要モジュールのインポート | |
import sys | |
import os | |
from dotenv import load_dotenv | |
import click |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# OpenAI Moderation APIを呼び出し、標準入力からのテキストの問題発言を評価する。 | |
# 使い方: moderate < input.txt > output.txt | |
# cat input.txt | moderate > output.txt | |
# 必要モジュールのインポート | |
import sys | |
import os | |
from dotenv import load_dotenv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# DeepL API 無料版を使って標準入力からのテキストを翻訳して標準出力に出力する | |
# 使い方: deepl.py -t j < input.txt > output.txt | |
# cat input.txt | python deepl.py -t j > output.txt | |
# 必要モジュールのインポート | |
import requests | |
import sys | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function ghq-fzf() { | |
# 2024-05-25 fzfからskに変更 | |
local selected_dir=$(ghq list |fzf --query="$LBUFFER") | |
if [ -n "$selected_dir" ]; then | |
LBUFFER="cd $(ghq root)/${selected_dir}" | |
zle accept-line | |
fi | |
zle reset-prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function tree-fzf() { | |
local SELECTED_FILE=$(tree --charset=o -f | fzf --query "$LBUFFER" | tr -d '\||`|-' | xargs echo) | |
if [ -n "$SELECTED_FILE" ]; then | |
LBUFFER+="$SELECTED_FILE" | |
zle accept-line | |
fi | |
zle reset-prompt | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dein.toml by yostos | |
# Last Change:2017-12-12 18:50:00. | |
# dein本体 | |
[[plugins]] | |
repo = 'Shougo/dein.vim' | |
[[plugins]] | |
repo = 'Shougo/vimproc.vim' | |
build = 'make' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suggestion: function(data) { | |
// added by yostos | |
var published_date = new Date(Date.parse(data.published_at)); | |
var published_date_part = published_date.getFullYear() + '/' + | |
('0' + (published_date.getMonth() + 1)).slice(-2) + '/' + | |
('0' + published_date.getDate()).slice(-2) ; | |
return '<a href="{{@blog.url}}/' + published_date_part + '/' + data.slug + '"><h2>' + data.title + '</h2></a>'; | |
// end of added by yostos | |
// removed by yostos | |
//return '<a href="{{@blog.url}}/' + data.slug + '"><h2>' + data.title + '</h2></a>'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
require 'logger' | |
# @abstract このプログラムは一つのCSVを読み込み、もう一つCSVに項目の当て込みを行う | |
# プログラムのテンプレートです。 | |
# 制約事項 | |
# - エラー処理などは考慮していません | |
# - 決済のデータに重複がある場合は、以下のコード例では「売り上げ日時」を比較して | |
# 遅い方のレコードを優先し以前でデータは捨てて_います。 | |
# Duplicate Count に 読み捨てた重複レコードの件数を表示しています。 | |
# - インプットのCSVファイルは、エンコーディング Shift-JIS、改行コードはCRLFを想定 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# SlackEditを使ってみた | |
仕事でもMarkdownを使っているので、最近ますます利用場面が増えてしまいました。 [**StackEdit**](https://stackedit.io)はWebベースのMarkdownエディタでありますが、気になっていたので使ってみました。 | |
## Webベースだがローカル保存? | |
[**StackEdit**](https://stackedit.io/editor)はドキュメントをブラウザ内に保存します。つまりローカルに保存されるためオフラインでも利用できます。このあたりは、同じWebベースのMarkdownエディタながら[Draft](https://draftin.com/)などと大きくコンセプトが違うところです。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if has("gui_vimr") | |
" VimR 用の設定 | |
endif | |
if has("gui_macvim") | |
" MacVim 用の設定 | |
endif |
NewerOlder