Instantly share code, notes, and snippets.

View convert_from_bitbucket.txt
1- Install mercurial
- apt-get install mercurial
2- Checkout bitbucket repo
- hg clone <repo url> -r <branch>
- EX - hg clone https://bitbucket.org/rptlab/reportlab -r default
3 - Create a git repo:
- cd reportlab
- git init
- git checkout -b master
View deleteIoTThingsByTypeOrName.py
import logging
import argparse
import os
import botocore
import json
from daasdeployhelpers import cloudformation as daas_cfn
from daasdeployhelpers import authentication as daas_auth
import boto3
View listGithubOrgRepos.py
import requests
import json
import argparse
import logging
github_api_url = "https://github.infra.int.daas-watchguard.com/api/v3"
ghe_access_token = 'your github personal access token'
#logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO, filename='ghe_org_repo_list.log')
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)