This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyhive import hive | |
import pandas as pd | |
from vdom import pre | |
# Nteract Data Explorer | |
pd.options.display.html.table_schema = True # Data Explorer On! | |
pd.options.display.max_rows = None # Send all the data! (careful!) | |
def getHiveConn(host, username, port=10000, schema="db_user1"): | |
return hive.connect(host=host, port=port, username=username, database=schema, auth=None) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import pandas | |
import sys | |
import argparse | |
import string | |
import subprocess | |
import json | |
import textwrap | |
import re |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## pip install python-gitlab gitpython | |
import gitlab # python-gitlab | |
from git import Repo # gitpython | |
import os, time | |
########################## | |
### Python Gitlab Config: ~/.python-gitlab.cfg | |
# [global] | |
# default = GitLab | |
# ssl_verify = true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################## | |
## Native hdfs access (only on the cluster) | |
# conda install -c conda-forge libhdfs3=2.3.0=1 hdfs3 --yes | |
import hdfs3 | |
import pandas as pd | |
nameNodeHost = 'hadoopnn1.localdomain' | |
nameNodeIPCPort = 8020 | |
hdfs = hdfs3.HDFileSystem(nameNodeHost, port=nameNodeIPCPort) |
NewerOlder