Skip to content

Instantly share code, notes, and snippets.

View ashokpant's full-sized avatar

Ashok Kumar Pant ashokpant

View GitHub Profile
@ashokpant
ashokpant / gist:6e65857a5cf46a2b0b090c1240c19c67
Created January 2, 2024 11:57
gitlab-clone-or-pull-all-repos.sh
#!/bin/bash
GITLAB_TOKEN=<gitlab token>
function get_repos(){
page=$1
repos=($(curl --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" "https://gitlab.com/api/v4/projects/?owned=true&per_page=100&page=${page}" | jq -r '.[].ssh_url_to_repo'))
echo "${repos[@]}"
}
@ashokpant
ashokpant / proto_gen_py_and_install.sh
Last active May 6, 2020 11:42
Generate protos and rpcs for python
#!/usr/bin/env bash
# Author: Ashok Kumar Pant
# Repo and script file structure
# ================================
# proto_gen_py_and_install.sh
# corona_protos/
# corona_py_gen/
# -->coronagen/
# ---->pb/
@ashokpant
ashokpant / character_segmentation.py
Created January 21, 2020 11:59
Character segmentation for dataset preparation
"""
-- Ashok Kumar Pant (ashokpant@treeleaf.ai)
-- Treeleaf Technologies Pvt. Ltd.
-- Date: 1/18/20
"""
import argparse
import os
from random import random
from traceback import print_exc
@ashokpant
ashokpant / image_crawler.py
Created April 17, 2018 05:11
Simplest google image crawler using icrawler
#!/usr/bin/python
import argparse
import os
import numpy as np
from icrawler.builtin import GoogleImageCrawler
def get_files(directory, extensions=None, shuffle=False):
@ashokpant
ashokpant / nepali_stopwords.txt
Last active May 24, 2019 03:39
List of Nepali stopwords
अझै
अधिक
अन्य
अन्यत्र
अन्यथा
अब
अरु
अरुलाई
अर्को
अर्थात
@ashokpant
ashokpant / cuda_9.0_cudnn_7.0.sh
Last active November 16, 2023 21:42
Install CUDA Toolkit v9.0 and cuDNN v7.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v9.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb)
CUDA_REPO_PKG="cuda-repo-ubuntu1604-9-0-local_9.0.176-1_amd64-deb"
wget https://developer.nvidia.com/compute/cuda/9.0/Prod/local_installers/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda-9-0