Skip to content

Instantly share code, notes, and snippets.

View Pymmdrza's full-sized avatar
M M D R Z A . C o M

MMDRZA Pymmdrza

M M D R Z A . C o M
View GitHub Profile
@Pymmdrza
Pymmdrza / Log_Deep_Gemini.md
Created February 12, 2025 22:30
Log All Chat Data From Dual Ai Model Deepseek R1 with Gemini 2.0 Flash

Log Chat Dual Ai Model (Deepseek R1 vs Gemini 2.0 Flash)

All Data Log Chat From Chat Deepseek R1 vs. Gemini 2.0 Flash

Start Prompt

SYSTEM : You are chatting with another AI model. With each other's help, you should be able to write a complete script or program in Python for trading digital currencies as futures.


@Pymmdrza
Pymmdrza / transfer_model.py
Created December 28, 2024 01:27
Backup tools for any website and server create and compress with upload data to ftp, sftp , s3 and r2 with python
# --------------------------------------
# Programmer : github.com/PyMmdrza
# pip install tqdm ftplib boto3 pysftp
# --------------------------------------
import ftplib
import pysftp
import boto3
import tarfile
import zipfile
import os
@Pymmdrza
Pymmdrza / migrate_db_tool.py
Created December 28, 2024 01:01
Wordpress Website Migrate Database 2 website model with python
import mysql.connector
# Source database connection configuration
SOURCE_DB_CONFIG = {
'host': 'source_db_host',
'user': 'source_db_user',
'password': 'source_db_password',
'database': 'source_db_name'
}
@Pymmdrza
Pymmdrza / 01_PyMermid_To_Path.py
Last active December 19, 2024 15:17
PyMermid Auto create path file's and folder
import os
def create_project_structure_from_file(file_path, base_directory="PyMermid"):
"""
Create a file and folder structure based on the tree-like format in the input text file.
Args:
- file_path (str): The path to the text file containing the directory structure.
- base_directory (str): The base directory where the project structure will be created.
"""
@Pymmdrza
Pymmdrza / s3Finder.py
Created November 6, 2024 13:23
s3 amazoon public bucket finder
import requests
import concurrent.futures
from urllib.parse import urlparse
import boto3
from botocore.exceptions import ClientError
from colorama import Fore, Style
from datetime import datetime
class S3Scanner:
def __init__(self):
@Pymmdrza
Pymmdrza / id_inserter.py
Created October 2, 2024 17:05
Inserter ID Content for H1, H2, H3, H4, H5 Tag on HTML File. With Python
from bs4 import BeautifulSoup
import sys
import os
def generate_id_from_text(text):
"""
Generates a valid id from text by converting it to lower case,
removing special characters, and replacing spaces with hyphens.
"""
return text.lower().replace(" ", "-").replace(",", "").replace(".", "").replace("'", "").replace("\"", "").replace("&", "and")
@Pymmdrza
Pymmdrza / LocalReaderBlock.py
Created August 27, 2024 13:02
Read Block File From Bitcoin Core (.dat)
import struct
import hashlib
def read_block(file_path):
with open(file_path, 'rb') as f:
while True:
magic = f.read(4)
if len(magic) < 4:
break
@Pymmdrza
Pymmdrza / Natural-File-Size-Convertor.py
Created August 24, 2024 17:18
Natural File Size Convertor on Python
def naturalsize(num_bytes: int) -> str:
for unit in ['B', 'KB', 'MB', 'GB', 'TB']:
if num_bytes < 1024.0:
return f"{num_bytes:.2f} {unit}"
num_bytes /= 1024.0
return f"{num_bytes:.2f} PB"
@Pymmdrza
Pymmdrza / blockbook.sh
Last active August 5, 2024 12:12
Install and Running Blockbook in Debian 11, 12 [Bitcoin Explorer Node]
# // ------------------------- [ Config Setup ] ------------------------ //
# set permission swapfile
chmod 600 /swapfile
# create new swapfile
mkswap /swapfile
# write and added swap file to etc section
echo ‘/swapfile none swap sw 0 0’ | tee -a /etc/fstab
# system resourse optimize
sysctl vm.swappiness=10
echo “vm.swappiness = 10” >> /etc/sysctl.conf
@Pymmdrza
Pymmdrza / time_ago.py
Created July 23, 2024 20:37
Time Last Date Ago On Python
from datetime import datetime
def format_time_ago(download_date):
download_datetime = datetime.strptime(download_date, '%Y-%m-%d %H:%M:%S')
current_datetime = datetime.now()
time_difference = current_datetime - download_datetime
if time_difference.days > 365:
years = time_difference.days // 365