Skip to content

Instantly share code, notes, and snippets.

View Nilanshrajput's full-sized avatar
:shipit:
WFH

Nilansh Rajput Nilanshrajput

:shipit:
WFH
View GitHub Profile
#!/bin/bash
# orginal source https://gist.github.com/vbe0201/b85ec47bc198d1c8471acbf016922005/raw/get-python.sh
# (c) 2019 Valentin B.
#
# Open your terminal and enter the following command:
# wget https://gist.githubusercontent.com/Nilanshrajput/5067429c9d8229809969b48b75fd81bb/raw/9a17570afd5a949951209b403a26cf6a9e9d5def/bvt_env.sh && chmod +x bvt_env.sh && ./bvt_env.sh
apt update -y
apt upgrade
@Nilanshrajput
Nilanshrajput / add_labels_to_github.py
Last active May 24, 2020 06:23
Set labels across all the repositories in organisation, get list of repos under an org, delete previous labels, set new labels
import requests
from requests.auth import HTTPBasicAuth
import json
def get_repos(org="OpenMined"):
r=requests.get(f'https://api.github.com/orgs/{org}/repos')
json_data = r.json()
repo_names = [entity["name"] for entity in json_data]
return repo_names