text
stringlengths
25
2.19k
embedding
listlengths
768
768
def calc _ mat _ variance ( mat ) : # if mat is not np. ndarray, then convert it into np. ndarray if type ( mat ). _ _ module _ _! = np. _ _ name _ _ : mat = mat. toarray ( ) mat _ t = mat. transpose ( ) mat _ mat _ t = mat. dot ( mat _ t ) # sum up diagonal variance = 0. 0 for i in range ( 0, mat _ mat _ t. shape [ 0 ...
[ -0.1438158005475998, -0.03185807913541794, 0.6780754327774048, -0.4074322581291199, -0.15361067652702332, 0.12781427800655365, 0.6871461868286133, -0.557295560836792, 0.6553574800491333, 0.21155855059623718, 0.06444798409938812, 0.6871429681777954, 0.17833201587200165, 0.17906850576400757,...
def tmout _ new ( mxbfl = 1024 ) : return _ snap. tmout _ new ( mxbfl )
[ -0.03271441161632538, 0.16426628828048706, 0.147300124168396, -0.4532809853553772, -0.7911214232444763, -0.7576159834861755, 0.5792783498764038, -0.09238696843385696, -1.1622850894927979, 0.25540775060653687, -1.0214829444885254, -1.4424937963485718, 0.05426308140158653, 0.7781778573989868...
def _ demo _ input _ train ( img _ shape, batch _ size = 1, cuda = false, meta = { } ) : color _ shape = ( batch _ size, 3, img _ shape [ 0 ], img _ shape [ 1 ] ) gray _ shape = ( batch _ size, 1, img _ shape [ 0 ], img _ shape [ 1 ] ) merged = torch. from _ numpy ( np. random. random ( color _ shape ). astype ( np. fl...
[ -0.16707178950309753, 0.4298597276210785, 0.8650989532470703, -0.6384146213531494, 0.14200137555599213, -0.1756703108549118, 0.11822200566530228, 0.08244261890649796, -0.29856452345848083, 0.15811923146247864, 0.2066294401884079, 0.4710254371166229, 1.3329282999038696, 0.17842407524585724,...
def setup ( app : sphinx ) - > dict [ str, any ] : app. add _ post _ transform ( admonitionid ) return { " version " : _ _ version _ _, " parallel _ read _ safe " : true, " parallel _ write _ safe " : true, }
[ 1.3997241258621216, 0.42737042903900146, 0.2672424912452698, -0.5874311923980713, 0.7913588285446167, -0.45336949825286865, -0.42397958040237427, -0.1551329642534256, 0.10102708637714386, 0.6512797474861145, -0.9024637937545776, -0.05489140376448631, 0.06660391390323639, 0.2685027122497558...
def genext ( self, * args ) : return _ snap. tstrv _ genext ( self, * args )
[ -1.1961591243743896, 1.0256597995758057, 0.09432471543550491, -0.9104117155075073, 0.20523419976234436, 0.07825438678264618, -0.4303542971611023, 0.7670497298240662, -0.8610755801200867, -0.513464093208313, -0.8862394094467163, 0.11449479311704636, 0.12138070166110992, 0.6205047369003296, ...
def test _ subclasses _ omni _ field ( self ) : self. asserttrue ( issubclass ( omniurlfield, omnifield ) )
[ 0.42640241980552673, 0.2889007031917572, 0.34497806429862976, 0.953165590763092, -0.17399904131889343, 1.4452457427978516, -0.11239176243543625, 0.17596383392810822, 0.9952054619789124, -0.8083474636077881, -0.9280927181243896, -0.11131493002176285, -0.9369632005691528, -0.0893753468990325...
def _ open _ file ( self, path ) : return open ( path,'r + b')
[ -0.35178330540657043, 0.16650503873825073, 0.27192845940589905, -1.007382869720459, -0.6099312901496887, 0.9872663021087646, 0.18736553192138672, 0.4812026023864746, -0.5776115655899048, -0.7232856750488281, 1.0114166736602783, -0.7334022521972656, -0.4022558033466339, -1.399284839630127, ...
def test _ subclasses _ omni _ field ( self ) : self. asserttrue ( issubclass ( omnidurationfield, omnifield ) )
[ 0.7027505040168762, 0.6469871997833252, 0.47450971603393555, 1.3058481216430664, -0.12819650769233704, 1.4476618766784668, 0.10005059838294983, -0.06252902001142502, 0.9042317867279053, 0.07852685451507568, -0.7226649522781372, -0.002960693556815386, -0.7952187657356262, 0.0003727227449417...
def test _ register _ createnewuser ( self ) : c = client ( ) register _ info = { " username " : " registerman ", " email " :'register @ register. com ', " firstname " : " reginald ", " lastname " :'register ', " password " : " secret " } response = c. post ( " / register ", register _ info, follow = true ) self. asser...
[ -0.5949043035507202, 0.8643223643302917, 0.43545493483543396, 0.843608021736145, 1.0239973068237305, 0.5239861607551575, -0.04500420019030571, -0.1453627347946167, -0.2775096595287323, -0.6866459250450134, -1.439355492591858, -0.39630579948425293, -0.3836061656475067, 0.7743234634399414, ...
def auto _ apply _ tail ( * args ) : return _ ida _ auto. auto _ apply _ tail ( * args )
[ -0.6526223421096802, -0.30919352173805237, 0.47462186217308044, 0.6246386766433716, 0.19568882882595062, 0.4086626470088959, 0.6714873909950256, -0.14945228397846222, 0.061648450791835785, -0.38992470502853394, -0.9828104376792908, 0.9401839971542358, -0.5944124460220337, 0.979548335075378...
def get _ edu _ institutions _ section ( ) : from django. template. loader import get _ template from django. template import context teduinst = get _ template ('app / userregistration / edu _ inst _ form. html') insts = get _ org _ groups ( ) csection = context ( {'section': _ ( u'fall 2 : angehorige ( r ) einer spezi...
[ -0.7704891562461853, 0.7624785900115967, 0.2147931009531021, -1.2902565002441406, -0.18510419130325317, 0.7397727370262146, 0.28412458300590515, -0.051424283534288406, -0.3568277359008789, -0.022806929424405098, 0.9407342672348022, -0.03359873592853546, 0.17729239165782928, 0.3093618154525...
def _ is _ legacy _ ip _ per _ task ( app ) : return app. get ('ipaddress') is not none
[ 0.25773486495018005, 0.27768847346305847, 0.38841721415519714, 0.9455885887145996, -0.685650110244751, 0.018876995891332626, -0.5758692026138306, 1.3010096549987793, 0.1495361328125, 0.7101232409477234, 0.5417361855506897, -0.7326690554618835, 0.9173173308372498, -0.07554728537797928, -1...
def slice _ word ( message ) : command = re. split ('', message, 1 ) if len ( command ) = = 1 : return command [ 0 ],'' else : return command [ 0 ], command [ 1 ]
[ 0.0015516114654019475, 0.08233033120632172, 0.5201890468597412, 0.6691047549247742, 0.4563344717025757, -0.4001646935939789, 0.5556974411010742, 0.12189634144306183, -0.3857312798500061, 1.3469817638397217, 0.3943823277950287, 0.6119835376739502, -1.399741768836975, 0.575377345085144, 0....
def names ( self ) : return sorted ( set ( i [ 0 ] if'['not in i [ 0 ] else i [ 0 ] [ : i [ 0 ]. index ('[') ] for i in self. _ items ) )
[ -0.00892478134483099, -0.8337430357933044, 0.701692521572113, -0.6316477656364441, -0.27844932675361633, 0.46182459592819214, -0.18467897176742554, -1.243068814277649, 0.07136500626802444, 0.8944975137710571, -1.1054376363754272, 0.5998876094818115, -0.2216302454471588, -0.5801312327384949...
def powerseriespolynomialinterp3d ( x, y, z, interpolationarguments, returncoefficients = false ) : desiredpoints = numpy. zeros ( ( len ( interpolationarguments ), 3 ) ) " " " build the matrix of coefficients to solve the system of equations : [ 1, argumnet, argument ^ 2,..., argument ^ ( n - 1 ) ] * [ unknown polynom...
[ 0.06084708496928215, -0.13254445791244507, 0.888079822063446, 0.09946035593748093, 0.5013744235038757, -0.15347857773303986, -0.5860632061958313, 0.6081118583679199, 0.23504196107387543, -0.12647588551044464, -0.15364116430282593, 0.1796160191297531, -0.9646202921867371, -1.242456436157226...
def _ set _ attr ( self ) : for key, value in self. job. items ('defaults') : value = self. get _ val ('defaults ', key ) setattr ( self, key, value ) for key, value in self. job. items ('job') : value = self. get _ val ('job ', key ) setattr ( self, key, value ) for key, value in self. cmd _ options. _ _ dict _ _. ite...
[ -0.6767405867576599, -0.43953394889831543, 0.3083096444606781, -0.41783449053764343, 0.49879056215286255, -0.17863240838050842, -0.2840753495693207, -0.20418712496757507, -1.1662710905075073, -0.45070722699165344, 0.18851572275161743, -0.46112439036369324, 0.541800320148468, 1.314238786697...
def test _ get _ field ( self ) : field _ 1 = self. omniform. _ get _ field ('title') field _ 2 = self. omniform. _ get _ field ('agree') field _ 3 = self. omniform. _ get _ field ('fictional') self. assertisinstance ( field _ 1, forms. charfield ) self. assertisinstance ( field _ 1. widget, forms. textinput ) self. as...
[ -0.7021101117134094, 0.2927466332912445, 0.5432971119880676, -0.7036644220352173, 0.9112359881401062, 0.599043607711792, -0.8078888654708862, 0.03698233887553215, -0.08521851897239685, -0.505435049533844, -0.7452065944671631, 0.026561249047517776, -0.6015945076942444, -0.26546359062194824,...
def it _ can _ extract _ a _ module _ docstring ( self ) : test _ vector ='''" " " one module level docstring " " " def a _ function : pass'''assert get _ list _ of _ tokens _ from _ text ( test _ vector ) = = ['one module level docstring']
[ 0.3643370270729065, 0.12186753004789352, 0.1742900311946869, 0.36792489886283875, 0.4759689271450043, 0.07274934649467468, 0.3268640637397766, -0.09789207577705383, 0.4259929656982422, -0.480131059885025, -0.3636281192302704, 0.6545861959457397, -0.5405590534210205, 0.8192035555839539, -...
def transform ( omega, v, th ) : t = np. eye ( 4 ) skomega = skew ( omega ) p = th * np. eye ( 3 ) + ( 1 - np. cos ( th ) ) * skomega + \ ( th - np. sin ( th ) ) * skomega. dot ( skomega ) p = np. dot ( p, v ) r = rotation ( omega, th ) t [ 0 : 3, 0 : 3 ] = r t [ 0 : 3, 3 ] = p return t
[ -0.22255274653434753, -0.07256428897380829, 0.5737104415893555, -1.1975239515304565, 0.7675138711929321, -0.5875364542007446, -0.023784536868333817, 0.29968249797821045, 1.0459352731704712, 1.5342367887496948, -1.1856586933135986, 0.29277655482292175, -0.4846141040325165, -0.98606574535369...
def url _ permutations ( url ) : def url _ host _ permutations ( host ) : if re. match ( r'\ d + \. \ d + \. \ d + \. \ d + ', host ) : yield host return parts = host. split ( '.') l = min ( len ( parts ), 5 ) if l > 4 : yield host for i in xrange ( l - 1 ) : yield '. '. join ( parts [ i - l : ] ) def url _ path _ perm...
[ -0.697551429271698, 0.30547499656677246, 0.7251745462417603, -0.06573276221752167, -0.8946324586868286, 0.19175007939338684, 0.9820266366004944, -0.061536360532045364, 0.44255751371383667, -0.49818578362464905, -0.33978554606437683, -0.3812235891819, -0.5448352098464966, -0.430851876735687...
def addintattrdatn ( self, * args ) : return _ snap. pneanet _ addintattrdatn ( self, * args )
[ -1.1351271867752075, 0.6076415777206421, 0.6074696779251099, 0.1685171127319336, 0.38406822085380554, 0.3615531325340271, -0.0929097980260849, -0.2005862593650818, -0.693795382976532, -0.9304648637771606, -0.9614933729171753, -0.7407309412956238, -0.10211960226297379, 0.5387736558914185, ...
def exercise _ 03 ( prefix = " tst _ 2 _ exercise _ 03 " ) : h _ records = " " " \ helix 13 13 ser a 466 tyr a 472 1 7 " " " pdb _ inp = iotbx. pdb. input ( source _ info = none, lines = tst _ 03 _ start _ lines ) ann = ioss. annotation. from _ records ( records = h _ records. split ('\ n') ) model = mmtbx. model. mana...
[ 0.13863037526607513, 0.1931498646736145, 0.6238519549369812, 0.6292099356651306, -0.18350599706172943, 1.0682936906814575, 0.2277473658323288, 0.5303869843482971, 0.059710096567869186, 0.14342083036899567, -0.8431553840637207, 0.5215948820114136, -0.5441023707389832, -0.4141160249710083, ...
def sumout ( self, variable ) : pos = self. varlist. index ( variable ) # 和 的 的 new _ var _ list = self. varlist [ : pos ] + self. varlist [ pos + 1 : ] new _ cpt _ keyset = sorted ( list ( set ( [ k [ : pos ] + k [ pos + 1 : ] for k in self. cpt. keys ( ) ] ) ) ) # 新 的 合 成 的 合 new _ cpt = { } for new _ key in new _ cp...
[ -0.5127661824226379, -0.12000133842229843, 0.6834577322006226, -0.3414820730686188, -1.1262179613113403, -0.8767180442810059, 0.7597774863243103, 0.32762274146080017, -0.02065751515328884, 0.3418058753013611, -1.0473297834396362, -0.12588760256767273, -0.820195734500885, 0.4063742458820343...
def tstr _ getnrfext ( * args ) : return _ snap. tstr _ getnrfext ( * args )
[ 0.3258286416530609, 0.9042284488677979, 0.22812846302986145, 0.15377317368984222, 0.5578848123550415, -0.33201301097869873, -0.6028411984443665, -0.9317966103553772, -0.7418748140335083, -0.6886633038520813, -0.7228665947914124, 0.36129218339920044, -0.3025228679180145, 0.7853149175643921,...
def test _ cluster ( ) : inputs = {'a': ( 4, 0, 0, 0 ),'b': ( 0, 4, 0, 0 ),'c': ( 0, 0, 4, 0 ),'d': ( 0, 0, 0, 4 ), } # by choosing 1 cluster, we guarantee the outcome must always be the same no matter the randomness amount _ of _ clusters = 1 inputs = make _ dict ( inputs ) # attempting to modify the input would cause...
[ -0.33958911895751953, 0.5502006411552429, 0.4896436333656311, -0.2668102979660034, 0.42016422748565674, -0.19812873005867004, 0.9620612859725952, -0.5702736377716064, 1.0811576843261719, -0.6842299699783325, -0.015202718786895275, -0.12973593175411224, -0.450470507144928, -0.41843819618225...
def getindegcnt _ pngraph ( * args ) : return _ snap. getindegcnt _ pngraph ( * args )
[ -0.5046892762184143, 0.9252485632896423, 0.500240683555603, -0.6731207966804504, 0.3353465497493744, -0.44289177656173706, 0.9218547940254211, -0.4846901595592499, -1.0450044870376587, -0.2540866732597351, -0.7778121829032898, 0.38590046763420105, -0.4627508819103241, -0.4772758483886719, ...
async def _ handle _ content ( self, message : message, content : str ) : if content : content = content. strip ( ) # check if it is a shortcut reaction command. for check, handler in self. shortcut _ handlers. items ( ) : if check ( content ) : await handler ( message, content ) break # default to proxying the message...
[ 0.939389169216156, 0.2529032826423645, 0.581953227519989, 0.02030370570719242, 0.523130476474762, -0.6084142327308655, 0.15654915571212769, 0.2675769627094269, -0.27106577157974243, -0.37006163597106934, 0.9425573348999023, 0.04794040694832802, -0.9306590557098389, -0.09710733592510223, ...
def mock _ tf ( symbol _ name : str, * args : any, * * kwargs : any ) - > iterator [ none ] : # pylint : disable = g - import - not - at - top, reimported import tensorflow as tf _ lib1 import tensorflow. compat. v2 as tf _ lib2 # pylint : enable = g - import - not - at - top, reimported tf _ symbol, * tf _ submodules,...
[ -0.29783058166503906, 0.07691910862922668, 0.5901572108268738, -0.26898181438446045, 0.263997346162796, -0.11253094673156738, 1.0149991512298584, -0.17394453287124634, -0.05525972694158554, 0.35181325674057007, -0.1651722937822342, 0.4220922887325287, -0.18881383538246155, -0.2112693935632...
def get _ redirect _ url ( self, * args, * * kwargs ) : backend = self. signature _ backend signer = self. get _ object ( ) # callback compat if backend. use _ callback : return self. get _ signer _ return _ with _ callback _ url ( ) docusign _ event = self. request. get. get ('event') if docusign _ event = ='cancel': ...
[ -0.3534986078739166, -0.28467807173728943, 0.7818674445152283, 0.43103596568107605, -0.5182152390480042, 0.35112857818603516, 0.5979008078575134, 0.5962549448013306, 0.8193860650062561, -0.3154381811618805, 0.2079034000635147, -0.705923855304718, 0.4633933901786804, 0.9241036772727966, -...
def load ( * args ) : return _ snap. tgstat _ load ( * args )
[ -0.45660820603370667, 0.7167333364486694, 0.25670555233955383, -0.5988355278968811, -0.39999639987945557, 1.044524073600769, 0.7557998895645142, -0.8312910199165344, -1.0518521070480347, 0.34535452723503113, -0.6175730228424072, -1.2674751281738281, -0.2917559742927551, -0.0416001901030540...
def analyzeallruns ( ) : infile = open ( os. path. join ( home _ dir, " all _ runs _ template. fsf " ), " r " ) template = infile. read ( ) infile. close ( ) template = template. replace ( " cur _ dir ", home _ dir ) template = template. replace ( " templates _ dir ", template _ dir ) outfile = open ( os. path. join ( ...
[ 0.6216427683830261, -0.9214587807655334, 0.682539701461792, 0.793442964553833, 0.10815175622701645, -0.5362520217895508, 1.0579118728637695, 0.6677561402320862, -0.19702328741550446, -1.0163683891296387, -0.4327797591686249, 0.30851975083351135, 0.6128485798835754, 1.2636914253234863, 0....
def test _ publication _ status _ is _ reflected ( self ) : with self. app. app _ context ( ) : session = classic. current _ session ( ) # publication agent publishes the paper. db _ submission = session. query ( classic. models. submission ) \. get ( self. submission. submission _ id ) db _ submission. status = db _ s...
[ 0.663154125213623, -1.0503530502319336, 0.25251156091690063, -0.21999476850032806, 0.3901206851005554, 0.5324479341506958, -0.43853336572647095, 0.9572158455848694, 0.013533157296478748, -0.03649646416306496, -0.24559664726257324, 0.19501745700836182, 0.08256888389587402, 0.830204308032989...
def find _ x _ position _ box ( box _ plotter, boxname ) : if box _ plotter. plot _ hues is none : cat = boxname hue _ offset = 0 else : cat = boxname [ 0 ] hue = boxname [ 1 ] hue _ offset = box _ plotter. hue _ offsets [ box _ plotter. hue _ names. index ( hue ) ] group _ pos = box _ plotter. group _ names. index ( c...
[ -0.9419301748275757, 0.39148062467575073, 0.9373061060905457, -0.5835758447647095, -0.5444284081459045, 0.04098749905824661, -0.18881851434707642, -0.25855204463005066, -0.4525994658470154, -0.145297110080719, -0.29272860288619995, -0.44609907269477844, 0.21209809184074402, 0.4687170684337...
def getintval ( self, * args ) : return _ snap. ttable _ getintval ( self, * args )
[ -0.18270966410636902, 0.8247672319412231, 0.5243322849273682, 1.0435220003128052, 0.5476922392845154, 0.08041656762361526, 0.41774773597717285, -1.2302075624465942, -2.030848503112793, -0.2008703052997589, -0.20853418111801147, -0.3181842565536499, -0.1222514808177948, 0.4869541525840759, ...
def test _ do _ region _ create _ calls _ host _ manager ( self, mock _ create ) : client = mock. mock ( ) session = mock. mock ( ) session. project _ id = 1 client. regions = regions. regionmanager ( session,'http : / / 127. 0. 0. 1 /') regions _ shell. do _ region _ create ( client, self. region _ valid _ fields ) mo...
[ 0.35741719603538513, 0.9700095653533936, 0.3333171308040619, 0.2559240758419037, 0.8173633217811584, 0.9538813829421997, -0.4255128502845764, -0.21729101240634918, -0.7171782851219177, -0.9080425500869751, -0.6807199120521545, -0.12702292203903198, 0.001314980210736394, 0.6731268763542175,...
def _ generate _ citrine _ to _ sample _ map ( ) : cmap = { } cmap [ " material _ name " ] = 0 cmap [ " formula " ] = 1 cmap [ " identifier " ] = 2 cmap [ " average _ thickness _ of _ growth " ] = 3 cmap [ " standard _ deviation _ of _ growth " ] = 4 cmap [ " number _ of _ layers " ] = 5 cmap [ " growth _ coverage " ] ...
[ 0.5336369872093201, -1.0328938961029053, 0.6924169659614563, -1.3701199293136597, -0.26623404026031494, 0.17207415401935577, 0.7898858785629272, -0.2321615219116211, -0.4106537997722626, -0.008863643743097782, -1.0059651136398315, -0.07833404839038849, 0.06612402945756912, 0.25102511048316...
def searchbin ( self, * args ) : return _ snap. tstrv _ searchbin ( self, * args )
[ -1.545337438583374, 0.45051833987236023, 0.4022302031517029, 0.6300894618034363, 0.5163601636886597, 0.17943520843982697, 0.8595224618911743, -0.5811436772346497, -1.1766853332519531, -0.5315636396408081, -0.7380214333534241, 0.35072046518325806, -0.663101315498352, 0.8890160918235779, 1...
def exercise _ 04 ( prefix = " tst _ 2 _ exercise _ 04 " ) : h _ records = " " " \ helix 1 21 ala a 21 ala a 24 1 5 " " " pdb _ inp = iotbx. pdb. input ( source _ info = none, lines = tst _ 04 _ start _ lines ) ann = ioss. annotation. from _ records ( records = h _ records. split ('\ n') ) model = mmtbx. model. manager...
[ 0.12470859289169312, 0.17370553314685822, 0.6421445608139038, 0.6001489162445068, -0.1537637859582901, 0.8699275255203247, 0.3451777994632721, 0.5397516489028931, -0.09741333872079849, 0.06351833045482635, -0.8352348804473877, 0.5361062288284302, -0.43555042147636414, -0.21361009776592255,...
def _ _ init _ _ ( self, * args ) : _ snap. ttablecontext _ swiginit ( self, _ snap. new _ ttablecontext ( * args ) )
[ -1.0367918014526367, 0.6345768570899963, 0.2113710194826126, 0.8659242391586304, -0.02352452091872692, -0.2586103081703186, 0.7746479511260986, -0.5169759392738342, -0.7521711587905884, 0.3481713831424713, -1.0390748977661133, -0.9478083252906799, 0.6767762303352356, 0.8547094464302063, ...
def make _ move ( self, request ) : game = get _ by _ urlsafe ( request. urlsafe _ game _ key, game ) if game. game _ over : return game. to _ form ('game already over!') " " " code added to check letter has not already been guessed " " " if request. guess in game. letters _ guessed : raise endpoints. badrequestexcepti...
[ -0.9994410276412964, 0.017606206238269806, 0.8545541763305664, 0.3726646304130554, 0.16477741301059723, 0.12628963589668274, -0.15639139711856842, -0.3632813096046448, -0.11243292689323425, 0.4819003939628601, 0.4313299059867859, 0.23113590478897095, -1.0319100618362427, 0.2759719789028168...
def _ populate _ attributes ( self, response ) : if'access _ token'in response : self. access _ token = response. get ('access _ token') if'refresh _ token'in response : self. refresh _ token = response. get ('refresh _ token') if'token _ type'in response : self. token _ type = response. get ('token _ type') if'expires...
[ -0.649358868598938, -0.8028444647789001, 0.43346643447875977, -0.6305378675460815, 0.18834491074085236, -0.26696524024009705, -1.142423152923584, -0.4805404841899872, 0.3007693588733673, 0.035662341862916946, -0.7141355276107788, -0.42567139863967896, 0.4367787539958954, 0.141128808259964,...
def delete _ comment ( self, bc ) : warnings = [ ] fields = {'post _ name': bc. post _ name,'number': bc. number,'comment': bc. comment,'author': bc. author,'time': bc. time } is _ deleted = bc. delete ( ) if is _ deleted : for listener in self. listeners : listener. blog _ comment _ deleted ( fields ['post _ name'], f...
[ 0.39610978960990906, -0.3192364573478699, 0.6624964475631714, 0.36019667983055115, 1.3658137321472168, -0.31197649240493774, 0.3936287760734558, -0.4573761522769928, -0.0275016650557518, 0.38348010182380676, -0.7788034081459045, -0.2643924653530121, -0.6116305589675903, 0.573370099067688, ...
def sqr _ fill ( coords, pen, fillcol = none ) : if not fillcol : fillcol = ( random. randrange ( 256 ), random. randrange ( 256 ), random. randrange ( 256 ) ) pen. rectangle ( coords, fill = fillcol, outline = fillcol )
[ 0.13422347605228424, 0.37139493227005005, 0.5303986072540283, -1.2083992958068848, -0.11744459718465805, 0.5295785069465637, 0.09501633048057556, -1.1543734073638916, 0.6581528782844543, -0.7151267528533936, -0.18094493448734283, -0.029986446723341942, 0.27877819538116455, -0.6117547154426...
def find _ module ( self, name, path = none ) : # use this loader only on registered modules if name not in bredala. _ modules : return none # get parent module and associated sub module names self. sub _ name = name. split ( ". " ) [ - 1 ] self. mod _ name = name. rpartition ( ". " ) [ 0 ] # find the sub module and bu...
[ -0.0672198012471199, -0.2801293432712555, 0.6558793783187866, 0.15895286202430725, -0.3600565195083618, 0.05837053433060646, 0.11322005093097687, -0.8583923578262329, -0.1338922530412674, -0.31897950172424316, -0.1861274242401123, 0.7719880938529968, -0.7179390788078308, 0.269477516412735,...
def getnumors ( self ) : orcount = 0 for c in components : if isinstance ( c, ( or, ) ) : orcount + = 1 return orcount
[ -0.9964892864227295, 0.010783910751342773, 0.5599938631057739, -0.09133685380220413, 0.3920345902442932, -0.7528102397918701, 0.33866798877716064, 0.45102283358573914, 0.5163712501525879, -0.10130635648965836, -0.8246709108352661, -1.2979704141616821, -0.21842238306999207, -0.2271904796361...
def set _ profile _ b2c ( life _ off, check _ cloud _ env, request, memory, store ) : b2c _ groups = [ " dialog _ compile _ b2c _ config " ] # to be filled with appropriate name associate _ group ( memory, request, store, b2c _ groups )
[ -0.22981512546539307, -0.39510494470596313, 0.2994022071361542, 0.6041946411132812, 0.46005013585090637, 0.07835724949836731, 0.3524329662322998, -0.1826736032962799, -0.3800033628940582, 0.1196170449256897, -0.41622471809387207, 1.0433015823364258, -0.44749292731285095, 0.5193198919296265...
def classfactory ( iface ) : # pylint : disable = invalid - name # from. shapecreator import shapecreator return shapecreator ( iface )
[ 0.017523568123579025, -0.17546622455120087, 0.05212966725230217, -0.42246201634407043, 0.06391195952892303, 0.5030157566070557, 0.3971747159957886, -1.431365728378296, 0.32694411277770996, -0.4605771601200104, -0.32882940769195557, -0.6165302991867065, 0.6151964068412781, 0.241576477885246...
def get _ numpy ( x ) : if use _ cuda : return x. cpu ( ). data. numpy ( ) return x. data. numpy ( )
[ -0.09953472018241882, 0.3725773096084595, 0.16856679320335388, 0.1532176434993744, 0.6391720771789551, -0.5892343521118164, -0.7970607280731201, -0.9193175435066223, 0.2887890934944153, -0.20898859202861786, 0.01075698435306549, 1.6843748092651367, 0.21716168522834778, 0.12762495875358582,...
def get _ preprocessor ( data _ src ) : return _ preprocessors [ data _ src ]
[ -0.9386721253395081, 0.5592604875564575, 0.12810435891151428, -1.7590662240982056, -0.619149923324585, -1.0003198385238647, -0.2069307267665863, -0.21043674647808075, 0.5779533982276917, -0.5471184849739075, -0.2378568947315216, 0.829282283782959, 0.41637471318244934, 0.029937949031591415,...
def gps _ kf ( self, dimension = 1, init _ data = 0 ) : abs _ error = 10. 0 try : sensor = sensor ( ) kf = kalmanfilter ( error = abs _ error ) # generate gps observations. obs, time = sensor. measure ( init _ data, abs _ error = abs _ error, unit ='position') # estimate position using kalman filter est = kf. estimate ...
[ 0.20949825644493103, -0.013652466237545013, 0.8674392104148865, 0.7244990468025208, -0.5965091586112976, 0.4168987572193146, -0.06711947917938232, 0.3501187562942505, -0.9367890954017639, -0.05799851939082146, 0.9145468473434448, 0.9416260719299316, -0.164854496717453, 0.5669618844985962, ...
def addkey ( self, * args ) : return _ snap. tintset _ addkey ( self, * args )
[ -1.2022796869277954, 0.6862481236457825, 0.5010315775871277, 1.2537630796432495, 0.15929624438285828, -0.010763868689537048, 0.47210946679115295, -0.9097978472709656, -0.4199709892272949, -0.3151301443576813, -0.17336323857307434, -0.22907789051532745, -1.3245645761489868, 0.62491077184677...
def _ matchfeatures ( query _ locations, query _ descriptors, index _ image _ locations, index _ image _ descriptors ) : num _ features _ query = query _ locations. shape [ 0 ] num _ features _ index _ image = index _ image _ locations. shape [ 0 ] if not num _ features _ query or not num _ features _ index _ image : r...
[ -0.23874832689762115, 0.4573065936565399, 0.7637585997581482, -0.12369278073310852, -0.2038651406764984, -0.2266138792037964, 0.062090449035167694, 0.51413893699646, -0.3650483787059784, -0.2145940065383911, 0.8224052786827087, 0.2269124984741211, 0.040940240025520325, -0.3925507366657257,...
def push ( self, new _ fst _ base = false, in _ place = false ) : if new _ fst _ base = = false : return self. push ( self. base, true ) call = " fstpush - - push _ weights = true - - delta = % s % s % s. fst " \ % ( self. delta, self. fst _ fn, new _ fst _ base ) subprocess. call ( [ call ], shell = true ) if in _ pla...
[ 0.1387922763824463, 0.09296461194753647, 0.5473402738571167, 0.204637810587883, -0.3607735335826874, -0.3103353977203369, -0.10345404595136642, -0.3677498996257782, -0.12386155873537064, -0.41984912753105164, -0.4496990144252777, 0.15286462008953094, -1.0145615339279175, 0.6397966146469116...
def convert _ to _ seq _ pairs ( data _ filepath ) : pairs = [ ] logger. info ('processing file { } '. format ( data _ filepath ) ) with open ( data _ filepath,'r ', encoding ='utf - 8') as input _ str : for line in input _ str : line = line. strip ( ) tokens = line. split ('\ t') if len ( tokens [ 0 ]. split ( ) )! = ...
[ -0.692685067653656, -0.5491651892662048, 0.5183711647987366, -0.6002058982849121, -0.19528040289878845, -0.18901388347148895, -0.030509913340210915, 0.7545883655548096, -0.08075843751430511, 0.7288229465484619, -0.3965402841567993, -0.40175536274909973, -0.4186684191226959, 0.5106130242347...
def base _ config ( self ) : self. v100 _ hosts = [ 1 ] self. v200 _ hosts = [ 3 ] return " " " routers : router1 : vlans : [ vlan100, vlan200 ] dps : s1 : hardware :'generictfm'dp _ id : 1 stack : { priority : 1 } interfaces : 1 : native _ vlan : vlan100 3 : stack : { dp : s2, port : 3 } s2 : dp _ id : 2 interfaces : ...
[ -0.08020738512277603, 0.09174438565969467, 0.6896896958351135, -0.10664907842874527, 0.2787807285785675, 0.02888004668056965, -0.13794969022274017, 0.06497164070606232, -0.8436823487281799, 0.8998082280158997, -0.7000237107276917, -0.18332085013389587, 0.22055980563163757, 0.50883126258850...
def data ( self, msg ) : self. putcmd ( " data " ) ( code, repl ) = self. getreply ( ) if self. debuglevel > 0 : self. _ print _ debug ('data : ', ( code, repl ) ) if code! = 354 : raise smtpdataerror ( code, repl ) else : if isinstance ( msg, str ) : msg = _ fix _ eols ( msg ). encode ('ascii') q = _ quote _ periods (...
[ -0.3822399079799652, 0.19260501861572266, 0.6284170746803284, -0.7963930368423462, -0.09727679938077927, -0.09460917860269547, -0.1711125671863556, 0.30470311641693115, 0.3765491843223572, -0.10503333806991577, -0.37968048453330994, 1.134401559829712, -0.9459376931190491, 0.498685449361801...
def clr ( self, * args ) : return _ snap. tinttrv _ clr ( self, * args )
[ -0.4658244550228119, -0.3129070997238159, 0.10882987827062607, -0.01907319948077202, -0.5650473237037659, 0.4107789695262909, 0.45896920561790466, -0.8077996373176575, -0.5337695479393005, -0.4332859218120575, 0.3403218984603882, 0.6680896878242493, -0.8360603451728821, 0.7092677354812622,...
async def match _ from _ name ( redis, match _ str : str ) : all _ keys = await redis. keys ( f " { redis _ key _ mask } * ", encoding ='utf - 8') result _ list = [ ] match _ count = 0 while all _ keys : key = all _ keys. pop ( ) section _ data = await redis. get ( key ) section _ data, match _ count = await get _ matc...
[ -0.3257712423801422, -0.5612268447875977, 0.6995710134506226, 0.45991742610931396, -0.889779806137085, -0.7120910882949829, -0.9240974187850952, -0.1250392645597458, -0.2847837209701538, 0.701754093170166, -0.8953162431716919, -0.5266530513763428, 0.22096604108810425, 0.3847752809524536, ...
def attrvalueei ( self, * args ) : return _ snap. tneanet _ attrvalueei ( self, * args )
[ -0.24246418476104736, 0.11989562958478928, 0.1252172291278839, 0.39165303111076355, 0.48483017086982727, 0.36603280901908875, 0.7693082094192505, 0.3271746337413788, -1.538902997970581, 0.15281225740909576, 0.1766757369041443, -0.9080398678779602, 0.8843216896057129, 1.0011281967163086, ...
def _ _ init _ _ ( self, buffer _ size, random _ seed, diff _ sess = none ) : self. buffer _ size = buffer _ size self. buffer _ size _ file = 0 self. transitions _ size _ file = 0 self. transitions _ count = 0 self. replay _ buffer _ count = 0 self. transitions _ buffer _ count = 0 self. replay _ buffer = deque ( ) se...
[ 0.6169764995574951, -0.2168351411819458, 0.7375608086585999, -0.13781194388866425, 0.42171889543533325, -0.2535780370235443, 0.897834837436676, 0.03259755298495293, 0.4174702763557434, -0.23303000628948212, -1.507609486579895, -0.1534310132265091, 0.23115284740924835, 1.1502082347869873, ...
def _ addselecteddatasetitem ( self, menu = none ) : if menu is none : menu = self item = wx. menuitem ( self, wx. id _ any, label _ selecteddataset, kind = wx. item _ check ) menu. appenditem ( item ) self. binder. bind ( wx. evt _ menu, self. _ ondatasetmenuitem, item ) if self. datasetlistener and \ self. datasetlis...
[ -0.44713979959487915, -0.20835471153259277, 0.5983585715293884, 0.4449050724506378, -0.7988815307617188, 0.716993510723114, -0.6105077862739563, 0.5294077396392822, 0.16234438121318817, -0.897316575050354, -0.2511025071144104, 0.8571815490722656, 0.03568282350897789, 0.6120818257331848, ...
def test _ init ( self ) : self. asserttrue ( self. metadata ) self. asserttrue ( isinstance ( self. metadata, metadatatoph5. metadatatoph5 ) )
[ -0.05017862468957901, -0.2463230937719345, 0.1621025949716568, 0.23738481104373932, 0.6259950995445251, 1.1948262453079224, 0.15840716660022736, -0.7202772498130798, -0.1853991448879242, -0.5085318088531494, -0.44127416610717773, 0.13043881952762604, -0.20483198761940002, 0.163533747196197...
def _ _ eq _ _ ( self, rhs ) : ts1 = filestoragemanagersingleton. get ( self. _ id ) ts2 = filestoragemanagersingleton. get ( rhs. _ id ) return ts1 = = ts2
[ -0.15164966881275177, -0.9997822046279907, 0.5035067796707153, 0.09474089741706848, 1.0232590436935425, -0.02120075188577175, -0.23834285140037537, -0.4302956163883209, 0.13693827390670776, -0.12012292444705963, -0.8813908100128174, 0.7595297694206238, 0.020279411226511, 0.3414844572544098...
def on _ failure _ action ( self ) : return self. _ on _ failure _ action
[ -0.11842870712280273, -0.7579005360603333, 0.1333877444267273, 0.44986864924430847, 0.47081977128982544, -0.1259434074163437, 0.631633460521698, -0.9292859435081482, 0.490909218788147, -0.06746136397123337, -0.3486088514328003, 0.53469318151474, -0.31966713070869446, 0.016375409439206123, ...
def inference _ lp ( unary _ potentials, pairwise _ potentials, edges, relaxed = false, return _ energy = false, * * kwargs ) : shape _ org = unary _ potentials. shape [ : - 1 ] n _ states, pairwise _ potentials = \ _ validate _ params ( unary _ potentials, pairwise _ potentials, edges ) unaries = unary _ potentials. r...
[ -0.24688059091567993, 0.0843488797545433, 0.773057222366333, -0.5834307670593262, -0.37133464217185974, 0.12327245622873306, -0.9479910135269165, 0.7755625247955322, 0.444044291973114, 0.4230535924434662, 1.2805447578430176, -0.051732856780290604, -0.6565209627151489, -0.6547552943229675, ...
def read _ config ( file _ name : str ) : config _ data = none try : with open ( file _ name ) as json _ file : config _ data = json. loads ( json _ file. read ( ) ) except filenotfounderror as fnfe : print ( fnfe ) return config _ data
[ -0.4634941518306732, -0.7785364389419556, 0.6415410041809082, -0.41638126969337463, -0.2592620849609375, -0.07818112522363663, -0.7033752202987671, -0.09008346498012543, -1.3080968856811523, 1.1806867122650146, -0.36227983236312866, 0.1593359261751175, 0.19558945298194885, -0.0968015789985...
async def show _ all ( message : types. message ) : result _ string, inline _ kb _ to _ choose = await handler _ show _ all ( message = message ) await storage. set _ data ( chat = access _ id, data = { " text " : result _ string, " markup " : inline _ kb _ to _ choose, " type " : " all " } )
[ 0.16168086230754852, 0.5658461451530457, 0.37499767541885376, 0.4880969524383545, -0.09156747907400131, -0.2598036527633667, 0.2289004623889923, 0.7045286297798157, -0.4814067482948303, -0.19022053480148315, 0.31387901306152344, 1.0064829587936401, 0.03845741227269173, 1.0200055837631226, ...
def geteaflti ( self, * args ) : return _ snap. tcrossnet _ geteaflti ( self, * args )
[ 0.5925503373146057, 0.5947636961936951, 0.2192469835281372, -0.6315521001815796, 0.9038257598876953, 0.18491922318935394, 0.5933897495269775, 0.4666000008583069, -0.3442942500114441, 0.5568857789039612, -0.6885635852813721, -1.5389080047607422, 0.07142968475818634, 0.7659516334533691, -0...
def getrndni ( self, * args ) : return _ snap. tngraph _ getrndni ( self, * args )
[ 0.1335482895374298, 0.8525734543800354, 0.3339267075061798, 1.207137107849121, 0.11744393408298492, -0.4464035630226135, 0.04136716201901436, -0.46911585330963135, -1.7069517374038696, -0.3729621469974518, -1.2578305006027222, -0.445614755153656, -0.8563316464424133, 0.0883355438709259, ...
def ht _ date _ to _ text ( _ date ) : return _ date. strftime ( " % y - % m - % d % h : % m : % s " )
[ 0.041351959109306335, -0.8435199856758118, 0.796532392501831, -0.4571925699710846, -0.10705973207950592, 0.6154195070266724, -0.9214908480644226, -0.27518266439437866, -0.8397460579872131, 1.112488031387329, -1.3638147115707397, 0.3687475621700287, 0.7736585736274719, -0.30396968126296997,...
def new ( * args ) : return _ snap. tfin _ new ( * args )
[ -0.8995481133460999, -0.16092027723789215, 0.3468419909477234, -0.0004136732604820281, 0.2131844460964203, 0.3727991580963135, 0.6175713539123535, -0.2745770215988159, -2.2985706329345703, 0.13230130076408386, -0.8641849756240845, -1.274032711982727, 0.6640528440475464, 0.3691275119781494,...
def addedge ( self, * args ) : return _ snap. pneanet _ addedge ( self, * args )
[ -1.2705135345458984, 1.347780466079712, 0.37601056694984436, 0.9316110610961914, 0.9359765648841858, 1.0186806917190552, -0.5842795968055725, -0.2077176868915558, -0.6534132957458496, -1.4471585750579834, 0.007182057481259108, -1.555320382118225, -1.2710126638412476, 0.9696193337440491, ...
def activatethingtypeconfiguration ( self, thingtypeid ) : req = apiclient. draftthingtypeurl % ( self. host, thingtypeid ) body = { " operation " : " activate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " application / json " }, data = json. dumps ( body...
[ -2.588348150253296, -0.408873587846756, 0.4802800416946411, -0.6641872525215149, -0.2575605809688568, -0.47650498151779175, -0.6914463639259338, -0.5218721032142639, -0.5269345641136169, 1.0117065906524658, -1.382672667503357, 1.1837971210479736, -0.8183391690254211, 0.0897589772939682, ...
def is _ running ( self ) - > awaitable [ bool ] : return self. instance. is _ running ( )
[ -0.8007908463478088, 0.19071859121322632, 0.44891107082366943, 0.7675348520278931, 0.4546036422252655, -0.06161900609731674, -0.7581695914268494, 0.7048797607421875, -0.6656408905982971, 0.11615430563688278, -0.380590558052063, 0.5283559560775757, -0.3340193033218384, -1.0243903398513794, ...
def _ _ len _ _ ( self ) - > int : return self. _ length
[ 0.026218269020318985, -0.3801587224006653, 0.20023369789123535, -1.5113221406936646, 0.47524917125701904, 0.5112773180007935, 0.6799705028533936, 0.594406247138977, 0.9761547446250916, -0.8542346954345703, -0.9193665981292725, -0.3468300402164459, 0.8706569671630859, -0.3643747568130493, ...
def _ _ eq _ _ ( self, * args ) : return _ snap. tngraphmpedgei _ _ _ eq _ _ ( self, * args )
[ -1.0503441095352173, -0.31903591752052307, -0.23811247944831848, -0.5651472210884094, 0.45872437953948975, 0.021976187825202942, 0.4983537197113037, -0.5992804765701294, -0.37661612033843994, 0.556016206741333, -0.4738730490207672, -1.1278409957885742, -0.5727864503860474, 0.30369338393211...
def run _ interaction ( logger : logger, service : dummyservice, rate _ limit : sentinelhubratelimit, request _ num : int, index : int ) - > int : rate _ limit _ hits = 0 while request _ num > 0 : sleep _ time = rate _ limit. register _ next ( ) if sleep _ time > 0 : logger. info ( " process : % d, requests left : % d,...
[ -0.31817784905433655, 0.27109870314598083, 0.8781717419624329, -0.14683158695697784, 0.9459115862846375, -0.11233101040124893, 0.17138846218585968, -0.6383033990859985, 0.4743918776512146, 0.0003183073131367564, 0.38990649580955505, 0.380826473236084, -0.6996793746948242, -1.27610158920288...
def brython _ _ eq _ _ ( a, b ) : return a = = b
[ 0.18729083240032196, -1.1101597547531128, 0.6423602104187012, 0.24591952562332153, 1.3222471475601196, 0.07946772873401642, -0.6745612025260925, -0.7059780955314636, -0.3807910680770874, 0.5704572796821594, -0.7235382795333862, 1.0380254983901978, 0.2748788297176361, -1.2140886783599854, ...
def addsattrdate ( self, * args ) : return _ snap. tdirnet _ addsattrdate ( self, * args )
[ 0.4588766098022461, 0.9571636915206909, 0.4960375428199768, -0.30334746837615967, 0.18319833278656006, 0.6475949287414551, -0.35799306631088257, -0.3209798038005829, -0.4879310131072998, -1.7078111171722412, -0.13878832757472992, -0.6539953947067261, 0.23955675959587097, 1.5275629758834839...
def save _ custom _ dict ( corpus _ entity, file _ path ) : custom _ dict = set ( ) for i, x in enumerate ( corpus _ entity ) : if len ( x ) = = 0 : continue for d in x : if re. search ('\ d + ', d ['name'] ) is none : custom _ dict. add ( d ['name'] ) with open ( file _ path,'w ', encoding ='utf - 8') as f : for word ...
[ 0.23599082231521606, -0.347144216299057, 0.6151174306869507, -1.4031963348388672, -0.2937934398651123, -0.07111679017543793, -0.36047691106796265, 0.5129648447036743, -1.0993417501449585, 0.9136511087417603, -1.0746347904205322, -0.025815749540925026, 0.16907049715518951, 0.950176358222961...
def bpdist ( feature ) : square _ sum = torch. sum ( feature * * 2, 1, keepdim = true ) square _ sum = square _ sum. transpose ( 1, 2 ) + square _ sum distance = torch. baddbmm ( square _ sum, feature. transpose ( 1, 2 ), feature, alpha = - 2. 0 ) return distance
[ 0.3595515787601471, -0.45049500465393066, 0.7369767427444458, 0.8214806318283081, -0.07429100573062897, 0.20097942650318146, 0.7732912302017212, 0.3576686978340149, 0.45088109374046326, 0.2433086335659027, -0.9477222561836243, 0.27652662992477417, -0.6149855852127075, 0.20859631896018982, ...
def maybe _ promote _ tensors ( * tensors, force _ same _ dtype = false ) : if ops. is _ auto _ dtype _ conversion _ enabled ( ) : return tensors if not tensors : return tensors if not ops. is _ numpy _ style _ type _ promotion ( ) : if not force _ same _ dtype : return tensors promoted _ tensors = [ ] promoted _ tenso...
[ -1.1519256830215454, 0.38416600227355957, 0.6365747451782227, 1.0501816272735596, 0.6256852149963379, -0.599252462387085, 0.18980111181735992, -1.1581501960754395, 1.0202794075012207, 0.7549470067024231, 0.190544992685318, 1.0117406845092773, -0.17727984488010406, 0.2790830135345459, 0.3...
def _ normalizeglifimage ( element, writer ) : # invalid data possibility : no file name defined # invalid data possibility : non - existent file referenced filename = element. attrib. get ( " filename " ) if not filename : return attrs = dict ( filename = filename ) transformation = _ normalizegliftransformation ( ele...
[ 0.01348000019788742, 0.42128029465675354, 0.4008936285972595, -0.8213189244270325, -0.6794418096542358, -0.12455122172832489, 0.5726486444473267, 0.8600932359695435, 0.21768704056739807, -0.016791263595223427, 0.17272213101387024, -0.1939464956521988, 0.4839605391025543, 0.632372260093689,...
def _ get _ time _ to _ peak ( self, unit _ id, preferred _ condition ) : try : # todo : try to find a way to generalize that doesn't rely on conditionwise _ psth psth = self. conditionwise _ psth. sel ( unit _ id = unit _ id, stimulus _ condition _ id = preferred _ condition ) peak _ time = psth. where ( psth = = psth...
[ 0.13817012310028076, 0.5903657078742981, 0.3737625181674957, -0.053136616945266724, 0.6546626687049866, -0.3135074973106384, -0.6254309415817261, -0.3271912634372711, -0.13421820104122162, 1.2367422580718994, 0.12717120349407196, 0.641668975353241, 0.14451634883880615, 0.2606220245361328, ...
def load _ file ( id _ output _ file ) : temp _ output _ file = tempoutputfile. get _ by _ id ( id _ output _ file ) list _ output _ file = [ ] for chunk in temp _ output _ file. file : # load each part of the file list _ output _ file. append ( chunk. piece _ file ) return " ". join ( list _ output _ file ) # create t...
[ -0.18382592499256134, -0.7028793096542358, 0.47622033953666687, -0.9170681834220886, -0.45726311206817627, -0.20916001498699188, 0.32084348797798157, -0.1679726243019104, -1.1324795484542847, 0.6797060370445251, -0.337110310792923, -1.144987940788269, -0.5772432684898376, -0.51139825582504...
def line _ by _ line _ indexes ( words : iterable [ word ], max _ width : int, space _ width = 1 ) - > list [ list [ int ] ] : curr _ line : list [ int ] = [ ] lines : list [ list [ int ] ] = [ ] line _ width = - space _ width for i, word in enumerate ( words ) : line _ width + = space _ width + word. width _ min ( max...
[ -0.06897012144327164, -0.4917796552181244, 0.43293526768684387, 0.3547249436378479, 0.013597702607512474, -0.22291199862957, -0.036079034209251404, 0.6536377668380737, 0.38759690523147583, 0.044513702392578125, 0.5112521648406982, 0.13790012896060944, -0.10981224477291107, 0.74643790721893...
def last ( self, * args ) : return _ snap. tintprv _ last ( self, * args )
[ -1.3256474733352661, -0.004316548351198435, 0.6185072660446167, -0.25677013397216797, 0.8603083491325378, -0.0593678317964077, -0.3055121898651123, 0.1614621877670288, -0.7582617998123169, -0.018395230174064636, -0.5919322967529297, -0.4566611051559448, -1.7813578844070435, -0.075975604355...
def disable _ swagger _ doc _ genertion ( ) - > none : with patch. dict ( rest. setup. _ _ wrapped _ _. _ _ kwdefaults _ _, { " swagger _ doc _ enabled " : false } ) : yield
[ -0.1210063025355339, -0.41191259026527405, 0.33444738388061523, 0.024212101474404335, -0.8240986466407776, 0.24109935760498047, 0.7060014605522156, 0.844743549823761, -0.11641295254230499, -0.20091986656188965, -0.2929685413837433, -0.10611610114574432, -0.970412015914917, 0.42722880840301...
def start ( self, doloop = true ) : self. logger. info ( " started nav " ) self. logger. debug ( " cwd of nav is { } ". format ( getcwd ( ) ) ) # find path to. / qwe directory. allows for flexibility in the location nav is run from. # todo could make this arbitrary by counting the number of slashes if getcwd ( ). endsw...
[ -0.6645500659942627, -0.808281660079956, 0.7148677110671997, 0.6983321905136108, 0.5007770657539368, 0.6807027459144592, 1.303512454032898, 0.010030013509094715, 0.5982347726821899, -0.17768076062202454, -0.09584656357765198, -0.03391903266310692, 0.3381706774234772, 0.618611752986908, -...
def isnode ( self, * args ) : return _ snap. pngraphmp _ isnode ( self, * args )
[ -0.5539512634277344, 0.24346643686294556, 0.41187936067581177, 0.23972606658935547, 1.33793044090271, -0.22505049407482147, 0.576140820980072, -0.9982432723045349, 0.15827623009681702, 0.36409541964530945, -0.36591827869415283, -0.31960150599479675, -1.3864824771881104, 0.09125597774982452...
def infer ( self, x _ input ) : y _ pred = self. sess. run ( self. outputs, feed _ dict = { self. x : x _ input } ) return y _ pred
[ -0.26662397384643555, -0.4387105107307434, 0.42031723260879517, 0.24784855544567108, -0.5054199695587158, 0.04077857360243797, -0.10296124964952469, -0.2177475392818451, -0.2898203730583191, -1.5388507843017578, -0.42334848642349243, 0.3821178078651428, -0.29840967059135437, 0.520111501216...
def count _ chars ( sequences ) : counts = defaultdict ( int ) for seq in sequences : for token in seq : for char in token : counts [ char ] + = 1 return counts
[ 0.11326783150434494, -0.752518892288208, 0.5892171263694763, -0.32855451107025146, -0.6181027889251709, -1.2423193454742432, 0.1363106071949005, 0.3228904902935028, -0.19384029507637024, 0.10781299322843552, -1.588842511177063, -0.6366443634033203, 0.873903751373291, 0.1861308366060257, ...
def run ( edr, sdr, q, f, db, nt, track _ tram, track _ stop, only _ passengers, start, end, show _ all, etype ) : state = state ( nt, q, f, db, t ( start ) if start else none ) events = events ( ) events. schedule ( state, * initial _ events ( state ) ) if end : events. schedule ( state, endsim ( t ( end ) ) ) i = 0 w...
[ -0.0801972895860672, 0.5604706406593323, 0.9038536548614502, 0.36413756012916565, -0.46742355823516846, -0.06861821562051773, 0.17405939102172852, -0.15549591183662415, -0.06963349133729935, 0.38498392701148987, 0.5420475602149963, -0.15831759572029114, 0.782875120639801, 0.113966621458530...
def index _ transactions ( web3 _ client : web3. web3, db, num _ blocks = none ) : cur = db. cursor ( ) last _ indexed _ block _ query = " select coalesce ( max ( block _ number ), - 1 ) from blocks ; " last _ indexed _ block _ rows = cur. execute ( last _ indexed _ block _ query ). fetchall ( ) if not last _ indexed _...
[ 0.2901231646537781, 0.7542085647583008, 1.0435571670532227, -0.0877542570233345, 0.4110528826713562, -0.9753821492195129, 1.332653284072876, 0.015860004350543022, -0.27949368953704834, 0.15417444705963135, -0.1386243999004364, -0.7454861998558044, -0.2615814208984375, -0.39298707246780396,...
def _ _ str _ _ ( self ) : return " added " + ( str ( self. created _ on ) ) [ : 10 ] + " by " + str ( self. author )
[ 0.7658662796020508, -1.3023186922073364, 0.7408146262168884, -0.8576810359954834, 0.5028908252716064, 0.5729914903640747, -0.984465479850769, -0.12049350142478943, 0.06218447908759117, 0.08971261978149414, 0.4629940688610077, 0.7953886985778809, 0.1474810391664505, -0.15182481706142426, ...
def validate _ request _ token _ request ( self, request ) : self. _ check _ transport _ security ( request ) self. _ check _ mandatory _ parameters ( request ) if request. realm : request. realms = request. realm. split ('' ) else : request. realms = self. request _ validator. get _ default _ realms ( request. client ...
[ -1.0163377523422241, -0.3921859562397003, 0.727863073348999, 0.12260540574789047, -0.05338921770453453, -0.1743338704109192, 0.182606503367424, -0.5066685080528259, -0.12250474840402603, -0.5252339839935303, 0.22539693117141724, 0.8848202228546143, 0.35432493686676025, 0.4559711813926697, ...
def test _ atomic _ any _ uri _ pattern _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 1. xsd ", instance = " nistdata / atomic / anyu...
[ -0.18166179955005646, -0.32537904381752014, 0.5281879305839539, 1.073085904121399, 0.02952103316783905, -0.07719116657972336, 0.44451385736465454, 0.002537841908633709, 0.09075144678354263, -0.20455174148082733, 0.4079136848449707, -0.5262910723686218, -0.6355106830596924, 0.10703375190496...
def prepare _ bearer _ headers ( token, headers = none ) : headers = headers or { } headers ['authorization'] ='bearer % s'% token return headers
[ -0.41042718291282654, 0.34893718361854553, 0.2969982624053955, 0.2162451297044754, -0.371023952960968, -1.118346095085144, -1.5486973524093628, -0.16311907768249512, 0.5686554312705994, -0.29598066210746765, -0.4152991473674774, -0.4971623122692108, 0.5270813703536987, -0.37760886549949646...
def journal _ name ( t ) : return re. sub ('& ','and ', t ). title ( )
[ -0.26917874813079834, -1.2328150272369385, 0.6618742942810059, -1.9967700242996216, -1.653584599494934, -0.21483999490737915, -0.9722195267677307, 0.9929749965667725, 0.444828063249588, 0.6807001829147339, 0.5202057957649231, -0.012949819676578045, 0.8154770135879517, -0.7486801147460938, ...
def findinputslice ( coord, sliceshape, sheetshape ) : center _ row, center _ col = coord n _ rows, n _ cols = sliceshape sheet _ rows, sheet _ cols = sheetshape c1 = - min ( 0, center _ col - n _ cols / 2 ) # assuming odd shape ( n _ cols / 2 ) r1 = - min ( 0, center _ row - n _ rows / 2 ) # top and bottom c2 = - max ...
[ -0.6125679612159729, -0.6823244094848633, 0.7291707396507263, -0.1628882735967636, -0.23761318624019623, 0.2605189383029938, -0.5523121953010559, -0.7458956241607666, -0.9072989821434021, 0.520248532295227, 0.3145584762096405, -0.05473008751869202, -0.35351264476776123, 0.6251662373542786,...