Skip to content

Instantly share code, notes, and snippets.

View grogy's full-sized avatar

Václav Makeš grogy

  • Contractor + consultant PHP ecosystem.
  • Czech Republic
View GitHub Profile
@defunkt
defunkt / clients.md
Created April 18, 2010 14:09
A list of Gist clients.

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

@MichalKalita
MichalKalita / Soupis webů s Nette Framework
Last active November 4, 2018 19:31
Update 29.4.2016: zkontrolováno cca 200 000 stránek, podle hlavičky "X-Powered-By"
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
@kaja47
kaja47 / csfd-crawler.php
Created March 12, 2014 01:06
Example crawler using Matcher and AsyncCurl
<?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(),
@kaja47
kaja47 / csfdsim.scala
Created December 30, 2014 04:58
How to compute similar movies from CSFD data in 10 minutes and find love of your life
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