That `InitVar` in a dataclass… do you actually know what it does? It looks like a field. It’s declared like a field. But it’s not really a field. In today’s video, I walk through 7 interesting things you can do with Python dataclasses. From automatic class registration and lightweight validation systems to cached derived values, self-building CLI parsers, and even using dataclasses as context managers. Most developers treat dataclasses like “nicer structs.” But they’re just normal Python classes with less boilerplate. And once you realize that, they become a design tool, not just a convenience. 👉 Watch the full video here: https://lnkd.in/e5pkc7Ae. #python #dataclasses #softwaredesign #cleancode #developers #arjancodes
ArjanCodes’ Post
More Relevant Posts
-
That `InitVar` in a dataclass… do you actually know what it does? It looks like a field. It’s declared like a field. But it’s not really a field. In today’s video, I walk through 7 interesting things you can do with Python dataclasses. From automatic class registration and lightweight validation systems to cached derived values, self-building CLI parsers, and even using dataclasses as context managers. Most developers treat dataclasses like “nicer structs.” But they’re just normal Python classes with less boilerplate. And once you realize that, they become a design tool, not just a convenience. 👉 Watch the full video here: https://lnkd.in/eeEzkhJQ. #python #dataclasses #softwaredesign #cleancode #developers #arjancodes
To view or add a comment, sign in
-
-
Scale vector search to millions without rewriting your prototype code ⚡ Building semantic search typically starts with storing vectors in Python lists and computing cosine similarity manually. But brute-force comparison scales linearly with your dataset, making every query slower as your data grows. Qdrant is a vector search engine built in Rust that indexes your vectors for fast retrieval. Key features: • In-memory mode for local prototyping with no server setup • Seamlessly scale to millions of vectors in production with the same Python API • Built-in support for cosine, dot product, and Euclidean distance • Sub-second query times even for millions of vectors ☕️ Run this code: https://bit.ly/4cCI76w #VectorDatabase #Python #SemanticSearch #DataScience
To view or add a comment, sign in
-
-
More knowledge graph experiments - this time, a port of Python's rdflib to Julia, but with much more, including an N3 reasoner (based on EYE), ProbLog, support for the 1.2 features of SPARQL, a SPARQL server https://lnkd.in/gJf6pWxF
To view or add a comment, sign in
-
We started with a single function. Added tools. Made it loop. Gave it memory. Tracked state. Persisted facts. Added guardrails. Let it plan. Eight lessons. All building on each other. Now they compose. 60 lines of Python. Remember my name is Alice, then add ten and five. → saves to memory, runs the tool, returns fifteen. New session. What is my name? → Alice. From memory. Delete the database. → Blocked. Before it even runs. Same sixty lines. Every feature you've built. No LangChain. No CrewAI. No AutoGen. Just json, pyfetch, and one HTTP call. This is the same architecture as every agent framework out there. The difference: you can read every line. The entire series is free. Runs in your browser. No setup. tinyagents.dev Day 9 of 9. Series complete. https://lnkd.in/gwmgUzex #AIAgents #BuildInPublic #Python #LLM #OpenSource
To view or add a comment, sign in
-
"Data Science is about organization, starting from your Python environment. Cluttering the base installation leads to dependency conflicts (Version Hell) and instability. 🛑 That’s why Miniconda (Conda Environments) is crucial. By creating isolated environments for each project, we achieve: 1️⃣ Dependency Control: No version conflicts. 2️⃣ Reproducibility: Projects work anywhere. 3️⃣ Performance: Faster package management. Professionals keep their kitchens organized and their Conda environments isolated. 💡 #DataScience #Python #Miniconda #VirtualEnvironments #MachineLearning"
To view or add a comment, sign in
-
-
Improved my Log Analyzer project with more practical SRE features 🚀 After building a basic log analyzer, I enhanced it to make it more flexible and closer to real-world usage. 🔧 What’s new: • Added CLI-based input handling for dynamic log file analysis • Implemented Top N error detection using Python’s Counter • Improved output formatting for better readability 💡 Why this matters: In real systems, logs are large and constantly changing — tools need to be flexible and configurable. This update helped me understand how to make scripts more production-ready. 🔗 Updated Repo: https://lnkd.in/dEZyK7qH Next step: planning to add regex-based parsing and error spike detection. Would love your feedback! #SRE #Python #DevOps #Observability #LearningInPublic #GitHub
To view or add a comment, sign in
-
-
🚀 Day 51 of #100DaysOfCode ✅ Solved: 1689. Partitioning Into Minimum Number of Deci-Binary Numbers Today’s problem looked tricky at first, but the solution turned out to be beautifully simple once the pattern was understood. 🔎 Problem Insight: A deci-binary number contains only digits 0 or 1. To form a number like "82734", think about each digit: If a digit is 8, we need at least 8 deci-binary numbers contributing 1 at that position. If a digit is 3, we need at least 3 deci-binary numbers at that position. 👉 So the minimum number of deci-binary numbers required is simply: 📌 The maximum digit in the given number 💡 Example: Input: "82734" Output: 8 🧠 Python Code: Python Copy code class Solution: def minPartitions(self, n: str) -> int: return int(max(n)) ⏱ Time Complexity: O(N) 💾 Space Complexity: O(1) This problem is a great example of how understanding the pattern simplifies the solution dramatically. #LeetCode #ProblemSolving #Python #DataStructures #CodingJourney #100DaysOfCode
To view or add a comment, sign in
-
-
Tired of writing Python boilerplate every time I wanted to wrap a CLI tool as an MCP server, so I built Teukhos. You describe the tool in YAML, run one command, and your MCP server is up and available to any AI client — Copilot, Claude, Cursor, you name it. `pip install teukhos` `teukhos serve my-tools.yaml` Especially useful when you want config-as-code for MCP, version-controlled, CI/CD-friendly, no Python required. 🔗 https://lnkd.in/dWq9sYP9 #MCP #AITools #OpenSource #DeveloperTools #AgenticAI
To view or add a comment, sign in
-
-
Day 10 of my Python journey Missed the class, but caught up stronger Today’s focus: Lists & Real-world Logic ✔ Built a mini time converter (24hr → 12hr format) ✔ Understood list basics & nested indexing ✔ Explored list methods (append, extend, remove, pop) ✔ Learned the power of mutable data structures Big takeaway: Lists are not just storage — they’re powerful tools for solving real problems. Code link : https://lnkd.in/gTjGZd5X Consistency continues 🚀 #Python #100DaysOfCode #CodingJourney #FullStackDeveloper Codegnan Saketh Kallepu
To view or add a comment, sign in
-
Stop Manual JSON Tracking! 🚀 Tracing nested keys in complex JSON file to use set to dictionary is a time-sink😴. I’ve automated the struggle away. The Solution: Python External Tool 🐍 ✅ Open any JSON. ✅ Run the tool. ✅ Done! The full dictionary path is automatically copied to your clipboard. What’s next? 🔥 #Python #JSON #Automation #DictionaryMapping #PythonScripts #Robotframework
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development