Want to create a Gist from your editor, the command line, or the Services menu? Here's how.
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 breeze.linalg._ | |
import breeze.stats | |
import breeze.numerics._ | |
val dataFile = new File(???) | |
val userItems: Array[SparseVector[Double]] = loaderUserItemsWithRatings(dataFile, """[ ,:]""".r) | |
val itemUsers: Array[SparseVector[Double]] = transpose(userItems) map { vec => normalize(vec, 2) } | |
// weights | |
val N = DenseVector.fill[Double](itemIndex.size)(userIndex.size) // vector where total numbers of users is repeated |
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
<?php | |
use Atrox\Matcher; | |
use Atrox\Curl; | |
use Atrox\Async; | |
$userListMatcher = Matcher::multi('//table[@class="ui-table-list"]//tr', (object) [ | |
'url' => Matcher::single('td/a/@href')->map(function ($x) { return "http://www.csfd.cz$x"; }), | |
'points' => Matcher::single('td[3]')->asInt(), | |
'ratings' => Matcher::single('td[4]')->asInt(), |
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
http://www.100reklam.cz | |
http://10hvezd.cz | |
http://12plus12.cz | |
http://www.17november1989.sk | |
http://1bazar.sk | |
http://www.1cfc.cz | |
http://1cornhill.com | |
http://1site.cz | |
http://www.1weby.cz | |
http://24keys.cz |