This file contains hidden or 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
"""カレントディレクトリの HTML ファイル一覧を表示する HTML ファイルを生成するスクリプト""" | |
import html | |
from pathlib import Path | |
def main(): | |
html_files = sorted(p.name for p in Path(".").glob("*.html")) | |
html_files = (html.escape(x) for x in html_files) |
This file contains hidden or 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
def confirm(message: str) -> bool: | |
answer = input(f"{message} [yes/No]: ").strip().lower() | |
return answer in ["y", "yes"] |
This file contains hidden or 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
<?php | |
add_action( 'init', 'themeslug_add_font_collections' ); | |
/** | |
* フォントコレクションを追加する | |
*/ | |
function themeslug_add_font_collections() { | |
// フォントファミリーの定義: |
This file contains hidden or 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
<?php | |
add_filter( 'upload_dir', 'themeslug_upload_dir' ); | |
/** | |
* Use user ids as subfolders for uploaded media files. | |
*/ | |
function themeslug_upload_dir( $uploads ) { | |
$user_id = get_current_user_id() ?: 'anonymous'; |
This file contains hidden or 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
<?php | |
add_action( 'init', function () { | |
register_meta( | |
'post', | |
'book-genre', | |
[ | |
'show_in_rest' => true, | |
'single' => true, |
This file contains hidden or 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
# syntax=docker/dockerfile:1 | |
FROM debian:bookworm | |
RUN <<EOT | |
apt-get update | |
apt-get install -y --no-install-recommends \ | |
ffmpeg \ | |
> /dev/null | |
rm -rf /var/lib/apt/lists/* | |
EOT |
This file contains hidden or 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
9458 | ・ | |
---|---|---|
11972 | ー | |
15024 | し | |
15682 | は | |
16073 | ン | |
16144 | の | |
16449 | ・・ | |
16556 | で | |
16995 | い | |
17129 | ま |
This file contains hidden or 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
3022 | ー | |
---|---|---|
3385 | の | |
3826 | い | |
3829 | し | |
4025 | ン | |
4156 | ・ | |
4344 | で | |
4868 | す | |
5042 | ま | |
5205 | は |
This file contains hidden or 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
"""Change multiple OpenAI Assistants' models""" | |
import click | |
from openai import OpenAI | |
EXCLUDED_IDS = [] | |
MODELS_MAP = { | |
"gpt-4-turbo-preview": "gpt-4o", | |
"gpt-4-turbo": "gpt-4o", |
NewerOlder