This file contains 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 | |
/** | |
* @link http://www.yiiframework.com/ | |
* @copyright Copyright (c) 2008 Yii Software LLC | |
* @license http://www.yiiframework.com/license/ | |
*/ | |
namespace yii\db\mssql; | |
use yii\base\InvalidParamException; |
This file contains 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
//Speed up MongoDB Map Reduce, http://edgystuff.tumblr.com/post/54709368492 | |
//MongoDB as a pure in-memory, http://edgystuff.tumblr.com/post/49304254688 | |
db.notas.ensureIndex({c:1}); | |
//db.notas.ensureIndex({p:-1}); //6786ms | |
db.notas.ensureIndex({a:1}); | |
db.alunos.find().forEach(function(a){ db.notas.update({c:a._id,p:{$gte:a.p}},{$set:{v1:1}},{multi:true}) }); | |
db.grade.find().forEach(function(g){ db.notas.update({a:g.ca},{$set:{v2:1}},{multi:true}) }); |
This file contains 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
db.i2.aggregate( | |
{ $sort: { _id : 1} }, | |
{ $group: { _id: "$c" , | |
i : { $first : "$i" }, | |
m : { $first : "$m" }, | |
r : { $first : "$r" }, | |
j : { $first : "$j" }, | |
} }, | |
{ $out: 'i2_group' } | |
); |
This file contains 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
# db.projects.findOne(); | |
{ | |
"__v" : 0, | |
"_id" : ObjectId("53e10cd275dd421727dfc823"), | |
"collaberator_refs" : [ ], | |
"compiler" : "pdflatex", | |
"deletedByExternalDataSource" : false, | |
"deletedDocs" : [ ], | |
"description" : "", | |
"lastUpdated" : ISODate("2014-08-06T17:53:46.578Z"), |
This file contains 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
> db.docHistory.findOne(); | |
{ | |
"doc_id" : ObjectId("53e10cd475dd421727dfc825"), | |
"project_id" : ObjectId("53e10cd275dd421727dfc823"), | |
"op" : [ | |
{ | |
"p" : 36, | |
"d" : "The Hitchhiker's Guide to the Galaxy" | |
} | |
], |
This file contains 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
> db.users.findOne(); | |
{ | |
"__v" : 0, | |
"_id" : ObjectId("53e10cc175dd421727dfc821"), | |
"ace" : { | |
"pdfViewer" : "pdfjs", | |
"spellCheckLanguage" : "en", | |
"autoComplete" : true, | |
"fontSize" : 12, | |
"theme" : "textmate", |
This file contains 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 include('header.php'); ?> | |
<div class="jumbotron"> | |
<h1>Candidatos Stats</h1> | |
<p class="lead">Estatísticas dos Candidatos</br></p> | |
</div> | |
<?php | |
class Connect{ | |
protected $url_acesso = 'http://api.transparencia.org.br/api/v1/'; | |
protected $app_token = 'TzTnQhwxCWmY'; |
This file contains 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 | |
$topicoStr = file_get_contents("Topicos.txt"); | |
preg_match_all("/title\>([^\<]+)</", $topicoStr, $topicos); | |
$contRow = 0; | |
foreach ($topicos[1] as $topic) { | |
if (strlen(trim($topic))>0) { | |
$contRow++; $contDoc=0; |
This file contains 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
wget http://henrique.gemeos.org/download/trec_eval.8.1.tar.gz | |
wget http://henrique.gemeos.org/download/qrels.zip | |
unzip qrels.zip | |
tar -xvf trec_eval.8.1.tar.gz | |
cd trec_eval.8.1 | |
make | |
cp trec_eval ../ | |
./trec_eval -c -q qrels.txt result_henrique_manuela_SOLR.txt |
This file contains 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_logs.py --url=localhost/piwik 20120827_access.log --idsite=1 --force-lowercase-path --log-format-regex="(?P<ip>\S+) \S+ \S+ \[(?P<date>.*?) (?P<timezone>.*?)\] \"\S+ (?P<path>.*?) \S+\" \"\S+ (?P<user_agent>.*?) \S+\" \"\S+ .* \S+\" (?P<status>\S+) (?P<length>\S+) (?P<generation_time_micro>\S+)" |
OlderNewer