Skip to content

Instantly share code, notes, and snippets.

View PowerX-NOT's full-sized avatar
🎯
Focusing

NOT_SURE PowerX-NOT

🎯
Focusing
  • Bangalore, India
  • 06:26 (UTC -12:00)
View GitHub Profile
@PowerX-NOT
PowerX-NOT / whatsapp-spam.py
Created May 21, 2024 15:28
spam your friends :)
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.common.exceptions import TimeoutException, NoSuchElementException
# Initialize the WebDriver
driver = webdriver.Firefox()
@PowerX-NOT
PowerX-NOT / sort.py
Created March 24, 2024 05:02
Sort proprietary-files.txt
# Get the file path from the user
file_path = input("Enter the path to the file: ")
# Read the file and store the lines in a list
with open(file_path, 'r') as file:
lines = file.readlines()
# Initialize a dictionary to store libraries under each heading
libs_by_heading = {}
current_heading = None
@PowerX-NOT
PowerX-NOT / remove_duplicates.py
Created March 21, 2024 20:39
FIX duplicates in proprietarys
def remove_duplicates():
file_paths = input("Enter file paths separated by spaces: ").split()
for file_path in file_paths:
try:
with open(file_path, 'r') as file:
lines = file.readlines()
except FileNotFoundError:
print(f"File {file_path} not found. Skipping...")
continue
import math
def calculate_backlight_ratio(max_backlight, nits_with_hbm, nits_without_hbm):
ratio = (max_backlight * nits_with_hbm) / nits_without_hbm
return ratio
# Get user input for backlight parameters
lut_type = input("Do you want LUT for FrameworkDimming or KernelDimming FD/KD?: ").strip().upper()
if lut_type not in ['FD', 'KD']:
import re
def convert_to_xml(input_string):
match = re.match(r'^(.+)@(.+)::(.+?)(?:/([^@]+))?$', input_string)
if match:
package, version, interface, instance = match.groups()
xml_string = f'''
<hal format="hidl">
<name>{package}</name>
<version>{version}</version>
@PowerX-NOT
PowerX-NOT / DC_dim_lut_calibration.py
Last active July 18, 2023 20:00 — forked from pwnrazr/DC_dim_lut_calibration.py
Modded from Cosmin's fod-dim-lut script
#!/usr/bin/env python3
import bisect
import subprocess
import sys
import time
from threading import Thread
def run_shell_cmd(*args):