Skip to content

Instantly share code, notes, and snippets.

View utgupta27's full-sized avatar
🏗️
Engineering MagicStudio.com

Utsav Gupta utgupta27

🏗️
Engineering MagicStudio.com
View GitHub Profile
@utgupta27
utgupta27 / ntfs_rw_fix.txt
Last active July 16, 2021 14:44
Fix a Read-Only NTFS Partition on Ubuntu 20.04 LTS
Open the terminal or Press Alt+Ctrl+t
Paste the Command Below.
$sudo mount | grep <disk_name>
Replace the disk Name with the disk you want to fix i.e, Data
Example:
$sudo mount | grep Data
Output:
/dev/sdb2 on /media/utgupta27/Data type fuseblk (ro,nosuid,nodev,relatime,
user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
@utgupta27
utgupta27 / changebg.txt
Created July 7, 2021 12:20
Change the Login Screen Background in Ubuntu 20.04 LTS
Run the Commands listed below:
$sudo apt install git make gcc libgtk-3-dev libpolkit-gobject-1-dev
$git clone https://github.com/thiggy01/gdm-background.git
$cd gdm-background/
$make
$sudo make install
Click the GDM-Background icon in your application launcher and drag-n-drop any background image of your choice and then restart Your computer.
@utgupta27
utgupta27 / swappiness.txt
Created July 7, 2021 12:15
Check and Change the System Swappiness in Linux Distributions.
View the current system swappiness:
$sysctl vm.swappiness
Temporarily configure the System Swappiness:
$sudo sysctl vm.swappiness=10
(The changes will persist until you restart your PC)
@utgupta27
utgupta27 / snap-update.txt
Last active July 7, 2021 12:10
To Resume or Pause the Snapd from auto updating Snap-Packages
Only for Snap-Packages.
Stop auto-update:
$sudo snap set system refresh.metered=hold
(After executing the above command, toggle-on the Metered Wifi Connection)
Resume auto-update:
$sudo snap set system refresh.metered=null
(After executing the above command, toggle-of the Metered Wifi Connection)
@utgupta27
utgupta27 / ytdownloader.py
Last active June 28, 2021 05:47
Implementation of PyTube package to download Youtube Videos.
# Importing pytube module for downloading and selecting the streams for the video to be downloaded
from pytube import YouTube
# Importing the OS module for accessing system functionality
# 'getlogin' gives the username of the user who is logged in currently
# 'remove' to delete the junk files from the system to free up space
from os import remove,getlogin
# Importing the platform module to identify the type of system on which the program is being used.
from platform import system
def get_video_info(url):
@utgupta27
utgupta27 / bottmNavigationBar.dart
Created June 28, 2021 05:34
Switch to Multiple Pages using Bottom Navigation Bar Widget in Flutter.
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
class BottomNavyBar extends StatelessWidget {
BottomNavyBar({
Key? key,
this.selectedIndex = 0,
this.showElevation = true,
this.iconSize = 24,
this.backgroundColor,
@utgupta27
utgupta27 / encryptDatabase.py
Created June 28, 2021 05:23
Password Encrypted SQLite database package CRUD operation implementation.
"Using SQLite3 database for storing the data locally on the machine"
import sqlite3
import os
"Importing the Encrypt class for encryption and decryption of databases"
from encrypt import Encrypt
class UserBase():
"""
This UserBase() class contains all the methods/functions to manipulate
@utgupta27
utgupta27 / PoseRecoginition.py
Created June 28, 2021 05:15
Human Pose Recognition using Python3, OpenCV & Mediapipe package
import cv2 as cv
import mediapipe
import time
class PoseDetection():
def __init__(self, markLandmarks=list(range(21)), drawPose=True, mark=True) -> None:
self.stream = cv.VideoCapture(0)
self.drawPose = drawPose
self.mark = mark
@utgupta27
utgupta27 / FaceRecoginition.py
Created June 28, 2021 05:14
Face Recognition using Python3, OpenCV & Mediapipe package.
import cv2 as cv
import mediapipe
import time
class FaceDetection:
def __init__(self) -> None:
self.delayFrame = 1
self.prevTime = 0
self.currTime = 0
@utgupta27
utgupta27 / PalmRecoginition.py
Created June 28, 2021 05:13
Palm Recognition using Python3, OpenCV & Mediapipe package.
import cv2
import mediapipe
import time
class HandDetection:
def __init__(self, markLandmarks=list(range(21)), drawPalm=True, mark=True):
self.mark = mark
self.delayFrame = 1
self.prevTime = 0