Skip to content

Instantly share code, notes, and snippets.

View elmiko's full-sized avatar

Michael McCune elmiko

View GitHub Profile
@kazuki
kazuki / README
Last active August 29, 2015 14:05
Hadoop SwiftFileSystem KeyStone v3 TRUST Support Patch
Added configuration parameter "fs.swift.service.<name>.trust-id".
When you use "fs.swift.service.<name>.trust-id" parameter,
you have to set "fs.swift.service.sic.auth.url" to Keystone V3 URL (http://keystone-host:5000/v3/auth/tokens)
Example:
$ hadoop fs -ls -Dfs.swift.service.sahara.auth.url=http://localhost:5000/v3/auth/tokens \
-Dfs.swift.service.sahara.username=<swift-proxy-user> \
-Dfs.swift.service.sahara.password=<swift-proxy-user-password> \
-Dfs.swift.service.sahara.trust-id=<trust-id> \
swift://<container-name>.sahara/
@jkremser
jkremser / gist:01c5b22f9719442a416e9fd62d95b8ad
Last active August 3, 2017 12:17
torch tutorials@docker
git clone https://github.com/torch/tutorials.git
docker run -it -p 8888:8888 -p 6006:6006 -v $PWD/tutorials:/root/sharedfolder floydhub/dl-docker:cpu jupyter notebook
@ryan-williams
ryan-williams / metrics.properties
Created February 26, 2015 00:47
Spark metrics.properties example
# Enable Graphite
*.sink.graphite.class=org.apache.spark.metrics.sink.GraphiteSink
*.sink.graphite.host=<graphite host>
*.sink.graphite.port=<graphite port>
*.sink.graphite.period=10
# Enable jvm source for instance master, worker, driver and executor
master.source.jvm.class=org.apache.spark.metrics.source.JvmSource
worker.source.jvm.class=org.apache.spark.metrics.source.JvmSource
driver.source.jvm.class=org.apache.spark.metrics.source.JvmSource
@pdmack
pdmack / spongodb.py
Last active December 20, 2017 00:04
Adaptation of PySpark/MongoDB example illustrating dynamic jar loading: works with spark-submit AND python interpreter
from __future__ import print_function
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@pbazard
pbazard / download_quandl_wiki_prices.py
Last active February 9, 2018 19:49
Download Quandl WIKI EOD stock prices
import requests
import zip
# Quandl file name
filename = 'wiki_prices.zip'
# Fetch the wiki_prices.zip file
r = requests.get(
'https://www.quandl.com/api/v3/datatables/WIKI/PRICES?qopts.export=true&api_key=YOUR-API-KEY')
resp = r.json()
@mbbroberg
mbbroberg / community-measurement.md
Last active September 27, 2018 20:40
Worksheet for Red Hat

Q1: What’s your gut vs brain story?

There is the desire to participate in our community and the responsibility to measure its effectiveness that feel at odds. Take a moment to write down two things:

  • What do you wish you could measure about your community?
  • What do you value most about participating in your community?

A1:

Q2: What do you want from the business?

@sub-mod
sub-mod / steps.md
Last active October 15, 2018 21:39
Create CRD Object as Project-admin in Openshift

CRD and ClusterRole Both need cluster-admin

Create a CRD ...just the definition as cluster-admin

cat >> crd.yaml << EOF
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
  name: crontabs.stable.example.com
@alexland
alexland / column-print.py
Last active March 26, 2019 13:21
printing formatted tables using python 3 "advanced string formatting"
# let's say you have four sequences you want to print columnwise, like so:
19 59 97 44
92 57 63 68
66 21 69 90
75 66 12 19
# mock some data
import random as RND
gen_row = lambda: [ RND.randint(10, 99) for c in range(3) ]
@albfan
albfan / .gitignore
Last active January 7, 2020 19:06 — forked from kontez/freeotp_backup.md
A guide to back up and recover 2FA tokens from FreeOTP (Android)
apps/
@sub-mod
sub-mod / tektoncd_notes.md
Last active January 29, 2020 20:16
tektoncd_notes.md