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 | |
import collections | |
import datetime | |
import json | |
import signal | |
import sys | |
from contextlib import closing | |
from optparse import OptionParser |
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 | |
# | |
# 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 | |
# |
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
val r = 0.0 to 1.1 by 0.1 | |
( ( r drop 2 ) drop 2 ) take 2 // doesn't work. | |
val r = BigDecimal(0.0) to 1.1 by 0.1 | |
( ( r drop 2 ) drop 2 ) take 2 // does work. |
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
# snippet from my ~/.zshrc file. | |
export JAVA7_HOME="$(/usr/libexec/java_home -v 1.7)" | |
function with-jdk7 | |
{ | |
export JAVA_HOME="$JAVA7_HOME" | |
echo "$@" | |
$@ | |
} |
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
// somewhere inside some cool framework | |
val classpathEntries = Option(conf.getStrings(YarnConfiguration.YARN_APPLICATION_CLASSPATH)). | |
getOrElse(getDefaultYarnApplicationClasspath()) | |
// where | |
def getDefaultYarnApplicationClasspath(): Array[String] = { | |
try { | |
val field = classOf[MRJobConfig].getField("DEFAULT_YARN_APPLICATION_CLASSPATH") |
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
val width = 5 | |
//width: Int = 5 | |
val tTop = ( 0 until width/2 ) map ( n => 2 * n + 1 ) | |
//tTop: scala.collection.immutable.IndexedSeq[Int] = Vector(1, 3) | |
val tBottom = tTop.reverse | |
//tBottom: scala.collection.immutable.IndexedSeq[Int] = Vector(3, 1) | |
val diamond = tTop union Seq(width) union tBottom |
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
for x in $(find "src/java" -name "*.java"); do git format-patch master $x --stdout > "MESOS-1259-${x//\//-}" ; done |
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
feature/MESOS-1259* → ./support/post-reviews-2.py | |
Running post-review across all of ... | |
369c6fa83ce3e6929646b1304bce918dc37b8274 - (HEAD, berngp/feature/MESOS-1259, feature/MESOS-1259) [MESOS-1259]:Enrich the Java Docs in the src/java files. -- ZooKeeperState.java (2 minutes ago) | |
7edb638b38c832040f9cf0b35a4ea79d1db8e389 - [MESOS-1259]:Enrich the Java Docs in the src/java files. -- Variable.java (2 minutes ago) | |
d8868252011c4653c856ef37a257eafa3112b0e9 - [MESOS-1259]:Enrich the Java Docs in the src/java files. -- State.java (2 minutes ago) | |
c1b9e284ba1ed79c50cdd53f0f66cd52a221217c - [MESOS-1259]:Enrich the Java Docs in the src/java files. -- SchedulerDriver.java (2 minutes ago) | |
cb4d252ac5863e58e63352748733d40faaf50b1c - [MESOS-1259]:Enrich the Java Docs in the src/java files. -- Scheduler.java (2 minutes ago) | |
f634fcd394273751dc8ee260d5485df384fc052c - [MESOS-1259]:Enrich the Java Docs in the src/java files. -- MesosSchedulerDriver.java (2 minutes ago) | |
2ac673c718a96f307ed288577d24b7a036045013 - [MESOS-1259]:Enric |
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 | |
# This is a wrapper around the 'post-review'/'rbt' tool provided by | |
# Review Board. This is currently used by Apache Mesos development. | |
# | |
# What does this do? | |
# It provides the ability to send a review for each commit on the | |
# current branch. | |
# | |
# Why is that useful? | |
# No one likes a 5000 line review request. Using this tool forces one |
OlderNewer