Skip to content

Instantly share code, notes, and snippets.

View tangzhankun's full-sized avatar

tangzhankun_os tangzhankun

  • Cloudera
  • Shanghai
View GitHub Profile
object SimpleApp {
def main(args: Array[String]) {
val logFile = "userdata.txt" // Should be some file on your system
val spark = SparkSession.builder.appName("Simple Application").getOrCreate()
val sc = spark.sparkContext
val data = Array(1)
val distData = sc.parallelize(data)
distData.map(x => readLocalFile(x)).collect().foreach(println)
spark.stop()
}
#!/usr/bin/python
import itertools
import subprocess
import csv
with open('tensorflow_bench_result.csv', 'wb') as csvFile:
csvWriter = csv.writer(csvFile, quoting=csv.QUOTE_ALL)
#gpus = ['0', '1', '2', '3', '4', '5', '6', '7']
#batch_size = ['32', '64', '128']
#model = ['alexnet', 'resnet50', 'vgg16', 'inception3']