rsync -auzPhv --delete --exclude-from=rsync_exclude.txt SOURCE/ DEST/ -n-a->--archive; recursively sync, preserving symbolic links and all file metadata-u->--update; skip files that are newer on the receiver; sometimes this is inaccurate (due to Git, I think...)-z->--compress; compression-P->--progress+--partial; show progress bar and resume interupted transfers-h->--human-readable; human-readable format-v->--verbose; verbose output
-n->--dry-run; dry run; use this to test, and then remove to actually execute the sync
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
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
The answer is the number of inversions in the array, which is the number of pairs i,j such that i < j and a[i] > a[j]. Counting this is a fairly classical problem with many solutions such as using data structures such as Balanced Trees or Binary Indexed Trees. Another particularly elegant solution involves modifying merge sort to count the number of inversions when merging the two sorted halves in the algorithm.