sudo apt-get update
sudo apt-get -y install software-properties-common
#!/bin/bash | |
# usage: | |
# first make the file executable | |
# ./word2vec-download300model.sh output-file | |
OUTPUT=$( wget --save-cookies cookies.txt --keep-session-cookies --no-check-certificate 'https://docs.google.com/uc?export=download&id=0B7XkCwpI5KDYNlNUTTlSS21pQmM' -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/Code: \1\n/p' ) | |
CODE=${OUTPUT##*Code: } | |
echo $CODE |
# -*- coding: utf-8 -*- | |
""" | |
Created on Sat May 3 10:21:21 2014 | |
@author: umb | |
""" | |
import numpy as np | |
class GMM: |
# http://www.nvidia.com/download/driverResults.aspx/117079/en-us | |
wget http://us.download.nvidia.com/tesla/375.51/nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb | |
sudo dpkg -i nvidia-driver-local-repo-ubuntu1604_375.51-1_amd64.deb | |
sudo apt-get update | |
sudo apt-get -y install cuda-drivers | |
echo "Reboot required." |
# Remove anything linked to nvidia | |
sudo apt-get remove --purge nvidia* | |
sudo apt-get autoremove | |
# Search for your driver | |
apt search nvidia | |
# Install Driver | |
# add ppa graphic driver repository | |
sudo apt-get install software-properties-common |
# coding: utf-8 | |
from __future__ import division | |
import struct | |
import sys | |
import gzip | |
FILE_NAME = "GoogleNews-vectors-negative300.bin.gz" # outputs GoogleNews-vectors-negative300.bin.gz.txt | |
MAX_VECTORS = 100000 # Top words to take | |
FLOAT_SIZE = 4 # 32bit float |
/* | |
Copyright (c) 2011 Andrei Mackenzie | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
import numpy | |
import random | |
from numpy import arange | |
#from classification import * | |
from sklearn import metrics | |
from sklearn.datasets import fetch_mldata | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.utils import shuffle | |
import time |
#!/usr/bin/env python3 | |
from PIL import Image | |
import numpy as np | |
import tensorflow as tf | |
import tensorflow_hub as hub | |
# smooth values from point a to point b. | |
STEPS = 100 | |
pt_a = np.random.normal(size=(512)) |
The paper presents some key lessons and "folk wisdom" that machine learning researchers and practitioners have learnt from experience and which are hard to find in textbooks.
All machine learning algorithms have three components: