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
| #!/usr/bin/env python3 | |
| import os | |
| import subprocess | |
| import sys | |
| from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit | |
| import requests | |
| from dotenv import load_dotenv | |
| load_dotenv() # .envファイルを読み込む |
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
| #!/usr/bin/env python3 | |
| import os | |
| import subprocess | |
| import sys | |
| import requests | |
| from dotenv import load_dotenv | |
| load_dotenv() # .envファイルを読み込む | |
| PHOTO_PATH = "photo.jpg" |
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
| """DropboxからファイルをダウンロードしてGmailで送信""" | |
| import os | |
| import dropbox | |
| import smtplib | |
| from email.message import EmailMessage | |
| import sys | |
| # 定数の設定 --- (※1) | |
| MAIL_TO = "example@example.com" # ★要変更 - メールを送信する宛先を指定 |
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
| """DropboxからファイルをダウンロードしてGmailで送信""" | |
| import os | |
| import dropbox | |
| import smtplib | |
| from email.message import EmailMessage | |
| import sys | |
| # 定数の設定 --- (※1) | |
| MAIL_TO = "mailto@example.com" # ★要変更 - メールを送信する宛先を指定 | |
| DROPBOX_FILE = "/売上データ.xlsx" # ★要変更 - 送信したいファイル |
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 os | |
| from queue import Queue | |
| import TkEasyGUI as eg | |
| from litellm import completion | |
| # 複数のモデルを指定 --- (*1) | |
| models = [ | |
| "openrouter/openai/gpt-5-mini", | |
| "openrouter/anthropic/claude-3-haiku", | |
| "openrouter/google/gemini-2.5-flash" |
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
| // 単方向リストのノード構造体 --- (*1) | |
| #[derive(Debug)] | |
| struct Node { | |
| value: String, | |
| next: Option<Box<Node>>, | |
| } | |
| impl Node { | |
| // ノードを作成する関数 --- (*3) | |
| fn new(value: &str) -> Self { | |
| Node { |
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
| #include <stdbool.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| // 単方向リストのノード構造体 --- (*1) | |
| typedef struct Node { | |
| char *value; | |
| struct Node *next; | |
| } Node; |
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
| """ZIPファイルの中身を検査するスクリプト""" | |
| import sys | |
| import zipfile | |
| def main(path_input_zip): | |
| """メイン処理""" | |
| # 出力ファイル名を決定 --- (※1) | |
| path_output_zip = path_input_zip + ".fixed.zip" | |
| with zipfile.ZipFile(path_input_zip, 'r') as zin: | |
| with zipfile.ZipFile(path_output_zip, 'w', zipfile.ZIP_DEFLATED) as zout: |
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
| use std::fs::File; | |
| use std::io::{BufRead, BufReader}; | |
| use std::error::Error; | |
| fn main() -> Result<(), Box<dyn Error>> { | |
| // 対象CSVファイルを開いてバッファ付きリーダーで巻き取る --- (*1) | |
| let file = File::open("utf_ken_all.csv")?; | |
| let reader = BufReader::new(file); | |
| // 住所カナや郵便番号・住所を一時保存する構造体を蓄積 --- (*2) |
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
| """ 太陽フレア情報を画像で配信するWebサーバー """ | |
| from datetime import datetime, timedelta | |
| from io import BytesIO | |
| from pathlib import Path | |
| import requests | |
| from PIL import Image, ImageDraw, ImageFont | |
| from flask import Flask, send_file, redirect | |
| # NASA API キー (以下を書き換えてください) --- (*1) | |
| NASA_API_KEY = "DEMO_KEY" |
NewerOlder