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
#!/usr/bin/env bash | |
# Throws error in case stdout keeps quiet for a certain time, specified by TIMEOUT | |
# origin: https://stackoverflow.com/questions/43665318/how-to-get-supervisord-to-restart-hung-workers | |
set -e | |
TIMEOUT=60 | |
LAST_CHANGED="$(date +%s)" |
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
#!/usr/bin/env bash | |
# Use this script to test if a given TCP host/port are available | |
cmdname=$(basename $0) | |
echoerr() { if [[ $QUIET -ne 1 ]]; then echo "$@" 1>&2; fi } | |
usage() | |
{ | |
cat << USAGE >&2 |
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
diff --git a/nmf.py b/nmf.py | |
index dda116c..1cf6bd8 100644 | |
--- a/nmf.py | |
+++ b/nmf.py | |
@@ -74,7 +74,7 @@ def _safe_compute_error(X, W, H): | |
norm_X = np.dot(X.data, X.data) | |
norm_WH = trace_dot(np.dot(np.dot(W.T, W), H), H) | |
cross_prod = trace_dot((X * H.T), W) | |
- error = sqrt(norm_X + norm_WH - 2. * cross_prod) | |
+ error = sqrt(np.max([0, norm_X + norm_WH - 2. * cross_prod])) |
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
diff --git a/usr/local/bin/pip b/usr/local/bin/pip | |
index 02390f0..af1518c 100644 | |
--- a/usr/local/bin/pip | |
+++ b/usr/local/bin/pip | |
@@ -1,4 +1,4 @@ | |
-#!/usr/bin/python2 | |
+#!/usr/local/bin/python | |
# -*- coding: utf-8 -*- | |
import re |
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
diff --git a/tom_lib/nlp/topic_model.py b/tom_lib/nlp/topic_model.py | |
index 0abd98b..02f7088 100644 | |
--- a/tom_lib/nlp/topic_model.py | |
+++ b/tom_lib/nlp/topic_model.py | |
@@ -6,7 +6,7 @@ import tom_lib.stats | |
from scipy import spatial, cluster | |
from scipy.sparse import coo_matrix | |
from sklearn.decomposition import NMF, LatentDirichletAllocation as LDA | |
-import lda | |
+from sklearn import lda |
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
diff --git a/parser_trainer_test.sh b/parser_trainer_test.sh | |
index ba2a6e7..977c89c 100644 | |
--- a/parser_trainer_test.sh | |
+++ b/parser_trainer_test.sh | |
@@ -22,7 +22,7 @@ | |
set -eux | |
-BINDIR=$TEST_SRCDIR/syntaxnet | |
+BINDIR=$TEST_SRCDIR/$TEST_WORKSPACE/syntaxnet |
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
diff --git a/workspace.bzl b/workspace.bzl | |
index 13f29c1..d0cb97a 100644 | |
--- a/workspace.bzl | |
+++ b/workspace.bzl | |
@@ -76,7 +76,7 @@ def tf_workspace(path_prefix = "", tf_repo_name = ""): | |
native.new_http_archive( | |
name = "gmock_archive", | |
- url = "https://archive.openswitch.net/gmock-1.7.0.zip", | |
+ url = "http://pkgs.fedoraproject.org/repo/pkgs/gmock/gmock-1.7.0.zip/073b984d8798ea1594f5e44d85b20d66/gmock-1.7.0.zip", |
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
# call "rabbitmqctl stop" when exiting | |
trap "{ echo Stopping rabbitmq; rabbitmqctl stop; exit 0; }" TERM | |
echo Starting rabbitmq | |
rabbitmq-server & | |
# from docs: When Bash receives a signal for which a | |
# trap has been set while waiting for a command to | |
# complete, the trap will not be executed until the | |
# command completes. |
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
# Creado para solucionar una serie de errores de tweepy | |
# mover a "/usr/local/lib/python3.4/site-packages/tweepy/streaming.py" después de instalar tweepy | |
# Tweepy | |
# Copyright 2009-2010 Joshua Roesslein | |
# See LICENSE for details. | |
# Appengine users: https://developers.google.com/appengine/docs/python/sockets/#making_httplib_use_sockets | |
from __future__ import absolute_import, print_function |
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
''' Remember changing this file name before running bokeh | |
The resources module provides the Resources class for easily configuring | |
how BokehJS code and CSS resources should be located, loaded, and embedded in | |
Bokeh documents. | |
Also provides some pre-configured Resources objects. | |
Attributes: | |
CDN : load minified BokehJS from CDN |
NewerOlder