Building websites with React

React tutorial About the tutorial This short note is based and created assuming you are using a Linux (debian/ubuntu) system, most of the commands will run on other systems like Windows and Mac as well but may require some changes. In case you need to follow along and using a Windows system, you can use the Windows Subsystem for Linux to run the commands. Installing react In order to install react, node and npm are required. To install node and npm, run the following command: ...

December 15, 2023 · 5 min · 1031 words · Aum Pauskar

Windows scripts with powershell and cmd

Windows prompts PowerShell PowerShell is a command-line shell and scripting language built on the .NET Framework. It is the successor to the Command Prompt. Commands are called cmdlets and are written in the form Verb-Noun. For example, Get-ChildItem lists the contents of a directory. There are a few aliases for common commands, such as ls for Get-ChildItem and rm for Remove-Item. Write-Output: Prints a line in the shell New-Item: Creates a new file within the same directory Get-Content: Reads the contents of a file Set-Content: Writes the contents of a file Remove-Item: Deletes a file Get-ChildItem: Lists the contents of a directory Command Alias Description Write-Output echo Prints a line in the shell New-Item touch Creates a new file within the same directory Get-Content type Reads the contents of a file Set-Content echo Writes the contents of a file Remove-Item del Deletes a file Get-ChildItem dir Lists the contents of a directory CMD echo <line>: Prints a line in the shell type <file>: Reads the contents of a file file operations copy <source> <target>: Copies a file move <source> <target>: Moves a file del <file>: Deletes a file dir: Lists the contents of a directory cd commands: required to change the current directory cd <dir>: Changes the current directory cd ..: Changes the current directory to the parent directory cd: Changes the current directory to the home directory mkdir <dir>: Creates a new directory system boot options shutdown /s: Shuts down the system shutdown /r: Restarts the system shutdown /l: Logs off the current user shutdown /h: Hibernates the system shutdown /a: Aborts the system shutdown computer processes tasklist: Lists all running processes taskkill /pid <pid>: Kills a process by its PID taskkill /im <name>: Kills a process by its name network operations ipconfig: Lists the network configuration ping <host>: Pings a host software management Note: These commands may require administrator privileges winget install <package>: Installs a package winget uninstall <package>: Uninstalls a package winget search <package>: Searches for a package winget show <package>: Shows information about a package winget source: Lists the package sources winget source add <source>: Adds a package source winget source remove <source>: Removes a package source system information systeminfo: Lists the system information systeminfo | findstr /B /C:"OS Name" /C:"OS Version": Lists the OS information systeminfo | findstr /B /C:"System Boot Time": Lists the system boot time systeminfo | findstr /B /C:"System Manufacturer" /C:"System Model": Lists the system manufacturer and model systeminfo | findstr /B /C:"Total Physical Memory": Lists the total physical memory systeminfo | findstr /B /C:"Available Physical Memory": Lists the available physical memory systeminfo | findstr /B /C:"Virtual Memory: Max Size": Lists the maximum virtual memory computer troubleshooting sfc /scannow: Scans the system for corrupted files chkdsk: Scans the system for corrupted disks dism /online /cleanup-image /restorehealth: Scans the system for corrupted images dism /online /cleanup-image /startcomponentcleanup: Cleans up the system dism /online /cleanup-image /startcomponentcleanup /resetbase: Cleans up the system and resets the base dism /online /cleanup-image /restorehealth /source:<source>: Scans the system for corrupted images using a source dism /online /cleanup-image /startcomponentcleanup /resetbase /source:<source>: Cleans up the system and resets the base using a source Batch files A batch file is a text file containing a series of commands to be executed by the command interpreter. It is similar to a shell script. Batch files have the .bat extension. ...

December 7, 2023 · 4 min · 702 words · Aum Pauskar

Image analysis theory

Image processing Theory jargon Difference between supervised and unsupervised learning Criteria Supervised Learning Unsupervised Learning Data Uses labeled data for training. Uses unlabeled data for training. Goal Predict a label for new data based on past observations. Discover hidden patterns or intrinsic structures within the data. Examples Classification, Regression Clustering, Association Complexity Less complex as it has a clear goal. More complex due to the lack of clear goal. Usage When the outcome of the problem is known. When the outcome of the problem is unknown. Application #1 Spam Detection Customer Segmentation Application #2 Credit Fraud Detection Anomaly Detection EM spectrum The Electromagnetic Spectrum (EM) is the range of all types of EM radiation. Radiation is energy that travels and spreads out as it goes – visible light that comes from a lamp in your house or radio waves from a radio station are two types of electromagnetic radiation. Other examples of EM radiation are microwaves, infrared and ultraviolet light, X-rays, and gamma-rays. ...

December 6, 2023 · 6 min · 1102 words · Aum Pauskar

Big data and hadoop ecosystem

Big data Just data Structured data: data that has a defined length and format for each record. It’s stored in a fixed format such as a relational database or spreadsheet. It’s easy to search and analyze. It’s used for transactional data. Unstructured data: data that has an unknown length and format. It’s stored in a free format such as a text file. It’s difficult to search and analyze. It’s used for non-transactional data. Semi-structured data: data that has a defined length and format for each record but doesn’t conform to the structure of a relational database. It’s stored in a semi-structured format such as XML or JSON. It’s easy to search and analyze. It’s used for non-transactional data. Types of data analysis descriptive: what happened? diagnostic: why did it happen? predictive: what will happen? prescriptive: how can we make it happen? Data management software Hadoop Hadoop is a framework for distributed storage and processing of large data sets using the MapReduce programming model. It consists of a distributed file system (HDFS) and a distributed processing framework (MapReduce). It’s written in Java and is open source. It’s designed to scale up from single servers to thousands of machines, each offering local computation and storage. Rather than rely on hardware to deliver high-availability, the library itself is designed to detect and handle failures at the application layer, so delivering a highly-available service on top of a cluster of computers, each of which may be prone to failures. Its use cases include data lake, data warehouse, data hub, data science, and data engineering. It’s used by Facebook, Yahoo, LinkedIn, eBay, and Twitter. It’s core components are HDFS, YARN, and MapReduce. ...

December 5, 2023 · 20 min · 4093 words · Aum Pauskar

Image analysis with pytorch

Image Analysis using pytorch Prerequisites This project is built using python in Ubuntu (WSL) and you’ll need to install the following: Any bash terminal (one of the following) Conda WSL Mac OS Any flavour of Linux Python 3 (I’m using 3.10.12) 1 2 sudo apt update sudo apt install python3 Pip 1 2 sudo apt update sudo apt install python3-pip Packages Note: Since I’m using a computer with a CUDA compatable NVIDIA GPU, I’ll be using the GPU version of pytorch. If you don’t have a GPU, you can install the CPU version of pytorch given below. CPU install 1 pip3 install torch torchvision numpy matplotlib GPU install Installing numpy and matplotlib 1 pip3 install numpy matplotlib Installing pytorch Check the pytorch website to see the which library is compatable with your system. In my case I’m using CUDA 11.8 1 pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 Jupyter notebook (optional) 1 pip3 install jupyterlab Or just use Jupyter notebook from VS Code from here Environement I’ve used 1 CPU Ryzen 7 5800H 2 GPU RTX 3060 Laptop 3 RAM 2x8GB DDR4 @ 3200MHz 4 OS Windows 11/Ubuntu 22.4 WSL 5 CUDA 11.8 6 Python 3.10.12 MNIST number dataset The MNIST dataset is a dataset of handwritten digits. It has 60,000 training images and 10,000 test images. We’ll see a code to load the dataset and display the occurances of individual digits in the dataset. Or if you want to run the code from Jupyter notebook you can clone my repository via git. ...

December 3, 2023 · 5 min · 1062 words · Aum Pauskar