diff --git a/scripts/Calender/calender.py b/scripts/Calender/calender.py new file mode 100644 index 0000000..5d60a7c --- /dev/null +++ b/scripts/Calender/calender.py @@ -0,0 +1,56 @@ +from tkinter import * +import tkinter as tk +from PIL import ImageTk, Image +import calendar +root = tk.Tk() +root.geometry('400x300') +root.title('Calender-Techarge') +root.iconbitmap("calender-ico.ico") + + +def show(): + + m = int(month.get()) + y = int(year.get()) + output = calendar.month(y,m) + + cal.insert('end',output) + +def clear(): + cal.delete(1.0,'end') + +def exit(): + root.destroy() + + +img = ImageTk.PhotoImage(Image.open('calendar.png')) +label = Label(image=img) +label.place(x=170,y=3) + + + +m_label = Label(root,text="Month",font=('verdana','10','bold')) +m_label.place(x=70,y=80) + +month = Spinbox(root, from_= 1, to = 12,width="5") +month.place(x=140,y=80) + +y_label = Label(root,text="Year",font=('verdana','10','bold')) +y_label.place(x=210,y=80) + +year = Spinbox(root, from_= 2020, to = 3000,width="8") +year.place(x=260,y=80) + + +cal = Text(root,width=33,height=8,relief=RIDGE,borderwidth=2) +cal.place(x=70,y=110) + +show = Button(root,text="Show",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=show) +show.place(x=140,y=250) + +clear = Button(root,text="Clear",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=clear) +clear.place(x=200,y=250) + +exit = Button(root,text="Exit",font=('verdana',10,'bold'),relief=RIDGE,borderwidth=2,command=exit) +exit.place(x=260,y=250) +root.mainloop() \ No newline at end of file diff --git a/scripts/Calender/readme.txt b/scripts/Calender/readme.txt new file mode 100644 index 0000000..90d8919 --- /dev/null +++ b/scripts/Calender/readme.txt @@ -0,0 +1,8 @@ +###Calender App using Python +This is an simple calender gui using python. + +#Steps: +*We will require tkinter and calender module. +*pip install tkinter +*pip install calendar module +*Run- python calender.py \ No newline at end of file diff --git a/scripts/Message Encoder and Decoder/README.md b/scripts/Message Encoder and Decoder/README.md new file mode 100644 index 0000000..b3f5fe2 --- /dev/null +++ b/scripts/Message Encoder and Decoder/README.md @@ -0,0 +1,20 @@ +# Message Encoder and Decoder + +A web application used to encrypt and decrypt text messages. +- For the encodings listed in RFC 4648, it offers encoding and decoding functions. + +## Tech Stack 🛠 +![Python](https://img.shields.io/badge/Python-3.9-yellowgreen) +![Streamlit](https://img.shields.io/badge/Streamlit-0.85.1-red) +![base64](https://img.shields.io/badge/-base64-lightgrey) + +## Features ⚡ + +- Encoding and Decoding using Private Key +- Neat and Clean UI + +## Demo 👀 + +[streamlit-app-encode-decode.webm](https://user-images.githubusercontent.com/81156510/183291295-e759eb45-0c1c-4d4e-9f5a-e2f3f95f8a72.webm) + +
\ No newline at end of file diff --git a/scripts/Message Encoder and Decoder/app.py b/scripts/Message Encoder and Decoder/app.py new file mode 100644 index 0000000..ac24753 --- /dev/null +++ b/scripts/Message Encoder and Decoder/app.py @@ -0,0 +1,45 @@ +import streamlit as st +import base64 + +# Function to Encode + +def Encode(key, message): + enc=[] + for i in range(len(message)): + key_c = key[i % len(key)] + enc.append(chr((ord(message[i]) + ord(key_c)) % 256)) + + return base64.urlsafe_b64encode("".join(enc).encode()).decode() + + +# Function to decode + +def Decode(key, message): + dec=[] + message = base64.urlsafe_b64decode(message).decode() + for i in range(len(message)): + key_c = key[i % len(key)] + dec.append(chr((256 + ord(message[i])- ord(key_c)) % 256)) + + return "".join(dec) + +message = st.text_input('Message Text') + +key = st.text_input( + "Private key", type="password" +) + +mode = st.selectbox( + "What action would you like to perform?", + ("Encode", "Decode") +) + +if st.button('Result'): + if (mode == "Encode"): + # Encode(key, message) + st.write(Encode(key, message)) + else: + st.write(Decode(key, message)) +else: + st.write('Please enter all the required information!!') + diff --git a/scripts/battery_notification/README.md b/scripts/battery_notification/README.md new file mode 100644 index 0000000..49f7912 --- /dev/null +++ b/scripts/battery_notification/README.md @@ -0,0 +1,13 @@ +This python File used to give notification about your battery percentage of the device. + + +Pre-requisites:-you need to install python on your desktop along with some awesome packages as follows:- + +1.)psutil :-pip install psutil + +2.)pynotifier :- pip install py-notifier + +3.)win10toast :- pip install win10toast + + +thanks for reading!! diff --git a/scripts/battery_notification/battery_notification.py b/scripts/battery_notification/battery_notification.py new file mode 100644 index 0000000..f931e78 --- /dev/null +++ b/scripts/battery_notification/battery_notification.py @@ -0,0 +1,19 @@ +# pip install psutil +import psutil + +battery = psutil.sensors_battery() +plugged = battery.power_plugged +percent = battery.percent + +if percent <= 30 and plugged!=True: + + # pip install py-notifier + # pip install win10toast + from pynotifier import Notification + + Notification( + title="Battery Low", + description=str(percent) + "% Battery remain!!", + duration=5, # Duration in seconds + + ).send() \ No newline at end of file diff --git a/scripts/battery_notification/requirement.txt b/scripts/battery_notification/requirement.txt new file mode 100644 index 0000000..f7d064a --- /dev/null +++ b/scripts/battery_notification/requirement.txt @@ -0,0 +1,3 @@ +psutil==5.7.2 +py-notifier==0.1 +win10toast==0.9 \ No newline at end of file diff --git a/scripts/otp_generator/generateOTP.py b/scripts/otp_generator/generateOTP.py new file mode 100644 index 0000000..6187c2f --- /dev/null +++ b/scripts/otp_generator/generateOTP.py @@ -0,0 +1,13 @@ +import random +def otp(num): + result="" + if(len(str(num))==10): + for i in range(6): + digit=str(random.randint(0,9)) + result=result+digit + return result + else: + s="Enter a valid mobile number!" + return s + +print(otp(9874453920)) \ No newline at end of file diff --git a/scripts/otp_generator/readme.md b/scripts/otp_generator/readme.md new file mode 100644 index 0000000..d30d3de --- /dev/null +++ b/scripts/otp_generator/readme.md @@ -0,0 +1,5 @@ + +# OTP GENERATOR + +In this project, a 6 digit OTP will be auto generated when user gives a valid 10 digit mobile number. This is written in python and can be implemented in websites as well for authentication. +