Skip to content

Instantly share code, notes, and snippets.

View SamirPaulb's full-sized avatar
🟢
Online

Samir Paul SamirPaulb

🟢
Online
View GitHub Profile
@SamirPaulb
SamirPaulb / TCP vs UDP.md
Created March 25, 2023 18:52
TCP vs UDP

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) are two of the most commonly used protocols for transmitting data over a network.

TCP is a reliable and connection-oriented protocol, meaning that a virtual connection must be established between the sender and the receiver before data can be transmitted. It ensures that data is delivered to the recipient in the same order it was sent, and that it is received without errors. If a packet of data is lost or corrupted during transmission, TCP will automatically retransmit the missing data until it is successfully received. This makes TCP a great choice for applications that require reliable data transfer, such as email and file transfers.

UDP, on the other hand, is a connectionless and unreliable protocol. Unlike TCP, it does not establish a virtual connection between the sender and the receiver, and it does not guarantee that the data will be delivered in the same order it was sent. It is faster than TCP because it has less overhead, but i

@SamirPaulb
SamirPaulb / SSL TLS mTLS.md
Created March 25, 2023 18:52
SSL TLS mTLS

SSL (Secure Sockets Layer), TLS (Transport Layer Security), and mTLS (Mutual TLS) are all security protocols used to secure communications over the internet.

SSL was the original protocol used to secure internet communications, but it has been largely replaced by TLS, which is considered to be more secure. TLS is a cryptographic protocol that provides secure communication between two endpoints, such as a web server and a client browser. It ensures that the data transmitted between the endpoints is confidential and integrity protected.

mTLS, also known as Mutual TLS, is an extension of TLS that adds an extra layer of security by requiring both the client and server to present a valid certificate to each other. This provides a stronger level of identity validation and protects against man-in-the-middle attacks. mTLS is used in situations where it is important to ensure the authenticity of both parties involved in a communication, such as in financial transactions or sensitive data transfers.

In summary, SS

@SamirPaulb
SamirPaulb / Sharding or Data Partitioning.md
Created March 25, 2023 18:51
Sharding or Data Partitioning in System Design

Partitioning methods

  • Horizontal partitioning
    • Range based sharding.
    • Put different rows into different tables.
    • Con
      • If the value whose range is used for sharding isn’t chosen carefully, the partitioning scheme will lead to unbalanced servers.
  • Vertical partitioning
    • Divide data for a specific feature to their own server.
  • Pro
@SamirPaulb
SamirPaulb / SQL vs. NoSQL.md
Created March 25, 2023 18:49
SQL vs. NoSQL ~ Scalability, Querying, Schema

Common types of NoSQL

Key-value stores

  • Array of key-value pairs. The "key" is an attribute name.
  • Redis, Vodemort, Dynamo.

Document databases

  • Data is stored in documents.
  • Documents are grouped in collections.
  • Each document can have an entirely different structure.
@SamirPaulb
SamirPaulb / Online PDF Compression Tool.md
Last active March 25, 2023 18:47
An online PDF file compression tool to reduce the size of a .pdf file. Python Flask is used to upload the file to a temporary location on the server. In the backend, using the PDFNetPython library that file gets reduced and saved to its final location. After download, the files are automatically deleted from the server after 1 hour. Technologies…

Online PDF file compression tool

About The Project:

An online PDF file compression tool to reduce the size of a .pdf file. Python Flask is used to upload the file to a temporary location on the server. In the backend, using the PDFNetPython library that file gets reduced and saved to its final location. After download, the files are automatically deleted from the server after 1 hour. Technologies used in this project: Python3, Flask, C, Shell, Nix, Replit, Git, HTML, CSS, JavaScript.

@SamirPaulb
SamirPaulb / system-design.md
Last active March 26, 2023 19:45
Learn how to design systems at scale and prepare for system design interviews.

System Design Course

I'm soon going to join Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin, Klarna & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for SDE1/2 and above. So sharing list of companies with all of you:

Do consider to UPVOTE, if it helped you.

London

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

# A Huffman Tree Node
class node:
def __init__(self, freq, symbol, left=None, right=None):
# frequency of symbol
self.freq = freq
# symbol name (character)
self.symbol = symbol
# node left of current node
# A Huffman Tree Node
class node:
def __init__(self, freq, symbol, left=None, right=None):
# frequency of symbol
self.freq = freq
# symbol name (character)
self.symbol = symbol
# node left of current node