Skip to content

Instantly share code, notes, and snippets.

Christian Fanli Ramsey christianramsey

Block or report user

Report or block christianramsey

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Protobuf for Bazel and TensorFlow on Mac
./autogen.sh && ./configure && make
brew install libtool
brew link libtool
./autogen.sh && ./configure && make
make check
sudo make install
which protoc
@christianramsey
christianramsey / TensorFlow GPU CUDA 10 Ubuntu 18.04
Last active Feb 18, 2019
Install TensorFlow GPU for Ubuntu 18.04 - the easy way
View TensorFlow GPU CUDA 10 Ubuntu 18.04
# Add NVIDIA package repository
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt install ./cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
wget http://developer.download.nvidia.com/compute/machine-learning/repos/https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64/nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt install ./nvidia-machine-learning-repo-ubuntu1804_1.0.0-1_amd64.deb
sudo apt update
# Install CUDA and tools. Include optional NCCL 2.x
sudo apt install cuda10.0 cuda-cublas-10-0 cuda-cufft-10-0 cuda-curand-10-0 \
View bucketise columns in tensorflow
import numpy as np
import tensorflow as tf
import tensorflow.contrib.layers as tflayers
x = tflayers.real_valued_column(np.linspace(0, 100, 101))
buckets = np.linspace(0, 100, 5).tolist()
x2 = tflayers.bucketized_column(x, buckets)
print(x2)
View data.csv
id 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
AL 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
CA 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
@christianramsey
christianramsey / gist:5248396
Created Mar 26, 2013
Used this link to fix rails from not syncing with rvm's default ruby version
View gist:5248396
http://stjhimy.com/posts/10-five-quick-steps-to-set-up-rvm-with-rails-2-and-rails3
@christianramsey
christianramsey / gist:5247267
Created Mar 26, 2013
if brew install apple-gcc42 doesn't work try....
View gist:5247267
Try brew tap --repair homebrew/dupes and then try installing.
View gist:5245860
#!/bin/sh
# Just copy and paste the lines below (all at once, it won't work line by line!)
# MAKE SURE YOU ARE HAPPY WITH WHAT IT DOES FIRST! THERE IS NO WARRANTY!
function abort {
echo "$1"
exit 1
}
set -e
View gist:5126995
def create
debugger
@movie = Movie.create!(params[:movie])
flash[:notice] = "#{@movie.title} was successfully created."
redirect_to movies_path
end
// line 2 debugger to debug on save
@christianramsey
christianramsey / rubydebug
Created Mar 10, 2013
Getting ruby-debug19 to work
View rubydebug
1) From the root of the project run:
gem install ruby-debug19 -- --with-ruby-include="$rvm_path/src/$(rvm tools identifier)/"
2) Include in Gemfile
group :test, :development do
gem ‘ruby-debug19′, :require => ‘ruby-debug’
end
3) Create a .rdebugrc in your home directory
View gist:5092677
<div class="info_column" id="info_column1">
<ul>
<li>Design</li>
<li>Dev</li>
<li>Crazy</li>
</ul>
</div>
<div class="info_column" id="info_column2">
<ul>
<li>Designer</li>
You can’t perform that action at this time.