Skip to content

Commit 424d07c

Browse files
Merge pull request souravjain540#76 from Adarsh-N123/main
Add files one is password genrator other is notification remainder(for tasks) and third is image to pencil sketcher
2 parents 649860a + b110f57 commit 424d07c

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-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+

0 commit comments

Comments
 (0)