惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
宝玉的分享
宝玉的分享
P
Proofpoint News Feed
H
Help Net Security
V
Visual Studio Blog
阮一峰的网络日志
阮一峰的网络日志
C
Cisco Blogs
人人都是产品经理
人人都是产品经理
Know Your Adversary
Know Your Adversary
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Recorded Future
Recorded Future
I
Intezer
罗磊的独立博客
T
The Exploit Database - CXSecurity.com
Blog — PlanetScale
Blog — PlanetScale
Malwarebytes
Malwarebytes
Spread Privacy
Spread Privacy
T
Tor Project blog
V
Vulnerabilities – Threatpost
云风的 BLOG
云风的 BLOG
腾讯CDC
B
Blog RSS Feed
Stack Overflow Blog
Stack Overflow Blog
F
Future of Privacy Forum
MyScale Blog
MyScale Blog
Latest news
Latest news
IT之家
IT之家
MongoDB | Blog
MongoDB | Blog
The Hacker News
The Hacker News
S
Securelist
博客园 - 【当耐特】
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threat Research - Cisco Blogs
Jina AI
Jina AI
Cisco Talos Blog
Cisco Talos Blog
B
Blog
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
M
MIT News - Artificial intelligence
V
V2EX
D
Darknet – Hacking Tools, Hacker News & Cyber Security
The Cloudflare Blog
The GitHub Blog
The GitHub Blog
博客园 - 聂微东
F
Full Disclosure
C
CERT Recently Published Vulnerability Notes

Hacker News: Show HN

Jig's Saw Puzzler by abionic Show HN: Synrix: hardware-verified memory routing for edge AI agents GitHub - bjcoombs/ai-native-toolkit: Claude Code configuration and customizations Show HN: Patchmark – LSP for reviewing code changes/diffs in text Reader view — paste a link to read distraction-free | Readplace OSINT Arena | Open Source Intelligence Challenges Two Witness Shop Show HN: From one Claude agent to a fleet – in five small steps Show HN: Canonry tracks how AI cites you – agent-first, open source Sound Test Online – Check Speakers & Headphones Slick – Fast, Private, and Reliable Search GitHub - securient/ideviewer-oss: Security scanner for developer workstations — detects IDE extension risks, AI tool permissions, plaintext secrets, and vulnerable dependencies across VS Code, Cursor, JetBrains, and more. Computer Police Show HN: Agent.email – sign up via curl, claim with a human OTP ClarityHoop | Executive Communication Mastery Show HN: Write your BPF programs in Go, not C GitHub - Userfrom1995/benchd: BenchD is a browser-based CPU benchmark that runs fully on the client. GitHub - LeoStehlik/proof-loop: Repo-local verification protocol for AI coding agents: acceptance criteria, separate verifier roles, proof artifacts, and evidence-backed done claims. Show HN: Free One-shot cloud agents with OpenCode and Daytona and Cloudflare npmfind Parseflow Segment Tree — Algorhythm GitHub - verdverm/pge-jax: Jax implementation of the PGE algorithm (Prioritized Grammar Enumeration) Show HN: GitVitae – Free hosted portfolio and resume for anyone GitHub - wavever/buildby: Detect whether desktop apps are built with Electron, Flutter, Tauri, Qt, .NET, JVM, CEF, or native code. boku — YAML task runner Show HN: Darc – grep-like memory search tool for coding agents Mixpanel Headless - Mixpanel Docs Show HN: A demo video of Effected Keyboard 2 Introducing Open Public awesome-skills/gtm-mavericks at main · conductor-oss/awesome-skills Show HN: ATM, a tiny terminal task manager for local coding agents Freenet Workspace Show HN: AI Manager Show HN: SubTrack – Find forgotten subscriptions via bank transaction scanning Show HN: We dropped Go for Rust in our real-time telephony AI media plane Show HN: I Dedicated 4 Years to Mastering Offline Password Cracking Home — Noada Show HN: I Made a Claude Skill for SDD Show HN: Twixt – transform one word into another in four moves Show HN: Daily word puzzle game based on polysemy GoKubeDownscaler: Reduce Kubernetes Costs Off-Hours GitHub - openclaw-easy/ViralMint: Open-source viral content pipeline — scout trends, analyze competitors, generate AI videos, auto-publish. AGPL-3.0. GitHub - baidu-baige/LoongForge: A modular, scalable, high-performance training framework for LLMs, VLMs, diffusion, and embodied models. Show HN: (Better) Chrome Tab Manager Show HN: SoMatic – Vision-based OS automation framework for AI agents Physics AI – Free Physics Solver Online (Step-by-Step) SUPPLYCHAIN.FAIL — Open Source Vulnerability Timeline PocketWebTools GitHub - mirshko/boatswain: A macOS menu bar app for Fathom Analytics. Keep an eye on your site stats without ever leaving your keyboard. What does your investment actually buy? — Post-Money SAFE Calculator GitHub - vipulawl/claude-tips: Customize Claude Code spinner tips with live jokes, quotes, facts, or your own content GitHub - changespec/spec: ChangeSpec: open specification for software change communication Show HN: I built a private, manual 0% balance transfer tracker 3.125-Bit LLM quantization bypassing tensor cores Medical curiosities | Thomas Morris FlutterTime ~ Timezone Planner Steam 上的 Junebug GitHub - Helvesec/rmux: Universal Rust multiplexer with a typed SDK — drive any CLI or TUI app from code. Native on Linux, macOS, and Windows. GitHub - manas15/try-on: LiveLook — Real-time virtual try-on with gesture control, powered by Decart's Lucy VTON model GitHub - vitalysim/the-knowledge-guy: Turn any PDF or EPUB into a structured Claude Code skill - then ask your whole bookshelf a single question. Gemini Omni Flash AI Video Generator | Free Online GitHub - elliotgao2/handsets: A high-performance Android control CLI, built for agents and humans GitHub - enzoferraripapa-arch/ai-vprocess-ops: Engineering memory for AI coding agents: requirements, decisions, evidence, traceability, and V-process/ALM handoff Show HN: Dokkaebi – Run your WASM backend directly on the client side Send messages beyond your lifetime SkinMax App | Your Personal Skin Care Coach GitHub - kmdupr33/fks2g: A CLI for generating LLM-backed metrics for deciding how closely to review code ISS QuietGPT - Make ChatGPT Reply Smaller GitHub - Quintisimo/macfigure: Mac configuration in pkl. Simple alternative to nix-darwin Show HN: SafeRun – Replay debugging and inline prevention for AI agents 3 GitHub - sathvikc/agent-chat-bridge: Turn any AI agent chat session into an async agent. Register a timer, shell command, or webhook — the bridge automatically resumes the session with your prompt when the trigger fires. SnapAPI - Website Screenshot & Data Extraction API Introducing @cipherstash/stack Show HN: E2E Encrypted Terminal Screen Share Windows 98½ Show HN: SafeRun – Replay debugging and inline prevention for AI agents 2 Show HN: My custom Statusline for Claude Code (Python wrapper around claudeline) GitHub - kageroumado/phosphene: A video wallpaper engine for macOS Tahoe Best Remote Jobs — Work From Home | RemoteJobs.place udoc Free AI Rewriter - Revise GitHub - arashThr/hugo-flow: Simple rich-text CMS for Hugo weblogs. Try at https://hugo.arashtaher.com GitHub - light-cloud-com/ice: Free, open-source, visual studio for cloud infrastructure for macOS, Windows & Linux. GitHub - kouhxp/yapsnap: Snap any video URL or audio file into plaintext. No GPU. No cloud. One command. What if we made SIMA2 from Temu iPhone 版“Today” - App Store Runo - Web Scraping API | Any URL to Typed JSON Show HN: AI Editor for Websites GitHub - AdamGonda/ward: Run [ npm i ] safely, audit installs inside a docker container. The Crucible — 8 voices, one verdict Screenshot 2026 05 20 at 4 03 10 PM — Postimages Show HN: Chess Puzzles, but for Developers Show HN: I built Istanbul live transit map Show HN: Agent.email – sign up via curl, claim with a human OTP GitHub - mfairley/expo-callkit-telecom: 📞 CallKit + Core-Telecom for React Native + Expo. A modern react-native-callkeep alternative. I tried 4 LLM speedup techniques on CPU. Three made it slower. Show HN: I made a tool for learning scales, chords, and how to combine them
GitHub - ghetea-patrick/filorithm: A fluent Python eDSL for high-level directory manipulation. It utilizes chainable filtering pipelines and intuitive operator overloading to replace boilerplate file system code with clean terminal-like actions.
patrick-ghet · 2026-05-22 · via Hacker News: Show HN

Filorithm is an expressive Python embedded Domain Specific Language (eDSL) designed for high-level file and folder manipulation. By utilizing operator overloading and chainable filtering interfaces, Filorithm abstracts the verbose complexities of standard libraries like os, shutil, and pathlib into clean, intuitive pipeline operations.

Abstract & Architecture

Filorithm operates on the concept of wrapping directory contents into managed collection objects (Files and Folders). Instead of executing procedural function calls, workflows are declared using fluent filter interfaces and completed using standard operators that mimic terminal actions.

The framework is split into distinct components:

  1. storage.py: The underlying engine handling safe path validation, file copy/move operations, and strict error handling.
  2. files.py / folders.py: The user-facing API containing collection wrappers and the fluent filter classes (FilterFiles, FilterFolders).
  3. file_types.py: Constant tuples grouping common extensions (e.g., CODE_INTERPRETED, DATA, IMAGES) for rapid batch processing.

Syntax Rules & Operators

Filorithm overrides standard Python operators to execute file system tasks directly on collection objects or evaluated filters:

  • >> (Right-shift): Moves items in the collection to a destination directory.
  • @ (Matmul): Copies items in the collection to a destination directory.
  • ~ (Invert / Unary tilde): Deletes all items in the collection permanently.

Pipeline Rules:

  1. Instantiating Files("dir") or Folders("dir") gathers all immediate items inside that directory.
  2. Invoking the .filter() method transitions the collection into an evaluation state.
  3. Filtering methods can be chained infinitely (e.g., .bigger_than().with_extensions()).
  4. The pipeline MUST be closed with .collect() before an operator (>>, @, ~) can be applied to the filtered subset.
  5. To directly inspect or iterate over the elements without executing a filesystem mutation (move, copy, or delete), access the raw contents via list iteration, index lookup, or by calling .collect().

API Reference & Filter Methods

Collection Initializers

  • Files(directory: str | Path, *, overwrite: bool = False)
  • Folders(directory: str | Path, *, overwrite: bool = False)

If overwrite=True, any existing file or folder at the target destination with a conflicting name will be removed before the copy or move operation executes.

Chainable Filter Pipeline

Calling .filter() exposes the following evaluation constraints:

  • Size Constraints:

    • .bigger_than(size: int, unit: SizeUnit)
    • .smaller_than(size: int, unit: SizeUnit)
    • .between_sizes(min_size: int, min_unit: SizeUnit, max_size: int, max_unit: SizeUnit)
    • Supported Units: "kb", "mb", "gb", "tb"
  • String Matching Constraints:

    • .name_startswith(prefix: str)
    • .name_endswith(suffix: str)
    • .name_contains(text: str)
    • .name_matches(regex: str | Pattern)
  • Metadata & Quantity Constraints:

    • .modified_after(dt: datetime)
    • .modified_before(dt: datetime)
    • .largest(count: int)
    • .smallest(count: int)
    • .top(count: int)
    • .last(count: int)
  • Extension Specifics (Files Only):

    • .with_extensions(extensions: Sequence[str])
    • .without_extensions(extensions: Sequence[str])

Examples

from datetime import datetime
from filorithm.files import Files
from filorithm.folders import Folders
from filorithm.file_types import CODE_INTERPRETED, IMAGES, DOCUMENTS

# ==============================================================================
# EXAMPLE 1: Basic File Migration
# ==============================================================================
# Instantly move all files out of a raw data staging folder directly into a 
# processing directory using the right-shift (>>) syntax wrapper.

Files("staging_area") >> "processing_vault"


# ==============================================================================
# EXAMPLE 2: Size Filtering and Copying Assets
# ==============================================================================
# Target a downloads folder, chain a filter to isolate only massive media files 
# exceeding 500 Megabytes, collect the result, and duplicate them using matmul (@).

Files("downloads").filter().bigger_than(500, "mb").collect() @ "external_media_drive"


# ==============================================================================
# EXAMPLE 3: Ecosystem-Driven Script and Document Sorting
# ==============================================================================
# Organize a cluttered workspace directory by routing interpreted scripts 
# (py, js, rb) to a dedicated scripts path, and documents (pdf, docx, txt) to docs.

# A. Pipeline for code scripts
Files("workspace").filter().with_extensions(CODE_INTERPRETED).collect() >> "development/scripts"

# B. Pipeline for documentation
Files("workspace").filter().with_extensions(DOCUMENTS).collect() >> "development/documentation"


# ==============================================================================
# EXAMPLE 4: In-Memory Inspection (Passive Elements Viewing)
# ==============================================================================
# Inspect metadata properties, parse index elements, or count specific assets 
# without mutating, moving, or modifying any actual items on the filesystem storage.
print("\nExecuting Example 4: Passive viewing and collection inspection...")

# Initialize target snapshot
asset_collection = Files("project_assets")

# A. String representation showing discovered files
print(f"Current collection array: {asset_collection}")

# B. Positional index access
if len(asset_collection) > 0:
    first_asset = asset_collection[0]
    print(f"Primary asset tracking path: {first_asset}")

# C. Native iteration loop
for file_item in asset_collection:
    print(f"Scanning asset metadata: {file_item.name} | Size: {file_item.stat().st_size} bytes")

# D. Compound filtered view count without execution
target_date = datetime(2026, 1, 1)
outdated_images = Files("gallery").filter().with_extensions(IMAGES).modified_before(target_date).collect()
print(f"Total legacy images matching parameters: {len(outdated_images)}")


# ==============================================================================
# EXAMPLE 5: Destructive Temporary Cache and Directory Purging
# ==============================================================================
# Safely wipe out local transient build artifact directories or old testing data 
# recursively using the unary invert (~) shortcut operator.

~Folders("local_test_environment/build_caches")