<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Raman Butta</title>
    <description>The latest articles on DEV Community by Raman Butta (@raman_butta).</description>
    <link>https://dev.to/raman_butta</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2662988%2Fcd498dbf-a78b-42d3-bd32-6be3e6014352.jpg</url>
      <title>DEV Community: Raman Butta</title>
      <link>https://dev.to/raman_butta</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/raman_butta"/>
    <language>en</language>
    <item>
      <title>My initial settings on Mac</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Sat, 20 Dec 2025 04:11:34 +0000</pubDate>
      <link>https://dev.to/raman_butta/my-initial-settings-on-mac-471h</link>
      <guid>https://dev.to/raman_butta/my-initial-settings-on-mac-471h</guid>
      <description>&lt;h2&gt;
  
  
  XCode Command Line Tools
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;xcode-select --install
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Homebrew
&lt;/h2&gt;

&lt;p&gt;Then go to homebrew's website and download the .pkg installer and install it. After that add it to your system path using this terminal command :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;eval "$(/opt/homebrew/bin/brew shellenv)"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the installation by :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew doctor
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It should say “Your system is ready to brew”&lt;br&gt;
Homebrew lets you easily install the core development tools we'll need subsequently.&lt;/p&gt;

&lt;p&gt;Use Homebrew to install the major tools needed:&lt;/p&gt;
&lt;h2&gt;
  
  
  Git
&lt;/h2&gt;

&lt;p&gt;Git: Install version control (if you haven’t already):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew install git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(Homebrew’s Git will be in your PATH)&lt;/p&gt;

&lt;h2&gt;
  
  
  Node.js
&lt;/h2&gt;

&lt;p&gt;Node.js and npm: Install the LTS Node (includes npm). You’ll need Node 18+ for modern Next.js:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;brew update
brew install node
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This provides node and npm (npm v9+). You can check with &lt;code&gt;node -v&lt;/code&gt; command. The version should be ≥ v20.9 for nextjs to work later.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python
&lt;/h2&gt;

&lt;p&gt;Note that Mac comes with a pre-installed system python (say 3.9.x) which you can check using:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which python3
python3 --version
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Never mess with the system python or try to upgrade it using say &lt;code&gt;brew&lt;/code&gt;. Instead install an environment manager like &lt;strong&gt;conda&lt;/strong&gt; to create separate python envs with your desired version (e.g. py3.10) for different categories of your projects. &lt;/p&gt;

&lt;h2&gt;
  
  
  Conda
&lt;/h2&gt;

&lt;p&gt;For that go to the Miniconda website and download the GUI .pkg installer for your system. Install it. Check it using &lt;code&gt;conda --version&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VSCode
&lt;/h2&gt;

&lt;p&gt;You can download the installer from the VSCode website. This is a .app file and not a .pkg file. So double-clicking it from your Downloads folder will directly open the application. But this behaves like a "temporary instance" and doesn't install permanently. So you must drag the Visual Studio Code.app → Finder sidebar → Applications.&lt;br&gt;
This makes it a proper, permanent installation.&lt;br&gt;
Then you need to generate an ssh key in your Mac and connect that to your Github account to access github repos from the vscode terminal. Refer to my tutorial &lt;a href="https://medium.com/@raman.butta/understanding-ssh-for-github-c4ed4a10b7f0" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>tooling</category>
      <category>node</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Installing &amp; Working with Python - in Ubuntu 24.04</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Thu, 20 Nov 2025 12:59:47 +0000</pubDate>
      <link>https://dev.to/raman_butta/installing-working-with-python-in-ubuntu-2404-3dc5</link>
      <guid>https://dev.to/raman_butta/installing-working-with-python-in-ubuntu-2404-3dc5</guid>
      <description>&lt;p&gt;This approach is based on my personal experience, and is one of many approaches you'll find online.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1 : Downloading
&lt;/h2&gt;

&lt;p&gt;Go to the Anaconda website and download the shell script (.sh file) of Miniconda.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2 : Create a folder
&lt;/h2&gt;

&lt;p&gt;Create a folder say &lt;code&gt;myfolder&lt;/code&gt; at your suitable location.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;myfolder
&lt;span class="nb"&gt;cd &lt;/span&gt;myfolder
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste the miniconda.sh file inside this folder (optional, but I did for convenience)&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3 : Install conda through the miniconda script
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash ~/miniconda.sh
&lt;span class="c"&gt;# follow interactive prompts:&lt;/span&gt;
&lt;span class="c"&gt;#  - accept license (yes)&lt;/span&gt;
&lt;span class="c"&gt;#  - choose install location (default: ~/miniconda3) OK&lt;/span&gt;
&lt;span class="c"&gt;#  - at the end it asks to initialize shell; say "yes" (or you can init manually later)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After install, either restart terminal or source the shell rc:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# restart terminal or&lt;/span&gt;
&lt;span class="nb"&gt;source&lt;/span&gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stop auto-activation of base (recommended) :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda config &lt;span class="nt"&gt;--set&lt;/span&gt; auto_activate_base &lt;span class="nb"&gt;false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now &lt;code&gt;base&lt;/code&gt; will not activate automatically on opening a new terminal.&lt;/p&gt;

&lt;p&gt;To confirm proper installation of conda, you can run the following commands :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda &lt;span class="nt"&gt;--version&lt;/span&gt;
which conda
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4 : Create and set up a python environment with conda
&lt;/h2&gt;

&lt;p&gt;I do not prefer to store my custom env inside the installation folder   &lt;code&gt;~/miniconda3/envs/myenv&lt;/code&gt;. I want it inside my project &lt;code&gt;myfolder&lt;/code&gt; folder, isolated from the system. So instead of &lt;code&gt;conda create -n&lt;/code&gt; and &lt;code&gt;conda install -n&lt;/code&gt; commands, I will use &lt;code&gt;--prefix&lt;/code&gt; :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda create &lt;span class="nt"&gt;--prefix&lt;/span&gt; ./myenv &lt;span class="nv"&gt;python&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;3.10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then activate the env :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda activate ./myenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You will notice that the entire path to &lt;code&gt;myenv&lt;/code&gt; gets prefixed before the terminal prompt in parenthesis, which looks bulky. To just keep the name &lt;code&gt;myenv&lt;/code&gt;, run the following commands :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda config &lt;span class="nt"&gt;--set&lt;/span&gt; env_prompt &lt;span class="s1"&gt;'({name}) '&lt;/span&gt;
&lt;span class="c"&gt;# Then deactivate and activate myenv again&lt;/span&gt;
conda deactivate
conda activate ./myenv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check the python version inside that env :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;--version&lt;/span&gt;          &lt;span class="c"&gt;# should show Python 3.10&lt;/span&gt;
which python              &lt;span class="c"&gt;# should show ~/YOUR-LOCATION/myenv/bin/python&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So you see that the system/OS has an inbuilt python installed, which I did not disturb. I wanted Python3.10 since that is the most supported version for ML applications. But I did not separately install it from the Python website. Instead it got auto-installed while creating the &lt;code&gt;myenv&lt;/code&gt; with this python version. &lt;/p&gt;

&lt;p&gt;Next, I installed some basic python packages within this activated env as per my needs. You can do what suits your needs.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda &lt;span class="nb"&gt;install &lt;/span&gt;numpy pandas scipy scikit-learn matplotlib jupyterlab biopython &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 5 : Install and register an IPython kernel from &lt;code&gt;myenv&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;I planned to use an IDE like VSCode or Jupyter Notebook. Since these IDEs detect &lt;strong&gt;kernels&lt;/strong&gt; and not environments, this step is needed.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install ipykernel&lt;/span&gt;
conda &lt;span class="nb"&gt;install &lt;/span&gt;ipykernel &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;span class="c"&gt;# Register the kernel with a readable name&lt;/span&gt;
python &lt;span class="nt"&gt;-m&lt;/span&gt; ipykernel &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;--user&lt;/span&gt; &lt;span class="nt"&gt;--name&lt;/span&gt; myenv &lt;span class="nt"&gt;--display-name&lt;/span&gt; &lt;span class="s2"&gt;"Python 3.10 (myenv)"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now &lt;code&gt;myenv&lt;/code&gt; can act as a kernel for these IDEs.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 6 : Use python in your favourite IDE
&lt;/h2&gt;

&lt;p&gt;Select the kernel in your IDE and start coding !!&lt;/p&gt;

&lt;p&gt;N.B. Jupyter IDEs need to be launched from within &lt;code&gt;myenv&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;jupyter notebook &lt;span class="c"&gt;# if you want to use notebook&lt;/span&gt;
jupyter lab &lt;span class="c"&gt;# if you want to use lab&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;N.B. Regardless, I prefer Google Colab for most of my applications :)&lt;/strong&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Marimo : an alternative to Jupyter notebook
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://marimo.io/" rel="noopener noreferrer"&gt;Marimo&lt;/a&gt; is a Jupyter notebook with each cell being somewhat logically connected to each other. That's way if you update the value of a variable in a cell and re-run it, related values in other cells will be auto-updated and auto-run. This is called &lt;strong&gt;reactive execution&lt;/strong&gt;. Thus the notebook can act as a single python script or app and has an extension of .py instead of .ipynb. &lt;/p&gt;

&lt;p&gt;After you've created your &lt;code&gt;myenv&lt;/code&gt; environment, you can easily install and use &lt;code&gt;marimo&lt;/code&gt; from within it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;conda activate ./myenv
conda &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-c&lt;/span&gt; conda-forge marimo &lt;span class="nt"&gt;-y&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Then the installation comes with many inbuilt sample notebooks openable using the &lt;code&gt;marimo tutorial&lt;/code&gt; command. Open this one and go through it :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;marimo tutorial &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="nt"&gt;-jupyter-users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Creating and editing marimo notebooks
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# create notebook&lt;/span&gt;
marimo new analysis.py

&lt;span class="c"&gt;# open it&lt;/span&gt;
marimo edit analysis.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can open multiple notebooks within different browser tabs as well.&lt;/p&gt;

</description>
      <category>ubuntu</category>
      <category>cli</category>
      <category>python</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Installing R in Ubuntu 24.04 LTS &amp; Mac</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Fri, 01 Aug 2025 14:18:29 +0000</pubDate>
      <link>https://dev.to/raman_butta/installing-r-in-ubuntu-2204-lts-je7</link>
      <guid>https://dev.to/raman_butta/installing-r-in-ubuntu-2204-lts-je7</guid>
      <description>&lt;h2&gt;
  
  
  Ubuntu
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 : Install R-Base
&lt;/h3&gt;

&lt;p&gt;Go to the terminal and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;r-base
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is equivalent to installing R or R-GUI on Windows. With this you can run &lt;code&gt;R&lt;/code&gt; in the terminal and get an interactive console to run R commands even without an IDE. But we'll install an IDE called R-Studio in the next step anyway.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 : Install R-Studio
&lt;/h3&gt;

&lt;p&gt;Go to the site posit.co and download the latest .deb file for Ubuntu 22. Then run &lt;code&gt;sudo dpkg -i filename.deb&lt;/code&gt; in the terminal to install it. While installing you may get certain dependency errors. Install those dependencies and run commands as prompted in the error log. And then run the &lt;code&gt;sudo dpkg -i&lt;/code&gt; command again. And just like that, you will have installed R Studio. &lt;/p&gt;

&lt;p&gt;Now simply run &lt;code&gt;rstudio &amp;amp;&lt;/code&gt; in the terminal and the IDE will open. You may get some GPU errors in the terminal which you can ignore as R Studio auto-detects the hardware GPU in your system and in absence of &lt;br&gt;
that, runs on a software GPU, so your IDE will work without issues. &lt;/p&gt;

&lt;p&gt;Now you can run R scripts in the editor, interact in the console, look at variables and plots just like the Spyder IDE for python, and install packages from within the IDE.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mac
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Step 1 : Install R
&lt;/h3&gt;

&lt;p&gt;Go to CRAN to install the .pkg installer file for R. Double-click it to install it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2 : Install R-Studio
&lt;/h3&gt;

&lt;p&gt;Download the .dmg installer file from &lt;a href="https://posit.co/download/rstudio-desktop/" rel="noopener noreferrer"&gt;https://posit.co/download/rstudio-desktop/&lt;/a&gt; and double-click to install it.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Writing the 4 basic SQL Queries</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Wed, 30 Jul 2025 11:29:27 +0000</pubDate>
      <link>https://dev.to/raman_butta/writing-the-4-basic-sql-queries-4l24</link>
      <guid>https://dev.to/raman_butta/writing-the-4-basic-sql-queries-4l24</guid>
      <description>&lt;h2&gt;
  
  
  1. SELECT
&lt;/h2&gt;

&lt;p&gt;Say we have a simple table where we need to &lt;strong&gt;select certain cells&lt;/strong&gt; (*** in the figure) in a &lt;strong&gt;chosen column&lt;/strong&gt;, based on some condition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+---------+---------+
| Column1 | Column2 |
+---------+---------+
|  Cell1  |  Cell2  |
|  Cell3  |  Cell4  |
|  ***    |  Cell6  |
|  ***    |  Cell8  |
|  ***    | Cell10  |
+---------+---------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We would &lt;strong&gt;SELECT&lt;/strong&gt; a column &lt;strong&gt;FROM&lt;/strong&gt; the table &lt;strong&gt;WHERE&lt;/strong&gt; certain conditions are met. Additionally, we may &lt;strong&gt;JOIN&lt;/strong&gt; a foreign_table based &lt;strong&gt;ON&lt;/strong&gt; a &lt;code&gt;foreign_key=primary_key&lt;/code&gt; relation, and have a WHERE condition accordingly.&lt;/p&gt;

&lt;p&gt;The general syntax (parameterized) would be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="nv"&gt;`SELECT h.name
FROM humans h
JOIN animals a ON h.animal_id = a.id
WHERE a.name = $1`&lt;/span&gt;&lt;span class="p"&gt;,[&lt;/span&gt;&lt;span class="n"&gt;Human&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You'd add the above sql query in the dots below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;pool&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;query&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(.....);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;where &lt;code&gt;pool&lt;/code&gt; is your connector object from a PostgreSQL client like &lt;strong&gt;pg&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array-of-objects to Array-of-dataType :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The returned &lt;code&gt;result&lt;/code&gt; object is a json object with many entries in which the useful entry is &lt;code&gt;rows : [..array of objects]&lt;/code&gt;. Each object in this array is of type say {name: string}. If we map through this entry using result.rows.map and extract the string, we'll get an &lt;strong&gt;array of strings&lt;/strong&gt; which is what we want. So :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;humans&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;[]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;rows&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;:{&lt;/span&gt;&lt;span class="nl"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="kr"&gt;string&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;row&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then you can &lt;code&gt;res.json(humans);&lt;/code&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  2. 📥 INSERT
&lt;/h2&gt;

&lt;p&gt;In SQL, &lt;code&gt;INSERT&lt;/code&gt; is used when you want to &lt;strong&gt;add new rows&lt;/strong&gt; to a table — like creating a new human, animal, product, etc.&lt;/p&gt;

&lt;p&gt;Let's say we want to add &lt;strong&gt;&lt;em&gt;new rows&lt;/em&gt;&lt;/strong&gt; (marked with ***) into this table:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;+---------+---------+
| Column1 | Column2 |
+---------+---------+
|  Cell1  |  Cell2  |
|  Cell3  |  Cell4  |
|  ***    |  ***    |
+---------+---------+
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;column1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;column2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to insert a row in which one of the values is referenced from a foreign table, then,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;INSERT&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;humans&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;animal_id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;VALUES&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="s1"&gt;'Ram`,
  (SELECT id FROM animals WHERE name='&lt;/span&gt;&lt;span class="n"&gt;Human&lt;/span&gt;&lt;span class="s1"&gt;')
)
ON CONFLICT (name, animal_id) DO NOTHING
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If there's another table say &lt;strong&gt;species&lt;/strong&gt; above animals, then multi-level nesting is also possible:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;animals&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'X'&lt;/span&gt; &lt;span class="k"&gt;AND&lt;/span&gt; &lt;span class="n"&gt;species_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;species&lt;/span&gt; &lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="p"&gt;...))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  3. ♻️ UPDATE
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;UPDATE&lt;/code&gt; statement is used in SQL when you want to &lt;strong&gt;change existing data&lt;/strong&gt; in a table — like correcting a spelling mistake, changing an animal assigned to a human, updating a price, etc.&lt;/p&gt;

&lt;p&gt;The general format is :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPDATE humans
SET fav_color = 'Blue'
WHERE name = 'Ram'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Again if there's a primary key in a foreign table containing 'Blue', you can reference that using SELECT instead of hardcoding 'Blue'.&lt;/p&gt;

&lt;p&gt;💡 &lt;strong&gt;Note:&lt;/strong&gt; It’s good practice to always include a &lt;code&gt;WHERE&lt;/code&gt; clause in &lt;code&gt;UPDATE&lt;/code&gt;. Leaving it out will update every row in the table!&lt;/p&gt;




&lt;h2&gt;
  
  
  4. 🗑️ DELETE
&lt;/h2&gt;

&lt;p&gt;The &lt;code&gt;DELETE&lt;/code&gt; statement is used to &lt;strong&gt;remove rows&lt;/strong&gt; from a table — for example, removing a record that is no longer needed.&lt;/p&gt;

&lt;h3&gt;
  
  
  📌 &lt;strong&gt;General Syntax (basic)&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;DELETE&lt;/span&gt; &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="k"&gt;table_name&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;condition&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;💡 &lt;strong&gt;Warning:&lt;/strong&gt; If you leave out the &lt;code&gt;WHERE&lt;/code&gt; clause, &lt;strong&gt;all rows in your table will be deleted!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Summary Table&lt;/strong&gt;
&lt;/h3&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Action&lt;/th&gt;
&lt;th&gt;SQL Command&lt;/th&gt;
&lt;th&gt;Example&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;SELECT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;SELECT ... FROM ... WHERE ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Get/retrieve data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;INSERT&lt;/td&gt;
&lt;td&gt;&lt;code&gt;INSERT INTO ... VALUES ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Add new data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;UPDATE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;UPDATE ... SET ... WHERE ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Modify existing data&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DELETE&lt;/td&gt;
&lt;td&gt;&lt;code&gt;DELETE FROM ... WHERE ...&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Remove data&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

</description>
    </item>
    <item>
      <title>Basics of EDA</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Sun, 27 Jul 2025 09:41:06 +0000</pubDate>
      <link>https://dev.to/raman_butta/basics-of-eda-11fe</link>
      <guid>https://dev.to/raman_butta/basics-of-eda-11fe</guid>
      <description>&lt;p&gt;Exploratory Data Analysis (EDA) is often the first step in grasping a fair idea of a dataset. It not only lays the foundation for subsequent steps like feature engineering and building models to fit the given data, but is invaluable in providing condensed tabular and visual analyses of large datasets.&lt;/p&gt;

&lt;p&gt;Whenever you first get a dataset df, you should do light EDA on it. These are the must-dos in quick succession :&lt;/p&gt;

&lt;h1&gt;
  
  
  I. Textual Analyses
&lt;/h1&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;df.shape : gives the dimension of the dataframe&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;df : shows the first few rows and first few columns. If you want it to show all columns, run: &lt;code&gt;pd.set_option('display.max_columns', None)&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;df.head() : the first impression&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;df.describe() : central tendencies of numeric columns (ref: &lt;a href="https://youtube.com/watch?v=g2OpfqWi2tM" rel="noopener noreferrer"&gt;https://youtube.com/watch?v=g2OpfqWi2tM&lt;/a&gt;)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;df.info() : to visually detect null values in a column, which can be imputed or dropped using .fillna() or .drop() respectively. You can also get the null values from df.isnull().sum()&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;separate num &amp;amp; cat columns into diff dataframes&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;generate &lt;strong&gt;pivot_table&lt;/strong&gt; of num col "values" against the target vector "index". This is similar to &lt;strong&gt;groupby&lt;/strong&gt;. For eg.&lt;br&gt;
&lt;code&gt;tips.pivot_table(values='tip', index='sex')&lt;/code&gt; and &lt;code&gt;tips.groupby('sex')['tip'].mean()&lt;/code&gt; would give exactly the same output, but pivot_table is visually nicer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;see value_counts of cat columns&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;divide above value_counts between target vector's values by generating pivot_table of cat col "columns" against the target vector "index" with aggfunc='count'&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  II. Graphical Analyses
&lt;/h1&gt;

&lt;h2&gt;
  
  
  Categorical variables
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you want to plot the frequencies (y) of different alleles (x) of a categorical variable, use &lt;strong&gt;countplot&lt;/strong&gt;, eg:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;countplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, that you give x, and y is automatically generated. It is the graphical version of &lt;code&gt;value_counts()&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;or you can make a &lt;strong&gt;pieplot&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;counts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;value_counts&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pie&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;counts&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;index&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;axis&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;equal&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Numerical variables
&lt;/h2&gt;

&lt;h3&gt;
  
  
  0. Histogram
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If you want to graph the frequencies (y) of different bins (x) of a numeric variable in a column &lt;code&gt;i&lt;/code&gt;, use a &lt;strong&gt;histogram&lt;/strong&gt;, eg:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt; &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df_num&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
 &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
 &lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;As you can see, you give i, and x, y are automatically generated.&lt;/p&gt;

&lt;p&gt;If you use sns.distplot instead on that column, it creates a histogram with KDE curve overlay&lt;/p&gt;

&lt;h3&gt;
  
  
  1. General Catplot Syntax for num vars grouped across cat var
&lt;/h3&gt;

&lt;p&gt;If you want to graph the aggregated value of one numerical variable (y) grouped by a categorical variable (x), the general syntax is :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;catplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;kind&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;...&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Within &lt;code&gt;kind&lt;/code&gt; you can put the kind of plot. Allowed values for kind are: 'strip', 'swarm', 'box', 'boxen', 'violin', 'bar', 'count', and 'point'.&lt;/p&gt;

&lt;p&gt;Within &lt;code&gt;hue&lt;/code&gt; you can put another categorical variable for sub-grouping the num var in each curve.&lt;/p&gt;

&lt;p&gt;Although you have this general syntax, its helpful to know specific formats as below.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Barplot
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;If you want to graph the aggregated value of one numerical variable (y) grouped by a categorical variable (x), use a &lt;strong&gt;barplot&lt;/strong&gt;. Eg
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;barplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;estimator&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nb"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ci&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you drop the estimator argument, it will default to the "mean" estimator/aggfunc. For central tendencies like mean or median, you may drop the ci argument so that it defaults to True and shows confidence intervals.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Boxplot
&lt;/h3&gt;

&lt;p&gt;Note that sns.barplot(x='day', y='total_bill', data=tips) will only give the mean of total_bill in each day (bin). If you instead want to focus on quartiles, spread, and outliers, use a boxplot. Eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;boxplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a boxplot showing the median, interquartile range (IQR), and potential outliers for total_bill across each day. The box represents the IQR (25th to 75th percentile), the line inside the box is the median, and the "whiskers" extend to the minimum and maximum values within 1.5 * IQR. Points outside this range are plotted as outliers. You can add hue to further split the boxes by another categorical variable, e.g., hue="sex", to compare distributions across subgroups.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. KDE Plot
&lt;/h3&gt;

&lt;p&gt;If instead of the boxplot, you want a visual KDE curve of total_bill across each day, use&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;kdeplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;multiple&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;layer&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# or multiple='dodge', 'stack'
&lt;/span&gt;&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  5. Scatterplots
&lt;/h3&gt;

&lt;p&gt;Eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;scatterplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;tip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;sex&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;title&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Scatterplot of Total Bill vs Tip&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a scatterplot where each point represents a pair of &lt;code&gt;total_bill&lt;/code&gt; (x-axis) and &lt;code&gt;tip&lt;/code&gt; (y-axis) values from the tips dataset. The &lt;code&gt;hue="sex"&lt;/code&gt; argument colors points by the categorical variable sex. &lt;/p&gt;

&lt;h3&gt;
  
  
  6. Pairplot
&lt;/h3&gt;

&lt;p&gt;If you find that the KDE curve of total_bill across various days has such overlap that it's not a sharp classifier, you may want to see pairs of numerical variables which may form distinct clusters in the xy plane across different days (hues) and serve as sharp classifiers. Thus you may need a pairplot like this :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;pairplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;vars&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tip&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;size&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt; &lt;span class="n"&gt;hue&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You keep numerical variables in &lt;code&gt;vars&lt;/code&gt;. If you omit &lt;code&gt;vars&lt;/code&gt;, it plots for all numerical variables in the dataframe.&lt;/p&gt;

&lt;p&gt;The pairplot grid gives you KDE curves along the diagonal and scatterplots off-diagonally.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Violinplot
&lt;/h3&gt;

&lt;p&gt;They are like boxplot inside a KDE curve.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;violinplot&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;y&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;total_bill&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a violinplot that combines a boxplot with a kernel density estimate (KDE) for total_bill across each day. The width of each "violin" represents the density of the data at different values, providing a clearer view of the distribution's shape compared to a boxplot. The inner boxplot shows the median and IQR, while the KDE extends to show the full distribution. You can add &lt;code&gt;hue&lt;/code&gt; to split the violins by another categorical variable, e.g., hue="sex", and use &lt;code&gt;split=True&lt;/code&gt; to display the distributions side-by-side within each category for easier comparison.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Correlation heatmaps
&lt;/h3&gt;

&lt;p&gt;If you want to visualize the correlation between numerical variables in a dataset, use a heatmap of the correlation matrix. Eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;sns&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;heatmap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;tips&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;corr&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;annot&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;cmap&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;coolwarm&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmin&lt;/span&gt;&lt;span class="o"&gt;=-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;vmax&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;plt&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;show&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates a heatmap where each cell represents the correlation coefficient between pairs of numerical variables in the tips dataset. The &lt;code&gt;corr()&lt;/code&gt; method computes the Pearson correlation by default, ranging from -1 (perfect negative correlation) to 1 (perfect positive correlation). The &lt;code&gt;annot=True&lt;/code&gt; argument displays the correlation values in each cell, and &lt;code&gt;cmap='coolwarm'&lt;/code&gt; uses a diverging color scheme to highlight positive (red) and negative (blue) correlations. The &lt;code&gt;vmin&lt;/code&gt; and &lt;code&gt;vmax&lt;/code&gt; parameters set the range for the color scale. &lt;/p&gt;

&lt;h1&gt;
  
  
  III. Applying Filters on a categorical column
&lt;/h1&gt;

&lt;p&gt;First find all the alleles of the chosen cat variable. Eg.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df1&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;day&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;unique&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then say Sunday is a unique allele wrt which you want to filter :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;days_df = df[df[days] == Sunday]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or if you want to filter out days which have the word "sun" (case-insensitive), run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;days_df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;days&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;contains&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;sun&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;case&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;na&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;)]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And then&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;days_df&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Getting started with Kaggle</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Fri, 18 Jul 2025 09:56:30 +0000</pubDate>
      <link>https://dev.to/raman_butta/getting-started-with-kaggle-2hnm</link>
      <guid>https://dev.to/raman_butta/getting-started-with-kaggle-2hnm</guid>
      <description>&lt;p&gt;Basic libraries like Numpy, Pandas, Seaborn, Matplotlib are &lt;strong&gt;pre-installed&lt;/strong&gt; in Kaggle. You just need to &lt;strong&gt;import&lt;/strong&gt; them in your notebook.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loading datasets in your notebook
&lt;/h2&gt;

&lt;p&gt;Kaggle is organised in directories.&lt;br&gt;
&lt;code&gt;/kaggle/working/&lt;/code&gt; is your present working directory. &lt;br&gt;
&lt;code&gt;/kaggle/input/&lt;/code&gt; is where public datasets are kept.&lt;/p&gt;

&lt;p&gt;So you can go to the sidebar in your Kaggle notebook and "Add Input" (for public Kaggle databases) or "Upload" (if you have own/non-Kaggle database). For example, you can add the "Titanic" dataset and then it appears in your &lt;code&gt;/kaggle/input&lt;/code&gt; directory.&lt;/p&gt;

&lt;p&gt;To print all the datasets added to your notebook, you can use Python's built-in &lt;code&gt;os&lt;/code&gt; module, which can &lt;strong&gt;walk through&lt;/strong&gt; a directory tree (like /kaggle/input). &lt;br&gt;
So &lt;code&gt;os.walk('/kaggle/input')&lt;/code&gt; is a generator that walks through the directory /kaggle/input and returns 3 things for each folder it visits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dirname: current folder path&lt;/li&gt;
&lt;li&gt;subdirs: a list of subdirectories (which we can ignore with &lt;code&gt;_&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;filenames: a list of all the files in that folder&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So you can run the following code :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filenames&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;walk&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;/kaggle/input&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;filenames&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;join&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;dirname&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;filename&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and it will output something like&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/kaggle/input/titanic/train.csv
/kaggle/input/titanic/test.csv
/kaggle/input/titanic/gender_submission.csv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that you only see what your notebook has mounted — not all Kaggle datasets.&lt;/p&gt;

&lt;p&gt;To master data science projects (like the Titanic one), it's important to follow a structured pipeline :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data Loading&lt;/li&gt;
&lt;li&gt;Data Preprocessing:

&lt;ul&gt;
&lt;li&gt;Data Cleaning (you can merge all dataframes before cleaning it)&lt;/li&gt;
&lt;li&gt;Feature Engineering&lt;/li&gt;
&lt;li&gt;Encoding&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;EDA&lt;/li&gt;
&lt;li&gt;Preprocessing&lt;/li&gt;
&lt;li&gt;Model Building&lt;/li&gt;
&lt;li&gt;Model Tuning&lt;/li&gt;
&lt;/ol&gt;

</description>
    </item>
    <item>
      <title>What is Kaggle?</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Sun, 22 Jun 2025 16:04:55 +0000</pubDate>
      <link>https://dev.to/raman_butta/what-is-kaggle-nn1</link>
      <guid>https://dev.to/raman_butta/what-is-kaggle-nn1</guid>
      <description>&lt;p&gt;While Kaggle &lt;em&gt;started&lt;/em&gt; with supervised learning competitions (like predicting house prices or Titanic survival), it now supports the &lt;strong&gt;entire range of data science, machine learning, and AI workflows&lt;/strong&gt;. Here's the full scope of what Kaggle is used for:&lt;/p&gt;




&lt;h2&gt;
  
  
  ✅ 1. &lt;strong&gt;Supervised Learning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Most common, yes — but just one part.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🏠 Regression (e.g., house prices)&lt;/li&gt;
&lt;li&gt;🧍 Classification (e.g., Titanic survival, spam detection)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  ❓ 2. &lt;strong&gt;Unsupervised Learning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You’ll find notebooks and datasets for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📦 &lt;strong&gt;Clustering&lt;/strong&gt; (e.g., customer segmentation)&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Dimensionality reduction&lt;/strong&gt; (e.g., PCA for image compression)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🤖 3. &lt;strong&gt;Deep Learning Tasks&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;With TensorFlow, PyTorch, Keras — you’ll see:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🖼️ &lt;strong&gt;Image classification&lt;/strong&gt; (e.g., cats vs. dogs)&lt;/li&gt;
&lt;li&gt;🗣️ &lt;strong&gt;NLP&lt;/strong&gt; (sentiment analysis, summarization, text generation)&lt;/li&gt;
&lt;li&gt;🎵 &lt;strong&gt;Audio/speech recognition&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;🧠 &lt;strong&gt;LLMs and transformers&lt;/strong&gt; (fine-tuning BERT, GPT, etc.)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🕹️ 4. &lt;strong&gt;Reinforcement Learning&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;While rarer than other categories, there are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🐍 Notebooks using OpenAI Gym environments&lt;/li&gt;
&lt;li&gt;🏁 Path-planning, game AI, and Q-learning projects&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📈 5. &lt;strong&gt;Time Series &amp;amp; Forecasting&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;You’ll find:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📅 Stock price prediction&lt;/li&gt;
&lt;li&gt;🦠 COVID-19 case forecasting&lt;/li&gt;
&lt;li&gt;⛅ Weather prediction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Often includes tools like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;statsmodels&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;prophet&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;LSTM/RNN models&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🔬 6. &lt;strong&gt;Exploratory Data Analysis (EDA) Projects&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;No modeling — just visual exploration:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Seaborn/Matplotlib visual storytelling&lt;/li&gt;
&lt;li&gt;Finding insights in sports, economy, or demographic data&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🏗️ 7. &lt;strong&gt;Data Engineering + Preprocessing&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Examples:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Data cleaning pipelines&lt;/li&gt;
&lt;li&gt;Missing value treatment&lt;/li&gt;
&lt;li&gt;Feature engineering recipes&lt;/li&gt;
&lt;li&gt;Efficient I/O (e.g., &lt;code&gt;feather&lt;/code&gt;, &lt;code&gt;parquet&lt;/code&gt; formats)&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧪 8. &lt;strong&gt;Real-World Applications&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Kaggle now has "Code Competitions" and "Notebooks" on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔍 Document search (IR, vector DBs)&lt;/li&gt;
&lt;li&gt;🧬 Biology (protein folding, cancer detection)&lt;/li&gt;
&lt;li&gt;🛒 Recommender systems&lt;/li&gt;
&lt;li&gt;🧾 PDF parsing, OCR, and web scraping&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  📚 9. &lt;strong&gt;Learning + Community&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Not just competitions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Kaggle Learn: mini-courses (Python, ML, SQL, etc.)&lt;/li&gt;
&lt;li&gt;Public notebooks: like StackOverflow, but for data workflows&lt;/li&gt;
&lt;li&gt;Discussions: Q&amp;amp;A, guides, updates&lt;/li&gt;
&lt;/ul&gt;




&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Domain&lt;/th&gt;
&lt;th&gt;Examples&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Supervised ML&lt;/td&gt;
&lt;td&gt;Titanic, Housing, Spam&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Unsupervised ML&lt;/td&gt;
&lt;td&gt;Clustering, PCA&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Deep Learning&lt;/td&gt;
&lt;td&gt;CNNs, NLP, LLMs&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Reinforcement Learning&lt;/td&gt;
&lt;td&gt;Q-Learning, OpenAI Gym&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Time Series Forecasting&lt;/td&gt;
&lt;td&gt;Prophet, ARIMA, LSTM&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;EDA &amp;amp; Data Cleaning&lt;/td&gt;
&lt;td&gt;Visual stories, missing data hacks&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Engineering&lt;/td&gt;
&lt;td&gt;Joins, transforms, pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Real-world AI Apps&lt;/td&gt;
&lt;td&gt;Recommenders, OCR, Chatbots&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;




&lt;p&gt;So, &lt;strong&gt;Kaggle is a full-stack playground&lt;/strong&gt;: from EDA → modeling → deployment experiments — all runnable in the browser, free GPU/TPU included.&lt;/p&gt;

&lt;p&gt;So try out beginner projects in a specific domains like vision, text, time series, or audio. And keep learning.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How I Fixed My Seagate External Hard Drive Mounting Issue on Ubuntu 24.04</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Mon, 16 Jun 2025 16:04:28 +0000</pubDate>
      <link>https://dev.to/raman_butta/how-i-fixed-my-seagate-external-hard-drive-mounting-issue-on-ubuntu-2404-2a8p</link>
      <guid>https://dev.to/raman_butta/how-i-fixed-my-seagate-external-hard-drive-mounting-issue-on-ubuntu-2404-2a8p</guid>
      <description>&lt;p&gt;&lt;strong&gt;Problem:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
Clicking my Seagate hard drive icon in Ubuntu's GUI suddenly gave an error like :&lt;br&gt;&lt;br&gt;
&lt;em&gt;“error mounting seagate bad errorblock on /dev/sdb" or "wrong fs type, bad option, bad superblock”&lt;/em&gt;  &lt;/p&gt;
&lt;h3&gt;
  
  
  Manual Mounting
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;I tried manually mounting the drive through terminal :
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  &lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; /mnt/mydrive
  &lt;span class="nb"&gt;sudo &lt;/span&gt;mount /dev/sdb1 /mnt/mydrive
  ...access your files...
  &lt;span class="nb"&gt;sudo &lt;/span&gt;umount /dev/sdb1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;But this showed an error : "$MFTMirr does not match $MFT"&lt;/p&gt;

&lt;p&gt;So I ran:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;add-apt-repository universe
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;ntfs-3g exfat-fuse exfatprogs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;My HDD was NTFS-based (you can check it by running &lt;code&gt;lsblk -f&lt;/code&gt; command). So I ran :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ntfsfix /dev/sdb1
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now the sudo mount command worked, confirming the drive and data were accessible, but the GUI still failed.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Adjusting Mount Options in Disks App
&lt;/h3&gt;

&lt;p&gt;(I learnt this from &lt;a href="https://askubuntu.com/a/1517406/519832" rel="noopener noreferrer"&gt;https://askubuntu.com/a/1517406/519832&lt;/a&gt;)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I opened the &lt;strong&gt;Disks&lt;/strong&gt; app, selected my drive, and clicked the cog wheel (settings).&lt;/li&gt;
&lt;li&gt;Chose &lt;strong&gt;Edit Mount Options…&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Turned off &lt;strong&gt;User Session Defaults&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Adjusted other mount parameters as needed (e.g., mount point, mount at startup).&lt;/li&gt;
&lt;li&gt;Saved the changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now, the drive mounts from the GUI as before. But remember to properly unmount before removing your HDD.&lt;/p&gt;




</description>
    </item>
    <item>
      <title>Step-by-Step Guide to Submitting a Pull Request on GitHub</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Wed, 04 Jun 2025 12:54:28 +0000</pubDate>
      <link>https://dev.to/raman_butta/step-by-step-guide-to-submitting-a-pull-request-on-github-5fok</link>
      <guid>https://dev.to/raman_butta/step-by-step-guide-to-submitting-a-pull-request-on-github-5fok</guid>
      <description>&lt;p&gt;This guide will take you from complete beginner to confident contributor by walking you through the entire pull request (PR) process.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A GitHub account&lt;/li&gt;
&lt;li&gt;Git installed on your computer&lt;/li&gt;
&lt;li&gt;Basic command line knowledge&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 1: Fork the Repository
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Navigate to the repository&lt;/strong&gt; you want to contribute to on GitHub&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Click the "Fork" button&lt;/strong&gt; in the top-right corner

&lt;ul&gt;
&lt;li&gt;This creates your own copy of the repository under your GitHub account&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 2: Clone Your Fork Locally
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Copy the URL&lt;/strong&gt; of your forked repository (click the "Code" button)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open your terminal/command prompt&lt;/strong&gt; and run:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git clone https://github.com/YOUR-USERNAME/REPOSITORY-NAME.git
   &lt;span class="nb"&gt;cd &lt;/span&gt;REPOSITORY-NAME
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Set Up Upstream Remote
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Add the original repository as a remote called "upstream":
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git remote add upstream https://github.com/ORIGINAL-OWNER/REPOSITORY-NAME.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Verify the remotes:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Should show both your fork (origin) and the original (upstream)&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Create a New Branch
&lt;/h2&gt;

&lt;p&gt;Never work directly on the &lt;code&gt;main&lt;/code&gt; branch. Create a new branch for your changes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout &lt;span class="nt"&gt;-b&lt;/span&gt; your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Good branch names describe the work: &lt;code&gt;fix-typo-docs&lt;/code&gt;, &lt;code&gt;add-feature-x&lt;/code&gt;, etc.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 5: Make Your Changes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Make the necessary changes to the code/files&lt;/li&gt;
&lt;li&gt;Save your changes&lt;/li&gt;
&lt;li&gt;Stage the changes:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or add specific files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git add filename.ext
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Commit your changes with a meaningful message:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Brief description of changes"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 6: Push Changes to Your Fork
&lt;/h2&gt;

&lt;p&gt;Push your branch to your GitHub fork:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push origin your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 7: Create the Pull Request
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Go to your fork&lt;/strong&gt; on GitHub&lt;/li&gt;
&lt;li&gt;You should see a banner suggesting to create a PR - click "Compare &amp;amp; pull request"

&lt;ul&gt;
&lt;li&gt;Or go to the "Pull requests" tab and click "New pull request"&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Select the correct branches&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Base repository: original repo's &lt;code&gt;main&lt;/code&gt; (or default branch)&lt;/li&gt;
&lt;li&gt;Head repository: your fork's &lt;code&gt;your-branch-name&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fill in the PR details&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Meaningful title&lt;/li&gt;
&lt;li&gt;Detailed description of changes&lt;/li&gt;
&lt;li&gt;Reference any related issues (using #issue-number)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Click "Create pull request"&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzyfwok3mjhm6ynmi1iyh.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzyfwok3mjhm6ynmi1iyh.png" alt="Creating a PR illustration" width="800" height="302"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 8: Respond to Feedback
&lt;/h2&gt;

&lt;p&gt;Project maintainers might request changes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make additional commits if needed&lt;/li&gt;
&lt;li&gt;Push them to the same branch&lt;/li&gt;
&lt;li&gt;The PR will automatically update&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Step 9: Sync with Upstream (if needed)
&lt;/h2&gt;

&lt;p&gt;If the original repository changes while your PR is open:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git checkout main
git fetch upstream
git merge upstream/main
git checkout your-branch-name
git merge main
&lt;span class="c"&gt;# Resolve any conflicts, then push&lt;/span&gt;
git push origin your-branch-name
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 10: After Merge
&lt;/h2&gt;

&lt;p&gt;Once your PR is merged:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Delete your branch (both locally and on GitHub)&lt;/li&gt;
&lt;li&gt;Sync your fork's main branch:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   git checkout main
   git pull upstream main
   git push origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Expert Tips
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Keep PRs small and focused&lt;/strong&gt; - address one issue per PR&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Follow project conventions&lt;/strong&gt; - coding style, commit messages, etc.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write good commit messages&lt;/strong&gt;:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   Summarize changes in 50 chars or less

   More detailed explanation if needed. Wrap at 72 chars.
   - Bullet points are okay
   - Explain why, not just what
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Reference issues&lt;/strong&gt; in your PR description (e.g., "Fixes #123")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Use GitHub's features&lt;/strong&gt;:

&lt;ul&gt;
&lt;li&gt;Markdown formatting&lt;/li&gt;
&lt;li&gt;Code reviews&lt;/li&gt;
&lt;li&gt;Suggested changes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consider signing commits&lt;/strong&gt; for extra verification&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Common Workflows
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Forking Workflow (described above)
&lt;/h3&gt;

&lt;p&gt;Best for open source contributions where you don't have write access&lt;/p&gt;

&lt;h3&gt;
  
  
  Branching Workflow
&lt;/h3&gt;

&lt;p&gt;If you have write access to the repository, you can create branches directly in the main repo instead of forking&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub CLI Alternative
&lt;/h3&gt;

&lt;p&gt;Advanced users can use GitHub CLI to create PRs from the command line:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh &lt;span class="nb"&gt;pr &lt;/span&gt;create &lt;span class="nt"&gt;--title&lt;/span&gt; &lt;span class="s2"&gt;"Your PR title"&lt;/span&gt; &lt;span class="nt"&gt;--body&lt;/span&gt; &lt;span class="s2"&gt;"Description"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now you're ready to contribute to projects with confidence! Start with small contributions to build your reputation in open source communities.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Adding WakaTime stats to your Github README</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Sun, 11 May 2025 11:30:10 +0000</pubDate>
      <link>https://dev.to/raman_butta/adding-waka-time-stats-to-your-github-readme-59ng</link>
      <guid>https://dev.to/raman_butta/adding-waka-time-stats-to-your-github-readme-59ng</guid>
      <description>&lt;p&gt;First I referred to &lt;a href="https://github.com/orgs/community/discussions/116451" rel="noopener noreferrer"&gt;this&lt;/a&gt; tutorial. &lt;/p&gt;

&lt;p&gt;Of particular note is the integration of my local IDE to my Wakatime account. For example I use the Zed editor. So I typed Zed in my "Supported IDEs" in Wakatime website, which led me to &lt;a href="https://github.com/wakatime/zed-wakatime" rel="noopener noreferrer"&gt;this&lt;/a&gt; project page. It says to ensure that the .wakatime.cfg is created in the very Home (~) directory of your machine and the wakatime api_key is added to this file. Upon restarting your IDE, you'll see your stats in your Wakatime dashboard.&lt;/p&gt;

&lt;p&gt;I added wakatime to Google Colab by running in a code cell like this (not sure if it works):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="o"&gt;%%&lt;/span&gt;&lt;span class="n"&gt;writefile&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;root&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;wakatime&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cfg&lt;/span&gt;
&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;settings&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;api_key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;YOUR_WAKATIME_API_KEY&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now I went to Github.&lt;/p&gt;

&lt;p&gt;In the &lt;code&gt;/.github/workflows/waka.yml&lt;/code&gt; file I created, I added the following code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update WakaTime Stats&lt;/span&gt;

&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;schedule&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;cron&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;0&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;*'&lt;/span&gt; &lt;span class="c1"&gt;# Runs daily at midnight UTC&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="c1"&gt;# Allows you to manually trigger the workflow&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;update-readme&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Checkout Repository&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Update WakaTime Stats in README&lt;/span&gt;
        &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;athul/waka-readme@master&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;WAKATIME_API_KEY&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.WAKATIME_API_KEY }}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note that I added a "Checkout Repository" step as well so that it captures my activity on Github also, not just on my IDE. &lt;/p&gt;

&lt;p&gt;Also note that I used the popular Github action of &lt;a href="https://github.com/athul/waka-readme" rel="noopener noreferrer"&gt;Athul&lt;/a&gt; here. &lt;a href="https://github.com/anmol098/waka-readme-stats" rel="noopener noreferrer"&gt;Anmol's&lt;/a&gt; Github action can also be used here.&lt;/p&gt;

&lt;p&gt;Once you run this Github action, your README starts getting populated with stats.&lt;/p&gt;

&lt;p&gt;By default, all Wakatime APIs provide your past 7 days' activity.&lt;/p&gt;

&lt;p&gt;Follow me on my &lt;a href="https://x.com/RamanButta1" rel="noopener noreferrer"&gt;X Profile&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Migrating from Windows to Linux</title>
      <dc:creator>Raman Butta</dc:creator>
      <pubDate>Thu, 01 May 2025 13:14:50 +0000</pubDate>
      <link>https://dev.to/raman_butta/migrating-from-windows-to-linux-53ho</link>
      <guid>https://dev.to/raman_butta/migrating-from-windows-to-linux-53ho</guid>
      <description>&lt;p&gt;Firstly, congratulations on your decision to migrate to Linux. Windows is great for beginners and also certain proprietary software and games. But in my opinion, it is unnecessarily compute-heavy. Linux is sleek, light, modern and open-source. The most popular, versatile and powerful Linux distro for beginners is Ubuntu. So if you're on a PC, you better make the move.&lt;/p&gt;




&lt;p&gt;Here's how you migrate:&lt;/p&gt;

&lt;h3&gt;
  
  
  INSTALLATION
&lt;/h3&gt;

&lt;h4&gt;
  
  
  1. Backup your Windows data
&lt;/h4&gt;

&lt;h4&gt;
  
  
  2. Download Ubuntu ISO
&lt;/h4&gt;

&lt;p&gt;i.e. the ISO image of Ubuntu LTS version from their website. &lt;br&gt;
At the time of this article, Ubuntu 24.04 is the LTS version. &lt;/p&gt;
&lt;h4&gt;
  
  
  3. Create a Bootable USB Drive
&lt;/h4&gt;

&lt;p&gt;Download Rufus software from &lt;a href="https://rufus.ie/" rel="noopener noreferrer"&gt;https://rufus.ie/&lt;/a&gt; and use it to burn the ISO image onto your USB drive to make it bootable.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Insert your USB.&lt;/li&gt;
&lt;li&gt;Open Rufus.&lt;/li&gt;
&lt;li&gt;Select the USB drive under "Device".&lt;/li&gt;
&lt;li&gt;Select the Ubuntu ISO under "Boot selection".&lt;/li&gt;
&lt;li&gt;Partition scheme: GPT&lt;/li&gt;
&lt;li&gt;File system: FAT32&lt;/li&gt;
&lt;li&gt;Click Start and confirm. &lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  4. Boot from the USB Drive
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Plug in the USB drive into your PC.&lt;/li&gt;
&lt;li&gt;Restart your PC.&lt;/li&gt;
&lt;li&gt;Press the boot menu key (often F12, Esc, F10, or Del) while booting to access the boot menu.&lt;/li&gt;
&lt;li&gt;Select your USB drive from the list.&lt;/li&gt;
&lt;li&gt;Ubuntu will boot into a live session.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  5. Start Ubuntu Installation
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Click “Install Ubuntu”.&lt;/li&gt;
&lt;li&gt;Choose your language and keyboard layout.&lt;/li&gt;
&lt;li&gt;Select updates and third-party software (optional but recommended).&lt;/li&gt;
&lt;li&gt;On the "Installation Type" screen:

&lt;ul&gt;
&lt;li&gt;Choose “Erase disk and install Ubuntu”&lt;/li&gt;
&lt;li&gt;This will:

&lt;ul&gt;
&lt;li&gt;Delete Windows and old Ubuntu&lt;/li&gt;
&lt;li&gt;Format the entire hard disk&lt;/li&gt;
&lt;li&gt;Create a new partition table&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Click Continue.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  6. Disk Partitioning (Auto)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Ubuntu will automatically create:

&lt;ul&gt;
&lt;li&gt;A root (/) partition&lt;/li&gt;
&lt;li&gt;A swap partition (since you have 8 GB RAM, a 2–4 GB swap is typical)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;You can customize partitions if you're experienced, but auto-mode is fine.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  POST-INSTALLATION
&lt;/h3&gt;
&lt;h4&gt;
  
  
  7. System Update and Upgrade
&lt;/h4&gt;

&lt;p&gt;Open the Terminal (Ctrl + Alt + T) and run:&lt;br&gt;
&lt;code&gt;sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  8. Install Common Utilities
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;sudo apt install -y curl wget git build-essential software-properties-common&lt;/code&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  8. Enable Restricted Drivers (NVIDIA/Wi-Fi, etc.)
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Go to “Software &amp;amp; Updates” &amp;gt; “Additional Drivers”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Choose the recommended proprietary driver (e.g., NVIDIA) and apply changes.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  9. Set Up Git (if you plan to code)
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"you@example.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  10. Check your live system parameters
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Press Super (Windows key) and search “System Monitor”&lt;/li&gt;
&lt;li&gt;To check disk usage you can run &lt;code&gt;df -h&lt;/code&gt; on your terminal&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;
  
  
  PACKAGE INSTALLATIONS
&lt;/h3&gt;

&lt;p&gt;To check if a package is already installed in Ubuntu before using sudo apt install, you can use the dpkg command like this:&lt;br&gt;
&lt;code&gt;dpkg -s software-properties-common&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;On Windows, installers bundle everything you need — usually the latest stable version — into a single .msi or .exe file (.pkg/.app/.dmg for Mac). But on Ubuntu (and Linux in general), things work differently.&lt;/p&gt;

&lt;p&gt;Ubuntu maintains its official package repositories. These repos wrap software apps. You can install them using &lt;code&gt;apt&lt;/code&gt;. Eg. : &lt;code&gt;sudo apt install nodejs&lt;/code&gt;. But these APT Repos are sometimes not updated frequently. So for the nodejs example, if you run &lt;code&gt;node -v&lt;/code&gt; you may see an old version.  &lt;/p&gt;

&lt;p&gt;The solution is to use official 3rd-party APT Repos (like &lt;a href="http://deb.nodesource.com/" rel="noopener noreferrer"&gt;Nodesource&lt;/a&gt; for nodejs). You can add it to your system and pipe it to your bash, before installing, like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://deb.nodesource.com/setup_22.x | &lt;span class="nb"&gt;sudo &lt;/span&gt;bash -
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt-get &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-y&lt;/span&gt; nodejs
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Similarly, Docker, VS Code, MongoDB, etc. all maintain external apt repos.&lt;/p&gt;

&lt;p&gt;An alternative to 3rd-party repos often used for  community or developer-maintained packages like Git is PPAs (Personal Package Archives). You can add apt repos from a designated PPA eg.: &lt;code&gt;sudo add-apt-repository ppa:git-core/ppa&lt;/code&gt;.&lt;br&gt;
Then Ubuntu’s APT will then fetch packages from the PPA’s servers when running &lt;code&gt;sudo apt install git&lt;/code&gt;.&lt;/p&gt;




&lt;p&gt;I will add more tips in future posts. See ya. You can connect with me on &lt;a href="https://x.com/RamanButta1" rel="noopener noreferrer"&gt;X&lt;/a&gt; and &lt;a href="https://www.linkedin.com/in/ramanbutta/" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
