Skip to content

Instantly share code, notes, and snippets.

View EricCousineau-TRI's full-sized avatar

Eric Cousineau EricCousineau-TRI

View GitHub Profile
#!/bin/bash
set -e -u
# @brief Generate a set of tests from a given Bazel project based on what files
# have changed on the current git diff
# TODO(eric.cousineau) Find if there is a simpler mechanism to query the set of
# targets dependent on a list of files.
# @ref https://bazel.build/versions/master/docs/query-how-to.html
diff --git a/eigen_scratch/matrix_hstack_vstack_xpr_tpl_cxx11.cc b/eigen_scratch/matrix_hstack_vstack_xpr_tpl_cxx11.cc
index 18ec6ea..d390ebb 100644
--- a/eigen_scratch/matrix_hstack_vstack_xpr_tpl_cxx11.cc
+++ b/eigen_scratch/matrix_hstack_vstack_xpr_tpl_cxx11.cc
@@ -1,9 +1,33 @@
/*
-Purpose: sAme as the other matrix_stack* attempts, but this time, use tuples and explicit calling out of
+Purpose: Same as the other matrix_stack* attempts, but this time, use tuples and explicit calling out of
hstack() and vstack() for concatenation.
@EricCousineau-TRI
EricCousineau-TRI / sample_command_completion.sh
Created May 20, 2017 19:40
Show a progress bar when waiting for autocomplete.
#!/bin/bash
sample-command() {
echo "arguments: $@"
}
__sample-command() {
# Simulate loading for the first time
if [[ -z ${sample_command_init-} ]]; then
echo -e "\n"
cat <<EOF
$ ldd external/director/bin/drake-visualizer | sed "s#$PWD#\${PWD}#g"
linux-vdso.so.1 => (0x00007ffc0c7f6000)
libddApp.so => ${PWD}/external/director/lib/libddApp.so (0x00007fab5d379000)
libctkPythonConsole.so.1.0 => ${PWD}/external/director/lib/libctkPythonConsole.so.1.0 (0x00007fab5d159000)
libPythonQt.so => ${PWD}/external/director/lib/libPythonQt.so (0x00007fab5bfa5000)
libQt5Widgets.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 (0x00007fab5b8d3000)
libQt5Core.so.5 => /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 (0x00007fab5b3fd000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fab5b07b000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fab5ae64000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fab5aa9a000)
#include <iostream>
#include <Eigen/Dense>
using namespace std;
using namespace Eigen;
int main() {
MatrixXd A(2, 2);
A << 1, 2, 3, 4;
cout << A << endl << endl;
+ git log -n 1
commit 9feb66fd1b4875d3f06a832084fc7093024c6b14
Author: Jamie Snape <[email protected]>
Date: Tue Sep 5 10:27:00 2017 -0400
Synchronize system dependencies using by Linux and Mac VTK packages
+ git status
On branch vtk-system-dependencies
Your branch is up-to-date with 'jamiesnape/vtk-system-dependencies'.
nothing to commit, working directory clean
@EricCousineau-TRI
EricCousineau-TRI / gist:11ae9941436a61cf9f2b1c20cfbd8986
Created September 7, 2017 15:52
bazel_run-env-rgbd_camera_test
declare -x BAZEL_REAL="/usr/bin/bazel-real"
declare -x DISPLAY=":1"
declare -x GUROBI_PATH="/home/eacousineau/local/opt/gurobi702/linux64"
declare -x HOME="/home/eacousineau"
declare -x OLDPWD
declare -x PATH="/usr/local/bin:/usr/bin:/bin"
declare -x PWD="/home/eacousineau/.cache/bazel/_bazel_eacousineau/78f86b7b95b0ef2252566e27f0e9f796/execroot/master/bazel-out/clang-3.9-linux-opt/bin/drake/systems/sensors/rgbd_camera_test.runfiles/drake"
declare -x SHELL="/bin/bash"
declare -x SHLVL="2"
declare -x TERM="screen"
$ bazel run //drake/systems/sensors:rgbd_camera_test
...
Fri Sep 8 09:30:06 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 375.66 Driver Version: 375.66 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
|===============================+======================+======================|
| 0 TITAN X (Pascal) Off | 0000:03:00.0 On | N/A |
Target //python/bindings/pymodule/global_check:global_check_fail_test up-to-date:
bazel-bin/python/bindings/pymodule/global_check/global_check_fail_test
____Elapsed time: 4.861s, Critical Path: 3.45s
____Running command line: bazel-bin/python/bindings/pymodule/global_check/global_check_fail_test
dyld: warning, LC_RPATH $ORIGIN/../../../../_solib_darwin/ in /private/var/tmp/_bazel_eacousineau/ce74db83cc8c0c51e5d78a0122afde7b/execroot/repro/bazel-out/osx-opt/bin/python/bindings/pymodule/global_check/global_check_fail_test.runfiles/repro/python/bindings/pymodule/global_check/_consumer_1.so being ignored in restricted program because it is a relative path
Fatal Python error: PyThreadState_Get: no current thread
@EricCousineau-TRI
EricCousineau-TRI / direct.bin
Created October 30, 2017 23:02
Testing bazel_external_data
Content for 'direct.bin'