<commit_before>"""Root resource type."""
from pyramid.registry import Registry
from pyramid.threadlocal import get_current_registry
from substanced.util import find_service
from adhocracy_core.resources.organisation import IOrganisation
from adhocracy_core.interfaces import IPool
from adhocracy_core.resources import add_resource_type_to_registry
from adhocracy_core.resources.geo import IMultiPolygon
from adhocracy_core.resources.root import add_platform
from adhocracy_core.resources.root import root_meta
from .kiezkassen import IProcess
import adhocracy_core.sheets

POlYGON_ALT_TREPTOW = [[[[13.43965471730573, 52.489910057553196], [13.440449901319173, 52.48950315294476], [13.440655394804637, 52.48939826190491], [13.442114402071363, 52.48865535082071], [13.442350845427237, 52.4885330293379], [13.442862094487767, 52.488251451703476], [13.443109660012581, 52.48812414807427], [13.444215669770859, 52.487555408538384], [13.444440717969453, 52.48746275349459], [13.446770846541481, 52.48895899008676], [13.447486263482794, 52.48860959725712], [13.447714261070415, 52.488477876705176], [13.448542620111038, 52.48804054515318], [13.448855013995125, 52.4879655280784], [13.450323947303257, 52.48708787809025], [13.450457694608415, 52.487142093215816], [13.45102790097712, 52.486849947229786], [13.451259471703574, 52.48673616148355], [13.453498655456453, 52.48557570055215], [13.453711080193106, 52.48546098329616], [13.456060708110103, 52.48425570230633], [13.456235679221734, 52.48439852035341], [13.458128049576663, 52.485810970169354], [13.458354160185124, 52.48597240450103], [13.45824033989599, 52.4860547434846], [13.458306110937547, 52.486101228520326], [13.45855396405666, 52.48627110922015], [13.458336712625432, 52.4869547667117], [13.458042333390276, 52.48739918964292], [13.45827948970115, 52.487438796641065], [13.4577151635413, 52.4880596262553], [13.457901374187829, 52.48816886586604], [13.457400004628298, 52.48842572359903], [13.457565143269886, 52.48851401234541], [13.458549375439828, 52.48908236527112], [13.458657568896204, 52.48918261533636], [13.4586701304367, 52.489447587932375], [13.4587379580236, 52.48983291121473], [13.458877552829085, 52.49019372851095], [13.459107353337368, 52.490542757913005], [13.459172931202277, 52.49054174277645], [13.45936559681337, 52.49077145738059], [13.459515342193873, 52.490669516989975], [13.459931717354944, 52.49039166982406], [13.460074089109817, 52.49028405498368], [13.46027626169569, 52.490180261032435], [13.462094932455342, 52.48895849066342], [13.464426347805228, 52.48738570138882], [13.470620213342796, 52.48316267409903], [13.471784162629172, 52.48236895711849], [13.47184170099427, 52.48232971771163], [13.472531436467936, 52.48185935645028], [13.47296504109363, 52.48159686386172], [13.473045790717709, 52.4815888203202], [13.473047376009992, 52.48158866441247], [13.473508119663625, 52.481814628812955], [13.4736147562857, 52.48186692646281], [13.476176294275083, 52.48304389006089], [13.477897802913853, 52.483864379306105], [13.478877966009753, 52.48433151028804], [13.478924214853375, 52.484357013922676], [13.478931758225121, 52.48436235473243], [13.479587487240831, 52.484678807626146], [13.481313393493828, 52.485471851485535], [13.481808711184387, 52.48593151145089], [13.48179920533793, 52.485936982582345], [13.48192577008377, 52.485891390705696], [13.48213649369888, 52.4858509082382], [13.482269973179587, 52.48583033150583], [13.482353990765787, 52.485842448319595], [13.482471284434189, 52.48587425280156], [13.482955986521784, 52.486046323639115], [13.482178417817561, 52.48726235563634], [13.482136971703461, 52.48732717903767], [13.482055727484683, 52.487443482753214], [13.481683978895571, 52.487635124497686], [13.481502367157512, 52.48767446957608], [13.480939561367576, 52.48779515898409], [13.480551280109665, 52.48787363587456], [13.480469001744481, 52.48788740046247], [13.480057318135552, 52.48793749417344], [13.4798586762344, 52.48794439207074], [13.479422732595621, 52.487923432617556], [13.479239833195525, 52.487871460107534], [13.479095541986744, 52.487684961669906], [13.478631305961668, 52.487033223866746], [13.478585257752798, 52.48708175658725], [13.478142007069275, 52.48763740629772], [13.478074425068579, 52.48772392493111], [13.478019798338586, 52.487810181226564], [13.477985518274918, 52.487865252737535], [13.477940942000894, 52.487952635964604], [13.477909159775452, 52.4880308689719], [13.477874557732488, 52.48812889582437], [13.477715506310657, 52.48873075948078], [13.477685591965438, 52.488783095496814], [13.477633922433071, 52.488825743534136], [13.477116188257511, 52.489253057113444], [13.476989077039192, 52.48935048500573], [13.476318212676675, 52.489823222412895], [13.476130055877329, 52.48995584044094], [13.475441051041086, 52.49032616050856], [13.473787270077315, 52.49103366758398], [13.471018881778244, 52.49148723972659], [13.46898877296406, 52.492171412435894], [13.468495648369515, 52.4923406991107], [13.467832976430104, 52.492500579779396], [13.467059329630372, 52.49268632503074], [13.464216182275216, 52.49374264415197], [13.463902007800021, 52.49388966793813], [13.463324840612987, 52.494159759106296], [13.463199662309709, 52.49421549158287], [13.463174270512564, 52.49434880814032], [13.463943617845395, 52.494977068548764], [13.463959684851359, 52.49499205328477], [13.463972936090585, 52.495008004694185], [13.46398339987992, 52.495025228360035], [13.46398237682637, 52.49504311021715], [13.46397665792232, 52.49506072500417], [13.463966804050882, 52.495077696056576], [13.463952729255587, 52.495093376222115], [13.463933802444396, 52.4951072164506], [13.463827028103744, 52.49516232287868], [13.463784368442225, 52.49518643177714], [13.463731945132892, 52.495213707906984], [13.463736761979643, 52.495217093491235], [13.463383499214215, 52.495379361972], [13.463285758963888, 52.49541268312042], [13.463185626606924, 52.49544693718344], [13.463056791354143, 52.49535241807211], [13.462796274151549, 52.49540668671921], [13.462295294181208, 52.495514531240296], [13.461925787717277, 52.49558898304133], [13.461699006881357, 52.49567938137859], [13.461113169652835, 52.49590729031991], [13.460389999715593, 52.49619357992146], [13.459511909322059, 52.49653592519318], [13.459483166759183, 52.4965439724742], [13.459280110725599, 52.49658547278664], [13.458331597886328, 52.49677401265516], [13.456319019808179, 52.4971741783997], [13.455411155657908, 52.49735376682787], [13.455070612622697, 52.49742112178905], [13.455041959102376, 52.497368149360874], [13.45406748757569, 52.49755886400936], [13.45335235071718, 52.49752496336086], [13.452724958198848, 52.497576232542954], [13.452665037247776, 52.49757405435261], [13.452199587258972, 52.497501261905946], [13.451918174772173, 52.49744339622961], [13.45148795848329, 52.49734677395092], [13.451232200387997, 52.49725521036068], [13.451202022892607, 52.497244406497046], [13.450905382358698, 52.497106937954655], [13.450647839328179, 52.49694201899739], [13.450698446656833, 52.49692725748541], [13.450294266296059, 52.496625524680155], [13.45028159712858, 52.49661608786752], [13.450054443369472, 52.4964738959687], [13.449959563584809, 52.49639988469022], [13.449219231756762, 52.49585987848553], [13.448566041822431, 52.49535924273927], [13.448100727166203, 52.495007167740596], [13.44794369302719, 52.49488111866859], [13.44787174273581, 52.49483338070457], [13.44776152482513, 52.49478199108266], [13.447671874713109, 52.49474141592156], [13.4475763222364, 52.49470442550704], [13.447471919768542, 52.49467191489417], [13.447361567434768, 52.49465377455638], [13.447283576648797, 52.494642872882544], [13.4471569833823, 52.494635491168204], [13.447053919700284, 52.49463533473676], [13.446968501294762, 52.49464149737121], [13.44686834122953, 52.49465122909523], [13.446870642127836, 52.49465466618012], [13.446550853234958, 52.49468951981603], [13.446334284560344, 52.49472737196958], [13.446131355463473, 52.49473738194318], [13.445828792120459, 52.494718344763285], [13.445725725806465, 52.49470167600166], [13.445475749225691, 52.49464040847068], [13.445217447225623, 52.49454816920452], [13.444984617620738, 52.494429137850126], [13.44470989229442, 52.49422026213337], [13.44473696078986, 52.494207486702194], [13.444585051281337, 52.49408931443338], [13.444474818006894, 52.49413068901098], [13.444416488127153, 52.49403458085832], [13.443702967189703, 52.493480314313295], [13.443493222113245, 52.49331738908846], [13.440908751749761, 52.491309706452306], [13.440703670254559, 52.49115039931016], [13.4404922413277, 52.49101439073513], [13.440232176694982, 52.490891749911015], [13.439931302042202, 52.49067201728059], [13.439739661345477, 52.49038414454343], [13.439668554658736, 52.49014139486978], [13.43965471730573, 52.489910057553196]]]]  # noqa


def create_initial_content_for_meinberlin(context: IPool, registry: Registry,
                                          options: dict):
    """Add meinberlin specific example content."""
    registry = get_current_registry(context)
    locations = find_service(context, 'locations')
    appstructs = {adhocracy_core.sheets.geo.IMultiPolygon.__identifier__:
                  {'coordinates': POlYGON_ALT_TREPTOW,
                   'administrative_division': 'bezirksregion'},
                  adhocracy_core.sheets.name.IName.__identifier__:
                  {'name': 'alt-treptow'}}
    kiezregion = registry.content.create(IMultiPolygon.__identifier__,
                                         parent=locations,
                                         appstructs=appstructs)
    add_platform(context, registry, 'organisation',<commit_msg>fix lower case letter in constant name<commit_after>"""Root resource type."""
from pyramid.registry import Registry
from pyramid.threadlocal import get_current_registry
from substanced.util import find_service
from adhocracy_core.resources.organisation import IOrganisation
from adhocracy_core.interfaces import IPool
from adhocracy_core.resources import add_resource_type_to_registry
from adhocracy_core.resources.geo import IMultiPolygon
from adhocracy_core.resources.root import add_platform
from adhocracy_core.resources.root import root_meta
from .kiezkassen import IProcess
import adhocracy_core.sheets

POLYGON_ALT_TREPTOW = [[[[13.43965471730573, 52.489910057553196], [13.440449901319173, 52.48950315294476], [13.440655394804637, 52.48939826190491], [13.442114402071363, 52.48865535082071], [13.442350845427237, 52.4885330293379], [13.442862094487767, 52.488251451703476], [13.443109660012581, 52.48812414807427], [13.444215669770859, 52.487555408538384], [13.444440717969453, 52.48746275349459], [13.446770846541481, 52.48895899008676], [13.447486263482794, 52.48860959725712], [13.447714261070415, 52.488477876705176], [13.448542620111038, 52.48804054515318], [13.448855013995125, 52.4879655280784], [13.450323947303257, 52.48708787809025], [13.450457694608415, 52.487142093215816], [13.45102790097712, 52.486849947229786], [13.451259471703574, 52.48673616148355], [13.453498655456453, 52.48557570055215], [13.453711080193106, 52.48546098329616], [13.456060708110103, 52.48425570230633], [13.456235679221734, 52.48439852035341], [13.458128049576663, 52.485810970169354], [13.458354160185124, 52.48597240450103], [13.45824033989599, 52.4860547434846], [13.458306110937547, 52.486101228520326], [13.45855396405666, 52.48627110922015], [13.458336712625432, 52.4869547667117], [13.458042333390276, 52.48739918964292], [13.45827948970115, 52.487438796641065], [13.4577151635413, 52.4880596262553], [13.457901374187829, 52.48816886586604], [13.457400004628298, 52.48842572359903], [13.457565143269886, 52.48851401234541], [13.458549375439828, 52.48908236527112], [13.458657568896204, 52.48918261533636], [13.4586701304367, 52.489447587932375], [13.4587379580236, 52.48983291121473], [13.458877552829085, 52.49019372851095], [13.459107353337368, 52.490542757913005], [13.459172931202277, 52.49054174277645], [13.45936559681337, 52.49077145738059], [13.459515342193873, 52.490669516989975], [13.459931717354944, 52.49039166982406], [13.460074089109817, 52.49028405498368], [13.46027626169569, 52.490180261032435], [13.462094932455342, 52.48895849066342], [13.464426347805228, 52.48738570138882], [13.470620213342796, 52.48316267409903], [13.471784162629172, 52.48236895711849], [13.47184170099427, 52.48232971771163], [13.472531436467936, 52.48185935645028], [13.47296504109363, 52.48159686386172], [13.473045790717709, 52.4815888203202], [13.473047376009992, 52.48158866441247], [13.473508119663625, 52.481814628812955], [13.4736147562857, 52.48186692646281], [13.476176294275083, 52.48304389006089], [13.477897802913853, 52.483864379306105], [13.478877966009753, 52.48433151028804], [13.478924214853375, 52.484357013922676], [13.478931758225121, 52.48436235473243], [13.479587487240831, 52.484678807626146], [13.481313393493828, 52.485471851485535], [13.481808711184387, 52.48593151145089], [13.48179920533793, 52.485936982582345], [13.48192577008377, 52.485891390705696], [13.48213649369888, 52.4858509082382], [13.482269973179587, 52.48583033150583], [13.482353990765787, 52.485842448319595], [13.482471284434189, 52.48587425280156], [13.482955986521784, 52.486046323639115], [13.482178417817561, 52.48726235563634], [13.482136971703461, 52.48732717903767], [13.482055727484683, 52.487443482753214], [13.481683978895571, 52.487635124497686], [13.481502367157512, 52.48767446957608], [13.480939561367576, 52.48779515898409], [13.480551280109665, 52.48787363587456], [13.480469001744481, 52.48788740046247], [13.480057318135552, 52.48793749417344], [13.4798586762344, 52.48794439207074], [13.479422732595621, 52.487923432617556], [13.479239833195525, 52.487871460107534], [13.479095541986744, 52.487684961669906], [13.478631305961668, 52.487033223866746], [13.478585257752798, 52.48708175658725], [13.478142007069275, 52.48763740629772], [13.478074425068579, 52.48772392493111], [13.478019798338586, 52.487810181226564], [13.477985518274918, 52.487865252737535], [13.477940942000894, 52.487952635964604], [13.477909159775452, 52.4880308689719], [13.477874557732488, 52.48812889582437], [13.477715506310657, 52.48873075948078], [13.477685591965438, 52.488783095496814], [13.477633922433071, 52.488825743534136], [13.477116188257511, 52.489253057113444], [13.476989077039192, 52.48935048500573], [13.476318212676675, 52.489823222412895], [13.476130055877329, 52.48995584044094], [13.475441051041086, 52.49032616050856], [13.473787270077315, 52.49103366758398], [13.471018881778244, 52.49148723972659], [13.46898877296406, 52.492171412435894], [13.468495648369515, 52.4923406991107], [13.467832976430104, 52.492500579779396], [13.467059329630372, 52.49268632503074], [13.464216182275216, 52.49374264415197], [13.463902007800021, 52.49388966793813], [13.463324840612987, 52.494159759106296], [13.463199662309709, 52.49421549158287], [13.463174270512564, 52.49434880814032], [13.463943617845395, 52.494977068548764], [13.463959684851359, 52.49499205328477], [13.463972936090585, 52.495008004694185], [13.46398339987992, 52.495025228360035], [13.46398237682637, 52.49504311021715], [13.46397665792232, 52.49506072500417], [13.463966804050882, 52.495077696056576], [13.463952729255587, 52.495093376222115], [13.463933802444396, 52.4951072164506], [13.463827028103744, 52.49516232287868], [13.463784368442225, 52.49518643177714], [13.463731945132892, 52.495213707906984], [13.463736761979643, 52.495217093491235], [13.463383499214215, 52.495379361972], [13.463285758963888, 52.49541268312042], [13.463185626606924, 52.49544693718344], [13.463056791354143, 52.49535241807211], [13.462796274151549, 52.49540668671921], [13.462295294181208, 52.495514531240296], [13.461925787717277, 52.49558898304133], [13.461699006881357, 52.49567938137859], [13.461113169652835, 52.49590729031991], [13.460389999715593, 52.49619357992146], [13.459511909322059, 52.49653592519318], [13.459483166759183, 52.4965439724742], [13.459280110725599, 52.49658547278664], [13.458331597886328, 52.49677401265516], [13.456319019808179, 52.4971741783997], [13.455411155657908, 52.49735376682787], [13.455070612622697, 52.49742112178905], [13.455041959102376, 52.497368149360874], [13.45406748757569, 52.49755886400936], [13.45335235071718, 52.49752496336086], [13.452724958198848, 52.497576232542954], [13.452665037247776, 52.49757405435261], [13.452199587258972, 52.497501261905946], [13.451918174772173, 52.49744339622961], [13.45148795848329, 52.49734677395092], [13.451232200387997, 52.49725521036068], [13.451202022892607, 52.497244406497046], [13.450905382358698, 52.497106937954655], [13.450647839328179, 52.49694201899739], [13.450698446656833, 52.49692725748541], [13.450294266296059, 52.496625524680155], [13.45028159712858, 52.49661608786752], [13.450054443369472, 52.4964738959687], [13.449959563584809, 52.49639988469022], [13.449219231756762, 52.49585987848553], [13.448566041822431, 52.49535924273927], [13.448100727166203, 52.495007167740596], [13.44794369302719, 52.49488111866859], [13.44787174273581, 52.49483338070457], [13.44776152482513, 52.49478199108266], [13.447671874713109, 52.49474141592156], [13.4475763222364, 52.49470442550704], [13.447471919768542, 52.49467191489417], [13.447361567434768, 52.49465377455638], [13.447283576648797, 52.494642872882544], [13.4471569833823, 52.494635491168204], [13.447053919700284, 52.49463533473676], [13.446968501294762, 52.49464149737121], [13.44686834122953, 52.49465122909523], [13.446870642127836, 52.49465466618012], [13.446550853234958, 52.49468951981603], [13.446334284560344, 52.49472737196958], [13.446131355463473, 52.49473738194318], [13.445828792120459, 52.494718344763285], [13.445725725806465, 52.49470167600166], [13.445475749225691, 52.49464040847068], [13.445217447225623, 52.49454816920452], [13.444984617620738, 52.494429137850126], [13.44470989229442, 52.49422026213337], [13.44473696078986, 52.494207486702194], [13.444585051281337, 52.49408931443338], [13.444474818006894, 52.49413068901098], [13.444416488127153, 52.49403458085832], [13.443702967189703, 52.493480314313295], [13.443493222113245, 52.49331738908846], [13.440908751749761, 52.491309706452306], [13.440703670254559, 52.49115039931016], [13.4404922413277, 52.49101439073513], [13.440232176694982, 52.490891749911015], [13.439931302042202, 52.49067201728059], [13.439739661345477, 52.49038414454343], [13.439668554658736, 52.49014139486978], [13.43965471730573, 52.489910057553196]]]]  # noqa


def create_initial_content_for_meinberlin(context: IPool, registry: Registry,
                                          options: dict):
    """Add meinberlin specific example content."""
    registry = get_current_registry(context)
    locations = find_service(context, 'locations')
    appstructs = {adhocracy_core.sheets.geo.IMultiPolygon.__identifier__:
                  {'coordinates': POLYGON_ALT_TREPTOW,
                   'administrative_division': 'bezirksregion'},
                  adhocracy_core.sheets.name.IName.__identifier__:
                  {'name': 'alt-treptow'}}
    kiezregion = registry.content.create(IMultiPolygon.__identifier__,
                                         parent=locations,
                                         appstructs=appstructs)
    add_platform(context, registry, 'organisation',
{'fraction_non_alphanumeric': 0.13491198005919924, 'fraction_numerical': 0.6824531339253258, 'mean_word_length': 7.45761967501098, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7659404', 'n_tokens_mistral': 16358, 'n_tokens_neox': 8454, 'n_words': 961}