text
stringlengths
25
2.19k
embedding
listlengths
768
768
def resource _ path ( ) : try : # pyinstaller creates a temp folder and stores path in _ meipass base _ path = sys. _ meipass except exception : base _ path = os. path. abspath ( ". " ) return base _ path
[ 0.026306012645363808, -1.4783943891525269, 0.5339727997779846, 1.2128559350967407, -0.14980480074882507, 0.4188753664493561, 1.091727375984192, -0.6102048754692078, 0.42745348811149597, -0.1924697607755661, 0.7299506068229675, -1.6670361757278442, -1.0490187406539917, 0.35617566108703613, ...
def test _ get _ features ( self ) : pass
[ 0.5806813836097717, 0.6156921982765198, 0.07834067940711975, 1.5973484516143799, 1.512482762336731, -0.5672473311424255, 1.2373313903808594, -0.1855103075504303, 0.07861487567424774, -1.494788408279419, -1.1082051992416382, 0.42045119404792786, -1.0788898468017578, -0.26431992650032043, ...
def test _ runswithstandardresult ( self ) : result = pyunit. testresult ( ) self. holder. run ( result ) self. assertfalse ( result. wassuccessful ( ) ) self. assertequal ( 1, result. testsrun )
[ -0.6474562287330627, 0.6112615466117859, 0.46999967098236084, 1.2225266695022583, -0.07143887877464294, 1.1989511251449585, 0.26417088508605957, 0.026225831359624863, 0.18720480799674988, -1.712024211883545, -0.7890139222145081, -0.5412074327468872, -0.7757155895233154, 0.07137905806303024...
def rot _ line ( self, line1 ) : x1 = line1 [ 0 ] [ 0 ] y1 = line1 [ 0 ] [ 1 ] x2 = line1 [ 1 ] [ 0 ] y2 = line1 [ 1 ] [ 1 ] # find the midpoint of the line mx = ( x1 + x2 ) / 2 my = ( y1 + y2 ) / 2 # move the line to originate at the midpoint x1 - = mx y1 - = my x2 - = mx y2 - = my # rotate both points xtemp = x1 ytem...
[ -0.041502345353364944, -0.6654530763626099, 0.8153120875358582, 0.05002632737159729, 0.5688694715499878, -0.22279663383960724, -0.20798853039741516, -0.061616793274879456, 0.33292004466056824, 0.13547906279563904, 0.022677086293697357, 0.04630526900291443, -0.8658595681190491, -0.762264609...
def testinitialize ( self ) : # now set the default directories for those not set outputdirectory = os. path. join ( self. mop1. settings. filestore, '.. ', '..') self. mop1. setdefaultoutputdirectory ( outputdirectory ) self. mop2. setdefaultoutputdirectory ( outputdirectory ) self. mop3. setdefaultoutputdirectory ( o...
[ -0.08780509978532791, 0.013931703753769398, 0.5718082189559937, 0.9102847576141357, 0.4310499131679535, -0.06861504912376404, 0.6810067296028137, -0.2772391438484192, -0.07098127156496048, -0.7317624688148499, 0.12518680095672607, -0.6807321906089783, -0.290025532245636, 0.6574200391769409...
def disconnect ( self, cid ) : try : del self. observers [ cid ] except keyerror : pass
[ 0.023877935484051704, -0.03673394024372101, 0.19429510831832886, -0.6717275977134705, -0.06859029829502106, -0.17079328000545502, -0.7003642320632935, -0.36436572670936584, 0.1103549599647522, 0.29943835735321045, -0.11833395063877106, -1.3891730308532715, -1.4130419492721558, 0.1511078327...
def make _ prediction ( predicted _ images, filename ='submission. csv ', patches _ predicted = false ) : print ( f " creating submission csv at location { filename } " ) file = open ( filename, " w " ) file. write ('id, prediction \ n') for image _ id, pred in enumerate ( predicted _ images ) : patches _ pred = make _...
[ -0.20782269537448883, -1.0197514295578003, 0.3802274465560913, -0.3012720048427582, -0.4607541561126709, 0.8780004382133484, 0.3460606634616852, 0.3998866081237793, -0.2785628139972687, -0.20612390339374542, -0.23669403791427612, 0.5625214576721191, 0.962565004825592, 0.4633542597293854, ...
def _ string _ input _ to _ list ( input _ str, valid _ str, arg _ name ) : if input _ str is none : input _ str = list ( ) elif isinstance ( input _ str, str ) : input _ str = [ input _ str ] for str _ item in input _ str : _ check _ option ( arg _ name, str _ item, valid _ str ) return input _ str
[ -0.1502743363380432, -1.0031920671463013, 0.2975948452949524, -0.16011165082454681, 0.5181711316108704, -0.0895790308713913, -0.6329165101051331, 0.545617938041687, 0.632356584072113, 0.6359866261482239, 0.11898256093263626, 0.50147944688797, -0.27072522044181824, -0.12300653010606766, 0...
def tensor _ concatfromlist ( ds, dim = 0 ) : # the storer _ storage = ds [ 0 ] # the update / concatenation for indx in range ( 1, len ( ds ) ) : torch. cat ( ( _ storage, ds [ indx ] ), dim ) return _ storage
[ -0.6255750060081482, 0.6634469628334045, 0.4085320234298706, 0.4477820098400116, -1.2588186264038086, -0.7700827121734619, -0.2527892589569092, 0.11021237820386887, 0.5786536335945129, 0.7508364319801331, -0.26500454545021057, -0.4692900776863098, 0.8248019218444824, -0.11677660048007965, ...
def predict _ cumulative _ hazard ( self, df, times = none, conditional _ after = none ) - > pd. dataframe : if isinstance ( df, pd. series ) : return self. predict _ cumulative _ hazard ( df. to _ frame ( ). t ) if conditional _ after is not none : raise notimplementederror ( ) times = np. atleast _ 1d ( coalesce ( ti...
[ 0.0045276605524122715, 0.7548311948776245, 0.6769858002662659, 0.7698574662208557, -0.44237247109413147, -0.6491080522537231, 0.04210438206791878, -0.32049131393432617, -0.3880605399608612, -0.08911226689815521, 0.17298631370067596, 0.4107324481010437, 0.6609703302383423, 0.577171325683593...
def nb _ lat ( self ) : return len ( self. sample )
[ 0.6152174472808838, -0.11367279291152954, 0.3134956359863281, -0.3272133767604828, -0.5246847867965698, 1.076046109199524, 0.22486722469329834, 0.4344833493232727, -0.05720267444849014, -0.40559062361717224, -0.4032045900821686, -0.25469040870666504, -0.28825461864471436, 0.009386497549712...
def gethighscores ( self, direction ) : with self. con : self. cur. execute ( " select * from highscores order by score " " " + str ( direction ) + " limit 10 ; " ) return self. cur. fetchall ( )
[ -0.05600113794207573, 0.6269388794898987, 0.6567056775093079, 0.1177566722035408, 1.5008125305175781, 0.07595499604940414, -1.0948008298873901, -0.030106322839856148, -0.29612815380096436, 0.6173956394195557, -0.45402753353118896, 0.07162874191999435, -0.716378927230835, -0.004436901304870...
def has _ ticket ( self, customer ) : # post : # if the showtime has any tickets associated with it that belong to the given customer,'true'is returned. # otherwise,'false'if returned. for item in self. tickets : if item. customer = = customer : return true return false
[ 0.5254493355751038, -0.30504661798477173, 0.4997875392436981, 0.31200647354125977, -0.5840692520141602, -0.2759361267089844, -0.4741990566253662, 0.4786131680011749, -0.7818607091903687, -0.6352841258049011, -0.6758061051368713, -0.6910088062286377, -0.24810394644737244, 0.6502074599266052...
def wrapper _ chain _ orientation _ parameter ( simname, nc, dp, coord _ loc = [ 3, 6 ], dir ='x ', sc = false ) : coord = extract. extract _ unwrapped ( simname ) cop _ list _ x = [ ] cop _ list _ y = [ ] cop _ list _ z = [ ] if dir = ='x': for key in coord : cop _ list _ x. append ( chain _ orientation _ parameter ( ...
[ -1.229945182800293, 0.05544835701584816, 0.5321170091629028, -0.1289031207561493, 0.17905113101005554, -0.15194003283977509, 0.02602527290582657, 0.08629962056875229, -0.11987390369176865, 1.0236252546310425, 0.05981023982167244, 0.04828296974301338, 0.44975849986076355, -0.289635896682739...
def set _ speeds ( cls, new _ def _ speed : int, new _ boosted _ speed : int ) - > none : cls. default _ text _ speed = new _ def _ speed cls. boosted _ text _ speed = new _ boosted _ speed
[ -0.019818201661109924, 0.5938957333564758, 0.3966222405433655, 0.9769284129142761, 0.8428477048873901, -0.26343974471092224, -0.5570859313011169, 0.05947817116975784, -1.098827600479126, 0.48688334226608276, -1.3159443140029907, 0.742986261844635, -0.2464905083179474, 1.2814642190933228, ...
def create _ job ( accession _ id ) : # construct request path = " { } / jobs " payload = {'accession _ id': accession _ id } url = path. format ( fabric _ api _ url ) result = requests. post ( url, json = payload, auth = auth ) return result. json ( )
[ -0.5440367460250854, -0.10305900871753693, 0.44922664761543274, -0.4230954349040985, 0.24645408987998962, 0.3145808279514313, -0.9879279732704163, -0.743507981300354, -0.20184995234012604, -0.09889691323041916, -0.3854973316192627, 1.1755846738815308, -0.3243567645549774, 0.136885657906532...
def _ search _ tryexec ( self, root _ mount _ point, absolute _ desktop _ file ) : assert absolute _ desktop _ file. startswith ( root _ mount _ point ) with open ( absolute _ desktop _ file, " r " ) as f : for tryexec _ line in [ x for x in f. readlines ( ) if x. startswith ( " tryexec " ) ] : try : key, value = tryex...
[ 0.5327417254447937, -0.8568820357322693, 0.6806431412696838, 0.684436023235321, 0.1215052381157875, -0.22112925350666046, -0.20054945349693298, -0.8854535222053528, -1.193890929222107, -0.09717792272567749, 0.6397262811660767, -0.2482190877199173, -0.19560906291007996, 0.5430422425270081, ...
def get _ all _ teams ( self, format ='json') : response = self. get ( self. base _ url + " / league / " + str ( self. game ) + ". l. " + str ( self. league ) + " / teams / ", format = format ) raw _ team _ list = response ['fantasy _ content'] ['league'] [ 1 ] ['teams'] # flatten the team info, because yahoo's json is...
[ -0.6386611461639404, -0.5674300789833069, 0.6079167723655701, -0.28291386365890503, 0.596483051776886, -0.38720688223838806, -1.4148690700531006, -0.1069658175110817, 0.10866975039243698, -0.4096083343029022, 0.18488171696662903, -0.07198187708854675, 0.7334215044975281, 0.9221124649047852...
def test _ increment _ self _ with _ sum _ vector ( self ) : self. vector + = vector ( [ 3, 2, 1 ] ) self. assertequals ( [ 4, 4, 4 ], self. vector ) self. vector + = [ 1, 1, 1 ] self. assertequals ( [ 5, 5, 5 ], self. vector ) self. assertraises ( nonnumericerror, self. vector. _ _ iadd _ _, [ 1, 2,'a'] ) self. assert...
[ -0.7675936222076416, -0.49543893337249756, 0.7486003637313843, 0.6437199115753174, -0.31314602494239807, 0.6855912208557129, 0.9153327941894531, -0.6124486923217773, 0.6109901070594788, -0.540644109249115, -0.5453082919120789, 0.13421335816383362, 0.1989869624376297, 0.20529386401176453, ...
def register _ plots ( loss, grapher, epoch, prefix ='train ', force _ sync = false ) : if args. distributed _ rank = = 0 and grapher is not none : # only send stuff to visdom once. for k, v in loss. items ( ) : if isinstance ( v, dict ) : register _ plots ( loss [ k ], grapher, epoch, prefix = prefix ) if'mean'in k or...
[ -0.7136300206184387, 0.9687087535858154, 0.7370167970657349, 0.21072112023830414, 0.05712172016501427, -0.2271251380443573, -0.2111682891845703, -0.5935512781143188, -0.3573254942893982, 0.289951354265213, -0.7186655402183533, 1.2314584255218506, 1.0655015707015991, 0.7617945671081543, -...
async def gif ( self, ctx, search = none ) - > none : payload = { " api _ key " : " dc6zatoxfjmzc " } title = " random gif " if search : title = " random \ " % s \ " gif " % search payload [ " tag " ] = search response = get ( " http : / / api. giphy. com / v1 / gifs / random ", params = payload ) r _ json = response. ...
[ -0.526557981967926, 1.7431811094284058, 0.39545610547065735, 0.3753019869327545, 0.8621664047241211, 0.13522648811340332, -0.6303237080574036, 0.031702082604169846, -0.4008956849575043, 0.05993126705288887, -0.5567846298217773, 0.6787623763084412, -1.303234577178955, 0.167226642370224, -...
def main ( ) : args = parameters ( ) shared. settings ( args ) shared. doread ( args )
[ -0.2556324005126953, 0.15778771042823792, 0.5564782619476318, 0.32218289375305176, 1.2387421131134033, 0.12496837228536606, 0.4382741451263428, -0.32741430401802063, -1.1778582334518433, 0.5423027873039246, 1.5629549026489258, 0.4740758240222931, -0.6159061789512634, 0.1701866239309311, ...
def _ set _ managers ( self, additional _ managers : optional [ list [ managerbase ] ] ) : self. managers : list [ managerbase ] = [ self. log _ manager, self. version _ manager, self. action _ handler, ] if additional _ managers : self. managers. extend ( additional _ managers )
[ 0.03612589091062546, 0.10927750915288925, 0.11181192845106125, 0.5120204091072083, 1.067787766456604, 0.18923935294151306, -0.9668691754341125, -0.19422750174999237, 0.03305676952004433, -0.6693653464317322, -0.9170920252799988, 0.8450252413749695, -0.21286700665950775, 0.9396225810050964,...
def save ( self, path ) : with h5py. file ( path, " w " ) as f : f. create _ dataset ( " alns ", data = self. data ) f. create _ dataset ( " labels ", data = self. labels ) f. create _ dataset ( " dist ", data = self. dist )
[ -0.07693763822317123, -0.6774922013282776, 0.16157293319702148, -1.0033559799194336, 0.1698550134897232, 1.393697738647461, 0.17924891412258148, -0.42554816603660583, -0.5788930058479309, -0.4070078432559967, -0.4410768747329712, 0.28760987520217896, 0.3650805652141571, -0.4694708287715912...
def ff2n ( n ) : return 2 * fullfact ( [ 2 ] * n ) - 1
[ -0.6579770445823669, 0.19300152361392975, 0.17786577343940735, 0.9545837640762329, 0.22750864923000336, -1.5360137224197388, 0.2857120633125305, 0.24677567183971405, -0.32727697491645813, -1.652958631515503, -1.852774739265442, -0.005288336426019669, 1.1680631637573242, 0.5243433117866516,...
def shape _ interpolate ( shape, density ) : points = [ ] for index, obj in enumerate ( shape ) : if index > 0 : previous = shape [ index - 1 ] points + = linear _ interpolate ( previous, obj, density ) else : points. append ( obj ) points + = linear _ interpolate ( shape [ 0 ], shape [ len ( shape ) - 1 ], density ) r...
[ 0.12106900662183762, -0.53057861328125, 0.6130514144897461, -0.04894298315048218, 1.1990517377853394, -0.15724430978298187, -0.5861839652061462, -0.0468030720949173, -0.07744225114583969, 0.9116790890693665, 0.06220570206642151, -0.49015140533447266, 0.3934774398803711, -0.3930101394653320...
def _ _ init _ _ ( self ) : self. _ cur _ prec = 0 builtinfunction. _ _ init _ _ ( self, " dickman _ rho ", 1 )
[ 0.5703790187835693, -0.46073243021965027, 0.44390368461608887, 0.8287341594696045, 0.11673039197921753, -0.8688795566558838, 1.3897647857666016, 0.5516924262046814, -0.5894162654876709, -0.7315423488616943, -0.7339592576026917, 0.5500608682632446, -0.6232912540435791, -0.015741290524601936...
def users ( ) - > str : email = request. form. get ( " email " ) password = request. form. get ( " password " ) try : user = auth. register _ user ( email, password ) return jsonify ( { " email " : " { } ". format ( email ), " message " : " user created " } ) except valueerror : return jsonify ( { " message " : " email...
[ -0.8652229905128479, 0.6520510911941528, 0.7673695683479309, 0.25932881236076355, 0.5360968112945557, -0.3768285810947418, -0.6113619804382324, -0.5707764625549316, -0.5343686938285828, 0.37313926219940186, -0.5540754795074463, 0.5966663360595703, 0.14699411392211914, 0.09045940637588501, ...
def lidar ( self ) : return self. sensors [ 2 ]
[ 0.18855632841587067, -0.6097514033317566, 0.2998131811618805, -0.725529670715332, 0.1723218411207199, 1.1420671939849854, -0.5569595098495483, -0.9407984614372253, 0.2245604246854782, -0.382223904132843, -0.06731056421995163, -0.2040771096944809, -0.9960321187973022, -0.6358818411827087, ...
def rm _ file ( path ) : # todo : python3. 8 supports missing _ ok flag try : path. unlink ( ) except filenotfounderror : pass
[ 1.2735843658447266, -0.23722277581691742, 0.4287806749343872, 0.11933963000774384, -0.007113463245332241, 1.0134788751602173, 0.11025593429803848, 0.331955224275589, 0.09040339291095734, 0.3327998220920563, 0.5792812705039978, -0.5981836318969727, 0.3070198595523834, -0.7486633658409119, ...
def filter _ time ( df : pd. dataframe, start : union [ datetime, none ] = none, end : union [ datetime, none ] = none, ) - > pd. dataframe : # get time index time = df. index. get _ level _ values ( " time " ) # filter & return return df. loc [ ( time > = start ) & ( time < = end ) ] if start and end else df
[ -0.2650955319404602, 0.3227851986885071, 0.7132795453071594, 0.7928735613822937, -0.3689242899417877, -0.3016473054885864, -0.5021995902061462, -0.24953223764896393, -1.1012345552444458, 0.8191380500793457, 0.19069421291351318, 0.8585183024406433, -0.4162225127220154, -0.7839701175689697, ...
def check _ firewall _ processes ( self ) : alf = read _ plist ('/ library / preferences / com. apple. alf. plist') if alf : processes = get _ plist _ key ( alf, " firewall " ) if processes : for key, value in processes. iteritems ( ) : try : name = key state = str ( value ['state'] ) process = value ['proc'] try : ser...
[ -0.05227674916386604, 0.4934079647064209, 0.5898116827011108, -0.35047417879104614, 0.5242540836334229, 0.2646016776561737, -1.1095601320266724, -0.6206518411636353, -0.2512757480144501, 0.1729479432106018, -0.4147358238697052, 0.011741235852241516, -0.1997363567352295, 1.0776798725128174,...
def result _ code ( self ) : return self. result _ reverse [ self. result ]
[ -0.4289443790912628, -0.3590763509273529, 0.49934712052345276, 0.2192026674747467, 0.5783199667930603, -0.586685299873352, 0.9765271544456482, -0.1280854195356369, -0.6374080777168274, -0.7133634090423584, -0.060890763998031616, 0.7851034998893738, -0.1495261937379837, -0.631081223487854, ...
def runsimulation ( self ) : # the current stands for a tick in clock, and it is sent to cashier as the signal to serve customers for currenttime in range ( self. _ totaltime2run ) : # try to generage a customer customer = customer. generatecustomer ( self. _ probobilityofnewarrival, currenttime, self. _ averageserveti...
[ -1.0017917156219482, 0.343183696269989, 0.5107665657997131, 0.7720814943313599, -0.16846464574337006, 0.385134220123291, 0.3127550482749939, 0.014161021448671818, -1.0867644548416138, 0.8188939094543457, -0.6748568415641785, 0.23446248471736908, 0.12759274244308472, 1.0345230102539062, 0...
def transact _ stub ( slippage, commission, event, open _ orders ) : def inject _ algo _ dt ( record ) : if not'algo _ dt'in record. extra : record. extra ['algo _ dt'] = event ['dt'] with processor ( inject _ algo _ dt ). threadbound ( ) : transactions = slippage. simulate ( event, open _ orders ) for transaction in t...
[ 0.44343701004981995, 0.934883177280426, 0.6327516436576843, -0.538847804069519, -0.09187754988670349, -0.6273191571235657, 1.0848406553268433, 0.08334369212388992, 0.48504170775413513, 1.1581737995147705, 0.02977413311600685, -0.8662665486335754, 0.26399195194244385, -0.1298951357603073, ...
def argument ( self, name _ argument ) : answer = self. _ call ('argument ', argument = name _ argument ) return answer. name, answer. value
[ -1.4454330205917358, -0.3193734288215637, 0.45675528049468994, -0.4056045114994049, -0.6075341701507568, 0.00834830105304718, -0.016025500372052193, -0.46329808235168457, 0.3516218960285187, 1.1530565023422241, -0.8978236317634583, 0.765468418598175, -0.10149723291397095, 0.865213572978973...
def mod _ boruvka ( g, subgraphs = none, rtree = none ) : # special case ( already mst ) if g. number _ of _ nodes ( ) < 2 : return g v = set ( g. nodes ( ) ) # geograph coords may be ndarray or dict if isinstance ( g. coords, np. ndarray ) : coords = g. coords else : coords = np. row _ stack ( g. coords. values ( ) ) ...
[ -0.17665250599384308, 0.23792682588100433, 0.8965460062026978, -0.4694911241531372, -0.5536796450614929, 0.03562894091010094, 0.36081624031066895, -0.21411822736263275, 0.5519427061080933, 0.9124434590339661, 0.13125717639923096, 0.3087352514266968, -0.17340311408042908, -0.157478794455528...
def expose _ headers ( self ) - > sequence [ str ] : return pulumi. get ( self, " expose _ headers " )
[ -0.4850137233734131, 0.200246661901474, 0.7681547999382019, 0.5622427463531494, 1.0132346153259277, 0.7840043902397156, 0.4404456913471222, -0.5123092532157898, 0.462851345539093, 0.6996685862541199, -0.575583815574646, 0.2713035047054291, 0.08832857757806778, -0.49850690364837646, 0.179...
def isfilemock ( obj ) : try : return ( isinstance ( obj, filedescriptor ) or isinstance ( obj. fileno ( ), filedescriptor ) ) except attributeerror : # obj has no attribute fileno ( ) return false
[ -0.22845999896526337, -0.2198246717453003, 0.5019858479499817, 0.7460679411888123, 0.5022280812263489, -0.18628987669944763, 0.7108956575393677, 0.36703452467918396, 1.211930751800537, -1.2170486450195312, -0.04931944981217384, -0.008054853416979313, 0.4072010815143585, 1.3377389907836914,...
def top ( self ) : return self. _ queue [ - 1 ]
[ -0.6711581945419312, -0.5618253946304321, 0.8220198154449463, -0.24407148361206055, -0.0529492050409317, 0.06962902843952179, -0.05204243212938309, -0.7522487640380859, -0.09895049780607224, 0.20932166278362274, 0.6416622400283813, 0.35945451259613037, -0.7573145627975464, -0.6300375461578...
def schedule ( jobs ) : jobs = sorted ( jobs, reverse = true ) acc = 0 weighted = 0 for job in jobs : acc + = job. length weighted + = job. weight * acc return weighted
[ 0.6913483738899231, -0.2508912682533264, 0.513192355632782, -0.1453489065170288, -0.1854693442583084, -0.684887170791626, 0.10298029333353043, -0.19271837174892426, -0.26411089301109314, 0.42986440658569336, -0.07664594799280167, -0.7876803278923035, -1.2162401676177979, 0.1734081357717514...
def get _ bottom _ wall ( self ) : x1, y1 = self. left + 1, self. top + self. height - 1 x2, y2 = self. left + self. width - 1, y1 return self. level. get _ tiles _ along _ line ( x1, y1, x2, y2 )
[ 0.08872481435537338, -0.2728266716003418, 0.9791964888572693, 1.2396183013916016, 0.715471088886261, -0.4237467348575592, 0.13591571152210236, -1.4337406158447266, -0.8880965709686279, -0.26442062854766846, -0.6555925607681274, 0.9861500859260559, -1.0292479991912842, 0.9188875555992126, ...
def _ authenticated _ user ( self ) - > models. user : user : models. user = models. user. objects. create ( ) self. client. force _ login ( user ) return user
[ -0.4977266192436218, 0.2274881899356842, 0.19855500757694244, 0.4267473816871643, 0.39317747950553894, 1.108498215675354, -0.017176572233438492, -0.7243221998214722, 0.31280505657196045, -0.6209473013877869, -1.3585968017578125, -0.1417539119720459, 0.374761700630188, -1.1587241888046265, ...
def convert _ gff ( bog, out _ file ) : chrom _ len _ dict = { } gff _ dict = { } out _ features = [ ] for classy _ gene in bog : gff _ dict, chrom _ len _ dict = create _ or _ append _ gff _ feature ( classy _ gene, gff _ dict ) for chrom in gff _ dict : rec = gff _ dict [ chrom ] [ 0 ] print ( len ( rec ) ) feature _...
[ -0.1606132686138153, -0.1374170333147049, 0.5133745670318604, 0.10523582249879837, 0.7856633067131042, -0.014852063730359077, 0.5589298605918884, 0.393606573343277, -0.6356745958328247, -0.10085464268922806, -1.1777976751327515, 0.6971429586410522, -0.0653986781835556, 0.699282705783844, ...
def _ createasync ( self, metric, metric _ name ) : if self. metadata _ switch. enabled ( ) : self. _ metricstocreate. put ( ( metric, metric _ name ) ) creates _ enqueued. inc ( )
[ 0.16034512221813202, 1.3407388925552368, 0.382197767496109, 0.35897260904312134, 0.7003874778747559, 0.34098199009895325, -0.5657010078430176, -0.503540575504303, -0.8935863375663757, 0.5486472249031067, 0.29030075669288635, -0.11858048290014267, 0.48028624057769775, 0.06692927330732346, ...
def _ _ init _ _ ( self, percentile = 0. 99 ) : super ( ). _ _ init _ _ ( ) self. percentile = percentile self. upper = none self. lower = none self. lower _ mask = none self. upper _ mask = none
[ 0.3116133511066437, -0.3468096852302551, 0.5240005254745483, 0.29310715198516846, 0.4389626681804657, 0.5614601969718933, 0.3156583905220032, -0.6657933592796326, -0.12055118381977081, -0.6107282638549805, -0.2680568993091583, -0.9414902925491333, -0.5669423341751099, -0.015201746486127377...
def requires ( self ) : specimen _ cleaning _ dep = ( mousespecimencleaner ( ) if self. specimen _ type = = " mouse " else embryospecimencleaner ( ) ) return [ specimen _ cleaning _ dep, colonycleaner ( ) ]
[ -0.6693137884140015, -1.1291913986206055, 0.4173011779785156, 0.6396391987800598, 0.012384428642690182, 0.7614079117774963, -0.0677965059876442, -0.10262156277894974, 0.5891918540000916, 0.0013583889231085777, -0.4734145700931549, 0.4668281078338623, 0.6229578256607056, 1.7458209991455078,...
def get _ absolute _ url ( self ) : return reverse ( " users : profile ", args = [ self. id ] )
[ 0.27960404753685, -0.26962408423423767, 0.576478123664856, 0.47669100761413574, 1.0976494550704956, 1.041082739830017, -0.166251540184021, -0.14109979569911957, -0.7712203860282898, -0.4057983458042145, -0.21445566415786743, 0.3650992214679718, 0.2113952785730362, -0.0722404345870018, -0...
def first ( self ) - > dataframe : return self. select _ all ( ). first ( )
[ 0.562183141708374, 0.6658334732055664, 0.21352554857730865, 0.31027624011039734, 0.7323692440986633, -1.1235806941986084, -0.4164866507053375, -0.3117996156215668, -0.43853360414505005, -1.107596516609192, 1.0057010650634766, 0.6960473656654358, -0.039500970393419266, -0.7269930243492126, ...
def configure _ queue _ logger ( queue : queue ) : handler = queuehandler ( queue ) logger = getlogger ( ) logger. addhandler ( handler ) logger. setlevel ( debug )
[ -0.04436603561043739, -0.9278674721717834, 0.47833114862442017, -0.8322699666023254, -0.20563679933547974, -0.2882736921310425, -1.0191595554351807, 0.1792447715997696, 0.2690199315547943, -0.8550545573234558, -0.6817154288291931, -0.042966265231370926, 0.9435539245605469, 2.04972147941589...
def test _ sph _ to _ cart ( ) : # simple test, expected value ( 11, 0, 0 ) r, theta, phi = 11. 0, 0. 0, np. pi / 2. 0 z = r * np. cos ( phi ) rsin _ phi = r * np. sin ( phi ) x = rsin _ phi * np. cos ( theta ) y = rsin _ phi * np. sin ( theta ) coord = _ sph _ to _ cart ( np. array ( [ [ r, theta, phi ] ] ) ) [ 0 ] as...
[ -0.4034600555896759, -0.7130227088928223, 0.724829375743866, -0.8433904051780701, 0.3742247521877289, 0.1356562077999115, 0.17533110082149506, -0.22031961381435394, 0.4662848711013794, 0.6373139023780823, -0.8056567907333374, 0.4889861047267914, 0.3022559881210327, -0.3137221932411194, 1...
def test _ get _ context _ dict _ escaped _ character ( self ) : manifest = manifest ( stringio ( manifest _ escaped _ parameters ) ) context _ dict = manifest. get _ context _ dict ( ) assert " section : escapeme | escaped " in context _ dict tools. eq _ ( context _ dict [ " section : escapeme | escaped " ], " \! \ @ ...
[ 0.5331369638442993, -0.7985814809799194, 0.5391314029693604, -0.38964375853538513, -0.2967994511127472, 0.0006152158603072166, -0.3056001365184784, 0.5543889403343201, -0.25214290618896484, -0.27433308959007263, -0.6053814888000488, 0.017057638615369797, 0.5224098563194275, -0.052272610366...
def getgamestate ( self ) : # # # student code goes here t = [ ] for i in range ( 1, 4 ) : info = self. kb. kb _ ask ( parse _ input ('fact : ( on? disk peg'+ str ( i ) +')') ) states = [ ] if info : for piece in info : disk = piece [ '? disk'] num = int ( disk [ - 1 ] ) states. append ( num ) states. sort ( ) tuptemp ...
[ -0.9239206910133362, 0.4668799638748169, 0.701501190662384, 0.32583650946617126, 0.18950387835502625, -0.0020517967641353607, 0.5506612062454224, -0.6296970248222351, -1.08902907371521, 0.12710176408290863, -0.8480075001716614, -1.1371562480926514, -0.9004241228103638, -0.42288509011268616...
def link ( self, z ) : return z
[ -0.354463666677475, -1.161484956741333, 0.09515918791294098, 0.3892403244972229, 0.23691272735595703, 0.6799066662788391, 1.3969130516052246, -0.428729385137558, 2.050009250640869, -2.193582534790039, -0.25921404361724854, 1.046983003616333, -0.7913225293159485, -0.4385286271572113, -1.2...
def update ( self ) : next _ w = self. network. weights next _ b = self. network. biases self. w _ over _ time. append ( next _ w ) self. b _ over _ time. append ( next _ b ) cost = reduce ( lambda tot, coord : tot + self. network. cost ( coord ), self. train, 0 ) self. cost _ over _ time. append ( cost )
[ -0.6464426517486572, 0.0459304042160511, 0.39330944418907166, -0.2663324475288391, 0.21858616173267365, -0.035216838121414185, 0.25887706875801086, 0.6258058547973633, -0.37862226366996765, 0.9181203842163086, -0.2417736053466797, -0.09132019430398941, -0.12981505692005157, 0.4145051538944...
def _ _ generate _ templates ( cls, parser : templateparser, args : list ) : for ( source _ path, destination _ path ) in cls. _ get _ template _ files ( ) : destination _ path = parser. render _ string ( destination _ path ) destination _ directory = os. path. dirname ( destination _ path ) # create the destination fo...
[ -0.8649735450744629, 0.713765025138855, 0.7966845631599426, 0.14922353625297546, 0.4168894588947296, 0.6535184979438782, 0.4200763404369354, 0.3976077139377594, -0.9383904933929443, 0.17546840012073517, -0.49459022283554077, -1.3332831859588623, 0.2644265592098236, 0.5761371850967407, -0...
def can _ run _ for _ president ( age ) : # the us constitution says you must " have attained to the age of thirty - five years " return age > = 35
[ -0.4107396900653839, 0.2367561161518097, 0.28971973061561584, 0.5682564973831177, -1.108837604522705, 1.691589593887329, -0.4826609194278717, 0.4752134084701538, -0.38180461525917053, 0.10518377274274826, -0.43935632705688477, -0.19329823553562164, 0.2337985336780548, 0.5969811081886292, ...
def _ deactivate _ provisioning _ service _ block ( self ) : config = self. _ config. plugins [ self. full _ name ] path = self. _ mountpoint + config. get ('policy _ file _ path ','' ) filename = path + " / " + config. get ('policy _ file') if not os. path. isdir ( path ) : log. debug ( " creating % s ", path ) os. ma...
[ 0.2798458933830261, -0.7661128640174866, 0.8178995251655579, -0.33509355783462524, 0.34901198744773865, 0.6815146207809448, 0.4017607569694519, 0.6157950758934021, -0.8701722621917725, 0.42000117897987366, -0.363785982131958, -0.3118961453437805, -0.8944881558418274, -0.04644377529621124, ...
def test _ get _ top _ heroes ( self ) : # aqui vamos fazer um loop e criar 20 herois # e o nome vai ser hero + index do loop, ex : " hero 1 " for index in range ( 1, 21 ) : self. create _ hero ('hero { 0 } '. format ( index ),'marvel') # fazendo a primeira consulta a url e conferindo a resposta response = self. app. g...
[ -0.16735175251960754, 0.21976031363010406, 0.5508584976196289, 0.7101850509643555, 0.5590085387229919, 0.4929637014865875, 0.12924832105636597, -0.3394467532634735, -0.7682754397392273, -1.290021538734436, -0.6702509522438049, 0.3634054958820343, 0.5998706221580505, 0.48105520009994507, ...
def create _ item ( self, user, data ) : pass
[ -0.5068548917770386, 0.26066145300865173, 0.17874208092689514, 1.268051028251648, 0.39563795924186707, 1.7556571960449219, -0.6017323136329651, -0.13682399690151215, -1.1827908754348755, -0.4373263716697693, -0.7804070115089417, 0.06660213321447372, -0.24863243103027344, -0.364275485277175...
def test _ trivial _ dilation ( ) : _ assert _ inout _ for _ expected _ output ( input _ length = 5, expected = 5, dilation = 2 )
[ 0.14424224197864532, 0.6389110088348389, 0.3019968569278717, 0.9178346991539001, 0.1241835355758667, 0.1105969175696373, 0.8456329703330994, -0.10699281096458435, 0.7339882850646973, -1.1571247577667236, -0.4982861280441284, -1.0049751996994019, 0.19180072844028473, 0.7298610806465149, 0...
async def channel ( self, ctx, value : bool = none ) : v = await self. config. guild ( ctx. guild ). enabledchannels ( ) if value is none : if ctx. channel. id not in v : await ctx. send ('stats are not being recorded in this channel.') else : await ctx. send ('stats are being recorded in this channel.') else : if valu...
[ 0.6150741577148438, 0.9004082083702087, 0.9298964142799377, -0.5261485576629639, 0.7908276319503784, 0.6050053834915161, -0.5572065711021423, -0.23216849565505981, 0.8913490772247314, -0.23594647645950317, -0.05432986095547676, 1.455551028251648, -1.0341579914093018, 0.5574024319648743, ...
def _ makemaskedarg ( x ) : if isinstance ( x, abstractvariable ) and not isinstance ( x, transientvariable ) : return x. subslice ( ) elif isinstance ( x, transientvariable ) : return x else : return array ( x )
[ -0.4980216324329376, 0.24714291095733643, 0.50018709897995, -0.2895774841308594, -0.03858520835638046, 0.3043973445892334, 0.09216470271348953, -1.2286456823349, 0.0890730619430542, 0.6510674357414246, -0.03390977531671524, 0.9963393211364746, 0.13628768920898438, -0.5454841256141663, 0....
def testgetthermodatamopac ( self ) : outputdirectory = os. path. join ( self. mop1. settings. filestore, '.. ', '..') self. mop1. setdefaultoutputdirectory ( outputdirectory ) self. mop2. setdefaultoutputdirectory ( outputdirectory ) self. mop3. setdefaultoutputdirectory ( outputdirectory ) mol = molecule ( ). fromsmi...
[ 0.48304489254951477, -0.7695643901824951, 0.8558389544487, -0.0761641412973404, 0.4638603925704956, 0.6408482193946838, 0.3976386487483978, -0.25710102915763855, -0.4368661344051361, -0.61419677734375, -0.3124907612800598, -0.545788586139679, -0.21584726870059967, -0.16826799511909485, -...
def _ reassign _ ports ( self, sg _ aggr ) : ports = sg _ aggr. get ('ports ', none ) port _ keys _ to _ drop = defaultdict ( list ) while len ( ports ) > 0 : port = ports. popleft ( ) sg _ set = sg _ util. security _ group _ set ( port ) if not sg _ set : log. debug ( " port { } has no security group set, skipping rea...
[ -0.48817771673202515, -0.17390310764312744, 0.528270423412323, -0.3749329745769501, 0.3775885999202728, -0.5968180298805237, 0.6086234450340271, -0.16628268361091614, -0.17057259380817413, 0.8977779746055603, 0.46579673886299133, 1.011828899383545, 0.02771022543311119, 0.24040910601615906,...
def set _ source0 ( self, value ) : assert isinstance ( value, numpy. ndarray ), " source must be of type numpy. ndarray " self. _ _ source0 = value
[ -0.4615808129310608, 0.48465168476104736, 0.34966111183166504, -0.6208794116973877, -0.05862538516521454, 0.5946733355522156, 1.1665812730789185, -0.5791341066360474, 0.7815727591514587, 0.7062125205993652, -0.7792879939079285, 0.6085169911384583, -0.2591683566570282, 1.2070955038070679, ...
def test _ get _ token _ phonemes ( self ) - > none : doc = self. nlp ( " one two 3 go! " ) # " one " is in the table self. assertequal ( self. px. get _ token _ phonemes ( doc [ 0 ] ), ( " w ", " ʌn " ) ) # " go " isn't in the table ; it should return oov _ phonemes self. assertequal ( self. px. get _ token _ phonemes...
[ -0.43818148970603943, 0.35295915603637695, 0.3058580458164215, -0.18560342490673065, 0.4414660632610321, -0.0548386313021183, -1.517311453819275, -0.3936600983142853, -0.23583339154720306, -0.23958207666873932, -0.5707166194915771, -0.5217071771621704, -0.15190860629081726, -0.419358164072...
def signup _ verify ( request, uidb36 = none, token = none ) : user = authenticate ( uidb36 = uidb36, token = token, is _ active = false ) if user is not none : user. is _ active = true user. save ( ) auth _ login ( request, user ) info ( request, _ ( " successfully signed up - this is your personal desk : " ) ) return...
[ -0.5101551413536072, 0.38660886883735657, 0.6224011182785034, 1.6922810077667236, -0.10899796336889267, 0.40292173624038696, 0.2715286314487457, 0.6209495067596436, 0.17202195525169373, -0.9378340840339661, -0.22917109727859497, -0.7529048919677734, 0.21081312000751495, -0.6519637703895569...
def make _ df ( left _ df, sensor _ d, sensor _ l ) : for i in sensor _ l : h = sensor _ d [ i ] [ 0 ] [ 0 ] left _ df [ h ] = sensor _ d [ i ] [ 0 ] [ 1 : ] + sensor _ d [ i ] [ 1 ] left _ df ['notes'] = sensor _ d ['notes'] return left _ df
[ -0.013592069037258625, 0.3416806757450104, 0.6251159906387329, -0.6748208999633789, 0.7131869792938232, 0.38420477509498596, -0.1791984587907791, -0.3730722665786743, -0.04422838240861893, -0.12250281870365143, 0.1727539598941803, 0.05202055349946022, -0.2628650963306427, -0.40356749296188...
def validate _ input ( self ) : run _ inpgen = true inputs = self. inputs if'fleurinp'in inputs : run _ inpgen = false if'structure'in inputs : warning ='warning : ignoring structure input, because fleurinp was given'self. ctx. warnings. append ( warning ) self. report ( warning ) if'inpgen'in inputs : warning ='warnin...
[ -0.2717275619506836, -0.5924788117408752, 0.6194522380828857, 0.31050580739974976, -0.020329255610704422, 0.28604650497436523, 0.7189440131187439, -0.14639249444007874, -0.15690693259239197, -0.48554497957229614, 0.6767301559448242, 0.9874579906463623, -1.0802897214889526, 0.62717515230178...
def wolf _ behavior ( farmer, herd, wolf _ pack ) : for wolf in wolf _ pack : if wolf. wolf _ hit = = false and len ( herd. sprites ( ) ) > 0 : closest _ cow = wolf. track _ cow ( herd ) if not pygame. sprite. collide _ rect ( closest _ cow, wolf ) : wolf. move _ horizontally _ towards _ cow ( closest _ cow ) wolf. mov...
[ -0.3809240460395813, -0.3959982097148895, 0.7737573385238647, 0.927032470703125, 0.897134006023407, -0.7327618598937988, 0.6319117546081543, -0.5863315463066101, 0.029261277988553047, 0.3721063435077667, -0.32467618584632874, -0.3286031484603882, -0.2693139314651489, 0.4310213625431061, ...
def started ( self ) - > bool : return self. _ started. is _ set ( )
[ 0.012736807577311993, -0.22573545575141907, 0.34894895553588867, 0.49521055817604065, 0.6727277040481567, -0.17944972217082977, -0.07009997218847275, 0.5375089049339294, -0.2827130854129791, -0.41707843542099, -1.0160722732543945, 0.4793846011161804, -0.3961199223995209, -0.121311061084270...
def corrupt _ dataset ( x _ agg, y _ agg, prop _ outliers, corruption _ params ) : n, d = x _ agg. shape # check if prop _ outliers is indeed a proportion between 0 and 1 assert prop _ outliers > = 0 and prop _ outliers < = 1 n _ outliers = int ( prop _ outliers * n ) # randomly pick indexes of targets to corrupt outli...
[ -1.1107871532440186, -0.2752121686935425, 0.566533625125885, -0.3167414665222168, 0.7344046831130981, 0.3440447151660919, -0.47448891401290894, 0.46591177582740784, -0.18916355073451996, 0.9111416339874268, 1.4971264600753784, 1.7307337522506714, -0.2101418823003769, -0.2603849768638611, ...
def uuid ( self ) - > str : return pulumi. get ( self, " uuid " )
[ 0.5358535647392273, -0.259950190782547, 0.46854668855667114, -0.04774601012468338, 0.6631829738616943, 1.5606913566589355, 0.12264738976955414, 1.2543994188308716, 0.5317365527153015, -0.02167239412665367, 0.3115134537220001, 1.1690540313720703, 0.4679669141769409, -1.6416294574737549, -...
def _ biom _ to _ pysurvey _ mat ( table ) : table = biom. load _ table ( table ) mat = table. matrix _ data. toarray ( ). t return pd. dataframe ( mat, columns = table. ids ( axis ='observation'), index = table. ids ( ) )
[ 0.12106349319219589, -0.10165400058031082, 0.39630672335624695, 0.48040956258773804, -0.5959658026695251, 0.16715294122695923, 0.6364594101905823, -0.17959637939929962, -0.10394939035177231, -0.07034165412187576, 1.1095937490463257, 0.2004665732383728, 0.27110743522644043, -0.9127168655395...
def create _ user _ profile ( sender, instance, created, * * kwargs ) : if created : userprofile. objects. create ( user = instance )
[ 1.5827335119247437, 0.48909005522727966, 0.1560043841600418, 0.530654788017273, 0.6900700926780701, 0.6653392910957336, 0.2553679943084717, -0.5268551707267761, -0.23673351109027863, -0.005579778458923101, -2.214780569076538, -0.8135794997215271, 0.017518235370516777, 0.017697643488645554,...
def intersect ( self, ray ) : # todo : intersect in geometry needs to be refactored either to take in ` clip ` # or to return all intersections. for now, we can rely on the normal as a disposer # that results in at most one intersection. t = self. geometry. intersect ( ray ) if t is none : return none r = ray. v _ q q ...
[ -0.8148357272148132, -0.612808108329773, 0.7467605471611023, 0.17501656711101532, -1.438076138496399, 0.047478921711444855, -1.1836471557617188, -0.9468612670898438, 0.6573610901832581, 0.982852578163147, 0.9591774344444275, 0.034011684358119965, 0.1744343787431717, 0.15687179565429688, ...
def get _ audio _ analysis _ for _ tracks ( sp, track _ list ) : audio _ analysis = [ ] for track in track _ list : audio _ analysis. append ( { * * track,'audio _ analysis': get _ audio _ analysis ( sp, track ['uri'] ) } ) return audio _ analysis
[ -0.35169675946235657, 0.6377206444740295, 0.3830265998840332, 0.9125000834465027, 0.8496472239494324, -0.31513741612434387, -0.6284599304199219, 0.1786225587129593, -0.5963113903999329, 0.2928074598312378, -0.2208242416381836, -0.3999880254268646, 0.4629787802696228, 0.8856030702590942, ...
def calculatelogprob ( self, * argv, * * kwargs ) : pass
[ 0.2997933030128479, -0.07842205464839935, 0.5474299192428589, 0.487964004278183, -0.028013024479150772, 0.37981799244880676, -0.14531348645687103, 0.3898405432701111, 0.026140224188566208, -0.2571133077144623, -0.763641357421875, 0.37918755412101746, -0.915276825428009, -0.4423309862613678...
async def test _ no _ state _ change _ on _ failure ( v3 _ server ) : v3 _ server. post ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / state / away " ), status = 401, body = " unauthorized ", ) v3 _ server. post ( " https : / / api. simplisafe. com / v1 / api / ...
[ -0.19117483496665955, 0.2571074068546295, 0.39475923776626587, -0.3672623038291931, -0.2254510521888733, 1.2332051992416382, -0.6647786498069763, 0.2734832763671875, 0.9966295957565308, -0.610320508480072, -0.5582302212715149, 0.7360885739326477, -0.3576669991016388, 0.18711206316947937, ...
def meshgrid _ abs ( batch, height, width, is _ homogeneous = true ) : xs = tf. linspace ( 0. 0, tf. cast ( width - 1, tf. float32 ), width ) ys = tf. linspace ( 0. 0, tf. cast ( height - 1, tf. float32 ), height ) xs, ys = tf. meshgrid ( xs, ys ) if is _ homogeneous : ones = tf. ones _ like ( xs ) coords = tf. stack (...
[ -0.16110505163669586, 0.21831057965755463, 0.9431471824645996, 0.5894489288330078, 0.13365720212459564, 0.20395921170711517, 0.024149585515260696, 0.5420163869857788, -0.34244582056999207, 0.5643641352653503, 0.22023127973079681, 0.3313789367675781, 0.29284656047821045, 0.42808622121810913...
def _ _ init _ _ ( self, name, configfile ) : service. _ _ init _ _ ( self, name, configfile ) # load info from the configuration parameters self. _ param1 = self. param ( " param1 " ) self. _ param2 = self. param ( " param2 " )
[ -0.2533688247203827, -0.7542586922645569, 0.35670986771583557, -0.007620461285114288, -0.4767022430896759, 0.37711724638938904, 0.1748565435409546, 0.3272879421710968, -1.7197480201721191, 0.3654165267944336, -0.5831771492958069, -0.10649719834327698, -0.32870811223983765, 1.29370415210723...
def unique ( self ) : return false
[ -0.6559489965438843, 0.12738636136054993, 0.4333670139312744, 0.6129117012023926, 0.6503095030784607, 1.2818533182144165, 0.5287894606590271, 0.5209907293319702, 0.29566270112991333, -0.6196876168251038, -0.9438196420669556, -0.2004445195198059, -1.4397279024124146, -0.12333180755376816, ...
def get _ contact ( conn : sqlite3. connection, mac _ address, * args ) : fields = [ * filter ( lambda f : f in contact _ fields, args ) ] if fields : with conn : statement = f " select { ', '. join ( fields ) } from contact where mac _ address =? " values = conn. execute ( statement, ( mac _ address, ) ). fetchone ( )...
[ 0.47808048129081726, 0.13913483917713165, 0.31707608699798584, -0.06280740350484848, -0.38305938243865967, -0.9074769616127014, -0.6695526838302612, 0.11135932803153992, -0.9900397062301636, 0.7124146819114685, 0.09292694926261902, -0.4710656702518463, -0.2924059331417084, 0.04938944801688...
def test _ create _ game _ default _ opts ( self ) : # make create request and parse response response = self. c. post ( reverse ('api - ajax - game') ) response _ dict = json. loads ( response. content ) # make some assertions yo! self. assertequal ( response. status _ code, 200 ) self. assertequal ( response _ dict [...
[ -0.6961014866828918, 0.6084414124488831, 0.6739288568496704, 0.04219330847263336, 1.9173915386199951, 0.9092576503753662, -1.0049495697021484, -0.2950054407119751, -0.7404798865318298, 0.3136928379535675, -0.5198978185653687, -1.239898681640625, -0.27650222182273865, 0.18326418101787567, ...
def children ( self ) - > iterable [ e ] :...
[ 0.10246046632528305, 0.021883277222514153, 0.44940680265426636, 0.8553211688995361, 0.10524771362543106, 0.5161690711975098, 0.10719228535890579, 0.08938687294721603, -0.5132957696914673, -0.9502453804016113, -0.6537984013557434, 0.5100523233413696, 0.3898885250091553, -0.10081033408641815...
def count _ nucleotides ( dna, nucleotide ) : number = 0 for num in dna : if num = = nucleotide : number + = 1 return number
[ 0.18049447238445282, 0.075692318379879, 0.3881261646747589, -0.023370608687400818, -0.08869733661413193, -0.5345463752746582, 0.31642061471939087, 0.33051598072052, 0.4133297801017761, 0.13616129755973816, -1.0182729959487915, -0.0501725971698761, 0.05250947177410126, 0.1736445426940918, ...
def compute _ det ( true _ labels, row _ predictions, th _ step = none, show _ figure = false, save _ figure = false ) : min _ value = row _ predictions. min ( ) max _ value = row _ predictions. max ( ) if th _ step is none : th _ step = ( max _ value - min _ value ) / 100 thresholds = np. arange ( min _ value, max _ v...
[ 0.7516918182373047, 0.25632235407829285, 0.7288638353347778, -0.45396047830581665, -0.08224960416555405, -0.09099357575178146, 0.3149169981479645, 0.07038046419620514, -0.5307933688163757, 0.501637876033783, 0.8798925280570984, 0.483955055475235, 0.9502641558647156, 0.1714371293783188, 0...
def allow _ add _ quote ( self, attempting _ artisan ) : quote = apps. get _ model ('job ','quote') if not attempting _ artisan. profession : return false if ( quote. objects. filter ( artisan = attempting _ artisan, job = self. job, closed _ requoted = false ). exists ( ) or quote. objects. filter ( job = self. job, c...
[ -0.2996097803115845, 0.372052937746048, 0.49455663561820984, 0.32295793294906616, 0.13382945954799652, 0.9231059551239014, -0.7922466993331909, -0.6500807404518127, -0.21909233927726746, 0.03887951746582985, 0.49214330315589905, -0.002670475048944354, -0.5950474143028259, 0.369153201580047...
def parse _ compute _ version ( compute _ version ) : split _ ver = compute _ version. split ( ". " ) try : major = int ( split _ ver [ 0 ] ) minor = int ( split _ ver [ 1 ] ) return major, minor except ( indexerror, valueerror ) as err : # pylint : disable = raise - missing - from raise runtimeerror ( " compute versio...
[ -0.5710561275482178, -0.7982966899871826, 0.5836003422737122, -0.4850618541240692, -0.6827828884124756, 0.3854811489582062, 0.2528192102909088, 0.48738211393356323, -0.18210121989250183, 0.5510402917861938, -0.4312601387500763, -0.1254437118768692, -0.5527904033660889, -0.08279857784509659...
def color _ range _ update ( self, vmin, vmax ) : if vmin! = vmax : svdiff = self. svmax - self. svmin svmin = svdiff * vmin + self. svmin svmax = svdiff * vmax + self. svmin self. svmin = svmin self. svmax = svmax else : self. svmin = self. vmin self. svmax = self. vmax norm = matplotlib. colors. normalize ( self. svm...
[ -0.09095436334609985, -0.7521861791610718, 0.3841531574726105, 0.0899195522069931, -0.7432257533073425, 0.023209476843476295, -0.08858045190572739, -0.2503148317337036, 0.8031181693077087, -0.05507901683449745, 0.23691436648368835, 0.7802082300186157, -0.37880825996398926, 0.25090605020523...
def test _ project _ view _ project _ exists _ with _ milestones ( self ) : project = create _ project _ and _ milestones ( " title ", 3 ) response = self. client. get ( reverse ('projects : project ', args = ( 1, ) ) ) self. assertnotequal ( response. status _ code, 404 ) self. assertcontains ( response, " title " ) s...
[ -0.1713775247335434, 0.8355451822280884, 0.2911265194416046, -0.21583586931228638, 0.6789489984512329, 1.294668197631836, 0.1748901754617691, 0.39699891209602356, 0.4694885015487671, -0.08926984667778015, 0.06773483753204346, -0.4741930365562439, -0.5028629899024963, 0.038690660148859024, ...
def sample ( self, n : " optional [ int ] " = none, frac : " optional [ float ] " = none, with _ replacement : bool = false, ) - > " dataframe " : if n is not none : return wrap _ df ( self. _ df. sample _ n ( n, with _ replacement ) ) return wrap _ df ( self. _ df. sample _ frac ( frac, with _ replacement ) )
[ 0.004334104247391224, 0.6504863500595093, 0.44342780113220215, 0.24169479310512543, -0.45497286319732666, -1.4798458814620972, 0.1438344568014145, -0.3841303884983063, 0.4873181879520416, -0.8569738268852234, 0.13651615381240845, 0.2377428263425827, 0.03938924893736839, -0.6471723914146423...
def directory ( self ) : return self. _ directory
[ -0.8853194713592529, -0.691658616065979, 0.15701958537101746, 0.2501089572906494, 0.1581595540046692, 0.6585198640823364, 1.4532701969146729, -0.2709503769874573, 0.7629686594009399, -2.2419772148132324, 0.516295850276947, 0.7436323761940002, 0.5267267823219299, -0.034309666603803635, -0...
def findlines ( self, n, num ) : return self. currentlines [ ( n, num ) ]
[ 0.11323592066764832, -0.9120750427246094, 0.22963599860668182, 0.29483336210250854, 0.2863532602787018, -0.4184947907924652, -0.6626155376434326, -1.6266666650772095, -0.24198824167251587, -0.3375008702278137, 0.8361395001411438, 0.2459566295146942, -0.8929595947265625, 0.1672842651605606,...
def post _ multipart ( host, selector, fields, files ) : content _ type, body = encode _ multipart _ formdata ( fields, files ) h = httplib. http ( host ) h. putrequest ('post ', selector ) h. putheader ('content - type ', content _ type ) h. putheader ('content - length ', str ( len ( body ) ) ) h. endheaders ( ) h. s...
[ -0.42123329639434814, 0.1143982857465744, 0.6650555729866028, -0.12522552907466888, -0.36705663800239563, -0.159942165017128, -1.1748954057693481, -0.33285731077194214, -1.3410528898239136, 0.024026190862059593, -0.3340998888015747, -0.6547292470932007, -1.0900659561157227, -0.128808677196...
def is _ unreliable _ tag ( tag ) : matchers = [ lambda x : x = = "... " or x = = " commentary _ request " ] for matcher in matchers : if matcher ( tag ) : return true return false
[ -0.09906977415084839, -0.11919935792684555, 0.44558727741241455, 0.5464353561401367, 0.5032528042793274, -0.06360918283462524, -0.7746064066886902, 0.11407951265573502, -0.5804027915000916, -0.6941298246383667, -0.4467007517814636, -0.5840902924537659, -0.5560986995697021, 0.47476762533187...
def assert _ in _ range ( self, inside, outside, offset ) : from sixtypical. analyzer import rangeexceedederror assert isinstance ( inside, locationref ) assert isinstance ( outside, locationref ) # inside should always be meaningful inside _ range = self. _ range [ inside ] # outside might not be meaningful, so defaul...
[ -0.8878010511398315, -0.15861591696739197, 0.6533087491989136, -0.5564467906951904, -0.6878793239593506, 1.1669363975524902, -0.7058698534965515, 0.3854553699493408, -0.16200056672096252, -0.5599319338798523, 0.4571400582790375, 1.0507346391677856, -0.7227621078491211, 0.1769353747367859, ...
def check _ user _ int ( user _ input, max _ value ) : result = false if type ( user _ input ) = = int : if 1 < = user _ input < = max _ value : result = true return result
[ -1.0730355978012085, 0.04735102131962776, 0.3527320325374603, 1.207743763923645, -1.1912651062011719, 1.2648667097091675, -0.23714029788970947, -0.21497087180614471, -0.5697365403175354, -0.8247080445289612, -0.15163525938987732, -0.18324875831604004, -0.7046173214912415, 0.097980193793773...
def getrepositorydata ( repository _ data = none, repository _ id = none, repository _ url = none ) : app = apps. get _ app _ config ('calisphere') repository = { } repository _ details = { } if not ( repository _ data ) and not ( repository _ id ) and repository _ url : repository _ id = re. match ( r'https : / / regi...
[ -0.2931617200374603, -0.241002157330513, 0.6750984787940979, -0.4542384147644043, -0.24315044283866882, -0.04423927888274193, -0.640694797039032, 0.5321288704872131, -0.04599061235785484, 0.33220890164375305, -0.5943669080734253, 0.37334924936294556, 0.09595992416143417, 0.5582853555679321...