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

标签:#an

找到 1709 篇相关文章

AI 资讯

I built a word puzzle RPG where you swipe letters to attack enemies — 2+ years solo, now live on Android

I just launched Kotobato on Google Play after about two and a half years of solo development. It's a word puzzle RPG — you swipe connected letters on a board to form words, and those words become attacks. Longer words deal more damage. Rarer words hit harder. I want to share what I built, why I built it this way, and what surprised me most during development. The core mechanic The board is a grid of letters. You swipe a path through connected letters to form a word. When you submit the word, it becomes an attack against the enemy. The twist: word length isn't the only thing that matters . The game has six elemental types — Animal, Nature, Knowledge, Food, Life, and Fantasy — and each word is categorized into one of these elements. Enemies have elemental weaknesses, so the right word beats a long word if you're hitting a weakness. This created an interesting design problem. In most word games, you're just maximizing point value. In Kotobato, you're making tactical choices: do I use a short word that hits a weakness, or a long word that deals raw damage? Why hiragana and English both work The game runs in both Japanese (hiragana) and English. This wasn't a late addition — it was part of the original design. Japanese hiragana is a syllabic script with 46 base characters. Because each character represents a whole syllable rather than a single phoneme, even short hiragana words feel phonetically "weighty." A 4-character hiragana word might correspond to an 8-letter English word in spoken syllables. This means the game feels different in each language — not just translated, but genuinely different. Japanese mode rewards knowledge of vocabulary that uses phonetically distinctive combinations. English mode rewards knowledge of unusual high-value words (think quixotic , ephemeral ). What I actually built 100-floor tower with escalating bosses, including historical Japanese figures like Oda Nobunaga and Toyotomi Hideyoshi Gacha character system — collectible characters with d

2026-06-07 原文 →
AI 资讯

How Excel is Used in Real-World Data Analysis

Introduction In today's fast-paced business environments, data is considered the cornerstone of decision-making, policy formulation, and other organizational needs. MS Excel is a robust spreadsheet developed by Microsoft for organizing, analyzing, and visualizing data in rows and columns. In the data science and analytics domain, MS Excel is critical for analyzing and managing data to generate insights that enhance decision-making. Excel's polarity is characterized by its ease of use, flexibility, automation, and visualization. Ways Excel Is Used in Real-World Data Analysis Across the data science and analytics domain, MS Excel is frequently employed in the following ways; a) Data Cleaning and Preprocessing At the beginning of every data science and analytics project, data cleaning is required, and MS Excel is the primary tool. Typical Excel features and functions applied during data cleaning include Text to Columns, Remove Duplicates, Find and Replace, and Power Query. b) Exploratory Data Analysis Before performing data science and analytics activities, it is crucial to understand the dataset at hand, its structure, and trends. MS Excel features Pivot Tables, Pivot Charts, and Slicers that provide instant aggregation, sorting, and visualizations. c) Data Analysis and Reporting Modern organizations and businesses operate based on insights generated from data. MS Excel features such as pivot tables, charts, and conditional formatting help data analysts analyze and visualize data for clear, actionable insights that enhance decision-making. MS Excel Features or Formulas The typical MS Excel features and formulas employed in the data science and analytics domain include the following. Data Cleaning Functions Function Purpose Example Result UPPER() Converts text to uppercase =UPPER("john") JOHN LOWER() Converts text to lowercase =LOWER("JOHN") john PROPER() Capitalizes the first letter of each word =PROPER("john doe") John Doe TRIM() Removes extra spaces from text =TRIM(

2026-06-06 原文 →
AI 资讯

From ThreadPoolExecutor to httpx AsyncClient: True Async Refactoring

Published on : 2026-06-06 Reading time : 6 min Tags : #python #async #performance #optimization The Problem: Fake Async The supabase-async library claimed to be async but actually wrapped synchronous calls with ThreadPoolExecutor: # ❌ Fake async (old code) class SupabaseAsync : def __init__ ( self ): self . _executor = ThreadPoolExecutor ( max_workers = 3 ) async def select ( self , table : str ): loop = asyncio . get_event_loop () r = await loop . run_in_executor ( self . _executor , lambda : requests . get ( url ) # Sync call wrapped as async ) return r . json () Problems : Max 3 concurrent requests (not scalable) Thread overhead per request High memory usage No connection pooling Solution: httpx AsyncClient Use true async HTTP with httpx: # ✅ Real async (new code) import httpx class SupabaseAsync : def __init__ ( self ): self . _client : Optional [ httpx . AsyncClient ] = None async def _get_client ( self ) -> httpx . AsyncClient : if self . _client is None : self . _client = httpx . AsyncClient ( headers = self . _headers , timeout = 30 , limits = httpx . Limits ( max_connections = 10 ) ) return self . _client async def select ( self , table : str ): client = await self . _get_client () r = await client . get ( f " { self . _base } / { table } " ) r . raise_for_status () return r . json () Performance Gains Metric ThreadPoolExecutor(3) httpx(10) Max concurrent 3 requests 10 requests Avg response 450ms 150ms Memory usage 250MB 180MB Throughput 6.7 req/s 20 req/s Real benchmark : 100 concurrent requests ThreadPoolExecutor: 15 seconds httpx AsyncClient: 5 seconds 3x faster ⚡ Migration Steps 1. Client Initialization with Lazy Loading async def _get_client ( self ) -> httpx . AsyncClient : if self . _client is None : self . _client = httpx . AsyncClient ( headers = self . _headers , timeout = 30 , limits = httpx . Limits ( max_connections = 10 , max_keepalive_connections = 5 ) ) return self . _client 2. HTTP Methods (GET, POST, etc.) async def _request ( self , metho

2026-06-06 原文 →
AI 资讯

supabase-async: ThreadPoolExecutor에서 httpx AsyncClient로 리팩토링

Published on : 2026-06-06 Reading time : 6 min Tags : #python #async #performance #optimization 문제: 거짓 비동기 supabase-async 라이브러리는 이름은 async이지만, 실제로는 ThreadPoolExecutor로 동기 호출을 래핑하고 있었습니다. # ❌ 거짓 비동기 (기존 코드) class SupabaseAsync : def __init__ ( self ): self . _executor = ThreadPoolExecutor ( max_workers = 3 ) async def select ( self , table : str ): loop = asyncio . get_event_loop () r = await loop . run_in_executor ( self . _executor , lambda : requests . get ( url ) # 동기 호출을 async로 포장 ) return r . json () 문제점 : 최대 3개 동시 요청만 가능 (동시성 부족) 스레드 오버헤드 (각 요청마다 스레드 생성) 높은 메모리 사용량 해결책: httpx AsyncClient 진정한 비동기 HTTP 클라이언트인 httpx를 사용합니다. # ✅ 진정한 비동기 (수정된 코드) import httpx class SupabaseAsync : def __init__ ( self ): self . _client : Optional [ httpx . AsyncClient ] = None async def _get_client ( self ) -> httpx . AsyncClient : if self . _client is None : self . _client = httpx . AsyncClient ( headers = self . _headers , timeout = 30 , limits = httpx . Limits ( max_connections = 10 ) ) return self . _client async def select ( self , table : str ): client = await self . _get_client () r = await client . get ( f " { self . _base } / { table } " ) r . raise_for_status () return r . json () 성능 개선 동시성 비교 지표 ThreadPoolExecutor(3) httpx(10) 최대 동시 요청 3개 10개 평균 응답 시간 450ms 150ms 메모리 사용량 250MB 180MB 초당 처리량 6.7 req/s 20 req/s 벤치마크 # 100개 동시 요청 처리 시간 ThreadPoolExecutor : 15 초 httpx AsyncClient : 5 초 → 3 배 빠름 마이그레이션 단계 1. 클라이언트 초기화 async def _get_client ( self ) -> httpx . AsyncClient : if self . _client is None : self . _client = httpx . AsyncClient ( headers = self . _headers , timeout = 30 , limits = httpx . Limits ( max_connections = 10 , max_keepalive_connections = 5 ) ) return self . _client 2. 요청 메서드 async def _request ( self , method : str , url : str , ** kwargs ): client = await self . _get_client () if method == " GET " : return await client . get ( url , ** kwargs ) elif method == " POST " : return await client . post ( url , ** kwargs ) # ... 3. Context Manager 지원 async def clos

2026-06-06 原文 →
AI 资讯

Rails GuardDog: Advanced Security Scanner for Rails Applications

Rails GuardDog: Advanced Security Scanner for Rails Introduction Today I'm excited to announce Rails GuardDog v0.1.0 — an open-source security scanner for Rails that goes beyond traditional tools like Brakeman. While Brakeman is excellent for catching basic Rails vulnerabilities, Rails GuardDog focuses on newer vulnerability classes that most tools miss: AI/LLM prompt injection, DoS/ReDoS patterns, supply chain attacks, and more. The Problem Modern Rails applications face new security challenges: AI/LLM Integration - How do you prevent prompt injection when integrating with ChatGPT, Claude, or Anthropic? ReDoS Attacks - Catastrophic backtracking in regex can bring down your app Supply Chain Attacks - Typosquatted gems that look like popular libraries IDOR Gaps - Objects accessible without proper authorization checks Advanced Secrets - Hardcoded API keys that Brakeman misses Rails GuardDog detects all of these. What is Rails GuardDog? Rails GuardDog is a lightweight gem that adds comprehensive security scanning directly to your Rails applications. 12 Security Checkers SQL Injection - String interpolation in queries XSS - Unescaped output in views CSRF - Disabled protection verification Mass Assignment - permit! vulnerabilities (fixes Brakeman #1942, #1918) Open Redirect - User input in redirects Hardcoded Secrets - API keys, tokens, passwords (always-on, fixes #1989) DoS/ReDoS - Unbounded queries, dangerous regex patterns IDOR - Object access without authorization AI/LLM Prompt Injection - User input flowing to LLMs Rate Limiting - Missing rack-attack configuration Supply Chain - Typosquatted gems using Levenshtein distance GraphQL - Missing field-level authorization Features 📊 Multiple report formats : Console, HTML, JSON 🔍 AST-based analysis : Uses parser gem for deep code understanding ⚡ Async support : Built-in Sidekiq integration 📈 Zero dependencies : Only requires parser and ast gems 🚀 Production-ready : Tested and battle-ready 📝 CWE/OWASP mappings : Every find

2026-06-06 原文 →
AI 资讯

DIFP Nostr: Fitting 6,000+ Products into a Single 64 KB Event

TL;DR — The DIFP protocol was designed to be data-compact and geo-aware from day one. We recently discovered it maps almost perfectly onto the Nostr event format. Here's how, and why it matters for decentralized food infrastructure. Background: What Is DIFP? DIFP (Djowda Interconnected Food Protocol) is an open protocol designed to sync food product data across distributed nodes — compactly, efficiently, and with geo-location awareness built in by default. One of its core design decisions is the PAD system (Preloaded Asset Distribution): Apps ship with a preloaded asset pack — item metadata, compressed images, category structure — all bundled at install time. Only price and availability need to travel over the wire during sync. This means the data footprint per product is tiny. Very tiny. Enter Nostr Nostr is a simple, open protocol for decentralized communication. One of its key specs: events support up to 64 KB of content . When we started exploring Nostr as a potential transport layer, we ran the numbers — and the fit was surprisingly clean. The Math: Products Per Event Baseline encoding A product represented with three fields: { "id" : 500 , "available" : true , "price" : 30000 } At this level of verbosity, a single 64 KB Nostr event can hold approximately: ~1,500 – 2,000 products Already useful. But we can do better. Optimized encoding Two key optimizations: 1. Drop the availability key — If a product entry exists in the JSON, it's available. If it's absent, it's not. No boolean needed. 2. Drop the field names — Instead of {"id": 500, "price": 30000} , just store: 500,30000 Field mapping is handled at the app level, not the protocol level. The device knows position 0 is the product ID, position 1 is the price (in smallest currency unit, e.g. cents). Result ~6,000 – 7,000 products per single Nostr event Possibly more, depending on the price distribution and ID ranges in a given catalog. Geo-Discovery: MinMax99 Cells DIFP uses a geo-cell system called MinMax99 to

2026-06-06 原文 →
AI 资讯

How Excel is Used in Real-World Data Analysis

Introduction A traditional database. That is what many who have not really interacted with Excel to a great extent would define it as in its most basic form. Not that they are wrong, only that is the scope their utilization of Excel covers. Mostly record keeping, basic operations, and data representation. But for those whose utilization scope of Excel is broader, we definitely know better. This underestimation of Excel is a grave mistake for anyone considering themselves as tech-oriented, especially for anyone dealing with data operations, be it simple record keeping or complex concepts involving data. What is Excel A spreadsheet program or tool that facilitates data organization, analysis, and visualization through mathematical operations, chart creation, and building financial models. Real-world application of Excel in Data Analytics Reporting and visualisation Excel facilitates data representation in the form of charts(bar charts, pie charts, line graphs) and dashboards. Businesses and organisations utilize this to get an organised, more insightful, and simplified view and report of their raw data. Financial Accounting Excel's provision for mathematical operations, functions, and formulas in analysis facilitates financial accounting. Balance sheets and income statements preparation, budgeting, and expense tracking are just some of the ways Excel can be used in accounting. Decision-Making Businesses and organisations heavily rely on analysis to support their decision-making. Excel helps in the analysis through different data metrics comparisons, e.g., sales across seasons and locations, forecasting, and tracking key performance indicators. This helps businesses make the best decisions based on the insights gathered from the analysis. Beginner Excel Features and Formulas for Data Analysis Learnt so far Sort and Filter By applying the Filter feature for each column, data in specific columns can not only be sorted from newest to oldest, but also be filtered based on

2026-06-06 原文 →
AI 资讯

Drift Protocol $285M Exploit - North Korean APT Attack on Solana

On April 1, 2026, Solana's largest decentralized perpetual futures exchange Drift Protocol suffered an attack, losing approximately $285 million . This is the second-largest DeFi hack of 2026 (behind KelpDAO's $292M attack the same month). Together, these two incidents totaled $577M — 76% of all DeFi stolen funds in 2026 . Key Finding : This was not a smart contract vulnerability. The attacker penetrated protocol personnel through social engineering , used Solana's durable nonce feature to pre-sign malicious transactions, and drained the entire treasury in 12 minutes . Mandiant confirmed the attacker as North Korean state-sponsored APT group UNC6862. ⏱️ Attack Timeline Time Event 6 months prior North Korean hackers establish fake trading company identities, attend crypto industry events Weeks prior Operatives attend crypto conferences in person, build deep trust with Drift contributors Late Feb - Early Mar Telegram group discussions about trading strategies, posing as partners Dec 2025 - Jan 2026 Fake company "Ecosystem Vault" builds partnership with Drift, deposits $1M+ Feb - Mar Attackers gain access to some contributors' code repositories Mar 23 Create 4 malicious wallets using Solana durable nonce feature Mar 27 Security Council migrates to 0-second timelock , removing safety buffer Apr 1, 16:06:09 UTC Execute pre-signed malicious transactions 16:06 - 16:18 UTC Treasury completely drained in 12 minutes Post-Apr 1 Funds swapped via Jupiter, bridged to Ethereum via CCTP, mostly dormant 🔧 Attack Technical Analysis Initial Penetration The attackers used a multi-layered social engineering + technical infiltration combination: HUMINT Operation Spent months building credible identities, attending global industry events Used intermediaries rather than direct contact (classic Lazarus tactic) ZachXBT noted this layered identity structure is a hallmark of Lazarus operations Malicious Code Injection Shared code repositories containing malicious code Exploited unpatched VSCo

2026-06-06 原文 →
AI 资讯

I Managed a Karaoke Bar with 10 Groups on Weekdays and 15 on Weekends. That Gap Was My First Real Funnel Lesson.

Every weekday, we averaged 10 groups. Every weekend, 15. Same karaoke bar. Same staff. Same songs. For a long time, I just accepted that gap as "normal." Weekends are busier. That's just how hospitality works, right? Wrong. It took me years to realize I wasn't looking at a staffing problem. I was looking at a funnel problem — and I had no idea what a funnel even was. The moment I noticed something was off One Tuesday afternoon, a group of four walked past the front door, looked at the menu board outside, and kept walking. I watched from the counter. I had open rooms. Competitive prices. Cold drinks. Everything they needed. But they left anyway. That one moment stuck with me. Why did they walk in? Why did they look? Why did they leave? I started tracking these moments obsessively. Not with software — just a notebook and a lot of attention. Here's what I found over six weeks: Weekdays : About 40 people walked past who paused at the sign. Of those, maybe 15 came to the door. Of those, 10 groups actually came in and paid. Weekends : About 90 people paused. 30 came to the door. 15 groups booked a room. The conversion rate was almost identical — roughly 25% from "stopped to look" to "became a customer." The difference wasn't that we were worse at converting on weekdays. We just had fewer people at the top. That's a funnel. I didn't know the term at the time. But what I was describing is exactly what marketers call a marketing funnel : Awareness — people notice you exist Interest — they stop to look Consideration — they walk to the door, check the price Action — they book a room and pay Most businesses obsess over the bottom of the funnel. Better sales scripts. Discount campaigns. Loyalty cards. I did the same. I ran Tuesday specials. I trained staff to upsell drinks. I rearranged the menu. None of it closed the gap. Because the gap wasn't at the bottom. It was at the top. On weekdays, I simply had fewer people aware we existed. What I tried instead Once I framed it as a f

2026-06-06 原文 →
AI 资讯

Build Your Own "Longevity Scientist": A Paper-to-Action Agent using LangGraph & Mistral-7B

We live in an era where scientific breakthroughs are published faster than we can read them. For the biohacking community, the gap between a new PubMed study on NAD+ precursors and actually knowing what dose to take is a chasm of manual research. What if you could build an LLM Agent that monitors research papers, processes them through a RAG (Retrieval-Augmented Generation) pipeline, and maps findings to your specific health profile? In this tutorial, we are building Paper-to-Action , a state-of-the-art agentic workflow using LangGraph , ChromaDB , and Mistral-7B . This isn't just a simple bot; it's a multi-stage reasoning engine designed to turn raw academic data into actionable health interventions. If you've been looking to master AI agents and personalized medicine automation, you’re in the right place. 🚀 The Architecture: From Raw Paper to Personalized Habit Traditional RAG pipelines are linear. To handle the nuance of medical research, we need a "looping" logic. We use LangGraph to manage the state of our agent, allowing it to decide if a paper is relevant before attempting to extract a protocol. System Flow graph TD A[Start: Keyword Trigger] --> B[Search PubMed/Arxiv API] B --> C{Relevance Filter} C -- No --> B C -- Yes --> D[Store in ChromaDB] D --> E[RAG: Extract Intervention Protocol] E --> F[Cross-Reference with User Profile] F --> G[Generate Personalized Action Plan] G --> H[End: Push to Health Checklist] Prerequisites To follow this advanced guide, you'll need: LangGraph : For the agentic state machine. ChromaDB : As our high-performance vector store. Mistral-7B : Running via Ollama or vLLM for local, private inference. Python 3.10+ Step 1: Defining the Agent State In LangGraph, everything revolves around the State . We need to track the fetched papers, the extracted data, and the final recommendation. from typing import Annotated , List , TypedDict from langgraph.graph import StateGraph , END class AgentState ( TypedDict ): keywords : List [ str ] user

2026-06-06 原文 →
AI 资讯

Open Source, Co-Ops and a History of Bias in Corporate America

I and I imagine a lot of other folks, don't believe the future of work should be a smaller group of executives commanding a larger system of people and machines. We have seen what AI can do not just to software product quality without guardrails, but to the junior and midlevel team members who are laid off or never hired at all in exchange for better profit rates with AI tokens vs human salaries. That is just the old hierarchy with better software. The history of work has always had this tension. You can go back to the start of US history and look at the military, commissioned officers were trained and trusted to command while enlisted service members carried out the work and risk. In the corporate and business world, executives and managers became the people who planned, measured, and optimized, while workers became the people being measured. Those structures were not only about class, but race and in America they were built inside a society already shaped by racism, classism, unequal education, unequal access to capital, and unequal access to leadership. AI now forces us to confront that history again. If we are not careful, AI will not flatten organizations. It will make the hierarchy invisible. Instead of a manager with a clipboard, we will have an algorithm. Instead of a foreman with a stopwatch, we will have dashboards, productivity scores, automated performance reviews, and AI systems that decide who gets opportunity and who gets replaced. That is not progress. The goal should not be to replace people with AI. The goal should be to replace bureaucracy, repetitive work, bad process, and unnecessary gatekeeping. What I am trying to do at Buildly is simple: AI should remove drudgery, not dignity. Automation should increase agency, not surveillance. Productivity gains should be shared, not extracted. Hierarchy should be functional, temporary, and accountable — not a measure of human worth. This is why we talk about AI-native product development differently. An AI

2026-06-06 原文 →