<?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>Forem: Gaurav Pandey</title>
    <description>The latest articles on Forem by Gaurav Pandey (@gauravkrp).</description>
    <link>https://forem.com/gauravkrp</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%2F502504%2F6af164a6-0965-4b80-b5e2-681af2f633a3.png</url>
      <title>Forem: Gaurav Pandey</title>
      <link>https://forem.com/gauravkrp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/gauravkrp"/>
    <language>en</language>
    <item>
      <title>I got tired of guessing if "that" image was real. So I built a tool to prove it.</title>
      <dc:creator>Gaurav Pandey</dc:creator>
      <pubDate>Sun, 15 Feb 2026 04:12:59 +0000</pubDate>
      <link>https://forem.com/gauravkrp/i-got-tired-of-guessing-if-that-image-was-real-so-i-built-a-tool-to-prove-it-93p</link>
      <guid>https://forem.com/gauravkrp/i-got-tired-of-guessing-if-that-image-was-real-so-i-built-a-tool-to-prove-it-93p</guid>
      <description>&lt;p&gt;We’ve all had that moment. You’re scrolling, you stop at a photo, and something feels... &lt;em&gt;off&lt;/em&gt;. The lighting is too perfect. The skin texture is too smooth. But you can't be sure.&lt;/p&gt;

&lt;p&gt;We are rapidly losing our ability to trust what we see on the web.&lt;/p&gt;

&lt;p&gt;Existing detection tools are often "black boxes"—they give you a random percentage without explaining why. I didn't want a guess; I wanted evidence.&lt;/p&gt;

&lt;p&gt;So I spent some time building &lt;strong&gt;AI Content Scanner&lt;/strong&gt;—an open-source Chrome extension that doesn't just look at the pixels; it digs into the digital DNA of the content you consume.&lt;/p&gt;

&lt;p&gt;Here is the breakdown of the build:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The Verdict (No Magic, Just Math)
&lt;/h3&gt;

&lt;p&gt;The extension assigns a "Confidence Score" (0–100%) to every image, video, and text block. But unlike other tools, it tells you exactly &lt;em&gt;how&lt;/em&gt; it got there.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Likely Real:&lt;/strong&gt; No digital fingerprints found.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;AI Detected:&lt;/strong&gt; Hard evidence found (metadata tags, signatures).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Uncertain:&lt;/strong&gt; The file is messy, but has suspicious traits.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. The Granular Details (How it works)
&lt;/h3&gt;

&lt;p&gt;I didn’t want to rely on visual classifiers that hallucinate. I focused on deterministic signals—the stuff the models leave behind.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;C2PA &amp;amp; JUMBF:&lt;/strong&gt; It scans the binary data for the new cryptographic provenance standards used by responsible AI generators.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Metadata Forensics:&lt;/strong&gt; It parses EXIF and XMP data looking for specific signatures from tools like Adobe Firefly, DALL-E 3, and Midjourney.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google SynthID:&lt;/strong&gt; It checks for the specific watermarking techniques used by Imagen and Gemini.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LLM "Slop" Detection:&lt;/strong&gt; For text, it analyzes sentence uniformity and "transition word density." (If a paragraph uses the word "delve" or "tapestry" three times, it’s probably GPT-4).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. The Show (The Experience)
&lt;/h3&gt;

&lt;p&gt;I wanted it to be passive. You don't have to upload anything. You just browse the web. When the extension detects something synthetic, it slaps a badge on it. You hover over the badge, and it shows you the raw data: &lt;em&gt;"Source: Midjourney v6" or "Software: Adobe Firefly."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;It is transparent, it is local, and it is open source.&lt;/p&gt;

&lt;p&gt;If you are a dev, I’d love for you to poke around the code, break it, or add new signatures.&lt;/p&gt;

&lt;p&gt;👉 &lt;strong&gt;Repo &amp;amp; Download:&lt;/strong&gt; &lt;a href="https://github.com/gauravkrp/ai-content-scanner" rel="noopener noreferrer"&gt;https://github.com/gauravkrp/ai-content-scanner&lt;/a&gt;&lt;br&gt;
👉 &lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://ai-content-scanner.vercel.app" rel="noopener noreferrer"&gt;https://ai-content-scanner.vercel.app&lt;/a&gt;&lt;/p&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%2Ffcfg0455xpvgrov2nbbc.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%2Ffcfg0455xpvgrov2nbbc.png" alt=" " width="800" height="1184"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;⚠️ Note on Installation:&lt;/strong&gt;&lt;br&gt;
The extension is currently under review by the Chrome Web Store (pending approval). But since it's open source, you don't have to wait to use it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Releases&lt;/strong&gt; section on the GitHub repo and download &lt;code&gt;extension.zip&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Open &lt;code&gt;chrome://extensions&lt;/code&gt; in your browser.&lt;/li&gt;
&lt;li&gt;Toggle &lt;strong&gt;"Developer mode"&lt;/strong&gt; on (top right corner).&lt;/li&gt;
&lt;li&gt;Drag and drop the zip file into the window.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;(It takes about 10 seconds, and you’re good to go.)&lt;/p&gt;

&lt;p&gt;#OpenSource #Engineering #WebDev #AI #Transparency #ChromeExtension #BuildInPublic&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ai</category>
      <category>opensource</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Your Life in Weeks</title>
      <dc:creator>Gaurav Pandey</dc:creator>
      <pubDate>Sun, 29 Sep 2024 10:33:28 +0000</pubDate>
      <link>https://forem.com/gauravkrp/your-life-in-weeks-228b</link>
      <guid>https://forem.com/gauravkrp/your-life-in-weeks-228b</guid>
      <description>&lt;p&gt;Hey folks, I just launched a site to visualize Your Life in weeks! &lt;br&gt;
Your Life in weeks helps you visualize your life in weeks, months, and years. Inspired by Tim Urban’s “Life in Weeks” concept, the app lets you see your life as a grid of time, allowing you to reflect on how you’ve spent your years and plan for the future!&lt;/p&gt;

&lt;p&gt;Features:&lt;br&gt;
    • Visualize your life in weeks, months, or years.&lt;br&gt;
    • Interactive grid view and chart view.&lt;br&gt;
    • Set your life expectancy and see how much time you have left to live your best life!&lt;br&gt;
    • A clean, minimalistic design that’s mobile-friendly. &lt;/p&gt;

&lt;p&gt;Try it out at: &lt;a href="https://countmylife.com" rel="noopener noreferrer"&gt;countmylife.com&lt;/a&gt;.&lt;br&gt;
I’d love to hear your feedback and thoughts! 😊 Let me know what you think, and feel free to share with anyone who might find it useful. &lt;a href="https://github.com/gauravkrp/life-in-weeks" rel="noopener noreferrer"&gt;Github Repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>learning</category>
    </item>
    <item>
      <title>Add Snow to Your Website with Snowify: 2 lines of JavaScript</title>
      <dc:creator>Gaurav Pandey</dc:creator>
      <pubDate>Thu, 22 Dec 2022 20:48:43 +0000</pubDate>
      <link>https://forem.com/gauravkrp/add-snow-to-your-website-with-snowify-a-simple-js-library-29k4</link>
      <guid>https://forem.com/gauravkrp/add-snow-to-your-website-with-snowify-a-simple-js-library-29k4</guid>
      <description>&lt;p&gt;It's the holiday season and what better way to get into the festive spirit than by adding some snow to your website? With &lt;strong&gt;Snowify&lt;/strong&gt;, a small JavaScript library, you can easily add a snow effect to any website by simply inserting two lines of code in the head of your HTML file.&lt;/p&gt;

&lt;p&gt;To use &lt;strong&gt;Snowify&lt;/strong&gt;, first, you need to include the library in your HTML file. You can do this by adding the following script tag in the head of your HTML page:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script src="https://gauravkrp.com/snowify.min.js"&amp;gt;&amp;lt;/script&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, you need to &lt;strong&gt;initialize&lt;/strong&gt; the snow effect by calling the &lt;code&gt;initSnowify()&lt;/code&gt; function. You can do this by adding the following script tag in the head of your HTML file:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
  initSnowify();
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will use the default values for the snow effect, which include a &lt;strong&gt;white color&lt;/strong&gt; and a count of &lt;strong&gt;200 snowflakes&lt;/strong&gt;. You can &lt;strong&gt;customize&lt;/strong&gt; the snow effect by passing an options object to the initSnowify() function. Make sure that this function get called only after DOM is loaded, so you might need to move this piece of code to the footer or before body closing tag.&lt;/p&gt;

&lt;p&gt;For example, you can specify the color of the snowflakes by using the &lt;code&gt;snowColor&lt;/code&gt; property:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;script&amp;gt;
  initSnowify({
    snowColor: 'offWhite',
    snowCount: 100
  });
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The snowColor property can be set to one of the following values: &lt;code&gt;white, offWhite, veryLightBlue, lightBlue, and blue&lt;/code&gt;. The default value is &lt;code&gt;white&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You can also customize the number of snowflakes to display on the screen by using the snowCount property. The &lt;code&gt;snowCount&lt;/code&gt; property can be set to any positive integer. The default value is &lt;code&gt;200&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Snowify&lt;/code&gt; is a simple and easy-to-use JavaScript library that lets you add a snow effect to any website. It's a fun and festive way to celebrate the holiday season and bring some cheer to your website. &lt;strong&gt;Snowify&lt;/strong&gt; your website today and spread the holiday cheer!&lt;/p&gt;

&lt;p&gt;PS - This entire article was written by &lt;a href="https://chat.openai.com/chat" rel="noopener noreferrer"&gt;chatGPT&lt;/a&gt; and the cover image was generated by &lt;a href="https://openai.com/dall-e-2/" rel="noopener noreferrer"&gt;DALL.E 2&lt;/a&gt; :-) &lt;/p&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%2Fxsetjilyecju1v565t42.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%2Fxsetjilyecju1v565t42.png" alt=" " width="800" height="800"&gt;&lt;/a&gt;&lt;br&gt;
Happy Holidays!!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>christmas</category>
      <category>snow</category>
    </item>
    <item>
      <title>Names fuzzy match in javascript</title>
      <dc:creator>Gaurav Pandey</dc:creator>
      <pubDate>Mon, 12 Sep 2022 16:48:45 +0000</pubDate>
      <link>https://forem.com/gauravkrp/names-fuzzy-match-in-javascript-20dg</link>
      <guid>https://forem.com/gauravkrp/names-fuzzy-match-in-javascript-20dg</guid>
      <description>&lt;p&gt;I recently came across a requirement in one of the projects where we need to implement fuzzy string match for the user's name field. Now if you do not what a fuzzy match is, you can google to learn in details, but in short it is a technique in computer science of finding strings that match a pattern approximately (rather than exactly). &lt;/p&gt;

&lt;p&gt;For example, if we take names of two people to be Cathryn and Kathryn or Gaurav and Gourav (Indian names), while the exact spelling is different but the sound of two names are similar (or same in some cases). This is an example of phonetic based fuzzy string matching. There are many different algorithms. &lt;a href="https://towardsdatascience.com/fuzzy-string-matching-algorithms-e0d483c2a9ea" rel="noopener noreferrer"&gt;Read here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For practical purposes, you may come across a record dataset with people names where you might have to find people with names matching a given sound. In ours case, where I was integrating &lt;a href="https://abdm.gov.in/abdm" rel="noopener noreferrer"&gt;India health stack ABDM APIs&lt;/a&gt; within our application at &lt;a href="https://medblocks.org/" rel="noopener noreferrer"&gt;Medblocks&lt;/a&gt;, we need to mark names with similar phonetic fuzzy match as same or correct, so if one searched for Gourav in the dataset, the results would also contains records with names such as Gaurav, Gauruv or anything that sounds similar to Gourav. This is particularly useful in scenarios where you might spell (or type) a person's name differently than what he/she has actually in his/her personal ID documents because names are not dictionary objects.&lt;/p&gt;

&lt;p&gt;After some research, I found couple of open source libraries in python and javascript for this task and finally decided to go with &lt;a href="https://yomguithereal.github.io/talisman/" rel="noopener noreferrer"&gt;Talisman&lt;/a&gt;. &lt;a href="https://www.npmjs.com/package/talisman" rel="noopener noreferrer"&gt;NPM package is here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://stackblitz.com/edit/names-fuzzy-match-javascript?file=index.js" rel="noopener noreferrer"&gt;Here is a quick demo&lt;/a&gt; on how to use this library to implement your fuzzy string match requirements. I've only used two phonetic algorithms &lt;code&gt;fuzzy-soundex&lt;/code&gt; and &lt;code&gt;daitch-mokotoff&lt;/code&gt; in the demonstration here but in a real use-case, you might use different and more number of algorithms depending on why do you need a fuzzy string match.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>medblocks</category>
      <category>abdm</category>
      <category>fuzzy</category>
    </item>
    <item>
      <title>JavaScript: Find sum of numbers present in elements of nested array</title>
      <dc:creator>Gaurav Pandey</dc:creator>
      <pubDate>Thu, 16 Jun 2022 08:42:43 +0000</pubDate>
      <link>https://forem.com/gauravkrp/javascript-find-sum-of-numbers-present-in-elements-of-nested-array-lbb</link>
      <guid>https://forem.com/gauravkrp/javascript-find-sum-of-numbers-present-in-elements-of-nested-array-lbb</guid>
      <description>&lt;p&gt;Hello Dev folks, I'm Gaurav - a front-end focused software developer from India. Recently I came across a JavaScript problem that required me to find sum of all the numbers present in elements of a nested array.&lt;br&gt;
Okay without any further ado, here is the problem:&lt;br&gt;
&lt;code&gt;sum([1, 'x', '2x', ['3', ['x2', '5']]]);&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;So, you see a nested array with 2 levels of nesting being feed to a sum function.&lt;/p&gt;

&lt;p&gt;Immediately it comes to mind that if the array was flattened, the task would have been much easier. So, that's what we are gonna do now. &lt;strong&gt;Flatten the array&lt;/strong&gt;. You can flatten any way you want it - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use flat method available on arrays.&lt;/li&gt;
&lt;li&gt;Use reduce and concat.&lt;/li&gt;
&lt;li&gt;Use a library such as lodash.&lt;/li&gt;
&lt;li&gt;Use a recursive function &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;While using flat method on arrays is simplest to implement, I decided go with 4 and write a recursive method to flatten the array. It is fast and works for any input and any level of nesting. I'm using newer ES6 syntax.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const flattenArr = (arr, result = []) =&amp;gt; {
  for (let i = 0, length = arr.length; i &amp;lt; length; i++) {
    const value = arr[i];
    if (Array.isArray(value)) {
      flattenArr(value, result);
    } else {
      result.push(value);
    }
  }
  return result;
};
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, we have a flat Array and the task is easier now.&lt;br&gt;
We will use a variable &lt;code&gt;sum&lt;/code&gt; to store the result and set its initial value zero.&lt;br&gt;
We can loop through each element of our new Array and if it is a number, we can add and assign it immediately to our sum variable.&lt;br&gt;
The things get exciting when the elements of our new flat array are not a number. You can see in the problem statement above that we have two types of strings, one starting with a number and other starting with a character - &lt;code&gt;'3'&lt;/code&gt;, &lt;code&gt;'2x'&lt;/code&gt; and &lt;code&gt;'x2'&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;For strings, starting with a number, we can directly use &lt;code&gt;parseInt&lt;/code&gt; method and it will return the number for first type of string and NaN for the second type of string. That is, after using &lt;code&gt;partseInt&lt;/code&gt; on &lt;code&gt;'2x'&lt;/code&gt; and &lt;code&gt;'3',&lt;/code&gt; we will get 2 and 3 respectively. These values being number can be added to our sum variable. While &lt;code&gt;parseInt('x2')&lt;/code&gt; will return &lt;code&gt;NaN&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;You can use another inbuilt method &lt;code&gt;isNaN&lt;/code&gt; to check if the returned value is NaN. If the value is &lt;code&gt;NaN&lt;/code&gt;, then we need to think of other ways to get the number present in that string. Regex comes to our rescue here, we can use a regex to match and filter the number present in string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const findNumInStringRegex = /\d+/;
let findNumInString = num.match(findNumInStringRegex);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This &lt;code&gt;findNumInString&lt;/code&gt; will either be &lt;code&gt;null&lt;/code&gt; or a number as string i.e, &lt;code&gt;null or '5'&lt;/code&gt;.&lt;br&gt;
If it is &lt;code&gt;null&lt;/code&gt; there is nothing we can do, but for the other case we can again use &lt;code&gt;parseInt&lt;/code&gt; to get the number and add it to our sum variable.&lt;/p&gt;

&lt;p&gt;This way, we can add all the numbers present in elements of the nested array given in the problem.&lt;br&gt;
The solution is present in a &lt;a href="https://jsfiddle.net/gauravkrp/yup5j417/10/" rel="noopener noreferrer"&gt;jsfiddle here&lt;/a&gt;.&lt;/p&gt;

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