text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ ratio ( cls : type [ spaczzattrs ], span : span ) - > optional [ int ] : if cls. _ all _ equal ( [ token. _. spaczz _ ratio for token in span ] ) : return span [ 0 ]. _. spaczz _ ratio else : return none | [
0.5732965469360352,
0.3102726936340332,
0.24829523265361786,
0.038762763142585754,
-0.4187653362751007,
-0.35535967350006104,
0.29302170872688293,
-0.3689882159233093,
0.29468441009521484,
0.3792192041873932,
-0.22021739184856415,
-0.24551381170749664,
-0.37674209475517273,
0.2857817411422... |
def _ _ init _ _ ( self, ports, key = none, debug = false ) : try : if type ( ports )! = list : raise typeerror ( " invalid ports : list expected " ) elif key! = none and type ( key )! = str : raise typeerror ( " invalid key : str expected " ) self. host, self. ports = mysocket. gethostname ( ), ports self. sock = [ ] ... | [
-0.3930530846118927,
-0.02374052256345749,
0.7155851125717163,
0.7462282776832581,
-0.2788577377796173,
0.0059907399117946625,
0.2171943187713623,
0.25080883502960205,
0.04757467284798622,
0.08977667987346649,
-0.685509204864502,
-0.11671684682369232,
-0.8692008852958679,
1.132822871208191... |
def summarize ( self, feed _ dict ) : raise exception ('needs to be implemented') | [
-0.568876326084137,
0.5727216601371765,
0.3817219138145447,
-0.8243061304092407,
0.5142276883125305,
0.08776089549064636,
-0.2392241507768631,
0.5341176986694336,
0.6210173964500427,
-0.038700468838214874,
-0.10619478672742844,
-0.016094733029603958,
0.03622699901461601,
0.5766979455947876... |
def fit ( self, x _ train, y _ train ) : self. x _ train = x _ train self. y _ train = y _ train self. priors = myutils. priors ( y _ train ) self. posteriors = myutils. posteriors ( x _ train, y _ train, self. priors ) | [
-0.2065729796886444,
0.4137456715106964,
0.4662316143512726,
-0.6510146260261536,
0.5125812292098999,
-0.1170804500579834,
-1.277395486831665,
0.24360081553459167,
-0.7617539167404175,
-1.5000041723251343,
-0.3011631965637207,
1.0034102201461792,
0.7124464511871338,
0.06951627880334854,
... |
def get _ settings ( overrides = none ) : settings = settings ( ) settings. setmodule ( arachnado. settings ) settings. setdict ( overrides,'spider') return settings | [
0.29562023282051086,
1.1440095901489258,
0.20542654395103455,
-0.5477272272109985,
1.225788950920105,
-0.7682994604110718,
-0.7951079607009888,
-0.785162627696991,
0.07209677994251251,
-0.6801566481590271,
-0.6751613020896912,
0.73685222864151,
-0.03806537762284279,
-0.21893367171287537,
... |
def package _ check ( package _ name ) : def decorator ( func ) : " " " pass the function through to the wrapper. " " " @ wraps ( func ) def wrapper ( * args, * * kwargs ) : " " " wrap functions that use the decorator function. " " " message _ warn =''. join ( ['{ : } must be installed '. format ( package _ name ),'to ... | [
-0.06678938865661621,
-0.12490148842334747,
0.7566331624984741,
0.028273319825530052,
-0.2715035080909729,
-0.7391892671585083,
-0.7194454669952393,
0.18104153871536255,
0.656252384185791,
1.212834358215332,
1.0419843196868896,
-0.37083736062049866,
0.6110329627990723,
0.48686710000038147,... |
def _ minmax _ mask ( self, thumb _ gray, min _, max _ ) : mask = ( ( min _ < = thumb _ gray ) & ( thumb _ gray < = max _ ) ). astype ( np. uint8 ) return mask | [
-2.0461549758911133,
-1.003540277481079,
0.520021915435791,
0.4336533844470978,
0.23589645326137543,
0.14931827783584595,
-1.2150720357894897,
-0.7078803777694702,
0.7454829812049866,
0.430130273103714,
-0.4553428590297699,
1.0008447170257568,
0.6416230797767639,
-0.6744240522384644,
0.7... |
def test _ atomic _ base64 _ binary _ length _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 2. xsd ", instance = "... | [
0.17878901958465576,
-0.6388227343559265,
0.38066181540489197,
1.14418625831604,
0.004700103774666786,
-0.013605481013655663,
0.608873188495636,
-0.09269040077924728,
-0.7617297768592834,
0.4388619363307953,
-0.8750596642494202,
0.18781433999538422,
-0.21934010088443756,
0.6796163320541382... |
def banner _ upload ( instance, filename ) : y = get _ random _ name ( ) return'banner / { }. { } '. format ( y, imghdr. what ( instance. image ) ) | [
-0.2866443991661072,
-0.23253574967384338,
0.6422504782676697,
-0.19658201932907104,
0.4217008352279663,
1.2135273218154907,
0.3068845272064209,
0.1801927238702774,
-0.1310160607099533,
-0.05490994080901146,
-0.6376304626464844,
0.4369494616985321,
0.2284502536058426,
0.9863598346710205,
... |
def array2patches _ sklearn ( arr, patch _ size = ( 64, 64 ) ) : return extract _ patches _ 2d ( arr, patch _ size ) | [
0.10579751431941986,
-0.5140247941017151,
0.31581079959869385,
0.6610755324363708,
-1.3876699209213257,
0.4527154564857483,
0.24243991076946259,
-0.2553749680519104,
1.672716736793518,
-0.31250259280204773,
0.2218145728111267,
0.45720338821411133,
0.9904617071151733,
0.19941142201423645,
... |
def _ get _ tensors ( self, loaded _ graph ) : with loaded _ graph. as _ default ( ) : utils. thin _ line ( ) print ('loading graph and tensors...') inputs _ = loaded _ graph. get _ tensor _ by _ name ('inputs : 0') labels _ = loaded _ graph. get _ tensor _ by _ name ('labels : 0') input _ imgs _ = loaded _ graph. get ... | [
-0.7401795983314514,
-0.2060072273015976,
0.7306159138679504,
-0.28486722707748413,
0.17259767651557922,
-0.021411648020148277,
0.6074240207672119,
-0.5271387100219727,
-0.7822651267051697,
0.13441380858421326,
-0.14384371042251587,
0.07461927086114883,
0.18664546310901642,
-0.027907697483... |
def filter _ text ( text ) : return re. sub ('[ \ n \ [ \ ] " \ '., :!? / + \ - – \ \ \ \ * # ( ) % & = _ § € $ @ < > ; |'' ©0123456789 » « ® … ” “ • °←→ „ \ x96 \ xa0 \ t ] + ','', text ). strip ( ) | [
1.2483748197555542,
-1.1680290699005127,
0.7465786933898926,
-0.5950405597686768,
-1.4985536336898804,
0.20417346060276031,
-0.4916384816169739,
0.3866236209869385,
0.399446964263916,
0.5758996605873108,
-0.5176348090171814,
0.19532625377178192,
-0.1845872402191162,
-0.6935256719589233,
... |
def list _ of _ events ( request ) : all _ events = musicevents. objects. all ( ) template = loader. get _ template ('events / listofevents. html') context = {'all _ events': all _ events, } return httpresponse ( template. render ( context, request ) ) | [
0.455292284488678,
-0.24501565098762512,
0.4553561806678772,
-0.4048750400543213,
0.0071648722514510155,
-0.33956244587898254,
0.125871941447258,
0.8921873569488525,
0.5800513029098511,
0.1967001110315323,
0.45335981249809265,
-0.6157848834991455,
0.2996247112751007,
0.014159715734422207,
... |
def sample _ one ( l ) : ele = random. sample ( l, 1 ) [ 0 ] return ele | [
-0.3912878930568695,
0.10758352279663086,
0.4035913944244385,
0.27414166927337646,
-0.518057644367218,
0.6085019111633301,
0.023683276027441025,
0.0001097905624192208,
1.5970358848571777,
-0.41575372219085693,
-0.2088533341884613,
-0.019368160516023636,
-0.7990318536758423,
0.2215429544448... |
def show _ fret _ markers ( self, val = true ) : self. show _ fret _ markers = val | [
-0.22402261197566986,
0.3712208569049835,
0.3186173439025879,
-0.22999075055122375,
0.0584389865398407,
0.16272537410259247,
1.5689764022827148,
-0.5496999621391296,
0.35859736800193787,
-0.3955847918987274,
-0.0800134465098381,
0.5701167583465576,
0.044327717274427414,
0.6201118230819702,... |
def camera _ callback ( self, data, camera _ name ) : try : # convert image from a ros image message to a cv image cv _ image = cv _ bridge. cvbridge ( ). imgmsg _ to _ cv2 ( data, " bgr8 " ) # process image through blob detector proc _ image, points = self. blob _ detector ( cv _ image ) # update globals self. num _ d... | [
0.9459986686706543,
-0.6606499552726746,
0.4552720785140991,
0.5134320855140686,
0.4150431454181671,
0.23827338218688965,
0.7831587791442871,
-0.09162355959415436,
1.0283689498901367,
0.795494019985199,
-0.18572643399238586,
0.8167811036109924,
0.3174949586391449,
0.5387132167816162,
0.8... |
def partition _ data ( labels _ filename, testprop, valprop, num _ sims, num _ classes ) : print ('partitioning the simulation data into training, validation, and testing sets.') assert isinstance ( labels _ filename, dict ),'labels _ filename must be dictionary'if num _ sims is none : num _ sims = len ( labels _ filen... | [
-0.10593625158071518,
0.421069860458374,
0.7325121164321899,
-0.032933808863162994,
0.07268638163805008,
0.5186828374862671,
0.8084307909011841,
-0.0927346795797348,
-0.23639750480651855,
-0.2235429286956787,
0.36160188913345337,
-0.9131110906600952,
-0.4860314726829529,
-0.206199437379837... |
def _ update _ lines _ in _ file ( operation, file _ path ) : for line in fileinput. input ( [ file _ path ], inplace = true ) : new _ line = operation ( line ) if new _ line is not none : print ( operation ( line ), end ='' ) else : print ( line ) return [ file _ path ] | [
0.14931455254554749,
-0.5577542185783386,
0.3809714913368225,
0.4601653814315796,
-0.2736198902130127,
-0.09787850081920624,
0.4930771589279175,
0.38334307074546814,
-0.7418336272239685,
0.5130137205123901,
0.9121865630149841,
-0.5810954570770264,
-0.26138195395469666,
-0.03801596909761429... |
def weight _ fuselage ( self ) : return self. structural _ weight _ per _ area * self. s _ f | [
0.39930155873298645,
0.1890912801027298,
0.5165815949440002,
0.3060654103755951,
0.3608367443084717,
0.010212074033915997,
0.8772994875907898,
-0.0026260216254740953,
-0.8763224482536316,
-0.5673590302467346,
0.18228061497211456,
-0.040956031531095505,
-0.7027592062950134,
0.94363355636596... |
def ss _ identifier ( df _ option, col _ names, abs _ slope _ cols, rel _ slope _ cols, abs _ slope _ thres, rel _ slope _ thres, deltat = 900, ss _ time = 900, all _ conditions = [ ] ) : # check if the dataframe is defined appropriately df _ option. check _ type ( pd. core. frame. dataframe, inspect. stack ( ) [ 0 ] [... | [
0.2884412109851837,
0.13844645023345947,
0.6499527096748352,
0.13294923305511475,
0.008709494024515152,
0.3830816149711609,
0.5846189260482788,
-0.4331212639808655,
-0.4919697344303131,
0.4250097870826721,
-0.7989280819892883,
0.15267802774906158,
0.16781891882419586,
-0.3705299496650696,
... |
def _ get _ tracked _ params ( self ) : if isinstance ( self. tproblem, testproblem ) : return [ p for p in self. tproblem. net. parameters ( ) if p. requires _ grad ] else : model, _ = self. tproblem return [ p for p in model. parameters ( ) if p. requires _ grad ] | [
-0.015652064234018326,
-0.19545188546180725,
0.5298910140991211,
0.4217880368232727,
0.40630611777305603,
1.273454189300537,
-0.06598114222288132,
-0.4681631624698639,
-0.6779613494873047,
1.0769132375717163,
0.0030698610935360193,
-0.07611238211393356,
-0.7557086944580078,
1.0849000215530... |
def inityandex ( self ) : self. browser = webdriver. firefox ( self. profile ) self. browser. maximize _ window ( ) self. browser. get ('https : / / www. yandex. ru /') if self. check _ errors ( ) : raise needrestarttor ( " inityandex " ) | [
-0.4736311137676239,
0.36212649941444397,
0.3617498278617859,
1.313083291053772,
0.05988360196352005,
-0.5889766216278076,
0.43503040075302124,
0.7535548210144043,
0.4535755217075348,
-0.8581704497337341,
-0.5658833980560303,
0.5794897675514221,
-0.2882732152938843,
0.16093355417251587,
... |
def _ _ call _ _ ( self, doc : iterable [ str ] ) - > tuple [ str,... ] : tagged = filter ( lambda tag : tag [ 1 ] [ : 2 ] in self. _ _ incl _ pos, pos _ tag ( doc ) ) return tuple ( self. _ _ lemmatize ( word [ 0 ], self. _ _ pos _ tag [ word [ 1 ] [ : 2 ] ] ) for word in tagged ) | [
-0.7058567404747009,
-0.20212450623512268,
0.4889019727706909,
-0.1947026550769806,
-0.16338837146759033,
-0.33494123816490173,
-1.1383789777755737,
0.4302683472633362,
-1.0244208574295044,
0.9042909145355225,
-0.7338437438011169,
-0.7563431262969971,
-0.7024808526039124,
0.728423535823822... |
def train ( self, data, optimizer, metric _ monitor ) : print ('start training...') # config = np. array ( [ i for i in product ( range ( 2 ), repeat = self. _ h _ dim ) ] ). astype ( np. int32 ) # lista = np. split ( config, 256 ) # config = none test _ fixed = np. random. randint ( low = 0, high = data ['x _ test']. ... | [
0.4436133801937103,
0.3658347427845001,
0.7002978920936584,
0.7634813785552979,
0.29439857602119446,
-0.014489740133285522,
0.34677720069885254,
0.33244621753692627,
-0.7033728957176208,
0.12419336289167404,
-0.2381948083639145,
0.5536834597587585,
-0.6113631725311279,
0.10604186356067657,... |
def get _ migration _ output ( migration _ name : optional [ pulumi. input [ str ] ] = none, resource _ group _ name : optional [ pulumi. input [ str ] ] = none, subscription _ id : optional [ pulumi. input [ optional [ str ] ] ] = none, target _ db _ server _ name : optional [ pulumi. input [ str ] ] = none, opts : op... | [
-0.13131192326545715,
0.45574653148651123,
0.6083625555038452,
0.39659303426742554,
0.13215062022209167,
-0.968573808670044,
-0.6101024150848389,
-0.6189777851104736,
0.1756361871957779,
-0.051472872495651245,
0.4029330611228943,
1.1077702045440674,
-0.5840669870376587,
-0.6921538710594177... |
def main ( ) : # pragma : no cover command = demisto. command ( ) log ( f'command being called is { command }') args = demisto. args ( ) args [ " integration _ context _ brand " ] = integration _ context _ brand args [ " integration _ name " ] = integration _ name api _ key = demisto. params ( ). get ('apikey') api _ k... | [
0.5728930234909058,
0.13786126673221588,
0.7806763648986816,
-0.04307931661605835,
-0.0379340685904026,
-0.24469012022018433,
-0.30471086502075195,
0.5678569078445435,
-0.22889374196529388,
0.4669104516506195,
-0.2954278886318207,
0.6112214922904968,
-0.49020034074783325,
-0.31389290094375... |
def crypt _ file _ contents ( self, data : bytes ) - > optional [ bytes ] : assert ( len ( data ) < = self. read _ len ) return self. _ decrypt ( data ) | [
0.2685238718986511,
0.1877688467502594,
0.42476359009742737,
-0.265776127576828,
-0.1982417106628418,
-0.5788483023643494,
-0.8284246325492859,
-1.6064664125442505,
-0.5166103839874268,
-0.17804516851902008,
0.039403341710567474,
-0.7135074138641357,
-1.048425316810608,
-0.7361639142036438... |
def create _ product _ with _ options ( self, tmp _ req : servicecatalog _ 20210901 _ models. createproductrequest, runtime : util _ models. runtimeoptions, ) - > servicecatalog _ 20210901 _ models. createproductresponse : utilclient. validate _ model ( tmp _ req ) request = servicecatalog _ 20210901 _ models. createpr... | [
-0.8265633583068848,
0.34037330746650696,
0.8679303526878357,
-0.09589795023202896,
0.06446503102779388,
0.711015522480011,
0.0007373950211331248,
-1.4267138242721558,
0.31265419721603394,
0.9286282658576965,
-0.12004318088293076,
0.43808120489120483,
-0.24413299560546875,
0.13233588635921... |
def test _ atomic _ id _ pattern _ 4 _ nistxml _ sv _ iv _ atomic _ id _ pattern _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - pattern - 5. xsd ", instance = " nistdata / atomic / id / schema + instance... | [
0.0612025186419487,
-0.7629103660583496,
0.35491377115249634,
0.43080922961235046,
-0.6758290529251099,
-0.20734885334968567,
0.3933534324169159,
-0.7357873916625977,
-0.30516672134399414,
0.9037702083587646,
-0.4891887903213501,
0.28814566135406494,
-0.20477290451526642,
0.188597291707992... |
def get _ tags ( self ) : return [ tag. name for tag in self. tags ] | [
0.35013139247894287,
-0.16003255546092987,
0.36454910039901733,
0.6954382658004761,
1.0678943395614624,
0.4338149428367615,
-1.9304965734481812,
-0.32356780767440796,
-0.2980291545391083,
0.39802616834640503,
-1.0346977710723877,
0.3938695788383484,
0.04226866737008095,
1.055691123008728,
... |
def getrulesforlogicalinterface ( self, logicalinterfaceid, draft = false ) : if draft : req = apiclient. allrulesforlogicalinterfaceurl % ( self. host, " / draft ", logicalinterfaceid ) else : req = apiclient. allrulesforlogicalinterfaceurl % ( self. host, " ", logicalinterfaceid ) resp = requests. get ( req, auth = s... | [
-0.2784973084926605,
0.2579440772533417,
0.3386037349700928,
-1.2908633947372437,
-0.2839794456958771,
0.2790813744068146,
-0.6497803330421448,
-0.4720972180366516,
0.5481842756271362,
0.4898245632648468,
-0.31452369689941406,
0.29169753193855286,
-1.7685637474060059,
0.8145655393600464,
... |
async def on ( ctx : bot. context ) : try : role _ db = await bot. db. get ( partyhard _ roles, guild _ id = ctx. guild. id ) except partyhard _ roles. doesnotexist : return role = bot. utils. get ( ctx. guild. roles, id = role _ db. role _ id ) if role in ctx. author. roles : return await ctx. author. add _ roles ( ro... | [
1.00876784324646,
0.6700425148010254,
0.8346419334411621,
-0.12323099374771118,
1.216738224029541,
0.3952699899673462,
-1.7309387922286987,
1.0394331216812134,
0.4137941598892212,
0.02777266874909401,
-0.1676938235759735,
0.6280137896537781,
-0.7835733890533447,
0.11143966764211655,
0.13... |
def test _ atomic _ any _ uri _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 1. xsd ", instance = " nistdata / atomic / anyuri ... | [
-0.018265899270772934,
0.03916173055768013,
0.4341682195663452,
0.7530132532119751,
-0.11111299693584442,
0.11126453429460526,
-0.14938470721244812,
0.1672971099615097,
0.35079190135002136,
0.1510254442691803,
0.20656126737594604,
-0.5951687693595886,
-0.40841227769851685,
0.10977607965469... |
def test _ atomic _ hex _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 4 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 4. xsd ", instance ... | [
0.16246534883975983,
0.13862019777297974,
0.5046477317810059,
0.3507436513900757,
-0.12973280251026154,
0.4273693263530731,
-0.7808207869529724,
-0.1637100875377655,
0.5815669894218445,
-0.10693100094795227,
-0.4511704444885254,
-0.8965528011322021,
-0.7168169617652893,
-0.0357792936265468... |
def getmappingsonthingtype ( self, thingtypeid, draft = false ) : if draft : req = apiclient. allthingtypemappingsurl % ( self. host, " / draft ", thingtypeid ) else : req = apiclient. allthingtypemappingsurl % ( self. host, " ", thingtypeid ) resp = requests. get ( req, auth = self. credentials, verify = self. verify ... | [
-2.094569683074951,
-0.09160445630550385,
0.7376636862754822,
-0.3631422221660614,
-0.626858115196228,
0.2184572070837021,
-1.1218526363372803,
-0.9116054773330688,
0.6170148253440857,
0.4907160997390747,
-0.539635419845581,
0.736773669719696,
-0.863201916217804,
1.0687702894210815,
-0.2... |
def cart _ id ( self ) : return self. _ cart _ id | [
0.9122353792190552,
-1.2178629636764526,
0.42998239398002625,
-0.06506894528865814,
0.4894833564758301,
0.8848270177841187,
0.7534554600715637,
-0.5473951697349548,
0.5467379093170166,
-0.5444959998130798,
0.3492080569267273,
1.221161961555481,
0.5323886275291443,
-0.21128743886947632,
0... |
def play ( self ) : self. _ osc. play ( ) | [
0.5110794901847839,
-0.06372109800577164,
0.3171943128108978,
0.6688215136528015,
1.4872840642929077,
0.05444835126399994,
1.0056991577148438,
-0.36805811524391174,
-0.37350592017173767,
-0.9277467131614685,
1.158429741859436,
0.642004132270813,
-0.271793931722641,
-0.12361521273851395,
... |
def _ _ add _ _ ( self, other ) : if isinstance ( other, time ) : return self. add _ time ( other ) else : return self. increment ( other ) | [
-0.4034605026245117,
0.5726567506790161,
0.9036980867385864,
1.1056848764419556,
-0.5243195295333862,
0.29628610610961914,
-0.4302864968776703,
-1.6965821981430054,
0.7733332514762878,
0.05953370779752731,
-0.01045969594269991,
-0.1022997796535492,
-0.3307369649410248,
1.1514182090759277,
... |
def unit _ convert ( df _ option, col _ names = [ ], init _ unit ='f ', final _ unit ='k') : # define function to do unit conversion for each # column # need to add error checking for units not for # same type of measurement def unit _ conversion ( values ) : final _ values = values # for temperature if init _ unit is'... | [
-1.3069336414337158,
-0.3851921856403351,
0.8298338055610657,
0.1488799899816513,
0.6620956659317017,
-0.24875493347644806,
0.2180442214012146,
-0.16879495978355408,
-0.48117318749427795,
0.25244253873825073,
0.05716795101761818,
0.08980510383844376,
0.35665783286094666,
-0.303921848535537... |
def split _ flow _ into _ segments ( flow ) : segments = [ ] if len ( flow. packets ) = = 0 : return segments current _ sender = flow. endpoint _ a current _ segment = tcpflow ( flow. packets [ 0 ] ) segments. append ( current _ segment ) for packet in flow. packets : # non - data packets do not trigger a new segment i... | [
-0.6893596649169922,
-0.37949255108833313,
0.6722078919410706,
0.012706044130027294,
1.3141050338745117,
-0.45038455724716187,
0.5259442329406738,
-0.1412673145532608,
1.1290947198867798,
0.010751730762422085,
-0.3202887773513794,
-0.8003568053245544,
-0.900822103023529,
0.3086684644222259... |
def _ _ init _ _ ( self, name = none, depth = 1, postfix = default _ postfix, whitelist = none ) : # sanity checks if name is none : return if depth < 1 : raise runtimeerror if postfix = ='' : raise runtimeerror if whitelist is none : whitelist = default _ whitelist self. files = list ( ) self. postfix = postfix self. ... | [
-0.7999696135520935,
0.41797110438346863,
0.7380964756011963,
0.12264940142631531,
0.10462246090173721,
-0.13951407372951508,
0.1845930814743042,
0.433319628238678,
0.028031563386321068,
-0.5791359543800354,
-0.6368036270141602,
-0.007997006177902222,
-0.3730658292770386,
1.206612825393676... |
def test _ atomic _ hex _ binary _ enumeration _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ enumeration _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - enumeration - 4. xsd ", instance ... | [
-0.5135369300842285,
-0.3827698826789856,
0.6227590441703796,
0.6777756810188293,
-0.26186949014663696,
0.5141302347183228,
0.16014479100704193,
0.07193061709403992,
-0.5930743217468262,
0.3630506992340088,
-1.1120648384094238,
-0.7656049132347107,
-0.28027185797691345,
0.03040655888617038... |
def localaligndp ( bloc, cdsseq, geneseq ) : se1 = geneseq [ bloc [ 2 ] : bloc [ 31 ] ] se2 = cdsseq [ bloc [ 0 ] : bloc [ 1 ] ] alignment = pairwise2. align. localxx ( se1, se2 ) state = false begin = [ ] end = [ ] dicalignmentposandcdsgenent = { } ntc = 0 ntg = 0 for i, j in enumerate ( alignment [ 0 ] [ 1 ] ) : if j... | [
-0.7651247978210449,
-1.017471432685852,
0.9738853573799133,
-0.22649545967578888,
-1.01111900806427,
0.00621832674369216,
0.8692548871040344,
0.8562231659889221,
-0.5172090530395508,
0.6335738301277161,
-0.5399144887924194,
-0.0021807807497680187,
-1.1130930185317993,
0.7917146682739258,
... |
def time _ sales _ load ( self, download = true ) : self. time _ sales _ df = self. load _ dataset ('tick') | [
0.16040994226932526,
0.7281823754310608,
0.23407790064811707,
0.020872974768280983,
-0.1983429193496704,
0.21869666874408722,
0.3166326582431793,
-0.04855302721261978,
-0.15758226811885834,
0.10605814307928085,
0.47520390152931213,
0.025657260790467262,
-0.12379622459411621,
-0.01323038712... |
def query _ pancakes ( market _ id, overrides ) : data = query ( " { } / { } ". format ( showtimes _ base _ url, market _ id ) ) market _ data = data. get ( " market " ) if log. isenabledfor ( logging. debug ) : log. debug ( " market response : \ n % s ", format _ json ( data ) ) if not market _ data : return [ ] marke... | [
-0.6653967499732971,
0.2608976364135742,
0.7664545774459839,
-0.5621345043182373,
-0.5397467017173767,
-0.370225191116333,
-0.997499406337738,
-0.46749070286750793,
0.14987151324748993,
0.11962612718343735,
-0.1486235409975052,
0.7663430571556091,
-0.42822739481925964,
1.0629761219024658,
... |
def link _ entity ( self, raw _ tokens, return _ entities = false, agent = 1, uuid = " none ", kb = none, mentioned _ entities = none, known _ kb = true ) : if kb is not none : kb _ entities = kb. entity _ set if mentioned _ entities is not none : kb _ entities = kb _ entities. union ( mentioned _ entities ) kb _ entit... | [
-0.17890582978725433,
-0.6536452770233154,
0.9832685589790344,
-0.17685411870479584,
0.1977650672197342,
0.37348031997680664,
0.352321058511734,
0.40422290563583374,
0.40663373470306396,
0.05037183687090874,
0.23021186888217926,
-0.21331579983234406,
-0.5329150557518005,
0.7160018682479858... |
def is _ ended ( self ) : total = sum ( [ x for row in self. board. grid for x in row ] ) return total = = 0 | [
-0.11143577098846436,
0.25456202030181885,
0.7541971206665039,
0.41180160641670227,
0.905815601348877,
-0.3401654362678528,
-0.8648478388786316,
0.23614421486854553,
0.22579358518123627,
0.4562668800354004,
-0.4279364347457886,
-0.5228999853134155,
-0.479058176279068,
1.036711573600769,
... |
def _ bcd2dec ( self, value ) : return ( ( value > > 4 ) * 10 ) + ( value & 0x0f ) | [
0.9102457165718079,
-0.36458349227905273,
0.5749704837799072,
-0.9173267483711243,
0.30468910932540894,
0.11961369216442108,
0.19204676151275635,
-0.06288015842437744,
0.14325442910194397,
-0.8175503015518188,
-0.012783827260136604,
0.029141560196876526,
0.01644282601773739,
0.403092801570... |
def test _ atomic _ language _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ language _ pattern _ 4 _ 5 ( 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.2215946465730667,
-0.13273487985134125,
0.4406399130821228,
0.5103071331977844,
-0.5642929077148438,
0.44213345646858215,
0.15272684395313263,
0.09955435246229172,
-0.29549193382263184,
0.7744060754776001,
-0.6778885126113892,
-0.42373108863830566,
-0.38245919346809387,
-0.46554514765739... |
def forward ( self, x, * args ) : self. y + = self. _ dt _ over _ tau * ( self. _ activation ( x ) - self. y ) return self. y | [
-0.12260093539953232,
0.6025944948196411,
0.5019603371620178,
-0.5157492756843567,
-0.4606342315673828,
0.713804304599762,
0.34461668133735657,
-1.2985106706619263,
-0.6480584144592285,
-1.2070037126541138,
-0.011605736799538136,
0.8054383993148804,
0.5002099871635437,
-0.437192440032959,
... |
async def _ delay ( self ) : if self. _ pipeline _ response is none : return response = self. _ pipeline _ response. http _ response if response. headers. get ( " retry - after " ) : await self. _ sleep ( int ( response. headers [ " retry - after " ] ) ) else : await self. _ sleep ( self. _ timeout ) | [
0.8240841031074524,
-0.03581155464053154,
0.5206202864646912,
-0.3073439598083496,
0.0046273148618638515,
-0.34750795364379883,
0.10524395108222961,
0.003172338707372546,
0.06510891020298004,
-0.421203076839447,
0.4143446087837219,
-0.2449570894241333,
0.23079951107501984,
-1.3326432704925... |
def then ( self, onfullfilled : fullfillfunc [ t, tresult ] ) - >'promise [ tresult ]': def callback _ wrapper ( resolve _ fn : resolvefunc [ tresult ], resolve _ value : t ) - > none : " " " a wrapper called when this promise resolves. arguments : resolve _ fn : a resolve function of newly created promise. resolve _ v... | [
0.14658431708812714,
-0.24377131462097168,
0.6269999742507935,
0.23286648094654083,
0.016883499920368195,
-1.1839040517807007,
-0.8529775142669678,
-0.5790814161300659,
-0.09582649916410446,
-0.6274598240852356,
-1.0715032815933228,
-0.8483457565307617,
0.17288799583911896,
0.2653500437736... |
async def test _ response _ headers ( self ) : resp = await self. client. request ( " get ", " / " ) assert 200 = = resp. status assert " beacon - network " = = resp. headers. get ( " server ", " " ) | [
0.12427365034818649,
0.0011239827144891024,
0.3602197468280792,
0.5221372246742249,
1.6617361307144165,
0.46381905674934387,
-0.39113375544548035,
-0.9505512118339539,
0.7333264350891113,
-0.7307246327400208,
-0.3101401925086975,
-0.6261878609657288,
-0.23493194580078125,
-0.57007753849029... |
def createevent ( self, physicalinterfaceid, eventtypeid, eventid ) : req = apiclient. alleventsurl % ( self. host, " / draft ", physicalinterfaceid ) body = { " eventid " : eventid, " eventtypeid " : eventtypeid } resp = requests. post ( req, auth = self. credentials, headers = { " content - type " : " application / j... | [
-1.3919458389282227,
-0.4228683114051819,
0.7491302490234375,
-0.0862128883600235,
0.0363660492002964,
0.3348875045776367,
-0.605170488357544,
-0.719581127166748,
0.18556711077690125,
0.43645182251930237,
-0.1691824197769165,
0.2196420580148697,
-0.8835234045982361,
0.3639160990715027,
0... |
def get _ best _ thread ( self, question, tag _ name ) : thread _ ids, thread _ embeddings = self. _ _ load _ embeddings _ by _ tag ( tag _ name ) # hint : you have already implemented a similar routine in the 3rd assignment. question _ vec = question _ to _ vec ( question, self. word _ embeddings, self. embeddings _ d... | [
0.5645477771759033,
-0.7519415616989136,
0.6967349648475647,
0.8144823312759399,
-0.07698934525251389,
0.3559757173061371,
-0.23219427466392517,
-0.8440365195274353,
-0.07831940799951553,
0.08152429014444351,
0.5428403615951538,
0.5531670451164246,
-0.5379304885864258,
-0.01947373896837234... |
def test _ atomic _ base64 _ binary _ max _ length _ 3 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ max _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - maxlength - 4. xsd ... | [
0.3301837146282196,
0.1525094360113144,
0.3030562400817871,
1.1297804117202759,
0.03397778049111366,
0.07732260972261429,
-0.2573007643222809,
-0.24102257192134857,
0.044763948768377304,
0.38207772374153137,
-0.55241858959198,
-0.4433758854866028,
-0.6200166940689087,
-0.1765143722295761,
... |
def visualize _ round _ connections _ infected ( number ) : # city positions lon = pre. round _ visualizations [ number ]. get ( " lon ", ( ) ) lat = pre. round _ visualizations [ number ]. get ( " lat ", ( ) ) text = pre. round _ visualizations [ number ]. get ( " name ", ( ) ) fig = go. figure ( ) fig. add _ trace ( ... | [
0.0382445864379406,
-0.21745018661022186,
1.042569637298584,
-1.2532678842544556,
-0.8024086952209473,
0.0497879832983017,
0.7742669582366943,
-0.02729244902729988,
0.8301191329956055,
0.19991062581539154,
0.9186055660247803,
0.2446119487285614,
0.2581700384616852,
-0.6948434710502625,
0... |
def test _ calculate _ dormant _ hazard _ rate ( category _ id, subcategory _ id, environment _ active _ id, environment _ dormant _ id ) : attributes ['hazard _ rate _ active'] = 1. 005887691 attributes ['category _ id'] = category _ id attributes ['subcategory _ id'] = subcategory _ id attributes ['environment _ acti... | [
0.7995768189430237,
-0.5062388181686401,
0.8256145715713501,
0.12945571541786194,
0.7626424431800842,
-0.5360300540924072,
0.22101512551307678,
0.020680377259850502,
-0.49807384610176086,
-0.3753691613674164,
-0.20418213307857513,
-0.2221302092075348,
0.06896481662988663,
0.344814330339431... |
def delete _ by _ id ( id : int ) - > list : address = addressservice. get _ by _ id ( id ) if not address : return [ ] db. session. delete ( address ) db. session. commit ( ) return [ id ] | [
-0.6777277588844299,
0.010795297101140022,
0.6079676151275635,
0.19212134182453156,
0.5563070178031921,
-0.9012780785560608,
-0.4012836813926697,
0.5405609011650085,
1.5582062005996704,
0.9749557375907898,
-1.1954045295715332,
0.18294043838977814,
-0.37763136625289917,
0.5518385171890259,
... |
def handle _ delete ( self, request, user, * args, * * kwargs ) : try : self. log. info ('remove script') # user permission if not has _ perm ( user, adminpermission. script _ management, adminpermission. write _ operation ) : self. log. error ( u'user does not have permission to perform the operation.') raise usernota... | [
-0.5858226418495178,
-0.2629932463169098,
0.7277967929840088,
0.28563782572746277,
0.31194910407066345,
-0.41167134046554565,
1.4621877670288086,
-0.8852373957633972,
0.520818293094635,
0.6873204708099365,
0.08939044922590256,
0.16011227667331696,
-0.5102835893630981,
-0.09802822768688202,... |
def eigendecomp ( m ) : return la. eig ( m ) | [
0.0889153778553009,
-0.36115777492523193,
0.015318764373660088,
-0.4463220238685608,
-0.403182715177536,
0.7970861196517944,
0.9095821380615234,
1.1658763885498047,
0.07766196876764297,
0.6610662937164307,
0.6116458773612976,
-1.35593581199646,
0.13912364840507507,
0.4131256341934204,
-0... |
def brailleregionsfromstrings ( strings ) : brailleregions = [ ] for string in strings : brailleregions. append ( braille. region ( string ) ) return brailleregions | [
0.8536637425422668,
-1.0652047395706177,
0.025415286421775818,
-0.45121657848358154,
0.3804969787597656,
0.20679311454296112,
-0.36882421374320984,
0.15473008155822754,
0.1617727130651474,
-0.16177138686180115,
0.47312918305397034,
1.0967508554458618,
-0.8139182329177856,
0.100778497755527... |
async def test _ caught _ connection _ exception _ in _ channel ( connect _ to _ broker ) : exchange _ name ='testcase _ exchange'routing _ key ='testcase _ routing _ key'async with await connect _ to _ broker ( ) as connection : async with connection. channel ( ) as channel : # without this channel. publish won't rais... | [
0.15038836002349854,
-0.17174884676933289,
0.6360433101654053,
0.3224917948246002,
0.27619919180870056,
0.1153082549571991,
0.1039075180888176,
0.10332614183425903,
0.2093045860528946,
0.2481309175491333,
0.36515170335769653,
0.30481231212615967,
-1.1846058368682861,
0.7807835936546326,
... |
def calc _ operating _ cost ( self, energy _ rate, fuel _ rate ) : fuel _ cost = fuel _ rate * self. heat _ rate _ high * 1e3 / 1e6 om = self. get _ fixed _ om ( ) energy = energy _ rate * 1e3 / self. rte return fuel _ cost + om + energy | [
-0.15246424078941345,
-0.21911028027534485,
0.5104125738143921,
-0.19349876046180725,
-0.15052735805511475,
-0.8386281728744507,
-0.7296894192695618,
0.7009523510932922,
-0.7844922542572021,
0.2472553700208664,
1.0743786096572876,
-0.3208085298538208,
-0.04255037009716034,
-0.3558218181133... |
def program _ id ( self, program _ id ) : if self. local _ vars _ configuration. client _ side _ validation and program _ id is none : # noqa : e501 raise valueerror ( " invalid value for ` program _ id `, must not be ` none ` " ) # noqa : e501 self. _ program _ id = program _ id | [
0.8842149972915649,
-0.6722608804702759,
-0.1852082908153534,
0.07964061200618744,
0.2996539771556854,
1.2906925678253174,
0.09364590793848038,
0.6727621555328369,
1.0776928663253784,
0.593670666217804,
-0.22185176610946655,
1.2695214748382568,
-0.6315692663192749,
0.5573042035102844,
1.... |
def test _ raise _ error _ if _ inf _ in _ df ( df ) : data = df. copy ( ) data. loc [ 15, " var _ 3 " ] = np. inf transformer = drophighpsifeatures ( missing _ values = " raise " ) with pytest. raises ( valueerror ) : transformer. fit ( data ) | [
0.7032889127731323,
0.9039821028709412,
0.37025186419487,
0.9327701330184937,
1.012681484222412,
-0.45947521924972534,
-0.21021048724651337,
0.6149740219116211,
-0.5213280320167542,
0.3913993239402771,
-0.6986530423164368,
0.16763785481452942,
-0.43880975246429443,
0.33164000511169434,
0... |
def arange _ except _ i ( n, i ) : arr = np. arange ( n ) return np. hstack ( ( arr [ : i ], arr [ i + 1 : ] ) ) | [
-0.341081827878952,
0.22284241020679474,
0.2851414084434509,
0.25826218724250793,
-0.3298446238040924,
0.6160346269607544,
0.34496188163757324,
-0.5199028849601746,
-0.10549765080213547,
0.61872798204422,
-0.137250617146492,
-0.28138992190361023,
-1.3532520532608032,
-0.6424179673194885,
... |
def test _ example _ input _ two _ edit _ backend _ validation ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. table. edit _ row ( " dummy _ input _ two " ) input _ pag... | [
-0.14910636842250824,
0.032960426062345505,
0.8635579943656921,
0.24257540702819824,
0.8452875018119812,
0.5206059217453003,
-0.013769765384495258,
-0.3624110519886017,
-0.6507991552352905,
0.4884876310825348,
-0.7572138905525208,
0.4270613193511963,
0.26200759410858154,
-0.035430427640676... |
def test _ atomic _ any _ uri _ min _ length _ nistxml _ sv _ iv _ atomic _ any _ uri _ min _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - minlength - 1. xsd ", instance = " nistdata / a... | [
0.099326953291893,
-0.2615852355957031,
0.5122745037078857,
0.6772175431251526,
-0.25304126739501953,
0.1877060830593109,
-0.3677270710468292,
-0.15000396966934204,
0.7749426960945129,
-0.1582375317811966,
0.30114781856536865,
-0.23882369697093964,
-0.8023953437805176,
0.007327263709157705... |
def base _ mask ( self, cls, mask _ height, mask _ width ) : self. masks [ cls ] = np. zeros ( ( mask _ height, mask _ width ), dtype = np. uint8 ) | [
-0.8978896141052246,
-0.9384324550628662,
0.33605608344078064,
0.05596903711557388,
1.7290594577789307,
0.2148984968662262,
0.42635196447372437,
-0.49742135405540466,
0.11417136341333389,
-0.4723077416419983,
-0.3254323899745941,
0.779965341091156,
0.1935330331325531,
0.07442623376846313,
... |
def get _ dialect ( self ) : try : module = getattr ( _ _ import _ _ ('sqlalchemy. databases. % s'% self. drivername ). databases, self. drivername ) return module. dialect except importerror : # if sys. exc _ info ( ) [ 2 ]. tb _ next is none : if true : import pkg _ resources for res in pkg _ resources. iter _ entry ... | [
0.42331838607788086,
-0.23219971358776093,
0.6824125051498413,
0.2787948250770569,
-0.08428072184324265,
-0.19724969565868378,
0.3205034136772156,
-0.11501403152942657,
0.7052260041236877,
-0.09481993317604065,
0.3051176071166992,
-0.2413766235113144,
-0.7166765332221985,
0.115527942776679... |
def just _ die ( self ) - > none : self. _ _ is _ alive = false | [
-0.17016732692718506,
-0.9649712443351746,
0.6276241540908813,
0.00967797078192234,
1.6190624237060547,
1.5014318227767944,
-0.4515987038612366,
0.4452660083770752,
-0.6115084886550903,
0.07861454784870148,
-0.2718753218650818,
0.00066761375637725,
-0.24475738406181335,
-0.2968921065330505... |
def pcap _ download ( self, download = true ) : if download : self. download _ data ('pcap') | [
0.3990909457206726,
-0.8023147583007812,
0.3089151978492737,
0.7767893671989441,
-0.18865850567817688,
0.6068035364151001,
-0.5180821418762207,
0.1633249968290329,
1.2403593063354492,
-0.3760872483253479,
0.2537539601325989,
-0.3249538540840149,
-0.14472858607769012,
0.7107295393943787,
... |
def download _ remote _ wdls ( namespace, workspace ) : download _ method _ configs ( namespace, workspace ) method _ configs = pd. read _ table ('method _ configs / latest _ method _ configs. txt') for idx, method in method _ configs. iterrows ( ) : res = firecloud _ api. get _ repository _ method ('tsca ', method ['m... | [
-0.8541914224624634,
-0.43427056074142456,
0.47319188714027405,
-0.684211254119873,
-0.432265967130661,
0.08392023295164108,
-0.5801882147789001,
-0.6459178328514099,
-0.3145184814929962,
1.0460176467895508,
-0.6877979040145874,
0.13780783116817474,
0.04093807563185692,
0.793028712272644,
... |
def presentstatusbar ( self, inputevent ) : obj = orca _ state. locusoffocus self. updatebraille ( obj ) voice = self. voices [ settings. default _ voice ] frame, dialog = self. utilities. frameanddialog ( obj ) if frame : # in windows with lots of objects ( thunderbird, firefox, etc. ) # if we wait until we've checked... | [
0.39356479048728943,
-0.060714807361364365,
0.6169218420982361,
0.9381766319274902,
0.3301132321357727,
0.38140353560447693,
-0.03963935375213623,
0.27621757984161377,
0.7128996253013611,
-0.2382286638021469,
0.14559121429920197,
-0.36499932408332825,
-0.524691104888916,
1.3188637495040894... |
def spec _ pix _ to _ world ( pixel, wcs, axisnumber, unit = none ) : coords = list ( wcs. wcs. crpix ) coords [ axisnumber ] = pixel + 1 coords = list ( np. broadcast ( * coords ) ) if unit is none : return wcs. wcs _ pix2world ( coords, 1 ) [ :, axisnumber ] else : return wcs. wcs _ pix2world ( coords, 1 ) [ :, axisn... | [
-0.21143051981925964,
0.020009998232126236,
0.6883321404457092,
-0.11945712566375732,
-0.3622412383556366,
0.5941999554634094,
0.926749587059021,
-0.6391435861587524,
0.940712034702301,
0.4879659414291382,
0.8824217915534973,
1.3097628355026245,
0.4890754520893097,
-0.7121859788894653,
0... |
def _ prestage _ standalone _ thread ( context, subcloud, payload ) : try : prestage _ packages ( context, subcloud, payload ) prestage _ images ( context, subcloud, payload ) prestage _ complete ( context, subcloud. id ) log. info ( " prestage complete : % s ", subcloud. name ) except exception : prestage _ fail ( con... | [
-0.3459601402282715,
0.7577305436134338,
0.5546600222587585,
0.38399967551231384,
-0.08364813029766083,
0.48510417342185974,
0.15608790516853333,
-0.23099298775196075,
0.047518763691186905,
0.3256884515285492,
-0.14519758522510529,
-0.42328330874443054,
-0.3822180926799774,
0.7918297052383... |
def perform _ create ( self, serializer ) : serializer. save ( ) | [
-0.8638694882392883,
-0.4382818639278412,
-0.0140189528465271,
0.3909699618816376,
1.2443418502807617,
0.09948474168777466,
0.2900221347808838,
0.6318954229354858,
-0.12655049562454224,
0.3750019669532776,
-0.6545596122741699,
-0.9980624914169312,
-0.03686698153614998,
-0.19379550218582153... |
def _ _ image _ built ( self, name, env = none ) : if env is none : env = os. environ. copy ( ) env [ " path " ] = self. docker _ dir + " : " + env [ " path " ] logging. debug ( " checking if docker image is built. " ) image _ output = execute. output ( " docker images ", working _ dir = self. docker _ dir, environment... | [
-1.1754393577575684,
-0.5236780643463135,
0.8035597205162048,
0.3190286159515381,
0.4720172882080078,
0.31466132402420044,
0.034578919410705566,
0.36237645149230957,
-1.0069719552993774,
0.4414573907852173,
-0.5684239864349365,
0.19485455751419067,
0.5000887513160706,
0.7489975094795227,
... |
def process _ paginated _ index ( start _ page, num _ pages = none ) : if not start _ page : raise valueerror ( " spl index start page is not set " ) if ( not isinstance ( start _ page, int ) ) or start _ page < 1 : raise valueerror ( " spl index start page must be a positive integer " ) if num _ pages is not none : if... | [
-0.1427067071199417,
-0.6222777962684631,
0.7445687055587769,
0.051937323063611984,
0.17994946241378784,
-0.09435674548149109,
0.042659200727939606,
0.8054729700088501,
1.0083338022232056,
0.7102331519126892,
-0.12785978615283966,
0.5577202439308167,
-0.5734569430351257,
-0.044729683548212... |
def prewitt _ rgb ( image ) : return filters. prewitt ( image ) | [
-0.22170409560203552,
-0.0385388508439064,
0.13792011141777039,
-0.44457492232322693,
-0.32288438081741333,
-0.05633893609046936,
0.7057875394821167,
-0.5890911817550659,
0.45541125535964966,
-0.1013757735490799,
-0.05765461176633835,
0.7926035523414612,
-0.10574887692928314,
0.72571992874... |
def transformation _ seq ( ) : sometimes = lambda aug : iaa. sometimes ( 0. 8, aug ) seq = iaa. sequential ( [ sometimes ( iaa. affine ( scale = { " x " : ( 0. 9, 1. 1 ), " y " : ( 0. 9, 1. 1 ) }, translate _ percent = { " x " : ( - 0. 1, 0. 1 ), " y " : ( - 0. 1, 0. 1 ) }, rotate = ( - 90, 90 ), ) ), iaa. affine ( sca... | [
-0.5462691783905029,
-0.06451233476400375,
0.7785080075263977,
-0.0022545838728547096,
-0.4634341597557068,
-0.5624153017997742,
0.2198573648929596,
-0.7126832008361816,
0.24443885684013367,
0.4653034210205078,
-0.23213666677474976,
-0.04757147282361984,
0.9049025774002075,
-0.447678506374... |
def _ dispatch _ to _ future ( self, message ) : message _ type, message _ arg = message method _ name = " _ task _ { } ". format ( message _ type ) getattr ( self. future, method _ name ) ( message _ arg ) if message _ type in { raised, returned } : self. done = true | [
-0.7201318144798279,
1.2726397514343262,
0.6402570009231567,
-0.07274068146944046,
0.3113545775413513,
-0.7603796124458313,
0.3983054459095001,
-0.38350218534469604,
-0.6428712010383606,
0.30268824100494385,
-0.6098270416259766,
-0.10751515626907349,
0.20556341111660004,
1.297179102897644,... |
def test _ atomic _ boolean _ pattern _ 3 _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 4. xsd ", instance = " nistdata / atomic / bo... | [
-0.3750203251838684,
-0.07189367711544037,
0.5656278729438782,
1.129457950592041,
-0.004454730544239283,
0.7928240895271301,
0.14020903408527374,
0.19006939232349396,
-0.16487054526805878,
1.1366935968399048,
-0.13604134321212769,
-0.2043892741203308,
-0.24481064081192017,
-0.8847009539604... |
def test _ systemprecondition ( self ) : # it first needs to be able to create the class otherwise will not be # able to do anything else installer = modulesource. create ( " system _ dependency " ) self. assertnotequal ( installer, none ) testresult = installer. _ check _ dependency _ expression ( self. _ env, " " ) s... | [
-0.37686586380004883,
-0.39682966470718384,
0.7767832279205322,
0.12818017601966858,
0.04271028935909271,
0.6812460422515869,
0.6734656691551208,
0.7742722630500793,
-0.19666630029678345,
-0.48883092403411865,
-0.5327858924865723,
-0.18590669333934784,
-0.29412809014320374,
1.4999347925186... |
def get _ number _ repeated _ once ( numbers ) : record = { } for i in numbers : if i in record : record. pop ( i ) else : record [ i ] = 1 for key in record : # record has only one elements return key | [
-0.6538571119308472,
0.8508967161178589,
0.5587666630744934,
0.24952784180641174,
0.1790260225534439,
-0.33928507566452026,
0.7266682982444763,
0.33358415961265564,
0.3744950294494629,
0.494636595249176,
-0.9926539659500122,
-0.780451774597168,
-0.7085404396057129,
0.655544638633728,
0.1... |
def _ rank _ aggregate ( self, query ) : # # # # # # # # # # # # # # # # matching # # # # # # # # # # # # # # # # collection = self. mongo _ connection [ " index " ] [ " termdoc " ] with profiler ( " index _ db _ access _ for _ approx _ match " ) : results _ cursor = list ( collection. find ( query. match _ statement )... | [
-0.275180459022522,
0.27793964743614197,
0.8599647283554077,
-0.7175095081329346,
-0.05414478853344917,
-0.4214479625225067,
0.6699137091636658,
-0.3471502363681793,
-0.6206248998641968,
1.0049078464508057,
0.6346555352210999,
-0.1034892201423645,
-0.7651894688606262,
0.4916706085205078,
... |
def switch _ to _ pants _ curve ( self, switch ) : return self. _ switch _ to _ pants _ curve [ abs ( switch ) - 1 ] * np. sign ( switch ) | [
-0.8265264630317688,
-1.0647695064544678,
0.45618924498558044,
0.5770180821418762,
0.17434129118919373,
1.1182669401168823,
-0.21829470992088318,
-0.7306485176086426,
0.3366834223270416,
-0.3494071364402771,
0.29969996213912964,
1.4315108060836792,
0.07575865089893341,
0.08580795675516129,... |
def run _ random _ walk _ with _ true _ online _ td _ lambda ( lam = 0. 5, learning _ rate = 0. 01, gamma = 1. 0, n _ episodes = 10, n _ reps = 1, initial _ value = 0. 0, size = 19, seed = none, show = false ) : # initialize environment terminal _ rewards = {'t1': - 1. 0,'t2': 1. 0 } game = randomwalkgame ( size = size... | [
-0.15437698364257812,
0.2194667011499405,
0.7940950393676758,
-0.5199586749076843,
-0.028366276994347572,
0.354764461517334,
0.137384295463562,
-0.02103002928197384,
-0.00016562330711167306,
0.8213722109794617,
-0.1662473827600479,
-0.005560680292546749,
0.5149173140525818,
-0.003934138454... |
def test _ atomic _ id _ white _ space _ nistxml _ sv _ iv _ atomic _ id _ white _ space _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - whitespace - 1. xsd ", instance = " nistdata / atomic / id / schema... | [
-0.16156965494155884,
0.06530491262674332,
0.41178396344184875,
-0.01140256505459547,
-0.1347019523382187,
0.3407670259475708,
0.16484855115413666,
-0.47396618127822876,
1.1464731693267822,
0.7890754342079163,
0.281157910823822,
0.28829026222229004,
-0.21777023375034332,
0.6229949593544006... |
def _ get _ filter _ list ( self, db : " prefectdbinterface " ) - > list : raise notimplementederror ( " _ get _ filter _ list must be implemented " ) | [
-1.464906930923462,
0.31240731477737427,
0.5185689330101013,
0.34555596113204956,
0.47482219338417053,
0.5139443278312683,
-0.3078902065753937,
0.05677032843232155,
0.514302670955658,
0.30269855260849,
-1.0767005681991577,
0.16480213403701782,
0.28097644448280334,
1.0919370651245117,
-0.... |
def is _ key _ authorized ( key _ file, remote _ keys ) : with open ( remote _ keys,'r') as remote _ keys _ file : remote _ keys _ content = remote _ keys _ file. read ( ) if key _ file in remote _ keys _ content : return true else : return false | [
-0.09320409595966339,
-0.9538613557815552,
0.5466251969337463,
-0.07344592362642288,
-0.7970471382141113,
0.9842731356620789,
-1.1341360807418823,
1.2096843719482422,
-1.7510119676589966,
1.2216033935546875,
0.09820735454559326,
0.4088411033153534,
-0.5150268077850342,
0.26663538813591003,... |
def switch ( condition : task, cases : dict [ any, task ], mapped : bool = false ) - > none : with prefect. tags ( " switch " ) : for value, task in cases. items ( ) : task = prefect. utilities. tasks. as _ task ( task ) match _ condition = comparevalue ( value = value ). bind ( value = condition, mapped = mapped ) tas... | [
-0.5688268542289734,
0.18954791128635406,
0.574180543422699,
0.5703011751174927,
-0.6401718258857727,
1.2045958042144775,
0.722495973110199,
0.4948303699493408,
-0.12777593731880188,
0.35478541254997253,
0.049265388399362564,
0.15685853362083435,
0.9079078435897827,
0.3190091550350189,
-... |
def to _ dict ( self ) : return { name : self. get _ value ( name ) for name in self. names } | [
-0.9909234642982483,
-0.7101747393608093,
0.2742355465888977,
-1.427061915397644,
-0.5684983730316162,
-0.10303134471178055,
-0.7564758658409119,
-0.4544235169887543,
-0.9498175382614136,
-0.0022099486086517572,
-1.3196642398834229,
-0.038647253066301346,
0.2639774978160858,
1.198726296424... |
def _ _ init _ _ ( self, # noqa : r0913 emb _ dims _ non _ seq, emb _ dims _ seq, lin _ layer _ sizes _ non _ sequential, lin _ layer _ sizes _ sequential, non _ seq _ cont _ count, hidden _ size, output _ size, emb _ dropout _ non _ seq, lin _ layer _ dropouts _ non _ sequential, emb _ dropout _ seq, lin _ layer _ dro... | [
0.3906601369380951,
0.29061564803123474,
0.6262850165367126,
0.7697576284408569,
-0.3201743960380554,
0.14882059395313263,
1.0224571228027344,
0.11044860631227493,
0.7967878580093384,
0.32625362277030945,
-0.7560282349586487,
0.19470208883285522,
-0.04477628320455551,
0.3782481551170349,
... |
def executerequest ( self, method, api _ route = none, query _ args = none, data = none ) : if method not in constants. method. set _ all : raise valueerror ('invalid method : { } '. format ( method ) ) url = self. _ getapiurl ( api _ route, query _ args ) if data is none : logging. info ('api % s : % s ', method, url ... | [
-1.2571898698806763,
0.17025773227214813,
0.7550674080848694,
-0.4528261423110962,
1.0257667303085327,
-0.6432137489318848,
-0.7138540148735046,
0.18011514842510223,
0.27541980147361755,
0.5725151300430298,
0.6275275349617004,
0.06498431414365768,
-0.40040090680122375,
-0.5368402004241943,... |
def get _ tf _ config _ by _ lhs ( self, job _ obj ) : if self. lhs _ pending _ config. get ( job _ obj ) is none : # a hack for selftf _ reconfig _ 0 if job _ obj. mode = = mode _ value _ selftf _ reconfig _ zero : logging. debug ( " inject reconfig config " ) list _ config _ dict = selftf _ config _ list. dict _ self... | [
-0.4868486225605011,
-0.18839845061302185,
0.6287990212440491,
-0.06335945427417755,
-0.23318013548851013,
-0.18862362205982208,
-0.14645934104919434,
0.1664043366909027,
-0.5145720839500427,
0.5850775837898254,
-1.2406412363052368,
-0.5268421769142151,
-0.16906270384788513,
1.214041352272... |
def launchnbody6 ( * * kwargs ) : i = input _ variables ( ) for variable, value in kwargs. iteritems ( ) : if hasattr ( i, variable ) : setattr ( i, variable, value ) if i. model _ args. has _ key ( variable ) : i. model _ args [ variable ] = value i = launch _ from ( i ) return i | [
-0.5137633085250854,
-0.28677627444267273,
0.5203709006309509,
0.4065665006637573,
-0.2752511501312256,
-0.22655630111694336,
0.21460893750190735,
-0.7964456081390381,
-0.25568458437919617,
-0.27680787444114685,
-0.9081941246986389,
-0.229722797870636,
-0.19694289565086365,
0.5252166986465... |
def apply _ mean _ var ( df, mean _ var, global _ mean _ var, columns = none, groupby _ key = none ) : if groupby _ key is not none and groupby _ key not in df. columns. values : raise exception ('% s not exists in df. columns'% groupby _ key ) if df is none or mean _ var is none or global _ mean _ var is none : raise ... | [
-0.23173516988754272,
0.47069427371025085,
0.9918056130409241,
0.5806646347045898,
-0.36662206053733826,
0.24584335088729858,
0.5666447281837463,
0.08261877298355103,
-0.7404736876487732,
1.1388455629348755,
0.21414542198181152,
1.450879454612732,
-0.35709860920906067,
0.3705179989337921,
... |
def disable _ compiler ( spack _ path, compiler ) : myprint ('disable _ compiler ', compiler ) spack _ bin = os. path. join ( spack _ path,'bin ','spack') # get arch code, output, error = run _ cmd _ output ( [ spack _ bin,'arch'] ) spack _ arch = output. strip ('\ n') platform = spack _ arch. split ('-') [ 1 ] # updat... | [
0.558914303779602,
-0.1925216019153595,
1.0309401750564575,
0.03993063047528267,
-0.08464780449867249,
-0.39140599966049194,
0.8610672354698181,
1.5058120489120483,
-0.25937655568122864,
-0.1520645171403885,
-0.5449283123016357,
0.43790480494499207,
-0.2095813900232315,
0.5160514116287231,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.