text
stringlengths
25
2.19k
embedding
listlengths
768
768
def test _ wi _ file _ none ( self ) : rectangle. save _ to _ file ( none ) with open ( " rectangle. json ", " r " ) as f : self. assertequal ( " [ ] ", f. read ( ) )
[ -0.2805299162864685, -1.0055365562438965, 0.49744507670402527, -1.3943496942520142, 1.4654778242111206, -0.05309957638382912, -0.20502954721450806, -0.47118228673934937, -0.8679630160331726, -0.18663671612739563, -0.5570468306541443, -0.18233422935009003, 0.012196474708616734, 0.5104779601...
def read _ energy _ levels ( input _ file, units ='ev') : try : data = ccopen ( input _ file ). parse ( ) levels = np. array ( data. moenergies ) if units! ='ev': try : levels = convertor ( levels,'ev ', units ) except keyerror as e : raise keyerror ( f'cannot convert energy levels to { units }') except attributeerror ...
[ -0.4530191123485565, -0.5346583127975464, 0.31269609928131104, 0.5883244872093201, -0.40548089146614075, 0.6757479310035706, -0.6174814105033875, 0.8953222036361694, -1.2024890184402466, -0.25874826312065125, 0.1099160760641098, -0.35586968064308167, -0.44872042536735535, 0.410054713487625...
def dim _ cnt _ check ( ds, varname, dim _ cnt ) : if len ( ds [ varname ]. dims )! = dim _ cnt : msg _ full ='unexpected dim _ cnt = % d, varname = % s'% ( len ( ds [ varname ]. dims ), varname ) raise valueerror ( msg _ full )
[ 0.6671998500823975, 0.6521452069282532, 0.4447028636932373, -0.43462616205215454, 0.19481374323368073, -0.1163303479552269, 0.324130654335022, 0.7766194939613342, -0.38625943660736084, 0.3468557298183441, 0.48503392934799194, 1.1083111763000488, 1.036355972290039, 0.42542755603790283, 0....
def watchdog _ callback ( self ) : self. missed _ heartbeats + = 1 log. critical ( "!!! missed a heartbeat " " nr { } from peer!!! ". format ( self. missed _ heartbeats ) ) if ( self. state = = dlepsessionstate. in _ session _ state ) and ( self. missed _ heartbeats > 3 ) : self. enter _ session _ termination _ state (...
[ 0.6094310283660889, 0.3455466032028198, 0.6674380302429199, -0.047962967306375504, 0.4416177272796631, 0.11936727911233902, -0.1335507035255432, -0.340633362531662, 0.8958232998847961, 1.0031763315200806, 0.3798523545265198, -0.396106094121933, -0.1744529902935028, -0.19667838513851166, ...
def bruteforce _ password ( candidates ) : password = " " pos = 0 while true : pos + = 1 character = bruteforce _ password _ character ( candidates, pos ) if type ( character ) = = str : password + = character print ( password ) else : break return password
[ -0.36544069647789, -0.845771312713623, 0.3034069240093231, 0.7744064927101135, 0.5563634634017944, -0.10468527674674988, -0.0699310451745987, 0.1939947009086609, -0.19924405217170715, -0.09968440979719162, 0.14578859508037567, 0.6015046834945679, -1.1333143711090088, 0.21235743165016174, ...
def _ set _ base _ pose ( self, pose ) : flange = ( self. _ frame * pose ) * self. _ toolpose _ inv self. rob. tcp. base = ( flange. pos. x, flange. pos. y, flange. pos. z ) self. rob. tcp. rotation = freecad. rotation ( flange. rot. x, flange. rot. y, flange. rot. z, flange. rot. w )
[ 0.095209501683712, 0.07784653455018997, 0.4492987096309662, -0.6479173302650452, 0.19509068131446838, -0.25756558775901794, 0.856926679611206, -0.7197035551071167, -0.4775489866733551, 0.2701761722564697, -1.308441400527954, -0.004899808671325445, -0.9389780759811401, -0.21380022168159485,...
def test _ destroy _ alumno _ curso _ admin _ incorrect ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) function _ mock = mock ( return _ value = true ) with patch ( " alumnos. api. views. check _ alumno _ curso _ no _ seguimiento ", function _ mock, ) : response = self. client. delete ( f "...
[ 0.10834665596485138, -0.34194308519363403, 0.3684667944908142, 0.09858126938343048, 0.8419734239578247, 0.5856502652168274, -0.07333258539438248, 0.8601049780845642, 0.4513343274593353, 0.31398794054985046, -0.5377305746078491, 0.7833293080329895, -0.10006240755319595, 0.6286312341690063, ...
def hand _ angles ( hands ) : x, y, z = sorted ( hands ) return ( y - x, z - y, x - z + 360 )
[ -0.3191460371017456, -0.7931041717529297, 0.40476322174072266, 0.37634193897247314, 0.14516028761863708, 1.0712649822235107, 0.07562036067247391, -0.06353360414505005, 0.0014056458603590727, 0.33522313833236694, -0.9088979363441467, -0.766119658946991, -0.26179468631744385, -0.604635715484...
def readin _ config _ file ( config _ file : str ) - > munch : with open ( config _ file,'r') as stream : config = munch. fromyaml ( stream ) stream. close ( ) if'daemon'not in config : config ['daemon'] = { } if'hostname'not in config. daemon : config. daemon ['hostname'] = get _ host _ name ( ) return config
[ 0.37099161744117737, -0.561214029788971, 0.5178431868553162, 0.3163209855556488, -0.10797412693500519, -0.10167356580495834, -0.15492013096809387, 0.9563311338424683, -0.689128577709198, 0.5657808780670166, -0.27789434790611267, 0.29020050168037415, 0.291369765996933, 0.6030285358428955, ...
def test _ qtmultimedia ( ) : from qtpy import qtmultimedia assert qtmultimedia. qaudio is not none assert qtmultimedia. qaudioinput is not none if not ( pyside6 or pyqt6 ) : assert qtmultimedia. qabstractvideobuffer is not none assert qtmultimedia. qaudiodeviceinfo is not none assert qtmultimedia. qsound is not none
[ 0.2863611578941345, -0.5812371969223022, 0.4911254942417145, 0.07445238530635834, 0.49213454127311707, 0.5472576022148132, -0.4067733585834503, -1.3883025646209717, 1.3749369382858276, -0.2646767497062683, -1.0970622301101685, -0.48769235610961914, -0.06645151227712631, 1.3254283666610718,...
def _ _ init _ _ ( self, text ='', location = none, x = 0, y = 0, z = 0, width = none, height = none, anchor _ x ='left ', anchor _ y ='baseline ', multiline = false, dpi = none, batch = none, group = none, rotation = 0 ) : self. _ text = text self. _ location = location doc = decode _ html ( text, location ) super ( )...
[ 0.5664025545120239, 0.1966601014137268, 0.5512683391571045, 0.1848600059747696, -0.9618915915489197, -0.16270528733730316, 0.2617569863796234, 0.9977825880050659, 0.5783331990242004, -0.5982550382614136, -0.7708691358566284, -0.006498956121504307, 0.2719336748123169, -0.6941148042678833, ...
def get _ metadata ( basedir ) : for root, dirs, files in os. walk ( basedir ) : if'metadata. opf'in files : path ='/ '. join ( root. split ('/') [ - 2 : ] ) mobi = get _ mobi _ file ( files ) cover ='' if'cover. jpg'in files : cover ='cover. jpg'yield ('% s / metadata. opf'% root, path, cover, mobi )
[ -0.19459566473960876, -0.12084902822971344, 0.5442522168159485, 1.0856389999389648, 0.355241984128952, -0.15012185275554657, 0.3433661460876465, -0.48108163475990295, -0.48198243975639343, 0.8142592310905457, 0.3870932161808014, -0.4263778626918793, 0.28898826241493225, 0.7295078635215759,...
def _ _ setitem _ _ ( self, * args, * * kwargs ) : # real signature unknown pass
[ -1.1262472867965698, -0.5155789256095886, 0.3753018081188202, 0.6331406831741333, 0.3483344316482544, -0.10976174473762512, 0.4511200487613678, -0.3824484050273895, -0.23397719860076904, -0.24742747843265533, -1.2612791061401367, -0.021805323660373688, 0.20835968852043152, 0.27872985601425...
def searchcallout ( self, method ) : calloutidlist = [ ] if method not in self. invokedir2. keys ( ) : return [ ] else : calloutidlist = self. invokedir2 [ method ] return calloutidlist
[ -0.4377019703388214, -0.39372360706329346, 0.41514837741851807, 0.45304539799690247, -0.28115975856781006, -0.6651859879493713, -0.2263953685760498, -0.22661170363426208, 0.9105674028396606, 0.11250057816505432, 0.1339815855026245, 0.6295226812362671, -0.7224537134170532, 1.333211421966552...
def _ match _ nodes ( self, validators, obj ) : results = [ ] for node in object _ iter ( obj ) : if all ( [ validate ( node ) for validate in validators ] ) : results. append ( node ) return results
[ -0.693678617477417, -0.38130831718444824, 0.4452175498008728, 1.0210609436035156, 0.19047868251800537, -0.20744267106056213, -0.3816305994987488, 0.31053251028060913, -0.19561582803726196, 0.3096731901168823, 0.23556870222091675, -0.36559462547302246, -0.4083552062511444, 0.130376920104026...
def timeradd ( self, delay, func ) : raise notimplementederror
[ -0.004909035749733448, 0.3489537537097931, 0.7163405418395996, 0.5494629740715027, 0.29075345396995544, 0.5651200413703918, 0.010071096010506153, 0.27215638756752014, -0.573822557926178, -0.4119577407836914, -0.2324860394001007, 0.3655410408973694, 0.5195014476776123, 0.5739771127700806, ...
def test _ addroute ( self ) : router = component. router ( ) routed = [ ] router. route = lambda element : routed. append ( element ) pipe = xmlpipe ( ) router. addroute ('example. org ', pipe. sink ) self. assertequals ( 1, len ( router. routes ) ) self. assertequals ( pipe. sink, router. routes ['example. org'] ) el...
[ 0.008872190490365028, 0.46066489815711975, 0.49337464570999146, -0.17510360479354858, 0.8216464519500732, 0.06343239545822144, -0.5621789693832397, 0.5475667119026184, 0.3266359865665436, -0.8916248679161072, -0.6222673058509827, -0.17962270975112915, -0.08494538813829422, 0.59203761816024...
def trimesh _ lscm ( m ) : raise notimplementederror
[ 0.7544998526573181, -0.12333537638187408, 0.5523473024368286, -0.73752361536026, 0.19578532874584198, -0.08758867532014847, -0.6295110583305359, -0.31126734614372253, 0.7563406229019165, 0.0006638263585045934, -0.9283168315887451, -0.5943244695663452, 0.9350200295448303, 0.0095208194106817...
def load _ data ( database _ uri : str, input _ data : dict ) - > pandas. dataframe : # todo : parse the omop json and convert to sql return pandas. read _ sql ( database _ uri, input _ data ['query'] )
[ -1.1068412065505981, 0.9187769889831543, 0.28257590532302856, -0.1513919234275818, -0.8678357601165771, -0.5196646451950073, -1.3396737575531006, 0.3865373432636261, 0.013308752328157425, 0.20392544567584991, 1.169517159461975, -0.19861862063407898, -0.582658052444458, -1.4766545295715332,...
def logical _ link _ from _ internal ( ll ) : ll _ external = { } if " id " in ll : ll _ external [ " llid " ] = ll [ " id " ] else : # generate random link id if it's not there ll _ external [ " llid " ] = str ( uuid. uuid4 ( ) ) ll _ external [ " capacity " ] = { } ll _ external [ " capacity " ] [ " total " ] = ll [ ...
[ -0.5637699365615845, -0.4678794741630554, 0.5774702429771423, -1.5602117776870728, -1.1570830345153809, 0.19112634658813477, -0.7874245643615723, 0.6005712747573853, 0.6250459551811218, -0.01175647508352995, -0.5709667205810547, -0.03856218606233597, 0.15170443058013916, 0.4888866543769836...
async def worker _ internal _ async ( process _ worker _ type, pool, * * kwargs ) : async with process _ worker _ type ( pool ) as process _ worker : try : process _ worker. set _ data ( kwargs ) except exception : logger = _ get _ logger ( ) logger. exception ( " failed to set data ", exc _ info = true ) await process...
[ -1.1051826477050781, 0.12973906099796295, 0.6174218058586121, -0.35309213399887085, 0.1008058711886406, -0.011153964325785637, -0.4762462377548218, -0.7387001514434814, -0.3385109603404999, 0.6306305527687073, -0.17057515680789948, 0.8887598514556885, -0.20074287056922913, 0.38915106654167...
def capture _ point _ cb ( self, msg, leg _ name ) : self. _ latest _ capture _ point _ msg _ time [ leg _ name ] = msg. header. stamp self. _ capture _ point _ pose [ leg _ name ] = msg. pose
[ -0.0019564549438655376, -1.295690894126892, 0.382267564535141, -0.3306836485862732, -0.015541831962764263, 0.2541181147098541, -0.5217408537864685, -0.07374157011508942, 0.1812898963689804, 0.7126429080963135, -0.8198314905166626, 0.23460108041763306, 0.3689577877521515, -0.014101713895797...
def test _ replace _ features ( self ) : pass
[ 0.3909100592136383, 0.4377060830593109, 0.05720609799027443, 0.7426820397377014, 0.7973456978797913, -0.9144123196601868, 1.5347716808319092, 1.076377034187317, 0.44489172101020813, -1.2962666749954224, -1.8087680339813232, 0.6119921803474426, -1.1060022115707397, -0.4249818027019501, -0...
def eop _ extract ( eop ) : # todo : fix the parsing of derived profiles def om20 ( name ) : return " { http : / / www. opengis. net / om / 2. 0 } % s " % name def eop20 ( name ) : return " { http : / / www. opengis. net / eop / 2. 0 } % s " % name def opt20 ( name ) : return " { http : / / www. opengis. net / opt / 2....
[ -0.1966526359319687, -0.4270310401916504, 0.8627514243125916, -0.8142285943031311, -0.6551469564437866, -0.33452266454696655, 0.09579219669103622, -0.04294748976826668, 0.0359521321952343, 1.1304525136947632, -0.3556479811668396, -1.003346562385559, 0.5532667636871338, 0.6127781271934509, ...
def _ _ init _ _ ( self, end ) : self. start = 0 self. end = end self. thisisamodule ( )
[ -0.6257846355438232, -0.9050824642181396, 0.6274833679199219, 1.084246039390564, 0.42832157015800476, 0.9647207260131836, 0.03666476160287857, 0.4970230162143707, 0.5801919102668762, 0.12043727189302444, -0.8297861814498901, 0.4324817657470703, -0.2009493112564087, 0.7695162296295166, 0....
def test _ check _ required ( ) : test _ obj = uvtest ( ) assert test _ obj. check ( check _ extra = false )
[ -0.15066134929656982, 0.961075484752655, 0.23108993470668793, 1.1954052448272705, 0.17572522163391113, 1.3718974590301514, 0.17844831943511963, 0.8551926016807556, -0.16555480659008026, -0.3159054219722748, -0.15611329674720764, -0.31830406188964844, -0.528583288192749, 0.5226433873176575,...
def test _ gf _ write _ feature _ header _ with _ tags _ without _ description _ without _ background ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. keyword = " feature " feature. short _ description = " my feature " feature. description = [ ] first _ tag = mocke...
[ 0.5344246029853821, -0.48285210132598877, 0.4947098195552826, 0.19390331208705902, 0.7541651129722595, 0.18966884911060333, -0.4183095693588257, -0.3124423921108246, -0.9676360487937927, -0.6764806509017944, -0.5829511880874634, 0.09376512467861176, -0.39979323744773865, 0.5376484394073486...
def _ _ handleinput ( self, source, event ) : if ( event. type = = gtk. gdk. focus _ change ) : # user clicked outside textfield self. _ _ switchfrominput ( source, true ) elif ( event. type = = gtk. gdk. key _ press ) : # user wrote something, esc perhaps? if event. keyval = = gtk. keysyms. escape : self. _ _ switchfr...
[ -0.3627496361732483, 0.3466360867023468, 0.6755658984184265, -0.1265614926815033, -0.8452712893486023, 0.5497246980667114, -0.0689358040690422, 0.17975609004497528, 0.060697346925735474, 0.038903407752513885, -0.12638792395591736, -0.39154869318008423, -0.25128012895584106, 0.4011668264865...
def _ display _ user ( self, id, first _ name ) - > str : return ( f'< a href = " tg : / / user? id = { id } " >'f'{ self. _ escape _ html ( first _ name ) }'' < / a >')
[ 0.2436104416847229, -0.05292141065001488, 0.3807138502597809, -0.36324721574783325, -0.8270965218544006, 0.22526845335960388, -0.33483096957206726, -0.5199645757675171, 0.14715023338794708, -0.4540010094642639, 0.35058125853538513, 0.5051613450050354, 0.6324400901794434, 0.0946362316608429...
def demands ( self ) : return self. _ demands
[ -0.26121005415916443, -0.5791862607002258, 0.2963952124118805, 0.6795958280563354, 0.344026118516922, 0.6334645748138428, -0.5401715636253357, -1.655785322189331, 0.18216662108898163, -0.8201099038124084, -0.8022205829620361, -0.32962408661842346, 0.27390554547309875, 0.13776813447475433, ...
def check1 ( ) : if'hypernode'not in list _ screens ( ) : say ( " restarting stopped hypernode... " ) getoutput ('screen - d - s hypernode - m bash - c " cd.. / main ; { } hn _ instance. py - v " - x quit '. format ( python _ executable ) ) say ( " started " )
[ 0.0035513783805072308, 0.20809030532836914, 0.579649031162262, 0.6210660934448242, 0.9788923859596252, 0.7663878798484802, -0.035576965659856796, 0.24594326317310333, 0.09696445614099503, 0.13634277880191803, 0.07356473803520203, 0.9834537506103516, -0.6503955125808716, 0.582499086856842, ...
def default _ run _ epoch ( data _ iter, model, loss _ compute, ctx ) : start = time. time ( ) total _ tokens = 0 total _ loss = 0 tokens = 0 for i, batch in enumerate ( data _ iter ) : out = model ( batch. src, batch. trg, batch. src _ mask, batch. trg _ mask ) loss = loss _ compute ( out, batch. trg _ y, batch. ntoke...
[ -0.4402160942554474, -0.07033461332321167, 0.5443854331970215, -0.22073602676391602, -0.29430344700813293, -0.15622767806053162, -0.38729777932167053, 0.24174241721630096, -1.0965816974639893, 0.3484092950820923, -0.4475107491016388, -0.0016563686076551676, 0.1882103830575943, 0.7289100885...
def is _ on ( self ) - > bool | none : return self. _ state
[ -0.009800014086067677, -0.35152381658554077, 0.42029544711112976, 0.5207670331001282, 0.1704617291688919, -0.4834761321544647, -0.8170771598815918, 0.27823036909103394, 0.890427827835083, -0.5106930136680603, -0.4381789565086365, 0.2690468430519104, -0.6244164705276489, -0.6047155261039734...
def laplacian ( w, normalized = true ) : # degree matrix. d = w. sum ( axis = 0 ) # laplacian matrix. if not normalized : d = scipy. sparse. diags ( d. a. squeeze ( ), 0 ) l = d - w else : d + = np. spacing ( np. array ( 0, w. dtype ) ) d = 1 / np. sqrt ( d ) d = scipy. sparse. diags ( d. a. squeeze ( ), 0 ) i = scipy....
[ 0.4724867045879364, -0.016820162534713745, 0.5900437235832214, -0.6496497988700867, -1.1064263582229614, 0.6965782642364502, 0.8567801713943481, 0.08103935420513153, 1.237186312675476, -0.3948483467102051, 1.0975465774536133, -0.11142733693122864, -0.23156599700450897, -0.03875851258635521...
def obscurefriendslistbutton ( self, increment ) : self. friendslistbuttonobscured + = increment self. refreshonscreenbuttons ( )
[ -1.1031501293182373, -0.15786010026931763, 0.3517898917198181, -0.21189665794372559, -0.16597050428390503, 0.976508378982544, 0.4398495852947235, -0.7808877229690552, 0.2610119879245758, -0.4167712926864624, -0.9940568804740906, 0.28951793909072876, 0.2734636962413788, 0.06752852350473404,...
def get _ words ( self, emotions : list [ emotions ], filtering _ method : emotionfilters = emotionfilters. including, interface : audio. interface. audiointerface = none ) - > list [ word ] : if not ( isinstance ( emotions, list ) or isinstance ( emotions, set ) ) : try : emotions = list ( emotions ) except typeerror ...
[ -0.09276736527681351, 0.5359238386154175, 0.7504810094833374, 0.33042430877685547, 0.15139411389827728, -0.4881095588207245, 0.18746903538703918, 0.3684399425983429, 0.17980432510375977, 0.39564526081085205, 0.5190886855125427, 0.04989951476454735, -0.7809695601463318, 0.8346745371818542, ...
def test ( self, item, * identifiers ) : return self. storage ( ). get ( item. key _ for ( * identifiers ) ) < item. amount
[ -0.022655142471194267, -0.03685807064175606, 0.17516271770000458, 0.22764408588409424, 0.48092517256736755, 0.24954956769943237, -0.7468985319137573, -0.6346666812896729, -0.6450591683387756, -0.3146381378173828, -0.533070981502533, -0.9296054840087891, -0.7915160059928894, -1.043114662170...
def morning ( self ) : self. setlives ( grass, self. grassgrownum ) for lifeclass in [ zebra, lion ] : for animal in self. species [ lifeclass ] : # update status animal. updatestatus ( ) # record which animal live the longest if not self. livinglongest [ lifeclass ] or \ animal. livingdays > self. livinglongest [ life...
[ -0.08978056907653809, -1.4912636280059814, 0.44748276472091675, 0.33113542199134827, 0.5817192792892456, 1.0584452152252197, -1.0719674825668335, 0.03469274193048477, -0.23813115060329437, -0.3869735598564148, -0.35267215967178345, 0.28261762857437134, 0.5052438974380493, 1.604815840721130...
def substitute ( self, predicate _ list, theta ) : for predicate in predicate _ list : for i in range ( len ( predicate. args ) ) : if predicate. args [ i ] in theta : predicate. args [ i ] = theta [ predicate. args [ i ] ]
[ -0.11141666024923325, -0.2698396146297455, 0.5358360409736633, -0.09653916209936142, 0.07442188262939453, 0.28726670145988464, -0.3464549779891968, 1.8442243337631226, -1.154001235961914, 1.0871375799179077, -0.5235040187835693, 0.6086328625679016, -0.9662566184997559, 0.8166382312774658, ...
def _ get _ site _ names ( self, included, excluded ) : lists = self. _ parse _ include _ lists ( included, excluded ) if lists is not none : site _ names = self. _ store. get _ site _ names ( include = lists [ 0 ], exclude = lists [ 1 ] ) log. debug ('site names % s ', site _ names ) else : site _ names = none return ...
[ 0.21204422414302826, 0.525971531867981, 0.41932737827301025, -0.008339612744748592, -1.156680941581726, 0.13318106532096863, -0.31441017985343933, 0.5971284508705139, 0.8923583626747131, 0.692182183265686, -0.501244306564331, 0.5558256506919861, -0.42043307423591614, -0.2742117941379547, ...
def test _ exercise2 _ get ( self ) : # try a correct get path self. getpage ( " / converter / 10 / c / k " ) self. assertstatus ( " 200 ok " ) self. assertbody ( " " " { " value " : 10. 0, " originalunit " : " c ", " convertedvalue " : 283. 15, " targetunit " : " k " } " " " ) # try incorrect get path self. getpage ( ...
[ -0.29451003670692444, -0.28064000606536865, 1.0534166097640991, 0.48124581575393677, 1.0396595001220703, 0.5730252861976624, 0.04337653890252113, 0.1656840294599533, -0.3324408233165741, -0.5907265543937683, 0.6930781006813049, 0.09187750518321991, 0.20486783981323242, -0.05859247222542763...
def createjointtojoint ( self, center ='', fromcenter = false, step = 1 ) : joints = cmds. ls ( sl = 1, type ='joint') jnt = [ ] n = 0 for item in joints : cmds. select ( cl = 1 ) jnt. append ( cmds. joint ( n ='joint _ joint') ) pos = cmds. xform ( item, q = 1, ws = 0, t = 1 ) cmds. xform ( jnt [ n ], ws = 0, t = pos ...
[ -0.14299800992012024, -0.4010379910469055, 0.8029021620750427, 0.5117920637130737, -0.12284151464700699, 0.043670907616615295, 0.30142343044281006, 0.4312521517276764, -0.6835505366325378, 0.04738413542509079, -0.3038865327835083, -0.7182228565216064, -0.6481142640113831, 0.470076739788055...
def serializepartialtostring ( self, * args, * * kwargs ) : # real signature unknown pass
[ -0.21078799664974213, -1.0997010469436646, 0.5525761246681213, 0.1440577208995819, -0.18490070104599, 0.2377071976661682, 0.39525800943374634, -1.3599880933761597, 0.422089546918869, -0.6807252168655396, -0.6980786323547363, 0.4186820983886719, -1.3296887874603271, -0.2116558700799942, 0...
def set _ is _ showing ( self, is _ showing : bool ) - > none : self. _ _ is _ showing = is _ showing
[ 0.055770013481378555, 0.2931191325187683, 0.342416912317276, 0.8464716076850891, 0.09283998608589172, 0.8322325348854065, -0.13643580675125122, 1.0129826068878174, 0.06397479772567749, 0.7293492555618286, -0.5206562280654907, 0.6157931089401245, 0.10684563964605331, 0.20479248464107513, ...
def expand _ path ( self, * path, * * kwargs ) : self. browser. plugin. ensure _ page _ safe ( ) self. logger. info ( " expanding path % s on tree % s ", self. pretty _ path ( path ), self. tree _ id ) node = self. root _ item if node is not none : step = path [ 0 ] steps _ tried = [ step ] image, step = self. _ proces...
[ -0.27098703384399414, -0.0022207670845091343, 0.8009687066078186, 1.2154927253723145, -0.3990379273891449, -0.3575659692287445, 0.006537715904414654, 0.17211896181106567, -0.18195708096027374, -0.23555058240890503, 0.4724867343902588, 0.05894464626908302, -0.4269254505634308, 0.78265303373...
def _ mgui _ bind _ row _ headers _ change _ callback ( self, callback ) - > none : raise notimplementederror ( )
[ -0.8684542179107666, -0.4757986068725586, 0.4629678726196289, 0.48876380920410156, -0.7365567088127136, -0.061835289001464844, 0.33357667922973633, -0.6896626949310303, 0.6698124408721924, 0.6732297539710999, -0.26491579413414, 0.1256958395242691, 0.10494185984134674, 1.0073068141937256, ...
def get _ outliers ( data, indicator ) : sub _ df = data. loc [ data [ " indicator code " ] = = indicator ] sub _ df = sub _ df. sort _ values ( by ='year') significant = { } if len ( sub _ df ['value']. values ) > 0 : diff _ sum = 0 stored = sub _ df ['value']. values [ 0 ] year _ before = sub _ df ['year']. values [ ...
[ -0.36619701981544495, 0.2203909158706665, 0.8306281566619873, -0.8045108318328857, -0.8494923114776611, 0.30276158452033997, 0.4642605185508728, -0.04951063171029091, -0.24044565856456757, 0.6059808731079102, -0.5626959800720215, 0.7926221489906311, 0.866729736328125, 0.12244314700365067, ...
def _ capitalist ( self ) : # generate entities for item in self. poller ( ) : # generate id task _ id = self. task _ id ( item ) # efficiency, don't repeat tasks if not self. _ controller. exists ( task _ id ) : # assign task to anonyous prole. self. _ tasks. put ( ( task _ id, item ), block = true, timeout = self. ti...
[ -1.0976520776748657, 0.45032328367233276, 0.47549930214881897, 0.2859693169593811, 1.0888310670852661, 0.35845398902893066, 0.5872971415519714, 0.510136067867279, -1.0126351118087769, 0.6690261960029602, -0.960534930229187, -0.9037153124809265, 0.07126957923173904, 0.6952208280563354, -0...
def reverse _ ll _ in _ place ( self ) : current = self. head prev = none while current : temp = current. next current. next = prev prev = current current = temp node. head = prev
[ 0.06941467523574829, -0.21124935150146484, 0.6661298274993896, -1.0225845575332642, 0.2481214851140976, -0.2541736662387848, 0.7218465209007263, 1.5037109851837158, -0.39416828751564026, 0.12054931372404099, -0.532581090927124, 0.6490345001220703, -1.476549506187439, 0.2854747474193573, ...
def remodel _ dataset ( rows : list [ list ] ) - > tuple [ np. ndarray, np. ndarray ] : x = [ line [ : - 1 ] for line in rows ] y = [ line [ - 1 ] for line in rows ] return np. array ( x ), np. array ( y )
[ -1.1296693086624146, -0.421497642993927, 0.42255687713623047, -0.8201136589050293, 0.3358384072780609, -0.5960701704025269, -0.5282883644104004, 0.5877314805984497, 0.2855519950389862, 0.5507870316505432, 0.3304137587547302, 0.7018411755561829, 0.2256278544664383, 0.16585148870944977, 0....
def subscriptions ( self ) - > pulumi. output [ sequence [ str ] ] : return pulumi. get ( self, " subscriptions " )
[ 0.47163304686546326, -0.013802191242575645, 0.46434685587882996, 0.9460439682006836, 0.8882235884666443, 0.32026001811027527, -0.07827123999595642, -0.5739219784736633, 0.6501830816268921, 0.06606855243444443, -0.9411648511886597, 0.3461003303527832, 0.41850966215133667, -0.645920097827911...
def acl6totpktsnat ( self ) : try : return self. _ acl6totpktsnat except exception as e : raise e
[ 0.38045281171798706, -0.3523634970188141, 0.159159854054451, -0.6424545049667358, -0.33757439255714417, -0.3005032539367676, -0.08486421406269073, -1.1001167297363281, -0.11366420984268188, 0.3540094792842865, -0.5419020652770996, -0.5983244776725769, 0.8539262413978577, -1.171541690826416...
def use _ datetime ( self ) : if self. date = ='-': form _ date = self. date else : if self. day [ 0 ] = = str ( 0 ) : self. day = self. day [ 1 ] if self. mounth [ 0 ] = = str ( 0 ) : self. mounth = self. mounth [ 1 ] date = datetime. date ( int ( self. year ), int ( self. mounth ), int ( self. day ) ) form _ date = d...
[ -0.08624903857707977, -0.8971102237701416, 0.9064354300498962, -0.08064549416303635, 0.12013887614011765, -0.16731315851211548, -0.7941775321960449, -0.6805070042610168, -0.3310433328151703, -0.8868114352226257, 0.7922196984291077, -0.14084307849407196, 0.2394072562456131, 1.11754560470581...
def policyeval ( envs, model _ path, log _ dir, algo _ class, algo _ args, num _ timesteps = 251, num _ cpu = 1 ) : tf. reset _ default _ graph ( ) method = algo _ class. load ( model _ path, args = algo _ args ) using _ custom _ vec _ env = isinstance ( envs, wrapframestack ) obs = envs. reset ( ) if using _ custom _ ...
[ -0.5143461227416992, 0.48064714670181274, 0.8624271154403687, -0.26978179812431335, 0.4164898693561554, -0.3684292435646057, 0.09549695998430252, 0.01664803735911846, 0.5296342968940735, 1.561047077178955, 0.38064688444137573, 0.7961840629577637, 0.26959705352783203, 0.3137781023979187, ...
def delete _ object ( request, model, post _ delete _ redirect, object _ id = none, slug = none, slug _ field ='slug ', template _ name = none, template _ loader = loader, extra _ context = none, login _ required = false, context _ processors = none, template _ object _ name ='object') : if extra _ context is none : ex...
[ -0.39733850955963135, -0.1886894553899765, 0.8788314461708069, 0.9208927154541016, -0.5115126967430115, 0.10769093036651611, 0.4679678976535797, 0.048858217895030975, 0.7459083795547485, 0.28289857506752014, 0.12741516530513763, 0.27861514687538147, 0.42406609654426575, 0.04700122401118278...
def test _ startserviceaddroute ( self ) : self. component. startservice ( ) self. assertin ('component ', self. router. routes )
[ 0.8760069012641907, -0.489552766084671, 0.3835866451263428, 0.05501410737633705, 0.6038793921470642, 0.3245672881603241, -0.02237682230770588, 0.08887270092964172, 0.4650202989578247, -1.4069095849990845, 0.04562431201338768, 0.3577825725078583, -0.3424132764339447, 0.4367297291755676, -...
def compile _ globstar ( s ) : patt = expand _ globstar ( s ) return compile _ regex ( patt )
[ 0.06330972909927368, -1.301108479499817, 0.1996874362230301, 0.3996324837207794, -1.1982886791229248, -0.08012667298316956, 0.7576026916503906, 0.2507908344268799, 0.4165782630443573, -0.6748185157775879, 0.3482896089553833, 0.9116352200508118, 0.16520673036575317, -0.2872419059276581, 0...
def trimesh _ harmonic ( m ) : raise notimplementederror
[ 0.7968856692314148, -0.10319899022579193, 0.6051902174949646, 0.1300521194934845, -0.01982026733458042, 0.7335707545280457, -0.09467549622058868, -0.1739671677350998, -0.3115067183971405, 0.08373931795358658, -0.25127938389778137, -0.7864407300949097, 0.2263726145029068, -0.750956058502197...
def cross _ validation ( self, data, labels ) : # stratified k - fold object kf = stratifiedkfold ( n _ splits = 10 ) # initialize the lists that will contain the metrics recalls = [ ] precisions = [ ] accuracies = [ ] aucs = [ ] f1s = [ ] # do the training process and put the results in the metric lists for train _ in...
[ -0.030429532751441002, 0.6833018660545349, 0.7343770861625671, -0.9756338596343994, 0.04288221895694733, 0.28606170415878296, 0.13533958792686462, 0.1606963574886322, -0.7539949417114258, 0.6786607503890991, 0.29019343852996826, 0.41477683186531067, -0.12428195029497147, -0.032591156661510...
def _ does _ quack ( explanation ) : return hasattr ( explanation, explainparams. model _ id )
[ 0.45816266536712646, 0.17053131759166718, 0.2289620339870453, 0.2628673315048218, 0.020711470395326614, -0.3008279800415039, 0.8134523034095764, 0.6145555377006531, 0.6877986192703247, 0.3926134407520294, 0.24683718383312225, -0.8381240963935852, 0.8278251886367798, 0.7105520367622375, -...
def command _ register ( self, context ) : user _ id = context [ " from " ] [ " id " ] if self. database. get _ admin ( user _ id ) : text = context [ " text " ] if len ( text. split ( " " ) ) = = 2 : _, new _ user = text. split ( " " ) try : new _ user = int ( new _ user ) self. database. register _ user ( new _ user ...
[ -0.7610122561454773, 1.1506216526031494, 0.712090015411377, 1.0604596138000488, 0.8236781358718872, -0.1516428291797638, -0.32326874136924744, -0.8032239079475403, 0.1526079922914505, 0.30297771096229553, -0.5638957619667053, 1.1667230129241943, -0.1068546324968338, 0.7604914903640747, 0...
def _ is _ rung _ waiting ( self, rung ) : job _ count = self. _ sh _ bracket [ self. budgets [ rung ] ] + self. sh _ bracket [ self. budgets [ rung ] ] if job _ count < self. n _ configs [ rung ] : return true return false
[ -1.2260655164718628, 0.36636799573898315, 0.5846881866455078, -0.28753137588500977, -0.4937337636947632, 0.05230060964822769, -0.1547113060951233, -0.21712930500507355, -0.42562833428382874, -0.2111363261938095, -0.5408493876457214, 0.3642011880874634, -0.2627039849758148, 1.00264036655426...
def test _ already _ cancelled ( self ) : booking = baker. make _ recipe ('booking. booking ', status ='cancelled') resp = self. client. get ( reverse ('booking : already _ cancelled ', args = [ booking. id ] ) ) self. assertin ( booking. event. name, str ( resp. content ) )
[ 0.33266541361808777, 0.36217960715293884, 0.2743915915489197, 1.031840205192566, -0.19134306907653809, 0.565592885017395, -0.2162063866853714, 1.1618043184280396, -0.1510852575302124, 0.3227655291557312, -0.1269170641899109, -0.4059634208679199, 0.47929638624191284, 0.20688842236995697, ...
def to _ accommodation ( self, accommodation _ properties : tuple [ any,... ] ) - > accommodation : return accommodation ( * * self. to _ dict ( accommodation _ properties ) )
[ -0.8587790131568909, -1.1883115768432617, 0.2900201678276062, 0.20841069519519806, -0.32749634981155396, -0.21357762813568115, -0.49873587489128113, 0.4398040771484375, -0.33434951305389404, 0.8169933557510376, 0.04662727564573288, 0.0578894279897213, 0.229060098528862, -1.5820715427398682...
def get _ running _ config _ section _ attr44 ( device, option ) : output = device. execute ( " show running - config | include { option } ". format ( option = option ) ) m = { } m = re. search ( r " radius - server. * ( attribute ). * ( 44 ). * ( extend - with - addr ) ". format ( option ), output ) return m
[ -0.25140857696533203, -0.2889102101325989, 0.5701479911804199, 0.15649665892124176, -1.1426128149032593, -0.5497881174087524, 0.32336458563804626, 0.16154928505420685, -0.39360490441322327, 0.21171057224273682, -0.41903072595596313, 0.549004852771759, -0.8329894542694092, 0.092887870967388...
def convertgaps ( mali, old _ gap = ". ", new _ gap = " - " ) : for id in mali. keys ( ) : mali [ id ] = string. replace ( mali [ id ], old _ gap, new _ gap, ) return mali
[ -0.4307120740413666, -1.4258959293365479, 0.6017956137657166, -0.8615850210189819, -0.961572527885437, 0.6401448845863342, -0.7226079702377319, 0.7224528789520264, 0.6201455593109131, 0.9099203944206238, 0.18553197383880615, 0.021962568163871765, 0.22355066239833832, 0.4710114598274231, ...
def status ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " status " )
[ 0.802270770072937, -0.7566980123519897, 0.24583964049816132, 0.36909449100494385, 0.1976223886013031, 0.8597861528396606, -0.18770088255405426, 0.6784354448318481, 0.31254133582115173, -0.010830732062458992, 0.006940801162272692, 0.7741532921791077, 0.38697779178619385, -0.9860702753067017...
def test _ subscription _ delete _ api ( self ) : self. test _ subscription _ api _ with _ free _ event ( ) response = self. client. delete ( f " / core / subscription / { str ( self. event _ free. id ) } / ", http _ authorization = " bearer { } ". format ( self. token ), content _ type ='application / json') self. ass...
[ 1.036300778388977, -0.09119141846895218, 0.6651604771614075, 0.4418603181838989, -0.019900530576705933, -0.05335052311420441, -0.28696852922439575, -0.4825083315372467, 0.8764636516571045, 0.009152430109679699, -0.6461659669876099, 0.3416801989078522, -0.2301260232925415, -0.16451348364353...
def dict _ set _ ind _ img ( train _ ds, val _ ds, test _ ds ) : label _ tmp = [ y. numpy ( ) for x, y in train _ ds ] train _ dict = dict ( ( x, label _ tmp. count ( x ) ) for x in set ( label _ tmp ) ) label _ tmp = [ y. numpy ( ) for x, y in val _ ds ] val _ dict = dict ( ( x, label _ tmp. count ( x ) ) for x in set...
[ -0.8994028568267822, 0.2021333873271942, 0.40581977367401123, -1.606318712234497, -0.48127856850624084, 0.13271251320838928, 0.3332623541355133, 0.22594796121120453, -0.8623810410499573, 0.23406954109668732, 0.09051588922739029, 0.052366822957992554, 1.0264805555343628, -0.3207085132598877...
def poly _ integral ( poly, c = 0 ) : if isinstance ( poly, list ) is false or len ( poly ) = = 0 : return none if isinstance ( c, int ) is false and isinstance ( c, float ) is false : return none new = [ c ] if poly = = [ 0 ] : return new size = len ( poly ) for x in range ( size ) : v = poly [ x ] / ( x + 1 ) if ( v ...
[ 0.5217925906181335, 0.13113261759281158, 0.6153651475906372, 0.4206758141517639, -0.17550744116306305, 0.24333497881889343, -0.004901238717138767, -0.4154767096042633, 0.6641135811805725, 0.6251248717308044, -0.9118924140930176, -0.7247806191444397, -1.6386420726776123, -0.4514893889427185...
def getp ( self, mesh, time _ mesh, f ) : if ( mesh, time _ mesh ) in self. _ ps : return self. _ ps [ ( mesh, time _ mesh ) ] ps = self. getspatialp ( mesh, f ) pt = self. gettimep ( time _ mesh, f ) p = sp. kron ( pt, ps ) if self. storeprojections : self. _ ps [ ( mesh, time _ mesh ) ] = p return p
[ 1.0910472869873047, 0.39808571338653564, 0.5493747591972351, 1.2041704654693604, -0.4899154603481293, 0.45038339495658875, -0.8721394538879395, -0.3734504282474518, -0.10390207916498184, 0.007167077157646418, 0.7728074193000793, 0.063111312687397, -0.8965277671813965, 0.5320594906806946, ...
def string _ ( schema ) : types ='string'if'_ notnull'not in schema. data : types = [ types ] + ['null'] return schema ( {'type': types } )
[ -0.1845727562904358, 0.07791034877300262, 0.24330508708953857, -0.7859100103378296, -0.2481740415096283, -0.9806480407714844, -0.6920767426490784, -0.33714568614959717, 0.6569184064865112, 0.6477691531181335, -0.4182024300098419, 1.0118316411972046, 0.09035413712263107, -0.5270386338233948...
def mongodbprep ( collectionname, mongoport, mongodatabase = " research ", shardkey = none ) : mcon = createmongoconnection ( host ='localhost ', port = mongoport ) databasename = str ( mongodatabase ) mdb = mcon [ databasename ] # not sure if this is beigng used # shapedir, shapefilename = os. path. split ( infile ) c...
[ -0.014570769853889942, 0.07496430724859238, 0.6044561862945557, 0.0546916238963604, 0.35679224133491516, 0.23426656424999237, 0.15713989734649658, 0.2017280012369156, 0.4010030925273895, 0.6450203657150269, -0.219726100564003, 0.07429845631122589, -0.7939749956130981, 1.0115045309066772, ...
def activate ( self ) : pass
[ -0.20297925174236298, -1.5106189250946045, -0.01672353968024254, 0.9681199193000793, 0.8944714665412903, 0.3566160500049591, 0.5517227053642273, 0.8421382308006287, -0.3268320858478546, -0.7572706341743469, -1.4096031188964844, 0.9546800255775452, -0.4188361167907715, -0.34743571281433105,...
def suites _ from ( indexed _ docs : parser. indexeddocs, suite _ filter : str = none, case _ filter : str = none ) - > list [ suite ] : return suites _ from _ doc _ list ( indexed _ docs. of _ type ( schema. primary _ type ), suite _ filter, case _ filter )
[ -0.1840416043996811, -0.18140782415866852, 0.2847912907600403, 1.3148428201675415, -0.17008619010448456, 0.24114172160625458, 0.33861973881721497, 0.3594723641872406, 0.9164298176765442, 0.37945449352264404, -0.07441455125808716, 0.4913961887359619, 0.1681629717350006, -0.1512528657913208,...
def get _ balance ( self ) : cmd = { " method " : " getbalance " } r = utils. curl ( cmd ) self. balance = r [ " balance " ] self. unlocked _ balance = r [ " unlocked _ balance " ]
[ -0.4294208586215973, -0.4762313961982727, 0.4679398238658905, 0.7243996262550354, 1.1011359691619873, -0.36965006589889526, -0.7976630330085754, -0.6028268933296204, 0.5853534936904907, -0.04842454195022583, -0.06712960451841354, 0.7490582466125488, -0.5697722434997559, 0.09418313950300217...
def get _ post _ links ( link _ target : generator, node _ target : generator, ) - > generator : while true : post = yield node _ target. send ( post ) if post. parent _ id is not none : link _ target. send ( ( post. id, post. parent _ id, graph. linktype. qaa ) ) link _ target. send ( ( post. parent _ id, post. id, gr...
[ -0.21707694232463837, 0.1561216562986374, 0.4414055347442627, -0.23849231004714966, 0.8702793121337891, -0.4965890049934387, -0.688199520111084, -0.3079155683517456, -0.7218056917190552, -0.9849423766136169, 0.4881451725959778, 1.2574955224990845, 0.36609113216400146, -0.08228182792663574,...
def before _ request ( ) : g. db = models. database g. db. connect ( )
[ -0.21970821917057037, 1.04067063331604, 0.33171388506889343, 0.48814886808395386, 1.1663687229156494, 0.16729004681110382, 0.11390933394432068, -0.46342024207115173, -0.5984557867050171, 0.0624510683119297, -0.15807601809501648, -0.05390771105885506, -0.5266441106796265, 0.6486403942108154...
def sonobat2guano ( fname ) : print ('\ n ', fname ) sb _ md = extract _ sonobat _ metadata ( fname ) if not sb _ md : print ('skipping non - sonobat file :'+ fname, file = sys. stderr ) return false pprint ( sb _ md ) gfile = guanofile ( fname ) gfile ['guano | version'] = 1. 0 if'timestamp'in sb _ md : gfile ['timest...
[ -0.3641117513179779, -0.18545353412628174, 0.787530779838562, 0.022565361112356186, 0.4818287789821625, 0.5718821883201599, -0.49091997742652893, -0.02554861456155777, -0.8976081013679504, 0.10260562598705292, -0.7598831653594971, 0.3845861554145813, 0.11783631891012192, -0.406964212656021...
def av _ psf ( self, g _ gauls, beam, flag ) : from math import sqrt bmaj = n. asarray ( g _ gauls [ 4 ] ) bmin = n. asarray ( g _ gauls [ 5 ] ) bpa = n. asarray ( g _ gauls [ 6 ] ) wt = n. asarray ( g _ gauls [ 1 ] ) / n. asarray ( g _ gauls [ 8 ] ) flagwt = wt * flag sumwt = n. sum ( flagwt ) w1 = n. sum ( flagwt * f...
[ 0.21232913434505463, -0.2800131142139435, 0.9000429511070251, -0.8571544289588928, -0.3626425266265869, -0.0510873943567276, -0.12000954151153564, -0.13545772433280945, -0.8290500044822693, 0.7601948380470276, -0.29058265686035156, 0.727592408657074, -0.7347375750541687, 0.5471490621566772...
def lowertri ( self ) : return self. _ l
[ 1.5120540857315063, -0.4029507339000702, 0.11261928081512451, -1.2164233922958374, 0.488324910402298, 0.6695721745491028, 0.9307659268379211, -0.8419142365455627, 0.5975005030632019, -0.6562159657478333, 0.032312847673892975, -0.21622836589813232, -1.1753729581832886, -0.5652764439582825, ...
def _ enforce _ candidates _ waiting _ room ( self ) - > none : while true : # a new candiate arrives self. candidate _ counter + = 1 self. waiting _ room. enter ( candidate ( self. candidate _ counter ) ) # determine the arrival rate for the next candiate using an exponential distribution. next _ candidate _ arrival _...
[ -0.521247923374176, -0.487000972032547, 0.3895890414714813, 0.5787252187728882, -0.6479482650756836, 1.0329172611236572, -0.17207607626914978, 0.693899929523468, -0.9368569850921631, 0.07177123427391052, 0.31666621565818787, -0.36132296919822693, 0.05608394742012024, 1.0840303897857666, ...
def predict _ move ( self, new _ game _ state ) : self. _ move _ counter + = 1 self. _ game _ state = new _ game _ state snake = self. _ game _ state. get _ player ( ) graph = self. _ calculate _ graph ( snake. get _ pos ( ), snake. get _ direction ( ), snake. get _ speed ( ), self. _ depth ) pos = snake. get _ pos ( )...
[ -0.5621394515037537, -0.3823701739311218, 0.8024511933326721, -0.16532422602176666, -0.3329251706600189, -0.4341363310813904, 0.17406271398067474, -0.43497610092163086, -0.5083186626434326, 0.7445092797279358, -0.4133138358592987, 0.8114784955978394, 0.24064436554908752, -0.349666416645050...
def _ handlewallcollisions ( self, realwallrects ) : collidedwallidxs = self. realrect. collidelistall ( realwallrects ) # only colliding with horizontal or vertical wall if 0 < len ( collidedwallidxs ) < 3 : colliderect = realwallrects [ collidedwallidxs [ 0 ] ] testrect = self. realrect. copy ( ) # assume collision w...
[ -0.009560469537973404, -0.4328405559062958, 0.8287842869758606, 0.2741405963897705, 0.36064743995666504, -0.1983843296766281, 0.9208084940910339, -0.5953973531723022, 0.013751508668065071, 0.21866275370121002, -0.3486346900463104, -1.1133918762207031, -0.4785498380661011, 0.469122558832168...
def host ( ) : rabbit _ env [ " host " ] = get _ host ( ) local ( " { rabbitmqctl } add _ vhost { host } ". format ( * * rabbit _ env ) )
[ 0.7097436785697937, -0.2292640060186386, 0.522662878036499, 0.40188276767730713, 0.38663575053215027, 0.5132867693901062, -0.8762516975402832, 0.861931562423706, -0.44427287578582764, 0.541543185710907, -0.6549932360649109, 1.408126711845398, -0.4914349615573883, -0.21884572505950928, -0...
def fit ( self, x : np. ndarray, y : np. ndarray, sample _ weight : optional [ np. ndarray ] = none ) - > none : if sample _ weight is not none : self. samples = sample _ weight. sum ( ) else : self. samples = y. shape [ 0 ] x = self. _ check _ and _ reshape _ input ( x ) self. _ n _ dimensions = np. unique ( np. hstac...
[ 0.6988499760627747, 0.0805213525891304, 0.5455635190010071, 0.6450647711753845, 0.31855377554893494, -0.627038300037384, -0.07348103076219559, -0.2710016369819641, -0.6367723941802979, 0.30853983759880066, 0.04248984903097153, 1.292422890663147, -0.026634329929947853, 0.6460643410682678, ...
def test2 _ moap ( self ) : for method in [ " mwu ", " rf " ] : df = moap ( self. clusters2, method = method, scoring = " score ", motiffile = self. motifs _ score2, ) self. assertequals ( ( 623, 2 ), df. shape ) for method in [ " hypergeom " ] : df = moap ( self. clusters2, method = method, scoring = " count ", motiff...
[ -0.31949901580810547, -0.5713424682617188, 0.46892985701560974, 0.5255387425422668, 0.22474123537540436, 0.05193142965435982, 0.5920252203941345, -0.4955662786960602, 0.12266120314598083, -0.7343605160713196, 0.18615040183067322, 0.23557649552822113, 0.029836928471922874, -0.01778741553425...
def rate _ limit ( f ) : @ wraps ( f ) def wrapper ( update, context, * args, * * kwargs ) : # get rate limit data try : data = context. chat _ data [ " rate _ limit " ] except keyerror : data = context. chat _ data [ " rate _ limit " ] = { } # if we have not seen two non - command messages since last of type ` f ` if ...
[ 0.12110484391450882, -0.015522605739533901, 0.8511394262313843, -0.6113110780715942, 0.5124531984329224, 0.1817178726196289, -0.12697558104991913, -0.4686764180660248, 0.4196292459964752, 0.6429479122161865, 1.006642460823059, 0.45395445823669434, -0.08449816703796387, 0.6363717317581177, ...
def get _ status _ lines ( output _ lines ) : return [ l for l in output _ lines if is _ status _ line ( l ) ]
[ 0.1419573724269867, -1.1386204957962036, 0.11436131596565247, 2.0051817893981934, -0.4030870497226715, 0.5695853233337402, -1.2177857160568237, 0.6422979235649109, 0.16259799897670746, 0.36895278096199036, -0.013131942600011826, 0.3423101603984833, 0.14370344579219818, 0.6237025260925293, ...
def _ _ init _ _ ( self, master ) : self. master = master
[ 0.22287113964557648, -0.446678102016449, 0.37571096420288086, 0.31250086426734924, -1.0284011363983154, 0.275269091129303, -0.2864610552787781, 0.8627929091453552, 0.7477375864982605, -0.6182763576507568, -0.9793094992637634, 0.5731146335601807, 0.08669943362474442, 1.0989556312561035, 1...
def extract _ team _ city ( soup, mascot ) : # the city is in the text area t = soup. title. text # the city is before the mascot index = t. find ( mascot ) # take up to the mascot, without the space city = t [ 0 : index ]. strip ( ) return city
[ 0.06874498724937439, -0.015602769330143929, 0.6104239225387573, -1.1079212427139282, -1.1629470586776733, -0.1561438888311386, 0.07526718825101852, 0.0037153074517846107, -0.1566189080476761, 0.26699429750442505, -0.3991471529006958, -0.23343652486801147, -0.5137143135070801, -0.7925426363...
def testupdatevaluesforquerieswithimplicitnamespaces ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) # fixme replace this with securetagvalueapi once the index is # integrated objectid = uuid4 ( ) values = { objectid : { u'username / bar': 42 } } tagvalues = securetagvalueapi ( se...
[ -0.19611118733882904, 0.36757227778434753, 0.3236706554889679, -0.32462093234062195, -0.10841421037912369, 0.7066068053245544, -0.29397135972976685, -0.5191433429718018, 0.29430335760116577, -0.5323452949523926, -0.6305490732192993, -0.19986599683761597, -0.0026098357047885656, 0.702214002...
def make _ karyotype ( gffhash, outfile ) : out = open ( outfile,'w') for i, genome in enumerate ( gffhash ) : outlist = ['chr ','- ', genome, str ( i + 1 ), str ( gffhash [ genome ] ['genome _ start'] ), str ( gffhash [ genome ] ['genome _ end'] ),'chr'+ str ( i + 1 ) ] out. write (''. join ( outlist ) ) out. write ('...
[ 0.8850650191307068, 0.12501822412014008, 0.6546800136566162, 0.16561028361320496, -0.05248463153839111, 0.6364784240722656, -0.32268649339675903, 0.10613951832056046, -0.9168321490287781, 0.3868538737297058, -0.8121207356452942, 0.016223538666963577, 0.5305700898170471, 0.14062358438968658...
def test _ unknown _ names _ raise _ exception ( self ) : tm = testmodel. create ( count = 8, text ='123456789') with self. assertraises ( typeerror ) : tm. update ( jon ='beard')
[ -0.3288347125053406, 0.15270166099071503, 0.43225911259651184, -0.37511831521987915, -0.22589339315891266, 1.2322359085083008, -0.46775326132774353, -0.4102833569049835, -0.6383959054946899, 0.5771931409835815, -1.3786060810089111, -0.659548282623291, -0.7071772813796997, 0.311543375253677...
def findmatchesbetweenimages ( image _ 1, image _ 2 ) : # matches - type : list of cv2. dmath matches = none # image _ 1 _ kp - type : list of cv2. keypoint items. image _ 1 _ kp = none # image _ 1 _ desc - type : numpy. ndarray of numpy. uint8 values. image _ 1 _ desc = none # image _ 2 _ kp - type : list of cv2. keyp...
[ 0.5125818848609924, -0.417239785194397, 0.9327936768531799, 0.5080782771110535, 0.6536802649497986, -0.3891459107398987, -0.7281709909439087, 0.19294461607933044, -0.11264600604772568, 0.6502083539962769, -0.38539376854896545, 0.3839455842971802, -0.033510901033878326, 0.9806675314903259, ...
def get _ screenboard ( self, board _ id ) : return self. http _ request ('get ','/ screen /'+ str ( board _ id ) )
[ -0.9235157370567322, 0.9746724367141724, 0.28119775652885437, 1.1133828163146973, 0.09383560717105865, -0.3104725778102875, -1.1114377975463867, -0.9856432676315308, 0.2845383286476135, -0.3043583333492279, -0.10447591543197632, 0.9778175354003906, -1.155470609664917, 1.1464412212371826, ...
def strong _ seed ( seed ) : seed = gym. utils. seeding. hash _ seed ( seed ) _, seed = divmod ( seed, 2 * * 32 ) return seed
[ 0.8339320421218872, 0.6324708461761475, 0.28360551595687866, 0.4496401846408844, -0.7112241387367249, -0.031613677740097046, -0.44339871406555176, -0.12397870421409607, -0.22366155683994293, -1.272843599319458, -0.5518251657485962, 0.6675545573234558, 0.6921699047088623, -0.353591144084930...
async def get ( self, request _ configuration : optional [ calendarpermissionsrequestbuildergetrequestconfiguration ] = none ) - > optional [ calendarpermissioncollectionresponse ] : request _ info = self. to _ get _ request _ information ( request _ configuration ) from...... models. o _ data _ errors. o _ data _ erro...
[ -0.8449763059616089, 0.4865384101867676, 0.648348331451416, 0.2999782860279083, -0.335312157869339, -0.43187016248703003, 0.08757290989160538, -0.2712792456150055, 0.14388464391231537, -0.048735201358795166, 0.4176598787307739, 0.13497743010520935, -0.2953124940395355, -0.5313177108764648,...
def _ build _ captioning _ net ( image _ rep, reuse = true, keep _ ph = none ) : with tf. variable _ scope ('captioning ', reuse = reuse ) : if keep _ ph is not none : cell = lambda : tf. contrib. rnn. dropoutwrapper ( tf. contrib. rnn. basiclstmcell ( config ['hidden _ size'] ), output _ keep _ prob = keep _ ph ) else...
[ -0.24662251770496368, 0.3850867450237274, 0.7611051797866821, 0.26574525237083435, -0.6755712032318115, -0.7170973420143127, 0.523199200630188, 0.1534963846206665, 0.029425404965877533, 0.899224579334259, -0.45094358921051025, 0.14837588369846344, 0.6289300322532654, 0.15256989002227783, ...
def job _ ids ( self, value ) : self. _ _ job _ ids = value
[ -0.37309154868125916, -0.08841198682785034, 0.18059013783931732, -0.5751547813415527, 0.1333685666322708, 0.715457558631897, -0.15305590629577637, 0.09361524134874344, -0.7186760306358337, -0.03983869403600693, -0.9636011719703674, 0.2889768183231354, -0.1232062429189682, 0.054898828268051...