Open in app
Home
Notifications
Lists
Stories

Write
Amit Singh Rathore
Amit Singh Rathore

Home

Published in Python in Plain English

·1 day ago

Longest Common Prefix

Different ways to find common prefixes for a list of words — Longest common prefix (LCP) for a pair of strings string1 and string2 is the longest string string which is the prefix of both string1 and string2. Problem Statement Given the array of strings A, you need to find the longest string S which is the prefix of all the strings in the…

Python

3 min read

Longest Common Prefix
Longest Common Prefix

Published in FAUN Publication

·4 days ago

Intervals— Coding Pattern

Understand how to work with intervals Interval is a period of time(can be data points as well) between events or states. There are many real-life problems that deal with intervals. 1. Scheduling and assigning rooms for classes or meetings. 2. Organizing data in memory and calculating allocated and free spaces…

Python

6 min read

Intervals— Coding Pattern
Intervals— Coding Pattern

Published in FAUN Publication

·4 days ago

Priority Queue using Heapq

Implementation of priority queue using heap Priority Queue is an abstract data structure. It supports the following operations: Check whether the queue is empty. Add an element to the queue. Pop an element with the highest priority. There are two ways to assign priority: The smallest element has the highest…

Python

7 min read

Priority Queue using Heapq
Priority Queue using Heapq

Published in FAUN Publication

·May 17

Primer on Spark Join strategy

How joins are performed in Spark The Join operation is the most commonly used transformation in Spark. Behind the scene, spark uses some algorithms to decide how to implement the join. In this blog, we will see how spark decides which strategy is used for Join. Factors affecting Spark Join strategy Data Size Join Hint Type of…

Spark

4 min read

Primer on Spark Join strategy
Primer on Spark Join strategy

Published in Python in Plain English

·May 16

How to Iterate Over List Items in Python

7 ways of iterating over lists in Python. — In Python, there are multiple ways to iterate over a list. In this blog, we will see the 7 ways of doing so. For loop Index iteration — for_loop_idx for index in range(start, stop[, step]) Direct Item access — for_loop_item for item in input_list: Both index & Item for_loop_idx_item for_loop_enumerate enumerate(iterable, start_index): …

Python

2 min read

How to Iterate Over List Items in Python
How to Iterate Over List Items in Python

Published in FAUN Publication

·May 16

Best practices for AWS Lambda

Good practices to follow while working with lambda A brief intro to lambda working. Lambda function components Handler —Entrypoint of the lambda function Event — JSON Payload received during lambda function invocation. AWS services generate their own JSON. Context — Representation of the runtime and execution environment. function_name , function_version , invoked_function_arn , memory_limit_in_mb …

AWS Lambda

4 min read

Best practices for AWS Lambda
Best practices for AWS Lambda

Published in AWS Tip

·May 15

Spark on EMR — Cost Optimization

First-hand experience of cost-saving for Spark on EMR — Recently I was engaged in a project which aimed at improving our ETL pipeline’s performance & bringing down the cost of running those Jobs. We were running most ETLs on long-running EMR clusters. Our upgrade was as follows:

Spark

3 min read

Spark on EMR — Cost Optimization
Spark on EMR — Cost Optimization

Published in Python in Plain English

·May 15

Exception Handling in Python

try…except…else…finally — When a Python script raises a runtime exception if it is not handled program terminates and exits. If we want to control the flow of the program in those scenarios we should use exception handling. In this blog we use the following code block to understand the flow: import random try…

Python

3 min read

Exception Handling in Python
Exception Handling in Python

Published in Nerd For Tech

·May 13

Threat Modeling — Lambda

Embedding security into the lambda service offering In the last blog, Threat Modelling — EKS, we saw how to evaluate the security posture of EKS, in this blog, we will do a similar exercise for AWS Lambda. Shared responsibility Model Customer Function code, libraries, extension, layers Data in cloud Data in Transit Resource Configuration IAM Other Service configuration…

AWS

6 min read

Threat Modelling — Lambda
Threat Modelling — Lambda

Published in Python in Plain English

·May 10

TRIE — With Python

Understanding the Trie data structure — A Trie, (also known as a prefix tree) is a special type of tree used to store associative data structures (collection of nodes that point to other nodes). The term “trie” comes from the word retrieval as strings can be retrieved by traveling down a branch path of the tree…

Trie

4 min read

TRIE — With Python
TRIE — With Python
Amit Singh Rathore

Amit Singh Rathore

Cloud | Big Data | ML

Following
  • Tony

    Tony

  • adrian cockcroft

    adrian cockcroft

  • Kanika Modi

    Kanika Modi

  • Paul Horan

    Paul Horan

  • Dilip Kola

    Dilip Kola

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable