Skip to content

Instantly share code, notes, and snippets.

View Gholamrezadar's full-sized avatar
💤

Gholamreza Dar Gholamrezadar

💤
View GitHub Profile
import timm
# List of models
timm.list_models()
timm.list_models(pretrained=True)
# Create a model
model = timm.create_model('resnet18', pretrained=True, num_classes=10) #default=1000
# get the input size of the model
@Gholamrezadar
Gholamrezadar / ghd_template.cpp
Last active January 22, 2025 13:35
GHD CF Template cpp
#pragma region Template
// #include <bits/stdc++.h>
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
#include <algorithm>
#include <unordered_map>
#include <unordered_set>
@Gholamrezadar
Gholamrezadar / ghd-colab-ollama.ipynb
Last active December 10, 2024 11:11
ghd-colab-ollama.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Gholamrezadar
Gholamrezadar / v2ray_through_terminal.sh
Last active July 20, 2025 05:36
Pass V2rayN through Terminal
export http_proxy="socks5h://127.0.0.1:10808"
export https_proxy="socks5h://127.0.0.1:10808"
export all_proxy="socks5h://127.0.0.1:10808"
@Gholamrezadar
Gholamrezadar / apt_update_fix.sh
Last active July 20, 2025 05:35
Ubuntu apt update not working (remove ir servers)
# remove ir mirrors
sudo sed -i 's|http://.*.ubuntu.com|http://archive.ubuntu.com|g' /etc/apt/sources.list
@Gholamrezadar
Gholamrezadar / vazirmatn-ubuntu.md
Created July 20, 2025 05:35
Change default persian font in Ubuntu
  1. Install the font
sudo apt install fonts-vazirmatn

or download it and place it in ~/.local/share/fonts/ or /usr/share/fonts/truetype/.

  1. Create this file
mkdir -p ~/.config/fontconfig
nano ~/.config/fontconfig/fonts.conf
@Gholamrezadar
Gholamrezadar / for_loop_exercises.md
Last active August 4, 2025 06:07
for_loop_exercises

For Loop Practice

Single For Loop

1. Simple

Description: Print the numbers from 0 to 9.

0
@Gholamrezadar
Gholamrezadar / gpt-oss-ollama-colab.ipynb
Last active August 17, 2025 06:04
gpt-oss-ollama-colab.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.