jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
| #!/bin/bash | |
| ## This gist contains step by step instructions to install cuda v9.0 and cudnn 7.3 in ubuntu 18.04 | |
| ### steps #### | |
| # verify the system has a cuda-capable gpu | |
| # download and install the nvidia cuda toolkit and cudnn | |
| # setup environmental variables | |
| # verify the installation | |
| ### |
jq will sort (-S) the whole file (.) and compare STDOUT (<()) with diff
diff <(jq -S . A.json) <(jq -S . B.json)
| # Convert SE-ResNet-50 from Caffe to Keras | |
| # Using the model from https://github.com/shicai/SENet-Caffe | |
| import os | |
| import numpy as np | |
| # The caffe module needs to be on the Python path; we'll add it here explicitly. | |
| import sys | |
| caffe_root = "/path/to/caffe" | |
| sys.path.insert(0, caffe_root + "python") |
This is the Keras model of VGG-Face.
It has been obtained through the following method:
Details about the network architecture can be found in the following paper:
| #! /bin/bash | |
| set -e | |
| g++ -o test_offscreen.o -c test_offscreen.cpp -I$PYTHONHPC/include/vtk-6.0 | |
| g++ -o test_offscreen test_offscreen.o $PYTHONHPC/lib/libvtk*.so | |
| LD_LIBRARY_PATH=$PYTHONHPC/lib/ ./test_offscreen |
| from datetime import datetime, date | |
| from sqlalchemy.orm.query import Query | |
| def render_query(statement, bind=None): | |
| """ | |
| Generate an SQL expression string with bound parameters rendered inline | |
| for the given SQLAlchemy statement. | |
| WARNING: This method of escaping is insecure, incomplete, and for debugging | |
| purposes only. Executing SQL statements with inline-rendered user values is |
| #!/usr/bin/env python | |
| import numpy | |
| import sys | |
| import timeit | |
| try: | |
| import numpy.core._dotblas | |
| print 'FAST BLAS' | |
| except ImportError: | |
| print 'slow blas' |
| var LiveCollection = (function (_, Backbone) { | |
| var Collection = Backbone.Collection; | |
| // Define a Backbone Collection handling the details of running a "live" | |
| // collection. Live collections are expected to handle fetching their own | |
| // data, rather than being composed from separate models. | |
| // They typically add new models instead of resetting the collection. | |
| // A custom add comparison makes sure that duplicate models are not | |
| // added. End result: only new elements will be added, instead | |
| // of redrawing the whole collection. | |
| // |