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
@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}, |
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
#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)); |
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
@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}, |
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
while True: | |
user_input = raw_input("Type something: ") | |
print ' '.join(["#" + w.lower().capitalize() for w in user_input.split()]) + '\n' |
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 pip | |
from subprocess import call | |
for dist in pip.get_installed_distributions(): | |
call("sudo -H pip install --upgrade " + dist.project_name, shell=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
# 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 |
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
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() |
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
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() |
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
# 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])) |
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
du -h <dir> | grep '[0-9\.]\+G' | |
# e.g.: | |
# du -h /home/peterparker | grep '[0-9\.]\+G' |
OlderNewer