From 2839c42d5235ae73c6256ab9d58524a08b993cf4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 18:05:44 +0000 Subject: [PATCH 1/6] Bump ccxt from 4.5.30 to 4.5.31 Bumps [ccxt](https://github.com/ccxt/ccxt) from 4.5.30 to 4.5.31. - [Release notes](https://github.com/ccxt/ccxt/releases) - [Commits](https://github.com/ccxt/ccxt/compare/v4.5.30...v4.5.31) --- updated-dependencies: - dependency-name: ccxt dependency-version: 4.5.31 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements_with_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index fefa2acb8b2..5fdcba63e65 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -81,7 +81,7 @@ Unidecode==1.4.0 Ball==0.2.9 pynput==1.8.1 gTTS==2.5.4 -ccxt==4.5.30 +ccxt==4.5.31 fitz==0.0.1.dev2 fastapi==0.128.0 Django==6.0 From 24b8623f70d3e725456d109ae3c9ed7434470c19 Mon Sep 17 00:00:00 2001 From: Harsh Date: Wed, 7 Jan 2026 14:08:14 +0530 Subject: [PATCH 2/6] Update tic tac toe game --- tic-tac-toe.py | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 tic-tac-toe.py diff --git a/tic-tac-toe.py b/tic-tac-toe.py new file mode 100644 index 00000000000..30bc1c68ed8 --- /dev/null +++ b/tic-tac-toe.py @@ -0,0 +1,63 @@ +# Tic Tac Toe Game in Python + +board = [" " for _ in range(9)] + +def print_board(): + print() + print(f" {board[0]} | {board[1]} | {board[2]} ") + print("---|---|---") + print(f" {board[3]} | {board[4]} | {board[5]} ") + print("---|---|---") + print(f" {board[6]} | {board[7]} | {board[8]} ") + print() + +def check_winner(player): + win_conditions = [ + [0,1,2], [3,4,5], [6,7,8], # rows + [0,3,6], [1,4,7], [2,5,8], # columns + [0,4,8], [2,4,6] # diagonals + ] + for condition in win_conditions: + if all(board[i] == player for i in condition): + return True + return False + +def is_draw(): + return " " not in board + +current_player = "X" + +print("Welcome to Tic Tac Toe!") +print("Positions are numbered 1 to 9 as shown below:") +print(""" + 1 | 2 | 3 +---|---|--- + 4 | 5 | 6 +---|---|--- + 7 | 8 | 9 +""") + +while True: + print_board() + try: + move = int(input(f"Player {current_player}, choose position (1-9): ")) - 1 + if board[move] != " ": + print("That position is already taken. Try again.") + continue + except (ValueError, IndexError): + print("Invalid input. Enter a number between 1 and 9.") + continue + + board[move] = current_player + + if check_winner(current_player): + print_board() + print(f"🎉 Player {current_player} wins!") + break + + if is_draw(): + print_board() + print("🤝 It's a draw!") + break + + current_player = "O" if current_player == "X" else "X" From e1a1dfc2f4449e04bc630b0a2a03339306e4f8bf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 17:59:35 +0000 Subject: [PATCH 3/6] Bump urllib3 from 2.6.2 to 2.6.3 Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.2 to 2.6.3. - [Release notes](https://github.com/urllib3/urllib3/releases) - [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst) - [Commits](https://github.com/urllib3/urllib3/compare/2.6.2...2.6.3) --- updated-dependencies: - dependency-name: urllib3 dependency-version: 2.6.3 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements_with_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 5fdcba63e65..450d05a39f2 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -56,7 +56,7 @@ openpyxl==3.1.2 pytesseract==0.3.13 requests-mock==1.12.1 pyglet==2.1.11 -urllib3==2.6.2 +urllib3==2.6.3 thirdai==0.9.33 google-api-python-client==2.187.0 sound==0.1.0 From 3ac0936e0541bf67d355faa1252f90e661e1b379 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 12 Jan 2026 22:24:01 +0000 Subject: [PATCH 4/6] Bump twilio from 9.9.0 to 9.9.1 Bumps [twilio](https://github.com/twilio/twilio-python) from 9.9.0 to 9.9.1. - [Release notes](https://github.com/twilio/twilio-python/releases) - [Changelog](https://github.com/twilio/twilio-python/blob/main/CHANGES.md) - [Commits](https://github.com/twilio/twilio-python/compare/9.9.0...9.9.1) --- updated-dependencies: - dependency-name: twilio dependency-version: 9.9.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements_with_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 450d05a39f2..c680c2f3a4b 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -28,7 +28,7 @@ requests==2.32.5 quo==2023.5.1 PyPDF2==3.0.1 pyserial==3.5 -twilio==9.9.0 +twilio==9.9.1 tabula==1.0.5 nltk==3.9.2 Pillow==12.1.0 From 9a57f31e00e3c3e3ecf06e16b401e60f2ea7025b Mon Sep 17 00:00:00 2001 From: Ivan Costa Neto <124218369+StarStrucken@users.noreply.github.com> Date: Tue, 13 Jan 2026 15:42:28 -0700 Subject: [PATCH 5/6] Refactor comments and add author details Updated comments for clarity and added author information. --- photo_timestamp_renamer.py | 199 +++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 photo_timestamp_renamer.py diff --git a/photo_timestamp_renamer.py b/photo_timestamp_renamer.py new file mode 100644 index 00000000000..ba5df2ed9f1 --- /dev/null +++ b/photo_timestamp_renamer.py @@ -0,0 +1,199 @@ +#!/usr/bin/env python3 +""" +Author: Ivan Costa Neto +Date: 13-01-26 + +Auto-rename photos by timestamp, so you can organize those vacation trip photos!! + +Name format: YYYY-MM-DD_HH-MM-SS[_NN].ext + +Uses EXIF DateTimeOriginal when available (best for JPEG), +otherwise falls back to file modified time, + +i.e. + python rename_photos.py ~/Pictures/Trip --dry-run + python rename_photos.py ~/Pictures/Trip --recursive + python rename_photos.py . --prefix Japan --recursive +""" + +from __future__ import annotations +import argparse +from dataclasses import dataclass +from datetime import datetime +from pathlib import Path +import re +import sys + +SUPPORTED_EXTS = {".jpg", ".jpeg", ".png", ".heic", ".webp", ".tif", ".tiff"} + +# EXIF support is optional (w\ Pillow) +try: + from PIL import Image, ExifTags # type: ignore + PIL_OK = True +except Exception: + PIL_OK = False + + +def is_photo(p: Path) -> bool: + return p.is_file() and p.suffix.lower() in SUPPORTED_EXTS + + +def sanitize_prefix(s: str) -> str: + s = s.strip() + if not s: + return "" + s = re.sub(r"[^\w\-]+", "_", s) + return s[:50] + + +def exif_datetime_original(path: Path) -> datetime | None: + """ + Try to read EXIF DateTimeOriginal/DateTime from image. + Returns None if unavailable. + """ + if not PIL_OK: + return None + try: + img = Image.open(path) + exif = img.getexif() + if not exif: + return None + + # map EXIF tag ids -> names + tag_map = {} + for k, v in ExifTags.TAGS.items(): + tag_map[k] = v + + # common EXIF datetime tags + dto = None + dt = None + for tag_id, value in exif.items(): + name = tag_map.get(tag_id) + if name == "DateTimeOriginal": + dto = value + elif name == "DateTime": + dt = value + + raw = dto or dt + if not raw: + return None + + # EXIF datetime format: "YYYY:MM:DD HH:MM:SS" + raw = str(raw).strip() + return datetime.strptime(raw, "%Y:%m:%d %H:%M:%S") + except Exception: + return None + + +def file_mtime(path: Path) -> datetime: + return datetime.fromtimestamp(path.stat().st_mtime) + + +def unique_name(dest_dir: Path, base: str, ext: str) -> Path: + """ + If base.ext exists, append _01, _02, ... + """ + cand = dest_dir / f"{base}{ext}" + if not cand.exists(): + return cand + i = 1 + while True: + cand = dest_dir / f"{base}_{i:02d}{ext}" + if not cand.exists(): + return cand + i += 1 + + +@dataclass +class Options: + folder: Path + recursive: bool + dry_run: bool + prefix: str + keep_original: bool # if true, don't rename if it already matches our format + + +def already_formatted(name: str) -> bool: + # matches: YYYY-MM-DD_HH-MM-SS or with prefix and/or _NN + pattern = r"^(?:[A-Za-z0-9_]+_)?\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}(?:_\d{2})?$" + return re.match(pattern, Path(name).stem) is not None + + +def gather_photos(folder: Path, recursive: bool) -> list[Path]: + if recursive: + return [p for p in folder.rglob("*") if is_photo(p)] + return [p for p in folder.iterdir() if is_photo(p)] + + +def rename_photos(opts: Options) -> int: + photos = gather_photos(opts.folder, opts.recursive) + photos.sort() + + if not photos: + print("No supported photo files found.") + return 0 + + if opts.prefix: + pref = sanitize_prefix(opts.prefix) + else: + pref = "" + + renamed = 0 + for p in photos: + if opts.keep_original and already_formatted(p.name): + continue + + dt = exif_datetime_original(p) or file_mtime(p) + base = dt.strftime("%Y-%m-%d_%H-%M-%S") + if pref: + base = f"{pref}_{base}" + + dest = unique_name(p.parent, base, p.suffix.lower()) + + if dest.name == p.name: + continue + + if opts.dry_run: + print(f"[DRY] {p.relative_to(opts.folder)} -> {dest.name}") + else: + p.rename(dest) + print(f"[OK ] {p.relative_to(opts.folder)} -> {dest.name}") + renamed += 1 + + if not opts.dry_run: + print(f"\nDone. Renamed {renamed} file(s).") + return renamed + + +def main(argv: list[str]) -> int: + ap = argparse.ArgumentParser(description="Auto-rename photos using EXIF date (or file modified time).") + ap.add_argument("folder", help="Folder containing photos") + ap.add_argument("--recursive", action="store_true", help="Process subfolders too") + ap.add_argument("--dry-run", action="store_true", help="Preview changes without renaming") + ap.add_argument("--prefix", default="", help="Optional prefix (e.g., Japan, RWTH, Trip)") + ap.add_argument("--keep-original", action="store_true", + help="Skip files that already match YYYY-MM-DD_HH-MM-SS naming") + args = ap.parse_args(argv) + + folder = Path(args.folder).expanduser() + if not folder.exists() or not folder.is_dir(): + print(f"Not a directory: {folder}", file=sys.stderr) + return 2 + + if not PIL_OK: + print("[Note] Pillow not installed; EXIF dates won't be read (mtime fallback only).") + print(" Install for best results: pip install pillow") + + opts = Options( + folder=folder, + recursive=args.recursive, + dry_run=args.dry_run, + prefix=args.prefix, + keep_original=args.keep_original, + ) + rename_photos(opts) + return 0 + + +if __name__ == "__main__": + raise SystemExit(main(sys.argv[1:])) From fbb488882201b85162be93bccad3361175471014 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 18:13:13 +0000 Subject: [PATCH 6/6] Bump keras from 3.13.0 to 3.13.1 Bumps [keras](https://github.com/keras-team/keras) from 3.13.0 to 3.13.1. - [Release notes](https://github.com/keras-team/keras/releases) - [Commits](https://github.com/keras-team/keras/compare/v3.13.0...v3.13.1) --- updated-dependencies: - dependency-name: keras dependency-version: 3.13.1 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- requirements_with_versions.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index c680c2f3a4b..9d19efc12d4 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -41,7 +41,7 @@ tornado==6.5.4 obs==0.0.0 todo==0.1 oauth2client==4.1.3 -keras==3.13.0 +keras==3.13.1 pymongo==4.15.5 playsound==1.3.0 pyttsx3==2.99