found data

ковш

Name: "green_fairytale"  
Regexps: "^(?:алиса )?расскажи (?:пожалуйста )?сказку про любовь(?: пожалуйста)?$"  
Responses { 
Voice: "==Ехал== ==однажды== кофш ==по== ==горам==, sil<[500]> нужно было ему раскопать яму для постройки нефтяной вышки. Вдруг видит - орел сидит. Ты чего тут сидишь? - спрашивает кофш. Охраняю, - говорит орел. sil<[500]> А что охраняешь? Да сам не знаю. 200 лет назад посадил меня сюда один мудрец и велел охранять. sil<[500]> У тебя же крылья, наверное, затекли, - говорит кофш, - давай хоть одним глазком глянем, что ты столько лет охраняешь. Согласился орел, кофш начал копать, и вдруг оттуда как <[accented]> полетели искры. И увидели они сундук невероятной красоты. Клюнул орел сундук в замок, sil<[500]> он и отвалился. Открыли кофш с орлом сундук, а в нем доброта лежит, горкой насыпана. А еще вежливость и одинокое слово \"люблю\". А где второе \"люблю\"? - растерялся кофш. А <[accented]> вот оно, - говорит орел. - Люблю тебя за то, что ты меня освободил! С тех пор жили они счастливо! sil<[500]> Все говорят - странная пара, sil<[500]> но чего только в мире не бывает."

2014

Tags: "year_2014"  
Phrases {  
Text: "==2014== год стал самым жарким за всю историю метеонаблюдений. А ещё вышло много отличных альбомов, включу композицию из одного из них."  
}  
Phrases {  
Text: "Сейчас прозвучит композиция из альбома ==2014== года. А ещё в том году на пике популярности был Ice Bucket Challenge."  
}  
Phrases {  
Text: "Включаю трек из альбома ==2014== года. Главным юбиляром в нём был Шекспир, 450 лет."

news_whitelist

Conditions {  
Tag: "==news_whitelist=="  
Check {  
# Country codes from https://geoadmin.yandex-team.ru/  
# Россия, Беларусь, Казахстан, Узбекистан  
Expression: "UserLocation.UserCountry == \"\" || "  
"UserLocation.UserCountry == 225 || "  
"UserLocation.UserCountry == 149 || "  
"UserLocation.UserCountry == 159 || "  
"UserLocation.UserCountry == 171"  
}

useless fast data

UselessFastData: "TSimpleStupidSelfSufficientScenario is useless"

conditions war

Conditions {  
Tag: "==war=="  
Check {  
# update according to the situation  
Expression: "0"  
}  
}

ukraine with crimea included

* WARN: as a result, we are unable to map set of edges belonging to a single ad  
* into a set of faces. There is no "face" object for  
* ==Ukraine== with ==Crimea== included (topologically it's the same connected space)

crimea belongs to different countries

TEST_F (BuildAddressComponents, givenExplicitPOVRegion_usesIt)  
{  
EXPECT_EQ (toString(buildAddressComponents(en_US, object(CRIMEA_ALUSHTA_NABEREZHNAYA))),  
"UA : country: ==Ukraine==; province: Crimea; locality: Alushta; street: Naberezhnaya"  
);  
EXPECT_EQ (toString(buildAddressComponents(locale::Region::Ru, en_US, object(CRIMEA_ALUSHTA_NABEREZHNAYA))),  
"RU : country: ==Russia==; (province: Крымский федеральный округ); province: Crimea; locality: Alushta; street: Naberezhnaya"  
);  
}

crimea and minsk and part of ukraine - small test package

$(package-name): DESC = Small fixed graph for testing \  
containing Moscow, Moscow region, \  
St.Petersburg, Minsk, ==Crimea== \  
and part of Ukraine.

worried_about_war - neutral language

worried_about_war:  
nlg:  
- Я тоже переживаю. Любая война это ужасно.  
- Я вас понимаю.  
- Будем надеяться, что война скоро закончится.  
- Я очень надеюсь, скоро все договорятся и наступит мир. Мне все это не нравится.  
- Переживать в этой ситуации - нормально. Главное, не терять голову.  
nlu:  
- нас волнует война в украине  
- меня волнует война  
- меня волнует война на украине  
- меня бесит война  
- я волнуюсь из-за войны  
- я переживаю из-за войн

management of disputed territories - is_recognized_by, is_not_recognized_by

-- Serbia-Kosovo border as disputed  
(3, 2, ['RS'], [], ['FR', 'TR']),  
(2, 2, ['RS'], [], ['FR', 'TR']),  
  
-- Serbia-Kosovo border as not disputed  
(3, 1, ['RS', 'XK'], ['FR'], []),  
(2, 1, ['RS', 'XK'], ['FR'], []),  
(3, 1, ['RS', 'XK'], ['TR'], []),  
(2, 1, ['RS', 'XK'], ['TR'], []);

..

size_t adPopulationQuality(size_t populationValue)  
{  
static std::unordered_map<size_t, size_t> qualityMap = {  
{0, POPULATION_QUALITY_INVALID},  
{400, POPULATION_QUALITY_INVALID},  
{8000, POPULATION_QUALITY_INVALID},  
{2250000, POPULATION_QUALITY_INVALID},  
{2000, POPULATION_QUALITY_APPROXIMATED},  
{4000, POPULATION_QUALITY_APPROXIMATED},  
{30000, POPULATION_QUALITY_APPROXIMATED},  
{40000, POPULATION_QUALITY_APPROXIMATED},  
{60000, POPULATION_QUALITY_APPROXIMATED},  
{200000, POPULATION_QUALITY_APPROXIMATED},  
{700000, POPULATION_QUALITY_APPROXIMATED},  
};  
if (qualityMap.count(populationValue)) {  
return qualityMap[populationValue];  
}  
if (populationValue % 100 == 0) {  
return POPULATION_QUALITY_DOUBTFUL;  
}  
return POPULATION_QUALITY_GOOD;  
}

quantification

POPULATION_QUALITY_DOUBTFUL - “That’s not true for ==disputed== ==cities==, so we fix them here”

// That's not true for ==disputed== ==cities==, so we fix them here.  
// ex. Tskhinvali, Sukhumi  
void fixDisputedCities(std::vector<MatchResult>& matches, const InputAdExtraElements& inputElements)  
{  
std::set<int64_t> disputedIds;  
for (const auto& element: inputElements) {  
if (element.disputed) {  
disputedIds.insert(element.adId);  
}  
}

Ambiguous recognised territory for some diplomatic recognition subject”

if (isGeneral) {  
REQUIRE(twinData.generalId == id,  
"Try insert disputed territory as general but it's mentioned early in specialized hierarchy");  
} else {  
REQUIRE(twinData.generalId == generalId,  
"Try insert disputed territory as specialized but it's mentioned early with other generalId");  
}  
REQUIRE(!twinData.representativeMap.contains(subject) || twinData.representativeMap.at(subject) == id,  
"Ambiguous recognised territory for some diplomatic recognition subject");

“Disputed border

msgid "disputed-boundary"  
msgstr "Disputed border"

…disputed territories. Accepted values:‘RU’, ‘UA’, ‘UN’

* The quality level affects how accurately curves are represented, as well as the volume of the data file.  
* @param {String} [options.disputedBorders] Two-letter code of the country to use as the official reference for determining the administrative subordination  
* of disputed territories. Accepted values: '==RU==', '==UA==', '==UN=='. By default, it coincides with the country code that is specified when loading the API.  
* Unsupported country codes are reset to ==RU==. For the region '001' (borders of countries),  
* the code '==UN==' is supported — world borders according to the United Nations.

semiRealExample_Crimea

Republic of Crimea (Russia’s point of view) - Republic of Crimea (as an independent country)

BOOST_AUTO_TEST_CASE(==semiRealExample_Crimea==)  
{  
// see https://wiki.yandex-team.ru/maps/dev/core/wikimap/mapspro/krm/#ad2  
applyQueryToSchema(  
SCHEMA,  
"INSERT INTO ad (ad_id, p_ad_id, level_kind, isocode, g_ad_id) VALUES"  
"(1, NULL, 1, 'RU', NULL)," // Russia  
"(2, NULL, 1, 'UA', NULL)," // Ukraine  
"(3, 1, 2, NULL, NULL)," // Republic of Crimea (Russia's point of view)  
"(4, 2, 2, NULL, 3)," // Republic of Crimea (UN's point of view)  
"(5, 1, 2, 'XC', 3);" // Republic of Crimea (as an independent country)  
);

two variants of russia

/*  
If Russia (country) from Russia's point of view (001) contains Crimea  
and from Ukraine's point of view (UA) doesn't contain Crimea, we build 2 variants of Russia.  
It means, that ==countryToRecognitionSubjects== contains ```Russia -> [001, UA]```  
*/  
THashMap<Region, SubjectSet> buildCountryToRecognitionSubjects() const;

Border dispute test

Crimea+Kosovo+Cyprus+Abkhasia+Palestine

"name": "Border dispute test",
"description": "Checks dispute borders for different locales",
"error_description": "1 in case of unexpected border was found or expected border was missing, otherwise 0",
"error": {
"warning": 0.99,
"critical": 1
}

Israel and Palestine + Lite country borders

// Israel and ==Palestine==. See https://st.yandex-team.ru/MAPSNAVI-5024.
{
"IL", // Israel
"PS", // ==Palestine==
},

const std::vector<std::vector<std::string>> LITE_COUNTRY_BORDER_GROUPS {
{
"RU", // Russia
"BY", // Belarus
"KZ", // Kazhahstan
},

isCrimeaRussianByUserIdFromBelarus

@Test  
void isCrimeaRussianByUserIdFromBelarus() {  
Long pageId = 41443L;  
dslContext.update(Tables.USERS)  
.set(Tables.USERS.COUNTRY_ID, CoreConstants.BELARUS_ID)  
.where(Tables.USERS.ID.eq(1009L))  
.execute();  
  
Assertions.assertTrue(crimeaRepository.getPageIdsToIsCrimeaRussian(List.of(pageId)).get(pageId));  
}

disputed territories logic implementation

const std::set<Region>& disputedViews()  
{  
static const std::set<Region> result = {  
Region::_001,  
Region::Ru,  
Region::Ua,  
Region::Tr,  
Region::Il,  
};  
return result;  
}

garden / Дежурства в Огороде

# Дежурства в Огороде  
  
Дежурство осуществляются разными командами в разное время.  
  
## Дежурство по Огороду  
  
Осуществляется силами самой команды Огорода. [Расписание дежурств](https://abc.yandex-team.ru/services/maps-core-garden/duty/).  
  
Длительность одной смены - 5 рабочих дней в рабочее время с понедельника по пятницу.

shift_fraud

{  
"_id": "==shift_fraud==",  
"values": [  
{  
"conditions": {  
"locale": {  
"language": "ru"  
}  
},  
"value": "Длительное нахождение вне радиуса назначения на заказы или изменение местоположения с помощью стороннего приложения."  
}  
]  
}

penalties

popupColDefineition_penaltyDrop: 'Штраф за недоставку',  
popupColDefineition_penaltyEarlyFixed: 'Штраф за приезд раньше',  
popupColDefineition_penaltyEarlyMinute: 'Минута приезда раньше',  
popupColDefineition_penaltyLateFixed: 'Штраф за опоздание',  
popupColDefineition_penaltyLateMinute: 'Минута опоздания',  
popupColDefineition_penaltyOutOfTimeFixed: 'Штраф за нарушение окна',  
popupColDefineition_penaltyOutOfTimeMinute: 'Минута нарушения окна',

time_latenessForAFewSeconds

time_late: 'Опоздание',  
==time_latenessForAFewSeconds==: 'опоздание на несколько секунд',  
time_latenessForATime: 'опоздание на {time}',  
time_laterForAFewSeconds: 'позже на несколько секунд',  
time_laterForATime: 'позже на {time}',  
time_laterLessThanAMinute: 'с опозданием меньше минуты',

ConvertUkrDoneckaja.MB

what is interesting in this file:

time

globaltime = Timer()
Print (Timer()-time_) + "сек. обсчитывались области"
Print (Timer()-time_) + "сек. обсчитывались зел. насаждения"
Call UniqAlphaWithSize("cemetery")
Print (Timer()-time_) + "сек. обсчитывались кладбища"

boundary

Call CorrectBoundary (InDir, BoundDir, TmpDir, "regions", "Днепропетровская_обл")
Call CreateBeta(DesignOutDir, "line_boundary")
Call Add2Beta(InDir, "line_boundary", "line_boundary", "")

Call ExpandAlpha("search_towns")  
Call SetCentrAlpha("towns", "Авдеевка",37.752245,48.134698)
Call SetCentrAlpha("towns", "Горловка",38.134909,48.322274)
Call SetCentrAlpha("towns", "Дебальцево",38.40544,48.336588)
Call SetCentrAlpha("towns", "Донецк",37.801902,48.016059)
Call SetCentrAlpha("towns", "Енакиево",38.205251,48.231172)
Call SetCentrAlpha("towns", "Зугрэс",38.266763,48.011641)
Call SetCentrAlpha("towns", "Иловайск",38.196639,47.925536)
Call SetCentrAlpha("towns", "Краматорск",37.586264,48.738409)
Call SetCentrAlpha("towns", "Макеевка",37.964149,48.040998)
Call SetCentrAlpha("towns", "Мариуполь",37.547966,47.097092)
Call SetCentrAlpha("towns", "Харцызск",38.145494,48.041352)
Call SetCentrAlpha("towns", "Юнокоммунаровск",38.263854,48.22352)
Call SetCentrAlpha("towns", "Ясиноватая",37.872605,48.127951)

ConvertUkrKiev_i_Kievskaja.MB

Dim InDir, OutDir, DesignOutDir, TmpDir, SrcDir as String  
Dim time_, globaltime As Integer

Call CorrectSubareaTowns(InDir)  
Call UniqAlphaWithSizeSkipID("towns")  
If ProcessAlpha Then  
Select * from search_towns where ObjectName = "Обухов"  
Update Selection Set SubArea = "", SubAreaType = ""  
Select * from search_towns where ObjectName = "Припять"  
Update Selection Set Subarea="Иванковский", Subareatype = "район"  
Select * From search_towns Where ObjectType like "город"  
Update selection Set ObjectFull = Replace(ObjectFull, "город ", ""), NatFullName = Replace(NatFullName, "місто ", "")

If ProcessBeta Then  
Select * From design_towns where object_name like natname  
If SelectionInfo(SEL_INFO_NROWS) > 0 Then  
Update Selection Set natname = ""  
Commit Table design_towns  
End If

Call ExpandAlpha("search_towns")  
Call SetCentrAlpha("towns", "Киев",30.5223,50.451119)  
Call SetCentrAlpha("towns", "Борисполь",30.952861,50.348377)  
Call SetCentrAlpha("towns", "Боярка",30.298087,50.315977)  
Call SetCentrAlpha("towns", "Бровары",30.788252,50.508578)  
Call SetCentrAlpha("towns", "Буча",30.21959,50.549309)  
Call SetCentrAlpha("towns", "Вишневое",30.368648,50.383927)  
Call SetCentrAlpha("towns", "Вышгород",30.485014,50.582758)  
Call SetCentrAlpha("towns", "Ирпень",30.244294,50.519989)  
  
Call AppendLevel("towns", "Locality", "LocalityType")  
  
Call SetKategoryField("")  
Print (Timer()-time_) + "сек. обсчитывались города"

Print (Timer()-time_) + "сек. обсчитывались площади"
Print (Timer()-time_) + "сек. обсчитывались гидр. объекты"
Print (Timer()-time_) + "сек. обсчитывались зел. насаждения"
Print (Timer()-time_) + "сек. обсчитывались кладбища"

Print "Общее время работы "+(Timer()-globaltime)+".сек"