text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ element _ text ( self, name ) : selector = self. wait _ for _ element _ found ( name,'button / input / a / img ','this') text = self. get _ text ( selector ) return text | [
-0.9652589559555054,
-0.48635992407798767,
0.47271013259887695,
0.6960587501525879,
-0.2864747941493988,
-0.3778655230998993,
0.14583002030849457,
-0.8592042922973633,
0.23374421894550323,
0.7000117301940918,
-1.2267059087753296,
-0.8198859691619873,
-0.07813331484794617,
0.376494199037551... |
def updatedraftthingtype ( self, thingtypeid, name, description, schemaid, metadata = none ) : draftthingtypeurl = apiclient. draftthingtypeurl % ( self. host, thingtypeid ) draftthingtypeupdate = {'name': name,'description': description,'schemaid': schemaid,'metadata': metadata } r = requests. put ( draftthingtypeurl,... | [
-2.031925678253174,
-0.6058270335197449,
0.7040828466415405,
-0.25086528062820435,
-0.3342359960079193,
-0.00975488405674696,
-0.7913426756858826,
-0.4830898344516754,
-0.34157299995422363,
1.087354302406311,
-0.5563526749610901,
1.1983579397201538,
-1.570605993270874,
-0.14453984797000885... |
def save _ data ( self, f _ out ) : with pd. excelwriter ( f _ out ) as writer : for name in self. _ _ sheets : df = self. _ _ sheets [ name ]. drop ( ['coeff'], axis = 1 ) df. to _ excel ( writer, sheet _ name = name ) | [
0.041123609989881516,
-0.3775315582752228,
0.35186877846717834,
0.21967795491218567,
0.4566555619239807,
0.3196365237236023,
0.07425932586193085,
0.06600296497344971,
-1.071642518043518,
-0.5279196500778198,
-0.5854091644287109,
-0.3985568881034851,
0.276258260011673,
0.43983015418052673,
... |
def dark _ prior _ model _ tag ( self ) - > str : if self. dark _ prior _ model is none : return " " tag = conf. instance [ " notation " ] [ " prior _ model _ tags " ] [ " mass " ] [ self. dark _ prior _ model. name ] return f " _ _ dark _ { tag } " | [
-0.07183496654033661,
-0.5767050385475159,
0.680586576461792,
-0.37385642528533936,
0.8340114951133728,
0.4342750012874603,
-0.06223900243639946,
-0.39020836353302,
-0.7893914580345154,
-0.016981100663542747,
-0.17178022861480713,
0.27289217710494995,
0.6168132424354553,
0.7187290191650391... |
def detailed _ notes _ owned ( self, x _ lc _ detailed _ notes _ version = none ) : url = lendingclub _ url ('accounts ', self. investor _ id,'detailednotes') response = self. session. get ( url = url, headers = {'x - lc - detailed - notes - version': x _ lc _ detailed _ notes _ version } ) response. raise _ for _ stat... | [
-0.26731377840042114,
-0.021370459347963333,
0.3561250567436218,
0.1543085277080536,
0.9970692992210388,
-0.23201021552085876,
-0.7766145467758179,
-0.23447661101818085,
-0.4520818889141083,
-0.48046520352363586,
-0.5861037969589233,
1.0256037712097168,
-0.6552494168281555,
0.0004314253164... |
def distributed _ sinkhorn ( out : torch. tensor, sinkhorn _ iterations : int, world _ size : int, epsilon : float ) - > torch. tensor : eps _ num _ stab = 1e - 12 q = torch. exp ( out / epsilon ). t ( ) # q is k - by - b for consistency with notations from our paper b = q. shape [ 1 ] * world _ size # number of sample... | [
0.3572194576263428,
0.17773960530757904,
0.8307459354400635,
0.7836730480194092,
-0.8227327466011047,
-0.20694929361343384,
0.8043208122253418,
-0.07208733260631561,
0.1842593550682068,
0.7426196932792664,
0.692038357257843,
-0.05347546935081482,
-0.22843869030475616,
0.49159374833106995,
... |
def query ( u : dict ) - > tuple : is _ valid ( u ) # copy and record the query for later postprocessing # we could store counters to save memory but this is more compact log. append ( { * * u } ) # calculate number of shared anime shared, u _ scores, p _ scores = shared _ vector ( u, private ) # calculate pearson's co... | [
-0.4453224241733551,
0.6944661140441895,
0.6566569805145264,
-0.7708842158317566,
-0.6680634617805481,
-0.482909232378006,
0.3423231542110443,
0.13731400668621063,
0.625281810760498,
0.011223412118852139,
0.000016577889255131595,
0.05263475701212883,
-0.9648293256759644,
-0.441024601459503... |
def dump ( self, * args ) : return _ snap. tneanetmp _ dump ( self, * args ) | [
-0.8295082449913025,
0.03149375319480896,
0.1828777939081192,
-0.5922590494155884,
1.2866883277893066,
0.9540194272994995,
0.5779345631599426,
0.19787834584712982,
-0.15814024209976196,
0.5618807673454285,
-0.5411772131919861,
-1.7562942504882812,
-0.5898504853248596,
1.4270144701004028,
... |
def delete ( self, letter _ number ) : rep = self. send ( f " dele { letter _ number } " + crlf ) return rep | [
0.03565671667456627,
0.16103291511535645,
0.4795970320701599,
0.15216907858848572,
0.5167885422706604,
-0.6328897476196289,
0.35527753829956055,
0.5709009766578674,
1.0727301836013794,
0.07347984611988068,
-0.44663169980049133,
0.602025032043457,
-1.524797797203064,
-0.2782294750213623,
... |
def cech _ diff _ and _ lift ( self, n _ dim, deg, start _ chains, r ) : # store space for coordinates in first page betas _ 1 _ page = np. zeros ( ( len ( r ), self. page _ dim _ matrix [ 1, deg, n _ dim - 1 ] ) ) # store space for preimages lift _ chains = local _ chains ( self. nerve _ spx _ number [ n _ dim - 1 ] )... | [
0.013133962638676167,
-0.48351117968559265,
0.5659916400909424,
0.2690434753894806,
-0.28924453258514404,
0.04759790003299713,
0.898763120174408,
-0.47850337624549866,
-0.5435164570808411,
0.13435199856758118,
-0.17493414878845215,
-0.31558623909950256,
-0.01644154265522957,
0.387372910976... |
def _ _ new _ _ ( cls, numerator = 0, denominator = none, *, _ normalize = true ) : self = super ( fraction, cls ). _ _ new _ _ ( cls ) if denominator is none : if type ( numerator ) is int : self. _ numerator = numerator self. _ denominator = 1 return self elif isinstance ( numerator, numbers. rational ) : self. _ num... | [
-0.48601874709129333,
-0.3051760494709015,
0.6549883484840393,
-0.6488805413246155,
-0.6566889882087708,
-1.1337487697601318,
-0.1435679942369461,
-0.16789844632148743,
0.3486117720603943,
-1.1574896574020386,
0.7317705750465393,
-0.5878822207450867,
0.2469450980424881,
-0.1344726681709289... |
def get _ requirements ( ) : requirements = [ ] with open ( os. path. join ( base _ directory,'requirements. txt'),'r ', encoding ='utf - 8') as requirements _ file : lines = requirements _ file. readlines ( ) for line in lines : requirements. append ( line. strip ( ) ) return requirements | [
-0.251104474067688,
-1.1870636940002441,
0.29655441641807556,
0.0969843715429306,
0.7445715665817261,
1.100064992904663,
-0.9907815456390381,
0.8681769967079163,
-0.23971915245056152,
0.574385404586792,
-0.37959781289100647,
0.2652718424797058,
0.014339894987642765,
0.5047474503517151,
-... |
def test _ single _ value ( self ) : expected = np. array ( [ [ 3, 3 ] ] * 10 ) for x in ( 3, [ 3 ], [ [ 3 ] ] ) : result = _ as _ pairs ( x, 10 ) assert _ equal ( result, expected ) # test with dtype = object obj = object ( ) assert _ equal ( _ as _ pairs ( obj, 10 ), np. array ( [ [ obj, obj ] ] * 10 ) ) | [
-1.0302996635437012,
0.8891358971595764,
0.50638747215271,
-0.17224064469337463,
0.33830690383911133,
0.0417933389544487,
0.7815487384796143,
0.30666273832321167,
0.9202384352684021,
0.23105446994304657,
-0.5325042009353638,
-0.2731199264526367,
0.14131172001361847,
0.5679234266281128,
0... |
def filter ( self, mode = none, variable = none, containlabel = true ) : if mode = = none : mode = self. modes if variable = = none : variable = [ " t " ] + self. variables if isinstance ( mode, str ) : mode = [ mode ] if isinstance ( variable, str ) : variable = [ variable ] res = [ ] for m in mode : temp = [ ] for i ... | [
-0.7967613339424133,
-0.8826411962509155,
0.743539035320282,
-0.8955069184303284,
0.20882713794708252,
0.2875286042690277,
-0.47866231203079224,
0.06806451827287674,
-0.8852692246437073,
1.2380794286727905,
0.1867012083530426,
-0.3843556046485901,
-0.8936890363693237,
-0.15832114219665527,... |
def addnode ( self, * args ) : return _ snap. tungraph _ addnode ( self, * args ) | [
-1.0360392332077026,
0.8125326037406921,
0.5016469955444336,
0.7541466355323792,
1.0517933368682861,
0.2903522551059723,
0.0002184448530897498,
0.5597485303878784,
0.6380674242973328,
-0.7090664505958557,
-0.23807130753993988,
-0.14863495528697968,
-1.0547301769256592,
0.07403292506933212,... |
def find _ path ( self, start : tuple [ float, float ], end : tuple [ float, float ], large : bool = false, influence : bool = false, window : optional [ tuple [ tuple [ float, float ], tuple [ float, float ] ] ] = none, distance _ from _ target : optional [ float ] = none ) - > tuple [ list [ tuple [ int, int ] ], flo... | [
-0.6681513786315918,
-0.06524566560983658,
0.8966649770736694,
0.2601538300514221,
0.2558894753456116,
-0.2956227958202362,
0.32798680663108826,
0.07521527260541916,
-0.732193648815155,
0.9166815876960754,
0.3226014971733093,
0.3414953649044037,
-0.5963972806930542,
0.3266032934188843,
-... |
def getdistr ( self, * args ) : return _ snap. tgstat _ getdistr ( self, * args ) | [
0.35035306215286255,
0.46421825885772705,
0.19700220227241516,
0.20433835685253143,
0.670627236366272,
0.32903486490249634,
0.9554606080055237,
-0.7838176488876343,
-0.9594922661781311,
-1.1545021533966064,
-0.5961529016494751,
-0.7072343230247498,
-0.18385426700115204,
0.7740962505340576,... |
def getmaphitsiterator ( * args ) : return _ snap. ttable _ getmaphitsiterator ( * args ) | [
-1.014129638671875,
-0.3678881824016571,
0.4671054780483246,
0.32243430614471436,
-0.5289446115493774,
0.45734497904777527,
0.48764488101005554,
-0.5561126470565796,
-0.38140538334846497,
-0.11512721329927444,
0.8223442435264587,
-1.072566270828247,
0.24254611134529114,
-0.3523763716220855... |
def drawreseau ( self ) : g = nx. graph ( ) g. add _ nodes _ from ( self. nodes. keys ( ) ) edges = [ ] for key in self. nodes : node = self. nodes [ key ] for dest in node. connections : edge = [ key, dest. id ] edge. sort ( ) edge = tuple ( edge ) edges. append ( edge ) edges = set ( edges ) g. add _ edges _ from ( e... | [
-0.032200440764427185,
0.8693028688430786,
0.7744823694229126,
-1.1293772459030151,
0.2672591507434845,
-0.1358930766582489,
-0.19281816482543945,
0.34821954369544983,
0.12291159480810165,
-0.03271547332406044,
0.3850800395011902,
0.30205488204956055,
-0.1370113641023636,
-1.24213027954101... |
def p5 ( n ) : i = n while true : divisible = true for f in xrange ( 1, n ) : if i % f! = 0 : divisible = false break if divisible : break else : i + = 1 print ('answer of the problem 5th is % d'% i ) | [
-0.5498518347740173,
0.569132924079895,
0.4974810779094696,
0.11847060918807983,
-0.07186688482761383,
0.5837222933769226,
1.4520633220672607,
-0.6095824837684631,
-1.1404465436935425,
0.17057234048843384,
-0.3088313341140747,
-0.6813116073608398,
-1.4644984006881714,
0.3371685743331909,
... |
def tstrutil _ splitwords ( * args ) : return _ snap. tstrutil _ splitwords ( * args ) | [
-1.2144073247909546,
0.8525694012641907,
0.20802663266658783,
-0.5334579348564148,
0.5751808285713196,
-0.3426345884799957,
1.3637758493423462,
0.1377522498369217,
-0.43625715374946594,
0.6523319482803345,
-0.6424960494041443,
0.1132272407412529,
-0.41477838158607483,
0.6854723691940308,
... |
def json _ memoize ( filename ) : class jsonmemoize : def _ _ init _ _ ( self, fn ) : self. fn = fn update _ wrapper ( self, fn ) if not os. path. exists ( filename ) : with open ( filename, " w " ) as f : json. dump ( { }, f ) def _ _ call _ _ ( self, * args, * * kwargs ) : with open ( filename, " r " ) as f : memo = ... | [
-1.1534910202026367,
-0.6167886853218079,
0.8052659630775452,
-0.8951238393783569,
-0.40351879596710205,
-1.0149931907653809,
0.022442983463406563,
-0.37334343791007996,
0.5974451899528503,
0.26033344864845276,
-0.6437333226203918,
-0.08149966597557068,
0.424538254737854,
0.294196814298629... |
def deactivatelogicalinterfaceconfiguration ( self, logicalinterfaceid ) : req = apiclient. onelogicalinterfaceurl % ( self. host, " / draft ", logicalinterfaceid ) body = { " operation " : " deactivate - configuration " } resp = requests. patch ( req, auth = self. credentials, headers = { " content - type " : " applic... | [
-1.2349516153335571,
-0.5030457377433777,
0.3167974352836609,
-0.8965575695037842,
-0.8498293161392212,
0.12105856835842133,
0.24382510781288147,
-0.41202837228775024,
0.0662233754992485,
0.596656858921051,
-0.908954381942749,
0.12451034784317017,
-1.3966158628463745,
0.2832562029361725,
... |
def rhalton ( n, d, n0 = 0, d0 = 0, randomize = true, singleseed = none, seedvector = [ none ] ) : # handle input dimension correctness and corner cases if min ( n0, d0 ) < 0 : raise exception ( " starting indices ( n0, d0 ) cannot be < 0, input had ( % d, % d ) " % ( n0, d0 ) ) if min ( n, d ) < 0 : raise exception ( ... | [
-0.9872539043426514,
0.26420465111732483,
0.7386001348495483,
-0.44872090220451355,
-0.22700762748718262,
0.35921645164489746,
0.45506319403648376,
-0.09125293046236038,
0.951877772808075,
0.16119207441806793,
0.1235550120472908,
0.456898033618927,
-0.19406422972679138,
0.3074178695678711,... |
def on _ tableview _ ssd _ doubleclicked ( self, index ) : # start to send command to get data from ssd # filename = adid _ timestamp _ sn. dat # print ( self. ssdmodel. rowcount ( ) ) # filename = self. ssdmodel. item ( self. tableview _ ssd. currentindex ( ). row ( ), 0 ). data ( qt. displayrole ) rownum = self. tabl... | [
0.38625600934028625,
-0.32269489765167236,
1.118142008781433,
-0.01899401657283306,
-0.31685325503349304,
-0.07906636595726013,
0.5913711786270142,
-0.49065372347831726,
-0.033144839107990265,
-0.29100367426872253,
0.22971682250499725,
0.9870111346244812,
0.6721384525299072,
0.251391381025... |
def _ _ init _ _ ( self ) : # get folder through dialog box root = tk ( ) root. directory = tkfiledialog. askdirectory ( ) folder = root. directory root. destroy ( ) # load pickle files using glob os. chdir ( folder ) self. filelist = glob. glob ( " *. pickle " ) | [
0.21479842066764832,
-0.16221921145915985,
0.530186653137207,
-0.15885759890079498,
-0.06083348020911217,
0.3369729220867157,
1.1033427715301514,
0.7070875763893127,
-0.3541013300418854,
-0.1113700419664383,
-0.23655374348163605,
-0.19991596043109894,
1.0432062149047852,
0.669680118560791,... |
def disapprove ( self, notes ='' ) : # todo : should we validate that a non - empty reason is supplied # through the approver _ notes field here or in the view layer? # where should validation go in general? if self. state! = states. reviewing or self. approver is none : raise valueerror, \ " only reviewing changes wit... | [
-0.007441626861691475,
0.02681761234998703,
0.4944649338722229,
-0.2782279849052429,
-0.6101222038269043,
0.7353387475013733,
-0.04945716634392738,
0.6473766565322876,
-0.24512802064418793,
0.18490460515022278,
0.5899430513381958,
0.20704984664916992,
-0.7337958216667175,
0.294643759727478... |
def calculate _ revenue ( ) : periods = request. args. getlist ('period') result = { } cbr _ response = requests. get ( key _ indicators _ link ) if not cbr _ response. ok : abort ( 503 ) indicators _ dict = parse _ cbr _ key _ indicators ( cbr _ response. text ) cbr _ response = requests. get ( daily _ currency _ link... | [
-1.4975858926773071,
0.25020796060562134,
0.7122367024421692,
0.08150023221969604,
0.4105907678604126,
-0.883002758026123,
0.6363687515258789,
-0.5784283876419067,
-0.4774071276187897,
0.47419655323028564,
-0.47008371353149414,
-0.7416893243789673,
-0.7564166784286499,
0.6247606873512268,
... |
def _ _ init _ _ ( self ) : self. samll, self. large = [ ], [ ] | [
0.16048239171504974,
0.5513182282447815,
0.09128450602293015,
0.02410745434463024,
0.46191322803497314,
0.3388291299343109,
0.38008353114128113,
0.9298790097236633,
1.1525863409042358,
-0.20343101024627686,
-1.0284863710403442,
-0.09027750045061111,
0.3829239010810852,
1.5167657136917114,
... |
def copypreserve ( src, dst ) : abort _ if ( os. path. isdir ( dst ), f'destination { dst } should not be a directory') copy2 ( src, dst ) | [
-0.8142217993736267,
0.9221946001052856,
0.64931720495224,
0.823482871055603,
-0.45694977045059204,
0.15368948876857758,
-0.05496326461434364,
-0.004914481658488512,
0.41199609637260437,
0.41252824664115906,
0.22769755125045776,
0.010768471285700798,
0.24053102731704712,
-0.037802319973707... |
def is _ asset ( self ) : return self. type in { self. cash, self. investment } | [
-0.5012739896774292,
-0.07444297522306442,
0.4527736008167267,
0.19597066938877106,
0.2578749358654022,
0.6996875405311584,
0.3917329013347626,
-0.9462384581565857,
-0.09449426829814911,
-0.02358560636639595,
0.4541468322277069,
0.8141718506813049,
-1.134504795074463,
0.4462772607803345,
... |
def to1d ( a, factor = 5 ) : b = np. average ( a, axis = ( 1, 2 ) ) t = b. shape [ 0 ] return np. average ( b [ : t - t % factor ]. reshape ( - 1, factor, 3 ), axis = 1 ). astype ( np. uint8 ) | [
-0.9898998737335205,
-0.1097220629453659,
0.7107715606689453,
-0.36561593413352966,
-0.4829168915748596,
0.06991729885339737,
0.5779516100883484,
0.10828842967748642,
0.9225731492042542,
1.117936372756958,
0.15609651803970337,
1.135335087776184,
-0.12570253014564514,
0.06270607560873032,
... |
def test _ op _ drop ( self ) : # case of non empty stack expressionstack = [ 1, 5, 7 ] self. testsmartcontractoperations. operations ['drop'] ( expressionstack ) assert len ( expressionstack ) = = 2 # case of empty stack expressionstack = [ ] self. testsmartcontractoperations. operations ['drop'] ( expressionstack ) a... | [
-0.539451539516449,
1.2352378368377686,
0.5899973511695862,
0.5328916907310486,
0.5894867181777954,
-0.23883695900440216,
1.0784560441970825,
-0.06323004513978958,
0.10933124274015427,
0.45287877321243286,
-0.12413972616195679,
-1.0133719444274902,
-0.4806266129016876,
-0.5483787059783936,... |
def validate ( self ) : stmt = " " " select ` age `, ` gender `, ` req _ date `, ` nationality `, ` state `, ` salary `, ` req _ id ` from ` request _ info ` where ` pan ` = % ( pan _ number ) s " " " mycursor. execute ( stmt, {'pan _ number': self. pan } ) rows = mycursor. fetchall ( ) # rows = [ [ 22,'male ','2021 - ... | [
-0.22199848294258118,
-0.326762855052948,
0.9471628069877625,
0.39069586992263794,
-0.30971771478652954,
1.145169973373413,
0.3614956736564636,
-0.3683292865753174,
0.0845281109213829,
0.008773467503488064,
0.14265912771224976,
-0.3964254856109619,
-0.6968579888343811,
0.3870485723018646,
... |
def calculate _ ifj ( vfr, vfj, vtr, vtj, y _ matrix ) : ifj = y _ matrix ['ifj ','vfr'] * vfr + y _ matrix ['ifj ','vfj'] * vfj + \ y _ matrix ['ifj ','vtr'] * vtr + y _ matrix ['ifj ','vtj'] * vtj return ifj | [
0.36645787954330444,
0.13445495069026947,
0.45897048711776733,
0.37163347005844116,
0.3261197507381439,
-0.4586877226829529,
0.48884308338165283,
0.3242012858390808,
-0.4996708035469055,
0.4602762460708618,
0.7046694159507751,
-0.3827317953109741,
-1.3935743570327759,
0.24501988291740417,
... |
def min _ max _ timestamp ( ) : try : # postgresqlに する conn = psycopg2. connect ( * * pg _ config ) table _ name ='themoviedb'logger. debug ( " get tmdb _ data " ) smt = " select max ( ts ), min ( ts ) from { } where http _ status = 200 ". format ( table _ name ) logger. info ( " query % s ", smt ) cur = conn. cursor (... | [
-0.7287878394126892,
-0.2374972403049469,
0.8192642331123352,
0.8233266472816467,
-0.6643276810646057,
0.21963688731193542,
-1.0766657590866089,
0.5811837315559387,
-0.43138784170150757,
0.5398557782173157,
-0.5481584072113037,
0.6328514814376831,
-0.389225035905838,
0.7555089592933655,
... |
def resend _ confirmation _ code ( clientid = none, secrethash = none, username = none ) : pass | [
0.8416124582290649,
0.029193846508860588,
0.2872975170612335,
1.3903882503509521,
-0.25230342149734497,
-0.8980618715286255,
0.6098255515098572,
0.7960869669914246,
-0.34899404644966125,
-0.07990767061710358,
-1.091871738433838,
1.1316778659820557,
-0.8209860920906067,
0.24059107899665833,... |
def command _ cm ( self, brain, arg ) : pattern = " ". join ( arg ) cm _ re = re. compile ( '. * % s. *'% pattern, re. i ) ret = [ ] # # url to find all currently running cmrs. url = " http : / / api. cm. ops. yahoo. com / feed / xml / " # # base web url wurl ='http : / / cm. ops. yahoo. com / requests. php? action = v... | [
-0.24175825715065002,
-1.1151747703552246,
0.9975487589836121,
-0.6893718838691711,
0.7056141495704651,
-0.6182580590248108,
-0.015988394618034363,
0.03033183515071869,
-0.18611666560173035,
0.06773000210523605,
0.17590896785259247,
0.4177114963531494,
-0.482625275850296,
0.305988937616348... |
def mssne _ eval _ grad ( n, n _ perp, t _ h, np _ eps, arr _ ones, dsm _ lds _ min _ row _ dsm _ lds _ t, n _ components, p _ h, x, sigma _ ij ) : # computing the lds similarities s _ ij, s _ hij = mssne _ eval _ sim _ lds ( n = n, n _ perp = n _ perp, t _ h = t _ h, np _ eps = np _ eps, arr _ ones = arr _ ones, dsm _... | [
-0.16934813559055328,
0.5877765417098999,
0.9209867715835571,
-0.7679663896560669,
-0.6495351195335388,
0.1421656608581543,
-0.18823766708374023,
0.8550093770027161,
-0.48685014247894287,
0.7747478485107422,
-0.15246282517910004,
0.11867031455039978,
-0.041260976344347,
0.4353785514831543,... |
def foreground _ mask ( self, slide, size = 5000, wsi _ height = false, wsi _ width = false, fn = " otsu ", min _ = 30, max _ = 190 ) : if " foreground " in self. classes : print ( " foreground is already calculated. " ) return if wsi _ width and wsi _ height : scale = self. get _ scale ( size, wsi _ height, wsi _ widt... | [
-1.2789027690887451,
0.10762882977724075,
0.7120358943939209,
0.18891198933124542,
0.05243917554616928,
-0.37222766876220703,
0.7299849390983582,
-0.8217101693153381,
0.6602121591567993,
-0.5984874367713928,
-0.7577370405197144,
0.5265835523605347,
0.7785272002220154,
1.387978434562683,
... |
def is _ fqn ( string ) : return string. count ( ". " ) > = 2 | [
-0.3650280833244324,
-0.4158429205417633,
0.468173623085022,
1.0643872022628784,
-0.3673761487007141,
-1.2349978685379028,
-0.4794410467147827,
-0.235008105635643,
0.3635118901729584,
-0.9808992147445679,
-0.5301724076271057,
-0.07579059898853302,
0.3041653037071228,
-0.35169050097465515,
... |
def myopen ( filename, mode = " r " ) : if filename. endswith ( ". gz " ) : return gzip. open ( filename, mode = mode ) else : return open ( filename, mode = mode ) | [
-0.0920596569776535,
-0.25400471687316895,
0.7307308316230774,
0.5467730760574341,
-1.216657042503357,
0.570709764957428,
0.01612859033048153,
0.34082329273223877,
-0.48351550102233887,
-0.08961234986782074,
0.22417601943016052,
-0.6785230040550232,
-0.7893882989883423,
-0.9861788153648376... |
def bboxes _ select ( bboxes, bboxes _ ref, threshold = 0. 5, method = " union " ) : bboxes, bboxes _ ref = bboxes _ nms ( bboxes, bboxes _ ref, threshold, method = method ) if bboxes. shape [ 0 ] = = 0 : return bboxes bboxes = bboxes _ reg ( bboxes, bboxes _ ref ) bboxes = rec2square ( bboxes. copy ( ) ) return bboxes | [
-0.5262845158576965,
-0.3323255777359009,
0.5129137635231018,
0.752284586429596,
-0.21751506626605988,
-0.7909305095672607,
-0.022849591448903084,
-0.5235827565193176,
1.1405328512191772,
0.24492500722408295,
0.29056307673454285,
0.2703637182712555,
0.25033804774284363,
0.2504535913467407,... |
def test _ bcdfo _ poisedness _ y ( self ) : y = array ( [ [ 0, 1, 0, 2, 1, 0 ], [ 0, 0, 1, 0, 0. 01, 2 ] ] ) qz, rz, xbase, scale = bcdfo _ build _ qr _ of _ y _ ( y, 0, 1, 1, 1, 1e15 ) lsolver = 1 whichmodel = 0 hardcons = 0 stratlam = 1 lambd, y _ radius = bcdfo _ poisedness _ y _ ( qz, rz, y, 0. 001, xbase, lsolver... | [
0.5447918176651001,
-1.0986484289169312,
0.9006758332252502,
-0.4572494328022003,
1.2242670059204102,
0.439741849899292,
0.6889172792434692,
-0.22365526854991913,
-0.026780251413583755,
-0.6390752792358398,
-0.6630368828773499,
0.04906009882688522,
-0.7966217398643494,
0.5819603800773621,
... |
def longnameof ( node ) : return cmds. ls ( node, long = true ) [ 0 ] | [
0.5009516477584839,
0.48103129863739014,
0.6713955998420715,
-1.116265892982483,
-0.11722578853368759,
-0.20144020020961761,
-0.1489551067352295,
-0.4445134103298187,
0.4787236154079437,
0.03810926154255867,
0.2092045545578003,
-0.22024570405483246,
1.2231379747390747,
0.3749196529388428,
... |
def binarize ( y, n _ cols ) : y = np. array ( y ) n _ samples = y. shape [ 0 ] bin _ matrix = np. zeros ( ( n _ samples, n _ cols ) ) for i, idx in enumerate ( y ) : bin _ matrix [ i, idx ] = 1 return bin _ matrix | [
-0.9431849718093872,
-0.5302249789237976,
0.6763009428977966,
0.9631425142288208,
1.0459449291229248,
-0.31909775733947754,
0.5507878065109253,
-0.9594991207122803,
0.10750661790370941,
0.17990505695343018,
-0.5581902861595154,
-0.1826154887676239,
-0.015279063954949379,
0.3460406959056854... |
def initiate _ auth ( authflow = none, authparameters = none, clientmetadata = none, clientid = none ) : pass | [
-0.23803691565990448,
-0.18867838382720947,
0.3351733386516571,
0.5638955235481262,
0.4866723418235779,
-0.09143281728029251,
1.1049623489379883,
0.36886894702911377,
0.023993806913495064,
-0.348786324262619,
-0.33065298199653625,
1.7973358631134033,
-0.5415321588516235,
-0.200185999274253... |
def forwardport ( device, local, remote ) : # if we're logging requests from a local desktop chrome instance there is no # device. if not device : yield return device. adb. forward ( local, remote ) try : yield finally : device. adb. forwardremove ( local ) | [
0.8847959041595459,
0.36216071248054504,
0.547600269317627,
-0.016041990369558334,
-0.32247042655944824,
0.07241690903902054,
0.14019465446472168,
-0.6523445844650269,
0.007586868945509195,
-0.3819686770439148,
0.3614271283149719,
0.5039297938346863,
-0.287090003490448,
-0.4130711853504181... |
def receive ( self, message, sender ) : for service in self. services : service. handle _ message ( message, sender ) | [
-0.2919228971004486,
0.6334006786346436,
0.43050554394721985,
0.23303604125976562,
0.5681031942367554,
-0.2746089994907379,
-0.2150101512670517,
-0.09560633450746536,
-0.9706968069076538,
-0.8081459999084473,
0.3588080108165741,
0.04005792364478111,
-0.14745962619781494,
1.4301934242248535... |
def addnode ( self, * args ) : return _ snap. tnegraph _ addnode ( self, * args ) | [
-0.8286803960800171,
1.7781990766525269,
0.23919935524463654,
0.5405526757240295,
0.8135582804679871,
0.17300908267498016,
0.46318843960762024,
0.15584291517734528,
-0.2978989779949188,
0.34286656975746155,
-0.37857359647750854,
-1.4676514863967896,
-0.896269679069519,
0.37099507451057434,... |
def test _ container _ check ( ) : sample _ exe = " python " containeruri = " docker : / / alrigazzi / smartsim - testing : latest " container = singularity ( containeruri ) rs = runsettings ( sample _ exe, container = container ) assert sample _ exe in rs. exe rs = runsettings ( sample _ exe, container = none ) assert... | [
0.19072450697422028,
0.47829321026802063,
0.3204464316368103,
1.561767816543579,
0.6388463377952576,
-0.3371299207210541,
0.7146747708320618,
0.28219515085220337,
0.9760310053825378,
-0.48375362157821655,
0.1724890023469925,
0.6161693930625916,
-0.5045661330223083,
0.6217606067657471,
0.... |
def on _ pushbutton _ start _ realtime _ clicked ( self ) : # self. sendcmdstartrealtime ( ) time. sleep ( 0. 1 ) # sleep 100 ms to wait the start cmd has been received. self. pushbutton _ start _ realtime. setenabled ( false ) self. realtimethread = realtimethread ( self. axes _ realtime, self. canvas _ realtime, 1. 0... | [
1.4933112859725952,
-0.4075751006603241,
0.5071953535079956,
0.15419597923755646,
0.17197184264659882,
-0.14857101440429688,
0.16420255601406097,
0.7551293969154358,
0.7767111659049988,
-0.06464482098817825,
-0.6221476793289185,
0.6587158441543579,
-0.3075435757637024,
0.35460594296455383,... |
def test _ add _ animals ( self ) : num _ animals _ 1 = len ( self. cell. animals ) self. cell. add _ animals ( [ self. herbivore ] ) num _ animals _ 2 = len ( self. cell. animals ) assert num _ animals _ 1 < num _ animals _ 2 | [
-0.3373033404350281,
0.8029602766036987,
0.5871825814247131,
0.21758373081684113,
1.1918150186538696,
0.5266481637954712,
-0.4040440022945404,
-1.1627620458602905,
-0.7687666416168213,
-0.22402694821357727,
-0.20127499103546143,
-0.23414933681488037,
-0.27922335267066956,
0.136657044291496... |
def setup ( self ) : file _ names = ['bill _ 0 ','bill _ 1'] pages = [ ] for fn in file _ names : with open ( os. path. join ( this _ dir, " test _ data / billpage _ html ", fn + '. txt'),'rb') as f : pages. append ( f. read ( ) ) self. soups = [ bs ( page,'html. parser') for page in pages ] | [
0.16161175072193146,
0.046318456530570984,
0.6767229437828064,
0.013869820162653923,
0.8713009357452393,
0.9295536875724792,
0.3701428472995758,
0.44448167085647583,
-0.2816321849822998,
-0.14534486830234528,
0.2372782975435257,
-0.10592501610517502,
0.7044793963432312,
1.1725810766220093,... |
def add ( self, engine _ path, path, data ) : path = self. vault. normalize ( " / " + engine _ path + " / data / " + path ) address = self. vault. vault _ adress + " / v1 " + path logging. info ( " adding the secret : % s ", address ) payload = json. dumps ( { " data " : data } ) response = self. vault. requests _ requ... | [
-0.01682666875422001,
-0.402091920375824,
0.7014093995094299,
0.46276769042015076,
0.9304678440093994,
0.6670096516609192,
-1.7436310052871704,
-0.23303383588790894,
-0.18117977678775787,
0.765421986579895,
-1.1347649097442627,
0.4002082049846649,
-0.6990332007408142,
-0.5339374542236328,
... |
def get _ last _ reports ( task _ id ) : get _ tasks _ response = get _ tasks ( task _ id ) last _ report _ id = get _ tasks _ response. xpath ('/ get _ tasks _ response / task / last _ report / report / @ id') [ 0 ] report _ count = int ( get _ tasks _ response. xpath ('/ get _ tasks _ response / task / report _ count... | [
0.2680729329586029,
0.3236541748046875,
1.0320672988891602,
-0.39959582686424255,
1.0265296697616577,
-1.2000983953475952,
0.6182661652565002,
-0.16804254055023193,
0.20961464941501617,
0.04589448124170303,
-0.21996784210205078,
0.07696221023797989,
-0.1587827354669571,
0.9515544176101685,... |
def verify _ hmac _ sha1 ( request, client _ secret = none, resource _ owner _ secret = none ) : norm _ params = normalize _ parameters ( request. params ) uri = normalize _ base _ string _ uri ( request. uri ) base _ string = construct _ base _ string ( request. http _ method, uri, norm _ params ) signature = sign _ h... | [
-0.4084521532058716,
-0.08509723842144012,
0.44621914625167847,
1.3276468515396118,
0.14995220303535461,
0.07506165653467178,
0.3283843696117401,
-0.388468474149704,
-0.16916701197624207,
0.275765985250473,
0.09818698465824127,
0.03511159494519234,
-0.20918716490268707,
0.17057351768016815... |
def set _ freq ( self, freq ) : self. freq = freq self. _ pwm. setpwmfreq ( self. freq ) self. calcpwm ( ) return | [
-0.6901023387908936,
0.3960338830947876,
0.3376277685165405,
0.2849360704421997,
-0.1628352254629135,
-0.3092673420906067,
0.5128108263015747,
0.3363557457923889,
-0.034078702330589294,
-1.3534916639328003,
-0.10344414412975311,
-0.7014733552932739,
-0.7185817360877991,
1.4645531177520752,... |
def deletematches ( ) : # sql is a variable containing the sql command used with the database to # protect against sql injection. commit _ flag ='yes'# use truncate for speed and to immediately free up space in memory. with connect ( commit _ flag ) as c : sql = " truncate matches ; " c. execute ( sql ) | [
0.9282263517379761,
0.7088049054145813,
0.6425754427909851,
0.43630561232566833,
0.5841211676597595,
0.11335336416959763,
1.0327918529510498,
0.4924554228782654,
-0.3930915892124176,
0.06890720874071121,
-0.10900336503982544,
-0.16401644051074982,
-0.9228270649909973,
-0.28889644145965576,... |
def quote _ writer ( quotes _ array, writer ) : for quote in quotes _ array : quote, author, bio _ end = quote. findchild ( ). get _ text ( ), quote. findchild ( ). findnextsibling ( ). findchild ( ). get _ text ( ), quote. findchild ( ). findnextsibling ( ). findchild ( ). findnextsibling ( ) [ " href " ] bio _ url = ... | [
-0.28452637791633606,
-0.42934370040893555,
0.5382162928581238,
0.7536354064941406,
1.1771537065505981,
-0.32227733731269836,
0.14900816977024078,
0.3426154553890228,
-0.3350777328014374,
-0.08903130143880844,
0.37095099687576294,
0.027796205133199692,
0.22518479824066162,
0.03185610473155... |
def dialog _ close ( self ) : if self. dialog : self. dialog. dismiss ( force = true ) | [
0.8730977177619934,
-0.04775036871433258,
0.29919135570526123,
-0.5025511980056763,
-0.47651243209838867,
0.4890308976173401,
-0.5808034539222717,
-0.12377115339040756,
0.11921611428260803,
-0.361783504486084,
0.684181809425354,
0.14470820128917694,
0.010311002843081951,
1.4755078554153442... |
def p800 _ usbtree ( self ) : ctx = self. item _ start ( ) # always first line of test context = pyudev. context ( ) for device in context. list _ devices ( subsystem ='tty') : _ node = str ( device. device _ node ) if " ttyacm " in _ node : self. logger. info ( f " { device. device _ node } { device. device _ type } "... | [
-0.010785355232656002,
-0.3066278398036957,
1.078443169593811,
0.04297960177063942,
0.15731950104236603,
-0.26817262172698975,
1.4513099193572998,
-0.11082734167575836,
0.018248695880174637,
-0.7090533971786499,
0.4867040514945984,
0.4767327308654785,
0.2964739501476288,
0.9730560183525085... |
def _ neumaier _ sum ( self, value : float ) : new _ sum = self. _ sum + value if abs ( self. _ sum ) > = abs ( value ) : # if self. _ sum is bigger, low - order digits of value are lost. self. _ correction + = ( self. _ sum - new _ sum ) + value else : # low - order digits of sum are lost self. _ correction + = ( valu... | [
-0.7161052227020264,
-0.21461758017539978,
0.6798145771026611,
0.2860507071018219,
-0.5082086324691772,
0.41874051094055176,
0.3291493058204651,
-1.3746038675308228,
0.5729621052742004,
0.0887487456202507,
0.10761227458715439,
0.1942373663187027,
0.2703554928302765,
0.679695188999176,
0.... |
def rotationfromquat ( q ) : r = np. zeros ( [ 3, 3 ] ) r [ 0, 0 ] = 2. 0 * ( q [ 0 ] * q [ 0 ] + q [ 1 ] * q [ 1 ] ) - 1. 0 r [ 0, 1 ] = 2. 0 * ( q [ 1 ] * q [ 2 ] - q [ 0 ] * q [ 3 ] ) r [ 0, 2 ] = 2. 0 * ( q [ 1 ] * q [ 3 ] + q [ 0 ] * q [ 2 ] ) r [ 1, 0 ] = 2. 0 * ( q [ 1 ] * q [ 2 ] + q [ 0 ] * q [ 3 ] ) r [ 1, 1 ... | [
-0.11048630625009537,
-0.5389522314071655,
0.8835887908935547,
-1.5862544775009155,
-0.22381655871868134,
0.24844512343406677,
0.09652486443519592,
-1.089814305305481,
0.68506920337677,
0.31237003207206726,
-0.2655698359012604,
-0.38816043734550476,
-0.6338988542556763,
-0.710784375667572,... |
def storprop _ cdromisdigitalplaybackenabled ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " devinfo ", " devinfodata ", " enabled " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value ) | [
-0.5378041863441467,
0.4775841534137726,
0.5688576698303223,
-0.036431845277547836,
-0.5420559644699097,
0.7040976881980896,
0.8909163475036621,
-0.2619192898273468,
0.3813727796077728,
0.5382075309753418,
-0.8652509450912476,
0.24808698892593384,
-1.1226062774658203,
0.24179214239120483,
... |
def current _ step ( self ) : return self. sequence [ self. _ current _ step ] | [
-0.9339746236801147,
-1.0234081745147705,
0.362135112285614,
0.7401412725448608,
0.19946876168251038,
0.389849990606308,
0.15820278227329254,
-0.432102769613266,
-1.2247965335845947,
-0.4167138934135437,
0.22308945655822754,
0.273628294467926,
-0.3231087327003479,
0.24237629771232605,
0.... |
def reduce _ any _ v1 ( input _ tensor, axis = none, keepdims = none, name = none, reduction _ indices = none, keep _ dims = none ) : axis = deprecation. deprecated _ argument _ lookup ( " axis ", axis, " reduction _ indices ", reduction _ indices ) keepdims = deprecation. deprecated _ argument _ lookup ( " keepdims ",... | [
0.07874715328216553,
0.19835548102855682,
0.9497042894363403,
1.0638240575790405,
-0.18414506316184998,
-0.23071858286857605,
-0.628226101398468,
0.13867519795894623,
-0.33070120215415955,
0.3767856955528259,
-0.11713439226150513,
0.4635372757911682,
-0.1193605586886406,
-0.129287153482437... |
def new _ fetch _ sample _ itinerary ( user, name, city, start _ time, end _ time, date, public ) : valid _ categories = filter _ valid _ categories ( categories, start _ time, end _ time ) candidate _ items _ groupby _ category = [ ] for category in valid _ categories : candidate _ items = fetch _ candidate _ items _ ... | [
-0.2740413546562195,
-0.5690220594406128,
0.453348308801651,
0.5628573894500732,
-1.087153673171997,
0.4773938059806824,
-0.9675373435020447,
-0.37455031275749207,
-1.2418403625488281,
0.4953123927116394,
-0.488680362701416,
0.11289453506469727,
0.07795116305351257,
-0.43426376581192017,
... |
def loaddynet ( * args ) : return _ snap. loaddynet ( * args ) | [
-1.0878582000732422,
0.8984178900718689,
0.6694536805152893,
0.5909574627876282,
0.1295754313468933,
-0.42076775431632996,
0.51328045129776,
-0.9309097528457642,
-0.8041843175888062,
-1.1311579942703247,
-1.2780853509902954,
-0.7973317503929138,
-0.21700634062290192,
1.1062102317810059,
... |
def print _ first ( words ) : word = words. pop ( 0 ) print ( word ) | [
1.2516934871673584,
0.2062818557024002,
0.400590717792511,
-0.18536968529224396,
0.8090915679931641,
0.016901936382055283,
-0.019732337445020676,
-0.008686269633471966,
-0.4709189534187317,
1.1016652584075928,
0.7991358041763306,
1.4308969974517822,
-1.074426531791687,
0.9923902750015259,
... |
def test _ file _ url ( self ) : self. assertequal ( self. storage. url ( " test. file " ), self. storage. base _ url + " test. file " ) # should encode special chars except ~! * ( )'# like encodeuricomponent ( ) javascript function do self. assertequal ( self. storage. url ( r " ~! * ( )'@ # $ % ^ & * abc ` + =. file ... | [
-0.19928501546382904,
-0.5904908180236816,
0.6270624995231628,
0.609549880027771,
0.36864662170410156,
0.01013732049614191,
0.6717561483383179,
0.4202805459499359,
-0.6421865224838257,
-0.1107548251748085,
-0.3574405610561371,
-0.4165898263454437,
-0.10207313299179077,
-0.23853477835655212... |
def matrixpadandflatten _ colmajor ( m, padsize ) : return mathsutils. matrixpadandflatten _ rowmajor ( mathsutils. matrixtranspose ( m ), padsize ) | [
-0.28627362847328186,
0.20236195623874664,
0.2740808427333832,
-0.25771042704582214,
-1.8467801809310913,
0.08770950138568878,
0.2771528959274292,
0.2670862376689911,
0.7485714554786682,
0.10697924345731735,
0.48843449354171753,
-0.6515793800354004,
-0.09788770228624344,
0.8920892477035522... |
def interpolated _ radial _ gradient ( shape, stops, values, offsets = none, outer _ radius = none, clip = true ) : outer _ radius = ( np. sqrt ( np. sum ( np. square ( shape ) ) ) / 2 if outer _ radius is none else outer _ radius ) grad = nd _ radial _ gradient ( shape, offsets ) if clip : grad = np. clip ( grad / out... | [
-1.2695897817611694,
0.21886101365089417,
0.80853271484375,
-1.3896608352661133,
-1.1278709173202515,
0.7979973554611206,
-0.7556453943252563,
0.1261206418275833,
-1.099993109703064,
0.5514367818832397,
-0.24944354593753815,
0.2818845808506012,
0.06441023200750351,
-0.17051030695438385,
... |
def admin _ set _ user _ settings ( userpoolid = none, username = none, mfaoptions = none ) : pass | [
-0.7843219041824341,
0.7778049111366272,
0.04705046862363815,
0.6206190586090088,
0.2154640257358551,
-0.5361477136611938,
0.9752873182296753,
-1.5024014711380005,
0.49557751417160034,
0.31975382566452026,
-1.2052662372589111,
1.16661536693573,
-0.6656097173690796,
-0.181819349527359,
-0... |
def decode _ watermark ( encoded _ text ) : if not isinstance ( encoded _ text, unicode ) : raise valueerror ('encoded _ text must be a unicode string') if len ( encoded _ text ) < _ watermark _ length : return encoded _ text, none # appended watermark watermark = encoded _ text [ - _ watermark _ length : ] text = enco... | [
-0.05969061329960823,
-0.5232314467430115,
0.43977490067481995,
-0.5993652939796448,
-0.9638686776161194,
0.3134876489639282,
0.4413992464542389,
0.7135999202728271,
0.761945903301239,
-0.2127784788608551,
-0.7067314982414246,
1.218591332435608,
-0.338378369808197,
-0.5274428725242615,
0... |
def llsparsematrix ( * * kwargs ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # * * * get arguments * * * # # # # # # # # # # # # ... | [
0.8346443772315979,
-0.015696119517087936,
0.9502568244934082,
-0.18314069509506226,
-0.2977345883846283,
0.4212118983268738,
0.1634889543056488,
-0.348538875579834,
-0.03465161845088005,
0.37757664918899536,
-0.12230655550956726,
0.45316168665885925,
-1.0051900148391724,
-0.21671718358993... |
def arm _ and _ takeoff ( self, atargetaltitude ) : self. vehicle. mode = vehiclemode ( " guided " ) self. vehicle. armed = true print ( " basic pre - arm checks " ) # don't let the user try to arm until autopilot is ready while not self. vehicle. is _ armable : print ( " waiting for vehicle to initialise... " ) time. ... | [
0.08744989335536957,
-0.6200584173202515,
0.6467068195343018,
-0.44492483139038086,
0.2729901671409607,
0.9493077397346497,
0.10119467973709106,
-0.1371748000383377,
-0.5013329982757568,
-0.1201791986823082,
0.1895758956670761,
0.2957054078578949,
0.10655427724123001,
-0.022294003516435623... |
def get _ index ( df ) : _, idx, _ = hist ( df. diff ( 1 ). loc [ 30 ], bins ='scott ', alpha =. 35 ) return idx | [
-0.29459890723228455,
0.7714292407035828,
0.19013646245002747,
-0.37256932258605957,
0.7306472063064575,
0.8770455121994019,
1.4273227453231812,
0.03346627950668335,
0.14335855841636658,
-0.28122690320014954,
0.49056434631347656,
0.6151628494262695,
0.340887188911438,
-0.22828954458236694,... |
def frame _ ch3 _ sgm _ change ( self ) : self. frame _ ch3 _ raw. setcurrentindex ( self. frame _ ch3 _ sgm. currentindex ) self. frame _ ch3 _ flt. setcurrentindex ( self. frame _ ch3 _ sgm. currentindex ) | [
-0.7035846710205078,
-0.6216099262237549,
0.41253462433815,
-0.4343072474002838,
0.15419615805149078,
0.41898980736732483,
0.5761024951934814,
0.260445237159729,
0.02759716659784317,
0.4657946825027466,
-1.1908012628555298,
1.1362792253494263,
0.22309651970863342,
-0.43805256485939026,
0... |
def banner _ text ( text : str = " ", screen _ width : int = 80 ) - > none : if len ( text ) > screen _ width - 4 : # print ( " eek! ", 60 ) # print ( " the text is too long to fit in the specified width ", 60 ) raise valueerror ( f " string { text } is larger then specified width { screen _ width } ", 60 ) if text = =... | [
1.1384717226028442,
0.00258450536057353,
0.7695634365081787,
1.3317607641220093,
-0.6212722063064575,
0.6476759910583496,
-0.5146129727363586,
0.6142011880874634,
0.4299072325229645,
-0.1071048229932785,
0.6122735142707825,
0.5216311812400818,
-0.6828113198280334,
0.8641538619995117,
0.2... |
def unarchive ( self ) : self. status = " current " | [
0.15460394322872162,
-1.2380635738372803,
0.27252423763275146,
-0.20948337018489838,
-0.0202340055257082,
0.9677532911300659,
0.48289933800697327,
2.0976011753082275,
-0.25076237320899963,
0.386906236410141,
-0.17465373873710632,
1.0942604541778564,
0.5090308785438538,
-0.6870468854904175,... |
def empty ( cls, dim, dtype ) : setup _ arr = np. zeros ( ( 0, dim ), dtype = dtype ) return cls ( setup _ arr. copy ( ), setup _ arr. copy ( ) ) | [
-0.41988763213157654,
-0.18144379556179047,
0.48637744784355164,
0.3659681975841522,
0.06912253051996231,
0.11247694492340088,
0.1566196233034134,
-0.5083491206169128,
-0.12040861696004868,
0.41037726402282715,
-0.16265256702899933,
1.667486310005188,
-0.22610929608345032,
0.00923634599894... |
def _ exists ( self, fspec ) : if fspec in self. _ string _ files : exists = true else : exists = os. path. exists ( fspec ) return exists | [
-0.6116562485694885,
-0.7277675867080688,
0.5605937838554382,
-1.2847039699554443,
0.6698596477508545,
0.000755840796045959,
-0.6703801155090332,
0.40849095582962036,
-1.0149130821228027,
-0.07635687291622162,
0.21280016005039215,
-0.9940443634986877,
0.544775664806366,
0.1517677754163742,... |
def modelcomplexity ( x, y ) : # create 10 cross - validation sets for training and testing cv = shufflesplit ( x. shape [ 0 ], n _ iter = 10, test _ size = 0. 2, random _ state = 0 ) # vary the max _ depth parameter from 1 to 10 max _ depth = np. arange ( 1, 11 ) # calculate the training and testing scores train _ sco... | [
0.28662940859794617,
0.5425658226013184,
1.1421617269515991,
-0.3914310932159424,
-0.086546890437603,
0.6033636927604675,
0.9862649440765381,
0.5748389363288879,
-0.1943276971578598,
0.5801518559455872,
0.2940519154071808,
0.8907492160797119,
0.8002222180366516,
0.4941271245479584,
0.353... |
def tint _ loadfrugalintv ( * args ) : return _ snap. tint _ loadfrugalintv ( * args ) | [
-0.214623361825943,
0.33978569507598877,
0.446069598197937,
0.21547991037368774,
0.0698409304022789,
-0.6340638399124146,
0.2976865768432617,
-0.2531987428665161,
-0.8000994324684143,
-0.633094310760498,
-0.06971290707588196,
0.29451197385787964,
-1.376288890838623,
0.9532402753829956,
-... |
def debt _ recovery _ item _ list ( self, debt _ recovery _ item _ list ) : self. _ debt _ recovery _ item _ list = debt _ recovery _ item _ list | [
-1.7240959405899048,
0.16981235146522522,
0.09417490661144257,
0.2831035256385803,
1.6056537628173828,
0.9490181803703308,
0.1487715095281601,
0.47846895456314087,
-0.7375568747520447,
-1.311047911643982,
-1.5351059436798096,
-1.2809181213378906,
0.35756370425224304,
-0.2947191894054413,
... |
def walk _ files ( target _ path ) : for path, dirs, files in os. walk ( target _ path ) : yield from [ os. path. join ( path, f ) for f in files if f. endswith ( '. yaml') ] | [
0.24884866178035736,
-0.38502970337867737,
0.954438328742981,
-0.01068461686372757,
0.24588051438331604,
-0.3977232873439789,
0.7444173097610474,
0.13370147347450256,
-0.10748139768838882,
-0.25423625111579895,
0.17332716286182404,
0.32858702540397644,
0.38824740052223206,
0.66923069953918... |
def validate _ authorization _ request ( self, request ) : # first check for fatal errors # if the request fails due to a missing, invalid, or mismatching # redirection uri, or if the client identifier is missing or invalid, # the authorization server should inform the resource owner of the # error and must not automat... | [
-0.8722630739212036,
0.21141865849494934,
0.7691909074783325,
0.5805160999298096,
0.0077864378690719604,
0.12376444041728973,
0.40048062801361084,
-0.12477745860815048,
0.5719394087791443,
-0.32001742720603943,
1.0764338970184326,
0.2137136608362198,
0.4387815594673157,
0.10529589653015137... |
def isedge ( self, * args ) : return _ snap. tngraphmp _ isedge ( self, * args ) | [
-0.20999380946159363,
0.3181573450565338,
0.25419172644615173,
0.5870873332023621,
1.9374173879623413,
-0.39456769824028015,
0.9566113352775574,
0.06867460906505585,
-0.6856285929679871,
0.08760426938533783,
0.5718851089477539,
-0.8498393893241882,
-2.1726677417755127,
0.16695024073123932,... |
def list2str ( alist ) : return ", ". join ( alist ) | [
-0.6936572194099426,
-0.7384966611862183,
0.47473639249801636,
0.3542165756225586,
0.0579424612224102,
0.9840404391288757,
-1.6739342212677002,
0.24056756496429443,
1.0230705738067627,
0.5462509989738464,
-0.2738979756832123,
-0.10725269466638565,
-0.1630031317472458,
-0.16048488020896912,... |
def _ build _ losses ( self ) : pass | [
-1.1073219776153564,
-1.1555445194244385,
0.18309009075164795,
-0.4281408190727234,
0.1655043065547943,
0.8334732055664062,
-0.1629047989845276,
0.02896333858370781,
0.396670401096344,
-1.0809757709503174,
0.07327405363321304,
-0.04257791116833687,
0.3286365866661072,
0.37939193844795227,
... |
def with _ evaluator ( self, evaluator ) : return self. with _ evaluators ( [ evaluator ] ) | [
-0.41500335931777954,
-0.21473099291324615,
0.1706753820180893,
-0.5195201635360718,
-0.6955924034118652,
-0.918335497379303,
-0.6175460815429688,
-0.02240898460149765,
0.7372584939002991,
-0.985698938369751,
-0.07863610237836838,
0.43350890278816223,
0.31810665130615234,
0.694131493568420... |
def word _ play ( self ) : print ( " user input doubled : " ) # easy option : print ( self. the _ words +'' + self. the _ words ) | [
0.3749558925628662,
0.34196415543556213,
0.4781497120857239,
-0.3453839123249054,
0.6065001487731934,
0.8553321361541748,
0.8919896483421326,
-1.0424989461898804,
-0.014169071801006794,
0.44752922654151917,
0.08124075084924698,
1.4292312860488892,
-0.3239368200302124,
0.6915304660797119,
... |
def load ( * args ) : return _ snap. tneanet _ load ( * args ) | [
-1.1847602128982544,
0.6387030482292175,
0.3584108352661133,
-0.8289528489112854,
0.1068037673830986,
0.8529821038246155,
0.106710284948349,
-0.8624448776245117,
-0.6030383706092834,
0.3985304534435272,
-0.2688356637954712,
-1.9059367179870605,
-0.3250043988227844,
-0.047529999166727066,
... |
def on _ pushbutton _ stopcapture _ clicked ( self ) : self. pushbutton _ startcapture. setenabled ( true ) self. sendcmdssd _ rw _ ad ( 0x01, 0x00, 0x02, 0x00, 0x0000 ) # sendcmdssd _ rw _ ad ( self, cmd, adid, flag, rsvd, startaddr ) : global gsocketbodysize gsocketbodysize = 12 self. udpsocketclient. setbufsize ( gs... | [
0.14670930802822113,
0.37567663192749023,
0.9017864465713501,
-0.13691040873527527,
-0.5400398373603821,
0.21190960705280304,
0.536758542060852,
-0.23603811860084534,
0.9579634666442871,
0.23404909670352936,
-0.18395882844924927,
0.9507453441619873,
-0.24769443273544312,
0.8305391073226929... |
def align _ to ( self, other _ bundle, ransac _ rounds = 4096, ransac _ threshold = 10. 0 ) : xa = [ ] xb = [ ] for cama, camb in zip ( self. cameras, other _ bundle. cameras ) : if cama. initialized ( ) and camb. initialized ( ) : xa. append ( cama. location ( ). flatten ( ) ) xb. append ( camb. location ( ). flatten ... | [
0.1349242478609085,
-0.8707464337348938,
0.7383359670639038,
0.12194118648767471,
0.08407313376665115,
-0.4896489679813385,
-0.1461559236049652,
-0.5662668347358704,
0.13300515711307526,
0.7473599910736084,
-0.6063801050186157,
-0.4579155743122101,
-0.2344733476638794,
0.5881550312042236,
... |
def compute _ hog _ features ( image ) : # find horizontal ( gx ) and vertical ( gy ) gradient of image gx, gy = np. gradient ( image ) # each pixel to be a vector of magnitude and orientation of the gradient mo = [ ] for y in range ( len ( gx ) ) : # makes it easier to keep it 2d mo. append ( [ ] ) for x in range ( le... | [
0.29281753301620483,
0.4057479202747345,
0.8360168933868408,
0.06723436713218689,
0.06724359095096588,
-0.18407338857650757,
0.5723217129707336,
0.16769623756408691,
0.022213220596313477,
0.5099517703056335,
0.018167506903409958,
0.19825831055641174,
-0.19289064407348633,
0.938206970691680... |
def format _ float _ tensor ( tensor ) : if isinstance ( tensor, sized ) : try : feat _ dim = len ( tensor ) except typeerror : # length of a zero - dimensional tensor / array is undefined. feat _ dim = 0 else : feat _ dim = 0 if feat _ dim < = 1 : return tqdm. format _ num ( tensor ) elif feat _ dim < = 4 : return'[ {... | [
0.10750207304954529,
-0.48637065291404724,
0.7309474945068359,
-0.3332667946815491,
0.25198763608932495,
0.15763594210147858,
0.4091411232948303,
-0.637416660785675,
-0.25221702456474304,
-0.21055692434310913,
0.2696421444416046,
0.1727166622877121,
0.6008031368255615,
0.1460205465555191,
... |
def addfltattre ( self, * args ) : return _ snap. tneanet _ addfltattre ( self, * args ) | [
-0.8972834944725037,
1.0337505340576172,
0.40212482213974,
-0.7265485525131226,
1.1794536113739014,
-0.971479594707489,
-0.21893459558486938,
-0.40062323212623596,
-0.7720910310745239,
-0.9703007936477661,
0.08406847715377808,
-1.7198436260223389,
-0.6373247504234314,
1.2443640232086182,
... |
def top _ k _ top _ p _ filtering ( logits, top _ k = 0, top _ p = 0. 0, filter _ value = - float ('inf') ) : top _ k = min ( top _ k, logits. size ( - 1 ) ) # safety check if top _ k > 0 : # remove all tokens with a probability less than the last token of the top - k indices _ to _ remove = logits < torch. topk ( logi... | [
-0.13881097733974457,
-0.5827835202217102,
0.6915269494056702,
-0.4470731317996979,
-1.4274729490280151,
0.31800058484077454,
0.13864894211292267,
0.3466986417770386,
-0.0850621908903122,
0.6051033735275269,
0.5533605217933655,
0.4769083559513092,
0.02379683032631874,
-0.9301195740699768,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.