This file contains hidden or 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 java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
import org.slf4j.Logger; | |
/** | |
* A wrapper class which takes a logger as constructor argument and offers a PrintStream whose flush | |
* method writes the written content to the supplied logger (debug level). | |
* <p> | |
* Usage:<br> |
This file contains hidden or 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 numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.stats as stats | |
import math | |
# distribution | |
# In probability theory and statistics, the Laplace distribution is a continuous probability distribution | |
# named after Pierre-Simon Laplace. | |
# It is also sometimes called the double exponential distribution, | |
# because it can be thought of as two exponential distributions |
This file contains hidden or 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 groovy | |
@Grab("org.apache.poi:poi:3.16") | |
@Grab("org.apache.poi:poi-ooxml:3.16") | |
import org.apache.poi.xssf.usermodel.*; | |
import org.apache.poi.ss.usermodel.*; | |
import org.apache.poi.xssf.streaming.*; | |
/** more java than groovy, will make fancier later **/ | |
def csvToXLSX() { |
This file contains hidden or 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 java.io.ByteArrayOutputStream; | |
import java.io.PrintStream; | |
import java.io.UnsupportedEncodingException; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import com.jayway.restassured.filter.Filter; | |
import com.jayway.restassured.filter.FilterContext; | |
import com.jayway.restassured.filter.log.LogDetail; |
This file contains hidden or 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
/** | |
* Use instead of {@link PropertyPlaceholderConfigurer} | |
* to get access to properties loaded by spring. | |
* <p> | |
* Note: there is support to define file with list of properties which should stay unexposed. | |
* | |
*/ | |
public class ExposePropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer implements InitializingBean { | |
private Map<String, String> resolvedProps = new TreeMap<String, String>(); |
This file contains hidden or 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
# to be improved later | |
#deletel old files | |
rm -rf vmstat.* | |
rm -rf iostat.* | |
rm -rf mpstat.* | |
date > vmstat.log | |
date > iostat.log | |
date > mpstat.log |
This file contains hidden or 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
if (this.args.length < 2) { throw new IllegalArgumentException("Please, give path to baseline properties and path to other properties")} | |
def excludeList = [/log4j\./] | |
File baseline = this.args[0] as File | |
File other = this.args[1] as File | |
Properties baselineProps = new Properties() | |
baseline.withInputStream { stream -> baselineProps.load(stream) } |
This file contains hidden or 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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Super view rotation</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="author" content="Vadim Kirilchuk"> | |
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.2/css/bootstrap-combined.min.css" rel="stylesheet"> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> |
This file contains hidden or 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
subprojects { | |
apply plugin: 'java' | |
task makeDirs(description:'make all dirs for project setup') << { | |
def sources = [sourceSets.main, sourceSets.test] | |
sources*.allSource*.srcDirs.flatten().each { File srcDir -> | |
println "making $srcDir" | |
srcDir.mkdirs() | |
} | |
} |