<?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 Kajaani Balabavan on Medium]]></title>
        <description><![CDATA[Stories by Kajaani Balabavan on Medium]]></description>
        <link>https://medium.com/@kajaani1705?source=rss-3ecdd589887d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Kajaani Balabavan on Medium</title>
            <link>https://medium.com/@kajaani1705?source=rss-3ecdd589887d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 12:07:08 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kajaani1705/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[How I Published My First Python Package to PyPI — A Step-by-Step Guide]]></title>
            <link>https://medium.com/@kajaani1705/how-i-published-my-first-python-package-to-pypi-a-step-by-step-guide-dd0635d3913b?source=rss-3ecdd589887d------2</link>
            <guid isPermaLink="false">https://medium.com/p/dd0635d3913b</guid>
            <category><![CDATA[pypi]]></category>
            <category><![CDATA[pyproject]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Kajaani Balabavan]]></dc:creator>
            <pubDate>Tue, 03 Jun 2025 20:26:15 GMT</pubDate>
            <atom:updated>2025-06-03T20:27:46.826Z</atom:updated>
            <content:encoded><![CDATA[<h3>How I Published My First Python Package to PyPI — A Step-by-Step Guide</h3><h3>🧠 Why I Did This</h3><p>As a Python developer, I’ve used hundreds of packages from PyPI — but I had never published one myself. I wanted to go hands-on and understand the full process of packaging, testing, and publishing a Python module to the Python Package Index (PyPI).</p><p>This guide walks you through exactly how I published my first package: kajaani-passgen — a simple password generator written in Python.</p><p>If you’re looking to publish your own Python package, this article is for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UP5DDj4dSteFbiIkDsD-bQ.png" /></figure><h3>🔧 What I Built: kajaani-passgen</h3><p>It’s a simple utility that generates secure, random passwords with options for length, digits, and special characters. Great as a starter project to learn PyPI publishing.</p><h3>🗂️ Folder Structure</h3><p>Here’s the clean folder structure I used:</p><pre>kajaani-passgen/<br>├── kajaani_passgen/<br>│   ├── __init__.py<br>│   └── generator.py<br>├── tests/<br>│   ├── __init__.py<br>│   └── test_generator.py<br>├── pyproject.toml<br>├── README.md<br>├── LICENSE<br>├── MANIFEST.in</pre><h3>1️⃣ Create the Package Code</h3><h4>kajaani_passgen/generator.py</h4><pre>import random<br>import string<br><br><br>def generate_password(length=12, use_digits=True, use_specials=True):<br>    chars = string.ascii_letters<br>    if use_digits:<br>        chars += string.digits<br>    if use_specials:<br>        chars += string.punctuation<br><br>    if length &lt; 1:<br>        raise ValueError(&quot;Password length must be at least 1&quot;)<br><br>    return &#39;&#39;.join(random.choice(chars) for _ in range(length))</pre><h4>kajaani_passgen/__init__.py</h4><pre>from .generator import generate_password<br><br>__all__ = [&#39;generate_password&#39;]</pre><h3>2️⃣ Add a Unit Test</h3><h4>tests/test_generator.py</h4><pre>import unittest<br>from kajaani_passgen import generate_password<br><br>class TestPasswordGenerator(unittest.TestCase):<br>    def test_default_length(self):<br>        pwd = generate_password()<br>        self.assertEqual(len(pwd), 12)<br><br>    def test_custom_length(self):<br>        pwd = generate_password(length=20)<br>        self.assertEqual(len(pwd), 20)<br><br>    def test_no_digits_no_specials(self):<br>        pwd = generate_password(use_digits=False, use_specials=False)<br>        self.assertTrue(all(c.isalpha() for c in pwd))<br><br>if __name__ == &#39;__main__&#39;:<br>    unittest.main()</pre><p>Run tests with:</p><pre>python -m unittest tests/test_generator.py</pre><h3>3️⃣ Add pyproject.toml</h3><p>Modern Python packaging uses pyproject.toml instead of setup.py.</p><pre>[project]<br>name = &quot;kajaani-passgen&quot;<br>version = &quot;0.1.0&quot;<br>description = &quot;A simple password generator package&quot;<br>authors = [<br>    { name=&quot;your-name&quot;, email=&quot;your-email&quot; }<br>]<br>license = { text = &quot;MIT&quot; }<br>readme = &quot;README.md&quot;<br>requires-python = &quot;&gt;=3.7&quot;<br>keywords = [&quot;password&quot;, &quot;generator&quot;, &quot;random&quot;, &quot;secure&quot;]<br>classifiers = [<br>    &quot;Programming Language :: Python :: 3&quot;,<br>    &quot;License :: OSI Approved :: MIT License&quot;,<br>    &quot;Operating System :: OS Independent&quot;,<br>]<br><br>[project.urls]<br>Homepage = &quot;https://github.com/your-user-name/kajaani-passgen&quot;<br><br>[build-system]<br>requires = [&quot;setuptools&quot;, &quot;wheel&quot;]<br>build-backend = &quot;setuptools.build_meta&quot;</pre><h3>4️⃣ Add README.md, LICENSE, and MANIFEST.in</h3><h4>MANIFEST.in</h4><pre>include README.md<br>include LICENSE</pre><p>This ensures PyPI includes your docs and license.</p><h3>5️⃣ Build the Package</h3><p>Install required tools:</p><pre>pip install build twine</pre><p>Then build the package:</p><pre>python -m build</pre><p>This creates a dist/ folder with .whl and .tar.gz files.</p><h3>6️⃣ Upload to PyPI</h3><p>First, get your <a href="https://pypi.org/manage/account/token/">PyPI API token</a>.</p><p>Then upload:</p><pre>python -m twine upload dist/*</pre><p>When prompted, enter your token.</p><p>💡 <strong>Tip:</strong> PyPI enforces unique names. If your name is too similar to another project, you’ll get a 400 Bad Request error. Just rename the package to something more unique.</p><h3>7️⃣ Use Your Package 🎉</h3><pre>pip install kajaani-passgen</pre><p>Then in Python:</p><pre>from kajaani_passgen import generate_password<br><br># Use the function with default settings<br>password = generate_password()<br>print(&quot;Generated password:&quot;, password)<br><br># Custom password example<br>custom_pwd = generate_password(length=16, use_digits=True, use_specials=False)<br>print(&quot;Custom password:&quot;, custom_pwd)</pre><h3>📦 Final Thoughts</h3><p>Publishing to PyPI isn’t as scary as it sounds. Once you’ve done it once, you’ll feel empowered to package and share anything you build.</p><p>✅ You learn:</p><ul><li>Clean project structure</li><li>Writing and running tests</li><li>Building and distributing packages</li><li>Using modern packaging tools like pyproject.toml</li></ul><h3>⭐ Want to Try It?</h3><p>You can install my package here:</p><pre>pip install kajaani-passgen</pre><p>Then generate your own secure passwords in Python!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dd0635d3913b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Setting Up Apache Spark on Windows: A Developer’s Survival Guide]]></title>
            <link>https://medium.com/@kajaani1705/setting-up-apache-spark-on-windows-a-developers-survival-guide-9e8484c57d5c?source=rss-3ecdd589887d------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e8484c57d5c</guid>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[java]]></category>
            <category><![CDATA[spark]]></category>
            <category><![CDATA[windows-11]]></category>
            <dc:creator><![CDATA[Kajaani Balabavan]]></dc:creator>
            <pubDate>Fri, 09 May 2025 21:10:04 GMT</pubDate>
            <atom:updated>2025-05-09T21:10:04.761Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Overcoming obstacles and achieving success in configuring Spark for music genre classification</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/0*Rgjha6xKJFLt3hzi.png" /></figure><h3>The Genesis of My Project</h3><p>Recently, I worked on a machine learning project to build a music genre classification system using Apache Spark’s MLlib. My goal was to expand upon an existing model I had seen that classified music into just “Pop” and “Metal” genres. I wanted to create a more comprehensive system capable of identifying multiple genres including pop, country, blues, jazz, reggae, rock, hip hop, and even custom categories — all accessible through an intuitive web interface.</p><p>What I didn’t anticipate was that configuring Apache Spark on Windows would become the most time-consuming aspect of the project. However, the lessons learned through this process proved invaluable.</p><h3>The Setup Challenge</h3><p>Apache Spark is a powerful distributed computing framework used for machine learning, big data processing, and analytics. According to <a href="https://spark.apache.org/docs/latest/">Spark’s documentation</a>:</p><blockquote><em>Spark runs on Java 8/11/17, Scala 2.12/2.13, Python 3.8+, and R 3.5+. Java 8 prior to version 8u371 support is deprecated as of Spark 3.5.0.</em></blockquote><p>For my environment, I selected <a href="https://spark.apache.org/downloads.html">Spark 3.5.5</a>, <a href="https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html">Java 11</a>, and <a href="https://www.python.org/downloads/">Python 3.9</a>. What appeared straightforward on paper quickly revealed itself to be a complex undertaking on Windows.</p><h3>Challenge #1: The Missing winutils.exe</h3><p>The first roadblock appeared immediately after installation when Spark failed to initialize, reporting missing Hadoop utilities. Unlike on Linux systems, Spark on Windows requires winutils.exe, which isn&#39;t included in the standard Hadoop distribution.</p><p>After extensive research, I discovered that I needed to:</p><ol><li>Create a dedicated hadoop/bin directory</li><li>Download and place the appropriate winutils.exe file from the <a href="https://github.com/cdarlint/winutils">winutils GitHub repository</a> inside it</li><li>Add this directory to my system’s PATH variable</li><li>Configure the HADOOP_HOME environment variable</li></ol><p>This solved the initial error, but my journey was far from complete.</p><h3>Challenge #2: The Critical hadoop.dll File</h3><p>Just when I thought I had resolved all the configuration issues, my model-saving functionality failed mysteriously. Further investigation revealed another missing component: hadoop.dll.</p><p>This dynamic link library is essential for Hadoop’s native methods on Windows. Without it, certain Spark operations — particularly those involving file system operations like saving models — will fail silently or with cryptic error messages.</p><h3>Complete Windows Setup Solution</h3><p>To properly configure Spark on Windows, I ultimately needed to:</p><ol><li><strong>Create a proper Hadoop directory structure</strong> (C:\hadoop\bin is recommended)</li><li><strong>Download the compatible </strong><strong>winutils.exe</strong> for your Hadoop version from the <a href="https://github.com/cdarlint/winutils">cdarlint/winutils repository</a></li><li><strong>Obtain the matching </strong><strong>hadoop.dll</strong> file from the same repository and place it in the same directory</li><li><strong>Set the environment variable</strong> HADOOP_HOME=C:\hadoop</li><li><strong>Add </strong><strong>%HADOOP_HOME%\bin to your system PATH</strong></li></ol><h3>Detailed Environment Configuration</h3><p>For a complete working setup, you’ll need to configure the following environment variables and PATH entries:</p><h4>Java Configuration:</h4><ol><li>Download and install <a href="https://www.oracle.com/java/technologies/javase/jdk11-archive-downloads.html">Java 11 JDK</a></li><li>Set JAVA_HOME=C:\Program Files\Java\jdk-11.x.x (use your actual JDK installation path)</li><li>Add %JAVA_HOME%\bin to your system PATH</li></ol><h4>Hadoop Configuration:</h4><ol><li>Create directory structure (e.g., C:\hadoop\bin)</li><li>Download appropriate winutils.exe and hadoop.dll from <a href="https://github.com/cdarlint/winutils">GitHub</a></li><li>Set HADOOP_HOME=C:\hadoop</li><li>Add %HADOOP_HOME%\bin to your system PATH</li></ol><h4>Python Configuration:</h4><ol><li>Install <a href="https://www.python.org/downloads/">Python 3.9</a></li><li>Add Python installation directory to your system PATH (e.g., C:\Python39 and C:\Python39\Scripts)</li><li>Ensure Python is accessible via command prompt by typing python --version</li></ol><h4>Spark Configuration:</h4><ol><li>Download <a href="https://spark.apache.org/downloads.html">Apache Spark</a> and extract to a directory (e.g., C:\spark)</li><li>Set SPARK_HOME=C:\spark</li><li>Add %SPARK_HOME%\bin to your system PATH</li></ol><p>These environment variables can be set in Windows by:</p><ol><li>Right-clicking on “This PC” and selecting “Properties”</li><li>Clicking on “Advanced system settings”</li><li>Clicking the “Environment Variables” button</li><li>Adding or modifying the variables in the “System variables” section</li></ol><p>With both files correctly installed and all environment variables properly configured, Spark’s file operations finally worked flawlessly.</p><h3>Challenge #3: Python Command Configuration</h3><p>Spark expects a python3 command to be available, which is standard on Unix-based systems but not on Windows. This mismatch caused Spark to fail when attempting to initialize PySpark.</p><p>The solution was to explicitly tell Spark which Python executable to use by setting two environment variables:</p><pre>set PYSPARK_PYTHON=python<br>set PYSPARK_DRIVER_PYTHON=python</pre><p>These settings ensured Spark could properly locate and utilize my Python installation.</p><h3>Challenge #4: Java Version Compatibility</h3><p>Despite the documentation stating that Java 17 was supported, I encountered persistent connection issues when using this version. After extensive troubleshooting, I downgraded to Java 11, which immediately resolved all connection problems.</p><p>This experience taught me that sometimes the most practical approach is to use a more mature, stable version rather than the latest release — especially when working with complex systems like Spark.</p><h3>Challenge #5: Multiple Python Installations</h3><p>The final obstacle involved managing multiple Python versions on my system. Spark was detecting and using an older Python version rather than my intended Python 3.9 installation.</p><p>The fix required adjusting my system’s PATH priority to ensure the correct Python version was found first. Once this was configured properly, Spark consistently used the appropriate Python environment.</p><h3>The Successful Implementation</h3><p>After overcoming these configuration challenges, I could finally focus on the core project: building an effective music genre classification system. With a properly configured environment, I successfully:</p><ul><li>Implemented an MLlib pipeline to process and classify song lyrics</li><li>Trained the model on a comprehensive dataset covering eight distinct music genres</li><li>Developed a responsive web interface for users to input lyrics and receive classifications</li><li>Created visualization components to display genre probability distributions</li><li>Achieved accuracy levels that exceeded my initial expectations</li></ul><h3>Key Takeaways for Windows Developers</h3><p>For those embarking on a similar journey with Spark on Windows, here are my essential recommendations:</p><ol><li><strong>Use Java 11</strong> instead of newer versions for optimal compatibility</li><li><strong>Install both </strong><strong>winutils.exe and </strong><strong>hadoop.dll</strong> in your Hadoop bin directory</li><li><strong>Configure all environment variables thoroughly:</strong></li></ol><ul><li>JAVA_HOME pointing to your JDK installation</li><li>HADOOP_HOME pointing to your Hadoop directory</li><li>SPARK_HOME pointing to your Spark installation</li><li>PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON set to your Python executable</li></ul><p>4.<strong> Add all bin directories to your system PATH:</strong></p><ul><li>%JAVA_HOME%\bin</li><li>%HADOOP_HOME%\bin</li><li>%SPARK_HOME%\bin</li><li>Your Python installation directory</li></ul><p>5.<strong> Manage PATH priorities carefully</strong> if you have multiple versions of development tools</p><p>6.<strong> Restart your development environment</strong> after making configuration changes</p><p>7.<strong> Test file system operations explicitly</strong> before diving into complex model development</p><p>Remember that improper environment configuration is the most common source of problems when setting up Spark on Windows, so double-check all paths and variables before troubleshooting other issues.</p><h3>Project Outcomes</h3><p>The final system successfully classifies song lyrics across multiple genres with impressive accuracy. The web interface provides an intuitive way for users to interact with the model, and the visualization components help illustrate the classification confidence across different genres.</p><p>The project architecture integrates:</p><ul><li>Apache Spark for distributed processing</li><li>MLlib for machine learning capabilities</li><li>A lightweight web framework for the user interface</li><li>Data visualization libraries to represent classification results</li><li>A comprehensive dataset created by merging multiple genre-specific collections</li></ul><h3>Conclusion</h3><p>While setting up Apache Spark on Windows presents significant challenges, the power and scalability it offers make it worth the effort. The initial configuration hurdles may be frustrating, but they’re surmountable with patience and methodical troubleshooting.</p><p>For data scientists and machine learning engineers working in Windows environments, understanding these configuration nuances can save countless hours of troubleshooting. Once properly configured, Spark provides an exceptional platform for building sophisticated machine learning applications like the genre classification system I developed.</p><p><em>Have you faced similar challenges with big data tools on Windows? What strategies worked for you? Share your experiences in the comments.</em></p><p><em>If you’re interested in exploring the complete project, including code and detailed setup instructions, visit my </em><a href="https://github.com/Kajaani-Balabavan/music-genre-classifier"><em>GitHub repository</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e8484c57d5c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Solving Authorization Timeout in DagsHub MLflow Integration with Kaggle Notebooks]]></title>
            <link>https://medium.com/@kajaani1705/solving-authorization-timeout-in-dagshub-mlflow-integration-with-kaggle-notebooks-019594166053?source=rss-3ecdd589887d------2</link>
            <guid isPermaLink="false">https://medium.com/p/019594166053</guid>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[mlflow]]></category>
            <category><![CDATA[dagshub]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[timeouterror]]></category>
            <dc:creator><![CDATA[Kajaani Balabavan]]></dc:creator>
            <pubDate>Thu, 02 Jan 2025 18:55:32 GMT</pubDate>
            <atom:updated>2025-01-02T19:05:26.655Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-KaZ8z6pU_qoj2fnXyNoDg.png" /><figcaption>DagsHub</figcaption></figure><p>When working with machine learning projects, tracking experiments is crucial for understanding and improving your models. <strong>DagsHub</strong>, combined with <strong>MLflow</strong>, offers a powerful toolset for experiment tracking. However, integrating DagsHub with Kaggle Notebooks can sometimes lead to issues, particularly with the authorization process. In this guide, I’ll share a streamlined approach to avoid authorization timeout errors and ensure smooth integration.</p><h3>The Problem</h3><p>Typically, to integrate DagsHub with Kaggle, you would use the following code snippet:</p><pre>import dagshub<br>import mlflow<br><br>dagshub.init(repo_owner=&#39;Kajaani-Balabavan&#39;, repo_name=&#39;deep-panel&#39;, mlflow=True)</pre><p>When executed, this code generates an authorization link that you need to click and approve. However, when saving or running the notebook, this process often fails due to a <strong>timeout error</strong>. This can be especially frustrating because the Kaggle environment might terminate the authorization session before it is completed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bC5H8l0bILl42A4abo838Q.png" /><figcaption>Timeout in Authorization</figcaption></figure><h3>The Solution: Using Kaggle Secrets</h3><p>Instead of relying on the interactive authorization process, you can use Kaggle’s <strong>Secrets Management</strong> feature to handle your DagsHub authentication seamlessly. Here’s how to do it:</p><h3>Step 1: Generate Your DagsHub Token</h3><ol><li>Navigate to the <strong>Settings</strong> section in your DagsHub account.</li><li>Generate an <strong>Access Token</strong> for your account.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*romHN-HgnKTjuRkbRpQJ_A.png" /><figcaption>Generate Token from DagsHub</figcaption></figure><h3>Step 2: Add the Token to Kaggle Secrets</h3><ol><li>In your Kaggle notebook, go to <strong>Add-ons &gt; Secrets</strong>.</li><li>Create a new secret, for example, DagsHub_Token, and paste your DagsHub token as the value.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/531/1*fAyT76qdtx_imnRb8INqkg.png" /><figcaption>Kaggle Secret</figcaption></figure><h3>Step 3: Update Your Notebook Code</h3><p>Replace the interactive authorization code with the following snippet:</p><pre>import os<br>from kaggle_secrets import UserSecretsClient<br><br># Retrieve the secret token from Kaggle Secrets<br>user_secrets = UserSecretsClient()<br>secret_value_0 = user_secrets.get_secret(&quot;DagsHub_Token&quot;)<br><br># Set environment variables for MLflow tracking<br>os.environ[&quot;MLFLOW_TRACKING_URI&quot;] = &quot;https://dagshub.com/Kajaani-Balabavan/deep-panel.mlflow&quot; # &quot;https://dagshub.com/&lt;username&gt;/&lt;repository&gt;.mlflow&quot;<br>os.environ[&quot;MLFLOW_TRACKING_USERNAME&quot;] = &quot;Kajaani-Balabavan&quot;<br>os.environ[&quot;MLFLOW_TRACKING_PASSWORD&quot;] = secret_value_0</pre><h3>Step 4: Verify the Integration</h3><p>After updating the code, you should be able to log experiments in MLflow without any timeout errors. The MLFLOW_TRACKING_URI is set to point directly to your DagsHub repository’s MLflow tracking server. The token stored in Kaggle Secrets is automatically used for authentication, bypassing the need for manual approval.</p><h3>Why This Works</h3><p>By storing the access token securely in Kaggle Secrets and setting the appropriate environment variables, you eliminate the need for an interactive authorization process. This approach ensures a consistent and error-free integration between Kaggle Notebooks and DagsHub MLflow.</p><h3>Conclusion</h3><p>This solution saves time and avoids the frustration of dealing with timeout errors. If you’re using DagsHub for experiment tracking in Kaggle, I recommend adopting this method to streamline your workflow.</p><p>Happy experimenting! If this guide helped you, feel free to share it with others facing similar issues.</p><h3>Keywords</h3><p>DagsHub, MLflow, Kaggle, experiment tracking, authorization timeout, Kaggle Secrets, machine learning workflows, error-free integration</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=019594166053" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Power BI: Customizing Slicer Interactions, Adding Search Options, and Dynamic Columns in…]]></title>
            <link>https://medium.com/@kajaani1705/mastering-power-bi-customizing-slicer-interactions-adding-search-options-and-dynamic-columns-in-7a9689c750f8?source=rss-3ecdd589887d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7a9689c750f8</guid>
            <dc:creator><![CDATA[Kajaani Balabavan]]></dc:creator>
            <pubDate>Mon, 29 Jan 2024 08:54:15 GMT</pubDate>
            <atom:updated>2024-01-29T08:54:15.664Z</atom:updated>
            <content:encoded><![CDATA[<h3>Mastering Power BI: Customizing Slicer Interactions, Adding Search Options, and Dynamic Columns in Power Query</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/705/1*jBFrECNTTPBRFejpLtKFbw.png" /><figcaption>Power BI</figcaption></figure><p><strong>Introduction</strong><br>Power BI offers a plethora of features for data visualization, and mastering its functionalities can greatly enhance your reporting capabilities. In this article, I’ll delve into three powerful techniques to customize your Power BI experience: disabling slicer interactions, adding a search option to slicers, and dynamically managing columns in Power Query.</p><p><strong>1. Disabling Interactions:</strong></p><p>Slicers offer an interactive means to filter data, but there are instances when you may wish to precisely control the visuals affected. Here’s how you can selectively disable slicer interactions for specific widgets:</p><p>— Click on the slicer you wish to modify.<br> — Navigate to the ribbon, click on “Format,” and choose “Edit Interactions.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/865/1*lcmmlNSjz5mwHLC_Knt4zQ.png" /></figure><p>— Two icons will appear on all visuals, providing the option to determine the slicer’s impact on each visual.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*-Fqe82IGS4QJmeEBuobv7w.png" /></figure><p>— To disable interaction for a visual, click on the “stop” button and confirm your selection.</p><p>Additionally, you can selectively disable interactions when selecting table rows.</p><p><strong>2. Adding Search Option to Slicer:</strong><br>Enhance the user experience by adding a search option to your slicers. This makes it easier for users to find specific values. Follow these steps:</p><p>— Select the slicer to which you want to add the search option.<br> — Click the three dots in the top right corner to access “More options.”<br> — Enable the “Search” option. This adds a search bar to the slicer’s dropdown list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/382/1*WwWkiBBCVN7UjMrkzaNcJw.png" /><figcaption>Enable search option</figcaption></figure><p><strong>3. Dynamic Columns in Power Query:</strong><br>Make your Power Query more flexible by dynamically managing the number of columns. This is particularly useful when dealing with changing data sources. Follow these steps:<br> — In Power Query Editor, choose “Advanced Editor.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*lTjdX3hc6TV71IvLoEaf6A.png" /><figcaption>Advanced Editor in Power Query</figcaption></figure><p>— Adjust the Columns value to make it dynamic or set Columns=null for automatic updates as the source changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEAoqEqMRM6khpP11McGmA.png" /><figcaption>set Columns=null</figcaption></figure><p>Now that you’ve mastered these Power BI techniques, imagine combining them for a seamless reporting experience. Customize slicer interactions, add search options for better navigation, and ensure dynamic columns to adapt to evolving datasets.</p><p><strong>Conclusion</strong><br>Empower your Power BI reports with these advanced techniques. By customizing slicer interactions, adding search options, and managing columns dynamically, you’ll create reports that not only convey insights but also offer a user-friendly and adaptable experience. Dive into the world of Power BI customization and elevate your data visualization game.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7a9689c750f8" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Step-by-Step Guide to Using PyTorch with Jupyter Notebook in VSCode]]></title>
            <link>https://medium.com/@kajaani1705/a-step-by-step-guide-to-using-pytorch-with-vscode-in-jupyter-notebook-f09c427f84e4?source=rss-3ecdd589887d------2</link>
            <guid isPermaLink="false">https://medium.com/p/f09c427f84e4</guid>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[pytorch]]></category>
            <category><![CDATA[vscode]]></category>
            <dc:creator><![CDATA[Kajaani Balabavan]]></dc:creator>
            <pubDate>Tue, 03 Oct 2023 04:46:21 GMT</pubDate>
            <atom:updated>2023-10-03T04:49:50.932Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*8hsVOVImncQmJTSJHp9Lqw.png" /></figure><p>PyTorch, a versatile deep learning framework, has gained prominence in the fields of Python, deep learning, and machine learning due to its dynamic computation graph, Pythonic interface, and robust community support. In this user guide, I’ll walk you through harnessing PyTorch’s capabilities within the Visual Studio Code (VSCode) Jupyter Notebook environment. I’ll cover installation, virtual environment setup, essential package installation, and more.</p><p><strong>Installation in a Virtual Environment</strong></p><p>To ensure an isolated development environment, it’s recommended to install PyTorch within a virtual environment. Follow these steps:</p><ul><li><strong>Install Conda (if not already installed): </strong>If you haven’t already, you can install Conda by following the instructions on the [<a href="https://docs.conda.io/en/latest/miniconda.html">official website</a>].</li><li><strong>Create a Virtual Environment: </strong>Open your terminal or command prompt and run the following command to create a virtual environment named “your_env_name” with Python 3.9:</li></ul><pre>conda create -n your_env_name python=3.9</pre><ul><li><strong>Activate the Virtual Environment: </strong>Once the virtual environment is created, activate it with the following command:</li></ul><pre>conda activate your_env_name</pre><ul><li><strong>Install PyTorch: </strong>With the virtual environment active, install PyTorch along with torchvision and torchaudio. For CPU-only support, you can use the following command:</li></ul><pre>conda install pytorch torchvision torchaudio cpuonly -c pytorch</pre><p>If you require GPU support or want a customized PyTorch build, you can visit the [<a href="https://pytorch.org/get-started/locally/">official PyTorch website]</a> to find the appropriate installation command.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8-j_0sNf4rZgSwUPeiidYg.png" /><figcaption>PyTorch official website</figcaption></figure><p><strong>Installing `ipykernel` for VSCode Jupyter Notebook</strong></p><p>To work with PyTorch in VSCode’s Jupyter Notebook, you’ll need to install the `ipykernel` package. Here’s how to do it:</p><ul><li><strong>Install `ipykernel`</strong>: Open your terminal with the “your_env_name” virtual environment activated and run the following command:</li></ul><pre>conda install -n your_env_name ipykernel - update-deps - force-reinstall</pre><ul><li><strong>Register the Kernel: </strong>After installing `ipykernel`, register it with Jupyter by running the following command:</li></ul><pre>python -m ipykernel install - user - name=your_env_name</pre><p>This command registers the “your_env_name” virtual environment as a Jupyter kernel.</p><p><strong>Using PyTorch in VSCode Jupyter Notebook</strong></p><p>With PyTorch and the Jupyter kernel set up, you’re now ready to work with PyTorch in VSCode’s Jupyter Notebook:</p><ul><li><strong>Open VSCode with the Environment Setup: </strong>You can directly open Visual Studio Code with your virtual environment activated and ready for PyTorch development. In your terminal with the virtual environment active, simply run the following command:</li></ul><pre>code .</pre><p>This command will launch VSCode in the current directory, with the “your_env_name” virtual environment already activated.</p><ul><li><strong>Select the Kernel:</strong> When creating or opening a Jupyter Notebook, make sure to select the “your_env_name” kernel associated with your virtual environment. This step ensures that the environment is correctly configured for your notebook session within VSCode.</li><li><strong>Start Coding:</strong> You can now write PyTorch code in your Jupyter Notebook cells. Begin by importing PyTorch:</li></ul><pre>import torch</pre><ul><li><strong>Environment Activation Outside of VSCode:</strong> While selecting the kernel in VSCode is sufficient for notebook sessions, it’s important to remember that when working outside of VSCode, such as running Python scripts or installing packages, you should activate the virtual environment using your terminal or command prompt. Activation sets the environment variables and paths, ensuring that the correct Python environment is used for tasks beyond Jupyter Notebook sessions.</li></ul><p>By activating the virtual environment in the terminal when needed, you ensure that the correct Python environment, including all installed packages and dependencies, is utilized for tasks outside of the Jupyter Notebook environment within VSCode.</p><p>It’s important to note that there’s no strict requirement for your virtual environment and Jupyter Notebook files to be in the same directory. You can organize them as per your project’s requirements. Just ensure that you activate the correct virtual environment and select the appropriate kernel in VSCode, and you’ll be able to seamlessly work with PyTorch in Jupyter Notebooks, even if they are located in different places on your file system.</p><p>With these steps, you’re well on your way to mastering PyTorch in the VSCode Jupyter Notebook environment. Enjoy exploring the world of deep learning and building powerful machine-learning models with ease and flexibility. Happy coding!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f09c427f84e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>