text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def compute _ dqds ( n2, f, v, depth ) : part1 = f * * 2 / n2 part2 = np. gradient ( v ) / np. gradient ( depth ) part3 = part1 * part2 dqds = np. gradient ( part3 ) / np. gradient ( depth ) return dqds | [
-0.3642788529396057,
0.40297186374664307,
0.4980189800262451,
-0.16904568672180176,
-0.1899600476026535,
-0.11155930906534195,
-0.2653440833091736,
0.12210334837436676,
-0.8732624650001526,
0.1713842898607254,
0.5548462867736816,
0.5863877534866333,
-0.43065232038497925,
0.3695582151412964... |
def put ( self, crawlingelement ) : # we convert the url : crawlingelement = tryurltocrawlingelement ( crawlingelement ) # print ( " put " ) # we check if the url is to crawl ( not in mongo, arlready crawled or already failed... ) : with self. queuelock : # print ( " 3 > > > > > > > > > > > > > > > > > > > > > > paused... | [
-0.7271683216094971,
0.9830451607704163,
0.568834662437439,
0.34799349308013916,
0.7889991402626038,
0.1548209935426712,
0.45586496591567993,
0.4447275400161743,
0.3336348533630371,
0.3077724575996399,
-0.6403772830963135,
0.3982544541358948,
-1.2347376346588135,
0.21447497606277466,
-0.... |
def agent _ status _ init ( log, workspace, agent _ status, field _ names ) : # pylint : disable = unused - argument return agent _ status. basc _ init _ fields ( log, field _ names ) | [
0.7417794466018677,
-0.5797842144966125,
0.008736641146242619,
-0.7556222677230835,
0.07670159637928009,
-0.45782750844955444,
-0.379460871219635,
0.5010280013084412,
-0.206135094165802,
0.2752792239189148,
-0.8127043843269348,
-0.14289343357086182,
0.9807599782943726,
-0.39754003286361694... |
def unpackb ( packed, * * kwargs ) : return msgpack. unpackb ( packed, ext _ hook = _ decode _ ext _ type, raw = false, * * kwargs ) | [
-0.1746162325143814,
1.0426461696624756,
0.803180456161499,
0.908970296382904,
-0.6474189162254333,
-1.0742146968841553,
-0.040159061551094055,
0.2560212016105652,
0.8039631843566895,
-0.6131329536437988,
-0.6029848456382751,
0.34331804513931274,
-0.6849194765090942,
-0.1699460744857788,
... |
def query _ package ( module, name, state = " present " ) : if state = = " present " : lcmd = " % s info % s " % ( _ get _ pear _ path ( module ), name ) lrc, lstdout, lstderr = module. run _ command ( lcmd, check _ rc = false ) if lrc! = 0 : # package is not installed locally return false, false rcmd = " % s remote - ... | [
-0.2729043662548065,
-0.46663713455200195,
0.6981999278068542,
-0.7716288566589355,
-0.034632738679647446,
0.5238693952560425,
-0.6781677603721619,
0.36208444833755493,
0.17601224780082703,
0.7243258953094482,
-0.25403261184692383,
-0.36070284247398376,
-0.6980133652687073,
0.2987183928489... |
def get _ courses ( self ) : return self. courses | [
-0.9594709277153015,
-0.3804101049900055,
0.3291614353656769,
0.4329812526702881,
0.648252546787262,
0.5140863060951233,
-0.5124075412750244,
-0.7348052859306335,
0.481681227684021,
-0.771453857421875,
0.3310070037841797,
0.2586788237094879,
-0.211146280169487,
-0.31072911620140076,
-0.9... |
def symlink _ smoke _ test ( self ) : self. _ smoke ('symlink') | [
0.42357903718948364,
0.08500514179468155,
0.150634765625,
0.5695448517799377,
0.8025449514389038,
-0.887582004070282,
0.9725983738899231,
1.5755534172058105,
1.4497883319854736,
-0.6656662225723267,
-0.503247082233429,
1.0203344821929932,
-0.2520866394042969,
0.8794311881065369,
-0.34768... |
def _ enhance ( im : np. ndarray, enhancement : imageenhance. _ enhance, fac : float ) - > np. ndarray : return ensure _ np ( enhancement ( ensure _ pil ( im ) ). enhance ( fac ) ) | [
0.09517136216163635,
0.08982650190591812,
0.25397077202796936,
0.0748983696103096,
0.7255526185035706,
-0.9653712511062622,
-0.41006651520729065,
-0.510214626789093,
0.4027605652809143,
-0.4395408034324646,
0.3919864594936371,
0.2738174498081207,
0.8534970879554749,
0.13907486200332642,
... |
def from _ timestamp ( timestamp ) : return generate ( tstamp ( timestamp ) ) | [
0.19603705406188965,
0.7411966323852539,
0.43765541911125183,
-0.2825288772583008,
-0.1775583028793335,
-0.17880715429782867,
-0.8898866176605225,
-0.12141577154397964,
1.3446096181869507,
-0.459707647562027,
-0.40808334946632385,
-0.8032347559928894,
0.8742758631706238,
-0.801824390888214... |
def parse ( self, motif _ file, type = none ) : basename = ntpath. basename ( motif _ file. name ) motifs = [ ] def parse _ one _ motif ( header, matrix ) : header _ values = self. _ parse _ header ( header ) motif = motif ( ppm = matrix, identifier = header _ values [ " motif _ name " ] ) motif. set _ alternate _ name... | [
-0.07234380394220352,
-0.4838675260543823,
0.5832732915878296,
-0.5204431414604187,
0.323088139295578,
-0.2336355596780777,
0.2182081639766693,
0.29655352234840393,
-0.092025525867939,
0.0742725357413292,
0.13444477319717407,
-0.18459677696228027,
-0.3606152832508087,
0.5154054760932922,
... |
def check _ win ( grid, token ) : player _ won = false if token _ matches ( grid, token, 0, 1, 2 ) or \ token _ matches ( grid, token, 3, 4, 5 ) or \ token _ matches ( grid, token, 6, 7, 8 ) or \ token _ matches ( grid, token, 0, 3, 6 ) or \ token _ matches ( grid, token, 1, 4, 7 ) or \ token _ matches ( grid, token, 2... | [
-0.16556164622306824,
-0.19772182404994965,
0.7424547076225281,
0.5584760904312134,
-0.14165683090686798,
-0.767534077167511,
-0.37309741973876953,
0.187452033162117,
-0.7743552327156067,
-0.014779740013182163,
-0.37952226400375366,
-0.17508594691753387,
-0.5122869610786438,
0.100305192172... |
def uncompress _ path ( dest, src, verbose = false ) : assert dest and not os. path. isdir ( dest ) and \ os. path. isdir ( os. path. dirname ( dest ) ) assert src and src. endswith ( '. xz') and os. path. isfile ( src ) cmd = ['xz'] if verbose : print'\ nuncompress _ path ( % s, % s )'% ( dest, src ) cmd. append ('- -... | [
0.4433971345424652,
0.3451458811759949,
0.8707126379013062,
0.35839879512786865,
-0.3706056773662567,
-0.022058764472603798,
0.4162943959236145,
-0.0208585187792778,
-0.19354717433452606,
0.3537631034851074,
-0.044618986546993256,
0.046254564076662064,
-0.7430436015129089,
-0.3749805092811... |
def _ _ getitem _ _ ( self, idx ) : slide _ id = self. data _ df. image _ id. values [ idx ] isup _ grade = self. data _ df. isup _ grade. values [ idx ] isup _ grade _ class = self. data _ df. isup _ grade. values [ idx ] if not self. use _ saved : image _ openslide = openslide. openslide ( os. path. join ( self. imag... | [
-0.8898283243179321,
0.5531520247459412,
0.7013433575630188,
0.2937934100627899,
-0.010230086743831635,
-0.778684675693512,
1.1249887943267822,
-0.20600642263889313,
-0.019059596583247185,
0.4735838770866394,
-0.2385905534029007,
0.2640441358089447,
0.2764476239681244,
0.05649523809552193,... |
def support ( self, towers ) : effected = [ ] for tower in towers : x = tower. x y = tower. y dis = math. sqrt ( ( self. x - x ) * * 2 + ( self. y - y ) * * 2 ) if dis < = self. range + tower. width / 2 : effected. append ( tower ) for tower in effected : tower. range = tower. original _ range + round ( tower. range * ... | [
-0.2805251479148865,
-0.8290769457817078,
0.3745533525943756,
-0.18273526430130005,
0.1447674036026001,
0.6140167713165283,
0.29061728715896606,
0.43377140164375305,
0.430398166179657,
0.5352420210838318,
-0.6333262920379639,
-0.36761796474456787,
-1.2902213335037231,
0.6626474857330322,
... |
def complement ( self, * args ) : return _ topods. topods _ shape _ complement ( self, * args ) | [
0.12021096795797348,
-0.9667615294456482,
0.4306885600090027,
-0.06997688859701157,
0.16560499370098114,
1.2785600423812866,
0.6100185513496399,
-0.9375156164169312,
-0.46511009335517883,
0.18648265302181244,
-0.6830905079841614,
-0.6812618970870972,
-0.04406874626874924,
-0.20057228207588... |
def get _ all _ file _ sizes ( self, path ) : pass | [
-0.004798912908881903,
-0.07941894978284836,
0.5411361455917358,
0.9273102879524231,
0.4936087429523468,
-0.06637672334909439,
-0.4708678424358368,
-0.15142260491847992,
-1.0706076622009277,
-0.5375968813896179,
-0.6997947096824646,
-0.06593765318393707,
-0.46007952094078064,
1.51177859306... |
def load _ files ( directory ) : corpus = { } for file _ name in os. listdir ( directory ) : with open ( os. path. join ( directory, file _ name ) ) as f : corpus [ file _ name ] = f. read ( ). replace ( " \ n ", " " ) return corpus # raise notimplementederror | [
0.20321312546730042,
-0.33548423647880554,
0.7682119607925415,
-1.0415359735488892,
-1.0315780639648438,
-0.546780526638031,
-0.39428821206092834,
0.17072077095508575,
-0.7315924763679504,
0.7181909084320068,
-0.4626830816268921,
-0.6056787967681885,
0.06817861646413803,
0.9162645936012268... |
def apply _ function ( fun, arg, k, env ) : while true : if fun is callcc _ obj : k = _ push _ restore _ env ( k, env ) fun, arg = arg. car, cell ( k, nil ) elif fun is apply _ obj : fun, arg = arg. car, arg. cdr. car else : break if isinstance ( fun, intrinsic ) : if fun. arity > = 0 : if len ( arg )! = fun. arity : r... | [
0.27970945835113525,
-0.2856634855270386,
0.9280350804328918,
0.5651581883430481,
-0.6542280316352844,
-0.3695981204509735,
-0.3454395830631256,
0.17798711359500885,
-0.7038068771362305,
0.20402181148529053,
0.6689084768295288,
0.32292330265045166,
-0.1414041966199875,
-0.07927314937114716... |
def trajectory ( tgrid, y0, ydot0 = 0 ) : soln = odeint ( rhs, [ y0, ydot0 ], tgrid ) return soln [ :, 0 ], soln [ :, 1 ] | [
-0.46996352076530457,
-0.4226262867450714,
0.34010618925094604,
-0.6681511402130127,
0.07581637799739838,
-0.4974238872528076,
0.11683972179889679,
-0.291350394487381,
-0.31575730443000793,
0.6586074829101562,
-0.45483946800231934,
-0.565168023109436,
1.1257905960083008,
0.5573082566261292... |
def get _ one _ question ( question _ id ) : question = questions. getone _ question ( question _ id ) if question : return make _ response ( jsonify ( {'message':'success ','question': question } ), 200 ) return make _ response ( jsonify ( {'message':'question not found'} ), 404 ) | [
-0.16420277953147888,
-0.7728266716003418,
0.5609164237976074,
0.6381461024284363,
0.8181552886962891,
0.055893801152706146,
-0.343129962682724,
-0.7331873774528503,
0.6479766368865967,
0.1609918177127838,
0.16630259156227112,
0.5801717638969421,
-0.3493572473526001,
0.3761976361274719,
... |
def append ( self, resource _ name, value ) : raise notimplementederror | [
0.22755922377109528,
-0.6534732580184937,
0.5077672004699707,
-0.2656625211238861,
-0.8156661987304688,
1.1126081943511963,
-1.109218955039978,
-0.15957805514335632,
0.1948644071817398,
0.15506505966186523,
0.2185993641614914,
-0.17293646931648254,
0.6117904782295227,
0.8231382966041565,
... |
def proband _ 2 _ bam ( testapp, project, institution, file _ formats, proband _ 2 _ bam _ qc ) : item = {'project': project ['@ id'],'institution': institution ['@ id'],'file _ format': file _ formats. get ('bam'). get ('uuid'),'filename':'test _ proband _ file _ 2. bam ', " quality _ metric " : proband _ 2 _ bam _ qc... | [
0.039499737322330475,
-0.709033191204071,
0.40524619817733765,
0.8583984375,
0.898522675037384,
0.8129708766937256,
-0.5483778119087219,
-0.5862932205200195,
-0.8756051063537598,
0.1250782459974289,
0.3802432715892792,
0.9064266085624695,
-0.719901978969574,
-0.7775877118110657,
0.412920... |
def makesession ( self, threads = 8 ) : config = tf. configproto ( inter _ op _ parallelism _ threads = threads, intra _ op _ parallelism _ threads = threads ) with self. graph. as _ default ( ) : self. session = tf. session ( config = config ) | [
0.1538170874118805,
1.1228259801864624,
0.32800090312957764,
0.08879593014717102,
0.6565992832183838,
0.12347277253866196,
1.1632697582244873,
-0.11460527777671814,
0.34162139892578125,
-0.260840505361557,
-0.11231211572885513,
-0.17446590960025787,
-0.9205266237258911,
-1.3389555215835571... |
def identify _ url ( url ) : if " groups " in url : if " permalink " in url : return 3 else : return 2 elif " posts " in url : return 1 else : return 0 | [
-0.9085034728050232,
0.07434037327766418,
0.4287407398223877,
0.9405906796455383,
0.3578689694404602,
0.49492979049682617,
0.4484100639820099,
0.9825444221496582,
0.2555302083492279,
-0.32233864068984985,
-0.3132418692111969,
-0.1881445348262787,
-0.5891138315200806,
0.40040042996406555,
... |
def save _ file ( self ) : file _ name = werkzeug. utils. secure _ filename ( self. file _ obj. filename ) try : file _ type = file _ name. split ( '.') [ 1 ] except ( indexerror, attributeerror ) : logger. debug ( f'{ file _ name } has no.') exit ( ) file _ path = f'webmaps / files / { file _ name }'try : if not os. p... | [
-0.4232022166252136,
-1.3657543659210205,
0.5859736800193787,
0.21196450293064117,
0.9970068335533142,
0.6259607672691345,
1.030131220817566,
-0.13683216273784637,
-0.8368979096412659,
-0.33860719203948975,
-0.37012264132499695,
-0.4458187520503998,
-0.005823161918669939,
1.153895497322082... |
def execute ( self, driver _ command, params = none ) : # pylint : disable = unused - argument return {'value': {'height': 0,'width': 0 } } | [
-1.0423256158828735,
-0.1422862559556961,
0.2858503460884094,
0.13270708918571472,
0.4949076175689697,
-0.4022712707519531,
0.2968261241912842,
0.274672269821167,
-0.6100252866744995,
0.2935376763343811,
0.01849507912993431,
-0.44839709997177124,
-0.32367995381355286,
0.8744639754295349,
... |
def left ( cls, array _ electrons, exposure _ info = none ) : array _ electrons = layout _ util. rotate _ array _ from _ roe _ corner ( array = array _ electrons, roe _ corner = ( 1, 0 ) ) return cls. manual ( array = array _ electrons, exposure _ info = exposure _ info, pixel _ scales = 0. 05 ) | [
0.44817695021629333,
-0.12774839997291565,
0.5858805775642395,
-0.6741977334022522,
0.2146783322095871,
0.3344298005104065,
-0.28780072927474976,
-0.49136215448379517,
0.7342270016670227,
0.2857697308063507,
0.5415185689926147,
0.12987296283245087,
0.05805258825421333,
0.5167360901832581,
... |
def _ _ post ( self, action, request, xml = " <? xml version ='1. 0'encoding ='utf - 8 '? > < modules > < module name ='presentation'> < document url ='https : / / scholar. harvard. edu / files / torman _ personal / files / samplepptx. pptx'/ > < / module > < / modules > " ) : try : response = false if self. _ _ checks... | [
-1.0689706802368164,
-0.3885110914707184,
0.8495569825172424,
0.06630253046751022,
-0.4408552944660187,
0.5316592454910278,
-0.589620053768158,
0.0515713170170784,
0.08776231855154037,
-0.0013522395165637136,
0.6580278873443604,
-0.15828755497932434,
-1.3508387804031372,
0.5614405870437622... |
def decorator ( method : decoratedtype ) - > decoratedtype : if not hasattr ( method, " _ textual _ on " ) : setattr ( method, " _ textual _ on ", [ ] ) getattr ( method, " _ textual _ on " ). append ( ( message _ type, parsed _ selectors ) ) return method | [
-0.3979746699333191,
0.3603295087814331,
0.5584551095962524,
-0.9158605337142944,
0.5132012963294983,
-0.20584294199943542,
-0.18336358666419983,
-0.10626243054866791,
0.6649593114852905,
0.2036711424589157,
0.6184822916984558,
0.4374527335166931,
0.34722939133644104,
1.499259114265442,
... |
def run _ scenarios ( self ) : data _ all _ scenarios = list ( ) for _ in range ( 0, self. _ num _ scenarios ) : # generate scenario scenario, idx = self. _ bp. _ scenario _ generation. get _ next _ scenario ( ) # log progress of scenario generation in 20 % steps part = max ( 1, int ( self. _ num _ scenarios / 5 ) ) if... | [
-0.707161545753479,
-0.2769501805305481,
0.567550778388977,
0.5137608051300049,
0.2251199334859848,
0.2269459366798401,
0.2918482720851898,
-0.1974424570798874,
-0.6045451164245605,
-0.25800621509552,
-0.6892052292823792,
-0.5847564339637756,
-0.5442545413970947,
0.9556618928909302,
0.24... |
def quan ( self ) : if self. _ quan is not none : return self. _ quan self. _ quan = functools. partial ( ytquantity, registry = self. unit _ registry ) return self. _ quan | [
0.18041345477104187,
-1.093948483467102,
0.6758804321289062,
-0.2843681871891022,
0.009776966646313667,
-0.45357176661491394,
1.0894598960876465,
-1.0342440605163574,
0.6808120012283325,
-1.202818751335144,
-0.6811982989311218,
0.38801059126853943,
0.7318443059921265,
-0.1352226734161377,
... |
def handle _ fleur _ failure ( self ) : return # handle out of walltime ( not one interation run ) abort, tell user to specifi mor resources, or different cutoffs # handle fleur error fermi level convergence # restart fleur with more tempertature broad or other smearing type ( gauss = t ) # qfix needed, restart fleur w... | [
-0.21676242351531982,
-0.7393979430198669,
0.67549067735672,
0.6335371136665344,
-0.11765703558921814,
0.6279953122138977,
0.8506931066513062,
0.000021512834791792557,
-0.13346311450004578,
-0.5614638328552246,
0.08290603011846542,
-0.12075504660606384,
-0.6817266941070557,
0.7494637370109... |
def _ git _ multigrep ( patterns, paths ) : if isinstance ( paths, str ) : paths = [ paths ] if isinstance ( patterns, str ) : patterns = [ patterns ] for pattern in patterns : # search only the files that matched previous patterns. paths = _ git _ grep ( pattern, paths ) if not paths : return [ ] return paths | [
-0.09086867421865463,
1.0433138608932495,
0.6917073130607605,
0.2943691909313202,
0.5059124827384949,
0.078159861266613,
0.03202487528324127,
-0.03685997426509857,
-0.28732773661613464,
0.2702438533306122,
0.6947954297065735,
-0.08597206324338913,
-0.6526873111724854,
0.1616452932357788,
... |
def test _ cancelling _ only _ this _ booking ( self ) : events = baker. make _ recipe ('booking. future _ ev ', _ quantity = 3 ) for event in events : baker. make _ recipe ('booking. booking ', user = self. user, event = event, paid = true ) self. assertequal ( booking. objects. all ( ). count ( ), 3 ) booking = booki... | [
0.28689759969711304,
0.8690361976623535,
0.5547682046890259,
1.8441859483718872,
-0.23594234883785248,
0.8989649415016174,
-0.05407014116644859,
1.914747714996338,
-0.029129624366760254,
0.2655377686023712,
-0.43257176876068115,
-1.243495225906372,
0.2095702886581421,
0.6739358305931091,
... |
def listener _ thread ( cls, port, callback ) : thread = thread ( target = cls. _ _ listen, args = ( port, callback ), name = " udplistenerthread " ) thread. setdaemon ( true ) thread. start ( ) return thread | [
0.8151699304580688,
-0.6020708084106445,
0.5435665249824524,
-1.2558224201202393,
0.3730698227882385,
0.6115732192993164,
-0.2626906931400299,
0.4290945529937744,
0.5387620329856873,
-1.1045260429382324,
-0.29875361919403076,
0.2502066493034363,
-0.9034484624862671,
-0.8480033874511719,
... |
def _ store _ thermodynamic _ states ( self, ncfile ) : if'scalar'not in ncfile. dimensions : ncfile. createdimension ('scalar ', 1 ) # scalar dimension # define reference units temperature _ unit = unit. kelvin pressure _ unit = unit. atmospheres logger. debug ( " storing thermodynamic states in netcdf file... " ) ini... | [
-0.21378709375858307,
0.22059470415115356,
0.27835261821746826,
-0.9343862533569336,
0.29956120252609253,
0.2640434205532074,
0.043766509741544724,
-0.6650264263153076,
-1.5697389841079712,
-0.30524003505706787,
-0.45324596762657166,
-0.7942698001861572,
0.18712981045246124,
0.457569003105... |
def create _ board ( board ) : model = fishboard ( len ( board ), len ( board [ 0 ] ) ) for r, row in enumerate ( board ) : for c, num _ fish in enumerate ( row ) : if num _ fish = = 0 : model = model. create _ hole ( r, c ) elif num _ fish > 0 : for fish in range ( num _ fish ) : model = model. add _ fish ( r, c ) ret... | [
-0.8713497519493103,
0.7580975890159607,
0.5783973336219788,
0.5809056162834167,
0.5932027101516724,
0.26476746797561646,
1.4450174570083618,
0.0014199967263266444,
0.7888426780700684,
0.34676557779312134,
-0.46228161454200745,
-0.7027115821838379,
-0.41677379608154297,
0.3403552770614624,... |
def add _ item ( self, path : str, entry : dict [ str, any ] ) - > none : md _ dir : str = os. path. dirname ( path ) if md _ dir not in self. observed _ dirs and os. path. isdir ( md _ dir ) : self. observer. schedule ( filechangehandler ( self ), md _ dir, recursive = true ) self. observed _ dirs. add ( md _ dir ) se... | [
0.19923071563243866,
0.22117003798484802,
0.6939184069633484,
-0.3230760395526886,
0.14563676714897156,
0.8746140599250793,
-0.12582285702228546,
0.4571213126182556,
0.18650543689727783,
0.07292874157428741,
0.16738101840019226,
0.6046333312988281,
0.4169968068599701,
0.15237297117710114,
... |
def test _ masked _ udf _ nested _ function _ support ( op ) : def inner ( x, y ) : return op ( x, y ) def outer ( row ) : x = row [ " a " ] y = row [ " b " ] return inner ( x, y ) gdf = cudf. dataframe ( { " a " : [ 1, cudf. na, 3, cudf. na ], " b " : [ 1, 2, cudf. na, cudf. na ] } ) with pytest. raises ( valueerror )... | [
-0.30891644954681396,
1.0054484605789185,
0.6935690641403198,
0.8088393807411194,
0.4116057753562927,
-0.41240233182907104,
0.6549724340438843,
-0.06508219987154007,
-0.303148090839386,
-0.7883390784263611,
-0.3113953769207001,
0.16309648752212524,
-0.33510634303092957,
-0.8170385956764221... |
def _ _ init _ _ ( self, * argv, * * kwargs ) : self. hypers = [ ] self. mainprobsinhypers = false | [
0.27944210171699524,
-0.2404545098543167,
0.39549490809440613,
1.0941017866134644,
0.6154958009719849,
0.8976280093193054,
0.5848637819290161,
0.6678358316421509,
-0.3407951891422272,
-0.8152884840965271,
-0.5887712836265564,
0.320208877325058,
-0.6303607225418091,
0.8499047756195068,
0.... |
def get _ id ( self, name, * ids ) : if name not in self. _ id or ids not in self. _ id [ name ] : raise rowiderror ( f " ids { ids! r } does not exist for model { name! r }. " ) got _ id = self. _ id [ name ]. get ( tuple ( map ( str, ids ) ) ) utils. logger. debug ( f " retrieved id { got _ id } for { name } and iden... | [
-0.8443171977996826,
0.19675087928771973,
0.30127257108688354,
-0.4015798270702362,
0.32465028762817383,
-0.3859427571296692,
-0.9425191283226013,
-0.4486558437347412,
0.0437312051653862,
0.21639439463615417,
-0.18166379630565643,
-0.08412942290306091,
-0.2772046625614166,
-0.1107399463653... |
def _ calculate _ link _ cost ( self ) : try : for src in self. topology. database : for dst in self. topology. database [ src ] : if src = = dst : self. topology. database [ src ] [ dst ] ['cost'] = 0 continue latency = self. topology. database [ src ] [ dst ] ['latency'] cost = self. latency _ weight * latency self. ... | [
-0.4493740200996399,
0.28307977318763733,
0.41986656188964844,
-0.6070606112480164,
0.467670738697052,
-0.5028535723686218,
0.5449074506759644,
0.8984332084655762,
0.020785251632332802,
0.3664821684360504,
-0.09057597815990448,
-0.05563205108046532,
-0.24421410262584686,
0.37029829621315,
... |
def test _ write _ move ( self ) : work _ entry _ 1 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 9, 0 ), datetime ( 2018, 10, 10, 12, 0 ) ) work _ entry _ 2 = self. create _ work _ entry ( datetime ( 2018, 10, 18, 9, 0 ), datetime ( 2018, 10, 18, 12, 0 ) ) work _ entry _ 3 = self. create _ work _ entry ( da... | [
-0.7115905284881592,
-0.4063674807548523,
0.7795619368553162,
-0.09513877332210541,
1.340419888496399,
0.17703035473823547,
0.7822604775428772,
-0.3551182448863983,
-0.09767235070466995,
0.6488064527511597,
-0.796624481678009,
-0.7346938252449036,
-0.30830034613609314,
-0.8254736661911011,... |
def play ( self ) : # print ('calling play') self. mediaobject. play ( ) | [
0.31424444913864136,
-1.19747793674469,
0.13421516120433807,
0.5907555818557739,
0.8875236511230469,
0.8905757665634155,
0.34050750732421875,
-0.5829299688339233,
0.06996054202318192,
-0.6392750144004822,
0.6843000650405884,
0.19294461607933044,
-0.5202895998954773,
-0.18803422152996063,
... |
def status ( self ) : log, barreleye _ instance = init _ env ( self. _ bsc _ config _ fpath, self. _ bsc _ logdir, self. _ bsc _ log _ to _ file ) server = barreleye _ instance. bei _ barreleye _ server servers = [ server ] ret = print _ servers ( log, barreleye _ instance, servers, status = true, print _ table = false... | [
-0.5378321409225464,
-0.399675577878952,
0.6214625239372253,
-0.14959394931793213,
0.5510236620903015,
0.6775445938110352,
0.1849382519721985,
0.5861193537712097,
-0.4690191447734833,
0.8353959321975708,
-0.5942462682723999,
1.3961963653564453,
-0.6255332827568054,
0.7933477163314819,
0.... |
def load _ data ( city, month, day ) : df = pd. read _ csv ( city _ data [ city ] ) # convert the start time column to datetime df ['start time'] = pd. to _ datetime ( df ['start time'], errors ='coerce') # extract month and day of week from start time to create new columns df ['month'] = df ['start time']. dt. month _... | [
-0.2226712852716446,
-0.10302668809890747,
0.9819759726524353,
-0.6229870915412903,
-1.0987143516540527,
0.005612594541162252,
-0.3006393313407898,
0.32370612025260925,
-0.1340937316417694,
-0.04589615762233734,
0.5678666234016418,
0.6539129614830017,
-0.005390200763940811,
-0.175893232226... |
def update _ systems ( self, dt, entity _ manager ) : for system in self. _ systems : system. update ( dt, entity _ manager ) | [
-1.5411245822906494,
-0.44990938901901245,
0.28869742155075073,
0.07345229387283325,
0.052384667098522186,
0.9729906320571899,
-0.2142382562160492,
-1.054919958114624,
0.004889629781246185,
-0.1770535707473755,
0.1247730553150177,
-0.5147656202316284,
0.8995134830474854,
1.9218745231628418... |
def project _ distribution ( supports, weights, target _ support, validate _ args = false ) : target _ support _ deltas = target _ support [ 1 : ] - target _ support [ : - 1 ] # delta _ z = ` \ delta z ` in eq7. delta _ z = target _ support _ deltas [ 0 ] validate _ deps = [ ] supports. shape. assert _ is _ compatible ... | [
-0.017570989206433296,
-0.02894008532166481,
0.6898800134658813,
0.3416318893432617,
0.6990386247634888,
0.4058554470539093,
0.09641718864440918,
0.36206763982772827,
0.23259283602237701,
-0.21126942336559296,
0.04008059576153755,
0.3918361961841583,
0.3311099410057068,
-0.5541121363639832... |
def submitter _ params ( config _ file = none, dry _ run = none, per _ node _ batch _ size = none, hpc _ config = none, local = none, max _ nodes = none, poll _ interval = none, resource _ monitor _ interval = none, resource _ monitor _ type = none, num _ processes = none, verbose = none, reports = none, enable _ singu... | [
-0.3098469376564026,
0.25680774450302124,
0.6543427109718323,
0.18983732163906097,
0.18844527006149292,
0.3496152460575104,
0.16673851013183594,
0.4373779594898224,
-0.8313162326812744,
0.19139719009399414,
-0.26839545369148254,
0.319947749376297,
0.44529175758361816,
1.2236894369125366,
... |
def forward ( self, logits, force = false ) : assert force is false, " force not implemented for sequential reparameterizer " original _ logits = logits # do the first reparam separately because it doesnt have a dense layer logits, params = self. reparameterizers [ 0 ] ( logits, force = force ) params _ list = [ { * * ... | [
-0.9797464609146118,
0.33305782079696655,
0.48745232820510864,
-1.1754536628723145,
0.2404547929763794,
0.010745656676590443,
0.31217196583747864,
0.4718169569969177,
0.052550602704286575,
0.6897872090339661,
-0.4233342707157135,
0.6862983703613281,
-0.33248651027679443,
0.7071226835250854... |
def simplify _ separators ( toolbar ) : actions = toolbar. actions ( ) if actions : vis _ action = false for act in actions : if act. isseparator ( ) : act. setvisible ( vis _ action ) vis _ action = false elif act. isvisible ( ) : vis _ action = true actions. reverse ( ) vis _ action = false for act in actions : if ac... | [
-0.2751908004283905,
0.02595599740743637,
0.9725595712661743,
-0.041617780923843384,
-0.4975564479827881,
0.04976598918437958,
1.140673041343689,
-0.3615659475326538,
0.47793933749198914,
0.7940665483474731,
-0.3292950391769409,
-0.8606826066970825,
0.33380746841430664,
0.6718465685844421,... |
def _ _ init _ _ ( self, * args ) : _ topods. topods _ hshape _ swiginit ( self, _ topods. new _ topods _ hshape ( * args ) ) | [
0.6985958218574524,
0.6250612735748291,
0.5563216209411621,
0.5201737880706787,
0.5663574934005737,
0.5031574964523315,
-0.013748136349022388,
0.4385802745819092,
-0.6212063431739807,
-0.33420464396476746,
-0.7887116074562073,
-0.49596741795539856,
-0.10730484127998352,
0.7987232804298401,... |
def deploy _ transform _ job ( job _ name, model _ uri, s3 _ input _ data _ type, s3 _ input _ uri, content _ type, s3 _ output _ path, compression _ type = " none ", split _ type = " line ", accept = " text / csv ", assemble _ with = " line ", input _ filter = " $ ", output _ filter = " $ ", join _ resource = " none "... | [
0.02676757425069809,
-0.21838301420211792,
0.6957343816757202,
0.2357213944196701,
-0.2960016131401062,
-0.17865636944770813,
0.09165365248918533,
0.5773810744285583,
-0.45083218812942505,
0.7390729188919067,
-0.19319626688957214,
1.0191255807876587,
0.051510196179151535,
-0.15614986419677... |
def set _ pad _ mode _ 1 ( data : bytearray, block _ size : int ) - > bytearray : return data + b'\ x00'* get _ pad _ size ( data, block _ size ) | [
0.24328593909740448,
-0.09366197884082794,
0.5224268436431885,
0.27166253328323364,
-0.046598609536886215,
-0.10149964690208435,
-0.5757319927215576,
-0.1060839593410492,
0.3058715760707855,
0.23198583722114563,
-0.5989621877670288,
0.4004122316837311,
-0.0641305074095726,
1.11756503582000... |
def calcultatelogprob ( self, * argv, * * kwargs ) : current = kwargs [ " predict " ] ( argv [ 0 ], n = kwargs [ " n " ] ) for x in range ( len ( current ) ) : current [ x ] = tf. transpose ( current [ x ] ) realvals = tf. reshape ( kwargs [ " realvals " ], current [ 0 ]. shape ) result = [ ] for x in range ( len ( cur... | [
-0.6132763624191284,
0.6428420543670654,
0.7550001740455627,
0.3466727137565613,
-0.7239612340927124,
0.08623651415109634,
-0.5966806411743164,
0.1412910670042038,
-0.6626803278923035,
1.1739455461502075,
-0.8521091341972351,
0.5004953742027283,
0.18156737089157104,
0.516120195388794,
-0... |
def test _ plot _ random _ spectra _ pairs ( get _ matlab _ data, get _ python _ data, get _ n _ spectra ) : mat = get _ matlab _ data py = get _ python _ data n _ spec = get _ n _ spectra idxs = random. sample ( range ( 0, py. shape [ 0 ] ), n _ spec ) wavelength = np. arange ( 200, 5000, 10 ) py _ spectra = py. iloc ... | [
0.18558964133262634,
0.2436089962720871,
0.621242880821228,
-1.1267096996307373,
0.24290348589420319,
1.1499005556106567,
0.2665823996067047,
-0.6267237067222595,
0.5230085253715515,
-0.27659842371940613,
0.03905753046274185,
-0.033392660319805145,
-0.3064475953578949,
0.8264409303665161,
... |
def custom _ oss _ bucket ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " custom _ oss _ bucket " ) | [
0.5149314403533936,
0.019203782081604004,
0.5752801895141602,
0.4461406469345093,
-0.5316627621650696,
0.6260505318641663,
0.44778016209602356,
-0.5394542813301086,
0.25985613465309143,
-0.7213960886001587,
0.003737394232302904,
0.7106227278709412,
0.8145806789398193,
-0.8052265048027039,
... |
def update _ image ( self, cv _ ctr, cv _ dist ) : qt _ ctr = self. convert _ cv _ qt ( cv _ ctr ) qt _ dist = self. convert _ cv _ qt ( cv _ dist ) self. image _ ctr. setpixmap ( qt _ ctr ) self. image _ dist. setpixmap ( qt _ dist ) | [
-0.008533199317753315,
-1.390073299407959,
0.31838512420654297,
0.2585032284259796,
-0.10134509950876236,
0.2253153771162033,
-0.4740417003631592,
0.649467408657074,
0.5858985781669617,
-0.004603338893502951,
0.013533707708120346,
0.1959584504365921,
1.037569522857666,
0.8235078454017639,
... |
def create _ expense ( self, username, id _ item, date, category, description, price, currency, price _ in _ euro ) : if username not in self. database : # if it is the first expense that the user creates, the username is not as a key in the database. # therefore, check first if the username already exists, if not, add... | [
-0.6454370617866516,
0.4633784294128418,
0.47983869910240173,
0.3292696475982666,
0.4628199338912964,
0.24706211686134338,
-0.3727492392063141,
0.45830562710762024,
-0.30595991015434265,
0.39076298475265503,
-1.3334513902664185,
-1.1288729906082153,
-0.5237106680870056,
-0.0382311455905437... |
def setdata ( self, index, value, role = qtcore. qt. editrole ) : if not index. isvalid ( ) : return false row = index. row ( ) column = index. column ( ) node = index. internalpointer ( ) if role = = qtcore. qt. editrole : if column = = 0 : node. setname ( value ) elif column = = 2 and isinstance ( node, transform ) :... | [
-1.2046805620193481,
0.8207696080207825,
0.6463282704353333,
-0.7560484409332275,
-0.6606796383857727,
0.23157677054405212,
-0.03409434109926224,
-0.817669153213501,
0.5720573663711548,
0.22592201828956604,
-0.8028460144996643,
0.6013923287391663,
-0.11474443972110748,
-0.302284300327301,
... |
def get _ connection _ command ( scheme, user, database ) : if scheme in ['postgres ','postgresql'] : return ['psql'] elif scheme = ='mysql': return ['mysql ','- u ', user,'- d ', database ] elif scheme = ='sqlite': return ['sqlite3 ', database ] else : return none | [
-0.8458699584007263,
-0.33868369460105896,
0.43354472517967224,
-0.003849238157272339,
0.9609083533287048,
-0.20339107513427734,
-0.13989175856113434,
-0.35451292991638184,
0.21438857913017273,
0.09563920646905899,
-0.10212915390729904,
0.4247363209724426,
0.18728235363960266,
0.5355026721... |
def load _ heif ( fp : union [ str, path ] ) - > image. image : try : import pyheif d = pyheif. read ( fp ) return image. frombytes ( d. mode, d. size, d. data, " raw ", d. mode, d. stride ) except exception as e : return none | [
0.9005654454231262,
0.32375743985176086,
0.4138157367706299,
-0.054209448397159576,
-0.2568783462047577,
0.06478147208690643,
-0.08131177723407745,
0.14339661598205566,
-0.024332717061042786,
-0.18601328134536743,
-0.24201416969299316,
-0.45785441994667053,
0.13476693630218506,
-0.09178230... |
def test _ booking _ list _ by _ user ( self ) : another _ user = baker. make _ recipe ('booking. user') baker. make _ recipe ('booking. booking ', user = another _ user, event = self. events [ 0 ] ) # check there are now 5 bookings self. assertequal ( booking. objects. all ( ). count ( ), 5 ) self. client. login ( use... | [
-0.6286423206329346,
1.2567816972732544,
0.521960973739624,
1.3921160697937012,
-0.9690513610839844,
0.4385600686073303,
0.695449948310852,
1.037602186203003,
-0.05077803507447243,
-0.2839803099632263,
-0.8238385319709778,
-0.6463438272476196,
0.21570269763469696,
0.38910797238349915,
0.... |
def add ( self, observer ) : self. observers. append ( observer ) | [
-0.4286079406738281,
0.08512379229068756,
0.23626139760017395,
-0.4132818877696991,
0.2526344358921051,
0.6983214616775513,
-0.9674864411354065,
0.524411678314209,
0.3464427590370178,
-1.0839704275131226,
-0.8789637088775635,
-0.585045576095581,
-0.4734535813331604,
0.5743160247802734,
-... |
def norm ( vec ) : v = np. linalg. norm ( vec, axis = - 1, keepdims = true ) v [ v < 1e - 9 ] = 1. 0 # guard against 0 division return vec / v | [
0.259769082069397,
-0.6246031522750854,
0.3572748601436615,
0.8918978571891785,
0.053681112825870514,
0.33155885338783264,
1.0961188077926636,
-0.17277002334594727,
0.6441004276275635,
-0.01153724268078804,
0.2331455498933792,
0.20710259675979614,
-0.36032387614250183,
0.44146835803985596,... |
def test _ mutual _ info _ score _ functional _ raises _ invalid _ task ( ) : preds, target = _ float _ inputs with pytest. raises ( valueerror, match = r " expected * " ) : mutual _ info _ score ( preds, target ) | [
-0.08199640363454819,
0.7424677014350891,
0.37870386242866516,
1.057422399520874,
0.16018182039260864,
0.5507738590240479,
-0.38451191782951355,
0.1596924364566803,
-1.0728679895401,
-0.23367132246494293,
0.468778520822525,
0.20947730541229248,
0.28731536865234375,
0.36211860179901123,
0... |
def add _ basic _ kernels ( root, types, nargs ) : for t in types : name = root +'_'+ t [ 0 ] func = basic [ name ] func. restype = t [ 1 ] func. argtypes = [ t [ 1 ] ] * nargs globals ( ) [ name ] = func | [
-0.9171209335327148,
0.35087257623672485,
0.5065374374389648,
0.20444445312023163,
0.3937292695045471,
-0.5364444851875305,
-0.6869704723358154,
-1.1738877296447754,
-0.35046523809432983,
0.10263831913471222,
-0.6818978786468506,
0.4013914167881012,
-0.6076059341430664,
0.9971914291381836,... |
def _ find _ adapter ( adpt _ list, adpt _ name ) : for adpt in adpt _ list : if adpt. name = = adpt _ name : return adpt return none | [
-0.05234288051724434,
-0.7750740051269531,
0.5317780375480652,
-0.7208821773529053,
-0.789229154586792,
-0.056337084621191025,
-0.9444563388824463,
-0.9383907318115234,
0.7810350060462952,
1.672468662261963,
0.8306182622909546,
0.8300231695175171,
-0.3662917912006378,
0.20454658567905426,
... |
def _ handle _ node _ update ( hass : homeassistant, gateway _ id : gatewayid, msg : message ) - > none : signal = node _ callback. format ( gateway _ id, msg. node _ id ) async _ dispatcher _ send ( hass, signal ) | [
0.48662862181663513,
0.0435153990983963,
0.3518194556236267,
-0.4371113181114197,
-0.14754509925842285,
-0.8127210140228271,
-0.6364526152610779,
-0.06307367980480194,
0.4447188377380371,
0.860948383808136,
-0.11678246408700943,
0.07604783773422241,
0.5650773048400879,
1.151705265045166,
... |
def showrestaurantsjson ( ) : restaurants = session. query ( restaurant ). all ( ) return jsonify ( restaurants = [ r. serialize for r in restaurants ] ) | [
-1.5341341495513916,
-0.45198875665664673,
0.19370752573013306,
-0.8816814422607422,
-0.9959396123886108,
-0.7706360816955566,
-0.6978836059570312,
0.9741489291191101,
-0.17210610210895538,
0.9576196670532227,
-0.7317172288894653,
1.1790733337402344,
-0.06622765958309174,
0.253139853477478... |
def calculate _ shortest _ cost _ path ( self, topology, src, dst ) : if topology is not none : self. topology. database [ dst ] [ src ] ['cost'] = self. weighted _ cost * self. topology. database [ dst ] [ src ] ['cost'] self. topology. database [ src ] [ dst ] ['cost'] = self. weighted _ cost * self. topology. databa... | [
0.16437307000160217,
-0.19438238441944122,
0.5962514281272888,
-0.27859821915626526,
-0.6815493702888489,
-0.4119963049888611,
0.5486113429069519,
0.5571379065513611,
0.47583019733428955,
0.3349207639694214,
-0.10072608292102814,
-0.42224910855293274,
0.010308558121323586,
-0.0887015238404... |
def save _ state ( self, filename ) : pass | [
-1.4030662775039673,
-1.3627227544784546,
0.19286735355854034,
0.4481948912143707,
0.4102799892425537,
0.6082599759101868,
0.8965528607368469,
0.8294146656990051,
-0.7450992465019226,
-0.09710454940795898,
-1.0376659631729126,
-0.7240114212036133,
-0.008812042884528637,
0.5970618724822998,... |
def add _ func ( self, f ) : self. main. add _ func ( f ) self. funcs. add ( f ) | [
-0.17709316313266754,
0.3631971478462219,
0.5393086671829224,
0.6273992657661438,
0.7982695698738098,
0.1066400408744812,
0.6335857510566711,
0.3848286271095276,
0.004956129938364029,
-1.8400126695632935,
-0.19551216065883636,
0.5113323330879211,
0.798494279384613,
0.5435170531272888,
0.... |
def days _ week ( _, nodes = none ) : days = { " monday " : 0b00000010, " tuesday " : 0b00000100, " wednesday " : 0b00001000, " thursday " : 0b00010000, " friday " : 0b00100000, " saturday " : 0b01000000, " sunday " : 0b10000000, " weekend " : 0b11000000, " mondaytofriday " : 0b00111110, " mondaytosaturday " : 0b011111... | [
-0.5992989540100098,
1.1101515293121338,
0.8525078296661377,
-1.5048296451568604,
0.37748005986213684,
-1.2271790504455566,
0.3051300644874573,
-0.6607692837715149,
0.2210649847984314,
-0.2649412155151367,
0.3242485225200653,
-0.46898984909057617,
0.31064313650131226,
1.0173165798187256,
... |
def get _ duration ( date _ 1, date _ 2 ) : m = re. search ('( [ 0 - 9 ] + ) - ( [ 0 - 9 ] + ) - ( [ 0 - 9 ] + ) ', date _ 1 ) d1 = datetime. date ( int ( m. group ( 1 ) ), int ( m. group ( 2 ) ), int ( m. group ( 3 ) ) ) m = re. search ('( [ 0 - 9 ] + ) - ( [ 0 - 9 ] + ) - ( [ 0 - 9 ] + ) ', date _ 2 ) d2 = datetime. ... | [
-0.2337152510881424,
0.29438021779060364,
1.3012769222259521,
-0.3518844246864319,
-0.058760419487953186,
-0.11521141976118088,
-0.11389541625976562,
-0.09006787091493607,
-0.8298101425170898,
0.7983899712562561,
-0.3730585277080536,
0.8496795892715454,
0.27061375975608826,
-0.672652602195... |
def remove _ component ( name ) : before = get _ provided _ services ( ) _ component _ info [ name ] ['active'] = false # call invalidate _ component _ info [ name ] ['invalidate'] ( _ class _ binding [ name ] ) after = get _ provided _ services ( ) # todo check if provided services need to be stopped # if before! = af... | [
-0.9897181391716003,
-0.9262242317199707,
0.5344945788383484,
-0.704796314239502,
-0.5426351428031921,
-0.07122363895177841,
0.1251707375049591,
-0.12096521258354187,
0.41576966643333435,
-0.021002192050218582,
-0.0504903718829155,
-0.5828025341033936,
-0.8765614032745361,
0.14157608151435... |
def build ( self ) : input _ layer = input ( self. input _ size _ ) # # convolutional layers conv _ layer = conv3d ( filters = self. num _ first _ filters _, kernel _ size = self. kernel _ size _, activation = " relu ", data _ format = " channels _ last ", ) ( input _ layer ) pool _ layer = maxpool3d ( pool _ size = se... | [
0.44119229912757874,
-0.6703013181686401,
0.8609537482261658,
0.45254209637641907,
-0.018627196550369263,
0.4067518413066864,
0.13621003925800323,
-0.16074694693088531,
0.5341881513595581,
-0.24083460867404938,
-0.053006887435913086,
0.40572589635849,
-0.2619607448577881,
-0.05869213864207... |
def _ cleanup _ cur _ exp ( self ) : try : if self. _ cur _ exp : self. _ cur _ exp. stop ( ) self. _ stop _ controller ( ) self. _ post _ cleanup ( ) except exception as e : logger. error ( e ) self. cleanup ( ) | [
0.23704136908054352,
-1.4223638772964478,
0.2946256101131439,
0.07980530709028244,
-0.4879964590072632,
-0.07733090221881866,
1.3432222604751587,
0.5466852188110352,
0.21891844272613525,
-0.3444366753101349,
0.7786366939544678,
-0.5777384638786316,
-0.5538358688354492,
0.6389694809913635,
... |
def do _ sdn _ controller _ delete ( cc, args ) : try : cc. sdn _ controller. delete ( args. uuid ) except exc. httpnotfound : raise exc. commanderror ( " failed to delete sdn controller entry : " " invalid uuid : % s " % args. uuid ) print ('deleted sdn controller : uuid % s'% args. uuid ) | [
0.23114924132823944,
0.05964817851781845,
0.30039843916893005,
0.29079729318618774,
-0.02311348170042038,
0.15149632096290588,
0.05610915273427963,
-0.018413888290524483,
0.511538028717041,
-0.1339389830827713,
-0.3254319727420807,
0.4637889266014099,
0.3989424705505371,
-0.436548382043838... |
def nump ( where ) : pp = 0 for i in range ( len ( where ) ) : if where [ i ] = ='p': pp = pp + 1 return pp | [
0.166358083486557,
0.07847128808498383,
0.8382384181022644,
0.05352814868092537,
-0.2674630284309387,
-0.18041184544563293,
-0.1885562241077423,
0.7136350274085999,
0.24990664422512054,
0.7838760018348694,
0.059996068477630615,
-0.2699486315250397,
-0.8692976832389832,
-0.4240768551826477,... |
def send _ signal ( self, sig ) : if sig = = signal. sigterm : self. terminate ( ) else : raise valueerror ( " only sigterm is supported on windows " ) | [
0.39604684710502625,
0.2185412049293518,
0.3599773049354553,
1.5532079935073853,
-0.05980977788567543,
0.3247544467449188,
-0.8262165188789368,
-0.15831401944160461,
0.250769704580307,
0.3206119239330292,
-0.6470076441764832,
-0.3786773681640625,
-0.8400263786315918,
0.8498730659484863,
... |
def predictionsse ( self, xs, ys ) : err = 0. 0 pred = np. dot ( self. a, xs [ 0 ] ) + self. b err + = np. dot ( pred - ys [ 0 ], pred - ys [ 0 ] ) for x, y in zip ( xs, ys ) : pred = np. dot ( self. c, x ) + np. dot ( self. d, pred ) + self. d err + = np. dot ( pred - y, pred - y ) return err | [
0.07378046959638596,
0.02789594605565071,
0.5987390279769897,
-0.46888065338134766,
0.5281696319580078,
-0.27409467101097107,
0.2233356237411499,
0.22545035183429718,
-0.02379450388252735,
0.4753309190273285,
0.040909238159656525,
0.7790185213088989,
1.1583726406097412,
0.3866958022117615,... |
def tag _ interjection ( node, context ) : return word _ from _ file ('data / interjections') | [
0.6013292670249939,
0.8353113532066345,
0.240322083234787,
-1.3637932538986206,
0.6787797212600708,
-0.5744194388389587,
0.07307667285203934,
0.07244109362363815,
-0.9047763347625732,
0.8176738619804382,
0.29577746987342834,
-0.027712956070899963,
-0.35976502299308777,
-0.29049402475357056... |
def add ( self, name, test, args, config ) : self. tests. append ( ( name, test, args, config ) ) | [
0.011901852674782276,
0.05053435638546944,
0.22631016373634338,
-0.3185043931007385,
0.903093695640564,
0.6231322884559631,
-0.6406326293945312,
0.19773533940315247,
0.1182534247636795,
-0.336780846118927,
-0.6122240424156189,
-0.20368847250938416,
-1.2813544273376465,
0.15505123138427734,... |
def test _ anonymous _ user _ thread ( self ) : test _ title _ string ='' test _ string ='are you guid - flender? are you jewish - fluidly? fluid jewish??'self. selenium. get ('% s % s'% ( self. live _ server _ url, reverse ('forum : thread - new - form ', kwargs = {'forum _ slug': self. forum. slug, } ) ) ) # type int... | [
-0.5815982818603516,
-0.2919212579727173,
0.7322010397911072,
0.5828865766525269,
0.5921433568000793,
0.7470825910568237,
0.06443870067596436,
-0.46184512972831726,
0.152766615152359,
0.09099970012903214,
-0.8144513368606567,
0.05031992495059967,
-0.6514454483985901,
0.9038681983947754,
... |
def _ build _ replay _ buffer _ opt ( self, use _ staging ) : return circular _ replay _ buffer. wrappedreplaybuffer ( observation _ shape = self. observation _ shape, stack _ size = self. stack _ size, use _ staging = use _ staging, update _ horizon = self. update _ horizon, gamma = self. gamma, observation _ dtype = ... | [
-0.31576529145240784,
0.06452987343072891,
0.4948568642139435,
-0.04231640323996544,
0.44563111662864685,
-0.0643533319234848,
0.47527459263801575,
-0.17730723321437836,
-0.003669080091640353,
0.46238526701927185,
0.2754775881767273,
1.2332366704940796,
-0.3459304869174957,
-0.499108999967... |
def _ _ init _ _ ( self, name = none, format ='circular ', pagesize ='a3 ', orientation ='landscape ', x = 0. 05, y = 0. 05, xl = none, xr = none, yt = none, yb = none, start = none, end = none, tracklines = false, fragments = 10, fragment _ size = 0. 9, track _ size = 0. 75, circular = true ) : self. tracks = { } # ho... | [
0.3133058249950409,
-0.24349305033683777,
1.0726683139801025,
-0.4843030869960785,
-0.5273430943489075,
0.5131827592849731,
0.37630724906921387,
-0.032704319804906845,
0.07607191801071167,
0.15693143010139465,
-0.27702733874320984,
-0.11433027684688568,
0.3248552083969116,
0.28344291448593... |
def _ pre ( self, user, do _ refresh = true ) : self. server. lock ( ) if do _ refresh : secfs. tables. pre ( _ reload _ principals, user ) else : secfs. tables. pre ( none, user ) | [
-0.19748042523860931,
1.2306065559387207,
0.40616264939308167,
0.9769369959831238,
-0.47376763820648193,
0.18277598917484283,
0.8083110451698303,
-0.8337245583534241,
0.6321074366569519,
-0.557366669178009,
-0.3528156578540802,
0.31250789761543274,
0.08195823431015015,
0.13103584945201874,... |
def handle _ kill ( sys _ args, cmd ) : err _ str = render _ email _ template ( " cronwrap has killed a long - running command : ", sys _ args, cmd ) if sys _ args. emails : send _ email ( sys _ args, sys _ args. emails,'host % s : cronwrap killed a long - running command!!'% platform. node ( ). capitalize ( ), err _ s... | [
0.33755457401275635,
-0.2694840729236603,
0.5825713276863098,
0.4132765233516693,
0.49359187483787537,
0.07860798388719559,
-0.7376900315284729,
0.2696486711502075,
-0.05190989002585411,
0.2297319918870926,
0.3959243893623352,
1.3174121379852295,
0.20139525830745697,
-0.3413471281528473,
... |
def accept _ payment ( request ) : amount = int ( request. post ['amount'] ) # since this value is coming from the front - end, we need to double - check it is correct if amount! = expected _ payment _ amount : raise valueerror ('received unexpected payment amount { } '. format ( amount ) ) name = request. post ['name'... | [
1.119314193725586,
0.25040292739868164,
0.579131543636322,
-0.2967328429222107,
-0.02053636685013771,
0.23629218339920044,
-0.6650581955909729,
-0.010298703797161579,
-0.5745857954025269,
-0.2998514473438263,
0.3248749077320099,
-0.09065979719161987,
0.24559588730335236,
0.3130335211753845... |
def listen _ for _ connections ( self ) : try : client _ id = 0 while true : log. info ( " awaiting connections from clients.. " ) client _ socket, client _ address = self. sock. accept ( ) log. debug ( " new client connected from % s : % d " % client _ address ) c = clienthandler ( self, client _ socket, client _ addr... | [
0.24078454077243805,
-1.0664032697677612,
0.40362057089805603,
-0.6154115200042725,
0.31186825037002563,
0.03200826421380043,
0.5882854461669922,
-0.27466878294944763,
-0.8379945755004883,
-0.3063076138496399,
-0.1532549113035202,
-0.3505060076713562,
-0.35421156883239746,
0.24775306880474... |
def target _ template _ id ( self, target _ template _ id ) : self. _ target _ template _ id = target _ template _ id | [
-0.7483934760093689,
-1.0094021558761597,
-0.23450787365436554,
-0.1445140540599823,
-0.22249965369701385,
0.8522847890853882,
0.4689863324165344,
0.5592029690742493,
0.4239732623100281,
0.7194106578826904,
-0.48487135767936707,
0.3243679702281952,
0.28992488980293274,
-0.14864768087863922... |
def send _ request ( self, method, uri, body = none, resource = none, tenant _ id ='', resource _ id = none ) : try : result = self. nvsdcontroller. request ( method, uri, body = body ) except nvsdexception. nvsdapiexception as e : with excutils. save _ and _ reraise _ exception ( ) as ctxt : msg = self. build _ error ... | [
-1.027381181716919,
0.9615239500999451,
0.69441157579422,
0.3379797637462616,
0.1089717373251915,
-0.5952771902084351,
-0.8710049986839294,
-0.8791238069534302,
0.8627210855484009,
-0.1685287356376648,
1.1395355463027954,
0.12692230939865112,
-0.27795109152793884,
-0.16038621962070465,
0... |
def receive ( self, _ callable ) : # first see if the message is already in the buffer? message = self. _ add ( b'' ) if message : return message while true : # receive the data in chunks data = _ callable ( ) if data : message = self. _ add ( data ) if message : return message else : break return none | [
0.020850203931331635,
0.7338985204696655,
0.6009088754653931,
-0.7183364033699036,
0.1507895141839981,
-0.7933638691902161,
-0.6899058818817139,
-1.2127376794815063,
0.007317257579416037,
-0.8594849109649658,
-0.20747505128383636,
0.3766050934791565,
-1.3233603239059448,
0.0248665865510702... |
def getsourcecolumnsfromtensorrepresentation ( tensor _ representation : schema _ pb2. tensorrepresentation ) - > list [ path. columnpath ] : return _ tensor _ representation _ kind _ to _ columns _ getter [ tensor _ representation. whichoneof ( " kind " ) ] ( tensor _ representation ) | [
-1.0586590766906738,
-0.4935961663722992,
0.2083357274532318,
-0.24708624184131622,
0.6994905471801758,
0.19169284403324127,
0.9165140986442566,
-0.1412421613931656,
0.04767901077866554,
0.48801296949386597,
-0.7846730351448059,
-0.05925296992063522,
0.3849306106567383,
-1.1623139381408691... |
def computetrilinearformentry ( self, gs, gpk, basisk, gpi, basisi, gpj, basisj, d ) : raise notimplementederror ( ) | [
0.7202850580215454,
-0.13999603688716888,
0.12787266075611115,
-0.5939247608184814,
-0.16508325934410095,
-0.04511938616633415,
0.2757719159126282,
0.731962263584137,
-0.408721923828125,
0.343572735786438,
0.1443011611700058,
0.424714058637619,
0.25707677006721497,
-0.5214802026748657,
-... |
def setupclass ( self ) : print ( " creating airflow variable... " ) report _ saver = reportformsaver ( self. report _ form _ sample ) report _ saver. extract _ report _ data _ into _ airflow ( report _ exists = false ) | [
0.7639268636703491,
0.051210805773735046,
0.2828522026538849,
0.09275282174348831,
0.9082813858985901,
-0.05909626930952072,
0.60426265001297,
-0.055977385491132736,
-0.1959758996963501,
-0.9044715762138367,
-0.026148933917284012,
-0.3416908383369446,
-0.32046154141426086,
0.31477469205856... |
def setsingletrack ( center _ row, height ) : return none | [
0.2928606867790222,
0.8962564468383789,
0.2982703447341919,
0.6044595837593079,
0.748093843460083,
0.04568629711866379,
0.7238829135894775,
0.12887316942214966,
-0.15114721655845642,
-0.38434481620788574,
-0.016316579654812813,
-0.1953429877758026,
-0.8528614044189453,
0.6032231450080872,
... |
def put _ in ( self, y _ start, x _ start, fromtextlist = none, totextlist = none, skip = ['' ] ) : if not self. dictionary _ mode or isinstance ( totextlist, list ) : for y in range ( len ( fromtextlist ) ) : newline = totextlist [ y _ start + y ] [ 0 : x _ start ] for x in range ( len ( fromtextlist [ 0 ] ) ) : if fr... | [
-0.4921536445617676,
-0.2960132658481598,
1.01463782787323,
-1.3192987442016602,
-1.1248260736465454,
-0.16895540058612823,
-0.3367545008659363,
0.476615309715271,
-0.26875215768814087,
0.7805790901184082,
-0.3087128698825836,
0.23258249461650848,
-0.12111891061067581,
-0.35337793827056885... |
def _ _ init _ _ ( self, session _ id, custom _ data, site _ id ) : # type : ( str, optional [ str ], str ) - > none self. session _ id = session _ id self. custom _ data = custom _ data self. site _ id = site _ id | [
0.9322233200073242,
-0.6741988062858582,
0.21544332802295685,
-0.3351530134677887,
-0.3766334056854248,
-0.5040319561958313,
-0.05091901496052742,
0.01504212524741888,
1.050036907196045,
-0.1058506891131401,
-0.6709198355674744,
1.6407569646835327,
0.21305355429649353,
-0.24712692201137543... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.