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
#include <SoftwareSerial.h> // Import Soft Uart library | |
#include <Servo.h> // Import Servo library | |
// Bluetooth communication pins | |
#define TX 2 | |
#define RX 4 | |
// L298N communication pins | |
#define IN1 3 | |
#define IN2 5 |
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
$objShell = New-Object -ComObject Shell.Application | |
$objFolder = $objShell.Namespace(0xA) | |
$WinTemp = "c:\Windows\Temp\*" | |
#1# Empty Recycle Bin # | |
write-Host "Emptying Recycle Bin." -ForegroundColor Cyan | |
$objFolder.items() | %{ remove-item $_.path -Recurse -Confirm:$false} | |
#2# Remove Temp |
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
@ECHO OFF | |
if EXIST "Control Panel.{21EC2020-3AEA-1069-A2DD-08002B30309D}" goto UNLOCK | |
if NOT EXIST Private goto MDPrivate | |
:CONFIRM | |
echo Are you sure to lock this folder? (Y/N) | |
set/p "cho=>" | |
if %cho%==Y goto LOCK | |
if %cho%==y goto LOCK | |
if %cho%==n goto END | |
if %cho%==N goto END |
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
#include <Wire.h> | |
#include <DS3231.h> | |
#include <LiquidCrystal_I2C.h> | |
DS3231 rtc(SDA, SCL); | |
LiquidCrystal_I2C lcd(0x3F, 16, 2); | |
#define Toggle_Up 4 | |
#define Set_time 2 | |
#define Set_date 3 |
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
l=[2,23,14,11,32,39,7] | |
def selectionSort(arr): | |
for i in range(len(arr)): | |
cur_max=0 | |
for j in range(1,len(arr)-i): | |
if arr[cur_max]<arr[j]: | |
cur_max=j | |
arr[len(arr)-1-i],arr[cur_max]=arr[cur_max],arr[len(arr)-1-i] | |
print(l) |
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
a=[2,23,14,7,32,39] | |
def bubbleSort(arr): | |
n=len(arr) | |
for i in range(n): | |
for j in range(n-1-i): | |
if arr[j]>arr[j+1]: | |
arr[j],arr[j+1]=arr[j+1],arr[j] | |
print(arr) |
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 cv2 as cv | |
cap = cv.VideoCapture('slow_traffic_small.mp4') | |
# take first frame of the video | |
ret, frame = cap.read() | |
# setup initial location of window | |
x, y, width, height = 300, 200, 100, 50 | |
track_window = (x, y ,width, height) | |
# set up the ROI for tracking | |
roi = frame[y:y+height, x : x+width] |
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 cv2 as cv | |
cap = cv.VideoCapture('slow_traffic_small.mp4') | |
# take first frame of the video | |
ret, frame = cap.read() | |
# setup initial location of window | |
x, y, width, height = 300, 200, 100, 50 | |
track_window = (x, y ,width, height) | |
# set up the ROI for tracking | |
roi = frame[y:y+height, x : x+width] |
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
#include "DHT.h" | |
#include <Wire.h> | |
#include <LiquidCrystal_I2C.h> | |
// Define button pins | |
#define Toggle_Up 2 | |
#define Maxdisplay 3 | |
#define Set 4 | |
// Define led pins |
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 cv2 as cv | |
cap = cv.VideoCapture('vtest.avi') | |
#kernel = cv.getStructuringElement(cv.MORPH_ELLIPSE, (3,3)) | |
fgbg = cv.bgsegm.createBackgroundSubtractorMOG() | |
#fgbg = cv.bgsegm.BackgroundSubtractorGMG() | |
#fgbg = cv.createBackgroundSubtractorMOG2(detectShadows=True) | |
#fgbg = cv.createBackgroundSubtractorKNN(detectShadows=True) | |
while True: | |
ret, frame = cap.read() |