This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
phrase = input("Enter a phrase") | |
text = phrase.split() | |
a = "" | |
for i in text: | |
a = a + i[0] | |
print(a.upper()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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:\\"): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# print string | |
print("Hello World") | |
# print int | |
print(3) | |
# print float | |
print(3.5) | |
# print boolean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Adding Division Started | |
# add integers | |
print(34 + 67) | |
# add float | |
print(34.5 + 67.5) | |
# add integer with float | |
print(3 + 4.5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make integer variable | |
number = 89 | |
print(type(number)) | |
# <class 'int'> | |
# make float variable | |
decimal_number = 9.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
number = 9 | |
# or use this | |
number = int(9) |
OlderNewer