diff --git a/.vscode/c_cpp_properties.json b/.vscode/c_cpp_properties.json new file mode 100644 index 00000000000..cea4d3f4e0e --- /dev/null +++ b/.vscode/c_cpp_properties.json @@ -0,0 +1,18 @@ +{ + "configurations": [ + { + "name": "windows-gcc-x64", + "includePath": [ + "${workspaceFolder}/**" + ], + "compilerPath": "gcc", + "cStandard": "${default}", + "cppStandard": "${default}", + "intelliSenseMode": "windows-gcc-x64", + "compilerArgs": [ + "" + ] + } + ], + "version": 4 +} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000000..ee6efa99b9e --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,24 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "C/C++ Runner: Debug Session", + "type": "cppdbg", + "request": "launch", + "args": [], + "stopAtEntry": false, + "externalConsole": true, + "cwd": "c:/Users/prave/python_examples/geekcomputers", + "program": "c:/Users/prave/python_examples/geekcomputers/build/Debug/outDebug", + "MIMode": "gdb", + "miDebuggerPath": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index e69de29bb2d..bb879da5a07 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -0,0 +1,59 @@ +{ + "C_Cpp_Runner.cCompilerPath": "gcc", + "C_Cpp_Runner.cppCompilerPath": "g++", + "C_Cpp_Runner.debuggerPath": "gdb", + "C_Cpp_Runner.cStandard": "", + "C_Cpp_Runner.cppStandard": "", + "C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat", + "C_Cpp_Runner.useMsvc": false, + "C_Cpp_Runner.warnings": [ + "-Wall", + "-Wextra", + "-Wpedantic", + "-Wshadow", + "-Wformat=2", + "-Wcast-align", + "-Wconversion", + "-Wsign-conversion", + "-Wnull-dereference" + ], + "C_Cpp_Runner.msvcWarnings": [ + "/W4", + "/permissive-", + "/w14242", + "/w14287", + "/w14296", + "/w14311", + "/w14826", + "/w44062", + "/w44242", + "/w14905", + "/w14906", + "/w14263", + "/w44265", + "/w14928" + ], + "C_Cpp_Runner.enableWarnings": true, + "C_Cpp_Runner.warningsAsError": false, + "C_Cpp_Runner.compilerArgs": [], + "C_Cpp_Runner.linkerArgs": [], + "C_Cpp_Runner.includePaths": [], + "C_Cpp_Runner.includeSearch": [ + "*", + "**/*" + ], + "C_Cpp_Runner.excludeSearch": [ + "**/build", + "**/build/**", + "**/.*", + "**/.*/**", + "**/.vscode", + "**/.vscode/**" + ], + "C_Cpp_Runner.useAddressSanitizer": false, + "C_Cpp_Runner.useUndefinedSanitizer": false, + "C_Cpp_Runner.useLeakSanitizer": false, + "C_Cpp_Runner.showCompilationTime": false, + "C_Cpp_Runner.useLinkTimeOptimization": false, + "C_Cpp_Runner.msvcSecureNoWarnings": false +} \ No newline at end of file diff --git a/CountMillionCharacter.py b/CountMillionCharacter.py index c1aa7825a19..bd6d73c785e 100644 --- a/CountMillionCharacter.py +++ b/CountMillionCharacter.py @@ -8,7 +8,7 @@ """ import re -pattern = re.compile("\W") # re is used to compile the expression more than once +pattern = re.compile(r"\W") # re is used to compile the expression more than once # wordstring consisting of a million characters wordstring = """SCENE I. Yorkshire. Gaultree Forest. Enter the ARCHBISHOP OF YORK, MOWBRAY, LORD HASTINGS, and others diff --git a/JARVIS/JARVIS_2.0.py b/JARVIS/JARVIS_2.0.py index 65600a1bc75..654b82f1deb 100644 --- a/JARVIS/JARVIS_2.0.py +++ b/JARVIS/JARVIS_2.0.py @@ -311,8 +311,8 @@ def get_app(Q): "shell": "powershell.exe", "paint": "mspaint.exe", "cmd": "cmd.exe", - "browser": "C:\\Program Files\Internet Explorer\iexplore.exe", - "vscode": "C:\\Users\\Users\\User\\AppData\\Local\\Programs\Microsoft VS Code" + "browser": r"C:\\Program Files\Internet Explorer\iexplore.exe", + "vscode": r"C:\\Users\\Users\\User\\AppData\\Local\\Programs\Microsoft VS Code" } # master diff --git a/Organise.py b/Organise.py index 4133e4138fc..55a5f60fad2 100644 --- a/Organise.py +++ b/Organise.py @@ -69,7 +69,7 @@ def Organize(dirs, name): print("{} Folder Exist".format(name)) src = "{}\\{}".format(destLocation, dirs) - dest = "{}\{}".format(destLocation, name) + dest = "{}\\{}".format(destLocation, name) os.chdir(dest) shutil.move(src, "{}\\{}".format(dest, dirs)) diff --git a/Python Program to Remove Punctuations from a String.py b/Python Program to Remove Punctuations from a String.py index a1e750a3a4b..3f0f0d10736 100644 --- a/Python Program to Remove Punctuations from a String.py +++ b/Python Program to Remove Punctuations from a String.py @@ -1,5 +1,5 @@ # define punctuation -punctuations = '''!()-[]{};:'"\,<>./?@#$%^&*_~''' +punctuations = r'''!()-[]{};:'"\,<>./?@#$%^&*_~''' my_str = "Hello!!!, he said ---and went." diff --git a/ReadFromCSV.py b/ReadFromCSV.py index f1921bd19e0..dc8177021f4 100644 --- a/ReadFromCSV.py +++ b/ReadFromCSV.py @@ -8,7 +8,7 @@ """reading data from SalesData.csv file and passing data to dataframe""" -df = pd.read_csv("..\SalesData.csv") # Reading the csv file +df = pd.read_csv(r"..\SalesData.csv") # Reading the csv file x = df[ "SalesID" ].as_matrix() # casting SalesID to list #extracting the column with name SalesID diff --git a/SpeechToText.py b/SpeechToText.py index 12ee402667a..88fe2e5cf69 100644 --- a/SpeechToText.py +++ b/SpeechToText.py @@ -7,7 +7,7 @@ print(voice.id) print(voice.name) -id ="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0" +id =r"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Speech\Voices\Tokens\TTS_MS_EN-US_DAVID_11.0" engine.setProperty("voices",id ) engine.setProperty("rate",165) engine.say("jarivs") # Replace string with our own text diff --git a/Street_Fighter/docs/README.md b/Street_Fighter/docs/README.md index c72cab1565d..2ff27a478e8 100644 --- a/Street_Fighter/docs/README.md +++ b/Street_Fighter/docs/README.md @@ -27,15 +27,18 @@ - **Custom Controls** for two players. ## 📋 Table of Contents -- [Features](#features) -- [Requirements](#requirements) -- [Installation](#installation) -- [Gameplay Instructions](#gameplay-instructions) -- [Downloads](#downloads) -- [License](#license) -- [Credits](#credits) -- [Contributing](#contributing) -- [Contact](#contact) +- [Street Fighter](#street-fighter) + - [Features](#features) + - [📋 Table of Contents](#-table-of-contents) + - [Requirements](#requirements) + - [Installation](#installation) + - [Gameplay Instructions](#gameplay-instructions) + - [Player Controls:](#player-controls) + - [Downloads](#downloads) + - [License](#license) + - [Credits](#credits) + - [Contributing](#contributing) + - [Contact](#contact) ## Requirements - Python 3.7 or higher @@ -56,7 +59,7 @@ Follow these steps to install and run the game: 2. **Install Dependencies**: ```bash - pip install -r requirements.txt + pip install -r ``` 3. **Run the Game**: diff --git a/add_two_nums.py b/add_two_nums.py index f68631f2ea1..eacea797244 100644 --- a/add_two_nums.py +++ b/add_two_nums.py @@ -17,7 +17,7 @@ def addition( # returning the result. return f"The sum of {num1} and {num2} is: {sum_result}" -) + print(addition(5, 10)) # This will use the provided parameters print(addition(2, 2)) diff --git a/daily_checks.py b/daily_checks.py index 337f8d5aebe..bdffb9dbd29 100644 --- a/daily_checks.py +++ b/daily_checks.py @@ -31,8 +31,8 @@ def print_docs(): # Function to print the daily checks automatically # The command below passes the command line string to open word, open the document, print it then close word down subprocess.Popen( [ - "C:\\Program Files (x86)\Microsoft Office\Office14\winword.exe", - "P:\\\\Documentation\\Daily Docs\\Back office Daily Checks.doc", + r"C:\Program Files (x86)\Microsoft Office\Office14\winword.exe", + r"P:\Documentation\Daily Docs\Back office Daily Checks.doc", "/mFilePrintDefault", "/mFileExit", ] @@ -55,10 +55,11 @@ def rdp_sessions(): def euroclear_docs(): # The command below opens IE and loads the Euroclear password document - subprocess.Popen( - '"C:\\Program Files\\Internet Explorer\\iexplore.exe"' - '"file://fs1\pub_b\Pub_Admin\Documentation\Settlements_Files\PWD\Eclr.doc"' - ) + subprocess.Popen([ + r"C:\Program Files\Internet Explorer\iexplore.exe", + r"file://fs1/pub_b/Pub_Admin/Documentation/Settlements_Files/PWD/Eclr.doc" + ]) + # End of the functions diff --git a/encryptsys.py b/encryptsys.py index 45daea14fd6..40e5ec6f37a 100644 --- a/encryptsys.py +++ b/encryptsys.py @@ -71,7 +71,8 @@ def encrypt(): fintext = str(nummoves) + "." + fintext - print("\Encrypted text : " + fintext) + print(r"\Encrypted text : " + fintext) + sel = input("What would you want to do?\n\n[1] Encrypt\n[2] Decrypt\n\n> ").lower() diff --git a/logs.py b/logs.py index 37519f55011..11d9d041dd1 100644 --- a/logs.py +++ b/logs.py @@ -12,7 +12,7 @@ import os # Load the Library Module from time import strftime # Load just the strftime Module from Time -logsdir = "c:\puttylogs" # Set the Variable logsdir +logsdir = r"c:\puttylogs" # Set the Variable logsdir zip_program = "zip.exe" # Set the Variable zip_program - 1.1 for files in os.listdir(logsdir): # Find all the files in the directory diff --git a/nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py b/nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py index 8fae670cdca..ded1c86bcd3 100644 --- a/nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py +++ b/nitkarshchourasia/to_sort/JARVIS_python_bot/JARVIS_2.0.py @@ -319,8 +319,8 @@ def get_app(Q): "shell": "powershell.exe", "paint": "mspaint.exe", "cmd": "cmd.exe", - "browser": "C:\\Program Files\Internet Explorer\iexplore.exe", - "vscode": "C:\\Users\\Users\\User\\AppData\\Local\\Programs\Microsoft VS Code", + "browser": r"C:\\Program Files\Internet Explorer\iexplore.exe", + "vscode": r"C:\\Users\\Users\\User\\AppData\\Local\\Programs\Microsoft VS Code", } # master diff --git a/psunotify.py b/psunotify.py index 3d5ea4b99de..e42ca0be03d 100644 --- a/psunotify.py +++ b/psunotify.py @@ -20,7 +20,7 @@ "https://www.google.co.in/search?q=gate+psu+2017+ext:pdf&start=" + page ) ht = br.open(p) -text = '(.+?)' +text = r'(.+?)' patt = re.compile(text) h = ht.read() urls = re.findall(patt, h) diff --git a/puttylogs.py b/puttylogs.py index 6e4c67a4784..46444f95e39 100644 --- a/puttylogs.py +++ b/puttylogs.py @@ -13,8 +13,8 @@ import shutil # Load the Library Module - 1.2 from time import strftime # Load just the strftime Module from Time -logsdir = "c:\logs\puttylogs" # Set the Variable logsdir -zipdir = "c:\logs\puttylogs\zipped_logs" # Set the Variable zipdir - 1.2 +logsdir = r"c:\logs\puttylogs" # Set the Variable logsdir +zipdir = r"c:\logs\puttylogs\zipped_logs" # Set the Variable zipdir - 1.2 zip_program = "zip.exe" # Set the Variable zip_program - 1.1 for files in os.listdir(logsdir): # Find all the files in the directory diff --git a/reading_csv.py b/reading_csv.py index bc8fee6334f..8c1acd1ff43 100644 --- a/reading_csv.py +++ b/reading_csv.py @@ -1,7 +1,7 @@ import pandas as pd # reading csv file into python -df= pd.read_csv("c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv") # Replace the path with your own file path +df= pd.read_csv(r"c:\PROJECT\Drug_Recommendation_System\drug_recommendation_system\Drugs_Review_Datasets.csv") # Replace the path with your own file path print(df) diff --git a/recyclebin.py b/recyclebin.py index 83222be716e..aed38daecb2 100644 --- a/recyclebin.py +++ b/recyclebin.py @@ -14,11 +14,13 @@ # Description : Scans the recyclebin and displays the files in there, originally got this script from the Violent Python book +from winreg import OpenKey, HKEY_LOCAL_MACHINE, QueryValueEx + def sid2user(sid): # Start of the function to gather the user try: key = OpenKey( HKEY_LOCAL_MACHINE, - "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" + "\\" + sid, + r"SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" + "\\" + sid, ) (value, type) = QueryValueEx(key, "ProfileImagePath") user = value.split("\\")[-1] diff --git a/requirements_with_versions.txt b/requirements_with_versions.txt index 40c6a5adc28..3bcbea0326b 100644 --- a/requirements_with_versions.txt +++ b/requirements_with_versions.txt @@ -28,7 +28,7 @@ requests==2.32.4 quo==2023.5.1 PyPDF2==3.0.1 pyserial==3.5 -twilio==9.6.5 +twilio==9.7.0 tabula==1.0.5 nltk==3.9.1 Pillow==11.3.0 @@ -58,7 +58,7 @@ requests-mock==1.12.1 pyglet==2.1.6 urllib3==2.5.0 thirdai==0.9.33 -google-api-python-client==2.176.0 +google-api-python-client==2.177.0 sound==0.1.0 xlwt==1.3.0 pygame==2.6.1 @@ -81,7 +81,7 @@ Unidecode==1.4.0 Ball==0.2.9 pynput==1.8.1 gTTS==2.5.4 -ccxt==4.4.95 +ccxt==4.4.96 fitz==0.0.1.dev2 fastapi==0.116.1 Django==5.1.7 diff --git a/simulate_memory_cpu.py b/simulate_memory_cpu.py index 9a108fb89cc..686d7c4312c 100644 --- a/simulate_memory_cpu.py +++ b/simulate_memory_cpu.py @@ -20,7 +20,7 @@ def print_help(): def mem(): - pattern = re.compile('^(\d*)([M|G]B)$') + pattern = re.compile(r'^(\d*)([MG]B)$') size = sys.argv[2].upper() match = pattern.match(size) if match: diff --git a/sqlite_check.py b/sqlite_check.py index 74403b1a0bb..dd00576ffd3 100644 --- a/sqlite_check.py +++ b/sqlite_check.py @@ -13,7 +13,7 @@ # Description : Runs checks to check my SQLITE database dropbox = os.getenv("dropbox") -dbfile = "Databases\jarvis.db" +dbfile = r"Databases\jarvis.db" master_db = os.path.join(dropbox, dbfile) con = None diff --git a/sqlite_table_check.py b/sqlite_table_check.py index 588b80e1c6e..ed0ae993820 100644 --- a/sqlite_table_check.py +++ b/sqlite_table_check.py @@ -14,8 +14,8 @@ dropbox = os.getenv("dropbox") config = os.getenv("my_config") -dbfile = "Databases\jarvis.db" -listfile = "sqlite_master_table.lst" +dbfile = r"Databases\jarvis.db" +listfile = r"sqlite_master_table.lst" master_db = os.path.join(dropbox, dbfile) config_file = os.path.join(config, listfile) tablelist = open(config_file, "r")