This file contains 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
# Uncrustify 0.59 | |
# | |
# General options | |
# | |
# The type of line endings | |
newlines = auto # auto/lf/crlf/cr | |
# The original size of tabs in the input |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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/env python | |
from contextlib import contextmanager | |
from os.path import getsize, basename | |
from tqdm import tqdm | |
@contextmanager | |
def pbopen(filename): | |
total = getsize(filename) |
This file contains 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
// ============================================================================= | |
// emr.sc -- import it in predef.sc | |
import ammonite.ops._ | |
// add emr jars and config dir to interp class path | |
// | |
def loadEmrJars() = { | |
// /etc/zeppelin/conf/zeppelin-env.sh | |
val libDirs = List( // | |
"/usr/lib/hadoop-lzo/lib", | |
"/usr/lib/spark/jars", |
This file contains 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
import re | |
from xml.etree import ElementTree as ET | |
import requests | |
EMR_RELEASE_NOTES_RSS_URL = "https://docs.aws.amazon.com/emr/latest/ReleaseGuide/amazon-emr-release-notes.rss" | |
def get_latest_emr_release(): | |
"Get latest release version from EMR release note" |
This file contains 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
spark_jars = "file://x.jar,file://y.jar" | |
jars = spark_jars.split(",") | |
from zipfile import ZipFile | |
from pathlib import Path | |
from collections import defaultdict | |
from pprint import pprint | |
libs = defaultdict(set) | |
for jar in sorted(jars): |
This file contains 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/env bash | |
# Setup environment variables required to execute hadoop/spark/zeppelin on Mac | |
#XXX: Supposed to be sourced in, don't complain about the indent. | |
if [ "$(uname)" = "Darwin" ]; then | |
# yarn and hadoop cannot be both installed. | |
brew unlink yarn &>/dev/null || true |
This file contains 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
logging.captureStandardOutput LogLevel.INFO | |
def nexusUsername = "builder" | |
def nexusPassword = 'password' | |
repositories { | |
maven { | |
name = "example-releases" | |
url 'https://nexus.example.com/nexus/content/repositories/releases' | |
credentials { |
This file contains 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 random import randint, seed | |
a = "what" | |
def f1(): | |
print(a) | |
a = "ever" | |
print(a) |
This file contains 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/env python3 | |
# vim: set fileencoding=utf-8 : | |
import re | |
import shutil | |
from pathlib import Path | |
from typing import Dict | |
import attr | |
import requests |
OlderNewer