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 mido | |
| # 利用可能なMIDI入力ポートの一覧を表示 | |
| print("利用可能なMIDI入力ポート:") | |
| ports = mido.get_input_names() | |
| for i, name in enumerate(ports): | |
| print(f"{i}: {name}") | |
| # # 適切なポート名に置き換えてください(例:"MIDI 1") | |
| port_name = mido.get_input_names()[0] |
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
| function test(){ | |
| var result = getSheetData("001"); | |
| Logger.log(result); | |
| } | |
| function doGet(e) { | |
| const keyword = (e.parameter.keyword || "").trim(); | |
| if (!keyword) { | |
| return ContentService.createTextOutput( | |
| JSON.stringify({ error: "No keyword provided" }) |
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 requests | |
| import json | |
| import flet as ft | |
| ### Google Apps ScriptのURLを指定 | |
| url="ここにGASのURL" | |
| def fetch_data(value): | |
| global url | |
| url2=url+"?keyword=" + value | |
| # Google Apps ScriptのURLを指定 |
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 flet as ft | |
| def main(page: ft.Page): | |
| page.title = "Flet Sample" | |
| name_field = ft.TextField(label="あなたの名前") | |
| greeting_text = ft.Text() | |
| def greet(e): | |
| greeting_text.value = f"Hello, {name_field.value}!" |
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
| function doGet(e) { | |
| const keyword = (e.parameter.keyword || "").trim(); | |
| if (!keyword) { | |
| return ContentService.createTextOutput( | |
| JSON.stringify({ error: "No keyword provided" }) | |
| ).setMimeType(ContentService.MimeType.JSON); | |
| } | |
| result = getSheetData(keyword); |
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 cv2 | |
| # カメラ情報を設定 | |
| username = "" | |
| password = "" | |
| ip_address = "192.168.1.2" # カメラのIPアドレス | |
| port = 80 #httpの場合、 httpsなら445 | |
| # カメラによってURLの形式は異なるため、マニュアルやメーカーの仕様書を確認(httpか、httpsか) | |
| stream_url = f"http://{username}:{password}@{ip_address}:{port}/axis-cgi/mjpg/video.cgi" |
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 requests | |
| import json | |
| from datetime import datetime, timezone | |
| from base64 import b64encode | |
| # Learning Locker LRS のエンドポイント情報 | |
| LRS_ENDPOINT = "http://localhost:8081/data/xAPI/statements" | |
| LRS_USERNAME = "xxxxxxx" | |
| LRS_PASSWORD = "xxxxxx" |
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
| // 元の標準出力を保存 | |
| PrintStream originalOut = System.out; | |
| // 出力を捕捉するためのバイト配列ストリームを作成 | |
| ByteArrayOutputStream baos = new ByteArrayOutputStream(); | |
| PrintStream newOut = new PrintStream(baos); | |
| // 標準出力を新しいストリームに変更 | |
| System.setOut(newOut); | |
| //標準出力の例 | |
| System.out.println("aaaaa") |
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 dropdown_changed(e): | |
| selected_fruit = e.control.value | |
| for option in dropdown.options: | |
| if(selected_fruit == option.key): | |
| print(option.text) //表示名 | |
| print(option.key) //値 | |
| break |
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
| { | |
| "Statement": [{ | |
| "Sid": "Stmt1330073911360", | |
| "Action": [ "dynamodb:ListTables" ], | |
| "Effect": "Allow", "Resource": [ "*" ] }, | |
| { | |
| "Sid": "Stmt1330073911361", | |
| "Action": ["dynamodb:DeleteItem", | |
| "dynamodb:GetItem", | |
| "dynamodb:PutItem", |