Skip to content

Instantly share code, notes, and snippets.

@tajpouria
tajpouria / upload_video.py
Created January 14, 2024 11:08
Upload video to Youtube using Youtube data API v3
#!/usr/bin/python
import httplib2
import os
import random
import sys
import time
from apiclient.discovery import build
from apiclient.errors import HttpError
@tajpouria
tajpouria / copy-of-prompt_based_image_in_painting_powered_by_clipseg.ipynb
Last active December 29, 2023 16:14
Prompt_based_Image_In_Painting_powered_by_ClipSeg.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
kubectl run -i --tty kafka-cli --image=conitasgmbh/kafka-cli --restart=Never --rm=true -- /bin/sh
kafka/bin/kafka-topics.sh --bootstrap-server 'localhost:9092' --list
@tajpouria
tajpouria / v2ray.sh
Last active February 12, 2023 00:35
#!/bin/bash
red='\e[91m'
green='\e[92m'
yellow='\e[93m'
magenta='\e[95m'
cyan='\e[96m'
none='\e[0m'
_red() { echo -e ${red}$*${none}; }
_green() { echo -e ${green}$*${none}; }
@tajpouria
tajpouria / .sh
Last active January 9, 2021 06:15
Delete large files/directories from commit history in git repository
# 0. Check consumed disk space
git count-objects -vH
# 1. Displays all blob objects in the repository, sorted from smallest to largest.
git rev-list --objects --all \
| git cat-file --batch-check='%(objecttype) %(objectname) %(objectsize) %(rest)' \
| awk '/^blob/ {print substr($0,6)}' \
| sort --numeric-sort --key=2 \
| cut --complement --characters=13-40 \
| numfmt --field=2 --to=iec-i --suffix=B --padding=7 --round=nearest
@tajpouria
tajpouria / init.vim
Created March 30, 2020 14:40
my-nvimrc-rc
set number
imap jj <esc>
set tabstop=2 softtabstop=0 expandtab shiftwidth=2 smarttab
set background=dark
set spell!
set mouse=a
set formatoptions-=cro "disable continuation of comments to the next line
call plug#begin('~/.vim/plugged')