Skip to content

Instantly share code, notes, and snippets.

View parthamk's full-sized avatar
🎯
Focusing

Partha Mallick parthamk

🎯
Focusing
View GitHub Profile
@parthamk
parthamk / Readme.md
Created November 6, 2024 16:35
Core Python + DSA for Data Science

Week 1-2: Python Fundamentals

  1. Basic Syntax and Data Types

    • Variables, data types (integers, floats, strings)
    • Type casting and basic input/output functions (print, input)
  2. Control Structures

    • Conditionals (if, elif, else)
    • Loops (for, while)
  • List comprehensions for concise loops

Community forum project

Step 1: Project Setup

  1. Set up your development environment:
    • Install Node.js and npm
    • Install MongoDB locally or set up a cloud instance
    • Create a Supabase account and project
@parthamk
parthamk / Coin.md
Created September 12, 2024 04:55
Coin Market

if I decide to divide 1 rupee to divide into many people for various transactions how many decimal point I should consider?

For practical purposes when dividing 1 rupee among many people, you should consider using 2 decimal points. This is because:

  1. The smallest denomination of the Indian rupee in circulation is the 1 paisa coin, which is equal to 0.01 rupees.

  2. Most financial systems and banks in India typically record transactions up to 2 decimal places for rupees.

  3. Using more than 2 decimal places would result in fractions of a paisa, which are not practically usable in real-world transactions.

In JavaScript, dividing any number by zero results in a specific error depending on the data types involved:

  • Regular Numbers: When you divide a regular number (of the Number type) by zero, the result is either Infinity (positive number divided by zero) or -Infinity (negative number divided by zero). This behavior is due to the IEEE 754 floating-point standard used by JavaScript to represent numbers.

    console.log(10 / 0);  // Output: Infinity
    console.log(-5 / 0); // Output: -Infinity
  • BigInts: If you attempt to divide a BigInt (a special data type for arbitrary-precision integers) by zero, a RangeError: BigInt division by zero exception is thrown. BigInts follow stricter mathematical rules, and division by zero is undefined in this context.

@parthamk
parthamk / MVC.md
Created May 23, 2024 15:20
Understand Model View Structure

MVC is a design pattern used for developing software applications, particularly web applications. It divides the application into three interconnected components, which helps in separating concerns and improving code organization. Here's a detailed look at each component:

Model-View-Controller (MVC) Explained

  1. Model:
    • Purpose: The model represents the data and the business logic of the application. It is responsible for managing the data, whether it's retrieving it from a database, performing calculations, or applying business rules.
    • Responsibilities:
      • Data Management: Interacting with the database or other data sources to fetch and store data.
      • Business Logic: Implementing the core functionality and rules of the application.
  • State Management: Keeping track of the current state of the data and notifying the view of any changes.
@parthamk
parthamk / InterviewPrep.md
Last active May 17, 2024 12:27
Javascript Interview prep

Theoretical Questions and Answers

Variables and Data Types

  1. Question: What are the different data types in JavaScript?

    Answer: JavaScript has several data types, including:

    • Primitive types: String, Number, Boolean, Null, Undefined, Symbol, and BigInt.
    • Non-primitive types: Object (which includes arrays and functions).
@parthamk
parthamk / OOPS.md
Created May 12, 2024 14:42
Oops in simple words.

Imagine you have a toy box.

  1. Objects: In this toy box, you have different toys like cars, dolls, and blocks. Each toy is like an object in programming. A car has wheels, a color, and can drive. A doll has hair, clothes, and can talk. These are the properties and behaviors of objects.

  2. Classes: Now, let's say you have a special box for cars called "Car Box" and another one for dolls called "Doll Box." These boxes are like classes. They tell you what each type of toy can do and what they have. So, the Car Box tells you that cars have wheels, color, and can drive. The Doll Box tells you that dolls have hair, clothes, and can talk.

  3. Encapsulation: Imagine that the Car Box and Doll Box have locks. Only you can open and play with the toys inside. This is like encapsulation in programming. It means that the properties and behaviors of toys (objects) are hidden and protected, and only specific parts can be accessed.

  4. Inheritance: Now, let's say you have a super cool Toy Box that has ev

@parthamk
parthamk / git.md
Created April 20, 2024 08:28
Configuring and install software in ubuntu. (***Require internet to install all software to download dependency)

How to install git

open command prompt and enter command:

sudo apt install git

it will be installed

@parthamk
parthamk / A. HTMLTAGSANDATTRIBUTES.md
Last active March 14, 2024 14:24
Full-stack VIVA prep

I'd be glad to provide a comprehensive response on common HTML tags, attributes, and their purposes, tailored for a Full-Stack certification interview:

Structure and Document Type:

  • <!DOCTYPE html>: This declaration at the very beginning of the document specifies the document type as HTML5 for modern browsers to render it correctly.

Basic Elements:

  • <html>: The root element of the HTML document, containing all other elements.
  • Attribute: lang: Declares the document's primary language (e.g., lang="en" for English).

Enabling Remote Connection Using ngrok | Baeldung on Linux

1. Overview

In this tutorial, we’ll learn about the ngrok reverse proxy service in depth. Additionally, we’ll demonstrate the steps for setting up an SSH server using the ngrok command.

2. ngrok

ngrok is a reverse proxy service that makes it easy for us to tunnel our locally running service to the public network. There are two components to the ngrok service, the ngrok agent and the ngrok edge.