title | tags | authors | |||||
---|---|---|---|---|---|---|---|
How to keep in sync your Git repos on GitHub, GitLab & Bitbucket easily |
|
|
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
https://github.com/apache/spark/tree/v2.3.0/examples/src/main/scala/org/apache/spark/examples/sql/streaming |
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
############################################# | |
# Push de la rama actual | |
git push origin $rama_actual | |
############################################# | |
# Volver a un commit anterior, descartando los cambios | |
git reset --HARD $SHA1 | |
############################################# | |
# Ver y descargar Ramas remotas |
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
1. Rebase Git workflow | |
When you’ve finished a feature on a local branch and it’s time to commit your changes to the master branch, you might prefer merging over rebasing. | |
I used to be in a team responsible for merging sprint features into the master branch. This was a nightmare. Always. | |
Another dev taught me an excellent Git workflow that combines rebasing and merging when it’s time to commit changes to the master branch, and it has honestly made such a difference to my workflow. | |
With the rebasing and merging combo outlined below, merge issues are kept to a minimum because your local history will match master before the final merge into master. No headaches! (Or just mini ones!) |
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
1. Rebase Git workflow | |
When you’ve finished a feature on a local branch and it’s time to commit your changes to the master branch, you might prefer merging over rebasing. | |
I used to be in a team responsible for merging sprint features into the master branch. This was a nightmare. Always. | |
Another dev taught me an excellent Git workflow that combines rebasing and merging when it’s time to commit changes to the master branch, and it has honestly made such a difference to my workflow. | |
With the rebasing and merging combo outlined below, merge issues are kept to a minimum because your local history will match master before the final merge into master. No headaches! (Or just mini ones!) |
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.time.LocalTime; | |
import java.time.format.DateTimeFormatter; | |
import java.time.format.DateTimeFormatterBuilder; | |
import static java.time.temporal.ChronoField.HOUR_OF_DAY; | |
import static java.time.temporal.ChronoField.MINUTE_OF_HOUR; | |
import static java.time.temporal.ChronoField.SECOND_OF_MINUTE; | |
static String currentFormattedTime() { | |
DateTimeFormatter timeFormatter = new DateTimeFormatterBuilder() | |
.appendValue(HOUR_OF_DAY, 2) |
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
// cores can be four in my case because i have an i7 hyperthread with four physical cores. | |
// numThreadsToRun can be as much as you can. I usually run this code with this value set up to 10000000 | |
// bigger the number, more time you need to finish the main task. | |
ExecutorService executor = Executors.newFixedThreadPool(cores * 2); | |
for (int i = 1; i <= numThreadsToRun; i++) { | |
if (isEmExp) { | |
Future<?> future = executor.submit(Utils.showSorteredValuesReversedOrder(pathToEM)); | |
future.get(5, TimeUnit.SECONDS); |
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
# quick way to change previous JAVA_HOME to jdk 8 version. | |
set -x JAVA_HOME (/usr/libexec/java_home -v 1.8) | |
function setjdk | |
if test -n "$JAVA_HOME" | |
removeFromPath "$JAVA_HOME/bin" | |
end | |
set -gx JAVA_HOME (/usr/libexec/java_home -v $argv[1]) | |
set -gx PATH $JAVA_HOME/bin $PATH | |
end |
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
I am getting this exception when i try to load the model: | |
java.lang.IllegalStateException: Illegal set of indices for array: need at least 1 point/interval/all/specified indices for rank 1 array ([9472]), got indices [Point(0), Interval(b=0,e=64,s=1)] | |
at org.nd4j.base.Preconditions.throwStateEx(Preconditions.java:641) | |
at org.nd4j.base.Preconditions.checkState(Preconditions.java:412) | |
at org.nd4j.linalg.api.ndarray.BaseNDArray.get(BaseNDArray.java:4910) | |
at org.deeplearning4j.nn.layers.BaseLayer.setParams(BaseLayer.java:206) | |
at org.deeplearning4j.nn.layers.convolution.ConvolutionLayer.setParams(ConvolutionLayer.java:483) | |
at com.aironman.demoFaceRecognition.service.FaceNetSmallV2Helper.loadWeights(FaceNetSmallV2Helper.java:142) |
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 install the latest stable version: | |
brew install scala --with-docs | |
# to install scala-2.10.0-RC3: | |
brew install https://raw.github.com/gist/4118557/scala.rb --with-docs | |
# to switch versions (from https://github.com/mxcl/homebrew/wiki/External-Commands): | |
brew switch scala 2.9.2 | |
brew switch scala 2.10.0-RC3 |