<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Nikita Gaba on Medium]]></title>
        <description><![CDATA[Stories by Nikita Gaba on Medium]]></description>
        <link>https://medium.com/@gabanikita18?source=rss-8f6aa918f7e6------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*xARLV9A0a2K5_dVr.</url>
            <title>Stories by Nikita Gaba on Medium</title>
            <link>https://medium.com/@gabanikita18?source=rss-8f6aa918f7e6------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 02:45:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@gabanikita18/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ A Beginner’s Guide to Context Encoders: Types, Architectures, and Applications]]></title>
            <link>https://gabanikita18.medium.com/a-beginners-guide-to-context-encoders-types-architectures-and-applications-6d3581ce00d5?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6d3581ce00d5</guid>
            <category><![CDATA[context-encoder]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Sat, 14 Jun 2025 03:08:54 GMT</pubDate>
            <atom:updated>2025-06-14T03:08:54.601Z</atom:updated>
            <content:encoded><![CDATA[<p>In the age of intelligent systems, understanding context is everything. Whether it’s a chatbot answering your question, a model filling in missing parts of an image, or a system translating speech in real time — context encoders are the unsung heroes behind the scenes.</p><p>This post is your guide to understanding what context encoders are, how they work across different domains, and why they’re essential in modern AI.</p><h3>🔍 What Is a Context Encoder?</h3><p>A context encoder is a type of neural network architecture designed to capture and encode contextual information from input data. Its goal is to create a context-rich representation of the input — be it text, image, audio, or video — so that downstream tasks like classification, generation, or retrieval can be performed more effectively.</p><h3>In simple terms:</h3><ul><li>It encodes input (text, image, etc.) into a vector that retains semantic meaning.</li><li>It understands relationships, dependencies, and structure in the data.</li><li>It can be used in NLP, computer vision, multimodal learning, and time-series analysis.</li></ul><h3>🧠 Context Encoders in NLP</h3><p>These models encode text (sentences, paragraphs, documents) while incorporating surrounding context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*An8N8Vn1Y2cGOnrimRbSwQ.png" /></figure><h3>🖼️ Context Encoders in Computer Vision</h3><p>These models infer missing or occluded regions in images or understand spatial relationships.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wuCQwlfCEKfsJWXgP5FhRA.png" /></figure><h3>🔄 Multimodal Context Encoders</h3><p>These combine context across different modalities like text, image, and audio.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*eLo7uflz6Vr-CjYlYzHNLg.png" /></figure><h3>🔁 Temporal Context Encoders</h3><p>Used in time-series, video, and speech processing to encode context across time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*iBmul9tgT1KlyhWAm_eSAg.png" /></figure><h3>🧰 Use Cases of Context Encoders</h3><ul><li>✅ Image In painting and Restoration</li><li>✅ Text Generation &amp; Completion</li><li>✅ Semantic Segmentation</li><li>✅ Video Frame Prediction</li><li>✅ Machine Translation</li><li>✅ Multimodal Search &amp; Retrieval</li></ul><h3>🧪 Bonus: Context Encoders in RAG Systems</h3><p>In Retrieval-Augmented Generation (RAG), context encoders are used to convert documents into vector embeddings for similarity search.</p><p>Popular context encoders in RAG include:</p><ul><li>DPR (Dense Passage Retrieval) — optimized for long passages</li><li>BERT — general-purpose semantic similarity</li><li>SBERT — sentence-level embeddings</li><li>OpenAI Ada — high-performance embeddings</li><li>Cohere — multilingual and scalable</li><li>USE (Universal Sentence Encoder) — lightweight and efficient</li></ul><p>These embeddings are stored in vector databases like FAISS for fast retrieval.</p><h3>🎯 Final Thoughts</h3><p>Context encoders are the backbone of intelligent systems. Whether you’re building a chatbot, a vision model, or a multimodal assistant, understanding how to encode and leverage context is key to building smarter, more adaptive AI.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6d3581ce00d5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Key Things to Remember When Creating Indexes in a Database]]></title>
            <link>https://gabanikita18.medium.com/key-things-to-remember-when-creating-indexes-in-a-database-eab33197854a?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/eab33197854a</guid>
            <category><![CDATA[optimizati]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[sql-server]]></category>
            <category><![CDATA[indexing]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Thu, 12 Jun 2025 19:17:21 GMT</pubDate>
            <atom:updated>2025-06-13T15:54:28.330Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating indexes is one of the most effective ways to improve database performance — but it’s also one of the easiest ways to introduce inefficiencies if done without care. Whether you’re tuning a legacy system or designing a new schema, here are the key principles to keep in mind.</p><h3>1. Start with Query Analysis and Validation</h3><p>Before creating any index, you need to understand how your application queries the data — and validate the impact of your changes. This involves three essential practices:</p><h3>✅ Analyze Query Patterns</h3><p>Use actual query logs and performance metrics to identify bottlenecks. Don’t rely on assumptions. Tools like SQL Server’s Query Store, PostgreSQL’s pg_stat_statements, or even basic logging can help you pinpoint which queries are slow and why.</p><h3>🧠 Use SET STATISTICS TIME, IO ON</h3><p>This SQL Server command gives you detailed feedback on query performance:</p><p>It shows:</p><ul><li>CPU time and elapsed time</li><li>Logical reads, physical reads, and read-ahead reads</li></ul><p>Compare these metrics before and after index creation to validate improvements.</p><h3>🔍 Always Review the Query Plan</h3><p>SQL Server’s execution plan reveals how the engine interprets your SQL and whether it’s using your indexes effectively.</p><p>Look for:</p><ul><li>✅ Index Seek: Ideal</li><li>⚠️ Index Scan: May indicate a missing or suboptimal index</li><li>❌ Key Lookup: Can be expensive — consider INCLUDE columns</li><li>💡 Missing Index Hints: Review carefully before implementing</li></ul><p>Use CTRL + M in SSMS to include the actual execution plan and analyze it visually. In one case, we noticed a query was doing an Index Scan despite having an index. The plan revealed a Key Lookup on email_address, which we resolved by adding it to the INCLUDE list—resulting in a 70% drop in logical reads.</p><h3>2. Choose the Right Index Type</h3><p>Not all indexes are created equal:</p><ul><li><strong>Clustered indexes </strong>define the physical order of data.</li><li><strong>Nonclustered indexes</strong> provide fast lookups without affecting storage layout.</li><li><strong>Filtered indexes</strong> are great for sparse data.</li><li><strong>Full-text indexes</strong> are ideal for search-heavy fields.</li></ul><p>In one case, we used CREATE NONCLUSTERED INDEX with <strong>ONLINE=ON</strong> to avoid locking during deployment—critical in high-availability environments.</p><h3>3. Be Thoughtful About Column Order</h3><p>The order of columns in a composite index matters. Place the most selective columns first to reduce the number of rows scanned.</p><p>For example, an index on (LastAccessDate, Id) is more efficient than the reverse if most queries filter by date. Also, avoid redundant indexes—tools like sp_BlitzIndex or pg_stat_user_indexes can help identify unused or overlapping ones.</p><h3>4. Use INCLUDE Columns Wisely</h3><p>INCLUDE columns let you cover more queries without bloating the index key. This is useful when you want to avoid lookups but don’t need the column for sorting or filtering.</p><p>For example, when creating an index to search by username, it’s a good idea to include additional fields such as email_address, first_name, and last_name—especially if these fields are expected to be retrieved in the query. Including them in the index can help avoid extra key lookups during query execution, leading to more efficient performance.</p><h3>5. Watch for Storage and Maintenance Costs</h3><p>Indexes speed up reads but slow down writes. Each insert, update, or delete must also update the indexes. Monitor index size and fragmentation regularly.</p><p>We estimated ~5GB per index in one deployment and verified disk space before rollout. Also, remember to drop unused indexes — SQL Server’s recommendations can sometimes lead to unnecessary overhead.</p><h3>6. Test in Production-like Environments</h3><p>Always test index changes in a staging environment with production-like data. Index performance can vary dramatically based on data volume and distribution.</p><p>We once created an index that looked great in dev but wasn’t used in prod due to subtle differences in query plans.</p><h3>7. Automate and Review</h3><p>Use migrations (like Flyway, liquibase) to manage index changes consistently. Wrap them in transactions and include error handling. Also, review naming conventions — consistency helps with debugging and maintenance.</p><h3>8. Estimate Index Size Before Deployment</h3><p>Before pushing new indexes to production, estimate their size and impact on storage. This helps avoid surprises — especially in environments with limited disk space.</p><p>Here are two useful SQL Server queries:</p><pre><br>-- Estimate index size using partition stats<br>SELECT<br>    i.name                  AS IndexName,<br>    SUM(s.used_page_count) * 8   AS IndexSizeKB<br>FROM sys.dm_db_partition_stats  AS s <br>JOIN sys.indexes                AS i<br>ON s.[object_id] = i.[object_id] AND s.index_id = i.index_id<br>WHERE s.[object_id] = object_id(&#39;dbo.table_name&#39;)<br>GROUP BY i.name<br>ORDER BY i.name;<br><br><br>-- Estimate index size using physical stats (detailed mode)<br>SELECT<br>    i.name              AS IndexName,<br>    SUM(page_count * 8) AS IndexSizeKB<br>FROM sys.dm_db_index_physical_stats(<br>    db_id(), object_id(&#39;dbo.table_name&#39;), NULL, NULL, &#39;DETAILED&#39;) AS s<br>JOIN sys.indexes AS i<br>ON s.[object_id] = i.[object_id] AND s.index_id = i.index_id<br>GROUP BY i.name<br>ORDER BY i.name;</pre><p>These help validate disk usage and identify bloated or redundant indexes.</p><h3>Final Thoughts</h3><p>Indexing is both an art and a science. Done right, it can make your application feel snappy and responsive. Done wrong, it can quietly drag down performance. So take the time to understand your data, your queries, and your tools — and index with intent.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eab33197854a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Should You Partition Your User Login Table?]]></title>
            <link>https://gabanikita18.medium.com/should-you-partition-your-user-login-table-35a216ea3cbc?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/35a216ea3cbc</guid>
            <category><![CDATA[database-design]]></category>
            <category><![CDATA[large-data-volumes]]></category>
            <category><![CDATA[partitioning]]></category>
            <category><![CDATA[database]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Thu, 05 Jun 2025 19:19:08 GMT</pubDate>
            <atom:updated>2025-06-05T19:28:43.533Z</atom:updated>
            <content:encoded><![CDATA[<p>Partitioning is one of those database optimization techniques that can be a game-changer — or a time-waster — depending on how and when you use it.</p><p>One of the most common questions I hear is:</p><blockquote><em>“Should I partition my user login table?”</em></blockquote><p>The short answer? It depends.</p><p>In this guide, we’ll explore when partitioning a login table makes sense, when it doesn’t, and how to do it right if you decide to go down that path.</p><h3>🔍 What Is Partitioning?</h3><p>Partitioning splits a large table into smaller, more manageable chunks called partitions. These partitions can be queried and maintained independently, even though they appear as one logical table.</p><h3>Benefits of Partitioning:</h3><ul><li>🚀 Faster queries (especially time-based)</li><li>🧹 Easier data cleanup and archiving</li><li>🔧 Reduced maintenance overhead</li><li>⚙️ Better parallelism for large workloads</li></ul><p>But it’s not a free lunch — partitioning adds complexity and should be used with care.</p><h3>💡 When Partitioning a Login Table Makes Sense</h3><p>User login tables can grow rapidly, especially in high-traffic apps or platforms. Here are four scenarios where partitioning is a smart move:</p><h3>1. Massive Table Size</h3><p>If your login table has tens or hundreds of millions of rows, and it’s growing daily, performance will eventually suffer.</p><p>✅ Best approach: Use range partitioning on login_time.</p><h3>2. Frequent Time-Based Queries</h3><p>Do you often run queries like:</p><ul><li>“Logins in the last 7 days”</li><li>“Delete logins older than 90 days”</li><li>“Monthly login trends”</li></ul><p>If so, partitioning by time allows the database to skip irrelevant partitions — this is called partition pruning, and it can drastically speed up queries.</p><h3>3. Regular Archiving or Deletion</h3><p>If you need to delete old logins regularly (e.g., for GDPR compliance), partitioning makes this painless.</p><p>Instead of:</p><pre>DELETE FROM user_logins WHERE login_time &lt; &#39;2024-01-01&#39;;</pre><p>You can simply:</p><pre>ALTER TABLE user_logins DROP PARTITION p_2023;</pre><p>⚡ Instant deletion. No row locks. No long-running queries.</p><h3>4. Skewed Login Patterns</h3><p>If some users log in far more than others, or if traffic varies by region or tenant:</p><ul><li>Use hash partitioning on user_id to balance load.</li><li>Use list partitioning by region or tenant for targeted queries.</li></ul><h3>🛑 When You Should Not Partition</h3><p>Partitioning isn’t always the answer. Avoid it if:</p><ul><li>Your table has &lt;10 million rows</li><li>You’re not seeing performance issues</li><li>Most queries scan the entire table</li><li>You don’t archive or delete data often</li><li>You want to keep your schema simple</li></ul><p>Adding partitions can slow down inserts, complicate query planning, and increase operational overhead if not truly needed.</p><h3>🧠 Rule of Thumb</h3><blockquote><em>Only partition when your data is large and your queries can benefit from it.</em></blockquote><h3>🛠 Recommended Strategy: Keep It Simple</h3><p>If partitioning makes sense, start with this approach:</p><ul><li>✅ Use range partitioning on login_time</li><li>📆 Create monthly partitions (e.g., 2024_01, 2024_02)</li><li>🔁 Automate future partitions via cron jobs or migrations</li><li>🧪 Use partitioned indexes sparingly — test before deploying</li></ul><h3>📌 Example DDL (PostgreSQL)</h3><pre><br>CREATE TABLE user_logins (<br>  user_id UUID,<br>  login_time TIMESTAMP NOT NULL,<br>  device TEXT,<br>  ip_address TEXT<br>) PARTITION BY RANGE (login_time);<br><br>CREATE TABLE user_logins_2024_01 PARTITION OF user_logins<br>  FOR VALUES FROM (&#39;2024-01-01&#39;) TO (&#39;2024-02-01&#39;);</pre><h3>🧭 Other Types of Partitioning: Know Your Options</h3><p>While range partitioning is often the go-to for login tables, it’s not the only strategy available. Depending on your data and access patterns, other partitioning types might be a better fit.</p><p>Here’s a quick overview:</p><h3>1. Range Partitioning</h3><ul><li>How it works: Splits data based on a range of values (e.g., dates).</li><li>Best for: Time-series data like login events or logs.</li><li>Example: Monthly partitions by login_time.</li></ul><h3>2. List Partitioning</h3><ul><li>How it works: Divides data based on a list of discrete values.</li><li>Best for: Categorical data like region, status, or tenant_id.</li><li>Example: Separate partitions for US, CA, EU.</li></ul><h3>3. Hash Partitioning</h3><ul><li>How it works: Uses a hash function to evenly distribute rows.</li><li>Best for: Uniform distribution when no natural range or list exists.</li><li>Example: Partitioning by user_id to balance load.</li></ul><h3>4. Composite Partitioning</h3><ul><li>How it works: Combines two methods (e.g., range + hash).</li><li>Best for: Complex datasets with multi-dimensional access patterns.</li><li>Example: Range by login_time, then hash by user_id.</li></ul><h3>5. Interval Partitioning</h3><ul><li>How it works: Like range, but partitions are created automatically as new data arrives.</li><li>Best for: Time-series data with unpredictable growth.</li><li>Example: Auto-create monthly partitions as new logins come in.</li></ul><h3>✨ Final Thoughts</h3><p>Partitioning your user login table can unlock serious performance and maintenance benefits — but only when your data and access patterns justify it.</p><p>Avoid premature optimization. Monitor your growth, analyze your queries, and make data-driven decisions.</p><p>💬 Have questions or want to share your experience? Drop a comment or connect with me on <a href="https://www.linkedin.com/in/nikitagaba/">[LinkedIn] </a>— I’d love to hear your thoughts!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35a216ea3cbc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ What is Retrieval-Augmented Generation (RAG) and How Does It Work?]]></title>
            <link>https://gabanikita18.medium.com/what-is-retrieval-augmented-generation-rag-and-how-does-it-work-8a680f02a4fd?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a680f02a4fd</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[rags]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Thu, 05 Jun 2025 16:53:03 GMT</pubDate>
            <atom:updated>2025-06-05T16:53:03.839Z</atom:updated>
            <content:encoded><![CDATA[<p>In the rapidly evolving world of AI, large language models (LLMs) like <strong>GPT, Claude </strong>and <strong>Gemini</strong> are incredibly powerful — but they have a limitation: they don’t always know everything, especially when it comes to domain-specific or up-to-date information.</p><p>That’s where Retrieval-Augmented Generation (RAG) comes in.</p><h3>🧠 What is RAG?</h3><p>RAG is an AI framework that enhances the capabilities of LLMs by combining them with external knowledge sources — like internal company documents, databases, or proprietary content — without retraining the model.</p><p>This means you can get accurate, context-aware responses from an AI system, even when the information isn’t part of the model’s original training data.</p><h3>🛠️ Why Use RAG?</h3><p>Traditional LLMs are trained on vast amounts of public data, but they can struggle with:</p><ul><li>Specialized knowledge (e.g., internal company policies)</li><li>Confidential or private data</li><li>Rapidly changing information</li></ul><p>RAG solves this by retrieving relevant content from a curated knowledge base and using it to generate grounded, reliable responses.</p><h3>🔄 How RAG Works: Step-by-Step</h3><p>Let’s break down the RAG process:</p><h3>1. Prompt Encoding</h3><p>The user’s question is converted into a high-dimensional vector using token embeddings (e.g., BERT or GPT). This vector captures the semantic meaning of the prompt.</p><h3>2. Knowledge Base Preparation</h3><p>Internal documents (like a company’s mobile policy) are:</p><ul><li>Split into smaller, manageable chunks</li><li>Embedded into vectors</li><li>Stored in a vector database with unique chunk IDs</li></ul><h3>3. Retrieval</h3><p>The system compares the prompt vector with document vectors using distance metrics (like dot product or cosine similarity) to find the most relevant chunks.</p><h3>4. Augmented Query Creation</h3><p>The retrieved content is combined with the original prompt to form an augmented query.</p><h3>5. Response Generation</h3><p>The LLM uses this enriched query to generate a response that is both fluent and grounded in the retrieved knowledge.</p><h3>📊 Behind the Scenes: Embeddings and Distance Metrics</h3><ol><li>Token Embedding: Each word or sub-word is transformed into a vector using pre-trained models.</li><li>Vector Averaging: The average of token vectors creates a single vector representation for the prompt or document chunk.</li><li>Distance Metrics:</li></ol><ul><li>Dot Product: Measures alignment and magnitude.</li><li>Cosine Similarity: Measures directional similarity (angle between vectors).</li><li>Cosine Similarity: Measures directional similarity (angle between vectors).</li></ul><p>These metrics help identify the most relevant chunks of information to include in the response.</p><h3>🧪 Real-World Example: Company Mobile Policy</h3><p>Imagine asking a chatbot about your company’s mobile policy. Since this policy isn’t publicly available, a standard LLM might hallucinate or guess.</p><p>With RAG:</p><ul><li>The chatbot retrieves the actual policy from the internal knowledge base.</li><li>It generates a response grounded in the real document.</li><li>You get an accurate, trustworthy answer.</li></ul><h3>🚀 Why RAG is a Game-Changer</h3><ul><li>✅ No need to retrain models for every new domain</li><li>✅ Enables secure, private knowledge integration</li><li>✅ Reduces hallucinations and improves accuracy</li><li>✅ Scales easily across industries and use cases</li></ul><h3>💬 Final Thoughts</h3><p>RAG is a powerful bridge between general-purpose AI and domain-specific intelligence. Whether you’re building a smart chatbot, an enterprise search tool, or a knowledge assistant, RAG can help you deliver reliable, context-aware responses — at scale.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a680f02a4fd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Supercharge Your GitHub Actions with act and yamllint]]></title>
            <link>https://gabanikita18.medium.com/supercharge-your-github-actions-with-act-and-yamllint-b280479208d1?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/b280479208d1</guid>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[act]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Wed, 04 Jun 2025 04:46:32 GMT</pubDate>
            <atom:updated>2025-06-04T04:46:32.043Z</atom:updated>
            <content:encoded><![CDATA[<p>GitHub Actions has revolutionized CI/CD workflows by making automation seamless and deeply integrated into your repositories. But if you’ve ever found yourself frustrated by slow feedback loops or cryptic YAML errors, you’re not alone.</p><p>Enter two powerful tools: act and yamllint. These utilities can dramatically improve your GitHub Actions development experience by enabling local testing and YAML validation before you ever push a commit.</p><h3>🚀 What is act?</h3><p>act is a command-line tool that lets you run GitHub Actions locally. Instead of pushing changes to GitHub and waiting for the CI to run, act executes your workflows in a local Docker container, giving you instant feedback.</p><h3>🔧 Why Use act?</h3><ul><li>Faster iteration: Test workflows in seconds, not minutes.</li><li>Offline development: No need for internet access to test workflows.</li><li>Debugging made easy: See logs and outputs directly in your terminal.</li></ul><h3>🛠️ Getting Started with act</h3><ol><li>Install Docker (required for act to run workflows).</li><li>Install act:</li></ol><pre>brew install act        # macOS<br>choco install act-cli   # Windows</pre><p>Run your workflow:</p><pre>act</pre><p>Simulate specific events:</p><pre>act push<br>act pull_request</pre><h3>🧪 More Usage Examples for act</h3><h3>✅ Run a Specific Job</h3><pre>act -j build</pre><h3>✅ Simulate a Pull Request Event</h3><pre>act pull_request</pre><h3>✅ Use Secrets Locally</h3><p>Create a .secrets file:</p><pre>MY_SECRET=supersecretvalue</pre><p>Then run:</p><pre>act --secret-file .secrets</pre><h3>✅ Use a Custom Docker Image</h3><pre>act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latest</pre><h3>🧹 What is yamllint?</h3><p>yamllint is a linter for YAML files. It checks for syntax errors, formatting issues, and even style problems.</p><h3>🧠 Why Use yamllint?</h3><ul><li>Catch syntax errors early: Avoid frustrating CI failures due to indentation or formatting.</li><li>Enforce consistency: Maintain clean and readable YAML files.</li><li>Customizable rules: Tailor linting to your team’s style guide.</li></ul><h3>🛠️ Getting Started with yamllint</h3><p>Install yamllint:</p><pre>pip install yamllint</pre><p>Lint a file or directory:</p><pre>yamllint .github/workflows/</pre><h3>🧪 More Usage Examples for yamllint</h3><h3>✅ Lint All YAML Files in a Project</h3><pre>find . -name &quot;*.yml&quot; -o -name &quot;*.yaml&quot; | xargs yamllint</pre><h3>✅ Use a Custom Configuration</h3><p>Create a .yamllint file:</p><pre>extends: default<br><br>rules:<br>  line-length:<br>    max: 100<br>  indentation:<br>    spaces: 2</pre><p>Then run:</p><pre>yamllint -c .yamllint .github/workflows/</pre><h3>✅ Add to Pre-commit Hooks</h3><p>Add this to .pre-commit-config.yaml:</p><pre>- repo: https://github.com/pre-commit/mirrors-yamllint<br>  rev: v1.32.0<br>  hooks:<br>    - id: yamllint</pre><p>Then install:</p><pre>pre-commit install</pre><h3>🧰 Combine the Power of Both</h3><p>Here’s a simple command to lint and test your workflows locally:</p><pre>yamllint .github/workflows/ &amp;&amp; act</pre><h3>🏁 Final Thoughts</h3><p>By integrating act and yamllint into your GitHub Actions workflow, you’ll save time, reduce errors, and gain confidence in your CI/CD pipelines. These tools are lightweight, easy to use, and incredibly effective.</p><p>Start using them today and take your GitHub Actions game to the next level!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b280479208d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Experience with Apache Superset]]></title>
            <link>https://gabanikita18.medium.com/first-experience-with-apache-superset-6f9056da6f6f?source=rss-8f6aa918f7e6------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f9056da6f6f</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[bi-tools]]></category>
            <category><![CDATA[apache-superset]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <dc:creator><![CDATA[Nikita Gaba]]></dc:creator>
            <pubDate>Fri, 28 May 2021 09:09:31 GMT</pubDate>
            <atom:updated>2023-03-10T19:49:10.492Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Sample orders received from different sources to a target city" src="https://cdn-images-1.medium.com/max/721/1*k2zMSanhrdh4XLLRFvR9DQ.png" /><figcaption>Sample orders received from different target cities</figcaption></figure><p>Apache Superset is an Open Source Business Intelligence web application useful for Data Visualization and Data Exploration. This is my first experience with a BI Tool, but must say the tool looks quite promising in terms of task achievement and usability. Being an open source tool under the Apache License 2.0 and with its integration with docker, a large number of database engines, caching layer and cloud, makes it a go tool for exploration.</p><p>I won’t be re-iterating what is apache superset , the documentation here <a href="https://superset.apache.org/docs/intro">https://superset.apache.org/docs/intro</a> explains it in detail. But rather I would be sharing my first experience with the tools and how I resolved some of the initial road blockers.</p><p><strong>First step towards tool exploration: Installation</strong></p><ol><li><strong>Installation on personal windows machine using docker hub</strong> : Just follow through the instructions here : <a href="https://superset.apache.org/docs/installation/installing-superset-using-docker-compose">https://superset.apache.org/docs/installation/installing-superset-using-docker-compose</a></li><li><strong>Installation on a Linux AWS EC2 Machine: </strong>One needs to install docker , docker compose, git and clone the superset repository and simple run the docker compose. You can follow through the detailed instructions for docker version of superset in the gist here:<strong> </strong><a href="https://gist.github.com/nikitasethgaba/cfe81dac18dc6a19fa16bd14e706b93b">https://gist.github.com/nikitagaba/cfe81dac18dc6a19fa16bd14e706b93b</a>. <br>If you are looking for installation from scratch , You may refer to this gist as well : <a href="https://gist.github.com/nikitasethgaba/64d13be43ca310d9dcbdc4e44b923964">https://gist.github.com/nikitagaba/64d13be43ca310d9dcbdc4e44b923964</a></li></ol><p>I had network restrictions with in my AWS VPC setup , so definitely installation on EC2 was not that straight forward, But I managed to get this working with in 2 days. So next task was to get the hands dirty 😊</p><p><strong>Some tests with real data:</strong></p><ol><li><strong>Database configuration:</strong> For me database was Mysql configured on RDS , Make sure to add SQLAlchemy Dialect, since the tool is based on Python, SQLAlchemy has been used for ORM: <br><strong>For Mysql it is :</strong> mysql+mysqldb://USERNAME:PASSWORD@HOST:PORT/SCHEMA</li><li>Once the test connection is success, save the database and you are good to go to start working with SQL Lab, You may go to <strong>SQL Lab</strong> tab or <strong>Saved Queries</strong> in the Data tab and start writing your sql queries and create the visualizations on dashboards.</li><li>So far I have explored working with charts, filter boxes , graphs and word clouds, I found the tool very easy to use, especially when one is familiar with writing sql queries. Detailed information on creating visualization can be found here, I followed the same <a href="https://superset.apache.org/docs/creating-charts-dashboards/exploring-data">https://superset.apache.org/docs/creating-charts-dashboards/exploring-data</a></li></ol><figure><img alt="Sales percentage of type 1 &amp; type 2 categories." src="https://cdn-images-1.medium.com/max/440/1*klHqux_QSPmDE7XlXLhqDQ.png" /><figcaption>Sales percentage of type 1 &amp; type 2 categories.</figcaption></figure><p>I will be further exploring on the authentication with different rights for the dashboards. Let me know in comments your learning experiences with this tool , and also any ideas for further exploration are also welcomed.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f9056da6f6f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>