Skip to content

Instantly share code, notes, and snippets.

View MShirazAhmad's full-sized avatar

Shiraz Ahmad MShirazAhmad

View GitHub Profile
@MShirazAhmad
MShirazAhmad / WAXP.js
Created November 19, 2023 06:02 — forked from shaneapen/WAXP.js
WhatsApp Group Contacts Exporter
WAXP = (function(){
MutationObserver = window.MutationObserver || window.WebKitMutationObserver;
var SCROLL_INTERVAL = 600,
SCROLL_INCREMENT = 450,
AUTO_SCROLL = true,
NAME_PREFIX = '',
UNKNOWN_CONTACTS_ONLY = false,
MEMBERS_QUEUE = {},
from pytube import Playlist
import pytube
playlist = Playlist('Playlist URL Goes Here...')
print('Number of videos in playlist: %s' % len(playlist.video_urls))
for video_url in playlist.video_urls:
print(video_url)
pytube.YouTube(video_url).streams.get_highest_resolution().download()
@MShirazAhmad
MShirazAhmad / nagcs
Created May 8, 2022 07:52
SeleniumLibrary
def open_chrome(headLess = False):
import csv
from parsel import Selector
from selenium.webdriver.common.keys import Keys
import time
import os
from selenium import webdriver
from webdriver_manager.utils import ChromeType
from webdriver_manager.chrome import ChromeDriverManager
chrome_options = webdriver.ChromeOptions();
//GitHub https://github.com/MShirazAhmad/Arduino-High-Speed-Switching/
//Time 0 0 0 0 1 2 3 9103 9203 9204 9205 9206 9406 9408 9608 9800
//Switch 1 0 0 0 0 0 1 0 1 1 0 1 0 1 0 1
//Pin 5 7 3 4 6 2 7 7 6 2 5 3 3 4 4 5
//Delay 10000
//Loops 16
//Length 16
//Run 1
@MShirazAhmad
MShirazAhmad / videoanalysis.m
Created February 5, 2020 07:37
Newton’s Cradle Experiment Using Video Tracking Analysis
load('GOPR0582.mat')
%Mass of Each Ball=66.1g
[Y_min,Index_Y_min] = min(trajectory.tp4.y);
TPy=[trajectory.tp1.y trajectory.tp2.y trajectory.tp3.y trajectory.tp4.y trajectory.tp5.y trajectory.tp6.y trajectory.tp7.y];
TPy=TPy-Y_min;
TPx=[trajectory.tp1.x trajectory.tp2.x trajectory.tp3.x trajectory.tp4.x trajectory.tp5.x trajectory.tp6.x trajectory.tp7.x];
TPx=TPx-TPx(Index_Y_min,4);
TP_Path = sqrt(TPx.^2 + TPy.^2);
for i=1:7
@MShirazAhmad
MShirazAhmad / Script_Plot_With_Unc.m
Created February 5, 2020 07:00
Script_Plot_With_Unc
%% Energy COnservation in Two Dimensions
h = (75 + 1.9);
L = (29.5 + 1.9 + 0.95);
%% Experimental Data
Theta = [20 25 30 35 40 45]; %
d = [19.4 25.9 32.5 38.2 43.5 51]+3;
x=(d.^2)./(4*h*L);
Ux = (d.^2)./(4*h*L);
@MShirazAhmad
MShirazAhmad / Ufraction.m
Created February 5, 2020 06:56
Propagation of uncertainties in fraction.
function Utotal = Ufraction(X,Ux,Y,Uy)
Utotal = sqrt((Ux./Y).^2 + ((X.*Uy)./(Y.^2)).^2);
end
@MShirazAhmad
MShirazAhmad / Uaddition.m
Created February 5, 2020 06:55
Propagation of uncertainties in addition.
function Utotal = Uaddition(Ux,Uy)
Utotal = sqrt(Ux.^2 + Uy.^2);
end
@MShirazAhmad
MShirazAhmad / Umult.m
Created February 5, 2020 06:54
Propagation of uncertainties in multiplication.
function Utotal = Umult(X,Ux,Y,Uy)
Utotal = sqrt( (Ux.*Y).^2 + (Uy.*X).^2 );
end
from PyQt5.QtWidgets import *
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.figure import Figure
import numpy as np
import random
class MplWidget(QWidget):
def __init__(self, parent=None):
QWidget.__init__(self, parent)
self.canvas = FigureCanvas(Figure())