text
stringlengths
25
2.19k
embedding
listlengths
768
768
def make _ pyramid ( u, v, length, outfilename = none, a = 4. 076, atomname ='au') : print " saving results to % s. " % outfilename planar _ spacing = a / 2. # size of the thing ndim = 2 * length - 1 norm _ uv = cross ( u, v ) norm _ uv / = linalg. norm ( norm _ uv ) layera = zeros ( ( ndim, ndim ) ) layerb = zeros _ l...
[ 0.2798430323600769, -0.06703492999076843, 1.0675008296966553, -0.28725752234458923, -0.5134613513946533, -0.2793624699115753, 1.4398126602172852, -0.3348988890647888, 0.4627534747123718, 0.08769694715738297, -0.4505845010280609, 0.0732886791229248, -0.1116042211651802, -0.4889310300350189,...
def get ( self, key, default = none ) : if key in self. _ prefs : return self. _ prefs [ key ] return default
[ -0.39591214060783386, 0.4576519727706909, 0.36432239413261414, 0.4283938705921173, 0.13396765291690826, -0.7587925791740417, -1.4115757942199707, -0.8995749950408936, -0.13010908663272858, 0.27842509746551514, 0.2220601737499237, 0.5435009002685547, -1.571540117263794, -0.6846662759780884,...
def getrndei ( self, * args ) : return _ snap. tnegraph _ getrndei ( self, * args )
[ -0.09490551054477692, 0.8025020360946655, 0.2762562036514282, 0.5908550024032593, 0.4862825274467468, -0.3221002221107483, 0.28545814752578735, -0.7789109945297241, -1.121687650680542, -0.3573407232761383, -1.4646825790405273, -1.2418049573898315, -1.3555545806884766, 0.7328511476516724, ...
def test _ no _ loop _ fixture ( ) : global _ loop = asyncio. get _ event _ loop ( ) yield from asyncio. sleep ( 0. 01 ) assert true
[ 0.8270765542984009, 1.0085203647613525, 0.38985475897789, 0.4620233476161957, 0.5302873849868774, 1.0084264278411865, 0.44381123781204224, -0.02556172013282776, -0.5546262860298157, -0.5826171636581421, -0.281860888004303, 0.1539306491613388, -0.14485326409339905, 0.09419369697570801, -0...
def get _ args ( ) : parser = argparse. argumentparser ( description ='adventofcode') parser. add _ argument ('- i ','- - input ', help ='input file ', required = true ) parser. add _ argument ('- s ','- - second ', help ='input file ', action ='store _ true ', default = false ) return parser. parse _ args ( )
[ 0.3607717752456665, -0.21533486247062683, 0.4765694737434387, 0.11370737105607986, 0.7060191631317139, 0.041290175169706345, -0.4562097489833832, 0.04102062061429024, -1.337628722190857, 0.08696998655796051, 0.16137929260730743, -0.23624765872955322, -0.19134613871574402, 0.716002702713012...
def test _ change _ password _ returns _ correct _ html ( self, client, proto _ user ) : client. login ( username = f " { proto _ user. username } ", password = " m = 9uak ^ c, tbq9n = t ", ) response = client. get ( reverse ( " change _ password " ) ) html = response. content. decode ( " utf8 " ) assert html. startswi...
[ -0.23684610426425934, 0.358886182308197, 0.4223453998565674, 0.41004571318626404, -0.011475009843707085, 0.15001033246517181, -0.606188178062439, -0.01631089486181736, -0.02121695503592491, 0.0530349425971508, 0.44902509450912476, 0.5864043235778809, -0.26446816325187683, 0.360413163900375...
def open ( self ) : logging. info ( " keithley. open ( ) called. " ) self. keithley. open ( ) logging. info ( " keithley. open ( ) done. " ) return true
[ -0.5312284231185913, 0.36530452966690063, 0.6559776663780212, 0.06592880934476852, -0.08874199539422989, -0.15950477123260498, -0.4738991856575012, 0.9204003810882568, 0.042195189744234085, -0.4375796914100647, -0.5018332004547119, -0.7433138489723206, -0.22879496216773987, 0.4418619275093...
def test _ submit _ record _ rejection _ multiple _ english _ lang _ entries ( ) : res = requests. post ( f'{ env. awg _ base _ url } / api / cve - id / ', headers = utils. base _ headers, params = {'amount': 1,'cve _ year': 2000,'short _ name':'mitre'} ) id _ num = json. loads ( res. content. decode ( ) ) ['cve _ ids'...
[ 0.11995801329612732, 0.08820302784442902, 0.6235941648483276, -0.49509403109550476, 0.5506877303123474, 0.36512935161590576, -0.6131615042686462, 0.28486981987953186, -0.14367899298667908, 0.21652506291866302, -0.925902247428894, 0.4385982155799866, -0.2894197404384613, 0.3828338384628296,...
def find ( self, description = none ) : return self. _ custom _ select ( description )
[ 0.00961373746395111, 0.39834660291671753, 0.24724693596363068, 0.02723393775522709, 0.18558073043823242, -0.9938400387763977, -0.32475143671035767, -0.45013514161109924, 0.21719126403331757, 0.1697995960712433, 0.8081588745117188, 0.8325861096382141, -0.5119317770004272, -0.178304433822631...
def _ forward ( self, subj _ feats, pred _ feats, obj _ feats, probabilities, spat _ feats ) : # feature processing and deep scores visual _ scores = self. visual _ forward ( subj _ feats, pred _ feats, obj _ feats ) spat _ scores = self. spatial _ forward ( spat _ feats ) sem _ scores = self. semantic _ forward ( prob...
[ 0.001895735040307045, 0.029158424586057663, 0.41074609756469727, 0.5312753319740295, 0.5737758874893188, 0.49442923069000244, 0.8744401931762695, 0.4636361002922058, -0.5909000635147095, -0.9299491047859192, 0.0028698842506855726, 0.7838227152824402, 0.6444504857063293, 0.4647369384765625,...
def _ _ init _ _ ( self, name ) : self. name = name self. running = false
[ -0.5845266580581665, -0.8620520830154419, 0.39533087611198425, -0.7795431613922119, -1.2185536623001099, 0.46550053358078003, 0.19687668979167938, 0.937939465045929, -0.6511034965515137, 0.6903868913650513, -1.1680041551589966, -0.2505757212638855, -0.7618556022644043, 0.5935664176940918, ...
def bottom ( self ) : o = self. get _ ordering _ queryset ( ). aggregate ( max ('order') ). get ('order _ _ max') self. to ( o )
[ -0.8663667440414429, 0.7827132940292358, 0.7631754279136658, 0.37615692615509033, 1.4555712938308716, -1.046952724456787, -0.5168210864067078, -0.17997795343399048, -0.7971096038818359, 0.13353267312049866, 0.46108758449554443, 0.9488750696182251, 0.5078903436660767, -0.12596789002418518, ...
def topk ( f, t = 1, top = none ) : n = f. shape [ 0 ] if top is none : top = n / / 2 magnitude = torch. abs ( f [ : n / / 2 ] ) / ( n / / 2 ) # only considering real part - > n / / 2 magnitude [ 0 ] = magnitude [ 0 ] / 2 phase = torch. atan2 ( f. imag, f. real ) top _ mag, top _ freq = torch. topk ( magnitude, top ) t...
[ -0.8458414673805237, -0.28003060817718506, 0.6873675584793091, 0.19886620342731476, -0.6263261437416077, -0.926285982131958, 0.48310524225234985, 0.31015440821647644, -0.690346896648407, 1.0490365028381348, 0.22017857432365417, -1.0699273347854614, 1.1875970363616943, 0.1954965889453888, ...
def list _ containers ( client, resource _ group _ name = none ) : if resource _ group _ name is none : return client. container _ groups. list ( ) return client. container _ groups. list _ by _ resource _ group ( resource _ group _ name )
[ -0.1997954547405243, 0.6229963898658752, 0.2671673893928528, -0.33890119194984436, -0.302347868680954, -1.407025933265686, -0.4447644054889679, -0.7927871346473694, 0.030189020559191704, -0.04590003937482834, 0.9595514535903931, 0.3280165493488312, -0.4460989534854889, 0.7286204695701599, ...
def _ get _ prestage _ subcloud _ info ( subcloud _ name ) : try : os _ client = openstackdriver ( region _ name = subcloud _ name, region _ clients = none ) keystone _ client = os _ client. keystone _ client endpoint = keystone _ client. endpoint _ cache. get _ endpoint ('sysinv') sysinv _ client = sysinvclient ( subc...
[ -0.2699951231479645, 0.207881897687912, 0.9480583071708679, 0.49867188930511475, -0.20161499083042145, 0.1586078703403473, 0.2483420968055725, -0.14729340374469757, -0.4279540479183197, 0.24886973202228546, -0.8873799443244934, 0.08951442688703537, -0.4877367913722992, 0.4317264258861542, ...
def load _ mask ( self, image _ id ) : # override this function to load a mask from your dataset. # otherwise, it returns an empty mask. mask = np. empty ( [ 0, 0, 0 ] ) class _ ids = np. empty ( [ 0 ], np. int32 ) return mask, class _ ids
[ -1.5801414251327515, -0.4826672673225403, 0.5488983392715454, -0.1310071498155594, 0.7094774842262268, -0.07290314137935638, -0.5398672819137573, -0.8410215973854065, 0.6340630054473877, -0.0873580351471901, -0.03023068606853485, 0.34587469696998596, 0.298260360956192, 0.4813101589679718, ...
def getrotationfrom4circles ( img ) : circles = findcircles ( img ) ; if ( len ( circles ) = = 4 ) : dir = geometry. vect ( circles [ 0 ], circles [ 1 ] ) ; rangle = math. atan2 ( - dir [ 1 ], dir [ 0 ] ) ; # ~ print ( " rangle : % 5. 2fdeg " % ( rangle * 180 / math. pi ) ) return rangle ; return none ;
[ 0.21327653527259827, -0.06262502074241638, 0.34027037024497986, -0.7154755592346191, 0.023470215499401093, -0.7902842164039612, 0.7073598504066467, -1.168001413345337, 0.2488759309053421, -0.04961412772536278, -0.10408786684274673, -0.6139727234840393, -0.42891037464141846, -0.532435536384...
def get _ srcimg _ invvar ( stamp _ ivar, img _ ivar ) : # use img _ ivar when stamp _ ivar = = 0, both otherwise return img _ ivar use _ img _ ivar = np. ones ( img _ ivar. array. shape ). astype ( bool ) use _ img _ ivar [ stamp _ ivar. array > 0 ] = false # first compute using both ivar = np. power ( stamp _ ivar. a...
[ -0.524053692817688, -0.048877302557229996, 0.9780954122543335, -0.0626458078622818, -0.5012047290802002, 0.27649739384651184, 0.519290030002594, 0.4336085319519043, 0.09128044545650482, 0.8130027055740356, 0.23615793883800507, 1.0982364416122437, -0.6244364380836487, -0.02076559327542782, ...
def assert _ called _ with ( self, * args, * * kwargs ) : if self. call _ args is none : expected = self. _ format _ mock _ call _ signature ( args, kwargs ) raise assertionerror ('expected call : % s \ nnot called'% ( expected, ) ) self. _ assert _ with _ constraints ( args, kwargs, self. call _ args )
[ -0.4446096420288086, 0.30509915947914124, 0.628022313117981, 0.42138856649398804, 0.7262261509895325, 0.3678058087825775, -0.7040833234786987, -0.8362886309623718, 0.4469648003578186, -0.23412835597991943, -0.018360134214162827, 0.12894782423973083, -0.872100830078125, 1.0575404167175293, ...
def register _ module ( self, name = none, force = false, module = none ) : if not isinstance ( force, bool ) : raise typeerror ( f'force must be a boolean, but got { type ( force ) }') # note : this is a walkaround to be compatible with the old api, # while it may introduce unexpected bugs. if isinstance ( name, type ...
[ -1.8185124397277832, 0.6827363967895508, 0.46958449482917786, -0.20578084886074066, 0.5970754623413086, -0.324290931224823, -0.6677207946777344, -0.39660772681236267, 0.766667902469635, 0.15619345009326935, -0.152991384267807, 0.9756079912185669, -0.1320142298936844, 0.28089606761932373, ...
def get _ bbs _ env ( ) : os. system ( " rscript get _ env _ data. r " )
[ 0.1589743047952652, -0.6679007411003113, 0.3638884723186493, 0.2404753714799881, 0.34201017022132874, 0.587595522403717, 0.7604332566261292, -0.6885513663291931, -0.9985277056694031, 0.3200446665287018, 0.10390831530094147, 2.3423426151275635, -0.1204993948340416, -0.05062120780348778, 0...
def calculate _ time ( intervals : intervals, audible _ speed : float, silent _ speed : float ) : time _ data = { " before " : { }, " after " : { }, " delta " : { } } audible = 0 silent = 0 for interval in intervals. intervals : if interval. is _ silent : silent + = interval. duration else : audible + = interval. durat...
[ 0.727445125579834, -0.2604389190673828, 1.115085244178772, -0.5272909998893738, -0.6159806847572327, 0.9265754222869873, -0.4858846664428711, 0.14595741033554077, -1.1099538803100586, 1.179297924041748, -0.90343177318573, -0.0466361939907074, 0.28255394101142883, 0.6937590837478638, 1.62...
def eventtime ( self, i ) : super ( lineardistribution, self ). eventtime ( i ) t = self. date + i * ( self. duration / self. numevents ) return int ( round ( t ) )
[ 0.5804682970046997, -0.11751682311296463, 0.5074639320373535, -0.7067555785179138, -0.24794237315654755, 0.6507339477539062, 0.9964023232460022, -0.3322399854660034, 0.4319092631340027, 0.33026123046875, -0.5652501583099365, -0.7219232320785522, -0.13340461254119873, -0.49164339900016785, ...
def endeastri ( self, * args ) : return _ snap. tneanetmp _ endeastri ( self, * args )
[ -0.31698885560035706, -0.30348116159439087, 0.2140374630689621, -1.3143566846847534, 1.0153378248214722, 0.8854706883430481, -0.3062214255332947, 0.13849303126335144, -0.9296460747718811, 0.918585479259491, -0.667169988155365, -1.4379249811172485, -0.9544155597686768, 1.114426612854004, ...
def loadcamerainfo ( self ) : self. _ loadcalibration ( self. url, self. cname )
[ -0.265693336725235, -0.6922375559806824, 0.3353753089904785, 0.480710506439209, -0.6831032037734985, 0.19537405669689178, -0.21439425647258759, -0.38112401962280273, 0.10558445006608963, 0.2547227442264557, -1.282109260559082, -0.905974805355072, -0.3246384561061859, 0.7069053649902344, ...
def example _ 7 ( ) : pre = lambda x, y : [ [ y ] ] if len ( x ) = = 0 else x + [ x [ - 1 ] + [ y ] ] pre. _ _ name _ _ = " pre " x : list [ int ] = [ 1, 3, 4, 5 ] x0 = [ ] res = fold ( x, pre, x0, debug = true ) print ( f " fold ( { x }, { pre. _ _ name _ _ }, { x0 } ) = { res } " )
[ -0.17301689088344574, 0.4805263876914978, 0.6512935757637024, 0.1272246390581131, -0.744763970375061, -0.4039466083049774, 0.4632473289966583, 0.9809873104095459, 0.5662479400634766, -0.11416538804769516, -1.1232240200042725, 0.5014271140098572, 1.018395185470581, 0.8624140024185181, 0.4...
def test _ correct _ traceback ( self ) : reporter = yield self. get _ reporter _ with _ suite _ run ( ) expected _ locals _ for _ test _ failures = dict ( statustest _ fail _ assert _ namespace = dict ( some _ value = 1, other _ value = 2 ), statustest _ fail _ assert _ namespace _ in = dict ( some _ value = 1, other ...
[ 0.4877123236656189, 0.27429452538490295, 0.517302393913269, 0.2415018379688263, 0.8359397053718567, 0.0060091326013207436, 0.7615817785263062, 0.4123467206954956, -0.19089263677597046, -0.27719858288764954, -0.534217894077301, -0.38355791568756104, 0.010735651478171349, 0.5668228268623352,...
def group _ message _ keys ( cls, message ) : group _ key = super ( basereportsite, cls ). group _ base _ message _ key ( message ) yield dict ( dimension _ id = message. landing _ site, * * group _ key )
[ -0.22474715113639832, 0.9203112125396729, 0.12071209400892258, -0.0983862429857254, -0.016220521181821823, 0.14421731233596802, 0.828477680683136, -0.9923800826072693, -0.9947484731674194, 0.2259286493062973, 0.6469002366065979, 0.22631415724754333, -0.898898720741272, 1.3077781200408936, ...
def test _ example _ input _ two _ edit _ valid _ title ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. edit _ row ( " dummy _ input _ two " ) input _ page. enti...
[ 0.04984606057405472, -0.05136262625455856, 0.6746764779090881, 0.22116772830486298, -0.2944214344024658, 0.41895636916160583, -0.6362830996513367, -0.6220705509185791, 0.3951208293437958, 0.16223210096359253, -0.22352932393550873, -0.10996835678815842, 0.28647783398628235, -0.4018353819847...
def test _ view _ url _ accessible _ by _ name ( self, client, proto _ user ) : url = reverse ( " show _ profile _ page ", args = [ f " { proto _ user. pk } ", ], ) response = client. get ( url ) assert response. status _ code = = 200
[ 0.0708390548825264, 0.44365808367729187, 0.4303452670574188, 0.27593815326690674, -0.11309155821800232, 0.3711519241333008, 0.6883636116981506, -0.20062685012817383, -0.32203641533851624, -0.43330028653144836, -0.39564016461372375, 0.11831226199865341, 0.5539946556091309, 0.112730458378791...
def load ( self, * args ) : return _ snap. tstr _ load ( self, * args )
[ -0.7848913669586182, 0.7081132531166077, 0.34260058403015137, -0.6724870204925537, 0.10464410483837128, 0.39489462971687317, 0.7648549675941467, -0.02121918462216854, -1.3089776039123535, 0.39815330505371094, -0.6065141558647156, -1.4551745653152466, -0.3291458189487457, -0.329784989356994...
def install _ flavor ( flavor ='default') : zsh _ flavor _ folder ='{ } /.. / flavors / { } / zsh '. format ( root _ folder, flavor ) destination _ folder ='~ /. zsh'# custom themes for flavor _ file in listdir ( zsh _ flavor _ folder ) : print ( green ('uploading % s...'% basename ( flavor _ file ) ) ) put ('{ } / { }...
[ 0.19830001890659332, -0.3191051185131073, 0.7562991976737976, -0.3262023627758026, 0.6031228303909302, -0.2638876438140869, 0.5874596834182739, 0.6416107416152954, -0.2700195908546448, 0.6366928219795227, -0.951535165309906, 0.48820337653160095, -0.3974476158618927, 1.021119475364685, -0...
def tstrutil _ getxmltagnmval ( * args ) : return _ snap. tstrutil _ getxmltagnmval ( * args )
[ 0.13664355874061584, 1.0443534851074219, -0.013643532991409302, -0.18230430781841278, -0.43109503388404846, -0.7323552370071411, -1.1756423711776733, -0.7215777635574341, -1.1719239950180054, -0.08752421289682388, -0.42933550477027893, -0.4139328896999359, 0.5331107378005981, 0.54024195671...
def rotate ( self, rot ) : # todo : complete parameter documentation self. rotation = _ convert2tquat ( rot ) * self. rotation
[ -0.8797252774238586, 0.31340545415878296, 0.03830140456557274, -0.6491865515708923, 0.47955572605133057, -0.6387008428573608, 0.8884159326553345, -1.337550401687622, 0.20521722733974457, -0.740997314453125, -0.7840217351913452, -0.40065890550613403, -0.7488350868225098, -0.6517594456672668...
def test _ atomic _ boolean _ white _ space _ 1 _ nistxml _ sv _ iv _ atomic _ boolean _ white _ space _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - whitespace - 2. xsd ", instance = " nistdat...
[ -0.3880583941936493, -0.3464897572994232, 0.46806228160858154, 0.6881346106529236, -0.04718583822250366, 0.03223192319273949, 0.35556548833847046, -0.6218628883361816, -0.37720513343811035, 0.6197769045829773, -0.07374347001314163, 0.4202742874622345, -0.06468133628368378, 0.83998608589172...
def test _ takes _ tz ( marg, exp ) : pytest. debug _ func ( ) assert nldt. moment. takes _ tz ( marg ) = = exp
[ 0.7541908025741577, -0.41957083344459534, 0.08845861256122589, 0.04351944848895073, 0.13959519565105438, 0.7903452515602112, 0.537333607673645, 0.31150463223457336, 0.7080404758453369, -0.17031627893447876, -0.8989793658256531, -0.6054996848106384, -0.2944755256175995, 0.8077763319015503, ...
def intvattrvalueni ( self, * args ) : return _ snap. tneanet _ intvattrvalueni ( self, * args )
[ -1.2358921766281128, 0.36539947986602783, 0.17681078612804413, -0.2380843460559845, -0.08328011631965637, 0.30260318517684937, -0.10009581595659256, -0.7117995023727417, -1.036600947380066, 0.5350746512413025, 0.0649266466498375, -1.2744066715240479, -0.5540717840194702, 0.5132735371589661...
def hello ( ) : return render _ template ('main. html')
[ 1.0188014507293701, 0.38291311264038086, 0.49671322107315063, 0.36617758870124817, 0.03769955039024353, 0.5483441948890686, -0.17845924198627472, 1.3091164827346802, -1.0487823486328125, -0.01311870664358139, 0.14382268488407135, -0.7851279973983765, -0.27479442954063416, 0.104977160692214...
def do _ fw _ update ( conn, file _ name ) : logging. debug ( " update file location % s " % ( file _ name ) ) logging. debug ( " warning, the update process takes 7 minutes to complete. " + \ " please don't turn off the power!!! " ) logging. debug ( "... " ) # check if the update files exists. conn. sendline ('ls'+ fi...
[ 0.24472153186798096, -0.10959357023239136, 1.0387189388275146, 0.7373261451721191, -0.39521634578704834, 0.07991117238998413, 0.8603941202163696, 0.17101001739501953, -0.3267022371292114, -0.09390803426504135, -0.44815778732299805, -0.476874977350235, -0.5070139765739441, 0.460445970296859...
def collect _ participants ( layout, participant _ label = none, strict = false ) : all _ participants = sorted ( layout. get _ subjects ( ) ) # error : bids _ dir does not contain subjects if not all _ participants : raise bidserror ('could not find participants. please make sure the bids data'' structure is present a...
[ 0.4340124726295471, -0.5267156958580017, 0.8749289512634277, -0.35530102252960205, 0.16350077092647552, 0.17107582092285156, 0.02985605224967003, -0.3817138671875, 0.3365420699119568, 0.5264018774032593, 1.1092424392700195, 0.3715672194957733, -0.5902262330055237, -0.7157862186431885, -0...
def trade _ histories ( api _ key : str = api _ key, api _ secret : str = api _ secret, ) : client = privatebitwyrewsclient ( api _ key = api _ key, api _ secret = api _ secret ) client. trade _ histories ( ) while true : # you can do something to change payload to your needs per loop # eg read db, api calls, kafka con...
[ -0.055530231446027756, 0.015182927250862122, 0.8750044703483582, -0.8307700157165527, 0.8957073092460632, 0.05970276892185211, 0.10433416068553925, -1.2711948156356812, -0.5913545489311218, 0.15558646619319916, -0.05576039478182793, 1.471420407295227, -0.5242010354995728, 0.043903350830078...
def sum ( self, * args ) : return _ snap. tstopwatch _ sum ( self, * args )
[ -1.3864613771438599, 0.39855143427848816, 0.4440283477306366, 0.2544761300086975, 0.9540194869041443, 0.440360963344574, 1.378714919090271, -0.12005065381526947, -0.8312704563140869, -0.3261246681213379, -0.8650331497192383, -1.0427502393722534, 0.28744617104530334, 0.35556748509407043, ...
def crypt _ file _ contents ( self, data : bytes ) - > optional [ bytes ] : pass
[ 0.15519315004348755, -0.1769097000360489, 0.2335478663444519, 0.370863676071167, 0.3176206052303314, -0.10154968500137329, -0.7824616432189941, -1.3637044429779053, -0.6133491396903992, -0.3894539773464203, -0.5642092823982239, -0.37382376194000244, -1.1013212203979492, -0.4634081125259399...
def gen ( src _ filename = none, dst _ filename = none, src _ name = none, parent = none, rewrite = false ) : log _ func. info ( u'generate python gui module... start') if not os. path. exists ( src _ filename ) : log _ func. warning ( u'generation python file. file < % s > not found'% src _ filename ) return none try ...
[ -0.9816696047782898, -0.1329255998134613, 0.9446937441825867, -0.1003153845667839, -0.2154274433851242, 0.7894553542137146, 0.5500583648681641, 0.06733468919992447, -0.5162621736526489, 0.19502730667591095, -0.830644965171814, 0.18397513031959534, 0.17954537272453308, 0.002360797021538019,...
def extract _ xyz ( self ) : re _ numatom = re. compile ( r'^ \ s * ( \ d + ) \ s * $') # re _ title = re. compile ( r'^ \ s * (. * ) \ s * $') re _ coords = re. compile ( r'^ \ s * ( \ w + ) \ s + ( [ \ - \ d \. eedd ] + ) \ s + ( [ \ - \ d \. eedd ] + ) \ s + ( [ \ - \ d \. eedd ] + ) \ s * $') item _ numatom = item ...
[ -0.48047739267349243, -0.6484882831573486, 0.7686598896980286, -0.27663904428482056, -0.1465539038181305, 0.26340168714523315, 0.632546603679657, 1.1261162757873535, -0.4308719336986542, -0.06021834537386894, -0.5102012157440186, -0.5639806985855103, 0.19277320802211761, -0.331283986568450...
def fetch _ model _ from _ url ( url : str, model _ format : str, sha256 : str, ) - > tuple [ tvm. ir. module. irmodule, dict ] : rel _ path = f " model _ { sha256 }. { model _ format } " file = tvm. contrib. download. download _ testdata ( url, rel _ path, overwrite = false ) # check sha - 256 hash file _ hash = hashl...
[ 0.11279554665088654, -1.3840370178222656, 0.4940424859523773, -0.182214617729187, 0.17823471128940582, -0.37358883023262024, -0.5300179719924927, -0.2246793657541275, -0.019599488005042076, 1.077993631362915, -0.3718499541282654, -0.5338224768638611, 0.20774586498737335, 0.3779730796813965...
def nonintersecting _ 2d _ inds ( x ) : rs = 1 - np. diag ( np. ones ( x, dtype = np. int32 ) ) relations = np. column _ stack ( np. where ( rs ) ) return relations
[ -1.2533963918685913, 1.4774649143218994, 0.4779638648033142, -0.28232747316360474, -0.3457416892051697, 0.17510244250297546, 1.21857750415802, -1.0311919450759888, 0.19499434530735016, 0.24440918862819672, -0.22611810266971588, -0.3244004547595978, -0.8759263753890991, -0.8343647718429565,...
def describe _ categorical _ array ( array : union [ np. ndarray, np. void ] ) - > dict [ str, union [ str, int, bool, np. ndarray ] ] : if not fuav. is _ 1d _ like ( array ) : raise incorrectshapeerror ('the input array should be 1 - dimensional.') classic _ array = fuat. as _ unstructured ( array ) assert len ( class...
[ -0.8225128054618835, 0.11984414607286453, 0.7225468754768372, -0.03266511484980583, -1.0912293195724487, -0.37408584356307983, 0.5489063262939453, -0.3944128155708313, -0.3398330807685852, 0.18035577237606049, 0.3072430193424225, 1.2092119455337524, 1.0705221891403198, 0.8276666402816772, ...
def test _ equal ( self ) : # case two top items are equal stack = [ 1, 2, 5, 5 ] self. testsmartcontractoperations. operations ['equal'] ( stack ) assert stack. pop ( ) # check that the top item is true # case two top items are not equal stack = [ 1, 2, 5, 15 ] self. testsmartcontractoperations. operations ['equal'] (...
[ -0.5593587160110474, 1.1181573867797852, 0.507049024105072, 0.9267852902412415, 0.6643347144126892, -0.10127289593219757, 0.9220150709152222, -0.3830606937408447, -0.07633115351200104, 0.8269762992858887, -1.0211470127105713, -1.0880587100982666, -0.3352276384830475, -0.27178236842155457, ...
def parse _ payload ( self, request ) : payload = request. post. get ('payload') return payload
[ 0.10739244520664215, 0.40656593441963196, 0.42415526509284973, -0.2504369020462036, -0.12741324305534363, -0.011298594065010548, -1.1630762815475464, -0.7107255458831787, -0.01509456429630518, -0.37198880314826965, 0.4280249774456024, -0.9206597208976746, -0.06604799628257751, 0.4198910593...
def create _ optimizer ( name, rescale _ grad = 1, * * kwargs ) : if name. lower ( ) in optimizer. opt _ registry : return optimizer. opt _ registry [ name. lower ( ) ] ( rescale _ grad = rescale _ grad, * * kwargs ) else : raise valueerror ('cannot find optimizer % s'% name )
[ 0.39750638604164124, -0.04100954160094261, 0.42046260833740234, 0.20635564625263214, 0.006436065770685673, -0.36618340015411377, -0.6143361926078796, -1.0937705039978027, -0.11853495240211487, 0.6278068423271179, -0.5599098801612854, -0.08718346059322357, -0.6865656971931458, 0.25615230202...
def clean ( words : set ) - > set : blacklist = stopwords. words ('english') blacklist. extend ( read _ lines ( swearwords _ file _ name ) ) return { w for w in words if w not in blacklist and len ( w ) > 2 }
[ 0.24783793091773987, 0.20854824781417847, 0.3888040781021118, -0.5687073469161987, -0.5797538161277771, 0.03909778594970703, -0.3194112181663513, -0.25013968348503113, -1.1408380270004272, 1.3456494808197021, 0.06895099580287933, 0.46634986996650696, -0.13334114849567413, 0.945527851581573...
def is _ saturated ( self, items : bundle, category _ index : int ) - > bool : return self. sub _ agents [ category _ index ]. is _ saturated ( items )
[ -0.3485303819179535, -0.0070237815380096436, 0.23383255302906036, 0.23166175186634064, 0.8057788610458374, -0.012784302234649658, -0.5769229531288147, -0.4747770428657532, -0.5985313653945923, 0.8389021754264832, -0.9016305804252625, 0.19056853652000427, 0.8130658864974976, -0.274763613939...
def font _ variant ( self ) : return self. _ font _ variant
[ 0.19007593393325806, -0.12388855963945389, 0.2864695191383362, 0.17734114825725555, -0.29300540685653687, 0.7231476306915283, 1.3526333570480347, -0.56101393699646, 0.7134743928909302, -1.1571136713027954, -0.4579589068889618, 1.174608826637268, 0.06716777384281158, -0.8532968163490295, ...
def _ _ lt _ _ ( self, * args ) : return _ snap. trowiterator _ _ _ lt _ _ ( self, * args )
[ -0.06134049594402313, -0.017655890434980392, 0.2717188596725464, -0.7220220565795898, -0.3926406502723694, -0.5600494146347046, -0.05511181429028511, -0.9783715605735779, -0.6391841173171997, -0.25149011611938477, -0.5481652021408081, -1.0210052728652954, 0.16989876329898834, 0.77039599418...
def distfromcommuc ( self, commresult ) : # assumes mm # self. logger. debug ( " translated xy commresult from { } to { } ". format ( commresult, float ( commresult ) / 1000 ) ) # return float ( commresult ) / 1000 # assumes encoder units commresult _ m = commresult / ( 1633 / 9. 89 ) / 39. 3701 self. logger. debug ( "...
[ 0.28887906670570374, -0.3525536358356476, 0.5021638870239258, -0.9762870669364929, -0.725882351398468, -0.3478752672672272, 0.3987116813659668, -0.6616477966308594, 0.37255674600601196, -0.022999729961156845, -0.22447842359542847, -0.43552863597869873, -1.6401327848434448, 0.23784208297729...
def normalize ( self, dat ) : # get the id for the data set to normalize to from the measurements # table, i. e. the one with the same value for grouping column and the # entered label query = ('select id, { 1 } from { 0 } where { 1 } = % s and { 2 } = % s') # grouping _ column and label _ column is retrieved from lgs ...
[ -0.4276389479637146, 0.6910628080368042, 0.664963960647583, -0.12702225148677826, -0.13118544220924377, -0.14698758721351624, 0.2921651303768158, -0.08743419498205185, -0.526494026184082, -0.22805456817150116, 0.8716776967048645, 0.14320316910743713, -0.2348400503396988, -0.082100398838520...
def has _ product ( self, tokens ) : return any ( [ t. _. get ( " is _ product " ) for t in tokens ] )
[ -0.947428286075592, 0.19551850855350494, 0.2783844769001007, 1.104823350906372, 0.5750135183334351, -0.06935342401266098, -0.4454343020915985, -0.258206844329834, -0.09345977008342743, 0.6027010083198547, -0.510240912437439, -0.14613297581672668, -0.18036885559558868, 0.45837828516960144, ...
def getstrmapbyid ( self, * args ) : return _ snap. trowiterator _ getstrmapbyid ( self, * args )
[ -0.20885919034481049, -0.40021127462387085, 0.28276342153549194, 0.2621491551399231, -0.19641640782356262, -0.22533106803894043, 0.5483744740486145, -1.044152855873108, -0.04292355477809906, -0.1535545140504837, -0.6669222116470337, -0.42265579104423523, -0.543317973613739, 0.2707355618476...
def decryption ( input _ text, shift _ number ) : decrypted _ text = [ ] for i in input _ text : if i. isalpha ( ) : if i. islower ( ) : if ( ord ( i ) - shift _ number ) < ord ('a') : decrypted _ text. append ( chr ( ( ord ('z') + 1 ) - ( ord ('a') - ( ord ( i ) - shift _ number ) ) ) ) continue else : if ( ord ( i ) ...
[ -0.0065560475923120975, -0.3146427273750305, 0.8248448967933655, -0.0927281379699707, -0.7443985939025879, -0.15673178434371948, 0.3217911422252655, 0.042806439101696014, 0.7769244909286499, 0.2606284022331238, -0.14284595847129822, -0.0955793559551239, -1.0733911991119385, 0.0495097078382...
def make _ path ( came _ from, start, goal ) : cp = goal path = [ ] while cp! = start : path. append ( cp ) if cp in came _ from : cp = came _ from [ cp ] else : return [ ] path. append ( start ) path. reverse ( ) return path
[ 0.1225287914276123, -0.5257582664489746, 0.5760948061943054, 1.1680266857147217, 0.024928461760282516, 0.4816010296344757, 0.036333050578832626, 0.30722352862358093, -1.001405119895935, 0.11381717026233673, -0.05660925805568695, 0.10241065174341202, -0.016845133155584335, -0.78297829627990...
def isnode ( self, * args ) : return _ snap. tundirnet _ isnode ( self, * args )
[ -1.1806156635284424, -0.757384181022644, 0.0791909247636795, 0.5950431823730469, 1.6146305799484253, -0.08146047592163086, 0.479982852935791, -0.7523971796035767, 0.05208117514848709, 1.056401014328003, -0.0402330681681633, -0.6347179412841797, -1.264784574508667, 0.5640158653259277, -0....
def tographsequence ( self, * args ) : return _ snap. ttable _ tographsequence ( self, * args )
[ -2.0931050777435303, 0.9245739579200745, 0.40521013736724854, 1.185563325881958, 0.664630651473999, -0.7196853160858154, 0.7615557312965393, -0.8408264517784119, -1.212106704711914, 1.4510133266448975, -1.16191565990448, -0.7579874992370605, -0.5111705660820007, -0.20327168703079224, -0....
def runningavg ( data, window _ width ) : # adopted from http : / / stackoverflow. com / questions / 11352047 / finding - moving - average - from - data - points - in - python cumsum _ vec = np. cumsum ( np. insert ( data, 0, 0 ) ) ma _ vec = ( cumsum _ vec [ window _ width : ] - cumsum _ vec [ : - window _ width ] ) /...
[ -0.2525683641433716, -0.3543225824832916, 0.5524263381958008, -0.5773609280586243, -0.5207659602165222, 0.072336345911026, 1.2773233652114868, 0.47125503420829773, 0.1275971382856369, 0.6312859654426575, 0.6744815707206726, 1.2545446157455444, -0.5632485747337341, 0.8794089555740356, -0....
def set _ spec ( screen ) : global spec, div _ dic spec ['total _ h'] = int ( screen [ 1 ] ) spec ['total _ w'] = int ( screen [ 0 ] ) if settings ['show _ ticker'] : spec ['ticker _ h'] = max ( 68, int ( spec ['total _ h'] * int ( settings ['ticker _ height'] ) / 100 ) ) else : spec ['ticker _ h'] = 0 spec ['ticker _ ...
[ -0.26050087809562683, 0.3417186737060547, 0.7973195910453796, -0.7091377377510071, 0.026308108121156693, 0.018917551264166832, 0.6554072499275208, -0.6721226572990417, -0.32043778896331787, 0.8447999358177185, -0.10190459340810776, 0.07846660912036896, 0.729010820388794, 0.9550610184669495...
def bsort ( self, * args ) : return _ snap. tfltv _ bsort ( self, * args )
[ -0.4899136424064636, 0.970573365688324, 0.28276461362838745, 0.678004801273346, 0.3473495543003082, -0.7422937154769897, 0.7739244103431702, 0.11360384523868561, -1.8335590362548828, -0.789339005947113, -0.4326840937137604, 0.1018160730600357, -1.4048004150390625, 1.6340091228485107, -0....
def get _ intersections _ with _ interval ( self, interval ) : return self. get _ intersections ( interval, interval )
[ -0.6480928063392639, 0.3911415934562683, 0.46520522236824036, 1.407009243965149, 0.3361615836620331, -0.30296921730041504, -0.4879521429538727, -0.4094181954860687, -0.5161827206611633, 0.13149970769882202, -0.4503900110721588, -0.8342552185058594, -0.8989108204841614, 0.23749077320098877,...
def clear ( self, limit _ ms = none ) : if limit _ ms is none : self. channel _ map = collections. defaultdict ( list ) return for chid, entities in self. channel _ map. iteritems ( ) : self. channel _ map [ chid ] = [ x for x in entities if x ['time _ ms'] < limit _ ms ]
[ 0.21041139960289001, -0.2617702782154083, 0.5198941826820374, -1.0168277025222778, 0.06685932725667953, -0.00016850960673764348, -0.8043955564498901, 0.23061533272266388, 0.1828732043504715, 0.5973937511444092, 0.3402211666107178, 1.6793659925460815, -0.1406400352716446, 0.3300108909606933...
def getintattrinddate ( self, * args ) : return _ snap. tneanetmp _ getintattrinddate ( self, * args )
[ 0.07346063107252121, -0.5739552974700928, 0.4530034363269806, -0.7085809111595154, 0.7980504035949707, 0.7535496354103088, -0.13463173806667328, -0.2937259078025818, -1.0859915018081665, -0.15433484315872192, 0.4805118441581726, -0.9162513017654419, -1.6577332019805908, 0.9964657425880432,...
def test _ valid _ input ( self, graph, monkeypatch, methods ) : objective _ return = ( 0, [ 0 ] ) def custom _ method ( * args, * * kwargs ) : " " " mockup of custom - method function fed to ` ` search ` ` " " " return objective _ return with monkeypatch. context ( ) as m : m. setattr ( dense, " method _ dict ", { met...
[ -0.2860651910305023, 0.9162610173225403, 0.42052048444747925, 0.1695716232061386, 0.4965658485889435, -0.013504933565855026, 0.15861479938030243, 0.17599071562290192, 0.25601762533187866, -0.2473640739917755, 0.0676974505186081, -0.4725005030632019, -0.3859200179576874, -0.2890644073486328...
def forward _ app ( self, response ) : logger. info ( " in forward _ app. last url : % s ", response. url ) if self. process _ errors ( response, [ teststrings. error ] ) or \ response. url. lower ( ). find ( teststrings. institute _ login _ success. lower ( ) ) = = - 1 : url = self. url _ provider. get _ institute _ l...
[ -1.1486859321594238, 0.3813592493534088, 0.6498175263404846, -0.36630117893218994, 0.17794249951839447, 0.3589325547218323, 0.3314869701862335, -0.14343854784965515, 0.7765685319900513, -0.2974660098552704, 0.5409234166145325, 0.2034245878458023, 0.8399792313575745, -0.09660974144935608, ...
def cal _ proc _ ready ( caldir = '. / ', fsize = 8400960, mintest = false, ncp = 0, test _ cal _ ims = false ) : nbias = 0 nbias2 = 0 nxe = 0 nhg = 0 ncd = 0 ndome = 0 ret = false if test _ cal _ ims : dof = glob. glob ( os. path. join ( caldir,'dome. fits') ) hgf = glob. glob ( os. path. join ( caldir,'hg. fits') ) c...
[ -0.23366890847682953, 0.09626446664333344, 1.058794617652893, 0.051938917487859726, -0.24719862639904022, 0.08779358118772507, 0.4215647280216217, -0.7543517351150513, 0.03996943309903145, 0.2804903984069824, 0.2520122230052948, 0.14662688970565796, 0.02074916660785675, 1.3759572505950928,...
def test _ atomic _ base64 _ binary _ pattern _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ pattern _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - pattern - 1. xsd ", instance = " ...
[ -0.28965437412261963, -0.4489421546459198, 0.5152226686477661, 1.48093581199646, 0.24052846431732178, 0.15954160690307617, 0.5696988105773926, 0.1652778834104538, 0.2562578618526459, 0.7485747933387756, -0.09549543261528015, 0.1765267252922058, -0.572432279586792, 0.12414859980344772, -0...
def loop ( self ) : return self. _ loop
[ -0.20136772096157074, -0.29400989413261414, 0.03230021893978119, 0.15936532616615295, -0.10186327248811722, 1.218874216079712, 0.5786648392677307, -0.7400831580162048, -0.3689691424369812, -0.1643061637878418, 0.49413222074508667, 0.18365679681301117, -0.4154123067855835, -0.98494267463684...
def sha256 ( message ) : return hashlib. sha256 ( to _ bytes ( message ) ). hexdigest ( )
[ 0.9883331060409546, -0.1411062628030777, 0.02490353025496006, -0.48407089710235596, 0.02178068645298481, -0.7966405749320984, -0.7626635432243347, -0.13890618085861206, -0.47787603735923767, 0.5399574637413025, -0.5050594806671143, 0.12096872180700302, -0.7109246850013733, -0.0872644260525...
def insert _ results _ into _ onnx ( model, results, as _ parameter = true, suffix ='_ dbg ', param _ name = none, node _ type ='debug ', domain ='debug ', domain _ opset = 1 ) : inputs = list ( model. graph. input ) outputs = list ( model. graph. output ) inits = list ( model. graph. initializer ) inits _ sparse = lis...
[ -0.8570946455001831, 0.6250554919242859, 0.6182027459144592, -0.5006768703460693, -0.09598881006240845, -0.4358425438404083, 0.41005855798721313, -0.5920925140380859, -0.30696073174476624, 0.30707594752311707, -0.28203943371772766, 0.09769287705421448, -0.3822908103466034, 0.28299501538276...
def example ( cls ) : return cls ('example plain text output')
[ 1.5903468132019043, -0.0612163208425045, 0.21803395450115204, -0.03090115636587143, -1.6333991289138794, -0.1715903878211975, 0.16196413338184357, 0.778443455696106, 0.23745042085647583, -0.7463714480400085, -1.1050653457641602, -0.5186847448348999, -0.6606946587562561, -0.8686779737472534...
def print _ title ( ) : for item in data : print ( item [ " title " ] )
[ 0.10453260689973831, -0.6864550709724426, 0.4172704815864563, -0.47680428624153137, 0.6273829936981201, 0.3618428707122803, -2.246243476867676, 0.00031528586987406015, -0.6120704412460327, 0.5603452324867249, -0.37625882029533386, 0.45512109994888306, 0.18535219132900238, -0.12533625960350...
def tint _ iseven ( * args ) : return _ snap. tint _ iseven ( * args )
[ -0.6770831346511841, -0.45543915033340454, 0.3513600528240204, 0.7729101181030273, 0.8838971257209778, 0.4241754114627838, -0.09852194041013718, 0.12218042463064194, -0.6465047001838684, 0.5619263648986816, -1.3772408962249756, 0.6699668765068054, -1.3998563289642334, 0.18627393245697021, ...
def with _ chip _ uri ( self, uri ) : b = self. _ copy ( ) b. config ['chip _ uri'] = uri return b
[ -0.26569634675979614, 0.24857601523399353, 0.520606517791748, 0.7180469632148743, -0.9305423498153687, 0.15015189349651337, 0.26339709758758545, 0.6534989476203918, 1.0382611751556396, -0.6817266345024109, -0.009624315425753593, 0.4337030351161957, -1.1357262134552002, -0.11746630817651749...
def assemblequadratureconversion ( fromq, toq, n ) : conversionmat = [ [ 0. 0 for _ in range ( n ) ] for _ in range ( n ) ] for i in range ( 0, n ) : phi, _ = mathsutils. basefunc1d ( toq [ i ], fromq, n ) for j in range ( 0, n ) : conversionmat [ j ] [ i ] = phi [ j ] # check order return conversionmat
[ -0.7470593452453613, -0.7977782487869263, 0.5149443745613098, -0.40046626329421997, -0.48378986120224, -0.6381365656852722, -0.5090987086296082, -0.6142818331718445, -0.06673823297023773, 0.4552435874938965, -0.1577903777360916, 0.1624039113521576, 0.07191672176122665, -0.06008352339267731...
def reservenidindeg ( self, * args ) : return _ snap. tngraph _ reservenidindeg ( self, * args )
[ 0.2988729774951935, 0.7202609181404114, 0.16419287025928497, -0.24102047085762024, 1.1336640119552612, 0.07537604868412018, 0.532227635383606, -0.33670443296432495, -1.2904527187347412, 0.3606041967868805, -1.1016358137130737, -0.8035433292388916, -1.4936705827713013, -0.29669374227523804,...
def _ _ set _ _ ( self, locator, value ) : element = self. driver. instance. find _ element ( * locator ) element. clear ( ) element. send _ keys ( value )
[ -1.1868399381637573, -0.050853315740823746, 0.28854820132255554, -0.46453943848609924, -0.12125785648822784, -0.5920590758323669, -0.3304615914821625, -0.2804826498031616, 0.4216228127479553, 1.3918423652648926, -0.7010729312896729, 0.31807461380958557, 0.5549286603927612, -0.0919158160686...
def protocol ( url ) : return url. split (': / /') [ 0 ]
[ -0.5024542212486267, 0.08578494191169739, 0.3057285249233246, 0.06720123440027237, -0.38818883895874023, 0.21922236680984497, 0.340159147977829, 0.05755050480365753, 0.49895763397216797, 0.5504100918769836, -0.13753405213356018, -0.48631954193115234, -0.9581005573272705, -1.965322017669677...
def _ get _ thumbnail _ url ( self, soup : soupinfo ) - > optional [ str ] : return none
[ -0.8781425356864929, 0.16039524972438812, 0.4175876975059509, 0.03406615927815437, 0.3957136571407318, -0.3982488214969635, -0.07257439941167831, 0.38787344098091125, 0.5174773335456848, -0.40122729539871216, -0.27131912112236023, -0.8873698115348816, 0.5670005679130554, 0.2096642702817917...
def _ get _ build _ version ( ) : # this function was copied from lib / distutils / msvccompiler. py prefix = " msc v. " i = sys. version. find ( prefix ) if i = = - 1 : return 6 i = i + len ( prefix ) s, rest = sys. version [ i : ]. split ( " ", 1 ) majorversion = int ( s [ : - 2 ] ) - 6 if majorversion > = 13 : major...
[ 0.3735777735710144, -0.9860386848449707, 0.8277723789215088, 0.3490074872970581, -0.44647499918937683, -0.8069478869438171, 0.8715729117393494, 0.32201069593429565, 0.509617269039154, -0.08870691061019897, -0.23007625341415405, -0.033661261200904846, -0.9338075518608093, -0.020478727295994...
def check _ unnecessary _ loop ( self ) : valar = [ 0 ] curp = 0 func = {'>': lambda ar, i : ( ar, i + 1 ),'<': lambda ar, i : ( ar, i - 1 ),'+': lambda ar, i : ( ar + 1, i ),'-': lambda ar, i : ( ar - 1, i ), ',': lambda ar, i : ( ar, i ), '.': lambda ar, i : ( ar, i ) } for char in self. program : if char = ='[': if ...
[ -0.5176688432693481, -0.11304183304309845, 0.9014104604721069, -0.5792341828346252, -0.7991092801094055, 0.0855255201458931, 0.43198779225349426, -0.7782862782478333, -0.103532575070858, 0.2324800044298172, 0.011746129021048546, 0.7591609358787537, -1.215523600578308, 1.4034485816955566, ...
def begni ( self, * args ) : return _ snap. tungraph _ begni ( self, * args )
[ 0.5160823464393616, 0.0998067557811737, 0.4077758193016052, 1.4015579223632812, 0.6791737675666809, -0.816990315914154, -0.1753188967704773, -0.07281288504600525, 0.07653063535690308, -0.4557719826698303, -1.085404396057129, -0.15208692848682404, -0.9530752897262573, -0.16294585168361664, ...
def single ( config _ path, model _ path, image _ path, cuda, crf ) : # setup config = omegaconf. load ( config _ path ) device = get _ device ( cuda ) torch. set _ grad _ enabled ( false ) classes = get _ classtable ( config ) postprocessor = setup _ postprocessor ( config ) if crf else none model = eval ( config. mod...
[ -0.4213116466999054, 0.6265665888786316, 0.8897407054901123, -0.06854056566953659, -0.07187385112047195, 0.7061307430267334, 1.3381942510604858, 0.3235973119735718, -0.15770290791988373, 0.3960602283477783, 0.21932001411914825, 0.5671024322509766, 0.4463290572166443, 0.7593771815299988, ...
def squarable ( state ) : import math sqrt = math. sqrt ( len ( state ) ) if sqrt % 1! = 0 : print ( " not a squareable list " ) return false else : return true
[ -0.7431055903434753, 0.08104392886161804, 0.640252411365509, 0.12388983368873596, -0.4644259512424469, 0.33695903420448303, -0.5584995150566101, 0.4770791530609131, 1.554366111755371, -0.11962610483169556, -1.0702085494995117, -0.7364614605903625, -1.023031234741211, 0.5575471520423889, ...
def _ get _ named _ output _ uri ( self, job _ name : str, output _ names : optional [ union [ iterable [ str ], str ] ] = none ) - > dict [ str, str ] : if isinstance ( output _ names, str ) : output _ names = { output _ names } elif output _ names : output _ names = set ( output _ names ) outputs = get _ job _ output...
[ -0.2730492949485779, -0.2076924443244934, 0.5826350450515747, -0.4357030391693115, -0.8397917747497559, -0.6603047251701355, 0.629288375377655, 0.03349478170275688, -0.605774998664856, -0.17180339992046356, 0.5594999194145203, -0.2610436975955963, 0.2262442409992218, 0.3896874487400055, ...
def addfltattrdatn ( self, * args ) : return _ snap. tneanetmp _ addfltattrdatn ( self, * args )
[ -0.29173123836517334, 0.1604325771331787, 0.45729631185531616, -1.258386492729187, 1.2589646577835083, -0.21778728067874908, 0.13367976248264313, 0.5841026902198792, -0.3032938539981842, -1.2686985731124878, -0.6300830245018005, -1.0137375593185425, 1.0334584712982178, 1.0683892965316772, ...
def send _ outlook _ invite ( filename, recepient, ics _ file, invite _ method ) : # step 1 : creating email message " if invite _ method = ='publish': subject = " new appointment booked " text = " please remember to add it to your calendar! " if invite _ method = ='cancel': subject = " appointment ceancelled " text = ...
[ 0.11621037870645523, -0.3802865445613861, 0.6044602990150452, 0.5132569670677185, 0.27734243869781494, 0.5399038195610046, -0.5380570888519287, -0.10650279372930527, -0.8252601623535156, 1.3006027936935425, -0.09056562185287476, 1.1469261646270752, -1.5105628967285156, -0.5403826832771301,...
def unionlen ( self, * args ) : return _ snap. tstrv _ unionlen ( self, * args )
[ -0.6188510656356812, 0.7391901612281799, 0.039062194526195526, -0.1373385637998581, 0.5246243476867676, -0.10844720155000687, 0.8742352724075317, 1.6843814849853516, -0.05522472411394119, -0.43438711762428284, -0.8042736053466797, -0.3647782504558563, 0.4830475449562073, 0.478914350271225,...
def test _ moment _ init ( dspec, fmt, tz, expoch ) : pytest. debug _ func ( ) if expoch = = " now " : # payload actual = nldt. moment ( dspec, fmt, tz ) assert actual. epoch ( ) = = int ( time. time ( ) ) elif isinstance ( expoch, exception ) : with pytest. raises ( type ( expoch ) ) as err : # payload actual = nldt. ...
[ -0.36787596344947815, -0.0278867706656456, 0.3815916180610657, -0.5684099197387695, 0.35829925537109375, 0.39546385407447815, -0.1881132572889328, -0.09571311622858047, -0.03182314708828926, -0.4864136874675751, -0.4616745412349701, -0.13928759098052979, 0.2850534915924072, 1.3190104961395...
def logo _ panel ( self ) : screen _ y, screen _ x = self. screen. getmaxyx ( ) win = curses. newwin ( screen _ y, screen _ x, 0, 0 ) self. start _ panel = panel. new _ panel ( win ) f = open ( " logo. txt ",'r'). read ( ) self. start _ panel. window ( ). addstr ( f, curses. a _ bold ) logo _ height = len ( f. split ( ...
[ -0.04602222517132759, -0.23284608125686646, 0.7134192585945129, -0.333130806684494, -0.5523852109909058, 0.4851590096950531, 0.6946178674697876, 0.16036823391914368, -1.4229350090026855, 0.4527672529220581, -0.5227442979812622, 0.7172856330871582, 0.010531066916882992, 0.3657168745994568, ...
def task _ builder ( generator, n _ train = 1000, n _ test = 250 ) : task = {'train': [ ],'test': [ ] } for i in range ( 0, n _ train ) : inp, out = generator ( ) task ['train']. append ( {'input': inp,'output': out } ) for i in range ( 0, n _ test ) : inp, out = generator ( ) task ['test']. append ( {'input': inp,'out...
[ -0.8928229212760925, 0.34733155369758606, 0.5761925578117371, 0.34372827410697937, -0.8201853036880493, -0.5976538062095642, 0.6414405703544617, 0.8877111673355103, -0.9127306938171387, -0.27372151613235474, -1.0071792602539062, -0.47397395968437195, 0.5404265522956848, 0.20952355861663818...
def main ( species, data _ dir, output _ dir, test _ size, overwrite, file _ ext ) : print ( species ) species _ names = " _ ". join ( sorted ( species ) ) data _ dir = path ( data _ dir ) output _ dir = path ( output _ dir, species _ names ) if output _ dir. exists ( ) and not overwrite : raise valueerror ( f " { str ...
[ -0.3302038311958313, 0.07760026305913925, 0.7513284683227539, 0.11078950762748718, -0.12856538593769073, -0.5383772850036621, 0.7723103761672974, 0.3459395468235016, 0.1122562363743782, -0.3931589722633362, 0.32113519310951233, 0.886535108089447, 0.2814714014530182, -0.41458606719970703, ...
def find _ genders ( code : str, pattern : pattern [ str ] = re. compile ( r " " ), ) - > list [ str ] : return [ ]
[ -1.3568922281265259, 0.9164138436317444, 0.6256386637687683, -0.3923972547054291, 0.8572659492492676, 0.18784961104393005, -0.19649212062358856, 0.2585553526878357, -0.43895354866981506, 0.2268209159374237, -0.7469976544380188, 0.28315508365631104, -0.2507597804069519, 1.1912931203842163, ...
def mc _ trial ( board, player ) : while ( board. check _ win ( ) = = none ) : empty = board. get _ empty _ squares ( ) next _ move = random. choice ( empty ) board. move ( next _ move [ 0 ], next _ move [ 1 ], player ) player = provided. switch _ player ( player )
[ -0.6406276226043701, 0.42808979749679565, 0.6197200417518616, 0.3589770495891571, -0.42757293581962585, 0.12603911757469177, 0.3405015170574188, 0.13807232677936554, 0.22497518360614777, 0.6956759691238403, -0.0811573788523674, 0.6095443964004517, -0.8456010818481445, -0.3502260446548462, ...