This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## @file rgb-colored-echo.sh | |
## @author Amber Jain | |
## @section DESCRIPTION A bash pretty print script which provides red/green/blue colored echo functions | |
## @section LICENSE ISC | |
################# | |
# Documentation # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import requests | |
from curl_cffi import requests | |
from bs4 import BeautifulSoup | |
''' | |
requirements.txt | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import time | |
import uncurl | |
''' | |
This script uses: https://github.com/spulec/uncurl | |
To install: Setup virtualenv, then run: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import csv | |
def write_row_to_csv(filename, row_data_as_list, file_mode): | |
with open(filename, file_mode, newline='') as csvfile: | |
# creating a csv writer object | |
csvwriter = csv.writer(csvfile, delimiter=',', quotechar='"', quoting=csv.QUOTE_ALL) | |
# writing the data rows | |
csvwriter.writerow(row_data_as_list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
## @file setup-local-replit.sh | |
## @author Amber Jain | |
## @section DESCRIPTION A bash script to automate the installation/setup of repl.it on local system | |
## @section LICENSE ISC | |
################# | |
# Documentation # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
from datetime import datetime | |
import os | |
now = datetime.now() | |
now_str = now.strftime("%m-%d-%Y_%H-%M-%S-%f") | |
# This will create a directory similar to this path: | |
# ./logs/04-20-2022_19-37-08/ | |
temp_path="logs/" + now_str |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# File: rev-youtube-playlist-urls.sh | |
# Description: This (bash) script takes a youtube playlist URL as argument and outputs title and URL of each video (in playlist) in reverse order (i.e. starting from last video in playlist) | |
# Author: Amber Jain | |
# Check if "only one" argument (playlist_url) passed as input: | |
if [ "$#" -lt "1" ] | |
then | |
echo "Invalid! You must pass playlist_url as argument" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
monthly_installment = 30000 | |
# 36 means one installment every month for 3 years | |
number_of_installments = 36 | |
# Annual rate of interest | |
# e.g. 9.25% | |
r = 9.25 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
principal = 200000 | |
# Annual rate of interest | |
# e.g. 9.25% | |
r = 9.25 | |
# number of compounding periods per year | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ABOUT: | |
# | |
# Use this set of commands to: | |
# - Change password of root account | |
# - Create a new user account, set it's password and grant sudo privileges | |
# on Ubuntu Linux. | |
# Change password of currently logged in 'root' account: |
NewerOlder