7 Amazingly Useful Uzar Scripts that you will use every week

by SkillAiNest

7 Amazingly Useful Uzar Scripts that you will use every week7 Amazingly Useful Uzar Scripts that you will use every week
Photo by Author | Ideogram

. Introduction

Dear Not just to make data science, apps, or games. I was teaching my younger brother, Qasim, Azigar, and I realized that when I showed him a practical script, he made a lot of contact that could automatically perform boring, repeated work -working tasks. One thing I have witnessed in life is that a group of small, non -productive, time -consuming tasks can take your energy seriously. Your end is very excited or focused on things that are actually important. Therefore, I am here to help you with some common tasks that you have to face almost every week and how you can easily be automatically resolved, which saves you tons of time and energy.

I have kept the script clean and easy, but you can add complexity to them according to your needs. So, let’s start.

. 1. Automatic File Organizer by extension

To tell the truth, sometimes when I’m working, my download folder becomes an absolute mess. I will share a simple aggregate script that will loop through the files in your target directory and use them using (such as, photos, documents, videos). Os And Shuttle. Let’s take a look:

import os
import shutil
from pathlib import Path

# Folder to organize (e.g., Downloads)
base_folder = Path.home() / "Downloads"

# Define folders for each extension
folders = {
    "images": ("jpg", "png", "gif", "bmp"),
    "documents": ("txt", "pdf", "docx"),
    "archives": ("zip", "rar", "tar", "gz"),
    "audio": ("mp3", "wav"),
    # add more categories as needed
}

# Iterate over files in base_folder
for item in base_folder.iterdir():
    if item.is_file():
        ext = item.suffix.lower().lstrip('.')
        moved = False
        # Determine which category folder to use
        for folder, ext_list in folders.items():
            if ext in ext_list:
                dest_dir = base_folder / folder
                dest_dir.mkdir(exist_ok=True)
                item.rename(dest_dir / item.name)
                moved = True
                break
        # If extension didn’t match any category, move to "others"
        if not moved:
            dest_dir = base_folder / "others"
            dest_dir.mkdir(exist_ok=True)
            item.rename(dest_dir / item.name)

. 2. System Resource Monitor with Alerts

If you are someone like me who operates multiple tabs, apps and scripts together, it is easy to track your system performance. This script, using psutil The library, helps you monitor the use of your CPU and RAM. Even if the use crosses a certain limit, you can set alerts.

import psutil
import time

CPU_LIMIT = 80  # in percentage
MEMORY_LIMIT = 80  # in percentage

while True:
    cpu = psutil.cpu_percent(interval=1)
    memory = psutil.virtual_memory().percent

    print(f"CPU: {cpu}%, Memory: {memory}%")

    if cpu > CPU_LIMIT:
        print("⚠️ CPU usage is high!")

    if memory > MEMORY_LIMIT:
        print("⚠️ Memory usage is high!")

    time.sleep(5)

Run it for a while, and how things grow when you are editing videos or running heavy scripts.

. 3. Automatic email reporter

Email takes more time than we think. Whether it’s responding to refreshments, sending reminders, following, or just keeping people in the loop, we often do things every week that can be automatically (and should). And if you are anything like me, you might write in these regular updated emails, eliminate the delay, and then hurry it later. This easy script can be really useful, and here you can configure it:

import smtplib
from email.mime.text import MIMEText

sender = "youremail@example.com"
receiver = "receiver@example.com"
subject = "Daily Report"
body = "This is your automated email for today."

msg = MIMEText(body)
msg("Subject") = subject
msg("From") = sender
msg("To") = receiver

# For security, use environment variables or getpass instead of hardcoding.
password = "your_password" 

with smtplib.SMTP_SSL("smtp.gmail.com", 465) as server:
    server.login("youremail@example.com", password)
    server.send_message(msg)

print("Email sent!")

⚠ ⚠ The head to pick up: If you are using Gmail, make sure if you have 2 FA enabled, you have enabled access to a less secure app or compiled a specific password related to the app.

. 4. Desktop notifications

I began to actually start using this script so that I could keep me on the Lord Pomodoro technique (25 minutes after a break of 5 minutes). And honestly, she was surprised for my concentration and energy level throughout the day. This is great if you want something to change the apps on your screen or make a little reminder on your screen without setting the alarm. You can use it for anything, such as constant reminders, hydration alerts, or even reminding yourself to prevent domescrolling.
Since I’m on Macos, I am using Bullet -In osascript Order to mobilize local system information. But if you are on Windows or Linux, you can use Player Library for similar functionality.

This is how I compiled it for my workflow:

import time
import os

def notify(title, message):
    os.system(f'''
        osascript -e 'display notification "{message}" with title "{title}"'
    ''')

# Pomodoro session settings
work_duration = 25 * 60  # 25 minutes
break_duration = 5 * 60  # 5 minutes
cycles = 4  # Number of Pomodoro sessions

for i in range(cycles):
    # Work phase
    notify(f"Pomodoro {i + 1} - Focus Time", "Time to focus! Work for 25 minutes.")
    time.sleep(work_duration)

    # Break phase
    notify("Break Time", "Nice work! Take a 5-minute break.")
    time.sleep(break_duration)

# Final notification
notify("All Done!", "You’ve completed all your Pomodoros 🎉")

. 5. Password generator and manager

If you are still using the same password everywhere (please do not do it), then this is for you. It produces a secure password and stores it safely (later you can also encrypt the storage section).

import random
import string

def generate_password(length=12):
    chars = string.ascii_letters + string.digits + string.punctuation
    password = "".join(random.choice(chars) for _ in range(length))
    return password

new_password = generate_password()
print("Generated Password:", new_password)

# Save to file (simple way)
with open("passwords.txt", "a") as file:
    file.write(f"MySite: {new_password}\n")

File File, Consider to encrypt the file Encrypted Or to store it in a safe vault Carving.

. 6. Find the text in multiple files

When I am working on writing content, I usually have many raw ideas scattered in different files in different folders. Sometimes I remember writing a wonderful imitation or a piece of code a week ago … but I don’t know where I saved it. This little script has saved me for countless hours. Instead of manually opening every file, such as “Machine Learning” or “Vector Search”, I just drive this script and scan everything for me.

import os

search_dir = "your_directory"  # Replace with the path to your notes
search_term = "machine learning"

for root, dirs, files in os.walk(search_dir):
    for file in files:
        if file.endswith(".txt") or file.endswith(".md"):
            file_path = os.path.join(root, file)
            try:
                with open(file_path, "r", encoding="utf-8") as f:
                    content = f.read()
                    if search_term.lower() in content.lower():
                        print(f"✅ Found in: {file_path}")
            except Exception as e:
                print(f"❌ Skipped {file_path} (error reading file)")

This is a simple version that works great for simple text files. Since I work too .docxFor, for, for,. .pptxAnd .pdf Files, I use a little modern version that also supports these formats. You can easily grow this script like libraries Uzar-DuxFor, for, for,. Azigar-PPTXAnd PDF Plumber Make it a mini -search engine for your entire workplace.

. 7. Finding internships and scholarships on Twitter

If you know it is to be used smartly, Twitter/X can be a gold mine. When I was actively looking for Masters and PhD scholarships, I noticed that you just didn’t need to be eligible, but you also needed to be quick and aware. Many great opportunities pop up on Twitter (yes, seriously), but if you are not looking closely, they are rapidly eliminated. There are two great ways to do this in Uzar: either using SNSCRAPE Library or Twitter official API. If you want more control (such as filtering by language, except retweetts, etc.), you can use Twitter’s official API V2. Even despite the free version, you have limited access to recent tweets. LIW WE of this script, we’ll use Applications To communicate with the library API and Pandas To manage the results.

You will need a developer account and bearer token (From Twitter/X Developer Portal,

import requests
import pandas as pd

BEARER_TOKEN = 'YOUR_TWITTER_BEARER_TOKEN'  # Replace this with your token

headers = {
    "Authorization": f"Bearer {BEARER_TOKEN}"
}

search_url = "

# Keywords that usually show up in academic opportunities
query = (
    '(phd OR "phd position" OR "master position" OR "fully funded") '
    '("apply now" OR "open position" OR "graduate position") '
    '-is:retweet lang:en'
)

params = {
    'query': query,
    'max_results': 10,  # Max is 100 for recent search
    'tweet.fields': 'author_id,created_at,text',
    'expansions': 'author_id',
    'user.fields': 'username,name',
}

def get_tweets():
    response = requests.get(search_url, headers=headers, params=params)
    if response.status_code != 200:
        raise Exception(f"Request failed: {response.status_code}, {response.text}")
    return response.json()

def extract_tweet_info(data):
    users = {u('id'): u for u in data.get('includes', {}).get('users', ())}
    tweets_info = ()

    for tweet in data.get('data', ()):
        user = users.get(tweet('author_id'), {})
        tweet_url = f"https://twitter.com/{user.get('username')}/status/{tweet('id')}"

        tweets_info.append({
            'Date': tweet('created_at'),
            'Username': user.get('username'),
            'Name': user.get('name'),
            'Text': tweet('text'),
            'Tweet_URL': tweet_url
        })

    return pd.DataFrame(tweets_info)

if __name__ == "__main__":
    data = get_tweets()
    df = extract_tweet_info(data)
    print(df(('Date', 'Username', 'Text', 'Tweet_URL')).head())
    df.to_csv('phd_masters_positions_twitter.csv', index=False)

You can run this weekly and save the results in CSV or even email them yourself.

. Wrap

In fact, I did not start using Azigar for automation, but over time I realized how much time goes short, repeated things that quietly turn away from my attention. These scripts may be fundamental, but they actually help free time and headspace.

You don’t need to automate everything. Just choose one or two tasks you often do and build from there. I have noticed that once you start with simple automation, you begin to find more ways to make life easier. The same place really begins to click.

If you use any of them or create your own version, let me know. I would love to see what you have brought.

Kanwal seals A machine is a learning engineer and is a technical author that has a deep passion for data science and has AI intersection with medicine. He authored EBook with “Maximum Production Capacity with Chat GPT”. As a Google Generation Scholar 2022 for the APAC, the Champions Diversity and the Educational Virtue. He is also recognized as a tech scholar, Mitacs Global Research Scholar, and a Taradata diversity in the Harvard Wacked Scholar. Kanwal is a passionate lawyer for change, who has laid the foundation of a Fame Code to empower women in stem fields.

You may also like

Leave a Comment

At Skillainest, we believe the future belongs to those who embrace AI, upgrade their skills, and stay ahead of the curve.

Get latest news

Subscribe my Newsletter for new blog posts, tips & new photos. Let's stay updated!

@2025 Skillainest.Designed and Developed by Pro