docker rmi $(docker images --filter "dangling=true" -q --no-trunc)
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.configure(2) do |config| | |
config.vm.box = "ubuntu/xenial64" | |
#config.vm.box = "bento/centos-7.2" | |
#config.vm.box_url = "https://atlas.hashicorp.com/bento/boxes/centos-7.2" | |
config.vm.network "forwarded_port", guest: 5000, host: 5000 | |
config.vm.synced_folder "scripts", "/home/vagrant/scripts" |
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
# Dockerfile to reproduce Issue 114 for TensorFlow Serving | |
# https://github.com/tensorflow/serving/issues/114 | |
# Base Dockerfile from: https://github.com/tensorflow/serving/blob/master/tensorflow_serving/tools/docker/Dockerfile.devel | |
# To demonstrate this, just build the container & then run it: | |
# $ docker build -t tfserv_114 . | |
# $ docker run -it tfserv_114 | |
FROM ubuntu:14.04 | |
RUN apt-get update && apt-get install -y \ |
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
while read p; do | |
wget $p | |
done < urls |
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
cd `brew --repository` | |
git reset --hard HEAD | |
brew update | |
Sometimes the above doesn't work. In that case, do | |
cd `brew --repository` | |
git reset --hard origin/master | |
brew update |
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
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
"os" | |
) | |
func main() { |
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
export MARKPATH=$HOME/.marks | |
function jump { | |
cd $MARKPATH/$1 2> /dev/null || echo "No such mark: $1" | |
} | |
function mark { | |
mkdir -p $MARKPATH; ln -s $(pwd) $MARKPATH/$1 | |
} | |
function unmark { | |
rm -i $MARKPATH/$1 | |
} |
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/python | |
import sys, os | |
import xml.etree.ElementTree as ET | |
from xml.etree.ElementTree import Element | |
namespace = "http://schemas.microsoft.com/developer/msbuild/2003" | |
def find_files_with_ext(extension): | |
return [f for f in os.listdir('.') if os.path.isfile(f) and os.path.splitext(f)[1] == extension] |
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/python | |
import sys, os, re | |
import getpass, getopt | |
import xml.etree.ElementTree as ET | |
pref_xcode4_loc = "/Applications/Xcode.app" | |
pref_xcode5_loc = "/Applications/Xcode5-DP.app" | |
pref_loc = "/Users/%s/Library/Preferences/XamarinStudio-4.0/MonoDevelopProperties.xml" % (getpass.getuser()) | |
pref_key = "MonoDevelop.MacDev.AppleSdkRoot" |
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
#!/bin/bash | |
sudo -H pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py2-none-any.whl --ignore-installed six | |
# Modified install command from: https://www.tensorflow.org/versions/master/get_started/os_setup.html | |
# See: https://github.com/pypa/pip/issues/3165 | |
# Because Apple has preinstalled the dependency Six that cannot be removed | |
# Some of the errors I experienced were the following: | |
# [Errno 1] Operation not permitted: '/tmp/pip-BriGIp-uninstall/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/_markerlib |