Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
#!/bin/sh | |
# | |
# Add a Google Analytics tag to static website files | |
# @see http://adambuchanan.me/post/26345221717/updating-google-analytics-code-on-many-static-pages | |
# Tested on MacOS 10.8.X | |
# | |
# Usage: | |
# Set the GA parameters below | |
# Execute the script from the top-level of the static site | |
# |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math
These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.
Check out the [model zoo documentation](http://caffe.berkeleyvision.org/model_zoo.html) for details. | |
To acquire a model: | |
1. download the model gist by `./scripts/download_model_from_gist.sh <gist_id> <dirname>` to load the model metadata, architecture, solver configuration, and so on. (`<dirname>` is optional and defaults to caffe/models). | |
2. download the model weights by `./scripts/download_model_binary.py <model_dir>` where `<model_dir>` is the gist directory from the first step. | |
or visit the [model zoo documentation](http://caffe.berkeleyvision.org/model_zoo.html) for complete instructions. | |
### Berkeley-trained models |
## | |
# Connecting to database - https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-connect-and-query-sqlcmd | |
## | |
# how to connect? | |
sqlcmd -S localhost -U SA -P 'vagrant@2017' | |
# how to select all database names? | |
SELECT Name from sys.Databases; | |
GO |
javascript: | |
document.querySelectorAll('.load-diff-button').forEach(node => node.click()) |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost
. This is primarily set by the header:
Access-Control-Allow-Origin
This gist (based on a blog post at byai.io) documents how to set up TensorFlow 1.6 with (e)GPU support without the need to disable SIP. Following the original gist got me a saystem in which training TF on eGPU was successful, but there were various visual glitches due to the newer / less stable version of the driver.
As pointed out by ronchigram, many people are having issues with newer NVIDIA drivers, so it's worth using the nvidia-update script by Benjamin Dobell that installs the latest stable NVIDIA web driver, and if necessary patches it to run on your system. We also don't need to disable SIP when using nvidia-update.
I have als
#Install XQuartz and Docker | |
brew cask install xquartz | |
brew cask install docker | |
# Open XQuartz | |
# In the XQuartz preferences, go to the “Security” tab | |
# Make sure you’ve got “Allow connections from network clients” ticked | |
open -a XQuartz | |
# Setup ENV |