开源项目
🔥 virgiliojr94 / book-to-skill - Turn any technical book PDF into a Claude Code skill — ready
GitHub热门项目 | Turn any technical book PDF into a Claude Code skill — ready to study, reference, and use while you work. | Stars: 7,325 | 205 stars today | 语言: Python
开源项目
🔥 open-webui / open-webui - User-friendly AI Interface (Supports Ollama, OpenAI API, ...
GitHub热门项目 | User-friendly AI Interface (Supports Ollama, OpenAI API, ...) | Stars: 143,680 | 171 stars today | 语言: Python
开源项目
🔥 allenai / olmocr - Toolkit for linearizing PDFs for LLM datasets/training
GitHub热门项目 | Toolkit for linearizing PDFs for LLM datasets/training | Stars: 18,087 | 295 stars today | 语言: Python
AI 资讯
Bikin "Otak" AI Agent Bisa Diedit di Obsidian: Panduan Sinkronisasi Dua Arah untuk Pemula
Pernah kepikiran, "Sebenarnya AI agent saya inget apa aja sih soal saya?" Kalau iya, tulisan ini buat kamu. Masalahnya: Memori AI Itu Kotak Hitam Kalau kamu pakai AI agent yang punya memori jangka panjang (persistent memory), kamu mungkin pernah ngerasa gak nyaman karena beberapa hal ini: Gak tahu persis apa yang diingat AI tentang kamu Gak tahu file-nya disimpan di mana Gak bisa edit memori itu tanpa ngetik perintah lewat chat Takut kalau file memorinya rusak, semua informasi hilang begitu saja Studi kasus di tulisan ini pakai Hermes Agent , agent open-source besutan Nous Research. Sebagai konteks buat yang belum familiar: Hermes Agent adalah agent AI open-source yang berjalan sebagai proses (daemon) mandiri di server milikmu sendiri, mengumpulkan memori lintas sesi, menjalankan tugas terjadwal, terhubung ke belasan platform pesan, dan menulis skill-nya sendiri dari pengalaman. Framework berlisensi MIT ini dirilis Februari 2026 dan dengan cepat menarik perhatian komunitas open-source AI. Hermes menyimpan memorinya di dua file utama: USER.md (profil tentang kamu) dan MEMORY.md (catatan agent soal lingkungan kerja, kebiasaan, dan pelajaran yang dipetik), plus satu file lagi SOUL.md untuk "kepribadian" si agent. Semuanya disimpan dalam format teks polos yang dipisah pakai karakter § , seperti ini: Preferensimu: komunikasi singkat dan langsung § Namamu Budi, awal 30-an, tinggal di Surabaya § Penggemar PKM / Building a Second Brain Format ini fungsional, tapi ada beberapa kekurangan: Susah diedit langsung karena bukan format yang ramah manusia Gak ada riwayat versi — sekali salah edit, informasi bisa hilang selamanya Gak ada tampilan visual — susah lihat semua catatan sekaligus Gak ada antarmuka grafis — harus lewat chat agent atau edit file mentah Solusinya: pindahkan memori itu ke Obsidian , aplikasi catatan berbasis markdown yang mendukung riwayat versi lewat git dan bisa diedit bebas. Arsitektur Sistemnya Sistem sinkronisasi ini punya empat lapisan: ┌───────────────
AI 资讯
Python Selenium Architecture
**Python Selenium Architecture** Introduction: Selenium automates web browsers. The Python Selenium architecture consists of four main components that work together to control a browser. 1.Selenium Client Library (Python Language Binding) Python developers write automation scripts using the standard Selenium API. This library converts your Python code into a standardized format. It sends these commands as programmatic requests to the browser driver. 2.W3C WebDriver Protocol/JSON Wire Protocol This is the communication channel between the code and the driver. Historically, Selenium used the JSON Wire Protocol over HTTP. Modern Selenium (Version 4+) uses the standardized W3CWebDriver Protocol. Commands and responses are transferred directly without any middle translation. 3.Browser Drivers Every web browser has its own specific executable driver. Examples include ChromeDriver for Chrome and GeckoDriver for Firefox. The driver acts as a secure HTTP server that receives commands. It passes these requests directly to the browser and returns results. 4.Web Browsers This is the final layer where execution happens physically. Supported browsers include Google Chrome, Mozilla Firefox, Microsoft Edge, and Safari. The browser receives commands through its native OS-level API. It executes actions like clicking, typing, or fetching text. Significance of Python Virtual Environments: A Python Virtual Environment is an isolated directory containing its own Python installation and independent packages. It prevents dependency conflicts across different software projects. Conclusion: Why It Matters? Avoids Dependency Hell: Different projects can use different versions of the same library. Protects System Python: Prevents breaking system-wide packages required by your operating system. Ensures Reproducibility: Allows developers to easily recreate the exact environment on other machines. No Admin Privileges Needed: Allows installing packages without sudo or administrator rights. Real-Wo
AI 资讯
I built a "context OS" that stops AI agents from drowning in your codebase
The problem every AI coding session hits You open Claude or Copilot, paste in your task, and immediately hit the wall: the codebase is too big. You either: Dump everything and burn 80% of your context window on irrelevant files Hand-pick files and miss the one import that breaks everything Pay for a bigger context window and repeat the problem at scale I got tired of this and built ContextOS — a local CLI that acts as an intelligent context layer between your repo and your AI agent. What it does pip install rm-contextos cd your-project contextos scan contextos pack --task "add rate limiting to the auth endpoint" --budget 8000 Output: a Markdown (or JSON) context pack with only the files that matter for that task — ranked by keyword match, import graph centrality, AST symbol overlap, and git churn. Secrets redacted automatically. Token savings report on every pack: Packed 12 files · ~6,840 tokens · saved ~47,200 tokens (87%) vs full repo How ranking works Five signals combine into a score per file: Signal What it catches Keyword match Files whose content/name overlap with your task Import graph centrality Files that everything else imports (critical shared modules) AST symbol overlap Function/class names, not just grep strings Git churn score Recently modified files are probably active code Secret penalty Credential files silently excluded No LLM calls. No cloud. Fully offline. MCP server (for Claude Desktop / Claude Code) pip install "rm-contextos[mcp]" contextos serve --stdio Register in claude_desktop_config.json and your AI agent can call pack_context , scan_repo , list_files , get_file , churn_report directly as tools — no CLI needed. What's shipped 980 tests, 96% coverage Apache-2.0, no telemetry, no accounts Python 3.11–3.13, Linux + macOS Export formats: Claude, Codex, Cursor, Aider, JSON Incremental scan cache — re-scans only changed files pip install rm-contextos pip install "rm-contextos[mcp]" # + MCP server pip install "rm-contextos[all]" # everything Git
AI 资讯
从思想到工程:FROST 与 FROST-SOP 的双生之旅
从思想到工程:FROST 与 FROST-SOP 的双生之旅 你知道吗?每一个伟大的工程背后,都有一个简单而深刻的起点。 引言:从 500 行到 5000 行的演进 在开源世界里,我们见过太多"大而全"的框架——它们功能丰富,却让人望而生畏。今天我想分享一个反其道而行之的项目: FROST 。 FROST (Fractal Runtime of Orchestrated Skills & Tasks)最初只是一个 500 行的教学框架,用最朴素的代码讲述 Agent 的本质。它的核心哲学只有一句话: 细胞会死,但谱系会存续。Agent 会消亡,但宪法会传承。资产会永存。 而今天我要介绍的,是 FROST 思想"开花结果"后的工程实践—— FROST-SOP ,一个拥有 5000+ 行代码的完整 Agent 工程平台。 FROST:理解 Agent 的钥匙 FROST 不是什么复杂的框架。它的设计哲学是 最小原子集 + 分形宪法 : 四个原子,理解一切 原子 职责 生物学类比 Store 记忆容器,只做 save/load/delete 细胞核 Skill 纯能力单元,无状态无副作用 蛋白质 Agent 膜包裹的细胞,拥有 Store + Skills 神经细胞 SOP 有序步骤列表,可教学、校验、优化 宪法文本 from core import Store , Agent , skill_set , skill_get store = Store () agent = Agent ( " cell " , store , skills = { " set_context " : skill_set , " get_context " : skill_get }) result = agent . run ( sop_steps = [ " set_context " , " get_context " ], initial_context = { " key " : " message " , " value " : " FROST is alive " } ) # result["_result"] == "FROST is alive" 5 行代码,你就能理解整个 Agent 系统的运作原理。这就是 FROST 的魔力—— 用最少的代码,讲述最深的道理 。 五维元模型(V4.0/V5.0) FROST V4.0 引入的五维元模型,将框架从扁平升级为多维度 Agent 编排系统: 武器注册表 :能力的元数据管理与发现 任务注册表 :DAG 任务编排与图谱 SOP 事件编目 :态势感知与双模式事件分析 平台注册表 :外部能力的发现、调用与健康检查 规则注册表 :可版本化的治理约束与合规检查 197 个测试用例保障质量,最新 Release: FROST v5.0.0 FROST-SOP:思想的工程化 FROST 教会我们理解,FROST-SOP 教会我们构建。 事件驱动的 Agent 家族 FROST-SOP 实现了完整的 祖辈 → 父辈 → 子辈 三层递归架构: import asyncio from core.event_bus import get_async_event_bus , Event , EventType from agents.ancestor import create_ancestor from agents.parent import create_parent async def main (): bus = get_async_event_bus () # 创建事件驱动的 Agent 家族 ancestor = create_ancestor ( constitution , asset , event_driven = True ) parent = create_parent ( " parent-1 " , store , event_driven = True , asset_store = asset , sop_id = " DEV-001 " ) # 发布任务,Agent 家族自动响应 await bus . publish ( Event ( event_type = EventType . TASK_CREATED , source = " user " , data = { " task_id " : " task-001 " , " task_description " : " 开发一个用户登录功能 " } )) await asyncio . sleep ( 10 ) asyncio . run ( main ()) 完整的工程特性 特性 说明 19 个内置 Skill
AI 资讯
Web Scraping with Python in 2026: Best Libraries and Anti-Bot Strategies
Web Scraping with Python in 2026: Best Libraries and Anti-Bot Strategies Web scraping in 2026 looks very different from 2020. Sites are smarter, anti-bot systems are more aggressive, and the legal landscape has evolved. Here's what actually works now. The 2026 Scraping Landscape Challenge 2020 Solution 2026 Solution Bot detection Rotate User-Agent Fingerprint randomization + residential proxies CAPTCHAs Manual solving Turnstile/hCaptcha solvers JavaScript rendering Selenium Playwright (faster, more reliable) Rate limiting Sleep between requests Adaptive pacing + request signing IP blocking VPN rotation Residential proxy pools Best Libraries in 2026 1. Playwright (Best for JS-heavy sites) from playwright.sync_api import sync_playwright def scrape_with_playwright ( url ): with sync_playwright () as p : browser = p . chromium . launch ( headless = True ) page = browser . new_page () page . goto ( url , wait_until = " networkidle " ) data = page . query_selector_all ( " .job-item " ) results = [] for item in data : title = item . query_selector ( " h2 " ). text_content () results . append ( title ) browser . close () return results 2. httpx + Selectolax (Fast, no JS needed) import httpx from selectolax.parser import HTMLParser def scrape_static ( url ): resp = httpx . get ( url , headers = { " User-Agent " : " Mozilla/5.0 " }) tree = HTMLParser ( resp . text ) for node in tree . css ( " .listing " ): print ( node . text ()) 3. API-First Approach (Always check first!) Many sites have hidden or public APIs that make scraping unnecessary: url = " https://www.freelancer.com/api/projects/0.1/projects/active/?query=python " data = httpx . get ( url ). json () Anti-Bot Strategies That Work 1. Request Fingerprint Randomization import random def get_random_headers (): browsers = [ " Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 " , " Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 " , ] return { " User-Agent " : random . choice ( browsers ), " A
AI 资讯
How We Translate 300-Page Books Using Claude Without Hitting Token Limits
Breaking long documents into overlapping chunks, preserving context, and reassembling with FastAPI At LectuLibre, we’ve built an AI‑powered platform that translates entire books—EPUBs and PDFs—using large language models. When we first hooked up Claude’s API, we naively fed it a 300‑page PDF in one request. It failed immediately. Claude 3 Opus has a 200K token window, but a 300‑page book can easily run to 300K tokens or more. Even if we squeezed it in, the output would be truncated and the quality would degrade at the extremes of the context window. So we faced a classic long‑document problem: how do you translate a book that’s larger than the model’s context window? Here’s the real approach we ended up with, the code we wrote, and the lessons we learned. The Problem: Token Limits Are Real Claude 3 Opus and Haiku models (and most LLMs) have a maximum context length—200,000 tokens for Opus. A token is roughly ¾ of a word. A 300‑page novel with ~75,000 words translates to about 100K tokens, so it should fit, right? But translations from English to Spanish can expand by 15–20%, and the prompt instructions, system message, and the user message itself all eat into that budget. Plus, we needed to send the entire source text in every call to give the model full context. That’s not feasible. We could have tried a simple split: cut the book at arbitrary page boundaries and translate piecemeal. That fails spectacularly. Narrative breaks mid‑sentence, and phrases like “the previous chapter” lose their referents. We needed a more intelligent chunking strategy. Our Approach: Sliding Window with Overlapping Paragraphs We settled on a sliding window chunking algorithm based on paragraphs, with a generous overlap. Here’s the idea: Split the source text into paragraphs (using \n\n ). Build chunks of max_chunk_tokens (we used 180,000 to keep a safety margin), adding paragraphs one by one and counting tokens with tiktoken . When the chunk exceeds the limit, we start a new chunk but we
AI 资讯
mcpgen: Turn any OpenAPI spec into an MCP server in seconds
I got tired of manually writing MCP tools for every REST endpoint I wanted to expose to an LLM. So I automated it. mcpgen reads an OpenAPI JSON or YAML file and generates a complete, ready‑to‑run MCP server in Python. 🔧 What it does Parses OpenAPI 3.0 / 3.1 specs Creates one MCP tool per endpoint (with snake_case names) Handles auth automatically (API key, Bearer, etc.) Outputs a clean, human‑readable Python script Zero runtime surprises – just mcp and httpx 🚀 Quick start bash pip install mcpgen mcpgen my-api.json -o my-mcp-server python my-mcp-server/server.py The generated server runs over stdio – ready to plug into Claude Desktop or any MCP client. 🧪 Real‑world test Recently a contributor added an OpenAPI 3.1 fixture (Xquik API) with lookupTweet and getUser endpoints. The tool generated the correct tools, including path parameters and x-api-key auth, on the first try. All 18 tests pass. It works. 🤔 Why you might want it If you’re building LLM agents that need to interact with APIs, mcpgen eliminates the boilerplate. You don’t have to write a single @app.tool() decorator by hand. It also makes it dead simple to experiment – change your API spec, regenerate the server, and you’re done. 📦 Links GitHub: JnanaSrota/mcpgen PyPI: pip install mcpgen MIT licensed, open to contributions 🙏 Feedback If you try it with your own API spec and something breaks (or works beautifully), I’d love to hear about it. Drop a comment or open an issue. Thanks for reading!
AI 资讯
How LLMs Now Monitor and Cut Their Own Token Spend
You have seen this loop before. An agent starts a “simple” task, say scrape listings, refactor a repo, research a market, or whatever. It fails, it retries, it re-reads context, it apologizes and tries all over again. Twenty minutes in and the dashboard shows six figures of tokens and zero useful outputs or deliverables. The model did not misbehave on purpose. The orchestrator never had a hard budget gate with an ROI in mind. Skillware v0.4.0 ships a new skill for exactly that gap: monitoring/token_limiter . It lets you monitor and limit any agent’s token budget in real time — Gemini, Claude, OpenAI, DeepSeek, Ollama, custom Python loops, you name it. Same skill, same JSON, any runtime. What Skillware is in a nutshell Skillware is an open registry of installable agent capabilities . Each skill is a bundle: skill.py — deterministic Python ( execute() returns JSON) instructions.md — when the model should call the tool manifest.yaml — schema, constitution, issuer Tests and docs — shipped in the wheel You load by ID, adapt for your provider, call execute() on tool use. The model decides when , the skill decides how , predictably, every time. That split matters for budget control. You do not want the LLM guessing whether it is “allowed” to spend more tokens. You want a small, auditable function that answers: continue, warn, or stop. Meet the Token Limiter This skill is a budget gate , not a kill switch wired into OpenAI or Anthropic. After each model turn, your host loop passes cumulative usage. The skill returns one of three actions: Action Meaning CONTINUE Under the soft threshold — keep going WARN Approaching the limit (default 80%) — tighten scope FORCE_TERMINATE Hard ceiling hit — stop the loop Important nuance: the skill does not cancel API sessions or kill processes. It returns a structured decision. Your orchestrator must act on it. That is by design — Skillware skills stay portable and provider-neutral. No skill-specific API keys. No network calls. Pure Python m
开源项目
🔥 Mebus / cupp - Common User Passwords Profiler (CUPP)
GitHub热门项目 | Common User Passwords Profiler (CUPP) | Stars: 6,014 | 18 stars today | 语言: Python
开发者
Nano Banana 2 Lite with MCP, and Antigravity CLI
This article covers the MCP setup and configuration for using Google Nano Banana 2 Lite and...
AI 资讯
Why I built a CLI to automate web research instead of relying on browser tabs
A few months ago I noticed something annoying about how I worked: I was spending more time collecting information than actually thinking about it. The pattern was always the same. Open a search engine, open a dozen tabs, skim past the SEO filler and cookie banners, copy the paragraphs that actually mattered into a doc, paste the whole mess into an LLM and ask it to make sense of things. Then, a week later, do it again because whatever I was tracking had changed. At some point I stopped asking "how do I do this faster" and started asking why I was doing it by hand at all. Why the obvious answers didn't work ChatGPT and Perplexity are fine for a single question. They're worse at the part I actually needed help with, which was repetition: running the same research loop on a schedule, keeping a record of what changed, and getting a notification when it did. Neither tool is built to sit in the background and check on a topic for you. Plain scraping scripts have the opposite problem. They get you raw HTML, not understanding. You still have to strip out nav bars and footers by hand, and the moment you point one at a list-style page like Hacker News instead of a blog post, it falls apart. And bookmarking is just deferring the problem. A folder of forty saved links isn't research, it's homework you haven't done yet. I wanted something in between: automated enough to skip the tab-hoarding, but still producing something I could read and trust, not just a black-box answer. So I built Focal Harvest It's a modular CLI that runs the whole research loop, search, scrape, clean, synthesize, report, on its own, and stays lightweight enough to run on a laptop with no GPU and no database. A single run looks like this: you give it a topic and a focus area (what you specifically want answered), it searches the web, pulls and cleans the pages, synthesizes a report, and writes it to disk. There's also a loop mode, so the same query can re-run every few hours and ping you on Discord or Teleg
AI 资讯
I built a ATS resume scanner as an M.Sc. student — here's why I did it
A few months ago I was applying for jobs and stumbled across Jobscan. It looked exactly what I needed — paste your resume, paste the job description, see how well you match. Then I saw the price. $49.95/month. As a student, that's a week of groceries. I closed the tab. But the problem didn't go away. I kept wondering — why is my resume getting rejected before a human even reads it? ATS systems are filtering people out and nobody tells you why. So I built ClearScan. What it does: Scans your resume against a job description. Shows exactly which keywords you're missing. Checks ATS compatibility across 5 platforms (Workday, Taleo, Greenhouse, Lever, iCIMS). Scores your bullet points using STAR format analysis. Gives you a transparent breakdown — you can see why you got the score you did. That last part matters to me a lot. Most tools just give you a number. ClearScan shows you the math. Where it stands: Launched today. First paying customers already. Free tier gives you 2 scans/month — enough to feel the product before deciding. Pricing starts at €3.99/month. Built for students, priced for students. Live at clearscan.fyi — would genuinely love your feedback, especially from developers who've dealt with ATS hell themselves.
AI 资讯
I Replaced Image AI for Technical Diagrams with an 8-Tool Code-First Matrix
I needed faster edits for technical diagrams, and a lower recurring overhead for recurring visuals. I stopped asking for new images for everything. That change started the moment I replaced "generate now, tweak later" with a fixed 8-tool matrix. TL;DR: I moved recurring illustration work into seven scriptable stacks + one 3D stack and kept image-generation AI only as a fallback. Why I rewrote this workflow When I edited an article recently, I was spending too much time redoing the same visual shape in slightly different versions. The same chart logic should not need prompt guessing each time. I asked myself: Can this be represented as text or code? Can I regenerate it exactly when requirements change? Do I need raw design freedom, or do I need deterministic structure? If the answer was mostly "text/code + deterministic output," I did not open an image-generation model first. I also kept one practical boundary: this was not an academic tool roundup. This is a log of what I actually used and in what context. The number that changed my mind: an 8-tool decision matrix The number I now defend is exactly 8 . Instead of inventing synthetic savings, I evaluate every new illustration request against this matrix. Tool Best fit Why I pick it Mermaid flow, sequence, architecture notes fastest in markdown-native writing PlantUML UML-heavy docs strict structure when Mermaid gets too loose Markmap map-style summaries converts headings directly Graphviz dependency and direction graphs compact graph semantics matplotlib numeric visualizations source-of-truth from data tables Pillow labels, badges, annotations deterministic pixel edits in Python D3.js node/link or hierarchy interactions data-driven relationship rendering Blender 3D explanatory graphics stronger structural clarity for complex scenes This is the exact set I now reach for before any image-generation request. What happened first: practical snippets I am including small runnable snippets I can reuse. 1. Mermaid for determ
AI 资讯
Things I learned building my first multi-agent AI system on Azure + NVIDIA
I recently built a multi-agent customer support system on Azure AI Foundry and NVIDIA NIM. First time doing anything like this. Made four predictions upfront about what would happen. Three of them were wrong. Here is what I actually learned. 1. "Tokens" is not a unit of cost It is a unit of work. The price per unit of work varies by 5-10x depending on which model did the work. I was tracking total token count across both the small 9B model and the large 49B model as if they cost the same. They do not. Total tokens went up in the optimized version. Cost in dollars probably went down. I was measuring the wrong thing the whole time. 2. A verbatim hash cache on natural language traffic deflects ~0% of queries I predicted 25-40% cache deflection. The actual number was 0%. Every query in my test set was a unique string, so the hash-based cache never had a single chance to fire. A verbatim cache is not a simpler version of a semantic cache. It is a different thing entirely. If your workload is natural language, build semantic similarity caching from day one, not as an upgrade later. 3. configure_azure_monitor() does not capture OpenAI SDK calls by default You need to install and initialize opentelemetry-instrumentation-httpx explicitly: pip install opentelemetry-instrumentation-httpx==0.61b0 from opentelemetry.instrumentation.httpx import HTTPXClientInstrumentor HTTPXClientInstrumentor().instrument() Without this, your App Insights Logs will show customMetric and performanceCounter entries (CPU, memory) but nothing about what your agent actually did. 4. Pin your OpenTelemetry versions or everything breaks Installing opentelemetry-instrumentation-httpx without version pinning pulled in opentelemetry-api 1.42.1. But azure-monitor-opentelemetry-exporter needs opentelemetry-api==1.40. The conflict is silent until things start misbehaving. Pin everything to the 0.61b0 / 1.40.0 line: pip install \ "opentelemetry-api==1.40.0" \ "opentelemetry-instrumentation==0.61b0" \ "opentelem
AI 资讯
Abandoning Abstractions: Manually Crafting EtherNet/IP Packets Almost Broke Me
By RUGERO Tesla ( @404Saint ). There is a persistent illusion in Industrial Control Systems (ICS) security research: that high-level libraries, abstraction frameworks, or protocol tooling give you a real understanding of Operational Technology (OT) behavior. They don’t. They hide the architecture. Determined to understand what actually happens when a Programmable Logic Controller (PLC) receives a control-plane command, I built an EtherNet/IP and Common Industrial Protocol (CIP) sandbox from scratch. No Scapy. No protocol wrappers. Just raw sockets, a Linux loopback interface, a cpppo simulator, and a passive monitoring tool ( enip_monitor.py ) capturing traffic in real time. It looked clean on paper. Then I reached the application layer. And things stopped behaving like theory. The Reality of the “Industrial Abstraction Layer” If you come from Modbus or traditional IT networking, you’re used to linear memory spaces—fixed registers, predictable offsets, and flat addressing. EtherNet/IP and CIP discard that model entirely. Instead, they introduce a structured object system wrapped inside multiple encapsulation layers: +-----------------------------------------------------------+ | EtherNet/IP Encapsulation Header (24 bytes) | | → Session control, commands (0x0065, 0x006F) | +-----------------------------------------------------------+ | Common Packet Format (CPF) | | → Routing, addressing, and transport segmentation | +-----------------------------------------------------------+ | CIP Application Layer | | → Service codes (0x4C, 0x4D, 0x10, etc.) | +-----------------------------------------------------------+ To communicate with a PLC at the wire level, your code must: Establish a session using RegisterSession (0x0065) Wrap all subsequent requests in SendRRData (0x006F) Encode routing information inside CPF structures Construct symbolic or logical paths for the CIP Message Router Ensure strict byte alignment across nested payload layers A single mistake in any layer b
AI 资讯
Introduction to Python Module Four Part Two: Indexing
Now that you are acquainted with lists, it is time to learn a little bit more about them. Today’s post is about indexing. You are going to learn more about how indexes work in lists and how to use them in code. Indexing is a lot more than calling parts of a list you might need. Developers use indexing to double-check what value is at a specific index. This makes it very helpful when debugging lists. Lists are mutable. Mutable means that any values inside a list can be changed after it has been made. At Coding with Kids, the values in the lists the students created throughout their projects would constantly change with certain values being added, removed, or changed. How to Change a Value in a List To change a value in a list, use the list name followed by the square brackets. Inside the square brackets put the number of the index you want to change. After the closing square bracket, put the equal sign followed by the value you are changing. In the example below, I have a list called grocery_cart. When I want to replace the second value in the list, I use the index value of 1 because I’m counting the way the computer counts. I print this index value to the console to doble-check what value is at this index to see if things have changed. grocery_cart = [ " chicken " , " ground beef " , " salad mix " , " blueberries " , " tuna " ] grocery_cart [ 1 ] = " cheese " print ( grocery_cart [ 1 ]) # print cheese If you have a bunch of variables in your code, you can move information stored in variables and put them inside a list. In the example below, I have different variables with various values assigned to them. name = " Lucky " age = 15 color = " orange " If I want to turn these variables into a list, , I can create a new variable called cat. After the equal sign, I will assigned the values as list items inside the square brackets. cat = [ " Lucky " , 15 , " orange " ] Indexing with Strings Developers use indexing to select specific characters in a string. Strings are simi
开源项目
🔥 Unclecheng-li / VulnClaw - 基于 AI Agent + MCP 工具链 + 渗透 Skill 编排, 配合大语言模型, 自然语言输入 → 自动完成「
GitHub热门项目 | 基于 AI Agent + MCP 工具链 + 渗透 Skill 编排, 配合大语言模型, 自然语言输入 → 自动完成「信息收集 → 漏洞发现 → 漏洞利用 → 报告生成」全流程。 | Stars: 1,000 | 105 stars today | 语言: Python