Skip to content

Instantly share code, notes, and snippets.

View abdalrohman's full-sized avatar

M.Abdulrahman Alnaseer abdalrohman

View GitHub Profile
Type Working? Prompt to Test
Shouting [shouting] HEY! GET OUT OF THE WAY!
Whispering [whispering] Be very quiet, I don't want anyone to hear us.
Laughing That's the funniest thing I've heard all day! [laughing]
Sighing [sighing] Alright, I guess I'll do it myself.
Clears throat [clears throat] Ahem. Let's begin the presentation.
Speaking Slowly [speaking slowly] You... must... understand... the gravity... of this.
Short Pause I think [short pause] we should proceed.
Newscast Style [newscast-formal] In other news, local markets saw a significant rise today.
Emotion Working? Prompt to Test
Angry [angry] This is completely unacceptable!
Excited [excited] We won the match! I can't believe it!
Worried [worried] I hope she's alright. She should have called by now.
Sarcastic [sarcastic] Oh, wonderful. Another problem. That's just what I needed.
Hysterical [hysterical] It's a catastrophe! Everything is ruined!
Confident [confident] Don't worry, I know exactly what to do. Leave it to me.
Scornful [scornful] You call _that_ an achievement? How pathetic.
Empathetic [empathetic] I'm so sorry you have to go through this. I'm here for you.
@abdalrohman
abdalrohman / Office2PDF.py
Created November 14, 2024 05:22
Convert Microsoft Office Documents to PDF with Python.
"""
# Office2PDF
Convert Microsoft Office Documents to PDF with Python.
A robust Python script to batch convert Microsoft Office (Word and PowerPoint) documents to PDF format. The script provides a command-line interface with progress tracking and detailed conversion reporting.
## Features
- Converts both PowerPoint (.ppt, .pptx) and Word (.doc, .docx) files to PDF
@abdalrohman
abdalrohman / empty_folder.py
Created November 11, 2024 14:46
Safely empty the contents of a folder while preserving the folder structure.
import argparse
from pathlib import Path
from rich.console import Console
from rich.progress import Progress
def empty_folder(folder_path, verbose=False):
folder_path = Path(folder_path)
console = Console()
@abdalrohman
abdalrohman / hisnmuslim.py
Created November 10, 2024 18:10
HisnMuslim Content Downloader and Processor
"""
HisnMuslim Content Downloader and Processor
This script downloads and processes Islamic Athkar from HisnMuslim API.
It supports multiple output formats, includes progress tracking, and organized file structure.
Supports downloading specific Athkar by ID (valid range: 1-132).
Author: M.Abdulrahman Alnaseer's
Original API: https://www.hisnmuslim.com/api/ar/husn_ar.json
Website: https://hisnmuslim.com
import concurrent.futures
import ctypes
import logging
import os
import queue
import shutil
import subprocess
import sys
import threading
from datetime import datetime
import ctypes
import json
import logging
import os
import shutil
import subprocess
import sys
import time
import winreg
from datetime import datetime
@abdalrohman
abdalrohman / json_preview.py
Created October 19, 2024 22:01
Utility for previewing JSON file structures
"""
json_preview.py - Utility for previewing JSON file structures
This module provides functionality to peek into JSON files and analyze their structure
without loading the entire file into memory.
License: MIT
Author: M.Abdulrahman Alnaseer
GitHub: abdalrohman (github.com)
@abdalrohman
abdalrohman / everyayah_downloader.py
Created October 19, 2024 15:58
Handles downloading of Quran audio files from EveryAyah.com.
"""
Handles downloading of Quran audio files from EveryAyah.com.
License: MIT
Author: M.Abdulrahman Alnaseer
GitHub: abdalrohman (github.com)
"""
import json
import logging
@abdalrohman
abdalrohman / pixabay_api_client.py
Last active October 18, 2024 21:50
Pixabay API Client with Chaining Strategy Pattern
"""
Pixabay API Client with Chaining Strategy Pattern
A modern, type-safe client for interacting with the Pixabay API using a fluent interface.
Supports method chaining for building search queries and download media.
Author: M.Abdulrahman Alnaseer
GitHub: abdalrohman (github.com)
License: MIT
"""