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 | |
help () { | |
log "Usage: `basename $0` [-h] [-n] [-a] [-u] [-s hh:mm:ss] [-d ss] [-w px] [-f n] [-S n] [-b n] [-t subtitle.sub] [-c default | basic | fontsize | fontstyle | full] <filename> [result.gif] | |
-h show this help | |
-n turn off subtitles | |
-a don't open directory with frames in filemanager | |
-u update this script from gist. Create .gifupd file in the script's directory to automatically check for updates once per day or put the number of seconds in the file to check with that period. | |
-s start time in seconds or as hours:minutes:seconds, default: 0 |
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 | |
TEACOUNT=8 | |
TEADIV= | |
if [ -n "$1" ] | |
then | |
TEADIV="_$1" | |
fi | |
HASH=$(echo -n "teatime_$(date +%d-%m-%Y)$TEADIV" | sha256sum | sed 's/\([0-9a-f]*\) .*/\1/' | tr '[:lower:]' '[:upper:]') | |
TEANUMBER=$(echo "ibase=16; scale=0; $HASH % $TEACOUNT" | bc) | |
echo "HASH=$HASH\nTea count=$TEACOUNT\nTea number=$TEANUMBER" |
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/bash | |
APIKEY= | |
ADDRESS=127.0.0.1:8080 | |
WATCHDIRS=() | |
WATCHREPOS=() | |
TIMEOUTCHANGE=5 | |
function watchdir { | |
local CHANGED | |
local EVENTS |
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 | |
INDEX=$(pacmd list-source-outputs | sed -n 's#\s*index\: \([0-9]*\)#\1#p' | head -n 1) | |
if [ -z "$INDEX" ] | |
then | |
exit 1 | |
fi | |
MONITOR=$(pacmd list-sources | sed -n 's#\s*name: <\(.*\.monitor\)>#\1#p' | head -n 1) | |
INPUT=$(pacmd list-sources | sed -n 's#\s*name: <\(.*_input.*\)>#\1#p' | head -n 1) |
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 | |
TEXT=$(xsel | awk '{print toupper($0)}') | |
(echo | |
echo $TEXT | sed 's#\(.\)#\1 #g' | |
echo $TEXT | sed 's#.\(.*\)#\1#' | sed 's#\(.\)#\1\n#g') | xsel -ib |
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 | |
FLAGS= | |
PICSPATH= | |
PREFIX=http://ipfs.pics/ | |
if [ -d "$1" ] | |
then | |
FLAGS=-r | |
else | |
PICSPATH=ipfs/ | |
fi |
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
NeuralNetConfiguration.Builder builder = new NeuralNetConfiguration.Builder(); | |
builder.iterations(1).learningRate(LEARNING_RATE).rmsDecay(RMS_DECAY) | |
.optimizationAlgo(OptimizationAlgorithm.STOCHASTIC_GRADIENT_DESCENT).seed(123).miniBatch(true).updater(Updater.RMSPROP) | |
.weightInit(WeightInit.XAVIER).regularization(true).l2(L2) | |
.gradientNormalization(GradientNormalization.RenormalizeL2PerLayer); | |
GraphBuilder graphBuilder = builder.graphBuilder().pretrain(false).backprop(true).backpropType(BackpropType.TruncatedBPTT) | |
.tBPTTBackwardLength(TBPTT_SIZE).tBPTTForwardLength(TBPTT_SIZE); | |
graphBuilder.addInputs("firstLine").setInputTypes(InputType.recurrent(dict.size())) | |
.addLayer("encoder", new GravesLSTM.Builder().nIn(dict.size()).nOut(HIDDEN_LAYER_WIDTH).activation(Activation.TANH).build(), |
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 dlchat; | |
import java.io.ByteArrayInputStream; | |
import java.io.File; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
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 dlchat; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import java.util.Map; | |
import org.apache.commons.lang3.ArrayUtils; | |
import org.nd4j.linalg.api.ndarray.INDArray; | |
import org.nd4j.linalg.dataset.api.MultiDataSet; |
OlderNewer