Dynamically get image dimensions from image URL in React
Problem statement There might be cases when you would be required to obtain metadata of a media before it is loaded. The usual way you would go about it is to have an API that gives back the media metadata from the server. But here we will be getting the image dimension using React.
Steps to solution Firstly, we will be creating an instance of the HTML Image element and then pass the image URL.
read more
Thursday, Jan 14, 2021
By Prashant Shahi
Data Analysis using Sparks, Pandas, and Matplotlib using Jupyter Notebook for data in S3(Minio)
Data Analysis is to understand problems facing an organization and to explore data in meaningful ways. Data in itself is merely facts and figures. Evaluation of the data can provide advantages to the organization and aid in making business decisions.
Brief Overview of the components Apache Spark is a lightning-fast cluster computing technology, designed for fast computation and based on Hadoop MapReduce.
Pandas is a software library written in Python for data manipulation and analysis.
read more
Monday, May 13, 2019
By Prashant Shahi
Recover from firewall not allowing ssh on port 22 in GCP instance
Tried to setup UFW or any other Firewall, but it disallows any traffic to port 22, which doesn’t let you ssh to your Google Cloud Platform (GCP) or Aamazon Web Services (AWS) instance? đ
This article might be your savior. đ
Follow the instructions below :
Go to your VM’s configuration page. Select the project. Then, Go to Compute -> Compute Engine -> VM Instances. Click the VM you want to recover Click Edit.
read more
Friday, Apr 26, 2019
By Prashant Shahi
Deleting ElasticSearch indices periodically using Curator and Cron Job
Here is a complete step-by-step instruction to set a cronjob using Curator to delete ElasticSearch indices periodically.
Installation of Python and Pip You can skip this step, if you already have python and pip.
Step 1:
Ensure that all packages are up-to-date. After running the command below, youâll get an output of any packages getting their update.
sudo apt-get update Step 2:
Install python and pip using apt-get.
sudo apt-get install -y python-dev python-pip Step 3:
read more
Wednesday, Apr 10, 2019
By Prashant Shahi
Some of the best Blockchain Invention â yet to explore full potential
There is so much potential in the field of Blockchain that can change the way we do everything.
Let me summarize some of the things that made or âyet to makeâ the world amazed.
The invention of Bitcoin: First decentralized cryptocurrency and implementation of Blockchain. Solved problem of double spending and eliminated the need of the third party to approve the transaction.
The invention of Ethereum: It is 2nd generation Blockchain and uses SmartContracts which makes it highly programmable.
read more
Sunday, Jul 15, 2018
By Prashant Shahi