Skip to content

Instantly share code, notes, and snippets.

View MohammadRaziei's full-sized avatar
💭
I may be slow to respond.

Mohammad Raziei MohammadRaziei

💭
I may be slow to respond.
View GitHub Profile
@MohammadRaziei
MohammadRaziei / README.md
Last active October 19, 2026 14:15
One-line Linux system report for comparing benchmark results across machines (CPU P/E cores, SIMD, power profile, RAM, GPU)

sysinfo

A one-line Linux system report for explaining benchmark differences between machines.

When the same benchmark gives different numbers on two computers, the cause is rarely just "this CPU is faster". It is often the power source, the power profile, a hybrid P-core/E-core scheduler, a missing SIMD extension, or background load. This report puts all of that in one table, so you can paste it next to your results.

It is read-only. It only reads /proc and /sys and runs lscpu, free, df, lspci, nvidia-smi, powerprofilesctl get and dmidecode -t memory. It changes nothing on your system. Missing sources print n/a instead of failing.

Linux only. Works in bash and zsh.

Usage

@MohammadRaziei
MohammadRaziei / exclude_from_defender.bat
Last active August 13, 2026 22:45
exclude_from_defender.bat
@echo off
:: exclude_from_defender.bat
::
:: Adds THIS folder (and every subfolder under it, e.g.
:: results\reconstructor\otf_queue) to Windows Defender's real-time
:: scanning exclusion list.
::
:: Why: on-the-fly training writes and deletes thousands of small PNG/JSON
:: files per minute in results\reconstructor\otf_queue. Windows Defender's
:: real-time protection scans each one by default, which can slow training
@MohammadRaziei
MohammadRaziei / matlab_version.py
Last active August 31, 2026 14:13
A lightweight script that instantly detects the installed MATLAB release version in milliseconds. It directly parses the local installation files, completely bypassing the need to launch the heavy MATLAB runtime engine.
import os
import shutil
import platform
import xml.etree.ElementTree as ET
def find_matlab_executable() -> str:
"""Locates the MATLAB executable across different operating systems.
The function first checks the system PATH environment variable. If not found,
@MohammadRaziei
MohammadRaziei / gist:23e8f4c396af6f307cb7754ee9d61d45
Created January 9, 2024 21:49 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
#!/bin/bash
# Input file containing paths and URLs
input_file="urls.txt"
## looks like bellow:
## urls.txt
# 1x.png https://cdn.soft98.ir/Google%20Chrome.png
# 2x.jpg https://cdn.soft98.ir/BurnAware.jpg
##########
\usepackage{color}
\definecolor{deepblue}{rgb}{0,0,0.5}
\definecolor{deepred}{rgb}{0.6,0,0}
\definecolor{deepgreen}{rgb}{0,0.5,0}
\lstdefinelanguage{CUDA}{
language=C++,
morekeywords=[1]{__device__, __global__, __shared__, __constant__, __managed__, __restrict__},
morekeywords=[2]{uchar, uchar2, uchar3, uchar4,
@MohammadRaziei
MohammadRaziei / dracula.cmd
Created March 8, 2023 09:03
change cmd marker
setx PROMPT "$E[1;32;40m→ $E[1;36;40m$p$E[1;35;40m› $E[1;37;40m"
net start w32time
w32tm /resync
@MohammadRaziei
MohammadRaziei / utube.bat
Last active May 30, 2023 08:23
download from youtube with subtitle (a single video)
youtube-dl -ciw --write-auto-sub --write-sub --sub-lang en %*
yt-dlp -ciw --write-auto-sub --write-sub --sub-lang en -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' --proxy socks://localhost:10808
@MohammadRaziei
MohammadRaziei / webm2mp4.bat
Created July 19, 2022 07:55
Convert *.webm to *.mp4
@echo off
ffmpeg -fflags +genpts -i "%~f1" %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9 -r 24 "%~d1%~p1%~n1.mp4"