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
# update git on ubuntu | |
sudo add-apt-repository ppa:git-core/ppa | |
sudo apt-get update | |
sudo apt-get install git |
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
Z = df.drop(['mpg', 'origin', 'car_name', 'model', 'horsepower'], axis=1) | |
preprocessing.MinMaxScaler().fit_transform(Z) | |
preprocessing.scale(Z) | |
preprocessing.StandardScaler().fit(Z) | |
# transform each feature | |
X[X.columns] = X.apply(lambda x: preprocessing.scale(x)) |
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
x.astype('category').cat.as_ordered() |
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
jupyter notebook --no-browser --ip 0.0.0.0 | |
sudo apt-get install libsm6 libxrender1 libfontconfig1 | |
https://github.com/radekosmulski/courses/tree/master/setup | |
https://github.com/fastai/fastai | |
https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/ | |
--------------------------------------------------------------------------------------- |
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
NUMPY | |
----- | |
array | |
arange | |
reshape | |
zeros | |
ones | |
linspace | |
dot | |
T |
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
# | |
# deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted | |
# deb cdrom:[Ubuntu-Server 16.04.1 LTS _Xenial Xerus_ - Release amd64 (20160719)]/ xenial main restricted | |
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to | |
# newer versions of the distribution. | |
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted | |
# deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted |
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 ( | |
"database/sql" | |
"encoding/json" | |
"fmt" | |
"io" | |
"log" | |
"net/http" | |
"time" |
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
# shows which processes are listening on which ports | |
sudo netstat -tulpn | |
# show disk space | |
df -h | |
# process list | |
ps -ef | |
ps -aux |
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
# ================================================================================================== # | |
OPTION 1: | |
just spin up a vm | |
add rails | |
clone repo | |
setup postgres db service | |
run | |
# ================================================================================================== # |
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
http://azure.github.io/azure-storage-ruby/ | |
gem 'azure-storage' | |
Azure::Storage.setup(:storage_account_name => '___', :storage_access_key => '___') | |
blobs = Azure::Storage::Blob::BlobService.new | |
content = ::File.open('test.jpg', 'rb') { |file| file.read } | |
blobs.create_block_blob('my-container', 'test.jpg', content) |