personal memory agent
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

style: apply black formatting to observe and think modules

Format code in observe/ and think/ modules to comply with Black style
guidelines. Changes include proper line length handling, import spacing,
and multi-line string formatting. No functional changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

+17 -7
+6 -4
observe/describe.py
··· 438 438 ssim_map = np.pad(ssim_map, ((0, pad_h), (0, pad_w)), mode="edge") 439 439 440 440 # 5) Vectorized block mean pooling 441 - block_means = ssim_map.reshape(rows, block_size_down, cols, block_size_down).mean( 442 - axis=(1, 3) 443 - ) 441 + block_means = ssim_map.reshape( 442 + rows, block_size_down, cols, block_size_down 443 + ).mean(axis=(1, 3)) 444 444 changed = (block_means < ssim_threshold).tolist() 445 445 446 446 # 6) Reuse existing grouping and boxing logic (uses original dimensions) ··· 953 953 954 954 period = period_key(video_path.stem) 955 955 if period is None: 956 - parser.error(f"Invalid video filename: {video_path.stem} (must start with HHMMSS)") 956 + parser.error( 957 + f"Invalid video filename: {video_path.stem} (must start with HHMMSS)" 958 + ) 957 959 period_dir = video_path.parent / period 958 960 period_dir.mkdir(exist_ok=True) 959 961 output_path = period_dir / "screen.jsonl"
+4 -1
observe/transcribe.py
··· 503 503 # Add audio file reference to metadata 504 504 # Path is relative to the JSONL file (both in same period directory) 505 505 from observe.utils import extract_descriptive_suffix 506 + 506 507 suffix = extract_descriptive_suffix(raw_path.stem) 507 508 metadata["raw"] = f"{suffix}.flac" 508 509 ··· 538 539 539 540 # Check if already processed 540 541 if mic_json_path.exists() and sys_json_path.exists(): 541 - logging.info(f"Already processed (split), moving to timestamp dir: {raw_path}") 542 + logging.info( 543 + f"Already processed (split), moving to timestamp dir: {raw_path}" 544 + ) 542 545 self._move_to_period(raw_path) 543 546 return 544 547
+4 -1
observe/utils.py
··· 11 11 import av 12 12 import numpy as np 13 13 from skimage.metrics import structural_similarity as ssim 14 + 14 15 from think.utils import period_key 15 16 16 17 logger = logging.getLogger(__name__) ··· 51 52 # Filename format: HHMMSS[_LEN][_descriptive_text...] 52 53 # First part must be 6-digit timestamp 53 54 if not parts or not parts[0].isdigit() or len(parts[0]) != 6: 54 - raise ValueError(f"Invalid filename format: {filename} (must start with HHMMSS)") 55 + raise ValueError( 56 + f"Invalid filename format: {filename} (must start with HHMMSS)" 57 + ) 55 58 56 59 # Check if second part is numeric duration suffix 57 60 if len(parts) >= 2 and parts[1].isdigit():
+3 -1
think/callosum.py
··· 226 226 line = json.dumps(msg) + "\n" 227 227 sock.sendall(line.encode("utf-8")) 228 228 except Exception as e: 229 - logger.info(f"Send {e} for {msg.get('tract')}/{msg.get('event')}") 229 + logger.info( 230 + f"Send {e} for {msg.get('tract')}/{msg.get('event')}" 231 + ) 230 232 try: 231 233 sock.close() 232 234 except Exception: