Version: 2.1.1
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev
@inproceedings{Lin:2013:ACA:2484028.2484035, | |
author = {Lin, Jovian and Sugiyama, Kazunari and Kan, Min-Yen and Chua, Tat-Seng}, | |
title = {Addressing cold-start in app recommendation: latent user models constructed from twitter followers}, | |
booktitle = {Proceedings of the 36th international ACM SIGIR conference on Research and development in information retrieval}, | |
series = {SIGIR '13}, | |
year = {2013}, | |
isbn = {978-1-4503-2034-4}, | |
location = {Dublin, Ireland}, | |
pages = {283--292}, | |
numpages = {10}, |
#include <iostream> | |
#include <string> | |
#include <chrono> | |
#include <thread> | |
#include <cstdlib> | |
const int width = 158; // Width of terminal window | |
const int flipsPerLine = 5; // No. of columns changed per line | |
const int millisecondsOfSleep = 50; // Delay between lines in millisecond | |
int main() { | |
srand(time_t(NULL)); |
@inproceedings{Lin:2014:NIM:2600428.2609560, | |
author = {Lin, Jovian and Sugiyama, Kazunari and Kan, Min-Yen and Chua, Tat-Seng}, | |
title = {New and Improved: Modeling Versions to Improve App Recommendation}, | |
booktitle = {Proceedings of the 37th International ACM SIGIR Conference on Research \&\#38; Development in Information Retrieval}, | |
series = {SIGIR '14}, | |
year = {2014}, | |
isbn = {978-1-4503-2257-7}, | |
location = {Gold Coast, Queensland, Australia}, | |
pages = {647--656}, | |
numpages = {10}, |
while True: | |
user_input = raw_input("Type something: ") | |
print ' '.join(["#" + w.lower().capitalize() for w in user_input.split()]) + '\n' |
import pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("sudo -H pip install --upgrade " + dist.project_name, shell=True) |
# Include `sys.dont_write_bytecode = True` after `import sys`, | |
# if you don't want .pyc files to be produced | |
import sys | |
sys.dont_write_bytecode = True |
from tensorflow.python.client import device_lib | |
def get_available_gpus(): | |
local_device_protos = device_lib.list_local_devices() | |
return [x.name for x in local_device_protos if x.device_type == 'GPU'] | |
get_available_gpus() |
from subprocess import Popen, PIPE, STDOUT | |
def run(cmd): | |
p = Popen(cmd, shell=True, stdin=PIPE, stdout=PIPE, stderr=STDOUT, close_fds=True) | |
return p.stdout.read() |
# Snippet for identifying the best classifier from svm, per, KNN based on their respective (accuracy) scores. | |
idx = np.argmax([svm_accuracy, per_accuracy, knn_accuracy]) | |
classifiers = {0: 'SVM', 1: 'Perceptron', 2: 'KNN'} | |
print('Best classifier is {}'.format(classifiers[idx])) |