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
package ir.task8 | |
import ir.utils.Files | |
import scala.util.{Failure, Success} | |
case class Doc(id: String) | |
case class Query(actual: List[Doc], predicted: Array[Doc]) | |
class Metrics(val k: Int) { |
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
{ | |
"response": { | |
"count": 121, | |
"items": [ | |
{ | |
"id": 4497019, | |
"from_id": 453762, | |
"date": 1460317179, | |
"text": "Навальный развалил союз!", | |
"likes": { |
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 cats.data.Validated.{invalid, valid} | |
import cats.std.all._ | |
import cats.syntax.cartesian._ | |
object Boot extends App { | |
val a = (valid[String, String]("event 1 ok") |@| // does not recognise `|@|` - applicative combine syntax | |
invalid[String, String]("event 2 failed!") |@| | |
invalid[String, String]("event 3 failed!")) map {_ + _ + _} | |
println(a) |
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
public class Client { | |
private static final int BUFFER_SIZE = 1056; | |
private Socket socket; | |
private PrintWriter outWriter; | |
private BufferedReader inReader; | |
public void PingPong() { | |
outWriter.write("ping"); | |
outWriter.flush(); |
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
<?xml version="1.0"?> | |
<methodCall> | |
<methodName>Robots.DeactivateAllAndLoad</methodName> | |
<params> | |
<param> | |
<value><string>ActiveRobot</string></value> | |
</param> | |
<param> | |
<value><string><?xml version = '1.0'?><methodCall><methodName>UI.LogWarning</methodName></methodCall></string></value> | |
</param> |
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
{ | |
"context": { | |
"4529156": "Надежду Савченко собирались обменять на «бойцов ГРУ» 22 мая, но «с российской стороны кто-то ушел в отпуск». Президент Украины Петр Порошенко рассказал о трех телефонных разговорах с Владимиром Путиным о возвращении военнослужащей: \\nhttp:\\/\\/www.rbc.ru\\/rbcfreenews\\/575183af9a7947ecd91661e1 ", | |
"4529037": "Ректор Горного университета в Санкт-Петербурге Владимир Литвиненко — глава избирательных штабов Владимира Путина — в прошлом году получил 277 млн рублей дохода. Это более 23 млн рублей в месяц или 3077 минимальных размеров оплаты труда, указ о повышении которых президент подписал вчера: http:\\/\\/www.rbc.ru\\/politics\\/02\\/06\\/2016\\/575030f99a7947f3cb7d3a4a ", | |
"4530748": "Три человека погибли, еще десять пострадали при серии нападений в Казахстане. Неизвестные напали на оружейный магазин, убили продавца, а затем совершили нападение на воинскую часть:\\nhttp:\\/\\/www.rbc.ru\\/politics\\/05\\/06\\/2016\\/5754256f9a794703aafd7392 ", | |
... | |
}, | |
"data": { | |
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
/* | |
Правила игры "Жизнь" | |
если потенциал клетки равен двум, то клетка сохраняет свое состояние; | |
если потенциал равен трем, то клетка оживает; | |
если потенциал меньше двух или больше трех, то клетка погибает. | |
*/ | |
#include <iostream> | |
#include <cstdlib> /* srand, rand */ | |
#include <iostream> |
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
/* | |
Правила игры "Жизнь" | |
если потенциал клетки равен двум, то клетка сохраняет свое состояние; | |
если потенциал равен трем, то клетка оживает; | |
если потенциал меньше двух или больше трех, то клетка погибает. | |
*/ | |
#include <iostream> | |
#include <time.h> | |
#include <stdlib.h> /* srand, rand */ |
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
/* Remove candidates that has support less than mininmum support */ | |
ItemSetList<cpu> &L_cur = L[iset_size]; | |
L_cur.current = L_cur.start; | |
while (L_cur.current != NULL) | |
{ | |
size_t itmSpp = L_cur.current->itemSet->support.get(); | |
if (itmSpp < imin_s) | |
{ | |
L_cur.removeCurrentNode(); | |
} |
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
package cas.web.pages.templates | |
import cas.utils.Files | |
import scala.xml.Elem | |
object Templates { | |
def page(pathToStatic: String)(menuElements: List[Elem])(content: Elem) = <html> | |
<head> { Files.readFile(pathToStatic) } </head> | |
<body> | |
{ headerMenu(menuElements) } |
OlderNewer