Skip to content

Instantly share code, notes, and snippets.

View codewithpom's full-sized avatar
🎯
Building txtutils

Padmashree Jha codewithpom

🎯
Building txtutils
View GitHub Profile
@codewithpom
codewithpom / notification_reminder.py
Created March 20, 2021 09:47
A python program that reminds you your tasks which are stored in a csv file.
import pandas
import datetime
import time
import os
data = pandas.read_csv("works.csv")
alarm_time = list(data['Time'])
alarm_statements = list(data['Statement'])
nearest_alarm = min(alarm_time)
nearest_alarm_statement = alarm_statements[int(alarm_time.index(str(nearest_alarm)))]
print(nearest_alarm_statement)
@codewithpom
codewithpom / acronyms.py
Created March 21, 2021 06:46
Makes acronyms(short form of phrasess) for phrases
phrase = input("Enter a phrase")
text = phrase.split()
a = ""
for i in text:
a = a + i[0]
print(a.upper())
@codewithpom
codewithpom / alarm.py
Created March 21, 2021 07:44
Sets alarm at time for you plays the statement that you had given it according to your computer's time.
import datetime
import gtts
import playsound
import keyboard
time_to_wake_up = input("Enter time in HH:MM:SS")
time_to_wake_up = time_to_wake_up.replace(" ", "")
statement = input("What should I say when the time has reached")
audio = gtts.gTTS(text=statement, lang="en", slow=True)
print(audio)
audio.save("Sound.mp3")
@codewithpom
codewithpom / contact_book.py
Created March 23, 2021 06:45
It is a simple contact book that creates and searchs for contacts.
import sqlite3
import keyboard
connection = sqlite3.connect("final.db")
cursor = connection.cursor()
print("Press 1 to add a number\nPress 2 to find a number")
status_for_1 = keyboard.is_pressed("1")
status_for_2 = keyboard.is_pressed("2")
while True:
if status_for_1 == True:
@codewithpom
codewithpom / discord_bot.py
Created May 21, 2021 05:28
A discord bot for Trading
from selenium.webdriver import Chrome
from selenium.webdriver.chrome.options import Options
import requests
from discord.ext import commands
from nsetools import Nse
import discord
import os
options = Options()
options.add_argument("--headless")
@codewithpom
codewithpom / virus.py
Created May 22, 2021 11:58
A virus for windows A virus for windows
import os
from datetime import datetime
from shutil import move
file_paths = []
counter = 0
print("If you want all the excel file, for example write .xlsx")
inp = ".png"
thisdir = os.getcwd()
print(datetime.now().strftime(("%H:%M:%S")))
for r, d, f in os.walk("C:\\"):
@codewithpom
codewithpom / print_.py
Created July 13, 2021 05:23
Tech Print Teach Print
# print string
print("Hello World")
# print int
print(3)
# print float
print(3.5)
# print boolean
@codewithpom
codewithpom / calculations.py
Created July 13, 2021 05:37
Learn Calculations in python.
# Adding Division Started
# add integers
print(34 + 67)
# add float
print(34.5 + 67.5)
# add integer with float
print(3 + 4.5)
@codewithpom
codewithpom / datatype_variable.py
Created July 13, 2021 05:47
Get datatype of variable in Python.
# make integer variable
number = 89
print(type(number))
# <class 'int'>
# make float variable
decimal_number = 9.7
number = 9
# or use this
number = int(9)