Skip to content

Commit e3ccd09

Browse files
authored
Add files via upload
1 parent f3dabfe commit e3ccd09

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

img_to_pencil.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import cv2
2+
print("Enter file_name with extension in this folder(image):")
3+
name = input()
4+
print("Enter output file name without extension")
5+
out = input()
6+
out = out+".png"
7+
image = cv2.imread(name)
8+
9+
grey_img = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
10+
invert = cv2.bitwise_not(grey_img)
11+
12+
blur = cv2.GaussianBlur(invert, (21, 21), 0)
13+
invertedblur = cv2.bitwise_not(blur)
14+
sketch = cv2.divide(grey_img, invertedblur, scale=256.0)
15+
cv2.imwrite(out, sketch)

notification.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
import time
2+
from plyer import notification
3+
print("Enter the Remainder Message:")
4+
msg = input()
5+
print("Enter the mode of time seconds or minutes or hours")
6+
mode = input()
7+
print("Enter the time left for remainder or time after which remainder should show:")
8+
t = int(input())
9+
if mode == "seconds":
10+
11+
time.sleep(t)
12+
notification.notify(
13+
title = "REMAINDER!!!",
14+
message = msg,
15+
timeout = 10
16+
)
17+
18+
elif mode == "minutes":
19+
20+
time.sleep(t*60)
21+
notification.notify(
22+
title = "REMAINDER!!!",
23+
message = msg,
24+
timeout = 10
25+
)
26+
27+
elif mode == "hours":
28+
29+
time.sleep(t*3600)
30+
notification.notify(
31+
title = "REMAINDER!!!",
32+
message = msg,
33+
timeout = 10
34+
)
35+

password_generator.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import random
2+
special = ["!","@","#","$","%","^","&","*"]
3+
alpha = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
4+
num = [1,2,3,4,5,6,7,8,9,0]
5+
print("Enter length of password:")
6+
length = int(input())
7+
print("Enter no of special characters:")
8+
spec = int(input())
9+
rem_char = length-spec
10+
num_num = rem_char//3
11+
num_alpha = rem_char-num_num
12+
L=[]
13+
alpha_list = random.sample(alpha,num_alpha)
14+
num_list = random.sample(num,num_num)
15+
spec_list = random.sample(special,spec)
16+
for i in alpha_list:
17+
L.append(i)
18+
for i in num_list:
19+
L.append(i)
20+
for i in spec_list:
21+
L.append(i)
22+
random.shuffle(L)
23+
password=""
24+
for i in L:
25+
password +=str(i)
26+
print("your password is :",password)
27+

0 commit comments

Comments
 (0)