text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def verify ( index ) : if index is not none : print ( " found : ", index ) else : print ( " found ", index ) | [
0.6999791264533997,
-0.19136938452720642,
0.3685305416584015,
0.20695243775844574,
1.3819630146026611,
-0.12646274268627167,
0.08637984842061996,
-0.4722161889076233,
1.139973759651184,
-0.3174258768558502,
-0.5734221339225769,
1.2108253240585327,
-0.614742636680603,
0.6672214269638062,
... |
def summation ( n, term ) : total, k = 0, 1 while k < = n : total, k = total + term ( k ), k + 1 return total | [
-0.6314709186553955,
0.3114892542362213,
0.31889644265174866,
0.3242989182472229,
-0.20693746209144592,
-0.961553156375885,
-0.07310917973518372,
-0.270626038312912,
0.2011653035879135,
0.6014226078987122,
-1.1733657121658325,
-0.27312514185905457,
0.15098924934864044,
-0.17759470641613007... |
def drawx ( self ) : self. t. color ( " red " ) self. t. down ( ) self. t. setheading ( 60 ) for i in range ( 2 ) : self. t. fd ( self. size / 2 ) self. t. bk ( self. size ) self. t. fd ( self. size / 2 ) self. t. left ( 60 ) self. t. setheading ( 0 ) | [
-0.6579911708831787,
0.9811170101165771,
0.7115060687065125,
-0.4205460548400879,
-0.24824850261211395,
0.769659698009491,
-0.5551347136497498,
-0.23433035612106323,
0.4344278872013092,
-0.14176829159259796,
-0.8561420440673828,
-0.028805183246731758,
0.19880561530590057,
0.525505661964416... |
def insert ( self, val ) : if not self. contains ( val ) : if self. _ root is none : self. _ root = val self. _ nodes [ val ] = [ none, float ('inf'), none ] return node = self. _ root while true : if node is none : self. _ nodes [ val ] = [ none, float ('inf'), parent ] self. _ nodes [ parent ] [ 0 ] = val return if n... | [
-0.2591472268104553,
1.1175824403762817,
0.7105689644813538,
-0.25490400195121765,
-0.6910448670387268,
0.13734887540340424,
0.4343246817588806,
-0.37474560737609863,
-0.11595490574836731,
0.10482850670814514,
-1.0274512767791748,
-0.25822922587394714,
-1.0062235593795776,
0.94056242704391... |
def get _ within ( self, point, distance ) : # se definie el query de la consulta. sql _ string = " " " select id, id _ muestras, codigo, descripcion, cantidad, st _ x ( the _ geom ) as x, st _ y ( the _ geom ) as y from puntos _ control where fecha _ recoleccion is not null and st _ dwithin ( geography ( the _ geom ),... | [
-0.12415938824415207,
0.16389921307563782,
0.5725868940353394,
-0.04099925234913826,
-0.7909092307090759,
0.046574316918849945,
-1.520067572593689,
-0.4868726134300232,
-0.637908399105072,
0.02428729459643364,
0.5221351981163025,
0.3051946461200714,
-0.30910375714302063,
-0.424781441688537... |
def betterevaluationfunction ( currentgamestate ) : # the factors i'm taking into consideration are, # one - minimum food distance getfoodpos = currentgamestate. getfood ( ). aslist ( ) current _ pacman _ pos = currentgamestate. getpacmanposition ( ) if currentgamestate. getnumfood ( )! = 0 : min _ distance = min ( [ m... | [
0.6738539934158325,
-0.6492540836334229,
0.7064449787139893,
-0.42096808552742004,
0.335387647151947,
-0.45228031277656555,
-0.10085098445415497,
0.40098515152931213,
-0.07134145498275757,
-0.1582217663526535,
0.20251095294952393,
0.6866392493247986,
0.026774222031235695,
0.465548962354660... |
def volume _ normalizer ( ) : # file _ entry # prefs ('normalizing') pass | [
0.9145178198814392,
-1.0294638872146606,
0.026364361867308617,
0.7996692657470703,
-0.06413431465625763,
-0.4180716574192047,
-0.07259979844093323,
0.7497232556343079,
0.3536389172077179,
-0.5101746916770935,
0.46242913603782654,
0.3767676055431366,
-0.7223562002182007,
0.04760298877954483... |
def args ( parser ) : parser. add _ argument ('account ', nargs = '? ', help ='the email for the service account.') parser. add _ argument ('- - key - file ', help = ('path to the service accounts private key.'), required = true ) group = parser. add _ mutually _ exclusive _ group ( ) group. add _ argument ('- - passwo... | [
-0.2758321762084961,
0.4192724823951721,
0.6192732453346252,
-0.340275377035141,
0.4126727879047394,
0.568699061870575,
0.2722994387149811,
0.03556756675243378,
-0.7464587092399597,
-0.14473874866962433,
0.08557804673910141,
0.48145580291748047,
-0.07719404250383377,
0.772026002407074,
0... |
def build _ query ( clf ) : query = [ ] for i in range ( 0, len ( questions ) ) : answer = " " while ( answer! ='y') and ( answer! ='n') : answer = input ( questions [ i ] + "? " ) if answer = ='y': query. append ( 1 ) elif answer = ='n': query. append ( 0 ) else : print ( " invalid answer. please answer with y / n. " ... | [
-0.8296025395393372,
-0.4734054505825043,
0.5530158877372742,
1.0600764751434326,
-0.21911995112895966,
0.9874580502510071,
0.5881054401397705,
0.19036121666431427,
-0.5586890578269958,
-0.31506842374801636,
0.3812851011753082,
-0.2903798222541809,
-0.18046754598617554,
0.37019357085227966... |
def genome _ size _ in _ gene ( self, genome _ id, list _ of _ genome, list _ of _ size ) : index _ genome = list _ of _ genome. index ( genome _ id ) genome _ size _ in _ gene = list _ of _ size [ index _ genome ] return genome _ size _ in _ gene | [
0.18457336723804474,
0.0557759553194046,
0.5666252970695496,
0.09960843622684479,
-0.10120434314012527,
-0.8344375491142273,
-0.557529866695404,
0.7459630966186523,
-0.4763334095478058,
0.6124875545501709,
-0.6808711290359497,
0.7106660008430481,
-0.7201219201087952,
1.0716476440429688,
... |
def htmlencodestr ( s ) : htmlcodes = [ ['& ','& amp ;'], ['< ','& lt ;'], ['> ','& gt ;'], ['" ','& quot ;'] ] for code in htmlcodes : s = s. replace ( code [ 0 ], code [ 1 ] ) return s | [
-0.11404252797365189,
-0.024435803294181824,
0.3994470238685608,
-0.04359077662229538,
-1.0088104009628296,
0.0017417115159332752,
-0.03258243948221207,
0.3447677493095398,
0.4525453448295593,
0.2894591987133026,
-0.2742663025856018,
0.8287891745567322,
-0.16590258479118347,
0.041506048291... |
def time _ zone ( self, time _ zone ) : self. _ time _ zone = time _ zone | [
-0.3258606195449829,
-0.11521144211292267,
-0.17762349545955658,
-0.2833499014377594,
0.7158149480819702,
0.11959045380353928,
0.2891351580619812,
0.6621180176734924,
0.045398637652397156,
0.5030454993247986,
-1.6771926879882812,
-0.6989930868148804,
-0.3801308870315552,
0.9585472345352173... |
def verify _ success _ register _ or _ sign _ in ( self ) : self. wait _ until _ element _ find ( locator _ type = by. xpath, locator = self. constants. my _ profile _ arrow _ xpath ) self. verify _ element _ appears ( xpath = self. constants. logout _ button _ xpath ) self. log. info ( " user logged in success " ) | [
-0.4307847321033478,
0.286222368478775,
0.4021894335746765,
1.2751444578170776,
0.41398802399635315,
0.4158269166946411,
0.9041070342063904,
0.17747555673122406,
1.4905353784561157,
-0.13041681051254272,
-1.0270251035690308,
0.20265637338161469,
0.46685126423835754,
-0.048846691846847534,
... |
def dynamic _ programming ( self, nodes ) : dp _ action _ order = list ( set. union ( * [ set ( n. action _ order ) for n in nodes ] ) ) tf, rf, am = self. _ state _ nodes _ to _ matrices ( nodes, dp _ action _ order ) pi, v, q = self. _ policy _ iteration ( tf, rf, am ) for si, node in enumerate ( nodes ) : assert id ... | [
-0.9387115836143494,
0.4481410086154938,
0.4379926025867462,
0.6898475289344788,
1.0788681507110596,
-0.288061261177063,
0.1716039776802063,
-0.5102741122245789,
0.34438613057136536,
0.9947841763496399,
-0.05610067769885063,
0.3500315845012665,
0.841069221496582,
0.040524885058403015,
-0... |
def re _ raise _ exc ( e, msg ) : def error ( m ) : if isinstance ( e, assertionerror ) : return stepfail ( m ) return steperror ( m ) if pyv. is _ python _ 2 : raise error ( msg ) _, _, tb = sys. exc _ info ( ) raise error ( msg ). with _ traceback ( tb ) | [
0.024438604712486267,
0.24763484299182892,
0.6128851175308228,
1.1485580205917358,
-0.16666966676712036,
-0.23358280956745148,
0.28342315554618835,
0.7664987444877625,
-0.018619446083903313,
0.15816093981266022,
0.48048731684684753,
0.0673748254776001,
-0.10164377093315125,
1.2495521306991... |
def showselectedpixel ( self ) : vpixvals = self. vthispixel glo = self. gthislo ghi = self. gthishi # print n. size ( vpixvals ), n. size ( self. vtimes ), n. size ( glo ), n. size ( ghi ) p. figure ( 1 ) p. clf ( ) p. plot ( self. vtimes [ glo ], vpixvals [ glo ],'ko') p. plot ( self. vtimes [ ghi ], vpixvals [ ghi ]... | [
0.8941957354545593,
-0.47748592495918274,
0.5749146342277527,
0.15320633351802826,
-0.3220086693763733,
0.15018199384212494,
0.5038065314292908,
-0.5491563081741333,
0.508796751499176,
-0.41642123460769653,
0.5409145355224609,
1.4598972797393799,
-0.05409427359700203,
0.6804521679878235,
... |
def create _ heatmap ( x _ degrees, y _ degrees, network _ title ) : k _ min = np. min ( ( x _ degrees, y _ degrees ) ) k _ max = np. max ( ( x _ degrees, y _ degrees ) ) n _ bins = k _ max - k _ min + 1 values = np. zeros ( x _ degrees. size ) statistic = binned _ statistic _ 2d ( x _ degrees, y _ degrees, values, sta... | [
0.5620046854019165,
0.6326456069946289,
0.7731232643127441,
-0.15774880349636078,
-0.5268270969390869,
0.2828734219074249,
0.1100696325302124,
-0.17836406826972961,
-0.11809267103672028,
-0.018840931355953217,
0.5483844876289368,
0.4785346984863281,
1.0009835958480835,
-0.24063433706760406... |
def _ populate ( self, json ) : super ( ). _ populate ( json ) if " class " in json : setattr ( self, " type _ class ", json [ " class " ] ) else : setattr ( self, " type _ class ", none ) | [
-1.551184892654419,
-0.03959156945347786,
0.7336480021476746,
-0.6140356063842773,
1.4168953895568848,
-0.0895773321390152,
-0.02556185983121395,
-0.8513529300689697,
0.7907617688179016,
0.6502988338470459,
-0.14535343647003174,
-0.030501265078783035,
0.3279925584793091,
1.2847250699996948... |
def add _ metadata ( temperature _ cube, temperature _ atts, ohc _ cube, metadata _ dict, inargs ) : # variable attributes standard _ name ='ocean _ heat _ content'long _ name ='ocean heat content'var _ name ='ohc'units ='j'if not ( inargs. area _ file or inargs. volume _ file ) : units = units +'m - 2'iris. std _ name... | [
-0.04558416083455086,
-0.44240298867225647,
0.7691349983215332,
-0.8877719640731812,
0.7285778522491455,
0.7412725687026978,
-0.010789023712277412,
0.6496086716651917,
-1.4043323993682861,
0.38186806440353394,
0.702391505241394,
0.6090052723884583,
0.21535754203796387,
-0.00408928701654076... |
def list _ by _ subscription ( self, resource _ group _ name : str, service _ name : str, filter : str, top : optional [ int ] = none, skip : optional [ int ] = none, orderby : optional [ str ] = none, * * kwargs ) - > asynciterable [ " _ models. reportcollection " ] : cls = kwargs. pop ('cls ', none ) # type : clstype... | [
-0.07527663558721542,
-0.14346854388713837,
0.8462779521942139,
-0.2444247007369995,
-0.485101580619812,
-0.7375541925430298,
-0.25088539719581604,
-1.1089987754821777,
-0.1213756799697876,
0.10035586357116699,
0.019482556730508804,
1.3600772619247437,
-0.10430945456027985,
0.1472396552562... |
def sort _ notes ( data : dictionary ) - > dictionary : return dict ( sorted ( data. items ( ) ) ) | [
-0.17761574685573578,
-0.6624097228050232,
0.24923889338970184,
-1.8103270530700684,
-0.7547076344490051,
0.16340692341327667,
-0.5561037063598633,
-1.0823016166687012,
-0.2892415225505829,
0.24440565705299377,
-0.3070060610771179,
0.4082748293876648,
0.06725215911865234,
-0.19887478649616... |
def show _ landmarks _ batch ( sample _ batched ) : rgb _ batch, depth _ batch = sample _ batched ['rgb'], sample _ batched ['depth'] batch _ size = len ( rgb _ batch ) im _ size = rgb _ batch. size ( 2 ) rgb _ grid = utils. make _ grid ( rgb _ batch ) plt. figure ( ) plt. subplot ( 2, 1, 1 ) plt. imshow ( rgb _ grid. ... | [
0.4577687382698059,
0.15153592824935913,
0.7853477001190186,
-0.261758416891098,
-0.7312581539154053,
0.6221485733985901,
1.005820393562317,
0.5474764108657837,
-0.6662685871124268,
-0.2784230411052704,
-0.2645479738712311,
2.040116548538208,
0.959307849407196,
1.131651759147644,
0.20109... |
def _ create _ validation _ error ( self, name, # type : str value, # type : any validation _ outcome = none, # type : any error _ type = none, # type : type [ validationerror ] help _ msg = none, # type : str * * kw _ context _ args ) : # todo consider inlining this # first merge the info provided in arguments and in ... | [
-0.5121210813522339,
-0.29979389905929565,
0.5207864046096802,
0.6978972554206848,
0.4642895758152008,
0.3265705704689026,
-0.4772225618362427,
-0.7150144577026367,
-0.4741832911968231,
-0.18805348873138428,
0.13896259665489197,
-0.4303232729434967,
0.12753348052501678,
0.6953951120376587,... |
def virtualdartmove ( self, context = none, residuelist = none ) : if residuelist = = none : residuelist = self. residuelist if context = = none : context = self. nc _ context stateinfo = context. getstate ( true, true, false, true, true, false ) olddartpos = stateinfo. getpositions ( asnumpy = true ) olddartpe = state... | [
-0.8088846206665039,
-0.7156955003738403,
0.8981665968894958,
0.5725724697113037,
0.04907917231321335,
0.11568198353052139,
-0.10000582784414291,
0.717488169670105,
0.8399050235748291,
0.7147158980369568,
-0.25223806500434875,
-0.04062279686331749,
-0.3741721212863922,
0.15282601118087769,... |
def get _ pfreq _ features ( postures, n _ syntax ) : pfreq = np. zeros ( ( len ( postures ), n _ syntax ) ) for ip, pseq in enumerate ( postures ) : pst, count = np. unique ( pseq, return _ counts = true ) pfreq [ ip, pst ] = count / np. sum ( count ) return pfreq | [
-0.4613655209541321,
-0.05830598995089531,
0.42281413078308105,
0.21168427169322968,
0.18047137558460236,
-0.345941960811615,
0.2073366641998291,
0.15679986774921417,
0.08167316764593124,
-0.13200382888317108,
-0.018435221165418625,
-0.9440627694129944,
-0.3153977692127228,
0.2469090819358... |
def alphcsuf ( s, x ) : lx = len ( x ) if lx > len ( s ) - 2 or not alphc ( s ) : return false else : return true if s [ - lx : ] = = x else false | [
0.8826358914375305,
-0.4715559184551239,
0.43919917941093445,
0.0363975428044796,
-0.9741814732551575,
0.3338550627231598,
-0.5539875030517578,
-0.24544617533683777,
0.3376120924949646,
-0.1109708622097969,
-0.5417540073394775,
1.141022801399231,
0.3381354510784149,
-0.7455751299858093,
... |
def start2 ( ) : return render _ template ('start2. html') | [
0.5733655095100403,
-0.7066529393196106,
0.43156182765960693,
1.1488075256347656,
-0.511491060256958,
-0.002364229876548052,
0.6122550964355469,
0.5857595801353455,
-0.9882256984710693,
0.0074335434474051,
-0.27027368545532227,
0.5335036516189575,
0.3313651978969574,
0.02260606177151203,
... |
def getjobstatistics ( self, projectname, jobname, includeidletimes = false ) : project = self. storage [ projectname ] job = project [ jobname ] d = dict ( job. statistics ) # remove utility fields of databases. if'_ id'in d : del d ['_ id'] if'_ rev'in d : del d ['_ rev'] # remove cars idle times if required if not i... | [
0.04947644844651222,
0.8258147239685059,
0.45745667815208435,
-0.6295543909072876,
-0.7490293383598328,
-0.04967289790511131,
-0.6964919567108154,
-0.36756443977355957,
-0.7648836374282837,
0.23618091642856598,
-0.47764265537261963,
0.4162047207355499,
-0.27718064188957214,
-0.274001687765... |
def model _ fn _ generative _ predictor ( model _ config, train _ config, get _ masked _ lm _ output _ fn = get _ masked _ lm _ output ) : def model _ fn ( features, labels, mode, params ) : # pylint : disable = unused - argument " " " the ` model _ fn ` for tpuestimator. " " " tf _ logging. info ( " * * * features * *... | [
-0.5835105180740356,
0.19540515542030334,
0.6519055366516113,
0.09241954237222672,
0.10485458374023438,
-0.43972107768058777,
0.7881618738174438,
0.20223911106586456,
-0.9853569269180298,
0.2307916283607483,
-0.6620519757270813,
-0.31323784589767456,
1.099389910697937,
-0.36582571268081665... |
def test _ qlibrary _ instantiate _ cpw _ hanger _ t ( self ) : design = designs. designplanar ( ) try : cpwhangert except exception : self. fail ( " cpwhangert failed " ) try : cpwhangert ( design, " my _ name " ) except exception : self. fail ( " cpwhangert ( design, \ " my _ name \ " ) " ) try : cpwhangert ( design,... | [
0.03834815323352814,
0.032167866826057434,
0.41685962677001953,
-0.1694873571395874,
-0.20627576112747192,
1.3846551179885864,
0.5542778968811035,
-0.6333184242248535,
-0.8583778738975525,
-0.04613582789897919,
-0.34632423520088196,
-0.6355612277984619,
-0.6498201489448547,
1.1642651557922... |
def volume _ type _ extra _ specs _ update _ or _ create ( context, volume _ type _ id, extra _ specs ) : impl. volume _ type _ extra _ specs _ update _ or _ create ( context, volume _ type _ id, extra _ specs ) | [
-0.8608973622322083,
-0.6042671203613281,
0.6409445405006409,
-0.2592605650424957,
0.24389488995075226,
0.8497450351715088,
-0.39806944131851196,
-0.04959160089492798,
0.8519687056541443,
0.881763219833374,
-0.39033353328704834,
-0.13705386221408844,
-0.46137726306915283,
0.053222097456455... |
def getname ( self ) : return self. name | [
-0.46234381198883057,
-1.4665331840515137,
0.3907402753829956,
-0.06422033905982971,
-0.47517281770706177,
0.7263794541358948,
0.191359281539917,
-0.3687366545200348,
-0.12298122048377991,
-0.055618930608034134,
-0.6273084282875061,
0.21116457879543304,
0.019095631316304207,
-0.08734955638... |
def _ makeenterline ( filenode, interface, member, arg, handle _ errors, callback, meta ) : api _ name = _ stripapiname ( interface. getname ( ) ) +'_ api'if member. getproperty ('api') : # override api name. manually _ provided _ api = true # todo ( teravest ) : automatically guess the api header file. api _ name = me... | [
-0.23631058633327484,
-0.3263484835624695,
0.7113680839538574,
-0.8723982572555542,
0.19674627482891083,
0.023682348430156708,
0.05641355738043785,
0.11799889802932739,
-0.9667774438858032,
0.3035126030445099,
0.6817809343338013,
-0.16769033670425415,
-0.0458446629345417,
0.019549837335944... |
def json _ converter _ custom ( self ) : log. info ('start json _ converter _ custom function') self. news _ collector _ custom ( ) parsed = json. dumps ( self. news, indent = 4, sort _ keys = false ) print ( parsed ) | [
-0.2127666175365448,
-1.625630259513855,
0.38631927967071533,
-0.47532230615615845,
-0.6470391750335693,
-0.5837544202804565,
-0.472377210855484,
-0.624240517616272,
-0.6362105011940002,
0.1186828538775444,
-0.78725266456604,
0.5604984760284424,
1.1208564043045044,
0.935596227645874,
-0.... |
def getutcoffset ( latitude, longitude, date _ time ) : timestamp = time. mktime ( date _ time. timetuple ( ) ) requesturl = " https : / / maps. googleapis. com / maps / api / timezone / json? location = % f, % f & timestamp = % d & sensor = true " % ( latitude, longitude, timestamp ) try : httpresponse = urlopen ( req... | [
-1.142159104347229,
0.153032585978508,
0.8278623819351196,
-0.6381354331970215,
-0.5341779589653015,
0.21863308548927307,
-0.7149813175201416,
0.5119314193725586,
0.005519497208297253,
0.39763471484184265,
-0.3745507597923279,
0.21159891784191132,
0.04150430113077164,
-0.17697949707508087,... |
def match _ dtype _ to _ c _ struct ( device, name, dtype, context = none ) : fields = sorted ( dtype. fields. iteritems ( ), key = lambda ( name, ( dtype, offset ) ) : offset ) c _ fields = [ ] for field _ name, ( field _ dtype, offset ) in fields : c _ fields. append ( " % s % s ; " % ( dtype _ to _ ctype ( field _ d... | [
0.45544785261154175,
0.9335928559303284,
0.9171239733695984,
-0.49609896540641785,
-0.777563214302063,
-0.9234755039215088,
0.708556056022644,
-0.5214931964874268,
-0.3545493185520172,
0.45007628202438354,
-0.9475433826446533,
0.214219331741333,
0.3180111050605774,
0.09038594365119934,
0... |
def get _ signal ( self, frame ) : x, y, w, h = self. bbox if self. n % 60 = = 0 : self. offsets = self. roi _ finder. get _ roi ( frame, self. bbox ) newsample = 0 rois = [ ] for ( offset _ x, offset _ y, size _ x, size _ y ) in self. offsets : x _ roi = int ( x + offset _ x * w ) w _ roi = int ( w * size _ x ) y _ ro... | [
-0.6077101230621338,
0.289899080991745,
0.9727819561958313,
-0.3414497971534729,
-0.6071878671646118,
-0.3058300018310547,
-0.10536781698465347,
-0.8101590871810913,
0.6670117974281311,
0.7233342528343201,
-0.34757694602012634,
0.4850004017353058,
0.20694881677627563,
0.4851129949092865,
... |
def compute _ inputs ( self, image _ group ) : # get the max image shape max _ shape = tuple ( max ( image. shape [ x ] for image in image _ group ) for x in range ( 3 ) ) # construct an image batch object image _ batch = np. zeros ( ( self. batch _ size, ) + max _ shape, dtype = keras. backend. floatx ( ) ) # copy all... | [
-1.0678586959838867,
-0.12902680039405823,
0.5158679485321045,
0.17441938817501068,
0.2635207772254944,
-0.2959679663181305,
0.024508213624358177,
0.020672408863902092,
-0.24558769166469574,
0.75446617603302,
0.21354003250598907,
0.2654038667678833,
0.00825782772153616,
0.493634432554245,
... |
def instance _ system _ metadata _ update ( context, instance _ uuid, metadata, delete ) : impl. instance _ system _ metadata _ update ( context, instance _ uuid, metadata, delete ) | [
-1.5001285076141357,
-0.513562023639679,
0.3456885516643524,
-0.2000156044960022,
0.36563411355018616,
0.5569042563438416,
-0.4018150269985199,
0.9700071811676025,
-0.34662556648254395,
1.3105335235595703,
-0.16281038522720337,
1.3096083402633667,
-0.10486888885498047,
-0.721484363079071,
... |
def begin _ delete _ order _ item _ by _ name ( self, order _ item _ name : str, resource _ group _ name : str, * * kwargs : any ) - > lropoller [ none ] : api _ version = self. _ get _ api _ version ('begin _ delete _ order _ item _ by _ name') if api _ version = ='2020 - 12 - 01 - preview': from. v2020 _ 12 _ 01 _ pr... | [
-1.0341241359710693,
-0.6132396459579468,
0.9840173125267029,
0.08843390643596649,
-1.2314544916152954,
-0.36654412746429443,
0.25239816308021545,
-0.9725987911224365,
0.18736951053142548,
0.8255211114883423,
-0.20888417959213257,
0.35908710956573486,
-0.21213406324386597,
0.21608501672744... |
def _ plot _ spectrum ( self, ydata, figsize = ( 15, 7 ), show = true, fmin = none, fmax = none ) : if fmin is none : fmin = np. min ( self. freqs ) if fmax is none : fmax = np. max ( self. freqs ) # make sure frequency data is the first index ydata = np. transpose ( ydata, axes = ( [ ydata. shape. index ( self. freqs.... | [
-0.2512420415878296,
0.6716601848602295,
1.067905306816101,
-0.6010653376579285,
-0.960521399974823,
-0.4368390142917633,
0.3553774952888489,
-0.08575068414211273,
-0.00025974816526286304,
-0.2838214337825775,
0.6559089422225952,
1.1794008016586304,
0.4546043872833252,
0.7382509708404541,
... |
def _ readtitleskeyfile ( keyfile, searchingepisode = 0 ) : try : kf = open ( keyfile,'r') except ioerror, e : raise imdbdataaccesserror, str ( e ) for line in kf : ls = line. split ('|') t = ls [ 0 ] if not t : continue if searchingepisode : if t [ - 1 ]! ='}': continue elif t [ - 1 ] = ='}': continue titled = analyze... | [
-0.6404992341995239,
-0.1555163413286209,
0.6658652424812317,
-0.7168505787849426,
-0.6535599827766418,
0.29885876178741455,
-1.2440083026885986,
0.02202237956225872,
-1.2049483060836792,
0.4387820363044739,
0.017594628036022186,
-0.38145017623901367,
-0.20256976783275604,
0.32105854153633... |
def _ tj ( j, a, x, l ) : return ( _ soft _ threshold ( sum ( np. delete ( a [ :, j ], j, axis = 0 ) * np. delete ( x, j, axis = 0 ) ), l ) / ( 2 * a [ j, j ] ) ) | [
0.8933494687080383,
0.43856081366539,
0.22728832066059113,
-0.5541045665740967,
-1.5982427597045898,
-1.5411432981491089,
0.3272392451763153,
0.4217691421508789,
-0.12046079337596893,
1.5255132913589478,
-0.39083385467529297,
-0.20536358654499054,
0.34826043248176575,
-0.08379469811916351,... |
def _ add _ document ( self, product _ data : dict ) : self. _ _ name _ input. set _ value ( product _ data ['title'] ). press _ tab ( ) self. _ _ new _ product _ area. should ( be. visible ) self. _ _ set _ product _ category ( product _ data ['category'] ) if product _ data. get ('serials') : self. _ _ set _ product ... | [
-0.6840493679046631,
-0.06063222885131836,
0.6863250732421875,
-0.21008533239364624,
0.0710858702659607,
0.6678415536880493,
0.16777677834033966,
-0.6313445568084717,
-0.07734834402799606,
0.7125807404518127,
-0.2734474837779999,
-0.04411766678094864,
0.3537665903568268,
0.4177787899971008... |
def filelist ( path ) : randomseedslist = [ 0, 23, 123, 345, 1234, 9, 2323, 927 ] ker _ size _ list = [ 10, 17, 24 ] # ker _ size _ list = [ 24 ] # number _ of _ ker _ list = [ 96, 128 ] number _ of _ ker _ list = [ 128 ] name = path. split ( " / " ) [ - 2 ] rec _ lst = [ ] for kernelnum in number _ of _ ker _ list : f... | [
0.07125478237867355,
-0.3365728557109833,
0.8038453459739685,
-0.08443573862314224,
-0.07807737588882446,
-0.46633297204971313,
0.21819263696670532,
0.5804099440574646,
0.5738857984542847,
0.4635006785392761,
-0.5337019562721252,
-0.45640671253204346,
-0.17560037970542908,
0.52997165918350... |
def sanitize ( name ) : clean _ up _ list = [ " \ \ ", " / ", " : ", " * ", "? ", " \ " ", " < ", " > ", " | ", " \ 0 " ] return " ". join ( c for c in name if c not in clean _ up _ list ) | [
0.05322032794356346,
-0.9911944270133972,
0.6320260167121887,
-0.07378461956977844,
-1.6451624631881714,
0.12807811796665192,
-0.8829837441444397,
-0.6836650967597961,
0.011159076355397701,
0.6094148755073547,
-1.0333025455474854,
-0.9212609529495239,
-0.8847866058349609,
0.172733917832374... |
def apply _ sensor _ model ( self, proposal _ dist, obs, weights ) : obs _ ranges = obs [ 0 ] obs _ angles = obs [ 1 ] num _ rays = obs _ angles. shape [ 0 ] # only allocate buffers once to avoid slowness if not isinstance ( self. queries, np. ndarray ) : self. queries = np. zeros ( ( proposal _ dist. shape [ 0 ], 3 ),... | [
-0.2123682200908661,
0.058943573385477066,
0.47878414392471313,
-0.14203839004039764,
0.3210567235946655,
0.3445400297641754,
-0.12849196791648865,
0.1081947311758995,
0.3027781844139099,
0.46259111166000366,
0.32821258902549744,
-0.4441782236099243,
0.08478769659996033,
0.0073675732128322... |
def _ create _ examples ( self, lines, set _ type ) : logger. info ( " samples : { } ". format ( len ( lines ) ) ) examples = [ ] for ( i, line ) in enumerate ( lines ) : if i = = 0 : continue guid = " % s - % s " % ( set _ type, i ) text _ a = line [ 3 ] text _ b = line [ 4 ] label = line [ 0 ] examples. append ( inpu... | [
0.11875268071889877,
-0.11851242184638977,
0.25973328948020935,
-0.3488406240940094,
0.1512046754360199,
0.16355973482131958,
-0.7889169454574585,
-0.4703814387321472,
-0.32786116003990173,
0.515984833240509,
0.23033608496189117,
-0.05199552699923515,
-0.28118276596069336,
0.42171099781990... |
def show _ yes _ no ( self ) : # for the yes / no popup, the'command'parameter must take a function that requires a single boolean parameter self. master. show _ yes _ no _ popup ('are you sure you want to quit? ', self. quit _ cui ) | [
0.7075228095054626,
0.2844984233379364,
0.5820460915565491,
1.0339665412902832,
-0.4349120557308197,
0.15404656529426575,
0.4592836797237396,
1.431535243988037,
-0.5379686951637268,
0.2075967639684677,
0.30847522616386414,
0.8962528705596924,
-0.10111355036497116,
0.66536945104599,
0.068... |
def _ get _ discovery _ url _ choices ( self, project _ id = none, allow _ version _ hack = true, min _ version = none, max _ version = none ) : url = urllib. parse. urlparse ( self. url. rstrip ('/') ) url _ parts = url. path. split ('/') # first, check to see if the catalog url ends with a project id # we need to rem... | [
-0.7837294340133667,
-0.1642751395702362,
0.5835534930229187,
0.8211954832077026,
0.3875552713871002,
0.10594810545444489,
-0.16058692336082458,
0.16357585787773132,
-0.5123344659805298,
-0.4378773868083954,
-0.17580385506153107,
0.7604601383209229,
-0.2961879074573517,
-0.0281250327825546... |
def doxyfile _ check _ py _ filter ( source _ dir ) : doxyfile = os. path. join ( source _ dir,'doxyfile') using _ py _ filter = false with open ( doxyfile ) as f : using _ py _ filter = [ l for l in f. readlines ( ) if doxyfile _ filter _ patterns. match ( l ) ] if using _ py _ filter : if not distutils. spawn. find _... | [
-0.3642847537994385,
0.1481246054172516,
0.5724034309387207,
-0.25958287715911865,
0.5775172710418701,
0.36011719703674316,
0.3727458715438843,
-0.4458721876144409,
-0.2517138719558716,
0.12749677896499634,
0.008832694962620735,
0.32871416211128235,
0.27484798431396484,
0.990470290184021,
... |
def radial _ distribution _ function ( coordinates, box _ l, simname, coords _ loc = [ 3, 6 ], nhis = 200, save = false ) : coords = coordinates [ coordinates ['type']! = 1 ]. iloc [ :, coords _ loc [ 0 ] : coords _ loc [ 1 ] ]. values # convert # to numpy array npart = np. size ( coords, 0 ) # total number of particle... | [
0.3428442180156708,
0.21634157001972198,
0.7191516757011414,
-1.0946437120437622,
0.2638581693172455,
-0.04506636783480644,
0.33288946747779846,
0.27461349964141846,
0.015042724087834358,
-0.08566635102033615,
-0.7394217848777771,
-0.004393500275909901,
-0.11090972274541855,
0.092327244579... |
def dateparse ( s ) : unaware = datetime. datetime. strptime ( s, " % y - % m - % dt % h : % m : % s. % f " ) aware = unaware. replace ( tzinfo = tz. tzutc ( ) ) return aware | [
0.6429964303970337,
-0.9823088645935059,
0.4694889485836029,
-0.1380801945924759,
-0.4119443893432617,
-0.08458609879016876,
-0.6794986724853516,
0.13136553764343262,
0.7405930161476135,
0.4802210330963135,
-0.9472953081130981,
-0.14632688462734222,
-0.3774353563785553,
-0.8483718633651733... |
def precompute _ sensor _ model ( self, max _ range _ px ) : table _ width = int ( max _ range _ px ) + 1 # don't forget to normalize the weights! def pdf ( z _ obs, z ) : var = sigma _ hit * * 2 p _ hit = ( 1 / np. sqrt ( 2 * np. pi * var ) ) * np. exp ( - ( np. power ( z _ obs - z, 2 ) / ( 2 * var ) ) ) # gaussian p ... | [
-0.017683541402220726,
-0.07243794202804565,
0.587428629398346,
-0.1248679831624031,
-0.6792208552360535,
0.46444493532180786,
0.5212967395782471,
-0.2149900197982788,
0.6811937093734741,
0.3516237437725067,
0.5339609384536743,
-0.2708629071712494,
0.3338165879249573,
-0.29275915026664734,... |
def main ( ) : start _ time = time. perf _ counter ( ) parser = argparse. argumentparser ( description ='turn a pdf / tiff or set of pdfs / tiffs into properly formatted directories for islandora book batch.') parser. add _ argument ('files ', help = " a file or directory of files to process. " ) parser. add _ argument... | [
-0.07957981526851654,
-0.12056738138198853,
0.9425644874572754,
0.42520710825920105,
0.3141915202140808,
-0.02874726429581642,
-0.15613943338394165,
0.22793053090572357,
-0.6596174240112305,
0.4355389177799225,
0.7563815116882324,
0.033166658133268356,
-0.3632766902446747,
-0.1439015865325... |
def virtual _ interface _ get _ by _ address ( context, address ) : return impl. virtual _ interface _ get _ by _ address ( context, address ) | [
-0.04082002490758896,
0.037977367639541626,
0.2529800534248352,
0.36609673500061035,
-0.8974599242210388,
-0.8299912810325623,
0.11352542042732239,
-0.4336550831794739,
0.881706953048706,
0.7646496891975403,
0.10034862905740738,
1.2136602401733398,
-0.4023619294166565,
-0.7469255924224854,... |
def warn ( msg ) : print ( msg, file = sys. stderr ) | [
1.1748929023742676,
0.017877254635095596,
0.29809966683387756,
-0.5738060474395752,
0.0669870376586914,
0.20696556568145752,
-0.17605774104595184,
-0.11082033812999725,
-0.801808774471283,
-0.31740862131118774,
0.8830935955047607,
1.5503509044647217,
0.32300427556037903,
0.6337864398956299... |
def test _ configurator ( self ) : runner = runner ( yamlmanifest ( self. manifest ) ) run1 = runner. run ( joboptions ( instance = " test1 " ) ) assert not run1. unexpectedabort, run1. unexpectedabort. get _ stack _ trace ( ) assert len ( run1. workdone ) = = 1, run1. workdone result = list ( run1. workdone. values ( ... | [
-0.45730915665626526,
0.006311073433607817,
0.6187806129455566,
0.19161775708198547,
0.06038227304816246,
-0.01468949019908905,
0.5697080492973328,
0.2253302037715912,
-0.06660066545009613,
-0.6521196365356445,
-0.23813879489898682,
-0.053671061992645264,
0.05562019720673561,
0.81090015172... |
def exhaustive _ hamiltonian _ cycle ( dist _ matrix, start ) : end _ dists = np. copy ( dist _ matrix [ :, start ] ) internal _ dist _ matrix = np. copy ( dist _ matrix ) internal _ dist _ matrix [ :, start ] = np. inf tour _ best, dist _ best = dfs _ hamiltonian ( start, internal _ dist _ matrix, end _ dists ) return... | [
-0.1741553395986557,
0.232842355966568,
0.6609299778938293,
0.49855509400367737,
-0.2782682478427887,
0.2926744520664215,
0.5317026972770691,
0.6896364688873291,
-0.762977659702301,
1.1522012948989868,
0.24000369012355804,
0.9563289880752563,
0.3417133390903473,
-0.3497482240200043,
0.34... |
def _ _ init _ _ ( self, other : gamestate, parent = none, is _ fully _ expanded = false, friend _ transitions = none, enemy _ transitions = none, matrix = none, q _ value = 0, num _ visits = 0, evaluation _ score = 0, ) : super ( ). _ _ init _ _ ( is _ upper = other. is _ upper, friends = other. friends, enemies = oth... | [
0.3117673695087433,
0.4370558261871338,
0.9202289581298828,
0.32583630084991455,
-0.3170095384120941,
-0.22867095470428467,
0.19393301010131836,
-0.5864349603652954,
0.3856612741947174,
0.3324504494667053,
0.055822137743234634,
-0.6186056733131409,
0.6788583397865295,
-0.057294782251119614... |
def _ _ init _ logger ( self ) : self. logger = logging. getlogger ('{ }. { } '. format ( _ _ name _ _, self. id ) ) | [
-0.012676737271249294,
-0.9038311243057251,
0.45454883575439453,
-0.3998166024684906,
0.39423516392707825,
-0.3839155435562134,
-0.6169492602348328,
0.5296041369438171,
-0.4476807713508606,
-0.7362028360366821,
-0.7338929772377014,
0.3906068801879883,
-0.07921043038368225,
1.31288158893585... |
def emit ( self, record ) : try : msg = self. format ( record ) self. signal. sig. emit ( msg ) # stream = self. stream # stream. write ( msg ) # stream. write ( self. terminator ) # self. flush ( ) except exception : self. handleerror ( record ) | [
-0.12462759017944336,
-0.13469916582107544,
0.5291345715522766,
0.4283856451511383,
-0.014424498192965984,
0.3512911796569824,
-0.24537019431591034,
-0.13962909579277039,
-0.06568458676338196,
0.2980184853076935,
-1.0407195091247559,
0.24152477085590363,
-0.44987669587135315,
0.97315627336... |
def printconfiguration ( self ) : print " " print " batch submission : configuration " print " - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - " print " " attributes = ['username ','executable ','config ','basedir ','mode ','test ','submit ','verbose ','queue'] for attr in attributes : print " % - * s :... | [
0.2667163908481598,
-1.1109437942504883,
0.8524770140647888,
-0.09503350406885147,
-0.15808014571666718,
0.2656594514846802,
0.10763470083475113,
-0.10225533694028854,
-1.2952600717544556,
0.2074504792690277,
-0.35753217339515686,
0.9452424049377441,
-0.00966669712215662,
0.965102374553680... |
def reconfig _ pma _ set _ pre _ cdr _ reverse _ serial _ loopback ( fpgaid, data, verbose = 1 ) : if ( verbose & 1 ) = = 1 : print " " " writing a 1 to this bit enables reverse serial loopback. writing a 0 disables pre - cdr reverse serial loopback. " " " reconfig _ pma _ set _ indirect _ register ( fpgaid, 32, data, ... | [
-0.18993808329105377,
-0.09079936891794205,
0.9611198902130127,
-0.8921544551849365,
-0.25225093960762024,
0.43770119547843933,
1.1827104091644287,
0.16398464143276215,
0.23299482464790344,
0.02052360214293003,
-0.683661937713623,
1.641459345817566,
-1.0693165063858032,
0.3982469141483307,... |
def instantiator ( cls, * * kwargs ) : def new _ instance ( request, object = none ) : instance = cls ( * * kwargs ) return instance ( request, object ) return new _ instance | [
-0.9535088539123535,
-0.5539883375167847,
0.43909430503845215,
-0.19409136474132538,
-0.6988825798034668,
0.4662632942199707,
-0.23052075505256653,
-0.05119050666689873,
0.5804358720779419,
-0.4828072488307953,
-0.83553546667099,
-0.34774550795555115,
-0.14782534539699554,
-0.0271162912249... |
def _ write ( self ) : while true : message = yield from self. _ send _ queue. get ( ) yield from self. _ websocket. send ( message ) | [
-0.699576735496521,
-0.34751400351524353,
0.6159160733222961,
-0.6019569039344788,
0.8726919293403625,
-0.4711756408214569,
0.7421352863311768,
-0.8811354637145996,
-0.17748470604419708,
0.2369091957807541,
0.07113804668188095,
0.7498317360877991,
-0.6634599566459656,
0.9501208066940308,
... |
def suppress ( self, identifier _ type, identifier ) : # turn source + identifier into a licensepool pools = self. load _ licensepools ( flask. request. library, identifier _ type, identifier ) if isinstance ( pools, problemdetail ) : # something went wrong. return pools # assume that the work is being suppressed from ... | [
-0.8846031427383423,
-0.35028794407844543,
0.26284587383270264,
0.14254795014858246,
0.027307718992233276,
0.7359054088592529,
0.4767034947872162,
-0.4512830972671509,
0.568687915802002,
0.07863332331180573,
-0.8514934778213501,
0.7760587334632874,
-0.6167162656784058,
-0.36027151346206665... |
def _ build _ driver _ dict ( self ) : self. _ driver _ dict. add ( driverdictkey. vendor _ sw _ compatible, true ) | [
-0.7960343360900879,
0.23026907444000244,
0.23364095389842987,
-0.05531555041670799,
-0.4163248836994171,
-0.2215370088815689,
-0.12148767709732056,
1.0720670223236084,
0.0688919946551323,
0.3582218289375305,
-0.39552199840545654,
-0.5806137919425964,
-0.31670260429382324,
0.97241568565368... |
def loadmaze ( self ) : maze = open ( " maze _ plan. txt ", " r " ) maze = maze. read ( ) maze = maze. split ( " \ n " ) return maze | [
-0.1937803030014038,
-0.5347577333450317,
0.4392966032028198,
-0.03353872895240784,
-0.5095815062522888,
0.48072296380996704,
0.48934537172317505,
0.8319053053855896,
-0.07337096333503723,
0.4357646405696869,
-0.9836191534996033,
-0.545582115650177,
-0.9222478866577148,
-0.1966929137706756... |
def get _ airfoil ( af _ data _ location : airfoildatalocation, af _ options = none ) : if af _ data _ location = = airfoildatalocation. file _ location : if af _ options is none : af _ options = airfoilfilelocationopt ( filename ='0012. inp') return _ get _ airfoil _ from _ file ( af _ options ) else : raise valueerro... | [
0.49723875522613525,
-1.1239157915115356,
0.4101998805999756,
-0.46144866943359375,
-0.1546373814344406,
0.19382433593273163,
0.5206160545349121,
-0.32539433240890503,
0.3146154284477234,
-0.4235379695892334,
0.8069330453872681,
1.2540507316589355,
0.5006805062294006,
-0.7662276029586792,
... |
def update _ game _ data ( self, data, shapenum ) : self. game _ dict = data httt. _ update _ vars _ from _ dict ( self, self. game _ dict ) self. cords = self. find _ box ( httt. lbox _ cords, self. mouse _ pos ) self. b _ cords = self. find _ box ( httt. bbox _ cords, self. mouse _ pos ) self. loc _ elems [ 0 ] = int... | [
0.04218760505318642,
-0.7401499152183533,
0.9899522066116333,
-0.4702746868133545,
-0.5260416865348816,
0.2345348298549652,
0.04649272933602333,
-0.5963911414146423,
-0.28589144349098206,
0.39162570238113403,
-0.006429062224924564,
0.4588082730770111,
-0.05696910247206688,
0.47370821237564... |
def entitiy _ binary _ gen ( tweet _ dic, key _ list ) : for key in key _ list : if key in tweet _ dic ['entities'] : yield int ( bool ( tweet _ dic ['entities'] [ key ] ) ) else : yield int ( false ) | [
-0.5911633372306824,
-0.15671226382255554,
0.48096925020217896,
-0.804594099521637,
0.7147265076637268,
0.5834869742393494,
-0.23628449440002441,
0.6496400237083435,
-1.3645820617675781,
0.5477879047393799,
-0.668002724647522,
-0.6553091406822205,
-0.19163088500499725,
1.4072800874710083,
... |
def p013 ( f ) : l = open ( f ). readlines ( ) numbers = [ int ( line. strip ( ) [ 0 : 11 ] ) for line in l ] sum = 0 for number in numbers : sum + = number return str ( sum ) [ 0 : 10 ] | [
0.7357460260391235,
-0.44486555457115173,
0.7624881267547607,
-1.0387955904006958,
0.755275547504425,
0.8815536499023438,
0.4801982045173645,
1.0777009725570679,
0.18677157163619995,
0.6055552363395691,
-0.10960840433835983,
-1.022897720336914,
0.8827658295631409,
-0.5675979852676392,
-0... |
def pos _ leftmost _ occ \ ( string, substring, start = 0, end = none ) : if end = = none : end = len ( string ) result = none while ( start < end - len ( substring ) + 1 ) and \ ( result = = none ) : if string [ start : start + len ( substring ) ] = = substring : return start start + = 1 | [
1.4172718524932861,
-0.5320209860801697,
0.8069573044776917,
-0.0260576494038105,
-0.591225266456604,
0.13552923500537872,
-0.41521236300468445,
-0.7278434038162231,
-0.780601441860199,
0.11613209545612335,
0.23511849343776703,
0.3830742835998535,
-0.47860947251319885,
-0.7644836902618408,... |
def _ readinfile ( self ) : with open ( os. path. join ( self. path, self. infile ),'r') as f : # line 1 - description of run self. alpha = f. readline ( ). strip ( ) # line 2 - data and fit types line2 = f. readline ( ) self. iopt = int ( line2 [ : 4 ] ) self. dinp = line2 [ 6 ] self. dfit = line2 [ 7 ] self. pinp = l... | [
-0.27092406153678894,
-0.5438142418861389,
0.8114741444587708,
-0.2802799642086029,
0.03377173840999603,
0.6071357131004333,
0.3219744563102722,
0.26055821776390076,
-1.4570420980453491,
0.42093077301979065,
-0.2203643023967743,
0.4219326674938202,
-0.6673403978347778,
0.36121711134910583,... |
def _ read ( self ) : while true : received = yield from self. _ websocket. recv ( ) if received is none : return try : yield from self. _ dispatch ( received ) except messageerror as exc : log. warning ( " received bad message : % s ", exc ) yield from self. send ( " error ", str ( exc ) ) | [
0.4229801297187805,
-0.05055221542716026,
0.9094274640083313,
-0.6099318265914917,
0.23566731810569763,
-0.33956483006477356,
-0.1341828852891922,
-0.43482843041419983,
0.22499945759773254,
-0.6614302396774292,
0.6990766525268555,
0.8428544402122498,
0.2602085769176483,
-0.3106576502323150... |
def set _ path ( obj : dict, key : str, value : any ) : # split the path into pieces path = split _ path ( key ) last = path. pop ( ) # scan down the path, one piece at a timem, creating empty maps as needed. # assumes intermediate objects are lists or dicts. val = obj for p in path : # case : index into existing list ... | [
-0.7388036847114563,
-0.4096185266971588,
0.9254012703895569,
-0.030171629041433334,
-0.8894920945167542,
0.3196122944355011,
0.3003818094730377,
-0.024364201352000237,
-0.07845243066549301,
0.7429354190826416,
-0.4627210795879364,
-0.17009980976581573,
-0.16973094642162323,
0.410072445869... |
def gettype ( ty ) : global type _ names if ty is none : return " none " t = type ( ty ) if t = = ast. name : if ty. id in type _ names. keys ( ) : return type _ names [ ty. id ] return ty. id elif t in [ np. float64 ] : return str ( t ) elif t in [ ast. index, ast. nameconstant ] : return gettype ( ty. value ) elif t ... | [
-0.20133957266807556,
-0.47485363483428955,
0.8376457691192627,
-0.5338797569274902,
-0.1084408313035965,
-0.9759565591812134,
-0.1555008888244629,
-1.3462722301483154,
0.551875114440918,
0.4812830090522766,
0.5274035930633545,
0.8084818720817566,
0.14637106657028198,
0.7004901170730591,
... |
def test _ get _ any _ order ( self ) : log. info ( " = = = = = = = = = = = start integ test get any order = = = = = = = = = = = = = = = = " ) # start sampling. self. driver. start _ sampling ( ) self. clear _ async _ data ( ) # set up the test files. # 2 recovered files # rec _ vel3d _ l _ 2 - 4 instrument, 1 metadata... | [
0.6727409958839417,
0.15573105216026306,
0.964191734790802,
0.15585419535636902,
0.8492569327354431,
0.052656762301921844,
0.006333426106721163,
-0.06884149461984634,
-0.7864657044410706,
-0.4343913495540619,
-0.16969583928585052,
0.06805358827114105,
-0.34840619564056396,
-0.4743503928184... |
def device _ class ( self ) : return sensor _ types [ self. type ] [ 3 ] | [
-0.7883797883987427,
0.15525034070014954,
0.460673987865448,
0.4354556202888489,
0.790588915348053,
1.3038742542266846,
0.5155938863754272,
-0.9292625188827515,
0.9117067456245422,
-0.6946927309036255,
0.39281195402145386,
0.4892229437828064,
-0.1811172515153885,
0.31795305013656616,
1.0... |
def findentitybyname ( self, query ) : searcher = self. searcherstrategy ( ) searcher. add ( self. _ _ class _ _ ) return self [ searcher. search ( query ) ['entity'] ] | [
-0.4333951771259308,
-1.0269511938095093,
0.23314321041107178,
-0.18800361454486847,
0.16592027246952057,
-0.11519918590784073,
-0.6147984862327576,
-1.2199554443359375,
0.3953700661659241,
0.14892683923244476,
0.41326209902763367,
-0.20924656093120575,
-0.24938733875751495,
0.928873717784... |
def write _ prediction ( args, output _ file, preds ) : relation _ labels = get _ label ( args ) with open ( output _ file, " w ", encoding = " utf - 8 " ) as f : for idx, pred in enumerate ( preds ) : f. write ( " { } \ t { } \ n ". format ( 8001 + idx, relation _ labels [ pred ] ) ) | [
-0.80277419090271,
-0.6234292984008789,
0.39406687021255493,
-0.5627038478851318,
1.0861003398895264,
0.9431511163711548,
0.11701344698667526,
0.8758636116981506,
-1.268950343132019,
0.7121782302856445,
0.28425487875938416,
0.1410873681306839,
0.2501002848148346,
-0.3951195776462555,
-0.... |
def _ _ validate _ top _ field _ extended ( self, field _ key, field _ value, model _ folder _ path ) : if field _ key = = server _ group _ targeting _ limits or field _ key = = dynamic _ cluster _ server _ group _ targeting _ limits : self. _ _ validate _ server _ group _ targeting _ limits ( field _ key, field _ valu... | [
-0.913396418094635,
-0.10752473026514053,
0.5972779393196106,
-0.02030029147863388,
-1.1740186214447021,
0.8908633589744568,
-0.1437242180109024,
-0.3480112850666046,
-0.4732150137424469,
0.5961298942565918,
0.22787868976593018,
0.8448793888092041,
0.10666724294424057,
0.5537827610969543,
... |
def get _ parents _ partitions ( self, dynamic _ partitions _ store : dynamicpartitionsstore, current _ time : datetime, asset _ key : assetkey, partition _ key : optional [ str ] = none, ) - > parentspartitionsresult : valid _ parent _ partitions : set [ assetkeypartitionkey ] = set ( ) required _ but _ nonexistent _ ... | [
-0.43436771631240845,
-0.18670876324176788,
0.7372303009033203,
-0.16036880016326904,
-0.5345309972763062,
-0.5532300472259521,
-0.31593775749206543,
-0.7820249199867249,
-0.5174339413642883,
0.4070294201374054,
0.21865689754486084,
-0.8463973999023438,
0.025809606537222862,
-0.03607748076... |
def schedule ( self ) : # format url to retrieve schedule from year1, read url, and select relevent columns. # unnamed column indicates'@'for away or is nan. url ='https : / / www. sports - reference. com / cfb / years / { } - schedule. html '. format ( self. year1 ) schedule = pd. read _ html ( url ) [ 0 ] if self. ye... | [
-0.9194878339767456,
0.054167240858078,
0.6769522428512573,
-0.2410334050655365,
-0.3903554677963257,
-0.3897343575954437,
0.1308007389307022,
-0.37923213839530945,
0.011634194292128086,
0.08221361041069031,
0.043359871953725815,
0.4642704427242279,
0.9173458218574524,
-0.8845080137252808,... |
def draw _ address ( canvas ) : # write company name canvas. setfont ('helvetica - bold ', 11 ) textobject = canvas. begintext ( 13 * cm, - 2. 5 * cm ) textobject. textline ( settings. company _ title ) canvas. drawtext ( textobject ) # write gst reg. no. canvas. setfont ('helvetica - bold ', 10 ) textobject = canvas. ... | [
-0.009736426174640656,
0.34817880392074585,
0.815924882888794,
-0.6290069222450256,
0.4775114357471466,
0.48725995421409607,
0.664850115776062,
-0.4969627261161804,
0.19183750450611115,
-0.05748682841658592,
-0.10843586176633835,
1.3513320684432983,
0.3082178831100464,
0.4339667856693268,
... |
def scrape _ pib _ archives ( df _ data, month, year, lang, out _ dir, list _ ministry ) : print ( f'scraping for { month }, { year }, { " english " if lang = = " en " else " hindi " }') n _ month, n _ year = str ( month ), str ( year ) n _ month = n _ month. lower ( ) main _ dir = out _ dir work _ dir = main _ dir + "... | [
-0.670673668384552,
0.3698327839374542,
0.7808969616889954,
-0.1039186343550682,
-0.1374760866165161,
-0.02413111738860607,
-0.08781503140926361,
0.22437478601932526,
-0.5722888708114624,
-0.13259702920913696,
0.31297582387924194,
0.12980546057224274,
0.0799207016825676,
0.4789771735668182... |
def find _ max _ min ( num _ list ) : if len ( num _ list ) > 1 : try : max _ num = int ( num _ list [ 0 ] ) min _ num = int ( num _ list [ 0 ] ) except valueerror : return'list has items that are not integers'for i in range ( len ( num _ list ) ) : # if type ( num _ list [ i ] ) in [ str, dict, tuple, set, list ] : # ... | [
-0.444349080324173,
-0.771221935749054,
0.5872453451156616,
1.1698601245880127,
0.11674823611974716,
0.30491548776626587,
-0.729825496673584,
0.32382655143737793,
0.973889946937561,
0.12214522063732147,
-0.8720877766609192,
-0.13100950419902802,
-0.7403632998466492,
1.26803719997406,
0.3... |
def createarrayfactor ( targetaz, targetza, obsid, delays, time, obsfreq, eff, flagged _ tiles, theta _ res, phi _ res, coplanar, start, end, azstart, azstop, write, radius, strip ) : # convert frequency to wavelength obswl = obsfreq / c. value # get the target azimuth and zenith anglpython / group / mwaops / nswainsto... | [
0.13144876062870026,
-0.5731638669967651,
0.7478293776512146,
-0.41307970881462097,
0.31897640228271484,
-0.3389792740345001,
0.9235577583312988,
0.4781057834625244,
0.5700910091400146,
0.18309585750102997,
0.40050187706947327,
0.6473289132118225,
-0.24736082553863525,
1.3578728437423706,
... |
def _ calculate _ ratios ( self, list _ a, list _ b ) : comparisons = [ ] l = levenshtein ( ) # for all strings in list a for i, str _ a in enumerate ( list _ a ) : # add a new list to our list of lists of comparisons comparisons. append ( [ ] ) # compare str _ a to every string in list _ b for str _ b in list _ b : # ... | [
-0.15465521812438965,
-0.4281791150569916,
0.6786282658576965,
-0.7377148866653442,
0.3205212354660034,
-0.3119981586933136,
-0.7914474606513977,
0.34600865840911865,
-0.051554154604673386,
0.571520984172821,
0.22564226388931274,
-0.4737037420272827,
-0.5011301636695862,
1.505116581916809,... |
def test _ from _ graph _ with _ levels _ bad _ depth ( ) : ( f _ reach, b _ reach ) = pg. get _ reachable _ sets ( g _ uns, source, target, max _ depth = 2 ) cfpg = pg. cfpg. from _ graph ( g _ uns, source, target, length, fwd _ reachset = f _ reach, back _ reachset = b _ reach ) assert not cfpg. graph | [
0.043137699365615845,
0.8894897103309631,
0.5034803748130798,
-0.16561168432235718,
-0.4850658178329468,
0.6962840557098389,
-0.3529118597507477,
0.023306138813495636,
-0.831245481967926,
-0.4070655107498169,
0.21282044053077698,
-0.0630260482430458,
0.13650953769683838,
-0.320421427488327... |
def level ( self ) - > str : return pulumi. get ( self, " level " ) | [
0.6047564744949341,
0.496001273393631,
0.26276612281799316,
0.46363574266433716,
0.8893958330154419,
2.0013387203216553,
-0.002774461405351758,
-0.12675291299819946,
-0.17953619360923767,
0.2889549732208252,
-0.15535138547420502,
0.3566362261772156,
0.28304171562194824,
-0.9155414700508118... |
def _ defaults _ ( self ) : defaults = [ ] for attributename, attributevalue in self. _ _ class _ _. getclassattributes ( ). items ( ) : if attributename. startswith ( " default " ) : defaults. append ( attributetuple ( \ name = attributename, value = attributevalue ) ) return defaults | [
-1.4447221755981445,
0.04737316071987152,
0.46456825733184814,
0.23242905735969543,
0.7357959747314453,
-0.17338845133781433,
-0.32893016934394836,
-0.0872141644358635,
-0.41133391857147217,
0.3708406984806061,
-0.8150600790977478,
-1.4317655563354492,
0.29971808195114136,
0.69699084758758... |
def plot _ expected _ limit _ bands ( axis, bands ) : masses = bands ['masses'] axis. fill _ between ( masses, bands ['q02'], bands ['q97'], color ='yellow') axis. fill _ between ( masses, bands ['q16'], bands ['q84'], color ='green') axis. plot ( masses, bands ['median'], color ='gray') | [
0.537375807762146,
0.23781633377075195,
0.5025141835212708,
-1.0765612125396729,
-0.11632508784532547,
1.659809947013855,
-0.10552208870649338,
-0.38277795910835266,
0.1821439266204834,
-0.5761755704879761,
0.6856682300567627,
1.3817212581634521,
0.09683270007371902,
-0.4090304970741272,
... |
def execute _ non _ query _ statement ( self, sql ) : request = tsexecutestatementreq ( self. _ _ session _ id, sql, self. _ _ statement _ id ) try : resp = self. _ _ client. executeupdatestatement ( request ) status = resp. status logger. debug ( " execute non - query statement { } message : { } ". format ( sql, statu... | [
-1.6951581239700317,
0.1830563247203827,
0.6559960246086121,
0.29974639415740967,
-0.45805490016937256,
0.3359393775463104,
-0.7048848867416382,
-1.5222222805023193,
0.6653071641921997,
0.6949231028556824,
-0.5883921980857849,
-0.07781948894262314,
-1.1604681015014648,
0.21346266567707062,... |
def shuffle _ columns ( m ) : np. random. shuffle ( m. t ) | [
-0.5860402584075928,
0.08288704603910446,
0.3192693889141083,
-0.4301508665084839,
0.25887346267700195,
0.791276216506958,
0.9569278359413147,
-0.9317805171012878,
-0.6738330721855164,
0.158018097281456,
0.6487296223640442,
0.15463294088840485,
0.40196937322616577,
-0.6324321031570435,
-... |
def cke _ mediabrowser _ head ( fields ='id _ content') : media _ url = getattr ( settings,'media _ url ','/ media /') ajax _ loader _ location = getattr ( settings,'ajax _ loader _ location') ckeditor _ script _ location = getattr ( settings,'ckeditor _ script _ location') field _ ids = fields. split ('' ) return loca... | [
-0.7885051965713501,
-0.6247107982635498,
0.3953843414783478,
0.25946059823036194,
0.16622294485569,
-0.5806629657745361,
-0.05201263725757599,
-0.7302761673927307,
-0.2195533961057663,
1.352484107017517,
-0.4078351557254791,
0.02265031449496746,
-0.4420754015445709,
0.15320651233196259,
... |
def gethandle ( self ) : return _ topods. topods _ tcompound _ gethandle ( self ) | [
0.43648862838745117,
0.07035872340202332,
0.2512795329093933,
0.07683731615543365,
1.6749523878097534,
1.8050014972686768,
1.670174479484558,
-0.48952528834342957,
-0.44539687037467957,
-0.9684368968009949,
0.3670409917831421,
-1.1133782863616943,
-1.1578279733657837,
0.07143325358629227,
... |
def scrape _ branches ( ) - > list : response = requests. get ( url ) soup = beautifulsoup ( response. content,'html5lib') form = soup. find ( id ='aspnetform') branches = [ b. attrs ['value'] for b in form. find ('select'). findall ('option') [ 1 : ] ] target = form. find ('select'). attrs ['name'] # build payload dat... | [
-0.5485464334487915,
0.36580902338027954,
0.5733509659767151,
-0.2921631932258606,
0.5114170908927917,
-0.554868757724762,
-0.15191930532455444,
0.015692442655563354,
-0.5795817375183105,
0.7134354710578918,
0.12074819952249527,
-1.0452338457107544,
0.41818907856941223,
0.2004920244216919,... |
def aggregate _ host _ add ( context, aggregate _ id, host ) : impl. aggregate _ host _ add ( context, aggregate _ id, host ) | [
-0.05186603218317032,
0.7159789800643921,
0.6776402592658997,
0.7325429320335388,
0.6812410950660706,
0.590000331401825,
-0.6794669032096863,
-0.03456052020192146,
-0.7305576205253601,
0.18501490354537964,
-0.05340069532394409,
0.396269828081131,
-0.4022231101989746,
-0.24970294535160065,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.