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 / 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"
%SCRIPT
// needs TeXstudio v2.11.0 or newer
filename = app.getCurrentFileName()
workingDirectory = filename.substring(0, filename.lastIndexOf("/"))
system("explorer .", workingDirectory) //for windows - tested
//system("xdg-open .", workingDirectory) //for linux - tested
//system("open .", workingDirectory) //for mac - untested
@MohammadRaziei
MohammadRaziei / cuda10_colab.sh
Created December 16, 2021 21:21 — forked from Ending2015a/cuda10_colab.sh
Install CUDA 10.0 and nvcc on Google Colaboratory
# install cuda 10.0
!apt-get update;
!wget https://developer.nvidia.com/compute/cuda/10.0/Prod/local_installers/cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64 -O cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!dpkg -i cuda-repo-ubuntu1604-10-0-local-10.0.130-410.48_1.0-1_amd64.deb
!apt-key add /var/cuda-repo-10-0-local/7fa2af80.pub
!apt-get update
!apt-get -y install gcc-7 g++-7
!apt-get -y install cuda
@MohammadRaziei
MohammadRaziei / sobel_torch.py
Last active November 5, 2021 19:27
Sobel filter using pytorch
class Sobel2d(nn.Module):
def __init__(self, num_channels):
super().__init__()
self.num_channels = num_channels
sobel_x_kernel = torch.FloatTensor([[1, 0, -1], [2, 0, -2], [1, 0, -1]])
self.sobel_x_kernel = sobel_x_kernel.repeat(num_channels,1,1,1)
sobel_y_kernel = torch.FloatTensor([[1, 2, 1], [0, 0, 0], [-1, -2, -1]])
self.sobel_y_kernel = sobel_y_kernel.repeat(num_channels,1,1,1)
def forward(self, inputs):