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 thumby | |
| # 変数を初期化 | |
| counter = 0 | |
| is_down_a = False | |
| is_down_b = False | |
| # フォントの設定 | |
| thumby.display.setFont("/lib/font8x8.bin", 8, 8, 1) |
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::collections::BTreeMap; | |
| use std::collections::HashMap; | |
| /// 候補の最大件数 --- (※1) | |
| const MAX_RESULTS: usize = 50; | |
| /// トライ木のノード --- (※2) | |
| #[derive(Default)] | |
| struct Node { | |
| /// 次の1文字 → 子ノード |
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 thumby | |
| import random | |
| import time | |
| # 描画フォントの設定 | |
| FW, FH = 5, 7 | |
| thumby.display.setFont("/lib/font5x7.bin", FW, FH, 1) | |
| # FPSを指定 | |
| thumby.display.setFPS(8) |
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 time | |
| import thumby | |
| import random | |
| # 定数の定義 | |
| DISP_W = thumby.display.width # 72 | |
| DISP_H = thumby.display.height # 40 | |
| # セルのサイズと個数を定義 | |
| CW, CH = 3, 3 | |
| COLS,ROWS = DISP_W // CW, DISP_H // CH |
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 python | |
| """ CLIでタスクを管理するプログラム """ | |
| from datetime import datetime, timedelta | |
| import re | |
| import typer | |
| from rich.console import Console | |
| from rich.table import Table | |
| from storage import load_tasks, save_tasks |
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
| // Excelファイル(xlsx/xls/ods等)をシートごとにCSVへ変換するCLIツール | |
| use calamine::{open_workbook_auto, Data, Range, Reader}; | |
| use std::env; | |
| use std::fs::File; | |
| use std::io::{BufWriter, Write}; | |
| use std::path::Path; | |
| // メイン処理 --- (*1) | |
| fn main() { | |
| // コマンドライン引数を取得する --- (*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
| #!/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" # ★要変更 - 送信したいファイル |
NewerOlder