18 |
Voice Recognition
19 |
23 |
Tap the microphone to start speaking...
24 |
25 |
26 |
Ready
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/miscelenious/leaaldownload.py:
--------------------------------------------------------------------------------
1 | def wait_for_results_and_download_judgments(driver):
2 | try:
3 | print("Waiting for results to load...")
4 | WebDriverWait(driver, 20).until(
5 | EC.presence_of_element_located((By.ID, "showList"))
6 | )
7 | time.sleep(2)
8 |
9 | # Collect judgment links
10 | show_list_div = driver.find_element(By.ID, "showList")
11 | rows = show_list_div.find_elements(By.TAG_NAME, "tr")
12 |
13 | print("Collecting all the links for only Judgments(not for orders)")
14 |
15 | judgment_links = []
16 | for row in rows:
17 | links = row.find_elements(By.TAG_NAME, "a")
18 | for link in links:
19 | if link.text.strip().lower() == "judgment":
20 | href = link.get_attribute("href")
21 | if href:
22 | judgment_links.append(href)
23 |
24 | print(f"Found {len(judgment_links)} judgment link(s).")
25 |
26 | for i, pdf_url in enumerate(judgment_links, 1):
27 | print(f"Downloading judgment #{i}")
28 | driver.execute_script("window.open('');")
29 | driver.switch_to.window(driver.window_handles[-1])
30 | driver.get(pdf_url)
31 | time.sleep(5) # Allow time for download
32 | driver.close()
33 | driver.switch_to.window(driver.window_handles[0])
34 | time.sleep(1)
35 |
36 | print(f"All available judgments downloaded: {len(judgment_links)}")
37 | except Exception as e:
38 | print(f"Error while fetching judgments: {e}")
--------------------------------------------------------------------------------
/miscelenious/lyrics.txt:
--------------------------------------------------------------------------------
1 | Diet mountain dew, baby, New York City
2 | Never was there ever a girl so pretty
3 | Do you think we'll be in love forever?
4 | Do you think we'll be in love?
5 |
6 | Diet mountain dew, baby, New York City
7 | Can we hit it now low down and gritty?
8 | Do you think we'll be in love forever?
9 | Do you think we'll be in love?
10 |
--------------------------------------------------------------------------------
/miscelenious/maximumSubArray.py:
--------------------------------------------------------------------------------
1 | def max_subarray_sum(nums):
2 | max_ending = max_so_far = nums[0]
3 | for x in nums[1:]:
4 | max_ending = max(x, max_ending + x)
5 | max_so_far = max(max_so_far, max_ending)
6 | return max_so_far
7 |
8 | if __name__ == "__main__":
9 | arr = [1, -3, 2, 1, -1, 3, -2]
10 | print(max_subarray_sum(arr))
--------------------------------------------------------------------------------
/miscelenious/mbappe.txt:
--------------------------------------------------------------------------------
1 | ****************************************************************************************************
2 | *************************************************########**************************++++++=++++******
3 | ***********************************************#%%%%%%%%##*************************++++--=-===******
4 | ***********************************************######%#####****************************-------******
5 | **********************************************####**####%%#*****************************************
6 | **********************************************###%%%%###%%#*****************************************
7 | **********************************************####%%####%#******************************************
8 | ***********************************************%%***##%%%*******************************************
9 | **********************************************+**+****##********************************************
10 | ******************************************+=-:=************--=+*************************************
11 | *************************************+=--:....-#****###**#*:...:---=***********++++++*++++++++++++++
12 | ***********************************+-.....:...:-*##****##*-....... .:=**++++++++++++++++++++++++++++
13 | **********************************+:...::::......:=++++=-...:===-.....-+++++++++++++++++++++++++++++
14 | *+*******************************+:...::....................:=+++=:....:++++++++++++++++++++++++++++
15 | *********************************=......:::...............:=::++++=::::.-+++++++++++++++++++++++++++
16 | *********+******+*+*******+++++*+:...:-==+=::::::.........:---=++*+=--:::++++++********+++++++++++++
17 | ++********++**++++++++++++++++++:..:-++++=---:::::::::..::::--==+***-::::=++++++**++**++++++++***+++
18 | +******++++++++++++++++++++++++=:::-+++++=----------:::::::-+==-=+**-.::::=+++++++++++++++++++++++++
19 | ++++++**+**++++++++++++++++++++*#*+++**+=--========--:::---=====-=+===++---+++++++++++++++++++++++++
20 | +++++++++++++++++++++++++++++++++++****=-=-===--=-===-==--=======++++****+++++++++++++++++++++++++++
21 | +++++++++++++++++++++++++++++++++**#*+*=-==++===--=*++***---==+++*+++********+++++++++++++++++++++++
22 | ++++++++++++++++++++++++++++++****#*++++++=======--**+*+*---===+**++++**#******+++++++++++++++++++++
23 | +++++++++++++++++++*++++++++**#####*+++*++=---:::::++=**+:---===+++++++*#####**++++++++++++++++++*++
24 | +++++++++++++++*+++*++++++++*#####*+++++==----:::::--:==------=+=+++++++**####*+++++++++++++++++++++
25 | +++++++++++++++++++++++++++++*#**+++++++-::::---::::::.:::::---=+++++++++++***++++++++++++++++++++++
26 | +++++++++++++++++++++++++++++++++++++++=---::::::::.:::::::----=+++++++++++++++++++++++*++**++++++++
27 | +++++++++++++++++++++++++++++++++++++++-::-::------:::::::::::::=+++++++++++++++++++++++++++++++++++
28 | +++++++++++++++++++++++++++++++++++++++:.::::::::-----::::::::::-+++++++++++++++++++++++++++++++++++
29 |
--------------------------------------------------------------------------------
/miscelenious/mergesort.py:
--------------------------------------------------------------------------------
1 | #Merge Sort
2 |
3 | def merge_sort(arr):
4 | if len(arr) > 1:
5 | mid = len(arr) // 2
6 | left = arr[:mid]
7 | right = arr[mid:]
8 |
9 | merge_sort(left)
10 | merge_sort(right)
11 |
12 | i = j = k = 0
13 |
14 | while i < len(left) and j < len(right):
15 | if left[i] < right[j]:
16 | arr[k] = left[i]
17 | i += 1
18 | else:
19 | arr[k] = right[j]
20 | j += 1
21 | k += 1
22 |
23 | while i < len(left):
24 | arr[k] = left[i]
25 | i += 1
26 | k += 1
27 |
28 | while j < len(right):
29 | arr[k] = right[j]
30 | j += 1
31 | k += 1
--------------------------------------------------------------------------------
/miscelenious/new_file.py:
--------------------------------------------------------------------------------
1 | def greet(name):
2 | """A simple function that prints a greeting message"""
3 | return f"Hello, {name}!"
4 |
5 | def main():
6 | # Example usage
7 | user_name = input("Enter your name: ")
8 | message = greet(user_name)
9 | print(message)
10 |
11 | if __name__ == "__main__":
12 | main()
--------------------------------------------------------------------------------
/miscelenious/outputs/fibonacci_spiral_20250404_183922.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Anubhob435/pythonFiles/e8fe21829ff9f4e194e4f6bd8ba913539385d73f/miscelenious/outputs/fibonacci_spiral_20250404_183922.gif
--------------------------------------------------------------------------------
/miscelenious/outputs/fibonacci_spiral_20250404_184148.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Anubhob435/pythonFiles/e8fe21829ff9f4e194e4f6bd8ba913539385d73f/miscelenious/outputs/fibonacci_spiral_20250404_184148.gif
--------------------------------------------------------------------------------
/miscelenious/outputs/fibonacci_spiral_20250404_184355.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Anubhob435/pythonFiles/e8fe21829ff9f4e194e4f6bd8ba913539385d73f/miscelenious/outputs/fibonacci_spiral_20250404_184355.gif
--------------------------------------------------------------------------------
/miscelenious/passwords.json:
--------------------------------------------------------------------------------
1 | {
2 | "anubhob": "7d727ac57ca6285f5a38be092aaea0a0d7678607071f1e04d8537159d8d66482"
3 | }
--------------------------------------------------------------------------------
/miscelenious/practice_1.py:
--------------------------------------------------------------------------------
1 | import seaborn as sns
2 |
3 | def divide_numbers(a, b):
4 | try:
5 | result = a / b
6 | return result
7 | except ZeroDivisionError:
8 | return "Error: Division by zero is not allowed"
9 |
10 | # Test the function
11 | print(divide_numbers(10, 2)) # Normal division
12 | print(divide_numbers(10, 0)) # Attempting division by zero
13 |
14 | import matplotlib.pyplot as plt
15 |
16 | # Load built-in dataset
17 | tips = sns.load_dataset("tips")
18 |
19 | # Create a scatterplot
20 | sns.scatterplot(data=tips, x="total_bill", y="tip")
21 | plt.title("Tips vs Total Bill Amount")
22 | plt.show()
23 |
24 |
--------------------------------------------------------------------------------
/miscelenious/python_game.py:
--------------------------------------------------------------------------------
1 | import pygame
2 | import random
3 |
4 | # Initialize Pygame
5 | pygame.init()
6 |
7 | # Set up the display
8 | WIDTH = 800
9 | HEIGHT = 600
10 | screen = pygame.display.set_mode((WIDTH, HEIGHT))
11 | pygame.display.set_caption("Dodge the Blocks")
12 |
13 | # Colors
14 | WHITE = (255, 255, 255)
15 | RED = (255, 0, 0)
16 | BLUE = (0, 0, 255)
17 |
18 | # Player settings
19 | player_size = 50
20 | player_x = WIDTH // 2 - player_size // 2
21 | player_y = HEIGHT - player_size - 10
22 | player_speed = 5
23 |
24 | # Enemy settings
25 | enemy_size = 50
26 | enemy_speed = 5
27 | enemies = []
28 |
29 | # Game loop
30 | running = True
31 | clock = pygame.time.Clock()
32 | score = 0
33 |
34 | while running:
35 | # Event handling
36 | for event in pygame.event.get():
37 | if event.type == pygame.QUIT:
38 | running = False
39 |
40 | # Player movement
41 | keys = pygame.key.get_pressed()
42 | if keys[pygame.K_LEFT] and player_x > 0:
43 | player_x -= player_speed
44 | if keys[pygame.K_RIGHT] and player_x < WIDTH - player_size:
45 | player_x += player_speed
46 |
47 | # Create new enemies
48 | if len(enemies) < 5 and random.random() < 0.02:
49 | enemies.append([random.randint(0, WIDTH - enemy_size), -enemy_size])
50 |
51 | # Update enemy positions
52 | for enemy in enemies[:]:
53 | enemy[1] += enemy_speed
54 | if enemy[1] > HEIGHT:
55 | enemies.remove(enemy)
56 | score += 1
57 |
58 | # Collision detection
59 | player_rect = pygame.Rect(player_x, player_y, player_size, player_size)
60 | for enemy in enemies:
61 | enemy_rect = pygame.Rect(enemy[0], enemy[1], enemy_size, enemy_size)
62 | if player_rect.colliderect(enemy_rect):
63 | running = False
64 |
65 | # Drawing
66 | screen.fill(WHITE)
67 | pygame.draw.rect(screen, BLUE, (player_x, player_y, player_size, player_size))
68 | for enemy in enemies:
69 | pygame.draw.rect(screen, RED, (enemy[0], enemy[1], enemy_size, enemy_size))
70 |
71 | pygame.display.flip()
72 | clock.tick(60)
73 |
74 | print(f"Game Over! Score: {score}")
75 | pygame.quit()
--------------------------------------------------------------------------------
/miscelenious/random_luck.py:
--------------------------------------------------------------------------------
1 | import random
2 |
3 | def lucky_draw():
4 | # Generate a random number between 1 and 100
5 | secret_number = random.randint(1, 100)
6 | attempts = 0
7 | max_attempts = 10
8 |
9 | print("Welcome to the Lucky Number Game!")
10 | print(f"Guess a number between 1 and 100. You have {max_attempts} attempts.")
11 |
12 | while attempts < max_attempts:
13 | try:
14 | # Get player's guess
15 | guess = int(input("Enter your guess: "))
16 | attempts += 1
17 |
18 | # Check the guess
19 | if guess == secret_number:
20 | print(f"Congratulations! You won in {attempts} attempts!")
21 | return
22 | elif guess < secret_number:
23 | print("Too low! Try again.")
24 | else:
25 | print("Too high! Try again.")
26 |
27 | print(f"Attempts remaining: {max_attempts - attempts}")
28 |
29 | except ValueError:
30 | print("Please enter a valid number!")
31 |
32 | print(f"Game Over! The number was {secret_number}")
33 |
34 | if __name__ == "__main__":
35 | lucky_draw()
--------------------------------------------------------------------------------
/miscelenious/recursion printing.py:
--------------------------------------------------------------------------------
1 | lst_alphabets = []
2 | lst_num = []
3 | lst_2 = []
4 | lst_print = []
5 | dictionary_1 = {
6 | 1: "a", 2: "b", 3: "c", 4: "d", 5: "e",
7 | 6: "f", 7: "g", 8: "h", 9: "i", 10: "j",
8 | 11: "k", 12: "l", 13: "m", 14: "n", 15: "o",
9 | 16: "p", 17: "q", 18: "r", 19: "s", 20: "t",
10 | 21: "u", 22: "v", 23: "w", 24: "x", 25: "y", 26: "z", 27: " "
11 | }
12 |
13 | keys = list(dictionary_1.keys())
14 | values = list(dictionary_1.values())
15 |
16 | word = input("Enter word: ").lower()
17 |
18 | print("OH I USED TO SAY !!")
19 | for i in word:
20 | lst_alphabets.append(i)
21 |
22 | for k in lst_alphabets:
23 | index = values.index(k)
24 | Key = keys[index]
25 | lst_num.append(Key)
26 |
27 | def programme():
28 | count = 0
29 | for x in lst_num:
30 | for z in range(0, x):
31 | tempv = values[z]
32 | lst_print.append(tempv)
33 | print("".join(lst_print))
34 | if tempv != lst_alphabets[count]:
35 | lst_print.pop()
36 | else:
37 | count +=1
38 |
39 | programme()
40 | print("I FOUND YOU !!! :)")
--------------------------------------------------------------------------------
/miscelenious/roman.py:
--------------------------------------------------------------------------------
1 | def roman_to_int(s):
2 | roman_values = {'I': 1, 'V': 5, 'X': 10, 'L': 50, 'C': 100, 'D': 500, 'M': 1000}
3 | total = 0
4 | for c in s:
5 | total += roman_values[c]
6 | return total
7 |
8 | def int_to_roman(num):
9 | val = [
10 | 1000, 900, 500, 400,
11 | 100, 90, 50, 40,
12 | 10, 9, 5, 4,
13 | 1
14 | ]
15 | syb = [
16 | "M", "CM", "D", "CD",
17 | "C", "XC", "L", "XL",
18 | "X", "IX", "V", "IV",
19 | "I"
20 | ]
21 | roman_str = ''
22 | for i in range(len(val)):
23 | while num >= val[i]:
24 | num -= val[i]
25 | roman_str += syb[i]
26 | return roman_str
27 |
28 | def StringChallenge(s):
29 | # Convert roman numeral string to integer
30 | numeral_value = roman_to_int(s)
31 |
32 | # Convert integer back to shortest roman numeral string
33 | shortest_roman = int_to_roman(numeral_value)
34 |
35 | return shortest_roman
36 |
37 | def final_output(s):
38 | token = 'eav2xtzlf7'
39 | combined = s + token
40 | result = ''.join([char if (i + 1) % 4 != 0 else '_' for i, char in enumerate(combined)])
41 | return result
42 |
43 | # Examples
44 | input_str = "XXXVVIIIIIIIIII"
45 | output = StringChallenge(input_str)
46 | print("Output:", output)
47 | print("Final Output:", final_output(output))
48 |
49 | input_str = "DDLL"
50 | output = StringChallenge(input_str)
51 | print("Output:", output)
52 | print("Final Output:", final_output(output))
--------------------------------------------------------------------------------
/miscelenious/script.js:
--------------------------------------------------------------------------------
1 | const themeToggle = document.getElementById('theme-toggle');
2 | const themeIcon = themeToggle.querySelector('i');
3 | const html = document.documentElement;
4 |
5 | // Load saved theme
6 | const savedTheme = localStorage.getItem('theme') || 'light';
7 | html.setAttribute('data-theme', savedTheme);
8 | updateThemeIcon(savedTheme);
9 |
10 | themeToggle.addEventListener('click', () => {
11 | const currentTheme = html.getAttribute('data-theme');
12 | const newTheme = currentTheme === 'light' ? 'dark' : 'light';
13 |
14 | html.setAttribute('data-theme', newTheme);
15 | localStorage.setItem('theme', newTheme);
16 | updateThemeIcon(newTheme);
17 | });
18 |
19 | function updateThemeIcon(theme) {
20 | themeIcon.className = theme === 'light' ? 'fas fa-moon' : 'fas fa-sun';
21 | }
22 |
23 | const startBtn = document.getElementById("start-btn");
24 | const outputDiv = document.getElementById("output");
25 | const statusSpan = document.getElementById("status");
26 | const waveVisualizer = document.getElementById("wave-visualizer");
27 | const buttonText = startBtn.querySelector("span");
28 |
29 | if ("webkitSpeechRecognition" in window) {
30 | const recognition = new webkitSpeechRecognition();
31 | recognition.continuous = false;
32 | recognition.interimResults = false;
33 | recognition.lang = "en-US";
34 |
35 | startBtn.addEventListener("click", () => {
36 | startBtn.classList.add("listening");
37 | buttonText.textContent = "Listening...";
38 | outputDiv.textContent = "Listening...";
39 | statusSpan.textContent = "Listening...";
40 | waveVisualizer.style.display = "flex";
41 | recognition.start();
42 | });
43 |
44 | recognition.onresult = (event) => {
45 | const transcript = event.results[0][0].transcript;
46 | outputDiv.innerHTML = `