今日已更新 470 条资讯 | 累计 25550 条内容
关于我们

标签:#ia

找到 1826 篇相关文章

AI 资讯

Python Day Three – Lists, Indices, and Packing Your Virtual Backpack 🎒

Welcome back to Day 3, Python dynamic duo! 🚀 If you survived Day 2 , you now know how to create variables and throw strings, integers, floats, and booleans into their own little cardboard boxes. 📦 But what happens when you’re building a game and your character needs an inventory? Or you're making a shopping list app? Creating 50 different variables like item1, item2, item3 will make you want to throw your router out the window. 🪟💻 Today, we are leveling up our storage game. We are moving out of single cardboard boxes and packing a Virtual Backpack: Enter Lists! 🎒🎉 🎒 What is a List? In Python, a List is a data structure used to store a collection of items in one single variable. Think of it like a backpack where you can stuff multiple things inside, keep them in a specific order, and pull them out whenever you need them. Creating a list is simple. You use square brackets [] and separate your items with commas: # Packing our survival backpack 🗺️ backpack = [ " map " , " flashlight " , " water bottle " , " protein bar " ] print ( backpack ) # Prints: ['map', 'flashlight', 'water bottle', 'protein bar'] The coolest part? Python lists don’t care what you put inside. You can mix strings, integers, and booleans all in one single backpack (though usually, it makes the most sense to keep similar things together). 🤯 The First Rule of Coding Club: We Start Counting at Zero! Here is where programming turns your brain upside down. 🧠🙃 If I asked you what the first item in our backpack list is, you’d logically say "map". And you'd be right in human language. But in Python-speak, computer memory starts counting at 0. This is called Indexing. To pull a specific item out of your backpack, you write the name of the list followed by the item's position (index) inside square brackets: backpack = [ " map " , " flashlight " , " water bottle " , " protein bar " ] # Pulling out the items using their index 🔍 print ( backpack [ 0 ]) # Prints: map (The absolute first item!) print ( backpack [

2026-05-29 原文 →
AI 资讯

Gas Optimization Part 4: Solidity Tips for Cheaper Contracts

Every line of your smart contract costs something. Some lines cost more than others. In this part of our gas saving series, we’ll explore how to write smarter Solidity code that keeps your contract lean and efficient. Here are six simple and practical ways to reduce gas costs while writing Solidity smart contracts. 1. Use payable Only When Needed, But Know It Saves Gas In Solidity, a function marked payable can actually use slightly less gas than a non-payable one. Even if you're not sending ETH, the EVM skips some internal checks when the function is marked payable. See this example: function hello() external payable {} // 21,137 gas function hello2() external {} // 21,161 gas That tiny difference may not seem like much, but across thousands of calls, it adds up. Only use payable when your function is actually meant to accept ETH 2. Use unchecked for Safe Arithmetic When You’re Sure Since Solidity 0.8.0, all arithmetic operations automatically check for overflows and underflows. While this makes contracts safer, it also uses extra gas. When you're certain that overflow won't occur, you can use the unchecked keyword to skip these safety checks. uint256 public myNumber = 0; function increment() external { unchecked { myNumber++; } } Gas used: 24,347 (much cheaper than using safe math) Warning: Use unchecked carefully. Only when you're confident there's no risk of overflow. 3. Turn On the Solidity Optimizer The Solidity Optimizer is like a smart helper that cleans up and tightens your compiled bytecode. It does not change how your contract works, but it removes waste and makes it cheaper to run. If you’re using tools like Hardhat or Remix, always enable the Optimizer before deploying to mainnet. 4. Use uint256 Instead of Smaller Integers (Most of the Time) Smaller types like uint8 or uint16 might look more efficient, but they can cost more gas during execution. That’s because the EVM automatically converts them to uint256 behind the scenes. So, if you're not tightly p

2026-05-29 原文 →
AI 资讯

I integrated a local Llama 3.2 model to act as a dynamic Dungeon Master in my indie RPG.

Hey everyone, I am not trying to sell or self promote mainly just wanted to showcase a big project I've been working on ever since I started studying data science and artificial intelligence and integrating AI into workflows and using it as an augment to create things that were previously out of reach for so many people, because if used right it can become a second brain and not a crutch. I’m the solo dev behind Void Runner , an isometric ARPG/MOBA hybrid built in Python. I recently hit a wall with traditional procedural quest generation. Hand-crafting templates gets repetitive fast, and players quickly learn the patterns to these things whether you like it or not. To solve this, I built the "Void Caller AI" , a system that uses a local, quantized Llama 3.2 model to act as a dynamic Dungeon Master. Instead of just generating random flavor text, the system uses a lightweight RAG (Retrieval-Augmented Generation) pipeline. It reads live server telemetry (who died, what items were looted, which bosses were defeated recently) and weaves those actual server events into the narrative of the quests it generates. Because it runs locally via Ollama on our backend, there are no crazy cloud API costs, and latency is kept completely manageable. Here is a simplified look at how the Python backend bridges the SQLite telemetry with the Llama 3.2 prompt: import json import ollama from sqlalchemy import text from database import SessionLocal def generate_dynamic_quest(difficulty: str, target: str): db = SessionLocal() # 1. Fetch recent server telemetry for context (RAG-lite) lore_context = "" try: # Grab recent server events to weave into the narrative recent_events = db.execute(text( "SELECT username, event_type, dungeon_type FROM ai_events ORDER BY id DESC LIMIT 3" )).fetchall() if recent_events: events_str = "; ".join([f"Runner '{r[0]}' triggered a '{r[1]}' in '{r[2]}'" for r in recent_events]) lore_context = f" Incorporate this recent live server telemetry into the lore: {events_

2026-05-29 原文 →
AI 资讯

We built a public archive of AI failure patterns. The ones that keep coming back after changes.

The same AI failure should not happen twice. But it does. Teams fix it, change something small, and it returns silently. We built Agent Fail Museum to document these patterns permanently. Submit one sentence about a failure you have seen. Get a regression test draft back. Anonymous by default.If you have built any AI project that broke after a change, your failure probably fits one of the 10 known patterns already in the archive. submitted by /u/taimoorkhan10 [link] [留言]

2026-05-29 原文 →
AI 资讯

Was some of the recent anti-AI push beneficial to big corporations?

Large corporations are going to use AI regardless of what the public thinks. They have the money, lawyers, infrastructure, and data to do it. AI isn’t going away for them. But who gets hurt most when ordinary people are told not to use AI? The small business owner who can’t afford an artist to create a logo. The startup founder who can’t hire a copywriter to proofread every email. The family business that can’t pay an accountant for every tax question. The entrepreneur who can’t afford a programmer to build a website or a consultant to review a business plan. For the first time in history, a person with a good idea and a laptop can access tools that were previously reserved for companies with large budgets. I’m not saying AI is perfect. It makes mistakes, and there are legitimate concerns about its environmental impacts. But I do wonder: if AI dramatically lowers the cost of expertise, who stands to lose the most from that? The average person—or the organizations that have always had exclusive access to that expertise? Is the anti-AI push really just a push from big corporations to cut out those who stand the most to gain: small business owners? submitted by /u/Outlasttactical [link] [留言]

2026-05-29 原文 →
AI 资讯

LLM Benchmarks, Agent Frameworks, and the Tools That Matter in 2026 [03:37:09]

Hey there! If you've been keeping up with the AI space lately, you know we're in the middle of something genuinely historic. What used to be science fiction is becoming production code — and it's happening fast. The Big Shift: Agents Over Assistants For years, we've been building chatbots. Helpful little assistants that answer questions. But something changed in 2026, and honestly, it happened so quietly that most people missed it. Agents aren't chatbots. A chatbot waits for you to ask. An agent sees an objective and acts on it. Autonomously. That's the difference. And the market just woke up to it. What's Actually Happening Right Now DBS Bank + Visa's Agentic Commerce Tests In February, these giants quietly completed trials of AI-driven agents executing credit card transactions automatically. No human in the loop. No confirmation needed. Just agents doing their job. If you're thinking "That sounds risky" — yeah. But it worked. BridgeWise's AI Wealth Agent A US fintech company just unveiled an AI agent that personalizes investment portfolios at scale . Something that would take a team of human financial advisors years to do, this agent does in minutes. Microsoft's Supply Chain Agents They're operating over 100 AI agents in their own supply chain. And they're planning to equip every employee with AI support by end of 2026. The Emergence of "Freelance Agentics" This one's wild. Solopreneurs are using AI agents to do the work of 10-person teams. Legal, accounting, architecture — fields that were supposedly "too complex" for automation are getting flipped upside down by a single person + a good agent framework. Why This Matters for Developers Here's what I think is important: This isn't hype. These are real companies running real agents in production. If you're a developer in 2026 and you don't understand how to build with agents, you're going to feel left behind. Not because everyone's obsessed with them — but because they're genuinely useful . The frameworks are solid

2026-05-29 原文 →
AI 资讯

Building a Resume Download Gate: Email Collection, Signed Tokens, and an S3 Lesson

I wanted a soft gate on my resume download. Not a paywall. Just an email field — enough friction to filter bots, enough signal to know who's interested. What started as a straightforward feature turned into a three-part lesson: stateless token signing, S3 public access, and email delivery mechanics. Here's the full story. The Feature The flow I wanted: Visitor clicks "Download Resume" on the About page or Hero A modal asks for their email Backend validates the email (format + disposable domain check) A signed, time-limited link is emailed to them They click the link, the PDF opens No database tokens. No cron jobs. No permanent S3 URLs floating around. Part 1 — The Model and the Gate The Resume Model Resume follows the singleton pattern I already use for page headers — force pk=1 on every save, restrict add/delete in admin. One row, forever. class Resume ( models . Model ): pdf = models . FileField ( upload_to = " resume/ " , storage = private_resume_storage ) last_updated = models . DateField ( default = date . today ) def save ( self , * args , ** kwargs ): self . pk = 1 super (). save ( * args , ** kwargs ) ResumeDownloadRequest logs every email that requests a link — no tokens, no expiry columns, just a record of who asked and when. class ResumeDownloadRequest ( models . Model ): email = models . EmailField () created_at = models . DateTimeField ( auto_now_add = True ) unsubscribed = models . BooleanField ( default = False ) class Meta : ordering = [ " -created_at " ] The unsubscribed flag is there for a future newsletter broadcast — when a new blog post goes out, skip anyone who opted out. Blocking Disposable Emails Before signing anything, the email is checked against a frozenset of ~70 known throwaway domains: # core/validators.py DISPOSABLE_EMAIL_DOMAINS : frozenset [ str ] = frozenset ({ " mailinator.com " , " guerrillamail.com " , " yopmail.com " , " 10minutemail.com " , " trashmail.com " , # ... ~70 total }) def is_disposable_email ( email : str ) -> bool

2026-05-29 原文 →
AI 资讯

Blaming the model won't fix your workflow — a white paper on structural enforcement for AI agents

I've been working on something others might find interesting. It's under heavy development as I learn. Most AI agent setups treat the model like a better autocomplete — paste a prompt, get output, hope it's right. That works for small tasks. It falls apart when you try to use agents for sustained work across sessions: they skim specs, declare victory at 60%, burn context on noise, silently resolve ambiguity without surfacing it, and mark checklist items done without actually doing them. The failures are predictable and nameable — so I named them. This is a white paper and implementation guide for a full-stack agentic system — everything from planning through promotion under structural enforcement. It documents 24 failure modes from months of multi-agent operation and, for each, describes what actually prevents it: some through mechanical gates the agent cannot skip, some through procedural skills, and some through human supervision. The guide covers how to structure specs, plans, and verification so that agent work is evidence-led rather than vibes-led, how to use MCP capability surfaces as structural levers, and how the failure modes apply regardless of which model or vendor you use. The white paper also includes a Related Work section that positions it against the emerging industry consensus — CodeRabbit, Anthropic, Spotify, Cloudflare, OpenAI, Karpathy, Thoughtworks, and academic research all independently arrived at pieces of the same conclusions. The difference here is the integrated stack: a failure taxonomy mapped to prevention mechanisms, a three-layer enforcement architecture, and a concrete reference implementation with an orchestrator, task graphs, step verification, adversarial review, and model stratification. White paper: https://gitlab.com/naive-x/naive-artifact-coding/-/blob/main/white-paper.md Reference implementation: https://gitlab.com/naive-x/naive-artifact-coding/-/blob/main/docs/reference-implementation-guide.md Implementation guide: https://gi

2026-05-29 原文 →
AI 资讯

Ok, talvez eu pague pelo Meta Premium

Hoje eu postei sobre o Mark Zuckerberg lançar a notícia mais patética que vai cobrar 19 dólares para desbloquear o Muse Spark Pro kakakakakakaka Quem vai pagar por essa merda? Mas pensando melhor bem... Talvez eu pague Eu usei muito esse modelo como Early adopter, desde quando o motor era o Llama 3.2 e sendo inferior as outras consegui extrair escrita criativa que batia de frente com Claude em personas graças ao seu RAG no ecossistema da Meta, que tinha uma criatividade absurda quando você forçava ela a consultar as redes sociais e ver como pessoas agem e comentam, porém lançou o Muse Spark que era tipo o GPT 5.2 dos Llamas kkkkkk aí só usei para pesquisa e bem... Minha tese sobre o Muse Spark é que pra mim o problema nunca pareceu ser burrice. Parece CONTENÇÃO. Não dá vibe de modelo incapaz ou inferior. Dá vibe de modelo sendo sufocado em tempo real. Porque se você presta atenção, ele: - pesquisa rápido pra cacete (Já que cada agente pesquisa uma coisa) - alucina menos em busca (pois o modelo refina a busca dos agentes, muitas vezes consegui resultados mais confiáveis que o Gemini) - já trabalha com esquema multi-agente herdado da Manus ( o trunfo dessa IA é que diferente das outras ela não comprimi seu input, ela usa agentes para cada um pesquisar cada trecho dele, o resultado é mais completo) - acha informação boa (ela pesquisa tanto na internet quanto em grupos de Facebook ou Threads se você forçar no prompt, ou seja análises de Devs>>> Wikipédia Inclusive acredito que foi por isso que o Mark lançou o "Fórum" o app que cópia o Reddit, ele quer treinar a IA com isso, o Reddit pra mim seria a fonte perfeita pra qualquer IA se aprofundar além do que pesquisar genéricas no Google, o filha da puta do Mark é rico e filantropo e faz uma cópia só para treinar a IA dele) - conecta coisa rápido (os agentes pesquisam rápido, o modelo revisa rápido, a entrega é bem rápida e gasta bem menos tokens) Só que na hora de responder… Parece o GPT free kkkkkkk O raciocínio corta no

2026-05-29 原文 →
AI 资讯

How I built an FCA Register scraper on Apify (and why it's the B2B data gap nobody talks about)

When most people think about UK data sources to scrape, they go straight to Companies House. And they should — it's an excellent dataset. But there's a more valuable register that compliance teams, fintech sales teams, and KYC workflows desperately need, and it has zero scrapers on the Apify marketplace: the FCA Financial Services Register. The Financial Conduct Authority maintains a live register of every firm authorised to provide financial services in the UK — ~50,000 firms ranging from Barclays Bank to a one-person IFA. It includes their regulated permissions (what they're actually allowed to do), their principal address, trading names, and enforcement history. It's the data source used to verify "is this firm actually regulated?" — a check every fintech, insurance company, and compliance team runs regularly. The opportunity The FCA register has a free official REST API at register.fca.org.uk/Developer . No paid tier, no scraping needed — just register an account, get a key, and start making authenticated requests. Despite this, there was literally no Apify actor for it. The US equivalent — FINRA BrokerCheck — already has two actors with thousands of users. The UK gap was sitting there, unoccupied. The architecture This is one of the simplest actor architectures I've built — no Playwright, no Cheerio, no browser automation. Pure HTTP requests with fetch . The FCA API has a few key endpoints: GET /V0.1/Search?q={query}&type=firm — search for firms by name or keyword, returns FRNs GET /V0.1/Firm/{FRN} — fetch base details for a specific firm GET /V0.1/Firm/{FRN}/Address — registered address + phone + website GET /V0.1/Firm/{FRN}/Names — trading names and historical names GET /V0.1/Firm/{FRN}/Permissions — the full list of FCA-regulated activities All endpoints require X-Auth-Email and X-Auth-Key headers. The rate limit is ~100 requests per 60 seconds, which works out to about 25 fully-enriched firms per minute at 4 API calls each. async function fcaFetch < T > ( p

2026-05-29 原文 →
AI 资讯

Git for GitHub: How to use simple Git commands to manage a GitHub repository

Recently, I was working on creating a website on a cloud-based IDE (CodeHS). One night, I was editing, and then when I was done, I simply turned off my monitor and disabled my mouse and keyboard. Then, the next day at school, I continued to work on the website, and made significant changes. When I got home, I made more significant changes, but then realized something very important. What I realized is that when I continued to work on the project at home, the cloud-based IDE hadn't refreshed to the new code, and overwrote the work I did at school when I saved my new work. So, what is the purpose of me telling you this? Is it to say that you should always close your code editor when you're done working, or some other trick to prevent this from happening? No, it definitely is not. After the initial panic, I realized that the cloud-based IDE had a history section, which has a detailed log of every change that happened to every file. I then looked back at my old copy, copied the changes, and put them back into my new code. Now, imagine you aren't using a cloud-based IDE, and your just editing a file on your computer, in an IDE, or simply your terminal. To clarify, Git is not cloud-based, it is local, (sitting on your computer), that connects to the cloud (GitHub). What happens when something breaks? For some environments, this could be catastrophic, and make you loose a lot of work. When you make an update to a file, the last state and all the states before it are gone. But, this isn't the only thing that can happen. When you use a version control system (VCS), like Git, you can always go back to your previous commits, (snapshots of your code). The work I almost lost wasn't very important; that work didn't effect anyone, except myself. Imagine what would happen if I was working on something more important, or even just working on something for a job. Before learning how to manage your project, it helps to understand what Git actually is. Git is overwhelmingly the most po

2026-05-29 原文 →
AI 资讯

AI Adoption Issue Debugging

I was dealing with another "output not usable" issue today in our app, user left a comment saying that no matter what he does the agent returns the result in the wrong format. It took me hours to identify the mistake and AI model missed it. Curious to hear your stories about the times you shipped a feature in your AI product and it flopped. How did you figure out what was actually going wrong? What tools if any did you use? What metrics were key? submitted by /u/pauliusuza [link] [留言]

2026-05-29 原文 →
AI 资讯

Chase the next new thing or lock-in on one ecosystem?

I love all the wild updates from Anthropic, Open AI, Google, etc. And also seeing the creative stuff that mid-market AI shops are rolling out. I sometimes go through phases where I ping-pong between new tools (mostly just curiosity) but sometimes I tend to go deeper into a specific ecosystem. Right now trying to go "all-in" on Claude but I'm like a cat and Open AI is the laser pointer with new Codex updates. What have you all found works best. Go wide and test everything? Different tools for different use cases. Go deep and specialize in one ecosystem? submitted by /u/BeltwayBro [link] [留言]

2026-05-29 原文 →
AI 资讯

Adding agentic AI to an existing search app without replacing anything

A lot of agentic AI content focuses on greenfield builds. I wanted to show what it looks like when you have an existing search stack and want to supercharge it without a rewrite. Built a demo with four levels of AI adoption - from a zero-risk async suggestion bar up to a full conversational search assistant - and wrote up the architecture at each level. The whole demo took 10 hours to build. Live app included. https://arcturus-labs.com/blog/2026/01/18/incremental-adoption-of-agentic-search/ submitted by /u/Due_Ad_1318 [link] [留言]

2026-05-29 原文 →