View animated_sin_wave.py
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
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
# References | |
# https://towardsdatascience.com/animations-with-matplotlib-d96375c5442c | |
# https://riptutorial.com/matplotlib/example/23558/basic-animation-with-funcanimation | |
def func(t, line): |
View word_auto_complete.py
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
import readline | |
import requests | |
class MyCompleter(object): # Custom completer | |
def __init__(self, options): | |
self.options = sorted(options) |
View reverse_video_save.py
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
# make sure you have opencv installed, "pip install opencv-python" | |
# make sure your video is .avi or .mp4 encoded, else change the encoder accordingly | |
import cv2 | |
output_file = "output.mp4" | |
cap = cv2.VideoCapture("Video File Location") | |
width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH)) | |
height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT)) | |
fps = cap.get(cv2.CAP_PROP_FPS) | |
check , vid = cap.read() | |
counter = 0 |
View password_generator.sh
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 | |
# Simple password generator | |
echo "This is a simple password generator" | |
echo "Please enter the length of the password" | |
read PASS_LENGTH | |
echo "Please enter number of passwords to be generated" | |
read NO_OF_PASS | |
echo "Enter website for which password is to be generated" | |
read COMPANY |
View toss_a_coin.py
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
from random import * | |
l=["Head","Tail"] | |
shuffle(l) | |
print(l[0]) |
View toss_a_coin.py
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
from random import * | |
l=["Head","Tail"] | |
shuffle(l) | |
print(l[0]) |