Base Version

1) change info db connections in config.php
2) change info base in js/pitagoraInclude.js
3) change appId in user_page.php from FB App Pitagora Airport Local Network [local or Lebowski]

App

1) to filter all the users in the last three hours: change checkLogin variable to true in user_page.php
2) to change from three to custom hours change in isLoggedIn in user_page.php
3) to change gate close time, change opening variable in user_page.php
4) airport and airline codes are configurable in xml/airport-codes.xml and xml/airline-codes.xml
5) daily crontab to calculate affinity between cities on build_correl.php, data are saved in correl.txt
6) local experts are computed in query.php, search "localExperts"

Version of FB API: 2.0


Recommender Version


Update on retails calls needed (copy from Base Version)

Servlet

1) Install Maven Servlet for recommending Neighborhood of users (Pitagora_sn folder in Dropbox)
2) Create new Dynamic Project > convert to Maven > copy java file [there is an error to be solved in guava lib]
3) Credentials to access DB must be changed in main java file

Recommendations are shown only in Interests tab for Leisure>Meet People


Cluster

Access:

Markone 192.168.0.210
usr: pitagore_sn
pwd: p1t4g0r3!

crontab -l [ogni 5 re qsub preferences.sh] check in qstat

to stop crontab > crontab -e to modify e commentare riga con #

to sto a job qdel and id job in qstat


PREFERENCES SH

#!/bin/bash
#$ -o output.$JOB_ID   // output file for all executed actions
#$ -e error.$JOB_ID // error file
#$ -pe hadoop 8 // task allocati - nodi
#$ -cwd // current working directory
#$ -l h_rt=24:00:00 // execution time max

[...]

ELEMENTS=${#CATEGORIES[@]} //# to find in bash number of elements, @ indicates all types

[...]

wget -O // slect file name

sed 1d // remove first line... spaces added by the system

[...]

php -e generate_sql.php -f $category > /home/pitagore_sn/output/${category}_estimated.sql
// call generate_sql.php, pass the category variable and save sql file per cat



/*

per accedere a lebowski da cluster e' necessaria una chiave, vedia email di Tiberio [Ciao,
prova a collegarti ad una macchina slave usando ssh. Per esempio per connettersi a compute-0-0:

ssh compute-0-0

non dovrebbe chiedere password. Una volta fatto l’accesso, verifica che il comando sshpass (l’esatto comando che utilizzate) funzioni da linea di comando.
Considera che le macchine interne sono in una sottorete con accesso ristretto all’esterno.

Se non funziona, l’alternativa è di generare chiavi di autenticazione ssh, che ti permettono di non mettere la password.
Qui trovi delle istruzioni di esempio:
http://guide.debianizzati.org/index.php/Ssh_e_autenticazione_tramite_chiavi

ciao,
Tiberio]

$ ssh-keygen 
$ ssh-add ~/.ssh/id_rsa
$ ssh-copy-id -i ~/.ssh/id_rsa.pub pitagora_sn@lebowski.micc.unifi.it

*/


TO FIX

1) two users who has one or more like in common using only euclidean distance [users for which the cooccurrence matrix has not yet been computed on cluster] receive each one a recommendation of one another as first result
2) recommendations don't take in to account the three hours for logged in users, but work on all the dataset