index
int64 0
731k
| package
stringlengths 2
98
⌀ | name
stringlengths 1
76
| docstring
stringlengths 0
281k
⌀ | code
stringlengths 4
8.19k
| signature
stringlengths 2
42.8k
⌀ | embed_func_code
listlengths 768
768
|
---|---|---|---|---|---|---|
52,227 |
osmnx.utils_graph
|
get_digraph
|
Do not use: deprecated.
Use the `convert.to_digraph` function instead.
Parameters
----------
G : networkx.MultiDiGraph
deprecated, do not use
weight : string
deprecated, do not use
Returns
-------
networkx.DiGraph
|
def get_digraph(G, weight="length"):
"""
Do not use: deprecated.
Use the `convert.to_digraph` function instead.
Parameters
----------
G : networkx.MultiDiGraph
deprecated, do not use
weight : string
deprecated, do not use
Returns
-------
networkx.DiGraph
"""
msg = (
"The `get_digraph` function is deprecated and will be removed in the "
"v2.0.0 release. Replace it with `convert.to_digraph` instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
return convert.to_digraph(G, weight)
|
(G, weight='length')
|
[
0.0033775949850678444,
-0.01531926542520523,
-0.014055642299354076,
-0.03970891982316971,
-0.030171163380146027,
-0.010585006326436996,
0.00146376877091825,
-0.0023930943571031094,
0.13474029302597046,
-0.0165309589356184,
-0.0019452004926279187,
-0.04344785958528519,
-0.012636230327188969,
-0.020460307598114014,
-0.010870619677007198,
0.01572604849934578,
-0.055010877549648285,
-0.02071995474398136,
0.01448838971555233,
0.05224129185080528,
-0.029548006132245064,
-0.06730090826749802,
0.015085581690073013,
-0.03024040348827839,
-0.04324014112353325,
0.027315029874444008,
0.022433636710047722,
0.01751762256026268,
0.007127352990210056,
-0.012895878404378891,
-0.018383119255304337,
-0.040851373225450516,
-0.0754711851477623,
0.013839268125593662,
-0.02826707437634468,
0.08564940840005875,
-0.025359010323882103,
0.016842536628246307,
-0.08149503171443939,
-0.015760667622089386,
-0.012350616976618767,
-0.027124619111418724,
0.026103336364030838,
-0.019750600680708885,
0.010654246434569359,
-0.0006675131735391915,
0.06349273025989532,
0.0042582363821566105,
-0.026951521635055542,
-0.030777009204030037,
0.046252064406871796,
0.023402990773320198,
-0.048398490995168686,
0.04341324046254158,
0.0007405393407680094,
-0.037043195217847824,
0.00800150353461504,
0.04033207520842552,
0.052587490528821945,
0.009918575175106525,
-0.009875300340354443,
-0.03436015918850899,
0.05514935404062271,
0.03839336708188057,
-0.032248351722955704,
0.004256072919815779,
-0.002507772296667099,
-0.037216294556856155,
-0.03562378138303757,
0.0003478208964224905,
-0.015786632895469666,
-0.0074043115600943565,
-0.02632836438715458,
-0.007811094168573618,
0.007919280789792538,
0.021775860339403152,
0.02985958568751812,
-0.00024531380040571094,
-0.015137511305510998,
0.02632836438715458,
-0.029980754479765892,
0.015717392787337303,
0.018988965079188347,
0.03950120136141777,
0.09125781804323196,
-0.018919724971055984,
0.033027298748493195,
0.03266378864645958,
-0.043378621339797974,
-0.033529285341501236,
-0.03995125740766525,
0.008014485239982605,
-0.007997175678610802,
0.008676589466631413,
0.024597374722361565,
-0.027072690427303314,
-0.051756612956523895,
0.019352473318576813,
0.028284383937716484,
0.01035997737199068,
-0.023177962750196457,
-0.015596223995089531,
-0.03929348289966583,
0.0006637266487814486,
-0.034290920943021774,
-0.07727140933275223,
-0.014315291307866573,
0.021689310669898987,
-0.013242077082395554,
-0.004150049760937691,
-0.049437087029218674,
0.02809397503733635,
0.07851772755384445,
-0.007919280789792538,
0.04562890902161598,
0.06300805509090424,
0.04857159033417702,
-0.005915659945458174,
-0.003444670932367444,
0.004439990501850843,
-0.07810229063034058,
0.04455569386482239,
-0.027574677020311356,
0.0038168339524418116,
-0.021446971222758293,
0.0004289610660634935,
-0.005521859508007765,
-0.030759699642658234,
0.04157838970422745,
0.026155265048146248,
0.016669437289237976,
0.0165309589356184,
0.014202776364982128,
0.05878443643450737,
0.0495755672454834,
-0.04853697121143341,
-0.04182072728872299,
0.008131327107548714,
0.03617769852280617,
0.03735477477312088,
-0.057157304137945175,
-0.07180148363113403,
0.015111546032130718,
0.05376456305384636,
0.00772887235507369,
-0.00298812217079103,
-0.0228663831949234,
0.004673674236983061,
-0.01580394245684147,
-0.005595426540821791,
0.006318115163594484,
0.024389654397964478,
0.05546093359589577,
-0.021689310669898987,
0.03174636512994766,
0.005448292475193739,
-0.05303754657506943,
0.02142966166138649,
0.0006074694683775306,
-0.01022149808704853,
-0.03915500268340111,
-0.0048943753354251385,
0.028786370530724525,
0.013207457028329372,
0.03370238468050957,
0.029219118878245354,
0.068339504301548,
0.031919464468955994,
-0.014202776364982128,
0.07228615880012512,
0.006002209149301052,
0.015232715755701065,
-0.028630582615733147,
-0.023454919457435608,
0.0075471182353794575,
0.06494676321744919,
0.07339399307966232,
0.05466467887163162,
0.03508717566728592,
-0.0007832731935195625,
0.019317852333188057,
0.014635523781180382,
-0.02665725350379944,
0.008075070567429066,
0.0016022480558604002,
0.03860108554363251,
0.034896768629550934,
-0.02549748867750168,
-0.05411076173186302,
-0.0040461900644004345,
0.04666750133037567,
0.06328500807285309,
0.04258236289024353,
0.04306704178452492,
0.04697908088564873,
-0.021948957815766335,
-0.045144230127334595,
0.012290031649172306,
-0.058265138417482376,
0.09617383033037186,
0.0694127157330513,
0.0168079175055027,
-0.021897029131650925,
-0.0023995854426175356,
-0.01592511124908924,
0.04088599234819412,
-0.05051030218601227,
-0.00013969633437227458,
-0.03673161566257477,
-0.018590837717056274,
-0.014756693504750729,
0.03676623851060867,
0.055945612490177155,
0.004487592726945877,
-0.017448384314775467,
0.0457327663898468,
-0.004418353084474802,
0.06435822695493698,
-0.012073658406734467,
-0.05750350281596184,
0.010913894511759281,
-0.023454919457435608,
0.004954960197210312,
-0.039916638284921646,
-0.0005228131776675582,
-0.04964480549097061,
0.040678273886442184,
-0.03101934865117073,
0.010723485611379147,
-0.04116295278072357,
0.07858696579933167,
-0.059857647866010666,
0.009736821055412292,
0.015362540259957314,
0.07567889988422394,
-0.032577238976955414,
-0.030707770958542824,
-0.0007962555973790586,
0.06570839881896973,
0.03711243346333504,
-0.033079225569963455,
-0.04362095892429352,
-0.04154377058148384,
0.07664825767278671,
0.039916638284921646,
0.01640979014337063,
-0.022225916385650635,
-0.06262723356485367,
0.06543143838644028,
0.01759551838040352,
-0.07914087921380997,
-0.03662775829434395,
0.015604878775775433,
0.011363952420651913,
-0.029322978109121323,
0.005876712501049042,
-0.09243489056825638,
-0.022191297262907028,
-0.026466842740774155,
-0.043378621339797974,
-0.01696370542049408,
0.03101934865117073,
-0.08931910246610641,
0.04230540618300438,
0.01052442193031311,
0.027747776359319687,
0.04611358419060707,
-0.0053877076134085655,
-0.0523451492190361,
0.010186878964304924,
-0.00933869369328022,
0.027176549658179283,
-0.004301511216908693,
-0.025307079777121544,
0.04580200836062431,
-0.029928823933005333,
-0.005500222090631723,
0.0550801157951355,
0.015838561579585075,
-0.03145209699869156,
-0.044071014970541,
-0.00533145060762763,
-0.02567058801651001,
0.038704946637153625,
-0.06352734565734863,
0.02584368735551834,
-0.0022611061576753855,
0.0027176549192517996,
0.004959287587553263,
-0.025428248569369316,
0.06764710694551468,
-0.012065003626048565,
0.0038298163563013077,
0.02567058801651001,
0.013354591093957424,
0.043551720678806305,
-0.01580394245684147,
0.014843243174254894,
0.009892609901726246,
0.02963455580174923,
-0.004630399402230978,
-0.051479656249284744,
0.02672649174928665,
0.03486214578151703,
0.03422167897224426,
0.04611358419060707,
0.05843823775649071,
-0.046459782868623734,
0.020529545843601227,
0.01630592904984951,
-0.062177177518606186,
0.00759039307013154,
0.030101923272013664,
0.037320151925086975,
-0.0715937614440918,
-0.036281559616327286,
-0.013406520709395409,
-0.014453769661486149,
0.04767147824168205,
0.022624045610427856,
-0.045040372759103775,
0.07540193945169449,
-0.012497751042246819,
0.01784651167690754,
-0.04147453233599663,
0.08710344135761261,
0.029703795909881592,
0.04974866658449173,
0.08717267960309982,
0.032369520515203476,
-0.03465442731976509,
-0.023645328357815742,
-0.004729931242763996,
0.014782657846808434,
-0.0012344125425443053,
0.0369047150015831,
0.04853697121143341,
-0.051756612956523895,
-0.025601347908377647,
-0.047567617148160934,
-0.007637995295226574,
-0.023593399673700333,
0.0045092301443219185,
0.027020759880542755,
0.008914601057767868,
-0.013588274829089642,
0.01774265244603157,
0.006088758818805218,
-0.014055642299354076,
0.009503137320280075,
-0.022987551987171173,
0.08945758640766144,
-0.025635968893766403,
0.06466980278491974,
0.009243489243090153,
0.00042111752554774284,
0.021135393530130386,
0.039916638284921646,
0.0053574154153466225,
0.007270159665495157,
-0.05816127732396126,
0.07318627834320068,
0.04843311384320259,
0.0018932707607746124,
0.043274760246276855,
-0.0168079175055027,
-0.0034533259458839893,
-0.01938709244132042,
0.03375431150197983,
-0.01754358783364296,
-0.01895434595644474,
0.022952932864427567,
-0.04732527956366539,
0.01369213405996561,
-0.006755189970135689,
0.030586600303649902,
0.025082051753997803,
-0.036281559616327286,
0.02198357880115509,
0.028111284598708153,
-0.04566352814435959,
0.0026116317603737116,
0.02413000725209713,
0.06823564320802689,
0.052587490528821945,
-0.015864526852965355,
0.0490216501057148,
0.0041522132232785225,
0.005746887996792793,
-0.05061415955424309,
-0.08744964003562927,
-0.048779308795928955,
-0.0003965049982070923,
0.08585712313652039,
-0.033131156116724014,
-0.02721116878092289,
0.028665201738476753,
-0.028284383937716484,
-0.017171425744891167,
-0.01575201377272606,
-0.0008892963523976505,
-0.006876359693706036,
-0.04535194858908653,
-0.0027998769655823708,
-0.039258863776922226,
0.027747776359319687,
0.017309904098510742,
0.04725603759288788,
0.013103597797453403,
-0.02032182738184929,
0.017457038164138794,
0.031642504036426544,
-0.011779390275478363,
0.03614307940006256,
0.0572957843542099,
0.05964992940425873,
0.0004322066670283675,
0.09174249321222305,
0.02660532295703888,
0.010238808579742908,
0.011658220551908016,
-0.038981903344392776,
0.029322978109121323,
-0.016539612784981728,
0.04116295278072357,
-0.0010380533058196306,
-0.024753162637352943,
0.00029562070267274976,
-0.01688581146299839,
0.05206819251179695,
0.002222158946096897,
0.020806504413485527,
0.0033170103561133146,
-0.04780995473265648,
0.024112695828080177,
-0.031261686235666275,
0.013865233398973942,
0.01668674685060978,
0.021550830453634262,
0.030673149973154068,
-0.024545444175601006,
-0.014574939385056496,
0.04227078706026077,
-0.010212843306362629,
0.037977930158376694,
-0.06896265596151352,
-0.019196683540940285,
0.019473642110824585,
0.03642003983259201,
-0.08530320972204208,
0.03382355347275734,
-0.04576738551259041,
0.07678673416376114,
0.003163384972140193,
-0.0495755672454834,
0.012627575546503067,
0.022018197923898697,
-0.002955666044726968,
-0.014315291307866573,
0.024147316813468933,
0.01248044054955244,
0.022399015724658966,
-0.024995502084493637,
0.0028171869926154613,
-0.03430822864174843,
-0.04369019716978073,
0.04670212045311928,
-0.0479138158261776,
-0.029980754479765892,
0.028163215145468712,
0.0694127157330513,
-0.03738939389586449,
-0.0418553501367569,
-0.06892804056406021,
-0.0039401669055223465,
0.004496247507631779,
-0.0011976290261372924,
-0.022675974294543266,
0.001192219671793282,
-0.03314846754074097,
-0.016669437289237976,
-0.03510448709130287,
0.0402282178401947,
0.0008606268092989922,
-0.01895434595644474,
0.003507419256493449,
-0.014756693504750729,
-0.00040137339965440333,
-0.020079489797353745,
-0.021793169900774956,
-0.015994351357221603,
0.024389654397964478,
-0.020737266167998314,
-0.07477878779172897,
0.06484290212392807,
0.05739964172244072,
-0.019594810903072357,
-0.043724820017814636,
0.006811447441577911,
0.006002209149301052,
0.004699639044702053,
-0.03808179125189781,
0.020408377051353455,
-0.03377162292599678,
0.018712006509304047,
-0.03482752665877342,
-0.002931864932179451,
0.068858802318573,
0.0484677329659462,
0.01668674685060978,
-0.026691872626543045,
0.041128333657979965,
0.0528990663588047,
0.06421974301338196,
0.003619933733716607,
-0.0055305142886936665,
-0.059026774019002914,
0.025687897577881813,
0.03356390446424484,
-0.02016603760421276,
0.03922424465417862,
0.031763672828674316,
0.010178224183619022,
-0.0009282436221837997,
-0.008412613533437252,
0.01900627464056015,
-0.0005809636786580086,
-0.017084876075387,
0.007222557440400124,
-0.00004760223600897007,
0.003139583859592676,
0.04119757190346718,
0.012203482910990715,
0.019317852333188057,
-0.02335106022655964,
-0.10711368918418884,
0.0462866835296154,
0.01319880224764347,
-0.060792382806539536,
-0.012168862856924534,
0.010403252206742764,
-0.03382355347275734,
-0.04008973762392998,
0.033685073256492615,
0.0009926147758960724,
0.03562378138303757,
0.030049994587898254,
0.016669437289237976,
-0.009503137320280075,
-0.0627657100558281,
-0.009537757374346256,
0.001672569545917213,
-0.041889969259500504,
0.0037281205877661705,
0.044105637818574905,
0.010576351545751095,
-0.052414391189813614,
0.00386227248236537,
-0.004812153521925211,
-0.039189621806144714,
-0.05113345757126808,
-0.08225666731595993,
-0.031642504036426544,
-0.00123224884737283,
0.011035064235329628,
-0.016453063115477562,
-0.005556479096412659,
-0.005656011402606964,
-0.06373506784439087,
0.01074079517275095,
-0.0002569438947830349,
-0.0534529834985733,
0.06044618412852287,
0.013770028948783875,
-0.010299392975866795,
0.010186878964304924,
-0.01769072189927101,
0.05255286768078804,
0.021568140015006065,
-0.02660532295703888,
-0.04369019716978073,
0.03655851632356644,
0.011000444181263447,
0.0413360521197319,
0.03707781434059143,
-0.014176812022924423,
0.025635968893766403,
-0.04396715760231018,
0.02049492672085762,
-0.025549419224262238,
0.02213936671614647,
-0.052414391189813614,
0.07969480007886887,
-0.02236439660191536,
-0.018106160685420036,
-0.02181047946214676,
-0.03756249323487282,
0.006469576619565487,
-0.023714568465948105,
0.01999294012784958,
-0.023489540442824364,
0.05338374525308609,
0.06120781973004341,
0.006893669255077839,
0.016790607944130898,
0.023662639781832695,
0.019594810903072357,
-0.0638735443353653,
0.014419150538742542,
-0.0771329328417778,
-0.04275546222925186,
0.03697395697236061,
-0.035727642476558685,
-0.0035528577864170074,
0.011346641927957535,
0.00009696251072455198,
-0.0018261949298903346,
0.023316441103816032,
-0.06619307398796082,
-0.015630843117833138,
0.015622188337147236,
-0.012688159942626953,
0.009286764077842236,
-0.022399015724658966,
-0.004342622123658657,
-0.01721470057964325,
-0.0024969535879790783,
-0.03766635060310364,
0.02142966166138649,
0.04562890902161598,
0.011857284232974052,
-0.030223092064261436,
0.018919724971055984,
0.024580063298344612,
-0.04213230684399605,
-0.022935623303055763,
0.023212581872940063,
-0.02847479283809662,
-0.01602897047996521,
0.05113345757126808,
-0.045525047928094864,
0.016548268496990204,
-0.0369047150015831,
-0.014012367464601994,
-0.039189621806144714,
-0.07470954954624176,
0.012679505161941051,
-0.00019135558977723122,
0.040574416518211365,
0.005253555718809366,
-0.01545774471014738,
0.00008661713945912197,
0.001619557966478169,
-0.02059878595173359,
-0.015293300151824951,
0.05376456305384636,
0.00920021440833807,
0.0020880072843283415,
-0.016487684100866318,
-0.06899727880954742,
-0.003351630177348852,
0.02693421021103859,
0.01834849826991558,
0.04909088835120201,
-0.0336158350110054,
0.04753299802541733,
-0.015717392787337303,
0.005309813190251589,
0.03235221281647682,
-0.08281058073043823,
-0.022122057154774666,
0.03337349370121956,
0.008122672326862812,
-0.00258999434299767,
-0.08163350820541382,
-0.003371103899553418,
0.0512373149394989,
0.020564166828989983,
0.02054685726761818,
0.00020190380746498704,
-0.015154820866882801,
0.09381967782974243,
-0.016877155750989914,
-0.02639760449528694,
-0.08031795918941498,
-0.008269806392490864,
-0.012194827198982239,
-0.020183349028229713,
-0.008637642487883568,
-0.013622894883155823,
0.009710856713354588,
-0.021360421553254128,
0.058645956218242645,
0.013891197741031647,
0.020287208259105682,
-0.009096354246139526,
0.020685335621237755,
0.0022892348933964968,
-0.012333306483924389,
-0.02468392439186573,
0.009105009958148003,
-0.0031417475547641516,
-0.04119757190346718,
0.01733586937189102,
0.05750350281596184,
-0.053141407668590546,
-0.04109371453523636,
0.005392035003751516,
-0.026536082848906517,
0.001106211100704968,
-0.03091548942029476,
-0.017275284975767136,
0.033131156116724014,
-0.004104610998183489,
0.03884342685341835,
-0.029132569208741188,
-0.015509674325585365,
-0.07734065502882004,
-0.052691347897052765,
0.01038594264537096,
-0.012419856153428555,
-0.015475054271519184,
0.01872931607067585,
0.08419537544250488,
-0.029340287670493126,
0.0495755672454834,
0.028717130422592163,
-0.05303754657506943,
-0.03024040348827839,
-0.029184497892856598,
0.0088193966075778,
0.0006880686851218343,
-0.009598341770470142,
-0.021671999245882034,
-0.041613008826971054,
-0.048398490995168686,
-0.0297384150326252,
0.05037182196974754,
0.0016422771150246263,
0.011199507862329483,
-0.020685335621237755,
0.02456275373697281,
-0.07983327656984329,
0.023229891434311867,
-0.055391695350408554,
-0.10392866283655167,
0.023835739120841026,
-0.007300452329218388,
-0.006075776182115078,
-0.03960506245493889,
0.0396743007004261,
-0.007097060792148113,
0.026813041418790817,
-0.02511667087674141,
0.036108460277318954,
-0.029219118878245354,
-0.0027414560317993164,
-0.01789844036102295,
0.0028864266350865364,
-0.06131168082356453,
-0.0005771770956926048,
-0.019317852333188057,
0.035398755222558975,
-0.029876895248889923,
-0.07519422471523285,
-0.01183997467160225,
-0.007815421558916569,
0.003935839515179396
] |
52,228 |
osmnx.utils_graph
|
get_undirected
|
Do not use: deprecated.
Use the `convert.to_undirected` function instead.
Parameters
----------
G : networkx.MultiDiGraph
deprecated, do not use
Returns
-------
networkx.MultiGraph
|
def get_undirected(G):
"""
Do not use: deprecated.
Use the `convert.to_undirected` function instead.
Parameters
----------
G : networkx.MultiDiGraph
deprecated, do not use
Returns
-------
networkx.MultiGraph
"""
msg = (
"The `get_undirected` function is deprecated and will be removed in the "
"v2.0.0 release. Replace it with `convert.to_undirected` instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
return convert.to_undirected(G)
|
(G)
|
[
-0.04234088584780693,
0.02608865685760975,
-0.037133365869522095,
0.024727212265133858,
-0.018651772290468216,
-0.014712096191942692,
-0.034989092499017715,
0.021578874439001083,
0.10415040701627731,
-0.021817127242684364,
-0.015384308993816376,
-0.015358781442046165,
-0.045199915766716,
0.02333173342049122,
0.025424951687455177,
0.04577852785587311,
-0.07188419997692108,
0.004982031416147947,
0.04251106455922127,
0.004748033359646797,
0.0063690016977488995,
-0.02930506505072117,
-0.0032313005067408085,
-0.029185939580202103,
-0.05602338910102844,
-0.03546559810638428,
-0.04060504585504532,
-0.00207513733766973,
-0.01178499311208725,
-0.036010172218084335,
0.001540132681839168,
-0.007168849464505911,
-0.008581346832215786,
-0.030377201735973358,
0.03439345955848694,
0.03505716472864151,
-0.025799348950386047,
0.02003023400902748,
-0.08366068452596664,
-0.07222456485033035,
-0.014414280652999878,
-0.06221795454621315,
0.0036056973040103912,
-0.0061562759801745415,
0.0791679248213768,
0.0006780625553801656,
0.04264720901846886,
0.006139257922768593,
-0.04639117792248726,
0.012082808651030064,
0.045438166707754135,
0.04465533792972565,
-0.02268504723906517,
0.04741226136684418,
-0.022276615723967552,
-0.000670617155265063,
-0.02081306278705597,
0.01519711036235094,
0.002878176048398018,
0.03221515193581581,
-0.032844819128513336,
-0.02488037571310997,
0.06432819366455078,
0.010508639737963676,
0.0464932881295681,
-0.00017815761384554207,
0.025356879457831383,
-0.002105982508510351,
-0.01899213343858719,
0.04696979001164436,
-0.10020222514867783,
0.0032823544461280107,
-0.01272098533809185,
0.004769305698573589,
0.03897131234407425,
-0.011631830595433712,
0.06443030387163162,
0.0546959824860096,
-0.013869702816009521,
0.028641361743211746,
-0.037882156670093536,
-0.00587973278015852,
0.01449086144566536,
0.08842574059963226,
0.026854468509554863,
-0.02646305225789547,
0.0528239980340004,
-0.0007604936836287379,
-0.05037340149283409,
-0.05054358020424843,
-0.00150503299664706,
0.017426474019885063,
-0.048331234604120255,
-0.027756424620747566,
0.02646305225789547,
-0.01987707056105137,
-0.06255831569433212,
0.03730354458093643,
0.00541599141433835,
-0.044553231447935104,
0.004982031416147947,
-0.003597188275307417,
-0.07379022240638733,
-0.003133446676656604,
0.030070876702666283,
-0.07991671562194824,
0.006432819180190563,
-0.04308967664837837,
-0.030564401298761368,
0.011716920882463455,
-0.004735269583761692,
-0.011308487504720688,
0.06252428144216537,
0.018039122223854065,
0.014652532525360584,
-0.008198441006243229,
0.032096024602651596,
-0.024250708520412445,
0.011921137571334839,
-0.0062200939282774925,
-0.053096286952495575,
0.031006868928670883,
-0.05755501240491867,
-0.03897131234407425,
-0.02659919671714306,
0.0016879768809303641,
-0.001168926595710218,
-0.030087895691394806,
0.042545102536678314,
0.030513346195220947,
-0.011155325919389725,
-0.0067519075237214565,
-0.008840871974825859,
0.008738763630390167,
-0.029390156269073486,
-0.03580595552921295,
-0.024710195139050484,
0.0136739956215024,
0.07344986498355865,
0.03631649911403656,
-0.053606826812028885,
-0.033814847469329834,
0.024778267368674278,
0.1142931580543518,
0.03318518027663231,
0.025612151250243187,
-0.01820930279791355,
0.07011432945728302,
0.009555629454553127,
-0.014644023962318897,
-0.007445392664521933,
0.0002499524562153965,
0.06453240662813187,
0.0026760869659483433,
-0.004705488216131926,
-0.0012423169100657105,
-0.027790460735559464,
0.014567442238330841,
-0.01965583674609661,
-0.012363606132566929,
-0.026446035131812096,
-0.03245340287685394,
0.002682468621060252,
0.014967366121709347,
0.006088203750550747,
-0.04690171778202057,
0.1445852667093277,
0.0003624310775194317,
0.01426111813634634,
0.04724207893013954,
0.007322011981159449,
0.023842275142669678,
-0.022787155583500862,
-0.024097545072436333,
-0.04533606022596359,
0.048943884670734406,
0.03459767624735832,
0.04952249675989151,
0.006275402382016182,
0.032844819128513336,
0.02062586508691311,
-0.0055010817013680935,
-0.001058841240592301,
-0.07576431334018707,
0.021221496164798737,
0.014524897560477257,
0.00395669462159276,
-0.039141494780778885,
-0.01829439401626587,
-0.004360872786492109,
0.014448316767811775,
0.02062586508691311,
0.05391315370798111,
0.06286463886499405,
0.06252428144216537,
-0.0037971502169966698,
-0.060380008071660995,
0.03374677523970604,
0.013180471956729889,
0.044791482388973236,
0.017094621434807777,
0.0033844627905637026,
0.01563957892358303,
0.020132342353463173,
-0.047208044677972794,
0.02225959673523903,
-0.045948710292577744,
-0.008840871974825859,
-0.0007838935125619173,
0.006666817236691713,
0.03515927121043205,
0.026156729087233543,
0.014592969790101051,
-0.02156185731291771,
-0.03355957567691803,
0.00933439563959837,
-0.04169419780373573,
0.050441473722457886,
-0.015035438351333141,
-0.030087895691394806,
-0.048195090144872665,
-0.009317377582192421,
0.005679770838469267,
-0.06524717062711716,
-0.01486525870859623,
-0.04775262251496315,
-0.0005711679696105421,
-0.03189180791378021,
-0.004239619243890047,
-0.03522734344005585,
0.08897031843662262,
-0.049216173589229584,
-0.027007630094885826,
0.01773279905319214,
0.06762969493865967,
-0.04114961996674538,
-0.03583999350667,
-0.012218953110277653,
0.09713897854089737,
0.0528239980340004,
-0.061128802597522736,
-0.06521312892436981,
-0.01708611287176609,
0.07406251132488251,
0.08720044046640396,
0.04121769219636917,
-0.04475744813680649,
-0.003363190218806267,
0.07508359104394913,
0.056125495582818985,
-0.05292610451579094,
-0.019315475597977638,
-0.03669089451432228,
0.014967366121709347,
0.0049054501578211784,
-0.010440567508339882,
-0.08720044046640396,
-0.021459748968482018,
-0.0383586622774601,
-0.0264119990170002,
-0.007407102268189192,
0.018277375027537346,
-0.060652296990156174,
0.04799087345600128,
-0.0011572267394512892,
-0.0216639656573534,
0.007339030038565397,
0.006781688891351223,
-0.012244479730725288,
0.02576531283557415,
0.0011465904535725713,
0.00634772889316082,
-0.047139972448349,
-0.019808998331427574,
0.031074941158294678,
0.021272551268339157,
0.018770897760987282,
0.01829439401626587,
0.020779026672244072,
-0.011827537789940834,
-0.040162574499845505,
-0.00843669380992651,
-0.024386851117014885,
0.046833645552396774,
-0.06671071797609329,
0.01700953207910061,
0.0031291921623051167,
-0.07018239796161652,
0.020472703501582146,
-0.05142851918935776,
0.08338839560747147,
0.029185939580202103,
0.01824333891272545,
0.0057478430680930614,
0.0008610064978711307,
0.017290329560637474,
-0.05442369356751442,
-0.016464954242110252,
0.015324745327234268,
0.04135383665561676,
0.03361063078045845,
-0.013716540299355984,
-0.010585221461951733,
0.037643905729055405,
0.04625503346323967,
0.006539182271808386,
0.027739405632019043,
-0.006224348209798336,
0.001954947365447879,
0.0005520227132365108,
-0.1017678827047348,
-0.041047513484954834,
0.006092458497732878,
0.0032355550210922956,
-0.08209502696990967,
0.004075820557773113,
0.010551185347139835,
-0.014414280652999878,
0.036861076951026917,
0.03252147510647774,
-0.014363226480782032,
0.05983543023467064,
-0.037882156670093536,
0.04131980240345001,
-0.052721887826919556,
0.030513346195220947,
0.0032951179891824722,
0.012363606132566929,
0.027858532965183258,
0.022276615723967552,
-0.025356879457831383,
-0.021527821198105812,
-0.06776583939790726,
0.02236170507967472,
-0.005169229581952095,
0.031585484743118286,
0.05983543023467064,
-0.011819029226899147,
0.04114961996674538,
-0.049454424530267715,
-0.04887581244111061,
0.054866161197423935,
-0.026122692972421646,
-0.014856749214231968,
0.015086492523550987,
0.04550623893737793,
-0.021578874439001083,
0.015146056190133095,
0.007198631297796965,
-0.0383586622774601,
0.004999049473553896,
0.04890984669327736,
-0.03975414112210274,
0.05241556465625763,
0.01839650236070156,
0.05064568668603897,
0.007568773347884417,
0.035771921277046204,
0.01722225733101368,
0.03692914918065071,
0.005492572672665119,
0.011027690023183823,
-0.005433009471744299,
0.0066795810125768185,
0.040162574499845505,
-0.013129417784512043,
-0.006394528783857822,
-0.020710954442620277,
-0.0571465790271759,
0.004226855933666229,
-0.043055642396211624,
-0.026156729087233543,
-0.015528962016105652,
0.034886982291936874,
0.008572838269174099,
0.05932489037513733,
0.029049795120954514,
0.000350731163052842,
0.03730354458093643,
0.023876311257481575,
-0.019060205668210983,
0.018039122223854065,
0.03226620331406593,
0.034989092499017715,
0.08611128479242325,
0.00010895534796873108,
0.050952013581991196,
0.02857328951358795,
0.004620397929102182,
-0.06660860776901245,
-0.03975414112210274,
-0.0458466000854969,
0.0084111662581563,
0.028998740017414093,
-0.014184536412358284,
-0.031993914395570755,
0.0021612911950796843,
0.020370595157146454,
0.03880113363265991,
-0.042919497936964035,
-0.005905259866267443,
0.05241556465625763,
-0.0634092167019844,
0.002559087937697768,
-0.054491765797138214,
-0.0020123831927776337,
0.010219333693385124,
0.024999501183629036,
0.03473382070660591,
-0.02333173342049122,
0.0050671217031776905,
0.04588063806295395,
-0.047071900218725204,
0.029560336843132973,
0.11368051171302795,
0.004709742497652769,
0.023927364498376846,
0.05663603916764259,
0.01108725368976593,
0.018821952864527702,
0.015656597912311554,
-0.0017209493089467287,
0.01400584727525711,
-0.018787916749715805,
0.022719083353877068,
-0.03590806573629379,
-0.05639778450131416,
0.0020687554497271776,
-0.052994176745414734,
0.09414380043745041,
0.011989209800958633,
-0.030326148495078087,
0.006403037812560797,
-0.05704447254538536,
-0.01024486031383276,
0.02035357616841793,
0.018787916749715805,
0.02739904448390007,
-0.019128277897834778,
0.06255831569433212,
-0.03645264357328415,
-0.024386851117014885,
0.02132360450923443,
0.00019703700672835112,
0.06521312892436981,
-0.06463451683521271,
-0.04271528124809265,
-0.006637035869061947,
0.05677218362689018,
-0.01904318667948246,
-0.00611373083665967,
-0.02590145729482174,
0.03522734344005585,
-0.0044459630735218525,
-0.03618035465478897,
-0.00428429152816534,
-0.03672493249177933,
-0.00020953462808392942,
-0.0521773137152195,
0.04363425448536873,
0.0216639656573534,
-0.01628626510500908,
-0.036997221410274506,
0.027739405632019043,
-0.014780168421566486,
-0.03982221335172653,
0.01936653070151806,
-0.04421287029981613,
-0.0716119110584259,
-0.0017060585087165236,
0.05558092147111893,
-0.023093480616807938,
-0.0031228105071932077,
-0.04986285790801048,
-0.006883797235786915,
-0.027058685198426247,
-0.047071900218725204,
-0.020762009546160698,
0.02790958620607853,
-0.051973097026348114,
-0.028726452961564064,
-0.0311259962618351,
0.009368430823087692,
0.008385639637708664,
-0.04063908010721207,
0.023314716294407845,
-0.0001895916066132486,
0.0063179475255310535,
0.041421908885240555,
-0.020098306238651276,
0.03597613796591759,
0.020047251135110855,
-0.015528962016105652,
-0.055002305656671524,
0.02978157065808773,
0.04162612557411194,
-0.060141753405332565,
-0.06521312892436981,
0.033491503447294235,
0.016048012301325798,
0.0064158011227846146,
-0.03924360126256943,
0.011699902825057507,
-0.010866018943488598,
0.03401906415820122,
-0.004811850842088461,
0.0032461911905556917,
0.045302022248506546,
0.044689375907182693,
0.008687709458172321,
0.008632401004433632,
0.016890404745936394,
0.048058945685625076,
0.061128802597522736,
0.03907342255115509,
0.006198821123689413,
-0.023552967235445976,
0.005458536557853222,
0.038767095655202866,
-0.011419105343520641,
0.00553086306899786,
0.008049532771110535,
-0.03866498917341232,
-0.01426111813634634,
-0.05187098681926727,
0.04451919347047806,
-0.034886982291936874,
0.0032610821072012186,
0.010695838369429111,
-0.025663204491138458,
0.010670311748981476,
0.03730354458093643,
0.018175266683101654,
0.03529541566967964,
-0.01609906554222107,
-0.03645264357328415,
0.022157488390803337,
0.009819408878684044,
-0.03168759122490883,
-0.007270957808941603,
0.005441518500447273,
-0.0503053292632103,
-0.007402847521007061,
0.07304143160581589,
-0.0074964468367397785,
-0.016413899138569832,
0.00483312364667654,
0.04662943258881569,
-0.009496066719293594,
-0.022395741194486618,
-0.056227605789899826,
0.021119387820363045,
-0.021902218461036682,
-0.015137546695768833,
0.03747372329235077,
0.03866498917341232,
-0.03631649911403656,
0.07099926471710205,
-0.008581346832215786,
-0.0038907495327293873,
-0.05204116925597191,
-0.07801070064306259,
-0.05163273587822914,
0.00016113957099150866,
-0.014150500297546387,
0.0006871033692732453,
-0.015818268060684204,
0.005556390155106783,
-0.03733758255839348,
0.045199915766716,
0.0056499894708395,
-0.04979478567838669,
-0.010006607510149479,
-0.025135645642876625,
0.008168659172952175,
0.025969529524445534,
0.04822912812232971,
0.024165617302060127,
0.03224918618798256,
-0.03917552903294563,
0.008024006150662899,
0.023229625076055527,
0.006424310151487589,
0.02081306278705597,
0.014056901447474957,
-0.03934570774435997,
0.029339101165533066,
0.018362466245889664,
0.03383186459541321,
-0.08522634953260422,
0.028590308502316475,
-0.03968606889247894,
0.06630228459835052,
-0.016592590138316154,
-0.0000596628560742829,
-0.03323623165488243,
-0.015588524751365185,
0.014712096191942692,
0.02324664406478405,
0.013231526128947735,
0.044314976781606674,
0.07494744658470154,
0.03920956701040268,
0.012091318145394325,
0.022395741194486618,
-0.038154445588588715,
-0.00207513733766973,
-0.08720044046640396,
-0.029236992821097374,
-0.06443030387163162,
-0.017477527260780334,
0.022004326805472374,
-0.05261978134512901,
0.02006427012383938,
0.024897392839193344,
-0.005773370154201984,
-0.028539253398776054,
0.004671452101320028,
-0.06596192717552185,
0.012533786706626415,
0.02185116335749626,
-0.05660200119018555,
-0.048058945685625076,
-0.03672493249177933,
-0.002965393476188183,
-0.02025146782398224,
0.027994677424430847,
-0.004769305698573589,
0.036861076951026917,
0.09278235584497452,
-0.0031568463891744614,
-0.06391976028680801,
0.00827502179890871,
0.012635895051062107,
-0.03226620331406593,
-0.033355358988046646,
0.008657927624881268,
-0.0069008152931928635,
0.0009397148969583213,
0.047208044677972794,
-0.048569489270448685,
0.048807740211486816,
-0.047446295619010925,
-0.023978419601917267,
-0.022855227813124657,
-0.0235699862241745,
0.013180471956729889,
0.008309057913720608,
-0.006496637128293514,
-0.021391676738858223,
-0.005267083644866943,
0.03604421019554138,
0.051836952567100525,
-0.0070241959765553474,
-0.03219813108444214,
0.021221496164798737,
-0.008223967626690865,
0.006096712779253721,
0.002646305365487933,
-0.024233689531683922,
0.007951679639518261,
0.008457966148853302,
0.019587764516472816,
0.04598274454474449,
-0.028590308502316475,
0.08304803818464279,
0.020659901201725006,
-0.0022931809071451426,
0.011972191743552685,
-0.07079505175352097,
0.00541599141433835,
-0.018736861646175385,
0.002136827679350972,
-0.02003023400902748,
-0.023791220039129257,
-0.04074119031429291,
0.06660860776901245,
0.0010354414116591215,
0.011402087286114693,
0.008662182837724686,
-0.032793764024972916,
0.08563478291034698,
-0.06463451683521271,
-0.019434602931141853,
-0.077874556183815,
-0.014244100078940392,
0.002096409909427166,
-0.01447384338825941,
-0.004573598504066467,
-0.009479048661887646,
0.028062747791409492,
-0.011912628076970577,
0.037541795521974564,
0.029883679002523422,
0.02375718392431736,
-0.004790578503161669,
0.0351933091878891,
0.028318019583821297,
0.025271790102124214,
0.009368430823087692,
0.0370652936398983,
-0.0012104081688448787,
-0.033304303884506226,
0.014575951732695103,
0.018141230568289757,
0.009513084776699543,
0.03907342255115509,
0.0003539220488164574,
-0.05119026452302933,
0.01968987286090851,
-0.011699902825057507,
-0.01517158281058073,
0.027892569079995155,
0.01001511700451374,
0.07324564456939697,
-0.03846077248454094,
-0.018464574590325356,
-0.029236992821097374,
-0.04867159575223923,
-0.012593350373208523,
-0.01015126146376133,
0.005875478498637676,
-0.049590568989515305,
0.04925020784139633,
-0.012831602245569229,
0.06272849440574646,
0.000905678840354085,
-0.05997157469391823,
-0.03733758255839348,
-0.013180471956729889,
0.02520371787250042,
0.025135645642876625,
0.040911369025707245,
0.06797005236148834,
-0.000604672241024673,
0.008258003741502762,
0.014695078134536743,
0.05343664810061455,
-0.03328728675842285,
-0.004896941129118204,
-0.01858370006084442,
0.01047460362315178,
-0.010559693910181522,
-0.001923038624227047,
-0.04564238339662552,
-0.06351132690906525,
-0.003169609932228923,
-0.007402847521007061,
-0.02496546506881714,
-0.004667197819799185,
0.07120347768068314,
-0.016439426690340042,
0.007781499065458775,
-0.04036679118871689,
0.01858370006084442,
-0.011793501675128937,
0.00736455712467432,
-0.036758966743946075,
-0.00858560111373663,
-0.0853624939918518,
-0.04935231804847717,
-0.006394528783857822,
-0.01810719445347786,
-0.00033211769186891615,
-0.05207520350813866,
0.037780050188302994,
0.0016496862517669797,
0.025271790102124214
] |
52,230 |
osmnx.graph
|
graph_from_address
|
Download and create a graph within some distance of an address.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
address : string
the address to geocode and use as the central point around which to
construct the graph
dist : int
retain only those nodes within this many meters of the center of the
graph
dist_type : string {"network", "bbox"}
if "bbox", retain only those nodes within a bounding box of the
distance parameter. if "network", retain only those nodes within some
network distance from the center-most node.
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
return_coords : bool
deprecated, do not use
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
networkx.MultiDiGraph or optionally (networkx.MultiDiGraph, (lat, lon))
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
|
def graph_from_address(
address,
dist=1000,
dist_type="bbox",
network_type="all",
simplify=True,
retain_all=False,
truncate_by_edge=False,
return_coords=None,
clean_periphery=None,
custom_filter=None,
):
"""
Download and create a graph within some distance of an address.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
address : string
the address to geocode and use as the central point around which to
construct the graph
dist : int
retain only those nodes within this many meters of the center of the
graph
dist_type : string {"network", "bbox"}
if "bbox", retain only those nodes within a bounding box of the
distance parameter. if "network", retain only those nodes within some
network distance from the center-most node.
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
return_coords : bool
deprecated, do not use
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
networkx.MultiDiGraph or optionally (networkx.MultiDiGraph, (lat, lon))
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
"""
if return_coords is None:
return_coords = False
else:
warn(
"The `return_coords` argument has been deprecated and will be removed in "
"the v2.0.0 release. Future behavior will be as though `return_coords=False`. "
"If you want the address's geocoded coordinates, use the `geocode` function. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123",
FutureWarning,
stacklevel=2,
)
# geocode the address string to a (lat, lon) point
point = geocoder.geocode(query=address)
# then create a graph from this point
G = graph_from_point(
point,
dist,
dist_type,
network_type=network_type,
simplify=simplify,
retain_all=retain_all,
truncate_by_edge=truncate_by_edge,
clean_periphery=clean_periphery,
custom_filter=custom_filter,
)
utils.log(f"graph_from_address returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
if return_coords:
return G, point
# otherwise
return G
|
(address, dist=1000, dist_type='bbox', network_type='all', simplify=True, retain_all=False, truncate_by_edge=False, return_coords=None, clean_periphery=None, custom_filter=None)
|
[
0.02048921026289463,
0.05328355357050896,
-0.012169700115919113,
-0.03383911773562431,
-0.019802365452051163,
-0.022249849513173103,
-0.07228299230337143,
-0.05723048374056816,
0.01209231000393629,
-0.04357101023197174,
-0.0020605295430868864,
0.04906575754284859,
-0.06597564369440079,
0.0595909021794796,
0.0138722974807024,
0.0311884842813015,
-0.02037312276661396,
-0.038076262921094894,
0.013185454532504082,
0.028344374150037766,
-0.04074624553322792,
-0.0017582217697054148,
0.05665005370974541,
-0.0172387957572937,
0.04206189140677452,
-0.02016029879450798,
0.03532889112830162,
-0.013378931209445,
-0.030279142782092094,
-0.0018331941682845354,
0.048175763338804245,
-0.043841876089572906,
-0.011985897086560726,
0.04078494384884834,
-0.005693059414625168,
0.009020863100886345,
0.037534527480602264,
0.08288552612066269,
-0.02567439153790474,
-0.022694846615195274,
-0.015197615139186382,
-0.07073517143726349,
-0.027338294312357903,
-0.010989490896463394,
0.049259234219789505,
-0.02882806584239006,
-0.026931991800665855,
-0.02296571433544159,
-0.05920394882559776,
-0.05804308503866196,
-0.02515200339257717,
-0.02480374649167061,
0.015275005251169205,
0.027551118284463882,
0.011521552689373493,
-0.03242673724889755,
-0.012450242415070534,
0.09186285734176636,
0.05014922842383385,
0.04082363843917847,
0.0018948649521917105,
0.01376588549464941,
-0.023430058732628822,
-0.004568474367260933,
-0.03523215278983116,
-0.021708114072680473,
-0.04237145185470581,
-0.04550578072667122,
-0.0725538581609726,
0.014810660853981972,
0.019318673759698868,
0.026254823431372643,
0.00054022396216169,
-0.04217797517776489,
0.03490324318408966,
0.06396348029375076,
0.03745713829994202,
0.012392198666930199,
-0.002517618937417865,
0.028653936460614204,
-0.018012704327702522,
0.018128789961338043,
-0.010631558485329151,
-0.050652265548706055,
0.023758970201015472,
0.04097842052578926,
0.01858346164226532,
0.013088716194033623,
-0.000343119289027527,
-0.008392062969505787,
-0.04991705343127251,
-0.0418684147298336,
-0.0202763844281435,
-0.010989490896463394,
-0.008924124762415886,
-0.01764509826898575,
0.039488647133111954,
-0.04991705343127251,
0.010167214088141918,
0.018670525401830673,
0.009741564281284809,
-0.01425925176590681,
-0.0354643240571022,
-0.011821442283689976,
-0.03258151933550835,
-0.07348255068063736,
-0.006979681085795164,
0.00869195256382227,
0.0009776632068678737,
0.010786340571939945,
-0.06593694537878036,
-0.01858346164226532,
0.016987277194857597,
-0.0005214808625169098,
-0.01278882659971714,
0.05916525423526764,
0.04960749298334122,
0.027222206816077232,
-0.014423706568777561,
-0.042642321437597275,
-0.01278882659971714,
0.11608617007732391,
-0.04016581550240517,
0.0013555479235947132,
-0.003642203751951456,
0.03648975491523743,
0.058778297156095505,
-0.019163891673088074,
-0.016919558867812157,
-0.04244884476065636,
0.014578488655388355,
0.003702665213495493,
0.012392198666930199,
0.06794910877943039,
0.010534820146858692,
0.01056384202092886,
-0.05216138809919357,
-0.030182404443621635,
-0.02991153672337532,
0.00885640736669302,
-0.035386934876441956,
-0.0015550709795206785,
0.044267527759075165,
-0.01164731290191412,
-0.02526809088885784,
-0.027357641607522964,
-0.030627401545643806,
-0.04771141707897186,
-0.004621680825948715,
-0.05189051851630211,
0.017374230548739433,
0.013069367967545986,
-0.019425086677074432,
0.028886109590530396,
-0.0527031235396862,
-0.04635707661509514,
0.020624643191695213,
0.002030298812314868,
-0.009872161783277988,
0.02199832908809185,
-0.03763126954436302,
0.04945271089673042,
0.05719178915023804,
-0.060635678470134735,
-0.04593142867088318,
-0.05939742550253868,
0.020334428176283836,
-0.05653396621346474,
-0.025074614211916924,
-0.02298506163060665,
-0.03707018494606018,
0.02915697731077671,
-0.0007364216726273298,
-0.06465999782085419,
-0.02784133329987526,
0.023139843717217445,
0.028460459783673286,
-0.009064394980669022,
-0.02319788746535778,
-0.036683231592178345,
0.04403535649180412,
-0.045892734080553055,
-0.032562170177698135,
0.04542838782072067,
0.013378931209445,
-0.007593970280140638,
0.01277915295213461,
-0.03616084158420563,
0.027667203918099403,
-0.012576001696288586,
-0.02068268693983555,
-0.03499998152256012,
-0.009107927791774273,
0.019279979169368744,
0.04322275146842003,
-0.05212268978357315,
-0.021727461367845535,
0.019231610000133514,
-0.05107791721820831,
0.13473735749721527,
-0.01818683370947838,
0.04651185870170593,
0.0012999232858419418,
-0.0203537754714489,
0.01495576836168766,
0.0027763943653553724,
-0.040475379675626755,
-0.019773345440626144,
0.007265059743076563,
0.005272246897220612,
-0.0008646001224406064,
0.0011118878610432148,
0.04693751037120819,
0.0413653738796711,
-0.02306245267391205,
-0.040475379675626755,
0.004319373052567244,
0.06624650955200195,
0.06562738120555878,
-0.022346587851643562,
0.037321705371141434,
-0.05622440204024315,
0.017045319080352783,
0.02414592355489731,
0.027918724343180656,
0.009993084706366062,
-0.01317578088492155,
0.011782746762037277,
0.017799880355596542,
-0.04391926899552345,
0.06183523312211037,
-0.06195132061839104,
0.03499998152256012,
-0.05885569006204605,
0.06438913196325302,
-0.06110002100467682,
0.003073865082114935,
0.05115530639886856,
-0.0044161113910377026,
0.02254006452858448,
-0.010902426205575466,
-0.024745702743530273,
-0.06110002100467682,
-0.04647316411137581,
-0.02014095149934292,
-0.03902430087327957,
-0.03109174594283104,
-0.016145652160048485,
0.010970143601298332,
-0.05703700706362724,
-0.03925647586584091,
0.019279979169368744,
0.023217234760522842,
-0.0015006556641310453,
0.015410439111292362,
-0.06953562051057816,
-0.04341622814536095,
-0.024320052936673164,
0.00590104702860117,
0.020450513809919357,
-0.01274045743048191,
-0.008624235168099403,
-0.0013869879767298698,
-0.027821986004710197,
0.026951339095830917,
-0.03772800788283348,
-0.02221115492284298,
0.03130457177758217,
0.04190710932016373,
0.02557765319943428,
-0.039894949644804,
0.07088995724916458,
0.011947201564908028,
-0.0153910918161273,
0.020547252148389816,
-0.04283579811453819,
0.05134878307580948,
-0.03242673724889755,
-0.016048913821578026,
-0.009964062832295895,
-0.09302371740341187,
0.018573787063360214,
-0.01651325821876526,
-0.021959634497761726,
-0.013359583914279938,
-0.016880864277482033,
0.05216138809919357,
0.04403535649180412,
0.020992249250411987,
-0.002280609682202339,
0.02753177098929882,
-0.0051851822063326836,
-0.012643719092011452,
-0.020972901955246925,
0.018380310386419296,
-0.00860972423106432,
0.057694826275110245,
-0.0213405080139637,
0.009311078116297722,
0.0049868687056005,
-0.011502205394208431,
0.02383636124432087,
0.06458260864019394,
0.014520445838570595,
0.08830288052558899,
0.04856271669268608,
0.020431166514754295,
-0.02147594280540943,
0.026370909065008163,
0.038966257125139236,
-0.01018656138330698,
0.014104469679296017,
-0.025829173624515533,
0.026912644505500793,
-0.019299326464533806,
0.029408497735857964,
0.026719167828559875,
-0.014994463883340359,
0.029543930664658546,
0.003784892847761512,
-0.05289660021662712,
0.043725792318582535,
0.020218342542648315,
0.00029475006158463657,
-0.047634027898311615,
0.015255657956004143,
-0.02548091486096382,
0.058236561715602875,
0.036122146993875504,
0.005712407175451517,
0.011231337673962116,
0.016687387600541115,
-0.007265059743076563,
0.030724139884114265,
-0.05982307344675064,
0.024881135672330856,
-0.003922745119780302,
-0.03780539706349373,
-0.002965034218505025,
-0.007250548806041479,
0.03469041734933853,
0.030608054250478745,
-0.013079042546451092,
-0.023758970201015472,
-0.022191807627677917,
-0.0325041301548481,
0.009040210396051407,
-0.013533713296055794,
-0.03064674884080887,
-0.03826974332332611,
-0.02383636124432087,
0.07429514825344086,
-0.007980924099683762,
0.05487006530165672,
0.04542838782072067,
0.02329462580382824,
0.011782746762037277,
-0.04314536228775978,
0.008899940177798271,
0.0233139730989933,
-0.020237689837813377,
-0.015865109860897064,
0.025442220270633698,
-0.06558869034051895,
-0.054676588624715805,
-0.008493638597428799,
0.03621888533234596,
0.05409615486860275,
0.05579875409603119,
-0.04194580391049385,
-0.025945259258151054,
-0.0474405474960804,
-0.04132667928934097,
0.03910169377923012,
-0.005514093209058046,
0.013291866518557072,
0.005451213102787733,
-0.036257579922676086,
-0.03784409165382385,
0.02805415913462639,
-0.023488102480769157,
-0.018922045826911926,
0.06999996304512024,
0.029505236074328423,
0.09093417227268219,
-0.02298506163060665,
0.11500269919633865,
0.06640128791332245,
0.0008295324514620006,
-0.012043940834701061,
-0.05026531219482422,
0.020740728825330734,
0.041558850556612015,
0.025655044242739677,
0.011357096955180168,
0.03523215278983116,
0.028963500633835793,
-0.01679380051791668,
-0.07069648057222366,
-0.03087892197072506,
-0.01105720829218626,
0.02784133329987526,
0.03832778334617615,
0.04639577493071556,
-0.011540899984538555,
-0.036779969930648804,
-0.023546146228909492,
-0.056069619953632355,
-0.0006348462775349617,
-0.0418684147298336,
0.014472076669335365,
-0.07007735222578049,
-0.0014837264316156507,
0.04086233302950859,
0.007076419424265623,
0.0392371267080307,
0.0439966581761837,
0.005828493274748325,
0.024571573361754417,
-0.00806798879057169,
0.06980648636817932,
-0.02341071143746376,
0.003569649765267968,
-0.016445541754364967,
0.06384739279747009,
-0.009809281677007675,
-0.005591483786702156,
-0.007173158228397369,
-0.015042833052575588,
0.07030952721834183,
0.01175372488796711,
-0.056301794946193695,
-0.02762850932776928,
-0.03345216438174248,
-0.0033471512142568827,
0.04341622814536095,
0.004222634714096785,
-0.01121198944747448,
0.030917616561055183,
-0.01717107929289341,
-0.01392066664993763,
-0.00035974622005596757,
-0.03633497282862663,
-0.04720837622880936,
0.003784892847761512,
-0.0351354144513607,
0.007187668699771166,
-0.02795742079615593,
0.0321752168238163,
-0.030395230278372765,
-0.027009382843971252,
-0.04987835884094238,
0.03258151933550835,
0.028905456885695457,
-0.0049143144860863686,
0.010254278779029846,
-0.009194992482662201,
-0.014771965332329273,
-0.046318382024765015,
0.07034821808338165,
0.05405746027827263,
-0.06415695697069168,
-0.005267410073429346,
0.03588997572660446,
0.03637366741895676,
0.018718894571065903,
0.048175763338804245,
-0.003518862184137106,
0.012324482202529907,
-0.0548313707113266,
-0.01575869880616665,
-0.025867868214845657,
-0.020876163616776466,
-0.0006294047343544662,
0.02385570853948593,
0.007482721004635096,
-0.0321752168238163,
-0.027763942256569862,
0.005441539455205202,
-0.03633497282862663,
-0.022617455571889877,
-0.01321447640657425,
0.017045319080352783,
0.02871198020875454,
0.01662934385240078,
0.034845199435949326,
0.0527031235396862,
-0.02310114912688732,
0.05134878307580948,
-0.009335262700915337,
-0.08327247947454453,
0.019279979169368744,
0.021920938044786453,
-0.03335542604327202,
0.027376988902688026,
0.06392478942871094,
-0.011966549791395664,
-0.04314536228775978,
0.0143656637519598,
-0.07085125893354416,
0.007376309018582106,
-0.006486314814537764,
-0.021611375734210014,
-0.031362615525722504,
0.06856822967529297,
0.08760636299848557,
-0.017229123041033745,
0.028537850826978683,
0.04074624553322792,
0.02989218942821026,
-0.050768353044986725,
-0.006181588862091303,
0.06361522525548935,
0.07750687003135681,
-0.010757318697869778,
0.07030952721834183,
0.0500718355178833,
-0.01165698654949665,
-0.017964335158467293,
-0.059010472148656845,
0.034632373601198196,
0.06880040466785431,
-0.00801961962133646,
0.022385284304618835,
-0.0413653738796711,
0.0392371267080307,
0.038850173354148865,
0.009751238860189915,
0.01322415005415678,
-0.002344698878005147,
0.04326144605875015,
0.037341050803661346,
-0.005088443867862225,
0.031807612627744675,
0.06280262023210526,
-0.06005524843931198,
0.03844387084245682,
-0.0021149448584765196,
-0.00035823468351736665,
-0.0024075787514448166,
0.007090930361300707,
-0.0012878309935331345,
-0.05432832986116409,
-0.05866221338510513,
0.017587054520845413,
0.004391926806420088,
0.08203423023223877,
-0.025538958609104156,
0.00044741545571014285,
-0.05897177755832672,
0.05440571904182434,
0.04430622234940529,
0.05309007689356804,
-0.016116630285978317,
0.06264783442020416,
0.04658925160765648,
-0.04097842052578926,
-0.018922045826911926,
0.01594250090420246,
-0.03219456598162651,
0.00407510856166482,
-0.018883351236581802,
-0.02989218942821026,
0.038734085857868195,
-0.0520453006029129,
0.057385265827178955,
-0.02428135834634304,
-0.011453835293650627,
-0.004894966725260019,
0.03486454859375954,
0.0036929913330823183,
-0.05103921890258789,
0.003983206581324339,
-0.02143724635243416,
0.0040992931462824345,
0.0002288469549966976,
-0.03525150194764137,
-0.06400217860937119,
0.0203537754714489,
0.04086233302950859,
0.00046404238673858345,
-0.014752618037164211,
0.006050991825759411,
-0.005393170285969973,
0.04279710352420807,
0.0718960389494896,
-0.027067426592111588,
-0.024436138570308685,
0.04713098704814911,
-0.012866217643022537,
0.019676607102155685,
0.018825307488441467,
0.0507296584546566,
0.031072398647665977,
-0.04473187029361725,
-0.021282464265823364,
-0.0054560499265789986,
-0.011966549791395664,
-0.01002210658043623,
-0.019850734621286392,
-0.048485323786735535,
0.03205913305282593,
-0.002759465016424656,
-0.02807350642979145,
0.021727461367845535,
0.003117397427558899,
-0.025384176522493362,
0.001109469449147582,
0.013359583914279938,
-0.05703700706362724,
0.04326144605875015,
0.0030182404443621635,
-0.050652265548706055,
-0.01804172620177269,
-0.034071292728185654,
-0.05332224816083908,
-0.02861524187028408,
0.024784397333860397,
-0.05742396041750908,
-0.021804852411150932,
0.03215587139129639,
0.00407510856166482,
0.04511882737278938,
-0.040475379675626755,
-0.04283579811453819,
0.015903806313872337,
-0.03933386504650116,
-0.03012436255812645,
0.008914451114833355,
0.06400217860937119,
-0.011511879041790962,
0.00031379543361254036,
-0.05688222497701645,
-0.04341622814536095,
0.03910169377923012,
-0.07325037568807602,
0.03886951878666878,
0.018873676657676697,
-0.013640125282108784,
-0.002861040411517024,
-0.06938083469867706,
0.06988387554883957,
-0.015110550448298454,
-0.015884457156062126,
-0.02480374649167061,
0.006510499399155378,
0.04736315831542015,
-0.022037025541067123,
0.010292974300682545,
0.018070748075842857,
-0.0035672313533723354,
0.02743503265082836,
0.06322827190160751,
0.06415695697069168,
0.04550578072667122,
0.0651630386710167,
-0.07278603315353394,
-0.025287438184022903,
0.020972901955246925,
-0.009799608029425144,
0.045892734080553055,
0.01992812566459179,
0.007574622984975576,
0.04767272248864174,
-0.097512386739254,
0.004297606647014618,
0.003514025127515197,
-0.018554439768195152,
0.018341615796089172,
-0.024436138570308685,
0.011850463226437569,
0.01841900683939457,
0.037341050803661346,
0.04213928058743477,
0.024668311700224876,
-0.022172458469867706,
-0.0466279461979866,
0.0016663202550262213,
-0.0932558923959732,
0.010989490896463394,
0.043300140649080276,
0.06926474720239639,
0.04082363843917847,
-0.036025408655405045,
-0.025538958609104156,
-0.008290487341582775,
-0.000044136930227978155,
-0.002348326612263918,
0.0011022139806300402,
-0.0138722974807024,
0.03459367901086807,
-0.016426192596554756,
0.042216669768095016,
-0.016784125939011574,
0.003243157407268882,
0.03391651064157486,
-0.05103921890258789,
-0.03871474042534828,
0.02567439153790474,
-0.013233823701739311,
0.031923696398735046,
0.033200643956661224,
-0.026080694049596786,
0.04898836463689804,
0.011357096955180168,
0.014917072840034962,
-0.06798779964447021,
0.028228288516402245,
0.03954669088125229,
0.015507178381085396,
0.012692088261246681,
-0.0948810949921608,
0.04453839361667633,
0.013340235687792301,
0.00304968049749732,
0.02006356045603752,
0.030530663207173347,
0.03389716148376465,
0.0003458400606177747,
0.016329454258084297,
-0.02404918521642685,
-0.02623547427356243,
0.0392371267080307,
0.011579595506191254,
-0.04353231564164162,
0.009557761251926422,
-0.054676588624715805,
-0.0461249053478241,
0.034961286932229996,
-0.01886400394141674,
-0.03618019074201584,
0.05448311194777489,
0.00006216202746145427,
0.04833054170012474,
-0.01674543134868145,
-0.017093688249588013,
-0.006379902362823486,
0.05920394882559776,
0.006868431810289621,
-0.01564261130988598,
-0.019105849787592888,
0.004094455856829882,
-0.0253648292273283,
0.00715381046757102,
-0.06454391032457352,
-0.0325041301548481,
0.022946367040276527,
0.02416527085006237,
-0.03109174594283104,
0.0015562803018838167,
0.00552860414609313,
-0.02468765899538994,
0.04043668508529663,
0.039507992565631866,
0.012179374694824219,
0.016339128836989403,
-0.018718894571065903,
-0.005267410073429346,
0.0022491696290671825,
-0.04097842052578926,
0.014123817905783653,
0.03728301078081131,
-0.015071854926645756,
-0.0426810160279274,
-0.039295170456171036,
-0.02817024476826191,
-0.07592035830020905,
0.01490739919245243
] |
52,231 |
osmnx.graph
|
graph_from_bbox
|
Download and create a graph within some bounding box.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
north : float
deprecated, do not use
south : float
deprecated, do not use
east : float
deprecated, do not use
west : float
deprecated, do not use
bbox : tuple of floats
bounding box as (north, south, east, west)
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
|
def graph_from_bbox(
north=None,
south=None,
east=None,
west=None,
bbox=None,
network_type="all",
simplify=True,
retain_all=False,
truncate_by_edge=False,
clean_periphery=None,
custom_filter=None,
):
"""
Download and create a graph within some bounding box.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
north : float
deprecated, do not use
south : float
deprecated, do not use
east : float
deprecated, do not use
west : float
deprecated, do not use
bbox : tuple of floats
bounding box as (north, south, east, west)
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
"""
if not (north is None and south is None and east is None and west is None):
msg = (
"The `north`, `south`, `east`, and `west` parameters are deprecated and "
"will be removed in the v2.0.0 release. Use the `bbox` parameter instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
bbox = (north, south, east, west)
# convert bounding box to a polygon
polygon = utils_geo.bbox_to_poly(bbox=bbox)
# create graph using this polygon geometry
G = graph_from_polygon(
polygon,
network_type=network_type,
simplify=simplify,
retain_all=retain_all,
truncate_by_edge=truncate_by_edge,
clean_periphery=clean_periphery,
custom_filter=custom_filter,
)
utils.log(f"graph_from_bbox returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
return G
|
(north=None, south=None, east=None, west=None, bbox=None, network_type='all', simplify=True, retain_all=False, truncate_by_edge=False, clean_periphery=None, custom_filter=None)
|
[
-0.0019182686228305101,
-0.038768183439970016,
-0.016240194439888,
-0.05309256911277771,
-0.09934715926647186,
-0.023264840245246887,
-0.04428965598344803,
-0.026113998144865036,
-0.008940458297729492,
-0.0444861464202404,
0.0061993724666535854,
0.04177453741431236,
-0.07859743386507034,
0.05446802079677582,
-0.0037972384598106146,
0.014795967377722263,
-0.048219528049230576,
-0.0762002095580101,
0.004231980536133051,
-0.014884389005601406,
-0.033502157777547836,
-0.05985194817185402,
0.05478241294622421,
0.0057867360301315784,
0.056904543191194534,
-0.013479460030794144,
0.032224949449300766,
0.0034239008091390133,
-0.008449223823845387,
0.013037349097430706,
0.01694757118821144,
-0.05061674863100052,
0.000014190137335390318,
-0.014088590629398823,
0.03314846754074097,
0.025858556851744652,
0.04806233197450638,
0.06944083422422409,
-0.06621833890676498,
-0.02481714077293873,
0.00586533360183239,
-0.10610653460025787,
-0.004578300751745701,
0.001440543564967811,
0.08071956783533096,
-0.029513336718082428,
-0.0025617850478738546,
0.019344793632626534,
-0.030810194090008736,
-0.021594645455479622,
-0.049594979733228683,
-0.04322858899831772,
0.01063030306249857,
0.019600234925746918,
-0.005654103122651577,
-0.04413245990872383,
-0.043542977422475815,
0.08402065932750702,
0.06515727192163467,
0.07227034121751785,
-0.038414496928453445,
-0.00235915114171803,
-0.011445751413702965,
-0.024483101442456245,
0.003527059918269515,
-0.021339204162359238,
-0.05407503619790077,
-0.04857321456074715,
-0.06456778943538666,
0.021280255168676376,
0.014353856444358826,
0.05631506070494652,
0.03980959951877594,
-0.0040502240881323814,
0.01613212376832962,
0.03582078218460083,
-0.00006911815580679104,
0.09541728347539902,
-0.05930176377296448,
0.04782653972506523,
-0.01664300635457039,
0.006616921629756689,
-0.016682306304574013,
-0.05336765944957733,
0.01908935233950615,
0.020631827414035797,
0.03568323701620102,
0.05458591878414154,
0.0223216712474823,
-0.05863368511199951,
-0.02515118010342121,
-0.04990937188267708,
-0.027037518098950386,
-0.00006167288665892556,
-0.008144658990204334,
-0.06185618042945862,
-0.04676547273993492,
0.018234604969620705,
-0.016878798604011536,
-0.022871853783726692,
-0.046451084315776825,
-0.045940201729536057,
-0.09321656078100204,
0.010826796293258667,
-0.00780079560354352,
-0.04146014526486397,
-0.010463283397257328,
-0.03318776562809944,
-0.021987631916999817,
0.006101125851273537,
-0.03696044534444809,
-0.0406348742544651,
0.001291945343837142,
0.03305022045969963,
0.000020090701582375914,
0.08056236803531647,
0.049516383558511734,
-0.01841144822537899,
0.00489514647051692,
-0.05273887887597084,
-0.02929719351232052,
0.10783568024635315,
-0.007034470327198505,
-0.0002832270984072238,
-0.0023640634026378393,
0.04861251264810562,
0.0740387812256813,
0.017320910468697548,
-0.016898447647690773,
-0.04660828039050102,
0.04625459015369415,
-0.00955941341817379,
-0.008321503177285194,
0.055057503283023834,
-0.011062588542699814,
-0.011209959164261818,
-0.041617341339588165,
-0.008891334757208824,
-0.038984328508377075,
0.0013300159480422735,
-0.0167805515229702,
-0.023225542157888412,
0.02957228571176529,
0.010026085190474987,
-0.0381787046790123,
0.01688862405717373,
-0.0260943491011858,
-0.09125161916017532,
0.03745167702436447,
-0.011092063039541245,
-0.0009916785638779402,
-0.02552451752126217,
-0.013410687446594238,
0.005934106186032295,
-0.02927754446864128,
-0.07270262390375137,
-0.007339035626500845,
-0.00855238363146782,
0.004450579639524221,
0.09360954165458679,
-0.028452271595597267,
0.0594196617603302,
0.03020106442272663,
-0.031655117869377136,
-0.043110694736242294,
0.013518759049475193,
0.009814854711294174,
-0.08740034699440002,
-0.012693486176431179,
-0.02145710028707981,
-0.01911882683634758,
0.05222799628973007,
-0.056118570268154144,
-0.03619411960244179,
-0.01065977755934,
-0.0010573811596259475,
0.035919029265642166,
0.005703226197510958,
-0.02183043770492077,
-0.03470076620578766,
0.01261488813906908,
-0.03163546696305275,
-0.0032593372743576765,
0.014039467088878155,
-0.03662640601396561,
0.05266028270125389,
0.01914829947054386,
-0.06181688234210014,
0.016495635733008385,
-0.04263911023736,
-0.01794968917965889,
0.014393155463039875,
-0.013194544240832329,
0.04621529206633568,
0.023343438282608986,
-0.04185313358902931,
0.007638688199222088,
0.07533564418554306,
-0.05266028270125389,
0.11766035854816437,
-0.013882271945476532,
0.01467807125300169,
0.048337422311306,
0.014186836779117584,
0.002885999623686075,
-0.008994493633508682,
-0.03475971519947052,
-0.040025744587183,
0.023284489288926125,
0.010325738228857517,
0.02302904799580574,
0.0111215366050601,
-0.020671125501394272,
0.02615329623222351,
-0.00949063990265131,
0.020985515788197517,
0.022478865459561348,
0.0406348742544651,
0.007093418389558792,
0.006081476341933012,
0.020789021626114845,
-0.026467686519026756,
-0.00639586616307497,
-0.031222831457853317,
-0.009863978251814842,
-0.009633097797632217,
0.023913269862532616,
-0.004384262952953577,
0.026133647188544273,
-0.06700431555509567,
0.048926904797554016,
-0.023048697039484978,
-0.004246717784553766,
-0.020415684208273888,
-0.034150585532188416,
-0.012880154885351658,
-0.014118064194917679,
-0.005187430884689093,
-0.0167805515229702,
0.0021516047418117523,
0.02281290479004383,
-0.06413550674915314,
-0.08260590583086014,
-0.0026575757656246424,
0.009721520356833935,
-0.059891246259212494,
-0.023441685363650322,
-0.03552604094147682,
0.029022103175520897,
-0.006002879235893488,
-0.05132412537932396,
0.06099161133170128,
0.05222799628973007,
-0.0022695008665323257,
0.02921859733760357,
-0.027175063267350197,
-0.07678969204425812,
-0.05686524510383606,
0.008743965066969395,
0.0033477596007287502,
0.03212670236825943,
-0.016250019893050194,
-0.03483831137418747,
0.006582535337656736,
0.06625764071941376,
0.0011015922063961625,
0.0050646220333874226,
0.022085878998041153,
0.006037265527993441,
0.0071474541909992695,
-0.03872888535261154,
0.0307905450463295,
0.014422629028558731,
-0.021339204162359238,
0.04727635532617569,
-0.0651179775595665,
0.06841906905174255,
-0.04405386373400688,
0.03438637778162956,
-0.01101346593350172,
-0.026565933600068092,
0.017124416306614876,
-0.02652663365006447,
-0.0204746313393116,
0.008174133487045765,
-0.010699075646698475,
0.03560463711619377,
-0.0277841929346323,
0.02906140126287937,
-0.07498195022344589,
0.0352509506046772,
-0.035427793860435486,
0.010512406937777996,
0.02039603516459465,
0.013960869051516056,
-0.01895180717110634,
-0.0035442530643194914,
-0.0015559835592284799,
0.01890268363058567,
-0.043189290910959244,
0.0041754888370633125,
0.007363597396761179,
0.042246121913194656,
0.008714490570127964,
0.08637858182191849,
0.011239432729780674,
-0.003507410641759634,
-0.031380027532577515,
0.011416277848184109,
0.0012047513155266643,
-0.048730410635471344,
-0.03996679559350014,
0.02238062024116516,
-0.03346285969018936,
-0.013341914862394333,
0.006086389068514109,
0.01987532712519169,
-0.03334496170282364,
-0.0003306618600618094,
-0.0006729905144311488,
0.009628186002373695,
0.016819851472973824,
-0.0009179934859275818,
0.019600234925746918,
-0.03546709194779396,
0.019315319135785103,
-0.004401456564664841,
0.061581090092659,
0.02161429449915886,
-0.005644278135150671,
0.010895569808781147,
0.001115715131163597,
0.028805959969758987,
0.05222799628973007,
-0.0654323622584343,
0.007093418389558792,
0.026899972930550575,
-0.02017989195883274,
0.011986108496785164,
-0.03978995233774185,
-0.017389683052897453,
0.006037265527993441,
0.007363597396761179,
-0.003502498148009181,
-0.014786142855882645,
0.022793255746364594,
-0.03318776562809944,
-0.017360208556056023,
0.0015670363791286945,
-0.02935614250600338,
-0.04157804325222969,
0.07109137624502182,
-0.0072113145142793655,
0.007540441583842039,
-0.025681711733341217,
0.03882713243365288,
0.031733714044094086,
-0.0372551828622818,
0.004769881721585989,
0.0008179045398719609,
-0.013882271945476532,
0.026035400107502937,
0.0006785169243812561,
-0.026958920061588287,
-0.007044295314699411,
0.015925806015729904,
0.04385736957192421,
0.05152061954140663,
0.03988819941878319,
-0.03413093462586403,
0.005172693636268377,
-0.03470076620578766,
-0.053289059549570084,
0.07525704056024551,
0.00991310179233551,
0.03851274400949478,
0.001955111278221011,
-0.052424490451812744,
0.012575590051710606,
0.027469802647829056,
-0.037412378937006,
-0.0443289540708065,
0.06869415938854218,
-0.0212409570813179,
0.08284169435501099,
0.017635298892855644,
0.07568933069705963,
0.07156296819448471,
0.000627858389634639,
-0.05490030720829964,
-0.049594979733228683,
-0.004693740513175726,
0.022636061534285545,
0.06724010407924652,
0.012133479118347168,
0.022616412490606308,
0.08967967331409454,
-0.011711018159985542,
0.025406621396541595,
-0.040281184017658234,
-0.014972811564803123,
0.005231641698628664,
0.0002486871962901205,
0.044250354170799255,
-0.02815753035247326,
-0.04216752201318741,
0.01076784823089838,
-0.0392594188451767,
0.04244261607527733,
-0.08716455847024918,
0.03582078218460083,
-0.0014454559423029423,
0.025288725271821022,
0.06417480856180191,
0.015493519604206085,
0.09415972977876663,
0.04114575684070587,
0.01930549554526806,
0.024483101442456245,
-0.00705411983653903,
0.049712877720594406,
0.01673142984509468,
0.0518743060529232,
-0.0040870667435228825,
0.06900855153799057,
-0.02829507738351822,
-0.012231726199388504,
-0.04629388824105263,
0.001969848293811083,
0.05812280252575874,
0.014029642567038536,
-0.060677219182252884,
-0.03819835186004639,
-0.029454389587044716,
-0.016770727932453156,
0.00860641896724701,
-0.007903954945504665,
-0.019384091719985008,
0.03815905377268791,
0.01683950051665306,
0.005103921052068472,
0.0029867026023566723,
-0.007343947887420654,
-0.060598623007535934,
0.002716523827984929,
-0.043385785073041916,
-0.017075292766094208,
0.029729479923844337,
0.029454389587044716,
-0.010708900168538094,
0.045390017330646515,
-0.03737308084964752,
0.024974334985017776,
-0.00916642602533102,
-0.0013508934061974287,
-0.0200128722935915,
0.008100448176264763,
-0.029022103175520897,
-0.024974334985017776,
0.031655117869377136,
0.05521469935774803,
-0.030377907678484917,
-0.002431608038023114,
0.021378502249717712,
0.021024813875555992,
-0.020671125501394272,
0.024542048573493958,
-0.018941981717944145,
0.005968492943793535,
-0.018126534298062325,
-0.009657659567892551,
-0.005708138924092054,
0.01279173232614994,
-0.009795205667614937,
0.057611919939517975,
0.017674598842859268,
-0.023500632494688034,
-0.030122466385364532,
0.01922689750790596,
-0.08354907482862473,
-0.020376384258270264,
0.01560159120708704,
0.014579824171960354,
0.01336156390607357,
-0.024365205317735672,
0.06908714771270752,
0.009387481026351452,
-0.025328023359179497,
0.042403317987918854,
-0.06071651726961136,
-0.054350126534700394,
0.03662640601396561,
0.010070296004414558,
0.0026747689116746187,
0.02444380149245262,
0.0669650137424469,
-0.01464859675616026,
-0.012408570386469364,
0.009898364543914795,
-0.041185054928064346,
0.03346285969018936,
-0.014746843837201595,
0.03312882035970688,
-0.031733714044094086,
0.016957396641373634,
0.04165663942694664,
-0.027528751641511917,
0.012447868473827839,
0.04220682382583618,
0.014157363213598728,
-0.014904038980603218,
-0.01642686314880848,
0.050145164132118225,
0.028314726427197456,
-0.048376720398664474,
0.06331023573875427,
0.02536732144653797,
0.023579230532050133,
-0.002957228571176529,
-0.0005007516010664403,
0.042403317987918854,
0.05490030720829964,
0.04326788708567619,
0.03027966246008873,
-0.04075276851654053,
0.01044363435357809,
0.008409925736486912,
0.0009689590078778565,
0.010178367607295513,
-0.03055475279688835,
0.03055475279688835,
0.010325738228857517,
-0.011632420122623444,
0.01730125956237316,
0.019806552678346634,
-0.07710408419370651,
0.07254543155431747,
0.0003702676040120423,
0.07541424036026001,
-0.0343274287879467,
0.0018666890682652593,
-0.006282882299274206,
-0.04330718517303467,
0.03499550744891167,
0.01041415985673666,
0.06841906905174255,
0.07093418389558792,
-0.00896010734140873,
0.01670195534825325,
-0.014029642567038536,
0.06232776492834091,
0.040988560765981674,
0.03261793404817581,
-0.04189243167638779,
0.02359887957572937,
-0.0017586175817996264,
-0.041263654828071594,
-0.021516047418117523,
-0.01482544094324112,
-0.013459810987114906,
-0.01759600080549717,
0.0411064587533474,
-0.015169304795563221,
0.06586465239524841,
-0.009240111336112022,
0.04035978391766548,
0.0008860632660798728,
0.006744642276316881,
0.01681002601981163,
0.0260943491011858,
0.040831368416547775,
-0.043818071484565735,
0.01688862405717373,
-0.07183805853128433,
0.02929719351232052,
0.00749623030424118,
-0.08708595484495163,
-0.037707120180130005,
-0.054625216871500015,
-0.028845258057117462,
0.01062047854065895,
-0.02652663365006447,
0.004214787390083075,
-0.040909964591264725,
0.042049627751111984,
0.07875462621450424,
-0.054271530359983444,
-0.027764543890953064,
0.04578300565481186,
0.01553281769156456,
0.04700126498937607,
0.07093418389558792,
0.08001218736171722,
0.03945591300725937,
-0.03362005203962326,
-0.003750571282580495,
-0.02181078866124153,
-0.05423222854733467,
-0.04476124048233032,
-0.01884373463690281,
-0.02281290479004383,
0.08299889415502548,
0.00397162651643157,
0.004595493897795677,
-0.020592527464032173,
0.014137713238596916,
-0.03503480553627014,
-0.006828152108937502,
-0.023559581488370895,
-0.03698009252548218,
0.056197166442871094,
0.021948333829641342,
-0.02281290479004383,
0.008920809254050255,
-0.052424490451812744,
-0.03703904151916504,
-0.0288649071007967,
0.03931836783885956,
-0.008370626717805862,
0.001925637130625546,
0.02686067298054695,
-0.008768525905907154,
0.03250003978610039,
-0.01849004626274109,
-0.037490975111722946,
-0.015847207978367805,
-0.008852035738527775,
-0.042403317987918854,
0.01279173232614994,
0.04542931914329529,
-0.010045734234154224,
-0.03996679559350014,
-0.005737612955272198,
-0.03975065425038338,
0.03385584428906441,
-0.05407503619790077,
0.053917840123176575,
-0.006769204046577215,
-0.012929278425872326,
0.007923603989183903,
-0.06708291172981262,
0.03090844117105007,
0.04456474632024765,
-0.020454982295632362,
0.005187430884689093,
0.00732429837808013,
0.01792021468281746,
0.016770727932453156,
0.013626830652356148,
0.007506054826080799,
-0.003256881143897772,
0.006867450661957264,
0.050577450543642044,
0.004789531230926514,
0.02737155742943287,
0.07305631786584854,
-0.03163546696305275,
-0.033227067440748215,
0.04668687656521797,
-0.030083168298006058,
0.024483101442456245,
-0.03701939061284065,
0.03589937835931778,
0.03413093462586403,
-0.06967662274837494,
0.01737985759973526,
-0.03538849577307701,
0.010433809831738472,
0.02324519120156765,
0.007157278712838888,
0.026958920061588287,
-0.022695008665323257,
0.04845532029867172,
0.042757004499435425,
-0.06232776492834091,
-0.009205724112689495,
-0.01567036285996437,
-0.03405233845114708,
-0.05733682960271835,
0.022203775122761726,
0.017772844061255455,
0.05262098088860512,
-0.03872888535261154,
-0.01958058588206768,
-0.010158718563616276,
-0.010856270790100098,
-0.011308206245303154,
0.014687895774841309,
0.005069534759968519,
-0.0176254753023386,
0.038414496928453445,
-0.011072413995862007,
0.05478241294622421,
0.02145710028707981,
0.008675191551446915,
0.016308967024087906,
0.016279494389891624,
-0.05120622739195824,
0.007339035626500845,
-0.011966459453105927,
0.0222430732101202,
-0.010168543085455894,
-0.06751519441604614,
0.07309561222791672,
0.03495620936155319,
0.018883034586906433,
-0.03310916945338249,
0.03668535128235817,
0.010040822438895702,
-0.001415981911122799,
-0.010080121457576752,
-0.07639670372009277,
0.0424819141626358,
-0.006724993232637644,
0.05301396921277046,
0.005565681029111147,
0.027568049728870392,
0.03774641826748848,
-0.028019985184073448,
-0.04067417234182358,
-0.011111712083220482,
0.014226135797798634,
0.018264079466462135,
-0.006764291785657406,
0.02259676344692707,
-0.0030800369568169117,
-0.014933512546122074,
-0.0575726218521595,
0.012752434238791466,
-0.013960869051516056,
0.01428508386015892,
0.03218565136194229,
-0.003974082879722118,
0.03819835186004639,
-0.004072329495102167,
-0.024718893691897392,
-0.0009843100560829043,
0.0115439984947443,
-0.017959514632821083,
0.023127295076847076,
0.004391631577163935,
-0.015238077379763126,
-0.005604979582130909,
-0.0009235198376700282,
-0.10673531889915466,
-0.04444684833288193,
0.05344625562429428,
-0.016898447647690773,
-0.013597356155514717,
0.024325905367732048,
-0.0033968829084187746,
0.004787074867635965,
0.051638513803482056,
0.03662640601396561,
-0.0016161598032340407,
-0.024895736947655678,
0.016250019893050194,
-0.009068178944289684,
-0.03424883261322975,
-0.0614238940179348,
0.021123060956597328,
0.03853239119052887,
0.018922332674264908,
-0.027764543890953064,
-0.043110694736242294,
-0.0009480815497227013,
-0.02878631092607975,
0.009672396816313267
] |
52,232 |
osmnx.convert
|
graph_from_gdfs
|
Convert node and edge GeoDataFrames to a MultiDiGraph.
This function is the inverse of `graph_to_gdfs` and is designed to work in
conjunction with it.
However, you can convert arbitrary node and edge GeoDataFrames as long as
1) `gdf_nodes` is uniquely indexed by `osmid`, 2) `gdf_nodes` contains `x`
and `y` coordinate columns representing node geometries, 3) `gdf_edges` is
uniquely multi-indexed by `u`, `v`, `key` (following normal MultiDiGraph
structure). This allows you to load any node/edge shapefiles or GeoPackage
layers as GeoDataFrames then convert them to a MultiDiGraph for graph
analysis. Note that any `geometry` attribute on `gdf_nodes` is discarded
since `x` and `y` provide the necessary node geometry information instead.
Parameters
----------
gdf_nodes : geopandas.GeoDataFrame
GeoDataFrame of graph nodes uniquely indexed by osmid
gdf_edges : geopandas.GeoDataFrame
GeoDataFrame of graph edges uniquely multi-indexed by u, v, key
graph_attrs : dict
the new G.graph attribute dict. if None, use crs from gdf_edges as the
only graph-level attribute (gdf_edges must have crs attribute set)
Returns
-------
G : networkx.MultiDiGraph
|
def graph_from_gdfs(gdf_nodes, gdf_edges, graph_attrs=None):
"""
Convert node and edge GeoDataFrames to a MultiDiGraph.
This function is the inverse of `graph_to_gdfs` and is designed to work in
conjunction with it.
However, you can convert arbitrary node and edge GeoDataFrames as long as
1) `gdf_nodes` is uniquely indexed by `osmid`, 2) `gdf_nodes` contains `x`
and `y` coordinate columns representing node geometries, 3) `gdf_edges` is
uniquely multi-indexed by `u`, `v`, `key` (following normal MultiDiGraph
structure). This allows you to load any node/edge shapefiles or GeoPackage
layers as GeoDataFrames then convert them to a MultiDiGraph for graph
analysis. Note that any `geometry` attribute on `gdf_nodes` is discarded
since `x` and `y` provide the necessary node geometry information instead.
Parameters
----------
gdf_nodes : geopandas.GeoDataFrame
GeoDataFrame of graph nodes uniquely indexed by osmid
gdf_edges : geopandas.GeoDataFrame
GeoDataFrame of graph edges uniquely multi-indexed by u, v, key
graph_attrs : dict
the new G.graph attribute dict. if None, use crs from gdf_edges as the
only graph-level attribute (gdf_edges must have crs attribute set)
Returns
-------
G : networkx.MultiDiGraph
"""
if not ("x" in gdf_nodes.columns and "y" in gdf_nodes.columns): # pragma: no cover
msg = "gdf_nodes must contain x and y columns"
raise ValueError(msg)
# if gdf_nodes has a geometry attribute set, drop that column (as we use x
# and y for geometry information) and warn the user if the geometry values
# differ from the coordinates in the x and y columns
if hasattr(gdf_nodes, "geometry"):
try:
all_x_match = (gdf_nodes.geometry.x == gdf_nodes["x"]).all()
all_y_match = (gdf_nodes.geometry.y == gdf_nodes["y"]).all()
assert all_x_match
assert all_y_match
except (AssertionError, ValueError): # pragma: no cover
# AssertionError if x/y coords don't match geometry column
# ValueError if geometry column contains non-point geometry types
warn(
"discarding the gdf_nodes geometry column, though its "
"values differ from the coordinates in the x and y columns",
stacklevel=2,
)
gdf_nodes = gdf_nodes.drop(columns=gdf_nodes.geometry.name)
# create graph and add graph-level attribute dict
if graph_attrs is None:
graph_attrs = {"crs": gdf_edges.crs}
G = nx.MultiDiGraph(**graph_attrs)
# add edges and their attributes to graph, but filter out null attribute
# values so that edges only get attributes with non-null values
attr_names = gdf_edges.columns.to_list()
for (u, v, k), attr_vals in zip(gdf_edges.index, gdf_edges.to_numpy()):
data_all = zip(attr_names, attr_vals)
data = {name: val for name, val in data_all if isinstance(val, list) or pd.notna(val)}
G.add_edge(u, v, key=k, **data)
# add any nodes with no incident edges, since they wouldn't be added above
G.add_nodes_from(set(gdf_nodes.index) - set(G.nodes))
# now all nodes are added, so set nodes' attributes
for col in gdf_nodes.columns:
nx.set_node_attributes(G, name=col, values=gdf_nodes[col].dropna())
utils.log("Created graph from node/edge GeoDataFrames")
return G
|
(gdf_nodes, gdf_edges, graph_attrs=None)
|
[
0.01743277534842491,
-0.018444878980517387,
0.010575064457952976,
0.004185569006949663,
-0.07211475074291229,
0.005618594121187925,
-0.03176302835345268,
0.02279597893357277,
0.06004517525434494,
-0.014926164411008358,
0.005784125067293644,
0.018151653930544853,
-0.016382835805416107,
0.08323843032121658,
0.0031167117413133383,
-0.015455863438546658,
-0.07847113907337189,
-0.0007892280118539929,
0.06375306844711304,
0.006242882460355759,
-0.045970313251018524,
-0.05455900728702545,
0.047975603491067886,
-0.02228519879281521,
0.026787640526890755,
-0.007784685119986534,
0.04861881211400032,
0.021282553672790527,
0.031971123069524765,
0.0627693459391594,
-0.036378975957632065,
-0.06602320820093155,
-0.03832751512527466,
-0.005405768286436796,
0.025803912431001663,
-0.002149537904188037,
0.01900295540690422,
0.013185723684728146,
-0.09057854861021042,
-0.03567901626229286,
-0.022417623549699783,
-0.054748184978961945,
-0.008352220058441162,
-0.034543950110673904,
0.018728647381067276,
0.028074052184820175,
-0.017517905682325363,
0.009127850644290447,
-0.01944752410054207,
-0.045175764709711075,
-0.008139394223690033,
-0.07801710814237595,
-0.036908674985170364,
0.048240453004837036,
0.01398027315735817,
0.06814200431108475,
-0.03938691318035126,
0.03306835889816284,
0.014670773409307003,
-0.006843523122370243,
0.0019674538634717464,
-0.02584174834191799,
-0.01473698578774929,
-0.03874370455741882,
-0.022720307111740112,
-0.014992376789450645,
-0.05300774425268173,
-0.05667780339717865,
-0.06182345375418663,
0.04029496759176254,
-0.058607421815395355,
0.005850337445735931,
0.035584427416324615,
-0.01641121320426464,
0.01602339744567871,
0.08323843032121658,
0.006521920207887888,
0.024422911927103996,
-0.039727430790662766,
0.015626123175024986,
-0.030382027849555016,
-0.027260586619377136,
-0.011218270286917686,
-0.016931453719735146,
0.06432060152292252,
0.04627300053834915,
0.02637144736945629,
0.09564851969480515,
-0.007434705272316933,
-0.09186495840549469,
0.009416347369551659,
-0.0032633247319608927,
-0.020809607580304146,
0.010319673456251621,
0.004284887574613094,
-0.04211108013987541,
-0.042829956859350204,
0.00775157893076539,
0.007590777240693569,
0.004336911253631115,
-0.008503562770783901,
-0.01716792583465576,
-0.039197731763124466,
0.05996950715780258,
-0.03823292255401611,
-0.08876243233680725,
-0.0564129538834095,
-0.019712373614311218,
0.0014271134277805686,
-0.03416559100151062,
-0.09928074479103088,
-0.0009813621873036027,
0.12190646678209305,
0.004417312331497669,
0.00820560660213232,
0.0036369517911225557,
0.011502037756145,
0.021150128915905952,
0.027071407064795494,
-0.045629795640707016,
-0.02482018619775772,
0.066288061439991,
0.02094203233718872,
0.02196359448134899,
-0.0008359313942492008,
-0.007429975550621748,
0.06651507318019867,
0.0005826099077239633,
-0.015285602770745754,
-0.040257129818201065,
0.035300660878419876,
-0.0036227635573595762,
-0.0013585363049060106,
0.04392718896269798,
0.026787640526890755,
-0.07079049944877625,
-0.04835396260023117,
0.004689255729317665,
0.024971529841423035,
-0.036605991423130035,
-0.018993496894836426,
-0.06110457330942154,
-0.006947571411728859,
0.020752854645252228,
-0.046197328716516495,
0.03552767634391785,
-0.017234139144420624,
-0.03730595111846924,
-0.058910105377435684,
-0.057850707322359085,
-0.01294925156980753,
0.008437350392341614,
-0.044116366654634476,
-0.020790690556168556,
-0.04018146172165871,
-0.04328398406505585,
-0.03469529002904892,
-0.0001743986940709874,
0.01873810589313507,
0.050888948142528534,
-0.06844469159841537,
-0.013876224867999554,
0.004426770843565464,
0.011038551107048988,
-0.015493698418140411,
-0.017177384346723557,
0.03598170354962349,
-0.08740035444498062,
-0.018312454223632812,
0.04820261895656586,
0.011606086045503616,
0.05996950715780258,
-0.02898210845887661,
-0.05349960923194885,
0.010716947726905346,
0.022152774035930634,
0.07343899458646774,
-0.021793333813548088,
-0.008740034885704517,
0.03881937637925148,
-0.009761597961187363,
-0.03199004381895065,
0.002273685997352004,
0.056564297527074814,
0.0036227635573595762,
0.05073760822415352,
-0.0017439869698137045,
-0.00429198145866394,
0.04392718896269798,
-0.04684053361415863,
0.03647356480360031,
-0.024233734235167503,
-0.03904639184474945,
0.04574330151081085,
0.05947764217853546,
-0.025274213403463364,
0.0057983133010566235,
0.005684806499630213,
-0.034581784158945084,
0.1336355209350586,
-0.00030238961335271597,
0.019229969009757042,
0.03216030076146126,
-0.000493636995088309,
-0.034316934645175934,
-0.024706680327653885,
-0.02536880411207676,
-0.025576898828148842,
-0.03698434680700302,
0.01993938721716404,
0.007207691203802824,
-0.015569370239973068,
0.007212420925498009,
0.028774011880159378,
0.013507327064871788,
0.00873530562967062,
-0.036587074398994446,
0.021339306607842445,
-0.03900855407118797,
-0.0012899591820314527,
-0.014651855453848839,
-0.011681756936013699,
-0.011861476115882397,
-0.03412775695323944,
0.0041524628177285194,
-0.06129375472664833,
0.031100904569029808,
0.009047449566423893,
0.08452484011650085,
-0.06545567512512207,
0.027563270181417465,
-0.043359655886888504,
0.007595506962388754,
-0.023741871118545532,
0.05455900728702545,
-0.02612551674246788,
0.043094806373119354,
0.019579948857426643,
0.019598865881562233,
0.031460344791412354,
-0.03202787786722183,
-0.0387815423309803,
-0.0387815423309803,
0.012580353766679764,
0.06973110139369965,
-0.014538348652422428,
0.01332760788500309,
0.032973770052194595,
0.018851611763238907,
0.022190608084201813,
0.0026792369317263365,
-0.024006720632314682,
0.005708453711122274,
0.035603348165750504,
-0.010225084610283375,
-0.09451345354318619,
-0.057812873274087906,
-0.0007844985811971128,
0.030476616695523262,
-0.024668844416737556,
0.023420266807079315,
0.0028092970605939627,
-0.035054728388786316,
0.05081327632069588,
0.02200143039226532,
-0.0034406795166432858,
0.01590043120086193,
-0.0002310043782927096,
-0.038970720022916794,
-0.014708609320223331,
0.037116773426532745,
0.03751404583454132,
0.023212172091007233,
-0.0030008400790393353,
0.036908674985170364,
-0.04718105494976044,
-0.0034123025834560394,
-0.05868309363722801,
0.034014251083135605,
0.0057510188780725,
-0.011596626602113247,
-0.03492230549454689,
-0.05671564117074013,
0.02482018619775772,
-0.03386290743947029,
0.014538348652422428,
-0.01750844717025757,
-0.01059398241341114,
0.025520145893096924,
-0.051910512149333954,
-0.02873617596924305,
-0.007141478825360537,
-0.034525029361248016,
0.03874370455741882,
-0.028263229876756668,
0.04479740932583809,
0.01059398241341114,
-0.007846168242394924,
-0.014519430696964264,
0.01282628532499075,
0.04532710835337639,
0.008834624662995338,
0.044910915195941925,
0.02429048717021942,
0.022966239601373672,
-0.022871650755405426,
0.027903791517019272,
0.001733345678076148,
-0.007666448596864939,
0.04737023264169693,
-0.035092566162347794,
0.005840878468006849,
-0.033238619565963745,
-0.017584118992090225,
-0.03618979826569557,
0.012391175143420696,
0.013185723684728146,
-0.014699149876832962,
0.04532710835337639,
-0.005926008801907301,
-0.03751404583454132,
0.022587882354855537,
-0.052932076156139374,
0.06942842155694962,
0.0034217615611851215,
0.06908790022134781,
0.03306835889816284,
0.06136942282319069,
0.06447194516658783,
0.017527364194393158,
0.003424126422032714,
-0.009799432940781116,
0.022323032841086388,
0.03308727592229843,
0.010310214944183826,
0.013460032641887665,
0.02792271040380001,
-0.028074052184820175,
0.03344671428203583,
-0.009931857697665691,
-0.029587477445602417,
0.04858097434043884,
0.004660879261791706,
-0.03577360883355141,
-0.017480069771409035,
0.006928653456270695,
-0.006072621792554855,
-0.04059765115380287,
-0.038705870509147644,
-0.0018811412155628204,
-0.019296182319521904,
0.08679497987031937,
-0.02867942303419113,
0.006871900055557489,
-0.006096269004046917,
0.0424894355237484,
-0.028319984674453735,
0.00660705054178834,
0.020128564909100533,
0.04396502673625946,
0.00339811434969306,
-0.018397584557533264,
0.05153215676546097,
-0.06057487428188324,
0.004835869185626507,
-0.016354460269212723,
0.005524004809558392,
0.04638650640845299,
0.03136575222015381,
-0.07347683608531952,
0.012258750386536121,
-0.030949560925364494,
-0.003908895421773195,
0.001235570409335196,
-0.018236782401800156,
0.043851517140865326,
-0.017924638465046883,
-0.02094203233718872,
-0.02637144736945629,
0.02171766385436058,
-0.03620871528983116,
-0.06696910411119461,
0.046462178230285645,
0.023458102717995644,
0.060461368411779404,
-0.04271644726395607,
0.07847113907337189,
0.010518310591578484,
0.03361697494983673,
-0.027052490040659904,
-0.010896666906774044,
0.0005778804188594222,
0.02920912206172943,
0.053423937410116196,
0.000686362327542156,
-0.031952206045389175,
0.06776364892721176,
0.003407573327422142,
0.008730576373636723,
-0.02716599591076374,
-0.03410883992910385,
-0.005609135143458843,
0.001976912608370185,
0.05278073251247406,
0.020223155617713928,
0.029360463842749596,
0.02979557402431965,
-0.040446311235427856,
0.03751404583454132,
0.012523599900305271,
0.04933768883347511,
0.03365480899810791,
-0.0008388872956857085,
0.024649925529956818,
0.008692740462720394,
0.04453255981206894,
-0.0023540868423879147,
0.02816864103078842,
0.07162288576364517,
0.008125205524265766,
0.010338591411709785,
-0.0010830454993993044,
-0.012580353766679764,
0.015966644510626793,
-0.020015059038996696,
-0.05202401801943779,
-0.023401349782943726,
-0.003915989771485329,
-0.021679827943444252,
0.08361678570508957,
0.00011794081365223974,
-0.0033579140435904264,
0.005112542305141687,
-0.006384765729308128,
0.010981797240674496,
-0.029814492911100388,
-0.0196556206792593,
0.0037220821250230074,
-0.013516785576939583,
0.015559910796582699,
-0.004923364147543907,
-0.03346563130617142,
0.014037026092410088,
-0.058910105377435684,
-0.02118796482682228,
-0.048278290778398514,
-0.0370221845805645,
0.0033366314601153135,
-0.014538348652422428,
0.01716792583465576,
0.04192189872264862,
-0.015238308347761631,
0.019135380163788795,
0.007779955398291349,
-0.041013844311237335,
0.029814492911100388,
0.032500822097063065,
-0.014254581183195114,
-0.05054842680692673,
0.021150128915905952,
-0.0020478544756770134,
-0.023968884721398354,
-0.002260680077597499,
0.033219702541828156,
0.005126730538904667,
0.013791094534099102,
0.07922784984111786,
-0.022398704662919044,
-0.04006795212626457,
-0.015039671212434769,
0.07067699730396271,
-0.050586264580488205,
-0.00014306604862213135,
-0.07710905373096466,
0.011852017603814602,
0.03422234579920769,
-0.05724534019827843,
-0.021074457094073296,
0.01293979212641716,
-0.06057487428188324,
-0.019523195922374725,
-0.020317744463682175,
0.060688383877277374,
0.011700674891471863,
-0.011700674891471863,
0.021623073145747185,
0.04426771029829979,
-0.032179221510887146,
-0.027790285646915436,
-0.043548833578825,
-0.03410883992910385,
-0.033257536590099335,
-0.018728647381067276,
0.0028092970605939627,
0.059893835335969925,
0.05558057129383087,
0.01267494261264801,
-0.02869834005832672,
0.007713743019849062,
-0.052894238382577896,
-0.03618979826569557,
0.04059765115380287,
-0.04184623062610626,
0.0037173526361584663,
0.04789993166923523,
-0.01849217340350151,
0.008465726859867573,
0.04003011807799339,
0.004835869185626507,
0.00450480729341507,
-0.0008040075772441924,
-0.046991877257823944,
0.05278073251247406,
0.0380815826356411,
-0.0066259680315852165,
0.032179221510887146,
0.012391175143420696,
0.02357161045074463,
0.005164566449820995,
0.0072739035822451115,
0.01835029013454914,
-0.022171691060066223,
0.009312299080193043,
0.015332897193729877,
-0.047748591750860214,
0.023439185693860054,
0.041013844311237335,
0.031403589993715286,
0.024933693930506706,
-0.021339306607842445,
-0.0027430846821516752,
0.031176576390862465,
-0.0025042470078915358,
-0.0313846729695797,
-0.005836149211972952,
-0.05565623939037323,
0.0883084088563919,
0.005145648494362831,
0.024517500773072243,
-0.05455900728702545,
0.016600390896201134,
0.002570459386333823,
-0.06439627707004547,
0.015058589167892933,
-0.005216590128839016,
-0.05153215676546097,
0.04419203847646713,
-0.042565107345581055,
0.09020019322633743,
-0.002754908287897706,
0.036908674985170364,
0.03840318322181702,
-0.0005258563905954361,
0.004750738851726055,
0.04627300053834915,
0.024120226502418518,
-0.03104415163397789,
-0.01679902896285057,
-0.0139708137139678,
-0.028660504147410393,
-0.013649210333824158,
-0.008494103327393532,
0.054710350930690765,
-0.0022429446689784527,
0.004294346086680889,
-0.026730887591838837,
0.005944926291704178,
0.002887333044782281,
-0.016751734539866447,
0.0336737297475338,
-0.020771771669387817,
-0.0011598991695791483,
0.006356389261782169,
-0.04264077916741371,
-0.01226820982992649,
-0.0008678552112542093,
-0.056791309267282486,
-0.012495223432779312,
-0.0018184758955612779,
-0.07272011786699295,
-0.0352628268301487,
0.023401349782943726,
0.07779009640216827,
0.03668166324496269,
0.043889354914426804,
0.05849391594529152,
-0.034543950110673904,
0.036303307861089706,
0.03588711470365524,
-0.034316934645175934,
0.0026863310486078262,
-0.0040389555506408215,
0.08437349647283554,
0.0005879305535927415,
-0.04339748993515968,
0.022966239601373672,
0.0021258906926959753,
-0.007936027832329273,
0.004119356628507376,
-0.04869448021054268,
-0.034052085131406784,
0.06288284808397293,
-0.016174741089344025,
-0.006460437085479498,
-0.006290176883339882,
-0.042300257831811905,
0.024687761440873146,
-0.010272379033267498,
-0.01794355735182762,
-0.013393820263445377,
0.04782425984740257,
0.05561840534210205,
0.01708279550075531,
-0.04710538312792778,
-0.04684053361415863,
-0.009789974428713322,
-0.04835396260023117,
0.05955331400036812,
-0.01123718824237585,
-0.05769936740398407,
-0.027298420667648315,
-0.031952206045389175,
-0.014907246455550194,
-0.03163060173392296,
0.02224736288189888,
0.01059398241341114,
-0.030930643901228905,
-0.0036369517911225557,
-0.04063548892736435,
0.07714688777923584,
-0.023685116320848465,
-0.07169855386018753,
0.010575064457952976,
-0.022682473063468933,
0.031933289021253586,
-0.074044369161129,
0.03448719531297684,
-0.002802202943712473,
-0.04858097434043884,
0.032198138535022736,
-0.041505709290504456,
-0.006592861842364073,
-0.018766483291983604,
-0.06314770132303238,
-0.03804374486207962,
-0.03501689434051514,
0.040748994797468185,
-0.018397584557533264,
0.06076405569911003,
-0.018984036520123482,
0.008125205524265766,
0.013422196730971336,
0.01164392102509737,
-0.026711968705058098,
0.029890162870287895,
0.051305141299963,
-0.08815706521272659,
-0.02712816186249256,
0.008825165219604969,
-0.0261822696775198,
0.04003011807799339,
-0.010253461077809334,
0.07268228381872177,
0.00862179882824421,
-0.0274119284003973,
-0.0274119284003973,
0.03912206366658211,
-0.023250006139278412,
0.025557981804013252,
0.06901222467422485,
-0.03881937637925148,
-0.015115342102944851,
0.010121036320924759,
0.03594386577606201,
-0.026976818218827248,
-0.029852328822016716,
0.02998475357890129,
0.021604156121611595,
-0.02540663816034794,
0.0454784519970417,
0.05198618397116661,
0.1471806764602661,
-0.028811847791075706,
-0.01126556470990181,
-0.029625313356518745,
-0.02949288859963417,
0.00981835089623928,
-0.010102118365466595,
0.05531572178006172,
-0.0034950682893395424,
0.0290010254830122,
0.01840704306960106,
0.047483742237091064,
0.020223155617713928,
-0.033522386103868484,
0.0002889402094297111,
0.0342034287750721,
-0.01833137311041355,
-0.01591935008764267,
0.007964404299855232,
-0.033768318593502045,
0.03641681373119354,
-0.04714322090148926,
0.052402377128601074,
0.05592109262943268,
-0.009752138517796993,
-0.04237592965364456,
0.08089262247085571,
-0.019362393766641617,
-0.01282628532499075,
-0.05592109262943268,
-0.03522498905658722,
0.04532710835337639,
0.044116366654634476,
0.010537228547036648,
-0.012883039191365242,
0.02200143039226532,
0.017848968505859375,
-0.023987801745533943,
-0.030344191938638687,
0.025936339050531387,
0.013147888705134392,
0.045894645154476166,
0.042829956859350204,
-0.03471421077847481,
-0.025576898828148842,
-0.007609695196151733,
-0.03775997832417488,
0.016174741089344025,
0.00473418552428484,
0.033503469079732895,
0.07241743057966232,
0.024271570146083832,
0.024725597351789474,
-0.02686331234872341,
-0.04933768883347511,
0.0013313419185578823,
0.00678204046562314,
-0.04767291992902756,
0.05921279266476631,
0.0034052084665745497,
-0.030173931270837784,
-0.03694651275873184,
-0.011946606449782848,
-0.04869448021054268,
-0.011747969314455986,
0.008148852735757828,
0.04264077916741371,
-0.027601106092333794,
0.023231089115142822,
0.036587074398994446,
0.004502442199736834,
-0.014708609320223331,
0.0012030554935336113,
-0.0009547589579597116,
-0.008810977451503277,
-0.008569775149226189,
-0.004589937161654234,
-0.030703630298376083,
-0.07877382636070251,
-0.03575468808412552,
0.02480126917362213,
-0.017461152747273445,
-0.006488814018666744,
-0.021055540069937706,
0.025217460468411446,
-0.02408239059150219,
0.05921279266476631
] |
52,233 |
osmnx.graph
|
graph_from_place
|
Download and create a graph within the boundaries of some place(s).
The query must be geocodable and OSM must have polygon boundaries for the
geocode result. If OSM does not have a polygon for this place, you can
instead get its street network using the graph_from_address function,
which geocodes the place name to a point and gets the network within some
distance of that point.
If OSM does have polygon boundaries for this place but you're not finding
it, try to vary the query string, pass in a structured query dict, or vary
the which_result argument to use a different geocode result. If you know
the OSM ID of the place, you can retrieve its boundary polygon using the
geocode_to_gdf function, then pass it to the graph_from_polygon function.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
query : string or dict or list
the query or queries to geocode to get place boundary polygon(s)
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside boundary polygon if at least one of
node's neighbors is within the polygon
which_result : int
which geocoding result to use. if None, auto-select the first
(Multi)Polygon or raise an error if OSM doesn't return one.
buffer_dist : float
deprecated, do not use
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
|
def graph_from_place(
query,
network_type="all",
simplify=True,
retain_all=False,
truncate_by_edge=False,
which_result=None,
buffer_dist=None,
clean_periphery=None,
custom_filter=None,
):
"""
Download and create a graph within the boundaries of some place(s).
The query must be geocodable and OSM must have polygon boundaries for the
geocode result. If OSM does not have a polygon for this place, you can
instead get its street network using the graph_from_address function,
which geocodes the place name to a point and gets the network within some
distance of that point.
If OSM does have polygon boundaries for this place but you're not finding
it, try to vary the query string, pass in a structured query dict, or vary
the which_result argument to use a different geocode result. If you know
the OSM ID of the place, you can retrieve its boundary polygon using the
geocode_to_gdf function, then pass it to the graph_from_polygon function.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
query : string or dict or list
the query or queries to geocode to get place boundary polygon(s)
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside boundary polygon if at least one of
node's neighbors is within the polygon
which_result : int
which geocoding result to use. if None, auto-select the first
(Multi)Polygon or raise an error if OSM doesn't return one.
buffer_dist : float
deprecated, do not use
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
"""
if buffer_dist is not None:
warn(
"The buffer_dist argument has been deprecated and will be removed "
"in the v2.0.0 release. Buffer your query area directly, if desired. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123",
FutureWarning,
stacklevel=2,
)
# create a GeoDataFrame with the spatial boundaries of the place(s)
if isinstance(query, (str, dict)):
# if it is a string (place name) or dict (structured place query),
# then it is a single place
gdf_place = geocoder.geocode_to_gdf(
query, which_result=which_result, buffer_dist=buffer_dist
)
elif isinstance(query, list):
# if it is a list, it contains multiple places to get
gdf_place = geocoder.geocode_to_gdf(query, buffer_dist=buffer_dist)
else: # pragma: no cover
msg = "query must be dict, string, or list of strings"
raise TypeError(msg)
# extract the geometry from the GeoDataFrame to use in API query
polygon = gdf_place["geometry"].unary_union
utils.log("Constructed place geometry polygon(s) to query API")
# create graph using this polygon(s) geometry
G = graph_from_polygon(
polygon,
network_type=network_type,
simplify=simplify,
retain_all=retain_all,
truncate_by_edge=truncate_by_edge,
clean_periphery=clean_periphery,
custom_filter=custom_filter,
)
utils.log(f"graph_from_place returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
return G
|
(query, network_type='all', simplify=True, retain_all=False, truncate_by_edge=False, which_result=None, buffer_dist=None, clean_periphery=None, custom_filter=None)
|
[
0.022881047800183296,
0.010865024290978909,
-0.03593892231583595,
-0.035125285387039185,
-0.04421420022845268,
-0.006970483809709549,
-0.03992772474884987,
-0.07747407257556915,
0.014496621675789356,
-0.044253889471292496,
0.008453882299363613,
0.031215859577059746,
-0.08842840045690536,
0.02728659100830555,
-0.002631915733218193,
0.05572418123483658,
-0.05012794956564903,
-0.05600200593471527,
-0.010150612331926823,
-0.006236226297914982,
-0.052231498062610626,
-0.042944133281707764,
0.014843905344605446,
-0.036911316215991974,
0.09557252377271652,
-0.023297786712646484,
0.011976333335042,
-0.011599281802773476,
-0.03540311008691788,
0.016332264989614487,
0.03784402087330818,
-0.02704845368862152,
-0.031910426914691925,
-0.01892201043665409,
-0.006945677567273378,
-0.011420678347349167,
0.050802670419216156,
0.0636620968580246,
-0.01105355005711317,
-0.0030387339647859335,
-0.03204934298992157,
-0.07997451722621918,
-0.014099725522100925,
-0.017354272305965424,
0.05294590815901756,
-0.025063974782824516,
0.0030486565083265305,
-0.01822744309902191,
-0.02095610275864601,
-0.012164858169853687,
-0.026572179049253464,
-0.0412374809384346,
-0.006300721783190966,
0.0191006138920784,
-0.01415926031768322,
-0.07953793555498123,
-0.04520643875002861,
0.0821574479341507,
0.062233272939920425,
0.009451082907617092,
-0.02940998412668705,
0.016540635377168655,
-0.009996814653277397,
0.021233929321169853,
-0.021511755883693695,
-0.0011640212032943964,
-0.02413126826286316,
-0.04524612799286842,
-0.044134821742773056,
0.008969847112894058,
-0.0043509709648787975,
0.05135832726955414,
-0.0112916873767972,
-0.0021419974509626627,
0.0006871259538456798,
0.0597328282892704,
0.05266808345913887,
-0.021035481244325638,
-0.023952666670084,
0.02510366402566433,
-0.010745955631136894,
0.0289535541087389,
-0.004534535109996796,
-0.08485633879899979,
0.018078606575727463,
0.021928496658802032,
0.029608432203531265,
0.06084413826465607,
0.0218292735517025,
-0.07787097245454788,
-0.005918709561228752,
-0.03272406384348869,
-0.01306779682636261,
0.032188255339860916,
-0.006623199675232172,
-0.03508559614419937,
-0.027445349842309952,
-0.05469224974513054,
-0.06425744295120239,
-0.01952727697789669,
-0.0014833983732387424,
-0.00011023162369383499,
-0.022881047800183296,
-0.024270182475447655,
-0.005541658494621515,
-0.023654993623495102,
0.019140303134918213,
-0.04453171789646149,
-0.018485425040125847,
-0.003604310564696789,
-0.08183992654085159,
-0.03405366465449333,
0.00818597711622715,
0.026453109458088875,
0.0060377782210707664,
0.0994621068239212,
0.03923315554857254,
0.03341863304376602,
-0.0016111491713672876,
0.017205435782670975,
-0.0055863093584775925,
0.07953793555498123,
0.03272406384348869,
-0.042944133281707764,
0.0028874175623059273,
0.04496830329298973,
0.03544280305504799,
0.015240801498293877,
-0.009446121752262115,
-0.06707540154457092,
0.06497185677289963,
0.007238388527184725,
-0.043658547103405,
0.027604108676314354,
-0.020837033167481422,
0.04627805948257446,
-0.0388164147734642,
-0.039888035506010056,
-0.027881935238838196,
0.006385062355548143,
-0.007431874983012676,
-0.005343210883438587,
0.024726612493395805,
0.009307208471000195,
-0.04528581723570824,
-0.010716188699007034,
-0.044253889471292496,
-0.054017528891563416,
0.01105355005711317,
-0.03407350927591324,
0.00043007388012483716,
-0.018425891175866127,
0.0028204412665218115,
0.003708495758473873,
-0.029667966067790985,
-0.06846453994512558,
0.005988166667521,
0.021214084699749947,
-0.00640490697696805,
0.044372957199811935,
-0.004894222132861614,
0.0530649796128273,
0.022563530132174492,
0.013196787796914577,
-0.06775012612342834,
-0.012244237586855888,
0.02343670092523098,
-0.04441264644265175,
0.008032180368900299,
0.0064594801515340805,
0.03216841071844101,
0.06136010214686394,
-0.031513530761003494,
-0.035065751522779465,
-0.03280344232916832,
0.01418902724981308,
0.03756619244813919,
-0.0206187404692173,
-0.023416856303811073,
-0.022067410871386528,
0.02579823136329651,
-0.05612107738852501,
-0.02677062712609768,
0.002295794663950801,
-0.020459981635212898,
0.008042102679610252,
0.01752295345067978,
-0.03901486471295357,
0.04679402336478233,
0.0009035582770593464,
-0.07937917113304138,
-0.012660978361964226,
-0.0028452472761273384,
-0.01880294270813465,
0.0321485660970211,
-0.07048870623111725,
0.008563028648495674,
0.057351455092430115,
-0.06096320599317551,
0.11073394864797592,
-0.060050345957279205,
0.07969669252634048,
0.036911316215991974,
-0.021610980853438377,
-0.010448283515870571,
0.03355754539370537,
-0.04520643875002861,
-0.05814524367451668,
0.043341029435396194,
0.002112230286002159,
0.007307845167815685,
0.0021308346185833216,
0.008230628445744514,
0.025063974782824516,
-0.0036861703265458345,
-0.014179104939103127,
-0.03693116083741188,
0.0397292785346508,
0.059137485921382904,
0.004757789429277182,
0.0029370293486863375,
-0.0869995728135109,
0.024686923250555992,
-0.022563530132174492,
-0.010096038691699505,
-0.008905351161956787,
0.02907262183725834,
0.009778521955013275,
0.008706903085112572,
-0.07195722311735153,
0.04026508703827858,
-0.06278892606496811,
0.021233929321169853,
-0.08303061872720718,
-0.00926255714148283,
-0.052350565791130066,
-0.009287363849580288,
0.02034091390669346,
0.01464545726776123,
-0.006151886191219091,
0.00847372692078352,
-0.020598895847797394,
-0.0673135370016098,
-0.02595699019730091,
-0.05949469283223152,
-0.019636422395706177,
-0.024607544764876366,
-0.04266630485653877,
0.04342040792107582,
-0.03832029551267624,
-0.06556719541549683,
0.01934867352247238,
0.005407706368714571,
-0.010408594273030758,
0.04222971946001053,
-0.08604702353477478,
-0.03707007318735123,
-0.0503263957798481,
0.01831674389541149,
0.04187251254916191,
-0.009371703490614891,
0.0014561116695404053,
0.038915641605854034,
0.014258484356105328,
0.028040694072842598,
-0.006514053326100111,
-0.006191575434058905,
-0.019785258919000626,
0.020360758528113365,
-0.007322728633880615,
-0.060685377568006516,
0.07814879715442657,
0.014079880900681019,
-0.03814169391989708,
-0.0020303705241531134,
-0.004537016153335571,
0.011440523900091648,
0.0019485106458887458,
-0.030144240707159042,
-0.05147739499807358,
-0.012244237586855888,
-0.00669265678152442,
0.0049041444435715675,
-0.03905455395579338,
-0.0004424768849276006,
0.00970410369336605,
0.02262306399643421,
0.03710976243019104,
0.02331763319671154,
-0.020211922004818916,
0.028814639896154404,
-0.019963862374424934,
-0.012154935859143734,
0.030302999541163445,
0.01573692075908184,
0.015697231516242027,
0.04778626188635826,
-0.029390139505267143,
-0.0010982853127643466,
-0.0038449286948889494,
-0.02595699019730091,
0.03367661312222481,
0.0894603282213211,
0.04568271338939667,
0.04496830329298973,
0.061836376786231995,
0.0038870989810675383,
-0.04026508703827858,
-0.006583510432392359,
0.030342688784003258,
-0.040066637098789215,
-0.018941855058073997,
-0.03405366465449333,
-0.02119424007833004,
-0.00999185349792242,
-0.006365217734128237,
0.025976834818720818,
-0.022027721628546715,
0.005844291765242815,
-0.02510366402566433,
-0.02550056017935276,
0.022126944735646248,
0.0469924695789814,
-0.03663348779082298,
-0.04038415476679802,
0.021690359339118004,
-0.03349801152944565,
0.03980865702033043,
0.03147384151816368,
-0.014060036279261112,
0.052707772701978683,
0.03996741399168968,
-0.011192463338375092,
0.04957229271531105,
-0.014020347036421299,
0.011311531998217106,
0.02137284353375435,
-0.01634218730032444,
0.02974734641611576,
-0.023992355912923813,
0.035819850862026215,
0.06862329691648483,
-0.0025847842916846275,
-0.012452607974410057,
-0.028794795274734497,
-0.0036787285935133696,
-0.025599783286452293,
0.010220068506896496,
0.017145901918411255,
-0.01861441694200039,
-0.051675841212272644,
0.010239913128316402,
0.011946565471589565,
0.04119779169559479,
0.014774449169635773,
0.020479826256632805,
0.0034505135845392942,
-0.021789582446217537,
0.010438361205160618,
0.030640361830592155,
0.052469633519649506,
-0.0030709817074239254,
0.012938805855810642,
-0.014784371480345726,
-0.004626317415386438,
-0.008964885026216507,
0.03135477378964424,
0.04377761483192444,
-0.0013420041650533676,
-0.04584147408604622,
-0.0225833747535944,
-0.04826253652572632,
-0.0345696285367012,
0.049889810383319855,
-0.0026269545778632164,
0.03526419773697853,
0.017086368054151535,
-0.025143353268504143,
-0.029191691428422928,
0.05318404734134674,
-0.011182541027665138,
-0.011916798539459705,
0.04250754788517952,
-0.042467858642339706,
0.08906343579292297,
-0.020241688936948776,
0.027425505220890045,
0.0685439184308052,
0.0256196279078722,
-0.045127060264348984,
-0.03310111537575722,
-0.009376664645969868,
0.013296011835336685,
0.027881935238838196,
-0.0032173371873795986,
0.06576564908027649,
0.019120458513498306,
-0.01933875121176243,
-0.02631419710814953,
-0.01918991468846798,
-0.0030486565083265305,
-0.01846558041870594,
0.020152388140559196,
0.038796570152044296,
0.010046427138149738,
-0.07227473706007004,
0.0000020445563677640166,
-0.01946774311363697,
0.01916014775633812,
-0.07076653093099594,
0.015320180915296078,
-0.027306435629725456,
-0.020638585090637207,
0.06358271837234497,
-0.0506439134478569,
0.03643504157662392,
0.018654106184840202,
0.06786919385194778,
0.01895177736878395,
0.05834369361400604,
0.06798826158046722,
-0.0006319326348602772,
0.04262661561369896,
0.012482374906539917,
0.021670514717698097,
-0.005874058697372675,
-0.003579504555091262,
-0.017354272305965424,
-0.0010815412970259786,
0.054890699684619904,
0.013762364163994789,
-0.03452993929386139,
-0.05774834752082825,
-0.02619512751698494,
-0.039768967777490616,
0.03847905620932579,
-0.00304369512014091,
0.018793020397424698,
0.05008826032280922,
0.011678661219775677,
0.03740743547677994,
-0.01017045695334673,
-0.01998370699584484,
-0.03234701231122017,
0.014992741867899895,
-0.014893517829477787,
-0.0045692636631429195,
0.016084205359220505,
0.026175282895565033,
-0.04187251254916191,
0.02595699019730091,
-0.02319856360554695,
0.034490250051021576,
0.020420292392373085,
0.027147676795721054,
0.012264082208275795,
-0.01797938346862793,
0.028417743742465973,
-0.05985189601778984,
0.04901663959026337,
0.06076475605368614,
-0.02188880741596222,
-0.013276167213916779,
0.052707772701978683,
-0.014784371480345726,
0.006256071384996176,
0.00570041686296463,
-0.002592226257547736,
-0.004286475479602814,
-0.0175824873149395,
-0.016113972291350365,
-0.018148064613342285,
-0.027445349842309952,
-0.00141146092209965,
0.055525731295347214,
0.046555884182453156,
-0.015399559400975704,
-0.00739714689552784,
0.04480954259634018,
-0.054414425045251846,
0.014466854743659496,
-0.02325809746980667,
-0.028755106031894684,
-0.011986255645751953,
0.0248655267059803,
0.05179491266608238,
-0.013534149155020714,
0.019963862374424934,
0.0345696285367012,
-0.04072151705622673,
-0.0715603232383728,
0.05429535359144211,
0.019199836999177933,
-0.00991247408092022,
0.02647295407950878,
0.08136365562677383,
-0.01780078001320362,
-0.03901486471295357,
0.045920852571725845,
-0.05874058976769447,
0.028358209878206253,
0.006682734005153179,
-0.026671402156352997,
-0.023000115528702736,
0.030997566878795624,
0.01450654398649931,
0.031513530761003494,
0.030580826103687286,
0.029548898339271545,
0.026155438274145126,
-0.0709649845957756,
-0.024667078629136086,
0.10255789011716843,
0.030302999541163445,
-0.05203304812312126,
0.040642138570547104,
0.04588116332888603,
-0.007947839796543121,
-0.03476807847619057,
-0.0010102239903062582,
0.025877611711621284,
0.04473016411066055,
-0.010785644873976707,
0.024488475173711777,
-0.018267132341861725,
-0.02165067009627819,
0.052588701248168945,
-0.03353770077228546,
-0.0028526890091598034,
-0.05127894505858421,
0.02798115834593773,
0.018148064613342285,
0.02619512751698494,
0.03774479776620865,
0.08898405730724335,
-0.03907439857721329,
0.0569942481815815,
-0.00967433676123619,
-0.03540311008691788,
0.0327439084649086,
0.02361530438065529,
0.02917184680700302,
-0.04445233941078186,
-0.04068182781338692,
0.016818461939692497,
0.011242075823247433,
0.07314790785312653,
-0.0066777728497982025,
0.032485928386449814,
-0.03381552919745445,
0.08350688964128494,
0.04211065173149109,
0.06481309235095978,
0.0181877538561821,
0.044769853353500366,
0.007183815352618694,
-0.01746341772377491,
0.030600672587752342,
0.01998370699584484,
-0.01373259723186493,
-0.006687695626169443,
0.025699008256196976,
-0.02040044777095318,
0.06624191999435425,
-0.025540249422192574,
0.02958858758211136,
-0.029191691428422928,
0.0388164147734642,
-0.005184452515095472,
0.01961657777428627,
0.046039920300245285,
-0.047309987246990204,
0.031334929168224335,
-0.03784402087330818,
0.04191220551729202,
0.001831922447308898,
-0.07219535857439041,
-0.020995792001485825,
-0.0053531331941485405,
0.0017699075397104025,
-0.008840855211019516,
-0.028536813333630562,
0.003827564651146531,
-0.010537585243582726,
0.048738811165094376,
0.10565368086099625,
0.0002085253654513508,
0.003810200374573469,
0.04893726110458374,
-0.03222794458270073,
0.04623837023973465,
0.05338249355554581,
0.06576564908027649,
0.0494135357439518,
0.008255434222519398,
0.04611929878592491,
-0.021988030523061752,
-0.0639796108007431,
-0.06648005545139313,
-0.00567064993083477,
-0.010567352175712585,
0.03964989632368088,
-0.00427655316889286,
-0.005323365796357393,
-0.005164607428014278,
-0.001134874182753265,
-0.03998725861310959,
0.026334041729569435,
-0.0070052118971943855,
-0.05187429115176201,
0.0469924695789814,
-0.016927609220147133,
-0.03062051720917225,
0.02176973782479763,
-0.07235411554574966,
-0.03038237802684307,
-0.04520643875002861,
0.04750843718647957,
-0.02907262183725834,
-0.04421420022845268,
0.02280166745185852,
-0.005288637708872557,
0.031176170334219933,
-0.023158874362707138,
-0.01670931652188301,
0.007268155459314585,
-0.0028452472761273384,
-0.053858768194913864,
-0.0026343963108956814,
0.056597352027893066,
0.03635566309094429,
0.030342688784003258,
-0.03980865702033043,
-0.03841951861977577,
0.009351858869194984,
-0.044769853353500366,
0.040225397795438766,
0.004606472793966532,
-0.04659557342529297,
-0.0032098954543471336,
-0.07894258946180344,
0.06255079060792923,
0.02040044777095318,
0.0007199938991107047,
0.003688650904223323,
-0.006365217734128237,
0.040642138570547104,
-0.01889224350452423,
0.018058761954307556,
0.026234816759824753,
-0.025877611711621284,
0.03216841071844101,
0.06489247828722,
0.0397292785346508,
0.06596409529447556,
0.05393815040588379,
-0.06929802149534225,
-0.051556773483753204,
0.02355577051639557,
-0.023595459759235382,
0.039768967777490616,
-0.0045618219301104546,
-0.03353770077228546,
-0.026393575593829155,
-0.13621465861797333,
0.023714527487754822,
0.019785258919000626,
-0.03589923307299614,
0.021690359339118004,
0.0074616423808038235,
0.014625612646341324,
-0.04088027402758598,
0.036097679287195206,
0.01275028008967638,
-0.023516081273555756,
0.00845884345471859,
-0.042309101670980453,
-0.0015999864554032683,
-0.04981043189764023,
-0.030759429559111595,
0.03532373160123825,
0.06794857233762741,
0.02019207738339901,
-0.01628265343606472,
0.014774449169635773,
-0.018177831545472145,
-0.03353770077228546,
-0.005263831466436386,
0.0018046358600258827,
-0.018882321193814278,
0.01761225424706936,
0.009996814653277397,
0.023079494014382362,
0.006593432743102312,
0.007625361904501915,
0.008071869611740112,
0.004663526546210051,
-0.08660268038511276,
-0.001370531041175127,
0.030064862221479416,
0.018852554261684418,
-0.015697231516242027,
-0.00996208656579256,
0.016560479998588562,
0.023416856303811073,
0.08342751115560532,
-0.024667078629136086,
0.022126944735646248,
-0.002413623034954071,
0.00532832695171237,
-0.002102307742461562,
-0.08390378952026367,
0.024964749813079834,
-0.04326165094971657,
0.007927995175123215,
0.007620400749146938,
0.020539361983537674,
0.045523956418037415,
-0.012531987391412258,
-0.015330103226006031,
0.015498783439397812,
0.014466854743659496,
0.00012038658314850181,
-0.0018480464350432158,
0.014635534957051277,
0.0066976179368793964,
-0.025917300954461098,
-0.05524790659546852,
-0.012690745294094086,
-0.020539361983537674,
-0.024329716339707375,
0.0676310583949089,
-0.042944133281707764,
0.058621518313884735,
0.008657291531562805,
-0.034549783915281296,
0.006548781879246235,
0.01892201043665409,
-0.008176054805517197,
0.007749391719698906,
-0.029568742960691452,
-0.01749318465590477,
-0.04504768177866936,
-0.030759429559111595,
-0.055049456655979156,
-0.026730936020612717,
0.042190030217170715,
-0.027782710269093513,
-0.03222794458270073,
0.007054823916405439,
-0.0008080551633611321,
-0.0027559457812458277,
0.0636620968580246,
0.0430632010102272,
0.009972008876502514,
0.05655766278505325,
-0.009828134439885616,
0.03716930001974106,
-0.01238315086811781,
-0.03522450849413872,
-0.04326165094971657,
0.01528049074113369,
0.0348673015832901,
-0.043460097163915634,
-0.005859175231307745,
-0.039312537759542465,
-0.046436816453933716,
-0.018971621990203857
] |
52,234 |
osmnx.graph
|
graph_from_point
|
Download and create a graph within some distance of a (lat, lon) point.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
center_point : tuple
the (lat, lon) center point around which to construct the graph
dist : int
retain only those nodes within this many meters of the center of the
graph, with distance determined according to dist_type argument
dist_type : string {"network", "bbox"}
if "bbox", retain only those nodes within a bounding box of the
distance parameter. if "network", retain only those nodes within some
network distance from the center-most node.
network_type : string, {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
clean_periphery : bool,
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
|
def graph_from_point(
center_point,
dist=1000,
dist_type="bbox",
network_type="all",
simplify=True,
retain_all=False,
truncate_by_edge=False,
clean_periphery=None,
custom_filter=None,
):
"""
Download and create a graph within some distance of a (lat, lon) point.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
center_point : tuple
the (lat, lon) center point around which to construct the graph
dist : int
retain only those nodes within this many meters of the center of the
graph, with distance determined according to dist_type argument
dist_type : string {"network", "bbox"}
if "bbox", retain only those nodes within a bounding box of the
distance parameter. if "network", retain only those nodes within some
network distance from the center-most node.
network_type : string, {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside bounding box if at least one of node's
neighbors is within the bounding box
clean_periphery : bool,
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
"""
if dist_type not in {"bbox", "network"}: # pragma: no cover
msg = 'dist_type must be "bbox" or "network"'
raise ValueError(msg)
# create bounding box from center point and distance in each direction
bbox = utils_geo.bbox_from_point(center_point, dist)
# create a graph from the bounding box
G = graph_from_bbox(
bbox=bbox,
network_type=network_type,
simplify=simplify,
retain_all=retain_all,
truncate_by_edge=truncate_by_edge,
clean_periphery=clean_periphery,
custom_filter=custom_filter,
)
if dist_type == "network":
# if dist_type is network, find node in graph nearest to center point
# then truncate graph by network dist from it
node = distance.nearest_nodes(G, X=[center_point[1]], Y=[center_point[0]])[0]
G = truncate.truncate_graph_dist(G, node, max_dist=dist)
utils.log(f"graph_from_point returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
return G
|
(center_point, dist=1000, dist_type='bbox', network_type='all', simplify=True, retain_all=False, truncate_by_edge=False, clean_periphery=None, custom_filter=None)
|
[
0.013920525088906288,
0.00900624692440033,
0.0007629612809978426,
0.018854381516575813,
-0.01013202778995037,
0.0015406066086143255,
-0.05305854231119156,
-0.023044245317578316,
0.004116442054510117,
0.000709731422830373,
-0.022730983793735504,
0.03655361384153366,
-0.06402266770601273,
0.07091440260410309,
0.012980742380023003,
0.02437560260295868,
-0.047850579023361206,
-0.04518786445260048,
0.027038319036364555,
0.011473175138235092,
-0.018081018701195717,
-0.023161716759204865,
0.07455606013536453,
0.0003692438767757267,
0.03577046096324921,
0.01072918064892292,
0.015868615359067917,
0.00884472206234932,
-0.014909254387021065,
-0.008286725729703903,
0.04788973927497864,
-0.02075352519750595,
0.009574031457304955,
0.033558059483766556,
0.025256648659706116,
0.02010742574930191,
0.03569214791059494,
0.06797758489847183,
-0.0654323399066925,
-0.011345912702381611,
-0.041115473955869675,
-0.06942641735076904,
0.006759579759091139,
-0.0014708571834489703,
0.02819346822798252,
0.001456173020415008,
-0.015408513136208057,
0.01844322681427002,
-0.03778707981109619,
-0.06970051676034927,
-0.02253519557416439,
-0.019216589629650116,
-0.007655309978872538,
0.015124620869755745,
0.006651896517723799,
-0.04589270055294037,
-0.02609853632748127,
0.08277915418148041,
0.03909885883331299,
0.04193778336048126,
0.037336766719818115,
0.021536676213145256,
-0.03353847935795784,
-0.02355329319834709,
-0.026940425857901573,
-0.025002123787999153,
-0.05364590510725975,
-0.038041602820158005,
-0.05850144475698471,
0.021634571254253387,
0.005638693459331989,
0.019118696451187134,
-0.0035584464203566313,
-0.0038031814619898796,
0.015339987352490425,
0.036964770406484604,
0.048124682158231735,
-0.0007201326661743224,
-0.014997358433902264,
0.017885230481624603,
-0.03541804477572441,
-0.0027361370157450438,
0.025158755481243134,
-0.06656791269779205,
0.026274746283888817,
0.06739021837711334,
0.02324003167450428,
0.01956900767982006,
-0.04209441319108009,
-0.016641978174448013,
-0.04577522724866867,
-0.022515617311000824,
-0.020479422062635422,
0.012598956003785133,
0.008541250601410866,
-0.007180524058640003,
0.0007819282473064959,
-0.04033232107758522,
-0.004667095839977264,
0.00609390065073967,
0.010670444928109646,
-0.028447993099689484,
-0.02662716433405876,
-0.0071022086776793,
-0.01584903709590435,
-0.08105622231960297,
-0.0029172408394515514,
-0.0009868937777355313,
-0.030993236228823662,
0.04882952198386192,
-0.08317073434591293,
-0.00962297897785902,
0.021810779348015785,
-0.005433116108179092,
-0.004738069139420986,
0.050591614097356796,
0.012168222106993198,
0.01595672033727169,
-0.01544767152518034,
-0.05145308002829552,
-0.010366973467171192,
0.08833953738212585,
-0.045266181230545044,
-0.018903328105807304,
-0.0029490564484149218,
0.011453596875071526,
0.07553499937057495,
-0.006118373945355415,
-0.00307387113571167,
-0.02324003167450428,
0.002858504420146346,
0.02874167449772358,
0.00435628229752183,
0.055721256881952286,
-0.01907953806221485,
-0.02609853632748127,
-0.05709177255630493,
-0.004490886814892292,
-0.05552547052502632,
0.007214786950498819,
-0.0024742705281823874,
-0.004013653378933668,
0.04910362511873245,
0.014870096929371357,
-0.05145308002829552,
-0.003937785513699055,
-0.03892264887690544,
-0.03858980908989906,
0.003274553921073675,
-0.03639698401093483,
-0.0015051200753077865,
-0.00720989191904664,
0.017601339146494865,
0.0008021188550628722,
-0.0295444056391716,
-0.06688117235898972,
-0.007126682437956333,
0.017836283892393112,
-0.0013631737092509866,
0.04463965818285942,
-0.06605885922908783,
0.013431054539978504,
0.05321517214179039,
-0.04546196758747101,
-0.03702350705862045,
-0.02880041114985943,
0.03488941863179207,
-0.05423326790332794,
-0.022300250828266144,
-0.007831518538296223,
-0.01388136763125658,
0.054115794599056244,
-0.015379145741462708,
-0.040958844125270844,
-0.025354541838169098,
0.008878984488546848,
0.04929941147565842,
-0.0022356538102030754,
-0.003790944581851363,
-0.05963701754808426,
0.028819989413022995,
-0.07823687791824341,
-0.015437881462275982,
0.00932929664850235,
0.01724892109632492,
0.022124040871858597,
0.03710182011127472,
-0.020127004012465477,
-0.018306175246834755,
-0.02717537060379982,
-0.006319056730717421,
-0.022241514176130295,
-0.014233785681426525,
0.025256648659706116,
0.024297287687659264,
-0.00754762627184391,
-0.0015381592093035579,
0.009715978056192398,
-0.08458040654659271,
0.12459946423768997,
-0.0011361821088939905,
0.021164679899811745,
0.027645261958241463,
-0.032814063131809235,
0.016583241522312164,
-0.011551490053534508,
-0.04475713148713112,
0.01672029308974743,
-0.014958200976252556,
0.036103300750255585,
0.013891156762838364,
-0.02016616053879261,
0.039059702306985855,
0.01929490454494953,
-0.023984026163816452,
-0.042995039373636246,
-0.02410149946808815,
0.04702826961874962,
0.02071436680853367,
-0.015271461568772793,
0.020420685410499573,
-0.05576041340827942,
0.043699875473976135,
0.02911367081105709,
0.00895240530371666,
-0.0039035226218402386,
0.02831094153225422,
-0.003357763634994626,
0.006828105542808771,
-0.11394859850406647,
0.04890783503651619,
-0.09202034771442413,
0.006456108298152685,
-0.027292843908071518,
0.022143619135022163,
-0.1136353388428688,
0.047419846057891846,
0.05532968044281006,
-0.01291221659630537,
0.02917240746319294,
0.00760146789252758,
-0.03725844994187355,
-0.040410637855529785,
-0.01708250120282173,
-0.055564627051353455,
-0.000688317115418613,
0.011267597787082195,
-0.03400837257504463,
0.023866554722189903,
-0.008232884109020233,
-0.001082952250726521,
0.0037150767166167498,
0.0029955559875816107,
0.003083660500124097,
0.045579440891742706,
-0.10204469412565231,
-0.0722457617521286,
-0.028859147801995277,
0.023709923028945923,
-0.0012340761022642255,
-0.020068267360329628,
0.008913247846066952,
-0.023494556546211243,
0.016201455146074295,
0.03602498769760132,
-0.033988792449235916,
-0.017395760864019394,
0.03485025838017464,
0.027292843908071518,
0.002023958135396242,
0.002780189272016287,
0.062299732118844986,
0.01538893487304449,
-0.007513363379985094,
0.01904037967324257,
-0.03549635782837868,
0.02394486963748932,
-0.054703161120414734,
-0.03400837257504463,
0.016201455146074295,
-0.050591614097356796,
-0.019373219460248947,
-0.001615250832401216,
-0.033518899232149124,
-0.04475713148713112,
0.01380305178463459,
0.06018522381782532,
0.001970116514712572,
0.04546196758747101,
-0.009334191679954529,
-0.0030077926348894835,
-0.006715527269989252,
-0.03974495828151703,
-0.009069877676665783,
0.003766471054404974,
0.008208410814404488,
0.04420892521739006,
-0.05873639136552811,
0.013626842759549618,
-0.03379300609230995,
0.009588715620338917,
-0.01850196346640587,
0.06664622575044632,
0.04272093623876572,
0.0964059978723526,
0.00967682059854269,
0.038041602820158005,
-0.057170089334249496,
0.025902748107910156,
-0.01741534098982811,
-0.007650414947420359,
0.01724892109632492,
-0.014635151252150536,
-0.03365595266222954,
-0.016103560104966164,
0.02210446260869503,
0.002726347418501973,
-0.02625516802072525,
0.031247761100530624,
0.04416976869106293,
-0.03310774639248848,
0.048555418848991394,
-0.0029906611889600754,
0.044992078095674515,
-0.0084923030808568,
0.006911315489560366,
0.008458040654659271,
0.07608320564031601,
0.04131126403808594,
0.034321632236242294,
0.013470212928950787,
0.023142138496041298,
-0.003685708623379469,
0.031032394617795944,
-0.06989630311727524,
0.030073033645749092,
-0.01029844768345356,
-0.04244683310389519,
0.019118696451187134,
-0.01574135385453701,
0.02447349578142166,
0.02237856574356556,
0.010259290225803852,
-0.03369510918855667,
-0.04632343351840973,
0.005878533702343702,
0.055016420781612396,
-0.03753255307674408,
0.011659174226224422,
-0.04902530834078789,
-0.05066992715001106,
0.09914702922105789,
-0.011903909035027027,
0.03937296196818352,
0.008472724817693233,
0.04428723827004433,
0.005717008840292692,
-0.01286327000707388,
-0.00559464143589139,
-0.0025623750407248735,
0.03986243158578873,
-0.005159012973308563,
-0.0018722225213423371,
-0.0504741407930851,
-0.06942641735076904,
0.002709215972572565,
0.02566780336201191,
0.013068847358226776,
0.09468306601047516,
-0.015976298600435257,
-0.018570490181446075,
-0.060733430087566376,
-0.027508210390806198,
0.054781474173069,
0.013871577568352222,
0.06257383525371552,
-0.004490886814892292,
-0.029191987589001656,
-0.035339727997779846,
0.03682771697640419,
0.004657306242734194,
-0.019177431240677834,
0.07964655011892319,
0.03400837257504463,
0.0855201855301857,
-0.035829197615385056,
0.0830141007900238,
0.05803155526518822,
0.001571198459714651,
-0.006044953595846891,
-0.026548849418759346,
-0.01062149740755558,
0.047419846057891846,
0.04217272996902466,
0.03111070953309536,
0.02560906670987606,
0.03424331545829773,
0.002645584987476468,
-0.03931422531604767,
-0.02065563201904297,
-0.021752044558525085,
0.025315385311841965,
-0.0013815289130434394,
0.025491593405604362,
-0.025002123787999153,
-0.03772834315896034,
0.01672029308974743,
-0.0771404579281807,
-0.00995092373341322,
-0.06120331957936287,
0.0025697171222418547,
-0.0371997132897377,
0.02032279223203659,
0.057992398738861084,
0.012520641088485718,
0.03929464519023895,
0.006358214654028416,
0.027351580560207367,
0.042838409543037415,
0.00018523377366364002,
0.060028593987226486,
-0.030758291482925415,
0.018580278381705284,
-0.019706059247255325,
0.024551812559366226,
-0.02038152888417244,
-0.009985187090933323,
-0.0330098532140255,
-0.0038692597299814224,
0.05517305061221123,
0.015212725847959518,
-0.04788973927497864,
-0.00351928872987628,
-0.028663359582424164,
-0.021477941423654556,
0.03314690291881561,
0.009309718385338783,
-0.009774714708328247,
0.04432639852166176,
-0.0025599277578294277,
-0.04119379073381424,
-0.0002656904107425362,
-0.04264261946082115,
-0.06190815567970276,
0.01123822946101427,
-0.030542923137545586,
-0.029642298817634583,
-0.00703857745975256,
0.030151348561048508,
-0.03111070953309536,
-0.004424808081239462,
-0.03857022896409035,
0.05066992715001106,
0.00911393016576767,
0.0015393829671666026,
0.013274424709379673,
-0.0415070503950119,
-0.016152508556842804,
-0.05066992715001106,
0.09538789838552475,
0.06488413363695145,
-0.03369510918855667,
-0.03030797839164734,
0.026137694716453552,
0.03160017728805542,
0.007939202710986137,
0.05176633968949318,
0.013891156762838364,
-0.0273907370865345,
-0.0698571503162384,
-0.0061379531398415565,
-0.04918193817138672,
-0.022691825404763222,
0.01237380038946867,
0.01951027102768421,
0.015271461568772793,
-0.0169846061617136,
-0.031032394617795944,
-0.009774714708328247,
-0.054272424429655075,
-0.06848663091659546,
-0.03024924173951149,
0.016593031585216522,
0.0029686351772397757,
-0.048320472240448,
0.02431686595082283,
0.026450954377651215,
-0.007567205000668764,
0.008908352814614773,
-0.024728020653128624,
-0.08364062011241913,
0.029896823689341545,
0.03870728239417076,
-0.017973335459828377,
0.041859470307826996,
0.07291144132614136,
-0.004383203107863665,
-0.030797448009252548,
0.03866812586784363,
-0.04561859741806984,
0.028271783143281937,
-0.019324272871017456,
-0.006387582514435053,
-0.03349932283163071,
0.06778179854154587,
0.0855201855301857,
-0.03418457880616188,
0.04268177971243858,
0.004938751459121704,
0.03400837257504463,
-0.0011031428584828973,
-0.005663167219609022,
0.04530533775687218,
0.054781474173069,
-0.01886417157948017,
0.07526089996099472,
0.0633961483836174,
0.013450633734464645,
-0.027841050177812576,
-0.07005293667316437,
0.026353061199188232,
0.06789927184581757,
0.004547175485640764,
0.030327556654810905,
-0.03723887354135513,
0.04573607072234154,
0.024081921204924583,
0.011355702765285969,
0.005330327432602644,
0.0011888000881299376,
0.022985508665442467,
0.03165891394019127,
-0.04534449428319931,
-0.0030861080158501863,
0.061438266187906265,
-0.017170606181025505,
0.015349777415394783,
0.00012963305925950408,
0.013431054539978504,
-0.050552453845739365,
-0.011874540708959103,
-0.024453917518258095,
-0.047850579023361206,
-0.04491376131772995,
0.03394963592290878,
-0.004642622545361519,
0.08379725366830826,
-0.03714098036289215,
0.019431956112384796,
-0.015839247032999992,
0.08230926096439362,
0.06684201210737228,
0.05446821451187134,
-0.009182455949485302,
0.06269130855798721,
0.03627951070666313,
-0.01903059147298336,
-0.018903328105807304,
0.007033682893961668,
0.0008730919798836112,
-0.015349777415394783,
-0.02167372778058052,
-0.00962297897785902,
0.061007533222436905,
-0.02944651059806347,
0.042251043021678925,
-0.040136534720659256,
0.010690023191273212,
-0.010327816009521484,
0.005619114730507135,
-0.0016641977708786726,
-0.008144780062139034,
-0.00531074870377779,
-0.061986472457647324,
0.020851418375968933,
0.003905970137566328,
-0.049690987914800644,
-0.03956874832510948,
-0.016093771904706955,
-0.026881689205765724,
-0.01202138140797615,
-0.007204997353255749,
0.06257383525371552,
0.004128678701817989,
0.023807818070054054,
0.07048366963863373,
-0.040136534720659256,
-0.024218972772359848,
0.04624512046575546,
0.035555094480514526,
-0.01275558676570654,
-0.0004558188666123897,
0.07040535658597946,
0.032911960035562515,
-0.03222670033574104,
-0.02981850877404213,
-0.010699812322854996,
-0.026078958064317703,
0.025315385311841965,
0.015134410001337528,
-0.05763997882604599,
0.037062663584947586,
-0.049690987914800644,
-0.018639015033841133,
-0.017611127346754074,
-0.020792683586478233,
-0.04675416648387909,
0.02453223243355751,
-0.008585303090512753,
-0.04420892521739006,
0.038961805403232574,
0.030973657965660095,
-0.04236851632595062,
-0.010738970711827278,
-0.04303419589996338,
-0.05043498054146767,
0.009539769031107426,
0.04381734877824783,
-0.0067693693563342094,
-0.021477941423654556,
0.01441978383809328,
0.04291672259569168,
0.03279448673129082,
-0.03506562486290932,
-0.02880041114985943,
0.01299053244292736,
0.0019419719465076923,
-0.053410958498716354,
0.005956849083304405,
0.037982866168022156,
-0.026020221412181854,
-0.042995039373636246,
-0.07028788328170776,
-0.014556835405528545,
0.0394708551466465,
-0.05630861967802048,
0.05196212977170944,
-0.009402717463672161,
-0.009490822441875935,
0.029094092547893524,
-0.003896180773153901,
0.04734153300523758,
-0.0073861014097929,
-0.026783794164657593,
-0.01892290823161602,
-0.006925999652594328,
0.039921168237924576,
0.006490371190011501,
0.011013073846697807,
0.040254008024930954,
-0.02815430983901024,
0.01202138140797615,
0.060850903391838074,
0.00514922384172678,
0.06633296608924866,
0.019373219460248947,
-0.09061067551374435,
-0.015359566546976566,
0.01633850671350956,
-0.01876627653837204,
0.02290719375014305,
0.011277386918663979,
0.016779029741883278,
0.041272103786468506,
-0.12350305169820786,
-0.020636051893234253,
-0.0001092129823518917,
-0.04945604130625725,
-0.025432858616113663,
0.01584903709590435,
0.01990184746682644,
-0.01601545698940754,
0.029094092547893524,
0.04804636910557747,
0.031032394617795944,
-0.024571390822529793,
-0.01983332261443138,
-0.00754762627184391,
-0.1007133349776268,
0.021145101636648178,
0.05576041340827942,
0.07306807488203049,
0.005996006540954113,
0.013352739624679089,
-0.031130287796258926,
0.029250722378492355,
0.006881947163492441,
-0.03639698401093483,
-0.01320589892566204,
-0.023318348452448845,
0.022221935912966728,
0.02053815871477127,
0.02748863212764263,
-0.02453223243355751,
-0.03443910554051399,
0.007576994597911835,
-0.05736587569117546,
-0.022182777523994446,
0.015379145741462708,
-0.0041482578963041306,
0.02641179785132408,
0.01618187688291073,
-0.03794370964169502,
0.05889302119612694,
0.02970103546977043,
0.02049900032579899,
-0.03208965063095093,
0.05963701754808426,
0.051139820367097855,
0.023063823580741882,
0.03024924173951149,
-0.07627899199724197,
0.0458143875002861,
-0.015124620869755745,
-0.011336123570799828,
0.038844332098960876,
0.0027997680008411407,
0.046558380126953125,
-0.0180027037858963,
-0.0057121142745018005,
-0.028722096234560013,
-0.040958844125270844,
0.029094092547893524,
0.012716429308056831,
-0.012628324329853058,
0.002343337284401059,
-0.0033186061773449183,
-0.03218754380941391,
0.03753255307674408,
-0.025315385311841965,
-0.0637485608458519,
0.07573078572750092,
-0.0010756101692095399,
0.06507991999387741,
-0.01441978383809328,
-0.023005086928606033,
-0.02425812929868698,
0.03633824735879898,
-0.011943066492676735,
-0.003984285052865744,
-0.014331679791212082,
0.022241514176130295,
-0.05160970985889435,
-0.027684420347213745,
-0.02831094153225422,
-0.006436529569327831,
0.013499580323696136,
-0.011923487298190594,
-0.02733200043439865,
0.0030591869726777077,
0.007214786950498819,
-0.009202035143971443,
-0.0036906031891703606,
0.053293485194444656,
0.010034133680164814,
-0.014380626380443573,
-0.02059689536690712,
0.01914806291460991,
0.00879088044166565,
-0.07573078572750092,
0.0005472885677590966,
-0.011825593188405037,
0.00905519351363182,
-0.016641978174448013,
-0.03471320867538452,
0.025687381625175476,
-0.03122818097472191,
0.03829612582921982
] |
52,235 |
osmnx.graph
|
graph_from_polygon
|
Download and create a graph within the boundaries of a (multi)polygon.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
polygon : shapely.geometry.Polygon or shapely.geometry.MultiPolygon
the shape to get network data within. coordinates should be in
unprojected latitude-longitude degrees (EPSG:4326).
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside boundary polygon if at least one of
node's neighbors is within the polygon
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
|
def graph_from_polygon(
polygon,
network_type="all",
simplify=True,
retain_all=False,
truncate_by_edge=False,
clean_periphery=None,
custom_filter=None,
):
"""
Download and create a graph within the boundaries of a (multi)polygon.
You can use the `settings` module to retrieve a snapshot of historical OSM
data as of a certain date, or to configure the Overpass server timeout,
memory allocation, and other custom settings.
Parameters
----------
polygon : shapely.geometry.Polygon or shapely.geometry.MultiPolygon
the shape to get network data within. coordinates should be in
unprojected latitude-longitude degrees (EPSG:4326).
network_type : string {"all", "all_public", "bike", "drive", "drive_service", "walk"}
what type of street network to get if custom_filter is None
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
truncate_by_edge : bool
if True, retain nodes outside boundary polygon if at least one of
node's neighbors is within the polygon
clean_periphery : bool
deprecated, do not use
custom_filter : string
a custom ways filter to be used instead of the network_type presets
e.g., '["power"~"line"]' or '["highway"~"motorway|trunk"]'. Also pass
in a network_type that is in settings.bidirectional_network_types if
you want graph to be fully bi-directional.
Returns
-------
G : networkx.MultiDiGraph
Notes
-----
Very large query areas use the `utils_geo._consolidate_subdivide_geometry`
function to automatically make multiple requests: see that function's
documentation for caveats.
"""
if clean_periphery is None:
clean_periphery = True
else:
warn(
"The clean_periphery argument has been deprecated and will be removed in "
"the v2.0.0 release. Future behavior will be as though clean_periphery=True. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123",
FutureWarning,
stacklevel=2,
)
# verify that the geometry is valid and is a shapely Polygon/MultiPolygon
# before proceeding
if not polygon.is_valid: # pragma: no cover
msg = "The geometry to query within is invalid"
raise ValueError(msg)
if not isinstance(polygon, (Polygon, MultiPolygon)): # pragma: no cover
msg = (
"Geometry must be a shapely Polygon or MultiPolygon. If you "
"requested graph from place name, make sure your query resolves "
"to a Polygon or MultiPolygon, and not some other geometry, like "
"a Point. See OSMnx documentation for details."
)
raise TypeError(msg)
if clean_periphery:
# create a new buffered polygon 0.5km around the desired one
buffer_dist = 500
poly_proj, crs_utm = projection.project_geometry(polygon)
poly_proj_buff = poly_proj.buffer(buffer_dist)
poly_buff, _ = projection.project_geometry(poly_proj_buff, crs=crs_utm, to_latlong=True)
# download the network data from OSM within buffered polygon
response_jsons = _overpass._download_overpass_network(
poly_buff, network_type, custom_filter
)
# create buffered graph from the downloaded data
bidirectional = network_type in settings.bidirectional_network_types
G_buff = _create_graph(response_jsons, retain_all=True, bidirectional=bidirectional)
# truncate buffered graph to the buffered polygon and retain_all for
# now. needed because overpass returns entire ways that also include
# nodes outside the poly if the way (that is, a way with a single OSM
# ID) has a node inside the poly at some point.
G_buff = truncate.truncate_graph_polygon(G_buff, poly_buff, True, truncate_by_edge)
# simplify the graph topology
if simplify:
G_buff = simplification.simplify_graph(G_buff)
# truncate graph by original polygon to return graph within polygon
# caller wants. don't simplify again: this allows us to retain
# intersections along the street that may now only connect 2 street
# segments in the network, but in reality also connect to an
# intersection just outside the polygon
G = truncate.truncate_graph_polygon(G_buff, polygon, retain_all, truncate_by_edge)
# count how many physical streets in buffered graph connect to each
# intersection in un-buffered graph, to retain true counts for each
# intersection, even if some of its neighbors are outside the polygon
spn = stats.count_streets_per_node(G_buff, nodes=G.nodes)
nx.set_node_attributes(G, values=spn, name="street_count")
# if clean_periphery=False, just use the polygon as provided
else:
# download the network data from OSM
response_jsons = _overpass._download_overpass_network(polygon, network_type, custom_filter)
# create graph from the downloaded data
bidirectional = network_type in settings.bidirectional_network_types
G = _create_graph(response_jsons, retain_all=True, bidirectional=bidirectional)
# truncate the graph to the extent of the polygon
G = truncate.truncate_graph_polygon(G, polygon, retain_all, truncate_by_edge)
# simplify the graph topology after truncation. don't truncate after
# simplifying or you may have simplified out to an endpoint beyond the
# truncation distance, which would strip out the entire edge
if simplify:
G = simplification.simplify_graph(G)
# count how many physical streets connect to each intersection/deadend
# note this will be somewhat inaccurate due to periphery effects, so
# it's best to parameterize function with clean_periphery=True
spn = stats.count_streets_per_node(G)
nx.set_node_attributes(G, values=spn, name="street_count")
warn(
"the graph-level street_count attribute will likely be inaccurate "
"when you set clean_periphery=False",
stacklevel=2,
)
utils.log(f"graph_from_polygon returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
return G
|
(polygon, network_type='all', simplify=True, retain_all=False, truncate_by_edge=False, clean_periphery=None, custom_filter=None)
|
[
-0.0027385414578020573,
-0.005512814037501812,
-0.011209389194846153,
0.04736936464905739,
-0.016814082860946655,
-0.05512814223766327,
-0.07775110006332397,
-0.04736936464905739,
-0.003741567488759756,
-0.0430816225707531,
-0.009815871715545654,
0.005620007868856192,
-0.09359533339738846,
0.057700786739587784,
-0.02086702175438404,
0.03714003413915634,
-0.061008475720882416,
-0.05071789026260376,
0.004060595761984587,
0.0147620914503932,
-0.03805883601307869,
-0.0665212869644165,
0.048961956053972244,
-0.0003796440432779491,
0.04708351567387581,
-0.04130527004599571,
0.027012789621949196,
-0.01509898528456688,
0.015211283229291439,
-0.011985266581177711,
0.010974584147334099,
-0.0513712614774704,
-0.036323320120573044,
-0.031423039734363556,
0.02162248268723488,
0.028544126078486443,
0.007651581894606352,
0.08828669786453247,
-0.036241646856069565,
-0.001551755121909082,
-0.035731203854084015,
-0.07121738791465759,
-0.022663790732622147,
0.0102089149877429,
0.04957449063658714,
0.0016027996316552162,
-0.02139788679778576,
0.011525864712893963,
-0.01245487667620182,
-0.030667580664157867,
-0.014129138551652431,
-0.03383234515786171,
-0.0071921804919838905,
0.02133663184940815,
-0.012117981910705566,
-0.019539862871170044,
-0.019274432212114334,
0.08040541410446167,
0.06251939386129379,
0.005711887963116169,
-0.031178027391433716,
-0.012005683965981007,
-0.002981003141030669,
-0.0038564177230000496,
-0.008141609840095043,
-0.017712468281388283,
-0.03268894553184509,
-0.015905490145087242,
0.02054033800959587,
0.0024131322279572487,
0.02919749729335308,
0.0739942193031311,
0.022480031475424767,
-0.02458306774497032,
-0.007294269744306803,
0.052147138863801956,
0.052596330642700195,
0.03732379525899887,
-0.02903415448963642,
-0.005865021608769894,
0.016446562483906746,
0.005224412307143211,
-0.028605379164218903,
-0.0007624783320352435,
0.04181571677327156,
0.019886966794729233,
0.05859917402267456,
-0.012781561352312565,
-0.07444340735673904,
-0.04704267904162407,
-0.008070147596299648,
0.052310481667518616,
-0.011709625832736492,
0.015711519867181778,
-0.028360366821289062,
-0.07003315538167953,
-0.040100619196891785,
-0.056516554206609726,
-0.004139714874327183,
-0.03926348686218262,
-0.03313813731074333,
-0.01619133912026882,
-0.09090018272399902,
0.030728833749890327,
0.01727348379790783,
-0.027768248692154884,
0.0364866629242897,
-0.008779667317867279,
0.008493817411363125,
-0.014802927151322365,
-0.04561343416571617,
-0.052678000181913376,
-0.00000790592730481876,
-0.028054099529981613,
0.022643374279141426,
0.08232469111680984,
0.012179235927760601,
-0.00044823516509495676,
0.019335685297846794,
-0.03871220722794533,
-0.004098879173398018,
0.08608157187700272,
-0.022561702877283096,
-0.003407225478440523,
0.01723264902830124,
0.022806717082858086,
0.04683850333094597,
0.020897649228572845,
0.02141830325126648,
-0.0166813675314188,
0.0294220931828022,
0.052923016250133514,
0.006431616377085447,
0.044715046882629395,
-0.023725518956780434,
0.004601668566465378,
-0.05819081515073776,
-0.027421146631240845,
-0.031974323093891144,
-0.015456297434866428,
-0.007365732453763485,
-0.022235017269849777,
0.008891965262591839,
0.020877230912446976,
-0.036241646856069565,
0.0006377381505444646,
-0.03313813731074333,
-0.07231995463371277,
0.024440143257379532,
-0.04091733321547508,
0.015537968836724758,
-0.02537936344742775,
-0.028176605701446533,
-0.044061675667762756,
-0.017794139683246613,
-0.056720733642578125,
-0.039957694709300995,
0.05504646897315979,
0.006921644322574139,
0.02552228793501854,
-0.06296858936548233,
0.05851750075817108,
0.0033357630018144846,
0.008345788344740868,
-0.06039594113826752,
-0.03779340535402298,
0.04728769510984421,
-0.07342251390218735,
-0.004397490061819553,
-0.03277061879634857,
0.026747357100248337,
0.014221019111573696,
-0.043857499957084656,
-0.020050309598445892,
-0.03716045245528221,
0.06974730640649796,
0.022908804938197136,
0.03401610627770424,
-0.04142777621746063,
-0.026012316346168518,
0.03391401469707489,
-0.040774405002593994,
-0.031749725341796875,
0.053249701857566833,
-0.004655265249311924,
0.022990476340055466,
0.06341777741909027,
-0.08346808701753616,
0.07035984098911285,
-0.02480766363441944,
-0.031463876366615295,
-0.0014394570607692003,
0.0063499449752271175,
0.027441563084721565,
0.02611440420150757,
-0.05990591272711754,
0.02519560232758522,
0.018294375389814377,
-0.06276440620422363,
0.08608157187700272,
-0.07203410565853119,
0.019437775015830994,
0.0027461980935186148,
-0.010852077044546604,
-0.044306691735982895,
-0.010852077044546604,
-0.014751882292330265,
-0.022602537646889687,
0.027747830376029015,
0.03354649618268013,
0.016079042106866837,
-0.035731203854084015,
0.06276440620422363,
0.035751622170209885,
0.013169500045478344,
-0.02501184120774269,
-0.007835342548787594,
0.0582316517829895,
0.04126443341374397,
-0.023582594469189644,
-0.040774405002593994,
-0.027666158974170685,
-0.03401610627770424,
-0.04798189923167229,
-0.0063193184323608875,
-0.024072621017694473,
-0.002876361832022667,
0.020009472966194153,
0.019356103613972664,
-0.0739942193031311,
0.052637167274951935,
-0.02588980831205845,
0.04324496537446976,
-0.035567861050367355,
-0.04553176090121269,
-0.06905309855937958,
-0.028421619907021523,
-0.016017787158489227,
0.00318518141284585,
-0.04749187454581261,
0.0035246280021965504,
-0.0905734971165657,
-0.04945198446512222,
-0.04618513211607933,
-0.024133875966072083,
0.01237320527434349,
-0.026992371305823326,
-0.010127243585884571,
0.0659087523818016,
-0.0076056416146457195,
-0.011770878918468952,
0.019254013895988464,
-0.02147955819964409,
-0.0160688329488039,
0.01969299651682377,
-0.08301889896392822,
-0.014506868086755276,
-0.04589928314089775,
-0.003932984545826912,
0.028442038223147392,
0.00979545433074236,
-0.06521455198526382,
-0.011188970878720284,
-0.002489699050784111,
0.08232469111680984,
-0.014027049764990807,
0.019315266981720924,
0.016038205474615097,
0.015976952388882637,
-0.012699889950454235,
-0.052351318299770355,
0.035772036761045456,
0.0034557178150862455,
-0.04704267904162407,
0.006441825535148382,
-0.011913804337382317,
0.01901920884847641,
-0.008774562738835812,
0.04745103791356087,
0.01930505782365799,
-0.007850655354559422,
0.016385309398174286,
-0.008345788344740868,
-0.04181571677327156,
-0.031545545905828476,
0.011903595179319382,
0.03272978216409683,
-0.024256382137537003,
-0.011821923777461052,
-0.05414808541536331,
0.05851750075817108,
0.017712468281388283,
0.031320951879024506,
-0.005053413100540638,
-0.005426038522273302,
0.02490975335240364,
0.0497378334403038,
-0.028115352615714073,
0.03017755225300789,
-0.0430816225707531,
0.031953904777765274,
0.00851423479616642,
0.06786886602640152,
-0.026339000090956688,
0.020244278013706207,
-0.0031341370195150375,
-0.01468042004853487,
-0.02903415448963642,
0.0018414331134408712,
0.017671631649136543,
-0.048716943711042404,
-0.0063193184323608875,
-0.04602178931236267,
-0.0043898336589336395,
-0.009136978536844254,
-0.002993764355778694,
0.010576436296105385,
-0.013618692755699158,
0.0018618508474901319,
0.014690629206597805,
-0.007258538622409105,
-0.004731832072138786,
0.040937747806310654,
0.0082385940477252,
0.009085934609174728,
0.03452654927968979,
0.02145913988351822,
0.0368950180709362,
0.03321981057524681,
-0.005548545159399509,
-0.013077620416879654,
0.006615377031266689,
-0.01965216174721718,
0.044388361275196075,
-0.057251594960689545,
0.06055928394198418,
0.03411819413304329,
-0.04122360050678253,
-0.0034301953855901957,
-0.010464138351380825,
0.022602537646889687,
0.031545545905828476,
0.002672183560207486,
0.009943483397364616,
-0.03705836087465286,
-0.005497500766068697,
0.0037951641716063023,
-0.03828343003988266,
0.001496882177889347,
0.022643374279141426,
-0.03383234515786171,
0.08975677937269211,
0.026196075603365898,
0.07856781035661697,
-0.00842235516756773,
0.004440878052264452,
-0.006569436751306057,
-0.019478609785437584,
0.014506868086755276,
0.02539977990090847,
-0.01643635332584381,
0.01934589445590973,
0.02978961355984211,
-0.003302583936601877,
-0.012107773683965206,
-0.0019971190486103296,
0.018335212022066116,
0.039937276393175125,
-0.009836290031671524,
-0.07301416248083115,
-0.048186078667640686,
-0.05949755758047104,
-0.04214240238070488,
0.04312245547771454,
0.028360366821289062,
0.022316688671708107,
0.003236226039007306,
-0.028135769069194794,
-0.018825238570570946,
0.030892176553606987,
-0.06562290340662003,
-0.0025177737697958946,
0.04545009136199951,
0.026134822517633438,
0.05827248841524124,
0.02045866660773754,
0.009085934609174728,
0.011801505461335182,
0.01022933330386877,
-0.04610345885157585,
-0.035772036761045456,
0.0210303645581007,
0.018621060997247696,
0.01753891631960869,
0.02897290140390396,
0.060640957206487656,
0.05868084356188774,
0.00016637341468594968,
0.036221232265233994,
-0.01261821947991848,
-0.014476241543889046,
-0.05431142821907997,
0.035996634513139725,
0.04283660650253296,
-0.013383887708187103,
-0.05410724878311157,
0.03748713433742523,
-0.057006582617759705,
0.0513712614774704,
-0.06423449516296387,
0.0345878042280674,
0.03475114703178406,
-0.01757975108921528,
0.026931118220090866,
-0.016834501177072525,
0.027482399716973305,
0.05529148504137993,
0.05504646897315979,
0.06925728172063828,
0.03683376684784889,
0.08861338347196579,
0.020325949415564537,
0.044551704078912735,
0.014302689582109451,
0.0013539573410525918,
-0.04340830817818642,
-0.005158054176717997,
-0.00853465311229229,
-0.040427304804325104,
0.08763332664966583,
-0.0006406094180420041,
-0.04114192724227905,
0.011954639106988907,
-0.022684209048748016,
-0.030585909262299538,
0.039671845734119415,
0.0248689167201519,
-0.03475114703178406,
0.03716045245528221,
0.011454402469098568,
0.0930236354470253,
0.0513712614774704,
-0.016099458560347557,
-0.044020842760801315,
0.03393443301320076,
-0.017549125477671623,
-0.036404989659786224,
-0.009555544704198837,
0.023194655776023865,
-0.0017431722953915596,
0.026910699903964996,
-0.027788667008280754,
0.02570604905486107,
-0.0012761143734678626,
-0.04957449063658714,
0.022806717082858086,
0.04618513211607933,
0.003486344590783119,
-0.0652962177991867,
0.049125298857688904,
0.02983045019209385,
0.00310095795430243,
-0.003853865433484316,
0.04210156574845314,
0.017763512209057808,
-0.015874862670898438,
0.011199180036783218,
0.009969005361199379,
-0.019376520067453384,
0.009800558909773827,
0.028666634112596512,
-0.017140768468379974,
-0.07113572210073471,
-0.010464138351380825,
0.07734274119138718,
0.023378415033221245,
-0.048594437539577484,
0.04969699680805206,
0.010040467604994774,
-0.040182288736104965,
-0.026992371305823326,
-0.006967584602534771,
-0.006360154133290052,
-0.022520866245031357,
0.027257803827524185,
0.020285114645957947,
0.0027206758968532085,
0.009080830030143261,
-0.002543295966461301,
-0.03019797056913376,
-0.0729733258485794,
0.0015440983697772026,
0.02166331745684147,
0.013210335746407509,
0.03534326329827309,
0.09008346498012543,
-0.010244646109640598,
-0.03744630143046379,
0.04259159415960312,
-0.0752192884683609,
0.00010767215280793607,
-0.012577383778989315,
-0.022582119330763817,
-0.02909540757536888,
0.003547597909346223,
0.05516897886991501,
-0.027237385511398315,
0.01963174343109131,
0.0513712614774704,
0.011240015737712383,
-0.04167279228568077,
-0.004828816745430231,
0.09032847732305527,
0.03846719115972519,
-0.009627006947994232,
0.06260106712579727,
0.07901700586080551,
0.02960585430264473,
-0.05153460428118706,
-0.01737557351589203,
0.012189444154500961,
0.031565964221954346,
-0.007044151425361633,
0.02527727372944355,
-0.03011629916727543,
0.014557912945747375,
0.032117247581481934,
-0.04736936464905739,
0.032484766095876694,
-0.035567861050367355,
-0.006324423011392355,
0.05365805700421333,
-0.019437775015830994,
0.04961532726883888,
0.08550987392663956,
-0.04520507529377937,
0.03009588085114956,
-0.03675209358334541,
0.00620191590860486,
-0.023766353726387024,
-0.013812662102282047,
0.0035654637031257153,
-0.03366900235414505,
-0.02045866660773754,
0.02111203595995903,
0.003825790947303176,
0.08359059691429138,
-0.009917961433529854,
-0.003759433049708605,
-0.014312898740172386,
0.03695627301931381,
0.048512764275074005,
0.02458306774497032,
-0.019601117819547653,
0.08387644588947296,
0.020203443244099617,
-0.038120087236166,
-0.01688554510474205,
-0.0029503763653337955,
0.03826301544904709,
-0.04097858443856239,
0.0026466611307114363,
-0.04255075752735138,
0.035118669271469116,
0.02576730214059353,
0.027400728315114975,
0.03228059038519859,
0.03777298703789711,
-0.015691101551055908,
0.024358471855521202,
0.06456118077039719,
-0.035894546657800674,
-0.00832026544958353,
-0.05921170860528946,
0.031668055802583694,
-0.0011561596766114235,
-0.05529148504137993,
-0.026992371305823326,
-0.011097090318799019,
0.01253654807806015,
-0.007488239090889692,
0.016916172578930855,
0.022316688671708107,
-0.009121665731072426,
0.049084462225437164,
0.09678051620721817,
-0.03765047714114189,
0.0032158081885427237,
0.0329543761909008,
0.006431616377085447,
-0.016038205474615097,
-0.0024948036298155785,
0.05418892204761505,
0.02995295636355877,
-0.04255075752735138,
0.0590483658015728,
0.026584014296531677,
-0.05557733401656151,
-0.004527654033154249,
0.0040963273495435715,
-0.02578771859407425,
0.044715046882629395,
-0.005737410392612219,
0.0031443459447473288,
-0.002445035148411989,
-0.0008735003066249192,
-0.07121738791465759,
0.009024680592119694,
0.018008526414632797,
-0.0256856307387352,
0.027298638597130775,
0.013853497803211212,
-0.03334231674671173,
-0.030504237860441208,
-0.05643488094210625,
-0.0294220931828022,
-0.06215187534689903,
0.05071789026260376,
0.0248689167201519,
-0.015782982110977173,
0.01090312097221613,
0.017589960247278214,
0.027400728315114975,
-0.030238807201385498,
-0.026441089808940887,
0.03697669133543968,
-0.005364784970879555,
-0.06284607946872711,
0.0009194404119625688,
0.040447723120450974,
-0.03748713433742523,
-0.04692017287015915,
0.013679945841431618,
-0.016181129962205887,
0.04142777621746063,
-0.08632658421993256,
0.03330148011445999,
0.0005844603874720633,
-0.027278220281004906,
0.010009841062128544,
-0.08877672255039215,
0.040937747806310654,
0.035588279366493225,
-0.053045522421598434,
-0.009045098908245564,
0.02458306774497032,
0.035751622170209885,
-0.008861338719725609,
0.024297218769788742,
0.021969584748148918,
-0.02490975335240364,
0.03830384835600853,
0.0347919836640358,
0.0173959918320179,
0.01757975108921528,
0.06423449516296387,
-0.04622596874833107,
-0.027666158974170685,
0.011536073870956898,
-0.02987128496170044,
0.01479271799325943,
-0.012577383778989315,
0.03879387676715851,
0.014813135378062725,
-0.057578280568122864,
-0.02109161764383316,
0.005523023195564747,
-0.04594011604785919,
0.040202707052230835,
0.04320412874221802,
0.027666158974170685,
-0.00043260277016088367,
0.06603126227855682,
0.04097858443856239,
0.00853465311229229,
-0.011382940225303173,
-0.024031786248087883,
0.0016257697716355324,
-0.08599989861249924,
0.001098734443075955,
0.053331371396780014,
0.052596330642700195,
-0.023562176153063774,
-0.024399306625127792,
0.01715097762644291,
-0.0005069364560768008,
-0.020570963621139526,
-0.049247805029153824,
0.022275852039456367,
0.01961132511496544,
0.023296743631362915,
-0.014302689582109451,
0.02511393092572689,
0.02141830325126648,
0.010882703587412834,
-0.0683588981628418,
0.0017457244684919715,
-0.0032847183756530285,
-0.010111930780112743,
-0.008606115356087685,
0.024256382137537003,
-0.0075903283432126045,
-0.020050309598445892,
0.06215187534689903,
0.004369415808469057,
0.0493294782936573,
-0.05369889363646507,
-0.013700364157557487,
0.04279577359557152,
-0.021949168294668198,
-0.032484766095876694,
-0.05520981177687645,
0.05161627382040024,
-0.00310095795430243,
0.01659969612956047,
0.028115352615714073,
-0.007023733574897051,
0.030585909262299538,
-0.03483281657099724,
-0.039202235639095306,
0.012689681723713875,
0.03885513171553612,
0.010637689381837845,
0.03879387676715851,
-0.01757975108921528,
-0.0008735003066249192,
0.028768721967935562,
-0.035833291709423065,
-0.0024322739336639643,
0.010719360783696175,
-0.04785939306020737,
0.04089691489934921,
-0.023970533162355423,
0.04508256912231445,
0.020366786047816277,
-0.007927222177386284,
-0.015364416874945164,
0.020632216706871986,
-0.04155028611421585,
0.013659528456628323,
-0.005020233802497387,
-0.048308584839105606,
-0.06329527497291565,
-0.02100994810461998,
-0.08395811915397644,
-0.0008269221289083362,
0.04602178931236267,
0.00028808281058445573,
-0.04589928314089775,
-0.01824333146214485,
0.005813977215439081,
-0.009019576013088226,
0.0337710902094841,
-0.004826264455914497,
-0.00532394926995039,
0.04528674855828285,
-0.023072147741913795,
0.012608010321855545,
-0.057578280568122864,
-0.035241175442934036,
-0.026584014296531677,
0.0434899777173996,
0.044715046882629395,
-0.027727413922548294,
0.020244278013706207,
0.01698763482272625,
-0.044102512300014496,
-0.016160711646080017
] |
52,236 |
osmnx.graph
|
graph_from_xml
|
Create a graph from data in a .osm formatted XML file.
Do not load an XML file generated by OSMnx: this use case is not supported
and may not behave as expected. To save/load graphs to/from disk for later
use in OSMnx, use the `io.save_graphml` and `io.load_graphml` functions
instead.
Parameters
----------
filepath : string or pathlib.Path
path to file containing OSM XML data
bidirectional : bool
if True, create bi-directional edges for one-way streets
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
encoding : string
the XML file's character encoding
Returns
-------
G : networkx.MultiDiGraph
|
def graph_from_xml(
filepath, bidirectional=False, simplify=True, retain_all=False, encoding="utf-8"
):
"""
Create a graph from data in a .osm formatted XML file.
Do not load an XML file generated by OSMnx: this use case is not supported
and may not behave as expected. To save/load graphs to/from disk for later
use in OSMnx, use the `io.save_graphml` and `io.load_graphml` functions
instead.
Parameters
----------
filepath : string or pathlib.Path
path to file containing OSM XML data
bidirectional : bool
if True, create bi-directional edges for one-way streets
simplify : bool
if True, simplify graph topology with the `simplify_graph` function
retain_all : bool
if True, return the entire graph even if it is not connected.
otherwise, retain only the largest weakly connected component.
encoding : string
the XML file's character encoding
Returns
-------
G : networkx.MultiDiGraph
"""
# transmogrify file of OSM XML data into JSON
response_jsons = [osm_xml._overpass_json_from_file(filepath, encoding)]
# create graph using this response JSON
G = _create_graph(response_jsons, bidirectional=bidirectional, retain_all=retain_all)
# simplify the graph topology as the last step
if simplify:
G = simplification.simplify_graph(G)
utils.log(f"graph_from_xml returned graph with {len(G):,} nodes and {len(G.edges):,} edges")
return G
|
(filepath, bidirectional=False, simplify=True, retain_all=False, encoding='utf-8')
|
[
-0.04990358650684357,
-0.003979953471571207,
-0.014506194740533829,
0.00600550789386034,
-0.015606730245053768,
-0.010530984960496426,
-0.05419187992811203,
-0.005711399484425783,
0.04770251736044884,
-0.03284528851509094,
-0.013472070917487144,
0.00853863637894392,
-0.06709471344947815,
0.08561406284570694,
0.0011627962812781334,
-0.003341927658766508,
-0.018177809193730354,
-0.07426716387271881,
-0.00003144545553368516,
0.04398346692323685,
0.012418973259627819,
-0.027892880141735077,
0.00959173496812582,
0.022067632526159286,
0.0541539303958416,
-0.006517826113849878,
-0.0008105775341391563,
0.029126238077878952,
-0.03626074269413948,
-0.00039431898039765656,
0.0005440416280180216,
-0.06762600690126419,
-0.02309226803481579,
-0.006318591069430113,
-0.012267175130546093,
0.04159265011548996,
-0.011973066255450249,
0.05392623320221901,
-0.05092822387814522,
-0.03349043056368828,
0.02309226803481579,
-0.042465485632419586,
0.07335637509822845,
-0.0053651100024580956,
-0.06580442935228348,
0.016545981168746948,
-0.010682783089578152,
0.0322570726275444,
0.0004476854810491204,
0.011555621400475502,
0.026811320334672928,
-0.03362325578927994,
-0.06625982373952866,
0.0541539303958416,
-0.02582463249564171,
-0.004231369122862816,
-0.023604586720466614,
0.07673387974500656,
0.07035836577415466,
0.005483702290803194,
-0.003021728713065386,
-0.017162660136818886,
0.049410246312618256,
0.0027015297673642635,
0.004110404755920172,
-0.009259677492082119,
-0.05392623320221901,
-0.061288438737392426,
-0.031934499740600586,
-0.019980410113930702,
-0.010151490569114685,
0.008756846189498901,
0.03859463706612587,
0.004274061881005764,
0.001774139003828168,
0.06398285180330276,
0.023699460551142693,
0.027228763327002525,
-0.03411659598350525,
0.05123182013630867,
-0.04280703142285347,
-0.0415167510509491,
0.005218056030571461,
-0.0034747507888823748,
-0.006707573775202036,
0.003360902424901724,
0.049410246312618256,
0.017485231161117554,
-0.017314458265900612,
-0.018766026943922043,
-0.039733123034238815,
0.026659522205591202,
-0.03567252680659294,
0.05419187992811203,
0.048119962215423584,
-0.040947508066892624,
-0.03806334361433983,
-0.03616587072610855,
0.02806365303695202,
-0.0056876810267567635,
-0.08197091519832611,
0.006105125416070223,
-0.05320519581437111,
-0.04379371926188469,
-0.04113725572824478,
-0.0034320575650781393,
0.01717214658856392,
0.04682967811822891,
0.04413526505231857,
-0.043148577213287354,
-0.08439967781305313,
-0.04747482016682625,
0.026299001649022102,
0.047398921102285385,
0.029904203489422798,
0.010844068601727486,
0.05051077902317047,
0.04846150800585747,
0.026735421270132065,
-0.020967096090316772,
-0.030150875449180603,
0.022883547469973564,
-0.02362356148660183,
0.047133274376392365,
0.030150875449180603,
0.012362048961222172,
0.12758620083332062,
-0.014790816232562065,
0.009971230290830135,
0.023111242800951004,
-0.036014072597026825,
0.006683855317533016,
0.04303472861647606,
0.009259677492082119,
0.024762047454714775,
-0.06584237515926361,
0.002399119781330228,
0.007751184515655041,
0.03347145766019821,
0.04629838466644287,
-0.016375208273530006,
-0.0667911171913147,
0.02464819885790348,
0.05149746686220169,
-0.036241769790649414,
-0.029202137142419815,
-0.02299739420413971,
-0.05016923323273659,
-0.05016923323273659,
-0.034173522144556046,
0.022560976445674896,
-0.003099999623373151,
-0.050093334168195724,
-0.044211164116859436,
0.01990451104938984,
-0.02720978856086731,
-0.02948675863444805,
0.0652351826429367,
-0.025881556794047356,
0.018766026943922043,
-0.043907567858695984,
0.10246364027261734,
0.03939157724380493,
0.004627466667443514,
-0.05502676963806152,
-0.04701942577958107,
-0.022067632526159286,
-0.02694414183497429,
0.011811780743300915,
-0.01730496995151043,
0.009411475621163845,
-0.014382859691977501,
-0.04003671929240227,
-0.04257933422923088,
-0.019980410113930702,
-0.0027181326877325773,
0.051573365926742554,
0.03356632962822914,
0.021726086735725403,
0.04956204444169998,
0.023737410083413124,
-0.04330037534236908,
0.0010341238230466843,
0.0023303362540900707,
0.029126238077878952,
0.02546411193907261,
0.04109930619597435,
-0.03684896230697632,
0.037228457629680634,
-0.032826315611600876,
0.07123120874166489,
0.02385125868022442,
0.04037826508283615,
-0.0006267596618272364,
0.0179026760160923,
-0.0781000629067421,
0.04770251736044884,
-0.03851873800158501,
-0.06337565928697586,
0.13843975961208344,
0.05783503130078316,
0.0084247887134552,
0.06060534715652466,
-0.000442348828073591,
0.000009932095053954981,
0.043907567858695984,
-0.05669654905796051,
-0.009629684500396252,
-0.0014681711327284575,
0.007158224005252123,
0.028784694150090218,
-0.01485722791403532,
0.0270769651979208,
0.010417137295007706,
0.0014468245208263397,
0.03988492116332054,
-0.05677244812250137,
0.07115530967712402,
-0.009003518149256706,
-0.06284436583518982,
-0.0028580715879797935,
-0.03263656795024872,
-0.05051077902317047,
-0.016062123700976372,
0.036735113710165024,
-0.011887679807841778,
0.03836693987250328,
0.014506194740533829,
0.0037736031226813793,
0.03155500814318657,
0.05164926499128342,
-0.016270846128463745,
0.05696219578385353,
-0.0464501827955246,
0.045880939811468124,
-0.019790662452578545,
0.00028195290360599756,
0.012456921860575676,
0.03432532027363777,
0.007053862791508436,
0.00690206466242671,
-0.06216127425432205,
-0.050852324813604355,
-0.008439019322395325,
0.041744448244571686,
-0.02125171758234501,
0.002820122055709362,
-0.04599478840827942,
-0.009553785435855389,
-0.01635623350739479,
0.015416983515024185,
-0.0015416983515024185,
0.019752712920308113,
0.02075837552547455,
0.013965414837002754,
-0.03174475580453873,
-0.0669049620628357,
-0.04178239777684212,
-0.009169546887278557,
-0.020511703565716743,
0.036640238016843796,
0.02092914655804634,
0.0006534429267048836,
-0.020872224122285843,
0.009866869077086449,
-0.012456921860575676,
-0.05047282949090004,
-0.025255389511585236,
0.04732302203774452,
-0.04303472861647606,
-0.030682168900966644,
0.05798682942986488,
-0.0026208870112895966,
-0.011678957380354404,
0.03459096699953079,
-0.04819586127996445,
0.00972455833107233,
-0.024894870817661285,
-0.02263687551021576,
0.002399119781330228,
-0.09115469455718994,
-0.027892880141735077,
0.024458451196551323,
0.02276969887316227,
-0.032332971692085266,
-0.015426470898091793,
-0.01183075550943613,
-0.013007190078496933,
0.0028794179670512676,
-0.037892572581768036,
0.06295821815729141,
0.00692578312009573,
-0.052598003298044205,
0.026412850245833397,
0.027361586689949036,
-0.0316498801112175,
0.0009345063590444624,
-0.029657531529664993,
0.002031483920291066,
0.011166639626026154,
0.020473754033446312,
0.004084314685314894,
0.07639233767986298,
-0.04656403139233589,
0.014316448010504246,
0.01445875782519579,
-0.0012558911694213748,
-0.028139552101492882,
-0.016564955934882164,
0.023946132510900497,
-0.03692486137151718,
0.0035032129380851984,
-0.04003671929240227,
-0.008809027262032032,
-0.02905033901333809,
0.006968476343899965,
-0.006546288263052702,
-0.051876962184906006,
0.06755010783672333,
-0.01944911666214466,
-0.026735421270132065,
0.03531200811266899,
-0.02810160256922245,
-0.0006587795214727521,
-0.04257933422923088,
0.019192958250641823,
0.04595683887600899,
0.024306653067469597,
0.05946686118841171,
-0.030226774513721466,
-0.006830909289419651,
0.031137561425566673,
-0.024496400728821754,
0.024837946519255638,
-0.03927772864699364,
0.0005532325012609363,
0.013035652227699757,
-0.032067324966192245,
0.034439168870449066,
0.013177962973713875,
0.0316498801112175,
-0.011365874670445919,
-0.008581330068409443,
-0.029733430594205856,
-0.028443148359656334,
0.02599540539085865,
-0.04660198092460632,
-0.06098484247922897,
-0.026868244633078575,
-0.04895485192537308,
-0.05039693042635918,
0.0696752741932869,
-0.009364038705825806,
0.051080022007226944,
-0.03567252680659294,
0.015179798938333988,
-0.019041160121560097,
0.03132731094956398,
0.018149346113204956,
0.0008704665815457702,
-0.010682783089578152,
-0.0017456768546253443,
0.015094412490725517,
-0.04011261835694313,
0.025217439979314804,
-0.014885690063238144,
0.05070052668452263,
0.06770190596580505,
-0.018073447048664093,
-0.020018359646201134,
-0.0054457527585327625,
0.0010821536416187882,
-0.0534328930079937,
0.053091347217559814,
-0.002926854882389307,
0.05024513229727745,
0.011479722335934639,
0.0043879104778170586,
0.015919813886284828,
0.028177501633763313,
-0.0066601368598639965,
0.005663962569087744,
0.054078031331300735,
0.0009309485903941095,
0.0015274672769010067,
-0.027285687625408173,
0.08348889648914337,
0.030416522175073624,
-0.04113725572824478,
-0.05745553970336914,
-0.04026441648602486,
0.01662188023328781,
-0.03333863243460655,
0.04534965008497238,
0.019136033952236176,
-0.00036437445669434965,
0.11346899718046188,
0.014601068571209908,
0.005232286639511585,
0.02720978856086731,
-0.019173983484506607,
-0.020720425993204117,
0.0024252100847661495,
0.0014397089835256338,
-0.0492204986512661,
0.08235041052103043,
-0.03316786140203476,
-0.04178239777684212,
0.025976430624723434,
-0.036867935210466385,
0.06736035645008087,
0.0010963847162202,
0.007447588723152876,
-0.01662188023328781,
-0.0024477425031363964,
0.049865636974573135,
0.004181560128927231,
0.020359905436635017,
0.015919813886284828,
0.01914552040398121,
0.004620351362973452,
0.025217439979314804,
-0.008666716516017914,
0.013234887272119522,
0.0016614764463156462,
-0.005042539443820715,
0.01131843775510788,
0.02402203157544136,
-0.01605263724923134,
0.08485507220029831,
0.01403182651847601,
-0.05047282949090004,
0.026147203519940376,
-0.052598003298044205,
0.0245533250272274,
-0.03128936141729355,
0.027532359585165977,
-0.0337560772895813,
0.05669654905796051,
0.04652608186006546,
-0.005597550887614489,
-0.02550206147134304,
-0.030397547408938408,
-0.028765719383955002,
-0.04231368750333786,
-0.05400213226675987,
-0.010123028419911861,
0.00425271550193429,
0.08250220865011215,
-0.032124247401952744,
-0.017523180693387985,
-0.06352745741605759,
0.07779646664857864,
-0.04254138469696045,
-0.042199838906526566,
-0.014050801284611225,
0.0009487374336458743,
-0.007390664424747229,
0.00039491194183938205,
0.036735113710165024,
0.03119448572397232,
-0.02770313248038292,
0.018500380218029022,
-0.010587909258902073,
0.008742615580558777,
-0.011726394295692444,
0.02774108201265335,
0.0053698536939918995,
-0.028708795085549355,
-0.03671613708138466,
0.0351981595158577,
-0.05244620516896248,
0.00031545519595965743,
-0.048651255667209625,
-0.004191047511994839,
0.0062142303213477135,
-0.037532053887844086,
0.01044559944421053,
0.03595714643597603,
-0.019259369000792503,
0.024097930639982224,
-0.012770005501806736,
0.0011663540499284863,
0.028443148359656334,
0.042655233293771744,
0.03692486137151718,
0.03980902209877968,
-0.05662064999341965,
-0.04607068747282028,
-0.04550144821405411,
-0.09214137494564056,
-0.028291350230574608,
-0.013045139610767365,
-0.014259523712098598,
0.0694475769996643,
0.03572945296764374,
-0.012029990553855896,
-0.031839627772569656,
0.006024482659995556,
-0.04117520526051521,
0.005023564677685499,
-0.06508338451385498,
-0.029695481061935425,
0.010749194771051407,
-0.01174536906182766,
0.11308950185775757,
-0.026242077350616455,
0.011337412521243095,
0.010976891964673996,
0.014648505486547947,
0.006968476343899965,
-0.010388675145804882,
0.04337627440690994,
0.04451476037502289,
-0.001414804719388485,
-0.006588981486856937,
0.005184850189834833,
0.02299739420413971,
-0.04280703142285347,
-0.03878438472747803,
0.026678496971726418,
-0.02375638484954834,
0.017684465274214745,
0.0961640253663063,
-0.054078031331300735,
-0.008391582407057285,
0.004665416199713945,
-0.023813309147953987,
0.018339093774557114,
-0.009131597355008125,
0.03590022400021553,
0.000051254057325422764,
-0.012362048961222172,
0.025786682963371277,
0.01734291948378086,
-0.09464604407548904,
0.08561406284570694,
-0.016773678362369537,
-0.02599540539085865,
-0.025483086705207825,
0.0007827083463780582,
-0.0000057860011111188214,
-0.07104145735502243,
0.051383618265390396,
0.0073195090517401695,
-0.0023493110202252865,
0.061516135931015015,
-0.022428153082728386,
0.014525169506669044,
-0.03424942120909691,
0.002834353130310774,
0.006275897845625877,
0.01875653862953186,
0.0253312885761261,
0.05889761820435524,
-0.0450081042945385,
0.04037826508283615,
-0.028386224061250687,
-0.00858607329428196,
-0.0400746688246727,
-0.004352333024144173,
0.0023327080998569727,
-0.01472440455108881,
0.03250374272465706,
0.03115653619170189,
0.04288293048739433,
0.018234733492136,
0.0030478190165013075,
0.02366151101887226,
0.00727207213640213,
0.005422034300863743,
-0.05024513229727745,
0.008391582407057285,
-0.018253708258271217,
-0.024325627833604813,
0.006807190831750631,
0.0025947969406843185,
-0.030720118433237076,
-0.01288385409861803,
0.005493189673870802,
-0.04375576972961426,
-0.008045293390750885,
-0.0019804893527179956,
0.052863650023937225,
0.07392562180757523,
0.07180044800043106,
-0.009828919544816017,
0.039201829582452774,
0.021896859630942345,
-0.0161285363137722,
0.01727650873363018,
-0.037949495017528534,
0.07563334703445435,
0.026925167068839073,
-0.07191429287195206,
-0.030397547408938408,
0.0192878320813179,
-0.05718989297747612,
-0.010976891964673996,
0.019506040960550308,
-0.03290221467614174,
-0.004176816437393427,
-0.0002649052767083049,
-0.027665182948112488,
-0.036867935210466385,
0.04090955853462219,
0.0065842377953231335,
-0.02366151101887226,
0.012807955034077168,
0.03405967354774475,
0.002727620070800185,
0.018471917137503624,
0.0024406269658356905,
-0.02855699695646763,
-0.0506625771522522,
0.02757030911743641,
-0.015606730245053768,
0.06352745741605759,
-0.050321031361818314,
-0.02563488483428955,
0.001076816930435598,
-0.021005045622587204,
0.0032280790619552135,
-0.012409485876560211,
-0.01609058678150177,
0.045691195875406265,
-0.010995866730809212,
-0.033091962337493896,
-0.006024482659995556,
0.06698086112737656,
0.06348951160907745,
-0.0669049620628357,
0.03402172401547432,
-0.006973220035433769,
0.026242077350616455,
-0.05601345747709274,
0.02267482504248619,
0.0765441358089447,
-0.023813309147953987,
-0.010711245238780975,
-0.06591827422380447,
-0.012788980267941952,
0.00212279986590147,
-0.042237788438797,
0.001966258278116584,
0.032826315611600876,
0.023832283914089203,
-0.035520728677511215,
0.01815883442759514,
-0.007371689658612013,
0.007167711388319731,
0.023642536252737045,
0.025312313809990883,
0.0015832055360078812,
0.047171223908662796,
0.012362048961222172,
-0.02626105211675167,
-0.028765719383955002,
-0.0029814073350280523,
0.01109074056148529,
0.023737410083413124,
-0.007020656950771809,
0.07362202554941177,
0.05889761820435524,
-0.049182549118995667,
-0.012969240546226501,
0.017513692378997803,
-0.019619889557361603,
0.004942921921610832,
-0.013652331195771694,
-0.0062664104625582695,
0.03056832030415535,
0.05870787054300308,
0.05024513229727745,
0.037000760436058044,
-0.017513692378997803,
-0.00008612756937509403,
0.001101128407754004,
-0.08143962174654007,
-0.005393572151660919,
0.010739707387983799,
0.1019323468208313,
0.07058606296777725,
-0.1074729785323143,
-0.037228457629680634,
-0.06421054899692535,
-0.02447742596268654,
-0.001499005127698183,
0.009753020480275154,
-0.00985738169401884,
-0.01609058678150177,
0.03250374272465706,
0.02774108201265335,
-0.009648659266531467,
0.03732332959771156,
-0.002993266563862562,
0.01046457327902317,
0.02362356148660183,
-0.006109869107604027,
-0.03827206790447235,
0.010075591504573822,
-0.037000760436058044,
0.008619279600679874,
0.03827206790447235,
0.037361279129981995,
0.027171839028596878,
-0.04978974163532257,
0.06056739762425423,
0.018547816202044487,
0.02007528394460678,
-0.022352254018187523,
-0.04895485192537308,
0.004247971810400486,
-0.002055202377960086,
0.047930214554071426,
0.011460747569799423,
-0.008054780773818493,
0.00403213407844305,
-0.06014995276927948,
0.02161223813891411,
-0.03261759132146835,
0.011052791029214859,
0.02941085956990719,
0.02523641474545002,
-0.014923639595508575,
-0.022788673639297485,
0.012741543352603912,
-0.03366120532155037,
0.005256005097180605,
0.009046210907399654,
-0.036146894097328186,
-0.010587909258902073,
-0.0072388662956655025,
0.026469774544239044,
-0.00026357112801633775,
-0.0253312885761261,
-0.036507416516542435,
0.026242077350616455,
0.037532053887844086,
-0.009743533097207546,
0.05293954908847809,
-0.04337627440690994,
-0.03142218291759491,
0.011081253178417683,
-0.07202814519405365,
-0.032029375433921814,
0.024173829704523087,
0.015103899873793125,
-0.06747420877218246,
0.03510328382253647,
-0.0406818613409996,
-0.0012914688559249043,
0.024856921285390854,
0.01839601807296276,
0.01625187136232853,
0.014705429784953594,
-0.006892577279359102,
0.00824452843517065,
-0.022219430655241013,
-0.06117459014058113,
-0.007423870265483856,
0.020454779267311096,
0.004568170756101608,
-0.05715194344520569,
-0.03218117356300354,
0.02309226803481579,
0.004980871453881264,
0.05073847621679306
] |
52,237 |
osmnx.convert
|
graph_to_gdfs
|
Convert a MultiDiGraph to node and/or edge GeoDataFrames.
This function is the inverse of `graph_from_gdfs`.
Parameters
----------
G : networkx.MultiDiGraph
input graph
nodes : bool
if True, convert graph nodes to a GeoDataFrame and return it
edges : bool
if True, convert graph edges to a GeoDataFrame and return it
node_geometry : bool
if True, create a geometry column from node x and y attributes
fill_edge_geometry : bool
if True, fill in missing edge geometry fields using nodes u and v
Returns
-------
geopandas.GeoDataFrame or tuple
gdf_nodes or gdf_edges or tuple of (gdf_nodes, gdf_edges). gdf_nodes
is indexed by osmid and gdf_edges is multi-indexed by u, v, key
following normal MultiDiGraph structure.
|
def graph_to_gdfs(G, nodes=True, edges=True, node_geometry=True, fill_edge_geometry=True):
"""
Convert a MultiDiGraph to node and/or edge GeoDataFrames.
This function is the inverse of `graph_from_gdfs`.
Parameters
----------
G : networkx.MultiDiGraph
input graph
nodes : bool
if True, convert graph nodes to a GeoDataFrame and return it
edges : bool
if True, convert graph edges to a GeoDataFrame and return it
node_geometry : bool
if True, create a geometry column from node x and y attributes
fill_edge_geometry : bool
if True, fill in missing edge geometry fields using nodes u and v
Returns
-------
geopandas.GeoDataFrame or tuple
gdf_nodes or gdf_edges or tuple of (gdf_nodes, gdf_edges). gdf_nodes
is indexed by osmid and gdf_edges is multi-indexed by u, v, key
following normal MultiDiGraph structure.
"""
crs = G.graph["crs"]
if nodes:
if not G.nodes: # pragma: no cover
msg = "graph contains no nodes"
raise ValueError(msg)
uvk, data = zip(*G.nodes(data=True))
if node_geometry:
# convert node x/y attributes to Points for geometry column
node_geoms = (Point(d["x"], d["y"]) for d in data)
gdf_nodes = gpd.GeoDataFrame(data, index=uvk, crs=crs, geometry=list(node_geoms))
else:
gdf_nodes = gpd.GeoDataFrame(data, index=uvk)
gdf_nodes.index = gdf_nodes.index.rename("osmid")
utils.log("Created nodes GeoDataFrame from graph")
if edges:
if not G.edges: # pragma: no cover
msg = "Graph contains no edges"
raise ValueError(msg)
u, v, k, data = zip(*G.edges(keys=True, data=True))
if fill_edge_geometry:
# subroutine to get geometry for every edge: if edge already has
# geometry return it, otherwise create it using the incident nodes
x_lookup = nx.get_node_attributes(G, "x")
y_lookup = nx.get_node_attributes(G, "y")
def _make_edge_geometry(u, v, data, x=x_lookup, y=y_lookup):
if "geometry" in data:
return data["geometry"]
# otherwise
return LineString((Point((x[u], y[u])), Point((x[v], y[v]))))
edge_geoms = map(_make_edge_geometry, u, v, data)
gdf_edges = gpd.GeoDataFrame(data, crs=crs, geometry=list(edge_geoms))
else:
gdf_edges = gpd.GeoDataFrame(data)
if "geometry" not in gdf_edges.columns:
# if no edges have a geometry attribute, create null column
gdf_edges = gdf_edges.set_geometry([None] * len(gdf_edges))
gdf_edges = gdf_edges.set_crs(crs)
# add u, v, key attributes as index
gdf_edges["u"] = u
gdf_edges["v"] = v
gdf_edges["key"] = k
gdf_edges = gdf_edges.set_index(["u", "v", "key"])
utils.log("Created edges GeoDataFrame from graph")
if nodes and edges:
return gdf_nodes, gdf_edges
if nodes:
return gdf_nodes
if edges:
return gdf_edges
# otherwise
msg = "you must request nodes or edges or both"
raise ValueError(msg)
|
(G, nodes=True, edges=True, node_geometry=True, fill_edge_geometry=True)
|
[
0.030848408117890358,
-0.01791447028517723,
0.015868205577135086,
0.023396916687488556,
-0.057720113545656204,
-0.00887519121170044,
-0.031562671065330505,
0.02023099735379219,
0.07717893272638321,
-0.04478617385029793,
0.010684977285563946,
0.007417710497975349,
-0.052932627499103546,
0.05401367321610451,
-0.01731603406369686,
-0.006993013899773359,
-0.08447599411010742,
0.01073323842138052,
0.043782345950603485,
0.015723422169685364,
-0.02432352676987648,
-0.07115596532821655,
0.03808755427598953,
-0.019980039447546005,
0.012364459224045277,
-0.03465137258172035,
0.029284752905368805,
0.018503254279494286,
0.03285606577992439,
0.05096358060836792,
-0.021678825840353966,
-0.08756469190120697,
-0.04046199470758438,
-0.011148283258080482,
0.015192551538348198,
0.01967117004096508,
0.007229492533951998,
0.032276932150125504,
-0.05683211237192154,
-0.039168599992990494,
-0.06239177659153938,
-0.06644569337368011,
-0.013764027506113052,
-0.019256124272942543,
0.010935934260487556,
0.006993013899773359,
0.013986027799546719,
-0.002895657904446125,
-0.018734905868768692,
-0.02841605618596077,
0.0075045800767838955,
-0.0566776767373085,
-0.03360893577337265,
0.0556352399289608,
0.0017156773246824741,
0.025115005671977997,
-0.032682325690984726,
0.03961259871721268,
-0.0015262530650943518,
0.004934683907777071,
-0.013792984187602997,
-0.01039541233330965,
-0.028667014092206955,
-0.008402233943343163,
-0.03187154233455658,
0.000847583229187876,
-0.03233484551310539,
-0.06127212196588516,
-0.0342266783118248,
0.034574154764413834,
-0.04571278765797615,
0.024728918448090553,
0.027103358879685402,
0.0059891860000789165,
0.002622983418405056,
0.07007492333650589,
0.01073323842138052,
0.021620912477374077,
-0.051272448152303696,
-0.002193460939452052,
-0.011669501662254333,
-0.01502846460789442,
-0.01641838066279888,
0.006949578877538443,
0.07536432147026062,
0.02779831551015377,
0.015588291920721531,
0.10432089865207672,
-0.0037957248277962208,
-0.10354872792959213,
0.013532374985516071,
-0.0036847246810793877,
-0.002034199656918645,
0.02266334928572178,
0.013445504941046238,
-0.05289401859045029,
-0.0452880896627903,
0.01243202481418848,
-0.010800804011523724,
0.012065241113305092,
-0.022952914237976074,
0.006520056165754795,
-0.047257136553525925,
0.06814448535442352,
-0.03129240870475769,
-0.07401301711797714,
-0.01657281629741192,
-0.020153779536485672,
0.001328383106738329,
-0.06961161643266678,
-0.09814349561929703,
0.01763455756008625,
0.10277654975652695,
-0.012045936658978462,
0.014188723638653755,
0.0038150292821228504,
0.03764355182647705,
0.01916925609111786,
-0.000019568313291529194,
-0.04297156259417534,
-0.017238816246390343,
0.06270064413547516,
0.01185289304703474,
-0.007586623542010784,
-0.0006672078161500394,
-0.02656283602118492,
0.0465235710144043,
-0.008749713189899921,
-0.020153779536485672,
-0.04505643621087074,
0.056986548006534576,
0.008793148212134838,
0.0010599314700812101,
0.0649399533867836,
0.01504776906222105,
-0.0847848653793335,
-0.05717959254980087,
0.014874029904603958,
0.022972218692302704,
0.00916475709527731,
-0.029690146446228027,
-0.08177337795495987,
-0.007229492533951998,
0.033917807042598724,
-0.04239243268966675,
0.031080061569809914,
-0.00820919033139944,
-0.03552006930112839,
-0.030307885259389877,
-0.05741124227643013,
0.009811454452574253,
-0.008218842558562756,
-0.03380198031663895,
-0.037489116191864014,
-0.04328043386340141,
-0.07022935897111893,
-0.037489116191864014,
0.003363789292052388,
0.010240976698696613,
0.058183420449495316,
-0.04131138697266579,
-0.015578639693558216,
0.0028546361718326807,
0.035056766122579575,
-0.0033082892186939716,
0.010627064853906631,
0.04629191756248474,
-0.07729475945234299,
-0.011553674936294556,
0.040307559072971344,
0.022875698283314705,
0.06787422299385071,
-0.05173575505614281,
-0.04347347840666771,
0.002553005004301667,
0.03592546284198761,
0.07876189798116684,
-0.009970715269446373,
-0.013213852420449257,
0.018599776551127434,
0.004630639683455229,
-0.03312632814049721,
-0.013001504354178905,
0.0521218441426754,
-0.00457272632047534,
0.03308771923184395,
0.0045051611959934235,
-0.031022148206830025,
0.033377282321453094,
-0.022161435335874557,
0.0027557010762393475,
-0.015511074103415012,
-0.019005168229341507,
0.058260638266801834,
0.05613715574145317,
-0.025655528530478477,
0.010627064853906631,
0.005762359127402306,
-0.05208323523402214,
0.1430841088294983,
0.008325016126036644,
0.007895493879914284,
0.051272448152303696,
0.0006189468549564481,
-0.01795307919383049,
-0.006703448016196489,
-0.005839576944708824,
-0.04911035671830177,
-0.023860221728682518,
0.015443508513271809,
-0.007147449068725109,
-0.027528055012226105,
0.0035664853639900684,
0.028165100142359734,
-0.004912966396659613,
0.014150114730000496,
-0.023435525596141815,
0.030327189713716507,
-0.013484113849699497,
0.00020812540606129915,
-0.021698130294680595,
-0.01040506362915039,
-0.03293328359723091,
-0.04799070209264755,
0.01651490293443203,
-0.0589555948972702,
0.026852400973439217,
-0.005854055285453796,
0.06490134447813034,
-0.07629093527793884,
0.05046166479587555,
-0.016003336757421494,
-0.012547850608825684,
-0.03467067703604698,
0.03785590082406998,
-0.04733435437083244,
0.0363115519285202,
-0.0019521560752764344,
0.032663021236658096,
-0.0005583190359175205,
-0.013098025694489479,
-0.04579000547528267,
-0.04216077923774719,
0.016148118302226067,
0.03538493812084198,
-0.0452880896627903,
-0.01183358859270811,
-0.005878185387700796,
0.029883189126849174,
0.005574141629040241,
-0.04478617385029793,
-0.021292738616466522,
0.016543859615921974,
0.01571376994252205,
-0.0017542861169204116,
-0.07617510855197906,
-0.03984425216913223,
-0.001493676914833486,
0.0008192298701032996,
-0.0033951587975025177,
0.025867877528071404,
-0.004162508063018322,
-0.035114679485559464,
0.05737263709306717,
0.04524948075413704,
-0.025230832397937775,
0.019043777137994766,
0.001826677587814629,
-0.027663184329867363,
-0.012103850021958351,
-0.0096135837957263,
0.023937439545989037,
0.005559663288295269,
-0.019400907680392265,
0.06243038550019264,
-0.04416843503713608,
-0.017460817471146584,
-0.024072568863630295,
0.004884009715169668,
-0.004000834189355373,
-0.02604161761701107,
-0.025771355256438255,
-0.04239243268966675,
0.027701793238520622,
-0.061696816235780716,
0.01475820317864418,
-0.03017275594174862,
0.010491933673620224,
0.03590615838766098,
-0.07042240351438522,
-0.0003930252278223634,
0.01832951419055462,
-0.014671333134174347,
0.043627914041280746,
-0.030307885259389877,
0.035076070576906204,
0.027412228286266327,
-0.0201730839908123,
0.01015410665422678,
0.0069833616726100445,
0.0707312673330307,
0.0072632753290236,
0.04760461673140526,
0.015964727848768234,
0.0415816493332386,
-0.006399403791874647,
0.010607760399580002,
-0.026447009295225143,
0.007871363312005997,
0.028280925005674362,
-0.06204429641366005,
0.0001315865374635905,
-0.02718057483434677,
0.012335502542555332,
-0.04007590562105179,
-0.010134803131222725,
0.002676070434972644,
-0.038010336458683014,
0.036852072924375534,
-0.01450724620372057,
-0.043705131858587265,
0.02424630895256996,
-0.01763455756008625,
0.056484632194042206,
-0.005974707659333944,
0.06397473812103271,
0.01008654199540615,
0.04911035671830177,
0.06980466097593307,
0.02204560860991478,
0.011254456825554371,
0.023358307778835297,
0.05625298246741295,
0.051272448152303696,
-0.010347151197493076,
0.03067466989159584,
0.051851581782102585,
-0.042701300233602524,
0.02262474037706852,
-0.008740060962736607,
0.003390332916751504,
0.044863391667604446,
-0.005612750072032213,
-0.028029968962073326,
0.011669501662254333,
0.0115826316177845,
0.0023804721422493458,
-0.042662691324949265,
-0.02025030180811882,
-0.0004889438860118389,
-0.023937439545989037,
0.08092398941516876,
-0.020655693486332893,
0.02789483778178692,
0.018841080367565155,
0.04671661555767059,
-0.027585968375205994,
0.014227332547307014,
-0.004041855689138174,
0.0556352399289608,
0.014729246497154236,
0.0018676993204280734,
0.06478551775217056,
-0.026350487023591995,
-0.00480679189786315,
-0.01394741889089346,
-0.003083875635638833,
0.06030690297484398,
0.008952409029006958,
-0.07845302671194077,
0.02660144306719303,
-0.044361479580402374,
0.0032745064236223698,
-0.0021741564851254225,
-0.01705542579293251,
0.04412982612848282,
-0.025694137439131737,
-0.03202597796916962,
-0.025308050215244293,
0.022200044244527817,
0.01156332716345787,
-0.04555835202336311,
0.0337054580450058,
0.0314275398850441,
0.06706343591213226,
-0.045442525297403336,
0.06451525539159775,
0.017788991332054138,
0.04038477689027786,
-0.040925297886133194,
-0.0614265576004982,
0.010231324471533298,
0.01304011233150959,
0.06270064413547516,
0.0006225664401426911,
-0.01573307439684868,
0.06188986077904701,
0.012827764265239239,
0.024053264409303665,
-0.019883517175912857,
-0.032238323241472244,
-0.002526461612433195,
0.002299634972587228,
0.03689068183302879,
0.00851806066930294,
0.010569151490926743,
0.03353171795606613,
-0.06192846968770027,
0.05227627605199814,
0.0036243984941393137,
0.03895625099539757,
0.040848080068826675,
-0.021022476255893707,
0.033280760049819946,
0.021659521386027336,
0.06092464178800583,
0.017518730834126472,
0.04644635319709778,
0.06470829993486404,
0.02557831071317196,
0.010115498676896095,
0.011283413507044315,
-0.018715601414442062,
0.015038116835057735,
-0.004292812664061785,
-0.021254129707813263,
-0.04918757453560829,
0.012924286536872387,
-0.019120994955301285,
0.08910904824733734,
0.006896492093801498,
-0.014874029904603958,
0.0021608846727758646,
-0.005984359886497259,
0.0025916139129549265,
-0.004925031680613756,
0.0069254483096301556,
-0.011428196914494038,
0.012663677334785461,
0.017846904695034027,
0.010906978510320187,
-0.032701630145311356,
0.001829090528190136,
-0.06200568750500679,
-0.0065490128472447395,
-0.06100185960531235,
-0.028010664507746696,
0.01795307919383049,
-0.010144454427063465,
0.01719055511057377,
0.05289401859045029,
0.013088373467326164,
0.0531642809510231,
-0.007446666713804007,
-0.05042305588722229,
0.00304044084623456,
0.037392597645521164,
0.008204364217817783,
-0.05903281271457672,
0.034554850310087204,
-0.005728576332330704,
-0.022740567103028297,
-0.0317557156085968,
0.018242644146084785,
0.028531882911920547,
0.004075638484209776,
0.07250727713108063,
-0.03582894057035446,
-0.06096325069665909,
-0.0015226334799081087,
0.06524882465600967,
-0.05911003053188324,
-0.029246143996715546,
-0.0789935514330864,
0.033396586775779724,
0.026485618203878403,
-0.07134900987148285,
0.0026181573048233986,
0.002613331191241741,
-0.06015246734023094,
-0.03642737492918968,
-0.018503254279494286,
0.05100218951702118,
0.0164955984801054,
0.00820919033139944,
0.02494126744568348,
0.01980629935860634,
-0.008233320899307728,
-0.030848408117890358,
-0.04061642661690712,
-0.002538526663556695,
-0.021891172975301743,
-0.009932106360793114,
-0.00039121543522924185,
0.03812616318464279,
0.07192814350128174,
0.005395575892180204,
-0.026910314336419106,
-0.003508572233840823,
-0.042508259415626526,
-0.01689133793115616,
0.025906486436724663,
-0.037315379828214645,
0.014208028092980385,
0.047295745462179184,
-0.04524948075413704,
0.018937602639198303,
0.042701300233602524,
0.030944930389523506,
-0.0018556341528892517,
-0.004329008515924215,
-0.03353171795606613,
0.07285474985837936,
0.035577982664108276,
-0.014294898137450218,
0.02787553332746029,
0.0010400237515568733,
0.01212315447628498,
-0.004073225427418947,
0.007345318794250488,
0.0016601772513240576,
-0.0054824454709887505,
0.02320387214422226,
0.031620584428310394,
-0.048454008996486664,
0.043627914041280746,
0.03692929074168205,
0.024458657950162888,
0.04061642661690712,
-0.013995680026710033,
-0.0165921188890934,
0.04096390679478645,
0.01048228144645691,
0.0035954418126493692,
0.010434020310640335,
-0.04814513772726059,
0.07717893272638321,
-0.0032913978211581707,
-0.025385268032550812,
-0.04918757453560829,
0.01567516103386879,
0.01328141801059246,
-0.062275949865579605,
0.0008922246051952243,
0.01935264654457569,
-0.038608770817518234,
0.05644602328538895,
-0.02557831071317196,
0.08764190971851349,
-0.03596407175064087,
0.015781335532665253,
0.019140299409627914,
0.039728425443172455,
-0.00211141724139452,
0.015578639693558216,
0.019603604450821877,
-0.03245067223906517,
0.023396916687488556,
-0.004172160290181637,
-0.04223799705505371,
-0.0347478948533535,
-0.030481625348329544,
0.028512578457593918,
0.03602198511362076,
0.0014514485374093056,
-0.007330840453505516,
0.010453324764966965,
0.011341326870024204,
-0.015124986879527569,
0.005168749485164881,
0.006795143708586693,
-0.026466313749551773,
0.01069462951272726,
-0.061194904148578644,
0.013735070824623108,
-0.005265271291136742,
-0.06212151423096657,
0.00799684226512909,
0.0012632308062165976,
-0.06532604247331619,
-0.02951640635728836,
0.016900990158319473,
0.05744985118508339,
0.057063765823841095,
0.02716127038002014,
0.03924581781029701,
-0.02949710190296173,
0.027431532740592957,
0.04687105119228363,
-0.035577982664108276,
0.005395575892180204,
-0.014362462796270847,
0.09613583981990814,
-0.012808459810912609,
-0.016543859615921974,
0.03521120175719261,
-0.015540030784904957,
-0.006095360033214092,
0.004719922319054604,
-0.06104046851396561,
-0.044361479580402374,
0.06876222044229507,
0.005033618770539761,
-0.03297189250588417,
-0.022721262648701668,
-0.038570161908864975,
0.012779503129422665,
-0.00990314967930317,
0.012644372880458832,
-0.03548146039247513,
0.03760494291782379,
0.042508259415626526,
-0.014989855699241161,
-0.05845368281006813,
-0.038010336458683014,
-0.0037209203001111746,
-0.04443869739770889,
0.04694826528429985,
-0.026891009882092476,
-0.05320288613438606,
-0.017663512378931046,
-0.022180739790201187,
-0.026987532153725624,
-0.0317557156085968,
0.015327682718634605,
0.020481953397393227,
0.001456274650990963,
-0.0008867952274158597,
-0.037489116191864014,
0.03984425216913223,
-0.019719431176781654,
-0.08841408789157867,
0.019960734993219376,
0.0003075128479395062,
0.023532046005129814,
-0.08795078098773956,
0.021041780710220337,
0.023532046005129814,
-0.023976046591997147,
0.03781729191541672,
-0.04046199470758438,
0.01881212368607521,
-0.003863290185108781,
-0.059959422796964645,
-0.03007623367011547,
-0.0370258130133152,
0.055403586477041245,
-0.018445340916514397,
0.06482412666082382,
-0.03015345148742199,
-0.006278751417994499,
0.027972055599093437,
0.033937111496925354,
-0.03405293822288513,
0.02252821810543537,
0.0579131580889225,
-0.05949611961841583,
-0.0403461679816246,
0.011572979390621185,
-0.026311878114938736,
0.029361970722675323,
-0.001853221096098423,
0.057720113545656204,
-0.006312534213066101,
-0.021562999114394188,
-0.002065569395199418,
0.01251889392733574,
-0.005308706313371658,
0.04760461673140526,
0.05671628564596176,
-0.05374341085553169,
0.001008654129691422,
0.027431532740592957,
0.008276755921542645,
-0.015433856286108494,
-0.014082550071179867,
0.045442525297403336,
0.004558247979730368,
-0.026968227699398994,
0.03322284668684006,
0.05671628564596176,
0.13791052997112274,
-0.038029640913009644,
-0.0324699766933918,
-0.03310702368617058,
-0.024169091135263443,
-0.00912614818662405,
-0.022354479879140854,
0.06424500048160553,
-0.005255619063973427,
0.01160193607211113,
-0.011061413213610649,
0.061194904148578644,
0.012267936952412128,
-0.0030742234084755182,
-0.022914305329322815,
0.01655351184308529,
-0.0057382285594940186,
-0.03140823543071747,
0.01444933284074068,
-0.03200667351484299,
0.023918135091662407,
-0.031002843752503395,
0.06030690297484398,
0.06841474771499634,
-0.033357977867126465,
-0.06451525539159775,
0.07204397022724152,
-0.02490265853703022,
-0.0271998792886734,
-0.055403586477041245,
-0.04069364443421364,
0.03492163494229317,
0.023918135091662407,
0.023474132642149925,
-0.01510568242520094,
-0.01191080641001463,
0.03304911032319069,
-0.03523050621151924,
-0.02490265853703022,
0.01787586137652397,
0.004362791310995817,
0.03889833763241768,
0.055364977568387985,
-0.021678825840353966,
0.014343159273266792,
-0.012132806703448296,
-0.05633020028471947,
0.005091531667858362,
-0.002743635792285204,
0.017103686928749084,
0.0715806633234024,
0.045017827302217484,
0.04532669857144356,
-0.032180409878492355,
-0.04389817267656326,
-0.008436016738414764,
0.01961325667798519,
-0.03463206812739372,
0.05779733136296272,
-0.010839412920176983,
-0.015800639986991882,
-0.05223766714334488,
0.00011597713455557823,
-0.0407322533428669,
-0.027721097692847252,
0.013725418597459793,
0.007041275035589933,
-0.042083561420440674,
0.031060757115483284,
0.013715766370296478,
-0.002242928370833397,
0.004181812517344952,
-0.014912637881934643,
0.01307872124016285,
0.02662074752151966,
-0.04131138697266579,
0.007446666713804007,
-0.03882111981511116,
-0.09227496385574341,
-0.03804894536733627,
0.025057092308998108,
-0.03409154713153839,
-0.004990183748304844,
-0.03233484551310539,
0.014603768475353718,
-0.01510568242520094,
0.0698818787932396
] |
52,239 |
osmnx.routing
|
k_shortest_paths
|
Solve `k` shortest paths from an origin node to a destination node.
Uses Yen's algorithm. See also `shortest_path` to solve just the one
shortest path.
Parameters
----------
G : networkx.MultiDiGraph
input graph
orig : int
origin node ID
dest : int
destination node ID
k : int
number of shortest paths to solve
weight : string
edge attribute to minimize when solving shortest paths. default is
edge length in meters.
Yields
------
path : list
a generator of `k` shortest paths ordered by total weight. each path
is a list of node IDs.
|
def k_shortest_paths(G, orig, dest, k, weight="length"):
"""
Solve `k` shortest paths from an origin node to a destination node.
Uses Yen's algorithm. See also `shortest_path` to solve just the one
shortest path.
Parameters
----------
G : networkx.MultiDiGraph
input graph
orig : int
origin node ID
dest : int
destination node ID
k : int
number of shortest paths to solve
weight : string
edge attribute to minimize when solving shortest paths. default is
edge length in meters.
Yields
------
path : list
a generator of `k` shortest paths ordered by total weight. each path
is a list of node IDs.
"""
_verify_edge_attribute(G, weight)
paths_gen = nx.shortest_simple_paths(convert.to_digraph(G, weight), orig, dest, weight)
yield from itertools.islice(paths_gen, 0, k)
|
(G, orig, dest, k, weight='length')
|
[
0.009977531619369984,
-0.014278192073106766,
-0.04689983278512955,
-0.01522886473685503,
-0.0612051859498024,
-0.004053938202559948,
0.014558866620063782,
0.06949867308139801,
0.07138190418481827,
0.02725260518491268,
-0.028121791779994965,
0.001581058488227427,
-0.010394017212092876,
0.030367188155651093,
-0.016016565263271332,
-0.008791455067694187,
0.014631299301981926,
-0.028574492782354355,
-0.014414002187550068,
0.008488145656883717,
0.00195680046454072,
-0.08967103064060211,
0.018452096730470657,
0.03828040510416031,
-0.0539981834590435,
0.011652525514364243,
0.03493041545152664,
0.020190468057990074,
-0.02768719755113125,
-0.055990070104599,
0.024373427033424377,
-0.01986452378332615,
0.053201429545879364,
0.05678682401776314,
-0.008433821611106396,
0.0058579519391059875,
-0.027415577322244644,
-0.05689547210931778,
-0.03583581745624542,
-0.07341000437736511,
0.01932128146290779,
0.0051200492307543755,
0.008714496158063412,
-0.024916667491197586,
0.05950303003191948,
0.08213808387517929,
0.008316119201481342,
0.03145367279648781,
0.01895912177860737,
-0.008773347362875938,
-0.033445555716753006,
0.0012155023869127035,
-0.049652256071567535,
-0.02042587287724018,
0.028266655281186104,
-0.019031554460525513,
-0.02272559516131878,
0.003827587701380253,
0.01761007122695446,
-0.02062506228685379,
-0.0009489746298640966,
-0.05088360235095024,
0.04581334814429283,
0.10509908199310303,
-0.07475000619888306,
-0.05186143517494202,
-0.029932595789432526,
-0.02949800342321396,
-0.021150194108486176,
0.0010248020989820361,
0.013137385249137878,
-0.0012392692733556032,
-0.034821767359972,
-0.00637403130531311,
-0.032177992165088654,
0.029642866924405098,
-0.019393714144825935,
0.026401527225971222,
-0.010719961486756802,
-0.028737464919686317,
-0.03402501344680786,
-0.03857013210654259,
-0.051100898534059525,
-0.06171221286058426,
0.0094342902302742,
0.031127726659178734,
0.00533281872048974,
-0.02468126267194748,
-0.017791152000427246,
-0.010738070122897625,
-0.053418729454278946,
0.029588542878627777,
0.027469901368021965,
0.010819556191563606,
0.03958418220281601,
0.016387779265642166,
-0.03791824355721474,
-0.04715334624052048,
0.011724958196282387,
0.006654705852270126,
0.04516145959496498,
-0.030041243880987167,
-0.04729820787906647,
0.02187451720237732,
0.04298849403858185,
-0.06656517088413239,
-0.0390409417450428,
-0.001146465539932251,
-0.02949800342321396,
-0.022870458662509918,
0.005206062458455563,
0.029027193784713745,
0.030041243880987167,
-0.04048958420753479,
-0.00633328827098012,
0.02323262020945549,
0.038099322468042374,
0.010040909983217716,
-0.011806444264948368,
0.01565440371632576,
-0.007564635016024113,
-0.023413699120283127,
-0.04429227486252785,
0.017293181270360947,
0.013825491070747375,
0.017836423590779305,
0.025405583903193474,
0.024608829990029335,
0.005685925483703613,
-0.03215988352894783,
0.043278224766254425,
0.027560442686080933,
0.030041243880987167,
0.07467757165431976,
-0.010439286939799786,
0.035202037543058395,
-0.03205123543739319,
0.039765264838933945,
0.06623922288417816,
0.009443344548344612,
0.02708963304758072,
-0.06917272508144379,
0.008447402156889439,
0.021095870062708855,
0.009932261891663074,
-0.06174842640757561,
-0.014948190189898014,
-0.01596223935484886,
0.04838469251990318,
0.02790449559688568,
0.012141442857682705,
0.06102410703897476,
0.0898883268237114,
-0.039366886019706726,
-0.008067132905125618,
-0.03817175701260567,
-0.006627543829381466,
0.03170718252658844,
0.00766422925516963,
-0.0008754107402637601,
0.01695818267762661,
-0.06435598433017731,
0.02966097556054592,
-0.004024512600153685,
-0.009257737547159195,
0.03668689727783203,
0.043567951768636703,
0.012376847676932812,
-0.06062572821974754,
0.03371717780828476,
-0.021783975884318352,
-0.03677743673324585,
0.02107776328921318,
-0.05595385283231735,
0.0032096507493406534,
0.013445221818983555,
0.00015957713185343891,
0.0013501809444278479,
0.053961969912052155,
-0.03617987036705017,
-0.04921765998005867,
0.028158007189631462,
-0.041974443942308426,
-0.005079306196421385,
0.006446463521569967,
0.004843901377171278,
0.012005632743239403,
0.004511166363954544,
0.00933469645678997,
-0.03011367656290531,
-0.023069648072123528,
0.03388014808297157,
0.018180474638938904,
0.06551489979028702,
-0.0296066515147686,
0.025912610813975334,
-0.0005344701930880547,
-0.01056604366749525,
-0.02337748371064663,
0.12154118716716766,
-0.021113978698849678,
-0.011326581239700317,
0.014531704597175121,
0.0221280287951231,
0.06870191544294357,
0.019701551645994186,
0.013780221343040466,
0.04983333498239517,
-0.004128633998334408,
0.027614766731858253,
-0.017745882272720337,
-0.03491230681538582,
-0.008211997337639332,
-0.03907715901732445,
-0.020081819966435432,
0.05063008889555931,
-0.044726867228746414,
0.04168471693992615,
-0.0018108043586835265,
-0.0754743218421936,
-0.006736191920936108,
0.00470356410369277,
-0.0008816353511065245,
0.013463330455124378,
0.02674558013677597,
-0.057293850928545,
0.05385332182049751,
-0.03998256102204323,
-0.028121791779994965,
-0.05309278145432472,
0.028230439871549606,
-0.044328488409519196,
0.0793132334947586,
0.0019794355612248182,
0.06334193795919418,
-0.01148955337703228,
-0.011525769717991352,
-0.022870458662509918,
0.09394452720880508,
0.0015686092665418983,
-0.044074978679418564,
-0.06290734559297562,
-0.04374903440475464,
-0.03601689636707306,
-0.033789608627557755,
0.030439620837569237,
0.004350457340478897,
-0.058525197207927704,
0.06399382650852203,
0.0011962626595050097,
-0.009751181118190289,
0.0221280287951231,
-0.048348475247621536,
-0.04306092858314514,
0.006423828192055225,
-0.019882632419466972,
-0.0003488627844490111,
-0.052911702543497086,
-0.031833939254283905,
-0.01670466922223568,
-0.04168471693992615,
0.06326950341463089,
-0.10958987474441528,
0.06131383404135704,
0.0027569495141506195,
0.04099661111831665,
0.02258072979748249,
-0.024065589532256126,
-0.06109653785824776,
-0.035202037543058395,
0.02357667312026024,
0.05479493737220764,
-0.09169913083314896,
-0.0009817954851314425,
0.011878876015543938,
0.03476744145154953,
-0.026781795546412468,
0.061494916677474976,
-0.03668689727783203,
-0.05052144080400467,
-0.039113372564315796,
-0.004970658104866743,
-0.020534520968794823,
0.012114280834794044,
-0.0487830676138401,
0.04150363430380821,
0.020697493106126785,
-0.05830790102481842,
0.023305051028728485,
-0.02880989760160446,
0.06055329740047455,
0.017021561041474342,
0.04345930367708206,
-0.03933066874742508,
0.0319063737988472,
0.042119309306144714,
-0.022164244204759598,
-0.002503436990082264,
-0.03139934688806534,
0.013010629452764988,
-0.0009687803103588521,
-0.0377371609210968,
0.01056604366749525,
-0.014794271439313889,
0.04867441952228546,
-0.0029335031285881996,
0.017836423590779305,
-0.027922602370381355,
0.013463330455124378,
0.006564165931195021,
-0.04639280587434769,
-0.05736628174781799,
-0.017410883679986,
-0.04805874824523926,
-0.02292478270828724,
-0.05914086848497391,
-0.013888869434595108,
0.036053113639354706,
-0.011833606287837029,
0.03447771444916725,
0.006446463521569967,
0.04925387725234032,
-0.06207437440752983,
0.03427852690219879,
-0.002487592399120331,
0.033137720078229904,
0.02879178896546364,
0.021639112383127213,
0.019303174689412117,
-0.018452096730470657,
0.023793969303369522,
0.03480365872383118,
-0.016396833583712578,
0.03161664307117462,
-0.03802689164876938,
0.10039099305868149,
0.04125012457370758,
-0.011353743262588978,
-0.046429023146629333,
0.008221051655709743,
0.08192078769207001,
-0.05627979710698128,
-0.024862343445420265,
0.02623855508863926,
0.010747123509645462,
0.06656517088413239,
0.0030670498963445425,
-0.03994634374976158,
0.012087118811905384,
0.01282049436122179,
0.0009325642604380846,
0.029117733240127563,
0.04168471693992615,
-0.045487403869628906,
0.050304144620895386,
0.06993326544761658,
0.030367188155651093,
-0.02705341763794422,
-0.024300994351506233,
-0.000814861967228353,
0.017736827954649925,
0.036596354097127914,
0.01680426485836506,
-0.011344688944518566,
-0.008488145656883717,
0.035202037543058395,
0.033047180622816086,
-0.04117769002914429,
-0.0013920558849349618,
0.024862343445420265,
-0.03436906635761261,
-0.02156667970120907,
-0.01056604366749525,
0.05972032621502876,
-0.011290364898741245,
0.05117332935333252,
0.02227289415895939,
-0.0048891715705394745,
0.020443981513381004,
0.058126818388700485,
-0.0008906893781386316,
0.036125548183918,
0.028339087963104248,
0.09148183465003967,
-0.002385734813287854,
-0.0436403825879097,
0.002883706009015441,
-0.029226381331682205,
-0.008578685112297535,
-0.02986016310751438,
-0.02031722478568554,
-0.032829880714416504,
0.06989704817533493,
0.02227289415895939,
-0.00663659768179059,
-0.056678175926208496,
0.026473959907889366,
0.019991280511021614,
-0.05247711017727852,
-0.02804935909807682,
-0.0195204708725214,
0.002777321031317115,
-0.04892793297767639,
0.01986452378332615,
-0.023142078891396523,
0.002244265517219901,
0.01820763759315014,
0.03000502847135067,
0.03000502847135067,
0.03576338663697243,
-0.027777738869190216,
0.014703731052577496,
0.05309278145432472,
0.01866939291357994,
-0.00590774929150939,
-0.04729820787906647,
-0.06917272508144379,
0.044328488409519196,
0.0448717325925827,
0.004785050638020039,
0.016740886494517326,
-0.04581334814429283,
0.06732570379972458,
-0.06218302249908447,
0.03380771726369858,
-0.026781795546412468,
0.004395727533847094,
-0.028085574507713318,
-0.012141442857682705,
-0.004160323180258274,
-0.027506118640303612,
0.0153012964874506,
0.019031554460525513,
0.0025487071834504604,
-0.02850206010043621,
0.02819422259926796,
0.034151770174503326,
-0.021458031609654427,
0.028212331235408783,
-0.05627979710698128,
-0.012358739972114563,
-0.03578149527311325,
-0.03116394206881523,
0.01912209391593933,
-0.011634417809545994,
-0.07692296802997589,
0.011317526921629906,
0.0005822867969982326,
0.03205123543739319,
-0.021168302744627,
-0.03703095018863678,
-0.021910732612013817,
-0.010439286939799786,
-0.0077094994485378265,
-0.00795395765453577,
0.044582001864910126,
0.022490190342068672,
-0.021258842200040817,
-0.11690552532672882,
0.010312531143426895,
0.07540189474821091,
-0.0003598973562475294,
0.052549540996551514,
-0.019592903554439545,
0.006604908965528011,
0.032540153712034225,
0.03947553411126137,
0.013164547272026539,
0.03589014336466789,
-0.0526944063603878,
0.05388953536748886,
0.005396197084337473,
-0.042227957397699356,
0.010403070598840714,
0.017872639000415802,
-0.02924448996782303,
-0.06403004378080368,
0.06294355541467667,
-0.021892623975872993,
-0.017392775043845177,
-0.054686289280653,
-0.010855771601200104,
0.06848461925983429,
-0.0005039129173383117,
-0.005079306196421385,
-0.043423086404800415,
-0.00046203803503885865,
-0.0468636155128479,
-0.028628816828131676,
0.012005632743239403,
0.08344186097383499,
-0.017519531771540642,
0.04298849403858185,
-0.061494916677474976,
-0.004196539055556059,
0.04715334624052048,
-0.0032956639770418406,
0.02017235942184925,
0.014984405599534512,
0.009443344548344612,
-0.040417153388261795,
0.033789608627557755,
-0.03335501626133919,
0.03516582027077675,
-0.006134099792689085,
0.03418798744678497,
0.003234549192711711,
0.00848361849784851,
-0.0035650210920721292,
0.048891715705394745,
0.026419635862112045,
0.03393447399139404,
0.05294791981577873,
0.048601988703012466,
0.057293850928545,
-0.03125448152422905,
-0.03226853162050247,
0.02966097556054592,
0.005052144173532724,
-0.023051539435982704,
0.024572614580392838,
0.002487592399120331,
0.04230038821697235,
0.017845476046204567,
-0.0403447188436985,
0.014984405599534512,
0.018053719773888588,
-0.006627543829381466,
0.012458333745598793,
0.008361388929188251,
0.014785217121243477,
0.058271683752536774,
0.03215988352894783,
0.08293484151363373,
-0.0042372820898890495,
0.004402517806738615,
0.022164244204759598,
0.008642063476145267,
0.013734950684010983,
0.030367188155651093,
-0.001684047980234027,
-0.026673147454857826,
-0.01655980572104454,
-0.007886053062975407,
0.0211320873349905,
0.03558230400085449,
0.008515307679772377,
0.013064953498542309,
-0.033699069172143936,
-0.038751211017370224,
-0.033699069172143936,
0.017220748588442802,
0.021186411380767822,
0.04726199433207512,
0.012259145267307758,
0.005473155993968248,
0.01522886473685503,
-0.005984708201140165,
-0.008433821611106396,
0.01151671539992094,
-0.029262598603963852,
-0.04900036379694939,
0.0038456956390291452,
-0.002856543753296137,
0.011616310104727745,
-0.0034835347905755043,
0.006727138068526983,
-0.01690385863184929,
0.009579154662787914,
0.0244277510792017,
-0.01986452378332615,
-0.023522349074482918,
0.03922202065587044,
-0.0003531068505253643,
-0.04345930367708206,
0.00486653670668602,
0.013427114114165306,
-0.0494711734354496,
-0.020009387284517288,
-0.01570872776210308,
0.030892321839928627,
0.06555111706256866,
0.05613493546843529,
0.11140068620443344,
0.01474900171160698,
-0.001361498492769897,
-0.0038140066899359226,
-0.01870560832321644,
-0.07460513710975647,
0.02182019129395485,
0.025966934859752655,
0.007347338367253542,
0.0009535016724839807,
0.009207939729094505,
-0.0015007040929049253,
-0.09742127358913422,
-0.03215988352894783,
-0.02182019129395485,
0.03636094927787781,
-0.0032209681812673807,
-0.029009085148572922,
-0.054686289280653,
0.031127726659178734,
-0.0018764459528028965,
-0.01231346931308508,
0.06287112832069397,
-0.016079941764473915,
-0.06500787287950516,
0.024300994351506233,
0.015889808535575867,
-0.004178430885076523,
0.013662518933415413,
0.03831661865115166,
-0.040417153388261795,
-0.07275811582803726,
0.02929881401360035,
0.020806141197681427,
-0.012603198178112507,
-0.04577713459730148,
-0.04298849403858185,
-0.005364507902413607,
-0.030566377565264702,
0.03697662428021431,
0.02201938070356846,
-0.008207470178604126,
0.029516110196709633,
-0.007383554708212614,
0.036958515644073486,
-0.04599443078041077,
0.017293181270360947,
-0.043567951768636703,
-0.02859259955585003,
0.027614766731858253,
0.04088796302676201,
-0.0018719190265983343,
-0.03572716936469078,
0.013744005002081394,
-0.03065691702067852,
0.0018323076656088233,
0.035401225090026855,
-0.039620399475097656,
0.07369973510503769,
-0.041612282395362854,
0.004739780444651842,
-0.07844404131174088,
0.021439922973513603,
-0.0009376571397297084,
-0.0015686092665418983,
-0.02785017155110836,
-0.02323262020945549,
-0.010013747960329056,
0.018080880865454674,
-0.0007780799642205238,
-0.0244277510792017,
0.034948524087667465,
0.03654203191399574,
0.014332516118884087,
-0.048891715705394745,
0.036053113639354706,
-0.03487609326839447,
0.04092417657375336,
0.03040340542793274,
0.06377653032541275,
-0.016423994675278664,
-0.052404675632715225,
0.058778706938028336,
0.02102343924343586,
-0.07924079895019531,
-0.009724019095301628,
-0.04201066121459007,
-0.06345058232545853,
0.0029923541005700827,
-0.013200763612985611,
-0.009239628911018372,
-0.07413432747125626,
0.0253874771296978,
0.050304144620895386,
-0.004493058193475008,
-0.05493980273604393,
-0.057474929839372635,
0.005984708201140165,
0.01402467954903841,
0.018778041005134583,
0.028375303372740746,
-0.008705441839993,
0.07196136564016342,
-0.041974443942308426,
-0.05443277955055237,
0.02674558013677597,
0.0018594696884974837,
0.04204687848687172,
-0.02488045208156109,
0.04125012457370758,
0.03849770128726959,
0.004545118659734726,
-0.01015861239284277,
0.014151436276733875,
0.00383890513330698,
0.019683443009853363,
-0.03838905319571495,
0.04581334814429283,
-0.001991884782910347,
-0.0002968021435663104,
-0.07145433872938156,
-0.027614766731858253,
-0.05066630616784096,
-0.06551489979028702,
0.025912610813975334,
0.0057176146656274796,
0.057873304933309555,
0.004780523478984833,
-0.027669090777635574,
-0.01765534281730652,
-0.013906977139413357,
-0.017048722133040428,
-0.02042587287724018,
-0.04530632495880127,
-0.07721269875764847,
0.00875071156769991,
0.036759328097105026,
0.0009252078598365188,
-0.059285733848810196,
-0.04635659232735634,
0.03286609798669815,
-0.04179336503148079,
0.06757921725511551,
0.024300994351506233,
-0.022870458662509918,
-0.008062606677412987,
-0.026818012818694115,
-0.01870560832321644,
0.006206532008945942,
-0.011127392761409283,
-0.026021258905529976,
-0.01630629226565361,
-0.0034337376710027456,
0.03284798935055733,
0.015147378668189049,
0.042227957397699356,
0.058018170297145844,
0.00016198211233131588,
0.05975654348731041,
0.002206917852163315,
0.02332315966486931,
0.009542939253151417,
-0.0279950350522995,
-0.022363433614373207,
0.012476441450417042,
-0.004207856487482786,
0.015735888853669167,
0.05327386409044266,
-0.01901344582438469,
0.044726867228746414,
-0.01103685237467289,
-0.00795395765453577,
-0.02303343079984188,
-0.07866133749485016,
-0.009017805568873882,
-0.022037489339709282,
-0.013390897773206234,
-0.04921765998005867,
-0.038099322468042374,
-0.03418798744678497,
0.03608933091163635,
-0.019936956465244293,
0.002297458006069064,
0.05363602563738823,
0.043278224766254425
] |
52,240 |
osmnx.io
|
load_graphml
|
Load an OSMnx-saved GraphML file from disk or GraphML string.
This function converts node, edge, and graph-level attributes (serialized
as strings) to their appropriate data types. These can be customized as
needed by passing in dtypes arguments providing types or custom converter
functions. For example, if you want to convert some attribute's values to
`bool`, consider using the built-in `ox.io._convert_bool_string` function
to properly handle "True"/"False" string literals as True/False booleans:
`ox.load_graphml(fp, node_dtypes={my_attr: ox.io._convert_bool_string})`.
If you manually configured the `all_oneway=True` setting, you may need to
manually specify here that edge `oneway` attributes should be type `str`.
Note that you must pass one and only one of `filepath` or `graphml_str`.
If passing `graphml_str`, you may need to decode the bytes read from your
file before converting to string to pass to this function.
Parameters
----------
filepath : string or pathlib.Path
path to the GraphML file
graphml_str : string
a valid and decoded string representation of a GraphML file's contents
node_dtypes : dict
dict of node attribute names:types to convert values' data types. the
type can be a python type or a custom string converter function.
edge_dtypes : dict
dict of edge attribute names:types to convert values' data types. the
type can be a python type or a custom string converter function.
graph_dtypes : dict
dict of graph-level attribute names:types to convert values' data
types. the type can be a python type or a custom string converter
function.
Returns
-------
G : networkx.MultiDiGraph
|
def load_graphml(
filepath=None, graphml_str=None, node_dtypes=None, edge_dtypes=None, graph_dtypes=None
):
"""
Load an OSMnx-saved GraphML file from disk or GraphML string.
This function converts node, edge, and graph-level attributes (serialized
as strings) to their appropriate data types. These can be customized as
needed by passing in dtypes arguments providing types or custom converter
functions. For example, if you want to convert some attribute's values to
`bool`, consider using the built-in `ox.io._convert_bool_string` function
to properly handle "True"/"False" string literals as True/False booleans:
`ox.load_graphml(fp, node_dtypes={my_attr: ox.io._convert_bool_string})`.
If you manually configured the `all_oneway=True` setting, you may need to
manually specify here that edge `oneway` attributes should be type `str`.
Note that you must pass one and only one of `filepath` or `graphml_str`.
If passing `graphml_str`, you may need to decode the bytes read from your
file before converting to string to pass to this function.
Parameters
----------
filepath : string or pathlib.Path
path to the GraphML file
graphml_str : string
a valid and decoded string representation of a GraphML file's contents
node_dtypes : dict
dict of node attribute names:types to convert values' data types. the
type can be a python type or a custom string converter function.
edge_dtypes : dict
dict of edge attribute names:types to convert values' data types. the
type can be a python type or a custom string converter function.
graph_dtypes : dict
dict of graph-level attribute names:types to convert values' data
types. the type can be a python type or a custom string converter
function.
Returns
-------
G : networkx.MultiDiGraph
"""
if (filepath is None and graphml_str is None) or (
filepath is not None and graphml_str is not None
): # pragma: no cover
msg = "You must pass one and only one of `filepath` or `graphml_str`."
raise ValueError(msg)
# specify default graph/node/edge attribute values' data types
default_graph_dtypes = {"simplified": _convert_bool_string}
default_node_dtypes = {
"elevation": float,
"elevation_res": float,
"lat": float,
"lon": float,
"osmid": int,
"street_count": int,
"x": float,
"y": float,
}
default_edge_dtypes = {
"bearing": float,
"grade": float,
"grade_abs": float,
"length": float,
"oneway": _convert_bool_string,
"osmid": int,
"reversed": _convert_bool_string,
"speed_kph": float,
"travel_time": float,
}
# override default graph/node/edge attr types with user-passed types, if any
if graph_dtypes is not None:
default_graph_dtypes.update(graph_dtypes)
if node_dtypes is not None:
default_node_dtypes.update(node_dtypes)
if edge_dtypes is not None:
default_edge_dtypes.update(edge_dtypes)
if filepath is not None:
# read the graphml file from disk
source = filepath
G = nx.read_graphml(
Path(filepath), node_type=default_node_dtypes["osmid"], force_multigraph=True
)
else:
# parse the graphml string
source = "string"
G = nx.parse_graphml(
graphml_str, node_type=default_node_dtypes["osmid"], force_multigraph=True
)
# convert graph/node/edge attribute data types
utils.log("Converting node, edge, and graph-level attribute data types")
G = _convert_graph_attr_types(G, default_graph_dtypes)
G = _convert_node_attr_types(G, default_node_dtypes)
G = _convert_edge_attr_types(G, default_edge_dtypes)
utils.log(f"Loaded graph with {len(G)} nodes and {len(G.edges)} edges from {source!r}")
return G
|
(filepath=None, graphml_str=None, node_dtypes=None, edge_dtypes=None, graph_dtypes=None)
|
[
0.023225445300340652,
0.04958731681108475,
-0.002120314398780465,
0.011146227829158306,
-0.007384500466287136,
-0.01934461109340191,
-0.07003364711999893,
0.03747832402586937,
0.05784525349736214,
-0.04565685614943504,
-0.004491244908422232,
0.0381135493516922,
-0.02159767784178257,
0.0825793594121933,
-0.000582497101277113,
0.00901226606220007,
-0.0811103954911232,
-0.009290177375078201,
0.022451262921094894,
-0.027433816343545914,
-0.024198133498430252,
0.00398256815969944,
0.007056961767375469,
0.02463485114276409,
0.05899659916758537,
-0.007543306797742844,
0.03211860731244087,
0.026560379192233086,
-0.007657448761165142,
0.03285308554768562,
-0.018391773104667664,
-0.0547485277056694,
-0.03436174616217613,
0.024277538061141968,
-0.006327444687485695,
-0.010669808834791183,
0.017607666552066803,
0.011106526479125023,
-0.07590948790311813,
-0.04283804073929787,
-0.02243141271173954,
0.01163257285952568,
0.022689472883939743,
0.0015768985031172633,
-0.04303655028343201,
-0.003215830773115158,
-0.05458971858024597,
0.020704392343759537,
-0.02570679597556591,
-0.012823621742427349,
0.017826024442911148,
-0.08234114944934845,
-0.04275863990187645,
0.09464865177869797,
-0.03932444751262665,
0.016386840492486954,
-0.04565685614943504,
0.04208371043205261,
0.023880520835518837,
0.015543182380497456,
0.011185930110514164,
-0.013359593227505684,
0.008382003754377365,
-0.04045594483613968,
-0.017816100269556046,
0.008292675018310547,
-0.03162233531475067,
-0.05244583263993263,
-0.047959551215171814,
0.011811230331659317,
-0.06606348603963852,
0.01788557693362236,
0.06245063990354538,
-0.020406629890203476,
0.020942602306604385,
0.06312556564807892,
0.013746684417128563,
0.0229673832654953,
-0.054073598235845566,
0.039463404566049576,
-0.018103936687111855,
0.03386547788977623,
0.000005481265361595433,
-0.0508180670440197,
0.0046177939511835575,
-0.012108992785215378,
0.025786198675632477,
0.03767683357000351,
-0.024019476026296616,
-0.07463903725147247,
-0.003158759791404009,
-0.015255345031619072,
-0.007508568000048399,
0.038034144788980484,
0.027830831706523895,
-0.0449422262609005,
0.015404226258397102,
-0.030173227190971375,
0.013875714503228664,
-0.005176098085939884,
-0.0708673819899559,
-0.016833484172821045,
-0.03587041050195694,
-0.023920223116874695,
-0.0459347665309906,
-0.07019245624542236,
-0.021577827632427216,
-0.011404288932681084,
0.011156153865158558,
-0.039026688784360886,
-0.11767558753490448,
-0.10425643622875214,
0.05566166341304779,
0.0444658063352108,
0.05371628329157829,
0.06423721462488174,
-0.007042073644697666,
0.0015148647362366319,
0.04637148603796959,
-0.009925403632223606,
-0.030371734872460365,
0.04553775116801262,
-0.002349839312955737,
0.0366644412279129,
0.0332302525639534,
-0.023682013154029846,
0.10354181379079819,
-0.014679672196507454,
0.0036550299264490604,
0.00555822579190135,
0.030411437153816223,
-0.03346846252679825,
0.004597943276166916,
0.048158057034015656,
-0.007056961767375469,
-0.010709510184824467,
-0.05689241364598274,
0.0009751709294505417,
0.038530416786670685,
0.009563126601278782,
0.03487786650657654,
-0.012912950478494167,
0.029637254774570465,
-0.02521052584052086,
-0.04339386522769928,
0.04011848196387291,
-0.024912763386964798,
-0.06280795484781265,
-0.0957602933049202,
-0.023284997791051865,
0.00285355350933969,
-0.0655076652765274,
-0.08734355121850967,
-0.026560379192233086,
-0.008123942650854588,
-0.036962203681468964,
-0.056654203683137894,
0.03112606517970562,
-0.0332302525639534,
0.03797459602355957,
-0.07142320275306702,
0.006967633496969938,
0.038490716367959976,
0.009180998429656029,
0.020902900025248528,
-0.04275863990187645,
0.025448733940720558,
-0.08067367970943451,
-0.013032054528594017,
0.02282842807471752,
-0.007647523656487465,
-0.012515934184193611,
-0.06570617109537125,
-0.0327538326382637,
0.007831143215298653,
-0.024396641179919243,
0.035751305520534515,
0.026361871510744095,
0.000028865089916507713,
0.05498673766851425,
-0.0033498236443847418,
-0.009875776246190071,
-0.007339836098253727,
0.026262618601322174,
-0.00040352970245294273,
0.052167922258377075,
0.00019152926688548177,
0.02364231087267399,
0.012396829202771187,
0.0024962390307337046,
0.06249034032225609,
-0.006908081006258726,
-0.00455576041713357,
0.061299294233322144,
0.05721002817153931,
-0.04696701094508171,
0.06118018925189972,
0.010372046381235123,
-0.04259983077645302,
0.11283198744058609,
0.08130890876054764,
0.011354661546647549,
0.060862574726343155,
-0.010451450012624264,
-0.042877744883298874,
-0.019146103411912918,
-0.04172639548778534,
0.0007053239969536662,
-0.02399962581694126,
0.014302507042884827,
-0.02022797241806984,
0.0021488498896360397,
0.030073972418904305,
0.03831205889582634,
0.021022005006670952,
-0.004501170478761196,
-0.0522870272397995,
0.08369100093841553,
-0.04891238734126091,
-0.033011890947818756,
0.0474037267267704,
0.022451262921094894,
-0.03674384579062462,
-0.005776585079729557,
0.04676850140094757,
-0.03424264118075371,
0.005019772797822952,
-0.0011513468343764544,
0.026798589155077934,
0.056852713227272034,
0.04867418110370636,
-0.04402909055352211,
0.0655076652765274,
0.007369612343609333,
0.06221242994070053,
0.005801398307085037,
0.0024007069878280163,
0.029994569718837738,
-0.012843471951782703,
0.0025148491840809584,
-0.010689659975469112,
-0.059592124074697495,
-0.0952838733792305,
-0.0151461660861969,
0.055979277938604355,
0.014034520834684372,
0.01797490566968918,
-0.021280065178871155,
-0.025786198675632477,
-0.02433709055185318,
0.03573145344853401,
0.030868005007505417,
0.04831686615943909,
0.03160248324275017,
-0.023483505472540855,
-0.000006227608992048772,
-0.027572771534323692,
-0.06332407146692276,
0.023106340318918228,
-0.04279834032058716,
0.044743720442056656,
-0.0029676957055926323,
0.00982614979147911,
0.03954280912876129,
0.027632324025034904,
-0.034183088690042496,
-0.008287712000310421,
0.031304724514484406,
0.00876909401267767,
-0.04637148603796959,
-0.008019725792109966,
0.030947407707571983,
0.01711139641702175,
0.025528138503432274,
0.031642187386751175,
-0.06423721462488174,
0.014233028516173363,
-0.06519005447626114,
0.01607915386557579,
0.03549324348568916,
-0.046847905963659286,
-0.00887331087142229,
-0.005880801472812891,
0.007920471951365471,
-0.01295265182852745,
-0.006560691632330418,
-0.03328980505466461,
-0.07432141900062561,
-0.0016699491534382105,
-0.015622585080564022,
0.031304724514484406,
-0.05244583263993263,
-0.0537559874355793,
0.027433816343545914,
0.0025657168589532375,
-0.014401760883629322,
0.024158433079719543,
-0.027493368834257126,
0.03283323347568512,
0.01725035160779953,
0.05455001816153526,
-0.009622679091989994,
0.08861400187015533,
-0.027136053889989853,
0.0376172810792923,
-0.0006318139494396746,
-0.02183588780462742,
-0.05462942272424698,
-0.011741752736270428,
0.06503124535083771,
-0.02854546159505844,
-0.00943409651517868,
-0.05447061359882355,
0.0000307067166431807,
-0.0014974952209740877,
0.06971603631973267,
0.013836012221872807,
-0.0200393907725811,
0.07753725349903107,
-0.03660488873720169,
0.003647585865110159,
-0.006302631460130215,
-0.023979775607585907,
0.01865975931286812,
-0.008783982135355473,
-0.013329816982150078,
0.02838665433228016,
0.0244363434612751,
0.07479783892631531,
-0.02844620682299137,
0.051770906895399094,
-0.015106464736163616,
0.031344424933195114,
-0.006937857251614332,
0.029637254774570465,
0.018828490749001503,
-0.02423783577978611,
-0.021954992786049843,
0.053239863365888596,
0.006133899558335543,
0.05379568785429001,
0.016823559999465942,
0.017131246626377106,
-0.01807416044175625,
-0.01187078282237053,
0.04791984707117081,
-0.001523549435660243,
-0.04402909055352211,
-0.057924654334783554,
0.0219946950674057,
-0.03233696520328522,
0.05657479912042618,
-0.04379088059067726,
0.007369612343609333,
-0.050897467881441116,
-0.00433740159496665,
-0.013250414282083511,
0.01338936947286129,
0.01632728986442089,
-0.009821186773478985,
-0.032575175166130066,
-0.02032722719013691,
0.007880770601332188,
-0.004736898932605982,
0.027195606380701065,
-0.002652564086019993,
0.028207996860146523,
0.058083463460206985,
0.041170574724674225,
-0.012744218111038208,
0.016059303656220436,
-0.038331907242536545,
-0.02961740456521511,
0.013339742086827755,
-0.003434189595282078,
0.05232672765851021,
-0.024853210896253586,
0.009290177375078201,
-0.00048014140338636935,
0.012595336884260178,
-0.03680339828133583,
-0.00038150770706124604,
0.03483816608786583,
0.035791005939245224,
0.045378945767879486,
0.016099004074931145,
0.08432622998952866,
0.0012388144386932254,
-0.01358787715435028,
-0.0263817235827446,
-0.002054558601230383,
0.014044445939362049,
0.012357127852737904,
0.02340410090982914,
-0.012674740515649319,
0.016992291435599327,
0.04359237104654312,
0.04220281541347504,
0.0019168435828760266,
0.003704656846821308,
-0.03722026199102402,
-0.0322575606405735,
-0.04438640549778938,
0.03233696520328522,
-0.029160836711525917,
0.11743737757205963,
-0.03473891317844391,
0.01690296269953251,
-0.031205469742417336,
0.026163363829255104,
0.06721483170986176,
-0.00447139423340559,
-0.026520678773522377,
-0.021677082404494286,
-0.014510939829051495,
0.07301127165555954,
0.020982302725315094,
0.02350335568189621,
0.06638109683990479,
-0.006908081006258726,
-0.013230563141405582,
-0.0026153437793254852,
0.031304724514484406,
-0.011751677840948105,
-0.012833546847105026,
-0.020585287362337112,
0.0005179820000194013,
-0.013498549349606037,
-0.05244583263993263,
0.06249034032225609,
0.008064390160143375,
0.0065805427730083466,
0.01865975931286812,
-0.012764069251716137,
0.026739036664366722,
-0.017796248197555542,
-0.04232192039489746,
-0.024714255705475807,
-0.015156091190874577,
-0.03918549418449402,
-0.0004736278497148305,
-0.047125816345214844,
0.011166078969836235,
-0.027195606380701065,
-0.05780554935336113,
-0.012118917889893055,
-0.0679294615983963,
0.034282345324754715,
-0.0005710208788514137,
0.012912950478494167,
-0.02594500593841076,
-0.01978132873773575,
0.0464111864566803,
0.014808702282607555,
-0.0012865804601460695,
-0.013776460662484169,
0.02457529865205288,
0.004808858036994934,
0.01091794390231371,
0.02828739956021309,
-0.012317425571382046,
-0.019136177375912666,
-0.004575611092150211,
0.012744218111038208,
0.007101626135408878,
0.05038134753704071,
0.016009675338864326,
0.020783795043826103,
-0.03795474395155907,
0.004186038859188557,
0.03092755749821663,
-0.0434732660651207,
0.02941889688372612,
-0.05546315386891365,
0.010381972417235374,
0.02169693261384964,
-0.043076250702142715,
-0.011205780319869518,
-0.0011308756656944752,
-0.019136177375912666,
0.03507637605071068,
-0.05292225256562233,
0.0026624894235283136,
0.03507637605071068,
0.0356719009578228,
0.03527488559484482,
0.04883298650383949,
-0.030808452516794205,
-0.019701926037669182,
-0.03015337698161602,
-0.08766116201877594,
0.022808577865362167,
0.019334686920046806,
-0.001782850595191121,
0.028664564713835716,
0.032237712293863297,
-0.02219320274889469,
-0.031006960198283195,
-0.03005412220954895,
-0.00044416182208806276,
-0.010818690061569214,
-0.014649895951151848,
-0.048555076122283936,
0.009037080220878124,
0.059393614530563354,
0.06606348603963852,
-0.008372077718377113,
0.030570242553949356,
-0.006813789717853069,
-0.03539399057626724,
-0.031106214970350266,
-0.007801367435604334,
0.04978582635521889,
0.0327339805662632,
-0.031304724514484406,
0.0052803149446845055,
0.0276124719530344,
0.04803895205259323,
-0.01395511720329523,
-0.010461375117301941,
0.01187078282237053,
-0.0337265208363533,
-0.027552921324968338,
0.011295109055936337,
-0.0283469520509243,
-0.006223228294402361,
-0.018987298011779785,
-0.014163550920784473,
0.022113800048828125,
0.0006172360153868794,
0.03259502723813057,
0.03473891317844391,
-0.03874877467751503,
0.005136396270245314,
0.018729235976934433,
-0.03841131180524826,
0.11005287617444992,
0.048356566578149796,
0.007181029301136732,
-0.026461126282811165,
0.004622756503522396,
-0.0429968498647213,
-0.028704266995191574,
0.05820256844162941,
0.04569655656814575,
-0.03825250640511513,
0.06653990596532822,
-0.02487306110560894,
0.034123536199331284,
-0.008957676589488983,
-0.03406398370862007,
0.014937732368707657,
-0.06463422626256943,
0.004751787055283785,
0.03698205202817917,
-0.06904111057519913,
0.0015247900737449527,
-0.006372109055519104,
0.00581628642976284,
-0.04716551676392555,
-0.028505759313702583,
0.031066512688994408,
-0.014868254773318768,
0.006084272637963295,
0.030133524909615517,
0.014183402061462402,
-0.03243621811270714,
-0.0037245077546685934,
-0.025051718577742577,
0.023761415854096413,
-0.008084241300821304,
-0.023483505472540855,
0.006863416638225317,
-0.04021773487329483,
-0.00044974483898840845,
0.014481163583695889,
-0.035791005939245224,
0.023185743018984795,
0.0035433690063655376,
-0.014719373546540737,
-0.002890773816034198,
0.05486763268709183,
0.028565311804413795,
0.0655076652765274,
0.05010343715548515,
0.03440145030617714,
-0.010292643681168556,
0.07205843180418015,
-0.016208184882998466,
-0.01180130522698164,
0.0023510800674557686,
-0.017131246626377106,
0.05486763268709183,
0.011950185522437096,
-0.04363207519054413,
-0.007970099337399006,
0.05542345345020294,
0.02135946787893772,
0.01187078282237053,
-0.03632697835564613,
-0.07062917202711105,
0.01870938576757908,
-0.0003228857822250575,
0.015622585080564022,
-0.0158806461840868,
0.03511607646942139,
0.021379319950938225,
0.029041731730103493,
0.010798838920891285,
-0.0032654576934874058,
0.016406692564487457,
0.006302631460130215,
-0.03326995298266411,
-0.021716782823204994,
0.03503667563199997,
-0.025786198675632477,
-0.038331907242536545,
0.04609357565641403,
-0.011424139142036438,
-0.05649539828300476,
0.020744092762470245,
-0.030014419928193092,
0.0036302164662629366,
-0.015116389840841293,
0.025250226259231567,
0.0376371294260025,
-0.05859958380460739,
-0.03825250640511513,
-0.02066469006240368,
-0.009846000000834465,
0.006367146503180265,
-0.07555217295885086,
0.041170574724674225,
-0.01626773737370968,
0.023284997791051865,
-0.06320496648550034,
0.04633178561925888,
0.01935453712940216,
-0.0005586141487583518,
-0.03416324034333229,
-0.042242519557476044,
0.03277368098497391,
-0.007374574895948172,
-0.05355747789144516,
-0.005657480098307133,
-0.001731982920318842,
0.03279353305697441,
-0.012833546847105026,
0.07511545717716217,
0.005627703852951527,
0.014441462233662605,
0.05185030773282051,
0.04339386522769928,
-0.014957583509385586,
0.04375118017196655,
0.013667280785739422,
-0.020158493891358376,
-0.04240132495760918,
0.0008957676473073661,
-0.03414338827133179,
-0.013419145718216896,
-0.0012537025613710284,
0.04680820181965828,
0.0266397837549448,
-0.01048122625797987,
0.007731889374554157,
0.006337370257824659,
0.03749817609786987,
0.06590467691421509,
-0.01642654277384281,
-0.05379568785429001,
-0.0014577936381101608,
0.07320977747440338,
0.016049377620220184,
0.0004637024539988488,
-0.02580604888498783,
0.04533924534916878,
-0.007726926822215319,
-0.023046787828207016,
0.020446332171559334,
-0.011007272638380527,
0.11743737757205963,
-0.026083961129188538,
-0.058321673423051834,
-0.0488726869225502,
-0.03513592854142189,
0.004880817141383886,
0.0050619556568562984,
0.023662162944674492,
0.03235681727528572,
-0.009558163583278656,
0.0008349745767191052,
0.04791984707117081,
-0.06364168971776962,
0.03243621811270714,
-0.05244583263993263,
-0.006754237227141857,
0.010828615166246891,
-0.018937669694423676,
-0.017121320590376854,
-0.016496021300554276,
-0.012099066749215126,
-0.06947782635688782,
0.05169150233268738,
0.04017803445458412,
-0.0342227928340435,
-0.06868379563093185,
0.07436112314462662,
-0.011622647754848003,
-0.03239651769399643,
-0.0346793606877327,
-0.06653990596532822,
0.02781098149716854,
0.025150973349809647,
0.03797459602355957,
-0.03477861359715462,
-0.001704688067547977,
0.02110140770673752,
-0.042639534920454025,
-0.04124997556209564,
0.010540778748691082,
0.024694403633475304,
0.04375118017196655,
0.0244363434612751,
0.002851072233170271,
-0.057686444371938705,
-0.044783420860767365,
-0.01302212942391634,
0.008461406454443932,
-0.007831143215298653,
-0.01597989909350872,
0.05085776746273041,
0.008451481349766254,
0.03592995926737785,
-0.051532696932554245,
-0.043076250702142715,
-0.04565685614943504,
0.022272605448961258,
0.00662024412304163,
0.032813385128974915,
-0.03019307740032673,
-0.020486032590270042,
-0.04597447067499161,
-0.01944386586546898,
-0.07928412407636642,
0.0018771420000120997,
0.03551309555768967,
0.009409282356500626,
-0.031403977423906326,
0.04565685614943504,
-0.0028163332026451826,
-0.020783795043826103,
-0.01890789344906807,
0.024753956124186516,
0.03035188466310501,
0.02594500593841076,
-0.0033423795830458403,
-0.015761541202664375,
-0.0065805427730083466,
-0.07455962896347046,
0.0071909548714756966,
0.0125854117795825,
-0.00039298395859077573,
-0.06006854400038719,
-0.03289278596639633,
0.009339804761111736,
-0.012922875583171844,
0.07058946788311005
] |
52,241 |
osmnx.utils
|
log
|
Write a message to the logger.
This logs to file and/or prints to the console (terminal), depending on
the current configuration of settings.log_file and settings.log_console.
Parameters
----------
message : string
the message to log
level : int
one of Python's logger.level constants
name : string
name of the logger
filename : string
name of the log file, without file extension
Returns
-------
None
|
def log(message, level=None, name=None, filename=None):
"""
Write a message to the logger.
This logs to file and/or prints to the console (terminal), depending on
the current configuration of settings.log_file and settings.log_console.
Parameters
----------
message : string
the message to log
level : int
one of Python's logger.level constants
name : string
name of the logger
filename : string
name of the log file, without file extension
Returns
-------
None
"""
if level is None:
level = settings.log_level
if name is None:
name = settings.log_name
if filename is None:
filename = settings.log_filename
# if logging to file is turned on
if settings.log_file:
# get the current logger (or create a new one, if none), then log
# message at requested level
logger = _get_logger(level=level, name=name, filename=filename)
if level == lg.DEBUG:
logger.debug(message)
elif level == lg.INFO:
logger.info(message)
elif level == lg.WARNING:
logger.warning(message)
elif level == lg.ERROR:
logger.error(message)
# if logging to console (terminal window) is turned on
if settings.log_console:
# prepend timestamp then convert to ASCII for Windows command prompts
message = f"{ts()} {message}"
message = ud.normalize("NFKD", message).encode("ascii", errors="replace").decode()
try:
# print explicitly to terminal in case Jupyter has captured stdout
if getattr(sys.stdout, "_original_stdstream_copy", None) is not None:
# redirect the Jupyter-captured pipe back to original
os.dup2(sys.stdout._original_stdstream_copy, sys.__stdout__.fileno())
sys.stdout._original_stdstream_copy = None
with redirect_stdout(sys.__stdout__):
print(message, file=sys.__stdout__, flush=True)
except OSError:
# handle pytest on Windows raising OSError from sys.__stdout__
print(message, flush=True) # noqa: T201
|
(message, level=None, name=None, filename=None)
|
[
0.019100960344076157,
-0.01259548682719469,
-0.04016774892807007,
0.03311508521437645,
0.0937112346291542,
-0.02693387307226658,
-0.06144732981920242,
0.027318932116031647,
0.01621301658451557,
-0.021198518574237823,
0.0033084687311202288,
0.0022786888293921947,
0.03666168451309204,
0.029142897576093674,
0.04178905114531517,
-0.025211241096258163,
0.0032780691981315613,
-0.0066169374622404575,
-0.017104731872677803,
0.060028690844774246,
0.056340232491493225,
0.020033208653330803,
0.01824977621436119,
0.02533283829689026,
-0.015250368043780327,
0.007027329411357641,
-0.016577808186411858,
-0.025312570855021477,
-0.016415679827332497,
-0.01016860082745552,
-0.029730618000030518,
-0.06647336483001709,
-0.03921523317694664,
0.014216789044439793,
-0.03643875569105148,
-0.018817231059074402,
0.005380694754421711,
0.0026042156387120485,
-0.039742156863212585,
-0.0259813591837883,
-0.016425812616944313,
0.032446298748254776,
0.055448517203330994,
-0.023529140278697014,
-0.05228697881102562,
-0.0039797886274755,
0.021380914375185966,
0.04661242291331291,
-0.0393165647983551,
0.023833133280277252,
0.0011406110133975744,
0.04661242291331291,
0.0058214860036969185,
-0.007650516927242279,
-0.04689614847302437,
0.030987126752734184,
0.0368846133351326,
-0.06400088220834732,
-0.02213076688349247,
-0.0744582787156105,
-0.025515234097838402,
0.05475946143269539,
-0.02310354821383953,
0.017449257895350456,
0.002077292650938034,
-0.009241418913006783,
0.043815676122903824,
0.007250258233398199,
-0.026690678671002388,
0.028190381824970245,
-0.0002702697238419205,
-0.07186419516801834,
0.042153842747211456,
-0.04032987728714943,
-0.032912421971559525,
0.054556798189878464,
-0.06927011162042618,
0.08511833846569061,
0.027602659538388252,
0.04507218673825264,
0.010457395575940609,
0.015007172711193562,
0.035729434341192245,
0.012028031051158905,
0.0022419560700654984,
-0.02823091484606266,
-0.058164194226264954,
0.05674555525183678,
0.045112717896699905,
-0.028413310647010803,
-0.023306211456656456,
0.0010000137845054269,
-0.007832913659512997,
-0.0027030138298869133,
-0.02277928777039051,
-0.045274846255779266,
-0.004772706422954798,
0.013649333268404007,
-0.04949023202061653,
0.051435794681310654,
-0.06675709784030914,
0.08568578958511353,
0.07680916786193848,
-0.04008668288588524,
-0.018726034089922905,
-0.04636922478675842,
-0.0272581335157156,
0.04154585301876068,
0.00683479942381382,
0.006546005140990019,
-0.0477878637611866,
-0.003764459630474448,
-0.04304555803537369,
-0.04628816246986389,
0.024522187188267708,
0.012848814949393272,
-0.04332928732037544,
0.009960872121155262,
-0.030824996531009674,
-0.022515825927257538,
-0.06294703483581543,
0.0015820356784388423,
0.0011146448086947203,
-0.030683133751153946,
-0.011126182042062283,
-0.04401833936572075,
0.003500998253002763,
0.01849297247827053,
0.00046042431495152414,
0.016689274460077286,
0.015260501764714718,
-0.000008248015546996612,
0.014541048556566238,
0.021441714838147163,
0.05792099982500076,
0.026589347049593925,
-0.07770088315010071,
0.014530915766954422,
0.02920369617640972,
0.09273844957351685,
-0.038546446710824966,
-0.09419762343168259,
-0.022840086370706558,
-0.0014275053981691599,
0.023691270500421524,
-0.007285724394023418,
0.03747233375906944,
-0.01646634377539158,
0.02502884343266487,
0.03153431788086891,
0.03769526258111,
-0.0051678987219929695,
-0.04758520424365997,
0.03761419653892517,
-0.0006751201581209898,
-0.02991301566362381,
0.040775734931230545,
0.017702586948871613,
0.024562720209360123,
0.02356967143714428,
-0.018503105267882347,
-0.005846818909049034,
0.03672248125076294,
0.0022913552820682526,
-0.007807580754160881,
0.030662866309285164,
-0.05861005187034607,
0.000053911444410914555,
0.041343189775943756,
0.007630250882357359,
-0.007650516927242279,
0.025474701076745987,
-0.021522779017686844,
0.032851625233888626,
0.0009689810685813427,
0.008380102925002575,
-0.005005768965929747,
0.0247653815895319,
-0.018543636426329613,
-0.05098993703722954,
0.0011216114507988095,
-0.04087706655263901,
-0.017945783212780952,
0.05836685746908188,
0.013740531168878078,
0.04559910669922829,
-0.005314829293638468,
0.008760095573961735,
-0.006551072001457214,
0.03382440656423569,
0.02711626887321472,
-0.00003793988435063511,
0.05885324999690056,
-0.023630471900105476,
0.021279584616422653,
0.028190381824970245,
-0.013578400947153568,
-0.08511833846569061,
0.07502572983503342,
-0.06821626424789429,
0.01716553047299385,
0.06456834077835083,
0.019536685198545456,
0.00793424528092146,
0.022921152412891388,
-0.007533986121416092,
0.02991301566362381,
-0.00043160823406651616,
-0.02525177225470543,
-0.03143298625946045,
-0.008729696273803711,
-0.021036388352513313,
-0.01700340025126934,
0.04243756830692291,
0.024238459765911102,
-0.007179326377809048,
-0.05058461055159569,
0.024116862565279007,
-0.04000561684370041,
0.000319035432767123,
0.05852898955345154,
-0.01094378624111414,
-0.036215826869010925,
0.056988753378391266,
0.03463505581021309,
0.020914791151881218,
0.07385028898715973,
0.029386091977357864,
0.037816859781742096,
-0.007913978770375252,
0.015554362908005714,
0.00398738868534565,
-0.02381286770105362,
0.009945672005414963,
-0.06152839586138725,
-0.013892528600990772,
-0.041586387902498245,
0.036276623606681824,
-0.01366959884762764,
0.0008214172557927668,
-0.03127085417509079,
-0.0049576363526284695,
0.04055280610918999,
0.07640384137630463,
-0.01646634377539158,
-0.05078727379441261,
-0.011693637818098068,
0.08057869225740433,
0.007984910160303116,
-0.023954732343554497,
0.030683133751153946,
-0.018827365711331367,
-0.010350997559726238,
-0.01771271973848343,
-0.010112868621945381,
-0.019830545410513878,
0.027886388823390007,
0.013659466058015823,
-0.017398593947291374,
-0.0027486130129545927,
-0.025049110874533653,
-0.0063636088743805885,
0.01038646325469017,
-0.02478564903140068,
0.022029435262084007,
-0.04916597157716751,
-0.05621863529086113,
-0.019019894301891327,
0.0436130128800869,
0.008162240497767925,
-0.03250709921121597,
0.0670408234000206,
0.002761279232800007,
0.01082218810915947,
-0.03739126771688461,
-0.05342188850045204,
-0.03921523317694664,
-0.006606804206967354,
-0.008375036530196667,
0.05171952024102211,
-0.0010044469963759184,
-0.013912794180214405,
0.0352025106549263,
0.03720887377858162,
0.02719733491539955,
-0.06525739282369614,
-0.0036352621391415596,
-0.029446890577673912,
0.020752660930156708,
-0.021543044596910477,
-0.03787766024470329,
0.04264023154973984,
-0.010264866054058075,
0.01993187703192234,
-0.016131950542330742,
0.015594894997775555,
-0.05779940262436867,
-0.07595798373222351,
0.026731209829449654,
-0.01792551577091217,
0.0006972863338887691,
-0.015007172711193562,
0.04555857554078102,
0.022110501304268837,
-0.0010006470838561654,
0.03329748287796974,
-0.03370280563831329,
-0.05086833983659744,
-0.024339791387319565,
-0.0013160408707335591,
-0.02470458298921585,
0.01250428892672062,
0.027521595358848572,
0.019019894301891327,
0.008202772587537766,
0.024724850431084633,
0.008993157185614109,
-0.009560612961649895,
0.019860945641994476,
0.01575702428817749,
-0.02381286770105362,
-0.0022419560700654984,
0.000893615884706378,
0.04608549922704697,
0.006561204791069031,
-0.06383875012397766,
0.00905902311205864,
0.011085649952292442,
0.016294080764055252,
0.05374614894390106,
-0.041829582303762436,
0.05796153470873833,
0.020914791151881218,
0.01578742451965809,
0.003001941367983818,
-0.006784134078770876,
-0.013750663958489895,
0.03927603363990784,
0.04580176994204521,
0.012311759404838085,
-0.0619337223470211,
0.016983134672045708,
-0.03159511461853981,
-0.028838902711868286,
-0.0018999628955498338,
0.0611230693757534,
0.01976974681019783,
-0.0024965512566268444,
0.04043120890855789,
0.010568859986960888,
0.0755121260881424,
-0.008334503509104252,
-0.054881058633327484,
-0.02660961262881756,
-0.048801179975271225,
-0.06995916366577148,
-0.010057136416435242,
-0.05500265583395958,
-0.005446560215204954,
-0.007103327661752701,
-0.060839343816041946,
-0.011663238517940044,
0.011501108296215534,
-0.0032400700729340315,
-0.027683725580573082,
-0.005178031977266073,
0.027156801894307137,
0.006439607590436935,
0.025535499677062035,
0.032588161528110504,
0.03666168451309204,
-0.04207277670502663,
0.07340443134307861,
0.0896579772233963,
-0.07437720894813538,
0.030602067708969116,
0.0011051450856029987,
-0.0050387014634907246,
-0.003511131275445223,
0.015118638053536415,
0.09808874875307083,
0.014611980877816677,
-0.012838682159781456,
-0.008223039098083973,
-0.02711626887321472,
0.01448024995625019,
-0.008496633730828762,
0.018614569678902626,
0.010913386940956116,
-0.031088458374142647,
-0.014237054623663425,
0.0016466344241052866,
0.022252364084124565,
-0.0022976885084062815,
0.01050806138664484,
-0.0047676400281488895,
-0.015858355909585953,
0.08552365750074387,
-0.01271708495914936,
0.023630471900105476,
-0.05783993378281593,
0.030824996531009674,
-0.015442897565662861,
0.02142144739627838,
0.0022976885084062815,
0.04636922478675842,
-0.04531538113951683,
0.021380914375185966,
0.04300502687692642,
0.007265457883477211,
0.020813459530472755,
-0.038141120225191116,
-0.025961091741919518,
-0.028899701312184334,
0.026832541450858116,
-0.0029918081127107143,
0.026325885206460953,
-0.014014125801622868,
0.015290901064872742,
-0.02527203969657421,
-0.026974406093358994,
-0.06363608688116074,
0.017145264893770218,
0.0778224766254425,
0.051030468195676804,
-0.010204067453742027,
-0.017773518338799477,
0.05171952024102211,
0.04916597157716751,
-0.0056745558977127075,
-0.038526181131601334,
-0.014064791612327099,
-0.005365495104342699,
0.02340754307806492,
0.032040972262620926,
-0.02646774984896183,
-0.025373371317982674,
0.039377361536026,
0.005385761149227619,
0.011440309695899487,
0.003954456187784672,
-0.025373371317982674,
-0.015219968743622303,
-0.0652979239821434,
-0.03198017552495003,
0.052489638328552246,
0.02373180165886879,
0.0064750732854008675,
-0.04600443318486214,
0.04632869362831116,
0.014682913199067116,
0.022799553349614143,
0.02142144739627838,
-0.04961182922124863,
0.04243756830692291,
-0.05431360378861427,
-0.06768934428691864,
-0.021461980417370796,
0.03897203877568245,
0.0049753692001104355,
0.04207277670502663,
0.040613606572151184,
0.010568859986960888,
-0.009960872121155262,
0.0029107430018484592,
0.024684317409992218,
0.09298165142536163,
-0.004988035652786493,
-0.01114644855260849,
-0.04466686025261879,
0.0990615263581276,
0.07883579283952713,
-0.0352633111178875,
-0.004060853738337755,
-0.008907025679945946,
0.02182677388191223,
-0.03785739466547966,
-0.040127214044332504,
-0.04559910669922829,
0.04328875243663788,
-0.08090294897556305,
-0.03696567565202713,
-0.0019455619622021914,
0.031149256974458694,
0.011288312263786793,
-0.052732836455106735,
0.06983757019042969,
0.026102956384420395,
0.05350295454263687,
-0.018452439457178116,
-0.02166464366018772,
0.004701774567365646,
0.011450442485511303,
-0.037634462118148804,
-0.05484052747488022,
-0.005547891370952129,
-0.01611168496310711,
-0.023711536079645157,
0.009352883324027061,
-0.013548001646995544,
-0.010599259287118912,
-0.026731209829449654,
-0.014449850656092167,
0.06063668057322502,
0.04689614847302437,
-0.009033690206706524,
0.06408194452524185,
0.07502572983503342,
-0.03504038229584694,
-0.022029435262084007,
-0.0025079508777707815,
0.07891685515642166,
-0.03449319303035736,
-0.032851625233888626,
0.002629548544064164,
-0.01632448099553585,
-0.039904285222291946,
-0.03384467214345932,
0.02421819232404232,
-0.05654289573431015,
-0.01012806873768568,
0.027481062337756157,
0.003321134950965643,
-0.02831197902560234,
0.032203104346990585,
0.07433667778968811,
0.031210055574774742,
0.037816859781742096,
-0.029629286378622055,
0.0880366787314415,
-0.025717897340655327,
-0.038364049047231674,
-0.015909021720290184,
-0.026994671672582626,
0.008603031747043133,
0.0780656710267067,
-0.022981951013207436,
-0.02429925836622715,
0.052408576011657715,
-0.0033363348338752985,
-0.03806005418300629,
-0.0012577753514051437,
-0.003561797086149454,
-0.020246004685759544,
-0.015128770843148232,
-0.04750413820147514,
-0.025474701076745987,
-0.056015972048044205,
0.015767158940434456,
0.022495560348033905,
0.06858105957508087,
-0.01099445205181837,
0.06035295128822327,
0.01366959884762764,
-0.041829582303762436,
0.018077513203024864,
-0.02269822359085083,
0.007604917977005243,
0.013720264658331871,
-0.03350014612078667,
0.030419671908020973,
0.006135613191872835,
0.013061610981822014,
-0.015554362908005714,
-0.0006972863338887691,
-0.04677455127239227,
-0.000546872615814209,
0.027298666536808014,
-0.017155397683382034,
-0.04920650273561478,
0.05739407613873482,
0.08232159167528152,
0.014520782977342606,
0.008111574687063694,
-0.054962124675512314,
0.05755620822310448,
0.10570886731147766,
0.04239703714847565,
0.027237867936491966,
0.0702834278345108,
-0.09922365844249725,
0.008927292190492153,
-0.029609020799398422,
-0.008608098141849041,
-0.04063387215137482,
-0.013446670025587082,
0.016527144238352776,
0.02502884343266487,
-0.045355912297964096,
-0.003204603912308812,
0.010229400359094143,
-0.011855768039822578,
0.04276182875037193,
-0.04022854566574097,
0.005451626610010862,
0.01616235077381134,
-0.0042685833759605885,
0.0015187036478891969,
0.08682069927453995,
-0.0012425757013261318,
-0.07907898724079132,
0.003886057296767831,
-0.028291713446378708,
-0.027379730716347694,
0.03418919816613197,
-0.00958594586700201,
0.02332647703588009,
-0.020833725109696388,
-0.016669007018208504,
0.026163754984736443,
-0.05824526026844978,
-0.02879836969077587,
-0.0251099094748497,
-0.03309481963515282,
0.02438032254576683,
-0.043815676122903824,
0.03903283551335335,
0.025636831298470497,
0.05350295454263687,
-0.014358652755618095,
0.01752019114792347,
-0.010893120430409908,
-0.02381286770105362,
-0.007275591138750315,
0.007873445749282837,
0.005365495104342699,
-0.03623609244823456,
-0.07449880987405777,
-0.030014345422387123,
-0.03641848638653755,
-0.028656506910920143,
0.022596891969442368,
-0.011916566640138626,
-0.04304555803537369,
0.01286908145993948,
-0.0721479207277298,
-0.009084356017410755,
-0.03479718789458275,
-0.029548222199082375,
-0.02573816291987896,
0.02196863666176796,
-0.01724659651517868,
0.017905250191688538,
-0.038850441575050354,
0.03951922804117203,
0.008086241781711578,
0.04961182922124863,
-0.005299629643559456,
0.04908490553498268,
-0.03848564624786377,
-0.03465532138943672,
0.03386493772268295,
0.01811804622411728,
0.08471301198005676,
-0.009925405494868755,
0.027460796758532524,
0.0009240152430720627,
0.022009169682860374,
0.026447482407093048,
0.006008949130773544,
0.0637982189655304,
-0.001794831594452262,
-0.024116862565279007,
0.029527956619858742,
0.02557603269815445,
-0.04669348523020744,
0.026893340051174164,
-0.011551774106919765,
0.015412498265504837,
0.04016774892807007,
0.024420855566859245,
-0.010974185541272163,
0.013710131868720055,
-0.005411094054579735,
0.0578804686665535,
0.03915443271398544,
0.018938830122351646,
0.03808032348752022,
-0.025211241096258163,
-0.04640975967049599,
-0.028575440868735313,
0.03785739466547966,
0.0009816475212574005,
-0.022232098504900932,
0.022657690569758415,
0.058569520711898804,
-0.022191565483808517,
-0.018918562680482864,
-0.024664051830768585,
-0.01697300188243389,
-0.03208150714635849,
0.0018378973472863436,
-0.052570704370737076,
-0.03297322243452072,
-0.03048047050833702,
-0.009565679356455803,
0.002348354086279869,
-0.03039940632879734,
-0.022576624527573586,
-0.0795653760433197,
-0.016658874228596687,
0.028007986024022102,
0.046166565269231796,
0.011288312263786793,
-0.015311167575418949,
-0.044302068650722504,
-0.04035014286637306,
-0.008633431047201157,
0.03493905067443848,
-0.04264023154973984,
-0.045274846255779266,
0.00007200067193480209,
0.04547750949859619,
-0.037330470979213715,
-0.00888169277459383,
-0.03325694799423218,
-0.019131358712911606,
-0.03929629921913147,
-0.02198890410363674,
0.02074252814054489,
-0.04592336714267731,
0.0015225035604089499,
0.04892277717590332,
-0.06067721173167229,
0.03493905067443848,
0.01667913980782032,
-0.10724910348653793,
0.004415513481944799,
0.02654881402850151,
-0.039904285222291946,
-0.05998815968632698,
0.02326567843556404,
-0.04811212420463562,
0.044869523495435715,
-0.01006220281124115,
-0.01727699488401413,
0.0019392287358641624,
-0.058812715113162994,
0.04563964158296585,
-0.05293549969792366,
-0.047017745673656464,
-0.047828398644924164,
-0.029892748221755028,
-0.04308608919382095,
0.02365073747932911,
0.048963308334350586,
0.023772334679961205,
0.005223631393164396,
-0.0535840168595314,
0.030176475644111633,
0.04235650599002838,
-0.06477099657058716,
-0.08138933777809143,
0.018847631290555,
0.03566863387823105,
-0.006708135362714529,
0.005375628359615803,
0.004291382618248463,
-0.004795506130903959,
0.0028854103293269873,
-0.02695413865149021,
0.04726094380021095,
-0.016385279595851898,
0.0469772145152092,
0.022110501304268837,
0.059299107640981674,
-0.03945842757821083,
0.03449319303035736
] |
52,242 |
osmnx.distance
|
nearest_edges
|
Find the nearest edge to a point or to each of several points.
If `X` and `Y` are single coordinate values, this will return the nearest
edge to that point. If `X` and `Y` are lists of coordinate values, this
will return the nearest edge to each point. This function uses an R-tree
spatial index and minimizes the euclidean distance from each point to the
possible matches. For accurate results, use a projected graph and points.
Parameters
----------
G : networkx.MultiDiGraph
graph in which to find nearest edges
X : float or list
points' x (longitude) coordinates, in same CRS/units as graph and
containing no nulls
Y : float or list
points' y (latitude) coordinates, in same CRS/units as graph and
containing no nulls
interpolate : float
deprecated, do not use
return_dist : bool
optionally also return distance between points and nearest edges
Returns
-------
ne or (ne, dist) : tuple or list
nearest edges as (u, v, key) or optionally a tuple where `dist`
contains distances between the points and their nearest edges
|
def nearest_edges(G, X, Y, interpolate=None, return_dist=False):
"""
Find the nearest edge to a point or to each of several points.
If `X` and `Y` are single coordinate values, this will return the nearest
edge to that point. If `X` and `Y` are lists of coordinate values, this
will return the nearest edge to each point. This function uses an R-tree
spatial index and minimizes the euclidean distance from each point to the
possible matches. For accurate results, use a projected graph and points.
Parameters
----------
G : networkx.MultiDiGraph
graph in which to find nearest edges
X : float or list
points' x (longitude) coordinates, in same CRS/units as graph and
containing no nulls
Y : float or list
points' y (latitude) coordinates, in same CRS/units as graph and
containing no nulls
interpolate : float
deprecated, do not use
return_dist : bool
optionally also return distance between points and nearest edges
Returns
-------
ne or (ne, dist) : tuple or list
nearest edges as (u, v, key) or optionally a tuple where `dist`
contains distances between the points and their nearest edges
"""
is_scalar = False
if not (hasattr(X, "__iter__") and hasattr(Y, "__iter__")):
# make coordinates arrays if user passed non-iterable values
is_scalar = True
X = np.array([X])
Y = np.array([Y])
if np.isnan(X).any() or np.isnan(Y).any(): # pragma: no cover
msg = "`X` and `Y` cannot contain nulls"
raise ValueError(msg)
geoms = convert.graph_to_gdfs(G, nodes=False)["geometry"]
# if no interpolation distance was provided
if interpolate is None:
# build an r-tree spatial index by position for subsequent iloc
rtree = STRtree(geoms)
# use the r-tree to find each point's nearest neighbor and distance
points = [Point(xy) for xy in zip(X, Y)]
pos, dist = rtree.query_nearest(points, all_matches=False, return_distance=True)
# if user passed X/Y lists, the 2nd subarray contains geom indices
if len(pos.shape) > 1:
pos = pos[1]
ne = geoms.iloc[pos].index
# otherwise, if interpolation distance was provided
else:
warn(
"The `interpolate` parameter has been deprecated and will be "
"removed in the v2.0.0 release. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123",
FutureWarning,
stacklevel=2,
)
# interpolate points along edges to index with k-d tree or ball tree
uvk_xy = []
for uvk, geom in zip(geoms.index, geoms.to_numpy()):
uvk_xy.extend((uvk, xy) for xy in utils_geo.interpolate_points(geom, interpolate))
labels, xy = zip(*uvk_xy)
vertices = pd.DataFrame(xy, index=labels, columns=["x", "y"])
if projection.is_projected(G.graph["crs"]):
# if projected, use k-d tree for euclidean nearest-neighbor search
if cKDTree is None: # pragma: no cover
msg = "scipy must be installed to search a projected graph"
raise ImportError(msg)
dist, pos = cKDTree(vertices).query(np.array([X, Y]).T, k=1)
ne = vertices.index[pos]
else:
# if unprojected, use ball tree for haversine nearest-neighbor search
if BallTree is None: # pragma: no cover
msg = "scikit-learn must be installed to search an unprojected graph"
raise ImportError(msg)
# haversine requires lat, lon coords in radians
vertices_rad = np.deg2rad(vertices[["y", "x"]])
points_rad = np.deg2rad(np.array([Y, X]).T)
dist, pos = BallTree(vertices_rad, metric="haversine").query(points_rad, k=1)
dist = dist[:, 0] * EARTH_RADIUS_M # convert radians -> meters
ne = vertices.index[pos[:, 0]]
# convert results to correct types for return
ne = list(ne)
dist = list(dist)
if is_scalar:
ne = ne[0]
dist = dist[0]
if return_dist:
return ne, dist
# otherwise
return ne
|
(G, X, Y, interpolate=None, return_dist=False)
|
[
0.04597241431474686,
-0.060874663293361664,
-0.02062838524580002,
0.0014953282661736012,
-0.04266534000635147,
-0.014371482655405998,
0.0004373069677967578,
0.015085973776876926,
0.07426626980304718,
-0.008094166405498981,
-0.017260069027543068,
0.009635426104068756,
-0.03137637674808502,
0.011166478507220745,
-0.03454055264592171,
0.023843595758080482,
-0.04989190772175789,
0.015463633462786674,
0.009176109917461872,
0.018137872219085693,
-0.04201209172606468,
-0.08467742800712585,
0.026211624965071678,
-0.007838990539312363,
0.012187181040644646,
-0.026660732924938202,
0.06491664052009583,
-0.0010468574473634362,
-0.020301761105656624,
0.015963777899742126,
0.0005904122372157872,
-0.0600581020116806,
-0.05446465313434601,
-0.011789106763899326,
-0.003748527728021145,
-0.002161336364224553,
0.02853882499039173,
0.03272370249032974,
-0.06177287921309471,
-0.05385223403573036,
-0.06977517902851105,
-0.05866994708776474,
0.04266534000635147,
-0.015096181072294712,
0.024170221760869026,
0.024047736078500748,
-0.03888874128460884,
0.00012376011000014842,
-0.028069302439689636,
0.016188332810997963,
-0.011615587398409843,
-0.0788390189409256,
0.0016522612422704697,
0.043686043471097946,
-0.013575335033237934,
0.05462796613574028,
-0.010227433405816555,
0.06728467345237732,
0.001320533105172217,
-0.025129681453108788,
-0.0016165366396307945,
-0.015147216618061066,
0.02894710563123226,
0.05732261762022972,
-0.04597241431474686,
-0.025252165272831917,
-0.0433594174683094,
-0.024517260491847992,
-0.047564707696437836,
0.059527333825826645,
-0.006512077990919352,
-0.0015208458062261343,
0.007884922437369823,
-0.0363369882106781,
0.022251302376389503,
0.07794079929590225,
0.0016331230290234089,
0.03323405236005783,
0.029437042772769928,
0.014892040751874447,
-0.03429558500647545,
-0.022516684606671333,
0.03799052536487579,
-0.03460179641842842,
0.059813130646944046,
0.01229945756494999,
0.006190557032823563,
0.0600581020116806,
0.0211081150919199,
-0.033050328493118286,
-0.014973697252571583,
-0.0024726502597332,
-0.025864586234092712,
-0.0011948591563850641,
0.023884424939751625,
0.014718521386384964,
0.023108690977096558,
-0.02410897985100746,
0.042175401002168655,
-0.03229500725865364,
0.02016906999051571,
0.007170430850237608,
-0.033295296132564545,
0.0366227850317955,
-0.0021115769632160664,
-0.07981888949871063,
-0.007609332911670208,
-0.000408599735237658,
0.005062681622803211,
-0.007410295773297548,
-0.07659347355365753,
0.013095605187118053,
0.03825590759515762,
-0.02623203955590725,
-0.04331858828663826,
-0.016841581091284752,
0.0036617680452764034,
0.031029338017106056,
0.0035290769301354885,
-0.04495171085000038,
0.01176869310438633,
0.0750420019030571,
-0.06307937949895859,
-0.010931717231869698,
-0.002725274069234729,
-0.05609777569770813,
0.052423249930143356,
-0.008624930866062641,
-0.01358554232865572,
-0.045809101313352585,
0.06540657579898834,
0.010324399918317795,
0.0227208249270916,
0.05323981121182442,
-0.015096181072294712,
-0.038929570466279984,
-0.05997644364833832,
0.023231174796819687,
0.025782929733395576,
-0.024721400812268257,
0.0486670657992363,
-0.06904027611017227,
0.0180970449000597,
0.028987934812903404,
-0.011717657558619976,
0.018178701400756836,
-0.0026972047053277493,
-0.018638016656041145,
0.056995995342731476,
-0.01740296743810177,
-0.03617367520928383,
-0.016229160130023956,
0.010140673257410526,
-0.017994973808526993,
0.001966126961633563,
-0.10639796406030655,
0.011003166437149048,
0.003118244232609868,
0.014075479470193386,
0.020556936040520668,
-0.013830510899424553,
-0.04429846256971359,
0.016504749655723572,
0.012881258502602577,
0.007563401013612747,
0.0088341748341918,
-0.0072929151356220245,
-0.00043156553874723613,
-0.012626082636415958,
0.014044858515262604,
-0.006389594171196222,
0.020710041746497154,
-0.09619094431400299,
-0.029824908822774887,
-0.06144625321030617,
0.03684733808040619,
0.03292784467339516,
-0.0031820381991565228,
0.008982176892459393,
-0.01800518110394478,
0.007971681654453278,
-0.06797874718904495,
0.02433353289961815,
-0.04154256731271744,
-0.000722784548997879,
0.0738988146185875,
0.05695516616106033,
-0.049034520983695984,
-0.03766389936208725,
-0.007466434501111507,
-0.00366431986913085,
-0.033172812312841415,
-0.007175534497946501,
0.08435080200433731,
0.009436389431357384,
0.036398228257894516,
-0.022006332874298096,
0.030437331646680832,
-0.06152791157364845,
0.09994713217020035,
-0.02447643131017685,
0.005935381632298231,
0.03272370249032974,
-0.008114580065011978,
0.02796723134815693,
0.004424742888659239,
-0.022537097334861755,
-0.01843387633562088,
-0.005547514650970697,
0.0061956606805324554,
-0.012503598816692829,
-0.03145803138613701,
-0.014973697252571583,
0.016882410272955894,
-0.003539283759891987,
0.08745373785495758,
0.014667486771941185,
0.011748278513550758,
0.004187429789453745,
-0.03848046064376831,
0.03292784467339516,
-0.05609777569770813,
0.05421968549489975,
-0.009053626097738743,
0.05556701123714447,
-0.03768431395292282,
0.044870056211948395,
0.006302834488451481,
0.06520243734121323,
-0.08990342170000076,
0.07671595364809036,
-0.06483498215675354,
0.02165929414331913,
-0.023761941120028496,
-0.007246983703225851,
-0.06397759914398193,
0.009334319271147251,
0.019281059503555298,
0.006348765920847654,
0.03778638318181038,
-0.039337851107120514,
-0.05021853372454643,
-0.08859692513942719,
-0.0059455884620547295,
0.023108690977096558,
-0.05581197887659073,
-0.008966865949332714,
-0.032376665621995926,
0.033948544412851334,
-0.00531275337561965,
-0.016668062657117844,
-0.015433012507855892,
0.021740950644016266,
-0.04046062380075455,
-0.0016905375523492694,
-0.12085110694169998,
-0.041113872081041336,
0.007798162754625082,
0.003253487404435873,
-0.024660158902406693,
-0.0034244549460709095,
-0.02529299259185791,
-0.06393676996231079,
0.05234159529209137,
-0.014810384251177311,
0.03025360405445099,
-0.017596900463104248,
0.03313198313117027,
-0.011391033418476582,
-0.012697531841695309,
-0.0005215148557908833,
0.046870630234479904,
-0.04531916603446007,
-0.004797298926860094,
0.03362192213535309,
0.049565285444259644,
0.0092628700658679,
-0.018760500475764275,
-0.0042282575741410255,
-0.014116307720541954,
-0.0363369882106781,
-0.007563401013612747,
-0.046217381954193115,
0.03848046064376831,
-0.018250150606036186,
0.034254755824804306,
-0.009512941353023052,
-0.040297310799360275,
0.03643905743956566,
-0.0425020270049572,
0.026946529746055603,
-0.026129968464374542,
-0.0091199716553092,
0.002329752082005143,
0.02392525225877762,
0.05515873059630394,
-0.012115731835365295,
-0.042706169188022614,
0.0454416498541832,
-0.022271715104579926,
0.05413803085684776,
-0.022577926516532898,
0.04936114326119423,
-0.021332670003175735,
0.059404850006103516,
0.017872489988803864,
0.03766389936208725,
-0.014820591546595097,
-0.00032534872298128903,
-0.011901384219527245,
-0.0392766110599041,
-0.012768981046974659,
-0.010411159135401249,
-0.04793216288089752,
-0.03400978818535805,
-0.01440210361033678,
0.00885458942502737,
0.010686748661100864,
0.017249861732125282,
-0.0008312340942211449,
-0.009089350700378418,
0.05695516616106033,
-0.01855636015534401,
0.043931011110544205,
0.002302958630025387,
0.06671307981014252,
-0.0008758898475207388,
0.043114449828863144,
0.047972988337278366,
0.03190714120864868,
0.04119553044438362,
0.004414535593241453,
-0.009380250237882137,
0.02557878941297531,
0.012707739137113094,
0.03915412351489067,
0.05136172100901604,
0.010911303572356701,
0.011054201982915401,
0.00028420169837772846,
-0.03799052536487579,
0.04785050451755524,
0.0016050537815317512,
0.008211546577513218,
-0.009737496264278889,
0.01258525438606739,
0.029232902452349663,
-0.022843308746814728,
0.003090175101533532,
0.007037739735096693,
-0.03454055264592171,
0.05560784041881561,
0.002209819620475173,
0.00492743868380785,
0.01783166266977787,
0.04764636605978012,
-0.03429558500647545,
0.01251380518078804,
0.03454055264592171,
0.02543589100241661,
-0.010972545482218266,
-0.006971394177526236,
0.015677981078624725,
-0.02261875383555889,
-0.05352560803294182,
-0.004764126148074865,
-0.009165903553366661,
0.0389908142387867,
0.025190923362970352,
-0.038664188235998154,
-0.03850087523460388,
-0.06561072170734406,
-0.01730089820921421,
0.005266821943223476,
0.020730456337332726,
0.040297310799360275,
0.014769556932151318,
0.008405480533838272,
-0.015351356938481331,
0.020036378875374794,
-0.007961475290358067,
0.0006628183182328939,
0.03574497997760773,
0.022251302376389503,
0.07377633452415466,
-0.023333245888352394,
0.08022716641426086,
0.021169357001781464,
0.03672485426068306,
-0.03474469110369682,
-0.04846292734146118,
-0.0228637233376503,
0.05205579847097397,
0.04213457554578781,
-0.03905205428600311,
-0.01619854010641575,
0.05797586962580681,
0.029906565323472023,
-0.052423249930143356,
-0.025905413553118706,
-0.021720536053180695,
0.0197097547352314,
-0.02594624273478985,
0.033029913902282715,
0.0021090253721922636,
-0.009829359129071236,
0.04142008349299431,
-0.015116595663130283,
0.05111675336956978,
0.004646745510399342,
-0.05666936933994293,
0.031029338017106056,
0.04597241431474686,
0.015371770597994328,
-0.050667643547058105,
0.051851656287908554,
-0.02635452337563038,
0.10305006802082062,
0.01680075377225876,
-0.005042267497628927,
0.002348890295252204,
-0.10402993857860565,
0.00033970235381275415,
-0.007195948623120785,
0.015677981078624725,
-0.05340312421321869,
-0.034377239644527435,
-0.05675102770328522,
-0.01019170880317688,
0.04266534000635147,
-0.027477296069264412,
-0.07300060242414474,
-0.017994973808526993,
-0.03850087523460388,
-0.014769556932151318,
0.01790311187505722,
0.004503847099840641,
-0.020710041746497154,
0.01869925856590271,
-0.02396608144044876,
-0.011166478507220745,
0.009706875309348106,
0.0046748146414756775,
-0.034928418695926666,
-0.03684733808040619,
-0.06246695667505264,
-0.0067825643345713615,
-0.007012221962213516,
-0.007435813546180725,
-0.061405427753925323,
0.04011358320713043,
-0.050545159727334976,
0.0419304333627224,
0.021904263645410538,
-0.03294825926423073,
0.0005256615113466978,
-0.0012905499897897243,
0.013218089938163757,
-0.07006097584962845,
0.05177000164985657,
0.037745557725429535,
0.0013179812813177705,
-0.020015964284539223,
0.016596613451838493,
-0.01687220297753811,
-0.0005601101438514888,
0.04821795970201492,
-0.03637781739234924,
-0.016596613451838493,
-0.04262451082468033,
0.06463084369897842,
-0.05756758898496628,
-0.061282943934202194,
-0.003580112010240555,
0.05344395339488983,
0.0465848334133625,
-0.01804601028561592,
0.00006443180609494448,
-0.018158286809921265,
-0.05470962077379227,
-0.029763666912913322,
-0.06344682723283768,
0.05760841444134712,
-0.039358265697956085,
0.004845782183110714,
0.00720105180516839,
0.008732104673981667,
-0.013616163283586502,
-0.027354810386896133,
-0.028334684669971466,
-0.0054556517861783504,
0.03484676405787468,
0.030171947553753853,
-0.025068439543247223,
-0.0035418355837464333,
0.032499149441719055,
0.005761862266808748,
-0.04076683521270752,
0.060343895107507706,
-0.04752388224005699,
0.01687220297753811,
-0.011778900399804115,
-0.003858253126963973,
0.004794747103005648,
0.06124211475253105,
-0.00402411725372076,
0.01857677474617958,
0.08128870278596878,
0.015637153759598732,
0.04115470126271248,
-0.0023220968432724476,
-0.027354810386896133,
0.10713287442922592,
0.03684733808040619,
0.03809259459376335,
0.05634274706244469,
0.039766546338796616,
0.01951581984758377,
0.012564840726554394,
-0.025517547503113747,
0.0009141661575995386,
0.04584993049502373,
0.009273076429963112,
0.0021868539042770863,
-0.03552042692899704,
0.07038760185241699,
0.02570127323269844,
-0.004276740830391645,
-0.0027278258930891752,
-0.023312831297516823,
-0.023904839530587196,
0.03256038948893547,
-0.026946529746055603,
-0.015269700437784195,
0.015249286778271198,
0.024925541132688522,
0.054015543311834335,
0.014014237560331821,
0.007461330853402615,
-0.006501871161162853,
0.00005119458000990562,
0.006711115129292011,
-0.052382420748472214,
-0.009584390558302402,
0.045400820672512054,
-0.03245832026004791,
0.013075191527605057,
0.028048887848854065,
-0.0011508413590490818,
-0.027783505618572235,
0.07173492759466171,
0.03552042692899704,
0.02555837668478489,
0.02731398306787014,
0.025864586234092712,
0.007359260693192482,
-0.07634850591421127,
-0.020056791603565216,
-0.026048311963677406,
0.044339291751384735,
-0.039909444749355316,
-0.017923524603247643,
0.02555837668478489,
0.020883560180664062,
0.0022174748592078686,
0.02921248786151409,
-0.005527100991457701,
-0.009441493079066277,
-0.0076552643440663815,
0.02180219255387783,
-0.015841294080018997,
-0.000789768120739609,
-0.024394774809479713,
-0.04948362708091736,
-0.004396673291921616,
0.007838990539312363,
-0.012881258502602577,
-0.05666936933994293,
-0.004098118282854557,
-0.051729172468185425,
0.0026844460517168045,
-0.02502761036157608,
0.06965269893407822,
0.013718233443796635,
0.03147844597697258,
0.038439635187387466,
-0.04282865300774574,
0.036663614213466644,
0.00955376960337162,
-0.000023583796064485796,
-0.0029778978787362576,
-0.03568373993039131,
0.07708340883255005,
0.014167342334985733,
0.0009026832412928343,
0.00432012090459466,
-0.02274123765528202,
0.015494255349040031,
0.03901122510433197,
-0.08565730601549149,
-0.021332670003175735,
0.01802559569478035,
-0.00252368557266891,
-0.03592870756983757,
0.026415765285491943,
-0.023721111938357353,
-0.0364798866212368,
-0.06810123473405838,
-0.010365228168666363,
-0.03186631202697754,
0.035030487924814224,
0.013912167400121689,
0.005491376388818026,
-0.035459183156490326,
-0.038847915828228,
0.006777460686862469,
-0.013861131854355335,
0.07614436000585556,
-0.02584417164325714,
-0.008920934982597828,
0.007226569578051567,
-0.008211546577513218,
0.024803055450320244,
-0.04372686892747879,
-0.0006235850742086768,
0.03321364149451256,
0.01324871089309454,
-0.03905205428600311,
-0.013064984232187271,
0.07745086401700974,
-0.03596953675150871,
-0.05879243090748787,
0.00797678530216217,
0.018066423013806343,
-0.031151821836829185,
-0.06307937949895859,
0.09218979626893997,
-0.03266246244311333,
-0.02947787195444107,
0.05507707595825195,
-0.043073620647192,
0.0419304333627224,
-0.044625088572502136,
0.019168781116604805,
-0.005950692109763622,
0.006925462279468775,
0.004113428760319948,
-0.00419253297150135,
0.06634562462568283,
0.014034651219844818,
0.017331518232822418,
0.03501007705926895,
-0.011482896283268929,
0.010053914040327072,
-0.026436179876327515,
0.0530356727540493,
-0.07973723113536835,
-0.013085398823022842,
0.012289251200854778,
-0.002060541883111,
0.0298861525952816,
0.038827501237392426,
0.017331518232822418,
-0.005869036074727774,
-0.05687351152300835,
0.011625794693827629,
0.009441493079066277,
-0.02312910556793213,
-0.0031820381991565228,
0.01231987215578556,
-0.029559526592493057,
-0.035295870155096054,
0.03041691705584526,
0.025782929733395576,
-0.02261875383555889,
-0.026150383055210114,
-0.006797874812036753,
-0.018199114128947258,
-0.07577691227197647,
0.007685885298997164,
0.049851082265377045,
0.08259519934654236,
-0.014606243930757046,
0.021230598911643028,
-0.03413227200508118,
0.023231174796819687,
0.0025096507743000984,
-0.022822894155979156,
0.05426051467657089,
-0.020924389362335205,
0.05470962077379227,
-0.024537673220038414,
0.06418173760175705,
-0.005527100991457701,
0.01588212139904499,
-0.034356825053691864,
-0.027416054159402847,
-0.007915543392300606,
-0.017219241708517075,
-0.03792928159236908,
0.052137453109025955,
0.011401240713894367,
-0.057118479162454605,
0.028028475120663643,
0.021863434463739395,
-0.008334031328558922,
-0.05262739211320877,
0.05221911147236824,
0.031825486570596695,
0.00045548821799457073,
-0.045523304492235184,
-0.06981600821018219,
0.03831715136766434,
-0.04682980477809906,
0.009487424045801163,
0.041113872081041336,
0.04993273690342903,
-0.019117746502161026,
-0.020424244925379753,
0.0005792483570985496,
0.01492266170680523,
-0.04180794954299927,
0.01939333602786064,
0.04503336921334267,
-0.02529299259185791,
0.04125677049160004,
0.044992540031671524,
-0.06246695667505264,
-0.017443794757127762,
-0.004238464869558811,
-0.02729356847703457,
0.09071998298168182,
0.037480175495147705,
0.07936978340148926,
-0.026313696056604385,
-0.017515243962407112,
0.011544138193130493,
-0.0005329977720975876,
-0.003363212803378701,
0.033315710723400116,
-0.008609620854258537,
-0.02057735063135624,
-0.02894710563123226,
-0.05866994708776474,
-0.012809809297323227,
0.015157422982156277,
0.001952092396095395,
0.019270852208137512,
-0.01903609000146389,
-0.010472401976585388,
0.024721400812268257,
0.02396608144044876,
0.0556894950568676,
0.02972283959388733,
0.004215498920530081,
-0.001972506521269679,
-0.03731686249375343,
-0.011758485808968544,
-0.03096809610724449,
-0.07442958652973175,
-0.018056217581033707,
0.015657566487789154,
-0.05458713695406914,
0.03139679133892059,
-0.05601612105965614,
0.05315815657377243,
0.005710827186703682,
0.11235886812210083
] |
52,243 |
osmnx.distance
|
nearest_nodes
|
Find the nearest node to a point or to each of several points.
If `X` and `Y` are single coordinate values, this will return the nearest
node to that point. If `X` and `Y` are lists of coordinate values, this
will return the nearest node to each point.
If the graph is projected, this uses a k-d tree for euclidean nearest
neighbor search, which requires that scipy is installed as an optional
dependency. If it is unprojected, this uses a ball tree for haversine
nearest neighbor search, which requires that scikit-learn is installed as
an optional dependency.
Parameters
----------
G : networkx.MultiDiGraph
graph in which to find nearest nodes
X : float or list
points' x (longitude) coordinates, in same CRS/units as graph and
containing no nulls
Y : float or list
points' y (latitude) coordinates, in same CRS/units as graph and
containing no nulls
return_dist : bool
optionally also return distance between points and nearest nodes
Returns
-------
nn or (nn, dist) : int/list or tuple
nearest node IDs or optionally a tuple where `dist` contains distances
between the points and their nearest nodes
|
def nearest_nodes(G, X, Y, return_dist=False):
"""
Find the nearest node to a point or to each of several points.
If `X` and `Y` are single coordinate values, this will return the nearest
node to that point. If `X` and `Y` are lists of coordinate values, this
will return the nearest node to each point.
If the graph is projected, this uses a k-d tree for euclidean nearest
neighbor search, which requires that scipy is installed as an optional
dependency. If it is unprojected, this uses a ball tree for haversine
nearest neighbor search, which requires that scikit-learn is installed as
an optional dependency.
Parameters
----------
G : networkx.MultiDiGraph
graph in which to find nearest nodes
X : float or list
points' x (longitude) coordinates, in same CRS/units as graph and
containing no nulls
Y : float or list
points' y (latitude) coordinates, in same CRS/units as graph and
containing no nulls
return_dist : bool
optionally also return distance between points and nearest nodes
Returns
-------
nn or (nn, dist) : int/list or tuple
nearest node IDs or optionally a tuple where `dist` contains distances
between the points and their nearest nodes
"""
is_scalar = False
if not (hasattr(X, "__iter__") and hasattr(Y, "__iter__")):
# make coordinates arrays if user passed non-iterable values
is_scalar = True
X = np.array([X])
Y = np.array([Y])
if np.isnan(X).any() or np.isnan(Y).any(): # pragma: no cover
msg = "`X` and `Y` cannot contain nulls"
raise ValueError(msg)
nodes = convert.graph_to_gdfs(G, edges=False, node_geometry=False)[["x", "y"]]
if projection.is_projected(G.graph["crs"]):
# if projected, use k-d tree for euclidean nearest-neighbor search
if cKDTree is None: # pragma: no cover
msg = "scipy must be installed to search a projected graph"
raise ImportError(msg)
dist, pos = cKDTree(nodes).query(np.array([X, Y]).T, k=1)
nn = nodes.index[pos]
else:
# if unprojected, use ball tree for haversine nearest-neighbor search
if BallTree is None: # pragma: no cover
msg = "scikit-learn must be installed to search an unprojected graph"
raise ImportError(msg)
# haversine requires lat, lon coords in radians
nodes_rad = np.deg2rad(nodes[["y", "x"]])
points_rad = np.deg2rad(np.array([Y, X]).T)
dist, pos = BallTree(nodes_rad, metric="haversine").query(points_rad, k=1)
dist = dist[:, 0] * EARTH_RADIUS_M # convert radians -> meters
nn = nodes.index[pos[:, 0]]
# convert results to correct types for return
nn = nn.tolist()
dist = dist.tolist()
if is_scalar:
nn = nn[0]
dist = dist[0]
if return_dist:
return nn, dist
# otherwise
return nn
|
(G, X, Y, return_dist=False)
|
[
0.019942276179790497,
-0.03532123938202858,
-0.015477735549211502,
0.021828841418027878,
-0.029177555814385414,
0.030955471098423004,
-0.01813472993671894,
0.026569947600364685,
0.10280297696590424,
-0.01426282711327076,
-0.025463689118623734,
0.002861948683857918,
-0.009467395953834057,
0.006711627822369337,
-0.018203871324658394,
-0.002753298496827483,
-0.02931583859026432,
0.023211663588881493,
0.012554053217172623,
0.021334975957870483,
-0.02899976447224617,
-0.03585461154580116,
0.03071841411292553,
0.0032175318337976933,
-0.0032619796693325043,
-0.034511297941207886,
0.08636714518070221,
-0.0031656757928431034,
-0.015418470837175846,
0.024317922070622444,
-0.007190677337348461,
-0.04484295845031738,
-0.06522971391677856,
-0.022342462092638016,
-0.00011937647650483996,
0.024001847952604294,
0.04634431004524231,
0.05136197805404663,
-0.06360983848571777,
-0.04993964731693268,
-0.06151584908366203,
-0.07024738192558289,
0.027024302631616592,
-0.0015877765836194158,
0.005704143084585667,
0.006247394718229771,
-0.019863257184624672,
0.009388376958668232,
-0.07637131214141846,
0.013778839260339737,
0.005096688866615295,
-0.08071732521057129,
-0.004704066086560488,
0.03470884636044502,
-0.013778839260339737,
0.04563314467668533,
0.0030767801217734814,
0.04717400297522545,
-0.014410986565053463,
-0.004158345051109791,
0.012544175609946251,
-0.005689327139407396,
0.027498414739966393,
0.038738787174224854,
-0.046423327177762985,
-0.01828288845717907,
-0.045949216932058334,
-0.022322706878185272,
-0.05025572329759598,
0.0683114305138588,
-0.007126474753022194,
-0.0003188517002854496,
0.031370315700769424,
-0.03160737082362175,
0.05444369837641716,
0.06123928353190422,
0.00155073672067374,
0.012168838642537594,
0.022915344685316086,
0.022954853251576424,
-0.025068597868084908,
-0.007511689327657223,
0.01812485232949257,
-0.04152418673038483,
0.04112909361720085,
-0.003992900252342224,
0.01828288845717907,
0.05341646075248718,
0.012642948888242245,
-0.04195878654718399,
-0.04148467630147934,
-0.018944669514894485,
0.005980707239359617,
0.01735442318022251,
0.012376261875033379,
0.024851296097040176,
0.022500498220324516,
-0.02404135838150978,
0.016998840495944023,
-0.01204043347388506,
0.023014117032289505,
0.02585878223180771,
-0.017117368057370186,
0.03281240165233612,
0.012761476449668407,
-0.08802653104066849,
-0.03656577691435814,
-0.003941044211387634,
-0.006998069584369659,
0.017255648970603943,
-0.11923880875110626,
0.004089203663170338,
0.04008209705352783,
-0.01397638488560915,
-0.020307736471295357,
-0.04180074855685234,
0.004862102679908276,
0.03672381490468979,
-0.016603747382760048,
-0.04184025898575783,
0.00659803906455636,
0.06961523741483688,
-0.038738787174224854,
-0.02445620484650135,
0.000048190438974415883,
-0.03980553522706032,
0.07040542364120483,
0.008899450302124023,
-0.009190831333398819,
-0.04492197930812836,
0.05926382169127464,
-0.0026125467848032713,
0.017413686960935593,
0.06629646569490433,
0.00208904966711998,
-0.022065896540880203,
-0.06222701445221901,
0.024357430636882782,
0.0154876122251153,
0.005886873230338097,
0.028920745477080345,
-0.07040542364120483,
0.03376062586903572,
0.018628595396876335,
-0.011665095575153828,
0.03360258787870407,
-0.008435217663645744,
-0.027399640530347824,
0.031271543353796005,
-0.023073380813002586,
-0.020446019247174263,
-0.04646283760666847,
0.0406549833714962,
-0.002101396443322301,
-0.030441850423812866,
-0.05898725986480713,
0.017463073134422302,
-0.03455080837011337,
0.013028163462877274,
0.01656423881649971,
-0.021868349984288216,
-0.033029705286026,
0.010400800965726376,
0.008296934887766838,
0.013808471150696278,
0.006874603684991598,
-0.00404722522944212,
0.010726751759648323,
-0.03547927364706993,
0.01677166111767292,
-0.01543822605162859,
0.01970522105693817,
-0.06582235544919968,
-0.006173314992338419,
-0.04993964731693268,
0.00872165895998478,
0.028881236910820007,
-0.01985338144004345,
0.021611541509628296,
0.007170922588557005,
-0.0012667642440646887,
-0.04590970650315285,
0.03441252559423447,
-0.04843829944729805,
0.003941044211387634,
0.07739855349063873,
0.0406549833714962,
-0.03682258725166321,
-0.03850173205137253,
0.0036792957689613104,
0.01750258170068264,
-0.0204855278134346,
-0.014065280556678772,
0.08842162042856216,
-0.00019862641056533903,
0.05412762612104416,
-0.017897674813866615,
0.028920745477080345,
-0.06060713529586792,
0.08731536567211151,
0.0160407405346632,
0.01551724411547184,
0.044131793081760406,
0.0012358976528048515,
0.024515468627214432,
0.00731414370238781,
-0.044131793081760406,
0.008943898603320122,
-0.028031788766384125,
-0.010716875083744526,
0.007551198825240135,
-0.022026387974619865,
-0.02006080374121666,
0.0360521599650383,
-0.01775939203798771,
0.05705130845308304,
0.01938914693892002,
0.011151475831866264,
-0.0011451499303802848,
-0.04737154766917229,
0.029908476397395134,
-0.051915109157562256,
0.06044910103082657,
-0.0022964731324464083,
0.0473320409655571,
-0.025740254670381546,
0.057406891137361526,
0.0010852687992155552,
0.06234554201364517,
-0.08178407698869705,
0.07957156002521515,
-0.07044493407011032,
0.019833626225590706,
0.009516782127320766,
-0.0032767956145107746,
-0.09071315824985504,
0.0317654088139534,
0.024061111733317375,
-0.00027069984935224056,
0.024574732407927513,
-0.053890570998191833,
-0.04492197930812836,
-0.05926382169127464,
-0.004405277315527201,
0.014015894383192062,
-0.031172771006822586,
-0.02769595943391323,
-0.031113507226109505,
0.003699050284922123,
0.007763560861349106,
-0.041721731424331665,
-0.011833010241389275,
0.039884552359580994,
-0.038126394152641296,
-0.008114204742014408,
-0.11742138862609863,
-0.08581401407718658,
0.01845080405473709,
-0.00378053798340261,
-0.014410986565053463,
-0.0005806002882309258,
-0.017324790358543396,
-0.06337278336286545,
0.05325842276215553,
-0.01697908528149128,
0.02236221544444561,
-0.005704143084585667,
0.03715841844677925,
-0.013551660813391209,
-0.0004654679505620152,
0.0387585386633873,
0.03919314220547676,
-0.011833010241389275,
-0.017779147252440453,
0.0379486009478569,
0.021907860413193703,
-0.026688475161790848,
0.005333743989467621,
0.003328651422634721,
-0.01546785794198513,
-0.033622343093156815,
-0.0014322090428322554,
-0.07265744358301163,
0.011398408561944962,
-0.024752523750066757,
0.016070373356342316,
0.007496873382478952,
-0.00961555540561676,
0.016050618141889572,
-0.020189208909869194,
0.017956938594579697,
-0.03277289494872093,
-0.004373176489025354,
-0.01554687600582838,
-0.005015200935304165,
0.05637964978814125,
-0.05396958813071251,
-0.032417312264442444,
0.029434366151690483,
0.00000790473677625414,
0.037178169935941696,
-0.024001847952604294,
0.010079788975417614,
-0.02805154211819172,
0.05720934271812439,
0.022974608466029167,
0.044803451746702194,
-0.013660310767591,
-0.003827455220744014,
0.009976076893508434,
-0.03694111481308937,
-0.03077767789363861,
0.012010801583528519,
-0.042353879660367966,
-0.05724885314702988,
-0.01173423696309328,
0.016603747382760048,
0.009936567395925522,
0.02649092860519886,
0.005284357350319624,
-0.011013193987309933,
0.037652283906936646,
-0.00856856070458889,
0.07202529907226562,
0.0005602283054031432,
0.05507584661245346,
-0.0166728887706995,
0.06684958934783936,
0.02753792330622673,
0.0492284819483757,
0.03214074671268463,
0.01173423696309328,
-0.010153868235647678,
0.027498414739966393,
0.02157203108072281,
0.0370003804564476,
0.058868732303380966,
0.0028545407112687826,
0.028960254043340683,
-0.005244848318397999,
-0.02737988531589508,
0.02576000802218914,
-0.022223934531211853,
0.010183500126004219,
-0.0056350016966462135,
0.020248472690582275,
0.03891657665371895,
-0.011299635283648968,
0.005600431468337774,
-0.022658534348011017,
-0.011240371502935886,
0.05428566038608551,
-0.004086734261363745,
-0.005783161614090204,
0.015339452773332596,
0.06570382416248322,
-0.02769595943391323,
-0.00684497132897377,
0.029849212616682053,
0.018223624676465988,
-0.01760135591030121,
-0.033345777541399,
0.017364300787448883,
-0.003797823330387473,
-0.04693694785237312,
0.0003673122264444828,
-0.012751598842442036,
0.020525038242340088,
0.052073147147893906,
-0.05171756446361542,
-0.019063197076320648,
-0.06297768652439117,
-0.05416713282465935,
0.004101550206542015,
0.0076104626059532166,
0.05250774696469307,
0.014993746764957905,
-0.006306658498942852,
-0.027913261204957962,
-0.00684497132897377,
-0.009827917441725731,
-0.027261357754468918,
0.02894050069153309,
0.034570563584566116,
0.04211682453751564,
-0.031370315700769424,
0.07976910471916199,
0.02125595696270466,
0.030323322862386703,
-0.015961723402142525,
-0.031113507226109505,
-0.024890806525945663,
0.04357866570353508,
0.04322308301925659,
-0.04393424838781357,
-0.017275404185056686,
0.08628812432289124,
0.01901380904018879,
-0.03609166666865349,
-0.04847780615091324,
-0.01756184548139572,
0.007037579081952572,
-0.022658534348011017,
0.05724885314702988,
-0.0036348477005958557,
0.006973376497626305,
0.011171231046319008,
-0.02210540510714054,
0.026826757937669754,
0.0379486009478569,
-0.06929916143417358,
-0.0030298628844320774,
0.0794135257601738,
0.006993131246417761,
-0.03014553152024746,
0.04768762364983559,
-0.04409228265285492,
0.11852764338254929,
0.03698062524199486,
-0.005279419012367725,
0.006810401100665331,
-0.10193377733230591,
0.009748898446559906,
-0.015566631220281124,
0.02868369035422802,
-0.02554270811378956,
0.003069372149184346,
-0.0784653052687645,
-0.014499882236123085,
0.03221976384520531,
-0.03135056048631668,
-0.038422711193561554,
-0.015556753613054752,
-0.05076934024691582,
-0.009734082967042923,
0.008529052138328552,
-0.0074326712638139725,
-0.009373561479151249,
0.005970830097794533,
-0.01635681465268135,
0.0026150161866098642,
0.02408086694777012,
-0.01937926933169365,
-0.03223951905965805,
-0.05136197805404663,
-0.05195461958646774,
-0.0014704836066812277,
-0.001203796360641718,
-0.010341537185013294,
-0.0463838204741478,
0.03194320201873779,
-0.05124345049262047,
0.04970259219408035,
0.017739636823534966,
-0.006074541714042425,
-0.010069911368191242,
-0.04752958565950394,
-0.009655064903199673,
-0.04282798990607262,
0.04012160748243332,
0.044289831072092056,
-0.005412762518972158,
-0.005034955684095621,
0.01829276606440544,
-0.019053319469094276,
-0.026609456166625023,
0.048675354570150375,
-0.024179639294743538,
-0.012218224816024303,
-0.0363682322204113,
0.05732787027955055,
-0.050453267991542816,
-0.041721731424331665,
-0.027715714648365974,
0.05199412629008293,
0.026155101135373116,
-0.03297043964266777,
-0.026135345920920372,
-0.02585878223180771,
-0.05914529412984848,
-0.04278847947716713,
-0.06313572824001312,
0.07467241585254669,
-0.02121644839644432,
-0.0058621796779334545,
0.004183038137853146,
0.0116749731823802,
-0.01958669349551201,
-0.026095837354660034,
-0.03682258725166321,
0.016939576715230942,
0.029849212616682053,
0.03935118019580841,
-0.05930333212018013,
-0.014144298620522022,
0.008879696018993855,
0.019102705642580986,
-0.03656577691435814,
0.031686391681432724,
0.004874449223279953,
0.003291611559689045,
0.011408286169171333,
0.011566323228180408,
0.009689634665846825,
0.08024321496486664,
0.006657302845269442,
-0.0019692874047905207,
0.049505047500133514,
-0.004795431159436703,
0.050650812685489655,
0.00205694860778749,
-0.029177555814385414,
0.07404027134180069,
0.033029705286026,
0.02277706190943718,
0.04634431004524231,
0.027399640530347824,
0.03520271182060242,
0.03391866013407707,
-0.02884172648191452,
0.005832547787576914,
0.05657719448208809,
0.00043398403795436025,
0.013433133251965046,
-0.03658553212881088,
0.08407560735940933,
0.00341507769189775,
0.003518789540976286,
-0.02789350599050522,
-0.012415770441293716,
-0.01434184517711401,
0.009255033917725086,
-0.04508001357316971,
0.00454355962574482,
0.006212824024260044,
0.029394855722784996,
0.053218912333250046,
0.025068597868084908,
0.025088351219892502,
-0.019468165934085846,
0.005674511194229126,
-0.004711473826318979,
-0.01130951289087534,
0.02951338328421116,
0.058868732303380966,
-0.006193069275468588,
-0.005778222810477018,
0.02617485448718071,
-0.015023378655314445,
-0.010272395797073841,
0.0568537600338459,
0.01619877852499485,
0.020722582936286926,
0.014855464920401573,
0.03538050130009651,
0.004580599721521139,
-0.07080051302909851,
-0.01283061783760786,
-0.016159269958734512,
0.0360521599650383,
-0.023270927369594574,
-0.027735469862818718,
0.027577431872487068,
0.01105270255357027,
-0.014331967569887638,
-0.010795893147587776,
-0.004464541096240282,
-0.03583486005663872,
0.0005021991673856974,
0.009062426164746284,
-0.009916813112795353,
0.024159885942935944,
-0.04583068937063217,
-0.029236819595098495,
-0.010361291468143463,
0.008054940961301327,
-0.014983870089054108,
-0.03796835616230965,
-0.009008101187646389,
-0.0574859082698822,
-0.009334051981568336,
-0.01990276761353016,
0.06783732026815414,
0.02544393390417099,
0.029276328161358833,
0.023172155022621155,
-0.06910161674022675,
0.002322401152923703,
-0.003197777085006237,
-0.016129637137055397,
0.011566323228180408,
-0.02105841226875782,
0.0692596510052681,
0.02002129517495632,
-0.008771046064794064,
0.0032249398063868284,
-0.04630479961633682,
0.029039273038506508,
0.058868732303380966,
-0.07866284996271133,
-0.030856696888804436,
0.01876687817275524,
0.00713141355663538,
-0.028031788766384125,
0.026510683819651604,
-0.00369658088311553,
-0.07676640897989273,
-0.07957156002521515,
-0.015448102727532387,
-0.047253020107746124,
0.02026822790503502,
-0.006988192442804575,
0.0062967813573777676,
-0.04472443088889122,
-0.02925657480955124,
0.011497181840240955,
-0.001626051147468388,
0.058710694313049316,
-0.028762709349393845,
-0.02747865952551365,
0.011210739612579346,
-0.020199086517095566,
0.029078781604766846,
-0.03950921446084976,
0.007269695401191711,
0.02534516155719757,
0.014549268409609795,
-0.03933142498135567,
0.01003040187060833,
0.0949801504611969,
-0.03253583982586861,
-0.049030937254428864,
0.03119252622127533,
0.008237671107053757,
-0.018687859177589417,
-0.05965891480445862,
0.07186726480722427,
-0.023053627461194992,
-0.029849212616682053,
0.03745473548769951,
-0.053376950323581696,
0.047885168343782425,
-0.04618627205491066,
-0.007600585464388132,
-0.008657456375658512,
-0.06044910103082657,
0.0036373171024024487,
0.013205954805016518,
0.09608641266822815,
0.001953236758708954,
-0.012386138550937176,
0.03705964237451553,
0.0020396632608026266,
0.012929391115903854,
-0.005926382262259722,
-0.0035385440569370985,
-0.07360567152500153,
0.018045833334326744,
0.02992822974920273,
-0.021275712177157402,
0.007230186369270086,
0.031330808997154236,
0.04282798990607262,
-0.00437564542517066,
-0.0571698360145092,
-0.009739021770656109,
0.009729144163429737,
-0.03642749786376953,
-0.013551660813391209,
0.006311597302556038,
-0.04500099644064903,
-0.027103321626782417,
0.032575346529483795,
0.023270927369594574,
-0.04164271429181099,
-0.03433350846171379,
0.00566957239061594,
-0.0031681451946496964,
-0.06143682822585106,
0.01881626434624195,
0.05736738070845604,
0.07095854729413986,
-0.020406508818268776,
0.0406549833714962,
-0.044961486011743546,
0.02951338328421116,
0.005294234957545996,
-0.022796817123889923,
0.04243289679288864,
0.0006994365830905735,
0.027419395744800568,
-0.013660310767591,
0.08936984837055206,
0.011536690406501293,
0.0006969672394916415,
-0.005926382262259722,
-0.03522246703505516,
0.0138973668217659,
-0.014015894383192062,
-0.036289215087890625,
0.03030356764793396,
0.003834863193333149,
-0.06463707983493805,
0.04024013504385948,
0.001639632391743362,
-0.02560197189450264,
-0.054325170814991,
0.06420247256755829,
0.03192344680428505,
0.015793809667229652,
-0.024930315092206,
-0.09197745472192764,
0.03395817056298256,
-0.016574116423726082,
0.020228717476129532,
0.03125178813934326,
0.04425032064318657,
-0.01812485232949257,
-0.001030943589285016,
0.0024520407896488905,
0.02331043779850006,
-0.07107707858085632,
0.04666038230061531,
0.06522971391677856,
-0.026609456166625023,
0.032002463936805725,
0.06467658281326294,
-0.09537524729967117,
0.0154876122251153,
0.006118989549577236,
-0.029750438407063484,
0.08565597981214523,
0.0376325286924839,
0.06902259588241577,
-0.03125178813934326,
-0.020920129492878914,
0.019063197076320648,
-0.00938343908637762,
-0.02967142127454281,
0.01583331823348999,
-0.02408086694777012,
-0.007877149619162083,
-0.011131721548736095,
-0.03652627021074295,
-0.008301873691380024,
0.007190677337348461,
-0.008706843480467796,
0.017097612842917442,
-0.002323635620996356,
-0.03828442841768265,
0.035597801208496094,
0.019813871011137962,
0.0466998927295208,
0.015971601009368896,
0.04278847947716713,
-0.0024767338763922453,
-0.025088351219892502,
-0.017779147252440453,
-0.00880561675876379,
-0.10359316319227219,
-0.028861481696367264,
0.0080203702673316,
-0.0819421112537384,
0.026313137263059616,
-0.04760860279202461,
0.045751672238111496,
0.0007611697074025869,
0.11971291899681091
] |
52,244 |
osmnx.bearing
|
orientation_entropy
|
Calculate undirected graph's orientation entropy.
Orientation entropy is the entropy of its edges' bidirectional bearings
across evenly spaced bins. Ignores self-loop edges as their bearings are
undefined.
For more info see: Boeing, G. 2019. "Urban Spatial Order: Street Network
Orientation, Configuration, and Entropy." Applied Network Science, 4 (1),
67. https://doi.org/10.1007/s41109-019-0189-1
Parameters
----------
Gu : networkx.MultiGraph
undirected, unprojected graph with `bearing` attributes on each edge
num_bins : int
number of bins; for example, if `num_bins=36` is provided, then each
bin will represent 10 degrees around the compass
min_length : float
ignore edges with `length` attributes less than `min_length`; useful
to ignore the noise of many very short edges
weight : string
if not None, weight edges' bearings by this (non-null) edge attribute.
for example, if "length" is provided, this will return 1 bearing
observation per meter per street, which could result in a very large
`bearings` array.
Returns
-------
entropy : float
the graph's orientation entropy
|
def orientation_entropy(Gu, num_bins=36, min_length=0, weight=None):
"""
Calculate undirected graph's orientation entropy.
Orientation entropy is the entropy of its edges' bidirectional bearings
across evenly spaced bins. Ignores self-loop edges as their bearings are
undefined.
For more info see: Boeing, G. 2019. "Urban Spatial Order: Street Network
Orientation, Configuration, and Entropy." Applied Network Science, 4 (1),
67. https://doi.org/10.1007/s41109-019-0189-1
Parameters
----------
Gu : networkx.MultiGraph
undirected, unprojected graph with `bearing` attributes on each edge
num_bins : int
number of bins; for example, if `num_bins=36` is provided, then each
bin will represent 10 degrees around the compass
min_length : float
ignore edges with `length` attributes less than `min_length`; useful
to ignore the noise of many very short edges
weight : string
if not None, weight edges' bearings by this (non-null) edge attribute.
for example, if "length" is provided, this will return 1 bearing
observation per meter per street, which could result in a very large
`bearings` array.
Returns
-------
entropy : float
the graph's orientation entropy
"""
# check if we were able to import scipy
if scipy is None: # pragma: no cover
msg = "scipy must be installed to calculate entropy"
raise ImportError(msg)
bin_counts, _ = _bearings_distribution(Gu, num_bins, min_length, weight)
return scipy.stats.entropy(bin_counts)
|
(Gu, num_bins=36, min_length=0, weight=None)
|
[
-0.022584371268749237,
0.05195298045873642,
-0.021388202905654907,
-0.0027248533442616463,
0.06627129018306732,
-0.027083391323685646,
-0.042312219738960266,
-0.07598346471786499,
-0.026155022904276848,
0.03752754628658295,
0.012479427270591259,
-0.0012474963441491127,
-0.0023901048116385937,
0.019513610750436783,
-0.06559287011623383,
0.029743526130914688,
-0.0074715884402394295,
0.006619095336645842,
0.0070118666626513,
-0.0014427663991227746,
-0.02686915174126625,
-0.012943611480295658,
-0.0027136951684951782,
-0.008998041972517967,
-0.0774117261171341,
-0.05930852144956589,
0.00993533805012703,
-0.023530593141913414,
-0.03506379574537277,
0.02062051184475422,
0.0008201340097002685,
-0.052024390548467636,
0.09033748507499695,
0.02328064851462841,
0.04870368540287018,
-0.02610146254301071,
0.038277383893728256,
0.0021981822792440653,
-0.06884215772151947,
-0.01506814919412136,
0.007315372116863728,
-0.006471805740147829,
0.05434531718492508,
-0.007319835480302572,
0.049060750752687454,
0.043954718858003616,
0.04134814441204071,
-0.010354889556765556,
-0.02388765849173069,
-0.0005289027467370033,
-0.027404749765992165,
-0.02717265859246254,
0.03674200549721718,
0.019906381145119667,
-0.05766602233052254,
0.045740045607089996,
0.027511870488524437,
-0.038420211523771286,
0.003255987772718072,
0.029350755736231804,
-0.04145526513457298,
-0.03795602545142174,
0.021406056359410286,
-0.05505944415926933,
0.010676247999072075,
-0.005128348246216774,
-0.060379717499017715,
0.05780884623527527,
0.013122144155204296,
0.016960594803094864,
0.003807207103818655,
0.0029747989028692245,
0.06209363043308258,
0.021602440625429153,
0.007159156259149313,
0.044883087277412415,
-0.032475076615810394,
0.00910516083240509,
0.03556368872523308,
0.030493363738059998,
0.007632267661392689,
0.005311344284564257,
0.07848291844129562,
0.00552112003788352,
0.08655259013175964,
0.001024330616928637,
-0.007150229532271624,
-0.002972567453980446,
-0.005512193311005831,
-0.05056042596697807,
-0.018254956230521202,
0.004931962583214045,
0.024387549608945847,
0.0169516671448946,
0.05898716300725937,
0.022905729711055756,
-0.0207633376121521,
-0.0004446576931513846,
0.06727107614278793,
-0.059629879891872406,
-0.05813020467758179,
0.011836709454655647,
0.007083280012011528,
0.04552580788731575,
-0.021977359429001808,
-0.011640324257314205,
-0.015478773973882198,
0.001087374985218048,
0.007828653790056705,
-0.045918576419353485,
0.005061398260295391,
0.016433922573924065,
0.09190856665372849,
-0.009712171740829945,
0.034260399639606476,
-0.012863271869719028,
0.01755867898464203,
0.00887306872755289,
0.049774881452322006,
0.003405508818104863,
-0.010194210335612297,
-0.025030266493558884,
-0.008600806817412376,
-0.051595915108919144,
0.01784433051943779,
-0.031903769820928574,
-0.01707664132118225,
-0.06834226846694946,
-0.06555715948343277,
0.0031756481621414423,
0.025940783321857452,
-0.018888745456933975,
0.035295888781547546,
0.05573786795139313,
0.040241241455078125,
-0.07255563884973526,
-0.04359765350818634,
-0.02133464254438877,
0.06227216124534607,
-0.0008234814740717411,
-0.001995101571083069,
-0.05534509941935539,
0.025048119947314262,
0.021406056359410286,
0.029654260724782944,
0.04145526513457298,
0.052345748990774155,
-0.012443720363080502,
0.05655911937355995,
-0.10376313328742981,
0.0014528088504448533,
-0.008074135519564152,
0.0224058385938406,
0.01238123420625925,
0.001812105649150908,
-0.02015632763504982,
-0.016085784882307053,
0.02388765849173069,
-0.0349566787481308,
0.027261923998594284,
-0.008538320660591125,
-0.016416070982813835,
-0.013363162986934185,
-0.011872416362166405,
-0.0037759640254080296,
-0.023530593141913414,
0.06245069578289986,
0.018281735479831696,
0.010774441063404083,
-0.043954718858003616,
-0.049632053822278976,
-0.05081037059426308,
-0.02494100108742714,
-0.02942216768860817,
0.0736982449889183,
0.04134814441204071,
-0.019192252308130264,
0.029886353760957718,
-0.038170263171195984,
0.04274069890379906,
0.00153984350617975,
-0.05416678264737129,
0.027369042858481407,
-0.027101244777441025,
-0.02942216768860817,
0.058451563119888306,
0.050703249871730804,
-0.020513392984867096,
0.03622426092624664,
-0.017656872048974037,
-0.018299588933587074,
-0.016255391761660576,
-0.029672114178538322,
0.040062710642814636,
0.08469585329294205,
-0.02015632763504982,
0.02119181677699089,
0.02849379926919937,
-0.057273250073194504,
0.005579142831265926,
0.06587851792573929,
-0.00004376140350359492,
0.02313782088458538,
0.033546268939971924,
0.034706734120845795,
0.07726889848709106,
-0.023530593141913414,
0.0075697810389101505,
0.056666240096092224,
-0.034849558025598526,
0.005190834403038025,
-0.03168953210115433,
-0.026958419010043144,
0.06752102077007294,
-0.02836882509291172,
-0.002954714000225067,
-0.05866580456495285,
-0.00391878979280591,
0.018040716648101807,
-0.04713260009884834,
-0.00029457875643856823,
0.011586763896048069,
0.04402613267302513,
-0.016237538307905197,
0.016451776027679443,
-0.005177444778382778,
-0.04970346763730049,
-0.031743090599775314,
0.018460268154740334,
0.050846077501773834,
0.021084696054458618,
-0.019299371168017387,
0.0098549984395504,
0.03076116181910038,
0.003749184077605605,
0.05791596695780754,
-0.060986727476119995,
0.026172874495387077,
0.012408013455569744,
0.05048901215195656,
-0.06691400706768036,
-0.047989554703235626,
-0.02554801106452942,
0.019442196935415268,
-0.031118227168917656,
0.0025552473962306976,
-0.01956716924905777,
0.02790464088320732,
-0.0020386187825351954,
-0.052060097455978394,
-0.1187598705291748,
-0.025887222960591316,
-0.006538755726069212,
-0.03492097184062004,
0.028261706233024597,
-0.033956896513700485,
-0.04256216436624527,
-0.02194165252149105,
-0.031136080622673035,
-0.052310045808553696,
-0.004574897233396769,
-0.03938428685069084,
-0.03092184104025364,
0.033528417348861694,
-0.003494775155559182,
-0.034831706434488297,
0.017978230491280556,
0.04131243750452995,
-0.01658567599952221,
0.010997606441378593,
-0.01835314929485321,
0.018121056258678436,
-0.01928151771426201,
-0.037991732358932495,
0.03329632431268692,
-0.018406707793474197,
0.06912781298160553,
0.007069889921694994,
-0.03267146274447441,
0.06534292548894882,
-0.03633137792348862,
0.0036442962009459734,
-0.05006053298711777,
0.037991732358932495,
-0.017496192827820778,
0.04720401391386986,
-0.04320488125085831,
-0.08383889496326447,
0.02942216768860817,
-0.014175486750900745,
0.015255608595907688,
0.008712389506399632,
-0.01912083849310875,
0.05827303230762482,
0.05998694524168968,
-0.009328327141702175,
0.007547464687377214,
-0.006610168609768152,
0.009399740025401115,
0.012345527298748493,
0.046347055584192276,
0.05327412113547325,
0.006654801778495312,
-0.07244852185249329,
0.013077511452138424,
0.004228990525007248,
0.013755935244262218,
-0.045740045607089996,
0.005512193311005831,
0.020424125716090202,
-0.0300291795283556,
0.03759896010160446,
0.011399304494261742,
0.08055389672517776,
-0.025030266493558884,
-0.02342347428202629,
0.00382506032474339,
-0.0008100915583781898,
0.0405983068048954,
0.07691182941198349,
0.02001350186765194,
0.11318965256214142,
0.045740045607089996,
-0.01039059553295374,
-0.0373133085668087,
-0.024816026911139488,
0.020424125716090202,
0.005400610156357288,
0.04731113091111183,
-0.028565211221575737,
-0.11504638940095901,
0.004059384576976299,
0.023405620828270912,
-0.0028453629929572344,
-0.08662400394678116,
0.030386244878172874,
0.05270281434059143,
-0.017960377037525177,
-0.044883087277412415,
-0.05827303230762482,
-0.017014155164361,
0.0060611809603869915,
0.04309776425361633,
0.06341476738452911,
-0.02388765849173069,
-0.0360100194811821,
-0.02344132773578167,
-0.04956064373254776,
-0.022780755534768105,
0.045918576419353485,
0.028440238907933235,
0.026637060567736626,
0.020084913820028305,
0.00768582709133625,
0.038455914705991745,
-0.00697616022080183,
0.011801003478467464,
-0.015443067997694016,
0.02610146254301071,
0.05220292508602142,
-0.03659917786717415,
-0.03781319782137871,
-0.0049051824025809765,
-0.04320488125085831,
-0.002468212740495801,
0.018013937398791313,
0.026494234800338745,
-0.004597213584929705,
0.018406707793474197,
-0.014327239245176315,
-0.014362945221364498,
-0.07002047449350357,
0.006212933454662561,
0.0671282485127449,
-0.010765514336526394,
0.00697616022080183,
-0.024583935737609863,
-0.021977359429001808,
-0.022620076313614845,
-0.014246899634599686,
0.014728937298059464,
0.07141303271055222,
0.008538320660591125,
0.0741267278790474,
0.007168082986027002,
-0.010738734155893326,
0.019013719633221626,
0.027565428987145424,
-0.05759460851550102,
-0.0021546650677919388,
-0.022209452465176582,
0.0006114740390330553,
0.014371871948242188,
-0.038134556263685226,
-0.057844553142786026,
0.03168953210115433,
0.0019348467467352748,
0.00757870776578784,
-0.02806532010436058,
-0.03165382519364357,
-0.015451994724571705,
-0.03938428685069084,
0.007667974103242159,
0.03386763110756874,
-0.0427049919962883,
-0.007199326064437628,
0.009212280623614788,
-0.005797845311462879,
0.023637712001800537,
-0.08048248291015625,
-0.017594385892152786,
0.0341532826423645,
0.004722186364233494,
0.027565428987145424,
0.011381451971828938,
0.0010851433034986258,
0.022512957453727722,
-0.10383454710245132,
0.0001723955210763961,
-0.0017328817630186677,
-0.017496192827820778,
0.03370694816112518,
0.0013133302563801408,
0.02927934192121029,
-0.014746790751814842,
-0.030654042959213257,
-0.026012195274233818,
-0.008765948936343193,
-0.05480949953198433,
0.012149142101407051,
-0.021263228729367256,
-0.013755935244262218,
0.026012195274233818,
-0.006882430519908667,
-0.0202991534024477,
0.03852732852101326,
0.0382416769862175,
0.09305118024349213,
-0.020406272262334824,
-0.03806314617395401,
-0.03274287283420563,
0.05209580436348915,
-0.00313771003857255,
0.034135427325963974,
-0.01096190046519041,
-0.04684694856405258,
0.004365121480077505,
-0.01928151771426201,
-0.016308950260281563,
-0.012166994623839855,
0.017996083945035934,
-0.007547464687377214,
-0.001545422594062984,
-0.00976573210209608,
-0.011943829245865345,
0.02254866436123848,
0.04313347116112709,
0.008132158778607845,
-0.024851733818650246,
0.010863707400858402,
0.06927064061164856,
0.012979318387806416,
0.007168082986027002,
-0.002597648883238435,
-0.0024838345125317574,
-0.06016547605395317,
0.054273903369903564,
-0.004347268026322126,
-0.019299371168017387,
0.03974135220050812,
0.11990247666835785,
0.06734248995780945,
0.024637496098876,
0.03688482940196991,
0.004175430629402399,
-0.026208581402897835,
0.022477250546216965,
0.019959941506385803,
-0.031118227168917656,
-0.056666240096092224,
-0.03224298357963562,
0.011327891610562801,
0.030957547947764397,
0.00919442716985941,
0.015871545299887657,
0.023834098130464554,
-0.03927716612815857,
-0.05095319822430611,
0.04556151106953621,
0.018692361190915108,
0.018924452364444733,
-0.01956716924905777,
-0.029457874596118927,
0.015612673945724964,
0.05984411761164665,
0.014452211558818817,
0.014728937298059464,
-0.04227651283144951,
-0.03518877178430557,
-0.03243936970829964,
-0.03906292840838432,
-0.011613544076681137,
0.052024390548467636,
-0.02135249599814415,
0.04838232696056366,
-0.0018210322596132755,
0.030421949923038483,
-0.01395232044160366,
-0.0044633145444095135,
0.020941870287060738,
0.0016134881880134344,
-0.020816897973418236,
0.06416460871696472,
0.019031573086977005,
0.03160026669502258,
0.03043980337679386,
-0.0007264044252224267,
-0.029600700363516808,
0.026619207113981247,
0.04734683781862259,
0.015594820491969585,
0.014791423454880714,
0.0036866976879537106,
-0.013479209505021572,
-0.061165258288383484,
0.03624211251735687,
0.0010645004222169518,
0.0006856766412965953,
0.00753407459706068,
0.027672549709677696,
-0.05102460831403732,
0.03745613247156143,
-0.04556151106953621,
0.06827085465192795,
0.003126551629975438,
0.002356630051508546,
-0.031296759843826294,
-0.005244394298642874,
-0.023548446595668793,
-0.005650556180626154,
-0.017969302833080292,
-0.005846941843628883,
-0.015210974961519241,
-0.0006337906233966351,
0.0896233543753624,
0.033367738127708435,
0.03763466700911522,
-0.020227741450071335,
0.015335948206484318,
-0.03361768275499344,
-0.05595210939645767,
0.04499020799994469,
-0.0746266171336174,
-0.004316024947911501,
0.03659917786717415,
-0.007761703804135323,
-0.004592750687152147,
-0.013095363974571228,
-0.050096239894628525,
0.005775528959929943,
0.015728719532489777,
-0.02999347262084484,
-0.04677553474903107,
-0.018745919689536095,
0.004793599713593721,
0.0030105055775493383,
0.000038217127439565957,
-0.04420466348528862,
-0.028922276571393013,
0.04959635064005852,
-0.08291053026914597,
0.039919883012771606,
0.013273896649479866,
-0.03870586305856705,
-0.03931287303566933,
-0.04302635043859482,
-0.03274287283420563,
-0.021138256415724754,
0.02237013168632984,
-0.08169650286436081,
-0.004155345726758242,
0.014211192727088928,
-0.03999129682779312,
0.04477597028017044,
0.05195298045873642,
0.0036197479348629713,
0.008350861258804798,
0.04877509921789169,
0.033207058906555176,
-0.028422385454177856,
-0.05341694504022598,
-0.08405313640832901,
0.01851382851600647,
-0.02090616524219513,
0.055773574858903885,
-0.04713260009884834,
-0.015103856101632118,
-0.03240366280078888,
-0.03884868696331978,
-0.016148271039128304,
0.05959417298436165,
-0.011015459895133972,
0.008734705857932568,
0.023512739688158035,
0.0528099350631237,
-0.012033095583319664,
0.035617247223854065,
-0.04449031874537468,
0.027565428987145424,
-0.07048466056585312,
-0.040098417550325394,
0.013630961999297142,
-0.014130853116512299,
-0.0007074353052303195,
0.01851382851600647,
0.0063379062339663506,
-0.01744263246655464,
-0.03927716612815857,
-0.018853040412068367,
0.055166564881801605,
0.00317341648042202,
-0.058772921562194824,
-0.010738734155893326,
-0.048310913145542145,
-0.023959072306752205,
0.005842478480190039,
-0.003842913545668125,
0.028725890442728996,
-0.014318312518298626,
0.04923928529024124,
0.015889398753643036,
-0.0525599904358387,
0.04163379594683647,
0.03147529438138008,
0.010399522259831429,
-0.023030702024698257,
0.006029937881976366,
-0.009390813298523426,
0.019317224621772766,
0.004356194753199816,
-0.0659499317407608,
0.08326759189367294,
-0.036813415586948395,
-0.018995866179466248,
0.024226870387792587,
0.0229949951171875,
-0.00976573210209608,
0.05170303210616112,
-0.012586546130478382,
-0.0708417221903801,
0.011104726232588291,
0.05423819646239281,
0.06955628842115402,
0.007596561219543219,
-0.04384760186076164,
-0.00009317168587585911,
0.011881343089044094,
-0.06041542440652847,
-0.03431396186351776,
-0.01811213046312332,
-0.007975942455232143,
0.0010321413865312934,
0.03670629858970642,
0.03599216789007187,
0.025190945714712143,
0.0018846344901248813,
-0.024566082283854485,
-0.0396699383854866,
-0.027565428987145424,
-0.07309123873710632,
0.013077511452138424,
-0.02554801106452942,
0.04116960987448692,
-0.04088395833969116,
-0.05484520643949509,
0.05102460831403732,
0.07012759149074554,
-0.010631614364683628,
-0.008212498389184475,
0.004762356635183096,
0.02403048425912857,
0.020995430648326874,
0.006712824571877718,
-0.055023740977048874,
0.008524930104613304,
0.004456619266420603,
-0.01270259264856577,
-0.04102678596973419,
-0.027583282440900803,
-0.03431396186351776,
0.04074113443493843,
-0.04838232696056366,
0.03599216789007187,
-0.0014293764252215624,
0.05416678264737129,
-0.0363849401473999,
-0.018585240468382835,
0.07662618160247803,
0.05870151147246361,
-0.045989990234375,
0.05298846960067749,
0.007824189960956573,
-0.020281299948692322,
-0.009515786543488503,
0.0007570896996185184,
-0.030421949923038483,
-0.00035845994716510177,
0.0029279342852532864,
-0.020102767273783684,
0.01942434348165989,
-0.02644067443907261,
0.010515568777918816,
0.03713477402925491,
-0.04266928508877754,
0.035777926445007324,
0.06659264862537384,
-0.052774228155612946,
0.049774881452322006,
-0.02926148846745491,
-0.04495450109243393,
0.012050949037075043,
0.016335731372237206,
0.04131243750452995,
-0.017201613634824753,
0.013568475842475891,
-0.02062051184475422,
0.050524719059467316,
-0.017790770158171654,
-0.03193947672843933,
-0.02717265859246254,
0.02431613579392433,
-0.013211410492658615,
-0.01719268597662449,
0.0063155898824334145,
-0.05691618472337723,
0.05598781630396843,
0.010586981661617756,
0.01954931765794754,
0.006525365635752678,
0.04909645766019821,
0.020852604880928993,
0.0056282393634319305,
0.0028922276105731726,
-0.0071145230904221535,
0.04259787127375603,
-0.048025261610746384,
-0.0256908368319273,
-0.010247769765555859,
0.03370694816112518,
0.006485195830464363,
0.012854345142841339,
0.031296759843826294,
-0.0058692581951618195,
-0.04956064373254776,
0.037848904728889465,
-0.022155892103910446,
0.016460703685879707,
0.01365774217993021,
-0.0023477033246308565,
-0.055916402488946915,
-0.03151099756360054,
-0.00343452044762671,
-0.039634231477975845,
-0.008542783558368683,
-0.06616417318582535,
0.033224910497665405,
0.04391901195049286,
0.01786218397319317
] |
52,247 |
osmnx.plot
|
plot_figure_ground
|
Plot a figure-ground diagram of a street network.
Parameters
----------
G : networkx.MultiDiGraph
input graph, must be unprojected
address : string
deprecated, do not use
point : tuple
deprecated, do not use
dist : numeric
how many meters to extend north, south, east, west from center point
network_type : string
deprecated, do not use
street_widths : dict
dict keys are street types and values are widths to plot in pixels
default_width : numeric
fallback width in pixels for any street type not in street_widths
color : string
color of the streets
edge_color : string
deprecated, do not use
smooth_joints : bool
deprecated, do not use
pg_kwargs
keyword arguments to pass to plot_graph
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_figure_ground(
G=None,
address=None,
point=None,
dist=805,
network_type="drive_service",
street_widths=None,
default_width=4,
color="w",
edge_color=None,
smooth_joints=None,
**pg_kwargs,
):
"""
Plot a figure-ground diagram of a street network.
Parameters
----------
G : networkx.MultiDiGraph
input graph, must be unprojected
address : string
deprecated, do not use
point : tuple
deprecated, do not use
dist : numeric
how many meters to extend north, south, east, west from center point
network_type : string
deprecated, do not use
street_widths : dict
dict keys are street types and values are widths to plot in pixels
default_width : numeric
fallback width in pixels for any street type not in street_widths
color : string
color of the streets
edge_color : string
deprecated, do not use
smooth_joints : bool
deprecated, do not use
pg_kwargs
keyword arguments to pass to plot_graph
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
if edge_color is None:
edge_color = color
else:
msg = (
"The `edge_color` parameter is deprecated and will be removed in the "
"v2.0.0 release. Use `color` instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
if smooth_joints is None:
smooth_joints = True
else:
msg = (
"The `smooth_joints` parameter is deprecated and will be removed in the "
"v2.0.0 release. In the future this function will behave as though True. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
# if user did not pass in custom street widths, create a dict of defaults
if street_widths is None:
street_widths = {
"footway": 1.5,
"steps": 1.5,
"pedestrian": 1.5,
"service": 1.5,
"path": 1.5,
"track": 1.5,
"motorway": 6,
}
multiplier = 1.2
dep_msg = (
"The `address`, `point`, and `network_type` parameters are deprecated "
"and will be removed in the v2.0.0 release. Pass `G` instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
# if G was passed in, plot it centered on its node centroid
if G is not None:
gdf_nodes = convert.graph_to_gdfs(G, edges=False, node_geometry=True)
lonlat_point = gdf_nodes.unary_union.centroid.coords[0]
point = tuple(reversed(lonlat_point))
# otherwise get network by address or point (whichever was passed) using a
# dist multiplier to ensure we get more than enough network. simplify in
# non-strict mode to not combine multiple street types into single edge
elif address is not None:
warn(dep_msg, FutureWarning, stacklevel=2)
G, point = graph.graph_from_address(
address,
dist=dist * multiplier,
dist_type="bbox",
network_type=network_type,
simplify=False,
truncate_by_edge=True,
return_coords=True,
)
G = simplification.simplify_graph(G, edge_attrs_differ=["osmid"])
elif point is not None:
warn(dep_msg, FutureWarning, stacklevel=2)
G = graph.graph_from_point(
point,
dist=dist * multiplier,
dist_type="bbox",
network_type=network_type,
simplify=False,
truncate_by_edge=True,
)
G = simplification.simplify_graph(G, edge_attrs_differ=["osmid"])
else: # pragma: no cover
msg = "You must pass an address or lat-lon point or graph."
raise ValueError(msg)
# we need an undirected graph to find every edge incident on a node
Gu = convert.to_undirected(G)
# for each edge, get a linewidth according to street type
edge_linewidths = []
for _, _, d in Gu.edges(keys=False, data=True):
street_type = d["highway"][0] if isinstance(d["highway"], list) else d["highway"]
if street_type in street_widths:
edge_linewidths.append(street_widths[street_type])
else:
edge_linewidths.append(default_width)
if smooth_joints:
# for each node, get a nodesize according to the narrowest incident edge
node_widths = {}
for node in Gu.nodes:
# first, identify all the highway types of this node's incident edges
ie_data = [Gu.get_edge_data(node, nbr) for nbr in Gu.neighbors(node)]
edge_types = [d[min(d)]["highway"] for d in ie_data]
if not edge_types:
# if node has no incident edges, make size zero
node_widths[node] = 0
else:
# flatten the list of edge types
et_flat = []
for et in edge_types:
if isinstance(et, list):
et_flat.extend(et)
else:
et_flat.append(et)
# lookup corresponding width for each edge type in flat list
edge_widths = [street_widths.get(et, default_width) for et in et_flat]
# node diameter should equal largest edge width to make joints
# perfectly smooth. alternatively use min(?) to prevent
# anything larger from extending past smallest street's line.
# circle marker sizes are in area, so use diameter squared.
circle_diameter = max(edge_widths)
circle_area = circle_diameter**2
node_widths[node] = circle_area
# assign the node size to each node in the graph
node_sizes = [node_widths[node] for node in Gu.nodes]
else:
node_sizes = 0
# define the view extents of the plotting figure
bbox = utils_geo.bbox_from_point(point, dist, project_utm=False)
# plot the figure
overrides = {"bbox", "node_size", "node_color", "edge_linewidth"}
kwargs = {k: v for k, v in pg_kwargs.items() if k not in overrides}
fig, ax = plot_graph(
G=Gu,
bbox=bbox,
node_size=node_sizes,
node_color=edge_color,
edge_color=edge_color,
edge_linewidth=edge_linewidths,
**kwargs,
)
return fig, ax
|
(G=None, address=None, point=None, dist=805, network_type='drive_service', street_widths=None, default_width=4, color='w', edge_color=None, smooth_joints=None, **pg_kwargs)
|
[
0.02622416242957115,
0.035082560032606125,
-0.026327406987547874,
-0.00004654079020838253,
-0.050713811069726944,
-0.022259565070271492,
-0.05521528422832489,
-0.05814743414521217,
0.025728587061166763,
-0.04575806483626366,
-0.027339205145835876,
0.0032909258734434843,
0.0033864271827042103,
0.015414438210427761,
-0.007955006323754787,
0.07144535332918167,
-0.02057667449116707,
-0.02170204184949398,
0.02128906361758709,
0.0035516186617314816,
0.019771365448832512,
-0.0830913633108139,
0.0812329575419426,
-0.009896007366478443,
0.007170346565544605,
-0.05913858115673065,
0.018522104248404503,
-0.002033921191468835,
-0.011315622366964817,
0.012172553688287735,
0.00046524658682756126,
-0.08870787173509598,
-0.06768724322319031,
0.0031825187616050243,
0.07830080389976501,
0.04245423525571823,
0.010520637966692448,
0.032171059399843216,
-0.04856632277369499,
-0.004245939664542675,
-0.023374607786536217,
-0.035991113632917404,
0.01593066193163395,
-0.020628297701478004,
0.04745128005743027,
-0.004553092643618584,
0.006044979207217693,
0.06124477460980415,
-0.013390841893851757,
-0.031489644199609756,
-0.06496158242225647,
-0.05178755894303322,
-0.032625336199998856,
0.04185541346669197,
0.0029373127035796642,
-0.000936300668399781,
0.019162222743034363,
0.09283766150474548,
0.03570202738046646,
-0.03210911154747009,
-0.007129048928618431,
0.003110247664153576,
-0.0027514721732586622,
-0.016333317384123802,
-0.013504411093890667,
0.011831846088171005,
0.007108399644494057,
-0.03442179411649704,
-0.02046310529112816,
-0.042247746139764786,
0.027483748272061348,
0.03543359041213989,
-0.020938031375408173,
0.010974914766848087,
0.04005895555019379,
0.03031265363097191,
0.019482281059026718,
-0.038179900497198105,
0.005296454764902592,
-0.0075523522682487965,
0.050135642290115356,
0.02909436635673046,
-0.0483185350894928,
-0.041648924350738525,
0.030168110504746437,
0.023870181292295456,
0.055958643555641174,
0.05348077043890953,
-0.021722691133618355,
-0.03774627298116684,
-0.002013272373005748,
0.02211502194404602,
0.014536858536303043,
0.021557500585913658,
0.01981266401708126,
-0.026740385219454765,
-0.01128464937210083,
-0.07933325320482254,
-0.009271376766264439,
-0.0010763263562694192,
-0.003050881903618574,
-0.03310026228427887,
-0.04476691409945488,
0.03188197314739227,
-0.0061637102626264095,
-0.04389965906739235,
-0.01694246008992195,
0.05203534662723541,
-0.027318555861711502,
0.016859864816069603,
-0.02762828953564167,
-0.03974922001361847,
-0.027112066745758057,
-0.024881981313228607,
0.036672528833150864,
0.06302058696746826,
0.039542730897665024,
0.0008698368910700083,
0.03756043314933777,
-0.04049258306622505,
-0.032997015863657,
0.05220053717494011,
-0.07123886793851852,
-0.06942176073789597,
0.013008836656808853,
-0.014495559968054295,
-0.0028572978917509317,
0.009803087450563908,
0.0039362055249512196,
-0.09333323687314987,
0.040740370750427246,
0.01399998553097248,
-0.0014480074169114232,
0.03605306148529053,
-0.005337752867490053,
-0.019275791943073273,
-0.07148665189743042,
-0.005838489625602961,
-0.009080374613404274,
0.015724172815680504,
-0.025233011692762375,
-0.027483748272061348,
-0.021123873069882393,
-0.007072264328598976,
-0.0032651147339493036,
0.007263266947120428,
-0.043115001171827316,
-0.06285539269447327,
0.029837727546691895,
0.000009774977115739603,
-0.0006601210334338248,
-0.008925506845116615,
-0.03208846226334572,
0.01130529772490263,
-0.05352206900715828,
-0.034628283232450485,
-0.01139821857213974,
0.02566664107143879,
0.004287237301468849,
0.060294922441244125,
-0.05777575075626373,
-0.06834801286458969,
0.0963892787694931,
-0.00013187901640776545,
-0.033079613000154495,
-0.008445419371128082,
0.01687018945813179,
-0.024654841050505638,
0.01725219562649727,
0.0027617965824902058,
-0.02804126963019371,
-0.030994068831205368,
-0.06632441282272339,
-0.03064303658902645,
0.04423004388809204,
0.03898521140217781,
0.05963415652513504,
0.01868729665875435,
-0.027091417461633682,
-0.039645977318286896,
0.03917105123400688,
-0.027008822187781334,
0.028640087693929672,
-0.010179930366575718,
-0.011604707688093185,
0.04431263729929924,
0.031035365536808968,
-0.03619760274887085,
0.0034922531340271235,
0.007836274802684784,
0.009911494329571724,
0.01066518109291792,
-0.0009375912486575544,
0.028743334114551544,
0.054967496544122696,
-0.023002926260232925,
0.06041881814599037,
-0.024014724418520927,
-0.03173743188381195,
0.04790555685758591,
0.012977862730622292,
-0.009028751403093338,
0.004013638943433762,
-0.004008476622402668,
0.012771373614668846,
-0.009353972971439362,
0.00015938405704218894,
-0.007511054165661335,
0.0015306031564250588,
0.025233011692762375,
-0.0021655582822859287,
-0.033079613000154495,
0.0524483248591423,
0.02448965050280094,
0.02894982323050499,
-0.05182885378599167,
-0.07066069543361664,
0.040513232350349426,
-0.005869463086128235,
-0.044932108372449875,
-0.037312645465135574,
-0.013297921046614647,
-0.0001814848801586777,
0.007655596826225519,
0.006334064528346062,
-0.03322415426373482,
0.012998512014746666,
0.020586999133229256,
0.08152204006910324,
-0.060790497809648514,
0.07437750697135925,
0.023085521534085274,
-0.0024133455008268356,
0.011202053166925907,
0.04964006692171097,
-0.09994090348482132,
-0.028929173946380615,
0.004800879862159491,
-0.02151620201766491,
-0.017758093774318695,
-0.01947195641696453,
-0.03898521140217781,
-0.09531553834676743,
-0.020370185375213623,
0.04257812723517418,
-0.014722698368132114,
0.003918137401342392,
-0.018997030332684517,
0.015858391299843788,
-0.019162222743034363,
-0.04381706565618515,
0.018047180026769638,
-0.00852801464498043,
0.004111721646040678,
0.002205565571784973,
-0.07900287210941315,
-0.0789615735411644,
-0.04423004388809204,
0.009694680571556091,
0.03415335714817047,
-0.017221221700310707,
0.020359860733151436,
-0.014278746210038662,
0.020297914743423462,
0.07578163594007492,
0.0012983025517314672,
-0.04199995845556259,
0.01675662025809288,
-0.03241884708404541,
-0.005905598867684603,
-0.04480821266770363,
0.044023554772138596,
0.017200572416186333,
0.012977862730622292,
0.020938031375408173,
0.005185466725379229,
-0.0307256318628788,
-0.000004975710453436477,
0.042371638119220734,
0.0012370009208098054,
-0.027834780514240265,
-0.014856916852295399,
-0.01985396258533001,
0.019709419459104538,
-0.049805257469415665,
0.0052422513253986835,
0.05030083283782005,
0.027050118893384933,
0.008873884566128254,
-0.04245423525571823,
0.002301066881045699,
0.033389344811439514,
0.044106148183345795,
-0.002319134771823883,
-0.0023772099521011114,
-0.016250720247626305,
0.03559878468513489,
0.0274424497038126,
0.001315079745836556,
-0.022135671228170395,
0.08346304297447205,
-0.0006607662653550506,
0.057651858776807785,
-0.003580010961741209,
0.04559287428855896,
0.042702022939920425,
0.03830379620194435,
-0.025645991787314415,
0.046666618436574936,
-0.010685829445719719,
-0.061533860862255096,
-0.004687310662120581,
-0.010634207166731358,
0.03516515716910362,
0.021392308175563812,
0.044932108372449875,
-0.01269910205155611,
-0.019874610006809235,
0.003763270564377308,
0.01641591265797615,
-0.02593507617712021,
-0.0028056756127625704,
-0.003871677443385124,
-0.006762529723346233,
-0.012058984488248825,
0.004504051525145769,
0.044436533004045486,
0.07198222726583481,
0.03281117603182793,
0.018181396648287773,
0.01713862456381321,
-0.01224482525140047,
-0.01034512184560299,
-0.013865767046809196,
-0.07078459113836288,
0.019988179206848145,
0.03204716369509697,
-0.023188766092061996,
-0.012089958414435387,
-0.052365727722644806,
0.05467841029167175,
0.0570736862719059,
-0.007474918384104967,
0.04109140485525131,
0.008331850171089172,
-0.0021836261730641127,
0.027504395693540573,
-0.03320350497961044,
-0.033946868032217026,
0.005905598867684603,
-0.03281117603182793,
0.1276930868625641,
0.003520645434036851,
0.02812386490404606,
0.022693192586302757,
0.07280818372964859,
0.0041401139460504055,
-0.017262518405914307,
0.018862811848521233,
0.03219170868396759,
-0.01630234345793724,
-0.022899681702256203,
-0.01713862456381321,
-0.002076509641483426,
-0.05624772980809212,
0.022548649460077286,
0.04226839169859886,
0.03392621874809265,
0.07578163594007492,
-0.021268414333462715,
-0.025294959545135498,
-0.08391731977462769,
-0.05653681606054306,
-0.0036677690222859383,
-0.006313415244221687,
0.04542768374085426,
0.00043427315540611744,
0.0029527994338423014,
-0.028743334114551544,
-0.025274310261011124,
-0.004186573904007673,
-0.04111205041408539,
0.031985219568014145,
0.02072121761739254,
0.0592624768614769,
-0.03369908034801483,
0.09539813548326492,
0.044477831572294235,
0.03522710129618645,
-0.05992324277758598,
-0.007165184244513512,
-0.013659277930855751,
0.07553384453058243,
0.0524483248591423,
0.019038328900933266,
0.0006552814156748354,
0.02766958810389042,
0.031943920999765396,
-0.013246298767626286,
-0.010076685808598995,
-0.024778734892606735,
-0.03188197314739227,
0.05133328214287758,
0.03894391283392906,
-0.02886722795665264,
-0.08606480807065964,
0.020845111459493637,
-0.037188753485679626,
0.04662531986832619,
0.016550131142139435,
0.043197594583034515,
0.012554559856653214,
-0.061120882630348206,
0.019420333206653595,
-0.000653990835417062,
0.019379036501049995,
0.009761789813637733,
0.031303804367780685,
0.029259556904435158,
-0.02638935297727585,
0.024097319692373276,
-0.016694672405719757,
0.06169905140995979,
0.03182002529501915,
0.053232982754707336,
-0.03000291995704174,
-0.07718576490879059,
-0.011553085409104824,
-0.0016067461110651493,
0.032666634768247604,
0.000599787337705493,
-0.011377569288015366,
-0.0017332208808511496,
-0.01709732785820961,
-0.010009576566517353,
0.02698817290365696,
0.023312659934163094,
-0.06285539269447327,
0.032212357968091965,
-0.03578462451696396,
0.005404861643910408,
-0.00886872224509716,
-0.04460172355175018,
-0.06578754633665085,
0.007051615044474602,
-0.003319318173453212,
-0.012905591167509556,
-0.03603241220116615,
-0.004844759125262499,
-0.012719751335680485,
-0.011501463130116463,
-0.032294951379299164,
0.0373745933175087,
-0.0010550321312621236,
-0.06186424195766449,
-0.0458819605410099,
0.018325939774513245,
-0.01743803545832634,
-0.07817690819501877,
0.008889371529221535,
0.006225657183676958,
-0.03448374196887016,
-0.011676979251205921,
0.036589931696653366,
0.024551596492528915,
-0.019348062574863434,
0.05046602338552475,
-0.02740115113556385,
-0.051498472690582275,
0.006251468323171139,
-0.00008509624603902921,
-0.0504247285425663,
0.0033115746919065714,
-0.03477282449603081,
0.07553384453058243,
0.02484068274497986,
-0.044477831572294235,
0.007134210783988237,
-0.014763996936380863,
-0.020132722333073616,
0.014598805457353592,
0.006870937068015337,
0.04542768374085426,
0.025501448661088943,
0.023560447618365288,
0.08065478503704071,
0.002280418062582612,
-0.016704997047781944,
-0.007898221723735332,
-0.014144528657197952,
-0.0415043830871582,
-0.02397342585027218,
-0.005662973504513502,
-0.03210911154747009,
0.07553384453058243,
0.10184060037136078,
-0.0015964217018336058,
-0.05971675366163254,
0.011615032330155373,
-0.07528606057167053,
-0.009070049971342087,
-0.03830379620194435,
0.020597323775291443,
-0.012905591167509556,
0.04617104306817055,
0.016364289447665215,
-0.04988785460591316,
0.07309727370738983,
0.03188197314739227,
0.05558696389198303,
0.021846584975719452,
-0.0020700569730252028,
0.08040699362754822,
0.03698226436972618,
0.018656322732567787,
0.048029448837041855,
0.013938038609921932,
-0.009405595250427723,
-0.005322265904396772,
-0.036176953464746475,
0.036094360053539276,
-0.007433620747178793,
0.02868138626217842,
-0.014805294573307037,
-0.024654841050505638,
0.09349843114614487,
0.031489644199609756,
0.017613550648093224,
0.02475808747112751,
-0.005492619704455137,
0.0504247285425663,
0.07276688516139984,
0.00022052429267205298,
0.04794685170054436,
0.09044238179922104,
0.007769166026264429,
0.016209423542022705,
-0.025563396513462067,
0.015146002173423767,
-0.04765776917338371,
-0.00860544852912426,
-0.030168110504746437,
-0.06178164854645729,
-0.0025023941416293383,
0.0219291802495718,
0.009162969887256622,
0.07784652709960938,
-0.027008822187781334,
0.0007014189031906426,
-0.08276097476482391,
0.0002766636316664517,
0.05005304515361786,
0.043569277971982956,
-0.014392315410077572,
0.06483769416809082,
0.06264889985322952,
-0.033719729632139206,
0.0043311165645718575,
0.029280206188559532,
0.009916656650602818,
-0.031117962673306465,
-0.027566343545913696,
-0.0071806712076067924,
0.0004478240152820945,
0.002289451891556382,
-0.0076865702867507935,
-0.03997635841369629,
-0.00943656824529171,
-0.0007969202706590295,
0.02996162138879299,
0.024551596492528915,
0.037725623697042465,
-0.008646746166050434,
-0.016994083300232887,
-0.011005888693034649,
-0.03411205857992172,
-0.001348634366877377,
0.008569312281906605,
-0.015713848173618317,
-0.02053537778556347,
-0.02426251210272312,
-0.011315622366964817,
0.057197581976652145,
0.037498485296964645,
0.023911479860544205,
0.06496158242225647,
-0.020246291533112526,
-0.010675505734980106,
-0.016106178984045982,
-0.05905598774552345,
-0.025067821145057678,
-0.0030689495615661144,
0.09275506436824799,
0.0081873070448637,
-0.029342152178287506,
0.05178755894303322,
0.0030689495615661144,
0.006488931365311146,
0.06880228966474533,
0.004893800243735313,
-0.029755132272839546,
0.044477831572294235,
-0.0019681027624756098,
0.0031747755128890276,
0.04084361717104912,
-0.019915908575057983,
0.02389083057641983,
0.014412964694201946,
-0.017004407942295074,
-0.07631850242614746,
0.05166366323828697,
0.055876050144433975,
-0.017107652500271797,
-0.09052497893571854,
-0.06888488680124283,
-0.0612860731780529,
0.0014996296958997846,
0.04951617494225502,
-0.0014957580715417862,
-0.02989967353641987,
0.05211794003844261,
-0.016033906489610672,
-0.0153628159314394,
-0.0020481173414736986,
-0.0028805281035602093,
0.033306751400232315,
-0.010768425650894642,
-0.05038342997431755,
-0.0024223795626312494,
0.009803087450563908,
-0.016446886584162712,
-0.026657789945602417,
-0.05166366323828697,
-0.04592325538396835,
0.026657789945602417,
-0.04389965906739235,
0.01021090429276228,
-0.005379050504416227,
-0.04592325538396835,
0.021371658891439438,
-0.027194662019610405,
0.023952778428792953,
-0.019544227048754692,
-0.012771373614668846,
-0.003951692022383213,
0.04790555685758591,
0.049350980669260025,
-0.03208846226334572,
0.005533917807042599,
0.010081848129630089,
0.0028831090312451124,
0.0439409576356411,
0.007598812226206064,
-0.016333317384123802,
0.038964562118053436,
0.04745128005743027,
-0.043693169951438904,
-0.0635574534535408,
0.0006497965077869594,
-0.039873115718364716,
0.011016213335096836,
-0.017603226006031036,
0.07111497223377228,
0.00896164309233427,
-0.017799392342567444,
-0.041876062750816345,
0.02339525707066059,
-0.044890809804201126,
0.015156326815485954,
-0.02944539673626423,
-0.03559878468513489,
-0.026513246819376945,
0.009715328924357891,
0.0024339945521205664,
-0.022176967933773994,
-0.04769906774163246,
-0.004163343925029039,
0.01735544018447399,
-0.046707917004823685,
-0.027112066745758057,
0.07272558659315109,
-0.0010505151003599167,
-0.03318285569548607,
-0.07483178377151489,
0.014330368489027023,
-0.007025803904980421,
0.012915915809571743,
-0.03419465571641922,
0.0007982108509168029,
0.03784951940178871,
-0.0053893751464784145,
-0.023581096902489662,
0.029115013778209686,
0.029424749314785004,
0.037271346896886826,
-0.0633096694946289,
-0.023911479860544205,
-0.034215305000543594,
0.020328886806964874,
-0.037188753485679626,
0.014722698368132114,
-0.005322265904396772,
-0.027008822187781334,
0.02316811867058277,
0.0001578515220899135,
0.0317787267267704,
-0.08230669796466827,
0.03869612514972687,
0.013390841893851757,
0.024923278018832207,
-0.023498501628637314,
-0.05963415652513504,
0.05348077043890953,
-0.0361563041806221,
0.018315615132451057,
-0.023766936734318733,
-0.017654849216341972,
0.03514450788497925,
-0.0318613238632679,
-0.010696154087781906,
-0.014320043846964836,
0.020029477775096893,
0.024407055228948593,
0.0038845830131322145,
-0.01914157345890999,
0.028970472514629364,
-0.037498485296964645,
-0.056371621787548065,
0.011718276888132095,
0.008517690002918243,
-0.003977503161877394,
0.0722300112247467,
-0.020029477775096893,
0.0830913633108139,
-0.023828884586691856,
0.059014689177274704,
0.015724172815680504,
0.04559287428855896,
-0.03972857445478439,
-0.006690258625894785,
-0.004359508864581585,
-0.03605306148529053,
-0.0241592675447464,
-0.05397634580731392,
-0.02030823938548565,
0.025563396513462067,
-0.017985232174396515,
0.022672543302178383,
-0.007887897081673145,
0.0015899689169600606,
0.046749215573072433,
0.0120796337723732,
0.011666654609143734,
-0.021619446575641632,
0.027979321777820587,
-0.0081873070448637,
-0.006452795583754778,
0.000021717691197409295,
0.0025746654719114304,
-0.05575215443968773,
-0.024097319692373276,
-0.02124776504933834,
-0.007361349184066057,
-0.0028960148338228464,
0.0230648722499609,
0.030601738020777702,
-0.05343947187066078,
0.05447192117571831
] |
52,248 |
osmnx.plot
|
plot_footprints
|
Visualize a GeoDataFrame of geospatial features' footprints.
Parameters
----------
gdf : geopandas.GeoDataFrame
GeoDataFrame of footprints (shapely Polygons and MultiPolygons)
ax : axis
if not None, plot on this preexisting axis
figsize : tuple
if ax is None, create new figure with size (width, height)
color : string
color of the footprints
edge_color : string
color of the edge of the footprints
edge_linewidth : float
width of the edge of the footprints
alpha : float
opacity of the footprints
bgcolor : string
background color of the plot
bbox : tuple
bounding box as (north, south, east, west). if None, will calculate
from the spatial extents of the geometries in gdf
save : bool
if True, save the figure to disk at filepath
show : bool
if True, call pyplot.show() to show the figure
close : bool
if True, call pyplot.close() to close the figure
filepath : string
if save is True, the path to the file. file format determined from
extension. if None, use settings.imgs_folder/image.png
dpi : int
if save is True, the resolution of saved file
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_footprints(
gdf,
ax=None,
figsize=(8, 8),
color="orange",
edge_color="none",
edge_linewidth=0,
alpha=None,
bgcolor="#111111",
bbox=None,
save=False,
show=True,
close=False,
filepath=None,
dpi=600,
):
"""
Visualize a GeoDataFrame of geospatial features' footprints.
Parameters
----------
gdf : geopandas.GeoDataFrame
GeoDataFrame of footprints (shapely Polygons and MultiPolygons)
ax : axis
if not None, plot on this preexisting axis
figsize : tuple
if ax is None, create new figure with size (width, height)
color : string
color of the footprints
edge_color : string
color of the edge of the footprints
edge_linewidth : float
width of the edge of the footprints
alpha : float
opacity of the footprints
bgcolor : string
background color of the plot
bbox : tuple
bounding box as (north, south, east, west). if None, will calculate
from the spatial extents of the geometries in gdf
save : bool
if True, save the figure to disk at filepath
show : bool
if True, call pyplot.show() to show the figure
close : bool
if True, call pyplot.close() to close the figure
filepath : string
if save is True, the path to the file. file format determined from
extension. if None, use settings.imgs_folder/image.png
dpi : int
if save is True, the resolution of saved file
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
if ax is None:
fig, ax = plt.subplots(figsize=figsize, facecolor=bgcolor, frameon=False)
ax.set_facecolor(bgcolor)
else:
fig = ax.figure
# retain only Polygons and MultiPolygons, then plot
gdf = gdf[gdf["geometry"].type.isin({"Polygon", "MultiPolygon"})]
ax = gdf.plot(
ax=ax, facecolor=color, edgecolor=edge_color, linewidth=edge_linewidth, alpha=alpha
)
# determine figure extents
if bbox is None:
west, south, east, north = gdf.total_bounds
else:
north, south, east, west = bbox
# configure axis appearance, save/show figure as specified, and return
ax = _config_ax(ax, gdf.crs, (north, south, east, west), 0)
fig, ax = _save_and_show(fig, ax, save, show, close, filepath, dpi)
return fig, ax
|
(gdf, ax=None, figsize=(8, 8), color='orange', edge_color='none', edge_linewidth=0, alpha=None, bgcolor='#111111', bbox=None, save=False, show=True, close=False, filepath=None, dpi=600)
|
[
0.057545118033885956,
-0.012705639004707336,
-0.02781219221651554,
-0.01651829108595848,
-0.0499006062746048,
-0.020667072385549545,
-0.019898779690265656,
0.028810974210500717,
-0.04917072877287865,
-0.04394633695483208,
0.019034449011087418,
-0.02704389952123165,
-0.029809754341840744,
0.010688871145248413,
-0.02101280353963375,
-0.0015677971532568336,
-0.04736524075269699,
-0.015538718551397324,
0.04609755799174309,
-0.02475822903215885,
0.023471340537071228,
-0.060733530670404434,
0.03222987428307533,
0.011649237014353275,
0.009690091013908386,
-0.02181951142847538,
0.01502012088894844,
0.04313962906599045,
0.029886582866311073,
0.06081036105751991,
0.0023637001868337393,
-0.09526828676462173,
-0.02187713235616684,
0.01910167559981346,
0.015096950344741344,
0.03937499597668648,
0.0202829260379076,
0.030539631843566895,
0.031077437102794647,
0.03902926668524742,
0.043370120227336884,
0.0226646326482296,
0.025392070412635803,
-0.05789084732532501,
0.017785973846912384,
0.013397102244198322,
-0.06253901869058609,
0.03100060671567917,
-0.008105487562716007,
0.01722896285355091,
-0.036589935421943665,
-0.06200121343135834,
-0.05416462942957878,
0.0225685965269804,
0.031960971653461456,
-0.015135364606976509,
0.01012225542217493,
0.051514022052288055,
0.05781402066349983,
-0.007039481308311224,
-0.022472558543086052,
0.011898932047188282,
0.0012760860845446587,
-0.02112804725766182,
0.025795424357056618,
0.02700548619031906,
0.02099359594285488,
-0.07890365272760391,
-0.009517224505543709,
0.021320119500160217,
-0.015058535151183605,
0.06188597157597542,
0.012696035206317902,
-0.0011542396387085319,
-0.05431829020380974,
0.0009651675936765969,
-0.0029171111527830362,
-0.026890242472290993,
-0.02700548619031906,
-0.0021020006388425827,
0.011418749578297138,
0.008993825875222683,
-0.02107042446732521,
-0.0051187495701014996,
0.0829756036400795,
0.035053350031375885,
0.09042803943157196,
0.022837499156594276,
-0.004196798428893089,
0.01957225427031517,
0.0249503031373024,
-0.014664785005152225,
0.05178292468190193,
-0.043408531695604324,
-0.025219205766916275,
-0.1125548705458641,
-0.04448414221405983,
0.05746828764677048,
-0.023682620376348495,
0.016710365191102028,
0.01210060901939869,
-0.08120852708816528,
0.01205259095877409,
0.06376828998327255,
0.0036613945849239826,
-0.00033042585710063577,
-0.018573474138975143,
-0.008115090429782867,
-0.029656095430254936,
0.00865289568901062,
-0.027351217344403267,
-0.028849387541413307,
0.047019507735967636,
-0.01698886975646019,
0.038798779249191284,
0.01732499897480011,
-0.030482009053230286,
-0.03758871555328369,
0.02414359524846077,
-0.09780365228652954,
-0.016172559931874275,
-0.008576066233217716,
-0.007673322688788176,
-0.014443901367485523,
-0.0023264861665666103,
0.023932315409183502,
0.007020273711532354,
0.018611889332532883,
-0.07156645506620407,
-0.034208230674266815,
0.029099082574248314,
0.045713409781455994,
-0.007029877509921789,
-0.006972255650907755,
0.035130180418491364,
-0.019226523116230965,
0.030309144407510757,
-0.03236432746052742,
-0.04913231357932091,
-0.031269509345293045,
-0.02629481442272663,
-0.03768475353717804,
-0.046174388378858566,
-0.01550990715622902,
-0.04732682555913925,
0.07398658245801926,
-0.03676280379295349,
-0.05197499692440033,
0.0006500476156361401,
-0.04425365477800369,
0.024604571983218193,
0.023682620376348495,
-0.04413841292262077,
-0.047019507735967636,
0.006977057550102472,
-0.06561218947172165,
-0.008067072369158268,
0.054587189108133316,
0.00693864282220602,
0.07137438654899597,
0.014635974541306496,
-0.004076752811670303,
0.020878352224826813,
-0.008796950802206993,
-0.048748165369033813,
-0.010131859220564365,
0.021704265847802162,
-0.03674359619617462,
0.005963871721178293,
0.03851066902279854,
0.01203338336199522,
0.05412621423602104,
-0.005512499716132879,
0.029656095430254936,
0.021416157484054565,
0.06880060583353043,
0.03100060671567917,
0.018179723992943764,
0.009017834439873695,
0.010266310535371304,
-0.011092225089669228,
-0.007750151678919792,
-0.019975608214735985,
0.08213048428297043,
0.010237499140202999,
0.028849387541413307,
-0.01017027348279953,
0.020897559821605682,
0.0316152423620224,
0.02871493622660637,
-0.031269509345293045,
-0.0012076599523425102,
0.006597713101655245,
-0.021627437323331833,
0.006189557258039713,
-0.02341371774673462,
0.017469054087996483,
-0.019322559237480164,
-0.006818597204983234,
0.023029571399092674,
0.0096660815179348,
-0.030270729213953018,
-0.017449846491217613,
-0.06776341050863266,
-0.002645807806402445,
0.008528048172593117,
-0.003382888389751315,
-0.03090457059442997,
-0.03753109648823738,
0.019380182027816772,
0.039490241557359695,
-0.03630182519555092,
-0.037223778665065765,
0.020628657191991806,
0.0056517524644732475,
-0.0294256079941988,
-0.0067849843762815,
-0.006189557258039713,
-0.047710973769426346,
0.02794664353132248,
-0.013425913639366627,
0.019130486994981766,
-0.02178109623491764,
0.027255181223154068,
0.03620579093694687,
-0.01653749868273735,
0.08374389261007309,
0.0559317022562027,
0.0615786537528038,
-0.10640852898359299,
-0.0023637001868337393,
-0.008311965502798557,
0.007870197296142578,
0.00825914554297924,
0.03547591343522072,
-0.034304264932870865,
0.001810289453715086,
0.002071989234536886,
-0.0006740567041561007,
0.01854466274380684,
0.03762713074684143,
-0.008331173099577427,
-0.008528048172593117,
0.037185363471508026,
-0.006280792411416769,
-0.0004996903007850051,
-0.052435971796512604,
0.017574694007635117,
0.04287073016166687,
-0.027562497183680534,
-0.03816493600606918,
-0.004288033116608858,
0.038068898022174835,
0.009305944666266441,
0.006957849953323603,
-0.04828719049692154,
-0.06791707128286362,
-0.040949996560811996,
0.03816493600606918,
0.014828047715127468,
0.044829875230789185,
-0.005930258892476559,
-0.004021531902253628,
0.051667679101228714,
0.08497316390275955,
-0.04010487347841263,
0.01206219382584095,
-0.07172011584043503,
-0.014357468113303185,
-0.004926676396280527,
-0.0241243876516819,
0.01198536530137062,
0.020647864788770676,
0.012379114516079426,
-0.0015545921633020043,
-0.0050947405397892,
0.042640239000320435,
-0.04897865653038025,
0.04525243490934372,
0.012619206681847572,
-0.0026890242006629705,
-0.11678048223257065,
-0.01394451130181551,
0.04121889919042587,
-0.022875912487506866,
0.005627743434160948,
0.0018799160607159138,
0.08389755338430405,
0.03524542227387428,
-0.03851066902279854,
0.015298627316951752,
-0.015231401659548283,
0.016710365191102028,
0.013589175418019295,
0.00031602036324329674,
0.026794204488396645,
0.004525723867118359,
-0.02946402132511139,
-0.030558839440345764,
-0.042601827532052994,
0.059235360473394394,
-0.003344473894685507,
0.105256088078022,
0.0240283515304327,
0.05170609429478645,
0.02792743593454361,
0.014511127024888992,
-0.030001826584339142,
0.03772316873073578,
0.020916767418384552,
0.024316461756825447,
-0.006583307404071093,
-0.03899085149168968,
0.039605483412742615,
0.0011710460530593991,
0.002979534910991788,
-0.01433826144784689,
-0.06184755638241768,
-0.053127434104681015,
-0.006890624295920134,
-0.037242986261844635,
-0.011514785699546337,
0.013108992949128151,
-0.028234753757715225,
0.09542194753885269,
0.003128391457721591,
-0.04313962906599045,
0.03449633717536926,
0.06111767888069153,
0.009901370853185654,
-0.007332392502576113,
0.020551826804876328,
0.023509753867983818,
0.023586584255099297,
0.01917850412428379,
-0.03829938545823097,
0.004655373282730579,
-0.017670730128884315,
-0.05927377566695213,
-0.06860852986574173,
-0.00023093796335160732,
-0.011322712525725365,
0.005219588056206703,
0.046289630234241486,
-0.02178109623491764,
0.023913107812404633,
-0.028138717636466026,
-0.07817377150058746,
-0.011678047478199005,
0.018573474138975143,
0.024585364386439323,
0.04663536325097084,
-0.05020792409777641,
0.006511279847472906,
0.0009267529821954668,
0.05189816653728485,
0.008345578797161579,
0.013301066122949123,
-0.03213384002447128,
0.06737926602363586,
0.03541829064488411,
-0.021608229726552963,
-0.017392223700881004,
0.016172559931874275,
-0.02331768162548542,
0.011073017492890358,
0.0020215699914842844,
-0.002929115667939186,
-0.007889404892921448,
-0.00432644784450531,
0.0124271335080266,
0.012244664132595062,
0.005935060326009989,
-0.015212194062769413,
0.030385972931981087,
-0.014405487105250359,
0.007293978240340948,
0.019975608214735985,
-0.04141097143292427,
0.026621339842677116,
-0.03712774068117142,
-0.040949996560811996,
0.05562438443303108,
-0.0016494282754138112,
-0.013982925564050674,
-0.060541458427906036,
-0.040335360914468765,
0.008187117986381054,
0.004244816955178976,
-0.02324085123836994,
-0.049977436661720276,
-0.02041737735271454,
0.025468900799751282,
0.05804450809955597,
0.018640698865056038,
-0.02550731599330902,
0.00793262105435133,
0.018419815227389336,
-0.026198778301477432,
0.04052743688225746,
0.053857311606407166,
-0.02112804725766182,
0.02927194908261299,
0.01464557833969593,
0.018592681735754013,
-0.01805487647652626,
-0.010074237361550331,
-0.03708932548761368,
0.026698168367147446,
0.04313962906599045,
0.06776341050863266,
-0.0063288104720413685,
-0.07018353044986725,
0.029636887833476067,
-0.0006314404890872538,
0.02180030383169651,
-0.03259481489658356,
0.006160746328532696,
0.03975914418697357,
0.007822179235517979,
0.04279389977455139,
0.01888079196214676,
0.012619206681847572,
0.053857311606407166,
-0.01740182749927044,
-0.017882009968161583,
-0.018640698865056038,
0.03259481489658356,
0.00641524326056242,
0.03749268129467964,
0.007889404892921448,
-0.05474084988236427,
-0.018515851348638535,
0.07241158187389374,
0.0068233986385166645,
-0.02191554754972458,
-0.011073017492890358,
-0.04375426471233368,
-0.009281935170292854,
0.017257772386074066,
0.028868595138192177,
-0.028081094846129417,
-0.014030943624675274,
-0.09111950546503067,
0.04214084893465042,
0.02026371844112873,
-0.0055701215751469135,
-0.0072987801395356655,
0.05892804265022278,
0.028484448790550232,
0.060695115476846695,
0.0042472174391150475,
0.00812949612736702,
0.01795884035527706,
-0.04237133637070656,
-0.08796950429677963,
0.07283414155244827,
-0.038011278957128525,
-0.024374082684516907,
0.04675060510635376,
-0.01350274309515953,
-0.010266310535371304,
0.01429984625428915,
-0.011044206097722054,
0.05512499436736107,
-0.01852545514702797,
0.04068109393119812,
-0.02030213177204132,
-0.05331950634717941,
-0.011140243150293827,
0.06949206441640854,
-0.04436890035867691,
-0.02180030383169651,
-0.03182652220129967,
0.0659579187631607,
0.07848109304904938,
-0.015279419720172882,
0.04048902168869972,
0.012167834676802158,
-0.03835700824856758,
-0.006309603340923786,
0.04621279984712601,
0.010736889205873013,
-0.008163109421730042,
0.01925533451139927,
0.04717316851019859,
0.025929875671863556,
0.017449846491217613,
0.006688947789371014,
-0.05185975134372711,
-0.027139937505126,
-0.024585364386439323,
-0.04774938523769379,
-0.024412497878074646,
0.07037560641765594,
0.043408531695604324,
0.05508658289909363,
0.014050151221454144,
-0.007702133618295193,
-0.04755731299519539,
0.026563717052340508,
-0.023778656497597694,
0.023817071691155434,
0.002026371890679002,
0.025046339258551598,
-0.07790487259626389,
-0.005786203779280186,
0.04425365477800369,
-0.043216459453105927,
0.005550913978368044,
-0.025046339258551598,
-0.055393896996974945,
0.019207315519452095,
0.003697408363223076,
-0.009824542328715324,
0.059811580926179886,
-0.024335669353604317,
-0.035667985677719116,
-0.01874634064733982,
0.014174998737871647,
-0.0158076211810112,
0.031423170119524,
0.01959146186709404,
-0.002528162905946374,
-0.029809754341840744,
0.01803566887974739,
0.06111767888069153,
0.07575365155935287,
0.03664755821228027,
-0.02024451084434986,
-0.010621645487844944,
0.005133155267685652,
0.011197865009307861,
-0.010765700601041317,
-0.009137880057096481,
-0.03484207019209862,
-0.07867316156625748,
-0.0202829260379076,
0.045559752732515335,
-0.08366706967353821,
0.006146341096609831,
0.01681600511074066,
-0.006789786275476217,
-0.061386581510305405,
-0.03612896054983139,
0.007001066580414772,
0.03991280123591423,
-0.043216459453105927,
0.11931584775447845,
-0.022107619792222977,
0.06115609407424927,
0.03666676580905914,
0.027370424941182137,
0.012523169629275799,
-0.043446946889162064,
0.10287438333034515,
-0.0004486708785407245,
0.047864630818367004,
-0.02775457128882408,
-0.03908688575029373,
-0.00046727797598578036,
0.06503596901893616,
0.05251280218362808,
0.016547102481126785,
0.011447560042142868,
0.006261584814637899,
0.025987498462200165,
0.01659512147307396,
-0.014261431992053986,
-0.024642985314130783,
-0.011236279271543026,
-0.012283078394830227,
-0.011610821820795536,
-0.0513603612780571,
0.02927194908261299,
-0.02026371844112873,
-0.01397332176566124,
0.02410518191754818,
0.011764480732381344,
-0.03367042541503906,
-0.04502194747328758,
-0.006280792411416769,
0.05059206858277321,
-0.020571034401655197,
-0.010804114863276482,
0.02639085240662098,
0.02105121873319149,
0.013742834329605103,
0.02625640109181404,
-0.015634754672646523,
0.0005236994475126266,
-0.014453505165874958,
0.047826215624809265,
-0.06956889480352402,
-0.03313262015581131,
0.02717835083603859,
-0.02865731529891491,
-0.02345213294029236,
0.005483688786625862,
0.026928655803203583,
-0.016864022240042686,
0.07026036083698273,
-0.01895762048661709,
-0.052435971796512604,
-0.022107619792222977,
0.018794357776641846,
0.06330731511116028,
0.04287073016166687,
-0.06077194586396217,
-0.07690609246492386,
0.011178657412528992,
0.08320609480142593,
0.02345213294029236,
-0.04356219246983528,
-0.052282314747571945,
-0.08174633234739304,
-0.011024999432265759,
0.04144938662648201,
-0.03772316873073578,
0.03363201022148132,
-0.010660059750080109,
0.006031096912920475,
0.03518780320882797,
0.038837190717458725,
0.01586524210870266,
-0.043254874646663666,
0.031960971653461456,
-0.03920213133096695,
-0.008249541744589806,
0.04955487325787544,
-0.017104115337133408,
-0.0058390237390995026,
-0.04440731182694435,
-0.03968231379985809,
-0.015144968405365944,
-0.06200121343135834,
-0.04275548458099365,
-0.04210243746638298,
-0.02873414382338524,
0.015385059639811516,
-0.015327437780797482,
0.026871034875512123,
0.006775380577892065,
-0.016787193715572357,
0.06346096843481064,
0.027562497183680534,
0.004023932386189699,
-0.035783227533102036,
0.06561218947172165,
-0.028887802734971046,
0.003884679637849331,
0.01917850412428379,
0.0065544964745640755,
-0.03776158392429352,
-0.023567376658320427,
0.08712438493967056,
-0.031327132135629654,
-0.017075303941965103,
0.0248542670160532,
0.0026794206351041794,
0.048517677932977676,
-0.10502560436725616,
0.023548169061541557,
-0.009238719008862972,
-0.02114725485444069,
-0.047979872673749924,
-0.013762041926383972,
0.01970670558512211,
-0.014107773080468178,
-0.0007790967356413603,
0.0007923017838038504,
0.03635944798588753,
-0.01657591387629509,
-0.02569938823580742,
-0.050131093710660934,
-0.039490241557359695,
-0.028791766613721848,
0.04471462965011597,
-0.0071931397542357445,
0.00599268265068531,
0.033439937978982925,
0.020110059529542923,
-0.049977436661720276,
0.028196338564157486,
-0.016009297221899033,
0.00942118838429451,
0.03194176405668259,
-0.007164328824728727,
0.019034449011087418,
0.03440030291676521,
-0.016806401312351227,
0.0008871378959156573,
0.020071644335985184,
0.005320426542311907,
0.0407579243183136,
-0.012811279855668545,
-0.02349054627120495,
-0.03607133775949478,
0.06511279940605164,
-0.011735670268535614,
-0.02118566818535328,
0.03975914418697357,
0.028273168951272964,
0.10410364717245102,
0.009502819739282131,
-0.02569938823580742,
-0.05212865397334099,
0.02475822903215885,
-0.01201417576521635,
-0.04164145886898041,
-0.06557377427816391,
0.018736736848950386,
0.04536768049001694,
-0.044753044843673706,
-0.026794204488396645,
-0.04840243607759476,
-0.024431705474853516,
0.012619206681847572,
0.006002285983413458,
-0.0588512159883976,
0.03386249765753746,
0.04375426471233368,
0.014616766944527626,
0.01927454210817814,
0.02566097304224968,
-0.01797804795205593,
-0.038030486553907394,
-0.005440472159534693,
-0.01724816858768463,
0.0012664824025705457,
0.04275548458099365,
0.0124271335080266,
-0.020628657191991806,
-0.0029435211326926947,
-0.038126520812511444,
0.018592681735754013,
-0.040296949446201324,
-0.02099359594285488,
-0.008739328943192959,
-0.013272254727780819,
-0.015990089625120163,
-0.01322423666715622,
-0.009661279618740082,
-0.014443901367485523,
0.012628809548914433,
0.006151142995804548,
-0.004021531902253628,
0.0318073146045208,
-0.01700807735323906,
0.07083658128976822,
0.014597560279071331,
0.0047274003736674786,
-0.062116459012031555,
0.026967070996761322,
-0.04164145886898041,
0.030289936810731888,
0.03562957048416138,
-0.062270116060972214,
0.011380334384739399,
-0.06200121343135834,
-0.05039999634027481,
0.005373246502131224,
-0.029905790463089943,
-0.026544509455561638,
0.059888411313295364,
0.025872254744172096,
-0.06918475031852722,
0.02249176613986492
] |
52,249 |
osmnx.plot
|
plot_graph
|
Visualize a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
ax : matplotlib axis
if not None, plot on this preexisting axis
figsize : tuple
if ax is None, create new figure with size (width, height)
bgcolor : string
background color of plot
node_color : string or list
color(s) of the nodes
node_size : int
size of the nodes: if 0, then skip plotting the nodes
node_alpha : float
opacity of the nodes, note: if you passed RGBA values to node_color,
set node_alpha=None to use the alpha channel in node_color
node_edgecolor : string
color of the nodes' markers' borders
node_zorder : int
zorder to plot nodes: edges are always 1, so set node_zorder=0 to plot
nodes below edges
edge_color : string or list
color(s) of the edges' lines
edge_linewidth : float
width of the edges' lines: if 0, then skip plotting the edges
edge_alpha : float
opacity of the edges, note: if you passed RGBA values to edge_color,
set edge_alpha=None to use the alpha channel in edge_color
show : bool
if True, call pyplot.show() to show the figure
close : bool
if True, call pyplot.close() to close the figure
save : bool
if True, save the figure to disk at filepath
filepath : string
if save is True, the path to the file. file format determined from
extension. if None, use settings.imgs_folder/image.png
dpi : int
if save is True, the resolution of saved file
bbox : tuple
bounding box as (north, south, east, west). if None, will calculate
from spatial extents of plotted geometries.
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_graph(
G,
ax=None,
figsize=(8, 8),
bgcolor="#111111",
node_color="w",
node_size=15,
node_alpha=None,
node_edgecolor="none",
node_zorder=1,
edge_color="#999999",
edge_linewidth=1,
edge_alpha=None,
show=True,
close=False,
save=False,
filepath=None,
dpi=300,
bbox=None,
):
"""
Visualize a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
ax : matplotlib axis
if not None, plot on this preexisting axis
figsize : tuple
if ax is None, create new figure with size (width, height)
bgcolor : string
background color of plot
node_color : string or list
color(s) of the nodes
node_size : int
size of the nodes: if 0, then skip plotting the nodes
node_alpha : float
opacity of the nodes, note: if you passed RGBA values to node_color,
set node_alpha=None to use the alpha channel in node_color
node_edgecolor : string
color of the nodes' markers' borders
node_zorder : int
zorder to plot nodes: edges are always 1, so set node_zorder=0 to plot
nodes below edges
edge_color : string or list
color(s) of the edges' lines
edge_linewidth : float
width of the edges' lines: if 0, then skip plotting the edges
edge_alpha : float
opacity of the edges, note: if you passed RGBA values to edge_color,
set edge_alpha=None to use the alpha channel in edge_color
show : bool
if True, call pyplot.show() to show the figure
close : bool
if True, call pyplot.close() to close the figure
save : bool
if True, save the figure to disk at filepath
filepath : string
if save is True, the path to the file. file format determined from
extension. if None, use settings.imgs_folder/image.png
dpi : int
if save is True, the resolution of saved file
bbox : tuple
bounding box as (north, south, east, west). if None, will calculate
from spatial extents of plotted geometries.
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
max_node_size = max(node_size) if hasattr(node_size, "__iter__") else node_size
max_edge_lw = max(edge_linewidth) if hasattr(edge_linewidth, "__iter__") else edge_linewidth
if max_node_size <= 0 and max_edge_lw <= 0: # pragma: no cover
msg = "Either node_size or edge_linewidth must be > 0 to plot something."
raise ValueError(msg)
# create fig, ax as needed
utils.log("Begin plotting the graph...")
if ax is None:
fig, ax = plt.subplots(figsize=figsize, facecolor=bgcolor, frameon=False)
ax.set_facecolor(bgcolor)
else:
fig = ax.figure
if max_edge_lw > 0:
# plot the edges' geometries
gdf_edges = convert.graph_to_gdfs(G, nodes=False)["geometry"]
ax = gdf_edges.plot(ax=ax, color=edge_color, lw=edge_linewidth, alpha=edge_alpha, zorder=1)
if max_node_size > 0:
# scatter plot the nodes' x/y coordinates
gdf_nodes = convert.graph_to_gdfs(G, edges=False, node_geometry=False)[["x", "y"]]
ax.scatter(
x=gdf_nodes["x"],
y=gdf_nodes["y"],
s=node_size,
c=node_color,
alpha=node_alpha,
edgecolor=node_edgecolor,
zorder=node_zorder,
)
# get spatial extents from bbox parameter or the edges' geometries
padding = 0
if bbox is None:
try:
west, south, east, north = gdf_edges.total_bounds
except NameError:
west, south = gdf_nodes.min()
east, north = gdf_nodes.max()
bbox = north, south, east, west
padding = 0.02 # pad 2% to not cut off peripheral nodes' circles
# configure axis appearance, save/show figure as specified, and return
ax = _config_ax(ax, G.graph["crs"], bbox, padding)
fig, ax = _save_and_show(fig, ax, save, show, close, filepath, dpi)
utils.log("Finished plotting the graph")
return fig, ax
|
(G, ax=None, figsize=(8, 8), bgcolor='#111111', node_color='w', node_size=15, node_alpha=None, node_edgecolor='none', node_zorder=1, edge_color='#999999', edge_linewidth=1, edge_alpha=None, show=True, close=False, save=False, filepath=None, dpi=300, bbox=None)
|
[
0.04084209352731705,
0.009577701799571514,
-0.008839409798383713,
0.025835184380412102,
-0.052192699164152145,
0.025051690638065338,
-0.055487386882305145,
-0.011852845549583435,
0.04451848194003105,
-0.0648491233587265,
0.011732308194041252,
-0.0015745199052616954,
0.004826518706977367,
0.04100281000137329,
-0.007207132410258055,
0.015388608910143375,
-0.03352949023246765,
0.008849455043673515,
0.05267484858632088,
0.03230402618646622,
-0.026257066056132317,
-0.07943414896726608,
0.02143556997179985,
-0.016292639076709747,
0.023504795506596565,
-0.024669989943504333,
0.014072742313146591,
0.04158540442585945,
-0.0012656428152695298,
0.07750555127859116,
-0.02513204887509346,
-0.09514419734477997,
-0.05914368852972984,
-0.0015368519816547632,
0.02923032082617283,
0.054282013326883316,
0.012083875015377998,
0.030435696244239807,
-0.05821956694126129,
-0.0029054537881165743,
-0.0016963129164651036,
-0.022440047934651375,
0.04084209352731705,
-0.034935757517814636,
0.005610011983662844,
0.025373123586177826,
0.026538319885730743,
0.08027791231870651,
-0.03839116543531418,
-0.06400536745786667,
0.001750303665176034,
-0.05661240220069885,
-0.06738041341304779,
0.04729084298014641,
0.017206715419888496,
0.019245807081460953,
0.02673921547830105,
0.04849621653556824,
0.040179137140512466,
-0.03815009072422981,
-0.0028100283816456795,
-0.02300255559384823,
0.0001509856665506959,
-0.043875616043806076,
-0.03316787630319595,
0.024207929149270058,
-0.009698239155113697,
-0.06432680040597916,
-0.055929359048604965,
0.011973382905125618,
-0.01203365158289671,
0.014896415174007416,
0.020069478079676628,
-0.021315032616257668,
0.03624157980084419,
-0.007166953291743994,
0.005323735531419516,
0.007779685314744711,
-0.0981978103518486,
0.006835475564002991,
0.05315699800848961,
0.03322814404964447,
0.009793664328753948,
-0.0038747754879295826,
0.07967522740364075,
-0.014534802176058292,
0.01747792400419712,
0.06368393450975418,
-0.012314905412495136,
-0.07634036242961884,
0.026176707819104195,
-0.02055162750184536,
0.027643246576189995,
0.032585278153419495,
-0.017648685723543167,
-0.036221493035554886,
-0.02286192774772644,
-0.04901854693889618,
0.0025890429969877005,
-0.00754865538328886,
-0.061353541910648346,
-0.003917465917766094,
-0.031058471649885178,
-0.009241200983524323,
-0.02963211201131344,
-0.06898757815361023,
-0.07879128307104111,
0.034975938498973846,
-0.010366217233240604,
-0.012465576641261578,
-0.020973509177565575,
0.00952747743576765,
0.04917926341295242,
0.005092705599963665,
0.05733562633395195,
0.050464995205402374,
-0.0029431218281388283,
-0.013048174791038036,
0.014173190109431744,
-0.0871887281537056,
-0.05701419338583946,
0.035076387226581573,
-0.011631859466433525,
-0.004058092832565308,
-0.007839953526854515,
-0.008819320239126682,
0.045121170580387115,
0.01509731076657772,
-0.034714773297309875,
-0.07055456191301346,
0.04620600491762161,
0.020049389451742172,
-0.00469844788312912,
0.02766333520412445,
0.016553804278373718,
-0.03879295662045479,
-0.08421546965837479,
0.025835184380412102,
-0.02975265122950077,
0.020672164857387543,
-0.010145232081413269,
-0.04560332000255585,
-0.028225842863321304,
0.027743693441152573,
-0.046728335320949554,
0.0008023271220736206,
-0.008839409798383713,
-0.0534784309566021,
-0.03099820390343666,
-0.032444652169942856,
0.020290464162826538,
-0.017598461359739304,
-0.02103377692401409,
-0.012927637435495853,
-0.012696607038378716,
-0.02673921547830105,
-0.029190141707658768,
0.049661412835121155,
-0.022158794105052948,
0.05681329965591431,
-0.04556313902139664,
-0.04520152881741524,
0.07449211925268173,
0.026759304106235504,
-0.018120789900422096,
0.01483614556491375,
0.04435776546597481,
-0.028547275811433792,
-0.03535763919353485,
0.028848620131611824,
-0.006654669530689716,
-0.020461225882172585,
-0.11057298630475998,
0.00046111835399642587,
-0.004399615339934826,
0.035960327833890915,
0.054683804512023926,
0.00912066362798214,
-0.00225254287943244,
0.02117440477013588,
-0.017939984798431396,
-0.02077261358499527,
0.03451387956738472,
0.04122379422187805,
-0.0077595957554876804,
0.012003516778349876,
0.021254763007164,
-0.0054794298484921455,
0.014675429090857506,
-0.033871009945869446,
-0.002207341371104121,
0.03348930925130844,
-0.01627255044877529,
0.033107608556747437,
0.045040812343358994,
-0.019336208701133728,
0.03594023734331131,
-0.014544847421348095,
0.009150798432528973,
0.05114804208278656,
0.06063031777739525,
-0.0012474366230890155,
0.039395641535520554,
-0.04122379422187805,
0.006524087395519018,
-0.010908635333180428,
0.019436657428741455,
-0.003646256634965539,
-0.01890428364276886,
0.04190683737397194,
-0.012274726293981075,
-0.03389110043644905,
0.060429420322179794,
0.03879295662045479,
-0.051268577575683594,
0.0032570213079452515,
-0.05432219058275223,
0.017648685723543167,
-0.057938314974308014,
-0.017678819596767426,
-0.04021931439638138,
0.01505713164806366,
-0.02623697556555271,
-0.003503118408843875,
0.034353163093328476,
-0.06034906208515167,
0.04451848194003105,
-0.001185284461826086,
0.08260830491781235,
-0.0762198194861412,
0.08341188728809357,
0.04785335063934326,
0.024388736113905907,
0.04560332000255585,
0.014153100550174713,
-0.04096262902021408,
0.01952706091105938,
0.017538193613290787,
-0.028768261894583702,
0.039395641535520554,
-0.023323988541960716,
-0.04608546942472458,
-0.04556313902139664,
0.024750348180532455,
0.0531168170273304,
0.01441426482051611,
0.009130708873271942,
0.020159881561994553,
0.027643246576189995,
-0.014755787327885628,
-0.051710549741983414,
-0.026799483224749565,
0.004821496549993753,
0.0029255433473736048,
-0.011250157840549946,
0.005604989361017942,
-0.112099789083004,
-0.036402296274900436,
0.029471395537257195,
0.010034739039838314,
0.03519692271947861,
0.04789353162050247,
-0.03513665497303009,
0.05600971728563309,
0.0791528970003128,
-0.019466791301965714,
0.00007227536116261035,
0.014504668302834034,
-0.06802327930927277,
-0.010054828599095345,
0.015308250673115253,
0.05142929404973984,
0.014223414473235607,
0.01605156436562538,
0.03879295662045479,
-0.011953293345868587,
-0.04447830468416214,
-0.009557612240314484,
0.03491567075252533,
-0.003199263708665967,
-0.05183108523488045,
-0.028547275811433792,
-0.04226845130324364,
0.0381099097430706,
-0.036321938037872314,
-0.00469844788312912,
0.011109530925750732,
0.02424810826778412,
-0.008000670932233334,
-0.04170594364404678,
0.02205834537744522,
-0.02157619595527649,
0.002389403060078621,
0.015910938382148743,
-0.039917971938848495,
-0.008673670701682568,
-0.002912987256422639,
0.004527686629444361,
-0.028848620131611824,
-0.0014125477755442262,
0.08614406734704971,
-0.055929359048604965,
0.06324195861816406,
-0.013389697298407555,
0.04451848194003105,
0.04271042346954346,
0.03686435893177986,
-0.004839074797928333,
0.024268198758363724,
0.017819447442889214,
-0.061674974858760834,
0.03190223500132561,
0.014906459487974644,
0.03792910277843475,
-0.05110786110162735,
0.03212321922183037,
0.0227213017642498,
-0.051389116793870926,
0.03011426329612732,
-0.012525845319032669,
-0.015941072255373,
0.015107355080544949,
-0.05846064165234566,
-0.0029782785568386316,
-0.03469468280673027,
0.030877666547894478,
-0.009969447739422321,
0.11635877937078476,
0.03624157980084419,
0.01799020729959011,
-0.027542797848582268,
0.024027124047279358,
-0.0029406105168163776,
-0.007011259440332651,
-0.03190223500132561,
0.028748171404004097,
0.025734737515449524,
-0.030877666547894478,
0.04100281000137329,
-0.022078435868024826,
0.013520278967916965,
0.007121752016246319,
0.0003399531706236303,
0.025152139365673065,
-0.01952706091105938,
0.03975725546479225,
0.02593563310801983,
-0.05998745188117027,
-0.0553266704082489,
-0.00914075318723917,
-0.003357469104230404,
0.10157285630702972,
-0.0662955716252327,
0.0020491359755396843,
-0.03768802806735039,
0.038190267980098724,
-0.0002531599602662027,
-0.0003631817235145718,
-0.0125459348782897,
0.061715152114629745,
-0.03979743272066116,
-0.012505755759775639,
0.0024597165174782276,
0.019768135622143745,
-0.014253548346459866,
-0.0036186333745718002,
0.0058862436562776566,
0.022098524495959282,
0.07855021208524704,
-0.06488930433988571,
0.030254889279603958,
-0.036221493035554886,
-0.05556774511933327,
-0.03547817841172218,
0.007357804104685783,
0.04435776546597481,
-0.03417235612869263,
0.004397104028612375,
0.013982339762151241,
0.00228142156265676,
0.01130038220435381,
-0.049219440668821335,
0.025815095752477646,
0.0011501277331262827,
0.019717911258339882,
-0.056732941418886185,
0.0626392737030983,
0.048054248094558716,
0.016614072024822235,
-0.017086178064346313,
-0.038270626217126846,
-0.03121918812394142,
0.03732641786336899,
0.05227305740118027,
-0.014886369928717613,
-0.020421046763658524,
0.05251413211226463,
0.055447209626436234,
-0.025855274870991707,
-0.008076006546616554,
-0.025332944467663765,
0.016935504972934723,
0.008879588916897774,
0.045924752950668335,
0.04271042346954346,
-0.01058720238506794,
0.005419161170721054,
-0.011230068281292915,
0.05926422402262688,
0.04600511118769646,
0.07264387607574463,
-0.009924246929585934,
-0.028888799250125885,
0.022580673918128014,
0.05408111587166786,
0.03272590786218643,
-0.034674596041440964,
0.03417235612869263,
0.07332692295312881,
-0.036221493035554886,
-0.004497551824897528,
0.006910811644047499,
0.0454426035284996,
0.005906333215534687,
0.014615160413086414,
-0.0004240782291162759,
-0.04978194832801819,
0.01728707365691662,
-0.06199640780687332,
0.041384510695934296,
0.009095552377402782,
-0.007317624986171722,
0.004974679090082645,
0.03624157980084419,
0.003317289985716343,
-0.008613402023911476,
-0.002389403060078621,
-0.04696941003203392,
-0.0007313858368434012,
-0.007905244827270508,
0.00752856582403183,
-0.035518355667591095,
-0.028266021981835365,
-0.09072449058294296,
0.011491232551634312,
-0.0027874275110661983,
-0.015348429791629314,
0.03545808792114258,
0.004844096954911947,
0.016212280839681625,
0.00490938825532794,
0.009366760961711407,
0.02832629159092903,
-0.004703470040112734,
-0.09112627804279327,
-0.03616122156381607,
0.026980290189385414,
-0.00452517531812191,
-0.05154983326792717,
0.03429289162158966,
-0.00800569262355566,
-0.0465274378657341,
-0.035257190465927124,
-0.012355084531009197,
0.021274853497743607,
-0.018231283873319626,
0.07630018144845963,
-0.0007056460599415004,
-0.0663357526063919,
-0.0054844520054757595,
0.048014067113399506,
-0.050063204020261765,
-0.03780856728553772,
-0.053759682923555374,
0.0329669825732708,
0.035960327833890915,
-0.021375300362706184,
-0.0023065335117280483,
-0.020672164857387543,
-0.029391037300229073,
0.0005248399684205651,
0.001849495805799961,
0.05106768384575844,
0.021194493398070335,
0.015951117500662804,
0.06348303705453873,
0.04443812370300293,
-0.014394175261259079,
-0.03194241225719452,
-0.054282013326883316,
0.004931989125907421,
-0.055889178067445755,
-0.043473824858665466,
0.014615160413086414,
0.05122840031981468,
0.05066588893532753,
-0.02539321407675743,
-0.06187586858868599,
-0.02304273471236229,
-0.04479973763227463,
0.01056711282581091,
-0.022661032155156136,
0.010315992869436741,
-0.007960491813719273,
0.07155904173851013,
-0.01787971518933773,
-0.02601599134504795,
0.05858118087053299,
0.03051605448126793,
-0.005725526716560125,
0.0265584085136652,
0.012355084531009197,
0.05870171636343002,
0.026257066056132317,
0.005429205950349569,
0.012867368757724762,
-0.00773950619623065,
0.03172142803668976,
0.04291131719946861,
-0.027964679524302483,
-0.0019511992577463388,
-0.017859626561403275,
0.01597120612859726,
0.01329929381608963,
-0.021274853497743607,
0.0615544356405735,
0.015659818425774574,
0.02205834537744522,
-0.014876325614750385,
-0.004979701712727547,
0.006057004909962416,
0.047973889857530594,
0.0016963129164651036,
0.021998077630996704,
0.0012248358689248562,
-0.022580673918128014,
0.02912987396121025,
0.033288415521383286,
0.022178882732987404,
-0.05078642815351486,
-0.006770184263586998,
0.020873060449957848,
-0.038310807198286057,
0.044639021158218384,
0.0027045581955462694,
-0.028446828946471214,
0.0710768923163414,
-0.014675429090857506,
0.05026409775018692,
-0.06267945468425751,
0.012254636734724045,
0.03505629673600197,
0.017176581546664238,
-0.008638514205813408,
0.027562888339161873,
0.008653581142425537,
0.015408698469400406,
0.03326832503080368,
-0.004783828277140856,
-0.03835098445415497,
-0.03411208838224411,
0.024890974164009094,
-0.036362119019031525,
-0.014303772710263729,
0.052956100553274155,
-0.04568367823958397,
-0.004464906640350819,
-0.016865191981196404,
-0.00697108032181859,
-0.012817144393920898,
0.018994687125086784,
0.05516595393419266,
0.029612023383378983,
-0.025654379278421402,
0.002370568923652172,
0.011179844848811626,
-0.00010515633039176464,
0.050023023039102554,
-0.028145484626293182,
-0.024167750030755997,
-0.03602059558033943,
-0.002448416082188487,
0.05528649315237999,
0.02219897322356701,
0.01678483374416828,
0.033469218760728836,
-0.010155276395380497,
-0.0009674382745288312,
-0.01203365158289671,
-0.03728623688220978,
0.010346127673983574,
-0.018261417746543884,
0.0747331902384758,
-0.010265769436955452,
-0.014524757862091064,
0.040098778903484344,
-0.014916504733264446,
0.019285986199975014,
0.0012932659592479467,
0.017528148368000984,
-0.0820457935333252,
0.04524170607328415,
0.012134099379181862,
-0.009848910383880138,
-0.001815594732761383,
-0.005308668594807386,
0.0523935928940773,
-0.026920020580291748,
-0.019506970420479774,
-0.06179551035165787,
0.03268572688102722,
0.06267945468425751,
-0.009698239155113697,
-0.09843888133764267,
-0.020310552790760994,
-0.04950069636106491,
-0.03015444241464138,
0.06505002081394196,
0.008688738569617271,
0.021957898512482643,
0.036844268441200256,
0.010069896467030048,
-0.011220023967325687,
-0.011913114227354527,
-0.0023354121949523687,
0.02601599134504795,
-0.009356716647744179,
-0.042509526014328,
-0.034754954278469086,
0.039917971938848495,
-0.013801533728837967,
-0.07887164503335953,
-0.017357386648654938,
-0.001566986320540309,
0.011611769907176495,
-0.11201943457126617,
0.01359059289097786,
-0.004000335466116667,
-0.01554932538419962,
-0.008944880217313766,
0.007001214660704136,
-0.004658268764615059,
-0.035779520869255066,
-0.04684887453913689,
0.013088353909552097,
0.020179972052574158,
0.05685347691178322,
-0.007844976149499416,
0.04600511118769646,
-0.016312729567289352,
-0.015951117500662804,
0.029511574655771255,
-0.0006080233142711222,
-0.03499602898955345,
0.015237937681376934,
0.016061609610915184,
-0.01963755302131176,
-0.05263466760516167,
0.03839116543531418,
-0.03616122156381607,
0.028768261894583702,
-0.027100827544927597,
0.0729251354932785,
0.00606202706694603,
0.009793664328753948,
-0.029993725940585136,
-0.012134099379181862,
0.013932115398347378,
0.025413302704691887,
-0.01890428364276886,
-0.04741138219833374,
-0.03594023734331131,
-0.0005775750614702702,
-0.0071970876306295395,
-0.05026409775018692,
-0.03091784566640854,
0.03815009072422981,
0.02308291383087635,
-0.003937555477023125,
-0.02139539085328579,
0.03316787630319595,
0.07348763942718506,
-0.05524631217122078,
-0.04271042346954346,
-0.016131922602653503,
-0.027161095291376114,
-0.03575943037867546,
-0.03750722482800484,
0.03487548977136612,
0.05950530245900154,
-0.005228309892117977,
0.013349518179893494,
0.03931528329849243,
-0.029190141707658768,
0.016935504972934723,
-0.0011802620720118284,
0.013560458086431026,
-0.005805884953588247,
-0.0019913783762604,
-0.035658981651067734,
0.015800444409251213,
-0.01736743189394474,
-0.022560585290193558,
0.05159001052379608,
-0.0011934458743780851,
-0.02651822939515114,
-0.09225129336118698,
0.08071988821029663,
-0.03575943037867546,
-0.0006237183115445077,
-0.05910350754857063,
-0.03949609026312828,
0.05649186670780182,
-0.012194368056952953,
0.0024597165174782276,
-0.026478050276637077,
-0.0154790123924613,
0.0008280668989755213,
-0.01989871636033058,
-0.01791989430785179,
-0.010376261547207832,
0.0203306432813406,
0.018271462991833687,
0.07810824364423752,
0.015710042789578438,
0.02250031568109989,
-0.0073728715069592,
-0.07489390671253204,
0.014866280369460583,
0.012174278497695923,
0.04242916777729988,
0.07368853688240051,
-0.029692381620407104,
0.033248234540224075,
-0.05998745188117027,
0.010788097977638245,
0.006730005145072937,
0.03015444241464138,
-0.024268198758363724,
0.03144017234444618,
0.002172184642404318,
-0.05858118087053299,
-0.057496342808008194,
-0.04088227078318596,
-0.010190433822572231,
-0.017116311937570572,
-0.0190449096262455,
0.029612023383378983,
0.00038986318395473063,
0.05062571167945862,
0.035377729684114456,
0.0029079648666083813,
-0.017397565767169,
0.019356299191713333,
0.011250157840549946,
0.022399868816137314,
-0.0019964007660746574,
-0.01853262633085251,
-0.009773574769496918,
-0.08614406734704971,
-0.02278156951069832,
-0.012626293115317822,
0.004881765227764845,
-0.04942033812403679,
-0.003068681573495269,
0.036984894424676895,
-0.026357512921094894,
0.05066588893532753
] |
52,250 |
osmnx.folium
|
plot_graph_folium
|
Do not use: deprecated.
You can generate and explore interactive web maps of graph nodes, edges,
and/or routes automatically using GeoPandas.GeoDataFrame.explore instead,
for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the
OSMnx examples gallery for complete details and demonstrations.
Parameters
----------
G : networkx.MultiDiGraph
deprecated
graph_map : folium.folium.Map
deprecated
popup_attribute : string
deprecated
tiles : string
deprecated
zoom : int
deprecated
fit_bounds : bool
deprecated
kwargs
deprecated
Returns
-------
folium.folium.Map
|
def plot_graph_folium(
G,
graph_map=None,
popup_attribute=None,
tiles="cartodbpositron",
zoom=1,
fit_bounds=True,
**kwargs,
):
"""
Do not use: deprecated.
You can generate and explore interactive web maps of graph nodes, edges,
and/or routes automatically using GeoPandas.GeoDataFrame.explore instead,
for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the
OSMnx examples gallery for complete details and demonstrations.
Parameters
----------
G : networkx.MultiDiGraph
deprecated
graph_map : folium.folium.Map
deprecated
popup_attribute : string
deprecated
tiles : string
deprecated
zoom : int
deprecated
fit_bounds : bool
deprecated
kwargs
deprecated
Returns
-------
folium.folium.Map
"""
warn(
"The `folium` module has been deprecated and will be removed in the v2.0.0 release. "
"You can generate and explore interactive web maps of graph nodes, edges, "
"and/or routes automatically using GeoPandas.GeoDataFrame.explore instead, "
"for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the "
"OSMnx examples gallery for complete details and demonstrations.",
FutureWarning,
stacklevel=2,
)
# create gdf of all graph edges
gdf_edges = convert.graph_to_gdfs(G, nodes=False)
return _plot_folium(gdf_edges, graph_map, popup_attribute, tiles, zoom, fit_bounds, **kwargs)
|
(G, graph_map=None, popup_attribute=None, tiles='cartodbpositron', zoom=1, fit_bounds=True, **kwargs)
|
[
0.08372470736503601,
0.024048199877142906,
0.00830451212823391,
0.020188165828585625,
-0.048313867300748825,
0.0029222096782177687,
-0.05317062512040138,
0.005291691515594721,
0.02223597839474678,
-0.014842106960713863,
0.019209565594792366,
0.0072534228675067425,
-0.04342086613178253,
0.024628112092614174,
0.009532293304800987,
0.005468383431434631,
-0.054185472428798676,
-0.06092694029211998,
0.0008834587642922997,
0.014171584509313107,
0.02796260267496109,
-0.03773048520088196,
0.027817625552415848,
-0.003739975392818451,
0.003658425295725465,
-0.007842395454645157,
-0.02691151387989521,
0.062086764723062515,
0.0011870061280205846,
0.030898403376340866,
-0.018828997388482094,
-0.07756315171718597,
-0.05520031601190567,
0.023015232756733894,
0.016500290483236313,
0.00829998217523098,
0.005916908383369446,
0.030445348471403122,
-0.04454444348812103,
-0.061543095856904984,
0.009305765852332115,
-0.04110122099518776,
-0.03158704936504364,
0.008227492682635784,
0.04088375344872475,
0.016337191686034203,
-0.01835782080888748,
0.020170042291283607,
0.0009757688967511058,
-0.05447542667388916,
0.0054366691038012505,
-0.01164353359490633,
-0.04487064480781555,
0.04222479835152626,
-0.0066282059997320175,
0.04657413437962532,
0.013401390053331852,
0.03696935251355171,
0.04149990901350975,
-0.020586853846907616,
-0.04795142263174057,
-0.03834664076566696,
-0.012721805833280087,
-0.034142281860113144,
0.0019866495858877897,
0.008771159686148167,
-0.018828997388482094,
-0.02634972333908081,
-0.010257182642817497,
0.0030196167062968016,
-0.028814347460865974,
0.05824485048651695,
0.021293621510267258,
0.005998458247631788,
0.006288414355367422,
0.012540583498775959,
0.05179333686828613,
-0.004460334312170744,
-0.0635003000497818,
0.009949104860424995,
-0.022544056177139282,
-0.033888570964336395,
0.0011269762180745602,
-0.007049547974020243,
0.026784656569361687,
-0.03503027185797691,
0.07227145880460739,
0.032601892948150635,
-0.012078466825187206,
-0.05538153648376465,
0.01039309985935688,
0.011045499704778194,
-0.012504339218139648,
-0.0395064651966095,
-0.026802780106663704,
-0.043565843254327774,
-0.02982919290661812,
0.03870908543467522,
0.014552151784300804,
0.026059769093990326,
0.0383828841149807,
-0.014543090015649796,
-0.00008954930672189221,
0.05567149445414543,
0.01289396733045578,
-0.06589243561029434,
-0.0635003000497818,
-0.008920668624341488,
0.00011864398402394727,
0.0026684985496103764,
-0.05422171577811241,
0.010592443868517876,
0.10090458393096924,
0.007189995143562555,
0.021982265636324883,
0.10119453817605972,
0.04320339858531952,
-0.034051671624183655,
0.05190207064151764,
-0.06270291656255722,
-0.05831734091043472,
0.04780644550919533,
0.010583383031189442,
-0.04668286815285683,
0.00033865918521769345,
0.0311883594840765,
0.014742434956133366,
-0.0035700795706361532,
-0.036135729402303696,
-0.0028655778151005507,
0.05099595710635185,
-0.043710820376873016,
0.03983266279101372,
0.07390245795249939,
0.018321575596928596,
-0.05353306978940964,
-0.04294968768954277,
-0.01559417974203825,
0.015684790909290314,
0.05284442752599716,
-0.03642568364739418,
-0.05342433601617813,
-0.06734221428632736,
0.09459804743528366,
-0.03729555010795593,
-0.030318493023514748,
-0.045015621930360794,
-0.025497978553175926,
-0.0015709708677604795,
-0.09655524790287018,
-0.00048250440158881247,
-0.012785233557224274,
-0.04262348636984825,
-0.014035668224096298,
0.004159051924943924,
0.00197532307356596,
0.004367457702755928,
0.06005707383155823,
0.03443223983049393,
0.018104108050465584,
0.0067777144722640514,
-0.0003270496381446719,
0.022544056177139282,
0.034142281860113144,
-0.03173202648758888,
-0.04998111352324486,
0.08785657584667206,
-0.0024057261180132627,
-0.023250821977853775,
0.06810334324836731,
-0.015612302348017693,
-0.019680742174386978,
0.05570773780345917,
-0.006900039501488209,
0.04367457702755928,
0.036135729402303696,
0.06538500636816025,
-0.004861288703978062,
0.03020975925028324,
0.031206481158733368,
-0.047842688858509064,
0.00023728796804789454,
-0.03301870450377464,
0.07169154286384583,
-0.04229728877544403,
0.0036788128782063723,
0.007411992643028498,
-0.040630042552948,
-0.003481733612716198,
-0.0014520437689498067,
-0.04052130877971649,
-0.006206864025443792,
0.009405437856912613,
0.01628282479941845,
0.022036632522940636,
-0.026657801121473312,
0.016092540696263313,
-0.025189900770783424,
0.00013124459655955434,
0.07216272503137589,
0.02209099940955639,
0.01587507501244545,
0.01285772304981947,
0.00014412836753763258,
-0.011253905482590199,
0.011815695092082024,
0.00291994446888566,
-0.011996916495263577,
0.0039166673086583614,
-0.019227687269449234,
-0.013999423943459988,
0.009532293304800987,
0.06078196316957474,
0.009776943363249302,
0.006093600299209356,
0.0035247739870101213,
-0.05472913756966591,
0.02120300941169262,
-0.04472566768527031,
0.0023355025332421064,
-0.006922692060470581,
-0.001527930609881878,
-0.028306925669312477,
-0.00873944628983736,
0.024845579639077187,
-0.011969733983278275,
0.047117799520492554,
-0.006175150163471699,
0.047987665981054306,
-0.00027480663266032934,
0.04425448924303055,
-0.01908271014690399,
0.04530557617545128,
-0.005944091826677322,
0.0033005112782120705,
-0.04233353212475777,
-0.002661702688783407,
0.043384622782468796,
0.029394259676337242,
0.015141123905777931,
-0.012721805833280087,
-0.06302911788225174,
-0.030898403376340866,
0.0902487114071846,
0.01933642104268074,
0.009133604355156422,
-0.07821554690599442,
-0.012866783887147903,
0.07393870502710342,
-0.009287643246352673,
-0.026621557772159576,
-0.012314056046307087,
-0.01861153170466423,
0.03499402850866318,
0.011888183653354645,
-0.03207634761929512,
-0.04845884442329407,
-0.018158474937081337,
-0.023631390184164047,
0.009758821688592434,
-0.01213283371180296,
-0.007638520561158657,
-0.06313785165548325,
0.03254752606153488,
0.07332254946231842,
-0.05284442752599716,
-0.012395606376230717,
0.00842230673879385,
-0.008535570465028286,
0.003504386404529214,
0.037911705672740936,
0.010356854647397995,
0.018022559583187103,
0.013138617388904095,
0.07553345710039139,
-0.041862353682518005,
0.019553886726498604,
-0.055490270256996155,
0.008404185064136982,
-0.05585271492600441,
-0.06183305382728577,
-0.023178333416581154,
-0.057737428694963455,
0.029194913804531097,
-0.07814306020736694,
0.03637131676077843,
0.024030078202486038,
0.08307230472564697,
0.04414575546979904,
-0.03254752606153488,
0.05375053733587265,
0.019390787929296494,
0.0037535671144723892,
0.031949494034051895,
-0.02747330255806446,
0.02337767742574215,
0.059114716947078705,
0.024537499994039536,
-0.02448313497006893,
-0.02756391279399395,
0.08270986378192902,
-0.05360556021332741,
0.08952382206916809,
0.02134798839688301,
0.03852786496281624,
0.012459034100174904,
0.01563948579132557,
0.009885677136480808,
-0.010492771863937378,
0.07908541709184647,
0.0069951810874044895,
0.037911705672740936,
-0.034051671624183655,
0.031949494034051895,
-0.07306883484125137,
0.035972628742456436,
0.013981301337480545,
-0.041934844106435776,
0.02103991061449051,
-0.040666285902261734,
0.010891460813581944,
-0.0005062898271717131,
-0.0006308801821433008,
-0.0016989591531455517,
-0.027092736214399338,
0.003239348763599992,
0.040485065430402756,
0.00862618163228035,
0.08930635452270508,
-0.034776560962200165,
-0.031152114272117615,
0.04769771173596382,
0.03069905936717987,
0.02384885586798191,
-0.037114329636096954,
0.06955312192440033,
-0.014805862680077553,
-0.023069599643349648,
-0.012178138829767704,
-0.02190977707505226,
-0.009695393964648247,
0.01989820972084999,
-0.01731579191982746,
0.010474649257957935,
-0.0378754623234272,
0.05414922535419464,
-0.007008772809058428,
-0.009033932350575924,
-0.046864088624715805,
-0.03628070652484894,
0.03214883804321289,
0.05433044955134392,
-0.03925275430083275,
0.015050512738525867,
-0.018973976373672485,
0.049509935081005096,
0.025969156995415688,
0.0061570280231535435,
-0.0336892269551754,
0.07459110021591187,
0.0009944573976099491,
-0.03834664076566696,
0.005690380465239286,
-0.030028536915779114,
0.006428861524909735,
-0.021221132948994637,
0.024446889758110046,
0.049437444657087326,
0.031786393374204636,
-0.05505533888936043,
0.040086373686790466,
-0.00970445480197668,
-0.008916137740015984,
-0.009776943363249302,
-0.01747889257967472,
0.04157239943742752,
0.019064586609601974,
0.020333142951130867,
-0.07292386144399643,
0.019698865711688995,
-0.0015471854712814093,
-0.01837594248354435,
-0.010184694081544876,
0.009287643246352673,
0.05527280643582344,
-0.014805862680077553,
0.03508463874459267,
0.0008494795765727758,
0.02160169929265976,
-0.03319992870092392,
-0.022598421201109886,
-0.04189859703183174,
0.03990515321493149,
0.06933565437793732,
-0.012277811765670776,
-0.00999440997838974,
0.047987665981054306,
0.025896668434143066,
0.04432697594165802,
-0.023432044312357903,
-0.007484481204301119,
0.0022675441578030586,
0.020441876724362373,
-0.0054230778478085995,
0.02691151387989521,
0.007556970231235027,
-0.03457721695303917,
-0.01011220458894968,
0.048060156404972076,
0.002546173520386219,
0.05969462916254997,
-0.01698959246277809,
-0.0674871876835823,
0.02209099940955639,
0.019209565594792366,
0.03689686208963394,
-0.06879198551177979,
0.01902834326028824,
0.044109512120485306,
-0.016618086025118828,
0.05204704776406288,
-0.0037331795319914818,
-0.002550703939050436,
-0.026132257655262947,
-0.011942550539970398,
-0.058716028928756714,
-0.013999423943459988,
0.03111587092280388,
-0.04545055702328682,
0.10083209723234177,
-0.010909583419561386,
-0.025117412209510803,
0.02924928069114685,
0.005654136184602976,
0.0044399467296898365,
-0.018176598474383354,
-0.03754926100373268,
-0.0383828841149807,
0.010818972252309322,
-0.00606641685590148,
0.057012539356946945,
-0.062412962317466736,
0.04505186527967453,
-0.041789863258600235,
-0.007470889948308468,
-0.022598421201109886,
-0.0351208820939064,
0.027020245790481567,
0.06060073897242546,
0.03182263672351837,
0.011924427933990955,
-0.001935680746100843,
0.014896473847329617,
0.039615195244550705,
-0.011435127817094326,
-0.004433150868862867,
-0.03062657080590725,
-0.011797572486102581,
-0.03249315917491913,
0.0484950914978981,
0.0006331454496830702,
-0.045160599052906036,
-0.006224986165761948,
-0.02747330255806446,
-0.00027225821395404637,
0.0373680405318737,
0.06893696635961533,
-0.02190977707505226,
-0.037911705672740936,
0.003665221156552434,
0.05465664714574814,
-0.0456317774951458,
-0.033399272710084915,
-0.0636090338230133,
0.023250821977853775,
0.04023135453462601,
-0.06440640985965729,
0.0228158887475729,
-0.0026820902712643147,
-0.02999229170382023,
0.01518642995506525,
-0.03020975925028324,
0.049836136400699615,
-0.00171255087479949,
-0.002016098238527775,
0.017669174820184708,
0.051285915076732635,
-0.028814347460865974,
0.0041817049495875835,
-0.03319992870092392,
-0.019390787929296494,
-0.021456722170114517,
0.016001930460333824,
-0.03352612629532814,
0.0584985613822937,
0.05041604861617088,
0.04052130877971649,
-0.013428573496639729,
-0.03957895189523697,
-0.037766728550195694,
-0.05262695997953415,
0.01989820972084999,
0.00790129229426384,
0.027183346450328827,
0.04958242550492287,
-0.02263466641306877,
0.026965878903865814,
0.03870908543467522,
0.011199538595974445,
0.012803356163203716,
-0.009260459803044796,
-0.032275695353746414,
0.0523732490837574,
0.04987237975001335,
-0.005853480659425259,
-0.00955041591078043,
-0.011915367096662521,
-0.015412957407534122,
-0.018593408167362213,
-0.034849051386117935,
0.035247739404439926,
-0.01933642104268074,
-0.008363409899175167,
-0.02732832357287407,
-0.04095624387264252,
-0.0178141538053751,
0.06893696635961533,
0.009650087915360928,
-0.007629459258168936,
-0.022670911625027657,
0.0018665897659957409,
0.04994487017393112,
-0.03165953606367111,
0.02756391279399395,
0.0024804803542792797,
-0.04367457702755928,
0.03102525882422924,
-0.00457359803840518,
-0.04037633165717125,
-0.03765799477696419,
-0.028741858899593353,
0.061615586280822754,
-0.013120495714247227,
0.047335267066955566,
0.04592173174023628,
-0.05132215842604637,
0.02127549983561039,
-0.024682478979229927,
0.06940814852714539,
-0.04987237975001335,
0.003828321350738406,
0.0974976047873497,
-0.029774826020002365,
-0.03403354808688164,
-0.016337191686034203,
0.055961448699235916,
-0.018557164818048477,
0.04026759788393974,
-0.019553886726498604,
-0.042768463492393494,
-0.03358049318194389,
-0.004761616233736277,
-0.029031815007328987,
-0.0031170237343758345,
0.023268945515155792,
-0.04374706745147705,
0.004011808894574642,
-0.007760845590382814,
-0.036153849214315414,
0.027092736214399338,
0.049111247062683105,
-0.022761521860957146,
0.028886836022138596,
-0.024301912635564804,
0.026204746216535568,
0.0019164258847013116,
0.04215230792760849,
0.029321769252419472,
0.06708849966526031,
-0.006510411389172077,
-0.07770812511444092,
0.040485065430402756,
0.021982265636324883,
0.048313867300748825,
0.019698865711688995,
0.06690727919340134,
0.014135340228676796,
0.016491230577230453,
-0.004546414595097303,
-0.06371776759624481,
0.04171737655997276,
-0.05208329111337662,
0.04722653329372406,
-0.023903222754597664,
-0.04432697594165802,
-0.006487758830189705,
-0.020006943494081497,
0.0031306154560297728,
-0.016418742015957832,
0.052663203328847885,
-0.07756315171718597,
0.020749954506754875,
0.017053019255399704,
-0.07611337304115295,
-0.015077696181833744,
-0.006673511583358049,
0.00419303122907877,
0.01637343503534794,
-0.02384885586798191,
-0.023993832990527153,
-0.015032391063869,
0.020315021276474,
-0.015231735073029995,
-0.023105844855308533,
-0.02216348797082901,
-0.04896626994013786,
-0.03182263672351837,
0.04893002286553383,
-0.0005125193274579942,
-0.03537459671497345,
-0.02845190279185772,
-0.049038756638765335,
-0.030662814155220985,
-0.02497243508696556,
0.016500290483236313,
0.007402931340038776,
-0.02080432139337063,
-0.004358396399766207,
-0.01350106205791235,
0.0736125037074089,
-0.02401195652782917,
-0.042768463492393494,
-0.0440007783472538,
-0.008363409899175167,
0.019282054156064987,
-0.1230137050151825,
0.00033979181898757815,
-0.012839600443840027,
-0.017442647367715836,
-0.002435174770653248,
-0.042116064578294754,
0.027527669444680214,
-0.0009695393382571638,
-0.06571120768785477,
0.022997111082077026,
-0.0044920481741428375,
0.03762175142765045,
0.035972628742456436,
0.082492396235466,
-0.05157586932182312,
-0.02045999839901924,
0.01100019458681345,
0.02642221376299858,
0.026875268667936325,
0.048640068620443344,
0.011960672214627266,
-0.03561018407344818,
-0.042514752596616745,
0.03446848317980766,
-0.004748024512082338,
0.017352037131786346,
-0.02045999839901924,
0.03947021812200546,
0.01221438404172659,
-0.06781338900327682,
-0.03374359384179115,
0.02352265641093254,
-0.02740081399679184,
0.03780297562479973,
-0.015403896570205688,
-0.021746676415205002,
-0.025914790108799934,
0.03285560384392738,
0.0012289137812331319,
-0.017424525693058968,
0.005984866991639137,
0.015684790909290314,
0.040811263024806976,
-0.043964531272649765,
0.016228457912802696,
0.017533259466290474,
0.07227145880460739,
-0.04882128909230232,
-0.01959013193845749,
-0.04352959990501404,
0.018756508827209473,
-0.023722000420093536,
0.004861288703978062,
0.014135340228676796,
0.06179680675268173,
0.021293621510267258,
-0.043239641934633255,
0.0046053119003772736,
-0.011253905482590199,
0.042116064578294754,
0.02134798839688301,
-0.040086373686790466,
0.02296086587011814,
0.06139811873435974,
-0.0031306154560297728,
-0.008037209510803223,
0.03827415034174919,
-0.01966262049973011,
0.08292733132839203,
0.03218508139252663,
-0.05639638379216194,
-0.09010373055934906,
0.029285525903105736,
-0.0013535041362047195,
-0.001476961886510253,
-0.038636595010757446,
-0.03568267449736595,
0.049292467534542084,
-0.012540583498775959,
0.03539271652698517,
-0.04320339858531952,
-0.045668020844459534,
-0.01080084964632988,
0.001987782306969166,
-0.03446848317980766,
0.0373680405318737,
-0.008598998188972473,
-0.0040775020606815815,
0.05719375982880592,
0.015340468846261501,
0.011163294315338135,
-0.03278311714529991,
-0.04385579749941826,
0.01998881995677948,
0.0045486800372600555,
-0.0013591672759503126,
0.025280512869358063,
-0.06034702807664871,
0.0019843843765556812,
-0.022924622520804405,
-0.00958666019141674,
-0.06085445359349251,
0.036063238978385925,
-0.031786393374204636,
0.00137955485843122,
-0.009921921417117119,
-0.04233353212475777,
-0.014932718127965927,
0.016464047133922577,
-0.04994487017393112,
-0.03488529473543167,
-0.04555928707122803,
0.005726625211536884,
-0.02819819189608097,
0.05382302775979042,
-0.0035882017109543085,
-0.03918026387691498,
-0.013546368107199669,
0.005880664102733135,
0.012567766942083836,
0.009867554530501366,
-0.027817625552415848,
-0.03055408224463463,
-0.001855263370089233,
-0.04189859703183174,
-0.039615195244550705,
0.03463158383965492,
0.015113940462470055,
-0.09706266969442368,
-0.021565454080700874,
0.03247503936290741,
-0.03553769364953041,
0.03488529473543167
] |
52,251 |
osmnx.plot
|
plot_graph_route
|
Visualize a route along a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
route : list
route as a list of node IDs
route_color : string
color of the route
route_linewidth : int
width of the route line
route_alpha : float
opacity of the route line
orig_dest_size : int
size of the origin and destination nodes
ax : matplotlib axis
if not None, plot route on this preexisting axis instead of creating a
new fig, ax and drawing the underlying graph
pg_kwargs
keyword arguments to pass to plot_graph
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_graph_route(
G,
route,
route_color="r",
route_linewidth=4,
route_alpha=0.5,
orig_dest_size=100,
ax=None,
**pg_kwargs,
):
"""
Visualize a route along a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
route : list
route as a list of node IDs
route_color : string
color of the route
route_linewidth : int
width of the route line
route_alpha : float
opacity of the route line
orig_dest_size : int
size of the origin and destination nodes
ax : matplotlib axis
if not None, plot route on this preexisting axis instead of creating a
new fig, ax and drawing the underlying graph
pg_kwargs
keyword arguments to pass to plot_graph
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
if ax is None:
# plot the graph but not the route, and override any user show/close
# args for now: we'll do that later
overrides = {"show", "save", "close"}
kwargs = {k: v for k, v in pg_kwargs.items() if k not in overrides}
fig, ax = plot_graph(G, show=False, save=False, close=False, **kwargs)
else:
fig = ax.figure
# scatterplot origin and destination points (first/last nodes in route)
x = (G.nodes[route[0]]["x"], G.nodes[route[-1]]["x"])
y = (G.nodes[route[0]]["y"], G.nodes[route[-1]]["y"])
ax.scatter(x, y, s=orig_dest_size, c=route_color, alpha=route_alpha, edgecolor="none")
# assemble the route edge geometries' x and y coords then plot the line
x = []
y = []
for u, v in zip(route[:-1], route[1:]):
# if there are parallel edges, select the shortest in length
data = min(G.get_edge_data(u, v).values(), key=lambda d: d["length"])
if "geometry" in data:
# if geometry attribute exists, add all its coords to list
xs, ys = data["geometry"].xy
x.extend(xs)
y.extend(ys)
else:
# otherwise, the edge is a straight line from node to node
x.extend((G.nodes[u]["x"], G.nodes[v]["x"]))
y.extend((G.nodes[u]["y"], G.nodes[v]["y"]))
ax.plot(x, y, c=route_color, lw=route_linewidth, alpha=route_alpha)
# save and show the figure as specified, passing relevant kwargs
sas_kwargs = {"save", "show", "close", "filepath", "file_format", "dpi"}
kwargs = {k: v for k, v in pg_kwargs.items() if k in sas_kwargs}
fig, ax = _save_and_show(fig, ax, **kwargs)
return fig, ax
|
(G, route, route_color='r', route_linewidth=4, route_alpha=0.5, orig_dest_size=100, ax=None, **pg_kwargs)
|
[
0.034703705459833145,
0.052390165627002716,
-0.027074625715613365,
-0.0013503852533176541,
-0.036959923803806305,
-0.015143435448408127,
-0.04286815971136093,
0.036615755409002304,
0.005516264121979475,
-0.0256597101688385,
-0.005850872490555048,
0.01185470912605524,
0.017103286460042,
0.03307846188545227,
0.0043905447237193584,
0.044283077120780945,
-0.009722773917019367,
-0.04715115204453468,
0.04114731401205063,
-0.014684543013572693,
0.04351825639605522,
-0.0444742813706398,
0.031185533851385117,
-0.018632926046848297,
0.0021952723618596792,
-0.03304022178053856,
0.014206530526280403,
0.044894929975271225,
-0.04608040302991867,
0.04057369753718376,
0.013097541406750679,
-0.08359482139348984,
-0.03307846188545227,
0.029675014317035675,
0.00210803491063416,
0.04321232810616493,
-0.04374770075082779,
-0.00817401334643364,
-0.026768699288368225,
-0.0015105194179341197,
-0.004980890080332756,
0.01772470213472843,
-0.013298306614160538,
-0.02103254944086075,
0.013632915914058685,
0.01346083078533411,
-0.030803123489022255,
0.0926961749792099,
-0.021606164053082466,
-0.05296378210186958,
0.004806415177881718,
-0.02852778509259224,
-0.056940846145153046,
0.025640588253736496,
0.04439779743552208,
0.016701756045222282,
0.012686450965702534,
0.08007664978504181,
0.03753354027867317,
-0.05055459961295128,
-0.011252413503825665,
-0.02353733405470848,
-0.013470391742885113,
-0.0038097593933343887,
0.032065074890851974,
-0.000251703429967165,
-0.0005159546853974462,
-0.030458955094218254,
-0.007127165794372559,
0.013661595992743969,
-0.01857556402683258,
0.022141538560390472,
-0.0013001939514651895,
-0.05426397547125816,
0.04183565080165863,
0.014780146069824696,
0.02688342146575451,
-0.005908234044909477,
-0.023288767784833908,
0.010812642052769661,
0.02571707032620907,
0.004947429057210684,
-0.0036567954812198877,
-0.018087992444634438,
-0.016405388712882996,
0.02418743073940277,
0.016223743557929993,
0.007786822970956564,
-0.06149152293801308,
-0.05583185702562332,
-0.013728518038988113,
-0.01696944236755371,
-0.03139586001634598,
0.04703642800450325,
-0.020573657006025314,
-0.04921616241335869,
-0.013977084308862686,
-0.03875724971294403,
-0.001075528096407652,
-0.01922566071152687,
-0.02405358850955963,
-0.012093715369701385,
-0.03803067281842232,
0.04382418468594551,
0.0028656846843659878,
-0.10959869623184204,
-0.060803186148405075,
0.031185533851385117,
-0.004357083700597286,
0.01140537764877081,
-0.02305932156741619,
0.008781089447438717,
-0.015917815268039703,
-0.021873850375413895,
0.0009518423466943204,
0.07036343216896057,
0.031281135976314545,
-0.023613816127181053,
0.0059608155861496925,
-0.08045905828475952,
-0.032447487115859985,
0.033747680485248566,
-0.003310236381366849,
-0.037132009863853455,
-0.0225813090801239,
-0.0038097593933343887,
0.01748569682240486,
-0.0017674510600045323,
-0.025296419858932495,
-0.05778214707970619,
0.048413101583719254,
0.014063127338886261,
0.02535378187894821,
0.05977068096399307,
-0.02917788177728653,
0.012112836353480816,
-0.07105177640914917,
0.029120519757270813,
0.002154641319066286,
0.05227544531226158,
-0.020650139078497887,
-0.03328878805041313,
-0.055564168840646744,
-0.014292572624981403,
0.004371424205601215,
-0.022791635245084763,
-0.0328490175306797,
-0.014120488427579403,
-0.008871911093592644,
-0.0135946748778224,
-0.01610901951789856,
0.005004790611565113,
-0.008011489175260067,
0.028240976855158806,
0.005951255094259977,
-0.03992360085248947,
-0.014627181924879551,
0.08841318637132645,
0.006577451713383198,
0.024340394884347916,
0.009531568735837936,
-0.04799245297908783,
0.05510527640581131,
0.022696031257510185,
-0.01755261793732643,
0.010047822259366512,
0.04673049971461296,
0.01053539477288723,
-0.005559285171329975,
0.025468504056334496,
-0.041338518261909485,
-0.03621422499418259,
-0.04370946064591408,
-0.03585093468427658,
-0.005788730923086405,
0.018154913559556007,
0.027495278045535088,
0.02032509073615074,
0.026940783485770226,
-0.019885318353772163,
-0.0026744797360152006,
-0.02956029213964939,
0.01723713055253029,
0.022313622757792473,
0.001088673365302384,
0.02168264612555504,
-0.008790649473667145,
-0.03497139364480972,
0.0062667434103786945,
-0.03564060851931572,
-0.010028701275587082,
0.023479972034692764,
0.003551632631570101,
0.014168289490044117,
0.006921620573848486,
-0.024072708562016487,
0.016061218455433846,
-0.03499051183462143,
-0.006395807024091482,
0.04940737038850784,
0.03793507069349289,
-0.013910163193941116,
0.005975156091153622,
-0.006634813267737627,
0.02774384431540966,
0.004971329588443041,
0.01658703200519085,
-0.014722784049808979,
-0.013613794930279255,
0.04271519556641579,
0.00010277268302161247,
-0.02298283949494362,
0.09414933621883392,
0.0041610985063016415,
0.009077456779778004,
0.017361413687467575,
-0.07923534512519836,
0.03732321411371231,
0.002142690820619464,
-0.037992432713508606,
0.024168310686945915,
0.0031262014526873827,
-0.016443628817796707,
0.050439875572919846,
0.03655839338898659,
-0.04286815971136093,
0.015468483790755272,
-0.01813579350709915,
-0.006873819511383772,
0.006018177140504122,
0.05613778531551361,
0.010630997829139233,
0.046883463859558105,
0.02103254944086075,
0.013795440085232258,
-0.0005861627869307995,
-0.007557377219200134,
0.05537296459078789,
-0.04711290821433067,
0.055984821170568466,
-0.05380508303642273,
0.006089878734201193,
-0.06516265869140625,
0.002918266225606203,
0.021395837888121605,
0.026845179498195648,
-0.03256221115589142,
-0.015860453248023987,
0.03380504250526428,
-0.01706504449248314,
-0.03910142183303833,
0.046156883239746094,
-0.00356597313657403,
0.0023482362739741802,
-0.0016240474069491029,
-0.020439812913537025,
-0.0896368995308876,
-0.05479934811592102,
-0.003924482502043247,
0.02709374763071537,
-0.0020423082169145346,
0.055984821170568466,
-0.03640542924404144,
0.040688421577215195,
0.10493329912424088,
-0.031587064266204834,
-0.056252509355545044,
-0.006414927542209625,
-0.046501051634550095,
0.00644838809967041,
0.009072676301002502,
0.0663481280207634,
-0.03003830462694168,
0.0331740640103817,
0.06745711714029312,
-0.006171140819787979,
-0.04734235629439354,
-0.018049750477075577,
0.0051290737465023994,
-0.023288767784833908,
-0.03902493789792061,
0.0032576550729572773,
-0.01064055785536766,
0.017762944102287292,
-0.056940846145153046,
0.04504789412021637,
0.03640542924404144,
0.05326971039175987,
-0.011300214566290379,
-0.03382416069507599,
0.056558433920145035,
-0.009182619862258434,
0.04703642800450325,
-0.004634330980479717,
0.024684563279151917,
0.044283077120780945,
-0.04611864313483238,
-0.011921631172299385,
-0.010697918944060802,
-0.012590848840773106,
0.09881474077701569,
-0.00011039100354537368,
0.12374787032604218,
-0.024263912811875343,
0.010420671664178371,
0.030401593074202538,
0.000531191355548799,
-0.003267215332016349,
0.02120463363826275,
0.01016254536807537,
-0.018900612369179726,
0.02535378187894821,
-0.03510523587465286,
-0.007308810483664274,
-0.015889134258031845,
0.07453170418739319,
-0.019483787938952446,
-0.01782030425965786,
0.011653943918645382,
-0.010583195835351944,
-0.015239037573337555,
0.01129065454006195,
-0.0242830328643322,
-0.008322197012603283,
0.017256250604987144,
0.02063101902604103,
-0.005908234044909477,
0.04049721732735634,
0.02726583182811737,
0.006692174822092056,
0.0062476228922605515,
0.05640547350049019,
-0.07556421309709549,
0.03170178830623627,
-0.027112867683172226,
0.035353802144527435,
-0.022696031257510185,
-0.035047873854637146,
-0.0028656846843659878,
-0.0021092300303280354,
0.04692170396447182,
0.05323147028684616,
0.03151058033108711,
0.03281077742576599,
-0.006395807024091482,
0.03961767256259918,
-0.01614726148545742,
-0.04321232810616493,
-0.07411105185747147,
-0.01263864990323782,
-0.027629120275378227,
0.04122379422187805,
-0.02158704400062561,
-0.012017233297228813,
-0.025372901931405067,
0.06864259392023087,
0.03424481302499771,
-0.04160620644688606,
-0.004923528525978327,
0.028202736750245094,
-0.005994276609271765,
0.019522029906511307,
-0.02168264612555504,
-0.00627630390226841,
-0.016644394025206566,
0.021089909598231316,
0.012753373011946678,
0.017189327627420425,
0.060803186148405075,
-0.01823139563202858,
-0.01959851197898388,
-0.006032517179846764,
-0.013652035966515541,
0.018116673454642296,
0.018479961901903152,
0.04512437805533409,
0.06470376998186111,
0.016806919127702713,
0.006759096402674913,
-0.01185470912605524,
-0.014923549257218838,
-0.034187451004981995,
0.053384434431791306,
0.008685486391186714,
0.016768677160143852,
-0.04833662137389183,
0.08160629123449326,
0.04152972251176834,
0.014856627210974693,
-0.03304022178053856,
-0.05151062458753586,
-0.01608034037053585,
0.0766349583864212,
-0.002581267384812236,
0.008809769526124,
-0.05414925143122673,
0.03608038276433945,
0.054914072155952454,
-0.011233293451368809,
-0.044933173805475235,
0.0032791655976325274,
-0.00542066153138876,
-0.03902493789792061,
0.02357557602226734,
0.024034466594457626,
-0.016061218455433846,
0.016979003325104713,
-0.015210356563329697,
0.049445610493421555,
-0.045200858265161514,
0.07648199796676636,
-0.01956983096897602,
-0.030286870896816254,
-0.014101368375122547,
0.018632926046848297,
0.01829831674695015,
0.00885757151991129,
0.028508663177490234,
0.03458898141980171,
0.03372855857014656,
0.03261956945061684,
0.019579390063881874,
0.04577447474002838,
-0.012036354281008244,
0.070478156208992,
-0.04435955733060837,
-0.040688421577215195,
0.0007552597089670599,
-0.00423280056566,
0.010334629565477371,
-0.0006088683730922639,
-0.04806893318891525,
-0.009923539124429226,
0.004239970818161964,
-0.036787841469049454,
0.0006937155849300325,
0.028107132762670517,
-0.04871902987360954,
0.015860453248023987,
0.01630978472530842,
0.05858520790934563,
-0.06099439039826393,
-0.040344253182411194,
-0.056634917855262756,
-0.018594685941934586,
-0.03451250120997429,
0.011472299695014954,
-0.0044144452549517155,
0.06034429371356964,
0.005846092477440834,
-0.019034456461668015,
0.015229477547109127,
-0.009942659176886082,
-0.01441685575991869,
-0.02866162732243538,
-0.021873850375413895,
0.028910193592309952,
-0.040688421577215195,
-0.12611880898475647,
0.00584131246432662,
0.03581269457936287,
-0.0022012474946677685,
-0.01771514303982258,
-0.023116683587431908,
0.011720865964889526,
0.008016268722712994,
0.06581275910139084,
-0.012208438478410244,
-0.06474200636148453,
-0.03862340748310089,
0.06695998460054398,
-0.03137673810124397,
-0.04187389090657234,
-0.05380508303642273,
0.06458904594182968,
0.08665410429239273,
-0.013728518038988113,
0.0242830328643322,
-0.04221806302666664,
-0.005243796855211258,
0.013432150706648827,
-0.04936912655830383,
0.03133849799633026,
0.01912049949169159,
0.02523905783891678,
0.11059296876192093,
0.035219959914684296,
-0.0023685519117861986,
-0.035219959914684296,
0.006945521105080843,
0.0036233344580978155,
-0.03640542924404144,
-0.035353802144527435,
0.0019120498327538371,
0.04531558230519295,
0.09889122098684311,
0.027590880170464516,
-0.034206572920084,
-0.014091807417571545,
-0.04420659318566322,
-0.01699812337756157,
-0.009311682544648647,
0.03688344359397888,
0.016261983662843704,
0.05858520790934563,
-0.004428785759955645,
-0.030879605561494827,
0.05483759194612503,
-0.016806919127702713,
0.020401572808623314,
0.001877394039183855,
0.02059277705848217,
0.09667324274778366,
0.0434417724609375,
-0.015076513402163982,
0.027992410585284233,
-0.04175917059183121,
-0.0010384820634499192,
0.010334629565477371,
-0.033613838255405426,
0.01537288073450327,
-0.008761968463659286,
0.06523913890123367,
-0.03026774898171425,
-0.05147238448262215,
0.07235196977853775,
0.022466586902737617,
0.00006606281385757029,
0.023938864469528198,
0.009153938852250576,
0.024856649339199066,
0.12428323924541473,
0.0016503380611538887,
0.04963681474328041,
0.049139682203531265,
0.00502869114279747,
0.004660621751099825,
0.00442161550745368,
-0.013365228660404682,
-0.06967509537935257,
-0.016405388712882996,
0.035219959914684296,
-0.053307950496673584,
0.012380522675812244,
0.017676901072263718,
-0.006711294874548912,
0.085506871342659,
-0.03669223561882973,
0.020478054881095886,
-0.08390074968338013,
-0.010267707519233227,
0.04022952914237976,
-0.007877645082771778,
-0.0035133915953338146,
-0.02982797846198082,
0.019655872136354446,
-0.004627160727977753,
0.02804977260529995,
0.000627988891210407,
-0.04042073339223862,
-0.0012786833103746176,
0.04022952914237976,
-0.011424497701227665,
-0.04565975069999695,
0.005291597917675972,
-0.04348001629114151,
-0.007146286312490702,
-0.033613838255405426,
0.007198867853730917,
0.004204119555652142,
0.030592797324061394,
-0.04317408800125122,
-0.009383385069668293,
-0.031013449653983116,
-0.00949332769960165,
0.008781089447438717,
0.06172097101807594,
0.02896755561232567,
-0.005822191946208477,
0.00892927311360836,
0.0068068974651396275,
0.03946470841765404,
0.021835610270500183,
0.02883371151983738,
-0.0031238114461302757,
0.0362715870141983,
0.02476104535162449,
0.003477540798485279,
-0.014445536769926548,
-0.027112867683172226,
0.004072666168212891,
0.01583177223801613,
0.0715106651186943,
-0.01843216083943844,
-0.013996205292642117,
0.018049750477075577,
0.027801204472780228,
0.053384434431791306,
0.007098485250025988,
0.05602306127548218,
-0.06099439039826393,
0.010152985341846943,
0.05992364510893822,
-0.03401536867022514,
0.013193144463002682,
-0.01894841529428959,
0.01707460545003414,
-0.004299722146242857,
-0.05426397547125816,
-0.018862372264266014,
0.005267697386443615,
0.04630984738469124,
0.023690298199653625,
-0.03642455115914345,
-0.03378592059016228,
-0.049445610493421555,
-0.04187389090657234,
0.02250482700765133,
-0.010870004072785378,
0.005879553500562906,
0.018078431487083435,
-0.05935002863407135,
-0.017399653792381287,
-0.03770562261343002,
-0.005468462593853474,
0.07816459983587265,
-0.015554525889456272,
-0.030803123489022255,
-0.047189392149448395,
0.0025023953057825565,
-0.02904403768479824,
-0.08374778181314468,
-0.03896757587790489,
0.006955081596970558,
0.009674972854554653,
-0.13835592567920685,
-0.006104219239205122,
0.006692174822092056,
-0.0015547355869784951,
-0.0241109486669302,
-0.06229458376765251,
0.02059277705848217,
-0.08000016957521439,
-0.03432129696011543,
0.04057369753718376,
0.02332700788974762,
0.031204653903841972,
-0.02080310322344303,
0.06562155485153198,
-0.022791635245084763,
-0.00342017924413085,
0.07464642822742462,
-0.04000008478760719,
0.00627630390226841,
0.035239078104496,
0.06711295247077942,
-0.012648209929466248,
-0.08076498657464981,
0.02055453695356846,
0.006759096402674913,
0.008977074176073074,
-0.014684543013572693,
0.04214157909154892,
-0.053040262311697006,
-0.04504789412021637,
-0.04217981919646263,
0.007065024226903915,
-0.015927376225590706,
0.029063157737255096,
-0.04313584417104721,
-0.04562151059508324,
-0.06722767651081085,
0.009847057051956654,
0.010468472726643085,
-0.05093700811266899,
-0.012753373011946678,
-0.016290664672851562,
-0.048183657228946686,
-0.0359082967042923,
-0.05544944852590561,
0.01261952891945839,
0.031797390431165695,
-0.03502875566482544,
-0.06263875216245651,
-0.016185501590371132,
0.014053566381335258,
0.01665395498275757,
-0.010745720006525517,
0.01282985508441925,
0.04512437805533409,
0.06302116066217422,
0.0059847161173820496,
-0.00485660694539547,
0.003945992793887854,
0.031281135976314545,
-0.010401551611721516,
-0.031931232661008835,
-0.020917825400829315,
0.00489962799474597,
-0.017562178894877434,
-0.008040170185267925,
0.0062906439416110516,
0.0189866553992033,
0.06202689930796623,
-0.023441731929779053,
-0.07384336739778519,
-0.06608044356107712,
0.014388175681233406,
-0.028929315507411957,
-0.007734241895377636,
-0.0324857272207737,
-0.07177834957838058,
0.10523922741413116,
0.0023338960018008947,
-0.018795451149344444,
-0.04608040302991867,
-0.03382416069507599,
-0.014072687365114689,
0.010755280964076519,
-0.00012151973351137713,
-0.011950312182307243,
-0.04290639981627464,
-0.0048948475159704685,
0.019827958196401596,
0.034837547689676285,
0.02284899540245533,
-0.05219896137714386,
-0.03380504250526428,
0.018967535346746445,
-0.026462770998477936,
-0.012705571949481964,
0.05988540127873421,
-0.03414921090006828,
0.07961775362491608,
-0.020535415038466454,
0.02934996597468853,
-0.05407277122139931,
0.016338465735316277,
-0.004337963182479143,
0.03594653680920601,
-0.005224676337093115,
-0.012093715369701385,
0.014005765318870544,
-0.062409307807683945,
-0.03858516737818718,
0.006935961078852415,
-0.05120469629764557,
0.04187389090657234,
-0.026328926905989647,
0.032313644886016846,
0.023938864469528198,
-0.014283012598752975,
0.011300214566290379,
0.0068260179832577705,
0.020650139078497887,
0.02493313141167164,
-0.024780167266726494,
-0.013193144463002682,
-0.008972293697297573,
-0.050095707178115845,
-0.06657757610082626,
0.018479961901903152,
-0.002183321863412857,
-0.015573645941913128,
0.04152972251176834,
0.031070809811353683,
-0.028279216960072517,
0.060803186148405075
] |
52,252 |
osmnx.plot
|
plot_graph_routes
|
Visualize several routes along a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
routes : list
routes as a list of lists of node IDs
route_colors : string or list
if string, 1 color for all routes. if list, the colors for each route.
route_linewidths : int or list
if int, 1 linewidth for all routes. if list, the linewidth for each route.
pgr_kwargs
keyword arguments to pass to plot_graph_route
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_graph_routes(G, routes, route_colors="r", route_linewidths=4, **pgr_kwargs):
"""
Visualize several routes along a graph.
Parameters
----------
G : networkx.MultiDiGraph
input graph
routes : list
routes as a list of lists of node IDs
route_colors : string or list
if string, 1 color for all routes. if list, the colors for each route.
route_linewidths : int or list
if int, 1 linewidth for all routes. if list, the linewidth for each route.
pgr_kwargs
keyword arguments to pass to plot_graph_route
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
# check for valid arguments
if not all(isinstance(r, list) for r in routes): # pragma: no cover
msg = "routes must be a list of route lists"
raise ValueError(msg)
if len(routes) <= 1: # pragma: no cover
msg = "You must pass more than 1 route"
raise ValueError(msg)
if isinstance(route_colors, str):
route_colors = [route_colors] * len(routes)
if len(routes) != len(route_colors): # pragma: no cover
msg = "route_colors list must have same length as routes"
raise ValueError(msg)
if isinstance(route_linewidths, int):
route_linewidths = [route_linewidths] * len(routes)
if len(routes) != len(route_linewidths): # pragma: no cover
msg = "route_linewidths list must have same length as routes"
raise ValueError(msg)
# plot the graph and the first route
overrides = {"route", "route_color", "route_linewidth", "show", "save", "close"}
kwargs = {k: v for k, v in pgr_kwargs.items() if k not in overrides}
fig, ax = plot_graph_route(
G,
route=routes[0],
route_color=route_colors[0],
route_linewidth=route_linewidths[0],
show=False,
save=False,
close=False,
**kwargs,
)
# plot the subsequent routes on top of existing ax
overrides.update({"ax"})
kwargs = {k: v for k, v in pgr_kwargs.items() if k not in overrides}
r_rc_rlw = zip(routes[1:], route_colors[1:], route_linewidths[1:])
for route, route_color, route_linewidth in r_rc_rlw:
fig, ax = plot_graph_route(
G,
route=route,
route_color=route_color,
route_linewidth=route_linewidth,
show=False,
save=False,
close=False,
ax=ax,
**kwargs,
)
# save and show the figure as specified, passing relevant kwargs
sas_kwargs = {"save", "show", "close", "filepath", "file_format", "dpi"}
kwargs = {k: v for k, v in pgr_kwargs.items() if k in sas_kwargs}
fig, ax = _save_and_show(fig, ax, **kwargs)
return fig, ax
|
(G, routes, route_colors='r', route_linewidths=4, **pgr_kwargs)
|
[
0.02145870216190815,
0.030189350247383118,
-0.03816426917910576,
-0.011485078372061253,
-0.06423689424991608,
0.002893643220886588,
-0.05051445960998535,
0.03233720734715462,
-0.00010806104546645656,
0.024779926985502243,
0.004069496411830187,
0.03490270674228668,
0.03941718861460686,
0.03778640553355217,
0.035916972905397415,
0.017511015757918358,
-0.007641803473234177,
-0.05536703020334244,
0.05500905215740204,
-0.03492259606719017,
0.0056580170057713985,
-0.020603535696864128,
0.02730565145611763,
-0.01384175755083561,
0.017928656190633774,
-0.03178035840392113,
0.01417984627187252,
0.04872457683086395,
-0.0388006716966629,
0.06252656131982803,
0.028479017317295074,
-0.07605011761188507,
-0.06185038015246391,
0.03734888136386871,
0.019211404025554657,
0.010401205159723759,
-0.044269759207963943,
0.013086029328405857,
-0.013971026986837387,
0.010301767848432064,
0.029652385041117668,
-0.0015847916947677732,
0.004507023375481367,
-0.04208212345838547,
0.01729225367307663,
0.06077645346522331,
-0.026848236098885536,
0.09824465960264206,
-0.035041920840740204,
-0.05461130291223526,
0.011872886680066586,
-0.03689146414399147,
-0.057395562529563904,
0.028638118878006935,
0.059503644704818726,
0.023507121950387955,
0.0036692589055746794,
0.0858348086476326,
0.046894919127225876,
-0.1053246334195137,
0.005911584012210369,
-0.024342400953173637,
0.0025654982309788465,
0.004628834780305624,
0.027285762131214142,
0.0035126442089676857,
0.003378403140231967,
-0.015263719484210014,
0.00008972717478172854,
-0.0035847367253154516,
-0.031820133328437805,
0.03895977512001991,
-0.03392821550369263,
-0.06546992063522339,
0.022612180560827255,
0.020215727388858795,
0.040053591132164,
0.006975569296628237,
-0.01498529314994812,
0.03760741651058197,
-0.004949522204697132,
0.0058419774286448956,
-0.03474360704421997,
-0.03776651993393898,
0.0010832517873495817,
0.025436216965317726,
-0.012877209112048149,
0.005116080399602652,
-0.058111514896154404,
-0.06845305860042572,
-0.006518155336380005,
-0.028319917619228363,
-0.012897097505629063,
0.026351045817136765,
-0.026470372453331947,
-0.03357023745775223,
-0.021776903420686722,
-0.05357714742422104,
0.014388665556907654,
-0.05624208226799965,
-0.023626448586583138,
-0.057355787605047226,
-0.04128662124276161,
0.027981828898191452,
-0.005707736127078533,
-0.09935836493968964,
-0.08002763241529465,
0.015303494408726692,
-0.014338946901261806,
0.003147209994494915,
-0.030785977840423584,
0.01854517124593258,
0.04007347673177719,
-0.016297873109579086,
0.011495023034512997,
0.0736636072397232,
0.02676868624985218,
-0.026868123561143875,
0.04279807582497597,
-0.0631231889128685,
-0.03617551177740097,
0.03180024400353432,
0.012101593427360058,
-0.03231732174754143,
-0.01767011731863022,
0.005966274533420801,
-0.009849324822425842,
0.007288799155503511,
-0.0043802401050925255,
-0.03583742305636406,
0.05337827280163765,
0.030030248686671257,
0.023507121950387955,
0.04912232980132103,
0.006726974621415138,
0.023626448586583138,
-0.09394893795251846,
0.033590126782655716,
0.0025132931768894196,
0.03762730583548546,
-0.019032416865229607,
-0.043872006237506866,
-0.0486450269818306,
0.008129049092531204,
-0.011445303447544575,
0.01630781777203083,
-0.021677464246749878,
0.0032565915025770664,
-0.019002584740519524,
0.00585689302533865,
-0.006364026572555304,
0.00841244775801897,
0.031084291636943817,
0.022075217217206955,
0.008213571272790432,
-0.04446863383054733,
-0.018893202766776085,
0.11423427611589432,
-0.012638558633625507,
0.009317331947386265,
0.004415043164044619,
-0.03152181953191757,
0.05671938508749008,
0.007467787247151136,
-0.016834838315844536,
0.025416329503059387,
0.032038893550634384,
0.00841244775801897,
0.010351486504077911,
0.013473836705088615,
-0.01163423527032137,
-0.010948114097118378,
-0.06149240583181381,
-0.056838709861040115,
-0.006766750011593103,
-0.025237342342734337,
0.012022043578326702,
0.002167746424674988,
-0.002226166194304824,
-0.019380448386073112,
-0.02108083665370941,
-0.042121898382902145,
0.014309115707874298,
-0.015760909765958786,
0.004474706016480923,
0.07585123926401138,
0.004258428700268269,
-0.010769126005470753,
0.0006531827966682613,
-0.034504953771829605,
-0.024541277438402176,
0.03299349918961525,
-0.0017115750815719366,
0.03034844994544983,
0.03476349264383316,
-0.0375477559864521,
0.0060209655202925205,
-0.04224122315645218,
0.009670336730778217,
0.013105916790664196,
0.022592293098568916,
-0.0028613258618861437,
0.0000582255597691983,
-0.016387367621064186,
0.032536085695028305,
-0.006533070933073759,
0.010301767848432064,
-0.015054900199174881,
0.014865967445075512,
0.042678751051425934,
-0.0021503448951989412,
-0.0190423596650362,
0.09378983825445175,
-0.00365931517444551,
0.006667311768978834,
0.05154861509799957,
-0.04204234853386879,
0.02426285110414028,
-0.016526581719517708,
-0.0486450269818306,
0.01874404586851597,
0.021896228194236755,
-0.010431037284433842,
0.02732553891837597,
0.00270471116527915,
-0.04027235507965088,
0.0025282090064138174,
-0.01250928919762373,
-0.010038257576525211,
0.006150234956294298,
0.06332205981016159,
-0.023666223511099815,
0.0299506988376379,
0.01124642789363861,
-0.013662769459187984,
-0.06733935326337814,
0.011833111755549908,
0.06125375255942345,
-0.03281451016664505,
0.07131686806678772,
-0.030010361224412918,
0.012479458004236221,
-0.0692087858915329,
-0.020026795566082,
0.037328992038965225,
0.024899253621697426,
-0.02249285578727722,
-0.04629829153418541,
0.028797218576073647,
-0.020961511880159378,
-0.026828348636627197,
0.04395155608654022,
-0.0017612939700484276,
-0.0005304391379468143,
-0.016884557902812958,
-0.014398609288036823,
-0.0972900539636612,
-0.013652825728058815,
0.011007776483893394,
-0.009849324822425842,
0.029015982523560524,
0.04788929969072342,
-0.044229984283447266,
0.03422652930021286,
0.09880150854587555,
-0.009794633835554123,
-0.01563164032995701,
-0.007597056683152914,
-0.016834838315844536,
-0.0003775533114094287,
0.014060520566999912,
0.08313009142875671,
-0.01731214113533497,
0.02855856902897358,
0.05695803463459015,
0.028459129855036736,
0.0026574782095849514,
-0.04259920120239258,
0.01039126142859459,
-0.009998481720685959,
0.0004897317267023027,
-0.003075117478147149,
-0.01863466389477253,
0.008541716262698174,
0.008765451610088348,
0.07203282415866852,
0.0225326307117939,
0.05198613926768303,
-0.005722651723772287,
-0.020623423159122467,
0.10723384469747543,
-0.02645048499107361,
0.040729768574237823,
-0.01745135337114334,
0.01337439939379692,
0.021737126633524895,
-0.016009503975510597,
-0.021776903420686722,
-0.027623852714896202,
-0.03104451671242714,
0.041207071393728256,
-0.02147858962416649,
0.1310989409685135,
-0.026112396270036697,
0.018127530813217163,
0.007731297519057989,
0.011156933382153511,
-0.015015124343335629,
0.041962798684835434,
0.019768256694078445,
-0.018893202766776085,
0.03675225377082825,
-0.006627536844462156,
-0.004996755160391331,
-0.04208212345838547,
0.04852570220828056,
-0.003234218107536435,
-0.002495891647413373,
0.02076263539493084,
-0.016277985647320747,
-0.02462082728743553,
0.041923023760318756,
-0.029373958706855774,
-0.01170384231954813,
0.03565843403339386,
0.059145670384168625,
-0.007651747204363346,
0.030010361224412918,
0.012429739348590374,
0.017162984237074852,
-0.011047552339732647,
0.014418496750295162,
-0.0507928840816021,
0.028459129855036736,
-0.01780932955443859,
0.018157362937927246,
-0.010798957198858261,
-0.029155196622014046,
0.02483959123492241,
-0.02517767995595932,
0.02553565613925457,
0.015094675123691559,
0.03156159445643425,
0.011892774142324924,
-0.019181573763489723,
0.04697446897625923,
0.011465190909802914,
-0.013026366010308266,
-0.07306697964668274,
-0.027763064950704575,
0.0012125209905207157,
0.022035440430045128,
-0.022751394659280777,
0.03335147723555565,
-0.038741011172533035,
0.06391868740320206,
0.01616860367357731,
-0.01863466389477253,
0.03866146132349968,
0.029214859008789062,
-0.013980970717966557,
0.01709337718784809,
-0.03587719798088074,
-0.005145912058651447,
-0.004715843126177788,
0.02839946746826172,
0.007621916010975838,
0.03498225659132004,
0.06244700774550438,
-0.05146906152367592,
0.002278371248394251,
0.031143954023718834,
0.0154228201135993,
0.030467776581645012,
0.021916115656495094,
0.057395562529563904,
0.048883676528930664,
0.009869212284684181,
-0.0019564409740269184,
-0.03937741369009018,
-0.055963657796382904,
-0.03241676092147827,
0.05604320764541626,
0.00828814972192049,
0.030467776581645012,
-0.05425332486629486,
0.08233459293842316,
0.02396453730762005,
0.01825680024921894,
-0.01854517124593258,
-0.03438562899827957,
-0.03651360049843788,
0.045144811272621155,
0.00019126260303892195,
-0.02609250880777836,
-0.018157362937927246,
0.03335147723555565,
0.053815796971321106,
-0.0366528145968914,
-0.041405946016311646,
0.003000539029017091,
-0.032536085695028305,
-0.0391586497426033,
0.0015363157726824284,
0.0223536416888237,
-0.006538042798638344,
0.030189350247383118,
0.00011699491733452305,
0.04454818367958069,
-0.023507121950387955,
0.05902634561061859,
-0.003159639658406377,
0.0017749667167663574,
-0.027584075927734375,
0.004323063418269157,
0.03189968317747116,
-0.03689146414399147,
0.04629829153418541,
0.0606173500418663,
0.030408114194869995,
0.012728053145110607,
0.020444434136152267,
0.04856547713279724,
-0.0033013387583196163,
0.0768853947520256,
-0.03267529606819153,
-0.027802839875221252,
0.011574572883546352,
-0.008705789223313332,
0.013951138593256474,
-0.010013397783041,
-0.03762730583548546,
-0.020076515153050423,
-0.008626238442957401,
-0.024441838264465332,
-0.011087327264249325,
0.019121909514069557,
-0.034166865050792694,
0.019251178950071335,
-0.014647204428911209,
0.04188324883580208,
-0.06399823725223541,
-0.04347425326704979,
-0.06447554379701614,
-0.02499869093298912,
-0.030746202915906906,
0.0046387785114347935,
-0.01304625440388918,
0.05564545467495918,
-0.0017165469471365213,
-0.06360048800706863,
0.018604833632707596,
0.0025070784613490105,
-0.03158148005604744,
0.004049608949571848,
-0.03303327411413193,
0.03452484309673309,
0.003733893623575568,
-0.10866574943065643,
0.00771141005679965,
0.054372649639844894,
-0.03639427572488785,
0.0024213131982833147,
-0.002247296739369631,
-0.020603535696864128,
0.010749238543212414,
0.05898657068610191,
0.022592293098568916,
-0.058270614594221115,
-0.026172058656811714,
0.053815796971321106,
-0.03406742960214615,
-0.024063974618911743,
-0.03734888136386871,
0.021776903420686722,
0.06785643100738525,
0.004052095115184784,
-0.003863162826746702,
-0.053099844604730606,
-0.023666223511099815,
0.006254644598811865,
-0.023487234488129616,
0.018445732071995735,
0.01409035176038742,
0.03120361641049385,
0.08074358105659485,
0.03669258952140808,
-0.025833969935774803,
-0.03351057693362236,
-0.01216125674545765,
0.01295675989240408,
-0.07672629505395889,
-0.0375477559864521,
0.050116706639528275,
0.036453939974308014,
0.059861622750759125,
0.03993426635861397,
-0.05604320764541626,
-0.0006755563081242144,
-0.050633784383535385,
0.022373531013727188,
-0.011862942948937416,
0.07521483302116394,
-0.008462166413664818,
0.0577535405755043,
-0.0218166783452034,
-0.0021304572001099586,
0.023009933531284332,
-0.04605964198708534,
0.0009036420378834009,
-0.02291049435734749,
-0.013066141866147518,
0.08114133775234222,
0.04605964198708534,
-0.01897275261580944,
0.018753990530967712,
-0.012777771800756454,
-0.012887153774499893,
0.030785977840423584,
-0.006552958395332098,
0.022751394659280777,
-0.008944439701735973,
0.036235176026821136,
0.007597056683152914,
-0.06268566101789474,
0.047650646418333054,
0.0396956130862236,
0.007676606997847557,
-0.0020484209526330233,
-0.01373237557709217,
0.00927258562296629,
0.1174958348274231,
-0.022811057046055794,
0.02466060221195221,
0.031143954023718834,
-0.0209217369556427,
0.016089053824543953,
-0.01338434312492609,
0.00458657369017601,
-0.031999118626117706,
0.0011833111057057977,
0.031482044607400894,
-0.0432753786444664,
-0.018753990530967712,
0.004673582036048174,
-0.040491119027137756,
0.09808555245399475,
-0.049559853971004486,
0.021558139473199844,
-0.06833373010158539,
-0.005121052265167236,
0.025475993752479553,
0.0008259561727754772,
-0.0028836994897574186,
-0.030746202915906906,
0.02056376077234745,
-0.017123209312558174,
0.013921307399868965,
0.013453949242830276,
-0.017232589423656464,
0.023149145767092705,
0.04490616172552109,
-0.038025058805942535,
-0.05679893493652344,
0.02376566082239151,
-0.04275830090045929,
0.010242104530334473,
-0.02483959123492241,
-0.019748369231820107,
0.006975569296628237,
-0.0009875427931547165,
-0.025297004729509354,
-0.003104948904365301,
-0.05449197441339493,
-0.012986591085791588,
0.006334194913506508,
0.041763924062252045,
0.009928875602781773,
-0.01968870684504509,
-0.035181134939193726,
-0.013274961151182652,
0.03180024400353432,
-0.010888451710343361,
-0.014498047530651093,
0.03651360049843788,
0.044229984283447266,
0.02326847054064274,
0.01722264662384987,
-0.02607262134552002,
-0.026112396270036697,
-0.0015649041160941124,
0.008263290859758854,
0.044587958604097366,
-0.01933073066174984,
-0.02517767995595932,
0.03882056102156639,
0.030109800398349762,
0.0393376387655735,
-0.025953294709324837,
0.07131686806678772,
-0.059662748128175735,
0.030567213892936707,
0.0591854453086853,
-0.0380847193300724,
0.03178035840392113,
-0.044627733528614044,
0.04482661187648773,
0.0018433303339406848,
-0.029652385041117668,
-0.017302196472883224,
0.01625809818506241,
0.055923882871866226,
0.0599013976752758,
-0.00580220203846693,
-0.029731934890151024,
-0.036971013993024826,
-0.05767398700118065,
0.04510503634810448,
-0.009998481720685959,
0.011584516614675522,
0.0022957727778702974,
-0.042638976126909256,
-0.03961606323719025,
-0.032555971294641495,
-0.02090184949338436,
0.09291478246450424,
-0.02396453730762005,
-0.04558233916759491,
-0.027802839875221252,
0.0056033264845609665,
-0.008138992823660374,
-0.08734626322984695,
-0.03136271610856056,
-0.0033833750057965517,
0.01572113297879696,
-0.13451960682868958,
0.01552225835621357,
0.0005180093576200306,
0.00878036767244339,
-0.03384866565465927,
-0.052940744906663895,
-0.010759182274341583,
-0.06881103664636612,
-0.02009640261530876,
0.03402765467762947,
0.017073489725589752,
0.019469942897558212,
-0.038025058805942535,
0.0758114606142044,
-0.015462595038115978,
-0.013205355033278465,
0.05707736313343048,
-0.05405445024371147,
0.004213681444525719,
0.003557391231879592,
0.036811914294958115,
-0.009874184615910053,
-0.08822131156921387,
-0.019032416865229607,
-0.010749238543212414,
0.009242753498256207,
-0.023626448586583138,
0.049758732318878174,
-0.04737222194671631,
-0.0692087858915329,
-0.03357023745775223,
0.025475993752479553,
0.025635093450546265,
0.0432753786444664,
-0.027703402563929558,
-0.04307650402188301,
-0.08678940683603287,
0.05154861509799957,
0.0216376893222332,
-0.03120361641049385,
0.02499869093298912,
-0.03854213282465935,
-0.0027594021521508694,
-0.0375477559864521,
-0.03762730583548546,
-0.002196334768086672,
0.0457812137901783,
-0.041047971695661545,
-0.057713765650987625,
-0.021041061729192734,
0.004894831217825413,
0.0299506988376379,
0.007070035673677921,
0.03277473524212837,
0.04916210472583771,
0.059344545006752014,
0.014080408029258251,
0.029055757448077202,
-0.007378293201327324,
-0.004894831217825413,
0.019231291487812996,
-0.01700388267636299,
-0.046218741685152054,
0.009779718704521656,
-0.0023827808909118176,
-0.0016680710250511765,
-0.0016332677332684398,
-0.007999779656529427,
0.07406135648488998,
-0.028677893802523613,
-0.014915687032043934,
-0.04804839938879013,
0.02680846117436886,
-0.0436333566904068,
-0.0005761184147559106,
-0.055088602006435394,
-0.033590126782655716,
0.13093984127044678,
0.0036344556137919426,
-0.04784952476620674,
-0.06916901469230652,
0.0027221129275858402,
-0.008462166413664818,
0.009168175049126148,
-0.013971026986837387,
-0.015979671850800514,
-0.001858245930634439,
-0.012648502364754677,
0.006229785270988941,
0.02945350855588913,
-0.023149145767092705,
-0.012737996876239777,
-0.02426285110414028,
0.0014430927112698555,
-0.045502789318561554,
-0.0022597266361117363,
0.033073049038648605,
-0.03462428227066994,
0.08814176172018051,
-0.0384426973760128,
0.010570250451564789,
-0.024879366159439087,
-0.017680060118436813,
-0.012688277289271355,
0.04092864319682121,
-0.004131645429879427,
-0.022751394659280777,
-0.021757015958428383,
-0.05393512174487114,
-0.07111799716949463,
-0.006557930260896683,
-0.04045134410262108,
0.04594031348824501,
-0.007268911227583885,
-0.00545416958630085,
0.022313866764307022,
-0.003701576264575124,
-0.002067065564915538,
0.011077383533120155,
-0.0027569159865379333,
0.03436574339866638,
-0.022751394659280777,
-0.018893202766776085,
-0.00270471116527915,
-0.03901943564414978,
-0.028996095061302185,
0.02555554360151291,
0.004802851006388664,
-0.00580220203846693,
0.052065689116716385,
0.029891036450862885,
-0.016079111024737358,
0.05636140704154968
] |
52,253 |
osmnx.plot
|
plot_orientation
|
Plot a polar histogram of a spatial network's bidirectional edge bearings.
Ignores self-loop edges as their bearings are undefined.
For more info see: Boeing, G. 2019. "Urban Spatial Order: Street Network
Orientation, Configuration, and Entropy." Applied Network Science, 4 (1),
67. https://doi.org/10.1007/s41109-019-0189-1
Parameters
----------
Gu : networkx.MultiGraph
undirected, unprojected graph with `bearing` attributes on each edge
num_bins : int
number of bins; for example, if `num_bins=36` is provided, then each
bin will represent 10 degrees around the compass
min_length : float
ignore edges with `length` attributes less than `min_length`
weight : string
if not None, weight edges' bearings by this (non-null) edge attribute
ax : matplotlib.axes.PolarAxesSubplot
if not None, plot on this preexisting axis; must have projection=polar
figsize : tuple
if ax is None, create new figure with size (width, height)
area : bool
if True, set bar length so area is proportional to frequency,
otherwise set bar length so height is proportional to frequency
color : string
color of histogram bars
edgecolor : string
color of histogram bar edges
linewidth : float
width of histogram bar edges
alpha : float
opacity of histogram bars
title : string
title for plot
title_y : float
y position to place title
title_font : dict
the title's fontdict to pass to matplotlib
xtick_font : dict
the xtick labels' fontdict to pass to matplotlib
Returns
-------
fig, ax : tuple
matplotlib figure, axis
|
def plot_orientation(
Gu,
num_bins=36,
min_length=0,
weight=None,
ax=None,
figsize=(5, 5),
area=True,
color="#003366",
edgecolor="k",
linewidth=0.5,
alpha=0.7,
title=None,
title_y=1.05,
title_font=None,
xtick_font=None,
):
"""
Plot a polar histogram of a spatial network's bidirectional edge bearings.
Ignores self-loop edges as their bearings are undefined.
For more info see: Boeing, G. 2019. "Urban Spatial Order: Street Network
Orientation, Configuration, and Entropy." Applied Network Science, 4 (1),
67. https://doi.org/10.1007/s41109-019-0189-1
Parameters
----------
Gu : networkx.MultiGraph
undirected, unprojected graph with `bearing` attributes on each edge
num_bins : int
number of bins; for example, if `num_bins=36` is provided, then each
bin will represent 10 degrees around the compass
min_length : float
ignore edges with `length` attributes less than `min_length`
weight : string
if not None, weight edges' bearings by this (non-null) edge attribute
ax : matplotlib.axes.PolarAxesSubplot
if not None, plot on this preexisting axis; must have projection=polar
figsize : tuple
if ax is None, create new figure with size (width, height)
area : bool
if True, set bar length so area is proportional to frequency,
otherwise set bar length so height is proportional to frequency
color : string
color of histogram bars
edgecolor : string
color of histogram bar edges
linewidth : float
width of histogram bar edges
alpha : float
opacity of histogram bars
title : string
title for plot
title_y : float
y position to place title
title_font : dict
the title's fontdict to pass to matplotlib
xtick_font : dict
the xtick labels' fontdict to pass to matplotlib
Returns
-------
fig, ax : tuple
matplotlib figure, axis
"""
_verify_mpl()
if title_font is None:
title_font = {"family": "DejaVu Sans", "size": 24, "weight": "bold"}
if xtick_font is None:
xtick_font = {
"family": "DejaVu Sans",
"size": 10,
"weight": "bold",
"alpha": 1.0,
"zorder": 3,
}
# get the bearings' distribution's bin counts and edges
bin_counts, bin_edges = bearing._bearings_distribution(Gu, num_bins, min_length, weight)
# positions: where to center each bar. ignore the last bin edge, because
# it's the same as the first (i.e., 0 degrees = 360 degrees)
positions = np.radians(bin_edges[:-1])
# width: make bars fill the circumference without gaps or overlaps
width = 2 * np.pi / num_bins
# radius: how long to make each bar. set bar length so either the bar area
# (ie, via sqrt) or the bar height is proportional to the bin's frequency
bin_frequency = bin_counts / bin_counts.sum()
radius = np.sqrt(bin_frequency) if area else bin_frequency
# create ax (if necessary) then set N at top and go clockwise
if ax is None:
fig, ax = plt.subplots(figsize=figsize, subplot_kw={"projection": "polar"})
else:
fig = ax.figure
ax.set_theta_zero_location("N")
ax.set_theta_direction("clockwise")
ax.set_ylim(top=radius.max())
# configure the y-ticks and remove their labels
ax.set_yticks(np.linspace(0, radius.max(), 5))
ax.set_yticklabels(labels="")
# configure the x-ticks and their labels
xticklabels = ["N", "", "E", "", "S", "", "W", ""]
ax.set_xticks(ax.get_xticks())
ax.set_xticklabels(labels=xticklabels, fontdict=xtick_font)
ax.tick_params(axis="x", which="major", pad=-2)
# draw the bars
ax.bar(
positions,
height=radius,
width=width,
align="center",
bottom=0,
zorder=2,
color=color,
edgecolor=edgecolor,
linewidth=linewidth,
alpha=alpha,
)
if title:
ax.set_title(title, y=title_y, fontdict=title_font)
fig.tight_layout()
return fig, ax
|
(Gu, num_bins=36, min_length=0, weight=None, ax=None, figsize=(5, 5), area=True, color='#003366', edgecolor='k', linewidth=0.5, alpha=0.7, title=None, title_y=1.05, title_font=None, xtick_font=None)
|
[
0.02968713827431202,
0.007921723648905754,
-0.04737572371959686,
-0.026718424633145332,
0.010576042346656322,
0.0030898330733180046,
-0.07124912738800049,
0.0027084359899163246,
-0.02457435242831707,
-0.01343136839568615,
0.009318462572991848,
0.03871697559952736,
0.023089995607733727,
0.0104420380666852,
-0.04358236864209175,
0.015018804930150509,
0.005032897461205721,
0.05929180979728699,
0.0022922491189092398,
-0.003293416928499937,
-0.03989209234714508,
-0.04079919680953026,
-0.02325492352247238,
0.01852353662252426,
-0.014926033094525337,
-0.05512736365199089,
-0.037686172872781754,
-0.03110964596271515,
-0.04989088326692581,
0.07219746708869934,
-0.010261647403240204,
-0.06939368695020676,
0.05092168599367142,
-0.01522496622055769,
0.03737692907452583,
-0.011813006363809109,
0.03836650028824806,
0.03671721741557121,
-0.04902501031756401,
0.060281381011009216,
0.04807667061686516,
-0.04704586789011955,
0.07627945393323898,
-0.014915725216269493,
0.051169078797101974,
0.03416082262992859,
-0.006591987796127796,
0.043870992958545685,
0.00816396251320839,
0.021131468936800957,
0.014008617959916592,
-0.04230416938662529,
-0.010478116571903229,
0.026017477735877037,
0.001743346219882369,
0.05566338449716568,
-0.0018696195911616087,
0.024821745231747627,
0.05001458153128624,
0.00797326397150755,
-0.012070707976818085,
0.01071004755795002,
0.012699497863650322,
-0.07479509711265564,
0.000347574008628726,
-0.008988605812191963,
0.01550328265875578,
-0.015358970500528812,
0.015090961940586567,
-0.034717459231615067,
0.03395466506481171,
0.054962437599897385,
0.05970413237810135,
0.006483753211796284,
0.01892554946243763,
-0.03405774384737015,
-0.009375156834721565,
0.015111577697098255,
-0.0012195692397654057,
0.03284139558672905,
0.02060575969517231,
0.039541617035865784,
0.06683728843927383,
-0.012915966100990772,
0.02979021705687046,
0.018482305109500885,
-0.021234549582004547,
0.026553494855761528,
0.04079919680953026,
-0.05772498995065689,
0.0060508158057928085,
-0.037892334163188934,
0.06663113087415695,
0.02739875391125679,
-0.03504731506109238,
-0.010699738748371601,
-0.03785109892487526,
-0.04317004606127739,
0.011266681365668774,
-0.05652925744652748,
-0.0906282365322113,
-0.027151361107826233,
-0.03304755687713623,
0.041685689240694046,
-0.031047798693180084,
0.009442158974707127,
-0.07009463012218475,
-0.01179239060729742,
-0.016162997111678123,
-0.013730301521718502,
0.003306301776319742,
0.009540085680782795,
0.0519937239587307,
0.019471876323223114,
-0.002350231632590294,
0.046386152505874634,
-0.005360177718102932,
-0.05706527456641197,
0.04906624183058739,
-0.02999637834727764,
0.011565613560378551,
0.000059995978517690673,
0.027769843116402626,
-0.030903484672307968,
0.01875031366944313,
0.04284019023180008,
-0.01892554946243763,
-0.012142864055931568,
-0.06815671920776367,
0.04457193985581398,
0.04576766863465309,
-0.021461326628923416,
0.0027393600903451443,
-0.0036954302340745926,
0.022244736552238464,
-0.008086652494966984,
-0.028862494975328445,
-0.016833018511533737,
0.008189733140170574,
0.011596538126468658,
0.03684091195464134,
-0.01686394400894642,
0.010555426590144634,
0.007504248525947332,
-0.051911257207393646,
0.048241596668958664,
0.012936582788825035,
-0.032222915440797806,
0.021935496479272842,
-0.07817612588405609,
-0.010792511515319347,
-0.014111698605120182,
0.02083253674209118,
0.02727505750954151,
0.032057985663414,
-0.0511278472840786,
-0.0194100271910429,
0.06766193360090256,
-0.051251545548439026,
0.06642497330904007,
-0.006545601412653923,
-0.03424328938126564,
0.04172692075371742,
-0.01956464909017086,
-0.047128330916166306,
-0.002968713641166687,
0.05566338449716568,
0.0028244012501090765,
0.03110964596271515,
-0.031233342364430428,
-0.03733569756150246,
-0.0452316515147686,
-0.11305851489305496,
-0.0031929134856909513,
-0.02111085318028927,
0.023646630346775055,
-0.015565130859613419,
-0.0030099458526819944,
-0.03337741270661354,
0.005638494621962309,
-0.00013698410475626588,
-0.06679605692625046,
0.026821503415703773,
-0.050962917506694794,
-0.026780271902680397,
0.03927360847592354,
0.07438277453184128,
-0.022450897842645645,
0.06959984451532364,
-0.019111094996333122,
-0.06089986488223076,
-0.009813248179852962,
-0.012905658222734928,
0.05520983040332794,
0.07632068544626236,
-0.05784868448972702,
0.06712591648101807,
0.001425085705704987,
-0.01714226044714451,
-0.07990787923336029,
0.08584530651569366,
-0.0016840749885886908,
-0.004409261513501406,
0.005022589582949877,
0.02869756706058979,
0.028780030086636543,
0.015730058774352074,
0.0136478366330266,
0.07364059239625931,
-0.026141174137592316,
0.03531532362103462,
-0.034634992480278015,
0.004130944609642029,
0.013019046746194363,
-0.07871214300394058,
0.03836650028824806,
-0.010740971192717552,
-0.039088062942028046,
0.024842360988259315,
-0.013400443829596043,
0.01575067639350891,
0.05364300683140755,
-0.012318100780248642,
-0.030264386907219887,
-0.02424449473619461,
0.017461810261011124,
0.004788081627339125,
-0.04040749371051788,
0.029192352667450905,
0.014524019323289394,
0.04382976144552231,
-0.013616912998259068,
0.02017282135784626,
0.009509161114692688,
-0.06386857479810715,
-0.025172218680381775,
-0.03226414695382118,
0.00842166319489479,
-0.03816034272313118,
0.05261220410466194,
-0.017307188361883163,
-0.030264386907219887,
-0.040077634155750275,
0.02488359436392784,
-0.033439259976148605,
-0.01457555964589119,
-0.003149104304611683,
0.024986673146486282,
-0.01979142427444458,
-0.07454770058393478,
-0.08242303878068924,
-0.026718424633145332,
0.010009100660681725,
-0.02752245031297207,
0.05471504479646683,
-0.03902621567249298,
-0.05487997084856033,
-0.036160584539175034,
0.03826342150568962,
-0.012194404378533363,
0.03282077983021736,
-0.02828524447977543,
-0.008519589900970459,
0.0006874169921502471,
0.06444583088159561,
-0.027316289022564888,
-0.018255528062582016,
0.026821503415703773,
-0.03805726021528244,
-0.00978232454508543,
-0.04803543910384178,
0.012184095568954945,
-0.04589136689901352,
-0.0162042286247015,
0.024636201560497284,
0.0512927770614624,
0.0869998037815094,
0.0029790217522531748,
0.009813248179852962,
0.011617153882980347,
-0.04667477682232857,
-0.007055849302560091,
0.01809060014784336,
0.05281836539506912,
-0.020110974088311195,
0.017667969688773155,
-0.023337388411164284,
-0.0177607424557209,
0.01413231436163187,
-0.011947011575102806,
0.012452105060219765,
-0.05698281154036522,
-0.02816154807806015,
0.029707754030823708,
0.018131831660866737,
0.008710288442671299,
0.024718664586544037,
-0.04026317968964577,
-0.011596538126468658,
-0.04803543910384178,
0.049107473343610764,
-0.017647353932261467,
0.09442158788442612,
-0.03512977808713913,
0.001340044429525733,
-0.011400685645639896,
0.07149652391672134,
-0.040077634155750275,
0.01984296552836895,
-0.0008323737420141697,
-0.029109887778759003,
0.048530224710702896,
0.08732966333627701,
0.04902501031756401,
-0.00311044929549098,
0.014462171122431755,
0.0041618687100708485,
-0.028759414330124855,
0.04139706492424011,
0.04848898947238922,
-0.013451984152197838,
0.019492492079734802,
-0.01625576987862587,
-0.021059313789010048,
-0.005638494621962309,
0.025192834436893463,
-0.027996620163321495,
0.05133400857448578,
0.001271109445951879,
0.0016286693280562758,
-0.07842352241277695,
0.016451621428132057,
-0.026491647586226463,
-0.010730663314461708,
-0.06312640011310577,
0.0009927925420925021,
0.037583090364933014,
0.01935848779976368,
-0.001751077244989574,
-0.06448706239461899,
0.03164566308259964,
-0.02111085318028927,
0.060611240565776825,
0.08060882240533829,
-0.007081619463860989,
0.019296638667583466,
-0.00044743309263139963,
-0.007978417910635471,
-0.00829281285405159,
0.05405532941222191,
0.047128330916166306,
0.09013345092535019,
-0.04960225895047188,
0.013287055306136608,
-0.009627703577280045,
-0.017771050333976746,
0.007576405070722103,
0.02500729076564312,
-0.036366742104291916,
0.0589207224547863,
-0.035397786647081375,
-0.04585013538599014,
-0.02915111929178238,
0.03816034272313118,
-0.018863702192902565,
-0.005504489876329899,
-0.016214536502957344,
0.039314839988946915,
0.031934287399053574,
-0.019193559885025024,
0.014709563925862312,
-0.04642738401889801,
-0.019956354051828384,
0.035624563694000244,
0.0011718946043401957,
0.05727143585681915,
0.025481458753347397,
-0.031934287399053574,
0.019471876323223114,
-0.0693112164735794,
0.02050267904996872,
0.004919508937746286,
-0.028244012966752052,
0.06275530904531479,
-0.0008471915498375893,
-0.060405079275369644,
-0.008983451873064041,
-0.006396134849637747,
-0.04741695523262024,
0.003463499480858445,
-0.01935848779976368,
-0.045520275831222534,
0.03966531530022621,
0.00904530007392168,
-0.07537234574556351,
0.01971926912665367,
0.003690276062116027,
0.02240966632962227,
-0.036057502031326294,
0.009802940301597118,
0.021667487919330597,
-0.10184337198734283,
-0.01971926912665367,
0.03098594956099987,
0.011565613560378551,
-0.03902621567249298,
0.033748503774404526,
-0.025151602923870087,
0.030408699065446854,
-0.06576525419950485,
0.034738074988126755,
0.011648078449070454,
0.002790900180116296,
0.005045782774686813,
0.011648078449070454,
0.03339802846312523,
-0.026285486295819283,
-0.08782444894313812,
0.0400364026427269,
-0.05586954206228256,
-0.009802940301597118,
0.01484356913715601,
0.03319186717271805,
0.051911257207393646,
0.04556151106953621,
0.019605880603194237,
0.01298812311142683,
0.033336181193590164,
-0.06403350830078125,
0.024656817317008972,
0.024388808757066727,
-0.02271890640258789,
-0.036160584539175034,
-0.020543910562992096,
-0.03055301308631897,
0.01951310783624649,
0.0037108922842890024,
0.002565411850810051,
-0.007329012267291546,
-0.01729688048362732,
-0.0049581644125282764,
0.026367951184511185,
-0.01838953234255314,
-0.054756276309490204,
-0.028965575620532036,
0.009524622932076454,
-0.04993211477994919,
-0.013070587068796158,
0.0015500705922022462,
-0.019379103556275368,
-0.010168875567615032,
0.0013361788587644696,
0.04395345598459244,
-0.009735938161611557,
-0.015678519383072853,
-0.004736541770398617,
0.02401771955192089,
-0.008287658914923668,
-0.02925419993698597,
-0.003917052876204252,
0.08551544696092606,
-0.000737668655347079,
-0.056611720472574234,
-0.005700342822819948,
0.014307551085948944,
0.00856082234531641,
0.0734756663441658,
0.0035382325295358896,
-0.03482053801417351,
0.03772740438580513,
0.04601506143808365,
0.019090479239821434,
0.012812886387109756,
0.03531532362103462,
-0.014596176333725452,
0.015554822981357574,
0.022450897842645645,
0.019904812797904015,
-0.06527046859264374,
-0.034717459231615067,
-0.03461437672376633,
-0.0029300586320459843,
-0.04284019023180008,
0.05294206365942955,
0.00830827560275793,
0.03127457574009895,
0.006756916176527739,
-0.03150135278701782,
-0.018100908026099205,
-0.008334045298397541,
-0.00040362394065596163,
-0.027254441753029823,
-0.05211741849780083,
0.07500125467777252,
0.035603947937488556,
0.04362360015511513,
0.023419853299856186,
-0.07961925119161606,
0.0015745521523058414,
-0.04242786765098572,
0.01890493370592594,
-0.0344906821846962,
0.031130261719226837,
-0.05360177531838417,
0.02358478121459484,
-0.03925299271941185,
-0.015760984271764755,
-0.0290274228900671,
-0.017533965408802032,
-0.010462654754519463,
-0.005824039224535227,
-0.017183491960167885,
0.06188943609595299,
-0.006169358268380165,
-0.00461799930781126,
0.020059434697031975,
-0.01805967465043068,
-0.007746487390249968,
0.00570549676194787,
-0.0027677069883793592,
-0.01943064294755459,
-0.009457620792090893,
-0.004636038094758987,
-0.010421422310173512,
-0.024821745231747627,
0.026182405650615692,
0.009210227988660336,
-0.023296156898140907,
-0.004321643151342869,
-0.006210590247064829,
-0.050179507583379745,
0.03595442324876785,
-0.02770799584686756,
0.020059434697031975,
0.025914397090673447,
0.027130745351314545,
-0.010813127271831036,
-0.010029717348515987,
0.015090961940586567,
-0.002685242798179388,
-0.005556030198931694,
0.03727385029196739,
0.020152205601334572,
-0.042345404624938965,
0.05252974107861519,
0.04022194817662239,
0.05273590236902237,
-0.05916811525821686,
0.09021591395139694,
-0.03426390513777733,
0.03383096680045128,
0.041685689240694046,
-0.021440710872411728,
-0.008261889219284058,
0.001528166001662612,
-0.015616671182215214,
0.01185423880815506,
-0.01179239060729742,
-0.016575317829847336,
0.008736059069633484,
0.001191222108900547,
0.00849897414445877,
-0.043541133403778076,
-0.017420576885342598,
0.013070587068796158,
0.044200848788022995,
0.024533120915293694,
-0.02037898264825344,
-0.011988243088126183,
0.0179359782487154,
-0.03455252945423126,
0.04199492931365967,
0.004321643151342869,
-0.06720837950706482,
0.009978177025914192,
-0.03358357399702072,
0.029542824253439903,
-0.010957440361380577,
-0.05145770311355591,
-0.0580548457801342,
-0.003228991525247693,
0.013421060517430305,
-0.01933787204325199,
-0.0452316515147686,
0.05500366911292076,
0.06428089737892151,
0.014276626519858837,
0.07248609513044357,
0.05075675994157791,
0.003765009343624115,
-0.044530704617500305,
-0.047788046300411224,
0.03927360847592354,
-0.0629202350974083,
0.000011203946996829472,
0.011194524355232716,
-0.021667487919330597,
-0.06997093558311462,
-0.02826462872326374,
0.038016028702259064,
0.047128330916166306,
0.0070352330803871155,
-0.013400443829596043,
0.019008014351129532,
-0.0033501109573990107,
0.03405774384737015,
0.07421784102916718,
-0.010168875567615032,
-0.04362360015511513,
-0.05727143585681915,
-0.04556151106953621,
0.008998913690447807,
0.030841637402772903,
-0.02915111929178238,
0.036490440368652344,
-0.05694158002734184,
-0.026553494855761528,
-0.0025963359512388706,
-0.002104127313941717,
0.09541115909814835,
-0.004937548190355301,
-0.03710892051458359,
-0.02642979845404625,
0.021667487919330597,
-0.04585013538599014,
-0.00018973225087393075,
0.0030975642148405313,
0.017647353932261467,
-0.0011854239273816347,
-0.007524864748120308,
0.040489956736564636,
-0.07058941572904587,
0.003409382188692689,
-0.03323310241103172,
-0.022038577124476433,
-0.009916328825056553,
0.020719148218631744,
-0.01467864029109478,
0.030903484672307968,
-0.004731387365609407,
0.03141888603568077,
-0.025605155155062675,
-0.011122368276119232,
0.04770557954907417,
0.06576525419950485,
0.04317004606127739,
-0.008334045298397541,
0.03319186717271805,
0.003040869953110814,
-0.02793477103114128,
-0.004486571531742811,
0.027254441753029823,
-0.02478051371872425,
0.028676949441432953,
-0.01599806919693947,
0.014565251767635345,
0.02001820132136345,
-0.02915111929178238,
-0.02327554114162922,
-0.011709926649928093,
0.004509764723479748,
-0.023358004167675972,
0.017286572605371475,
0.04292265325784683,
0.0391705296933651,
-0.03405774384737015,
-0.04700463265180588,
0.012699497863650322,
0.01060696691274643,
-0.06098232790827751,
0.08535052090883255,
-0.05751882866024971,
-0.007097081281244755,
-0.01385399792343378,
-0.04721079394221306,
0.06143588200211525,
-0.009303000755608082,
0.02109023742377758,
0.02414141595363617,
-0.027893539518117905,
0.018183371052145958,
-0.008055728860199451,
-0.02847079001367092,
-0.02913050353527069,
0.03012007474899292,
0.05916811525821686,
0.016018684953451157,
-0.04304634779691696,
-0.011204833164811134,
-0.008937065489590168,
0.035933807492256165,
-0.0035279246512800455,
0.033542342483997345,
0.019863581284880638,
0.05871456116437912,
0.017338113859295845,
-0.02337861992418766,
0.017977211624383926,
0.08279412984848022,
-0.029707754030823708,
0.08972112834453583,
-0.05929180979728699,
0.013833381235599518,
0.04271649196743965,
-0.033975280821323395,
-0.03341864421963692,
-0.02249212935566902,
-0.0007054560701362789,
-0.027213210240006447,
-0.0018348300363868475,
-0.03677906468510628,
0.0722799301147461,
0.04547904431819916,
-0.050715524703264236,
-0.006488907150924206,
-0.006401288788765669,
-0.07879461348056793,
0.026347335427999496,
-0.010318341664969921,
-0.0493960976600647,
-0.028780030086636543,
0.061477113515138626,
0.013317979872226715,
0.02521345019340515,
0.06139465048909187,
-0.04325250908732414,
0.04840652644634247,
0.009143225848674774,
-0.06881643086671829,
-0.027151361107826233,
0.04415961727499962,
0.015482666902244091,
-0.03502669930458069,
0.015420818701386452,
-0.0355214849114418,
0.07442400604486465,
0.03566579893231392,
0.016977332532405853,
0.01014825887978077,
0.05145770311355591,
0.034531913697719574,
-0.033975280821323395,
-0.07796996831893921,
-0.03644920885562897,
0.03146011754870415,
-0.025048522278666496,
-0.020471755415201187,
0.014792028814554214,
0.015616671182215214,
0.019698653370141983,
0.03216106444597244,
0.03424328938126564,
-0.02240966632962227,
0.04185061901807785,
-0.03209921717643738,
-0.0003195490571670234,
0.04737572371959686,
0.018709082156419754,
-0.008638132363557816,
-0.05228234827518463,
-0.04079919680953026,
0.030924102291464806,
0.006159050390124321,
0.017698893323540688,
-0.008669056929647923,
0.05925057828426361,
-0.024203263223171234,
0.010302879847586155
] |
52,254 |
osmnx.folium
|
plot_route_folium
|
Do not use: deprecated.
You can generate and explore interactive web maps of graph nodes, edges,
and/or routes automatically using GeoPandas.GeoDataFrame.explore instead,
for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the
OSMnx examples gallery for complete details and demonstrations.
Parameters
----------
G : networkx.MultiDiGraph
deprecated
route : list
deprecated
route_map : folium.folium.Map
deprecated
popup_attribute : string
deprecated
tiles : string
deprecated
zoom : int
deprecated
fit_bounds : bool
deprecated
kwargs
deprecated
Returns
-------
folium.folium.Map
|
def plot_route_folium(
G,
route,
route_map=None,
popup_attribute=None,
tiles="cartodbpositron",
zoom=1,
fit_bounds=True,
**kwargs,
):
"""
Do not use: deprecated.
You can generate and explore interactive web maps of graph nodes, edges,
and/or routes automatically using GeoPandas.GeoDataFrame.explore instead,
for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the
OSMnx examples gallery for complete details and demonstrations.
Parameters
----------
G : networkx.MultiDiGraph
deprecated
route : list
deprecated
route_map : folium.folium.Map
deprecated
popup_attribute : string
deprecated
tiles : string
deprecated
zoom : int
deprecated
fit_bounds : bool
deprecated
kwargs
deprecated
Returns
-------
folium.folium.Map
"""
warn(
"The `folium` module has been deprecated and will be removed in the v2.0.0 release. "
"You can generate and explore interactive web maps of graph nodes, edges, "
"and/or routes automatically using GeoPandas.GeoDataFrame.explore instead, "
"for example like: `ox.graph_to_gdfs(G, nodes=False).explore()`. See the "
"OSMnx examples gallery for complete details and demonstrations.",
FutureWarning,
stacklevel=2,
)
# create gdf of the route edges in order
node_pairs = zip(route[:-1], route[1:])
uvk = ((u, v, min(G[u][v].items(), key=lambda k: k[1]["length"])[0]) for u, v in node_pairs)
gdf_edges = convert.graph_to_gdfs(G.subgraph(route), nodes=False).loc[uvk]
return _plot_folium(gdf_edges, route_map, popup_attribute, tiles, zoom, fit_bounds, **kwargs)
|
(G, route, route_map=None, popup_attribute=None, tiles='cartodbpositron', zoom=1, fit_bounds=True, **kwargs)
|
[
0.05758912116289139,
0.054642364382743835,
0.010959395207464695,
-0.023155702278017998,
-0.027703169733285904,
-0.020390842109918594,
-0.025756852701306343,
0.0184172410517931,
-0.019244879484176636,
0.004047245718538761,
0.008294579572975636,
0.03436066210269928,
-0.01296937558799982,
0.02719385176897049,
0.013851584866642952,
0.030740877613425255,
-0.044419657438993454,
-0.061845552176237106,
0.0028853677213191986,
-0.006930339615792036,
0.04391033947467804,
-0.007280494552105665,
0.05878965184092522,
-0.013687876053154469,
-0.008280937559902668,
-0.03612507879734039,
-0.00005417880674940534,
0.05198664218187332,
-0.009686104953289032,
0.022337157279253006,
-0.011714274995028973,
-0.08054473251104355,
-0.05857137590646744,
0.030959155410528183,
-0.013842489570379257,
-0.0003450390649959445,
-0.020245322957634926,
0.00944054126739502,
-0.025702282786369324,
-0.04522000998258591,
0.005506982561200857,
-0.0025238441303372383,
-0.0639919564127922,
-0.015297679230570793,
0.031031914055347443,
-0.006862127687782049,
-0.03145028278231621,
0.043328266590833664,
-0.00033821785473264754,
-0.050640594214200974,
0.0129602812230587,
0.005579742137342691,
-0.025720473378896713,
0.020627310499548912,
0.027721358463168144,
0.03657982498407364,
-0.006698418874293566,
0.06122709438204765,
0.07225015759468079,
-0.03028612956404686,
-0.03743474930524826,
-0.03339659795165062,
-0.016634633764624596,
-0.010531933978199959,
0.04503811150789261,
-0.0077215987257659435,
-0.0027330275624990463,
-0.002878546714782715,
0.01256919838488102,
0.012114452198147774,
-0.01653458923101425,
0.046238645911216736,
-0.0008355970494449139,
-0.0063118841499090195,
0.005588836967945099,
0.03106829524040222,
0.0455838106572628,
-0.030977346003055573,
-0.0025306653697043657,
0.008189988322556019,
-0.030831826850771904,
-0.028776371851563454,
0.0055297198705375195,
-0.015652380883693695,
-0.016543684527277946,
0.0016984789399430156,
0.04656606167554855,
-0.010177231393754482,
-0.021173005923628807,
-0.023828726261854172,
-0.01758960261940956,
-0.0018337661167606711,
-0.05224129930138588,
-0.04372844099998474,
-0.040126848965883255,
-0.05489702150225639,
0.0034947283565998077,
0.025593144819140434,
0.005397843196988106,
-0.015097590163350105,
0.04376482218503952,
-0.034742649644613266,
-0.003324198303744197,
0.10251809656620026,
0.01253281906247139,
-0.09997151792049408,
-0.06646578013896942,
0.009163145907223225,
0.003324198303744197,
0.004224597010761499,
-0.05278699845075607,
0.025538574904203415,
0.06140899285674095,
0.005852589849382639,
-0.01207807194441557,
0.08898483216762543,
0.045365530997514725,
-0.02506563812494278,
0.021700512617826462,
-0.06857579946517944,
-0.023464929312467575,
0.05340545251965523,
-0.0015393175417557359,
-0.06744802743196487,
-0.028685422614216805,
0.02492011897265911,
-0.016298120841383934,
-0.012314540334045887,
-0.01818077266216278,
-0.00784892775118351,
0.062027450650930405,
-0.02917654812335968,
0.041290998458862305,
0.07647020369768143,
-0.006680229213088751,
-0.019554108381271362,
-0.03366944566369057,
-0.01893565244972706,
0.03961753100156784,
0.050604213029146194,
-0.024338044226169586,
-0.0461295060813427,
-0.05802568048238754,
0.03668896481394768,
0.012205401435494423,
-0.02713928371667862,
-0.05540633946657181,
-0.00494764419272542,
-0.004388305824249983,
-0.07603365182876587,
-0.03221425786614418,
-0.014369995333254337,
-0.03106829524040222,
0.01625264622271061,
0.015324964188039303,
-0.01605255901813507,
0.04980385676026344,
0.0684666633605957,
0.0482759103178978,
-0.014888406731188297,
0.04984023794531822,
0.004049519542604685,
-0.003412873949855566,
0.030777256935834885,
-0.009513300843536854,
-0.041290998458862305,
0.05111352726817131,
0.005084068048745394,
-0.002282828325405717,
0.047511935234069824,
-0.027521269395947456,
-0.0025192967150360346,
0.05318717285990715,
-0.030649928376078606,
0.0455838106572628,
0.026520827785134315,
0.025647714734077454,
-0.0016302668955177069,
0.03106829524040222,
0.008817538619041443,
-0.0172530896961689,
-0.022300777956843376,
-0.014597369357943535,
0.041181862354278564,
-0.023264840245246887,
0.020518170669674873,
-0.009149503894150257,
-0.03878079727292061,
-0.037070952355861664,
-0.02091834880411625,
-0.03439703956246376,
-0.0241379551589489,
0.013396837748587132,
0.01396981906145811,
0.002751217456534505,
-0.009949857369065285,
-0.0022089320700615644,
-0.051513705402612686,
0.006339169107377529,
0.04598398506641388,
0.022482676431536674,
0.023301221430301666,
-0.01348778698593378,
0.0023112501949071884,
-0.003162763314321637,
0.004108636640012264,
-0.007808000780642033,
-0.024774599820375443,
0.016225362196564674,
-0.002985412022098899,
0.003553845454007387,
0.03366944566369057,
0.10099014639854431,
-0.016834722831845284,
0.029995093122124672,
0.005175017286092043,
-0.06533800810575485,
0.03346935659646988,
-0.01780788041651249,
-0.0004021666245535016,
0.03150485083460808,
0.011295908130705357,
-0.024629080668091774,
0.03423333168029785,
0.005820757709443569,
-0.0034424324985593557,
0.018399052321910858,
-0.020336272194981575,
-0.004811219871044159,
0.041181862354278564,
0.023355791345238686,
-0.03225063532590866,
0.0584622360765934,
-0.03114105388522148,
-0.011305002495646477,
-0.013733350671827793,
-0.01253281906247139,
0.07112238556146622,
-0.01610712893307209,
0.02404700592160225,
-0.02595694176852703,
-0.005306893959641457,
-0.056861527264118195,
0.0682847648859024,
0.025702282786369324,
0.03014061041176319,
-0.08214544504880905,
-0.019026601687073708,
0.06017208471894264,
0.0019110729917883873,
-0.015552337281405926,
0.02908559888601303,
-0.029849573969841003,
0.02510201744735241,
-0.005888969637453556,
-0.05340545251965523,
-0.04769383370876312,
-0.024483561515808105,
-0.03363306447863579,
0.0280669666826725,
-0.01094120554625988,
-0.009058554656803608,
-0.01808982342481613,
0.01562509685754776,
0.07610640674829483,
-0.03161399066448212,
-0.04038150608539581,
0.0007884170627221465,
-0.004097267985343933,
-0.002041812753304839,
0.038999076932668686,
0.028685422614216805,
-0.01514306478202343,
0.03863527998328209,
0.07676124572753906,
-0.05424218624830246,
0.007184997666627169,
-0.04562018811702728,
0.022628195583820343,
-0.03983581066131592,
-0.06450127065181732,
-0.00022467329108621925,
-0.04871246591210365,
0.0457657091319561,
-0.08287303894758224,
0.07163169980049133,
0.029685864225029945,
0.1047736406326294,
0.027302991598844528,
-0.023519499227404594,
0.0538056306540966,
0.015024830587208271,
0.009476921521127224,
0.01718033105134964,
0.01777150109410286,
0.024247093126177788,
0.009013080038130283,
0.0005420012166723609,
0.00213389890268445,
-0.01038641482591629,
0.04802125319838524,
0.00842190906405449,
0.1071019396185875,
-0.011041250079870224,
0.023464929312467575,
0.021336715668439865,
-0.010140851140022278,
0.020299892872571945,
0.014970261603593826,
0.05278699845075607,
0.03476083651185036,
0.04369206354022026,
-0.04973109811544418,
-0.011532376520335674,
-0.020390842109918594,
0.04692985862493515,
0.0012187211541458964,
-0.025702282786369324,
0.01308760978281498,
-0.036034129559993744,
-0.022155258804559708,
0.024210713803768158,
0.0007696587708778679,
-0.0036698058247566223,
0.008558332920074463,
-0.005657048895955086,
0.04176393523812294,
-0.02826705574989319,
0.07377810776233673,
-0.04034512862563133,
-0.01612531766295433,
0.04980385676026344,
-0.00892212986946106,
0.028467142954468727,
-0.05195026472210884,
0.06999461352825165,
-0.032869093120098114,
-0.017926115542650223,
-0.027466701343655586,
0.017516842111945152,
0.01871737465262413,
0.07046754658222198,
0.001015790388919413,
0.02903102897107601,
-0.047511935234069824,
0.046420544385910034,
-0.017116665840148926,
-0.012914806604385376,
-0.0545332245528698,
-0.041254620999097824,
0.01793520897626877,
0.02310113236308098,
-0.007180450484156609,
0.0014404101530089974,
-0.006316431798040867,
0.0455838106572628,
0.045401912182569504,
0.0017155319219455123,
-0.004245060496032238,
0.0479121133685112,
0.011650610715150833,
-0.02391967549920082,
-0.040017709136009216,
-0.03943563252687454,
-0.008490120992064476,
-0.009586060419678688,
0.02184603177011013,
0.048566948622465134,
0.01808982342481613,
-0.0241379551589489,
0.00905400700867176,
0.020190753042697906,
-0.005097710527479649,
-0.006057226099073887,
-0.00003590012056520209,
0.029704054817557335,
0.06511972844600677,
0.017616886645555496,
-0.040163230150938034,
0.004620226565748453,
-0.03947201371192932,
-0.007239567581564188,
0.03637973591685295,
-0.000403587706387043,
0.027739549055695534,
-0.031850457191467285,
0.07305050641298294,
0.014979355968534946,
0.02390148676931858,
-0.04263705015182495,
-0.03305099159479141,
-0.001016927300952375,
0.06544714421033859,
0.0303952693939209,
0.010522838681936264,
-0.021136626601219177,
0.03758026659488678,
0.0028353456873446703,
0.05733446404337883,
-0.04674796015024185,
0.012405489571392536,
0.008153608068823814,
-0.009613345377147198,
-0.005334178917109966,
0.028721801936626434,
0.002985412022098899,
-0.015061210840940475,
-0.04351016506552696,
0.04925816133618355,
-0.08396442979574203,
0.05522444099187851,
-0.011232243850827217,
-0.054642364382743835,
0.0016314038075506687,
-0.0010078323539346457,
0.02719385176897049,
-0.007385086268186569,
0.03252348303794861,
0.01873556338250637,
-0.009704294614493847,
0.05420580506324768,
-0.0021816473454236984,
0.010040807537734509,
-0.008790253661572933,
0.04059978574514389,
-0.07552433013916016,
0.00037061856710352004,
0.013887964189052582,
0.005356916226446629,
0.07501501590013504,
-0.03721646964550018,
-0.053769249469041824,
0.0036152363754808903,
-0.029540345072746277,
-0.00602084631100297,
-0.021627752110362053,
-0.02202793024480343,
-0.02704833447933197,
0.021209385246038437,
0.009395066648721695,
0.06511972844600677,
-0.06504696607589722,
0.0311956238001585,
-0.022391727194190025,
0.008640186861157417,
-0.02304656244814396,
-0.010259085334837437,
-0.007735241204500198,
0.07254119217395782,
0.008144513703882694,
-0.00016157719073817134,
0.005056783091276884,
-0.018389957025647163,
0.030795445665717125,
0.015215824358165264,
-0.020536361262202263,
-0.03863527998328209,
-0.004436054266989231,
-0.0790167897939682,
0.00034702857374213636,
0.009290475398302078,
-0.031031914055347443,
-0.005393296014517546,
-0.025738663971424103,
-0.00005424986011348665,
0.04893074557185173,
0.07566984742879868,
-0.020008854568004608,
-0.04263705015182495,
-0.02273733541369438,
0.056133933365345,
-0.056788768619298935,
-0.013660591095685959,
-0.07297775149345398,
0.06642939895391464,
0.09000346809625626,
-0.04489259421825409,
0.02099110744893551,
-0.01244186982512474,
-0.01973600685596466,
0.026593586429953575,
-0.0639919564127922,
0.024610891938209534,
0.0011266350047662854,
-0.016889292746782303,
0.0541694276034832,
0.0219915509223938,
-0.006475592963397503,
-0.009604250080883503,
-0.009758864529430866,
-0.03243253380060196,
-0.0157342366874218,
-0.00364706851541996,
-0.02408338524401188,
0.05518805980682373,
0.09335040301084518,
0.08651100844144821,
-0.015415913425385952,
-0.03643430396914482,
-0.04871246591210365,
-0.04882160574197769,
0.033869534730911255,
0.05315079540014267,
0.035961367189884186,
0.022082500159740448,
-0.017353134229779243,
0.0003097961889579892,
0.020154373720288277,
-0.025484004989266396,
0.007917139679193497,
-0.02617521956562996,
-0.04154565930366516,
0.09589698165655136,
0.05533357709646225,
-0.009131313301622868,
0.03141390159726143,
-0.03255986422300339,
-0.026666346937417984,
-0.038999076932668686,
-0.0259205624461174,
0.032850902527570724,
-0.030740877613425255,
0.02693919464945793,
-0.0334329791367054,
-0.04729365557432175,
0.001275564543902874,
0.07203187793493271,
0.00043314622598700225,
0.023464929312467575,
-0.012942090630531311,
0.0091176712885499,
0.0892031118273735,
-0.022755524143576622,
0.016925672069191933,
0.027321182191371918,
-0.03619783744215965,
0.016152603551745415,
-0.03525196388363838,
-0.02484736032783985,
-0.047402795404195786,
-0.014470039866864681,
0.02823067456483841,
-0.029740434139966965,
0.012641957961022854,
0.021136626601219177,
-0.027393940836191177,
0.05602479353547096,
-0.052641477435827255,
0.06868494302034378,
-0.06413747370243073,
0.02502925880253315,
0.0774160772562027,
-0.03436066210269928,
-0.023519499227404594,
-0.04198221489787102,
0.05489702150225639,
-0.03990856930613518,
0.010604692623019218,
-0.023628639057278633,
-0.04496535286307335,
-0.013596925884485245,
0.0010351171949878335,
-0.006630206946283579,
-0.017516842111945152,
-0.004838504828512669,
-0.017507748678326607,
0.002526117954403162,
-0.023228460922837257,
-0.02073645032942295,
0.03457893803715706,
0.04300084710121155,
-0.07337792962789536,
0.006107248365879059,
-0.05078611150383949,
-0.0009401888237334788,
-0.013360458426177502,
0.05802568048238754,
-0.0009492837125435472,
0.04503811150789261,
0.02506563812494278,
-0.053769249469041824,
0.02912197820842266,
0.0032332490663975477,
0.03885355964303017,
0.006129985675215721,
0.05711618438363075,
0.03543386235833168,
0.02604789100587368,
-0.02619341015815735,
-0.03856252133846283,
0.04049064591526985,
-0.04187307506799698,
0.06290056556463242,
-0.03958115354180336,
-0.047511935234069824,
-0.005379653535783291,
0.015761520713567734,
0.0377257876098156,
-0.0034856335259974003,
0.06657491624355316,
-0.04238239303231239,
-0.005807115230709314,
0.04936730116605759,
-0.06675681471824646,
0.0019440421601757407,
-0.00999533198773861,
0.004965833853930235,
0.02391967549920082,
-0.05129542946815491,
0.0038767156656831503,
-0.004474707413464785,
0.00937687698751688,
0.029722243547439575,
0.015461388044059277,
-0.05205940082669258,
-0.043182745575904846,
-0.04092720150947571,
0.019335830584168434,
-0.008890298195183277,
-0.04485621303319931,
-0.04496535286307335,
-0.06762992590665817,
-0.03035889007151127,
-0.04867608845233917,
0.03514282405376434,
0.027703169733285904,
-0.0355793833732605,
-0.01146871130913496,
-0.0237741582095623,
0.05857137590646744,
-0.03958115354180336,
-0.04489259421825409,
-0.055806513875722885,
-0.01734403893351555,
0.0249383095651865,
-0.10913921147584915,
0.0014256308786571026,
-0.002851261757314205,
-0.018226247280836105,
-0.001393798622302711,
-0.05540633946657181,
0.023755967617034912,
-0.03032251074910164,
-0.050567831844091415,
0.05635220929980278,
0.0016871102852746844,
0.03659801557660103,
0.021609563380479813,
0.06948529928922653,
-0.043328266590833664,
-0.01782607100903988,
0.04067254438996315,
-0.017671456560492516,
0.040199607610702515,
0.03568851947784424,
0.03015880100429058,
-0.02171870321035385,
-0.06126347556710243,
0.005784377921372652,
0.021573184058070183,
0.008089943788945675,
-0.01507940050214529,
0.012223591096699238,
-0.053732868283987045,
-0.10470087826251984,
-0.04911264404654503,
0.041145481169223785,
-0.010759307071566582,
0.03965391218662262,
-0.015515957027673721,
-0.003672079648822546,
-0.04376482218503952,
0.028467142954468727,
0.005547909531742334,
-0.016898388043045998,
0.006789368111640215,
-0.032978229224681854,
-0.004179122392088175,
-0.04300084710121155,
0.00622093491256237,
0.003335566958412528,
0.083673395216465,
-0.055588237941265106,
-0.050604213029146194,
-0.006994004361331463,
0.032741762697696686,
0.005707071162760258,
0.028630852699279785,
0.00839462410658598,
0.04685709998011589,
0.05187750235199928,
-0.028958270326256752,
-0.01347869262099266,
0.012951185926795006,
0.03563395142555237,
0.03625240549445152,
-0.04307360574603081,
0.00015333489864133298,
0.05347821116447449,
0.0033105560578405857,
-0.024483561515808105,
0.041290998458862305,
0.004056340549141169,
0.08090852946043015,
0.0119780283421278,
-0.07756159454584122,
-0.04882160574197769,
0.005056783091276884,
-0.016834722831845284,
-0.0025056542363017797,
-0.03747112676501274,
-0.03739836812019348,
0.07858023047447205,
0.0012812488712370396,
-0.02288285456597805,
-0.03739836812019348,
-0.017998874187469482,
-0.015525052323937416,
0.028485333546996117,
-0.027684979140758514,
0.015861565247178078,
-0.07355982810258865,
0.011423236690461636,
0.029558535665273666,
0.023428549990057945,
0.019062981009483337,
-0.0645376518368721,
-0.0055297198705375195,
-0.00906310137361288,
-0.03037707880139351,
-0.007808000780642033,
0.003526560729369521,
-0.047475554049015045,
0.040272366255521774,
0.008285485208034515,
-0.013033040799200535,
-0.06551990658044815,
0.023264840245246887,
-0.04729365557432175,
-0.008585617877542973,
-0.0013574189506471157,
-0.020172564312815666,
0.024556322023272514,
-0.0032377964816987514,
-0.046384163200855255,
-0.0002624741173349321,
-0.049658339470624924,
0.03014061041176319,
-0.026757296174764633,
0.029885953292250633,
-0.003685721894726157,
-0.0482759103178978,
0.015425007790327072,
0.005029498599469662,
0.0020531814079731703,
0.013778825290501118,
-0.05114990845322609,
-0.028903700411319733,
0.0013881142949685454,
-0.01571604609489441,
-0.039035458117723465,
0.04376482218503952,
0.012178116478025913,
-0.043364644050598145,
0.020136183127760887,
0.04500173404812813,
-0.0319959782063961,
0.02819429524242878
] |
52,255 |
osmnx.projection
|
project_gdf
|
Project a GeoDataFrame from its current CRS to another.
If `to_latlong` is `True`, this projects the GeoDataFrame to the CRS
defined by `settings.default_crs`, otherwise it projects it to the CRS
defined by `to_crs`. If `to_crs` is `None`, it projects it to the CRS of
an appropriate UTM zone given `gdf`'s bounds.
Parameters
----------
gdf : geopandas.GeoDataFrame
the GeoDataFrame to be projected
to_crs : string or pyproj.CRS
if None, project to an appropriate UTM zone, otherwise project to
this CRS
to_latlong : bool
if True, project to `settings.default_crs` and ignore `to_crs`
Returns
-------
gdf_proj : geopandas.GeoDataFrame
the projected GeoDataFrame
|
def project_gdf(gdf, to_crs=None, to_latlong=False):
"""
Project a GeoDataFrame from its current CRS to another.
If `to_latlong` is `True`, this projects the GeoDataFrame to the CRS
defined by `settings.default_crs`, otherwise it projects it to the CRS
defined by `to_crs`. If `to_crs` is `None`, it projects it to the CRS of
an appropriate UTM zone given `gdf`'s bounds.
Parameters
----------
gdf : geopandas.GeoDataFrame
the GeoDataFrame to be projected
to_crs : string or pyproj.CRS
if None, project to an appropriate UTM zone, otherwise project to
this CRS
to_latlong : bool
if True, project to `settings.default_crs` and ignore `to_crs`
Returns
-------
gdf_proj : geopandas.GeoDataFrame
the projected GeoDataFrame
"""
if gdf.crs is None or len(gdf) < 1: # pragma: no cover
msg = "GeoDataFrame must have a valid CRS and cannot be empty"
raise ValueError(msg)
# if to_latlong is True, project the gdf to the default_crs
if to_latlong:
to_crs = settings.default_crs
# else if to_crs is None, project gdf to an appropriate UTM zone
elif to_crs is None:
to_crs = gdf.estimate_utm_crs()
# project the gdf
gdf_proj = gdf.to_crs(to_crs)
crs_desc = f"{gdf_proj.crs.to_string()} / {gdf_proj.crs.name}"
utils.log(f"Projected GeoDataFrame to {crs_desc!r}")
return gdf_proj
|
(gdf, to_crs=None, to_latlong=False)
|
[
0.011033407412469387,
-0.005000624805688858,
-0.020607557147741318,
0.015784891322255135,
-0.03715766966342926,
0.0013713903026655316,
-0.004920543637126684,
-0.016754763200879097,
0.03826100751757622,
-0.05385014787316322,
0.015420076437294483,
0.023775212466716766,
-0.013186701573431492,
0.05669747665524483,
-0.004520137794315815,
0.0037015301641076803,
-0.02761911042034626,
-0.027512334287166595,
0.05100281536579132,
0.03164096549153328,
0.022422730922698975,
-0.041784580796957016,
0.031053703278303146,
-0.030840152874588966,
-0.012768499553203583,
-0.012136748060584068,
0.0018919178983196616,
-0.001975335879251361,
0.013551515527069569,
0.025056513026356697,
0.0409659743309021,
-0.015615830197930336,
-0.025554794818162918,
0.005863721948117018,
0.024825166910886765,
0.030555419623851776,
-0.00020882280659861863,
0.027992822229862213,
0.01762675866484642,
-0.047158919274806976,
-0.08371152728796005,
-0.02854449301958084,
-0.003732672892510891,
-0.020892290398478508,
0.015624728053808212,
-0.004755932372063398,
-0.0501486174762249,
0.008132688701152802,
0.003632571315392852,
0.046233534812927246,
0.021283797919750214,
0.031480804085731506,
-0.05616360157728195,
-0.00785240437835455,
-0.004139752127230167,
0.010063535533845425,
-0.03868810832500458,
0.07178833335638046,
-0.00016099654021672904,
-0.033936627209186554,
-0.01598954200744629,
0.023632846772670746,
-0.041855763643980026,
-0.014592571184039116,
0.03235279768705368,
0.02607087418437004,
-0.029060570523142815,
-0.028793634846806526,
0.041072748601436615,
0.035502657294273376,
-0.08000999689102173,
0.022155793383717537,
0.02619544416666031,
-0.022760851308703423,
-0.022565098479390144,
0.0466250441968441,
-0.013533719815313816,
-0.018160631880164146,
-0.033438343554735184,
0.004331057425588369,
-0.024700595065951347,
-0.010526226833462715,
0.0009804383153095841,
-0.01667468249797821,
-0.004017406143248081,
0.009583048522472382,
0.00835068803280592,
0.0005917109665460885,
0.0038839373737573624,
-0.07139682024717331,
0.036908525973558426,
0.015767095610499382,
0.06107524782419205,
-0.020643148571252823,
0.0050673591904342175,
-0.014263348653912544,
-0.05445520579814911,
0.07687793672084808,
-0.121509850025177,
0.0006512157269753516,
0.030252890661358833,
0.00999235175549984,
-0.06559538841247559,
0.0017350922571495175,
0.030341871082782745,
0.017137372866272926,
0.004920543637126684,
-0.01793818548321724,
0.02550140768289566,
-0.010508431121706963,
-0.09752108156681061,
0.02119481936097145,
0.01921948418021202,
-0.041001565754413605,
-0.03701530024409294,
-0.007167265750467777,
-0.03642804175615311,
-0.002052080351859331,
-0.008955745957791805,
-0.04815548285841942,
-0.020394008606672287,
0.08349797874689102,
0.0536721870303154,
-0.017644554376602173,
-0.0035880818031728268,
0.029576649889349937,
0.030697787180542946,
0.03057321533560753,
-0.015090853907167912,
-0.019806746393442154,
0.023259134963154793,
-0.010428349487483501,
-0.01140711922198534,
-0.008101546205580235,
0.0522841140627861,
-0.007251795846968889,
0.027743680402636528,
0.004969482310116291,
0.0028406574856489897,
0.042638782411813736,
0.011923198588192463,
-0.030252890661358833,
-0.022867625579237938,
0.010695287026464939,
0.036837343126535416,
0.07367468625307083,
-0.03128504753112793,
0.04900968447327614,
-0.02874024584889412,
-0.019308462738990784,
0.023543868213891983,
0.015437872149050236,
0.010855449363589287,
-0.000637312768958509,
-0.005610131658613682,
-0.04769279435276985,
0.04755042493343353,
-0.03557384014129639,
0.024771779775619507,
0.04345738887786865,
-0.00842187087982893,
0.04690977558493614,
-0.02833094261586666,
0.03915080055594444,
0.008697706274688244,
-0.03156978264451027,
0.00005164958201930858,
-0.023615051060914993,
0.0043332818895578384,
0.020109275355935097,
-0.005912660621106625,
0.03347393497824669,
0.02260068990290165,
0.011843116953969002,
-0.0342569500207901,
0.012697316706180573,
-0.0029674526304006577,
0.016612395644187927,
-0.036694977432489395,
0.00007472853030776605,
0.027227602899074554,
-0.002136610448360443,
-0.027174213901162148,
0.08463691174983978,
-0.010686389170587063,
0.04765720292925835,
-0.04089479148387909,
0.014859508723020554,
-0.013293475843966007,
-0.017519982531666756,
0.05911770835518837,
-0.040930382907390594,
-0.020002499222755432,
-0.03187230974435806,
-0.00013312106602825224,
-0.03929316624999046,
0.007051593158394098,
-0.03975585848093033,
-0.027494538575410843,
0.13040775060653687,
0.005863721948117018,
-0.031160477548837662,
0.0015927257481962442,
-0.011015611700713634,
-0.028971591964364052,
0.008737746626138687,
-0.030751174315810204,
-0.05107399821281433,
0.021782081574201584,
0.03754917532205582,
0.04384889453649521,
0.005894864909350872,
-0.03390103206038475,
-0.01094442792236805,
-0.0033589606173336506,
-0.006544412113726139,
-0.001485950779169798,
0.01613190956413746,
0.018347488716244698,
0.06363784521818161,
0.008359585888683796,
-0.046233534812927246,
-0.025181083008646965,
-0.027725884690880775,
-0.008746644482016563,
-0.01084655150771141,
0.05050453171133995,
0.03918639197945595,
0.036694977432489395,
-0.08869435638189316,
0.018018266186118126,
-0.06335311383008957,
-0.011887606233358383,
-0.07246457040309906,
0.08741305768489838,
-0.04744365066289902,
0.031605374068021774,
0.0028806980699300766,
-0.019895724952220917,
0.0010972233721986413,
-0.02055417001247406,
0.023846397176384926,
-0.0022278139367699623,
0.10008367896080017,
-0.03836778551340103,
-0.012590541504323483,
-0.06228536367416382,
0.02167530730366707,
0.07474243640899658,
0.050326574593782425,
0.013044334948062897,
0.010054637677967548,
-0.04669622704386711,
0.03263752907514572,
-0.03310022130608559,
-0.06321074813604355,
-0.02783265896141529,
-0.002729433588683605,
0.007954730652272701,
0.020109275355935097,
0.045806437730789185,
-0.054633162915706635,
-0.042638782411813736,
-0.02664034068584442,
0.03915080055594444,
-0.016995007172226906,
-0.03961349278688431,
-0.06623603403568268,
0.03644583746790886,
0.02373962104320526,
-0.0033923278097063303,
0.03826100751757622,
0.023223543539643288,
0.014040900394320488,
0.010544022545218468,
-0.018160631880164146,
-0.030768970027565956,
0.00842187087982893,
0.06445645540952682,
-0.012056666426360607,
0.03108929470181465,
-0.06296160817146301,
-0.034790825098752975,
0.0028362085577100515,
-0.05121636390686035,
-0.04858258366584778,
0.000650103494990617,
0.0649903267621994,
0.07047144323587418,
0.008346239104866982,
-0.01907711662352085,
0.026871684938669205,
-0.022903218865394592,
-0.03279769420623779,
0.016051828861236572,
0.032601937651634216,
-0.006571105681359768,
-0.03206806629896164,
0.011763036251068115,
0.021105840802192688,
0.044809870421886444,
0.028936000540852547,
-0.03222822770476341,
0.08848080784082413,
0.04082360863685608,
0.06858508288860321,
0.01171854604035616,
-0.023686233907938004,
0.007051593158394098,
0.012768499553203583,
-0.03030627779662609,
-0.049543559551239014,
-0.021177023649215698,
0.000702934805303812,
-0.0023045584093779325,
-0.018970342352986336,
0.0026893930044025183,
-0.07381705194711685,
0.00038983963895589113,
-0.06442086398601532,
-0.0607549250125885,
-0.025056513026356697,
0.04146425798535347,
-0.012528256513178349,
0.06954605877399445,
0.00968092493712902,
-0.054419610649347305,
0.04295910522341728,
0.06264127790927887,
0.0657021626830101,
-0.006028333213180304,
0.042211681604385376,
0.025536999106407166,
0.04189135506749153,
0.015339995734393597,
-0.004115283023566008,
0.03340275213122368,
-0.018276305869221687,
-0.0005497239762917161,
-0.014138777740299702,
0.012021075002849102,
0.02726319432258606,
-0.018276305869221687,
-0.033011242747306824,
-0.02133718691766262,
0.04018295928835869,
-0.05705339461565018,
-0.025768345221877098,
0.035502657294273376,
-0.07986763119697571,
-0.03101811185479164,
0.0027761475648730993,
-0.01688823103904724,
0.031961288303136826,
-0.018454262986779213,
0.09994131326675415,
0.04755042493343353,
0.023775212466716766,
0.020589761435985565,
0.014548081904649734,
0.03765595331788063,
-0.04335061460733414,
0.0727493017911911,
-0.0727493017911911,
-0.00536988815292716,
-0.010730878449976444,
-0.07054262608289719,
-0.03808305040001869,
-0.019023729488253593,
0.03144521266222,
0.015615830197930336,
-0.00020367870456539094,
0.02790384367108345,
-0.009538558311760426,
-0.01674586534500122,
0.028775837272405624,
-0.008190525695681572,
-0.040716830641031265,
-0.10812739282846451,
-0.0030831254553049803,
-0.033580709248781204,
-0.0685139000415802,
0.03205027058720589,
0.047087736427783966,
0.00970761850476265,
-0.03233500197529793,
0.031178273260593414,
0.00859982892870903,
0.018632221966981888,
-0.03897284343838692,
-0.0388304740190506,
0.00003517454752000049,
0.06605807691812515,
0.07951171696186066,
0.002451373962685466,
-0.010953325778245926,
-0.02026943676173687,
0.029719017446041107,
0.08299969881772995,
0.004706994164735079,
-0.040574464946985245,
-0.006975960917770863,
0.02083890326321125,
-0.0023601704742759466,
-0.008897908963263035,
0.02528785727918148,
0.008662114851176739,
-0.06943928450345993,
0.025892915204167366,
0.02535904198884964,
0.00484046246856451,
-0.031035907566547394,
-0.02105245366692543,
0.02133718691766262,
-0.03503996506333351,
0.02790384367108345,
0.009422886185348034,
0.013569311238825321,
0.040788017213344574,
0.03765595331788063,
-0.014441306702792645,
-0.014637060463428497,
-0.021070249378681183,
0.02874024584889412,
0.01907711662352085,
-0.04249641299247742,
0.05523822084069252,
0.026444585993885994,
0.01681704819202423,
0.07007993012666702,
0.007954730652272701,
0.008208321407437325,
-0.0034991027787327766,
0.02945207990705967,
0.03066219575703144,
0.012279114685952663,
0.0031676555518060923,
0.05057571455836296,
0.011923198588192463,
0.04053887352347374,
0.03439931571483612,
-0.023223543539643288,
-0.001996468286961317,
-0.03623228520154953,
-0.00018977571744471788,
-0.003935100510716438,
-0.05385014787316322,
0.03318919986486435,
0.0000930109599721618,
0.00914705079048872,
0.05780081823468208,
0.036267876625061035,
-0.02393537573516369,
0.020429600030183792,
-0.027921639382839203,
-0.0515722818672657,
-0.04463191330432892,
-0.030146116390824318,
-0.032103657722473145,
0.041357479989528656,
0.009013582020998001,
-0.01760006509721279,
0.014112084172666073,
0.04505901038646698,
0.021283797919750214,
0.02500312402844429,
0.03187230974435806,
-0.020749924704432487,
-0.06591571122407913,
-0.04879613220691681,
0.03872369974851608,
-0.03491539508104324,
0.02041180431842804,
-0.06303279101848602,
0.0395423099398613,
0.07552545517683029,
-0.08043710142374039,
0.02628442272543907,
0.020678739994764328,
0.031747739762067795,
-0.03242398053407669,
-0.017813613638281822,
0.030893540009856224,
0.041001565754413605,
-0.01913050375878811,
0.01476163137704134,
0.02811739221215248,
-0.004208710975944996,
-0.044881053268909454,
-0.008697706274688244,
-0.0381542332470417,
-0.010197004303336143,
-0.015135343186557293,
-0.01879238337278366,
-0.032940059900283813,
0.06321074813604355,
0.03066219575703144,
-0.02664034068584442,
-0.04680300131440163,
0.014432408846914768,
0.01914830133318901,
-0.019094912335276604,
-0.05135873332619667,
0.0656665712594986,
0.016808150336146355,
-0.035004373639822006,
-0.04463191330432892,
0.03708648681640625,
-0.019397441297769547,
0.0017684594495221972,
-0.002495863474905491,
0.02450484223663807,
-0.012635030783712864,
-0.0015081956516951323,
0.021141432225704193,
-0.0013257884420454502,
-0.01434342935681343,
-0.049187641590833664,
-0.06449204683303833,
-0.016025135293602943,
-0.050611305981874466,
0.029202938079833984,
0.03299344703555107,
0.046375904232263565,
-0.00005088491889182478,
-0.013960819691419601,
0.049330007284879684,
0.0868435949087143,
0.031035907566547394,
-0.024042150005698204,
-0.009227131493389606,
-0.028918204829096794,
0.0005989405326545238,
-0.01076646987348795,
0.011860912665724754,
0.0028384330216795206,
-0.002231150632724166,
-0.05883297696709633,
0.01303543709218502,
-0.07015111297369003,
-0.022903218865394592,
-0.006998205557465553,
0.019949112087488174,
-0.049116458743810654,
-0.018347488716244698,
0.010259289294481277,
-0.03623228520154953,
-0.02833094261586666,
0.11759476363658905,
-0.008408524096012115,
0.027423355728387833,
0.006931471172720194,
0.04619794338941574,
0.000069862486270722,
0.00510295107960701,
0.10278864949941635,
-0.012688418850302696,
0.07794568687677383,
-0.0169416181743145,
-0.04246082156896591,
0.008773338049650192,
-0.021443961188197136,
0.0988735631108284,
0.05797877535223961,
-0.035983145236968994,
0.004742585588246584,
-0.008541992865502834,
0.07481361925601959,
-0.014485795982182026,
-0.045094601809978485,
0.024825166910886765,
-0.06207181513309479,
-0.035289108753204346,
-0.02281423844397068,
0.0062507810071110725,
-0.011184671893715858,
-0.0029385345987975597,
0.012314706109464169,
-0.004021855071187019,
-0.014254450798034668,
-0.009485171176493168,
-0.03480862081050873,
0.08947737514972687,
0.030751174315810204,
-0.017253044992685318,
0.03327817842364311,
-0.01920168846845627,
0.02874024584889412,
0.03183671832084656,
-0.08976210653781891,
0.04965033382177353,
0.03875929117202759,
0.06175148859620094,
-0.017039496451616287,
-0.03037746250629425,
-0.036837343126535416,
-0.0558076873421669,
-0.03285108134150505,
0.05762286111712456,
-0.02628442272543907,
-0.03050203248858452,
0.024042150005698204,
-0.032744307070970535,
-0.03347393497824669,
0.003160982159897685,
-0.012376992031931877,
-0.006735717412084341,
0.0033478382974863052,
-0.014512489549815655,
-0.025252265855669975,
0.03121386468410492,
0.03240618482232094,
0.01991352066397667,
-0.008074852637946606,
-0.03292226418852806,
-0.07282049208879471,
-0.04747924208641052,
0.02535904198884964,
-0.06061255559325218,
-0.01631876453757286,
-0.015090853907167912,
0.016398847103118896,
-0.010072433389723301,
0.007518733385950327,
0.01606072671711445,
-0.04370652884244919,
0.05310272052884102,
-0.03361630067229271,
-0.03625008091330528,
0.05246207118034363,
-0.00899133738130331,
-0.006081720814108849,
-0.012092258781194687,
-0.08072183281183243,
0.005356541369110346,
-0.024629412218928337,
-0.03187230974435806,
0.03637465089559555,
-0.05132313817739487,
0.04783516004681587,
-0.0006617819890379906,
0.01204776857048273,
0.009476273320615292,
-0.037193261086940765,
-0.01189650408923626,
-0.07673557102680206,
0.011273650452494621,
-0.017519982531666756,
-0.0236506424844265,
-0.03092913143336773,
0.024949736893177032,
0.043813303112983704,
0.06310397386550903,
-0.027316581457853317,
0.015642523765563965,
0.09332127124071121,
-0.04459632188081741,
-0.005796988029032946,
0.020785516127943993,
0.031178273260593414,
0.055202629417181015,
-0.03427474573254585,
0.026586951687932014,
-0.03333156928420067,
-0.024700595065951347,
-0.02147955261170864,
-0.024629412218928337,
0.03164096549153328,
-0.01943303272128105,
0.05523822084069252,
-0.01514424104243517,
-0.003201022744178772,
-0.00431103678420186,
-0.004444505553692579,
0.02535904198884964,
-0.011567281559109688,
0.03797627612948418,
0.02245832234621048,
-0.02359725534915924,
-0.022120201960206032,
0.008973541669547558,
0.09082985669374466,
-0.029896974563598633,
-0.007936934940516949,
-0.029060570523142815,
-0.017333127558231354,
0.030626602470874786,
-0.021212615072727203,
0.06698346138000488,
0.012314706109464169,
0.015784891322255135,
0.009574150666594505,
-0.0034768579062074423,
0.02521667443215847,
0.006909226533025503,
0.004969482310116291,
-0.040218550711870193,
0.021924447268247604,
-0.03171214833855629,
0.07431533932685852,
-0.0423896387219429,
-0.014459102414548397,
0.03361630067229271,
0.04776397719979286,
0.049330007284879684,
0.019949112087488174,
0.03651702031493187,
0.01211005449295044,
0.007856854237616062,
-0.05726694315671921,
-0.00030503145535476506,
-0.00811044406145811,
-0.011611771769821644,
0.02614205703139305,
0.0023090073373168707,
-0.07659320533275604,
-0.014610366895794868,
0.049757108092308044,
-0.019610991701483727,
-0.03340275213122368,
0.03261973336338997,
-0.036766160279512405,
0.003296675393357873,
-0.028348738327622414,
0.013311272487044334,
-0.011309242807328701,
-0.003834998933598399,
0.022992197424173355,
-0.028633471578359604,
-0.01476163137704134,
-0.0031276149675250053,
0.02938089519739151,
0.027565723285079002,
-0.02203122340142727,
-0.016514519229531288,
-0.02112363651394844,
-0.01705729216337204,
-0.04758601635694504,
-0.0593312568962574,
0.008764440193772316,
-0.0071984087117016315,
0.0006640064530074596,
0.022013427689671516,
-0.04779956862330437,
-0.013044334948062897,
-0.006539963185787201,
-0.05189260467886925,
-0.03932875767350197,
-0.0084797078743577,
0.046447087079286575,
0.04683859273791313,
-0.025465816259384155,
0.011220263317227364,
-0.07353232055902481,
0.008030363358557224,
0.015153138898313046,
-0.03413238003849983,
0.009965658187866211,
-0.007821261882781982,
0.0007390825776383281,
-0.0494367815554142,
0.0077367317862808704,
-0.05602123588323593,
0.024771779775619507,
0.05246207118034363,
-0.001661684480495751,
-0.06822916865348816,
0.029985953122377396
] |
52,256 |
osmnx.projection
|
project_graph
|
Project a graph from its current CRS to another.
If `to_latlong` is `True`, this projects the GeoDataFrame to the CRS
defined by `settings.default_crs`, otherwise it projects it to the CRS
defined by `to_crs`. If `to_crs` is `None`, it projects it to the CRS of
an appropriate UTM zone given `G`'s bounds.
Parameters
----------
G : networkx.MultiDiGraph
the graph to be projected
to_crs : string or pyproj.CRS
if None, project to an appropriate UTM zone, otherwise project to
this CRS
to_latlong : bool
if True, project to `settings.default_crs` and ignore `to_crs`
Returns
-------
G_proj : networkx.MultiDiGraph
the projected graph
|
def project_graph(G, to_crs=None, to_latlong=False):
"""
Project a graph from its current CRS to another.
If `to_latlong` is `True`, this projects the GeoDataFrame to the CRS
defined by `settings.default_crs`, otherwise it projects it to the CRS
defined by `to_crs`. If `to_crs` is `None`, it projects it to the CRS of
an appropriate UTM zone given `G`'s bounds.
Parameters
----------
G : networkx.MultiDiGraph
the graph to be projected
to_crs : string or pyproj.CRS
if None, project to an appropriate UTM zone, otherwise project to
this CRS
to_latlong : bool
if True, project to `settings.default_crs` and ignore `to_crs`
Returns
-------
G_proj : networkx.MultiDiGraph
the projected graph
"""
if to_latlong:
to_crs = settings.default_crs
# STEP 1: PROJECT THE NODES
gdf_nodes = convert.graph_to_gdfs(G, edges=False)
# create new lat/lon columns to preserve lat/lon for later reference if
# cols do not already exist (ie, don't overwrite in later re-projections)
if "lon" not in gdf_nodes.columns or "lat" not in gdf_nodes.columns:
gdf_nodes["lon"] = gdf_nodes["x"]
gdf_nodes["lat"] = gdf_nodes["y"]
# project the nodes GeoDataFrame and extract the projected x/y values
gdf_nodes_proj = project_gdf(gdf_nodes, to_crs=to_crs)
gdf_nodes_proj["x"] = gdf_nodes_proj["geometry"].x
gdf_nodes_proj["y"] = gdf_nodes_proj["geometry"].y
to_crs = gdf_nodes_proj.crs
gdf_nodes_proj = gdf_nodes_proj.drop(columns=["geometry"])
# STEP 2: PROJECT THE EDGES
if "simplified" in G.graph and G.graph["simplified"]:
# if graph has previously been simplified, project the edge geometries
gdf_edges = convert.graph_to_gdfs(G, nodes=False, fill_edge_geometry=False)
gdf_edges_proj = project_gdf(gdf_edges, to_crs=to_crs)
else:
# if not, you don't have to project these edges because the nodes
# contain all the spatial data in the graph (unsimplified edges have
# no geometry attributes)
gdf_edges_proj = convert.graph_to_gdfs(G, nodes=False, fill_edge_geometry=False).drop(
columns=["geometry"]
)
# STEP 3: REBUILD GRAPH
# turn projected node/edge gdfs into a graph and update its CRS attribute
G_proj = convert.graph_from_gdfs(gdf_nodes_proj, gdf_edges_proj, G.graph)
G_proj.graph["crs"] = to_crs
utils.log(f"Projected graph with {len(G)} nodes and {len(G.edges)} edges")
return G_proj
|
(G, to_crs=None, to_latlong=False)
|
[
0.02140849083662033,
-0.011634641326963902,
-0.018570315092802048,
0.055034294724464417,
-0.07886745780706406,
-0.009839636273682117,
-0.02150247059762478,
-0.01888984628021717,
0.0854836031794548,
-0.027216413989663124,
0.020694248378276825,
0.016202036291360855,
-0.02048749476671219,
0.07604807615280151,
-0.019265763461589813,
0.028212595731019974,
-0.05119993910193443,
-0.007137730251997709,
0.041614048182964325,
0.02244226448237896,
-0.004957409575581551,
-0.09209974855184555,
0.05518466234207153,
-0.0010455200681462884,
0.01692567765712738,
-0.011042571626603603,
0.004980904515832663,
0.011860191822052002,
0.01497090794146061,
0.01591069996356964,
0.008176201954483986,
-0.03533622995018959,
-0.054996706545352936,
-0.02693447656929493,
0.05698906630277634,
0.058530326932668686,
0.003531273454427719,
0.04454620182514191,
-0.044621385633945465,
-0.0704469084739685,
-0.07435644418001175,
-0.04792945832014084,
-0.0055588772520422935,
-0.00397767499089241,
0.06213913485407829,
-0.003998820669949055,
-0.010882806964218616,
0.025148868560791016,
-0.016700128093361855,
0.006409390363842249,
0.01996120996773243,
-0.009064306505024433,
-0.05191418156027794,
0.038080424070358276,
-0.0023459589574486017,
-0.0022449311800301075,
-0.041125357151031494,
0.07142429053783417,
0.03129511699080467,
-0.045673955231904984,
-0.025261644273996353,
-0.0064516812562942505,
-0.03736618161201477,
-0.001869013998657465,
-0.010892204940319061,
0.026295416057109833,
-0.02994181588292122,
-0.04071184620261192,
0.00848163478076458,
0.03779848664999008,
-0.06898082792758942,
0.01847633719444275,
0.027291597798466682,
-0.044621385633945465,
0.015788527205586433,
0.021295716986060143,
0.01123992819339037,
0.013580013066530228,
-0.061612848192453384,
-0.020243147388100624,
-0.017668114975094795,
-0.019566496834158897,
-0.025318032130599022,
-0.01292215846478939,
0.052026957273483276,
-0.008805863559246063,
0.035110678523778915,
0.013147708028554916,
-0.04544840380549431,
-0.11946652829647064,
0.032103341072797775,
0.006766512058675289,
0.034584395587444305,
0.020637860521674156,
0.02296854928135872,
-0.02244226448237896,
-0.05022255331277847,
0.012236109003424644,
-0.06653736531734467,
-0.0209197998046875,
0.0044640181586146355,
-0.011888385750353336,
-0.1088656559586525,
-0.014143889769911766,
0.025675153359770775,
-0.02945312298834324,
-0.00918647926300764,
-0.01947251707315445,
0.008754175156354904,
-0.036689531058073044,
-0.11510588228702545,
0.039132993668317795,
0.032253704965114594,
-0.020731840282678604,
-0.013288677670061588,
0.02488572709262371,
0.008288976736366749,
-0.009327448904514313,
0.02287456952035427,
-0.03871948644518852,
-0.03394533321261406,
0.10473056882619858,
0.03242287039756775,
0.0039612287655472755,
-0.026145050302147865,
0.017639920115470886,
0.044057510793209076,
0.03992241993546486,
-0.01194477267563343,
-0.0809725895524025,
0.020731840282678604,
-0.014651377685368061,
-0.009980604983866215,
0.010431705974042416,
0.04225310683250427,
-0.042591433972120285,
-0.053643401712179184,
0.0006654911558143795,
-0.010544480755925179,
0.06777789443731308,
-0.02084461599588394,
-0.040599070489406586,
-0.010657256469130516,
0.03501670062541962,
-0.0032258406281471252,
0.029528306797146797,
-0.019096599891781807,
-0.0029133593197911978,
-0.034640781581401825,
-0.032253704965114594,
0.015788527205586433,
-0.02347603626549244,
-0.007664014585316181,
-0.023043731227517128,
-0.03879466652870178,
-0.03999760374426842,
0.012339485809206963,
0.029302755370736122,
0.009477815590798855,
0.04650097340345383,
-0.03879466652870178,
0.007696907036006451,
-0.014548000879585743,
0.058981429785490036,
0.002060496946796775,
-0.029208775609731674,
0.05473356321454048,
-0.05631241574883461,
-0.023137710988521576,
0.03732858970761299,
0.00026828161207959056,
0.04533562809228897,
-0.030016997829079628,
0.005540081765502691,
-0.03283637762069702,
0.0249045230448246,
0.04589950665831566,
-0.0025914800353348255,
-0.02736678160727024,
0.016559157520532608,
0.005244046915322542,
-0.023043731227517128,
0.010929795913398266,
0.06537202000617981,
-0.02896443009376526,
0.06127452477812767,
-0.008570915088057518,
-0.019641680642962456,
-0.0013791467063128948,
-0.051049571484327316,
0.046162646263837814,
0.008561517111957073,
-0.01198236458003521,
0.02849453315138817,
0.02392713725566864,
-0.04695207253098488,
0.031219933182001114,
-0.026671335101127625,
-0.022818181663751602,
0.12706005573272705,
-0.004557997453957796,
-0.03479114919900894,
0.05819200351834297,
0.00046284819836728275,
-0.024829339236021042,
0.0059629883617162704,
-0.028212595731019974,
-0.05172622576355934,
0.007983543910086155,
0.06988303363323212,
-0.0011271645780652761,
-0.0022261354606598616,
0.02249865233898163,
-0.01495211198925972,
-0.026107458397746086,
0.011888385750353336,
-0.03640759363770485,
0.027216413989663124,
0.03730979561805725,
0.027648719027638435,
-0.02693447656929493,
-0.02637059986591339,
-0.010488093830645084,
-0.049057211726903915,
-0.02341965027153492,
-0.05086161568760872,
0.0409373976290226,
-0.0014120395062491298,
0.06116174906492233,
-0.0965355709195137,
0.051575858145952225,
-0.04721521586179733,
-0.007819080725312233,
-0.038531526923179626,
0.056086864322423935,
-0.09525745362043381,
0.012217313051223755,
-0.005295735318213701,
0.0022402324248105288,
0.0066725327633321285,
-0.04432065412402153,
-0.04371918365359306,
-0.05037292093038559,
0.06916879117488861,
-0.005873708054423332,
-0.026614947244524956,
-0.04138849675655365,
-0.013373258523643017,
0.07473236322402954,
0.033588211983442307,
-0.013758573681116104,
0.008585011586546898,
-0.04138849675655365,
0.033099520951509476,
-0.029246367514133453,
-0.04894443601369858,
-0.05627482384443283,
-0.03501670062541962,
-0.005925396922975779,
0.016192639246582985,
0.02939673513174057,
-0.03345664218068123,
-0.053041934967041016,
0.012170323170721531,
0.08397992700338364,
-0.016061067581176758,
-0.03437763825058937,
0.0003644636017270386,
-0.0009427301702089608,
0.015017896890640259,
-0.008054028265178204,
0.043606411665678024,
-0.008660195395350456,
0.02135210484266281,
0.04349363595247269,
-0.025242848321795464,
-0.06368039548397064,
-0.026784108951687813,
0.05131271481513977,
-0.01071364339441061,
-0.008556818589568138,
-0.02994181588292122,
-0.056124456226825714,
0.0005938318790867925,
-0.03556177765130997,
-0.025806725025177002,
0.0013991172891110182,
0.02832537144422531,
0.049019619822502136,
-0.03255444020032883,
0.003350363112986088,
0.009632881730794907,
0.003265781793743372,
-0.009877228178083897,
-0.009031414054334164,
0.01833536848425865,
-0.007161225192248821,
-0.01996120996773243,
0.013504830189049244,
0.015816722065210342,
0.05781608447432518,
0.018222592771053314,
0.01594829186797142,
0.04221551492810249,
0.05292915925383568,
0.054019320756196976,
-0.0009069005609489977,
-0.0070296539925038815,
0.009689268656075,
0.0338701494038105,
-0.07961928844451904,
-0.0467265248298645,
-0.038061629980802536,
0.007870769128203392,
-0.023325670510530472,
-0.016314812004566193,
0.015083682723343372,
-0.053643401712179184,
0.031614646315574646,
-0.040147971361875534,
-0.04323049262166023,
-0.015703946352005005,
0.005493091885000467,
0.020807024091482162,
0.003519525984302163,
0.04127572104334831,
-0.03324988856911659,
0.07232649624347687,
0.062101542949676514,
0.027066048234701157,
0.00003309467501821928,
0.05420728027820587,
0.011437284760177135,
0.0586806945502758,
-0.02148367464542389,
0.007382076699286699,
0.04744076728820801,
-0.022310692816972733,
0.03682110086083412,
-0.0200175978243351,
0.01444462314248085,
0.049583494663238525,
-0.022686609998345375,
-0.01146547868847847,
-0.011258724145591259,
0.031689830124378204,
-0.02896443009376526,
-0.015234049409627914,
-0.013448442332446575,
-0.06131211668252945,
-0.028682492673397064,
0.049094803631305695,
-0.02836296148598194,
0.05574854090809822,
-0.04082462191581726,
0.10021956264972687,
0.010375318117439747,
-0.013608206994831562,
0.014510408975183964,
0.02185959182679653,
0.02890804223716259,
0.008885745890438557,
0.06435704976320267,
-0.04777909070253372,
0.04586191475391388,
-0.0002953006769530475,
-0.04932035505771637,
0.019716864451766014,
0.035599369555711746,
-0.03746016323566437,
0.03035532496869564,
-0.0338701494038105,
0.009590590372681618,
-0.0025045492220669985,
-0.017264002934098244,
0.06631181389093399,
-0.0066255428828299046,
-0.03689628466963768,
-0.06548479944467545,
0.00920527521520853,
-0.022611428052186966,
-0.04845574498176575,
0.00993361510336399,
0.03646397963166237,
0.05191418156027794,
-0.015111876651644707,
0.07112355530261993,
0.007259903475642204,
0.05172622576355934,
-0.04266661778092384,
-0.043568819761276245,
0.003199996193870902,
0.056876290589571,
0.06315410882234573,
0.010563276708126068,
-0.005972386337816715,
0.03638879582285881,
0.029114797711372375,
0.0849573165178299,
-0.02189718373119831,
-0.05601168051362038,
-0.017292197793722153,
0.03247925639152527,
0.04469656944274902,
0.009783248417079449,
-0.030505690723657608,
0.034584395587444305,
-0.01397472620010376,
0.04698966443538666,
0.016352403908967972,
0.039659276604652405,
-0.01075123529881239,
-0.01075123529881239,
0.017151227220892906,
-0.0038602009881287813,
0.03988482803106308,
0.026163846254348755,
0.022667814046144485,
0.07758933305740356,
0.012997341342270374,
0.01939733326435089,
-0.00014603507588617504,
0.02447221800684929,
-0.00206402107141912,
0.022216714918613434,
-0.05221491679549217,
0.0067712110467255116,
0.02638939581811428,
-0.02039351500570774,
0.10187359899282455,
0.011503070592880249,
-0.0213709007948637,
0.00686049135401845,
-0.0016845795325934887,
0.006752415094524622,
0.01896502822637558,
0.023269282653927803,
0.02996061183512211,
0.01600467972457409,
0.023325670510530472,
0.022573836147785187,
-0.011803803965449333,
-0.019773250445723534,
-0.11420368403196335,
0.004966807551681995,
-0.013100719079375267,
-0.04947071895003319,
0.04041111096739769,
-0.007819080725312233,
0.03185899183154106,
0.01220791507512331,
0.03700906038284302,
0.005121873691678047,
-0.02746076136827469,
-0.028137411922216415,
-0.016681332141160965,
0.0158919058740139,
0.003080172697082162,
-0.05988363176584244,
0.029302755370736122,
0.032592032104730606,
-0.024584993720054626,
0.011296316049993038,
0.023701587691903114,
0.02841934934258461,
0.008171502500772476,
0.04454620182514191,
-0.03830597549676895,
-0.05826718732714653,
-0.040072787553071976,
0.0440199188888073,
-0.046087462455034256,
-0.0053850156255066395,
-0.056537967175245285,
0.04777909070253372,
0.048643700778484344,
-0.07901782542467117,
0.03689628466963768,
0.022761793807148933,
-0.014529204927384853,
-0.04477175325155258,
-0.01319469790905714,
0.0548839308321476,
0.04894443601369858,
-0.013044331222772598,
0.04116294905543327,
0.032065749168395996,
-0.008711883798241615,
-0.028268983587622643,
-0.0407494381070137,
-0.013504830189049244,
0.008589711040258408,
0.00287106866016984,
-0.004191478248685598,
-0.033099520951509476,
0.061988767236471176,
-0.025731541216373444,
-0.06127452477812767,
-0.007851973176002502,
-0.024754155427217484,
0.013006739318370819,
-0.01901201903820038,
-0.03597528859972954,
0.043606411665678024,
0.03291156142950058,
-0.002000584965571761,
-0.028757674619555473,
0.0608610138297081,
0.04123812913894653,
0.007762692868709564,
0.01935974322259426,
-0.0003136560262646526,
0.02041231095790863,
-0.0035359724424779415,
0.017123034223914146,
0.009661075659096241,
-0.017320390790700912,
-0.0009562397026456892,
-0.03095679171383381,
-0.0213709007948637,
-0.024284258484840393,
-0.00637179845944047,
0.02242346853017807,
0.050560880452394485,
-0.010121573694050312,
0.015666354447603226,
0.026201438158750534,
0.03772330284118652,
0.026746517047286034,
-0.024566197767853737,
-0.00711893429979682,
0.01654036156833172,
-0.011888385750353336,
0.01986723020672798,
0.05146308243274689,
-0.02291216142475605,
0.03597528859972954,
-0.044621385633945465,
-0.03231009468436241,
-0.055034294724464417,
-0.030750038102269173,
0.006996761076152325,
-0.012790586799383163,
0.006545660551637411,
0.008086921647191048,
-0.006197936832904816,
0.020619064569473267,
-0.006056968122720718,
0.048606108874082565,
-0.02994181588292122,
0.011174142360687256,
0.05097438767552376,
0.024697767570614815,
0.005201756022870541,
0.05349303409457207,
0.051049571484327316,
-0.049621086567640305,
0.0579664520919323,
-0.026314212009310722,
-0.01546899788081646,
-0.023081323131918907,
-0.024754155427217484,
0.06409390270709991,
0.03777969256043434,
-0.0074478620663285255,
-0.022649018093943596,
-0.025280440226197243,
0.03599408268928528,
0.0034795848187059164,
0.00017474281776230782,
0.041200537234544754,
-0.04300494119524956,
0.016249027103185654,
-0.02582552097737789,
0.009792646393179893,
-0.0030731242150068283,
-0.010629062540829182,
0.021709226071834564,
0.01943492516875267,
-0.050636064261198044,
-0.003268131287768483,
0.005079582799226046,
0.11345184594392776,
0.045034896582365036,
0.007438464090228081,
0.030073385685682297,
-0.017752695828676224,
0.043568819761276245,
0.037666916847229004,
-0.08074703812599182,
0.04191478341817856,
0.033118315041065216,
0.08473176509141922,
0.007762692868709564,
-0.019199976697564125,
-0.012142129242420197,
-0.025599969550967216,
-0.015685150399804115,
0.022630222141742706,
-0.031069567427039146,
-0.0537937693297863,
0.030656058341264725,
0.027291597798466682,
-0.005925396922975779,
-0.030073385685682297,
-0.04326808452606201,
-0.016615545377135277,
-0.020149169489741325,
0.009717462584376335,
-0.0022954451851546764,
0.04026074707508087,
0.025205256417393684,
-0.006667833775281906,
-0.05390654504299164,
-0.03148307651281357,
-0.059582896530628204,
-0.07683750241994858,
0.04386955127120018,
-0.025637561455368996,
-0.026520967483520508,
-0.0015189409023150802,
0.00045462502748705447,
-0.048681292682886124,
-0.020581474527716637,
-0.002108661225065589,
0.04289216548204422,
0.03841875120997429,
-0.039095401763916016,
-0.03569335117936134,
0.053079526871442795,
-0.02398352511227131,
-0.05371858552098274,
-0.020750636234879494,
-0.03095679171383381,
0.010694848373532295,
-0.06616144627332687,
0.012837576679885387,
0.041200537234544754,
-0.02394593320786953,
0.031238729134202003,
-0.003911889623850584,
-0.007367979735136032,
-0.007598228752613068,
-0.049132395535707474,
-0.04138849675655365,
-0.07909300178289413,
0.03823079168796539,
-0.03471596539020538,
0.005587071180343628,
-0.006212033797055483,
-0.028569716960191727,
0.052515652030706406,
0.06371798366308212,
-0.0047083646059036255,
0.024509809911251068,
0.073905348777771,
-0.056086864322423935,
-0.03445282205939293,
0.02982904016971588,
-0.01599528267979622,
0.05048569664359093,
-0.021577654406428337,
0.02834416553378105,
-0.030280141159892082,
-0.016267823055386543,
-0.02187838777899742,
0.008411150425672531,
0.0038484535180032253,
0.0066490378230810165,
0.02486693114042282,
-0.0438319593667984,
-0.06409390270709991,
0.024133892729878426,
-0.0026572656352072954,
-0.03039291501045227,
-0.02048749476671219,
0.05518466234207153,
0.014407031238079071,
-0.054620787501335144,
-0.005568275228142738,
0.01943492516875267,
0.095633365213871,
-0.059056613594293594,
-0.016737718135118484,
-0.0317838117480278,
-0.023607607930898666,
0.00111835403367877,
-0.026257826015353203,
0.08570914715528488,
0.03392653912305832,
0.024039912968873978,
0.015722742304205894,
0.01841055043041706,
0.02336326241493225,
0.011333907023072243,
-0.011399692855775356,
-0.019105998799204826,
0.00794595293700695,
-0.01939733326435089,
0.018711285665631294,
-0.021145349368453026,
-0.031633444130420685,
-0.02099498175084591,
0.03193417564034462,
0.06413149833679199,
0.009313351474702358,
-0.014454021118581295,
0.03757293522357941,
0.0007394998683594167,
-0.01750835031270981,
-0.016841096803545952,
-0.031069567427039146,
0.035599369555711746,
0.0060851615853607655,
0.01844814233481884,
-0.06638699769973755,
-0.030787628144025803,
0.04187719151377678,
-0.02293095737695694,
-0.019143590703606606,
0.02133330889046192,
-0.031652238219976425,
0.00796004943549633,
0.016164444386959076,
0.007414969149976969,
0.024641381576657295,
0.008852853439748287,
-0.042929757386446,
0.002901611849665642,
-0.008632001467049122,
-0.006977965589612722,
0.08390475064516068,
0.01595769077539444,
0.042102739214897156,
-0.023532424122095108,
-0.010055788792669773,
-0.025599969550967216,
-0.019528904929757118,
-0.06661254912614822,
0.04033593088388443,
-0.01595769077539444,
-0.03276119381189346,
-0.02982904016971588,
-0.015769731253385544,
-0.05920697748661041,
-0.014632581733167171,
-0.009097198955714703,
-0.011606447398662567,
-0.010206155478954315,
0.02195357158780098,
0.033607009798288345,
0.0009309827582910657,
0.011578253470361233,
-0.05589890480041504,
0.007786187808960676,
0.00512657267972827,
-0.027723902836441994,
0.016596749424934387,
-0.031125955283641815,
-0.052102141082286835,
-0.030731242150068283,
0.009849034249782562,
-0.03242287039756775,
0.004546250216662884,
0.0368586927652359,
0.014980305917561054,
-0.03336266428232193,
0.049094803631305695
] |
52,259 |
osmnx.io
|
save_graph_geopackage
|
Save graph nodes and edges to disk as layers in a GeoPackage file.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the GeoPackage file including extension. if None, use default
data folder + graph.gpkg
encoding : string
the character encoding for the saved file
directed : bool
if False, save one edge for each undirected edge in the graph but
retain original oneway and to/from information as edge attributes; if
True, save one edge for each directed edge in the graph
Returns
-------
None
|
def save_graph_geopackage(G, filepath=None, encoding="utf-8", directed=False):
"""
Save graph nodes and edges to disk as layers in a GeoPackage file.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the GeoPackage file including extension. if None, use default
data folder + graph.gpkg
encoding : string
the character encoding for the saved file
directed : bool
if False, save one edge for each undirected edge in the graph but
retain original oneway and to/from information as edge attributes; if
True, save one edge for each directed edge in the graph
Returns
-------
None
"""
# default filepath if none was provided
filepath = Path(settings.data_folder) / "graph.gpkg" if filepath is None else Path(filepath)
# if save folder does not already exist, create it
filepath.parent.mkdir(parents=True, exist_ok=True)
# convert graph to gdfs and stringify non-numeric columns
if directed:
gdf_nodes, gdf_edges = convert.graph_to_gdfs(G)
else:
gdf_nodes, gdf_edges = convert.graph_to_gdfs(convert.to_undirected(G))
gdf_nodes = _stringify_nonnumeric_cols(gdf_nodes)
gdf_edges = _stringify_nonnumeric_cols(gdf_edges)
# save the nodes and edges as GeoPackage layers
gdf_nodes.to_file(filepath, layer="nodes", driver="GPKG", index=True, encoding=encoding)
gdf_edges.to_file(filepath, layer="edges", driver="GPKG", index=True, encoding=encoding)
utils.log(f"Saved graph as GeoPackage at {filepath!r}")
|
(G, filepath=None, encoding='utf-8', directed=False)
|
[
0.01816767267882824,
0.019291820004582405,
-0.024423008784651756,
0.0629885196685791,
-0.0026313208509236574,
-0.05827435106039047,
-0.07745738327503204,
-0.034848570823669434,
0.07248937338590622,
-0.06030506640672684,
0.03963525965809822,
-0.05214593559503555,
-0.0598699152469635,
0.05845566466450691,
-0.04050556942820549,
0.012755446135997772,
-0.024749374017119408,
-0.021612640470266342,
0.004492056556046009,
0.05939849838614464,
-0.0018290058942511678,
-0.06763015687465668,
0.020252784714102745,
-0.0047051007859408855,
0.038003433495759964,
-0.019654447212815285,
0.010770057328045368,
0.025112003087997437,
-0.0026449193246662617,
0.031059104949235916,
-0.010298640467226505,
-0.11009392142295837,
-0.028538838028907776,
0.022591736167669296,
0.025456499308347702,
0.043587908148765564,
0.0018867998151108623,
0.053197555243968964,
-0.008594288490712643,
-0.05029653012752533,
-0.02375214733183384,
0.004768560640513897,
0.031040973961353302,
-0.0011876072967424989,
0.03348871320486069,
0.005366897210478783,
-0.030859658494591713,
0.015493289567530155,
0.012420015409588814,
0.005085860379040241,
0.023498306050896645,
-0.006237204652279615,
-0.0300618764013052,
0.026109229773283005,
-0.0159103125333786,
0.05497443303465843,
0.05602605640888214,
0.08159134536981583,
0.017496809363365173,
-0.002086245222017169,
0.012329358607530594,
-0.01825832948088646,
0.009908814914524555,
-0.03967152535915375,
-0.018784141167998314,
0.03706059977412224,
-0.08470994234085083,
-0.06541812419891357,
-0.018231132999062538,
0.032382696866989136,
-0.021721428260207176,
-0.0046031116507947445,
0.030098140239715576,
-0.01666276529431343,
0.010353035293519497,
0.03488483279943466,
0.027033932507038116,
-0.0399978905916214,
-0.05990617722272873,
0.012646658346056938,
-0.027305902913212776,
-0.04543731361627579,
0.005434889812022448,
0.02270052395761013,
0.07789253443479538,
0.001981989713385701,
0.056497473269701004,
0.043732959777116776,
0.0025791930966079235,
-0.06436650454998016,
0.02636306919157505,
0.0011258472222834826,
0.018521234393119812,
0.022573605179786682,
0.010489020496606827,
-0.056860100477933884,
-0.025746600702404976,
-0.02137693203985691,
-0.029082780703902245,
0.00010694698721636087,
-0.05867324024438858,
-0.03689741715788841,
-0.03959899768233299,
-0.0054938169196248055,
-0.00912916474044323,
-0.027160851284861565,
0.014133433811366558,
0.024332351982593536,
-0.003703340422362089,
-0.045582365244627,
-0.06581701338291168,
-0.008195397444069386,
0.09899749606847763,
-0.003179796040058136,
0.06962461024522781,
0.043225280940532684,
0.022555474191904068,
0.016644634306430817,
0.015393566340208054,
-0.03847485035657883,
-0.03211072459816933,
0.040433041751384735,
-0.023190073668956757,
0.05033279210329056,
0.013680148869752884,
0.005271707195788622,
0.07419373095035553,
0.03423210233449936,
-0.013562294654548168,
-0.011123619973659515,
0.018131408840417862,
0.01114175096154213,
-0.006903534289449453,
0.04188355430960655,
0.028955861926078796,
-0.06200942024588585,
-0.03504801541566849,
-0.025746600702404976,
-0.0028194342739880085,
0.04536478593945503,
-0.012655723839998245,
-0.050912998616695404,
-0.007569863460958004,
0.05707767605781555,
0.02969924919307232,
0.015003741718828678,
-0.04326154291629791,
-0.055772215127944946,
-0.050187740474939346,
-0.06860925257205963,
0.050514105707407,
-0.020561018958687782,
-0.07187290489673615,
-0.04039677977561951,
0.020724201574921608,
-0.006491044536232948,
-0.04003415256738663,
0.0868857130408287,
-0.04463953152298927,
0.014686441980302334,
-0.06632469594478607,
0.019164899364113808,
0.003834793111309409,
0.05214593559503555,
-0.016164151951670647,
-0.009233420714735985,
0.089351586997509,
0.0019037979654967785,
-0.009228887036442757,
0.055445849895477295,
0.009455529972910881,
-0.023824671283364296,
-0.06440276652574539,
0.006794745568186045,
-0.004691502079367638,
0.013326586224138737,
0.07723980396986008,
0.03524746000766754,
0.015629274770617485,
0.05084047093987465,
0.011857941746711731,
-0.0308415275067091,
-0.012420015409588814,
0.07985072582960129,
0.03015253320336342,
-0.015801522880792618,
0.010452757589519024,
0.016744356602430344,
-0.0116222333163023,
-0.00523997750133276,
0.020397836342453957,
0.0598699152469635,
0.013181534595787525,
0.012719184160232544,
0.014840559102594852,
-0.06759389489889145,
0.015846852213144302,
-0.008848127909004688,
-0.07557171583175659,
0.11654870212078094,
0.04521973431110382,
-0.005697795655578375,
0.05707767605781555,
-0.012166175991296768,
-0.005616203881800175,
0.0016023633070290089,
-0.010353035293519497,
-0.0502602681517601,
-0.016436122357845306,
0.0009671973530203104,
0.01945500262081623,
0.006173744797706604,
0.026163624599575996,
-0.01242908090353012,
0.005054130218923092,
0.02320820465683937,
-0.06639721989631653,
0.08188144862651825,
-0.013607623055577278,
-0.010298640467226505,
-0.03807596117258072,
0.0409044586122036,
-0.03328926861286163,
0.0018856666283681989,
0.04609004408121109,
-0.06995097547769547,
0.047431766986846924,
-0.018892928957939148,
0.05591726675629616,
-0.006939797196537256,
0.035718876868486404,
-0.007365885190665722,
0.019056111574172974,
-0.009056638926267624,
0.027849845588207245,
-0.04822954908013344,
-0.01936434581875801,
-0.01567460410296917,
0.036135900765657425,
0.013072745874524117,
0.002422809600830078,
-0.04783065989613533,
-0.04735924303531647,
0.023607095703482628,
0.004981604870408773,
-0.007927958853542805,
0.01397931668907404,
-0.04366043582558632,
0.07379483431577682,
0.0036942746955901384,
-0.004251815378665924,
-0.033941999077796936,
-0.017170444130897522,
0.05783919617533684,
-0.008340448141098022,
-0.03599084913730621,
-0.07658707350492477,
-0.03180249407887459,
0.009537121281027794,
0.01148624811321497,
0.01777784712612629,
0.018892928957939148,
-0.03240082785487175,
0.01052528340369463,
0.06665106117725372,
-0.015457026660442352,
0.029554197564721107,
-0.043551646173000336,
0.009718435816466808,
-0.005743124056607485,
-0.04191982001066208,
0.07332342118024826,
-0.006527307443320751,
0.0036353475879877806,
0.04783065989613533,
-0.019745105877518654,
-0.027015799656510353,
-0.007696783170104027,
-0.004102231469005346,
-0.02132253721356392,
0.013118075206875801,
0.02036157250404358,
-0.0015196388121694326,
0.023915329948067665,
-0.039744049310684204,
0.03695181384682655,
-0.016853144392371178,
0.0054938169196248055,
0.03308982402086258,
-0.02988056279718876,
0.024930687621235847,
0.019237425178289413,
0.017369890585541725,
0.03840232640504837,
-0.0019162633689120412,
0.01648145169019699,
0.030243191868066788,
-0.025365842506289482,
0.04830207675695419,
-0.010425560176372528,
0.04297143965959549,
0.0012386018643155694,
0.08819117397069931,
0.01603723131120205,
0.0336337648332119,
0.023824671283364296,
-0.014931215904653072,
-0.026598777621984482,
-0.011558773927390575,
0.059253446757793427,
-0.029282227158546448,
-0.01963631622493267,
-0.019146768376231194,
0.08028588443994522,
-0.036589182913303375,
0.021123092621564865,
0.03330739960074425,
-0.05635242164134979,
0.023008758202195168,
-0.035682614892721176,
-0.014142499305307865,
0.018838534131646156,
-0.029372883960604668,
-0.006255336105823517,
-0.04576367884874344,
0.021449457854032516,
-0.016300136223435402,
0.06599833071231842,
0.07549919188022614,
-0.048048235476017,
0.009945077821612358,
0.028430050238966942,
0.03716938942670822,
0.041629716753959656,
-0.013743608258664608,
0.07288826256990433,
0.03432275727391243,
-0.07060370594263077,
0.06585328280925751,
0.0006646295078098774,
0.041629716753959656,
-0.015402632765471935,
-0.042173657566308975,
-0.01459578424692154,
-0.011803547851741314,
0.04641640931367874,
-0.02855697087943554,
-0.023190073668956757,
-0.03611776605248451,
0.0035582890268415213,
0.0027106457855552435,
0.0880461260676384,
-0.0518195666372776,
0.045836202800273895,
-0.022319765761494637,
0.0003657445195131004,
0.016853144392371178,
-0.004161158576607704,
-0.005144787486642599,
0.035301852971315384,
0.008326849900186062,
-0.03066021390259266,
0.04086819663643837,
-0.04050556942820549,
0.04543731361627579,
-0.014768033288419247,
0.03822101280093193,
0.03981657698750496,
0.019382476806640625,
-0.044965896755456924,
0.05656999722123146,
-0.06251709908246994,
-0.028031159192323685,
0.019835762679576874,
-0.0062009422108531,
0.06128416582942009,
-0.004886414855718613,
-0.02132253721356392,
-0.03029758483171463,
-0.0014391805743798614,
0.008979580365121365,
-0.03898252919316292,
0.02957232855260372,
0.06788399815559387,
0.07840021699666977,
-0.02786797657608986,
0.0842747911810875,
0.019255556166172028,
-0.004519253969192505,
-0.02462245337665081,
-0.04507468268275261,
0.004832020495086908,
0.03905505686998367,
0.06937077641487122,
0.016263874247670174,
0.0015377701492980123,
0.018222065642476082,
0.032564010471105576,
0.011178013868629932,
0.031875018030405045,
-0.04101324826478958,
-0.045872464776039124,
0.00380532955750823,
0.0018981319153681397,
0.010634072124958038,
0.026508120819926262,
-0.009033975191414356,
-0.006531840190291405,
0.03642600029706955,
0.048048235476017,
0.05254482477903366,
0.008997712284326553,
0.004201954230666161,
-0.017061656340956688,
0.004854684695601463,
0.06621591001749039,
-0.0288289412856102,
0.013879594393074512,
0.057875458151102066,
-0.018548432737588882,
-0.009319544769823551,
0.014885887503623962,
0.010516217909753323,
0.0030687409453094006,
-0.0172067079693079,
-0.021304406225681305,
-0.02924596332013607,
0.017524007707834244,
-0.04645267128944397,
0.10849835723638535,
0.024640586227178574,
-0.02813994698226452,
-0.011749153025448322,
-0.0016975532053038478,
0.04677903652191162,
-0.006939797196537256,
0.0004530019359663129,
-0.06313356757164001,
-0.020724201574921608,
0.04456700384616852,
0.034304626286029816,
-0.025710338726639748,
-0.024749374017119408,
-0.05011521652340889,
-0.0033180478494614363,
-0.057512830942869186,
-0.039707787334918976,
0.031095366925001144,
0.0542854405939579,
0.045328523963689804,
-0.013625754043459892,
0.002570127369835973,
0.0850725769996643,
-0.001408583833836019,
-0.06440276652574539,
0.01819486916065216,
0.006939797196537256,
-0.054901909083127975,
-0.05022400617599487,
0.02795863337814808,
0.023534569889307022,
-0.05254482477903366,
0.03738696500658989,
0.013834265060722828,
0.04079567268490791,
-0.04413184896111488,
-0.00015312542382162064,
-0.00559353968128562,
-0.05287119001150131,
0.022265370935201645,
0.011821678839623928,
-0.0627346783876419,
-0.031784359365701675,
-0.05794798582792282,
-0.009210756048560143,
0.020397836342453957,
-0.044965896755456924,
0.042173657566308975,
-0.006840074434876442,
-0.02288183942437172,
0.00021927672787569463,
-0.02855697087943554,
-0.011404656805098057,
0.03245522454380989,
0.02813994698226452,
0.03811222314834595,
0.029300358146429062,
0.010198918171226978,
-0.0294816717505455,
-0.019473133608698845,
-0.0049453419633209705,
-0.01297302357852459,
-0.010452757589519024,
-0.021866479888558388,
0.06255336105823517,
0.06741257756948471,
-0.024005986750125885,
-0.009926946833729744,
-0.03575513884425163,
-0.03807596117258072,
-0.03501175343990326,
-0.012202438898384571,
-0.03521119803190231,
-0.017659991979599,
0.03502988442778587,
-0.03927263244986534,
-0.0021803020499646664,
0.011604102328419685,
0.020216520875692368,
-0.00053572648903355,
-0.02471311204135418,
-0.012782643549144268,
-0.0007717180997133255,
0.02823060378432274,
-0.02627241238951683,
0.029372883960604668,
0.025891652330756187,
0.012111781165003777,
-0.00951899029314518,
-0.012800775468349457,
-0.014641113579273224,
-0.02768666297197342,
0.03479417413473129,
0.027360297739505768,
-0.04445821791887283,
0.041448403149843216,
0.037785857915878296,
-0.011504379101097584,
-0.003225124441087246,
0.012311226688325405,
0.037822119891643524,
0.06055890768766403,
0.010851648636162281,
0.020978040993213654,
0.0005249609821476042,
-0.043551646173000336,
0.01936434581875801,
0.04735924303531647,
-0.06639721989631653,
-0.05080420896410942,
-0.019799498841166496,
-0.018693482503294945,
-0.06900814175605774,
-0.01526664663106203,
0.02393346093595028,
-0.018639089539647102,
0.04264507442712784,
-0.0409044586122036,
0.05711394175887108,
-0.048048235476017,
-0.017941029742360115,
0.03829353675246239,
0.027015799656510353,
-0.015085333026945591,
0.0666147992014885,
0.0024613388814032078,
0.0018074748804792762,
0.06929824501276016,
0.0025995909236371517,
-0.05432170256972313,
-0.05798424780368805,
0.006658760365098715,
-0.040940724313259125,
-0.0073341550305485725,
0.016345465555787086,
-0.02774105593562126,
-0.0049362764693796635,
-0.014496061950922012,
-0.030243191868066788,
0.007261629682034254,
0.04420437663793564,
-0.00633692741394043,
0.03912758082151413,
-0.07147401571273804,
0.039526473730802536,
-0.012982089072465897,
-0.0034812306985259056,
0.021213749423623085,
0.00970030389726162,
-0.009428332559764385,
-0.025293316692113876,
0.0150309382006526,
0.01940060779452324,
0.05747656896710396,
-0.012728249654173851,
0.05482938140630722,
0.037967171519994736,
0.01478616427630186,
-0.027251508086919785,
0.003907318692654371,
0.02891959808766842,
-0.019473133608698845,
0.08101113885641098,
-0.03341618925333023,
0.0075426665134727955,
-0.022773049771785736,
0.0038551909383386374,
0.010198918171226978,
0.016653699800372124,
-0.03401452302932739,
-0.05870950222015381,
0.02522079087793827,
-0.03386947140097618,
-0.010815385729074478,
-0.03941768407821655,
0.026054834946990013,
0.004659772384911776,
0.022736787796020508,
0.02288183942437172,
-0.032618407160043716,
-0.05968860164284706,
0.023625226691365242,
-0.016200413927435875,
-0.07825516164302826,
-0.04123082384467125,
-0.005960701033473015,
-0.027106456458568573,
0.05392281338572502,
-0.05497443303465843,
-0.027342164888978004,
-0.03443154692649841,
-0.01018078625202179,
-0.0011196145787835121,
-0.025964178144931793,
0.005611671134829521,
-0.010280509479343891,
-0.03383320942521095,
0.0032908509019762278,
-0.008222593925893307,
-0.012157110497355461,
-0.031149761751294136,
-0.04699661210179329,
0.023915329948067665,
-0.021159354597330093,
0.04275386407971382,
-0.08703076839447021,
-0.017859438434243202,
0.010588742792606354,
-0.009491792879998684,
-0.04101324826478958,
-0.04257255047559738,
0.043406594544649124,
-0.005566342733800411,
-0.05914465710520744,
-0.010670334100723267,
0.0034812306985259056,
0.024604322388768196,
-0.024694979190826416,
0.04855591431260109,
-0.06944330036640167,
-0.017007261514663696,
0.023443913087248802,
0.025637812912464142,
-0.03822101280093193,
0.02453179657459259,
0.05591726675629616,
-0.0004714166570920497,
-0.023516438901424408,
0.025837259367108345,
-0.04344285652041435,
0.0012159376638010144,
-0.0032908509019762278,
0.025746600702404976,
0.028992123901844025,
-0.04822954908013344,
0.00008067060844041407,
-0.005217313300818205,
-0.03840232640504837,
0.03327113762497902,
-0.028629494830965996,
-0.03377881646156311,
0.0031616645865142345,
0.02873828448355198,
0.004809356294572353,
0.011223342269659042,
-0.01343537401407957,
0.03738696500658989,
0.009464595466852188,
-0.004841086454689503,
-0.0025519959162920713,
-0.017696255818009377,
0.08057598024606705,
0.003963979426771402,
-0.05707767605781555,
-0.05747656896710396,
0.0021712363231927156,
-0.026054834946990013,
0.015457026660442352,
0.028538838028907776,
0.013208732008934021,
0.011857941746711731,
-0.005797518417239189,
0.016708094626665115,
-0.040287990123033524,
0.03684302419424057,
-0.018784141167998314,
0.04543731361627579,
0.03281785175204277,
-0.014079039916396141,
-0.07263442873954773,
-0.04032425582408905,
-0.024241695180535316,
-0.007964221760630608,
0.04790318384766579,
0.033017296344041824,
-0.03660731762647629,
-0.08601540327072144,
0.05356018245220184,
-0.02891959808766842,
-0.0025429301895201206,
-0.04518347233533859,
-0.0560985803604126,
-0.0042608813382685184,
-0.029681118205189705,
0.018358051776885986,
-0.040940724313259125,
-0.03406891971826553,
0.01681688241660595,
-0.05954355001449585,
-0.03227390721440315,
-0.014686441980302334,
0.025837259367108345,
0.00834951363503933,
0.022628000006079674,
-0.029082780703902245,
-0.03131294250488281,
0.0006300664972513914,
-0.05047784373164177,
0.021159354597330093,
0.017043525353074074,
-0.013254060409963131,
0.05047784373164177,
0.022664261981844902,
0.04667024686932564,
-0.02333512343466282,
-0.015457026660442352,
-0.04260881245136261,
0.04188355430960655,
0.018203934654593468,
0.05707767605781555,
0.014695507474243641,
0.005484751425683498,
-0.03367002680897713,
-0.038511112332344055,
-0.003735070349648595,
-0.035483166575431824,
0.0019876558799296618,
0.016055362299084663,
-0.08674066513776779,
0.025565287098288536,
-0.01687127724289894,
0.03749575465917587,
-0.001978590153157711,
-0.009981340728700161,
0.01936434581875801,
0.012157110497355461,
0.0252570528537035,
-0.0033429786562919617,
-0.010362100787460804,
-0.05069541931152344,
-0.0641489252448082,
-0.03481230512261391,
0.014822427183389664,
-0.08238912373781204,
0.001557034789584577,
0.013924922794103622,
-0.032854113727808,
0.023081284016370773
] |
52,260 |
osmnx.io
|
save_graph_shapefile
|
Do not use: deprecated. Use the save_graph_geopackage function instead.
The Shapefile format is proprietary and outdated. Instead, use the
superior GeoPackage file format via the save_graph_geopackage function.
See http://switchfromshapefile.org/ for more information.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the shapefiles folder (no file extension). if None, use
default data folder + graph_shapefile
encoding : string
the character encoding for the saved files
directed : bool
if False, save one edge for each undirected edge in the graph but
retain original oneway and to/from information as edge attributes; if
True, save one edge for each directed edge in the graph
Returns
-------
None
|
def save_graph_shapefile(G, filepath=None, encoding="utf-8", directed=False):
"""
Do not use: deprecated. Use the save_graph_geopackage function instead.
The Shapefile format is proprietary and outdated. Instead, use the
superior GeoPackage file format via the save_graph_geopackage function.
See http://switchfromshapefile.org/ for more information.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the shapefiles folder (no file extension). if None, use
default data folder + graph_shapefile
encoding : string
the character encoding for the saved files
directed : bool
if False, save one edge for each undirected edge in the graph but
retain original oneway and to/from information as edge attributes; if
True, save one edge for each directed edge in the graph
Returns
-------
None
"""
warn(
"The `save_graph_shapefile` function is deprecated and will be removed "
"in the v2.0.0 release. Instead, use the `save_graph_geopackage` function "
"to save graphs as GeoPackage files for subsequent GIS analysis. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123",
FutureWarning,
stacklevel=2,
)
# default filepath if none was provided
filepath = (
Path(settings.data_folder) / "graph_shapefile" if filepath is None else Path(filepath)
)
# if save folder does not already exist, create it (shapefiles
# get saved as set of files)
filepath.mkdir(parents=True, exist_ok=True)
filepath_nodes = filepath / "nodes.shp"
filepath_edges = filepath / "edges.shp"
# convert graph to gdfs and stringify non-numeric columns
if directed:
gdf_nodes, gdf_edges = convert.graph_to_gdfs(G)
else:
gdf_nodes, gdf_edges = convert.graph_to_gdfs(convert.to_undirected(G))
gdf_nodes = _stringify_nonnumeric_cols(gdf_nodes)
gdf_edges = _stringify_nonnumeric_cols(gdf_edges)
# save the nodes and edges as separate ESRI shapefiles
gdf_nodes.to_file(filepath_nodes, driver="ESRI Shapefile", index=True, encoding=encoding)
gdf_edges.to_file(filepath_edges, driver="ESRI Shapefile", index=True, encoding=encoding)
utils.log(f"Saved graph as shapefiles at {filepath!r}")
|
(G, filepath=None, encoding='utf-8', directed=False)
|
[
0.009753596037626266,
-0.006282222457230091,
-0.019960399717092514,
0.04416359215974808,
-0.029005257412791252,
-0.05330487713217735,
-0.0904100090265274,
0.003996901214122772,
0.07999588549137115,
-0.056467682123184204,
0.021966082975268364,
-0.03710513189435005,
-0.0472106859087944,
0.03629514202475548,
-0.004033061675727367,
0.03313233703374863,
-0.016392599791288376,
-0.015061905607581139,
-0.005988120101392269,
0.037780120968818665,
-0.01061661820858717,
-0.07829876989126205,
0.0012897117994725704,
-0.02015325427055359,
0.04748068004846573,
0.023566771298646927,
0.01050090603530407,
0.0444335862994194,
0.0236053429543972,
0.019333623349666595,
-0.017115801572799683,
-0.07351598888635635,
-0.04539785534143448,
0.03930366784334183,
0.021580373868346214,
0.055310558527708054,
-0.0235282015055418,
0.07586880773305893,
-0.003018166869878769,
-0.03041309304535389,
-0.030972369015216827,
-0.0049322438426315784,
0.02107895351946354,
0.013798711821436882,
0.01984468847513199,
0.01636367104947567,
-0.061636172235012054,
0.02948739379644394,
0.005327594932168722,
-0.015534398145973682,
0.005443307105451822,
-0.03143521770834923,
-0.06734465062618256,
0.05673767998814583,
-0.03033595159649849,
0.020481105893850327,
0.016093675047159195,
0.07367026805877686,
-0.000881102227140218,
-0.016392599791288376,
0.028966687619686127,
-0.0222167931497097,
0.03741369768977165,
-0.018870774656534195,
-0.006099011283367872,
0.018562206998467445,
-0.05542626976966858,
-0.07571452111005783,
-0.018311496824026108,
0.04778924956917763,
-0.030200952664017677,
0.0038643141742795706,
0.0489078015089035,
-0.025186747312545776,
0.017578652128577232,
0.009348602965474129,
0.03143521770834923,
-0.016325099393725395,
-0.05500199273228645,
-0.004081274848431349,
-0.01339371781796217,
-0.036391571164131165,
-0.0011414552573114634,
0.003960741218179464,
0.0472106859087944,
0.003543694270774722,
0.06769178807735443,
0.05280345305800438,
-0.0422736220061779,
-0.09256996959447861,
0.03511873260140419,
-0.017945075407624245,
-0.00552044901996851,
-0.013200863264501095,
-0.004522428847849369,
-0.0760616585612297,
-0.03617943078279495,
-0.028985971584916115,
-0.008461473509669304,
-0.020268967375159264,
-0.08477866649627686,
-0.0402679368853569,
-0.03843582421541214,
-0.025206031277775764,
0.009960914961993694,
-0.028754547238349915,
0.01343228854238987,
0.01106982585042715,
-0.008133621886372566,
-0.06344900280237198,
-0.058781933039426804,
-0.011985883116722107,
0.09094999730587006,
0.015071548521518707,
0.0472106859087944,
0.03972794488072395,
0.021946797147393227,
0.022448217496275902,
-0.007916660979390144,
-0.0527648851275444,
-0.03683513402938843,
0.04775067791342735,
-0.030933799222111702,
0.04944779351353645,
0.026363156735897064,
-0.021753942593932152,
0.07093174010515213,
0.0469021201133728,
-0.022274648770689964,
-0.000366422813385725,
-0.03479088097810745,
0.014406201429665089,
0.02632458508014679,
0.03342161700129509,
0.009816274046897888,
-0.032457347959280014,
-0.04898494482040405,
-0.008258976973593235,
-0.023798197507858276,
0.02385605312883854,
0.017115801572799683,
-0.05519484728574753,
-0.011378392577171326,
0.032225921750068665,
0.01697116158902645,
0.028137413784861565,
-0.03550444170832634,
-0.06780750304460526,
-0.03390375152230263,
-0.021580373868346214,
0.058550506830215454,
0.0004739992436952889,
-0.05149204656481743,
-0.0248396098613739,
0.032303061336278915,
-0.03511873260140419,
-0.03720155730843544,
0.07656308263540268,
-0.04555214196443558,
0.02715385891497135,
-0.04667069390416145,
0.010645546950399876,
0.0410393550992012,
0.036237288266420364,
-0.0165854524821043,
0.006026690825819969,
0.06838606297969818,
0.009218426421284676,
-0.0007147655123844743,
0.026054589077830315,
-0.0034954806324094534,
-0.00366422813385725,
-0.04138649255037308,
0.0009618598851375282,
-0.01497512124478817,
0.025881020352244377,
0.06256186962127686,
0.03536944463849068,
0.03182092681527138,
0.05342058837413788,
-0.005857943557202816,
-0.01408799272030592,
0.00636900682002306,
0.05581197887659073,
0.0178968608379364,
0.027057431638240814,
0.01131089311093092,
0.0063834707252681255,
0.02771313488483429,
0.002584245055913925,
0.023219633847475052,
0.08107586950063705,
0.019941113889217377,
0.04262075945734978,
0.02146466262638569,
-0.0862443596124649,
0.04331503435969353,
-0.019333623349666595,
-0.05280345305800438,
0.0964270532131195,
0.04871494695544243,
0.014946193434298038,
0.05241774767637253,
-0.0059977625496685505,
-0.02339320257306099,
0.013895138166844845,
-0.00120654352940619,
-0.04593784734606743,
-0.0178968608379364,
0.030528804287314415,
0.00243237242102623,
-0.011667673476040363,
0.008162549696862698,
0.003970384132117033,
0.03814654424786568,
0.028985971584916115,
-0.03506087511777878,
0.08369868248701096,
-0.032920196652412415,
0.007381490897387266,
-0.025032462552189827,
0.04543642699718475,
-0.05758623778820038,
-0.024878179654479027,
0.027809562161564827,
-0.0632561445236206,
0.0350223071873188,
-0.035697296261787415,
0.05488627776503563,
-0.02809884399175644,
0.026498153805732727,
-0.018407924100756645,
0.022563930600881577,
0.010597333312034607,
0.02283392660319805,
-0.03185949847102165,
-0.01884184591472149,
-0.04570642486214638,
0.013220149092376232,
0.02291106805205345,
-0.023952480405569077,
-0.09557849913835526,
-0.043662168085575104,
0.001336720073595643,
0.02053896151483059,
-0.010549119673669338,
0.03041309304535389,
-0.03560086712241173,
0.060864757746458054,
-0.008538615889847279,
0.0010347828501835465,
-0.0236053429543972,
-0.008196299895644188,
0.05099062621593475,
-0.011667673476040363,
-0.024878179654479027,
-0.09280139952898026,
-0.04478072375059128,
0.001228239620104432,
-0.0038956529460847378,
0.009922344237565994,
0.031917355954647064,
-0.028985971584916115,
0.0063449000008404255,
0.058550506830215454,
-0.04076935723423958,
0.01412656344473362,
-0.0317823551595211,
-0.00860611442476511,
-0.012930868193507195,
-0.02848455123603344,
0.04925493896007538,
-0.0416564866900444,
0.021059667691588402,
0.06395041942596436,
-0.03843582421541214,
-0.05388343706727028,
-0.007241671904921532,
0.016093675047159195,
-0.02779027633368969,
-0.0010956523474305868,
0.031010940670967102,
0.004577874206006527,
0.024955321103334427,
-0.038242969661951065,
0.019507192075252533,
-0.0024661219213157892,
-0.027346711605787277,
0.03133879229426384,
-0.04127077758312225,
0.02854240871965885,
-0.01196659728884697,
-0.012448732741177082,
0.031840212643146515,
-0.01683616265654564,
0.030702373012900352,
0.006094189826399088,
-0.037317268550395966,
0.049370650202035904,
-0.02715385891497135,
0.04127077758312225,
0.014512271620333195,
0.08693863451480865,
-0.00003480413943179883,
0.036005862057209015,
-0.003987258765846491,
-0.005361344199627638,
-0.034385886043310165,
0.01431941706687212,
0.0516849011182785,
-0.03442445769906044,
-0.0515306182205677,
-0.02254464477300644,
0.04694068804383278,
-0.0208282433450222,
0.03691227734088898,
0.019188983365893364,
-0.050604917109012604,
0.047827817499637604,
-0.018186142668128014,
-0.028214555233716965,
-0.0017405083635821939,
-0.03729798272252083,
-0.009777703322470188,
-0.0408850722014904,
0.01134946383535862,
-0.03943866491317749,
0.0427364706993103,
0.06213759258389473,
-0.012468017637729645,
0.025109604001045227,
0.012468017637729645,
0.028060272336006165,
0.012487303465604782,
-0.012516231276094913,
0.032920196652412415,
0.04825209826231003,
-0.03444374352693558,
0.06992889940738678,
0.01660473830997944,
0.04053793475031853,
-0.007275421172380447,
-0.012689800001680851,
0.004558588843792677,
-0.018629707396030426,
0.04933208227157593,
-0.02462746948003769,
-0.02401033602654934,
-0.037162985652685165,
0.004809299483895302,
-0.0013415414141491055,
0.0908728539943695,
-0.061944738030433655,
0.03619871661067009,
-0.03907224163413048,
-0.006026690825819969,
-0.0041632382199168205,
0.012429446913301945,
0.016228673979640007,
0.01829221285879612,
-0.03473302349448204,
-0.02894740179181099,
0.06144331768155098,
-0.013798711821436882,
0.0459764190018177,
0.013711927458643913,
0.02609316073358059,
0.018186142668128014,
0.011060182936489582,
-0.06827035546302795,
0.04265932738780975,
-0.04061507433652878,
-0.026883862912654877,
0.02269892767071724,
0.02377891167998314,
0.08385296911001205,
0.009290746413171291,
-0.02470461092889309,
-0.0032013782765716314,
-0.0012607837561517954,
-0.001365648116916418,
-0.035639438778162,
0.03473302349448204,
0.06641895323991776,
0.07131744921207428,
0.02763599343597889,
0.066958948969841,
0.012333020567893982,
-0.015081191435456276,
-0.01997968554496765,
-0.07274457067251205,
0.005689196288585663,
0.030509520322084427,
0.019719332456588745,
0.0017043481348082423,
0.004426001571118832,
0.031223079189658165,
0.05604340508580208,
0.014830481261014938,
0.03234163299202919,
-0.03999794274568558,
-0.0442793034017086,
-0.0018839435651898384,
0.018851488828659058,
0.004712872207164764,
0.02887026034295559,
-0.005105812568217516,
0.01666259579360485,
0.0236053429543972,
0.0385708212852478,
0.03581300750374794,
-0.006981318816542625,
0.0036280679050832987,
0.015495827421545982,
-0.0019237197702750564,
0.09974414110183716,
-0.03228377923369408,
0.03452088683843613,
0.0891757383942604,
-0.009170212782919407,
-0.015148689970374107,
0.028195271268486977,
0.02601601928472519,
-0.005115455016493797,
0.0016452865675091743,
-0.009329317137598991,
-0.03789583221077919,
0.010471978224813938,
-0.04265932738780975,
0.08879002928733826,
0.04061507433652878,
-0.02277607098221779,
-0.029757387936115265,
-0.01401085127145052,
0.015100476332008839,
-0.014647269621491432,
-0.006123118102550507,
-0.05654482543468475,
-0.011436248198151588,
0.027655279263854027,
0.04424073174595833,
-0.0221396517008543,
-0.026151016354560852,
-0.03243806213140488,
0.0006942747859284282,
-0.07664022594690323,
-0.02323891967535019,
0.04925493896007538,
0.05781766027212143,
0.02406819351017475,
-0.015437970869243145,
-0.018186142668128014,
0.07054603099822998,
0.0024070602376013994,
-0.05257203057408333,
0.010269480757415295,
0.02121395245194435,
-0.062330447137355804,
-0.033768754452466965,
0.0021708139684051275,
0.04115506634116173,
-0.03226449340581894,
0.009970556944608688,
0.0131912212818861,
0.033460188657045364,
-0.03473302349448204,
0.006190616637468338,
-0.003401464316993952,
-0.021021097898483276,
0.02169608697295189,
0.027905989438295364,
-0.07293742150068283,
-0.031454503536224365,
-0.04856066405773163,
0.0028928115498274565,
0.03243806213140488,
-0.05010349676012993,
0.0221396517008543,
0.0040909177623689175,
0.013306933455169201,
0.01038519386202097,
-0.02809884399175644,
-0.046284984797239304,
0.02339320257306099,
0.0570848174393177,
0.04100078344345093,
0.031126653775572777,
0.002422729739919305,
-0.019121484830975533,
-0.012603015638887882,
0.018629707396030426,
-0.026961004361510277,
-0.011166253127157688,
-0.030548090115189552,
0.052533458918333054,
0.06769178807735443,
-0.03149307519197464,
-0.0038835995364934206,
-0.03527301549911499,
-0.007853983901441097,
-0.015139047056436539,
-0.04917779564857483,
-0.04794353246688843,
-0.006904176902025938,
0.0489078015089035,
-0.027423854917287827,
-0.025206031277775764,
-0.0031820926815271378,
-0.005530091468244791,
-0.01953612081706524,
-0.03706656023859978,
0.028118127956986427,
0.04929351061582565,
0.04146363213658333,
-0.01192802656441927,
0.007675593253225088,
0.011175895109772682,
0.03643013909459114,
0.019960399717092514,
-0.007391133811324835,
-0.008635042235255241,
-0.04447215795516968,
0.015245117247104645,
0.04516643285751343,
-0.06811606884002686,
0.0340966060757637,
0.029159540310502052,
-0.015611539594829082,
0.0209053847938776,
0.003914938308298588,
0.013557643629610538,
0.05257203057408333,
-0.005346880294382572,
0.04204219579696655,
0.01683616265654564,
-0.048676375299692154,
0.0455135703086853,
0.03187878429889679,
-0.002584245055913925,
-0.05550341308116913,
-0.018562206998467445,
-0.01547654252499342,
-0.10228981822729111,
0.015100476332008839,
0.02267964370548725,
-0.01042376458644867,
0.046439267694950104,
-0.0408850722014904,
0.03232234716415405,
-0.054924849420785904,
-0.008533794432878494,
0.030451662838459015,
0.029468107968568802,
0.00028159713838249445,
0.07725735753774643,
-0.010230910032987595,
0.0013596214121207595,
0.04917779564857483,
-0.012053381651639938,
-0.057161957025527954,
-0.07424882799386978,
0.0022286702878773212,
-0.05234060436487198,
-0.05141490325331688,
0.03565872460603714,
-0.008972537703812122,
0.017337584868073463,
-0.03442445769906044,
-0.03126164898276329,
0.001986397197470069,
0.03712441399693489,
0.006581146270036697,
0.038088686764240265,
-0.06672751903533936,
0.04277504235506058,
0.005669910926371813,
0.00038751622196286917,
0.02231322042644024,
0.0023889802396297455,
0.003661817405372858,
-0.008765218779444695,
0.026845291256904602,
0.0044573405757546425,
0.06252329796552658,
0.010790186934173107,
0.04605356231331825,
0.0033870001789182425,
0.020886098966002464,
-0.024203190580010414,
0.0038594927173107862,
0.014560485258698463,
-0.0159683208912611,
0.08061301708221436,
-0.052533458918333054,
-0.0445878691971302,
-0.002692725509405136,
0.027520280331373215,
-0.011918383650481701,
0.01666259579360485,
-0.001959879882633686,
-0.06661181151866913,
0.022968923673033714,
-0.00082204065984115,
0.00005115153908263892,
-0.02586173638701439,
0.031994495540857315,
-0.005766337737441063,
0.017164016142487526,
-0.0018345246789976954,
-0.019719332456588745,
-0.0660332441329956,
0.04138649255037308,
0.01706758886575699,
-0.0845472440123558,
0.002572191646322608,
0.022641072049736977,
-0.022023938596248627,
0.05234060436487198,
-0.0643361285328865,
-0.02584245055913925,
-0.031203795224428177,
-0.04007508233189583,
0.006981318816542625,
-0.03110736794769764,
-0.005809729918837547,
0.02323891967535019,
-0.04096221178770065,
-0.01104089803993702,
-0.03432803228497505,
-0.006581146270036697,
-0.03357589989900589,
-0.10128697752952576,
0.03506087511777878,
-0.02771313488483429,
0.0456678532063961,
-0.0797644555568695,
-0.003796815173700452,
0.025726737454533577,
-0.015004049986600876,
-0.03452088683843613,
-0.04856066405773163,
0.03527301549911499,
-0.0053709871135652065,
-0.04670926555991173,
-0.02470461092889309,
-0.016093675047159195,
0.038705818355083466,
-0.027423854917287827,
0.057856231927871704,
-0.021483948454260826,
-0.012275164015591145,
0.041965052485466,
-0.014068706892430782,
-0.03725941479206085,
0.06954319030046463,
0.06082618609070778,
0.022332506254315376,
-0.048676375299692154,
0.02917882613837719,
-0.04454929754137993,
0.016170816496014595,
-0.004985278472304344,
0.022814640775322914,
0.04385502263903618,
-0.06614895910024643,
0.01644081249833107,
-0.018263284116983414,
-0.0009727079304866493,
0.06734465062618256,
-0.04389359429478645,
-0.025418171659111977,
0.0031121831852942705,
0.011166253127157688,
0.002366078784689307,
0.0021105471532791853,
-0.016305815428495407,
0.03633371368050575,
0.002750581596046686,
-0.004341627936810255,
-0.019256481900811195,
-0.02701885998249054,
0.07922446727752686,
-0.000138463219627738,
-0.06028619408607483,
-0.043507885187864304,
-0.00969091895967722,
0.0019357730634510517,
0.024743182584643364,
0.01976754516363144,
0.013605857267975807,
0.038088686764240265,
-0.0031145939137786627,
0.02445390075445175,
-0.046284984797239304,
0.03535015881061554,
-0.013422645628452301,
0.04385502263903618,
0.03428946062922478,
-0.014734053984284401,
-0.0678846463561058,
-0.03652656823396683,
-0.02584245055913925,
-0.012101595290005207,
0.03025881014764309,
0.03434731811285019,
-0.022737499326467514,
-0.1027526706457138,
0.053999148309230804,
0.011503747664391994,
-0.02516746148467064,
-0.04609213024377823,
-0.06985175609588623,
0.023759625852108,
0.010732331313192844,
0.005896514281630516,
-0.060941897332668304,
-0.015466899611055851,
-0.013345504179596901,
-0.027211714535951614,
-0.03355661407113075,
-0.0034906594082713127,
0.01581403613090515,
0.014714768156409264,
0.028985971584916115,
-0.019237197935581207,
-0.03876367583870888,
0.020963242277503014,
-0.03278519958257675,
0.018870774656534195,
0.019092556089162827,
0.0013391306856647134,
0.03629514202475548,
-0.012892297469079494,
0.04015222564339638,
-0.026729580014944077,
-0.010365908034145832,
0.006026690825819969,
0.036622993648052216,
0.01682652160525322,
0.06352614611387253,
0.025649596005678177,
0.004744211211800575,
-0.048522092401981354,
-0.032457347959280014,
-0.008649506606161594,
-0.009141284972429276,
0.03025881014764309,
0.0250710342079401,
-0.08848146349191666,
0.012979081831872463,
-0.021946797147393227,
0.009743954055011272,
0.008143264800310135,
0.0023624629247933626,
-0.0077720205299556255,
-0.003890831721946597,
0.028426695615053177,
-0.01131089311093092,
0.006489540915936232,
-0.058396223932504654,
-0.04431787505745888,
-0.017781149595975876,
0.012091952376067638,
-0.062330447137355804,
0.012805513106286526,
0.023836767300963402,
-0.04508928954601288,
0.031165223568677902
] |
52,261 |
osmnx.io
|
save_graph_xml
|
Save graph to disk as an OSM-formatted XML .osm file.
This function exists only to allow serialization to the .osm file format
for applications that require it, and has constraints to conform to that.
As such, this function has a limited use case which does not include
saving/loading graphs for subsequent OSMnx analysis. To save/load graphs
to/from disk for later use in OSMnx, use the `io.save_graphml` and
`io.load_graphml` functions instead. To load a graph from a .osm file that
you have downloaded or generated elsewhere, use the `graph.graph_from_xml`
function.
Parameters
----------
data : networkx.MultiDiGraph
the input graph
filepath : string or pathlib.Path
do not use, deprecated
node_tags : list
do not use, deprecated
node_attrs: list
do not use, deprecated
edge_tags : list
do not use, deprecated
edge_attrs : list
do not use, deprecated
oneway : bool
do not use, deprecated
merge_edges : bool
do not use, deprecated
edge_tag_aggs : tuple
do not use, deprecated
api_version : float
do not use, deprecated
precision : int
do not use, deprecated
way_tag_aggs : dict
Keys are OSM way tag keys and values are aggregation functions
(anything accepted as an argument by pandas.agg). Allows user to
aggregate graph edge attribute values into single OSM way values. If
None, or if some tag's key does not exist in the dict, the way
attribute will be assigned the value of the first edge of the way.
Returns
-------
None
|
def save_graph_xml(
data,
filepath=None,
node_tags=None,
node_attrs=None,
edge_tags=None,
edge_attrs=None,
oneway=None,
merge_edges=None,
edge_tag_aggs=None,
api_version=None,
precision=None,
way_tag_aggs=None,
):
"""
Save graph to disk as an OSM-formatted XML .osm file.
This function exists only to allow serialization to the .osm file format
for applications that require it, and has constraints to conform to that.
As such, this function has a limited use case which does not include
saving/loading graphs for subsequent OSMnx analysis. To save/load graphs
to/from disk for later use in OSMnx, use the `io.save_graphml` and
`io.load_graphml` functions instead. To load a graph from a .osm file that
you have downloaded or generated elsewhere, use the `graph.graph_from_xml`
function.
Parameters
----------
data : networkx.MultiDiGraph
the input graph
filepath : string or pathlib.Path
do not use, deprecated
node_tags : list
do not use, deprecated
node_attrs: list
do not use, deprecated
edge_tags : list
do not use, deprecated
edge_attrs : list
do not use, deprecated
oneway : bool
do not use, deprecated
merge_edges : bool
do not use, deprecated
edge_tag_aggs : tuple
do not use, deprecated
api_version : float
do not use, deprecated
precision : int
do not use, deprecated
way_tag_aggs : dict
Keys are OSM way tag keys and values are aggregation functions
(anything accepted as an argument by pandas.agg). Allows user to
aggregate graph edge attribute values into single OSM way values. If
None, or if some tag's key does not exist in the dict, the way
attribute will be assigned the value of the first edge of the way.
Returns
-------
None
"""
osm_xml._save_graph_xml(
data,
filepath,
node_tags,
node_attrs,
edge_tags,
edge_attrs,
oneway,
merge_edges,
edge_tag_aggs,
api_version,
precision,
way_tag_aggs,
)
|
(data, filepath=None, node_tags=None, node_attrs=None, edge_tags=None, edge_attrs=None, oneway=None, merge_edges=None, edge_tag_aggs=None, api_version=None, precision=None, way_tag_aggs=None)
|
[
-0.0012057583080604672,
-0.0029863547533750534,
-0.01912388764321804,
0.043295133858919144,
0.005823158193379641,
-0.04849204793572426,
-0.06729813665151596,
0.008230001665651798,
-0.0010959315113723278,
-0.04022933170199394,
0.025162026286125183,
-0.03278914839029312,
-0.014599956572055817,
-0.006870018318295479,
-0.015394449234008789,
0.011057457886636257,
-0.006608303170651197,
-0.08920741826295853,
0.03604188933968544,
0.03349951654672623,
0.03312563896179199,
-0.02304961159825325,
-0.008024368435144424,
-0.03888336941599846,
0.03366776183247566,
0.004995951894670725,
-0.0165067370980978,
0.053801123052835464,
-0.01299227960407734,
-0.008323471061885357,
-0.009122636169195175,
-0.10573285073041916,
0.016198286786675453,
0.003783183405175805,
0.03288261592388153,
0.045164525508880615,
0.0035682031884789467,
0.04871637374162674,
-0.041238803416490555,
-0.051408298313617706,
0.014814937487244606,
-0.03899553045630455,
-0.0035051112063229084,
-0.012207134626805782,
-0.0013798454310745,
0.00723454961553216,
-0.046921756118535995,
0.07978568226099014,
0.048454657196998596,
-0.015254244208335876,
0.029143832623958588,
-0.06486792862415314,
-0.03744393587112427,
0.046061836183071136,
-0.022208385169506073,
0.0465104915201664,
0.02218969166278839,
0.05331508070230484,
0.025535903871059418,
-0.016469350084662437,
0.03177967667579651,
-0.002670894842594862,
0.09743274748325348,
-0.0022631334140896797,
-0.009389025159180164,
0.023087000474333763,
-0.04983801022171974,
-0.05365157127380371,
-0.07313064485788345,
0.06382106989622116,
-0.010300354100763798,
-0.010898559354245663,
0.036116667091846466,
0.015646817162632942,
-0.0046103899367153645,
0.06019444391131401,
0.014515833929181099,
0.02097458578646183,
-0.07903791964054108,
0.03673356771469116,
-0.0130577078089118,
-0.04587489739060402,
0.0005681201000697911,
0.009973210282623768,
0.027180969715118408,
-0.006781221833080053,
0.03477070480585098,
0.07829016447067261,
-0.04707130789756775,
-0.061465632170438766,
0.01409522071480751,
0.046697430312633514,
-0.008823533542454243,
-0.006977508310228586,
0.07264459878206253,
-0.038733817636966705,
-0.04471587389707565,
-0.013347463682293892,
0.005767076276242733,
-0.009038513526320457,
-0.046136610209941864,
0.033050861209630966,
-0.037088751792907715,
-0.021049361675977707,
-0.0055380756966769695,
-0.08860921114683151,
-0.019591234624385834,
0.030658040195703506,
-0.015329020097851753,
-0.04643571376800537,
-0.09287142753601074,
-0.06763462722301483,
0.06610172241926193,
0.04378117620944977,
0.03394817188382149,
-0.0047248899936676025,
0.01846025325357914,
0.05338985472917557,
0.048118166625499725,
-0.03460245952010155,
-0.019067805260419846,
0.029424240812659264,
-0.012786646373569965,
0.0388459786772728,
0.03334996476769447,
-0.024003002792596817,
0.1312313675880432,
0.03058326430618763,
-0.06610172241926193,
-0.035873644053936005,
-0.013394198380410671,
-0.0010860003530979156,
0.05088486894965172,
0.04740779846906662,
0.013824159279465675,
-0.05600700527429581,
-0.0199838075786829,
0.015656163915991783,
-0.031947921961545944,
0.022114915773272514,
0.006351261865347624,
-0.08920741826295853,
-0.04247260093688965,
0.019404295831918716,
0.0253489650785923,
0.02327393926680088,
-0.02544243447482586,
-0.04673481732606888,
0.0025400372687727213,
-0.03716352581977844,
0.04695914313197136,
-0.039481572806835175,
-0.06576523184776306,
-0.02697533741593361,
0.03292000666260719,
-0.050398826599121094,
-0.018077027052640915,
0.03157404437661171,
-0.04355685040354729,
0.006440057884901762,
-0.05626871809363365,
0.03963112458586693,
0.04052843526005745,
-0.011178968474268913,
-0.011076151393353939,
-0.01847894676029682,
-0.018525682389736176,
-0.0002750051789917052,
0.04007977992296219,
-0.02807827852666378,
-0.008968411013484001,
0.004715543240308762,
-0.035462379455566406,
-0.013936322182416916,
0.003678030101582408,
-0.026190191507339478,
0.037088751792907715,
-0.015992654487490654,
0.0031078653410077095,
0.05832505226135254,
-0.03918246924877167,
0.0050520338118076324,
0.004521593451499939,
0.04699653387069702,
-0.021703649312257767,
0.034452907741069794,
0.00863192044198513,
-0.034565072506666183,
-0.026601457968354225,
-0.003234049305319786,
0.028564320877194405,
-0.0010059669148176908,
0.025722842663526535,
0.023872144520282745,
0.036210134625434875,
-0.028975587338209152,
0.04718347266316414,
-0.03473331779241562,
-0.022750509902834892,
0.11507981270551682,
0.08374879509210587,
-0.023348715156316757,
0.07627122104167938,
-0.0014581263530999422,
0.014908406883478165,
0.008982432074844837,
-0.00102466088719666,
-0.0395563505589962,
0.004696849267929792,
0.02381606213748455,
0.03333127126097679,
0.0005824326653964818,
0.009360983967781067,
0.017338616773486137,
0.027872644364833832,
0.05589484050869942,
-0.042771704494953156,
0.0661391168832779,
-0.07511220127344131,
0.002014270517975092,
-0.03058326430618763,
0.020507236942648888,
-0.048006005585193634,
-0.01669367589056492,
0.06722336262464523,
-0.021797118708491325,
0.0395563505589962,
-0.016983432695269585,
0.05211866647005081,
0.03101322427392006,
0.04247260093688965,
0.007131733000278473,
0.024975085631012917,
-0.007828081957995892,
-0.00792155135422945,
-0.007449530065059662,
-0.009220779873430729,
-0.033705148845911026,
0.009646066464483738,
-0.005897934082895517,
0.005626872181892395,
-0.08539386093616486,
-0.04751996323466301,
0.0031873146072030067,
0.04007977992296219,
-0.06355935335159302,
0.0037411220837384462,
-0.08958129584789276,
0.043295133858919144,
-0.007790694013237953,
0.032060083001852036,
0.018647192046046257,
0.007519632112234831,
0.026601457968354225,
0.0445663221180439,
-0.007930898107588291,
-0.03258351609110832,
-0.027685705572366714,
0.007122386246919632,
-0.010907906107604504,
-0.00221406202763319,
0.036883119493722916,
-0.0006466930499300361,
-0.017217107117176056,
0.018217232078313828,
-0.04295864328742027,
-0.027162276208400726,
-0.04991278424859047,
0.010393823496997356,
-0.02140454575419426,
-0.04064059630036354,
0.03835993632674217,
-0.016628248617053032,
0.031293634325265884,
0.061989061534404755,
-0.031947921961545944,
0.034789398312568665,
-0.03733177110552788,
0.027797868475317955,
0.018843477591872215,
-0.04250998795032501,
0.006276485975831747,
-0.01932951994240284,
-0.0037481323815882206,
-0.007463550195097923,
-0.038397327065467834,
-0.05540879815816879,
0.01790878176689148,
0.0426221527159214,
-0.03667748346924782,
0.02424602396786213,
0.005664259660989046,
-0.01757229119539261,
0.04314558207988739,
0.009963862597942352,
-0.020039889961481094,
0.011571540497243404,
0.013244647532701492,
0.04142574220895767,
-0.03880859166383743,
0.07978568226099014,
0.015272938646376133,
0.10977073758840561,
-0.046248774975538254,
0.06445665657520294,
0.03400425240397453,
0.004995951894670725,
-0.038621652871370316,
-0.01545987743884325,
0.04314558207988739,
-0.026134109124541283,
-0.01399240456521511,
-0.02972334437072277,
0.010674232617020607,
0.0103751290589571,
0.030415019020438194,
0.02719966322183609,
-0.048006005585193634,
0.04740779846906662,
-0.01206692960113287,
0.011001376435160637,
0.014833630993962288,
-0.016665635630488396,
-0.043220359832048416,
-0.044940199702978134,
-0.0312749408185482,
0.04060320928692818,
0.026807090267539024,
0.05387589707970619,
-0.06516703218221664,
-0.012207134626805782,
-0.00852910429239273,
0.03779911994934082,
0.030545877292752266,
-0.020619401708245277,
0.008697349578142166,
-0.009393698535859585,
-0.04751996323466301,
0.046174000948667526,
0.04923980310559273,
0.028134359046816826,
0.019179968163371086,
0.00923947338014841,
-0.0013109116116538644,
0.0009276861092075706,
0.06109175458550453,
-0.014254119247198105,
-0.02392822690308094,
-0.04923980310559273,
-0.003886000020429492,
0.003409304888918996,
0.1136590763926506,
-0.04699653387069702,
-0.0026078028604388237,
-0.004963237792253494,
-0.019703399389982224,
0.05208127945661545,
0.03136840835213661,
0.009038513526320457,
0.02961117960512638,
-0.012319297529757023,
0.003972459584474564,
0.02491900511085987,
-0.009351637214422226,
0.05365157127380371,
0.0022175670601427555,
0.036883119493722916,
0.06075526401400566,
0.00010413101699668914,
-0.05290381237864494,
0.013366158120334148,
-0.04755735024809837,
-0.019497765228152275,
0.02918121963739395,
0.01846025325357914,
0.092198446393013,
-0.018086373805999756,
0.003189651295542717,
-0.011842602863907814,
-0.03604188933968544,
-0.021479321643710136,
-0.020675482228398323,
0.060904812067747116,
-0.006346588023006916,
0.05043621361255646,
0.009272187948226929,
0.06064309924840927,
0.03133102133870125,
-0.014581263065338135,
-0.013553096912801266,
-0.028769953176379204,
-0.00685132434591651,
-0.007356060203164816,
0.03974328935146332,
0.01989033818244934,
0.023442184552550316,
0.07784151285886765,
0.014160649850964546,
-0.00756636681035161,
0.013581138104200363,
-0.012599706649780273,
-0.032041389495134354,
-0.0010824952041730285,
-0.004486542660742998,
-0.033256497234106064,
0.032377880066633224,
-0.05798856168985367,
-0.03258351609110832,
0.012515584006905556,
0.016880616545677185,
-0.01245015487074852,
-0.005921301431953907,
0.049538906663656235,
-0.011048111133277416,
0.04236043989658356,
0.07511220127344131,
0.006379302591085434,
0.06195167452096939,
0.032041389495134354,
-0.01371199544519186,
-0.01877805031836033,
0.028452156111598015,
0.041687458753585815,
0.02041376754641533,
0.0008517420501448214,
-0.050959642976522446,
-0.022993529215455055,
-0.033256497234106064,
-0.0410892516374588,
0.08973085135221481,
0.04815555736422539,
-0.07948657870292664,
0.00688403844833374,
-0.002521343296393752,
0.04520191624760628,
0.0034981011413037777,
0.0027503441087901592,
-0.07440182566642761,
0.014786896295845509,
0.01878739707171917,
0.013861547224223614,
-0.02632104977965355,
0.007650489453226328,
-0.03432204946875572,
-0.014955141581594944,
-0.05484798178076744,
-0.03157404437661171,
0.02009597048163414,
0.07417750358581543,
0.029536403715610504,
0.026414519175887108,
-0.023778675124049187,
0.05623133108019829,
-0.004023867659270763,
-0.03581756353378296,
-0.02948032319545746,
0.009071228094398975,
-0.030190691351890564,
0.011169621720910072,
-0.03422858193516731,
0.040790148079395294,
-0.024320797994732857,
0.013786771334707737,
-0.01638522744178772,
0.04019194096326828,
0.014254119247198105,
-0.004671144764870405,
-0.04325774684548378,
0.014403671026229858,
-0.029854200780391693,
0.054773204028606415,
-0.05888586863875389,
-0.012739910744130611,
-0.03736915811896324,
0.0005129146156832576,
0.022638345137238503,
-0.07013961672782898,
0.004234174266457558,
0.0063746292144060135,
-0.048678986728191376,
0.008762777782976627,
-0.04355685040354729,
0.024956392124295235,
0.04591228440403938,
0.0014885038835927844,
0.03422858193516731,
0.04224827513098717,
-0.04890331253409386,
-0.01835743710398674,
-0.014431711286306381,
-0.013936322182416916,
-0.05196911841630936,
-0.02686317265033722,
-0.04116402566432953,
0.0318918377161026,
0.0692049190402031,
-0.026470599696040154,
-0.01912388764321804,
-0.04733302444219589,
-0.05178217589855194,
-0.00781873520463705,
-0.04759473726153374,
0.03398555889725685,
-0.026078028604388237,
0.020563319325447083,
0.03234049305319786,
0.027928726747632027,
0.0036289584822952747,
0.012468849308788776,
0.006042812019586563,
-0.01639457419514656,
-0.044528935104608536,
0.0050193192437291145,
0.017207760363817215,
-0.019927725195884705,
-0.014656038954854012,
0.007580387406051159,
-0.009814311750233173,
-0.012599706649780273,
-0.04475326091051102,
-0.0213110763579607,
-0.03338735178112984,
0.011889337562024593,
0.05922235921025276,
-0.04479064792394638,
-0.027442684397101402,
-0.0004416440206114203,
-0.0025867721997201443,
-0.03966851159930229,
0.040042392909526825,
0.037088751792907715,
0.018497640267014503,
-0.044192444533109665,
0.025405047461390495,
0.004575338680297136,
-0.040154553949832916,
0.04269693046808243,
0.002565741539001465,
0.016347838565707207,
-0.02349826693534851,
-0.03396686539053917,
-0.01191737875342369,
-0.04826771840453148,
0.004311286844313145,
0.027012724429368973,
0.0022900060284882784,
0.035350214689970016,
-0.021703649312257767,
0.02119891345500946,
-0.04378117620944977,
-0.011001376435160637,
0.007800040766596794,
0.03576148301362991,
0.0023402459919452667,
0.032490044832229614,
-0.04236043989658356,
0.04206133633852005,
-0.03768695518374443,
0.0017747547244653106,
-0.04673481732606888,
-0.05338985472917557,
0.01408587396144867,
-0.044416770339012146,
-0.01671237125992775,
0.03422858193516731,
0.025498516857624054,
0.019703399389982224,
-0.040790148079395294,
-0.027480073273181915,
0.03013461083173752,
0.00918339192867279,
-0.023330021649599075,
0.01639457419514656,
-0.09705886989831924,
0.04060320928692818,
-0.00311253871768713,
-0.0042318375781178474,
0.02282528392970562,
0.01639457419514656,
-0.05208127945661545,
-0.01273056399077177,
0.010711620561778545,
-0.0034747335594147444,
0.03733177110552788,
0.07571040093898773,
0.006701772566884756,
0.0014277487061917782,
0.038509488105773926,
-0.04120141640305519,
0.010010598227381706,
0.028975587338209152,
-0.00999190378934145,
0.057726845145225525,
-0.02587239444255829,
-0.04273431748151779,
-0.0082533685490489,
0.049987562000751495,
-0.007748632691800594,
0.03417249768972397,
-0.00042762357043102384,
-0.031387101858854294,
-0.01136590726673603,
-0.00829542987048626,
0.00242787366732955,
-0.050398826599121094,
0.000422365905251354,
-0.003322845557704568,
0.05884848162531853,
0.016899310052394867,
0.02589108794927597,
0.006888712290674448,
0.05600700527429581,
-0.015553346835076809,
-0.028265217319130898,
-0.023442184552550316,
0.04830510541796684,
0.0015609428519383073,
0.05294119939208031,
-0.016254369169473648,
-0.01173978578299284,
0.008659961633384228,
-0.05585745349526405,
0.0008645941270515323,
-0.043631624430418015,
-0.02961117960512638,
0.05043621361255646,
-0.058063335716724396,
0.0034630498848855495,
-0.021572791039943695,
-0.006094220094382763,
0.0192173570394516,
-0.08195417374372482,
0.03561193123459816,
-0.008323471061885357,
0.00043872310197912157,
-0.06109175458550453,
0.0070335897617042065,
0.026956642046570778,
-0.017235800623893738,
-0.05234299600124359,
-0.008351512253284454,
0.046809591352939606,
0.011870643123984337,
-0.022357936948537827,
-0.010823783464729786,
0.011889337562024593,
0.014730814844369888,
0.015385101549327374,
0.012898809276521206,
-0.0035401624627411366,
0.0014184017200022936,
0.010169495828449726,
0.026788396760821342,
-0.026900561526417732,
0.05196911841630936,
0.028769953176379204,
0.05133352428674698,
-0.06011966988444328,
0.005393197759985924,
-0.02512463741004467,
-0.02828391082584858,
-0.004963237792253494,
0.02654537558555603,
0.058287665247917175,
-0.028096972033381462,
-0.03615405410528183,
0.0002804089162964374,
-0.002726976526901126,
0.054885368794202805,
-0.0336303748190403,
-0.05241777002811432,
0.011440683156251907,
0.05727819353342056,
0.039145082235336304,
0.018843477591872215,
-0.042023949325084686,
0.01540379598736763,
0.016534779220819473,
-0.06868148595094681,
0.03854687884449959,
0.015917878597974777,
0.08337491750717163,
0.04808077961206436,
-0.1002742275595665,
-0.05563312768936157,
0.030209386721253395,
-0.0021439597476273775,
0.0388459786772728,
0.0330134741961956,
0.018637845292687416,
-0.018404170870780945,
-0.06557829678058624,
0.03179837018251419,
-0.039145082235336304,
0.04815555736422539,
-0.024769453331828117,
0.017544250935316086,
0.04991278424859047,
0.007346713449805975,
-0.06471837311983109,
-0.03847210109233856,
0.018740661442279816,
-0.029985059052705765,
0.02237663045525551,
0.02217099815607071,
-0.033275190740823746,
-0.04542624205350876,
0.04774428904056549,
0.015973960980772972,
-0.022208385169506073,
-0.018983682617545128,
-0.0557079017162323,
0.03531282767653465,
-0.009029166772961617,
0.03267698362469673,
-0.04576273262500763,
-0.030882367864251137,
-0.01759098470211029,
-0.022544875741004944,
-0.0012933860998600721,
-0.046248774975538254,
0.014169996604323387,
0.024862922728061676,
-0.006762527860701084,
-0.027031417936086655,
-0.04946412891149521,
-0.021909281611442566,
-0.05092225596308708,
0.07066304236650467,
0.01234733872115612,
-0.04142574220895767,
0.0009463800233788788,
0.028377380222082138,
0.02415255270898342,
-0.008066429756581783,
-0.0056923008523881435,
-0.040341492742300034,
-0.011879990808665752,
0.01375873014330864,
0.045164525508880615,
-0.01912388764321804,
0.016002001240849495,
-0.03835993632674217,
-0.027592236176133156,
-0.02676970325410366,
-0.04213611036539078,
0.04980061948299408,
0.0064353845082223415,
-0.05473581701517105,
0.041014473885297775,
0.0020832044538110495,
0.003942081704735756,
0.009529229253530502,
0.005365157034248114,
0.015039264224469662,
0.06127869337797165,
0.015413142740726471,
-0.00951053574681282,
0.0017969537293538451,
-0.04138835519552231,
0.017404045909643173,
0.015712246298789978,
-0.00011296681623207405,
-0.04935196787118912,
-0.027162276208400726,
0.04359423741698265,
-0.030545877292752266,
0.04019194096326828
] |
52,262 |
osmnx.io
|
save_graphml
|
Save graph to disk as GraphML file.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the GraphML file including extension. if None, use default
data folder + graph.graphml
gephi : bool
if True, give each edge a unique key/id to work around Gephi's
interpretation of the GraphML specification
encoding : string
the character encoding for the saved file
Returns
-------
None
|
def save_graphml(G, filepath=None, gephi=False, encoding="utf-8"):
"""
Save graph to disk as GraphML file.
Parameters
----------
G : networkx.MultiDiGraph
input graph
filepath : string or pathlib.Path
path to the GraphML file including extension. if None, use default
data folder + graph.graphml
gephi : bool
if True, give each edge a unique key/id to work around Gephi's
interpretation of the GraphML specification
encoding : string
the character encoding for the saved file
Returns
-------
None
"""
# default filepath if none was provided
filepath = Path(settings.data_folder) / "graph.graphml" if filepath is None else Path(filepath)
# if save folder does not already exist, create it
filepath.parent.mkdir(parents=True, exist_ok=True)
if gephi:
# for gephi compatibility, each edge's key must be unique as an id
uvkd = ((u, v, k, d) for k, (u, v, d) in enumerate(G.edges(keys=False, data=True)))
G = nx.MultiDiGraph(uvkd)
else:
# make a copy to not mutate original graph object caller passed in
G = G.copy()
# stringify all the graph attribute values
for attr, value in G.graph.items():
G.graph[attr] = str(value)
# stringify all the node attribute values
for _, data in G.nodes(data=True):
for attr, value in data.items():
data[attr] = str(value)
# stringify all the edge attribute values
for _, _, data in G.edges(keys=False, data=True):
for attr, value in data.items():
data[attr] = str(value)
nx.write_graphml(G, path=filepath, encoding=encoding)
utils.log(f"Saved graph as GraphML file at {filepath!r}")
|
(G, filepath=None, gephi=False, encoding='utf-8')
|
[
0.05176408961415291,
0.025275003165006638,
-0.016822408884763718,
0.04904159903526306,
-0.001238226774148643,
-0.061771076172590256,
-0.07821638137102127,
0.0017693882109597325,
0.058128826320171356,
-0.04131561517715454,
0.02917478419840336,
-0.03988078981637955,
-0.03962325677275658,
0.05680437386035919,
-0.010834772139787674,
0.010374891571700573,
-0.047165289521217346,
-0.054339416325092316,
0.035465944558382034,
0.026985757052898407,
0.005320811178535223,
-0.0382620133459568,
-0.00128651421982795,
0.013262937776744366,
0.028733300045132637,
-0.03601779788732529,
0.0074086664244532585,
0.04499465599656105,
0.025164632126688957,
0.03811485320329666,
-0.019480515271425247,
-0.08940066397190094,
-0.019701257348060608,
0.0189470537006855,
0.014026339165866375,
0.03541075810790062,
-0.022570908069610596,
0.04149956628680229,
-0.08954782783985138,
-0.0651925802230835,
-0.00810768362134695,
0.018772300332784653,
0.022019052878022194,
0.02084176056087017,
0.008530773222446442,
-0.003295039990916848,
-0.049924567341804504,
0.05971081554889679,
-0.008912473917007446,
0.019590886309742928,
0.03355284035205841,
-0.019885210320353508,
-0.07328647375106812,
0.05371398106217384,
-0.06843014061450958,
0.01916779763996601,
0.021816706284880638,
0.010356497019529343,
0.005555349867790937,
0.007100546732544899,
0.0176685880869627,
-0.037066325545310974,
0.0688348338007927,
0.0019039030885323882,
0.01045767031610012,
0.008829695172607899,
-0.06865087896585464,
-0.03844596445560455,
-0.021522382274270058,
0.0275008212774992,
-0.043191924691200256,
-0.024097710847854614,
0.05529596656560898,
0.004897721577435732,
0.006769433151930571,
0.046613432466983795,
-0.015084062702953815,
0.007183325011283159,
-0.06000513955950737,
0.03031528741121292,
-0.039770420640707016,
-0.02448400855064392,
0.025311794131994247,
-0.015130050480365753,
0.029156390577554703,
-0.01280305813997984,
0.06250688433647156,
0.031786903738975525,
-0.016436109319329262,
-0.0819690078496933,
0.01719031296670437,
0.011506197042763233,
0.023251531645655632,
0.01406312920153141,
0.014697764068841934,
-0.04848974198102951,
-0.038703497499227524,
-0.0016107296105474234,
-0.022497327998280525,
-0.026820199564099312,
-0.07490524649620056,
0.021007316187024117,
-0.017503030598163605,
-0.042897604405879974,
0.020050765946507454,
-0.06589160114526749,
-0.004115925636142492,
-0.006649864371865988,
0.02247893251478672,
-0.05213199183344841,
-0.09624367952346802,
-0.028972437605261803,
0.03596261143684387,
0.009427539072930813,
0.06508221477270126,
0.04142598807811737,
-0.0029363336507230997,
0.002136142458766699,
0.004736763425171375,
-0.039181772619485855,
-0.0459144152700901,
0.03756299614906311,
-0.042492907494306564,
0.0404326468706131,
0.01777895912528038,
-0.00866873748600483,
0.10853166878223419,
0.007298294920474291,
-0.01233398076146841,
-0.016620062291622162,
-0.007675396744161844,
0.014798937365412712,
0.042640071362257004,
0.047018129378557205,
0.015562337823212147,
-0.01337330974638462,
-0.053640399128198624,
-0.019866814836859703,
0.02921157516539097,
0.051065072417259216,
-0.004380356520414352,
-0.04381736367940903,
-0.0026535072829574347,
0.04550972208380699,
0.015415176749229431,
0.003998656291514635,
-0.050218891352415085,
-0.04536255821585655,
-0.04102129116654396,
-0.062396515160799026,
0.039733629673719406,
-0.04392773285508156,
-0.03774694725871086,
-0.03704793006181717,
0.009813838638365269,
0.0009272329625673592,
-0.026912175118923187,
0.11279935389757156,
-0.033902350813150406,
0.016187774017453194,
-0.04234574735164642,
0.029027624055743217,
0.028862066566944122,
0.05875426530838013,
0.001315256697125733,
-0.02371141128242016,
0.05227915570139885,
-0.009960999712347984,
-0.02069459855556488,
0.023306716233491898,
-0.010218532755970955,
-0.06651704013347626,
-0.06831976771354675,
0.01207644771784544,
-0.010025382973253727,
-0.003975662402808666,
0.06865087896585464,
0.04032227396965027,
0.03027849644422531,
0.07681834697723389,
-0.01577388308942318,
-0.02106250263750553,
0.004676979035139084,
0.025440558791160583,
0.016730433329939842,
-0.004472332540899515,
-0.011009526439011097,
0.0036974349059164524,
0.0040745362639427185,
-0.00729369604960084,
0.0360729843378067,
0.021908681839704514,
0.007422462571412325,
0.04098450392484665,
0.02670982852578163,
-0.028512557968497276,
0.06383133679628372,
-0.021264849230647087,
-0.04532577097415924,
0.07328647375106812,
0.06692173331975937,
-0.0004825865325983614,
0.058239199221134186,
-0.03500606119632721,
-0.02382178232073784,
-0.0036744410172104836,
-0.042492907494306564,
-0.018928660079836845,
-0.04742282256484032,
0.0020372681319713593,
0.028034282848238945,
0.013741212897002697,
0.028659719973802567,
0.03541075810790062,
0.02816304937005043,
0.022938812151551247,
-0.06055699288845062,
0.08697249740362167,
-0.02998417429625988,
-0.022239794954657555,
0.0017486935248598456,
-0.008498582057654858,
-0.04241932928562164,
-0.0007243109284900129,
0.04392773285508156,
-0.06342664361000061,
0.033534448593854904,
-0.0327986404299736,
0.007744378410279751,
0.003531878115609288,
0.06441998481750488,
-0.0039181774482131,
0.03443581238389015,
0.0047873505391180515,
0.014973691664636135,
-0.006898199673742056,
-0.03618335723876953,
-0.014017141424119473,
-0.009409144520759583,
0.028034282848238945,
-0.012140830978751183,
-0.09381551295518875,
-0.06276442110538483,
0.04113166406750679,
0.05121223255991936,
-0.0003647423000074923,
0.014302266761660576,
-0.028990833088755608,
0.04804825782775879,
0.003205363405868411,
0.004242392722517252,
-0.004148117266595364,
0.007638606242835522,
0.04826899990439415,
0.02560611627995968,
0.02950589917600155,
-0.08079171180725098,
-0.01378720160573721,
0.029119599610567093,
-0.0183951985090971,
0.015185235999524593,
-0.0021119986195117235,
-0.042676862329244614,
0.020933736115694046,
0.046355899423360825,
-0.01411831472069025,
-0.007086750119924545,
0.011478603817522526,
-0.01924137771129608,
-0.029303550720214844,
0.015387583523988724,
0.05198483169078827,
-0.039660047739744186,
0.009294173680245876,
0.05253668874502182,
-0.04094771295785904,
-0.007762773893773556,
0.014964493922889233,
-0.030444053933024406,
-0.009519515559077263,
-0.0003173171717207879,
-0.0035157823003828526,
0.0275008212774992,
-0.001348598045296967,
-0.023177949711680412,
0.04002795368432999,
-0.03675360605120659,
0.0030352077446877956,
0.03154776617884636,
-0.0364224947988987,
0.030260100960731506,
-0.04010153189301491,
-0.022129423916339874,
0.0262315534055233,
0.011193478479981422,
-0.010577239096164703,
0.00015822745626792312,
-0.011993669904768467,
0.043302297592163086,
-0.014145907945930958,
0.05132260546088219,
-0.0010939394123852253,
0.0816010981798172,
-0.008958461694419384,
-0.0050126914866268635,
0.010273718275129795,
-0.002510944614186883,
-0.02411610446870327,
0.008691730909049511,
0.05588461458683014,
-0.04495786502957344,
-0.0028351598884910345,
0.003950369078665972,
0.061734285205602646,
-0.03005775436758995,
0.04352303966879845,
0.042566489428281784,
-0.0528310090303421,
0.05559029057621956,
-0.04536255821585655,
0.008829695172607899,
0.002114298054948449,
0.013483680784702301,
-0.0002415806957287714,
-0.0245943795889616,
-0.019480515271425247,
-0.010908353142440319,
0.03555791825056076,
0.05113865062594414,
-0.05735623091459274,
0.007473049219697714,
-0.011395825073122978,
0.02976343035697937,
0.0204002745449543,
0.0156727097928524,
0.06445677578449249,
0.019719652831554413,
-0.022791650146245956,
0.06416245549917221,
-0.01222360972315073,
0.06018909066915512,
-0.010935945436358452,
-0.042566489428281784,
-0.02189028635621071,
0.02047385647892952,
0.08564804494380951,
-0.05161692574620247,
-0.025330187752842903,
-0.050218891352415085,
0.033939141780138016,
-0.011368232779204845,
0.06419924646615982,
-0.058092035353183746,
0.012582316063344479,
-0.027629587799310684,
-0.034270256757736206,
0.000551568518858403,
-0.007229313254356384,
-0.027703169733285904,
0.031750112771987915,
-0.03958646580576897,
0.002001627581194043,
0.0473492406308651,
0.004299877677112818,
0.05213199183344841,
-0.019830023869872093,
0.012830651365220547,
0.054670531302690506,
0.025698091834783554,
-0.013713620603084564,
0.05492806434631348,
-0.037029534578323364,
-0.01233398076146841,
0.02269967459142208,
0.021228058263659477,
0.07060077041387558,
0.004017051309347153,
0.003582464996725321,
-0.01995879039168358,
-0.014375847764313221,
-0.003253650851547718,
-0.024428823962807655,
0.043191924691200256,
0.04414847493171692,
0.06570764631032944,
-0.0029271359089761972,
0.09771529585123062,
0.0007438558386638761,
-0.021320035681128502,
-0.007928330451250076,
-0.027776749804615974,
-0.008066294714808464,
0.03984399884939194,
0.035465944558382034,
0.006806223653256893,
0.011561382561922073,
0.02299399860203266,
0.042529698461294174,
-0.016049811616539955,
0.0191310066729784,
-0.04414847493171692,
-0.0728449895977974,
-0.08395568281412125,
0.029046017676591873,
-0.02189028635621071,
0.04753319174051285,
-0.02819983847439289,
0.03999116271734238,
0.009970197454094887,
0.03184209018945694,
0.03485890105366707,
-0.037066325545310974,
-0.012766268104314804,
-0.0066452655009925365,
0.019406935200095177,
0.08586878329515457,
-0.006755636539310217,
-0.00732128880918026,
0.046319108456373215,
0.011588974855840206,
-0.005196643527597189,
0.028512557968497276,
0.027353661134839058,
-0.0225893035531044,
-0.0010945142712444067,
-0.010080568492412567,
-0.04753319174051285,
0.01118428073823452,
-0.07045361399650574,
0.07718625664710999,
0.039402514696121216,
-0.05514880642294884,
0.002867351518943906,
0.0039342730306088924,
0.0122971897944808,
-0.014927703887224197,
-0.019793232902884483,
-0.03140060231089592,
-0.04455317184329033,
0.018266431987285614,
0.05996834859251976,
-0.05651004984974861,
-0.025992415845394135,
-0.009114820510149002,
0.013538866303861141,
-0.04234574735164642,
-0.03603619337081909,
0.035024456679821014,
0.050329264253377914,
0.050034940242767334,
-0.02062101848423481,
0.00755122909322381,
0.061807867139577866,
-0.0064429184421896935,
0.012987010180950165,
-0.022828441113233566,
0.006879804190248251,
-0.06419924646615982,
-0.003911279141902924,
0.04573046416044235,
0.018202049657702446,
-0.012177621014416218,
0.04624553024768829,
0.030664796009659767,
0.025366978719830513,
-0.04937271401286125,
0.02764798328280449,
0.006277361419051886,
-0.038666706532239914,
-0.011276256293058395,
0.0065716844983398914,
-0.035245198756456375,
-0.02426326647400856,
-0.02838379144668579,
-0.011901693418622017,
0.00826864130795002,
-0.0685037225484848,
0.009556305594742298,
0.0012232806766405702,
-0.03213641047477722,
0.038924239575862885,
-0.012904231436550617,
-0.014026339165866375,
0.05503843352198601,
0.039181772619485855,
0.0313454195857048,
0.04212500527501106,
-0.030811958014965057,
-0.028659719973802567,
-0.02236856147646904,
-0.0038285006303340197,
0.0130238002166152,
-0.017677785828709602,
-0.03290900960564613,
0.004879326559603214,
0.046981338411569595,
-0.042492907494306564,
0.0022660584654659033,
-0.04782751575112343,
-0.013262937776744366,
-0.026838595047593117,
-0.030260100960731506,
-0.01770537905395031,
-0.005697912536561489,
0.05702511593699455,
0.014136710204184055,
0.011055514216423035,
0.038703497499227524,
0.00024977230350486934,
-0.0013474483275786042,
-0.054449789226055145,
-0.028714904561638832,
0.012674291618168354,
0.04396452382206917,
-0.01814686320722103,
-0.009114820510149002,
0.003741123480722308,
0.011552184820175171,
0.0037112312857061625,
-0.01668444462120533,
-0.006378535181283951,
-0.03686397895216942,
0.002294800942763686,
-0.008875682950019836,
-0.039144981652498245,
0.042934391647577286,
-0.0260476004332304,
-0.013649237342178822,
-0.009537910111248493,
0.01719031296670437,
0.024024128913879395,
0.04580404609441757,
-0.017824947834014893,
0.04422205686569214,
-0.021816706284880638,
-0.03833559527993202,
0.06938669085502625,
0.03254110738635063,
0.011690149083733559,
-0.0488208569586277,
-0.04411168769001961,
-0.029248366132378578,
-0.06916594505310059,
0.03195245936512947,
0.03804127126932144,
-0.007229313254356384,
0.04885764792561531,
0.0011922387639060616,
0.021651148796081543,
-0.015875056385993958,
-0.06276442110538483,
0.025532536208629608,
-0.04565688222646713,
-0.03016812540590763,
0.054339416325092316,
-0.025918833911418915,
0.01631654053926468,
0.06648024916648865,
-0.0018533162074163556,
-0.042824022471904755,
-0.03362642228603363,
-0.013272135518491268,
-0.022386956959962845,
-0.016675246879458427,
0.04536255821585655,
-0.014311464503407478,
-0.005541553720831871,
-0.022938812151551247,
-0.030848747119307518,
0.014339057728648186,
0.05330928415060043,
0.002329292008653283,
0.062028609216213226,
-0.07696551084518433,
0.028475767001509666,
0.017420252785086632,
0.007022366859018803,
0.05249989777803421,
0.019480515271425247,
0.00013508973643183708,
-0.02062101848423481,
0.04532577097415924,
-0.009528713300824165,
0.07203559577465057,
0.049667034298181534,
0.019793232902884483,
0.03344247117638588,
0.06817260384559631,
-0.051065072417259216,
0.032301969826221466,
0.0013302027946338058,
0.012214411981403828,
0.0724770799279213,
-0.04197784140706062,
-0.009225192479789257,
-0.02794230729341507,
0.030076149851083755,
-0.015222026966512203,
-0.002476453548297286,
-0.0031317826360464096,
-0.05949007347226143,
-0.0040929317474365234,
0.0036629438400268555,
0.004658584017306566,
-0.025698091834783554,
0.03474853187799454,
0.018891869112849236,
0.009758653119206429,
0.013980350457131863,
-0.0005170775111764669,
-0.06581801921129227,
0.03414148837327957,
-0.028659719973802567,
-0.053603608161211014,
0.005891062319278717,
0.017429450526833534,
-0.04039585590362549,
0.050439633429050446,
-0.05893821641802788,
-0.02582685835659504,
-0.004801146686077118,
-0.05272063985466957,
-0.012416758574545383,
-0.04587762430310249,
-0.02371141128242016,
0.02010595239698887,
-0.046208739280700684,
-0.026691433042287827,
-0.02983701229095459,
-0.03664323687553406,
-0.03633051738142967,
-0.06699531525373459,
0.02564290724694729,
0.002968525281175971,
0.044074896723032,
-0.0746845081448555,
-0.0028259623795747757,
0.008921671658754349,
-0.005316212307661772,
-0.06876125186681747,
-0.0692395269870758,
0.06364738941192627,
-0.00320076453499496,
-0.05893821641802788,
-0.025311794131994247,
-0.00556454760953784,
0.0189470537006855,
-0.011561382561922073,
0.04054301604628563,
-0.07100546360015869,
-0.005150655750185251,
0.057503391057252884,
0.02415289543569088,
-0.022055843845009804,
0.039696838706731796,
0.02028990350663662,
0.019903603941202164,
-0.014357452280819416,
0.006778630893677473,
-0.05128581449389458,
0.014495416544377804,
0.0030926926992833614,
0.009059634990990162,
0.01909421570599079,
0.02017953246831894,
0.0404326468706131,
-0.02065780758857727,
0.023196345195174217,
0.06272763013839722,
-0.06846693158149719,
-0.031235046684741974,
0.004925314337015152,
0.04433242976665497,
-0.018367605283856392,
-0.02455759048461914,
-0.020786574110388756,
0.03785732015967369,
-0.0065119001083076,
-0.006534894462674856,
0.02255251258611679,
-0.04804825782775879,
0.10875241458415985,
0.011110699735581875,
-0.0491887591779232,
-0.0652293711900711,
0.0036215547006577253,
-0.012922626920044422,
0.026985757052898407,
0.02575327828526497,
0.027077732607722282,
-0.027353661134839058,
-0.024281661957502365,
0.026360319927334785,
-0.03804127126932144,
0.07501561939716339,
-0.01883668266236782,
0.04510502517223358,
0.028825275599956512,
-0.016859199851751328,
-0.06497184187173843,
-0.04021190479397774,
-0.02032669447362423,
-0.03191566839814186,
0.02236856147646904,
0.02367462031543255,
-0.05592140182852745,
-0.05489127337932587,
0.05680437386035919,
-0.04083734005689621,
-0.033975932747125626,
-0.03991758078336716,
-0.046208739280700684,
0.021007316187024117,
0.008622749708592892,
0.038666706532239914,
-0.03701113909482956,
0.0036077583208680153,
0.00930797029286623,
-0.049998149275779724,
-0.04871048405766487,
-0.0156635120511055,
0.027739958837628365,
0.0262315534055233,
0.0005604787147603929,
-0.03980720788240433,
-0.03785732015967369,
0.021080898120999336,
-0.057797715067863464,
0.023306716233491898,
0.005707110278308392,
-0.014486218802630901,
0.046208739280700684,
0.0014612686354666948,
0.028880462050437927,
-0.02492549456655979,
-0.003922776319086552,
-0.04782751575112343,
0.01333651877939701,
0.01378720160573721,
0.04179389029741287,
0.0069165946915745735,
0.007505240850150585,
-0.01411831472069025,
-0.030940724536776543,
-0.03848275542259216,
-0.013971153646707535,
0.015562337823212147,
0.011359035037457943,
-0.06350022554397583,
0.050770748406648636,
0.017144324257969856,
-0.007068355102092028,
-0.00713273836299777,
0.02656266652047634,
0.03002096340060234,
0.028622929006814957,
0.05923254042863846,
-0.03478531911969185,
-0.011248663999140263,
-0.05930611863732338,
-0.02860453352332115,
-0.0022005257196724415,
0.036128170788288116,
-0.07317610085010529,
-0.033387284725904465,
0.015470362268388271,
-0.021393615752458572,
0.02619476243853569
] |
52,264 |
osmnx.routing
|
shortest_path
|
Solve shortest path from origin node(s) to destination node(s).
Uses Dijkstra's algorithm. If `orig` and `dest` are single node IDs, this
will return a list of the nodes constituting the shortest path between
them. If `orig` and `dest` are lists of node IDs, this will return a list
of lists of the nodes constituting the shortest path between each
origin-destination pair. If a path cannot be solved, this will return None
for that path. You can parallelize solving multiple paths with the `cpus`
parameter, but be careful to not exceed your available RAM.
See also `k_shortest_paths` to solve multiple shortest paths between a
single origin and destination. For additional functionality or different
solver algorithms, use NetworkX directly.
Parameters
----------
G : networkx.MultiDiGraph
input graph
orig : int or list
origin node ID, or a list of origin node IDs
dest : int or list
destination node ID, or a list of destination node IDs
weight : string
edge attribute to minimize when solving shortest path
cpus : int
how many CPU cores to use; if None, use all available
Returns
-------
path : list
list of node IDs constituting the shortest path, or, if orig and dest
are lists, then a list of path lists
|
def shortest_path(G, orig, dest, weight="length", cpus=1):
"""
Solve shortest path from origin node(s) to destination node(s).
Uses Dijkstra's algorithm. If `orig` and `dest` are single node IDs, this
will return a list of the nodes constituting the shortest path between
them. If `orig` and `dest` are lists of node IDs, this will return a list
of lists of the nodes constituting the shortest path between each
origin-destination pair. If a path cannot be solved, this will return None
for that path. You can parallelize solving multiple paths with the `cpus`
parameter, but be careful to not exceed your available RAM.
See also `k_shortest_paths` to solve multiple shortest paths between a
single origin and destination. For additional functionality or different
solver algorithms, use NetworkX directly.
Parameters
----------
G : networkx.MultiDiGraph
input graph
orig : int or list
origin node ID, or a list of origin node IDs
dest : int or list
destination node ID, or a list of destination node IDs
weight : string
edge attribute to minimize when solving shortest path
cpus : int
how many CPU cores to use; if None, use all available
Returns
-------
path : list
list of node IDs constituting the shortest path, or, if orig and dest
are lists, then a list of path lists
"""
_verify_edge_attribute(G, weight)
# if neither orig nor dest is iterable, just return the shortest path
if not (hasattr(orig, "__iter__") or hasattr(dest, "__iter__")):
return _single_shortest_path(G, orig, dest, weight)
# if only 1 of orig or dest is iterable and the other is not, raise error
if not (hasattr(orig, "__iter__") and hasattr(dest, "__iter__")):
msg = "orig and dest must either both be iterable or neither must be iterable"
raise ValueError(msg)
# if both orig and dest are iterable, ensure they have same lengths
if len(orig) != len(dest): # pragma: no cover
msg = "orig and dest must be of equal length"
raise ValueError(msg)
# determine how many cpu cores to use
if cpus is None:
cpus = mp.cpu_count()
cpus = min(cpus, mp.cpu_count())
utils.log(f"Solving {len(orig)} paths with {cpus} CPUs...")
# if single-threading, calculate each shortest path one at a time
if cpus == 1:
paths = [_single_shortest_path(G, o, d, weight) for o, d in zip(orig, dest)]
# if multi-threading, calculate shortest paths in parallel
else:
args = ((G, o, d, weight) for o, d in zip(orig, dest))
with mp.get_context("spawn").Pool(cpus) as pool:
paths = pool.starmap_async(_single_shortest_path, args).get()
return paths
|
(G, orig, dest, weight='length', cpus=1)
|
[
0.02433113008737564,
0.0029141665436327457,
-0.043054770678281784,
0.014710060320794582,
-0.07297419011592865,
-0.0030557941645383835,
0.013625049032270908,
0.04724118486046791,
0.04770207405090332,
-0.03502761200070381,
-0.001659922767430544,
0.03485477715730667,
-0.024100685492157936,
0.04067350924015045,
-0.011973528191447258,
0.007374233566224575,
0.004832139704376459,
-0.004215219523757696,
0.005348240025341511,
0.04608896002173424,
-0.0036775150801986456,
-0.04927678033709526,
0.08180790394544601,
0.05234937742352486,
-0.039790134876966476,
0.020163919776678085,
0.04021262004971504,
-0.024984057992696762,
-0.04094235971570015,
-0.013164159841835499,
0.08434280008077621,
-0.002942972118034959,
-0.014950106851756573,
0.01223277859389782,
0.03848428279161453,
0.05415453016757965,
-0.0017811462748795748,
-0.020125512033700943,
-0.09064162522554398,
-0.06744351238012314,
-0.015574228018522263,
-0.06897981464862823,
0.003963170573115349,
-0.06456295400857925,
0.05622853338718414,
0.03508521988987923,
-0.0025492955464869738,
0.05684305354952812,
-0.008656082674860954,
-0.03377936780452728,
0.006394843105226755,
-0.04109599068760872,
-0.025636984035372734,
0.018387574702501297,
-0.007431844715029001,
0.050275374203920364,
-0.0012746477732434869,
0.023601388558745384,
0.008838518522679806,
-0.013461817055940628,
0.010869313031435013,
-0.036775149405002594,
0.05722712725400925,
0.04505195841193199,
-0.03558451682329178,
-0.045282404869794846,
-0.02997702918946743,
-0.03533487021923065,
-0.05730394273996353,
0.0404430627822876,
-0.012578445486724377,
-0.015737459063529968,
-0.02039436437189579,
-0.03654470667243004,
0.022353146225214005,
0.07297419011592865,
-0.00292136799544096,
0.013298586010932922,
-0.007734303828328848,
-0.05569082871079445,
0.0053530409932136536,
-0.02682761661708355,
-0.027691783383488655,
-0.0643325075507164,
0.008598471991717815,
-0.002100408310070634,
0.0123287970200181,
0.019971882924437523,
-0.031455714255571365,
-0.08480368554592133,
-0.052810266613960266,
0.02557937242090702,
0.005559480749070644,
0.04800933599472046,
0.04393814131617546,
-0.013519428670406342,
-0.02146977372467518,
-0.02980419434607029,
-0.001751140458509326,
0.018003500998020172,
0.02273721992969513,
0.02072082832455635,
-0.04263228923082352,
-0.011435823515057564,
0.03014986217021942,
-0.07320462912321091,
-0.011032545007765293,
-0.000018303559045307338,
-0.02557937242090702,
-0.04316999390721321,
-0.04989130049943924,
0.03856109827756882,
-0.004988169763237238,
-0.03487398102879524,
-0.0029981830157339573,
0.05023696646094322,
-0.01113816536962986,
0.009328213520348072,
0.0075950766913592815,
-0.00687013566493988,
-0.011752684600651264,
0.04282432794570923,
-0.01912691816687584,
0.004731319844722748,
0.014393198303878307,
0.022333942353725433,
0.013221770524978638,
0.01803230680525303,
-0.0020511988550424576,
-0.026712393388152122,
0.024868834763765335,
0.002825349336490035,
0.01560303382575512,
0.10861631482839584,
0.017408184707164764,
0.015555024147033691,
-0.07355029881000519,
0.03295360878109932,
0.04624259099364281,
0.006759714335203171,
0.014201161451637745,
-0.09586504101753235,
0.014172355644404888,
0.029919417575001717,
0.029688972979784012,
-0.005511471536010504,
0.013394604437053204,
-0.0017475397326052189,
0.045436032116413116,
0.043093178421258926,
0.01640959084033966,
0.021853849291801453,
0.02369740791618824,
-0.031628549098968506,
-0.015574228018522263,
-0.03629505634307861,
-0.028171876445412636,
0.010370016098022461,
0.011435823515057564,
-0.002995782531797886,
-0.03389459103345871,
-0.05534515902400017,
0.03120606765151024,
-0.014402800239622593,
-0.015161347575485706,
0.024388741701841354,
0.026193892583251,
0.009861117228865623,
-0.06886459141969681,
0.056190125644207,
-0.01285689976066351,
-0.029573749750852585,
-0.002435273490846157,
-0.032435107976198196,
0.016832072287797928,
-0.003156613791361451,
-0.01214636117219925,
-0.001771544455550611,
0.026097873225808144,
-0.023025276139378548,
-0.024561574682593346,
0.010744488798081875,
-0.00890573114156723,
-0.008137581869959831,
0.028037451207637787,
0.051081933081150055,
0.02509927935898304,
-0.03337609022855759,
0.05150441452860832,
0.012396009638905525,
-0.028018247336149216,
-0.005794726777821779,
-0.028191080316901207,
0.02730770967900753,
0.004244025330990553,
0.014354790560901165,
-0.008123178966343403,
-0.03266555070877075,
0.000883971864823252,
0.09878400713205338,
-0.010370016098022461,
-0.017609823495149612,
0.07282055914402008,
0.015401394106447697,
0.03594939038157463,
-0.030226677656173706,
-0.022564386948943138,
0.03562292456626892,
-0.010331608355045319,
0.05503790080547333,
-0.011887110769748688,
-0.054845862090587616,
-0.016515210270881653,
0.0033510515931993723,
0.019136520102620125,
0.02778780274093151,
-0.0219882745295763,
0.03448990732431412,
0.021584996953606606,
-0.05039059743285179,
0.03264634683728218,
-0.02196907065808773,
-0.00048609450459480286,
0.002237234963104129,
0.014402800239622593,
-0.05384726822376251,
0.039310041815042496,
-0.00343506783246994,
0.011915916576981544,
-0.033030420541763306,
0.08219198137521744,
-0.07842804491519928,
0.09187066555023193,
0.009995543397963047,
0.0399053581058979,
-0.010706081986427307,
0.012520834803581238,
0.011973528191447258,
0.05538356676697731,
0.0008053565979935229,
-0.06602243334054947,
-0.04078872874379158,
-0.030706770718097687,
-0.04124962165951729,
0.03925243020057678,
-0.01505572721362114,
0.0014090739423409104,
-0.047471631318330765,
0.032243069261312485,
0.005449059419333935,
-0.016841674223542213,
0.06682899594306946,
-0.055153124034404755,
-0.0844196155667305,
0.005261823069304228,
-0.03525805473327637,
-0.04005898907780647,
-0.048585444688797,
-0.046050552278757095,
-0.02509927935898304,
-0.03377936780452728,
-0.01632317341864109,
-0.04739481583237648,
0.05588286370038986,
-0.014249170199036598,
0.021277736872434616,
-0.014028327539563179,
-0.002750934800133109,
-0.06794281303882599,
0.04420699551701546,
-0.0011396215995773673,
-0.007259011268615723,
-0.022180313244462013,
0.01912691816687584,
0.011963926255702972,
-0.02730770967900753,
-0.05419293791055679,
0.04063510149717331,
0.003785535925999284,
-0.02936250902712345,
-0.07458730041980743,
0.013116150163114071,
-0.0442454032599926,
-0.03360653296113014,
-0.03639107570052147,
0.018675630912184715,
0.03276157006621361,
-0.04505195841193199,
-0.0076574888080358505,
0.00996673759073019,
0.06233531981706619,
0.027250098064541817,
-0.016054321080446243,
-0.06294983625411987,
0.03448990732431412,
0.05588286370038986,
-0.016534414142370224,
-0.013788281008601189,
-0.004925757646560669,
0.013413808308541775,
-0.013692262582480907,
-0.019328558817505836,
-0.04140324890613556,
-0.02025993913412094,
0.01426837407052517,
-0.007153390906751156,
0.0024160698521882296,
-0.03508521988987923,
-0.017753852531313896,
-0.0010069957934319973,
-0.046511441469192505,
-0.05261823162436485,
-0.04340043663978577,
-0.010840507224202156,
-0.0008995748939923942,
0.024907242506742477,
-0.03425946086645126,
0.06483180820941925,
-0.00926580186933279,
0.011435823515057564,
-0.03514283150434494,
0.10600461065769196,
-0.04816296324133873,
0.04267069697380066,
-0.022852443158626556,
0.01929975301027298,
0.017216147854924202,
0.0452439971268177,
0.03848428279161453,
0.04209458455443382,
0.029439324513077736,
0.06748192012310028,
0.004925757646560669,
0.008233601227402687,
0.022718016058206558,
0.0793498307466507,
0.0755474865436554,
-0.006663695443421602,
-0.01680326648056507,
-0.020010290667414665,
0.08311375975608826,
0.013365798629820347,
-0.012741677463054657,
0.009832311421632767,
-0.011387813836336136,
0.005170605145394802,
0.03669833391904831,
0.02104729227721691,
-0.005271425005048513,
-0.06986318528652191,
-0.003723123809322715,
0.05031378194689751,
0.0011540243867784739,
0.0037111216224730015,
0.031455714255571365,
0.07259011268615723,
-0.012674463912844658,
-0.05208052694797516,
0.03669833391904831,
0.012904909439384937,
-0.024561574682593346,
-0.013596243225038052,
0.023908648639917374,
-0.01632317341864109,
-0.02006790228188038,
-0.002652515657246113,
-0.001398271881043911,
-0.04263228923082352,
0.025195298716425896,
0.003331847721710801,
-0.00847844872623682,
-0.00592435197904706,
-0.028498340398073196,
-0.008516855537891388,
-0.03201262280344963,
0.02776859886944294,
0.0014294779393821955,
0.002320050960406661,
-0.03293440490961075,
0.025214502587914467,
-0.0024292722810059786,
-0.006298824679106474,
0.03783135488629341,
0.057649608701467514,
-0.014537226408720016,
-0.007436645682901144,
0.07639244943857193,
0.01059085875749588,
0.029304897412657738,
0.00007696496322751045,
-0.04835500195622444,
-0.011166971176862717,
0.023255720734596252,
0.01278968621045351,
-0.00959706585854292,
-0.0627962127327919,
0.12390249222517014,
0.06367958337068558,
-0.05849457159638405,
-0.05450019612908363,
0.0013658655807375908,
0.015545422211289406,
-0.044014956802129745,
0.05354001000523567,
-0.01035081222653389,
-0.024734409525990486,
0.07404959946870804,
0.00026480149244889617,
0.03400981053709984,
0.04393814131617546,
-0.008372827433049679,
-0.01505572721362114,
0.05104352533817291,
0.005804328713566065,
-0.06229691207408905,
-0.029381712898612022,
-0.08265286684036255,
0.02853674814105034,
0.05008333921432495,
0.026443541049957275,
0.027173282578587532,
0.0011318200267851353,
0.05380886048078537,
-0.045128773897886276,
0.027422931045293808,
-0.04847022518515587,
0.038061801344156265,
-0.020586403086781502,
0.01582387648522854,
0.021296940743923187,
-0.0011396215995773673,
0.022468367591500282,
0.04708755388855934,
-0.03331847861409187,
0.025195298716425896,
-0.011714277788996696,
0.050736263394355774,
-0.002609307412058115,
0.05384726822376251,
-0.048393409699201584,
0.009813107550144196,
-0.037408873438835144,
-0.029900213703513145,
-0.029247285798192024,
-0.013749873265624046,
-0.051696449518203735,
-0.007479854393750429,
-0.006706904154270887,
0.004013580270111561,
0.006706904154270887,
-0.0015951101668179035,
-0.037255242466926575,
0.004193615168333054,
-0.004575289320200682,
-0.02089366316795349,
0.006831728387624025,
0.009236996062099934,
-0.010389219969511032,
-0.09701726585626602,
0.017072118818759918,
0.08925895392894745,
-0.016207952052354813,
0.05634375289082527,
-0.029266489669680595,
-0.024830427020788193,
0.041326433420181274,
0.04347725212574005,
0.012021536938846111,
0.014373994432389736,
-0.0452439971268177,
0.08395872265100479,
0.022237922996282578,
-0.05603649467229843,
-0.051850080490112305,
0.049507226794958115,
0.02932410128414631,
-0.08426598459482193,
0.03183979168534279,
0.016438396647572517,
-0.04163369536399841,
-0.0032670351210981607,
-0.0442454032599926,
0.12851138412952423,
0.01176228653639555,
-0.010312405414879322,
-0.0399053581058979,
0.03698639199137688,
0.011512638069689274,
0.02148897759616375,
-0.014143549837172031,
0.04098076745867729,
-0.016860878095030785,
0.015305375680327415,
-0.030034638941287994,
0.001298652496188879,
0.052963897585868835,
-0.013980317860841751,
-0.0362374447286129,
0.03932924568653107,
0.02131614461541176,
0.011483833193778992,
0.02605946734547615,
-0.02118171751499176,
0.04616577550768852,
0.0457817018032074,
0.026904430240392685,
0.00018603616626933217,
0.015555024147033691,
-0.041672103106975555,
0.035392481833696365,
0.0016383185284212232,
0.007119784131646156,
0.029919417575001717,
0.03195501118898392,
0.029573749750852585,
0.008948939852416515,
-0.0018483593594282866,
0.04754844307899475,
0.02323651686310768,
-0.06782758980989456,
0.02650115266442299,
0.050121743232011795,
-0.005180207081139088,
0.05695827305316925,
-0.0653311014175415,
0.0280950628221035,
0.008464045822620392,
-0.041979361325502396,
-0.019635817036032677,
-0.006226810626685619,
0.010859711095690727,
0.045282404869794846,
-0.01928054913878441,
0.06652173399925232,
0.0493151880800724,
0.020970476791262627,
0.03466273844242096,
-0.018810058012604713,
0.04489833116531372,
-0.03011145442724228,
0.009678681381046772,
-0.007907137274742126,
0.009477042593061924,
0.01374027132987976,
0.0288632120937109,
0.013250576332211494,
-0.012684065848588943,
0.05442338064312935,
-0.009697885252535343,
-0.04013580456376076,
-0.03936765342950821,
-0.005655499640852213,
-0.00576112000271678,
0.030879603698849678,
0.006294023711234331,
-0.010715682990849018,
0.003941566217690706,
0.006255616433918476,
-0.017782656475901604,
0.04382292181253433,
0.0034086627420037985,
-0.04739481583237648,
-0.017273757606744766,
-0.00548746669664979,
0.009131375700235367,
-0.03498920425772667,
-0.0031422108877450228,
-0.004668907728046179,
0.046818703413009644,
-0.04413018003106117,
-0.009208190254867077,
0.0035454893950372934,
-0.007475053425878286,
0.00910256989300251,
-0.01712973043322563,
0.009203389286994934,
-0.006778918206691742,
-0.033568125218153,
0.016380785033106804,
-0.05115874484181404,
0.009501047432422638,
0.02116251364350319,
0.03479716554284096,
0.046857111155986786,
0.040097396820783615,
0.00580912921577692,
-0.04847022518515587,
-0.0213545523583889,
-0.0442454032599926,
-0.033030420541763306,
0.01340420637279749,
0.011743083596229553,
0.04005898907780647,
0.04098076745867729,
0.005559480749070644,
-0.03683276101946831,
-0.012098352424800396,
0.007369432598352432,
0.014921301044523716,
-0.013471418991684914,
-0.07320462912321091,
-0.02461918629705906,
0.03665992617607117,
-0.0480477400124073,
0.004992970731109381,
-0.0072014001198112965,
-0.037428077310323715,
-0.09240836650133133,
0.015199755318462849,
-0.0055162725038826466,
0.02978499047458172,
0.028940027579665184,
0.010725284926593304,
-0.014018725603818893,
-0.05188848823308945,
0.0032982411794364452,
-0.03372175619006157,
-0.011551045812666416,
-0.018473992124199867,
-0.024849630892276764,
0.008641679771244526,
-0.06425569206476212,
0.014902097173035145,
-0.04363088309764862,
0.006726107560098171,
0.03919482231140137,
-0.024734409525990486,
0.01065807230770588,
-0.02918967604637146,
0.02604026347398758,
-0.032243069261312485,
-0.07017043977975845,
0.06198965385556221,
0.0579952746629715,
0.0036655126605182886,
-0.07785193622112274,
0.008924935013055801,
-0.0051610032096505165,
-0.0401742123067379,
0.009472241625189781,
-0.04393814131617546,
0.04643462970852852,
-0.04800933599472046,
-0.048086147755384445,
-0.04900792986154556,
-0.037908170372247696,
0.006202805787324905,
0.007124585099518299,
0.0127128716558218,
0.01656321994960308,
-0.01122458279132843,
0.02306368388235569,
-0.023178907111287117,
0.005833134055137634,
0.022410757839679718,
0.04286273196339607,
-0.0417105108499527,
-0.07639244943857193,
0.018896473571658134,
0.0018723640823736787,
0.06425569206476212,
0.033664144575595856,
0.06260417401790619,
-0.02838311903178692,
-0.06256576627492905,
-0.010686878114938736,
0.02072082832455635,
-0.026251504197716713,
0.014229966327548027,
-0.0003264634869992733,
-0.07965708523988724,
-0.02008710615336895,
-0.013951512984931469,
-0.0042176200076937675,
-0.08226879686117172,
0.02413909323513508,
0.03921402245759964,
-0.02262199856340885,
-0.07566270977258682,
-0.02870958112180233,
0.037735335528850555,
0.007614280562847853,
0.006961353588849306,
0.04363088309764862,
-0.025944244116544724,
0.06160557642579079,
-0.021546589210629463,
-0.06283461302518845,
0.03746648505330086,
-0.0007057372131384909,
0.055921271443367004,
-0.007921540178358555,
0.05334797129034996,
0.016198350116610527,
-0.012799288146197796,
-0.021546589210629463,
0.009145778603851795,
0.006706904154270887,
0.027979839593172073,
-0.043362028896808624,
0.02918967604637146,
0.025310520082712173,
-0.012693667784333229,
-0.006754913367331028,
0.0000025926915441232268,
-0.002966976957395673,
-0.10592779517173767,
0.06771236658096313,
0.009366621263325214,
0.012050342746078968,
0.0273269135504961,
-0.04082713648676872,
0.02544494718313217,
0.042901139706373215,
0.02700044959783554,
-0.025982651859521866,
0.007436645682901144,
-0.019991086795926094,
0.020298346877098083,
0.018714038655161858,
-0.014172355644404888,
-0.03671753779053688,
-0.004683310631662607,
-0.007153390906751156,
-0.038369059562683105,
0.02995782531797886,
0.006366037763655186,
-0.06997840851545334,
0.021700218319892883,
0.025790615007281303,
-0.02181544154882431,
0.07224444299936295,
0.004148006439208984,
0.007369432598352432,
0.010907720774412155,
-0.031302087008953094,
0.031474918127059937,
0.003987175412476063,
-0.02744213491678238,
0.0427091047167778,
-0.016486404463648796,
-0.00958266295492649,
0.053424786776304245,
0.036775149405002594,
-0.008257605135440826,
-0.023735815659165382,
-0.01450842060148716,
0.012501630932092667,
-0.022468367591500282,
0.005645897705107927,
0.0470491461455822,
-0.020375162363052368,
0.002323651686310768,
-0.008924935013055801,
0.00741744227707386,
-0.05615171790122986,
-0.07308941334486008,
-0.016207952052354813,
-0.013596243225038052,
-0.06648332625627518,
-0.055921271443367004,
-0.020912865176796913,
-0.07965708523988724,
0.03546929731965065,
-0.010168377310037613,
0.0235245730727911,
-0.007042969111353159,
0.06936388462781906
] |
52,266 |
osmnx.simplification
|
simplify_graph
|
Simplify a graph's topology by removing interstitial nodes.
This simplifies graph topology by removing all nodes that are not
intersections or dead-ends, by creating an edge directly between the end
points that encapsulate them while retaining the full geometry of the
original edges, saved as a new `geometry` attribute on the new edge.
Note that only simplified edges receive a `geometry` attribute. Some of
the resulting consolidated edges may comprise multiple OSM ways, and if
so, their multiple attribute values are stored as a list. Optionally, the
simplified edges can receive a `merged_edges` attribute that contains a
list of all the (u, v) node pairs that were merged together.
Use the `edge_attrs_differ` parameter to relax simplification strictness. For
example, `edge_attrs_differ=['osmid']` will retain every node whose incident
edges have different OSM IDs. This lets you keep nodes at elbow two-way
intersections (but be aware that sometimes individual blocks have multiple
OSM IDs within them too). You could also use this parameter to retain
nodes where sidewalks or bike lanes begin/end in the middle of a block.
Parameters
----------
G : networkx.MultiDiGraph
input graph
strict : bool
deprecated, do not use
edge_attrs_differ : iterable
An iterable of edge attribute names for relaxing the strictness of
endpoint determination. If not None, a node is an endpoint if its
incident edges have different values then each other for any of the
edge attributes in `edge_attrs_differ`.
endpoint_attrs : iterable
deprecated, do not use
remove_rings : bool
if True, remove isolated self-contained rings that have no endpoints
track_merged : bool
if True, add `merged_edges` attribute on simplified edges, containing
a list of all the (u, v) node pairs that were merged together
Returns
-------
G : networkx.MultiDiGraph
topologically simplified graph, with a new `geometry` attribute on
each simplified edge
|
def simplify_graph( # noqa: C901
G,
strict=None,
edge_attrs_differ=None,
endpoint_attrs=None,
remove_rings=True,
track_merged=False,
):
"""
Simplify a graph's topology by removing interstitial nodes.
This simplifies graph topology by removing all nodes that are not
intersections or dead-ends, by creating an edge directly between the end
points that encapsulate them while retaining the full geometry of the
original edges, saved as a new `geometry` attribute on the new edge.
Note that only simplified edges receive a `geometry` attribute. Some of
the resulting consolidated edges may comprise multiple OSM ways, and if
so, their multiple attribute values are stored as a list. Optionally, the
simplified edges can receive a `merged_edges` attribute that contains a
list of all the (u, v) node pairs that were merged together.
Use the `edge_attrs_differ` parameter to relax simplification strictness. For
example, `edge_attrs_differ=['osmid']` will retain every node whose incident
edges have different OSM IDs. This lets you keep nodes at elbow two-way
intersections (but be aware that sometimes individual blocks have multiple
OSM IDs within them too). You could also use this parameter to retain
nodes where sidewalks or bike lanes begin/end in the middle of a block.
Parameters
----------
G : networkx.MultiDiGraph
input graph
strict : bool
deprecated, do not use
edge_attrs_differ : iterable
An iterable of edge attribute names for relaxing the strictness of
endpoint determination. If not None, a node is an endpoint if its
incident edges have different values then each other for any of the
edge attributes in `edge_attrs_differ`.
endpoint_attrs : iterable
deprecated, do not use
remove_rings : bool
if True, remove isolated self-contained rings that have no endpoints
track_merged : bool
if True, add `merged_edges` attribute on simplified edges, containing
a list of all the (u, v) node pairs that were merged together
Returns
-------
G : networkx.MultiDiGraph
topologically simplified graph, with a new `geometry` attribute on
each simplified edge
"""
if endpoint_attrs is not None:
msg = (
"The `endpoint_attrs` parameter has been deprecated and will be removed "
"in the v2.0.0 release. Use the `edge_attrs_differ` parameter instead. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
edge_attrs_differ = endpoint_attrs
if strict is not None:
msg = (
"The `strict` parameter has been deprecated and will be removed in "
"the v2.0.0 release. Use the `edge_attrs_differ` parameter instead to "
"relax simplification strictness. For example, `edge_attrs_differ=None` "
"reproduces the old `strict=True` behvavior and `edge_attrs_differ=['osmid']` "
"reproduces the old `strict=False` behavior. "
"See the OSMnx v2 migration guide: https://github.com/gboeing/osmnx/issues/1123"
)
warn(msg, FutureWarning, stacklevel=2)
# maintain old behavior if strict is passed during deprecation
edge_attrs_differ = None if strict else ["osmid"]
if "simplified" in G.graph and G.graph["simplified"]: # pragma: no cover
msg = "This graph has already been simplified, cannot simplify it again."
raise GraphSimplificationError(msg)
utils.log("Begin topologically simplifying the graph...")
# define edge segment attributes to sum upon edge simplification
attrs_to_sum = {"length", "travel_time"}
# make a copy to not mutate original graph object caller passed in
G = G.copy()
initial_node_count = len(G)
initial_edge_count = len(G.edges)
all_nodes_to_remove = []
all_edges_to_add = []
# generate each path that needs to be simplified
for path in _get_paths_to_simplify(G, edge_attrs_differ):
# add the interstitial edges we're removing to a list so we can retain
# their spatial geometry
merged_edges = []
path_attributes = {}
for u, v in zip(path[:-1], path[1:]):
if track_merged:
# keep track of the edges that were merged
merged_edges.append((u, v))
# there should rarely be multiple edges between interstitial nodes
# usually happens if OSM has duplicate ways digitized for just one
# street... we will keep only one of the edges (see below)
edge_count = G.number_of_edges(u, v)
if edge_count != 1:
utils.log(f"Found {edge_count} edges between {u} and {v} when simplifying")
# get edge between these nodes: if multiple edges exist between
# them (see above), we retain only one in the simplified graph
# We can't assume that there exists an edge from u to v
# with key=0, so we get a list of all edges from u to v
# and just take the first one.
edge_data = list(G.get_edge_data(u, v).values())[0]
for attr in edge_data:
if attr in path_attributes:
# if this key already exists in the dict, append it to the
# value list
path_attributes[attr].append(edge_data[attr])
else:
# if this key doesn't already exist, set the value to a list
# containing the one value
path_attributes[attr] = [edge_data[attr]]
# consolidate the path's edge segments' attribute values
for attr in path_attributes:
if attr in attrs_to_sum:
# if this attribute must be summed, sum it now
path_attributes[attr] = sum(path_attributes[attr])
elif len(set(path_attributes[attr])) == 1:
# if there's only 1 unique value in this attribute list,
# consolidate it to the single value (the zero-th):
path_attributes[attr] = path_attributes[attr][0]
else:
# otherwise, if there are multiple values, keep one of each
path_attributes[attr] = list(set(path_attributes[attr]))
# construct the new consolidated edge's geometry for this path
path_attributes["geometry"] = LineString(
[Point((G.nodes[node]["x"], G.nodes[node]["y"])) for node in path]
)
if track_merged:
# add the merged edges as a new attribute of the simplified edge
path_attributes["merged_edges"] = merged_edges
# add the nodes and edge to their lists for processing at the end
all_nodes_to_remove.extend(path[1:-1])
all_edges_to_add.append(
{"origin": path[0], "destination": path[-1], "attr_dict": path_attributes}
)
# for each edge to add in the list we assembled, create a new edge between
# the origin and destination
for edge in all_edges_to_add:
G.add_edge(edge["origin"], edge["destination"], **edge["attr_dict"])
# finally remove all the interstitial nodes between the new edges
G.remove_nodes_from(set(all_nodes_to_remove))
if remove_rings:
G = _remove_rings(G, edge_attrs_differ)
# mark the graph as having been simplified
G.graph["simplified"] = True
msg = (
f"Simplified graph: {initial_node_count:,} to {len(G):,} nodes, "
f"{initial_edge_count:,} to {len(G.edges):,} edges"
)
utils.log(msg)
return G
|
(G, strict=None, edge_attrs_differ=None, endpoint_attrs=None, remove_rings=True, track_merged=False)
|
[
0.009036355651915073,
0.004056657664477825,
0.015335057862102985,
0.01726505160331726,
-0.04913092404603958,
-0.06926999241113663,
-0.014380550011992455,
-0.05391395464539528,
0.03801248222589493,
-0.042669642716646194,
-0.032222501933574677,
0.0011118442052975297,
-0.03815932944417,
0.03901943564414978,
-0.018681079149246216,
0.04334094375371933,
-0.031656090170145035,
-0.05273917317390442,
0.02815273404121399,
0.006592396646738052,
0.0003435178950894624,
-0.05617959797382355,
0.018723035231232643,
0.04210323095321655,
0.010677899233996868,
-0.035390209406614304,
0.028026863932609558,
-0.0009899084689095616,
0.009314317256212234,
-0.031656090170145035,
0.021922210231423378,
-0.034194450825452805,
-0.036124445497989655,
-0.03241130709648132,
0.002204021206125617,
0.01638396829366684,
-0.009099290706217289,
0.04048791155219078,
-0.0456065870821476,
-0.03213858976960182,
-0.07086433470249176,
-0.037907592952251434,
-0.020055150613188744,
-0.03140435367822647,
0.06612326204776764,
0.05899067595601082,
-0.008595813997089863,
0.055298514664173126,
-0.0007853710558265448,
0.001484207110479474,
0.012901588343083858,
-0.04837571084499359,
-0.03711042180657387,
0.07736757397651672,
0.003957011271268129,
-0.00953458808362484,
-0.017632169649004936,
0.06788542866706848,
0.05273917317390442,
-0.046235933899879456,
-0.0034010892268270254,
-0.019268469884991646,
0.0006772022461518645,
0.00805038120597601,
-0.05932632461190224,
-0.02071596495807171,
-0.03226445987820625,
-0.023432640358805656,
-0.04023617133498192,
-0.007803887128829956,
-0.04397029057145119,
-0.014349083416163921,
-0.003996345680207014,
-0.029222620651125908,
0.005978784523904324,
0.019247490912675858,
0.03203370049595833,
0.007316144183278084,
-0.024817200377583504,
-0.045648545026779175,
0.008233940228819847,
-0.027355562895536423,
-0.034634996205568314,
-0.017317498102784157,
0.02548850327730179,
0.008763639256358147,
0.055172644555568695,
0.006959515158087015,
-0.060668930411338806,
-0.0748501867055893,
-0.02190123312175274,
0.03266304358839989,
-0.01650983653962612,
0.027334583923220634,
0.057102639228105545,
0.01858667843043804,
-0.041327036917209625,
-0.08433233201503754,
0.04243888333439827,
-0.045354850590229034,
-0.0006837579421699047,
0.024355679750442505,
-0.10656921565532684,
-0.00305232685059309,
0.002016528742387891,
-0.046823322772979736,
0.0021371531765908003,
0.005852915346622467,
0.008511900901794434,
-0.047872234135866165,
-0.05156439542770386,
0.010462872684001923,
-0.007567882537841797,
-0.005601176992058754,
0.02622273936867714,
0.014695223420858383,
-0.0009518854785710573,
-0.012513491325080395,
0.03213858976960182,
-0.013373597525060177,
-0.01580706797540188,
0.0312575064599514,
-0.051858089864254,
0.014412017539143562,
0.024229811504483223,
-0.014023921452462673,
0.037299223244190216,
0.06587152183055878,
-0.000663107552099973,
-0.04778832197189331,
-0.018838416785001755,
0.006970004178583622,
0.033858802169561386,
0.06717216968536377,
-0.020474715158343315,
-0.037613898515701294,
-0.0691441223025322,
0.0027324093971401453,
0.025467524304986,
0.05164830759167671,
-0.03260010853409767,
-0.04694919288158417,
-0.016908422112464905,
0.0422920361161232,
-0.013677781447768211,
-0.018691569566726685,
-0.027900995686650276,
-0.037446070462465286,
-0.03155120089650154,
-0.02190123312175274,
-0.010735590010881424,
-0.0029159686528146267,
-0.002302356529980898,
-0.03352314978837967,
0.004568001255393028,
-0.03767683357000351,
-0.048921141773462296,
0.06167588382959366,
-0.012314198538661003,
0.00863777007907629,
-0.05022178962826729,
-0.06175979599356651,
0.0533265620470047,
0.013331640511751175,
-0.022971119731664658,
-0.06243109703063965,
0.06578760594129562,
-0.04346681386232376,
-0.050137877464294434,
0.0257402416318655,
0.004014701582491398,
0.003018237417563796,
-0.03996345400810242,
-0.004754182882606983,
-0.017338475212454796,
0.06125631928443909,
0.07954930514097214,
0.01594342663884163,
-0.021628515794873238,
-0.00703293876722455,
0.017065759748220444,
-0.02651643380522728,
-0.007421035319566727,
0.04243888333439827,
0.01116039790213108,
0.03348119556903839,
0.030271530151367188,
-0.07279432564973831,
0.0538719967007637,
-0.048333752900362015,
0.013751205056905746,
-0.02145020104944706,
0.02517382986843586,
0.056053727865219116,
0.03734118118882179,
-0.026747195050120354,
0.007908778265118599,
-0.031173592433333397,
-0.017506301403045654,
0.05693481117486954,
-0.052193742245435715,
-0.025089917704463005,
0.05932632461190224,
0.0125030018389225,
-0.021240418776869774,
0.0007519370410591364,
-0.011600940488278866,
-0.02204808034002781,
0.016132229939103127,
0.05454329773783684,
-0.013205771334469318,
-0.023327749222517014,
0.08160516619682312,
-0.011506537906825542,
0.01725456304848194,
-0.016562283039093018,
-0.005690334364771843,
0.07304606586694717,
0.02502698265016079,
-0.018712546676397324,
-0.04590028524398804,
-0.03157217800617218,
-0.0010816879803314805,
-0.019016731530427933,
-0.0032096633221954107,
-0.047746364027261734,
0.008417499251663685,
0.016488859429955482,
0.07031890004873276,
-0.058025676757097244,
0.08332537859678268,
-0.06679455935955048,
0.04866940528154373,
-0.041033342480659485,
0.013342129997909069,
-0.017464345321059227,
-0.04418007284402847,
-0.014915494248270988,
0.06603934615850449,
-0.02023346535861492,
-0.05173221975564957,
-0.08450015634298325,
-0.048165928572416306,
0.023306770250201225,
0.034152496606111526,
-0.03280989080667496,
0.031320441514253616,
-0.028656210750341415,
0.03557901456952095,
-0.010782790370285511,
-0.008983911015093327,
0.020065641030669212,
-0.020579606294631958,
-0.0026104736607521772,
0.01920553483068943,
-0.012408600188791752,
-0.05181613191962242,
-0.010357982479035854,
-0.026474477723240852,
-0.024166876450181007,
0.005936828441917896,
-0.05437547340989113,
-0.02246764302253723,
0.05244547873735428,
0.047284845262765884,
0.008412254974246025,
0.024670353159308434,
0.008034647442400455,
-0.04976027086377144,
-0.02485915645956993,
0.01177925430238247,
-0.0007637373055331409,
-0.023411661386489868,
0.0417466014623642,
0.00929858349263668,
0.028257625177502632,
-0.012010014615952969,
0.004109103232622147,
0.018565699458122253,
-0.024020029231905937,
-0.04661354050040245,
0.01287012081593275,
0.01510429847985506,
-0.010908659547567368,
-0.01624760963022709,
0.021796341985464096,
-0.007101118098944426,
-0.053368519991636276,
-0.006875602528452873,
-0.03411053866147995,
0.04976027086377144,
-0.013321151956915855,
0.009980374947190285,
0.0043634637258946896,
0.051438525319099426,
0.05152243748307228,
0.004568001255393028,
-0.017663637176156044,
-0.006781200412660837,
-0.015439948998391628,
0.05303286761045456,
0.0031047724187374115,
0.03278891369700432,
-0.03096381016075611,
0.033586084842681885,
-0.014516908675432205,
0.005108189769089222,
-0.02485915645956993,
0.0017949464963749051,
0.02559339441359043,
-0.05538242682814598,
-0.01760070212185383,
-0.06503239274024963,
0.011128930374979973,
0.012114905752241611,
-0.004072391428053379,
0.00862728152424097,
-0.007940245792269707,
0.034047603607177734,
0.025824153795838356,
-0.029075773432850838,
0.01891184039413929,
-0.035935644060373306,
0.00008792812150204554,
-0.02429274655878544,
0.009062578901648521,
0.04720093309879303,
0.016121739521622658,
0.03801248222589493,
-0.02295014262199402,
-0.03828519955277443,
0.010148200206458569,
-0.024334702640771866,
0.035662926733493805,
-0.08089190721511841,
-0.002282689558342099,
0.06356392055749893,
-0.046235933899879456,
0.004961342550814152,
-0.019153088331222534,
0.07073846459388733,
0.06058501824736595,
0.00996988546103239,
0.030628159642219543,
-0.021523624658584595,
0.004135326016694307,
-0.00464929174631834,
-0.021796341985464096,
-0.029684141278266907,
-0.01035273727029562,
-0.006057452876120806,
0.07678018510341644,
-0.0312575064599514,
0.023306770250201225,
0.02934849075973034,
0.021198462694883347,
-0.037446070462465286,
-0.019719500094652176,
0.03230641409754753,
0.010310781188309193,
-0.00021519036090467125,
-0.0007447258103638887,
0.03067011572420597,
-0.0042008827440440655,
0.03828519955277443,
-0.007919267751276493,
-0.00819198414683342,
-0.00105284305755049,
0.02054813876748085,
-0.07564736157655716,
-0.030040770769119263,
-0.044305939227342606,
0.02414589934051037,
-0.003566292580217123,
-0.03406858444213867,
0.05445938557386398,
0.02395709417760372,
-0.004046168643981218,
-0.03979562968015671,
0.04971831291913986,
-0.017034292221069336,
0.029684141278266907,
0.017810484394431114,
0.037299223244190216,
0.0425647497177124,
-0.0014016054337844253,
0.09482142329216003,
-0.005873893853276968,
0.02693599835038185,
-0.008643015287816525,
-0.03601955622434616,
-0.00938249658793211,
0.03159315511584282,
0.02024395577609539,
-0.012555447407066822,
0.009188448078930378,
0.029222620651125908,
0.029705120250582695,
-0.024334702640771866,
-0.003534825285896659,
-0.01982439123094082,
-0.027817081660032272,
0.03973269462585449,
0.026285674422979355,
-0.0010679210536181927,
-0.06033327803015709,
0.06222131848335266,
0.04443180933594704,
0.08454211056232452,
0.02485915645956993,
0.029558273032307625,
0.021030636504292488,
-0.018796460703015327,
0.00741579057648778,
-0.008821330033242702,
0.0059106056578457355,
0.017663637176156044,
0.032998695969581604,
0.04300529137253761,
0.010100998915731907,
0.057690028101205826,
0.03885161131620407,
0.006319680251181126,
-0.031320441514253616,
-0.028194690123200417,
-0.057102639228105545,
-0.02246764302253723,
0.025341656059026718,
-0.03559999167919159,
0.08886361867189407,
0.009309072978794575,
-0.02727164886891842,
0.02515285275876522,
-0.012733762152493,
-0.02576121874153614,
0.01563924178481102,
0.016467880457639694,
-0.034928690642118454,
0.046068109571933746,
0.006031230092048645,
0.0011164331808686256,
0.012335176579654217,
-0.03904041647911072,
-0.06553587317466736,
0.04189344868063927,
-0.03398467227816582,
-0.06129827722907066,
0.024901114404201508,
0.032830871641635895,
0.00409861421212554,
0.048459623008966446,
-0.025006003677845,
-0.007510192692279816,
-0.011076484806835651,
-0.0605011060833931,
0.012954032979905605,
0.07766126841306686,
0.013709248043596745,
-0.09314317256212234,
0.009623745456337929,
0.016950378194451332,
-0.006282968446612358,
0.0070067159831523895,
0.03673281520605087,
0.008962932042777538,
0.03635520488023758,
0.04418007284402847,
-0.03176098316907883,
-0.052613306790590286,
-0.005260281730443239,
0.05202591419219971,
-0.07308802008628845,
-0.044305939227342606,
-0.014863048680126667,
0.04678136855363846,
0.029537294059991837,
-0.051144830882549286,
-0.001575986621901393,
0.006901825312525034,
-0.01595391519367695,
0.030334465205669403,
-0.03022957406938076,
-0.00017290619143750519,
-0.007447258103638887,
0.04631984606385231,
0.04275355488061905,
0.03622933849692345,
-0.043257031589746475,
0.005616910755634308,
-0.008427988737821579,
-0.0432150736451149,
-0.023768290877342224,
-0.014653267338871956,
-0.005737535655498505,
0.04011030122637749,
0.08454211056232452,
-0.06608130037784576,
-0.05601177364587784,
0.05932632461190224,
-0.05030570551753044,
-0.008186738938093185,
-0.05169026553630829,
0.007247965317219496,
-0.0004333307733759284,
0.04824984073638916,
0.049802228808403015,
-0.029306534677743912,
0.052487436681985855,
0.012398111633956432,
0.003996345680207014,
0.004738449119031429,
0.003159840125590563,
0.07107411324977875,
0.06096262484788895,
0.04913092404603958,
0.017327986657619476,
-0.007740952540189028,
0.006697287783026695,
0.03186587244272232,
-0.06125631928443909,
0.003508602501824498,
-0.0034089561086148024,
-0.02102014794945717,
0.04850158095359802,
-0.03025055304169655,
0.005585443694144487,
0.027796104550361633,
-0.031488265842199326,
0.03155120089650154,
-0.03648107498884201,
0.007515437435358763,
0.056683074682950974,
0.0012626248644664884,
0.042229101061820984,
0.057438287883996964,
-0.016352500766515732,
0.05630546808242798,
-0.04778832197189331,
0.014873538166284561,
-0.026033936068415642,
0.012838653288781643,
0.026915019378066063,
-0.052948955446481705,
0.024670353159308434,
0.0032175302039831877,
0.011422625742852688,
0.07879409193992615,
0.0036764279939234257,
-0.04539680853486061,
-0.02429274655878544,
-0.07443062216043472,
0.055004820227622986,
-0.010620209388434887,
0.025698285549879074,
0.06746586412191391,
-0.05819350481033325,
-0.004012078978121281,
0.030166639015078545,
-0.024334702640771866,
0.0452289804816246,
-0.035537056624889374,
-0.028865991160273552,
0.016635706648230553,
-0.042229101061820984,
0.04124312475323677,
0.04602615162730217,
0.006681554019451141,
0.014401528984308243,
0.006555684842169285,
0.04472550377249718,
0.00041497484198771417,
-0.027628278359770775,
0.02145020104944706,
-0.0022341774310916662,
-0.03975367173552513,
-0.008118560537695885,
0.004777783062309027,
-0.0044526210986077785,
0.017516789957880974,
-0.05257134884595871,
0.012565936893224716,
0.039627805352211,
0.04925679415464401,
0.030712073668837547,
0.06175979599356651,
0.02739751897752285,
0.026180783286690712,
0.06960564106702805,
0.02112503908574581,
-0.05231960862874985,
-0.01191561296582222,
-0.033439237624406815,
0.0764864906668663,
-0.010625454597175121,
-0.031320441514253616,
0.01592244766652584,
0.017946843057870865,
-0.007735708262771368,
-0.0012187018292024732,
-0.005800470244139433,
-0.05156439542770386,
-0.018660102039575577,
0.06591347604990005,
0.00674448860809207,
-0.03677476942539215,
-0.004531289450824261,
0.007567882537841797,
-0.045942239463329315,
0.013730226084589958,
-0.027481431141495705,
0.048753317445516586,
0.06134023144841194,
-0.003899321425706148,
-0.057690028101205826,
-0.052193742245435715,
-0.014642777852714062,
-0.04275355488061905,
0.04959244653582573,
-0.03257913142442703,
-0.04447376728057861,
0.01579657755792141,
-0.03465597331523895,
-0.04212420806288719,
-0.05080918222665787,
-0.027481431141495705,
0.0904579609632492,
0.0015628752298653126,
0.007662284653633833,
-0.04287942498922348,
0.00558019895106554,
-0.03423640877008438,
-0.07703191787004471,
0.010656921193003654,
0.02861425280570984,
0.029096752405166626,
-0.07526975125074387,
0.017674125730991364,
0.0070906286127865314,
-0.04619397968053818,
0.0360405333340168,
-0.028362514451146126,
-0.000009142107046500314,
0.0016218764940276742,
-0.0003007420455105603,
-0.06264088302850723,
0.029411423951387405,
0.0410962775349617,
-0.05450134351849556,
0.0062462566420435905,
0.03713139891624451,
0.0011682230979204178,
0.07543757557868958,
0.001171500887721777,
-0.04690723866224289,
0.03249521926045418,
0.062305230647325516,
-0.03438325598835945,
-0.062305230647325516,
0.006534706801176071,
0.0024767378345131874,
0.03981660678982735,
0.005110811907798052,
0.0590326301753521,
0.008611547760665417,
0.003550559049472213,
-0.00424283929169178,
0.023768290877342224,
-0.03830617666244507,
0.08852797001600266,
-0.036124445497989655,
-0.04128508269786835,
-0.006922803353518248,
0.031341418623924255,
0.03534825146198273,
-0.041201166808605194,
-0.019310425966978073,
0.041054319590330124,
0.02515285275876522,
-0.06192762032151222,
-0.03799150511622429,
0.02366339974105358,
0.05357830226421356,
0.033586084842681885,
-0.10564617067575455,
-0.015072830952703953,
-0.019625097513198853,
-0.04107530042529106,
-0.035935644060373306,
0.014191746711730957,
0.002626207424327731,
0.024817200377583504,
-0.04824984073638916,
0.014086855575442314,
-0.008066114969551563,
0.05097700655460358,
-0.0363132506608963,
0.014716201461851597,
0.011349202133715153,
0.03377489000558853,
-0.02202710136771202,
0.03736215829849243,
0.000021162570192245767,
-0.027628278359770775,
-0.013079902157187462,
0.05244547873735428,
0.0321805477142334,
-0.05374612659215927,
0.007588861044496298,
0.006807423196732998,
-0.0071850307285785675,
-0.009183203801512718,
-0.026306653395295143,
0.04097040742635727,
0.01549239456653595,
0.051018960773944855,
-0.02097819186747074,
-0.01877548173069954,
-0.02636958658695221,
-0.010793279856443405,
-0.009052089415490627,
-0.018817437812685966,
0.007394812535494566,
-0.005113434046506882,
0.03885161131620407,
-0.04418007284402847,
0.03257913142442703,
0.0538719967007637,
-0.036397162824869156,
-0.008139538578689098,
-0.011600940488278866,
-0.031488265842199326,
0.1077439934015274,
-0.020327867940068245,
0.05080918222665787,
0.006282968446612358,
0.006802178453654051,
-0.027649257332086563,
0.036145422607660294,
-0.04418007284402847,
0.04741071164608002,
0.004578490275889635,
-0.03706846386194229,
-0.04573245719075203,
0.026558389887213707,
-0.08810840547084808,
-0.002837300533428788,
0.03646009787917137,
0.03545314446091652,
-0.03211761265993118,
-0.0283205583691597,
0.040718670934438705,
0.00938249658793211,
-0.0020558626856654882,
-0.02651643380522728,
0.0016362989554181695,
0.009649967774748802,
-0.010992572642862797,
0.014810603111982346,
0.0001684810995357111,
-0.08261211961507797,
-0.02086281217634678,
-0.008601058274507523,
0.025803176686167717,
0.007950734347105026,
-0.0001727422932162881,
0.04300529137253761,
-0.014695223420858383,
0.06574565172195435
] |
52,270 |
osmnx.utils
|
ts
|
Return current local timestamp as a string.
Parameters
----------
style : string {"datetime", "date", "time"}
format the timestamp with this built-in style
template : string
if not None, format the timestamp with this format string instead of
one of the built-in styles
Returns
-------
ts : string
local timestamp string
|
def ts(style="datetime", template=None):
"""
Return current local timestamp as a string.
Parameters
----------
style : string {"datetime", "date", "time"}
format the timestamp with this built-in style
template : string
if not None, format the timestamp with this format string instead of
one of the built-in styles
Returns
-------
ts : string
local timestamp string
"""
if template is None:
if style == "datetime":
template = "{:%Y-%m-%d %H:%M:%S}"
elif style == "date":
template = "{:%Y-%m-%d}"
elif style == "time":
template = "{:%H:%M:%S}"
else: # pragma: no cover
msg = f"unrecognized timestamp style {style!r}"
raise ValueError(msg)
return template.format(dt.datetime.now().astimezone())
|
(style='datetime', template=None)
|
[
0.05772632732987404,
0.004286475479602814,
-0.02357785403728485,
-0.034273888915777206,
0.036173015832901,
-0.025011159479618073,
-0.047836530953645706,
0.023488273844122887,
0.04475492611527443,
-0.004156582523137331,
0.009343352168798447,
-0.015300522558391094,
-0.06636198610067368,
-0.04708404466509819,
0.013052026741206646,
0.07177270948886871,
-0.013938884250819683,
-0.02879149839282036,
-0.01659945398569107,
-0.015004904009401798,
0.04622406139969826,
-0.027214864268898964,
-0.056938011199235916,
-0.008111606352031231,
0.047048211097717285,
0.00991667341440916,
-0.003332432359457016,
-0.05382057651877403,
0.004284236114472151,
-0.029758978635072708,
0.045184917747974396,
-0.004286475479602814,
-0.008089210838079453,
0.0039259097538888454,
-0.011027484200894833,
-0.021284569054841995,
-0.042533304542303085,
-0.022968700155615807,
-0.0781150832772255,
-0.023219529539346695,
0.055827200412750244,
0.01983334682881832,
-0.014207628555595875,
-0.03233892843127251,
0.018489625304937363,
-0.009352310560643673,
0.055576372891664505,
0.004855317994952202,
0.021033739671111107,
-0.024491585791110992,
0.07023190706968307,
0.06686364114284515,
-0.0381258949637413,
-0.013840343803167343,
-0.08083835989236832,
-0.0021409981418401003,
0.0407058410346508,
0.02363160438835621,
-0.006799236871302128,
-0.015802178531885147,
0.0652153417468071,
0.0497356578707695,
0.0030032203067094088,
0.06360287964344025,
-0.042067479342222214,
-0.01098269410431385,
0.01768339052796364,
-0.029615649953484535,
0.018955448642373085,
-0.0177550558000803,
-0.014601786620914936,
-0.017916303128004074,
-0.02893482893705368,
0.0023828684352338314,
0.012272668071091175,
0.0280927624553442,
-0.028074847534298897,
-0.026623627170920372,
-0.03588635474443436,
0.03352140262722969,
-0.03570719063282013,
-0.05543304234743118,
-0.020639581605792046,
0.026336966082453728,
0.006678301841020584,
0.004035647492855787,
0.0056481147184967995,
0.011081233620643616,
-0.037158410996198654,
0.05016564950346947,
-0.02511865645647049,
0.014798866584897041,
0.03898587450385094,
0.0368359200656414,
0.0057287379167973995,
0.009621054865419865,
0.034076809883117676,
-0.05604219809174538,
-0.05385640636086464,
0.014673451893031597,
0.022001219913363457,
-0.010185418650507927,
-0.008510244078934193,
-0.034775543957948685,
-0.027429860085248947,
0.03434555232524872,
0.001398591441102326,
0.02377493493258953,
0.0697660818696022,
0.018301503732800484,
0.0057287379167973995,
-0.02952606789767742,
0.01769234985113144,
-0.05471638962626457,
0.03823339194059372,
0.0007496853359043598,
-0.005459993612021208,
0.028504839166998863,
0.0015564787900075316,
-0.013840343803167343,
-0.024903660640120506,
-0.015094485133886337,
0.00336602539755404,
-0.03995335474610329,
-0.025011159479618073,
-0.037875063717365265,
0.042067479342222214,
-0.06274289637804031,
0.025208238512277603,
-0.0031353530939668417,
-0.034327637404203415,
0.05256643518805504,
0.04676155000925064,
0.06872694194316864,
0.01375972107052803,
-0.009459808468818665,
-0.012183086015284061,
0.02893482893705368,
-0.009289602749049664,
0.104631207883358,
0.0355101116001606,
0.012837030924856663,
-0.001105771865695715,
-0.007318809628486633,
-0.019260026514530182,
0.020944157615303993,
-0.012541412375867367,
-0.029490234330296516,
0.008644616231322289,
0.0426408015191555,
0.0878615528345108,
-0.01476303394883871,
-0.034453049302101135,
0.053247254341840744,
-0.07460348308086395,
-0.006893297657370567,
0.017387771978974342,
-0.06887026876211166,
0.061058759689331055,
-0.039308369159698486,
-0.007399433292448521,
0.04138666018843651,
0.01789838634431362,
-0.021212903782725334,
0.024204924702644348,
0.03848421946167946,
-0.017549019306898117,
0.05607802793383598,
0.017217567190527916,
-0.04099250212311745,
0.01852545700967312,
-0.007466619368642569,
0.025297820568084717,
0.041171666234731674,
0.04292746260762215,
-0.0036974770482629538,
-0.0017658756114542484,
0.015354271978139877,
0.01014062762260437,
-0.04088500514626503,
0.026211552321910858,
-0.022072885185480118,
-0.08055169880390167,
0.027931516990065575,
-0.050989799201488495,
0.03649551048874855,
-0.00913731474429369,
0.02278953790664673,
-0.029615649953484535,
-0.015793221071362495,
0.02802109904587269,
-0.007583075203001499,
-0.008729718625545502,
0.01384930219501257,
0.009271686896681786,
0.038914211094379425,
0.01626800373196602,
-0.0471557080745697,
-0.04353661835193634,
0.009388143196702003,
0.009307519532740116,
0.05134812369942665,
-0.023613687604665756,
-0.06664864718914032,
0.06059293821454048,
0.04701238125562668,
-0.004490273538976908,
-0.033091410994529724,
-0.10799947381019592,
-0.01349993422627449,
0.006485701538622379,
-0.08019337058067322,
0.01814025640487671,
0.03766006976366043,
0.02834359183907509,
0.02861233614385128,
-0.07291935384273529,
0.04547157883644104,
-0.04307079315185547,
-0.03176560625433922,
0.06116626039147377,
-0.05070313811302185,
-0.04496992006897926,
-0.028827331960201263,
0.055253878235816956,
0.0280927624553442,
0.04830235242843628,
-0.020944157615303993,
-0.035689275711774826,
-0.04038334637880325,
0.04948483034968376,
-0.021786224097013474,
0.029866477474570274,
0.0426049679517746,
0.021266652271151543,
-0.04823068901896477,
0.015793221071362495,
-0.024957410991191864,
-0.014225544407963753,
-0.02278953790664673,
-0.010928944684565067,
0.05353391543030739,
0.06367453932762146,
-0.010731865651905537,
0.04307079315185547,
0.006279664114117622,
-0.026946119964122772,
0.007856299169361591,
-0.019475022330880165,
0.002194747095927596,
-0.015587183646857738,
0.0413508266210556,
-0.01956460252404213,
-0.009862924925982952,
0.0009999537141993642,
-0.03208809718489647,
0.06037794053554535,
0.04353661835193634,
0.00647674361243844,
0.015605100430548191,
-0.04758569970726967,
-0.016545705497264862,
-0.04321412369608879,
-0.0028128596022725105,
0.023989930748939514,
-0.05586303398013115,
-0.055827200412750244,
0.034255970269441605,
-0.000019893395801773295,
0.02712528221309185,
0.0736718401312828,
-0.02020958997309208,
-0.01719069294631481,
-0.029418569058179855,
-0.04733487218618393,
-0.0703752413392067,
-0.02382868342101574,
0.039165038615465164,
0.024169092997908592,
-0.00005665330900228582,
-0.036190930753946304,
0.01614258997142315,
0.01755797676742077,
-0.005903421901166439,
0.024849912151694298,
-0.006938088219612837,
-0.015605100430548191,
-0.07517680525779724,
0.03733757510781288,
0.006109459325671196,
-0.005236039403825998,
0.011547056958079338,
-0.003728830488398671,
-0.07016023993492126,
-0.02712528221309185,
-0.04966399073600769,
0.034721795469522476,
-0.04249747097492218,
0.06768779456615448,
-0.02524407021701336,
0.020191673189401627,
0.022628290578722954,
0.044719092547893524,
0.03660300746560097,
-0.011439559981226921,
0.03395139425992966,
-0.009217938408255577,
-0.07453182339668274,
-0.014001591131091118,
-0.006458827294409275,
-0.017217567190527916,
-0.015416978858411312,
0.03137144818902016,
-0.013482018373906612,
-0.036585092544555664,
0.04984315484762192,
-0.010928944684565067,
-0.047836530953645706,
0.009011900052428246,
0.007502452004700899,
-0.04106416553258896,
0.018229838460683823,
0.06159625202417374,
-0.0001521486119600013,
0.01983334682881832,
-0.001778193050995469,
-0.09022650122642517,
-0.021230818703770638,
0.0037982561625540257,
0.07259686291217804,
-0.027358194813132286,
-0.0025418754667043686,
0.03583260625600815,
0.018740452826023102,
-0.03758840262889862,
0.011439559981226921,
-0.0355280302464962,
-0.026211552321910858,
-0.026964036747813225,
-0.048804011195898056,
0.06693530827760696,
-0.0026874453760683537,
0.0380900613963604,
0.021786224097013474,
-0.017423605546355247,
0.01729818992316723,
-0.02493949420750141,
0.023792849853634834,
0.02085457742214203,
0.028881080448627472,
-0.015981342643499374,
0.014422624371945858,
0.0003919191367458552,
0.04113583266735077,
-0.02454533614218235,
-0.01563197374343872,
0.08155500888824463,
0.018740452826023102,
0.009441891685128212,
-0.0011847155401483178,
-0.04500575363636017,
0.03898587450385094,
0.037230078130960464,
-0.02028125524520874,
0.034220140427351,
0.018319420516490936,
0.09595972299575806,
-0.03602968528866768,
-0.002642654813826084,
-0.008465453051030636,
-0.02719694748520851,
-0.006028836127370596,
0.040060855448246,
-0.007018711883574724,
-0.003912472631782293,
-0.04088500514626503,
-0.02660571038722992,
0.012980361469089985,
-0.05471638962626457,
-0.060162946581840515,
0.0013739564456045628,
-0.017719224095344543,
0.04461159557104111,
0.04113583266735077,
0.044396597892045975,
0.021212903782725334,
-0.012595160864293575,
-0.007067981641739607,
-0.01156497374176979,
-0.010928944684565067,
-0.00281733856536448,
-0.10212292522192001,
0.03791089728474617,
-0.041314996778964996,
-0.019654184579849243,
0.02957981638610363,
-0.02434825524687767,
0.007166521158069372,
0.04256913810968399,
0.0716652125120163,
0.0419958159327507,
-0.04980732128024101,
-0.008125043474137783,
-0.03479345887899399,
-0.05184978246688843,
0.0026336966548115015,
0.0021667529363185167,
-0.008985025808215141,
-0.057905491441488266,
0.03905754163861275,
-0.013025152496993542,
-0.029436485841870308,
-0.09466974437236786,
-0.029597733169794083,
0.049305666238069534,
0.029096076264977455,
-0.030386049300432205,
0.04830235242843628,
-0.022001219913363457,
0.02214455045759678,
-0.04081333801150322,
-0.010642284527420998,
0.06338787823915482,
0.03305558115243912,
0.02886316366493702,
0.023434525355696678,
0.002029021270573139,
-0.005012085661292076,
-0.008550555445253849,
0.062097907066345215,
0.02253870852291584,
-0.032840583473443985,
0.003081604139879346,
0.03880671411752701,
0.039308369159698486,
0.029758978635072708,
0.021929554641246796,
0.035743024200201035,
0.007421828806400299,
0.013258064165711403,
0.03604760020971298,
0.019582519307732582,
0.005809361115098,
0.06607532501220703,
-0.03255392238497734,
0.009665845893323421,
-0.06356704235076904,
-0.023595770820975304,
-0.018579205498099327,
0.00836691353470087,
-0.005558533128350973,
0.061775412410497665,
-0.01547072734683752,
0.02558448165655136,
0.036137182265520096,
-0.07198770344257355,
-0.04790819436311722,
-0.029543984681367874,
-0.03137144818902016,
-0.010767698287963867,
-0.02459908463060856,
0.013804511167109013,
0.02601447142660618,
-0.01626800373196602,
0.025172406807541847,
-0.14110881090164185,
-0.022950785234570503,
-0.02570989541709423,
-0.06431952863931656,
-0.017602767795324326,
-0.006852985825389624,
0.018955448642373085,
-0.061703749001026154,
0.02053208276629448,
0.020496251061558723,
-0.030188970267772675,
-0.03178352117538452,
-0.017513185739517212,
-0.01879420131444931,
0.014127004891633987,
-0.056938011199235916,
0.022753704339265823,
0.0005106146563775837,
0.07510514557361603,
0.05313975363969803,
0.014350959099829197,
0.03920087218284607,
-0.03411263972520828,
0.06449869275093079,
-0.010812489315867424,
-0.02253870852291584,
0.05407140403985977,
0.04074167460203171,
-0.03269725292921066,
-0.008510244078934193,
0.0011723981006070971,
-0.02395409718155861,
-0.016384460031986237,
-0.04805152490735054,
0.03595802187919617,
-0.005012085661292076,
0.013643264770507812,
0.008985025808215141,
0.011376852169632912,
0.03203434869647026,
-0.021087488159537315,
0.04152999073266983,
-0.014476372860372066,
0.043894942849874496,
-0.009110440500080585,
-0.003677321132272482,
-0.007865256629884243,
0.024831995368003845,
-0.00047702156007289886,
-0.014718242920935154,
-0.01547072734683752,
0.005666031036525965,
-0.07141438126564026,
-0.006458827294409275,
-0.04636739194393158,
-0.004591052886098623,
-0.02816442772746086,
0.01279224082827568,
-0.036728423088788986,
0.007838382385671139,
0.003287641564384103,
0.005079271737486124,
0.028755666688084602,
-0.019152527675032616,
0.048732344061136246,
0.020567916333675385,
0.015175108797848225,
0.00639612041413784,
-0.011609764769673347,
0.0007939161732792854,
-0.011788927018642426,
-0.03094145469367504,
-0.046869050711393356,
-0.03009939007461071,
-0.08535327017307281,
-0.02124873548746109,
-0.03984585776925087,
0.01730714924633503,
0.011941215954720974,
0.025405317544937134,
-0.022377463057637215,
0.005464472342282534,
-0.015802178531885147,
-0.0665053203701973,
-0.027626939117908478,
0.007466619368642569,
-0.06281455606222153,
-0.01307890098541975,
0.03215976431965828,
-0.04224664345383644,
0.049054838716983795,
-0.01802380010485649,
0.05883713811635971,
0.007757759187370539,
0.03269725292921066,
0.005047918297350407,
0.02189372293651104,
0.05507471412420273,
0.021159153431653976,
-0.08384829759597778,
-0.020782912150025368,
-0.006866423413157463,
-0.0034936792217195034,
-0.04410993680357933,
0.039630863815546036,
0.02214455045759678,
0.005030001979321241,
0.0645703598856926,
-0.03436347097158432,
0.007018711883574724,
0.03210601583123207,
0.007471098564565182,
0.026426546275615692,
0.07198770344257355,
0.05385640636086464,
0.03927253559231758,
0.01634862646460533,
0.005603323690593243,
-0.028110679239034653,
0.04726320877671242,
0.042855795472860336,
-0.022449128329753876,
-0.012084546498954296,
0.006248310673981905,
0.0028934830334037542,
-0.016438208520412445,
0.017468394711613655,
0.048015691339969635,
0.003735549282282591,
0.03669258952140808,
-0.04493408650159836,
0.037301741540431976,
-0.027537357062101364,
0.011609764769673347,
-0.013535766862332821,
-0.01744152046740055,
0.07861673831939697,
0.008174313232302666,
0.04819485545158386,
0.04056251049041748,
-0.0613454207777977,
-0.012541412375867367,
0.005948212463408709,
-0.017002571374177933,
0.02216246724128723,
0.0012899738503620028,
-0.011627680622041225,
-0.026910288259387016,
-0.004281996283680201,
0.10097628086805344,
0.04701238125562668,
-0.026766957715153694,
0.03287641704082489,
-0.015166150406002998,
-0.09646137803792953,
-0.008151917718350887,
0.05808465555310249,
-0.03585052117705345,
-0.004882192704826593,
0.0516706183552742,
0.02925732359290123,
0.003603416495025158,
-0.08083835989236832,
-0.03493678942322731,
-0.05543304234743118,
0.004454440902918577,
-0.003305557882413268,
-0.009773343801498413,
-0.013750762678682804,
-0.010839363560080528,
-0.002743433928117156,
-0.017065279185771942,
0.010767698287963867,
-0.024831995368003845,
0.019600436091423035,
-0.038914211094379425,
0.03391556069254875,
0.08277332037687302,
-0.023165779188275337,
-0.014234502799808979,
-0.01249662134796381,
0.019528770819306374,
-0.01601717434823513,
-0.009621054865419865,
0.013974716886878014,
-0.005258434917777777,
-0.04281996563076973,
0.017020488157868385,
0.02757319062948227,
-0.07718343287706375,
0.08442161977291107,
-0.007009753491729498,
-0.04747820273041725,
0.06156041845679283,
-0.03042188286781311,
0.034972622990608215,
-0.007677135989069939,
-0.02836150862276554,
0.0568305142223835,
-0.055003050714731216,
-0.05005815252661705,
-0.023792849853634834,
0.019976677373051643,
0.020621664822101593,
-0.014556996524333954,
-0.018194006755948067,
0.044217437505722046,
0.029167741537094116,
-0.02769860439002514,
0.011475392617285252,
0.005392807070165873,
0.049377329647541046,
0.06801028549671173,
-0.005236039403825998,
-0.03780340030789375,
0.09545806050300598,
0.0017031686147674918,
0.02486782893538475,
-0.01229954231530428,
-0.05238727107644081,
-0.004158821888267994,
0.029669398441910744,
-0.0006433072849176824,
-0.02687445469200611,
-0.021356232464313507,
0.0034332117065787315,
-0.038340888917446136,
0.012183086015284061,
-0.004447722341865301,
0.037480905652046204,
-0.05643635615706444,
-0.028254009783267975,
0.06034211069345474,
0.02248496003448963,
-0.05149145424365997,
-0.0014523402787745,
0.008778988383710384,
0.02278953790664673,
0.02325536124408245,
0.0017468396108597517,
-0.015649890527129173,
0.028325675055384636,
-0.05668718367815018,
0.02913190983235836,
-0.0008851773454807699,
0.03235684335231781,
-0.018059633672237396,
0.04823068901896477,
0.04235414043068886,
-0.004322308115661144,
-0.042855795472860336,
-0.024849912151694298,
-0.0013896332820877433,
0.045184917747974396,
0.011009568348526955,
-0.021427897736430168,
-0.017226524651050568,
-0.03637009486556053,
-0.02080082707107067,
-0.0020805306266993284,
0.0035138349048793316,
-0.01430616807192564,
0.021732475608587265,
-0.01172622013837099,
-0.025082824751734734,
-0.00913731474429369,
-0.013060985133051872,
-0.0171100702136755,
-0.02841525711119175,
0.04765736684203148,
0.014798866584897041,
-0.02454533614218235,
0.02047833427786827,
-0.011000609956681728,
0.02868400141596794,
-0.020836660638451576,
0.06270705908536911,
-0.060413774102926254,
-0.03086978942155838,
-0.0015799939865246415,
-0.01488844770938158,
-0.012899737805128098,
-0.03443513438105583,
-0.01237120758742094,
0.0426408015191555,
0.05675884708762169,
-0.02318369597196579,
-0.07334934175014496,
-0.07890339940786362,
0.08872153609991074,
-0.019905012100934982,
-0.031031036749482155,
-0.02511865645647049,
-0.026050304993987083,
0.012478705495595932,
-0.019690016284585,
-0.048660680651664734,
0.06270705908536911,
0.05270976200699806,
-0.04418160393834114,
-0.04708404466509819,
-0.06593199819326401,
0.028504839166998863
] |
52,274 |
flexget.manager
|
Manager
|
Manager class for FlexGet
Fires events:
* manager.initialize
The first time the manager is initialized, before config is loaded
* manager.before_config_load
Before the config file is loaded from disk
* manager.before_config_validate
When updating the config, before the validator is run on it
* manager.config_updated
After a configuration file has been loaded or changed (and validated) this event is fired
* manager.startup
After manager has been initialized. This is when application becomes ready to use,
however no database lock is present, so the database must not be modified on this event.
* manager.lock_acquired
The manager does not always require a lock on startup, if one is requested,
this event will run when it has been acquired successfully
* manager.upgrade
If any plugins have declared a newer schema version than exists in the database,
this event will be fired to allow plugins to upgrade their tables
* manager.shutdown_requested
When shutdown has been requested. Any plugins which might add to
execution queue should stop when this is fired.
* manager.shutdown
When the manager is exiting
* manager.execute.completed
If execution in current process was completed
* manager.daemon.started
* manager.daemon.completed
* manager.db_cleanup
|
class Manager:
"""Manager class for FlexGet
Fires events:
* manager.initialize
The first time the manager is initialized, before config is loaded
* manager.before_config_load
Before the config file is loaded from disk
* manager.before_config_validate
When updating the config, before the validator is run on it
* manager.config_updated
After a configuration file has been loaded or changed (and validated) this event is fired
* manager.startup
After manager has been initialized. This is when application becomes ready to use,
however no database lock is present, so the database must not be modified on this event.
* manager.lock_acquired
The manager does not always require a lock on startup, if one is requested,
this event will run when it has been acquired successfully
* manager.upgrade
If any plugins have declared a newer schema version than exists in the database,
this event will be fired to allow plugins to upgrade their tables
* manager.shutdown_requested
When shutdown has been requested. Any plugins which might add to
execution queue should stop when this is fired.
* manager.shutdown
When the manager is exiting
* manager.execute.completed
If execution in current process was completed
* manager.daemon.started
* manager.daemon.completed
* manager.db_cleanup
"""
unit_test = False
options: argparse.Namespace
def __init__(self, args: List[str]) -> None:
"""
:param args: CLI args
"""
global manager
if not self.unit_test:
assert not manager, 'Only one instance of Manager should be created at a time!'
elif manager:
logger.info('last manager was not torn down correctly')
self.args = args
self.autoreload_config = False
self.config_file_hash: Optional[str] = None
self.config_base: str = ''
self.config_name: str = ''
self.config_path: str = ''
self.log_filename: str = ''
self.db_filename: str = ''
self.engine: Optional[Engine] = None
self.lockfile: str = ''
self.database_uri: str = ''
self.db_upgraded = False
self._has_lock = False
self.is_daemon = False
self.ipc_server: IPCServer
self.task_queue: TaskQueue
self.persist: SimplePersistence
self.initialized = False
self.config: Dict = {}
self.options = self.parse_initial_options(args)
self._init_config(create=False)
# When we are in test mode, we use a different lock file and db
if self.options.test:
self.lockfile = os.path.join(self.config_base, f'.test-{self.config_name}-lock')
self._init_logging()
manager = self
logger.debug('sys.defaultencoding: {}', sys.getdefaultencoding())
logger.debug('sys.getfilesystemencoding: {}', sys.getfilesystemencoding())
logger.debug('flexget detected io encoding: {}', io_encoding)
logger.debug('os.path.supports_unicode_filenames: {}', os.path.supports_unicode_filenames)
if (
codecs.lookup(sys.getfilesystemencoding()).name == 'ascii'
and not os.path.supports_unicode_filenames
):
logger.warning(
'Your locale declares ascii as the filesystem encoding. Any plugins reading filenames from '
'disk will not work properly for filenames containing non-ascii characters. Make sure your '
'locale env variables are set up correctly for the environment which is launching FlexGet.'
)
def _add_tray_icon_items(self, tray_icon: 'TrayIcon'):
tray_icon.add_menu_item(text='Shutdown', action=self.shutdown, index=2)
tray_icon.add_menu_item(text='Reload Config', action=self.load_config, index=3)
tray_icon.add_menu_separator(index=4)
@staticmethod
def parse_initial_options(args: List[str]) -> argparse.Namespace:
"""Parse what we can from cli args before plugins are loaded."""
try:
options = CoreArgumentParser().parse_known_args(args, do_help=False)[0]
except ParserError as exc:
try:
# If a non-built-in command was used, we need to parse with a parser that
# doesn't define the subparsers
options = manager_parser.parse_known_args(args, do_help=False)[0]
except ParserError:
manager_parser.print_help()
print(f'\nError: {exc.message}')
sys.exit(1)
return options
def _init_logging(self) -> None:
"""Initialize logging variables"""
log_file = os.path.expanduser(self.options.logfile)
# If an absolute path is not specified, use the config directory.
if not os.path.isabs(log_file):
log_file = os.path.join(self.config_base, log_file)
self.log_filename = log_file
def initialize(self) -> None:
"""
Load plugins, database, and config. Also initializes (but does not start) the task queue and ipc server.
This should only be called after obtaining a lock.
"""
if self.initialized:
raise RuntimeError('Cannot call initialize on an already initialized manager.')
plugin.load_plugins(
extra_plugins=[os.path.join(self.config_base, 'plugins')],
extra_components=[os.path.join(self.config_base, 'components')],
)
# Reparse CLI options now that plugins are loaded
self.options = get_parser().parse_args(self.args)
self.task_queue = TaskQueue()
self.ipc_server = IPCServer(self, self.options.ipc_port)
self.setup_yaml()
self.init_sqlalchemy()
fire_event('manager.initialize', self)
try:
self.load_config()
except ValueError as e:
logger.critical('Failed to load config file: {}', e.args[0])
raise
# cannot be imported at module level because of circular references
from flexget.utils.simple_persistence import SimplePersistence
self.persist = SimplePersistence('manager')
if db_schema.upgrade_required():
logger.info('Database upgrade is required. Attempting now.')
fire_event('manager.upgrade', self)
if manager.db_upgraded:
fire_event('manager.db_upgraded', self)
fire_event('manager.startup', self)
self.initialized = True
@property
def tasks(self) -> List[str]:
"""A list of tasks in the config"""
if not self.config:
return []
return list(self.config.get('tasks', {}).keys())
@property
def has_lock(self) -> bool:
return self._has_lock
def execute(
self,
options: Optional[Union[dict, argparse.Namespace]] = None,
priority: int = 1,
suppress_warnings: Optional[Sequence[str]] = None,
) -> List[Tuple[str, str, threading.Event]]:
"""
Run all (can be limited with options) tasks from the config.
:param options: Either an :class:`argparse.Namespace` instance, or a dict, containing options for execution
:param priority: If there are other executions waiting to be run, they will be run in priority order,
lowest first.
:param suppress_warnings: Allows suppressing log warning about missing plugin in key phases
:returns: a list of :class:`threading.Event` instances which will be
set when each respective task has finished running
"""
if options is None:
options = copy.copy(self.options.execute)
elif isinstance(options, dict):
options_namespace = copy.copy(self.options.execute)
options_namespace.__dict__.update(options)
options = options_namespace
task_names = self.tasks
# Only reload config if daemon
config_hash = self.hash_config()
if self.is_daemon and self.autoreload_config and self.config_file_hash != config_
|
(args: List[str]) -> None
|
[
0.08951664716005325,
0.004363624844700098,
-0.041495997458696365,
0.0072727082297205925,
0.05676868557929993,
-0.007044137455523014,
-0.017849303781986237,
0.03185446187853813,
-0.05838945880532265,
-0.08241017907857895,
0.004862324800342321,
-0.024955779314041138,
-0.03050381690263748,
-0.0013389575760811567,
0.004514274187386036,
0.0025844089686870575,
-0.033620692789554596,
0.011615553870797157,
0.006399983540177345,
-0.056685566902160645,
-0.006285698153078556,
0.010025948286056519,
0.040083013474941254,
-0.010535037145018578,
-0.0007714265957474709,
-0.028883041813969612,
0.026057075709104538,
-0.023189550265669823,
0.046379100531339645,
-0.0037246656138449907,
-0.023605134338140488,
0.02470642887055874,
0.024103833362460136,
0.01237399410456419,
0.017007747665047646,
-0.017537616193294525,
0.02663889154791832,
0.03544925898313522,
-0.019999947398900986,
-0.012841525487601757,
0.021589554846286774,
-0.03015057183802128,
0.07763096690177917,
-0.007610369939357042,
0.011054516769945621,
0.03746483847498894,
-0.021070074290037155,
0.06287775933742523,
0.017818136140704155,
-0.013631133362650871,
0.019916830584406853,
-0.023854482918977737,
-0.008238939568400383,
0.05784919857978821,
-0.04542325809597969,
0.07310111075639725,
0.021942799910902977,
0.014971389435231686,
0.011251918971538544,
-0.03449341654777527,
0.024914221838116646,
0.033870041370391846,
0.033329784870147705,
0.005311674438416958,
-0.0030025895684957504,
-0.05897127464413643,
-0.017340214923024178,
-0.006857125088572502,
0.02855057455599308,
0.04887260124087334,
-0.005345440469682217,
-0.01373502891510725,
0.023875262588262558,
-0.04137131944298744,
0.07667512446641922,
-0.0020324622746556997,
-0.033870041370391846,
-0.018825925886631012,
-0.009558416903018951,
0.04162067174911499,
0.0084311468526721,
0.018670082092285156,
-0.011854514479637146,
0.0044908975251019,
0.06121542677283287,
0.029838884249329567,
0.033870041370391846,
0.01582333631813526,
-0.013018148019909859,
-0.02692979946732521,
-0.007319461554288864,
0.017506448552012444,
0.030940178781747818,
0.06221282482147217,
-0.016457099467515945,
-0.06828033924102783,
-0.042306382209062576,
-0.01657138578593731,
-0.027324603870511055,
-0.021267477422952652,
-0.04438430070877075,
-0.002218176145106554,
0.032498616725206375,
-0.04114275053143501,
0.013516847975552082,
-0.049869999289512634,
-0.05946997553110123,
-0.021859683096408844,
0.005290895234793425,
-0.0013058407930657268,
-0.048498574644327164,
-0.03451419621706009,
-0.0076415385119616985,
-0.0177142396569252,
-0.012519448064267635,
-0.006623359397053719,
-0.048498574644327164,
0.003223368199542165,
0.03553237393498421,
-0.026181749999523163,
-0.02283630520105362,
0.04130898416042328,
-0.0054233623668551445,
-0.002620772458612919,
0.02776096761226654,
0.0419323593378067,
-0.0020545402076095343,
0.01688307337462902,
0.03156355395913124,
-0.05269596725702286,
0.04571416601538658,
0.0007844135398045182,
0.01278957724571228,
-0.005729855038225651,
0.02938174270093441,
-0.02609863318502903,
-0.003823366714641452,
0.026244087144732475,
-0.022898642346262932,
0.014607754535973072,
0.003909080754965544,
0.005709076300263405,
-0.03424406796693802,
-0.04866480827331543,
-0.017018137499690056,
0.004779208451509476,
-0.005516869015991688,
-0.021319424733519554,
-0.03318433091044426,
-0.03341289982199669,
0.027864862233400345,
-0.08290887624025345,
-0.06449853628873825,
0.02308565378189087,
-0.017018137499690056,
0.07281020283699036,
-0.05938686057925224,
-0.0160103477537632,
0.0014428533613681793,
-0.011999968439340591,
-0.04779208451509476,
-0.03636354207992554,
-0.01087789423763752,
-0.007683096919208765,
-0.0353245846927166,
-0.03380770608782768,
-0.03883626312017441,
-0.015688270330429077,
-0.008467510342597961,
0.027532396838068962,
-0.02717914991080761,
0.027615511789917946,
-0.05356869101524353,
0.038503795862197876,
-0.023812925443053246,
0.06836345791816711,
0.009532442316412926,
-0.03536614030599594,
-0.019646702334284782,
-0.014025937765836716,
-0.03129342570900917,
-0.020789556205272675,
-0.015449310652911663,
-0.02717914991080761,
0.012457110919058323,
0.05294531583786011,
0.02443630062043667,
0.05523102357983589,
0.03650899603962898,
0.013703860342502594,
-0.04205703362822533,
-0.029547974467277527,
0.0038493406027555466,
0.006862320005893707,
-0.032477837055921555,
0.04887260124087334,
-0.02938174270093441,
0.013038926757872105,
0.033620692789554596,
-0.0027792134787887335,
-0.03096095845103264,
0.021340204402804375,
0.021880462765693665,
-0.010389583185315132,
0.018046706914901733,
-0.04488300159573555,
0.0033947962801903486,
-0.02915317192673683,
-0.009075300768017769,
0.019677871838212013,
-0.014981779269874096,
-0.033350564539432526,
-0.05656089261174202,
0.04085184261202812,
0.04629598185420036,
-0.06757385283708572,
0.08743873238563538,
0.047750525176525116,
-0.019168781116604805,
0.06753229349851608,
0.034410301595926285,
0.04912194982171059,
0.014628533273935318,
-0.0004461027274373919,
-0.03129342570900917,
0.01958436518907547,
0.024685651063919067,
-0.0006961020990274847,
0.046129751950502396,
0.019418131560087204,
0.013620743528008461,
0.01116880215704441,
-0.01981293596327305,
0.01278957724571228,
0.06296087801456451,
-0.00017808395205065608,
0.022483058273792267,
0.017070084810256958,
-0.050701167434453964,
0.026036296039819717,
-0.000022686628653900698,
0.008519458584487438,
0.015438920818269253,
-0.03966743126511574,
-0.012446721084415913,
-0.021672671660780907,
-0.004750636871904135,
0.0010805167257785797,
-0.009761014021933079,
0.045298583805561066,
0.0015415544621646404,
-0.0030103817116469145,
0.02503889612853527,
-0.011251918971538544,
-0.1005711704492569,
-0.010825945995748043,
-0.016145411878824234,
0.015470089390873909,
0.0375271737575531,
-0.00011525944137247279,
0.001974020851776004,
-0.023044096305966377,
-0.0025714219082146883,
0.061298541724681854,
0.026763567700982094,
0.014088274911046028,
0.03704925626516342,
-0.06266997009515762,
-0.0007019462063908577,
0.011553216725587845,
0.05049337446689606,
0.04488300159573555,
-0.04018690809607506,
0.01525190845131874,
-0.04124664515256882,
-0.01579216681420803,
0.007506473921239376,
-0.04604663327336311,
-0.05198947712779045,
0.005657128058373928,
0.013350614346563816,
0.019667482003569603,
0.03476354479789734,
-0.01525190845131874,
-0.008519458584487438,
-0.029797324910759926,
-0.04376092553138733,
0.0016116840997710824,
-0.062129709869623184,
0.018618132919073105,
-0.023605134338140488,
0.002185708610340953,
-0.010420751757919788,
-0.047210268676280975,
0.048498574644327164,
0.009625948965549469,
-0.11312178522348404,
0.019199950620532036,
0.01798436976969242,
-0.04862324893474579,
0.03611419349908829,
-0.0028103822842240334,
-0.04650377482175827,
0.018399951979517937,
-0.00295323901809752,
0.007958420552313328,
0.011179191991686821,
-0.02909083291888237,
0.03679990395903587,
0.004420767538249493,
0.0691530704498291,
-0.027137592434883118,
0.01169867068529129,
0.008477900177240372,
0.04301287606358528,
0.05140765756368637,
0.02965187095105648,
-0.0010493479203432798,
0.013724640011787415,
0.03430640324950218,
-0.05955309048295021,
0.08727250248193741,
0.03019212931394577,
0.005176609847694635,
0.06570372730493546,
0.022420721128582954,
0.013641523197293282,
0.07172968238592148,
-0.00790127832442522,
-0.025911621749401093,
-0.03916873037815094,
-0.004690896719694138,
-0.02526746690273285,
-0.01931423507630825,
-0.026181749999523163,
-0.053153108805418015,
0.005361025221645832,
-0.06491411477327347,
0.017807746306061745,
-0.05784919857978821,
0.07862836867570877,
0.051823243498802185,
-0.04031158238649368,
-0.018545405939221382,
-0.011189580895006657,
-0.0283220037817955,
0.04521546512842178,
-0.008519458584487438,
0.026036296039819717,
-0.04862324893474579,
0.01903371699154377,
-0.01141815260052681,
-0.07447253167629242,
0.028675250709056854,
0.015937620773911476,
-0.13697627186775208,
-0.0008694782736711204,
-0.08498679101467133,
0.008020758628845215,
-0.02886226214468479,
-0.05552193522453308,
0.01935579441487789,
-0.03154277428984642,
0.034389521926641464,
-0.04359469190239906,
-0.0689452737569809,
0.007361019961535931,
-0.044966116547584534,
0.10123609751462936,
-0.04054015502333641,
0.009044132195413113,
-0.021547995507717133,
0.025724608451128006,
-0.021901242434978485,
0.007044137455523014,
-0.019407741725444794,
-0.009854519739747047,
0.023189550265669823,
-0.05622842535376549,
0.008010368794202805,
0.027262266725301743,
0.020571375265717506,
-0.029755767434835434,
-0.013599964790046215,
-0.044966116547584534,
-0.049620650708675385,
0.02279474586248398,
-0.001981812994927168,
0.011979189701378345,
0.02070643939077854,
0.026825904846191406,
0.01821294054389,
-0.03021290898323059,
0.031958360224962234,
0.012966199778020382,
0.018088264390826225,
0.006233749911189079,
0.0544414184987545,
0.007038942538201809,
-0.015885673463344574,
0.007771408185362816,
-0.041703786700963974,
0.09259196370840073,
0.042846642434597015,
0.02204669639468193,
-0.021464878693223,
0.088269904255867,
0.046420659869909286,
0.0019649299792945385,
0.09575039893388748,
-0.024685651063919067,
0.0010948023991659284,
-0.06416606903076172,
-0.007672707550227642,
-0.08332446217536926,
-0.030337583273649216,
-0.010680492036044598,
-0.003979210276156664,
0.04629598185420036,
0.03748561814427376,
-0.024581754580140114,
0.021049296483397484,
0.03017134964466095,
-0.04658689349889755,
-0.0054960898123681545,
-0.0038077824283391237,
-0.04164145141839981,
0.0576414093375206,
-0.10996334999799728,
-0.017277877777814865,
0.004506481811404228,
0.06279464066028595,
0.03210381418466568,
-0.047999873757362366,
0.001363632851280272,
-0.01654021628201008,
0.009527248330414295,
-0.05473232641816139,
0.019220728427171707,
-0.010909062810242176,
-0.009298677556216717,
0.012841525487601757,
0.043968718498945236,
-0.018555795773863792,
0.022753188386559486,
0.0032415499445050955,
-0.03316355124115944,
0.034908998757600784,
0.04654533416032791,
0.02611941285431385,
-0.07414006441831589,
0.049953117966651917,
-0.00531427189707756,
-0.0321245901286602,
-0.015189571306109428,
-0.07359980791807175,
-0.0012422045692801476,
0.011199970729649067,
-0.049080390483140945,
0.005106480326503515,
-0.019740208983421326,
-0.028903821483254433,
0.005501284264028072,
-0.018109044060111046,
0.021859683096408844,
-0.019210340455174446,
0.044218067079782486,
0.05269596725702286,
-0.025163570418953896,
0.021942799910902977,
-0.006867514457553625,
0.023792145773768425,
-0.003831158857792616,
0.0024480456486344337,
-0.0386284701526165,
-0.04259729012846947,
0.023314224556088448,
-0.03393238037824631,
-0.006046737544238567,
-0.04625442624092102,
0.06798943132162094,
-0.01507528591901064,
0.052321940660476685,
0.038503795862197876,
-0.062129709869623184,
-0.07222838699817657,
0.12824901938438416,
-0.09583351761102676,
-0.013548016548156738,
-0.047418057918548584,
-0.01169867068529129,
-0.03837912157177925,
0.06803099066019058,
0.028197329491376877,
0.043095991015434265,
-0.0331219919025898,
-0.01582333631813526,
-0.02065449208021164,
0.025412920862436295,
-0.0031999917700886726,
0.03368302807211876,
-0.012966199778020382,
-0.009994778782129288,
0.02884148433804512,
0.024353183805942535,
0.012051916681230068,
-0.07002579420804977,
0.01819216087460518,
-0.03638432174921036,
-0.025392141193151474,
-0.028509017080068588,
-0.0296726506203413,
0.008909068070352077,
-0.06582839787006378,
-0.011916852556169033,
-0.01684151403605938,
-0.019085664302110672,
0.013963599689304829,
0.024332404136657715,
-0.019106443971395493,
0.007428552024066448,
0.009059716947376728,
0.003883106866851449,
-0.019709039479494095,
-0.03434796258807182,
-0.012976589612662792,
-0.006186997052282095,
0.0023922016844153404,
0.017267487943172455,
0.04862324893474579,
0.009994778782129288,
-0.01388048380613327,
-0.006171412765979767,
-0.04679468274116516,
0.02066488191485405,
0.03729860484600067,
-0.03199991583824158,
-0.012727240100502968,
-0.03999989479780197,
-0.04234794154763222,
0.047418057918548584,
0.04957909137010574,
0.009075300768017769,
-0.0004798688751179725,
-0.002187007339671254,
-0.03318433091044426,
0.03723626583814621,
0.02931940369307995,
0.019968779757618904,
-0.025496037676930428,
0.014680481515824795,
0.024103833362460136,
0.02634798362851143,
-0.001245451276190579,
-0.0027116811834275723,
-0.07879459857940674,
0.07900239527225494,
-0.03233238309621811,
0.055646609514951706,
0.039521973580121994,
0.0010077896295115352,
0.02911161258816719,
-0.16797877848148346,
0.03187524154782295,
0.027927199378609657,
-0.0015999958850443363,
0.04031158238649368,
0.02039475180208683,
0.02909083291888237,
0.028446679934859276,
-0.017496058717370033,
-0.015116843394935131,
0.011189580895006657,
-0.031958360224962234,
-0.03199991583824158,
0.011064906604588032,
0.02093501016497612,
0.036841463297605515,
-0.017527226358652115,
-0.05473232641816139,
0.0441349521279335,
-0.03407783433794975,
-0.04141287878155708,
-0.0017779174959287047,
-0.040706388652324677,
0.01689346320927143,
0.03898171707987785,
0.07177124172449112,
0.018441511318087578,
0.009428546763956547,
-0.043968718498945236,
0.02938174270093441,
0.02769862860441208,
-0.02614019252359867,
0.001989605138078332,
0.05294531583786011,
0.01141815260052681,
0.015719439834356308,
0.055064793676137924,
-0.01048828475177288,
-0.041184309870004654,
-0.020747998729348183,
0.037090811878442764,
-0.03750639781355858,
0.027324603870511055,
-0.006867514457553625,
-0.022711629047989845,
-0.018005147576332092,
-0.04409339278936386,
0.05385959893465042,
-0.026015516370534897,
-0.04654533416032791,
0.0245194174349308,
0.03345445916056633,
-0.018119433894753456,
-0.016509048640727997,
-0.0245194174349308,
0.04236872121691704,
0.04359469190239906,
-0.010155817493796349,
0.018659692257642746,
0.06445697695016861,
0.03233238309621811,
-0.031085632741451263,
-0.036072634160518646,
-0.002092202426865697,
-0.012155812233686447,
-0.03021290898323059,
-0.02774018794298172,
-0.021672671660780907,
0.007329850923269987,
-0.010431141592562199,
0.003337653586640954,
0.007771408185362816,
0.03233238309621811,
-0.042036253958940506,
0.03677912428975105,
-0.016238918527960777,
0.016259698197245598,
-0.023542795330286026,
0.08108031004667282,
-0.00911166425794363,
0.0023207732010632753,
-0.040103793144226074,
-0.003628561971709132,
-0.014368793927133083,
-0.0011292177950963378,
-0.0008740237099118531,
0.07293487340211868,
0.004628559574484825,
-0.013537626713514328,
0.022462278604507446,
-0.0630439892411232,
0.05219726637005806,
-0.016103854402899742,
0.01877397671341896,
-0.0483323410153389,
-0.03150121867656708,
-0.02988044172525406,
0.025496037676930428,
-0.02097656950354576,
0.0011662307661026716,
-0.022940199822187424,
0.005714270751923323,
0.018431121483445168,
-0.06208815053105354,
0.019677871838212013,
0.029007716104388237,
0.03320510685443878,
0.04600507393479347,
0.06541281938552856,
-0.05922062695026398,
0.01981293596327305,
0.012633733451366425,
0.005407778080552816,
-0.037942759692668915,
0.014514247886836529,
0.0171116441488266,
0.012031137943267822,
0.009974000044167042,
-0.0316258929669857,
0.02095578983426094,
-0.02010384388267994,
0.05111674964427948,
-0.005371414590626955,
0.032207708805799484,
0.06096607446670532,
-0.03073238767683506,
0.03590640053153038,
-0.034368742257356644,
-0.02042592130601406,
0.06300243735313416,
0.025122012943029404,
0.014493469148874283,
-0.030836284160614014,
-0.020883062854409218,
-0.01876358687877655,
-0.033558353781700134,
-0.03921028599143028,
-0.022358383983373642,
0.06736605614423752,
-0.06906995177268982,
-0.0008519458351656795,
0.022192150354385376,
0.025184350088238716,
0.012592175044119358,
-0.028696028515696526,
-0.027386941015720367,
-0.012166202068328857,
0.0003337653761263937,
0.03883626312017441,
0.02884148433804512,
0.10223349928855896,
-0.004638948943465948,
0.027615511789917946,
-0.027262266725301743,
0.0017246708739548922,
-0.016145411878824234,
0.0026986943557858467,
0.010254519060254097,
-0.0441349521279335,
-0.015148012898862362,
0.052612848579883575,
-0.044218067079782486,
0.04305443540215492,
-0.010659712366759777,
-0.03391160070896149,
-0.04550637677311897,
0.04592195898294449,
0.05115830898284912,
-0.04629598185420036,
-0.037090811878442764,
-0.021111633628606796,
0.0730595514178276,
0.03966743126511574,
-0.04249339550733566,
0.08552704751491547,
0.000701296899933368,
-0.035760946571826935,
0.029506416991353035,
0.009828546084463596,
-0.025205129757523537,
-0.03515835106372833,
0.018410341814160347,
0.010124648921191692,
-0.0015688270796090364,
0.014192171394824982,
0.050950516015291214,
-0.03299731761217117,
0.006929852068424225,
0.005392193794250488,
-0.002927265129983425,
-0.006306477356702089,
0.07451409101486206,
-0.03908561170101166,
-0.03048303723335266,
0.03555315360426903,
0.0217142291367054,
-0.0007623356650583446,
-0.06262841075658798,
0.013932431116700172,
-0.053236223757267,
0.00023538900131825358,
0.0063480352982878685,
0.061049193143844604,
-0.02152721770107746,
0.007059721741825342,
0.03771418705582619
] |
52,275 |
flexget.manager
|
__init__
|
:param args: CLI args
|
def __init__(self, args: List[str]) -> None:
"""
:param args: CLI args
"""
global manager
if not self.unit_test:
assert not manager, 'Only one instance of Manager should be created at a time!'
elif manager:
logger.info('last manager was not torn down correctly')
self.args = args
self.autoreload_config = False
self.config_file_hash: Optional[str] = None
self.config_base: str = ''
self.config_name: str = ''
self.config_path: str = ''
self.log_filename: str = ''
self.db_filename: str = ''
self.engine: Optional[Engine] = None
self.lockfile: str = ''
self.database_uri: str = ''
self.db_upgraded = False
self._has_lock = False
self.is_daemon = False
self.ipc_server: IPCServer
self.task_queue: TaskQueue
self.persist: SimplePersistence
self.initialized = False
self.config: Dict = {}
self.options = self.parse_initial_options(args)
self._init_config(create=False)
# When we are in test mode, we use a different lock file and db
if self.options.test:
self.lockfile = os.path.join(self.config_base, f'.test-{self.config_name}-lock')
self._init_logging()
manager = self
logger.debug('sys.defaultencoding: {}', sys.getdefaultencoding())
logger.debug('sys.getfilesystemencoding: {}', sys.getfilesystemencoding())
logger.debug('flexget detected io encoding: {}', io_encoding)
logger.debug('os.path.supports_unicode_filenames: {}', os.path.supports_unicode_filenames)
if (
codecs.lookup(sys.getfilesystemencoding()).name == 'ascii'
and not os.path.supports_unicode_filenames
):
logger.warning(
'Your locale declares ascii as the filesystem encoding. Any plugins reading filenames from '
'disk will not work properly for filenames containing non-ascii characters. Make sure your '
'locale env variables are set up correctly for the environment which is launching FlexGet.'
)
|
(self, args: List[str]) -> NoneType
|
[
0.08395661413669586,
-0.020894862711429596,
-0.017556963488459587,
0.047371745109558105,
0.047220878303050995,
-0.03117256984114647,
-0.029682772234082222,
0.040582798421382904,
-0.0483146533370018,
-0.08312685042619705,
0.01912219263613224,
0.0034156874753534794,
-0.08191993087530136,
0.013200725428760052,
0.023214418441057205,
0.013276157900691032,
-0.03496306389570236,
0.005063421092927456,
0.02057427354156971,
-0.030663399025797844,
-0.005035133566707373,
0.04318523034453392,
0.021762337535619736,
0.03571739047765732,
-0.010400285013020039,
-0.014143633656203747,
0.003943716641515493,
-0.01887703686952591,
0.05502816662192345,
0.0030738830100744963,
-0.009381943382322788,
0.03586825728416443,
0.014662234112620354,
0.028645573183894157,
0.024232760071754456,
-0.004832408390939236,
0.015001680701971054,
0.010164557956159115,
-0.05842263624072075,
-0.042619481682777405,
0.03352984040975571,
-0.026156293228268623,
0.06849290430545807,
-0.0032412493601441383,
-0.00854275468736887,
0.015180833637714386,
-0.02051769755780697,
0.02332756668329239,
0.023704729974269867,
0.031191427260637283,
0.02440248243510723,
-0.009664816781878471,
-0.010485147126019001,
0.03960217535495758,
-0.07286800444126129,
0.08682305365800858,
0.010126842185854912,
0.033907003700733185,
-0.04439215362071991,
-0.015501422807574272,
-0.026363734155893326,
0.007934578694403172,
0.04250633344054222,
0.00863704551011324,
-0.007359404116868973,
-0.06698425114154816,
-0.036094553768634796,
-0.007580987643450499,
0.04337381199002266,
0.025439683347940445,
0.028042111545801163,
-0.011116895824670792,
-0.012700983323156834,
-0.020102817565202713,
0.0652870163321495,
0.014841386117041111,
-0.04631568491458893,
-0.009730820544064045,
-0.005129424389451742,
0.033473268151283264,
0.024289334192872047,
0.004768761806190014,
-0.030041078105568886,
-0.016010593622922897,
0.045825373381376266,
0.017585251480340958,
0.04989873990416527,
0.023648155853152275,
-0.003260107710957527,
-0.0032860375940799713,
-0.02841927483677864,
0.03045595809817314,
0.023157842457294464,
0.07701680064201355,
0.007500840350985527,
-0.08116559684276581,
-0.034001294523477554,
-0.006982240825891495,
-0.028155259788036346,
-0.003441617591306567,
-0.054537851363420486,
0.028343841433525085,
0.01089059840887785,
-0.04442986845970154,
-0.009306510910391808,
-0.039526741951704025,
-0.027457507327198982,
-0.03781064972281456,
-0.0010908277472481132,
-0.022328082472085953,
-0.0719250962138176,
-0.0399039052426815,
-0.02004624344408512,
-0.001143277040682733,
-0.026024285703897476,
0.02081942930817604,
-0.03997933864593506,
-0.019593646749854088,
0.06204340606927872,
-0.021215450018644333,
-0.02270524762570858,
0.05857350304722786,
-0.020366832613945007,
-0.0024185613729059696,
0.027947820723056793,
0.05257660150527954,
0.030851980671286583,
0.010145699605345726,
0.018518730998039246,
-0.006986955180764198,
0.049446143209934235,
0.004170014522969723,
0.00863704551011324,
0.002442134078592062,
0.02125316672027111,
-0.017028935253620148,
-0.006477784365415573,
0.010400285013020039,
-0.012795274145901203,
0.03413330391049385,
-0.005888466257601976,
-0.023157842457294464,
-0.034397318959236145,
-0.03141772374510765,
-0.04133712872862816,
0.034831054508686066,
-0.021140018478035927,
-0.0351516455411911,
-0.0641932412981987,
-0.007434837054461241,
0.047220878303050995,
-0.06947352737188339,
-0.07860089093446732,
0.01113575417548418,
-0.0018846392631530762,
0.07350917905569077,
-0.06268458813428879,
-0.0042784493416547775,
-0.013738183304667473,
0.027532940730452538,
-0.061590809375047684,
-0.01921648345887661,
0.008736051619052887,
-0.02110230177640915,
-0.02410075254738331,
-0.03579282388091087,
-0.051143381744623184,
-0.034057870507240295,
-0.004304379224777222,
0.012936710380017757,
-0.015888014808297157,
0.029946787282824516,
-0.07415036112070084,
0.010909455828368664,
-0.003088026773184538,
0.03877241536974907,
0.014011627063155174,
-0.03083312138915062,
-0.0204234067350626,
0.009598813019692898,
-0.03726376220583916,
-0.02990907058119774,
-0.0015982306795194745,
-0.009938260540366173,
0.029117027297616005,
0.024364767596125603,
0.015793723985552788,
0.052878331393003464,
0.07203824073076248,
0.012135237455368042,
-0.032077763229608536,
0.008406032808125019,
-0.025005944073200226,
-0.00543587002903223,
-0.020876003429293633,
0.025401966646313667,
0.02362929843366146,
-0.029022736474871635,
0.011560063809156418,
-0.012748128734529018,
-0.04009248688817024,
0.035698533058166504,
0.005134139209985733,
-0.025156810879707336,
0.015501422807574272,
-0.07603617757558823,
0.008245738223195076,
-0.010353139601647854,
-0.012493543326854706,
0.04382640868425369,
-0.013134721666574478,
-0.015275124460458755,
-0.04454301670193672,
0.023176701739430428,
0.04884268343448639,
-0.05959184467792511,
0.050653066486120224,
0.052350305020809174,
-0.0036608439404517412,
0.060534752905368805,
0.02483622170984745,
0.04952157661318779,
-0.008830342441797256,
0.003920143935829401,
-0.038508400321006775,
-0.003198818536475301,
0.04171429201960564,
0.016614055261015892,
0.006619220599532127,
0.02483622170984745,
-0.017717259004712105,
0.004921984393149614,
0.0028381559532135725,
0.028494708240032196,
0.059440977871418,
-0.006930380593985319,
0.0025670696049928665,
0.011635496281087399,
-0.06362749636173248,
-0.01057943794876337,
0.007015242241322994,
0.008552184328436852,
0.0412616953253746,
-0.020800570026040077,
-0.0038517829962074757,
-0.02691062167286873,
0.013889048248529434,
-0.01002312172204256,
-0.0019695009104907513,
0.05223715305328369,
0.008340029045939445,
-0.011512918397784233,
0.010852881707251072,
-0.010343710891902447,
-0.05570705980062485,
-0.02502480335533619,
-0.030682256445288658,
-0.018547018989920616,
0.01422849576920271,
-0.007929864339530468,
-0.008806769736111164,
-0.040205635130405426,
-0.006826660595834255,
0.03156859055161476,
0.016566909849643707,
-0.0016288751503452659,
0.019593646749854088,
-0.03151201456785202,
0.00501156086102128,
-0.006887949537485838,
0.015595713630318642,
0.04989873990416527,
-0.010852881707251072,
0.0276838056743145,
-0.05902609974145889,
-0.017962414771318436,
-0.0035641957074403763,
-0.04133712872862816,
-0.05412297323346138,
0.01757582277059555,
-0.011333765462040901,
0.019178766757249832,
0.06551331281661987,
-0.019178766757249832,
-0.0018504587933421135,
-0.03364299237728119,
-0.050615351647138596,
-0.03477448225021362,
-0.07105761766433716,
0.006774800829589367,
-0.03777293115854263,
0.03122914396226406,
-0.027476366609334946,
-0.05431155487895012,
0.03354869782924652,
0.0038022801745682955,
-0.079807810485363,
0.000613480107858777,
0.028306126594543457,
-0.03428416699171066,
0.0185941644012928,
0.01849987357854843,
-0.041563425213098526,
0.02740093320608139,
-0.022045210003852844,
-0.011107467114925385,
-0.03877241536974907,
-0.006920951418578625,
0.025722555816173553,
0.023082410916686058,
0.07215139269828796,
-0.01476595364511013,
0.04352467507123947,
0.03926272690296173,
0.04043193534016609,
0.09549781680107117,
0.023025836795568466,
0.02764608897268772,
0.021290883421897888,
0.03398243710398674,
-0.043939556926488876,
0.06358978152275085,
0.019593646749854088,
0.0051529970951378345,
0.03590597212314606,
0.019442781805992126,
0.037244901061058044,
0.05514131486415863,
0.022874969989061356,
0.012163525447249413,
-0.04548592492938042,
0.028004394844174385,
-0.04148799180984497,
-0.02076285518705845,
-0.009957117959856987,
-0.03907414525747299,
-0.0052567170932888985,
-0.09240507334470749,
0.020027386024594307,
-0.057479728013277054,
0.09225420653820038,
0.016114313155412674,
-0.025232242420315742,
-0.045335061848163605,
-0.011578921228647232,
-0.022573240101337433,
0.05280290171504021,
-0.040884532034397125,
-0.005699884612113237,
-0.020611988380551338,
-0.018150996416807175,
-0.028060968965291977,
-0.05133196339011192,
0.023742446675896645,
0.009537523612380028,
-0.10432344675064087,
-0.0546887181699276,
-0.08274968713521957,
0.017255233600735664,
-0.013804187066853046,
-0.05993129312992096,
0.009103785268962383,
-0.04111082851886749,
0.038168951869010925,
-0.04759804159402847,
-0.09987291693687439,
-0.004674470983445644,
-0.029758205637335777,
0.08003410696983337,
0.0019718583207577467,
-0.006713511422276497,
-0.041601140052080154,
0.01467166282236576,
-0.0009971262188628316,
-0.004987988155335188,
-0.015859728679060936,
-0.049408428370952606,
0.004636754747480154,
-0.050275903195142746,
0.028871871531009674,
0.0007820251048542559,
0.016887499019503593,
-0.0258545633405447,
-0.00046349866897799075,
-0.043939556926488876,
-0.053029198199510574,
0.025307675823569298,
-0.001886996440589428,
0.047899775207042694,
0.028626715764403343,
0.04035650193691254,
0.01569000445306301,
0.016302894800901413,
0.0064259241335093975,
0.015095971524715424,
0.026835188269615173,
0.019423924386501312,
0.051671408116817474,
0.005407582502812147,
0.0020166465546935797,
0.0004658559337258339,
-0.0496724434196949,
0.07814829051494598,
0.045825373381376266,
-0.0004897233447991312,
-0.012455826625227928,
0.09678017348051071,
0.026740897446870804,
0.024477915838360786,
0.09678017348051071,
-0.024232760071754456,
-0.01563343033194542,
-0.027664948254823685,
-0.03113485313951969,
-0.08425834029912949,
-0.02149832434952259,
-0.000568986579310149,
-0.02032911591231823,
0.06181710958480835,
0.06468354910612106,
-0.0040002912282943726,
0.04642883688211441,
0.010862310416996479,
-0.04827693849802017,
-0.017057223245501518,
-0.011663783341646194,
-0.03688659891486168,
0.04254405200481415,
-0.07630018889904022,
-0.024798505008220673,
0.0017938842065632343,
0.05457556992769241,
0.04216688871383667,
-0.03858383372426033,
-0.003340254770591855,
0.00835417304188013,
-0.011531775817275047,
-0.0442412868142128,
-0.0033756140619516373,
0.007477267645299435,
0.0032789658289402723,
-0.014002197422087193,
0.03790494054555893,
-0.010636013001203537,
0.025345392525196075,
0.00040928140515461564,
-0.04929528012871742,
0.017462672665715218,
0.054236121475696564,
0.05680083483457565,
-0.07207595556974411,
0.04273263365030289,
-0.03286980465054512,
-0.05393439158797264,
-0.00395550299435854,
-0.05879979953169823,
0.011277190409600735,
0.002189906081184745,
-0.016227463260293007,
0.03128571808338165,
-0.0014391147997230291,
-0.011475201696157455,
0.04525962844491005,
0.009471519850194454,
0.021309740841388702,
-0.030531391501426697,
0.04522191360592842,
0.08290055394172668,
-0.028626715764403343,
-0.004931413568556309,
-0.02474193088710308,
0.024873938411474228,
-0.013992768712341785,
-0.002272410551086068,
-0.03369956463575363,
-0.029946787282824516,
0.013379877433180809,
-0.03679230809211731,
0.02981477975845337,
-0.03481219708919525,
0.024873938411474228,
-0.02338414080440998,
0.04167657345533371,
0.05544304475188255,
-0.08478637039661407,
-0.06724826246500015,
0.1000237762928009,
-0.07377319782972336,
-0.014709379523992538,
-0.028871871531009674,
0.008410748094320297,
0.030606823042035103,
0.006897378712892532,
0.04903126507997513,
0.0669088140130043,
-0.004599038511514664,
-0.023799020797014236,
-0.02144174836575985,
0.0024397769011557102,
-0.03292638063430786,
0.0221206434071064,
-0.038074661046266556,
0.009169789031147957,
0.014718808233737946,
0.024873938411474228,
0.02285611256957054,
-0.07739396393299103,
-0.01507711410522461,
-0.014454794116318226,
-0.011560063809156418,
-0.03364299237728119,
-0.043449241667985916,
-0.026835188269615173,
-0.04476931691169739,
-0.02885301224887371,
0.024723071604967117,
-0.02517566829919815,
-0.012616121210157871,
0.007213253062218428,
-0.0059450408443808556,
0.008934061974287033,
0.007194395177066326,
0.0042478046379983425,
-0.063514344394207,
-0.02977706305682659,
-0.050653066486120224,
0.0008751373388804495,
-0.0022500164341181517,
0.052689749747514725,
0.048729535192251205,
-0.0046485411003232,
-0.022045210003852844,
0.014794240705668926,
-0.04495789855718613,
0.04578765854239464,
0.018603593111038208,
-0.024911653250455856,
-0.0049785589799284935,
-0.022328082472085953,
-0.08448463678359985,
0.056084223091602325,
0.03839525207877159,
-0.004177086520940065,
-0.02826840989291668,
0.009740249253809452,
-0.029060453176498413,
0.03690545633435249,
0.05087936669588089,
0.014718808233737946,
-0.003217676654458046,
0.010730303823947906,
0.0024397769011557102,
0.02526995912194252,
-0.017811549827456474,
-0.03307724371552467,
-0.05378352478146553,
0.06807802617549896,
-0.02764608897268772,
0.054386988282203674,
0.03258693218231201,
-0.0031045277137309313,
0.03153087571263313,
-0.1363823413848877,
0.036528293043375015,
-0.006755942478775978,
-0.008137304335832596,
0.052350305020809174,
0.030870838090777397,
0.042430900037288666,
0.046164821833372116,
-0.005237859208136797,
-0.012163525447249413,
0.038659267127513885,
0.009292367845773697,
-0.039715323597192764,
-0.005883751902729273,
0.025194525718688965,
0.07019013911485672,
0.003215319477021694,
-0.029305608943104744,
0.04827693849802017,
-0.0042077312245965,
-0.033661849796772,
0.0007914541638456285,
-0.019838804379105568,
0.013219582848250866,
0.054726433008909225,
0.04461845010519028,
-0.008533325977623463,
-0.007005813531577587,
-0.07648877054452896,
0.012889564968645573,
0.026212867349386215,
-0.031832605600357056,
0.002802796894684434,
0.0392250120639801,
0.011852364987134933,
-0.002484565135091543,
0.04869181662797928,
0.003889499232172966,
-0.03426530957221985,
0.001331858802586794,
0.022761821746826172,
-0.03630199283361435,
0.036811165511608124,
-0.00919336173683405,
-0.03907414525747299,
0.008472036570310593,
-0.05178456008434296,
0.0544247031211853,
-0.014699949882924557,
-0.041601140052080154,
0.019838804379105568,
0.035113926976919174,
-0.01002312172204256,
0.005270861089229584,
-0.03292638063430786,
0.020649705082178116,
0.03592482954263687,
0.01616145856678486,
0.018613021820783615,
0.05872436612844467,
0.01902790181338787,
-0.04895583167672157,
-0.035227078944444656,
0.009287652559578419,
0.023874454200267792,
-0.01887703686952591,
-0.03513278812170029,
-0.03573624789714813,
0.014775383286178112,
-0.0036985601764172316,
0.03513278812170029,
0.027532940730452538,
0.041940588504076004,
-0.029079310595989227,
0.018679026514291763,
-0.007967580109834671,
0.024213900789618492,
0.021724620833992958,
0.06343891471624374,
-0.0017620610306039453,
-0.0030526677146553993,
-0.0455990768969059,
-0.04186515510082245,
-0.01615202985703945,
0.020215967670083046,
-0.02285611256957054,
0.07716766744852066,
0.01878274604678154,
-0.010060838423669338,
0.022384658455848694,
-0.02721235156059265,
0.03300181403756142,
0.0018374937353655696,
0.0048654102720320225,
-0.03811237961053848,
-0.00391542911529541,
-0.022686388343572617,
0.0043067364022135735,
-0.023685872554779053,
0.005440584383904934,
-0.008000582456588745,
-0.015765437856316566,
0.018433868885040283,
-0.07245311886072159,
0.031059419736266136,
0.01561457198113203,
0.04752260819077492,
0.032945238053798676,
0.06128907948732376,
-0.03171945735812187,
-0.01692521572113037,
0.005563162732869387,
0.007293400354683399,
-0.029550766572356224,
0.019075047224760056,
0.01411534659564495,
0.03503849729895592,
0.026439165696501732,
-0.01853759028017521,
0.017349524423480034,
-0.027118060737848282,
0.059327829629182816,
-0.022007495164871216,
0.041563425213098526,
0.036962028592824936,
0.013889048248529434,
0.00891048926860094,
-0.035264793783426285,
-0.0331149622797966,
0.055367611348629,
0.025383109226822853,
-0.009245222434401512,
-0.031738314777612686,
-0.04352467507123947,
0.00781671516597271,
-0.021290883421897888,
-0.05016275495290756,
-0.022724105045199394,
0.03699974715709686,
-0.06815345585346222,
0.010928314179182053,
0.024459058418869972,
0.017566394060850143,
0.012587834149599075,
-0.026986053213477135,
-0.023063551634550095,
-0.03600026294589043,
-0.0062231989577412605,
0.06094963476061821,
0.03556652367115021,
0.12370964884757996,
0.020102817565202713,
0.028985019773244858,
-0.024176184087991714,
-0.035321369767189026,
-0.014464222826063633,
-0.011569492518901825,
-0.021573755890130997,
-0.049747876822948456,
0.014511368237435818,
0.04280806705355644,
-0.032209768891334534,
0.0510302297770977,
-0.0381312370300293,
-0.06770086288452148,
-0.056084223091602325,
0.04933299496769905,
0.04182744026184082,
-0.04326066002249718,
-0.04050736874341965,
-0.03136115148663521,
0.055593911558389664,
0.038470685482025146,
-0.04544821009039879,
0.0753195658326149,
-0.020838286727666855,
-0.012436969205737114,
0.05717799812555313,
0.006454211659729481,
-0.0031941039487719536,
-0.056951697915792465,
0.04224231839179993,
-0.005982757080346346,
0.028400417417287827,
0.04808835685253143,
0.04869181662797928,
-0.0442412868142128,
-0.02511909417808056,
0.0261940099298954,
-0.016887499019503593,
-0.007425407879054546,
0.10892483592033386,
-0.018169855698943138,
-0.060534752905368805,
0.0641932412981987,
0.0013271443312987685,
0.013342161662876606,
-0.04473159834742546,
0.0006181946373544633,
-0.03343554958701134,
-0.001027770689688623,
0.012399252504110336,
0.029154743999242783,
-0.005978042725473642,
0.014530226588249207,
0.02332756668329239
] |
52,276 |
flexget.manager
|
_add_tray_icon_items
| null |
def _add_tray_icon_items(self, tray_icon: 'TrayIcon'):
tray_icon.add_menu_item(text='Shutdown', action=self.shutdown, index=2)
tray_icon.add_menu_item(text='Reload Config', action=self.load_config, index=3)
tray_icon.add_menu_separator(index=4)
|
(self, tray_icon: 'TrayIcon')
|
[
-0.02111666277050972,
0.027787936851382256,
0.07108794152736664,
-0.061252787709236145,
-0.018341485410928726,
-0.0322716124355793,
-0.028655745089054108,
0.0922769233584404,
0.004854301456362009,
0.026630859822034836,
0.051056042313575745,
0.06483249366283417,
0.027697540819644928,
-0.008280334994196892,
-0.039666060358285904,
0.023991277441382408,
-0.006219291128218174,
-0.01057641115039587,
-0.0006644155364483595,
0.005798946600407362,
-0.0035593691281974316,
0.026757415384054184,
0.032289691269397736,
-0.025708813220262527,
0.03275975584983826,
0.07455917447805405,
-0.07824736088514328,
0.007109698373824358,
0.052610863000154495,
-0.09292778372764587,
-0.01853131875395775,
-0.03742422163486481,
-0.0339529924094677,
-0.003981973510235548,
0.006363925989717245,
0.03366371989250183,
-0.013324469327926636,
0.0019141496159136295,
0.07954907417297363,
0.07824736088514328,
0.07347441464662552,
-0.027552906423807144,
0.013993404805660248,
-0.03843666613101959,
0.0143640311434865,
0.016551630571484566,
0.004144687671214342,
0.0399191714823246,
0.03335637226700783,
-0.014508666470646858,
-0.010928957723081112,
-0.025311069563031197,
0.07774113863706589,
0.05590130388736725,
-0.01105551328510046,
0.022689566016197205,
0.01525895856320858,
-0.030210567638278008,
-0.005107412114739418,
0.013441985473036766,
0.020339252427220345,
0.025528021156787872,
0.027842175215482712,
-0.03163883462548256,
0.04071466252207756,
-0.011570774018764496,
-0.04631925746798515,
-0.013478144071996212,
-0.014273635111749172,
0.030572155490517616,
-0.0036994838155806065,
-0.002919812686741352,
-0.056154415011405945,
-0.05485270172357559,
0.0036994838155806065,
-0.02115282230079174,
-0.013740294612944126,
-0.02485908567905426,
-0.01103743351995945,
0.026395829394459724,
-0.018160691484808922,
-0.013939167372882366,
-0.01093799713999033,
0.09813462942838669,
0.03051791712641716,
-0.018314365297555923,
0.0030576675198972225,
0.0015062346355989575,
-0.013252152130007744,
-0.006617036648094654,
-0.00023884496476966888,
-0.03577900305390358,
0.004458815790712833,
-0.0421610102057457,
-0.047078587114810944,
-0.038183555006980896,
0.005767307709902525,
-0.05170689895749092,
-0.016759542748332024,
-0.01193236093968153,
0.0042554233223199844,
-0.08323726058006287,
0.005893863271921873,
-0.03406146541237831,
-0.00989843625575304,
-0.0846836045384407,
0.006797830108553171,
-0.05279165878891945,
-0.05481654405593872,
0.029035411775112152,
-0.002213588450103998,
-0.020773155614733696,
0.005351482890546322,
0.01637987792491913,
-0.027281716465950012,
0.03724342957139015,
-0.012095075100660324,
-0.05076677352190018,
0.06432627141475677,
-0.017627350986003876,
-0.020935868844389915,
0.030933741480112076,
0.05199616774916649,
0.030445599928498268,
-0.025039879605174065,
0.015521109104156494,
-0.043173450976610184,
0.04212484881281853,
0.0006937944563105702,
0.04151015356183052,
-0.01880250871181488,
-0.028655745089054108,
-0.06772518903017044,
0.00022429674572777003,
0.058070823550224304,
-0.04979048669338226,
0.011444219388067722,
0.034278418868780136,
0.055756669491529465,
0.03912368044257164,
-0.01696745492517948,
0.023882800713181496,
-0.07191959023475647,
0.04151015356183052,
-0.03865361958742142,
0.00898542907088995,
-0.03868977725505829,
0.01673242449760437,
-0.019254490733146667,
-0.09162607043981552,
-0.0736190527677536,
0.011787726543843746,
-0.10044878721237183,
0.01420131791383028,
0.03764117509126663,
-0.017708707600831985,
-0.015991171821951866,
-0.031693074852228165,
0.05174305662512779,
-0.016316600143909454,
-0.020845472812652588,
-0.021134741604328156,
0.013875889591872692,
-0.003740162355825305,
-0.06993086636066437,
0.020610442385077477,
0.053406354039907455,
0.016208123415708542,
0.017509834840893745,
0.06132510304450989,
0.012095075100660324,
-0.03469424322247505,
-0.007507443893700838,
-0.02601616270840168,
-0.028728062286973,
-0.011489417403936386,
-0.03988301381468773,
-0.03717111051082611,
0.022219503298401833,
-0.009545888751745224,
-0.03031904436647892,
-0.0007005742518231273,
-0.018513238057494164,
0.0015661224024370313,
-0.012990002520382404,
-0.025799211114645004,
0.012293947860598564,
0.024642134085297585,
-0.01133574265986681,
-0.011814845725893974,
0.021586725488305092,
0.025763051584362984,
-0.022798040881752968,
0.029867060482501984,
0.009916515089571476,
0.011860043741762638,
0.010250982828438282,
-0.021098583936691284,
0.009093905799090862,
-0.034169942140579224,
-0.01900138147175312,
0.06873763352632523,
-0.006300648208707571,
0.01340582687407732,
0.028474953025579453,
-0.041690945625305176,
-0.007177495863288641,
-0.04505370184779167,
0.003896096721291542,
0.04176326468586922,
-0.02287035807967186,
0.04574071615934372,
-0.017952779307961464,
-0.02793257310986519,
-0.07521003484725952,
0.036032114177942276,
-0.005997819360345602,
0.012022757902741432,
-0.0128092085942626,
-0.005898382980376482,
-0.020736997947096825,
0.03294054791331291,
-0.0625545009970665,
0.008944750763475895,
-0.001069505698978901,
0.047910235822200775,
0.0325789600610733,
0.049862805753946304,
0.04660852625966072,
0.009907475672662258,
-0.002565005561336875,
-0.0040655904449522495,
0.02955971285700798,
-0.008845314383506775,
-0.07141337543725967,
0.0007875810260884464,
0.008795596659183502,
-0.046680841594934464,
0.006662234663963318,
0.04548760503530502,
-0.009889395907521248,
-0.012293947860598564,
0.03962990269064903,
-0.005563915241509676,
-0.0016271400963887572,
0.018712110817432404,
-0.029541632160544395,
-0.0006632856093347073,
-0.03138572350144386,
0.004885940346866846,
0.02247261255979538,
0.012872486375272274,
-0.0022022889461368322,
-0.003722083056345582,
0.009654364548623562,
0.01999574340879917,
-0.006865627598017454,
-0.01876634918153286,
-0.0024994679260998964,
-0.046355415135622025,
0.055756669491529465,
0.03959374502301216,
0.032922469079494476,
-0.004876900464296341,
-0.026920128613710403,
0.005685950629413128,
-0.005952620878815651,
0.011073592118918896,
-0.022092947736382484,
-0.006092736031860113,
0.10543867945671082,
0.028257999569177628,
-0.020736997947096825,
0.027480589225888252,
0.003959374502301216,
0.01873019151389599,
0.006183132529258728,
-0.05836009234189987,
-0.08374347537755966,
-0.06689354032278061,
-0.029740504920482635,
0.016280440613627434,
-0.022056788206100464,
0.012257789261639118,
-0.029903220012784004,
-0.017708707600831985,
0.034043386578559875,
0.031458042562007904,
-0.03138572350144386,
-0.00938317459076643,
0.052574705332517624,
0.07000318169593811,
-0.014888332225382328,
0.02283420041203499,
0.02247261255979538,
-0.011814845725893974,
-0.06457938253879547,
0.043643515557050705,
0.017301922664046288,
0.018034135922789574,
-0.0407869778573513,
-0.011064552702009678,
-0.03648409619927406,
-0.07629479467868805,
0.04187173768877983,
0.07087099552154541,
0.05445495620369911,
0.04122088477015495,
0.010386577807366848,
0.017898540943861008,
0.07940443605184555,
-0.012601296417415142,
0.005893863271921873,
-0.034965433180332184,
-0.0030328084249049425,
0.020013824105262756,
0.006797830108553171,
0.000927130866330117,
0.02330426312983036,
0.028493031859397888,
-0.017139209434390068,
0.04096777364611626,
-0.07242581248283386,
-0.03577900305390358,
0.03661065176129341,
-0.03829203173518181,
-0.0033469367772340775,
-0.007046420592814684,
-0.01328831072896719,
-0.016027329489588737,
0.031204931437969208,
0.011209188029170036,
-0.013857809826731682,
-0.006580878049135208,
0.021604804322123528,
0.03677336871623993,
0.006797830108553171,
0.048778045922517776,
-0.030572155490517616,
-0.012547058053314686,
-0.03299478441476822,
0.0370626375079155,
-0.008230617269873619,
0.03346484899520874,
-0.0021175420843064785,
-0.02776985801756382,
0.03612251207232475,
0.026757415384054184,
-0.046789318323135376,
0.021442091092467308,
-0.025509942322969437,
0.02693820931017399,
-0.02936084009706974,
0.017618311569094658,
0.005930021870881319,
0.014011484570801258,
-0.012239709496498108,
-0.0922769233584404,
0.026992447674274445,
0.036357540637254715,
0.03724342957139015,
0.05271933972835541,
0.00600685877725482,
0.0007469025440514088,
-0.03525470197200775,
-0.04624693840742111,
0.0962543785572052,
0.014354991726577282,
0.06363926082849503,
-0.015584386885166168,
0.048705726861953735,
0.033247895538806915,
0.03700839728116989,
0.015313196927309036,
0.0351281464099884,
0.03861745819449425,
-0.001342390663921833,
0.012040836736559868,
-0.06150589883327484,
-0.05253854766488075,
0.0014000184601172805,
-0.04425821080803871,
0.001563862431794405,
0.02075507678091526,
0.03494735434651375,
0.020809315145015717,
0.058902472257614136,
-0.0022915557492524385,
0.017826223745942116,
-0.00040283019188791513,
0.007936827838420868,
0.002169520128518343,
0.03518238663673401,
0.01836860366165638,
0.008497287519276142,
-0.03836434707045555,
-0.004989896435290575,
0.021894074976444244,
0.005369562655687332,
0.006345846690237522,
0.02429862506687641,
-0.014219396747648716,
0.009735722094774246,
-0.04310113564133644,
0.043643515557050705,
-0.0033175579737871885,
-0.07875358313322067,
-0.017139209434390068,
-0.0182510893791914,
-0.054201845079660416,
0.024732530117034912,
0.02813144586980343,
0.0018847706960514188,
-0.017139209434390068,
-0.0024135911371558905,
-0.007163936272263527,
0.010332339443266392,
0.0091255446895957,
0.028022969141602516,
-0.025491861626505852,
-0.038111235946416855,
0.009111984632909298,
0.002436190377920866,
0.0112543860450387,
0.012556098401546478,
-0.023720087483525276,
0.004583111498504877,
0.017265764996409416,
-0.018178770318627357,
-0.03294054791331291,
0.03055407665669918,
0.0379304438829422,
0.0018327925354242325,
0.035435497760772705,
0.012104114517569542,
0.009428373537957668,
0.026486225426197052,
-0.06776134669780731,
-0.04494522511959076,
0.026956288143992424,
0.0000780377522460185,
0.0016022810013964772,
0.018947143107652664,
0.023738166317343712,
0.005636232439428568,
0.023213865235447884,
-0.05586514621973038,
0.007561681792140007,
0.08511751145124435,
0.005170689895749092,
-0.06645963340997696,
-0.02645006589591503,
-0.011245346628129482,
0.0015774219064041972,
0.04346271976828575,
-0.039738379418849945,
-0.005509677343070507,
0.01721152663230896,
-0.0175640732049942,
0.012836327776312828,
0.029415078461170197,
0.005514197051525116,
-0.04689779505133629,
-0.028908856213092804,
0.014237476512789726,
-0.05680527165532112,
-0.043173450976610184,
0.002913032891228795,
0.0362490676343441,
0.026395829394459724,
0.03138572350144386,
0.05553971603512764,
0.0016271400963887572,
-0.017681589350104332,
0.08135700970888138,
0.01135382242500782,
0.020339252427220345,
0.019019460305571556,
-0.07680101692676544,
-0.022382216528058052,
0.04194405674934387,
-0.01408380176872015,
0.018459001556038857,
0.009554928168654442,
-0.026468146592378616,
-0.044764433056116104,
0.012782089412212372,
-0.026594702154397964,
0.03789428621530533,
-0.03198234364390373,
-0.01204987708479166,
-0.021405931562185287,
-0.06349462270736694,
0.0623013861477375,
0.11469530314207077,
-0.023412737995386124,
-0.015042006969451904,
-0.03565244749188423,
0.002635063137859106,
-0.007249813061207533,
0.047187063843011856,
-0.01358661986887455,
-0.007295011542737484,
0.03431457653641701,
-0.026323512196540833,
0.03865361958742142,
-0.04002764821052551,
-0.058902472257614136,
-0.0286015085875988,
-0.033446770161390305,
0.023394659161567688,
-0.022382216528058052,
-0.024732530117034912,
-0.04198021441698074,
0.003116425359621644,
-0.03505583107471466,
-0.022852279245853424,
0.051417626440525055,
0.08229713141918182,
0.010223863646388054,
-0.021731359884142876,
0.012556098401546478,
-0.022581089287996292,
-0.05253854766488075,
0.00352547038346529,
-0.017835263162851334,
-0.026594702154397964,
0.02482292614877224,
-0.020013824105262756,
0.04577687755227089,
-0.02079123444855213,
0.020086141303181648,
0.006079176440834999,
-0.06410931795835495,
-0.01593693345785141,
0.0012960623716935515,
-0.026703177019953728,
-0.0339529924094677,
0.03406146541237831,
-0.030987979844212532,
0.03821971267461777,
-0.005026055034250021,
0.027281716465950012,
-0.09531424939632416,
-0.004375198855996132,
0.000013638951713801362,
0.010097308084368706,
-0.018341485410928726,
-0.00812666118144989,
0.006047537550330162,
-0.044475164264440536,
0.007769593968987465,
-0.005988779477775097,
0.021225139498710632,
-0.029180046170949936,
-0.01037753839045763,
-0.014617142267525196,
-0.04136551916599274,
0.04848877713084221,
0.0671466514468193,
-0.04067850485444069,
0.026106558740139008,
-0.024370944127440453,
0.0017107570311054587,
-0.016940336674451828,
-0.010531212203204632,
-0.048380300402641296,
0.035435497760772705,
-0.007195575162768364,
0.03469424322247505,
-0.03125917166471481,
-0.040533870458602905,
-0.036954160779714584,
-0.034043386578559875,
-0.07962138950824738,
-0.05901094898581505,
0.059589486569166183,
0.00840689055621624,
0.01976071298122406,
-0.05875783786177635,
-0.04031691700220108,
0.09285546094179153,
-0.02362969145178795,
-0.045162178575992584,
0.041654787957668304,
-0.030391361564397812,
-0.00006882152956677601,
0.025148354470729828,
-0.03525470197200775,
0.0029763104394078255,
-0.0015480429865419865,
0.016316600143909454,
-0.019218333065509796,
-0.02099010720849037,
0.02429862506687641,
-0.009997871704399586,
0.08106774091720581,
0.008013664744794369,
-0.06573645770549774,
0.03843666613101959,
0.007534562610089779,
0.0038124797865748405,
-0.0027367593720555305,
0.009274698793888092,
0.041257042437791824,
-0.006983143277466297,
0.022599168121814728,
-0.0721365436911583,
-0.07875358313322067,
0.037785809487104416,
0.023195786401629448,
-0.003821519436314702,
0.028257999569177628,
0.08540678024291992,
-0.012067955918610096,
-0.021731359884142876,
0.011091671884059906,
-0.06103583425283432,
0.05503349378705025,
0.03612251207232475,
-0.08092310279607773,
-0.02174944058060646,
-0.033446770161390305,
-0.03999148681759834,
0.0034644524566829205,
-0.056949906051158905,
-0.01195044070482254,
0.02529298886656761,
0.03883441165089607,
-0.0003019814030267298,
0.006983143277466297,
-0.0193991269916296,
0.03223545476794243,
-0.030192488804459572,
0.025907685980200768,
-0.003059927374124527,
-0.027119001373648643,
-0.01027810201048851,
-0.001459906343370676,
-0.03677336871623993,
0.021008187904953957,
-0.017952779307961464,
-0.030933741480112076,
0.034603845328092575,
0.024768687784671783,
-0.025943845510482788,
-0.005685950629413128,
-0.033247895538806915,
-0.03275975584983826,
-0.02402743510901928,
0.02191215381026268,
-0.0705094039440155,
-0.06338614970445633,
0.07839199900627136,
-0.06334999203681946,
0.010395617224276066,
-0.006264489609748125,
-0.009473571553826332,
-0.0026260234881192446,
-0.02028501406311989,
0.026305431500077248,
-0.0225087720900774,
-0.03203658014535904,
0.06208443641662598,
0.08670848608016968,
-0.060421135276556015,
-0.0012463441817089915,
0.05373178422451019,
0.017979897558689117,
-0.05101988464593887,
0.11657555401325226,
-0.036321382969617844,
0.03353716433048248,
0.00852892640978098,
0.027950651943683624,
0.016877058893442154,
-0.017383281141519547,
0.05384025722742081,
0.07390832155942917,
0.0370626375079155,
-0.0962543785572052,
-0.03782196715474129,
-0.03585132211446762,
0.008040783926844597,
0.03174731135368347,
0.028059126809239388,
-0.009265659376978874,
0.03447728976607323,
-0.05152610316872597,
0.04234180226922035,
-0.035833243280649185,
-0.022092947736382484,
-0.03717111051082611,
0.051056042313575745,
0.013197914697229862,
-0.005586514249444008,
-0.027751779183745384,
-0.045957669615745544,
0.013270231895148754,
-0.012266828678548336,
0.05626289173960686,
-0.04454747959971428,
0.020501965656876564,
0.011787726543843746,
0.020104220137000084,
-0.04382430762052536,
0.006639635656028986,
-0.0603126622736454,
0.004592150915414095,
0.08895032852888107,
0.010368498973548412,
0.029415078461170197,
0.015629585832357407,
-0.005880303680896759,
-0.03608635067939758,
-0.011597893200814724,
0.030807185918092728,
-0.037351906299591064,
-0.05373178422451019,
-0.04346271976828575,
0.04928426817059517,
0.014409230090677738,
-0.005215887911617756,
0.00557747483253479,
0.012556098401546478,
0.00004915319004794583,
0.00046639033826068044,
-0.003184222849085927,
-0.028547270223498344,
0.01065776776522398,
-0.039376791566610336,
0.014806975610554218,
-0.03912368044257164,
0.06754439324140549,
0.0031548438128083944,
0.009844197891652584,
-0.030734868720173836,
0.019109856337308884,
-0.02621503546833992,
0.0011570773785933852,
0.007362809032201767,
-0.00542832026258111,
0.02330426312983036,
0.017536954954266548,
0.039376791566610336,
-0.05637136474251747,
-0.005541316233575344,
0.0020000264048576355,
-0.007059980183839798,
0.09777304530143738,
0.021803677082061768,
0.02227373979985714,
-0.07709028571844101,
0.015873655676841736,
0.06334999203681946,
0.01617196574807167,
0.050983723253011703,
-0.03353716433048248,
-0.01598213240504265,
0.015394553542137146,
0.07933212071657181,
-0.04997128248214722,
0.05510581284761429,
-0.019272571429610252,
0.08945655077695847,
0.0012474741088226438,
-0.01653355173766613,
-0.005907422862946987
] |
52,277 |
flexget.manager
|
_handle_sigterm
| null |
def _handle_sigterm(self, signum, frame) -> None:
logger.info('Got SIGTERM. Shutting down.')
self.shutdown(finish_queue=False)
|
(self, signum, frame) -> NoneType
|
[
-0.029835820198059082,
0.018696874380111694,
-0.016645437106490135,
0.020136479288339615,
-0.024491285905241966,
-0.03586416691541672,
0.0051330928690731525,
0.03402867168188095,
0.026506733149290085,
-0.00344830472022295,
-0.03132941201329231,
0.005142090376466513,
0.010779045522212982,
-0.07457155734300613,
-0.04088479280471802,
0.00879958737641573,
0.021594081073999405,
-0.02132415398955345,
-0.0028342229779809713,
0.014980893582105637,
-0.03518035635352135,
-0.019704598933458328,
-0.022169923409819603,
-0.01173278409987688,
0.003020921954885125,
-0.009879291988909245,
-0.03321889415383339,
-0.010491124354302883,
-0.005169082898646593,
-0.0035832677967846394,
-0.020658336579799652,
-0.023879453539848328,
-0.006986584980040789,
0.009123498573899269,
-0.028108295053243637,
-0.04164058342576027,
-0.0002569920616224408,
-0.029961787164211273,
0.009798314422369003,
0.06578996777534485,
0.00447852211073041,
-0.008795089088380337,
-0.005609962157905102,
-0.02753245271742344,
0.03269703686237335,
0.020802296698093414,
0.005146589130163193,
0.04099276289343834,
0.037249788641929626,
-0.02407739870250225,
-0.08198552578687668,
-0.019308706745505333,
-0.009483400732278824,
-0.027136560529470444,
0.03201322257518768,
0.040057018399238586,
0.039301227778196335,
0.00634776009246707,
-0.008237241767346859,
-0.014998888596892357,
-0.03334485739469528,
0.0707206130027771,
-0.05780015513300896,
0.024473290890455246,
0.03683590143918991,
-0.035810183733701706,
0.05031420662999153,
0.023825468495488167,
-0.013226374052464962,
-0.019650613889098167,
-0.04250434786081314,
-0.027766387909650803,
-0.027334507554769516,
0.06309070438146591,
0.0072745056822896,
-0.03883335366845131,
-0.0011224423069506884,
-0.03976909816265106,
-0.029997777193784714,
0.031545352190732956,
0.025031138211488724,
0.008507167920470238,
-0.008165261708199978,
0.059779614210128784,
0.027064580470323563,
0.008619637228548527,
0.03969711810350418,
-0.020820291712880135,
-0.06381050497293472,
0.01523282378911972,
-0.0347844660282135,
-0.005920377094298601,
-0.013739233836531639,
0.0464632622897625,
-0.024599255993962288,
-0.0009323693811893463,
-0.0640624389052391,
0.01345131266862154,
-0.02324962615966797,
-0.09011929482221603,
0.040704842656850815,
0.011669800616800785,
0.009402422234416008,
-0.008057291619479656,
-0.0010712688090279698,
0.0422884076833725,
-0.011039973236620426,
-0.04581544175744057,
-0.010446136817336082,
-0.02254781872034073,
0.02409539557993412,
0.04973836615681648,
0.03822152316570282,
-0.007530935574322939,
-0.07824254781007767,
-0.028684137389063835,
0.004456028342247009,
0.0494864359498024,
-0.013667253777384758,
-0.010509119369089603,
0.009429414756596088,
-0.0321211963891983,
0.021738041192293167,
0.0028297242242842913,
-0.04869465157389641,
0.07831452786922455,
0.012956447899341583,
0.030753569677472115,
-0.04736301675438881,
0.10271584242582321,
-0.06377451866865158,
0.05157386139035225,
0.0034820453729480505,
-0.01849892921745777,
0.02263779379427433,
-0.034910429269075394,
0.02629079297184944,
0.0024968155194073915,
0.028450200334191322,
-0.05035019665956497,
0.009996259585022926,
0.012812487781047821,
-0.0035787690430879593,
-0.05646852031350136,
-0.009375429712235928,
0.07917829602956772,
0.030285697430372238,
-0.00310864788480103,
-0.010914008133113384,
-0.04390796273946762,
-0.052761536091566086,
0.061291199177503586,
-0.028522180393338203,
0.06794936954975128,
0.03582817688584328,
0.005807907786220312,
-0.016789397224783897,
0.03525233641266823,
-0.010563104413449764,
0.03656597435474396,
-0.013541287742555141,
-0.04660722240805626,
0.005286050960421562,
-0.09508593380451202,
-0.028000324964523315,
0.01667242869734764,
0.005983359646052122,
0.06830927729606628,
-0.0035922653041779995,
0.021468114107847214,
-0.042036477476358414,
0.023141656070947647,
-0.05312143638730049,
-0.0021189190447330475,
-0.003020921954885125,
0.08536859601736069,
-0.01309141144156456,
0.017527194693684578,
-0.012479579076170921,
-0.010482126846909523,
0.008813084103167057,
-0.08436087518930435,
-0.060499414801597595,
-0.011921731755137444,
-0.014018157497048378,
-0.03120344690978527,
-0.037249788641929626,
-0.012461584061384201,
-0.02533705346286297,
-0.0014744708314538002,
0.003178378799930215,
-0.03338084742426872,
-0.009213474579155445,
-0.02551700547337532,
0.07302398234605789,
0.03114946000277996,
0.04376400262117386,
0.014396053738892078,
0.02123417891561985,
-0.012461584061384201,
0.04696712642908096,
0.020856281742453575,
-0.034316591918468475,
-0.01174178160727024,
0.03760968893766403,
0.031437382102012634,
0.06622184813022614,
0.007706387434154749,
-0.02823426015675068,
-0.018103037029504776,
0.017275264486670494,
-0.030933519825339317,
-0.022907720878720284,
0.030681589618325233,
0.02960188500583172,
-0.002284248825162649,
-0.026740670204162598,
-0.041388653218746185,
-0.0062082982622087,
-0.012533564120531082,
0.019326701760292053,
-0.023141656070947647,
-0.014405051246285439,
-0.004728203639388084,
-0.051285941153764725,
0.04153261333703995,
-0.0022448846139013767,
0.031437382102012634,
0.04941445216536522,
0.0033110922668129206,
-0.04725504666566849,
0.000181637704372406,
-0.00895704422146082,
-0.015322799794375896,
-0.016789397224783897,
0.08277730643749237,
0.037897609174251556,
-0.028684137389063835,
0.05110599100589752,
0.004462776705622673,
-0.01902078650891781,
-0.07608314603567123,
0.04811880737543106,
-0.041388653218746185,
0.0018186264205724,
0.06481823325157166,
0.07309596240520477,
0.034388571977615356,
0.015943629667162895,
0.03485644608736038,
0.0075714243575930595,
0.02128816395998001,
0.009870294481515884,
0.018103037029504776,
0.01307341642677784,
-0.09343038499355316,
0.047830887138843536,
0.0008542033610865474,
0.047039106488227844,
0.015691697597503662,
0.03395669162273407,
-0.01776113174855709,
0.01606059819459915,
0.035720206797122955,
-0.032193176448345184,
-0.023627523332834244,
0.03768166899681091,
-0.013883193954825401,
0.023537548258900642,
-0.010617089457809925,
0.1122172400355339,
-0.07716284692287445,
-0.09040721505880356,
0.0010729558998718858,
-0.019632618874311447,
0.07298798859119415,
-0.02972785010933876,
0.006014850921928883,
-0.05448906123638153,
-0.013280359096825123,
0.04480771720409393,
0.015871649608016014,
0.0718722939491272,
-0.0036844899877905846,
-0.03390270471572876,
0.03177928924560547,
0.05445307120680809,
-0.0003008550265803933,
0.00363500346429646,
-0.03518035635352135,
-0.050530146807432175,
0.005663947202265263,
0.010500121861696243,
0.03973310813307762,
0.03116745688021183,
-0.0005049865576438606,
-0.05790812522172928,
-0.015349792316555977,
0.0058304015547037125,
0.03832949325442314,
0.0058304015547037125,
0.007841350510716438,
-0.030159732326865196,
0.003740724641829729,
-0.04322415217757225,
0.011633810587227345,
0.07493145763874054,
-0.0002637401921674609,
0.03840147331357002,
0.01988454908132553,
0.01551174744963646,
0.04660722240805626,
-0.02337559126317501,
-0.003155884798616171,
-0.06337862461805344,
0.07046867907047272,
-0.01448602881282568,
-0.019236726686358452,
-0.021036233752965927,
0.03539629653096199,
-0.011534838005900383,
-0.038509443402290344,
0.011768774129450321,
-0.021594081073999405,
0.044951677322387695,
0.009834304451942444,
-0.024437300860881805,
-0.020280441269278526,
0.018085042014718056,
-0.06251486390829086,
-0.010689069516956806,
0.016384508460760117,
0.0042265914380550385,
-0.042072467505931854,
0.042864248156547546,
-0.07457155734300613,
-0.0027757391799241304,
0.0061858044937253,
-0.052077725529670715,
-0.042828258126974106,
-0.0511779710650444,
-0.0022032710257917643,
0.010122225619852543,
-0.016492478549480438,
0.0627308040857315,
0.024239355698227882,
-0.014710967428982258,
-0.023807473480701447,
0.06622184813022614,
-0.013712241314351559,
0.013235371559858322,
-0.016843382269144058,
-0.005380525253713131,
0.021432124078273773,
-0.032876987010240555,
-0.004755196627229452,
-0.00654570572078228,
0.0166364386677742,
-0.004237838089466095,
0.01765315979719162,
0.0163035299628973,
0.002528306795284152,
-0.004368302412331104,
-0.00826423428952694,
-0.02189999632537365,
-0.009393424727022648,
-0.10026851296424866,
0.017194285988807678,
-0.019542641937732697,
0.0493064820766449,
-0.011354886926710606,
0.016096588224172592,
-0.032984957098960876,
0.022349873557686806,
-0.0008890687604434788,
0.02326762117445469,
0.021810021251440048,
-0.02267378382384777,
-0.028486190363764763,
-0.004572996404021978,
0.037753649055957794,
-0.005169082898646593,
-0.027082575485110283,
-0.07939423620700836,
-0.027874357998371124,
0.00586639204993844,
-0.038005582988262177,
0.011480852961540222,
0.017383234575390816,
-0.051249951124191284,
-0.030285697430372238,
0.006001354660838842,
0.07536333799362183,
-0.02960188500583172,
0.01606059819459915,
-0.03969711810350418,
-0.03539629653096199,
-0.01565570756793022,
0.03271503001451492,
0.06910105794668198,
-0.08162562549114227,
0.06838125735521317,
-0.0468231625854969,
-0.024545270949602127,
0.09803712368011475,
0.02477920800447464,
0.0030321688391268253,
-0.0860884040594101,
0.06543006002902985,
-0.03240911662578583,
0.010113227181136608,
0.008219246752560139,
0.03188725933432579,
-0.016780400648713112,
-0.01742822304368019,
-0.004912653472274542,
0.08011403679847717,
-0.03392070159316063,
0.026650693267583847,
0.04387197270989418,
-0.013991164974868298,
0.04891059175133705,
0.02128816395998001,
-0.009852299466729164,
-0.027190545573830605,
0.010500121861696243,
-0.0359361469745636,
0.012182660400867462,
0.009384427219629288,
-0.02346556819975376,
-0.06596991419792175,
0.034946419298648834,
-0.037897609174251556,
0.014288082718849182,
-0.006761646363884211,
0.031563349068164825,
-0.03053762950003147,
0.003742974018678069,
-0.010230195708572865,
-0.002277500694617629,
-0.01921873167157173,
-0.015889644622802734,
-0.003014173824340105,
-0.009879291988909245,
0.08205750584602356,
-0.00671216007322073,
0.03667394816875458,
-0.017698148265480995,
0.008750101551413536,
0.004710208624601364,
-0.06377451866865158,
-0.03305693715810776,
-0.049954306334257126,
-0.004723704885691404,
0.012821485288441181,
-0.0034258109517395496,
-0.007211523130536079,
0.00776037247851491,
-0.010653079487383366,
-0.033002953976392746,
-0.03305693715810776,
0.02272776886820793,
-0.00670766131952405,
0.019992519170045853,
0.01975858397781849,
0.05877188965678215,
0.04120870307087898,
-0.04649925231933594,
-0.0069281007163226604,
0.03341684117913246,
0.0056594484485685825,
0.07824254781007767,
0.01555673498660326,
-0.03814954310655594,
-0.004255833104252815,
-0.022043956443667412,
-0.002267378382384777,
-0.0052365646697580814,
-0.04372801259160042,
0.003086153883486986,
0.005848396569490433,
-0.020316431298851967,
0.06496219336986542,
-0.00834521185606718,
-0.03271503001451492,
-0.0033065935131162405,
0.02046039141714573,
-0.04117271304130554,
0.0669056624174118,
0.011570828035473824,
-0.02411339059472084,
-0.043440092355012894,
0.0003731164615601301,
0.014962898567318916,
0.08220146596431732,
-0.06355857849121094,
-0.05524485558271408,
0.013325346633791924,
0.036350034177303314,
-0.025876905769109726,
-0.015259817242622375,
-0.03392070159316063,
-0.01580866612493992,
-0.0029399441555142403,
-0.004849670454859734,
-0.04469974711537361,
-0.0029309464152902365,
0.006478223949670792,
0.00846667867153883,
-0.038509443402290344,
-0.04372801259160042,
-0.013640260323882103,
0.04012899845838547,
-0.024167375639081,
0.03179728239774704,
-0.016663432121276855,
-0.04178454726934433,
-0.048586681485176086,
0.0581960454583168,
0.044375836849212646,
-0.02488717809319496,
-0.02546302042901516,
0.06449431926012039,
0.02688463032245636,
0.04322415217757225,
0.00008554686064599082,
0.03901330381631851,
0.0326070599257946,
-0.005519986618310213,
0.05610862001776695,
-0.02195398136973381,
0.02348356321454048,
-0.016348518431186676,
0.0047776903957128525,
-0.01739223301410675,
0.047722917050123215,
-0.04754296690225601,
-0.08184156566858292,
-0.029152007773518562,
-0.028720127418637276,
-0.04174855351448059,
-0.012587549164891243,
0.012299627996981144,
-0.012803490273654461,
-0.033002953976392746,
-0.0024023414589464664,
-0.05038618668913841,
0.042072467505931854,
0.025283068418502808,
-0.017455214634537697,
0.01238060649484396,
0.0422884076833725,
0.08522463589906693,
0.001552074565552175,
-0.049846336245536804,
0.02324962615966797,
0.032840996980667114,
0.0361161008477211,
0.02200796641409397,
-0.009312447160482407,
-0.039409197866916656,
0.034334588795900345,
0.07493145763874054,
-0.01606059819459915,
0.03626006096601486,
0.013703243806958199,
-0.09019127488136292,
0.04012899845838547,
-0.03264304995536804,
-0.016465486958622932,
-0.03312891721725464,
-0.06445833295583725,
-0.029313964769244194,
-0.03125743195414543,
-0.01375722885131836,
0.02684864029288292,
0.0536612905561924,
0.024437300860881805,
-0.05322940647602081,
0.004276077728718519,
0.026074852794408798,
-0.007647903636097908,
-0.03872538357973099,
-0.0254990104585886,
-0.04020097851753235,
0.03742973878979683,
0.055604755878448486,
-0.025930890813469887,
-0.06967689841985703,
0.029997777193784714,
-0.0037519715260714293,
0.06435035914182663,
-0.0045617492869496346,
-0.07244814187288284,
0.012272635474801064,
0.07151239365339279,
0.018139027059078217,
0.007701888680458069,
0.03311092406511307,
-0.002809479832649231,
0.006766145117580891,
0.01378422137349844,
0.038545433431863785,
-0.001896230154670775,
-0.007643404882401228,
0.0022280141711235046,
0.02193598635494709,
0.044375836849212646,
0.03039366751909256,
-0.004354806151241064,
-0.06596991419792175,
0.01849892921745777,
0.06417040526866913,
0.08853572607040405,
-0.0030029267072677612,
0.01453101634979248,
0.006437735166400671,
-0.03347082436084747,
0.023591533303260803,
0.05531683564186096,
-0.002012073528021574,
-0.01615956984460354,
0.0124165965244174,
-0.012632536701858044,
0.0029714354313910007,
-0.0030434157233685255,
-0.003715981263667345,
0.04239637777209282,
-0.047183066606521606,
-0.03588216379284859,
-0.0009104378987103701,
-0.01658245362341404,
-0.010671074502170086,
-0.019326701760292053,
0.019380686804652214,
0.06748150289058685,
-0.06348659843206406,
0.02823426015675068,
-0.07838651537895203,
0.03312891721725464,
0.004060137085616589,
-0.001552074565552175,
-0.051897771656513214,
0.007661399897187948,
-0.003086153883486986,
0.009636358357965946,
-0.013622265309095383,
0.007850348018109798,
0.001368749770335853,
0.0007715384708717465,
0.04743499681353569,
0.018876824527978897,
-0.049054551869630814,
0.01975858397781849,
0.00758941937237978,
-0.03465849906206131,
0.027946339920163155,
0.0029669366776943207,
0.00878159236162901,
0.06172307953238487,
0.024329330772161484,
-0.01726626604795456,
0.022295888513326645,
0.00634776009246707,
0.014962898567318916,
-0.0086061405017972,
-0.039409197866916656,
-0.010617089457809925,
-0.00705856503918767,
-0.011291904374957085,
0.06165109947323799,
-0.039337217807769775,
-0.04196449741721153,
-0.007634407375007868,
-0.04610336199402809,
0.054920945316553116,
0.02058635652065277,
-0.01416211761534214,
0.04027295857667923,
-0.02333960123360157,
0.03041166253387928,
0.008655627258121967,
-0.030213717371225357,
-0.02118019387125969,
0.0661858543753624,
0.00447852211073041,
0.00757592311128974,
-0.0033448331523686647,
-0.053301386535167694,
-0.04977435618638992,
0.0013046422973275185,
-0.031509362161159515,
-0.06589793413877487,
-0.006482722703367472,
-0.09299850463867188,
0.04613935202360153,
-0.030699584633111954,
-0.06251486390829086,
0.02688463032245636,
-0.03467649221420288,
0.022421853616833687,
0.028090300038456917,
0.016735412180423737,
0.03030369244515896,
0.021540096029639244,
0.04401593282818794,
0.009564378298819065,
-0.02267378382384777,
0.0303396824747324,
0.03606211394071579,
-0.007728881202638149,
-0.035000406205654144,
-0.009582373313605785,
0.037861619144678116,
0.012020704336464405,
0.03282300382852554,
-0.08428889513015747,
-0.02827025018632412,
0.06740952283143997,
-0.0016870375256985426,
-0.04505964741110802,
-0.01921873167157173,
-0.005650450941175222,
0.00790433306246996,
-0.007800861727446318,
-0.07536333799362183,
0.01986655406653881,
0.049090541899204254,
0.017122305929660797,
0.03984107822179794,
-0.05387723073363304,
-0.025930890813469887,
-0.00878159236162901,
0.03253507986664772,
-0.04236038774251938,
-0.0640624389052391,
0.025085123255848885,
0.028342230245471,
0.043548062443733215,
0.03919325768947601,
0.005007127299904823,
-0.07845849543809891,
0.017239274457097054,
0.03764567896723747,
0.13467508554458618,
-0.0058753895573318005,
-0.07550729811191559,
0.05042217671871185,
0.0004822115588467568,
0.0162135548889637,
0.02407739870250225,
-0.013739233836531639,
0.009366432204842567,
-0.0275864377617836,
-0.03311092406511307,
-0.023123661056160927,
-0.0268306452780962,
-0.017383234575390816,
-0.01813003048300743,
0.03534231334924698,
0.04092078283429146,
-0.016384508460760117,
-0.007472451776266098,
-0.02395143359899521,
0.0653940737247467,
0.019992519170045853,
0.016519472002983093,
-0.012245642952620983
] |
52,278 |
flexget.manager
|
_init_config
|
Find and load the configuration file.
:param bool create: If a config file is not found, and create is True, one will be created in the home folder
:raises: `OSError` when no config file could be found, and `create` is False.
|
def _init_config(self, create: bool = False) -> None:
"""
Find and load the configuration file.
:param bool create: If a config file is not found, and create is True, one will be created in the home folder
:raises: `OSError` when no config file could be found, and `create` is False.
"""
home_path = os.path.join(os.path.expanduser('~'), '.flexget')
options_config = os.path.expanduser(self.options.config)
possible = []
if os.path.isabs(options_config):
# explicit path given, don't try anything
config = options_config
possible = [config]
else:
logger.debug('Figuring out config load paths')
try:
possible.append(os.getcwd())
except OSError:
logger.debug('current directory invalid, not searching for config there')
# for virtualenv / dev sandbox
if hasattr(sys, 'real_prefix'):
logger.debug('Adding virtualenv path')
possible.append(sys.prefix)
# normal lookup locations
possible.append(home_path)
if sys.platform.startswith('win'):
# On windows look in ~/flexget as well, as explorer does not let you create a folder starting with a dot
home_path = os.path.join(os.path.expanduser('~'), 'flexget')
possible.append(home_path)
else:
# The freedesktop.org standard config location
xdg_config = os.environ.get(
'XDG_CONFIG_HOME', os.path.join(os.path.expanduser('~'), '.config')
)
possible.append(os.path.join(xdg_config, 'flexget'))
for path in possible:
config = os.path.join(path, options_config)
if os.path.exists(config):
logger.debug('Found config: {}', config)
break
else:
config = None
if create and not (config and os.path.exists(config)):
config = os.path.join(home_path, options_config)
logger.info('Config file {} not found. Creating new config {}', options_config, config)
with open(config, 'w') as newconfig:
# Write empty tasks to the config
newconfig.write(yaml.dump({'tasks': {}}))
elif not config:
logger.critical('Failed to find configuration file {}', options_config)
logger.info('Tried to read from: {}', ', '.join(possible))
raise OSError('No configuration file found.')
if not os.path.isfile(config):
raise OSError(f'Config `{config}` does not appear to be a file.')
logger.debug('Config file {} selected', config)
self.config_path = config
self.config_name = os.path.splitext(os.path.basename(config))[0]
self.config_base = os.path.normpath(os.path.dirname(config))
self.lockfile = os.path.join(self.config_base, f'.{self.config_name}-lock')
self.db_filename = os.path.join(self.config_base, f'db-{self.config_name}.sqlite')
|
(self, create: bool = False) -> NoneType
|
[
0.08439041674137115,
-0.04969746246933937,
0.008325912989675999,
-0.02727009356021881,
0.0019313835073262453,
-0.005765620153397322,
-0.0065793562680482864,
0.026853300631046295,
-0.023638049140572548,
-0.07188666611909866,
-0.0011052425252273679,
-0.03457387164235115,
-0.036459360271692276,
0.011183913797140121,
0.01001292746514082,
0.026178495958447456,
0.006832408718764782,
0.033879220485687256,
-0.009204152040183544,
-0.020363256335258484,
0.034196775406599045,
-0.02844107896089554,
-0.017872430384159088,
0.033164720982313156,
0.03969445824623108,
0.013019782491028309,
0.02451132796704769,
0.000990500790067017,
0.053746297955513,
-0.011183913797140121,
-0.0103900246322155,
0.0634317472577095,
0.022725077345967293,
0.03564562276005745,
0.011402233503758907,
-0.0024288047570735216,
0.05807299166917801,
0.05366690829396248,
-0.003798263380303979,
-0.013238102197647095,
-0.00494444090873003,
-0.029512830078601837,
0.07605458050966263,
-0.01551060937345028,
0.004669060464948416,
0.023558661341667175,
-0.07339505106210709,
0.03685630485415459,
-0.016582360491156578,
0.0268731489777565,
0.028996801003813744,
0.020700659602880478,
-0.04346543177962303,
0.04525168240070343,
-0.059422604739665985,
0.005864856299012899,
0.012980087660253048,
0.006609127391129732,
0.044021155685186386,
-0.0051106614992022514,
0.015957172960042953,
0.03310517966747284,
0.009427433833479881,
0.009114840067923069,
-0.028957108035683632,
-0.041560098528862,
-0.06033557653427124,
-0.01325794868171215,
0.03264869004487991,
0.0014972253702580929,
0.017931971698999405,
0.03471280261874199,
-0.019440360367298126,
-0.06966377049684525,
0.07855533063411713,
0.014736567623913288,
-0.027428871020674706,
-0.027865510433912277,
0.010955670848488808,
-0.0014364431845024228,
-0.00988888181746006,
0.008901482447981834,
-0.015848012641072273,
-0.03205327317118645,
0.04699824005365372,
0.07482405006885529,
0.060454659163951874,
0.010568649508059025,
0.06470196694135666,
-0.01851746439933777,
0.020343409851193428,
0.033303651958703995,
0.013029705733060837,
0.060137104243040085,
0.03274792805314064,
-0.07148972153663635,
-0.004088529385626316,
-0.017018998041749,
-0.0010320559376850724,
-0.0004378794983495027,
-0.03002885729074478,
-0.03743187338113785,
-0.01752510294318199,
-0.06835385411977768,
0.003051511477679014,
-0.0576760470867157,
-0.03580440208315849,
0.027607494965195656,
0.0059938631020486355,
-0.01074727438390255,
-0.11328798532485962,
-0.043902069330215454,
-0.0010463211219757795,
-0.014935039915144444,
0.006688516121357679,
0.030247177928686142,
0.0069862245582044125,
0.03608226403594017,
0.02981053851544857,
-0.027289940044283867,
0.006678592413663864,
0.04152040183544159,
0.0053438665345311165,
-0.016919761896133423,
0.05033257231116295,
0.04596618190407753,
-0.01572892814874649,
-0.010796892456710339,
0.06311418861150742,
0.00867323949933052,
0.06041496619582176,
0.018894562497735023,
-0.00519501231610775,
-0.042790625244379044,
0.006837370339781046,
-0.02002585493028164,
-0.01583808846771717,
0.023955605924129486,
-0.004353985656052828,
0.028857871890068054,
0.01121368445456028,
-0.04001201316714287,
-0.026138801127672195,
-0.030981523916125298,
-0.04354482144117355,
0.03673722222447395,
-0.00007260519487317652,
-0.01952967420220375,
-0.024173924699425697,
0.05287301912903786,
0.0501737967133522,
-0.04414023831486702,
-0.10733381658792496,
-0.012563295662403107,
0.004830319434404373,
0.0562470480799675,
-0.04894326627254486,
0.012196122668683529,
-0.018785402178764343,
0.03278762102127075,
-0.023638049140572548,
0.007646144833415747,
0.013783900998532772,
0.007278971374034882,
-0.0562470480799675,
-0.01819990947842598,
-0.04806998744606972,
-0.013506039045751095,
0.012920546345412731,
-0.009660638868808746,
-0.006872103083878756,
0.021395312622189522,
-0.05080890655517578,
-0.0041455901227891445,
0.0182693749666214,
-0.0001871531712822616,
0.02278461866080761,
-0.053944770246744156,
0.013009858317673206,
-0.029433440417051315,
-0.0433463491499424,
-0.026099106296896935,
0.01568923518061638,
0.013406802900135517,
0.05068982392549515,
0.09105908870697021,
-0.011332768015563488,
0.0516027957201004,
0.03612195700407028,
0.06339205056428909,
-0.05084859952330589,
-0.0283021479845047,
-0.02250675857067108,
-0.002862962894141674,
-0.004696350544691086,
0.0007746621849946678,
-0.02981053851544857,
0.032966248691082,
-0.02977084368467331,
-0.011084677651524544,
-0.00827629491686821,
-0.010906052775681019,
0.03221205249428749,
-0.019480055198073387,
0.032331135123968124,
-0.06617066264152527,
-0.01992661878466606,
-0.037134166806936264,
0.010886205360293388,
0.0533890463411808,
-0.05521498993039131,
-0.04894326627254486,
-0.006281647831201553,
-0.009333159774541855,
0.0325891487300396,
-0.0745461955666542,
0.04271123558282852,
0.04275093227624893,
-0.06065313145518303,
0.05454018712043762,
0.015818241983652115,
0.024888426065444946,
0.04854632169008255,
0.010886205360293388,
0.005507606081664562,
0.008360644802451134,
-0.01152131613343954,
-0.026198342442512512,
-0.005527453497052193,
0.024928119033575058,
0.009561402723193169,
-0.03733263909816742,
0.026952536776661873,
-0.018229680135846138,
0.037392180413007736,
-0.06763935834169388,
0.03389906883239746,
0.003540249541401863,
-0.035347916185855865,
0.007646144833415747,
-0.01504419930279255,
0.005185088608413935,
0.013128941878676414,
-0.024630410596728325,
0.006956453900784254,
-0.01780296489596367,
-0.000330580398440361,
-0.002845596522092819,
-0.014647254720330238,
0.02461056411266327,
-0.009625906124711037,
0.01605640910565853,
-0.0024350068997591734,
0.020442645996809006,
-0.04969746246933937,
-0.038325000554323196,
-0.03235098347067833,
-0.012374747544527054,
0.017048770561814308,
0.004024025518447161,
0.0065793562680482864,
-0.06351113319396973,
-0.0025851016398519278,
0.0365387499332428,
0.021732715889811516,
0.0025119148194789886,
0.04019063711166382,
-0.05366690829396248,
-0.030822746455669403,
0.007665992248803377,
0.00813240185379982,
0.09439342468976974,
0.009189266711473465,
-0.0058847032487392426,
0.005078409798443317,
-0.016165567561984062,
0.02482888288795948,
-0.06057374179363251,
0.020780049264431,
0.01816021464765072,
-0.01040987204760313,
0.01169994194060564,
0.03991277888417244,
0.04290970787405968,
-0.018001437187194824,
-0.019261736422777176,
-0.07998432964086533,
-0.026754064485430717,
-0.05144401639699936,
0.0182693749666214,
-0.00576065806671977,
0.0030812823679298162,
0.005527453497052193,
-0.024551022797822952,
0.08046066761016846,
-0.014865574426949024,
-0.06958438456058502,
-0.002895214594900608,
-0.00023832180886529386,
-0.062320299446582794,
0.004547496326267719,
0.02643650956451893,
-0.07232329994440079,
0.06319357454776764,
0.011183913797140121,
-0.01708846352994442,
-0.027389176189899445,
-0.03786851465702057,
0.04890357330441475,
0.011094600893557072,
0.005264477338641882,
-0.04219520837068558,
0.07962708175182343,
0.039714306592941284,
0.027289940044283867,
0.042512763291597366,
0.001525755738839507,
0.015431220643222332,
0.005601880606263876,
0.010261017829179764,
-0.05751727148890495,
0.06136763095855713,
-0.048387546092271805,
-0.0005873539485037327,
0.05914474278688431,
0.01174956001341343,
0.00857896450906992,
0.04715701565146446,
-0.025622772052884102,
0.07077521830797195,
-0.06279662996530533,
0.05045165494084358,
0.02210981398820877,
-0.00044036039616912603,
0.017177777364850044,
-0.03685630485415459,
0.014756415039300919,
-0.0516027957201004,
0.0009725142153911293,
-0.06839355081319809,
0.06108977273106575,
-0.011084677651524544,
-0.020035777240991592,
-0.057556964457035065,
0.017673958092927933,
-0.002030619652941823,
0.07891258597373962,
-0.01297016441822052,
-0.016106026247143745,
-0.030723510310053825,
0.006390807684510946,
-0.006956453900784254,
-0.031398314982652664,
0.04421962797641754,
-0.03778912499547005,
-0.07216452807188034,
-0.05521498993039131,
-0.02220905013382435,
0.025563230738043785,
-0.017931971698999405,
-0.05076921358704567,
0.03431585803627968,
-0.03352196887135506,
0.027309786528348923,
-0.012761767953634262,
-0.030068552121520042,
-0.08042097091674805,
0.006802637595683336,
0.012960240244865417,
-0.014319775626063347,
0.021653326228260994,
-0.03814637288451195,
0.02185179851949215,
-0.019142651930451393,
0.0748637467622757,
-0.07319658249616623,
-0.0770072489976883,
-0.014339623041450977,
-0.01758464425802231,
0.05712032690644264,
0.017068617045879364,
0.033879220485687256,
-0.02318156324326992,
-0.0034037998411804438,
-0.037709735333919525,
-0.06041496619582176,
-0.0006267382996156812,
-0.006911797448992729,
0.05954168736934662,
-0.0018172619165852666,
-0.00940758641809225,
0.02981053851544857,
0.012295358814299107,
0.04814937710762024,
0.01459763664752245,
0.007462558336555958,
0.0002791016595438123,
0.03963491693139076,
0.03433570638298988,
0.04926082119345665,
-0.014349546283483505,
-0.0283021479845047,
0.05029287934303284,
0.043902069330215454,
0.014974734745919704,
0.022725077345967293,
0.062359992414712906,
0.02754795365035534,
-0.024947967380285263,
0.02701207809150219,
-0.01862662471830845,
-0.00033988378709182143,
-0.011709865182638168,
0.002232813276350498,
-0.06851263344287872,
0.03453417867422104,
-0.05620735138654709,
0.033621206879615784,
0.03872194513678551,
0.024193773046135902,
-0.0266945231705904,
-0.02113729901611805,
0.012136580422520638,
-0.011273225769400597,
0.006127831991761923,
0.07661030441522598,
-0.022129660472273827,
0.0720057487487793,
-0.0651782974600792,
-0.029909774661064148,
0.011322843842208385,
0.07029888778924942,
0.02834184281527996,
-0.011173989623785019,
-0.01730678416788578,
-0.013545733876526356,
0.014796108938753605,
-0.08248508721590042,
-0.04034941643476486,
-0.019142651930451393,
0.037352483719587326,
0.02322125807404518,
0.03449448570609093,
-0.011451851576566696,
-0.0533890463411808,
0.02856016345322132,
-0.037352483719587326,
0.01332741416990757,
0.053150881081819534,
0.008822093717753887,
-0.05037226900458336,
0.034990664571523666,
-0.009392701089382172,
-0.005487758666276932,
-0.037134166806936264,
-0.02594032883644104,
-0.021395312622189522,
0.002206763718277216,
-0.03999216482043266,
0.06188366189599037,
0.02790520340204239,
-0.0052793631330132484,
0.05192035064101219,
-0.003934713080525398,
0.02042279951274395,
-0.07275994122028351,
0.015371679328382015,
0.05477835237979889,
-0.03338303789496422,
-0.01802128367125988,
-0.05140432342886925,
-0.03191434592008591,
-0.055373769253492355,
0.05418293550610542,
-0.02478918991982937,
-0.03673722222447395,
0.03318456560373306,
-0.013486192561686039,
0.021256381645798683,
-0.034018151462078094,
0.04056773707270622,
-0.03872194513678551,
-0.030763205140829086,
0.03897995874285698,
-0.019222041592001915,
-0.09002703428268433,
0.07101338356733322,
-0.018864791840314865,
-0.03639981895685196,
-0.0358242467045784,
0.010687733069062233,
-0.009744989685714245,
0.02941359393298626,
0.01884494349360466,
-0.013178559951484203,
-0.0059293597005307674,
-0.007303780410438776,
-0.0025900634936988354,
0.06644852459430695,
-0.016641901805996895,
-0.008588888682425022,
-0.0419173464179039,
0.003386433469131589,
0.028044134378433228,
0.003624600125476718,
0.03729294240474701,
-0.08518430590629578,
0.013803747482597828,
-0.016790755093097687,
-0.042076125741004944,
-0.009427433833479881,
-0.004549977369606495,
0.006385846063494682,
-0.049141738563776016,
0.012394594959914684,
-0.011074753478169441,
-0.032728079706430435,
0.018894562497735023,
0.016532741487026215,
-0.01121368445456028,
-0.0013272834476083517,
0.013238102197647095,
-0.01548083871603012,
-0.024590717628598213,
-0.03830515220761299,
0.003954560495913029,
0.06708363443613052,
-0.02544414810836315,
0.012821310199797153,
0.03528837487101555,
0.007978586480021477,
-0.02754795365035534,
0.007442710921168327,
-0.01948997937142849,
0.0569615475833416,
0.015183130279183388,
-0.019142651930451393,
0.016741137951612473,
-0.0566042959690094,
-0.05727910250425339,
0.06974316388368607,
-0.0059889014810323715,
0.01662205345928669,
0.006802637595683336,
-0.017207548022270203,
-0.011491545476019382,
0.01112437155097723,
-0.030465496703982353,
0.02985023334622383,
-0.020660964772105217,
0.06041496619582176,
0.03632042929530144,
0.07335536181926727,
0.009650714695453644,
0.01859685406088829,
-0.0755782499909401,
0.04072651267051697,
-0.028044134378433228,
0.06779813766479492,
0.011273225769400597,
-0.012980087660253048,
0.03822576254606247,
-0.11352615058422089,
0.019003720954060555,
0.02314186841249466,
-0.029373899102211,
-0.024372396990656853,
0.02006554789841175,
0.039674609899520874,
-0.00911980215460062,
0.04346543177962303,
0.007517138030380011,
0.05735849216580391,
0.018973950296640396,
-0.027647189795970917,
-0.011888490058481693,
0.04294940456748009,
0.06632944196462631,
-0.01576862297952175,
-0.052476074546575546,
0.007780113723129034,
-0.03030671924352646,
0.00129006989300251,
0.00911980215460062,
-0.04239368066191673,
-0.03274792805314064,
0.0196983739733696,
0.02905634418129921,
-0.018825097009539604,
-0.018924333155155182,
-0.042552459985017776,
0.03507005423307419,
0.03106091357767582,
-0.023102175444364548,
-0.012007573619484901,
0.03925782069563866,
0.016939610242843628,
-0.02095867320895195,
0.03256930410861969,
0.020115166902542114,
-0.10804831236600876,
-0.021415160968899727,
0.0440608486533165,
-0.01680067926645279,
-0.016165567561984062,
0.011600705794990063,
-0.005324019119143486,
-0.05120585113763809,
-0.026357119902968407,
0.007606450468301773,
0.034950971603393555,
-0.03096167743206024,
0.03681660816073418,
0.01769380457699299,
-0.024987662211060524,
0.0059889014810323715,
-0.0037610498256981373,
0.027508258819580078,
0.00981941632926464,
-0.005244630388915539,
-0.04314787685871124,
0.028619704768061638,
0.004028987605124712,
0.003354181768372655,
-0.061605799943208694,
0.01694953441619873,
0.023122021928429604,
-0.011868642643094063,
-0.0684332475066185,
0.010003003291785717,
0.0601767972111702,
-0.021117452532052994,
0.019658681005239487,
-0.0016349154757335782,
-0.023697592318058014,
-0.036598291248083115,
0.059025660157203674,
-0.01633426919579506,
0.017356401309370995,
0.04961807280778885,
0.039039500057697296,
-0.028183065354824066,
0.0023568584583699703,
-0.014855651184916496,
-0.024928119033575058,
-0.04410054162144661,
0.0037213554605841637,
-0.0012937912251800299,
0.04735548794269562,
0.03177541494369507,
-0.03346242755651474,
0.00047447282122448087,
-0.02286400832235813,
0.009670562110841274,
-0.0196983739733696,
-0.019876999780535698,
-0.010032773949205875,
-0.02723039872944355,
-0.023975452408194542,
-0.003927270416170359,
-0.026892995461821556,
0.012910622172057629,
-0.043981458991765976,
-0.028262455016374588,
0.0015468434430658817,
-0.06696455180644989,
0.02536475844681263,
0.006822485011070967,
0.028262455016374588,
0.01862662471830845,
0.08042097091674805,
-0.08780413866043091,
0.0024908273480832577,
0.02808382920920849,
0.034037996083498,
-0.05140432342886925,
-0.01694953441619873,
-0.001433962257578969,
0.03131892904639244,
0.015073970891535282,
-0.0019586733542382717,
0.04826845973730087,
-0.0008850623853504658,
0.06105007603764534,
-0.005681269336491823,
-0.00007636531518073753,
0.0408455990254879,
-0.010449565947055817,
0.0501737967133522,
0.015738852322101593,
-0.043624211102724075,
0.0759751945734024,
-0.023836521431803703,
0.024491481482982635,
-0.07728511095046997,
-0.05521498993039131,
-0.006197297479957342,
-0.01123353186994791,
-0.02540445327758789,
-0.005522491410374641,
0.06660730391740799,
-0.053111184388399124,
-0.004872494842857122,
0.03812652826309204,
-0.007184696849435568,
-0.03927766531705856,
-0.04346543177962303,
-0.0031060914043337107,
-0.06748057901859283,
0.015599922277033329,
0.04457687586545944,
-0.002016974613070488,
0.09558425843715668,
-0.03925782069563866,
0.02762734331190586,
-0.012374747544527054,
-0.01859685406088829,
-0.011987726204097271,
-0.018229680135846138,
-0.024590717628598213,
-0.0368959978222847,
0.02385636977851391,
0.022129660472273827,
-0.03413723409175873,
0.054222628474235535,
-0.030941830947995186,
-0.06525769084692001,
-0.06224090978503227,
0.009576288051903248,
0.02985023334622383,
-0.04243337735533714,
-0.02056172862648964,
-0.008380492217838764,
0.07732480764389038,
0.024848731234669685,
0.0005442482070066035,
0.026853300631046295,
0.04092498496174812,
-0.026019716635346413,
0.06740119308233261,
0.019192270934581757,
0.01938081905245781,
-0.05477835237979889,
0.038424234837293625,
-0.02379682846367359,
-0.0013930273707956076,
0.06101038306951523,
0.024134229868650436,
-0.040686819702386856,
-0.0019152576569467783,
-0.022844159975647926,
-0.008385454304516315,
0.011054906994104385,
0.08558125048875809,
-0.05557224154472351,
-0.030544886365532875,
0.011531240306794643,
0.005453026387840509,
0.027170857414603233,
-0.022347979247570038,
0.0258013978600502,
-0.04231429100036621,
0.014349546283483505,
0.03854331746697426,
0.08367592096328735,
-0.012424365617334843,
-0.027865510433912277,
0.03483188524842262
] |
52,279 |
flexget.manager
|
_init_logging
|
Initialize logging variables
|
def _init_logging(self) -> None:
"""Initialize logging variables"""
log_file = os.path.expanduser(self.options.logfile)
# If an absolute path is not specified, use the config directory.
if not os.path.isabs(log_file):
log_file = os.path.join(self.config_base, log_file)
self.log_filename = log_file
|
(self) -> NoneType
|
[
-0.04021453484892845,
0.00459471857175231,
0.030785292387008667,
0.025102410465478897,
0.0042372760362923145,
-0.001473884331062436,
0.017980709671974182,
0.076954185962677,
-0.0025134084280580282,
0.03454975038766861,
-0.006298225838690996,
0.005234947893768549,
0.0035721617750823498,
0.017817825078964233,
0.01193586178123951,
0.01759159564971924,
-0.03941820561885834,
0.005904586520045996,
-0.03308378532528877,
0.024668050929903984,
0.004137735348194838,
-0.04039551690220833,
-0.039201024919748306,
0.027527589350938797,
0.0051127839833498,
0.05469321459531784,
-0.04448574408888817,
0.012822681106626987,
0.03357243910431862,
-0.040866073220968246,
-0.024957625195384026,
-0.035038404166698456,
0.021229363977909088,
0.03031473606824875,
0.008637437596917152,
-0.07340690493583679,
0.030712898820638657,
-0.013836188241839409,
-0.0762302502989769,
-0.006071996409446001,
0.03635958582162857,
0.011411009356379509,
0.03373532369732857,
-0.007470093667507172,
-0.02629690244793892,
0.04513728618621826,
0.0009428109042346478,
0.04441335052251816,
-0.0223514623939991,
0.005185177084058523,
-0.0606294721364975,
0.06099143996834755,
-0.025826346129179,
0.0218266099691391,
-0.023129690438508987,
0.02734660729765892,
0.07271917164325714,
-0.02705703303217888,
-0.055417146533727646,
-0.016650481149554253,
-0.03764456883072853,
0.012379270978271961,
0.026876049116253853,
-0.01747395657002926,
0.009990288875997066,
-0.026713164523243904,
-0.03626909479498863,
0.05487419664859772,
0.048829346895217896,
0.014596318826079369,
0.008402158506214619,
-0.03768076375126839,
0.013184648007154465,
-0.05816809460520744,
-0.006547078024595976,
0.01970910280942917,
-0.07782290130853653,
0.06446631997823715,
0.0015349662862718105,
0.02135605365037918,
-0.059977930039167404,
0.03793414309620857,
-0.06519025564193726,
-0.006447537336498499,
0.0679050087928772,
-0.037318795919418335,
-0.03862188011407852,
0.028522999957203865,
0.08860952407121658,
-0.024957625195384026,
-0.060339897871017456,
0.006927143316715956,
0.0218266099691391,
0.014406286180019379,
-0.002120900433510542,
-0.03373532369732857,
-0.02455946058034897,
-0.00927540473639965,
0.019817693158984184,
0.0012815893860533834,
-0.07250198721885681,
-0.02539198473095894,
0.05563432723283768,
-0.03357243910431862,
-0.031255848705768585,
-0.05961596593260765,
-0.003852686146274209,
-0.025500575080513954,
0.0325770303606987,
0.018767988309264183,
-0.07007680833339691,
0.007094553206115961,
0.0035088176373392344,
0.019564315676689148,
-0.020433036610484123,
0.00032096292125061154,
-0.015284056775271893,
0.008375011384487152,
0.022260969504714012,
0.006189635489135981,
-0.0035088176373392344,
-0.0044906530529260635,
-0.04546305537223816,
0.040793679654598236,
0.02665886841714382,
-0.02144654467701912,
-0.013619008474051952,
-0.025572968646883965,
0.015636974945664406,
-0.013573762029409409,
0.08165975660085678,
-0.002099408535286784,
-0.005900062154978514,
-0.047019511461257935,
0.01931094005703926,
-0.013238943181931973,
0.002159359399229288,
0.07297254353761673,
0.002585801761597395,
0.07239340245723724,
-0.007601306773722172,
-0.034748829901218414,
-0.01288602501153946,
-0.04872075840830803,
0.01614372804760933,
0.08506224304437637,
0.031255848705768585,
0.02294870838522911,
-0.01932903751730919,
-0.04101086035370827,
0.043906595557928085,
-0.02817913144826889,
-0.04354463145136833,
-0.012551205232739449,
0.013727597892284393,
-0.03281230852007866,
-0.02886686846613884,
0.031400635838508606,
0.030495719984173775,
0.005918160546571016,
0.01398097537457943,
-0.02432418242096901,
-0.01307605765759945,
-0.01072327233850956,
-0.011193829588592052,
0.01925664395093918,
-0.038296107202768326,
-0.00415583373978734,
0.03713781386613846,
-0.013139401562511921,
-0.024287985637784004,
-0.02698463946580887,
-0.04354463145136833,
0.01931094005703926,
0.00676425825804472,
0.0384770929813385,
0.012786484323441982,
-0.018342677503824234,
-0.024595657363533974,
0.03941820561885834,
0.00344773568212986,
-0.010026485659182072,
0.009745961055159569,
0.05628586933016777,
0.015356449410319328,
0.04788823425769806,
-0.012985565699636936,
0.003970325458794832,
-0.016469499096274376,
0.04825020208954811,
0.016795268282294273,
-0.013999073766171932,
-0.035201288759708405,
-0.05896442383527756,
0.03818751871585846,
0.049372296780347824,
0.0037531452253460884,
-0.05143551155924797,
0.002694391878321767,
-0.000630614347755909,
-0.003228293266147375,
0.0634528174996376,
-0.033373355865478516,
-0.048503577709198,
0.013582811690866947,
0.007506290450692177,
0.03324666991829872,
0.058530062437057495,
-0.060810454189777374,
0.047852035611867905,
-0.016044186428189278,
-0.03411538898944855,
-0.01580890826880932,
0.05121833086013794,
-0.03518319129943848,
-0.05585150793194771,
-0.012352123856544495,
0.05896442383527756,
-0.03378961980342865,
0.056792620569467545,
0.08564139157533646,
-0.02977178618311882,
-0.028541097417473793,
0.016605235636234283,
0.01170058362185955,
0.04151761531829834,
0.07235720008611679,
-0.009782157838344574,
-0.006709963083267212,
0.007090028375387192,
0.012134943157434464,
0.01398097537457943,
-0.011266223154962063,
-0.0005686840740963817,
0.009311600588262081,
-0.001351720537059009,
-0.0055109476670622826,
0.05281098559498787,
-0.02173611894249916,
-0.049553282558918,
-0.026640770956873894,
-0.027075130492448807,
-0.00619416031986475,
-0.00002354199386900291,
0.013999073766171932,
-0.025898737832903862,
-0.025138607248663902,
0.060122717171907425,
0.003653604304417968,
0.0003314260393381119,
0.056647833436727524,
0.03460404649376869,
-0.05809570476412773,
0.004669374320656061,
-0.04311027005314827,
0.004354915581643581,
0.012876976281404495,
0.051254525780677795,
0.025030016899108887,
-0.0398525670170784,
0.029301228001713753,
0.01329323835670948,
0.018731791526079178,
-0.029518408700823784,
-0.0003390612837392837,
0.008972257375717163,
0.04578882455825806,
-0.07051116973161697,
0.029970867559313774,
0.001981769222766161,
0.09020217508077621,
0.08774080127477646,
0.0029025229159742594,
-0.008755076676607132,
-0.030133752152323723,
-0.061860159039497375,
-0.015320253558456898,
-0.049553282558918,
-0.00490917731076479,
0.10316059738397598,
0.07890880852937698,
0.017292972654104233,
0.056177277117967606,
0.06399576365947723,
0.017962612211704254,
-0.034585945308208466,
-0.025627262890338898,
-0.015428842976689339,
-0.02568155899643898,
-0.016541892662644386,
-0.031255848705768585,
0.02220667526125908,
-0.002922883490100503,
0.0696786493062973,
0.008013044483959675,
-0.019528118893504143,
-0.03031473606824875,
-0.011872517876327038,
0.020034873858094215,
-0.044666726142168045,
-0.01633376069366932,
-0.01780877634882927,
-0.011845369823276997,
0.03404299542307854,
0.01046084612607956,
0.02803434431552887,
-0.03978017345070839,
-0.016894809901714325,
0.07883641123771667,
-0.021120773628354073,
0.02046923339366913,
0.011456255801022053,
0.030821489170193672,
0.021012183278799057,
0.028378212824463844,
0.023003002628684044,
0.0182883832603693,
-0.023455461487174034,
0.014152909629046917,
0.02341926470398903,
-0.02598923072218895,
0.07919837534427643,
0.010560386814177036,
0.0010859009344130754,
0.023763133212924004,
0.006406815722584724,
0.03963538631796837,
0.014161958359181881,
-0.027925753965973854,
0.0592539981007576,
-0.07869162410497665,
0.050494395196437836,
-0.030043261125683784,
-0.004877505358308554,
0.0032825882080942392,
-0.035490863025188446,
-0.05932639166712761,
-0.02665886841714382,
0.018767988309264183,
-0.04513728618621826,
-0.04187958315014839,
-0.021175069734454155,
-0.05317295342683792,
0.016279466450214386,
0.057082194834947586,
-0.009026551619172096,
0.0028482277411967516,
-0.07199523597955704,
-0.004124161321669817,
-0.036775846034288406,
-0.001476146630011499,
-0.0019500971538946033,
-0.06728966534137726,
-0.013999073766171932,
0.0016209334135055542,
-0.0565030463039875,
-0.07565110176801682,
-0.03654056787490845,
0.017709234729409218,
0.024034608155488968,
-0.03219696506857872,
0.03045952320098877,
0.0017747693927958608,
-0.02991657145321369,
0.017184382304549217,
0.006081045605242252,
0.02886686846613884,
-0.0017770316917449236,
0.008397634141147137,
0.006854750216007233,
0.04524587467312813,
-0.0866549015045166,
0.036775846034288406,
0.025790149345993996,
-0.020505430176854134,
0.0148134995251894,
0.00300206383690238,
-0.021156970411539078,
-0.035128895193338394,
-0.007474618498235941,
0.02159133180975914,
0.03699302673339844,
-0.016062285751104355,
0.016569038853049278,
-0.04220535233616829,
-0.0066601927392184734,
-0.0035404895897954702,
0.028070541098713875,
0.08629292994737625,
0.018197890371084213,
0.011465304531157017,
0.037011124193668365,
0.04756246507167816,
-0.019202349707484245,
0.03757217526435852,
0.00402462063357234,
0.0001246382453246042,
0.042386334389448166,
0.008863667026162148,
0.024052707478404045,
-0.04046791046857834,
-0.022532446309924126,
-0.03234175220131874,
0.05979694798588753,
0.004044981207698584,
0.07279156148433685,
-0.009284453466534615,
0.016207072883844376,
0.01170058362185955,
-0.023618346080183983,
0.022460052743554115,
-0.011230026371777058,
0.01208064891397953,
-0.0223514623939991,
0.012750287540256977,
-0.0009269748697988689,
0.005497373640537262,
-0.007099077571183443,
0.032233159989118576,
-0.018731791526079178,
-0.08419352024793625,
0.016035137698054314,
0.04032312333583832,
0.029663195833563805,
0.04339984431862831,
0.053607311099767685,
-0.04372561350464821,
0.008130683563649654,
0.014949236996471882,
-0.020324446260929108,
-0.07083693891763687,
0.11901474744081497,
-0.005488324444741011,
0.01916615292429924,
0.04593361169099808,
-0.010632780380547047,
-0.011266223154962063,
0.04513728618621826,
-0.06852035224437714,
0.013112254440784454,
-0.0015869990456849337,
-0.04187958315014839,
0.01823408715426922,
0.01999867707490921,
-0.018822284415364265,
0.06996822357177734,
-0.013745696283876896,
0.036558665335178375,
-0.012207336723804474,
0.006293701007962227,
-0.018894677981734276,
0.0054476032964885235,
-0.02432418242096901,
-0.035038404166698456,
-0.005818619392812252,
-0.017446808516979218,
-0.10084400326013565,
0.023437362164258957,
0.025283394381403923,
0.0038187517784535885,
-0.026857951655983925,
0.04263971373438835,
0.01731107197701931,
-0.06848415732383728,
-0.01640615426003933,
-0.016940055415034294,
0.11271652579307556,
0.00835691299289465,
-0.01754635013639927,
-0.02401651069521904,
0.030477620661258698,
0.0395267978310585,
-0.04969806969165802,
0.01925664395093918,
-0.049517083913087845,
-0.03141873702406883,
-0.012098747305572033,
-0.019129956141114235,
-0.02046923339366913,
-0.010831862688064575,
-0.042241547256708145,
0.011501501314342022,
0.005877438932657242,
0.02499382197856903,
-0.00759678240865469,
-0.04419616982340813,
-0.013003664091229439,
-0.025265296921133995,
0.03248653933405876,
-0.019057562574744225,
0.016912907361984253,
0.028360113501548767,
-0.05266619846224785,
-0.030278539285063744,
-0.018677497282624245,
0.028287719935178757,
0.04749007150530815,
0.05621347576379776,
0.015772711485624313,
0.04354463145136833,
-0.02370883896946907,
-0.04296548292040825,
-0.02370883896946907,
0.050964951515197754,
-0.0073977005667984486,
0.026857951655983925,
-0.07322592288255692,
0.01329323835670948,
-0.03840469941496849,
-0.033156175166368484,
0.029681293293833733,
0.021862806752324104,
-0.02332877367734909,
-0.020179659128189087,
0.0026581950951367617,
-0.04061269760131836,
-0.07977752387523651,
0.010705173946917057,
-0.025283394381403923,
0.005379734560847282,
-0.016179924830794334,
0.017111990600824356,
-0.020795004442334175,
-0.06920809298753738,
0.005578816402703524,
-0.02893926203250885,
0.04177099093794823,
0.02613401785492897,
-0.010397502221167088,
0.03429637476801872,
-0.06627615541219711,
-0.06316324323415756,
-0.008465503342449665,
0.05418645963072777,
0.029681293293833733,
0.08933345228433609,
0.0030065884348005056,
-0.023093493655323982,
-0.018804185092449188,
-0.020342545583844185,
0.004755341447889805,
-0.0030292111914604902,
0.014107664115726948,
-0.048612166196107864,
0.03782555088400841,
-0.034658338874578476,
-0.044811513274908066,
0.01923854649066925,
0.03453165292739868,
0.005628586746752262,
0.09099850058555603,
-0.02061402052640915,
-0.004440882708877325,
0.03264942392706871,
-0.020052971318364143,
-0.07499956339597702,
0.03199788182973862,
-0.005307340994477272,
0.012741237878799438,
-0.005533570423722267,
-0.019057562574744225,
-0.024414673447608948,
-0.07344310730695724,
0.048141609877347946,
-0.03416968509554863,
-0.08296283334493637,
-0.023310674354434013,
0.04108325392007828,
-0.05802331119775772,
0.01041560061275959,
0.008212125860154629,
0.029446015134453773,
-0.01738346554338932,
0.01836077682673931,
-0.06395956873893738,
0.02349165827035904,
0.044051382690668106,
0.060810454189777374,
0.04596981033682823,
0.04492010548710823,
-0.013582811690866947,
-0.005737177096307278,
-0.015284056775271893,
0.024487067013978958,
-0.012107796035706997,
-0.025319591164588928,
0.03469453752040863,
0.0323779471218586,
-0.022930609062314034,
-0.005560718011111021,
-0.016279466450214386,
-0.004162620287388563,
0.01595369540154934,
-0.04484771192073822,
-0.0641043558716774,
0.00939304381608963,
0.05599629506468773,
-0.04484771192073822,
0.08100821077823639,
-0.012596451677381992,
-0.06236691400408745,
0.008709831163287163,
-0.009755010716617107,
-0.004972521681338549,
-0.026423590257763863,
-0.04969806969165802,
0.02046923339366913,
0.07782290130853653,
-0.0145510733127594,
0.056937407702207565,
-0.032703716307878494,
-0.01284077949821949,
0.039743974804878235,
0.026695065200328827,
-0.0005921553820371628,
0.013944778591394424,
0.042024366557598114,
0.007135274354368448,
0.06153438985347748,
0.015066876076161861,
-0.044883906841278076,
-0.020179659128189087,
-0.01752825267612934,
0.036703452467918396,
-0.03626909479498863,
-0.02166372537612915,
0.011003796942532063,
-0.054295048117637634,
-0.02265913411974907,
0.006773307453840971,
0.028740178793668747,
-0.020939791575074196,
0.0129131730645895,
-0.03646817430853844,
0.013383729383349419,
0.011220976710319519,
0.025283394381403923,
-0.03704732283949852,
0.035273682326078415,
-0.00408344017341733,
0.054150260984897614,
-0.028903065249323845,
0.05462082102894783,
-0.0371016189455986,
0.017084842547774315,
-0.018731791526079178,
-0.016351858153939247,
0.010822813026607037,
0.02008916810154915,
-0.01564602367579937,
0.0123883206397295,
-0.007945175282657146,
0.0074927168898284435,
0.06265648454427719,
-0.05259380489587784,
-0.039888761937618256,
0.0013347533531486988,
-0.019672906026244164,
0.022387659177184105,
-0.03067670203745365,
-0.01738346554338932,
0.042024366557598114,
-0.018677497282624245,
0.01761874370276928,
0.030206145718693733,
-0.04441335052251816,
0.001944441464729607,
-0.04698331654071808,
-0.0028527523390948772,
0.0634528174996376,
0.024776641279459,
-0.03930961713194847,
0.01593559794127941,
0.06982343643903732,
0.038911450654268265,
0.011872517876327038,
0.05433124676346779,
0.022260969504714012,
0.013926680199801922,
-0.04698331654071808,
-0.04198817163705826,
0.06008652225136757,
-0.015356449410319328,
-0.0789811983704567,
0.026405492797493935,
0.02052352949976921,
-0.012623598799109459,
0.007854684256017208,
0.07442041486501694,
0.0377531573176384,
-0.04289308935403824,
0.04593361169099808,
-0.04387040063738823,
0.005393308121711016,
-0.017600644379854202,
-0.0509287565946579,
-0.027943851426243782,
-0.024378476664423943,
-0.013383729383349419,
-0.029337424784898758,
0.037535976618528366,
-0.007180520333349705,
-0.01985388994216919,
-0.00901297852396965,
-0.03226935863494873,
-0.09389423578977585,
-0.0710541233420372,
0.013537565246224403,
-0.04582502320408821,
0.005216849502176046,
0.036703452467918396,
-0.02075880765914917,
0.018894677981734276,
-0.07927077263593674,
0.009945043362677097,
0.0426035150885582,
-0.03491171821951866,
-0.02084929868578911,
-0.061787765473127365,
-0.0460783988237381,
0.0016050974372774363,
-0.005918160546571016,
0.03038712963461876,
-0.0022939657792448997,
0.09693475812673569,
-0.0294641125947237,
-0.07630264014005661,
-0.02166372537612915,
0.040431711822748184,
-0.02939172089099884,
-0.051725082099437714,
-0.028541097417473793,
-0.05331773683428764,
0.031328242272138596,
-0.008411208167672157,
-0.029807982966303825,
0.0009931469103321433,
0.017157236114144325,
0.012632648460566998,
0.021844707429409027,
-0.01599894091486931,
-0.046186987310647964,
-0.023437362164258957,
0.03684823960065842,
0.010388452559709549,
0.024830935522913933,
0.03339145705103874,
-0.018487464636564255,
-0.060412291437387466,
0.004701046273112297,
-0.021555135026574135,
-0.007642028387635946,
0.029047852382063866,
0.0213017575442791,
-0.03491171821951866,
-0.042024366557598114,
0.0013686877209693193,
0.01792641542851925,
0.02698463946580887,
-0.018324580043554306,
-0.025428181514143944,
-0.06500927358865738,
0.025355787947773933,
0.023980313912034035,
0.056177277117967606,
0.030930079519748688,
0.02417939528822899,
0.019835790619254112
] |
52,280 |
flexget.manager
|
_read_lock
|
Read the values from the lock file. Returns None if there is no current lock file.
|
def _read_lock(self) -> Optional[dict]:
"""
Read the values from the lock file. Returns None if there is no current lock file.
"""
if self.lockfile and os.path.exists(self.lockfile):
result: Dict[str, Union[str, int]] = {}
with open(self.lockfile, encoding='utf-8') as f:
lines = [line for line in f.readlines() if line]
for line in lines:
try:
key, value = line.split(':', 1)
except ValueError:
logger.debug('Invalid line in lock file: {}', line)
continue
result[key.strip().lower()] = value.strip()
for key in result:
if result[key].isdigit():
result[key] = int(result[key])
result.setdefault('pid', None)
if not result['pid']:
logger.error(
'Invalid lock file. Make sure FlexGet is not running, then delete it.'
)
elif not pid_exists(result['pid']):
return None
return result
return None
|
(self) -> Optional[dict]
|
[
0.1054377630352974,
-0.02556012012064457,
-0.024651799350976944,
0.05326387286186218,
0.020909521728754044,
-0.012289566919207573,
0.007779759354889393,
0.017085496336221695,
0.023398317396640778,
-0.06895963847637177,
0.009151321835815907,
-0.03168219327926636,
-0.04541599005460739,
-0.014487700536847115,
0.02098218724131584,
0.0112631656229496,
-0.0030905581079423428,
0.03358966484665871,
-0.0375681072473526,
-0.020364530384540558,
0.006081201136112213,
-0.010754506103694439,
-0.0004138532094657421,
0.025669118389487267,
-0.03536997362971306,
0.01556860189884901,
0.06874164193868637,
-0.03782243654131889,
0.02483346313238144,
-0.00628557289019227,
0.04167371243238449,
0.03916674852371216,
-0.014315119944512844,
0.00705764489248395,
-0.004478016868233681,
0.020528027787804604,
-0.0032676805276423693,
-0.015296105295419693,
-0.07470022141933441,
-0.003335804445669055,
0.0169674139469862,
0.013506715185940266,
0.004060189705342054,
-0.02857574075460434,
-0.053118541836738586,
-0.035133808851242065,
-0.01798473298549652,
-0.05184689536690712,
0.07030395418405533,
0.014687531627714634,
0.09591857343912125,
-0.024306638166308403,
-0.06238340586423874,
-0.016367923468351364,
-0.02893906831741333,
0.000836789608001709,
-0.04210970550775528,
0.0033539708238095045,
-0.043018024414777756,
0.030737541615962982,
-0.016994664445519447,
-0.004673305433243513,
-0.0006227667909115553,
-0.005531667731702328,
-0.004137396812438965,
-0.004639243241399527,
0.007003145758062601,
-0.03077387437224388,
0.011944405734539032,
-0.008261168375611305,
0.00779338413849473,
-0.018711388111114502,
-0.04781395569443703,
0.008479165844619274,
0.0526825487613678,
-0.017748568207025528,
-0.007875132374465466,
0.022054005414247513,
-0.008233918808400631,
0.0007970506558194757,
0.029901888221502304,
-0.010908921249210835,
-0.000496737367939204,
0.020800523459911346,
0.010908921249210835,
0.025432953611016273,
0.10049650073051453,
0.03711394593119621,
-0.03974807634949684,
-0.01086350530385971,
0.002411589026451111,
0.07204792648553848,
-0.03042871318757534,
0.08102212846279144,
0.06975895911455154,
-0.053954195231199265,
0.009964268654584885,
0.020927688106894493,
-0.04766862466931343,
0.02477896399796009,
-0.04421700909733772,
0.05965844541788101,
-0.02922973223030567,
-0.02973839081823826,
0.016340672969818115,
-0.051592566072940826,
-0.017130911350250244,
-0.015495935454964638,
0.059912774711847305,
-0.005776913836598396,
-0.06191107630729675,
-0.09126797318458557,
-0.06296472996473312,
0.06085742637515068,
-0.0008243002230301499,
0.03130070120096207,
-0.04312702268362045,
0.04479833319783211,
0.008592705242335796,
-0.007988672703504562,
-0.00047119089867919683,
0.07324691116809845,
0.016413338482379913,
0.002690897323191166,
0.017376158386468887,
0.05460818484425545,
-0.037786103785037994,
0.0039262124337255955,
0.05675182119011879,
0.043381355702877045,
0.05337287113070488,
-0.021690677851438522,
0.06892330944538116,
-0.0169674139469862,
-0.05133823677897453,
-0.012062487192451954,
0.0057678306475281715,
0.05936778336763382,
0.00939202681183815,
0.007943256758153439,
0.037749771028757095,
-0.023089488968253136,
-0.011653742752969265,
-0.08901534229516983,
-0.03300834074616432,
0.0062401569448411465,
0.012089736759662628,
-0.007629886269569397,
-0.01464211568236351,
-0.01110875140875578,
0.0637640506029129,
-0.06409104913473129,
-0.02521495707333088,
0.017921149730682373,
0.014242454431951046,
0.02933873049914837,
-0.010100516490638256,
-0.043708350509405136,
-0.029956387355923653,
-0.05896812304854393,
-0.02174517698585987,
-0.017494238913059235,
0.05980377644300461,
-0.09998784214258194,
0.009728104807436466,
0.0038399219047278166,
0.018947551026940346,
-0.046433307230472565,
0.028739238157868385,
-0.00740734813734889,
-0.044507671147584915,
0.03902141749858856,
-0.01960154063999653,
0.023906977847218513,
-0.01351579837501049,
-0.007979589514434338,
-0.018856719136238098,
-0.030301548540592194,
0.03424365818500519,
0.032499682158231735,
-0.035515304654836655,
-0.0009917716961354017,
-0.023434650152921677,
0.058822792023420334,
0.04759595915675163,
0.03535180538892746,
0.014633032493293285,
-0.018874885514378548,
0.04389001429080963,
0.023579983040690422,
-0.03636912629008293,
-0.006862356327474117,
-0.050611577928066254,
0.012952640652656555,
-0.02665010280907154,
0.02061885967850685,
-0.022399166598916054,
0.008588164113461971,
-0.036641620099544525,
-0.038876086473464966,
0.03909408301115036,
-0.037350110709667206,
-0.01803014799952507,
0.06485403329133987,
-0.03656895458698273,
-0.08778002858161926,
0.017739485949277878,
0.022635329514741898,
0.005813246592879295,
0.06321905553340912,
-0.09867986291646957,
-0.056897152215242386,
-0.05072057619690895,
0.04011140391230583,
0.041891708970069885,
-0.0040374817326664925,
0.026977097615599632,
0.00601761881262064,
0.004282727837562561,
0.04596098139882088,
0.011935322545468807,
0.05108390748500824,
-0.0038876088801771402,
-0.02857574075460434,
-0.019020216539502144,
-0.0062764897011220455,
-0.01542326994240284,
0.008243001997470856,
0.00495942635461688,
0.06311006098985672,
0.045997314155101776,
-0.031046370044350624,
-0.016685834154486656,
0.023579983040690422,
0.04210970550775528,
-0.02103668637573719,
-0.049049269407987595,
0.002051667310297489,
-0.006231073755770922,
-0.015641266480088234,
0.022617163136601448,
-0.004580202512443066,
0.06307372450828552,
0.04766862466931343,
0.023107655346393585,
-0.06420004367828369,
0.023398317396640778,
0.02181784249842167,
0.01182632427662611,
0.007661677431315184,
0.01733982563018799,
0.023071322590112686,
0.0169310811907053,
0.035151977092027664,
-0.02821241319179535,
-0.012934474274516106,
-0.004750512540340424,
-0.0052591715939342976,
0.0024842547718435526,
0.009110447950661182,
0.04766862466931343,
-0.05137456953525543,
0.0487222746014595,
-0.04810461774468422,
0.012598395347595215,
0.01912921480834484,
0.05460818484425545,
-0.010009684599936008,
0.0019426689250394702,
-0.020382696762681007,
0.00790238194167614,
-0.019728705286979675,
-0.0048095532692968845,
-0.012970807030797005,
0.011735491454601288,
-0.05003025382757187,
0.06881430745124817,
0.008265710435807705,
0.04381734877824783,
0.04294535890221596,
-0.0338803268969059,
0.05798713490366936,
0.0023729854729026556,
-0.008883367292582989,
-0.00072779122274369,
0.009169488213956356,
-0.023107655346393585,
-0.04254569858312607,
-0.019329044967889786,
0.03266318142414093,
-0.03822209686040878,
-0.00759809510782361,
-0.02521495707333088,
-0.07034028321504593,
0.02290782518684864,
0.04988492280244827,
-0.08211211115121841,
-0.042654696851968765,
0.03482498228549957,
0.008356542326509953,
0.012652894482016563,
0.026086945086717606,
-0.012053404003381729,
0.01180815789848566,
-0.03453432023525238,
-0.01486919540911913,
-0.0059903692454099655,
0.009873435832560062,
-0.025741783902049065,
-0.0002082039281958714,
0.015087191946804523,
0.02666826918721199,
0.06456337124109268,
-0.0010956607293337584,
-0.02147267945110798,
0.015450519509613514,
-0.002743125893175602,
0.08523672819137573,
0.032917510718107224,
0.037786103785037994,
-0.01987403817474842,
0.01949254237115383,
0.06245607137680054,
-0.0006256052874960005,
0.0601671040058136,
0.0030292465817183256,
-0.011099668219685555,
0.03417099267244339,
0.039966072887182236,
0.09090464562177658,
-0.08145812153816223,
0.008020464330911636,
-0.005023008678108454,
0.008134003728628159,
0.006953188218176365,
-0.012080653570592403,
0.0011388059938326478,
-0.05867746099829674,
-0.01052742637693882,
-0.020092034712433815,
0.0600581057369709,
-0.07477288693189621,
0.013979041948914528,
-0.012235067784786224,
-0.004357664380222559,
-0.018139146268367767,
0.10471110790967941,
0.004282727837562561,
-0.00460745207965374,
-0.056897152215242386,
-0.012225984595716,
-0.025360288098454475,
-0.0338803268969059,
-0.005159256514161825,
-0.003896692069247365,
-0.05671548843383789,
-0.007284724619239569,
-0.04240036755800247,
0.025087792426347733,
0.0023366527166217566,
-0.03642362356185913,
0.0034788649063557386,
-0.06630734354257584,
0.03542447090148926,
-0.05595250055193901,
-0.005132006946951151,
-0.07030395418405533,
-0.0018472954398021102,
0.059549447149038315,
0.029829222708940506,
-0.04814095050096512,
0.001954023027792573,
-0.012116986326873302,
-0.047850288450717926,
0.002375256270170212,
0.0026886265259236097,
-0.038912419229745865,
0.0009866623440757394,
-0.025033293291926384,
-0.0012228254927322268,
-0.029811056330800056,
-0.0010173182236030698,
-0.01579568162560463,
0.010536509566009045,
-0.08378341794013977,
-0.004882218781858683,
-0.06616201251745224,
-0.06874164193868637,
0.030010886490345,
0.05406319350004196,
-0.008261168375611305,
0.049739591777324677,
0.016240758821368217,
-0.014142539352178574,
-0.002438838593661785,
0.04181904345750809,
0.044943664222955704,
0.00809767097234726,
0.043744683265686035,
-0.02635944075882435,
0.018983883783221245,
-0.03785876929759979,
0.03720477968454361,
0.007893298752605915,
-0.02103668637573719,
-0.008901533670723438,
0.03833109512925148,
-0.04585198312997818,
0.0017224014736711979,
-0.02556012012064457,
-0.03876708820462227,
-0.005036633461713791,
0.04327235370874405,
-0.005845037754625082,
-0.013234219513833523,
0.016422422602772713,
0.02514229156076908,
0.018711388111114502,
0.02897540107369423,
0.008896992541849613,
0.004759595729410648,
-0.023234819993376732,
-0.0281942468136549,
-0.00827479362487793,
-0.0339166633784771,
0.01387004368007183,
0.01369746308773756,
0.022707995027303696,
-0.05039358139038086,
0.0011047439184039831,
0.022816993296146393,
0.04465300217270851,
0.0263412743806839,
-0.025650952011346817,
0.01089983806014061,
0.001406760304234922,
0.003624195931479335,
-0.028266912326216698,
0.014860112220048904,
-0.01721266098320484,
0.04356301948428154,
0.05039358139038086,
0.04312702268362045,
0.01911104843020439,
0.04483466595411301,
-0.0010269690537825227,
-0.026413939893245697,
0.037786103785037994,
0.03266318142414093,
-0.04018406942486763,
-0.07927815616130829,
0.001986949471756816,
-0.007929631508886814,
-0.007402806542813778,
-0.033625997602939606,
-0.009719021618366241,
-0.07651685923337936,
0.008088587783277035,
0.024124974384903908,
-0.020055701956152916,
0.0069849793799221516,
0.014487700536847115,
0.012407648377120495,
-0.00884703453630209,
0.0005989233613945544,
-0.012235067784786224,
0.011635576374828815,
-0.0013522610533982515,
-0.038948751986026764,
0.029829222708940506,
0.019801372662186623,
-0.013706546276807785,
-0.036241959780454636,
-0.030737541615962982,
-0.02710426226258278,
-0.022635329514741898,
0.05326387286186218,
0.010518343187868595,
0.02294415794312954,
0.010382095351815224,
-0.009909769520163536,
-0.016822082921862602,
0.018602389842271805,
0.05929511785507202,
-0.02556012012064457,
-0.025832615792751312,
0.035170141607522964,
-0.051301904022693634,
0.004262290894985199,
-0.02973839081823826,
-0.018965717405080795,
-0.0037945059593766928,
0.031718526035547256,
0.008960574865341187,
0.054353855550289154,
-0.025414787232875824,
0.013116138055920601,
0.038876086473464966,
0.04007507115602493,
0.03533364087343216,
-0.034752316772937775,
0.0021799674723297358,
0.022435499355196953,
0.021654343232512474,
0.023216653615236282,
0.006376405246555805,
-0.0753542110323906,
-0.026922598481178284,
0.03716844692826271,
0.013897293247282505,
0.0018734096083790064,
0.011481162160634995,
0.025687284767627716,
-0.028303245082497597,
-0.06823298335075378,
0.022998657077550888,
-0.009719021618366241,
0.047123633325099945,
-0.045306991785764694,
-0.0008174878312274814,
-0.020092034712433815,
-0.004473474808037281,
0.04247303307056427,
-0.04327235370874405,
-0.062165405601263046,
-0.01406079065054655,
-0.009482858702540398,
-0.04548865556716919,
-0.012925391085445881,
-0.03487947955727577,
-0.004550682380795479,
-0.050938576459884644,
-0.03640545904636383,
-0.025741783902049065,
-0.003011080203577876,
-0.01763956993818283,
0.013334134593605995,
0.0042441245168447495,
-0.1128496527671814,
-0.03269951418042183,
0.039312079548835754,
0.010000601410865784,
0.007216600701212883,
0.03807676583528519,
0.04817728325724602,
0.04243670031428337,
-0.054317522794008255,
0.02635944075882435,
-0.02635944075882435,
-0.0009628189727663994,
0.013942709192633629,
-0.03240885213017464,
0.02970205806195736,
-0.09461059421300888,
-0.012625644914805889,
-0.04236403480172157,
0.014887361787259579,
-0.08065880089998245,
0.014451367780566216,
-0.025469288229942322,
0.06605301797389984,
0.010409344919025898,
-0.08698070794343948,
-0.0003068417718168348,
-0.056497491896152496,
-0.11343097686767578,
-0.015305188484489918,
0.010382095351815224,
0.005604333244264126,
0.048249948769807816,
0.010000601410865784,
-0.004269103053957224,
0.07252025604248047,
0.013897293247282505,
0.020818689838051796,
-0.019474375993013382,
0.03355333209037781,
0.07448222488164902,
-0.00008714193245396018,
-0.006553527433425188,
0.045197993516922,
-0.03580596670508385,
-0.008665370754897594,
-0.030610376968979836,
-0.040329400449991226,
0.009664522483944893,
-0.039275746792554855,
0.025251289829611778,
0.045706652104854584,
0.027485758066177368,
-0.048322614282369614,
-0.0002709347754716873,
0.03920308127999306,
-0.0047050965949893,
0.018311727792024612,
0.06845097988843918,
0.029429562389850616,
0.002972476650029421,
0.019619707018136978,
0.019056549295783043,
-0.04628797620534897,
-0.02098218724131584,
0.004854969214648008,
0.005268254783004522,
-0.010409344919025898,
0.027304092422127724,
-0.0008583622402511537,
-0.03578779846429825,
-0.01985587179660797,
-0.014133456163108349,
0.004423517268151045,
-0.0600581057369709,
0.011926239356398582,
0.05976744368672371,
0.047450628131628036,
0.05820513144135475,
0.0001451892458135262,
-0.05112024024128914,
-0.0002818630018737167,
0.01801198162138462,
0.026177776977419853,
0.036314625293016434,
0.026086945086717606,
-0.041891708970069885,
0.025414787232875824,
-0.004107876215130091,
0.009346610866487026,
0.04043839871883392,
-0.00599945243448019,
0.0016667668242007494,
-0.008156712166965008,
0.008088587783277035,
0.09511925280094147,
0.019983036443591118,
0.008924242109060287,
0.038948751986026764,
0.03645995631814003,
-0.062492404133081436,
-0.010591008700430393,
0.026395773515105247,
0.013824627734720707,
-0.027231426909565926,
-0.03050137870013714,
-0.03680511936545372,
0.013497631996870041,
-0.03206368908286095,
0.021908674389123917,
0.02061885967850685,
0.08182144910097122,
0.016812998801469803,
-0.026450272649526596,
-0.020400863140821457,
-0.009510108269751072,
0.0022514977026730776,
0.0044553084298968315,
-0.07331957668066025,
-0.005581625271588564,
0.0006789690814912319,
-0.047486960887908936,
0.013561214320361614,
-0.07375556975603104,
0.013652046211063862,
-0.06314639002084732,
-0.032463349401950836,
-0.010600091889500618,
-0.07077627629041672,
-0.056933484971523285,
0.07738884538412094,
0.06543535739183426,
0.03518830984830856,
0.046796634793281555,
-0.015078108757734299,
0.027558423578739166,
0.021690677851438522,
-0.0525008849799633,
-0.045270659029483795,
0.0412740521132946,
-0.008038630709052086,
0.03796776756644249,
0.008629037998616695,
-0.0069849793799221516,
0.022290168330073357,
0.0017859837971627712,
0.020582526922225952,
-0.0103366794064641,
0.06459970772266388,
0.009591856971383095,
-0.024288471788167953,
0.023888811469078064,
0.021127518266439438,
-0.01052742637693882,
-0.03796776756644249,
0.007389181759208441,
0.027939917519688606,
-0.06892330944538116,
-0.06049409881234169,
-0.014451367780566216,
0.09511925280094147,
-0.013143387623131275,
0.015559518709778786,
-0.025650952011346817,
-0.05380886420607567,
0.024215806275606155,
0.0024978795554488897,
-0.04101972281932831,
-0.06343705207109451,
-0.0413467176258564,
0.026922598481178284,
-0.03487947955727577,
0.007271099835634232,
-0.005558917298913002,
0.012062487192451954,
0.067796990275383,
0.01088167168200016,
0.05835046246647835,
0.025451121851801872,
-0.06122075393795967,
0.009346610866487026,
0.0374591089785099,
-0.02962939254939556,
-0.06943196803331375,
0.04915826767683029,
0.020055701956152916,
0.003360783215612173,
0.0016486004460602999,
0.026177776977419853,
-0.01880222000181675,
-0.05420852452516556,
-0.007829716429114342,
0.0899599939584732,
-0.020582526922225952,
-0.0030996412970125675,
-0.044544003903865814,
-0.0061220754869282246,
0.03595129773020744,
0.006980437785387039,
0.032536014914512634,
0.017158161848783493,
-0.011063335463404655,
0.04795928671956062,
0.012198735028505325,
0.022054005414247513,
-0.03482498228549957,
0.05373619869351387,
0.012344066053628922,
-0.03527913987636566,
0.008942408487200737,
0.010445677675306797,
0.001989220269024372,
-0.015995511785149574,
0.004384913947433233,
-0.0030723917298018932,
0.02926606498658657,
0.0337349958717823,
-0.04476200044155121,
-0.040765393525362015,
-0.006458153948187828,
0.01956520788371563,
0.06855998188257217,
0.04850427806377411,
-0.00740734813734889,
0.010890754871070385,
-0.057369478046894073,
0.06598035246133804,
-0.012988973408937454,
-0.056170497089624405,
-0.043381355702877045,
-0.015350604429841042
] |
52,281 |
flexget.manager
|
_shutdown
|
Runs when the manager is done processing everything.
|
def _shutdown(self) -> None:
"""Runs when the manager is done processing everything."""
if self.ipc_server:
self.ipc_server.shutdown()
fire_event('manager.shutdown', self)
if not self.unit_test: # don't scroll "nosetests" summary results when logging is enabled
logger.debug('Shutting down')
self.engine.dispose()
# remove temporary database used in test mode
if self.options.test:
if 'test' not in self.db_filename:
raise Exception('trying to delete non test database?')
if self._has_lock:
os.remove(self.db_filename)
logger.info('Removed test database')
global manager
manager = None
|
(self) -> NoneType
|
[
0.02071245200932026,
0.03490607440471649,
-0.011966983787715435,
-0.0014840292278677225,
0.017092984169721603,
-0.04873964190483093,
-0.057987287640571594,
0.039757296442985535,
-0.0390750914812088,
0.024294020608067513,
-0.005888741463422775,
0.009010769426822662,
-0.0002755165915004909,
-0.021015653386712074,
0.007253148593008518,
-0.006945209577679634,
-0.04961134493350983,
-0.06931944191455841,
-0.00018979703600052744,
-0.07549717277288437,
-0.07288206368684769,
0.05654707923531532,
0.056205976754426956,
-0.03467867150902748,
-0.000058219720813212916,
-0.07530767470598221,
-0.041803907603025436,
-0.012999764643609524,
0.061170902103185654,
-0.0033494289964437485,
-0.04942184314131737,
0.013293490745127201,
0.01091525424271822,
0.046579331159591675,
0.02486252225935459,
-0.0007189191528595984,
0.007319473661482334,
0.014051494188606739,
0.002270458033308387,
0.039946798235177994,
0.013663017190992832,
-0.05124105513095856,
0.03763488680124283,
0.02743973582983017,
-0.00018861265562009066,
-0.0005631730891764164,
0.006556732580065727,
-0.02425611950457096,
0.042751412838697433,
0.004642772953957319,
-0.0570397824048996,
0.008631767705082893,
-0.0411217026412487,
0.06359651684761047,
-0.0225695613771677,
0.00653304485604167,
0.014752647839486599,
0.003851606510579586,
0.00029061746317893267,
-0.06977424770593643,
-0.013464041985571384,
0.05753248557448387,
0.00003164517693221569,
0.0008586760959587991,
0.018353166058659554,
-0.04153860732913017,
-0.02336546592414379,
0.07739218324422836,
0.05669867992401123,
0.03880979120731354,
-0.014667372219264507,
0.0036952681839466095,
0.03644103184342384,
0.049573443830013275,
0.004635666497051716,
-0.00666095782071352,
-0.02093985304236412,
-0.06624952703714371,
0.0017315648728981614,
-0.0001125161797972396,
0.02421822026371956,
0.057570382952690125,
-0.029524246230721474,
0.059200093150138855,
0.05889689177274704,
-0.024995174258947372,
0.0712144523859024,
0.007703213021159172,
0.0007230645278468728,
-0.020276600494980812,
0.0059219044633209705,
0.020674552768468857,
0.015245350077748299,
-0.01612653024494648,
0.011436381377279758,
-0.022550610825419426,
-0.07178295403718948,
0.011389005929231644,
-0.07022904604673386,
-0.08785263448953629,
0.007745850831270218,
0.03278366103768349,
0.06151200458407402,
0.020693501457571983,
0.018665842711925507,
0.011085804551839828,
0.025279425084590912,
-0.0761793777346611,
-0.07322315871715546,
0.026890182867646217,
-0.06871303915977478,
0.007508974522352219,
-0.016808733344078064,
0.02482462301850319,
-0.02762923575937748,
-0.02075035311281681,
-0.059616994112730026,
-0.019840748980641365,
0.034470219165086746,
-0.034242819994688034,
-0.059237994253635406,
0.05127895250916481,
-0.05362876504659653,
0.0009889580542221665,
0.019935498014092445,
0.0681445375084877,
0.04123540222644806,
0.04369891434907913,
-0.01297133881598711,
-0.01967019774019718,
0.03500082343816757,
0.01535905059427023,
0.00284488289617002,
-0.0037852812092751265,
0.011929083615541458,
0.0018097339197993279,
0.03270786255598068,
-0.01462947204709053,
0.01565277762711048,
-0.0017895994242280722,
-0.036346279084682465,
0.03846868872642517,
-0.029467396438121796,
0.009238170459866524,
0.018637416884303093,
0.0541214682161808,
-0.02613217942416668,
-0.01388094387948513,
-0.03445126861333847,
-0.0581388883292675,
-0.003361272858455777,
-0.035455625504255295,
-0.03831708803772926,
-0.0024824622087180614,
-0.024275070056319237,
-0.0043419403955340385,
-0.02224740944802761,
-0.0035033985041081905,
0.01972704753279686,
0.00013353893882595003,
0.012279660440981388,
-0.0002365800755796954,
-0.019575446844100952,
-0.03661157935857773,
-0.05453836917877197,
-0.02080720290541649,
-0.009010769426822662,
-0.025317324325442314,
0.016865583136677742,
-0.045745525509119034,
-0.043547313660383224,
0.009290283545851707,
-0.0400983989238739,
0.02954319678246975,
-0.06336911022663116,
0.04911864176392555,
0.03903719410300255,
-0.036478929221630096,
-0.05014194920659065,
0.008641242980957031,
-0.04153860732913017,
-0.08171280473470688,
-0.05306026339530945,
-0.004439059644937515,
0.0030201710760593414,
-0.030831802636384964,
-0.010441501624882221,
0.002468249760568142,
0.028955742716789246,
-0.013795668259263039,
-0.036384180188179016,
-0.005680290516465902,
-0.03477342054247856,
-0.006367231719195843,
0.06920574605464935,
0.03278366103768349,
0.049990348517894745,
0.004142964258790016,
0.022645361721515656,
-0.02294856309890747,
-0.05931379273533821,
0.06230790913105011,
0.029107343405485153,
-0.060640301555395126,
0.014354695565998554,
0.0007272098446264863,
-0.008011152036488056,
-0.0028164577670395374,
-0.008418579585850239,
0.0075231874361634254,
0.04870174080133438,
0.02065560221672058,
-0.028254589065909386,
0.06560522317886353,
0.08891384303569794,
-0.04729943349957466,
0.04191760718822479,
0.005268126260489225,
0.0012862376170232892,
0.029713746160268784,
-0.08368361741304398,
-0.008650718256831169,
0.008285928517580032,
-0.011843808926641941,
-0.04748893529176712,
0.013056614436209202,
-0.034280721098184586,
0.021489406004548073,
0.0661737248301506,
-0.02537417598068714,
-0.005419726949185133,
0.02543102577328682,
-0.029562145471572876,
-0.04892914369702339,
0.019802847877144814,
0.014174669981002808,
-0.038165487349033356,
-0.017235109582543373,
-0.052984461188316345,
-0.014269420877099037,
-0.04070480167865753,
-0.09520526975393295,
0.011095279827713966,
-0.05973069369792938,
0.012961864471435547,
0.03875294327735901,
0.044570621103048325,
-0.005372351501137018,
0.06662853062152863,
0.00497913733124733,
0.02472987212240696,
-0.037881236523389816,
0.07686158269643784,
-0.010763653554022312,
-0.015510651282966137,
-0.07026694715023041,
-0.002702757017686963,
0.02906944416463375,
0.03369326516985893,
0.019319619983434677,
0.014781072735786438,
-0.016202330589294434,
-0.032366760075092316,
0.07462546974420547,
0.012914489023387432,
-0.03721798583865166,
0.021678907796740532,
0.022455861791968346,
0.014146245084702969,
-0.026340629905462265,
0.100056491792202,
-0.029183143749833107,
-0.01767096295952797,
-0.02332756482064724,
-0.05525847151875496,
0.049762945622205734,
-0.0016628707526251674,
-0.050028245896101,
-0.09566007554531097,
-0.009664547629654408,
0.08527541905641556,
0.007272098679095507,
0.04991454631090164,
-0.022967513650655746,
0.015510651282966137,
0.0076890005730092525,
0.005220750812441111,
-0.016012828797101974,
0.013719867914915085,
-0.006116142962127924,
-0.0581388883292675,
-0.05283286049962044,
-0.020958803594112396,
0.018580567091703415,
-0.016846632584929466,
-0.05306026339530945,
-0.06624952703714371,
0.024047669023275375,
0.02336546592414379,
0.01738671027123928,
-0.02992219850420952,
-0.027989288792014122,
-0.010545726865530014,
0.04305461421608925,
0.025203624740242958,
0.03071810118854046,
0.042751412838697433,
-0.013407191261649132,
0.05074835196137428,
0.03983309864997864,
0.01888376846909523,
-0.021849457174539566,
0.005097575020045042,
0.042978812009096146,
0.03441337123513222,
-0.005580802448093891,
-0.008503854274749756,
-0.019101694226264954,
-0.03191195800900459,
0.030585451051592827,
-0.011047904379665852,
0.01574752852320671,
0.07015324383974075,
0.019291196018457413,
0.03181720897555351,
0.037047434598207474,
-0.008664930239319801,
0.07322315871715546,
0.007163135334849358,
-0.03786228597164154,
-0.04604872688651085,
-0.0581388883292675,
0.007816913537681103,
-0.014563146978616714,
-0.014942148700356483,
-0.018078388646245003,
0.05029354989528656,
-0.0541214682161808,
0.02546892687678337,
-0.03814654052257538,
-0.04570762440562248,
0.029562145471572876,
-0.033067911863327026,
-0.024142419919371605,
-0.01976494863629341,
0.05014194920659065,
-0.0007485286914743483,
-0.03769173473119736,
0.0540456660091877,
-0.012819738127291203,
0.037104282528162,
0.025506826117634773,
-0.021432556211948395,
0.014695798046886921,
0.03331426531076431,
-0.0690162405371666,
-0.015690676867961884,
0.00760846259072423,
0.010934203863143921,
-0.03471657261252403,
-0.00498861214146018,
0.007788488641381264,
0.009702447801828384,
-0.026947032660245895,
-0.008807055652141571,
-0.11536817252635956,
-0.01836264133453369,
0.005334451328963041,
0.05290866270661354,
-0.04491172358393669,
-0.011351105757057667,
-0.0640513151884079,
0.017585687339305878,
0.017832038924098015,
0.010138300247490406,
0.012080684304237366,
0.007537399884313345,
0.04350941628217697,
-0.030774952843785286,
-0.0029396333266049623,
-0.0275344867259264,
-0.027174433693289757,
-0.002387711778283119,
-0.04642773047089577,
-0.011104755103588104,
-0.05817678943276405,
0.005666078068315983,
0.027174433693289757,
-0.0027690825518220663,
-0.015349576249718666,
0.05753248557448387,
-0.03149505704641342,
-0.005628177896142006,
0.023763418197631836,
0.05745668336749077,
0.07466337084770203,
-0.013748292811214924,
-0.010261476039886475,
-0.04881544038653374,
0.041576504707336426,
-0.014809498563408852,
-0.03066125139594078,
-0.02323281578719616,
0.019025893881917,
0.07329896092414856,
-0.020314499735832214,
0.014648422598838806,
-0.0010387019719928503,
0.0440400168299675,
0.043585214763879776,
-0.05476577207446098,
-0.019651247188448906,
-0.003922669216990471,
-0.011076330207288265,
-0.01719721034169197,
0.002339152153581381,
0.017140360549092293,
0.013843043707311153,
0.11332155764102936,
0.05556167662143707,
0.030774952843785286,
0.06659062951803207,
0.03043385036289692,
-0.040932200849056244,
-0.034849222749471664,
-0.0038373940624296665,
-0.038298141211271286,
-0.0026790695264935493,
-0.03242361173033714,
0.053780365735292435,
-0.04983874782919884,
-0.00677939597517252,
-0.05074835196137428,
0.015245350077748299,
0.001176682417280972,
0.05942749232053757,
-0.04748893529176712,
-0.024483520537614822,
-0.04589712619781494,
0.001134044723585248,
-0.014449446462094784,
0.013625117018818855,
0.025298375636339188,
-0.011038430035114288,
0.07928719371557236,
-0.007760063279420137,
0.04851223900914192,
-0.006755708251148462,
-0.013132414780557156,
0.02071245200932026,
-0.05935169383883476,
0.008338041603565216,
-0.061208803206682205,
-0.053780365735292435,
0.021394655108451843,
-0.00593611691147089,
-0.003249941160902381,
0.03537982329726219,
0.008830743841826916,
0.019044844433665276,
-0.006627795286476612,
0.007603724952787161,
-0.016117054969072342,
-0.004543284885585308,
0.0400983989238739,
-0.02056085132062435,
0.052378058433532715,
0.008091690018773079,
0.028879942372441292,
0.040363699197769165,
-0.01570962741971016,
0.013625117018818855,
0.005481314845383167,
-0.00438220938667655,
-0.03181720897555351,
-0.010413076728582382,
-0.05984439700841904,
-0.000013592621144198347,
0.0341101698577404,
-0.040932200849056244,
0.02192525938153267,
0.010811028070747852,
0.05768408626317978,
-0.00019335017714183778,
-0.06227000802755356,
-0.04445692151784897,
0.057797785848379135,
-0.08519962430000305,
-0.013331390917301178,
-0.04263770952820778,
0.00498861214146018,
-0.04862594231963158,
0.0061587803065776825,
-0.01748146116733551,
0.04415372014045715,
-0.04824693873524666,
-0.0571155808866024,
0.012942913919687271,
-0.00834751594811678,
-0.07538346946239471,
0.06772763282060623,
0.008816530928015709,
0.002484831027686596,
0.028197739273309708,
0.007954302243888378,
-0.013018714264035225,
0.016562381759285927,
-0.00606402987614274,
-0.019518597051501274,
0.005964541807770729,
-0.03075600229203701,
-0.04654143005609512,
0.006087717600166798,
-0.047564733773469925,
0.0386013425886631,
0.015955979004502296,
-0.03369326516985893,
-0.0310781542211771,
0.0460108257830143,
0.01669503189623356,
-0.011834333650767803,
-0.009451359510421753,
-0.0044509032741189,
0.018476340919733047,
-0.009385033510625362,
-0.053780365735292435,
-0.01836264133453369,
0.09293126314878464,
0.04873964190483093,
0.056584980338811874,
0.013937793672084808,
-0.004259033594280481,
0.002840145258232951,
-0.01771833747625351,
0.03295421227812767,
-0.03748328611254692,
-0.030414899811148643,
-0.0822434052824974,
0.040932200849056244,
-0.019575446844100952,
0.014563146978616714,
0.019044844433665276,
0.059010591357946396,
-0.053780365735292435,
0.003451285883784294,
-0.0028117201291024685,
0.04862594231963158,
0.06662853062152863,
0.023990819230675697,
0.03329531475901604,
0.012706037610769272,
0.038961391896009445,
0.045745525509119034,
-0.008243290707468987,
-0.0005889333551749587,
-0.0460866279900074,
0.012658662162721157,
0.01308503933250904,
0.03248045966029167,
0.014932673424482346,
-0.06299011409282684,
0.023592866957187653,
-0.03268891200423241,
0.07185875624418259,
0.07830178737640381,
0.028444090858101845,
0.036668431013822556,
0.008465954102575779,
0.017936263233423233,
0.033124763518571854,
-0.017964689061045647,
-0.05014194920659065,
0.060412898659706116,
-0.033863816410303116,
-0.02906944416463375,
-0.025184674188494682,
-0.003894244320690632,
-0.001383356866426766,
0.020485050976276398,
-0.006912046577781439,
0.016117054969072342,
-0.021015653386712074,
-0.005111787933856249,
-0.023251764476299286,
-0.01598440483212471,
0.0023284927010536194,
0.0780743882060051,
0.017092984169721603,
-0.03971939533948898,
-0.023479165509343147,
0.0027785575948655605,
0.037653837352991104,
0.0073431613855063915,
-0.07352636009454727,
-0.005277601070702076,
0.006144567858427763,
-0.005410251673310995,
0.021375706419348717,
-0.003941619303077459,
0.02103460393846035,
0.01859951764345169,
0.039946798235177994,
0.04441902041435242,
-0.019651247188448906,
0.015207449905574322,
0.019186969846487045,
-0.04161440581083298,
0.06803083419799805,
-0.03291631117463112,
0.04313041269779205,
-0.03589147701859474,
-0.027326034381985664,
0.055220574140548706,
0.0059882295317947865,
0.047375235706567764,
-0.013445091433823109,
-0.006172993220388889,
-0.024104518815875053,
-0.0032546785660088062,
0.01738671027123928,
-0.03960569575428963,
0.05211275815963745,
0.015302200801670551,
-0.02126200497150421,
-0.02581002749502659,
0.022702211514115334,
0.0032001971267163754,
-0.018817443400621414,
-0.007537399884313345,
-0.0033399539534002542,
-0.03945409506559372,
-0.042751412838697433,
-0.015112699940800667,
-0.0014236257411539555,
0.028500940650701523,
-0.031438205391168594,
-0.010233050212264061,
0.009389771148562431,
0.0270607341080904,
-0.03922669589519501,
0.06374811381101608,
0.00568976579234004,
0.046768832951784134,
-0.026056379079818726,
-0.06253530830144882,
-0.020087098702788353,
0.02524152398109436,
-0.03934039548039436,
0.04881544038653374,
-0.006177730392664671,
-0.02603742852807045,
0.030490700155496597,
0.02893679402768612,
0.028349339962005615,
-0.017282485961914062,
-0.02842514030635357,
0.008570180274546146,
-0.022171609103679657,
0.008489642292261124,
0.007238935679197311,
-0.055789075791835785,
-0.00028247482259757817,
-0.027799786999821663,
0.03407226875424385,
0.06746233254671097,
0.004396421834826469,
-0.0007568193832412362,
0.06746233254671097,
-0.016012828797101974,
-0.015321150422096252,
0.05472787097096443,
0.010270950384438038,
0.016230754554271698,
-0.02080720290541649,
-0.041766006499528885,
0.05014194920659065,
0.02332756482064724,
-0.006030867341905832,
-0.020409250631928444,
0.0330110639333725,
-0.024521421641111374,
0.03649787977337837,
-0.05832839012145996,
-0.055826976895332336,
0.0639755129814148,
0.06439241766929626,
-0.04187970608472824,
0.000034828201023628935,
-0.011701682582497597,
-0.042561911046504974,
-0.052150659263134,
0.006902571767568588,
0.02061770111322403,
-0.02865254133939743,
-0.05556167662143707,
-0.019499646499753,
0.03011169843375683,
-0.053098164498806,
0.015264300629496574,
-0.021849457174539566,
0.015690676867961884,
-0.04881544038653374,
0.019594397395849228,
0.01308503933250904,
0.035133473575115204,
0.06272481381893158,
-0.02374446764588356,
-0.0009066435741260648,
0.01341666653752327,
-0.005632915534079075,
0.03808968886733055,
-0.007963776588439941,
0.03500082343816757,
0.009313970804214478,
0.0182773657143116,
0.023687617853283882,
-0.03104025311768055,
-0.024995174258947372,
0.021603107452392578,
-0.006575682666152716,
-0.012999764643609524,
-0.019149070605635643,
0.021906308829784393,
-0.011597457341849804,
0.015880178660154343,
-0.02776188775897026,
-0.044570621103048325,
-0.026245879009366035,
0.051771655678749084,
0.05427306890487671,
-0.086185023188591,
-0.07693737745285034,
0.004467484541237354,
0.0731094628572464,
-0.021716807037591934,
-0.04889124259352684,
0.059995997697114944,
0.02131885476410389,
-0.004846486262977123,
-0.014544197358191013,
-0.019044844433665276,
-0.04464641958475113,
0.00427798368036747,
0.024900423362851143,
0.02154625579714775,
0.005367613863199949,
0.00411453889682889,
0.041766006499528885,
0.01626865565776825,
-0.0330868624150753,
0.02842514030635357,
-0.02004919946193695,
0.029884297400712967,
0.07041855156421661,
-0.011085804551839828,
-0.025999529287219048,
0.054386768490076065,
-0.0034820798318833113,
-0.022607462480664253,
0.008186440914869308,
0.05965489521622658,
-0.008105902932584286,
0.00427798368036747,
-0.04369891434907913,
0.030585451051592827,
-0.020579801872372627,
0.046768832951784134,
-0.02543102577328682
] |
52,282 |
flexget.manager
|
acquire_lock
|
:param bool event: If True, the 'manager.lock_acquired' event will be fired after a lock is obtained
|
def execute(
self,
options: Optional[Union[dict, argparse.Namespace]] = None,
priority: int = 1,
suppress_warnings: Optional[Sequence[str]] = None,
) -> List[Tuple[str, str, threading.Event]]:
"""
Run all (can be limited with options) tasks from the config.
:param options: Either an :class:`argparse.Namespace` instance, or a dict, containing options for execution
:param priority: If there are other executions waiting to be run, they will be run in priority order,
lowest first.
:param suppress_warnings: Allows suppressing log warning about missing plugin in key phases
:returns: a list of :class:`threading.Event` instances which will be
set when each respective task has finished running
"""
if options is None:
options = copy.copy(self.options.execute)
elif isinstance(options, dict):
options_namespace = copy.copy(self.options.execute)
options_namespace.__dict__.update(options)
options = options_namespace
task_names = self.tasks
# Only reload config if daemon
config_hash = self.hash_config()
if self.is_daemon and self.autoreload_config and self.config_file_hash != config_hash:
logger.info('Config change detected. Reloading.')
try:
self.load_config(output_to_console=False, config_file_hash=config_hash)
logger.info('Config successfully reloaded!')
except Exception as e:
logger.error('Reloading config failed: {}', e)
# Handle --tasks
if options.tasks:
# Consider '*' the same as not specifying any tasks.
# (So manual plugin doesn't consider them explicitly enabled.)
if options.tasks == ['*']:
options.tasks = None
else:
task_names = []
for task in options.tasks:
try:
task_names.extend(
m for m in self.matching_tasks(task) if m not in task_names
)
except ValueError as e:
logger.error(e)
continue
options.tasks = task_names
# TODO: 1.2 This is a hack to make task priorities work still, not sure if it's the best one
task_names = sorted(
task_names, key=lambda t: self.config['tasks'][t].get('priority', 65535)
)
finished_events = []
for task_name in task_names:
task = Task(
self,
task_name,
options=options,
output=get_console_output(),
session_id=flexget.log.get_log_session_id(),
priority=priority,
suppress_warnings=suppress_warnings,
)
self.task_queue.put(task)
finished_events.append((task.id, task.name, task.finished_event))
return finished_events
|
(self, event: bool = True) -> Iterator
|
[
0.04456616938114166,
0.038119491189718246,
-0.03797934576869011,
-0.06534769386053085,
0.032093245536088943,
0.010040401481091976,
-0.03629760071635246,
-0.008608918637037277,
0.013403885997831821,
-0.03894034028053284,
0.011722143739461899,
-0.017217837274074554,
0.012723180465400219,
-0.01811877079308033,
0.020561300218105316,
0.01778842695057392,
0.01693754643201828,
0.023184016346931458,
-0.02612706646323204,
-0.016326913610100746,
0.06426657736301422,
-0.0341954231262207,
-0.0025376288685947657,
-0.010125488974153996,
0.0164170078933239,
-0.013974476605653763,
0.05773981660604477,
-0.062024254351854324,
-0.023224059492349625,
0.019570274278521538,
-0.030011089518666267,
0.03255372494459152,
-0.026267211884260178,
0.021181942895054817,
-0.013584072701632977,
-0.005801009479910135,
-0.026727687567472458,
0.08408711105585098,
0.01867935061454773,
0.040221668779850006,
-0.0031257381197065115,
-0.04644811898469925,
0.025126028805971146,
-0.03063173219561577,
-0.02156233787536621,
0.034575819969177246,
0.01002538576722145,
0.05469666048884392,
-0.00015218890621326864,
-0.07583856582641602,
0.05117301270365715,
-0.02899003215134144,
-0.02252333238720894,
0.02438526228070259,
-0.023384224623441696,
0.07115370780229568,
0.053295210003852844,
0.040221668779850006,
0.06246471032500267,
-0.04572737216949463,
0.05349541828036308,
0.041803304105997086,
0.0011587003245949745,
0.03099210560321808,
0.01947017014026642,
-0.018519185483455658,
-0.0019582787062972784,
-0.011742164380848408,
-0.004309464246034622,
0.053815748542547226,
-0.01167209167033434,
-0.046928614377975464,
0.010911303572356701,
-0.06142362952232361,
0.036417726427316666,
-0.012823283672332764,
-0.03974116966128349,
-0.008493798784911633,
0.012182620353996754,
0.010040401481091976,
-0.05589790642261505,
0.04276430234313011,
0.02616710774600506,
0.04188339039683342,
0.026207149028778076,
0.019810521975159645,
-0.0013889388646930456,
-0.027728725224733353,
-0.00069947459269315,
-0.054015956819057465,
0.024044908583164215,
0.014044549316167831,
-0.010180545970797539,
0.03447571396827698,
-0.021282047033309937,
0.01651711016893387,
-0.032813992351293564,
-0.03125237673521042,
-0.02648743987083435,
-0.03839977830648422,
-0.030771877616643906,
-0.03783920034766197,
0.033534739166498184,
-0.04492654278874397,
0.013814310543239117,
-0.03988131508231163,
-0.043765340000391006,
0.024965863674879074,
-0.021121880039572716,
0.006917165592312813,
-0.011842267587780952,
0.06795039027929306,
-0.0005508831818588078,
-0.029991067945957184,
-0.002875478705391288,
-0.04644811898469925,
-0.06126346439123154,
0.01654714159667492,
-0.03966108709573746,
-0.04404562711715698,
-0.024165034294128418,
0.030251339077949524,
0.009820173494517803,
0.02498588338494301,
-0.0481298603117466,
0.033434636890888214,
-0.048169899731874466,
0.009915271773934364,
0.045807454735040665,
-0.04280434176325798,
0.05305496230721474,
-0.008769083768129349,
0.02842945046722889,
0.02048121765255928,
0.028149161487817764,
-0.02780880779027939,
0.018429091200232506,
0.044005587697029114,
0.017347970977425575,
-0.035536814481019974,
0.02796897478401661,
-0.01060098223388195,
0.019249942153692245,
-0.01549605280160904,
0.039340753108263016,
-0.01575632207095623,
0.0033434636425226927,
-0.0328940749168396,
0.028929969295859337,
-0.020501237362623215,
0.041803304105997086,
0.0029580644331872463,
-0.0318329781293869,
0.0111915934830904,
-0.00724750803783536,
-0.0037714068312197924,
0.014645171351730824,
-0.012843305245041847,
0.006716958247125149,
-0.039080485701560974,
-0.011612029746174812,
-0.015125669538974762,
0.019390087574720383,
0.02012084424495697,
-0.008053342811763287,
-0.01375424861907959,
0.022042835131287575,
0.08472777158021927,
0.027908911928534508,
0.027388373389840126,
0.01452504750341177,
0.04208359494805336,
0.027908911928534508,
0.062184419482946396,
-0.06855101138353348,
0.056178197264671326,
-0.008483788929879665,
0.006807051599025726,
-0.013173647224903107,
-0.03747882694005966,
-0.039801232516765594,
-0.013353833928704262,
0.013153626583516598,
-0.061824046075344086,
0.038419801741838455,
0.043404966592788696,
0.050732556730508804,
0.05986201390624046,
-0.057659730315208435,
-0.024165034294128418,
-0.008538845926523209,
-0.043044593185186386,
-0.000536806124728173,
0.006731973960995674,
0.0040391841903328896,
0.015936508774757385,
-0.096499964594841,
-0.0014089596224948764,
0.03397519513964653,
-0.018128780648112297,
0.01544600073248148,
-0.03849988430738449,
0.04977155849337578,
0.004654821939766407,
0.006541776936501265,
0.014985524117946625,
0.008328627794981003,
-0.0375589095056057,
0.012232672423124313,
-0.005430625751614571,
0.006877124309539795,
-0.06098317354917526,
-0.07703980803489685,
0.007497766986489296,
0.02905009500682354,
0.01026062946766615,
0.04292446747422218,
0.024605490267276764,
-0.032453618943691254,
0.029390446841716766,
0.06154375523328781,
0.021582357585430145,
0.05773981660604477,
0.037138473242521286,
0.015636198222637177,
0.04885060712695122,
0.0481298603117466,
-0.038720112293958664,
0.052174050360918045,
0.05357550084590912,
0.02274356037378311,
-0.010440816171467304,
-0.02268349938094616,
-0.018539205193519592,
0.04660828411579132,
0.0041017490439116955,
-0.005605807062238455,
-0.03719853609800339,
0.0012531732209026814,
0.055457450449466705,
-0.004474635235965252,
0.0030381472315639257,
-0.0410425178706646,
-0.06070288270711899,
0.004619785584509373,
-0.016627224162220955,
-0.029530592262744904,
0.01808873936533928,
0.016987597569823265,
0.01950020156800747,
0.031332459300756454,
-0.023724576458334923,
0.01132172904908657,
-0.004041687119752169,
-0.11932361125946045,
0.03469594195485115,
0.02202281355857849,
-0.04176326468586922,
0.05501699447631836,
0.0007758036954328418,
0.037859220057725906,
-0.005425620824098587,
0.016797401010990143,
0.06622860580682755,
0.01778842695057392,
0.002168496372178197,
-0.010921313427388668,
-0.09329664707183838,
-0.004779951646924019,
0.01562618836760521,
0.05065247416496277,
0.026087025180459023,
-0.060182344168424606,
0.0061713932082057,
-0.026507459580898285,
0.024445323273539543,
0.019259952008724213,
-0.019390087574720383,
0.0009272105526179075,
-0.008163456805050373,
0.03940081596374512,
0.011401811614632607,
-0.013243719935417175,
-0.0005405599949881434,
0.04720890522003174,
-0.009860214777290821,
-0.01729791983962059,
0.03207322582602501,
0.0035336606670171022,
0.023103933781385422,
0.038620006293058395,
0.018098749220371246,
0.03085196018218994,
-0.06650889664888382,
0.04776948690414429,
0.005385579075664282,
-0.0742369070649147,
-0.029430488124489784,
0.03894034028053284,
-0.008513819426298141,
0.029590653255581856,
-0.049811601638793945,
-0.009439779445528984,
-0.024525407701730728,
0.014635161496698856,
0.05013193190097809,
0.053615543991327286,
-0.050011809915304184,
0.04776948690414429,
-0.04548712074756622,
0.07591864466667175,
-0.032874055206775665,
0.020541278645396233,
-0.007527798414230347,
0.0517335943877697,
-0.007948233745992184,
0.050372183322906494,
0.007172430399805307,
-0.018819496035575867,
0.00874906312674284,
-0.09810163080692291,
0.06294520944356918,
0.021882670000195503,
-0.018599268049001694,
0.04568732902407646,
0.023003829643130302,
-0.055097077041864395,
0.053255170583724976,
-0.00015539534797426313,
-0.0017718354938551784,
0.019390087574720383,
-0.026767728850245476,
-0.005225413013249636,
0.007277538999915123,
-0.03968110680580139,
-0.019900616258382797,
0.008704016916453838,
0.03601730987429619,
0.022263063117861748,
-0.05950164049863815,
-0.0002921776904258877,
0.08088379353284836,
-0.02688785456120968,
0.07828109711408615,
0.0025726652238518,
0.007257518358528614,
0.015776343643665314,
0.016036612913012505,
0.04829002544283867,
-0.08825141936540604,
0.04220372065901756,
0.014735264703631401,
-0.05269458889961243,
0.06390620023012161,
0.035636916756629944,
-0.041603099554777145,
0.0553373247385025,
-0.041643138974905014,
0.026767728850245476,
-0.06730972975492477,
-0.0482499822974205,
-0.05317508429288864,
0.022243041545152664,
0.004171821754425764,
0.009349686093628407,
-0.02284366451203823,
0.011722143739461899,
-0.019259952008724213,
0.05305496230721474,
-0.03381503000855446,
0.026046983897686005,
0.06434665620326996,
0.010310681536793709,
-0.035536814481019974,
0.021262025460600853,
-0.02678775042295456,
-0.01660720445215702,
0.019590293988585472,
-0.015355907380580902,
-0.04552716389298439,
-0.005881092511117458,
0.012993460521101952,
0.017247866839170456,
-0.014254767447710037,
-0.06490723788738251,
-0.037899259477853775,
0.022563373669981956,
-0.01342390663921833,
-0.0008658969891257584,
-0.0066619012504816055,
-0.00392156234011054,
0.007738016080111265,
-0.04264417663216591,
0.008258555084466934,
-0.012953419238328934,
-0.005806014873087406,
-0.02668764628469944,
0.0625447928905487,
-0.03972114995121956,
-0.01775839738547802,
-0.0247456356883049,
-0.05265454575419426,
0.06887134909629822,
0.02264345809817314,
0.058220311999320984,
-0.008258555084466934,
0.03827965632081032,
0.007482751738280058,
0.017738375812768936,
0.05213400721549988,
0.0060612792149186134,
-0.006191413849592209,
-0.06710951775312424,
0.015646208077669144,
-0.06718960404396057,
-0.007127383723855019,
-0.040061499923467636,
0.013734227977693081,
0.022503312677145004,
-0.021742524579167366,
-0.03617747873067856,
-0.0014014517655596137,
0.015105648897588253,
-0.003703837050125003,
0.06286512315273285,
-0.016066644340753555,
0.008678991347551346,
0.03207322582602501,
-0.04592757672071457,
-0.01444496400654316,
-0.042524050921201706,
0.04660828411579132,
-0.028149161487817764,
0.0073676323518157005,
0.058540645986795425,
-0.03747882694005966,
0.05737944319844246,
-0.01677737943828106,
0.06034250929951668,
-0.008699011988937855,
-0.08408711105585098,
0.0311522725969553,
0.016296882182359695,
-0.03946087881922722,
0.017047660425305367,
-0.000805834773927927,
-0.0043244799599051476,
0.03393515571951866,
-0.00838868971914053,
-0.026807771995663643,
-0.007697974797338247,
0.05357550084590912,
0.02786887064576149,
-0.025746671482920647,
-0.01798863522708416,
-0.08176470547914505,
-0.03427550569176674,
0.03315434604883194,
-0.09417755901813507,
-0.024965863674879074,
-0.00899431761354208,
-0.06783026456832886,
-0.019320014864206314,
-0.04312467575073242,
0.0024137503933161497,
-0.04396554455161095,
0.020821569487452507,
0.0164170078933239,
-0.02232312597334385,
-0.021161923184990883,
0.06390620023012161,
-0.008413716219365597,
-0.020821569487452507,
0.03573702275753021,
-0.09577921777963638,
-0.011712132953107357,
0.05357550084590912,
0.0031807951163500547,
0.006351579912006855,
-0.05009189248085022,
0.09009332954883575,
0.011151552200317383,
0.020411144942045212,
0.025126028805971146,
-0.0375589095056057,
-0.06843089312314987,
0.08056345582008362,
-0.06795039027929306,
-0.014134642668068409,
-0.023023851215839386,
-0.01447499543428421,
-0.10699083656072617,
0.05589790642261505,
-0.004254407249391079,
-0.00007394378917524591,
-0.049090854823589325,
0.0011142793809995055,
-0.002755354391410947,
0.0317729152739048,
0.0287898238748312,
0.07892175763845444,
0.023944804444909096,
-0.02146223373711109,
0.03443567454814911,
0.040782246738672256,
0.01768832467496395,
-0.0018168821698054671,
0.05613815411925316,
-0.10162527859210968,
-0.021342109888792038,
-0.05097280442714691,
-0.000730757019482553,
0.04176326468586922,
-0.08012299984693527,
0.024145012721419334,
-0.05373566597700119,
-0.027588579803705215,
0.008949270471930504,
0.014404922723770142,
-0.01060098223388195,
-0.02042115479707718,
0.01670730859041214,
-0.03681814298033714,
0.09145474433898926,
-0.006852098274976015,
0.01670730859041214,
-0.005097780842334032,
0.0211419016122818,
0.010851241648197174,
0.04788960888981819,
-0.019620325416326523,
-0.03930071368813515,
-0.019900616258382797,
-0.04368525370955467,
0.005195382051169872,
0.028469491750001907,
-0.03829967603087425,
0.035696979612112045,
-0.05902114138007164,
-0.0019219911191612482,
-0.00526044936850667,
0.010711096227169037,
0.02274356037378311,
0.014194704592227936,
-0.03327447175979614,
-0.001030442421324551,
0.020441176369786263,
0.004654821939766407,
0.044886499643325806,
-0.005730936769396067,
0.022543353959918022,
0.009334670379757881,
0.041082557290792465,
0.06446678191423416,
-0.031192313879728317,
-0.08012299984693527,
0.03833971917629242,
0.012743201106786728,
0.010470847599208355,
0.037338681519031525,
-0.0017192810773849487,
0.016336923465132713,
-0.11531946063041687,
0.006316543556749821,
-0.007988275028765202,
0.017518147826194763,
-0.0026001937221735716,
-0.0003885274927597493,
0.016326913610100746,
0.009614960290491581,
-0.01239283848553896,
-0.013353833928704262,
-0.0071974559687078,
-0.0859290137887001,
-0.014775305986404419,
0.049811601638793945,
0.04540703818202019,
-0.01096135564148426,
-0.016847452148795128,
-0.02025097794830799,
-0.03253370150923729,
-0.03069179505109787,
0.016406996175646782,
0.005405599717050791,
-0.057459525763988495,
-0.010580961592495441,
0.025166070088744164,
-0.004294448997825384,
0.023744598031044006,
0.02678775042295456,
0.022182980552315712,
0.01782847009599209,
0.04176326468586922,
0.0011530695483088493,
-0.010300670750439167,
-0.02068142406642437,
0.00017017629579640925,
-0.018599268049001694,
0.011311718262732029,
-0.03551679477095604,
-0.022703519091010094,
-0.03191306069493294,
0.05177363380789757,
-0.034916169941425323,
0.015225772745907307,
-0.029810883104801178,
-0.0074727414175868034,
-0.05121305212378502,
-0.02678775042295456,
0.07131388038396835,
-0.005851061549037695,
-0.020301030948758125,
0.05569769814610481,
0.010250618681311607,
0.003608738537877798,
-0.013664155267179012,
-0.007717995438724756,
0.06610848754644394,
0.0033634842839092016,
-0.06586823612451553,
0.027888890355825424,
0.0870501771569252,
-0.0007019772310741246,
-0.006877124309539795,
-0.04140289127826691,
0.00932465959340334,
-0.07251512259244919,
-0.06158379837870598,
-0.01940009742975235,
0.03319438546895981,
0.026267211884260178,
-0.037899259477853775,
-0.012953419238328934,
-0.02484573796391487,
-0.02320403791964054,
-0.06022238731384277,
0.018238894641399384,
0.007182440720498562,
-0.004945122636854649,
-0.07944229990243912,
0.07551823556423187,
-0.03341461718082428,
0.0028954995796084404,
0.0015253301244229078,
0.02971077896654606,
-0.01565621979534626,
-0.037078410387039185,
0.011592008173465729,
0.023003829643130302,
0.011281686834990978,
-0.014735264703631401,
0.04132280871272087,
-0.07715993374586105,
0.06915163993835449,
-0.03747882694005966,
0.06414645165205002,
-0.030972085893154144,
-0.060022179037332535,
-0.05101284757256508,
0.02428515814244747,
-0.009629976004362106,
0.009820173494517803,
-0.0657881498336792,
0.019810521975159645,
-0.017608240246772766,
-0.04624791070818901,
-0.02868972159922123,
0.02720818668603897,
-0.0363776832818985,
0.032974157482385635,
0.042003512382507324,
-0.09265598654747009,
0.04732903093099594,
0.038119491189718246,
0.010080442763864994,
-0.008028317242860794,
-0.035797081887722015,
0.011531946249306202,
-0.047809526324272156,
-0.05025205761194229,
-0.006741984281688929,
-0.00838868971914053,
0.011511925607919693,
-0.012402848340570927,
-0.020921673625707626,
0.00306067056953907,
0.042163677513599396,
-0.0504923053085804,
0.024445323273539543,
-0.005077760200947523,
0.034575819969177246,
0.0693918839097023,
-0.01024060882627964,
0.014054560102522373,
0.02252333238720894,
0.001988309668377042,
-0.05081263929605484,
-0.024405281990766525,
0.011141542345285416,
-0.01913982816040516,
0.02012084424495697,
-0.05321512743830681,
-0.02264345809817314,
0.007657933048903942,
0.03629760071635246,
0.019209900870919228,
-0.032974157482385635,
0.00810839980840683,
0.020200926810503006,
0.019179869443178177,
0.015285835601389408,
0.035636916756629944,
-0.012082517147064209,
0.0001368605298921466,
-0.038459841161966324,
-0.007237497717142105,
0.05281471088528633,
-0.00724750803783536,
-0.011732153594493866,
0.01270315982401371,
-0.025526443496346474,
-0.016226809471845627,
0.02278360165655613,
-0.05005184933543205,
0.03547675162553787,
0.026347294449806213,
-0.01732795126736164,
-0.020411144942045212,
0.005881092511117458,
0.0066619012504816055,
-0.032153308391571045,
-0.032453618943691254,
0.046728406101465225,
0.03575704246759415,
-0.018849527463316917,
-0.01608666405081749,
0.06270495802164078,
-0.02022094838321209,
-0.04572737216949463,
0.01953023299574852,
0.031192313879728317,
-0.017247866839170456,
0.005680885165929794,
-0.02042115479707718,
0.03079189918935299,
-0.03311430290341377,
-0.01654714159667492,
0.040682144463062286,
-0.005020200740545988,
-0.01157198753207922,
-0.030211297795176506,
0.054736703634262085,
0.004241894464939833,
0.033434636890888214,
-0.013864362612366676,
0.01162203960120678,
0.021482253447175026,
-0.002840442582964897,
-0.020641382783651352,
-0.042724259197711945,
-0.02048121765255928,
-0.03541668877005577,
-0.03059169091284275,
0.03447571396827698,
0.0375589095056057,
0.0028679710812866688,
0.006316543556749821,
0.035536814481019974
] |
52,283 |
flexget.manager
|
backup_config
| null |
def backup_config(self) -> str:
backup_path = os.path.join(
self.config_base,
f'{self.config_name}-{datetime.now().strftime("%y%m%d%H%M%S")}.bak',
)
logger.debug(f'backing up old config to {backup_path} before new save')
try:
shutil.copy(self.config_path, backup_path)
except OSError as e:
logger.warning(f'Config backup creation failed: {e}')
raise
return backup_path
|
(self) -> str
|
[
0.00018123896734323353,
-0.02910766191780567,
0.03311999514698982,
-0.0165964737534523,
-0.04260369390249252,
-0.0455947071313858,
-0.03518087416887283,
-0.0032303850166499615,
0.0195145346224308,
-0.0368405245244503,
-0.031168540939688683,
-0.07090888917446136,
-0.014097883366048336,
0.01955101080238819,
0.011891099624335766,
0.005694779101759195,
0.014863874763250351,
-0.03530853986740112,
-0.015219513326883316,
0.01902211271226406,
0.0384819321334362,
-0.06999699771404266,
-0.020189335569739342,
-0.01767250895500183,
0.0501541793346405,
0.06532809883356094,
0.01765426993370056,
0.02124713361263275,
-0.026992065832018852,
-0.027958674356341362,
-0.007390901912003756,
-0.030183695256710052,
0.030256647616624832,
-0.0032030281145125628,
0.01851145178079605,
-0.01993400603532791,
-0.000010855458640435245,
0.02531418204307556,
-0.09607716649770737,
-0.05391118302941322,
0.04391682147979736,
-0.06441619992256165,
0.009447223506867886,
-0.014298500493168831,
0.04931523650884628,
0.06850148737430573,
-0.06445267796516418,
0.06795435398817062,
0.02452995255589485,
0.01666942425072193,
0.011152464896440506,
0.01612228900194168,
-0.048075057566165924,
0.042348362505435944,
-0.00501997722312808,
-0.01865735463798046,
0.08710412681102753,
-0.01966043747961521,
-0.02746625244617462,
0.006118809804320335,
-0.0025441846810281277,
-0.007719183806329966,
0.08265408128499985,
-0.022815590724349022,
0.02073647268116474,
-0.023326251655817032,
-0.07141955196857452,
-0.00952017493546009,
0.038664311170578,
0.009729910641908646,
0.053765278309583664,
-0.045631181448698044,
-0.015183037146925926,
-0.014973301440477371,
-0.030165458098053932,
-0.031241493299603462,
-0.015839600935578346,
0.005685660056769848,
0.004438644740730524,
-0.018374666571617126,
-0.09016809612512589,
-0.08046554028987885,
-0.024311097338795662,
-0.047017261385917664,
-0.015502200461924076,
0.014043170027434826,
0.013350130058825016,
-0.03640281409025192,
0.028943520039319992,
-0.00878154020756483,
0.05194149166345596,
0.011152464896440506,
0.00026758393505588174,
0.017389820888638496,
0.0403057225048542,
-0.0981198102235794,
-0.030584929510951042,
-0.01317687053233385,
0.08878201246261597,
-0.017298631370067596,
-0.052087392657995224,
-0.02172131836414337,
-0.005526078399270773,
-0.049351710826158524,
0.02137479931116104,
-0.028432859107851982,
0.011526341550052166,
-0.0016516682226210833,
-0.03375831991434097,
-0.03324766084551811,
-0.053035762161016464,
-0.009492818266153336,
-0.020244050770998,
-0.03481611981987953,
0.07448351383209229,
0.00048073919606395066,
-0.00806114450097084,
0.0021144545171409845,
-0.009584007784724236,
-0.0059820255264639854,
0.062337081879377365,
0.0049698231741786,
-0.029873652383685112,
0.029946602880954742,
-0.01867559179663658,
0.0669330283999443,
0.01825612038373947,
0.003123237518593669,
-0.04136351868510246,
-0.007568721193820238,
-0.0011147905606776476,
0.0734986662864685,
-0.0528898611664772,
0.005927311722189188,
0.057194001972675323,
-0.01964220032095909,
0.01834730990231037,
0.03709585219621658,
-0.007723743561655283,
0.05081074312329292,
0.03605629503726959,
-0.0459594652056694,
0.051613207906484604,
-0.02345391735434532,
0.04490166902542114,
-0.004365693312138319,
-0.031205017119646072,
0.024457000195980072,
0.00036475766682997346,
-0.02713797055184841,
0.07521302998065948,
0.054239463061094284,
-0.10840597748756409,
-0.052525103092193604,
-0.0035290303640067577,
-0.010951848700642586,
-0.025204753503203392,
0.030584929510951042,
-0.029855413362383842,
-0.07025232166051865,
0.01769074611365795,
0.010258808732032776,
0.046834882348775864,
-0.029946602880954742,
-0.017207441851496696,
-0.0008429321460425854,
-0.006086893379688263,
0.05055541172623634,
0.057157523930072784,
-0.0010395593708381057,
-0.031186779960989952,
-0.026736736297607422,
-0.008220725692808628,
0.04070695489645004,
-0.07783928513526917,
0.03789832070469856,
0.0027379621751606464,
-0.041327040642499924,
0.04059752821922302,
-0.045156996697187424,
-0.00910070352256298,
0.010796826332807541,
0.0061963205225765705,
0.045521754771471024,
0.04406272619962692,
-0.008631077595055103,
-0.03569153696298599,
0.0341048426926136,
0.01931391842663288,
0.0022660568356513977,
-0.007700946182012558,
0.02677321247756481,
0.03189805522561073,
-0.013505152426660061,
0.030767308548092842,
-0.06441619992256165,
-0.006273831706494093,
-0.01723479852080345,
0.03724175691604614,
0.03565506264567375,
0.011152464896440506,
-0.048257436603307724,
0.03350299224257469,
-0.055151358246803284,
0.09308615326881409,
-0.02546008490025997,
-0.0016003742348402739,
-0.03826307877898216,
-0.01645057089626789,
0.041691798716783524,
0.02283382974565029,
-0.01564810425043106,
0.013496032916009426,
-0.03917497396469116,
-0.002977334428578615,
-0.08017373085021973,
0.03932087495923042,
0.02142951264977455,
-0.012410879135131836,
0.043843869119882584,
-0.03840897977352142,
-0.01940510794520378,
-0.0010937030892819166,
0.004557190928608179,
0.002977334428578615,
0.02256026118993759,
-0.014252905733883381,
-0.059528451412916183,
0.0076416730880737305,
-0.03620219603180885,
-0.02199488691985607,
-0.0388466902077198,
0.013696650043129921,
-0.058616556227207184,
0.021320084109902382,
0.02226845547556877,
-0.009301320649683475,
-0.060403868556022644,
-0.01026792824268341,
0.02122889645397663,
-0.02418343350291252,
-0.005453126970678568,
0.048257436603307724,
0.026882639154791832,
0.07109126448631287,
-0.061425190418958664,
-0.005621827207505703,
0.005038215313106775,
0.030913211405277252,
0.0021725879050791264,
0.044500432908535004,
0.0075231269001960754,
-0.03968563303351402,
0.031916294246912,
0.006533721461892128,
-0.03563682362437248,
-0.0002671564870979637,
-0.015000659041106701,
0.043369684368371964,
0.057704661041498184,
0.0116266505792737,
-0.052014440298080444,
-0.01665118709206581,
-0.07448351383209229,
-0.02017109841108322,
0.007076298352330923,
-0.0013746804324910045,
-0.010760351084172726,
-0.00046392614603973925,
0.02345391735434532,
0.06536456942558289,
0.053473472595214844,
-0.06605761498212814,
-0.04205655679106712,
-0.008111298084259033,
-0.03643928840756416,
0.0028337109833955765,
-0.0082526421174407,
0.014836518093943596,
-0.03332061320543289,
0.030420789495110512,
-0.02246907167136669,
0.0465066023170948,
0.004582268185913563,
0.00826176069676876,
-0.0024803520645946264,
-0.0339224636554718,
-0.0662035122513771,
0.03534501791000366,
0.02204960025846958,
0.010258808732032776,
-0.016532640904188156,
0.01634114235639572,
-0.04362501576542854,
0.028086340054869652,
-0.058361224830150604,
0.02615312486886978,
-0.02057233266532421,
0.00507013127207756,
-0.008412223309278488,
-0.014334975741803646,
0.01982457935810089,
-0.05157673358917236,
0.053400520235300064,
-0.013441319577395916,
0.013824314810335636,
0.01646880805492401,
-0.00015601939230691642,
-0.017973434180021286,
0.027210921049118042,
-0.010723874904215336,
-0.0977550521492958,
0.07079946249723434,
0.014526473358273506,
0.006488126702606678,
-0.021502463147044182,
0.025897793471813202,
-0.016860922798514366,
0.028834093362092972,
-0.0068255276419222355,
-0.04161885008215904,
0.09432633221149445,
-0.061899375170469284,
0.03877373784780502,
0.03408660367131233,
-0.009032311849296093,
0.014854755252599716,
0.050591886043548584,
-0.04409920051693916,
0.027885721996426582,
-0.0459594652056694,
0.00876330304890871,
0.0019981879740953445,
0.024402286857366562,
0.03490730747580528,
-0.0002808349090628326,
-0.012529425323009491,
-0.00302520883269608,
0.001124479458667338,
-0.023928102105855942,
0.04406272619962692,
-0.005548875778913498,
0.010094667784869671,
-0.014690614305436611,
0.014207310974597931,
0.0344695970416069,
-0.030840259045362473,
0.023289775475859642,
-0.060039110481739044,
0.0455947071313858,
-0.05427594110369682,
0.012593258172273636,
-0.03251814469695091,
0.04154589772224426,
0.006820968352258205,
-0.02447523921728134,
-0.009346915408968925,
-0.030019555240869522,
-0.00014661547902505845,
0.00941986683756113,
0.02002519555389881,
-0.04242131486535072,
0.029928365722298622,
-0.0015524998307228088,
0.0197881031781435,
0.04771030321717262,
-0.0762343481183052,
0.025204753503203392,
-0.0234356801956892,
-0.057157523930072784,
0.012775637209415436,
0.048804573714733124,
0.0468713603913784,
-0.0640149712562561,
0.03326589986681938,
-0.04512052237987518,
-0.026189599186182022,
-0.022706164047122,
0.001714361016638577,
0.013523390516638756,
0.03434193506836891,
-0.021921934559941292,
0.012410879135131836,
0.01168136391788721,
0.022852066904306412,
0.015100967139005661,
0.04209303483366966,
-0.07335276156663895,
0.04099876061081886,
-0.02235964499413967,
-0.018247000873088837,
-0.0034606382250785828,
-0.03656695410609245,
0.047600872814655304,
-0.04114466533064842,
-0.023143872618675232,
0.03585567697882652,
0.006716100499033928,
0.009105263277888298,
0.0344695970416069,
0.004801122471690178,
-0.01847497560083866,
0.0007785296184010804,
-0.003640737384557724,
0.012255857698619366,
-0.007951716892421246,
0.00265133217908442,
0.057157523930072784,
0.023563344031572342,
0.005074691027402878,
-0.02901647239923477,
-0.01635938137769699,
0.007577840238809586,
0.02161189168691635,
0.030420789495110512,
0.02704678103327751,
-0.040852855890989304,
-0.05241567641496658,
0.014562949538230896,
-0.03680404648184776,
-0.015082729049026966,
0.055151358246803284,
0.02695559151470661,
-0.04070695489645004,
0.026609070599079132,
0.04223893582820892,
-0.03434193506836891,
0.016660306602716446,
-0.08002783358097076,
-0.0021372518967837095,
0.04727259278297424,
-0.01003995444625616,
-0.008576364256441593,
0.0631030723452568,
0.01774545945227146,
0.004167356062680483,
0.0798819288611412,
-0.06853796541690826,
-0.048439815640449524,
0.0320986732840538,
-0.01599462330341339,
-0.01210083533078432,
0.011809028685092926,
-0.0017553962534293532,
-0.02310739830136299,
0.045156996697187424,
-0.028250480070710182,
-0.04391682147979736,
0.10162148624658585,
0.030803784728050232,
-0.03153330087661743,
-0.01958748698234558,
-0.006255593616515398,
-0.031150303781032562,
-0.026900876313447952,
0.02130184695124626,
0.012292332947254181,
-0.07411875575780869,
-0.014471760019659996,
0.03144210949540138,
-0.005124845076352358,
0.02091885171830654,
0.07335276156663895,
0.0234356801956892,
0.04278607293963432,
-0.052525103092193604,
0.03560034558176994,
0.05409356206655502,
0.012128192000091076,
0.011143346317112446,
-0.006697862409055233,
-0.02090061455965042,
-0.03694995120167732,
0.0747753232717514,
-0.014316737651824951,
0.0024985899217426777,
-0.007723743561655283,
0.03888316452503204,
0.021174181252717972,
0.009014073759317398,
-0.022304929792881012,
-0.01874854415655136,
-0.04344263672828674,
0.02111946791410446,
0.03125973045825958,
-0.03195277228951454,
-0.025897793471813202,
0.03512616083025932,
-0.04493814334273338,
0.047856204211711884,
-0.00026986366719938815,
0.01603109948337078,
-0.051832061260938644,
0.02423814684152603,
-0.054859552532434464,
0.014681495726108551,
-0.03800774738192558,
0.03443312272429466,
0.017353344708681107,
-0.015128323808312416,
0.02369100973010063,
-0.029837176203727722,
-0.03401365131139755,
0.03459726274013519,
-0.059382546693086624,
0.012766517698764801,
-0.07871470600366592,
0.01280299387872219,
0.002562422538176179,
0.01840202324092388,
-0.02035347744822502,
0.00979374349117279,
-0.048804573714733124,
0.027849247679114342,
-0.01871206797659397,
-0.024256384000182152,
-0.03870078921318054,
-0.0007278054836206138,
0.041035234928131104,
-0.027648629620671272,
-0.03138739615678787,
0.02274264022707939,
0.01871206797659397,
-0.050664838403463364,
-0.04388034716248512,
0.005247950553894043,
0.062300607562065125,
-0.02752096578478813,
-0.04238484054803848,
0.0627383142709732,
-0.03881021589040756,
0.0074820914305746555,
0.077328622341156,
0.052816908806562424,
0.050117701292037964,
0.0428590252995491,
-0.04362501576542854,
-0.002678689081221819,
-0.03607453405857086,
-0.03286466374993324,
0.0005944410222582519,
-0.06605761498212814,
0.04271312057971954,
-0.03645752742886543,
-0.046652503311634064,
0.02411048114299774,
0.000037152563891140744,
0.0011649447260424495,
-0.02124713361263275,
-0.027812771499156952,
0.041035234928131104,
0.017134491354227066,
0.055917348712682724,
0.0013370647793635726,
0.009729910641908646,
-0.055005453526973724,
0.00886361114680767,
0.02152070216834545,
0.023326251655817032,
0.041035234928131104,
-0.05259805545210838,
0.025095326825976372,
0.03673109784722328,
0.02573365345597267,
-0.0008378027705475688,
0.0009198732441291213,
-0.009401628747582436,
0.02330801449716091,
0.004399889148771763,
-0.010304403491318226,
0.0415823720395565,
0.01876678131520748,
0.08739593625068665,
-0.04537585377693176,
-0.02516827918589115,
0.010906253941357136,
0.07090888917446136,
0.03632986173033714,
-0.009356033988296986,
0.047017261385917664,
0.02059056982398033,
-0.009830218739807606,
0.03505321219563484,
0.02254202403128147,
-0.013933742418885231,
-0.03623867407441139,
0.000026056663045892492,
0.029290039092302322,
-0.06368668377399445,
0.005808765534311533,
-0.03395893797278404,
0.08870906382799149,
-0.01210083533078432,
-0.058142371475696564,
0.01849321275949478,
-0.04041514918208122,
0.024347573518753052,
-0.06846500933170319,
0.01785488799214363,
0.016915636137127876,
0.011097751557826996,
-0.009082465432584286,
0.055151358246803284,
0.02055409364402294,
-0.01964220032095909,
0.04555823281407356,
-0.029454180970788002,
-0.01911330036818981,
0.0002932309580501169,
0.02516827918589115,
0.0008087361347861588,
0.01780017279088497,
0.005029096268117428,
-0.021502463147044182,
-0.0064288536086678505,
0.028925282880663872,
0.005097488407045603,
0.01774545945227146,
-0.045339375734329224,
0.08075734227895737,
-0.07134659588336945,
0.03881021589040756,
-0.03439664840698242,
0.02170308120548725,
-0.049534089863300323,
-0.044682811945676804,
-0.01163576915860176,
0.004965263418853283,
-0.013869909569621086,
0.0027584796771407127,
0.02057233266532421,
-0.03837250545620918,
0.054677173495292664,
-0.00980286207050085,
-0.06660474836826324,
-0.03187981992959976,
0.03324766084551811,
-0.003431001678109169,
0.0112618925049901,
-0.028086340054869652,
0.016715019941329956,
-0.0162317156791687,
0.007942598313093185,
0.008257201872766018,
-0.061206333339214325,
-0.027028542011976242,
-0.0044021690264344215,
-0.061935849487781525,
-0.044208627194166183,
-0.03421426936984062,
-0.007586959283798933,
-0.00811585783958435,
-0.014590306207537651,
0.02265145070850849,
-0.01955101080238819,
-0.013331891968846321,
0.0672977864742279,
0.056938670575618744,
-0.021265370771288872,
-0.03687699884176254,
-0.03366713225841522,
-0.02226845547556877,
-0.09315910190343857,
-0.0013450438855215907,
0.060586247593164444,
0.03554563224315643,
-0.030530216172337532,
0.01073299441486597,
-0.014590306207537651,
-0.060367390513420105,
0.04464633762836456,
-0.06339488178491592,
-0.04840334132313728,
-0.03156977519392967,
0.01237440388649702,
-0.025533035397529602,
-0.00011135082604596391,
0.002155489753931761,
0.03277347609400749,
-0.059856731444597244,
0.025624224916100502,
-0.00145447114482522,
0.01690651662647724,
-0.005940990522503853,
0.00919189304113388,
0.02091885171830654,
0.04165532439947128,
0.03434193506836891,
-0.012447355315089226,
0.02241435833275318,
-0.003937102854251862,
0.028706427663564682,
0.006118809804320335,
-0.0070854173973202705,
0.005311783403158188,
0.005129404366016388,
0.061133384704589844,
0.049388185143470764,
-0.053801752626895905,
-0.059929683804512024,
0.0008178550633601844,
0.02345391735434532,
0.01920448988676071,
0.01754484325647354,
0.030967924743890762,
-0.0499718002974987,
0.03558211028575897,
-0.030402550473809242,
-0.049096379429101944,
0.04136351868510246,
0.057814087718725204,
-0.0005183548200875521,
0.046579550951719284,
-0.02327153831720352,
-0.031241493299603462,
-0.006319426465779543,
-0.00398497749119997,
-0.060951005667448044,
-0.03614748269319534,
0.007276915479451418,
-0.06722483783960342,
-0.02803162671625614,
0.01088801585137844,
-0.03470668941736221,
0.06861091405153275,
-0.009684315882623196,
0.03492554649710655,
-0.00017183505406137556,
-0.03815365210175514,
0.015310702845454216,
-0.013833434320986271,
0.02204960025846958,
0.03653047978878021,
0.08207046985626221,
0.04639717563986778,
0.049752943217754364,
-0.005124845076352358,
0.0267184991389513,
-0.005927311722189188,
0.054130036383867264,
0.03178862854838371,
0.03642105311155319,
-0.014918588101863861,
0.06397849321365356,
0.030712595209479332,
-0.0010760350851342082,
-0.020426427945494652,
0.049169331789016724,
-0.03326589986681938,
0.0006616931641474366,
-0.013833434320986271,
0.017262155190110207,
0.0063604614697396755,
0.030986163765192032,
-0.030785545706748962,
-0.057194001972675323,
0.03877373784780502,
-0.02055409364402294,
0.045266423374414444,
0.0263537410646677,
0.03268228471279144,
-0.02710149437189102,
0.03674933314323425,
0.054312415421009064,
0.057923514395952225,
-0.018101098015904427,
-0.047236114740371704,
-0.0018716626800596714
] |
52,284 |
flexget.manager
|
check_ipc_info
|
If a daemon has a lock on the database, return info to connect to IPC.
|
def check_ipc_info(self) -> Optional[dict]:
"""If a daemon has a lock on the database, return info to connect to IPC."""
lock_info = self._read_lock()
if lock_info and 'port' in lock_info:
return lock_info
return None
|
(self) -> Optional[dict]
|
[
0.08073839545249939,
-0.014861947856843472,
0.025455405935645103,
0.018525591120123863,
0.05097993463277817,
0.0038062138482928276,
0.06318055838346481,
0.0028924632351845503,
-0.016814738512039185,
-0.06674051284790039,
0.0021731278393417597,
-0.007327285595238209,
-0.010360159911215305,
-0.07472448796033859,
0.02092769555747509,
-0.02547268755733967,
-0.013531284406781197,
-0.013323908671736717,
0.0067699626088142395,
-0.0379498116672039,
0.007240878883749247,
0.01160441618412733,
0.06632576137781143,
-0.010334237478673458,
-0.009003574959933758,
0.08440203964710236,
0.018819373100996017,
-0.001610404346138239,
0.06031185761094093,
0.03506382554769516,
-0.014257100410759449,
0.0419936403632164,
0.02058206871151924,
0.0036550022196024656,
0.02239660918712616,
0.10486313700675964,
0.011682181619107723,
-0.013669535517692566,
-0.034804608672857285,
-0.0033352975733578205,
0.01140568032860756,
-0.017696086317300797,
0.003415223676711321,
-0.00819135271012783,
-0.011129179038107395,
-0.01574329473078251,
-0.00045741532812826335,
0.00911590363830328,
0.03069164976477623,
-0.01644318923354149,
0.02669966220855713,
-0.008986294269561768,
-0.012312950566411018,
-0.012062371708452702,
-0.016978910192847252,
-0.0016060840571299195,
0.015509997494518757,
0.023537177592515945,
-0.01952790841460228,
-0.0055084251798689365,
-0.03895212709903717,
0.03947056829929352,
0.005002946127206087,
-0.00382781564258039,
0.014542242512106895,
-0.018940342590212822,
0.005542987957596779,
-0.05395232513546944,
-0.03611798956990242,
0.021221477538347244,
0.04562272131443024,
-0.013021484948694706,
-0.06152154877781868,
0.019718002527952194,
0.02184360660612583,
-0.04185539111495018,
0.037362243980169296,
0.017177646979689598,
0.0007846805965527892,
0.012883234769105911,
0.06608381867408752,
-0.017367741093039513,
-0.030104083940386772,
0.026578692719340324,
0.03024233505129814,
-0.011181022971868515,
0.07824987918138504,
0.0676737055182457,
-0.04372177645564079,
-0.015769217163324356,
-0.01044656615704298,
0.05018499493598938,
0.002156926551833749,
0.08073839545249939,
0.04776560887694359,
-0.017972588539123535,
0.00621263962239027,
0.025783751159906387,
-0.009392404928803444,
-0.014386710710823536,
-0.06649857759475708,
0.04081851243972778,
-0.0112501485273242,
-0.048422299325466156,
0.007750678341835737,
-0.04831860959529877,
-0.020391974598169327,
-0.0025878797750920057,
-0.008891246281564236,
-0.05284631997346878,
-0.06283493340015411,
-0.025852875784039497,
-0.009401045739650726,
-0.0059707011096179485,
0.03520207852125168,
0.03418247774243355,
-0.05246613174676895,
-0.028047606348991394,
-0.011241507716476917,
-0.012822750024497509,
-0.07019677758216858,
0.0790102630853653,
0.059931665658950806,
-0.04157888889312744,
0.010420644655823708,
0.06152154877781868,
-0.04230470582842827,
-0.014058365486562252,
0.01778249256312847,
-0.01679745689034462,
0.022586703300476074,
-0.025956563651561737,
0.028185855597257614,
0.017471428960561752,
-0.06083029508590698,
-0.01976984553039074,
0.0003083638148382306,
0.016754252836108208,
-0.01394603680819273,
-0.023882804438471794,
-0.033162880688905716,
0.004326813854277134,
-0.06774283200502396,
-0.021895449608564377,
-0.008217274211347103,
0.027235383167862892,
0.0018437023973092437,
-0.03248890861868858,
0.05823809653520584,
-0.037880685180425644,
0.05225875601172447,
-0.06221280246973038,
-0.04133694991469383,
-0.032143279910087585,
-0.038018934428691864,
0.06221280246973038,
-0.007971015758812428,
-0.06421744078397751,
0.02536899782717228,
-0.06601469963788986,
-0.023139705881476402,
-0.057235777378082275,
0.043272461742162704,
-0.05547308176755905,
-0.006389773450791836,
-0.012961001135408878,
-0.009496092796325684,
-0.08322690427303314,
0.0723051056265831,
0.015103885903954506,
-0.04123326390981674,
0.06625663489103317,
-0.0056725977919995785,
-0.011613056994974613,
-0.020841289311647415,
0.011077335104346275,
-0.0004422941419761628,
-0.03646361455321312,
0.006994619965553284,
-0.01640862599015236,
-0.014300304464995861,
0.006286085117608309,
-0.04126782715320587,
0.06179805099964142,
0.013341190293431282,
0.018767528235912323,
0.020357411354780197,
-0.026958880946040154,
0.0776277557015419,
0.029965832829475403,
-0.03732768073678017,
0.02134244702756405,
-0.032454345375299454,
0.0003712786710821092,
-0.031452029943466187,
-0.01251168642193079,
-0.004346255678683519,
0.019856253638863564,
-0.0426848940551281,
-0.03235065937042236,
0.09007031470537186,
-0.042788583785295486,
-0.06829583644866943,
0.08854955434799194,
-0.012364794500172138,
-0.04085307568311691,
0.012468482367694378,
-0.003791092662140727,
0.029810301959514618,
0.05951691418886185,
-0.007832764647901058,
-0.07410236448049545,
-0.04665960371494293,
0.05253525450825691,
0.029793020337820053,
0.035288482904434204,
0.04959743097424507,
0.0045968350023031235,
-0.012226544320583344,
0.01778249256312847,
-0.02403833530843258,
0.02908448502421379,
0.042823147028684616,
0.014308944344520569,
-0.06995484232902527,
-0.008061742410063744,
0.006385453045368195,
0.04828404635190964,
0.06739720702171326,
0.005633715074509382,
0.043237898498773575,
-0.028600608929991722,
-0.05308825895190239,
0.03853737562894821,
0.04410196468234062,
-0.014127491042017937,
-0.0480075478553772,
-0.02061663195490837,
0.006804525386542082,
0.009228232316672802,
0.007863007485866547,
0.015967952087521553,
0.07064609229564667,
0.01309061050415039,
0.06141786277294159,
-0.09013944119215012,
0.0017767371609807014,
-0.004069754388183355,
0.005162798799574375,
0.009608421474695206,
-0.019199563190340996,
-0.04804210737347603,
0.021705355495214462,
-0.06791564077138901,
-0.037880685180425644,
-0.04714348167181015,
-0.07216685265302658,
0.011820432730019093,
0.001021218835376203,
0.006324968300759792,
-0.021809043362736702,
-0.0035253921523690224,
0.024902403354644775,
-0.00006946286157472059,
0.02751188352704048,
-0.01728997565805912,
0.010852677747607231,
0.015319902449846268,
-0.01760103926062584,
-0.03205687552690506,
-0.012304309755563736,
-0.0154149504378438,
0.006104631349444389,
-0.003639881033450365,
-0.02618122100830078,
-0.06473587453365326,
0.03044971078634262,
0.007971015758812428,
-0.03288637846708298,
0.013704097829759121,
0.022552141919732094,
0.056924715638160706,
-0.011137819848954678,
-0.05474726855754852,
-0.04102588817477226,
0.007275441661477089,
0.005465222056955099,
-0.01170810405164957,
-0.016261735931038857,
0.016607362776994705,
-0.04693610221147537,
-0.014758259057998657,
-0.057235777378082275,
-0.0655999481678009,
-0.0264922846108675,
0.04804210737347603,
0.012114215642213821,
0.024211149662733078,
-0.015440871939063072,
-0.008830761536955833,
0.0034778686240315437,
-0.02345077134668827,
-0.094632588326931,
0.022344764322042465,
-0.004614116158336401,
0.048595111817121506,
0.008096304722130299,
0.01710852049291134,
-0.02393464744091034,
-0.0011999726993963122,
0.02943011187016964,
-0.00448018591850996,
0.06110679730772972,
-0.015293980948626995,
0.018110837787389755,
0.013652253895998001,
-0.010576176457107067,
0.04462040588259697,
-0.016469111666083336,
0.07417148351669312,
-0.04240839555859566,
0.07078434526920319,
0.019009467214345932,
-0.0012971801916137338,
-0.013116532936692238,
0.026475004851818085,
0.05391776189208031,
0.0039012611377984285,
0.035288482904434204,
0.07486274093389511,
-0.06995484232902527,
0.019441500306129456,
0.001050921157002449,
-0.029447393491864204,
0.006372491829097271,
-0.02529987320303917,
-0.0178170558065176,
-0.06366443634033203,
0.0014213897520676255,
-0.02929186075925827,
0.01329798623919487,
-0.031763091683387756,
0.001926868804730475,
-0.021221477538347244,
0.03732768073678017,
-0.022171951830387115,
0.043237898498773575,
0.018992185592651367,
-0.011561213061213493,
-0.025144340470433235,
-0.06079573556780815,
0.019545188173651695,
-0.08910255879163742,
-0.017454147338867188,
0.00687797088176012,
-0.02351989597082138,
-0.013989239931106567,
-0.004378658253699541,
0.04811123386025429,
0.04714348167181015,
0.028704296797513962,
-0.013721379451453686,
0.00738344993442297,
0.0013360631419345737,
-0.09269707649946213,
-0.024608619511127472,
-0.023986492305994034,
-0.004162641242146492,
0.11426418274641037,
0.007940772920846939,
-0.051671188324689865,
-0.0011978124966844916,
-0.00493382103741169,
-0.06988571584224701,
-0.007832764647901058,
0.009746672585606575,
-0.00981579814106226,
0.018923060968518257,
-0.03293822333216667,
-0.009582499973475933,
-0.06183261424303055,
-0.05585327371954918,
0.015907468274235725,
-0.005780606530606747,
-0.09684459865093231,
-0.01140568032860756,
-0.04244295507669449,
-0.004441302735358477,
-0.009530656039714813,
0.006199678871780634,
-0.019683439284563065,
0.014067006297409534,
-0.023951929062604904,
0.004691882058978081,
-0.011362477205693722,
0.0346490740776062,
0.07686737179756165,
0.013056048192083836,
-0.00911590363830328,
-0.03229881450533867,
0.015691451728343964,
-0.051532939076423645,
0.020374692976474762,
-0.004903578665107489,
-0.013764582574367523,
0.0013295826502144337,
0.039332315325737,
-0.029170893132686615,
0.027408195659518242,
-0.06242017820477486,
-0.017419584095478058,
-0.01805899478495121,
0.030294178053736687,
0.002015435602515936,
-0.011267430149018764,
0.03160756081342697,
0.04721260443329811,
0.02904992364346981,
0.043065086007118225,
0.04406740143895149,
0.028617888689041138,
-0.0426848940551281,
-0.0042944117449223995,
-0.0020661994349211454,
-0.03535760939121246,
0.012649936601519585,
-0.012459841556847095,
0.018819373100996017,
0.013021484948694706,
-0.011077335104346275,
0.002829818520694971,
0.04354896396398544,
0.062454741448163986,
-0.008791878819465637,
0.02379639632999897,
0.029723895713686943,
0.01897490583360195,
-0.01522485539317131,
-0.0032596916425973177,
-0.011137819848954678,
-0.0011556892422959208,
0.02488512173295021,
0.0072668008506298065,
-0.014594086445868015,
0.05516202002763748,
0.04949374124407768,
0.00789324939250946,
0.020184598863124847,
0.029948553070425987,
-0.008061742410063744,
-0.016754252836108208,
-0.0209968201816082,
-0.01394603680819273,
-0.018387340009212494,
-0.02369270846247673,
-0.02778838574886322,
-0.048456862568855286,
0.04624485224485397,
0.02471230737864971,
0.023139705881476402,
-0.037258557975292206,
0.01322886161506176,
-0.03971250727772713,
-0.034320730715990067,
0.005910216365009546,
-0.017938025295734406,
0.009608421474695206,
-0.01044656615704298,
-0.018041713163256645,
0.04710891842842102,
0.02841051295399666,
0.010748989880084991,
-0.0011060053948312998,
-0.014421273022890091,
-0.01854287087917328,
-0.025922002270817757,
0.03150387108325958,
0.017488710582256317,
0.009046778082847595,
0.02208554558455944,
-0.043652649968862534,
0.032005030661821365,
0.021705355495214462,
0.0016212051268666983,
-0.043065086007118225,
-0.09843447804450989,
-0.006670595146715641,
-0.04178626462817192,
-0.02625034749507904,
-0.0469706654548645,
-0.00013737310655415058,
0.007098307833075523,
0.03031145967543125,
-0.03413063660264015,
0.145992711186409,
0.014879228547215462,
-0.0032661722507327795,
0.01638270542025566,
0.037776995450258255,
0.01032559759914875,
-0.0015067163622006774,
0.011172382161021233,
0.03255803510546684,
0.023813677951693535,
0.0039963084273040295,
-0.08716704696416855,
-0.03468363732099533,
0.013496722094714642,
0.03502926602959633,
0.06784652173519135,
0.0346490740776062,
0.027339071035385132,
0.031071839854121208,
0.028116730973124504,
-0.05512745678424835,
0.020115472376346588,
-0.023917365819215775,
0.000991516513749957,
-0.020253723487257957,
-0.027598291635513306,
0.032212406396865845,
-0.01665920577943325,
0.04759279265999794,
-0.040092695504426956,
-0.08177527040243149,
-0.05851459875702858,
0.016106203198432922,
-0.010697145946323872,
-0.05253525450825691,
-0.020443817600607872,
-0.009487452916800976,
0.00925415474921465,
-0.0016978910425677896,
-0.007724756374955177,
0.014550883322954178,
-0.0036161192692816257,
0.0020834808237850666,
0.004834453109651804,
-0.12000158429145813,
-0.06079573556780815,
0.051118187606334686,
0.01805899478495121,
0.02103138342499733,
-0.04202820360660553,
0.029620205983519554,
0.01389419287443161,
-0.03523664176464081,
0.06739720702171326,
-0.01756647601723671,
0.006165116094052792,
0.0015153569402173162,
0.01044656615704298,
0.028254982084035873,
-0.07534661889076233,
0.022949611768126488,
0.035288482904434204,
0.06850320845842361,
-0.06349162012338638,
0.003842936595901847,
-0.0063552106730639935,
0.018663840368390083,
-0.028687015175819397,
-0.034320730715990067,
0.010895880870521069,
-0.02054750733077526,
-0.09366483241319656,
0.04106045141816139,
-0.026544129475951195,
0.04527709633111954,
0.00820863340049982,
-0.011103257536888123,
-0.025144340470433235,
0.04216645658016205,
0.007871647365391254,
0.002572758588939905,
-0.0426848940551281,
0.005417698062956333,
0.06394093483686447,
-0.0050936732441186905,
-0.01956246979534626,
0.004240407608449459,
-0.03143474832177162,
0.014231178909540176,
0.026163939386606216,
0.02834138832986355,
0.022275639697909355,
-0.05606064945459366,
0.010697145946323872,
0.030294178053736687,
0.006519383285194635,
0.0006307687144726515,
-0.009038138203322887,
0.024383962154388428,
-0.020772164687514305,
0.015553200617432594,
0.06902164965867996,
0.030916307121515274,
-0.029240017756819725,
0.015103885903954506,
-0.011932761408388615,
-0.023053299635648727,
0.02529987320303917,
0.013462159782648087,
-0.07237422466278076,
0.012062371708452702,
-0.014326225966215134,
-0.040922198444604874,
-0.0125808110460639,
-0.025628218427300453,
-0.040300071239471436,
-0.001933349296450615,
0.00218716892413795,
-0.016425907611846924,
0.040645699948072433,
0.03943600505590439,
0.038053497672080994,
0.011543931439518929,
-0.020322849974036217,
0.03468363732099533,
0.012243825010955334,
0.056751903146505356,
0.0723051056265831,
0.0726507306098938,
-0.03677468001842499,
0.01665920577943325,
-0.003912061918526888,
0.0034368252381682396,
0.003912061918526888,
-0.02222379669547081,
-0.01847374625504017,
0.0130733298137784,
0.030812619253993034,
0.019959941506385803,
0.04693610221147537,
-0.0593441016972065,
-0.021428855136036873,
0.021152352914214134,
-0.054021451622247696,
-0.040369197726249695,
0.06774283200502396,
-0.00346490740776062,
-0.005936138331890106,
-0.0024366681464016438,
-0.03406151011586189,
0.043618086725473404,
-0.011872276663780212,
0.02485055848956108,
-0.008809160441160202,
0.014689134433865547,
-0.025835594162344933,
-0.027235383167862892,
-0.028669733554124832,
-0.018750248476862907,
-0.006346569862216711,
0.05581871047616005,
-0.0480075478553772,
-0.02491968311369419,
0.02096225880086422,
-0.08820392936468124,
-0.0005138496635481715,
-0.03929775580763817,
-0.0023329800460487604,
-0.03252347186207771,
-0.01602843776345253,
0.054401639848947525,
0.007379129528999329,
-0.019838972017169,
-0.016788816079497337,
0.003672283608466387,
0.05778878182172775,
0.029793020337820053,
0.011569852940738201,
-0.002092121634632349,
0.01029103435575962,
-0.009046778082847595,
-0.018007149919867516,
0.0029097446240484715,
0.0007133950712159276,
0.006381132639944553,
-0.015527279116213322,
0.05910216271877289,
-0.05771965533494949,
0.017350459471344948,
0.01725541241466999,
0.008675229735672474,
0.0013630652101710439,
0.053330197930336,
-0.02908448502421379,
-0.0012474963441491127,
-0.017194926738739014,
-0.03615255281329155,
0.00845057237893343,
0.05295000970363617,
0.06632576137781143,
-0.005413378123193979,
-0.0676737055182457,
-0.04437846690416336,
0.0846785381436348,
-0.0016838499577715993,
0.0196661576628685,
0.031140964478254318,
-0.0020435177721083164,
0.03712030500173569,
0.02929186075925827,
-0.018715685233473778,
-0.012209262698888779,
-0.03978163003921509,
-0.012961001135408878,
0.012459841556847095,
0.019510626792907715,
-0.017125802114605904,
0.031452029943466187,
0.0836416557431221,
-0.024902403354644775,
0.024936964735388756,
0.01093908492475748,
-0.02967205084860325,
-0.01415341254323721,
0.012961001135408878,
-0.00111356598790735,
-0.038053497672080994,
0.020426537841558456,
0.02351989597082138,
-0.05256981775164604,
0.023848241195082664,
0.02218923345208168,
0.006126232910901308,
-0.07140647619962692,
0.030121365562081337,
0.10583089292049408,
-0.03219512477517128,
-0.031797654926776886,
-0.059793416410684586,
0.0566827766597271,
0.0400235690176487,
0.010774912312626839,
0.03677468001842499,
-0.0038386164233088493,
-0.03553042188286781,
0.030570680275559425,
0.03832999989390373,
0.0211696345359087,
0.037223994731903076,
0.05612977221608162,
-0.0029335063882172108,
-0.03413063660264015,
-0.03853737562894821,
0.016685128211975098,
0.012986922636628151,
-0.0031905663199722767,
0.02253486029803753,
0.02680335007607937,
0.0015898827696219087,
-0.027148976922035217,
-0.037984371185302734,
-0.016736973077058792,
-0.023156987503170967,
0.05557677149772644,
0.0769364982843399,
0.06480500102043152,
-0.014136131852865219,
0.05025412142276764,
-0.03523664176464081,
0.04776560887694359,
-0.0069902995601296425,
-0.08848042786121368,
-0.053848639130592346,
0.0013101411750540137
] |
52,285 |
flexget.manager
|
check_lock
|
Returns True if there is a lock on the database.
|
def check_lock(self) -> bool:
"""Returns True if there is a lock on the database."""
lock_info = self._read_lock()
if not lock_info:
return False
# Don't count it if we hold the lock
if os.getpid() == lock_info['pid']:
return False
return True
|
(self) -> bool
|
[
0.056197576224803925,
0.00014559687406290323,
0.017185499891638756,
0.07901544868946075,
0.07180601358413696,
0.003708355128765106,
-0.003875073278322816,
0.017942490056157112,
-0.02964881807565689,
-0.040264714509248734,
-0.0179695263504982,
-0.03393843397498131,
0.023250440135598183,
-0.007700582034885883,
-0.015139821916818619,
-0.07562701404094696,
-0.0427519716322422,
-0.011859526857733727,
-0.0026291923131793737,
-0.03581288829445839,
-0.008308878168463707,
0.06470471620559692,
0.07025597989559174,
-0.01188656222075224,
-0.017699172720313072,
0.04963698610663414,
0.009471400640904903,
0.04264383018016815,
0.05327775329351425,
0.07411303371191025,
-0.026386545971035957,
0.04033681005239487,
0.06903037428855896,
-0.008926186710596085,
0.026026073843240738,
0.05875692516565323,
0.01630234345793724,
-0.051223061978816986,
-0.005546762142330408,
-0.04714972898364067,
0.052989374846220016,
0.008948716334998608,
-0.032082002609968185,
0.00880452711135149,
-0.01962769776582718,
-0.05810807645320892,
-0.02267368510365486,
-0.019213154911994934,
0.003908867482095957,
0.002231546677649021,
0.06470471620559692,
-0.02635049819946289,
-0.021682387217879295,
0.0033140890300273895,
-0.03925539553165436,
-0.03514601290225983,
0.017942490056157112,
0.04606831446290016,
-0.012715647928416729,
-0.006596636492758989,
0.008971245028078556,
0.01570756547152996,
0.02696330100297928,
-0.016816016286611557,
0.02186262421309948,
0.006326282396912575,
0.00264270999468863,
-0.050177693367004395,
0.01878058910369873,
0.04087751731276512,
-0.007831253111362457,
-0.005893716122955084,
-0.01394125260412693,
0.04350896179676056,
-0.05212424322962761,
-0.011417948640882969,
-0.00383902620524168,
0.03083837404847145,
0.00026627047918736935,
0.041057754307985306,
0.010742063634097576,
-0.07865497469902039,
-0.019465485587716103,
0.02081725373864174,
0.01678897999227047,
0.019789909943938255,
0.00909741036593914,
0.04044495150446892,
-0.02164633944630623,
-0.007871805690228939,
-0.017663124948740005,
0.09199243783950806,
0.015256974846124649,
0.030081383883953094,
0.06052323803305626,
-0.06362329423427582,
0.021321915090084076,
0.02447604574263096,
-0.05670223757624626,
-0.006592130754143,
-0.04008448123931885,
0.05580105632543564,
0.03745303303003311,
-0.026278404518961906,
0.030333714559674263,
-0.009958037175238132,
-0.04833928868174553,
-0.042247310280799866,
-0.02790052816271782,
-0.06405586749315262,
-0.024782445281744003,
-0.031000586226582527,
0.016951192170381546,
0.029702888801693916,
0.033487845212221146,
-0.036101266741752625,
0.012039762921631336,
0.01774423196911812,
-0.025431295856833458,
-0.021772505715489388,
0.07259904593229294,
0.04574389010667801,
0.054647546261548996,
-0.028567401692271233,
0.03339772671461105,
0.040012385696172714,
-0.010904275812208652,
0.04668111726641655,
0.036101266741752625,
0.017906444147229195,
0.042607784271240234,
0.0041994983330369,
0.03839026018977165,
-0.014166546985507011,
-0.04837533459067345,
-0.02081725373864174,
0.03885887563228607,
0.03310934826731682,
-0.024277785792946815,
0.002020895713940263,
-0.016041001304984093,
-0.032208167016506195,
0.016013966873288155,
-0.024169644340872765,
0.023142298683524132,
0.05421498045325279,
-0.0676245391368866,
0.0245661623775959,
0.05969415232539177,
-0.018816635012626648,
0.06452447921037674,
-0.05118701606988907,
0.059513919055461884,
0.017077358439564705,
-0.051475394517183304,
0.01926722563803196,
-0.030351737514138222,
-0.026873182505369186,
0.035632651299238205,
-0.0448787584900856,
0.03579486533999443,
0.008061054162681103,
-0.00514123123139143,
-0.04087751731276512,
-0.033974479883909225,
0.0010757833952084184,
-0.07750146836042404,
-0.06701173633337021,
0.014761325903236866,
-0.03049592673778534,
0.01783434860408306,
0.03759722411632538,
0.032334331423044205,
0.04383338987827301,
-0.004379733931273222,
0.0007598072406835854,
-0.005033089313656092,
0.023574864491820335,
0.011201665736734867,
-0.0018451657379046082,
-0.02707144245505333,
-0.008718915283679962,
-0.01188656222075224,
0.0010036890162155032,
0.005217831581830978,
-0.02741389162838459,
-0.0005930889747105539,
-0.040480997413396835,
0.061856985092163086,
0.020709112286567688,
-0.0591173991560936,
-0.0010825423523783684,
-0.027612151578068733,
0.0042423042468726635,
-0.00909290462732315,
0.03734489157795906,
-0.010597875341773033,
0.015022668056190014,
0.01984398066997528,
0.012328140437602997,
0.08052942901849747,
-0.05432312190532684,
-0.034082621335983276,
0.007795205805450678,
0.038101885467767715,
-0.06073952093720436,
-0.008993774652481079,
0.006493000779300928,
0.026386545971035957,
0.006691260263323784,
-0.01830296218395233,
-0.04527527466416359,
-0.04112984985113144,
0.07519444823265076,
0.05353008210659027,
-0.016239261254668236,
0.06816524267196655,
-0.0421031229197979,
-0.017563994973897934,
0.0036272488068789244,
0.024674303829669952,
0.006402882747352123,
-0.02968486398458481,
-0.025467343628406525,
-0.06715591996908188,
-0.019213154911994934,
0.016527637839317322,
0.049456749111413956,
0.009903966449201107,
0.032911088317632675,
0.023430677130818367,
0.013742992654442787,
-0.05648595467209816,
0.0316854827105999,
0.022655662149190903,
-0.025215012952685356,
-0.05223238468170166,
0.021484127268195152,
0.012742683291435242,
-0.0028206929564476013,
0.012760707177221775,
0.019429437816143036,
0.037164658308029175,
-0.03512798994779587,
0.051006779074668884,
-0.0650651827454567,
0.011417948640882969,
0.020871326327323914,
0.022421354427933693,
-0.003971950151026249,
-0.042247310280799866,
0.009255116805434227,
0.03921934589743614,
-0.029937194660305977,
-0.07706890255212784,
-0.07072459161281586,
0.0021988789085298777,
0.01535610482096672,
-0.04646483436226845,
0.01783434860408306,
0.00834041927009821,
-0.019717814400792122,
-0.005474667530506849,
0.03251456841826439,
0.009912978857755661,
-0.022727755829691887,
0.020240498706698418,
-0.0008037397637963295,
-0.027467962354421616,
-0.039868198335170746,
0.10295078903436661,
-0.05994648486375809,
0.0032983182463794947,
-0.004314398393034935,
-0.007619475480169058,
-0.07404093444347382,
0.03770536556839943,
0.009372270666062832,
-0.040012385696172714,
0.02152017503976822,
0.022313212975859642,
0.053818460553884506,
0.025251058861613274,
-0.02611619234085083,
-0.06405586749315262,
-0.00018981100583914667,
-0.024007432162761688,
0.023124275729060173,
-0.05799993500113487,
-0.015905823558568954,
-0.052773091942071915,
-0.026278404518961906,
0.025196988135576248,
-0.03226223960518837,
-0.015860766172409058,
0.07000365108251572,
0.0021301638334989548,
-0.0031924296636134386,
-0.014355795457959175,
0.0058621750213205814,
0.01997014507651329,
0.025323154404759407,
-0.0971832349896431,
0.02058294788002968,
-0.010633922182023525,
-0.006258693989366293,
-0.04772648587822914,
0.031270939856767654,
-0.018708493560552597,
0.003262271173298359,
-0.021195750683546066,
0.038930971175432205,
0.05179981887340546,
0.006371341645717621,
0.05482778325676918,
-0.010769098997116089,
-0.05612548068165779,
0.03085639886558056,
-0.01329240296036005,
0.0340285524725914,
-0.033848315477371216,
0.06308259069919586,
0.05872087925672531,
0.01459911372512579,
-0.03247852250933647,
-0.005497197154909372,
0.04617645591497421,
0.04430200159549713,
-0.02328648790717125,
0.04004843160510063,
-0.06016276776790619,
-0.03579486533999443,
0.05010560154914856,
-0.020186427980661392,
-0.05872087925672531,
-0.007997971028089523,
-0.020997490733861923,
-0.048843950033187866,
0.02681911177933216,
0.01028246246278286,
0.022187048569321632,
0.016031989827752113,
0.02800866961479187,
-0.05425102636218071,
0.017437830567359924,
-0.012084822170436382,
0.013914217241108418,
0.029756959527730942,
0.040264714509248734,
-0.06265002489089966,
-0.05331379920244217,
-0.041310083121061325,
-0.04239150136709213,
-0.0224393792450428,
-0.0075879343785345554,
-0.046500880271196365,
0.037056516855955124,
0.010480721481144428,
0.022547520697116852,
0.019771885126829147,
-0.009381282143294811,
-0.018257904797792435,
-0.033974479883909225,
0.011210677213966846,
-0.04880790039896965,
0.007272521499544382,
-0.03921934589743614,
-0.027089467272162437,
-0.009480412118136883,
0.0593336820602417,
-0.038462355732917786,
-0.011796444654464722,
0.000732208660338074,
0.01760905422270298,
-0.0022732261568307877,
0.011444984003901482,
-0.01643752120435238,
0.010823169723153114,
0.002374609000980854,
-0.03442506864666939,
-0.01821284554898739,
-0.031847696751356125,
0.04336477443575859,
-0.029756959527730942,
-0.06084766238927841,
-0.027828434482216835,
-0.042247310280799866,
-0.019825957715511322,
-0.004893406759947538,
-0.04239150136709213,
-0.0007913485751487315,
-0.0005930889747105539,
-0.031144775450229645,
0.0028927873354405165,
-0.06647102534770966,
0.005384549498558044,
0.0765642374753952,
0.017230559140443802,
0.0029400992207229137,
-0.045095041394233704,
0.01805964484810829,
-0.03483961150050163,
-0.001738150604069233,
-0.032334331423044205,
-0.004280604422092438,
-0.0111656179651618,
-0.004359457641839981,
-0.010778111405670643,
0.03215409815311432,
-0.03745303303003311,
-0.050646308809518814,
-0.040264714509248734,
0.05284518748521805,
0.02586386166512966,
-0.017879407852888107,
0.008196230977773666,
0.05814412608742714,
-0.016942180693149567,
0.0009800330735743046,
0.041418224573135376,
0.029630793258547783,
0.021303892135620117,
-0.012012727558612823,
0.0036880786065012217,
-0.07901544868946075,
-0.010787122882902622,
-0.053962647914886475,
0.03839026018977165,
0.006952602416276932,
0.000314004864776507,
-0.02007828652858734,
-0.001342757954262197,
0.061280231922864914,
0.0277563389390707,
-0.022259142249822617,
0.013382520526647568,
-0.018239879980683327,
-0.03606521710753441,
-0.03332563117146492,
-0.033722151070833206,
0.046032268553972244,
0.02341265231370926,
0.010210367850959301,
-0.053962647914886475,
0.046753209084272385,
0.0071733915247023106,
0.014445913024246693,
0.03251456841826439,
0.06964317709207535,
0.042319405823946,
-0.04736601188778877,
0.04574389010667801,
-0.023250440135598183,
-0.0137700280174613,
-0.07627586275339127,
-0.0013067107647657394,
-0.0506102591753006,
-0.03968796133995056,
0.04228335991501808,
0.023304510861635208,
-0.028747636824846268,
0.019105013459920883,
-0.010633922182023525,
0.020853301510214806,
0.023214392364025116,
-0.030568020418286324,
-0.00175730069167912,
0.008471090346574783,
0.017059335485100746,
0.05432312190532684,
0.009858907200396061,
0.002124531427398324,
-0.039183299988508224,
-0.059261586517095566,
-0.04682530462741852,
-0.040264714509248734,
0.005564785562455654,
0.053854506462812424,
0.03451518714427948,
0.024512091651558876,
-0.05367427319288254,
0.016031989827752113,
0.045563653111457825,
0.011156606487929821,
0.0012008221819996834,
-0.039291441440582275,
-0.0062046232633292675,
-0.037056516855955124,
-0.025196988135576248,
-0.09898559749126434,
-0.027720293030142784,
-0.05626967176795006,
0.023538818582892418,
0.04109380021691322,
0.05237657204270363,
-0.04376129433512688,
-0.034334953874349594,
0.025575485080480576,
-0.0017257594736292958,
0.005380043759942055,
-0.015094762668013573,
0.04469852149486542,
0.006420906633138657,
0.042139168828725815,
0.03393843397498131,
-0.024133596569299698,
0.02256554365158081,
-0.019050942733883858,
0.008493619970977306,
0.02375510148704052,
-0.002143681515008211,
0.03947167843580246,
-0.029738934710621834,
0.03777746111154556,
-0.02445802092552185,
0.02234926074743271,
-0.030081383883953094,
-0.0382821187376976,
-0.016861075535416603,
-0.031865719705820084,
0.04102170839905739,
-0.01928524859249592,
0.050646308809518814,
-0.04206707701086998,
-0.1023019403219223,
0.0017392771551385522,
-0.0011411190498620272,
-0.011093524284660816,
0.00832690205425024,
-0.000009927059181791265,
0.008006983436644077,
0.00514573697000742,
-0.023448700085282326,
-0.031721532344818115,
-0.03238840401172638,
0.01506772730499506,
0.013670898042619228,
-0.029702888801693916,
-0.05991043522953987,
-0.048014864325523376,
0.06744430214166641,
0.005204313434660435,
0.07195019721984863,
-0.01264355331659317,
0.02564757876098156,
0.05789179354906082,
-0.031847696751356125,
0.010192343965172768,
0.01641048491001129,
0.012553435750305653,
0.05143934488296509,
0.046645067632198334,
0.01689712144434452,
-0.08658535778522491,
0.04751020297408104,
-0.0013900699559599161,
0.023214392364025116,
-0.035993125289678574,
0.03447914123535156,
-0.024421975016593933,
0.04873580485582352,
-0.02128586731851101,
-0.0021459346171468496,
0.05237657204270363,
-0.016455544158816338,
-0.11758594959974289,
0.03947167843580246,
-0.030892444774508476,
0.06910247355699539,
0.04671716317534447,
0.022259142249822617,
-0.030910469591617584,
0.059153445065021515,
0.01170632615685463,
0.010669969953596592,
-0.0654977485537529,
-0.05306147038936615,
0.03720070421695709,
-0.029720911756157875,
-0.05684642493724823,
0.04159846156835556,
-0.06982341408729553,
-0.055116161704063416,
-0.005312455352395773,
0.006790390238165855,
-0.015284010209143162,
-0.05432312190532684,
0.05969415232539177,
-0.011670279316604137,
0.019050942733883858,
-0.0027215632144361734,
0.06701173633337021,
0.026765041053295135,
-0.02433185651898384,
0.03638964146375656,
0.06448843330144882,
0.04585203155875206,
-0.030676161870360374,
0.05079049617052078,
0.011958656832575798,
0.023304510861635208,
0.015500293113291264,
-0.021321915090084076,
-0.05554872751235962,
-0.02197076566517353,
0.02103353850543499,
-0.0020490577444434166,
0.017419805750250816,
-0.001944295596331358,
-0.024602210149168968,
0.0019578132778406143,
-0.03388436138629913,
-0.004463093355298042,
0.04765439033508301,
0.04877185449004173,
0.05342194065451622,
-0.05306147038936615,
-0.04239150136709213,
0.03487566113471985,
0.055476631969213486,
0.0335959866642952,
0.046248551458120346,
0.058792974799871445,
-0.04653692618012428,
0.005443126428872347,
-0.010642933659255505,
0.025377225130796432,
0.010787122882902622,
-0.01750091277062893,
-0.05014164745807648,
0.003106817603111267,
-0.046140410006046295,
0.03085639886558056,
0.012805765494704247,
0.006434424314647913,
-0.014995632693171501,
-0.04588807746767998,
-0.021087609231472015,
0.010363568551838398,
0.02943253330886364,
-0.025034775957465172,
-0.020024215802550316,
-0.043545011430978775,
-0.010624910704791546,
0.039291441440582275,
-0.0470055416226387,
0.026728995144367218,
0.010048155672848225,
0.04585203155875206,
0.0009744007256813347,
-0.020871326327323914,
0.027954598888754845,
0.041886840015649796,
0.0025255565997213125,
0.0316854827105999,
-0.04970908164978027,
-0.021718434989452362,
-0.03624545410275459,
-0.022241119295358658,
-0.020024215802550316,
0.011571149341762066,
-0.007831253111362457,
-0.06834547966718674,
-0.015635469928383827,
0.06030695512890816,
0.0022011317778378725,
-0.029504628852009773,
0.03505589812994003,
-0.020745160058140755,
0.09516458958387375,
-0.01228308118879795,
-0.006028893403708935,
-0.034947752952575684,
-0.012715647928416729,
-0.012715647928416729,
-0.016969216987490654,
0.015482270158827305,
-0.029270321130752563,
0.010021120309829712,
0.02611619234085083,
-0.055260349065065384,
0.005159254651516676,
0.002349826507270336,
-0.025719672441482544,
0.008574726060032845,
0.0506102591753006,
-0.012192963622510433,
-0.02398940734565258,
0.046248551458120346,
-0.019898051396012306,
-0.02669294737279415,
-0.0243498794734478,
0.023196369409561157,
0.07025597989559174,
-0.06391167640686035,
-0.05771155655384064,
-0.01405840553343296,
0.1141975149512291,
-0.005217831581830978,
-0.06052323803305626,
0.0284953061491251,
0.014770337380468845,
0.03781350702047348,
0.06434424221515656,
-0.0015928354114294052,
-0.009543494321405888,
-0.017437830567359924,
0.0167979933321476,
0.00992199033498764,
-0.009849895723164082,
-0.024656280875205994,
0.023232417181134224,
0.10215774923563004,
-0.005132219288498163,
0.0676245391368866,
-0.05471964180469513,
-0.0489160418510437,
-0.013418568298220634,
0.05918949469923973,
-0.00590723380446434,
-0.05389055609703064,
0.012697624042630196,
-0.031270939856767654,
-0.05255680903792381,
0.014545042999088764,
-0.005785574670881033,
-0.01329240296036005,
-0.06921061128377914,
-0.006276717875152826,
0.005096171982586384,
0.00008955474913818762,
-0.020727137103676796,
-0.04942070320248604,
0.003156382357701659,
0.05435916781425476,
0.03224421665072441,
0.029612770304083824,
0.05958601087331772,
0.025323154404759407,
0.02139401063323021,
0.021700410172343254,
-0.018014585599303246,
0.005898222327232361,
-0.0032239709980785847,
-0.015437210910022259,
0.013788051903247833,
-0.028297048062086105,
-0.010138273239135742,
-0.00964262429624796,
-0.014400853775441647,
0.015797682106494904,
0.0014452672330662608,
-0.019717814400792122,
-0.007047226652503014,
-0.02717958390712738,
0.027954598888754845,
-0.030405808240175247,
0.020961442962288857,
0.030549997463822365,
0.02292601577937603,
0.0011259115999564528,
0.0074347336776554585,
-0.041057754307985306,
0.0567743293941021,
-0.03415471687912941,
-0.07151763141155243,
0.013490661978721619,
0.023322533816099167
] |
52,286 |
flexget.manager
|
config_changed
|
Makes sure that all tasks will have the config_modified flag come out true on the next run.
Useful when changing the db and all tasks need to be completely reprocessed.
|
def config_changed(self) -> None:
"""Makes sure that all tasks will have the config_modified flag come out true on the next run.
Useful when changing the db and all tasks need to be completely reprocessed."""
from flexget.task import config_changed
config_changed()
fire_event('manager.config_updated', self)
|
(self) -> NoneType
|
[
0.07485730201005936,
0.017531437799334526,
-0.01667517051100731,
0.024363933131098747,
0.007781451568007469,
-0.012958787381649017,
-0.037605199962854385,
0.02143319882452488,
0.021803954616189003,
-0.026817981153726578,
-0.04692705348134041,
-0.07817644625902176,
0.04046531394124031,
0.018820255994796753,
0.009251232258975506,
-0.06620633602142334,
-0.046044301241636276,
0.014556567184627056,
-0.001819570898078382,
-0.06080390140414238,
0.011828865855932236,
-0.026005849242210388,
0.03742865100502968,
0.0255291648209095,
0.02256312035024166,
-0.023286975920200348,
0.03469212353229523,
0.0032661794684827328,
0.04314887896180153,
0.006638288963586092,
-0.06214568391442299,
-0.02630598470568657,
0.0009555781725794077,
-0.0033963851165026426,
-0.014733117073774338,
-0.0006151672569103539,
0.034868672490119934,
0.02662377618253231,
-0.030525535345077515,
-0.019614731892943382,
0.018378879874944687,
0.0024077037815004587,
0.05190576985478401,
0.021556783467531204,
0.015271595679223537,
0.035751424729824066,
-0.030066505074501038,
0.06652413308620453,
-0.025635095313191414,
0.031920284032821655,
0.018837910145521164,
-0.0031999731436371803,
-0.02143319882452488,
0.09032310545444489,
0.016436826437711716,
-0.021839264780282974,
0.061792582273483276,
0.0174078531563282,
0.053635962307453156,
-0.0439256988465786,
0.004305618815124035,
0.008002139627933502,
0.020426861941814423,
-0.03416247293353081,
0.04516155272722244,
-0.04463190212845802,
0.017549093812704086,
0.02231595106422901,
0.021874574944376945,
0.0252819936722517,
-0.018114054575562477,
-0.013100028038024902,
-0.0010201293043792248,
-0.03038429655134678,
-0.018873220309615135,
-0.02443455345928669,
-0.06521765887737274,
0.006276361178606749,
-0.01056653168052435,
0.020832927897572517,
0.01317064743489027,
-0.008805443532764912,
0.04615023359656334,
0.01427408680319786,
-0.005490712355822325,
-0.014221121557056904,
0.02118602953851223,
-0.043607909232378006,
0.024222692474722862,
-0.02955451048910618,
0.04805697500705719,
0.03693430870771408,
-0.008302275091409683,
-0.0039017603266984224,
0.03338564932346344,
-0.04731546342372894,
-0.03718148171901703,
0.00221901573240757,
-0.009365989826619625,
-0.017019443213939667,
0.0145036019384861,
-0.037322718650102615,
0.04554996266961098,
-0.05734351649880409,
0.05628421530127525,
-0.07167939841747284,
-0.017681505531072617,
-0.028442243114113808,
-0.020691687241196632,
-0.011316870339214802,
-0.05017557740211487,
0.020532792434096336,
-0.03615748882293701,
-0.02711811661720276,
0.03855857253074646,
0.025688059628009796,
0.0027188737876713276,
-0.01071659941226244,
0.008068345487117767,
-0.016419172286987305,
0.019402870908379555,
0.0553661547601223,
0.014847874641418457,
0.005194990895688534,
0.02928968518972397,
0.05720227584242821,
0.000018223983715870418,
0.05077584832906723,
0.05218825116753578,
-0.050669919699430466,
0.01101673487573862,
-0.0011608178028836846,
-0.03287365287542343,
0.013638505712151527,
0.03838202357292175,
-0.004305618815124035,
0.026712050661444664,
0.008143379352986813,
0.01680758222937584,
0.014821392484009266,
-0.017266612499952316,
0.03905291110277176,
0.03612218052148819,
-0.034356676042079926,
0.03523942828178406,
0.014221121557056904,
-0.0482335239648819,
0.04664457216858864,
-0.022880911827087402,
-0.012782237492501736,
0.07220904529094696,
-0.030543191358447075,
-0.07295055687427521,
-0.026288330554962158,
-0.07704652100801468,
0.06853680312633514,
-0.03774644061923027,
0.009719090536236763,
0.012632169760763645,
-0.015033252537250519,
-0.014309396967291832,
-0.0012457825941964984,
0.02549385465681553,
0.02881299890577793,
-0.02524668350815773,
-0.008840752765536308,
-0.07351551949977875,
-0.009983915835618973,
-0.02738294191658497,
-0.008143379352986813,
0.0001895156456157565,
0.0034405228216201067,
0.002027017530053854,
0.02040920779109001,
0.059850532561540604,
0.052788522094488144,
0.0227926354855299,
-0.032185107469558716,
0.014618359506130219,
-0.008452342823147774,
-0.06786590814590454,
-0.006280774716287851,
0.008253723382949829,
0.061510104686021805,
0.029519200325012207,
0.06454676389694214,
-0.04893972724676132,
0.03643997013568878,
-0.016322068870067596,
-0.011643487960100174,
0.004184240475296974,
-0.0006344774155877531,
-0.024046141654253006,
-0.01752261072397232,
-0.021874574944376945,
0.008915786631405354,
-0.05342410132288933,
0.0015514352126047015,
0.04314887896180153,
0.013673815876245499,
0.004426997154951096,
-0.04784511402249336,
0.03802892193198204,
0.01604841649532318,
0.06168665364384651,
0.0020148796029388905,
0.005601056385785341,
-0.01644565537571907,
0.05568394437432289,
0.03071974217891693,
0.003453764133155346,
0.00265046046115458,
0.0049036829732358456,
0.00028744584415107965,
-0.006236637011170387,
-0.08149559050798416,
0.011581695638597012,
0.02741825208067894,
-0.03668713942170143,
0.023004496470093727,
0.033862337470054626,
0.01984424702823162,
0.01045177411288023,
-0.01752261072397232,
0.01924397610127926,
0.01018694881349802,
0.01101673487573862,
-0.04216019809246063,
0.002420945093035698,
-0.014362362213432789,
-0.0009544747299514711,
0.024063797667622566,
-0.040889035910367966,
-0.03172607719898224,
0.10762502253055573,
0.001423436333425343,
0.008280206471681595,
-0.024310966953635216,
-0.0663122683763504,
0.02037389762699604,
-0.03146125376224518,
0.011484593152999878,
0.01125507801771164,
-0.017990469932556152,
-0.001165231573395431,
-0.05402437224984169,
0.014688979834318161,
0.011802383698523045,
-0.04498500004410744,
0.026535501703619957,
0.027753697708249092,
-0.04346666857600212,
0.015245113521814346,
0.01929694041609764,
-0.05215293914079666,
-0.013197130523622036,
-0.012482102029025555,
0.01584538444876671,
0.04434942081570625,
-0.008637720718979836,
0.01818467490375042,
-0.0035795560106635094,
-0.04893972724676132,
0.059038400650024414,
0.02060341276228428,
0.0018912943778559566,
0.04014752432703972,
-0.0027652180287986994,
-0.0039436910301446915,
0.014282913878560066,
0.0759166032075882,
0.027824318036437035,
-0.04445534944534302,
-0.022669050842523575,
-0.03834671154618263,
-0.033297374844551086,
0.021503819152712822,
0.013091200031340122,
-0.03802892193198204,
-0.006346981041133404,
0.034833360463380814,
-0.03891167417168617,
0.03320910036563873,
0.03901760280132294,
-0.035133495926856995,
-0.040041595697402954,
-0.027612457051873207,
0.04745670408010483,
-0.06440553069114685,
-0.003967966418713331,
0.016216140240430832,
0.0018824669532477856,
0.007092905696481466,
-0.032185107469558716,
0.0520470105111599,
-0.048692554235458374,
-0.054977744817733765,
0.03578673303127289,
0.01627793163061142,
0.036510590463876724,
0.021097753196954727,
-0.015818901360034943,
-0.14053398370742798,
-0.020250312983989716,
0.03098456747829914,
0.028707068413496017,
0.01249975711107254,
-0.04540872201323509,
0.0044402386993169785,
0.027100462466478348,
0.03834671154618263,
-0.018361225724220276,
-0.01597779616713524,
-0.01018694881349802,
0.04692705348134041,
-0.022633740678429604,
0.03094925731420517,
0.022386569529771805,
0.011943623423576355,
0.017310751602053642,
-0.06772467494010925,
0.053883131593465805,
-0.036545898765325546,
0.03753457963466644,
0.022333605214953423,
-0.0030454916413873434,
0.03749927133321762,
0.04579713195562363,
-0.03310316801071167,
0.008840752765536308,
-0.03181435167789459,
-0.01897915080189705,
0.05176452919840813,
-0.024840619415044785,
-0.03827609121799469,
-0.061721961945295334,
0.017381370067596436,
-0.04487907141447067,
0.024063797667622566,
-0.04826883599162102,
0.034356676042079926,
-0.010001570917665958,
-0.00887606292963028,
0.0016672962810844183,
0.011113837361335754,
0.049787167459726334,
0.015404008328914642,
0.01604841649532318,
0.04367852956056595,
-0.04050062596797943,
-0.044384729117155075,
-0.006620633881539106,
-0.04858662560582161,
0.06401711702346802,
0.016401516273617744,
-0.03774644061923027,
0.006086569279432297,
-0.06578262150287628,
-0.0042592743411660194,
-0.0694548636674881,
-0.045726511627435684,
0.0062322234734892845,
0.048198215663433075,
0.01818467490375042,
0.001617641537450254,
0.01979128085076809,
-0.03453322499990463,
-0.014291741885244846,
0.08961690217256546,
-0.052506040781736374,
-0.013276577927172184,
0.013656160794198513,
0.032979585230350494,
0.025458544492721558,
0.052541352808475494,
-0.056107666343450546,
-0.08841636031866074,
0.01669282466173172,
-0.0422661267220974,
0.09561961144208908,
0.0008540618000552058,
0.0036347280256450176,
0.014459464699029922,
-0.0001653779181651771,
-0.045973680913448334,
-0.010593014769256115,
0.03320910036563873,
-0.030207745730876923,
-0.004495410248637199,
-0.006501462310552597,
0.03306785970926285,
0.00909233745187521,
-0.05910902097821236,
0.0450909323990345,
-0.01761971414089203,
0.0153333880007267,
-0.007123802322894335,
0.025052478536963463,
0.014229949563741684,
-0.012517412193119526,
-0.015050907619297504,
-0.026659086346626282,
0.0016683997819200158,
0.007750555407255888,
0.02711811661720276,
-0.011502248235046864,
0.007393041159957647,
0.05109363794326782,
-0.011881831102073193,
0.010442947037518024,
-0.031902629882097244,
0.027100462466478348,
-0.011705281212925911,
-0.02118602953851223,
-0.03606921434402466,
-0.017911022529006004,
-0.05748475715517998,
-0.07464543730020523,
0.05455402284860611,
0.05762599781155586,
0.0040076905861496925,
0.04018283262848854,
0.05303569138050079,
-0.00014034364721737802,
0.01181121077388525,
-0.0050758193247020245,
-0.0033787302672863007,
0.0886988416314125,
-0.08516783267259598,
0.0021814987994730473,
0.024893583729863167,
0.06744219362735748,
-0.005574573762714863,
0.024805309250950813,
0.02360476739704609,
-0.03880574181675911,
0.043819770216941833,
-0.046256162226200104,
-0.030613811686635017,
-0.017151854932308197,
0.01302940770983696,
0.028459899127483368,
0.017478473484516144,
-0.06768935918807983,
0.043607909232378006,
0.009304197505116463,
-0.0023966694716364145,
-0.002734321868047118,
0.02662377618253231,
-0.009004062041640282,
-0.07739962637424469,
0.01644565537571907,
-0.04014752432703972,
-0.0422661267220974,
0.04254860803484917,
-0.0422661267220974,
-0.011599350720643997,
0.0031293530482798815,
-0.03827609121799469,
0.02521137334406376,
-0.04812759533524513,
-0.028865963220596313,
-0.05402437224984169,
-0.03725210204720497,
0.06786590814590454,
-0.0782470628619194,
-0.00824048276990652,
0.04420818015933037,
-0.028618793934583664,
0.017178338021039963,
0.023286975920200348,
-0.030860980972647667,
-0.01261451467871666,
0.036263417452573776,
-0.05405968427658081,
-0.04784511402249336,
-0.01722247526049614,
0.038417331874370575,
0.00044330660603009164,
0.004195275250822306,
0.003091836115345359,
0.0717853307723999,
0.020479828119277954,
0.019155701622366905,
0.0036766587290912867,
-0.07881202548742294,
0.002906458219513297,
-0.04403163120150566,
-0.021821608766913414,
-0.05070522800087929,
-0.05261196941137314,
-0.07185594737529755,
0.033014893531799316,
-0.002672529313713312,
-0.05451871454715729,
-0.04434942081570625,
-0.026411915197968483,
0.00645732507109642,
0.05864999070763588,
0.04318418726325035,
0.013197130523622036,
-0.006845735479146242,
-0.015986623242497444,
0.07563412189483643,
0.0056363665498793125,
-0.004691822454333305,
-0.04487907141447067,
0.029713405296206474,
-0.03264413774013519,
-0.007693176623433828,
-0.013541403226554394,
-0.012799892574548721,
0.05564863607287407,
-0.01954411156475544,
0.03944132477045059,
-0.06168665364384651,
-0.018802599981427193,
0.04039469361305237,
0.04014752432703972,
0.025370270013809204,
-0.01086666714400053,
-0.03416247293353081,
0.04784511402249336,
0.02581164427101612,
-0.027841972187161446,
-0.031143462285399437,
0.021539129316806793,
-0.060697972774505615,
-0.020744653418660164,
0.05300038307905197,
0.02688860148191452,
-0.049222204834222794,
0.045196861028671265,
0.007203249726444483,
0.009860331192612648,
0.03500991314649582,
-0.01181121077388525,
-0.04530278965830803,
-0.10056301951408386,
0.012596859596669674,
0.017460819333791733,
-0.039194151759147644,
0.09265356510877609,
0.017037097364664078,
-0.060945142060518265,
0.011440455913543701,
0.020850583910942078,
-0.006417601369321346,
-0.00011993002408416942,
-0.014636014588177204,
0.003903967095538974,
0.015271595679223537,
0.04314887896180153,
-0.008116897195577621,
-0.00007710279896855354,
-0.08029504865407944,
0.042725156992673874,
-0.008937856182456017,
0.0334915816783905,
0.02063872292637825,
-0.005583401303738356,
0.01979128085076809,
-0.026712050661444664,
0.08333171159029007,
0.04812759533524513,
0.007679935544729233,
0.005084646865725517,
0.03306785970926285,
0.01332071516662836,
0.02067403309047222,
0.08071877062320709,
-0.004098172299563885,
0.04904565587639809,
-0.0326617956161499,
0.011105010285973549,
-0.0036303142551332712,
0.025952884927392006,
-0.018943840637803078,
-0.036545898765325546,
-0.07499854266643524,
-0.033014893531799316,
-0.009754400700330734,
0.01169645320624113,
0.03250289708375931,
-0.034639157354831696,
-0.033244408667087555,
-0.008209586143493652,
0.07789396494626999,
0.005005199462175369,
0.034091852605342865,
-0.047103602439165115,
0.05533084645867348,
0.002086603082716465,
-0.03121408261358738,
0.005000785458832979,
0.003844381542876363,
0.004045207519084215,
-0.017045926302671432,
0.019332250580191612,
0.0334915816783905,
-0.06620633602142334,
-0.02339290641248226,
0.0679718405008316,
-0.03370343893766403,
-0.02339290641248226,
-0.02575867995619774,
-0.021327268332242966,
-0.05776723846793175,
-0.0023768076207488775,
0.055789876729249954,
-0.00322866253554821,
-0.027312321588397026,
0.03130235895514488,
0.0010852322448045015,
0.010098673403263092,
-0.01793750375509262,
-0.016021933406591415,
0.04134806618094444,
0.020832927897572517,
-0.026482535526156425,
0.0026968049351125956,
0.0725974589586258,
-0.005468643736094236,
-0.025140754878520966,
-0.05314162001013756,
0.008840752765536308,
-0.019491147249937057,
-0.04484375938773155,
-0.055260226130485535,
-0.012667479924857616,
0.006956079509109259,
-0.0032330763060599566,
0.001659572240896523,
-0.052541352808475494,
0.020850583910942078,
-0.08982875943183899,
-0.014591877348721027,
-0.00819634459912777,
0.010019225999712944,
-0.051976390182971954,
0.06723032891750336,
0.00855385884642601,
0.02446986362338066,
-0.04886910691857338,
0.007702004164457321,
-0.030013540759682655,
-0.02282794564962387,
-0.04562058299779892,
0.07086726278066635,
-0.030490227043628693,
-0.024522827938199043,
0.014636014588177204,
-0.004947820212692022,
0.06373463571071625,
-0.017293095588684082,
-0.00896875187754631,
-0.03500991314649582,
-0.033297374844551086,
-0.0022421879693865776,
-0.028071487322449684,
-0.008046276867389679,
-0.02388724684715271,
-0.03177904337644577,
-0.02037389762699604,
0.07937698811292648,
-0.017045926302671432,
-0.0013164026895537972,
0.0668066069483757,
-0.028142107650637627,
0.009816193021833897,
0.03636934980750084,
-0.07252683490514755,
0.044384729117155075,
0.00988681335002184,
0.04554996266961098,
-0.09392472356557846,
-0.004700649995356798,
0.03753457963466644,
0.024487517774105072,
-0.0092424051836133,
-0.053671274334192276,
0.013506093062460423,
-0.0006068914663046598,
0.01614551991224289,
0.0211330633610487,
0.05141143128275871,
-0.0027585974894464016,
-0.04124213755130768,
0.0586852990090847,
0.05462464317679405,
-0.035698458552360535,
0.06214568391442299,
-0.008103655651211739,
0.0244522076100111,
-0.03423308953642845,
-0.032467588782310486,
-0.05596642568707466,
-0.018361225724220276,
-0.07888264954090118,
0.0038576226215809584,
0.048480696976184845,
-0.022104090079665184,
-0.008783373981714249,
0.01929694041609764,
0.017566747963428497,
-0.02060341276228428,
-0.053106311708688736,
-0.06412304937839508,
-0.09964495152235031,
0.002937354613095522,
-0.023234011605381966,
0.02231595106422901,
0.012111346237361431,
-0.040288764983415604,
-0.00515085319057107,
-0.027824318036437035,
0.005102301947772503,
-0.06864273548126221,
0.04131275415420532,
0.018943840637803078,
-0.06832494586706161,
0.008050691336393356,
-0.012217276729643345,
-0.02498185820877552,
0.08311985433101654,
0.016648687422275543,
0.008637720718979836,
-0.013762091286480427,
-0.013938641175627708,
0.002027017530053854,
-0.017310751602053642,
-0.03802892193198204,
0.005812916439026594,
0.08001256734132767,
0.0455852709710598,
0.04371383786201477,
0.002130740787833929,
0.02337525226175785,
-0.04134806618094444,
0.00488161388784647,
0.028865963220596313,
-0.036793068051338196,
0.018414190039038658,
-0.005393609870225191,
0.013426645658910275,
-0.01709006354212761,
-0.013356025330722332,
0.046856433153152466,
-0.02687094546854496,
0.007393041159957647,
-0.014256431721150875,
0.05910902097821236,
0.017178338021039963,
0.020232656970620155,
-0.010072191245853901,
0.0030565259512513876,
0.00027751491870731115,
0.012067208997905254,
0.017460819333791733,
0.023781316354870796,
0.03426840156316757,
0.0017301923362538218,
0.03306785970926285,
0.033262066543102264,
0.07817644625902176,
-0.022333605214953423,
0.019614731892943382,
0.027312321588397026
] |
52,287 |
flexget.manager
|
crash_report
|
This should be called when handling an unexpected exception. Will create a new log file containing the last 50
debug messages as well as the crash traceback.
|
def crash_report(self) -> str:
"""
This should be called when handling an unexpected exception. Will create a new log file containing the last 50
debug messages as well as the crash traceback.
"""
if not self.unit_test:
log_dir = os.path.dirname(self.log_filename)
filename = os.path.join(
log_dir, datetime.now().strftime('crash_report.%Y.%m.%d.%H%M%S%f.log')
)
with codecs.open(filename, 'w', encoding='utf-8') as outfile:
outfile.writelines(flexget.log.debug_buffer)
traceback.print_exc(file=outfile)
logger.critical(
'An unexpected crash has occurred. Writing crash report to {}. '
'Please verify you are running the latest version of flexget by using "flexget -V" '
'from CLI or by using version_checker plugin'
' at https://flexget.com/Plugins/version_checker. '
'You are currently using version {}',
filename,
get_current_flexget_version(),
)
logger.opt(exception=True).debug('Traceback:')
return traceback.format_exc()
|
(self) -> str
|
[
0.05013073980808258,
0.00556086003780365,
-0.016701024025678635,
0.07255861908197403,
0.02416161447763443,
-0.08978530019521713,
-0.08240770548582077,
0.0033314439933747053,
-0.02416161447763443,
-0.06352107226848602,
0.050979163497686386,
-0.00937415286898613,
-0.008687115274369717,
-0.020454375073313713,
0.05643858015537262,
0.029602589085698128,
-0.021063026040792465,
-0.016590360552072525,
0.030709227547049522,
0.04854455590248108,
0.02235410548746586,
0.028993938118219376,
-0.09317898750305176,
0.02032526768743992,
0.0015077954158186913,
0.045187752693891525,
-0.0023608296178281307,
-0.03144698590040207,
0.06315218657255173,
-0.019181739538908005,
-0.023608295246958733,
-0.039248790591955185,
-0.043343354016542435,
0.00657527893781662,
-0.05282356217503548,
0.012385132722556591,
0.012846232391893864,
-0.07200530171394348,
-0.04614683985710144,
0.019107963889837265,
0.04474509879946709,
0.00678277388215065,
0.047105927020311356,
-0.035596881061792374,
0.009083660319447517,
-0.04415488988161087,
-0.024622714146971703,
-0.0009671562584117055,
-0.01416497677564621,
0.0036081038415431976,
-0.0033821649849414825,
0.014801294542849064,
-0.020565038546919823,
-0.005952794570475817,
0.011942477896809578,
0.042863812297582626,
0.012809344567358494,
-0.028551282361149788,
0.04640505462884903,
-0.04968808591365814,
-0.016147704795002937,
0.033383604139089584,
0.020435931161046028,
0.01792754977941513,
-0.011186274699866772,
-0.012348244898021221,
-0.010273297317326069,
0.004682465456426144,
0.04028165340423584,
-0.009812197647988796,
0.012984562665224075,
0.0028472894337028265,
-0.030524788424372673,
0.007783359847962856,
0.031280990689992905,
-0.025876905769109726,
-0.018508534878492355,
-0.019034188240766525,
0.0160093754529953,
-0.012920008972287178,
0.006556835025548935,
0.03408447653055191,
-0.01570504903793335,
-0.01999327540397644,
0.057287003844976425,
-0.018508534878492355,
0.021690120920538902,
-0.005865185987204313,
-0.0636686235666275,
0.040982525795698166,
-0.006519947201013565,
-0.0037556556053459644,
-0.014081979170441628,
0.0008276736480183899,
-0.00189973006490618,
-0.06307841092348099,
0.0024115503765642643,
-0.03847414255142212,
-0.00010230645420961082,
-0.0049337646923959255,
0.032904062420129776,
0.03865858539938927,
0.0004322807944845408,
0.022593876346945763,
-0.0228520929813385,
-0.049097876995801926,
-0.02742619998753071,
-0.013666990213096142,
0.042826924473047256,
0.019753502681851387,
-0.09738422185182571,
-0.07753849774599075,
-0.02205900102853775,
-0.06444326788187027,
0.025710908696055412,
0.010356294922530651,
-0.0051965913735330105,
0.039175014942884445,
0.01852697879076004,
-0.025655576959252357,
0.07790737599134445,
-0.02604290097951889,
-0.04002343863248825,
-0.018702195957303047,
-0.0072208186611533165,
0.04006032645702362,
-0.019255515187978745,
0.022907424718141556,
0.023442300036549568,
0.04610995203256607,
0.009655424393713474,
0.03832659125328064,
0.034176696091890335,
0.012090029194951057,
0.00340983085334301,
0.019218627363443375,
-0.001846703584305942,
-0.012809344567358494,
0.01612003892660141,
-0.022815203294157982,
-0.014626076444983482,
-0.02397717535495758,
-0.020749477669596672,
0.005413308274000883,
-0.04566729813814163,
0.047216590493917465,
0.009383374825119972,
0.013593213632702827,
-0.03814215213060379,
-0.017724664881825447,
0.06591878831386566,
-0.03441646695137024,
-0.13685433566570282,
-0.03321760892868042,
-0.009245045483112335,
0.01296611875295639,
-0.019642839208245277,
0.05223335325717926,
0.028311509639024734,
0.004776990972459316,
-0.022427881136536598,
-0.05485239997506142,
0.0004867481766268611,
-0.008023131638765335,
0.0020726423244923353,
-0.03799460083246231,
-0.03126254677772522,
0.06433260440826416,
-0.0013475633459165692,
-0.0116104856133461,
-0.019329292699694633,
0.03393692523241043,
-0.039211902767419815,
0.04452376812696457,
0.004172950517386198,
0.0441180020570755,
-0.02108146995306015,
-0.019642839208245277,
-0.00036369223380461335,
0.01890508085489273,
-0.013187446631491184,
-0.045519743114709854,
-0.013196668587625027,
0.059574056416749954,
0.01363932341337204,
-0.049282316118478775,
-0.035596881061792374,
0.025415806099772453,
-0.0010420848848298192,
0.05813542753458023,
0.015151729807257652,
0.013657767325639725,
0.022630764171481133,
0.002662849612534046,
0.031465429812669754,
-0.02292586863040924,
0.0017556364182382822,
-0.022907424718141556,
0.034969788044691086,
-0.043085139244794846,
-0.032258521765470505,
0.09583492577075958,
0.020804809406399727,
-0.035799767822027206,
0.03712773323059082,
-0.027370868250727654,
0.0765056312084198,
-0.029713252559304237,
-0.10992612689733505,
0.058946963399648666,
-0.009609313681721687,
0.004242115654051304,
-0.0386216975748539,
-0.012597238644957542,
-0.0029810084961354733,
-0.06802140176296234,
0.04658949375152588,
0.028993938118219376,
-0.05632791668176651,
0.045113977044820786,
-0.028127070516347885,
-0.02690976858139038,
-0.04481887444853783,
-0.010513069108128548,
0.004371223505586386,
0.04651571810245514,
0.03107810765504837,
0.029657920822501183,
-0.024622714146971703,
-0.028791053220629692,
-0.027407756075263023,
-0.0006155678420327604,
0.013879095204174519,
0.012689459137618542,
0.0029049268923699856,
-0.004827712196856737,
-0.03441646695137024,
-0.015022622421383858,
0.02430916577577591,
-0.055627044290304184,
-0.0012737874640151858,
0.008373566903173923,
0.07016090303659439,
0.043527793139219284,
0.05570082366466522,
-0.054926175624132156,
-0.017641667276620865,
0.06724675744771957,
-0.0047816019505262375,
0.017383452504873276,
0.045040201395750046,
-0.009950527921319008,
-0.01467218715697527,
-0.04824945330619812,
-0.014266419224441051,
-0.03745972365140915,
-0.014155754819512367,
-0.01834253966808319,
0.03760727494955063,
0.008083074353635311,
0.018665308132767677,
-0.018167320638895035,
0.03137321025133133,
-0.028883274644613266,
0.004887654911726713,
-0.021856117993593216,
-0.05215957760810852,
0.019716614857316017,
0.025526469573378563,
0.059131402522325516,
-0.020399043336510658,
0.036777298897504807,
0.014395526610314846,
0.007829469628632069,
-0.047437917441129684,
0.008548785001039505,
-0.010891170240938663,
-0.0032415296882390976,
0.00556086003780365,
0.05595903843641281,
-0.02423539012670517,
0.015354613773524761,
0.06934937089681625,
-0.00622023269534111,
0.022520100697875023,
-0.04393356293439865,
0.0033591100946068764,
-0.03876924887299538,
0.005689967889338732,
0.025471137836575508,
-0.003965456038713455,
0.04385978728532791,
-0.011278494261205196,
-0.05599592626094818,
-0.017918327823281288,
0.0013245083391666412,
0.0025337417609989643,
-0.0581723153591156,
0.012145360931754112,
0.02904926985502243,
0.02788729965686798,
0.020491262897849083,
0.005989682860672474,
0.022151220589876175,
-0.053081776946783066,
0.034176696091890335,
-0.057176340371370316,
-0.01349177211523056,
0.011684262193739414,
-0.007285372354090214,
-0.021893005818128586,
0.04788057506084442,
0.04880277439951897,
0.0057775769382715225,
0.031465429812669754,
0.032793398946523666,
0.023239415138959885,
0.04610995203256607,
0.03318072110414505,
0.08535874634981155,
-0.019661283120512962,
0.061418455094099045,
0.0326274037361145,
0.009913640096783638,
0.0713782086968422,
-0.004085341934114695,
0.023516075685620308,
-0.03633464127779007,
-0.010190299712121487,
-0.017521781846880913,
-0.010430071502923965,
-0.017254343256354332,
-0.051016051322221756,
-0.017162123695015907,
0.05186447501182556,
-0.03705395758152008,
-0.03576287999749184,
-0.0971628874540329,
0.00811535120010376,
-0.06783696264028549,
-0.012228359468281269,
0.005145870614796877,
-0.013445662334561348,
-0.011758037842810154,
0.012431243434548378,
0.0008115351665765047,
0.030690783634781837,
-0.031170327216386795,
-0.041498955339193344,
0.0562172532081604,
0.041388291865587234,
-0.041093189269304276,
-0.03836347907781601,
0.004398889373987913,
-0.004345863126218319,
-0.05429907888174057,
-0.051606256514787674,
-0.04201538860797882,
-0.0031193383038043976,
0.02984236180782318,
-0.039101239293813705,
0.045630406588315964,
-0.040908750146627426,
0.0378839373588562,
-0.010402404703199863,
-0.0336049348115921,
-0.04190472513437271,
0.018462425097823143,
-0.006768940947949886,
0.021247465163469315,
-0.020804809406399727,
0.001643819734454155,
0.030266571789979935,
0.03190808743238449,
-0.03637152910232544,
-0.011711928062140942,
-0.015622051432728767,
0.008000076748430729,
-0.055479492992162704,
0.06658276915550232,
0.03836347907781601,
0.012541906908154488,
-0.08321923762559891,
-0.02434605546295643,
0.001235746662132442,
-0.030229683965444565,
-0.014893514104187489,
-0.013657767325639725,
0.04013410210609436,
0.026577776297926903,
0.010125745087862015,
-0.045261528342962265,
-0.0021729315631091595,
0.015419167466461658,
0.002499159425497055,
-0.01320589054375887,
0.0001801170001272112,
0.04183094948530197,
0.0008115351665765047,
0.03187119960784912,
-0.030543232336640358,
0.01195169985294342,
0.041056301444768906,
0.01566816121339798,
0.019034188240766525,
0.012053141370415688,
0.004869210999459028,
-0.08307168632745743,
0.0101441890001297,
0.061492230743169785,
0.007345315534621477,
-0.006994879804551601,
-0.033346716314554214,
-0.05286044999957085,
-0.037219952791929245,
0.0005170078366063535,
-0.014229531399905682,
-0.01874830573797226,
0.03122565895318985,
0.05573771148920059,
0.013648545369505882,
-0.004341252148151398,
0.031576093286275864,
0.03854791820049286,
0.0027827355079352856,
-0.01908951997756958,
-0.0421629399061203,
0.028993938118219376,
-0.05234401673078537,
0.030819891020655632,
-0.008820833638310432,
0.017263565212488174,
-0.027665970847010612,
0.04065053537487984,
-0.0009781073313206434,
-0.005464029498398304,
-0.02596912533044815,
0.00787096843123436,
-0.025766240432858467,
0.05238090455532074,
0.033420491963624954,
0.003787932451814413,
0.07775982469320297,
-0.023350080475211143,
-0.006602945271879435,
0.019679727032780647,
-0.009766087867319584,
-0.04249493032693863,
0.009600091725587845,
0.03242451697587967,
-0.008687115274369717,
0.022077444940805435,
-0.05824609100818634,
0.008046186529099941,
0.01999327540397644,
-0.02825617790222168,
-0.05448351800441742,
-0.03749661147594452,
0.020694145932793617,
0.06222999095916748,
-0.004048453643918037,
0.0699026882648468,
0.009498650208115578,
-0.029104601591825485,
0.020159270614385605,
-0.057065676897764206,
0.012643348425626755,
0.02307341992855072,
0.006921103689819574,
-0.01206236332654953,
0.049024101346731186,
0.006215621717274189,
-0.0218745619058609,
-0.0029694808181375265,
-0.025508025661110878,
-0.014745962806046009,
-0.02792418748140335,
0.010171855799853802,
0.06886982172727585,
0.005450196098536253,
-0.0011850257869809866,
-0.04223671555519104,
0.04072431102395058,
0.011758037842810154,
-0.0025890737306326628,
-0.005855964031070471,
0.043564680963754654,
-0.019642839208245277,
-0.043011363595724106,
0.009069827385246754,
-0.03607642650604248,
-0.008880776353180408,
-0.02585846185684204,
0.02119213342666626,
-0.02641178108751774,
-0.023792734369635582,
-0.012182249687612057,
-0.007612753193825483,
-0.039359454065561295,
0.0125880166888237,
0.017051460221409798,
-0.10276985913515091,
0.0014501579571515322,
-0.004145284648984671,
0.0006760871619917452,
0.008516508154571056,
0.03100433200597763,
-0.00841506663709879,
0.03172364830970764,
-0.051532480865716934,
-0.023571407422423363,
0.005173536483198404,
-0.017254343256354332,
-0.008594894781708717,
-0.016691802069544792,
-0.06344729661941528,
-0.023755846545100212,
-0.05415152758359909,
0.04053986817598343,
0.024069394916296005,
-0.018997300416231155,
0.06842716783285141,
-0.00657527893781662,
-0.08144862204790115,
0.022704539820551872,
-0.05378264933824539,
0.07532522082328796,
0.03716462105512619,
0.01153670996427536,
0.051384929567575455,
-0.07215285301208496,
0.025305140763521194,
0.08107973635196686,
-0.015871046110987663,
0.06602945178747177,
0.01743878424167633,
-0.026430224999785423,
-0.04603617638349533,
-0.016590360552072525,
-0.0640375018119812,
0.000021019654013798572,
-0.000022010297470842488,
-0.009351097978651524,
-0.10756529867649078,
0.003571215784177184,
-0.05212268978357315,
0.004680159967392683,
0.024585826322436333,
-0.0020115466322749853,
-0.035486217588186264,
0.05271289870142937,
0.045630406588315964,
0.06588190048933029,
-0.024622714146971703,
0.006957991514354944,
0.039396341890096664,
0.04658949375152588,
0.06499658524990082,
0.07207907736301422,
0.025747796520590782,
-0.024622714146971703,
0.021247465163469315,
0.00856722891330719,
-0.055221278220415115,
-0.039027463644742966,
-0.0031608371064066887,
0.0008651379612274468,
0.07104621082544327,
-0.027536863461136818,
-0.015456056222319603,
-0.004435777198523283,
0.007612753193825483,
0.023589851334691048,
0.010217965580523014,
-0.032442960888147354,
0.018997300416231155,
0.015419167466461658,
0.05381953716278076,
0.04017098993062973,
-0.006787384860217571,
0.00072104437276721,
-0.028311509639024734,
0.0053810314275324345,
-0.017143679782748222,
-0.03777327388525009,
-0.014865848235785961,
0.035928875207901,
-0.03449024260044098,
0.006874993909150362,
0.027776634320616722,
-0.051495593041181564,
-0.04068742319941521,
0.0067136092111468315,
-0.03249829262495041,
0.008428899571299553,
0.06680409610271454,
0.01890508085489273,
0.014939624816179276,
0.005348754581063986,
0.061270903795957565,
-0.027260202914476395,
0.06813206523656845,
0.030875224620103836,
0.006879604887217283,
0.05879941210150719,
0.00006477007264038548,
0.03648219257593155,
0.017743108794093132,
0.01882208324968815,
0.03386314958333969,
-0.03347582370042801,
-0.015880268067121506,
0.016129260882735252,
0.04813878983259201,
-0.01349177211523056,
-0.04422866553068161,
-0.00943409651517868,
0.0001732005039229989,
0.04574107378721237,
0.05990605056285858,
0.019439956173300743,
0.05784032493829727,
-0.03122565895318985,
-0.025987569242715836,
0.015133285894989967,
0.04983563721179962,
0.01646125316619873,
-0.036611299961805344,
-0.043380241841077805,
-0.041240740567445755,
0.0049522086046636105,
0.03858480602502823,
0.017309676855802536,
-0.05234401673078537,
-0.03155764937400818,
-0.011343047954142094,
0.01341799646615982,
-0.014284863136708736,
-0.013316554017364979,
0.037219952791929245,
0.03362337872385979,
0.07049289345741272,
-0.030819891020655632,
-0.03766261041164398,
-0.027776634320616722,
-0.008507286198437214,
0.02220655232667923,
-0.11693483591079712,
0.06824272871017456,
0.002250165678560734,
-0.032295409590005875,
-0.007414480205625296,
-0.010845060460269451,
0.02202211320400238,
-0.018997300416231155,
0.021856117993593216,
-0.006496892310678959,
-0.003462857333943248,
-0.03266429156064987,
0.019753502681851387,
-0.0014259502058848739,
-0.007529755122959614,
0.0075620319694280624,
-0.04869211092591286,
0.021929893642663956,
-0.04201538860797882,
0.056918125599622726,
-0.04031854122877121,
0.0006345881847664714,
-0.0241985023021698,
0.05370887368917465,
-0.05005696415901184,
-0.007225429639220238,
-0.02427227795124054,
0.0464419424533844,
0.02807173877954483,
-0.00699026882648468,
0.07894023507833481,
-0.01461685448884964,
-0.07473500818014145,
0.06588190048933029,
0.06495969742536545,
-0.030524788424372673,
-0.02596912533044815,
0.0011417976347729564,
0.050979163497686386,
-0.04610995203256607,
0.012200693599879742,
-0.018084323033690453,
0.00507209450006485,
-0.053524430841207504,
-0.030838334932923317,
-0.04275314882397652,
0.011324604041874409,
-0.07377592474222183,
0.021173689514398575,
-0.018766749650239944,
0.02097080647945404,
0.0033775540068745613,
-0.0402078777551651,
-0.03351271152496338,
-0.0017752331914380193,
0.0487658865749836,
0.09052305668592453,
0.007995465770363808,
-0.03473001718521118,
0.025747796520590782,
-0.0356891043484211,
-0.06178733706474304,
-0.01916329562664032,
0.08019442856311798,
-0.026596220210194588,
0.048913437873125076,
0.006423116195946932,
-0.026596220210194588,
-0.07159953564405441,
-0.031815867871046066,
-0.02821929007768631,
-0.0039516231045126915,
-0.016931574791669846,
-0.016470475122332573,
0.020694145932793617,
-0.0038939854130148888,
-0.01251424103975296,
-0.01675635576248169,
0.0126802371814847,
-0.04264248535037041,
-0.010402404703199863,
0.043011363595724106,
0.012145360931754112,
-0.01115860790014267,
-0.01717134565114975,
0.00254065846092999,
0.05437285453081131,
0.03268273547291756,
-0.008378177881240845,
-0.06805828958749771,
0.00034467189107090235,
0.06916492432355881,
0.0356891043484211,
0.005141259636729956,
-0.004726270213723183,
-0.0713782086968422,
0.0012576489243656397,
0.01999327540397644,
0.051421817392110825,
0.04024476557970047,
0.08447343111038208,
-0.04566729813814163,
-0.05643858015537262,
0.01883130520582199,
-0.04574107378721237,
-0.034029144793748856,
0.03354959934949875,
0.028698833659291267,
-0.019495287910103798,
0.06754186004400253,
-0.02814551442861557,
0.035523105412721634,
0.011924033984541893,
0.06816895306110382,
-0.029491925612092018,
-0.04880277439951897,
0.04640505462884903,
-0.0054548075422644615,
0.08380945026874542,
-0.001731428666971624,
0.04810190200805664
] |
52,288 |
flexget.manager
|
daemon_command
|
Handles the 'daemon' CLI command.
Fires events:
* manager.daemon.started
* manager.daemon.completed
:param options: argparse options
|
def daemon_command(self, options: argparse.Namespace) -> None:
"""
Handles the 'daemon' CLI command.
Fires events:
* manager.daemon.started
* manager.daemon.completed
:param options: argparse options
"""
# Import API so it can register to daemon.started event
if options.action == 'start':
if self.is_daemon:
logger.error('Daemon already running for this config.')
return
elif self.task_queue.is_alive():
logger.error(
'Non-daemon execution of FlexGet is running. Cannot start daemon until it is finished.'
)
return
if options.daemonize:
self.daemonize()
if options.autoreload_config:
self.autoreload_config = True
try:
signal.signal(signal.SIGTERM, self._handle_sigterm)
except ValueError as e:
# If flexget is being called from another script, e.g. windows service helper, and we are not the
# main thread, this error will occur.
logger.debug('Error registering sigterm handler: {}', e)
self.is_daemon = True
def run_daemon(tray_icon: 'TrayIcon' = None):
fire_event('manager.daemon.started', self)
self.task_queue.start()
self.ipc_server.start()
self.task_queue.wait()
fire_event('manager.daemon.completed', self)
if tray_icon:
tray_icon.stop()
if options.tray_icon:
from flexget.tray_icon import tray_icon
self._add_tray_icon_items(tray_icon)
# Tray icon must be run in the main thread.
m = threading.Thread(target=run_daemon, args=(tray_icon,))
m.start()
tray_icon.run()
m.join()
else:
run_daemon()
elif options.action in ['stop', 'reload-config', 'status']:
if not self.is_daemon:
console('There does not appear to be a daemon running.')
return
if options.action == 'status':
logger.debug('`daemon status` called. Daemon running. (PID: {})', os.getpid())
console(f'Daemon running. (PID: {os.getpid()})')
elif options.action == 'stop':
tasks = (
'all queued tasks (if any) have'
if options.wait
else 'currently running task (if any) has'
)
logger.info(
'Daemon shutdown requested. Shutdown will commence when {} finished executing.',
tasks,
)
self.shutdown(options.wait)
elif options.action == 'reload-config':
logger.info('Reloading config from disk.')
try:
self.load_config()
except ValueError as e:
logger.error('Error loading config: {}', e.args[0])
else:
logger.info('Config successfully reloaded from disk.')
|
(self, options: argparse.Namespace) -> NoneType
|
[
0.11131653934717178,
0.0076558832079172134,
-0.009536359459161758,
0.005823255982249975,
0.044518958777189255,
0.010766085237264633,
-0.03475770726799965,
0.011340276338160038,
-0.005464386660605669,
-0.04723679646849632,
0.006296963896602392,
-0.03573383390903473,
-0.003581517841666937,
-0.04792582616209984,
0.02681473083794117,
-0.0015491200610995293,
-0.01986701600253582,
0.03808801621198654,
-0.029953641816973686,
-0.006086426787078381,
0.019321534782648087,
0.015972085297107697,
0.02803967148065567,
-0.011340276338160038,
-0.0035791252739727497,
-0.018527237698435783,
0.009349747560918331,
-0.034049540758132935,
-0.005636644084006548,
-0.018335839733481407,
-0.012488659471273422,
0.03226954862475395,
-0.047619592398405075,
0.015101228840649128,
-0.0079716881737113,
0.01749369315803051,
0.024230869486927986,
0.04203079640865326,
-0.02671903185546398,
0.02298678830265999,
-0.029551709070801735,
-0.07380270957946777,
0.08949727565050125,
0.00825878418982029,
0.028231069445610046,
0.012412100099027157,
-0.016986491158604622,
0.027427200227975845,
-0.015283056534826756,
-0.023350443691015244,
-0.008191795088350773,
-0.029532568529248238,
-0.02518785558640957,
0.006976423319429159,
-0.03858565166592598,
0.07169734686613083,
0.030757509171962738,
0.023675817996263504,
-0.019512932747602463,
-0.054395049810409546,
-0.007990827783942223,
0.03133170306682587,
0.020383788272738457,
0.02298678830265999,
-0.034049540758132935,
-0.020881420001387596,
0.008249213919043541,
0.012201563455164433,
0.0029188054613769054,
0.005928524304181337,
-0.0041533163748681545,
-0.005392612423747778,
-0.012565217912197113,
-0.04095897451043129,
0.1079479530453682,
-0.011828339658677578,
-0.010124905034899712,
-0.03705447539687157,
-0.03106374479830265,
0.03114030323922634,
0.009378456510603428,
0.030642671510577202,
0.009158349595963955,
0.06809908151626587,
0.058069873601198196,
0.035752974450588226,
0.0629313588142395,
0.03089148737490177,
-0.03684393689036369,
-0.01263220701366663,
0.016804663464426994,
0.003686786163598299,
-0.0001671733771217987,
0.03246094286441803,
-0.024020332843065262,
-0.029743105173110962,
-0.024460546672344208,
0.01263220701366663,
-0.04559078440070152,
-0.013924137689173222,
-0.005497881211340427,
-0.026144839823246002,
0.06771628558635712,
-0.04708367958664894,
0.014421769417822361,
-0.03810715675354004,
-0.04141832888126373,
-0.02298678830265999,
-0.04237531125545502,
-0.00308627774938941,
-0.04788754880428314,
-0.04057617858052254,
-0.01896744966506958,
-0.04046134278178215,
-0.03194417059421539,
0.017761647701263428,
-0.03693963587284088,
0.00033015996450558305,
-0.016498427838087082,
-0.030374715104699135,
-0.0424901507794857,
0.05508407950401306,
0.0006531425169669092,
-0.03826027363538742,
-0.005502665881067514,
0.025857744738459587,
-0.016632406041026115,
0.028231069445610046,
0.04237531125545502,
0.014402629807591438,
-0.016383590176701546,
0.018919600173830986,
0.0032106859143823385,
-0.016661114990711212,
0.0662233904004097,
-0.028154509142041206,
-0.006086426787078381,
0.012727905064821243,
0.01732143573462963,
0.04911249130964279,
0.027159245684742928,
0.03316911309957504,
-0.031676214188337326,
-0.011866618879139423,
-0.05470128357410431,
0.01805831491947174,
0.003019288880750537,
-0.013263816945254803,
-0.027771715074777603,
0.014335640706121922,
-0.02599172294139862,
-0.039274681359529495,
-0.023312164470553398,
0.015790259465575218,
0.02224034070968628,
0.04199251905083656,
-0.04428928345441818,
0.006852015387266874,
0.021379053592681885,
0.0017907589208334684,
-0.043294019997119904,
-0.03803059831261635,
0.005588794592767954,
-0.03458544984459877,
-0.048040665686130524,
-0.01557015161961317,
-0.04103553295135498,
0.045743901282548904,
0.009828239679336548,
0.08314289152622223,
0.007536259945482016,
0.04382992908358574,
-0.09171748161315918,
-0.00277047255076468,
-0.04915076866745949,
0.047619592398405075,
-0.002203458920121193,
-0.021379053592681885,
-0.003394905710592866,
-0.0122589822858572,
-0.04122693091630936,
-0.0010879727778956294,
-0.016297461465001106,
-0.03316911309957504,
0.005397397559136152,
0.01699605956673622,
0.012316402047872543,
0.04888281226158142,
0.0030216812156140804,
0.026948709040880203,
-0.03695877641439438,
-0.004323181230574846,
-0.010258883237838745,
0.025053877383470535,
-0.015981655567884445,
0.012593927793204784,
-0.007311368361115456,
-0.01847938820719719,
0.051792047917842865,
-0.04562906175851822,
-0.003552808193489909,
0.026585053652524948,
0.0327288992702961,
-0.009220554493367672,
0.020785722881555557,
-0.013512633740901947,
0.017780788242816925,
-0.014460048638284206,
-0.01652713678777218,
0.018919600173830986,
0.00295229977928102,
-0.004040870815515518,
-0.02811622992157936,
0.03523620218038559,
0.05037571117281914,
-0.07322852313518524,
0.08520998060703278,
0.05026087164878845,
-0.04241359233856201,
0.01119672879576683,
-0.024250010028481483,
0.04065273702144623,
-0.006450081244111061,
0.048844534903764725,
-0.07751581817865372,
0.03651856258511543,
0.050567109137773514,
0.05278731510043144,
0.06852015107870102,
-0.028556443750858307,
0.015895526856184006,
-0.011608232744038105,
-0.013732739724218845,
0.014086824841797352,
0.03316911309957504,
-0.04964840039610863,
0.03205901011824608,
-0.014823703095316887,
-0.010861784219741821,
0.019072718918323517,
0.006899864412844181,
-0.0392364002764225,
0.07123798877000809,
-0.0290157962590456,
-0.002815929474309087,
0.004811244085431099,
0.005928524304181337,
0.027350641787052155,
-0.016201762482523918,
0.039695754647254944,
-0.005679708439856768,
-0.035178784281015396,
0.05822299048304558,
0.00342361512593925,
-0.05175377056002617,
-0.011904898099601269,
-0.03050869330763817,
-0.0006615161546505988,
0.019962714985013008,
0.013560483232140541,
0.007387927267700434,
-0.024307427927851677,
0.0046030995436012745,
0.06323759257793427,
0.003117379965260625,
0.013799728825688362,
0.039695754647254944,
-0.049342166632413864,
0.02279539220035076,
0.0017094151116907597,
0.0948563888669014,
0.02093883976340294,
-0.01723530702292919,
-0.025073016062378883,
-0.053897418081760406,
0.0531318299472332,
0.02109195850789547,
-0.05428021028637886,
-0.06147674098610878,
-0.007990827783942223,
0.008067387156188488,
-0.016077354550361633,
0.02174270711839199,
0.0026723816990852356,
-0.031580518931150436,
-0.022278619930148125,
0.014172953553497791,
0.045016590505838394,
-0.05542859435081482,
0.028250208124518394,
0.012125005014240742,
0.02386721596121788,
0.0012907340424135327,
-0.027752576395869255,
-0.006521855480968952,
0.020460346713662148,
-0.10144045203924179,
-0.018087023869156837,
-0.004837560933083296,
-0.02968568727374077,
0.0060050832107663155,
0.004976323805749416,
-0.10021550953388214,
-0.003753775032237172,
-0.032001592218875885,
0.02968568727374077,
0.04065273702144623,
-0.03194417059421539,
0.04777270928025246,
0.007809000555425882,
0.0694771409034729,
-0.018192291259765625,
-0.012641777284443378,
-0.027829134836792946,
-0.012498228810727596,
0.07828140258789062,
0.017627671360969543,
-0.006718037184327841,
0.01986701600253582,
0.05190688744187355,
-0.04685400426387787,
0.036499422043561935,
-0.016086924821138382,
0.028805259615182877,
0.05255763605237007,
0.04930388554930687,
0.023924633860588074,
0.08612868189811707,
0.02026895061135292,
0.020651744678616524,
0.011254147626459599,
0.004421272315084934,
-0.042222194373607635,
-0.06117050349712372,
0.004904550034552813,
-0.09225338697433472,
0.022603994235396385,
-0.0678311213850975,
-0.013503063470125198,
-0.05684493109583855,
0.03316911309957504,
0.046968843787908554,
-0.07246293127536774,
-0.004531325772404671,
0.013904997147619724,
-0.004509793594479561,
0.040920693427324295,
0.004679658450186253,
0.03535103797912598,
-0.0514858141541481,
0.038470812141895294,
0.010536408983170986,
-0.04987807944417,
0.05144753307104111,
0.03123600222170353,
-0.10243571549654007,
-0.0005042116972617805,
-0.05385913699865341,
0.031197723001241684,
-0.039274681359529495,
-0.06564919650554657,
0.010287593118846416,
0.006914219353348017,
0.031848471611738205,
-0.0318867526948452,
-0.08207106590270996,
-0.016909930855035782,
-0.033800724893808365,
0.09998583048582077,
0.0013086774852126837,
0.01971389912068844,
-0.006837660446763039,
0.002056322293356061,
-0.008402331732213497,
0.0036461143754422665,
0.008273138664662838,
-0.04911249130964279,
-0.02101539820432663,
-0.027082685381174088,
0.04306434094905853,
0.0012464734027162194,
0.0017405172111466527,
-0.04153316468000412,
-0.005000248551368713,
-0.02191496454179287,
-0.04601185768842697,
-0.004775356967002153,
0.002832676749676466,
-0.0006238348432816565,
-0.009445445612072945,
0.03215470910072327,
0.014182522892951965,
-0.02771429717540741,
0.04375337064266205,
-0.001824253355152905,
-0.008344912901520729,
-0.0015156256267800927,
0.032901156693696976,
-0.002569505712017417,
0.001076010405085981,
0.00939759612083435,
0.022871950641274452,
0.09822498261928558,
0.051792047917842865,
0.03831769526004791,
-0.03261406347155571,
0.035618994385004044,
-0.011464685201644897,
-0.0019175594206899405,
0.08031021058559418,
0.017924336716532707,
-0.026451075449585915,
-0.05550515279173851,
0.014622736722230911,
-0.052519358694553375,
-0.014115534722805023,
-0.030642671510577202,
0.016144342720508575,
0.04111209139227867,
0.017436273396015167,
0.009904799051582813,
-0.005569654982537031,
0.024460546672344208,
-0.015732839703559875,
-0.020900560542941093,
-0.00396431190893054,
0.013646611012518406,
0.06641478836536407,
-0.07720957696437836,
-0.04245186969637871,
0.0025240490213036537,
0.08865512162446976,
0.006268254015594721,
-0.018833471462130547,
-0.014517468400299549,
0.028154509142041206,
0.0023948559537529945,
-0.024709362536668777,
0.03223126754164696,
-0.037226732820272446,
-0.083372563123703,
0.0012751830508932471,
0.028345907106995583,
-0.04930388554930687,
0.021761847659945488,
-0.00030593626433983445,
0.019398093223571777,
0.0045241485349833965,
0.042872946709394455,
-0.031523097306489944,
-0.04597357660531998,
0.0025073017459362745,
-0.0124695198610425,
-0.02788655459880829,
-0.00037830829387530684,
-0.07579324394464493,
-0.016967350617051125,
0.06124706566333771,
-0.019570350646972656,
0.01094791293144226,
-0.04421272501349449,
-0.03651856258511543,
-0.06633822619915009,
-0.00984737928956747,
-0.012507799081504345,
-0.018259281292557716,
0.05757224187254906,
0.035848673433065414,
-0.02304420806467533,
0.0032393955625593662,
0.016737673431634903,
0.0018218609038740396,
0.01562757045030594,
0.04930388554930687,
0.009096145629882812,
-0.021647009998559952,
0.019752178341150284,
-0.04673916473984718,
-0.06147674098610878,
-0.028996657580137253,
0.03447061404585838,
-0.014125104062259197,
-0.0008242036565206945,
0.028824400156736374,
-0.0719270184636116,
-0.06492188572883606,
0.10266539454460144,
-0.03391556069254875,
0.007799430750310421,
-0.05741912126541138,
0.01585724763572216,
-0.031178584322333336,
0.03320739418268204,
-0.0002102377184201032,
0.07468313723802567,
-0.027331503108143806,
-0.04964840039610863,
-0.030700091272592545,
0.041648004204034805,
0.0010496933246031404,
0.028652142733335495,
-0.05837610736489296,
-0.03259492293000221,
0.045169711112976074,
0.015723269432783127,
0.03973403200507164,
-0.07586979866027832,
0.04765787348151207,
-0.004469121806323528,
0.002031201496720314,
-0.03326481208205223,
-0.009220554493367672,
0.01627832092344761,
-0.04509315267205238,
0.031006326898932457,
-0.034374915063381195,
-0.017101328819990158,
0.013637041673064232,
0.042949505150318146,
-0.026259679347276688,
-0.01226855255663395,
0.0334944874048233,
-0.034547172486782074,
-0.004112644586712122,
-0.03611662983894348,
0.008675072342157364,
-0.02444140613079071,
0.01324467733502388,
0.021647009998559952,
0.04995463788509369,
0.007201314903795719,
-0.006674972828477621,
0.04011682793498039,
-0.051715489476919174,
0.006550564896315336,
0.0036461143754422665,
-0.023178186267614365,
-0.02916891500353813,
-0.08689427375793457,
-0.04471035674214363,
0.03938951715826988,
0.04731335863471031,
0.015311766415834427,
-0.01790519617497921,
-0.006837660446763039,
-0.005770621821284294,
0.0122589822858572,
0.031523097306489944,
0.07288400828838348,
-0.00680416589602828,
-0.03611662983894348,
0.03293943777680397,
0.03684393689036369,
0.027580318972468376,
-0.05075850337743759,
-0.025111297145485878,
0.030125899240374565,
-0.020383788272738457,
0.04620325565338135,
0.032901156693696976,
-0.04141832888126373,
0.0011872600298374891,
-0.10182324051856995,
0.012727905064821243,
0.020575186237692833,
0.017953045666217804,
0.025321833789348602,
0.03770522400736809,
0.012125005014240742,
-0.03196331113576889,
-0.06281652301549911,
0.001855355454608798,
-0.012125005014240742,
0.004055225756019354,
-0.022910229861736298,
0.06852015107870102,
0.07162078469991684,
-0.007124755997210741,
-0.00770373223349452,
-0.030202457681298256,
-0.0010484971571713686,
-0.015598861500620842,
-0.0024403126444667578,
0.006866369862109423,
-0.06928574293851852,
0.011426405049860477,
0.029857942834496498,
-0.02134077437222004,
-0.0016699394909664989,
-0.0159433763474226,
-0.010038776323199272,
0.018096594139933586,
0.0006459651049226522,
-0.032326966524124146,
-0.029302891343832016,
0.08031021058559418,
0.0441361665725708,
0.04834689944982529,
0.06557263433933258,
0.0277908556163311,
-0.038049738854169846,
-0.019752178341150284,
0.024077752605080605,
-0.027293222025036812,
0.026125701144337654,
-0.005478741135448217,
0.002288391347974539,
-0.05607934296131134,
-0.06733348965644836,
-0.0151299387216568,
-0.042298752814531326,
-0.06369694322347641,
0.00574191240593791,
0.073573037981987,
0.011924037709832191,
0.003184368833899498,
0.007976473309099674,
0.013665751554071903,
0.014182522892951965,
0.0265659149736166,
0.045322827994823456,
0.032996855676174164,
0.022871950641274452,
-0.03915984183549881,
-0.013235107995569706,
-0.005976373795419931,
-0.008603298105299473,
0.008593728765845299,
-0.024058612063527107,
-0.010431140661239624,
0.0159433763474226,
0.03146567940711975,
-0.007373572327196598,
0.017464982345700264,
0.027599457651376724,
-0.025111297145485878,
0.0200392734259367,
0.00398584408685565,
0.0010915613966062665,
-0.008454965427517891,
0.09409080445766449,
-0.020326368510723114,
-0.03546587750315666,
-0.02061346545815468,
-0.002811144571751356,
-0.05872062221169472,
-0.006182125303894281,
-0.002083835657685995,
0.029743105173110962,
0.02836504578590393,
-0.021436473354697227,
0.003940387163311243,
-0.061361901462078094,
0.07594636082649231,
0.0002624233311507851,
-0.0318867526948452,
-0.027331503108143806,
-0.04325573891401291,
-0.04302606359124184,
0.008698997087776661,
-0.014192093163728714,
0.006488360930234194,
-0.05581138655543327,
-0.020651744678616524,
0.0034188302233815193,
-0.08084612339735031,
0.008053031750023365,
0.0034188302233815193,
0.06415630131959915,
0.021972384303808212,
0.09929680079221725,
-0.058912020176649094,
-0.03366674482822418,
0.010325872339308262,
-0.0040217312052845955,
-0.04160972312092781,
0.020728303119540215,
0.0005565467872656882,
0.062242329120635986,
0.006186910439282656,
-0.010057915933430195,
-0.01660369709134102,
-0.019512932747602463,
0.055390313267707825,
0.019264115020632744,
-0.018661214038729668,
0.07399410754442215,
-0.06894122809171677,
-0.012670486234128475,
-0.00956985354423523,
-0.05516063794493675,
0.009818670339882374,
0.000384887563996017,
-0.028594722971320152,
-0.043140899389982224,
-0.02926461212337017,
-0.0768650621175766,
-0.0179721862077713,
-0.02208722196519375,
-0.04291122406721115,
0.06476876884698868,
-0.06312275677919388,
0.016938641667366028,
0.027580318972468376,
0.035695552825927734,
0.0302598774433136,
-0.054777842015028,
-0.027503760531544685,
0.007320938166230917,
0.023809796199202538,
0.06013696268200874,
0.004995463881641626,
0.0605197548866272,
0.029704825952649117,
0.01443133968859911,
-0.06469221413135529,
-0.05014603212475777,
-0.04371509328484535,
0.019752178341150284,
0.044595517218112946,
-0.03041299618780613,
0.007230024319142103,
0.05577310919761658,
-0.009268403053283691,
0.03950435668230057,
-0.021436473354697227,
-0.025073016062378883,
-0.019407663494348526,
0.031350839883089066,
0.028326766565442085,
-0.04938044399023056,
-0.017560681328177452,
0.012814033776521683,
0.08758330345153809,
-0.012498228810727596,
-0.033551909029483795,
0.07051068544387817,
-0.01046941988170147,
-0.03766694292426109,
0.06668274104595184,
-0.02019239217042923,
-0.06668274104595184,
-0.013139409013092518,
0.020134972408413887,
0.02279539220035076,
-0.009349747560918331,
0.011904898099601269,
0.02633623778820038,
-0.01004834659397602,
-0.009603348560631275,
0.004294471815228462,
-0.02501559816300869,
-0.009636842645704746,
0.056194182485342026,
-0.0006310122553259134,
0.002018042840063572,
0.010708666406571865,
0.011866618879139423,
0.01734057441353798,
-0.02396291308104992,
0.06557263433933258,
-0.04773443192243576,
-0.012211133725941181,
-0.015101228840649128,
0.05650041624903679,
0.025953443720936775,
-0.001356526743620634,
0.04210735484957695
] |
52,289 |
flexget.manager
|
daemonize
|
Daemonizes the current process. Returns the new pid
|
def daemonize(self) -> None:
"""Daemonizes the current process. Returns the new pid"""
if sys.platform.startswith('win'):
logger.error('Cannot daemonize on windows')
return
if threading.active_count() != 1:
logger.critical(
'There are {!r} active threads. Daemonizing now may cause strange failures.',
threading.enumerate(),
)
logger.info('Daemonizing...')
try:
pid = os.fork()
if pid > 0:
# Don't run the exit handlers on the parent
atexit._exithandlers = []
# exit first parent
sys.exit(0)
except OSError as e:
sys.stderr.write(f'fork #1 failed: {e.errno} ({e.strerror})\n')
sys.exit(1)
# decouple from parent environment
os.chdir('/')
os.setsid()
os.umask(0)
# do second fork
try:
pid = os.fork()
if pid > 0:
# Don't run the exit handlers on the parent
atexit._exithandlers = []
# exit from second parent
sys.exit(0)
except OSError as e:
sys.stderr.write(f'fork #2 failed: {e.errno} ({e.strerror})\n')
sys.exit(1)
logger.info(f'Daemonize complete. New PID: {os.getpid()}')
# redirect standard file descriptors
sys.stdout.flush()
sys.stderr.flush()
si = open(os.devnull)
so = open(os.devnull, 'ab+')
se = open(os.devnull, 'ab+', 0)
os.dup2(si.fileno(), sys.stdin.fileno())
os.dup2(so.fileno(), sys.stdout.fileno())
os.dup2(se.fileno(), sys.stderr.fileno())
# If we have a lock, update the lock file with our new pid
if self._has_lock:
self.write_lock()
|
(self) -> NoneType
|
[
0.0647597387433052,
-0.02161235362291336,
-0.004332619719207287,
0.06410247832536697,
-0.010081254877150059,
0.01755278930068016,
-0.016808535903692245,
-0.026851126924157143,
-0.009771954268217087,
-0.02538195066154003,
0.00651463633403182,
-0.04426859691739082,
-0.0014063495909795165,
-0.01263298187404871,
-0.0033322267699986696,
-0.04751624912023544,
-0.015523006208240986,
0.029364190995693207,
-0.037232015281915665,
0.022056972607970238,
0.005267769563943148,
-0.00593953114002943,
0.0018968803342431784,
-0.07949016243219376,
-0.011850065551698208,
0.010786846280097961,
-0.03323044627904892,
0.01648956909775734,
0.005393423140048981,
-0.005113119725137949,
0.0226949043571949,
0.014092491939663887,
-0.031046012416481972,
0.000431328866397962,
0.054514165967702866,
-0.03239919990301132,
-0.045080509036779404,
0.05192377790808678,
-0.02321684919297695,
0.02228894829750061,
0.04488719627261162,
-0.07477333396673203,
-0.021283723413944244,
-0.020858434960246086,
0.005393423140048981,
0.023448824882507324,
0.013870182447135448,
0.04469388350844383,
-0.021399710327386856,
-0.036942046135663986,
-0.03873985633254051,
-0.009883109480142593,
0.026986446231603622,
0.001149606192484498,
0.009042199701070786,
0.05490079149603844,
0.04712962359189987,
-0.036942046135663986,
-0.04187152162194252,
-0.06545566022396088,
-0.0016491985879838467,
-0.017233822494745255,
0.009689796715974808,
0.007824329659342766,
-0.016943853348493576,
-0.013212919235229492,
0.007287886925041676,
-0.011647087521851063,
-0.03947444260120392,
-0.004277042578905821,
-0.04647235944867134,
-0.10005863010883331,
-0.006157007999718189,
0.008481592871248722,
0.04983600229024887,
0.05339295417070389,
0.023603474721312523,
-0.005296766757965088,
0.017784763127565384,
0.014227811247110367,
0.0343516580760479,
-0.02215362899005413,
-0.004820734262466431,
0.004342285450547934,
0.09093426913022995,
0.04821217432618141,
0.06216934695839882,
0.02107107825577259,
-0.05582869425415993,
-0.0024188244715332985,
0.010854505002498627,
0.0531996414065361,
0.004117559641599655,
0.06445043534040451,
0.049526702612638474,
0.0031679109670221806,
-0.016267258673906326,
0.03388770669698715,
-0.028706928715109825,
-0.02729574590921402,
-0.01372519787400961,
-0.01472075842320919,
-0.0014365545939654112,
-0.09487784653902054,
-0.016808535903692245,
-0.04256744682788849,
-0.002805449767038226,
0.008839220739901066,
-0.0683940127491951,
-0.044229935854673386,
-0.05362492799758911,
-0.043997958302497864,
-0.049642689526081085,
-0.03868186101317406,
-0.013792857527732849,
-0.016238262876868248,
-0.04218082129955292,
0.03245719522237778,
0.04917873814702034,
-0.02054913528263569,
-0.0634065493941307,
0.07887156307697296,
-0.011463440023362637,
-0.00053976516937837,
-0.04608573764562607,
0.04535114765167236,
0.0040740640833973885,
0.04550579935312271,
-0.01034222636371851,
-0.003728517796844244,
-0.039629094302654266,
0.013232250697910786,
0.027315078303217888,
0.00492947269231081,
0.04202616959810257,
-0.05041594058275223,
-0.014430789276957512,
0.06243998557329178,
-0.023816118016839027,
0.05014530196785927,
0.03147130087018013,
-0.044345922768116,
0.010371224023401737,
0.022540254518389702,
-0.03243786096572876,
0.023332836106419563,
-0.01879965513944626,
0.012478332035243511,
0.0033926370088011026,
-0.001019120099954307,
0.018867313861846924,
-0.015030059032142162,
0.03243786096572876,
0.07280154526233673,
0.013609210960566998,
-0.04144623130559921,
0.005630230996757746,
-0.031954582780599594,
0.025207970291376114,
-0.024086756631731987,
-0.057877808809280396,
-0.04013170674443245,
0.08049538731575012,
-0.04631771147251129,
-0.04836682602763176,
-0.005224274471402168,
0.0015356274088844657,
-0.004277042578905821,
0.04515783488750458,
0.006495304871350527,
0.00939499493688345,
0.0688193067908287,
-0.0323798693716526,
0.03121999278664589,
-0.0632905587553978,
0.025497939437627792,
0.02240493707358837,
-0.01808439940214157,
0.014343799091875553,
0.040750306099653244,
0.009684964083135128,
-0.018016738817095757,
-0.02458936907351017,
-0.002362038940191269,
0.024512043222784996,
0.01357054803520441,
-0.013744529336690903,
0.023700131103396416,
0.06174406036734581,
-0.01891564205288887,
-0.011579427868127823,
0.03742532804608345,
0.01836470142006874,
0.05010664090514183,
0.014517780393362045,
0.09603772312402725,
-0.03725134953856468,
-0.04581509903073311,
0.0197275560349226,
-0.0218636617064476,
-0.0008028516313061118,
0.030968686565756798,
0.0007502947119064629,
-0.04129158332943916,
0.024531375616788864,
0.029673492535948753,
0.016673216596245766,
0.028803585097193718,
-0.04848281294107437,
-0.006094181444495916,
0.05551939457654953,
-0.03205123916268349,
-0.035202234983444214,
0.0715256780385971,
0.03578217327594757,
-0.08250583708286285,
0.085985466837883,
0.022076305001974106,
0.014015167020261288,
0.0034361323341727257,
-0.023738794028759003,
-0.0186353400349617,
0.006703115999698639,
0.042644768953323364,
-0.05969494581222534,
-0.0011876645730808377,
0.04341802000999451,
0.040479667484760284,
0.06499171257019043,
-0.02352614887058735,
-0.019408589228987694,
-0.051111865788698196,
-0.03415834531188011,
-0.00885855220258236,
0.037096697837114334,
-0.03970642015337944,
-0.03732867166399956,
-0.037502653896808624,
-0.005886370316147804,
0.04596974700689316,
-0.034525640308856964,
-0.07430938631296158,
0.109724260866642,
0.025768576189875603,
0.01903163082897663,
-0.04187152162194252,
0.012806963175535202,
0.013522219844162464,
0.02864893525838852,
-0.014904404990375042,
-0.004562178626656532,
-0.04515783488750458,
0.012777966447174549,
-0.028726259246468544,
0.017494793981313705,
0.02267557382583618,
-0.010380889289081097,
0.020336490124464035,
-0.0018316373461857438,
0.03928112983703613,
0.01998852752149105,
0.009539979510009289,
-0.02337149903178215,
-0.03875918686389923,
-0.02690912038087845,
-0.004269793163985014,
0.02849428541958332,
-0.041562218219041824,
-0.009670465253293514,
0.004958469420671463,
0.0586123950779438,
-0.0386238694190979,
-0.02203764207661152,
0.015233037061989307,
-0.056524619460105896,
-0.009916938841342926,
-0.0075585246086120605,
0.0007333798566833138,
-0.0589216947555542,
0.023448824882507324,
0.045312486588954926,
0.02632918395102024,
0.0013362737372517586,
-0.026174532249569893,
-0.007867825217545033,
-0.0020696534775197506,
-0.010168245062232018,
0.05053192749619484,
-0.055867355316877365,
-0.03848854824900627,
-0.04798020049929619,
-0.014643433503806591,
-0.04105960577726364,
0.004192468244582415,
-0.05772315710783005,
0.03866253048181534,
-0.10895100980997086,
-0.04890809953212738,
-0.018567679449915886,
-0.04782554879784584,
-0.01404416374862194,
0.02716042660176754,
-0.06240132451057434,
0.054359517991542816,
-0.024280069395899773,
0.03823724389076233,
0.014943067915737629,
0.018161723390221596,
0.02298487350344658,
0.020065853372216225,
-0.02335216850042343,
0.025188637897372246,
0.003363640047609806,
0.028339633718132973,
-0.04160088300704956,
0.033984363079071045,
-0.012536325491964817,
-0.04488719627261162,
0.01876099221408367,
0.060584183782339096,
-0.039513107389211655,
0.01970822550356388,
0.04364999756217003,
0.01904129609465599,
0.020510472357273102,
0.016982516273856163,
0.054514165967702866,
0.05339295417070389,
-0.00217960006557405,
0.04805752635002136,
-0.04241279512643814,
0.03243786096572876,
-0.025633256882429123,
-0.027102433145046234,
-0.02835896611213684,
-0.01784275844693184,
-0.00492705637589097,
-0.07867825031280518,
0.02255958691239357,
-0.056563280522823334,
0.002421241020783782,
0.043302033096551895,
-0.06213068589568138,
-0.05014530196785927,
-0.038546543568372726,
0.0008372854208573699,
0.044771209359169006,
0.022772230207920074,
0.010061923414468765,
-0.023990100249648094,
0.02244359813630581,
0.02957683615386486,
-0.08397501707077026,
-0.016267258673906326,
-0.013966838829219341,
-0.07802098244428635,
0.02650316432118416,
-0.04450057074427605,
0.03158728778362274,
-0.034370988607406616,
-0.06591961532831192,
-0.01893497444689274,
0.017910417169332504,
-0.007292719557881355,
0.04082763195037842,
-0.06050685793161392,
-0.017340144142508507,
-0.026271188631653786,
0.00946748722344637,
0.04117559641599655,
-0.004049899987876415,
-0.019147617742419243,
0.043031394481658936,
-0.07063644379377365,
-0.01141511183232069,
0.03011811152100563,
0.008399434387683868,
-0.017069507390260696,
0.041407570242881775,
0.02230828069150448,
-0.034912265837192535,
-0.048830777406692505,
0.01080617681145668,
0.008964873850345612,
-0.10902833193540573,
-0.01309693232178688,
0.034003693610429764,
-0.02310086227953434,
0.029538173228502274,
0.03174193575978279,
-0.00654846616089344,
0.016972851008176804,
0.026445170864462852,
0.010835174471139908,
0.02497599460184574,
0.014749755151569843,
0.056253980845212936,
0.03137464448809624,
0.005673726089298725,
0.009496483951807022,
-0.010148914530873299,
0.037908609956502914,
0.004542847163975239,
0.014914071187376976,
0.032766494899988174,
-0.052078429609537125,
0.03471895307302475,
-0.03516357019543648,
0.0745413601398468,
0.015484343282878399,
-0.042644768953323364,
-0.039242468774318695,
0.006630623713135719,
0.00277162017300725,
0.013386901468038559,
0.00817229226231575,
0.00816745962947607,
-0.039377786219120026,
0.05366359278559685,
-0.007490865420550108,
0.044229935854673386,
0.024802012369036674,
-0.0026870458386838436,
0.016315586864948273,
0.014566108584403992,
-0.039938393980264664,
-0.01593862846493721,
0.025884563103318214,
-0.017794430255889893,
-0.028262309730052948,
0.061396099627017975,
0.03873985633254051,
0.006413147319108248,
0.05629264563322067,
0.03935845568776131,
0.014981730841100216,
0.06800738722085953,
0.046163059771060944,
0.04318604618310928,
0.011453774757683277,
-0.010429217480123043,
0.000014215275768947322,
0.0057558841072022915,
-0.04129158332943916,
0.05037727579474449,
0.05134383961558342,
0.05969494581222534,
-0.016808535903692245,
-0.02240493707358837,
-0.0032210720237344503,
0.03781195357441902,
-0.031104005873203278,
-0.022095635533332825,
-0.020027190446853638,
-0.09874410182237625,
-0.03295980766415596,
-0.044113945215940475,
0.017533456906676292,
0.008331775665283203,
0.0661129280924797,
-0.010738518089056015,
-0.01040988601744175,
0.012942281551659107,
0.027199089527130127,
-0.05420486629009247,
-0.0381019227206707,
0.05300632864236832,
-0.015851637348532677,
-0.011521434411406517,
0.012410672381520271,
0.09449122101068497,
0.048830777406692505,
0.007756670005619526,
0.01302927266806364,
-0.045467134565114975,
-0.001795391202904284,
-0.02406742423772812,
-0.08281514048576355,
0.012913284823298454,
0.016286591067910194,
0.00823995191603899,
0.013444894924759865,
0.026445170864462852,
0.04361133277416229,
-0.07833028584718704,
-0.0538182407617569,
0.0762038454413414,
-0.00027335615595802665,
0.029538173228502274,
-0.027315078303217888,
0.03690338507294655,
-0.03324977681040764,
-0.005678559187799692,
0.034390319138765335,
0.043997958302497864,
-0.02770170196890831,
-0.01364787295460701,
-0.04353401064872742,
0.03732867166399956,
-0.08281514048576355,
0.007621351163834333,
-0.04596974700689316,
0.005219441372901201,
-0.011424778029322624,
0.016963185742497444,
0.058728381991386414,
-0.07137103378772736,
0.026174532249569893,
-0.030485404655337334,
0.025304626673460007,
-0.01040022075176239,
-0.04241279512643814,
-0.008404267951846123,
-0.025207970291376114,
0.02702510915696621,
0.002284713787958026,
-0.004545263480395079,
-0.015996621921658516,
0.0007774793193675578,
-0.05366359278559685,
-0.008428431116044521,
0.045080509036779404,
0.021419040858745575,
-0.017543122172355652,
0.0010336185805499554,
0.05969494581222534,
0.014227811247110367,
0.0647597387433052,
0.0031993244774639606,
0.05416620522737503,
-0.015977291390299797,
-0.060584183782339096,
-0.016383247449994087,
-0.014140820130705833,
-0.004028152208775282,
-0.02486000768840313,
-0.03253451734781265,
-0.07361345738172531,
-0.002856194507330656,
-0.020375153049826622,
-0.019089624285697937,
0.039938393980264664,
0.009090526960790157,
0.014131154865026474,
0.038585204631090164,
0.011115477420389652,
-0.03377171978354454,
0.03448697552084923,
-0.0003126228111796081,
-0.019688893109560013,
-0.010100586339831352,
0.011444108560681343,
0.04589242488145828,
0.06015889719128609,
-0.0755852460861206,
-0.026251858100295067,
0.04024769365787506,
-0.01755278930068016,
-0.022752899676561356,
0.028455622494220734,
0.0009635427268221974,
0.019224943593144417,
0.05470747873187065,
-0.06077749654650688,
0.032882481813430786,
-0.019427921622991562,
-0.014527445659041405,
0.04376598447561264,
0.02052980288863182,
-0.009158186614513397,
-0.048560138791799545,
0.024821344763040543,
-0.008061137981712818,
-0.0015259617939591408,
-0.029518842697143555,
0.050454601645469666,
0.028842248022556305,
0.05865105986595154,
0.014904404990375042,
0.0004669708723668009,
-0.04013170674443245,
-0.015320027247071266,
-0.038836512714624405,
-0.022366274148225784,
0.002014076104387641,
0.015213705599308014,
0.0025323957670480013,
0.054630156606435776,
0.020703785121440887,
-0.008090134710073471,
-0.08668139576911926,
0.04631771147251129,
0.02176700532436371,
-0.052619703114032745,
-0.021670348942279816,
0.0178524237126112,
-0.008723233826458454,
-0.016798868775367737,
0.05934698507189751,
-0.045312486588954926,
-0.039397116750478745,
-0.03375238925218582,
0.009158186614513397,
0.0012480748118832707,
0.0306593868881464,
-0.014498448930680752,
0.013667204417288303,
-0.0178524237126112,
-0.05312231555581093,
-0.0012075999984517694,
-0.027508391067385674,
0.014624102041125298,
0.0016443657223135233,
0.004409944638609886,
0.025729913264513016,
0.013541551306843758,
-0.03982240706682205,
-0.031799931079149246,
0.012188362888991833,
0.0391458123922348,
0.05389556661248207,
-0.023874111473560333,
0.013551216572523117,
-0.03137464448809624,
0.005693057551980019,
-0.003788928035646677,
0.012884288094937801,
0.02650316432118416,
-0.006413147319108248,
-0.03582083433866501,
0.006616125348955393,
0.0364394336938858,
-0.033037133514881134,
0.012294684536755085,
0.024376725777983665,
0.05826443433761597,
-0.02675447054207325,
-0.014749755151569843,
0.009617304429411888,
0.052619703114032745,
0.06661553680896759,
-0.056137993931770325,
-0.021264391019940376,
-0.024531375616788864,
0.013551216572523117,
-0.048560138791799545,
0.04121425747871399,
0.0033467253670096397,
-0.003967741969972849,
0.02580723911523819,
0.0018666753312572837,
0.01905096136033535,
0.002401909790933132,
-0.011724412441253662,
0.011028486303985119,
-0.05393423140048981,
-0.061280108988285065,
-0.013676869682967663,
-0.04461656138300896,
0.03659408539533615,
0.03125865384936333,
-0.02226961776614189,
-0.09812550246715546,
-0.012459000572562218,
0.06348387151956558,
0.013425563462078571,
-0.007534360513091087,
0.01702117919921875,
0.04044100642204285,
0.0016636969521641731,
0.05389556661248207,
0.003049507038667798,
-0.07009516656398773,
-0.019949866458773613,
-0.0796448141336441,
-0.06213068589568138,
0.030079448595643044,
0.06908994168043137,
0.0009121940820477903,
-0.009066362865269184,
0.013589879497885704,
-0.01596762426197529,
-0.009414326399564743,
-0.012120703235268593,
0.02797234058380127,
-0.009022868238389492,
0.04596974700689316,
-0.06649955362081528,
-0.03297913819551468,
-0.00489805918186903,
-0.01147310622036457,
0.00759718706831336,
0.0384112223982811,
-0.07071376591920853,
-0.05814844369888306,
-0.04198750853538513,
-0.014488782733678818,
0.016238262876868248,
-0.08374304324388504,
-0.06823936849832535,
0.01944725215435028,
0.015252368524670601,
0.035318221896886826,
-0.010448548942804337,
0.01729181595146656,
0.052078429609537125,
-0.04013170674443245,
0.03767663612961769,
0.04457789659500122,
-0.018538683652877808,
0.006833602208644152,
0.014440455473959446,
0.0464336983859539,
0.02445404976606369,
0.03684538975358009,
0.014749755151569843,
-0.01905096136033535,
-0.02431873232126236,
0.0464336983859539,
0.011579427868127823,
-0.02122572995722294,
0.045737773180007935,
0.030466074123978615,
-0.04689764976501465,
0.0010922164656221867,
-0.01148277148604393,
-0.008201288990676403,
0.0024538624566048384,
-0.004086146131157875,
-0.00109704933129251,
-0.030504737049341202,
-0.017359476536512375,
-0.04770956188440323,
-0.010429217480123043,
-0.002629052149131894,
0.0031002515461295843,
0.05497811734676361,
-0.015291030518710613,
-0.010419552214443684,
-0.016972851008176804,
0.011144474148750305,
-0.06468241661787033,
-0.030872030183672905,
0.017523791640996933,
0.0724535807967186,
-0.011038152500987053,
0.013899179175496101,
0.0069254254922270775,
0.02109041064977646,
0.013976505026221275,
0.05203976482152939,
-0.0027667873073369265,
-0.026000551879405975,
-0.027489058673381805,
-0.018422694876790047,
-0.013396566733717918,
0.021515697240829468,
0.048289500176906586,
0.023874111473560333,
0.01663455367088318,
0.05323830246925354,
-0.0826604887843132,
-0.03850787878036499,
-0.006490472238510847,
0.08382036536931992,
0.012285019271075726,
0.021940985694527626,
0.00824961718171835
] |
52,290 |
flexget.manager
|
db_cleanup
|
Perform database cleanup if cleanup interval has been met.
Fires events:
* manager.db_cleanup
If interval was met. Gives session to do the cleanup as a parameter.
:param bool force: Run the cleanup no matter whether the interval has been met.
|
def db_cleanup(self, force: bool = False) -> None:
"""
Perform database cleanup if cleanup interval has been met.
Fires events:
* manager.db_cleanup
If interval was met. Gives session to do the cleanup as a parameter.
:param bool force: Run the cleanup no matter whether the interval has been met.
"""
expired = (
self.persist.get('last_cleanup', datetime(1900, 1, 1))
< datetime.now() - DB_CLEANUP_INTERVAL
)
if force or expired:
logger.info('Running database cleanup.')
with Session() as session:
fire_event('manager.db_cleanup', self, session)
# Try to VACUUM after cleanup
fire_event('manager.db_vacuum', self)
# Just in case some plugin was overzealous in its cleaning, mark the config changed
self.config_changed()
self.persist['last_cleanup'] = datetime.now()
else:
logger.debug('Not running db cleanup, last run {}', self.persist.get('last_cleanup'))
|
(self, force: bool = False) -> NoneType
|
[
0.042623136192560196,
0.07082109153270721,
-0.006292892619967461,
0.0013670844491571188,
0.07814241200685501,
-0.05501863732933998,
-0.07049489766359329,
0.043637972325086594,
0.03274660184979439,
-0.030354484915733337,
-0.018937574699521065,
0.016210202127695084,
0.023250630125403404,
-0.036425381898880005,
0.004414991941303015,
-0.030771292746067047,
-0.07034991681575775,
-0.027871759608387947,
0.04574013128876686,
-0.047117412090301514,
0.012821372598409653,
0.0558522529900074,
0.00878014788031578,
-0.09996140003204346,
0.05621469393372536,
-0.04559515416622162,
-0.026911290362477303,
0.02462790720164776,
0.03381580486893654,
0.054076287895441055,
-0.029629603028297424,
0.04584886506199837,
0.04385543614625931,
0.029375893995165825,
-0.006406155414879322,
-0.050995536148548126,
0.0031962820794433355,
0.01466982439160347,
-0.017089122906327248,
0.0032506482675671577,
0.009722496382892132,
-0.012486114166676998,
0.04033975303173065,
0.003515683813020587,
-0.011262873187661171,
-0.0160742849111557,
-0.02569711022078991,
0.010492685250937939,
-0.01623738370835781,
0.01557592861354351,
0.011589070782065392,
0.002854227786883712,
-0.016463911160826683,
0.004788760095834732,
0.02303316444158554,
-0.025642745196819305,
-0.002784004667773843,
-0.0032008124981075525,
-0.008685007691383362,
-0.05404004454612732,
0.08843575417995453,
0.026403872296214104,
-0.013845269568264484,
-0.026711948215961456,
0.05335140600800514,
-0.0070812031626701355,
-0.026548849418759346,
0.01206024456769228,
0.04784229397773743,
0.028705377131700516,
0.006147915963083506,
-0.03827383369207382,
0.037657685577869415,
0.046537503600120544,
-0.016835413873195648,
-0.006714230868965387,
-0.022108938544988632,
-0.0505606047809124,
0.0060573057271540165,
0.0009355524089187384,
0.0050560603849589825,
0.01913691684603691,
0.06973376870155334,
0.032275427132844925,
0.054909903556108475,
-0.007570499088615179,
-0.02544340118765831,
0.024392321705818176,
-0.00924679171293974,
-0.00932381022721529,
0.04961825907230377,
0.009831229224801064,
0.04458031803369522,
0.008263668976724148,
0.0038305548951029778,
0.022996921092271805,
-0.0011722721392288804,
-0.0015879473648965359,
-0.015104754827916622,
-0.052336569875478745,
0.05454746261239052,
0.012712639756500721,
0.03736773133277893,
-0.04882088676095009,
-0.0035723152104765177,
-0.0474073626101017,
-0.0053278920240700245,
-0.11460404098033905,
-0.037983883172273636,
-0.013047898188233376,
-0.041898250579833984,
-0.025153448805212975,
0.036008574068546295,
-0.01807677559554577,
0.01632799580693245,
-0.02883223071694374,
-0.014896350912749767,
0.027454951778054237,
0.014778557233512402,
-0.05541732534766197,
-0.0632823035120964,
-0.04128209874033928,
0.025823965668678284,
-0.005178384482860565,
0.033761437982320786,
0.012087428011000156,
-0.03704153373837471,
0.015113815665245056,
0.01715254969894886,
0.054656196385622025,
0.017116306349635124,
-0.0062068128027021885,
-0.022163305431604385,
-0.05052436143159866,
0.025171570479869843,
-0.057881925255060196,
0.07292325049638748,
-0.004240566864609718,
0.008345218375325203,
-0.028814109042286873,
0.008535499684512615,
0.02959335781633854,
-0.016137713566422462,
-0.026168284937739372,
0.007828738540410995,
0.047516096383333206,
-0.019336260855197906,
-0.019408749416470528,
-0.05237281322479248,
-0.07647518068552017,
0.04128209874033928,
0.0017249955562874675,
-0.03776641562581062,
0.016427665948867798,
-0.041898250579833984,
0.022525746375322342,
-0.049437038600444794,
0.02627701684832573,
-0.029375893995165825,
-0.0037444750778377056,
-0.006406155414879322,
0.04610257223248482,
-0.062267471104860306,
0.010701089166104794,
-0.027636174112558365,
0.007652048487216234,
0.00032478166394867003,
0.027291854843497276,
0.029611479490995407,
-0.00870312936604023,
-0.022398892790079117,
-0.017170671373605728,
-0.008268199861049652,
0.03736773133277893,
-0.01434362679719925,
0.09235012531280518,
0.027382465079426765,
-0.028143592178821564,
-0.04102839156985283,
0.010818881914019585,
0.006750475149601698,
-0.09771426022052765,
-0.0018416565144434571,
-0.047516096383333206,
0.023504339158535004,
-0.02827044576406479,
-0.03182237595319748,
0.028524154797196388,
0.0308256596326828,
0.012413625605404377,
0.006750475149601698,
0.010655784048140049,
-0.027128756046295166,
-0.017043817788362503,
0.08408645540475845,
0.014606397598981857,
-0.0008721251506358385,
0.011652498506009579,
0.03687843307852745,
-0.043058063834905624,
0.013645927421748638,
0.012884799391031265,
0.016019919887185097,
-0.13258114457130432,
0.03613542765378952,
-0.023576827719807625,
-0.004979041870683432,
-0.04824097827076912,
-0.06813902407884598,
-0.03321777284145355,
0.03488500416278839,
0.038165103644132614,
-0.04613881930708885,
0.016617948189377785,
0.04367421567440033,
-0.07049489766359329,
0.07930222898721695,
0.03189486265182495,
-0.0374402180314064,
0.03008265420794487,
-0.05364136025309563,
-0.039578624069690704,
-0.02576959878206253,
-0.018013348802924156,
0.004199792165309191,
0.028560400009155273,
-0.014316444285213947,
0.02393926866352558,
0.0890156626701355,
-0.04559515416622162,
-0.019988656044006348,
0.014198650605976582,
-0.0040978556498885155,
-0.03446819633245468,
0.12765194475650787,
-0.036660969257354736,
-0.0013285750756040215,
0.004283607006072998,
-0.0012594846775755286,
0.0027024552691727877,
-0.001325177145190537,
-0.02410236746072769,
-0.028977207839488983,
-0.004417257383465767,
0.0037535359151661396,
0.01048362348228693,
0.04845844581723213,
0.02669382467865944,
0.049437038600444794,
-0.008299913257360458,
-0.010945737361907959,
-0.06770409643650055,
0.05146671086549759,
0.021818986162543297,
-0.06665301322937012,
-0.05824436992406845,
0.007312259636819363,
0.051176756620407104,
-0.013138508424162865,
0.052336569875478745,
0.0490383505821228,
0.01980743370950222,
-0.0284335445612669,
0.06571066379547119,
0.0004932603915221989,
0.02892284095287323,
0.018022408708930016,
-0.01206024456769228,
0.008385992608964443,
0.02145654335618019,
0.035591766238212585,
-0.07190841436386108,
0.013754659332334995,
-0.057555727660655975,
-0.06962503492832184,
0.028777863830327988,
0.01073733251541853,
-0.03531993553042412,
-0.07893978804349899,
-0.00445350119844079,
0.00021406708401627839,
-0.04856717586517334,
0.061868783086538315,
-0.04548642411828041,
-0.04961825907230377,
-0.011670620180666447,
-0.02926716022193432,
0.03557364642620087,
-0.02294255420565605,
0.0532064288854599,
-0.05418502166867256,
-0.06205000355839729,
0.01980743370950222,
0.02236264757812023,
-0.01173404697328806,
0.0037422096356749535,
-0.025896454229950905,
-0.0029742864426225424,
0.014515786431729794,
-0.011199446395039558,
0.02709251083433628,
0.00936911627650261,
-0.036932799965143204,
0.050016943365335464,
0.052916474640369415,
0.007842330262064934,
-0.0010069081326946616,
-0.04664623737335205,
0.028034858405590057,
0.03372519090771675,
0.004342503845691681,
-0.04450783133506775,
0.03548303619027138,
0.03528369218111038,
0.028651010245084763,
0.0022256181109696627,
0.007638457231223583,
-0.02885035239160061,
-0.005028877407312393,
-0.0011768026743084192,
-0.02328687347471714,
0.059549156576395035,
0.03910744935274124,
0.04523271322250366,
0.02171025238931179,
0.017342831939458847,
-0.043058063834905624,
0.05048811808228493,
0.02361307106912136,
-0.0011439563240855932,
-0.03776641562581062,
0.01280324999243021,
0.020949125289916992,
-0.035011861473321915,
-0.036425381898880005,
-0.030789416283369064,
0.04142707586288452,
-0.006252117920666933,
0.0310793686658144,
-0.01864762045443058,
-0.041463322937488556,
0.06629057228565216,
-0.003921165131032467,
0.013283485546708107,
-0.03001016564667225,
0.016708558425307274,
-0.005812657531350851,
-0.0694800615310669,
0.06853771209716797,
-0.018457340076565742,
0.04233318194746971,
-0.015421890653669834,
-0.06183253973722458,
0.02991955541074276,
0.007760781329125166,
-0.1278693974018097,
0.03042697347700596,
-0.005083243828266859,
-0.01412616204470396,
-0.05643216148018837,
0.01823081262409687,
-0.030680682510137558,
0.018339546397328377,
0.006048244424164295,
0.04555891081690788,
-0.014397993683815002,
-0.02653072588145733,
-0.021347811445593834,
-0.004843126051127911,
0.0016445788787677884,
-0.015059449709951878,
-0.021075980737805367,
0.0680665373802185,
-0.016101468354463577,
0.016355177387595177,
-0.002462337724864483,
-0.017551235854625702,
0.03747646510601044,
0.004492010921239853,
0.0563596710562706,
-0.029285281896591187,
-0.031459931284189224,
0.03258350118994713,
-0.03363458067178726,
0.009378177113831043,
-0.05121299996972084,
-0.007488950155675411,
0.020514195784926414,
-0.005391319282352924,
-0.018629498779773712,
-0.007484419271349907,
-0.02120283432304859,
-0.0727420300245285,
-0.01622832380235195,
0.0019526542164385319,
0.05509112775325775,
0.01102728582918644,
0.014135222882032394,
-0.005268995184451342,
0.035664256662130356,
-0.05128549039363861,
-0.023594949394464493,
0.03954238072037697,
-0.017043817788362503,
0.009024796076118946,
-0.009849350899457932,
-0.025552134960889816,
0.006881860084831715,
0.006977001205086708,
0.06741414219141006,
-0.02071353793144226,
0.003891716944053769,
-0.012957287952303886,
-0.01073733251541853,
0.029140306636691093,
-0.029647724702954292,
0.008227424696087837,
0.02727373130619526,
0.045196469873189926,
-0.010637661442160606,
-0.0009145987569354475,
0.03885374218225479,
0.01714348793029785,
-0.0063653807155787945,
-0.07147348672151566,
0.0023581357672810555,
0.009731557220220566,
0.052155349403619766,
-0.07444550842046738,
0.03604481741786003,
0.013781842775642872,
-0.0257877204567194,
-0.038092613220214844,
0.04642876982688904,
-0.019372504204511642,
0.05983911082148552,
0.008041673339903355,
0.00046551096602343023,
-0.03531993553042412,
-0.010266158729791641,
-0.007742659188807011,
0.03673345968127251,
0.004014040809124708,
-0.0321485698223114,
0.044036656618118286,
-0.02683880180120468,
0.03325401991605759,
-0.02419297769665718,
-0.022108938544988632,
0.03709590062499046,
-0.05817187950015068,
0.018665743991732597,
-0.01624644547700882,
-0.038237590342760086,
0.004002714529633522,
-0.0016355178086087108,
-0.002720577409490943,
0.007203527260571718,
-0.0021984349004924297,
0.005463807377964258,
0.014642640948295593,
-0.0028950024861842394,
-0.025660866871476173,
-0.019372504204511642,
0.027146877720952034,
-0.033670827746391296,
-0.009550336748361588,
0.04552266746759415,
-0.05853432044386864,
0.0033910945057868958,
0.006954348646104336,
-0.031532421708106995,
-0.007040428463369608,
-0.0005283719510771334,
-0.07459048181772232,
0.004564499016851187,
-0.00882998388260603,
0.029104061424732208,
0.04911084100604057,
-0.03381580486893654,
0.021529031917452812,
0.00977686233818531,
0.013664049096405506,
0.009423482231795788,
0.0016219262033700943,
-0.07147348672151566,
0.014678885228931904,
-0.07382936030626297,
0.006451460998505354,
-0.059222958981990814,
-0.04998070001602173,
-0.0411008782684803,
0.017669029533863068,
0.033779557794332504,
0.022652601823210716,
-0.06313733011484146,
-0.058208122849464417,
-0.018203631043434143,
0.011833718977868557,
-0.05095929279923439,
0.015793394297361374,
-0.015304096974432468,
-0.05828061327338219,
0.052409056574106216,
-0.008331626653671265,
-0.057555727660655975,
0.014905411750078201,
0.03209420666098595,
0.020767904818058014,
-0.025062838569283485,
-0.04599384218454361,
-0.020006777718663216,
0.013827147893607616,
-0.028379179537296295,
-0.0057764132507145405,
-0.004276811145246029,
-0.03196734935045242,
-0.04334801807999611,
0.0437467023730278,
0.012250526808202267,
-0.08046203851699829,
-0.030300119891762733,
-0.0458851084113121,
0.03472190722823143,
-0.006098080426454544,
-0.03671533614397049,
0.062194980680942535,
0.017052877694368362,
0.07806992530822754,
0.030644439160823822,
0.01640954427421093,
-0.018502645194530487,
0.03350772708654404,
-0.02470039576292038,
-0.010528928600251675,
0.015675600618124008,
-0.03276472166180611,
-0.09546712040901184,
-0.053496383130550385,
-0.04265937954187393,
0.031025001779198647,
0.015893064439296722,
0.061107657849788666,
-0.01806771382689476,
-0.0028950024861842394,
-0.023649316281080246,
0.04697243496775627,
0.01664513163268566,
0.02776302769780159,
0.022072695195674896,
-0.05070558190345764,
0.04490651562809944,
0.015440013259649277,
-0.008222893811762333,
0.018575133755803108,
-0.026005186140537262,
0.04552266746759415,
0.024827251210808754,
0.011308178305625916,
-0.0014497664524242282,
-0.04838595539331436,
-0.011797474697232246,
0.035356178879737854,
0.027744906023144722,
0.010121182538568974,
0.018212690949440002,
0.047443609684705734,
0.013890574686229229,
0.015893064439296722,
0.07886729389429092,
-0.02933964878320694,
-0.05476493015885353,
0.05944042652845383,
-0.05654089152812958,
-0.03454068675637245,
-0.01631893403828144,
-0.04534144699573517,
0.023232508450746536,
-0.012051183730363846,
-0.07763499766588211,
0.011462216265499592,
-0.006886390969157219,
0.009142589755356312,
0.0005249740206636488,
0.0011252679396420717,
-0.010248037055134773,
0.08466636389493942,
0.09032045304775238,
-0.03477627411484718,
0.02352246083319187,
-0.010846065357327461,
0.05045187473297119,
0.028487911447882652,
-0.02404800057411194,
-0.0037535359151661396,
-0.006623620633035898,
0.018611377105116844,
-0.005314300302416086,
-0.04265937954187393,
0.012232404202222824,
0.05969413369894028,
0.013745598495006561,
0.056975822895765305,
-0.0034590521827340126,
-0.011036347597837448,
0.0632823035120964,
0.007430053316056728,
0.020985370501875877,
-0.04019477590918541,
0.0022879126481711864,
-0.06523948907852173,
-0.005794535391032696,
0.0437467023730278,
0.02346809394657612,
0.01322005782276392,
-0.039143696427345276,
-0.03802012652158737,
-0.0011088448809459805,
-0.023015042766928673,
-0.020894760265946388,
-0.04084717109799385,
-0.005862493067979813,
-0.006605498492717743,
-0.054076287895441055,
0.012739823199808598,
0.06951630115509033,
-0.07611273974180222,
-0.025823965668678284,
-0.07404682040214539,
-0.00670970045030117,
-0.01006681565195322,
-0.044254120439291,
0.003053570631891489,
0.004956389311701059,
-0.04530520364642143,
0.0014293791027739644,
-0.05161168798804283,
-0.01674480363726616,
-0.017460625618696213,
-0.04998070001602173,
0.07332193851470947,
0.06516700237989426,
0.019499359652400017,
0.06933508068323135,
-0.0004369120579212904,
-0.05197412893176079,
-0.004587151575833559,
-0.011045408435165882,
0.020659172907471657,
-0.007552377413958311,
-0.03216669335961342,
0.0022335464600473642,
0.03439570963382721,
0.016255507245659828,
-0.014388931915163994,
0.009305688552558422,
0.01421677228063345,
-0.04581262171268463,
-0.024301711469888687,
-0.0020998960826545954,
-0.01206024456769228,
0.0059213899075984955,
-0.05592474341392517,
0.0255340114235878,
-0.0015584989450871944,
-0.035011861473321915,
0.00936911627650261,
0.039469894021749496,
-0.007611273787915707,
-0.027636174112558365,
0.09800421446561813,
-0.016690436750650406,
0.02810734696686268,
0.012286771088838577,
0.05164793133735657,
-0.01749686896800995,
0.01657264307141304,
0.05632342770695686,
0.058788031339645386,
0.03972360119223595,
0.05016192048788071,
0.0127670057117939,
-0.013537194579839706,
-0.007017775904387236,
0.026132041588425636,
0.0007526326808147132,
-0.009740618057549,
0.014597335830330849,
0.007131038699299097,
-0.0053460136987268925,
-0.042623136192560196,
0.028777863830327988,
0.018611377105116844,
-0.0036425383295863867,
-0.0032166694290935993,
-0.0463925264775753,
-0.0019526542164385319,
0.0468999445438385,
0.01971682347357273,
-0.018131142482161522,
-0.009287566877901554,
-0.014434237033128738,
0.02468227408826351,
0.05259028077125549,
0.05335140600800514,
0.04367421567440033,
0.02004302106797695,
0.0020183466840535402,
-0.030209509655833244,
0.04276810958981514,
0.02859664335846901,
0.057302020490169525,
0.034431952983140945,
-0.005423032678663731,
-0.04805975779891014,
0.024845372885465622,
-0.008150406181812286,
-0.08046203851699829,
-0.016373300924897194,
0.013972124084830284,
-0.036914680153131485,
0.0005306371604092419,
-0.031224345788359642,
-0.06915386021137238,
-0.012014939449727535,
-0.0155396843329072,
0.00583984050899744,
0.02901345118880272,
0.05708455666899681,
0.03191298618912697,
-0.04070219397544861,
-0.020894760265946388,
0.06074521690607071,
0.08452138304710388,
-0.006727822590619326,
0.03205795958638191,
0.0026435586623847485,
0.005395849701017141,
0.0026231713127344847,
0.0013489624252542853,
-0.042876843363046646,
-0.0331634096801281,
0.0022142918314784765,
0.0007027969695627689,
0.030118899419903755,
-0.0007435716106556356,
-0.02419297769665718,
0.05364136025309563,
0.00741646159440279,
0.022725090384483337,
0.004684558138251305,
0.04400041326880455,
-0.013084142468869686,
0.03267411142587662,
0.017632784321904182,
0.06654427945613861,
0.00907010119408369,
-0.010248037055134773,
-0.02163776382803917,
0.01209648884832859,
0.05577976629137993,
-0.012585785239934921,
-0.008358810096979141,
0.044217877089977264,
0.045051492750644684,
-0.054148778319358826,
0.014760434627532959,
0.04878464341163635
] |
52,291 |
flexget.manager
|
execute
|
Run all (can be limited with options) tasks from the config.
:param options: Either an :class:`argparse.Namespace` instance, or a dict, containing options for execution
:param priority: If there are other executions waiting to be run, they will be run in priority order,
lowest first.
:param suppress_warnings: Allows suppressing log warning about missing plugin in key phases
:returns: a list of :class:`threading.Event` instances which will be
set when each respective task has finished running
|
def execute(
self,
options: Optional[Union[dict, argparse.Namespace]] = None,
priority: int = 1,
suppress_warnings: Optional[Sequence[str]] = None,
) -> List[Tuple[str, str, threading.Event]]:
"""
Run all (can be limited with options) tasks from the config.
:param options: Either an :class:`argparse.Namespace` instance, or a dict, containing options for execution
:param priority: If there are other executions waiting to be run, they will be run in priority order,
lowest first.
:param suppress_warnings: Allows suppressing log warning about missing plugin in key phases
:returns: a list of :class:`threading.Event` instances which will be
set when each respective task has finished running
"""
if options is None:
options = copy.copy(self.options.execute)
elif isinstance(options, dict):
options_namespace = copy.copy(self.options.execute)
options_namespace.__dict__.update(options)
options = options_namespace
task_names = self.tasks
# Only reload config if daemon
config_hash = self.hash_config()
if self.is_daemon and self.autoreload_config and self.config_file_hash != config_hash:
logger.info('Config change detected. Reloading.')
try:
self.load_config(output_to_console=False, config_file_hash=config_hash)
logger.info('Config successfully reloaded!')
except Exception as e:
logger.error('Reloading config failed: {}', e)
# Handle --tasks
if options.tasks:
# Consider '*' the same as not specifying any tasks.
# (So manual plugin doesn't consider them explicitly enabled.)
if options.tasks == ['*']:
options.tasks = None
else:
task_names = []
for task in options.tasks:
try:
task_names.extend(
m for m in self.matching_tasks(task) if m not in task_names
)
except ValueError as e:
logger.error(e)
continue
options.tasks = task_names
# TODO: 1.2 This is a hack to make task priorities work still, not sure if it's the best one
task_names = sorted(
task_names, key=lambda t: self.config['tasks'][t].get('priority', 65535)
)
finished_events = []
for task_name in task_names:
task = Task(
self,
task_name,
options=options,
output=get_console_output(),
session_id=flexget.log.get_log_session_id(),
priority=priority,
suppress_warnings=suppress_warnings,
)
self.task_queue.put(task)
finished_events.append((task.id, task.name, task.finished_event))
return finished_events
|
(self, options: Union[dict, argparse.Namespace, NoneType] = None, priority: int = 1, suppress_warnings: Optional[Sequence[str]] = None) -> List[Tuple[str, str, threading.Event]]
|
[
0.04456616938114166,
0.038119491189718246,
-0.03797934576869011,
-0.06534769386053085,
0.032093245536088943,
0.010040401481091976,
-0.03629760071635246,
-0.008608918637037277,
0.013403885997831821,
-0.03894034028053284,
0.011722143739461899,
-0.017217837274074554,
0.012723180465400219,
-0.01811877079308033,
0.020561300218105316,
0.01778842695057392,
0.01693754643201828,
0.023184016346931458,
-0.02612706646323204,
-0.016326913610100746,
0.06426657736301422,
-0.0341954231262207,
-0.0025376288685947657,
-0.010125488974153996,
0.0164170078933239,
-0.013974476605653763,
0.05773981660604477,
-0.062024254351854324,
-0.023224059492349625,
0.019570274278521538,
-0.030011089518666267,
0.03255372494459152,
-0.026267211884260178,
0.021181942895054817,
-0.013584072701632977,
-0.005801009479910135,
-0.026727687567472458,
0.08408711105585098,
0.01867935061454773,
0.040221668779850006,
-0.0031257381197065115,
-0.04644811898469925,
0.025126028805971146,
-0.03063173219561577,
-0.02156233787536621,
0.034575819969177246,
0.01002538576722145,
0.05469666048884392,
-0.00015218890621326864,
-0.07583856582641602,
0.05117301270365715,
-0.02899003215134144,
-0.02252333238720894,
0.02438526228070259,
-0.023384224623441696,
0.07115370780229568,
0.053295210003852844,
0.040221668779850006,
0.06246471032500267,
-0.04572737216949463,
0.05349541828036308,
0.041803304105997086,
0.0011587003245949745,
0.03099210560321808,
0.01947017014026642,
-0.018519185483455658,
-0.0019582787062972784,
-0.011742164380848408,
-0.004309464246034622,
0.053815748542547226,
-0.01167209167033434,
-0.046928614377975464,
0.010911303572356701,
-0.06142362952232361,
0.036417726427316666,
-0.012823283672332764,
-0.03974116966128349,
-0.008493798784911633,
0.012182620353996754,
0.010040401481091976,
-0.05589790642261505,
0.04276430234313011,
0.02616710774600506,
0.04188339039683342,
0.026207149028778076,
0.019810521975159645,
-0.0013889388646930456,
-0.027728725224733353,
-0.00069947459269315,
-0.054015956819057465,
0.024044908583164215,
0.014044549316167831,
-0.010180545970797539,
0.03447571396827698,
-0.021282047033309937,
0.01651711016893387,
-0.032813992351293564,
-0.03125237673521042,
-0.02648743987083435,
-0.03839977830648422,
-0.030771877616643906,
-0.03783920034766197,
0.033534739166498184,
-0.04492654278874397,
0.013814310543239117,
-0.03988131508231163,
-0.043765340000391006,
0.024965863674879074,
-0.021121880039572716,
0.006917165592312813,
-0.011842267587780952,
0.06795039027929306,
-0.0005508831818588078,
-0.029991067945957184,
-0.002875478705391288,
-0.04644811898469925,
-0.06126346439123154,
0.01654714159667492,
-0.03966108709573746,
-0.04404562711715698,
-0.024165034294128418,
0.030251339077949524,
0.009820173494517803,
0.02498588338494301,
-0.0481298603117466,
0.033434636890888214,
-0.048169899731874466,
0.009915271773934364,
0.045807454735040665,
-0.04280434176325798,
0.05305496230721474,
-0.008769083768129349,
0.02842945046722889,
0.02048121765255928,
0.028149161487817764,
-0.02780880779027939,
0.018429091200232506,
0.044005587697029114,
0.017347970977425575,
-0.035536814481019974,
0.02796897478401661,
-0.01060098223388195,
0.019249942153692245,
-0.01549605280160904,
0.039340753108263016,
-0.01575632207095623,
0.0033434636425226927,
-0.0328940749168396,
0.028929969295859337,
-0.020501237362623215,
0.041803304105997086,
0.0029580644331872463,
-0.0318329781293869,
0.0111915934830904,
-0.00724750803783536,
-0.0037714068312197924,
0.014645171351730824,
-0.012843305245041847,
0.006716958247125149,
-0.039080485701560974,
-0.011612029746174812,
-0.015125669538974762,
0.019390087574720383,
0.02012084424495697,
-0.008053342811763287,
-0.01375424861907959,
0.022042835131287575,
0.08472777158021927,
0.027908911928534508,
0.027388373389840126,
0.01452504750341177,
0.04208359494805336,
0.027908911928534508,
0.062184419482946396,
-0.06855101138353348,
0.056178197264671326,
-0.008483788929879665,
0.006807051599025726,
-0.013173647224903107,
-0.03747882694005966,
-0.039801232516765594,
-0.013353833928704262,
0.013153626583516598,
-0.061824046075344086,
0.038419801741838455,
0.043404966592788696,
0.050732556730508804,
0.05986201390624046,
-0.057659730315208435,
-0.024165034294128418,
-0.008538845926523209,
-0.043044593185186386,
-0.000536806124728173,
0.006731973960995674,
0.0040391841903328896,
0.015936508774757385,
-0.096499964594841,
-0.0014089596224948764,
0.03397519513964653,
-0.018128780648112297,
0.01544600073248148,
-0.03849988430738449,
0.04977155849337578,
0.004654821939766407,
0.006541776936501265,
0.014985524117946625,
0.008328627794981003,
-0.0375589095056057,
0.012232672423124313,
-0.005430625751614571,
0.006877124309539795,
-0.06098317354917526,
-0.07703980803489685,
0.007497766986489296,
0.02905009500682354,
0.01026062946766615,
0.04292446747422218,
0.024605490267276764,
-0.032453618943691254,
0.029390446841716766,
0.06154375523328781,
0.021582357585430145,
0.05773981660604477,
0.037138473242521286,
0.015636198222637177,
0.04885060712695122,
0.0481298603117466,
-0.038720112293958664,
0.052174050360918045,
0.05357550084590912,
0.02274356037378311,
-0.010440816171467304,
-0.02268349938094616,
-0.018539205193519592,
0.04660828411579132,
0.0041017490439116955,
-0.005605807062238455,
-0.03719853609800339,
0.0012531732209026814,
0.055457450449466705,
-0.004474635235965252,
0.0030381472315639257,
-0.0410425178706646,
-0.06070288270711899,
0.004619785584509373,
-0.016627224162220955,
-0.029530592262744904,
0.01808873936533928,
0.016987597569823265,
0.01950020156800747,
0.031332459300756454,
-0.023724576458334923,
0.01132172904908657,
-0.004041687119752169,
-0.11932361125946045,
0.03469594195485115,
0.02202281355857849,
-0.04176326468586922,
0.05501699447631836,
0.0007758036954328418,
0.037859220057725906,
-0.005425620824098587,
0.016797401010990143,
0.06622860580682755,
0.01778842695057392,
0.002168496372178197,
-0.010921313427388668,
-0.09329664707183838,
-0.004779951646924019,
0.01562618836760521,
0.05065247416496277,
0.026087025180459023,
-0.060182344168424606,
0.0061713932082057,
-0.026507459580898285,
0.024445323273539543,
0.019259952008724213,
-0.019390087574720383,
0.0009272105526179075,
-0.008163456805050373,
0.03940081596374512,
0.011401811614632607,
-0.013243719935417175,
-0.0005405599949881434,
0.04720890522003174,
-0.009860214777290821,
-0.01729791983962059,
0.03207322582602501,
0.0035336606670171022,
0.023103933781385422,
0.038620006293058395,
0.018098749220371246,
0.03085196018218994,
-0.06650889664888382,
0.04776948690414429,
0.005385579075664282,
-0.0742369070649147,
-0.029430488124489784,
0.03894034028053284,
-0.008513819426298141,
0.029590653255581856,
-0.049811601638793945,
-0.009439779445528984,
-0.024525407701730728,
0.014635161496698856,
0.05013193190097809,
0.053615543991327286,
-0.050011809915304184,
0.04776948690414429,
-0.04548712074756622,
0.07591864466667175,
-0.032874055206775665,
0.020541278645396233,
-0.007527798414230347,
0.0517335943877697,
-0.007948233745992184,
0.050372183322906494,
0.007172430399805307,
-0.018819496035575867,
0.00874906312674284,
-0.09810163080692291,
0.06294520944356918,
0.021882670000195503,
-0.018599268049001694,
0.04568732902407646,
0.023003829643130302,
-0.055097077041864395,
0.053255170583724976,
-0.00015539534797426313,
-0.0017718354938551784,
0.019390087574720383,
-0.026767728850245476,
-0.005225413013249636,
0.007277538999915123,
-0.03968110680580139,
-0.019900616258382797,
0.008704016916453838,
0.03601730987429619,
0.022263063117861748,
-0.05950164049863815,
-0.0002921776904258877,
0.08088379353284836,
-0.02688785456120968,
0.07828109711408615,
0.0025726652238518,
0.007257518358528614,
0.015776343643665314,
0.016036612913012505,
0.04829002544283867,
-0.08825141936540604,
0.04220372065901756,
0.014735264703631401,
-0.05269458889961243,
0.06390620023012161,
0.035636916756629944,
-0.041603099554777145,
0.0553373247385025,
-0.041643138974905014,
0.026767728850245476,
-0.06730972975492477,
-0.0482499822974205,
-0.05317508429288864,
0.022243041545152664,
0.004171821754425764,
0.009349686093628407,
-0.02284366451203823,
0.011722143739461899,
-0.019259952008724213,
0.05305496230721474,
-0.03381503000855446,
0.026046983897686005,
0.06434665620326996,
0.010310681536793709,
-0.035536814481019974,
0.021262025460600853,
-0.02678775042295456,
-0.01660720445215702,
0.019590293988585472,
-0.015355907380580902,
-0.04552716389298439,
-0.005881092511117458,
0.012993460521101952,
0.017247866839170456,
-0.014254767447710037,
-0.06490723788738251,
-0.037899259477853775,
0.022563373669981956,
-0.01342390663921833,
-0.0008658969891257584,
-0.0066619012504816055,
-0.00392156234011054,
0.007738016080111265,
-0.04264417663216591,
0.008258555084466934,
-0.012953419238328934,
-0.005806014873087406,
-0.02668764628469944,
0.0625447928905487,
-0.03972114995121956,
-0.01775839738547802,
-0.0247456356883049,
-0.05265454575419426,
0.06887134909629822,
0.02264345809817314,
0.058220311999320984,
-0.008258555084466934,
0.03827965632081032,
0.007482751738280058,
0.017738375812768936,
0.05213400721549988,
0.0060612792149186134,
-0.006191413849592209,
-0.06710951775312424,
0.015646208077669144,
-0.06718960404396057,
-0.007127383723855019,
-0.040061499923467636,
0.013734227977693081,
0.022503312677145004,
-0.021742524579167366,
-0.03617747873067856,
-0.0014014517655596137,
0.015105648897588253,
-0.003703837050125003,
0.06286512315273285,
-0.016066644340753555,
0.008678991347551346,
0.03207322582602501,
-0.04592757672071457,
-0.01444496400654316,
-0.042524050921201706,
0.04660828411579132,
-0.028149161487817764,
0.0073676323518157005,
0.058540645986795425,
-0.03747882694005966,
0.05737944319844246,
-0.01677737943828106,
0.06034250929951668,
-0.008699011988937855,
-0.08408711105585098,
0.0311522725969553,
0.016296882182359695,
-0.03946087881922722,
0.017047660425305367,
-0.000805834773927927,
-0.0043244799599051476,
0.03393515571951866,
-0.00838868971914053,
-0.026807771995663643,
-0.007697974797338247,
0.05357550084590912,
0.02786887064576149,
-0.025746671482920647,
-0.01798863522708416,
-0.08176470547914505,
-0.03427550569176674,
0.03315434604883194,
-0.09417755901813507,
-0.024965863674879074,
-0.00899431761354208,
-0.06783026456832886,
-0.019320014864206314,
-0.04312467575073242,
0.0024137503933161497,
-0.04396554455161095,
0.020821569487452507,
0.0164170078933239,
-0.02232312597334385,
-0.021161923184990883,
0.06390620023012161,
-0.008413716219365597,
-0.020821569487452507,
0.03573702275753021,
-0.09577921777963638,
-0.011712132953107357,
0.05357550084590912,
0.0031807951163500547,
0.006351579912006855,
-0.05009189248085022,
0.09009332954883575,
0.011151552200317383,
0.020411144942045212,
0.025126028805971146,
-0.0375589095056057,
-0.06843089312314987,
0.08056345582008362,
-0.06795039027929306,
-0.014134642668068409,
-0.023023851215839386,
-0.01447499543428421,
-0.10699083656072617,
0.05589790642261505,
-0.004254407249391079,
-0.00007394378917524591,
-0.049090854823589325,
0.0011142793809995055,
-0.002755354391410947,
0.0317729152739048,
0.0287898238748312,
0.07892175763845444,
0.023944804444909096,
-0.02146223373711109,
0.03443567454814911,
0.040782246738672256,
0.01768832467496395,
-0.0018168821698054671,
0.05613815411925316,
-0.10162527859210968,
-0.021342109888792038,
-0.05097280442714691,
-0.000730757019482553,
0.04176326468586922,
-0.08012299984693527,
0.024145012721419334,
-0.05373566597700119,
-0.027588579803705215,
0.008949270471930504,
0.014404922723770142,
-0.01060098223388195,
-0.02042115479707718,
0.01670730859041214,
-0.03681814298033714,
0.09145474433898926,
-0.006852098274976015,
0.01670730859041214,
-0.005097780842334032,
0.0211419016122818,
0.010851241648197174,
0.04788960888981819,
-0.019620325416326523,
-0.03930071368813515,
-0.019900616258382797,
-0.04368525370955467,
0.005195382051169872,
0.028469491750001907,
-0.03829967603087425,
0.035696979612112045,
-0.05902114138007164,
-0.0019219911191612482,
-0.00526044936850667,
0.010711096227169037,
0.02274356037378311,
0.014194704592227936,
-0.03327447175979614,
-0.001030442421324551,
0.020441176369786263,
0.004654821939766407,
0.044886499643325806,
-0.005730936769396067,
0.022543353959918022,
0.009334670379757881,
0.041082557290792465,
0.06446678191423416,
-0.031192313879728317,
-0.08012299984693527,
0.03833971917629242,
0.012743201106786728,
0.010470847599208355,
0.037338681519031525,
-0.0017192810773849487,
0.016336923465132713,
-0.11531946063041687,
0.006316543556749821,
-0.007988275028765202,
0.017518147826194763,
-0.0026001937221735716,
-0.0003885274927597493,
0.016326913610100746,
0.009614960290491581,
-0.01239283848553896,
-0.013353833928704262,
-0.0071974559687078,
-0.0859290137887001,
-0.014775305986404419,
0.049811601638793945,
0.04540703818202019,
-0.01096135564148426,
-0.016847452148795128,
-0.02025097794830799,
-0.03253370150923729,
-0.03069179505109787,
0.016406996175646782,
0.005405599717050791,
-0.057459525763988495,
-0.010580961592495441,
0.025166070088744164,
-0.004294448997825384,
0.023744598031044006,
0.02678775042295456,
0.022182980552315712,
0.01782847009599209,
0.04176326468586922,
0.0011530695483088493,
-0.010300670750439167,
-0.02068142406642437,
0.00017017629579640925,
-0.018599268049001694,
0.011311718262732029,
-0.03551679477095604,
-0.022703519091010094,
-0.03191306069493294,
0.05177363380789757,
-0.034916169941425323,
0.015225772745907307,
-0.029810883104801178,
-0.0074727414175868034,
-0.05121305212378502,
-0.02678775042295456,
0.07131388038396835,
-0.005851061549037695,
-0.020301030948758125,
0.05569769814610481,
0.010250618681311607,
0.003608738537877798,
-0.013664155267179012,
-0.007717995438724756,
0.06610848754644394,
0.0033634842839092016,
-0.06586823612451553,
0.027888890355825424,
0.0870501771569252,
-0.0007019772310741246,
-0.006877124309539795,
-0.04140289127826691,
0.00932465959340334,
-0.07251512259244919,
-0.06158379837870598,
-0.01940009742975235,
0.03319438546895981,
0.026267211884260178,
-0.037899259477853775,
-0.012953419238328934,
-0.02484573796391487,
-0.02320403791964054,
-0.06022238731384277,
0.018238894641399384,
0.007182440720498562,
-0.004945122636854649,
-0.07944229990243912,
0.07551823556423187,
-0.03341461718082428,
0.0028954995796084404,
0.0015253301244229078,
0.02971077896654606,
-0.01565621979534626,
-0.037078410387039185,
0.011592008173465729,
0.023003829643130302,
0.011281686834990978,
-0.014735264703631401,
0.04132280871272087,
-0.07715993374586105,
0.06915163993835449,
-0.03747882694005966,
0.06414645165205002,
-0.030972085893154144,
-0.060022179037332535,
-0.05101284757256508,
0.02428515814244747,
-0.009629976004362106,
0.009820173494517803,
-0.0657881498336792,
0.019810521975159645,
-0.017608240246772766,
-0.04624791070818901,
-0.02868972159922123,
0.02720818668603897,
-0.0363776832818985,
0.032974157482385635,
0.042003512382507324,
-0.09265598654747009,
0.04732903093099594,
0.038119491189718246,
0.010080442763864994,
-0.008028317242860794,
-0.035797081887722015,
0.011531946249306202,
-0.047809526324272156,
-0.05025205761194229,
-0.006741984281688929,
-0.00838868971914053,
0.011511925607919693,
-0.012402848340570927,
-0.020921673625707626,
0.00306067056953907,
0.042163677513599396,
-0.0504923053085804,
0.024445323273539543,
-0.005077760200947523,
0.034575819969177246,
0.0693918839097023,
-0.01024060882627964,
0.014054560102522373,
0.02252333238720894,
0.001988309668377042,
-0.05081263929605484,
-0.024405281990766525,
0.011141542345285416,
-0.01913982816040516,
0.02012084424495697,
-0.05321512743830681,
-0.02264345809817314,
0.007657933048903942,
0.03629760071635246,
0.019209900870919228,
-0.032974157482385635,
0.00810839980840683,
0.020200926810503006,
0.019179869443178177,
0.015285835601389408,
0.035636916756629944,
-0.012082517147064209,
0.0001368605298921466,
-0.038459841161966324,
-0.007237497717142105,
0.05281471088528633,
-0.00724750803783536,
-0.011732153594493866,
0.01270315982401371,
-0.025526443496346474,
-0.016226809471845627,
0.02278360165655613,
-0.05005184933543205,
0.03547675162553787,
0.026347294449806213,
-0.01732795126736164,
-0.020411144942045212,
0.005881092511117458,
0.0066619012504816055,
-0.032153308391571045,
-0.032453618943691254,
0.046728406101465225,
0.03575704246759415,
-0.018849527463316917,
-0.01608666405081749,
0.06270495802164078,
-0.02022094838321209,
-0.04572737216949463,
0.01953023299574852,
0.031192313879728317,
-0.017247866839170456,
0.005680885165929794,
-0.02042115479707718,
0.03079189918935299,
-0.03311430290341377,
-0.01654714159667492,
0.040682144463062286,
-0.005020200740545988,
-0.01157198753207922,
-0.030211297795176506,
0.054736703634262085,
0.004241894464939833,
0.033434636890888214,
-0.013864362612366676,
0.01162203960120678,
0.021482253447175026,
-0.002840442582964897,
-0.020641382783651352,
-0.042724259197711945,
-0.02048121765255928,
-0.03541668877005577,
-0.03059169091284275,
0.03447571396827698,
0.0375589095056057,
0.0028679710812866688,
0.006316543556749821,
0.035536814481019974
] |
52,292 |
flexget.manager
|
execute_command
|
Handles the 'execute' CLI command.
If there is already a task queue running in this process, adds the execution to the queue.
If FlexGet is being invoked with this command, starts up a task queue and runs the execution.
Fires events:
* manager.execute.started
* manager.execute.completed
:param options: argparse options
|
def execute_command(self, options: argparse.Namespace) -> None:
"""
Handles the 'execute' CLI command.
If there is already a task queue running in this process, adds the execution to the queue.
If FlexGet is being invoked with this command, starts up a task queue and runs the execution.
Fires events:
* manager.execute.started
* manager.execute.completed
:param options: argparse options
"""
fire_event('manager.execute.started', self, options)
if self.task_queue.is_alive() or self.is_daemon:
if not self.task_queue.is_alive():
logger.error(
'Task queue has died unexpectedly. Restarting it. Please open an issue on Github and include'
' any previous error logs.'
)
self.task_queue = TaskQueue()
self.task_queue.start()
if len(self.task_queue):
logger.verbose('There is a task already running, execution queued.')
finished_events = self.execute(options)
if not options.cron:
# Wait until execution of all tasks has finished
for _, _, event in finished_events:
event.wait()
else:
self.task_queue.start()
self.ipc_server.start()
self.execute(options)
self.shutdown(finish_queue=True)
self.task_queue.wait()
fire_event('manager.execute.completed', self, options)
|
(self, options: argparse.Namespace) -> NoneType
|
[
0.09231633692979813,
-0.004052410367876291,
-0.05476837232708931,
0.005217595025897026,
0.06405241787433624,
-0.017454376444220543,
-0.04874122887849808,
-0.023846516385674477,
-0.0132615827023983,
-0.05828732252120972,
0.04563406854867935,
-0.054918114095926285,
0.005989705678075552,
-0.03818437457084656,
0.0004474731395021081,
0.02083294466137886,
0.052447360008955,
-0.02895648404955864,
-0.024913432076573372,
-0.026541883125901222,
0.047393545508384705,
0.027496492490172386,
0.01757604256272316,
-0.02457651123404503,
-0.01311184000223875,
-0.008614880964159966,
0.015985026955604553,
-0.021207300946116447,
-0.008750585839152336,
0.006537202280014753,
-0.014665420167148113,
0.01697707176208496,
-0.031857747584581375,
0.009040712378919125,
-0.0018788021989166737,
0.05222274735569954,
-0.007819373160600662,
0.025119328871369362,
0.006134768947958946,
0.0037716426886618137,
-0.03685540705919266,
-0.025886759161949158,
0.07041648030281067,
-0.012306973338127136,
-0.0077725788578391075,
-0.014356575906276703,
-0.007257838733494282,
0.014216192066669464,
0.006855405401438475,
-0.012447357177734375,
0.05963500589132309,
-0.028226487338542938,
-0.03708001971244812,
-0.0010054984595626593,
-0.052185311913490295,
0.06573701649904251,
0.055517084896564484,
0.036948997527360916,
-0.010631727054715157,
-0.05001404136419296,
0.02163781225681305,
0.02407112903892994,
-0.011548900976777077,
0.007154890336096287,
0.01713617332279682,
-0.009466542862355709,
0.010790828615427017,
-0.0017185307806357741,
0.018418345600366592,
0.031333647668361664,
-0.010079551488161087,
-0.00817033275961876,
-0.0056902202777564526,
-0.040692564100027084,
0.062143195420503616,
-0.012363126501441002,
0.0032545626163482666,
-0.010472625494003296,
-0.00817969162017107,
0.030341602861881256,
-0.024108564481139183,
0.020795509219169617,
-0.0011780534405261278,
0.0485914871096611,
0.007608797866851091,
0.07116518914699554,
0.06498830765485764,
0.004017314407974482,
-0.05589143931865692,
-0.02620496228337288,
-0.01234440878033638,
-0.01056621503084898,
-0.02906879037618637,
0.08602714538574219,
0.01631258800625801,
-0.024014975875616074,
-0.01707066036760807,
-0.028619561344385147,
-0.06543753296136856,
0.038783345371484756,
-0.04084230586886406,
0.042526908218860626,
0.060009364038705826,
-0.028170334175229073,
0.02081422694027424,
-0.005489003844559193,
-0.03708001971244812,
-0.011530183255672455,
-0.009817501530051231,
-0.004157697781920433,
-0.040580254048109055,
0.054730936884880066,
-0.021824989467859268,
-0.03595695272088051,
-0.0033200751058757305,
-0.01950397901237011,
-0.06768367439508438,
0.01890500821173191,
-0.018324755132198334,
-0.02783341333270073,
-0.030753394588828087,
0.024426767602562904,
0.02549368515610695,
-0.039382316172122955,
-0.012306973338127136,
0.04260178282856941,
-0.01989705301821232,
0.002508189296349883,
0.012353767640888691,
-0.03228825703263283,
-0.016780534759163857,
-0.026766497641801834,
0.019223211333155632,
0.032868508249521255,
0.02558727376163006,
0.02347215823829174,
-0.012222742661833763,
-0.023603184148669243,
-0.009447825141251087,
0.05117454752326012,
0.042639218270778656,
0.004997660405933857,
-0.006027141120284796,
-0.01463734358549118,
-0.013991577550768852,
0.013654656708240509,
0.004780065733939409,
-0.06270473450422287,
0.016649510711431503,
-0.007557324133813381,
0.010154422372579575,
-0.015095929615199566,
-0.0013301358558237553,
-0.01991577073931694,
-0.01548900455236435,
0.01835283264517784,
0.0061768838204443455,
-0.024014975875616074,
0.03636874258518219,
-0.017997194081544876,
-0.02569958008825779,
-0.0361628495156765,
-0.02549368515610695,
0.009630323387682438,
-0.022779598832130432,
-0.016368743032217026,
-0.017660273239016533,
0.07532054930925369,
0.004501638002693653,
0.06618624925613403,
0.03644361346960068,
0.050875063985586166,
-0.05768835172057152,
0.015273748897016048,
-0.08827328681945801,
0.021076276898384094,
-0.0004971923772245646,
-0.006190922111272812,
0.0006492747343145311,
-0.018259244039654732,
-0.043425366282463074,
0.0005922438576817513,
0.013757605105638504,
-0.04432382062077522,
0.010397754609584808,
-0.007337389513850212,
0.0368928425014019,
0.04967712238430977,
0.017810015007853508,
0.021619094535708427,
-0.04664483293890953,
0.002690688008442521,
0.025774452835321426,
-0.003338793059810996,
0.0035493685863912106,
-0.018530651926994324,
-0.027683671563863754,
0.0008317735628224909,
-0.0025549838319420815,
0.039157699793577194,
0.0017302294727414846,
-0.01879270188510418,
0.07071596384048462,
0.00337622850202024,
0.02897520177066326,
-0.02184370718896389,
0.003851193469017744,
-0.044548436999320984,
0.005732335615903139,
0.013598503544926643,
-0.006204960867762566,
-0.0382218100130558,
-0.05413196608424187,
0.03949462249875069,
0.027271877974271774,
-0.020159102976322174,
0.06764623522758484,
0.020570894703269005,
0.032569024711847305,
0.02700982801616192,
0.04144127666950226,
0.013897988945245743,
-0.015507722273468971,
0.036331307142972946,
-0.03129621222615242,
0.04746841639280319,
0.059597570449113846,
-0.005035096313804388,
0.042115118354558945,
0.027065983042120934,
-0.03923257067799568,
0.0368928425014019,
-0.030004682019352913,
-0.0019220871618017554,
-0.0007645063451491296,
-0.03526439145207405,
-0.014684137888252735,
0.004045390989631414,
-0.06513804942369461,
0.0075994390062987804,
-0.013224147260189056,
0.006064577028155327,
0.030753394588828087,
-0.028806740418076515,
-0.04510997235774994,
-0.03140851855278015,
-0.023640619590878487,
0.037547968327999115,
-0.01518951915204525,
0.021993450820446014,
-0.012550304643809795,
-0.05323350802063942,
0.03874590992927551,
-0.02955545298755169,
-0.07187646627426147,
0.0016109033022075891,
-0.06240524724125862,
-0.023547030985355377,
0.0367618165910244,
0.027496492490172386,
-0.020758073776960373,
-0.03251286968588829,
0.025849323719739914,
0.03152082487940788,
0.027814695611596107,
0.00671034213155508,
-0.015573234297335148,
-0.02865699864923954,
0.03498362377285957,
0.01647168956696987,
0.09231633692979813,
0.050350964069366455,
-0.018876932561397552,
-0.0005276088486425579,
-0.06176884099841118,
0.03659335896372795,
-0.005676181986927986,
-0.03414132073521614,
-0.07423491775989532,
-0.028263922780752182,
0.011127750389277935,
0.01705194264650345,
-0.016920918598771095,
0.0029737951699644327,
0.0026953674387186766,
0.009826860390603542,
0.016518484801054,
0.013626580126583576,
-0.03324286639690399,
0.056153491139411926,
0.013926065526902676,
0.0652129203081131,
-0.020140385255217552,
-0.042414601892232895,
0.006677586119621992,
0.044248949736356735,
-0.09134300798177719,
0.044660743325948715,
0.03547028824687004,
0.011296210810542107,
0.027253160253167152,
0.010173141025006771,
-0.07064109295606613,
-0.008380908519029617,
-0.01173607911914587,
0.05109967663884163,
0.0394197516143322,
0.011708002537488937,
-0.02193729765713215,
0.0007299953722395003,
0.06532523036003113,
0.022068321704864502,
-0.033261582255363464,
-0.005765091627836227,
0.08400562405586243,
0.06996724754571915,
0.05001404136419296,
-0.007795976009219885,
0.00447356142103672,
0.030116988345980644,
-0.07958821207284927,
0.020851662382483482,
0.05435657873749733,
-0.021787554025650024,
-0.017847450450062752,
0.06240524724125862,
-0.04260178282856941,
0.09313992410898209,
0.016368743032217026,
0.0011569958878681064,
0.00878802128136158,
0.020664485171437263,
-0.06502573937177658,
-0.023528313264250755,
-0.046382784843444824,
-0.08452972024679184,
-0.0029480583034455776,
-0.02508189156651497,
0.025343941524624825,
0.004349555820226669,
0.03620028495788574,
0.05372017249464989,
-0.03271876648068428,
0.016789892688393593,
-0.013888630084693432,
-0.04570893943309784,
0.006443613208830357,
-0.013196070678532124,
-0.004368273541331291,
-0.0628170371055603,
0.0150397764518857,
-0.010397754609584808,
-0.027664951980113983,
0.007019186392426491,
0.03979410603642464,
-0.07097800821065903,
0.028170334175229073,
-0.043238189071416855,
0.007482452783733606,
-0.0557042621076107,
-0.07135237008333206,
-0.009335517883300781,
0.014103884808719158,
-0.004880674183368683,
-0.06854469329118729,
-0.08378100395202637,
0.02478240616619587,
-0.03781001642346382,
0.08700047433376312,
-0.0033364531118422747,
0.03578849136829376,
-0.011558259837329388,
0.036424897611141205,
0.00042846283758990467,
-0.0300795529037714,
0.026579318568110466,
-0.045259714126586914,
-0.039270006120204926,
-0.06671034544706345,
-0.045372020453214645,
0.02641085907816887,
-0.024464203044772148,
-0.025568556040525436,
-0.03971923515200615,
-0.038970522582530975,
-0.03425363078713417,
0.023341134190559387,
0.012531586922705173,
-0.04331305995583534,
-0.0018565747886896133,
-0.0014798784395679832,
-0.0150397764518857,
-0.032250821590423584,
0.005788488779217005,
-0.013532991521060467,
-0.011839027516543865,
-0.011754796840250492,
0.03474029153585434,
-0.010772110894322395,
-0.03430978208780289,
0.028788022696971893,
-0.03320543095469475,
0.08527843654155731,
0.05274684354662895,
0.061319611966609955,
-0.057276561856269836,
0.009372953325510025,
0.04379972070455551,
0.009185775183141232,
0.050126347690820694,
0.011679925955832005,
-0.048516616225242615,
-0.05881142243742943,
-0.0069396356120705605,
-0.10901264101266861,
-0.020851662382483482,
-0.012812354601919651,
0.03494618833065033,
0.016780534759163857,
0.04656996205449104,
-0.0057089379988610744,
-0.01025737076997757,
0.002130323089659214,
0.0003761113912332803,
0.010313523933291435,
-0.017332710325717926,
0.05154890567064285,
0.03494618833065033,
-0.055517084896564484,
-0.015545157715678215,
-0.008535330183804035,
0.07127749919891357,
-0.0004366518696770072,
-0.00024537905119359493,
0.017613478004932404,
0.005030416883528233,
0.037959758192300797,
-0.044248949736356735,
0.01280299574136734,
0.03159569576382637,
-0.0696677640080452,
0.015329902991652489,
0.011240056715905666,
-0.06266729533672333,
0.03685540705919266,
-0.0008955312077887356,
0.028675716370344162,
0.012728124856948853,
0.024445485323667526,
-0.013832475990056992,
-0.0013172673061490059,
0.08093589544296265,
0.0009534394484944642,
-0.05626579746603966,
0.012728124856948853,
-0.08572766184806824,
-0.05488067865371704,
0.04889097064733505,
-0.022592421621084213,
-0.00939635094255209,
-0.05577913299202919,
-0.007299953605979681,
-0.040804870426654816,
-0.06712213903665543,
0.006846046540886164,
0.008540010079741478,
0.047805339097976685,
0.035114649683237076,
0.005072531756013632,
-0.00009863419109024107,
0.014908751472830772,
-0.023210110142827034,
-0.008455779403448105,
0.015067853033542633,
0.017014507204294205,
-0.037641555070877075,
0.04286383092403412,
-0.03223210200667381,
-0.01026672963052988,
-0.042227424681186676,
0.03240056335926056,
0.004705194383859634,
0.019185775890946388,
0.05525503307580948,
-0.0646139457821846,
0.011717361398041248,
0.10339729487895966,
-0.06626112014055252,
0.012587741017341614,
-0.056228362023830414,
0.029592890292406082,
-0.04305100813508034,
0.027721107006072998,
0.032980818301439285,
0.03971923515200615,
-0.022030886262655258,
-0.03949462249875069,
-0.0354328528046608,
0.02060833014547825,
0.004599906969815493,
0.05091249942779541,
-0.019082827493548393,
-0.019279364496469498,
0.05716425180435181,
0.02744033932685852,
0.03758540377020836,
-0.01041647233068943,
0.034796446561813354,
-0.03466542065143585,
-0.029293404892086983,
-0.05783809348940849,
0.020477306097745895,
-0.0023888631258159876,
-0.07251287251710892,
-0.010079551488161087,
-0.030229296535253525,
-0.03402901440858841,
-0.0112681332975626,
0.025531120598316193,
0.008427702821791172,
0.01280299574136734,
0.011614413931965828,
-0.03088442049920559,
0.01366401556879282,
-0.02996724657714367,
-0.01564810611307621,
-0.07442209124565125,
0.018418345600366592,
0.049939170479774475,
0.028413666412234306,
0.005493683274835348,
-0.013430043123662472,
0.010594291612505913,
-0.04043051227927208,
0.07314927875995636,
0.03696771338582039,
-0.011913898400962353,
0.012316332198679447,
-0.06588675826787949,
-0.05117454752326012,
0.0077725788578391075,
0.06693495810031891,
-0.02927468717098236,
0.0052316333167254925,
-0.027459057047963142,
-0.0177164264023304,
0.006378100719302893,
0.014899392612278461,
0.05068788304924965,
-0.011539542116224766,
-0.014103884808719158,
0.038783345371484756,
0.04570893943309784,
0.08692560344934464,
-0.031970053911209106,
-0.02865699864923954,
0.04619560390710831,
-0.008156294003129005,
0.044136643409729004,
0.025025738403201103,
0.02893776446580887,
0.012335049919784069,
-0.12533459067344666,
-0.0020940571557730436,
0.004024333320558071,
0.00042817037319764495,
0.04218998923897743,
0.03515208512544632,
0.07401029765605927,
-0.008540010079741478,
-0.04286383092403412,
0.013748246245086193,
0.025849323719739914,
-0.012288255617022514,
-0.0002936359669547528,
0.004894712474197149,
0.046794574707746506,
-0.03547028824687004,
-0.0026672908570617437,
-0.012578382156789303,
0.002025035209953785,
-0.04847918078303337,
-0.0012377165257930756,
0.043649978935718536,
-0.10384652018547058,
0.009288723580539227,
0.0075807212851941586,
-0.016733739525079727,
0.04439869150519371,
-0.04840430989861488,
0.004155358299612999,
-0.009532054886221886,
0.048104822635650635,
-0.004875994753092527,
0.0009551942930556834,
0.05162377655506134,
0.020589612424373627,
0.008722509257495403,
0.007337389513850212,
-0.02835751324892044,
0.021562939509749413,
0.03299953415989876,
0.038970522582530975,
0.02815161645412445,
0.04731867462396622,
-0.02042115293443203,
-0.06798315793275833,
-0.01929808221757412,
-0.05768835172057152,
0.030715959146618843,
-0.00574169447645545,
-0.06394010782241821,
0.006013102829456329,
0.07958821207284927,
-0.023696772754192352,
0.019148340448737144,
-0.0459335558116436,
0.06457651406526566,
0.007271877024322748,
0.009789424948394299,
0.05862424522638321,
0.05476837232708931,
0.01654656231403351,
0.012110436335206032,
-0.039681799709796906,
0.0050491346046328545,
0.004475900903344154,
-0.024351896718144417,
-0.029742632061243057,
0.008525971323251724,
-0.0004816916480194777,
-0.016331307590007782,
-0.0024075808469206095,
0.02377164363861084,
0.0005618273862637579,
-0.072325699031353,
-0.0022110436111688614,
0.05607862025499344,
-0.012737483717501163,
-0.04260178282856941,
0.0675339326262474,
-0.031240059062838554,
-0.027758542448282242,
-0.0542442724108696,
0.035526443272829056,
-0.017997194081544876,
-0.03588208183646202,
-0.01752924732863903,
0.027571363374590874,
0.016125410795211792,
-0.022330371662974358,
0.03781001642346382,
-0.025437531992793083,
0.0711277574300766,
0.03260646015405655,
-0.03120262362062931,
-0.07221338897943497,
-0.07681797444820404,
-0.05274684354662895,
0.005437529645860195,
-0.018137577921152115,
-0.012990173883736134,
-0.0450725331902504,
-0.002370145171880722,
-0.01879270188510418,
-0.06311652064323425,
0.02611137367784977,
-0.016368743032217026,
-0.0069396356120705605,
0.04196537658572197,
0.04900328069925308,
-0.04132897034287453,
-0.006934956181794405,
0.015910156071186066,
-0.03202620893716812,
0.011548900976777077,
0.006719700992107391,
-0.02996724657714367,
0.0017150212079286575,
-0.025737015530467033,
-0.02274216338992119,
-0.06165653094649315,
-0.003654656233265996,
0.01705194264650345,
-0.027571363374590874,
-0.03994384780526161,
0.06742162257432938,
-0.04795508086681366,
-0.006443613208830357,
-0.052185311913490295,
-0.013907347805798054,
0.012597099877893925,
-0.006963032763451338,
-0.01072531659156084,
-0.032662615180015564,
0.00520355673506856,
-0.036743100732564926,
-0.02377164363861084,
0.008563407696783543,
0.006574637722223997,
0.04817969352006912,
-0.04656996205449104,
0.006392139010131359,
0.012943379580974579,
0.05495554953813553,
0.027608798816800117,
-0.06045859307050705,
-0.01989705301821232,
0.022218063473701477,
0.009279364719986916,
0.05342068895697594,
-0.033785682171583176,
0.020795509219169617,
0.03393542766571045,
0.0015559196472167969,
-0.03006083518266678,
-0.013954142108559608,
0.022929342463612556,
0.00675245700404048,
0.036518488079309464,
-0.01792232319712639,
0.010285447351634502,
0.0812353789806366,
-0.027608798816800117,
0.04660739749670029,
-0.0005515910452231765,
-0.0420776829123497,
-0.022592421621084213,
0.037529248744249344,
0.03159569576382637,
-0.037847451865673065,
-0.017744502052664757,
0.04368741437792778,
0.06637342274188995,
0.0011271643452346325,
-0.045970991253852844,
0.05233505368232727,
-0.042227424681186676,
-0.001512634684331715,
0.06996724754571915,
0.01117454469203949,
-0.03129621222615242,
0.012887226417660713,
-0.0654749721288681,
0.025138046592473984,
-0.012475433759391308,
-0.013532991521060467,
0.013645297847688198,
0.005077211186289787,
-0.024632664397358894,
0.021319609135389328,
-0.01264389418065548,
0.02143191546201706,
0.08033692836761475,
0.0317080058157444,
-0.023603184148669243,
0.027159571647644043,
0.099578857421875,
0.01596630923449993,
-0.04417407885193825,
0.00566214369609952,
-0.04275152459740639,
-0.03889565169811249,
-0.022012168541550636,
0.007529247086495161,
-0.0007019186159595847,
0.017997194081544876,
0.03309312462806702
] |
52,293 |
flexget.manager
|
handle_cli
|
Dispatch a cli command to the appropriate function.
* :meth:`.execute_command`
* :meth:`.daemon_command`
* CLI plugin callback function
The manager should have a lock and be initialized before calling this method.
:param options: argparse options for command. Defaults to options that manager was instantiated with.
|
def handle_cli(self, options: Optional[argparse.Namespace] = None) -> None:
"""
Dispatch a cli command to the appropriate function.
* :meth:`.execute_command`
* :meth:`.daemon_command`
* CLI plugin callback function
The manager should have a lock and be initialized before calling this method.
:param options: argparse options for command. Defaults to options that manager was instantiated with.
"""
if not options:
options = self.options
command = options.cli_command
if command is None:
raise Exception('Command missing')
command_options = getattr(options, command)
# First check for built-in commands
if command in ['execute', 'daemon']:
if command == 'execute':
self.execute_command(command_options)
elif command == 'daemon':
self.daemon_command(command_options)
else:
# Otherwise dispatch the command to the callback function
options.cli_command_callback(self, command_options)
|
(self, options: Optional[argparse.Namespace] = None) -> NoneType
|
[
0.020076505839824677,
0.005436630453914404,
0.019386716187000275,
-0.028190607205033302,
0.04799482598900795,
-0.020675532519817352,
0.02470535598695278,
0.03374522924423218,
0.008744897320866585,
-0.010564670898020267,
0.0013353326357901096,
-0.0362139493227005,
-0.02029433287680149,
-0.056925784796476364,
-0.04171411320567131,
0.016173748299479485,
-0.008023341186344624,
-0.008350083604454994,
-0.02653874270617962,
-0.034180887043476105,
0.05311379209160805,
-0.013532580807805061,
0.02770049497485161,
-0.020348791033029556,
-0.009189629927277565,
0.029606491327285767,
0.022563377395272255,
0.0023121563717722893,
0.01834295503795147,
-0.005336792673915625,
-0.025340687483549118,
0.020512161776423454,
-0.014884931035339832,
0.048321571201086044,
-0.05209726095199585,
-0.01248882059007883,
0.019078126177191734,
0.052424002438783646,
-0.023107947781682014,
0.004737764596939087,
-0.02777310460805893,
-0.026665810495615005,
0.08894654363393784,
0.006380552891641855,
0.014213294722139835,
0.011762726120650768,
-0.02975171059370041,
0.007832741364836693,
-0.034997742623090744,
-0.07885383069515228,
0.002897569676861167,
-0.06440455466508865,
-0.016318967565894127,
0.006453162524849176,
-0.04403761401772499,
0.07195593416690826,
0.05285966023802757,
0.029769862070679665,
-0.020239876583218575,
-0.04095171391963959,
-0.05271444097161293,
0.015638254582881927,
-0.016618480905890465,
-0.020403247326612473,
0.024033717811107635,
-0.06839807331562042,
0.010346842929720879,
0.012134850025177002,
0.061028219759464264,
0.029061920940876007,
-0.007388008758425713,
0.015429502353072166,
0.02684733457863331,
-0.04875722527503967,
0.08023341000080109,
-0.02927974984049797,
-0.004209077451378107,
-0.01243436336517334,
0.01762593723833561,
0.05681687220931053,
-0.024142632260918617,
0.004379255697131157,
0.015402273274958134,
0.08321039378643036,
-0.02053031325340271,
-0.0067436001263558865,
0.031040526926517487,
-0.013650570996105671,
-0.013541657477617264,
0.0036463544238358736,
-0.025050250813364983,
-0.04563502222299576,
-0.002938412595540285,
0.055764034390449524,
-0.07054005563259125,
-0.023997412994503975,
-0.03006030060350895,
0.019586391746997833,
-0.0133238285779953,
0.029642796143889427,
-0.04389239475131035,
0.05888624116778374,
0.09853098541498184,
0.04037083685398102,
0.00543209258466959,
-0.031040526926517487,
-0.004597084131091833,
-0.030695632100105286,
-0.019041821360588074,
-0.0033808762673288584,
-0.03989887610077858,
0.021546846255660057,
-0.03695819526910782,
-0.05220617353916168,
-0.0237432811409235,
0.010510213673114777,
-0.0697050467133522,
-0.004004863556474447,
-0.05133486166596413,
-0.01660032942891121,
-0.09170570224523544,
0.019223343580961227,
0.029606491327285767,
-0.06810763478279114,
-0.0033695308957248926,
-0.02537699230015278,
-0.015701787546277046,
-0.01139060314744711,
-0.002986062550917268,
0.04106062650680542,
0.05082659423351288,
-0.0016314429230988026,
0.022563377395272255,
-0.009548138827085495,
0.04156889393925667,
-0.010374071076512337,
0.010401299223303795,
0.018297573551535606,
-0.008604216389358044,
0.018969211727380753,
0.022908272221684456,
0.022018807008862495,
-0.03385414183139801,
-0.03804733604192734,
-0.032510869204998016,
0.031203899532556534,
0.02432415634393692,
-0.0433841310441494,
0.006366938818246126,
0.009629824198782444,
0.03265608847141266,
0.008540683425962925,
0.03367261961102486,
0.035142961889505386,
0.0240881759673357,
-0.0039458684623241425,
-0.024650897830724716,
-0.034761760383844376,
0.012806486338376999,
0.009148786775767803,
-0.027301141992211342,
0.020929666236042976,
-0.022799357771873474,
-0.047196123749017715,
-0.00023059164232108742,
-0.015166292898356915,
0.002886224538087845,
-0.005459320731461048,
0.014440198428928852,
0.09707880020141602,
-0.014412970282137394,
0.00005445706483442336,
-0.07337182015180588,
0.008631444536149502,
-0.005545544438064098,
0.031585097312927246,
-0.009856728836894035,
-0.0033354952465742826,
0.01588331162929535,
-0.031476184725761414,
0.004823988303542137,
0.008200326934456825,
0.019350411370396614,
-0.034689150750637054,
-0.025667430832982063,
-0.0027115081902593374,
0.06585674732923508,
0.019277801737189293,
-0.037829507142305374,
-0.0008225286146625876,
-0.02564927749335766,
-0.006140034180134535,
-0.00032844417728483677,
-0.024178937077522278,
0.04621589556336403,
-0.03363631293177605,
-0.03815625235438347,
0.007633065339177847,
0.013541657477617264,
-0.027936475351452827,
0.033291418105363846,
0.009493681602180004,
0.00679805688560009,
-0.02014911361038685,
0.009647976607084274,
0.0036032425705343485,
-0.009330310858786106,
0.0036962733138352633,
0.00019556326151359826,
-0.004606160335242748,
0.031113136559724808,
-0.0245964415371418,
-0.056925784796476364,
0.046651553362607956,
0.04643372446298599,
0.010782498866319656,
0.055945560336112976,
0.01933225803077221,
0.010464833118021488,
0.03006030060350895,
0.05554620921611786,
0.0491928830742836,
-0.03590535745024681,
0.0642230361700058,
-0.018914753571152687,
0.04726873338222504,
0.055872950702905655,
0.035034045577049255,
0.07645772397518158,
0.02691994234919548,
-0.001888979459181428,
-0.010192547924816608,
-0.08989046514034271,
-0.000981929013505578,
-0.04810374230146408,
-0.05075398460030556,
0.018524479120969772,
0.02633906714618206,
-0.027791256085038185,
0.014213294722139835,
0.020276181399822235,
0.0055500827729702,
0.014676179736852646,
-0.008168559521436691,
-0.03510665521025658,
0.017816536128520966,
-0.05721622332930565,
0.003131281351670623,
-0.0012094007106497884,
0.06563891470432281,
0.0027137771248817444,
-0.04853940010070801,
0.033908598124980927,
0.007810051087290049,
-0.07028592377901077,
-0.011844411492347717,
-0.06509434431791306,
-0.02497764118015766,
-0.008903730660676956,
0.009920261800289154,
-0.039572134613990784,
-0.010773423127830029,
0.02285381592810154,
0.06258932501077652,
0.01704506203532219,
-0.000041729144868440926,
0.04004409536719322,
-0.035415247082710266,
0.0789264440536499,
-0.004787683952599764,
0.05137116461992264,
0.037321243435144424,
-0.022018807008862495,
-0.012443440034985542,
-0.027936475351452827,
0.020403247326612473,
-0.008808430284261703,
-0.023652520030736923,
-0.0362139493227005,
-0.0063850912265479565,
0.019223343580961227,
-0.009838576428592205,
0.004272610880434513,
-0.06665544956922531,
-0.008554297499358654,
0.016173748299479485,
0.03060487098991871,
0.0002320097992196679,
-0.043166302144527435,
0.021601302549242973,
0.04106062650680542,
0.0385919064283371,
-0.04806743562221527,
0.008295626379549503,
0.02858996018767357,
0.032637935131788254,
-0.08851088583469391,
0.01824311725795269,
0.026084935292601585,
-0.042040854692459106,
-0.025159165263175964,
-0.045090451836586,
-0.07594945281744003,
-0.0382651649415493,
-0.014567265287041664,
0.031585097312927246,
0.021165646612644196,
-0.022055111825466156,
0.039063867181539536,
0.036195795983076096,
0.061173439025878906,
0.036812976002693176,
-0.04810374230146408,
0.024505680426955223,
0.03258347883820534,
0.061536483466625214,
0.040733885020017624,
0.007887198589742184,
0.0028476507868617773,
0.024306003004312515,
-0.07260942459106445,
0.039681047201156616,
-0.011844411492347717,
0.009253162890672684,
0.009098867885768414,
0.06179061904549599,
-0.03576014190912247,
0.06607457250356674,
0.0433841310441494,
0.010074556805193424,
0.021855436265468597,
0.0406612753868103,
-0.035070352256298065,
-0.05921298265457153,
0.022672291845083237,
-0.05253291502594948,
0.018606163561344147,
-0.0073108612559735775,
-0.01571086421608925,
-0.009593519382178783,
0.041968245059251785,
0.08262952417135239,
-0.015402273274958134,
-0.017208432778716087,
0.00006863859744044021,
0.0026343606878072023,
0.005491087678819895,
-0.02033063769340515,
-0.017816536128520966,
-0.07660294324159622,
-0.029134530574083328,
0.008726744912564754,
-0.024650897830724716,
0.004136467818170786,
0.022708596661686897,
-0.08858349174261093,
0.01769854687154293,
-0.04708721116185188,
0.02394295670092106,
-0.1017984077334404,
-0.03715787082910538,
-0.07500553131103516,
0.0129789337515831,
0.006103729363530874,
-0.0905439481139183,
-0.061609093099832535,
0.016446033492684364,
-0.06175431236624718,
0.07304507493972778,
-0.006770828738808632,
0.03775689750909805,
-0.015039226040244102,
0.032365649938583374,
-0.002350730122998357,
-0.005813291762024164,
0.036504387855529785,
-0.028789635747671127,
-0.007206485141068697,
-0.05906776338815689,
-0.0049828216433525085,
0.02269044518470764,
0.01598314940929413,
0.017226586118340492,
-0.021401626989245415,
0.010991251096129417,
-0.0666191428899765,
-0.01177180279046297,
0.06415042281150818,
-0.032401952892541885,
-0.049991585314273834,
-0.01804344169795513,
-0.00534586887806654,
-0.03494328260421753,
-0.02029433287680149,
-0.008540683425962925,
0.0035011356230825186,
0.0017743927892297506,
0.04120584577322006,
-0.018297573551535606,
-0.0022565647959709167,
0.028335826471447945,
-0.039172783493995667,
0.09765966981649399,
0.024414917454123497,
0.02552221156656742,
0.022527072578668594,
-0.0409880168735981,
0.06433194875717163,
0.010973098687827587,
0.01272480096668005,
-0.017880070954561234,
0.008123178966343403,
0.005563696846365929,
-0.011526745744049549,
-0.05674426257610321,
-0.028136150911450386,
0.047777000814676285,
0.05652643367648125,
-0.009883957915008068,
0.042004551738500595,
0.0027432746719568968,
0.011844411492347717,
-0.023107947781682014,
0.007728365249931812,
0.0338178388774395,
-0.019695306196808815,
0.03428979963064194,
0.024886880069971085,
0.002014911500737071,
-0.04512675479054451,
-0.022018807008862495,
0.06981395930051804,
0.013196762651205063,
-0.04995528236031532,
-0.033291418105363846,
0.016273586079478264,
0.0047059981152415276,
-0.008449921384453773,
0.021002275869250298,
0.04342043399810791,
-0.03378153219819069,
-0.014240522868931293,
-0.004728688392788172,
-0.04120584577322006,
0.008926420472562313,
-0.04283955693244934,
0.059321898967027664,
0.017671318724751472,
0.030495956540107727,
-0.05572773143649101,
-0.014612645842134953,
0.07921688258647919,
-0.011762726120650768,
-0.0016972452867776155,
0.004224960692226887,
-0.07631250470876694,
-0.029878776520490646,
0.04403761401772499,
-0.03610503673553467,
-0.0006920585292391479,
-0.05282335355877876,
0.01084603276103735,
-0.033563703298568726,
-0.026756571605801582,
-0.013487200252711773,
0.06509434431791306,
0.07398900389671326,
0.05768818408250809,
-0.05518316105008125,
0.003108590841293335,
0.015538415871560574,
-0.06208105385303497,
0.021365322172641754,
0.0416778065264225,
0.0034149119164794683,
-0.013396438211202621,
0.05859580263495445,
-0.04977376013994217,
-0.09199614077806473,
-0.04803113266825676,
0.007991574704647064,
0.03118574619293213,
-0.002539060777053237,
-0.01318768598139286,
-0.05376727506518364,
-0.02514101192355156,
0.04654264077544212,
-0.038482993841171265,
0.022109568119049072,
-0.04592546075582504,
0.0035692069213837385,
-0.003675851970911026,
0.004882983397692442,
-0.006258024368435144,
0.06999548524618149,
0.008282012306153774,
0.014530960470438004,
-0.009883957915008068,
0.02757342718541622,
-0.008812968619167805,
0.037865813821554184,
-0.002659320132806897,
-0.01714489981532097,
0.001359157613478601,
0.03133096545934677,
0.014331284910440445,
-0.04567132517695427,
0.05899515375494957,
-0.027882017195224762,
-0.01886029727756977,
-0.07849078625440598,
-0.015093683265149593,
0.0481763519346714,
-0.014222370460629463,
0.0030200982000678778,
0.0036236639134585857,
-0.0423675961792469,
-0.007900812663137913,
0.01101848017424345,
0.03536078706383705,
0.015111835673451424,
-0.050536155700683594,
-0.04047975316643715,
-0.024414917454123497,
-0.032637935131788254,
0.01177180279046297,
-0.06567522138357162,
0.007052190136164427,
0.0799429714679718,
-0.022454462945461273,
0.010646356269717216,
0.007419775240123272,
0.009793195873498917,
-0.0014000004157423973,
-0.007211023010313511,
0.026502439752221107,
0.0017222047317773104,
-0.003687197109684348,
-0.04563502222299576,
-0.04334782436490059,
0.016509566456079483,
0.0532953143119812,
-0.04726873338222504,
0.025395145639777184,
0.040879104286432266,
-0.04697829484939575,
-0.009729662910103798,
0.018696926534175873,
0.06429564207792282,
0.020076505839824677,
-0.046106982976198196,
0.025340687483549118,
0.016554947942495346,
0.04102432355284691,
-0.025195470079779625,
0.026665810495615005,
0.022418158128857613,
-0.03173031657934189,
0.043129995465278625,
0.0014975693775340915,
-0.028335826471447945,
0.0003800649428740144,
-0.1304791271686554,
0.02405187115073204,
-0.0003874393296428025,
0.030859004706144333,
0.054166629910469055,
0.043674565851688385,
0.05619969218969345,
0.0032129669561982155,
-0.02695624716579914,
-0.03819255530834198,
0.00009870342910289764,
-0.048357874155044556,
-0.02858996018767357,
0.0721011534333229,
0.04705090448260307,
-0.013795790262520313,
-0.008531606756150723,
0.01202593557536602,
-0.012788333930075169,
-0.023289471864700317,
-0.019695306196808815,
0.040733885020017624,
-0.05442076176404953,
-0.020403247326612473,
-0.015311512164771557,
-0.024178937077522278,
0.027083314955234528,
0.002954295836389065,
0.006584766786545515,
-0.02777310460805893,
-0.008454459719359875,
-0.0341627337038517,
-0.004892059601843357,
0.018288498744368553,
0.019423021003603935,
0.0008883309201337397,
0.037938423454761505,
-0.001997893676161766,
-0.0006103729247115552,
0.009756891056895256,
-0.018152356147766113,
-0.002414263319224119,
0.037865813821554184,
0.024433070793747902,
-0.05914037302136421,
-0.05492902919650078,
-0.06923308223485947,
0.008744897320866585,
-0.06611087918281555,
-0.037284936755895615,
0.03913647681474686,
0.04846679046750069,
0.019767915830016136,
0.0385919064283371,
0.018769536167383194,
-0.03102237544953823,
0.057506661862134933,
0.026774724945425987,
0.0843721479177475,
0.027882017195224762,
0.026429830119013786,
-0.037829507142305374,
-0.049374405294656754,
0.007982498034834862,
-0.011317993514239788,
0.0057679107412695885,
-0.04037083685398102,
0.030423346906900406,
0.023325776681303978,
-0.03454393148422241,
-0.0122982207685709,
0.01714489981532097,
0.03545155003666878,
-0.07623989135026932,
0.002872610231861472,
0.039572134613990784,
0.006085576955229044,
-0.000179538139491342,
0.03920908644795418,
-0.06128235161304474,
0.0031675859354436398,
-0.006512157618999481,
0.027301141992211342,
0.017961755394935608,
-0.044836316257715225,
0.05108072981238365,
0.05144377425312996,
-0.006770828738808632,
-0.004696921911090612,
0.02145608328282833,
-0.08625999093055725,
0.05049985274672508,
0.011363374069333076,
-0.04959223419427872,
-0.007655756082385778,
-0.03309174254536629,
-0.003174393204972148,
0.013332905247807503,
-0.04745025560259819,
0.027591580525040627,
-0.002999676624312997,
0.023380232974886894,
-0.03452577814459801,
-0.07928948849439621,
0.009584443643689156,
-0.020657381042838097,
0.023380232974886894,
0.02924344502389431,
0.024487527087330818,
-0.023834042251110077,
-0.015638254582881927,
0.05133486166596413,
-0.004435981623828411,
-0.002384765772148967,
0.012833715416491032,
-0.023452842608094215,
0.029061920940876007,
0.018769536167383194,
-0.026829181239008904,
0.013060620054602623,
-0.043238911777734756,
0.014748788438737392,
0.015556568279862404,
-0.038011033087968826,
0.07580423355102539,
-0.010682661086320877,
0.04799482598900795,
-0.04011670500040054,
-0.02367067150771618,
0.04091540724039078,
0.005881363060325384,
-0.005463859066367149,
-0.006444086320698261,
-0.006026581861078739,
-0.07500553131103516,
-0.07239159196615219,
-0.017616860568523407,
0.0508992038667202,
0.09424702823162079,
-0.043638262897729874,
0.009321234188973904,
0.02668396197259426,
0.016355272382497787,
-0.03695819526910782,
-0.06269823759794235,
-0.008790277875959873,
0.044800013303756714,
0.0013466778909787536,
0.011009403504431248,
0.004846679046750069,
0.05612708255648613,
0.03764798492193222,
0.006734523922204971,
-0.026284610852599144,
-0.03939061239361763,
0.03409012407064438,
0.01330567616969347,
-0.009883957915008068,
-0.01807066984474659,
-0.05231508985161781,
0.07682076841592789,
-0.01964084804058075,
0.053041182458400726,
-0.02091151289641857,
-0.03490697965025902,
-0.02668396197259426,
0.03659514710307121,
0.04672416299581528,
-0.051843125373125076,
-0.07427943497896194,
0.024850575253367424,
0.060447342693805695,
0.004102432169020176,
-0.04037083685398102,
0.032165974378585815,
-0.02045770362019539,
0.03265608847141266,
0.03978996351361275,
-0.016200976446270943,
-0.062153663486242294,
0.03009660542011261,
-0.014921235851943493,
0.02691994234919548,
-0.014567265287041664,
-0.009044410660862923,
0.049447014927864075,
0.0010301461443305016,
-0.015111835673451424,
-0.03632286190986633,
0.001604214427061379,
0.030586719512939453,
0.0707215741276741,
-0.03815625235438347,
0.02196435071527958,
-0.0008701785118319094,
0.037974726408720016,
0.04814004525542259,
-0.005600001662969589,
0.03884604200720787,
-0.0029611028730869293,
-0.040189314633607864,
-0.01690891943871975,
0.06607457250356674,
-0.021601302549242973,
0.009893033653497696,
0.023489147424697876
] |
52,294 |
flexget.manager
|
hash_config
| null |
def hash_config(self) -> Optional[str]:
if not self.config_path:
return None
sha1_hash = hashlib.sha1()
with open(self.config_path, 'rb') as f:
while True:
data = f.read(65536)
if not data:
break
sha1_hash.update(data)
return sha1_hash.hexdigest()
|
(self) -> Optional[str]
|
[
-0.005241015926003456,
-0.06468399614095688,
0.042071472853422165,
-0.006298178341239691,
-0.018195733428001404,
-0.013151814229786396,
-0.04508169740438461,
-0.012014021165668964,
0.010580580681562424,
-0.006437042728066444,
0.01859888806939125,
-0.023132143542170525,
-0.0030639786273241043,
0.03293329104781151,
0.026231957599520683,
-0.007140324451029301,
0.018401790410280228,
-0.006051805801689625,
0.018993083387613297,
-0.006320575717836618,
0.02257668413221836,
-0.03941960632801056,
-0.008829096332192421,
0.03812951222062111,
0.002848962554708123,
-0.014558377675712109,
0.09360364824533463,
-0.010535785928368568,
-0.010311811231076717,
0.008201966062188148,
0.000171900843270123,
-0.018545133993029594,
0.024601418524980545,
0.042931538075208664,
0.015060082077980042,
-0.04364825785160065,
0.039992984384298325,
0.04905949532985687,
-0.060742031782865524,
-0.03209114447236061,
0.01650248095393181,
0.015427401289343834,
0.02741454541683197,
-0.04174894839525223,
-0.020372770726680756,
0.06511402130126953,
-0.08084603399038315,
0.08134773373603821,
-0.057624299079179764,
-0.015705130994319916,
0.0027324955444782972,
0.030890638008713722,
-0.07360716164112091,
0.05214139074087143,
0.05042126029729843,
-0.012417176738381386,
0.024189304560422897,
-0.05583249777555466,
0.010822474025189877,
0.030765211209654808,
-0.011377932503819466,
-0.00505735632032156,
0.09639886021614075,
-0.02687700465321541,
0.008027265779674053,
-0.03395461663603783,
-0.06106455624103546,
0.04142642393708229,
0.04551173001527786,
-0.04074554145336151,
0.03103398159146309,
0.018133020028471947,
-0.027289118617773056,
-0.019924819469451904,
-0.014101468957960606,
-0.017873208969831467,
0.0012229037238284945,
0.0414980947971344,
0.032557010650634766,
0.006150354631245136,
-0.01834803633391857,
-0.027002431452274323,
0.025568991899490356,
-0.06156625971198082,
-0.0008163890452124178,
0.01353705208748579,
0.050457097589969635,
0.019082672894001007,
0.011315219104290009,
0.0001053382657119073,
0.07396551966667175,
0.05163968726992607,
-0.019082672894001007,
0.0022487095557153225,
0.08442962914705276,
-0.05869938060641289,
0.007297107018530369,
0.014898819848895073,
0.0501345731317997,
-0.049346182495355606,
-0.031786538660526276,
0.014074591919779778,
-0.0068536363542079926,
0.011700456030666828,
-0.008358748629689217,
-0.0254973191767931,
0.013089101761579514,
0.009666763246059418,
0.008999316953122616,
-0.010060958564281464,
-0.022845454514026642,
-0.031517770141363144,
0.004226408898830414,
-0.043110717087984085,
0.08880162239074707,
-0.004663160536438227,
0.006289219483733177,
0.011342096142470837,
0.02413555048406124,
-0.006898431573063135,
0.027002431452274323,
0.05744512006640434,
-0.021250752732157707,
0.010060958564281464,
0.036803580820560455,
0.0509946383535862,
-0.03945544362068176,
-0.03320205956697464,
-0.0207490473985672,
-0.023580092936754227,
0.03823702037334442,
0.09317361563444138,
0.029260098934173584,
-0.005998051725327969,
0.0037650205194950104,
-0.05092296749353409,
0.013196609914302826,
0.039204590022563934,
0.02368760108947754,
0.03726944699883461,
0.059881966561079025,
-0.04400661587715149,
-0.01015950832515955,
-0.043361566960811615,
0.052786439657211304,
0.019602295011281967,
-0.042680684477090836,
-0.03205530717968941,
-0.014074591919779778,
0.031356506049633026,
0.05146050453186035,
-0.017783619463443756,
-0.03483260050415993,
0.02144785039126873,
-0.015033205039799213,
-0.012569479644298553,
-0.006831238977611065,
0.02266627363860607,
-0.04124724492430687,
-0.04597759619355202,
0.027378709986805916,
-0.03812951222062111,
0.09102346003055573,
-0.037412792444229126,
-0.09217020869255066,
-0.02309630624949932,
-0.03141026198863983,
0.027539972215890884,
0.031266916543245316,
-0.04472333565354347,
-0.02913467399775982,
-0.04296737164258957,
-0.01694147288799286,
0.016968348994851112,
0.008618559688329697,
0.013761026784777641,
-0.023454666137695312,
-0.001440159510821104,
0.007642028387635946,
-0.032915372401475906,
-0.07170785218477249,
-0.04895198717713356,
0.02483435347676277,
0.027898332104086876,
0.05120965465903282,
0.05819767713546753,
0.021322423592209816,
0.015033205039799213,
0.04991955682635307,
-0.02836420014500618,
-0.03001265600323677,
-0.04117557406425476,
-0.05490076169371605,
0.02992306649684906,
0.0908084437251091,
-0.056083351373672485,
-0.014361280016601086,
-0.009182976558804512,
-0.02135826088488102,
-0.02447599358856678,
0.00920985359698534,
-0.05034958943724632,
-0.017523808404803276,
-0.01910059154033661,
0.0090754684060812,
-0.04705267772078514,
0.037556134164333344,
0.013062224723398685,
-0.005290290340781212,
0.07704741507768631,
-0.01574096642434597,
-0.06163793057203293,
-0.052965618669986725,
0.03827285394072533,
-0.015794720500707626,
-0.030836883932352066,
0.008139252662658691,
0.02352633886039257,
-0.039742130786180496,
0.03415171429514885,
0.044329140335321426,
-0.007897360250353813,
0.09052175283432007,
0.016565194353461266,
0.012766577303409576,
0.002133362228050828,
-0.007673385087400675,
-0.012954716570675373,
0.010598499327898026,
-0.051496341824531555,
0.06984438002109528,
-0.01599181815981865,
0.05665672570466995,
0.03338124230504036,
0.04633595794439316,
0.01197818573564291,
-0.001744765555486083,
-0.027020350098609924,
-0.010947899892926216,
0.0220570620149374,
-0.04196396470069885,
-0.013572887517511845,
0.04056635871529579,
0.04296737164258957,
0.0190110020339489,
-0.05375400930643082,
-0.004056188277900219,
0.047948576509952545,
-0.025013532489538193,
-0.038523707538843155,
0.00616379315033555,
0.03877456113696098,
-0.02411763370037079,
-0.004315999336540699,
0.02481643483042717,
-0.018903493881225586,
-0.004228648729622364,
-0.031195243820548058,
0.04253733903169632,
0.01659207046031952,
0.04590592533349991,
-0.0726037472486496,
0.009756352752447128,
-0.023347157984972,
-0.004878176376223564,
-0.008596162311732769,
-0.0019194661872461438,
0.026841169223189354,
-0.0285433791577816,
0.025909433141350746,
0.022039145231246948,
0.02110740728676319,
-0.025228548794984818,
-0.05493659898638725,
0.018616804853081703,
-0.04701684042811394,
0.05730177462100983,
0.01729983277618885,
0.05758846178650856,
0.034904271364212036,
-0.007839126512408257,
-0.036355629563331604,
0.06844677031040192,
-0.01635017804801464,
0.018365953117609024,
0.10456947237253189,
-0.05113798379898071,
-0.06511402130126953,
-0.006741649005562067,
0.0363018736243248,
0.01650248095393181,
-0.023938452824950218,
-0.07496892660856247,
-0.017326708883047104,
0.047697726637125015,
-0.016403932124376297,
0.0006937626749277115,
-0.000015328292647609487,
0.0501704104244709,
-0.022272078320384026,
-0.0683034285902977,
0.0285433791577816,
-0.08543304353952408,
-0.016618948429822922,
-0.04640762880444527,
-0.021322423592209816,
0.001414402388036251,
-0.03769947960972786,
0.035674743354320526,
0.009326321072876453,
-0.007503164000809193,
-0.004757230170071125,
0.032736193388700485,
0.010912064462900162,
0.03787865862250328,
-0.02015775442123413,
0.04554756358265877,
0.0268053337931633,
0.013572887517511845,
0.010688088834285736,
-0.041999801993370056,
0.07511226832866669,
-0.00791079830378294,
-0.03924042731523514,
0.018455544486641884,
-0.055044107139110565,
0.04425746947526932,
-0.004587009083479643,
-0.029188428074121475,
0.04852195456624031,
-0.02481643483042717,
0.005245495587587357,
0.07468223571777344,
-0.015454278327524662,
0.0037605410907417536,
-0.03336332365870476,
0.04002882167696953,
0.016798127442598343,
-0.03820118308067322,
-0.0717795193195343,
0.050385426729917526,
-0.054685745388269424,
0.05343148484826088,
0.0038389323744922876,
0.0015095918206498027,
0.019064756110310555,
-0.016403932124376297,
-0.009451746940612793,
-0.06038367375731468,
-0.04479501023888588,
0.009371115826070309,
0.011109162122011185,
0.018115101382136345,
0.015060082077980042,
0.056585054844617844,
-0.017586519941687584,
-0.05239224061369896,
0.005429155193269253,
-0.007834646850824356,
0.052786439657211304,
-0.005155905615538359,
-0.03820118308067322,
-0.02135826088488102,
0.009106825105845928,
-0.018903493881225586,
0.05844852700829506,
-0.09066509455442429,
0.06285635381937027,
0.021161161363124847,
-0.015696171671152115,
-0.05543830245733261,
0.028561297804117203,
0.006468399427831173,
-0.10098586976528168,
0.054506566375494,
-0.0181598961353302,
-0.038953740149736404,
-0.0022207126021385193,
-0.0067102923057973385,
-0.004468302242457867,
0.006755087524652481,
0.025999022647738457,
0.004293601494282484,
-0.001031405059620738,
-0.055044107139110565,
0.019817311316728592,
0.011162916198372841,
-0.07475391030311584,
0.03395461663603783,
0.04902365803718567,
-0.014298566617071629,
0.021501604467630386,
-0.023544257506728172,
0.012300709262490273,
-0.014504623599350452,
0.03588975965976715,
0.01258739735931158,
0.06106455624103546,
-0.0363197922706604,
0.01617995649576187,
0.018652642145752907,
-0.04859362542629242,
0.037305284291505814,
0.03820118308067322,
-0.014468788169324398,
-0.01608140766620636,
0.0035656827967613935,
0.023490503430366516,
0.016475604847073555,
-0.031356506049633026,
-0.05801849439740181,
-0.0012161844642832875,
0.001673093531280756,
0.022522930055856705,
0.024189304560422897,
-0.0037023075856268406,
-0.004163695964962244,
-0.0614229179918766,
0.02879423089325428,
0.030317261815071106,
-0.038057841360569,
0.018383871763944626,
-0.04393494501709938,
0.0280954297631979,
0.02791624888777733,
0.07335630804300308,
-0.007982471026480198,
0.0493103452026844,
-0.06077786907553673,
-0.005684486590325832,
-0.0029161551501601934,
0.02777290530502796,
0.047876905649900436,
0.0036731907166540623,
0.002521958900615573,
-0.03261076658964157,
0.027790823951363564,
-0.06507819145917892,
0.004587009083479643,
-0.006804361939430237,
0.02221832424402237,
0.003980036359280348,
-0.011109162122011185,
0.020784884691238403,
0.02472684532403946,
0.048127759248018265,
-0.05687174201011658,
-0.0311414897441864,
0.06321471929550171,
-0.0259452685713768,
-0.0847879946231842,
-0.03683941438794136,
-0.06077786907553673,
-0.05493659898638725,
0.009371115826070309,
-0.01868847757577896,
-0.04479501023888588,
-0.010947899892926216,
-0.03560307249426842,
0.01782841421663761,
-0.022791700437664986,
0.04576257988810539,
0.05110214650630951,
-0.004056188277900219,
0.0013147335266694427,
-0.13381165266036987,
0.02861505188047886,
0.059272754937410355,
0.010150549001991749,
0.01876015029847622,
0.02662615291774273,
-0.009451746940612793,
-0.0657590702176094,
0.09446371346712112,
-0.00272577628493309,
-0.025049369782209396,
0.01548115536570549,
0.06002531200647354,
-0.028561297804117203,
-0.017523808404803276,
-0.012614274397492409,
0.015167590230703354,
-0.0190289206802845,
-0.012730741873383522,
0.04626428708434105,
-0.05697925016283989,
0.009218812920153141,
-0.027092020958662033,
0.008197486400604248,
0.006195149850100279,
-0.015418441966176033,
-0.008905247785151005,
-0.05196221172809601,
0.002003456698730588,
-0.012417176738381386,
0.015543867833912373,
0.03916875645518303,
0.024422239512205124,
-0.013420584611594677,
-0.003684389404952526,
-0.004253285937011242,
-0.00856480561196804,
0.05135300010442734,
0.02497769705951214,
-0.004900573752820492,
0.008013826794922352,
-0.06984438002109528,
-0.004918491933494806,
-0.03352458402514458,
0.028041675686836243,
-0.03752030059695244,
-0.04425746947526932,
0.0051021515391767025,
0.04020800068974495,
0.0006108919624239206,
0.014737557619810104,
0.004159216769039631,
-0.01790008507668972,
-0.009550295770168304,
0.004396629985421896,
-0.06712084263563156,
0.03709026798605919,
0.01106436736881733,
-0.024440156295895576,
-0.05518745258450508,
-0.023848863318562508,
0.08528969436883926,
-0.09152515977621078,
-0.05110214650630951,
0.03967045992612839,
-0.001180348452180624,
-0.0008583843591623008,
-0.02273794636130333,
0.03642730042338371,
0.014997368678450584,
0.004564611241221428,
-0.05092296749353409,
0.018097182735800743,
-0.06375225633382797,
-0.05525912344455719,
-0.007740577682852745,
-0.09912239760160446,
0.03026350773870945,
-0.0035432851873338223,
-0.049597032368183136,
0.01650248095393181,
0.03673190623521805,
0.04762605205178261,
-0.001543188001960516,
-0.034295059740543365,
0.013223486952483654,
0.014208977110683918,
0.0821361318230629,
-0.02386678010225296,
0.021662866696715355,
-0.11288342624902725,
0.05554581061005592,
-0.033936697989702225,
0.012166324071586132,
0.035423893481492996,
0.015579704195261002,
0.016314342617988586,
-0.029815558344125748,
0.00791527796536684,
-0.005872625857591629,
-0.008681273087859154,
-0.020981982350349426,
-0.019745640456676483,
-0.001440159510821104,
0.007404615171253681,
-0.0020269742235541344,
0.08528969436883926,
0.0090799480676651,
-0.024189304560422897,
0.007745056878775358,
-0.014074591919779778,
0.05024208128452301,
0.021895799785852432,
0.01660102978348732,
-0.0067102923057973385,
-0.006795403081923723,
-0.02662615291774273,
0.021770374849438667,
0.04174894839525223,
-0.004730353131890297,
-0.016887718811631203,
0.01876015029847622,
0.02318589575588703,
-0.09761728346347809,
0.018616804853081703,
-0.05249974876642227,
-0.03572849929332733,
0.0019429834792390466,
-0.02655448205769062,
0.01953062415122986,
0.00856480561196804,
0.021644948050379753,
-0.07410886138677597,
0.029385525733232498,
0.04655097424983978,
-0.016878759488463402,
-0.026321547105908394,
0.026393219828605652,
0.052356407046318054,
0.00008140093268593773,
0.03094439208507538,
-0.0022285517770797014,
0.00139424460940063,
-0.027898332104086876,
0.0015779042150825262,
0.011539194732904434,
0.023042552173137665,
0.025551073253154755,
-0.013707272708415985,
0.01764027401804924,
0.047697726637125015,
0.020336933434009552,
-0.012381340377032757,
-0.05171135812997818,
0.03268243744969368,
-0.015382605604827404,
0.03606894239783287,
-0.04278819262981415,
0.020390687510371208,
-0.030120164155960083,
-0.0006327294977381825,
-0.019566459581255913,
0.026769496500492096,
-0.017658192664384842,
-0.014943614602088928,
0.012668028473854065,
-0.02316797897219658,
0.04020800068974495,
-0.01704898104071617,
0.026052776724100113,
-0.027199529111385345,
0.012802413664758205,
0.033434994518756866,
0.003489531110972166,
-0.00020689694792963564,
0.03934793546795845,
-0.021931637078523636,
-0.02619612030684948,
-0.006557989399880171,
0.010921022854745388,
0.049847885966300964,
0.0027660918422043324,
-0.031087735667824745,
-0.0031110134441405535,
-0.06145875155925751,
-0.03096231073141098,
-0.06342973560094833,
0.028041675686836243,
0.01625162921845913,
0.027701234444975853,
-0.035853926092386246,
0.015955982729792595,
0.020462360233068466,
-0.052965618669986725,
-0.06980854272842407,
-0.014298566617071629,
-0.028937576338648796,
-0.050385426729917526,
-0.005729281809180975,
-0.010983736254274845,
-0.042071472853422165,
-0.012605315074324608,
-0.03535222262144089,
-0.004358554258942604,
-0.047088515013456345,
0.007194078527390957,
-0.025282302871346474,
0.002600350184366107,
0.0009619728079997003,
0.02169870212674141,
-0.03683941438794136,
-0.03452799469232559,
0.037305284291505814,
-0.0007587154395878315,
-0.03651688992977142,
0.004378712270408869,
0.024959778413176537,
-0.023400912061333656,
-0.009200895205140114,
0.007615151349455118,
0.0280954297631979,
0.030496442690491676,
-0.0026563440915197134,
0.016493521630764008,
0.06246216222643852,
-0.060491181910037994,
0.004914012271910906,
-0.017147529870271683,
0.022594602778553963,
0.011870677582919598,
-0.013214527629315853,
0.04640762880444527,
0.049489524215459824,
-0.0006411285721696913,
-0.03787865862250328,
0.01868847757577896,
0.0103745236992836,
0.010535785928368568,
0.03053227812051773,
0.0010510028805583715,
-0.026446973904967308,
0.009169538505375385,
0.028991330415010452,
-0.05493659898638725,
0.030836883932352066,
-0.01193339005112648,
0.023311322554945946,
0.010956859216094017,
0.01832115836441517,
0.01418210007250309,
0.04748271033167839,
-0.043719928711652756,
-0.03153568506240845,
-0.028077511116862297,
-0.014594214037060738,
-0.06540071219205856,
0.003541045356541872,
-0.0281133484095335,
-0.0038366925437003374,
0.0027347353752702475,
0.014898819848895073,
0.03780698776245117,
-0.01634121872484684,
0.001907147467136383,
0.056585054844617844,
-0.031016064807772636,
-0.03495802357792854,
-0.015938064083456993,
0.07919757813215256,
0.043540749698877335,
0.05464991182088852,
0.022325832396745682,
-0.017747782170772552,
-0.06113622710108757,
0.009362156502902508,
0.03078312985599041,
-0.008779821917414665,
-0.039204590022563934,
0.009917614981532097,
0.10736467689275742,
-0.07063277065753937,
0.019333526492118835,
0.05769596993923187,
-0.03409796208143234,
-0.04515336826443672,
-0.030836883932352066,
0.031428176909685135,
0.01650248095393181,
0.01868847757577896,
-0.011637743562459946,
-0.029869312420487404,
-0.012417176738381386,
0.009935532696545124,
0.035925596952438354,
0.01548115536570549,
0.01574096642434597,
-0.00934423878788948,
0.030836883932352066,
0.011207710951566696,
0.025748170912265778,
-0.011467522010207176,
0.005720322486013174,
0.011333136819303036
] |
52,295 |
flexget.manager
|
init_sqlalchemy
|
Initialize SQLAlchemy
|
def init_sqlalchemy(self) -> None:
"""Initialize SQLAlchemy"""
try:
if [int(part) for part in sqlalchemy.__version__.split('.')] < [0, 7, 0]:
print(
'FATAL: SQLAlchemy 0.7.0 or newer required. Please upgrade your SQLAlchemy.',
file=sys.stderr,
)
sys.exit(1)
except ValueError:
logger.critical('Failed to check SQLAlchemy version, you may need to upgrade it')
# SQLAlchemy
if not self.database_uri:
# in case running on windows, needs double \\
filename = self.db_filename.replace('\\', '\\\\')
self.database_uri = f'sqlite:///{filename}'
if self.db_filename and not os.path.exists(self.db_filename):
logger.verbose('Creating new database {} - DO NOT INTERRUPT ...', self.db_filename)
# fire up the engine
logger.debug('Connecting to: {}', self.database_uri)
try:
self.engine = sqlalchemy.create_engine(
self.database_uri,
echo=self.options.debug_sql,
connect_args={'check_same_thread': False, 'timeout': 10},
)
except ImportError as e:
print(
'FATAL: Unable to use SQLite. Are you running Python 2.7, 3.3 or newer ?\n'
'Python should normally have SQLite support built in.\n'
'If you\'re running correct version of Python then it is not equipped with SQLite.\n'
'You can try installing `pysqlite`. If you have compiled python yourself, '
'recompile it with SQLite support.\n'
f'Error: {e}',
file=sys.stderr,
)
sys.exit(1)
Session.configure(bind=self.engine)
# create all tables, doesn't do anything to existing tables
try:
Base.metadata.create_all(bind=self.engine)
except OperationalError as e:
if os.path.exists(self.db_filename):
print(
f'{e.message} - make sure you have write permissions to file {self.db_filename}',
file=sys.stderr,
)
else:
print(
f'{e.message} - make sure you have write permissions to directory {self.config_base}',
file=sys.stderr,
)
raise
|
(self) -> NoneType
|
[
0.043660834431648254,
-0.05576879531145096,
0.019765647128224373,
0.012508888728916645,
0.03608333319425583,
-0.06326611340045929,
-0.03035009279847145,
0.06346657127141953,
-0.024937592446804047,
-0.032294582575559616,
-0.009917904622852802,
0.01017850637435913,
0.012348518706858158,
0.04053360968828201,
0.01469393540173769,
0.036183565855026245,
-0.019595254212617874,
0.029848935082554817,
-0.03315657377243042,
-0.05260147899389267,
0.011115671135485172,
0.07437175512313843,
-0.05809416621923447,
0.014142661355435848,
0.02884661965072155,
0.07862157374620438,
-0.07653675973415375,
0.06342647969722748,
0.07826074212789536,
-0.027864351868629456,
0.021890554577112198,
0.007021215278655291,
0.050596851855516434,
0.045264534652233124,
0.052160460501909256,
-0.01160680502653122,
0.005347349680960178,
-0.0015122424811124802,
0.008304177783429623,
0.0010148436995223165,
0.042698610574007034,
-0.012508888728916645,
0.023233657702803612,
0.003924062475562096,
-0.00966732669621706,
0.001349366270005703,
0.007647661957889795,
-0.02297305501997471,
0.027443379163742065,
0.017921388149261475,
0.022692406550049782,
0.05063694342970848,
0.048391759395599365,
0.06655370444059372,
-0.06599240750074387,
0.0084996297955513,
-0.060780368745326996,
0.018993865698575974,
-0.04153592512011528,
-0.007326920982450247,
0.026501202955842018,
0.04927379637956619,
0.012759467586874962,
-0.0009139858302660286,
0.024697037413716316,
-0.044502776116132736,
-0.06386750191450119,
-0.015846597030758858,
0.031993888318538666,
0.0020735387224704027,
-0.01956518553197384,
0.02525833249092102,
0.015846597030758858,
0.004172135144472122,
-0.029468055814504623,
0.03191370144486427,
-0.03758680447936058,
-0.02555902674794197,
0.03690522909164429,
-0.0285459253937006,
-0.038629211485385895,
0.014443356543779373,
-0.0011157016269862652,
0.04746962711215019,
0.0861990749835968,
0.03776722028851509,
-0.019915994256734848,
0.06539101898670197,
0.004492876119911671,
-0.0080485874786973,
-0.04602629691362381,
0.02321361005306244,
0.040493518114089966,
0.039350878447294235,
0.026541296392679214,
-0.03866930678486824,
0.010103332810103893,
-0.00047860530321486294,
0.03909027576446533,
-0.0113762728869915,
-0.04157601669430733,
-0.0009440552676096559,
-0.014724004082381725,
-0.03291601687669754,
-0.06394768506288528,
-0.04205713048577309,
-0.027924491092562675,
-0.03840870410203934,
-0.0066403355449438095,
-0.071084164083004,
-0.09526000171899796,
-0.03403861075639725,
0.06703481078147888,
-0.00619430560618639,
-0.010188530199229717,
-0.07092379778623581,
0.012649212963879108,
-0.01011335663497448,
0.04321981593966484,
-0.008153830654919147,
-0.005713194143027067,
0.019855856895446777,
0.004239791538566351,
0.044141944497823715,
0.05308259278535843,
0.07417129725217819,
0.01558599527925253,
-0.03129226714372635,
0.023955322802066803,
-0.008865474723279476,
0.08812351524829865,
0.006715509109199047,
-0.007326920982450247,
0.000012010158570774365,
0.012128009460866451,
-0.01358136534690857,
0.0038263367023319006,
0.02209101803600788,
-0.06045962870121002,
-0.0485922209918499,
-0.01271937508136034,
-0.05272175744175911,
-0.0018129368545487523,
0.0016425433568656445,
-0.006189293693751097,
0.05757296085357666,
-0.08114740252494812,
-0.010454143397510052,
-0.029909074306488037,
-0.048993147909641266,
0.075374074280262,
-0.06875879317522049,
-0.02604013867676258,
0.00007544767868239433,
-0.05869555473327637,
0.0030395195353776217,
-0.019825786352157593,
-0.03574254736304283,
0.057372499257326126,
0.0008776519098319113,
-0.0019081567879766226,
-0.01271937508136034,
-0.012869722209870815,
-0.02130921185016632,
-0.042698610574007034,
-0.04241796210408211,
-0.06895925849676132,
-0.06306564807891846,
0.0045154280960559845,
-0.024636898189783096,
-0.008454524911940098,
0.02387513779103756,
0.06278499960899353,
0.03744648024439812,
-0.04273870214819908,
0.008259073831140995,
0.052040185779333115,
-0.03071092627942562,
0.015545902773737907,
0.006615277845412493,
0.023293795064091682,
-0.06110110878944397,
-0.04642722010612488,
0.0003504969645291567,
0.03095148131251335,
0.060299258679151535,
-0.015465717762708664,
0.054726388305425644,
0.048271480947732925,
0.026882082223892212,
-0.028044767677783966,
-0.011195856146514416,
-0.01044412050396204,
0.05476647987961769,
0.03173328563570976,
0.04065388813614845,
0.014563634060323238,
0.012518911622464657,
-0.013180439360439777,
0.009206261485815048,
0.02896689809858799,
0.05208027735352516,
0.02076796256005764,
-0.05905638635158539,
0.003485549706965685,
-0.06286518275737762,
-0.0049313888885080814,
0.016247522085905075,
-0.021589860320091248,
-0.05905638635158539,
0.0025709373876452446,
-0.056650832295417786,
-0.05260147899389267,
0.025779535993933678,
-0.01044412050396204,
-0.018953772261738777,
0.06923990696668625,
0.014623773284256458,
0.02513805590569973,
0.06948046386241913,
0.01993604190647602,
0.0026360878255218267,
-0.01855284720659256,
-0.01867312379181385,
0.026200508698821068,
-0.013751759193837643,
-0.03225449100136757,
-0.007201632019132376,
-0.002035951940342784,
-0.0030871296767145395,
-0.010624537244439125,
0.023073285818099976,
0.031633056700229645,
-0.015636110678315163,
0.04041333124041557,
0.013531249947845936,
-0.026942221447825432,
0.03961148113012314,
-0.005562847014516592,
-0.04217740520834923,
0.044382497668266296,
0.02842564694583416,
-0.015465717762708664,
0.016728634014725685,
-0.02758370339870453,
-0.01071474514901638,
0.006364698987454176,
0.02321361005306244,
-0.04795074090361595,
-0.050596851855516434,
-0.06623296439647675,
-0.0028741376008838415,
0.03870939835906029,
-0.009762546047568321,
-0.046467315405607224,
-0.021830417215824127,
0.028145000338554382,
0.030730972066521645,
0.018512753769755363,
-0.02908717468380928,
0.009817673824727535,
0.027142684906721115,
-0.04783046245574951,
0.03834856301546097,
0.00933155044913292,
-0.04285898059606552,
-0.020397106185555458,
-0.02543875016272068,
-0.007081354036927223,
-0.040673933923244476,
0.08122759312391281,
0.02728300914168358,
-0.042097222059965134,
0.014553611166775227,
0.011346203275024891,
-0.05372407287359238,
-0.00921628437936306,
-0.05905638635158539,
-0.07200629264116287,
-0.008033553138375282,
-0.010058228857815266,
-0.006725532468408346,
0.019895948469638824,
0.03882967680692673,
-0.01603703759610653,
0.014563634060323238,
-0.08122759312391281,
-0.04410185292363167,
0.035101063549518585,
-0.024616850540041924,
0.012789537198841572,
-0.04237787052989006,
-0.0080485874786973,
0.00580340251326561,
-0.004182158503681421,
0.006489988416433334,
-0.008995775133371353,
0.004755983594805002,
0.033056341111660004,
-0.0825907364487648,
0.03417893499135971,
0.0038589120376855135,
0.020968426018953323,
0.07878194004297256,
-0.0052872104570269585,
-0.0020484807901084423,
0.0053874421864748,
0.038027822971343994,
-0.012819605879485607,
-0.011807268485426903,
0.02471708320081234,
-0.012779513373970985,
0.053964629769325256,
0.02303319424390793,
0.03957138955593109,
-0.03331694379448891,
-0.005537789314985275,
-0.047990832477808,
-0.01838245429098606,
0.031512778252363205,
-0.05003555491566658,
0.08082666248083115,
0.012097939848899841,
-0.016016989946365356,
0.03866930678486824,
-0.06899935007095337,
0.06426842510700226,
-0.0011470239842310548,
0.0012203182559460402,
0.007727846968919039,
-0.028084861114621162,
-0.0006903443136252463,
0.047990832477808,
0.04358064755797386,
-0.0020635155960917473,
0.028525879606604576,
-0.03622365742921829,
-0.019835809245705605,
0.0099379513412714,
-0.03309643641114235,
0.030390184372663498,
0.0016463020583614707,
-0.01071474514901638,
0.013571342453360558,
0.012148055247962475,
-0.01998615637421608,
0.01071474514901638,
-0.043179720640182495,
-0.022171203047037125,
-0.003686012700200081,
-0.005878576077520847,
-0.01169701386243105,
-0.0801851823925972,
0.009441805072128773,
-0.05560842528939247,
-0.09165166318416595,
-0.02555902674794197,
-0.018452614545822144,
0.04446268454194069,
-0.029668517410755157,
0.002316600177437067,
0.035040926188230515,
-0.03353745490312576,
0.001529783010482788,
-0.028024721890687943,
-0.03381809964776039,
-0.047549813985824585,
0.0233940277248621,
-0.005708182696253061,
0.02537861093878746,
0.0467880554497242,
-0.0746924951672554,
0.04071402549743652,
0.07397083193063736,
0.01621745340526104,
-0.05412499979138374,
-0.021930648013949394,
-0.013441041111946106,
-0.023554397746920586,
0.014834258705377579,
-0.0251981932669878,
0.01338090281933546,
0.021048611029982567,
0.013210508972406387,
0.011777198873460293,
-0.05332314595580101,
0.07429157197475433,
-0.04795074090361595,
0.03939097002148628,
0.03987208381295204,
-0.03758680447936058,
0.019304582849144936,
0.04213731363415718,
0.022792639210820198,
0.0400925911962986,
0.06082046031951904,
0.05773333087563515,
0.052761852741241455,
0.015636110678315163,
0.012428703717887402,
-0.011616828851401806,
-0.060780368745326996,
0.08363314718008041,
0.03901009261608124,
0.047188982367515564,
0.01388205960392952,
0.06984129548072815,
0.0003254390903748572,
0.022010833024978638,
0.03251509368419647,
-0.036845091730356216,
0.006765624973922968,
-0.08182898163795471,
0.006885902490466833,
-0.03476027771830559,
-0.0002159675204893574,
0.052761852741241455,
0.04570555314421654,
0.035882871598005295,
0.029287638142704964,
0.04422212764620781,
0.016237499192357063,
0.04734935238957405,
0.020788008347153664,
-0.029107222333550453,
0.07810036838054657,
-0.023774906992912292,
0.032956112176179886,
-0.010824999772012234,
0.04265851899981499,
0.003733622608706355,
-0.015826551243662834,
0.026621481403708458,
0.028525879606604576,
0.02011645771563053,
-0.012378587387502193,
-0.0016287615289911628,
-0.025579074397683144,
-0.04602629691362381,
-0.03919050842523575,
0.012919837608933449,
-0.02052740752696991,
0.03502088040113449,
0.007472256664186716,
0.0024594299029558897,
-0.0188435185700655,
-0.0012979976600036025,
0.005447580944746733,
0.0349406935274601,
0.044863611459732056,
-0.04023291543126106,
-0.018863564357161522,
0.013771804980933666,
0.02567930519580841,
0.0007009939290583134,
-0.002315347082912922,
-0.043059442192316055,
0.03604324162006378,
0.04935397952795029,
0.05208027735352516,
-0.002711261622607708,
0.015255231410264969,
0.02634083293378353,
-0.023614536970853806,
-0.0033377083018422127,
-0.03165310248732567,
0.015245208516716957,
-0.04654749855399132,
-0.013120301067829132,
-0.006505023222416639,
0.05536786839365959,
0.01998615637421608,
0.04939407482743263,
0.0051143113523721695,
-0.04482351616024971,
-0.011887453496456146,
0.013841967098414898,
-0.0254988893866539,
0.04995536804199219,
-0.028946852311491966,
0.03203397989273071,
0.03530152887105942,
0.0107748843729496,
0.004956446588039398,
-0.0509977787733078,
-0.06045962870121002,
0.06486981362104416,
-0.06695462763309479,
-0.002578454790636897,
-0.006850821431726217,
-0.010784907266497612,
0.008269096724689007,
0.048872869461774826,
0.01002314779907465,
0.009882823564112186,
-0.06142185255885124,
-0.005998854059726,
-0.0075975460931658745,
0.011526620015501976,
-0.0067956941202282906,
0.016498101875185966,
-0.004440254531800747,
-0.0033577545545995235,
0.05011574178934097,
0.011235948652029037,
0.04783046245574951,
-0.02712263911962509,
-0.03451972082257271,
-0.02992912009358406,
-0.01855284720659256,
-0.0006533839623443782,
-0.028866665437817574,
-0.056049443781375885,
-0.04289907217025757,
0.025579074397683144,
0.010098321363329887,
-0.0080485874786973,
0.017750995233654976,
-0.024997731670737267,
-0.0034805380273610353,
0.03233467414975166,
0.02167004533112049,
0.0021349305752664804,
-0.004958952311426401,
-0.04626685008406639,
-0.040132682770490646,
0.05195999890565872,
0.001227209228090942,
0.08716129511594772,
0.022712454199790955,
0.000057633100368548185,
-0.008910578675568104,
-0.020507359877228737,
-0.03476027771830559,
0.04137555509805679,
-0.01394219882786274,
-0.048512037843465805,
-0.021589860320091248,
0.007762928027659655,
-0.0485922209918499,
0.052280738949775696,
-0.0038463829550892115,
-0.05127842351794243,
-0.075374074280262,
-0.022712454199790955,
-0.0734897181391716,
-0.03524138778448105,
0.012218217365443707,
-0.021168889477849007,
-0.03532157465815544,
0.007111423648893833,
0.026882082223892212,
0.004821134265512228,
0.016267569735646248,
0.01926449127495289,
-0.05031620338559151,
0.06298546493053436,
0.03866930678486824,
0.015375508926808834,
0.030811157077550888,
-0.04241796210408211,
-0.011416365392506123,
-0.029347777366638184,
-0.001641290495172143,
-0.007221678271889687,
0.004923871252685785,
0.0022527026012539864,
0.02555902674794197,
0.006770636420696974,
0.04542490839958191,
-0.020156551152467728,
0.0691998153924942,
0.014082523062825203,
0.015565948560833931,
-0.03712574020028114,
-0.05007564648985863,
-0.06414815038442612,
0.019966110587120056,
0.048391759395599365,
-0.01710951328277588,
0.027683934196829796,
-0.0546862967312336,
-0.028145000338554382,
-0.0084996297955513,
0.01670858822762966,
0.02185046300292015,
0.001212174422107637,
0.11755148321390152,
-0.02136935107409954,
-0.040012408047914505,
-0.05368398129940033,
0.033357035368680954,
0.0315929614007473,
-0.07854139059782028,
0.007472256664186716,
-0.024576758965849876,
-0.0049138483591377735,
-0.04334009066224098,
0.04582583159208298,
0.019414838403463364,
-0.1019955575466156,
0.06699471920728683,
0.01146648172289133,
-0.07757916301488876,
0.005292222369462252,
-0.004212228115648031,
-0.0062694791704416275,
0.03830847144126892,
-0.0850764811038971,
-0.0062444210052490234,
-0.0424981489777565,
0.02908717468380928,
0.008730161935091019,
0.008609884418547153,
-0.0007680237176828086,
-0.06274490803480148,
-0.07397083193063736,
0.03919050842523575,
0.07120444625616074,
-0.001980824628844857,
-0.07741879671812057,
0.010634560137987137,
-0.03694532439112663,
0.010955301113426685,
-0.04650740697979927,
0.01861298643052578,
0.012508888728916645,
-0.048391759395599365,
-0.023734813556075096,
-0.03277569264173508,
0.03341717645525932,
-0.01950504630804062,
0.02525833249092102,
-0.018883610144257545,
0.012528935447335243,
-0.02297305501997471,
0.0215497687458992,
-0.003570746397599578,
0.04075412079691887,
0.022351620718836784,
0.02998925931751728,
-0.017941435799002647,
0.06964083015918732,
-0.007792997639626265,
0.0674758329987526,
0.022692406550049782,
-0.018763333559036255,
-0.04233777895569801,
0.005838483572006226,
-0.016127245500683784,
-0.008349282667040825,
-0.011927546001970768,
0.003300121519714594,
-0.0169992595911026,
-0.021770277991890907,
-0.017340045422315598,
-0.06579194217920303,
-0.028565971180796623,
-0.020727869123220444,
0.020306898280978203,
-0.0033978470601141453,
-0.007547430228441954,
-0.008955682627856731,
0.04811111092567444,
0.058615367859601974,
0.018222082406282425,
0.01065460592508316,
0.036885183304548264,
0.017149606719613075,
0.03291601687669754,
0.033176619559526443,
0.03441949188709259,
-0.008484594523906708,
0.03945111110806465,
0.02561916597187519,
0.004866238217800856,
-0.01723981462419033,
0.016377823427319527,
0.009060925804078579,
0.011336180381476879,
-0.02591986022889614,
0.03357754647731781,
-0.027724027633666992,
-0.006685439497232437,
-0.011085601523518562,
0.03421902656555176,
-0.005617974326014519,
0.027984628453850746,
0.02938787080347538,
-0.05260147899389267,
-0.05183972045779228,
0.033256806433200836,
-0.03179342672228813,
0.025659259408712387,
-0.05260147899389267,
-0.08098703622817993,
-0.012318449094891548,
-0.035642314702272415,
-0.04097462818026543,
-0.02076796256005764,
0.03866930678486824,
0.028866665437817574,
-0.04726916551589966,
0.04065388813614845,
0.011546666733920574,
-0.015104884281754494,
-0.03261532261967659,
-0.008745196275413036,
-0.0251981932669878,
-0.03161300718784332,
-0.01143641211092472,
0.0300493985414505,
0.0045304629020392895,
-0.04394147917628288,
0.02501777745783329,
-0.0021587354131042957,
0.023835046216845512,
0.011526620015501976,
-0.04710879549384117,
-0.03387824073433876,
-0.01915423572063446,
0.01271937508136034,
-0.00012411476927809417,
-0.06402786821126938,
0.008750208653509617,
-0.05380425974726677,
-0.038629211485385895,
-0.012488842010498047,
0.024456480517983437,
0.04201703518629074,
-0.04338018596172333,
-0.0680772215127945,
-0.03810800984501839,
0.005547812208533287,
0.01196763850748539,
-0.0020998495165258646,
0.02357444353401661,
-0.016197407618165016,
-0.04297925904393196,
-0.059818148612976074,
-0.030129583552479744,
-0.001723981462419033,
-0.07681740820407867,
0.023133425042033195,
0.04763000085949898,
-0.008534710854291916,
0.015455693937838078,
0.007637638598680496,
-0.016798796132206917,
0.05657064542174339,
-0.0006527575314976275,
0.0534835159778595,
0.037847407162189484,
0.04722907394170761,
0.022411758080124855,
-0.05661074072122574,
0.023173518478870392,
-0.005537789314985275,
0.0142729626968503,
-0.03303629532456398,
0.042939167469739914,
-0.035281479358673096,
0.02124907448887825,
-0.007552442140877247,
0.04193685203790665,
-0.010905184783041477,
0.054966945201158524,
0.032635368406772614
] |
52,296 |
flexget.manager
|
initialize
|
Load plugins, database, and config. Also initializes (but does not start) the task queue and ipc server.
This should only be called after obtaining a lock.
|
def initialize(self) -> None:
"""
Load plugins, database, and config. Also initializes (but does not start) the task queue and ipc server.
This should only be called after obtaining a lock.
"""
if self.initialized:
raise RuntimeError('Cannot call initialize on an already initialized manager.')
plugin.load_plugins(
extra_plugins=[os.path.join(self.config_base, 'plugins')],
extra_components=[os.path.join(self.config_base, 'components')],
)
# Reparse CLI options now that plugins are loaded
self.options = get_parser().parse_args(self.args)
self.task_queue = TaskQueue()
self.ipc_server = IPCServer(self, self.options.ipc_port)
self.setup_yaml()
self.init_sqlalchemy()
fire_event('manager.initialize', self)
try:
self.load_config()
except ValueError as e:
logger.critical('Failed to load config file: {}', e.args[0])
raise
# cannot be imported at module level because of circular references
from flexget.utils.simple_persistence import SimplePersistence
self.persist = SimplePersistence('manager')
if db_schema.upgrade_required():
logger.info('Database upgrade is required. Attempting now.')
fire_event('manager.upgrade', self)
if manager.db_upgraded:
fire_event('manager.db_upgraded', self)
fire_event('manager.startup', self)
self.initialized = True
|
(self) -> NoneType
|
[
0.034824974834918976,
-0.012868045829236507,
-0.0282303374260664,
0.00817243754863739,
0.04096611216664314,
-0.006278132554143667,
0.03525957837700844,
0.04172194376587868,
-0.08971729874610901,
-0.039794571697711945,
0.023241844028234482,
0.0008060243562795222,
-0.05056518316268921,
0.015447323210537434,
-0.015683520585298538,
-0.017554206773638725,
-0.039227697998285294,
-0.0035689459182322025,
-0.021446742117404938,
-0.07883331179618835,
-0.031272564083337784,
0.026000631973147392,
0.04686160385608673,
0.0014608822530135512,
0.0016392114339396358,
-0.024961363524198532,
-0.026000631973147392,
-0.006410403177142143,
0.0632631704211235,
0.012008286081254482,
-0.0019876027945429087,
0.05778338387608528,
0.03202839568257332,
0.03285980969667435,
0.022486012428998947,
-0.019632745534181595,
0.029855377972126007,
0.012943629175424576,
-0.04217544570565224,
-0.02395988628268242,
0.06065554544329643,
-0.056120552122592926,
0.08676955103874207,
-0.004350760020315647,
0.0019687069579958916,
0.0112241106107831,
0.023978780955076218,
0.02751229703426361,
0.02050195261836052,
-0.007681146264076233,
-0.015277260914444923,
0.01145085971802473,
0.00289105880074203,
0.047504063695669174,
-0.06534170359373093,
0.09727562218904495,
0.023808719590306282,
-0.0028627149295061827,
-0.025301488116383553,
-0.015692969784140587,
0.0006454099784605205,
0.006117518059909344,
0.012527921237051487,
0.0065285018645226955,
0.00305167306214571,
-0.08314155787229538,
-0.023109573870897293,
-0.006537949666380882,
0.04546331614255905,
0.053475137799978256,
0.008507837541401386,
0.01634487509727478,
0.021786866709589958,
-0.019292620941996574,
0.08548463881015778,
0.03440926596522331,
-0.010364350862801075,
-0.017573101446032524,
-0.02104993164539337,
0.05343734845519066,
0.015343396924436092,
0.02635965310037136,
-0.05166114121675491,
0.01029821578413248,
0.05007389187812805,
0.0031579621136188507,
0.042326610535383224,
0.009509315714240074,
-0.019500475376844406,
-0.02787131816148758,
-0.051434390246868134,
0.021012138575315475,
0.030101023614406586,
0.0564606748521328,
0.0025509342085570097,
-0.057065341621637344,
-0.044631898403167725,
0.005144383758306503,
-0.01128079742193222,
0.00995809119194746,
-0.04708835482597351,
0.006183653604239225,
0.029269607737660408,
-0.05275709927082062,
-0.007331573870033026,
-0.06598416715860367,
-0.017072362825274467,
-0.041608572006225586,
-0.004223213065415621,
-0.0046034911647439,
-0.053361762315034866,
-0.010846193879842758,
-0.00787955243140459,
0.040134698152542114,
-0.04444294050335884,
0.006769423373043537,
-0.029212919995188713,
-0.004142906051129103,
0.09289179742336273,
-0.019056422635912895,
-0.06934762001037598,
0.06194046139717102,
0.013000315986573696,
0.0023702429607510567,
0.019538266584277153,
0.04194869473576546,
0.026510819792747498,
-0.02809806726872921,
-0.005886044353246689,
-0.06284745782613754,
0.05653626099228859,
-0.01844230853021145,
0.005399477202445269,
-0.01507885567843914,
-0.002442283323034644,
-0.023997677490115166,
0.026907632127404213,
0.0019439063034951687,
-0.007416605018079281,
0.025528237223625183,
-0.007194579113274813,
-0.0019356394186615944,
-0.025528237223625183,
-0.0402858629822731,
-0.015211125835776329,
0.04928026720881462,
-0.002548572141677141,
0.005607331171631813,
-0.01726132072508335,
-0.05921946465969086,
0.038282908499240875,
-0.07501635700464249,
-0.0172802172601223,
0.012660191394388676,
-0.02807917259633541,
0.054533302783966064,
-0.03580755740404129,
-0.01648659259080887,
0.02235374227166176,
-0.0022037236485630274,
-0.04780639708042145,
0.02798469178378582,
-0.010184841230511665,
-0.014634803868830204,
-0.04444294050335884,
-0.03869861736893654,
-0.04984714463353157,
-0.06893190741539001,
-0.02084207721054554,
0.0031579621136188507,
-0.05355072021484375,
0.0039681196212768555,
-0.05018726736307144,
0.0048703947104513645,
-0.01012815348803997,
0.040814947336912155,
0.006330095697194338,
-0.03388018533587456,
-0.019727224484086037,
0.024375593289732933,
-0.001595514826476574,
-0.02131447196006775,
-0.013945106416940689,
-0.014776522293686867,
-0.00368468277156353,
0.04671043902635574,
0.04225102812051773,
0.04905351996421814,
0.05162334814667702,
0.01157368253916502,
-0.04251556843519211,
0.014521429315209389,
-0.01739359274506569,
0.01820611208677292,
-0.0201618280261755,
0.05574263632297516,
0.0019698881078511477,
0.006920590065419674,
-0.0247346144169569,
0.01796991378068924,
0.0041570779867470264,
0.020823180675506592,
-0.00991085171699524,
-0.015579594299197197,
0.018111633136868477,
-0.05604496970772743,
-0.018281694501638412,
0.0014904069248586893,
0.0004103933461010456,
0.01347271166741848,
-0.006334819830954075,
-0.019207589328289032,
-0.05321059748530388,
0.027115484699606895,
0.025414861738681793,
-0.04765522852540016,
0.08314155787229538,
0.037942782044410706,
0.01912255771458149,
0.054760053753852844,
0.05275709927082062,
0.06197825074195862,
-0.01208386942744255,
0.0064481948502361774,
-0.07051915675401688,
0.037357013672590256,
0.01054386142641306,
-0.006334819830954075,
0.006604085210710764,
0.031612686812877655,
0.0007593752816319466,
0.013945106416940689,
-0.04580343887209892,
-0.01796046644449234,
0.02957194112241268,
0.0112241106107831,
0.03302987292408943,
0.03144262731075287,
-0.08971729874610901,
0.021597908809781075,
-0.001805730746127665,
0.015012719668447971,
0.010969016700983047,
-0.0506407655775547,
-0.010657235980033875,
-0.013340440578758717,
-0.014833210036158562,
-0.04470748454332352,
0.01236730720847845,
0.06817607581615448,
-0.02983648143708706,
-0.010506069287657738,
0.030252190306782722,
-0.022656073793768883,
-0.09221154451370239,
-0.0540798045694828,
-0.002789493650197983,
0.00736936554312706,
0.016864508390426636,
0.010137601755559444,
0.022618282586336136,
-0.04844885319471359,
-0.012905837036669254,
0.04916689544916153,
0.025169217959046364,
0.0036279952619224787,
0.015163886360824108,
-0.030308876186609268,
0.04667264595627785,
-0.0059427316300570965,
0.10649678111076355,
0.026208486407995224,
0.018848570063710213,
0.018168320879340172,
-0.01796991378068924,
-0.04546331614255905,
-0.015541802160441875,
-0.037470389157533646,
-0.053588513284921646,
0.027474505826830864,
0.02267497032880783,
0.02086097188293934,
0.03478718549013138,
-0.02465903013944626,
-0.010751714929938316,
-0.04055040702223778,
-0.02715327776968479,
-0.006013591308146715,
-0.08616488426923752,
-0.0065804654732346535,
-0.04017248749732971,
0.019405994564294815,
-0.055440302938222885,
-0.021597908809781075,
0.06360328942537308,
-0.030025439336895943,
-0.07792631536722183,
0.09221154451370239,
0.02866494096815586,
-0.02719106897711754,
0.03756486624479294,
0.008158265613019466,
-0.038150638341903687,
0.02418663538992405,
0.032992083579301834,
-0.03146152198314667,
-0.011583130806684494,
0.01796046644449234,
0.00001502991835877765,
0.031253665685653687,
0.07395819574594498,
-0.009693549945950508,
0.03372901678085327,
0.02104993164539337,
0.043800484389066696,
0.06367887556552887,
0.0311025008559227,
-0.014134065248072147,
-0.009457352571189404,
0.006646600551903248,
-0.027134381234645844,
0.07240873575210571,
0.023241844028234482,
0.04270452633500099,
0.0058954921551048756,
0.041041694581508636,
0.0189902875572443,
0.0598997138440609,
0.009287290275096893,
-0.005380581598728895,
-0.03675234690308571,
0.022996198385953903,
-0.02834371291100979,
-0.03246299922466278,
-0.019500475376844406,
-0.041268445551395416,
-0.003004433587193489,
-0.09387437999248505,
-0.008214952424168587,
-0.05914388224482536,
0.06534170359373093,
0.006197825074195862,
-0.019169798120856285,
-0.011422516778111458,
-0.01347271166741848,
-0.029987648129463196,
0.014993824064731598,
-0.04285569489002228,
0.003434313228353858,
-0.039907947182655334,
-0.005527024157345295,
-0.0017632151721045375,
-0.080647312104702,
0.011942151002585888,
-0.013208170421421528,
-0.10506069660186768,
-0.03474939242005348,
-0.06617312133312225,
0.006183653604239225,
-0.016543280333280563,
-0.03930328041315079,
0.01876353845000267,
-0.02104993164539337,
0.020067349076271057,
-0.05079193413257599,
-0.09001963585615158,
0.004728676285594702,
-0.022826137021183968,
0.08314155787229538,
-0.015343396924436092,
0.024432281032204628,
-0.056233927607536316,
0.00006532340194098651,
0.03272753953933716,
0.003958671819418669,
-0.011526443064212799,
-0.026170695200562477,
0.024696821346879005,
-0.03741370141506195,
-0.012471233494579792,
-0.021163305267691612,
0.0053191701881587505,
-0.007104823831468821,
-0.05253034830093384,
-0.06976332515478134,
-0.03722474351525307,
0.04327140003442764,
0.017138497903943062,
0.020539743825793266,
0.006434022914618254,
0.03960561379790306,
-0.0010174212511628866,
0.0018872189102694392,
0.009339253418147564,
0.0287972129881382,
0.02626517415046692,
0.03399356082081795,
0.0282114427536726,
0.024243323132395744,
-0.008115749806165695,
0.02269386686384678,
-0.05472226068377495,
0.10914219170808792,
0.022958407178521156,
0.009551831521093845,
0.009258946403861046,
0.07070811837911606,
0.04285569489002228,
0.025036945939064026,
0.07199303060770035,
-0.027266651391983032,
0.012112213298678398,
-0.0345793291926384,
-0.025717195123434067,
-0.06088229641318321,
-0.05664963275194168,
0.033218830823898315,
-0.0011313864961266518,
0.038415178656578064,
0.06878074258565903,
-0.015985853970050812,
0.014304127544164658,
0.021446742117404938,
-0.060731127858161926,
-0.009433732368052006,
-0.0008201961754821241,
-0.040323656052351,
0.05196347460150719,
-0.047277312725782394,
-0.02350638620555401,
-0.01887691207230091,
0.09432787448167801,
0.06042879447340965,
-0.05169893428683281,
0.0010250976774841547,
0.02199472114443779,
0.015636282041668892,
-0.019046975299715996,
-0.013189274817705154,
-0.003923242446035147,
0.01599530130624771,
-0.016373218968510628,
0.053475137799978256,
-0.016278740018606186,
0.020312994718551636,
-0.011583130806684494,
-0.034031350165605545,
0.035524118691682816,
0.026189589872956276,
0.049922727048397064,
-0.07769956439733505,
0.04134402796626091,
0.001195159857161343,
-0.03289760276675224,
-0.013227066025137901,
-0.03767824172973633,
0.007818141020834446,
0.010071465745568275,
-0.008285812102258205,
-0.0056829145178198814,
-0.025150321424007416,
-0.010288767516613007,
0.004856222774833441,
-0.026284070685505867,
0.022712761536240578,
-0.00688279839232564,
0.04652148112654686,
0.026416340842843056,
-0.03580755740404129,
0.006878074258565903,
0.016788925975561142,
0.026661986485123634,
0.029893169179558754,
-0.04179752990603447,
-0.023563073948025703,
-0.03605320304632187,
0.013916763477027416,
-0.043120235204696655,
0.01220669224858284,
-0.055326927453279495,
0.053815264254808426,
0.0022828499786555767,
0.06976332515478134,
0.036223266273736954,
-0.07875773310661316,
-0.06617312133312225,
0.07410936057567596,
-0.0863160565495491,
0.01844230853021145,
-0.045538898557424545,
-0.01968943327665329,
0.02027520351111889,
0.04270452633500099,
0.009575450792908669,
0.0655684545636177,
-0.010695028118789196,
-0.0027705980464816093,
-0.0018553321715444326,
0.0138128362596035,
0.0037012165412306786,
0.010392694734036922,
-0.013066451996564865,
0.005961627699434757,
0.022297054529190063,
-0.01376559678465128,
0.026321861892938614,
-0.07233315706253052,
-0.008403911255300045,
-0.009901403449475765,
0.0161086767911911,
-0.01330264937132597,
-0.0529460571706295,
-0.029156232252717018,
-0.06957437098026276,
-0.026850944384932518,
0.019179245457053185,
-0.03556191176176071,
0.02337411604821682,
-0.022958407178521156,
-0.028627149760723114,
0.040021322667598724,
-0.007435500621795654,
0.027266651391983032,
-0.02994985692203045,
-0.04822210222482681,
-0.039794571697711945,
0.0031744958832859993,
-0.009112503379583359,
0.021919138729572296,
0.017677029594779015,
0.016552727669477463,
-0.005380581598728895,
-0.027096590027213097,
-0.052908264100551605,
0.0028816107660531998,
0.000007413467756123282,
-0.01025097630918026,
-0.013000315986573696,
-0.021352263167500496,
-0.06417016685009003,
0.05241697281599045,
0.036336641758680344,
0.014984376728534698,
-0.0029831756837666035,
0.020426368340849876,
-0.040701571851968765,
-0.0009123132331296802,
0.06228058412671089,
0.005097144283354282,
-0.006051382515579462,
0.01541898027062416,
0.01249957736581564,
-0.015220574103295803,
-0.02108772285282612,
-0.006689116358757019,
-0.0622050017118454,
0.06383004039525986,
-0.059824131429195404,
0.04304465278983116,
0.04308244213461876,
0.014984376728534698,
0.023241844028234482,
-0.14988155663013458,
0.06114683672785759,
0.003991739358752966,
-0.014370262622833252,
0.03216066583991051,
0.024243323132395744,
0.01173429749906063,
0.05955958738923073,
0.006405679043382406,
-0.03580755740404129,
-0.00006406860484275967,
-0.005848252680152655,
-0.031253665685653687,
-0.010307664051651955,
0.0013451453996822238,
0.04512318968772888,
0.00864010863006115,
-0.016788925975561142,
0.05075414106249809,
-0.019897285848855972,
-0.03202839568257332,
0.013784492388367653,
-0.015485115349292755,
0.017695924267172813,
0.010553308762609959,
0.07611231505870819,
0.03168827295303345,
-0.002154122106730938,
-0.03216066583991051,
0.035996515303850174,
0.022259263321757317,
-0.03960561379790306,
0.005078248679637909,
0.025131424888968468,
0.024205530062317848,
-0.008115749806165695,
0.053701888769865036,
-0.027002111077308655,
-0.05075414106249809,
0.020634222775697708,
0.015362292528152466,
-0.03998352959752083,
0.016552727669477463,
-0.0195760577917099,
-0.04296907037496567,
0.02857046201825142,
-0.04912910237908363,
0.03881198912858963,
-0.02658640220761299,
-0.04693718999624252,
0.019538266584277153,
0.03178275004029274,
0.009778580628335476,
-0.003013881389051676,
-0.04209986329078674,
0.015815792605280876,
0.060617752373218536,
0.0038925365079194307,
0.0033540059812366962,
0.030422251671552658,
0.05653626099228859,
-0.038396283984184265,
-0.027625672519207,
-0.0048703947104513645,
0.0019061147468164563,
-0.06273408234119415,
-0.01854623667895794,
-0.014067929238080978,
0.03063010610640049,
-0.017232976853847504,
-0.023695344105362892,
0.010364350862801075,
0.044858649373054504,
-0.030025439336895943,
0.02346859499812126,
0.003540602046996355,
0.03210397809743881,
0.012877493165433407,
0.04822210222482681,
-0.006670220289379358,
0.01658107154071331,
-0.061789292842149734,
-0.004894014447927475,
-0.013841180130839348,
-0.017705373466014862,
0.010307664051651955,
0.05460888519883156,
0.007071756292134523,
-0.012017734348773956,
-0.0051821754314005375,
-0.03975678235292435,
0.058425839990377426,
-0.03711136803030968,
-0.006542673800140619,
-0.043951649218797684,
-0.015692969784140587,
-0.01081785000860691,
0.00949514377862215,
-0.012990868650376797,
0.017431383952498436,
-0.005475060548633337,
0.0368846170604229,
0.039076533168554306,
-0.059370629489421844,
0.017941569909453392,
0.016373218968510628,
0.03072458505630493,
0.03272753953933716,
0.05030064284801483,
-0.004556251689791679,
-0.0054514408111572266,
0.03388018533587456,
-0.00009410998609382659,
-0.010893433354794979,
-0.011261901818215847,
-0.02258049137890339,
0.01236730720847845,
0.0621672086417675,
-0.03881198912858963,
0.0006678487407043576,
-0.03280312567949295,
0.03083796054124832,
-0.006301752291619778,
0.012187796644866467,
0.05249255523085594,
-0.006495434325188398,
0.020010661333799362,
-0.05260593071579933,
-0.003460295032709837,
0.07006565481424332,
0.031385939568281174,
0.0020454712212085724,
-0.01760144531726837,
-0.020634222775697708,
-0.041608572006225586,
-0.05124543234705925,
-0.024829093366861343,
-0.008394462987780571,
0.0702924057841301,
-0.05593159422278404,
-0.029212919995188713,
0.04296907037496567,
-0.0027493401430547237,
0.008729863911867142,
-0.030327772721648216,
0.0070575843565166,
-0.02588725835084915,
-0.004253918770700693,
0.03741370141506195,
0.01613702066242695,
0.09001963585615158,
-0.014663147740066051,
0.023903198540210724,
-0.0019061147468164563,
0.002227343386039138,
-0.014899345114827156,
0.003474466735497117,
-0.016902301460504532,
-0.03858524188399315,
-0.04810873046517372,
0.044140610843896866,
-0.05921946465969086,
0.06303641945123672,
-0.016155917197465897,
-0.051321014761924744,
-0.03233072906732559,
0.04697497934103012,
0.029968753457069397,
-0.03773492947220802,
-0.08571138978004456,
-0.036771245300769806,
0.07837981730699539,
0.05581821873784065,
-0.049015726894140244,
0.05967296287417412,
0.010562757030129433,
-0.021711284294724464,
0.014417502097785473,
0.014077377505600452,
-0.022599387913942337,
-0.00944318063557148,
0.04909130930900574,
0.019075319170951843,
0.002298202831298113,
0.009353425353765488,
0.02108772285282612,
-0.007917343638837337,
0.02775794267654419,
-0.008068510331213474,
0.0026808427646756172,
0.04236440360546112,
0.05736767500638962,
-0.0829148069024086,
-0.06209162622690201,
0.028116963803768158,
0.0074780164286494255,
-0.01693064533174038,
-0.051283225417137146,
0.017072362825274467,
-0.048524435609579086,
0.030800167471170425,
-0.006873350590467453,
0.04062598943710327,
-0.01376559678465128,
0.03580755740404129,
0.011025704443454742
] |
52,297 |
flexget.manager
|
load_config
|
Loads the config file from disk, validates and activates it.
:raises: `ValueError` if there is a problem loading the config file
|
def load_config(
self, output_to_console: bool = True, config_file_hash: Optional[str] = None
) -> None:
"""
Loads the config file from disk, validates and activates it.
:raises: `ValueError` if there is a problem loading the config file
"""
fire_event('manager.before_config_load', self)
with open(self.config_path, encoding='utf-8') as f:
try:
raw_config = f.read()
except UnicodeDecodeError:
logger.critical('Config file must be UTF-8 encoded.')
raise ValueError('Config file is not UTF-8 encoded')
try:
self.config_file_hash = config_file_hash or self.hash_config()
config = yaml.safe_load(raw_config) or {}
except yaml.YAMLError as e:
msg = str(e).replace('\n', ' ')
msg = ' '.join(msg.split())
logger.critical(msg)
if output_to_console:
print('')
print('-' * 79)
print(' Malformed configuration file (check messages above). Common reasons:')
print('-' * 79)
print('')
print(' o Indentation error')
print(' o Missing : from end of the line')
print(' o Non ASCII characters (use UTF8)')
print(
' o If text contains any of :[]{}% characters it must be single-quoted '
'(eg. value{1} should be \'value{1}\')\n'
)
# Not very good practice but we get several kind of exceptions here, I'm not even sure all of them
# At least: ReaderError, YmlScannerError (or something like that)
if isinstance(e, yaml.MarkedYAMLError):
lines = 0
if e.problem is not None:
print(f' Reason: {e.problem}\n')
if e.problem == 'mapping values are not allowed here':
print(' ----> MOST LIKELY REASON: Missing : from end of the line!')
print('')
if e.context_mark is not None:
print(
f' Check configuration near line {e.context_mark.line}, column {e.context_mark.column}'
)
lines += 1
if e.problem_mark is not None:
print(
f' Check configuration near line {e.problem_mark.line}, column {e.problem_mark.column}'
)
lines += 1
if lines:
print('')
if lines == 1:
print(' Fault is almost always in this or previous line\n')
if lines == 2:
print(' Fault is almost always in one of these lines or previous ones\n')
# When --debug escalate to full stacktrace
if self.options.debug or not output_to_console:
raise
raise ValueError('Config file is not valid YAML')
# config loaded successfully
logger.debug('config_name: {}', self.config_name)
logger.debug('config_base: {}', self.config_base)
# Install the newly loaded config
self.update_config(config)
|
(self, output_to_console: bool = True, config_file_hash: Optional[str] = None) -> NoneType
|
[
0.008387738838791847,
-0.017058033496141434,
0.00633135624229908,
-0.012882478535175323,
-0.02383938618004322,
0.0007299373392015696,
-0.0211289394646883,
0.052743859589099884,
-0.0433671735227108,
-0.05793452262878418,
0.006441239267587662,
-0.04792993515729904,
0.014033634215593338,
-0.00039113129605539143,
0.020364990457892418,
0.060948457568883896,
0.0050363061018288136,
0.022688230499625206,
-0.002315392717719078,
-0.029448654502630234,
0.012108064256608486,
-0.05579965561628342,
-0.007728440221399069,
-0.007854021154344082,
-0.009674940258264542,
-0.00815750751644373,
-0.0021767306607216597,
-0.014305724762380123,
-0.004539215937256813,
-0.014263864606618881,
-0.050190385431051254,
0.01576036773622036,
0.0012388004688546062,
0.04926946014165878,
0.03003469668328762,
-0.062036823481321335,
0.05939963087439537,
0.039285801351070404,
-0.05069270730018616,
-0.00043299151002429426,
-0.0173510555177927,
-0.01346852071583271,
0.06023683398962021,
0.005096479784697294,
-0.012631316669285297,
0.055171750485897064,
-0.03788348659873009,
0.10205517709255219,
-0.08807387202978134,
-0.010611562058329582,
0.009235408157110214,
-0.028109127655625343,
-0.013060384429991245,
0.08238088339567184,
0.012777827680110931,
-0.014117354527115822,
-0.004254043567925692,
-0.03597884625196457,
0.05672057718038559,
-0.02693704143166542,
-0.01780105195939541,
0.015592926181852818,
0.0320858471095562,
0.02409054897725582,
0.04780435562133789,
-0.07007398456335068,
-0.021516146138310432,
-0.006284263450652361,
-0.01968476176261902,
-0.03083004057407379,
0.004382240120321512,
0.014692932367324829,
-0.0026489661540836096,
-0.03070446103811264,
0.04395321384072304,
-0.00274707586504519,
-0.03497420251369476,
0.04259276017546654,
0.02612076885998249,
0.038971852511167526,
-0.02035452425479889,
0.02530449442565441,
0.027104483917355537,
-0.011365045793354511,
0.0184603501111269,
-0.021338239312171936,
0.05965079367160797,
0.03463932126760483,
0.022416140884160995,
0.0022486778907477856,
-0.009455174207687378,
0.04391135647892952,
0.007969136349856853,
0.015592926181852818,
-0.0049447366036474705,
-0.0071999551728367805,
0.013353405520319939,
0.006415076553821564,
0.0080842524766922,
-0.05332989990711212,
-0.022290559485554695,
0.005242990795522928,
0.02735564485192299,
-0.03154166415333748,
-0.0042959037236869335,
-0.050441548228263855,
-0.007969136349856853,
-0.00033422757405787706,
-0.05722289904952049,
0.009936566464602947,
-0.08543667942285538,
-0.07965996861457825,
-0.014923162758350372,
-0.006190077867358923,
0.03376025706529617,
-0.015310370363295078,
-0.013342940248548985,
0.006980189122259617,
0.01603245921432972,
0.005933684296905994,
0.006802283227443695,
0.012558061629533768,
-0.0012891634833067656,
-0.04445553943514824,
0.03733930364251137,
0.005133107770234346,
-0.023755665868520737,
-0.004172939341515303,
0.05023224651813507,
-0.0021427192259579897,
0.07551581412553787,
0.018020818009972572,
-0.01924522966146469,
-0.014849907718598843,
0.04085556045174599,
-0.061367060989141464,
-0.0015802227426320314,
0.03221142664551735,
0.0024723683018237352,
-0.009381918236613274,
0.04847411811351776,
-0.006184845231473446,
0.0019242613343521953,
-0.03861603885889053,
-0.006001707166433334,
0.003715093247592449,
-0.011752252466976643,
-0.0323370099067688,
-0.030809111893177032,
0.03673233091831207,
0.05282757803797722,
-0.03708814084529877,
-0.08665062487125397,
-0.0027758548967540264,
-0.015676647424697876,
0.001044542994350195,
-0.030641671270132065,
-0.004834853578358889,
-0.013960378244519234,
0.012568526901304722,
-0.041399743407964706,
-0.048013657331466675,
0.06810655444860458,
-0.023190554231405258,
-0.03263003006577492,
-0.0010209965985268354,
-0.008105182088911533,
-0.01442084088921547,
0.04238345846533775,
-0.0006697633070871234,
-0.06844143569469452,
-0.010517376475036144,
-0.06810655444860458,
0.03296491131186485,
0.03826022893190384,
0.009062734432518482,
0.011626671999692917,
-0.0323370099067688,
-0.051529914140701294,
-0.010627259500324726,
-0.051529914140701294,
-0.005703452974557877,
0.01657664217054844,
-0.04010207578539848,
0.021620796993374825,
0.06601354479789734,
-0.006142985075712204,
0.08007857203483582,
0.024676591157913208,
0.017162684351205826,
-0.010245284996926785,
-0.01807314343750477,
0.0043639265932142735,
0.02815098874270916,
0.040625330060720444,
-0.02021847851574421,
-0.03673233091831207,
0.005572639871388674,
0.07229257375001907,
-0.05701360106468201,
-0.011699927039444447,
0.002812482649460435,
0.015477810986340046,
-0.044916000217199326,
-0.008241227827966213,
-0.0014781885547563434,
-0.03030678816139698,
0.0065458896569907665,
0.0058185686357319355,
0.03855324909090996,
-0.046129945665597916,
-0.06551121920347214,
-0.042906709015369415,
0.0024357407819479704,
0.04592064395546913,
-0.050734568387269974,
0.054501987993717194,
0.03876255080103874,
-0.06877631694078445,
0.049227602779865265,
0.12097599357366562,
0.0701158419251442,
0.014399910345673561,
-0.028632380068302155,
-0.007283675950020552,
0.03028585948050022,
0.014159214682877064,
-0.020971963182091713,
0.022730091586709023,
0.054501987993717194,
0.0277533158659935,
-0.02356729656457901,
-0.04252997040748596,
0.011595277115702629,
0.09736683964729309,
0.018763836473226547,
0.026455650106072426,
-0.018125468865036964,
-0.030139347538352013,
0.06848329305648804,
-0.021767307072877884,
-0.01063772477209568,
-0.0031892242841422558,
-0.013081314042210579,
-0.013824332505464554,
-0.015101068653166294,
-0.03888813033699989,
0.02102428860962391,
-0.05605081468820572,
0.02990911714732647,
-0.0011452690232545137,
0.019569646567106247,
0.002332398435100913,
0.007534836884588003,
-0.011490626260638237,
-0.061367060989141464,
-0.007634255103766918,
-0.09234361350536346,
0.06048799678683281,
-0.01105109415948391,
0.009188314899802208,
-0.01683826744556427,
0.020228944718837738,
0.047469474375247955,
0.007461581379175186,
-0.002786319935694337,
-0.01097783911973238,
-0.04499972239136696,
0.04198578745126724,
0.015645252540707588,
0.08790642768144608,
0.06140892207622528,
-0.009052269160747528,
0.0041624740697443485,
-0.03579047694802284,
0.02277195081114769,
0.0718739703297615,
-0.015613856725394726,
0.05713918060064316,
0.03719279170036316,
0.03384397551417351,
-0.03216956928372383,
0.0406462587416172,
0.031018411740660667,
0.03721372410655022,
-0.0007135857013054192,
-0.07965996861457825,
-0.05504617094993591,
-0.007958672009408474,
0.00881157349795103,
0.023923106491565704,
-0.03355095535516739,
0.0029092843178659678,
-0.010789467953145504,
0.021851027384400368,
-0.04617180675268173,
-0.06823213398456573,
-0.011040628887712955,
0.0011583503801375628,
-0.027250993996858597,
-0.02262544073164463,
-0.009245872497558594,
-0.008194135501980782,
0.033341653645038605,
0.01494409330189228,
-0.012976664118468761,
0.015394090674817562,
-0.053036879748106,
-0.004735435824841261,
-0.01711035892367363,
0.057181041687726974,
-0.009465638548135757,
0.049771785736083984,
-0.006027869414538145,
0.007309838198125362,
0.04374391585588455,
0.044246237725019455,
-0.008115647360682487,
0.025932397693395615,
0.0065406570211052895,
-0.04834853857755661,
0.03842766955494881,
0.003369746496900916,
-0.029699815437197685,
0.06982282549142838,
-0.027669595554471016,
0.07672975957393646,
0.010559236630797386,
0.024320779368281364,
0.011626671999692917,
-0.027774246409535408,
-0.02909284271299839,
-0.022667301818728447,
-0.011155745014548302,
0.03731837496161461,
-0.076059989631176,
-0.03524629399180412,
0.007974369451403618,
0.013908052816987038,
-0.08158554136753082,
0.048139236867427826,
0.012003414332866669,
0.007492976728826761,
-0.04826481640338898,
0.027020761743187904,
0.027920756489038467,
-0.028799820691347122,
0.007079607341438532,
-0.038029994815588,
0.028737030923366547,
0.003654919099062681,
0.006027869414538145,
-0.009873775765299797,
0.037757907062768936,
-0.06459029763936996,
-0.044120658189058304,
-0.0065668197348713875,
-0.026330068707466125,
-0.017717331647872925,
0.01535223051905632,
-0.031081203371286392,
-0.02988818660378456,
-0.06844143569469452,
0.021097542718052864,
-0.000005493130174727412,
0.007252280600368977,
-0.07869718968868256,
-0.03746488317847252,
0.04198578745126724,
0.014933628030121326,
-0.039411384612321854,
0.028318429365754128,
0.01346852071583271,
-0.03949510306119919,
0.047888074070215225,
-0.001535746268928051,
-0.03476490080356598,
0.027648665010929108,
-0.009146454744040966,
0.055171750485897064,
0.08384598791599274,
0.033341653645038605,
-0.028799820691347122,
-0.013635962270200253,
-0.034157928079366684,
-0.05123689025640488,
-0.013144104741513729,
-0.033216074109077454,
0.02235334925353527,
0.009219709783792496,
0.00802146177738905,
0.046967148780822754,
0.02440449967980385,
0.03962068259716034,
-0.005305781029164791,
0.00950226653367281,
-0.03384397551417351,
0.06304147094488144,
0.0009856770047917962,
0.006980189122259617,
-0.013018524274230003,
0.014483630657196045,
-0.0014232469256967306,
0.015571996569633484,
0.026999833062291145,
0.029427723959088326,
0.023337064310908318,
0.04238345846533775,
-0.042906709015369415,
0.052743859589099884,
0.028527729213237762,
-0.012076669372618198,
-0.024969613179564476,
-0.010559236630797386,
-0.04324159398674965,
-0.0025050716940313578,
0.01954871602356434,
-0.010004589334130287,
-0.0025691702030599117,
0.0003165678062941879,
-0.0073464661836624146,
0.004133695270866156,
0.02762773633003235,
0.003369746496900916,
0.03614628687500954,
0.04246717691421509,
-0.06454844027757645,
0.053957805037498474,
-0.017884772270917892,
-0.04349275305867195,
-0.0203231293708086,
0.030076557770371437,
0.022583581507205963,
-0.027920756489038467,
0.015456880442798138,
-0.07886462658643723,
0.0009830608032643795,
-0.03648116812109947,
0.018774302676320076,
0.002497222973033786,
0.0041284626349806786,
0.0433671735227108,
0.060278695076704025,
0.024320779368281364,
0.007137164939194918,
0.044120658189058304,
-0.04374391585588455,
0.03342537581920624,
0.03907650336623192,
0.032399799674749374,
-0.08974827826023102,
-0.001399700646288693,
-0.035497453063726425,
-0.053413622081279755,
0.027920756489038467,
-0.04271833971142769,
-0.003144748043268919,
0.019046394154429436,
-0.007184257730841637,
0.06186938285827637,
0.013081314042210579,
-0.007058677263557911,
0.0020694639533758163,
0.0031002715695649385,
0.0033514327369630337,
-0.02921842411160469,
0.02856959030032158,
0.08949711918830872,
0.00046569478581659496,
0.03451373800635338,
0.007969136349856853,
0.01628362014889717,
-0.03317421302199364,
0.052576418966054916,
-0.015833621844649315,
-0.011626671999692917,
0.06526006013154984,
-0.001748971757479012,
0.00027650626725517213,
-0.008895293809473515,
0.016231294721364975,
-0.002004057401791215,
-0.03957882523536682,
-0.03704628348350525,
0.006153450347483158,
-0.08865991234779358,
0.07547394931316376,
-0.02302311360836029,
-0.0028909703250974417,
0.03235793858766556,
-0.027418434619903564,
-0.023002183064818382,
-0.015980133786797523,
-0.028109127655625343,
-0.00868075992912054,
-0.036041636019945145,
0.02103475295007229,
0.026874251663684845,
0.03861603885889053,
-0.03895092010498047,
0.011867368593811989,
-0.04726017266511917,
-0.00042318052146583796,
0.011092954315245152,
0.009654009714722633,
0.03126957267522812,
-0.0049630505964159966,
0.0522833950817585,
0.014159214682877064,
-0.0037674184422940016,
-0.02383938618004322,
-0.007168560288846493,
0.03627186641097069,
-0.012411550618708134,
-0.003845906350761652,
-0.023881247267127037,
0.0038354413118213415,
0.0644228532910347,
0.05320432037115097,
0.0463392473757267,
-0.00902610644698143,
-0.011972018517553806,
0.004575843922793865,
0.00034142230288125575,
-0.03181375563144684,
0.0003361897834111005,
0.05291130021214485,
-0.047218311578035355,
-0.040457889437675476,
0.023399854078888893,
-0.010465051047503948,
-0.024216128513216972,
0.03242072835564613,
-0.051948513835668564,
-0.006509262137115002,
0.042906709015369415,
-0.02641378901898861,
-0.010088309645652771,
-0.04158811271190643,
-0.024195197969675064,
0.03675325959920883,
-0.004455495625734329,
0.04244624823331833,
0.012202249839901924,
-0.045460183173418045,
-0.004227880854159594,
-0.03976719453930855,
0.003497943514958024,
-0.014159214682877064,
-0.0018902498995885253,
0.041043929755687714,
0.027648665010929108,
0.10791561007499695,
-0.008031927049160004,
-0.00822553038597107,
-0.0926784947514534,
0.07861346751451492,
-0.012380155734717846,
0.04096021130681038,
0.005640662740916014,
0.005834266077727079,
0.0770646408200264,
-0.06848329305648804,
-0.018020818009972572,
0.012715036980807781,
-0.02614169754087925,
-0.0056929877027869225,
0.002778471214696765,
-0.007587162312120199,
0.03466024994850159,
-0.001476880395784974,
0.023274274542927742,
-0.002045917557552457,
0.002442281460389495,
-0.0659298226237297,
0.059357769787311554,
0.0493113212287426,
0.06124148145318031,
0.003139515407383442,
0.0014520258409902453,
-0.0034691644832491875,
-0.008665062487125397,
0.02329520508646965,
0.03974626585841179,
-0.011961553245782852,
-0.0022774566896259785,
0.03122771345078945,
0.03179282695055008,
-0.02062661573290825,
-0.005062468815594912,
-0.046674128621816635,
0.00612728763371706,
-0.012746432796120644,
-0.014044098556041718,
0.011553416959941387,
0.03654395788908005,
0.04146253317594528,
-0.0215580053627491,
0.038741618394851685,
0.01252666674554348,
-0.049102019518613815,
-0.010213890112936497,
0.05789266526699066,
-0.008607504889369011,
-0.007670882623642683,
-0.01126039493829012,
0.03491141274571419,
-0.026183558627963066,
-0.03181375563144684,
0.04792993515729904,
-0.009146454744040966,
-0.011668532155454159,
0.043702054768800735,
-0.0641716942191124,
-0.03357188403606415,
-0.036983489990234375,
0.01671268790960312,
0.016921987757086754,
0.003463932080194354,
-0.0022709162440150976,
0.029846325516700745,
0.04052067920565605,
-0.026309138163924217,
0.03472303971648216,
-0.0629577487707138,
0.019737087190151215,
-0.02302311360836029,
-0.01938127540051937,
-0.04294857010245323,
-0.025639375671744347,
0.04834853857755661,
0.009287732653319836,
-0.009533661417663097,
-0.04864155873656273,
-0.06337635219097137,
-0.04947876185178757,
0.08049717545509338,
0.018292909488081932,
0.0035711987875401974,
0.020961496978998184,
0.050860147923231125,
-0.06400425732135773,
-0.030223067849874496,
0.02572309598326683,
-0.013583636842668056,
0.026162628084421158,
-0.03263003006577492,
-0.01353131141513586,
0.09066920727491379,
-0.018428955227136612,
0.04625552520155907,
-0.011281325481832027,
-0.024948682636022568,
0.04280205816030502,
-0.002739227144047618,
-0.021223124116659164,
0.013520846143364906,
0.004557529930025339,
-0.004214799497276545,
0.014734792523086071,
-0.02247893065214157,
-0.013489451259374619,
-0.12206435948610306,
0.003649686696007848,
0.02183009684085846,
-0.04271833971142769,
0.044664837419986725,
0.022144049406051636,
-0.0012028268538415432,
0.0009026106563396752,
0.019203368574380875,
-0.08510179817676544,
-0.01111388485878706,
0.004827004857361317,
0.02116033434867859,
-0.06019497662782669,
-0.037925347685813904,
-0.011762717738747597,
0.035099782049655914,
-0.03338351473212242,
0.0033069562632590532,
0.07199954986572266,
-0.07208327203989029,
0.002974690869450569,
-0.05182293429970741,
0.048013657331466675,
0.019914992153644562,
0.005849963519722223,
0.008387738838791847,
-0.02894633263349533,
-0.01749756559729576,
0.09175757318735123,
-0.039516035467386246,
-0.005167119204998016,
-0.05956707149744034,
-0.038699761033058167,
-0.006001707166433334,
-0.06325077265501022,
-0.06580424308776855,
0.004625552799552679,
0.032546307891607285,
-0.05672057718038559,
0.0005330635467544198,
0.057850804179906845,
-0.020689407363533974,
-0.029009122401475906,
-0.08518552035093307,
0.001318596419878304,
-0.05944149196147919,
-0.0020603069569915533,
0.01749756559729576,
0.022667301818728447,
0.0463392473757267,
-0.06166008114814758,
-0.010873188264667988,
-0.013384800404310226,
-0.008963316679000854,
-0.042509038001298904,
-0.030411439016461372,
-0.019433600828051567,
-0.08434831351041794,
0.02503240294754505,
-0.0216835867613554,
-0.02867424115538597,
0.03430444002151489,
0.0012276812922209501,
-0.030788181349635124,
-0.03472303971648216,
0.030369579792022705,
0.0058133359998464584,
-0.019705692306160927,
-0.00417817197740078,
-0.052869439125061035,
0.09225989133119583,
-0.01577083207666874,
-0.012966198846697807,
-0.04238345846533775,
-0.032002128660678864,
0.022730091586709023,
-0.023797526955604553,
0.05199037492275238,
-0.02142195962369442,
-0.015833621844649315,
0.008523784577846527,
0.013510380871593952,
-0.016116179525852203,
0.02936493419110775,
0.05437640845775604,
-0.03566489368677139,
0.02492775209248066,
-0.06819027662277222,
0.027920756489038467,
-0.02695797197520733,
0.10046449303627014,
-0.013970843516290188,
-0.02882075123488903,
0.04206950590014458,
0.02398589812219143,
0.030913760885596275,
-0.050734568387269974,
-0.01077900268137455,
-0.029302144423127174,
0.0234207846224308,
0.029574235901236534,
0.08171112090349197,
0.028088197112083435,
-0.029804466292262077,
0.025513794273138046
] |
52,298 |
flexget.manager
|
matching_tasks
|
Create list of tasks to run, preserving order
|
def matching_tasks(self, task: str) -> Optional[List[str]]:
"""Create list of tasks to run, preserving order"""
task_names = [t for t in self.tasks if fnmatch.fnmatchcase(str(t).lower(), task.lower())]
if not task_names:
raise ValueError(f'`{task}` does not match any tasks')
return task_names
|
(self, task: str) -> Optional[List[str]]
|
[
0.07754619419574738,
0.011624708771705627,
-0.028357790783047676,
-0.003752307966351509,
-0.03194989636540413,
-0.028159232810139656,
0.04303308203816414,
0.012761908583343029,
0.05130034312605858,
-0.0387008935213089,
0.047509677708148956,
0.028285587206482887,
-0.010334077291190624,
-0.0839000716805458,
0.02998236194252968,
-0.01138102263212204,
0.045740701258182526,
0.06086726114153862,
-0.014612114056944847,
-0.006584025453776121,
0.03471167013049126,
0.038267675787210464,
0.007315082475543022,
0.0020544053986668587,
-0.01862841472029686,
0.07357501983642578,
0.03646259382367134,
-0.05855676159262657,
-0.017229478806257248,
-0.0006227522389963269,
-0.038989704102277756,
0.02361043356359005,
-0.06646300852298737,
-0.0036259524058550596,
-0.013565168716013432,
0.044693756848573685,
0.013231229037046432,
0.07855703681707382,
-0.0014158588601276278,
-0.01475652027875185,
0.03653479740023613,
-0.02314111217856407,
-0.0013447838136926293,
-0.02926032990217209,
-0.0026421842630952597,
-0.013709574937820435,
0.016308888792991638,
0.041552916169166565,
0.01236479077488184,
0.036895815283060074,
0.043321896344423294,
-0.05364694818854332,
-0.05646286904811859,
-0.032816335558891296,
-0.008908065035939217,
0.06454962491989136,
0.0044269561767578125,
-0.0012071465607732534,
0.054260674864053726,
0.022924503311514854,
0.02303280681371689,
-0.0004752434615511447,
-0.02465737797319889,
0.008186032995581627,
-0.007924296893179417,
0.027906520292162895,
0.04747357591986656,
-0.031516678631305695,
-0.007617433089762926,
0.04451324790716171,
-0.04859272763133049,
-0.02144433744251728,
-0.03274413198232651,
-0.013547117821872234,
0.02510864846408367,
-0.006060552783310413,
-0.003601132659241557,
0.006710381247103214,
0.01663380302488804,
-0.03812326863408089,
0.01389910839498043,
0.017130199819803238,
0.005473901983350515,
-0.025487715378403664,
-0.003165657166391611,
-0.0001868538820417598,
-0.008723043836653233,
-0.05209457874298096,
-0.06779876351356506,
-0.10144543647766113,
-0.043899521231651306,
-0.015180714428424835,
0.007026270031929016,
0.03758174553513527,
-0.0003477597492747009,
-0.018772821873426437,
-0.04660714045166969,
-0.017491215839982033,
-0.05862896516919136,
0.01373665127903223,
-0.017500240355730057,
-0.00659305090084672,
-0.01078534685075283,
0.007536204531788826,
0.05812354385852814,
-0.039061907678842545,
-0.09581359475851059,
0.022130267694592476,
-0.027906520292162895,
0.048231709748506546,
-0.0419861376285553,
0.08938751369714737,
0.02032518945634365,
0.012707755900919437,
0.010279924608767033,
-0.020108580589294434,
-0.02065010368824005,
-0.019458752125501633,
-0.06537996232509613,
-0.03214845806360245,
0.022870350629091263,
0.07032587379217148,
-0.00601993827149272,
-0.003055096138268709,
0.004514953587204218,
-0.001238735392689705,
-0.03357446938753128,
-0.004210346844047308,
0.0629972591996193,
0.005974811501801014,
0.028827110305428505,
0.009413487277925014,
-0.00749107776209712,
0.0066697667352855206,
-0.024368565529584885,
0.02510864846408367,
0.02092086523771286,
0.022184420377016068,
0.016209609806537628,
-0.006173369940370321,
-0.015072409063577652,
-0.03402573987841606,
0.015731263905763626,
0.0077979410998523235,
0.055921345949172974,
-0.029892107471823692,
0.004864688031375408,
0.03187769278883934,
0.0524555966258049,
0.005469389259815216,
0.0007434668950736523,
-0.020812559872865677,
-0.0596759095788002,
-0.011074159294366837,
-0.0017926690634340048,
0.07732958346605301,
0.03389938175678253,
0.001435037818737328,
-0.01150737889111042,
-0.042527660727500916,
0.026715168729424477,
-0.038339875638484955,
-0.07964008301496506,
0.038664791733026505,
0.0609755665063858,
-0.012870213016867638,
0.024693479761481285,
0.09610240161418915,
0.013113899156451225,
0.01868256740272045,
-0.018808923661708832,
0.03765394911170006,
0.004783459473401308,
0.03963953256607056,
0.026065340265631676,
0.029133975505828857,
-0.010081365704536438,
-0.020632052794098854,
0.017852231860160828,
0.04176952689886093,
-0.03310514986515045,
0.014214997179806232,
0.025523817166686058,
0.004648078233003616,
0.05523541569709778,
0.036949966102838516,
0.013727625831961632,
0.04754577949643135,
-0.0668601244688034,
0.00341836828738451,
-0.022419080138206482,
-0.014639190398156643,
-0.0010396126890555024,
0.053285930305719376,
-0.025993136689066887,
0.011985724791884422,
-0.08960411697626114,
0.03189574554562569,
0.009936959482729435,
-0.11552505195140839,
0.029133975505828857,
-0.042130544781684875,
0.05267220363020897,
0.06303335726261139,
0.007766352500766516,
-0.005767227150499821,
-0.0001334066182607785,
-0.0035921072121709585,
-0.001798309967853129,
0.013709574937820435,
-0.010550686158239841,
-0.04667934402823448,
-0.04303308203816414,
-0.038339875638484955,
0.029928209260106087,
-0.0023059884551912546,
0.04285257309675217,
0.00125904253218323,
-0.05162525922060013,
-0.004314138554036617,
0.00953984260559082,
0.011453226208686829,
0.047834593802690506,
0.01681431010365486,
0.04400782659649849,
-0.019368497654795647,
0.04971187561750412,
0.001974305137991905,
-0.045487988740205765,
0.016146430745720863,
-0.0281953327357769,
-0.003165657166391611,
0.050325602293014526,
-0.008844886906445026,
-0.021299932152032852,
0.003350677900016308,
-0.0041403998620808125,
-0.0031904771458357573,
0.06343047320842743,
-0.010875600390136242,
-0.01603812724351883,
-0.00732862064614892,
-0.01268970500677824,
-0.008853912353515625,
0.016868462786078453,
-0.006615614518523216,
-0.007639996707439423,
-0.02998236194252968,
-0.028105080127716064,
0.004133631009608507,
-0.0073060570284724236,
-0.007075909525156021,
-0.02779821678996086,
-0.051047634333372116,
-0.05548812821507454,
-0.019693411886692047,
-0.018267398700118065,
-0.02007247880101204,
0.03409794345498085,
0.0285382978618145,
-0.004991043359041214,
0.046210020780563354,
0.03521709144115448,
0.007445950526744127,
-0.017301682382822037,
0.01797858625650406,
-0.003594363573938608,
0.008375566452741623,
-0.09220343083143234,
0.02119162678718567,
-0.06516335159540176,
-0.037690047174692154,
-0.0272205900400877,
0.009102110750973225,
0.01698579266667366,
-0.009557893499732018,
-0.0045713623985648155,
0.03566836193203926,
-0.03873699530959129,
-0.011850343085825443,
-0.038195472210645676,
0.0078114792704582214,
0.009521791711449623,
0.022581538185477257,
0.0023894733749330044,
-0.039386823773384094,
0.040686480700969696,
-0.017942484468221664,
0.016272787004709244,
-0.0006030091899447143,
-0.010740219615399837,
-0.013637371361255646,
0.03187769278883934,
-0.06700453162193298,
-0.02276204526424408,
-0.002194299129769206,
0.02478373423218727,
-0.058015238493680954,
0.04996458441019058,
-0.01758146844804287,
0.03252752125263214,
0.04505477100610733,
0.01940459944307804,
-0.053358133882284164,
-0.07783500850200653,
0.03579471632838249,
-0.013763726688921452,
0.0001903794181998819,
0.026191696524620056,
-0.08440548926591873,
-0.0020566617604345083,
-0.013980336487293243,
0.006719406694173813,
-0.05646286904811859,
0.01579444110393524,
0.03989224508404732,
0.013646396808326244,
0.10029018670320511,
-0.03028922528028488,
0.02584873139858246,
-0.04639052972197533,
0.03989224508404732,
0.014675292186439037,
0.017419012263417244,
0.0649467408657074,
-0.014305250719189644,
-0.022509334608912468,
-0.06184200569987297,
-0.012725806795060635,
0.07841262966394424,
0.03305099532008171,
-0.017076047137379646,
0.009269080124795437,
0.028159232810139656,
-0.047509677708148956,
0.008118342608213425,
0.026642965152859688,
0.05595744773745537,
0.028411943465471268,
0.0344228558242321,
-0.0007056730682961643,
0.009684248827397823,
-0.012987542897462845,
0.051516953855752945,
0.04285257309675217,
-0.011245641857385635,
0.0015873413067311049,
0.05054221302270889,
0.00953984260559082,
-0.08317803591489792,
0.03685971349477768,
-0.01488287653774023,
-0.021660948172211647,
0.034856073558330536,
0.047906797379255295,
0.06469403207302094,
-0.030018463730812073,
0.03718462586402893,
0.019242141395807266,
0.002065687207505107,
-0.006326801609247923,
-0.055054906755685806,
-0.02039739303290844,
-0.034061841666698456,
-0.03418819606304169,
-0.01639011688530445,
0.03352031484246254,
0.028953466564416885,
0.04400782659649849,
-0.030018463730812073,
0.039567332714796066,
0.05494660511612892,
0.043177489191293716,
-0.057221002876758575,
0.012382841669023037,
-0.04296087846159935,
0.05566863715648651,
0.0011857112403959036,
-0.013339533470571041,
0.035000480711460114,
-0.039567332714796066,
0.038989704102277756,
0.04512697458267212,
0.043899521231651306,
-0.09306987375020981,
0.021083323284983635,
-0.02931448258459568,
-0.024296363815665245,
0.04447714611887932,
0.03043363057076931,
0.006814172957092524,
-0.011733013205230236,
-0.06653521209955215,
-0.014900926500558853,
-0.013231229037046432,
-0.019783666357398033,
-0.042780373245477676,
0.023123061284422874,
-0.0026354154106229544,
-0.02406170219182968,
-0.034801922738552094,
-0.06971214711666107,
0.009927934035658836,
0.01509045995771885,
0.005171551369130611,
0.05415236949920654,
0.027834318578243256,
0.009368360042572021,
-0.014946053735911846,
-0.03337591141462326,
-0.01036115363240242,
-0.07855703681707382,
0.0005477286758832633,
-0.05483829975128174,
-0.08534413576126099,
0.011164413765072823,
-0.03187769278883934,
0.024368565529584885,
0.03337591141462326,
-0.005676973145455122,
-0.017391934990882874,
-0.008750120177865028,
0.02164289727807045,
0.01589372009038925,
0.07696856558322906,
0.024368565529584885,
0.06465792655944824,
-0.00460746418684721,
0.029801853001117706,
-0.0492064543068409,
-0.04610171541571617,
0.0304877832531929,
-0.03691386431455612,
-0.03362862020730972,
0.056498970836400986,
-0.053538642823696136,
0.039964448660612106,
-0.06137268617749214,
0.007030782755464315,
0.020234934985637665,
-0.015424399636685848,
0.00898929312825203,
-0.00724739208817482,
-0.0029851493891328573,
-0.010153569281101227,
-0.014016438275575638,
-0.02157069370150566,
0.004756383132189512,
-0.016020076349377632,
-0.024693479761481285,
-0.03711242228746414,
0.02702203206717968,
-0.04801509901881218,
-0.009431537240743637,
0.06093946471810341,
0.032166507095098495,
0.011029032059013844,
0.00981060415506363,
-0.08570514619350433,
-0.009675223380327225,
0.024386616423726082,
0.0905427634716034,
0.0331231988966465,
0.023989498615264893,
0.00823116023093462,
-0.0728168860077858,
0.01738291047513485,
-0.025433562695980072,
0.018935278058052063,
-0.037942759692668915,
0.017771001905202866,
-0.02223857305943966,
-0.020776458084583282,
-0.021498490124940872,
-0.04028936102986336,
0.04617391899228096,
0.04566849768161774,
0.025596018880605698,
0.05920659005641937,
0.00814541894942522,
0.022906452417373657,
-0.010821448639035225,
-0.008362028747797012,
0.03895360603928566,
-0.012094029225409031,
-0.03409794345498085,
0.035253193229436874,
-0.047906797379255295,
-0.06584928184747696,
-0.08570514619350433,
0.01658867485821247,
-0.04801509901881218,
0.022401029244065285,
0.028953466564416885,
-0.03877309709787369,
-0.0016516472678631544,
-0.004291575402021408,
0.04111969843506813,
-0.0029377660248428583,
0.08678819984197617,
0.05523541569709778,
0.024242211133241653,
-0.01721142791211605,
0.040108855813741684,
0.01102000754326582,
-0.04281647503376007,
-0.01105610840022564,
-0.030018463730812073,
-0.04610171541571617,
-0.03166108578443527,
0.03142642602324486,
0.03326760604977608,
-0.012283562682569027,
-0.0550910085439682,
0.023249417543411255,
0.004648078233003616,
-0.0413002073764801,
-0.017789052799344063,
0.02806897833943367,
0.062275223433971405,
-0.034657515585422516,
0.018285449594259262,
-0.01006331481039524,
0.005821379832923412,
0.053935758769512177,
-0.037292931228876114,
-0.03101125732064247,
-0.01648939587175846,
-0.002468445571139455,
0.024151956662535667,
0.01007234025746584,
-0.04639052972197533,
0.006065065506845713,
-0.01128174364566803,
0.04025325924158096,
0.035632260143756866,
-0.039386823773384094,
-0.008104804903268814,
-0.009666197933256626,
0.001216172007843852,
-0.012328688986599445,
0.005640871822834015,
0.03364667296409607,
0.025469664484262466,
-0.010658991523087025,
0.034982431679964066,
-0.040758684277534485,
0.013863006606698036,
-0.05877337232232094,
0.01780710369348526,
0.004733819514513016,
-0.01328538078814745,
-0.00040134802111424506,
-0.024296363815665245,
0.01601104997098446,
-0.0413002073764801,
-0.023971449583768845,
0.009287131018936634,
0.004801509901881218,
0.00044450070708990097,
-0.03299684450030327,
-0.010081365704536438,
-0.06415250897407532,
0.0262458473443985,
-0.034206245094537735,
-0.08866547793149948,
-0.01755439303815365,
-0.010000137612223625,
0.046137817203998566,
0.013637371361255646,
0.030144818127155304,
0.013565168716013432,
0.03704021871089935,
-0.028050927445292473,
-0.03350226581096649,
0.018538160249590874,
0.04747357591986656,
0.0046661291271448135,
-0.00981060415506363,
-0.05350254103541374,
-0.012121105566620827,
0.013745676726102829,
0.0026850549038499594,
0.03949512913823128,
-0.04956746846437454,
-0.047112561762332916,
-0.00345898256637156,
-0.01514461264014244,
-0.04736527055501938,
-0.012572375126183033,
0.03010871633887291,
0.02144433744251728,
0.06433301419019699,
0.05942320078611374,
-0.04018105939030647,
-0.04610171541571617,
0.013962285593152046,
0.011209540069103241,
-0.023177213966846466,
-0.001675338950008154,
0.016083253547549248,
0.003808716544881463,
0.08028991520404816,
-0.04274427145719528,
0.09595799446105957,
0.01967536099255085,
-0.08476650714874268,
-0.05162525922060013,
-0.02491009049117565,
0.04736527055501938,
0.01334855891764164,
0.019043583422899246,
0.057870831340551376,
-0.03200405091047287,
-0.0265707615762949,
0.013890082947909832,
-0.004751870408654213,
0.03815937042236328,
0.014178895391523838,
-0.024639327079057693,
0.03139032423496246,
0.037545643746852875,
0.022382978349924088,
0.008375566452741623,
0.011561530642211437,
0.03620988503098488,
-0.00981060415506363,
-0.056823886930942535,
-0.003242373000830412,
-0.04584900662302971,
-0.01236479077488184,
-0.04054207354784012,
0.026642965152859688,
0.014034489169716835,
0.00783404242247343,
-0.024549074470996857,
-0.0021593256387859583,
-0.03646259382367134,
-0.01790638267993927,
-0.082672618329525,
-0.05451338365674019,
-0.03063219040632248,
0.012716781347990036,
-0.010658991523087025,
0.02169704996049404,
-0.02610144205391407,
-0.03036142885684967,
-0.0015895976684987545,
0.0268956758081913,
0.02906177192926407,
-0.002829461358487606,
0.04014495760202408,
-0.0061417813412845135,
0.053358133882284164,
-0.023664584383368492,
0.0014654984697699547,
-0.05476609617471695,
-0.0354156494140625,
-0.019296294078230858,
-0.012184282764792442,
-0.03139032423496246,
0.053358133882284164,
-0.01220233365893364,
0.014891901053488255,
-0.021805353462696075,
0.007585844490677118,
0.02597508579492569,
-0.032491423189640045,
-0.07566890865564346,
0.08361125737428665,
0.01105610840022564,
-0.02157069370150566,
0.07971228659152985,
0.004458545241504908,
0.015361222438514233,
0.04205834120512009,
0.0022258879616856575,
0.03169718757271767,
-0.02223857305943966,
-0.05162525922060013,
0.016823336482048035,
-0.06516335159540176,
0.02353822998702526,
0.0010886882664635777,
0.014386479742825031,
0.10765490680932999,
-0.05278050899505615,
-0.03844818100333214,
0.06996486335992813,
-0.0016775953117758036,
0.011985724791884422,
0.01813201792538166,
0.016020076349377632,
0.06927893310785294,
0.022653741762042046,
0.10866575688123703,
-0.07400824129581451,
0.01581249199807644,
0.03628208860754967,
-0.02707618474960327,
-0.0014891901519149542,
-0.011191489174962044,
-0.000026935162168229,
-0.02308695949614048,
-0.02065010368824005,
-0.03036142885684967,
-0.04054207354784012,
0.010758270509541035,
-0.048701029270887375,
-0.003921533934772015,
-0.011561530642211437,
-0.04039766639471054,
0.003201758721843362,
0.021408237516880035,
-0.00403435155749321,
-0.07422484457492828,
0.05855676159262657,
-0.007815991528332233,
0.03574056178331375,
-0.024765683338046074,
0.019206039607524872,
-0.02532525733113289,
0.04519917815923691,
0.028700755909085274,
0.023393822833895683,
0.04021716117858887,
-0.044441044330596924,
-0.049025945365428925,
-0.047834593802690506,
0.04945916309952736,
-0.053610846400260925,
0.06516335159540176,
-0.014467707835137844,
0.015135587193071842,
0.051589157432317734,
-0.022870350629091263,
0.0334300622344017,
-0.017897358164191246,
-0.05317762494087219,
0.022274674847722054,
0.0020137911196798086,
-0.042527660727500916,
0.038339875638484955,
-0.009368360042572021,
0.019910020753741264,
-0.025343308225274086,
0.019440701231360435,
0.03579471632838249,
-0.03227481245994568,
-0.04097529128193855,
-0.019061634317040443,
-0.00007601075049024075,
-0.03166108578443527,
0.0013391429092735052,
-0.00937738548964262,
0.01007234025746584,
0.030054565519094467,
-0.016020076349377632,
-0.009029907174408436,
0.019982224330306053,
-0.04747357591986656,
0.03604742884635925,
-0.03306904807686806,
0.0295130405575037,
0.05292491614818573,
-0.03548785299062729,
0.028772959485650063,
0.04361070692539215
] |
52,299 |
flexget.manager
|
parse_initial_options
|
Parse what we can from cli args before plugins are loaded.
|
@staticmethod
def parse_initial_options(args: List[str]) -> argparse.Namespace:
"""Parse what we can from cli args before plugins are loaded."""
try:
options = CoreArgumentParser().parse_known_args(args, do_help=False)[0]
except ParserError as exc:
try:
# If a non-built-in command was used, we need to parse with a parser that
# doesn't define the subparsers
options = manager_parser.parse_known_args(args, do_help=False)[0]
except ParserError:
manager_parser.print_help()
print(f'\nError: {exc.message}')
sys.exit(1)
return options
|
(args: List[str]) -> argparse.Namespace
|
[
-0.018949830904603004,
0.014886515215039253,
0.02208966761827469,
-0.030567223206162453,
0.024989398196339607,
0.0381951779127121,
0.0720684602856636,
0.013298127800226212,
0.0016160919331014156,
-0.013796807266771793,
0.04362524673342705,
0.0009950508829206228,
-0.06024790555238724,
0.004949858412146568,
-0.04203685745596886,
-0.009234811179339886,
-0.0068291425704956055,
0.0557413175702095,
0.007891145534813404,
0.023530296981334686,
0.00879615731537342,
-0.016696538776159286,
0.0021528652869164944,
0.014637175016105175,
0.02679942175745964,
0.027963006868958473,
0.0326542891561985,
-0.02256987802684307,
-0.016280971467494965,
-0.03115825168788433,
-0.022108137607574463,
0.02277304418385029,
-0.005425451323390007,
0.09552488476037979,
0.006607506889849901,
-0.03653291240334511,
-0.009442593902349472,
0.0760948434472084,
-0.04004213958978653,
0.043662186712026596,
-0.00911014061421156,
-0.07195764780044556,
0.048353470861911774,
-0.016798119992017746,
0.012217654846608639,
-0.03743792325258255,
0.012088367715477943,
0.03692077472805977,
-0.0640895888209343,
-0.05448538437485695,
0.06778351217508316,
-0.04635874927043915,
0.041778285056352615,
0.01436013076454401,
-0.03568330779671669,
0.10446418076753616,
0.062242623418569565,
0.03291286528110504,
-0.019947191700339317,
0.03285745531320572,
-0.0056517040356993675,
0.0381951779127121,
-0.000748596852645278,
-0.006385871674865484,
0.0000020967709133401513,
-0.08267002552747726,
-0.01390762533992529,
-0.01822028122842312,
-0.05045900493860245,
0.04935082793235779,
-0.056775618344545364,
-0.0050191194750368595,
-0.004243395756930113,
-0.04894449561834335,
0.07476502656936646,
-0.01811869814991951,
-0.05175187811255455,
-0.017102869227528572,
0.02953292429447174,
0.0504220686852932,
-0.06368325650691986,
0.03564636781811714,
-0.03708700090646744,
0.04953552410006523,
0.03789966180920601,
-0.0030013134237378836,
0.020445870235562325,
0.011691270396113396,
0.04924001172184944,
-0.009650377556681633,
-0.03269122913479805,
-0.02667013369500637,
0.02859097346663475,
0.07853282988071442,
-0.0545223243534565,
0.0031998618505895138,
-0.010102882981300354,
-0.026005227118730545,
-0.027667492628097534,
-0.035794127732515335,
-0.03845375031232834,
0.03886008262634277,
0.018986770883202553,
-0.015846936032176018,
0.03649597242474556,
0.004949858412146568,
-0.0010140977101400495,
-0.02146170102059841,
0.02329019270837307,
0.006182705983519554,
-0.05045900493860245,
-0.04148276895284653,
-0.07118192315101624,
0.022551408037543297,
-0.017324505373835564,
-0.04576772078871727,
-0.0038647684268653393,
-0.007443257607519627,
0.04163052886724472,
0.004737457726150751,
-0.0750236064195633,
0.04440097138285637,
0.0026365385856479406,
-0.016548780724406242,
0.014230843633413315,
-0.03385481610894203,
-0.00951185543090105,
-0.028794139623641968,
-0.008722279220819473,
0.01117412094026804,
0.09330853074789047,
-0.008837713859975338,
-0.04403157904744148,
-0.06700778752565384,
0.0032852839212864637,
-0.04591548070311546,
0.021443231031298637,
0.03463054075837135,
-0.048094894737005234,
0.004137195181101561,
0.009650377556681633,
0.042590945959091187,
-0.016447197645902634,
-0.03721628710627556,
-0.10985730588436127,
0.014064616523683071,
0.04706059396266937,
-0.0020408930722624063,
-0.009341010823845863,
0.026854829862713814,
-0.010823198594152927,
-0.01746302656829357,
-0.014036912471055984,
0.03219255059957504,
0.04931388795375824,
-0.028664853423833847,
-0.014997332356870174,
-0.06778351217508316,
0.003225257620215416,
-0.037123940885066986,
-0.030105482786893845,
0.0032437273766845465,
-0.003998673055320978,
-0.05359884351491928,
-0.0015445221215486526,
-0.02401050738990307,
0.045102816075086594,
-0.046174053102731705,
-0.027759840711951256,
0.05851176008582115,
-0.018460387364029884,
0.03119519166648388,
-0.018044820055365562,
-0.0023941246327012777,
0.0021401674021035433,
0.01619785837829113,
-0.014988098293542862,
0.026466967537999153,
-0.021166186779737473,
0.00673217698931694,
0.0119036715477705,
0.007115421816706657,
-0.024527657777071,
-0.043994639068841934,
0.048057954758405685,
-0.008251303806900978,
0.049166131764650345,
0.03845375031232834,
-0.024472247809171677,
-0.01098018977791071,
0.024047447368502617,
0.017490731552243233,
0.018109463155269623,
0.03762261942028999,
-0.02517409436404705,
0.02585747092962265,
-0.05474395677447319,
0.015209733508527279,
-0.0063997237011790276,
0.0008940451079979539,
-0.018488090485334396,
0.01206989772617817,
-0.04218461737036705,
-0.04547220841050148,
0.014646410010755062,
0.03315297141671181,
-0.016604190692305565,
0.008860801346600056,
-0.06977823376655579,
0.027464326471090317,
-0.01792476698756218,
-0.036477502435445786,
0.0071754478849470615,
0.0313614159822464,
0.004779014736413956,
-0.03415032848715782,
0.08909745514392853,
0.026891769841313362,
0.009359480813145638,
0.02277304418385029,
0.08931908756494522,
0.011746679432690144,
0.09559876471757889,
0.05555662140250206,
-0.02781525067985058,
0.015930049121379852,
0.03400257229804993,
0.03793660178780556,
-0.008385208435356617,
0.019503921270370483,
-0.0006447052001021802,
-0.054854776710271835,
-0.0640157088637352,
-0.026947177946567535,
-0.02657778561115265,
0.0014417847851291299,
0.10557235777378082,
-0.01062003243714571,
0.00027141685131937265,
0.019134527072310448,
-0.03106590360403061,
0.013344301842153072,
-0.0381951779127121,
-0.01739838346838951,
-0.04765162244439125,
0.006062653381377459,
0.014683349058032036,
-0.07136661559343338,
0.01421237364411354,
0.05832706391811371,
0.022717634215950966,
0.024084387347102165,
0.027722902595996857,
0.04170440509915352,
-0.03900784254074097,
-0.034427374601364136,
-0.02901577576994896,
-0.03845375031232834,
0.012540873140096664,
-0.03743792325258255,
0.017961706966161728,
0.02550654672086239,
0.012420820072293282,
0.025691242888569832,
-0.03291286528110504,
0.025783590972423553,
0.07195764780044556,
-0.036089640110731125,
0.005540886428207159,
0.029606804251670837,
0.12345094978809357,
-0.0006170007982291281,
-0.022495999932289124,
0.0204643402248621,
-0.01707516424357891,
0.02282845228910446,
-0.01252240315079689,
-0.01786012388765812,
-0.006847612094134092,
0.03464901074767113,
0.02401050738990307,
0.01619785837829113,
-0.06671227514743805,
-0.01008441299200058,
0.006030331365764141,
-0.005023736972361803,
0.0005304244696162641,
-0.00328066642396152,
-0.06719247996807098,
0.050200432538986206,
0.0029182001017034054,
0.04362524673342705,
-0.006556715816259384,
-0.009622672572731972,
0.02944057621061802,
0.050754521042108536,
-0.04052234813570976,
-0.005296164192259312,
0.015126620419323444,
-0.03184162825345993,
0.011645096354186535,
-0.02231130376458168,
-0.08658558875322342,
0.0016276354435831308,
0.026466967537999153,
0.016207093372941017,
0.02914506196975708,
-0.020963020622730255,
0.05544580519199371,
-0.007960407063364983,
0.012337706983089447,
0.020076477900147438,
-0.006644446402788162,
-0.006741411983966827,
-0.025414198637008667,
0.02153557911515236,
0.03125059977173805,
-0.056517042219638824,
0.0054577733390033245,
0.0347413569688797,
-0.057292766869068146,
0.047614686191082,
-0.013131900690495968,
-0.0065428633242845535,
0.010629267431795597,
0.046395689249038696,
-0.03385481610894203,
0.03171234205365181,
0.02761208452284336,
0.00951185543090105,
-0.009835073724389076,
-0.011977549642324448,
-0.06283365190029144,
0.009230193682014942,
0.010112117975950241,
-0.04296033829450607,
-0.009770429693162441,
-0.04691283777356148,
-0.042332373559474945,
-0.04111337661743164,
0.08015815913677216,
0.03723475709557533,
-0.06368325650691986,
-0.024675413966178894,
-0.01889442279934883,
-0.018109463155269623,
0.05385741591453552,
-0.0038763119373470545,
0.04676508158445358,
-0.09330853074789047,
-0.010693910531699657,
0.015228202566504478,
-0.05201045423746109,
0.011691270396113396,
0.04591548070311546,
-0.053746599704027176,
-0.03150917589664459,
-0.024527657777071,
0.03723475709557533,
-0.026559315621852875,
0.021166186779737473,
-0.042849522083997726,
-0.012032958678901196,
0.00745710963383317,
-0.0557413175702095,
-0.10860137641429901,
0.052638422697782516,
-0.005720965098589659,
0.04384688287973404,
-0.043403610587120056,
0.04236931353807449,
0.0030867354944348335,
0.031564582139253616,
-0.09183096140623093,
0.005559355951845646,
0.049129191786050797,
-0.012697865255177021,
0.00540698179975152,
-0.05385741591453552,
-0.03315297141671181,
0.006201175507158041,
0.052416786551475525,
-0.03444584459066391,
-0.030567223206162453,
-0.008098929189145565,
-0.06043260172009468,
-0.01175591442734003,
0.049129191786050797,
0.004324200097471476,
-0.01749996654689312,
0.01675194688141346,
-0.03970968723297119,
-0.018488090485334396,
0.01846962235867977,
0.014240078628063202,
0.009687316603958607,
0.0017026682617142797,
-0.000662597652990371,
-0.0571080707013607,
-0.001654185471124947,
0.04159358888864517,
-0.0558151975274086,
0.08267002552747726,
0.013547467067837715,
-0.0031559965573251247,
-0.03427961841225624,
0.0050560589879751205,
0.05193657428026199,
-0.02615298330783844,
0.04868592321872711,
0.011488104239106178,
-0.023825811222195625,
-0.017352210357785225,
-0.015329785645008087,
-0.058400943875312805,
0.018460387364029884,
0.03470442071557045,
0.07144049555063248,
0.008819243870675564,
-0.006011861842125654,
-0.005540886428207159,
-0.01645643264055252,
-0.01339971087872982,
0.03494452312588692,
0.07927161455154419,
-0.01525590755045414,
-0.059509120881557465,
-0.015375959686934948,
0.0022371329832822084,
-0.04447484761476517,
-0.016678068786859512,
0.015098915435373783,
0.014600235968828201,
-0.07513441890478134,
-0.01544983871281147,
-0.01132187806069851,
-0.008537582121789455,
-0.009294836781919003,
0.00895776692777872,
0.04584160074591637,
-0.012485464103519917,
-0.009613437578082085,
0.024472247809171677,
0.041002560406923294,
0.019559329375624657,
-0.04447484761476517,
0.0009661921067163348,
0.04676508158445358,
-0.022403651848435402,
-0.029976196587085724,
-0.027981476858258247,
0.019116058945655823,
0.033651649951934814,
-0.05559356138110161,
0.023345600813627243,
-0.05888115242123604,
-0.015200498513877392,
0.06918720155954361,
-0.03054875321686268,
-0.004446561448276043,
-0.003908633720129728,
0.008158955723047256,
0.020445870235562325,
0.003843989921733737,
0.007928085513412952,
0.0409286804497242,
0.05289699509739876,
0.04539832845330238,
-0.07772016525268555,
-0.006233497057110071,
-0.025968287140130997,
-0.02413979545235634,
0.029736090451478958,
-0.02833239920437336,
0.0026988734025508165,
0.0005154178943485022,
0.03106590360403061,
-0.028868017718195915,
-0.013695224188268185,
-0.05954606086015701,
0.00018325327255297452,
-0.0028974218294024467,
0.04118725657463074,
0.026762481778860092,
-0.04683896154165268,
-0.04580466076731682,
0.032543472945690155,
-0.05714501067996025,
-0.03653291240334511,
-0.02559889480471611,
-0.013879920355975628,
-0.014369365759193897,
-0.023751933127641678,
-0.0075494577176868916,
0.07764629274606705,
-0.01237464603036642,
0.06726635992527008,
0.041852161288261414,
0.04414239525794983,
-0.004471957217901945,
0.05337720736861229,
-0.01831262931227684,
0.008066607639193535,
-0.03717934712767601,
0.024250613525509834,
-0.010924780741333961,
-0.03300521522760391,
0.024933988228440285,
-0.030364057049155235,
-0.0010533456224948168,
-0.0787544697523117,
-0.004007908049970865,
0.04447484761476517,
0.008823861368000507,
0.015135854482650757,
0.03845375031232834,
-0.020058009773492813,
0.027630554512143135,
0.0627967119216919,
0.03424267843365669,
-0.02606063522398472,
-0.04377300292253494,
-0.03789966180920601,
-0.017675427719950676,
-0.012337706983089447,
0.02781525067985058,
-0.07446951419115067,
0.011635861359536648,
0.029385168105363846,
-0.012485464103519917,
0.03627433627843857,
0.016696538776159286,
-0.006201175507158041,
0.026651663705706596,
-0.03952499106526375,
-0.02423214353621006,
-0.006021096836775541,
0.04362524673342705,
0.022532938048243523,
0.00047963298857212067,
0.05888115242123604,
0.04432709142565727,
0.006122679449617863,
0.046432629227638245,
0.02393662929534912,
0.00991818681359291,
-0.022255893796682358,
0.03368858993053436,
0.04347749054431915,
0.00987201277166605,
-0.05969381704926491,
0.04598935693502426,
-0.021129246801137924,
0.0381951779127121,
0.0013448193203657866,
-0.04140889272093773,
0.013113431632518768,
-0.04513975605368614,
0.010730850510299206,
-0.009082436561584473,
-0.004331126343458891,
-0.02495245821774006,
-0.08111857622861862,
0.03629280626773834,
-0.02761208452284336,
0.026134515181183815,
-0.02559889480471611,
0.04927695170044899,
-0.01040763221681118,
0.03577565774321556,
-0.008246686309576035,
-0.1035776361823082,
-0.06268589198589325,
-0.0517888180911541,
-0.0422954335808754,
0.07454339414834976,
0.04539832845330238,
0.016050100326538086,
0.013445884920656681,
0.030844267457723618,
0.025266442447900772,
-0.03834293410181999,
-0.0024495336692780256,
-0.0045227487571537495,
-0.019670147448778152,
0.0029528308659791946,
0.03099202550947666,
-0.013427414931356907,
0.026171453297138214,
0.03658831864595413,
-0.008011198602616787,
0.019633207470178604,
0.02611604519188404,
-0.017573844641447067,
-0.029773030430078506,
0.0031698488164693117,
0.03512921929359436,
-0.023105496540665627,
0.041298072785139084,
-0.027704432606697083,
-0.02393662929534912,
-0.02101842872798443,
0.0016588028520345688,
0.001337893190793693,
0.022385181859135628,
0.0180171150714159,
-0.00687993410974741,
-0.007526370696723461,
-0.02705799601972103,
0.02273610420525074,
-0.026171453297138214,
-0.08813703060150146,
0.0064551327377557755,
0.0080019636079669,
-0.023992039263248444,
0.020279644057154655,
0.029255880042910576,
-0.04635874927043915,
0.08237451314926147,
-0.0033176057040691376,
-0.031860098242759705,
0.0558151975274086,
-0.0024402986746281385,
-0.041556648910045624,
-0.04731917008757591,
-0.02371499501168728,
-0.01632714457809925,
0.004176442977041006,
-0.01570841297507286,
-0.006030331365764141,
0.056517042219638824,
-0.05858564004302025,
0.011451165191829205,
-0.05836400389671326,
0.01846962235867977,
-0.05008961260318756,
0.0010920163476839662,
-0.01652107574045658,
0.008551434613764286,
0.0190237108618021,
0.02059362828731537,
-0.012882561422884464,
-0.032709699124097824,
0.023327132686972618,
-0.0407809242606163,
-0.0031398357823491096,
-0.05304475501179695,
0.04550914838910103,
0.0761687159538269,
0.03333766758441925,
0.04813183471560478,
0.04118725657463074,
-0.04436403140425682,
0.019411573186516762,
-0.05212127044796944,
-0.02787065878510475,
0.0115619832649827,
0.0030982790049165487,
0.008274390362203121,
-0.010684676468372345,
0.004633566364645958,
0.030105482786893845,
0.0408548042178154,
0.030714981257915497,
0.010352223180234432,
-0.07014762610197067,
0.009705786593258381,
0.005905661731958389,
0.0640157088637352,
0.008486791513860226,
0.04196298122406006,
-0.03439043462276459,
-0.0067137074656784534,
0.0599154531955719,
-0.007281648460775614,
-0.0028004564810544252,
-0.011497339233756065,
-0.00411410816013813,
0.01327042281627655,
0.02897883579134941,
-0.008606843650341034,
0.037123940885066986,
-0.05939830467104912,
-0.0053423382341861725,
-0.03161999210715294,
-0.0374748632311821,
0.08104469627141953,
0.03564636781811714,
0.05751440301537514,
-0.06072811409831047,
-0.017019756138324738,
0.031860098242759705,
0.046100176870822906,
0.03919253870844841,
0.0025118684861809015,
0.022680696099996567,
-0.06013708934187889,
-0.06131914258003235,
-0.005545503925532103,
0.005397746805101633,
0.09301301091909409,
-0.02829546108841896,
-0.04602629691362381,
0.01431395672261715,
-0.028904957696795464,
0.006275054067373276,
-0.04048541188240051,
0.010222935117781162,
0.019503921270370483,
0.02068597637116909,
-0.004755927715450525,
0.04347749054431915,
0.021184656769037247,
-0.02124006487429142,
0.027021056041121483,
-0.0021459392737597227,
0.01987331360578537,
0.04118725657463074,
0.003855533432215452,
0.000820743793155998,
-0.01559759583324194,
-0.017490731552243233,
0.04709753394126892,
0.025229502469301224,
-0.0017811640864238143,
0.0006995369330979884,
-0.05559356138110161,
-0.03930335491895676,
0.03250653296709061,
-0.00938256736844778,
-0.06597349047660828,
-0.06490225344896317,
-0.00270810816437006,
0.0011295328149572015,
-0.0037955071311444044,
-0.030400997027754784,
0.010306049138307571,
0.01685352995991707,
0.024527657777071,
-0.021258534863591194,
0.02713187411427498,
-0.007013838738203049,
-0.012254593893885612,
0.05563050135970116,
-0.013926094397902489,
0.004167208448052406,
0.024527657777071,
0.0041995299980044365,
-0.00798811111599207,
0.029459046199917793,
-0.026651663705706596,
-0.023604176938533783,
0.015699177980422974,
0.03291286528110504,
-0.09382567554712296,
-0.0022371329832822084,
-0.007701832335442305,
0.022532938048243523,
0.006108827423304319,
-0.045878540724515915,
-0.003269122913479805,
-0.04000519961118698,
0.007046160753816366,
0.006390489172190428,
0.0788283422589302,
-0.02146170102059841,
-0.003052104962989688,
-0.03930335491895676
] |
52,300 |
flexget.manager
|
release_lock
| null |
def release_lock(self) -> None:
try:
os.remove(self.lockfile)
except OSError as e:
if e.errno != errno.ENOENT:
raise
logger.debug(f'Lockfile {self.lockfile} not found')
else:
logger.debug(f'Removed {self.lockfile}')
|
(self) -> NoneType
|
[
0.06566040217876434,
0.019006958231329918,
-0.007705759722739458,
0.022096244618296623,
-0.022113697603344917,
-0.0519418828189373,
-0.04307545721530914,
0.08740757405757904,
-0.03283020108938217,
0.00045570230577141047,
-0.007810481358319521,
-0.03475009649991989,
0.0051182652823626995,
-0.03003762662410736,
-0.02811773307621479,
-0.007670852355659008,
0.005851315800100565,
-0.027681393548846245,
-0.05878368765115738,
-0.0352911576628685,
-0.010192896239459515,
0.006597456987947226,
-0.010140535421669483,
-0.011048122309148312,
0.004655744880437851,
-0.003981600049883127,
0.04028288275003433,
0.027087971568107605,
-0.01984473131597042,
-0.026407280936837196,
0.028554072603583336,
0.018500804901123047,
0.03982909023761749,
0.019600380212068558,
0.02094430662691593,
0.04691524803638458,
-0.01266257930546999,
-0.023195819929242134,
-0.016214383766055107,
0.011973162181675434,
0.057073239237070084,
0.018762608990073204,
0.0071297911927104,
-0.04164426401257515,
-0.02312600612640381,
-0.0017191785154864192,
-0.049079492688179016,
-0.03537842631340027,
0.0030652866698801517,
0.010899766348302364,
0.022794388234615326,
0.013744701631367207,
-0.0539315901696682,
-0.0003591621352825314,
-0.022043883800506592,
0.01657218299806118,
0.014189768582582474,
0.01625801809132099,
0.002670399146154523,
-0.03354579955339432,
0.03672235086560249,
0.0158129520714283,
-0.022148605436086655,
-0.04914930835366249,
-0.010061994194984436,
0.018169187009334564,
-0.0018937144195660949,
0.021747171878814697,
0.07386358827352524,
-0.020874492824077606,
-0.017977196723222733,
-0.018710248172283173,
-0.026983249932527542,
0.03864224627614021,
0.04499535262584686,
0.024312850087881088,
-0.014661015011370182,
-0.00724760303273797,
0.05162771791219711,
-0.03916585445404053,
0.024295397102832794,
-0.06489244848489761,
-0.025168076157569885,
0.011301198974251747,
0.006632363889366388,
0.0006288746371865273,
0.058539338409900665,
-0.044052861630916595,
-0.06360088288784027,
-0.0024893181398510933,
-0.013064011931419373,
0.06478772312402725,
-0.04653127118945122,
-0.009939819574356079,
0.061646077781915665,
-0.04447174444794655,
-0.006392376963049173,
-0.03605911508202553,
-0.0355704165995121,
0.003983781673014164,
0.037874288856983185,
0.007539950776845217,
-0.02249767631292343,
-0.011632817797362804,
0.02075231820344925,
-0.0061654807068407536,
0.01815173216164112,
-0.042726386338472366,
-0.021502822637557983,
0.004121228586882353,
-0.09026996791362762,
-0.03422648832201958,
-0.0302121639251709,
0.036547817289829254,
-0.006819989997893572,
-0.012173878960311413,
-0.010184169746935368,
0.003015107475221157,
0.05092957243323326,
-0.0224453154951334,
0.045239705592393875,
0.0074177756905555725,
-0.02789083682000637,
-0.014835551381111145,
0.00017412682063877583,
0.046147290617227554,
-0.031154656782746315,
0.0759580209851265,
0.04935875162482262,
0.013517805375158787,
-0.024295397102832794,
0.02317836694419384,
0.01843099109828472,
-0.04548405483365059,
-0.03127683326601982,
-0.022846749052405357,
0.04890495911240578,
-0.0021391555201262236,
0.02349253185093403,
-0.001840262790210545,
-0.0022536946926265955,
-0.04506516829133034,
0.008307908661663532,
-0.0632518082857132,
0.03181789442896843,
0.056479815393686295,
-0.0516626238822937,
0.02605820819735527,
0.017313960939645767,
-0.00808973889797926,
0.01942584477365017,
-0.015280617401003838,
0.046566177159547806,
0.013971598818898201,
0.01905931904911995,
-0.008635163307189941,
-0.07588820904493332,
0.026040755212306976,
0.002032252261415124,
0.009747829288244247,
0.06147154048085213,
0.039480019360780716,
0.03296982869505882,
-0.029287124052643776,
-0.017977196723222733,
-0.047334134578704834,
-0.014102499932050705,
0.020455606281757355,
0.008656980469822884,
-0.07012852281332016,
-0.04307545721530914,
0.007640308700501919,
0.017977196723222733,
0.048486072570085526,
-0.023579798638820648,
0.015682050958275795,
-0.002818754641339183,
0.010594328865408897,
0.01314255315810442,
0.003748158225789666,
-0.02029852382838726,
-0.039480019360780716,
0.01414613425731659,
0.011336106806993484,
0.027175238355994225,
-0.012854568660259247,
-0.038607340306043625,
-0.007055613677948713,
-0.004433211870491505,
-0.028449350968003273,
-0.055886395275592804,
0.017174331471323967,
-0.008264274336397648,
0.016755446791648865,
0.051034294068813324,
0.02907768078148365,
-0.01456502079963684,
-0.0030238344334065914,
-0.006990162655711174,
-0.010349978692829609,
0.024696828797459602,
0.0013253819197416306,
0.0013853786513209343,
0.04223768785595894,
0.04960310086607933,
-0.04551896080374718,
0.06290273368358612,
-0.059412017464637756,
0.034034498035907745,
0.03448829427361488,
-0.013893057592213154,
0.018204092979431152,
-0.04014325514435768,
0.0180644653737545,
0.04014325514435768,
-0.03871206194162369,
0.05211641639471054,
0.005157535895705223,
-0.032166965305805206,
0.03305709734559059,
-0.04764829948544502,
0.0316259041428566,
0.00081704615149647,
-0.02405104599893093,
-0.03413921967148781,
0.004328490234911442,
-0.0048433709889650345,
0.05124373733997345,
0.03630346432328224,
0.05672416463494301,
0.024347757920622826,
0.03735068067908287,
-0.009232948534190655,
0.0017922654515132308,
-0.021677358075976372,
-0.04429721087217331,
-0.07246730476617813,
-0.030299430713057518,
-0.030613595619797707,
-0.01775902695953846,
-0.019408391788601875,
-0.050405967980623245,
0.016868894919753075,
0.015507514588534832,
0.07532969117164612,
-0.013474171049892902,
-0.00927658285945654,
-0.009381304495036602,
0.040946122258901596,
-0.05386177822947502,
0.016528548672795296,
0.04370378702878952,
0.032760389149188995,
0.017409956082701683,
-0.00457284040749073,
-0.06897658854722977,
0.019356030970811844,
-0.05784119665622711,
0.013814516365528107,
0.057212866842746735,
0.03199242800474167,
-0.07491080462932587,
0.014940273016691208,
-0.039235670119524,
0.04618219658732414,
-0.01755831018090248,
0.05330326408147812,
-0.0006065122433938086,
0.01688634790480137,
-0.013177460059523582,
0.04499535262584686,
-0.017296507954597473,
0.029095133766531944,
-0.036233652383089066,
0.013386903330683708,
0.0017944471910595894,
0.024941179901361465,
-0.025674229487776756,
0.013840696774423122,
0.06628873199224472,
0.043633975088596344,
0.01778520829975605,
0.0849640741944313,
0.04412267357110977,
0.03927057608962059,
0.037280868738889694,
0.02405104599893093,
0.002319145714864135,
-0.0027773024048656225,
0.02094430662691593,
-0.006270201876759529,
-0.023440171033143997,
0.021607544273138046,
0.0327429324388504,
0.054839178919792175,
0.007033796515315771,
-0.06168098375201225,
-0.0037874288391321898,
0.0618206150829792,
0.0003346180310472846,
0.002030070638284087,
0.04328490048646927,
-0.05243058130145073,
0.003545260289683938,
-0.023073645308613777,
-0.08698868751525879,
-0.018134279176592827,
0.04792755842208862,
0.0005312436260282993,
0.03836299106478691,
0.021223565563559532,
0.021415553987026215,
-0.019356030970811844,
0.018675340339541435,
0.05180225521326065,
0.0017486314754933119,
-0.038153547793626785,
0.04429721087217331,
-0.002738031791523099,
-0.030700864270329475,
0.005995308049023151,
0.005074630957096815,
0.042342409491539,
0.02975836955010891,
0.011048122309148312,
-0.028170093894004822,
-0.03710633143782616,
0.08622073382139206,
-0.04227259382605553,
0.023335449397563934,
-0.029880546033382416,
0.0239986851811409,
0.025936033576726913,
-0.009756556712090969,
-0.05829498916864395,
-0.010070720687508583,
0.061925336718559265,
-0.053233448415994644,
-0.005340798292309046,
0.024155767634510994,
-0.06360088288784027,
-0.021590089425444603,
0.04167916998267174,
-0.02605820819735527,
-0.12015050649642944,
0.04084140062332153,
0.008713704533874989,
-0.0066541810519993305,
0.024766642600297928,
-0.0036347100976854563,
0.014783190563321114,
0.0638103261590004,
0.01823900081217289,
-0.007265056483447552,
-0.028082825243473053,
-0.08566221594810486,
-0.013543985784053802,
0.01467846892774105,
0.027960650622844696,
-0.02134574018418789,
-0.02755921706557274,
-0.016511095687747,
-0.051278647035360336,
-0.023021284490823746,
-0.04087630659341812,
-0.02888569049537182,
-0.11051613092422485,
-0.014486479572951794,
0.021555183455348015,
0.04014325514435768,
-0.015324251726269722,
-0.03672235086560249,
-0.00022935107699595392,
0.05113901570439339,
0.047054875642061234,
0.059272389858961105,
0.041714079678058624,
0.009477298706769943,
0.016240565106272697,
-0.0479973703622818,
-0.0383978970348835,
-0.020281070843338966,
0.027629032731056213,
-0.03328399360179901,
-0.06730104237794876,
-0.0002061705308733508,
-0.008770428597927094,
-0.05979599803686142,
0.04279620200395584,
0.043354716151952744,
0.018570618703961372,
-0.022200966253876686,
0.05065031722187996,
-0.013683614321053028,
0.0011835715267807245,
0.011187750846147537,
-0.040981028228998184,
-0.008587165735661983,
0.05375705659389496,
0.007352324668318033,
-0.027087971568107605,
0.011065575294196606,
-0.08747739344835281,
-0.024469932541251183,
0.03644309565424919,
0.017409956082701683,
0.003785247216001153,
-0.0030172893311828375,
0.056898701936006546,
-0.0383978970348835,
-0.03258585184812546,
0.015970034524798393,
0.04352925345301628,
0.01240950170904398,
0.04164426401257515,
0.05075503885746002,
0.05002198740839958,
-0.04443683847784996,
0.02422558143734932,
0.022776933386921883,
0.0169387087225914,
0.07110592722892761,
-0.040387604385614395,
-0.03630346432328224,
-0.07218804955482483,
-0.03422648832201958,
-0.028466803953051567,
0.005676779896020889,
-0.0025656777434051037,
0.025255344808101654,
-0.035814765840768814,
0.01702597737312317,
-0.002916931174695492,
0.021502822637557983,
-0.040073443204164505,
0.01549878716468811,
-0.024801550433039665,
-0.023649614304304123,
-0.01869279518723488,
-0.0485558845102787,
0.045239705592393875,
-0.006200387608259916,
0.015594782307744026,
-0.0269657950848341,
0.015079901553690434,
0.022829294204711914,
0.004116865340620279,
0.04639163985848427,
0.050999388098716736,
-0.013317088596522808,
-0.03337126225233078,
0.010184169746935368,
-0.049219124019145966,
0.011711358092725277,
-0.09110773354768753,
-0.01843099109828472,
-0.028187546879053116,
-0.044646281749010086,
0.035552963614463806,
-0.014189768582582474,
-0.0013144734548404813,
0.08133372664451599,
0.061506450176239014,
-0.00534952525049448,
0.012025522999465466,
-0.0005167898489162326,
0.055711857974529266,
0.010952127166092396,
-0.008177006617188454,
0.006200387608259916,
0.040387604385614395,
-0.04384341835975647,
-0.03707142546772957,
-0.0003160735941492021,
-0.04223768785595894,
0.005493517499417067,
0.055607136338949203,
0.029496565461158752,
0.04841625690460205,
-0.00319400685839355,
-0.023789241909980774,
-0.01247931644320488,
0.020682504400610924,
0.019321123138070107,
-0.003143827896565199,
0.052046604454517365,
0.020490514114499092,
-0.05180225521326065,
-0.012653852812945843,
-0.01758449152112007,
-0.025499694049358368,
-0.07686560600996017,
-0.01501881331205368,
-0.0020420700311660767,
0.04782283678650856,
-0.061506450176239014,
-0.062379129230976105,
0.005772774573415518,
-0.011510642245411873,
-0.07162953168153763,
0.015062447637319565,
-0.0127760274335742,
-0.025883672758936882,
-0.015280617401003838,
0.05002198740839958,
0.05274474620819092,
0.026320012286305428,
-0.04478590935468674,
-0.011824807152152061,
-0.008822789415717125,
-0.025517147034406662,
0.00887951347976923,
0.008827152661979198,
0.02134574018418789,
0.024260489270091057,
0.024853911250829697,
-0.043319810181856155,
-0.017610670998692513,
-0.012278600595891476,
-0.002528588753193617,
0.002668217523023486,
-0.01855316571891308,
0.049533285200595856,
-0.025290250778198242,
-0.054559919983148575,
-0.04370378702878952,
0.007950110360980034,
0.00828609149903059,
0.03265566751360893,
0.019687648862600327,
-0.014224675484001637,
-0.01815173216164112,
-0.04237731546163559,
-0.049219124019145966,
-0.004633928183466196,
0.022148605436086655,
-0.03235895559191704,
-0.05065031722187996,
-0.013229820877313614,
-0.040213070809841156,
0.03448829427361488,
0.012418229132890701,
0.04373869672417641,
0.03195752203464508,
0.011632817797362804,
0.033859964460134506,
-0.05564204230904579,
0.01348289754241705,
-0.0037372498773038387,
0.017043430358171463,
0.026686538010835648,
0.04677562043070793,
0.07519005984067917,
-0.04220277816057205,
-0.0025176801718771458,
-0.0008492261986248195,
-0.023387810215353966,
-0.027768660336732864,
0.040387604385614395,
-0.013421810232102871,
0.0015828224131837487,
0.028554072603583336,
0.003656527027487755,
0.039654556661844254,
0.04604256898164749,
-0.044227395206689835,
0.020682504400610924,
-0.0030849219765514135,
0.07979781180620193,
0.030508873984217644,
0.014521386474370956,
-0.07260692864656448,
0.08636035770177841,
-0.03548314794898033,
0.011711358092725277,
-0.027803568169474602,
0.014250855892896652,
0.015036267228424549,
-0.009747829288244247,
-0.027314867824316025,
0.007710122969001532,
-0.062379129230976105,
-0.027210146188735962,
-0.07581838965415955,
-0.05742231011390686,
-0.0034928997047245502,
0.024853911250829697,
0.018500804901123047,
-0.06021488457918167,
0.05229095369577408,
-0.011231385171413422,
0.02139810100197792,
0.053198542445898056,
-0.02359725348651409,
-0.039794184267520905,
0.04618219658732414,
0.058818597346544266,
-0.017802661284804344,
-0.024016140028834343,
0.05878368765115738,
0.043040551245212555,
-0.03560532256960869,
0.019670195877552032,
0.038013916462659836,
-0.05113901570439339,
0.1140766590833664,
-0.04667089879512787,
-0.02312600612640381,
-0.0018293543253093958,
-0.00023003284877631813,
-0.036128930747509,
-0.012714940123260021,
0.01725287362933159,
0.06262347847223282,
0.001701724948361516,
0.04918421432375908,
0.010934674181044102,
-0.034575559198856354,
-0.0508248507976532,
0.04146973043680191,
0.034854818135499954,
-0.01040233951061964,
-0.005593875423073769,
-0.010978307574987411,
-0.011563003063201904,
0.010027087293565273,
0.029234763234853745,
0.03752521798014641,
0.0020998849067837,
0.05257021263241768,
-0.022881655022501945,
-0.06021488457918167,
0.041434820741415024,
0.04073667898774147,
-0.0010930310236290097,
0.040387604385614395,
-0.022183511406183243,
-0.007587947882711887,
0.03780447319149971,
-0.024068498983979225,
0.029793277382850647,
-0.0618206150829792,
-0.059132762253284454,
0.006191660650074482,
-0.019181495532393456,
-0.05801573023200035,
0.018797514960169792,
-0.012435682117938995,
0.021694811061024666,
0.010114355012774467,
-0.00728251039981842,
-0.02061268873512745,
0.029199855402112007,
-0.02286420203745365,
0.044227395206689835,
-0.06513679772615433,
0.02143300697207451,
0.0007537768688052893,
-0.0482766292989254,
0.06230931356549263,
-0.0389564111828804,
-0.02312600612640381,
-0.02961874194443226,
0.040701769292354584,
-0.009791463613510132,
-0.04719450697302818,
-0.02733232080936432,
0.030439060181379318,
-0.058085545897483826,
0.023300541564822197,
-0.008953691460192204,
-0.04426230117678642,
-0.048486072570085526,
-0.018134279176592827,
-0.029793277382850647,
0.006702178157866001,
0.041399914771318436,
-0.004025233909487724,
-0.01572568342089653,
0.007539950776845217,
-0.07358433306217194,
0.00024025957100093365,
-0.0020355249289423227,
-0.057631753385066986,
0.01572568342089653,
0.07309563457965851,
-0.008691887371242046,
0.021136296913027763,
-0.029880546033382416,
-0.016755446791648865,
0.022323140874505043,
-0.045553866773843765,
-0.022968923673033714,
-0.01414613425731659,
-0.08775664865970612,
-0.024522293359041214,
0.050859760493040085,
0.07449191808700562,
-0.032027337700128555,
-0.010253983549773693,
0.03155608847737312,
-0.04618219658732414,
0.06283292174339294,
0.04653127118945122,
-0.02295147068798542,
-0.021607544273138046,
0.017313960939645767,
0.000864498084411025,
-0.022340593859553337,
-0.018675340339541435,
0.03853752464056015,
-0.04977763816714287,
0.04900968074798584,
0.04028288275003433,
0.08670943230390549,
0.017828840762376785,
-0.08615091443061829,
-0.023649614304304123,
0.04859079420566559,
-0.07204841822385788,
-0.042342409491539,
0.044925540685653687,
0.007243239786475897,
-0.021014122292399406,
0.01307273842394352,
-0.0488351434469223,
-0.043494343757629395,
-0.004559750203043222,
-0.007583584636449814,
0.047019969671964645,
-0.02820499986410141,
-0.025499694049358368,
-0.04283110797405243,
0.008901330642402172,
0.026267651468515396,
-0.01254913117736578,
0.03996872156858444,
0.054839178919792175,
0.09369086474180222,
0.03345853090286255,
-0.0010084902169182897,
0.0159525815397501,
-0.03450574725866318,
-0.005764048080891371,
0.08517351746559143,
0.026442188769578934,
-0.03591948747634888,
0.07323525846004486,
-0.0479973703622818,
-0.041714079678058624,
-0.018954597413539886,
-0.016729265451431274,
0.028449350968003273,
0.039026226848363876,
0.025028446689248085,
-0.07267674803733826,
0.013343269005417824,
-0.006977072451263666,
0.0032027335837483406,
0.015175895765423775,
0.03141646087169647,
0.011676451191306114,
-0.03794410452246666,
-0.034453384578228,
0.024487385526299477,
-0.04108574986457825,
-0.017628125846385956,
-0.02179953269660473
] |
52,301 |
flexget.manager
|
save_config
|
Dumps current config to yaml config file
|
def save_config(self) -> None:
"""Dumps current config to yaml config file"""
# TODO: Only keep x number of backups..
# Back up the user's current config before overwriting
try:
self.backup_config()
except OSError:
return
with open(self.config_path, 'w') as config_file:
config_file.write(yaml.dump(self.user_config, default_flow_style=False))
|
(self) -> NoneType
|
[
-0.027205748483538628,
-0.027785390615463257,
-0.0016664689173921943,
-0.016706760972738266,
-0.0000766914599807933,
-0.015248307958245277,
-0.07393231987953186,
-0.03586297482252121,
0.0035316054709255695,
-0.0060254656709730625,
-0.05628130957484245,
-0.11039363592863083,
-0.01263057254254818,
0.015519430860877037,
0.027542315423488617,
0.028738994151353836,
0.017763203009963036,
-0.03318914398550987,
0.008418823592364788,
0.027317937463521957,
0.04947519674897194,
-0.0761386975646019,
0.009068583138287067,
0.008853554725646973,
0.02445712685585022,
-0.0004756331618409604,
0.03993916139006615,
0.012929742224514484,
-0.040649689733982086,
0.007231493480503559,
-0.05104583874344826,
-0.012368799187242985,
0.04812893271446228,
-0.02275559864938259,
0.004700236953794956,
-0.01091034710407257,
-0.017819298431277275,
0.0667896419763565,
-0.06260126829147339,
-0.014173166826367378,
-0.02320435270667076,
-0.003218411933630705,
0.0028374381363391876,
-0.003884532256051898,
0.018286751583218575,
0.08511379361152649,
-0.031300634145736694,
0.09842684864997864,
0.016921788454055786,
-0.009629526175558567,
-0.0065910834819078445,
-0.02425144799053669,
-0.04610953852534294,
0.06589213758707047,
0.01194809190928936,
-0.0493256114423275,
0.05975915491580963,
-0.028196748346090317,
0.009685620665550232,
-0.017202259972691536,
-0.013163468800485134,
-0.007712970022112131,
0.0750168114900589,
-0.02503676898777485,
0.028738994151353836,
-0.0005594824906438589,
-0.0776345506310463,
-0.008072908967733383,
-0.0024751622695475817,
0.0011522709392011166,
0.0015823275316506624,
-0.08608609437942505,
0.01302323304116726,
-0.004557664040476084,
-0.03726533055305481,
-0.02453191950917244,
-0.03332003206014633,
0.008918997831642628,
-0.028626805171370506,
-0.003202051157131791,
-0.05643089488148689,
-0.042856067419052124,
-0.018445685505867004,
0.020624013617634773,
-0.029617805033922195,
0.013705713674426079,
0.0690334215760231,
-0.008755389600992203,
0.028907276690006256,
0.03182418271899223,
0.05112063139677048,
0.05018572509288788,
0.008867578580975533,
0.03253471106290817,
0.017903439700603485,
-0.0783824697136879,
-0.044351913034915924,
0.03651740774512291,
0.03548901155591011,
-0.030384426936507225,
-0.06566775590181351,
0.0017377554904669523,
-0.0006889084470458329,
-0.04827851802110672,
-0.014014232903718948,
-0.06106802448630333,
0.007843856699764729,
0.02552291937172413,
-0.03547031432390213,
0.012761459685862064,
-0.06241428852081299,
-0.02307346649467945,
-0.014060977846384048,
-0.004214086569845676,
0.07643786817789078,
-0.026813087984919548,
0.012050931341946125,
0.03449800983071327,
-0.010003488510847092,
-0.02464410848915577,
-0.02241903357207775,
0.005515942350029945,
0.006955696735531092,
0.014967836439609528,
-0.040724482387304306,
0.018464382737874985,
0.012845600955188274,
0.028813786804676056,
-0.020605316385626793,
0.013518732972443104,
0.0012925068149343133,
0.03827502951025963,
-0.02570989914238453,
-0.03859289735555649,
0.0934157520532608,
-0.07064145803451538,
0.013602874241769314,
0.03189897537231445,
0.0015846648020669818,
0.02290518395602703,
0.009788460098206997,
-0.015538129024207592,
0.020455731078982353,
-0.016856346279382706,
0.04910123348236084,
0.02251252345740795,
-0.02470020204782486,
0.027654502540826797,
-0.013630921952426434,
-0.019333845004439354,
0.06503202021121979,
0.04700704663991928,
-0.10328835248947144,
-0.03518984094262123,
-0.0237279012799263,
-0.016753505915403366,
-0.007329658605158329,
0.027691898867487907,
-0.020717505365610123,
-0.03311435133218765,
-0.02290518395602703,
0.04005134850740433,
0.04667048156261444,
0.0010202155681326985,
-0.04947519674897194,
-0.007231493480503559,
-0.0067313192412257195,
0.041921161115169525,
0.07101541757583618,
-0.008624502457678318,
-0.03907904773950577,
-0.054822854697704315,
-0.041734181344509125,
0.027523616328835487,
-0.06495723128318787,
-0.008026163093745708,
0.0126586202532053,
-0.06637828797101974,
0.006175050511956215,
-0.009629526175558567,
-0.02524244785308838,
0.0016524454113095999,
0.0010511843720450997,
-0.016005581244826317,
0.052878253161907196,
0.000020797993784071878,
-0.01291104406118393,
0.06222730875015259,
-0.006137654185295105,
0.0031763412989676,
0.007479243446141481,
0.001901363953948021,
-0.0127053651958704,
-0.03287127614021301,
0.03709704801440239,
-0.020006977021694183,
-0.04364138841629028,
0.002199365058913827,
0.029430823400616646,
-0.01306997798383236,
0.020025674253702164,
-0.042482104152441025,
0.021334541961550713,
-0.08444066345691681,
0.06301262974739075,
-0.03657350316643715,
-0.04420233145356178,
-0.032011162489652634,
-0.005880555137991905,
0.02260601334273815,
0.032833877950906754,
-0.02230684459209442,
0.001965638715773821,
-0.029318634420633316,
0.03307695314288139,
-0.07965394109487534,
0.05299044027924538,
0.019006628543138504,
-0.0482037253677845,
0.041061047464609146,
0.015295052900910378,
0.03489067032933235,
-0.015996232628822327,
-0.004464173689484596,
-0.015023930929601192,
0.009657572954893112,
-0.020455731078982353,
-0.10306397825479507,
0.027187051251530647,
-0.011218865402042866,
0.03941561281681061,
-0.009554733522236347,
-0.05968436598777771,
-0.006787413731217384,
0.003569001564756036,
0.029150351881980896,
-0.042968254536390305,
-0.041098445653915405,
-0.040163539350032806,
0.029131654649972916,
-0.01186395063996315,
-0.02271820232272148,
0.007208121009171009,
0.0023185655009001493,
0.021577617153525352,
-0.026700899004936218,
0.009171422570943832,
-0.015005232766270638,
0.03447931259870529,
0.005001744255423546,
0.08272043615579605,
-0.03530203178524971,
-0.009966092184185982,
0.03300216421484947,
-0.013359799049794674,
-0.055869948118925095,
-0.03833112493157387,
-0.012565129436552525,
0.04812893271446228,
0.015921439975500107,
0.04517463222146034,
-0.03866769000887871,
-0.00013702208525501192,
-0.0034264284186065197,
0.006366705987602472,
0.017258355394005775,
0.03354440629482269,
-0.04020093381404877,
0.005600083619356155,
0.010798158124089241,
0.14165687561035156,
0.09139635413885117,
-0.04999874532222748,
-0.06046968325972557,
-0.003940626513212919,
-0.03812544420361519,
0.020324844866991043,
0.009966092184185982,
0.03778887912631035,
-0.006235819309949875,
0.05822591111063957,
-0.03238512575626373,
0.08062624931335449,
0.012527733109891415,
0.07385753095149994,
0.011377799324691296,
-0.041921161115169525,
-0.03294606879353523,
0.03777018189430237,
-0.013976836577057838,
0.013116723857820034,
-0.02514895610511303,
0.022138562053442,
0.004492220934480429,
0.06428410112857819,
-0.020511826500296593,
-0.03937821835279465,
-0.014023581519722939,
0.017819298431277275,
-0.016014929860830307,
-0.007376404013484716,
0.0005428294534794986,
-0.0482037253677845,
0.05149459093809128,
0.03541421890258789,
0.00657238531857729,
0.010162422433495522,
-0.007002441678196192,
0.005931975319981575,
0.021970277652144432,
0.010751413181424141,
-0.08376752585172653,
0.07232428342103958,
0.07823289185762405,
-0.015697062015533447,
-0.042145539075136185,
0.05160678178071976,
-0.04883946105837822,
0.02247512713074684,
-0.017445335164666176,
-0.03141282498836517,
0.05643089488148689,
-0.03543291613459587,
-0.005188725423067808,
0.042856067419052124,
-0.0016629630699753761,
0.021184958517551422,
0.04509983956813812,
-0.02406446635723114,
0.018539175391197205,
-0.0450250469148159,
-0.002881846157833934,
0.031225841492414474,
0.06821069866418839,
0.010760761797428131,
-0.02283039130270481,
-0.018828995525836945,
-0.009517337195575237,
0.03466629609465599,
-0.02520505152642727,
0.008259889669716358,
-0.000795838248450309,
0.016061674803495407,
-0.05889904499053955,
0.053626175969839096,
0.02341003343462944,
-0.03270299360156059,
0.030833180993795395,
-0.06181594729423523,
0.05579515919089317,
-0.02529854141175747,
0.05923561006784439,
-0.0013030244736000896,
0.03728402778506279,
-0.012163120321929455,
-0.043603990226984024,
0.010312006808817387,
-0.01247163861989975,
-0.006263866554945707,
-0.06267606467008591,
0.005721621215343475,
-0.03956519812345505,
0.008446870371699333,
0.016734806820750237,
0.016211260110139847,
0.06428410112857819,
-0.08488941192626953,
-0.0017891753232106566,
0.05785194784402847,
-0.040163539350032806,
0.03547031432390213,
0.030290937051177025,
0.04910123348236084,
-0.026401730254292488,
0.04412753880023956,
0.009807158261537552,
-0.053887952119112015,
0.010227865539491177,
-0.010461592115461826,
0.002387514803558588,
0.05108323320746422,
-0.021184958517551422,
0.06230209767818451,
-0.008283262141048908,
0.07542817294597626,
-0.018389590084552765,
0.03558250144124031,
-0.042856067419052124,
0.020119166001677513,
-0.01210702583193779,
-0.027224447578191757,
0.03971478343009949,
-0.05766496807336807,
0.026401730254292488,
-0.021428033709526062,
0.014864997006952763,
0.020792298018932343,
0.05029791221022606,
0.01202288456261158,
0.04005134850740433,
0.004258494358509779,
-0.053775761276483536,
-0.0038798577152192593,
-0.0008793954621069133,
0.0008390776347368956,
0.030739691108465195,
-0.03750840574502945,
0.04491285979747772,
0.011929393745958805,
0.026551315560936928,
-0.003940626513212919,
0.01155543141067028,
0.019006628543138504,
0.004104234743863344,
0.042556896805763245,
-0.016005581244826317,
-0.015902740880846977,
0.005665527191013098,
0.014107723720371723,
-0.016454335302114487,
-0.008830182254314423,
0.053027838468551636,
-0.005156003404408693,
0.005179376341402531,
0.005487895105034113,
0.014219911769032478,
-0.04461368918418884,
0.020493127405643463,
-0.06925779581069946,
-0.021390637382864952,
0.02509286254644394,
-0.021727202460169792,
0.008451545611023903,
0.02210116572678089,
0.014724761247634888,
-0.028047163039445877,
0.04592255502939224,
-0.06454586982727051,
-0.06334919482469559,
0.05048489570617676,
0.029879577457904816,
0.006460196804255247,
0.002194690518081188,
0.0005042646080255508,
0.04551119729876518,
0.032516010105609894,
-0.06290043890476227,
0.03447931259870529,
0.08960133790969849,
0.044426705688238144,
-0.04958738386631012,
-0.0233539380133152,
-0.00310856057330966,
-0.042332518845796585,
-0.005053163971751928,
0.02453191950917244,
0.030515313148498535,
-0.06821069866418839,
-0.0012925068149343133,
0.03371269255876541,
0.013079327531158924,
-0.044239725917577744,
0.03373138979077339,
0.03638651967048645,
0.010648572817444801,
-0.055495988577604294,
0.015201563015580177,
0.05242949724197388,
0.02314825914800167,
0.005707597825676203,
0.0017412614542990923,
0.010442893952131271,
-0.026308240368962288,
0.04461368918418884,
-0.03303955867886543,
-0.007376404013484716,
0.010433545336127281,
0.013116723857820034,
-0.014958486892282963,
-0.030328333377838135,
-0.03543291613459587,
-0.020474430173635483,
-0.06181594729423523,
0.016753505915403366,
0.010826204903423786,
-0.05620651692152023,
-0.012322054244577885,
-0.005212097894400358,
-0.021558919921517372,
0.05022311955690384,
-0.014191864989697933,
-0.043529197573661804,
-0.055196817964315414,
-0.02520505152642727,
-0.07045447826385498,
-0.011256261728703976,
-0.011134724132716656,
0.03833112493157387,
0.026588711887598038,
-0.05112063139677048,
0.01266796886920929,
-0.026158655062317848,
-0.017903439700603485,
0.0018756540957838297,
-0.016762854531407356,
0.03748970851302147,
-0.043230026960372925,
0.009007814340293407,
-0.013892695307731628,
0.01138714887201786,
-0.03646131232380867,
-0.017192911356687546,
-0.012209865264594555,
0.017464034259319305,
-0.017968883737921715,
-0.02374659851193428,
-0.018529826775193214,
0.02533593773841858,
0.026831787079572678,
-0.03788236901164055,
-0.018380241468548775,
-0.010723365470767021,
0.03907904773950577,
0.0060628619976341724,
-0.02496197633445263,
0.05003613978624344,
-0.0024494521785527468,
-0.020773598924279213,
-0.053775761276483536,
0.0461469329893589,
0.020661409944295883,
0.0033773458562791348,
0.04053749889135361,
0.0033259261399507523,
0.017903439700603485,
0.012611874379217625,
-0.020586617290973663,
-0.007600781507790089,
0.013855298981070518,
-0.01192004419863224,
0.040948860347270966,
-0.0746428519487381,
0.041435010731220245,
-0.0009074425906874239,
-0.05224251747131348,
0.010938393883407116,
-0.0073390076868236065,
-0.02451322041451931,
-0.040874067693948746,
-0.02552291937172413,
0.028084559366106987,
0.015051977708935738,
0.06746277958154678,
-0.00623114500194788,
0.019483430311083794,
-0.08204730600118637,
0.015968184918165207,
0.0491386316716671,
0.03303955867886543,
0.029991766437888145,
-0.02490588091313839,
0.013275657780468464,
-0.010826204903423786,
0.042070746421813965,
0.0234474278986454,
-0.006665875669568777,
-0.03313304856419563,
-0.0030875252559781075,
0.002701876685023308,
0.011499336920678616,
0.04962478205561638,
-0.00037425433401949704,
0.06009572371840477,
-0.07325918972492218,
0.006123630795627832,
0.03539552167057991,
0.04958738386631012,
0.08429107815027237,
-0.021166259422898293,
0.020100466907024384,
-0.027841484174132347,
0.0033866949379444122,
0.03790106624364853,
-0.01150868646800518,
-0.008727342821657658,
-0.04438931122422218,
0.04958738386631012,
0.017071373760700226,
-0.056655269116163254,
0.054037533700466156,
-0.02251252345740795,
0.09625786542892456,
-0.02301737293601036,
-0.06596692651510239,
0.03791976347565651,
-0.03367529436945915,
0.02402707003057003,
-0.040986254811286926,
0.015940137207508087,
0.018165212124586105,
-0.015089374035596848,
-0.008199120871722698,
0.043117839843034744,
0.018342845141887665,
-0.03317044675350189,
0.011452591978013515,
-0.021839391440153122,
0.001946940552443266,
0.02413925901055336,
0.03552640601992607,
-0.017295751720666885,
0.0116302240639925,
0.03307695314288139,
-0.008853554725646973,
0.003681190311908722,
0.031618501991033554,
0.04551119729876518,
0.014706063084304333,
-0.03780757635831833,
0.03238512575626373,
-0.028402427211403847,
0.01123756356537342,
-0.03619953989982605,
0.019184259697794914,
-0.08227168023586273,
-0.04984916001558304,
-0.03855549916625023,
0.030290937051177025,
0.0011908358428627253,
-0.015257656574249268,
-0.0016851670807227492,
-0.029543012380599976,
0.02254991978406906,
-0.002341938205063343,
-0.05646828934550285,
-0.029898276552557945,
0.03462889790534973,
-0.021334541961550713,
0.0018908462952822447,
-0.021615013480186462,
0.031431522220373154,
-0.012649270705878735,
0.028514616191387177,
-0.0010663765715435147,
-0.029412126168608665,
0.04573557525873184,
-0.02301737293601036,
-0.018380241468548775,
0.0073390076868236065,
-0.026532616466283798,
-0.017781902104616165,
-0.029243841767311096,
0.015510081313550472,
0.022119862958788872,
-0.041135840117931366,
-0.009592129848897457,
0.07404451072216034,
0.044501498341560364,
-0.018847694620490074,
-0.043043047189712524,
-0.04786716029047966,
-0.017669713124632835,
-0.06619130820035934,
0.009975440800189972,
0.05127021670341492,
0.03758319839835167,
-0.07105281203985214,
0.08653485029935837,
-0.015706412494182587,
-0.053813159465789795,
0.03930342569947243,
-0.026196051388978958,
0.005319612100720406,
-0.0009524349588900805,
0.01247163861989975,
-0.0662287026643753,
-0.030384426936507225,
-0.018651364371180534,
0.014771506190299988,
-0.055495988577604294,
-0.016809599474072456,
0.0444641038775444,
0.005787064787000418,
-0.04569817706942558,
-0.02281169220805168,
0.016613269224762917,
0.0722121000289917,
0.02355961687862873,
-0.026794390752911568,
0.009573431685566902,
-0.03603125736117363,
0.04704444110393524,
-0.0021327531430870295,
-0.006441498640924692,
-0.013322402723133564,
-0.015425940044224262,
0.054785460233688354,
0.04622172564268112,
-0.026925276964902878,
-0.041248027235269547,
-0.031805481761693954,
-0.006553687155246735,
0.02542942762374878,
0.041509803384542465,
0.005871206056326628,
-0.05687964707612991,
-0.005015767645090818,
-0.014565827324986458,
-0.03257210552692413,
-0.020605316385626793,
0.015753157436847687,
0.0004350231902208179,
0.03666699305176735,
-0.03539552167057991,
-0.02434493787586689,
0.02561640925705433,
0.014098374173045158,
-0.04476327449083328,
-0.027355333790183067,
0.001996023114770651,
-0.07666224986314774,
0.020904485136270523,
-0.010125026106834412,
-0.08473983407020569,
0.03361919894814491,
-0.03268429636955261,
-0.012125723995268345,
0.00017646340711507946,
0.009797808714210987,
-0.0060020931996405125,
-0.021764598786830902,
-0.0038377868477255106,
0.02195158042013645,
0.1328313648700714,
-0.018483079969882965,
0.04554859548807144,
0.008778762072324753,
0.005328961182385683,
-0.012415544129908085,
0.0021292471792548895,
0.03821893408894539,
0.026756994426250458,
0.0012013535015285015,
0.020100466907024384,
-0.02303607016801834,
-0.04461368918418884,
-0.013715063221752644,
0.03919123485684395,
-0.0502605177462101,
0.02374659851193428,
0.007675573695451021,
0.04491285979747772,
0.015622270293533802,
0.043342217803001404,
-0.013294355943799019,
-0.002089513698592782,
0.055570781230926514,
-0.03982697054743767,
0.029842182993888855,
-0.00019180169329047203,
0.026794390752911568,
-0.044090140610933304,
0.03141282498836517,
0.03442321717739105,
0.08466503769159317,
-0.017389241605997086,
-0.055570781230926514,
0.016613269224762917
] |
52,302 |
flexget.manager
|
setup_yaml
|
Customize the yaml loader/dumper behavior
|
def setup_yaml(self) -> None:
"""Customize the yaml loader/dumper behavior"""
# Represent OrderedDict as a regular dict (but don't sort it alphabetically)
# This lets us order a dict in a yaml file for easier human consumption
def represent_dict_order(self, data):
return self.represent_mapping('tag:yaml.org,2002:map', data.items())
yaml.add_representer(collections.OrderedDict, represent_dict_order)
# Set up the dumper to increase the indent for lists
def increase_indent_wrapper(func):
def increase_indent(self, flow=False, indentless=False):
func(self, flow, False)
return increase_indent
yaml.Dumper.increase_indent = increase_indent_wrapper(yaml.Dumper.increase_indent)
yaml.SafeDumper.increase_indent = increase_indent_wrapper(yaml.SafeDumper.increase_indent)
|
(self) -> NoneType
|
[
-0.010954251512885094,
0.014995803125202656,
-0.024249311536550522,
-0.022457130253314972,
0.005824589636176825,
0.02931496687233448,
0.0107439449056983,
0.02430417388677597,
-0.04323180392384529,
0.01503237895667553,
-0.027614222839474678,
-0.05336311459541321,
-0.00983871053904295,
0.05299736559391022,
0.04868149757385254,
0.026663269847631454,
0.01644052192568779,
0.05105888098478317,
0.002921438543125987,
-0.029900169000029564,
0.041695646941661835,
-0.012216093949973583,
0.011566884815692902,
-0.017949245870113373,
-0.022365693002939224,
0.01087195798754692,
-0.06411620229482651,
-0.021305013447999954,
0.003392343409359455,
-0.013496222905814648,
-0.07702722400426865,
-0.024139586836099625,
0.016339939087629318,
0.014282588846981525,
0.007209872826933861,
-0.039464566856622696,
-0.013249341398477554,
0.026279231533408165,
-0.05610625073313713,
0.007630486506968737,
0.034124597907066345,
0.020591799169778824,
0.010177030228078365,
-0.03428918495774269,
0.03249700367450714,
0.06872466951608658,
0.006821261718869209,
-0.001200121478177607,
0.016550246626138687,
-0.027467923238873482,
0.02432246133685112,
-0.03174721449613571,
0.029424691572785378,
0.05797158181667328,
-0.014483751729130745,
-0.000023823839001124725,
0.011356578208506107,
0.020902687683701515,
0.03538643941283226,
0.01570901833474636,
0.002804855350404978,
0.012508695013821125,
-0.01324019767343998,
-0.019531119614839554,
-0.00039632583502680063,
-0.012462975457310677,
-0.029424691572785378,
-0.037416357547044754,
0.006546948570758104,
-0.016376513987779617,
-0.013075608760118484,
-0.025456290692090988,
0.023334933444857597,
0.009610115550458431,
0.04363413155078888,
0.027723949402570724,
-0.05983691290020943,
-0.027413060888648033,
0.0393548421561718,
-0.00998501107096672,
-0.010478775016963482,
0.0003563217760529369,
-0.023188631981611252,
0.03895251452922821,
0.01811383292078972,
-0.019805433228611946,
0.03644711896777153,
0.016522815451025963,
0.06290922313928604,
0.024084722623229027,
-0.024212736636400223,
0.06389675289392471,
0.02289603091776371,
0.010469631291925907,
-0.031253449618816376,
0.027467923238873482,
-0.03110714815557003,
0.028510313481092453,
-0.0015052951639518142,
-0.013039033859968185,
-0.02254856750369072,
-0.01800410822033882,
0.0010458201868459582,
-0.0010115309851244092,
-0.05760582908987999,
-0.043780431151390076,
-0.020829536020755768,
0.030832834541797638,
-0.06612783670425415,
0.0003408916527405381,
-0.05800815671682358,
-0.06594496220350266,
-0.027998263016343117,
0.06338470429182053,
0.057386379688978195,
-0.058849383145570755,
0.03825758770108223,
-0.023170344531536102,
0.01537984237074852,
-0.005129661876708269,
-0.044877685606479645,
0.001908764592371881,
0.0032437569461762905,
-0.04601151496171951,
-0.01537984237074852,
-0.0392451137304306,
0.012837870977818966,
0.03224097937345505,
0.00734702916815877,
0.0015521571040153503,
0.04034236818552017,
-0.010469631291925907,
-0.06528660655021667,
-0.034508634358644485,
0.09326658397912979,
-0.07907543331384659,
0.07710037380456924,
0.05760582908987999,
-0.02114042453467846,
0.04220769926905632,
-0.023517809808254242,
-0.03748950734734535,
0.016294220462441444,
-0.0034243466798216105,
-0.04469481110572815,
-0.0393548421561718,
-0.04407303407788277,
0.0028277146629989147,
0.0214513149112463,
0.034508634358644485,
0.03778211027383804,
-0.0022082235664129257,
-0.02395671047270298,
0.0043227230198681355,
0.021195288747549057,
-0.006789258681237698,
-0.023389795795083046,
-0.02181706577539444,
0.04575548693537712,
-0.013825398869812489,
-0.03174721449613571,
-0.023444658145308495,
0.020902687683701515,
-0.02825428918004036,
-0.011850342154502869,
0.029424691572785378,
0.010844525881111622,
-0.09114522486925125,
0.06477455794811249,
0.0107439449056983,
-0.019092218950390816,
-0.02829086408019066,
-0.035203564912080765,
0.0196225568652153,
0.08192829042673111,
-0.010615931823849678,
-0.01591932587325573,
0.03511212393641472,
-0.028473738580942154,
0.005143377929925919,
-0.006021180655807257,
0.03869648650288582,
-0.021670764312148094,
-0.014538614079356194,
-0.00962840300053358,
0.008252264000475407,
0.01792181469500065,
0.07417436689138412,
0.0040552676655352116,
0.026334093883633614,
0.04513370990753174,
0.02075638622045517,
-0.020299198105931282,
-0.000788079749327153,
0.02856517769396305,
0.007040712516754866,
-0.0356973260641098,
-0.02360924705862999,
0.07362573593854904,
0.008974622935056686,
-0.009637546725571156,
0.014163719490170479,
0.011859485879540443,
0.0058474489487707615,
0.005778870545327663,
-0.0028894352726638317,
-0.041695646941661835,
0.015059810131788254,
-0.028455451130867004,
-0.02792511135339737,
0.011950924061238766,
-0.05614282563328743,
0.005810874048620462,
-0.0641893520951271,
0.024249311536550522,
-0.09728984534740448,
0.007475042250007391,
-0.004215283785015345,
-0.07658832520246506,
-0.010332474485039711,
0.10219091176986694,
0.08339129388332367,
-0.043048929423093796,
-0.021945077925920486,
-0.014721490442752838,
0.0035020688083022833,
0.0392816886305809,
-0.08009953796863556,
0.0015521571040153503,
0.059910062700510025,
-0.020518647506833076,
-0.022054804489016533,
-0.0394279919564724,
0.026882721111178398,
0.0787096843123436,
0.00348378112539649,
-0.0014550044434145093,
-0.05398489162325859,
-0.03500239923596382,
-0.02081124857068062,
0.027248471975326538,
0.02927839197218418,
0.01765664480626583,
-0.035935066640377045,
-0.021707339212298393,
0.006537804380059242,
-0.02648039534687996,
-0.01179547980427742,
0.025108827278017998,
0.04173222556710243,
0.01858016662299633,
-0.031033998355269432,
0.005234815645962954,
0.07578366994857788,
-0.0020356345921754837,
-0.036648280918598175,
0.02187192812561989,
-0.037343207746744156,
0.009738128632307053,
-0.01684284768998623,
0.022822881117463112,
-0.00660638278350234,
0.005015364848077297,
0.05764240399003029,
0.03752608224749565,
0.01675141043961048,
0.02360924705862999,
-0.03419774770736694,
0.0019601983949542046,
-0.04136647284030914,
0.10511692613363266,
0.03975716605782509,
-0.013331634923815727,
-0.01649538427591324,
-0.014364882372319698,
0.02183535322546959,
0.029552705585956573,
-0.04502398520708084,
0.04250030219554901,
0.02578546665608883,
0.053875166922807693,
-0.06978534907102585,
-0.008243120275437832,
-0.009271795861423016,
0.058154456317424774,
-0.04506056010723114,
-0.06905384361743927,
0.03763581067323685,
-0.02178049087524414,
-0.03138146176934242,
0.025218551978468895,
-0.008032812736928463,
-0.02328007109463215,
-0.021305013447999954,
0.0000100992365332786,
-0.057240080088377,
-0.05087600648403168,
0.04696246609091759,
0.002171648433431983,
-0.022310828790068626,
-0.024797938764095306,
-0.03997661918401718,
0.08799976110458374,
0.04549946263432503,
0.03335651755332947,
0.037014033645391464,
-0.017720650881528854,
0.02031748555600643,
-0.034472059458494186,
-0.01597418822348118,
0.005627998150885105,
0.027248471975326538,
0.011374865658581257,
0.04941300302743912,
-0.03778211027383804,
0.003794669872149825,
-0.027358198538422585,
0.02501739002764225,
0.02829086408019066,
0.025236839428544044,
-0.05782528221607208,
-0.0036392253823578358,
-0.03361254557967186,
-0.02682785876095295,
0.11389495432376862,
-0.024139586836099625,
0.10109365731477737,
-0.030247632414102554,
0.08522005379199982,
0.01323105301707983,
-0.014940940774977207,
-0.061007317155599594,
-0.026937583461403847,
0.06927330046892166,
-0.005120518151670694,
-0.014849502593278885,
-0.060275815427303314,
-0.010835382156074047,
-0.009674121625721455,
-0.03695916756987572,
0.03789183497428894,
0.01644052192568779,
-0.013130472041666508,
-0.08660990744829178,
0.02541971579194069,
-0.014465464279055595,
-0.001888191094622016,
0.015617581084370613,
-0.04429248347878456,
0.03240556642413139,
0.019915157929062843,
0.00920321699231863,
0.0040849847719073296,
0.02073809877038002,
-0.029607567936182022,
-0.04787684604525566,
-0.00865459069609642,
-0.049925051629543304,
-0.0018721894593909383,
-0.0029100088868290186,
0.007813362404704094,
-0.03075968474149704,
-0.025931768119335175,
0.008727740496397018,
0.01929338090121746,
0.014236869290471077,
-0.024925950914621353,
-0.05980033800005913,
0.038403887301683426,
0.014419745653867722,
-0.014666627161204815,
-0.013733961619436741,
0.023408083245158195,
-0.031033998355269432,
0.03114372305572033,
-0.010981682687997818,
-0.009756416082382202,
0.05391174182295799,
-0.031253449618816376,
-0.014940940774977207,
0.03224097937345505,
0.0430123545229435,
-0.003977545537054539,
-0.007603055331856012,
0.0035066406708210707,
-0.07988008856773376,
-0.0003426061011850834,
0.026736419647932053,
-0.017565205693244934,
-0.0429392047226429,
-0.0034883529879152775,
0.029589280486106873,
0.0015590148977935314,
0.011201133951544762,
-0.03441719710826874,
-0.0197139959782362,
-0.06693249195814133,
0.014337451197206974,
0.03328336775302887,
-0.02392013557255268,
0.0858052596449852,
-0.07267478108406067,
0.0430123545229435,
-0.014776352792978287,
0.04001319408416748,
0.040927570313215256,
-0.00688526825979352,
0.03529500216245651,
0.00806481670588255,
0.05215613543987274,
0.04586521536111832,
-0.0116034597158432,
-0.019512832164764404,
-0.02470650151371956,
0.012078937143087387,
-0.060202665627002716,
0.0749790146946907,
0.05574049800634384,
-0.0068349773064255714,
-0.019823720678687096,
0.009390665218234062,
0.0196225568652153,
0.018763041123747826,
0.02759593538939953,
0.042866051197052,
-0.03895251452922821,
-0.038403887301683426,
0.021012412384152412,
-0.03748950734734535,
-0.04074469581246376,
-0.008768887259066105,
0.006140050012618303,
0.027413060888648033,
-0.03695916756987572,
0.0821477398276329,
-0.009436383843421936,
0.04103729501366615,
-0.060275815427303314,
0.0063137817196547985,
0.04707219451665878,
0.04506056010723114,
-0.0074247512966394424,
0.04970560222864151,
-0.012097224593162537,
0.016605108976364136,
0.0644819587469101,
-0.0820745900273323,
0.05683775246143341,
0.0928276777267456,
0.007168725598603487,
-0.02070152387022972,
0.04319522902369499,
0.01393512450158596,
-0.03972059115767479,
0.0014755779411643744,
-0.06345785409212112,
0.06378702819347382,
-0.024249311536550522,
-0.019110506400465965,
0.005692004691809416,
0.04228084906935692,
-0.08529320359230042,
0.017080586403608322,
0.03174721449613571,
-0.0066886767745018005,
0.012426400557160378,
-0.04162249714136124,
0.05533817410469055,
-0.03655684366822243,
-0.000944095547311008,
0.05157093331217766,
0.010542781092226505,
-0.0026951299514621496,
-0.0029602996073663235,
-0.04209797456860542,
-0.0045764632523059845,
0.06832234561443329,
-0.02819942496716976,
-0.04074469581246376,
0.0080556720495224,
0.00006129191751824692,
-0.030613385140895844,
-0.001989915734156966,
0.004905639216303825,
-0.020975837484002113,
-0.028089700266718864,
-0.013523654080927372,
-0.045645762234926224,
-0.021396450698375702,
0.02536485344171524,
-0.03467322513461113,
-0.01360594853758812,
-0.007959662936627865,
-0.03432575985789299,
0.025620879605412483,
-0.029040653258562088,
0.04085442051291466,
0.014767209067940712,
-0.016678258776664734,
-0.10599473118782043,
0.029095515608787537,
-0.003495211014524102,
0.042792901396751404,
-0.014502039179205894,
0.009006625972688198,
0.005431406665593386,
0.007296738680452108,
-0.021231863647699356,
-0.014520326629281044,
-0.006089759059250355,
0.004437020514160395,
-0.03439890965819359,
0.005961746443063021,
-0.018644172698259354,
0.01570901833474636,
0.011329147033393383,
-0.03470980003476143,
0.06378702819347382,
0.052704762667417526,
0.01451118290424347,
0.034874387085437775,
-0.04966902732849121,
0.0429757796227932,
0.017062298953533173,
-0.023078907281160355,
0.016147920861840248,
0.004400445614010096,
0.024724788963794708,
-0.03708718344569206,
0.022457130253314972,
0.0021076418925076723,
-0.043085504323244095,
0.002215081360191107,
-0.03785526007413864,
-0.0008177970303222537,
0.1073114350438118,
-0.027760524302721024,
0.00768992118537426,
0.010524493642151356,
0.006021180655807257,
0.053070515394210815,
-0.0031066001392900944,
0.029497843235731125,
0.006514945067465305,
-0.023481233045458794,
0.006981277838349342,
-0.04908382520079613,
0.02792511135339737,
0.0023568100295960903,
0.020207758992910385,
-0.01889105513691902,
-0.011484591290354729,
0.01647709682583809,
0.002450533676892519,
-0.014968371950089931,
-0.05193668603897095,
0.017144592478871346,
-0.023700684309005737,
0.060604989528656006,
0.03178378939628601,
0.024139586836099625,
0.05965403839945793,
-0.06912699341773987,
-0.001395569765008986,
0.045206859707832336,
0.012078937143087387,
-0.03586191684007645,
0.004402731545269489,
-0.06290922313928604,
0.036373965442180634,
0.019403107464313507,
-0.0304305087774992,
0.03503897413611412,
-0.021378163248300552,
-0.05402146652340889,
0.03957429155707359,
0.0010761088924482465,
0.06704221665859222,
-0.011594315990805626,
-0.019092218950390816,
-0.029589280486106873,
0.04012291878461838,
0.05753267928957939,
-0.001747605507262051,
-0.03000989370048046,
-0.05255846306681633,
0.05603310093283653,
0.03759923577308655,
0.04729164391756058,
-0.01412714459002018,
-0.05285106226801872,
-0.01678798533976078,
-0.02788853645324707,
-0.00768992118537426,
0.004112416412681341,
-0.03763581067323685,
0.0606415681540966,
-0.05398489162325859,
0.019585981965065002,
-0.009340373799204826,
0.02642553113400936,
0.05157093331217766,
0.0026448392309248447,
0.023846985772252083,
0.0072190165519714355,
-0.006368644535541534,
0.04586521536111832,
-0.007155010011047125,
-0.005778870545327663,
0.029918456450104713,
-0.027449635788798332,
-0.025968343019485474,
0.05325338989496231,
-0.064299076795578,
0.0037809540517628193,
-0.0501079298555851,
-0.0058794524520635605,
-0.02933325432240963,
0.015507855452597141,
-0.07325998693704605,
0.021615901961922646,
0.004955930169671774,
0.005929742939770222,
-0.02359095960855484,
-0.014913509599864483,
-0.016275933012366295,
-0.02573060430586338,
-0.04462165758013725,
0.01626678928732872,
-0.08485430479049683,
0.04860834777355194,
-0.011265140026807785,
0.025255126878619194,
-0.05804473161697388,
-0.026023205369710922,
-0.002221939153969288,
0.03470980003476143,
0.005481697618961334,
0.013880262151360512,
0.026974158361554146,
0.03002818301320076,
-0.0752716213464737,
0.010359905660152435,
0.03348453342914581,
-0.001888191094622016,
0.037708960473537445,
-0.028382301330566406,
0.01711716130375862,
0.03494753688573837,
-0.006158337462693453,
0.032771315425634384,
0.013368209823966026,
-0.019073929637670517,
0.02285945601761341,
-0.04623096436262131,
0.010460487566888332,
0.010469631291925907,
-0.008361989632248878,
-0.009911860339343548,
-0.033813707530498505,
-0.04078127071261406,
-0.009994154796004295,
-0.0749790146946907,
-0.008119679056107998,
0.0715043768286705,
-0.022420555353164673,
-0.005422262940555811,
0.049193549901247025,
-0.001985343871638179,
0.010771376080811024,
-0.026992445811629295,
-0.012170374393463135,
0.02607806771993637,
-0.023499520495533943,
0.011722329072654247,
-0.0679931640625,
-0.016166208311915398,
0.0033626260701566935,
0.040964145213365555,
-0.020262623205780983,
-0.05266818776726723,
0.03280789032578468,
-0.048096295446157455,
-0.006048612296581268,
-0.04008634388446808,
0.045572612434625626,
0.027394773438572884,
-0.01774808205664158,
-0.007369888946413994,
0.011694897897541523,
0.02291431836783886,
0.03884278982877731,
-0.014913509599864483,
0.0392451137304306,
-0.032789602875709534,
-0.03646540641784668,
0.017217742279171944,
-0.06590838730335236,
0.008005381561815739,
-0.009216932579874992,
0.010094735771417618,
-0.03706889599561691,
-0.003115743864327669,
-0.0026448392309248447,
-0.015617581084370613,
0.008092247880995274,
-0.04359755665063858,
0.03317364305257797,
0.014758065342903137,
0.0008840895025059581,
0.03873306140303612,
0.049120400100946426,
0.0644819587469101,
-0.07790502905845642,
0.010999970138072968,
-0.06053183972835541,
0.02221939153969288,
0.012334962375462055,
-0.017263460904359818,
-0.009180357679724693,
-0.04465823248028755,
0.04440220817923546,
-0.02031748555600643,
-0.05965403839945793,
0.011045689694583416,
0.011667466722428799,
-0.04217112436890602,
-0.027998263016343117,
-0.03288104385137558,
-0.018488729372620583,
0.021359875798225403,
-0.012792152352631092,
-0.025986630469560623,
0.02185364067554474,
-0.03706889599561691,
-0.01609305664896965,
-0.023792121559381485,
0.0028620038647204638,
0.03620937839150429,
-0.03143632411956787,
0.04063497111201286,
0.019476257264614105,
0.003163748886436224,
0.07128492742776871,
-0.011914349161088467,
-0.0536557175219059,
0.05182696133852005,
0.04868149757385254,
-0.01360594853758812,
0.07187013328075409,
-0.03257015347480774,
0.03430747240781784,
-0.04213454946875572,
0.026023205369710922,
-0.04037894308567047,
-0.018708178773522377,
0.061702243983745575,
0.011338290758430958,
0.006825833581387997,
-0.04363413155078888,
-0.04323180392384529,
-0.08734141290187836,
-0.028309151530265808,
0.008069388568401337,
0.143228217959404,
0.02679128386080265,
0.01925680600106716,
0.024523625150322914
] |
52,303 |
flexget.manager
|
shutdown
|
Request manager shutdown.
:param bool finish_queue: Should scheduler finish the task queue
|
def shutdown(self, finish_queue: bool = True) -> None:
"""
Request manager shutdown.
:param bool finish_queue: Should scheduler finish the task queue
"""
if not self.initialized:
raise RuntimeError('Cannot shutdown manager that was never initialized.')
fire_event('manager.shutdown_requested', self)
self.task_queue.shutdown(finish_queue)
|
(self, finish_queue: bool = True) -> NoneType
|
[
0.07282787561416626,
0.0980917438864708,
-0.051901157945394516,
-0.03849215433001518,
-0.004639840684831142,
-0.02378200739622116,
-0.04474486783146858,
0.04221487045288086,
-0.019589433446526527,
0.03446222469210625,
0.014547503553330898,
-0.01884850487112999,
-0.014104753732681274,
-0.053057730197906494,
0.00031963849323801696,
0.04633515700697899,
0.006293376907706261,
-0.05584073066711426,
0.01883043348789215,
-0.01924607716500759,
-0.02069179154932499,
0.012144003063440323,
0.05323844403028488,
-0.003641393966972828,
-0.044419582933187485,
-0.06133444607257843,
-0.004391358233988285,
-0.018667791038751602,
0.005163912195712328,
-0.01982436329126358,
-0.03198643773794174,
0.004479456692934036,
-0.021432720124721527,
0.04713029786944389,
0.04517858475446701,
0.020149648189544678,
0.010011574253439903,
0.051214441657066345,
0.016101647168397903,
-0.024541007354855537,
0.02665536478161812,
-0.017601575702428818,
0.057286445051431656,
0.012378931976854801,
0.054178155958652496,
0.007946913130581379,
0.04485329985618591,
0.00913059152662754,
0.011421145871281624,
0.02705293521285057,
0.013761396519839764,
-0.023565148934721947,
-0.03355865180492401,
-0.0019008888630196452,
-0.034082721918821335,
0.00573768001049757,
0.03708258271217346,
-0.007802341599017382,
-0.0042693763971328735,
-0.061985015869140625,
-0.014701111242175102,
0.05894901603460312,
-0.018071433529257774,
0.017077505588531494,
0.01996893435716629,
-0.01600225456058979,
-0.0018421567510813475,
0.04929887130856514,
0.04817844182252884,
0.0689244493842125,
0.009239020757377148,
0.019860506057739258,
-0.023745862767100334,
0.02763122133910656,
0.049804870039224625,
-0.019752077758312225,
-0.029727507382631302,
-0.08421287685632706,
-0.07647830992937088,
-0.015966111794114113,
-0.013336718082427979,
0.06462344527244568,
-0.008918252773582935,
0.014204146340489388,
0.02819143608212471,
0.01583961211144924,
0.06462344527244568,
-0.031408149749040604,
-0.025697577744722366,
-0.02904079295694828,
-0.0026452061720192432,
0.01870393380522728,
0.02408922091126442,
-0.009948324412107468,
0.02873357944190502,
-0.05396129935979843,
-0.05168430134654045,
0.013869824819266796,
-0.08385144919157028,
-0.10279031097888947,
0.02322179265320301,
0.0034313134383410215,
0.05620215833187103,
0.01218918152153492,
0.019734004512429237,
0.030070865526795387,
0.019155720248818398,
-0.08667059242725372,
-0.03471522405743599,
-0.002545813098549843,
0.0049651265144348145,
0.02549879252910614,
-0.011538609862327576,
-0.005403358489274979,
-0.06820158660411835,
0.013336718082427979,
-0.016625719144940376,
0.013282503932714462,
0.04485329985618591,
-0.019625576213002205,
-0.006894251797348261,
0.04987715557217598,
-0.015387825667858124,
-0.04460029676556587,
-0.023185649886727333,
0.0601055882871151,
-0.009749538265168667,
0.08168288320302963,
0.012839753180742264,
-0.011764503084123135,
0.002157277427613735,
0.028155293315649033,
-0.046949584037065506,
0.03469715267419815,
0.00747253792360425,
0.036034438759088516,
0.033359866589307785,
-0.03950415551662445,
0.023492863401770592,
0.012767467647790909,
0.015649860724806786,
-0.008904699236154556,
0.01583961211144924,
-0.014312575571238995,
-0.013128896243870258,
0.06896059215068817,
-0.009225467219948769,
-0.014782432466745377,
-0.01984243467450142,
-0.04488944262266159,
-0.03758858144283295,
-0.007644216530025005,
0.0037430457305163145,
-0.002009317511692643,
-0.04814229905605316,
0.017384719103574753,
0.004716644063591957,
0.013128896243870258,
0.05381672829389572,
0.018505148589611053,
-0.0276492927223444,
0.046226728707551956,
-0.05052772909402847,
-0.03585372492671013,
-0.043985869735479355,
0.004061554558575153,
-0.011249467730522156,
0.06733416020870209,
-0.0041654654778540134,
0.0018184379441663623,
-0.034769438207149506,
0.007639698684215546,
-0.031498510390520096,
0.029637150466442108,
-0.0035239295102655888,
0.04550386965274811,
-0.008674288168549538,
-0.0020059291273355484,
-0.04600986838340759,
-0.026456579566001892,
-0.004199349321424961,
-0.03928729519248009,
-0.039034295827150345,
-0.06455115973949432,
-0.020944790914654732,
-0.00116786640137434,
-0.06541858613491058,
0.04593758285045624,
-0.03316108137369156,
-0.0037588581908494234,
-0.05345530062913895,
-0.0029591971542686224,
-0.015939004719257355,
-0.02394464984536171,
0.005181983578950167,
-0.002244246192276478,
0.0416727252304554,
0.019752077758312225,
0.027595078572630882,
-0.04915430024266243,
0.018740076571702957,
0.06740644574165344,
0.030631080269813538,
-0.018956933170557022,
0.05031087249517441,
-0.0024780454114079475,
0.0022239158861339092,
-0.04181729629635811,
-0.016960039734840393,
0.002527741715312004,
0.008561342023313046,
0.007788788061589003,
-0.03057686612010002,
0.06299702078104019,
0.0490458719432354,
0.012939146719872952,
0.014050539582967758,
0.005421429872512817,
0.030233507975935936,
0.022878434509038925,
-0.006315966136753559,
-0.029781723394989967,
0.061551302671432495,
0.04091372713446617,
-0.03787772357463837,
0.029944365844130516,
-0.012469288893043995,
-0.05045544356107712,
0.04485329985618591,
-0.02902272157371044,
-0.03330565243959427,
-0.023149507120251656,
-0.04239558428525925,
-0.056093730032444,
0.04756401479244232,
0.06509330123662949,
0.05146744102239609,
-0.010020609945058823,
-0.043443724513053894,
0.02792036533355713,
0.008620074018836021,
-0.04958801344037056,
-0.02052914910018444,
-0.055045586079359055,
-0.01573118381202221,
0.05627444386482239,
0.029293794184923172,
0.0017032326431944966,
0.036359723657369614,
-0.018234075978398323,
-0.027034863829612732,
0.009894110262393951,
0.041745010763406754,
-0.055732302367687225,
0.005787376780062914,
-0.08074316382408142,
-0.011141038499772549,
0.012559646740555763,
0.031390078365802765,
0.046515870839357376,
-0.008452912792563438,
-0.038745153695344925,
-0.034480296075344086,
0.05117829889059067,
0.030396150425076485,
0.008037270046770573,
0.01728532649576664,
-0.01599321886897087,
-0.00046901017776690423,
-0.012207252904772758,
0.05746715888381004,
-0.062238018959760666,
-0.009270645678043365,
-0.015559504739940166,
-0.005904840771108866,
0.034769438207149506,
-0.011394038796424866,
-0.051901157945394516,
-0.11768117547035217,
-0.010842859745025635,
0.07344230264425278,
-0.014863753691315651,
0.05287701636552811,
0.05280472710728645,
-0.012369896285235882,
0.013490324839949608,
-0.0029682328458875418,
0.04774472862482071,
-0.012812646105885506,
-0.02278807759284973,
-0.0048883226700127125,
0.0003594520967453718,
-0.02961907908320427,
-0.02280614897608757,
0.03935958072543144,
-0.0775625929236412,
-0.038889724761247635,
0.022191720083355904,
0.04673272743821144,
0.06820158660411835,
0.054756443947553635,
0.02750472165644169,
-0.04662429913878441,
-0.0037453046534210443,
0.053491443395614624,
0.004861215595155954,
0.10250116884708405,
-0.020059291273355484,
0.031516581773757935,
0.04293772578239441,
0.05070844292640686,
0.0012570940889418125,
-0.03017929382622242,
-0.020800219848752022,
0.011375967413187027,
0.010806716978549957,
0.008719466626644135,
-0.005516305100172758,
-0.02717943675816059,
0.0054349834099411964,
-0.03359479457139969,
-0.03200450912117958,
0.08175516873598099,
-0.02493857778608799,
-0.01181871723383665,
0.04347986727952957,
-0.08276716619729996,
0.05967187508940697,
-0.01725821942090988,
-0.022625435143709183,
-0.045250870287418365,
-0.06375601887702942,
0.010698288679122925,
-0.007282787933945656,
-0.020366504788398743,
0.009975431486964226,
0.05244329944252968,
-0.0022487640380859375,
-0.03979329764842987,
-0.03245629370212555,
-0.0006149934488348663,
0.01381561066955328,
-0.0236374344676733,
0.04431115463376045,
-0.08153830468654633,
0.06050315871834755,
-0.0060132695361971855,
-0.03834758326411247,
0.09209202229976654,
0.05211801454424858,
-0.009668217040598392,
-0.024053078144788742,
0.013580682687461376,
0.021956792101264,
0.029691364616155624,
-0.008855002000927925,
0.021902577951550484,
0.01616489700973034,
0.04402201250195503,
-0.04969644173979759,
-0.04973258450627327,
0.005647323094308376,
0.029076935723423958,
-0.004377804696559906,
-0.05605758726596832,
-0.07814087718725204,
-0.03668500855565071,
0.025950578972697258,
0.0818997398018837,
-0.02562529221177101,
0.0036639831960201263,
-0.017321469262242317,
-0.005959055386483669,
0.046226728707551956,
0.007020751945674419,
0.03133586421608925,
-0.000059155707276659086,
0.0074499486945569515,
-0.030631080269813538,
-0.016201039776206017,
-0.03133586421608925,
-0.020113505423069,
-0.01953521929681301,
-0.013544538989663124,
-0.024360291659832,
-0.032655078917741776,
-0.012369896285235882,
-0.022625435143709183,
-0.015532396733760834,
-0.016463076695799828,
0.09050174057483673,
-0.04178115352988243,
-0.019083434715867043,
0.00843935925513506,
-0.0029614560771733522,
0.01452039647847414,
-0.041708867996931076,
0.0019630093593150377,
-0.043985869735479355,
0.001550754881463945,
-0.029637150466442108,
0.019860506057739258,
-0.030504580587148666,
-0.019300291314721107,
0.06104530394077301,
-0.042865440249443054,
0.010553717613220215,
-0.017466040328145027,
0.026239721104502678,
0.05605758726596832,
0.008746573701500893,
-0.07337001711130142,
-0.017538325861096382,
-0.015586611814796925,
-0.04347986727952957,
0.018649719655513763,
0.0067225731909275055,
-0.010083859786391258,
0.08529716730117798,
0.043154582381248474,
0.024161506444215775,
0.023745862767100334,
0.010074824094772339,
-0.041998010128736496,
-0.013210217468440533,
0.005240715574473143,
-0.025860222056508064,
0.013499360531568527,
-0.04586529731750488,
-0.0038401796482503414,
-0.04702186957001686,
0.005566001404076815,
-0.01148439571261406,
0.011095860041677952,
0.00950557366013527,
0.039178866893053055,
-0.00772101990878582,
-0.0051413229666650295,
-0.056599728763103485,
-0.025444578379392624,
0.002841732930392027,
-0.028426364064216614,
0.01041818130761385,
0.0131017891690135,
0.06422587484121323,
0.01530650444328785,
0.03608865290880203,
0.01901114732027054,
0.039178866893053055,
-0.013761396519839764,
-0.06390058994293213,
-0.0030360007658600807,
-0.07626144587993622,
-0.013761396519839764,
0.04394972696900368,
-0.04828687012195587,
0.01757446862757206,
-0.01452039647847414,
-0.030775651335716248,
-0.020041219890117645,
-0.014683039858937263,
-0.029257651418447495,
-0.07915288209915161,
-0.02336636371910572,
0.04604601114988327,
0.03144429624080658,
0.0538528710603714,
-0.0018421567510813475,
0.02365550585091114,
0.002785259624943137,
0.03332372382283211,
-0.012803610414266586,
0.005073554813861847,
-0.01827925443649292,
0.0006262881215661764,
-0.027251722291111946,
-0.035980224609375,
0.05981644615530968,
-0.026546936482191086,
-0.016336575150489807,
0.043443724513053894,
0.009541717357933521,
0.07192430645227432,
0.03245629370212555,
-0.04254015535116196,
-0.037480153143405914,
0.03892586752772331,
-0.09418831020593643,
-0.014131860807538033,
-0.011773538775742054,
-0.005697019398212433,
-0.039323437958955765,
0.021035147830843925,
0.011556682176887989,
0.0668281614780426,
-0.03666693717241287,
-0.010345895774662495,
-0.015360718593001366,
-0.02802879363298416,
-0.0007115626940503716,
0.039468009024858475,
0.005782858934253454,
-0.019300291314721107,
0.07062315940856934,
-0.015315540134906769,
-0.014619790017604828,
-0.021450791507959366,
0.004933501128107309,
-0.01910150609910488,
0.024739792570471764,
-0.023583220317959785,
0.01901114732027054,
0.021161649376153946,
-0.01842382736504078,
0.03231172263622284,
0.03030579350888729,
-0.03467908129096031,
-0.03623322397470474,
0.08088773488998413,
0.03326950967311859,
0.0028485096991062164,
0.03899815306067467,
0.025281935930252075,
0.039865583181381226,
0.0030653669964522123,
-0.06137058883905411,
0.019860506057739258,
0.03240207955241203,
-0.0053039658814668655,
0.08320087939500809,
0.006578001659363508,
0.02038457617163658,
-0.03498629480600357,
0.00970435980707407,
0.04691344127058983,
0.0037882241886109114,
-0.026420434936881065,
-0.0350947231054306,
-0.0538528710603714,
-0.008109555579721928,
-0.0010566140990704298,
-0.002823661547154188,
0.04239558428525925,
-0.0464797280728817,
-0.027107151225209236,
0.01657150499522686,
0.004122545942664146,
0.014285468496382236,
0.06039473041892052,
-0.020077362656593323,
-0.040227010846138,
0.044419582933187485,
0.05526244267821312,
0.029239580035209656,
0.007562894839793444,
-0.014068610966205597,
0.016824504360556602,
0.03030579350888729,
0.004511081613600254,
0.019752077758312225,
-0.059165872633457184,
0.05840687453746796,
0.0022623175755143166,
0.07376759499311447,
0.03737172484397888,
0.014538467861711979,
-0.022480864077806473,
-0.007847519591450691,
0.07806859165430069,
0.021649576723575592,
-0.03523929417133331,
-0.08146601915359497,
-0.009966395795345306,
-0.028787793591618538,
-0.0023266971111297607,
0.039721012115478516,
0.0431184396147728,
-0.029835937544703484,
0.0006946207140572369,
-0.0024938578717410564,
0.02846250869333744,
-0.0138246463611722,
-0.03469715267419815,
-0.02634814940392971,
-0.05114215612411499,
0.006257233675569296,
0.04062458127737045,
-0.012884932570159435,
-0.0626717284321785,
-0.006618662737309933,
0.00477537652477622,
0.030088936910033226,
0.006446984130889177,
-0.012930111028254032,
0.014782432466745377,
0.006469573359936476,
-0.009388109669089317,
0.006419876590371132,
0.00024481143918819726,
0.008800787851214409,
0.04915430024266243,
-0.002853027544915676,
0.06541858613491058,
-0.0020849916618317366,
0.053744442760944366,
0.03101057931780815,
-0.06722573190927505,
0.03755243867635727,
-0.03684765473008156,
-0.004612733609974384,
-0.02027614787220955,
-0.03144429624080658,
0.015152896754443645,
0.08117687702178955,
-0.013553575612604618,
-0.07792402058839798,
-0.020764077082276344,
-0.0033883939031511545,
-0.05060001462697983,
-0.0036075098905712366,
0.002042071893811226,
0.008100519888103008,
0.041419725865125656,
-0.021306220442056656,
-0.02665536478161812,
-0.010924181900918484,
0.007382180541753769,
-0.010951288975775242,
-0.034932080656290054,
-0.02025807648897171,
-0.03167922422289848,
0.019173791632056236,
-0.03211293742060661,
-0.03899815306067467,
0.021342363208532333,
-0.031932223588228226,
-0.03645008057355881,
0.03128165006637573,
0.00023676401178818196,
-0.09527260065078735,
0.014890861697494984,
0.05959958955645561,
-0.0012966253561899066,
-0.0424678698182106,
-0.06104530394077301,
-0.019752077758312225,
0.002703938167542219,
-0.052913159132003784,
0.04149201139807701,
-0.03045036643743515,
-0.03695608302950859,
0.04713029786944389,
-0.0043281083926558495,
0.09136916697025299,
0.01346321776509285,
-0.0036075098905712366,
-0.02112550660967827,
-0.03254665061831474,
-0.02154114842414856,
0.016201039776206017,
-0.023185649886727333,
-0.0722857341170311,
-0.036034438759088516,
0.01670704036951065,
-0.01424029003828764,
0.031245509162545204,
-0.03034193627536297,
0.02127007767558098,
-0.02098093368113041,
-0.029564864933490753,
0.03034193627536297,
-0.021053219214081764,
0.03979329764842987,
-0.027396293357014656,
-0.05125058442354202,
0.053636014461517334,
-0.04546772688627243,
-0.04940729960799217,
0.01910150609910488,
0.004138358402997255,
0.007052376866340637,
0.0018173084827139974,
-0.041022155433893204,
0.030938293784856796,
0.060720015317201614,
0.0812491625547409,
0.008656216785311699,
-0.05880444496870041,
0.029239580035209656,
0.00040350123890675604,
0.03034193627536297,
-0.08002030849456787,
0.005566001404076815,
0.022155577316880226,
-0.006049412302672863,
0.04488944262266159,
-0.020456863567233086,
-0.015261325985193253,
0.015180003829300404,
0.017484111711382866,
0.040010154247283936,
-0.027034863829612732,
0.00914414506405592,
0.03135393559932709,
0.00992121733725071,
0.09028488397598267,
-0.07712887972593307,
-0.010607931762933731,
-0.008344484493136406,
-0.0010673440992832184,
0.021161649376153946,
-0.027974579483270645,
0.025950578972697258,
-0.0035939563531428576,
-0.009157698601484299,
-0.024739792570471764,
-0.0075222342275083065,
-0.013788503594696522,
0.06809315830469131,
0.006849073339253664,
0.003137652762234211,
-0.01133982464671135,
0.026203578338027,
-0.029781723394989967,
0.03343215212225914,
-0.024450650438666344,
-0.047817014157772064,
-0.004721161909401417,
0.008222502656280994,
0.02665536478161812,
-0.0690690204501152,
-0.05229872837662697,
-0.00878723431378603,
0.05313001573085785,
-0.017737112939357758,
-0.051612015813589096,
0.042142581194639206,
0.036901868879795074,
-0.03740786761045456,
0.030775651335716248,
0.01224339660257101,
-0.03187800943851471,
0.06191273033618927,
0.037913866341114044,
0.05891287326812744,
-0.016390791162848473,
-0.06476801633834839,
0.0067225731909275055,
0.01884850487112999,
-0.025950578972697258,
0.05500944331288338,
-0.028245650231838226,
0.038600582629442215,
0.04973258450627327,
0.017737112939357758,
-0.04947958514094353,
-0.012893968261778355,
0.028697436675429344,
-0.036793436855077744,
-0.00934293121099472,
0.015071575529873371,
-0.0011656074784696102,
0.00018353799532633275,
-0.04575686901807785,
0.025715649127960205,
0.013237325474619865,
0.022480864077806473,
-0.015948040410876274
] |
52,304 |
flexget.manager
|
start
|
Starting point when executing from commandline, dispatch execution to correct destination.
If there is a FlexGet process with an ipc server already running, the command will be sent there for execution
and results will be streamed back.
If not, this will attempt to obtain a lock, initialize the manager, and run the command here.
|
def start(self) -> None:
"""
Starting point when executing from commandline, dispatch execution to correct destination.
If there is a FlexGet process with an ipc server already running, the command will be sent there for execution
and results will be streamed back.
If not, this will attempt to obtain a lock, initialize the manager, and run the command here.
"""
# If another process is started, send the execution to the running process
ipc_info = self.check_ipc_info()
# If we are connecting to a running daemon, we don't want to log to the log file,
# the daemon is already handling that.
if ipc_info:
console(
'There is a FlexGet process already running for this config, sending execution there.'
)
logger.debug('Sending command to running FlexGet process: {}', self.args)
try:
client = IPCClient(ipc_info['port'], ipc_info['password'])
except ValueError as e:
logger.error(e)
else:
try:
client.handle_cli(self.args)
except KeyboardInterrupt:
logger.error(
'Disconnecting from daemon due to ctrl-c. Executions will still continue in the '
'background.'
)
except EOFError:
logger.error('Connection from daemon was severed.')
return
if self.options.test:
logger.info('Test mode, creating a copy from database ...')
db_test_filename = os.path.join(self.config_base, f'test-{self.config_name}.sqlite')
if os.path.exists(self.db_filename):
shutil.copy(self.db_filename, db_test_filename)
logger.info('Test database created')
self.db_filename = db_test_filename
# No running process, we start our own to handle command
with self.acquire_lock():
self.initialize()
self.handle_cli()
self._shutdown()
|
(self) -> NoneType
|
[
0.08078636229038239,
-0.01920911855995655,
-0.04374685883522034,
0.026326367631554604,
0.04218180850148201,
-0.0029624151065945625,
-0.01302344724535942,
0.0017467070138081908,
-0.026475420221686363,
-0.08600319176912308,
-0.0023580545093864202,
-0.0003414812090341002,
-0.029400572180747986,
0.0057198829017579556,
-0.010219399817287922,
-0.005533567629754543,
0.005677962210029364,
-0.012688079848885536,
-0.025674263015389442,
-0.020848695188760757,
0.01895759254693985,
0.04695148393511772,
0.03122646175324917,
0.026233209297060966,
-0.005393831059336662,
0.009511401876807213,
-0.018053963780403137,
-0.024332793429493904,
0.03726308047771454,
-0.0158368106931448,
0.04020686447620392,
0.041548337787389755,
-0.01023803185671568,
-0.001044530770741403,
-0.009073560126125813,
0.039051711559295654,
0.007806615438312292,
-0.014765496365725994,
-0.02362479455769062,
0.0007988273282535374,
0.00782058946788311,
-0.0596209317445755,
0.08451267331838608,
0.010852872394025326,
-0.03357403725385666,
-0.008002246730029583,
-0.025935104116797447,
0.02414647676050663,
0.04277801886200905,
-0.00004148429070482962,
0.012837131507694721,
0.012576290406286716,
-0.017876964062452316,
0.009725664742290974,
-0.06446513533592224,
0.04136202111840248,
0.02422100305557251,
-0.00019272000645287335,
-0.02494763396680355,
-0.04512559249997139,
-0.03886539489030838,
0.020774168893694878,
-0.005379857495427132,
0.01668454520404339,
-0.010061032138764858,
-0.04669064283370972,
-0.026326367631554604,
-0.012306132353842258,
0.05131126567721367,
0.032344356179237366,
0.02422100305557251,
0.0018445225432515144,
-0.028301311656832695,
-0.022432375699281693,
0.0708371177315712,
0.04400769993662834,
-0.0004113494942430407,
0.004923384636640549,
0.010936714708805084,
0.0018456870457157493,
0.011514292098581791,
0.03987149894237518,
-0.037505291402339935,
0.009660453535616398,
0.001172040356323123,
0.057757776230573654,
0.0586148276925087,
0.02494763396680355,
-0.01965627633035183,
-0.017243491485714912,
-0.0173366479575634,
0.06781880557537079,
-0.028003206476569176,
0.1057526245713234,
0.03908897191286087,
-0.03178540989756584,
-0.028673941269516945,
0.011225503869354725,
-0.054813992232084274,
0.04009507596492767,
-0.06916028261184692,
0.05570830777287483,
0.04113844409584999,
-0.044790223240852356,
0.004518148489296436,
-0.04866558685898781,
-0.01898553967475891,
0.011402502655982971,
0.004306214861571789,
-0.009096849709749222,
-0.08287309110164642,
-0.018165752291679382,
-0.03428203612565994,
-0.04497653990983963,
-0.01538965292274952,
0.02634499967098236,
-0.05123673751950264,
-0.0026736261788755655,
0.00912945531308651,
-0.008356246165931225,
-0.030369412153959274,
0.03709539771080017,
0.0306861475110054,
-0.01023803185671568,
0.005785093642771244,
0.05667714774608612,
-0.0004395879223011434,
0.0002836943313013762,
0.025078054517507553,
-0.016842912882566452,
-0.003137085819616914,
-0.007503853179514408,
0.012669447809457779,
0.004026741720736027,
0.006409250199794769,
-0.022115638479590416,
-0.025655632838606834,
-0.003966189455240965,
0.01651686057448387,
0.03776613250374794,
0.03754255548119545,
-0.014961127191781998,
-0.016544807702302933,
-0.01935817115008831,
-0.07020364701747894,
0.024090582504868507,
0.016069704666733742,
-0.028096362948417664,
0.009082876145839691,
-0.004692819435149431,
0.034412454813718796,
-0.04762221872806549,
-0.06357081979513168,
-0.005049147643148899,
0.006609539035707712,
0.0488891638815403,
-0.0409148633480072,
-0.022264691069722176,
0.024612264707684517,
0.007387406192719936,
-0.05272725969552994,
-0.038828130811452866,
0.026903945952653885,
-0.017355279996991158,
-0.02716478705406189,
-0.030127201229333878,
-0.0496344268321991,
-0.04281528294086456,
0.01166334468871355,
0.033164143562316895,
0.01173787098377943,
0.04806937649846077,
-0.04792032390832901,
-0.0158368106931448,
-0.05071505531668663,
0.014802759513258934,
0.000055967400840017945,
-0.035381294786930084,
-0.01868743635714054,
-0.008798745460808277,
-0.036834556609392166,
-0.010396399535238743,
-0.023494374006986618,
-0.004061676096171141,
0.036461926996707916,
0.009506743401288986,
0.029847728088498116,
0.04482748731970787,
0.06398071348667145,
0.030537094920873642,
-0.052950840443372726,
0.0014381221262738109,
0.0023568898905068636,
0.007718116044998169,
-0.03694634512066841,
0.006302118767052889,
-0.006120461039245129,
-0.002110022120177746,
-0.014085444621741772,
0.00009854338713921607,
-0.010619978420436382,
0.024612264707684517,
0.026605840772390366,
0.0031766777392476797,
0.014840022660791874,
-0.06841501593589783,
-0.001176116056740284,
-0.008374877274036407,
0.010135558433830738,
0.04352327808737755,
0.01668454520404339,
-0.036834556609392166,
-0.016479598358273506,
0.025264369323849678,
0.03489687666296959,
-0.06446513533592224,
0.07091164588928223,
0.034114353358745575,
0.023513004183769226,
0.03197172284126282,
-0.0013426353689283133,
0.04069128632545471,
-0.033667195588350296,
0.019376803189516068,
-0.06714807450771332,
0.019768064841628075,
0.023419847711920738,
0.024854475632309914,
-0.0033653220161795616,
0.028245415538549423,
0.012287501245737076,
-0.027928680181503296,
-0.03281014412641525,
0.0228236373513937,
-0.002904191380366683,
-0.02701573446393013,
-0.020792799070477486,
0.028003206476569176,
-0.09040023386478424,
-0.0002554559032432735,
0.001195912016555667,
0.004506504163146019,
0.08689750730991364,
-0.02399742417037487,
-0.031990356743335724,
-0.00924124475568533,
-0.020438799634575844,
-0.012296817265450954,
0.011234818957746029,
0.06271376460790634,
0.019842591136693954,
-0.027649207040667534,
0.021668482571840286,
-0.0184638574719429,
-0.06699901819229126,
0.0031813355162739754,
-0.0498952679336071,
-0.023159004747867584,
0.012455184943974018,
0.002783086383715272,
-0.01778380572795868,
-0.03415161371231079,
0.012035975232720375,
0.007345485035330057,
0.045460961759090424,
0.006642144173383713,
-0.005128331482410431,
-0.025804683566093445,
0.042964331805706024,
-0.012893026694655418,
0.04020686447620392,
0.05891293287277222,
-0.008542561903595924,
0.02804046869277954,
-0.05578283220529556,
0.017653385177254677,
-0.007527142763137817,
-0.04534916952252388,
-0.07139606773853302,
0.01531512662768364,
0.03226982802152634,
0.03972244635224342,
0.0054776729084551334,
-0.05403146892786026,
-0.01052682101726532,
-0.019525855779647827,
0.01015418954193592,
-0.006031961180269718,
-0.0548885203897953,
0.008384193293750286,
-0.026624472811818123,
0.05526115000247955,
-0.002988033462315798,
-0.0621175579726696,
0.048330217599868774,
0.042293597012758255,
-0.10068484395742416,
0.0005662241601385176,
-0.02355026826262474,
-0.026382261887192726,
0.014737549237906933,
-0.018789909780025482,
-0.0825749859213829,
0.0199543796479702,
-0.029829097911715508,
0.032642461359500885,
-0.00008995540702017024,
0.0026736261788755655,
-0.017448438331484795,
-0.0030788620933890343,
0.04874011129140854,
0.021165430545806885,
0.02811499498784542,
-0.037505291402339935,
0.03998328745365143,
0.06755796819925308,
0.02701573446393013,
0.030518464744091034,
0.020792799070477486,
0.03238161653280258,
-0.05868935585021973,
0.046839695423841476,
0.02524573728442192,
0.041846439242362976,
0.03689045086503029,
0.04628074914216995,
0.02656857669353485,
0.07877415418624878,
0.01738322712481022,
0.004166478291153908,
-0.034486982971429825,
0.08220236003398895,
-0.08227688819169998,
-0.022544164210557938,
-0.0012657803017646074,
-0.06323544681072235,
-0.00031178718199953437,
-0.08928234130144119,
0.014327654615044594,
-0.045386433601379395,
0.07221585512161255,
0.035437192767858505,
-0.035157717764377594,
-0.04009507596492767,
0.01184966042637825,
-0.0424053855240345,
0.027705101296305656,
0.017746543511748314,
-0.03983423486351967,
-0.0755695328116417,
0.004268951714038849,
-0.012212974950671196,
-0.05291357636451721,
-0.0007615642389282584,
0.028804361820220947,
-0.08443814516067505,
-0.029326045885682106,
-0.0890587642788887,
0.013684866949915886,
-0.027630575001239777,
-0.02327079512178898,
0.024556370452046394,
-0.030443938449025154,
0.017653385177254677,
-0.06975649297237396,
-0.1057526245713234,
-0.013358814641833305,
-0.044641170650720596,
0.08227688819169998,
0.05410599336028099,
-0.023885635659098625,
-0.019153224304318428,
0.021016377955675125,
-0.014867969788610935,
-0.030742041766643524,
-0.005165594629943371,
-0.04926179349422455,
-0.03908897191286087,
-0.045908115804195404,
0.020196590572595596,
-0.0029274809639900923,
-0.026307735592126846,
-0.018352067098021507,
-0.007247669622302055,
-0.0700918585062027,
-0.059881772845983505,
0.030797937884926796,
0.007117248605936766,
0.01556665264070034,
0.020941851660609245,
0.0102287158370018,
0.032866038382053375,
0.016367807984352112,
0.026624472811818123,
0.027146155014634132,
0.004108254797756672,
0.04050496965646744,
0.04374685883522034,
0.019712170585989952,
-0.023159004747867584,
0.01277192123234272,
-0.007592353038489819,
0.06163313612341881,
0.04702600836753845,
0.02140764147043228,
-0.04642980173230171,
0.05779504030942917,
-0.012138448655605316,
0.03275424987077713,
0.02539478987455368,
-0.028524888679385185,
-0.02472405508160591,
-0.03931255266070366,
-0.0027993889525532722,
-0.08898423612117767,
-0.03972244635224342,
0.007098617032170296,
0.018119173124432564,
0.02392289787530899,
0.05846577510237694,
0.03731897473335266,
0.012716026976704597,
0.025823315605521202,
-0.050975896418094635,
-0.013479920104146004,
-0.006777223199605942,
0.023363951593637466,
0.03864181414246559,
-0.03560487553477287,
-0.035232242196798325,
-0.01184966042637825,
0.0898040309548378,
0.03987149894237518,
0.022693216800689697,
-0.015110179781913757,
0.025562474504113197,
0.021016377955675125,
-0.02429552935063839,
0.034636035561561584,
0.018389331176877022,
-0.01993574947118759,
-0.01177513413131237,
0.009585928171873093,
-0.05854030326008797,
0.015510757453739643,
0.01701059751212597,
-0.008100062608718872,
0.001186596229672432,
0.03210214525461197,
0.026382261887192726,
-0.0329219326376915,
0.04806937649846077,
-0.011234818957746029,
-0.035586241632699966,
-0.019171856343746185,
-0.054068733006715775,
-0.024351423606276512,
0.044417593628168106,
-0.007718116044998169,
0.029270151630043983,
-0.007550431881099939,
0.0029158361721783876,
-0.013079341500997543,
-0.008486666716635227,
-0.001726910937577486,
-0.0028599414508789778,
0.03187856823205948,
0.07899773120880127,
-0.030611621215939522,
0.016377124935388565,
0.0023091465700417757,
0.020066170021891594,
0.007093959022313356,
0.009162059985101223,
0.038455501198768616,
-0.028618047013878822,
-0.00030887601315043867,
-0.04333696514368057,
-0.003698360873386264,
-0.02746289223432541,
-0.006986828055232763,
-0.023363951593637466,
0.04292707145214081,
0.060179878026247025,
-0.11760228872299194,
-0.02915836125612259,
0.11007514595985413,
-0.03489687666296959,
0.0006573440623469651,
-0.05719882994890213,
0.03644329309463501,
-0.007503853179514408,
0.028897520154714584,
0.04937358200550079,
0.0611114539206028,
0.00007758290303172544,
-0.03281014412641525,
-0.027779627591371536,
0.06453965604305267,
-0.01738322712481022,
0.016777703538537025,
-0.005724540911614895,
-0.02040153741836548,
0.029996780678629875,
0.029139729216694832,
0.09211433678865433,
-0.10813746601343155,
0.012893026694655418,
-0.02641952596604824,
-0.0007918404880911112,
-0.029568254947662354,
-0.018873751163482666,
-0.0177092794328928,
-0.06103692948818207,
-0.04370959475636482,
0.001967956544831395,
-0.01564117893576622,
0.0157157052308321,
-0.027127522975206375,
-0.02973593957722187,
0.03348087891936302,
0.040318652987480164,
-0.02943783439695835,
-0.05350978672504425,
-0.05477673187851906,
-0.005910856183618307,
-0.02791004814207554,
0.00384508422575891,
0.04601990804076195,
0.02340121567249298,
-0.0031766777392476797,
-0.0155293894931674,
0.00914342887699604,
-0.04121296852827072,
0.06640281528234482,
0.032567933201789856,
-0.016498230397701263,
0.007284932304173708,
-0.03672276809811592,
-0.07392995804548264,
0.04195823147892952,
0.06330997496843338,
-0.0183334369212389,
-0.016283966600894928,
0.03277288004755974,
-0.0037402817979454994,
0.02163121849298477,
0.048851899802684784,
0.01159813441336155,
-0.015408284030854702,
-0.008086089044809341,
0.005910856183618307,
0.00192370661534369,
0.025823315605521202,
-0.03098425269126892,
-0.02517121098935604,
0.06655186414718628,
-0.02848762646317482,
0.04113844409584999,
0.0401696041226387,
0.02716478705406189,
0.012268870137631893,
-0.12952646613121033,
0.004196754656732082,
-0.00004093844472663477,
-0.02826404757797718,
0.03838097304105759,
0.06330997496843338,
0.06226661056280136,
-0.019395433366298676,
-0.01453260239213705,
-0.010936714708805084,
0.013377446681261063,
0.06330997496843338,
-0.02215290255844593,
-0.0029181651771068573,
0.032437514513731,
0.034114353358745575,
0.012902341783046722,
-0.010359136387705803,
0.028972046449780464,
-0.03582845255732536,
0.008351588621735573,
-0.006758591625839472,
-0.04967168718576431,
0.019917117431759834,
-0.006418565753847361,
-0.0174577534198761,
0.047659482806921005,
-0.050677791237831116,
-0.024332793429493904,
0.015436232089996338,
0.01913459226489067,
-0.021910691633820534,
-0.01449533924460411,
0.05567104369401932,
0.03033214807510376,
0.022469637915492058,
0.04158559814095497,
0.008836008608341217,
-0.06826596707105637,
0.016470281407237053,
0.021985217928886414,
-0.009967874735593796,
0.01726212352514267,
-0.009222612716257572,
-0.050901368260383606,
-0.015175390057265759,
-0.08026468008756638,
0.0310587789863348,
-0.01586475782096386,
-0.05101316049695015,
-0.008789429441094398,
0.0738181620836258,
-0.002752810250967741,
0.011327977292239666,
-0.04359780624508858,
0.022413743659853935,
0.052168313413858414,
0.03200898692011833,
0.07311016321182251,
0.03452424705028534,
0.020736904814839363,
-0.03076067380607128,
-0.026084156706929207,
0.0008395838085561991,
0.017681332305073738,
-0.006693380884826183,
0.001447437796741724,
0.011244134977459908,
0.018491804599761963,
-0.009311112575232983,
0.014513970352709293,
0.06394344568252563,
0.029549624770879745,
-0.04270349070429802,
0.029922254383563995,
0.008659008890390396,
0.012082554399967194,
0.019768064841628075,
0.05343525856733322,
-0.02649405039846897,
-0.0016558781499043107,
-0.0743398517370224,
0.002354560885578394,
-0.062378399074077606,
0.012343395501375198,
-0.00875682383775711,
0.041697390377521515,
0.021593956276774406,
-0.021817535161972046,
0.02325216308236122,
-0.020699642598628998,
0.05302536487579346,
0.0310587789863348,
-0.059061985462903976,
-0.0638689249753952,
-0.022488269954919815,
-0.02636362984776497,
0.019469959661364555,
-0.03972244635224342,
0.03178540989756584,
-0.005640699062496424,
-0.04247991368174553,
0.01950722374022007,
-0.06189398095011711,
0.028357205912470818,
-0.024016056209802628,
0.01965627633035183,
0.041846439242362976,
0.053919680416584015,
-0.04657885059714317,
-0.05932282656431198,
0.02945646643638611,
-0.04393317177891731,
-0.016619333997368813,
0.03575392812490463,
-0.030537094920873642,
0.016172178089618683,
-0.009949242696166039,
-0.03189719840884209,
-0.05026789754629135,
0.009949242696166039,
0.02422100305557251,
0.003274493385106325,
-0.03458014130592346,
0.03983423486351967,
-0.046988748013973236,
-0.014765496365725994,
-0.04076581075787544,
-0.04005781188607216,
0.03584708645939827,
0.022954057902097702,
-0.027779627591371536,
-0.06267650425434113,
-0.0449020154774189,
-0.037002239376306534,
-0.04113844409584999,
-0.050156109035015106,
0.007578379474580288,
0.04393317177891731,
-0.03709539771080017,
0.03476645424962044,
0.021892061457037926,
0.010778346098959446,
-0.005221489351242781,
-0.03804560750722885,
-0.005589462351053953,
0.009995821863412857,
0.006716670468449593,
0.08727014064788818,
-0.003414229955524206,
0.08346930146217346,
0.04482748731970787,
0.027630575001239777,
-0.02356889843940735,
-0.05939735099673271,
0.021985217928886414,
-0.017727911472320557,
-0.003521361155435443,
-0.0090409554541111,
0.01163539756089449,
0.06304913759231567,
-0.03819466009736061,
0.05160936713218689,
-0.02930741384625435,
-0.05615546554327011,
-0.04080307483673096,
0.04695148393511772,
0.04076581075787544,
-0.051572106778621674,
-0.03582845255732536,
-0.005938803777098656,
0.05235463008284569,
0.03623834624886513,
-0.04374685883522034,
0.05268999934196472,
-0.01793285831809044,
0.004946674220263958,
0.03901444748044014,
-0.010098295286297798,
-0.0319344624876976,
-0.007587695028632879,
-0.0009566131629981101,
-0.02945646643638611,
0.04121296852827072,
0.008328299038112164,
0.026698999106884003,
0.002941454527899623,
0.00037874429835937917,
0.018445225432515144,
-0.02517121098935604,
0.035288140177726746,
0.05928556248545647,
-0.020122064277529716,
-0.03090972639620304,
0.02487310767173767,
0.0523918941617012,
0.02751878648996353,
-0.032940562814474106,
0.012669447809457779,
-0.03495277091860771,
-0.022413743659853935,
0.026997102424502373,
0.03398393094539642,
-0.010629294440150261,
0.00896642915904522,
0.03461740165948868
] |
52,305 |
flexget.manager
|
update_config
|
Provide a new config for the manager to use.
:raises: `ValueError` and rolls back to previous config if the provided config is not valid.
|
def update_config(self, config: dict) -> None:
"""
Provide a new config for the manager to use.
:raises: `ValueError` and rolls back to previous config if the provided config is not valid.
"""
new_user_config = config
old_config = self.config
try:
self.config = self.validate_config(config)
except ConfigError as e:
for error in getattr(e, 'errors', []):
logger.critical('[{}] {}', error.json_pointer, error.message)
logger.debug('invalid config, rolling back')
self.config = old_config
raise
logger.debug('New config data loaded.')
self.user_config = copy.deepcopy(new_user_config)
fire_event('manager.config_updated', self)
|
(self, config: dict) -> NoneType
|
[
0.030019566416740417,
0.011627689935266972,
-0.022323675453662872,
0.011292275972664356,
-0.01650051213800907,
0.009074815548956394,
-0.07960495352745056,
-0.00439998134970665,
0.040137890726327896,
-0.022044163197278976,
-0.02487654983997345,
-0.0968974158167839,
0.017171340063214302,
0.035050779581069946,
-0.03447312116622925,
0.02336718514561653,
-0.0063402592204511166,
-0.00025971303693950176,
-0.009116742759943008,
-0.0334668792784214,
0.025901425629854202,
-0.07028789818286896,
0.02420572005212307,
0.06182800605893135,
0.01419919915497303,
-0.039877016097307205,
0.04431193694472313,
0.014655734412372112,
0.005194260738790035,
-0.02290133200585842,
-0.03240473195910454,
0.005799869541078806,
0.0168731939047575,
0.0054784310050308704,
-0.01127364207059145,
-0.01858753338456154,
0.040920525789260864,
0.059107426553964615,
-0.0756545215845108,
0.023124942556023598,
-0.04367837682366371,
-0.00849715806543827,
0.07893412560224533,
-0.001272943220101297,
0.048485979437828064,
0.07364203780889511,
-0.07326935976743698,
0.09809000045061111,
-0.05374079942703247,
0.04751700535416603,
0.0038689090870320797,
-0.03700736165046692,
-0.04032423347234726,
0.06782819330692291,
0.029031958431005478,
-0.022565918043255806,
0.05210099741816521,
-0.0027927886694669724,
0.020031677559018135,
-0.04338023066520691,
-0.0257523525506258,
-0.03901984542608261,
0.03743594512343407,
-0.06130625307559967,
-0.007099599577486515,
-0.07576632499694824,
-0.00947079062461853,
0.05187738686800003,
-0.00348458020016551,
-0.024839280173182487,
-0.026292741298675537,
0.007490915711969137,
0.007244013715535402,
-0.029982296749949455,
-0.025845523923635483,
0.01611851342022419,
-0.005324699450284243,
0.007127550430595875,
0.020609335973858833,
0.04606354236602783,
0.0424857921898365,
-0.011646324768662453,
0.02918102964758873,
0.010956862010061741,
-0.015093636699020863,
-0.0005616439739242196,
-0.0007488586707040668,
-0.05057299882173538,
0.0037990310229361057,
0.0257523525506258,
0.06842448562383652,
0.0175999253988266,
0.03715643286705017,
-0.03549799695611,
0.011050032451748848,
-0.02638591267168522,
-0.010612131096422672,
0.023516258224844933,
-0.0036965433973819017,
-0.020646603778004646,
-0.009484766982495785,
-0.016332805156707764,
0.06890897452831268,
-0.03011273592710495,
-0.01383583340793848,
-0.052063729614019394,
-0.00638684444129467,
-0.018904313445091248,
-0.013770613819360733,
0.03642970323562622,
-0.02217460237443447,
-0.06931892037391663,
-0.02400074526667595,
0.028566105291247368,
0.036150190979242325,
0.014171247370541096,
-0.00246902066282928,
-0.006666356232017279,
0.0025086181703954935,
0.0029581664130091667,
-0.038945309817790985,
0.032777413725852966,
0.03872169926762581,
0.011469299905002117,
-0.00838069524616003,
-0.00031095684971660376,
0.00014324979565571994,
0.006358893122524023,
0.04453554376959801,
-0.014385540038347244,
0.027280351147055626,
0.025044256821274757,
-0.04010062292218208,
-0.01814963109791279,
0.051541972905397415,
-0.03447312116622925,
-0.005035870708525181,
0.009391595609486103,
0.012391689233481884,
0.004826236981898546,
0.03439858555793762,
0.06600204855203629,
0.019808068871498108,
-0.02944190800189972,
0.030187273398041725,
0.029348736628890038,
-0.03311283141374588,
0.058175720274448395,
-0.006950526498258114,
-0.03206931799650192,
0.010789155028760433,
-0.012158762663602829,
-0.0009346175356768072,
0.02685176581144333,
-0.07051150500774384,
0.017329730093479156,
-0.05098294839262962,
-0.023702599108219147,
-0.0012426627799868584,
0.04069691523909569,
0.0025109476409852505,
-0.005226870533078909,
0.04535544663667679,
0.020143482834100723,
-0.07908320426940918,
-0.03493897244334221,
-0.04088325798511505,
-0.008068573661148548,
0.014115344732999802,
0.0073511600494384766,
-0.009270474314689636,
-0.036150190979242325,
-0.030187273398041725,
0.016537779942154884,
-0.02280816249549389,
0.007043696939945221,
0.011255008168518543,
-0.06462312489748001,
-0.003267958527430892,
-0.016565732657909393,
-0.050610266625881195,
0.008487841114401817,
0.04882139340043068,
0.012633932754397392,
-0.012745737098157406,
0.032572440803050995,
-0.026926301419734955,
0.05426255613565445,
-0.010351252742111683,
-0.011730178259313107,
-0.014758222736418247,
-0.052660021930933,
-0.017795583233237267,
-0.017413584515452385,
0.006852697115391493,
-0.010463058017194271,
-0.08124475926160812,
0.015447684563696384,
0.00031037454027682543,
0.009400913491845131,
0.003568433690816164,
-0.053517188876867294,
0.035013508051633835,
-0.014087393879890442,
0.05627503991127014,
-0.020273922011256218,
0.0009742150432430208,
0.015149538405239582,
0.017665144056081772,
0.019975775852799416,
0.013547004200518131,
0.02927420102059841,
0.05787757411599159,
0.007001770194619894,
0.0025715085212141275,
-0.055007919669151306,
0.04174042493104935,
0.020273922011256218,
-0.016593683511018753,
0.024131184443831444,
0.05109475553035736,
0.038423553109169006,
0.06048635020852089,
-0.016835926100611687,
0.009219230152666569,
-0.01905338652431965,
-0.010099692270159721,
-0.039057113230228424,
0.06339327245950699,
0.02342308685183525,
0.02897605486214161,
-0.0014359918422996998,
0.015224074944853783,
-0.018000559881329536,
0.0904872789978981,
0.006270381156355143,
-0.012419640086591244,
-0.05862293764948845,
-0.07602720707654953,
0.05601416155695915,
-0.00024005986051633954,
-0.029814589768648148,
0.0025668498128652573,
-0.011487934738397598,
-0.03488307073712349,
0.008459890261292458,
-0.005212894640862942,
0.002851020311936736,
-0.013053200207650661,
0.011441349051892757,
0.029572347179055214,
0.021373335272073746,
0.0018214851152151823,
0.0875803604722023,
-0.05172831565141678,
-0.036560140550136566,
-0.021652845665812492,
0.0016071927966549993,
0.045690860599279404,
0.016537779942154884,
0.01975216530263424,
-0.09384142607450485,
0.0004940953222103417,
0.050610266625881195,
-0.01191651914268732,
-0.015727195888757706,
0.007174135651439428,
-0.02586415782570839,
0.05601416155695915,
0.03124941699206829,
0.08541880548000336,
0.037342775613069534,
0.0026017888449132442,
-0.013258175924420357,
0.011459982953965664,
0.001822649734094739,
0.06775365769863129,
0.007989378646016121,
0.02202552929520607,
-0.029758688062429428,
0.023870306089520454,
-0.05482157692313194,
0.062312494963407516,
0.020404361188411713,
0.021485138684511185,
-0.027429422363638878,
-0.026143668219447136,
0.028547469526529312,
-0.02877108007669449,
0.03052268736064434,
0.05634957551956177,
-0.062312494963407516,
-0.01923041045665741,
0.014702320098876953,
0.0319947823882103,
-0.060039132833480835,
-0.07721979171037674,
0.02217460237443447,
0.032311562448740005,
0.005697381682693958,
0.01827075332403183,
-0.0007622519042342901,
-0.08594055473804474,
0.033243268728256226,
0.08184105157852173,
-0.04338023066520691,
0.030615856871008873,
-0.029143761843442917,
-0.021261529996991158,
0.03942979499697685,
0.036150190979242325,
-0.04550451785326004,
-0.03458492457866669,
-0.007136867381632328,
0.013276809826493263,
-0.02897605486214161,
0.05292089655995369,
-0.02539830468595028,
0.01917450875043869,
-0.03924345597624779,
-0.039467062801122665,
0.04114413633942604,
-0.03057858906686306,
-0.002321112435311079,
-0.016220999881625175,
0.03378365933895111,
0.008194353431463242,
0.08266095072031021,
-0.0319947823882103,
0.0381067730486393,
-0.07431286573410034,
-0.018904313445091248,
0.03767818957567215,
0.014786173589527607,
-0.03165936842560768,
-0.08430075645446777,
-0.004635237157344818,
-0.028435666114091873,
0.033243268728256226,
-0.06205161660909653,
0.01885772868990898,
0.011338861659169197,
0.007150843273848295,
-0.025211963802576065,
0.007020404562354088,
0.014888660982251167,
-0.020031677559018135,
0.01798192411661148,
0.005790552590042353,
0.03777135908603668,
-0.06682194769382477,
0.009205254726111889,
-0.0167334396392107,
0.01731109619140625,
-0.01669616997241974,
-0.011180471628904343,
0.015457001514732838,
-0.0721513107419014,
0.012456908822059631,
-0.07789061963558197,
-0.06786546111106873,
-0.004309140145778656,
0.011404081247746944,
0.03622472658753395,
0.0017609242349863052,
0.03771545737981796,
-0.12089816480875015,
0.012009689584374428,
0.08541880548000336,
-0.027224447578191757,
-0.00839467067271471,
-0.004020311404019594,
0.030392248183488846,
0.061641667038202286,
0.09898444265127182,
0.012503493577241898,
-0.09786639362573624,
0.020795676857233047,
-0.024783378466963768,
0.07334389537572861,
0.06223795935511589,
-0.03447312116622925,
0.014916612766683102,
0.004807602614164352,
0.059517376124858856,
-0.02534240111708641,
-0.004756358917802572,
-0.025361036881804466,
-0.019975775852799416,
-0.014879344031214714,
-0.014068759977817535,
0.03011273592710495,
-0.014385540038347244,
0.044237397611141205,
-0.03654150664806366,
0.05280909314751625,
0.01223329920321703,
0.04595173895359039,
-0.0015955464914441109,
0.008129134774208069,
-0.026628155261278152,
-0.04036150127649307,
0.037547748535871506,
-0.0029628248885273933,
0.016565732657909393,
0.010323301889002323,
0.013211590237915516,
0.058734744787216187,
-0.029162395745515823,
0.02508152462542057,
-0.024187086150050163,
0.035479363054037094,
-0.042411256581544876,
-0.0069831362925469875,
-0.003517189994454384,
-0.024187086150050163,
-0.021186992526054382,
-0.03777135908603668,
0.012112176977097988,
0.06395229697227478,
0.03203205019235611,
0.032050684094429016,
-0.05038665980100632,
-0.015345197170972824,
0.010332618840038776,
0.008594986982643604,
-0.007947451435029507,
0.01632348820567131,
-0.10889779031276703,
0.007612037472426891,
0.005329357925802469,
0.045579053461551666,
0.0343240462243557,
0.0044675301760435104,
0.004784310236573219,
-0.044386472553014755,
0.018308021128177643,
-0.05929376557469368,
-0.04021243005990982,
-0.008520451374351978,
0.020460262894630432,
0.017143389210104942,
0.007830988615751266,
-0.0024410695768892765,
0.02098201774060726,
-0.030485419556498528,
-0.027541227638721466,
-0.02141060307621956,
0.019565824419260025,
-0.02217460237443447,
-0.03633653372526169,
-0.04069691523909569,
-0.06111991032958031,
-0.040659647434949875,
0.011534519493579865,
-0.01166495867073536,
0.002291996730491519,
0.0071881115436553955,
0.03659740835428238,
0.07714525610208511,
-0.051430169492959976,
-0.06972887367010117,
-0.019249044358730316,
0.030392248183488846,
0.00345197063870728,
0.00020351952116470784,
0.0494549535214901,
0.036411069333553314,
-0.018634120002388954,
0.0014220161829143763,
0.0392807237803936,
-0.05280909314751625,
-0.002983788261190057,
0.058287523686885834,
-0.058287523686885834,
-0.023814404383301735,
0.01415261346846819,
0.01049100887030363,
-0.001822649734094739,
-0.027541227638721466,
0.0453927144408226,
0.0196403618901968,
-0.021075189113616943,
-0.0070250630378723145,
-0.009680424816906452,
-0.046920713037252426,
0.06078449636697769,
0.001185595872811973,
0.03266561031341553,
0.004956675693392754,
-0.035479363054037094,
-0.015727195888757706,
0.0022593869362026453,
-0.01606260985136032,
-0.058063916862010956,
-0.027597131207585335,
-0.018410509452223778,
-0.01482344139367342,
0.07647442817687988,
0.016957048326730728,
0.04222491383552551,
-0.05023758485913277,
0.009135376662015915,
0.015177490189671516,
0.024913817644119263,
0.05426255613565445,
-0.02539830468595028,
0.07811422646045685,
-0.006144600920379162,
0.03777135908603668,
-0.057020403444767,
0.01334202941507101,
0.031491659581661224,
0.0010767027270048857,
0.006228454411029816,
-0.07211404293775558,
-0.025510108098387718,
0.021652845665812492,
-0.015419733710587025,
-0.007220721337944269,
0.003810677444562316,
0.0009369467734359205,
0.048746854066848755,
0.010994129814207554,
-0.031230783089995384,
-0.0026833130978047848,
0.048225101083517075,
-0.030709028244018555,
-0.02124289609491825,
0.031230783089995384,
0.00690394127741456,
0.039206188172101974,
-0.011282959021627903,
0.010845057666301727,
0.03339233994483948,
0.000006496465175587218,
-0.031025808304548264,
0.008315475657582283,
-0.04114413633942604,
0.009051523171365261,
0.037081897258758545,
-0.022714991122484207,
0.09317059814929962,
0.04390198364853859,
-0.09138172119855881,
-0.027634399011731148,
-0.005632162559777498,
-0.015419733710587025,
-0.014506661333143711,
-0.0515047051012516,
-0.011609056033194065,
0.003542811842635274,
0.08541880548000336,
0.04759154096245766,
0.01829870417714119,
-0.07539364695549011,
0.010164911858737469,
-0.04647349193692207,
0.0346221923828125,
0.003328519407659769,
-0.03680238500237465,
0.037286873906850815,
-0.03151029720902443,
0.07543091475963593,
0.04297027736902237,
-0.0071601602248847485,
-0.02223050408065319,
0.026553619652986526,
-0.02554737776517868,
0.016360756009817123,
0.04908226802945137,
0.005445821210741997,
-0.06521941721439362,
-0.033448245376348495,
-0.014991148374974728,
0.034174975007772446,
0.03704462945461273,
-0.005646137986332178,
0.001256638439372182,
-0.007486257236450911,
0.01736699976027012,
-0.008543743751943111,
0.035889312624931335,
-0.010509642772376537,
-0.02659088745713234,
-0.040137890726327896,
-0.014488027431070805,
0.07405199110507965,
-0.02316221036016941,
0.013397932052612305,
-0.022584551945328712,
0.011264325119554996,
-0.04341749846935272,
-0.036094289273023605,
0.021075189113616943,
0.02523059770464897,
-0.047293394804000854,
-0.05508245527744293,
0.013043883256614208,
0.02228640578687191,
-0.0453927144408226,
0.015196124091744423,
0.01539178192615509,
0.006712941452860832,
-0.022789526730775833,
0.004840212408453226,
-0.039467062801122665,
-0.016630951315164566,
-0.016854560002684593,
-0.007150843273848295,
0.005226870533078909,
0.025416938588023186,
0.007779744919389486,
0.028286593034863472,
0.016491195186972618,
0.002363039180636406,
-0.01539178192615509,
0.008753377012908459,
0.002496971981599927,
0.03613155707716942,
-0.019155874848365784,
0.039057113230228424,
-0.021596943959593773,
0.02985185943543911,
-0.049678560346364975,
-0.03738004341721535,
-0.01041647233068943,
-0.0013230224139988422,
-0.028826981782913208,
-0.018978850916028023,
-0.007653964217752218,
0.010164911858737469,
0.03203205019235611,
-0.041181404143571854,
-0.04613807797431946,
-0.0372309684753418,
-0.017814217135310173,
0.0045327492989599705,
-0.00533867534250021,
-0.04084599018096924,
0.0869840681552887,
-0.019509922713041306,
-0.0009427699842490256,
-0.030969906598329544,
-0.009158669970929623,
0.053778067231178284,
-0.00042130579822696745,
-0.021746017038822174,
0.04498276486992836,
0.02068387158215046,
-0.005101090297102928,
0.022416844964027405,
0.007183453068137169,
0.036206092685461044,
0.01716202311217785,
-0.005678747780621052,
0.02616230398416519,
0.02141060307621956,
0.012438274919986725,
-0.0006102673942223191,
-0.04136774316430092,
-0.009391595609486103,
-0.05321904271841049,
0.0017818876076489687,
0.029348736628890038,
0.015475636348128319,
-0.04431193694472313,
0.0424857921898365,
0.058287523686885834,
-0.04379018023610115,
0.008501816540956497,
-0.04315662011504173,
0.019808068871498108,
0.023274015635252,
0.04457281157374382,
-0.10874871909618378,
-0.0020159787964075804,
-0.049417681992053986,
0.03249790519475937,
0.0031375198159366846,
-0.06104537472128868,
0.030243175104260445,
-0.01623031683266163,
-0.015047051012516022,
-0.03669058158993721,
0.01666821911931038,
0.04416286200284958,
-0.007737818174064159,
0.017273828387260437,
0.04058511182665825,
0.004232274368405342,
0.04632442072033882,
-0.0285102017223835,
-0.03887077420949936,
-0.05239914357662201,
-0.0357961431145668,
-0.01629553735256195,
0.0016619304660707712,
-0.10286033898591995,
0.00741172069683671,
0.0410323292016983,
-0.021746017038822174,
-0.007896208204329014,
-0.020273922011256218,
0.030709028244018555,
-0.031957514584064484,
-0.04069691523909569,
-0.0189136303961277,
-0.05243641138076782,
-0.013155687600374222,
-0.007127550430595875,
0.018130997195839882,
0.05344265326857567,
-0.026087766513228416,
0.0223982110619545,
0.0837789997458458,
0.007812354248017073,
-0.059778254479169846,
-0.018540948629379272,
0.022062797099351883,
-0.11210285872220993,
0.01713407225906849,
-0.017143389210104942,
-0.06324420124292374,
0.02336718514561653,
-0.038945309817790985,
-0.008762694895267487,
-0.012755054049193859,
-0.014879344031214714,
0.01226125005632639,
-0.06559210270643234,
-0.0016409670934081078,
-0.00007555553020210937,
0.10673623532056808,
0.02042299509048462,
0.006186527665704489,
-0.0017015279736369848,
0.005306065548211336,
-0.020609335973858833,
0.03995155170559883,
-0.043454766273498535,
-0.009754961356520653,
-0.023907573893666267,
-0.008329451084136963,
0.0022687038872390985,
-0.05042392760515213,
-0.019509922713041306,
0.017301779240369797,
-0.03715643286705017,
0.025584645569324493,
0.0051336996257305145,
0.039467062801122665,
0.027802105993032455,
0.06641200184822083,
0.011897885240614414,
-0.025715084746479988,
-0.0035381533671170473,
-0.02741078846156597,
0.09354327619075775,
0.0026134352665394545,
0.007020404562354088,
0.015764465555548668,
0.05415074899792671,
0.0072579896077513695,
0.014879344031214714,
-0.0055063823238015175,
-0.03883350268006325,
0.03206931799650192
] |
52,306 |
flexget.manager
|
validate_config
|
Check all root level keywords are valid. Config may be modified by before_config_validate hooks. Modified
config will be returned.
:param config: Config to check. If not provided, current manager config will be checked.
:raises: `ValueError` when config fails validation. There will be an `errors` attribute with the schema errors.
:returns: Final validated config.
|
def validate_config(self, config: Optional[dict] = None) -> dict:
"""
Check all root level keywords are valid. Config may be modified by before_config_validate hooks. Modified
config will be returned.
:param config: Config to check. If not provided, current manager config will be checked.
:raises: `ValueError` when config fails validation. There will be an `errors` attribute with the schema errors.
:returns: Final validated config.
"""
conf = config if config else self.config
conf = fire_event('manager.before_config_validate', conf, self)
errors = config_schema.process_config(conf)
if errors:
err = ConfigError('Did not pass schema validation.')
err.errors = errors
raise err
else:
return conf
|
(self, config: Optional[dict] = None) -> dict
|
[
0.021628161892294884,
-0.017317330464720726,
0.04514347016811371,
-0.0011817783815786242,
-0.01847366988658905,
0.025050925090909004,
-0.022405222058296204,
-0.011803907342255116,
0.023848334327340126,
-0.019204476848244667,
-0.02251623012125492,
-0.04754865542054176,
0.04839972034096718,
-0.020518077537417412,
-0.013783559203147888,
-0.01988902874290943,
-0.012201688252389431,
0.01039779931306839,
0.019333986565470695,
-0.03071236051619053,
-0.0007816851139068604,
-0.022164704278111458,
-0.0122756939381361,
0.051137931644916534,
-0.01124886516481638,
0.05746541917324066,
0.05761342868208885,
0.005365412682294846,
0.011831659823656082,
0.0016327504999935627,
-0.0403330996632576,
0.05613331496715546,
0.08518055081367493,
0.03333956375718117,
-0.035596735775470734,
-0.07574482262134552,
0.05831648409366608,
0.0614987276494503,
-0.13432033360004425,
0.009620740078389645,
-0.032840024679899216,
0.051581963896751404,
0.04173921048641205,
0.012127682566642761,
0.06290483474731445,
0.03258100524544716,
-0.03787241131067276,
0.1059761494398117,
-0.08340441435575485,
0.010527309030294418,
0.0046114795841276646,
-0.02296026423573494,
0.010194283910095692,
0.0054717957973480225,
0.011369124054908752,
-0.06386691331863403,
0.024884413927793503,
0.013931571505963802,
0.06164674088358879,
-0.02357081137597561,
-0.017742864787578583,
0.03955604135990143,
0.033284060657024384,
-0.044440414756536484,
-0.010508808307349682,
-0.09635540843009949,
-0.031415414065122604,
0.0018686436815187335,
-0.020444070920348167,
-0.004361710511147976,
-0.07333964109420776,
-0.03372809290885925,
-0.024421878159046173,
-0.004687797743827105,
0.0063783652149140835,
-0.06730817258358002,
-0.0003789900802075863,
0.029454264789819717,
0.03955604135990143,
0.03254400193691254,
0.00028402573661878705,
-0.024495882913470268,
0.02159116044640541,
0.027437608689069748,
0.06394091248512268,
0.03087887354195118,
-0.03696584329009056,
0.04584652557969093,
0.07574482262134552,
0.008677166886627674,
0.046512577682733536,
0.02172067016363144,
0.0016362195601686835,
-0.00838577002286911,
-0.020555080845952034,
0.03354308009147644,
-0.00363090424798429,
0.007072168868035078,
-0.014144337736070156,
-0.01891770400106907,
0.0013159136287868023,
0.030453341081738472,
0.02109162136912346,
-0.004072625655680895,
0.004528223071247339,
-0.04436641186475754,
-0.05169297382235527,
-0.05964858457446098,
0.009713246487081051,
0.086956687271595,
-0.014394106343388557,
-0.07285860180854797,
0.03369108960032463,
0.038741979748010635,
0.03722486272454262,
-0.012895490974187851,
0.002156571950763464,
-0.013256269507110119,
-0.05624432489275932,
-0.014024077914655209,
0.012062927708029747,
0.03977805748581886,
0.04969482123851776,
-0.010416300967335701,
0.053173087537288666,
0.02312677726149559,
0.006336736958473921,
0.010203534737229347,
0.03202596306800842,
0.003381134942173958,
0.08044418692588806,
0.07182252407073975,
0.016484767198562622,
-0.019296983256936073,
0.007104546297341585,
0.005892702843993902,
0.04029609635472298,
0.01558744814246893,
-0.026494037359952927,
-0.019648510962724686,
0.05613331496715546,
0.1046440452337265,
-0.012432956136763096,
-0.07296960800886154,
-0.033450569957494736,
0.016799291595816612,
-0.07600384205579758,
-0.022923262789845467,
0.0146716283634305,
0.03228498250246048,
-0.0016732224030420184,
-0.0502498634159565,
0.03193345665931702,
-0.002474565291777253,
-0.07430171221494675,
0.007645712699741125,
-0.02699357457458973,
-0.04303430765867233,
0.01740983873605728,
0.010629067197442055,
0.018852949142456055,
0.026623547077178955,
0.024884413927793503,
-0.04299730435013771,
-0.06482898443937302,
-0.02360781468451023,
-0.0009846225148066878,
-0.06160973757505417,
0.01365404948592186,
-0.025735478848218918,
-0.029879797250032425,
0.026512539014220238,
-0.021813176572322845,
0.02995380200445652,
-0.027974151074886322,
0.014144337736070156,
0.027234094217419624,
-0.0008256259607151151,
-0.007839977741241455,
0.011850161477923393,
-0.048991765826940536,
0.033913105726242065,
0.04192422330379486,
0.020074043422937393,
0.004361710511147976,
0.03629979118704796,
-0.04070312902331352,
0.02205369621515274,
-0.015716958791017532,
-0.00655412906780839,
-0.035041693598032,
-0.035171203315258026,
0.013709553517401218,
0.013385779224336147,
-0.004581414628773928,
0.0028885346837341785,
-0.00029833544977009296,
0.042627278715372086,
-0.0049445051699876785,
-0.01907496713101864,
0.03611477464437485,
-0.0778539851307869,
-0.004870499484241009,
0.022405222058296204,
0.026327524334192276,
0.005901953671127558,
-0.027696629986166954,
-0.022849256172776222,
-0.024958418682217598,
-0.0024583765771239996,
-0.00543016754090786,
0.014912146143615246,
0.0027890894562005997,
0.019315484911203384,
0.0326550118625164,
-0.05287706479430199,
0.009740998968482018,
0.017141567543148994,
-0.03119339793920517,
0.019315484911203384,
0.10523609071969986,
-0.007474574726074934,
0.15393184125423431,
-0.039038002490997314,
-0.0070629180409014225,
-0.0069010304287076,
0.03182244673371315,
-0.014264596626162529,
0.04917678236961365,
0.01647551730275154,
0.020610583946108818,
-0.01663277857005596,
-0.015134163200855255,
-0.0010337670100852847,
0.07333964109420776,
-0.024791905656456947,
0.05757642537355423,
-0.05931555852293968,
-0.016669781878590584,
0.03424613177776337,
0.02667905017733574,
-0.03568924218416214,
-0.002819154178723693,
-0.04351534694433212,
-0.015568946488201618,
0.019685514271259308,
0.01078632939606905,
0.03598526492714882,
0.01288624107837677,
0.025735478848218918,
-0.04458842799067497,
0.00877892505377531,
0.038445957005023956,
0.06068466603755951,
-0.0268640648573637,
0.018270155414938927,
-0.02997230365872383,
-0.02514343336224556,
0.037927914410829544,
-0.02296026423573494,
0.026956573128700256,
0.005726190283894539,
0.030379336327314377,
0.1082703247666359,
-0.006535627413541079,
-0.003714160528033972,
0.02854769490659237,
-0.03335806354880333,
-0.02547645941376686,
0.026623547077178955,
0.025420954450964928,
0.04621655493974686,
0.06042564660310745,
-0.010425551794469357,
0.010592063888907433,
-0.016049982979893684,
0.011739152483642101,
0.030508846044540405,
0.0017634168034419417,
0.0053099081851542,
0.010259038768708706,
-0.03161893039941788,
0.022775251418352127,
0.013173012994229794,
0.002172760898247361,
-0.021202629432082176,
-0.0791860893368721,
-0.05150796100497246,
-0.028529193252325058,
-0.022608738392591476,
0.013940821401774883,
-0.08555057644844055,
-0.01497690100222826,
0.009685494937002659,
0.028307177126407623,
-0.07777997851371765,
-0.035189706832170486,
-0.01086033508181572,
0.0006203757948242128,
0.00594358192756772,
0.028029654175043106,
0.02310827746987343,
-0.0568733736872673,
0.022793753072619438,
0.03635529428720474,
0.03135991096496582,
0.05121193826198578,
-0.037650395184755325,
0.016086986288428307,
-0.012201688252389431,
-0.032229479402303696,
0.018362661823630333,
-0.04266427829861641,
-0.02268274314701557,
0.021794674918055534,
-0.021147126331925392,
0.082664355635643,
-0.06323786079883575,
-0.017937129363417625,
0.021646663546562195,
-0.028307177126407623,
0.04362635314464569,
-0.001362167182378471,
-0.03877898305654526,
-0.011674397625029087,
-0.017752114683389664,
0.04503246024250984,
-0.0024560638703405857,
-0.0041766962967813015,
-0.006475497968494892,
-0.06505100429058075,
-0.041184164583683014,
0.04751165211200714,
0.009481978602707386,
0.019944533705711365,
-0.07060142606496811,
0.01847366988658905,
0.0021080058068037033,
0.03043483942747116,
-0.08074020594358444,
0.026623547077178955,
0.011017597280442715,
0.035189706832170486,
-0.040740132331848145,
-0.020092545077204704,
0.030157318338751793,
-0.015309927053749561,
-0.00728956051170826,
0.0054162913002073765,
0.021017616614699364,
-0.027123084291815758,
0.03056434914469719,
-0.023977844044566154,
-0.019981537014245987,
0.012173935770988464,
-0.026586543768644333,
-0.0015922787133604288,
-0.021646663546562195,
-0.018260903656482697,
0.007918608374893665,
0.025531962513923645,
-0.002244453877210617,
-0.07245156913995743,
0.020684590563178062,
0.026771558448672295,
0.026124007999897003,
-0.06852927058935165,
0.0001071781589416787,
0.07171151041984558,
-0.021054618060588837,
-0.01497690100222826,
0.0053469110280275345,
-0.021221131086349487,
-0.02390383742749691,
0.06212777644395828,
0.0438113696873188,
-0.05465320125222206,
0.011850161477923393,
-0.004412589129060507,
0.0738946795463562,
0.05879751965403557,
0.03026832640171051,
0.024958418682217598,
-0.04858473688364029,
0.026327524334192276,
-0.07163750380277634,
-0.058279480785131454,
0.009292338974773884,
-0.03568924218416214,
0.00831638928502798,
0.006785396486520767,
0.013367277570068836,
-0.016216496005654335,
0.035596735775470734,
-0.059056539088487625,
0.03259950503706932,
-0.00877892505377531,
0.030027808621525764,
0.01658652536571026,
0.029454264789819717,
-0.009481978602707386,
-0.02638302743434906,
-0.0313229076564312,
0.00364478025585413,
0.06597607582807541,
0.004505096469074488,
0.01786312274634838,
0.042775288224220276,
-0.018205398693680763,
0.04125817120075226,
0.014736383222043514,
-0.004204448312520981,
0.0051387702114880085,
0.018353410065174103,
-0.021147126331925392,
-0.013089756481349468,
0.0424792654812336,
0.008098998107016087,
0.00009749382297741249,
0.016077736392617226,
0.0228122528642416,
-0.006822399329394102,
0.038889989256858826,
0.019667012616991997,
0.041517190635204315,
0.026771558448672295,
-0.04055511951446533,
0.0369473397731781,
-0.0692693218588829,
-0.011711400002241135,
-0.023200783878564835,
0.0697503611445427,
0.014773385599255562,
-0.0674561858177185,
-0.0231452789157629,
-0.045994535088539124,
-0.03217397257685661,
-0.05557827278971672,
0.005245153326541185,
-0.020370066165924072,
-0.009555984288454056,
0.025235939770936966,
0.03618878126144409,
0.04973182454705238,
0.04784467816352844,
0.01737283542752266,
0.005185023415833712,
0.021147126331925392,
0.026975072920322418,
-0.018732689321041107,
-0.05117493495345116,
-0.020259058102965355,
-0.03089737519621849,
-0.048362717032432556,
0.01970401406288147,
-0.020074043422937393,
-0.04240525886416435,
0.00885755568742752,
-0.04407038912177086,
0.037021346390247345,
-0.03863096982240677,
-0.06790021806955338,
-0.005060139112174511,
-0.0030018556863069534,
-0.0481036975979805,
-0.012220189906656742,
-0.01024978794157505,
0.06405192613601685,
0.007886230945587158,
0.02003704011440277,
0.004095752257853746,
-0.006466247141361237,
-0.013561542145907879,
0.053173087537288666,
0.004345521796494722,
-0.010064774192869663,
0.012386702001094818,
-0.036410797387361526,
0.0071322983130812645,
-0.03814993426203728,
0.054875217378139496,
0.0305828507989645,
0.0007863104692660272,
-0.024162856861948967,
-0.00018501422891858965,
-0.06886229664087296,
0.026031501591205597,
-0.0242183618247509,
-0.039334025233983994,
0.021387644112110138,
-0.06852927058935165,
0.0062951091676950455,
0.029546771198511124,
-0.009805753827095032,
-0.008797426708042622,
-0.013395030051469803,
0.011517135426402092,
-0.007738220039755106,
0.05809446796774864,
0.02001853846013546,
0.02749311365187168,
0.00594358192756772,
-0.009898261167109013,
0.045106466859579086,
0.02514343336224556,
-0.012294195592403412,
-0.046623583883047104,
0.03426463529467583,
0.018233152106404305,
0.02932475507259369,
-0.09265512228012085,
-0.0006828181212767959,
0.04869574308395386,
0.03150792047381401,
0.0090934494510293,
-0.03985206410288811,
-0.019204476848244667,
0.03148942068219185,
0.016244249418377876,
0.009889010339975357,
-0.03833494707942009,
0.00403562281280756,
0.019463496282696724,
-0.019519001245498657,
0.017141567543148994,
0.023089775815606117,
0.012932494282722473,
-0.05624432489275932,
-0.026642048731446266,
0.03635529428720474,
0.008672541938722134,
0.019315484911203384,
-0.0014500489924103022,
0.01829790696501732,
-0.06412593275308609,
-0.005009260028600693,
-0.020851103588938713,
0.04081413894891739,
-0.05298807471990585,
0.016827043145895004,
0.061239708214998245,
-0.020277559757232666,
0.11071251332759857,
0.04902876913547516,
-0.05494922399520874,
0.03278452157974243,
0.023237787187099457,
-0.01663277857005596,
-0.03522670641541481,
0.001586496946401894,
0.04484744742512703,
-0.012802984565496445,
0.08244233578443527,
0.0017576351528987288,
0.03154492378234863,
-0.08296037465333939,
0.07026840001344681,
-0.02728959731757641,
0.06986136734485626,
-0.02159116044640541,
-0.016975054517388344,
0.02064758725464344,
-0.03372809290885925,
0.010305291973054409,
0.024403376504778862,
-0.04029609635472298,
-0.014847391285002232,
-0.021461650729179382,
-0.0238853357732296,
0.04769666865468025,
0.014144337736070156,
-0.034986190497875214,
-0.05324709415435791,
-0.044625431299209595,
-0.040148086845874786,
0.02577248215675354,
-0.02560596913099289,
0.02732660062611103,
-0.05724339932203293,
-0.04932479187846184,
0.017132317647337914,
-0.037021346390247345,
0.052840061485767365,
-0.0006174849695526063,
-0.003943115472793579,
0.007238681428134441,
0.01771511137485504,
0.025846486911177635,
-0.06386691331863403,
0.005148020572960377,
-0.00946810282766819,
0.03567074239253998,
-0.020906606689095497,
-0.015189668163657188,
0.0242183618247509,
-0.0035268336068838835,
-0.035781752318143845,
-0.042294252663850784,
0.020370066165924072,
-0.006318235769867897,
-0.06875128298997879,
-0.023663319647312164,
0.03617028146982193,
0.01737283542752266,
-0.026623547077178955,
-0.01529142539948225,
0.016262751072645187,
-0.006193351000547409,
0.013210015371441841,
-0.04765966534614563,
-0.003834419883787632,
-0.003536084434017539,
-0.017770616337656975,
0.002974103670567274,
0.002948664128780365,
-0.022220207378268242,
-0.004204448312520981,
0.04403338581323624,
0.02096211165189743,
-0.01661427691578865,
0.04251626878976822,
0.015504191629588604,
0.010342295281589031,
-0.01010177657008171,
-0.05195199325680733,
0.007109171710908413,
-0.025254441425204277,
-0.016364507377147675,
-0.048510730266571045,
-0.01350603811442852,
0.01891770400106907,
0.011535637080669403,
0.0023554624058306217,
-0.08288637548685074,
-0.02423686347901821,
-0.032673511654138565,
0.029935302212834358,
-0.016336755827069283,
0.019204476848244667,
-0.006082342471927404,
0.037927914410829544,
-0.030194321647286415,
-0.05964858457446098,
0.041998229920864105,
-0.017807619646191597,
0.06782621145248413,
-0.0006088124355301261,
-0.00435245968401432,
0.08614262193441391,
0.01660502701997757,
0.00010645545262377709,
0.023015769198536873,
-0.015078659169375896,
0.028159165754914284,
0.04999084398150444,
0.03703984618186951,
0.03086037188768387,
-0.012294195592403412,
-0.03365408629179001,
-0.009852007031440735,
-0.035319216549396515,
-0.022923262789845467,
-0.08207231014966965,
-0.012155434116721153,
-0.0106198163703084,
-0.009620740078389645,
-0.0034597660414874554,
0.012710477225482464,
0.030342333018779755,
0.026050003245472908,
0.012340448796749115,
-0.05250703543424606,
-0.0014465799322351813,
0.017039809376001358,
0.0424792654812336,
-0.04780767485499382,
-0.04573551565408707,
-0.01047180499881506,
0.032988037914037704,
-0.04299730435013771,
-0.0682702511548996,
0.061868757009506226,
-0.026161011308431625,
0.016706785187125206,
-0.025050925090909004,
-0.024125855416059494,
0.002516193548217416,
0.02825167216360569,
0.018547676503658295,
0.04499546065926552,
-0.056577350944280624,
0.0313229076564312,
0.020536579191684723,
0.005342285614460707,
-0.08555057644844055,
-0.02575398050248623,
0.003311754669994116,
0.009329342283308506,
-0.05631833150982857,
-0.012710477225482464,
0.03137841075658798,
-0.03977805748581886,
-0.034671664237976074,
0.011387625709176064,
0.03877898305654526,
-0.06012962386012077,
0.02438487485051155,
-0.04333033040165901,
-0.05724339932203293,
0.022146202623844147,
-0.010185033082962036,
0.019019462168216705,
0.059056539088487625,
-0.04037010297179222,
0.020555080845952034,
0.049768827855587006,
0.05716939643025398,
-0.051914989948272705,
0.0026965823490172625,
-0.04358934983611107,
-0.08259034901857376,
0.004824245814234018,
-0.07237756252288818,
-0.03511570021510124,
0.026475535705685616,
0.015430185943841934,
-0.00601758761331439,
-0.04192422330379486,
0.015319177880883217,
-0.0219056848436594,
-0.041369181126356125,
-0.019815023988485336,
-0.03243299201130867,
0.0856245830655098,
0.005124893970787525,
0.01203517522662878,
-0.04765966534614563,
0.023515308275818825,
-0.06852927058935165,
0.006716016214340925,
0.029139740392565727,
0.003209996735677123,
-0.02159116044640541,
-0.04218324273824692,
0.024107353761792183,
-0.019944533705711365,
-0.0059065790846943855,
0.023552311584353447,
-0.016179494559764862,
-0.023792829364538193,
-0.012876990251243114,
0.038852985948324203,
0.016642030328512192,
-0.00040096050361171365,
-0.03955604135990143,
0.011045348830521107,
-0.013256269507110119,
-0.001977339619770646,
0.05102692171931267,
0.017049061134457588,
-0.009676244109869003,
-0.002902410691604018,
0.0431453175842762,
0.03248849883675575,
0.040148086845874786,
-0.02558746747672558,
0.008395020850002766,
0.03396861255168915
] |
52,307 |
flexget.manager
|
write_lock
| null |
def write_lock(self, ipc_info: Optional[dict] = None) -> None:
assert self._has_lock
with open(self.lockfile, 'w', encoding='utf-8') as f:
f.write(f'PID: {os.getpid()}\n')
if ipc_info:
for key in sorted(ipc_info):
f.write(f'{key}: {ipc_info[key]}\n')
|
(self, ipc_info: Optional[dict] = None) -> NoneType
|
[
0.05817398801445961,
0.04168428108096123,
-0.020099041983485222,
0.02878621593117714,
0.035120245069265366,
-0.03991499915719032,
-0.03811033070087433,
0.02970624342560768,
-0.03842880204319954,
-0.007139052264392376,
0.02131984755396843,
-0.05958941578865051,
0.001659807632677257,
-0.06656038761138916,
-0.0031559565104544163,
-0.0009222382213920355,
0.024663789197802544,
-0.05332615599036217,
-0.0457182452082634,
-0.012269970029592514,
0.030201641842722893,
0.004909757524728775,
0.0010831322288140655,
-0.005254767369478941,
0.0014441763050854206,
0.013826938346028328,
0.004631095565855503,
0.04532900080084801,
0.030095485970377922,
-0.014614268206059933,
0.009262191131711006,
-0.0292816162109375,
0.03612873703241348,
-0.014012712985277176,
0.022416802123188972,
0.03267863765358925,
-0.0249999538064003,
0.02489379607141018,
-0.07080665975809097,
0.00779368681833148,
0.11238478869199753,
0.028343895450234413,
-0.03418252617120743,
-0.05003529414534569,
-0.03913651406764984,
0.023619912564754486,
0.044515132904052734,
0.051981501281261444,
0.06436647474765778,
-0.034660231322050095,
0.017949365079402924,
-0.009403733536601067,
-0.030360877513885498,
-0.00343240681104362,
-0.00983720738440752,
0.052759986370801926,
0.05484773963689804,
-0.044585902243852615,
0.0007679789559915662,
-0.019125936552882195,
-0.002157418057322502,
0.000567828887142241,
0.05162764713168144,
-0.03174091875553131,
0.012491130270063877,
0.019055165350437164,
-0.009279883466660976,
-0.003421348985284567,
-0.024168390780687332,
-0.0174981988966465,
0.06323413550853729,
-0.06737425178289413,
-0.04582440108060837,
0.012553054839372635,
0.0013612412149086595,
0.012261123396456242,
-0.021939095109701157,
0.04023347049951553,
0.024363011121749878,
-0.03430637717247009,
0.02475225366652012,
-0.07048819214105606,
-0.007899844087660313,
-0.0024194929283112288,
-0.03920728713274002,
0.017330115661025047,
0.0989382416009903,
0.0034633693285286427,
-0.07530064135789871,
-0.022328337654471397,
-0.05060146376490593,
0.07016971707344055,
-0.04723982512950897,
0.05399848520755768,
0.04989374801516533,
-0.05385694280266762,
0.0036093350499868393,
-0.011553410440683365,
-0.027547718957066536,
0.08450090140104294,
-0.06298643350601196,
-0.06401261687278748,
-0.013136917725205421,
-0.051839958876371384,
-0.0022204488050192595,
-0.09610739350318909,
0.011818802915513515,
0.04030424356460571,
-0.020771369338035583,
-0.008921603672206402,
-0.02910468727350235,
0.0029303731862455606,
-0.0392780601978302,
-0.03489023819565773,
0.04026885703206062,
0.05721857771277428,
-0.020629826933145523,
0.023973770439624786,
0.05831553041934967,
-0.024009155109524727,
-0.014676193706691265,
0.012075348757207394,
0.03991499915719032,
0.009439119137823582,
-0.05343231186270714,
0.036553364247083664,
-0.052759986370801926,
0.04716905578970909,
0.009677971713244915,
-0.0012860468123108149,
-0.020399820059537888,
0.004429839551448822,
0.07317750155925751,
0.024097619578242302,
0.0014309067046269774,
-0.02896314486861229,
-0.08181159198284149,
0.009341808035969734,
-0.015189285390079021,
-0.005874015856534243,
-0.01621546782553196,
-0.09992904216051102,
-0.05520159378647804,
-0.01731242425739765,
0.03867650404572487,
0.008342164568603039,
-0.04009192809462547,
0.010518381372094154,
0.029263922944664955,
-0.05134456232190132,
0.08917180448770523,
0.01942671462893486,
-0.03221862390637398,
0.011694953776896,
0.0038769389502704144,
0.0018688039854168892,
0.014136562123894691,
-0.040198083966970444,
0.021089840680360794,
-0.04734598472714424,
-0.030413955450057983,
-0.02721155621111393,
0.10948316752910614,
-0.040799640119075775,
-0.02924622967839241,
-0.012668058276176453,
0.01978057250380516,
-0.028060810640454292,
0.05329076945781708,
-0.00528572965413332,
0.0017792341532185674,
-0.019479794427752495,
0.022717580199241638,
0.024345319718122482,
-0.005759012419730425,
-0.015127359889447689,
-0.01796705834567547,
-0.055803149938583374,
0.04409050568938255,
-0.013349232263863087,
-0.03941960260272026,
-0.02388530597090721,
-0.02068290486931801,
0.04136580973863602,
0.011951499618589878,
-0.02689308486878872,
-0.010182217694818974,
-0.003027683589607477,
0.06468494981527328,
0.0003060304734390229,
0.01142956130206585,
0.0052459207363426685,
-0.046779815107584,
-0.020576748996973038,
0.019479794427752495,
0.0023398753255605698,
-0.03457176685333252,
-0.06256181001663208,
-0.01465850044041872,
-0.018329760059714317,
0.045435160398483276,
-0.010491841472685337,
-0.03531486541032791,
0.05923555791378021,
0.045116689056158066,
-0.016772791743278503,
0.07685760408639908,
-0.009589508175849915,
0.07650374621152878,
0.02689308486878872,
0.01771051250398159,
-0.02374376356601715,
-0.033616356551647186,
0.04225045070052147,
0.037614934146404266,
0.022151408717036247,
-0.0015248998533934355,
0.005374193657189608,
-0.03335096314549446,
0.009589508175849915,
-0.044408977031707764,
0.044621288776397705,
-0.026167679578065872,
0.008205045014619827,
-0.028184661641716957,
-0.012721137143671513,
0.03489023819565773,
0.005993442609906197,
0.02735309861600399,
0.04985836520791054,
0.04688597097992897,
0.01681702397763729,
-0.0653572753071785,
0.028025425970554352,
-0.07813148945569992,
-0.017657432705163956,
-0.09794744849205017,
-0.04263969510793686,
-0.03775647655129433,
0.010022982023656368,
-0.03296172246336937,
0.025796130299568176,
0.07990077137947083,
0.026026137173175812,
0.07324827462434769,
-0.07395598292350769,
-0.007174438331276178,
0.010491841472685337,
0.026344608515501022,
0.014278104528784752,
0.02995394356548786,
-0.023372214287519455,
-0.0688958391547203,
-0.05757243186235428,
-0.000834879872854799,
-0.004109157249331474,
-0.06992202252149582,
-0.0639418512582779,
-0.015145053155720234,
0.023619912564754486,
-0.03174091875553131,
0.006232295650988817,
-0.001634374144487083,
-0.06581728905439377,
0.08612864464521408,
-0.016702020540833473,
-0.009660279378294945,
-0.023973770439624786,
-0.0628448948264122,
0.0038304952904582024,
-0.04769983887672424,
-0.0018278893548995256,
-0.01785205490887165,
0.024097619578242302,
-0.008421781472861767,
-0.040375012904405594,
0.015622759237885475,
0.00816081278026104,
-0.011553410440683365,
0.015127359889447689,
0.05573238059878349,
0.0357041098177433,
0.03113936074078083,
-0.030873969197273254,
0.013650010339915752,
0.03359866514801979,
0.04600133001804352,
0.036730293184518814,
0.019939806312322617,
-0.024805331602692604,
-0.05017683655023575,
0.07968845963478088,
-0.019833650439977646,
-0.0095541225746274,
-0.01485312171280384,
0.018055520951747894,
-0.0399857722222805,
0.01703818514943123,
0.018435917794704437,
0.0006026616320014,
0.030290106311440468,
-0.0029967213049530983,
-0.048867564648389816,
-0.04766445606946945,
-0.0287508312612772,
-0.026486150920391083,
-0.0024084351025521755,
0.0614294670522213,
-0.041153497993946075,
0.014897353947162628,
0.04210890829563141,
0.04585978761315346,
-0.0027976769488304853,
0.04164889454841614,
0.03174091875553131,
0.045045915991067886,
-0.015790840610861778,
0.04299354925751686,
0.02367299236357212,
0.05852784588932991,
-0.018382839858531952,
-0.01539275236427784,
0.02002827078104019,
-0.03388174995779991,
0.011022626422345638,
-0.037084147334098816,
0.03191784396767616,
0.011809956282377243,
0.0012550842948257923,
0.04582440108060837,
-0.06376492232084274,
0.06663115322589874,
-0.0009078627917915583,
0.005608623847365379,
-0.04317047819495201,
0.048336781561374664,
0.0012362857814878225,
-0.04345356300473213,
0.018117446452379227,
0.00997874978929758,
-0.029547007754445076,
-0.03167014569044113,
0.014260412193834782,
-0.008806600235402584,
-0.07395598292350769,
-0.03082089126110077,
0.04564747214317322,
0.02560150995850563,
-0.060297127813100815,
0.03503178060054779,
-0.03995038568973541,
0.0214260034263134,
0.008236006833612919,
-0.00674981065094471,
0.023655299097299576,
-0.0507076196372509,
0.005953633692115545,
-0.04547054320573807,
0.007448676973581314,
0.005352077540010214,
-0.041330426931381226,
0.025831514969468117,
0.020647520199418068,
-0.002470359904691577,
-0.04200275242328644,
-0.027370791882276535,
0.008448321372270584,
0.029016222804784775,
0.07254055887460709,
-0.013225382193922997,
-0.026556922122836113,
-0.026521535590291023,
0.022629115730524063,
-0.005161880049854517,
0.0061438316479325294,
0.06234949454665184,
-0.022310644388198853,
0.008271393366158009,
-0.02760079689323902,
-0.09971673041582108,
-0.019125936552882195,
-0.07080665975809097,
0.09164880216121674,
0.00883756298571825,
-0.10736002773046494,
0.028432359918951988,
-0.0009476715931668878,
-0.01150033250451088,
0.06125253811478615,
0.03627027943730354,
-0.011827649548649788,
0.018895931541919708,
-0.0007923065568320453,
-0.005104378331452608,
-0.00011396663467166945,
0.02567228116095066,
0.07466369867324829,
0.026733849197626114,
-0.0011334462324157357,
0.007930805906653404,
0.045222844928503036,
-0.06270334869623184,
-0.011916114017367363,
-0.023938383907079697,
0.01472927164286375,
-0.01831206865608692,
-0.023018358275294304,
-0.03577487915754318,
0.04968143627047539,
-0.06825889647006989,
-0.037261076271533966,
0.014525804668664932,
0.04380742087960243,
0.011880728416144848,
0.014888507314026356,
0.032802484929561615,
0.019939806312322617,
-0.036517977714538574,
-0.020948298275470734,
0.026149986311793327,
0.049150653183460236,
0.029918557032942772,
-0.006506534293293953,
0.040870413184165955,
-0.0004953989409841597,
-0.03190015256404877,
-0.006926738657057285,
-0.0037442429456859827,
0.005626316647976637,
0.010659923776984215,
0.03331557661294937,
0.03662413731217384,
0.026203064247965813,
0.060474056750535965,
0.03973807021975517,
0.0007115830667316914,
0.031829383224248886,
-0.048549097031354904,
-0.03128090500831604,
0.01588815078139305,
0.05852784588932991,
0.0027932538650929928,
0.005303422454744577,
-0.010943008586764336,
0.007364635821431875,
0.0503537617623806,
0.009421425871551037,
0.013136917725205421,
0.06978047639131546,
0.0016089407727122307,
0.03253709524869919,
0.010120292194187641,
-0.05438772588968277,
0.02556612342596054,
-0.044798217713832855,
-0.04568285867571831,
0.022717580199241638,
-0.052583057433366776,
0.013092686422169209,
-0.06302182376384735,
-0.005334384739398956,
0.03807494789361954,
0.010084906592965126,
-0.00015356813673861325,
0.026379993185400963,
-0.028450053185224533,
0.0266100000590086,
0.0008807706763036549,
-0.010943008586764336,
0.026238450780510902,
0.04568285867571831,
0.047841381281614304,
-0.028096197172999382,
-0.0035098129883408546,
-0.027193862944841385,
0.015569680370390415,
0.02588459476828575,
0.0052459207363426685,
-0.004219737369567156,
0.023991461843252182,
-0.015870459377765656,
0.0335809700191021,
0.0208952184766531,
0.025194574147462845,
-0.009341808035969734,
-0.040905795991420746,
0.022275259718298912,
-0.05060146376490593,
0.011332250200212002,
0.009447965770959854,
0.0029060456436127424,
-0.02878621593117714,
-0.009527582675218582,
-0.006612691096961498,
0.08619941771030426,
0.007594642695039511,
-0.017082417383790016,
-0.026362299919128418,
-0.017303576692938805,
-0.029476236552000046,
-0.0424981527030468,
0.008691597729921341,
0.01831206865608692,
-0.041471969336271286,
0.016153544187545776,
0.00772291561588645,
-0.02507072500884533,
-0.02760079689323902,
-0.02756541222333908,
0.037296462804079056,
0.024522246792912483,
-0.04271046444773674,
0.006953278090804815,
0.0042728157714009285,
-0.006665769498795271,
-0.004600132815539837,
-0.06666654348373413,
-0.02545996755361557,
-0.04716905578970909,
-0.021231383085250854,
0.05874015763401985,
0.005060146097093821,
0.07254055887460709,
-0.03400559723377228,
-0.024309933185577393,
-0.05088454857468605,
-0.006479994859546423,
-0.011199554428458214,
-0.004463013727217913,
0.03586334362626076,
-0.015277748927474022,
-0.04741675406694412,
-0.0013778283027932048,
-0.016834717243909836,
0.008970259688794613,
0.0107130017131567,
0.04292277991771698,
-0.00033229324617423117,
0.01264151930809021,
-0.06744502484798431,
-0.0002808735007420182,
0.02363760583102703,
0.02282373607158661,
-0.029741628095507622,
0.04752291366457939,
0.01693202741444111,
-0.03874727338552475,
-0.008452744223177433,
-0.02774234116077423,
0.004193197935819626,
-0.006342875771224499,
-0.03264325112104416,
0.013968480750918388,
-0.03575718775391579,
-0.022151408717036247,
-0.003954344894737005,
0.05941248685121536,
-0.041436582803726196,
0.030343184247612953,
0.027547718957066536,
0.036588750779628754,
0.0385703444480896,
0.0015525448834523559,
-0.03096243366599083,
0.021408310160040855,
-0.04366587847471237,
0.010456455871462822,
-0.016657788306474686,
0.06418954581022263,
0.03867650404572487,
0.028803909197449684,
-0.008306778967380524,
0.05088454857468605,
-0.029989328235387802,
-0.004869948606938124,
-0.052866142243146896,
0.07324827462434769,
0.08740252256393433,
0.01796705834567547,
-0.037119533866643906,
-0.06854198127985,
0.02717616967856884,
-0.03131629154086113,
-0.02521226741373539,
0.044868990778923035,
-0.020275970920920372,
-0.01674625277519226,
-0.0030652808491140604,
0.02082444727420807,
0.06666654348373413,
-0.08110388368368149,
0.001230756752192974,
0.05527236685156822,
-0.03846418857574463,
0.03195323050022125,
0.02121368981897831,
0.04200275242328644,
-0.0642603188753128,
-0.0073690591380000114,
0.018099753186106682,
0.008381973020732403,
-0.006325182970613241,
-0.027087705209851265,
0.03552718088030815,
0.009952210821211338,
0.015091974288225174,
-0.052229203283786774,
-0.012331894598901272,
-0.06450802087783813,
0.04150735214352608,
0.011694953776896,
0.03754416108131409,
0.020329048857092857,
0.05852784588932991,
0.03443022444844246,
0.0835808739066124,
-0.006077483296394348,
-0.015162745490670204,
0.027370791882276535,
0.023195285350084305,
0.04975220561027527,
-0.006825005169957876,
0.006236718501895666,
-0.030290106311440468,
-0.014410801231861115,
-0.00981951504945755,
0.028697753325104713,
0.023124514147639275,
0.006077483296394348,
-0.05159226059913635,
-0.030626269057393074,
0.012420359067618847,
0.016834717243909836,
0.036765679717063904,
-0.005533429328352213,
0.008178506046533585,
-0.052866142243146896,
-0.017170879989862442,
-0.018949009478092194,
-0.00950104370713234,
-0.01656932570040226,
-0.044232048094272614,
-0.021549854427576065,
-0.08910103887319565,
0.0008968047914095223,
-0.028450053185224533,
0.04030424356460571,
-0.027264634147286415,
0.006767503451555967,
-0.010102599859237671,
-0.03170553222298622,
-0.033368658274412155,
-0.02317759208381176,
0.028414666652679443,
0.08287316560745239,
-0.03910113126039505,
-0.03832264617085457,
0.0166047103703022,
-0.05704164877533913,
0.021372925490140915,
-0.04550592973828316,
-0.017400886863470078,
-0.010155677795410156,
-0.031263209879398346,
0.03853496164083481,
0.0006800677510909736,
-0.03471330925822258,
-0.0064048003405332565,
-0.0004929108545184135,
0.0027932538650929928,
0.01788743957877159,
0.037614934146404266,
-0.037473391741514206,
-0.00521495845168829,
-0.009076416492462158,
-0.020187506452202797,
0.00008874054765328765,
0.017834361642599106,
0.002585363108664751,
-0.011827649548649788,
0.006957700941711664,
-0.0507076196372509,
0.03188246116042137,
-0.05113224685192108,
-0.0017372136935591698,
0.023726070299744606,
0.030183948576450348,
0.001043876283802092,
-0.03621720150113106,
-0.003167014569044113,
0.015702376142144203,
0.004905334208160639,
0.008063502609729767,
0.003352789208292961,
-0.028874680399894714,
-0.05477696657180786,
0.030254719778895378,
0.060155585408210754,
0.024716868996620178,
-0.009111802093684673,
-0.04363049194216728,
0.004270604345947504,
0.06673731654882431,
-0.004120215307921171,
-0.029865479096770287,
-0.03818110376596451,
0.013225382193922997,
-0.015870459377765656,
0.03906574472784996,
-0.04578901454806328,
-0.0007613440975546837,
0.022664500400424004,
0.0435597188770771,
0.04341817647218704,
0.0024416090454906225,
0.013676549308001995,
-0.0166047103703022,
0.013437695801258087,
0.04975220561027527,
-0.06397723406553268,
-0.016472013667225838,
0.084288589656353,
0.011863035149872303,
-0.06305720657110214,
-0.01681702397763729,
-0.018913622945547104,
-0.016516245901584625,
-0.04225045070052147,
0.02906930260360241,
0.037119533866643906,
-0.01956825703382492,
-0.04150735214352608,
-0.06723271310329437,
0.01620662212371826,
0.05895247310400009,
0.045435160398483276,
0.0028839295264333487,
-0.010137985460460186,
-0.018329760059714317,
0.05060146376490593,
0.00815638992935419,
0.027512334287166595,
0.014738118276000023,
0.03067934885621071,
0.0360579639673233,
-0.03517332300543785,
0.013941941782832146,
0.030732426792383194,
-0.016339318826794624,
0.0021695818286389112,
0.03085627593100071,
0.015136206522583961,
-0.03775647655129433,
-0.006219025701284409,
0.020329048857092857,
-0.028273124247789383,
0.06157100945711136,
0.05332615599036217,
0.06479110568761826,
0.019621336832642555,
-0.016197776421904564,
0.005798821337521076,
-0.026096908375620842,
0.0002746533718891442,
0.020488284528255463,
-0.044656675308942795,
-0.060332514345645905,
-0.037296462804079056
] |
52,308 |
flexget
|
_is_debug
| null |
def _is_debug() -> bool:
return any(
arg in ['debug', '--debug', '--loglevel=trace', '--loglevel=debug']
for arg in [a.lower() for a in sys.argv]
)
|
() -> bool
|
[
0.04849093034863472,
0.016399240121245384,
0.03907904028892517,
0.014422026462852955,
0.06123098358511925,
-0.0027689931448549032,
0.05214117094874382,
-0.017088131979107857,
-0.02440650574862957,
-0.02345815859735012,
-0.02653581276535988,
0.02598111890256405,
-0.016980772837996483,
-0.014046265743672848,
0.03754021227359772,
-0.054717812687158585,
-0.016077158972620964,
0.03567930683493614,
0.01853749342262745,
-0.015728238970041275,
0.02947031892836094,
0.04498383775353432,
-0.020147891715168953,
0.02726943977177143,
-0.02274242602288723,
0.028343038633465767,
0.062089864164590836,
-0.009085339494049549,
0.01893114671111107,
0.048311997205019,
-0.008995872922241688,
-0.028647225350141525,
0.02020157314836979,
-0.017624933272600174,
0.02233087830245495,
0.0572228766977787,
0.01802753284573555,
0.015522466041147709,
-0.04791834577918053,
-0.051318079233169556,
-0.01830487884581089,
0.01987949199974537,
-0.03346053138375282,
0.040224213153123856,
-0.0020465499255806208,
-0.022151945158839226,
0.021597253158688545,
-0.014180466532707214,
-0.05743759870529175,
-0.007841752842068672,
0.09340319782495499,
-0.05571983754634857,
0.03711077198386192,
0.01948583871126175,
0.004352553281933069,
0.03614453226327896,
0.03646661341190338,
0.012829519808292389,
-0.014037319459021091,
-0.028879838064312935,
-0.0193426925688982,
0.014833572320640087,
-0.002932269824668765,
-0.030937572941184044,
-0.02472858503460884,
-0.029774505645036697,
-0.019145866855978966,
-0.0125163858756423,
-0.0023037665523588657,
0.0017736766021698713,
-0.05539775639772415,
0.004750679712742567,
-0.04834778606891632,
-0.03231535851955414,
-0.02607058547437191,
0.011818545870482922,
-0.02250981330871582,
0.06352133303880692,
-0.010369186289608479,
-0.046129010617733,
-0.03168909251689911,
-0.0035809031687676907,
-0.03406890481710434,
0.04315871745347977,
-0.03508882597088814,
0.031331226229667664,
-0.04863407835364342,
0.04519855976104736,
0.04229983687400818,
-0.031027039512991905,
-0.0036837898660451174,
0.03193959966301918,
0.008119099773466587,
0.02560535818338394,
0.005059340037405491,
0.039186399430036545,
0.005144333001226187,
0.0007951349834911525,
-0.02662527933716774,
0.008526173420250416,
0.02805674634873867,
0.018519598990678787,
0.06337818503379822,
-0.035858239978551865,
-0.0005983083392493427,
0.047274183481931686,
-0.0404389314353466,
-0.018134891986846924,
0.0041266498155891895,
-0.020792052149772644,
-0.05808175727725029,
-0.0608731172978878,
0.014252039603888988,
-0.038005437701940536,
-0.04144096001982689,
0.01315159909427166,
0.03890010342001915,
0.009859226644039154,
-0.03210064023733139,
0.0258379727602005,
0.008181726559996605,
0.04834778606891632,
0.039902132004499435,
-0.023010825738310814,
0.034355197101831436,
-0.01204221323132515,
-0.03321002423763275,
0.06695684790611267,
-0.03718234598636627,
-0.004567272961139679,
0.05096021294593811,
-0.015701400116086006,
-0.015110919252038002,
-0.01742810569703579,
-0.03936533257365227,
0.0062358262948691845,
0.007658346556127071,
0.03464149311184883,
-0.002431256463751197,
0.029506105929613113,
-0.0239412784576416,
0.022134052589535713,
-0.03185013309121132,
-0.0012950300006195903,
-0.05704394355416298,
0.03929375857114792,
-0.025873759761452675,
0.017097080126404762,
0.026249518617987633,
0.035178292542696,
0.02440650574862957,
-0.05597034469246864,
-0.04176303744316101,
-0.013169492594897747,
-0.020505759865045547,
-0.01818857342004776,
-0.017589146271348,
0.015254066325724125,
0.022885572165250778,
-0.004656739998608828,
0.010986506007611752,
-0.0445186123251915,
-0.025873759761452675,
-0.030150266364216805,
-0.008275666274130344,
-0.027842026203870773,
-0.027466265484690666,
0.022169839590787888,
0.009483465924859047,
0.056363996118307114,
0.027287332341074944,
0.07350581139326096,
0.06008581072092056,
0.0481688529253006,
0.012230092659592628,
0.06566853076219559,
-0.036645546555519104,
0.034838318824768066,
-0.07075023651123047,
-0.035786665976047516,
-0.02202669344842434,
0.014923039823770523,
-0.004943033214658499,
0.03231535851955414,
0.017947012558579445,
-0.02082783915102482,
-0.030168158933520317,
-0.03796965256333351,
0.0534294918179512,
0.028629332780838013,
-0.007009712979197502,
0.03190381079912186,
-0.007363106589764357,
-0.026446346193552017,
-0.05081706494092941,
0.05346527695655823,
-0.006195566616952419,
-0.06055103614926338,
0.0725395679473877,
-0.07844436913728714,
-0.01275794580578804,
-0.014269933104515076,
-0.029846079647541046,
0.022366665303707123,
-0.003701683133840561,
0.032995305955410004,
-0.026661066338419914,
-0.011514359153807163,
0.09719658643007278,
0.008248826488852501,
0.021919332444667816,
-0.05854698270559311,
0.02209826558828354,
0.036967623978853226,
-0.005019079893827438,
0.06405813246965408,
0.028665119782090187,
-0.018877465277910233,
-0.053679998964071274,
0.018734319135546684,
0.07851594686508179,
0.00018843915313482285,
0.08338292688131332,
0.040295783430337906,
-0.03113439865410328,
0.016506599262356758,
0.06226879730820656,
0.06638426333665848,
-0.06777994334697723,
0.00554693304002285,
-0.03321002423763275,
-0.03397943824529648,
-0.042120903730392456,
0.0608731172978878,
0.03523197025060654,
0.011836439371109009,
-0.0053053731098771095,
0.01950373314321041,
0.06931877136230469,
-0.046558450907468796,
0.02512223832309246,
-0.00008506322774337605,
0.0055200932547450066,
-0.010771785862743855,
-0.012230092659592628,
-0.06749364733695984,
-0.0230645053088665,
0.026016905903816223,
-0.01818857342004776,
0.06273402273654938,
-0.00562297971919179,
-0.01046760007739067,
-0.012963719666004181,
0.004039419814944267,
-0.03900746628642082,
-0.01184538658708334,
0.024048639461398125,
0.0033236865419894457,
-0.0033482899889349937,
-0.011943799443542957,
-0.051318079233169556,
0.018430132418870926,
0.00402152631431818,
0.10571380704641342,
-0.00823987927287817,
0.014949879609048367,
0.05790282413363457,
-0.02853986620903015,
0.03025762550532818,
-0.03227957338094711,
0.06806623935699463,
-0.025408532470464706,
-0.017168652266263962,
0.0221161600202322,
-0.002489409875124693,
0.024424398317933083,
0.034838318824768066,
-0.033335279673337936,
-0.01821541227400303,
0.02574850618839264,
0.05514725297689438,
0.01911007985472679,
-0.021650932729244232,
-0.0006525474600493908,
-0.030221838504076004,
-0.03829173371195793,
-0.004119939636439085,
0.018081212416291237,
-0.04580693319439888,
0.029273491352796555,
0.01573718525469303,
0.03589402511715889,
0.053035836666822433,
-0.020738372579216957,
0.012444812804460526,
0.08209460973739624,
0.04938559979200363,
-0.020398398861289024,
-0.0389716774225235,
0.00338631309568882,
0.04272927716374397,
0.004620952997356653,
0.003820226527750492,
0.01316054631024599,
0.01893114671111107,
0.07543829083442688,
-0.06609796732664108,
-0.025551678612828255,
-0.013276852667331696,
-0.05214117094874382,
-0.042049333453178406,
0.03929375857114792,
-0.016667639836668968,
-0.021883545443415642,
0.020398398861289024,
-0.02884405292570591,
-0.020720480009913445,
-0.01326790638267994,
-0.05711551755666733,
0.07801493257284164,
-0.03295951709151268,
0.026177946478128433,
0.04373130574822426,
0.009635559283196926,
-0.010297613218426704,
0.028181998059153557,
0.08266719430685043,
-0.031492266803979874,
0.02463911846280098,
-0.026410559192299843,
0.022921359166502953,
-0.06924720108509064,
0.00770755298435688,
0.019986853003501892,
0.01659606583416462,
-0.035303544253110886,
-0.06205407902598381,
-0.04677317291498184,
-0.00584664661437273,
-0.04459018632769585,
-0.01703445240855217,
0.06871039420366287,
0.0021583831403404474,
-0.014565172605216503,
0.05976372957229614,
0.026446346193552017,
0.013822599314153194,
0.04158410429954529,
0.020398398861289024,
-0.032923731952905655,
-0.035375118255615234,
-0.040617864578962326,
-0.05457466468214989,
-0.010431813076138496,
0.008740892633795738,
0.007157333195209503,
-0.020308932289481163,
-0.018680639564990997,
0.012015372514724731,
0.07157333195209503,
0.01911007985472679,
0.007054446265101433,
0.010798626579344273,
0.026034798473119736,
0.007067866623401642,
-0.029935546219348907,
0.018984826281666756,
-0.06083733215928078,
0.022778213024139404,
0.009080866351723671,
0.02948821149766445,
0.0059853196144104,
0.045771144330501556,
-0.050745490938425064,
-0.07193119823932648,
-0.047739412635564804,
0.051711730659008026,
-0.02156146615743637,
0.007519673090428114,
0.06234037131071091,
-0.02544431947171688,
0.012471652589738369,
0.051389653235673904,
0.011872226372361183,
-0.03437309339642525,
-0.019790025427937508,
-0.009367159567773342,
-0.02814621292054653,
-0.007014186587184668,
-0.036717116832733154,
-0.044804904609918594,
-0.03872117027640343,
-0.06191093102097511,
0.06774415820837021,
-0.050208691507577896,
-0.04387445002794266,
-0.030239732936024666,
0.02798517234623432,
-0.06735050678253174,
0.0006721183308400214,
-0.03700341284275055,
-0.02234877273440361,
0.05260639637708664,
0.02193722501397133,
0.0232076533138752,
-0.033245813101530075,
0.014905146323144436,
0.06591903418302536,
0.04187040030956268,
0.014439919032156467,
0.002181868301704526,
-0.060264743864536285,
-0.05457466468214989,
-0.027305224910378456,
-0.04670159891247749,
-0.030382879078388214,
0.04974346607923508,
0.02710839919745922,
0.03161751851439476,
0.03233325108885765,
0.054073650389909744,
-0.02283189259469509,
-0.001912349951453507,
0.016497652977705002,
0.013035292737185955,
-0.03542879968881607,
-0.02209826558828354,
0.01213167980313301,
0.042908210307359695,
-0.029810292646288872,
-0.09161386638879776,
0.014314666390419006,
0.03439098596572876,
-0.013536306098103523,
-0.0003047458303626627,
-0.008378553204238415,
0.016121892258524895,
0.018358558416366577,
0.02544431947171688,
0.03757599741220474,
-0.03743285313248634,
0.003594323294237256,
-0.06928298622369766,
-0.051675945520401,
0.0036703699734061956,
0.023315012454986572,
0.007497306447476149,
-0.0052024866454303265,
0.0848143994808197,
0.018966931849718094,
-0.06069418415427208,
0.0015365899307653308,
-0.0888940766453743,
-0.050530772656202316,
0.03811279684305191,
-0.04040314629673958,
-0.05861855670809746,
0.0810210108757019,
-0.022080373018980026,
0.0359119176864624,
-0.03179645165801048,
0.0025609831791371107,
-0.032601650804281235,
0.01010973285883665,
0.042514558881521225,
0.05002975836396217,
0.02234877273440361,
0.015710346400737762,
-0.015495626255869865,
0.05858277156949043,
0.03811279684305191,
0.042120903730392456,
0.024996986612677574,
-0.032046958804130554,
0.04201354458928108,
0.025784293189644814,
-0.014466759748756886,
0.04541327804327011,
0.005479833111166954,
0.020970985293388367,
-0.09347476810216904,
-0.022635065019130707,
-0.0028763532172888517,
0.045055411756038666,
-0.01287425309419632,
-0.06370026618242264,
-0.02274242602288723,
-0.011192279867827892,
0.003927586600184441,
-0.027859918773174286,
0.05675765126943588,
-0.06198250502347946,
0.004750679712742567,
-0.04698789119720459,
0.07024922221899033,
-0.019378479570150375,
-0.03936533257365227,
0.007470466196537018,
0.03351421281695366,
0.04859829321503639,
0.006217933259904385,
0.04136938601732254,
0.0028875365387648344,
0.014842519536614418,
0.0025005931966006756,
-0.03397943824529648,
0.03310266509652138,
0.02970293164253235,
-0.06531066447496414,
0.034426771104335785,
0.028235679492354393,
0.02798517234623432,
0.021024666726589203,
-0.04491226375102997,
0.05872591957449913,
0.0445186123251915,
0.03215431794524193,
0.006459493190050125,
0.04365973174571991,
-0.017696505412459373,
0.01374207902699709,
-0.01740126684308052,
-0.024209680035710335,
-0.022241411730647087,
-0.013894172385334969,
-0.021973012015223503,
0.02116781286895275,
0.03986634686589241,
-0.00663395319133997,
0.01802753284573555,
0.04974346607923508,
0.05389471724629402,
0.03256586566567421,
-0.014439919032156467,
0.002015236532315612,
0.03861381113529205,
0.014359399676322937,
0.004236246459186077,
-0.01589822582900524,
-0.004462149925529957,
0.005457466468214989,
0.0005088416510261595,
0.0627698078751564,
0.008311453275382519,
-0.034838318824768066,
0.014690426178276539,
0.010727052576839924,
-0.004238483030349016,
0.03954426571726799,
-0.0026907098945230246,
-0.012498493306338787,
0.04333765059709549,
-0.02964925207197666,
0.026822105050086975,
-0.0015746132703498006,
-0.04119045287370682,
0.013831546530127525,
0.03233325108885765,
-0.015683505684137344,
0.014788839034736156,
0.018644852563738823,
-0.039257973432540894,
-0.03804122656583786,
-0.037611786276102066,
-0.06735050678253174,
-0.06008581072092056,
0.006123993080109358,
0.02132885344326496,
0.04498383775353432,
0.03222589194774628,
-0.0039007465820759535,
-0.07107231765985489,
-0.05045919865369797,
0.026034798473119736,
-0.02242034673690796,
0.015012506395578384,
0.02369077317416668,
0.04158410429954529,
-0.0116038266569376,
0.0004115466435905546,
-0.001698748324997723,
0.014681479893624783,
-0.013080026023089886,
0.037754930555820465,
-0.02694735862314701,
-0.00407967995852232,
0.05457466468214989,
-0.01611294597387314,
0.02875458635389805,
-0.06910405308008194,
0.00407967995852232,
-0.004978819750249386,
0.00153435324318707,
-0.0389716774225235,
0.007698606234043837,
0.019360585138201714,
0.021776186302304268,
0.05453887954354286,
0.06380762159824371,
0.014851465821266174,
-0.03471306711435318,
-0.06702842563390732,
0.0478825569152832,
-0.08960980921983719,
-0.0006698816432617605,
-0.02535485289990902,
0.030364984646439552,
-0.012659532949328423,
-0.03279848024249077,
0.030078692361712456,
-0.019289012998342514,
-0.0102170929312706,
0.0008896341314539313,
0.0008969032787717879,
0.01129069272428751,
-0.0006777099915780127,
0.0534294918179512,
-0.0024648066610097885,
0.05901221185922623,
-0.014726213179528713,
-0.012489546090364456,
0.0386853851377964,
0.006441599689424038,
-0.06047946587204933,
0.021060451865196228,
-0.00613741297274828,
-0.013491572812199593,
-0.02281400002539158,
-0.041262026876211166,
-0.08696159720420837,
0.04315871745347977,
0.026356879621744156,
-0.023887598887085915,
-0.06967663764953613,
-0.05554090440273285,
-0.051389653235673904,
-0.026267413049936295,
-0.045771144330501556,
-0.012310612946748734,
0.02544431947171688,
-0.014216252602636814,
-0.0027153133414685726,
-0.037361279129981995,
-0.019718453288078308,
0.024746479466557503,
-0.022384559735655785,
-0.016882359981536865,
-0.030060799792408943,
0.07536672055721283,
-0.01164855994284153,
0.002424546517431736,
0.034265730530023575,
-0.01770545355975628,
0.06316346675157547,
0.027287332341074944,
0.0442323200404644,
-0.046129010617733,
0.029971331357955933,
-0.007018659729510546,
-0.007260219659656286,
0.08252405375242233,
-0.023100292310118675,
0.017571251839399338,
-0.04906351864337921,
-0.017875438556075096,
-0.029685039073228836,
0.033388957381248474,
-0.06126677244901657,
0.03811279684305191,
-0.006973926443606615,
-0.036484505981206894,
-0.03147437050938606,
0.01719549298286438,
0.0008706224616616964,
0.028181998059153557,
0.02020157314836979,
-0.012489546090364456,
0.040939945727586746,
-0.04416074603796005,
-0.046236373484134674,
-0.0372181311249733,
-0.018823785707354546,
0.015450892969965935,
-0.012391133233904839,
0.03464149311184883,
0.05493253096938133,
-0.022205626592040062,
-0.013894172385334969,
0.050995998084545135,
0.002458096481859684,
-0.03983055800199509,
-0.06133834272623062,
0.020541545003652573,
0.04280085116624832,
0.04863407835364342,
-0.02417389303445816,
-0.04738154634833336,
0.0554693304002285,
-0.004135596565902233,
-0.05629242584109306,
-0.008311453275382519,
0.025855865329504013,
0.01818857342004776,
0.036323465406894684,
0.011272799223661423,
-0.009340319782495499,
0.005792966578155756,
-0.010601799935102463,
0.006553432904183865,
-0.0053053731098771095,
-0.024138106033205986,
-0.01045865286141634,
0.0405820794403553,
-0.02172250673174858,
0.01070021279156208,
-0.096623994410038,
-0.07916010171175003,
-0.019664771854877472,
0.0241559986025095,
-0.01735653355717659,
-0.03972319886088371,
0.028307251632213593,
-0.05997845157980919,
-0.010914932936429977,
0.012355346232652664,
-0.016300825402140617,
-0.06355711817741394,
-0.06559696048498154,
0.055361971259117126,
-0.010566012933850288,
-0.08094944059848785,
-0.05060234293341637,
-0.024066532030701637,
0.013169492594897747,
-0.040295783430337906,
-0.0059003266505897045,
-0.019467946141958237,
-0.0464153066277504,
-0.01744600012898445,
-0.004234009888023138,
0.026428451761603355,
0.005166699644178152,
0.042442984879016876,
-0.025229599326848984,
-0.03217221051454544,
0.024925412610173225,
0.03786229342222214,
-0.012605852447450161,
-0.02845039963722229,
-0.06548959761857986,
0.04595007747411728,
-0.039436906576156616,
-0.07393524795770645,
0.0007940166397020221,
-0.006915773265063763,
0.03288794681429863,
-0.014135733246803284,
0.009447679854929447,
0.03431941196322441,
-0.057652316987514496,
-0.07629717141389847,
0.02091730572283268,
0.014726213179528713,
0.01227482594549656,
0.0350351445376873,
0.008213039487600327,
-0.047345757484436035,
0.003634583204984665
] |
52,317 |
flexget
|
main
|
Main entry point for Command Line Interface
|
def main(args: Optional[Sequence[str]] = None):
"""Main entry point for Command Line Interface"""
if args is None:
args = sys.argv[1:]
try:
log.initialize()
try:
manager = Manager(args)
except (OSError, ValueError) as e:
options = Manager.parse_initial_options(args)
log.start(level=options.loglevel, to_file=False)
if _is_debug():
import traceback
traceback.print_exc()
else:
print('Could not instantiate manager: %s' % e, file=sys.stderr)
sys.exit(1)
else:
log.start(
manager.log_filename,
manager.options.loglevel,
to_file=manager.check_ipc_info() is None,
to_console=not manager.options.cron,
)
try:
if manager.options.profile:
try:
import cProfile as profile
except ImportError:
import profile
profile.runctx(
'manager.start()',
globals(),
locals(),
os.path.join(manager.config_base, manager.options.profile),
)
else:
manager.start()
except (OSError, ValueError) as e:
if _is_debug():
import traceback
traceback.print_exc()
else:
print('Could not start manager: %s' % e, file=sys.stderr)
sys.exit(1)
except KeyboardInterrupt:
if _is_debug():
import traceback
traceback.print_exc()
print('Killed with keyboard interrupt.', file=sys.stderr)
sys.exit(1)
|
(args: Optional[Sequence[str]] = None)
|
[
0.0647558867931366,
0.046020764857530594,
-0.017823070287704468,
0.0022813244722783566,
0.034544073045253754,
-0.06737804412841797,
-0.01447886973619461,
-0.0016115342732518911,
-0.02793167717754841,
-0.03952237218618393,
0.01231273915618658,
0.005752595607191324,
-0.02333340048789978,
0.009880593046545982,
0.0038524814881384373,
0.019200652837753296,
-0.03425905853509903,
-0.02544252760708332,
-0.006256125867366791,
-0.01589445397257805,
-0.00581434927880764,
0.0075624543242156506,
0.030382825061678886,
0.010099106468260288,
-0.005823849700391293,
-0.018212594091892242,
-0.00566709041595459,
0.008849781937897205,
0.010783147998154163,
-0.05206312611699104,
0.0025034004356712103,
-0.0070351725444197655,
-0.04959297925233841,
0.054875295609235764,
-0.010118107311427593,
-0.044424667954444885,
-0.030097806826233864,
-0.0010397187434136868,
-0.030325820669531822,
0.0013597691431641579,
0.03883833438158035,
-0.06768206506967545,
0.08535312861204147,
0.012417245656251907,
-0.0041945017874240875,
0.0013811454409733415,
0.05278516933321953,
-0.0001260310091311112,
-0.027057625353336334,
-0.038762327283620834,
-0.033461008220911026,
0.011438687331974506,
0.03184591233730316,
-0.0001566109713166952,
-0.033537015318870544,
0.07756265997886658,
0.04077645018696785,
0.012170230969786644,
-0.009134798310697079,
-0.06144969165325165,
-0.012512251734733582,
0.02570854313671589,
0.009377063252031803,
0.030116809532046318,
-0.017975078895688057,
-0.10648239403963089,
-0.01503940299153328,
-0.004774036817252636,
0.0022563855163753033,
0.02684861235320568,
0.01985619217157364,
-0.021908314898610115,
-0.00019327722839079797,
-0.010669141076505184,
0.030857853591442108,
-0.004082870204001665,
-0.02458747662603855,
0.0010046852985396981,
0.015409925952553749,
0.059055548161268234,
0.012768766842782497,
0.051531095057725906,
-0.02095825783908367,
0.051759108901023865,
0.02282037027180195,
0.04852891340851784,
0.020008200779557228,
0.01196121796965599,
-0.028482710942626,
-0.003904734505340457,
-0.037907276302576065,
0.059207554906606674,
0.01018461212515831,
0.057649463415145874,
-0.04119447246193886,
0.000717886839993298,
-0.007125427946448326,
-0.028121689334511757,
-0.056357383728027344,
0.025081505998969078,
-0.012654759921133518,
0.018288597464561462,
0.05700342357158661,
-0.023200392723083496,
-0.025043504312634468,
0.017272036522626877,
0.025214513763785362,
-0.0038501061499118805,
-0.01518191210925579,
0.010137109085917473,
-0.054951298981904984,
-0.01412734854966402,
-0.01955217495560646,
-0.075282521545887,
-0.04982099309563637,
0.050467029213905334,
-0.041422486305236816,
0.005087555386126041,
-0.010393624193966389,
0.009605077095329762,
-0.033270999789237976,
0.02084425278007984,
-0.024093447253108025,
0.0019654305651783943,
-0.0010314056416973472,
-0.01139118429273367,
0.00038417932228185236,
-0.03315699100494385,
0.0409664586186409,
-0.017272036522626877,
0.05077105015516281,
-0.04070044308900833,
0.0015462178271263838,
-0.006384383421391249,
0.075700543820858,
-0.050087008625268936,
-0.017101027071475983,
0.027722664177417755,
0.00827974732965231,
0.028387704864144325,
0.022896375507116318,
0.02084425278007984,
0.004268131218850613,
0.005372572690248489,
-0.08603716641664505,
-0.0031399386934936047,
0.012189231812953949,
-0.030534833669662476,
0.0029523023404181004,
0.01878262870013714,
0.032130930572748184,
-0.032054923474788666,
-0.030724845826625824,
0.05707942694425583,
-0.026164570823311806,
-0.009305808693170547,
-0.03241594508290291,
-0.022345341742038727,
0.04389263689517975,
0.058941539376974106,
-0.04351261258125305,
0.011619198136031628,
0.051455091685056686,
-0.06935416162014008,
-0.048832934349775314,
-0.03975038602948189,
-0.004016366321593523,
0.06452787667512894,
-0.0015141534386202693,
0.0519111193716526,
-0.01900114119052887,
-0.020464228466153145,
-0.022896375507116318,
-0.010118107311427593,
-0.029584776610136032,
0.029755787923932076,
-0.004740784876048565,
-0.00486191688105464,
-0.04100446403026581,
0.014393364079296589,
0.009956598281860352,
-0.006317879538983107,
0.002664910163730383,
-0.050353024154901505,
0.012645259499549866,
-0.02567054145038128,
0.00975708570331335,
0.05552133545279503,
0.028900735080242157,
0.010783147998154163,
-0.010004100389778614,
0.0029594276566058397,
-0.0026554095093160868,
0.01689201407134533,
0.0036862213164567947,
0.04985899478197098,
-0.0366722010076046,
-0.0405864380300045,
0.010507631115615368,
-0.023770427331328392,
-0.0004937328048981726,
0.0963737890124321,
-0.00807548500597477,
-0.05677540972828865,
0.02017921209335327,
0.0005014520138502121,
0.008194241672754288,
0.04233454167842865,
-0.009063544683158398,
0.009096796624362469,
0.023029383271932602,
-0.034126050770282745,
-0.041308481246232986,
0.05989159643650055,
0.032054923474788666,
-0.041460491716861725,
0.06954417377710342,
0.01882063038647175,
0.005401074420660734,
0.027266638353466988,
0.06080365180969238,
0.022573355585336685,
-0.0247774887830019,
0.07418045401573181,
-0.0068594119511544704,
0.006317879538983107,
0.05783947557210922,
0.059055548161268234,
0.04845291003584862,
-0.001571156899444759,
0.007643208838999271,
-0.0651359111070633,
-0.023675421252846718,
-0.015713943168520927,
0.003593590809032321,
0.016873013228178024,
0.0033679523039609194,
0.005643338896334171,
-0.07889273762702942,
0.006403384730219841,
-0.02158529683947563,
-0.012360242195427418,
0.050163011997938156,
0.013984840363264084,
0.017918076366186142,
0.0224403478205204,
-0.03526611626148224,
-0.017756566405296326,
-0.007011421024799347,
0.054837293922901154,
-0.006930666044354439,
0.03910434991121292,
-0.0011281927581876516,
0.026905616745352745,
-0.045906756073236465,
-0.018193593248724937,
0.022307340055704117,
-0.051493093371391296,
0.008887783624231815,
0.011999220587313175,
-0.012236734852194786,
-0.014022842049598694,
0.029451768845319748,
0.02310538850724697,
0.0036838462110608816,
0.024454468861222267,
0.0031351882498711348,
-0.039864394813776016,
0.06133568286895752,
-0.015903955325484276,
0.0885453149676323,
0.04636278375983238,
0.02891973778605461,
0.026354582980275154,
-0.06965818256139755,
-0.013604816980659962,
0.008303498849272728,
-0.01944766752421856,
-0.0877852737903595,
0.05065704137086868,
0.01621747389435768,
0.03752725198864937,
0.03530412167310715,
-0.04632478207349777,
-0.03222593665122986,
-0.029584776610136032,
0.01518191210925579,
-0.010992160066962242,
-0.06004360690712929,
0.017376543954014778,
0.015048903413116932,
0.0325869582593441,
-0.04499470070004463,
-0.04974498599767685,
0.0017659185687080026,
-0.01412734854966402,
-0.047464851289987564,
-0.03363202139735222,
-0.017386043444275856,
-0.04339860752224922,
0.000013564291293732822,
-0.015751946717500687,
-0.010403124615550041,
-0.011115667410194874,
0.020635239779949188,
0.0464387908577919,
0.004983049351722002,
-0.06144969165325165,
0.04818689450621605,
0.005676590837538242,
0.04636278375983238,
0.041536495089530945,
0.009728584438562393,
0.022535353899002075,
-0.015837451443076134,
0.06851811707019806,
0.007476949132978916,
-0.024017442017793655,
0.008094485849142075,
0.01944766752421856,
-0.03078184835612774,
0.04263856261968613,
0.013680821284651756,
0.0041755009442567825,
0.003211192786693573,
0.03530412167310715,
0.004275256767868996,
0.08140088617801666,
0.037907276302576065,
-0.030572835355997086,
-0.024986499920487404,
0.00636063190177083,
-0.029527774080634117,
-0.012407745234668255,
-0.030268818140029907,
-0.01022261381149292,
-0.02278236858546734,
-0.07657460123300552,
0.0035698392894119024,
-0.07133028656244278,
0.09082545340061188,
0.019162651151418686,
-0.07581455260515213,
0.00951957143843174,
0.02610756829380989,
0.007662210147827864,
0.07095026224851608,
-0.041270479559898376,
0.004415390081703663,
-0.0259555596858263,
-0.005942606832832098,
0.07186231762170792,
-0.06270376592874527,
-0.0008782090153545141,
0.00977608747780323,
-0.09166150540113449,
-0.004223003517836332,
-0.08755725622177124,
0.0045198965817689896,
0.008146739564836025,
-0.0749024972319603,
-0.03325199708342552,
-0.04035842418670654,
-0.050239019095897675,
-0.0870252251625061,
-0.09439767152070999,
0.05388723686337471,
-0.04647679254412651,
0.05510330945253372,
0.040168412029743195,
0.02751365303993225,
0.009638329036533833,
0.00013293376832734793,
0.02644958905875683,
-0.0631977990269661,
0.056091368198394775,
0.009434066712856293,
0.009500570595264435,
-0.06148769333958626,
0.027342641726136208,
-0.03737524524331093,
0.002400081604719162,
-0.032985981553792953,
-0.003424955764785409,
-0.03617817163467407,
-0.02532852068543434,
-0.009239304810762405,
0.005923605989664793,
0.007662210147827864,
-0.025860553607344627,
0.010241614654660225,
-0.010621638037264347,
0.0382302962243557,
-0.03249195218086243,
0.038610320538282394,
0.014621377922594547,
0.008332000114023685,
0.06137368455529213,
-0.10709042847156525,
0.02462547831237316,
-0.0022171956952661276,
0.03963638097047806,
0.04533672332763672,
0.009134798310697079,
0.010593135841190815,
-0.03914235159754753,
0.01523891557008028,
-0.03484809398651123,
0.026620598509907722,
0.062019724398851395,
0.011505191214382648,
-0.03967438265681267,
-0.05115107074379921,
-0.02407444640994072,
-0.04423465579748154,
-0.06247575208544731,
0.057421449571847916,
-0.037242237478494644,
0.05065704137086868,
-0.0038976091891527176,
0.0261455699801445,
0.03519011288881302,
0.028463710099458694,
-0.0175570547580719,
0.012730764225125313,
-0.003771726507693529,
-0.009529071860015392,
0.03750825300812721,
0.00566709041595459,
-0.013709323480725288,
-0.03195992112159729,
-0.027342641726136208,
0.021281277760863304,
-0.02196531929075718,
-0.002376330317929387,
0.010137109085917473,
0.0074056945741176605,
-0.0010260615963488817,
0.03321399539709091,
0.004120872355997562,
-0.03441106528043747,
-0.06813809275627136,
0.03895233944058418,
0.00615636957809329,
-0.019685182720422745,
0.0184406079351902,
0.027361642569303513,
-0.03007880598306656,
0.037166230380535126,
0.023713424801826477,
-0.026867613196372986,
0.010973159223794937,
-0.04089045524597168,
-0.09188951551914215,
0.03418305143713951,
-0.08915335685014725,
-0.08269296586513519,
0.060499634593725204,
-0.03741324692964554,
0.04199252277612686,
-0.005149309057742357,
-0.023789428174495697,
0.048794928938150406,
-0.023542413488030434,
0.02314339019358158,
0.04567874222993851,
0.08056484162807465,
0.026601597666740417,
-0.04571674391627312,
-0.004766911268234253,
0.047274839133024216,
0.02240234613418579,
0.0011293803108856082,
0.020768247544765472,
-0.031028863042593002,
0.019799189642071724,
0.02344740740954876,
-0.057421449571847916,
-0.019362162798643112,
-0.03313799202442169,
0.07433246076107025,
0.03714723140001297,
0.05863752216100693,
0.0885453149676323,
-0.09523371607065201,
-0.06669400632381439,
0.056357383728027344,
-0.0725843608379364,
0.01303478330373764,
0.011087166145443916,
0.017272036522626877,
-0.05225313827395439,
-0.008959038183093071,
0.018079586327075958,
0.07300238311290741,
-0.024302460253238678,
0.02014121040701866,
-0.028539713472127914,
-0.009590825997292995,
-0.027475649490952492,
0.04108046740293503,
-0.03610216826200485,
0.033651020377874374,
-0.02270636335015297,
-0.0027836672961711884,
0.058789532631635666,
-0.031351882964372635,
0.006389133632183075,
-0.020008200779557228,
0.02211732789874077,
-0.034240055829286575,
0.010735644958913326,
0.0022433223202824593,
-0.013224794529378414,
0.016378983855247498,
0.01622697524726391,
-0.00521106319501996,
0.015713943168520927,
0.013680821284651756,
-0.010916155762970448,
0.023751426488161087,
-0.01588495448231697,
0.025784548372030258,
-0.03444907069206238,
-0.002484399126842618,
-0.003033057088032365,
0.027285639196634293,
0.03114286996424198,
0.07357241958379745,
0.06410984694957733,
0.001749292598105967,
0.01707252487540245,
0.005144558846950531,
-0.05939756706357002,
-0.00918705202639103,
-0.030952859669923782,
0.011419685557484627,
-0.02973678521811962,
0.020692242309451103,
-0.023466410115361214,
0.027646660804748535,
0.04256255552172661,
0.021243276074528694,
0.009096796624362469,
0.007966228760778904,
-0.0468188114464283,
-0.0004447454703040421,
0.0278936754912138,
0.009671580977737904,
-0.015371923334896564,
-0.023637419566512108,
-0.01592295616865158,
0.030116809532046318,
0.050429027527570724,
-0.017063025385141373,
0.02384643256664276,
0.06863211840391159,
0.007082675583660603,
0.017120027914643288,
0.037869274616241455,
-0.015656940639019012,
-0.019419167190790176,
-0.10253015905618668,
0.014849391765892506,
-0.006199122406542301,
-0.012056224048137665,
0.0004782943578902632,
0.022611357271671295,
0.017528552561998367,
0.015124908648431301,
-0.06490790098905563,
-0.017490550875663757,
-0.01733854040503502,
0.01681601069867611,
-0.08793728053569794,
0.03703322261571884,
0.050163011997938156,
0.0491749532520771,
-0.013272297568619251,
0.017823070287704468,
-0.0030568086076527834,
-0.003424955764785409,
-0.03621617332100868,
0.012189231812953949,
0.007054173853248358,
0.015675941482186317,
0.013053784146904945,
-0.0655539333820343,
-0.03462008014321327,
0.022174332290887833,
0.016578495502471924,
0.008968538604676723,
0.02247834950685501,
-0.035133108496665955,
-0.015685442835092545,
0.037850271910429,
0.0456407405436039,
-0.010488630272448063,
0.06794808059930801,
0.021129269152879715,
-0.04054843634366989,
-0.024720484390854836,
0.05225313827395439,
-0.057421449571847916,
0.024720484390854836,
-0.041308481246232986,
0.021832311525940895,
0.0046410285867750645,
-0.053089190274477005,
0.0421445295214653,
-0.08185691386461258,
-0.027342641726136208,
-0.0016234100330621004,
0.02255435474216938,
-0.008588516153395176,
-0.020103206858038902,
0.036311179399490356,
0.004389263689517975,
0.08208493143320084,
0.06403384357690811,
0.01818409189581871,
0.03522811457514763,
0.029755787923932076,
-0.028976740315556526,
0.000969058193732053,
0.007263186387717724,
-0.041612498462200165,
-0.0526711642742157,
-0.007842721417546272,
-0.01925765722990036,
0.01377582736313343,
-0.008051733486354351,
-0.031161870807409286,
-0.021281277760863304,
0.07600456476211548,
-0.027418646961450577,
0.020635239779949188,
-0.0071016764268279076,
0.02352341264486313,
0.002596030943095684,
0.012113227508962154,
0.006921165622770786,
-0.014697383157908916,
0.025024503469467163,
0.0018371728947386146,
-0.026905616745352745,
-0.013842331245541573,
0.03406904637813568,
0.09211753308773041,
0.020388225093483925,
0.04218253493309021,
-0.02158529683947563,
-0.029242755845189095,
0.08482109755277634,
-0.002189881633967161,
-0.011790208518505096,
-0.044614680111408234,
-0.04047242924571037,
-0.044652681797742844,
-0.001471400843001902,
-0.006308378651738167,
0.008341500535607338,
-0.03530412167310715,
0.031427886337041855,
-0.008408005349338055,
-0.11089065670967102,
0.006199122406542301,
-0.009975599125027657,
0.051759108901023865,
0.02996479906141758,
0.019248155876994133,
-0.02603156305849552,
0.037242237478494644,
0.030610838904976845,
-0.003496210090816021,
0.0010747520718723536,
0.019162651151418686,
0.017918076366186142,
-0.005510331131517887,
-0.0025105257518589497,
0.013395804911851883,
-0.009985099546611309,
-0.015789948403835297,
-0.01878262870013714,
0.06015761196613312,
0.024511471390724182,
-0.0004946234403178096,
-0.017129529267549515,
0.027361642569303513,
-0.01974218524992466,
-0.0016483489889651537,
0.002667285269126296,
0.021870313212275505,
-0.0550273060798645,
-0.004458142910152674,
0.03059183806180954,
-0.06992419809103012,
-0.03300498053431511,
-0.022896375507116318,
-0.037280239164829254,
0.04248655214905739,
0.010707142762839794,
0.0249674990773201,
0.044614680111408234,
-0.02899574115872383,
0.008602766320109367,
-0.06612396985292435,
0.026943618431687355,
0.03722323477268219,
-0.04636278375983238,
0.009001790545880795,
0.01012760866433382,
0.07418045401573181,
0.02392243593931198,
0.005538832861930132,
-0.009044542908668518,
-0.04199252277612686,
0.030192812904715538,
-0.029204754158854485,
-0.00005010066524846479,
-0.03604516386985779,
0.014032342471182346,
0.023656420409679413,
-0.0405864380300045,
0.029128748923540115,
-0.0335560142993927,
-0.0784367099404335,
-0.09819789975881577,
0.005671840626746416,
-0.0011632260866463184,
-0.005880853161215782,
-0.057535454630851746,
-0.028691723942756653,
0.04119447246193886,
0.013281797990202904,
-0.06684601306915283,
0.006498390343040228,
-0.04317059367895126,
0.032833971083164215,
-0.016397984698414803,
-0.01486839260905981,
-0.047274839133024216,
-0.03277696669101715,
0.00009752929327078164,
0.019647179171442986,
-0.02532852068543434,
-0.009852091781795025,
0.06490790098905563,
-0.008056484162807465,
0.014136848971247673,
0.00496404804289341,
-0.034943100064992905,
-0.005344070959836245,
0.06889814138412476,
-0.053317200392484665,
-0.016207972541451454,
0.013984840363264084,
0.015267416834831238,
0.027133628726005554,
-0.04051043465733528,
0.018659120425581932,
-0.02088225446641445,
-0.004774036817252636,
-0.055939361453056335,
0.057497452944517136,
0.005082805175334215,
-0.002826419658958912,
0.012673760764300823
] |
52,329 |
pgeocode
|
GeoDistance
|
Distance calculation from a city name or a postal code
Parameters
----------
data_path: str
path to the dataset
error: str, default='ignore'
how to handle not found elements. One of
'ignore' (return NaNs), 'error' (raise an exception),
'nearest' (find from nearest valid points)
|
class GeoDistance(Nominatim):
"""Distance calculation from a city name or a postal code
Parameters
----------
data_path: str
path to the dataset
error: str, default='ignore'
how to handle not found elements. One of
'ignore' (return NaNs), 'error' (raise an exception),
'nearest' (find from nearest valid points)
"""
def __init__(self, country: str = "fr", errors: str = "ignore"):
super().__init__(country)
def query_postal_code(self, x, y):
"""Get distance (in km) between postal codes
Parameters
----------
x: array, list or int
a list of postal codes
y: array, list or int
a list of postal codes
Returns
-------
d : array or int
the calculated distances
"""
if isinstance(x, int):
x = str(x)
if isinstance(y, int):
y = str(y)
if isinstance(x, str):
x = [x]
single_x_entry = True
else:
single_x_entry = False
df_x = super().query_postal_code(x)
if isinstance(y, str):
y = [y]
single_y_entry = True
else:
single_y_entry = False
df_y = super().query_postal_code(y)
x_coords = df_x[["latitude", "longitude"]].values
y_coords = df_y[["latitude", "longitude"]].values
if x_coords.shape[0] == y_coords.shape[0]:
pass
elif x_coords.shape[0] == 1:
x_coords = np.repeat(x_coords, y_coords.shape[0], axis=0)
elif y_coords.shape[0] == 1:
y_coords = np.repeat(y_coords, x_coords.shape[0], axis=0)
else:
raise ValueError("x and y must have the same number of elements")
dist = haversine_distance(x_coords, y_coords)
if single_x_entry and single_y_entry:
return dist[0]
else:
return dist
|
(country: str = 'fr', errors: str = 'ignore')
|
[
0.06123063340783119,
-0.030288804322481155,
0.029251648113131523,
0.04728664457798004,
-0.021511388942599297,
-0.04770918935537338,
-0.03693428635597229,
-0.02329760417342186,
0.049245718866586685,
0.00916154682636261,
-0.004979310557246208,
0.02733098901808262,
-0.010803711600601673,
0.019782796502113342,
-0.024526825174689293,
-0.004792046267539263,
-0.028867516666650772,
0.031229928135871887,
-0.03197898715734482,
0.0167961698025465,
-0.01791975647211075,
-0.031210722401738167,
0.0029386095702648163,
0.006453416775912046,
-0.010928554460406303,
0.03144120052456856,
0.057427726686000824,
-0.02272140607237816,
0.007178465835750103,
-0.02842576429247856,
-0.003229109337553382,
-0.005493087228387594,
-0.04144783690571785,
0.039315905421972275,
0.01824626885354519,
-0.07567399740219116,
0.06895168870687485,
0.02322077751159668,
-0.06426527351140976,
0.007456961553543806,
-0.07843974232673645,
-0.06914374977350235,
0.011716024950146675,
-0.0016709740739315748,
0.031229928135871887,
-0.012685958296060562,
-0.07371491938829422,
-0.030096739530563354,
-0.09534155577421188,
-0.0007946729892864823,
-0.021626628935337067,
-0.026197800412774086,
0.0383363701403141,
0.03134516626596451,
-0.015586154535412788,
0.08235789090394974,
0.019744383171200752,
0.1011035293340683,
-0.0017237921711057425,
-0.029232442378997803,
-0.03142199292778969,
-0.008527729660272598,
0.04252340644598007,
-0.018774449825286865,
-0.03272804245352745,
0.0032459150534123182,
0.0030034317169338465,
0.008455704897642136,
0.00227838265709579,
0.04490502551198006,
0.04106370732188225,
0.0055651115253567696,
-0.021280910819768906,
-0.0006812339997850358,
0.10371562838554382,
0.09910604357719421,
-0.02765750139951706,
-0.0017754099098965526,
0.07563558220863342,
0.017583640292286873,
-0.04163990542292595,
-0.03768334537744522,
0.05919473618268967,
-0.05062859132885933,
0.017737293615937233,
-0.03236311674118042,
0.04778601601719856,
0.034936800599098206,
0.03591633960604668,
-0.002249572891741991,
-0.06998883932828903,
0.021741868928074837,
0.009862587787210941,
-0.0037452864926308393,
0.0008690985850989819,
0.04037226736545563,
0.014673841185867786,
-0.0020070895552635193,
0.010909347794950008,
-0.0188800860196352,
0.0768648013472557,
0.05074383318424225,
0.05105113610625267,
0.001795816933736205,
-0.005665946286171675,
-0.008753406815230846,
-0.0030466467142105103,
-0.01625838503241539,
-0.01654648408293724,
0.026716377586126328,
-0.1402081698179245,
0.012167380191385746,
-0.010342752560973167,
-0.005608326755464077,
-0.019936447963118553,
-0.0453275702893734,
0.01404962595552206,
0.05569913238286972,
-0.04091005399823189,
0.011034190654754639,
-0.01652727834880352,
0.07413747161626816,
-0.053970541805028915,
-0.0021595419384539127,
-0.001026352634653449,
-0.005747574381530285,
0.04509709030389786,
0.012186586856842041,
-0.009776158258318901,
-0.03614681586623192,
0.039047013968229294,
0.0023576098028570414,
0.027234956622123718,
0.03336185961961746,
0.005867615807801485,
0.021722663193941116,
0.026735585182905197,
0.004398311022669077,
0.023950627073645592,
0.026409072801470757,
0.04640313982963562,
-0.026370659470558167,
0.048362214118242264,
0.0009357214439660311,
-0.006832747254520655,
0.0373760387301445,
-0.020647093653678894,
0.0017802115762606263,
-0.0009723340044729412,
-0.05650581046938896,
-0.03820192441344261,
0.02725416235625744,
0.07882387936115265,
-0.007615416310727596,
0.010506008751690388,
-0.07890070229768753,
0.02792639285326004,
-0.024488411843776703,
0.039680831134319305,
0.01799658313393593,
-0.026466691866517067,
-0.022318067029118538,
0.02264457941055298,
-0.0006986400112509727,
-0.022356480360031128,
-0.012388255447149277,
-0.015826236456632614,
-0.06841389834880829,
-0.03566665202379227,
0.03829795494675636,
0.0027249359991401434,
0.03140278905630112,
0.00484486436471343,
-0.00710163963958621,
-0.024142693728208542,
0.03144120052456856,
-0.00018906494369730353,
0.010554025880992413,
0.029808640480041504,
-0.010371563024818897,
-0.001301247044466436,
-0.011341496370732784,
-0.030922623351216316,
0.011264669708907604,
0.024622859433293343,
0.06948947161436081,
0.02366252802312374,
-0.03253597766160965,
0.019331440329551697,
0.04075640067458153,
0.010006637312471867,
-0.04317643120884895,
-0.008052365854382515,
0.04755553603172302,
0.03591633960604668,
0.0053058224730193615,
0.0187840536236763,
0.01411684975028038,
-0.039315905421972275,
0.044059935957193375,
-0.05950203910470009,
0.03318900242447853,
0.019408266991376877,
0.0030658531468361616,
-0.03364995867013931,
0.022106794640421867,
-0.06269033253192902,
0.0237201489508152,
-0.04651838168501854,
-0.004864071030169725,
0.02767670713365078,
-0.012772387824952602,
-0.04617265984416008,
0.01643124409019947,
0.05450832471251488,
-0.053355928510427475,
0.029904672876000404,
0.01581663265824318,
0.062344618141651154,
-0.021933935582637787,
0.07363809645175934,
-0.07279300689697266,
0.05934838950634003,
0.03689587488770485,
0.03232470527291298,
-0.0024656469468027353,
0.031172309070825577,
0.06103856861591339,
0.0281760785728693,
-0.04329167306423187,
0.012935644015669823,
-0.07713370025157928,
-0.006943185348063707,
-0.05566072091460228,
0.015586154535412788,
-0.07213997840881348,
0.04044909402728081,
0.012801197357475758,
0.018428729847073555,
0.0024260333739221096,
-0.05178098753094673,
-0.04267705976963043,
-0.03228629007935524,
-0.006919176783412695,
-0.008724597282707691,
-0.05427784472703934,
-0.016056716442108154,
0.0029218036215752363,
0.016805773600935936,
-0.03257438912987709,
-0.025621602311730385,
-0.007490572985261679,
0.006962391547858715,
0.004415116738528013,
0.04947619512677193,
-0.09895239025354385,
-0.02281743846833706,
0.030000705271959305,
0.044482480734586716,
-0.044213589280843735,
-0.0024848536122590303,
-0.07087234407663345,
-0.020915985107421875,
0.026966063305735588,
-0.07406064122915268,
0.03610840439796448,
-0.0083500687032938,
0.013022073544561863,
0.021184878423810005,
-0.017929358407855034,
-0.02339363656938076,
0.0720631554722786,
-0.06019347906112671,
-0.024795718491077423,
0.0013516643084585667,
0.05950203910470009,
0.01834230124950409,
-0.03906622156500816,
-0.04467454552650452,
-0.012090553529560566,
-0.04655679315328598,
-0.06511037051677704,
-0.02249092608690262,
-0.04206245020031929,
-0.01614314503967762,
-0.020647093653678894,
0.009694530628621578,
-0.03783699870109558,
0.029290061444044113,
0.004840062465518713,
-0.0326320081949234,
-0.010784504935145378,
-0.03336185961961746,
0.026217006146907806,
0.024910956621170044,
-0.0238161813467741,
-0.019705969840288162,
0.002472849562764168,
-0.0009561284678056836,
-0.03726080060005188,
-0.06453417241573334,
-0.006179722957313061,
0.03697270154953003,
-0.0062757558189332485,
0.006045276764780283,
0.004328687209635973,
0.035128869116306305,
-0.006050078198313713,
0.03245915099978447,
-0.0023588102776557207,
0.0017838127678260207,
-0.011187843047082424,
-0.04997556656599045,
-0.02710050903260708,
-0.00086249626474455,
0.02752305567264557,
0.01907215267419815,
0.028713863343000412,
0.010419579222798347,
0.034859973937273026,
0.004672004841268063,
0.01407843641936779,
-0.03610840439796448,
0.0161239393055439,
0.017535623162984848,
-0.0010479600168764591,
0.03245915099978447,
0.005906028673052788,
0.06119222193956375,
0.019120167940855026,
0.057850271463394165,
0.003512406488880515,
-0.0002231266553280875,
-0.002074312651529908,
0.07505938410758972,
0.013070089742541313,
0.025487154722213745,
-0.006583061534911394,
0.01805420219898224,
0.00597325200214982,
-0.03393805772066116,
0.031153101474046707,
-0.04033385589718819,
0.008369275368750095,
0.016287194564938545,
-0.029597368091344833,
-0.00028239699895493686,
-0.013022073544561863,
0.012196189723908901,
0.029962291941046715,
-0.04044909402728081,
0.05039811134338379,
-0.009281588718295097,
-0.017708484083414078,
0.07014249265193939,
0.012839610688388348,
-0.008983885869383812,
-0.0015041166916489601,
0.026735585182905197,
0.01164880208671093,
0.016517674550414085,
-0.06180683150887489,
-0.009920207783579826,
-0.024834131821990013,
-0.03257438912987709,
-0.04175514355301857,
0.005224194843322039,
0.022164413705468178,
-0.000654824951197952,
-0.003334745531901717,
-0.03714555874466896,
-0.05220353230834007,
-0.02279823087155819,
-0.01937945745885372,
0.04586535692214966,
0.02752305567264557,
0.04167831689119339,
0.0091039277613163,
-0.08612238615751266,
0.008931067772209644,
-0.01635441742837429,
-0.01891849935054779,
0.029462920501828194,
0.003874931251630187,
0.04467454552650452,
-0.014865906909108162,
0.04490502551198006,
0.03557061776518822,
-0.01650807075202465,
-0.006088491529226303,
-0.01629679836332798,
-0.044520892202854156,
0.024718891829252243,
0.0326320081949234,
-0.025064609944820404,
0.03668460249900818,
-0.011812057346105576,
-0.010870934464037418,
-0.034667909145355225,
0.00585321057587862,
-0.03380361199378967,
-0.039565593004226685,
0.0161239393055439,
0.06687737256288528,
-0.007413746789097786,
-0.020896779373288155,
-0.007989944890141487,
-0.034360602498054504,
-0.0030442457646131516,
0.05070541799068451,
-0.04244657978415489,
0.024507619440555573,
0.10179496556520462,
0.00848451443016529,
-0.07452160120010376,
0.01153356209397316,
-0.029366888105869293,
0.010918950662016869,
-0.0072072758339345455,
0.019686762243509293,
-0.0015449307393282652,
-0.05946362763643265,
0.005113756749778986,
-0.006285359151661396,
0.030346425250172615,
-0.024411585181951523,
-0.003752489108592272,
-0.0629592314362526,
-0.0006704303086735308,
0.02275981940329075,
-0.017295541241765022,
-0.011130223050713539,
-0.07701845467090607,
-0.0567362904548645,
0.0002911000046879053,
0.0367998406291008,
-0.019725175574421883,
-0.007466564886271954,
0.058042339980602264,
-0.025083817541599274,
-0.022356480360031128,
0.013262155465781689,
0.025083817541599274,
0.02794560045003891,
-0.03618523105978966,
-0.10386928170919418,
0.015096385963261127,
-0.06441892683506012,
-0.016632914543151855,
-0.06522560864686966,
0.00451835198327899,
-0.052549250423908234,
-0.011072603985667229,
0.003766894107684493,
0.03311217576265335,
0.02809925191104412,
-0.043560564517974854,
-0.019004927948117256,
-0.025314295664429665,
0.04536598548293114,
0.006544648203998804,
0.05485404282808304,
0.00011463938426459208,
0.014232088811695576,
-0.010938157327473164,
0.04594218358397484,
0.008767811581492424,
-0.013646287843585014,
-0.0023432050365954638,
-0.02400824800133705,
0.024526825174689293,
-0.025813667103648186,
-0.021396150812506676,
-0.015355675481259823,
-0.003512406488880515,
0.02779194712638855,
-0.028867516666650772,
-0.002394822658970952,
-0.0029626176692545414,
-0.04306119307875633,
-0.009891398251056671,
-0.026946857571601868,
0.0565442256629467,
-0.05128161609172821,
0.014856303110718727,
-0.0377601720392704,
0.01870722696185112,
-0.035685859620571136,
0.01637362502515316,
-0.025045404210686684,
-0.030346425250172615,
0.06829866021871567,
0.04567328840494156,
-0.02274061180651188,
-0.006827945355325937,
0.04121736064553261,
0.04091005399823189,
-0.01818864792585373,
0.039527177810668945,
-0.062306202948093414,
0.0031066671945154667,
0.02861783094704151,
-0.019158581271767616,
0.004477538168430328,
0.043906282633543015,
0.03528251871466637,
-0.004744029603898525,
0.04978350177407265,
-0.02339363656938076,
0.030461665242910385,
-0.10287053883075714,
-0.07125648111104965,
0.10555946081876755,
0.008407688699662685,
0.0036084395833313465,
0.025909701362252235,
-0.026082560420036316,
-0.0036084395833313465,
-0.04663361981511116,
0.019513903185725212,
0.015672583132982254,
0.06726150959730148,
-0.01587425358593464,
-0.020896779373288155,
-0.03203660622239113,
0.06806818395853043,
0.03860526159405708,
-0.021530596539378166,
0.006362185347825289,
0.010496405884623528,
-0.016229575499892235,
-0.040103375911712646,
0.03197898715734482,
0.05120478942990303,
0.04525074362754822,
0.03558982536196709,
0.010035447776317596,
-0.03213263675570488,
-0.009257580153644085,
0.038739707320928574,
-0.008873448707163334,
-0.014961940236389637,
-0.029597368091344833,
-0.06987360119819641,
0.018121425062417984,
-0.03211343288421631,
0.012541908770799637,
0.05420101806521416,
0.00413181958720088,
0.03134516626596451,
0.06019347906112671,
0.013338982127606869,
0.06050078198313713,
0.015672583132982254,
0.057811859995126724,
0.06330494582653046,
-0.06902851164340973,
-0.02241409942507744,
0.035167280584573746,
0.008402886800467968,
0.007048821542412043,
-0.05212670564651489,
0.034591082483530045,
0.04336849972605705,
-0.07144854217767715,
0.0480164960026741,
-0.052933383733034134,
0.021914727985858917,
-0.0544314980506897,
-0.005675549618899822,
-0.01202333066612482,
-0.0023528081364929676,
-0.048362214118242264,
0.008470109663903713,
-0.034917596727609634,
0.012196189723908901,
-0.019600333645939827,
-0.09787682443857193,
0.013972800225019455,
-0.04701775312423706,
-0.015077179297804832,
0.04563487693667412,
0.006664689630270004,
0.002549675991758704,
0.031037861481308937,
0.038950979709625244,
-0.04632631316781044,
-0.0004588576266542077,
0.006184524390846491,
-0.03779858350753784,
0.002511262660846114,
-0.04336849972605705,
0.006727111060172319,
0.02277902513742447,
-0.019955655559897423,
0.02733098901808262,
-0.034245364367961884,
-0.022318067029118538,
0.06422686576843262,
-0.03209422528743744,
-0.025544775649905205,
-0.02343204990029335,
-0.0553918294608593,
-0.05435467138886452,
0.06849072873592377,
0.008681382052600384,
-0.07087234407663345,
-0.024065867066383362,
-0.016901805996894836,
-0.03764493018388748,
0.03875891491770744,
-0.018716828897595406,
0.008407688699662685,
-0.008686183951795101,
-0.03687666729092598,
-0.03597395867109299,
-0.0009357214439660311,
-0.004660001024603844,
-0.02341284230351448,
0.0005332832224667072,
-0.007749862503260374,
-0.026255419477820396,
0.02825290523469448,
-0.019081754609942436,
0.010947761125862598,
0.00965131539851427,
-0.0001794616546249017,
0.025544775649905205,
-0.0035004024393856525,
0.06534084677696228,
0.010621248744428158,
0.019840415567159653,
0.021569009870290756,
-0.039162252098321915,
-0.020915985107421875,
-0.003293931484222412,
0.02252933941781521,
-0.008758208714425564,
-0.04233134165406227,
0.04244657978415489,
-0.053010210394859314,
0.028925135731697083,
-0.02341284230351448,
0.04659520834684372,
-0.04632631316781044,
-0.05235718563199043,
-0.004165431018918753,
0.004057393874973059,
0.04114053398370743,
-0.0045591662637889385,
-0.026044147089123726,
0.035090453922748566,
0.04663361981511116,
0.017910152673721313,
0.013809544034302235,
-0.025237469002604485,
-0.06941264867782593,
0.002137934323400259,
0.02337442897260189,
-0.01863040030002594,
-0.020339787006378174,
0.025160644203424454,
-0.014616221189498901,
-0.0314796157181263,
0.0014440960949286819,
-0.016940219327807426,
0.0673767477273941,
-0.04809332266449928,
0.0116199916228652,
-0.003963761497288942,
0.0026553121861070395,
0.031172309070825577,
0.02819528616964817,
0.03618523105978966,
-0.0037092743441462517,
0.0074281515553593636,
0.0006908373325131834,
-0.03178691864013672,
-0.06069285050034523,
0.06265192478895187,
0.05562230944633484,
0.053394343703985214,
-0.004535158164799213,
0.0364157110452652,
-0.0038701295852661133,
0.039373524487018585,
0.021761074662208557,
0.011552768759429455,
0.021914727985858917,
0.004832860082387924,
0.030154358595609665,
-0.01583584025502205,
0.07033456116914749,
0.011351099237799644,
0.03326582908630371,
-0.00002203882104367949,
-0.057888686656951904,
-0.010755694471299648,
-0.029405301436781883,
-0.0011127822799608111,
0.020282167941331863,
0.01650807075202465,
-0.04248499497771263,
0.01818864792585373,
0.011879281140863895,
0.016364021226763725,
-0.049437783658504486,
0.05754296854138374,
0.024930164217948914,
0.012599527835845947,
0.0389125682413578,
-0.017420385032892227,
0.034994419664144516,
-0.04621107503771782,
-0.00689516868442297,
0.0666084811091423,
0.053471170365810394,
0.020647093653678894,
0.014193675480782986,
0.004993715323507786,
0.039315905421972275,
-0.03868208825588226,
0.02274061180651188,
0.04747870936989784,
-0.07413747161626816,
0.04778601601719856,
-0.01876484602689743,
-0.12430509924888611,
-0.020474232733249664,
-0.005353839136660099,
-0.10947760939598083,
0.06837549060583115,
0.003121072193607688,
0.026313038542866707,
-0.039988137781620026,
-0.029213234782218933,
0.012878024019300938,
-0.004587976261973381,
-0.03157564625144005,
0.0470561645925045,
-0.030461665242910385,
-0.03695349395275116,
0.02792639285326004,
-0.005949243903160095,
0.039277493953704834,
0.019485093653202057,
0.010237116366624832,
0.0453275702893734,
-0.03290090337395668,
-0.0025736840907484293,
0.04140942543745041,
0.005406657233834267,
0.03324662148952484,
0.02742702141404152,
-0.00004336489655543119,
-0.004194241017103195,
-0.0007988744182512164,
-0.04033385589718819,
0.001921860151924193,
-0.03789461776614189,
-0.021242497488856316,
0.0005107754841446877,
-0.05569913238286972,
0.019974861294031143,
-0.008537332527339458,
0.01652727834880352,
-0.01696902886033058,
0.08274202048778534
] |
52,330 |
pgeocode
|
__init__
| null |
def __init__(self, country: str = "fr", errors: str = "ignore"):
super().__init__(country)
|
(self, country: str = 'fr', errors: str = 'ignore')
|
[
-0.0427437499165535,
-0.021252762526273727,
0.022001460194587708,
0.012396027334034443,
-0.08303721994161606,
-0.05975957214832306,
0.03256828710436821,
0.012540661729872227,
0.07929373532533646,
-0.054076287895441055,
0.021218731999397278,
0.02002762444317341,
-0.028416424989700317,
0.02797401323914528,
-0.0330447293817997,
0.009571400471031666,
-0.0223417766392231,
0.0465552918612957,
-0.027633696794509888,
-0.018496200442314148,
-0.02581300400197506,
-0.03767303377389908,
-0.017917662858963013,
0.05356581136584282,
0.011315522715449333,
0.13245117664337158,
0.024928180500864983,
0.0038966236170381308,
0.005657761357724667,
-0.05084327980875969,
-0.020640194416046143,
0.042811810970306396,
-0.013195770792663097,
0.07942986488342285,
-0.028926899656653404,
-0.037775129079818726,
-0.02902899496257305,
0.020384956151247025,
-0.15327852964401245,
0.06210775673389435,
-0.017441218718886375,
0.023737072944641113,
-0.018819499760866165,
-0.008307975716888905,
0.018121851608157158,
-0.02372005768120289,
-0.025302529335021973,
0.040531691163778305,
-0.02462189644575119,
0.01921086385846138,
-0.00018837048264686018,
0.03268739581108093,
0.010685937479138374,
-0.03289158642292023,
-0.04318615794181824,
0.03869398310780525,
0.03268739581108093,
0.05468885600566864,
-0.02178025431931019,
0.04798462241888046,
-0.05053699389100075,
-0.014038054272532463,
0.002982022939249873,
-0.03634579852223396,
-0.020504066720604897,
-0.014795258641242981,
-0.002982022939249873,
-0.03081565536558628,
0.037434812635183334,
0.04393485561013222,
0.05404225364327431,
0.018496200442314148,
-0.05315743386745453,
0.008610006421804428,
0.0660894587635994,
0.016760585829615593,
-0.09950853884220123,
0.017032839357852936,
-0.024945197626948357,
-0.004845255520194769,
0.003734973259270191,
0.01382535696029663,
-0.008580229245126247,
0.038898173719644547,
0.028246266767382622,
-0.06234597787261009,
0.00949482899159193,
-0.04396888613700867,
0.021950412541627884,
0.047848496586084366,
-0.09467604011297226,
-0.011519712395966053,
-0.02644258923828602,
0.03515469282865524,
0.014812273904681206,
0.013918943703174591,
0.016182048246264458,
-0.016403254121541977,
0.007929373532533646,
-0.0034648471046239138,
0.04332228749990463,
-0.0062448070384562016,
-0.03804738074541092,
-0.06302660703659058,
0.04386679083108902,
0.0023545646108686924,
0.023822152987122536,
-0.03559710085391998,
0.03084968775510788,
0.0007417835295200348,
-0.04740608483552933,
-0.04298197105526924,
-0.016386236995458603,
0.06711040437221527,
0.007971913553774357,
-0.02193339541554451,
0.006176744122058153,
0.008712101727724075,
0.013553103432059288,
0.018070803955197334,
-0.016182048246264458,
0.03876204416155815,
-0.08038274943828583,
0.04022540524601936,
0.07344029098749161,
0.049005571752786636,
0.017951693385839462,
-0.013952975161373615,
0.07827278971672058,
-0.018717406317591667,
0.07854504138231277,
-0.00997978076338768,
-0.016632966697216034,
-0.10032529383897781,
0.021763237193226814,
-0.02462189644575119,
0.03957880660891533,
0.023362725973129272,
-0.013272342272102833,
0.05002652108669281,
-0.0007673072977922857,
0.012719327583909035,
0.04621497541666031,
-0.009341686964035034,
0.005445063579827547,
0.03753690794110298,
-0.03282352164387703,
-0.01607995294034481,
-0.02261403016746044,
0.029964864253997803,
0.02637452632188797,
0.05577787011861801,
-0.029794706031680107,
0.003045832272619009,
-0.0387960784137249,
-0.0680292621254921,
0.020861400291323662,
-0.03338504582643509,
0.05363387614488602,
0.02947140671312809,
0.0016250110929831862,
-0.017917662858963013,
-0.025693893432617188,
-0.011817489750683308,
-0.007393375039100647,
0.01564604975283146,
-0.008205880410969257,
-0.07017325609922409,
-0.008316483348608017,
0.019091753289103508,
-0.03454212099313736,
-0.07861310243606567,
0.028977947309613228,
0.03248320519924164,
-0.010200985707342625,
0.06486431509256363,
0.042505525052547455,
0.05227261036634445,
-0.0271232221275568,
0.03256828710436821,
0.0739167332649231,
0.028977947309613228,
-0.059147000312805176,
0.02775280736386776,
0.0774560272693634,
0.0009151322301477194,
0.016505349427461624,
0.027514586225152016,
0.035529039800167084,
0.005891728680580854,
0.05676478520035744,
0.033146824687719345,
0.014557036571204662,
-0.018121851608157158,
0.016505349427461624,
-0.020861400291323662,
0.054450634866952896,
-0.03770706430077553,
-0.037843190133571625,
0.031581368297338486,
-0.049107667058706284,
0.06418368220329285,
-0.004641065839678049,
-0.05482498183846474,
-0.012396027334034443,
0.063809335231781,
-0.027259349822998047,
-0.0020514701027423143,
-0.03675417974591255,
-0.02565986104309559,
0.027582649141550064,
-0.0330447293817997,
-0.019261911511421204,
0.03129209950566292,
0.001690947450697422,
-0.08276496827602386,
0.004213543143123388,
-0.023549899458885193,
0.038149476051330566,
0.038966234773397446,
0.12462388724088669,
-0.05271502211689949,
0.015492906793951988,
-0.060372140258550644,
0.023737072944641113,
0.02656169980764389,
0.010447715409100056,
-0.05121762678027153,
-0.0543145090341568,
0.027242332696914673,
-0.0641496554017067,
-0.04151860997080803,
-0.026663795113563538,
-0.02358393184840679,
-0.005551412235945463,
0.024332627654075623,
0.03335101529955864,
-0.01135806180536747,
-0.035052597522735596,
-0.038557857275009155,
0.0160544291138649,
-0.024894149973988533,
-0.01378281693905592,
0.014046561904251575,
0.03532484918832779,
-0.012983073480427265,
-0.0483589693903923,
0.02953946962952614,
-0.023396756500005722,
0.003871099790558219,
-0.02816118858754635,
-0.01980641856789589,
-0.02014673501253128,
0.013723261654376984,
0.0001667018950683996,
-0.026476621627807617,
0.005585444159805775,
-0.018598295748233795,
0.052578892558813095,
-0.0387960784137249,
-0.007495470345020294,
0.05091134458780289,
-0.0310708936303854,
0.06295854598283768,
-0.02462189644575119,
0.016190556809306145,
0.02159307897090912,
-0.020163750275969505,
0.014735703356564045,
0.012174821458756924,
0.06534076482057571,
0.05829621106386185,
-0.02584703639149666,
0.041688766330480576,
0.013629674911499023,
-0.031138956546783447,
-0.027072174474596977,
0.03518872335553169,
-0.06850570440292358,
-0.0174582339823246,
0.08174401521682739,
-0.011766442097723484,
0.017339123412966728,
0.04138248413801193,
-0.027174269780516624,
-0.05152391269803047,
0.026799920946359634,
-0.025727925822138786,
-0.06585123389959335,
-0.027208302170038223,
-0.00010973876487696543,
0.020436003804206848,
0.02662976272404194,
0.0483589693903923,
0.007754961494356394,
-0.012106758542358875,
0.042437463998794556,
0.034337930381298065,
-0.04393485561013222,
-0.05472288653254509,
-0.007640104740858078,
-0.013493548147380352,
0.038149476051330566,
0.03365729749202728,
-0.018002741038799286,
-0.04498983547091484,
-0.012549169361591339,
0.009341686964035034,
0.032176923006772995,
0.020436003804206848,
0.02581300400197506,
0.044411297887563705,
0.031087908893823624,
-0.011179395951330662,
0.020129719749093056,
0.0251834187656641,
0.016479825600981712,
-0.05707107111811638,
-0.011341046541929245,
0.057955894619226456,
0.0032372605055570602,
-0.039714932441711426,
-0.0033414822537451982,
-0.016752077266573906,
-0.05359984189271927,
-0.004704874940216541,
0.038591887801885605,
0.000654577452223748,
0.028552550822496414,
-0.04893750697374344,
-0.04393485561013222,
-0.025915099307894707,
0.010005304589867592,
-0.0543825700879097,
0.002107835141941905,
-0.009750067256391048,
0.006848868913948536,
-0.012489614076912403,
-0.0022801202721893787,
-0.03998718410730362,
0.04393485561013222,
-0.01389341987669468,
-0.05890877917408943,
0.026833953335881233,
-0.010200985707342625,
-0.016752077266573906,
-0.06319677084684372,
-0.049447983503341675,
0.006495790556073189,
0.009775590151548386,
-0.04111022874712944,
-0.024298595264554024,
0.012736343778669834,
0.009733051061630249,
0.04798462241888046,
-0.028450457379221916,
-0.03569919615983963,
0.05339565500617027,
0.02555776759982109,
-0.022324759513139725,
0.03212587535381317,
-0.032738443464040756,
-0.01027755718678236,
-0.011451649479568005,
0.02681693807244301,
-0.01858127862215042,
0.0777282789349556,
0.01259170938283205,
-0.04294793680310249,
-0.01596084237098694,
0.014369863085448742,
-0.029896801337599754,
-0.019789403304457664,
-0.01617353968322277,
0.004747414495795965,
0.01980641856789589,
0.04495580494403839,
0.03501856327056885,
-0.06122293323278427,
0.0017653916729614139,
0.015552463009953499,
-0.0004769747902173549,
0.0029182136058807373,
0.0329766646027565,
-0.03614160791039467,
-0.05533545836806297,
-0.015816207975149155,
0.050605058670043945,
0.026646779850125313,
0.008865243755280972,
0.005776871927082539,
-0.04376469925045967,
0.012166313827037811,
0.0013378690928220749,
-0.0242815800011158,
0.011289998888969421,
-0.015612018294632435,
-0.020810352638363838,
-0.002590659074485302,
0.0030926258768886328,
-0.011698378250002861,
-0.05305533856153488,
-0.0071508996188640594,
0.020827367901802063,
0.010719968937337399,
0.03719659149646759,
0.014369863085448742,
0.013280849903821945,
0.009792606346309185,
-0.0019748990889638662,
0.007725183852016926,
-0.022171618416905403,
0.0023439296055585146,
-0.027293380349874496,
-0.06244807317852974,
0.03566516563296318,
-0.028263282030820847,
-0.009656479582190514,
-0.015595002099871635,
-0.05169407278299332,
-0.0252174511551857,
0.007478454150259495,
0.01586725562810898,
0.05359984189271927,
0.0387960784137249,
0.013399960473179817,
0.005325952544808388,
-0.025098338723182678,
0.027599666267633438,
0.0002051204355666414,
-0.01652236469089985,
0.019449086859822273,
-0.04505790024995804,
-0.037502873688936234,
0.029165120795369148,
-0.01281291525810957,
-0.018717406317591667,
0.009239591658115387,
-0.016539379954338074,
0.03927252069115639,
0.005806649569422007,
-0.02327764593064785,
0.053701937198638916,
0.042437463998794556,
0.004798462148755789,
-0.02593211457133293,
-0.010728476569056511,
0.006325632333755493,
-0.03614160791039467,
-0.03709449619054794,
-0.021133651956915855,
-0.03406567871570587,
-0.009894701652228832,
-0.0773879662156105,
0.02480906993150711,
-0.009733051061630249,
-0.053701937198638916,
-0.010226509533822536,
-0.022069523110985756,
0.004175257869064808,
0.01059234980493784,
0.046793513000011444,
0.006351156160235405,
-0.015084527432918549,
-0.02208653837442398,
0.07030938565731049,
0.003741354215890169,
-0.004024242050945759,
-0.017662424594163895,
0.0019121532095596194,
-0.04767833650112152,
0.0638774037361145,
-0.027259349822998047,
0.0019461847841739655,
-0.07051356881856918,
0.017628392204642296,
-0.04584062844514847,
-0.020691242069005966,
-0.03682224079966545,
-0.010566825978457928,
-0.006261823233217001,
0.03307875990867615,
0.0523747056722641,
0.008176103234291077,
0.018853532150387764,
-0.054518699645996094,
-0.0004166217986494303,
-0.017713472247123718,
-0.018411120399832726,
0.05278308317065239,
-0.0160544291138649,
0.01854724809527397,
-0.0484270341694355,
-0.03981702774763107,
-0.010107398964464664,
0.014582560397684574,
-0.01586725562810898,
0.011553743854165077,
0.0223077442497015,
-0.05046893283724785,
0.01288948580622673,
-0.01454852893948555,
-0.00785280205309391,
0.020487051457166672,
0.03964686766266823,
-0.028807789087295532,
-0.011953615583479404,
0.03062848187983036,
0.020538099110126495,
-0.003983829636126757,
-0.05394015833735466,
0.020980510860681534,
0.024485770612955093,
0.003462719963863492,
0.040531691163778305,
-0.029930833727121353,
-0.07153452187776566,
0.024672944098711014,
-0.028450457379221916,
0.0484950952231884,
0.01736464723944664,
0.04703173413872719,
0.06819941848516464,
0.0009438464767299592,
0.05394015833735466,
-0.0010028700344264507,
0.00028607851709239185,
-0.03319787234067917,
0.036652084439992905,
-0.009639464318752289,
0.006040617357939482,
-0.03988508880138397,
0.012880978174507618,
0.05710510164499283,
0.006695726420730352,
0.03920445591211319,
-0.022188633680343628,
-0.023941263556480408,
-0.019976576790213585,
0.0067808055318892,
0.005576936062425375,
0.02618735283613205,
0.033810440450906754,
-0.04522806033492088,
-0.01009038370102644,
-0.07248740643262863,
-0.03774109482765198,
0.023532884195446968,
-0.02293732948601246,
-0.002088692272081971,
0.02309047244489193,
-0.05666269361972809,
-0.03168346360325813,
0.01783258281648159,
0.023005392402410507,
-0.017849598079919815,
-0.011528220027685165,
0.06459206342697144,
0.04546628147363663,
-0.01027755718678236,
0.026017194613814354,
-0.005938522517681122,
-0.03927252069115639,
0.012064218521118164,
-0.06251613795757294,
-0.013978498987853527,
-0.047576241195201874,
0.011987647973001003,
-0.03569919615983963,
0.03289158642292023,
0.023396756500005722,
-0.03607354685664177,
0.010677428916096687,
0.08201626688241959,
-0.0425395593047142,
0.0007242359570227563,
0.03930655121803284,
0.06632767617702484,
0.016190556809306145,
-0.006823345087468624,
0.0031819590367376804,
0.026493636891245842,
-0.05945328623056412,
-0.02092946320772171,
0.0007556088967248797,
0.024485770612955093,
-0.0014952655183151364,
0.0015356780495494604,
0.032244984060525894,
-0.058126050978899,
0.002152501605451107,
-0.017347631976008415,
-0.006346902344375849,
-0.01389341987669468,
-0.035835325717926025,
-0.012523646466434002,
-0.02868867851793766,
-0.11788562685251236,
-0.0032649110071361065,
-0.012549169361591339,
-0.058432336896657944,
0.04424114152789116,
-0.01767943985760212,
0.005470587406307459,
0.06445594131946564,
0.0009677749476395547,
-0.02662976272404194,
0.03906833007931709,
-0.0002386203414062038,
0.04744011536240578,
0.0006960535538382828,
-0.030611466616392136,
0.004319892264902592,
-0.04022540524601936,
-0.010124415159225464,
-0.021882349625229836,
0.019415054470300674,
0.008822704665362835,
0.00005360649083741009,
0.003862591926008463,
-0.05441660434007645,
0.029267216101288795,
-0.005445063579827547,
0.07480155676603317,
-0.03518872335553169,
0.04189295694231987,
-0.005721570458263159,
-0.005500365048646927,
-0.07235128432512283,
-0.020538099110126495,
0.039680901914834976,
0.013595642521977425,
-0.023413773626089096,
-0.058772653341293335,
-0.030934767797589302,
0.027242332696914673,
0.018853532150387764,
0.013433992862701416,
0.030866703018546104,
0.028671663254499435,
-0.058398306369781494,
0.020793335512280464,
0.018904579803347588,
0.04396888613700867,
-0.057921864092350006,
0.031989749521017075,
-0.0967179387807846,
-0.010218001902103424,
0.029148105531930923,
-0.05383806675672531,
-0.0008486642036587,
0.08439848572015762,
0.003911512438207865,
0.049822330474853516,
0.0212697796523571,
0.0484270341694355,
0.003490370698273182,
0.049856361001729965,
0.06074649095535278,
-0.007308295927941799,
-0.01249812263995409,
0.014803766272962093,
0.03442301228642464,
0.030118007212877274,
0.04914169758558273,
0.01955118030309677,
0.036209672689437866,
-0.09351896494626999,
-0.04897154122591019,
-0.01037114392966032,
-0.04689560830593109,
-0.001083163544535637,
0.014990940690040588,
0.009954256936907768,
-0.019704323261976242,
0.05615221709012985,
-0.017764519900083542,
-0.0601339191198349,
0.030798640102148056,
0.006385187618434429,
0.03372536227107048,
0.019074738025665283,
-0.005308936815708876,
-0.03263634815812111,
-0.031836606562137604,
0.06918633729219437,
-0.06050826981663704,
0.08991160988807678,
0.028739726170897484,
-0.0242475476115942,
-0.027208302170038223,
-0.01924489624798298,
-0.005130270961672068,
0.05673075467348099,
0.03069654479622841,
-0.005457825493067503,
-0.05809202045202255,
-0.05768364295363426,
0.009180036373436451,
0.011281491257250309,
0.042131178081035614,
-0.00930765550583601,
-0.018785469233989716,
0.01029457338154316,
0.001266615348868072,
-0.009741558693349361,
-0.01613950915634632,
-0.012676788493990898,
0.015305733308196068,
0.015297225676476955,
0.0621417872607708,
-0.01661595143377781,
-0.026119288057088852,
-0.049107667058706284,
-0.035052597522735596,
-0.012574693188071251,
0.08181207627058029,
0.015816207975149155,
-0.015084527432918549,
-0.019483117386698723,
0.03226200118660927,
-0.025915099307894707,
-0.017313599586486816,
0.026136305183172226,
0.04349244385957718,
0.0542464442551136,
-0.022920314222574234,
-0.06547688692808151,
-0.021729206666350365,
-0.02309047244489193,
0.002409866079688072,
0.022256696596741676,
-0.08848228305578232,
0.00033845537109300494,
-0.012617233209311962,
-0.028705693781375885,
0.020453019067645073,
0.0561181865632534,
0.03808141127228737,
0.022579997777938843,
0.04070185124874115,
-0.03637982904911041,
0.03716255724430084,
-0.010524286888539791,
-0.007550771813839674,
0.053667906671762466,
0.018070803955197334,
-0.020657209679484367,
-0.02421351708471775,
0.07561831921339035,
0.0016016144072636962,
0.004407098051160574,
0.01827499456703663,
0.03842172771692276,
-0.00518557196483016,
-0.024638911709189415,
-0.037809159606695175,
-0.007040297146886587,
-0.03634579852223396,
0.02630646340548992,
-0.0602019838988781,
-0.03234707936644554,
0.02596614696085453,
-0.002901197876781225,
0.0661575198173523,
0.011485680937767029,
0.034150756895542145,
0.005479095038026571
] |
52,331 |
pgeocode
|
_fuzzy_search
| null |
def _fuzzy_search(self, text: str, col: str, threshold: float = 80) -> pd.DataFrame:
try:
# thefuzz is not required to install pgeocode,
# it is an optional dependency for enabling fuzzy search
from thefuzz import fuzz
except ModuleNotFoundError as err:
raise ModuleNotFoundError(
"Cannot use fuzzy search without 'thefuzz' package. "
"It can be installed with: pip install thefuzz[speedup]"
) from err
fuzzy_scores = self._data[col].apply(lambda x: fuzz.ratio(str(x), text))
return self._data[fuzzy_scores >= threshold]
|
(self, text: str, col: str, threshold: float = 80) -> pandas.core.frame.DataFrame
|
[
0.06645730137825012,
-0.03950158879160881,
0.05383973568677902,
0.03157976642251015,
0.021256299689412117,
-0.007621620316058397,
0.012545877136290073,
0.0254322849214077,
0.023604171350598335,
-0.0381394661962986,
0.006604508031159639,
0.02050354704260826,
-0.08122558891773224,
-0.04118632152676582,
0.004411220084875822,
0.014382951892912388,
0.01787787489593029,
0.009902281686663628,
0.001885242061689496,
-0.02147137187421322,
0.024769145995378494,
-0.01410515047609806,
-0.006299822591245174,
0.05953914672136307,
0.013280706480145454,
-0.025736970826983452,
-0.06125972419977188,
-0.00382201187312603,
0.029733728617429733,
-0.031418461352586746,
-0.020091325044631958,
-0.04161646589636803,
-0.04362380504608154,
-0.020754465833306313,
-0.07265855371952057,
-0.04129385948181152,
0.06656483560800552,
-0.0512588694691658,
0.052800219506025314,
-0.05979006364941597,
-0.04728003218770027,
-0.03989588841795921,
-0.020844077691435814,
0.007957670837640762,
-0.006089230999350548,
0.01470556017011404,
-0.025969965383410454,
-0.036203816533088684,
0.008096571080386639,
0.018603743985295296,
-0.04093540459871292,
-0.03471623361110687,
0.008257875218987465,
0.03315696120262146,
0.05011181905865669,
0.03217121213674545,
-0.04061279445886612,
0.044018104672431946,
0.02018093876540661,
-0.028998898342251778,
0.015108820050954819,
-0.007034652400761843,
-0.004606129135936499,
0.016327563673257828,
-0.032386284321546555,
0.025952043011784554,
0.012949137017130852,
0.003931788261979818,
-0.027170784771442413,
-0.03555859997868538,
-0.021310068666934967,
0.016910050064325333,
0.03709995001554489,
0.04233337193727493,
-0.016193142160773277,
0.019428186118602753,
0.011345057748258114,
-0.017035508528351784,
0.041580621153116226,
-0.006501452531665564,
0.025844506919384003,
-0.013047711923718452,
0.009812667965888977,
-0.04627636447548866,
0.00731245381757617,
-0.04229752719402313,
-0.00476295268163085,
0.0066134692169725895,
0.08065206557512283,
0.013934885151684284,
-0.01672186143696308,
0.011891699396073818,
0.027726387605071068,
-0.02021678537130356,
0.06018436327576637,
-0.014678675681352615,
0.04100709408521652,
0.04978920891880989,
0.028980975970625877,
0.04204661026597023,
-0.017358116805553436,
0.08796451985836029,
0.04953829199075699,
0.0378885492682457,
0.024643687531352043,
-0.019804563373327255,
-0.03724333271384239,
-0.05344543606042862,
-0.011595974676311016,
0.024500304833054543,
-0.08151235431432724,
-0.009310833178460598,
-0.013818386942148209,
-0.020019635558128357,
0.03475207835435867,
-0.04226168245077133,
-0.0635538250207901,
-0.02018093876540661,
-0.004745029844343662,
-0.01676666922867298,
0.04573868215084076,
0.009436291642487049,
-0.014284376986324787,
-0.03942989930510521,
-0.01155116781592369,
0.027421701699495316,
-0.005614279769361019,
-0.045129310339689255,
-0.005986175499856472,
0.017259541898965836,
-0.022026974707841873,
0.04161646589636803,
-0.0016522471560165286,
-0.02679440937936306,
-0.010287619195878506,
0.05197577551007271,
0.050470270216464996,
0.028514986857771873,
0.022080743685364723,
0.01770760864019394,
0.03543313965201378,
0.0048346430994570255,
-0.008544638752937317,
-0.051724858582019806,
0.03195613995194435,
0.025020062923431396,
-0.03055817261338234,
0.013737735338509083,
-0.002300824271515012,
-0.036418888717889786,
-0.03401724994182587,
-0.051223024725914,
-0.003839934477582574,
-0.03319280594587326,
0.041437238454818726,
-0.0033582623582333326,
0.022385429590940475,
-0.021112918853759766,
0.052907753735780716,
0.006976403761655092,
0.04720834270119667,
-0.03455492854118347,
-0.05358881875872612,
0.000846846669446677,
0.012196384370326996,
0.020772388204932213,
-0.0008877328364178538,
-0.019750794395804405,
-0.03043271228671074,
0.009185373783111572,
-0.0003184076340403408,
0.017447730526328087,
-0.029877109453082085,
0.01923103630542755,
-0.06753266602754593,
0.004758472088724375,
-0.014660753309726715,
0.029662037268280983,
0.042476754635572433,
0.0025853468105196953,
-0.0029034744948148727,
-0.006922635715454817,
-0.04692158102989197,
-0.007921825163066387,
0.051581475883722305,
-0.0046419743448495865,
0.021363835781812668,
0.03528976067900658,
-0.023532480001449585,
0.028425373136997223,
-0.04627636447548866,
-0.07165487855672836,
0.038247000426054,
0.011784163303673267,
-0.03039686754345894,
-0.02277972735464573,
-0.014777250587940216,
0.02410600706934929,
-0.03446531668305397,
-0.02401639334857464,
-0.001492063282057643,
-0.03043271228671074,
0.04089955985546112,
0.0033851463813334703,
-0.031167542561888695,
-0.026328418403863907,
-0.015834689140319824,
0.025683201849460602,
-0.04233337193727493,
-0.05584707483649254,
-0.009274987503886223,
-0.05222669243812561,
-0.005291671492159367,
-0.01777929998934269,
0.012563799507915974,
0.010359309613704681,
0.009409408085048199,
-0.054126497358083725,
0.024625765159726143,
0.006918155122548342,
0.016865244135260582,
-0.017304349690675735,
-0.00885380432009697,
0.002368034329265356,
0.007675388362258673,
0.012169500812888145,
0.003839934477582574,
0.02788769267499447,
0.03928651660680771,
-0.08681746572256088,
0.015870533883571625,
-0.018290096893906593,
0.01661432534456253,
-0.09807291626930237,
-0.010404116474092007,
-0.0379243940114975,
0.06548947840929031,
0.056635674089193344,
0.042871054261922836,
-0.053983114659786224,
0.04197492077946663,
-0.012151578441262245,
0.02679440937936306,
0.05520185828208923,
-0.00083172443555668,
-0.04735172539949417,
-0.009758899919688702,
-0.0769241452217102,
0.035092610865831375,
-0.02534267120063305,
-0.01013527624309063,
-0.05448495224118233,
-0.014956478029489517,
-0.042763516306877136,
0.0511513315141201,
-0.1143467053771019,
-0.03272681683301926,
0.028980975970625877,
-0.007487200200557709,
0.060578662902116776,
0.01150636188685894,
-0.008652174845337868,
0.045236848294734955,
0.018603743985295296,
-0.02924981527030468,
0.010493730194866657,
-0.06538194417953491,
0.0010809616651386023,
0.002343390602618456,
0.002522617345675826,
-0.07419990003108978,
0.02039601095020771,
0.030934548005461693,
-0.015556887723505497,
-0.04835539311170578,
0.011685588397085667,
-0.0509721077978611,
-0.02668687328696251,
-0.03537937253713608,
-0.029751650989055634,
-0.013379281386733055,
-0.05857132375240326,
0.02917812578380108,
-0.037386711686849594,
0.04000342637300491,
-0.001872920198366046,
-0.04290689900517464,
-0.003907144535332918,
0.02672271803021431,
-0.03731502220034599,
-0.05832040682435036,
-0.05720919743180275,
0.004153581336140633,
0.00759473629295826,
-0.027475470677018166,
0.04738757014274597,
0.06581208854913712,
-0.05495094135403633,
0.023353254422545433,
-0.08430829644203186,
0.03459077328443527,
-0.034895461052656174,
0.020664852112531662,
0.077067531645298,
-0.011873776093125343,
0.03649057820439339,
-0.04168815538287163,
0.025969965383410454,
-0.04595375433564186,
-0.06677991151809692,
-0.007307973224669695,
-0.05842794105410576,
0.0035240473225712776,
-0.05183239281177521,
-0.028281990438699722,
-0.02942904271185398,
0.005193097051233053,
-0.015987031161785126,
-0.03588120639324188,
-0.014176840893924236,
0.013701889663934708,
-0.06624223291873932,
0.03211744502186775,
-0.02923189289867878,
0.04111463204026222,
-0.0042006284929811954,
0.024930449202656746,
-0.0638047456741333,
0.023460790514945984,
0.020073402673006058,
0.05477171391248703,
0.06835711002349854,
0.08552703261375427,
-0.041580621153116226,
0.009082319214940071,
0.03543313965201378,
0.01402449794113636,
0.022170357406139374,
0.008956859819591045,
0.018782969564199448,
-0.022690115496516228,
-0.009248103946447372,
0.012895368970930576,
-0.026382187381386757,
0.07043613493442535,
-0.0002635194396134466,
-0.03559444472193718,
-0.031328845769166946,
0.04319366067647934,
-0.07068705558776855,
0.05315867438912392,
-0.037386711686849594,
-0.027188707143068314,
0.040254343301057816,
0.03459077328443527,
0.04946660250425339,
-0.01898011937737465,
0.05462833121418953,
0.003176795318722725,
-0.012241191230714321,
0.057926107197999954,
-0.060686200857162476,
-0.005820390768349171,
-0.01647094450891018,
-0.03742256015539169,
0.03477000072598457,
0.003656226908788085,
0.09792952984571457,
-0.003934028558433056,
0.012984982691705227,
0.025181367993354797,
-0.008069687522947788,
0.011112062260508537,
0.056528136134147644,
0.00675237039104104,
-0.0383545383810997,
-0.02681233175098896,
0.011739356443285942,
-0.0010311142541468143,
0.03957328200340271,
0.03177691251039505,
0.011640781536698341,
-0.01659640297293663,
-0.03075532056391239,
0.01915934681892395,
-0.03202783316373825,
-0.008410218171775341,
-0.02313818223774433,
0.02674064040184021,
0.005609799176454544,
-0.02665102668106556,
-0.011076217517256737,
-0.02286934107542038,
0.054054807871580124,
0.002630153438076377,
0.02550397627055645,
0.0008289240067824721,
0.023550404235720634,
-0.019786641001701355,
0.04072033241391182,
0.00640287809073925,
-0.045201003551483154,
-0.05004012584686279,
-0.024876682087779045,
-0.0070660170167684555,
0.09957841783761978,
0.03442947193980217,
-0.033945560455322266,
-0.0036159008741378784,
0.057926107197999954,
-0.060722045600414276,
0.020682774484157562,
0.009024069644510746,
-0.011147907935082912,
-0.06706667691469193,
-0.023604171350598335,
-0.01901596412062645,
-0.012357688508927822,
-0.0192489605396986,
-0.01402449794113636,
0.05846378579735756,
-0.0890398845076561,
0.0014125313609838486,
0.0013744456227868795,
0.018747124820947647,
0.05735258013010025,
-0.0190518107265234,
-0.0384620726108551,
0.009266026318073273,
-0.038067776709795,
-0.017169928178191185,
0.006237093359231949,
-0.06143895164132118,
-0.04082786664366722,
0.01139882579445839,
0.022672191262245178,
-0.04301443696022034,
-0.042476754635572433,
-0.0003702153917402029,
-0.015001283958554268,
0.03989588841795921,
-0.028299914672970772,
0.019392341375350952,
0.040146805346012115,
-0.007034652400761843,
-0.04129385948181152,
0.02813860960304737,
-0.00300204916857183,
-0.05484340339899063,
-0.022636346518993378,
0.04706496000289917,
-0.022600501775741577,
0.02308441326022148,
0.08638732135295868,
0.03600666671991348,
0.029841264709830284,
-0.004563562572002411,
0.03224290534853935,
-0.02426731027662754,
0.04674235358834267,
-0.012931214645504951,
0.03709995001554489,
-0.012518992647528648,
-0.039035599678754807,
0.003250726265832782,
0.051581475883722305,
-0.004256636835634708,
-0.0379602387547493,
-0.003857857082039118,
-0.046706508845090866,
0.014123072847723961,
-0.03699241578578949,
-0.06004098430275917,
-0.04839124158024788,
0.04000342637300491,
0.022385429590940475,
-0.05692243576049805,
0.029088512063026428,
0.05448495224118233,
0.05330205336213112,
-0.0033067346084862947,
-0.016175219789147377,
-0.030307253822684288,
-0.006196767091751099,
-0.022439196705818176,
-0.04183153808116913,
0.0028967533726245165,
-0.03468038886785507,
-0.011461555026471615,
-0.06531025469303131,
-0.0022683392744511366,
0.044125642627477646,
0.052979446947574615,
0.003766003530472517,
-0.02274388261139393,
0.05369635298848152,
-0.0036875917576253414,
0.03649057820439339,
-0.010305541567504406,
0.018316980451345444,
0.014230608940124512,
0.018308019265532494,
-0.10753608494997025,
0.03209952265024185,
-0.025109676644206047,
-0.03917898237705231,
0.028264068067073822,
-0.007097381632775068,
-0.006093711592257023,
0.007984554395079613,
0.020073402673006058,
0.0033403397537767887,
-0.060722045600414276,
-0.010000856593251228,
-0.0027376895304769278,
0.009463176131248474,
-0.01673978380858898,
-0.06789112091064453,
-0.07455835491418839,
-0.0013856473378837109,
-0.03459077328443527,
0.0891115739941597,
-0.027296243235468864,
-0.06688744574785233,
0.05197577551007271,
-0.023622093722224236,
0.07190579921007156,
0.016103528439998627,
0.03528976067900658,
-0.0384262278676033,
0.01798541098833084,
0.0003416511171963066,
0.03156184032559395,
-0.013137325644493103,
0.06842879951000214,
0.0380319282412529,
0.0013576431665569544,
-0.017528383061289787,
0.06796281039714813,
-0.000159763905685395,
-0.032690972089767456,
0.0056187608279287815,
0.009884358383715153,
0.005717335268855095,
0.022708037868142128,
-0.01673978380858898,
-0.038533765822649,
-0.03417855501174927,
-0.03061193972826004,
0.07183410972356796,
0.023407021537423134,
-0.042476754635572433,
0.02691986784338951,
0.009418369270861149,
-0.00349716329947114,
0.1152786836028099,
-0.009136087261140347,
0.020001713186502457,
-0.01152428425848484,
-0.015467274002730846,
0.02812068723142147,
-0.01460698526352644,
0.07799950987100601,
0.04426902160048485,
-0.023586248978972435,
-0.012949137017130852,
0.011837931349873543,
0.08660239726305008,
-0.05885808542370796,
-0.07341130077838898,
0.010896990075707436,
0.056528136134147644,
0.0189084280282259,
0.006483530160039663,
0.017259541898965836,
0.0006793816573917866,
-0.004709184635430574,
-0.05520185828208923,
0.002941560000181198,
0.003965393174439669,
-0.02025263011455536,
-0.008620809763669968,
0.014759328216314316,
0.02181190252304077,
-0.04932321980595589,
-0.03177691251039505,
0.04441240429878235,
0.034931305795907974,
-0.08079544454813004,
-0.036239661276340485,
0.02285141870379448,
-0.013594353571534157,
0.01643509976565838,
0.01655159704387188,
-0.012169500812888145,
0.000906215573195368,
-0.0640915110707283,
-0.011452593840658665,
0.03543313965201378,
-0.024894604459404945,
-0.012321843765676022,
0.00664483429864049,
-0.061976633965969086,
-0.08638732135295868,
0.012348727323114872,
0.03946574404835701,
0.012518992647528648,
-0.008764191530644894,
-0.02695571258664131,
-0.009239141829311848,
-0.008607367984950542,
0.014669714495539665,
-0.008087609894573689,
-0.02174021303653717,
-0.004529957659542561,
0.000986867700703442,
-0.014741405844688416,
0.03670565038919449,
0.000989668071269989,
0.03975250571966171,
0.013648121617734432,
-0.006286380346864462,
0.036383043974637985,
0.06921739876270294,
0.07749767601490021,
0.037601783871650696,
0.0057352581061422825,
-0.023263640701770782,
-0.014185802079737186,
-0.004279040265828371,
-0.018164638429880142,
0.010431000962853432,
0.01768968626856804,
0.03163353353738785,
-0.05950330197811127,
0.05695828050374985,
-0.005968253128230572,
0.0011134465457871556,
0.004897372797131538,
-0.016927972435951233,
-0.029877109453082085,
0.01797644980251789,
0.02021678537130356,
-0.01469659898430109,
0.006591066252440214,
-0.028676290065050125,
-0.009212258271872997,
-0.02297687716782093,
0.027403779327869415,
-0.024500304833054543,
-0.004173744469881058,
0.013146286830306053,
0.027726387605071068,
0.02688402123749256,
-0.010009817779064178,
-0.046455591917037964,
-0.03688487783074379,
0.020091325044631958,
-0.0036741497460752726,
0.025934120640158653,
-0.030343100428581238,
0.01657848060131073,
0.04846293106675148,
0.006326706614345312,
0.04348042607307434,
0.04244090989232063,
0.09054538607597351,
-0.04749510437250137,
-0.021417604759335518,
0.08330462127923965,
0.019947944208979607,
0.07964839786291122,
-0.014132034033536911,
0.004330568015575409,
0.019643258303403854,
0.06738927960395813,
-0.0035173262003809214,
-0.009346677921712399,
-0.043982259929180145,
0.019894177094101906,
0.03695656731724739,
0.02426731027662754,
-0.03166937828063965,
0.061761561781167984,
0.04978920891880989,
0.10775116086006165,
-0.02804899588227272,
0.002923637395724654,
0.017071353271603584,
-0.03579159453511238,
-0.024661609902977943,
-0.004592686891555786,
0.03571990504860878,
-0.027260398492217064,
0.038067776709795,
0.03401724994182587,
-0.03717163950204849,
-0.02147137187421322,
0.076494000852108,
-0.01152428425848484,
0.041222166270017624,
0.05520185828208923,
0.0012456263648346066,
-0.02028847485780716,
0.024554073810577393,
-0.02030639722943306,
0.005125886760652065,
0.05366050824522972,
-0.03195613995194435,
-0.03521806746721268,
0.006559701170772314,
-0.0005665247444994748,
-0.0061922864988446236,
0.035056766122579575,
-0.0028340239077806473,
0.01806606352329254,
0.02179398015141487,
0.009749938733875751,
0.00017404604295734316,
-0.04072033241391182,
0.06878725439310074,
0.022313738241791725,
0.0381753109395504,
0.029644114896655083,
-0.012518992647528648,
0.018765047192573547,
-0.0190697330981493,
-0.0004648695467039943,
-0.01777929998934269,
-0.0020387049298733473,
-0.018549975007772446,
0.023209871724247932,
0.022618424147367477,
0.05749596282839775,
-0.06652899086475372,
-0.02937527559697628,
0.013191093690693378,
-0.044018104672431946,
-0.01013527624309063,
0.02168644405901432,
0.009185373783111572,
0.036078356206417084,
-0.022600501775741577,
-0.0030110105872154236,
0.03326449543237686,
0.050075970590114594,
0.0056187608279287815,
0.01665913313627243,
-0.03559444472193718,
0.046563126146793365,
0.011595974676311016,
-0.0016007195226848125,
0.03032517619431019,
0.07871641963720322,
-0.04236922040581703,
0.057961951941251755,
0.014759328216314316,
-0.030253486707806587,
-0.01283263973891735,
-0.009848513640463352,
-0.04448409378528595,
0.010484769009053707,
-0.0641273558139801,
-0.005255826283246279,
-0.008307162672281265,
-0.017134083434939384,
-0.0096424026414752,
0.10280449688434601
] |
52,332 |
pgeocode
|
_get_data
|
Load the data from disk; otherwise download and save it
|
@staticmethod
def _get_data(country: str) -> tuple[str, pd.DataFrame]:
"""Load the data from disk; otherwise download and save it"""
data_path = os.path.join(STORAGE_DIR, country.upper() + ".txt")
if os.path.exists(data_path):
data = pd.read_csv(
data_path,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
download_urls = [val.format(country=country) for val in DOWNLOAD_URL]
with _open_extract_cycle_url(download_urls, country) as fh:
data = pd.read_csv(
fh,
sep="\t",
header=None,
names=DATA_FIELDS,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
os.makedirs(STORAGE_DIR, exist_ok=True)
data.to_csv(data_path, index=None)
return data_path, data
|
(country: str) -> tuple[str, pandas.core.frame.DataFrame]
|
[
0.0128767816349864,
-0.03205596283078194,
-0.0501566119492054,
0.03139946237206459,
-0.02545344829559326,
-0.04955638200044632,
-0.011995195411145687,
-0.023315133526921272,
0.05225741118192673,
-0.04963140934705734,
0.0424661822617054,
0.0008897921652533114,
-0.03839588165283203,
0.013739610090851784,
0.018231946974992752,
-0.0026752380654215813,
-0.0588599257171154,
0.05972275510430336,
-0.021983375772833824,
0.012445366941392422,
-0.021758290007710457,
-0.020145175978541374,
-0.040778037160634995,
0.018597710877656937,
-0.009167555719614029,
0.07078947126865387,
0.022883718833327293,
-0.026410063728690147,
0.0017502763075754046,
0.03237483650445938,
0.08028058707714081,
-0.005144147668033838,
-0.07787967473268509,
0.035225920379161835,
-0.0578470416367054,
0.031980935484170914,
0.04794326797127724,
-0.002312990603968501,
-0.08395698666572571,
0.007690430153161287,
-0.05994784086942673,
-0.05946015566587448,
0.03335020691156387,
-0.029636291787028313,
-0.033856648951768875,
-0.045429810881614685,
-0.09138482064008713,
-0.11179259419441223,
0.015530917793512344,
-0.06718809902667999,
-0.016140524297952652,
0.028135720640420914,
0.010475866496562958,
0.013936560600996017,
0.018935339525341988,
0.005791269242763519,
-0.02498451992869377,
0.11359328031539917,
0.002661170205101371,
0.05233243852853775,
0.0017362084472551942,
-0.025697290897369385,
0.025153333321213722,
0.030011435970664024,
-0.016937702894210815,
0.05503346771001816,
0.01602798141539097,
-0.04587998241186142,
0.017331603914499283,
0.023934120312333107,
0.03209348022937775,
0.028248263522982597,
-0.0424661822617054,
0.02912984974682331,
0.007831108756363392,
0.00916286651045084,
-0.007033930160105228,
-0.045392297208309174,
0.016862675547599792,
0.008454783819615841,
-0.02481570467352867,
-0.05071932449936867,
0.035732366144657135,
-0.009969423525035381,
0.04738055169582367,
-0.032749976962804794,
0.08403202146291733,
0.00839382316917181,
-0.0012379717081785202,
0.10211391001939774,
-0.030780477449297905,
-0.020857946947216988,
-0.0046025351621210575,
0.017416011542081833,
0.02003263309597969,
-0.08005550503730774,
0.006447769235819578,
0.05131955444812775,
-0.029580021277070045,
-0.027648035436868668,
0.00798585545271635,
0.0034044221974909306,
0.019169803708791733,
0.00037514293217100203,
-0.008309416472911835,
-0.05627144128084183,
0.05071932449936867,
0.019282346591353416,
-0.025565991178154945,
-0.04134075343608856,
-0.09378573298454285,
-0.021551961079239845,
0.005242622457444668,
0.020745404064655304,
0.01798810437321663,
0.02170201949775219,
-0.00454860832542181,
0.02380281873047352,
-0.08223133534193039,
-0.0039554135873913765,
-0.04242866486310959,
0.07735447585582733,
-0.09288538992404938,
0.03471947833895683,
0.02798566408455372,
0.007559130433946848,
0.06328661739826202,
-0.040177807211875916,
0.030180249363183975,
0.05011909827589989,
0.0755537897348404,
0.01811002567410469,
0.004574399441480637,
-0.013280060142278671,
0.007254326716065407,
-0.0232401043176651,
0.08433213084936142,
0.053757984191179276,
0.032281048595905304,
0.0006418460980057716,
-0.011507509276270866,
-0.05934761464595795,
0.016468774527311325,
-0.002506423741579056,
0.08110590279102325,
0.020145175978541374,
0.022564847022294998,
-0.02836080640554428,
-0.0377768948674202,
0.005336408503353596,
0.03601372241973877,
0.01080411672592163,
-0.06827601790428162,
-0.040477924048900604,
0.014152267016470432,
-0.07915516197681427,
-0.021983375772833824,
0.012548531405627728,
-0.014752496033906937,
0.005538047756999731,
-0.008806480094790459,
0.015427753329277039,
-0.01990133337676525,
0.01399283204227686,
-0.01768798939883709,
0.04160335287451744,
0.010072587989270687,
-0.03747677803039551,
0.042053524404764175,
-0.04332900792360306,
0.025265876203775406,
0.03670773655176163,
-0.025134576484560966,
-0.015587189234793186,
-0.03383789211511612,
0.02524711936712265,
0.04768066853284836,
-0.022058404982089996,
0.06043552607297897,
0.0073387338779866695,
-0.030480364337563515,
-0.023652762174606323,
-0.06741318851709366,
0.05323278158903122,
0.050981923937797546,
0.021626990288496017,
0.021795805543661118,
-0.04336652532219887,
0.05638398230075836,
0.06306152790784836,
0.0019800513982772827,
-0.01223903801292181,
-0.02400914765894413,
-0.003695158055052161,
0.033425234258174896,
-0.0986625924706459,
0.02836080640554428,
0.010438351891934872,
-0.08808356523513794,
-0.0012614181032404304,
0.015221424400806427,
0.010194509290158749,
0.04955638200044632,
0.0028956346213817596,
-0.03916492313146591,
0.02682271972298622,
-0.037401750683784485,
0.031455736607313156,
-0.09311047941446304,
0.053082726895809174,
0.037401750683784485,
-0.019244832918047905,
-0.013167517259716988,
-0.012651695869863033,
0.01952618919312954,
-0.0428038090467453,
-0.03704536706209183,
-0.001242661033757031,
0.037232935428619385,
-0.00942077673971653,
0.03605123609304428,
-0.0494813546538353,
-0.024553105235099792,
0.010072587989270687,
0.10113853961229324,
-0.07071444392204285,
-0.01628120429813862,
0.04194097965955734,
-0.027366677299141884,
-0.046930380165576935,
-0.029354935511946678,
-0.028304534032940865,
0.015052610076963902,
-0.050981923937797546,
0.044829580932855606,
-0.03935249522328377,
0.03387540578842163,
-0.01068219542503357,
0.03625756502151489,
-0.012379717081785202,
0.016862675547599792,
-0.03798322379589081,
0.011807624250650406,
-0.033425234258174896,
-0.030724206939339638,
-0.029036063700914383,
0.005523979663848877,
0.01563408225774765,
0.002274304162710905,
-0.06103575602173805,
0.03318139165639877,
0.012154631316661835,
-0.012276552617549896,
-0.008445405401289463,
0.010635302402079105,
-0.05608386918902397,
-0.0003024589968845248,
-0.010963552631437778,
0.034194279462099075,
-0.05660906806588173,
0.024496834725141525,
0.011685702949762344,
-0.006283644121140242,
-0.0003686951822601259,
-0.05503346771001816,
-0.020726647228002548,
-0.00956614501774311,
-0.038602206856012344,
0.0030878952238708735,
-0.009856880642473698,
0.0016705583548173308,
0.11051710695028305,
-0.012145252898335457,
-0.02618497796356678,
-0.021927105262875557,
-0.02899855002760887,
0.05086938291788101,
-0.02905482053756714,
-0.0005609559011645615,
0.02776057831943035,
0.0012379717081785202,
-0.010513381101191044,
-0.009580212645232677,
-0.047568123787641525,
-0.011460617184638977,
-0.018260082229971886,
-0.01832573302090168,
-0.03875226527452469,
0.0070057944394648075,
0.0025697292294353247,
-0.01238909550011158,
0.012229659594595432,
-0.006100762169808149,
0.05443324148654938,
0.008740830235183239,
0.021083032712340355,
0.04392923787236214,
-0.046330153942108154,
0.04993152618408203,
0.004168775863945484,
-0.06940144300460815,
-0.0070057944394648075,
0.12469751387834549,
0.016459396108984947,
-0.0057303085923194885,
-0.02528463490307331,
-0.006944833789020777,
-0.034025464206933975,
-0.01618741825222969,
-0.01755668967962265,
0.00588505482301116,
-0.03063042089343071,
0.08755835890769958,
0.022883718833327293,
0.001758482540026307,
-0.05176972597837448,
-0.02858589217066765,
0.07296530157327652,
-0.026241248473525047,
0.003915554378181696,
-0.0249094907194376,
0.0059975977055728436,
0.010053831152617931,
-0.012426610104739666,
0.047268010675907135,
0.008356308564543724,
0.06028547137975693,
0.0050644297152757645,
0.05289515480399132,
0.037833165377378464,
0.005008158273994923,
-0.0076998090371489525,
0.009725580923259258,
0.050381697714328766,
0.08028058707714081,
0.024159206077456474,
-0.025359662249684334,
-0.0799054428935051,
0.05668409913778305,
-0.0060679372400045395,
0.0009753716294653714,
-0.012464123778045177,
-0.02614746242761612,
0.008159358985722065,
0.06966404616832733,
-0.019657490774989128,
0.019000990316271782,
-0.017997482791543007,
0.0013012770796194673,
0.01313938107341528,
0.010588409379124641,
0.03151200711727142,
-0.054395727813243866,
0.0541706420481205,
0.04044041037559509,
0.01960121840238571,
-0.021045519039034843,
0.016290582716464996,
0.01541837491095066,
0.01973251812160015,
0.07416576147079468,
-0.002090249676257372,
0.0025439381133764982,
0.030048949643969536,
0.04032786563038826,
-0.018231946974992752,
-0.005777201149612665,
0.09521127492189407,
-0.030517878010869026,
-0.0002716855378821492,
-0.026897748932242393,
0.00792489480227232,
0.04719298332929611,
0.00416643125936389,
-0.008815859444439411,
0.005406747572124004,
0.010344566777348518,
0.018269460648298264,
-0.04704292491078377,
0.02789187803864479,
-0.021083032712340355,
-0.027873121201992035,
0.005252001341432333,
-0.0004627739835996181,
0.06865115463733673,
-0.0417909249663353,
0.015952954068779945,
0.028979791328310966,
-0.012576666660606861,
-0.0219083484262228,
0.013533281162381172,
-0.0016529735876247287,
0.02113930508494377,
-0.0015556708676740527,
0.03591993823647499,
-0.01874776929616928,
-0.007812351919710636,
-0.003969481214880943,
0.0250783059746027,
0.044454436749219894,
-0.03732672333717346,
-0.03156827762722969,
-0.03995272144675255,
0.025003276765346527,
-0.05968524143099785,
0.04963140934705734,
0.04036537930369377,
-0.057134270668029785,
0.0021324532572180033,
-0.023333890363574028,
0.010513381101191044,
0.017753640189766884,
0.0765666738152504,
-0.008018679916858673,
-0.012492259964346886,
0.07063941657543182,
-0.030874263495206833,
0.029411206021904945,
0.04861852526664734,
0.024084176868200302,
0.013795881532132626,
-0.02029523253440857,
-0.019282346591353416,
0.022414790466427803,
0.056158896535634995,
-0.0010017488384619355,
-0.002308301394805312,
-0.013505145907402039,
0.00777483731508255,
0.006133587099611759,
-0.008360998705029488,
-0.0289235208183527,
-0.08163110166788101,
-0.02956126444041729,
0.042053524404764175,
0.0377768948674202,
0.011695081368088722,
-0.00935512688010931,
0.053120240569114685,
-0.007390316110104322,
-0.01198581699281931,
-0.00015064333274494857,
0.00984750222414732,
-0.04055295139551163,
-0.054395727813243866,
-0.06940144300460815,
-0.049743954092264175,
-0.04760563746094704,
-0.006583758629858494,
-0.05229492485523224,
-0.012332824058830738,
0.007577887270599604,
0.03083674982190132,
-0.014724360778927803,
-0.025791076943278313,
0.03216850757598877,
0.029073577374219894,
-0.02588486298918724,
-0.024853220209479332,
0.005186351016163826,
0.005800647661089897,
0.005111322738230228,
0.09633670747280121,
-0.03458818048238754,
0.07067693024873734,
-0.03571360930800438,
-0.03006770648062229,
-0.03096804954111576,
0.009903773665428162,
-0.04182843863964081,
-0.061448413878679276,
0.0038334918208420277,
-0.03601372241973877,
-0.023033777251839638,
-0.0022602363023906946,
-0.005430194083601236,
-0.023821577429771423,
-0.009397330693900585,
-0.020520318299531937,
-0.06227372959256172,
0.011029202491044998,
-0.020182689651846886,
0.027741819620132446,
0.015643460676074028,
-0.010625923983752728,
-0.03515089303255081,
0.007727944757789373,
0.02567853406071663,
-0.03575112298130989,
-0.030517878010869026,
-0.014564924873411655,
0.04985649511218071,
-0.012201524339616299,
-0.026128705590963364,
0.0007467688992619514,
0.054358210414648056,
0.03848966583609581,
0.01729409024119377,
0.04430438205599785,
-0.05574624240398407,
0.02999267727136612,
-0.013655203394591808,
0.023521462455391884,
-0.023390162736177444,
0.004980022553354502,
0.0015205012168735266,
0.0005008744192309678,
-0.017547311261296272,
-0.016890810802578926,
-0.002457186346873641,
-0.04704292491078377,
-0.00009297976066591218,
-0.0011893203482031822,
-0.0011887341970577836,
-0.01315813884139061,
0.052782610058784485,
-0.007765458896756172,
0.0015369136817753315,
-0.07536621391773224,
0.05814715474843979,
-0.001872197724878788,
0.05567121133208275,
0.06156095489859581,
-0.016825160011649132,
-0.0076763625256717205,
0.016900189220905304,
-0.0031793364323675632,
-0.01294243149459362,
-0.03644513711333275,
0.0011283595813438296,
-0.05225741118192673,
-0.034494392573833466,
0.05664658546447754,
0.0027221308555454016,
0.05176972597837448,
-0.044529467821121216,
-0.010222645476460457,
-0.03246862068772316,
-0.01148875243961811,
-0.0009542698389850557,
-0.013655203394591808,
-0.04741806909441948,
-0.019845061004161835,
-0.057434383779764175,
-0.013242545537650585,
-0.0551835261285305,
0.023465190082788467,
0.05578375607728958,
0.0461425818502903,
0.02213343419134617,
0.046367667615413666,
-0.034663207828998566,
0.05357041209936142,
-0.01563408225774765,
0.032749976962804794,
0.02781684882938862,
-0.05240746960043907,
0.033125121146440506,
0.00033293935121037066,
-0.05045672506093979,
0.01040083821862936,
-0.0722150132060051,
-0.08088082075119019,
0.02699153497815132,
-0.006185169331729412,
0.004834654740989208,
-0.021720776334404945,
0.03824582323431969,
-0.03166206553578377,
-0.07968036085367203,
0.02584734931588173,
0.02605367638170719,
0.027066562324762344,
-0.011591916903853416,
-0.004016374237835407,
-0.045729923993349075,
-0.02682271972298622,
-0.047305524349212646,
0.036032479256391525,
-0.016468774527311325,
0.019376132637262344,
0.045092180371284485,
0.02067037671804428,
0.01897285506129265,
-0.01738787442445755,
0.019788790494203568,
-0.0016295271925628185,
-0.030724206939339638,
0.047530610114336014,
-0.040140293538570404,
0.006372740492224693,
0.01223903801292181,
0.023652762174606323,
-0.006489973049610853,
0.008895576931536198,
0.02815447747707367,
-0.03488829359412193,
-0.005931947845965624,
-0.013280060142278671,
-0.016421882435679436,
-0.06257384270429611,
0.05206983909010887,
-0.051282040774822235,
-0.006443080026656389,
0.04227861016988754,
-0.019376132637262344,
-0.009533319622278214,
-0.013336331583559513,
-0.015033853240311146,
-0.0046799080446362495,
0.02374654822051525,
-0.02524711936712265,
0.03648265078663826,
-0.022227218374609947,
0.038602206856012344,
-0.012042088434100151,
0.008647045120596886,
-0.05567121133208275,
-0.05668409913778305,
-0.008023370057344437,
-0.06302401423454285,
0.020576590672135353,
0.023859091103076935,
0.051544640213251114,
-0.04959389567375183,
0.039277464151382446,
-0.007892069406807423,
-0.008557948283851147,
-0.018138160929083824,
-0.01827883906662464,
-0.006119519006460905,
-0.021945862099528313,
0.048468466848134995,
0.02912984974682331,
0.039314981549978256,
0.046067554503679276,
0.03848966583609581,
0.02110178954899311,
0.01648753136396408,
0.014283567667007446,
-0.038039494305849075,
0.03413800895214081,
-0.02233976125717163,
-0.014105374924838543,
-0.023634005337953568,
0.008112465962767601,
-0.022321004420518875,
-0.02989889308810234,
0.015915438532829285,
-0.016093632206320763,
-0.033256422728300095,
0.0152964536100626,
0.03305009379982948,
0.012998702935874462,
-0.032825008034706116,
0.014574303291738033,
0.038977351039648056,
-0.011057337746024132,
0.02220846153795719,
-0.052219897508621216,
-0.033125121146440506,
0.0001616338558960706,
0.05660906806588173,
-0.011779488064348698,
0.05477086827158928,
-0.04104063659906387,
-0.011047959327697754,
-0.02785436250269413,
0.020145175978541374,
-0.03130567818880081,
-0.009331680834293365,
0.04317895323038101,
0.04362912476062775,
0.017913075163960457,
0.028079448267817497,
-0.007230880204588175,
-0.011929545551538467,
-0.045992523431777954,
0.027310406789183617,
0.07637910544872284,
0.04340403899550438,
0.016562560573220253,
0.02404666319489479,
-0.029711320996284485,
-0.03348150849342346,
0.06249881535768509,
-0.01777239702641964,
-0.0002750559651758522,
0.046030037105083466,
-0.0042649065144360065,
0.0128767816349864,
0.02310880459845066,
0.017275331541895866,
0.026672663167119026,
-0.023296376690268517,
-0.03644513711333275,
-0.022020891308784485,
-0.021176818758249283,
0.03183087706565857,
0.02849210612475872,
-0.03123064897954464,
-0.036032479256391525,
0.0468178391456604,
0.014208538457751274,
0.015859168022871017,
-0.04430438205599785,
-0.056796640157699585,
0.014724360778927803,
-0.04276629537343979,
0.022283490747213364,
0.032281048595905304,
-0.03147449344396591,
-0.020614104345440865,
0.02909233421087265,
-0.020689133554697037,
0.023165076971054077,
-0.06640029698610306,
0.02110178954899311,
-0.04092809557914734,
-0.01952618919312954,
0.03423179313540459,
-0.0070292409509420395,
0.04100312292575836,
0.057434383779764175,
-0.051282040774822235,
0.04865603893995285,
-0.02354021929204464,
-0.06411192566156387,
0.03205596283078194,
0.0468178391456604,
-0.01785680465400219,
0.039540067315101624,
-0.00042760433279909194,
0.019488675519824028,
-0.009448912926018238,
-0.04036537930369377,
0.01080411672592163,
0.028904763981699944,
-0.015962332487106323,
0.025828590616583824,
-0.029186120256781578,
-0.017012732103466988,
0.026410063728690147,
0.041678380221128464,
0.0057584443129599094,
0.011141745373606682,
0.0608481839299202,
-0.01943240500986576,
-0.01533396728336811,
-0.003577925730496645,
0.01645001769065857,
0.004192222375422716,
0.028510862961411476,
0.05390803888440132,
-0.05259504169225693,
-0.027929391711950302,
0.04422935098409653,
-0.03661395236849785,
-0.05206983909010887,
-0.006729126442223787,
-0.00922382716089487,
0.0346069373190403,
-0.01431170292198658,
0.00492375111207366,
0.049068696796894073,
-0.021683262661099434,
0.006443080026656389,
0.03905237838625908
] |
52,333 |
pgeocode
|
_index_postal_codes
|
Create a dataframe with unique postal codes
|
def _index_postal_codes(self) -> pd.DataFrame:
"""Create a dataframe with unique postal codes"""
data_path_unique = self._data_path.replace(".txt", "-index.txt")
if os.path.exists(data_path_unique):
data_unique = pd.read_csv(
data_path_unique,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
# group together places with the same postal code
df_unique_cp_group = self._data.groupby("postal_code")
data_unique = df_unique_cp_group[["latitude", "longitude"]].mean()
valid_keys = set(DATA_FIELDS).difference(
["place_name", "latitude", "longitude", "postal_code"]
)
data_unique["place_name"] = df_unique_cp_group["place_name"].apply(
lambda x: ", ".join([str(el) for el in x])
)
for key in valid_keys:
data_unique[key] = df_unique_cp_group[key].first()
data_unique = data_unique.reset_index()[DATA_FIELDS]
data_unique.to_csv(data_path_unique, index=None)
return data_unique
|
(self) -> pandas.core.frame.DataFrame
|
[
0.0052097635343670845,
-0.018620943650603294,
-0.0016729027265682817,
0.037130050361156464,
-0.014473636634647846,
-0.032190561294555664,
-0.0413425974547863,
-0.06374737620353699,
0.040597014129161835,
-0.062479887157678604,
0.006262900307774544,
-0.001319915521889925,
-0.04249825328588486,
0.017017940059304237,
0.019422447308897972,
0.000955861178226769,
-0.007721447851508856,
0.06184614077210426,
-0.026281813159585,
-0.006076504476368427,
-0.0265054889023304,
0.011407425627112389,
-0.021100008860230446,
0.010084015317261219,
0.014585474506020546,
0.017819441854953766,
-0.02026122808456421,
-0.020242588594555855,
0.05051327124238014,
-0.036328550428152084,
0.04872387275099754,
-0.041901785880327225,
-0.030252045020461082,
0.03019612655043602,
-0.012544440105557442,
-0.064679354429245,
0.047381822019815445,
-0.03634718805551529,
0.041230760514736176,
0.019851157441735268,
-0.026934199035167694,
-0.0831325426697731,
-0.019571563228964806,
-0.04443676769733429,
0.010801639407873154,
0.0060438853688538074,
0.01627235673367977,
-0.05401751399040222,
0.011025314219295979,
-0.050886064767837524,
-0.04797828942537308,
0.022703014314174652,
-0.017446650192141533,
0.052153557538986206,
0.016542630270123482,
0.0002695458533708006,
-0.016412153840065002,
0.08574208617210388,
0.018565025180578232,
-0.014967585913836956,
-0.05770815163850784,
0.002359072444960475,
0.054203908890485764,
-0.030587557703256607,
0.033047981560230255,
0.030475720763206482,
0.011006674729287624,
-0.022721653804183006,
-0.011780217289924622,
-0.0009721707901917398,
0.05472581833600998,
0.01972067914903164,
-0.012171648442745209,
0.020876334980130196,
0.02885407581925392,
0.045629702508449554,
-0.03347669169306755,
0.015237860381603241,
0.00686402665451169,
0.01000013668090105,
-0.006547153927385807,
-0.015116702765226364,
0.03658950328826904,
0.01720433682203293,
0.051967158913612366,
-0.0013257404789328575,
0.06128695234656334,
0.04879843071103096,
-0.005866809282451868,
-0.01334594190120697,
0.00923591386526823,
0.016430793330073357,
0.024287378415465355,
-0.030531639233231544,
0.03545248880982399,
-0.07888271659612656,
0.0036813179031014442,
0.05036415532231331,
0.0011521592969074845,
-0.008275975473225117,
0.01891917735338211,
0.053942956030368805,
0.027884818613529205,
-0.0011533242650330067,
-0.00498608872294426,
0.02462289109826088,
0.04164082929491997,
-0.01774488389492035,
-0.046748075634241104,
0.02350451610982418,
-0.10453078895807266,
-0.015526773408055305,
0.0687427893280983,
-0.020056191831827164,
0.01698998175561428,
0.000629085989203304,
0.03988870978355408,
0.04350478947162628,
-0.06318818777799606,
0.00431273365393281,
0.023429958149790764,
0.06713978201150894,
-0.07090497761964798,
0.04872387275099754,
-0.02192015014588833,
-0.017306853085756302,
0.02443649433553219,
-0.01823883317410946,
0.030177487060427666,
-0.0017148416955024004,
0.005219083745032549,
0.03239559754729271,
0.017353452742099762,
-0.02767978236079216,
0.01094143558293581,
0.014259281568229198,
0.05360744521021843,
0.007656209170818329,
-0.005111905746161938,
0.06031769514083862,
0.018313391134142876,
-0.03178049251437187,
0.030140208080410957,
-0.00917067565023899,
0.05002864450216293,
0.03552704676985741,
-0.034893300384283066,
0.060765042901039124,
-0.01345777977257967,
-0.07448377460241318,
0.0319109670817852,
-0.007078382186591625,
0.0031454297713935375,
0.0020678287837654352,
0.018099036067724228,
-0.09506187587976456,
0.0018825980369001627,
0.009282512590289116,
0.0014818469062447548,
-0.0017579457489773631,
0.03759603947401047,
-0.01164042018353939,
0.025685347616672516,
-0.024156900122761726,
-0.06956292688846588,
0.00577361136674881,
0.02863040193915367,
-0.06057864800095558,
-0.019040334969758987,
-0.03563888370990753,
0.0030079628340899944,
0.05278730392456055,
-0.033812206238508224,
0.015890246257185936,
-0.08559297025203705,
0.012777434661984444,
-0.004972109105437994,
-0.006770828738808632,
0.03767060115933418,
-0.00320833851583302,
-0.031239943578839302,
-0.009375710971653461,
-0.036962296813726425,
0.013215465471148491,
0.034035880118608475,
0.01774488389492035,
0.012907912023365498,
-0.05163164809346199,
0.09960994124412537,
0.029375985264778137,
0.01307566836476326,
-0.026169976219534874,
0.0037675260100513697,
0.008835162967443466,
0.031482256948947906,
-0.0633745864033699,
-0.009203294292092323,
0.006565793417394161,
-0.06270355731248856,
-0.03422227501869202,
-0.0037535461597144604,
0.024063702672719955,
0.03299206495285034,
-0.0021913161035627127,
-0.0377451591193676,
0.008052300661802292,
-0.021864231675863266,
0.014389758929610252,
-0.007311376743018627,
0.04074613004922867,
0.06240532919764519,
-0.08275975286960602,
-0.033178459852933884,
0.03832298517227173,
-0.007101681549102068,
-0.0678853690624237,
-0.026039499789476395,
-0.007945123128592968,
0.1078113541007042,
0.030885791406035423,
0.037185970693826675,
-0.05125885456800461,
0.0029101050458848476,
-0.04600249230861664,
0.0489848256111145,
-0.027754340320825577,
-0.028145771473646164,
0.051296137273311615,
-0.006551813799887896,
-0.05770815163850784,
0.004508449230343103,
-0.08842618763446808,
-0.026747804135084152,
-0.05535956472158432,
-0.014660032466053963,
-0.07247070223093033,
0.03813659027218819,
-0.01990707591176033,
0.06639419496059418,
0.0019839508458971977,
-0.030680755153298378,
-0.05312281474471092,
0.05781998857855797,
-0.014035606756806374,
-0.05275002121925354,
-0.0350610576570034,
-0.007945123128592968,
0.007959102280437946,
0.02777297981083393,
-0.06240532919764519,
-0.022050628438591957,
0.02283349074423313,
-0.03554568812251091,
0.017539849504828453,
0.05644066259264946,
-0.03877033665776253,
-0.03452051058411598,
0.021379603073000908,
-0.018620943650603294,
0.004916190169751644,
-0.011127831414341927,
0.0041589573957026005,
0.059609390795230865,
-0.04384030029177666,
-0.0033271657302975655,
-0.037092771381139755,
0.002018899889662862,
0.018117675557732582,
0.018667543306946754,
0.00838315300643444,
-0.019739320501685143,
0.05562051758170128,
-0.05159436911344528,
-0.021677836775779724,
-0.02067129872739315,
0.005344900768250227,
0.030680755153298378,
-0.020205309614539146,
-0.08775515854358673,
-0.00959006603807211,
-0.011901374906301498,
0.020466262474656105,
0.015554732643067837,
-0.03319709748029709,
0.014632073231041431,
-0.008122199214994907,
0.010577963665127754,
-0.027157874777913094,
0.012824034318327904,
-0.029170949012041092,
-0.03573208302259445,
-0.010009456425905228,
-0.04335567355155945,
0.02682236209511757,
-0.009166015312075615,
-0.00961802527308464,
0.04835108295083046,
-0.04346751049160957,
-0.02322492189705372,
-0.018164275214076042,
-0.11444704979658127,
0.023448597639799118,
0.11139015108346939,
0.020522182807326317,
-0.004473500419408083,
0.030121568590402603,
-0.034445952624082565,
-0.002221605507656932,
-0.00046482463949359953,
-0.00369529752060771,
-0.038173869252204895,
0.023616353049874306,
0.02687828056514263,
0.013094307854771614,
0.019757959991693497,
-0.06087688356637955,
-0.03936680033802986,
0.036291271448135376,
0.012749475426971912,
0.03202280402183533,
-0.06274084001779556,
-0.023355398327112198,
0.001194098382256925,
-0.08141770213842392,
0.05028959736227989,
0.02713923528790474,
0.0341663584113121,
-0.03127722069621086,
-0.006379397585988045,
0.007101681549102068,
0.012851993553340435,
-0.02592766098678112,
0.030494360253214836,
0.00891904067248106,
0.025853103026747704,
-0.031929608434438705,
0.015060784295201302,
-0.04965585097670555,
0.027288351207971573,
0.017819441854953766,
-0.0449213981628418,
0.000828296528197825,
0.004023820161819458,
-0.0015983443008735776,
-0.008392472751438618,
-0.045406028628349304,
-0.037409644573926926,
-0.022852130234241486,
-0.04667351767420769,
-0.03261927142739296,
0.020186670124530792,
0.03647766634821892,
-0.021379603073000908,
0.049581293016672134,
0.09655304253101349,
-0.01630963571369648,
0.0023101435508579016,
0.044735003262758255,
0.01231144554913044,
0.10348697006702423,
0.05230267345905304,
-0.07209791243076324,
0.008769924752414227,
-0.04346751049160957,
0.02013075165450573,
0.00840645283460617,
0.0018989075906574726,
0.038844894617795944,
-0.026803722605109215,
-0.009012239053845406,
-0.025592148303985596,
-0.03690637648105621,
0.03211600333452225,
0.018714142963290215,
-0.010233131237328053,
0.015526773408055305,
0.020522182807326317,
-0.0019804558251053095,
-0.09864068031311035,
-0.03526609390974045,
-0.031966887414455414,
-0.012292806059122086,
0.05140797421336174,
0.023933226242661476,
0.008075599558651447,
-0.02579718455672264,
0.019385168328881264,
-0.007376615423709154,
-0.023746829479932785,
0.0027283690869808197,
-0.04835108295083046,
-0.024343296885490417,
-0.020186670124530792,
0.013578937388956547,
0.01936652883887291,
0.0292082279920578,
-0.023038525134325027,
-0.037092771381139755,
0.009878979995846748,
0.016412153840065002,
-0.01901237666606903,
-0.035974398255348206,
0.013476419262588024,
0.03431547433137894,
-0.00783794466406107,
-0.01453887578099966,
0.0476427786052227,
-0.08924632519483566,
0.023467237129807472,
-0.01630963571369648,
-0.03310390189290047,
0.028052574023604393,
0.08551841229200363,
0.007558351382613182,
-0.02503296174108982,
0.03573208302259445,
0.03932952135801315,
-0.02462289109826088,
0.009217274375259876,
0.012544440105557442,
0.03301070258021355,
0.007162260357290506,
-0.029487822204828262,
0.025144798681139946,
0.049767687916755676,
-0.002968353684991598,
-0.008769924752414227,
-0.029730137437582016,
-0.010317009873688221,
0.03545248880982399,
-0.00422419561073184,
-0.01708317920565605,
-0.08343078196048737,
0.033719006925821304,
0.040186941623687744,
0.016365554183721542,
0.014762550592422485,
0.004664556123316288,
0.05051327124238014,
0.03671998158097267,
0.022665733471512794,
-0.0037908253725618124,
-0.011062593199312687,
0.00360675947740674,
-0.004270794801414013,
-0.057894546538591385,
-0.016784945502877235,
-0.05442758649587631,
0.003595109796151519,
-0.04835108295083046,
0.05972122773528099,
-0.02551759034395218,
-0.0007554856711067259,
-0.04350478947162628,
0.012702876701951027,
0.038621217012405396,
-0.02331811934709549,
0.0007444184157066047,
0.0009214944439008832,
0.027530666440725327,
0.03811794891953468,
0.056105148047208786,
0.02201334945857525,
0.012991789728403091,
0.04596521332859993,
-0.007474473211914301,
-0.0131409065797925,
-0.04525690898299217,
0.028369447216391563,
0.024697449058294296,
-0.019757959991693497,
-0.024734728038311005,
-0.08686046302318573,
-0.0377451591193676,
-0.0426846481859684,
0.011351507157087326,
-0.02525663562119007,
0.01422200258821249,
-0.03940407931804657,
0.006057864986360073,
-0.019347887486219406,
-0.002996313152834773,
0.0009447939228266478,
0.032190561294555664,
0.031146744266152382,
-0.006691610906273127,
0.05028959736227989,
-0.01568521000444889,
-0.01994435489177704,
-0.04969312995672226,
0.04160355031490326,
-0.018117675557732582,
-0.014697312377393246,
0.03360716998577118,
0.012768114916980267,
0.0791063979268074,
0.03263791278004646,
-0.0027330289594829082,
0.021379603073000908,
-0.05621698498725891,
0.050886064767837524,
-0.009352411143481731,
-0.017465289682149887,
-0.026132697239518166,
0.061361510306596756,
-0.009562106803059578,
0.00896564032882452,
0.02754930593073368,
-0.05148253217339516,
-0.03977687284350395,
-0.08119402825832367,
-0.032060083001852036,
0.014259281568229198,
0.003991201054304838,
0.008429751731455326,
0.09200498461723328,
-0.030307963490486145,
-0.04879843071103096,
-0.07686964422464371,
0.050252318382263184,
-0.014054246246814728,
0.05069966986775398,
-0.014566835016012192,
0.004149637185037136,
-0.0033038663677871227,
0.030662115663290024,
0.07165056467056274,
0.02579718455672264,
-0.02219974435865879,
-0.008718665689229965,
-0.09185586869716644,
-0.02771706134080887,
0.04905938357114792,
0.010363608598709106,
0.05685073137283325,
-0.016365554183721542,
0.028723599389195442,
-0.03200416639447212,
0.07336540520191193,
0.020149391144514084,
-0.02309444546699524,
-0.02646820992231369,
-0.03271247074007988,
-0.12861312925815582,
-0.02637501060962677,
-0.03010292910039425,
0.002341597806662321,
-0.007782026194036007,
0.014119485393166542,
0.010615243576467037,
0.06165974587202072,
-0.01955292373895645,
0.1195170134305954,
-0.014678672887384892,
0.06620780378580093,
0.05990762263536453,
-0.00979510135948658,
0.018425228074193,
0.008886422030627728,
-0.004214875865727663,
0.03895673155784607,
-0.05409207195043564,
0.00371160707436502,
-0.007148280739784241,
-0.07295533269643784,
0.038844894617795944,
-0.05058783292770386,
0.02188287116587162,
-0.04346751049160957,
-0.04197634384036064,
-0.028183050453662872,
0.00683140754699707,
0.0006483080214820802,
0.0034017241559922695,
-0.020410344004631042,
-0.03789427503943443,
0.01604868285357952,
-0.056999847292900085,
0.01757712848484516,
-0.021845592185854912,
0.012609678320586681,
0.06184614077210426,
0.02930142544209957,
-0.017633046954870224,
-0.007968422025442123,
0.04980497062206268,
-0.009683264419436455,
0.002660800702869892,
0.06330002844333649,
-0.06143606826663017,
-0.011864094994962215,
-0.027437467128038406,
0.0047204745933413506,
-0.02758658491075039,
0.009366391226649284,
0.07761523127555847,
-0.04011238366365433,
-0.046710796654224396,
0.01828543283045292,
0.007628249935805798,
-0.013700094074010849,
0.010074695572257042,
-0.07109137624502182,
-0.018052436411380768,
0.08387812972068787,
-0.03563888370990753,
0.004760083742439747,
-0.01877938024699688,
-0.029320064932107925,
-0.0009902279125526547,
0.012423282489180565,
0.008029000833630562,
-0.013886489905416965,
-0.01757712848484516,
0.018993735313415527,
-0.008476350456476212,
0.010242451913654804,
-0.03157545626163483,
-0.04208818078041077,
0.008122199214994907,
-0.050252318382263184,
-0.017679644748568535,
0.025088880211114883,
0.015060784295201302,
-0.01035428885370493,
-0.005880788899958134,
0.027213793247938156,
0.07060674577951431,
-0.031128104776144028,
0.032190561294555664,
0.014874388463795185,
-0.023392677307128906,
-0.010512725450098515,
-0.028015295043587685,
0.008793223649263382,
0.02974877692759037,
0.013793292455375195,
0.02080177515745163,
-0.025331195443868637,
0.06240532919764519,
-0.025237996131181717,
-0.060951441526412964,
-0.01094143558293581,
-0.017185697332024574,
-0.028947273269295692,
-0.01748392917215824,
0.017278894782066345,
-0.042796485126018524,
-0.03951591998338699,
-0.025722626596689224,
-0.019888436421751976,
0.011332866735756397,
0.04003782570362091,
0.000629085989203304,
-0.003385414369404316,
-0.0019524964736774564,
-0.04548058658838272,
-0.0001489710557507351,
0.018117675557732582,
-0.023355398327112198,
0.016412153840065002,
-0.022050628438591957,
0.027567945420742035,
-0.030568918213248253,
0.04596521332859993,
0.002048024209216237,
0.037279170006513596,
0.002896125428378582,
-0.0067987884394824505,
0.0413425974547863,
0.02520071715116501,
0.04115620255470276,
0.005354220513254404,
0.039254963397979736,
0.03496785834431648,
0.02786617912352085,
-0.019068295136094093,
-0.02758658491075039,
-0.05692528933286667,
0.027623863890767097,
0.009193974547088146,
0.0426846481859684,
0.021584639325737953,
-0.036421746015548706,
0.027959376573562622,
0.06863094866275787,
-0.0035368611570447683,
-0.030084289610385895,
0.0588638074696064,
-0.017017940059304237,
0.011659059673547745,
-0.03545248880982399,
0.02480928599834442,
0.055247727781534195,
-0.01891917735338211,
0.03535928949713707,
-0.008308595046401024,
-0.018499787896871567,
-0.01404492650181055,
0.046748075634241104,
-0.01981387846171856,
0.001157401711679995,
0.07679508626461029,
-0.01959020271897316,
0.015107383020222187,
0.008676726371049881,
-0.014790509827435017,
0.06151062622666359,
-0.010960075072944164,
-0.007530392147600651,
0.0471954271197319,
-0.0038444141391664743,
0.007264778017997742,
0.08879897743463516,
0.03694365546107292,
0.026169976219534874,
-0.03644038736820221,
0.035433851182460785,
0.01073640026152134,
-0.03780107572674751,
0.025853103026747704,
0.05953483283519745,
-0.01275879517197609,
0.043169278651475906,
-0.031202664598822594,
0.011239669285714626,
-0.02057810127735138,
-0.06818360090255737,
-0.02803393453359604,
0.0038816933520138264,
-0.023970505222678185,
0.018565025180578232,
-0.02031714655458927,
-0.026132697239518166,
-0.0015727148856967688,
-0.010568643920123577,
0.030177487060427666,
0.02408234216272831,
-0.056105148047208786,
0.04920850321650505,
-0.03780107572674751,
0.0005722934729419649,
-0.0319109670817852,
0.025051601231098175,
0.03765195980668068,
0.04264736920595169,
0.06930197030305862,
-0.010624563321471214,
-0.040149662643671036,
0.015060784295201302,
0.008909720927476883,
0.01968340016901493,
-0.0038094650954008102,
0.04920850321650505,
-0.042125459760427475,
0.014837108552455902,
0.03332757577300072,
0.04074613004922867,
-0.0034087139647454023,
-0.014026287011802197,
0.014622753486037254,
-0.006276879925280809,
-0.04831380024552345,
-0.0069898441433906555,
0.04794101044535637,
-0.013485739007592201,
-0.01164042018353939,
0.019795238971710205
] |
52,334 |
pgeocode
|
_normalize_postal_code
|
Normalize postal codes to the values contained in the database
For instance, take into account only first letters when applicable.
Takes in a pd.DataFrame
|
def _normalize_postal_code(self, codes: pd.DataFrame) -> pd.DataFrame:
"""Normalize postal codes to the values contained in the database
For instance, take into account only first letters when applicable.
Takes in a pd.DataFrame
"""
codes["postal_code"] = codes.postal_code.str.upper()
if self.country in ["GB", "IE", "CA"]:
codes["postal_code"] = codes.postal_code.str.split().str.get(0)
else:
pass
return codes
|
(self, codes: pandas.core.frame.DataFrame) -> pandas.core.frame.DataFrame
|
[
0.003277562092989683,
0.017312366515398026,
0.008215275593101978,
0.013659133575856686,
-0.07486429065465927,
-0.05999940633773804,
-0.004908469971269369,
-0.04700613394379616,
0.10070686787366867,
-0.06982534378767014,
-0.00463852658867836,
-0.007769869174808264,
-0.03543456271290779,
-0.0033270518761128187,
-0.009475011378526688,
0.020443709567189217,
-0.01496385969221592,
0.02895592339336872,
0.04542246833443642,
-0.00763939693570137,
-0.007531419396400452,
0.024834787473082542,
0.025482652708888054,
0.02506873942911625,
-0.012165446765720844,
0.013776108622550964,
0.014702914282679558,
-0.03233921155333519,
0.0233411006629467,
-0.010032894089818,
0.1033703088760376,
-0.005061437841504812,
-0.004469811916351318,
0.009537998586893082,
0.04675418883562088,
-0.05096530541777611,
0.01410004124045372,
-0.020335732027888298,
-0.01045580580830574,
0.010770739987492561,
-0.09797143936157227,
-0.05672409385442734,
0.011400607414543629,
0.0029018910136073828,
0.0233411006629467,
-0.0019199720118194818,
0.012417393736541271,
-0.044054754078388214,
0.01950790546834469,
-0.011913499794900417,
-0.04607032984495163,
0.031925298273563385,
0.04056348651647568,
0.011382611468434334,
-0.01923796348273754,
-0.0032370707485824823,
0.01934593915939331,
0.09019707143306732,
0.012975277379155159,
-0.013218225911259651,
-0.04466662555932999,
-0.019723860546946526,
-0.054384585469961166,
-0.06471441686153412,
0.034246813505887985,
0.0050839330069720745,
0.044702619314193726,
0.008755162358283997,
-0.01869807578623295,
0.007220984436571598,
-0.022135354578495026,
0.0068565611727535725,
-0.049705568701028824,
0.04693415015935898,
0.04675418883562088,
0.06136712059378624,
-0.008741665631532669,
0.028416035696864128,
0.012345409020781517,
-0.011499586515128613,
0.06547026336193085,
-0.0009487383649684489,
0.04542246833443642,
0.010707752779126167,
0.050389423966407776,
-0.059351544827222824,
0.04758201539516449,
0.057659897953271866,
0.02972976118326187,
0.035164620727300644,
0.026832368224859238,
-0.012399397790431976,
0.030359627678990364,
0.014657923951745033,
0.03152938187122345,
0.011436600238084793,
-0.00205719331279397,
0.04693415015935898,
0.022891195490956306,
-0.030215658247470856,
0.03451675549149513,
0.058523718267679214,
0.024438871070742607,
-0.027624202892184258,
0.007625899743288755,
0.05701203644275665,
0.04171524569392204,
-0.0485898032784462,
-0.03134942054748535,
0.02505074255168438,
-0.1037302315235138,
-0.08004719763994217,
0.007787865586578846,
-0.06352666765451431,
0.005673309322446585,
-0.00021187741367612034,
0.00968196801841259,
0.02503274567425251,
-0.02980174496769905,
0.028524013236165047,
-0.005722798872739077,
0.05136122182011604,
-0.028757965192198753,
0.014648925513029099,
-0.006510133855044842,
0.026058530434966087,
0.06212296336889267,
-0.026994334533810616,
0.016979437321424484,
-0.030305638909339905,
0.01866208389401436,
0.014810891821980476,
-0.038331955671310425,
-0.010554784908890724,
0.020785637199878693,
-0.03574049845337868,
0.006793574430048466,
0.02352106384932995,
0.04905770346522331,
0.0016342820599675179,
-0.003304556477814913,
-0.010680758394300938,
0.05388069152832031,
-0.013038263656198978,
0.02661641500890255,
0.039879631251096725,
0.0025239703245460987,
0.0771678015589714,
-0.013191231526434422,
-0.02972976118326187,
-0.007540417369455099,
0.03133142367005348,
0.04974156245589256,
0.009169075638055801,
-0.014271005056798458,
-0.04502655193209648,
0.006528129801154137,
-0.05870367959141731,
0.06662201881408691,
0.029279856011271477,
0.028757965192198753,
-0.02571660280227661,
0.01869807578623295,
-0.04301097244024277,
-0.051973093301057816,
-0.01848212070763111,
-0.00032477558124810457,
-0.06381461024284363,
0.017069417983293533,
-0.009187071584165096,
0.03386889025568962,
0.023809002712368965,
-0.011733537539839745,
0.0501374788582325,
-0.019093992188572884,
0.044738609343767166,
0.022153351455926895,
-0.00011634277325356379,
-0.024420874193310738,
0.032699137926101685,
0.01853610947728157,
0.047258082777261734,
-0.01493686530739069,
0.03068356029689312,
0.033508967608213425,
-0.0056868065148591995,
-0.013866090215742588,
-0.021613463759422302,
0.018896033987402916,
0.011580569669604301,
0.026436451822519302,
-0.014918869361281395,
-0.018194181844592094,
-0.02895592339336872,
0.011067677289247513,
-0.045530445873737335,
0.04768999293446541,
-0.031187454238533974,
-0.06273483484983444,
-0.06453445553779602,
-0.02411493845283985,
0.003349547041580081,
0.012012478895485401,
0.037468135356903076,
-0.04581838473677635,
0.01844612881541252,
-0.06208696961402893,
0.020713653415441513,
-0.01781626045703888,
-0.029495809227228165,
0.06154708191752434,
-0.04056348651647568,
-0.011598565615713596,
-0.005610322579741478,
0.011535579338669777,
-0.07803162187337875,
0.01336219534277916,
0.006118715740740299,
0.09523601084947586,
0.03208726644515991,
-0.022801214829087257,
-0.053700730204582214,
0.015242801047861576,
-0.05395267531275749,
0.04103139042854309,
-0.00024112127721309662,
-0.042399100959300995,
0.04423471540212631,
0.048949725925922394,
0.005619320552796125,
-0.05020946264266968,
-0.06219494715332985,
-0.04603433981537819,
-0.06777377426624298,
0.05312485247850418,
-0.07810360938310623,
0.056976042687892914,
-0.0711570680141449,
0.004355086013674736,
-0.00884514395147562,
0.004647524561733007,
-0.021253539249300957,
0.019004011526703835,
0.02571660280227661,
-0.046358272433280945,
0.0024407377932220697,
-0.022045373916625977,
-0.000828951015137136,
0.008701173588633537,
-0.020587678998708725,
-0.06356266140937805,
-0.01950790546834469,
0.004786995239555836,
0.037576112896203995,
0.041607268154621124,
0.002818658482283354,
-0.04592636227607727,
0.04103139042854309,
-0.01811319775879383,
0.01850011758506298,
-0.025320686399936676,
-0.04455864802002907,
0.055968254804611206,
0.013164237141609192,
0.007882345467805862,
-0.007904840633273125,
0.010662762448191643,
0.02082163095474243,
0.06856560707092285,
0.013551156036555767,
0.05006549134850502,
-0.005097430199384689,
-0.002002079738304019,
0.04124734178185463,
0.01682646945118904,
0.05010148510336876,
-0.008431230671703815,
-0.016673501580953598,
-0.05334080383181572,
-0.0031763333827257156,
0.05506844446063042,
0.010608773678541183,
-0.009286051616072655,
-0.014244010671973228,
0.034264810383319855,
-0.03714420646429062,
0.019129985943436623,
-0.08839745074510574,
0.010311835445463657,
-0.033490970730781555,
0.006469642277806997,
0.020587678998708725,
0.00826476514339447,
0.03059357963502407,
-0.017996223643422127,
-0.03728817403316498,
0.05269294232130051,
-0.04189520701766014,
0.017294369637966156,
-0.022999173030257225,
-0.10351427644491196,
0.04905770346522331,
0.13072456419467926,
0.03655032813549042,
0.006429150700569153,
0.010473801754415035,
-0.03154737874865532,
-0.016349568963050842,
-0.015179813839495182,
0.003981664311140776,
-0.06464243680238724,
0.023557055741548538,
-0.02501475065946579,
-0.0037837058771401644,
0.029297851026058197,
-0.04056348651647568,
0.018428131937980652,
0.030161669477820396,
-0.02105558104813099,
0.025698605924844742,
-0.04283101111650467,
-0.05265694856643677,
0.03736015781760216,
0.011130664497613907,
-0.008030815050005913,
0.03379690647125244,
0.03815199434757233,
0.004782496485859156,
0.022063368931412697,
-0.04121135175228119,
-0.001751257455907762,
-0.017528321593999863,
0.030107680708169937,
-0.03692825138568878,
0.050389423966407776,
-0.05409664660692215,
-0.01539576891809702,
-0.028542010113596916,
-0.01665550470352173,
-0.008561703376471996,
-0.03457074612379074,
0.007972327060997486,
0.044702619314193726,
0.032573163509368896,
0.028613995760679245,
-0.019885826855897903,
-0.04182322323322296,
-0.01921996660530567,
-0.03948371484875679,
-0.06377861648797989,
-0.05470851808786392,
-0.0076618921011686325,
-0.001409329241141677,
0.0032730631064623594,
0.07601604610681534,
-0.031925298273563385,
-0.02098359540104866,
0.026040535420179367,
0.014702914282679558,
0.04286700487136841,
0.10905711352825165,
-0.09379631280899048,
0.019939815625548363,
-0.03534458205103874,
0.039951615035533905,
0.005956749897450209,
-0.03365293890237808,
0.030845526605844498,
-0.04020356386899948,
0.009816939942538738,
0.02098359540104866,
-0.03307705745100975,
-0.0012788566527888179,
-0.0420391783118248,
-0.04121135175228119,
0.0047330064699053764,
-0.00303011410869658,
-0.002131427638232708,
-0.03901581093668938,
0.04574640095233917,
-0.004557543434202671,
-0.009511004202067852,
-0.0045125531032681465,
0.00011929527681786567,
0.009412025101482868,
-0.017204388976097107,
0.04830186441540718,
-0.014756903052330017,
-0.04016757011413574,
-0.03793603926897049,
-0.071337029337883,
-0.010005899704992771,
-0.02172144129872322,
0.022747226059436798,
0.018356148153543472,
0.01656552404165268,
-0.03377890959382057,
-0.04409074783325195,
0.04445067048072815,
-0.005952250678092241,
-0.009011608548462391,
-0.06125914305448532,
0.039051804691553116,
0.03779206797480583,
-0.02827206626534462,
-0.01776227168738842,
0.03689225763082504,
0.013263216242194176,
0.00791383907198906,
0.053628746420145035,
-0.01943592168390751,
0.02506873942911625,
0.043298911303281784,
-0.03883584961295128,
-0.02496076188981533,
0.024420874193310738,
0.07230882346630096,
-0.027570214122533798,
-0.018104201182723045,
-0.03242919594049454,
0.03818798437714577,
-0.003421531990170479,
-0.03786405175924301,
0.04146329686045647,
0.056112222373485565,
-0.026796376332640648,
0.012003480456769466,
-0.043910782784223557,
0.022099362686276436,
0.039915621280670166,
0.032789118587970734,
-0.03620840236544609,
-0.038331955671310425,
-0.017825258895754814,
0.05402466282248497,
0.07302867621183395,
0.015953652560710907,
0.07666391134262085,
0.038979820907115936,
0.004258356522768736,
-0.006469642277806997,
0.024456867948174477,
-0.0020560685079544783,
-0.02985573373734951,
0.022315315902233124,
-0.04844583198428154,
-0.003932174760848284,
-0.06421052664518356,
-0.056940048933029175,
-0.032843105494976044,
0.021487491205334663,
-0.03151138499379158,
0.008003820665180683,
-0.016151610761880875,
-0.014711912721395493,
0.06467842310667038,
-0.023251120001077652,
0.03887184336781502,
-0.013983065262436867,
0.06529029458761215,
-0.006298677995800972,
0.03473271057009697,
0.040023598819971085,
0.05244099348783493,
0.022405298426747322,
0.04517051950097084,
-0.021433502435684204,
-0.03336499631404877,
-0.002841153647750616,
0.050317440181970596,
-0.008048810996115208,
-0.0484098419547081,
0.04448666423559189,
0.03332900628447533,
-0.011220645159482956,
-0.010239850729703903,
-0.04452265799045563,
-0.06885354965925217,
-0.04603433981537819,
0.006366163957864046,
-0.03811600059270859,
0.05175713822245598,
0.015674710273742676,
0.0013418433954939246,
0.047258082777261734,
-0.05236900970339775,
0.015899663791060448,
0.001326096709817648,
-0.01607062667608261,
-0.003923176787793636,
0.012219435535371304,
0.024726809933781624,
0.02890193462371826,
0.016259588301181793,
-0.03404885530471802,
0.013281213119626045,
0.03368892893195152,
-0.04347887635231018,
0.023737018927931786,
-0.029243862256407738,
0.039303749799728394,
0.00012906666961498559,
-0.02897391840815544,
-0.04754602164030075,
0.06514632701873779,
-0.0018502366729080677,
-0.03775607794523239,
0.057587914168834686,
-0.04409074783325195,
0.005209906492382288,
-0.07983124256134033,
-0.03152938187122345,
0.020641667768359184,
-0.043802808970212936,
-0.030971501022577286,
0.09588387608528137,
-0.017996223643422127,
-0.006730587687343359,
-0.055896271020174026,
0.0389438271522522,
-0.008557204157114029,
-0.028470024466514587,
-0.011814520694315434,
0.006078224163502455,
0.02593255788087845,
0.021541479974985123,
0.03457074612379074,
-0.010176864452660084,
0.017492329701781273,
-0.0565081425011158,
-0.05164916068315506,
-0.0009256807388737798,
0.07774368673563004,
0.028811953961849213,
0.04268703982234001,
-0.0023462576791644096,
0.02094760350883007,
-0.09084493666887283,
0.0008238895679824054,
0.024456867948174477,
-0.011940494179725647,
-0.004706012550741434,
-0.028649987652897835,
-0.06939343363046646,
-0.005700303707271814,
-0.055176421999931335,
-0.03610042482614517,
0.012030474841594696,
-0.03246518597006798,
0.021469494327902794,
-0.01647554151713848,
-0.03732416778802872,
0.0858059898018837,
0.040779441595077515,
0.04776197671890259,
0.01412703562527895,
-0.014927866868674755,
0.08400636911392212,
0.02341308631002903,
-0.011031684465706348,
-0.017015429213643074,
-0.06619010865688324,
0.034210819751024246,
0.01450495608150959,
-0.06205097585916519,
0.05578829348087311,
-0.07058119028806686,
0.04758201539516449,
0.004483309108763933,
-0.04833785444498062,
0.019741857424378395,
-0.010572780855000019,
-0.0006017487030476332,
0.021469494327902794,
-0.062410902231931686,
-0.02593255788087845,
-0.027948135510087013,
-0.055320389568805695,
0.022963181138038635,
0.025266697630286217,
-0.015377772971987724,
-0.0029851235449314117,
-0.017474332824349403,
0.006100719794631004,
-0.02753422223031521,
-0.0032595659140497446,
-0.0312594398856163,
0.015854673460125923,
0.0046835169196128845,
-0.0613311268389225,
-0.035146623849868774,
-0.05747993662953377,
0.02497875690460205,
-0.03611842170357704,
0.015620721504092216,
0.013623140752315521,
-0.02909989282488823,
-0.02497875690460205,
-0.021451497450470924,
0.0032438193447887897,
-0.03887184336781502,
0.02820008248090744,
-0.011814520694315434,
0.009196070022881031,
0.12842105329036713,
-0.043802808970212936,
0.0038039516657590866,
-0.005790284834802151,
-0.03800802305340767,
-0.032681141048669815,
0.022387301549315453,
0.061691053211688995,
0.002649943809956312,
-0.008971117436885834,
0.05100129544734955,
-0.032681141048669815,
-0.010617772117257118,
-0.09170875698328018,
-0.0341208390891552,
-0.01825716905295849,
-0.02505074255168438,
-0.04164326190948486,
-0.036622315645217896,
0.018716072663664818,
-0.0032258229330182076,
-0.0164035577327013,
0.04585437849164009,
0.028020119294524193,
-0.06672999262809753,
-0.05154118314385414,
0.015782687813043594,
0.009259057231247425,
-0.009430021047592163,
-0.027174297720193863,
-0.0015319285448640585,
0.022369304671883583,
-0.0005348252598196268,
0.0059387534856796265,
-0.04603433981537819,
0.023970969021320343,
0.004724008496850729,
-0.07385650277137756,
0.0004355648416094482,
-0.008093801327049732,
-0.009645975194871426,
-0.0008981240098364651,
-0.033490970730781555,
-0.044882580637931824,
-0.07903940975666046,
-0.010347828269004822,
-0.0360824279487133,
0.01053678896278143,
0.010662762448191643,
0.03808000683784485,
-0.017474332824349403,
0.050353433936834335,
0.013308207504451275,
0.00863368809223175,
-0.008930625393986702,
-0.05647214874625206,
-0.017996223643422127,
-0.0362623892724514,
0.0016893954016268253,
-0.012705333530902863,
0.0516851544380188,
0.013074256479740143,
0.04909369722008705,
0.01730336807668209,
0.014612933620810509,
-0.024060949683189392,
0.003914178349077702,
0.03843993321061134,
-0.023719022050499916,
-0.02496076188981533,
0.005880265962332487,
0.03145739808678627,
-0.012543367221951485,
-0.0040199062786996365,
0.022279324010014534,
0.031853314489126205,
-0.006420152727514505,
0.0011107043828815222,
0.016961440443992615,
-0.017186393961310387,
0.03656832501292229,
-0.003194329561665654,
-0.024780798703432083,
0.025572633370757103,
0.021253539249300957,
0.012858301401138306,
0.010500796139240265,
-0.08630988746881485,
0.012165446765720844,
-0.0003624551754910499,
-0.030845526605844498,
0.033454980701208115,
-0.03313104808330536,
-0.04409074783325195,
-0.02506873942911625,
0.05989143252372742,
0.02172144129872322,
0.004980454687029123,
-0.008458225056529045,
-0.035146623849868774,
0.04621430113911629,
-0.006280682049691677,
-0.01691645011305809,
0.03469671681523323,
-0.018734067678451538,
0.04790594428777695,
0.03610042482614517,
-0.000034041684557450935,
-0.013398188166320324,
0.0152877913787961,
0.023071158677339554,
0.0437668152153492,
-0.042399100959300995,
0.020011799409985542,
0.02649044059216976,
-0.021127566695213318,
0.015161817893385887,
0.0005629443330690265,
-0.005349377170205116,
0.012714331969618797,
-0.03482269123196602,
0.008395237848162651,
-0.001751257455907762,
-0.03325701877474785,
-0.05888364091515541,
0.026796376332640648,
-0.0373961515724659,
0.0133531978353858,
0.012318414635956287,
0.01527879387140274,
-0.04535048082470894,
-0.007576409727334976,
0.033544961363077164,
0.05506844446063042,
-0.07274073362350464,
-0.018284162506461143,
0.03287909924983978,
-0.012300418689846992,
0.033544961363077164,
0.01841013692319393,
0.0005531026981770992,
0.04041951894760132,
0.036586321890354156,
-0.03214125335216522,
0.001101143890991807,
-0.021595468744635582,
0.022117357701063156,
0.04999350756406784,
0.005088432226330042,
-0.006537128239870071,
-0.021451497450470924,
0.009573990479111671,
-0.014378982596099377,
0.041535284370183945,
-0.03615441173315048,
-0.0008705672807991505,
0.018347149714827538,
0.0049984510987997055,
-0.02677837945520878,
0.015539738349616528,
0.07414443790912628,
-0.019759852439165115,
0.026436451822519302,
0.026472443714737892
] |
52,335 |
pgeocode
|
_str_contains_search
| null |
def _str_contains_search(self, text: str, col: str) -> pd.DataFrame:
match_mask = self._data[col].str.lower().str.contains(text.lower())
match_mask.fillna(False, inplace=True)
return self._data[match_mask]
|
(self, text: str, col: str) -> pandas.core.frame.DataFrame
|
[
0.06006816774606705,
-0.0491434708237648,
0.05091122165322304,
0.052396129816770554,
0.012745482847094536,
-0.01221515703946352,
0.03401152417063713,
0.016325177624821663,
0.06289657205343246,
-0.07056860625743866,
0.01273664366453886,
0.014177360571920872,
-0.10033752769231796,
-0.05794686824083328,
-0.03698134422302246,
-0.04511299729347229,
0.0017279762541875243,
0.01783660426735878,
0.027241038158535957,
-0.04592616483569145,
0.009855209849774837,
0.03249125927686691,
0.04663326218724251,
0.042708855122327805,
0.003367565106600523,
-0.014636975713074207,
-0.07056860625743866,
-0.008776882663369179,
0.032650355249643326,
-0.01859673671424389,
0.025261158123612404,
-0.03775915503501892,
-0.04617364704608917,
-0.02778904139995575,
-0.023351985961198807,
-0.05589627847075462,
0.04087039455771446,
-0.06180056557059288,
0.04178962484002113,
-0.047375719994306564,
-0.06950795650482178,
-0.021230686455965042,
0.010217598639428616,
-0.0297512449324131,
0.021654946729540825,
-0.004191779065877199,
0.009766822680830956,
-0.015282204374670982,
-0.015414786525070667,
0.032243773341178894,
-0.02999872900545597,
-0.009581209160387516,
-0.010633020661771297,
-0.02379392459988594,
0.035355012863874435,
0.015184978954494,
-0.024094441905617714,
0.062224823981523514,
0.04599687457084656,
-0.011048441752791405,
0.0002767634578049183,
-0.050416249781847,
-0.05419923737645149,
0.03913800045847893,
-0.02276862971484661,
0.02738245762884617,
0.03984510153532028,
-0.017147181555628777,
0.003422807203605771,
-0.02029377780854702,
-0.020718038082122803,
-0.02883201465010643,
0.029185563325881958,
0.06512393802404404,
-0.002625109860673547,
-0.009333724156022072,
-0.014495555311441422,
-0.01887957751750946,
0.04228459671139717,
-0.02146049402654171,
0.05059302598237991,
-0.02416515164077282,
-0.010244115255773067,
-0.0007855442236177623,
-0.017615634948015213,
-0.016245629638433456,
0.003915567882359028,
0.010553471744060516,
0.0658663883805275,
0.004728733096271753,
0.01054463256150484,
0.02531418949365616,
0.011843929998576641,
0.0026405774988234043,
0.040163297206163406,
-0.00956353172659874,
0.06409864127635956,
0.04939095303416252,
0.000561813241802156,
0.03889051452279091,
-0.014964009635150433,
0.06194198504090309,
0.08004375547170639,
0.015989305451512337,
0.0016561613883823156,
-0.030193181708455086,
-0.03719347342848778,
-0.04850707948207855,
-0.006138514261692762,
0.03853696584701538,
-0.04405234754085541,
-0.020470554009079933,
-0.01537943072617054,
-0.022326691076159477,
0.040941108018159866,
-0.028354721143841743,
-0.08584197610616684,
-0.038996580988168716,
-0.07664967328310013,
0.0066379038617014885,
0.04253208264708519,
0.01640472561120987,
-0.011614122427999973,
-0.024978317320346832,
0.02492528408765793,
0.041436076164245605,
-0.02365250512957573,
-0.05391639471054077,
0.015370592474937439,
0.024907607585191727,
-0.00287480466067791,
0.02469547651708126,
-0.004821539856493473,
-0.014822589233517647,
0.00417189160361886,
0.07509405165910721,
0.000873379351105541,
0.03733489662408829,
0.018039895221590996,
0.042461372911930084,
0.03151899576187134,
0.0336226187646389,
0.017995702102780342,
-0.057310476899147034,
0.04072897508740425,
0.0387844517827034,
0.00452544167637825,
0.04716358706355095,
-0.002642787294462323,
-0.02637484110891819,
-0.0024284475948661566,
-0.06869479268789291,
0.000396639050450176,
0.01834925264120102,
-0.02324592135846615,
0.012851547449827194,
-0.006191547028720379,
-0.007579231169074774,
0.04101181775331497,
0.014530911110341549,
0.051618319004774094,
-0.05960855260491371,
-0.05911358445882797,
0.03217306360602379,
-0.003553178859874606,
0.0737505629658699,
0.0009126013028435409,
-0.008798979222774506,
0.014866783283650875,
-0.04083504155278206,
0.0018218880286440253,
0.0504516065120697,
-0.040127940475940704,
0.04606758430600166,
-0.04847172275185585,
0.03984510153532028,
-0.06349760293960571,
0.03839554637670517,
0.03164273872971535,
0.014230392873287201,
0.015211494639515877,
0.03853696584701538,
-0.01440716814249754,
0.01731511764228344,
0.04274421185255051,
-0.004865733906626701,
-0.007314068730920553,
-0.0021489218343049288,
-0.03333977982401848,
0.028266333043575287,
-0.05600234121084213,
-0.044547319412231445,
0.026074321940541267,
0.009139271453022957,
-0.05098193138837814,
0.005868932232260704,
-0.007380359340459108,
0.01719137467443943,
-0.07594256848096848,
-0.02768297679722309,
0.01796034723520279,
-0.04023400694131851,
0.04953237622976303,
0.02932698465883732,
-0.016245629638433456,
-0.04688074812293053,
0.01834925264120102,
0.024218184873461723,
-0.028796659782528877,
-0.04369879886507988,
-0.01769518479704857,
-0.035355012863874435,
0.018384607508778572,
0.007393617182970047,
0.029945697635412216,
0.036380309611558914,
-0.05236077681183815,
-0.02754155546426773,
0.03698134422302246,
0.0036945990286767483,
0.02508438192307949,
-0.010774440132081509,
0.001716927858069539,
0.02725871652364731,
-0.0022505675442516804,
-0.027612265199422836,
0.008838753215968609,
-0.027329426258802414,
0.029061822220683098,
-0.035637855529785156,
-0.020983200520277023,
0.03952690586447716,
0.018260864540934563,
-0.04886062815785408,
-0.002949933987110853,
0.0028350302018225193,
0.04797675460577011,
0.043875571340322495,
0.09786267578601837,
-0.053598202764987946,
0.018543705344200134,
-0.005851254798471928,
0.002154446206986904,
0.006660000886768103,
0.02248578891158104,
-0.01259522419422865,
-0.00802558846771717,
-0.02313985675573349,
0.028407754376530647,
-0.03204932063817978,
0.007804619148373604,
-0.01759795844554901,
-0.020877135917544365,
-0.06448754668235779,
0.031465962529182434,
-0.06883621215820312,
-0.019038675352931023,
0.057345833629369736,
-0.025526320561766624,
0.06876549869775772,
-0.013169743120670319,
0.0028527076356112957,
0.08357924968004227,
-0.004724313970655203,
-0.04256743565201759,
-0.004971798975020647,
-0.03551411256194115,
0.01085398904979229,
0.03556714579463005,
0.03544340282678604,
-0.03579695150256157,
0.013320001773536205,
0.03189022094011307,
0.014654653146862984,
0.007084261160343885,
0.038466256111860275,
-0.08357924968004227,
-0.007512940559536219,
-0.04461802914738655,
-0.010217598639428616,
0.008414492942392826,
0.013426066376268864,
0.033410489559173584,
-0.020771071314811707,
0.054093170911073685,
-0.08343783020973206,
0.02623341977596283,
-0.04231995344161987,
-0.03189022094011307,
-0.06512393802404404,
-0.07078073918819427,
-0.04574938863515854,
0.01079211849719286,
-0.016360532492399216,
-0.046986814588308334,
0.042850278317928314,
0.06162378937005997,
-0.031589705497026443,
0.008432171307504177,
-0.04313311725854874,
0.028778981417417526,
0.007300810422748327,
0.00159097567666322,
0.02805420383810997,
-0.0020903651602566242,
0.01719137467443943,
-0.0788416787981987,
0.040516845881938934,
-0.013753100298345089,
-0.07000292837619781,
-0.046703971922397614,
-0.027842072769999504,
-0.019162418320775032,
-0.02842543087899685,
-0.04734036326408386,
-0.02379392459988594,
-0.009289530105888844,
0.005104380194097757,
-0.05628518387675285,
-0.027488524094223976,
0.030970992520451546,
-0.0866197869181633,
0.02170797809958458,
-0.031465962529182434,
0.02623341977596283,
0.002956563141196966,
0.06805840134620667,
-0.042602792382240295,
-0.03321603685617447,
0.006735130213201046,
0.06480573862791061,
0.04327453672885895,
0.06498251855373383,
-0.06448754668235779,
0.023440374061465263,
-0.006792582105845213,
-0.009722628630697727,
0.002324592089280486,
0.03864302858710289,
0.04405234754085541,
-0.011181022971868515,
0.005617027636617422,
-0.007291971705853939,
-0.016219113022089005,
0.05670944228768349,
-0.03655708581209183,
-0.012126769870519638,
-0.042991697788238525,
0.011101474054157734,
-0.03143060579895973,
0.03726418316364288,
-0.031183121725916862,
-0.04178962484002113,
-0.014124328270554543,
0.032243773341178894,
0.029238596558570862,
-0.016705244779586792,
0.04985056817531586,
-0.0024593831039965153,
-0.0530325211584568,
0.08619552105665207,
-0.05660337582230568,
-0.005373962223529816,
-0.0193922258913517,
-0.03478933498263359,
0.04486551135778427,
-0.013010645285248756,
0.08131653070449829,
-0.017553765326738358,
-0.007862071506679058,
0.04200175777077675,
-0.004357505589723587,
0.004958540666848421,
0.021425139158964157,
0.021531203761696815,
-0.02987498603761196,
-0.04493622109293938,
0.00014183437451720238,
-0.009510498493909836,
0.01208257582038641,
0.03454184904694557,
-0.006390418857336044,
0.02455405704677105,
-0.016749437898397446,
0.04228459671139717,
0.003610630752518773,
0.020134679973125458,
-0.005426994524896145,
0.023546438664197922,
-0.031094735488295555,
-0.010456245392560959,
-0.013929875567555428,
-0.029026467353105545,
0.05490633845329285,
0.005285574588924646,
-0.03466559201478958,
0.00456079700961709,
0.03162505850195885,
0.0265162605792284,
0.03917335718870163,
-0.015202656388282776,
-0.01048276200890541,
-0.03155434876680374,
-0.027435490861535072,
-0.01591859571635723,
0.09644848108291626,
0.04228459671139717,
-0.054623495787382126,
-0.019816486164927483,
0.061729855835437775,
-0.04567867890000343,
0.0016274354420602322,
0.02093016915023327,
-0.05363355576992035,
-0.06788162887096405,
-0.060669202357530594,
0.04334524646401405,
0.004056987818330526,
-0.021425139158964157,
0.010120373219251633,
0.009740306064486504,
-0.0853470042347908,
0.02830168791115284,
0.040516845881938934,
0.04924953356385231,
0.06229553371667862,
-0.014451362192630768,
-0.06378044188022614,
0.04726965352892876,
-0.04178962484002113,
-0.024907607585191727,
-0.0033322100061923265,
-0.07721535116434097,
-0.045042287558317184,
0.00627551507204771,
-0.003420597640797496,
-0.012268190272152424,
-0.058901455253362656,
-0.03772379830479622,
0.03843089938163757,
0.0010783278848975897,
-0.0439816378057003,
-0.017518408596515656,
0.09241800755262375,
-0.02223830297589302,
-0.005709834862500429,
0.024112120270729065,
0.00897133443504572,
-0.013594002462923527,
0.0017920573009178042,
0.0374763160943985,
0.008847592398524284,
0.016510792076587677,
0.025137415155768394,
-0.018579060211777687,
0.022432755678892136,
0.0010584407718852162,
0.06745737046003342,
-0.025915225967764854,
0.038077350705862045,
-0.018402284011244774,
0.011269411072134972,
-0.04048149287700653,
-0.03063512034714222,
0.007702973671257496,
0.009351401589810848,
-0.030582087114453316,
-0.04433518648147583,
-0.011136829853057861,
-0.015052396804094315,
-0.024978317320346832,
-0.04536048322916031,
-0.01558272261172533,
-0.058371126651763916,
0.04242601618170738,
-0.020718038082122803,
-0.07297275215387344,
0.031112411990761757,
-0.004578474443405867,
0.042213886976242065,
-0.04405234754085541,
-0.008052104152739048,
-0.011782058514654636,
0.001948945107869804,
-0.004061407409608364,
-0.047375719994306564,
0.04034006968140602,
-0.016466597095131874,
0.010456245392560959,
-0.02342269755899906,
0.016652211546897888,
0.07778102904558182,
0.02043519727885723,
0.01474304124712944,
-0.011835090816020966,
0.02948608249425888,
-0.042850278317928314,
0.017880799248814583,
-0.034064557403326035,
0.031731124967336655,
0.038466256111860275,
0.007901845499873161,
-0.09595350921154022,
0.04366344213485718,
-0.021495848894119263,
-0.05246683955192566,
-0.0002525949967093766,
-0.012091415002942085,
0.006845614407211542,
-0.034188300371170044,
-0.005453511141240597,
-0.00027565861819311976,
-0.043486665934324265,
-0.05391639471054077,
0.003606211394071579,
0.023811601102352142,
-0.024589411914348602,
-0.021796366199851036,
-0.07145248353481293,
-0.03775915503501892,
-0.06250766664743423,
0.030352279543876648,
0.006381580140441656,
-0.04942630976438522,
0.04861314594745636,
-0.005908706691116095,
0.05960855260491371,
-0.030281569808721542,
-0.0010606504511088133,
-0.0232635997235775,
-0.03630959987640381,
-0.0051264772191643715,
0.022963082417845726,
0.009864049032330513,
0.07452836632728577,
0.04574938863515854,
0.0556134358048439,
-0.03475397825241089,
0.03698134422302246,
0.038996580988168716,
-0.025650063529610634,
-0.010155728086829185,
0.02246811054646969,
0.029238596558570862,
0.012383094057440758,
0.0035841146018356085,
-0.046739328652620316,
-0.027453169226646423,
-0.06650277972221375,
0.06682097911834717,
-0.0070577445439994335,
-0.07346771657466888,
0.05515382066369057,
0.0219554640352726,
0.004697797354310751,
0.055648792535066605,
-0.027046585455536842,
0.03814806044101715,
-0.060315653681755066,
0.024271216243505478,
0.018022218719124794,
-0.009077399969100952,
0.0710989311337471,
0.04079968482255936,
-0.017094150185585022,
-0.01965738832950592,
-0.013293485157191753,
0.05663873255252838,
-0.006416935008019209,
-0.07346771657466888,
0.02686981111764908,
0.008555913344025612,
0.007088680285960436,
-0.012197479605674744,
-0.004308892413973808,
0.03288016468286514,
0.003248241962864995,
-0.00891830213367939,
-0.00030355594935826957,
0.014469039626419544,
-0.021425139158964157,
-0.016077693551778793,
-0.005656802095472813,
0.05218400061130524,
-0.034594882279634476,
-0.030705830082297325,
0.015344075858592987,
0.022963082417845726,
-0.0672452375292778,
-0.025526320561766624,
0.06240160018205643,
0.024253539741039276,
0.0027289651334285736,
0.0400925874710083,
0.0180840902030468,
0.02573844976723194,
-0.03828947991132736,
0.008869688957929611,
0.04539583623409271,
-0.03349887579679489,
-0.02510206028819084,
-0.001368901925161481,
-0.01693505235016346,
-0.07152319699525833,
0.04030471667647362,
0.019180094823241234,
0.042850278317928314,
0.019074030220508575,
-0.033940814435482025,
-0.004501135088503361,
0.0013556438498198986,
-0.01255103014409542,
-0.018526026979088783,
-0.026710713282227516,
0.01019992120563984,
0.014840267598628998,
-0.029415370896458626,
0.007278713397681713,
0.024536380544304848,
0.0041807303205132484,
0.04366344213485718,
-0.028725948184728622,
0.03659243881702423,
0.02015235833823681,
0.03413526713848114,
0.022273659706115723,
0.007442230358719826,
0.02999872900545597,
-0.026074321940541267,
-0.060704559087753296,
-0.025632385164499283,
0.02017003484070301,
0.013894520699977875,
0.04627971351146698,
-0.004613829310983419,
0.04843636974692345,
-0.02570309489965439,
-0.029574468731880188,
-0.005073444452136755,
-0.003679131157696247,
-0.0138856815174222,
-0.03125383332371712,
0.013328840024769306,
-0.02623341977596283,
-0.02534954436123371,
0.0477999784052372,
0.022326691076159477,
-0.05635589361190796,
-0.01757144182920456,
-0.043875571340322495,
0.03737024962902069,
0.038996580988168716,
0.01613956317305565,
0.025367222726345062,
0.01233890000730753,
-0.02275095134973526,
-0.04256743565201759,
-0.001561144832521677,
0.034471139311790466,
0.015962788835167885,
-0.004887830466032028,
0.011843929998576641,
0.010518116876482964,
-0.006332966964691877,
0.041047170758247375,
0.0413300096988678,
0.0968727394938469,
-0.03836018964648247,
0.021531203761696815,
0.07332629710435867,
0.015688788145780563,
0.03775915503501892,
-0.04666861891746521,
-0.048401013016700745,
0.039350129663944244,
0.05844183638691902,
0.01344374381005764,
-0.08343783020973206,
-0.02998105250298977,
-0.013408388942480087,
-0.00627551507204771,
-0.027859751135110855,
0.0026140613481402397,
0.06399257481098175,
0.030829573050141335,
0.07947807013988495,
-0.009112754836678505,
-0.04030471667647362,
0.05518917739391327,
-0.08202363550662994,
-0.023475728929042816,
-0.025667740032076836,
0.04500693455338478,
-0.011746703647077084,
0.04765855893492699,
0.046350423246622086,
0.0031488060485571623,
-0.04666861891746521,
0.016086531803011894,
0.03920871019363403,
0.018137121573090553,
0.021902430802583694,
0.02029377780854702,
-0.0322791263461113,
0.02299843728542328,
-0.014530911110341549,
0.016448920592665672,
0.036203533411026,
-0.009404433891177177,
-0.01758028008043766,
0.031236154958605766,
-0.012303545139729977,
0.005634705536067486,
-0.008321686647832394,
0.022132238373160362,
0.012179802171885967,
-0.016590340062975883,
-0.03554946556687355,
0.015724143013358116,
-0.02377624623477459,
0.06261373311281204,
0.0310063473880291,
-0.012586385011672974,
0.06024494394659996,
-0.04539583623409271,
0.027983494102954865,
-0.07007363438606262,
-0.000322062085615471,
0.015432463958859444,
0.01850835047662258,
-0.02342269755899906,
0.04422912374138832,
0.018172476440668106,
0.08216505497694016,
-0.057451896369457245,
-0.0362388901412487,
0.00491434708237648,
-0.018437640741467476,
-0.015458979643881321,
0.011994188651442528,
-0.004733152687549591,
0.04288563132286072,
-0.00982869416475296,
-0.02299843728542328,
-0.013249291107058525,
0.053704265505075455,
0.016625694930553436,
0.029026467353105545,
-0.006306450814008713,
0.023564117029309273,
0.02108926512300968,
0.024518702179193497,
-0.011755541898310184,
0.06699775159358978,
-0.02983963117003441,
0.046350423246622086,
-0.004578474443405867,
0.0006148457759991288,
-0.020611973479390144,
0.038218770176172256,
-0.04645648971199989,
-0.0029852890875190496,
-0.06738665699958801,
-0.004635926336050034,
-0.01618375815451145,
-0.025437932461500168,
0.0016882019117474556,
0.08725617825984955
] |
52,336 |
pgeocode
|
query_location
|
Get location information from a place name
Parameters
----------
name: str
string containing place names to search for. The search is case insensitive.
top_k: int
maximum number of results (rows in DataFrame) to return
fuzzy_threshold: Optional[int]
threshold (lower bound) for fuzzy string search for finding the place
name, default None (=no fuzzy search) pass an integer value between
70 and 100 to enable fuzzy search (the lower the value, the more
results) requires 'thefuzz' package to be installed: pip install
thefuzz[speedup]
(for more info: https://github.com/seatgeek/thefuzz)
col: str
which column in the internal data to search through
Returns
-------
df : pandas.DataFrame
a DataFrame with the relevant information for all matching place
names (or empty if no match was found)
|
def query_location(
self,
name: str,
top_k: int = 100,
fuzzy_threshold: int | None = None,
col: str = "place_name",
) -> pd.DataFrame:
"""Get location information from a place name
Parameters
----------
name: str
string containing place names to search for. The search is case insensitive.
top_k: int
maximum number of results (rows in DataFrame) to return
fuzzy_threshold: Optional[int]
threshold (lower bound) for fuzzy string search for finding the place
name, default None (=no fuzzy search) pass an integer value between
70 and 100 to enable fuzzy search (the lower the value, the more
results) requires 'thefuzz' package to be installed: pip install
thefuzz[speedup]
(for more info: https://github.com/seatgeek/thefuzz)
col: str
which column in the internal data to search through
Returns
-------
df : pandas.DataFrame
a DataFrame with the relevant information for all matching place
names (or empty if no match was found)
"""
contains_matches = self._str_contains_search(name, col)
if len(contains_matches) > 0:
return contains_matches.iloc[:top_k]
if fuzzy_threshold is not None:
fuzzy_matches = self._fuzzy_search(name, col, threshold=fuzzy_threshold)
if len(fuzzy_matches) > 0:
return fuzzy_matches.iloc[:top_k]
return pd.DataFrame(columns=self._data.columns)
|
(self, name: str, top_k: int = 100, fuzzy_threshold: Optional[int] = None, col: str = 'place_name') -> pandas.core.frame.DataFrame
|
[
0.04101818799972534,
-0.013181882910430431,
-0.0024704940151423216,
-0.0022797738201916218,
0.035784464329481125,
0.023950930684804916,
0.011132746934890747,
-0.0184688288718462,
0.01617131382226944,
-0.054288774728775024,
-0.035181254148483276,
0.007761875633150339,
-0.08508789539337158,
-0.024199310690164566,
0.02403963729739189,
0.06475622206926346,
0.04048594459891319,
-0.020846180617809296,
0.0008482621051371098,
-0.020455868914723396,
0.026860525831580162,
-0.01861076056957245,
0.02521057240664959,
-0.015647942200303078,
0.030657190829515457,
-0.009677950292825699,
-0.00797920860350132,
-0.019728470593690872,
-0.0008782008080743253,
0.016863228753209114,
-0.029007237404584885,
-0.03220069408416748,
-0.024021895602345467,
0.00870217103511095,
-0.02263806387782097,
-0.05652419477701187,
0.08934584259986877,
-0.05691450834274292,
0.04910827800631523,
-0.05010179802775383,
-0.032644230872392654,
-0.02267354726791382,
-0.013039951212704182,
-0.008342907764017582,
0.0342409610748291,
0.015976157039403915,
0.005699434317648411,
-0.05276301130652428,
0.046801891177892685,
0.007251809351146221,
-0.039385974407196045,
-0.003936379682272673,
-0.03853438422083855,
-0.0007667624158784747,
0.03432966768741608,
-0.05861768499016762,
-0.01447700709104538,
-0.0006298207445070148,
0.024908967316150665,
-0.01663259044289589,
-0.014698774553835392,
0.019604280591011047,
0.0060764397494494915,
0.03493287414312363,
-0.0375763475894928,
0.009465052746236324,
0.030834605917334557,
-0.021378424018621445,
-0.04910827800631523,
-0.014627808704972267,
0.0052558984607458115,
0.01581648550927639,
0.0038765023928135633,
0.05226625129580498,
-0.0005117293912917376,
0.054146844893693924,
-0.01069808192551136,
-0.05872413516044617,
0.04293426126241684,
-0.017324507236480713,
-0.029805602505803108,
-0.017945457249879837,
0.010050520300865173,
-0.0696883350610733,
0.011115006171166897,
0.04314715787768364,
0.039492424577474594,
0.026896007359027863,
0.08742976933717728,
0.046588994562625885,
0.0022598146460950375,
0.02026071399450302,
0.013235107064247131,
-0.001252988469786942,
0.039811767637729645,
-0.020172005519270897,
0.03234262764453888,
0.023578360676765442,
-0.04020208120346069,
0.04357295110821724,
0.0019049861002713442,
0.013802832923829556,
0.04485033452510834,
0.012685122899711132,
-0.015701165422797203,
0.018522052094340324,
-0.010423090308904648,
-0.016002770513296127,
-0.005060743074864149,
0.026629885658621788,
-0.06404656171798706,
-0.027942752465605736,
-0.020668765529990196,
0.014539102092385292,
-0.000831629557069391,
0.013492357917129993,
-0.011079522781074047,
0.014157661236822605,
-0.0338861308991909,
-0.002450535073876381,
0.03470223769545555,
-0.013181882910430431,
0.019692987203598022,
-0.0717463418841362,
-0.04211815446615219,
0.040131114423274994,
-0.024305758997797966,
-0.027694372460246086,
-0.020172005519270897,
-0.0024061815347522497,
0.061775658279657364,
0.0182914137840271,
0.004273466765880585,
-0.03212973102927208,
-0.004151494707912207,
0.09537792950868607,
0.05074049159884453,
-0.002603554865345359,
-0.006462316028773785,
0.01144322194159031,
0.04942762479186058,
0.012809312902390957,
-0.0028519348707050085,
-0.05482101812958717,
0.025618625804781914,
-0.025902487337589264,
-0.04112463444471359,
0.006852627266198397,
-0.007393741048872471,
-0.0684819221496582,
-0.032289404422044754,
-0.019941367208957672,
0.010023907758295536,
-0.019160743802785873,
0.016641462221741676,
-0.045808371156454086,
0.04992438480257988,
-0.02902497909963131,
-0.0055131493136286736,
-0.027126645669341087,
0.038179557770490646,
-0.04793734475970268,
-0.035819947719573975,
-0.04119560122489929,
-0.02934432588517666,
-0.0016721297288313508,
-0.016659202054142952,
-0.022584840655326843,
-0.01433507539331913,
0.01253432035446167,
0.0017597280675545335,
0.04793734475970268,
0.008090091869235039,
0.014414912089705467,
-0.09005549550056458,
-0.046518027782440186,
-0.039669837802648544,
-0.010369866155087948,
0.013048822060227394,
-0.032466817647218704,
-0.0370086245238781,
-0.004124882631003857,
-0.04839862138032913,
-0.05765964835882187,
-0.002765445504337549,
-0.0024571879766881466,
0.0040672230534255505,
0.010139226913452148,
-0.00010533974273130298,
0.08672010898590088,
-0.06745291501283646,
-0.0370795875787735,
0.05804995819926262,
0.0008493709610775113,
-0.0377892442047596,
-0.02521057240664959,
0.012667381204664707,
0.06702712178230286,
-0.03156200423836708,
0.02941529080271721,
-0.04307619109749794,
0.0377892442047596,
0.016330987215042114,
-0.010502927005290985,
0.02050909399986267,
0.025760555639863014,
0.002377351513132453,
-0.025476694107055664,
0.0029960840474814177,
-0.030266879126429558,
-0.016641462221741676,
-0.007234068121761084,
-0.016047123819589615,
0.00011781418288592249,
0.008515886031091213,
0.011292420327663422,
-0.04882441461086273,
-0.016118088737130165,
0.03754086419939995,
0.03463127091526985,
0.02457188069820404,
-0.07163989543914795,
0.06504008173942566,
0.017883362248539925,
-0.017289023846387863,
0.0016577148344367743,
0.00794372521340847,
-0.04343102127313614,
0.0336732342839241,
-0.05141466483473778,
0.0029206830076873302,
-0.07121410220861435,
0.027268577367067337,
-0.08373954892158508,
-0.04793734475970268,
-0.006537716835737228,
0.030071724206209183,
0.01914300210773945,
0.047263167798519135,
-0.05031469464302063,
-0.016153572127223015,
-0.006781661417335272,
-0.005641774740070105,
0.010458572767674923,
-0.0679141953587532,
-0.054608121514320374,
-0.023738034069538116,
-0.04861151799559593,
0.026966974139213562,
-0.053721051663160324,
0.009101353585720062,
-0.0076687331311404705,
0.005184933077543974,
-0.016260020434856415,
0.05918541178107262,
-0.1474667638540268,
-0.0383569709956646,
-0.004113794304430485,
-0.008657817728817463,
0.046872857958078384,
-0.053401704877614975,
0.038853731006383896,
0.0669916421175003,
0.0038543257396668196,
-0.05503391474485397,
-0.02207033894956112,
-0.05109531804919243,
-0.05251463130116463,
-0.0053046876564621925,
-0.017253540456295013,
-0.028900789096951485,
0.06404656171798706,
0.0003648081619758159,
-0.019018812105059624,
-0.025015415623784065,
-0.004286773037165403,
-0.04506323114037514,
0.0034418373834341764,
-0.09842945635318756,
-0.053401704877614975,
0.016428563743829727,
-0.0336022675037384,
-0.012126266956329346,
0.026860525831580162,
0.026949232444167137,
-0.031047502532601357,
-0.0176882054656744,
-0.0017220275476574898,
0.005105096381157637,
-0.008626770228147507,
-0.031686194241046906,
-0.08856521546840668,
-0.009017081931233406,
-0.017173703759908676,
-0.015576975420117378,
-0.02058005891740322,
0.015896322205662727,
0.0003903114702552557,
0.012046431191265583,
-0.023578360676765442,
-0.006484492681920528,
-0.018947847187519073,
0.04804379120469093,
0.0743011087179184,
0.05205335468053818,
0.04431809112429619,
-0.035181254148483276,
-0.01219723280519247,
-0.046305131167173386,
-0.019533313810825348,
-0.027233095839619637,
-0.046163201332092285,
-0.013119787909090519,
-0.07043347507715225,
-0.010476314462721348,
-0.04900183156132698,
-0.0058413660153746605,
-0.02874111756682396,
0.002350739436224103,
0.006697389762848616,
0.012472225353121758,
-0.05758868157863617,
0.007863888517022133,
-0.11191294342279434,
0.039137594401836395,
-0.007988078519701958,
-0.015647942200303078,
0.0003595411544665694,
0.004158147610723972,
-0.0188946221023798,
0.0368666909635067,
0.0023751340340822935,
0.0375763475894928,
-0.002029176102951169,
-0.011540800333023071,
0.027694372460246086,
-0.04956955462694168,
0.05123725160956383,
0.028333064168691635,
0.053401704877614975,
0.028084684163331985,
0.03732796758413315,
-0.004532935563474894,
0.00259468425065279,
0.004364391788840294,
0.0383569709956646,
0.01871720887720585,
-0.023205790668725967,
0.035074807703495026,
-0.039882734417915344,
0.02160906232893467,
-0.045489028096199036,
-0.04488581791520119,
0.012312552891671658,
0.06354980170726776,
0.09658434242010117,
0.022159045562148094,
0.05836930498480797,
0.03732796758413315,
-0.02421705238521099,
0.04768896475434303,
-0.08224926888942719,
0.004038393031805754,
-0.05003083124756813,
-0.02214130386710167,
0.0018617413006722927,
0.040592391043901443,
0.06450784206390381,
-0.015390690416097641,
-0.007393741048872471,
-0.022709030658006668,
-0.030994277447462082,
0.04414067789912224,
0.06518201529979706,
-0.028226615861058235,
0.014219756238162518,
0.03401032090187073,
0.019994592294096947,
-0.030781380832195282,
-0.007792923133820295,
0.05038566142320633,
0.01617131382226944,
0.029983017593622208,
-0.04183429107069969,
0.0731656551361084,
-0.04747606813907623,
-0.06560780853033066,
0.012995597906410694,
-0.009580371901392937,
-0.023099342361092567,
-0.0003088117518927902,
0.016002770513296127,
-0.004878893028944731,
0.02638150565326214,
-0.013314942829310894,
0.03450708091259003,
-0.02521057240664959,
-0.026612145826220512,
-0.08132671564817429,
0.03385064750909805,
0.013900410383939743,
-0.04254394769668579,
-0.0009913024259731174,
-0.014131048694252968,
0.013403650373220444,
0.0188591405749321,
0.005792576819658279,
-0.02528153732419014,
-0.06858836859464645,
0.032573264092206955,
-0.04353746771812439,
-0.06401108205318451,
0.010068261995911598,
-0.01144322194159031,
-0.0684819221496582,
-0.006298207677900791,
-0.011425481177866459,
0.06653036177158356,
0.011602895334362984,
-0.01493828371167183,
-0.0005804774118587375,
-0.0707528218626976,
-0.009030387736856937,
0.060178931802511215,
0.02799597568809986,
0.035500600934028625,
-0.04126656800508499,
-0.05035017803311348,
-0.0009441767469979823,
-0.038427937775850296,
-0.03173941746354103,
-0.028084684163331985,
-0.052727531641721725,
0.013350426219403744,
0.02453639730811119,
0.038250524550676346,
0.010387606918811798,
-0.030444294214248657,
-0.03347807750105858,
-0.022300977259874344,
0.04066335782408714,
-0.03377968445420265,
-0.03138459101319313,
0.06468525528907776,
-0.022975152358412743,
-0.026860525831580162,
0.044992268085479736,
-0.012569802813231945,
0.004608336370438337,
-0.0372924841940403,
0.046340614557266235,
-0.02732180245220661,
0.02510412409901619,
0.013634288683533669,
0.02563636563718319,
0.018681725487113,
-0.05655967816710472,
0.06390462815761566,
-0.0344538576900959,
0.006998993922024965,
0.0031025325879454613,
0.018025292083621025,
0.005681693088263273,
-0.0024106167256832123,
0.010281158611178398,
0.08224926888942719,
0.004284555558115244,
-0.003532762173563242,
0.03294583410024643,
-0.05655967816710472,
0.026399247348308563,
-0.030249137431383133,
-0.059717655181884766,
0.014654421247541904,
0.020065557211637497,
-0.012002076953649521,
-0.035323187708854675,
0.03739893436431885,
0.03393935412168503,
0.02952173911035061,
-0.015896322205662727,
-0.04272136464715004,
-0.02396867237985134,
0.017918843775987625,
0.027126645669341087,
-0.003377524670213461,
-0.02831532247364521,
-0.015647942200303078,
-0.0350925475358963,
-0.02361384406685829,
-0.009935201145708561,
0.060072481632232666,
0.04740510135889053,
-0.0374344177544117,
-0.027516957372426987,
0.0696883350610733,
0.019160743802785873,
0.011913370341062546,
-0.004577288869768381,
0.0052292863838374615,
-0.002729962579905987,
0.028368545696139336,
-0.028049200773239136,
0.024625105783343315,
-0.027233095839619637,
-0.04896634817123413,
0.0743011087179184,
0.0183978620916605,
-0.009243285283446312,
0.019746212288737297,
0.003208981128409505,
0.02058005891740322,
0.03676024451851845,
-0.003982950933277607,
-0.02097037062048912,
0.035642534494400024,
-0.006262724753469229,
-0.030355587601661682,
-0.053401704877614975,
0.004936553072184324,
0.022620324045419693,
0.04140849784016609,
-0.017111608758568764,
-0.053472671657800674,
0.024057378992438316,
-0.00267452048137784,
0.11148714274168015,
0.053721051663160324,
-0.020846180617809296,
-0.0038765023928135633,
-0.024004153907299042,
-0.005907895974814892,
-0.01367864292114973,
0.012028689496219158,
0.12312552332878113,
0.02542346902191639,
-0.029397549107670784,
0.00723850354552269,
-0.0008521430427208543,
0.04410519450902939,
0.010822271928191185,
0.017989810556173325,
0.006320384331047535,
-0.06550136208534241,
-0.019338158890604973,
-0.010866626165807247,
-0.030781380832195282,
-0.017519662156701088,
-0.007881630212068558,
-0.016091477125883102,
0.08537176251411438,
-0.0358731709420681,
0.06936898827552795,
0.030603967607021332,
-0.01069808192551136,
0.10389381647109985,
-0.028262097388505936,
0.005992168094962835,
0.01438829954713583,
-0.02638150565326214,
0.05084693804383278,
0.08806845545768738,
0.07156892865896225,
0.05709192156791687,
-0.017324507236480713,
0.019586538895964622,
-0.05652419477701187,
0.039847251027822495,
-0.04467292129993439,
-0.04964052140712738,
0.002097924007102847,
0.004603900946676731,
0.04233105108141899,
0.008094527758657932,
-0.018087387084960938,
0.01128354948014021,
0.038924697786569595,
-0.01308430451899767,
0.026416989043354988,
0.026896007359027863,
0.023542877286672592,
-0.00958924274891615,
0.007717521861195564,
0.038463421165943146,
-0.030266879126429558,
0.054040394723415375,
0.02100585401058197,
0.022726772353053093,
-0.019373642280697823,
-0.04307619109749794,
0.06333690881729126,
-0.02072199061512947,
-0.005965556018054485,
0.061740174889564514,
0.012507707811892033,
0.009190061129629612,
-0.060640208423137665,
-0.021662285551428795,
0.019799435511231422,
-0.009305380284786224,
-0.003295470727607608,
-0.0336732342839241,
-0.023773515596985817,
-0.05925637483596802,
0.006967946421355009,
0.025796039029955864,
-0.026186350733041763,
0.04921472817659378,
-0.027481475844979286,
0.05588550493121147,
0.03370871767401695,
-0.053117841482162476,
-0.027552440762519836,
0.04272136464715004,
-0.039811767637729645,
-0.007509060204029083,
0.007810664363205433,
0.013962505385279655,
-0.006098616402596235,
-0.019054295495152473,
0.007753004785627127,
0.008431614376604557,
0.010813402011990547,
0.05105983465909958,
0.028049200773239136,
-0.011957723647356033,
-0.008573546074330807,
-0.023294497281312943,
-0.013199623674154282,
0.017430955544114113,
0.013226236216723919,
0.039598871022462845,
-0.023507393896579742,
-0.025015415623784065,
-0.05723385140299797,
0.021768733859062195,
0.028971755877137184,
0.004470840562134981,
-0.04839862138032913,
0.0014414911856874824,
-0.026363765820860863,
0.05517584830522537,
0.01373186707496643,
0.01138999778777361,
-0.0015712253516539931,
0.003805536776781082,
0.02923787757754326,
0.006981252692639828,
0.03305228427052498,
0.03337163105607033,
-0.03287487104535103,
0.061988554894924164,
0.08082995563745499,
0.06436590850353241,
0.045453544706106186,
-0.045914821326732635,
-0.07043347507715225,
-0.008759831078350544,
0.019657503813505173,
0.02277999557554722,
-0.03647638112306595,
-0.04502774775028229,
-0.02538798563182354,
-0.019568797200918198,
-0.019675245508551598,
0.06493363529443741,
0.030373327434062958,
-0.035145774483680725,
-0.02171551063656807,
0.040166597813367844,
-0.00559742096811533,
0.010751307010650635,
0.02411060407757759,
-0.023773515596985817,
0.01861076056957245,
0.04460195451974869,
-0.019391382113099098,
-0.01914300210773945,
-0.0683399885892868,
-0.029184652492403984,
0.0188591405749321,
0.038002144545316696,
0.032147470861673355,
0.0679851621389389,
0.04218912124633789,
0.13171237707138062,
-0.005211545154452324,
0.0020014550536870956,
0.002435011323541403,
-0.027978235855698586,
0.035819947719573975,
0.008915068581700325,
0.019941367208957672,
0.035819947719573975,
0.006524411030113697,
0.04261491447687149,
-0.01694306544959545,
-0.0739462822675705,
0.06440138816833496,
0.009243285283446312,
0.029681412503123283,
0.048008307814598083,
0.002603554865345359,
-0.04289877787232399,
0.01248109620064497,
0.06450784206390381,
0.005872413516044617,
0.052408184856176376,
-0.011425481177866459,
0.0016432999400421977,
-0.006967946421355009,
-0.015417302958667278,
0.008103398606181145,
-0.04151494801044464,
-0.02235420234501362,
0.011505316942930222,
0.038960181176662445,
0.039173077791929245,
0.011638377793133259,
0.023063858970999718,
0.06809160858392715,
0.009305380284786224,
0.0022575969342142344,
0.0018628501566126943,
0.0083473427221179,
0.023755773901939392,
-0.04470840469002724,
-0.011132746934890747,
-0.03441837430000305,
0.0025614190381020308,
-0.04925021156668663,
0.03351356089115143,
0.017705947160720825,
0.05925637483596802,
-0.016260020434856415,
-0.01233916450291872,
0.028545960783958435,
-0.010724694468080997,
0.023667067289352417,
0.018309155479073524,
0.03626348450779915,
0.053046874701976776,
-0.017963197082281113,
-0.022904185578227043,
0.03117169253528118,
0.018087387084960938,
0.009083611890673637,
-0.016925323754549026,
-0.0068969810381531715,
0.04531161114573479,
0.016410822048783302,
-0.009402957744896412,
0.02760566584765911,
0.06404656171798706,
-0.05677257478237152,
0.018734950572252274,
-0.01681000553071499,
0.009624726139008999,
0.005992168094962835,
-0.0020890533924102783,
-0.0368666909635067,
-0.013909281231462955,
-0.07242051512002945,
-0.013456874527037144,
-0.02164454385638237,
-0.020065557211637497,
-0.019480090588331223,
0.04254394769668579
] |
52,337 |
pgeocode
|
query_postal_code
|
Get distance (in km) between postal codes
Parameters
----------
x: array, list or int
a list of postal codes
y: array, list or int
a list of postal codes
Returns
-------
d : array or int
the calculated distances
|
def query_postal_code(self, x, y):
"""Get distance (in km) between postal codes
Parameters
----------
x: array, list or int
a list of postal codes
y: array, list or int
a list of postal codes
Returns
-------
d : array or int
the calculated distances
"""
if isinstance(x, int):
x = str(x)
if isinstance(y, int):
y = str(y)
if isinstance(x, str):
x = [x]
single_x_entry = True
else:
single_x_entry = False
df_x = super().query_postal_code(x)
if isinstance(y, str):
y = [y]
single_y_entry = True
else:
single_y_entry = False
df_y = super().query_postal_code(y)
x_coords = df_x[["latitude", "longitude"]].values
y_coords = df_y[["latitude", "longitude"]].values
if x_coords.shape[0] == y_coords.shape[0]:
pass
elif x_coords.shape[0] == 1:
x_coords = np.repeat(x_coords, y_coords.shape[0], axis=0)
elif y_coords.shape[0] == 1:
y_coords = np.repeat(y_coords, x_coords.shape[0], axis=0)
else:
raise ValueError("x and y must have the same number of elements")
dist = haversine_distance(x_coords, y_coords)
if single_x_entry and single_y_entry:
return dist[0]
else:
return dist
|
(self, x, y)
|
[
0.051972534507513046,
-0.010566148906946182,
0.026152372360229492,
0.06555626541376114,
-0.04713702201843262,
-0.030101990327239037,
-0.058690574020147324,
0.008028428070247173,
0.05149267241358757,
-0.005273846443742514,
-0.0020336376037448645,
0.005038530565798283,
-0.007211742922663689,
0.02044942043721676,
0.004761687945574522,
-0.006528865080326796,
-0.041157227009534836,
-0.012956221587955952,
-0.0008968538022600114,
-0.009790990501642227,
-0.00465787248685956,
-0.01180271152406931,
0.011784255504608154,
0.046029653400182724,
-0.041341789066791534,
0.017607172951102257,
0.051972534507513046,
-0.025857074186205864,
0.017561031505465508,
0.005781390704214573,
0.03857336565852165,
-0.016361381858587265,
-0.03617406636476517,
0.02642921544611454,
0.0158261526376009,
-0.034992869943380356,
0.08534125983715057,
-0.006284321192651987,
-0.020504789426922798,
0.01253172941505909,
-0.09471698850393295,
-0.06603612750768661,
0.06068383902311325,
0.027167461812496185,
0.02022794634103775,
-0.00010576242493698373,
-0.09973706305027008,
-0.0686199888586998,
-0.06068383902311325,
0.021335314959287643,
-0.014995626173913479,
-0.03890557587146759,
0.031892236322164536,
0.00427721394225955,
0.0010923737427219748,
0.05470404401421547,
0.014986398629844189,
0.07124076038599014,
-0.00008420620724791661,
-0.02172289602458477,
-0.014524994418025017,
0.020615525543689728,
0.025377213954925537,
-0.021132297813892365,
-0.019102120772004128,
-0.002180133480578661,
-0.0025423355400562286,
0.004941635765135288,
-0.003915011882781982,
0.04957323521375656,
0.033461008220911026,
0.005070828832685947,
-0.034974414855241776,
-0.017607172951102257,
0.07149914652109146,
0.1017303317785263,
0.010049376636743546,
0.023088650777935982,
0.05020074173808098,
0.0015560846077278256,
0.005569145083427429,
-0.02663223259150982,
0.0499054454267025,
-0.020818542689085007,
0.04351961612701416,
0.026761425659060478,
0.048982635140419006,
0.08039501309394836,
0.033774763345718384,
-0.003562038065865636,
-0.041157227009534836,
0.011304395273327827,
0.02153833396732807,
0.006865689996629953,
0.004041898064315319,
0.01161814946681261,
0.0010946807451546192,
0.024196019396185875,
-0.01882527954876423,
0.0032205991446971893,
0.07142531871795654,
0.02962213009595871,
0.0835694745182991,
-0.007567023858428001,
0.002733818022534251,
0.005260004196316004,
0.007908462546765804,
-0.06075766310095787,
-0.030766410753130913,
0.07729437947273254,
-0.09420021623373032,
-0.04004985839128494,
0.016813557595014572,
-0.045918915420770645,
-0.058432187885046005,
-0.0009233845048584044,
0.020855456590652466,
0.04200620949268341,
-0.028883883729577065,
0.007364006247371435,
0.006718040443956852,
0.0659622997045517,
-0.012587098404765129,
0.002044019289314747,
-0.01171043049544096,
-0.012384080328047276,
0.04145252704620361,
0.0027891865465790033,
-0.018373101949691772,
0.0019874973222613335,
0.04964705929160118,
0.02329166792333126,
-0.008009971119463444,
0.041378699243068695,
0.012587098404765129,
0.025524863973259926,
0.03126472607254982,
-0.0060766893438994884,
0.05732481926679611,
-0.01712731271982193,
0.03901631385087967,
-0.007142532151192427,
0.0805426612496376,
-0.004775530193001032,
-0.02633693441748619,
0.06913676112890244,
-0.016795100644230843,
0.058432187885046005,
0.007557795848697424,
-0.026798337697982788,
-0.03739217296242714,
0.0400867685675621,
0.09479081630706787,
-0.011452044360339642,
-0.01161814946681261,
-0.05503625422716141,
0.02343931794166565,
-0.009966324083507061,
0.06094222515821457,
0.027388934046030045,
0.009532604366540909,
-0.006201268173754215,
0.025654057040810585,
-0.04831821471452713,
-0.019286682829260826,
-0.02020949125289917,
-0.021353771910071373,
-0.024454405531287193,
-0.014608046971261501,
-0.016628995537757874,
0.001862918259575963,
0.027702689170837402,
-0.014257379807531834,
-0.033442553132772446,
-0.009707937948405743,
-0.010243166238069534,
-0.0028976164758205414,
0.005006232298910618,
0.011129061691462994,
-0.02163061499595642,
-0.00010561823728494346,
-0.0033751693554222584,
-0.014386572875082493,
0.03783511742949486,
0.024011459201574326,
0.058690574020147324,
0.013011589646339417,
-0.019840367138385773,
0.02624465338885784,
0.04370417818427086,
-0.022405773401260376,
-0.04481154680252075,
-0.027518127113580704,
0.03240900859236717,
-0.002948370762169361,
-0.0018709928262978792,
0.01575232855975628,
0.033350273966789246,
-0.0956767126917839,
0.018170084804296494,
-0.04728467017412186,
0.003448994131758809,
-0.03410697728395462,
0.010510780848562717,
-0.020504789426922798,
0.0007376694702543318,
-0.04783835634589195,
0.038314979523420334,
-0.04473772272467613,
-0.04326122999191284,
0.05769394338130951,
-0.0295852180570364,
-0.06821395456790924,
-0.0024246773682534695,
0.03560192510485649,
-0.029216093942523003,
0.020597070455551147,
-0.007756199222058058,
0.0589858740568161,
-0.03399623930454254,
0.055220816284418106,
-0.05640201270580292,
0.02954830415546894,
0.009384955279529095,
0.03872101381421089,
-0.003744292538613081,
0.035214345902204514,
0.07596553862094879,
0.032058343291282654,
-0.061643559485673904,
-0.0030406515579670668,
-0.07031795382499695,
-0.00009963440243154764,
-0.044368598610162735,
-0.002461589640006423,
-0.08991838991641998,
0.03560192510485649,
-0.027278197929263115,
0.013657554984092712,
-0.0044433195143938065,
-0.0068703037686645985,
-0.012993133626878262,
0.009846358560025692,
-0.012208746746182442,
-0.03864718973636627,
-0.02323629893362522,
-0.011470500379800797,
0.01716422475874424,
0.024454405531287193,
-0.02666914463043213,
-0.04842895269393921,
-0.018225453794002533,
0.04230150952935219,
-0.0115812374278903,
0.03229827061295509,
-0.07810644805431366,
0.0028768533375114202,
0.033276449888944626,
0.026226196438074112,
-0.009551060386002064,
0.006108987610787153,
-0.0436672642827034,
0.0014695713762193918,
-0.026152372360229492,
-0.039939120411872864,
0.024177564308047295,
-0.004692477639764547,
0.02321784384548664,
0.015318608842790127,
0.008392936550080776,
-0.02945602498948574,
0.005195407662540674,
-0.041194140911102295,
-0.0012815493391826749,
0.004249529913067818,
0.06636833399534225,
0.045992739498615265,
-0.013694467023015022,
-0.036395538598299026,
-0.01690583862364292,
-0.01321460772305727,
-0.03552810102701187,
-0.0028076425660401583,
-0.001882527838461101,
0.004471003543585539,
-0.046140387654304504,
0.05717717111110687,
-0.030268095433712006,
0.044331684708595276,
0.0015745407436043024,
-0.03547273203730583,
-0.005163109395653009,
-0.022627247497439384,
0.02635538950562477,
0.029105357825756073,
0.0034028536174446344,
0.03298114985227585,
-0.03442072868347168,
-0.005458408035337925,
-0.0007238273392431438,
-0.07618700712919235,
0.030046621337532997,
0.07596553862094879,
0.037908945232629776,
-0.005749092437326908,
0.016693592071533203,
0.05023765563964844,
-0.009011218324303627,
0.022368861362338066,
-0.0005216747522354126,
-0.019175944849848747,
-0.005707566160708666,
-0.02827483043074608,
-0.04994235560297966,
-0.022737983614206314,
0.026890618726611137,
-0.007124076131731272,
0.0625663697719574,
-0.03846262767910957,
0.0337563082575798,
-0.0008507134043611586,
-0.0032436694018542767,
0.008923551067709923,
0.03157848119735718,
0.05396579951047897,
0.0336640290915966,
0.003206757130101323,
0.014082047156989574,
0.05809997767210007,
0.019046751782298088,
0.06555626541376114,
0.00468324963003397,
0.009726393967866898,
-0.0015410890337079763,
0.10778395086526871,
-0.021040016785264015,
0.013380712829530239,
-0.010104745626449585,
-0.019046751782298088,
-0.002828405937179923,
-0.04171091318130493,
0.009781762026250362,
-0.006030548829585314,
-0.002039405284449458,
0.009772534482181072,
-0.01891755871474743,
-0.0408250167965889,
-0.0046717142686247826,
-0.008766673505306244,
-0.012033413164317608,
-0.027758058160543442,
0.04473772272467613,
-0.007705444935709238,
-0.013362256810069084,
0.05732481926679611,
0.03849954158067703,
-0.008240673691034317,
-0.012217975221574306,
0.01570618897676468,
0.049167197197675705,
0.031763043254613876,
-0.041378699243068695,
-0.019323594868183136,
-0.014672643505036831,
-0.027204373851418495,
0.003206757130101323,
-0.02056015655398369,
-0.01095372810959816,
-0.024288300424814224,
0.02041250839829445,
-0.03438381850719452,
-0.0529322549700737,
-0.02818254940211773,
0.03595259040594101,
0.025986267253756523,
0.04680481180548668,
0.030821779742836952,
0.0316523052752018,
-0.06588847190141678,
0.02168598212301731,
-0.028939252719283104,
-0.02954830415546894,
0.012005729600787163,
0.018280822783708572,
0.022424228489398956,
-0.016186049208045006,
0.015023310668766499,
-0.013565273955464363,
-0.03163385018706322,
0.00537535548210144,
-0.020504789426922798,
-0.033627115190029144,
0.033461008220911026,
0.007064093369990587,
-0.026115460321307182,
0.014026678167283535,
-0.017413383349776268,
0.00695335678756237,
-0.025358757004141808,
-0.0017175759421661496,
-0.002281642286106944,
-0.04171091318130493,
0.001929821795783937,
0.044220950454473495,
-0.01088913157582283,
-0.031726133078336716,
-0.02157524600625038,
-0.024269845336675644,
-0.013805204071104527,
0.06345226615667343,
-0.05319064110517502,
-0.024048371240496635,
0.09360962361097336,
-0.01708117127418518,
-0.07921382039785385,
-0.01397131010890007,
-0.03229827061295509,
0.020781630650162697,
-0.008240673691034317,
0.02663223259150982,
0.02170443907380104,
-0.07877086848020554,
-0.0233470369130373,
-0.005546074826270342,
0.0348636768758297,
-0.028828514739871025,
-0.019268225878477097,
-0.034826766699552536,
0.01886219158768654,
-0.00353435380384326,
0.011858079582452774,
-0.001437273109331727,
-0.05440874770283699,
-0.036672379821538925,
0.002849169075489044,
0.0835694745182991,
0.022479597479104996,
0.022959457710385323,
0.07744202762842178,
-0.03554655611515045,
-0.007391690276563168,
0.010049376636743546,
0.0038642575964331627,
0.014580362476408482,
-0.03292578086256981,
-0.11634760349988937,
-0.005569145083427429,
-0.08460301905870438,
-0.017985522747039795,
-0.06766026467084885,
0.005956724286079407,
-0.06367373466491699,
0.017477979883551598,
-0.008706691674888134,
0.027610408142209053,
0.021649070084095,
-0.061385173350572586,
-0.033534836024045944,
-0.030581850558519363,
0.07795879989862442,
0.01703503169119358,
0.022147387266159058,
0.005121583119034767,
0.02956676110625267,
-0.025358757004141808,
0.0344945564866066,
-0.03152311220765114,
-0.0016160671366378665,
0.010252394713461399,
0.012033413164317608,
0.04041898250579834,
-0.010833763517439365,
-0.04241224378347397,
0.008706691674888134,
0.007931533269584179,
0.03150465711951256,
-0.013611414469778538,
0.0006805707234889269,
-0.002874546218663454,
-0.028293287381529808,
-0.0631200522184372,
-0.006224338430911303,
0.013131554238498211,
-0.027038268744945526,
0.020781630650162697,
-0.039828382432460785,
0.017717909067869186,
-0.0468786358833313,
-0.004637109115719795,
-0.019120577722787857,
0.006648830138146877,
0.07511655241250992,
0.052230920642614365,
-0.028440935537219048,
-0.027647320181131363,
0.006884146016091108,
0.04680481180548668,
-0.04267062991857529,
0.03272276371717453,
0.01004014816135168,
0.005084671080112457,
0.009241919964551926,
-0.01852075196802616,
-0.020984649658203125,
0.056881871074438095,
0.04835512861609459,
-0.01874222606420517,
0.05728790536522865,
-0.06352608650922775,
0.052341658622026443,
-0.11642143130302429,
-0.06264019012451172,
0.09774380177259445,
0.01013242918998003,
-0.026909075677394867,
0.0499054454267025,
-0.004191854503005743,
0.0035158975515514612,
-0.031098622828722,
0.022571878507733345,
-0.00018917559646070004,
0.08792512863874435,
-0.027647320181131363,
-0.058506011962890625,
0.00234047113917768,
0.05747246742248535,
0.02635538950562477,
-0.019378963857889175,
-0.01584460958838463,
-0.011405903846025467,
-0.03868410363793373,
-0.02314401976764202,
0.006436584051698446,
0.006344303488731384,
0.03447609767317772,
0.050680603832006454,
-0.033221080899238586,
-0.04049280658364296,
0.002733818022534251,
0.03774283826351166,
0.009334200993180275,
-0.025783250108361244,
-0.022996369749307632,
-0.05714025720953941,
-0.012042641639709473,
0.006528865080326796,
-0.025930898264050484,
0.018142400309443474,
0.013823660090565681,
0.03584185242652893,
0.06094222515821457,
-0.00047149710007943213,
0.10667657852172852,
0.035325080156326294,
0.022479597479104996,
0.05138193815946579,
-0.04938867315649986,
-0.00866055116057396,
0.022682614624500275,
0.008360638283193111,
0.02024640329182148,
-0.032076798379421234,
0.034679114818573,
0.018400786444544792,
-0.10719335079193115,
0.04244915768504143,
-0.02358696609735489,
0.022184299305081367,
-0.04359344020485878,
-0.02982514724135399,
-0.04551288112998009,
0.02177826315164566,
-0.08659628033638,
0.014229696244001389,
-0.028939252719283104,
0.013011589646339417,
-0.03704150393605232,
-0.13221989572048187,
-0.008900481276214123,
-0.03434690460562706,
-0.011165973730385303,
0.029216093942523003,
-0.0016760496655479074,
0.00011390908184694126,
0.008628252893686295,
0.06075766310095787,
-0.04019750654697418,
-0.03432844951748848,
-0.0014453476760536432,
-0.023623879998922348,
-0.022184299305081367,
-0.05913352221250534,
-0.01731187477707863,
0.02174135111272335,
-0.0233470369130373,
0.03239055350422859,
-0.050532955676317215,
0.017551803961396217,
0.030600305646657944,
-0.03111707791686058,
0.0015906898770481348,
0.011249027214944363,
-0.027352022007107735,
-0.050532955676317215,
0.09877734631299973,
0.023863809183239937,
-0.04813365265727043,
-0.04307666793465614,
-0.08371712267398834,
-0.055405378341674805,
0.01561390794813633,
-0.011046009138226509,
0.01705348864197731,
-0.010021692141890526,
-0.002530800411477685,
-0.045918915420770645,
0.008162234909832478,
0.004620959982275963,
-0.0404558926820755,
0.0231624748557806,
-0.03237209841609001,
0.008097638376057148,
0.04019750654697418,
-0.0027315111365169287,
0.02345777302980423,
-0.0028699322137981653,
0.022941000759601593,
0.06278783828020096,
0.026078548282384872,
0.04783835634589195,
0.02631847746670246,
0.04673098772764206,
0.05304299294948578,
-0.06286166608333588,
0.013399168848991394,
0.0022631860338151455,
0.014331204816699028,
-0.013325344771146774,
-0.06297240406274796,
0.060240890830755234,
-0.03296269476413727,
0.023679247125983238,
-0.03538044914603233,
0.027315109968185425,
-0.0041387928649783134,
-0.0495363213121891,
-0.008905095048248768,
-0.01485720556229353,
0.006985655054450035,
-0.0034351518843322992,
-0.036524731665849686,
0.011811939999461174,
0.030360376462340355,
0.02015412226319313,
0.001356527442112565,
-0.009717165492475033,
-0.07271724939346313,
-0.003338257083669305,
-0.0064550405368208885,
-0.03600795939564705,
0.004413328133523464,
0.016509031876921654,
-0.058469101786613464,
-0.04204312339425087,
-0.027370478957891464,
-0.01413741521537304,
0.03390395641326904,
-0.027222828939557076,
0.02805335633456707,
0.004203389398753643,
0.03608178347349167,
0.02046787738800049,
-0.0018744532717391849,
0.05134502425789833,
-0.01866840198636055,
-0.016269100829958916,
-0.022479597479104996,
-0.022184299305081367,
-0.019175944849848747,
0.032224446535110474,
-0.005762934684753418,
0.016693592071533203,
-0.0037489065434783697,
0.04783835634589195,
-0.003575880080461502,
0.034919045865535736,
0.0369676798582077,
0.02043096348643303,
0.0110090970993042,
0.01400822214782238,
0.03538044914603233,
-0.06625759601593018,
0.047616880387067795,
0.008535971865057945,
0.01486643310636282,
0.013242291286587715,
-0.06754952669143677,
-0.041083402931690216,
0.0006315466016530991,
0.005509162321686745,
-0.0017464137636125088,
0.016149135306477547,
-0.016066083684563637,
0.02026485837996006,
0.0008022660040296614,
0.01180271152406931,
-0.03909013792872429,
0.045992739498615265,
0.03292578086256981,
-0.005509162321686745,
0.027388934046030045,
-0.03700459375977516,
0.029234550893306732,
-0.025912443175911903,
-0.009477236308157444,
0.05407653748989105,
0.007193286437541246,
0.016684364527463913,
0.045771267265081406,
-0.007170216646045446,
0.02157524600625038,
-0.007142532151192427,
0.025949355214834213,
0.022553421556949615,
-0.058210715651512146,
0.020855456590652466,
0.02035713940858841,
-0.08098561316728592,
-0.04097266495227814,
-0.025672512128949165,
-0.11058928072452545,
0.02017257735133171,
0.02203664928674698,
0.008637480437755585,
-0.044184036552906036,
0.011590465903282166,
0.003229827154427767,
-0.008236058987677097,
-0.002394686220213771,
0.004761687945574522,
-0.010639973916113377,
-0.028846971690654755,
0.010935272090137005,
-0.021482964977622032,
0.04809674248099327,
0.05108663812279701,
0.0057029519230127335,
0.003096020082011819,
-0.030341919511556625,
-0.06013015657663345,
0.041194140911102295,
0.047432318329811096,
0.01489411760121584,
0.019452787935733795,
-0.030766410753130913,
0.026189284399151802,
-0.009606429375708103,
-0.04817056655883789,
-0.021353771910071373,
-0.022424228489398956,
-0.03312879800796509,
0.04728467017412186,
-0.07061325013637543,
0.009269604459404945,
0.02048633247613907,
0.013731379993259907,
-0.018954472616314888,
0.10003236681222916
] |
52,338 |
pgeocode
|
Nominatim
|
Query geographical location from a city name or a postal code
Parameters
----------
country: str, default='fr'
country code. See the documentation for a list of supported countries.
unique: bool, default=True
Create unique postcode index, merging all places with the same postcode
into a single entry
|
class Nominatim:
"""Query geographical location from a city name or a postal code
Parameters
----------
country: str, default='fr'
country code. See the documentation for a list of supported countries.
unique: bool, default=True
Create unique postcode index, merging all places with the same postcode
into a single entry
"""
def __init__(self, country: str = "fr", unique: bool = True):
country = country.upper()
if country not in COUNTRIES_VALID:
raise ValueError(
f"country={country} is not a known country code. "
"See the README for a list of supported "
"countries"
)
if country == "AR":
warnings.warn(
"The Argentina data file contains 4-digit postal "
"codes which were replaced with a new system "
"in 1999."
)
self.country = country
self._data_path, self._data = self._get_data(country)
if unique:
self._data_frame = self._index_postal_codes()
else:
self._data_frame = self._data
self.unique = unique
@staticmethod
def _get_data(country: str) -> tuple[str, pd.DataFrame]:
"""Load the data from disk; otherwise download and save it"""
data_path = os.path.join(STORAGE_DIR, country.upper() + ".txt")
if os.path.exists(data_path):
data = pd.read_csv(
data_path,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
download_urls = [val.format(country=country) for val in DOWNLOAD_URL]
with _open_extract_cycle_url(download_urls, country) as fh:
data = pd.read_csv(
fh,
sep="\t",
header=None,
names=DATA_FIELDS,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
os.makedirs(STORAGE_DIR, exist_ok=True)
data.to_csv(data_path, index=None)
return data_path, data
def _index_postal_codes(self) -> pd.DataFrame:
"""Create a dataframe with unique postal codes"""
data_path_unique = self._data_path.replace(".txt", "-index.txt")
if os.path.exists(data_path_unique):
data_unique = pd.read_csv(
data_path_unique,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
# group together places with the same postal code
df_unique_cp_group = self._data.groupby("postal_code")
data_unique = df_unique_cp_group[["latitude", "longitude"]].mean()
valid_keys = set(DATA_FIELDS).difference(
["place_name", "latitude", "longitude", "postal_code"]
)
data_unique["place_name"] = df_unique_cp_group["place_name"].apply(
lambda x: ", ".join([str(el) for el in x])
)
for key in valid_keys:
data_unique[key] = df_unique_cp_group[key].first()
data_unique = data_unique.reset_index()[DATA_FIELDS]
data_unique.to_csv(data_path_unique, index=None)
return data_unique
def _normalize_postal_code(self, codes: pd.DataFrame) -> pd.DataFrame:
"""Normalize postal codes to the values contained in the database
For instance, take into account only first letters when applicable.
Takes in a pd.DataFrame
"""
codes["postal_code"] = codes.postal_code.str.upper()
if self.country in ["GB", "IE", "CA"]:
codes["postal_code"] = codes.postal_code.str.split().str.get(0)
else:
pass
return codes
def query_postal_code(self, codes):
"""Get locations information from postal codes
Parameters
----------
codes: array, list or int
an array of strings containing postal codes
Returns
-------
df : pandas.DataFrame
a pandas.DataFrame with the relevant information
"""
if isinstance(codes, int):
codes = str(codes)
if isinstance(codes, str):
codes = [codes]
single_entry = True
else:
single_entry = False
if not isinstance(codes, pd.DataFrame):
codes = pd.DataFrame(codes, columns=["postal_code"])
codes = self._normalize_postal_code(codes)
response = pd.merge(codes, self._data_frame, on="postal_code", how="left")
if self.unique and single_entry:
response = response.iloc[0]
return response
def query_location(
self,
name: str,
top_k: int = 100,
fuzzy_threshold: int | None = None,
col: str = "place_name",
) -> pd.DataFrame:
"""Get location information from a place name
Parameters
----------
name: str
string containing place names to search for. The search is case insensitive.
top_k: int
maximum number of results (rows in DataFrame) to return
fuzzy_threshold: Optional[int]
threshold (lower bound) for fuzzy string search for finding the place
name, default None (=no fuzzy search) pass an integer value between
70 and 100 to enable fuzzy search (the lower the value, the more
results) requires 'thefuzz' package to be installed: pip install
thefuzz[speedup]
(for more info: https://github.com/seatgeek/thefuzz)
col: str
which column in the internal data to search through
Returns
-------
df : pandas.DataFrame
a DataFrame with the relevant information for all matching place
names (or empty if no match was found)
"""
contains_matches = self._str_contains_search(name, col)
if len(contains_matches) > 0:
return contains_matches.iloc[:top_k]
if fuzzy_threshold is not None:
fuzzy_matches = self._fuzzy_search(name, col, threshold=fuzzy_threshold)
if len(fuzzy_matches) > 0:
return fuzzy_matches.iloc[:top_k]
return pd.DataFrame(columns=self._data.columns)
def _str_contains_search(self, text: str, col: str) -> pd.DataFrame:
match_mask = self._data[col].str.lower().str.contains(text.lower())
match_mask.fillna(False, inplace=True)
return self._data[match_mask]
def _fuzzy_search(self, text: str, col: str, threshold: float = 80) -> pd.DataFrame:
try:
# thefuzz is not required to install pgeocode,
# it is an optional dependency for enabling fuzzy search
from thefuzz import fuzz
except ModuleNotFoundError as err:
raise ModuleNotFoundError(
"Cannot use fuzzy search without 'thefuzz' package. "
"It can be installed with: pip install thefuzz[speedup]"
) from err
fuzzy_scores = self._data[col].apply(lambda x: fuzz.ratio(str(x), text))
return self._data[fuzzy_scores >= threshold]
|
(country: str = 'fr', unique: bool = True)
|
[
0.06969379633665085,
-0.022925592958927155,
-0.0068776775151491165,
0.03797311708331108,
-0.007362241391092539,
-0.061357222497463226,
-0.03169983997941017,
-0.05798090621829033,
0.060231782495975494,
-0.08478301018476486,
-0.033658936619758606,
0.031637318432331085,
-0.05839773640036583,
0.029282232746481895,
0.005689715035259724,
0.030032524839043617,
-0.03251265734434128,
0.051728472113609314,
-0.017444292083382607,
-0.004275101702660322,
-0.02467627450823784,
-0.001960398629307747,
-0.023884298279881477,
0.025155626237392426,
0.026218540966510773,
-0.004225603304803371,
0.0028370420914143324,
-0.024259444326162338,
0.01697535812854767,
-0.008232371881604195,
0.04618464782834053,
-0.02265465259552002,
-0.03688936308026314,
-0.01014457456767559,
-0.030220098793506622,
-0.06915192306041718,
0.07361198961734772,
-0.01721503585577011,
0.019007399678230286,
0.0045851184986531734,
-0.06940201669931412,
-0.06298285722732544,
-0.0033997611608356237,
-0.033867351710796356,
0.010993863455951214,
0.018767723813652992,
-0.03272107243537903,
-0.04272496700286865,
0.005575087387114763,
-0.02438449300825596,
-0.03686852008104324,
0.0064816903322935104,
-0.007122564595192671,
0.03128301352262497,
0.004415781702846289,
0.0052129668183624744,
-0.037785544991493225,
0.08011452108621597,
0.02917802706360817,
-0.05106154456734657,
-0.01776733435690403,
0.0015813448699191213,
0.01170247234404087,
0.011858783662319183,
-0.02438449300825596,
0.035888973623514175,
0.04130774736404419,
-0.02959485538303852,
-0.02332158014178276,
-0.007388293277472258,
0.02492637187242508,
0.030720293521881104,
-0.005439617671072483,
0.025947602465748787,
0.03784807026386261,
0.05777249112725258,
-0.02538488246500492,
-0.043516941368579865,
0.020237045362591743,
-0.0027276244945824146,
0.012556971982121468,
-0.014432702213525772,
0.047768596559762955,
-0.04964432865381241,
0.043266844004392624,
-0.00320437247864902,
0.07332020998001099,
0.05902297794818878,
0.0366392657160759,
0.0071642473340034485,
-0.025739187374711037,
0.033700618892908096,
0.05089481547474861,
0.006314958445727825,
0.03297116979956627,
-0.04472574591636658,
0.008544993586838245,
0.016860730946063995,
-0.017954906448721886,
-0.018090376630425453,
0.02648947946727276,
0.03974464163184166,
0.02678125910460949,
-0.009988263249397278,
-0.015724871307611465,
0.010128943249583244,
-0.004030215088278055,
0.009482858702540398,
-0.018767723813652992,
0.004230813588947058,
-0.163396954536438,
-0.04055745527148247,
0.006174278911203146,
-0.025968443602323532,
0.028990453109145164,
-0.009545383043587208,
-0.0039051661733537912,
0.05106154456734657,
-0.06560887396335602,
0.016360536217689514,
0.0002132991940015927,
0.046309694647789,
-0.04489247873425484,
0.007091302424669266,
-0.009237971156835556,
-0.041828785091638565,
0.03313790261745453,
-0.004632011521607637,
0.029282232746481895,
-0.028302686288952827,
0.03355472907423973,
0.02484300546348095,
0.0072371927089989185,
-0.006403534673154354,
0.0075706555508077145,
0.01625632867217064,
0.03205414488911629,
0.011942149139940739,
-0.01839257776737213,
0.03891098126769066,
0.056271906942129135,
-0.02669789455831051,
0.016100017353892326,
-0.04147448018193245,
0.03520120307803154,
0.010003894567489624,
-0.017704809084534645,
0.013942928053438663,
-0.032950326800346375,
-0.07969769835472107,
-0.0038582729175686836,
-0.037410397082567215,
-0.01246318593621254,
-0.012723703868687153,
0.013046746142208576,
-0.0783221572637558,
0.025989284738898277,
-0.024572066962718964,
0.004947238601744175,
0.012515288777649403,
0.019611801952123642,
-0.03801479935646057,
-0.0020672110840678215,
-0.001559200813062489,
-0.056730419397354126,
0.01591244526207447,
0.014151343144476414,
-0.06669262796640396,
-0.022758860141038895,
0.003957269713282585,
0.02665621042251587,
0.060857027769088745,
-0.021862678229808807,
0.0013481811620295048,
-0.07719672471284866,
0.05001947283744812,
-0.008393893018364906,
-0.01970558799803257,
0.017162932083010674,
0.0067265769466757774,
-0.0450592078268528,
-0.020831026136875153,
-0.07131943106651306,
-0.005720977205783129,
0.024030188098549843,
0.02732313796877861,
0.02125827595591545,
-0.031387221068143845,
0.08407440036535263,
0.06715114414691925,
-0.028323527425527573,
-0.056396957486867905,
0.02753155119717121,
0.014693220146000385,
0.03184572979807854,
-0.06206582859158516,
0.011098071001470089,
0.026239382103085518,
-0.04255823418498039,
-0.020007789134979248,
-0.028907086700201035,
0.0357847660779953,
0.04055745527148247,
-0.0037931434344500303,
-0.04476742818951607,
0.005106154829263687,
-0.0661090686917305,
0.01233813725411892,
-0.002252178965136409,
0.010061209090054035,
0.01582907885313034,
-0.06369145959615707,
-0.018215425312519073,
0.010014315135776997,
0.027635758742690086,
-0.06427502632141113,
0.0025309333577752113,
0.0016386588104069233,
0.07898908853530884,
0.0231548473238945,
0.048143744468688965,
-0.07477911561727524,
0.012390240095555782,
-0.01281748991459608,
0.04247486963868141,
-0.018163321539759636,
0.0036550688091665506,
0.07502920925617218,
0.05985663831233978,
-0.0610654391348362,
-0.0014094029320403934,
-0.06448344141244888,
-0.004772691521793604,
-0.06510867923498154,
-0.0025856420397758484,
-0.0985383614897728,
0.04297506436705589,
0.01574571430683136,
0.044100504368543625,
-0.026677053421735764,
-0.023008957505226135,
-0.04580949991941452,
0.03582644835114479,
-0.010227940045297146,
-0.06931865215301514,
-0.04122438281774521,
0.017298400402069092,
0.004457464441657066,
0.028365209698677063,
-0.06685936450958252,
-0.011942149139940739,
-0.030220098793506622,
-0.028406891971826553,
-0.0019734245724976063,
0.06281612068414688,
-0.09745460748672485,
-0.017944486811757088,
0.03078281693160534,
0.01061350665986538,
0.019122028723359108,
-0.0011840547667816281,
-0.019736850634217262,
0.044392284005880356,
0.012119301594793797,
-0.04180794209241867,
0.0032147932797670364,
-0.018934454768896103,
-0.03144974261522293,
-0.007575866300612688,
-0.016110438853502274,
0.011796259321272373,
0.06510867923498154,
-0.03488858416676521,
-0.009602696634829044,
-0.039848849177360535,
0.02757323533296585,
-0.004254260566085577,
-0.04051577299833298,
-0.10253991931676865,
-0.03507615625858307,
-0.004608565010130405,
-0.012411082163453102,
0.017444292083382607,
-0.04530930519104004,
0.02062261290848255,
-0.044350601732730865,
-0.013640726916491985,
-0.01944507099688053,
0.020184941589832306,
-0.014693220146000385,
-0.04676820710301399,
-0.04610128328204155,
-0.0030767186544835567,
0.043558623641729355,
-0.0017376557225361466,
-0.0013638122472912073,
0.039765480905771255,
-0.03217919543385506,
-0.023092323914170265,
-0.05418776348233223,
-0.09186910092830658,
0.001951280515640974,
0.13438564538955688,
0.027177248150110245,
0.002243060851469636,
0.026927150785923004,
-0.02344662882387638,
-0.01797574758529663,
-0.008987873792648315,
-0.0154747748747468,
-0.020476721227169037,
-0.014630695804953575,
-0.0025517747271806,
-0.00983195286244154,
-0.010847973637282848,
-0.06348305195569992,
-0.014891213737428188,
0.020059892907738686,
0.012431923300027847,
0.014213867485523224,
-0.01818416267633438,
-0.052895594388246536,
0.02340494468808174,
-0.04530930519104004,
0.04510089382529259,
-0.022550446912646294,
0.02492637187242508,
-0.0002391881716903299,
0.026447797194123268,
-0.006752628833055496,
0.05056134983897209,
-0.015485195443034172,
0.016725260764360428,
0.03507615625858307,
0.061107125133275986,
0.007476869039237499,
-0.026426956057548523,
-0.053104009479284286,
0.04497584328055382,
0.006971464026719332,
-0.021029019728302956,
0.03161647543311119,
-0.003717593150213361,
-0.00406147725880146,
0.026051810011267662,
-0.03743124008178711,
-0.0055073522962629795,
-0.007831173948943615,
-0.015318463556468487,
-0.025030577555298805,
0.007586286868900061,
0.015308042988181114,
-0.02984495274722576,
0.04103681072592735,
0.07227814197540283,
0.0042099724523723125,
-0.0002160671865567565,
0.03472185134887695,
0.028261002153158188,
0.038285739719867706,
0.04193299263715744,
-0.06302453577518463,
-0.0020932629704475403,
-0.03276275470852852,
0.012140142731368542,
-0.02121659368276596,
-0.00040412868838757277,
0.06102375686168671,
-0.01624590903520584,
-0.03772301971912384,
-0.009899687953293324,
-0.048143744468688965,
0.04276664927601814,
-0.003227819222956896,
-0.0029777218587696552,
0.021841837093234062,
0.042078882455825806,
0.014807848259806633,
-0.09270276129245758,
0.0056324009783566,
-0.003722803434357047,
-0.008034378290176392,
0.013671989552676678,
0.005601138807833195,
0.041828785091638565,
-0.05089481547474861,
0.022592129185795784,
0.025822553783655167,
-0.012702861800789833,
-0.014693220146000385,
-0.04255823418498039,
-0.008018746972084045,
0.016860730946063995,
0.01574571430683136,
0.01902824081480503,
0.022675495594739914,
-0.043683674186468124,
-0.03470100834965706,
-0.039265286177396774,
0.023175690323114395,
-0.021206172183156013,
-0.05418776348233223,
0.01839257776737213,
0.04497584328055382,
0.0009951790561899543,
0.0155789814889431,
0.039765480905771255,
-0.060523562133312225,
-0.01492247637361288,
0.02038293518126011,
-0.05385430157184601,
-0.008852404542267323,
0.041745420545339584,
-0.017673548310995102,
-0.07607128471136093,
0.019007399678230286,
0.009071240201592445,
0.009274444542825222,
0.03826489672064781,
0.004900345113128424,
0.02967822179198265,
-0.033533889800310135,
-0.012994642369449139,
0.05026957020163536,
0.020237045362591743,
0.01138985063880682,
-0.011025126092135906,
-0.02492637187242508,
-0.004863872658461332,
0.012223509140312672,
0.006205541081726551,
-0.0006708340952172875,
-0.08324074000120163,
-0.012734124436974525,
0.022883908823132515,
0.044433966279029846,
-0.0045851184986531734,
-0.005512563046067953,
0.03280443698167801,
-0.002480132272467017,
0.012431923300027847,
-0.0037071723490953445,
-0.009566224180161953,
-0.007747808005660772,
-0.01861141249537468,
-0.037618812173604965,
-0.004290733020752668,
-0.04614296555519104,
-0.013390629552304745,
-0.04518425837159157,
0.04107849299907684,
-0.02863614819943905,
-0.033450521528720856,
0.010076839476823807,
-0.010618717409670353,
0.03557635098695755,
-0.0010029945988208055,
0.04535099118947983,
-0.02715640515089035,
0.030136732384562492,
0.010191467590630054,
0.05481300503015518,
0.048018693923950195,
0.05443786084651947,
0.011879624798893929,
0.05568834766745567,
-0.005163468420505524,
-0.03061608597636223,
-0.0064816903322935104,
-0.006789101287722588,
-0.02794838137924671,
-0.026426956057548523,
-0.06835994869470596,
-0.02500973641872406,
0.004056266508996487,
0.009357810020446777,
-0.043933771550655365,
-0.007388293277472258,
-0.009279654361307621,
-0.014766165055334568,
0.012671600095927715,
-0.013025905005633831,
0.014818268828094006,
-0.012233929708600044,
0.036951884627342224,
-0.05518815293908119,
0.04572613537311554,
-0.02488468773663044,
-0.028010904788970947,
-0.044267233461141586,
-0.0022248246241360903,
0.04024483636021614,
0.04314179718494415,
0.015860341489315033,
-0.016850309446454048,
0.07882235199213028,
0.004269891418516636,
0.013401051051914692,
0.055563297122716904,
-0.08415776491165161,
0.015057945623993874,
0.018746882677078247,
-0.035638876259326935,
0.0005470879841595888,
0.039515383541584015,
-0.0036498585250228643,
0.020320411771535873,
0.04234982281923294,
-0.03722282499074936,
-0.025614138692617416,
-0.07486248016357422,
-0.0736536756157875,
0.06181573122739792,
-0.021039441227912903,
-0.009993473999202251,
0.052103620022535324,
-0.010524931363761425,
-0.0450592078268528,
-0.08603349328041077,
0.03507615625858307,
0.01566234789788723,
0.0543128103017807,
-0.006825574208050966,
-0.031512267887592316,
0.005512563046067953,
0.03726450726389885,
0.08811763674020767,
0.011837942525744438,
-0.01134816836565733,
-0.027677442878484726,
-0.06961043179035187,
-0.030240939930081367,
0.04576781764626503,
-0.005960654001682997,
0.11571171879768372,
0.014276391826570034,
0.026030967012047768,
-0.039848849177360535,
0.06640084832906723,
0.03924444690346718,
-0.009691272862255573,
0.023675885051488876,
-0.03520120307803154,
-0.08961822092533112,
-0.009107712656259537,
-0.056188542395830154,
0.006914149969816208,
0.005991916172206402,
0.01649600639939308,
0.02888624556362629,
0.05056134983897209,
-0.020810185000300407,
0.1102929413318634,
0.01479742769151926,
0.04543435573577881,
0.08299064636230469,
-0.01966390572488308,
0.03169983997941017,
0.02034125290811062,
-0.013088429346680641,
0.033075377345085144,
-0.022342031821608543,
0.0065911076962947845,
0.0018327448051422834,
-0.036951884627342224,
0.0324292927980423,
-0.04485079646110535,
0.05877288058400154,
-0.04735177010297775,
-0.048060376197099686,
0.014213867485523224,
0.028177637606859207,
0.014349336735904217,
0.009060819633305073,
-0.04107849299907684,
-0.02744818665087223,
-0.027906697243452072,
-0.055563297122716904,
0.044225551187992096,
-0.014599434100091457,
0.015110049396753311,
0.044267233461141586,
0.02129996009171009,
0.0023199135903269053,
-0.007153826765716076,
0.05014452338218689,
-0.008154216222465038,
0.029990842565894127,
0.021154068410396576,
-0.07502920925617218,
0.0016126070404425263,
-0.03603486344218254,
0.005621980410069227,
-0.0012022909941151738,
-0.006632790435105562,
0.07161121070384979,
-0.023717567324638367,
-0.018163321539759636,
0.0340966060757637,
-0.026802102103829384,
-0.03217919543385506,
-0.007622759323567152,
-0.08069808781147003,
-0.0639832466840744,
0.07290337979793549,
0.0012315992498770356,
-0.01624590903520584,
0.011462796479463577,
-0.0069506228901445866,
0.005246834363788366,
0.011973411776125431,
0.007633179891854525,
-0.004337626043707132,
-0.01621464639902115,
-0.014776586554944515,
-0.02703135646879673,
-0.017631864175200462,
-0.013942928053438663,
-0.02913634292781353,
-0.030887024477124214,
-0.032950326800346375,
-0.0016217251541092992,
0.03507615625858307,
0.03194993734359741,
-0.011775418184697628,
0.01246318593621254,
-0.010900077410042286,
0.025447407737374306,
-0.01906992495059967,
0.03234592452645302,
0.002022922970354557,
0.02719808928668499,
0.007575866300612688,
0.004535620100796223,
0.001396376988850534,
0.029532330110669136,
0.02678125910460949,
0.013630306348204613,
-0.053104009479284286,
0.040432408452034,
-0.03928612917661667,
-0.021779311820864677,
0.014505647122859955,
0.014589013531804085,
-0.008544993586838245,
-0.005392724648118019,
0.006851625628769398,
-0.03845246881246567,
0.02475963905453682,
0.009993473999202251,
-0.03595149517059326,
0.032700229436159134,
0.05910634621977806,
0.022925592958927155,
-0.015933286398649216,
-0.017579760402441025,
-0.0761963352560997,
-0.0019447675440460443,
0.035930655896663666,
-0.00806043017655611,
-0.015943707898259163,
-0.01840299740433693,
-0.006632790435105562,
-0.03626411780714989,
0.035388778895139694,
0.007820753380656242,
0.0711527019739151,
-0.028615307062864304,
0.014026294462382793,
0.043850407004356384,
0.016912834718823433,
0.04580949991941452,
0.05543825030326843,
0.019841058179736137,
0.026281064376235008,
0.028823722153902054,
-0.023717567324638367,
0.004079713486135006,
-0.05510478839278221,
0.04272496700286865,
0.06156563386321068,
0.047726914286613464,
0.03586813062429428,
0.0014745324151590466,
0.05122827738523483,
0.0774468183517456,
-0.007278875447809696,
-0.02715640515089035,
0.024176079779863358,
-0.023092323914170265,
0.028281843289732933,
-0.017954906448721886,
0.03132469579577446,
0.035180363804101944,
-0.0014263365883380175,
0.013609465211629868,
-0.048685621470212936,
-0.023092323914170265,
0.02092481404542923,
0.014109659940004349,
0.021081123501062393,
0.02302979864180088,
0.052645497024059296,
-0.015297622419893742,
0.014224288053810596,
0.06248265877366066,
-0.05439617857336998,
0.06844331324100494,
-0.004241234622895718,
0.01227561291307211,
0.043975453823804855,
0.005403145216405392,
-0.002286046277731657,
0.023425787687301636,
0.0017467738362029195,
0.04543435573577881,
-0.0012413687072694302,
0.03809816762804985,
-0.009774639271199703,
-0.01861141249537468,
0.07102765142917633,
0.027177248150110245,
0.005637611728161573,
0.033658936619758606,
-0.037910591810941696,
0.052061934024095535,
-0.035472143441438675,
-0.07340357452630997,
-0.011754576116800308,
0.007961432449519634,
-0.04597623273730278,
0.07969769835472107,
-0.016610633581876755,
0.02348831109702587,
-0.028823722153902054,
-0.0741121843457222,
0.04922749847173691,
0.0013286422472447157,
-0.056730419397354126,
0.04280833154916763,
-0.031512267887592316,
-0.020768502727150917,
-0.029032135382294655,
0.004504357930272818,
0.02013283781707287,
0.04455901309847832,
0.040599141269922256,
-0.014661958441138268,
-0.01865309476852417,
0.020560087636113167,
0.027969222515821457,
-0.004861267749220133,
0.013984611257910728,
0.052478764206171036,
-0.02901129424571991,
0.056855469942092896,
0.0101081021130085,
0.025447407737374306,
-0.0038791142869740725,
-0.01941380836069584,
-0.023905139416456223,
-0.007773859892040491,
-0.04036988317966461,
-0.0008369143470190465,
0.05039462074637413,
-0.00013945858518127352,
-0.0336797796189785,
0.038285739719867706
] |
52,339 |
pgeocode
|
__init__
| null |
def __init__(self, country: str = "fr", unique: bool = True):
country = country.upper()
if country not in COUNTRIES_VALID:
raise ValueError(
f"country={country} is not a known country code. "
"See the README for a list of supported "
"countries"
)
if country == "AR":
warnings.warn(
"The Argentina data file contains 4-digit postal "
"codes which were replaced with a new system "
"in 1999."
)
self.country = country
self._data_path, self._data = self._get_data(country)
if unique:
self._data_frame = self._index_postal_codes()
else:
self._data_frame = self._data
self.unique = unique
|
(self, country: str = 'fr', unique: bool = True)
|
[
-0.01660642772912979,
0.0029772298876196146,
-0.021670930087566376,
0.04147019609808922,
-0.0521496906876564,
-0.08741770684719086,
-0.006234291475266218,
-0.020808497443795204,
0.027432719245553017,
-0.05486543849110603,
-0.0010195521172136068,
0.024808719754219055,
-0.035231318324804306,
0.050021130591630936,
-0.04106650501489639,
0.014367771334946156,
-0.03857095167040825,
0.08081183582544327,
-0.050681717693805695,
0.024386677891016006,
-0.013973254710435867,
-0.014037477783858776,
-0.029708074405789375,
0.0803714394569397,
0.028460297733545303,
0.04767237603664398,
0.0014048946322873235,
0.005156250204890966,
0.03752502426505089,
-0.04275467246770859,
0.046498000621795654,
0.002896950114518404,
-0.0360754020512104,
0.062205296009778976,
-0.03198343142867088,
-0.021634230390191078,
-0.01132173091173172,
-0.011596974916756153,
-0.07589413225650787,
0.043268460780382156,
-0.018900133669376373,
-0.04759897664189339,
-0.015321953222155571,
-0.009927157312631607,
0.015551324002444744,
0.024992216378450394,
0.01179882138967514,
-0.03301101177930832,
0.0011468527372926474,
-0.031561389565467834,
-0.038314059376716614,
0.04128669947385788,
-0.0007185032591223717,
-0.00504156481474638,
-0.0651412382721901,
0.012688779272139072,
0.015477925539016724,
0.10217081755399704,
0.005335159134119749,
0.05240658298134804,
-0.06407696008682251,
-0.022001223638653755,
-0.013009898364543915,
-0.05761788412928581,
0.0180377010256052,
0.016542203724384308,
-0.005092026200145483,
-0.030992548912763596,
0.020331406965851784,
-0.005729676689952612,
0.06411365419626236,
0.06550823152065277,
-0.005940697621554136,
0.01141347922384739,
0.030864102765917778,
0.034644126892089844,
-0.1027580052614212,
0.0030942088924348354,
-0.01640458218753338,
0.0005702725611627102,
0.03091915138065815,
0.00858763325959444,
0.014716414734721184,
0.007729787845164537,
0.0018682231893762946,
-0.01139512937515974,
0.050681717693805695,
-0.02354259416460991,
0.015780694782733917,
0.05523242801427841,
-0.053434163331985474,
0.0023739852476865053,
-0.016285309568047523,
0.024900468066334724,
0.04058941453695297,
-0.04110320284962654,
0.037029583007097244,
0.034460633993148804,
0.04558051750063896,
-0.029506228864192963,
0.00549571868032217,
-0.03286421298980713,
-0.03644239529967308,
-0.025744551792740822,
-0.02506561391055584,
0.032515570521354675,
0.052259787917137146,
-0.00039910475607030094,
-0.014055827632546425,
0.006977452430874109,
-0.05956294760107994,
0.017863379791378975,
-0.003158432664349675,
0.030864102765917778,
0.014514569193124771,
-0.0008584192837588489,
0.02216637134552002,
0.03802046179771423,
-0.038644351065158844,
0.022680159658193588,
-0.0065554105676710606,
0.03715803101658821,
-0.0835275799036026,
0.05714079365134239,
0.015707295387983322,
-0.0010310206562280655,
0.043121665716171265,
-0.01269795373082161,
0.05328736826777458,
0.023432495072484016,
0.06598532199859619,
-0.010037255473434925,
0.029506228864192963,
-0.04147019609808922,
0.012624555267393589,
-0.06675601005554199,
0.05394795536994934,
0.044406138360500336,
-0.035745106637477875,
0.021854426711797714,
0.014285198412835598,
-0.019010230898857117,
0.055636122822761536,
0.0002676467702258378,
0.0602235347032547,
0.01998276263475418,
-0.0340752899646759,
-0.0260748453438282,
-0.010624444112181664,
-0.03345140069723129,
0.0004217551031615585,
0.036699287593364716,
-0.019157029688358307,
0.027249222621321678,
-0.014789813198149204,
-0.11707073450088501,
-0.007904109545052052,
-0.05038812384009361,
0.02820340357720852,
0.026900578290224075,
-0.009706961922347546,
0.01115658413618803,
-0.038497552275657654,
0.015202680602669716,
-0.05721419304609299,
-0.025762900710105896,
-0.047965969890356064,
-0.0706828311085701,
-0.021946175023913383,
-0.02040480449795723,
-0.004231886938214302,
-0.08066503703594208,
-0.02097364328801632,
0.03978202864527702,
-0.06389345973730087,
0.07648131996393204,
0.009927157312631607,
0.01457879226654768,
0.017230316996574402,
0.005729676689952612,
0.033891793340444565,
0.014477869495749474,
-0.05857206508517265,
0.0017306008376181126,
0.022037923336029053,
0.0029749360401183367,
0.026772132143378258,
0.016303658485412598,
0.09622553735971451,
0.060810722410678864,
0.051819395273923874,
0.007729787845164537,
-0.02715747430920601,
-0.013431939296424389,
0.03802046179771423,
-0.038791149854660034,
0.011679548770189285,
-0.0013555799378082156,
-0.06103091686964035,
0.010569395497441292,
-0.024753671139478683,
0.041837189346551895,
0.03288256376981735,
-0.02350589446723461,
-0.07042593508958817,
0.04961743950843811,
-0.038314059376716614,
0.06877446919679642,
-0.017679883167147636,
-0.005092026200145483,
0.03820395842194557,
-0.07677491009235382,
-0.0028946564998477697,
0.015707295387983322,
0.02611154317855835,
-0.052590079605579376,
-0.057727981358766556,
-0.011385953985154629,
0.09930827468633652,
0.032937612384557724,
0.09710631519556046,
-0.04708518832921982,
-0.018248721957206726,
-0.01998276263475418,
0.042350977659225464,
-0.004358040634542704,
-0.017624832689762115,
0.015450400300323963,
-0.05123220756649971,
-0.0008784892270341516,
-0.07838968187570572,
-0.026129893958568573,
-0.006390263792127371,
-0.06763678789138794,
0.019340524449944496,
-0.046204403042793274,
0.029139235615730286,
0.04671819508075714,
0.0017936778021976352,
-0.028386900201439857,
0.030515458434820175,
-0.04319506138563156,
0.02055160142481327,
-0.04257117584347725,
-0.005486543755978346,
-0.01679909974336624,
-0.03567170724272728,
0.0659119263291359,
-0.00016744050662964582,
-0.04257117584347725,
-0.06246218830347061,
0.010514345951378345,
-0.05233318731188774,
0.025983097031712532,
0.030900800600647926,
0.008899577893316746,
0.003562124678865075,
-0.038314059376716614,
0.010477647185325623,
0.005986571311950684,
-0.01698259636759758,
0.00858763325959444,
0.015615547075867653,
0.053544264286756516,
-0.034845974296331406,
0.01024827640503645,
0.02497386559844017,
0.00033086701296269894,
0.039084743708372116,
-0.04242437705397606,
0.04128669947385788,
0.07424265891313553,
-0.009486766532063484,
-0.006564585492014885,
-0.00602785823866725,
-0.03624054789543152,
0.033891793340444565,
-0.041029803454875946,
-0.05093861371278763,
0.00041258029523305595,
0.04657139629125595,
0.023340748623013496,
0.05431494861841202,
-0.004720446188002825,
-0.016092637553811073,
-0.045360319316387177,
0.005894823465496302,
0.008234403096139431,
-0.04947064071893692,
-0.03381839394569397,
-0.02201957255601883,
0.032992660999298096,
-0.004516306333243847,
0.07479315251111984,
0.04367215558886528,
-0.016477981582283974,
0.005399382673203945,
0.029909919947385788,
-0.002660698490217328,
-0.030331961810588837,
-0.03724977746605873,
0.0007769927615299821,
0.10334520041942596,
0.008826179429888725,
-0.030845751985907555,
-0.012110765092074871,
-0.033084407448768616,
0.028937390074133873,
0.03286421298980713,
0.026662033051252365,
0.03535976633429527,
0.04080960899591446,
0.049066949635744095,
0.024423377588391304,
0.02302880398929119,
-0.012853926047682762,
-0.028423599898815155,
-0.022937055677175522,
-0.004594292026013136,
0.02825845219194889,
-0.017386287450790405,
-0.037983763962984085,
-0.00375250237993896,
-0.017202790826559067,
-0.02820340357720852,
0.0023579292465001345,
0.03143294155597687,
-0.011431828141212463,
-0.009706961922347546,
-0.012881450355052948,
-0.0010373283876106143,
-0.002568950178101659,
-0.008509648032486439,
0.012285087257623672,
0.03543316200375557,
0.013386066071689129,
-0.040883008390665054,
-0.014643016271293163,
0.012386010028421879,
-0.015450400300323963,
-0.006541648413985968,
0.011046485975384712,
-0.025285810232162476,
0.017019296064972878,
0.013909030705690384,
-0.047929272055625916,
-0.06525133550167084,
-0.05497553572058678,
-0.00460117356851697,
-0.031799934804439545,
-0.03319450840353966,
0.013716359622776508,
0.021817727014422417,
0.015138456597924232,
0.06301268190145493,
-0.021854426711797714,
-0.011257506906986237,
0.01608346402645111,
0.017395462840795517,
0.026423487812280655,
0.05442504584789276,
-0.050167929381132126,
-0.022001223638653755,
-0.04477313160896301,
0.008073844015598297,
0.0041286698542535305,
0.00334192905575037,
0.03948843479156494,
-0.0899132564663887,
-0.004747970495373011,
-0.006578347645699978,
-0.06554493308067322,
0.0007041675853542984,
0.0018682231893762946,
0.04781917482614517,
-0.00934914406388998,
0.04242437705397606,
0.02596474625170231,
-0.08741770684719086,
-0.012991548515856266,
-0.010908863507211208,
0.013092471286654472,
0.010312500409781933,
0.023157251998782158,
-0.02368939109146595,
-0.03578180819749832,
-0.005752613302320242,
0.05893905833363533,
-0.010954737663269043,
0.03211187943816185,
-0.02464357204735279,
-0.0037226842250674963,
0.004972753580659628,
-0.018991881981492043,
0.008537172339856625,
0.02392793633043766,
-0.020514901727437973,
0.008193116635084152,
0.006115018855780363,
-0.002864838344976306,
-0.03682773560285568,
-0.04884675517678261,
-0.019377224147319794,
0.03163478523492813,
-0.00019625517597887665,
0.03594695404171944,
0.04510342702269554,
-0.02712077461183071,
0.02363434247672558,
-0.03548821061849594,
0.051782697439193726,
0.015367827378213406,
0.020569952204823494,
0.0005327131366357207,
-0.07171040773391724,
0.053544264286756516,
0.030093416571617126,
-0.031561389565467834,
0.012340135872364044,
-0.009317032061517239,
-0.00460117356851697,
0.030221864581108093,
-0.03124944493174553,
0.03827735781669617,
0.033506449311971664,
-0.026515236124396324,
0.002901537576690316,
-0.02225811779499054,
0.04348865896463394,
0.005963634233921766,
-0.0417637899518013,
-0.025854649022221565,
-0.03559831157326698,
-0.010147353634238243,
0.03967193141579628,
0.014560442417860031,
-0.01122998259961605,
-0.02673543244600296,
0.03625889867544174,
0.0401490218937397,
0.02434997819364071,
-0.03510287031531334,
0.026331739500164986,
-0.0005642515607178211,
-0.088445283472538,
-0.03677268698811531,
-0.009688612073659897,
0.0027340969536453485,
0.026662033051252365,
-0.0666826069355011,
0.034644126892089844,
0.00272262841463089,
-0.05570952221751213,
-0.05369105935096741,
0.034277137368917465,
-0.001601006486453116,
-0.07416926324367523,
-0.017303714528679848,
-0.0030735654290765524,
0.031799934804439545,
-0.02668038383126259,
0.05042482167482376,
0.07523354142904282,
-0.020111210644245148,
0.00220081047154963,
0.029524577781558037,
-0.005399382673203945,
-0.016193561255931854,
0.005197536665946245,
-0.025414258241653442,
-0.0649944394826889,
0.025854649022221565,
-0.051819395273923874,
0.004397033713757992,
-0.04205738380551338,
-0.027506116777658463,
-0.0026996913366019726,
-0.0035070758312940598,
-0.08815169334411621,
-0.030900800600647926,
0.02735931985080242,
0.0393783375620842,
0.019909365102648735,
-0.00003273906258982606,
0.024038033559918404,
-0.040075622498989105,
0.020863546058535576,
0.0021583768539130688,
-0.03651579096913338,
0.014147575944662094,
-0.012413534335792065,
0.007982095703482628,
-0.032038480043411255,
-0.022680159658193588,
0.021469084545969963,
0.04605760797858238,
0.04205738380551338,
0.048259563744068146,
0.018276246264576912,
-0.07890347391366959,
-0.007555466145277023,
-0.02273521013557911,
-0.016248609870672226,
0.008725255727767944,
0.020863546058535576,
-0.017872553318738937,
-0.01678992435336113,
-0.009807884693145752,
-0.006390263792127371,
-0.034992773085832596,
-0.061581406742334366,
-0.029854871332645416,
0.026056494563817978,
-0.013340191915631294,
0.014321897178888321,
0.03225867450237274,
-0.042461078613996506,
-0.01367965992540121,
-0.07259119302034378,
0.05493883416056633,
0.04690169170498848,
0.010138178244233131,
0.062058497220277786,
0.018579015508294106,
0.00767015153542161,
-0.003103383583948016,
0.05941614881157875,
-0.003548362525179982,
0.01329431775957346,
-0.027377668768167496,
-0.05526912957429886,
-0.06936165690422058,
0.02150578238070011,
0.052920375019311905,
0.035745106637477875,
0.024716971442103386,
0.014450345188379288,
-0.04800267145037651,
0.009358318522572517,
0.010982261970639229,
-0.006619634106755257,
0.007615102455019951,
-0.0020597476977854967,
-0.07934386283159256,
0.006486599333584309,
-0.08103203028440475,
-0.0024106844794005156,
-0.004972753580659628,
0.043268460780382156,
0.031231094151735306,
0.05141570419073105,
-0.0409197062253952,
0.0010396220022812486,
-0.008358263410627842,
0.06895796209573746,
0.015422875992953777,
-0.013138345442712307,
0.05482873693108559,
0.016633952036499977,
-0.03372664749622345,
0.008697731420397758,
-0.026937277987599373,
-0.05559942126274109,
0.016349533572793007,
-0.044552937150001526,
0.004429145250469446,
-0.03923153877258301,
-0.015202680602669716,
-0.0029061250388622284,
-0.0019370343070477247,
0.023726090788841248,
0.016000889241695404,
0.01974421739578247,
0.06767348945140839,
-0.06070062518119812,
-0.03970862925052643,
0.006637983955442905,
0.008408724330365658,
0.0277263130992651,
0.016184385865926743,
0.0000051921965678047854,
0.037268128246068954,
-0.04528692364692688,
0.032552268356084824,
-0.045176826417446136,
0.04466303437948227,
-0.009138123132288456,
0.013386066071689129,
0.04558051750063896,
-0.07427936047315598,
0.026772132143378258,
-0.053727757185697556,
0.014698064886033535,
0.0022615937050431967,
-0.029983319342136383,
0.022533362731337547,
0.014863211661577225,
-0.08727090805768967,
-0.007876585237681866,
-0.01534030307084322,
-0.0393049381673336,
0.03205682709813118,
-0.07574733346700668,
-0.02512066252529621,
0.0681505799293518,
-0.01163367461413145,
-0.05442504584789276,
0.019303826615214348,
-0.009170235134661198,
0.00858763325959444,
-0.004798431880772114,
-0.018340470269322395,
-0.005514068063348532,
-0.05574622005224228,
-0.005848949309438467,
-0.046167705208063126,
0.021047042682766914,
-0.024698620662093163,
-0.0284969974309206,
-0.013450289145112038,
-0.09512455761432648,
0.00663339626044035,
0.015615547075867653,
0.04642460122704506,
-0.0457640141248703,
-0.027377668768167496,
0.01189056970179081,
-0.003919942770153284,
-0.034130338579416275,
-0.011991492472589016,
0.012927324511110783,
-0.015450400300323963,
-0.041360098868608475,
-0.018386343494057655,
0.03433218598365784,
0.018863433972001076,
0.007440780755132437,
0.041360098868608475,
0.021817727014422417,
0.07387566566467285,
-0.03890124708414078,
0.03357984870672226,
0.038791149854660034,
0.010257450863718987,
0.006280165631324053,
0.009963857010006905,
-0.03978202864527702,
0.00610125670209527,
0.015129282139241695,
-0.0449933297932148,
-0.027506116777658463,
0.0554526261985302,
0.012064890936017036,
0.05119550973176956,
-0.02539590746164322,
0.03216692805290222,
0.0016939016059041023,
0.0067022074945271015,
0.046975091099739075,
0.010707017965614796,
-0.04704848676919937,
0.0257262010127306,
0.016101812943816185,
-0.0425344742834568,
0.035176269710063934,
-0.005436082370579243,
0.02712077461183071,
-0.08954626321792603,
-0.038497552275657654,
0.03734152764081955,
-0.03787366673350334,
0.0449199303984642,
0.036313947290182114,
0.02183607779443264,
0.03135954216122627,
0.0340752899646759,
-0.01032167486846447,
-0.025487655773758888,
0.004009397234767675,
0.045066725462675095,
0.03625889867544174,
0.028570396825671196,
0.03363489732146263,
-0.09850089251995087,
0.0168816726654768,
0.08954626321792603,
-0.03882784768939018,
0.020716749131679535,
0.03677268698811531,
0.014349422417581081,
0.004348865710198879,
-0.01148687768727541,
0.005569117143750191,
0.0426078736782074,
0.01745051145553589,
-0.002552894176915288,
-0.032937612384557724,
-0.011908919550478458,
-0.003747914917767048,
0.03425878658890724,
0.002605649409815669,
0.010707017965614796,
0.01941392384469509,
0.036130450665950775,
-0.01636788249015808,
0.0168449729681015,
-0.07978425174951553,
0.054058052599430084,
0.020569952204823494,
0.01836799457669258,
0.04785587266087532,
0.006399438716471195,
-0.03989212587475777,
0.024955516681075096,
-0.01564307138323784,
0.07016903907060623,
0.025322509929537773,
0.05207629129290581,
-0.031414590775966644,
-0.038791149854660034,
0.04789257049560547,
-0.010000555776059628,
-0.025817949324846268,
0.022423265501856804,
0.00220081047154963,
0.04084630683064461,
-0.009395018219947815,
-0.054681941866874695,
-0.03948843479156494,
0.005514068063348532,
-0.021560832858085632,
0.009032612666487694,
-0.05600311607122421,
-0.02906583622097969,
-0.008284864015877247,
-0.04334186017513275,
0.03490102291107178,
0.05798487737774849,
0.030478758737444878,
0.04693838953971863,
0.004369508940726519,
0.0008813563617877662,
0.048589859157800674,
0.012817226350307465,
-0.03897464647889137,
0.05446174368262291,
0.0056654526852071285,
-0.04051601514220238,
-0.03321285545825958,
0.05090191215276718,
-0.009252808056771755,
0.018863433972001076,
0.03280916437506676,
0.062058497220277786,
-0.024239880964159966,
-0.01329431775957346,
-0.025817949324846268,
0.04484653100371361,
-0.00405527139082551,
-0.008550934493541718,
-0.050167929381132126,
-0.014092527329921722,
0.006197592243552208,
0.010505171492695808,
0.06602202355861664,
-0.002182460855692625,
0.04143349826335907,
0.00880324188619852
] |
52,346 |
pgeocode
|
query_postal_code
|
Get locations information from postal codes
Parameters
----------
codes: array, list or int
an array of strings containing postal codes
Returns
-------
df : pandas.DataFrame
a pandas.DataFrame with the relevant information
|
def query_postal_code(self, codes):
"""Get locations information from postal codes
Parameters
----------
codes: array, list or int
an array of strings containing postal codes
Returns
-------
df : pandas.DataFrame
a pandas.DataFrame with the relevant information
"""
if isinstance(codes, int):
codes = str(codes)
if isinstance(codes, str):
codes = [codes]
single_entry = True
else:
single_entry = False
if not isinstance(codes, pd.DataFrame):
codes = pd.DataFrame(codes, columns=["postal_code"])
codes = self._normalize_postal_code(codes)
response = pd.merge(codes, self._data_frame, on="postal_code", how="left")
if self.unique and single_entry:
response = response.iloc[0]
return response
|
(self, codes)
|
[
0.04500202462077141,
-0.0010428029345348477,
0.020192304626107216,
0.02409934811294079,
-0.022429974749684334,
0.005669651087373495,
-0.05285162851214409,
-0.05665211379528046,
0.07814084738492966,
-0.06972295045852661,
-0.005456539802253246,
0.015566011890769005,
-0.05242540314793587,
0.00040263624396175146,
0.020547490566968918,
-0.013719046488404274,
-0.03216206282377243,
0.0153085021302104,
-0.0022387795615941286,
-0.0037316693924367428,
-0.012653489597141743,
0.06261923164129257,
0.05253196135163307,
0.07572558522224426,
0.004175651352852583,
0.011428099125623703,
0.01297315675765276,
-0.05697178095579147,
0.023602087050676346,
-0.0009928549407050014,
0.059706710278987885,
-0.03654860705137253,
-0.020938195288181305,
-0.009332503192126751,
-0.005758447572588921,
0.014020954258739948,
0.05825044959783554,
-0.03038613311946392,
0.011472497135400772,
0.03800486773252487,
-0.08801501244306564,
-0.08311344683170319,
0.023460013791918755,
-0.03423989936709404,
0.035092342644929886,
-0.013106350786983967,
0.004537496715784073,
-0.12161557376384735,
-0.019517453387379646,
0.01740409806370735,
0.011996395885944366,
0.024951793253421783,
0.007547695655375719,
-0.04507306218147278,
-0.004268887918442488,
-0.012893239967525005,
0.00023864036484155804,
0.070610910654068,
0.042799871414899826,
-0.005341104697436094,
-0.027402574196457863,
0.0090172765776515,
-0.015441697090864182,
-0.035163380205631256,
-0.0008208118961192667,
0.013168509118258953,
0.06020396947860718,
-0.0385376438498497,
-0.016809161752462387,
0.018576210364699364,
0.04393646866083145,
0.00509247463196516,
-0.0739496573805809,
0.03196670860052109,
0.08567078411579132,
0.048873547464609146,
-0.006570934783667326,
-0.005305585917085409,
-0.0013652449706569314,
0.00783628411591053,
0.04017150029540062,
-0.015938956290483475,
0.033387452363967896,
0.02669220231473446,
0.03587375208735466,
0.020121268928050995,
0.060132935643196106,
0.07228028029203415,
0.03308554366230965,
0.021311139687895775,
0.009323623962700367,
0.026337018236517906,
0.008293584920465946,
-0.005159071646630764,
0.04372335597872734,
-0.012955397367477417,
0.04134361073374748,
0.05231884866952896,
-0.011348182335495949,
0.025768719613552094,
0.05143088474869728,
0.002065626671537757,
0.06833772361278534,
-0.015566011890769005,
-0.028858834877610207,
0.05864115431904793,
0.0019490813137963414,
-0.019695045426487923,
-0.01459813117980957,
0.04663587734103203,
-0.04269331693649292,
-0.06652627885341644,
0.04315505921840668,
-0.04351024329662323,
-0.014491574838757515,
0.029480410739779472,
0.022110307589173317,
0.04795006662607193,
-0.024294700473546982,
-0.005456539802253246,
0.026940833777189255,
0.04652932286262512,
-0.024347977712750435,
0.012040793895721436,
0.0023464453406631947,
0.024365736171603203,
0.03395574912428856,
-0.04382991045713425,
0.02074284292757511,
-0.041237056255340576,
0.059564635157585144,
0.038715239614248276,
-0.02424142137169838,
0.021435454487800598,
0.018736043944954872,
0.019251063466072083,
-0.020778361707925797,
-0.017359700053930283,
0.03290795162320137,
0.01805231161415577,
-0.0031522728968411684,
0.007050435524433851,
0.05537344515323639,
-0.015228585340082645,
-0.015050992369651794,
0.0429774671792984,
0.00475948816165328,
0.0649634599685669,
0.01055789366364479,
-0.04390094801783562,
-0.003367604222148657,
-0.031451690942049026,
0.01779480278491974,
0.042125020176172256,
-0.033174339681863785,
-0.05516033619642258,
0.023104827851057053,
-0.027757760137319565,
0.04844732582569122,
0.00377162778750062,
0.034790437668561935,
-0.025591127574443817,
0.03397350758314133,
-0.06297441571950912,
-0.04603206366300583,
-0.015406178310513496,
-0.03432869538664818,
-0.028148464858531952,
-0.016897957772016525,
-0.02253653109073639,
0.019588489085435867,
0.04819869622588158,
0.013719046488404274,
-0.01590343751013279,
-0.03624669834971428,
-0.013896639458835125,
0.017759284004569054,
-0.014216306619346142,
0.000008827612873574253,
-0.030741319060325623,
-0.03907042369246483,
0.033760398626327515,
-0.038360051810741425,
0.0663842037320137,
0.0283970944583416,
0.029995430260896683,
-0.01093971822410822,
-0.02630149945616722,
0.06716561317443848,
0.04329713433980942,
-0.009217068552970886,
-0.00721026910468936,
-0.007747487630695105,
0.01245813723653555,
-0.02779327891767025,
-0.05523137003183365,
0.03379591554403305,
0.006681930273771286,
-0.08780189603567123,
0.00693056033924222,
-0.013328342698514462,
0.04059772193431854,
-0.016525013372302055,
0.05899633839726448,
-0.05011669918894768,
0.02919626235961914,
-0.033529527485370636,
0.016667086631059647,
0.016684846952557564,
-0.01056677382439375,
0.0675918310880661,
-0.05256747826933861,
-0.01746625453233719,
-0.023690884932875633,
0.019535211846232414,
-0.0404556468129158,
-0.02578647993505001,
-0.006131392437964678,
0.06666834652423859,
-0.003229969646781683,
0.00876864604651928,
-0.06933224201202393,
0.018860358744859695,
-0.026337018236517906,
0.02372640185058117,
0.005385502707213163,
-0.012049674056470394,
0.030190782621502876,
0.032055508345365524,
-0.022927235811948776,
-0.046209655702114105,
-0.051324330270290375,
0.009678809903562069,
-0.08467626571655273,
-0.009616651572287083,
-0.06791149824857712,
0.054130297154188156,
-0.048731472343206406,
0.036868274211883545,
0.0011943117715418339,
-0.0004939300706610084,
-0.011428099125623703,
0.039248015731573105,
-0.007427820470184088,
-0.0347549170255661,
-0.0065931337885558605,
-0.0006876172847114503,
0.0033454049844294786,
0.022785160690546036,
-0.05409477651119232,
-0.056296929717063904,
-0.022287901490926743,
0.03459508344531059,
0.01948193460702896,
0.06318753212690353,
-0.025306979194283485,
-0.015317382290959358,
-0.03290795162320137,
0.01588567905128002,
0.01759057119488716,
-0.03468387946486473,
-0.036211177706718445,
0.06837324053049088,
-0.0040135979652404785,
-0.021364418789744377,
-0.03489699214696884,
-0.014962196350097656,
0.01627638377249241,
0.02150649204850197,
0.008244747295975685,
0.026621166616678238,
0.022145826369524002,
-0.026070628315210342,
-0.0089906370267272,
-0.007907320745289326,
0.031913433223962784,
0.03379591554403305,
-0.022287901490926743,
-0.09043027460575104,
-0.031913433223962784,
-0.016835801303386688,
0.01693347655236721,
0.008511136285960674,
-0.014091991819441319,
0.04393646866083145,
-0.060523636639118195,
0.023069309070706367,
-0.0028858836740255356,
0.025093868374824524,
-0.010948598384857178,
0.016453975811600685,
0.00642886059358716,
0.012964276596903801,
-0.002728269901126623,
0.02068956568837166,
-0.02921402081847191,
0.058676671236753464,
-0.014731325209140778,
0.004568575881421566,
-0.014811241999268532,
-0.0683022066950798,
0.01464252918958664,
0.13774099946022034,
0.027686722576618195,
0.009243707172572613,
0.0021966013591736555,
-0.007392301689833403,
-0.01096635777503252,
-0.06332960724830627,
0.00737454229965806,
-0.05551552027463913,
0.020583009347319603,
-0.013204026967287064,
-0.01471356675028801,
-0.030066467821598053,
-0.054805148392915726,
-0.04024253785610199,
0.04301298409700394,
-0.047914545983076096,
0.014020954258739948,
-0.0271894633769989,
-0.045321691781282425,
0.044149577617645264,
-0.02914298325777054,
0.02067180536687374,
0.006433300208300352,
-0.003756088437512517,
0.019144507125020027,
0.0230515506118536,
0.0050613959319889545,
0.03166480362415314,
-0.028699001297354698,
0.049406327307224274,
0.001399653498083353,
0.08112441003322601,
-0.017182106152176857,
0.0013741245493292809,
-0.04500202462077141,
-0.009394660592079163,
-0.009652170352637768,
-0.0283970944583416,
-0.012724526226520538,
-0.007725288160145283,
0.015370659530162811,
0.02001471258699894,
-0.014385019429028034,
-0.046138618141412735,
0.009430179372429848,
-0.03459508344531059,
-0.10648466646671295,
-0.03603358566761017,
0.006730768363922834,
-0.03875075653195381,
0.02697635069489479,
0.06723664700984955,
0.022270141169428825,
-0.0008990637143142521,
0.05949360132217407,
0.047843508422374725,
0.06166023388504982,
0.07551247626543045,
-0.059848785400390625,
-0.01123274676501751,
-0.013958796858787537,
0.001441831816919148,
-0.0016604929696768522,
-0.007090393919497728,
0.029551448300480843,
-0.01229830365628004,
-0.01686243899166584,
0.000519736553542316,
-0.033316414803266525,
-0.02726050093770027,
0.041094981133937836,
-0.02779327891767025,
-0.015734724700450897,
-0.010921959765255451,
0.00971432775259018,
-0.0643596425652504,
0.037472087889909744,
-0.036353252828121185,
-0.01690683700144291,
0.018487414345145226,
-0.008786405436694622,
0.027686722576618195,
-0.01637405902147293,
0.0012309403391554952,
0.0025173784233629704,
-0.05771766975522041,
-0.008648770861327648,
-0.0454992838203907,
-0.02807742729783058,
-0.03090115264058113,
0.0198726374655962,
-0.027438092976808548,
0.005865003447979689,
-0.02594631351530552,
-0.003851544577628374,
0.010762126184999943,
-0.010593412443995476,
0.022696364670991898,
-0.04301298409700394,
0.030421651899814606,
0.024561088532209396,
0.01926882192492485,
-0.047843508422374725,
0.01912674866616726,
-0.05327785015106201,
-0.032943472266197205,
0.010717727243900299,
-0.04834077134728432,
-0.030403893440961838,
0.05849907919764519,
-0.04883803054690361,
-0.05327785015106201,
0.005838364362716675,
0.021914955228567123,
0.03258828446269035,
0.012546934187412262,
-0.018771562725305557,
0.040064942091703415,
-0.04997462406754494,
-0.030705800279974937,
0.024561088532209396,
0.03697482869029045,
-0.005101354327052832,
0.010309264063835144,
-0.0017082210397347808,
0.01604551263153553,
0.027988631278276443,
0.03764967992901802,
-0.034435249865055084,
-0.018629487603902817,
-0.01560153067111969,
0.026408053934574127,
0.0454992838203907,
-0.005083594936877489,
0.024720922112464905,
0.05530240759253502,
-0.017501773312687874,
-0.01052237581461668,
0.01672036573290825,
-0.0071347919292747974,
0.0034009027294814587,
-0.009954078122973442,
-0.1219707578420639,
0.004175651352852583,
-0.07792773842811584,
0.00642886059358716,
-0.042586762458086014,
0.026194943115115166,
-0.05768215283751488,
0.019588489085435867,
0.0024596608709543943,
0.04081083461642265,
0.04855388030409813,
-0.056367967277765274,
0.04752384126186371,
-0.03729449585080147,
0.053029220551252365,
-0.011943117715418339,
0.008542215451598167,
0.033476248383522034,
0.03017302230000496,
0.026638925075531006,
-0.004129033535718918,
-0.01707555167376995,
0.00474616838619113,
-0.011055153794586658,
0.0180079136043787,
-0.008360182866454124,
0.00798723753541708,
-0.044220615178346634,
0.019695045426487923,
-0.007902881130576134,
-0.01396767608821392,
-0.020867157727479935,
-0.028290538117289543,
-0.06538968533277512,
-0.005447660107165575,
-0.044220615178346634,
0.013923278078436852,
-0.019801601767539978,
0.005527576897293329,
0.013497055508196354,
-0.05768215283751488,
0.06933224201202393,
-0.01403871364891529,
-0.044291652739048004,
-0.004786126781255007,
0.03045717068016529,
0.013292823918163776,
0.04073979705572128,
-0.020174546167254448,
-0.031380653381347656,
0.03564288094639778,
0.026869796216487885,
-0.05341992527246475,
0.019766082987189293,
-0.004317726008594036,
0.03963872045278549,
-0.024880755692720413,
-0.0080449553206563,
-0.03903490677475929,
0.0756545439362526,
-0.005500938277691603,
0.026550129055976868,
0.057398002594709396,
-0.020032471045851707,
0.02601735107600689,
-0.07721736282110214,
-0.027970870956778526,
0.04890906810760498,
-0.0613405667245388,
-0.04692002758383751,
0.09227723628282547,
0.026408053934574127,
0.0010477977339178324,
-0.07934848219156265,
0.07259994745254517,
0.013186267577111721,
0.04521513730287552,
-0.0230515506118536,
-0.003134513506665826,
0.026479091495275497,
-0.010611171834170818,
0.05714937299489975,
0.004630733281373978,
-0.0575045607984066,
0.005416581407189369,
-0.04944184422492981,
-0.014456056989729404,
0.02298051305115223,
-0.01590343751013279,
0.06489241868257523,
0.0029813398141413927,
-0.0070637548342347145,
-0.03988735005259514,
0.02720722183585167,
0.022944994270801544,
0.03296123072504997,
-0.007001597434282303,
-0.00855997484177351,
-0.04223157465457916,
-0.017546171322464943,
-0.05526689067482948,
-0.04578343406319618,
-0.03296123072504997,
0.027828797698020935,
0.03397350758314133,
0.0637558251619339,
-0.0447889119386673,
0.12637506425380707,
0.036726199090480804,
0.034879233688116074,
0.07941951602697372,
-0.007072634529322386,
0.030332855880260468,
-0.009954078122973442,
-0.020511971786618233,
0.019446415826678276,
-0.010699967853724957,
-0.029462650418281555,
0.04780799150466919,
-0.0782829225063324,
0.03246397152543068,
-0.014979955740272999,
0.009954078122973442,
-0.024774201214313507,
-0.05423685163259506,
-0.010877560824155807,
0.006868402939289808,
-0.04010046273469925,
0.045179616659879684,
-0.02076060324907303,
-0.022962752729654312,
-0.0334407314658165,
-0.08311344683170319,
0.039603203535079956,
0.032055508345365524,
0.005012557841837406,
0.009008396416902542,
-0.005847244057804346,
0.0013330562505871058,
-0.0008346863323822618,
0.08531560003757477,
-0.08034300059080124,
-0.042728837579488754,
-0.010646690614521503,
-0.05924496799707413,
0.027438092976808548,
-0.08275826275348663,
-0.005909401457756758,
0.008937359787523746,
0.02150649204850197,
0.046955544501543045,
-0.03693930804729462,
0.0014473815681412816,
-0.019233303144574165,
-0.00432660523802042,
-0.03573167696595192,
0.008027195930480957,
-0.02926729992032051,
-0.05764663591980934,
0.11962653696537018,
-0.04674243554472923,
0.021968234330415726,
-0.020174546167254448,
-0.08005885034799576,
-0.011090672574937344,
0.022128067910671234,
-0.019517453387379646,
-0.006269027013331652,
-0.0013064172817394137,
0.031682562083005905,
-0.028255019336938858,
0.00872424803674221,
-0.0059005217626690865,
-0.03896386921405792,
-0.014589251019060612,
0.0007858483004383743,
-0.014669167809188366,
0.030492689460515976,
0.03083011694252491,
0.01751953363418579,
-0.004906001966446638,
0.02520042285323143,
0.03489699214696884,
-0.01034478284418583,
0.00828026607632637,
0.061695750802755356,
0.08005885034799576,
0.01903795264661312,
-0.026994111016392708,
0.010247106663882732,
-0.014997715130448341,
0.02422366291284561,
-0.0036917109973728657,
-0.054947223514318466,
0.0334407314658165,
-0.061766788363456726,
-0.035163380205631256,
-0.07679114490747452,
-0.028716761618852615,
-0.006637532263994217,
-0.026656685397028923,
-0.013852241449058056,
-0.05373959243297577,
-0.027367055416107178,
0.006380022503435612,
-0.04372335597872734,
0.02008575014770031,
0.019890397787094116,
0.07228028029203415,
0.00013263964501675218,
0.0014795702882111073,
-0.022287901490926743,
0.033547285944223404,
-0.00626458739861846,
-0.013532574288547039,
-0.006415541283786297,
-0.04720417410135269,
-0.006246828008443117,
-0.03825349733233452,
-0.007547695655375719,
0.023992791771888733,
0.024561088532209396,
-0.005634132772684097,
0.055693112313747406,
0.0180079136043787,
0.0360158272087574,
0.021826159209012985,
0.006717449054121971,
-0.00887520145624876,
0.013852241449058056,
0.03445300832390785,
-0.015867920592427254,
-0.017688246443867683,
-0.012715646997094154,
0.022501012310385704,
-0.01630302146077156,
0.018274303525686264,
0.022429974749684334,
0.0022365597542375326,
0.05231884866952896,
0.03557184338569641,
0.01290211919695139,
0.021293381229043007,
0.01896691508591175,
0.00951897632330656,
0.028645724058151245,
-0.09057234227657318,
0.04002942517399788,
0.02541353553533554,
-0.03297898918390274,
0.08588389307260513,
-0.028201742097735405,
-0.08488937467336655,
-0.014411658979952335,
0.01985487900674343,
0.015139789320528507,
0.023886235430836678,
0.02877003885805607,
-0.035536326467990875,
0.03038613311946392,
0.023744162172079086,
0.0005252863047644496,
0.031682562083005905,
-0.02253653109073639,
0.02587527595460415,
-0.0021122447215020657,
-0.004817205481231213,
0.035305455327034,
-0.011774404905736446,
0.0007542145904153585,
-0.006912800949066877,
-0.01898467354476452,
0.04397198557853699,
0.014908918179571629,
-0.012316063046455383,
0.004166771657764912,
0.04208950325846672,
0.021257862448692322,
0.027011869475245476,
-0.005958239547908306,
0.033174339681863785,
-0.008209228515625,
-0.07114368677139282,
-0.07259994745254517,
0.027296017855405807,
-0.052816107869148254,
-0.003323205979540944,
-0.03386695310473442,
-0.020884918048977852,
-0.05764663591980934,
-0.033245377242565155,
0.03459508344531059,
0.06737872213125229,
-0.02571544237434864,
-0.0040779756382107735,
0.004710650071501732,
0.035234417766332626,
0.013452657498419285,
0.008360182866454124,
-0.0048882425762712955,
0.02015678584575653,
0.014633649960160255,
-0.03804038465023041,
-0.04081083461642265,
-0.03113202378153801,
0.0366196408867836,
0.04485994949936867,
0.009678809903562069,
0.03452404588460922,
-0.03711690381169319,
0.016152068972587585,
-0.007632052060216665,
0.007933960296213627,
-0.05210573598742485,
0.0033898032270371914,
-0.022873956710100174,
0.0493352897465229,
-0.029178502038121223,
-0.024490050971508026,
0.03445300832390785,
-0.016596050933003426,
-0.03839557245373726,
0.007854043506085873
] |
52,347 |
zipfile
|
ZipFile
|
Class with methods to open, read, write, close, list zip files.
z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True,
compresslevel=None)
file: Either the path to the file, or a file-like object.
If it is a path, the file will be opened and closed by ZipFile.
mode: The mode can be either read 'r', write 'w', exclusive create 'x',
or append 'a'.
compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
allowZip64: if True ZipFile will create files with ZIP64 extensions when
needed, otherwise it will raise an exception when this would
be necessary.
compresslevel: None (default for the given compression type) or an integer
specifying the level to pass to the compressor.
When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
When using ZIP_DEFLATED integers 0 through 9 are accepted.
When using ZIP_BZIP2 integers 1 through 9 are accepted.
|
class ZipFile:
""" Class with methods to open, read, write, close, list zip files.
z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True,
compresslevel=None)
file: Either the path to the file, or a file-like object.
If it is a path, the file will be opened and closed by ZipFile.
mode: The mode can be either read 'r', write 'w', exclusive create 'x',
or append 'a'.
compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
allowZip64: if True ZipFile will create files with ZIP64 extensions when
needed, otherwise it will raise an exception when this would
be necessary.
compresslevel: None (default for the given compression type) or an integer
specifying the level to pass to the compressor.
When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
When using ZIP_DEFLATED integers 0 through 9 are accepted.
When using ZIP_BZIP2 integers 1 through 9 are accepted.
"""
fp = None # Set here since __del__ checks it
_windows_illegal_name_trans_table = None
def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True,
compresslevel=None, *, strict_timestamps=True):
"""Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
or append 'a'."""
if mode not in ('r', 'w', 'x', 'a'):
raise ValueError("ZipFile requires mode 'r', 'w', 'x', or 'a'")
_check_compression(compression)
self._allowZip64 = allowZip64
self._didModify = False
self.debug = 0 # Level of printing: 0 through 3
self.NameToInfo = {} # Find file info given name
self.filelist = [] # List of ZipInfo instances for archive
self.compression = compression # Method of compression
self.compresslevel = compresslevel
self.mode = mode
self.pwd = None
self._comment = b''
self._strict_timestamps = strict_timestamps
# Check if we were passed a file-like object
if isinstance(file, os.PathLike):
file = os.fspath(file)
if isinstance(file, str):
# No, it's a filename
self._filePassed = 0
self.filename = file
modeDict = {'r' : 'rb', 'w': 'w+b', 'x': 'x+b', 'a' : 'r+b',
'r+b': 'w+b', 'w+b': 'wb', 'x+b': 'xb'}
filemode = modeDict[mode]
while True:
try:
self.fp = io.open(file, filemode)
except OSError:
if filemode in modeDict:
filemode = modeDict[filemode]
continue
raise
break
else:
self._filePassed = 1
self.fp = file
self.filename = getattr(file, 'name', None)
self._fileRefCnt = 1
self._lock = threading.RLock()
self._seekable = True
self._writing = False
try:
if mode == 'r':
self._RealGetContents()
elif mode in ('w', 'x'):
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
try:
self.start_dir = self.fp.tell()
except (AttributeError, OSError):
self.fp = _Tellable(self.fp)
self.start_dir = 0
self._seekable = False
else:
# Some file-like objects can provide tell() but not seek()
try:
self.fp.seek(self.start_dir)
except (AttributeError, OSError):
self._seekable = False
elif mode == 'a':
try:
# See if file is a zip file
self._RealGetContents()
# seek to start of directory and overwrite
self.fp.seek(self.start_dir)
except BadZipFile:
# file is not a zip file, just append
self.fp.seek(0, 2)
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
self.start_dir = self.fp.tell()
else:
raise ValueError("Mode must be 'r', 'w', 'x', or 'a'")
except:
fp = self.fp
self.fp = None
self._fpclose(fp)
raise
def __enter__(self):
return self
def __exit__(self, type, value, traceback):
self.close()
def __repr__(self):
result = ['<%s.%s' % (self.__class__.__module__,
self.__class__.__qualname__)]
if self.fp is not None:
if self._filePassed:
result.append(' file=%r' % self.fp)
elif self.filename is not None:
result.append(' filename=%r' % self.filename)
result.append(' mode=%r' % self.mode)
else:
result.append(' [closed]')
result.append('>')
return ''.join(result)
def _RealGetContents(self):
"""Read in the table of contents for the ZIP file."""
fp = self.fp
try:
endrec = _EndRecData(fp)
except OSError:
raise BadZipFile("File is not a zip file")
if not endrec:
raise BadZipFile("File is not a zip file")
if self.debug > 1:
print(endrec)
size_cd = endrec[_ECD_SIZE] # bytes in central directory
offset_cd = endrec[_ECD_OFFSET] # offset of central directory
self._comment = endrec[_ECD_COMMENT] # archive comment
# "concat" is zero, unless zip was concatenated to another file
concat = endrec[_ECD_LOCATION] - size_cd - offset_cd
if endrec[_ECD_SIGNATURE] == stringEndArchive64:
# If Zip64 extension structures are present, account for them
concat -= (sizeEndCentDir64 + sizeEndCentDir64Locator)
if self.debug > 2:
inferred = concat + offset_cd
print("given, inferred, offset", offset_cd, inferred, concat)
# self.start_dir: Position of start of central directory
self.start_dir = offset_cd + concat
if self.start_dir < 0:
raise BadZipFile("Bad offset for central directory")
fp.seek(self.start_dir, 0)
data = fp.read(size_cd)
fp = io.BytesIO(data)
total = 0
while total < size_cd:
centdir = fp.read(sizeCentralDir)
if len(centdir) != sizeCentralDir:
raise BadZipFile("Truncated central directory")
centdir = struct.unpack(structCentralDir, centdir)
if centdir[_CD_SIGNATURE] != stringCentralDir:
raise BadZipFile("Bad magic number for central directory")
if self.debug > 2:
print(centdir)
filename = fp.read(centdir[_CD_FILENAME_LENGTH])
flags = centdir[5]
if flags & 0x800:
# UTF-8 file names extension
filename = filename.decode('utf-8')
else:
# Historical ZIP filename encoding
filename = filename.decode('cp437')
# Create ZipInfo instance to store file information
x = ZipInfo(filename)
x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH])
x.comment = fp.read(centdir[_CD_COMMENT_LENGTH])
x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET]
(x.create_version, x.create_system, x.extract_version, x.reserved,
x.flag_bits, x.compress_type, t, d,
x.CRC, x.compress_size, x.file_size) = centdir[1:12]
if x.extract_version > MAX_EXTRAC
|
(file, mode='r', compression=0, allowZip64=True, compresslevel=None, *, strict_timestamps=True)
|
[
0.050734248012304306,
0.017473159357905388,
-0.02159753441810608,
0.06306302547454834,
0.06270823627710342,
-0.05166555941104889,
-0.027207570150494576,
0.05499166622757912,
-0.01793881319463253,
-0.05317339301109314,
0.017839031293988228,
0.0387159064412117,
-0.007300809025764465,
0.01139746606349945,
-0.013249000534415245,
0.030311938375234604,
-0.04417072609066963,
0.04740813747048378,
-0.016852285712957382,
0.04488029703497887,
-0.01443531271070242,
-0.019890131428837776,
-0.008049183525145054,
0.025477994233369827,
0.00723983021453023,
0.021109703928232193,
-0.02507886104285717,
0.005161012057214975,
0.028493665158748627,
-0.03062237612903118,
-0.035035014152526855,
-0.011497249826788902,
-0.040112871676683426,
-0.013958570547401905,
0.008653426542878151,
-0.028937147930264473,
0.02288362942636013,
0.03337195888161659,
0.019235996529459953,
-0.006995915435254574,
0.021475575864315033,
-0.02383711375296116,
0.017140546813607216,
-0.013625958934426308,
0.010255502536892891,
0.059515174478292465,
-0.028804102912545204,
-0.04616639018058777,
0.02731844037771225,
0.0014045881107449532,
0.0214090533554554,
0.010976159013807774,
0.03057802841067314,
-0.041709404438734055,
0.03729676827788353,
0.05760820582509041,
0.014912054874002934,
0.058096036314964294,
-0.007905052043497562,
-0.031176727265119553,
-0.0009340822580270469,
-0.0027689856942743063,
0.026475826278328896,
-0.016164889559149742,
-0.07734312117099762,
0.03020106814801693,
-0.03703067824244499,
-0.06337346136569977,
-0.013060520403087139,
0.046831611543893814,
0.0227949321269989,
0.002588821342214942,
-0.0022063187789171934,
0.010011587291955948,
0.004706444218754768,
0.03321674093604088,
-0.028161054477095604,
-0.020987747237086296,
0.021819274872541428,
-0.041398968547582626,
-0.0615108385682106,
-0.04909336566925049,
0.01628684625029564,
0.0410885326564312,
0.07410570234060287,
0.017107287421822548,
0.07109003514051437,
0.0028770840726792812,
0.0010692054638639092,
0.036077193915843964,
-0.032884128391742706,
0.05197599530220032,
0.007417222950607538,
-0.0031071400735527277,
0.011053768917918205,
-0.056898634880781174,
-0.014912054874002934,
-0.02383711375296116,
-0.021752752363681793,
0.03321674093604088,
-0.031243249773979187,
-0.05414905399084091,
-0.0026664305478334427,
-0.04199766740202904,
-0.030688898637890816,
-0.025056686252355576,
-0.02993497997522354,
-0.011585946194827557,
-0.04073374718427658,
-0.04758553206920624,
-0.0324849970638752,
-0.10182327777147293,
0.02512320876121521,
-0.03066672384738922,
-0.016874458640813828,
-0.010466155596077442,
-0.0032512713223695755,
0.004268506541848183,
-0.037496332079172134,
-0.04567856341600418,
0.12107036262750626,
-0.0007310510263778269,
-0.03751850873231888,
0.03093281202018261,
0.034391965717077255,
-0.01852642558515072,
0.0056405263021588326,
-0.016830110922455788,
0.039802435785532,
0.03199716657400131,
0.0020233828108757734,
0.02663104422390461,
-0.01531118806451559,
0.004570628050714731,
0.003930352162569761,
-0.00440432270988822,
-0.0357002355158329,
0.03193064406514168,
-0.09481627494096756,
0.046432480216026306,
0.07809703797101974,
-0.02960236929357052,
0.01734011434018612,
0.017284678295254707,
-0.07002567499876022,
0.005759711842983961,
-0.00533008947968483,
-0.0298906322568655,
-0.032196734100580215,
-0.0039608413353562355,
0.008431686088442802,
-0.049536846578121185,
-0.02086578868329525,
0.031376294791698456,
0.06567956507205963,
-0.04268506541848183,
-0.014313355088233948,
0.02247340977191925,
-0.030600201338529587,
0.00816559698432684,
-0.047940317541360855,
0.017007503658533096,
-0.024746250361204147,
-0.015366623178124428,
-0.012506169266998768,
-0.014169223606586456,
-0.02228492870926857,
-0.03135411813855171,
-0.013326609507203102,
0.013980744406580925,
0.02490146830677986,
0.03940330445766449,
-0.014025092124938965,
0.009335278533399105,
-0.016674892976880074,
0.04284028336405754,
-0.0014232974499464035,
-0.001151665230281651,
0.005704276729375124,
-0.01247290801256895,
-0.015943149104714394,
-0.042175062000751495,
-0.05175425484776497,
0.05317339301109314,
0.05610036849975586,
0.03020106814801693,
0.009634628891944885,
-0.0024488477502018213,
0.08377359807491302,
-0.005072316154837608,
-0.0856362134218216,
-0.015155969187617302,
-0.014224658720195293,
-0.0034619250800460577,
-0.023859286680817604,
0.01157485879957676,
0.002457162830978632,
-0.018748166039586067,
0.042396802455186844,
0.010028217919170856,
-0.09224408864974976,
0.028161054477095604,
0.059559524059295654,
-0.06040213629603386,
-0.004648237023502588,
0.012872041203081608,
0.002684446983039379,
0.008597991429269314,
-0.09188929945230484,
0.06780827045440674,
0.06701000779867172,
-0.02133144438266754,
0.02095448598265648,
0.02434711717069149,
0.017883379012346268,
-0.0563664585351944,
-0.019047517329454422,
0.005080631468445063,
0.051000334322452545,
0.03975808620452881,
-0.03201933950185776,
0.05361687391996384,
-0.06630043685436249,
-0.0006925928755663335,
0.01066017895936966,
-0.02073274552822113,
0.07370657473802567,
0.04275158420205116,
0.010078109800815582,
-0.010000500828027725,
-0.008209945634007454,
-0.11344248801469803,
0.000004006055405625375,
0.022406887263059616,
0.02946932427585125,
-0.08497099578380585,
0.03844982013106346,
-0.0018099575536325574,
-0.005759711842983961,
-0.02374841645359993,
-0.004634378477931023,
-0.033105868846178055,
0.035722408443689346,
0.03838329762220383,
-0.035988498479127884,
-0.0632404163479805,
0.014135962352156639,
0.052242081612348557,
-0.008082444779574871,
-0.00044937117490917444,
0.028582362458109856,
0.00449579069390893,
-0.04417072609066963,
-0.02960236929357052,
0.03596632555127144,
-0.025234078988432884,
0.015987496823072433,
-0.05450383573770523,
0.027163222432136536,
-0.01100942026823759,
-0.009856369346380234,
-0.07255352288484573,
0.043682895600795746,
-0.039647217839956284,
0.0183933824300766,
0.0074227661825716496,
0.0498916320502758,
-0.10661287605762482,
-0.010305394418537617,
0.0033177935983985662,
0.153089702129364,
-0.011796599254012108,
-0.03767372667789459,
0.0666552186012268,
-0.06652217358350754,
-0.00471198745071888,
0.03536762297153473,
-0.06847349554300308,
-0.04297332465648651,
0.02700800448656082,
0.015255752950906754,
0.04625508561730385,
-0.023327110335230827,
-0.012661388143897057,
-0.014002918265759945,
0.02082144096493721,
-0.043084196746349335,
-0.024879293516278267,
-0.029624542221426964,
0.01208486221730709,
0.005199817009270191,
0.030311938375234604,
0.025322776287794113,
-0.04993598163127899,
0.0516212098300457,
-0.004149321001023054,
-0.05304034799337387,
-0.07015872001647949,
0.01972382515668869,
-0.05126642435789108,
-0.07938313484191895,
0.006402759347110987,
0.06266389042139053,
0.000043481944885570556,
-0.055435147136449814,
-0.03093281202018261,
0.00416317954659462,
0.01569923385977745,
-0.021176226437091827,
0.039935480803251266,
0.06386128813028336,
0.00578742939978838,
-0.009684519842267036,
-0.019801434129476547,
-0.014124875888228416,
-0.00036102140438742936,
0.03501283749938011,
0.021675143390893936,
-0.0061089531518518925,
0.07237613201141357,
-0.039425477385520935,
-0.006912762764841318,
-0.032751087099313736,
-0.015344449318945408,
0.046875961124897,
-0.01518923044204712,
0.0013276718091219664,
0.01628684625029564,
0.04062287509441376,
0.02183036133646965,
-0.06062387675046921,
0.035345450043678284,
-0.012018339708447456,
0.02099883370101452,
0.01281660608947277,
0.053882963955402374,
-0.001511993701569736,
-0.060978662222623825,
0.03971374034881592,
-0.036764588207006454,
0.04723074659705162,
0.027163222432136536,
-0.06301867961883545,
-0.007722116075456142,
-0.056543849408626556,
-0.03849416598677635,
0.06847349554300308,
-0.0066245002672076225,
-0.002771757310256362,
-0.001313813030719757,
0.014956402592360973,
-0.009967239573597908,
-0.05596732348203659,
0.001933300751261413,
-0.014679227024316788,
-0.0040633962489664555,
-0.02365972101688385,
-0.03235195204615593,
0.04488029703497887,
0.037828944623470306,
-0.006014713551849127,
0.02964671701192856,
-0.0021342532709240913,
-0.010626917704939842,
-0.03463587909936905,
-0.07947182655334473,
0.023726243525743484,
0.020433396100997925,
-0.02251775749027729,
-0.023038847371935844,
0.029136713594198227,
-0.06465955823659897,
-0.008221032097935677,
-0.06146649271249771,
-0.02123166248202324,
0.0011475075734779239,
0.03190847113728523,
-0.02178601361811161,
-0.04621073976159096,
0.012506169266998768,
-0.005671015474945307,
0.03858286142349243,
-0.005271882750093937,
0.058362122625112534,
-0.028582362458109856,
-0.02938062883913517,
0.03173108026385307,
-0.010205610655248165,
0.00032550827017985284,
0.05432644486427307,
-0.019147299230098724,
0.03190847113728523,
0.021386880427598953,
-0.01352617610245943,
0.0313984677195549,
0.006973741576075554,
0.04758553206920624,
0.02993497997522354,
-0.052330780774354935,
0.018005335703492165,
0.02439146488904953,
-0.008825275115668774,
0.02649800106883049,
0.0455898642539978,
0.022307103499770164,
-0.024923643097281456,
0.06727609783411026,
-0.025699734687805176,
0.024036679416894913,
-0.0006811593775637448,
0.005258023738861084,
-0.04873858019709587,
0.007794181816279888,
-0.0038804602809250355,
-0.019646216183900833,
0.015987496823072433,
-0.0232384130358696,
-0.05596732348203659,
0.05450383573770523,
-0.0337710902094841,
0.028449317440390587,
0.005720907356590033,
0.0029962698463350534,
0.022484496235847473,
-0.0034840989392250776,
-0.047895967960357666,
0.00516932737082243,
-0.0016006898367777467,
-0.07250916957855225,
-0.008869623765349388,
0.02365972101688385,
0.04159853607416153,
-0.011497249826788902,
0.021087531000375748,
0.03694198280572891,
0.022539930418133736,
-0.03217456117272377,
-0.007932770065963268,
-0.0028327361214905977,
0.0412880964577198,
-0.012883128598332405,
0.00814342312514782,
0.011236704885959625,
-0.01967947743833065,
-0.030733246356248856,
-0.013969657011330128,
0.005804060027003288,
0.00796603038907051,
0.0019125125836580992,
0.03587762638926506,
-0.0034480663016438484,
-0.03135411813855171,
-0.030045850202441216,
0.020389046519994736,
-0.08785362541675568,
0.002360151382163167,
0.020666223019361496,
0.04168723151087761,
-0.05485862120985985,
-0.007716572377830744,
0.014158137142658234,
-0.0034951861016452312,
0.07162220776081085,
-0.044503334909677505,
-0.00846494734287262,
0.007328526582568884,
-0.0018640068592503667,
0.00741167925298214,
-0.06319607049226761,
-0.037318941205739975,
0.031509339809417725,
-0.016508586704730988,
-0.06891697645187378,
0.05215338617563248,
0.02197449281811714,
0.0008239048765972257,
-0.0072509171441197395,
-0.0011606734478846192,
-0.017273591831326485,
-0.040711574256420135,
-0.005174871068447828,
-0.031376294791698456,
0.008980493992567062,
-0.01386987417936325,
-0.029491499066352844,
-0.05060120299458504,
0.11211204528808594,
-0.02412537671625614,
0.029757587239146233,
-0.024812772870063782,
0.011386379599571228,
0.04638813063502312,
-0.01050496008247137,
0.06590130180120468,
0.03496849164366722,
0.05308469757437706,
-0.05694298446178436,
-0.00578742939978838,
0.0008502365672029555,
-0.05060120299458504,
0.01153051108121872,
-0.03842764347791672,
-0.0174288097769022,
-0.018315773457288742,
0.02270623669028282,
0.0503351129591465,
-0.0606682263314724,
-0.040024176239967346,
0.020355787128210068,
-0.034569356590509415,
-0.009867456741631031,
0.012727909721434116,
-0.019247082993388176,
-0.0022797705605626106,
-0.019479911774396896,
0.07007002830505371,
-0.012395299039781094,
0.015366623178124428,
-0.004179810173809528,
-0.01125333458185196,
-0.008753209374845028,
0.01196290459483862,
0.0033787721768021584,
-0.025189731270074844,
-0.0423746258020401,
0.028715405613183975,
0.02960236929357052,
-0.011441814713180065,
0.029003668576478958,
0.03266238793730736,
-0.03700850531458855,
-0.029580194503068924,
-0.02314971759915352,
-0.049758587032556534,
0.04443681612610817,
0.0206440482288599,
-0.03162020817399025,
-0.012195732444524765,
-0.03696415573358536,
-0.049448151141405106,
0.025788430124521255,
0.031088029965758324,
-0.007378417998552322,
-0.08665622025728226,
-0.02339363284409046,
0.006436020601540804,
0.004285136703401804,
-0.03627676144242287,
0.04452551156282425,
0.007550267037004232,
0.005097261629998684,
-0.02055535279214382,
0.03536762297153473,
0.059337783604860306,
0.06443781405687332,
0.011098116636276245,
0.018725993111729622,
-0.05712037533521652,
-0.01013908814638853,
0.028028011322021484,
0.030444983392953873,
0.07769790291786194,
-0.059648219496011734,
-0.0498916320502758,
0.0030129002407193184,
0.019989915192127228,
0.07876225560903549,
0.0035201318096369505,
0.0002113465016009286,
-0.00395806971937418,
-0.026231911033391953,
0.05148816481232643,
0.0018307457212358713,
0.00981202069669962,
0.03463587909936905,
-0.02361537329852581,
-0.02086578868329525,
0.022728411480784416,
0.0701143741607666,
-0.041532013565301895,
0.042485497891902924,
-0.04335028678178787,
0.03144281730055809,
-0.05760820582509041,
0.013127042911946774,
0.00549085158854723,
-0.0333276093006134,
0.03849416598677635,
-0.011641381308436394,
0.011308769695460796,
-0.025965822860598564,
-0.06607869267463684,
-0.001988735981285572,
-0.04842814430594444,
-0.00561558036133647,
-0.0032762172631919384,
0.0013214353239163756,
-0.01692989468574524,
0.02301667258143425,
0.03479109704494476,
-0.02960236929357052,
-0.04452551156282425,
-0.0679856687784195,
0.012894215062260628,
-0.0017669952940195799,
0.024103201925754547,
-0.0006153301219455898,
0.009678976610302925,
-0.07641180604696274,
0.015233578160405159,
0.01283877994865179,
0.005618352442979813,
0.026209738105535507,
-0.03399283438920975,
-0.01734011434018612,
0.005183186382055283,
-0.03918156400322914,
0.0075170062482357025,
-0.0007421380141749978,
0.04563421383500099,
-0.02607669308781624,
-0.016940981149673462,
-0.020256003364920616,
0.019890131428837776,
-0.03186412155628204,
0.005621124058961868,
0.017872292548418045,
0.046654220670461655,
0.008913971483707428,
0.02310536988079548,
0.010832027532160282,
0.039802435785532,
0.06071257218718529,
0.017728161066770554,
0.049581196159124374,
0.01986795663833618,
0.0018279739888384938,
-0.011092573404312134,
0.02658669650554657,
0.014978576451539993,
0.035345450043678284,
-0.07893965393304825,
0.0008758753538131714,
-0.04142114147543907,
-0.04488029703497887,
-0.07304134964942932,
0.10776592791080475,
-0.04638813063502312,
0.015898799523711205,
-0.020743831992149353,
-0.007855160161852837,
0.01821598969399929,
-0.03028976544737816,
-0.021985579282045364,
-0.03261804208159447,
-0.0331280454993248,
-0.007212112657725811,
0.010621374472975731,
-0.002486266428604722,
0.031376294791698456,
-0.009085820987820625,
-0.02032252587378025,
-0.0029048016294837,
-0.0033704570960253477,
0.04856118932366371,
-0.009024841710925102,
-0.004889380186796188,
0.017417723312973976,
0.07814138382673264,
-0.008525925688445568,
0.013393132016062737,
0.02809453196823597,
0.02521190606057644,
-0.004919869359582663,
-0.0018487621564418077,
-0.041709404438734055,
0.0223736260086298,
0.02576625719666481,
0.048162057995796204,
0.01748424582183361,
-0.005108349025249481,
0.05148816481232643,
0.013792265206575394,
0.015799017623066902,
0.045057687908411026,
0.06257519125938416,
-0.029535846784710884,
-0.003714154940098524,
-0.001918056164868176,
-0.024834945797920227,
0.009024841710925102,
0.04046765714883804,
0.030090197920799255,
-0.04215288534760475,
-0.08248750120401382,
-0.0057541681453585625,
-0.020466657355427742,
0.01926925778388977,
0.019457736983895302,
-0.06550217419862747,
0.03536762297153473,
0.006363954860717058,
0.0740170106291771,
-0.01260595303028822,
0.03982460871338844,
-0.04909336566925049,
-0.06936045736074448,
0.017462071031332016,
-0.011308769695460796,
0.017694899812340736,
0.009052559733390808,
0.05485862120985985,
-0.011863121762871742,
-0.01716272160410881,
-0.003218010300770402,
0.0166638046503067,
-0.00025448197266086936,
0.016231412068009377,
0.009385170415043831,
-0.026653219014406204,
-0.005859495140612125,
0.043217241764068604,
0.004384920001029968,
0.029048018157482147,
0.0009306175634264946,
-0.02352667599916458,
-0.03532327711582184,
-0.024036679416894913,
-0.053794268518686295,
0.04550116881728172,
0.003841655794531107,
0.03206368908286095,
0.0017171036452054977,
0.04443681612610817,
-0.011996165849268436,
-0.022772759199142456,
0.00013347744243219495,
0.05042381212115288,
-0.0116192065179348,
0.06878393143415451,
0.023681895807385445,
-0.0205442663282156,
-0.07601267099380493,
0.053572528064250946,
0.026941481977701187,
0.007638963405042887,
0.03683111071586609,
0.01692989468574524,
-0.03880460187792778,
0.01916947402060032,
0.0048505752347409725,
-0.04419289901852608,
-0.009185603819787502,
0.038560688495635986,
-0.032928477972745895,
0.010006044059991837,
-0.009412888437509537,
-0.01597641035914421,
0.03403718024492264,
-0.010222241282463074,
-0.023171892389655113,
-0.08466055989265442,
-0.01995665393769741,
0.027894966304302216,
0.08058053255081177,
0.07836312800645828,
-0.05867255851626396,
0.04259636625647545
] |
52,348 |
zipfile
|
_RealGetContents
|
Read in the table of contents for the ZIP file.
|
def _RealGetContents(self):
"""Read in the table of contents for the ZIP file."""
fp = self.fp
try:
endrec = _EndRecData(fp)
except OSError:
raise BadZipFile("File is not a zip file")
if not endrec:
raise BadZipFile("File is not a zip file")
if self.debug > 1:
print(endrec)
size_cd = endrec[_ECD_SIZE] # bytes in central directory
offset_cd = endrec[_ECD_OFFSET] # offset of central directory
self._comment = endrec[_ECD_COMMENT] # archive comment
# "concat" is zero, unless zip was concatenated to another file
concat = endrec[_ECD_LOCATION] - size_cd - offset_cd
if endrec[_ECD_SIGNATURE] == stringEndArchive64:
# If Zip64 extension structures are present, account for them
concat -= (sizeEndCentDir64 + sizeEndCentDir64Locator)
if self.debug > 2:
inferred = concat + offset_cd
print("given, inferred, offset", offset_cd, inferred, concat)
# self.start_dir: Position of start of central directory
self.start_dir = offset_cd + concat
if self.start_dir < 0:
raise BadZipFile("Bad offset for central directory")
fp.seek(self.start_dir, 0)
data = fp.read(size_cd)
fp = io.BytesIO(data)
total = 0
while total < size_cd:
centdir = fp.read(sizeCentralDir)
if len(centdir) != sizeCentralDir:
raise BadZipFile("Truncated central directory")
centdir = struct.unpack(structCentralDir, centdir)
if centdir[_CD_SIGNATURE] != stringCentralDir:
raise BadZipFile("Bad magic number for central directory")
if self.debug > 2:
print(centdir)
filename = fp.read(centdir[_CD_FILENAME_LENGTH])
flags = centdir[5]
if flags & 0x800:
# UTF-8 file names extension
filename = filename.decode('utf-8')
else:
# Historical ZIP filename encoding
filename = filename.decode('cp437')
# Create ZipInfo instance to store file information
x = ZipInfo(filename)
x.extra = fp.read(centdir[_CD_EXTRA_FIELD_LENGTH])
x.comment = fp.read(centdir[_CD_COMMENT_LENGTH])
x.header_offset = centdir[_CD_LOCAL_HEADER_OFFSET]
(x.create_version, x.create_system, x.extract_version, x.reserved,
x.flag_bits, x.compress_type, t, d,
x.CRC, x.compress_size, x.file_size) = centdir[1:12]
if x.extract_version > MAX_EXTRACT_VERSION:
raise NotImplementedError("zip file version %.1f" %
(x.extract_version / 10))
x.volume, x.internal_attr, x.external_attr = centdir[15:18]
# Convert date/time code to (year, month, day, hour, min, sec)
x._raw_time = t
x.date_time = ( (d>>9)+1980, (d>>5)&0xF, d&0x1F,
t>>11, (t>>5)&0x3F, (t&0x1F) * 2 )
x._decodeExtra()
x.header_offset = x.header_offset + concat
self.filelist.append(x)
self.NameToInfo[x.filename] = x
# update total bytes read from central directory
total = (total + sizeCentralDir + centdir[_CD_FILENAME_LENGTH]
+ centdir[_CD_EXTRA_FIELD_LENGTH]
+ centdir[_CD_COMMENT_LENGTH])
if self.debug > 2:
print("total", total)
end_offset = self.start_dir
for zinfo in sorted(self.filelist,
key=lambda zinfo: zinfo.header_offset,
reverse=True):
zinfo._end_offset = end_offset
end_offset = zinfo.header_offset
|
(self)
|
[
0.05306766554713249,
0.0234531257301569,
-0.03293375298380852,
0.05306766554713249,
0.07047862559556961,
-0.04774102196097374,
-0.004014857113361359,
0.05100060999393463,
-0.01528428215533495,
-0.0585533082485199,
0.012879342772066593,
0.040605705231428146,
-0.007890584878623486,
-0.0018074309919029474,
0.0005704897921532393,
0.03597470745444298,
-0.03567657619714737,
0.04475969076156616,
-0.018424615263938904,
0.021564949303865433,
-0.02593756653368473,
-0.03985043615102768,
-0.009505472145974636,
0.014499198645353317,
-0.009649569168686867,
-0.003495608689263463,
-0.01619855687022209,
-0.030171053484082222,
0.06252841651439667,
-0.024009639397263527,
-0.024884162470698357,
-0.0010794897098094225,
-0.05636700242757797,
-0.0073986658826470375,
-0.009495534002780914,
-0.02092893235385418,
0.07202892005443573,
-0.011647060513496399,
0.0349411815404892,
0.055134717375040054,
0.0056794327683746815,
-0.03249648958444595,
0.04686649888753891,
-0.023234494030475616,
-0.0029962360858917236,
0.03291387856006622,
-0.05032484233379364,
-0.052709903568029404,
0.004467025399208069,
0.03835977241396904,
-0.0012993627460673451,
0.0015602291096001863,
0.016864387318491936,
-0.04257338494062424,
0.0523918941617012,
0.03186047449707985,
0.006638426799327135,
0.050603099167346954,
-0.024208394810557365,
0.006553955841809511,
-0.00617632083594799,
-0.013853244483470917,
0.024884162470698357,
-0.013942684046924114,
-0.06296567618846893,
0.01915007270872593,
0.007582514546811581,
-0.0663047656416893,
-0.009917888790369034,
0.037246741354465485,
0.020869305357336998,
0.008352691307663918,
-0.010484341531991959,
0.01358492486178875,
-0.015860673040151596,
0.002708040876314044,
-0.0029241873417049646,
-0.028899019584059715,
0.02748785726726055,
-0.03937342390418053,
-0.051636625081300735,
-0.042613133788108826,
0.04305039718747139,
0.044560935348272324,
0.08276170492172241,
0.04324915260076523,
0.09635657072067261,
0.026633208617568016,
0.029992174357175827,
0.06781530380249023,
-0.018007230013608932,
0.04682674631476402,
-0.008794921450316906,
-0.01250170823186636,
0.0034931243862956762,
-0.051318615674972534,
-0.03082694672048092,
-0.018414678052067757,
-0.021227065473794937,
0.04634973406791687,
-0.006365138106048107,
-0.024526404216885567,
0.04909255728125572,
-0.024466777220368385,
-0.03351014107465744,
-0.019060632213950157,
-0.02788536809384823,
-0.01126942504197359,
-0.03432504087686539,
-0.030508937314152718,
-0.03311263397336006,
-0.0818076804280281,
-0.01250170823186636,
-0.034881554543972015,
-0.014260692521929741,
-0.02536117471754551,
0.007806114386767149,
0.014320318587124348,
-0.054419200867414474,
-0.031323835253715515,
0.10247822850942612,
-0.0014471870381385088,
-0.034464169293642044,
0.0011919107055291533,
0.009455783292651176,
-0.028938770294189453,
0.016705382615327835,
-0.006613582372665405,
0.02067054994404316,
0.02305561490356922,
0.023313995450735092,
0.011507931165397167,
-0.008452069014310837,
0.008770077489316463,
0.022419597953557968,
0.009197400882840157,
-0.007512950338423252,
0.0021217127796262503,
-0.07962137460708618,
0.02428789623081684,
0.0514378696680069,
0.01149799395352602,
0.034821927547454834,
0.007055812980979681,
-0.07870709896087646,
0.044203177094459534,
0.015622165985405445,
-0.03388777747750282,
-0.03672998026013374,
-0.01232282817363739,
-0.007269475143402815,
-0.049529820680618286,
-0.05243164673447609,
0.0023987279273569584,
0.037306368350982666,
-0.04404417425394058,
-0.014121564105153084,
0.03259586915373802,
-0.043328654021024704,
0.02639470249414444,
-0.04309014976024628,
-0.00004770903615280986,
0.005957690067589283,
-0.03867778182029724,
-0.035855453461408615,
0.006717929150909185,
-0.038379646837711334,
-0.053345922380685806,
-0.030389685183763504,
0.008153935894370079,
0.029674164950847626,
0.0637209489941597,
-0.03764425218105316,
-0.008650824427604675,
0.0024807145819067955,
0.002044695196673274,
-0.013306667096912861,
-0.008968832902610302,
-0.004022310487926006,
-0.009709196165204048,
-0.024943789467215538,
-0.04048645496368408,
-0.042811889201402664,
0.07194941490888596,
0.029892796650528908,
0.03871753066778183,
0.027726363390684128,
-0.029217028990387917,
0.09842362254858017,
-0.004462056327611208,
-0.07946236431598663,
-0.01242220588028431,
-0.03835977241396904,
0.00991292018443346,
-0.02190283313393593,
0.0005313598667271435,
0.02794499509036541,
0.003716723993420601,
0.019299138337373734,
-0.011746438220143318,
-0.10645333677530289,
-0.005411112681031227,
0.048655297607183456,
-0.057042770087718964,
0.0015006024623289704,
0.019686711952090263,
-0.013763803988695145,
-0.0007807356305420399,
-0.0947665274143219,
0.09723109006881714,
0.05732102692127228,
-0.01405199896544218,
-0.009674414061009884,
-0.005127886775881052,
0.0038483995012938976,
-0.04829753562808037,
-0.039572179317474365,
-0.01438988372683525,
0.04857579246163368,
0.017102893441915512,
-0.019915280863642693,
0.035497695207595825,
-0.04698575288057327,
-0.0326753705739975,
-0.004114234820008278,
-0.020302852615714073,
0.05259064957499504,
0.04293114319443703,
0.013107911683619022,
-0.03241698816418648,
-0.021942583844065666,
-0.09079141914844513,
-0.009947702288627625,
0.02371150627732277,
0.04408392310142517,
-0.04813853278756142,
0.027607111260294914,
-0.004037216771394014,
0.028024496510624886,
-0.02034260518848896,
-0.037047985941171646,
-0.012779965065419674,
0.01513521559536457,
0.0283027533441782,
-0.04217587411403656,
-0.08236419409513474,
-0.006529111415147781,
0.05330616980791092,
-0.01943826861679554,
0.011746438220143318,
0.026017067953944206,
-0.021386070176959038,
-0.009102992713451385,
-0.04499819874763489,
0.054776959121227264,
-0.022976111620664597,
0.0076868608593940735,
-0.04320940002799034,
0.04475969076156616,
-0.03378840163350105,
0.009942733682692051,
-0.09794660657644272,
0.05028508976101875,
-0.050444092601537704,
-0.004347771871834993,
0.04098334163427353,
0.06586750596761703,
-0.07024011760950089,
-0.02041216939687729,
0.0122930146753788,
0.05569123476743698,
-0.003709270618855953,
-0.056009240448474884,
0.04603172466158867,
-0.06753704696893692,
-0.00943093840032816,
0.053345922380685806,
-0.060143351554870605,
-0.04523670673370361,
0.028958646580576897,
-0.005381299648433924,
0.03231761232018471,
-0.032039351761341095,
-0.015433348715305328,
-0.01014148909598589,
-0.017907852306962013,
-0.033390890806913376,
-0.04293114319443703,
-0.040705084800720215,
0.01064334623515606,
0.002864560578018427,
0.029574787244200706,
0.011994882486760616,
-0.06328368932008743,
0.05108011141419411,
-0.005753965582698584,
-0.0407448336482048,
-0.053902436047792435,
-0.013366293162107468,
-0.005684401374310255,
-0.10104719549417496,
-0.0016571222804486752,
0.030071675777435303,
-0.003912994638085365,
-0.050245337188243866,
0.008889330551028252,
0.013833368197083473,
0.010752661153674126,
-0.011179985478520393,
-0.002874498488381505,
0.061176881194114685,
-0.005858312360942364,
0.02402951568365097,
0.009107961319386959,
-0.03885665908455849,
-0.0014509136090055108,
0.00166954449377954,
0.06674202531576157,
-0.006886871065944433,
0.059109825640916824,
-0.017907852306962013,
0.02186308242380619,
-0.0394727997481823,
-0.007721643429249525,
0.07493074983358383,
-0.0018844486912712455,
-0.010066955350339413,
0.01345573365688324,
0.04619073122739792,
0.021326443180441856,
-0.02076992765069008,
0.025400927290320396,
-0.022598477080464363,
0.03998956456780434,
0.04841678962111473,
0.03510018438100815,
-0.004521682858467102,
-0.06745754927396774,
0.03315238282084465,
-0.04062558338046074,
0.054061438888311386,
-0.0033912621438503265,
-0.0446404404938221,
-0.005674463696777821,
-0.02267797850072384,
-0.045912474393844604,
0.09095042198896408,
-0.022976111620664597,
-0.024566154927015305,
-0.016407249495387077,
-0.011199860833585262,
-0.021326443180441856,
-0.03124433197081089,
0.031741220504045486,
-0.0026161165442317724,
0.036888983100652695,
-0.03667035326361656,
-0.050762102007865906,
0.039154794067144394,
0.04567396640777588,
-0.009555160999298096,
0.02891889587044716,
0.000597197562456131,
-0.0101862084120512,
-0.04813853278756142,
-0.10359126329421997,
-0.014996087178587914,
0.04181811586022377,
-0.002022335072979331,
-0.004578825086355209,
-0.018911566585302353,
-0.042970895767211914,
-0.0038384615909308195,
-0.04587272182106972,
-0.007244630716741085,
-0.024407150223851204,
-0.011179985478520393,
-0.007105501834303141,
-0.07564626634120941,
0.022658104076981544,
0.0001279487187275663,
0.054220445454120636,
-0.043487656861543655,
0.05525397136807442,
-0.016904138028621674,
-0.026931341737508774,
0.031204581260681152,
0.0069216531701385975,
-0.015403535217046738,
0.03949267789721489,
-0.00017996670794673264,
0.030846821144223213,
0.016774946823716164,
0.012312890961766243,
0.03901566565036774,
0.008710450492799282,
0.052709903568029404,
0.003309275722131133,
-0.05259064957499504,
0.011150171980261803,
0.05314716696739197,
-0.02655370719730854,
0.04448143392801285,
0.05922907963395119,
0.014071875251829624,
-0.054419200867414474,
0.05211363732814789,
-0.06304518133401871,
-0.008625979535281658,
-0.001801219885237515,
-0.012432144023478031,
-0.03247661516070366,
0.04289139434695244,
0.013107911683619022,
-0.04241437837481499,
0.02092893235385418,
-0.05000683292746544,
-0.040128692984580994,
0.06880908459424973,
-0.018414678052067757,
0.02665308490395546,
-0.012074383907020092,
0.013336480595171452,
0.029455535113811493,
-0.0009881864534690976,
-0.042613133788108826,
0.00014339883637148887,
0.0033266667742282152,
-0.06328368932008743,
-0.01973639987409115,
0.05278940498828888,
0.04511745274066925,
-0.02732885256409645,
0.018066857010126114,
0.015025900676846504,
0.039154794067144394,
-0.02387051098048687,
-0.0030459249392151833,
0.011050794273614883,
0.022141339257359505,
-0.04328890144824982,
0.03390765190124512,
0.02164445072412491,
-0.040387075394392014,
-0.013694239780306816,
-0.001324207172729075,
0.0022335126996040344,
-0.018573682755231857,
-0.011020980775356293,
-0.0018620886839926243,
-0.014519074000418186,
-0.04285164177417755,
-0.04056595638394356,
0.0013726537581533194,
-0.08339772373437881,
-0.0023614612873643637,
0.031522590667009354,
0.05700301751494408,
-0.055452726781368256,
0.0030508937779814005,
0.004094358999282122,
0.0015266891568899155,
0.05290865898132324,
-0.05195463448762894,
0.01917988620698452,
-0.029614539816975594,
-0.0211873147636652,
0.013604800216853619,
-0.07878659665584564,
-0.03541819378733635,
0.02526179887354374,
-0.002068297239020467,
-0.032297734171152115,
0.04877454787492752,
0.04026782140135765,
-0.0049514914862811565,
-0.00837753526866436,
0.0011583707528188825,
-0.02108793705701828,
-0.04523670673370361,
0.00958994310349226,
-0.034046780318021774,
0.009575036354362965,
-0.04360691085457802,
-0.026335077360272408,
-0.029992174357175827,
0.06419795751571655,
-0.01057378202676773,
0.038339897990226746,
-0.06415820866823196,
0.003823555074632168,
0.075686015188694,
-0.01646687649190426,
0.030727569013834,
0.04595222324132919,
0.057162024080753326,
-0.0007503012311644852,
-0.014866895973682404,
0.017420900985598564,
-0.026056818664073944,
0.020750053226947784,
-0.054339699447155,
0.017261898145079613,
-0.0012745183194056153,
-0.017510341480374336,
0.0472242571413517,
-0.04058583080768585,
-0.01976621337234974,
0.01410168781876564,
-0.03667035326361656,
-0.002269536955282092,
0.018523992970585823,
-0.01626812107861042,
-0.006002409849315882,
-0.01788797602057457,
0.05004658177495003,
-0.03062819130718708,
0.02406926639378071,
0.004004918970167637,
0.013256978243589401,
-0.032456740736961365,
0.021982336416840553,
-0.006076943129301071,
-0.009351436980068684,
-0.044004421681165695,
0.04499819874763489,
-0.01833517663180828,
-0.01711283065378666,
-0.006553955841809511,
-0.005520428530871868,
-0.054260194301605225,
-0.01823579892516136,
0.01237251702696085,
-0.051119860261678696,
0.055293723940849304,
0.00569930812343955,
-0.01642712578177452,
-0.03867778182029724,
-0.04309014976024628,
-0.01688426174223423,
0.03845914825797081,
-0.022081714123487473,
0.012233388610184193,
-0.06702028214931488,
-0.008700513280928135,
0.019686711952090263,
0.0005145898903720081,
-0.02687171660363674,
0.06225015968084335,
0.020451920107007027,
-0.006131601054221392,
-0.021425820887088776,
0.05521422252058983,
0.009222245775163174,
0.04412367567420006,
0.021107811480760574,
0.0027850584592670202,
-0.06439671665430069,
-0.01899106800556183,
0.027607111260294914,
0.0546577051281929,
0.06737804412841797,
-0.04762176796793938,
-0.009873169474303722,
0.02613632194697857,
0.04356716200709343,
0.04543546214699745,
0.005083166528493166,
-0.011706686578691006,
-0.00574899697676301,
-0.058235302567481995,
0.07282394170761108,
-0.007701767608523369,
0.029296530410647392,
0.047462765127420425,
-0.025082917883992195,
-0.040605705231428146,
-0.005545272957533598,
0.08097290992736816,
-0.06546999514102936,
0.06817306578159332,
-0.05537322536110878,
0.07656054198741913,
-0.02464565634727478,
0.03682935610413551,
0.02639470249414444,
-0.040088944137096405,
0.023234494030475616,
0.04022807255387306,
-0.0007546489941887558,
-0.008501757867634296,
-0.07524875551462173,
-0.005242170765995979,
-0.016486750915646553,
0.012114135548472404,
0.02422827109694481,
-0.023433249443769455,
-0.01531409565359354,
-0.01575135625898838,
0.012253263965249062,
-0.03639209270477295,
-0.01652650348842144,
-0.04376591742038727,
0.01041477732360363,
-0.002958969445899129,
0.01833517663180828,
0.026533832773566246,
-0.004790002480149269,
-0.0407448336482048,
0.018842002376914024,
0.028541259467601776,
-0.007448354735970497,
0.03156233951449394,
-0.032198358327150345,
0.006305511575192213,
-0.010613532736897469,
-0.009371312335133553,
-0.02267797850072384,
0.012809778563678265,
0.032198358327150345,
-0.02289661020040512,
-0.013028409332036972,
-0.009952671825885773,
0.0124520193785429,
-0.0308865737169981,
0.018295424059033394,
0.030250556766986847,
0.033589646220207214,
0.02758723497390747,
0.03146296367049217,
0.028958646580576897,
0.0469062514603138,
0.053345922380685806,
0.035398319363594055,
0.04905280843377113,
0.025957440957427025,
0.005023539997637272,
-0.02726922556757927,
0.0011919107055291533,
0.04022807255387306,
0.05358442664146423,
-0.04511745274066925,
-0.010047079995274544,
-0.019418392330408096,
-0.051636625081300735,
-0.04929131269454956,
0.07954186946153641,
-0.04793977737426758,
0.01575135625898838,
0.007080657407641411,
-0.023234494030475616,
0.04185786470770836,
-0.009942733682692051,
0.0058235302567481995,
-0.040029317140579224,
-0.044719941914081573,
-0.02196246013045311,
0.015602290630340576,
-0.005937814246863127,
0.02267797850072384,
0.018941380083560944,
-0.028223251923918724,
-0.007627234328538179,
-0.043845418840646744,
0.056844014674425125,
-0.028680389747023582,
-0.0059676277451217175,
0.06376069784164429,
0.08459025621414185,
-0.014678078703582287,
0.045753467828035355,
0.03345051780343056,
0.03959205374121666,
-0.01853393204510212,
-0.001438491395674646,
-0.029634414240717888,
0.029197152704000473,
0.03762437775731087,
0.0763220340013504,
0.028958646580576897,
0.011865691281855106,
0.047462765127420425,
0.018355051055550575,
0.031522590667009354,
0.05211363732814789,
0.051994383335113525,
-0.016774946823716164,
-0.004044670145958662,
0.0026633208617568016,
-0.025301549583673477,
0.008372566662728786,
0.006812337785959244,
0.02088918164372444,
-0.024268021807074547,
-0.04619073122739792,
0.01144830510020256,
-0.007865740917623043,
-0.011746438220143318,
0.013783679343760014,
-0.043845418840646744,
0.024506527930498123,
0.01539359800517559,
0.06125638261437416,
0.0016459423350170255,
0.02814375050365925,
-0.03641197085380554,
-0.06093837320804596,
0.019169948995113373,
-0.053345922380685806,
0.04056595638394356,
0.025480428710579872,
0.06232966110110283,
-0.044839195907115936,
-0.03820076584815979,
-0.007105501834303141,
0.020650675520300865,
0.026533832773566246,
0.005768872331827879,
0.02480466105043888,
-0.016695445403456688,
-0.0009465721086598933,
0.027925118803977966,
0.038280270993709564,
0.06455571949481964,
-0.026076694950461388,
0.024049390107393265,
-0.024824535474181175,
-0.018971193581819534,
-0.06491348147392273,
0.05080185458064079,
0.006613582372665405,
0.02671271190047264,
0.017957540228962898,
0.045753467828035355,
-0.029674164950847626,
-0.011716624721884727,
-0.010022236034274101,
0.02422827109694481,
-0.0245860293507576,
0.02768661268055439,
-0.009306716732680798,
-0.0250630434602499,
-0.06332343816757202,
0.07008111476898193,
-0.02927665412425995,
0.022439472377300262,
0.023691631853580475,
0.019756276160478592,
-0.013445795513689518,
0.037206992506980896,
-0.007418541237711906,
-0.02881951816380024,
-0.012561334297060966,
0.007522888015955687,
-0.05429994687438011,
0.034265413880348206,
-0.005545272957533598,
-0.04352740943431854,
0.01989540457725525,
0.023115240037441254,
0.02623569965362549,
-0.0714724063873291,
-0.03919454291462898,
0.05930858105421066,
0.07735556364059448,
0.05588999018073082,
-0.04762176796793938,
0.0591893270611763
] |
52,352 |
zipfile
|
__init__
|
Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
or append 'a'.
|
def __init__(self, file, mode="r", compression=ZIP_STORED, allowZip64=True,
compresslevel=None, *, strict_timestamps=True):
"""Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
or append 'a'."""
if mode not in ('r', 'w', 'x', 'a'):
raise ValueError("ZipFile requires mode 'r', 'w', 'x', or 'a'")
_check_compression(compression)
self._allowZip64 = allowZip64
self._didModify = False
self.debug = 0 # Level of printing: 0 through 3
self.NameToInfo = {} # Find file info given name
self.filelist = [] # List of ZipInfo instances for archive
self.compression = compression # Method of compression
self.compresslevel = compresslevel
self.mode = mode
self.pwd = None
self._comment = b''
self._strict_timestamps = strict_timestamps
# Check if we were passed a file-like object
if isinstance(file, os.PathLike):
file = os.fspath(file)
if isinstance(file, str):
# No, it's a filename
self._filePassed = 0
self.filename = file
modeDict = {'r' : 'rb', 'w': 'w+b', 'x': 'x+b', 'a' : 'r+b',
'r+b': 'w+b', 'w+b': 'wb', 'x+b': 'xb'}
filemode = modeDict[mode]
while True:
try:
self.fp = io.open(file, filemode)
except OSError:
if filemode in modeDict:
filemode = modeDict[filemode]
continue
raise
break
else:
self._filePassed = 1
self.fp = file
self.filename = getattr(file, 'name', None)
self._fileRefCnt = 1
self._lock = threading.RLock()
self._seekable = True
self._writing = False
try:
if mode == 'r':
self._RealGetContents()
elif mode in ('w', 'x'):
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
try:
self.start_dir = self.fp.tell()
except (AttributeError, OSError):
self.fp = _Tellable(self.fp)
self.start_dir = 0
self._seekable = False
else:
# Some file-like objects can provide tell() but not seek()
try:
self.fp.seek(self.start_dir)
except (AttributeError, OSError):
self._seekable = False
elif mode == 'a':
try:
# See if file is a zip file
self._RealGetContents()
# seek to start of directory and overwrite
self.fp.seek(self.start_dir)
except BadZipFile:
# file is not a zip file, just append
self.fp.seek(0, 2)
# set the modified flag so central directory gets written
# even if no files are added to the archive
self._didModify = True
self.start_dir = self.fp.tell()
else:
raise ValueError("Mode must be 'r', 'w', 'x', or 'a'")
except:
fp = self.fp
self.fp = None
self._fpclose(fp)
raise
|
(self, file, mode='r', compression=0, allowZip64=True, compresslevel=None, *, strict_timestamps=True)
|
[
0.03497017174959183,
0.020938804373145103,
-0.021299639716744423,
0.06668251007795334,
0.06062046438455582,
-0.04523853957653046,
-0.027093635872006416,
0.07043521106243134,
-0.03416602313518524,
-0.05105315521359444,
0.014041678979992867,
0.052414022386074066,
-0.032269056886434555,
0.008969354443252087,
-0.00758786778897047,
0.020918184891343117,
-0.0368877612054348,
0.05686777085065842,
-0.059919413179159164,
0.03639289736747742,
-0.0033171146642416716,
-0.001241018413566053,
-0.0206295158714056,
0.05356869846582413,
0.018784096464514732,
0.03651661425828934,
-0.02259865030646324,
-0.006438347045332193,
0.021155305206775665,
-0.01683558151125908,
-0.0206295158714056,
-0.007273424882441759,
-0.020041868090629578,
-0.0203202273696661,
0.0048867519944906235,
-0.01938205398619175,
-0.004002703353762627,
0.02474304661154747,
-0.001753921271301806,
-0.027093635872006416,
0.05472337454557419,
-0.01962948404252529,
-0.011959139257669449,
-0.017165489494800568,
-0.007933239452540874,
0.05509451776742935,
-0.013680843636393547,
-0.024639951065182686,
0.028021501377224922,
-0.017845923081040382,
0.008407481014728546,
0.05051705613732338,
0.026784349232912064,
-0.04676435887813568,
0.007778595667332411,
0.05686777085065842,
0.009036366827785969,
0.03812491148710251,
-0.006433192174881697,
-0.016031432896852493,
-0.012598334811627865,
0.0017564985901117325,
0.044537484645843506,
-0.022000692784786224,
-0.06890938431024551,
0.024784285575151443,
-0.04730045795440674,
-0.06297105550765991,
0.0025387397035956383,
0.05480584874749184,
0.043960146605968475,
0.0044357068836688995,
0.004969228524714708,
0.010773534886538982,
0.017619110643863678,
0.051465537399053574,
-0.03022775612771511,
-0.008046644739806652,
0.026825586333870888,
-0.03595989570021629,
-0.031052524223923683,
-0.04325909540057182,
0.004301681648939848,
0.04226937144994736,
0.04631073772907257,
0.003487223293632269,
0.060290560126304626,
-0.010046708397567272,
0.001634072046726942,
0.024310043081641197,
-0.041238412261009216,
0.04363023862242699,
0.013010718859732151,
-0.026207011193037033,
0.008515732362866402,
-0.0551769956946373,
-0.010103411041200161,
-0.022887319326400757,
-0.012020996771752834,
0.03179481625556946,
-0.055589377880096436,
-0.06482678651809692,
-0.021217163652181625,
-0.05550690367817879,
-0.03418664261698723,
-0.027794688940048218,
-0.0092219403013587,
-0.009304416365921497,
-0.06264115124940872,
-0.04284670948982239,
-0.01470149401575327,
-0.09022964537143707,
0.020969731733202934,
-0.01524790283292532,
-0.02810397744178772,
-0.005211504176259041,
-0.012711740098893642,
0.004206317942589521,
-0.02319660596549511,
-0.038846585899591446,
0.10705491900444031,
-0.0014188591158017516,
-0.02474304661154747,
0.04412510246038437,
0.03839296102523804,
-0.019918153062462807,
-0.007093006744980812,
-0.02441314049065113,
0.05072324723005295,
0.02913493849337101,
-0.016186077147722244,
0.02261926978826523,
0.008742542937397957,
0.0060208081267774105,
0.010397234931588173,
-0.016969606280326843,
-0.027485402300953865,
0.030330851674079895,
-0.08825020492076874,
0.04494987055659294,
0.07975509017705917,
-0.07744573801755905,
0.01662939041852951,
-0.000989077496342361,
-0.06697118282318115,
0.010825083591043949,
-0.0006913877441547811,
-0.026784349232912064,
-0.028207072988152504,
0.0046083927154541016,
0.03785686194896698,
-0.038475438952445984,
-0.03631042316555977,
0.04342404752969742,
0.074394091963768,
-0.03435159847140312,
-0.012959171086549759,
0.010536414571106434,
-0.028825649991631508,
0.011618922464549541,
-0.03979506716132164,
0.022062551230192184,
-0.01253647729754448,
-0.017217036336660385,
0.007072387728840113,
-0.007294044364243746,
-0.025361623615026474,
-0.03983630612492561,
0.013010718859732151,
0.010990036651492119,
0.021155305206775665,
0.046104542911052704,
0.016938677057623863,
0.021608928218483925,
-0.019402673467993736,
0.03818676993250847,
0.005376458168029785,
-0.0023157945834100246,
0.00015230827557388693,
0.004598082974553108,
-0.017237655818462372,
-0.03602175414562225,
-0.055836811661720276,
0.026701871305704117,
0.05389860272407532,
0.028475124388933182,
0.01179418619722128,
-0.008438410237431526,
0.08037366718053818,
0.02008310705423355,
-0.06280609965324402,
-0.009118843823671341,
-0.023423418402671814,
-0.01589740812778473,
-0.039073396474123,
0.011526135727763176,
-0.015196355059742928,
-0.021547069773077965,
0.055465664714574814,
0.010856011882424355,
-0.06874443590641022,
0.040537357330322266,
0.03915587067604065,
-0.03544441610574722,
-0.021608928218483925,
0.03195976838469505,
0.03643413633108139,
0.019732579588890076,
-0.06981663405895233,
0.07385799288749695,
0.05278516560792923,
-0.04037240520119667,
0.026371965184807777,
0.01777375489473343,
0.015742763876914978,
-0.057197678834199905,
-0.009304416365921497,
0.014887066558003426,
0.025609053671360016,
0.055341947823762894,
-0.02758849784731865,
0.0737755224108696,
-0.0967453122138977,
-0.00875285267829895,
0.008969354443252087,
-0.017670659348368645,
0.07509514689445496,
0.03276391699910164,
-0.0175057053565979,
0.013959202915430069,
-0.011289015412330627,
-0.10919931530952454,
0.0025993087328970432,
0.028908126056194305,
0.02035115659236908,
-0.06585774570703506,
0.023856421932578087,
-0.0040929121896624565,
-0.028784411028027534,
-0.024310043081641197,
0.019155241549015045,
-0.03177419677376747,
0.050682008266448975,
0.03686714172363281,
-0.02402137592434883,
-0.06936300545930862,
0.007948704063892365,
0.050104670226573944,
-0.0070053753443062305,
-0.01114468090236187,
0.027794688940048218,
0.03482583910226822,
-0.06697118282318115,
-0.023237844929099083,
0.012732359580695629,
-0.022578030824661255,
0.04171265289187431,
-0.06284733861684799,
0.01980474777519703,
-0.010361150838434696,
-0.016608770936727524,
-0.06301229447126389,
0.05975445732474327,
-0.07262084633111954,
0.013876725919544697,
-0.01370146218687296,
0.03624856472015381,
-0.10837454348802567,
0.0017912934999912977,
0.008675530552864075,
0.09468339383602142,
-0.020206822082400322,
-0.024248186498880386,
0.06041427329182625,
-0.056496623903512955,
-0.020949114114046097,
0.0439189076423645,
-0.05567185580730438,
-0.018918121233582497,
0.035176366567611694,
0.023691467940807343,
0.04960981011390686,
0.011134371161460876,
0.0006456389091908932,
-0.024371901527047157,
0.02195945382118225,
-0.04210441932082176,
0.03707333281636238,
-0.03979506716132164,
-0.00022213972988538444,
0.004672827664762735,
0.04775408282876015,
0.011876662261784077,
-0.04239308834075928,
0.046599406749010086,
0.001734590739943087,
-0.06606393307447433,
-0.058352354913949966,
0.025856483727693558,
-0.05761006101965904,
-0.08012623339891434,
0.0005586516344919801,
0.013763319700956345,
0.011948829516768456,
-0.04478491470217705,
-0.04684683680534363,
-0.015041710808873177,
0.016557222232222557,
-0.019175861030817032,
0.042351849377155304,
0.08016747236251831,
0.004461480770260096,
-0.0021237782202661037,
-0.005428005941212177,
-0.00940235797315836,
0.0011347007239237428,
0.01592833735048771,
0.018784096464514732,
-0.0038016662001609802,
0.07047644257545471,
-0.057651299983263016,
-0.0004062627849634737,
-0.02628948725759983,
-0.01735106110572815,
0.05418727174401283,
-0.004987270571291447,
0.0245368555188179,
0.013299387879669666,
0.005613578949123621,
0.03464026749134064,
-0.06928053498268127,
0.05303259938955307,
-0.012412762269377708,
0.012680811807513237,
-0.03241339325904846,
0.03849605843424797,
-0.019340815022587776,
-0.06445563584566116,
0.03971258923411369,
-0.028392646461725235,
0.03435159847140312,
0.025732768699526787,
-0.05480584874749184,
-0.01343341264873743,
-0.048743803054094315,
-0.035052649676799774,
0.06441439688205719,
0.0013028760440647602,
0.013763319700956345,
0.003915071953088045,
0.016495365649461746,
-0.036083608865737915,
-0.04969228804111481,
-0.0038274400867521763,
-0.010026088915765285,
-0.01856759563088417,
-0.032042246311903,
-0.02744416333734989,
0.03682590276002884,
0.02144397422671318,
-0.004214050248265266,
0.032269056886434555,
-0.014320038259029388,
0.008593054488301277,
-0.004793965257704258,
-0.0678371861577034,
0.02138211578130722,
0.022268742322921753,
-0.023918278515338898,
-0.031031904742121696,
0.026598775759339333,
-0.0565791018307209,
-0.022248122841119766,
-0.05505327880382538,
-0.02583586424589157,
0.0019253183854743838,
0.03758881241083145,
-0.02259865030646324,
-0.029093699529767036,
-0.017217036336660385,
-0.0007790193776600063,
0.03206286579370499,
-0.009912683628499508,
0.04812522605061531,
-0.041052840650081635,
-0.024660570546984673,
0.017454158514738083,
-0.0019356280099600554,
0.037300143390893936,
0.05117686837911606,
-0.02971227653324604,
0.036475375294685364,
0.008371397852897644,
-0.033485591411590576,
0.02816583588719368,
0.011443659663200378,
0.058352354913949966,
0.034145403653383255,
-0.05117686837911606,
0.030516425147652626,
0.0242275670170784,
-0.017031464725732803,
0.01669124700129032,
0.04639321193099022,
0.023217225447297096,
-0.0003727565926965326,
0.06457935273647308,
-0.01443344447761774,
0.03327940031886101,
0.012134402990341187,
0.017577873542904854,
-0.038929060101509094,
0.009912683628499508,
-0.028186455368995667,
-0.011773566715419292,
0.0253203846514225,
-0.01230966579169035,
-0.06746604293584824,
0.041238412261009216,
-0.026062676683068275,
0.023114129900932312,
0.04179513081908226,
-0.007819834165275097,
0.019062455743551254,
0.00447436748072505,
-0.046351976692676544,
0.00313411932438612,
-0.01632010191679001,
-0.06895062327384949,
-0.0030877261888235807,
0.01266019232571125,
0.04973352327942848,
0.005402232054620981,
0.04655816778540611,
0.04437253251671791,
0.010536414571106434,
-0.0365784727036953,
-0.008840484544634819,
-0.0024317775387316942,
0.04297042638063431,
0.00917554646730423,
0.0010850856779143214,
0.0004342920146882534,
-0.007175483740866184,
-0.05130058526992798,
-0.019670723006129265,
0.024186328053474426,
0.002623793901875615,
0.019547007977962494,
0.03975382819771767,
-0.0001300781877944246,
-0.013000409118831158,
-0.018577905371785164,
0.019134623929858208,
-0.08350778371095657,
-0.007417759392410517,
-0.0030129814986139536,
0.03257834538817406,
-0.023856421932578087,
-0.012608644552528858,
0.024763666093349457,
0.0007049191044643521,
0.06709489971399307,
-0.039630115032196045,
-0.006257928907871246,
0.010907559655606747,
0.0016082980437204242,
0.013866416178643703,
-0.05084696039557457,
-0.050682008266448975,
0.03915587067604065,
-0.0030722618103027344,
-0.06420820951461792,
0.04697054997086525,
-0.0231347493827343,
-0.007804369553923607,
-0.0033712401054799557,
-0.009005438536405563,
0.00401301309466362,
-0.012031306512653828,
-0.00508778914809227,
-0.02261926978826523,
-0.008304385468363762,
0.009603395126760006,
-0.02552657760679722,
-0.054558418691158295,
0.10656005889177322,
-0.03661971166729927,
0.030763855203986168,
-0.001068976940587163,
0.016454126685857773,
0.006417728029191494,
-0.011814804747700691,
0.059465792030096054,
0.025732768699526787,
0.04026930779218674,
-0.05505327880382538,
-0.0038686785846948624,
-0.024846144020557404,
-0.029155557975172997,
-0.00007293238741112873,
-0.05447594076395035,
-0.018825335428118706,
-0.007618796546012163,
0.009268333204090595,
0.055259473621845245,
-0.06000189110636711,
-0.058558546006679535,
0.01370146218687296,
-0.02499047853052616,
-0.005933176726102829,
0.009309571236371994,
-0.019041836261749268,
0.003958887420594692,
-0.00758786778897047,
0.05851730704307556,
-0.01947483979165554,
0.0010167845757678151,
-0.019454220309853554,
-0.015340689569711685,
0.01575307361781597,
0.008268301375210285,
0.025114193558692932,
-0.028062740340828896,
-0.03068137913942337,
0.013691152445971966,
0.051836684346199036,
0.0023879618383944035,
0.042475566267967224,
0.01880471594631672,
-0.03307320550084114,
-0.05905340611934662,
-0.03567122668027878,
-0.06264115124940872,
0.04618702083826065,
0.02977413311600685,
-0.018278926610946655,
-0.011237467639148235,
-0.04169203341007233,
-0.04993971809744835,
0.043506525456905365,
0.0376712903380394,
-0.006907434202730656,
-0.0937761515378952,
-0.021361498162150383,
-0.011474587954580784,
-0.011711709201335907,
-0.04115593433380127,
0.04779531806707382,
-0.018938740715384483,
0.014773661270737648,
-0.03212472423911095,
0.030701998621225357,
0.08660066872835159,
0.051836684346199036,
0.011866353452205658,
0.030124660581350327,
-0.054352227598428726,
0.01179418619722128,
0.019918153062462807,
0.017907779663801193,
0.06804338097572327,
-0.06334219872951508,
-0.0365784727036953,
-0.019784128293395042,
0.010041553527116776,
0.08849763125181198,
0.004342920146882534,
0.013969511725008488,
0.0018441302236169577,
-0.026330726221203804,
0.039300207048654556,
-0.01051064021885395,
0.015309760347008705,
0.032722681760787964,
-0.034207262098789215,
-0.0032269058283418417,
0.05406355857849121,
0.06103285029530525,
-0.029629798606038094,
0.036331042647361755,
-0.050558291375637054,
0.010907559655606747,
-0.05748634785413742,
-0.004348075017333031,
-0.0077528213150799274,
-0.019062455743551254,
0.03140304982662201,
0.000837010913528502,
0.008392016403377056,
-0.02668125182390213,
-0.058888453990221024,
0.007943549193441868,
-0.06639384478330612,
-0.032598964869976044,
0.010392080061137676,
0.013691152445971966,
-0.03624856472015381,
0.016464436426758766,
0.044290054589509964,
-0.04494987055659294,
-0.050475817173719406,
-0.07319818437099457,
0.001560616190545261,
-0.01117561012506485,
0.025938961654901505,
-0.011928210966289043,
0.03183605521917343,
-0.07818803191184998,
0.024763666093349457,
0.008670375682413578,
0.002277133520692587,
0.042475566267967224,
-0.018979979678988457,
-0.005541411694139242,
0.015742763876914978,
-0.020010938867926598,
0.016773724928498268,
-0.0015979884192347527,
0.04022807255387306,
-0.02538224309682846,
-0.008922961540520191,
-0.013917963951826096,
0.023464657366275787,
-0.03754757344722748,
0.004819739609956741,
0.01869131065905094,
0.03257834538817406,
0.01902121677994728,
0.021175924688577652,
0.022041931748390198,
0.047836557030677795,
0.041300270706415176,
0.024846144020557404,
0.04354776442050934,
0.018175829201936722,
-0.006361024919897318,
-0.0004497564223129302,
0.02083570696413517,
0.020093416795134544,
0.05344498157501221,
-0.10730234533548355,
0.015639668330550194,
-0.056950248777866364,
-0.04960981011390686,
-0.07484772056341171,
0.10903435945510864,
-0.04169203341007233,
0.018309855833649635,
-0.01547471433877945,
-0.005742448847740889,
-0.007670344784855843,
-0.026268867775797844,
-0.016268553212285042,
-0.007031149230897427,
-0.028268931433558464,
0.011412730440497398,
0.015845859423279762,
0.004497564397752285,
0.039176490157842636,
-0.01853666640818119,
-0.03101128526031971,
0.001933050574734807,
-0.009489989839494228,
0.029794752597808838,
0.002113468712195754,
-0.01153644546866417,
0.013392174616456032,
0.07241465151309967,
-0.0025348735507577658,
-0.006474430672824383,
0.033176302909851074,
0.019371744245290756,
0.014134465716779232,
0.006469275802373886,
-0.04375395551323891,
0.03206286579370499,
0.01971196010708809,
0.04651692882180214,
0.019938772544264793,
-0.01647474616765976,
0.01892843097448349,
0.014577778987586498,
-0.010474557057023048,
0.027237970381975174,
0.06866195797920227,
-0.02171202376484871,
-0.006087820511311293,
-0.015206664800643921,
-0.032475247979164124,
-0.004734685178846121,
0.046805597841739655,
0.021423354744911194,
-0.029815372079610825,
-0.0737755224108696,
0.0013673111097887158,
-0.013381864875555038,
0.009691026993095875,
0.025052335113286972,
-0.05612548068165779,
0.030928809195756912,
0.02056765742599964,
0.09270395338535309,
-0.013175672851502895,
0.030207136645913124,
-0.053197551518678665,
-0.059795696288347244,
0.020701682195067406,
0.008582744747400284,
0.0010071193100884557,
0.0008473204798065126,
0.06866195797920227,
0.011041584424674511,
-0.0011411441955715418,
0.0011347007239237428,
-0.0028712244238704443,
0.010093101300299168,
0.0025065222289413214,
0.013990131206810474,
-0.023423418402671814,
-0.016268553212285042,
0.04026930779218674,
-0.01732013374567032,
0.01762942038476467,
0.012608644552528858,
-0.04560968279838562,
-0.05864102020859718,
-0.015258212573826313,
-0.04367147758603096,
0.023011034354567528,
0.016402577981352806,
0.02395951747894287,
0.007943549193441868,
0.002085117157548666,
-0.0040748706087470055,
-0.030145280063152313,
0.01605205237865448,
0.04717674478888512,
0.016825271770358086,
0.08470369875431061,
0.02332032285630703,
-0.0007809524540789425,
-0.08544599264860153,
0.06841452419757843,
0.04457872360944748,
-0.006680622696876526,
0.05732139199972153,
0.02202131226658821,
-0.05245526134967804,
0.017608802765607834,
0.005110985599458218,
-0.05773377791047096,
-0.00844871997833252,
0.04998095706105232,
-0.03497017174959183,
-0.010459092445671558,
-0.008123966865241528,
-0.014619017019867897,
0.04239308834075928,
-0.012216879986226559,
-0.0357949398458004,
-0.09402357786893845,
-0.01828923635184765,
0.031939148902893066,
0.052042875438928604,
0.07443533092737198,
-0.060166843235492706,
0.04179513081908226
] |
52,354 |
zipfile
|
_extract_member
|
Extract the ZipInfo object 'member' to a physical
file on the path targetpath.
|
def _extract_member(self, member, targetpath, pwd):
"""Extract the ZipInfo object 'member' to a physical
file on the path targetpath.
"""
if not isinstance(member, ZipInfo):
member = self.getinfo(member)
# build the destination pathname, replacing
# forward slashes to platform specific separators.
arcname = member.filename.replace('/', os.path.sep)
if os.path.altsep:
arcname = arcname.replace(os.path.altsep, os.path.sep)
# interpret absolute pathname as relative, remove drive letter or
# UNC path, redundant separators, "." and ".." components.
arcname = os.path.splitdrive(arcname)[1]
invalid_path_parts = ('', os.path.curdir, os.path.pardir)
arcname = os.path.sep.join(x for x in arcname.split(os.path.sep)
if x not in invalid_path_parts)
if os.path.sep == '\\':
# filter illegal characters on Windows
arcname = self._sanitize_windows_name(arcname, os.path.sep)
targetpath = os.path.join(targetpath, arcname)
targetpath = os.path.normpath(targetpath)
# Create all upper directories if necessary.
upperdirs = os.path.dirname(targetpath)
if upperdirs and not os.path.exists(upperdirs):
os.makedirs(upperdirs)
if member.is_dir():
if not os.path.isdir(targetpath):
os.mkdir(targetpath)
return targetpath
with self.open(member, pwd=pwd) as source, \
open(targetpath, "wb") as target:
shutil.copyfileobj(source, target)
return targetpath
|
(self, member, targetpath, pwd)
|
[
0.062222715467214584,
0.04128965362906456,
0.020014313980937004,
0.04597347229719162,
0.0029273859690874815,
-0.12408513575792313,
0.0366058349609375,
0.05901610106229782,
0.0022338207345455885,
-0.0008877860964275897,
0.02649959921836853,
0.013898327946662903,
0.010664692148566246,
0.005062126088887453,
-0.0222301185131073,
0.0588359571993351,
-0.0120788449421525,
0.06348374485969543,
-0.026265408843755722,
0.09064988791942596,
-0.0019433340057730675,
-0.0011349250562489033,
0.004505922552198172,
0.018825344741344452,
0.0016866247169673443,
0.038911715149879456,
-0.02433783747255802,
0.005399901419878006,
0.06614992022514343,
-0.026535628363490105,
-0.004999074619263411,
-0.039235979318618774,
-0.012538219802081585,
0.003127799369394779,
0.034390032291412354,
0.011475353501737118,
0.029472021386027336,
0.05184625834226608,
-0.06258300691843033,
0.0032133690547198057,
0.01840199902653694,
-0.028229009360074997,
0.010943920351564884,
0.04510876536369324,
0.036822013556957245,
0.004999074619263411,
-0.008800173178315163,
-0.07205872982740402,
-0.03150768205523491,
-0.0016168177826330066,
-0.0022743537556380033,
0.05317934602499008,
0.03811907023191452,
-0.021707693114876747,
0.01696082390844822,
-0.0022281911224126816,
0.005003578495234251,
0.026625702157616615,
-0.010466530919075012,
0.04348744451999664,
-0.025274600833654404,
-0.020410636439919472,
0.04114553704857826,
-0.03629958629608154,
-0.013159725815057755,
0.03242643177509308,
-0.04028083384037018,
-0.03467826545238495,
-0.031129373237490654,
0.032228268682956696,
0.016510456800460815,
0.01040347944945097,
-0.010142266750335693,
-0.00297917821444571,
0.040172744542360306,
0.03251650184392929,
0.016420383006334305,
-0.03240841627120972,
0.081210196018219,
-0.0495043508708477,
-0.0613580122590065,
-0.06312344968318939,
-0.0417940653860569,
0.010538590140640736,
0.05526904761791229,
0.035885248333215714,
0.05065729096531868,
-0.06557344645261765,
-0.0326065756380558,
0.034804366528987885,
-0.037326425313949585,
0.018158800899982452,
-0.00848941970616579,
0.02649959921836853,
-0.013357887975871563,
-0.04582935571670532,
-0.001429915544576943,
0.0052107470110058784,
-0.05134184658527374,
0.030030477792024612,
-0.02374335192143917,
-0.04294700548052788,
-0.02532864548265934,
0.020842988044023514,
0.016699612140655518,
0.007962490431964397,
0.009971126914024353,
-0.006890616379678249,
-0.029796285554766655,
-0.005589055363088846,
-0.07014917582273483,
-0.052458759397268295,
-0.033723488450050354,
-0.010124252177774906,
0.009331606328487396,
-0.056710224598646164,
0.028787463903427124,
0.007674254942685366,
-0.07789549231529236,
-0.04557714983820915,
0.10837633162736893,
-0.008066074922680855,
-0.036137454211711884,
-0.01199777889996767,
0.012538219802081585,
-0.0806337222456932,
0.010448516346514225,
-0.019852181896567345,
0.027976803481578827,
0.058727867901325226,
-0.05393596366047859,
0.03395767882466316,
-0.047594793140888214,
-0.02808489091694355,
-0.013511012308299541,
0.028319083154201508,
0.0023531680926680565,
-0.012466160580515862,
-0.05397199094295502,
0.03629958629608154,
0.03956024348735809,
-0.03402973711490631,
0.025382688269019127,
-0.023184897378087044,
-0.023274971172213554,
-0.004492411855608225,
-0.023545190691947937,
0.026031216606497765,
-0.02197791449725628,
-0.04536097124218941,
0.009754951111972332,
-0.054440371692180634,
-0.007291443180292845,
0.017366154119372368,
0.03775877505540848,
-0.047018323093652725,
0.004467641469091177,
0.052134495228528976,
0.01128619909286499,
-0.019672034308314323,
-0.013402924872934818,
0.022284163162112236,
-0.07594990730285645,
-0.00018338384688831866,
0.025094453245401382,
-0.02900364063680172,
0.07803960889577866,
-0.022176075726747513,
0.020284533500671387,
0.04557714983820915,
-0.003386760363355279,
0.025706952437758446,
-0.03988450765609741,
0.023887470364570618,
0.01191671285778284,
0.01127719134092331,
0.018753284588456154,
-0.002472515217959881,
0.0690682977437973,
0.022104015573859215,
-0.009178481064736843,
-0.01073675137013197,
0.02023048885166645,
0.02491430751979351,
0.026211364194750786,
0.04219038784503937,
0.02250033989548683,
-0.010628663003444672,
0.03901980444788933,
0.008223703131079674,
-0.006467271130532026,
-0.02406761609017849,
-0.033813562244176865,
0.0069086309522390366,
-0.013664137572050095,
-0.019744092598557472,
0.001240761368535459,
0.02408563159406185,
-0.03318304568529129,
-0.005823246203362942,
-0.06027713045477867,
-0.0016010550316423178,
0.009899068623781204,
0.006539329886436462,
-0.03811907023191452,
0.012736381031572819,
0.02484224922955036,
0.06175433471798897,
-0.08618224412202835,
0.04867567494511604,
0.09122635424137115,
-0.0007042615325190127,
0.042262446135282516,
0.0067239804193377495,
0.02174372225999832,
-0.042334504425525665,
-0.08546166121959686,
0.024788204580545425,
0.031471651047468185,
0.09317193925380707,
-0.051377877593040466,
0.014159541577100754,
-0.01979813724756241,
0.004485656041651964,
0.019365783780813217,
-0.028895551338791847,
0.009394657798111439,
0.03462422266602516,
-0.012186933308839798,
-0.0782557874917984,
0.004679313860833645,
-0.12768808007240295,
-0.01754630170762539,
0.032300326973199844,
-0.009538775309920311,
-0.05674625188112259,
0.010862854309380054,
-0.04856758564710617,
0.06326756626367569,
-0.030138565227389336,
0.03988450765609741,
-0.043415386229753494,
0.007944474928081036,
0.010349435731768608,
-0.014213585294783115,
-0.040929362177848816,
0.004253717139363289,
0.02123931236565113,
0.013565056957304478,
-0.025616880506277084,
0.028030848130583763,
0.06539329886436462,
-0.044099945574998856,
0.02156357653439045,
0.045505091547966,
-0.06481683254241943,
-0.006665432825684547,
-0.03676796704530716,
0.010070208460092545,
-0.010304398834705353,
-0.027400333434343338,
-0.10333222150802612,
0.08056166768074036,
-0.0678793266415596,
-0.005062126088887453,
-0.010592633858323097,
0.01087186112999916,
-0.05000876262784004,
-0.007349990773946047,
-0.015564686618745327,
0.06903226673603058,
-0.01713196374475956,
-0.010538590140640736,
0.025094453245401382,
-0.05040508508682251,
-0.017510272562503815,
-0.04946831986308098,
-0.017402183264493942,
-0.00920099951326847,
0.011745573952794075,
0.00815164390951395,
-0.003247146727517247,
-0.02624739333987236,
-0.017249058932065964,
-0.0009423931478522718,
-0.015933986753225327,
0.019834166392683983,
0.00998914148658514,
0.020086372271180153,
0.0260852612555027,
-0.00056661810958758,
0.009016348980367184,
-0.026553643867373466,
-0.05000876262784004,
-0.05995286628603935,
0.017681412398815155,
-0.04514479637145996,
-0.042082298547029495,
0.009763957932591438,
-0.05299919843673706,
-0.09360429644584656,
0.025977173820137978,
-0.02849922887980938,
0.012880498543381691,
-0.06179036572575569,
0.04532494395971298,
0.025184527039527893,
0.020680855959653854,
-0.014015424065291882,
0.018077734857797623,
0.02540070377290249,
-0.027598494663834572,
-0.027382317930459976,
0.025688938796520233,
0.027472391724586487,
0.015753841027617455,
0.003389012301340699,
0.0615021288394928,
-0.003375501371920109,
0.04521685466170311,
-0.06204256787896156,
0.05332346260547638,
-0.00691763823851943,
0.009628848172724247,
0.051702141761779785,
-0.03325510397553444,
-0.044604357331991196,
0.010916898027062416,
0.02138342894613743,
0.07209476083517075,
-0.07667049020528793,
0.03819112852215767,
0.022536369040608406,
0.07767931371927261,
0.028715405613183975,
0.06575359404087067,
-0.021095193922519684,
-0.04813523218035698,
0.05710654705762863,
0.023959528654813766,
0.025022394955158234,
0.030066506937146187,
-0.06596977263689041,
-0.00914695579558611,
0.007336479611694813,
-0.012222962453961372,
0.003731291275471449,
0.02464408613741398,
-0.011394287459552288,
-0.019672034308314323,
0.010466530919075012,
-0.012601271271705627,
-0.011799617670476437,
-0.004652292001992464,
-0.017834536731243134,
0.0032066137064248323,
-0.04867567494511604,
-0.04395582899451256,
0.032714664936065674,
0.054440371692180634,
0.007277932018041611,
0.00023419088392984122,
-0.00810210406780243,
-0.03680399805307388,
0.015753841027617455,
-0.07443667203187943,
-0.0274183489382267,
0.05274699255824089,
-0.018005676567554474,
-0.014276636764407158,
-0.012601271271705627,
-0.05393596366047859,
0.013276821933686733,
-0.05566537007689476,
-0.014177556149661541,
0.03847936540842056,
0.03575914725661278,
-0.04294700548052788,
-0.050260964781045914,
-0.007994015701115131,
0.00070032081566751,
0.07897637039422989,
-0.015834907069802284,
0.0755896121263504,
0.031453635543584824,
-0.04172200709581375,
0.015924980863928795,
0.013970387168228626,
0.02340107411146164,
0.04791905730962753,
-0.011421308852732182,
0.04921611398458481,
0.004773891065269709,
-0.0626910999417305,
0.027562465518712997,
-0.010844839736819267,
0.00935862772166729,
-0.030823122709989548,
-0.02349114790558815,
0.03956024348735809,
0.04813523218035698,
-0.0031570731662213802,
-0.03559701517224312,
0.03309297189116478,
-0.009331606328487396,
-0.025562835857272148,
0.014456783421337605,
-0.01329483650624752,
0.017267074435949326,
-0.023797396570444107,
0.024517983198165894,
-0.06946461647748947,
0.02642754092812538,
-0.04957640916109085,
-0.020212475210428238,
0.04035289213061333,
0.02842717058956623,
-0.030462829396128654,
-0.020410636439919472,
-0.042010240256786346,
0.048351410776376724,
0.021275341510772705,
-0.035218704491853714,
-0.026265408843755722,
0.0017417947528883815,
-0.05289110913872719,
-0.01613214984536171,
-0.04478450119495392,
0.012349065393209457,
0.02264445647597313,
-0.015015238896012306,
0.027382317930459976,
-0.009727928787469864,
0.03844333440065384,
0.1099616289138794,
-0.007584181614220142,
-0.002812542486935854,
0.014790055342018604,
-0.0274183489382267,
0.035578999668359756,
-0.031543709337711334,
0.0094487015157938,
-0.03269664943218231,
-0.0050531188026070595,
-0.047090381383895874,
-0.014555864036083221,
-0.0159700158983469,
-0.033723488450050354,
0.040244802832603455,
-0.005426923278719187,
0.025472762063145638,
-0.02732827514410019,
0.01929372549057007,
0.003280924167484045,
-0.018753284588456154,
-0.0444602370262146,
0.027796655893325806,
0.013447960838675499,
0.012141896411776543,
-0.024121660739183426,
-0.023473132401704788,
0.0028868529479950666,
0.0782557874917984,
-0.03244444355368614,
-0.02498636581003666,
0.014042445458471775,
0.03084113821387291,
0.03516466170549393,
-0.0035578999668359756,
-0.017366154119372368,
0.0406050980091095,
-0.029634153470396996,
-0.025977173820137978,
0.0809219554066658,
0.060637425631284714,
-0.005593559239059687,
-0.03334517776966095,
0.0222301185131073,
0.003611943917348981,
-0.03224628418684006,
-0.014348695054650307,
0.011178110726177692,
0.00004669039844884537,
-0.007462582550942898,
-0.015393546782433987,
-0.004764883778989315,
0.04791905730962753,
0.041505832225084305,
0.03952421620488167,
-0.026625702157616615,
0.04907199740409851,
0.11190721392631531,
-0.030462829396128654,
0.01814979314804077,
-0.005264791194349527,
0.014754025265574455,
-0.01040347944945097,
0.051017582416534424,
0.03601135313510895,
-0.0222301185131073,
0.020879017189145088,
-0.01040347944945097,
0.011511382646858692,
-0.06614992022514343,
-0.02691393718123436,
0.06622197479009628,
-0.06243889406323433,
-0.024157689884305,
0.0150422602891922,
0.018753284588456154,
-0.0036997655406594276,
0.0021561323665082455,
-0.02190585434436798,
0.03880362957715988,
0.035488925874233246,
0.06384404003620148,
-0.020698871463537216,
0.017924610525369644,
-0.0008224828634411097,
0.028625331819057465,
0.02776062674820423,
-0.011943735182285309,
-0.028355112299323082,
-0.044424209743738174,
-0.013511012308299541,
0.02190585434436798,
-0.02264445647597313,
0.046009499579668045,
-0.028733419254422188,
0.011871675960719585,
-0.047594793140888214,
-0.07029329240322113,
-0.03302091360092163,
-0.050621259957551956,
0.038659509271383286,
0.020194459706544876,
-0.04053303599357605,
-0.0015391295310109854,
-0.02558084949851036,
-0.027652539312839508,
0.032984886318445206,
-0.0404609777033329,
-0.06694256514310837,
-0.06769917905330658,
-0.01370917446911335,
0.008804676122963428,
-0.03568708896636963,
-0.02682386338710785,
0.02916577272117138,
0.026967981830239296,
0.0009598448523320258,
-0.025310629978775978,
-0.01304263062775135,
0.09655870497226715,
0.04557714983820915,
0.019527915865182877,
-0.054800666868686676,
-0.03750656917691231,
-0.026787834241986275,
0.027544450014829636,
-0.005071133375167847,
-0.004386575426906347,
-0.009219014085829258,
0.02640952542424202,
-0.006282620597630739,
0.016501449048519135,
-0.0038528903387486935,
0.002010889118537307,
0.010043186135590076,
-0.008336294442415237,
-0.027976803481578827,
0.05876389890909195,
-0.009872046299278736,
0.036245543509721756,
0.016177184879779816,
-0.008993830531835556,
0.04871170222759247,
-0.0034813375677913427,
0.11594250053167343,
-0.02851724438369274,
0.0035871737636625767,
-0.023761367425322533,
0.09360429644584656,
-0.026049232110381126,
-0.03819112852215767,
-0.055377136915922165,
-0.025797026231884956,
-0.027886729687452316,
0.03253451734781265,
0.012105867266654968,
-0.016321303322911263,
-0.07090579718351364,
-0.009745943360030651,
-0.004918008577078581,
0.0070212227292358875,
-0.046189647167921066,
0.025040410459041595,
-0.006007896736264229,
0.05894404277205467,
-0.004440619610249996,
0.008039052598178387,
-0.005832253955304623,
-0.013024616055190563,
0.02684187889099121,
-0.020500710234045982,
0.004436115734279156,
-0.07378814369440079,
-0.04305509477853775,
-0.0730675533413887,
0.0288234930485487,
0.004021778237074614,
-0.055305078625679016,
0.018167808651924133,
0.024265779182314873,
0.03363341465592384,
0.0680234432220459,
-0.017411191016435623,
-0.021185267716646194,
-0.027454378083348274,
0.025760997086763382,
-0.05840360373258591,
-0.04748670384287834,
-0.037398483604192734,
0.016177184879779816,
-0.016024060547351837,
-0.006102473940700293,
0.0391278937458992,
0.04737861827015877,
0.031723856925964355,
0.03276870772242546,
-0.003517366945743561,
-0.006138503551483154,
0.0678793266415596,
-0.0003814046212937683,
0.013465975411236286,
0.03125547617673874,
-0.0029994447249919176,
0.005998889449983835,
-0.038155101239681244,
0.009881054051220417,
-0.0006265732226893306,
-0.07144623249769211,
-0.004188413731753826,
-0.02817496471107006,
-0.05242272838950157,
-0.05040508508682251,
0.07796754688024521,
-0.047198470681905746,
-0.018005676567554474,
-0.0055755446664988995,
-0.00961984135210514,
0.019455857574939728,
-0.013465975411236286,
0.042910974472761154,
0.004445123020559549,
-0.06986094266176224,
-0.0030579925514757633,
0.026265408843755722,
-0.008971312083303928,
0.003026466816663742,
-0.029634153470396996,
-0.004954037722200155,
-0.00831827986985445,
-0.04013671353459358,
0.07371608167886734,
0.03696613013744354,
-0.01681670732796192,
0.006318650208413601,
-0.004841445945203304,
0.00039069345803000033,
0.0169698316603899,
0.05508890002965927,
-0.00018070978694595397,
-0.014321673661470413,
-0.012736381031572819,
-0.040821272879838943,
0.038983773440122604,
0.005417915992438793,
-0.005044111516326666,
0.06110580638051033,
0.0267518050968647,
-0.007746313698589802,
0.014348695054650307,
0.028301067650318146,
0.029472021386027336,
0.05743081122636795,
0.001215991098433733,
0.009547782130539417,
0.028138935565948486,
-0.005638595670461655,
0.009349620901048183,
0.005179221276193857,
-0.002332901582121849,
0.0032358875032514334,
-0.07501313835382462,
-0.021023135632276535,
0.0015380035620182753,
0.0030467333272099495,
0.04110950604081154,
-0.03143562376499176,
0.01178160309791565,
0.017086926847696304,
0.046441853046417236,
-0.03139959275722504,
0.019185638055205345,
-0.06042124703526497,
-0.06200654059648514,
0.021617619320750237,
0.04136171191930771,
0.014267629012465477,
0.0007982756360433996,
0.016249245032668114,
-0.003906934522092342,
-0.01258325669914484,
0.0471264123916626,
0.004467641469091177,
-0.02459004335105419,
0.03258856385946274,
-0.02122129686176777,
-0.044172003865242004,
0.05123376101255417,
-0.026355482637882233,
0.019744092598557472,
0.024175705388188362,
-0.015393546782433987,
-0.006886112503707409,
-0.03938009962439537,
-0.03302091360092163,
-0.011889691464602947,
0.07393226027488708,
-0.03858745098114014,
0.03520069271326065,
0.005498982034623623,
0.06503300368785858,
-0.01232204306870699,
0.001411900855600834,
-0.044352151453495026,
0.031633783131837845,
-0.037326425313949585,
0.024554014205932617,
-0.015861928462982178,
0.03116540238261223,
-0.013961379416286945,
0.04921611398458481,
0.02849922887980938,
0.017014868557453156,
0.03552495688199997,
-0.0015436331741511822,
-0.014510827139019966,
-0.01988821104168892,
-0.0051116663962602615,
-0.017654389142990112,
0.022536369040608406,
0.019852181896567345,
-0.015393546782433987,
-0.040424950420856476,
0.02684187889099121,
-0.035831205546855927,
0.006949163973331451,
-0.04424406215548515,
-0.04211832955479622,
-0.04514479637145996,
-0.017591338604688644,
-0.0033327164128422737,
0.05757492780685425,
0.06099771708250046,
-0.033056944608688354,
0.02298673614859581
] |
52,356 |
zipfile
|
_open_to_write
| null |
def _open_to_write(self, zinfo, force_zip64=False):
if force_zip64 and not self._allowZip64:
raise ValueError(
"force_zip64 is True, but allowZip64 was False when opening "
"the ZIP file."
)
if self._writing:
raise ValueError("Can't write to the ZIP file while there is "
"another write handle open on it. "
"Close the first handle before opening another.")
# Size and CRC are overwritten with correct data after processing the file
zinfo.compress_size = 0
zinfo.CRC = 0
zinfo.flag_bits = 0x00
if zinfo.compress_type == ZIP_LZMA:
# Compressed data includes an end-of-stream (EOS) marker
zinfo.flag_bits |= 0x02
if not self._seekable:
zinfo.flag_bits |= 0x08
if not zinfo.external_attr:
zinfo.external_attr = 0o600 << 16 # permissions: ?rw-------
# Compressed size can be larger than uncompressed size
zip64 = self._allowZip64 and \
(force_zip64 or zinfo.file_size * 1.05 > ZIP64_LIMIT)
if self._seekable:
self.fp.seek(self.start_dir)
zinfo.header_offset = self.fp.tell()
self._writecheck(zinfo)
self._didModify = True
self.fp.write(zinfo.FileHeader(zip64))
self._writing = True
return _ZipWriteFile(self, zinfo, zip64)
|
(self, zinfo, force_zip64=False)
|
[
0.03428465873003006,
0.04621564596891403,
-0.009610533714294434,
0.0589781254529953,
0.06044774129986763,
-0.06242012605071068,
-0.07143121212720871,
0.06613284349441528,
-0.0027192782144993544,
-0.04803333058953285,
0.05031510815024376,
0.005907481070607901,
-0.018679628148674965,
-0.022411687299609184,
0.0010901284404098988,
0.011621590703725815,
-0.019288746640086174,
0.030881332233548164,
-0.0010750213405117393,
0.10813300311565399,
-0.005675435997545719,
-0.008401965722441673,
-0.003420247696340084,
-0.0313454233109951,
0.007884697988629341,
0.018437914550304413,
-0.044436633586883545,
0.0577792227268219,
0.06416046619415283,
-0.005225848406553268,
-0.040607888251543045,
-0.018476588651537895,
0.04768526181578636,
0.022914450615644455,
0.03351117670536041,
-0.008034560829401016,
0.012308057397603989,
0.06184001266956329,
0.02173488959670067,
0.011582916602492332,
0.041922811418771744,
-0.04083993285894394,
0.01713266223669052,
-0.019385432824492455,
-0.03569626808166504,
0.007323922589421272,
-0.06825992465019226,
-0.0009577902383171022,
0.061569295823574066,
-0.04768526181578636,
-0.011650596745312214,
-0.004355679266154766,
0.012704468332231045,
-0.00791853852570057,
0.03625704348087311,
0.03378189727663994,
0.025022193789482117,
0.035966988652944565,
-0.006560107693076134,
-0.027768060564994812,
-0.02198627032339573,
-0.0038142409175634384,
0.000047851743147475645,
-0.07607211172580719,
-0.01925007253885269,
0.006376405246555805,
-0.049386925995349884,
-0.04714382439851761,
0.0021693797316402197,
0.08268539607524872,
0.017886808142066002,
-0.00809257198125124,
0.01254977099597454,
0.020439304411411285,
-0.014957238920032978,
0.04718250036239624,
-0.005569081753492355,
-0.05116593837738037,
0.03215758129954338,
-0.04505541920661926,
-0.008861221373081207,
-0.04463000223040581,
0.020632674917578697,
0.020555326715111732,
-0.023707272484898567,
0.03360786288976669,
0.08926000446081161,
0.040105123072862625,
-0.013042867183685303,
-0.006439250893890858,
-0.024461418390274048,
0.042618945240974426,
-0.0046409014612436295,
-0.0565803237259388,
-0.010703079402446747,
-0.04532613977789879,
-0.023127159103751183,
0.0032292939722537994,
-0.02647247537970543,
0.05600021034479141,
-0.05828198790550232,
-0.05545877292752266,
0.0011843967949971557,
-0.01111882645636797,
0.003055260283872485,
-0.0590941458940506,
0.04478469863533974,
-0.0035048476420342922,
-0.07375165820121765,
-0.05924884229898453,
-0.03039790503680706,
-0.0822986513376236,
-0.013855025172233582,
-0.0314614437520504,
-0.04018247127532959,
0.0474918931722641,
0.0138163510710001,
0.01593376137316227,
-0.019288746640086174,
-0.02450009249150753,
0.03202221915125847,
0.025544295087456703,
0.017064981162548065,
0.022605057805776596,
-0.01673625037074089,
0.02691722847521305,
-0.015595362521708012,
0.011669933795928955,
0.03407195210456848,
0.04911620914936066,
-0.0077154990285634995,
0.049580298364162445,
0.028154803439974785,
0.014077401719987392,
-0.018766645342111588,
0.024229373782873154,
-0.03004983812570572,
-0.004831855185329914,
-0.05951956287026405,
0.0012967935763299465,
0.034961458295583725,
-0.05081787332892418,
-0.03347250074148178,
-0.0276327021420002,
-0.043933868408203125,
0.001932500395923853,
-0.042773641645908356,
0.01499591302126646,
0.008020058274269104,
-0.0308039840310812,
0.06501129269599915,
-0.011631259694695473,
-0.02444208227097988,
0.05712176486849785,
0.02596971206367016,
-0.03664378449320793,
0.007241740357130766,
0.019994551315903664,
-0.025582969188690186,
0.03121006302535534,
-0.04571288079023361,
0.025892363861203194,
-0.03360786288976669,
0.011834299191832542,
-0.0004952107556164265,
-0.03064928762614727,
-0.024577440693974495,
-0.03658577427268028,
0.06593947857618332,
-0.03121006302535534,
0.036373067647218704,
0.01795448735356331,
0.00874519906938076,
-0.015324643813073635,
-0.020787371322512627,
0.015817739069461823,
-0.00015937992429826409,
-0.06419913470745087,
0.018979353830218315,
-0.00829561147838831,
0.0137873450294137,
-0.0626908466219902,
-0.041265349835157394,
0.04521011561155319,
0.04548083618283272,
0.014744531363248825,
-0.0003362840798217803,
-0.003446836257353425,
0.044746026396751404,
-0.00932531151920557,
-0.032795704901218414,
0.03503880649805069,
-0.0308039840310812,
-0.05712176486849785,
-0.005902646575123072,
-0.003620870178565383,
0.009093266911804676,
-0.015769395977258682,
0.044591329991817474,
0.04404988884925842,
-0.08392296731472015,
0.012143692001700401,
0.018118852749466896,
-0.017857803031802177,
0.0008985704043880105,
0.018138190731406212,
0.07019363343715668,
-0.0474918931722641,
-0.034710075706243515,
0.027864746749401093,
0.03318244591355324,
0.02208295650780201,
-0.04056921601295471,
0.01658155396580696,
0.01497657597064972,
-0.02036195620894432,
-0.039196282625198364,
0.012366068549454212,
-0.015053924173116684,
0.04772393777966499,
-0.055729493498802185,
0.02585368975996971,
-0.045751553028821945,
-0.008131246082484722,
0.03836478665471077,
-0.01215336099267006,
0.040801260620355606,
-0.006473090965300798,
0.000002624858780109207,
0.009716887958347797,
-0.026781870052218437,
-0.04861344397068024,
-0.01396137848496437,
0.017277689650654793,
-0.029972489923238754,
-0.10271862149238586,
-0.0015904756728559732,
-0.04022114723920822,
-0.03681781888008118,
0.015169947408139706,
-0.024828823283314705,
-0.040453191846609116,
0.02964375913143158,
0.057740550488233566,
-0.02842552214860916,
-0.05267423391342163,
0.003159197047352791,
0.012762479484081268,
0.037881359457969666,
-0.006584279239177704,
0.04006645083427429,
-0.016310835257172585,
-0.027613364160060883,
-0.00218629976734519,
0.014067732729017735,
-0.011669933795928955,
-0.0026443470269441605,
-0.08384562283754349,
-0.012250046245753765,
0.00950417947024107,
-0.02616308256983757,
0.01441580057144165,
0.049734994769096375,
-0.08624342083930969,
0.03606367111206055,
-0.013709996826946735,
0.014725194312632084,
-0.06613284349441528,
-0.01653321087360382,
0.034362006932497025,
-0.0055449106730520725,
-0.015943430364131927,
-0.026027722284197807,
0.055729493498802185,
-0.004036617465317249,
-0.006661627441644669,
0.06033172085881233,
-0.029682433232665062,
-0.0009481217130087316,
-0.019018027931451797,
0.007899201475083828,
0.037204559892416,
0.004524879157543182,
-0.0018479006830602884,
-0.034613389521837234,
0.00506631750613451,
0.02007189951837063,
0.0654367133975029,
-0.02051665261387825,
-0.019192062318325043,
-0.043779172003269196,
0.049077533185482025,
0.015334311872720718,
0.016861941665410995,
0.00467474153265357,
-0.0037973211146891117,
-0.05812729150056839,
-0.049386925995349884,
0.05464661493897438,
-0.005738281179219484,
-0.07877930253744125,
0.004812518134713173,
-0.03256366029381752,
0.041613418608903885,
0.004781095311045647,
-0.013149221427738667,
0.013390935026109219,
-0.011563579551875591,
-0.013342591933906078,
0.07042568176984787,
0.02152218110859394,
0.02026527002453804,
-0.016910284757614136,
0.009784567169845104,
-0.002924734726548195,
0.002111368579789996,
-0.0023168250918388367,
0.048574768006801605,
0.02716861106455326,
0.07553067058324814,
-0.05294495075941086,
-0.021309472620487213,
-0.021251462399959564,
-0.05112726613879204,
0.020439304411411285,
0.020091235637664795,
-0.001603769836947322,
0.035212840884923935,
0.04339243099093437,
0.010093960911035538,
-0.0741770789027214,
0.05928751826286316,
0.02136748470366001,
-0.009426831267774105,
0.015421329066157341,
0.040917281061410904,
0.01795448735356331,
-0.019598141312599182,
0.05398915335536003,
-0.03892556205391884,
-0.04169076681137085,
0.03360786288976669,
0.023784620687365532,
-0.03523217886686325,
-0.07336492091417313,
-0.015527683310210705,
0.014705857262015343,
-0.026491813361644745,
-0.023127159103751183,
0.0338592454791069,
-0.03592831268906593,
-0.009194786660373211,
0.028212813660502434,
-0.020091235637664795,
-0.028038781136274338,
-0.02430672198534012,
-0.0018684463575482368,
0.0011795625323429704,
0.036875829100608826,
0.028812263160943985,
-0.05928751826286316,
0.013555300422012806,
-0.010877112857997417,
0.01713266223669052,
0.005781789775937796,
-0.05719911307096481,
-0.02101941592991352,
0.038442134857177734,
-0.03180951252579689,
-0.043431103229522705,
-0.009591196663677692,
-0.056386955082416534,
-0.008179589174687862,
-0.034710075706243515,
0.031074702739715576,
0.036875829100608826,
-0.026859218254685402,
0.010993135161697865,
0.013033198192715645,
-0.03714654967188835,
0.027613364160060883,
-0.03625704348087311,
0.025176890194416046,
0.03124873712658882,
0.012791484594345093,
-0.048922836780548096,
-0.035870302468538284,
0.031326085329055786,
0.023765282705426216,
0.038287438452243805,
-0.021696215495467186,
0.05313832312822342,
-0.007923372089862823,
-0.00997793860733509,
0.06381239742040634,
0.05043112859129906,
0.021290136501193047,
0.019124381244182587,
-0.04157474264502525,
0.06597814708948135,
-0.02233433909714222,
-0.032292939722537994,
0.03617969527840614,
0.02767137624323368,
0.02484816126525402,
-0.025022193789482117,
0.04087860882282257,
-0.021154776215553284,
0.0461769700050354,
-0.018234875053167343,
-0.043121710419654846,
-0.0030020831618458033,
0.020845383405685425,
0.02521556429564953,
0.014512485824525356,
0.03886755183339119,
0.05429854989051819,
-0.025080205872654915,
0.02001388743519783,
-0.014947570860385895,
0.06481792777776718,
0.028038781136274338,
0.017712773755192757,
0.020284608006477356,
-0.014580165967345238,
-0.061027854681015015,
-0.00012402930587995797,
-0.007763841655105352,
-0.07506658136844635,
0.022663069888949394,
0.05762452632188797,
0.015392323955893517,
-0.019897865131497383,
0.06253615021705627,
0.04068523645401001,
0.0474918931722641,
0.005013140384107828,
-0.016465531662106514,
-0.03285371512174606,
0.04551950842142105,
0.0923539400100708,
0.016069121658802032,
-0.04683443158864975,
-0.012607782147824764,
-0.05344771593809128,
-0.031016692519187927,
0.0921218991279602,
-0.01779012195765972,
0.0295470729470253,
0.011737613938748837,
0.050083063542842865,
-0.005820463877171278,
0.0003178534097969532,
-0.009658876806497574,
-0.10511641949415207,
-0.003159197047352791,
-0.004979300778359175,
-0.04934825375676155,
-0.023881305009126663,
0.0027772895991802216,
0.05286760255694389,
-0.04582890123128891,
0.016977963969111443,
0.016968296840786934,
-0.028038781136274338,
-0.04285098984837532,
-0.08353623002767563,
0.01723901554942131,
-0.012907507829368114,
-0.010142304003238678,
0.03757196664810181,
-0.027458667755126953,
-0.025389598682522774,
0.03641173988580704,
0.018921341747045517,
0.002989997621625662,
-0.01050970796495676,
0.015595362521708012,
0.002574250102043152,
0.0027168611995875835,
-0.02854154445230961,
0.0034710075706243515,
-0.030668623745441437,
-0.008962741121649742,
0.0024449334014207125,
-0.05940353870391846,
0.020342618227005005,
-0.014928232878446579,
0.02848353236913681,
0.02374594658613205,
0.030320556834340096,
0.03358852490782738,
-0.003118105698376894,
0.005868806969374418,
0.013951710425317287,
0.07274613529443741,
-0.04053054004907608,
-0.05480131134390831,
-0.031693488359451294,
-0.06249747425317764,
-0.01874730922281742,
-0.05611623451113701,
-0.011669933795928955,
-0.024770811200141907,
0.0060525089502334595,
0.0004477744805626571,
-0.09854181110858917,
-0.06942015141248703,
0.004909203853458166,
-0.02995315194129944,
-0.01502491906285286,
-0.0018297721398994327,
-0.01157324854284525,
0.01257877703756094,
0.013922704383730888,
0.036373067647218704,
0.011640927754342556,
0.007386768236756325,
-0.04350845143198967,
-0.021444832906126976,
-0.012066343799233437,
-0.01966582052409649,
0.001699246815405786,
-0.08106108009815216,
-0.0002726831880863756,
-0.02061333693563938,
0.051088590174913406,
0.01869896613061428,
0.06064111366868019,
-0.028406184166669846,
-0.026743195950984955,
-0.06296156346797943,
-0.006913009565323591,
-0.034400682896375656,
0.054066501557826996,
-0.035522233694791794,
0.023533238098025322,
0.0030528430361300707,
-0.04153607040643692,
-0.05333169549703598,
0.02368793450295925,
0.0154019920155406,
-0.033201783895492554,
-0.08655281364917755,
-0.019095376133918762,
0.007841190323233604,
-0.0009499345324002206,
-0.028251487761735916,
0.024770811200141907,
-0.020845383405685425,
-0.019433775916695595,
-0.01995587721467018,
0.05677369609475136,
0.025582969188690186,
-0.0025162387173622847,
0.037223897874355316,
0.008411633782088757,
-0.022817766293883324,
0.019114714115858078,
0.02575700357556343,
0.014473811723291874,
0.06853064894676208,
-0.02772938646376133,
-0.014203092083334923,
0.02324318140745163,
-0.011843967251479626,
0.05309964716434479,
0.008870890364050865,
-0.0018599863396957517,
0.034903448075056076,
0.030320556834340096,
0.04996703937649727,
0.006806655786931515,
-0.021348146721720695,
0.09219924360513687,
-0.05681236833333969,
0.02641446515917778,
0.0436631478369236,
0.03898357227444649,
-0.01587575115263462,
-0.001974800368770957,
-0.007140220608562231,
-0.0062507144175469875,
-0.038229428231716156,
0.02813546545803547,
-0.053718436509370804,
-0.01744205504655838,
0.02243102341890335,
0.03262167051434517,
-0.003823909442871809,
-0.0300885122269392,
-0.0036716298200190067,
0.0021947596687823534,
-0.11463026702404022,
-0.008450307883322239,
-0.008556662127375603,
-0.007802515756338835,
-0.030262544751167297,
0.00650209654122591,
0.016310835257172585,
-0.016552548855543137,
-0.02339787781238556,
-0.082066610455513,
0.007478619460016489,
0.007116049062460661,
0.028464196249842644,
-0.034710075706243515,
-0.0011372625594958663,
-0.08345887809991837,
0.021599529311060905,
0.014676851220428944,
0.014000052586197853,
0.024538766592741013,
-0.0352901890873909,
-0.03654709830880165,
0.0398344062268734,
-0.04230955243110657,
-0.017828796058893204,
-0.04056921601295471,
0.04490072280168533,
-0.03488411009311676,
-0.05375710874795914,
-0.009629870764911175,
-0.0031809513457119465,
-0.025892363861203194,
0.0205746628344059,
0.049270905554294586,
0.05085654556751251,
0.036721132695674896,
0.02641446515917778,
0.0015433414373546839,
0.056232258677482605,
0.058204639703035355,
0.0013257992686703801,
0.015324643813073635,
0.015595362521708012,
-0.04157474264502525,
0.009591196663677692,
0.02098074182868004,
0.03240896388888359,
0.04254159703850746,
-0.023629924282431602,
0.016117464751005173,
-0.02676253207027912,
-0.035966988652944565,
-0.06214940547943115,
0.13922704756259918,
-0.0076864929869771,
-0.03256366029381752,
-0.016968296840786934,
-0.07174060493707657,
0.01820586994290352,
-0.036276381462812424,
-0.0002740428317338228,
0.05282893031835556,
-0.06709970533847809,
0.04872946813702583,
-0.0020171001087874174,
0.0009082389296963811,
-0.00001952592901943717,
0.021251462399959564,
-0.04687310755252838,
-0.00806840043514967,
-0.04053054004907608,
0.02521556429564953,
0.03790069743990898,
-0.00934948306530714,
0.018882667645812035,
0.03318244591355324,
-0.06025437265634537,
0.053215671330690384,
0.019424106925725937,
0.0003007823834195733,
-0.015295637771487236,
0.0474918931722641,
-0.025582969188690186,
0.010064954869449139,
0.041420046240091324,
0.07050302624702454,
0.06489527225494385,
0.0025839186273515224,
-0.00894823856651783,
0.00035562115954235196,
0.0333758182823658,
0.051900748163461685,
0.039350979030132294,
-0.001736712409183383,
0.018321892246603966,
-0.04288966581225395,
0.02036195620894432,
0.047066476196050644,
0.014908895827829838,
-0.02738131955265999,
-0.01758708246052265,
-0.04521011561155319,
-0.055072031915187836,
-0.02026527002453804,
0.05882342904806137,
0.02767137624323368,
-0.059364866465330124,
-0.030223870649933815,
0.012946181930601597,
0.11145898699760437,
-0.013864693231880665,
0.03250564634799957,
-0.026859218254685402,
-0.05859138071537018,
0.032795704901218414,
0.03310509771108627,
-0.032641008496284485,
0.0006447710911743343,
0.03237028792500496,
-0.011621590703725815,
0.011041478253901005,
-0.05077919736504555,
0.009997275657951832,
-0.0004429402179084718,
0.016562217846512794,
0.026743195950984955,
-0.01799316145479679,
-0.014096738770604134,
0.021599529311060905,
-0.010403354652225971,
-0.02243102341890335,
-0.025950374081730843,
-0.036779146641492844,
-0.08500584959983826,
-0.027806734666228294,
-0.008551827631890774,
0.0067099700681865215,
0.011089821346104145,
-0.016349509358406067,
-0.0050034718587994576,
0.05812729150056839,
-0.01577906496822834,
0.06226542964577675,
-0.012888170778751373,
0.03262167051434517,
-0.0007849649991840124,
0.05712176486849785,
0.027187949046492577,
0.025138216093182564,
-0.013777676038444042,
0.027652038261294365,
0.05499468371272087,
0.021251462399959564,
0.011205843649804592,
0.0423482283949852,
-0.046950455754995346,
0.015237626619637012,
0.03817141428589821,
-0.021947596222162247,
0.037687987089157104,
0.013497288338840008,
0.041922811418771744,
0.06798920780420303,
-0.02741999365389347,
-0.01192131545394659,
0.01840890944004059,
0.011205843649804592,
0.008982078172266483,
-0.02772938646376133,
-0.040298495441675186,
0.030610613524913788,
0.02792275696992874,
0.04505541920661926,
-0.07433177530765533,
0.030533265322446823
] |
52,357 |
zipfile
|
_write_end_record
| null |
def _write_end_record(self):
for zinfo in self.filelist: # write central directory
dt = zinfo.date_time
dosdate = (dt[0] - 1980) << 9 | dt[1] << 5 | dt[2]
dostime = dt[3] << 11 | dt[4] << 5 | (dt[5] // 2)
extra = []
if zinfo.file_size > ZIP64_LIMIT \
or zinfo.compress_size > ZIP64_LIMIT:
extra.append(zinfo.file_size)
extra.append(zinfo.compress_size)
file_size = 0xffffffff
compress_size = 0xffffffff
else:
file_size = zinfo.file_size
compress_size = zinfo.compress_size
if zinfo.header_offset > ZIP64_LIMIT:
extra.append(zinfo.header_offset)
header_offset = 0xffffffff
else:
header_offset = zinfo.header_offset
extra_data = zinfo.extra
min_version = 0
if extra:
# Append a ZIP64 field to the extra's
extra_data = _strip_extra(extra_data, (1,))
extra_data = struct.pack(
'<HH' + 'Q'*len(extra),
1, 8*len(extra), *extra) + extra_data
min_version = ZIP64_VERSION
if zinfo.compress_type == ZIP_BZIP2:
min_version = max(BZIP2_VERSION, min_version)
elif zinfo.compress_type == ZIP_LZMA:
min_version = max(LZMA_VERSION, min_version)
extract_version = max(min_version, zinfo.extract_version)
create_version = max(min_version, zinfo.create_version)
filename, flag_bits = zinfo._encodeFilenameFlags()
centdir = struct.pack(structCentralDir,
stringCentralDir, create_version,
zinfo.create_system, extract_version, zinfo.reserved,
flag_bits, zinfo.compress_type, dostime, dosdate,
zinfo.CRC, compress_size, file_size,
len(filename), len(extra_data), len(zinfo.comment),
0, zinfo.internal_attr, zinfo.external_attr,
header_offset)
self.fp.write(centdir)
self.fp.write(filename)
self.fp.write(extra_data)
self.fp.write(zinfo.comment)
pos2 = self.fp.tell()
# Write end-of-zip-archive record
centDirCount = len(self.filelist)
centDirSize = pos2 - self.start_dir
centDirOffset = self.start_dir
requires_zip64 = None
if centDirCount > ZIP_FILECOUNT_LIMIT:
requires_zip64 = "Files count"
elif centDirOffset > ZIP64_LIMIT:
requires_zip64 = "Central directory offset"
elif centDirSize > ZIP64_LIMIT:
requires_zip64 = "Central directory size"
if requires_zip64:
# Need to write the ZIP64 end-of-archive records
if not self._allowZip64:
raise LargeZipFile(requires_zip64 +
" would require ZIP64 extensions")
zip64endrec = struct.pack(
structEndArchive64, stringEndArchive64,
44, 45, 45, 0, 0, centDirCount, centDirCount,
centDirSize, centDirOffset)
self.fp.write(zip64endrec)
zip64locrec = struct.pack(
structEndArchive64Locator,
stringEndArchive64Locator, 0, pos2, 1)
self.fp.write(zip64locrec)
centDirCount = min(centDirCount, 0xFFFF)
centDirSize = min(centDirSize, 0xFFFFFFFF)
centDirOffset = min(centDirOffset, 0xFFFFFFFF)
endrec = struct.pack(structEndArchive, stringEndArchive,
0, 0, centDirCount, centDirCount,
centDirSize, centDirOffset, len(self._comment))
self.fp.write(endrec)
self.fp.write(self._comment)
if self.mode == "a":
self.fp.truncate()
self.fp.flush()
|
(self)
|
[
0.02530946582555771,
0.07681334763765335,
-0.05754118040204048,
0.07177898287773132,
0.03647945448756218,
-0.04998963698744774,
-0.07236894965171814,
0.05101224035024643,
-0.08330295234918594,
-0.022162990644574165,
-0.006410944741219282,
0.007522044237703085,
0.013107039034366608,
0.007158232852816582,
0.046803832054138184,
0.027983970940113068,
-0.027924973517656326,
0.01796441152691841,
-0.008677390404045582,
0.04102218151092529,
-0.015683216974139214,
-0.02397221326828003,
-0.005742318462580442,
0.021042058244347572,
0.03288067504763603,
0.02534879744052887,
-0.013067708350718021,
0.04153348132967949,
0.02428686060011387,
0.026096085086464882,
-0.018495379015803337,
-0.03539785370230675,
-0.0018645328236743808,
-0.01899684965610504,
0.011622295714914799,
0.0035373272839933634,
0.01451312005519867,
0.025250470265746117,
-0.002593384589999914,
0.06127762049436569,
0.04766911268234253,
0.000873884535394609,
0.014926095493137836,
-0.004997489042580128,
-0.0008757282048463821,
0.04184813052415848,
-0.01965564303100109,
-0.030599478632211685,
0.04239876568317413,
0.005801314953714609,
-0.0007939935312606394,
0.01960647851228714,
0.0007134880288504064,
-0.035319194197654724,
0.03203506022691727,
0.011396142654120922,
0.016676323488354683,
0.04452263563871384,
-0.02969486638903618,
-0.03370662406086922,
-0.017866084352135658,
-0.027865977957844734,
0.03742339834570885,
-0.00830866303294897,
-0.0540800541639328,
0.033647626638412476,
-0.05655790492892265,
-0.05411938577890396,
-0.009149362333118916,
0.044404640793800354,
0.039035968482494354,
-0.02033410035073757,
0.020393097773194313,
0.01437546219676733,
-0.027295678853988647,
0.011268316768109798,
-0.04424731805920601,
-0.0053932564333081245,
0.01588970422744751,
-0.08865196257829666,
-0.03217271715402603,
-0.049203019589185715,
0.015624219551682472,
0.04936034232378006,
0.048534393310546875,
0.0519561842083931,
0.06898648291826248,
0.029478546231985092,
-0.02232031337916851,
-0.0032865924295037985,
-0.019478652626276016,
0.03470956161618233,
0.028298618271946907,
-0.03075680322945118,
0.0060028862208127975,
-0.06418810784816742,
-0.038760650902986526,
-0.007620371412485838,
-0.029557209461927414,
0.04664650559425354,
-0.03350996971130371,
-0.0762627124786377,
0.017000803723931313,
-0.04633186012506485,
-0.05175952985882759,
-0.031287770718336105,
-0.009105115197598934,
-0.011376476846635342,
-0.06332282721996307,
-0.031641747802495956,
-0.019095176830887794,
-0.07366687059402466,
-0.010344039648771286,
-0.06344082206487656,
-0.024404853582382202,
-0.001509325229562819,
0.0325070284307003,
0.027629991993308067,
-0.009375515393912792,
-0.048180412501096725,
0.10304708778858185,
-0.01722695678472519,
-0.049871645867824554,
0.02363790012896061,
-0.005501416511833668,
-0.06336215883493423,
0.019734304398298264,
0.03115011192858219,
0.01830855756998062,
0.021061724051833153,
-0.026646718382835388,
0.08196569979190826,
0.00346849812194705,
-0.008805216290056705,
-0.005088441539555788,
-0.01484743319451809,
-0.0009033827809616923,
-0.01147480495274067,
-0.09533822536468506,
-0.004299364518374205,
0.02802330255508423,
-0.02670571580529213,
0.037089087069034576,
0.019340993836522102,
-0.04837706685066223,
0.015496394596993923,
-0.022870946675539017,
-0.024267196655273438,
-0.009935981594026089,
-0.006130711641162634,
0.02536846324801445,
-0.01727611944079399,
-0.04031422361731529,
0.0010017100721597672,
0.029321223497390747,
-0.07166098803281784,
-0.016833646222949028,
0.018859190866351128,
-0.024896491318941116,
-0.011700958013534546,
-0.03488655388355255,
0.011356811970472336,
-0.02271362394094467,
-0.008003848604857922,
-0.03791503608226776,
-0.0005294314469210804,
-0.059547059237957,
0.01753177121281624,
0.020068617537617683,
0.01925249956548214,
0.055220652371644974,
0.04762978106737137,
0.013107039034366608,
-0.0030850213952362537,
-0.08023513853549957,
0.03323465213179588,
-0.001121546607464552,
-0.02776765078306198,
-0.0004759659350384027,
0.00021585931244771928,
-0.0024594133719801903,
-0.025093145668506622,
-0.026096085086464882,
0.055967941880226135,
0.05647924542427063,
-0.019517984241247177,
-0.035004545003175735,
-0.0297735296189785,
0.06222156435251236,
-0.02469983696937561,
-0.06265420466661453,
0.00028730029589496553,
-0.04094351828098297,
-0.041730139404535294,
-0.01761043258011341,
0.03280201181769371,
0.06485673785209656,
-0.006081548053771257,
0.040707532316446304,
-0.007197564002126455,
-0.09352900087833405,
0.027256349101662636,
0.022536633536219597,
-0.1215326339006424,
0.011464972048997879,
0.019409824162721634,
0.019783467054367065,
-0.008269332349300385,
-0.1138237714767456,
0.0452699214220047,
0.08353893458843231,
0.005113023333251476,
-0.026607386767864227,
-0.01787591725587845,
0.018367553129792213,
-0.06513205170631409,
-0.042123448103666306,
0.012959548272192478,
0.02839694544672966,
0.020786406472325325,
-0.08353893458843231,
0.013323359191417694,
-0.07177898287773132,
-0.02534879744052887,
-0.007738364394754171,
0.0045968047343194485,
0.06587933748960495,
0.04125816747546196,
0.005619409494102001,
-0.02058975212275982,
-0.03612547740340233,
-0.048495061695575714,
-0.013824828900396824,
0.011976274661719799,
-0.0009279645746573806,
-0.05537797883152962,
-0.011258484795689583,
-0.004626302979886532,
0.004348528105765581,
-0.015486561693251133,
-0.0013483141083270311,
-0.029340889304876328,
-0.0002819230139721185,
-0.01419847272336483,
-0.005353925749659538,
-0.0796058401465416,
0.030245499685406685,
0.02466050535440445,
0.0044763535261154175,
0.022221986204385757,
0.03390327841043472,
-0.015634052455425262,
-0.01370683591812849,
-0.028239622712135315,
0.05746251717209816,
-0.03317565470933914,
0.0003819403937086463,
-0.06741324812173843,
0.036971092224121094,
-0.01863303780555725,
0.010176883079111576,
-0.028554270043969154,
0.014129643328487873,
-0.08117908239364624,
-0.0027924973983317614,
0.07740330696105957,
0.06143494322896004,
-0.09927131980657578,
-0.0330183319747448,
0.045466579496860504,
0.08464020490646362,
-0.024208199232816696,
-0.07122834771871567,
0.022221986204385757,
-0.05132688954472542,
0.01098316814750433,
0.06115962564945221,
-0.08519084006547928,
-0.03415893018245697,
0.001669107237830758,
0.022457972168922424,
0.045073267072439194,
0.031622081995010376,
-0.02232031337916851,
0.017718592658638954,
0.019999787211418152,
-0.028298618271946907,
0.009247689507901669,
-0.023755893111228943,
-0.02226131781935692,
-0.0020378348417580128,
0.03982258588075638,
0.025191472843289375,
-0.022870946675539017,
-0.012625235132873058,
-0.00965574849396944,
-0.0012807140592485666,
-0.05309678241610527,
0.029203230515122414,
-0.03292000666260719,
-0.10831743478775024,
0.02202533185482025,
0.11177855730056763,
0.0168631449341774,
-0.07437482476234436,
-0.015634052455425262,
0.008190670050680637,
0.012684231624007225,
0.006455192342400551,
-0.006194624584168196,
0.02471950277686119,
0.006553519517183304,
0.01535873580724001,
0.009699995629489422,
0.01418863981962204,
0.029832525178790092,
0.0073155565187335014,
0.05077625438570976,
0.006882916204631329,
0.057265862822532654,
-0.02676471136510372,
0.0052900128066539764,
0.010550526902079582,
0.0012930049560964108,
0.0466858372092247,
-0.03518153354525566,
-0.009208358824253082,
0.03819035366177559,
-0.00363565469160676,
0.00001009199877444189,
-0.02159269154071808,
-0.0014109978219494224,
-0.020078450441360474,
0.05950772762298584,
0.03813135623931885,
0.04428664967417717,
-0.005924224387854338,
-0.05128755792975426,
0.023224925622344017,
-0.0063568647019565105,
-0.0023426497355103493,
0.01592903397977352,
-0.015988031402230263,
0.01624368317425251,
-0.04664650559425354,
-0.03588949143886566,
0.05518132075667381,
-0.023500243201851845,
-0.0338246151804924,
0.03811169043183327,
0.005260514561086893,
0.010265378281474113,
-0.02131737396121025,
0.03350996971130371,
0.00876588560640812,
-0.025781437754631042,
-0.0325070284307003,
-0.05942906439304352,
0.01484743319451809,
0.05978304520249367,
-0.04094351828098297,
0.021356705576181412,
0.00742863304913044,
0.01484743319451809,
-0.008534816093742847,
-0.058367129415273666,
0.01862320490181446,
0.012880885973572731,
0.01754160411655903,
-0.0317007452249527,
-0.0050392779521644115,
-0.0379740335047245,
0.03288067504763603,
-0.06064832583069801,
-0.017492439597845078,
0.03984225168824196,
0.024581843987107277,
-0.0013962486991658807,
-0.03270368650555611,
-0.028278952464461327,
-0.04495527595281601,
-0.003630738239735365,
0.00516218738630414,
0.026194412261247635,
0.003854433074593544,
-0.01860353909432888,
0.03274301439523697,
0.004712339490652084,
-0.03354930132627487,
0.045151930302381516,
0.010747182182967663,
0.05474868044257164,
-0.01787591725587845,
-0.044089995324611664,
0.026096085086464882,
0.02294960990548134,
0.013569178059697151,
0.020766740664839745,
-0.05030428618192673,
0.025073479861021042,
0.01455245167016983,
-0.0379740335047245,
0.03004884533584118,
0.06973377615213394,
0.024227865040302277,
-0.07748197019100189,
0.03174007683992386,
-0.057305194437503815,
0.03352963551878929,
0.012467911466956139,
0.01989162713289261,
-0.0330183319747448,
0.01997029036283493,
0.020196443423628807,
-0.008874045684933662,
0.023401916027069092,
-0.021730350330471992,
-0.044404640793800354,
0.06332282721996307,
-0.018692033365368843,
0.050225622951984406,
0.03673510625958443,
0.03506354242563248,
0.03976358845829964,
-0.0026474646292626858,
-0.043421369045972824,
0.003210388822481036,
0.020078450441360474,
-0.05982237309217453,
-0.0012671940494328737,
0.06454208493232727,
0.028514938428997993,
-0.04892770200967789,
0.05148421227931976,
0.037010423839092255,
0.030933791771531105,
0.012831722386181355,
-0.03724640980362892,
0.009267355315387249,
0.0452699214220047,
0.02768898941576481,
0.005781649611890316,
-0.025899430736899376,
-0.04570256546139717,
0.019852297380566597,
0.007541709579527378,
0.047511786222457886,
-0.03583049401640892,
0.022516969591379166,
0.05470935255289078,
-0.0011393683962523937,
-0.04298872873187065,
-0.034355584532022476,
-0.00548666762188077,
-0.03356896713376045,
0.00022599931980948895,
0.06367680430412292,
-0.021120719611644745,
-0.03380495309829712,
-0.06222156435251236,
0.026509059593081474,
0.000978971947915852,
0.06721659004688263,
0.0029522795230150223,
0.0021521404851228,
-0.012910384684801102,
-0.055967941880226135,
-0.005285096354782581,
-0.05376540869474411,
-0.033647626638412476,
0.0018473255913704634,
-0.023834556341171265,
-0.05282146483659744,
0.05069759488105774,
0.006897665094584227,
0.018475713208317757,
0.0023365041706711054,
0.01583070680499077,
-0.00982290506362915,
-0.02564377896487713,
-0.02466050535440445,
-0.008603645488619804,
-0.03752172738313675,
-0.016754984855651855,
0.017344949766993523,
-0.021553359925746918,
0.029242560267448425,
-0.011484636925160885,
0.001024448312819004,
-0.027138356119394302,
0.011386309750378132,
0.008377492427825928,
-0.008982205763459206,
0.03547651693224907,
0.029340889304876328,
0.03518153354525566,
-0.008692139759659767,
-0.016666490584611893,
-0.0059979697689414024,
-0.049203019589185715,
0.02912456914782524,
-0.04365735501050949,
-0.03809202462434769,
-0.032625023275613785,
-0.015988031402230263,
0.039743926376104355,
-0.03307732939720154,
-0.046449851244688034,
-0.025132477283477783,
-0.029852190986275673,
-0.005353925749659538,
0.01437546219676733,
-0.0521528385579586,
0.017403945326805115,
-0.0486130528151989,
0.06961578130722046,
0.0007405280484817922,
0.005752151366323233,
-0.01692214049398899,
0.0257224403321743,
-0.036715440452098846,
0.02159269154071808,
-0.009119863621890545,
-0.010668519884347916,
-0.050933580845594406,
0.03470956161618233,
0.011946775950491428,
0.0104816984385252,
0.022084327414631844,
-0.004881954286247492,
-0.056282587349414825,
0.01079634577035904,
0.02064874954521656,
-0.04877037927508354,
0.048849038779735565,
0.0068779997527599335,
0.0003840913122985512,
-0.015250575728714466,
0.006553519517183304,
-0.05376540869474411,
0.025958426296710968,
-0.00981307215988636,
-0.001265964936465025,
-0.1007658913731575,
-0.025801103562116623,
0.031602419912815094,
0.008480736054480076,
-0.03520119935274124,
0.07586940377950668,
0.0331166610121727,
-0.0013839578023180366,
-0.0009328809683211148,
0.0678458884358406,
0.03616480901837349,
0.013805163092911243,
0.028927912935614586,
0.023146264255046844,
-0.02633207105100155,
0.014296799898147583,
0.039724260568618774,
0.02969486638903618,
0.05565329268574715,
-0.020491424947977066,
-0.011386309750378132,
0.0015388233587145805,
0.0345325730741024,
0.05537797883152962,
-0.015742212533950806,
0.026292739436030388,
0.042831405997276306,
-0.050854917615652084,
0.07103169709444046,
0.0010643937857821584,
-0.05467002093791962,
0.06654796749353409,
-0.06646930426359177,
-0.0567152313888073,
0.009857319295406342,
0.06611532717943192,
-0.0683571919798851,
0.038662321865558624,
0.0003718003863468766,
0.04149415343999863,
-0.06528937816619873,
0.034945547580718994,
-0.01859370619058609,
-0.017364613711833954,
0.027669323608279228,
0.012359751388430595,
0.03470956161618233,
-0.022851282730698586,
0.0013446268858388066,
0.00879046693444252,
-0.054276712238788605,
-0.011877946555614471,
-0.0035053708124905825,
0.0015904452884569764,
-0.038367342203855515,
-0.029911186546087265,
0.02501448430120945,
-0.0021423075813800097,
-0.009650832042098045,
-0.0722116231918335,
-0.007109069265425205,
0.0002252311387564987,
0.011415808461606503,
-0.020127613097429276,
0.019154172390699387,
-0.07409951090812683,
0.01687297783792019,
0.013755999505519867,
0.04397200047969818,
0.03828867897391319,
-0.045191261917352676,
-0.002750708255916834,
-0.021789345890283585,
-0.005717736668884754,
0.026450064033269882,
0.012271256186068058,
0.024739166721701622,
-0.033686958253383636,
-0.023224925622344017,
-0.006774756126105785,
0.011228986084461212,
-0.05447336658835411,
0.021120719611644745,
0.028219956904649734,
0.04094351828098297,
0.05856378376483917,
0.025761771947145462,
-0.006715759634971619,
0.03221204876899719,
0.006553519517183304,
0.015575055964291096,
0.0307371374219656,
0.006307701114565134,
-0.038347676396369934,
-0.023814890533685684,
0.03740373253822327,
0.008303746581077576,
0.07390285283327103,
-0.03282167762517929,
0.015466895885765553,
-0.04055020958185196,
-0.033273983746767044,
-0.027629991993308067,
0.0884159728884697,
-0.050225622951984406,
-0.05565329268574715,
-0.015673384070396423,
-0.02202533185482025,
0.009867152199149132,
-0.05113023519515991,
-0.012399082072079182,
-0.0015326779102906585,
-0.03290034085512161,
0.006671512499451637,
0.0290655717253685,
0.007246727589517832,
-0.007153316400945187,
0.014326298609375954,
-0.048180412501096725,
-0.014985091984272003,
-0.0452699214220047,
0.004139582626521587,
-0.0009881900623440742,
-0.012084434740245342,
0.028219956904649734,
0.05042227730154991,
-0.05738385394215584,
0.034965213388204575,
-0.005427671130746603,
0.02328392304480076,
0.011877946555614471,
0.029340889304876328,
-0.04161214455962181,
-0.004577139392495155,
0.07315556704998016,
0.0643061026930809,
0.005172019824385643,
0.02298893965780735,
0.0017809545388445258,
0.02566344477236271,
0.0021791805047541857,
0.04554523900151253,
0.03677443787455559,
-0.011160156689584255,
0.011415808461606503,
0.0012868595076724887,
0.003758563892915845,
0.02808229811489582,
0.0024114788975566626,
-0.009896649979054928,
-0.026115750893950462,
-0.036381129175424576,
-0.02230064943432808,
0.01889852061867714,
0.051877520978450775,
0.011248651891946793,
-0.03457190468907356,
-0.01486709900200367,
0.0209633968770504,
0.06969444453716278,
0.0053047616966068745,
0.02605675347149372,
-0.006302784662693739,
-0.04031422361731529,
0.03378528729081154,
0.0050392779521644115,
0.01756126992404461,
0.028239622712135315,
0.08283098042011261,
-0.047197140753269196,
-0.0052949292585253716,
-0.04562390223145485,
0.0033505053725093603,
0.05148421227931976,
0.021848343312740326,
0.040707532316446304,
-0.031995728611946106,
-0.0014749106485396624,
0.049203019589185715,
-0.01617485284805298,
0.015112917870283127,
-0.02233997918665409,
-0.03172041103243828,
-0.048219744116067886,
0.026587722823023796,
-0.040786195546388626,
0.03911462798714638,
-0.00895762350410223,
0.00949842482805252,
0.029203230515122414,
0.03046181984245777,
-0.003706942079588771,
0.025152143090963364,
-0.02436552383005619,
0.02094373106956482,
-0.0019886712543666363,
0.033686958253383636,
0.009001871570944786,
0.009508256800472736,
-0.041376158595085144,
0.07256560027599335,
0.010550526902079582,
0.04928167909383774,
0.04055020958185196,
0.026489393785595894,
-0.038033027201890945,
-0.005014696158468723,
0.022182656452059746,
-0.018475713208317757,
-0.04133682698011398,
0.01693197339773178,
-0.03341164067387581,
0.03526019677519798,
0.022811951115727425,
-0.007861273363232613,
0.023224925622344017,
0.016460003331303596,
0.04066820070147514,
-0.09502357244491577,
-0.038426339626312256,
0.05101224035024643,
0.053883399814367294,
0.05938973277807236,
-0.07673468440771103,
0.03439491614699364
] |
52,360 |
zipfile
|
extract
|
Extract a member from the archive to the current working directory,
using its full name. Its file information is extracted as accurately
as possible. `member' may be a filename or a ZipInfo object. You can
specify a different directory using `path'.
|
def extract(self, member, path=None, pwd=None):
"""Extract a member from the archive to the current working directory,
using its full name. Its file information is extracted as accurately
as possible. `member' may be a filename or a ZipInfo object. You can
specify a different directory using `path'.
"""
if path is None:
path = os.getcwd()
else:
path = os.fspath(path)
return self._extract_member(member, path, pwd)
|
(self, member, path=None, pwd=None)
|
[
0.09945331513881683,
0.04514789953827858,
0.0254020057618618,
0.04949098452925682,
0.020149901509284973,
-0.10268537700176239,
0.06393427401781082,
0.04999599605798721,
0.015806814655661583,
0.012195993214845657,
0.017641684040427208,
0.031664129346609116,
-0.020671745762228966,
0.035990383476018906,
-0.019392386078834534,
0.03841442987322807,
-0.015411223284900188,
0.058715835213661194,
-0.05592144653201103,
0.08578437566757202,
0.007049098610877991,
-0.014123448170721531,
0.020722245797514915,
0.035283368080854416,
-0.003257314907386899,
0.028600402176380157,
0.028667736798524857,
-0.057099804282188416,
0.046292588114738464,
-0.004553507547825575,
0.03912144526839256,
-0.04319519177079201,
-0.0655166357755661,
-0.02767455019056797,
0.000527893309481442,
0.025671344250440598,
-0.011556313373148441,
0.030064931139349937,
-0.0436328686773777,
0.00492384796962142,
0.0031836675480008125,
0.0010515782050788403,
0.04100681468844414,
0.03952545300126076,
0.02690020203590393,
0.01590781658887863,
0.004317835904657841,
-0.0658869817852974,
-0.02917274832725525,
-0.005412024445831776,
0.016311824321746826,
0.04521523416042328,
0.010394790209829807,
-0.03774108365178108,
0.04299318790435791,
-0.0010794589761644602,
0.015141884796321392,
0.038852106779813766,
0.004054809920489788,
0.05598878115415573,
0.0056476956233382225,
-0.03122645430266857,
0.04316152632236481,
-0.03349899873137474,
0.0070617240853607655,
0.023432467132806778,
-0.008046493865549564,
-0.02041923999786377,
-0.04858196899294853,
0.013668938539922237,
0.00619058171287179,
0.019291384145617485,
-0.017271343618631363,
0.005420441273599863,
0.043228860944509506,
0.009174349717795849,
-0.014830461703240871,
-0.02482966147363186,
0.057975154370069504,
-0.010933468118309975,
-0.055079761892557144,
-0.0362260527908802,
-0.0652809664607048,
0.03429018333554268,
0.022809620946645737,
0.035418037325143814,
0.039794791489839554,
-0.09554789960384369,
-0.03942445293068886,
0.07548216730356216,
-0.021446093916893005,
-0.007419439498335123,
-0.008471543900668621,
-0.006148497574031353,
-0.008172745816409588,
-0.04228617623448372,
-0.009957115165889263,
0.009477355517446995,
-0.05171303078532219,
0.033145494759082794,
-0.022186774760484695,
-0.02319679595530033,
0.00977194495499134,
0.001622344832867384,
-0.0031710423063486814,
0.04861563444137573,
0.009519439190626144,
-0.0511743538081646,
-0.029341084882616997,
0.017187176272273064,
-0.030351104214787483,
-0.0255366750061512,
-0.07817555963993073,
-0.007099599577486515,
0.0068513029254972935,
-0.0508376806974411,
-0.009721443988382816,
-0.014561123214662075,
-0.0726541131734848,
-0.03435751795768738,
0.08908377587795258,
0.008610421791672707,
-0.044104211032390594,
0.003762324806302786,
-0.009561523795127869,
-0.06241924315690994,
-0.016825251281261444,
-0.04891864210367203,
0.016210822388529778,
0.03127695620059967,
-0.028768738731741905,
0.01676633395254612,
-0.02695070393383503,
-0.04312785714864731,
-0.028179561719298363,
0.025907015427947044,
0.04814429208636284,
-0.006906012538820505,
-0.0326741524040699,
0.06342926621437073,
-0.00003577154711820185,
-0.026496194303035736,
0.040434472262859344,
-0.004650300834327936,
-0.015200803056359291,
-0.017271343618631363,
-0.024543488398194313,
0.007099599577486515,
-0.01737234555184841,
-0.01232224516570568,
-0.016572747379541397,
-0.04164649546146393,
0.025233669206500053,
-0.020048899576067924,
0.04935631528496742,
-0.03299399092793465,
0.009233267046511173,
0.06817635893821716,
-0.013803607784211636,
-0.019527055323123932,
-0.0008848197176121175,
0.025200001895427704,
-0.058715835213661194,
0.008033867925405502,
0.021648097783327103,
0.0011930862674489617,
0.03918877989053726,
0.019426053389906883,
-0.008576754480600357,
0.033869341015815735,
-0.0010221193078905344,
0.026546694338321686,
-0.03740441054105759,
0.009292185306549072,
-0.02684970200061798,
0.024341484531760216,
0.017305010929703712,
0.06851302832365036,
0.07629018276929855,
0.01951022259891033,
-0.02690020203590393,
-0.026647698134183884,
0.012844089418649673,
0.019291384145617485,
0.02464449033141136,
0.0091406824067235,
0.02269178442656994,
0.0036402808036655188,
0.053463730961084366,
0.0008963928557932377,
0.00035377006861381233,
-0.01893787644803524,
-0.02706853859126568,
0.000635997042991221,
-0.06056753918528557,
-0.005353106651455164,
-0.021277757361531258,
-0.01279358845204115,
0.014418036676943302,
-0.015049299225211143,
-0.04208417236804962,
-0.055786777287721634,
-0.008256914094090462,
0.01671583205461502,
-0.03195030242204666,
0.0164549108594656,
0.01688416860997677,
0.048447299748659134,
-0.08309099078178406,
0.05329539626836777,
0.0509050153195858,
-0.009300601668655872,
0.06319358944892883,
0.00861462950706482,
0.025755513459444046,
-0.09043046832084656,
-0.05238637700676918,
-0.002312525175511837,
0.05622445419430733,
0.05467575415968895,
-0.014493788592517376,
0.03218597546219826,
-0.011329058557748795,
0.02981242723762989,
0.0026134271174669266,
-0.02390380948781967,
0.009830862283706665,
0.018584370613098145,
-0.044811226427555084,
-0.10268537700176239,
0.01668216474354267,
-0.11292024701833725,
-0.013559520244598389,
-0.0061821648851037025,
-0.028145894408226013,
-0.04740361124277115,
-0.0038885774556547403,
-0.02407214604318142,
0.06043286994099617,
-0.03491302952170372,
0.06218357011675835,
-0.016379158943891525,
0.00408006040379405,
0.013525852933526039,
0.002802805742248893,
-0.045450903475284576,
-0.003894889960065484,
0.02982925996184349,
-0.001015280606225133,
-0.023769140243530273,
0.024476153776049614,
0.07817555963993073,
-0.02996392920613289,
0.04427254945039749,
0.025806013494729996,
-0.02252344787120819,
-0.04157916083931923,
-0.019931063055992126,
0.017860522493720055,
-0.0164549108594656,
0.028044892475008965,
-0.10645611584186554,
0.07736753672361374,
-0.060803212225437164,
0.024896996095776558,
-0.00045766535913571715,
-0.00021278808708302677,
-0.06922004371881485,
0.01671583205461502,
-0.006906012538820505,
0.022775953635573387,
-0.027977557852864265,
0.008568337187170982,
-0.005550902336835861,
-0.05457475408911705,
-0.01883687451481819,
-0.047672949731349945,
0.005395190790295601,
-0.02691703662276268,
0.009612024761736393,
-0.02848256751894951,
-0.01527655404061079,
-0.010470542125403881,
0.0038759522140026093,
-0.04716793820261955,
-0.00746573181822896,
0.04676393046975136,
0.049962326884269714,
0.012810422107577324,
0.03814509138464928,
0.040468137711286545,
0.0011015532072633505,
-0.028650904074311256,
-0.08140762150287628,
-0.025688178837299347,
0.01061362773180008,
-0.07339479774236679,
-0.025738678872585297,
0.02688336931169033,
-0.004641884006559849,
-0.05477675795555115,
-0.010706213302910328,
-0.07171142846345901,
0.017119841650128365,
-0.03777475282549858,
0.05258838087320328,
0.0329434908926487,
0.03420601412653923,
-0.006796593777835369,
0.0002785446122288704,
0.03804409131407738,
-0.02319679595530033,
-0.08073427528142929,
0.036832068115472794,
-0.013239679858088493,
-0.01967855915427208,
0.007251102477312088,
0.032320644706487656,
-0.03400401026010513,
0.02536833845078945,
-0.0582108274102211,
0.02614268660545349,
-0.00018793212075252086,
0.025923850014805794,
0.048447299748659134,
-0.0073226457461714745,
-0.06814268976449966,
0.016177155077457428,
0.03484569489955902,
0.10329139232635498,
-0.06507895886898041,
0.02780921943485737,
0.02987976185977459,
0.05440641567111015,
0.006754509638994932,
0.04319519177079201,
-0.03412184491753578,
-0.04033346846699715,
0.012204409576952457,
0.03195030242204666,
0.03726974129676819,
-0.009233267046511173,
-0.055753111839294434,
-0.0032783569768071175,
0.03710140660405159,
0.01127855759114027,
0.025705011561512947,
0.03689940273761749,
0.008660922758281231,
-0.034542687237262726,
0.0016465431544929743,
0.017069339752197266,
-0.013567936606705189,
-0.0163202416151762,
0.00835791602730751,
0.027994390577077866,
-0.03713507205247879,
-0.031192786991596222,
0.014864129014313221,
0.03838076442480087,
0.008446292951703072,
-0.016227656975388527,
-0.014519039541482925,
-0.03365050256252289,
-0.018735872581601143,
-0.06969138979911804,
-0.04316152632236481,
0.03363366797566414,
0.006447295192629099,
-0.008711423724889755,
0.014502204954624176,
-0.011362725868821144,
-0.029458919540047646,
-0.040468137711286545,
-0.018668537959456444,
0.032421644777059555,
0.04168016463518143,
-0.0004936999175697565,
-0.043329861015081406,
-0.022237276658415794,
0.006308417301625013,
0.05040000379085541,
-0.029357917606830597,
0.058648500591516495,
0.045450903475284576,
-0.005054309032857418,
0.011034470051527023,
0.00942685455083847,
0.015074550174176693,
0.02621002122759819,
-0.044003210961818695,
0.0363607257604599,
-0.007528858259320259,
-0.052016034722328186,
0.013517435640096664,
-0.02329779788851738,
-0.002491382881999016,
-0.04033346846699715,
-0.04427254945039749,
0.016480160877108574,
0.07911824434995651,
0.015200803056359291,
-0.035182368010282516,
0.047033268958330154,
-0.006611423101276159,
-0.05033266916871071,
-0.022860120981931686,
-0.04151182621717453,
-0.013971945270895958,
-0.021715432405471802,
0.05040000379085541,
-0.0580424889922142,
0.03134429082274437,
-0.011202806606888771,
0.01168256625533104,
0.03048577345907688,
0.08558236807584763,
-0.04632625728845596,
-0.030317436903715134,
-0.04639359191060066,
0.040299803018569946,
0.0052773552015423775,
-0.03814509138464928,
-0.012616834603250027,
-0.020250903442502022,
-0.044844891875982285,
-0.0005113226943649352,
-0.04999599605798721,
-0.00010027868847828358,
0.0058160326443612576,
-0.04582124575972557,
0.003568737767636776,
-0.0065903812646865845,
0.059422850608825684,
0.10591743886470795,
-0.012145492248237133,
-0.03333066403865814,
-0.020924249663949013,
-0.043430864810943604,
-0.0012656814651563764,
-0.04211783781647682,
0.02688336931169033,
-0.03053627535700798,
-0.015512225218117237,
-0.016328658908605576,
-0.020671745762228966,
-0.020015232264995575,
-0.014274951070547104,
0.044070545583963394,
-0.030805613845586777,
0.010908217169344425,
-0.03521603345870972,
0.029475754126906395,
0.0008890281314961612,
-0.005664529278874397,
-0.04575391113758087,
0.009334268979728222,
0.011749900877475739,
0.019224049523472786,
-0.02977875992655754,
-0.025907015427947044,
-0.017086174339056015,
0.0025208417791873217,
-0.05625811964273453,
0.004717635456472635,
0.016547495499253273,
0.04969298839569092,
0.053598400205373764,
0.0038969942834228277,
-0.03126012161374092,
0.026445692405104637,
-0.01207815669476986,
-0.05329539626836777,
0.04070381075143814,
0.07629018276929855,
0.007406814023852348,
-0.020200401544570923,
0.003215230768546462,
-0.008669339120388031,
-0.031596794724464417,
-0.021496593952178955,
0.017187176272273064,
-0.0013067135587334633,
0.0050627258606255054,
-0.008980762213468552,
-0.006960722152143717,
0.04935631528496742,
0.022809620946645737,
0.05252104625105858,
-0.031175954267382622,
0.03521603345870972,
0.0943358764052391,
-0.013475351966917515,
0.0015434370143339038,
-0.013231263495981693,
0.01524288672953844,
-0.012280161492526531,
0.052016034722328186,
0.052049703896045685,
-0.013896193355321884,
0.02038557268679142,
-0.003981162793934345,
0.04460922256112099,
-0.016177155077457428,
-0.04067014157772064,
0.065684974193573,
-0.06167856231331825,
-0.03477836027741432,
0.03348216786980629,
0.015966733917593956,
0.025250501930713654,
0.013593187555670738,
-0.009569940157234669,
0.03703407198190689,
0.057268138974905014,
0.06201523542404175,
0.007667736150324345,
0.03551904112100601,
0.0024408819153904915,
0.018803207203745842,
0.02838156558573246,
-0.025048498064279556,
-0.016572747379541397,
-0.010293788276612759,
-0.017254510894417763,
0.03437435254454613,
-0.03258998319506645,
0.024240482598543167,
-0.027910223230719566,
0.01747334748506546,
-0.03228697553277016,
-0.034610021859407425,
-0.04144449159502983,
-0.030098598450422287,
0.03733707591891289,
0.014249700121581554,
-0.038919441401958466,
0.01343326736241579,
-0.014359119348227978,
-0.029728258028626442,
0.038852106779813766,
-0.0724521055817604,
-0.04211783781647682,
-0.04080481082201004,
-0.03415551409125328,
-0.0018453908851370215,
-0.05555110424757004,
-0.024408819153904915,
0.07137475162744522,
0.04137715697288513,
-0.016185572370886803,
-0.06757034361362457,
-0.04942364990711212,
0.059288181364536285,
0.05545010417699814,
0.05380040407180786,
-0.06171222776174545,
-0.025620844215154648,
-0.029341084882616997,
-0.011000802740454674,
0.007549900095909834,
-0.027977557852864265,
0.010824048891663551,
0.05632545426487923,
0.031630463898181915,
0.011733067221939564,
0.005256312899291515,
-0.020570743829011917,
0.00019292962679173797,
-0.037606414407491684,
-0.011118638329207897,
0.05174669623374939,
-0.020755913108587265,
0.03351583331823349,
-0.007966533303260803,
0.019055712968111038,
0.05672946199774742,
-0.01681683398783207,
0.08807375282049179,
0.006476753856986761,
0.029442086815834045,
-0.04972665756940842,
0.09561523795127869,
0.006906012538820505,
-0.07743487507104874,
-0.012751503847539425,
-0.010445291176438332,
-0.04242084547877312,
0.022270943969488144,
0.03060360997915268,
0.0362260527908802,
-0.0801955983042717,
0.01826453022658825,
0.019914230331778526,
-0.007015431299805641,
-0.04602324962615967,
0.01907254569232464,
-0.020149901509284973,
0.04460922256112099,
0.0020516032818704844,
0.018382366746664047,
-0.025065332651138306,
0.03136112540960312,
0.004873347003012896,
-0.046157918870449066,
0.02259078249335289,
-0.052790384739637375,
-0.015099800191819668,
-0.04885130748152733,
0.027220042422413826,
0.0046965936198830605,
-0.08093627542257309,
0.016252906993031502,
0.04087214544415474,
0.01165731530636549,
0.06955672055482864,
0.03989579528570175,
-0.0363943912088871,
-0.04602324962615967,
-0.0002753883018158376,
-0.06188056617975235,
-0.009856113232672215,
-0.04740361124277115,
0.02333146519958973,
0.042723849415779114,
-0.008282165043056011,
0.036832068115472794,
0.0509723499417305,
0.047672949731349945,
0.04878397285938263,
-0.014939880929887295,
0.022910622879862785,
0.049962326884269714,
0.007558316923677921,
0.03056994266808033,
0.004313627723604441,
-0.008122244849801064,
-0.011918237432837486,
-0.03797675669193268,
0.000553932914044708,
-0.0037539079785346985,
-0.03595671430230141,
-0.011497396044433117,
-0.007192184682935476,
-0.05538276955485344,
-0.0058581167832016945,
0.03935711830854416,
-0.03437435254454613,
-0.0019032566342502832,
-0.0037265534047037363,
0.014485371299088001,
0.0054583172313869,
0.001853807712905109,
0.04794228821992874,
0.005378357134759426,
-0.07655952125787735,
0.0004884394002147019,
0.04901964217424393,
-0.03501402959227562,
0.025873348116874695,
-0.029576756060123444,
-0.024223649874329567,
-0.0027817636728286743,
-0.023870142176747322,
0.02905491180717945,
0.006489379331469536,
-0.06386693567037582,
0.016168737784028053,
0.016017235815525055,
0.004692384973168373,
-0.003798096440732479,
0.06908537447452545,
0.013450101017951965,
-0.030048098415136337,
-0.017170341685414314,
-0.04858196899294853,
0.03338116407394409,
-0.03321282938122749,
-0.018567536026239395,
0.062351908534765244,
0.03122645430266857,
-0.010798797942698002,
0.03227014094591141,
0.018517035990953445,
0.010386373847723007,
0.056359123438596725,
0.006203206721693277,
0.027203207835555077,
0.01060521136969328,
-0.003446693532168865,
0.005332064349204302,
-0.01676633395254612,
-0.005184770096093416,
-0.011699399910867214,
-0.037438079714775085,
0.024189980700612068,
0.015049299225211143,
-0.014451703988015652,
0.054911427199840546,
-0.036630064249038696,
0.008526253513991833,
0.02050340734422207,
0.054978761821985245,
-0.015318638645112514,
0.03216914087533951,
-0.06935471296310425,
-0.059456516057252884,
0.03871743753552437,
0.027371544390916824,
0.0022767537739127874,
-0.0038191385101526976,
0.045652907341718674,
-0.0073226457461714745,
0.036865733563899994,
0.073058120906353,
0.010420041158795357,
-0.00063494493952021,
0.050703007727861404,
-0.00877034105360508,
-0.01524288672953844,
0.019493388012051582,
-0.043464530259370804,
0.014695792458951473,
0.03939078375697136,
-0.014864129014313221,
0.0019253508653491735,
0.0022767537739127874,
-0.030367938801646233,
-0.008164329454302788,
0.07938758283853531,
-0.05770581588149071,
0.04295952245593071,
0.03343166410923004,
0.0437675379216671,
-0.013307014480233192,
-0.01612665504217148,
-0.03440801799297333,
0.027506213635206223,
-0.022927455604076385,
-0.003516132477670908,
-0.007570942398160696,
0.011446894146502018,
0.026075351983308792,
0.05608978495001793,
0.012608417309820652,
-0.014392786659300327,
0.016236072406172752,
0.0021462927106767893,
-0.025183167308568954,
-0.025637676939368248,
-0.02703487128019333,
-0.024476153776049614,
0.0050248499028384686,
0.06103888154029846,
-0.054978761821985245,
-0.05040000379085541,
0.011329058557748795,
-0.03770741820335388,
0.012860923074185848,
-0.07023006677627563,
-0.05191503465175629,
-0.06982605904340744,
-0.02319679595530033,
-0.014695792458951473,
0.030149100348353386,
0.04508056491613388,
-0.013517435640096664,
0.04676393046975136
] |
52,361 |
zipfile
|
extractall
|
Extract all members from the archive to the current working
directory. `path' specifies a different directory to extract to.
`members' is optional and must be a subset of the list returned
by namelist().
|
def extractall(self, path=None, members=None, pwd=None):
"""Extract all members from the archive to the current working
directory. `path' specifies a different directory to extract to.
`members' is optional and must be a subset of the list returned
by namelist().
"""
if members is None:
members = self.namelist()
if path is None:
path = os.getcwd()
else:
path = os.fspath(path)
for zipinfo in members:
self._extract_member(zipinfo, path, pwd)
|
(self, path=None, members=None, pwd=None)
|
[
0.05449116230010986,
0.024187754839658737,
-0.005845087580382824,
-0.015959108248353004,
-0.033636096864938736,
-0.040129683911800385,
0.030750056728720665,
-0.01013549417257309,
0.04614226520061493,
0.029684972018003464,
0.005643236916512251,
0.02159375511109829,
0.013304983265697956,
0.04401209205389023,
-0.015280545689165592,
0.014430194161832333,
-0.01875925250351429,
0.06627582013607025,
-0.02951318398118019,
0.020425597205758095,
-0.024376722052693367,
0.002840944565832615,
0.012669366784393787,
0.015555405989289284,
-0.015048631466925144,
0.03318944573402405,
0.0496123842895031,
-0.06799370050430298,
0.06613839417695999,
0.0536322221159935,
-0.010307282209396362,
0.004116470459848642,
-0.07022694498300552,
-0.03531961888074875,
-0.023706749081611633,
-0.01371727418154478,
0.006871521007269621,
0.02348342351615429,
-0.016629081219434738,
0.07483086735010147,
0.03744979202747345,
0.020786352455615997,
0.02801862731575966,
0.026232032105326653,
0.044355668127536774,
0.015916161239147186,
0.0074341269209980965,
-0.040885552763938904,
-0.00687581580132246,
-0.015864623710513115,
-0.011131864041090012,
0.031110811978578568,
0.03121388517320156,
-0.03913331404328346,
0.07345656305551529,
0.02983958087861538,
-0.000656552379950881,
0.06387078762054443,
0.02858552895486355,
0.014498909935355186,
0.003053532214835286,
-0.03430606797337532,
0.05751463398337364,
-0.01542656496167183,
-0.0044536045752465725,
0.019618192687630653,
-0.021628113463521004,
-0.05497216805815697,
-0.03600677102804184,
0.010908540338277817,
-0.0009770444594323635,
0.03406556695699692,
-0.019858695566654205,
0.022710377350449562,
0.03562883660197258,
0.052223559468984604,
-0.03329252079129219,
0.02700507827103138,
0.012411684729158878,
-0.006991772912442684,
-0.06960850954055786,
-0.07847277075052261,
-0.0765487477183342,
0.046932488679885864,
0.031059276312589645,
0.041950635612010956,
-0.0030062906444072723,
-0.05129590630531311,
0.027984270825982094,
0.032313328236341476,
0.016036411747336388,
0.003880262142047286,
0.0007429832476191223,
-0.018931040540337563,
-0.004228132776916027,
-0.013347930274903774,
-0.025957170873880386,
-0.009714612737298012,
-0.0463140532374382,
0.039683036506175995,
-0.040060967206954956,
-0.0519830584526062,
0.03133413568139076,
-0.02580256201326847,
-0.0019229522440582514,
-0.0018316898494958878,
-0.01278102956712246,
-0.07105153053998947,
-0.016130896285176277,
0.05308249965310097,
-0.033893778920173645,
0.015332081355154514,
0.028362203389406204,
0.0027486085891723633,
-0.02447979338467121,
-0.03878973796963692,
0.013451002538204193,
-0.04291265085339546,
-0.06981465220451355,
-0.02341470867395401,
0.07661746442317963,
0.04098862409591675,
0.02700507827103138,
0.024153396487236023,
0.00755437882617116,
-0.043015722185373306,
-0.0050033265724778175,
-0.0280014481395483,
-0.007708987686783075,
0.03116234950721264,
-0.02071763575077057,
0.03600677102804184,
-0.0349760428071022,
-0.024565687403082848,
0.034701183438301086,
-0.02020227164030075,
0.03224461153149605,
-0.03600677102804184,
0.023174205794930458,
0.024273648858070374,
-0.01831260323524475,
-0.032639726996421814,
0.0775107592344284,
0.01324485708028078,
-0.005471448879688978,
0.0026820406783372164,
0.006107064429670572,
-0.013923419639468193,
-0.047860145568847656,
-0.014576214365661144,
-0.003843757091090083,
-0.014103797264397144,
-0.026025885716080666,
-0.04061068966984749,
0.010968665592372417,
-0.02920396439731121,
-0.0024393899366259575,
0.05947301536798477,
-0.01767698861658573,
0.0057377200573682785,
-0.029255501925945282,
0.03026905097067356,
-0.062221623957157135,
0.02348342351615429,
-0.0003258604265283793,
-0.013141783885657787,
0.03380788490176201,
-0.014559035189449787,
-0.024067502468824387,
0.05892329290509224,
0.0011198432184755802,
0.01035022921860218,
-0.03241639956831932,
-0.017470842227339745,
-0.009740381501615047,
-0.0166548490524292,
0.021164285019040108,
0.04349672794342041,
0.043909020721912384,
0.029977010563015938,
-0.058133069425821304,
-0.0557623952627182,
-0.013511128723621368,
0.0013592727482318878,
0.05287635698914528,
0.053219933062791824,
-0.0012486842460930347,
-0.009817685931921005,
0.032004110515117645,
-0.0009013503440655768,
-0.026094602420926094,
-0.038927167654037476,
-0.041057340800762177,
-0.008606580086052418,
-0.044286955147981644,
0.0015654184389859438,
-0.035285260528326035,
0.003150162985548377,
-0.00871824286878109,
-0.015211829915642738,
-0.03265690430998802,
-0.05043696612119675,
0.025132589042186737,
-0.03628163039684296,
0.00008884662383934483,
0.01913718692958355,
-0.03140285238623619,
0.0025124000385403633,
-0.034529395401477814,
0.010083957575261593,
0.06459230184555054,
0.0026004412211477757,
0.030509553849697113,
-0.03858359158039093,
-0.021542219445109367,
-0.03348148614168167,
-0.021542219445109367,
-0.05098668858408928,
0.05967916175723076,
0.030612627044320107,
-0.010685215704143047,
0.028808852657675743,
-0.06304620951414108,
-0.003534538671374321,
-0.014249817468225956,
0.009585771709680557,
0.01183619536459446,
0.0385148748755455,
-0.027846839278936386,
-0.09750688821077347,
0.06551995128393173,
-0.08699345588684082,
-0.017256107181310654,
-0.0020764877554029226,
-0.04727606475353241,
-0.059507373720407486,
0.02762351557612419,
-0.013459592126309872,
0.030956203117966652,
-0.0062874420545995235,
0.04160705953836441,
-0.017831597477197647,
-0.012480400502681732,
-0.0280014481395483,
0.006781332660466433,
-0.05212048813700676,
-0.019120007753372192,
0.003592517226934433,
0.012325790710747242,
-0.021250179037451744,
-0.003946830052882433,
0.045798689126968384,
-0.03542269021272659,
0.011690175160765648,
0.008477739058434963,
-0.055040884763002396,
-0.005608879029750824,
-0.009852043353021145,
0.03720928728580475,
-0.04689813405275345,
0.06311491876840591,
-0.1190834641456604,
0.02102685533463955,
0.0029397227335721254,
0.05074618384242058,
0.048238079994916916,
0.042465999722480774,
-0.06363028287887573,
-0.04074811935424805,
-0.010341639630496502,
0.025888456031680107,
-0.06270263344049454,
0.006399103906005621,
0.022830629721283913,
-0.0519830584526062,
0.033326879143714905,
-0.03954560309648514,
-0.022899344563484192,
-0.049131374806165695,
0.01863900199532509,
0.02308831177651882,
-0.001091927639208734,
-0.01684381626546383,
-0.02743454836308956,
-0.009345268830657005,
-0.024411078542470932,
0.02114710584282875,
0.032382044941186905,
-0.010333050042390823,
0.009714612737298012,
0.07428114116191864,
-0.023139847442507744,
-0.040507618337869644,
-0.0798470750451088,
-0.015237598679959774,
-0.017608273774385452,
-0.010238566435873508,
-0.02442825771868229,
0.015984876081347466,
-0.03217589855194092,
-0.06974594295024872,
-0.012549115344882011,
-0.03129977732896805,
-0.024084681645035744,
0.0036547903437167406,
-0.01644870452582836,
0.010547785088419914,
0.05370093882083893,
0.0040778182446956635,
0.021044034510850906,
0.036487776786088943,
-0.060950394719839096,
-0.06053810194134712,
-0.026713037863373756,
-0.0007596251671202481,
-0.033275339752435684,
0.017015604302287102,
0.028052985668182373,
-0.03045801818370819,
-0.00782065000385046,
-0.056621335446834564,
0.025407450273633003,
-0.0307157002389431,
0.021696828305721283,
0.047310423105955124,
0.018295425921678543,
-0.06050374358892441,
0.021318893879652023,
0.033962491899728775,
0.03927074372768402,
-0.030750056728720665,
-0.008378961123526096,
0.04098862409591675,
0.06988336890935898,
0.02568230964243412,
0.04847858101129532,
-0.015787320211529732,
-0.004397773649543524,
0.016809457913041115,
0.02946164645254612,
0.019789980724453926,
0.02606024406850338,
-0.06036631390452385,
0.013597022742033005,
0.027365833520889282,
0.025785382837057114,
0.04669198766350746,
0.06885264068841934,
0.016646260395646095,
-0.04359980300068855,
0.05342607572674751,
0.026953542605042458,
-0.012927048839628696,
0.013339340686798096,
0.01894821971654892,
0.026214852929115295,
-0.04356544464826584,
-0.022487053647637367,
0.01585603505373001,
0.029822401702404022,
0.02573384717106819,
-0.001003349432721734,
-0.017659809440374374,
-0.033395592123270035,
-0.007532905321568251,
-0.058133069425821304,
0.0029848171398043633,
0.03696878254413605,
0.010101135820150375,
-0.026214852929115295,
0.026541249826550484,
-0.0037600104697048664,
-0.03586934134364128,
-0.03234768658876419,
-0.02844809740781784,
0.045798689126968384,
0.07118895649909973,
0.003571043722331524,
-0.07098281383514404,
0.012351559475064278,
-0.047688357532024384,
0.0026541249826550484,
0.044527456164360046,
0.008907209150493145,
0.06833727657794952,
-0.0013184731360524893,
0.04902830347418785,
-0.009061818942427635,
0.014902611263096333,
0.04143527150154114,
-0.004316174425184727,
-0.011518387123942375,
-0.03772465139627457,
-0.050643112510442734,
0.01110609620809555,
-0.011011612601578236,
0.0474822111427784,
-0.009594361297786236,
-0.030251871794462204,
0.025149768218398094,
0.0711202472448349,
-0.014052260667085648,
-0.027984270825982094,
0.02353496104478836,
0.015065810643136501,
-0.018278246745467186,
0.005488627590239048,
-0.08878005295991898,
-0.006948825903236866,
-0.0021205085795372725,
0.06627582013607025,
-0.06277134269475937,
0.038995884358882904,
0.007472779136151075,
0.0035603069700300694,
0.02391289360821247,
0.04311879724264145,
-0.023053953424096107,
0.021817080676555634,
-0.016689207404851913,
0.04889087378978729,
0.003017027396708727,
-0.028929105028510094,
-0.029925474897027016,
0.02171400748193264,
-0.028551170602440834,
-0.01463634055107832,
-0.03507911413908005,
0.01625114679336548,
-0.01862182281911373,
-0.0035280967131257057,
0.028362203389406204,
-0.04397773742675781,
0.05947301536798477,
0.09860632568597794,
0.013622790575027466,
-0.03102491796016693,
-0.012239896692335606,
-0.035903699696063995,
-0.015864623710513115,
-0.047550927847623825,
0.006570891942828894,
-0.012875513173639774,
-0.04765399917960167,
0.01963537186384201,
-0.033206626772880554,
-0.017041372135281563,
-0.019686907529830933,
0.06809677183628082,
0.0006409841007553041,
-0.02095814049243927,
-0.06507330387830734,
0.010650858283042908,
-0.022298086434602737,
-0.0035066232085227966,
-0.0007778776925988495,
0.07723589986562729,
0.03317226842045784,
-0.013682916760444641,
-0.03834308683872223,
0.03751850500702858,
-0.04171013459563255,
0.013743042014539242,
-0.02128453738987446,
0.017376359552145004,
-0.004960379563271999,
0.006244495045393705,
0.030870309099555016,
0.026592787355184555,
-0.029358575120568275,
0.021920152008533478,
0.0018123637419193983,
-0.04098862409591675,
0.017161624506115913,
0.03806822746992111,
-0.004286111332476139,
-0.015941929072141647,
-0.02951318398118019,
-0.04507717862725258,
-0.06363028287887573,
-0.009267964400351048,
-0.0011123274452984333,
0.05686183646321297,
-0.00756726274266839,
-0.04638276994228363,
-0.05751463398337364,
0.06655067950487137,
-0.018467213958501816,
0.01731623336672783,
-0.04518025368452072,
0.06486716121435165,
0.02901499904692173,
-0.03573191165924072,
0.026111779734492302,
0.016225378960371017,
-0.021920152008533478,
-0.018278246745467186,
0.05029953643679619,
0.026472534984350204,
0.01604500226676464,
0.0298911165446043,
0.012686545960605145,
0.07593031227588654,
0.004204512108117342,
-0.013330751098692417,
0.0895359218120575,
0.027022257447242737,
-0.05294506996870041,
0.015727194026112556,
0.0171272661536932,
0.0019272469216957688,
0.011930678971111774,
-0.04531768336892128,
0.0031544577796012163,
0.03669392317533493,
0.023002417758107185,
-0.006025465205311775,
0.02573384717106819,
-0.01913718692958355,
0.042019352316856384,
-0.0039232089184224606,
0.02429082803428173,
-0.037484146654605865,
0.04700120538473129,
-0.013966366648674011,
0.014936969615519047,
-0.03796515613794327,
0.028293488547205925,
-0.015349260531365871,
0.023517781868577003,
-0.008297361433506012,
-0.02674739621579647,
-0.055487532168626785,
-0.03318944573402405,
0.035147830843925476,
-0.013743042014539242,
-0.008366077207028866,
-0.012669366784393787,
0.01520324032753706,
-0.00389529368840158,
0.042775221168994904,
-0.03676263988018036,
-0.050574395805597305,
-0.04569561779499054,
-0.05462859198451042,
-0.02202322520315647,
-0.046417124569416046,
-0.03195257484912872,
0.107264444231987,
0.041641417890787125,
-0.0033305403776466846,
-0.08616887778043747,
-0.06795934587717056,
0.06170625984668732,
0.06009145453572273,
0.007429832126945257,
-0.04813500493764877,
-0.035594478249549866,
-0.027056613937020302,
0.024840548634529114,
0.038927167654037476,
-0.007764819078147411,
-0.027554800733923912,
0.021421967074275017,
-0.004844422452151775,
0.00975755974650383,
0.0006442051380872726,
0.0016813753172755241,
-0.006343272980302572,
-0.007305285893380642,
-0.045661259442567825,
0.010814056731760502,
-0.04102298244833946,
-0.011776069179177284,
0.02650689333677292,
-0.020528670400381088,
-0.02240115962922573,
-0.03535397723317146,
0.06050374358892441,
-0.05181127041578293,
0.03913331404328346,
-0.05181127041578293,
0.07517444342374802,
-0.03430606797337532,
-0.02454851008951664,
0.02001330628991127,
-0.01939486898481846,
-0.016981245949864388,
0.02762351557612419,
0.030750056728720665,
0.019223080947995186,
-0.09235324710607529,
0.02114710584282875,
-0.001674933242611587,
-0.050814900547266006,
-0.0005749530391767621,
0.004543793387711048,
-0.01154415588825941,
0.005772077944129705,
-0.017659809440374374,
0.02592281438410282,
0.025836920365691185,
0.05875150486826897,
0.008907209150493145,
-0.067581407725811,
0.007859302684664726,
-0.014206870459020138,
0.013597022742033005,
0.0008439086959697306,
0.06294313073158264,
0.019102828577160835,
-0.04184756428003311,
0.059954021126031876,
0.01303012203425169,
-0.001018380862660706,
0.06706604361534119,
0.034082744270563126,
0.025527700781822205,
-0.03209000453352928,
-0.017470842227339745,
-0.07641131430864334,
-0.035216547548770905,
-0.06510766595602036,
0.019686907529830933,
0.017101498320698738,
0.015615532174706459,
-0.02197168953716755,
0.04500846564769745,
0.0673409104347229,
0.07757947593927383,
-0.005016210488975048,
-0.017264697700738907,
0.02423929050564766,
0.020374059677124023,
0.04208806902170181,
-0.014215459115803242,
-0.009199248626828194,
-0.025270018726587296,
-0.05634647235274315,
-0.0382743738591671,
-0.025441806763410568,
-0.037862081080675125,
-0.00013165941345505416,
-0.01473082322627306,
-0.05167384073138237,
-0.026163317263126373,
0.010805467143654823,
-0.01437865849584341,
-0.0032339096069335938,
-0.00780347129330039,
0.018587464466691017,
-0.013966366648674011,
-0.02334599383175373,
0.05778949335217476,
-0.028345024213194847,
-0.01767698861658573,
-0.020374059677124023,
0.036419063806533813,
-0.00997229479253292,
0.013846115209162235,
-0.03796515613794327,
0.004642571322619915,
0.023706749081611633,
0.01066803652793169,
0.05449116230010986,
-0.014550446532666683,
-0.05311685800552368,
0.04387466236948967,
0.01750520057976246,
0.041057340800762177,
0.010710983537137508,
0.059644803404808044,
0.06668811291456223,
0.019429225474596024,
-0.03090466745197773,
-0.008374666795134544,
-0.00044664888991974294,
-0.03762158006429672,
-0.007039014715701342,
0.05727412924170494,
-0.01814081519842148,
-0.001535355462692678,
0.036041129380464554,
0.051021043211221695,
0.013828936032950878,
0.05985094979405403,
0.017848776653409004,
0.04342801496386528,
0.019910233095288277,
0.010358817875385284,
0.005802140571177006,
-0.02819041535258293,
0.04658891260623932,
-0.008593696169555187,
-0.010049600154161453,
0.07091409713029861,
0.02114710584282875,
-0.03782772272825241,
0.07716718316078186,
-0.02020227164030075,
-0.017324822023510933,
0.0425347164273262,
0.011707354336977005,
0.024222111329436302,
0.038927167654037476,
-0.05620904266834259,
-0.046795058995485306,
0.07881634682416916,
-0.002538168104365468,
0.004367710556834936,
-0.006042643915861845,
0.04116041213274002,
-0.01627691648900509,
0.052464064210653305,
0.047550927847623825,
-0.031763605773448944,
0.10966947674751282,
0.01469646580517292,
0.037415433675050735,
-0.024531330913305283,
0.057067982852458954,
-0.017573915421962738,
-0.00940539501607418,
0.0021516450215131044,
-0.0018327635480090976,
-0.02372392639517784,
-0.014516088180243969,
-0.026163317263126373,
0.020597385242581367,
0.07826662808656693,
-0.0519830584526062,
0.057308487594127655,
0.036419063806533813,
0.054662950336933136,
-0.019686907529830933,
-0.052532780915498734,
-0.034701183438301086,
0.01303012203425169,
-0.07854148745536804,
0.010092547163367271,
-0.00822435226291418,
-0.02430800534784794,
0.04061068966984749,
0.04930316284298897,
-0.026833290234208107,
-0.03440914303064346,
0.027279939502477646,
0.02233244478702545,
-0.03796515613794327,
-0.03291458636522293,
-0.04432131350040436,
0.02712533064186573,
-0.006686849053949118,
0.01736776903271675,
-0.05105540156364441,
-0.02284780889749527,
0.01686958409845829,
-0.08493199944496155,
-0.010899950750172138,
-0.07854148745536804,
-0.03631598874926567,
-0.06565738469362259,
-0.04933752119541168,
-0.010049600154161453,
0.07558673620223999,
0.051261547952890396,
-0.0037750420160591602,
0.048306792974472046
] |
52,365 |
zipfile
|
open
|
Return file-like object for 'name'.
name is a string for the file name within the ZIP file, or a ZipInfo
object.
mode should be 'r' to read a file already in the ZIP file, or 'w' to
write to a file newly added to the archive.
pwd is the password to decrypt files (only used for reading).
When writing, if the file size is not known in advance but may exceed
2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
files. If the size is known in advance, it is best to pass a ZipInfo
instance for name, with zinfo.file_size set.
|
def open(self, name, mode="r", pwd=None, *, force_zip64=False):
"""Return file-like object for 'name'.
name is a string for the file name within the ZIP file, or a ZipInfo
object.
mode should be 'r' to read a file already in the ZIP file, or 'w' to
write to a file newly added to the archive.
pwd is the password to decrypt files (only used for reading).
When writing, if the file size is not known in advance but may exceed
2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
files. If the size is known in advance, it is best to pass a ZipInfo
instance for name, with zinfo.file_size set.
"""
if mode not in {"r", "w"}:
raise ValueError('open() requires mode "r" or "w"')
if pwd and not isinstance(pwd, bytes):
raise TypeError("pwd: expected bytes, got %s" % type(pwd).__name__)
if pwd and (mode == "w"):
raise ValueError("pwd is only supported for reading files")
if not self.fp:
raise ValueError(
"Attempt to use ZIP archive that was already closed")
# Make sure we have an info object
if isinstance(name, ZipInfo):
# 'name' is already an info object
zinfo = name
elif mode == 'w':
zinfo = ZipInfo(name)
zinfo.compress_type = self.compression
zinfo._compresslevel = self.compresslevel
else:
# Get info object for name
zinfo = self.getinfo(name)
if mode == 'w':
return self._open_to_write(zinfo, force_zip64=force_zip64)
if self._writing:
raise ValueError("Can't read from the ZIP file while there "
"is an open writing handle on it. "
"Close the writing handle before trying to read.")
# Open for reading:
self._fileRefCnt += 1
zef_file = _SharedFile(self.fp, zinfo.header_offset,
self._fpclose, self._lock, lambda: self._writing)
try:
# Skip the file header:
fheader = zef_file.read(sizeFileHeader)
if len(fheader) != sizeFileHeader:
raise BadZipFile("Truncated file header")
fheader = struct.unpack(structFileHeader, fheader)
if fheader[_FH_SIGNATURE] != stringFileHeader:
raise BadZipFile("Bad magic number for file header")
fname = zef_file.read(fheader[_FH_FILENAME_LENGTH])
if fheader[_FH_EXTRA_FIELD_LENGTH]:
zef_file.read(fheader[_FH_EXTRA_FIELD_LENGTH])
if zinfo.flag_bits & 0x20:
# Zip 2.7: compressed patched data
raise NotImplementedError("compressed patched data (flag bit 5)")
if zinfo.flag_bits & 0x40:
# strong encryption
raise NotImplementedError("strong encryption (flag bit 6)")
if fheader[_FH_GENERAL_PURPOSE_FLAG_BITS] & 0x800:
# UTF-8 filename
fname_str = fname.decode("utf-8")
else:
fname_str = fname.decode("cp437")
if fname_str != zinfo.orig_filename:
raise BadZipFile(
'File name in directory %r and header %r differ.'
% (zinfo.orig_filename, fname))
if (zinfo._end_offset is not None and
zef_file.tell() + zinfo.compress_size > zinfo._end_offset):
raise BadZipFile(f"Overlapped entries: {zinfo.orig_filename!r} (possible zip bomb)")
# check for encrypted flag & handle password
is_encrypted = zinfo.flag_bits & 0x1
if is_encrypted:
if not pwd:
pwd = self.pwd
if not pwd:
raise RuntimeError("File %r is encrypted, password "
"required for extraction" % name)
else:
pwd = None
return ZipExtFile(zef_file, mode, zinfo, pwd, True)
except:
zef_file.close()
raise
|
(self, name, mode='r', pwd=None, *, force_zip64=False)
|
[
0.08524689078330994,
-0.021810729056596756,
0.001503516105003655,
0.07518360018730164,
0.035013601183891296,
-0.06445496529340744,
-0.01736125722527504,
0.04553431645035744,
0.01140437088906765,
-0.015573152340948582,
0.036448244005441666,
0.036676958203315735,
-0.04303928464651108,
0.030314628034830093,
0.00964745320379734,
0.0011318604229018092,
-0.04050267115235329,
0.0562213659286499,
-0.01836966536939144,
0.05247882008552551,
-0.003815318224951625,
-0.014044946059584618,
-0.007100442424416542,
0.01689343899488449,
0.0016945418901741505,
0.015479588881134987,
-0.005665799602866173,
0.008888548240065575,
0.04973428696393967,
0.007531874813139439,
-0.025906739756464958,
0.0025145234540104866,
0.006533862557262182,
0.01966916210949421,
0.0054266927763819695,
-0.031187888234853745,
0.013743462972342968,
0.041895728558301926,
0.0068925232626497746,
-0.027715636417269707,
0.01172664575278759,
-0.01786026358604431,
0.05156397446990013,
-0.02114538848400116,
-0.025282980874180794,
0.034743309020996094,
-0.04391254484653473,
-0.049692701548337936,
0.018494417890906334,
0.011154867708683014,
0.037467051297426224,
0.0038828919641673565,
0.021810729056596756,
-0.02538694068789482,
0.0544748455286026,
0.013462771661579609,
-0.02761167660355568,
0.023432500660419464,
-0.011321203783154488,
-0.025428524240851402,
0.0007803469779901206,
-0.03590765595436096,
0.04765509441494942,
-0.030127499252557755,
-0.07564102113246918,
0.0307928416877985,
-0.027736429125070572,
-0.08067267388105392,
-0.021311722695827484,
0.04894419386982918,
0.012100900523364544,
0.015635527670383453,
-0.012402383610606194,
0.020989447832107544,
0.0025561072397977114,
0.05946490541100502,
-0.00674178171902895,
-0.02386913076043129,
0.027341382578015327,
-0.04761350899934769,
-0.00782816018909216,
-0.06108667701482773,
-0.009720224887132645,
0.0473640076816082,
0.022954285144805908,
0.037882886826992035,
0.07551627606153488,
-0.003147377632558346,
0.042956117540597916,
0.005696987733244896,
-0.021478058770298958,
0.031187888234853745,
-0.008285582065582275,
-0.01944044977426529,
0.01989787258207798,
-0.06728266924619675,
0.003854303155094385,
0.022122608497738838,
-0.007453905418515205,
0.05243723466992378,
-0.05027487501502037,
-0.035387858748435974,
-0.009746215306222439,
-0.021706771105527878,
-0.031125511974096298,
-0.04644916206598282,
-0.004012841731309891,
0.0027445340529084206,
-0.03324628993868828,
-0.06116984412074089,
-0.04054425284266472,
-0.08441521972417831,
0.010687049478292465,
-0.0016321660950779915,
-0.044120464473962784,
0.009574681520462036,
-0.00980859063565731,
0.03149976581335068,
-0.03698883578181267,
-0.046282827854156494,
0.08204493671655655,
0.028879985213279724,
-0.02890077605843544,
0.00514600146561861,
0.06482922285795212,
0.008321967907249928,
-0.02451368048787117,
-0.04869468882679939,
0.03567894548177719,
0.03682250156998634,
0.011612290516495705,
0.038569021970033646,
-0.004210365004837513,
0.0034566575195640326,
-0.01361871138215065,
0.018484022468328476,
0.009273198433220387,
0.02912948839366436,
-0.057260964065790176,
0.05056596174836159,
0.05755205079913139,
-0.03902644291520119,
0.0021116798743605614,
0.005936094559729099,
-0.07443509250879288,
-0.008405135944485664,
0.010193241760134697,
-0.04197889566421509,
-0.004483258817344904,
0.007999693043529987,
0.04233235865831375,
-0.0272374227643013,
-0.021706771105527878,
0.03838189318776131,
0.09131813794374466,
-0.05871639773249626,
0.011591498740017414,
0.022413695231080055,
-0.04407888278365135,
0.021914688870310783,
-0.030065124854445457,
0.05322732776403427,
-0.030439378693699837,
-0.008940528146922588,
0.012558323331177235,
-0.005925698671489954,
-0.02912948839366436,
-0.009096466936171055,
0.04898577556014061,
-0.0010486927349120378,
-0.018109766766428947,
0.044411551207304,
0.007459103129804134,
0.003737348597496748,
-0.03624032437801361,
0.027902763336896896,
-0.012412779033184052,
-0.03378687798976898,
0.022517655044794083,
-0.031146304681897163,
-0.036489829421043396,
-0.0334126241505146,
-0.05081546679139137,
0.07023512572050095,
0.060130249708890915,
0.0497758686542511,
0.01921173930168152,
0.009642255492508411,
0.080506332218647,
-0.025594860315322876,
-0.09664086997509003,
-0.010146459564566612,
-0.03655220568180084,
-0.023702794685959816,
-0.05418375879526138,
0.0027991130482405424,
-0.008264790289103985,
-0.018296893686056137,
0.044619470834732056,
0.01596819795668125,
-0.08221127092838287,
0.0043741012923419476,
0.0340779647231102,
-0.033724501729011536,
-0.03189481422305107,
0.027632469311356544,
0.032518573105335236,
-0.013514751568436623,
-0.04251948744058609,
0.062167856842279434,
0.05647087097167969,
-0.02549090050160885,
-0.008555877022445202,
0.057260964065790176,
0.033682920038700104,
-0.01879590004682541,
-0.008639045059680939,
0.0048913005739450455,
0.024014674127101898,
0.08549639582633972,
-0.019679557532072067,
0.07372816652059555,
-0.10620515793561935,
0.003862100187689066,
0.02742454968392849,
-0.009642255492508411,
0.037737343460321426,
0.027071086689829826,
0.0011929366737604141,
-0.00946552399545908,
0.003916678950190544,
-0.08229444175958633,
0.023557251319289207,
0.010063291527330875,
0.007750190328806639,
-0.033807672560214996,
0.014315241016447544,
-0.04324720427393913,
-0.020157771185040474,
-0.010416754521429539,
0.022205775603652,
-0.036261118948459625,
0.030065124854445457,
0.07031828910112381,
-0.013379603624343872,
-0.0877419263124466,
0.005670997779816389,
0.04848676919937134,
0.007734596263617277,
-0.031063135713338852,
0.03328787162899971,
0.016841460019350052,
-0.02806909941136837,
-0.00980859063565731,
0.030231459066271782,
-0.022101817652583122,
0.05950649082660675,
-0.06482922285795212,
0.026904750615358353,
-0.02077113278210163,
-0.006227181758731604,
-0.06998562067747116,
0.027486925944685936,
-0.07896773517131805,
0.015115729533135891,
-0.022372111678123474,
0.01698700338602066,
-0.10454180091619492,
-0.011986545287072659,
-0.02455526404082775,
0.06304112076759338,
-0.0074331131763756275,
-0.01832808181643486,
0.056304533034563065,
-0.02470080740749836,
-0.04156306013464928,
0.063872791826725,
-0.02742454968392849,
0.007297965697944164,
0.01924292743206024,
-0.007838555611670017,
0.037654176354408264,
-0.012911785393953323,
0.01588503085076809,
-0.04183335229754448,
0.008431125432252884,
-0.030522545799613,
-0.02087509259581566,
-0.00006927934737177566,
-0.0050160521641373634,
0.008717014454305172,
0.03125026449561119,
-0.006975690834224224,
-0.06591040641069412,
0.03181164711713791,
0.00457162456586957,
-0.055888693779706955,
-0.06299953162670135,
0.04096009209752083,
-0.034181926399469376,
-0.05701145902276039,
0.017787491902709007,
0.03682250156998634,
0.02432655356824398,
0.0010207536397501826,
-0.04611648991703987,
0.012080108746886253,
-0.020802320912480354,
-0.03503439575433731,
0.047114502638578415,
0.049235280603170395,
-0.006351933348923922,
-0.023286957293748856,
-0.020428067073225975,
-0.03152056038379669,
-0.019825100898742676,
0.044203635305166245,
0.0367601253092289,
-0.0007010777480900288,
0.05563919246196747,
-0.03037700243294239,
-0.013202873058617115,
-0.05281149223446846,
-0.04769667610526085,
0.052977826446294785,
-0.005112214479595423,
0.011071700602769852,
0.004371502436697483,
0.05497385188937187,
0.06258369237184525,
-0.09206664562225342,
0.05322732776403427,
0.026717623695731163,
0.021353308111429214,
-0.03680170699954033,
0.03551260754466057,
0.01565632037818432,
-0.02727900631725788,
0.041667018085718155,
-0.03120868094265461,
0.03715516999363899,
-0.01836966536939144,
-0.04270661622285843,
-0.03628190979361534,
-0.06894602626562119,
-0.010234825313091278,
0.07006879150867462,
-0.007329153828322887,
0.007334351539611816,
0.03597003221511841,
0.004808132536709309,
-0.025698820129036903,
-0.007251183968037367,
-0.028152266517281532,
-0.023162204772233963,
-0.019866684451699257,
-0.037508632987737656,
0.0037321506533771753,
0.03646903857588768,
0.030584922060370445,
-0.05476593226194382,
0.013202873058617115,
-0.014679099433124065,
0.005645007826387882,
-0.03351658210158348,
-0.06599356979131699,
0.0025652037002146244,
0.029191862791776657,
-0.03719675540924072,
-0.018733525648713112,
0.007531874813139439,
-0.04407888278365135,
-0.045409563928842545,
-0.04832043498754501,
-0.004394893068820238,
0.002874483587220311,
0.007401925511658192,
-0.019149363040924072,
-0.01488701906055212,
0.010447942651808262,
0.011352390982210636,
0.01611374132335186,
0.00913805142045021,
0.049193695187568665,
-0.008249196223914623,
-0.028505729511380196,
-0.019336489960551262,
0.015469192527234554,
0.050066955387592316,
0.023182997480034828,
-0.02077113278210163,
0.05875798314809799,
0.05231248587369919,
0.0008310272824019194,
0.031000761315226555,
0.0456174835562706,
0.00833236426115036,
0.021914688870310783,
-0.07705487310886383,
0.03597003221511841,
0.012121692299842834,
0.0011500533437356353,
0.05534810572862625,
0.017184525728225708,
0.009205625392496586,
-0.0004194121283944696,
0.04164622724056244,
-0.010635069571435452,
0.015469192527234554,
-0.019357282668352127,
0.006502674892544746,
-0.03185322880744934,
0.015947407111525536,
-0.015386024489998817,
-0.0006991284899413586,
0.04345512390136719,
0.019585993140935898,
-0.041251178830862045,
0.03545023128390312,
-0.02428496815264225,
0.050524380058050156,
0.0016165721463039517,
-0.014783059246838093,
0.016425620764493942,
-0.0343482606112957,
-0.03143738955259323,
-0.020656777545809746,
0.005062833894044161,
-0.05767679959535599,
-0.008155632764101028,
0.01920134387910366,
0.033724501729011536,
0.027778012678027153,
0.031125511974096298,
0.0382363498210907,
0.008529887534677982,
-0.03967099264264107,
-0.010021707974374294,
-0.024222593754529953,
0.03268490731716156,
0.029420575127005577,
-0.0006331790937110782,
0.004576822742819786,
-0.00158408482093364,
-0.04202048107981682,
-0.03374529629945755,
0.03738388046622276,
0.03809080645442009,
0.03511756286025047,
0.020563215017318726,
0.05035804212093353,
-0.009496712125837803,
-0.03711358830332756,
0.006045252550393343,
-0.08491422235965729,
0.019336489960551262,
0.03355816751718521,
0.014803851023316383,
-0.019097384065389633,
0.005800947081297636,
0.027175046503543854,
-0.015292461030185223,
0.03559577465057373,
-0.040918510407209396,
-0.005348722916096449,
0.008363552391529083,
-0.03476409986615181,
-0.00029823416844010353,
-0.0046859802678227425,
-0.030896801501512527,
0.04657391458749771,
-0.028277019038796425,
-0.05979757755994797,
0.04952636733651161,
0.030127499252557755,
-0.0027003514114767313,
0.00349044450558722,
0.013649899512529373,
0.01027640886604786,
-0.012277632020413876,
-0.01879590004682541,
-0.04120959714055061,
-0.0150949377566576,
-0.012225652113556862,
-0.011830605566501617,
-0.08699341863393784,
0.0756826102733612,
-0.021873105317354202,
0.027403756976127625,
-0.00033218349562957883,
0.010011312551796436,
0.04644916206598282,
-0.004142791032791138,
0.06362329423427582,
-0.013857818208634853,
0.05963124334812164,
-0.03692645952105522,
-0.03374529629945755,
-0.03804922476410866,
-0.03813239187002182,
0.0003005082835443318,
-0.0461580753326416,
0.02806909941136837,
-0.0002696452720556408,
-0.0032877232879400253,
0.03162451833486557,
-0.06087875738739967,
-0.06449655443429947,
0.04686500132083893,
-0.021457267925143242,
-0.012942973524332047,
0.004800335969775915,
0.006736584007740021,
-0.0017322272760793567,
-0.006351933348923922,
0.044577889144420624,
-0.002760128118097782,
0.01921173930168152,
-0.03135422244668007,
-0.02488793432712555,
0.012828618288040161,
-0.0045794215984642506,
-0.008025683462619781,
-0.01934688724577427,
-0.027778012678027153,
0.018109766766428947,
0.07085888087749481,
-0.02364041842520237,
0.04611648991703987,
0.010146459564566612,
-0.04769667610526085,
-0.06191835552453995,
-0.0456174835562706,
-0.04807092994451523,
0.030252251774072647,
-0.028131475672125816,
-0.07614003121852875,
0.008098455145955086,
-0.03846506029367447,
-0.04135514050722122,
0.02576119638979435,
0.024160217493772507,
-0.030210668221116066,
-0.08071425557136536,
-0.029441365972161293,
0.003999846521764994,
-0.034930434077978134,
-0.030127499252557755,
0.03370371088385582,
-0.026738416403532028,
-0.011882585473358631,
-0.04723925516009331,
0.049692701548337936,
0.02137409895658493,
0.05576394498348236,
0.020209752023220062,
0.008477907627820969,
-0.045409563928842545,
-0.028360186144709587,
-0.0057177795097231865,
0.04565906897187233,
0.08029841631650925,
-0.05825897678732872,
-0.0556807778775692,
-0.002856290666386485,
0.0037659374065697193,
0.07805288583040237,
0.0012618099572136998,
-0.00601406442001462,
0.0005565088940784335,
-0.020604798570275307,
0.05077388137578964,
0.018671149387955666,
0.026676040142774582,
0.06503714621067047,
-0.05027487501502037,
0.0064818826504051685,
0.021228555589914322,
0.05992233008146286,
-0.03468093276023865,
0.04694816842675209,
-0.03873535618185997,
0.011269223876297474,
-0.026759207248687744,
-0.0027471331413835287,
-0.005047239828854799,
-0.023578044027090073,
0.0456174835562706,
-0.0025600057560950518,
0.019596390426158905,
-0.026343369856476784,
-0.05613819882273674,
0.010042499750852585,
-0.0633322075009346,
0.002107781358063221,
0.02178993821144104,
-0.008607856929302216,
-0.013816234655678272,
0.024222593754529953,
0.024534471333026886,
-0.03526310622692108,
-0.049609534442424774,
-0.04362145811319351,
-0.028380978852510452,
-0.0076202405616641045,
0.04690658301115036,
-0.04499372839927673,
0.009293991141021252,
-0.06062925606966019,
0.021394891664385796,
0.02613545022904873,
0.0007641032570973039,
0.02156122587621212,
-0.038340311497449875,
-0.007817763835191727,
0.045866988599300385,
-0.04873627424240112,
-0.015313252806663513,
-0.029794828966259956,
0.015957802534103394,
-0.06237577646970749,
-0.0023741780314594507,
-0.011248432099819183,
0.0230790376663208,
-0.0028978746850043535,
-0.0021779541857540607,
0.02123895101249218,
0.05044121295213699,
0.009689037688076496,
0.030085915699601173,
0.006549456622451544,
0.056761957705020905,
0.08162909746170044,
0.02455526404082775,
0.04894419386982918,
0.012516738846898079,
-0.004465065896511078,
-0.0026561685372143984,
-0.015625132247805595,
0.02640574611723423,
0.02700871042907238,
-0.07310441136360168,
0.01142516266554594,
-0.019086986780166626,
-0.0668252483010292,
-0.05771838501095772,
0.11676745116710663,
-0.023661211133003235,
0.02349487505853176,
-0.03457697108387947,
-0.030397795140743256,
-0.006918513216078281,
-0.03102155216038227,
-0.026904750615358353,
-0.007136828266084194,
-0.07614003121852875,
0.038527436554431915,
0.001298195798881352,
-0.003578810254111886,
0.020324107259511948,
-0.0012540130410343409,
-0.029254239052534103,
-0.03149976581335068,
0.011789022013545036,
0.03172848001122475,
0.01657116413116455,
-0.02330774813890457,
0.020760737359523773,
0.10054975003004074,
-0.013556335121393204,
-0.00014456885401159525,
0.0658688172698021,
0.028651272878050804,
0.003085001837462187,
0.019502826035022736,
-0.019097384065389633,
0.02825622633099556,
0.013629106804728508,
0.035616569221019745,
0.04653232917189598,
-0.0037893285043537617,
0.01740284077823162,
0.014918206259608269,
0.03355816751718521,
0.02436813712120056,
0.07156580686569214,
-0.006403913255780935,
0.01713254675269127,
-0.033807672560214996,
-0.019492430612444878,
0.006866533309221268,
0.004667787346988916,
0.006694999989122152,
-0.04765509441494942,
-0.0544748455286026,
-0.033724501729011536,
-0.016820667311549187,
0.044120464473962784,
0.021394891664385796,
-0.042997702956199646,
-0.023806754499673843,
0.01708056591451168,
0.09239931404590607,
-0.014897414483129978,
0.037737343460321426,
-0.05364316701889038,
-0.07954990863800049,
0.028692856431007385,
0.0010292002698406577,
-0.03842347860336304,
-0.02197706513106823,
0.027216630056500435,
0.01796422339975834,
-0.01573948748409748,
0.00521617429330945,
0.020240940153598785,
-0.006643020082265139,
-0.0015970797976478934,
0.006575446575880051,
-0.016311265528202057,
-0.003906283061951399,
0.05368475243449211,
-0.025594860315322876,
0.004826325923204422,
-0.031874023377895355,
-0.022746365517377853,
-0.08932211250066757,
-0.014980582520365715,
-0.023390915244817734,
0.05114813521504402,
0.014741474762558937,
0.014491971582174301,
0.004478061106055975,
0.03937990590929985,
-0.019128572195768356,
-0.018629565834999084,
0.008758598938584328,
0.043330371379852295,
-0.03827793523669243,
0.05867481231689453,
0.03420271724462509,
0.02908790297806263,
-0.07268857210874557,
0.0646628886461258,
0.049609534442424774,
-0.0021389692556113005,
0.07256381958723068,
0.014970186166465282,
-0.05792630463838577,
0.019398866221308708,
0.008405135944485664,
-0.03634428605437279,
0.030065124854445457,
0.038756150752305984,
-0.018203331157565117,
0.022642407566308975,
-0.033163122832775116,
-0.03280965983867645,
0.025553276762366295,
0.00032097534858621657,
-0.03965020179748535,
-0.029482949525117874,
-0.035387858748435974,
0.021311722695827484,
0.044619470834732056,
0.0503164604306221,
-0.057593632489442825,
0.04044029489159584
] |
52,367 |
zipfile
|
read
|
Return file bytes for name.
|
def read(self, name, pwd=None):
"""Return file bytes for name."""
with self.open(name, "r", pwd) as fp:
return fp.read()
|
(self, name, pwd=None)
|
[
0.039045896381139755,
-0.05868925154209137,
-0.005491366609930992,
0.07134906202554703,
-0.0034380170982331038,
-0.02478640340268612,
-0.015024930238723755,
0.019901366904377937,
0.0781605988740921,
-0.04128200560808182,
0.05263455584645271,
0.02910381369292736,
-0.027366530150175095,
0.046407852321863174,
0.01573016494512558,
0.03266438841819763,
0.013519857078790665,
0.057898011058568954,
-0.03543372079730034,
0.05125848948955536,
-0.02648928575217724,
0.022447090595960617,
0.051499299705028534,
-0.03507250174880028,
-0.041798029094934464,
0.054217033088207245,
-0.0018566151848062873,
-0.04737110063433647,
-0.02544003538787365,
-0.014526105485856533,
-0.004136800765991211,
-0.025457236915826797,
0.031030306592583656,
0.021208630874753,
-0.005912787280976772,
0.010819325223565102,
-0.003025196958333254,
0.005194652359932661,
-0.0536666065454483,
-0.04599503427743912,
-0.004115299787372351,
0.007138346787542105,
0.04362132027745247,
-0.008738024160265923,
-0.02337593585252762,
-0.008256400935351849,
-0.007314655464142561,
-0.06794329732656479,
-0.004721629433333874,
0.039149101823568344,
0.05005443096160889,
0.05407942831516266,
-0.046407852321863174,
-0.020933417603373528,
0.04155721887946129,
-0.027297725901007652,
-0.0357777364552021,
-0.0002808573772199452,
-0.033662036061286926,
0.05198092386126518,
-0.017218036577105522,
-0.05586831271648407,
0.06553518027067184,
-0.03846106678247452,
-0.021225830540060997,
0.048575159162282944,
0.006893234793096781,
-0.06457193940877914,
0.0028488882817327976,
0.02619687281548977,
0.025594843551516533,
0.04038756340742111,
-0.03966512531042099,
0.006648122798651457,
0.015351745299994946,
0.040731579065322876,
-0.005598871968686581,
0.005379561334848404,
0.0013706915779039264,
0.011361151933670044,
-0.020864613354206085,
-0.018353290855884552,
0.006609421223402023,
0.023031918331980705,
-0.012367400340735912,
0.010673118755221367,
0.04066277667880058,
-0.04503178596496582,
0.01752765104174614,
0.014311094768345356,
0.041970036923885345,
0.018336091190576553,
-0.03374803811311722,
0.04389653354883194,
0.026437684893608093,
-0.09467339515686035,
0.00557737099006772,
0.08517853915691376,
-0.022378286346793175,
0.05469865724444389,
-0.09646228700876236,
0.06646402925252914,
0.015773165971040726,
-0.0057278783060610294,
-0.02127743326127529,
-0.028880203142762184,
0.019471345469355583,
-0.0027155817952007055,
0.025870056822896004,
-0.038392264395952225,
-0.05659074708819389,
-0.029705842956900597,
-0.011928779073059559,
0.021225830540060997,
-0.024648796766996384,
0.016985824331641197,
-0.008505812846124172,
0.0049366396851837635,
-0.023014718666672707,
-0.01912732981145382,
0.06773688644170761,
0.051877718418836594,
-0.013055434450507164,
-0.0032445075921714306,
0.04031875729560852,
0.07293154299259186,
-0.04644225537776947,
-0.04252046346664429,
0.022447090595960617,
0.009434658102691174,
0.05941168591380119,
0.02318672649562359,
0.02432198077440262,
-0.021311834454536438,
0.03238917142152786,
0.05545549467206001,
0.0320451557636261,
0.03061748668551445,
0.012548009864985943,
0.03873628005385399,
0.05672835558652878,
-0.05349459871649742,
0.038289058953523636,
-0.014999128878116608,
-0.012651214376091957,
-0.012255595065653324,
0.044412557035684586,
-0.08999477326869965,
-0.027108516544103622,
0.03529611602425575,
0.007073843386024237,
0.013270444236695766,
-0.03808264806866646,
0.012677015736699104,
0.060615744441747665,
-0.01778566464781761,
0.011412754654884338,
0.0023801655042916536,
-0.09192126244306564,
-0.02516482211649418,
-0.02855338715016842,
0.019815362989902496,
-0.0405251681804657,
-0.05050165206193924,
0.013726267032325268,
-0.004872136749327183,
-0.042623668909072876,
0.0009342203848063946,
0.03911469876766205,
-0.03746341913938522,
-0.04510059207677841,
0.013175839558243752,
-0.0036874290090054274,
0.026145270094275475,
-0.017097629606723785,
-0.0499512255191803,
-0.031597934663295746,
-0.00006000135181238875,
0.029551034793257713,
-0.03240637481212616,
-0.03171833977103233,
-0.026403281837701797,
-0.011386953294277191,
0.04929759353399277,
0.057794805616140366,
0.02373715303838253,
0.004293758422136307,
0.03070349059998989,
0.08421529084444046,
-0.00257797515951097,
-0.09178365767002106,
-0.0068287318572402,
-0.041694823652505875,
-0.0183704923838377,
-0.0010895654559135437,
-0.08277042210102081,
0.017011625692248344,
0.04231405630707741,
-0.02127743326127529,
-0.005680575966835022,
-0.005435463972389698,
0.007168448064476252,
0.00857461616396904,
-0.0026252774987369776,
-0.01497332751750946,
0.02657529152929783,
0.05851724371314049,
0.023513542488217354,
-0.04860956221818924,
0.040456365793943405,
0.0038916890043765306,
-0.033025603741407394,
-0.006824431475251913,
0.038289058953523636,
0.04166042432188988,
-0.007951086387038231,
-0.046201445162296295,
-0.01497332751750946,
0.02967144176363945,
0.0820135846734047,
0.01115474198013544,
0.0875866562128067,
-0.034694086760282516,
-0.00428730808198452,
-0.00017926495638675988,
-0.02298031561076641,
-0.010217295959591866,
-0.010707519948482513,
-0.023100722581148148,
-0.010406505316495895,
0.00999368540942669,
-0.08277042210102081,
0.047990329563617706,
-0.023616747930645943,
0.01493892539292574,
0.02514762058854103,
-0.025698048993945122,
-0.03643136844038963,
-0.015282941982150078,
-0.007314655464142561,
0.00042437686352059245,
0.005349460057914257,
0.002126453211531043,
0.09715031832456589,
0.003992743790149689,
-0.08724264055490494,
0.025594843551516533,
0.05566190183162689,
-0.013012432493269444,
-0.031150713562965393,
0.06457193940877914,
-0.0017727611120790243,
-0.03350722789764404,
-0.025027215480804443,
0.02014217898249626,
0.010896729305386543,
-0.006553518120199442,
-0.06605120748281479,
0.013820871710777283,
0.027469733729958534,
0.02740093134343624,
-0.01656440459191799,
-0.00319290510378778,
-0.05294417217373848,
-0.005061345640569925,
-0.027349328622221947,
-0.022292282432317734,
-0.041694823652505875,
-0.007800579071044922,
-0.03997474163770676,
-0.04066277667880058,
0.049125585705041885,
-0.00723295146599412,
-0.02138063870370388,
-0.030307872220873833,
-0.0819447785615921,
0.04286448284983635,
0.055145878344774246,
0.012548009864985943,
-0.007650071755051613,
-0.04080038145184517,
0.035364918410778046,
-0.0016104282112792134,
0.03526171296834946,
-0.028398578986525536,
-0.04097238928079605,
-0.020847411826252937,
-0.05493946745991707,
-0.05690036341547966,
0.007327556144446135,
0.03280199319124222,
-0.0014975477242842317,
-0.021208630874753,
-0.08648580312728882,
0.033971648663282394,
-0.03533051535487175,
-0.06247343495488167,
-0.038392264395952225,
0.033971648663282394,
-0.012840423732995987,
-0.0499512255191803,
0.018490897491574287,
-0.018972521647810936,
0.037738632410764694,
-0.04926319420337677,
-0.04434375464916229,
-0.004510919097810984,
-0.07121145725250244,
-0.04406854137778282,
0.029602637514472008,
0.002371565205976367,
-0.014827120117843151,
0.01564415916800499,
0.033025603741407394,
0.006067594513297081,
-0.01573016494512558,
0.04757751151919365,
0.05019203945994377,
0.05662515014410019,
0.005504267290234566,
-0.019144529476761818,
0.007757576648145914,
0.004433515481650829,
-0.05621233209967613,
0.06371189653873444,
0.0423828586935997,
0.011472957208752632,
0.042073242366313934,
0.01904132403433323,
0.07272513210773468,
-0.04289888218045235,
0.021449441090226173,
0.020124977454543114,
-0.0009519587620161474,
-0.04000914469361305,
0.01622038707137108,
0.002476920373737812,
-0.030204666778445244,
-0.011662166565656662,
-0.03756662458181381,
0.06680804491043091,
-0.06677364557981491,
-0.003693879349157214,
-0.03213116154074669,
-0.006239603273570538,
0.04427495226264,
0.05868925154209137,
-0.00956366490572691,
0.033662036061286926,
0.015755964443087578,
0.01234159991145134,
-0.04227965325117111,
-0.02298031561076641,
-0.0348660945892334,
-0.030548684298992157,
0.051877718418836594,
-0.007211450487375259,
0.03429846465587616,
0.00008083049033302814,
0.008858430199325085,
-0.01988416537642479,
-0.002018948085606098,
-0.015472151339054108,
-0.02609366737306118,
-0.03729141131043434,
-0.03307720646262169,
-0.026988111436367035,
0.04547901079058647,
-0.011335350573062897,
0.05208412930369377,
-0.04757751151919365,
-0.00006161392957437783,
-0.0282437726855278,
-0.02413277141749859,
-0.02146664261817932,
-0.0593428835272789,
-0.00770167401060462,
-0.054217033088207245,
-0.00047409802209585905,
0.04448135942220688,
-0.02081301063299179,
0.026540888473391533,
0.017200835049152374,
0.03512410447001457,
-0.004080898128449917,
-0.05538668856024742,
-0.0678400918841362,
-0.010157093405723572,
0.03080669604241848,
-0.02573245018720627,
0.03185594826936722,
0.047130290418863297,
0.03656897693872452,
0.011834174394607544,
-0.04420614615082741,
-0.008239200338721275,
0.02064100280404091,
0.000658469507470727,
-0.045547813177108765,
0.022653499618172646,
-0.020503396168351173,
0.049779217690229416,
-0.035468123853206635,
0.02855338715016842,
-0.036018550395965576,
0.018353290855884552,
0.024700399488210678,
0.01262541301548481,
-0.025405634194612503,
-0.02514762058854103,
-0.020709805190563202,
0.01769965887069702,
0.020296985283493996,
-0.013029633089900017,
0.04788712412118912,
-0.00020681317255366594,
0.021501043811440468,
-0.07740376144647598,
0.05304737761616707,
0.01564415916800499,
-0.026265675202012062,
-0.006790029816329479,
0.009529262781143188,
0.010320501402020454,
0.024562792852520943,
0.010595714673399925,
-0.005568770691752434,
0.02590445801615715,
-0.019454145804047585,
0.02165585197508335,
-0.00819189753383398,
0.014887322671711445,
-0.018301688134670258,
0.008200498297810555,
0.041488416492938995,
-0.012117988429963589,
-0.031993553042411804,
-0.03422966226935387,
-0.02373715303838253,
0.0010643017012625933,
0.0056375740095973015,
0.02344473823904991,
0.039424315094947815,
-0.005977290216833353,
-0.006110596936196089,
-0.030978703871369362,
-0.027727747336030006,
0.019368140026926994,
0.009666869416832924,
-0.06278304755687714,
-0.005990190897136927,
-0.0008783176890574396,
0.030462680384516716,
-0.07093624770641327,
-0.03522730991244316,
0.025113219395279884,
0.028518985956907272,
-0.011386953294277191,
-0.0018372642807662487,
-0.006011691875755787,
-0.011670767329633236,
0.020038973540067673,
0.051189687103033066,
-0.09976484626531601,
0.037910640239715576,
-0.05294417217373848,
-0.036396969109773636,
0.03787624090909958,
0.03324921429157257,
-0.039149101823568344,
0.05032964423298836,
0.00685453275218606,
-0.04076597839593887,
-0.00875522568821907,
0.026317277923226357,
-0.0015222739893943071,
-0.015248540788888931,
0.052600156515836716,
-0.004829134792089462,
-0.01725243777036667,
-0.037910640239715576,
-0.07196829468011856,
-0.01573016494512558,
0.03901149332523346,
-0.02759014070034027,
-0.06436552852392197,
0.00020641002629417926,
-0.0017931871116161346,
0.016461199149489403,
-0.03465968370437622,
0.026626892387866974,
0.09240289032459259,
-0.023117922246456146,
0.01818128302693367,
-0.019144529476761818,
0.04981362074613571,
0.00574937928467989,
0.008424108847975731,
-0.02893180586397648,
-0.012298597022891045,
-0.04203884303569794,
-0.027727747336030006,
0.01864570565521717,
0.011868576519191265,
-0.044240549206733704,
0.04131640866398811,
-0.030651889741420746,
-0.04823114350438118,
0.06522557139396667,
0.009245448745787144,
0.018336091190576553,
0.030359474942088127,
-0.009219647385179996,
0.023049119859933853,
0.010397905483841896,
0.006605120841413736,
-0.020279785618185997,
0.046579863876104355,
-0.046407852321863174,
0.0034014652483165264,
-0.000619230093434453,
-0.021346237510442734,
-0.035674531012773514,
-0.016168786212801933,
-0.011601963080465794,
-0.028002960607409477,
-0.007650071755051613,
0.002947793109342456,
-0.014371298253536224,
0.06178539991378784,
0.007039441727101803,
-0.029895052313804626,
0.021225830540060997,
-0.03729141131043434,
0.02617967128753662,
-0.005620372947305441,
-0.04265807196497917,
0.033386822789907455,
-0.08249520510435104,
0.018989723175764084,
0.04396533593535423,
-0.022361086681485176,
0.04341490939259529,
-0.046132639050483704,
-0.03722260892391205,
0.02394356206059456,
-0.04117880016565323,
-0.04788712412118912,
0.11552081257104874,
-0.023891961202025414,
0.031030306592583656,
-0.0659136027097702,
-0.048024732619524,
-0.03213116154074669,
0.08428409695625305,
0.008200498297810555,
-0.024046767503023148,
-0.022017069160938263,
-0.050536055117845535,
-0.03004986047744751,
0.021260231733322144,
0.03997474163770676,
-0.020365789532661438,
0.019282136112451553,
-0.00880252756178379,
0.008037090301513672,
0.012642613612115383,
0.00386158749461174,
0.0423828586935997,
-0.047061484307050705,
0.05115528404712677,
0.060890957713127136,
0.07513324916362762,
0.02647208608686924,
0.054217033088207245,
0.033765241503715515,
0.05576510727405548,
0.040077947080135345,
0.01455190684646368,
-0.0007987638236954808,
0.06020292267203331,
-0.07692213356494904,
-0.02382315695285797,
0.02365114912390709,
-0.048747166991233826,
-0.004605523776262999,
-0.00342511641792953,
-0.002080226084217429,
0.005947188939899206,
-0.005259155295789242,
0.0036186256911605597,
-0.07000739872455597,
0.03187314793467522,
-0.009383055381476879,
0.027830950915813446,
0.021621450781822205,
-0.04152281582355499,
-0.010432306677103043,
-0.017820065841078758,
-0.0037863338366150856,
-0.0009584090439602733,
-0.025199223309755325,
-0.0040937988087534904,
0.0395963229238987,
-0.0287253949791193,
0.05339139327406883,
-0.03557132929563522,
-0.00009225292160408571,
-0.031030306592583656,
0.09543023258447647,
0.016426797956228256,
-0.03144312649965286,
0.006579319480806589,
0.018611304461956024,
0.018714509904384613,
0.08015589416027069,
-0.021260231733322144,
-0.06429672241210938,
-0.025870056822896004,
0.05576510727405548,
-0.007387758698314428,
0.008032790385186672,
-0.018232885748147964,
0.039045896381139755,
-0.041488416492938995,
-0.002047974383458495,
0.0077188750728964806,
0.04303649067878723,
-0.03459088131785393,
0.014947526156902313,
-0.010518310591578484,
0.007379158399999142,
0.03718820586800575,
0.028622189536690712,
0.015463551506400108,
-0.03249237686395645,
0.0055730706080794334,
-0.018800513818860054,
-0.03314600884914398,
0.034350067377090454,
0.028518985956907272,
-0.018387693911790848,
-0.011361151933670044,
-0.04455016553401947,
-0.06381510198116302,
-0.010819325223565102,
0.029447831213474274,
-0.0002109789929818362,
0.014302494935691357,
-0.04227965325117111,
-0.02693650871515274,
0.009408856742084026,
0.05672835558652878,
0.03987153619527817,
0.03832346200942993,
-0.03997474163770676,
0.09969604015350342,
0.0013975679175928235,
-0.003693879349157214,
0.005108647979795933,
-0.007602769415825605,
-0.030841097235679626,
-0.012599611654877663,
-0.010483909398317337,
-0.020761407911777496,
0.003532621543854475,
-0.06364309042692184,
0.027744947001338005,
0.024098370224237442,
-0.026145270094275475,
-0.005388161633163691,
0.09199006855487823,
0.02449399046599865,
-0.07795418798923492,
-0.01054411195218563,
-0.0008277901797555387,
0.06278304755687714,
-0.04166042432188988,
0.09377895295619965,
0.029602637514472008,
-0.0006702950340695679,
0.025938859209418297,
0.035106904804706573,
0.01261681318283081,
0.03361043334007263,
0.07582128047943115,
-0.0026080766692757607,
0.02064100280404091,
0.031615134328603745,
-0.022842708975076675,
-0.06281745433807373,
0.015420548617839813,
0.014311094768345356,
0.009813076816499233,
-0.04774951934814453,
0.038770683109760284,
0.022292282432317734,
-0.005014043767005205,
0.011945980601012707,
0.05576510727405548,
0.009090641513466835,
-0.024339182302355766,
0.07430760562419891,
-0.050260841846466064,
0.00786508247256279,
-0.06292065978050232,
-0.05579951032996178,
0.0042400057427585125,
-0.04393093287944794,
0.003098300425335765,
-0.026902107521891594,
-0.010974133387207985,
0.02299751713871956,
-0.009133643470704556,
0.04269247502088547,
0.011326749809086323,
-0.07244992256164551,
0.03787624090909958,
0.006377209909260273,
0.011524559929966927,
-0.01714923232793808,
0.027005311101675034,
0.021363437175750732,
0.0077489763498306274,
-0.03428126499056816,
0.015325944870710373,
-0.06563838571310043,
-0.02693650871515274,
-0.00723295146599412,
0.05229054018855095,
-0.0015297993086278439,
-0.03949311748147011,
0.010397905483841896,
0.012935028411448002,
-0.052875369787216187,
0.0038379363249987364,
0.025010013952851295,
-0.009856078773736954,
0.005732178222388029,
0.02344473823904991,
-0.011042936705052853,
0.07417000085115433,
-0.0376698300242424,
0.04172922670841217,
0.00026164084556512535,
-0.04131640866398811,
0.0593428835272789,
0.021449441090226173,
0.011902977712452412,
0.036775387823581696,
0.030978703871369362,
-0.012246995232999325,
0.0032337571028620005,
0.07196829468011856,
-0.0376698300242424,
-0.007447961717844009,
-0.024442387744784355,
-0.03350722789764404,
0.003388564568012953,
0.021982667967677116,
-0.003943291492760181,
0.025491638109087944,
-0.039424315094947815,
0.04537580534815788,
-0.02693650871515274,
0.002878989791497588,
-0.027108516544103622,
0.02485520765185356
] |
52,370 |
zipfile
|
write
|
Put the bytes from filename into the archive under the name
arcname.
|
def write(self, filename, arcname=None,
compress_type=None, compresslevel=None):
"""Put the bytes from filename into the archive under the name
arcname."""
if not self.fp:
raise ValueError(
"Attempt to write to ZIP archive that was already closed")
if self._writing:
raise ValueError(
"Can't write to ZIP archive while an open writing handle exists"
)
zinfo = ZipInfo.from_file(filename, arcname,
strict_timestamps=self._strict_timestamps)
if zinfo.is_dir():
zinfo.compress_size = 0
zinfo.CRC = 0
else:
if compress_type is not None:
zinfo.compress_type = compress_type
else:
zinfo.compress_type = self.compression
if compresslevel is not None:
zinfo._compresslevel = compresslevel
else:
zinfo._compresslevel = self.compresslevel
if zinfo.is_dir():
with self._lock:
if self._seekable:
self.fp.seek(self.start_dir)
zinfo.header_offset = self.fp.tell() # Start of header bytes
if zinfo.compress_type == ZIP_LZMA:
# Compressed data includes an end-of-stream (EOS) marker
zinfo.flag_bits |= 0x02
self._writecheck(zinfo)
self._didModify = True
self.filelist.append(zinfo)
self.NameToInfo[zinfo.filename] = zinfo
self.fp.write(zinfo.FileHeader(False))
self.start_dir = self.fp.tell()
else:
with open(filename, "rb") as src, self.open(zinfo, 'w') as dest:
shutil.copyfileobj(src, dest, 1024*8)
|
(self, filename, arcname=None, compress_type=None, compresslevel=None)
|
[
-0.014752841554582119,
0.022114597260951996,
-0.041374437510967255,
0.043368857353925705,
0.07543599605560303,
-0.0577208586037159,
-0.042273879051208496,
0.027413496747612953,
-0.022329680621623993,
-0.026103436946868896,
0.00012869935017079115,
0.009864557534456253,
0.019582465291023254,
-0.013452557846903801,
0.012905069626867771,
-0.0009153311839327216,
0.014674628153443336,
0.03795263543725014,
-0.016688602045178413,
0.09432432800531387,
-0.0003363750292919576,
-0.027726346626877785,
-0.0011456916108727455,
0.0034731258638203144,
0.017676034942269325,
0.019132742658257484,
-0.0060663605108857155,
0.02446097321808338,
0.006041918881237507,
-0.005064262077212334,
-0.042156562209129333,
-0.014860383234918118,
0.014791947789490223,
0.01545675378292799,
0.0067262789234519005,
0.01223048660904169,
-0.005978371482342482,
0.014655075035989285,
0.04258672893047333,
0.007107564713805914,
0.08016785979270935,
0.02227102220058441,
0.0017218980938196182,
-0.025673268362879753,
0.02493024803698063,
0.016219327226281166,
-0.011057298630475998,
-0.008955336175858974,
0.04927390441298485,
-0.010939979925751686,
-0.00800212100148201,
0.03945823013782501,
0.023150913417339325,
-0.04997781664133072,
0.045245956629514694,
0.03715095669031143,
0.05455324798822403,
0.02582969330251217,
-0.012171827256679535,
0.008662039414048195,
0.020061517134308815,
-0.011810094118118286,
0.021488895639777184,
-0.062648244202137,
-0.07168179750442505,
0.030933061614632607,
-0.02903640642762184,
-0.05263704061508179,
-0.03288837522268295,
0.04837445914745331,
0.08282708376646042,
-0.016053125262260437,
0.009908551350235939,
0.0049347225576639175,
0.01014807727187872,
0.07531867921352386,
-0.030561551451683044,
-0.017734695225954056,
0.03312301263213158,
-0.027609027922153473,
-0.02622075565159321,
-0.060575615614652634,
-0.01886877603828907,
-0.0011334707960486412,
0.007518180646002293,
0.013921832665801048,
0.03865655139088631,
-0.019308721646666527,
-0.025223545730113983,
0.013931609690189362,
-0.01458663959056139,
0.0181648638099432,
0.007537733763456345,
-0.01735340803861618,
-0.015613178722560406,
-0.030874401330947876,
-0.011223499663174152,
-0.020335260778665543,
0.008833128958940506,
0.07958126068115234,
-0.06311752647161484,
-0.07438012957572937,
0.04282136633992195,
-0.05068172886967659,
-0.02756992168724537,
-0.06245271489024162,
0.01715787686407566,
0.02344420924782753,
-0.05854208767414093,
-0.02195817232131958,
0.025868799537420273,
-0.0825924500823021,
0.011546126566827297,
-0.042664941400289536,
-0.020980514585971832,
0.012680208310484886,
0.01897631771862507,
0.004582766443490982,
-0.05396665632724762,
-0.060575615614652634,
0.09549751877784729,
-0.018458159640431404,
0.00682893255725503,
0.037639785557985306,
0.0027154418639838696,
-0.02821517549455166,
-0.0036173302214592695,
0.00013717747060582042,
0.011585232801735401,
0.04501131922006607,
-0.04841356351971626,
0.06487730890512466,
-0.0006806935416534543,
-0.02305314689874649,
0.018575478345155716,
0.011927412822842598,
-0.000019037574020330794,
-0.0293688103556633,
-0.08243601769208908,
0.019367381930351257,
0.03953644260764122,
-0.07449744641780853,
0.010108971036970615,
-0.027609027922153473,
0.005259793717414141,
-0.043564386665821075,
-0.02395259216427803,
-0.03664257749915123,
-0.010265395976603031,
-0.037893977016210556,
0.03279060870409012,
0.02543862909078598,
-0.010372938588261604,
0.019132742658257484,
0.06362590193748474,
-0.07567063719034195,
0.022779403254389763,
0.05338006094098091,
-0.04160907492041588,
0.0035904445685446262,
-0.02841070666909218,
0.06984379887580872,
-0.018458159640431404,
-0.0034389079082757235,
-0.014303118921816349,
-0.04282136633992195,
0.00555309047922492,
0.008290529251098633,
0.011898083612322807,
0.00824164692312479,
0.013325462117791176,
0.0022620533127337694,
-0.030287807807326317,
0.04192192479968071,
-0.016600612550973892,
0.0012202379293739796,
-0.008358965627849102,
0.013384121470153332,
0.03805040195584297,
-0.032301779836416245,
0.026885561645030975,
-0.046145401895046234,
-0.06612870842218399,
0.053732018917798996,
0.06065382808446884,
-0.034941453486680984,
-0.028000090271234512,
0.03380737081170082,
0.0313241221010685,
0.01107685174793005,
-0.03767889365553856,
-0.010636906139552593,
-0.02080453746020794,
-0.03779621049761772,
-0.0035415617749094963,
-0.01909363642334938,
0.007474186364561319,
-0.03296658769249916,
0.036231961101293564,
0.024617398157715797,
-0.04946943372488022,
0.01639530435204506,
0.015681615099310875,
-0.013159260153770447,
0.029349256306886673,
0.019690008834004402,
0.045245956629514694,
-0.011692775413393974,
-0.039966609328985214,
-0.005298899952322245,
0.06788849085569382,
0.020882749930024147,
0.012318476103246212,
0.01262154895812273,
-0.0008389517315663397,
-0.046536464244127274,
-0.0866594985127449,
-0.002435587579384446,
0.08603379875421524,
0.05916779115796089,
-0.07797790318727493,
0.07254213094711304,
-0.05119011178612709,
0.025595055893063545,
0.01771514117717743,
0.0030918396078050137,
0.059011366218328476,
0.011692775413393974,
-0.011761210858821869,
0.009473494254052639,
-0.0328492671251297,
-0.07617902010679245,
0.024832483381032944,
-0.028039196506142616,
-0.030170489102602005,
-0.05240240320563316,
-0.001313726301304996,
-0.021097833290696144,
-0.0276285819709301,
-0.010128524154424667,
0.027706794440746307,
-0.048648200929164886,
0.006604071706533432,
0.030033616349101067,
-0.012347805313766003,
-0.05107279121875763,
-0.005548202432692051,
0.012064284645020962,
0.0007747930358164012,
0.002301159780472517,
0.028547579422593117,
-0.04567612707614899,
-0.05486609786748886,
0.024069910869002342,
0.02710064686834812,
-0.03894984722137451,
0.015652285888791084,
-0.0676538497209549,
-0.0031065044458955526,
0.0020481909159570932,
-0.06859239935874939,
-0.04012303426861763,
0.06593317538499832,
-0.08337457478046417,
0.037717998027801514,
0.01625843346118927,
0.015818487852811813,
-0.09080476313829422,
-0.026905115693807602,
-0.018076874315738678,
0.06769295781850815,
0.009497935883700848,
-0.04817892611026764,
0.03580179065465927,
-0.00024151177785824984,
-0.007796812802553177,
0.018067097291350365,
-0.026768242940306664,
-0.0029158613178879023,
0.018291959539055824,
0.04090515896677971,
0.05318453162908554,
0.013188590295612812,
-0.017558716237545013,
-0.00927796307951212,
0.011663445271551609,
0.006203232333064079,
0.044268298894166946,
-0.021078281104564667,
-0.006320551037788391,
-0.02403080463409424,
0.04598897695541382,
-0.02555594965815544,
-0.02981853298842907,
0.02776545286178589,
-0.00046438697609119117,
-0.031773846596479416,
-0.04520685225725174,
0.036349281668663025,
-0.03322077915072441,
-0.0707041397690773,
0.023522421717643738,
0.055218055844306946,
-0.007474186364561319,
-0.03709229826927185,
-0.008222093805670738,
-0.00853494368493557,
0.06041919067502022,
-0.05349738150835037,
0.05040798336267471,
0.0488046258687973,
0.019582465291023254,
-0.041178904473781586,
0.009649472311139107,
0.02338555082678795,
0.005641079507768154,
0.045754339545965195,
-0.0013112821616232395,
-0.006604071706533432,
0.037972189486026764,
-0.052910786122083664,
-0.05635213851928711,
-0.08407848328351974,
-0.02403080463409424,
0.05533537641167641,
-0.01023606676608324,
-0.03810906037688255,
0.010441374965012074,
0.023874379694461823,
-0.02575148083269596,
-0.046653781086206436,
0.038988951593637466,
0.005342894233763218,
0.015407871454954147,
-0.03271239623427391,
0.03304480016231537,
0.014000045135617256,
-0.01828218251466751,
0.0448157861828804,
0.03388558328151703,
0.021352024748921394,
0.023326890543103218,
-0.02588835172355175,
0.015847817063331604,
-0.08173210918903351,
-0.02074587717652321,
-0.007870137691497803,
-0.006002812646329403,
-0.015026585198938847,
0.050838153809309006,
-0.05326274409890175,
-0.007107564713805914,
-0.01883944682776928,
-0.016532177105545998,
0.010656459257006645,
-0.03562581539154053,
-0.011037745513021946,
-0.05244151130318642,
0.003429131116718054,
0.0323408879339695,
-0.00487850746139884,
-0.00470986170694232,
-0.0065209707245230675,
-0.010744447819888592,
-0.007708823774009943,
-0.06761474162340164,
0.043759919703006744,
0.043056003749370575,
-0.03228222578763962,
-0.06949184834957123,
0.0301313828676939,
-0.0488046258687973,
-0.0224078930914402,
0.012993059121072292,
-0.006848485674709082,
0.005445548333227634,
0.05944153293967247,
-0.01948470063507557,
-0.01567183807492256,
-0.0418437123298645,
-0.00277654523961246,
0.00638898741453886,
0.01146791409701109,
0.06436892598867416,
0.0028914199210703373,
-0.0012526228092610836,
0.01365786511451006,
0.007826142944395542,
-0.011516797356307507,
0.05150296166539192,
-0.02448052540421486,
0.08079355955123901,
-0.01925983838737011,
-0.03691631928086281,
0.022642532363533974,
0.039692867547273636,
0.016053125262260437,
0.014743064530193806,
-0.05893315002322197,
0.03591911122202873,
-0.0035782239865511656,
-0.051737599074840546,
0.040357671678066254,
0.012250039726495743,
0.027921877801418304,
-0.0007625722791999578,
0.0020323041826486588,
-0.020687218755483627,
0.05275436118245125,
0.0006104244384914637,
0.019269615411758423,
-0.035058774054050446,
0.016160666942596436,
-0.022036384791135788,
0.01693301647901535,
0.0181648638099432,
0.04825713858008385,
-0.09690534323453903,
0.022075491026043892,
-0.052910786122083664,
0.02872355654835701,
0.04332974925637245,
0.008368742652237415,
0.027413496747612953,
-0.00644275825470686,
-0.0741845965385437,
0.0020530791953206062,
-0.007327537517994642,
-0.0746929794549942,
-0.0043114665895700455,
0.058111920952796936,
-0.014645298942923546,
0.010006316937506199,
0.05021245405077934,
0.03695542737841606,
0.03832414746284485,
0.0012807303573936224,
-0.050016921013593674,
-0.013433004729449749,
0.053810231387615204,
0.032673291862010956,
0.008290529251098633,
-0.04767054691910744,
-0.024128569290041924,
-0.08470418304204941,
-0.02035481482744217,
0.05795549601316452,
-0.030815742909908295,
0.033259883522987366,
0.005973482970148325,
0.006173902656883001,
-0.011516797356307507,
-0.010939979925751686,
0.02094140835106373,
-0.03613419458270073,
0.030561551451683044,
0.004800294991582632,
-0.03001406416296959,
-0.041961029171943665,
0.0019724227022379637,
0.026181649416685104,
0.002964744344353676,
0.07277677208185196,
-0.019846433773636818,
-0.006863150745630264,
0.013159260153770447,
-0.04720127210021019,
0.008192763663828373,
0.0053771124221384525,
-0.038089510053396225,
0.02027660235762596,
-0.0009874333627521992,
-0.0229162760078907,
0.0716426894068718,
-0.0026201202999800444,
-0.04160907492041588,
-0.005704627372324467,
0.01642463356256485,
-0.04520685225725174,
0.02698332816362381,
0.013217919506132603,
0.036153748631477356,
-0.018458159640431404,
0.02260342612862587,
0.03296658769249916,
-0.016639718785881996,
0.09002263844013214,
-0.010108971036970615,
0.05697783827781677,
0.022329680621623993,
-0.021840853616595268,
-0.01838972419500351,
0.01696234568953514,
0.02948612906038761,
0.002251054858788848,
0.05455324798822403,
-0.012083837762475014,
-0.02633807435631752,
-0.03625151515007019,
-0.020061517134308815,
-0.014567086473107338,
-0.05725158378481865,
-0.05244151130318642,
-0.024832483381032944,
0.0011346929240971804,
0.03593866527080536,
-0.06472087651491165,
-0.04508953168988228,
0.019201179966330528,
-0.016747260466217995,
-0.031460996717214584,
0.01876123435795307,
-0.037893977016210556,
-0.0023732618428766727,
-0.0031651637982577085,
0.08884944766759872,
-0.042078349739313126,
-0.02858668565750122,
-0.029075512662529945,
-0.02293582819402218,
-0.0004970773588865995,
-0.009932992979884148,
0.02588835172355175,
-0.034022457897663116,
-0.022974934428930283,
0.035586707293987274,
0.0498213917016983,
-0.0058219460770487785,
0.006266780197620392,
0.028879981487989426,
-0.057016946375370026,
-0.04587165638804436,
-0.05420129373669624,
-0.023522421717643738,
0.03580179065465927,
0.03453083708882332,
-0.04039677977561951,
0.02776545286178589,
-0.026553159579634666,
-0.03548894077539444,
0.015681615099310875,
0.004724526312202215,
-0.014635521918535233,
-0.13788871467113495,
-0.017196983098983765,
-0.03200848400592804,
-0.032419100403785706,
-0.06124042347073555,
0.042156562209129333,
-0.00490539288148284,
0.014655075035989285,
-0.023541975766420364,
0.02285761572420597,
0.03765933960676193,
0.08212316781282425,
0.044268298894166946,
-0.012562889605760574,
-0.06174880266189575,
0.01940648816525936,
0.04250851646065712,
0.024558737874031067,
0.07610080391168594,
-0.00380797334946692,
-0.04344706982374191,
-0.012748644687235355,
0.027726346626877785,
0.04978228360414505,
0.002082408871501684,
0.0253799706697464,
-0.00935128703713417,
-0.0019809771329164505,
0.03134367614984512,
-0.008168322965502739,
-0.04508953168988228,
0.057016946375370026,
-0.02524309791624546,
0.038988951593637466,
0.0276285819709301,
0.0358213447034359,
-0.021625768393278122,
-0.004814959596842527,
-0.01278775092214346,
-0.026807349175214767,
-0.031148144975304604,
0.01249445416033268,
0.0060468073934316635,
-0.02002241089940071,
0.01897631771862507,
0.011731881648302078,
0.05150296166539192,
-0.023268232122063637,
-0.03288837522268295,
0.02182129956781864,
-0.06311752647161484,
0.00444345036521554,
-0.05862030014395714,
0.010998639278113842,
-0.05744711309671402,
0.040866054594516754,
0.023483315482735634,
-0.009957434609532356,
-0.06827954947948456,
-0.08079355955123901,
0.016160666942596436,
0.00413548806682229,
0.08931872248649597,
-0.06651976704597473,
-0.004267471842467785,
-0.0533018484711647,
0.0005554312956519425,
-0.017148099839687347,
0.013296132907271385,
0.025810139253735542,
0.003228711662814021,
0.0013662753626704216,
0.015886923298239708,
-0.0023830384016036987,
-0.02446097321808338,
-0.017627151682972908,
0.05357559397816658,
-0.02729617804288864,
-0.020002858713269234,
0.005817058030515909,
0.014322672039270401,
-0.02710064686834812,
-0.041061583906412125,
0.017676034942269325,
0.013970715925097466,
0.04978228360414505,
0.003287371015176177,
0.0016583503456786275,
0.05420129373669624,
-0.02094140835106373,
-0.023365996778011322,
0.051346536725759506,
0.00697069289162755,
-0.04297779127955437,
0.0010552583262324333,
0.03232133388519287,
-0.03765933960676193,
0.06174880266189575,
-0.04051409661769867,
0.02974032051861286,
-0.013217919506132603,
-0.020980514585971832,
-0.049117475748062134,
0.12287190556526184,
-0.035704027861356735,
-0.038617443293333054,
-0.04939122125506401,
-0.034042008221149445,
-0.027081092819571495,
-0.03032691404223442,
0.043564386665821075,
0.04360349476337433,
-0.00663340138271451,
0.02285761572420597,
0.040866054594516754,
-0.021723534911870956,
0.035332515835762024,
0.011634116061031818,
-0.02672913670539856,
-0.030444232746958733,
0.031656526029109955,
0.033338095992803574,
0.03239954635500908,
-0.025282204151153564,
-0.021547555923461914,
0.013061494566500187,
-0.03572357818484306,
-0.017588045448064804,
0.062648244202137,
0.015622955746948719,
-0.005328229628503323,
0.06194433569908142,
-0.015798933804035187,
-0.01763692870736122,
0.026866009458899498,
0.023268232122063637,
0.004751412197947502,
-0.01636597514152527,
-0.009742350317537785,
0.03801129758358002,
-0.004695196636021137,
0.030111828818917274,
0.05768175050616264,
-0.030678870156407356,
0.01050003431737423,
-0.02622075565159321,
0.005342894233763218,
0.04649735614657402,
0.021547555923461914,
-0.0058317226357758045,
-0.005054485518485308,
-0.03631017357110977,
0.0326341837644577,
0.0045387716963887215,
0.053732018917798996,
0.0408269464969635,
-0.06831865757703781,
0.001208017230965197,
0.0380699560046196,
0.07547510415315628,
-0.007938573136925697,
0.015407871454954147,
-0.046849314123392105,
-0.03462860360741615,
-0.005489543080329895,
0.06151416525244713,
-0.02731573022902012,
-0.016356198117136955,
0.041374437510967255,
-0.014029375277459621,
-0.01612156070768833,
-0.01555451937019825,
-0.008789134211838245,
0.0462627187371254,
0.020589452236890793,
0.004695196636021137,
0.0015728053404018283,
-0.03282971680164337,
0.05893315002322197,
0.006452534813433886,
-0.01847771368920803,
-0.04000571742653847,
-0.05130742862820625,
-0.0338660329580307,
-0.007273766677826643,
-0.03775710612535477,
0.03464815765619278,
0.012709538452327251,
0.004313910845667124,
0.0395951010286808,
0.028176069259643555,
-0.005680186208337545,
0.04274315387010574,
-0.012562889605760574,
0.052011340856552124,
0.016150889918208122,
0.047123055905103683,
0.03353362902998924,
0.02886042930185795,
-0.05314542353153229,
0.003409577999264002,
0.08986621350049973,
0.008334523998200893,
0.008510502055287361,
0.047044843435287476,
-0.059011366218328476,
0.0403185673058033,
0.008950447663664818,
-0.03417888283729553,
-0.00658451858907938,
0.04004482179880142,
0.024128569290041924,
0.0099525460973382,
0.006525859236717224,
0.002573681529611349,
0.06413428485393524,
0.009991652332246304,
-0.031011274084448814,
-0.045558806508779526,
-0.050720833241939545,
0.002568793250247836,
0.04896105080842972,
0.05795549601316452,
-0.056313030421733856,
0.02633807435631752
] |
52,371 |
zipfile
|
writestr
|
Write a file into the archive. The contents is 'data', which
may be either a 'str' or a 'bytes' instance; if it is a 'str',
it is encoded as UTF-8 first.
'zinfo_or_arcname' is either a ZipInfo instance or
the name of the file in the archive.
|
def writestr(self, zinfo_or_arcname, data,
compress_type=None, compresslevel=None):
"""Write a file into the archive. The contents is 'data', which
may be either a 'str' or a 'bytes' instance; if it is a 'str',
it is encoded as UTF-8 first.
'zinfo_or_arcname' is either a ZipInfo instance or
the name of the file in the archive."""
if isinstance(data, str):
data = data.encode("utf-8")
if not isinstance(zinfo_or_arcname, ZipInfo):
zinfo = ZipInfo(filename=zinfo_or_arcname,
date_time=time.localtime(time.time())[:6])
zinfo.compress_type = self.compression
zinfo._compresslevel = self.compresslevel
if zinfo.filename[-1] == '/':
zinfo.external_attr = 0o40775 << 16 # drwxrwxr-x
zinfo.external_attr |= 0x10 # MS-DOS directory flag
else:
zinfo.external_attr = 0o600 << 16 # ?rw-------
else:
zinfo = zinfo_or_arcname
if not self.fp:
raise ValueError(
"Attempt to write to ZIP archive that was already closed")
if self._writing:
raise ValueError(
"Can't write to ZIP archive while an open writing handle exists."
)
if compress_type is not None:
zinfo.compress_type = compress_type
if compresslevel is not None:
zinfo._compresslevel = compresslevel
zinfo.file_size = len(data) # Uncompressed size
with self._lock:
with self.open(zinfo, mode='w') as dest:
dest.write(data)
|
(self, zinfo_or_arcname, data, compress_type=None, compresslevel=None)
|
[
-0.0008201593300327659,
0.02768470160663128,
-0.009763471782207489,
0.03667300194501877,
0.06832584738731384,
-0.09176556020975113,
-0.03949684277176857,
0.04927876964211464,
0.01709068939089775,
-0.025063883513212204,
0.0359162874519825,
0.025156166404485703,
0.014811315573751926,
-0.031782038509845734,
0.0076502058655023575,
-0.008134688250720501,
-0.05212106555700302,
0.01563262939453125,
0.030047129839658737,
0.06954397261142731,
-0.0065289754420518875,
-0.011830596253275871,
-0.008771436288952827,
0.00048390551819466054,
0.007041142787784338,
0.03934919089078903,
-0.024953145533800125,
0.027850810438394547,
-0.018797913566231728,
-0.016047898679971695,
-0.0006540510803461075,
-0.03726360946893692,
0.02901356853544712,
0.00787629745900631,
0.022609174251556396,
0.03802032396197319,
0.010557100176811218,
-0.00930206011980772,
0.040013622492551804,
-0.010750892572104931,
0.035824004560709,
0.009514309465885162,
-0.018936336040496826,
-0.039865970611572266,
0.019766878336668015,
0.022092392668128014,
-0.05463114753365517,
0.006090634502470493,
0.02244306541979313,
-0.0041734687983989716,
0.017302939668297768,
0.004877121653407812,
0.004729469772428274,
-0.05293315276503563,
0.053302280604839325,
0.032446470111608505,
0.046621039509773254,
0.02977028302848339,
0.002918428974226117,
-0.032483384013175964,
0.028552155941724777,
-0.015171216800808907,
0.024325625970959663,
-0.06046339124441147,
-0.07042988389730453,
0.049684811383485794,
-0.0007134578772820532,
-0.07079901546239853,
-0.007391815539449453,
0.03431057557463646,
0.03968140855431557,
-0.005527712404727936,
-0.023402802646160126,
-0.005587695632129908,
0.036100853234529495,
0.04990629106760025,
-0.03971831873059273,
-0.007534853182733059,
0.0417485311627388,
-0.012172040529549122,
0.006104476749897003,
-0.07980576902627945,
-0.0005591732915490866,
-0.00668585579842329,
0.017607470974326134,
-0.020523592829704285,
0.0069765448570251465,
-0.001942543312907219,
-0.033184729516506195,
0.015577259473502636,
-0.00524625089019537,
-0.012808788567781448,
-0.00032471847953274846,
-0.0037581983488053083,
0.002992254914715886,
-0.012052074074745178,
0.02089272253215313,
-0.0506814606487751,
0.026226641610264778,
0.06131238862872124,
-0.03229881823062897,
-0.03868475928902626,
0.01928700879216194,
-0.054114364087581635,
-0.02823839709162712,
-0.09966492652893066,
-0.003430596087127924,
0.03296325355768204,
-0.07072518765926361,
-0.0252484492957592,
-0.0024177974555641413,
-0.08371853828430176,
-0.03652535006403923,
-0.05127206817269325,
0.011064652353525162,
-0.027426311746239662,
-0.00028146113618277013,
-0.012218181975185871,
-0.0609801709651947,
-0.062530517578125,
0.06278890371322632,
0.008074704557657242,
0.009828069247305393,
0.039902884513139725,
0.006935018114745617,
-0.008116232231259346,
-0.016989178955554962,
0.009994177147746086,
0.014958967454731464,
0.0417485311627388,
-0.010446361266076565,
0.06880571693181992,
0.006851963698863983,
-0.02690953016281128,
0.029973303899168968,
0.0493156835436821,
0.0002118168049491942,
0.01308563631027937,
-0.04477539286017418,
0.0073041473515331745,
0.06500367820262909,
-0.08334941416978836,
-0.031652841717004776,
-0.012522713281214237,
0.009763471782207489,
-0.0020936555229127407,
0.008273111656308174,
-0.04839285835623741,
-0.01263345219194889,
-0.02692798711359501,
0.02074507065117359,
0.03410755470395088,
-0.03486426919698715,
0.017478276044130325,
0.05717813968658447,
-0.06932249665260315,
0.006842735689133406,
-0.006552046164870262,
-0.019729964435100555,
0.003892007749527693,
-0.023698104545474052,
0.03414446488022804,
-0.017349079251289368,
0.0030430101323872805,
0.01643548533320427,
-0.05356067046523094,
0.02080043964087963,
-0.010612469166517258,
0.028884373605251312,
-0.009089810773730278,
0.024307169020175934,
0.00578610273078084,
-0.06326877325773239,
0.033277012407779694,
-0.011996704153716564,
0.008448448032140732,
-0.02838604897260666,
-0.019877616316080093,
0.02321823686361313,
-0.062345948070287704,
0.015374237671494484,
-0.02600516378879547,
-0.07131579518318176,
0.09737632423639297,
0.0635271668434143,
-0.043704915791749954,
-0.01448832731693983,
0.00024281791411340237,
0.04241296276450157,
0.006819664966315031,
-0.027278659865260124,
-0.024067234247922897,
-0.048798903822898865,
-0.03058236837387085,
0.02463938482105732,
-0.019028618931770325,
0.0022874486166983843,
-0.04547673836350441,
-0.00010886432573897764,
0.0018156550358980894,
-0.036156222224235535,
0.016795385628938675,
0.020671244710683823,
0.0024731666781008244,
0.031800493597984314,
0.005237022880464792,
0.06592650711536407,
-0.0004937105113640428,
-0.05592310056090355,
0.024214886128902435,
0.06566811352968216,
0.02823839709162712,
0.011609118431806564,
-0.010234111919999123,
0.028773633763194084,
-0.023236693814396858,
-0.07072518765926361,
0.005283163860440254,
0.06094325706362724,
0.029419610276818275,
-0.07223861664533615,
0.08298028260469437,
0.0027269432321190834,
0.04702708125114441,
0.00862839911133051,
-0.0023520460817962885,
0.04248679056763649,
0.04558747634291649,
0.012568854726850986,
0.0085222739726305,
-0.027278659865260124,
-0.08290645480155945,
0.02821994014084339,
-0.009103653021156788,
-0.03853710740804672,
-0.06046339124441147,
-0.018059654161334038,
-0.0417485311627388,
-0.019047075882554054,
-0.02391958236694336,
0.005200109910219908,
-0.05957747995853424,
-0.001488052774220705,
0.015171216800808907,
-0.0020302115008234978,
-0.06673859059810638,
0.01864103227853775,
0.023255150765180588,
0.006238286383450031,
-0.017229113727808,
0.06611107289791107,
-0.020283658057451248,
-0.07515473663806915,
-0.003732820739969611,
0.014460642822086811,
-0.03054545447230339,
0.04765460267663002,
-0.07526547461748123,
0.018936336040496826,
-0.02098500356078148,
-0.07482252269983292,
-0.007198022678494453,
0.03209579735994339,
-0.05562779679894447,
0.041342489421367645,
-0.04197000712156296,
0.00816237274557352,
-0.07581917196512222,
-0.03968140855431557,
-0.010224883444607258,
0.013888492248952389,
0.030120955780148506,
-0.02694644406437874,
0.037688110023736954,
-0.03414446488022804,
-0.010252567939460278,
0.04820829629898071,
-0.04270826652646065,
0.03049008548259735,
0.006090634502470493,
0.018179621547460556,
0.05906070023775101,
-0.006819664966315031,
-0.049463335424661636,
0.022941390052437782,
-0.022646086290478706,
0.006565888412296772,
0.011489151045680046,
-0.015014337375760078,
0.03198505938053131,
-0.0076317498460412025,
0.034605879336595535,
-0.04986937716603279,
-0.0003301977412775159,
0.015088162384927273,
0.018511837348341942,
0.006053721532225609,
-0.018788684159517288,
0.05444658175110817,
-0.07024531811475754,
-0.04049349203705788,
0.0231997799128294,
0.07906751334667206,
-0.013436309061944485,
-0.039127711206674576,
-0.0017210656078532338,
-0.01049250178039074,
0.04691634327173233,
-0.06360098719596863,
0.05429892987012863,
0.05883922055363655,
-0.008314639329910278,
-0.02471321076154709,
0.02526690438389778,
0.006667399313300848,
0.04023510217666626,
0.03185586258769035,
-0.003721285378560424,
-0.014737489633262157,
0.045956604182720184,
-0.031689755618572235,
-0.07471178472042084,
-0.054077450186014175,
-0.04012436047196388,
0.06456072628498077,
-0.046694863587617874,
-0.024122603237628937,
-0.00020633754320442677,
0.048245206475257874,
0.02249843440949917,
-0.04115792363882065,
0.02382730133831501,
0.02600516378879547,
0.02454710192978382,
0.03133908286690712,
-0.0007134578772820532,
0.011415326036512852,
-0.04765460267663002,
0.009002142585814,
0.039792146533727646,
0.01785663329064846,
0.033996812999248505,
-0.009818840771913528,
0.018788684159517288,
-0.07655742764472961,
-0.00596605334430933,
0.00539851700887084,
-0.009191321209073067,
-0.010732436552643776,
0.059946607798337936,
-0.04495995491743088,
-0.022535348311066628,
-0.014377588406205177,
-0.032409559935331345,
0.007982422597706318,
-0.006362867541611195,
-0.0006211755098775029,
-0.00362669606693089,
0.018050426617264748,
0.013916176743805408,
0.021870914846658707,
0.007774787023663521,
0.02227695658802986,
-0.00019494644948281348,
-0.05153045803308487,
-0.05592310056090355,
0.016232464462518692,
0.06345333904027939,
0.00362669606693089,
-0.036285415291786194,
0.008083933033049107,
-0.025469927117228508,
0.0047017852775752544,
-0.024842405691742897,
-0.008074704557657242,
0.045070696622133255,
0.05289623886346817,
-0.03853710740804672,
-0.023605823516845703,
-0.0788460299372673,
-0.0004631420015357435,
0.024011865258216858,
0.006413622759282589,
0.03711595758795738,
0.02539610117673874,
-0.006755067501217127,
-0.04045657813549042,
0.025931337848305702,
-0.024214886128902435,
0.027426311746239662,
-0.003234496107324958,
0.06592650711536407,
0.03802032396197319,
-0.033184729516506195,
-0.009246690198779106,
0.04400021955370903,
-0.008226971141994,
0.02620818465948105,
-0.07094666361808777,
0.09582598507404327,
-0.007068827282637358,
-0.04761768877506256,
0.013150233775377274,
-0.0005946443416178226,
0.030988410115242004,
0.04396330565214157,
0.007784015499055386,
-0.02683570422232151,
0.011507607996463776,
0.014156111516058445,
0.013325570151209831,
-0.034698158502578735,
0.05023850500583649,
-0.01637088693678379,
0.004388025496155024,
0.013030266389250755,
0.0039542983286082745,
-0.0415639653801918,
0.02249843440949917,
-0.037374347448349,
0.013667014427483082,
0.02893974259495735,
-0.001910244463942945,
0.05293315276503563,
0.025137709453701973,
-0.06983927637338638,
0.005320076830685139,
-0.02240615338087082,
-0.03805723786354065,
-0.012125900015234947,
0.07855072617530823,
-0.005836857948452234,
0.006427465006709099,
0.022941390052437782,
0.036894481629133224,
0.05463114753365517,
0.0024639384355396032,
-0.02091117762029171,
-0.008097775280475616,
0.024251800030469894,
0.04189618304371834,
0.003984290175139904,
-0.04340961202979088,
-0.025672947987914085,
-0.06552046537399292,
-0.005878385156393051,
0.07471178472042084,
-0.02168635092675686,
0.06611107289791107,
0.006658170837908983,
0.04030892625451088,
-0.0040950290858745575,
-0.06928557902574539,
0.034790441393852234,
-0.02391958236694336,
0.006113705225288868,
0.06456072628498077,
-0.01801351271569729,
-0.0578794851899147,
-0.012910299934446812,
-0.006501290947198868,
0.00971733033657074,
0.07581917196512222,
-0.0145621532574296,
-0.00426113698631525,
0.03658071905374527,
-0.052527107298374176,
-0.0008588025229983032,
0.029973303899168968,
-0.04839285835623741,
0.0012331227771937847,
0.021501785144209862,
-0.013205602765083313,
0.1091146394610405,
0.02755550667643547,
-0.017542872577905655,
-0.021760176867246628,
0.019988354295492172,
-0.05060763657093048,
-0.013537819497287273,
0.024344081059098244,
0.033203184604644775,
-0.008462290279567242,
-0.005486185196787119,
-0.007470255717635155,
-0.0371897853910923,
0.08984608948230743,
-0.0088867899030447,
0.05950365215539932,
0.04374182969331741,
0.024916231632232666,
0.04318813607096672,
-0.024750124663114548,
0.0006321340333670378,
-0.008125459775328636,
0.05747344344854355,
-0.03434748575091362,
-0.05429892987012863,
-0.047396209090948105,
-0.02238769643008709,
-0.007165723945945501,
-0.04643647372722626,
-0.028865916654467583,
-0.05141972005367279,
0.028072288259863853,
0.005449272226542234,
-0.0315421037375927,
-0.023642735555768013,
0.018262675032019615,
0.00932974461466074,
-0.057030487805604935,
0.010815490037202835,
-0.016740016639232635,
-0.015512662008404732,
0.0028146114200353622,
0.04149014130234718,
-0.031172974035143852,
-0.035307224839925766,
-0.0613492988049984,
0.005804559215903282,
-0.029438067227602005,
0.02081889659166336,
-0.0042080748826265335,
-0.03713441267609596,
-0.011415326036512852,
-0.012753419578075409,
0.022018566727638245,
-0.005536940414458513,
-0.01633397489786148,
0.02083735354244709,
-0.07190640270709991,
-0.03063773736357689,
-0.03669145703315735,
-0.036802198737859726,
0.04942642152309418,
0.0475807748734951,
-0.051124416291713715,
0.03735589236021042,
-0.01775512285530567,
-0.020412852987647057,
0.025137709453701973,
0.0006044493638910353,
0.005472342949360609,
-0.1441081017255783,
-0.012614996172487736,
-0.033166274428367615,
0.013906949199736118,
-0.04706399515271187,
0.04717473313212395,
0.027850810438394547,
-0.022756826132535934,
-0.04263444244861603,
0.03277868777513504,
0.07714803516864777,
0.036230046302080154,
0.0524163693189621,
-0.03052699938416481,
-0.06943323463201523,
0.010640153661370277,
0.03783575817942619,
0.010926228947937489,
0.06566811352968216,
-0.019176270812749863,
-0.014368360862135887,
-0.006681241560727358,
0.04492304474115372,
0.031800493597984314,
-0.03741126134991646,
0.009195934981107712,
-0.0014246086357161403,
0.009122109040617943,
-0.006062950007617474,
0.011765998788177967,
-0.0276662465184927,
0.024768579751253128,
-0.05536940321326256,
0.03735589236021042,
0.018262675032019615,
0.05758418142795563,
-0.0177735798060894,
0.004037352278828621,
-0.012771875597536564,
-0.005961439106613398,
-0.023310519754886627,
0.02993639186024666,
-0.03148673474788666,
-0.0201913770288229,
0.027906179428100586,
-0.007405657786875963,
0.03442131355404854,
0.011627575382590294,
-0.052600935101509094,
0.03953375667333603,
-0.06640636920928955,
0.020394397899508476,
-0.05370832234621048,
0.028016919270157814,
-0.024362538009881973,
0.0463995598256588,
0.0072303214110434055,
-0.010169514454901218,
-0.05064455047249794,
-0.08792661130428314,
-0.00892831664532423,
0.036931391805410385,
0.08947695791721344,
-0.0710943192243576,
0.021926283836364746,
-0.045808956027030945,
0.0067504532635211945,
-0.004005053546279669,
0.03124679997563362,
0.006441307254135609,
0.0022874486166983843,
0.030139412730932236,
0.017459819093346596,
-0.014091513119637966,
-0.03934919089078903,
-0.011775226332247257,
0.046510301530361176,
0.007567151915282011,
0.005347761791199446,
0.011101565323770046,
-0.0021594068966805935,
-0.057067401707172394,
0.00487250741571188,
-0.002136336173862219,
0.024288712069392204,
0.03069310635328293,
-0.050939854234457016,
-0.007142653223127127,
0.04909420385956764,
0.008393079042434692,
0.0009458939894102514,
-0.008605328388512135,
-0.0014776709722355008,
-0.0415639653801918,
0.009883439168334007,
0.018890194594860077,
-0.052674759179353714,
0.08807426691055298,
-0.02678033523261547,
0.0012331227771937847,
-0.015475749038159847,
-0.02606053277850151,
-0.005172425415366888,
0.10453743487596512,
-0.04256061464548111,
-0.03975523263216019,
-0.0386478453874588,
-0.053302280604839325,
-0.017708981409668922,
-0.00033135127159766853,
0.0062290579080581665,
0.024141060188412666,
0.01629706099629402,
0.0834970623254776,
0.030785389244556427,
-0.029641088098287582,
0.02993639186024666,
0.011618346907198429,
-0.016094040125608444,
-0.01487591303884983,
0.013325570151209831,
0.042117659002542496,
0.0027684702072292566,
-0.019877616316080093,
0.0047617689706385136,
0.04185926914215088,
-0.03931227698922157,
-0.004445701837539673,
0.07113122940063477,
0.029474979266524315,
0.0007451798883266747,
0.07722186297178268,
-0.014054600149393082,
-0.0024108760990202427,
0.01374084036797285,
0.02395649626851082,
0.0012308157747611403,
-0.0021421038545668125,
-0.0028399890288710594,
0.027776984497904778,
-0.025839054957032204,
0.044332437217235565,
0.053265366703271866,
-0.02469475381076336,
0.008037791587412357,
0.005739961750805378,
-0.010741664096713066,
0.03344311937689781,
0.02020983211696148,
-0.03359077125787735,
-0.031726669520139694,
0.011895193718373775,
-0.002420104341581464,
-0.024288712069392204,
0.042191486805677414,
0.04791299253702164,
-0.047433122992515564,
0.014931282959878445,
0.027813898399472237,
0.06326877325773239,
-0.012070530094206333,
0.024196429178118706,
-0.07072518765926361,
-0.01795814372599125,
-0.027149464935064316,
0.06895336508750916,
-0.03528876602649689,
-0.019766878336668015,
0.04865125194191933,
-0.023550452664494514,
-0.03401527181267738,
-0.06186608225107193,
-0.010787805542349815,
0.04927876964211464,
0.012402746826410294,
-0.0034513594582676888,
-0.016869211569428444,
-0.014811315573751926,
0.046473387628793716,
0.02384575642645359,
-0.020006811246275902,
-0.03486426919698715,
-0.025802142918109894,
-0.06046339124441147,
-0.016869211569428444,
0.01419302448630333,
0.037023674696683884,
-0.022904478013515472,
0.02308904193341732,
0.027961550280451775,
0.027721615508198738,
-0.03373842313885689,
0.036174677312374115,
-0.05219489336013794,
-0.004411095753312111,
-0.002055589109659195,
0.07190640270709991,
0.01231969241052866,
0.07460104674100876,
-0.0291243065148592,
0.0015561110340058804,
0.07157418131828308,
-0.005241637118160725,
0.010271024890244007,
0.03599011152982712,
-0.027924636378884315,
0.04400021955370903,
0.024122603237628937,
-0.03783575817942619,
-0.02244306541979313,
0.03953375667333603,
0.02977028302848339,
0.011258445680141449,
-0.02004372514784336,
0.00968964584171772,
0.03122834488749504,
0.019711507484316826,
-0.03525185585021973,
-0.010040318593382835,
-0.020578961819410324,
-0.008799120783805847,
0.0401981882750988,
0.060094259679317474,
-0.06740301847457886,
0.018954792991280556
] |
52,372 |
pgeocode
|
_open_extract_cycle_url
|
Same as _open_extract_url but cycle through URLs until one works
We start by opening the first URL in the list, and if fails
move to the next, until one works or the end of list is reached.
|
def _index_postal_codes(self) -> pd.DataFrame:
"""Create a dataframe with unique postal codes"""
data_path_unique = self._data_path.replace(".txt", "-index.txt")
if os.path.exists(data_path_unique):
data_unique = pd.read_csv(
data_path_unique,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
# group together places with the same postal code
df_unique_cp_group = self._data.groupby("postal_code")
data_unique = df_unique_cp_group[["latitude", "longitude"]].mean()
valid_keys = set(DATA_FIELDS).difference(
["place_name", "latitude", "longitude", "postal_code"]
)
data_unique["place_name"] = df_unique_cp_group["place_name"].apply(
lambda x: ", ".join([str(el) for el in x])
)
for key in valid_keys:
data_unique[key] = df_unique_cp_group[key].first()
data_unique = data_unique.reset_index()[DATA_FIELDS]
data_unique.to_csv(data_path_unique, index=None)
return data_unique
|
(urls: list[str], country: str) -> Any
|
[
0.005204434506595135,
-0.018655825406312943,
-0.0016493911389261484,
0.037125278264284134,
-0.014471775852143764,
-0.03220506012439728,
-0.041374556720256805,
-0.06381373107433319,
0.04059179499745369,
-0.06247185170650482,
0.006215502042323351,
-0.0012999438913539052,
-0.042455513030290604,
0.0170437078922987,
0.019419949501752853,
0.0008864312549121678,
-0.0077996631152927876,
0.061763640493154526,
-0.0262970719486475,
-0.0060617453418672085,
-0.02648344449698925,
0.011424596421420574,
-0.02100411057472229,
0.010101355612277985,
0.01456496212631464,
0.01784510724246502,
-0.020258622244000435,
-0.020184073597192764,
0.05058132857084274,
-0.03634251654148102,
0.04871760681271553,
-0.04182184860110283,
-0.03021088056266308,
0.030136331915855408,
-0.01253350917249918,
-0.06467103958129883,
0.04733845591545105,
-0.036435700953006744,
0.041337281465530396,
0.019829967990517616,
-0.02702392265200615,
-0.08319640904664993,
-0.01962495781481266,
-0.04446832835674286,
0.010828206315636635,
0.0060617453418672085,
0.016335494816303253,
-0.05408511683344841,
0.011005259118974209,
-0.050916798412799835,
-0.047972120344638824,
0.022681457921862602,
-0.017463045194745064,
0.052109576761722565,
0.016633689403533936,
0.0003523593186400831,
-0.016410043463110924,
0.08580560982227325,
0.01857195794582367,
-0.014947024174034595,
-0.05777528136968613,
0.002329648472368717,
0.05419694259762764,
-0.03062089905142784,
0.0330064594745636,
0.03050907701253891,
0.011126400902867317,
-0.022737368941307068,
-0.011778702959418297,
-0.0009842765284702182,
0.054867882281541824,
0.019718144088983536,
-0.012142127379775047,
0.02081773802638054,
0.028831729665398598,
0.04562383517622948,
-0.03350966423749924,
0.015338405035436153,
0.006853825878351927,
0.010036125779151917,
-0.006602223962545395,
-0.015096122398972511,
0.03652888908982277,
0.017220761626958847,
0.051960479468107224,
-0.0012673287419602275,
0.06124179810285568,
0.04882943257689476,
-0.005949922371655703,
-0.013353545218706131,
0.009285978972911835,
0.016493910923600197,
0.024284254759550095,
-0.03058362565934658,
0.035429295152425766,
-0.07887257635593414,
0.003697152016684413,
0.05046950280666351,
0.001239372999407351,
-0.00818172562867403,
0.01889810897409916,
0.05397329479455948,
0.02786259539425373,
-0.0011234729317948222,
-0.005036700051277876,
0.024712910875678062,
0.041598204523324966,
-0.017723966389894485,
-0.046853888779878616,
0.02353876829147339,
-0.10436825454235077,
-0.015478184446692467,
0.06873394548892975,
-0.0201281625777483,
0.016987796872854233,
0.0007018066244199872,
0.039883580058813095,
0.04346192255616188,
-0.063142791390419,
0.0043005309998989105,
0.023315122351050377,
0.06701932847499847,
-0.07085859030485153,
0.04871760681271553,
-0.021991880610585213,
-0.01723008044064045,
0.024396078661084175,
-0.018236488103866577,
0.030117696151137352,
-0.0016726875910535455,
0.0051671601831912994,
0.03239143267273903,
0.017369858920574188,
-0.027694860473275185,
0.010921391658484936,
0.014276085421442986,
0.053637824952602386,
0.0076272692531347275,
-0.00506931496784091,
0.060347214341163635,
0.018292399123311043,
-0.03173913061618805,
0.03021088056266308,
-0.00907165091484785,
0.04998493567109108,
0.0355411171913147,
-0.03487017750740051,
0.06071995571255684,
-0.013400138355791569,
-0.07447420060634613,
0.0319255031645298,
-0.007054175715893507,
0.0032941228710114956,
0.0021351228933781385,
0.01806875318288803,
-0.0950496569275856,
0.0018986634677276015,
0.009258022531867027,
0.0015620292397215962,
-0.0016901599010452628,
0.03759120777249336,
-0.011694835498929024,
0.0257565937936306,
-0.024172432720661163,
-0.06955398619174957,
0.005689001642167568,
0.02866399474442005,
-0.06064540892839432,
-0.019019249826669693,
-0.035671576857566833,
0.002949334913864732,
0.05278051644563675,
-0.03384513407945633,
0.015841608867049217,
-0.08565651625394821,
0.012757155112922192,
-0.004952832590788603,
-0.006723365280777216,
0.03764712065458298,
-0.0032778154127299786,
-0.03123592585325241,
-0.009332572109997272,
-0.036994818598032,
0.013213765807449818,
0.03399423137307167,
0.01766805350780487,
0.012924890033900738,
-0.05158773437142372,
0.09959713369607925,
0.029334932565689087,
0.013027394190430641,
-0.026147974655032158,
0.003725107992067933,
0.008941191248595715,
0.03149684891104698,
-0.06329189240932465,
-0.009258022531867027,
0.0065696085803210735,
-0.0627327710390091,
-0.03431106358766556,
-0.0037134597077965736,
0.024097884073853493,
0.032950546592473984,
-0.002208506688475609,
-0.037740305066108704,
0.008027968928217888,
-0.021917331963777542,
0.014378590509295464,
-0.007179976440966129,
0.04070361703634262,
0.06243458017706871,
-0.08267456293106079,
-0.03319283202290535,
0.03828078508377075,
-0.007105427794158459,
-0.06787663698196411,
-0.025998877361416817,
-0.008004671894013882,
0.10779749602079391,
0.030825909227132797,
0.03721846267580986,
-0.05125226452946663,
0.0029190494678914547,
-0.04610840231180191,
0.04886670783162117,
-0.027732135728001595,
-0.028179427608847618,
0.05128953978419304,
-0.006546312011778355,
-0.05777528136968613,
0.004428661894053221,
-0.08841481804847717,
-0.026744363829493523,
-0.05546427145600319,
-0.014648829586803913,
-0.07246138900518417,
0.03813168779015541,
-0.019923154264688492,
0.06634838879108429,
0.001994179096072912,
-0.03062089905142784,
-0.05315325781702995,
0.05784983187913895,
-0.013921978883445263,
-0.05274324119091034,
-0.035056550055742264,
-0.007967397570610046,
0.007944101467728615,
0.02782532200217247,
-0.06236002966761589,
-0.02219689078629017,
0.022737368941307068,
-0.03552247956395149,
0.01755623146891594,
0.05650795251131058,
-0.038690801709890366,
-0.03449743613600731,
0.021339580416679382,
-0.01860923133790493,
0.004943514242768288,
-0.011098445393145084,
0.004179389216005802,
0.05952717736363411,
-0.04376011714339256,
-0.0032615079544484615,
-0.037088003009557724,
0.00202679424546659,
0.018189895898103714,
0.018665144219994545,
0.008405371569097042,
-0.01984860561788082,
0.05557609349489212,
-0.05158773437142372,
-0.02169368602335453,
-0.020687278360128403,
0.005316257942467928,
0.030714085325598717,
-0.02020271122455597,
-0.08789297938346863,
-0.009616788476705551,
-0.011918481439352036,
0.02046363241970539,
0.015552733093500137,
-0.033174194395542145,
0.014611555263400078,
-0.008191044442355633,
0.010557967238128185,
-0.027191657572984695,
0.012850340455770493,
-0.02927902154624462,
-0.03572748973965645,
-0.009942939504981041,
-0.04342464730143547,
0.026781639084219933,
-0.009062332101166248,
-0.009616788476705551,
0.04830759018659592,
-0.04346192255616188,
-0.0232219360768795,
-0.018189895898103714,
-0.11443233489990234,
0.023464219644665718,
0.11145038157701492,
0.02053818106651306,
-0.0044076950289309025,
0.030117696151137352,
-0.034441523253917694,
-0.002238792134448886,
-0.0005168907810002565,
-0.0036761853843927383,
-0.03824350982904434,
0.023669227957725525,
0.02691209875047207,
0.013073987327516079,
0.019792692735791206,
-0.060943603515625,
-0.03932446613907814,
0.03619341924786568,
0.012719880789518356,
0.03201868757605553,
-0.0627327710390091,
-0.023445582017302513,
0.0011281322222203016,
-0.08140723407268524,
0.05032040551304817,
0.027228930965065956,
0.03416196629405022,
-0.03123592585325241,
-0.006285391747951508,
0.007086790632456541,
0.012850340455770493,
-0.025924328714609146,
0.030527712777256966,
0.008917894214391708,
0.02579386718571186,
-0.0319255031645298,
0.015077484771609306,
-0.049612194299697876,
0.027228930965065956,
0.01777055859565735,
-0.0449901707470417,
0.0007920804782770574,
0.003976710140705109,
-0.0016027981182560325,
-0.008354119025170803,
-0.045362915843725204,
-0.037423472851514816,
-0.022905103862285614,
-0.046742066740989685,
-0.032670989632606506,
0.020146800205111504,
0.036510251462459564,
-0.021358216181397438,
0.049537643790245056,
0.09661518037319183,
-0.016307538375258446,
0.002352945040911436,
0.04487834870815277,
0.012253951281309128,
0.10354821383953094,
0.052295949310064316,
-0.07212591916322708,
0.008754818700253963,
-0.04349919781088829,
0.020053613930940628,
0.00840071216225624,
0.001910311751998961,
0.0388026237487793,
-0.026818912476301193,
-0.009011080488562584,
-0.02549567259848118,
-0.03690163046121597,
0.03200004994869232,
0.018776966258883476,
-0.010203860700130463,
0.015468865633010864,
0.02053818106651306,
-0.0020151459611952305,
-0.09862799942493439,
-0.03529883176088333,
-0.03200004994869232,
-0.012263269163668156,
0.05147591233253479,
0.02391151152551174,
0.008088539354503155,
-0.025775231420993805,
0.019382676109671593,
-0.00740828225389123,
-0.023743776604533195,
0.002735007321462035,
-0.04841941222548485,
-0.024433353915810585,
-0.020258622244000435,
0.013642420992255211,
0.019326763227581978,
0.02920447289943695,
-0.02299829013645649,
-0.037050727754831314,
0.009877709671854973,
0.016335494816303253,
-0.01900993101298809,
-0.03595113381743431,
0.013539916835725307,
0.03418060392141342,
-0.007785685360431671,
-0.014555643312633038,
0.04767392575740814,
-0.08930940181016922,
0.02353876829147339,
-0.01636345125734806,
-0.03304373472929001,
0.028104878962039948,
0.08543286472558975,
0.007534082978963852,
-0.02499246783554554,
0.035634301602840424,
0.03932446613907814,
-0.024619724601507187,
0.009234726428985596,
0.012458959594368935,
0.03304373472929001,
0.007086790632456541,
-0.029465394094586372,
0.02510429173707962,
0.04972401633858681,
-0.0029190494678914547,
-0.008708225563168526,
-0.029726313427090645,
-0.010325001552700996,
0.035392019897699356,
-0.004158422350883484,
-0.01701575145125389,
-0.08334550261497498,
0.033714670687913895,
0.04021904990077019,
0.016307538375258446,
0.014732697047293186,
0.004642989486455917,
0.05050677806138992,
0.03671525791287422,
0.022644182667136192,
-0.003820623503997922,
-0.011098445393145084,
0.0036598776932805777,
-0.004172400571405888,
-0.05799892917275429,
-0.016810743138194084,
-0.05445786193013191,
0.0036458999384194613,
-0.04834486544132233,
0.05982537195086479,
-0.025532947853207588,
-0.0007140372763387859,
-0.0435364693403244,
0.012673287652432919,
0.038765352219343185,
-0.023352395743131638,
0.0007367513026110828,
0.0008631347445771098,
0.027508489787578583,
0.038038499653339386,
0.056060660630464554,
0.022029155865311623,
0.012999438680708408,
0.04595930501818657,
-0.0074362377636134624,
-0.013157854788005352,
-0.045288365334272385,
0.028384435921907425,
0.024694273248314857,
-0.019718144088983536,
-0.024712910875678062,
-0.08684929460287094,
-0.037703029811382294,
-0.042716432362794876,
0.011312772519886494,
-0.025327937677502632,
0.014154943637549877,
-0.03947356343269348,
0.006057085935026407,
-0.019345400854945183,
-0.0029283680487424135,
0.0009464196627959609,
0.03214914724230766,
0.031105466187000275,
-0.0067652990110218525,
0.05024585872888565,
-0.015655238181352615,
-0.019941790029406548,
-0.0496867410838604,
0.041560929268598557,
-0.018161939457058907,
-0.014723378233611584,
0.03365876153111458,
0.012775791808962822,
0.0790962278842926,
0.032633714377880096,
-0.0028025670908391476,
0.021339580416679382,
-0.056247033178806305,
0.050879523158073425,
-0.00939780194312334,
-0.017369858920574188,
-0.026129337027668953,
0.061428170651197433,
-0.009560877457261086,
0.008987783454358578,
0.027583038434386253,
-0.05136409029364586,
-0.039734482765197754,
-0.0812581405043602,
-0.03196277841925621,
0.01431335974484682,
0.003850908949971199,
0.008391393348574638,
0.09199316054582596,
-0.03032270446419716,
-0.04879215732216835,
-0.07685976475477219,
0.05024585872888565,
-0.013977890834212303,
0.050655875355005264,
-0.014518368989229202,
0.004270245786756277,
-0.0032242333982139826,
0.03065817430615425,
0.07171589881181717,
0.02579386718571186,
-0.02219689078629017,
-0.008731522597372532,
-0.09191861003637314,
-0.02771349810063839,
0.04905307665467262,
0.010399551130831242,
0.05676887184381485,
-0.01640072464942932,
0.028701268136501312,
-0.03200004994869232,
0.07343051582574844,
0.020109524950385094,
-0.02311011217534542,
-0.026427531614899635,
-0.032633714377880096,
-0.12859658896923065,
-0.02644616924226284,
-0.030154969543218613,
0.0023238244466483593,
-0.007808981463313103,
0.014061758294701576,
0.010623197071254253,
0.061726365238428116,
-0.0195876844227314,
0.11950165033340454,
-0.014695422723889351,
0.06619928777217865,
0.06001174449920654,
-0.009709974750876427,
0.01843217946588993,
0.008880619890987873,
-0.004242289811372757,
0.03891444951295853,
-0.05408511683344841,
0.003615614492446184,
-0.007231228984892368,
-0.07294595241546631,
0.03891444951295853,
-0.05050677806138992,
0.02184278331696987,
-0.04346192255616188,
-0.04204549640417099,
-0.028179427608847618,
0.006877122446894646,
0.0007350040832534432,
0.0034175943583250046,
-0.020407721400260925,
-0.037889402359724045,
0.0159627515822649,
-0.05699251964688301,
0.017574867233633995,
-0.02184278331696987,
0.012682606466114521,
0.061800915747880936,
0.029260383918881416,
-0.017621461302042007,
-0.00798137579113245,
0.04972401633858681,
-0.009747249074280262,
0.0026231841184198856,
0.06329189240932465,
-0.061428170651197433,
-0.01186257041990757,
-0.027489852160215378,
0.004717538133263588,
-0.027583038434386253,
0.009355868212878704,
0.0776052474975586,
-0.040107227861881256,
-0.046742066740989685,
0.018236488103866577,
0.007599313277751207,
-0.013614465482532978,
0.010101355612277985,
-0.0710822343826294,
-0.018115347251296043,
0.08394189178943634,
-0.035671576857566833,
0.004813053645193577,
-0.01875832863152027,
-0.029353570193052292,
-0.0010017488384619355,
0.012449641712009907,
0.008023309521377087,
-0.01394993532449007,
-0.017649415880441666,
0.019019249826669693,
-0.008475260809063911,
0.010297046042978764,
-0.03149684891104698,
-0.04215731844305992,
0.008121154271066189,
-0.05017130821943283,
-0.017761239781975746,
0.02510429173707962,
0.015077484771609306,
-0.010287727229297161,
-0.005907988641411066,
0.027228930965065956,
0.07067221403121948,
-0.031105466187000275,
0.03224233537912369,
0.014928387477993965,
-0.023352395743131638,
-0.010511374101042747,
-0.028048967942595482,
0.008834026753902435,
0.029763588681817055,
0.01381947472691536,
0.02085501328110695,
-0.02525338903069496,
0.06243458017706871,
-0.025197478011250496,
-0.06098087877035141,
-0.010949348099529743,
-0.017183486372232437,
-0.028924915939569473,
-0.01748168282210827,
0.017323266714811325,
-0.042753707617521286,
-0.03951083868741989,
-0.0257565937936306,
-0.019829967990517616,
0.01119163166731596,
0.040069952607154846,
0.0005949339829385281,
-0.0034571983851492405,
-0.0018765318673104048,
-0.045437462627887726,
-0.0001482238876633346,
0.01809670962393284,
-0.023371033370494843,
0.01642868109047413,
-0.022010518237948418,
0.027545763179659843,
-0.030490439385175705,
0.04599658027291298,
0.0021444414742290974,
0.037311650812625885,
0.0028794454410672188,
-0.006839847657829523,
0.041411831974983215,
0.02525338903069496,
0.041225459426641464,
0.005409443750977516,
0.03924991562962532,
0.03492609038949013,
0.027918506413698196,
-0.019103117287158966,
-0.027583038434386253,
-0.05688069760799408,
0.027657587081193924,
0.009085629135370255,
0.042716432362794876,
0.02154458872973919,
-0.03637979179620743,
0.028011692687869072,
0.0685475766658783,
-0.0035131098702549934,
-0.030117696151137352,
0.058893512934446335,
-0.01694120280444622,
0.011676197871565819,
-0.03544793277978897,
0.024806097149848938,
0.05516607686877251,
-0.01889810897409916,
0.035429295152425766,
-0.008316844701766968,
-0.01846945285797119,
-0.013977890834212303,
0.046742066740989685,
-0.019755419343709946,
0.0011898679658770561,
0.07678521424531937,
-0.01962495781481266,
0.015124077908694744,
0.008675610646605492,
-0.014769971370697021,
0.06150272116065025,
-0.010986622422933578,
-0.007524764630943537,
0.04718935862183571,
-0.0038788646925240755,
0.007221910171210766,
0.08878756314516068,
0.036994818598032,
0.026110699400305748,
-0.03637979179620743,
0.03544793277978897,
0.010753657668828964,
-0.03775894269347191,
0.025849780067801476,
0.05956445261836052,
-0.012775791808962822,
0.04312645271420479,
-0.03119865246117115,
0.011275498196482658,
-0.020444994792342186,
-0.06813755631446838,
-0.028048967942595482,
0.0039650616236031055,
-0.023930149152874947,
0.018516045063734055,
-0.020295897498726845,
-0.02618524804711342,
-0.0015725126722827554,
-0.010613878257572651,
0.030192244797945023,
0.02415379509329796,
-0.056097935885190964,
0.04916490241885185,
-0.03779621794819832,
0.0005987196345813572,
-0.03196277841925621,
0.025011105462908745,
0.03751665726304054,
0.042641885578632355,
0.06921851634979248,
-0.010623197071254253,
-0.040181778371334076,
0.01510544028133154,
0.00887130107730627,
0.019718144088983536,
-0.0038532386533915997,
0.04912762716412544,
-0.04223186895251274,
0.014797926880419254,
0.033286016434431076,
0.04070361703634262,
-0.003429242642596364,
-0.014071077108383179,
0.01463951077312231,
-0.00631334725767374,
-0.04834486544132233,
-0.0070448569022119045,
0.04782302305102348,
-0.013502642512321472,
-0.011638923548161983,
0.019792692735791206
] |
52,373 |
pgeocode
|
_open_extract_url
|
Download contents for a URL
If the file has a .zip extension, open it and extract the country
Returns the opened file object.
|
def _index_postal_codes(self) -> pd.DataFrame:
"""Create a dataframe with unique postal codes"""
data_path_unique = self._data_path.replace(".txt", "-index.txt")
if os.path.exists(data_path_unique):
data_unique = pd.read_csv(
data_path_unique,
dtype={"postal_code": str},
na_values=NA_VALUES,
keep_default_na=False,
)
else:
# group together places with the same postal code
df_unique_cp_group = self._data.groupby("postal_code")
data_unique = df_unique_cp_group[["latitude", "longitude"]].mean()
valid_keys = set(DATA_FIELDS).difference(
["place_name", "latitude", "longitude", "postal_code"]
)
data_unique["place_name"] = df_unique_cp_group["place_name"].apply(
lambda x: ", ".join([str(el) for el in x])
)
for key in valid_keys:
data_unique[key] = df_unique_cp_group[key].first()
data_unique = data_unique.reset_index()[DATA_FIELDS]
data_unique.to_csv(data_path_unique, index=None)
return data_unique
|
(url: str, country: str) -> Any
|
[
0.005204434506595135,
-0.018655825406312943,
-0.0016493911389261484,
0.037125278264284134,
-0.014471775852143764,
-0.03220506012439728,
-0.041374556720256805,
-0.06381373107433319,
0.04059179499745369,
-0.06247185170650482,
0.006215502042323351,
-0.0012999438913539052,
-0.042455513030290604,
0.0170437078922987,
0.019419949501752853,
0.0008864312549121678,
-0.0077996631152927876,
0.061763640493154526,
-0.0262970719486475,
-0.0060617453418672085,
-0.02648344449698925,
0.011424596421420574,
-0.02100411057472229,
0.010101355612277985,
0.01456496212631464,
0.01784510724246502,
-0.020258622244000435,
-0.020184073597192764,
0.05058132857084274,
-0.03634251654148102,
0.04871760681271553,
-0.04182184860110283,
-0.03021088056266308,
0.030136331915855408,
-0.01253350917249918,
-0.06467103958129883,
0.04733845591545105,
-0.036435700953006744,
0.041337281465530396,
0.019829967990517616,
-0.02702392265200615,
-0.08319640904664993,
-0.01962495781481266,
-0.04446832835674286,
0.010828206315636635,
0.0060617453418672085,
0.016335494816303253,
-0.05408511683344841,
0.011005259118974209,
-0.050916798412799835,
-0.047972120344638824,
0.022681457921862602,
-0.017463045194745064,
0.052109576761722565,
0.016633689403533936,
0.0003523593186400831,
-0.016410043463110924,
0.08580560982227325,
0.01857195794582367,
-0.014947024174034595,
-0.05777528136968613,
0.002329648472368717,
0.05419694259762764,
-0.03062089905142784,
0.0330064594745636,
0.03050907701253891,
0.011126400902867317,
-0.022737368941307068,
-0.011778702959418297,
-0.0009842765284702182,
0.054867882281541824,
0.019718144088983536,
-0.012142127379775047,
0.02081773802638054,
0.028831729665398598,
0.04562383517622948,
-0.03350966423749924,
0.015338405035436153,
0.006853825878351927,
0.010036125779151917,
-0.006602223962545395,
-0.015096122398972511,
0.03652888908982277,
0.017220761626958847,
0.051960479468107224,
-0.0012673287419602275,
0.06124179810285568,
0.04882943257689476,
-0.005949922371655703,
-0.013353545218706131,
0.009285978972911835,
0.016493910923600197,
0.024284254759550095,
-0.03058362565934658,
0.035429295152425766,
-0.07887257635593414,
0.003697152016684413,
0.05046950280666351,
0.001239372999407351,
-0.00818172562867403,
0.01889810897409916,
0.05397329479455948,
0.02786259539425373,
-0.0011234729317948222,
-0.005036700051277876,
0.024712910875678062,
0.041598204523324966,
-0.017723966389894485,
-0.046853888779878616,
0.02353876829147339,
-0.10436825454235077,
-0.015478184446692467,
0.06873394548892975,
-0.0201281625777483,
0.016987796872854233,
0.0007018066244199872,
0.039883580058813095,
0.04346192255616188,
-0.063142791390419,
0.0043005309998989105,
0.023315122351050377,
0.06701932847499847,
-0.07085859030485153,
0.04871760681271553,
-0.021991880610585213,
-0.01723008044064045,
0.024396078661084175,
-0.018236488103866577,
0.030117696151137352,
-0.0016726875910535455,
0.0051671601831912994,
0.03239143267273903,
0.017369858920574188,
-0.027694860473275185,
0.010921391658484936,
0.014276085421442986,
0.053637824952602386,
0.0076272692531347275,
-0.00506931496784091,
0.060347214341163635,
0.018292399123311043,
-0.03173913061618805,
0.03021088056266308,
-0.00907165091484785,
0.04998493567109108,
0.0355411171913147,
-0.03487017750740051,
0.06071995571255684,
-0.013400138355791569,
-0.07447420060634613,
0.0319255031645298,
-0.007054175715893507,
0.0032941228710114956,
0.0021351228933781385,
0.01806875318288803,
-0.0950496569275856,
0.0018986634677276015,
0.009258022531867027,
0.0015620292397215962,
-0.0016901599010452628,
0.03759120777249336,
-0.011694835498929024,
0.0257565937936306,
-0.024172432720661163,
-0.06955398619174957,
0.005689001642167568,
0.02866399474442005,
-0.06064540892839432,
-0.019019249826669693,
-0.035671576857566833,
0.002949334913864732,
0.05278051644563675,
-0.03384513407945633,
0.015841608867049217,
-0.08565651625394821,
0.012757155112922192,
-0.004952832590788603,
-0.006723365280777216,
0.03764712065458298,
-0.0032778154127299786,
-0.03123592585325241,
-0.009332572109997272,
-0.036994818598032,
0.013213765807449818,
0.03399423137307167,
0.01766805350780487,
0.012924890033900738,
-0.05158773437142372,
0.09959713369607925,
0.029334932565689087,
0.013027394190430641,
-0.026147974655032158,
0.003725107992067933,
0.008941191248595715,
0.03149684891104698,
-0.06329189240932465,
-0.009258022531867027,
0.0065696085803210735,
-0.0627327710390091,
-0.03431106358766556,
-0.0037134597077965736,
0.024097884073853493,
0.032950546592473984,
-0.002208506688475609,
-0.037740305066108704,
0.008027968928217888,
-0.021917331963777542,
0.014378590509295464,
-0.007179976440966129,
0.04070361703634262,
0.06243458017706871,
-0.08267456293106079,
-0.03319283202290535,
0.03828078508377075,
-0.007105427794158459,
-0.06787663698196411,
-0.025998877361416817,
-0.008004671894013882,
0.10779749602079391,
0.030825909227132797,
0.03721846267580986,
-0.05125226452946663,
0.0029190494678914547,
-0.04610840231180191,
0.04886670783162117,
-0.027732135728001595,
-0.028179427608847618,
0.05128953978419304,
-0.006546312011778355,
-0.05777528136968613,
0.004428661894053221,
-0.08841481804847717,
-0.026744363829493523,
-0.05546427145600319,
-0.014648829586803913,
-0.07246138900518417,
0.03813168779015541,
-0.019923154264688492,
0.06634838879108429,
0.001994179096072912,
-0.03062089905142784,
-0.05315325781702995,
0.05784983187913895,
-0.013921978883445263,
-0.05274324119091034,
-0.035056550055742264,
-0.007967397570610046,
0.007944101467728615,
0.02782532200217247,
-0.06236002966761589,
-0.02219689078629017,
0.022737368941307068,
-0.03552247956395149,
0.01755623146891594,
0.05650795251131058,
-0.038690801709890366,
-0.03449743613600731,
0.021339580416679382,
-0.01860923133790493,
0.004943514242768288,
-0.011098445393145084,
0.004179389216005802,
0.05952717736363411,
-0.04376011714339256,
-0.0032615079544484615,
-0.037088003009557724,
0.00202679424546659,
0.018189895898103714,
0.018665144219994545,
0.008405371569097042,
-0.01984860561788082,
0.05557609349489212,
-0.05158773437142372,
-0.02169368602335453,
-0.020687278360128403,
0.005316257942467928,
0.030714085325598717,
-0.02020271122455597,
-0.08789297938346863,
-0.009616788476705551,
-0.011918481439352036,
0.02046363241970539,
0.015552733093500137,
-0.033174194395542145,
0.014611555263400078,
-0.008191044442355633,
0.010557967238128185,
-0.027191657572984695,
0.012850340455770493,
-0.02927902154624462,
-0.03572748973965645,
-0.009942939504981041,
-0.04342464730143547,
0.026781639084219933,
-0.009062332101166248,
-0.009616788476705551,
0.04830759018659592,
-0.04346192255616188,
-0.0232219360768795,
-0.018189895898103714,
-0.11443233489990234,
0.023464219644665718,
0.11145038157701492,
0.02053818106651306,
-0.0044076950289309025,
0.030117696151137352,
-0.034441523253917694,
-0.002238792134448886,
-0.0005168907810002565,
-0.0036761853843927383,
-0.03824350982904434,
0.023669227957725525,
0.02691209875047207,
0.013073987327516079,
0.019792692735791206,
-0.060943603515625,
-0.03932446613907814,
0.03619341924786568,
0.012719880789518356,
0.03201868757605553,
-0.0627327710390091,
-0.023445582017302513,
0.0011281322222203016,
-0.08140723407268524,
0.05032040551304817,
0.027228930965065956,
0.03416196629405022,
-0.03123592585325241,
-0.006285391747951508,
0.007086790632456541,
0.012850340455770493,
-0.025924328714609146,
0.030527712777256966,
0.008917894214391708,
0.02579386718571186,
-0.0319255031645298,
0.015077484771609306,
-0.049612194299697876,
0.027228930965065956,
0.01777055859565735,
-0.0449901707470417,
0.0007920804782770574,
0.003976710140705109,
-0.0016027981182560325,
-0.008354119025170803,
-0.045362915843725204,
-0.037423472851514816,
-0.022905103862285614,
-0.046742066740989685,
-0.032670989632606506,
0.020146800205111504,
0.036510251462459564,
-0.021358216181397438,
0.049537643790245056,
0.09661518037319183,
-0.016307538375258446,
0.002352945040911436,
0.04487834870815277,
0.012253951281309128,
0.10354821383953094,
0.052295949310064316,
-0.07212591916322708,
0.008754818700253963,
-0.04349919781088829,
0.020053613930940628,
0.00840071216225624,
0.001910311751998961,
0.0388026237487793,
-0.026818912476301193,
-0.009011080488562584,
-0.02549567259848118,
-0.03690163046121597,
0.03200004994869232,
0.018776966258883476,
-0.010203860700130463,
0.015468865633010864,
0.02053818106651306,
-0.0020151459611952305,
-0.09862799942493439,
-0.03529883176088333,
-0.03200004994869232,
-0.012263269163668156,
0.05147591233253479,
0.02391151152551174,
0.008088539354503155,
-0.025775231420993805,
0.019382676109671593,
-0.00740828225389123,
-0.023743776604533195,
0.002735007321462035,
-0.04841941222548485,
-0.024433353915810585,
-0.020258622244000435,
0.013642420992255211,
0.019326763227581978,
0.02920447289943695,
-0.02299829013645649,
-0.037050727754831314,
0.009877709671854973,
0.016335494816303253,
-0.01900993101298809,
-0.03595113381743431,
0.013539916835725307,
0.03418060392141342,
-0.007785685360431671,
-0.014555643312633038,
0.04767392575740814,
-0.08930940181016922,
0.02353876829147339,
-0.01636345125734806,
-0.03304373472929001,
0.028104878962039948,
0.08543286472558975,
0.007534082978963852,
-0.02499246783554554,
0.035634301602840424,
0.03932446613907814,
-0.024619724601507187,
0.009234726428985596,
0.012458959594368935,
0.03304373472929001,
0.007086790632456541,
-0.029465394094586372,
0.02510429173707962,
0.04972401633858681,
-0.0029190494678914547,
-0.008708225563168526,
-0.029726313427090645,
-0.010325001552700996,
0.035392019897699356,
-0.004158422350883484,
-0.01701575145125389,
-0.08334550261497498,
0.033714670687913895,
0.04021904990077019,
0.016307538375258446,
0.014732697047293186,
0.004642989486455917,
0.05050677806138992,
0.03671525791287422,
0.022644182667136192,
-0.003820623503997922,
-0.011098445393145084,
0.0036598776932805777,
-0.004172400571405888,
-0.05799892917275429,
-0.016810743138194084,
-0.05445786193013191,
0.0036458999384194613,
-0.04834486544132233,
0.05982537195086479,
-0.025532947853207588,
-0.0007140372763387859,
-0.0435364693403244,
0.012673287652432919,
0.038765352219343185,
-0.023352395743131638,
0.0007367513026110828,
0.0008631347445771098,
0.027508489787578583,
0.038038499653339386,
0.056060660630464554,
0.022029155865311623,
0.012999438680708408,
0.04595930501818657,
-0.0074362377636134624,
-0.013157854788005352,
-0.045288365334272385,
0.028384435921907425,
0.024694273248314857,
-0.019718144088983536,
-0.024712910875678062,
-0.08684929460287094,
-0.037703029811382294,
-0.042716432362794876,
0.011312772519886494,
-0.025327937677502632,
0.014154943637549877,
-0.03947356343269348,
0.006057085935026407,
-0.019345400854945183,
-0.0029283680487424135,
0.0009464196627959609,
0.03214914724230766,
0.031105466187000275,
-0.0067652990110218525,
0.05024585872888565,
-0.015655238181352615,
-0.019941790029406548,
-0.0496867410838604,
0.041560929268598557,
-0.018161939457058907,
-0.014723378233611584,
0.03365876153111458,
0.012775791808962822,
0.0790962278842926,
0.032633714377880096,
-0.0028025670908391476,
0.021339580416679382,
-0.056247033178806305,
0.050879523158073425,
-0.00939780194312334,
-0.017369858920574188,
-0.026129337027668953,
0.061428170651197433,
-0.009560877457261086,
0.008987783454358578,
0.027583038434386253,
-0.05136409029364586,
-0.039734482765197754,
-0.0812581405043602,
-0.03196277841925621,
0.01431335974484682,
0.003850908949971199,
0.008391393348574638,
0.09199316054582596,
-0.03032270446419716,
-0.04879215732216835,
-0.07685976475477219,
0.05024585872888565,
-0.013977890834212303,
0.050655875355005264,
-0.014518368989229202,
0.004270245786756277,
-0.0032242333982139826,
0.03065817430615425,
0.07171589881181717,
0.02579386718571186,
-0.02219689078629017,
-0.008731522597372532,
-0.09191861003637314,
-0.02771349810063839,
0.04905307665467262,
0.010399551130831242,
0.05676887184381485,
-0.01640072464942932,
0.028701268136501312,
-0.03200004994869232,
0.07343051582574844,
0.020109524950385094,
-0.02311011217534542,
-0.026427531614899635,
-0.032633714377880096,
-0.12859658896923065,
-0.02644616924226284,
-0.030154969543218613,
0.0023238244466483593,
-0.007808981463313103,
0.014061758294701576,
0.010623197071254253,
0.061726365238428116,
-0.0195876844227314,
0.11950165033340454,
-0.014695422723889351,
0.06619928777217865,
0.06001174449920654,
-0.009709974750876427,
0.01843217946588993,
0.008880619890987873,
-0.004242289811372757,
0.03891444951295853,
-0.05408511683344841,
0.003615614492446184,
-0.007231228984892368,
-0.07294595241546631,
0.03891444951295853,
-0.05050677806138992,
0.02184278331696987,
-0.04346192255616188,
-0.04204549640417099,
-0.028179427608847618,
0.006877122446894646,
0.0007350040832534432,
0.0034175943583250046,
-0.020407721400260925,
-0.037889402359724045,
0.0159627515822649,
-0.05699251964688301,
0.017574867233633995,
-0.02184278331696987,
0.012682606466114521,
0.061800915747880936,
0.029260383918881416,
-0.017621461302042007,
-0.00798137579113245,
0.04972401633858681,
-0.009747249074280262,
0.0026231841184198856,
0.06329189240932465,
-0.061428170651197433,
-0.01186257041990757,
-0.027489852160215378,
0.004717538133263588,
-0.027583038434386253,
0.009355868212878704,
0.0776052474975586,
-0.040107227861881256,
-0.046742066740989685,
0.018236488103866577,
0.007599313277751207,
-0.013614465482532978,
0.010101355612277985,
-0.0710822343826294,
-0.018115347251296043,
0.08394189178943634,
-0.035671576857566833,
0.004813053645193577,
-0.01875832863152027,
-0.029353570193052292,
-0.0010017488384619355,
0.012449641712009907,
0.008023309521377087,
-0.01394993532449007,
-0.017649415880441666,
0.019019249826669693,
-0.008475260809063911,
0.010297046042978764,
-0.03149684891104698,
-0.04215731844305992,
0.008121154271066189,
-0.05017130821943283,
-0.017761239781975746,
0.02510429173707962,
0.015077484771609306,
-0.010287727229297161,
-0.005907988641411066,
0.027228930965065956,
0.07067221403121948,
-0.031105466187000275,
0.03224233537912369,
0.014928387477993965,
-0.023352395743131638,
-0.010511374101042747,
-0.028048967942595482,
0.008834026753902435,
0.029763588681817055,
0.01381947472691536,
0.02085501328110695,
-0.02525338903069496,
0.06243458017706871,
-0.025197478011250496,
-0.06098087877035141,
-0.010949348099529743,
-0.017183486372232437,
-0.028924915939569473,
-0.01748168282210827,
0.017323266714811325,
-0.042753707617521286,
-0.03951083868741989,
-0.0257565937936306,
-0.019829967990517616,
0.01119163166731596,
0.040069952607154846,
0.0005949339829385281,
-0.0034571983851492405,
-0.0018765318673104048,
-0.045437462627887726,
-0.0001482238876633346,
0.01809670962393284,
-0.023371033370494843,
0.01642868109047413,
-0.022010518237948418,
0.027545763179659843,
-0.030490439385175705,
0.04599658027291298,
0.0021444414742290974,
0.037311650812625885,
0.0028794454410672188,
-0.006839847657829523,
0.041411831974983215,
0.02525338903069496,
0.041225459426641464,
0.005409443750977516,
0.03924991562962532,
0.03492609038949013,
0.027918506413698196,
-0.019103117287158966,
-0.027583038434386253,
-0.05688069760799408,
0.027657587081193924,
0.009085629135370255,
0.042716432362794876,
0.02154458872973919,
-0.03637979179620743,
0.028011692687869072,
0.0685475766658783,
-0.0035131098702549934,
-0.030117696151137352,
0.058893512934446335,
-0.01694120280444622,
0.011676197871565819,
-0.03544793277978897,
0.024806097149848938,
0.05516607686877251,
-0.01889810897409916,
0.035429295152425766,
-0.008316844701766968,
-0.01846945285797119,
-0.013977890834212303,
0.046742066740989685,
-0.019755419343709946,
0.0011898679658770561,
0.07678521424531937,
-0.01962495781481266,
0.015124077908694744,
0.008675610646605492,
-0.014769971370697021,
0.06150272116065025,
-0.010986622422933578,
-0.007524764630943537,
0.04718935862183571,
-0.0038788646925240755,
0.007221910171210766,
0.08878756314516068,
0.036994818598032,
0.026110699400305748,
-0.03637979179620743,
0.03544793277978897,
0.010753657668828964,
-0.03775894269347191,
0.025849780067801476,
0.05956445261836052,
-0.012775791808962822,
0.04312645271420479,
-0.03119865246117115,
0.011275498196482658,
-0.020444994792342186,
-0.06813755631446838,
-0.028048967942595482,
0.0039650616236031055,
-0.023930149152874947,
0.018516045063734055,
-0.020295897498726845,
-0.02618524804711342,
-0.0015725126722827554,
-0.010613878257572651,
0.030192244797945023,
0.02415379509329796,
-0.056097935885190964,
0.04916490241885185,
-0.03779621794819832,
0.0005987196345813572,
-0.03196277841925621,
0.025011105462908745,
0.03751665726304054,
0.042641885578632355,
0.06921851634979248,
-0.010623197071254253,
-0.040181778371334076,
0.01510544028133154,
0.00887130107730627,
0.019718144088983536,
-0.0038532386533915997,
0.04912762716412544,
-0.04223186895251274,
0.014797926880419254,
0.033286016434431076,
0.04070361703634262,
-0.003429242642596364,
-0.014071077108383179,
0.01463951077312231,
-0.00631334725767374,
-0.04834486544132233,
-0.0070448569022119045,
0.04782302305102348,
-0.013502642512321472,
-0.011638923548161983,
0.019792692735791206
] |
52,375 |
pgeocode
|
haversine_distance
|
Haversine (great circle) distance
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)
Parameters
----------
x : array, shape=(n_samples, 2)
the first list of coordinates (degrees)
y : array: shape=(n_samples, 2)
the second list of coordinates (degress)
Returns
-------
d : array, shape=(n_samples,)
the distance between corrdinates (km)
References
----------
https://en.wikipedia.org/wiki/Great-circle_distance
|
def haversine_distance(x, y):
"""Haversine (great circle) distance
Calculate the great circle distance between two points
on the earth (specified in decimal degrees)
Parameters
----------
x : array, shape=(n_samples, 2)
the first list of coordinates (degrees)
y : array: shape=(n_samples, 2)
the second list of coordinates (degress)
Returns
-------
d : array, shape=(n_samples,)
the distance between corrdinates (km)
References
----------
https://en.wikipedia.org/wiki/Great-circle_distance
"""
x_rad = np.radians(x)
y_rad = np.radians(y)
d = y_rad - x_rad
dlat, dlon = d.T
x_lat = x_rad[:, 0]
y_lat = y_rad[:, 0]
a = (
np.sin(dlat / 2.0) ** 2
+ np.cos(x_lat) * np.cos(y_lat) * np.sin(dlon / 2.0) ** 2
)
c = 2 * np.arcsin(np.sqrt(a))
return EARTH_RADIUS * c
|
(x, y)
|
[
0.018040822818875313,
-0.023387253284454346,
0.04039124771952629,
0.022179123014211655,
0.002546992851421237,
-0.012748487293720245,
-0.029175464063882828,
0.049948107451200485,
0.025623198598623276,
0.015786847099661827,
0.027209997177124023,
-0.020195623859763145,
0.02865254133939743,
0.04039124771952629,
0.009818319231271744,
-0.007857359945774078,
-0.0769597515463829,
-0.02407246269285679,
-0.031104866415262222,
-0.06329164654016495,
-0.020754609256982803,
-0.022395504638552666,
-0.017932632938027382,
-0.030040990561246872,
-0.04904651641845703,
0.052256178110837936,
0.043204210698604584,
0.026867393404245377,
-0.06321951746940613,
-0.00961095280945301,
0.03808317705988884,
-0.049407150596380234,
-0.033881764858961105,
-0.0010424638167023659,
0.02116934210062027,
0.007018880918622017,
0.05373478680849075,
-0.0013039250625297427,
-0.06621279567480087,
-0.017031041905283928,
-0.07003553956747055,
-0.01981695555150509,
0.03357522562146187,
0.03563085198402405,
-0.007762692868709564,
0.007275834213942289,
-0.11727887392044067,
-0.0035657898988574743,
-0.027570633217692375,
0.01753593236207962,
-0.05074150487780571,
-0.05330202355980873,
-0.012405883520841599,
0.026993615552783012,
0.01992514729499817,
-0.030473753809928894,
0.010927274823188782,
0.05290532112121582,
0.002912136958912015,
0.03566691279411316,
0.02847222425043583,
0.0005257398588582873,
0.02766079269349575,
0.0020105463918298483,
-0.028382064774632454,
0.06635705381631851,
0.01864488795399666,
0.0041382997296750546,
-0.019348129630088806,
0.007550819311290979,
0.02194470912218094,
0.020520197227597237,
-0.011946071870625019,
-0.01469592284411192,
0.026921488344669342,
0.075156569480896,
-0.018662920221686363,
0.015128686092793941,
0.02968035452067852,
-0.015642592683434486,
-0.02216109074652195,
-0.03790285810828209,
0.01606634072959423,
-0.02766079269349575,
0.028201745823025703,
0.006369736045598984,
0.014001698233187199,
0.0012115120189264417,
-0.03106880374252796,
-0.00009875231626210734,
-0.03620786964893341,
0.009710128419101238,
0.03056391328573227,
-0.015363099984824657,
0.003038359573110938,
0.003027089638635516,
0.02400033548474312,
0.030906517058610916,
0.05369872227311134,
0.020826736465096474,
0.052256178110837936,
-0.028562381863594055,
0.02780504710972309,
0.005914432927966118,
0.020826736465096474,
-0.0014312746934592724,
-0.003563535865396261,
-0.05290532112121582,
0.012559154070913792,
0.09672261029481888,
-0.10112237185239792,
-0.06834054738283157,
0.005923448596149683,
-0.03563085198402405,
-0.045187707990407944,
-0.03429649770259857,
0.03775860369205475,
0.043240275233983994,
-0.03052784875035286,
-0.045512281358242035,
0.029139399528503418,
0.054059356451034546,
-0.03985029458999634,
-0.029409877955913544,
0.04298782721161842,
-0.013731220737099648,
0.02513633854687214,
-0.030365563929080963,
-0.0482170507311821,
0.01570570468902588,
0.043456654995679855,
0.02719196490943432,
0.0801333487033844,
0.010133875533938408,
-0.0009432889055460691,
0.032042521983385086,
0.008849109522998333,
0.020934928208589554,
0.08251354843378067,
-0.047676097601652145,
0.017599044367671013,
-0.003218677593395114,
0.05092182382941246,
0.010900227352976799,
-0.03599148616194725,
0.0443221814930439,
-0.0528331957757473,
-0.02318890392780304,
0.029121369123458862,
-0.002603342058137059,
-0.014686906710267067,
0.0200333371758461,
0.11583632975816727,
-0.02336922287940979,
-0.03389979898929596,
-0.07209116220474243,
0.01815802976489067,
0.02116934210062027,
0.04230261966586113,
0.0524725578725338,
0.030401626601815224,
0.03301623836159706,
0.017896568402647972,
-0.009890446439385414,
0.008078249171376228,
-0.018401458859443665,
0.001539465505629778,
0.019239937886595726,
-0.020574292168021202,
0.0003902195894625038,
-0.016336817294359207,
-0.005878369323909283,
-0.039237212389707565,
-0.007546311244368553,
0.006410307250916958,
-0.020520197227597237,
-0.0012926551280543208,
-0.008303646929562092,
0.0404273122549057,
-0.04104039445519447,
-0.01200016774237156,
-0.0022731346543878317,
0.00666726054623723,
0.0010807814542204142,
0.006139830220490694,
0.09268348664045334,
0.005468145478516817,
-0.0015248146373778582,
-0.004604872781783342,
0.0010819084709510207,
0.010891211219131947,
-0.04205017536878586,
-0.0446828193962574,
0.07970058917999268,
0.008799522183835506,
0.01366810966283083,
-0.0050849695689976215,
0.005080461502075195,
-0.05557402968406677,
-0.0152458930388093,
-0.02414458990097046,
0.04410580173134804,
0.007356977090239525,
-0.07897931337356567,
0.004147315863519907,
0.00582427391782403,
-0.02436097152531147,
0.02219715528190136,
-0.02928365394473076,
0.006879134569317102,
0.06116389110684395,
0.006378751713782549,
-0.0712617039680481,
0.0042555066756904125,
0.015642592683434486,
0.011215783655643463,
0.036929141730070114,
-0.03754222393035889,
0.02946397289633751,
-0.02758866548538208,
0.013568934984505177,
-0.04933502525091171,
0.036153774708509445,
0.05470850318670273,
0.021367691457271576,
-0.029590195044875145,
0.010196986608207226,
0.05027267709374428,
0.03786679357290268,
-0.13927768170833588,
0.017265455797314644,
-0.019546478986740112,
-0.021782422438263893,
-0.026777233928442,
-0.03445878252387047,
-0.08164802193641663,
0.06884543597698212,
0.03393585979938507,
-0.01310010813176632,
0.014037761837244034,
0.003333630273118615,
-0.006816023029386997,
-0.0499841682612896,
0.036153774708509445,
-0.015795862302184105,
-0.0627506896853447,
-0.03364735096693039,
0.0008672171970829368,
-0.01069286186248064,
-0.041364964097738266,
-0.0198530200868845,
-0.0032276934944093227,
0.0755172073841095,
-0.040968265384435654,
0.014163984917104244,
-0.07486806064844131,
-0.01668843813240528,
0.031970392912626266,
0.006752911955118179,
-0.03337687626481056,
0.014443477615714073,
-0.025082243606448174,
-0.012027215212583542,
0.01111660897731781,
-0.039201147854328156,
0.01833834871649742,
-0.02396427094936371,
-0.014777066186070442,
0.0294279083609581,
-0.027498506009578705,
0.0847494900226593,
-0.020412005484104156,
-0.05441999435424805,
-0.015840942040085793,
0.027534568682312965,
0.05936070904135704,
0.022251250222325325,
-0.02648872509598732,
0.033845700323581696,
0.03000492788851261,
-0.039237212389707565,
-0.036189835518598557,
-0.004241982474923134,
0.015453258529305458,
-0.02091689594089985,
-0.021890614181756973,
0.00867780763655901,
0.03063604049384594,
0.037217650562524796,
0.008533552289009094,
-0.0446828193962574,
-0.03775860369205475,
-0.028111588209867477,
-0.004063918720930815,
0.019871052354574203,
0.04868587851524353,
-0.03683898225426674,
-0.013000932522118092,
-0.019979242235422134,
-0.041292838752269745,
-0.0002732945722527802,
0.051859475672245026,
-0.026073992252349854,
0.011342006735503674,
-0.029698386788368225,
0.01974482834339142,
0.051643095910549164,
-0.05730508267879486,
0.005008334293961525,
-0.009628985077142715,
-0.011441181413829327,
-0.039417531341314316,
-0.010846132412552834,
-0.03081635758280754,
-0.034873515367507935,
0.036893077194690704,
0.000024547205612179823,
0.022539759054780006,
-0.029590195044875145,
-0.03985029458999634,
0.05939677357673645,
-0.01797771081328392,
0.036893077194690704,
0.0443221814930439,
0.08172015100717545,
-0.019762860611081123,
0.010792036540806293,
0.047603972256183624,
0.03433256223797798,
0.00387007649987936,
0.04677450656890869,
-0.03644228354096413,
-0.022810235619544983,
-0.018221141770482063,
0.062317926436662674,
0.01830228418111801,
0.023242998868227005,
0.04071582108736038,
-0.032890014350414276,
0.009092538617551327,
-0.08063824474811554,
-0.008452409878373146,
-0.03445878252387047,
0.014722970314323902,
-0.08092675358057022,
-0.01546227466315031,
0.015471290796995163,
-0.05856730788946152,
0.05038087069988251,
-0.004728841595351696,
0.019366160035133362,
-0.005436589941382408,
-0.007032404653728008,
-0.025587134063243866,
0.012378836050629616,
0.07367796450853348,
-0.03884051367640495,
-0.03272772952914238,
0.01841949112713337,
0.009692096151411533,
-0.03251134976744652,
0.008483964949846268,
-0.00006089256567065604,
-0.029626259580254555,
-0.10487298667430878,
0.014506588689982891,
-0.034062083810567856,
0.03840775042772293,
-0.020520197227597237,
0.018554730340838432,
-0.04443037137389183,
-0.0331604927778244,
-0.0019530700519680977,
0.003137534484267235,
0.04598110914230347,
0.051426712423563004,
0.04194198176264763,
0.0492989607155323,
-0.08222503960132599,
0.007857359945774078,
-0.033142462372779846,
0.0136500783264637,
-0.031970392912626266,
-0.009800286963582039,
0.031140930950641632,
0.015696687623858452,
0.015047542750835419,
0.015182781964540482,
-0.01539014745503664,
0.023838048800826073,
-0.03166385367512703,
-0.030762262642383575,
0.04879406839609146,
0.0382995568215847,
-0.02318890392780304,
0.043636973947286606,
-0.005707066971808672,
0.0340440534055233,
-0.06552758812904358,
0.013641062192618847,
0.02722802944481373,
0.03948965668678284,
-0.014371350407600403,
0.0168417077511549,
-0.04269931837916374,
-0.012811599299311638,
-0.016922850161790848,
-0.023531507700681686,
-0.009286380372941494,
0.05261681228876114,
-0.019979242235422134,
-0.02850828692317009,
0.08337907493114471,
0.005107509437948465,
-0.08417247235774994,
0.010359273292124271,
-0.05467243865132332,
0.010656798258423805,
-0.017229391261935234,
0.028490254655480385,
-0.001631878549233079,
-0.12088523805141449,
-0.053662657737731934,
-0.012703408487141132,
0.04630568251013756,
0.021782422438263893,
-0.0012408137554302812,
-0.034981705248355865,
0.015426211059093475,
-0.036929141730070114,
0.01662532612681389,
0.018590793013572693,
-0.02439703419804573,
-0.020790673792362213,
-0.00010156978532904759,
0.0684126764535904,
0.03599148616194725,
-0.020195623859763145,
0.01319026667624712,
-0.03045572154223919,
-0.03389979898929596,
0.022503694519400597,
-0.0038272510282695293,
0.0008288996177725494,
-0.06942246109247208,
-0.05896401032805443,
0.016463039442896843,
-0.022828267887234688,
0.07897931337356567,
-0.06531120836734772,
0.014993447810411453,
-0.08763458579778671,
0.021079182624816895,
0.0033764559775590897,
0.037325840443372726,
-0.021331626921892166,
-0.03840775042772293,
0.002988772001117468,
-0.019564511254429817,
-0.01069286186248064,
-0.006486942525953054,
0.011414133943617344,
0.011495277285575867,
0.010936290957033634,
-0.015227860771119595,
0.03530627861618996,
0.025298625230789185,
0.008123328909277916,
0.015299987979233265,
-0.035342343151569366,
0.05752146616578102,
0.02656085230410099,
0.013911538757383823,
0.03840775042772293,
0.05676412954926491,
0.02780504710972309,
-0.0663209855556488,
0.04450250044465065,
0.011332990601658821,
-0.039381466805934906,
-0.04879406839609146,
-0.02407246269285679,
0.021187372505664825,
-0.03523414954543114,
0.05665593966841698,
0.003263757098466158,
0.013154203072190285,
-0.05373478680849075,
0.05088575929403305,
-0.012829630635678768,
0.028129618614912033,
0.0485776886343956,
0.01262226514518261,
-0.07086500525474548,
-0.010927274823188782,
-0.0065545616671442986,
0.030365563929080963,
-0.026110056787729263,
0.010124859400093555,
0.04626961797475815,
-0.019438287243247032,
-0.03041965886950493,
-0.01896946132183075,
-0.005945988465100527,
0.0404273122549057,
0.07191084325313568,
-0.039597850292921066,
-0.0011399482609704137,
-0.05027267709374428,
0.08561501652002335,
-0.043384529650211334,
-0.027065742760896683,
0.07274030894041061,
0.025983834639191628,
0.04731546342372894,
0.011089561507105827,
-0.011747722513973713,
0.073064886033535,
-0.011603468097746372,
-0.008308155462145805,
-0.014921320602297783,
0.07111744582653046,
-0.015913069248199463,
-0.018735047429800034,
0.009701112285256386,
0.053915102034807205,
-0.011747722513973713,
0.008222503587603569,
-0.01519179716706276,
0.035757072269916534,
-0.03847987577319145,
-0.04259112849831581,
-0.06422929465770721,
-0.003948965575546026,
0.019348129630088806,
0.04598110914230347,
-0.00497227068990469,
-0.025875642895698547,
0.021890614181756973,
-0.0019248954486101866,
0.015985196456313133,
-0.023423317819833755,
0.002661945531144738,
0.005296843126416206,
-0.005779194179922342,
-0.02142178639769554,
0.01680564507842064,
0.014154968783259392,
0.03527021408081055,
0.02432490698993206,
0.03507186472415924,
0.025929737836122513,
0.0030090578366070986,
0.004819000605493784,
0.022846300154924393,
-0.00472433352842927,
-0.049912042915821075,
-0.050020232796669006,
-0.0400666743516922,
0.036045581102371216,
0.013397633098065853,
-0.02262991853058338,
0.04378122836351395,
0.0006654863827861845,
-0.039129022508859634,
0.07537295669317245,
-0.02975248172879219,
0.011459213681519032,
-0.0017738790484145284,
-0.049948107451200485,
-0.03783073276281357,
0.0606229342520237,
-0.004352427553385496,
0.006527514196932316,
-0.011233815923333168,
0.03840775042772293,
-0.031104866415262222,
-0.05734114721417427,
-0.0037754096556454897,
-0.041364964097738266,
-0.03676685318350792,
-0.018590793013572693,
-0.011017434298992157,
0.0031938839238137007,
-0.015372115187346935,
0.00008642589091323316,
-0.0152458930388093,
-0.006802499294281006,
-0.006721355952322483,
0.05016448721289635,
-0.003302074735984206,
-0.04709907993674278,
0.008718378841876984,
0.03550462797284126,
-0.024126557633280754,
-0.0379389226436615,
-0.02876073308289051,
0.04886619746685028,
0.05294138565659523,
0.019834987819194794,
-0.02475767210125923,
-0.03660456836223602,
0.006450878921896219,
-0.09196221828460693,
0.0046206507831811905,
0.025370752438902855,
-0.009502761997282505,
-0.05557402968406677,
-0.09686686843633652,
-0.0875624567270279,
-0.0018493871903046966,
-0.0198530200868845,
-0.014299223199486732,
-0.026110056787729263,
0.004525983706116676,
-0.019943179562687874,
0.06599641591310501,
0.0085515845566988,
-0.03301623836159706,
0.04435824602842331,
0.00801513809710741,
-0.02142178639769554,
0.04731546342372894,
-0.02850828692317009,
0.0006220973446033895,
-0.023693794384598732,
-0.0003276717325206846,
0.060190171003341675,
-0.013487791642546654,
0.0007629708270542324,
-0.03640621900558472,
-0.00840282253921032,
-0.004469634033739567,
-0.0464499369263649,
0.011783786118030548,
0.033881764858961105,
-0.010837116278707981,
-0.008957300335168839,
-0.03743403032422066,
0.04287963733077049,
-0.012658328749239445,
0.06271462887525558,
-0.05928857997059822,
0.03341293707489967,
-0.006572593469172716,
0.009128602221608162,
-0.010683845728635788,
0.006532022263854742,
0.011071529239416122,
-0.03438665717840195,
0.013091091997921467,
0.04850555956363678,
0.03337687626481056,
-0.0025537547189742327,
0.028346000239253044,
-0.05128245800733566,
-0.0943424180150032,
0.00434791948646307,
0.0034102655481547117,
-0.02088083326816559,
0.06578002870082855,
0.04605323448777199,
-0.0029707401990890503,
-0.01779739372432232,
0.0015484814066439867,
0.00952079426497221,
0.020412005484104156,
0.015624560415744781,
-0.005905416794121265,
-0.04486313462257385,
0.04392548277974129,
-0.02297252230346203,
0.02627234347164631,
0.055898603051900864,
-0.01469592284411192,
-0.02248566411435604,
-0.010602702386677265,
0.012883726507425308,
-0.037145521491765976,
0.04872194305062294,
-0.018915366381406784,
-0.007803264539688826,
0.02043003775179386,
0.04601716995239258,
-0.016742533072829247,
0.022810235619544983,
0.011179720051586628,
-0.0035770598333328962,
0.03804711252450943,
0.04497132822871208,
0.017878536134958267,
-0.02564122900366783,
-0.0012070040684193373,
-0.024018367752432823,
0.04825311526656151,
0.017553964629769325,
-0.05860337242484093,
-0.031537629663944244,
-0.03085242211818695,
-0.009358507581055164,
0.014064809307456017,
0.00897082407027483,
-0.011486261151731014,
0.01786050572991371,
0.004383983090519905,
-0.012739472091197968,
0.01014289166778326,
0.0553215853869915,
0.019546478986740112,
-0.005585352424532175,
0.04626961797475815,
-0.06769140064716339,
-0.013055028393864632,
-0.05095788836479187,
0.008060217835009098,
0.015137702226638794,
0.045800790190696716,
-0.028995145112276077,
0.06087538227438927,
0.01319026667624712,
0.056475620716810226,
0.004647698253393173,
0.04237474501132965,
0.07165840268135071,
-0.06116389110684395,
-0.031826138496398926,
0.035342343151569366,
-0.027931269258260727,
-0.023603634908795357,
-0.02829190529882908,
-0.08684118092060089,
0.03844381123781204,
0.015913069248199463,
0.06282281875610352,
-0.04168953746557236,
0.0468105711042881,
-0.01988908275961876,
-0.031537629663944244,
0.02616415172815323,
-0.03772253915667534,
0.009051967412233353,
0.001001328811980784,
0.02648872509598732,
-0.07255998998880386,
0.023567572236061096,
0.013559918850660324,
0.01484017726033926,
-0.027065742760896683,
0.01882520690560341,
-0.01256816927343607,
-0.019276002421975136,
0.0446828193962574,
-0.0028828352224081755,
0.016345832496881485,
-0.008154884912073612,
0.030437691137194633,
-0.051967669278383255,
0.004638682585209608,
0.006865610368549824,
-0.01319026667624712,
0.02421671710908413,
0.027282124385237694,
-0.0492989607155323,
-0.00863723549991846,
0.012378836050629616,
0.03518005460500717,
-0.029878703877329826,
0.09816515445709229
] |
52,381 |
zabbix_utils.exceptions
|
APINotSupported
|
Exception class when object/action is not supported by Zabbix API.
Args:
message (str): Not supported object/action message.
version (str): Current version of Zabbix API.
|
class APINotSupported(ModuleBaseException):
"""Exception class when object/action is not supported by Zabbix API.
Args:
message (str): Not supported object/action message.
version (str): Current version of Zabbix API.
"""
def __init__(self, message: str, version: str = None):
if version:
message = f"{message} is unsupported for Zabbix {version} version"
super().__init__(message)
|
(message: str, version: str = None)
|
[
0.02619517222046852,
-0.07986831665039062,
-0.0046803648583590984,
-0.0028514438308775425,
0.025079691782593727,
-0.09094874560832977,
0.011117610149085522,
0.035751111805438995,
0.006176966242492199,
-0.02052481845021248,
0.049304183572530746,
0.02937428653240204,
0.012233089655637741,
-0.03708968684077263,
-0.049750376492738724,
0.008291728794574738,
0.017903441563248634,
0.03642039746046066,
0.029671749100089073,
-0.02811007760465145,
-0.020245948806405067,
0.01751302368938923,
0.0031024266500025988,
0.0693456307053566,
0.022960280999541283,
0.11891008913516998,
0.028574859723448753,
0.027310650795698166,
0.027942756190896034,
-0.0843302309513092,
-0.06302458047866821,
-0.026659954339265823,
-0.015003195963799953,
0.09466701000928879,
0.00912369042634964,
-0.0000806108073447831,
0.007901311852037907,
0.011266340501606464,
-0.15393613278865814,
0.010002130642533302,
0.008115111850202084,
0.018777234479784966,
-0.015942057594656944,
-0.05268780514597893,
0.04153301194310188,
-0.030582722276449203,
0.02902105264365673,
0.04019443690776825,
-0.043317779898643494,
-0.00785018503665924,
0.0014315317384898663,
-0.02221662923693657,
0.046738579869270325,
-0.00642330152913928,
-0.03177256882190704,
0.07481147348880768,
0.05945504456758499,
0.0471847727894783,
-0.018674982711672783,
0.030378218740224838,
-0.047147590667009354,
0.08462769538164139,
-0.00805004220455885,
-0.02729205973446369,
0.011879853904247284,
-0.02126847207546234,
-0.023146195337176323,
-0.02491237036883831,
-0.01013226993381977,
0.07559230923652649,
0.07942212373018265,
0.022662820294499397,
-0.04383833333849907,
0.03433816879987717,
0.0734357163310051,
-0.0020148344337940216,
-0.0633220374584198,
0.09377462416887283,
0.01893526129424572,
-0.012781533412635326,
0.0017196971457451582,
-0.02381548285484314,
-0.01670430228114128,
0.004538606386631727,
0.049304183572530746,
-0.06953153759241104,
-0.010940992273390293,
-0.040082886815071106,
0.013515890575945377,
0.016211632639169693,
-0.0683416947722435,
-0.03504464030265808,
-0.06767240911722183,
-0.0033998878207057714,
0.022253811359405518,
-0.0003366772143635899,
0.06094235181808472,
-0.0613141767680645,
-0.007422585040330887,
-0.001692972145974636,
0.002514476189389825,
-0.014445456676185131,
-0.014538412913680077,
-0.03247903659939766,
-0.0022646551951766014,
-0.04179329052567482,
-0.012260976247489452,
-0.011842671781778336,
0.024968143552541733,
-0.00015178071043919772,
-0.021063966676592827,
0.003955303691327572,
-0.03682940825819969,
-0.04004570469260216,
-0.02937428653240204,
-0.008905243128538132,
0.02372252568602562,
-0.031010324135422707,
-0.00482444791123271,
-0.0005925983423367143,
0.05986405536532402,
0.027719659730792046,
-0.039487965404987335,
0.013757577165961266,
0.07667060941457748,
0.010662122629582882,
-0.0371454581618309,
-0.03294382244348526,
0.017373589798808098,
-0.027663886547088623,
0.009304956533014774,
0.0020299397874623537,
-0.07399345934391022,
-0.059826869517564774,
-0.048932358622550964,
-0.0038251644000411034,
0.01234463695436716,
0.017178380861878395,
-0.004622267093509436,
-0.039525147527456284,
0.004006429575383663,
0.008152293972671032,
-0.0023018380161374807,
-0.013060403056442738,
-0.023573795333504677,
-0.027347832918167114,
0.011164088733494282,
-0.011768306605517864,
0.019595252349972725,
-0.005270639434456825,
0.037071093916893005,
0.023387880995869637,
-0.015114744193851948,
-0.03878149762749672,
-0.025061100721359253,
-0.022792959585785866,
0.010885218158364296,
-0.0782322809100151,
0.033836204558610916,
-0.01875864341855049,
0.013897012919187546,
-0.04086372256278992,
0.009309603832662106,
0.010699305683374405,
0.010485504753887653,
-0.01838681660592556,
-0.01564459688961506,
-0.05369173362851143,
-0.01615585759282112,
0.008440460078418255,
-0.04967600852251053,
-0.0167972594499588,
-0.05268780514597893,
0.023945622146129608,
0.026715727522969246,
0.0682673305273056,
-0.034747179597616196,
0.006697523407638073,
0.03956232964992523,
-0.06071925535798073,
0.027663886547088623,
0.006111896596848965,
-0.052204430103302,
-0.01815442554652691,
0.004764026030898094,
0.012084358371794224,
0.029541609808802605,
0.03361310809850693,
-0.04171892628073692,
0.0025121523067355156,
0.01161027979105711,
-0.0012560761533677578,
0.061016716063022614,
0.05651761591434479,
0.012781533412635326,
-0.0072227283380925655,
-0.028351765125989914,
-0.013227725401520729,
0.029597382992506027,
0.06454906612634659,
-0.016388248652219772,
0.07659624516963959,
0.021342836320400238,
0.029169782996177673,
0.02149156667292118,
0.013738986104726791,
0.06674284487962723,
-0.041495829820632935,
-0.052948083728551865,
-0.04435889050364494,
-0.0018974767299368978,
0.0054612006060779095,
-0.02528419718146324,
0.03742432966828346,
-0.027385015040636063,
0.020450452342629433,
0.11095300316810608,
0.008993551135063171,
0.02093382738530636,
0.02619517222046852,
0.036531947553157806,
0.02710614539682865,
0.009797626174986362,
-0.0004113329923711717,
0.03504464030265808,
0.0391533225774765,
0.03443112596869469,
-0.011535914614796638,
-0.019929897040128708,
-0.01341363787651062,
0.009741852059960365,
-0.01115479227155447,
-0.05049402639269829,
0.038260940462350845,
-0.03147510811686516,
-0.008008211851119995,
0.0183403380215168,
-0.023796891793608665,
-0.051572322845458984,
-0.02920696511864662,
0.046924494206905365,
-0.0025632784236222506,
0.0041993148624897,
0.08195054531097412,
0.03881867974996567,
-0.09161803126335144,
-0.044098611921072006,
0.02591630071401596,
-0.03576970100402832,
-0.026102215051651,
0.023852664977312088,
-0.031177645549178123,
-0.0356767438352108,
-0.05889730527997017,
-0.048523347824811935,
-0.04636675491929054,
-0.014064334332942963,
-0.04484226554632187,
0.030359627678990364,
-0.006432597059756517,
-0.06209501251578331,
-0.0024308152496814728,
-0.04506536200642586,
0.0296531580388546,
0.01810794696211815,
-0.0035904489923268557,
0.00989987887442112,
0.0422394797205925,
-0.0023297248408198357,
0.05625733733177185,
0.075220488011837,
0.0032790442928671837,
-0.003715940285474062,
0.026455450803041458,
-0.021919166669249535,
0.01206576731055975,
-0.013078994117677212,
-0.005661057308316231,
0.00308615923859179,
0.017373589798808098,
0.009779035113751888,
0.01026240922510624,
0.017438659444451332,
0.06770959496498108,
-0.0000620557984802872,
0.01120127085596323,
0.005819083657115698,
0.010076495818793774,
-0.019409339874982834,
0.006427949294447899,
0.0034417184069752693,
0.056145790964365005,
-0.007120476104319096,
-0.010922401212155819,
-0.010485504753887653,
0.049304183572530746,
-0.022272402420639992,
0.04554873704910278,
0.04012007266283035,
-0.07124194502830505,
0.01920483447611332,
0.0030582724139094353,
-0.034152258187532425,
-0.014566300436854362,
-0.046924494206905365,
-0.01391560398042202,
0.05670353025197983,
0.014082925394177437,
-0.04179329052567482,
-0.0266041811555624,
0.03777756541967392,
0.05506749451160431,
0.029225556179881096,
-0.026083623990416527,
0.011470844969153404,
0.054770030081272125,
0.0724317878484726,
0.027124738320708275,
-0.001459418679587543,
0.055141858756542206,
-0.047928426414728165,
0.05488158017396927,
0.0256002489477396,
0.013683211989700794,
0.011591688729822636,
-0.004315510392189026,
0.01614656299352646,
-0.018814416602253914,
-0.011972811073064804,
-0.002858415711671114,
-0.0391533225774765,
-0.011340705677866936,
0.01386912539601326,
-0.041904836893081665,
-0.04937854781746864,
-0.008142998442053795,
-0.002663206774741411,
-0.009983539581298828,
-0.014250247739255428,
0.02920696511864662,
0.017029650509357452,
-0.017578093335032463,
-0.03294382244348526,
0.06116544455289841,
-0.015300657600164413,
-0.029857661575078964,
0.016035014763474464,
-0.014752212911844254,
-0.013227725401520729,
-0.027254877611994743,
-0.04119836911559105,
0.03818657249212265,
-0.004069175571203232,
-0.004210934042930603,
0.06521835178136826,
-0.04885799065232277,
-0.01770823262631893,
-0.028277399018406868,
0.009816217236220837,
-0.0026446154806762934,
0.009291012771427631,
-0.03811220824718475,
-0.02519124001264572,
0.026157988235354424,
-0.09779034554958344,
-0.03279509022831917,
0.04421016201376915,
0.0025400391314178705,
0.027385015040636063,
-0.03900459036231041,
-0.010308887809515,
-0.032051436603069305,
-0.040454715490341187,
-0.053952012211084366,
0.018851598724722862,
0.02093382738530636,
0.004271355923265219,
-0.02773825079202652,
-0.05763309448957443,
0.017903441563248634,
0.05458411946892738,
0.012828011997044086,
-0.028500495478510857,
-0.02554447576403618,
-0.005270639434456825,
0.015821214765310287,
0.0069392104633152485,
0.04406142979860306,
0.03840966895222664,
0.03430098667740822,
-0.010866627097129822,
-0.006771888583898544,
-0.036253076046705246,
0.03370606526732445,
-0.04569746553897858,
-0.00985340029001236,
-0.024336040019989014,
-0.008877355605363846,
-0.015793327242136,
-0.01588628441095352,
0.027273468673229218,
0.02751515433192253,
0.0035579141695052385,
-0.011768306605517864,
0.01821019873023033,
-0.0006646397523581982,
0.03974824398756027,
-0.02162170596420765,
0.0021472976077347994,
-0.00848693773150444,
0.008472994901239872,
-0.02372252568602562,
-0.033687472343444824,
-0.03504464030265808,
-0.02303464710712433,
0.044507622718811035,
0.027217693626880646,
0.018953852355480194,
-0.03736855462193489,
-0.06406569480895996,
0.03476576879620552,
-0.01870286837220192,
0.04361524060368538,
0.03874431177973747,
0.013227725401520729,
0.01907469518482685,
-0.039673879742622375,
-0.02792416512966156,
0.037703197449445724,
-0.02472645789384842,
-0.00017327691602986306,
0.016444023698568344,
-0.011470844969153404,
-0.04171892628073692,
-0.0018893430242314935,
-0.0823223665356636,
-0.023518020287156105,
-0.0266041811555624,
-0.024075761437416077,
0.06555299460887909,
-0.013116177171468735,
-0.029913434758782387,
0.07860410213470459,
0.0663338303565979,
0.014464047737419605,
0.001567480736412108,
0.013673916459083557,
-0.0034138313494622707,
0.04175610840320587,
-0.017671050503849983,
-0.010225226171314716,
-0.006344288121908903,
0.008314968086779118,
-0.02532137930393219,
-0.027180511504411697,
-0.078306645154953,
-0.07377035915851593,
0.03298100456595421,
0.010308887809515,
0.003409183584153652,
-0.020413270220160484,
0.029820479452610016,
-0.08180180937051773,
-0.03288804739713669,
-0.01779189519584179,
0.060012783855199814,
0.03978542611002922,
-0.028481904417276382,
0.03669926896691322,
0.021231288090348244,
0.01021593064069748,
-0.00691132340580225,
0.03536069393157959,
0.016490502282977104,
-0.0052241613157093525,
0.01473362185060978,
0.045920561999082565,
0.0024563781917095184,
-0.009955652058124542,
-0.01989271305501461,
0.003676433814689517,
0.01801498979330063,
0.04056626185774803,
-0.011024652980268002,
-0.048337433487176895,
-0.038075026124715805,
0.008747216314077377,
-0.029448652639985085,
0.023016056045889854,
-0.025990666821599007,
-0.0073482198640704155,
0.024280264973640442,
-0.01811724156141281,
0.03543505817651749,
0.004424734506756067,
0.008928481489419937,
-0.04830025136470795,
0.03203284740447998,
-0.024968143552541733,
-0.029262740164995193,
0.02277436852455139,
0.016118675470352173,
-0.0351375974714756,
-0.06283866614103317,
0.056145790964365005,
-0.07191123068332672,
0.019595252349972725,
0.012075062841176987,
0.10366520285606384,
-0.013144063763320446,
-0.02409435249865055,
0.016397545114159584,
0.031456515192985535,
0.03350156173110008,
0.01473362185060978,
0.010940992273390293,
-0.049936287105083466,
0.04502817988395691,
0.01623951829969883,
0.03759165108203888,
0.04086372256278992,
0.0049034608528018,
0.06559018045663834,
-0.049564462155103683,
0.018814416602253914,
-0.06090516969561577,
0.01806146837770939,
-0.042722854763269424,
0.011638167314231396,
0.06261556595563889,
-0.04038034752011299,
0.000810465426184237,
-0.007761876564472914,
0.017011059448122978,
0.017327111214399338,
0.05484439805150032,
-0.04885799065232277,
0.06454906612634659,
-0.008719329722225666,
-0.008342855609953403,
0.014268838800489902,
0.016918102279305458,
-0.0066138627007603645,
-0.0763731449842453,
-0.031270600855350494,
-0.07391909509897232,
-0.022960280999541283,
0.044321708381175995,
-0.04562310129404068,
-0.046701397746801376,
0.03584406524896622,
-0.005526270251721144,
0.004991769790649414,
0.03608575463294983,
0.021231288090348244,
0.03777756541967392,
0.0133020905777812,
-0.005749366246163845,
0.04134709760546684,
0.0069531542249023914,
-0.04685012996196747,
0.010002130642533302,
0.013924899511039257,
-0.028091486543416977,
-0.03444971889257431,
0.020654957741498947,
-0.00935143418610096,
0.014036447741091251,
-0.009518756531178951,
-0.0004313767421990633,
-0.0033487617038190365,
-0.06283866614103317,
0.024745048955082893,
0.019595252349972725,
-0.028909504413604736,
0.00021612411364912987,
0.020357497036457062,
0.06414005905389786,
0.02619517222046852,
-0.017076129093766212,
-0.01010438334196806,
-0.02528419718146324,
-0.047705329954624176,
-0.08410713821649551,
-0.014055038802325726,
-0.01264209859073162,
0.011628871783614159,
-0.02098960056900978,
0.050940219312906265,
0.019009625539183617,
-0.02751515433192253,
-0.042499758303165436,
0.04900672286748886,
-0.05268780514597893,
-0.008161589503288269,
0.02892809547483921,
0.02290450781583786,
-0.05142359435558319,
0.02582334540784359,
0.01505897007882595,
-0.019353564828634262,
0.06614792346954346,
0.02554447576403618,
-0.05469566583633423,
0.09198985993862152,
0.023703934624791145,
-0.04763096570968628,
-0.006437244825065136,
-0.05105176940560341,
0.01074578333646059,
0.04342932626605034,
0.003274396527558565,
-0.06428878754377365,
0.018851598724722862,
-0.02619517222046852,
-0.011638167314231396,
-0.007636385038495064,
0.04201638698577881,
0.06629665195941925,
0.028314581140875816,
-0.012893080711364746,
0.039711061865091324,
-0.02491237036883831,
0.021770436316728592,
-0.052353158593177795,
0.060570523142814636,
0.016444023698568344,
-0.028946686536073685,
-0.025786161422729492,
-0.007450472097843885,
0.032869454473257065,
0.017894146963953972,
0.01857272908091545,
-0.030991733074188232,
-0.05540213733911514,
-0.02139861136674881,
0.03285086527466774,
-0.00460832379758358,
0.06499525904655457,
0.04543718695640564,
0.03874431177973747,
-0.040677811950445175,
-0.03549083322286606,
0.013729690574109554,
-0.02472645789384842,
0.0411611832678318,
-0.0047152237966656685,
-0.07023800909519196,
0.023016056045889854,
-0.03926486894488335,
0.008472994901239872,
-0.013274203054606915,
-0.05926913022994995,
0.0018080059671774507,
-0.037703197449445724,
-0.003571857465431094,
-0.04978755861520767,
0.06183473393321037,
0.0046129715628921986,
-0.010364661924540997,
-0.02294168993830681,
-0.019223425537347794,
0.013441525399684906,
0.02920696511864662,
0.019427930936217308,
0.02258845418691635,
0.04830025136470795,
-0.06566454470157623,
-0.021417202427983284,
0.04283440485596657,
0.07510893791913986,
-0.014473343268036842,
0.019836939871311188,
-0.002286732429638505,
0.017987102270126343,
0.016853032633662224,
-0.015607413835823536,
0.024168716743588448,
-0.0017580417916178703,
0.0077200462110340595,
0.04093809053301811,
-0.01010438334196806,
-0.0694199949502945,
-0.00436896039173007,
-0.01769893802702427,
0.024280264973640442,
-0.03444971889257431,
0.05949222669005394,
-0.013534481637179852,
-0.09198985993862152,
-0.02249549888074398,
0.007297093514353037,
-0.02043186128139496,
0.038893043994903564,
-0.025934893637895584,
-0.01810794696211815,
-0.041086819022893906,
-0.02071073092520237,
-0.01259562000632286,
0.008435811847448349,
0.0471847727894783,
-0.01623951829969883,
-0.032144393771886826,
0.07425373792648315,
-0.034691404551267624,
-0.0033603813499212265,
-0.04621802270412445,
-0.017773302271962166,
0.01669500581920147,
-0.033873386681079865,
0.0017313167918473482,
0.017224859446287155,
0.01829385943710804,
-0.06867633759975433,
0.0335945188999176,
0.032869454473257065,
0.03197707235813141,
0.02121269702911377,
-0.031363558024168015,
-0.003251157235354185,
-0.048560529947280884,
0.009388617239892483,
0.006437244825065136,
0.007376106455922127,
0.06153727322816849,
-0.014454752206802368,
-0.052762169390916824,
-0.0451769083738327,
0.0021856422536075115,
0.04800279065966606,
0.031456515192985535,
0.014910239726305008,
-0.07265488058328629,
0.01939074881374836,
0.07012646645307541,
-0.02258845418691635,
-0.014361795969307423,
0.01779189519584179,
0.05581114441156387,
0.06454906612634659,
0.016667120158672333,
-0.018916668370366096,
-0.02651122398674488,
-0.06778395920991898,
0.014306021854281425,
0.0250982828438282,
-0.00256560230627656,
0.06265275180339813,
0.003697348991408944,
0.04763096570968628,
-0.0022960281930863857,
-0.03270213305950165,
0.005530918017029762,
0.06172318756580353,
0.0452512763440609,
-0.10076496005058289,
0.003939036279916763,
0.02344365604221821,
0.022867325693368912,
-0.03837248682975769,
-0.01675078086555004,
-0.014631370082497597,
-0.002556306542828679,
0.0010782965691760182,
-0.011749714612960815,
0.013013924472033978,
-0.019009625539183617,
0.005814435891807079
] |
52,382 |
zabbix_utils.exceptions
|
__init__
| null |
def __init__(self, message: str, version: str = None):
if version:
message = f"{message} is unsupported for Zabbix {version} version"
super().__init__(message)
|
(self, message: str, version: Optional[str] = None)
|
[
0.030187753960490227,
-0.03314521536231041,
0.01467911060899496,
-0.009183460846543312,
0.013588096015155315,
-0.0690314918756485,
0.029177889227867126,
0.07191682606935501,
0.036228910088539124,
-0.02470562979578972,
0.010288001038134098,
0.05471305176615715,
-0.04501113295555115,
-0.0347321480512619,
-0.007619071751832962,
0.00880025327205658,
0.03460591286420822,
0.002808687509968877,
0.03274848312139511,
-0.018862837925553322,
-0.01106343325227499,
-0.0059149242006242275,
-0.008020312525331974,
0.11692795902490616,
0.02326296456158161,
0.11447542905807495,
0.008042854256927967,
0.019872702658176422,
0.041404470801353455,
-0.040070004761219025,
-0.06394610553979874,
-0.0042017605155706406,
-0.021351434290409088,
0.09536012262105942,
0.024687595665454865,
0.015616842545568943,
-0.03053038753569126,
-0.020215336233377457,
-0.14203031361103058,
0.027428658679127693,
0.07234962284564972,
0.033650148659944534,
-0.03392064943909645,
-0.03862734138965607,
0.027140125632286072,
-0.0005877730436623096,
0.02838442288339138,
0.048509594053030014,
-0.038014210760593414,
0.0019983157981187105,
0.008543279021978378,
0.019602203741669655,
0.027518825605511665,
-0.017212791368365288,
-0.0779038816690445,
0.07573988288640976,
0.07260209321975708,
0.05749018117785454,
-0.005941974464803934,
0.03960113972425461,
-0.06679536402225494,
0.04349633306264877,
-0.025372860953211784,
-0.00651904009282589,
-0.018989071249961853,
-0.0207924023270607,
0.02528269588947296,
-0.02026943676173687,
0.008308845572173595,
0.05684097856283188,
0.09218625724315643,
0.025625327602028847,
-0.09009439498186111,
0.01368727907538414,
0.045479997992515564,
0.025426961481571198,
-0.07530708611011505,
0.07804814726114273,
0.005851808004081249,
-0.011613449081778526,
0.02995332144200802,
-0.004298689309507608,
-0.014102045446634293,
-0.0028244664426892996,
0.03105335310101509,
-0.06246737018227577,
-0.0007421832415275276,
-0.02870902232825756,
-0.016599658876657486,
0.04190940409898758,
-0.06672323495149612,
-0.023479364812374115,
-0.029538555070757866,
0.03844700753688812,
0.005869841203093529,
-0.029159855097532272,
0.04190940409898758,
-0.07848094403743744,
0.013921712525188923,
0.0195841696113348,
0.02209080010652542,
-0.027356525883078575,
-0.015256176702678204,
-0.0928354561328888,
-0.011126549914479256,
-0.056263916194438934,
-0.0298811886459589,
-0.03233371675014496,
0.027645058929920197,
0.0013840562896803021,
-0.0019836637657135725,
-0.027969658374786377,
-0.049807991832494736,
-0.01567995920777321,
-0.027590958401560783,
-0.00245252950116992,
-0.0070420061238110065,
-0.03673384338617325,
0.019998935982584953,
0.007979737594723701,
0.03895194083452225,
0.016834091395139694,
-0.03642727807164192,
0.011983131989836693,
0.022739998996257782,
0.03000742197036743,
-0.04908666014671326,
-0.04147660359740257,
0.05857217684388161,
-0.028672955930233,
0.039745405316352844,
-0.007280947174876928,
-0.03319931775331497,
-0.0823761448264122,
-0.02326296456158161,
-0.040683139115571976,
0.013624162413179874,
0.03642727807164192,
0.014967643655836582,
0.023803964257240295,
0.011090483516454697,
0.009183460846543312,
-0.0015542455948889256,
-0.04061100631952286,
-0.013651212677359581,
0.012145431712269783,
0.029899220913648605,
-0.0062079657800495625,
-0.010801950469613075,
-0.006293623708188534,
0.03307308256626129,
0.044794730842113495,
-0.02313673123717308,
-0.03372228145599365,
0.0032685366459190845,
-0.02483186312019825,
0.011947065591812134,
-0.06401823461055756,
0.05229658633470535,
0.005351383704692125,
0.03435344621539116,
-0.04836532846093178,
0.006879706401377916,
-0.0207924023270607,
0.02091863565146923,
0.006216982379555702,
0.003392515704035759,
-0.019043171778321266,
0.007821946404874325,
0.0492669902741909,
-0.03887980803847313,
-0.02887132205069065,
-0.0250302292406559,
0.04017820581793785,
0.0302779208868742,
0.08071707934141159,
-0.01733902283012867,
0.025571227073669434,
0.012109365314245224,
-0.03206321969628334,
0.001626378740184009,
-0.005062850657850504,
-0.03265831619501114,
0.019764503464102745,
0.04995225742459297,
0.0034150572028011084,
0.03438951447606087,
0.027681125327944756,
-0.0011422971729189157,
-0.005112442187964916,
0.024074463173747063,
-0.002139200922101736,
0.035832177847623825,
0.021946532651782036,
0.029502488672733307,
0.012442980892956257,
0.016248008236289024,
-0.06758882850408554,
0.018294788897037506,
0.0018360159592702985,
0.00041363894706591964,
0.04962765797972679,
-0.007619071751832962,
-0.022036699578166008,
0.02131536789238453,
0.0175644401460886,
0.05810331180691719,
-0.014931577257812023,
-0.016770973801612854,
-0.045804597437381744,
-0.009719952009618282,
-0.0005798835190944374,
-0.0062079657800495625,
0.015382410027086735,
-0.028727056458592415,
-0.035309214144945145,
0.05215232074260712,
-0.01005356851965189,
0.004950142465531826,
0.02919592149555683,
0.10567517578601837,
0.021621933206915855,
0.007889571599662304,
-0.002858279040083289,
-0.013371696695685387,
0.04998832568526268,
0.06091650575399399,
-0.053234320133924484,
-0.03761747479438782,
0.02450726367533207,
-0.009138377383351326,
-0.01641932502388954,
-0.010459317825734615,
0.049844056367874146,
-0.07610055059194565,
0.01629309169948101,
-0.023353131487965584,
0.010684734210371971,
-0.044037334620952606,
-0.04086347296833992,
0.046778395771980286,
-0.0168521236628294,
0.010765884071588516,
0.0714479610323906,
0.07638908177614212,
-0.09507159143686295,
-0.05074572190642357,
0.04905059188604355,
-0.028131958097219467,
0.010170784778892994,
-0.013209396973252296,
-0.03278455138206482,
-0.04028640687465668,
-0.03740107640624046,
-0.02822212316095829,
-0.0524769201874733,
0.011676565743982792,
-0.041007738560438156,
0.04219793528318405,
-0.027067992836236954,
-0.062359172850847244,
-0.022920330986380577,
-0.055614717304706573,
0.04493900015950203,
0.0018427784088999033,
-0.01609472557902336,
-0.014543861150741577,
0.01269544754177332,
-0.01574307680130005,
0.04825712740421295,
0.08677627146244049,
-0.01762755587697029,
-0.0054685999639332294,
0.042089737951755524,
-0.004900550935417414,
-0.02681552618741989,
-0.03226158395409584,
-0.02515646256506443,
-0.02301049791276455,
0.010188817977905273,
0.0387716069817543,
0.016861140727996826,
0.038374874740839005,
0.035074781626462936,
0.011829848401248455,
-0.01497666072100401,
0.01526519376784563,
-0.021297333762049675,
-0.04908666014671326,
-0.012614297680556774,
-0.01303808018565178,
0.06253950297832489,
-0.01108146645128727,
0.017194757238030434,
-0.023353131487965584,
-0.003115253522992134,
0.02623846009373665,
0.08266467601060867,
0.01707754097878933,
-0.06964462995529175,
0.020035002380609512,
-0.028204090893268585,
0.00544155016541481,
0.004501563962548971,
-0.027951624244451523,
-0.019674336537718773,
0.00930518563836813,
0.018953004851937294,
-0.008417045697569847,
-0.029827088117599487,
0.04620132967829704,
0.07941868156194687,
0.004648084752261639,
-0.010152751579880714,
0.009548635222017765,
0.08742547035217285,
0.054857317358255386,
-0.016933273524045944,
-0.005396466702222824,
0.05067358911037445,
-0.008480162359774113,
-0.010585550218820572,
0.0019836637657135725,
0.03952900692820549,
0.0010160640813410282,
0.00029078705119900405,
0.014273361302912235,
-0.03873554244637489,
-0.0003561578050721437,
0.015328310430049896,
-0.016320141032338142,
-0.0005821376689709723,
0.0266532264649868,
-0.06513629853725433,
-0.029899220913648605,
-0.01635620929300785,
-0.02124323509633541,
0.01217248197644949,
-0.029538555070757866,
0.014480744488537312,
0.013209396973252296,
-0.023515431210398674,
-0.03985360637307167,
0.028330324217677116,
0.012010181322693825,
-0.029123788699507713,
0.013398746028542519,
-0.01564389280974865,
0.013218413107097149,
-0.015616842545568943,
-0.06282804161310196,
-0.028474589809775352,
-0.016040625050663948,
-0.007150205783545971,
0.054640915244817734,
-0.07004135847091675,
-0.02329903095960617,
-0.004711201414465904,
0.021171100437641144,
0.009945368394255638,
-0.026599125936627388,
0.011712632142007351,
-0.004442955832928419,
0.01808740571141243,
-0.06924789398908615,
-0.02236129902303219,
0.04017820581793785,
0.020215336233377457,
0.02248753234744072,
-0.009530602023005486,
0.014273361302912235,
-0.030025454238057137,
-0.02486792951822281,
-0.048184994608163834,
0.004158931318670511,
-0.021423567086458206,
-0.021387500688433647,
-0.012749547138810158,
-0.04912272468209267,
-0.03000742197036743,
0.02075633592903614,
0.00917444471269846,
-0.014372545294463634,
0.011983131989836693,
-0.02757292427122593,
0.02887132205069065,
0.005382942035794258,
0.033812448382377625,
0.044037334620952606,
0.024002330377697945,
-0.031666483730077744,
-0.0012161210179328918,
0.00455340975895524,
0.00910681951791048,
-0.05060145631432533,
0.006311656907200813,
0.0013355917762964964,
0.003223453415557742,
-0.005581308156251907,
-0.01613079197704792,
0.007051022723317146,
-0.01497666072100401,
0.0007624707068316638,
0.005373924970626831,
0.024218730628490448,
-0.0025426961947232485,
0.026671258732676506,
0.005590324755758047,
0.00863795354962349,
-0.004287418443709612,
0.012046248652040958,
-0.07242175936698914,
-0.04627346247434616,
-0.04248647019267082,
-0.014886493794620037,
0.031432051211595535,
0.01962023600935936,
0.009575685486197472,
-0.00044604254071600735,
-0.05377531796693802,
-0.007073564454913139,
0.010098651051521301,
0.03691417723894119,
0.05139492079615593,
0.011360982432961464,
0.048437461256980896,
-0.02535482868552208,
-0.03559774532914162,
0.055939316749572754,
-0.052549052983522415,
-0.0302779208868742,
0.033163249492645264,
0.0018675742903724313,
-0.010035534389317036,
0.019764503464102745,
-0.04598493129014969,
-0.0185743048787117,
-0.02636469341814518,
-0.06574943661689758,
0.04501113295555115,
-0.02398429624736309,
-0.05709344521164894,
0.06603796780109406,
0.07029382884502411,
0.0017165453173220158,
0.012361831031739712,
-0.01861037127673626,
-0.01962023600935936,
-0.0038771608378738165,
-0.03422721475362778,
-0.025246627628803253,
-0.005599341355264187,
-0.048762060701847076,
-0.02326296456158161,
-0.02046780288219452,
-0.05886071175336838,
-0.07941868156194687,
0.036156777292490005,
0.014327461831271648,
-0.029628721997141838,
-0.030476287007331848,
0.04133233800530434,
-0.07739894837141037,
0.0027996706776320934,
-0.024272829294204712,
0.07718254625797272,
0.03978147357702255,
-0.027302425354719162,
-0.015995541587471962,
0.005581308156251907,
0.00201634899713099,
0.023280998691916466,
0.019439904019236565,
0.01542749349027872,
-0.02809588983654976,
0.008989603258669376,
0.014138111844658852,
-0.01251511462032795,
-0.020089102908968925,
0.003753181779757142,
-0.03186485171318054,
0.028979523107409477,
0.03186485171318054,
-0.004981700796633959,
-0.03386654704809189,
-0.06383790075778961,
0.02382199652493,
-0.04190940409898758,
0.04129626974463463,
0.022703932598233223,
-0.01635620929300785,
0.05886071175336838,
-0.03121565282344818,
0.011965098790824413,
0.016861140727996826,
0.023479364812374115,
-0.041368402540683746,
0.020016970112919807,
-0.006442398764193058,
-0.0076145632192492485,
-0.00280643324367702,
-0.011676565743982792,
-0.02697782590985298,
-0.019638270139694214,
0.02268589846789837,
-0.06805769354104996,
0.028727056458592415,
0.047788262367248535,
0.08165480941534042,
-0.02750079147517681,
-0.02059403620660305,
0.01701442338526249,
-0.0004018046020064503,
0.020503869280219078,
0.03154025226831436,
-0.0030431204941123724,
-0.08107774704694748,
0.020377635955810547,
0.01104540005326271,
0.036156777292490005,
0.03521904721856117,
0.044794730842113495,
0.037040408700704575,
-0.04944732412695885,
0.03823060914874077,
-0.05197198688983917,
0.01606767624616623,
-0.04234220087528229,
0.047463662922382355,
0.07458575069904327,
-0.05438845232129097,
-0.0015587538946419954,
-0.020377635955810547,
0.03812240809202194,
0.007546938490122557,
0.06787736713886261,
-0.08014000952243805,
0.04695872962474823,
-0.05074572190642357,
-0.04800466075539589,
0.011433116160333157,
-0.009341252036392689,
0.0008853226318024099,
-0.08951733261346817,
-0.058644309639930725,
-0.05233265459537506,
-0.01528322696685791,
0.06773309409618378,
-0.016870157793164253,
-0.05363105237483978,
-0.015752092003822327,
-0.020738301798701286,
-0.022397365421056747,
0.014525827951729298,
-0.01176673173904419,
0.0025494585279375315,
-0.02955658920109272,
0.0029552080668509007,
0.04699479416012764,
0.023479364812374115,
-0.015066826716065407,
0.028474589809775352,
0.025084327906370163,
-0.013822529464960098,
-0.028600823134183884,
0.0151389604434371,
-0.018520204350352287,
-0.011775748804211617,
-0.020774368196725845,
0.024164630100131035,
-0.0026554043870419264,
-0.08576640486717224,
0.012767580337822437,
0.0456242635846138,
-0.04558819904923439,
-0.008971570059657097,
0.04064707085490227,
0.09442239254713058,
0.03496658056974411,
0.00014025121345184743,
-0.03359604999423027,
0.01435451116412878,
-0.01766362227499485,
-0.05543438345193863,
-0.02479579485952854,
-0.0037644526455551386,
-0.0024908503983169794,
-0.010666700080037117,
0.029177889227867126,
0.021225200966000557,
-0.02701389230787754,
-0.047139063477516174,
0.033325549215078354,
-0.017447223886847496,
-0.025661394000053406,
-0.0043866015039384365,
0.035146914422512054,
-0.06787736713886261,
0.023677730932831764,
0.025625327602028847,
-0.025336794555187225,
0.07667762041091919,
-0.00022654340136796236,
-0.004170202184468508,
0.05806724354624748,
0.005797707941383123,
-0.04454226419329643,
0.05312611907720566,
-0.04908666014671326,
0.02531876228749752,
0.0387716069817543,
0.0355256125330925,
-0.06477563828229904,
0.016500474885106087,
-0.006428873632103205,
-0.008335895836353302,
-0.012650364078581333,
0.03521904721856117,
0.04187333583831787,
0.008362946100533009,
-0.020521901547908783,
0.05947384238243103,
-0.011820832267403603,
0.02353346347808838,
-0.05164738744497299,
0.06210670620203018,
-0.006812081206589937,
-0.02822212316095829,
-0.0448307991027832,
-0.030350053682923317,
0.052945785224437714,
-0.0019002596382051706,
0.023515431210398674,
-0.021351434290409088,
-0.04302746802568436,
-0.028672955930233,
-0.00007016082963673398,
-0.018267739564180374,
0.05399171635508537,
0.018078388646245003,
0.03108941949903965,
-0.044758666306734085,
0.001864193007349968,
-0.022920330986380577,
-0.05269331857562065,
0.032315682619810104,
-0.01802428998053074,
-0.07274635881185532,
0.013209396973252296,
-0.027392592281103134,
0.012253631837666035,
-0.011306882835924625,
-0.023713797330856323,
0.04082740470767021,
-0.0012431710492819548,
0.02160390093922615,
-0.053558919578790665,
0.07891374826431274,
0.016725892201066017,
-0.005950991064310074,
-0.017753789201378822,
-0.02111700177192688,
0.03323538228869438,
0.053558919578790665,
0.01779887266457081,
0.02353346347808838,
0.05529011785984039,
-0.07375621795654297,
-0.03927654027938843,
-0.009765035472810268,
0.057922977954149246,
0.001559880911372602,
0.008858861401677132,
0.003620186122134328,
0.02466956339776516,
-0.009494535624980927,
-0.0399618074297905,
0.017221806570887566,
0.014751244336366653,
-0.007528905291110277,
0.056913115084171295,
-0.004152168519794941,
-0.0411880724132061,
-0.016275059431791306,
0.003421819768846035,
0.041368402540683746,
-0.047175128012895584,
0.06838229298591614,
-0.01126179937273264,
-0.07732681930065155,
-0.02160390093922615,
-0.028835255652666092,
-0.03952900692820549,
0.01417417824268341,
-0.006992414593696594,
-0.0015463560121133924,
-0.05309005454182625,
-0.05716558173298836,
-0.003924498334527016,
-0.020179269835352898,
0.04807679355144501,
0.011279832571744919,
-0.031756650656461716,
0.09269119054079056,
-0.03658957779407501,
-0.02910575643181801,
-0.02620239369571209,
-0.035633813589811325,
0.024128563702106476,
-0.02757292427122593,
0.025426961481571198,
0.03011562116444111,
0.027518825605511665,
-0.06185423955321312,
-0.004280656110495329,
0.02385806292295456,
0.04122413694858551,
0.011469182558357716,
-0.031179586425423622,
-0.0011022858088836074,
-0.031179586425423622,
0.02789752371609211,
-0.000010804134035424795,
-0.005950991064310074,
0.07357589155435562,
0.01766362227499485,
-0.03601251170039177,
-0.033487848937511444,
0.028799189254641533,
0.02245146594941616,
0.018402988091111183,
0.013047097250819206,
-0.06253950297832489,
0.018989071249961853,
0.050240788608789444,
-0.020251402631402016,
0.0039019566029310226,
0.04418160021305084,
0.04587673023343086,
0.04133233800530434,
0.001559880911372602,
-0.03269438445568085,
-0.008701070211827755,
-0.014814360998570919,
0.006983397528529167,
0.03577807918190956,
0.017086558043956757,
0.04760792851448059,
-0.013912695460021496,
0.05824757739901543,
-0.012154447846114635,
-0.049844056367874146,
-0.03862734138965607,
0.035273145884275436,
0.024074463173747063,
-0.08302534371614456,
-0.0005480434629134834,
0.003198657650500536,
0.014525827951729298,
-0.015797175467014313,
-0.01625702530145645,
0.005838282871991396,
0.01494059432297945,
0.01808740571141243,
0.023353131487965584,
0.050204724073410034,
0.011883948929607868,
0.022469500079751015
] |
52,383 |
zabbix_utils.exceptions
|
APIRequestError
|
Exception class when Zabbix API returns error by request.
Args:
api_error (str|dict): Raw error message from Zabbix API.
|
class APIRequestError(ModuleBaseException):
"""Exception class when Zabbix API returns error by request.
Args:
api_error (str|dict): Raw error message from Zabbix API.
"""
def __init__(self, api_error: Union[str, dict]):
if isinstance(api_error, dict):
api_error['body'] = ModuleUtils.hide_private(api_error['body'])
super().__init__("{message} {data}".format(**api_error))
for key, value in api_error.items():
setattr(self, key, value)
else:
super().__init__(api_error)
|
(api_error: Union[str, dict])
|
[
-0.02338351681828499,
-0.015003628097474575,
0.0033691353164613247,
0.005588183645159006,
-0.023746199905872345,
-0.07654523104429245,
-0.016148943454027176,
0.05986180528998375,
0.02691490575671196,
-0.0342831015586853,
0.07295657694339752,
0.01806734688580036,
0.043063849210739136,
0.004018147476017475,
-0.03748998045921326,
0.035962894558906555,
0.0023144909646362066,
0.02132195048034191,
0.022982656955718994,
-0.04978303238749504,
-0.010804139077663422,
0.012331225909292698,
-0.026647666469216347,
0.08398977667093277,
-0.011825378984212875,
0.08246269077062607,
0.012770263478159904,
0.0002125096507370472,
0.05661674588918686,
-0.08047747611999512,
-0.03647828847169876,
-0.035199351608753204,
-0.009716089814901352,
0.07528538256883621,
-0.03481758013367653,
-0.03678370639681816,
-0.020062103867530823,
-0.016168031841516495,
-0.16049683094024658,
0.010632342658936977,
-0.04688156768679619,
0.020539317280054092,
-0.06532113999128342,
-0.041994888335466385,
0.0906326025724411,
-0.0154617540538311,
0.008021977730095387,
0.041078634560108185,
-0.07051323354244232,
-0.0052589052356779575,
-0.034130390733480453,
-0.012617555446922779,
0.018802257254719734,
-0.012789352796971798,
0.00357672362588346,
0.03695550188422203,
0.0031543888617306948,
0.023898908868432045,
-0.042453013360500336,
0.01339064259082079,
-0.052646320313215256,
0.08620405197143555,
-0.0050346143543720245,
-0.008680534549057484,
0.0018814187496900558,
-0.030847154557704926,
-0.06887161731719971,
0.000943691935390234,
-0.03422583267092705,
0.0159198809415102,
0.0488286018371582,
0.03769995644688606,
-0.06543567031621933,
0.04298749566078186,
0.07391100376844406,
0.0040825712494552135,
-0.08131737262010574,
0.02101653255522251,
0.004652842879295349,
-0.009491799399256706,
0.03399677202105522,
-0.004948715679347515,
-0.029014650732278824,
0.011014114134013653,
0.05077563598752022,
-0.08063018321990967,
-0.024395212531089783,
-0.03508482128381729,
0.01622529700398445,
0.039207953959703445,
-0.0760871022939682,
-0.022066405043005943,
-0.0742545947432518,
0.016454361379146576,
0.02010028064250946,
0.027182145044207573,
0.04749239981174469,
-0.05627315118908882,
0.024834249168634415,
-0.020482052117586136,
0.023154454305768013,
0.008227180689573288,
-0.008060155436396599,
-0.008670990355312824,
-0.010775506496429443,
-0.023727111518383026,
0.04165129363536835,
-0.060243576765060425,
0.035332970321178436,
-0.003999058622866869,
-0.009391584433615208,
-0.017971903085708618,
-0.05661674588918686,
0.019441723823547363,
-0.025120578706264496,
0.004144608974456787,
0.011519961059093475,
-0.02071111463010311,
-0.0077642821706831455,
0.010097862221300602,
0.07215485721826553,
-0.00010386874782852829,
-0.025082401931285858,
0.026055919006466866,
0.07223121076822281,
0.020844735205173492,
-0.046614326536655426,
-0.023574402555823326,
0.06604650616645813,
-0.004948715679347515,
-0.006857574451714754,
-0.010870949365198612,
-0.05799112468957901,
-0.03189702704548836,
-0.000013691958884010091,
0.022486353293061256,
-0.005359120201319456,
0.010536898858845234,
-0.007678383495658636,
0.001485330518335104,
0.02010028064250946,
0.06165613234043121,
0.019279470667243004,
-0.01947990246117115,
-0.028079308569431305,
-0.0334622897207737,
0.02010028064250946,
0.0018277320777997375,
-0.009324774146080017,
-0.02689581736922264,
-0.016053499653935432,
0.018286865204572678,
0.009105254895985126,
0.011978087946772575,
-0.021131064742803574,
-0.02828928455710411,
-0.02460518665611744,
-0.050470221787691116,
0.04844683036208153,
-0.02149374783039093,
-0.013094769790768623,
-0.061503421515226364,
0.03678370639681816,
-0.05325715243816376,
0.011586771346628666,
-0.021894607692956924,
0.021760987117886543,
-0.07593439519405365,
-0.025273287668824196,
0.01793372631072998,
-0.05024115741252899,
-0.023746199905872345,
-0.044934529811143875,
0.014201907441020012,
-0.007668839301913977,
0.04596531391143799,
-0.004822254180908203,
-0.00039042122079990804,
-0.00393940694630146,
-0.03279418870806694,
0.040582332760095596,
-0.001031380146741867,
-0.022829947993159294,
0.018678180873394012,
0.0019887920934706926,
-0.011796745471656322,
-0.015366311185061932,
0.05268449708819389,
0.005340031813830137,
0.029129181057214737,
0.01979486271739006,
-0.01452641375362873,
0.023288074880838394,
-0.0060844868421554565,
0.004722038749605417,
0.0318397618830204,
-0.005841107107698917,
-0.024776984006166458,
0.059480033814907074,
0.05134829506278038,
-0.0621524341404438,
0.0742545947432518,
0.009587242268025875,
0.023020833730697632,
0.020157545804977417,
0.003748520975932479,
0.02771662548184395,
-0.026857640594244003,
-0.07100953906774521,
-0.017370613291859627,
-0.007573396433144808,
0.042605724185705185,
-0.014593224041163921,
0.03143890202045441,
-0.000005242836778052151,
0.0122835049405694,
0.07078047841787338,
0.001747798640280962,
0.051577359437942505,
-0.008384660817682743,
0.0618470162153244,
0.019737597554922104,
0.02643769048154354,
-0.06318321824073792,
0.01823914423584938,
0.031018951907753944,
0.02353622578084469,
-0.008780749514698982,
-0.026342248544096947,
-0.011701302602887154,
0.006499663460999727,
-0.028842853382229805,
-0.051730066537857056,
0.009868798777461052,
-0.01097593642771244,
-0.015423577278852463,
0.04237665981054306,
-0.057303935289382935,
-0.002429022453725338,
-0.0649011880159378,
0.04859953746199608,
-0.009859254583716393,
-0.019890306517481804,
0.058792844414711,
0.0012896725675091147,
-0.058258362114429474,
-0.019222205504775047,
0.08032476902008057,
-0.06860437989234924,
-0.012827529571950436,
0.06852801889181137,
-0.012712998315691948,
-0.04252937063574791,
-0.017217904329299927,
0.014745932072401047,
-0.022772682830691338,
0.006599878426641226,
-0.026800373569130898,
0.03374861925840378,
-0.017733296379446983,
-0.005693170707672834,
0.009611102752387524,
-0.03296598792076111,
0.04134587571024895,
0.007086637429893017,
-0.009801988489925861,
0.014135098084807396,
0.044781822711229324,
0.01854456029832363,
0.04489635303616524,
0.10842316597700119,
0.032221533358097076,
0.034111302345991135,
0.028346549719572067,
-0.04917219653725624,
0.02120741829276085,
-0.020176634192466736,
0.035046644508838654,
0.000649608438834548,
-0.022944480180740356,
0.017714207991957664,
-0.03978061303496361,
0.010527354665100574,
0.04993573948740959,
0.0389598049223423,
-0.01791463792324066,
-0.0037127300165593624,
0.03899798169732094,
-0.03000725619494915,
0.014278261922299862,
0.010355557315051556,
0.011796745471656322,
-0.025559615343809128,
-0.0018694883910939097,
-0.02798386663198471,
-0.0002357738558202982,
-0.0563495047390461,
0.05150100588798523,
0.026017742231488228,
-0.038138993084430695,
0.0090527618303895,
0.04084957391023636,
-0.007902674376964569,
-0.0015581058105453849,
-0.016778867691755295,
-0.03947519510984421,
0.03229788690805435,
0.004745899699628353,
-0.05505147948861122,
-0.016425728797912598,
0.05134829506278038,
0.06390858441591263,
0.004173242021352053,
-0.02922462485730648,
-0.02584594488143921,
0.04188035801053047,
0.07139130681753159,
0.02861378900706768,
-0.027105791494250298,
0.08406613022089005,
-0.021990051493048668,
-0.02023390121757984,
0.0025483262725174427,
-0.00012437406985554844,
0.04039144888520241,
0.025311464443802834,
0.06467212736606598,
0.0003659639914985746,
0.005340031813830137,
-0.007530447095632553,
-0.02905282750725746,
-0.013047047890722752,
-0.01981395110487938,
-0.03928430750966072,
0.002140307566151023,
-0.006361271254718304,
-0.0023013676982373,
-0.028518347069621086,
-0.0049248551949858665,
-0.041384052485227585,
-0.013495629653334618,
-0.03233606368303299,
-0.01578626036643982,
0.034435808658599854,
-0.03852076455950737,
-0.06822260469198227,
0.01655934751033783,
-0.020310254767537117,
0.009248419664800167,
0.002636610995978117,
-0.06253420561552048,
0.019756685942411423,
0.012388492003083229,
0.014793653972446918,
0.0748654305934906,
-0.05245543271303177,
-0.04046780243515968,
-0.06742088496685028,
0.005516601260751486,
0.01822005584836006,
0.054058875888586044,
-0.01699838601052761,
-0.0442473404109478,
0.01730380207300186,
-0.050050269812345505,
-0.01822005584836006,
0.007349105551838875,
-0.010326924733817577,
0.040315091609954834,
-0.015958057716488838,
-0.0066428277641534805,
-0.017217904329299927,
-0.040620509535074234,
-0.027602095156908035,
-0.0006227651028893888,
0.035332970321178436,
-0.035638388246297836,
-0.02164645679295063,
-0.08589863777160645,
0.03777630999684334,
0.08093560487031937,
-0.054822418838739395,
-0.02027207799255848,
-0.032393328845500946,
0.02412797138094902,
-0.01947990246117115,
-0.0023144909646362066,
-0.0045144506730139256,
0.06012904644012451,
0.0333668477833271,
0.012178517878055573,
-0.024547921493649483,
-0.006041537504643202,
0.07497996091842651,
-0.030236320570111275,
-0.032221533358097076,
-0.026494957506656647,
-0.03861621022224426,
-0.0156144630163908,
0.00897640734910965,
0.01688385382294655,
0.021703721955418587,
-0.007186852395534515,
-0.004461956676095724,
0.05382981151342392,
-0.0004921276122331619,
0.03539023920893669,
-0.006423308979719877,
0.006523523945361376,
-0.025082401931285858,
0.04359832778573036,
-0.01702701859176159,
-0.0228872150182724,
-0.05642585828900337,
-0.022619973868131638,
0.026876728981733322,
0.0018432415090501308,
0.019871218129992485,
-0.025120578706264496,
-0.03313778340816498,
0.03126710280776024,
-0.000873899320140481,
0.03386314958333969,
0.0032760784961283207,
-0.020062103867530823,
0.022238202393054962,
-0.0333668477833271,
-0.04233848303556442,
0.06513025611639023,
-0.010956848040223122,
0.002176098758354783,
0.0331568717956543,
-0.03311869502067566,
-0.026953082531690598,
0.029911814257502556,
-0.05226454883813858,
-0.025597793981432915,
-0.0009281825041398406,
-0.013419276103377342,
0.06444306671619415,
0.0012491092784330249,
-0.01749468967318535,
0.0705895870923996,
0.06234332174062729,
0.02105470933020115,
0.0029110093601047993,
-0.009553836658596992,
0.02706761471927166,
0.02073020488023758,
-0.007864497601985931,
0.020997444167733192,
-0.027945689857006073,
0.01874499022960663,
-0.01732289232313633,
-0.026075007393956184,
-0.06871891021728516,
-0.0661228597164154,
-0.012636643834412098,
0.013514718972146511,
0.023478960618376732,
-0.01715109497308731,
0.022047316655516624,
-0.032546039670705795,
-0.014001477509737015,
-0.05783841386437416,
0.07051323354244232,
0.05371528118848801,
-0.016263475641608238,
0.025865033268928528,
0.011491328477859497,
-0.016368461772799492,
0.02027207799255848,
-0.0048652030527591705,
0.015232691541314125,
0.01653071492910385,
0.026494957506656647,
0.03978061303496361,
-0.021131064742803574,
-0.020023927092552185,
-0.04440005123615265,
0.03386314958333969,
-0.013152035884559155,
0.054211582988500595,
-0.03542841598391533,
0.0067191822454333305,
-0.06516843289136887,
-0.012417124584317207,
-0.0027917055413126945,
-0.005025070160627365,
0.0007420687470585108,
0.001741833402775228,
0.03769995644688606,
-0.05192095413804054,
0.0460798442363739,
-0.015079982578754425,
-0.005249361041933298,
-0.042147595435380936,
0.042147595435380936,
-0.01485092006623745,
-0.03978061303496361,
0.017561499029397964,
-0.007034143898636103,
-0.0048652030527591705,
-0.039818789809942245,
0.031629785895347595,
-0.02179916389286518,
0.009448849596083164,
0.05596773326396942,
0.08773113787174225,
-0.008642356842756271,
-0.031152572482824326,
0.021245595067739487,
0.01445960346609354,
0.0012968308292329311,
-0.01360061764717102,
-0.014325983822345734,
-0.041193168610334396,
0.048637717962265015,
0.010097862221300602,
0.02630407176911831,
0.04825594276189804,
0.04146040976047516,
0.06730635464191437,
-0.03577201068401337,
0.0179528146982193,
-0.01353380735963583,
0.0572657585144043,
-0.039360664784908295,
-0.004471501335501671,
0.07467454671859741,
-0.019833041355013847,
0.0006179929478093982,
0.034741226583719254,
0.011271810159087181,
0.02802204340696335,
0.02905282750725746,
-0.04134587571024895,
0.048981308937072754,
-0.06955880671739578,
-0.01670251227915287,
0.02599865384399891,
0.06203790381550789,
0.02116924151778221,
-0.03817716985940933,
-0.04287296161055565,
-0.07971393316984177,
-0.02769753709435463,
0.07688882201910019,
-0.06283962726593018,
-0.018210509791970253,
-0.013323833234608173,
-0.02645677886903286,
0.0014555046800523996,
0.0147745655849576,
-0.06570291519165039,
0.0058220187202095985,
0.013333377428352833,
0.003416856750845909,
0.04188035801053047,
0.01439279317855835,
-0.021990051493048668,
0.006623739376664162,
0.019603976979851723,
-0.02584594488143921,
-0.04520177096128464,
0.019737597554922104,
-0.03747089207172394,
0.04901948943734169,
-0.051577359437942505,
0.021092887967824936,
-0.0339776836335659,
-0.004032463766634464,
-0.012588921934366226,
0.03985696658492088,
0.0146218566223979,
0.0024158991873264313,
0.01977577432990074,
0.09055624902248383,
0.02011936902999878,
-0.021073797717690468,
0.022028228268027306,
-0.011424518190324306,
-0.03512299805879593,
-0.07616345584392548,
-0.02785024605691433,
-0.04157494008541107,
-0.004967804532498121,
-0.019890306517481804,
0.03985696658492088,
0.010508266277611256,
-0.043216556310653687,
-0.050164803862571716,
0.006366043351590633,
-0.03466487303376198,
0.020214812830090523,
0.06421399861574173,
-0.018783168867230415,
-0.06719182431697845,
-0.025139667093753815,
0.011023658327758312,
-0.01137679722160101,
0.06948245316743851,
0.006022448651492596,
-0.02504422515630722,
0.044934529811143875,
-0.010508266277611256,
0.003006452228873968,
0.023154454305768013,
-0.035638388246297836,
0.013552895747125149,
0.048026882112026215,
-0.026800373569130898,
-0.03321414068341255,
0.044781822711229324,
-0.052035484462976456,
-0.04329291358590126,
-0.010088317096233368,
0.026342248544096947,
0.07173490524291992,
-0.040735043585300446,
-0.0109854806214571,
-0.012684364803135395,
-0.0374327152967453,
0.05367710441350937,
-0.03989514335989952,
0.055127836763858795,
0.05325715243816376,
0.0013075681636109948,
-0.05486059561371803,
-0.0436365082859993,
0.020195724442601204,
0.05692216381430626,
0.0154617540538311,
-0.05936549976468086,
-0.04814141243696213,
0.05222637206315994,
0.04783599451184273,
-0.0011632107198238373,
0.03989514335989952,
0.038253527134656906,
0.04917219653725624,
-0.026170451194047928,
-0.052951738238334656,
0.03668826073408127,
-0.04963032156229019,
0.026647666469216347,
0.005993816070258617,
-0.06890979409217834,
0.02922462485730648,
-0.05844924971461296,
0.00016762164887040854,
0.015060894191265106,
-0.05024115741252899,
-0.010269658640027046,
-0.03582927584648132,
0.007158219814300537,
-0.03266056999564171,
0.037642691284418106,
0.009859254583716393,
-0.006280144676566124,
-0.02290630340576172,
-0.020596584305167198,
0.010851860977709293,
-0.03491302207112312,
0.00781677570194006,
0.024624275043606758,
0.023116277530789375,
-0.06272508949041367,
0.025177843868732452,
0.006671460811048746,
0.0590982623398304,
-0.010804139077663422,
0.009730406105518341,
-0.012016264721751213,
-0.008179458789527416,
0.01639709435403347,
-0.02116924151778221,
-0.027105791494250298,
0.02983545884490013,
-0.001293251640163362,
0.028518347069621086,
0.02998816780745983,
-0.07253662496805191,
0.007444548420608044,
-0.00805061124265194,
0.02011936902999878,
-0.025101490318775177,
0.05298991501331329,
0.0056693097576498985,
-0.07078047841787338,
-0.013199756853282452,
-0.004318792372941971,
-0.06203790381550789,
0.018611371517181396,
-0.0563495047390461,
-0.06505390256643295,
-0.027296677231788635,
-0.01623484119772911,
0.02905282750725746,
0.05547143146395683,
0.0033810657914727926,
-0.012188062071800232,
-0.03203064575791359,
0.02534964121878147,
0.007377738133072853,
0.0003614900924731046,
-0.02382255531847477,
-0.002522079274058342,
0.016941118985414505,
-0.0245670098811388,
0.04352197423577309,
0.014707755297422409,
0.022677239030599594,
-0.06142706796526909,
-0.010174215771257877,
0.05749481916427612,
0.03262239322066307,
0.0031472304835915565,
-0.029816370457410812,
0.0015795804793015122,
0.0006287302821874619,
0.0377381332218647,
-0.018191421404480934,
0.06104529649019241,
0.0342831015586853,
-0.01806734688580036,
-0.020214812830090523,
-0.04081139713525772,
0.009830622002482414,
0.023478960618376732,
0.04875224828720093,
0.059021905064582825,
-0.09101437777280807,
-0.005979499313980341,
0.04352197423577309,
-0.0469960980117321,
-0.059021905064582825,
0.011854011565446854,
0.033023253083229065,
0.06295415759086609,
0.017361069098114967,
-0.017408790066838264,
0.010336468927562237,
-0.05222637206315994,
-0.015156337060034275,
0.022352734580636024,
0.03180158510804176,
0.028270196169614792,
0.016635702922940254,
0.044781822711229324,
0.01672160066664219,
-0.013552895747125149,
-0.004073027055710554,
0.0600145123898983,
0.029663661494851112,
-0.06990239769220352,
-0.003455033991485834,
0.037642691284418106,
0.04749239981174469,
0.0012837073300033808,
0.0030303129460662603,
-0.03298507630825043,
0.020653849467635155,
-0.004347425419837236,
-0.00397519813850522,
0.04405645653605461,
-0.008227180689573288,
0.016912486404180527
] |
52,384 |
zabbix_utils.exceptions
|
__init__
| null |
def __init__(self, api_error: Union[str, dict]):
if isinstance(api_error, dict):
api_error['body'] = ModuleUtils.hide_private(api_error['body'])
super().__init__("{message} {data}".format(**api_error))
for key, value in api_error.items():
setattr(self, key, value)
else:
super().__init__(api_error)
|
(self, api_error: Union[str, dict])
|
[
-0.05601634830236435,
-0.005223022773861885,
0.03663870692253113,
0.006208326667547226,
-0.03912021219730377,
-0.033901751041412354,
0.024869797751307487,
0.06630729883909225,
0.054264698177576065,
-0.01771722175180912,
0.07462764531373978,
0.030471432954072952,
0.03485056012868881,
0.0060076164081692696,
-0.041930150240659714,
0.06054144725203514,
0.013739514164626598,
0.03052617236971855,
0.0154273035004735,
-0.024869797751307487,
-0.011486087925732136,
0.004550187848508358,
-0.03280697017908096,
0.07546697556972504,
0.00325013417750597,
0.0759778767824173,
0.00497669680044055,
0.015545904636383057,
0.06076040491461754,
-0.06367982178926468,
-0.0005724797956645489,
-0.01859304867684841,
0.0236107986420393,
0.10349339246749878,
-0.028427841141819954,
-0.014615340158343315,
-0.05273200199007988,
-0.017762837931513786,
-0.16553103923797607,
0.03038020245730877,
-0.020289961248636246,
0.03391999751329422,
-0.059483155608177185,
-0.024559609591960907,
0.06711013615131378,
-0.013046152889728546,
-0.006463775411248207,
0.06765753030776978,
-0.06287698447704315,
-0.01682315021753311,
-0.06232959032058716,
0.008657901547849178,
-0.0023583429865539074,
0.01352055836468935,
-0.023483075201511383,
0.03280697017908096,
-0.005934630986303091,
0.04251403734087944,
-0.03908371925354004,
0.010701494291424751,
-0.0539727546274662,
0.05287797376513481,
0.010217965580523014,
-0.005542334169149399,
0.03094583936035633,
-0.032697491347789764,
-0.06543147563934326,
0.025763871148228645,
-0.02209635078907013,
0.018830250948667526,
0.05992107093334198,
0.03543444350361824,
-0.07977312058210373,
0.02944963611662388,
0.057549040764570236,
0.020618395879864693,
-0.08517403900623322,
0.027114102616906166,
0.023793263360857964,
0.011285378597676754,
0.03558041527867317,
0.03204062208533287,
-0.05116281285881996,
0.020928584039211273,
0.014140934683382511,
-0.059008751064538956,
-0.048060931265354156,
-0.03839035704731941,
-0.0019170090090483427,
0.03711311146616936,
-0.06973761320114136,
-0.016604194417595863,
-0.04886377230286598,
0.007052220869809389,
-0.014250412583351135,
0.03260625898838043,
0.029723333194851875,
-0.07802146673202515,
0.04787846654653549,
-0.006970112212002277,
0.020034510642290115,
-0.02063664048910141,
0.026822159066796303,
-0.030453186482191086,
0.011604689992964268,
-0.033482082188129425,
0.03868229687213898,
-0.05893576517701149,
0.03552567586302757,
0.015144485048949718,
-0.012161203660070896,
-0.020235221832990646,
-0.04714861139655113,
0.056563738733530045,
-0.01718807779252529,
0.002447294071316719,
-0.006053232122212648,
-0.052403565496206284,
0.005966562312096357,
0.007271177135407925,
0.06196466460824013,
-0.017261063680052757,
-0.01602943427860737,
0.012918427586555481,
0.06280399858951569,
0.04404672980308533,
-0.04641875997185707,
-0.016777534037828445,
0.0899180993437767,
-0.0543011873960495,
-0.017105968669056892,
-0.00475317845121026,
-0.010555523447692394,
-0.051089826971292496,
0.006769402418285608,
-0.004762301687151194,
-0.019998017698526382,
-0.003948057536035776,
0.0036173423286527395,
0.007549434434622526,
0.018775511533021927,
0.050469450652599335,
0.03391999751329422,
-0.039156705141067505,
-0.007631543092429638,
-0.012434898875653744,
0.016585947945713997,
0.012617362663149834,
-0.01315563078969717,
-0.017005614936351776,
-0.02689514495432377,
0.035981837660074234,
0.02563614584505558,
0.02808116003870964,
-0.013219493441283703,
-0.03995954617857933,
-0.012936674058437347,
-0.027916941791772842,
0.05627179518342018,
-0.00012679799692705274,
0.020198728889226913,
-0.0860498696565628,
0.022224076092243195,
-0.05988457798957825,
0.014843420125544071,
-0.0036743623204529285,
0.04079887643456459,
-0.0899180993437767,
-0.02120227925479412,
0.053899768739938736,
-0.020052757114171982,
-0.041930150240659714,
-0.02324587106704712,
0.02406695857644081,
-0.008817557245492935,
0.03335436061024666,
0.014642709866166115,
-0.008612285368144512,
0.005774975288659334,
-0.019395887851715088,
0.0043859705328941345,
0.015053252689540386,
-0.014332521706819534,
0.03545268997550011,
0.016686303541064262,
-0.004497729707509279,
-0.030617404729127884,
0.04751354083418846,
0.006618869956582785,
0.04163821041584015,
0.03315364941954613,
-0.012197696603834629,
0.013538804836571217,
-0.018611295148730278,
0.007585927378386259,
0.04017850011587143,
0.016832273453474045,
-0.04273299127817154,
0.020965075120329857,
0.04295194894075394,
-0.055468957871198654,
0.04152873158454895,
-0.007293985225260258,
0.01667718030512333,
0.019998017698526382,
0.014204797334969044,
0.0037929636891931295,
0.014587970450520515,
-0.05214811861515045,
-0.0321318544447422,
-0.00923722330480814,
0.03401122987270355,
0.01075623370707035,
0.03497828543186188,
0.0010930714197456837,
-0.00445667514577508,
0.06605184823274612,
-0.014889035373926163,
0.04017850011587143,
0.015710122883319855,
0.09655977785587311,
0.0008655620622448623,
0.014889035373926163,
-0.05543246492743492,
-0.020198728889226913,
0.059008751064538956,
0.0012544377241283655,
-0.02656671032309532,
-0.029157694429159164,
0.016357868909835815,
-0.021293509751558304,
-0.0327887237071991,
-0.05411872640252113,
0.01892148330807686,
-0.04090835526585579,
-0.01651296205818653,
0.043280381709337234,
-0.06280399858951569,
-0.02558140642940998,
-0.05685568228363991,
0.04284247010946274,
-0.029102955013513565,
-0.036711692810058594,
0.05200214684009552,
-0.009944270364940166,
-0.05028698965907097,
-0.021767916157841682,
0.07751056551933289,
-0.06776700913906097,
-0.007275738753378391,
0.03955812379717827,
0.004739494062960148,
-0.039777081459760666,
0.02089209109544754,
0.02443188615143299,
-0.05149124935269356,
0.01555502787232399,
-0.03846334293484688,
0.03974058851599693,
-0.024139944463968277,
0.011020805686712265,
0.020289961248636246,
-0.03554392233490944,
0.079189233481884,
-0.014587970450520515,
-0.03882826864719391,
-0.002268251497298479,
0.04130977392196655,
0.003355050692334771,
0.017671607434749603,
0.09174273163080215,
0.012589993886649609,
0.04039745777845383,
0.03645624220371246,
-0.02558140642940998,
0.027789216488599777,
-0.018492693081498146,
0.026092305779457092,
-0.02173142321407795,
-0.04225858673453331,
0.061307795345783234,
-0.04404672980308533,
0.03021598421037197,
0.023683784529566765,
0.06871581822633743,
-0.034887053072452545,
0.008119633421301842,
0.039594616740942,
-0.04222209379076958,
-0.0040940288454294205,
0.007353285793215036,
0.0041054324246943,
-0.033007677644491196,
0.059118229895830154,
-0.0126082394272089,
-0.006235695909708738,
-0.05068840831518173,
0.04612681642174721,
0.0011398277711123228,
-0.08444418758153915,
-0.014952898025512695,
0.02558140642940998,
0.0060988483019173145,
0.0022636898793280125,
0.004689316265285015,
-0.044630613178014755,
0.010144980624318123,
-0.0034622482489794493,
-0.0181916281580925,
-0.011048175394535065,
0.0656869187951088,
0.06608834117650986,
-0.019049206748604774,
-0.0026320384349673986,
-0.004365443252027035,
0.025362450629472733,
0.05433768033981323,
-0.016841396689414978,
-0.029613854363560677,
0.06302295625209808,
-0.014487615786492825,
-0.08707166463136673,
-0.009004582650959492,
-0.03585411235690117,
0.044265687465667725,
-0.013785130344331264,
0.06346086412668228,
-0.027679739519953728,
0.011924001388251781,
-0.0008182355086319149,
-0.02684040553867817,
0.005519526079297066,
-0.0066872937604784966,
-0.057038143277168274,
-0.005031435750424862,
-0.034777574241161346,
-0.037021879106760025,
-0.024030465632677078,
0.005569703411310911,
-0.03505127131938934,
-0.026019319891929626,
-0.01633962243795395,
-0.009570219554007053,
0.034777574241161346,
-0.0181095190346241,
-0.04320739954710007,
0.012316297739744186,
-0.040871862322092056,
0.01867515780031681,
-0.027059363201260567,
-0.06608834117650986,
0.0054875947535037994,
0.018155135214328766,
0.003300311742350459,
0.07083240151405334,
-0.06134428828954697,
-0.05813292786478996,
-0.03776998072862625,
0.012471391819417477,
0.00511810602620244,
0.07510204613208771,
0.0015840127598494291,
-0.04419270157814026,
0.007312231697142124,
-0.031091809272766113,
0.0022112317383289337,
-0.007585927378386259,
-0.012754211202263832,
0.03315364941954613,
-0.006121656391769648,
0.0021929852664470673,
-0.042660005390644073,
-0.025836855173110962,
-0.027971681207418442,
0.005058805458247662,
0.056563738733530045,
-0.043280381709337234,
-0.010363936424255371,
-0.0976545587182045,
0.0022089509293437004,
0.05623530223965645,
-0.043681804090738297,
0.016741041094064713,
-0.0046300156973302364,
0.025234725326299667,
-0.03474108502268791,
-0.02120227925479412,
-0.013420202769339085,
0.06437318027019501,
0.0431344136595726,
0.0024632595013827085,
-0.01779933087527752,
0.019870294257998466,
0.06218361854553223,
-0.003108724718913436,
-0.017425280064344406,
-0.005998493172228336,
-0.018602171912789345,
-0.005843399092555046,
0.015253962948918343,
0.017105968669056892,
-0.014241289347410202,
0.004848971962928772,
-0.003646992612630129,
0.06550446152687073,
0.009155115112662315,
0.03448563441634178,
0.03271573781967163,
-0.016385238617658615,
0.002691339235752821,
0.0539727546274662,
-0.029467882588505745,
-0.011759784072637558,
-0.03271573781967163,
-0.00968882068991661,
0.03510601073503494,
-0.011549950577318668,
0.012279804795980453,
-0.049739595502614975,
-0.003535233670845628,
0.0181095190346241,
0.00935126282274723,
0.019870294257998466,
0.004771424923092127,
-0.02193213440477848,
0.038061920553445816,
-0.008776502683758736,
-0.05368081107735634,
0.08721763640642166,
-0.011942247860133648,
0.011440472677350044,
0.061709214001894,
-0.019633091986179352,
0.0018862182041630149,
0.02167668379843235,
-0.02074611932039261,
-0.021074553951621056,
-0.011340117081999779,
-0.014286905527114868,
0.03809841349720955,
0.012653855606913567,
-0.022059857845306396,
0.04276948422193527,
0.06762103736400604,
0.008274727500975132,
-0.003409789875149727,
-0.02240653894841671,
0.03371928632259369,
0.02266198769211769,
-0.020034510642290115,
0.035142503678798676,
-0.0099807633087039,
0.013328971341252327,
-0.015326948836445808,
-0.00926459301263094,
-0.050250496715307236,
-0.03857282176613808,
-0.02021697536110878,
0.021019814535975456,
0.006440967787057161,
-0.03340910002589226,
0.022862698882818222,
-0.061818692833185196,
0.01013585738837719,
-0.028263622894883156,
0.06251205503940582,
0.044740092009305954,
-0.0215124674141407,
-0.02047242410480976,
0.008470876142382622,
-0.015710122883319855,
0.016522085294127464,
0.02330061048269272,
0.03766050189733505,
0.012571747414767742,
0.010254458524286747,
0.024158190935850143,
-0.04579838365316391,
-0.06714662909507751,
-0.04930168390274048,
0.02970508672297001,
0.016020311042666435,
0.023264117538928986,
-0.02417643740773201,
0.009241784922778606,
-0.05477559566497803,
-0.015089745633304119,
0.0197425689548254,
0.0052184611558914185,
0.015390810556709766,
0.010181472636759281,
0.020764365792274475,
-0.07181770354509354,
0.0036378693766891956,
-0.02016223594546318,
-0.00937863253057003,
-0.029869303107261658,
0.028208883479237556,
0.0018668314442038536,
-0.04612681642174721,
0.00548303360119462,
-0.016658933833241463,
-0.012772456742823124,
-0.02193213440477848,
0.023008668795228004,
-0.006153587251901627,
-0.019614845514297485,
0.04605383053421974,
0.04083536937832832,
0.00974356010556221,
-0.03687590733170509,
0.03182166442275047,
0.0005376976332627237,
0.0007902957731857896,
0.008247357793152332,
-0.029887549579143524,
-0.061709214001894,
0.01797267235815525,
-0.017671607434749603,
0.010883958078920841,
0.010856588371098042,
0.02308165468275547,
0.03901073336601257,
-0.02069137990474701,
0.02844608575105667,
-0.004493168089538813,
0.048535335808992386,
-0.024559609591960907,
-0.01281807292252779,
0.02547192946076393,
-0.026201782748103142,
-0.010382182896137238,
0.029686840251088142,
0.039886560291051865,
-0.02496103011071682,
0.03893774747848511,
-0.01687788963317871,
0.02625652216374874,
-0.055943362414836884,
-0.016376115381717682,
0.02569088526070118,
0.07408025115728378,
0.005460225511342287,
-0.05554194375872612,
-0.029413143172860146,
-0.06517602503299713,
-0.03933916613459587,
0.05813292786478996,
-0.017397910356521606,
-0.007088713813573122,
-0.029942288994789124,
-0.02251601777970791,
-0.03536146134138107,
0.04933817684650421,
-0.08013804256916046,
-0.022753220051527023,
0.0009254329488612711,
-0.014788680709898472,
0.04714861139655113,
0.02224232256412506,
-0.003774717217311263,
0.007836814969778061,
-0.0015566431684419513,
-0.03147498518228531,
-0.03448563441634178,
0.015472919680178165,
-0.05700165033340454,
0.05820591002702713,
-0.06656274944543839,
0.014843420125544071,
-0.0253806971013546,
-0.026511970907449722,
-0.03198588266968727,
0.04047044366598129,
0.007033974397927523,
-0.017708100378513336,
0.0126356091350317,
0.0798461064696312,
0.0022431628312915564,
-0.01855655573308468,
0.008776502683758736,
0.012124710716307163,
0.012735964730381966,
-0.04795145243406296,
-0.014587970450520515,
-0.053534843027591705,
-0.01305527612566948,
-0.016467345878481865,
0.04915571212768555,
-0.026092305779457092,
-0.05320640653371811,
-0.038171399384737015,
-0.011039052158594131,
-0.02465084195137024,
0.020800858736038208,
0.07262054085731506,
-0.00085301767103374,
-0.09108586609363556,
-0.01906745322048664,
0.00476686330512166,
-0.013958470895886421,
0.06309593468904495,
-0.03576287999749184,
0.020289961248636246,
0.005254953633993864,
-0.017753714695572853,
0.019888540729880333,
0.05503104254603386,
-0.007617858238518238,
0.021074553951621056,
0.04156522452831268,
0.0013867239467799664,
0.0013684775913134217,
0.016348745673894882,
-0.015098868869245052,
-0.03204062208533287,
0.007102398667484522,
0.028829259797930717,
0.06561394035816193,
-0.04167470335960388,
-0.01800004206597805,
-0.014706571586430073,
-0.033901751041412354,
0.06539498269557953,
-0.05700165033340454,
0.038536328822374344,
0.022917436435818672,
-0.004661947023123503,
-0.08984511345624924,
-0.057767998427152634,
0.024249421432614326,
0.030507925897836685,
0.011732414364814758,
-0.04397374391555786,
-0.03813490644097328,
0.06006704270839691,
0.04627278819680214,
0.017361419275403023,
0.06043196842074394,
0.04054342955350876,
0.0033025925513356924,
-0.03497828543186188,
-0.03417544439435005,
0.03966760262846947,
-0.0575125515460968,
0.028482578694820404,
-0.032642751932144165,
-0.04149223864078522,
0.0017584935994818807,
-0.032861705869436264,
-0.009707067161798477,
0.04076238349080086,
-0.031438492238521576,
0.006381666753441095,
-0.0018166539957746863,
0.03140199929475784,
-0.01597469486296177,
0.019213424995541573,
0.01566450670361519,
-0.009396879002451897,
-0.02240653894841671,
-0.01165030524134636,
-0.01008111797273159,
-0.020344698801636696,
0.015454673208296299,
0.011175899766385555,
0.014952898025512695,
-0.06189167872071266,
0.02344658225774765,
0.0057156747207045555,
0.03527022898197174,
0.010400429368019104,
-0.014323398470878601,
-0.006208326667547226,
-0.010071994736790657,
0.01785407029092312,
-0.007248369511216879,
-0.05634478107094765,
0.05787747725844383,
0.002099472563713789,
-0.004785109777003527,
0.0215124674141407,
-0.06674521416425705,
-0.01771722175180912,
-0.03886476159095764,
0.04112731292843819,
0.000015921024896670133,
0.06324190646409988,
0.016558578237891197,
-0.07411674410104752,
-0.036237284541130066,
-0.023373596370220184,
-0.060103535652160645,
-0.008958966471254826,
-0.04685667157173157,
-0.059373680502176285,
-0.04751354083418846,
-0.03868229687213898,
0.021640190854668617,
0.0433533675968647,
0.020143989473581314,
0.005501279607415199,
-0.04156522452831268,
-0.020034510642290115,
-0.016275759786367416,
-0.02757026068866253,
-0.007969100959599018,
-0.006769402418285608,
-0.001147240400314331,
-0.025289464741945267,
0.04842585697770119,
0.030653897672891617,
0.006395351607352495,
-0.06769402325153351,
-0.02501576952636242,
0.03412070870399475,
0.06638028472661972,
0.0007731898222118616,
-0.012644732370972633,
-0.018830250948667526,
0.03260625898838043,
0.05459313094615936,
-0.018994469195604324,
0.07787549495697021,
0.03505127131938934,
-0.014697449281811714,
-0.005200214684009552,
-0.04032447189092636,
0.051673710346221924,
-0.005962000694125891,
0.05287797376513481,
0.05780449137091637,
-0.08064894378185272,
-0.010655878111720085,
0.005998493172228336,
-0.04663771390914917,
-0.03357331454753876,
0.028208883479237556,
0.036656953394412994,
0.06043196842074394,
0.01836496777832508,
-0.002058418234810233,
0.038426849991083145,
-0.023264117538928986,
-0.039047226309776306,
0.030836360529065132,
0.039375659078359604,
-0.0072848619893193245,
0.018793758004903793,
0.07426271587610245,
0.00922353845089674,
-0.013447572477161884,
-0.022424785420298576,
0.0647016167640686,
0.027862202376127243,
-0.03012475185096264,
-0.024942783638834953,
0.037551023066043854,
0.04273299127817154,
0.01250788476318121,
-0.03255151957273483,
-0.0433533675968647,
0.051089826971292496,
0.01667718030512333,
0.0287015363574028,
0.05809643492102623,
-0.004518256522715092,
0.028482578694820404
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.