View Log test names (JUnit, SLF4J)
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
@Rule | |
public TestRule loggingRule = new TestWatcher() { | |
protected void starting(Description description) { | |
Logger logger = LoggerFactory.getLogger(description.getClassName()); | |
logger.info("Starting: {}", description.getMethodName()); | |
} | |
}; |
View Call private methods on Scala and Java objects
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
package object utils { | |
/** | |
* Helper that allows to call private methods on Scala/Java objects. | |
* | |
* Usage: `someObject.exposeMethod('methodName)(arg1, arg2, arg3)` | |
* | |
* See: https://gist.github.com/EugenyLoy/5873642543f869c7e25f | |
*/ | |
implicit class ExposePrivateMethods(obj: AnyRef) { |
View gist:76727e5cec6943f5dd73
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
curl -i https://api.github.com/repos/EugenyLoy/awesome-github > `date -u '+%F'_%H_%M`.txt |
View IO.hs
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
module IO where | |
import System.IO | |
import Control.Exception | |
import Control.DeepSeq | |
import Control.Monad.Trans.Either | |
import Control.Monad.Trans.Class | |
import Data.Either.Combinators | |
import System.Environment |
View gist:f4efbef43a6764a7f9469a2b670cc128
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
classpath.add(("org.scalaz" , "scalaz-core_2.11" ,"7.2.2")) |
View features.m
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
clear ; close all; clc | |
% helpers used later --- | |
function [result] = measureError(X, y, theta) | |
result = linearRegCostFunction(X, y, theta, 0); | |
endfunction | |
View axline.py
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 matplotlib.pyplot as plt | |
def axline(xdata, ydata, ax = plt.subplot(111), *args, **kwargs): | |
try: | |
x1 = xdata[0] | |
y1 = ydata[0] | |
except: | |
# assume first point coordinates given as numbers | |
x1 = float(xdata) |
View main.scala
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 org.apache.log4j.Logger | |
import org.apache.log4j.Level | |
Logger.getLogger("org").setLevel(Level.ERROR) | |
Logger.getLogger("akka").setLevel(Level.ERROR) |
View .bashrc
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
export PS1='\[\033[01;37m\]\u@\h\[\033[01;32m\] \w $(__git_ps1 "\n[%s]") | |
\$\[\033[00m\] ' |
View export.py
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 json | |
import csv | |
LIST_NAME = "Backlog" | |
INPUT_FILE = "data.json" | |
OUTPUT_FILE = 'data.csv' | |
with open(INPUT_FILE) as jsonfile: | |
data = json.load(jsonfile) |
OlderNewer