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
| # クライアントプログラム | |
| import socket | |
| # IPv4, TCPの場合 | |
| client_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| # サーバーに接続 | |
| client_socket.connect(("localhost", 9600)) | |
| while 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
| # ディレクトリ作成からgit init、VSCodeを開くところまでを自動化 | |
| # `Write-Output $PROFILE` で出てきたファイルに書き込めば使えるはず | |
| function Initer() { | |
| param( | |
| [Parameter(Position = 0)] | |
| $DirName | |
| ) | |
| New-Item $DirName | Set-Location | |
| git init | |
| # 次の行の`code .`を書き換えれば好きなコードディタを起動できる |
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
| import random | |
| import time | |
| def main(): | |
| length = int(input("length: ")) | |
| sort_list = [i for i in range(1, length + 1)] | |
| c = 0 | |
| start_time = time.time() | |
| while 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
| # MIDIファイルを読み込んで、音階とミリ秒のリストを返すプログラム | |
| # MIT License | |
| # © 2024 Kur0den0010 | |
| # https://mit-license.org/ | |
| import mido | |
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
| """ | |
| Clipboard-Image-Uploader | |
| クリップボードの画像をMisskeyにアップロードするプログラム | |
| --- | |
| MIT License | |
| Copyright © 2023 Kur0den0010 |
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
| import logging | |
| logging.basicConfig( | |
| format="%(asctime)s %(name)s - %(levelname)s: %(message)s", # 出力のフォーマット | |
| datefmt="[%Y-%m-%dT%H:%M:%S%z]", # 時間(asctime)のフォーマット | |
| level=logging.DEBUG, # ここで出力するログレベルを設定できる | |
| ) | |
| log = logging.getLogger("main") # なんか指定するやつ | |
| log.debug("debug") # レベル: Debug | |
| log.info("info") # レベル: info |
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
| import urllib.parse | |
| import pyperclip | |
| import plyer | |
| import base64 | |
| import argparse | |
| parser = argparse.ArgumentParser() | |
| parser.add_argument("--baka", help="ba-ka", action="store_true") | |
| parser.add_argument("--url", help="Decodes url-encoded text", action="store_true") | |
| parser.add_argument("--b64", help="Decodes base-64-encoded text", action="store_true") |