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
/** | |
* Get all commits of a file which have been issued before a specified date | |
* @param commitMap | |
* @param execDate | |
* @return | |
*/ | |
private TreeMap<DateTime,RevCommit> getAllCommitsBefore(Date execDate, String path){ | |
RevWalk walk = new RevWalk( this.repo ); | |
TreeMap<DateTime, RevCommit> commitsByDate = new TreeMap<DateTime, RevCommit>(); | |
try { |
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
/** | |
* Get the latest commit before a specified date. | |
* @param execDate | |
* @param path | |
* @return | |
*/ | |
public RevCommit getMostRecentCommit(Date execDate, String path){ | |
TreeMap<DateTime,RevCommit> allCommits = this.getAllCommitsBefore(execDate,path); | |
RevCommit lastCommit = allCommits.lastEntry().getValue(); | |
return lastCommit; |
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
machine: | |
environment: | |
# JVM options | |
_JAVA_OPTIONS: "-Xms512m -Xmx2048m -XX:MaxMetaspaceSize=256M" | |
TERM: dumb | |
java: | |
version: openjdk8 | |
dependencies: | |
pre: |
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
# Run a python script using FB Prophet in a Docker container | |
# Build image: docker build -f Dockerfile-Debian -t forecast:R1 . | |
FROM python:3.4.6-wheezy | |
MAINTAINER Stefan Proell <[email protected]> | |
RUN apt-get -y update && apt-get install -y \ | |
python3-dev \ | |
libpng-dev \ | |
apt-utils \ |
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
#!/bin/sh | |
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
# CREATE block and create them in separate commands _after_ all the INSERTs. | |
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
# The mysqldump file is traversed only once. | |
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |