diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000000..bb68b14a6e2 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,31 @@ +# Use the latest 2.1 version of CircleCI pipeline process engine. +# See: https://circleci.com/docs/reference/configuration-reference +version: 2.1 + +# Define a job to be invoked later in a workflow. +# See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#jobs-overview & https://circleci.com/docs/reference/configuration-reference/#jobs +jobs: + say-hello: + # Specify the execution environment. You can specify an image from Docker Hub or use one of our convenience images from CircleCI's Developer Hub. + # See: https://circleci.com/docs/guides/execution-managed/executor-intro/ & https://circleci.com/docs/reference/configuration-reference/#executor-job + docker: + # Specify the version you desire here + # See: https://circleci.com/developer/images/image/cimg/base + - image: cimg/base:current + + # Add steps to the job + # See: https://circleci.com/docs/guides/orchestrate/jobs-steps/#steps-overview & https://circleci.com/docs/reference/configuration-reference/#steps + steps: + # Checkout the code as the first step. + - checkout + - run: + name: "Say hello" + command: "echo Hello, World!" + +# Orchestrate jobs using workflows +# See: https://circleci.com/docs/guides/orchestrate/workflows/ & https://circleci.com/docs/reference/configuration-reference/#workflows +workflows: + say-hello-workflow: # This is the name of the workflow, feel free to change it to better match your workflow. + # Inside the workflow, you define the jobs you want to run. + jobs: + - say-hello \ No newline at end of file diff --git a/1 File handle/File handle binary/Update a binary file2.py b/1 File handle/File handle binary/Update a binary file2.py index d256c7c805b..8eb900845c3 100644 --- a/1 File handle/File handle binary/Update a binary file2.py +++ b/1 File handle/File handle binary/Update a binary file2.py @@ -30,4 +30,4 @@ def update(): # ! Instead of AB use WB? # ! It may have memory limits while updating large files but it would be good -# ! Few lakhs records would be fine and wouln't create any much of a significant issues +# ! Few lakhs records would be fine and wouldn't create any much of a significant issues diff --git a/1 File handle/File handle binary/update2.py b/1 File handle/File handle binary/update2.py index 001b6d5b660..02511145d7e 100644 --- a/1 File handle/File handle binary/update2.py +++ b/1 File handle/File handle binary/update2.py @@ -17,7 +17,7 @@ def update(): for i in S: if rno == i[0]: - print(f"the currrent name is {i[1]}") + print(f"the current name is {i[1]}") i[1] = input("enter the new name") found = True break diff --git a/Assembler/assembler.py b/Assembler/assembler.py index dba6c6e842e..8c14e78eb0b 100644 --- a/Assembler/assembler.py +++ b/Assembler/assembler.py @@ -745,7 +745,7 @@ def scanner(string): def scan(): """ - scan: applys function scanner() to each line of the source code. + scan: applies function scanner() to each line of the source code. """ global lines assert len(lines) > 0, "no lines" @@ -1008,7 +1008,7 @@ def parser(): elif eax == 3: ecx = float(input(">> ")) - elif eax == 4: # output informations + elif eax == 4: # output information print(ecx) elif token.token == "push": # push commando @@ -1157,7 +1157,7 @@ def parser(): pointer = jumps[token.token] else: # error case - print("Error: Unknow subprogram!") + print("Error: Unknown subprogram!") return else: # error case @@ -1169,7 +1169,7 @@ def parser(): pointer = returnStack.pop() else: # error case - print("Error: No return adress on stack") + print("Error: No return address on stack") return elif token.t == "subprogram": diff --git a/Automated Scheduled Call Reminders/caller.py b/Automated Scheduled Call Reminders/caller.py index f069da7df88..1349762ade0 100644 --- a/Automated Scheduled Call Reminders/caller.py +++ b/Automated Scheduled Call Reminders/caller.py @@ -21,7 +21,7 @@ # Here the collection name is on_call which has documents with fields phone , from (%H:%M:%S time to call the person),date -# gets data from cloud database and calls 5 min prior the time (from time) alloted in the database +# gets data from cloud database and calls 5 min prior the time (from time) allotted in the database def search(): calling_time = datetime.now() one_hours_from_now = (calling_time + timedelta(hours=1)).strftime("%H:%M:%S") diff --git a/BlackJack_game/blackjack.py b/BlackJack_game/blackjack.py index 7a1331f84be..03e5fb05d39 100644 --- a/BlackJack_game/blackjack.py +++ b/BlackJack_game/blackjack.py @@ -106,7 +106,7 @@ def dealer_choice(): while sum(p_cards) < 21: # to continue the game again and again !! k = input("Want to hit or stay?\n Press 1 for hit and 0 for stay ") - if k == "1": # Ammended 1 to a string + if k == "1": # Amended 1 to a string random.shuffle(deck) p_cards.append(deck.pop()) print("You have a total of " + str(sum(p_cards)) + " with the cards ", p_cards) diff --git a/BlackJack_game/blackjack_simulate.py b/BlackJack_game/blackjack_simulate.py index ae1706f6888..078da247c79 100644 --- a/BlackJack_game/blackjack_simulate.py +++ b/BlackJack_game/blackjack_simulate.py @@ -46,7 +46,7 @@ class Card: def __init__(self, suit, rank, face=True): """ - :param suit: patter in the card + :param suit: pattern in the card :param rank: point in the card :param face: show or cover the face(point & pattern on it) """ diff --git a/BoardGame-CLI/snakeLadder.py b/BoardGame-CLI/snakeLadder.py index fd06dd64527..7b434cca5d7 100644 --- a/BoardGame-CLI/snakeLadder.py +++ b/BoardGame-CLI/snakeLadder.py @@ -3,7 +3,7 @@ # Taking players data players = {} # stores players name their locations isReady = {} -current_loc = 1 # vaiable for iterating location +current_loc = 1 # variable for iterating location imp = True @@ -23,7 +23,7 @@ def player_input(): players[name] = current_loc isReady[name] = False x = False - play() # play funtion call + play() # play function call else: print("Number of player cannot be zero") @@ -88,7 +88,7 @@ def play(): print(f"you are at position {players[i]}") elif n == 2: - players = {} # stores player ans their locations + players = {} # stores player and their locations isReady = {} current_loc = 1 # reset starting location to 1 player_input() diff --git a/Checker_game_by_dz/first.py b/Checker_game_by_dz/first.py index 0b6825590f8..c39d5acef8b 100644 --- a/Checker_game_by_dz/first.py +++ b/Checker_game_by_dz/first.py @@ -10,7 +10,7 @@ from modules.checker_board import * from modules.checker import * -# static variables for this perticular file +# static variables for this particular file fps = 60 WIN = pg.display.set_mode((st.width, st.height)) diff --git a/Checker_game_by_dz/modules/__init__.py b/Checker_game_by_dz/modules/__init__.py index 78dc4841952..e9ab55df80d 100644 --- a/Checker_game_by_dz/modules/__init__.py +++ b/Checker_game_by_dz/modules/__init__.py @@ -1,4 +1,4 @@ """ -Auhtor : Dhruv B Kakadiya +Author : Dhruv B Kakadiya """ diff --git a/Compression_Analysis/PSNR.py b/Compression_Analysis/PSNR.py index b3148c64c77..08b5b853d4d 100644 --- a/Compression_Analysis/PSNR.py +++ b/Compression_Analysis/PSNR.py @@ -16,7 +16,7 @@ def calculate(img): def main(): - # Loading images (orignal image and compressed image) + # Loading images (original image and compressed image) orignal_image = cv2.imread("orignal_image.png", 1) compressed_image = cv2.imread("compressed_image.png", 1) diff --git a/Droplistmenu/GamesCalender.py b/Droplistmenu/GamesCalender.py index 12a29d110e6..48ff7c9d5a6 100644 --- a/Droplistmenu/GamesCalender.py +++ b/Droplistmenu/GamesCalender.py @@ -53,7 +53,7 @@ def show(): # Create button, it will change label text -button = Button(window, text="Add to calender", command=show).place(x=100, y=200) +button = Button(window, text="Add to calendar", command=show).place(x=100, y=200) # Create Label label = Label(window, text=" ") diff --git a/Electronics_Algorithms/resistance.py b/Electronics_Algorithms/resistance.py index 07cf335607c..6af000278a5 100644 --- a/Electronics_Algorithms/resistance.py +++ b/Electronics_Algorithms/resistance.py @@ -1,10 +1,10 @@ def resistance_calculator( - material: str, lenght: float, section: float, temperature: float + material: str, length: float, section: float, temperature: float ): """ material is a string indicating the material of the wire - lenght is a floating value indicating the lenght of the wire in meters + length is a floating value indicating the length of the wire in meters diameter is a floating value indicating the diameter of the wire in millimeters @@ -35,6 +35,6 @@ def resistance_calculator( temp_coefficient = materials[material]["coefficient"] rho = rho_20deg * (1 + temp_coefficient * (temperature - 20)) - resistance = rho * lenght / section + resistance = rho * length / section return f"{resistance}Ω" diff --git a/MySQL_Databses.py b/MySQL_Databses.py index b9148ab708f..226a20e742c 100644 --- a/MySQL_Databses.py +++ b/MySQL_Databses.py @@ -1,12 +1,13 @@ import mysql.connector - # MySQl databses details - +host = input("Enter MySQL host: ") +username = input("Enter MySQL username: ") +password = input("Enter MySQL password: ") +db_name = input("Enter MySQL database: ") mydb = mysql.connector.connect( - host="0.0.0.0", user="root", passwd="", database="db_name" + host=host, user=username, passwd=password, database=db_name ) mycursor = mydb.cursor() - # Execute SQL Query =>>>> mycursor.execute("SQL Query") mycursor.execute("SELECT column FROM table") diff --git a/WeatherGUI.py b/WeatherGUI.py index 19b42994b84..62a2fef6bf8 100644 --- a/WeatherGUI.py +++ b/WeatherGUI.py @@ -1,14 +1,10 @@ import tkinter as tk import requests from bs4 import BeautifulSoup - url = "https://weather.com/en-IN/weather/today/l/32355ced66b7ce3ab7ccafb0a4f45f12e7c915bcf8454f712efa57474ba8d6c8" - root = tk.Tk() root.title("Weather") root.config(bg="white") - - def getWeather(): page = requests.get(url) soup = BeautifulSoup(page.content, "html.parser") diff --git a/Web Socket.py b/Web Socket.py index 8da7e224c00..9c3c91beafa 100644 --- a/Web Socket.py +++ b/Web Socket.py @@ -1,6 +1,5 @@ # Program to print a data & it's Metadata of online uploaded file using "socket". import socket - skt_c = socket.socket(socket.AF_INET, socket.SOCK_STREAM) skt_c.connect(("data.pr4e.org", 80)) link = "GET http://data.pr4e.org/intro-short.txt HTTP/1.0\r\n\r\n".encode() diff --git a/async_downloader/requirements.txt b/async_downloader/requirements.txt index 456777c9953..4a3a6b978bc 100644 --- a/async_downloader/requirements.txt +++ b/async_downloader/requirements.txt @@ -1 +1 @@ -aiohttp==3.13.1 +aiohttp==3.13.2 diff --git a/bank_managment_system/QTFrontend.py b/bank_managment_system/QTFrontend.py index 2f67009e322..f1b5523f789 100644 --- a/bank_managment_system/QTFrontend.py +++ b/bank_managment_system/QTFrontend.py @@ -1171,7 +1171,7 @@ def update_employee_data(name, password, salary, position, name_to_update): ) backend.conn.commit() show_popup_message( - stacked_widget, "Employee Upadate successfully", UPDATE_EMPLOYEE_PAGE2 + stacked_widget, "Employee Update successfully", UPDATE_EMPLOYEE_PAGE2 ) except: diff --git a/billing.py b/billing.py index c0368a18e49..451135cc91c 100644 --- a/billing.py +++ b/billing.py @@ -1,4 +1,4 @@ -updated_billing + items = {"apple": 5, "soap": 4, "soda": 6, "pie": 7, "cake": 20} total_price = 0 try: @@ -10,7 +10,7 @@ Press 5 for cake Press 6 for bill""") while True: - choice = int(input("enter your choice here..\n")) + choice = int(input("enter your choice here..")) if choice == 1: print("Apple added to the cart") total_price += items["apple"] @@ -37,7 +37,6 @@ print("Please enter the digits within the range 1-6..") except: print("enter only digits") - """ Code Explanation: A dictionary named items is created to store product names and their corresponding prices. diff --git a/brickout-game/brickout-game.py b/brickout-game/brickout-game.py index 40aa05f001d..bdd44ce4766 100644 --- a/brickout-game/brickout-game.py +++ b/brickout-game/brickout-game.py @@ -33,7 +33,7 @@ screen = pygame.display.set_mode(size) """ - This is a simple Ball class for respresenting a ball + This is a simple Ball class for representing a ball in the game. """ diff --git a/calc_area.py b/calc_area.py index cf7f259e046..29fb370cd4a 100644 --- a/calc_area.py +++ b/calc_area.py @@ -1,8 +1,6 @@ # Author: PrajaktaSathe # Program to calculate the area of - square, rectangle, circle, and triangle - import math as m - - def main(): shape = int( input( @@ -38,7 +36,6 @@ def main(): print("You have selected wrong choice.") restart = input("Would you like to calculate the area of another object? Y/N : ") - if restart.lower().startswith("y"): main() elif restart.lower().startswith("n"): diff --git a/currency converter/main.py b/currency converter/main.py index b656e7bdf3b..51c80445791 100644 --- a/currency converter/main.py +++ b/currency converter/main.py @@ -9,6 +9,7 @@ def getVal(cont1, cont2): + # Extract currency codes from user input (format assumed like "USD- United States Dollar") cont1val = cont1.split("-")[1] cont2val = cont2.split("-")[1] url = f"https://free.currconv.com/api/v7/convert?q={cont1val}_{cont2val}&compact=ultra&apiKey=b43a653672c4a94c4c26" @@ -16,6 +17,7 @@ def getVal(cont1, cont2): htmlContent = r.content soup = BeautifulSoup(htmlContent, "html.parser") try: + # Extract the numeric value from the response text valCurr = float(soup.get_text().split(":")[1].removesuffix("}")) # {USD:70.00} except Exception: print("Server down.") diff --git a/mapit.py b/mapit.py index 73d8666d7b7..27fb71a92fc 100644 --- a/mapit.py +++ b/mapit.py @@ -1,7 +1,6 @@ import sys import webbrowser import pyperclip - if len(sys.argv) > 1: address = " ".join(sys.argv[1:]) diff --git a/new.py b/new.py index 5a5f623242c..c5058551ec7 100644 --- a/new.py +++ b/new.py @@ -1,9 +1,3 @@ -def hello_world(): - """ - Prints a greeting message. - """ - print("Hello, world!") - -if __name__ == "__main__": - hello_world() +print("Hello, world!") + diff --git a/other_pepole/get_ip_gui b/other_pepole/get_ip_gui index 5728697ac5b..8043831c3bd 100755 --- a/other_pepole/get_ip_gui +++ b/other_pepole/get_ip_gui @@ -2,72 +2,84 @@ # -*- coding: utf-8 -*- import socket -# **************** Modules Require *****************# -from tkinter import * +from tkinter import Tk, Label, Button, Frame from urllib.request import urlopen +from urllib.error import URLError -# **************** Get IP commands *****************# -# control buttons -def get_wan_ip(): - try: - # get ip from http://ipecho.net/plain as text - wan_ip = urlopen('http://ipecho.net/plain').read().decode('utf-8') - res.configure(text='Wan IP is : ' + wan_ip, fg='#600') - except: - res.configure(text='Problem in source : http://ipecho.net/plain', fg='red') +class IPApp: + '''A simple GUI application to get WAN and local IP addresses.''' + def __init__(self): + '''Initialize the application''' + self.root = Tk() + self.root.title('Khaled programming practice') + self._setup_ui() + def _setup_ui(self) -> None: + """Initialize the user interface""" + # Result label + self.res = Label(self.root, text='00.00.00.00', font=25) + self.res.grid(row=0, column=0, columnspan=4, sticky='N', padx=10, pady=5) -# get local ip -def get_local_ip(): - try: - lan_ip = (socket.gethostbyname(socket.gethostname())) - res.configure(text='Local IP is : ' + lan_ip, fg='#600') - except: - res.configure(text='Unkown Error', fg='#red') - # **************** about control button *****************# + # Buttons + Button(self.root, text='Get Wan IP', command=self.get_wan_ip).grid( + row=1, column=0, padx=5, pady=5, sticky='W') + Button(self.root, text='Get Local IP', command=self.get_local_ip).grid( + row=1, column=1, padx=5, pady=5, sticky='W') + Button(self.root, text='About', command=self.show_about).grid( + row=1, column=2, padx=5, pady=5, sticky='W') + Button(self.root, text='Quit', command=self.root.quit, bg='#f40').grid( + row=1, column=3, padx=5, pady=5, sticky='E') + # About section widgets (initially hidden) + self.about_frame = Frame(self.root, width=350, height=2, bg='blue') + self.about_info = Label(self.root, text="""\ +Practice Python +Take idea from here: +https://github.com/geekcomputers/Python/blob/master/myip.py +""", fg='#02F') + self.about_close = Button(self.root, text='Close', + command=self.hide_about, bg='#55F') -# show about info and change the button command and place -def about(): - global close_app, frame, info - about_app.destroy() - frame = Frame(root, width=350, height=2, bg='blue') - frame.grid(row=2, column=0, columnspan=4) - info = Label(root, text=""" - Practice Python - Take idea from here : - https://github.com/geekcomputers/Python/blob/master/myip.py - """, fg='#02F') - info.grid(row=3, column=0, columnspan=4, padx=5) - close_app = Button(root, text='Close', command=close_about, bg='#55F') - close_app.grid(row=4, column=0, columnspan=4, pady=5) + def get_wan_ip(self) -> None: + """Get and display WAN IP address""" + try: + wan_ip = urlopen('http://ipecho.net/plain', timeout=5).read().decode('utf-8') + self.res.configure(text=f'WAN IP is: {wan_ip}', fg='#600') + except URLError as e: + self.res.configure(text=f'Network error: {e.reason}', fg='red') + except Exception as e: + self.res.configure(text=f'Unexpected error: {str(e)}', fg='red') + def get_local_ip(self) -> None: + """Get and display local IP address""" + try: + local_ip = socket.gethostbyname(socket.gethostname()) + self.res.configure(text=f'Local IP is: {local_ip}', fg='#600') + except Exception as e: + self.res.configure(text=f'Error getting local IP: {str(e)}', fg='red') -# remove about info and remove close button then return about button in orignal place -def close_about(): - global frame, about_app, info - info.destroy() - frame.destroy() - close_app.destroy() - about_app = Button(root, text='about', command=about) - about_app.grid(row=1, column=2, padx=5, pady=5, sticky=W) + def show_about(self) -> None: + """Show about information""" + self.about_frame.grid(row=2, column=0, columnspan=4) + self.about_info.grid(row=3, column=0, columnspan=4, padx=5) + self.about_close.grid(row=4, column=0, columnspan=4, pady=5) + def hide_about(self) -> None: + """Hide about information""" + self.about_frame.grid_remove() + self.about_info.grid_remove() + self.about_close.grid_remove() -# **************** Tkinter GUI *****************# -root = Tk() -root.title('Khaled programing practice') -# all buttons -res = Label(root, text='00.00.00.00', font=25) -res_wan_ip = Button(root, text='Get Wan IP', command=get_wan_ip) -res_local_ip = Button(root, text='Get Local IP', command=get_local_ip) -about_app = Button(root, text='about', command=about) -quit_app = Button(root, text='quit', command=quit, bg='#f40') -# method grid to install the button in window -res.grid(row=0, column=0, columnspan=4, sticky=N, padx=10, pady=5) -res_wan_ip.grid(row=1, column=0, padx=5, pady=5, sticky=W) -res_local_ip.grid(row=1, column=1, padx=5, pady=5, sticky=W) -about_app.grid(row=1, column=2, padx=5, pady=5, sticky=W) -quit_app.grid(row=1, column=3, padx=5, pady=5, sticky=E) -# run GUI/app -root.mainloop() + def run(self) -> None: + """Start the application""" + self.root.mainloop() + + +def main() -> None: + app = IPApp() + app.run() + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/passwordGen.py b/passwordGen.py index b05990decc2..56ab3b462a1 100644 --- a/passwordGen.py +++ b/passwordGen.py @@ -1,12 +1,9 @@ import random - lChars = "abcdefghijklmnopqrstuvwxyz" uChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" digits = "1234567890" -specialChars = "!@#$%^&*-_+=" - +specialChars = "!@#$%^&*-_+=()[]" myPass = "" - # Generate 3 lowercase letters for _ in range(3): myPass += random.choice(lChars) @@ -23,4 +20,4 @@ for _ in range(2): myPass += random.choice(uChars) -print(myPass) # Output: 10-character password (e.g. "abc123!@AB") +print(myPass) diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index d8491abb79a..008f4475fd9 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -1,5 +1,5 @@ pafy==0.5.5 -aiohttp==3.13.1 +aiohttp==3.13.2 fuzzywuzzy==0.18.0 hupper==1.12.1 seaborn==0.13.2 @@ -21,14 +21,14 @@ backend==0.2.4.1 win10toast==0.9 Counter==1.0.0 Flask==3.1.2 -selenium==4.37.0 +selenium==4.38.0 firebase-admin==7.1.0 ujson==5.10.0 requests==2.32.5 quo==2023.5.1 PyPDF2==3.0.1 pyserial==3.5 -twilio==9.8.4 +twilio==9.8.5 tabula==1.0.5 nltk==3.9.2 Pillow==12.0.0 @@ -41,7 +41,7 @@ tornado==6.5.2 obs==0.0.0 todo==0.1 oauth2client==4.1.3 -keras==3.11.3 +keras==3.12.0 pymongo==4.15.3 playsound==1.3.0 pyttsx3==2.99 @@ -49,16 +49,16 @@ auto-mix-prep==0.2.0 lib==4.0.0 pywifi==1.1.12 patterns==0.3 -openai==2.6.0 +openai==2.7.1 background==0.2.1 -pydantic==2.12.3 +pydantic==2.12.4 openpyxl==3.1.2 pytesseract==0.3.13 requests-mock==1.12.1 pyglet==2.1.9 urllib3==2.5.0 thirdai==0.9.33 -google-api-python-client==2.185.0 +google-api-python-client==2.187.0 sound==0.1.0 xlwt==1.3.0 pygame==2.6.1 @@ -73,7 +73,7 @@ pytube==15.0.0 xor-cipher==5.0.2 bird==0.1.2 mechanize==0.4.10 -translate==3.6.1 +translate==3.8.0 solara==1.54.0 pywhatkit==5.4 mutagen==1.47.0 @@ -81,18 +81,18 @@ Unidecode==1.4.0 Ball==0.2.9 pynput==1.8.1 gTTS==2.5.4 -ccxt==4.5.12 +ccxt==4.5.18 fitz==0.0.1.dev2 -fastapi==0.120.0 +fastapi==0.121.1 Django==5.2.7 docx==0.2.4 matplotlib==3.10.7 pyshorteners==1.0.1 geocoder==1.38.1 -APScheduler==3.11.0 +APScheduler==3.11.1 PyQRCode==1.2.1 freegames==2.5.3 -pyperclip==1.10.0 +pyperclip==1.11.0 newspaper==0.1.0.7 opencv-python==4.12.0.88 tensorflow==2.20.0 @@ -101,11 +101,11 @@ pytest==8.4.2 qrcode==8.2 googletrans==4.0.2 slab==1.8.2 -psutil==7.1.1 +psutil==7.1.3 mediapipe==0.10.21 rich==14.2.0 httplib2==0.31.0 -protobuf==6.33.0 +protobuf==6.33.1 colorama==0.4.6 plyer==2.1.0 Flask-Ask==0.9.8 diff --git a/sendemail.py b/sendemail.py index 12a01080ee7..070968157be 100644 --- a/sendemail.py +++ b/sendemail.py @@ -1,5 +1,4 @@ from __future__ import print_function - import base64 import mimetypes import os @@ -17,8 +16,6 @@ SCOPES = "https://www.googleapis.com/auth/gmail.send" CLIENT_SECRET_FILE = "client_secret.json" APPLICATION_NAME = "Gmail API Python Send Email" - - def get_credentials(): home_dir = os.path.expanduser("~") credential_dir = os.path.join(home_dir, ".credentials") diff --git a/sensors_information.py b/sensors_information.py index 0a233f26ab4..257b41e5a4b 100644 --- a/sensors_information.py +++ b/sensors_information.py @@ -2,12 +2,8 @@ import sys import socket import psutil - - def python_version(): return sys.version_info - - def ip_addresses(): hostname = socket.gethostname() addresses = socket.getaddrinfo(hostname, None) diff --git a/sqlite_check.py b/sqlite_check.py index 295274f8539..27e35ace641 100644 --- a/sqlite_check.py +++ b/sqlite_check.py @@ -1,5 +1,4 @@ from __future__ import print_function - import os import sqlite3 as lite import sys diff --git a/vowel remover function.py b/vowel remover function.py index 8d6467b57dc..5af2ff5f01e 100644 --- a/vowel remover function.py +++ b/vowel remover function.py @@ -4,6 +4,4 @@ def vowel_remover(text): if l.lower() not in "aeiou": string += l return string - - print(vowel_remover("hello world!")) diff --git a/wikipedia.py b/wikipedia.py index dd7a5f05321..7235894b66c 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -1,19 +1,14 @@ import wikipedia from tkinter import * from tkinter.messagebox import showinfo - win = Tk() # objek win.title("WIKIPEDIA") win.geometry("200x70") # function - - # function def search_wiki(): search = entry.get() Hasil = wikipedia.summary(search) showinfo("Hasil Pencarian", Hasil) - - label = Label(win, text="Wikipedia Search :") label.grid(row=0, column=0) diff --git a/youtubedownloader.py b/youtubedownloader.py index fdcbe89fed3..b5667950a27 100644 --- a/youtubedownloader.py +++ b/youtubedownloader.py @@ -1,14 +1,10 @@ from tkinter import Button, Entry, Label, Tk, filedialog, messagebox from threading import Thread from pytube import YouTube - - def threading(): # Call work function t1 = Thread(target=download) t1.start() - - def download(): try: url = YouTube(str(url_box.get())) @@ -30,7 +26,6 @@ def download(): root.geometry("780x500+200+200") root.configure(bg="olivedrab1") root.resizable(False, False) - # Label widgets introlable = Label( root, @@ -52,5 +47,4 @@ def download(): btn = Button(root, text="DOWNLOAD", font=("sans-serif", 25), command=threading) btn.place(x=270, y=240) - root.mainloop()