In this article, I will share some of my experience on installing NVIDIA driver and CUDA on Linux OS. Here I mainly use Ubuntu as example. Comments for CentOS/Fedora are also provided as much as I can.
This file contains hidden or 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
require(RCurl) | |
require(jsonlite) | |
myticker<-"FB" | |
url.histprice<-function(x){ return(paste0("http://globalquote.morningstar.com/globalcomponent/RealtimeHistoricalStockData.ashx?ticker=",x,"&showVol=true&dtype=his&f=d&curry=USD&range=1900-1-1|2014-10-10&isD=true&isS=true&hasF=true&ProdCode=DIRECT"))} | |
url.keyratios<-function(x){return(paste0("http://financials.morningstar.com/ajax/exportKR2CSV.html?t=",x))} | |
#Retrieve historical prices | |
json.histprice<-getURL(url.histprice(myticker)) | |
json.histprice<-sub("NaN","\"NA\"",json.histprice) |
This file contains hidden or 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
import cv2 | |
cap = cv2.VideoCapture(0) | |
cap.set(3, 640) # WIDTH | |
cap.set(4, 480) # HEIGHT | |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml") | |
eye_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_eye.xml") | |
while(True): |
This file contains hidden or 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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
This file contains hidden or 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/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import re | |
import time | |
import json | |
import logging | |
import requests |
This file contains hidden or 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
import csv | |
import requests | |
import bs4 | |
import argparse | |
# parser = argparse.ArgumentParser(description='Process a list of search terms.') | |
# parser.add_argument('terms', metavar='N', type=str, nargs='+', | |
# help='comma separated list of terms to search for') | |
# args = parser.parse_args() |
- Feature Learning
- Learning Feature Representations with K-means by Adam Coates and Andrew Y. Ng
- The devil is in the details: an evaluation of recent feature encoding methods by Chatfield et. al.
- Emergence of Object-Selective Features in Unsupervised Feature Learning by Coates, Ng
- Scaling Learning Algorithms towards AI Benjio & LeCun
- A Theory of Feature Learning by Brendan van Rooyen, Robert C. Williamson
- Deep Learning
- Dropout: A Simple Way to Prevent Neural Networks from Overfitting by Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever and Ruslan Salakhutdinov
- [Understanding
This file contains hidden or 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
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
import re | |
import sys | |
def currentCPI: | |
url = 'http://www.tradingeconomics.com/country-list/consumer-price-index-(cpi)' | |
r = requests.get(url) | |
soup = BeautifulSoup(r.text) |
This file contains hidden or 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
import requests | |
from bs4 import BeautifulSoup | |
import pandas as pd | |
import re | |
import sys | |
def globalValues: | |
url = 'http://www.starcapital.de/research/stockmarketvaluation?SortBy=Shiller_PE' | |
r = requests.get(url) | |
if r.status_code != 200: |