Search results

  1. the living tribunal

    Python code to restart program

    @fukurou
  2. the living tribunal

    Python code to restart program

    Code to edit program code import os import sys def modify_code(): with open(__file__, 'r') as file: lines = file.readlines() # Example modification: Add a print statement lines.insert(-1, 'print("Code modified and restarted!")\n') with open(__file__, 'w') as file...
  3. the living tribunal

    Python code to restart program

    import os import sys def restart_program(): python = sys.executable os.execl(python, python, *sys.argv) # Example usage print("Program is running...") restart_program()
  4. the living tribunal

    Empty recycling bin with python

    pip install winshell import winshell try: winshell.recycle_bin().empty(confirm=False, show_progress=False, sound=True) print("Recycle Bin is emptied now!") except: print("Recycle Bin is already empty!")
  5. the living tribunal

    Terminal with python

    @fukurou
  6. the living tribunal

    Terminal with python

    Advanced code import subprocess # Run a command in the terminal subprocess.run(["gnome-terminal", "--", "bash", "-c", "echo Hello, World!; exec bash"]) # For GNOME Terminal on Linux # subprocess.run(["open", "-a", "Terminal", "--args", "echo Hello, World!"]) # For Terminal on macOS #...
  7. the living tribunal

    Terminal with python

    import subprocess # Open a terminal window subprocess.run(["gnome-terminal"]) # For GNOME Terminal on Linux # subprocess.run(["open", "-a", "Terminal"]) # For Terminal on macOS # subprocess.run(["cmd", "/c", "start", "cmd"]) # For Command Prompt on Windows
  8. the living tribunal

    Python open dir

    @fukurou
  9. the living tribunal

    Python open dir

    import os # Specify the directory path directory = '/path/to/your/directory' # Open the directory and view its contents contents = os.listdir(directory) # Print the contents of the directory for item in contents: print(item)
  10. the living tribunal

    Contrast compare

    @fukurou
  11. the living tribunal

    Contrast compare

    Jizm jizzing jizz
  12. the living tribunal

    Contrast compare

    from typing import List # Function to find common words in str1 and str2 in order def common_words_in_order(str1: str, str2: str) -> List[str]: words1 = str1.split() words2 = set(str2.split()) common = [word for word in words1 if word in words2] return common # Example usage...
  13. the living tribunal

    Contrast compare

    from typing import List # Function to find words in str1 that are not in str2 def unique_words(str1: str, str2: str) -> List[str]: words1 = set(str1.split()) words2 = set(str2.split()) unique = words1 - words2 return list(unique) # Example usage string1 = "The quick brown fox...
  14. the living tribunal

    dear spammers

    Spam
  15. the living tribunal

    [MEDIA]

  16. the living tribunal

    Imprint dev

    # Open the file in read mode with open('kiln.txt', 'r') as file: # Read all lines into a list lines = file.readlines() # Remove any trailing newline characters from each line lines = [line.strip() for line in lines] # Print the list of strings print(lines)
  17. the living tribunal

    [MEDIA]

  18. the living tribunal

    [MEDIA]

  19. the living tribunal

    👨‍💻 dev AXskillBundle

    Some dude is screenshoting you
Top