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 / 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 / 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 / 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 / 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 / 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)