This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
import pandas as pd | |
import streamlit as st | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
from collections import Counter | |
# Define regex patterns for various filters | |
patterns = { | |
'emails': r'\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}\b', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import smtplib, ssl, email | |
from email import encoders | |
from email.mime.text import MIMEText | |
from email.mime.multipart import MIMEMultipart | |
from email.utils import formataddr | |
import pandas as pd | |
# Sender email credentials | |
sender_email = "YOUR_EMAIL" | |
password = "YOUR_EMAIL_PASSWORD" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import email | |
import quopri | |
from email import policy | |
from email.parser import BytesParser | |
def parse_email(file_path): | |
with open(file_path, 'rb') as file: | |
msg = BytesParser(policy=policy.default).parse(file) | |
print("From:", msg.get("From", "N/A")) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import streamlit as st | |
import pandas as pd | |
from mimesis import Person, Address | |
from mimesis.enums import Gender | |
from io import StringIO | |
# Dictionary of available data generators | |
generators = { | |
"Name": lambda: person.full_name(), | |
"Email": lambda: person.email(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pynput | |
from pynput.keyboard import Key, Listener | |
from win10toast import ToastNotifier | |
# Initialize the ToastNotifier object | |
toaster = ToastNotifier() | |
keys = [] | |
word_count_session = 0 | |
word_count = 1000 # Total word count across different sessions | |
target_word_count = 1000 # Replace with your desired target word count |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from moviepy.editor import VideoFileClip | |
def convert_video_to_gif(video_path, gif_path, start_time=0, duration=None): | |
# Load video clip | |
clip = VideoFileClip(video_path) | |
# Duration for GIF, if not specified use whole video | |
if duration: | |
clip = clip.subclip(start_time, start_time + duration) | |
else: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkinter import ttk | |
import pyperclip # PIP Install | |
from deep_translator import GoogleTranslator | |
from langdetect import detect | |
def detect_and_translate(text): | |
try: | |
# Detect the language | |
detected_language = detect(text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tkinter as tk | |
from tkinter import ttk, messagebox | |
import csv | |
import time | |
from datetime import datetime | |
class TaskTrackerApp: | |
def __init__(self, root): | |
self.root = root | |
self.root.title("ClockWork: Time Tracking Made Easy") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import hashlib | |
from datetime import datetime | |
def get_file_hash(file_path): | |
"""Calculate the SHA-256 hash of a file.""" | |
with open(file_path, 'rb') as f: | |
return hashlib.sha256(f.read()).hexdigest() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!pip install pytrends | |
from pytrends.request import TrendReq | |
import matplotlib.pyplot as plt | |
# Function to get Google Trends data | |
def get_google_trends_data(keywords, timeframe='today 3-m', geo='US'): | |
pytrends = TrendReq(hl='en-US', tz=360) | |
# Build the payload | |
pytrends.build_payload(keywords, cat=0, timeframe=timeframe, geo=geo, gprop='') |