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 os | |
import re | |
from datetime import datetime | |
import subprocess | |
def extract_date_from_folder(folder_name): | |
"""Extracts a date in the format YYYY-MM-DD, YYYY-MM, or YYYYs from a folder name.""" | |
# Match full date YYYY-MM-DD | |
match_full = re.match(r"^(\d{4})-(\d{2})-(\d{2})", folder_name) | |
if match_full: |
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
version: '2' | |
services: | |
zookeeper: | |
image: confluentinc/cp-zookeeper:latest | |
hostname: zookeeper | |
container_name: zookeeper | |
ports: | |
- '2181:2181' | |
environment: | |
ZOOKEEPER_CLIENT_PORT: '2181' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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.commons.io.FileUtils; | |
import org.datavec.api.records.reader.SequenceRecordReader; | |
import org.datavec.api.records.reader.impl.csv.CSVSequenceRecordReader; | |
import org.datavec.api.split.NumberedFileInputSplit; | |
import org.deeplearning4j.api.storage.StatsStorage; | |
import org.deeplearning4j.arbiter.ComputationGraphSpace; | |
import org.deeplearning4j.arbiter.conf.updater.SgdSpace; | |
import org.deeplearning4j.arbiter.layers.LSTMLayerSpace; | |
import org.deeplearning4j.arbiter.layers.OutputLayerSpace; | |
import org.deeplearning4j.arbiter.optimize.api.OptimizationResult; |
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
var fs = require('fs') | |
var labels = fs.readFileSync('labels.txt', 'utf-8') | |
.split('\n') | |
.filter(Boolean); | |
/*for(i = 0; i < labels.length; i++) { | |
fs.mkdirSync("./train/"+i); | |
fs.mkdirSync("./test/"+i); | |
}*/ |
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 | |
wget http://www.eu.apache.org/dist/maven/maven-3/3.3.9/binaries/apache-maven-3.3.9-bin.tar.gz | |
tar xzf apache-maven-3.3.9-bin.tar.gz | |
sudo mkdir /usr/local/maven | |
sudo mv apache-maven-3.3.9/ /usr/local/maven/ | |
sudo alternatives --install /usr/bin/mvn mvn /usr/local/maven/apache-maven-3.3.9/bin/mvn 1 | |
sudo alternatives --config mvn |
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
object Preprocessor extends Serializable { | |
class Seq2SeqAutoencoderPreProcessor extends MultiDataSetPreProcessor { | |
override def preProcess(mds: MultiDataSet): Unit = { | |
val input: INDArray = mds.getFeatures(0) | |
val features: Array[INDArray] = Array.ofDim[INDArray](2) | |
val labels: Array[INDArray] = Array.ofDim[INDArray](1) | |
features(0) = input | |
NewerOlder