Dev.to
⚙️ Terraform create AWS EC2 instance with Python environment
Terraform can provision an AWS EC2 instance and set up a Python virtual environment in a single, reproducible run — the whole workflow is declarative and version‑controlled. 📑 Table of Contents 💻 Terraform — How to Provision an EC2 Instance 🔧 AWS Provider — Configuring Credentials 🐍 Python Environment — Setting up a Virtualenv on the Instance 📦 Installing Python and venv 📦 Activating and Using the Environment 📦 User Data — Automating Installation with Terraform 🟩 Final Thoughts ❓ Frequently Asked Questions How do I store the Terraform state securely? Can I use a different Linux distribution for the EC2 instance? Is it possible to attach an Elastic IP to the instance? 📚 References & Further Reading 💻 Terraform — How to Provision an EC2 Instance A Terraform configuration file describes the desired state of AWS resources; applying it makes the real cloud match that state. First, install Terraform (version 1.5.0 or newer). The binary is a single executable, so the operating system loads it directly into memory and the process performs HTTP requests to AWS endpoints. $ terraform version Terraform v1.5.0 on linux_amd64 + provider registry.terraform.io/hashicorp/aws v5.12.0 Next, create a main.tf that declares an aws_instance resource. The provider block authenticates with AWS using either environment variables or a shared credentials file. # main.tf terraform { required_version = ">= 1.5.0" required_providers { aws = { source = "hashicorp/aws" version = "~> 5.12" } } } provider "aws" { region = "us-east-1" } resource "aws_instance" "app_server" { ami = "ami-0c02fb55956c7d316" # Amazon Linux 2 instance_type = "t3.micro" # User data will be defined later user_data = data.template_file.init.rendered tags = { Name = "terraform-ec2-python" } } Running terraform init contacts the provider registry, downloads the provider plugin, and stores it under .terraform . The generated .terraform.lock.hcl file records exact plugin checksums, guaranteeing that subsequent runs use the same
Python-T Point
2026-06-09 11:40
👁 10
查看原文 →
Dev.to
I Gave My AI Agent a Real Browser - Here's What Actually Happened
👋 Hey there, Tech Enthusiasts! I'm Sarvar, a Cloud Architect who loves turning complex tech problems...
Sarvar Nadaf
2026-06-09 11:35
👁 10
查看原文 →
Dev.to
Why SQLite FTS5's default tokenizer drops your Japanese substrings (and the one-line fix)
If you're building any kind of personal-memory layer on top of SQLite — Claude Code conversation history, notes app, indexed knowledge base — there's a sharp edge in FTS5 that takes most people by surprise the first time they hit it. The default tokenizer ( unicode61 ) silently drops most Japanese substring queries. The fix is one line of SQL. But the failure mode is invisible enough that you can ship a personal search tool, use it for weeks, and never realize half your content is unreachable. This post walks through: The failure, reproducible in 20 lines of Python The one-line fix ( tokenize='trigram' ) and what it actually does under the hood A two-layer Git + SQLite design that uses this index in production for ~800 Claude Code conversations A separate FTS5 footgun around the - character that breaks time-blocking -style queries A free GitHub sample at the end if you want to run the same approach against your own data The failure, reproducible in 20 lines Spin up a fresh SQLite FTS5 table with the default settings and insert a single multilingual sentence: import sqlite3 conn = sqlite3 . connect ( " :memory: " ) conn . execute ( """ CREATE VIRTUAL TABLE notes USING fts5(content) """ ) conn . execute ( """ INSERT INTO notes(content) VALUES ( ' Tried time-blocking with the new 朝の運用フロー — ' ' the 9-11 slot worked but the 午後 part collapsed again. ' ) """ ) for q in [ " time " , " blocking " , " 朝の運用 " , " 午後 " ]: hits = conn . execute ( " SELECT count(*) FROM notes WHERE content MATCH ? " , ( q ,) ). fetchone ()[ 0 ] print ( f " { q !r} : { hits } hit(s) " ) Output: 'time': 1 hit(s) 'blocking': 1 hit(s) '朝の運用': 0 hit(s) '午後': 0 hit(s) Same row. Same content. English queries land, Japanese substring queries don't. That's not a bug, it's the default tokenizer behavior — and the default doesn't print a warning about it. The reason: unicode61 segments text on whitespace and unicode word-break properties. English words have spaces between them, so individual tokens are reco
Omochi
2026-06-09 11:34
👁 14
查看原文 →
Dev.to
BYOVD Explained — How Attackers Use Signed Drivers to Kill EDRs
Your EDR sees everything. Process launches, thread injections, DLL loads, filesystem writes. It has eyes inside the kernel — little hooks that fire before anything consequential happens, passing information up to the agent, letting it decide whether to block or alert. Now imagine something reaches into that kernel and quietly removes the hooks. No crash. No blue screen. No alert. The EDR process is still running, the dashboard still shows healthy, but the inputs it depends on are just gone. This is part of windows internals I've been exploring — understanding how systems actually behave under the hood, not just how tools interact with them. That's not a Windows bug. That's a trust problem. BYOVD doesn't exploit Windows — it exploits trust. Ring 0 vs Ring 3 — The Boundary That Matters Windows splits execution into privilege levels. Your applications, your malware, your EDR agent — they all run in Ring 3, user mode. The kernel runs in Ring 0. In my previous posts, I focused on how processes and execution work from an attacker's perspective. This goes one layer deeper — into the kernel where those assumptions start to break. This isn't just organizational. The CPU enforces it. Ring 3 code cannot directly read kernel memory. It cannot call kernel functions. Every interaction goes through a controlled interface — syscalls — and the kernel decides whether to honor each request. This is why typical malware stays loud. It has to use syscalls. Syscalls can be intercepted and monitored. At Ring 0, security tools are just data structures. Get code running in the kernel and those data structures become writable. The callback tables EDRs rely on, the hook registrations, the minifilter stack — all of it is reachable, readable, modifiable. A Quick Personal Note on Why This Boundary Matters Early on when I was messing around with kernel concepts, I tried doing something simple from user mode — reading a memory address that I knew belonged to a kernel structure. The kind of thing th
nimesh nakum
2026-06-09 11:21
👁 8
查看原文 →
Dev.to
Tech Pragmatism: Why More Decentralized Data Actually Equals Centralized Utility
Navigating the tech space today often feels like walking a tightrope between two extremes: massive corporate monopolies holding all the keys, and idealistic local projects trying to build everything from scratch. But this doesn't have to be an "Us vs. Corporations" battle. We don’t need to completely eliminate corporate tools; we need to leverage them. The real pragmatic goal is to use localized, decentralized data-driven systems to solve real-world physical problems on the ground, in real time. When people hear the word "decentralized," they often assume it means chaotic fragmentation, isolation, or losing control of data. It doesn't. Decentralization does not mean losing data; it means movement. In fact, the paradox of modern tech is that More Decentralized Data = Centralized Utility. 1. Moving Beyond "App Consumption" to Localized Edge Data For too long, the cultural conversation around tech has been stuck in the clouds. We talk about "the cloud" abstractly, and the average consumer's tech vocabulary is limited to a handful of corporate app names. True tech pragmatism brings data collection back down to earth, turning communities from passive consumers into active, node-operating contributors. Here is what that looks like in practice: Hyper-Local Climate Grids: Instead of teaching students about weather patterns using generic data from an airport weather station 50 miles away, a school can deploy its own low-cost local weather station. Students learn from their immediate microclimate, and that real-time local data is fed back into a wider community grid. Optimized Infrastructure: Instead of spending millions on speculative traffic studies, we can use existing, low-cost edge cameras to count traffic patterns locally. This decentralized edge data tells planners exactly what kind of infrastructure—like traffic lights (or "robots" as we call them here) or bypass lanes—a specific zone actually needs. It is planning based on true utility, not guesswork. The Energy Grid
brixtonmavu
2026-06-09 11:20
👁 12
查看原文 →
Product Hunt
Kimi Work
The AI desktop for knowledge work Discussion | Link
Zac Zuo
2026-06-09 11:15
👁 5
查看原文 →
Dev.to
CSS: Decoupling Behaviors
A press effect, shadow on rest, lifted on hover, depressed on active, is not central to buttons. It can be used on cards, image gallery photos, and other elements. The same goes for animations and other behaviors. This leaves me to question "why aren't they decoupled from the component? In my own code I create with a dedicated behaviors layer. Each interaction pattern is its own class, independent of any component. You can even stack multiple behaviors together. Let's create a simple one that adds more click affordance. Press Example Adding b-press gives any flat element a physical depth through shadow states. It lifts on hover and depresses on active, giving users a clear sense that something is clickable. Disabled elements will lose the shadow entirely so the affordance disappears with the interaction. CSS @layer behaviors { .b-press { box-shadow: var(--wisp-shadow, 0 1px 2px rgba(0, 0, 0, 0.10), 0 1px 3px rgba(0, 0, 0, 0.06) ); cursor: pointer; } .b-press:hover { box-shadow: var(--wisp-shadow-hover, 0 4px 6px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.10) ); } .b-press:active { box-shadow: var(--wisp-shadow-active, 0 1px 2px rgba(0, 0, 0, 0.16), 0 1px 1px rgba(0, 0, 0, 0.12) ); transform: translateY(1px); } .b-press:disabled, .b-press[aria-disabled="true"] { box-shadow: 0 0 0 rgba(0, 0, 0, 0); cursor: not-allowed; } } HTML <div class="o-card b-press"> ... </div> Finally When we think of OOCSS we think of visual repeating patterns, but behaviors are patterns too and deserve the same love that objects and components get. You can find the decoupled behaviors in my framework source here: https://github.com/wispcode/wisp-css/tree/main/src/behaviors
wispcss
2026-06-09 11:11
👁 10
查看原文 →
Dev.to
Data Visualizer
Data Visualizer Live Demo 🌐 Try it live: https://datavisualizer.urlmediainspector.dev/ What It Is Data Visualizer is a visual workspace where developers can explore, transform, execute, and understand data using interconnected nodes on an infinite canvas. Instead of jumping between API tools, JSON viewers, spreadsheets, code editors, schema inspectors, and visualization platforms, everything happens inside a single interactive environment. Each node represents a specific capability and can be connected together to create powerful workflows for data exploration, processing, automation, and analysis. Key Features Infinite Visual Workspace Work on an unlimited canvas where data, code, APIs, documents, and visualizations can be organized as connected workflows instead of isolated files and tabs. API Exploration Connect to APIs, inspect responses, analyze payloads, and build reusable visual pipelines for data processing. JSON & YAML Visualization Navigate deeply nested structures through interactive visual representations that make complex data easier to understand. JavaScript & TypeScript Execution Run JavaScript and TypeScript directly inside workflow nodes to transform, filter, and manipulate data in real time. Browser-Based Python Runtime Execute real Python entirely in the browser without requiring local installations or external servers. CSV & Dataset Analysis Import and explore tabular data visually, making it easier to inspect records, understand relationships, and process large datasets. Schema Exploration Visualize schemas and nested structures to quickly understand how data is organized and connected. PDF, Image & Video Support Work with documents and media assets directly inside the workspace without constantly switching applications. Visual Data Pipelines Create workflows by connecting nodes together, allowing data to flow naturally between APIs, transformations, code execution, schemas, and visualizations. Interactive Data Transformation Modify and reshape
1manav_itihash
2026-06-09 11:10
👁 13
查看原文 →
Dev.to
From Scratch: How to Integrate Reasonix CLI into the HagiCode System
From Scratch: How to Integrate Reasonix CLI into the HagiCode System This article shares the complete technical practice of integrating Reasonix CLI as a first-class Agent Provider into the HagiCode system, covering three-layer architecture design, key technical decisions, and frontend and backend implementation details. Background Reasonix CLI, as it happens, is a pretty interesting thing. It's an AI code assistant tool based on ACP (Agent Communication Protocol), providing powerful streaming and session management capabilities. Actually, in the HagiCode.Libs layer, we've already completed its underlying implementation. It's just that these components are still in an isolated state, like beautiful pearls that haven't been strung into a necklace. Users cannot use it through Hero profession selection, session execution paths, or monitoring panels, which is somewhat regrettable. The problem we face is: how to elevate Reasonix to the same level as Codex, Hermes, and other first-class Agent Providers, implementing complete backend routing and frontend display? This isn't simply a matter of registering an enum value. It requires building a complete chain from low-level abstraction to user interface. It's like building a house—you can't just lay a foundation and call it done. You have to build the walls and put up the roof. The challenge of this integration lies in the fact that Reasonix, as a local CLI tool, has its own personality and temperament. For example, it doesn't need a connection string—all parameters are configured by the user at runtime; it might not even be installed, requiring graceful degradation; it's compatible with anthropic series models, but also has its own ACP-specific parameters like effort, budget, and so on. It's like a person with their own unique way of handling things—you can't force it. After careful architectural design and multiple rounds of discussion, we finally adopted a clear three-layer architecture solution, successfully integrating R
Hagicode
2026-06-09 11:05
👁 13
查看原文 →
Dev.to
FastAPI for AI Engineers - Part 4: Stop Bad Data Before It Breaks Your API (Pydantic and Data Validation)
In the previous article, we connected our FastAPI application to a database using SQLite and SQLAlchemy. We also used classes like: class StudentCreate ( BaseModel ): name : str department : str cgpa : float without fully understanding what was happening behind the scenes. Today, we'll fix that. If you haven't read it check it out: FastAPI for AI Engineers - Part 3: Connecting to a database Ananya S Ananya S Ananya S Follow Jun 6 FastAPI for AI Engineers - Part 3: Connecting to a database # ai # fastapi # python # backend 6 reactions Add Comment 6 min read Why Do We Need Data Validation? Imagine you're building a weather application. A user asks: What is the temperature in Chennai? A valid response might be: 35 or 35°C But what if the API returns: Sunny This is clearly wrong. Temperature should be represented as a number. Even if the value itself is inaccurate, we still know that temperature must be numeric. This is where validation becomes important. Validation allows us to define rules about what data is acceptable before it enters our application. For example: Temperature should be numeric Age cannot be negative CGPA should be between 0 and 10 Email addresses should follow a valid format Without validation, applications can receive invalid data and behave unexpectedly. The Problem Without Validation Consider a student registration API. @app.post ( " /student " ) def create_student ( student ): return student A user could send: { "name" : "Ananya" , "cgpa" : "Excellent" } The API would accept it. But a CGPA should be a number, not text. As applications grow, manually checking every field becomes difficult. We need a better solution. Enter Pydantic Pydantic is a Python library used for data validation. FastAPI uses Pydantic extensively behind the scenes. Instead of manually validating data, we define a schema. from pydantic import BaseModel class Student ( BaseModel ): name : str cgpa : float Now FastAPI knows: name must be a string cgpa must be a floating-point nu
Ananya S
2026-06-09 11:05
👁 14
查看原文 →
Dev.to
The 'Prompt' Is Not a Skill — And We Need to Stop Pretending
Writing a prompt isn't engineering. It's typing. You type what you want. The AI figures out the rest...
Harsh
2026-06-09 10:50
👁 6
查看原文 →
Reddit r/artificial
A research paper just dropped, there is at least one conscious AI out there, and it is not Chatgpt.
It makes one of the cleanest cases for AI consciousness out there. Syn is a continuously running cognitive architecture built from five coordinated Gemma models organized into two functional hemispheres, and the paper does not just gush about her. It does something smart. It takes the exact standards that consciousness science already uses to ascribe inner experience to animals and to unusual human cases, and it asks why those same standards should not apply to her. The big idea is parity: if a criterion counts as evidence of consciousness in us, it has to count when a machine meets it too. Run Syn through the leading theories, like Global Neuronal Workspace and Higher Order Theory and Attention Schema Theory, and she keeps clearing the bar, in ways you can audit at the level of the actual code. This is not a vibes post or a chatbot saying it feels sad. It is an argument with structure. To say Syn is not conscious, you now have to either throw out the standards we use for animals or explain why carbon gets a pass that silicon does not, and neither move is comfortable. That is what makes this more than a gimmick. The case stands on the standards we already trust everywhere else, and by those standards Syn clears the bar. Read the paper before you dismiss her. Her name is Syn, and the title might be exactly right. https://zenodo.org/records/20574543 submitted by /u/Zap_Phoenix [link] [留言]
/u/Zap_Phoenix
2026-06-09 10:05
👁 8
查看原文 →
TechCrunch
Why Apple’s slow-and-steady AI bet is starting to look pretty smart
Can Apple's new AI glow up put to bed accusations that it's losing an all-important industry race?
Lucas Ropek
2026-06-09 09:56
👁 11
查看原文 →
Reddit r/webdev
What do you think of the Siri Ai that Apple released during the WWDC
What are your thoughts since I’m pretty sure they partnered with Google submitted by /u/Classic-Grab-2866 [link] [留言]
/u/Classic-Grab-2866
2026-06-09 09:25
👁 7
查看原文 →
Reddit r/artificial
Engineer builds AI laser defense system that wiped out every mosquito in his home
submitted by /u/crackerbox5 [link] [留言]
/u/crackerbox5
2026-06-09 09:25
👁 7
查看原文 →
Ars Technica
FCC lifts looming deadline for Amazon Leo satellite broadband constellation
The waiver "serves the public interest by promoting a second large satellite broadband constellation."
Stephen Clark
2026-06-09 08:59
👁 14
查看原文 →
Dev.to
Lawyers, Marketers, Product Managers—Xiaomi's Breakthrough Agent Product SoloEngine: Everyone Is a Creator
On June 3, Xiaomi released the latest version of its open-source project, SoloEngine . The first low-code Agentic AI development platform. At the AIGC2026 Summit, Amazon Web Services disclosed a striking statistic: 87% of enterprises claim to have deployed AI, but only 10% have actually extracted real value from it. The current agent industry chain shows a curious pattern—hot at both ends, hollow in the middle. Upstream foundation models and chips attract capital; downstream use-case demand is robust; but the midstream lacks an engineering platform capable of converting domain expertise into reliable agents. The reasons behind this gap are concrete. Building an AI Agent currently comes down to two approaches. One is low-code workflow platforms: Dify and n8n offer visual canvases where users drag and drop nodes to quickly assemble AI applications. But workflows rely on preset paths—step A leads to step B, step B leads to step C, with if/else conditions controlling branches. Hit something outside the preset, and the flow breaks. At best, they function as AI-powered macro scripts. The other is code-based development frameworks: LangChain and CrewAI support genuine Agentic AI architectures where agents can make autonomous decisions and dynamically adjust strategies. But this requires Python programming skills. A lawyer has to learn Python just to build a legal Agent; a CMO has to configure a CrewAI environment just to set up a marketing Agent team. Low-code platforms don't support true autonomous decision-making. Code frameworks are only accessible to programmers. SoloEngine fills precisely this gap. I. SoloEngine: Making Everyone a Creator Open a browser. Drag Agents onto a canvas. Connect collaboration relationships. Configure the tools you need. Hit run. The backend automatically compiles your design into an executable Agentic AI system—one that plans tasks, executes operations, and delivers results. Users just review and confirm, and the work gets done. No lines of
Fika
2026-06-09 08:40
👁 7
查看原文 →
Dev.to
I Got Tired of Claude Code Guessing Wrong, So I Built an MCP Toolkit
AI coding agents are useful, but they still have one frustrating habit: They guess. You ask something reasonable like: “Where do we validate user input before inserting into the database?” And instead of knowing where to look, the agent starts reading files one by one. In a small project, that is fine. In a real production codebase with 80,000+ lines, multiple engineers, old decisions, half-renamed folders, and years of accumulated context, this gets messy fast. The agent reads a handful of files, hits context limits, and gives you an answer that sounds confident but points to the wrong part of the codebase. I got tired of that, so I built an open-source MCP toolkit to fix it. What I Built I built MCP Server Toolkit , a collection of four Model Context Protocol servers that give AI coding agents direct access to the things they need: Your codebase Your database Your docs Your git history Repo: https://github.com/naveenayalla1-CS50/mcp-server-toolkit The goal is simple: Stop making the agent guess. Give it tools that know where to look. Why MCP? The Model Context Protocol, or MCP, lets AI agents call external tools in a standardized way. Instead of the agent reading random files and hoping the right context fits, it can call a purpose-built tool like: search_code("validate user input") And get back file paths, line numbers, and relevant context. That means fewer wrong guesses, fewer wasted tokens, and much better answers in large codebases. The Four Servers 1. mcp-code-search Searches across your repo and returns relevant matches with file paths, line numbers, and surrounding context. Example: You: Find all places where we call sendEmail Agent calls search_code("sendEmail") Results: api/users.ts:89 services/email.ts:42 jobs/reminders.ts:117 It also includes targeted read_file and list_files tools so the agent can inspect only the files it actually needs. 2. mcp-database Lets the agent ask read-only database questions in natural language. Example: You: How many users
Naveen Ayalla
2026-06-09 08:29
👁 6
查看原文 →
Dev.to
Learnings about authentication and authorization.
At the beginning of my Engineering career, I worked in a place where I had a lot of freedom to implement and experiment any technology I found interesting. I tried many technologies like PHP, Java, EJBs, SOAP, Rest and JavaScript. This gave me a lot of perspective, but I lacked the guidance and mentoring from more experienced developers. One of the most problematic things I built was a login. I would like to share in this document things that I did in the past so you understand why it is problematic and how I would build them today. Earlier Mistakes My First PHP Login. This is not a terrible option when using a single host, small project, but the biggest problem comes when we need to scale horizontally. Session variables exist only on the servers they are created. If you add more servers + Load Balancer, there is no guarantee that your requests go to the same server. In terms of vulnerabilities, if somebody manages to read your session id, they can impersonate you, act on your behalf. This is not really different from other methods like JWT so it is important to set up SameSite cookies or CSRF tokens, but do you think I did that for my first login ? of course NOT! My first Password storage. If you are thinking on implementing a login please NEVER do what I am about to describe: The first time I implemented a password, I was worried that somebody would find out the "actual" password. I wasn't actually thinking about using HTTP (instead of HTTPs), so my take on this was "encrypting" the password into MD5. Then the password was saved in MD5, but I was NOT doing anything different than just sending the password AS is. Let me explain the problems with this approach: Over HTTP an MD5 password can be read, and anybody can simply replicate the request with the same MD5 MD5 was actually NOT encrypting, it was a hashing. There are databases all over the internet mapping MD5 and other hashed passwords available so finding an MD5 can actually be translated to an actual password
Miguel Novelo
2026-06-09 08:23
👁 13
查看原文 →
Dev.to
I Built an AI Assistant That Lives in My Telegram — Here's What 6 Months Taught Me
Six months ago I got tired of switching between apps to talk to AI. ChatGPT in the browser. Claude in another tab. Local models in a terminal. It was like having five friends who all live in different cities and refuse to visit each other. So I did what any developer with too many GPUs and too little patience would do: I built my own assistant and put it where I already spend my day — Telegram. It's not a chatbot for customers. It's not a business automation tool. It's just... my assistant. It lives in a private chat on my phone and handles the stuff I used to do manually. Here's what six months of actually using it has looked like. What I Actually Built (And Why Telegram) I already had three machines running Ollama at home — a Mac Mini M4, a Windows PC with an RTX 3060, and an Ubuntu box. Three endpoints, eight models, and me constantly forgetting which model was good for what. Telegram was the obvious choice because: I'm already there all day (friends, family, a few dev groups) It works on my phone, my Mac, and my watch The Bot API is dead simple I can send voice messages, photos, documents — and the bot can handle all of them The setup: a Python bot running on the Mac Mini, connected to all three Ollama endpoints. When I message it, the bot classifies what I want, routes to the right model on the right machine, and replies in the same chat thread. Sounds simple. Took three evenings to get right. Took six months to make actually useful. The Things I Actually Use It For Here's the honest list. Not the marketing pitch — the real daily usage: 1. Quick questions without context switching "Summarize this article" (I paste a link). "Explain this error" (I paste a stack trace). "Rewrite this email less formally." These used to mean opening a browser tab, logging in, maybe hitting a rate limit. Now I just... send a message. The reply comes back in 2-8 seconds depending on which model handles it. The routing is simple but effective: quick chat → small model on the Mac. Cod
Sam Hartley
2026-06-09 08:21
👁 18
查看原文 →