Posts

Featured Post

SQL Interview Success: Unlocking the Top 5 Frequently Asked Queries

Image
 Here are the five top commonly asked SQL queries in the interviews. These you can expect in Data Analyst, or, Data Engineer interviews. Top SQL Queries for Interviews 01. Joins The commonly asked question pertains to providing two tables, determining the number of rows that will return on various join types, and the resultant. Table1 -------- id ---- 1 1 2 3 Table2 -------- id ---- 1 3 1 NULL Output ------- Inner join --------------- 5 rows will return The result will be: =============== 1  1 1   1 1   1 1    1 3    3 02. Substring and Concat Here, we need to write an SQL query to make the upper case of the first letter and the small case of the remaining letter. Table1 ------ ename ===== raJu venKat kRIshna Solution: ========== SELECT CONCAT(UPPER(SUBSTRING(name, 1, 1)), LOWER(SUBSTRING(name, 2))) AS capitalized_name FROM Table1; 03. Case statement SQL Query ========= SELECT Code1, Code2,      CASE         WHEN Code1 = 'A' AND Code2 = 'AA' THEN "A" | "A

How to Work with 'Pointers' in Python

Image
Pointers denote an address (memory location). It has three identities - Name, Value, and Location (Address). Python doesn't support pointers as-is. You need to import 'ctypes' package to work with C Language. Note : Pointer is popular in C, C++. The called module just uses the value of Pointer (not address).  Below is my detailed post on pointers.   How to work with Pointers To pass a reference(address) to the C interface. You can use C Language in Python by importing 'ctypes.'  Pointer Notation 1. Value 2. Address 3. Name Python Pointers Python doesn't support pointers. C and C++ extensively support pointers. Pointer is nothing but an ADDRESS. It is immutable. That means you can't change the value. Python supports pointers for the purpose to interact with C Language. How to Import 'ctypes' Import 'ctypes' library for the purpose of working with C language.  Here's how to import 'ctypes' for windows and Linux. How to denote Pointe

Cloud Computing: Horizontal Vs. Vertical Scaling

Image
The purpose of cloud computing is resource utilization. You can scale up the resources in two ways - vertical and horizontal. Adding resources, you can do either horizontally and vertically . The advantages and drawbacks you can find in simple words. Scaling 1. Horizontal Scaling Advantages You can increase workloads in small steps. The upgrade-cost is far less. Scale the system as much as needed. Drawbacks Dependency on software applications is more for Data distribution and parallel processing. On top of that, fewer software applications exist in the market. You May Also Like:  9 Top Services AWS Provided 2. Vertical Scaling Advantages Since it is a single machine, it is easy to manage. On the fly, you can increase workloads. Drawbacks It is expensive. You need a huge investment. The machine should be powerful to take more workloads - future use. Below is the List of Resources that You can do both Horizontal and Vertical Scaling Platform Scaling Network Scaling Container Scaling Dat

How to Fix Python Syntax Errors Quickly

Image
In Python, you can call parsing errors Syntax errors. How to fix the syntax errors quickly, I can show in this post. Also, check Python Syntax Errors Cheat Sheet. Python Syntax Error. If you run the Python code, the interpreter first parses the logic. If any errors are found, it is the developer's responsibility to fix them. Courtesy: Python documentation.   >>> while True print ( 'Hello world' ) File "<stdin>" , line 1 while True print ( 'Hello world' ) ^ SyntaxError : invalid syntax How to Fix the Syntax Error First, check for the line number. In the above case, it is '1'. Then look for the symbol '^'. The issue is at the PRINT function. The reason is before the PRINT function you need a colon ':'. That is the reason, you are getting errors. This is a syntax error. Find below the corrected logic: >>> while True : print ( 'Hello world' ) File "&l

Offline Authentication - The Top Differences Between RSA and Entrust Tokens

Image
RSA token and Entrust token both are public-key providers. In the process of identity management, both play a typical role.  Once you register with token providers, you will get one private Token. You need to enter both a private PIN and a Token number displayed on the App. These tokens are mandatory for financial projects . Else they have to pay hefty penalties by non following compliance. Also, check  AWS Encryption Top Supported Features . Entrust Token. Entrust provides both private and public keys to access secure domains. Time-based OATH TOTP algorithm (OT version). Supports PVN validation. First, you need to enter the private PIN and then Token. RSA Token. RSA provides both private and public keys. Both the keys you need to enter to log in to financial or secure servers. Identity management. Both Soft token and Hard tokens available. With the registered token, you can access multiple devices. Finger Print based tokens available Face recognition Tokens available. RSA uses a machi

Python Dictionary Vs List With Examples

Image
Dictionary and List we use interchangeably in Python to store values. For beginners, both look the same. In reality, they both differ. Here are the differences. Dictionary Vs Lists Values in lists are accessed by means of integers called indices, which indicate where in the list a given value is found. Dictionaries access values by means of integers, strings, or other Python objects called keys , which indicate where in the dictionary a given value is found.  In other words, both lists and dictionaries provide indexed access to arbitrary values, but the set of items that can be used as dictionary indices is much larger than, and contains, the set of items that can be used as list indices.   Also, the mechanism that dictionaries use to provide indexed access is quite different from that used by lists. Both lists and dictionaries can store objects of any type. Values stored in a list are implicitly ordered by their positions in the list because the indices that access these values are c

Hadoop fs (File System) Commands List

Image
Hadoop HDSF File system commands given in this post. These are useful for your projects and interviews. HDFS commands HDFS File System Commands. Hadoop fs -cmd <args> cmd is a specific command and arg is the variable name.  The List of Commands cat  Hadoop fs –cat FILE [FILE …]  Displays the files' content. For reading compressed files.  chgrp  Hadoop fs –chgrp [-R] GROUP PATH [PATH …]  Changes the group association for files and directories. The – R option applies the change recursively.  The user must be the files' owner or a superuser.  chmod  Hadoop fs –chmod [-R] MODE[,MODE …] PATH [PATH …]  Changes the permissions of files and directories. Like, its Unix equivalent, MODE can be a 3-digit octal mode, or {augo}+/-{rwxX}. The -R option applies the change recursively. The user must be the files' owner or a superuser.  chown  Hadoop fs –chown [-R] [OWNER][:[GROUP]] PATH [PATH…]  Changes the ownership of files and directories. The –R option applies the change recursiv

AWS Vs Azure Load Balancers Top Insights

Image
In AWS, you have three types of load-balancers. In the case of Azure, you have only two load balancers. This post tells you the comparison between these two. 1. AWS Load Balancers: Application Load balancer Network Load balancer Classic Load balancers. a. Application Load Balancer Balancing of HTTP and HTTPS traffic and provides advanced request routing targeted at the delivery of modern application architectures, including micro-services and containers.  Operating at the individual request level (Layer 7), Application Load Balancer routes traffic to targets within Amazon Virtual Private Cloud (Amazon VPC) based on the content of the request. b. Network Load Balancer Network Load Balancer is best suited for load balancing of Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Transport Layer Security (TLS) traffic where extreme performance is required. c. Classic Load Balancer The Classic Load Balancer provides the basic load-balancing across multiple Amazon EC2 inst