text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ prediction ( trainer ) : for c in countries : pred = trainer. score ( c ) | [
-0.2581007480621338,
0.6633172631263733,
0.13406889140605927,
0.6600468158721924,
0.706030547618866,
0.776658833026886,
1.1596159934997559,
-0.022252552211284637,
-0.912714958190918,
-0.36166736483573914,
-0.2833661139011383,
-1.223584532737732,
0.42080366611480713,
0.18308581411838531,
... |
def get _ all _ tracked ( self, as _ np = false ) - > tuple [ union [ list, ndarray ], union [ list, ndarray ], union [ list, ndarray ] ] : if as _ np : return np. array ( self. _ train ), np. array ( self. _ val ), np. array ( self. _ steps ) return self. _ train, self. _ val, self. _ steps | [
-0.5211222767829895,
0.6543462872505188,
0.695839524269104,
1.1839720010757446,
0.8633615970611572,
0.6053972244262695,
-0.18865500390529633,
-0.5237319469451904,
-0.7577805519104004,
-0.01348428800702095,
-0.5204879641532898,
0.028009040281176567,
0.499419629573822,
1.0217889547348022,
... |
def test _ atomic _ qname _ length _ 1 _ nistxml _ sv _ iv _ atomic _ qname _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - length - 2. xsd ", instance = " nistdata / atomic / qname / schem... | [
0.11375831067562103,
-0.6462811827659607,
0.38377538323402405,
0.10702371597290039,
-0.6285467147827148,
0.18131345510482788,
0.0787113755941391,
-0.640514075756073,
-0.5042531490325928,
0.42841866612434387,
-1.058264970779419,
-0.007850809954106808,
0.29180997610092163,
0.3471236824989319... |
def ctrdms _ cal ( data, sub _ opt = 1, chl _ opt = 1, time _ win = 10, time _ step = 5 ) : n _ cons, n _ subs, n _ chls, n _ ts = np. shape ( data ) nts = int ( ( n _ ts - time _ win ) / time _ step ) + 1 # chl _ opt = 0 if chl _ opt = = 0 : data _ for _ cal = np. zeros ( [ n _ cons, n _ subs, nts, n _ chls, time _ wi... | [
0.518061101436615,
0.10123036801815033,
0.9871370792388916,
-0.1258842498064041,
-0.18700049817562103,
0.11806205660104752,
-0.27146342396736145,
-0.6020578145980835,
-0.548409104347229,
0.1687205582857132,
0.195592001080513,
-0.19625313580036163,
0.17548678815364838,
0.26784369349479675,
... |
def app _ cfg ( default _ app _ cfg, aiohttp _ unused _ port ) - > dict : cfg = deepcopy ( default _ app _ cfg ) # fills ports on the fly cfg [ " main " ] [ " port " ] = aiohttp _ unused _ port ( ) cfg [ " storage " ] [ " port " ] = aiohttp _ unused _ port ( ) # this fixture can be safely modified during test since it ... | [
0.5557509660720825,
-0.3689616620540619,
0.36205020546913147,
-0.15096838772296906,
0.03794943541288376,
-0.0864320620894432,
0.05796879529953003,
-0.18615122139453888,
0.14110217988491058,
0.2763368487358093,
-0.321978896856308,
-0.1822081059217453,
0.3143271803855896,
0.16807518899440765... |
def togglesilencespeech ( self, inputevent = none ) : speech. stop ( ) if _ settingsmanager. getsetting ('silencespeech') : _ settingsmanager. setsetting ('silencespeech ', false ) self. presentmessage ( messages. speech _ enabled ) elif not _ settingsmanager. getsetting ('enablespeech') : _ settingsmanager. setsetting... | [
-0.36204737424850464,
0.240945503115654,
1.1953494548797607,
-0.002973051043227315,
0.39205247163772583,
0.8837830424308777,
-0.3637070953845978,
0.499557763338089,
0.9334877729415894,
0.7275562882423401,
-0.7623456716537476,
0.06685833632946014,
-1.6392871141433716,
0.297992080450058,
0... |
def test _ atomic _ base64 _ binary _ enumeration _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 1. xsd ", i... | [
-0.6317118406295776,
-1.1009368896484375,
0.523857057094574,
1.3016270399093628,
-0.04983482509851456,
-0.06609117984771729,
0.4334467053413391,
-0.16545702517032623,
-0.2955692708492279,
0.652958333492279,
-0.39323827624320984,
0.4346006214618683,
-0.10608130693435669,
0.3735215663909912,... |
def to _ timeline ( self ) : timeline = defaultdict ( dict ) for gl, group in self. log. iteritems ( ) : for l, data in group. iteritems ( ) : timeline [ gl ] [ l ] = ( [ ], [ ] ) for t, v in sorted ( data. iteritems ( ), key = lambda x : x [ 0 ] ) : timeline [ gl ] [ l ] [ 0 ]. append ( t ) timeline [ gl ] [ l ] [ 1 ]... | [
-0.03028239868581295,
-0.0908786803483963,
0.5676814913749695,
-1.5325175523757935,
-0.9183578491210938,
-0.30156996846199036,
-0.26048851013183594,
-0.18567043542861938,
-0.5851361751556396,
0.5328096747398376,
-1.1338456869125366,
0.017575256526470184,
0.2737329602241516,
0.2359565496444... |
def _ cache _ write ( cls, user _ hash : str, data : dict ) : cloud _ storage. put _ object ( user _ hash, json. dumps ( data ) ) | [
-0.5408135056495667,
-0.27342289686203003,
0.28090688586235046,
-0.09155071526765823,
0.18731971085071564,
0.47217869758605957,
-0.6064976453781128,
0.1700514554977417,
-0.7367748618125916,
0.37396439909935,
-1.0614899396896362,
0.44821566343307495,
0.1921740472316742,
-0.5648790597915649,... |
def getcompositefilternames ( self ) : return [ cf. getname ( ) for cf in self. _ compositefilters ] | [
-0.9152288436889648,
-0.7213839888572693,
0.6804115176200867,
0.4237958788871765,
0.4277130663394928,
0.4024628698825836,
0.22503988444805145,
-0.8309552073478699,
-0.01864660158753395,
0.058339040726423264,
-1.307496428489685,
-0.031938161700963974,
-0.307287335395813,
0.6301066875457764,... |
def exec _ cmd ( cmd, throw _ on _ error = true, env = none, stream _ output = false, cwd = none, cmd _ stdin = none, * * kwargs ) : cmd _ env = os. environ. copy ( ) if env : cmd _ env. update ( env ) if stream _ output : child = subprocess. popen ( cmd, env = cmd _ env, cwd = cwd, universal _ newlines = true, stdin =... | [
0.5275287628173828,
-0.7683433294296265,
1.1824095249176025,
0.4168507754802704,
-1.122684121131897,
0.00513041066005826,
0.04739469662308693,
0.21184110641479492,
-0.3678358793258667,
0.03966548666357994,
0.21150806546211243,
0.019553562626242638,
0.34630605578422546,
1.1134978532791138,
... |
async def set _ scheduled _ charging ( self, enable : bool, time : int ) - > none : data = await self. _ send _ command ( " scheduled _ charging ", enable = enable, time = time ) if data and data [ " response " ] [ " result " ] is true : if enable : mode _ str = " startat " else : mode _ str = " off " time = none param... | [
-0.5772332549095154,
-0.4138648509979248,
0.7850576639175415,
0.3882894814014435,
0.1685994565486908,
0.05550123751163483,
-1.2910218238830566,
0.5758469700813293,
-0.41471195220947266,
0.369053453207016,
-0.5751135349273682,
0.4072119891643524,
-0.6521570086479187,
0.35635411739349365,
... |
def extract _ snv _ positions ( name2snptables, name2scaffs ) : # loop once to get all locations scaff2all = { } for name, ssdb in name2snptables. items ( ) : if len ( ssdb ) = = 0 : continue for scaff, sdb in ssdb. groupby ('scaffold') : if scaff not in name2scaffs [ name ] : continue if scaff in scaff2all : scaff2all... | [
-0.0033119916915893555,
-0.5253913402557373,
0.8368114829063416,
0.3146778643131256,
-1.0175771713256836,
0.05985894799232483,
0.5890508890151978,
0.08363170176744461,
0.29317179322242737,
-0.0015805753646418452,
-0.4979154169559479,
-0.3244341015815735,
0.0660487487912178,
0.7385998964309... |
def _ format _ args _ and _ kwargs ( args, kwargs ) : # use reprlib to limit the length of the output items = [ ] if args : items. extend ( reprlib. repr ( arg ) for arg in args ) if kwargs : items. extend ('{ } = { } '. format ( k, reprlib. repr ( v ) ) for k, v in kwargs. items ( ) ) return'('+ ', '. join ( items ) +... | [
0.04356098175048828,
-0.5427719354629517,
0.3819929361343384,
-1.482383131980896,
-0.4980158507823944,
-0.5836792588233948,
-1.5129858255386353,
-0.02393125183880329,
0.19515658915042877,
0.8983157873153687,
0.9061869978904724,
0.4848625659942627,
-0.12419120222330093,
0.5579715371131897,
... |
def center ( rects, n = 1 ) : centers = [ ] for x1, y1, x2, y2 in rects : x = int ( ( x1 + x2 ) / 2. ) y = int ( ( y1 + y2 ) / 2. ) area = ( x2 - x1 ) * ( y2 - y1 ) centers. append ( [ x, y, area / n ] ) return centers | [
-0.3501163721084595,
-0.5980129241943359,
0.5117594003677368,
0.10709640383720398,
-0.06547226756811142,
-0.5213606953620911,
0.24079644680023193,
-0.7189629673957825,
0.9972791075706482,
0.5906240940093994,
-0.3814879059791565,
-0.8414767384529114,
0.44785043597221375,
0.7734421491622925,... |
def test _ fit _ score ( ) : out = fit _ score ( case ='test ', tr _ list = [ ], est _ name ='ols ', est = ols ( ), params = ( 0, {'offset': 2 } ), x = x, y = y, idx = ( ( 0, 5 ), ( 5, 10 ) ), scorer = make _ scorer ( mape, greater _ is _ better = false ), error _ score = none ) assert out [ 0 ] = ='test'assert out [ 1... | [
-0.5144731998443604,
-0.21685251593589783,
0.7415202260017395,
0.021878289058804512,
0.45951777696609497,
0.5268548130989075,
0.29020461440086365,
-0.6546902060508728,
-0.08888836950063705,
0.005125951487571001,
-0.46095767617225647,
0.19797948002815247,
0.3191428482532501,
-0.344648301601... |
def test _ create _ team ( api _ client, user _ factory ) : # jim is a staff user on the site password = " password " user = user _ factory ( is _ staff = true, password = password ) # he logs in api _ client. log _ in ( user. email, password ) # now he creates a new team year = 2018 response = api _ client. mutate ( c... | [
-0.02566666156053543,
0.12423472851514816,
0.16663451492786407,
0.7937920689582825,
0.9052754640579224,
0.6479892730712891,
-0.3521513342857361,
-0.5065222382545471,
-0.004506582394242287,
-0.5255481600761414,
-0.9133284091949463,
-0.04129839688539505,
0.766226053237915,
-0.149228781461715... |
def _ _ init _ _ ( self, fpath, name ) : self. fpath = fpath self. name = name | [
0.35323700308799744,
-1.3413838148117065,
0.44090622663497925,
0.09247063100337982,
-1.077588677406311,
0.16060709953308105,
-0.1654483824968338,
0.6923743486404419,
-0.7107473015785217,
0.14950570464134216,
-0.5962249040603638,
0.15163901448249817,
0.8863909840583801,
0.08934688568115234,... |
def node _ list _ new ( node : list, name, list ) - > none : node. append ( [ " node _ list ", name, list ] ) | [
-0.5620432496070862,
0.6742086410522461,
0.44996172189712524,
0.06633065640926361,
0.5047499537467957,
-0.24349921941757202,
-1.6078760623931885,
0.6921247839927673,
-0.11155813187360764,
0.7559518814086914,
-1.807259440422058,
0.4540252685546875,
0.9059524536132812,
1.1004981994628906,
... |
def freq ( l ) : count = { } n = 5 for x in l : s = str ( x ) if count. has _ key ( s ) : count [ s ] + = 1 else : count [ s ] = 1 # this will iterate through dictionary, return n highest # values as ( key, value ) tuples. top = nlargest ( n, count. iteritems ( ), itemgetter ( 1 ) ) return top | [
-0.6075406074523926,
0.5742272734642029,
0.29767054319381714,
-0.437195360660553,
-1.243280291557312,
-1.004960060119629,
0.077187679708004,
-0.20261786878108978,
-0.431117981672287,
-0.6755741238594055,
-0.5726686716079712,
-1.239728569984436,
0.3702816367149353,
1.0506731271743774,
0.4... |
def primary _ key ( self ) - > str : return pulumi. get ( self, " primary _ key " ) | [
1.202721357345581,
0.0027544498443603516,
0.3645212948322296,
0.49783244729042053,
1.2278273105621338,
1.1589051485061646,
-0.23670461773872375,
-0.048115987330675125,
0.7227965593338013,
0.37455785274505615,
1.1598029136657715,
0.46477848291397095,
0.2900543510913849,
-1.1794832944869995,... |
def write _ individual _ frame _ to _ file ( is _ frame _ retrieved : bool, frame : np. ndarray, label, frame _ idx, output _ path = config. frames _ output _ path ) : font _ scale, font = 1, cv2. font _ hershey _ complex rectangle _ bgr _ black = ( 0, 0, 0 ) color _ white _ bgr = ( 255, 255, 255 ) if is _ frame _ retr... | [
-0.8040279746055603,
-0.0985688865184784,
0.781387209892273,
0.08608688414096832,
0.43743154406547546,
-0.18107105791568756,
0.543708860874176,
0.18302904069423676,
0.40591031312942505,
0.048627082258462906,
0.6179145574569702,
0.2277209460735321,
0.4567379951477051,
0.4145401418209076,
... |
def view _ as _ json ( context ) : view = context ['view'] return simplejson. dumps ( view. as _ json ( context ) ) | [
-1.0496834516525269,
-1.2360832691192627,
0.2682359218597412,
-1.0297764539718628,
-1.0294950008392334,
-0.999829888343811,
-0.429772287607193,
-0.8862779140472412,
1.2690194845199585,
-0.9218300580978394,
-0.4646155834197998,
1.2984050512313843,
0.8955187201499939,
-0.4802077114582062,
... |
def sendsharetonode ( self, share, node, index ) : if type ( share )! = str : raise typeerror ( " invalid share : str expected " ) elif type ( node ) not in [ list, tuple ] : raise typeerror ( " invalid node : list or tuple expected " ) elif type ( index ) not in [ int, long ] : raise typeerror ( " invalid index : int ... | [
-1.01887047290802,
0.21654802560806274,
0.5315426588058472,
-0.20912456512451172,
0.9195672273635864,
0.020742934197187424,
0.5077729225158691,
-0.7513700127601624,
-0.4517693519592285,
0.607757568359375,
0.019915757700800896,
1.311191439628601,
-0.8227487802505493,
-0.6511743664741516,
... |
def sanitize _ event _ payload ( payload ) : location = payload. pop ( " location ", none ) address _ vis = payload. pop ( " address _ visibility ", none ) sanitized = { k : v for k, v in payload. items ( ) if k in _ _ ma _ field _ whitelist } if address _ vis = = public _ visibility : sanitized [ " location " ] = loca... | [
0.1065036728978157,
-0.46917054057121277,
0.659277617931366,
-1.6564658880233765,
-0.7532439231872559,
-0.3954439163208008,
-0.7276666164398193,
0.9705304503440857,
0.4336906969547272,
0.6424031257629395,
-0.11121983081102371,
0.11224832385778427,
0.5710102915763855,
0.4177801311016083,
... |
def results _ counter ( self, value ) : self. _ results _ counter = value | [
0.12055497616529465,
0.19091282784938812,
0.3494199216365814,
-0.7168376445770264,
0.34975817799568176,
0.9861223697662354,
0.7307398319244385,
-0.6384605765342712,
-0.8443681001663208,
-1.205082893371582,
-0.9113242030143738,
-0.8879735469818115,
0.4280531108379364,
0.7827625274658203,
... |
def getfeatures ( self, url, fields, querytext, usecustomheaders = false, additionalparameters = false ) : # get a list of all the features by using the objectids which have no limit, then break into chunks chunks = self. getoidsfromservice ( url, querytext, usecustomheaders = usecustomheaders ) # initialize a master l... | [
-0.6626293659210205,
-0.3508070409297943,
0.8472579717636108,
0.0671900063753128,
0.0015704940306022763,
-0.2547786831855774,
-0.28982633352279663,
-0.31049200892448425,
-0.35157984495162964,
0.004543437622487545,
-0.6503100991249084,
0.5494256019592285,
-0.9352326393127441,
0.378263622522... |
def manipulate _ variables ( self, owner, method : str, * params ) : if not self. is _ owned _ by ( owner ) : raise valueerror ( " position doesn't belong to the passed owner " ) return getattr ( owner, method ) ( self. _ _ variables, * params ) | [
-1.1582051515579224,
0.1788565218448639,
0.4293465316295624,
-0.24501214921474457,
0.24002352356910706,
-1.0232367515563965,
0.12869149446487427,
-0.8878852725028992,
-0.4650481939315796,
0.157120943069458,
0.48569703102111816,
0.10071384906768799,
-0.07669800519943237,
-0.1557434648275375... |
def setzeroes ( self, matrix : list [ list [ int ] ] ) - > none : if not matrix or not matrix [ 0 ] : return m = len ( matrix ) n = len ( matrix [ 0 ] ) for row in range ( m ) : found _ zero = false for col in range ( n ) : if matrix [ row ] [ col ] = = 0 : found _ zero = true break if found _ zero : for col in range (... | [
0.1328093707561493,
0.1571691632270813,
0.7439588308334351,
0.22017742693424225,
0.2320030927658081,
-0.03829057514667511,
0.18202798068523407,
0.4709123969078064,
-0.4276764690876007,
0.38106971979141235,
0.08873383700847626,
-0.16419988870620728,
-0.591498076915741,
2.077286958694458,
... |
def sortparentheses ( self, couplevec ) : coupletodrop = list ( ) for i, couple in enumerate ( couplevec ) : for couple2 in couplevec : if couple [ 0 ] [ 0 ] > couple2 [ 0 ] [ 0 ] and couple [ 1 ] < couple2 [ 1 ] : coupletodrop. append ( i ) for i in coupletodrop : del couplevec [ i ] return couplevec | [
-1.3144053220748901,
-0.9581970572471619,
0.9585281610488892,
-0.246353879570961,
-0.9339197874069214,
0.6000497341156006,
0.9484609961509705,
-0.9354912638664246,
-0.3420093059539795,
0.3089502453804016,
-0.19241729378700256,
0.3056246042251587,
-0.8752638697624207,
0.34195324778556824,
... |
def get _ initial _ tiles ( self ) : initial _ tiles = { } initial _ tiles [ up ] = [ ( 0, col ) for col in range ( self. _ width ) ] initial _ tiles [ down ] = [ ( self. _ height - 1, col ) for col in range ( self. _ width ) ] initial _ tiles [ left ] = [ ( row, 0 ) for row in range ( self. _ height ) ] initial _ tile... | [
-0.5155798196792603,
-0.3436161279678345,
0.39172181487083435,
-0.7116695642471313,
-0.5692992210388184,
-0.15113286674022675,
0.8401876091957092,
0.26100486516952515,
-0.30315160751342773,
-0.025510627776384354,
-1.612228274345398,
-0.6899294853210449,
-0.18546631932258606,
1.313397884368... |
def _ float _ feature ( value ) : return tf. train. feature ( float _ list = tf. train. floatlist ( value = np. atleast _ 1d ( value ) ) ) | [
0.4211668074131012,
0.12477720528841019,
0.3836745321750641,
-0.02172897197306156,
0.19245551526546478,
-0.2561376392841339,
0.3770866394042969,
-0.2950385808944702,
-0.4460389316082001,
-0.6437902450561523,
-1.0211812257766724,
0.122867152094841,
-0.13400644063949585,
0.19021104276180267,... |
def run _ example ( ) : num _ die _ sides = 6 hand = ( 1, 1, 1, 5, 6 ) hand _ score, hold = strategy ( hand, num _ die _ sides ) print " best strategy for hand ", hand, " is to hold ", hold, " with expected score ", hand _ score | [
0.31470030546188354,
-0.272701621055603,
0.44089505076408386,
0.984196126461029,
0.43193793296813965,
0.5057717561721802,
-0.10687661170959473,
0.3176506757736206,
0.005902847275137901,
-0.41796979308128357,
0.11615012586116791,
0.04312460869550705,
1.126771330833435,
0.02685861848294735,
... |
def getresttoken ( self, username, password, tokenurl ) : # first step is to authenticate with rest service and get a token for future calls # this has been modified to take a hosted agol service, or a private poral service # first check if token is a arcgis style or portal style tokenstyle = " arcgis " # tokenurl = " ... | [
-0.6822378635406494,
-0.5565629005432129,
0.8983745574951172,
0.19932861626148224,
-0.34327176213264465,
-0.2189919799566269,
-0.38655179738998413,
0.02035360038280487,
0.19158980250358582,
-0.8209201693534851,
-0.5705382823944092,
1.1320103406906128,
-0.6264580488204956,
-0.12660868465900... |
def dbs _ to _ migrate ( self ) - > optional [ sequence [ str ] ] : return pulumi. get ( self, " dbs _ to _ migrate " ) | [
-1.0228095054626465,
1.201529622077942,
0.8469448685646057,
0.5635805130004883,
1.3945146799087524,
0.9652432203292847,
-0.5470699667930603,
-0.28091445565223694,
1.1690871715545654,
0.6391886472702026,
-1.8798667192459106,
0.43704885244369507,
-0.25197938084602356,
-0.8881328105926514,
... |
def test _ atomic _ any _ uri _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 5 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 5. xsd ", instance = " nistdata... | [
-0.6685876846313477,
-0.906091034412384,
0.45318570733070374,
0.7115724682807922,
-0.24812759459018707,
-0.4273536503314972,
0.3504473865032196,
-0.7841793298721313,
-0.11040715128183365,
-0.044549502432346344,
-0.039137039333581924,
-0.5027424693107605,
-0.9213151931762695,
0.274705260992... |
def argmax ( seq, fn ) : return argmin ( seq, lambda x : - fn ( x ) ) | [
-0.28802552819252014,
-0.8333054780960083,
0.20462016761302948,
0.679168701171875,
-0.33478647470474243,
-0.14496952295303345,
-1.3982837200164795,
1.6848541498184204,
-0.18463388085365295,
0.6058404445648193,
-0.009329418651759624,
0.4416845440864563,
0.48188456892967224,
-0.3589877486228... |
def add _ multiple _ options ( self, key, values, sep = none, template = " in _ file _ % 02i " ) : kwargs = { } for file _ key, value in self. _ get _ new _ kwarg _ keys ( values, template ) : self. add _ option ( key, " % % ( % s ) s " % ( file _ key, ), sep = sep, fixed = true ) kwargs [ file _ key ] = value self. se... | [
-0.5635086894035339,
0.18322597444057465,
0.5955845713615417,
0.19660989940166473,
-0.012451769784092903,
-0.09886250644922256,
-0.7544409036636353,
-0.049538593739271164,
-1.0775089263916016,
0.12080526351928711,
-0.9237542152404785,
-1.2366560697555542,
-0.17960476875305176,
1.4962720870... |
def create _ context _ for _ election _ end _ date _ html ( context, election _ end _ date = none ) : context. update ( { input _ end _ date _ _ name : election _ json _ key _ _ end _ date, input _ end _ date _ _ value : election _ end _ date. strftime ( date _ format ) if type ( election _ end _ date ) is datetime. da... | [
-1.7269940376281738,
-0.34650272130966187,
0.4699050486087799,
-0.2940216362476349,
-0.4251602590084076,
0.4282605051994324,
-0.8652921915054321,
0.023734843358397484,
0.2530176341533661,
0.8461337089538574,
0.4199674725532532,
0.39712971448898315,
0.3768589496612549,
0.6351134777069092,
... |
def main ( arguments = none ) : # setup the command - line util settings su = tools ( arguments = arguments, docstring = _ _ doc _ _, loglevel = " debug ", options _ first = false ) arguments, settings, log, dbconn = su. setup ( ) # tab completion for raw _ input readline. set _ completer _ delims ('\ t \ n ;') readlin... | [
0.32176196575164795,
0.29304224252700806,
1.0776233673095703,
0.06309530138969421,
0.5351973176002502,
-0.5265329480171204,
-0.12204726040363312,
-0.13177986443042755,
-0.8338117003440857,
0.19294676184654236,
-0.4950193464756012,
0.4033341109752655,
0.26870423555374146,
0.8795961737632751... |
def test _ atomic _ language _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - pattern - 4. xsd ", instance = " nistdata / atomic ... | [
-0.07043272256851196,
-0.008249951526522636,
0.4512873888015747,
0.8095037341117859,
-0.26340287923812866,
0.5653266906738281,
-0.021266890689730644,
0.19231075048446655,
0.25083065032958984,
0.9596288204193115,
-0.05092018470168114,
-0.43692633509635925,
-0.3514311909675598,
-0.6245051622... |
def big2little ( data ) : d = [ ] for d _ in data : d. append ( d _ [ 3 ] ) d. append ( d _ [ 2 ] ) d. append ( d _ [ 1 ] ) d. append ( d _ [ 0 ] ) return bytes ( d ) | [
-0.2798495590686798,
0.5504443049430847,
0.6858492493629456,
-1.8038357496261597,
0.08602315932512283,
0.32646045088768005,
-0.7578402161598206,
-0.05378655344247818,
0.6768145561218262,
-0.23586727678775787,
-1.4310500621795654,
0.647385835647583,
-0.27151966094970703,
-0.1527380049228668... |
def set _ local _ rotation ( self, rot ) : # todo : complete parameter documentation self. local _ rotation = _ convert2tquat ( rot ) | [
0.03161381185054779,
-0.15153425931930542,
0.12813225388526917,
-0.9154104590415955,
0.13305160403251648,
-0.47182732820510864,
1.1721395254135132,
-0.538276731967926,
0.21873842179775238,
-0.40932217240333557,
-1.0429201126098633,
0.055442627519369125,
-0.44972744584083557,
-0.47198918461... |
def get _ true _ labels ( a ) : # first we want to get the nodes file _ path3 = '.. / data / terroristrel / terroristrel _ colleague. nodes'file _ path4 = '.. / data / terroristrel / terroristrel _ congregate. nodes'file _ path5 = '.. / data / terroristrel / terroristrel _ contact. nodes'file _ path6 = '.. / data / ter... | [
0.420465350151062,
-0.16558462381362915,
0.6980254054069519,
-1.1853923797607422,
0.2089933156967163,
0.33848103880882263,
0.08052884042263031,
0.2823294699192047,
-0.9475523829460144,
0.5010710954666138,
0.7960275411605835,
-0.5716574192047119,
0.37255561351776123,
-0.25381767749786377,
... |
def test _ atomic _ language _ min _ length _ 1 _ nistxml _ sv _ iv _ atomic _ language _ min _ length _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - minlength - 2. xsd ", instance = " nistda... | [
0.14660657942295074,
-0.9128699898719788,
0.4310007691383362,
0.7227296233177185,
-0.6349214911460876,
0.0029250963125377893,
-0.3427504599094391,
-0.2020631581544876,
0.14764650166034698,
0.3889126479625702,
-0.3969671130180359,
0.500597357749939,
0.02998999133706093,
0.15449553728103638,... |
def get _ artifact _ detection _ info ( subject, experiment, session, paths ) : finder = cmlreaders. pathfinder ( subject, experiment, session, rootdir = paths. root ) with open ( finder. find ('event _ log') ) as event _ log _ file : event _ log = json. load ( event _ log _ file ) event _ df = pd. dataframe. from _ re... | [
0.4470643997192383,
-0.5935767889022827,
0.5697235465049744,
-0.17598117887973785,
-0.19564209878444672,
-0.670870840549469,
0.8332280516624451,
-0.005932205822318792,
-0.4607202410697937,
0.4430250823497772,
-0.0370897613465786,
-0.11562143266201019,
1.0090713500976562,
-0.074985966086387... |
def alias ( _ id ) : def _ register _ elt ( elt ) : " " " register a specific element in the lookup cache. " " " _ _ lookup _ cache [ _ id ] = elt return elt return _ register _ elt | [
-0.8149914145469666,
0.07648449391126633,
0.34870508313179016,
-0.6057834625244141,
-0.5405258536338806,
0.07604815810918808,
-0.5496944189071655,
0.8606404066085815,
0.5630496144294739,
0.5083033442497253,
-1.1904957294464111,
0.5534753203392029,
0.7830759882926941,
-0.18603183329105377,
... |
def was _ published _ recently ( self ) : now = timezone. now ( ) return now - datetime. timedelta ( days = 1 ) < = self. fecha _ pedido < = now | [
0.3362900912761688,
0.29268693923950195,
0.31103187799453735,
0.1624969244003296,
-0.727907657623291,
0.14969833195209503,
-0.46791237592697144,
0.06272124499082565,
-0.06633143126964569,
-0.12656673789024353,
0.19572575390338898,
0.06067274883389473,
-0.5520060658454895,
0.797450065612793... |
def onrequestservice ( self, * args, * * kwargs ) : return self. cls ( * args, * * kwargs ) | [
-0.4716300964355469,
-0.7761505246162415,
0.600707471370697,
-0.05070946738123894,
-0.1277979016304016,
-0.11948177218437195,
-1.5307189226150513,
-0.8022839426994324,
0.004282674286514521,
-1.4119699001312256,
0.8899915814399719,
0.4849955439567566,
-0.968399167060852,
0.07844123989343643... |
def test _ invalid _ string ( self ) : with self. assertraises ( vol. invalid ) : util. string ( none ) | [
1.1858075857162476,
-0.4161495566368103,
0.13955119252204895,
-0.2748258411884308,
-0.051896389573812485,
0.29413822293281555,
-0.2837817072868347,
0.12074588239192963,
0.2471669614315033,
-0.910641610622406,
0.31218135356903076,
0.319654643535614,
-0.31994977593421936,
-0.2864431440830230... |
def extract _ html _ lang _ tag ( input _, accepted _ langs = known _ lang _ tags ) : if isinstance ( input _, bs4. beautifulsoup ) : bs = input _ elif isinstance ( input _, basestring ) : bs = parse _ html ( input _ ) else : raise valueerror ( " unknown input _ - expected str or bs4. beautifulsoup " " got'% s'" % ( ty... | [
0.17569811642169952,
0.6633622646331787,
0.4477247893810272,
0.5282403230667114,
-1.2820795774459839,
-0.3589777648448944,
-0.06419800221920013,
0.04453108832240105,
-0.015397876501083374,
-0.1581854671239853,
0.13508161902427673,
-0.18551427125930786,
0.10745085775852203,
0.59794569015502... |
def dec2bin ( number : int ) - > str : if number < 0 : raise valueerror ( " must be a positive integer " ) # remainder is the digit digit = number % 2 # quotient for next recursion next = number / / 2 if number > 1 : return dec2bin ( next ) + str ( digit ) else : return str ( digit ) | [
-0.6452561020851135,
0.7848740816116333,
0.5708625316619873,
0.653412938117981,
-0.5567194223403931,
0.7966503500938416,
0.02020435221493244,
-1.0763769149780273,
0.2514435052871704,
-0.8545240759849548,
0.6868579983711243,
0.39236441254615784,
0.13676413893699646,
0.8908851146697998,
1.... |
def detect ( self, threshold = none, xval = none, yval = none ) : if threshold is none : eps = self. learn _ best _ threshold ( xval, yval ) else : eps = threshold return self. p < eps | [
0.373410165309906,
-0.18714840710163116,
0.5018705725669861,
1.1977609395980835,
-0.1366645097732544,
-0.3193305730819702,
-1.2638448476791382,
-0.003708885284140706,
-0.4968625605106354,
-1.2617652416229248,
-0.187362939119339,
0.33710339665412903,
0.40413108468055725,
0.17198079824447632... |
def assign _ value ( values, box, value ) : # don't waste memory appending actions that don't actually change any values if values [ box ] = = value : return values values [ box ] = value if len ( value ) = = 1 : assignments. append ( values. copy ( ) ) return values | [
-1.1480364799499512,
-0.1580354869365692,
0.33953070640563965,
0.7284551858901978,
0.3463127911090851,
-0.4782325029373169,
-0.45747050642967224,
-0.3313388526439667,
0.447834312915802,
0.2149120569229126,
0.1750793308019638,
0.6285289525985718,
0.014973364770412445,
1.1444079875946045,
... |
def word _ features ( table ) : features = numpy. zeros ( ( len ( table ), 620 ), dtype ='float32') keys = table. keys ( ) for i in range ( len ( table ) ) : f = table [ keys [ i ] ] features [ i ] = f / norm ( f ) return features | [
-0.30743181705474854,
-0.11321885883808136,
0.3418654799461365,
0.2194175273180008,
0.010951322503387928,
-0.7118221521377563,
0.2627832591533661,
0.8050034046173096,
-0.16977328062057495,
1.0416028499603271,
-0.5564672946929932,
-0.18869400024414062,
-0.6329967379570007,
0.662498056888580... |
def upload _ pairs ( namespace, workspace, pairs ) : os. system ('mkdir - p pairs') filename = '. / pairs / fc _ upload _ pairs. txt'pairs. to _ csv ( filename,'\ t ', index = false ) res = upload _ entities _ from _ tsv ( namespace, workspace, filename ) return res | [
-1.3915756940841675,
0.16517294943332672,
0.5537501573562622,
-0.21690703928470612,
-0.1617615520954132,
0.17269279062747955,
0.3918720483779907,
-0.1725786328315735,
-0.43962612748146057,
0.5851702094078064,
-0.01973928138613701,
-0.44630756974220276,
-0.5149579644203186,
0.53831541538238... |
def test _ fail _ addresses _ empty ( self ) : self. assertfiltererrors ( {'addresses': [ ], }, {'addresses': [ f. required. code _ empty ], }, ) | [
-0.6157008409500122,
1.1366550922393799,
0.2278817594051361,
-1.0807205438613892,
0.7038959860801697,
0.08150586485862732,
-0.42166027426719666,
-0.41643026471138,
0.02922729030251503,
0.39756250381469727,
-0.6674153208732605,
0.570749044418335,
-0.05164063721895218,
0.7685445547103882,
... |
def currency ( self ) : return self. _ currency | [
-0.185969740152359,
-0.5675153732299805,
0.2088492512702942,
0.3592269718647003,
0.021355899050831795,
0.6252794861793518,
1.2728403806686401,
-0.010589446872472763,
0.44498488306999207,
-0.3149097263813019,
0.7473592758178711,
-0.3121379613876343,
-0.4181649386882782,
-0.697571873664856,
... |
def add _ to _ queue ( ) : data = json. loads ( request. data ) pos = persistence. append _ to _ queue ( data ['id'] ) return jsonify ( {'queue _ position': pos } ) | [
-1.310965895652771,
-0.5132648348808289,
0.5939726233482361,
-0.49587517976760864,
0.5685426592826843,
-0.4832867980003357,
-1.4362232685089111,
-0.37216368317604065,
-0.1965324878692627,
0.0822892040014267,
-0.3576834201812744,
-0.5055447816848755,
-0.06942377239465714,
0.1016248390078544... |
def write _ aptus ( self, pth ) : aptst = aptusstate ( self. compute ) aptst. write ( pth ) | [
-0.4220723807811737,
-0.3393392562866211,
-0.08162309229373932,
-0.7634308934211731,
0.03341808170080185,
0.9125433564186096,
0.12721990048885345,
0.20928530395030975,
0.27887624502182007,
-0.5224437713623047,
-0.5474276542663574,
0.6969020366668701,
0.269479900598526,
-0.3651193082332611,... |
def remove ( self, i ) : self. individuals. remove ( i ) | [
-1.1554580926895142,
-0.1583443284034729,
0.1937175691127777,
-0.6319987177848816,
-0.5989073514938354,
1.3050851821899414,
0.40867191553115845,
0.7903046011924744,
-0.5984642505645752,
0.309109628200531,
-1.1583232879638672,
0.0368618369102478,
-1.6011319160461426,
-0.4832212030887604,
... |
def test _ fail _ threshold _ float ( self ) : self. assertfiltererrors ( { # even with an empty fpart, floats are not accepted.'threshold': 86. 0,'addresses': [ address ( self. trytes1 ) ], }, {'threshold': [ f. type. code _ wrong _ type ], }, ) | [
0.5534307956695557,
0.8938469886779785,
0.34839367866516113,
-0.025290200486779213,
0.2775374948978424,
0.4252208173274994,
-0.1356448382139206,
-0.5954307317733765,
-1.3559327125549316,
-0.5096611976623535,
-0.323773056268692,
-0.17572975158691406,
-0.4001108705997467,
1.0958216190338135,... |
def locsequal ( self, x0, y0, theta0, x1, y1, theta1, acceptxyerr = config [ " xyerr " ], acceptthetaerr = config [ " thetaerr " ] ) : self. logger. debug ( " checking if { } { } { } equals { } { } { } ". format ( x0, y0, theta0, x1, y1, theta1 ) ) self. logger. debug ( " acceptable error is { } for xy and { } for thet... | [
-0.8356326222419739,
-1.3976291418075562,
0.584372341632843,
-0.6301501989364624,
-0.8506266474723816,
1.0479021072387695,
-0.05795495957136154,
-0.056829534471035004,
-0.13966257870197296,
0.41272538900375366,
-0.19623138010501862,
0.49473607540130615,
-0.4043545722961426,
0.0319674797356... |
def _ api _ head ( self, url ) : try : data, headers = self. client. http _ request ( url, headers = {'private - token': self. _ get _ private _ token ( ), }, method ='head') return headers except httperror as e : if e. code = = 401 : raise authorizationerror ( ugettext ('the login or password is incorrect.') ) elif e.... | [
-2.303420305252075,
-0.01888648234307766,
0.9504464268684387,
0.14218248426914215,
-0.08869358152151108,
-0.42200854420661926,
-1.0254039764404297,
-0.9063962697982788,
0.1338108479976654,
1.1794496774673462,
0.25029394030570984,
1.1348451375961304,
-0.19257450103759766,
-1.175252914428711... |
def get _ exp _ table ( self, * * kwargs ) : table = get _ exp _ list _ df ( exp _ list = self. exp _ list, verbose = self. verbose, * * kwargs ) return table | [
0.2600749135017395,
-0.04883037135004997,
0.23346342146396637,
0.5992092490196228,
-0.04215589165687561,
-0.34845027327537537,
-0.026259759441018105,
0.8198379874229431,
-0.1503608077764511,
-0.21051710844039917,
0.21473750472068787,
0.8134989142417908,
-0.7625699043273926,
0.0835977420210... |
def reload ( cls, clear = false ) : logger. info ( " reloading. " ) libs = cls. _ _ libs if not clear else [ ] shim = cls. _ _ shim if not clear else [ ] if clear : cls. _ _ libs. clear ( ) cls. _ _ shim. clear ( ) cls. _ _ config _ comm = none cls. _ _ execution _ comm = none cls. _ _ safe _ execution _ comm = none cl... | [
-0.9417818188667297,
0.2450796663761139,
0.4886625409126282,
0.421597421169281,
0.4480258822441101,
-0.015995347872376442,
0.029200177639722824,
-0.11453749984502792,
0.643347978591919,
-0.421173095703125,
-0.22213399410247803,
0.6722546219825745,
-0.5787550210952759,
0.46292728185653687,
... |
def http _ client ( self ) : return self. _ client | [
-0.027572838589549065,
-0.859390139579773,
0.10162274539470673,
-0.2580112814903259,
0.0359509103000164,
0.8112478852272034,
0.6782447099685669,
-0.6070743203163147,
-0.2536889314651489,
-1.2254540920257568,
0.4286947250366211,
1.024423360824585,
-0.42630475759506226,
-1.7851243019104004,
... |
def remote _ address ( self ) - > str : return self. _ remote _ address | [
0.6357331275939941,
-1.1611204147338867,
0.5933085680007935,
-0.5098125338554382,
-0.25860223174095154,
1.8100005388259888,
-0.3629453778266907,
0.3576570451259613,
0.5211869478225708,
-0.36664941906929016,
-0.8422719240188599,
1.6787461042404175,
-0.9379786252975464,
-1.6945384740829468,
... |
def gen _ all _ holds ( hand ) : temp = set ( [ ( ) ] ) for dlugosc _ podzbioru in range ( len ( hand ) + 1 ) : outcomes = set ( range ( len ( hand ) ) ) wartosci _ l = gen _ all _ holds _ len ( hand, dlugosc _ podzbioru, outcomes ) for tupla in wartosci _ l : temp. add ( tupla ) tupla _ pusta = tuple ( ) temp. add ( t... | [
-0.7641278505325317,
0.4244104325771332,
0.6620010733604431,
0.13814491033554077,
0.17901620268821716,
1.2252064943313599,
0.4103972315788269,
0.3186872601509094,
-0.39465317130088806,
-1.032905101776123,
-0.450431227684021,
-0.6161330938339233,
-0.4774864614009857,
0.2595967948436737,
0... |
def publish _ message ( msg ) : global config data = request. get _ json ( ) params = pika. connectionparameters ( ) params. host = config ['rabbithost'] params. port = config ['rabbitport'] # params. virtual _ host = " rabbit " params. credentials = pika. plaincredentials ( config ['rabbituser'], config ['rabbitpasswo... | [
-0.5406998991966248,
0.435448557138443,
0.7097675204277039,
0.4835330843925476,
0.10733085870742798,
-0.09942276030778885,
-0.7270598411560059,
0.1878940314054489,
-0.290287584066391,
0.8118814826011658,
0.07615432888269424,
0.25764259696006775,
-1.0695356130599976,
1.008415699005127,
-0... |
def contig _ to _ orf ( self ) : self. orf _ prodigal ( ) | [
0.10272304713726044,
-1.1071759462356567,
0.11805296689271927,
-0.16510352492332458,
0.7113518118858337,
-0.39082229137420654,
0.6974611878395081,
0.6185082197189331,
-0.9399189949035645,
0.5996456146240234,
0.4176720678806305,
0.06603381782770157,
-0.17905040085315704,
-0.5732427835464478... |
def primary _ connection _ string _ alias ( self ) - > str : return pulumi. get ( self, " primary _ connection _ string _ alias " ) | [
0.45901113748550415,
-1.5621284246444702,
0.7590039968490601,
-0.18779832124710083,
-0.28742000460624695,
1.3961524963378906,
-0.46780118346214294,
-0.01099464576691389,
0.201748788356781,
-0.15312406420707703,
0.8076303601264954,
0.8434925675392151,
0.2754480242729187,
-0.5942283868789673... |
async def mention ( self, ctx : commands. context ) - > none : guild = ctx. message. guild if not await self. config. guild ( guild ). mention ( ) : await self. config. guild ( guild ). mention. set ( true ) await ctx. send ( _ ( " i will mention on reply. " ) ) else : await self. config. guild ( guild ). mention. set ... | [
0.37250909209251404,
0.40495699644088745,
0.7958762645721436,
-0.37395182251930237,
0.9618303179740906,
0.7172228693962097,
-0.3274751901626587,
0.08862742781639099,
0.6103490591049194,
0.9029268622398376,
-0.21692252159118652,
1.648891568183899,
-1.4219775199890137,
0.8340228199958801,
... |
def get _ user _ rankings ( self, request ) : users = user. query ( user. total _ played > 0 ). fetch ( ) users = sorted ( users, key = lambda x : x. win _ percentage, reverse = true ) return userforms ( items = [ user. to _ form ( ) for user in users ] ) | [
-0.47803443670272827,
0.48584747314453125,
0.726729154586792,
0.5118003487586975,
-0.18580247461795807,
0.09601709991693497,
0.23806510865688324,
-0.8364952802658081,
-0.1408241093158722,
-0.33058708906173706,
0.050400204956531525,
-0.20228223502635956,
0.3210890293121338,
-0.5053787231445... |
def convert _ to _ new _ note ( context, logger = none ) : if logger is none : # called as upgrade step : define our own logger. logger = logging. getlogger ('ageliaco. rd2') # run the catalog. xml step as that may have defined new metadata # columns. we could instead add < depends name = " catalog " / > to # the regis... | [
-0.6998686790466309,
-0.4892757534980774,
0.6094517111778259,
0.09852120280265808,
0.6347058415412903,
-0.2359824776649475,
0.14305883646011353,
-0.896220326423645,
-0.507436215877533,
0.6632523536682129,
-0.6706057190895081,
0.6012493371963501,
0.005436192732304335,
-0.11446264386177063,
... |
def _ client _ properties ( self ) - > dict : return {'product': product,'platform':'python % s'% platform. python _ version ( ),'capabilities': {'authentication _ failure _ close': true,'basic. nack': true,'connection. blocked': true,'consumer _ cancel _ notify': true,'publisher _ confirms': true },'information':'see ... | [
-0.5221067070960999,
-0.6751034259796143,
0.2863521873950958,
-0.6483751535415649,
-0.17885485291481018,
-0.09530240297317505,
0.08200027048587799,
-1.1433484554290771,
-0.4266531467437744,
0.4260486364364624,
-0.40116965770721436,
0.18903174996376038,
-0.6049889922142029,
-0.6204409599304... |
def cn _ applylensing ( self, g1, g2, mu ) : depr ('applylensing ', 1. 1,'obj = obj. lens ( g1, g2, mu )') new _ obj = self. copy ( ). lens ( g1, g2, mu ) self. _ profile = new _ obj. _ profile self. _ profile _ for _ stored = none # reset the stored profile as it is no longer up - to - date self. _ _ class _ _ = new _... | [
0.4630376696586609,
-0.9409129023551941,
0.4706360399723053,
0.19095617532730103,
-0.36933252215385437,
0.6077585220336914,
-0.050191909074783325,
-0.6211068630218506,
0.6843566298484802,
-0.1728581041097641,
-0.47777342796325684,
0.9912333488464355,
-0.398592472076416,
-0.2030101567506790... |
def _ _ init _ _ ( self, handler, board, images = false, sampling _ interval = 60 ) : self. _ handler = handler self. _ sampling _ interval = sampling _ interval self. _ images = images self. _ board = board self. _ thread _ list _ url ='http : / / a. 4cdn. org / { board } / threads. json '. format ( board = self. _ bo... | [
0.5954840183258057,
0.7577419877052307,
0.5874307155609131,
0.017014335840940475,
-0.4932325780391693,
0.3388136923313141,
0.38308441638946533,
-0.041390351951122284,
-0.4923821985721588,
-0.248843252658844,
-0.3704223036766052,
-0.3697560131549835,
-0.11741417646408081,
0.7457540035247803... |
def check _ backend ( ) - > bool : try : import pygatt # noqa : f401 # pylint : disable = unused - import return true except importerror : return false | [
0.42099398374557495,
0.4252619445323944,
0.5290244817733765,
-0.0889829620718956,
1.0385656356811523,
0.5672298669815063,
-0.37094616889953613,
-0.5857025384902954,
-0.8346826434135437,
0.585942804813385,
-0.1296735256910324,
-0.058966998010873795,
-0.1956128627061844,
-0.5561527013778687,... |
def convert _ to _ one _ list ( sample _ list ) : if not sample _ list : raise valueerror ('error. sample _ list is empty!') output _ list = [ ] for item in sample _ list : if isinstance ( item, list ) : # call this function on it and append its each value separately. # if it has more lists in it this function will cal... | [
-0.35533809661865234,
-0.19255758821964264,
0.7107002139091492,
1.7576371431350708,
0.8205738067626953,
-0.21647922694683075,
0.3766869604587555,
0.22921191155910492,
1.4104968309402466,
0.17646285891532898,
-0.7790758013725281,
-0.2564938962459564,
-0.6406133770942688,
1.6174432039260864,... |
def cli _ format _ success ( message : str ) - > str : return " { } { } ". format ( colorama. fore. green + " success : " + colorama. style. reset _ all, message ) | [
0.5035216212272644,
-0.14487440884113312,
0.5122640132904053,
0.2662639915943146,
-0.009055684320628643,
0.5053575038909912,
-0.5140013098716736,
-0.33836764097213745,
-0.5151341557502747,
0.34838157892227173,
1.0946252346038818,
1.2829012870788574,
0.5284973382949829,
0.1269395351409912,
... |
def calc _ word _ value ( word ) : return sum ( [ letter _ scores [ letter ] for letter in word. upper ( ) ] ) pass | [
-0.4484030604362488,
-0.1101631298661232,
0.5358731746673584,
-0.0963142067193985,
-0.47204962372779846,
0.3559568524360657,
0.44117748737335205,
0.31687164306640625,
0.611976683139801,
0.5740508437156677,
-0.9815356135368347,
0.43827784061431885,
-0.599368691444397,
0.294808954000473,
-... |
def numcc ( adj ) : return csgraph. connected _ components ( a, directed = false ) [ 0 ] | [
0.5516298413276672,
-0.04422107711434364,
0.38005319237709045,
-0.08798457682132721,
-0.4080733060836792,
-0.5183725357055664,
1.4610159397125244,
0.32584550976753235,
0.7366658449172974,
-0.149748295545578,
0.3625732660293579,
-0.29743969440460205,
0.43435829877853394,
-0.0397515110671520... |
def close ( self ) : try : self. reset _ system ( ) self. running = false self. thread. join ( 1 ) self. core. close ( ) assert not self. thread. is _ alive ( ) except attributeerror : pass | [
0.02974092960357666,
-0.044186610728502274,
0.38639605045318604,
0.8151968717575073,
0.6460734605789185,
1.308801531791687,
0.7596699595451355,
-0.22300316393375397,
-0.519539475440979,
-0.661068320274353,
0.4097477197647095,
-0.009712893515825272,
-1.98968505859375,
0.5005125403404236,
... |
def test _ atomic _ base64 _ binary _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 4. xsd ", instance = "... | [
0.34006965160369873,
-0.43505775928497314,
0.3389226198196411,
0.7941493988037109,
0.015773413702845573,
-0.06732132285833359,
-0.024487866088747978,
-0.14676213264465332,
-0.38087719678878784,
0.4357261657714844,
-0.7156645655632019,
-0.19956731796264648,
-0.41031578183174133,
0.189174607... |
def _ _ eq _ _ ( self, other ) : if not isinstance ( other, putbusinesssettingsbusinesssettings ) : return false return self. to _ dict ( ) = = other. to _ dict ( ) | [
-1.4370810985565186,
0.8394404649734497,
0.5889357924461365,
-0.5302056074142456,
0.19902127981185913,
0.0829450711607933,
0.3219168186187744,
-1.0758730173110962,
-0.1270323395729065,
0.990482747554779,
-1.490574836730957,
0.24629783630371094,
-1.1961010694503784,
-0.004405590705573559,
... |
def cache ( ttl = 3600, key = none, prefix = none ) : def _ cache ( func ) : func _ name = func. _ _ name _ _ @ wraps ( func ) def _ _ cache ( * args, * * kwargs ) : if key : cache _ key = key else : cache _ key = " % s : % s : % s " % ( func _ name, args, kwargs ) if prefix : cache _ key = " % s : % s " % ( prefix, ca... | [
-0.6377957463264465,
0.06160508096218109,
0.8176706433296204,
-0.7209141254425049,
-0.9007315635681152,
-1.0605127811431885,
-0.9403746128082275,
0.4605202078819275,
0.5839898586273193,
0.8182231187820435,
0.19168730080127716,
-0.3265199363231659,
1.0638407468795776,
-0.34015849232673645,
... |
def does _ belongs _ to _ a _ eight _ pages _ layout ( text ) : return bool ( re. match ( r " item \ s? id ", text ) ) | [
0.6065579652786255,
-0.8773910403251648,
0.46063825488090515,
0.6782803535461426,
0.46646058559417725,
0.33144599199295044,
-0.16932642459869385,
0.18126897513866425,
1.1540555953979492,
-0.616336464881897,
-0.21457375586032867,
-1.0435060262680054,
-0.15873810648918152,
-0.967785894870758... |
def test _ email _ on _ overdue _ loan ( app, users, testdata, mocker ) : app. config. update ( celery _ task _ always _ eager = true ) mocker. patch ( " invenio _ app _ ils. records. api. patron. get _ patron ", return _ value = patron ( users [ " patron1 " ]. id ), ) loan _ data = testdata [ " loans " ] [ - 1 ] loan ... | [
0.5667136907577515,
0.4314093291759491,
0.6783005595207214,
-0.617412269115448,
0.1719537079334259,
0.36050647497177124,
0.19097042083740234,
-0.3268091380596161,
-0.23790986835956573,
-0.5241289138793945,
-0.05534808337688446,
0.9783132076263428,
-0.7624518871307373,
-0.1626996397972107,
... |
def state ( self ) - > str : return pulumi. get ( self, " state " ) | [
0.5664700269699097,
-0.17475159466266632,
0.382373571395874,
0.19304589927196503,
0.39117345213890076,
1.0269123315811157,
-0.18599219620227814,
-0.06172560527920723,
0.645910382270813,
0.2694370150566101,
0.44879207015037537,
0.3472558856010437,
0.4536016285419464,
-0.9870395660400391,
... |
def _ is _ vehicle _ hazard ( self, vehicle _ list, objects ) : ego _ vehicle _ location = self. _ vehicle _ location ego _ vehicle _ waypoint = self. get _ waypoint ( ego _ vehicle _ location ) if not ego _ vehicle _ waypoint : if not rospy. is _ shutdown ( ) : rospy. logwarn ( " could not get waypoint for ego vehicle... | [
-0.9035886526107788,
-1.7576632499694824,
0.7212705016136169,
-0.7915646433830261,
0.3198780417442322,
0.08683881163597107,
-0.5356137752532959,
0.13940148055553436,
0.3036681115627289,
1.1395453214645386,
-0.028995951637625694,
0.2956039011478424,
-0.2947750389575958,
0.02228431962430477,... |
def coef _ se ( clf, x, y ) : n = x. shape [ 0 ] x1 = np. hstack ( ( np. ones ( ( n, 1 ) ), np. matrix ( x ) ) ) se _ matrix = scipy. linalg. sqrtm ( metrics. mean _ squared _ error ( y, clf. predict ( x ) ) * np. linalg. inv ( x1. t * x1 ) ) return np. diagonal ( se _ matrix ) | [
-0.7114296555519104,
-0.22222799062728882,
0.4825228452682495,
0.04938866198062897,
0.35570549964904785,
-0.6710444092750549,
-0.05110704526305199,
-0.19808582961559296,
0.38638871908187866,
1.273573398590088,
-0.05551212280988693,
0.8488500118255615,
0.6249769330024719,
-0.513041138648986... |
def param _ init _ fflayer ( options, params, prefix ='ff ', nin = none, nout = none, ortho = true ) : if nin is none : nin = options ['dim _ proj'] if nout is none : nout = options ['dim _ proj'] params [ _ p ( prefix,'w') ] = norm _ weight ( nin, nout, ortho = ortho ) params [ _ p ( prefix,'b') ] = numpy. zeros ( ( n... | [
0.004612988326698542,
0.3198530077934265,
0.5403684973716736,
0.17312854528427124,
-0.06602377444505692,
-0.31007468700408936,
0.417755126953125,
-0.03059391863644123,
-0.24162237346172333,
0.11862297356128693,
0.2588874101638794,
0.763547420501709,
-0.3254542946815491,
1.181880235671997,
... |
def manageddependentderivation ( cls ) : # my local nodes memoize their values yield cls. memo # support arbitrary value conversions yield cls. preprocessor yield cls. postprocessor # notify their clients of changes to their values and respond when the values of their # operands change yield cls. dependent yield cls. o... | [
-0.14680546522140503,
0.2940424084663391,
0.5986016392707825,
-0.5508599877357483,
0.007298560347408056,
0.011583812534809113,
0.20442593097686768,
-0.5441924333572388,
0.1538284868001938,
-0.5643580555915833,
-0.686981201171875,
0.712973952293396,
0.2892541289329529,
1.0214594602584839,
... |
def _ readentitiessection ( self, fin, firstline ) : # a regular expression to match lines that do not start with # whitespace. nws _ re = re. compile ('^ \ s +') section _ ended = false sectionstr = firstline while not ( section _ ended ) : line = fin. readline ( ) if line = ='' : section _ ended = true elif ( not ( l... | [
0.3097161054611206,
-1.2054309844970703,
0.5221104025840759,
-1.0593427419662476,
-0.26583606004714966,
-0.2584681510925293,
-0.5102752447128296,
0.12145272642374039,
-0.8609259128570557,
-0.39114606380462646,
1.1830862760543823,
-0.2162545919418335,
1.1132402420043945,
1.050877332687378,
... |
def _ expected _ location ( k, n ) : if k > = n * * 2 : raise valueerror ('_ expected _ location expects 0 < = k < n ^ 2, received k = { k } and n = { n } '. format ( k = k, n = n ) ) return _ expected _ row ( k, n ), _ expected _ column ( k, n ) | [
-0.22642192244529724,
-0.34204578399658203,
0.4572843611240387,
-0.4192245602607727,
-0.7409724593162537,
-0.3233380913734436,
0.043410513550043106,
0.3772425055503845,
-0.4921603500843048,
-0.09077467769384384,
0.5211963653564453,
-0.07340537011623383,
0.926463782787323,
0.302695065736770... |
def sp _ integrate _ 2d ( func, xmin, xmax, ymin, ymax, * args, * * kwargs ) : from scipy import integrate result = integrate. dblquad ( func, ymin, ymax, lambda x : xmin, lambda x : xmax, * args, * * kwargs ) return result [ 0 ] | [
0.02952064387500286,
0.030027400702238083,
0.4473801553249359,
0.029417837038636208,
-0.3658933639526367,
-0.7872232794761658,
-0.8880406618118286,
-1.0208439826965332,
-0.4615437686443329,
-0.8978610634803772,
-0.9521352052688599,
0.9776530265808105,
0.3344680070877075,
-0.063569284975528... |
def switch _ to ( self, idx ) : # basic assertion, must never happen. assert - 1 < idx < 6 assert self. current! = idx assert self. menu _ open! = true # execute this block if there was no previous panel. if self. current is none : self. frame. sizer. add ( self. panels [ idx ], 1, wx. expand ) self. panels [ idx ]. sh... | [
-0.40735235810279846,
0.30828848481178284,
0.6801196932792664,
-0.6594440937042236,
-0.3536469638347626,
-0.09264042228460312,
0.942997932434082,
-0.49380478262901306,
0.6441901922225952,
-0.10539785027503967,
-0.3452658951282501,
0.5447120070457458,
-0.5541662573814392,
-0.089741192758083... |
def build _ settings ( accel, latpath, start = none, end = none ) : settings _ factory = settingsfactory ( accel, latpath ) if start is not none : settings _ factory. start = start if end is not none : settings _ factory. end = end return settings _ factory. build ( ) | [
0.15110976994037628,
0.0947163999080658,
0.3925718069076538,
0.49922698736190796,
-0.014516111463308334,
-0.2208952158689499,
-0.30833837389945984,
-0.5130216479301453,
-1.0433696508407593,
0.10587788373231888,
0.36733731627464294,
0.2985345721244812,
0.03351495414972305,
-0.69375663995742... |
def get _ current _ sort ( self, callback = none ) : self. eval _ js ('table. _ currentsort ( ) ', callback = callback ) | [
-0.6651702523231506,
-0.326520711183548,
0.4276678264141083,
0.5047479271888733,
-0.8301260471343994,
-1.1082282066345215,
0.8966628909111023,
-0.985699474811554,
-0.8556634187698364,
-0.04123225063085556,
0.5228678584098816,
0.26865682005882263,
-0.24349060654640198,
0.6264699101448059,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.