text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def click _ login _ close _ warning ( self ) : self. click ( self. pop _ login _ war _ close ) | [
-0.7794991731643677,
0.07597911357879639,
0.48021200299263,
0.8443589806556702,
-0.11324397474527359,
0.9314445853233337,
-0.052691202610731125,
-0.3487507700920105,
0.5506173372268677,
0.73895263671875,
1.1561223268508911,
0.317779004573822,
-0.3818487226963043,
-0.6276403665542603,
1.4... |
def safedelete ( filename ) : exists = db. session. query ( db. session. query ( file ). filter _ by ( map = filename ). exists ( ) ). scalar ( ) if exists : return false else : return true | [
0.21159733831882477,
-0.15226109325885773,
0.8619766235351562,
0.1393975168466568,
0.809487521648407,
0.5965934991836548,
-0.5397369861602783,
0.5250462293624878,
-0.9183924794197083,
0.13542722165584564,
0.40092164278030396,
-1.3959548473358154,
-0.6908035278320312,
0.17198781669139862,
... |
def bayesian _ quad _ normal _ embedding ( f, n _ dim, sample _ size, mu, sigma, emb _ dim = 2, a = none, verbose = true ) : start = datetime. datetime. now ( ) if verbose : print start kernel = gpy. kern. rbf ( emb _ dim, ard = true ) if a is none : a = np. random. normal ( 0, 1, n _ dim * emb _ dim ). reshape ( emb _... | [
0.35194292664527893,
0.2681981027126312,
1.0817971229553223,
0.7684820294380188,
-0.7269437313079834,
-0.40500229597091675,
-0.16596835851669312,
0.36412370204925537,
-0.8808220624923706,
0.4745526611804962,
-0.11655978858470917,
0.2989465594291687,
-0.4813409745693207,
0.26491767168045044... |
def get _ absolute _ url ( self ) : return reverse ( " articles : detail ", args = [ self. pk ] ) | [
0.2840394973754883,
0.05040166527032852,
0.39433109760284424,
-0.6980293989181519,
1.0213215351104736,
0.8628033399581909,
-0.14773966372013092,
0.571230947971344,
-0.889563798904419,
-0.33886680006980896,
0.4232636094093323,
0.5092518925666809,
0.5618920922279358,
0.05819663777947426,
-... |
def _ delete _ lun ( self, volume ) : v = self. vmem _ vip log. info ( _ ( " deleting lun % s " ), volume ['name'] ) try : self. _ send _ cmd ( v. lun. bulk _ delete _ luns,'lun deletion started ', self. container, volume ['name'] ) except violinbackenderrnotfound : log. info ( _ ( " lun % s already deleted, continuing... | [
0.15331429243087769,
-0.6500973701477051,
0.4884798526763916,
0.07461626827716827,
0.793251097202301,
-0.8418526649475098,
-0.23384186625480652,
-0.06213783100247383,
0.826035737991333,
-0.1312374472618103,
-0.47925883531570435,
0.8443981409072876,
-0.3709285855293274,
-0.3949878215789795,... |
def number _ of _ idle _ people ( self ) - > float : return len ( [ c for c in self. cs if c. e < 1e - 6 ] ) | [
-0.1907353699207306,
0.08193671703338623,
0.38667574524879456,
-0.2494669258594513,
0.4160877764225006,
0.7010652422904968,
0.33621472120285034,
0.15980258584022522,
0.006523976568132639,
-0.41224464774131775,
-0.709455132484436,
-0.5783221125602722,
-1.0656102895736694,
0.1072281152009964... |
def parse _ sequence ( coordinate, snp _ locs, snp _ seq, snp _ call, main _ snp, start ) : lib = { " ag " : " r ", " ct " : " y ", " cg " : " s ", " at " : " w ", " gt " : " k ", " ac " : " m ", " cgt " : " b ", " agt " : " d ", " act " : " h ", " acg " : " v ", " acgt " : " n " } seq _ lijst = list ( snp _ seq ) snp ... | [
-0.19623059034347534,
-0.8413691520690918,
0.7413488626480103,
-0.9025021195411682,
-0.8396822214126587,
-0.1989271342754364,
-0.4066602289676666,
0.23813164234161377,
0.15834958851337433,
0.905832827091217,
-0.47499874234199524,
-0.07807717472314835,
-0.18426664173603058,
-0.6957213878631... |
def _ observe _ factor ( self, change ) : if change : type _ = change. get ('type') if type _! ='create': value = change ['value'] self. surface _ model. factor = value deferred _ call ( self. view. render ) | [
-0.1949998289346695,
0.23349401354789734,
0.33895933628082275,
-0.17005732655525208,
0.48652637004852295,
0.5478324294090271,
0.9220950603485107,
-0.8979907631874084,
-0.4035509526729584,
-0.4090741276741028,
-0.4373384416103363,
0.5165484547615051,
0.4434491693973541,
2.4513933658599854,
... |
def testhastaginstanceunknowntag ( self ) : self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. hastaginstance ( session, u'username / unknown ', str ( uuid4 ( ) ) ) error = yield self. assertfailure ( deferred, tnonexistenttag ) self. assertequal ( u'use... | [
0.13029317557811737,
0.5877922177314758,
0.34671497344970703,
-0.42915233969688416,
0.5608583092689514,
0.30261901021003723,
-0.23621736466884613,
0.1309567242860794,
-0.5454762578010559,
-0.7801731824874878,
-0.8567405939102173,
-0.6205412745475769,
0.5608189105987549,
0.5043364763259888,... |
def print ( self ) : # inspect solution. total _ dist = 0 for vehicle _ id in xrange ( self. data. num _ vehicles ) : index = self. routing. start ( vehicle _ id ) plan _ output ='route for vehicle { 0 } : \ n '. format ( vehicle _ id ) route _ dist = 0 route _ load = 0 while not self. routing. isend ( index ) : node _... | [
-0.3344656825065613,
-0.5056890845298767,
0.8755719661712646,
-0.9139719605445862,
-0.22033807635307312,
0.09725306183099747,
0.28026407957077026,
-0.23274964094161987,
-0.41787153482437134,
0.36302536725997925,
0.04526986926794052,
0.5234146118164062,
0.3198820650577545,
0.127532258629798... |
async def add _ service ( self, scheduler _ data : schedulerdata ) - > none : async with self. _ lock : if scheduler _ data. service _ name in self. _ to _ observe : logger. warning ( " service % s is already being observed ", scheduler _ data. service _ name ) return if scheduler _ data. node _ uuid in self. _ inverse... | [
-1.035293459892273,
-0.025885257869958878,
0.5808111429214478,
-0.009395706467330456,
0.5283209681510925,
0.46423807740211487,
-0.2197086066007614,
-0.36790189146995544,
-0.36050304770469666,
0.20325997471809387,
0.16305658221244812,
1.3038498163223267,
-0.09973513334989548,
0.267749875783... |
def get _ row _ from _ privileges _ table ( conn, tenant _ uuid ) : try : cur = conn. execute ( " select * from privileges where tenant _ id =? ", ( tenant _ uuid, ) ) except sqlite3. error as e : logging. error ( " error : % s when querying privileges table for tenant % s ", e, tenant _ uuid ) return str ( e ), none r... | [
0.3793518543243408,
0.29330018162727356,
0.4808339774608612,
0.4729113280773163,
0.025915009900927544,
-1.362147331237793,
-1.1108111143112183,
0.1600220501422882,
-0.21491089463233948,
0.5788571834564209,
1.0182206630706787,
-0.06776763498783112,
0.16668570041656494,
-0.43469759821891785,... |
def progress ( iterator, timing = true ) : length = len ( iterator ) t = time. time ( ) time _ passed = 0 for ( i, elem ) in enumerate ( iterator ) : if timing : time _ passed + = time. time ( ) - t time _ left = time _ passed / ( i + 1 ) * ( length - ( i + 1 ) ) t = time. time ( ) update _ progress ( ( i + 1 ) / lengt... | [
-0.1485769897699356,
0.4767422676086426,
0.8526788353919983,
-0.07190966606140137,
-0.8492017388343811,
0.8209407925605774,
0.37466225028038025,
0.15061847865581512,
-0.3161758482456207,
1.1118111610412598,
-0.10012222826480865,
-0.6805059909820557,
-0.751720666885376,
0.7442145347595215,
... |
def graphattentionlayer ( out _ dim, dropout, residual = false ) : _, drop _ fun = dropout ( dropout ) def init _ fun ( rng, input _ shape ) : output _ shape = input _ shape [ : - 1 ] + ( out _ dim, ) k1, k2, k3, k4 = random. split ( rng, 4 ) w _ init = glorot _ uniform ( ) # projection w = w _ init ( k1, ( input _ sha... | [
0.1225590929389,
-0.5981501340866089,
0.793388843536377,
0.02227300964295864,
-0.884681761264801,
-0.16882431507110596,
0.7345526218414307,
0.14543327689170837,
0.31905069947242737,
0.6738756895065308,
-0.17422334849834442,
0.4640638530254364,
0.05756326764822006,
-0.7805524468421936,
0.... |
def simulate ( self, n = 100, pack = false ) : return super ( ). _ simulate ( ( n, true, lambda x : self. kappa * ( self. theta - x ), lambda x, y : self. sigma ), pack ) | [
-0.5433345437049866,
1.712166428565979,
0.42409226298332214,
0.19199608266353607,
-0.31726011633872986,
-0.42307049036026,
-0.46373450756073,
-0.7907000184059143,
0.2932351231575012,
0.3453313708305359,
-1.2116272449493408,
-0.5325813293457031,
0.18356850743293762,
-0.1655445396900177,
0... |
def transcode ( file _ path, quality ) : transcodeprefs = prefs ( transcode ) if filetype ( file _ path )! = " mp3 " : new _ filepath = file _ path [ - 3 ] + " mp3 " # # # check # # # if transcodeprefs = = 0 : # # # check # # # transcodeprefs = " paranoid " shline = " lame - - preset " + transcodeprefs + file _ path + ... | [
0.1670478880405426,
-0.4822402894496918,
0.8168185353279114,
0.266838401556015,
0.8159071207046509,
0.5971856713294983,
-0.7438837885856628,
0.36971792578697205,
-0.035446010529994965,
0.4716785252094269,
-0.5124066472053528,
-0.1730344146490097,
-0.5485161542892456,
0.2526136636734009,
... |
def _ _ init _ _ ( self, parent : qpushbutton ) : super ( ). _ _ init _ _ ( parent ) deletebuttonview. _ _ button = self self. setfixedsize ( 31, 31 ) self. seticon ( qicon ( systeminfo. resources +'images / buttons / delete. svg') ) self. setenabled ( false ) self. clicked. connect ( self. _ _ on _ click ) translator.... | [
0.8709430694580078,
0.4181213080883026,
0.7635849118232727,
0.08050147444009781,
-0.5167783498764038,
-0.02130603790283203,
-0.3469499945640564,
0.045812807977199554,
0.4871642291545868,
-0.37276580929756165,
-0.5806196928024292,
-0.37023550271987915,
0.22964096069335938,
0.806885957717895... |
def play ( self, timerange ) : import matplotlib. pyplot as plt import matplotlib. animation as animation fig = plt. figure ( ) plt. hold ( true ) plt. pcolormesh ( self. lat, self. axial, self. arfidata [ :, :, 0 ] ) plt. axes ( ). set _ aspect ('equal') plt. gca ( ). invert _ yaxis ( ) plt. xlabel ('lateral ( mm )') ... | [
0.3153288960456848,
0.07270416617393494,
0.5284317135810852,
-0.296174019575119,
-0.46559378504753113,
0.724104106426239,
0.5716554522514343,
0.007766568101942539,
-0.32851046323776245,
-0.17682285606861115,
1.049674391746521,
1.1449476480484009,
0.34629297256469727,
-0.2643299102783203,
... |
def test _ calculate _ crv ( ) : # data array arr = np. ones ( ( 2, 3, 2 ) ) * 10. 0 arr [ 0, :, : ] = 1. 0 arr [ 1, 0, : ] = - 5. 0 # function crv _ mag, slopes, dir _ crv = mob. calculate _ channelized _ response _ variance ( arr, threshold = 0. 0 ) assert np. all ( crv _ mag = = np. abs ( dir _ crv ) ) assert np. al... | [
0.9089087843894958,
-0.5780412554740906,
0.8759901523590088,
0.4726102650165558,
0.7417606115341187,
0.0857185646891594,
0.26198744773864746,
0.008413293398916721,
0.24963288009166718,
-0.35975539684295654,
-0.39290812611579895,
0.6582273840904236,
-0.0727887898683548,
0.3808412551879883,
... |
def make _ position _ string ( length ) : length _ string = " " count = 0 for a in range ( length ) : if count < 9 : length _ string + = str ( count ) count + = 1 else : length _ string + = str ( count ) count = 0 return length _ string | [
-0.019370749592781067,
0.3967077434062958,
0.5183603167533875,
-1.3039003610610962,
0.2888030707836151,
0.7510132789611816,
0.20450474321842194,
-0.42859983444213867,
0.5049472451210022,
0.019006414338946342,
-0.03769637644290924,
-1.3692251443862915,
0.012257114052772522,
-1.2260690927505... |
def getpixelatbgr ( self, x, y ) : bgr = self. _ image [ y ] [ x ] b, g, r = bgr [ 0 ], bgr [ 1 ], bgr [ 2 ] return b, g, r | [
-0.2120688557624817,
-0.05210740864276886,
0.7939208745956421,
-0.6295629143714905,
0.28839313983917236,
-0.21975669264793396,
-1.4519219398498535,
-1.7448890209197998,
-0.41005605459213257,
1.2423495054244995,
-0.2707274258136749,
0.7681542634963989,
-0.3836393654346466,
0.405857056379318... |
def remove ( self, val ) : if val not in self. num2pos. keys ( ) or not self. num2pos [ val ] : return false pos = self. num2pos [ val ]. pop ( ) # swap the last location number with the number w / remove. if pos < len ( self. numloc ) - 1 : lnum = self. numloc [ - 1 ] self. numloc [ pos ] = lnum self. num2pos [ lnum ]... | [
-0.7243120670318604,
0.5719068646430969,
0.9156947731971741,
-0.7094424366950989,
-1.1384202241897583,
0.1890409141778946,
0.9620579481124878,
0.5895965695381165,
0.38403528928756714,
-0.20877103507518768,
-0.4777291417121887,
-1.0984262228012085,
-0.37883853912353516,
0.06745529919862747,... |
def apply _ tf _ transform ( x, tf ) : return ( multithreadmap ( tftransform, x, tf = tf ) ) | [
0.2964944839477539,
-0.31447622179985046,
0.5105081796646118,
-0.824468195438385,
-0.031293559819459915,
-0.17125682532787323,
-0.6228732466697693,
0.46614542603492737,
0.06953097879886627,
-0.44517460465431213,
-0.7384362816810608,
-0.8647459745407104,
-0.09846120327711105,
0.230251207947... |
def player _ by _ name ( self, name : str ) - > optional [ player ] : s = self. _ session return s. query ( player ). filter _ by ( name = name ). first ( ) | [
-0.08135026693344116,
-0.632883608341217,
0.048073600977659225,
-0.26226502656936646,
0.3364424407482147,
-1.1452558040618896,
-0.724324107170105,
-2.0013954639434814,
0.5059831738471985,
1.070210337638855,
-0.15325143933296204,
-0.11413717269897461,
-1.0254666805267334,
-0.656608760356903... |
def blitme ( self ) : self. screen. blit ( self. image, self. rect ) | [
-0.08987116813659668,
-0.5932055115699768,
0.3149905502796173,
-0.20226497948169708,
0.8673437237739563,
0.8961293697357178,
0.49119797348976135,
-1.079455852508545,
-0.5741405487060547,
-0.30986765027046204,
0.7610202431678772,
0.2824253737926483,
-0.10855578631162643,
0.5611348748207092,... |
def get _ vect ( x, x _ model ) : vec = np. concatenate ( [ get _ sent _ vec ( 300, sent, x _ model ) for sent in x ] ) return vec | [
0.10740669816732407,
-0.036120329052209854,
0.36326900124549866,
0.025520261377096176,
0.5306997895240784,
0.07940224558115005,
-0.6505749225616455,
-0.6269229650497437,
0.08226913213729858,
0.29271385073661804,
-0.5007258653640747,
0.7532585859298706,
0.43255993723869324,
-0.7107097506523... |
def run _ islands ( self, max _ steps, epsilon, min _ steps = 0, step _ increment = 1000, make _ plots = true, checkpoint _ file = none, * * do _ steps _ kwargs ) : self. start _ time = time. time ( ) self. do _ steps ( n _ steps = step _ increment, * * do _ steps _ kwargs ) converged = self. test _ convergence ( epsil... | [
-0.20104005932807922,
0.651717483997345,
0.7022425532341003,
0.5930663347244263,
0.23699912428855896,
1.0961629152297974,
-0.11920788884162903,
-0.66250079870224,
-0.5225074887275696,
-0.2892612814903259,
-0.12679745256900787,
-0.1711340844631195,
0.43842700123786926,
0.7646809816360474,
... |
def variant _ sample _ 2 ( project, institution, variant _ 2 ) : item = { " project " : project [ " @ id " ], " institution " : institution [ " @ id " ], " variant " : variant _ 2 [ " @ id " ], " call _ info " : " some _ sample ", " file " : " some _ vcf _ file ", } return item | [
0.1732439398765564,
-0.7982218861579895,
0.2415788471698761,
-0.38793838024139404,
-0.751142144203186,
-0.40110865235328674,
-1.1691125631332397,
-0.04417545348405838,
-0.7372599244117737,
0.5217912793159485,
-0.5667712092399597,
0.5642247796058655,
-0.07538812607526779,
-0.907337605953216... |
def test _ get _ artifact _ dep ( self ) : pass | [
0.5692944526672363,
-0.3511575758457184,
0.16245265305042267,
0.7985647320747375,
0.3816869556903839,
0.2076706439256668,
1.972025990486145,
-0.39730459451675415,
0.17328643798828125,
-0.799544632434845,
-0.48313474655151367,
-0.03883508965373039,
0.3278745114803314,
-0.775753378868103,
... |
def bundletype ( self ) : return b'bzip2 ', b'bz ' | [
0.10672753304243088,
-0.5950120091438293,
0.626311719417572,
0.9129341840744019,
0.42468181252479553,
0.8647958636283875,
0.4294770061969757,
0.3671228289604187,
0.29250776767730713,
0.6294621825218201,
-0.8632661700248718,
0.2234746813774109,
-0.9483202695846558,
0.545220136642456,
-0.3... |
def process ( self, file _ path, x _ index, y _ index, z _ index, t _ index = none ) : tile = np. random. randint ( 1, 254, size = ( self. parameters [ " ingest _ job " ] [ " tile _ size " ] [ " y " ], self. parameters [ " ingest _ job " ] [ " tile _ size " ] [ " x " ] ), dtype = np. uint8 ) tile _ data = image. fromar... | [
0.1590818613767624,
0.5903556942939758,
0.5567249655723572,
-0.5030346512794495,
0.2911524176597595,
-0.22533738613128662,
0.06397408246994019,
-0.2873336374759674,
-0.2859625816345215,
0.5556313395500183,
-0.32140299677848816,
0.3921976387500763,
-0.36437466740608215,
-0.29820865392684937... |
def det _ 22 ( m ) : delta = m [..., 0, 0 ] * m [..., 1, 1 ] - m [..., 1, 0 ] * m [..., 0, 1 ] return delta | [
0.17025838792324066,
-0.644511342048645,
0.5828299522399902,
0.09894967824220657,
-0.09947528690099716,
-0.16750699281692505,
1.1710779666900635,
-0.06314145028591156,
-0.13129034638404846,
-0.057062722742557526,
-0.4034140706062317,
-0.393099844455719,
0.11766456067562103,
-0.039993900805... |
def det ( self, value ) : if value < 0 or value > 1 : raise " detector. det should be between 0 and 1 " self. _ det = value | [
0.13658010959625244,
0.12183445692062378,
0.4279937148094177,
0.7658570408821106,
-0.628372311592102,
1.3130983114242554,
0.8700448870658875,
-0.5470903515815735,
-0.6690797209739685,
-1.0896507501602173,
-0.08421029895544052,
-0.5147156715393066,
0.04535818099975586,
0.9823534488677979,
... |
def imageinfo ( self ) : log. debug ( " executing volatility imageinfo plugin on { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " imageinfo " ] ( self. config ) new = { } for key, value in command. calculate ( ) : new [ key ] = value osp = new [ " suggested profile ( s ... | [
-0.48297300934791565,
-0.5405434966087341,
0.4036332666873932,
-0.5559107661247253,
0.09559322148561478,
-1.159913182258606,
-0.3285300135612488,
-0.15357212722301483,
-0.4696268141269684,
0.657463014125824,
-0.7877684235572815,
0.18152053654193878,
-0.17972899973392487,
0.9021010398864746... |
def process _ set _ altitude _ cmd ( self, t, dt ) : assert ( type ( self. altitude _ cmd ). _ _ name _ _ = ='setaltitudecmd') z _ c, theta _ c = ( self. altitude _ cmd. z _ c, self. altitude _ cmd. theta _ c ) self. platform. z _ c = z _ c altitude _ tolerance = 1. 0 / dt zerr = np. fabs ( z _ c - self. platform. z ) ... | [
0.5134836435317993,
-0.9624555110931396,
0.5335902571678162,
-0.1363075077533722,
0.5262872576713562,
0.7994818091392517,
1.0600526332855225,
-0.5597973465919495,
-0.31102922558784485,
0.7389841079711914,
0.583995521068573,
0.7225878834724426,
0.047236934304237366,
0.8568116426467896,
0.... |
def test _ transaction _ no _ jwt ( client, acc2 _ eth _ withdrawal _ transaction _ factory ) : withdrawal = acc2 _ eth _ withdrawal _ transaction _ factory ( ) response = client. get ( ( f " { sep24 _ endpoint }? id = { withdrawal. id } " f " & external _ transaction _ id = { withdrawal. external _ transaction _ id } ... | [
0.06295786798000336,
0.6929692029953003,
0.6830315589904785,
0.01689831167459488,
-0.5825721621513367,
0.08784747868776321,
-0.8035584688186646,
-1.2189836502075195,
-0.5076764225959778,
-0.44776520133018494,
-0.2019950896501541,
-0.18743868172168732,
0.9059770703315735,
-0.558310449123382... |
def _ _ init _ _ ( self, a1, a2, k, rt = none ) : if isinstance ( a2, int ) : self. _ type ='two atoms'self. indices = [ a1, a2 ] elif len ( a2 ) = = 3 : self. _ type ='point'self. index = a1 self. origin = np. array ( a2 ) elif len ( a2 ) = = 4 : self. _ type ='plane'self. index = a1 self. plane = a2 else : raise runt... | [
0.05214647948741913,
-1.2316148281097412,
0.7785542607307434,
-0.1950569450855255,
-0.32869625091552734,
0.5342388153076172,
-0.22308973968029022,
-0.5494096875190735,
0.10039356350898743,
0.12908105552196503,
-0.19840717315673828,
0.18216942250728607,
0.008365790359675884,
0.1376233696937... |
def grab _ 40 _ vectors ( x1, x2, y1, y2 ) - > list : if x1 > x2 : x1, x2 = x2, x1 if y1 > y2 : y1, y2 = y2, y1 height = abs ( y2 - y1 ) length = abs ( x2 - x1 ) height _ delta = height / 1000 length _ delta = length / 1000 left _ vertical _ edge = [ ( x1, y1 + height _ delta * i ) for i in range ( 0, 1001 ) ] # print ... | [
-0.10007031261920929,
0.206162691116333,
0.8872544765472412,
0.22459225356578827,
0.21476449072360992,
-0.02839590422809124,
0.10832235217094421,
-0.625169038772583,
0.1280185878276825,
0.4355001151561737,
-0.8244944214820862,
0.04523500055074692,
1.0948385000228882,
0.6628406047821045,
... |
def reverse _ cascade ( self, line _ from = 0, line _ to = none ) : def modified _ strip ( x ) : if x. startswith ('' ) : return x else : return x. lstrip ( ) if line _ to is none : line _ to = len ( self. textlist ) while true : oldtextlist = list ( self. textlist ) for y in range ( line _ from, line _ to ) : if y < l... | [
-0.016237670555710793,
-0.17340467870235443,
0.9308896660804749,
-0.6871373057365417,
-0.5202798843383789,
-0.16646939516067505,
-0.5569502711296082,
0.7507894039154053,
0.06738804280757904,
0.2874612510204315,
-0.3105376958847046,
0.6127511262893677,
-0.5761235952377319,
0.926781654357910... |
def normalize _ type ( type _ expression, evaluate _ name = none ) - > type : # already a pedal type if isinstance ( type _ expression, str ) and type _ expression in pedal _ type _ names : return pedal _ type _ names [ type _ expression ] ( ) if isinstance ( type _ expression, type ) : return type _ expression # what ... | [
0.12636709213256836,
-0.46328267455101013,
0.8626733422279358,
0.3574574291706085,
0.21891088783740997,
-0.5521705150604248,
0.1439642757177353,
-0.6386778354644775,
-0.39781469106674194,
-0.35559576749801636,
0.4360449016094208,
0.8011130690574646,
-0.2180078774690628,
0.30138686299324036... |
def writetoplevel ( self, config _ list, spec _ name, output _ path, xml _ file ) : doc = xml. dom. minidom. document ( ) projectnode = doc. createelementns ( " ", " project " ) projectnode. setattributens ( " ", " name ",'' ) projectnode. setattributens ( " ", " default ", " all " ) projectnode. setattributens ( " ", ... | [
-0.42256835103034973,
-0.03229266777634621,
0.8327844738960266,
0.08288207650184631,
0.4013890027999878,
0.25466427206993103,
0.8254150748252869,
0.3890976309776306,
-0.6611855030059814,
0.7131562232971191,
-0.06873393058776855,
-0.508942723274231,
0.12531065940856934,
0.8844965696334839,
... |
def sparsedensewithoptions ( n _ units, d _ input = none, sparsity _ type = none, sparsity = 0, d _ lowrank = none, prob _ sparse = none, mode = none, use _ bias = true, use _ bfloat16 = false ) : if prob _ sparse is not none : if mode is not none and mode! ='train': # for non - training modes, we want to use a sparse ... | [
0.6174930334091187,
-0.111328125,
0.8038408756256104,
0.18328937888145447,
0.4425472617149353,
0.15963049232959747,
-0.15691548585891724,
-0.30604931712150574,
1.000515341758728,
-0.5751981735229492,
0.47156670689582825,
0.26512137055397034,
-0.685891330242157,
-0.013211099430918694,
0.3... |
def test _ update _ class ( self ) : class _ data = { " id " : self. _ class. id, " subject " : self. _ class. subject, " cost " : " 49. 99 ", " schedules " : [ {'id': self. schedules _ 1. id, " week _ day " : self. schedules _ 1. week _ day, " from " : " 14 : 00 ", " to " : " 16 : 00 " }, { " week _ day " : 3, " from ... | [
-0.7135350704193115,
-0.4544523060321808,
0.8495711088180542,
-0.5093083381652832,
-0.1908784657716751,
0.34737837314605713,
-0.43084046244621277,
-0.101819708943367,
0.05886200815439224,
0.049812719225883484,
-0.7360485196113586,
0.0546083077788353,
0.02953987568616867,
-0.583262383937835... |
def test _ is _ completed _ when _ not _ completed ( self ) : completed _ project = project ( is _ completed = false ) self. assertequal ( completed _ project. was _ completed ( ), false, " are you done? you look done. yeah, you're done. " ) | [
-0.09953093528747559,
0.2306884527206421,
-0.11798027157783508,
0.3347392976284027,
1.0773556232452393,
0.8033828735351562,
0.33693820238113403,
-0.06432083249092102,
-0.07129013538360596,
-0.25663989782333374,
-0.3573775291442871,
-0.14693257212638855,
-0.2948652505874634,
0.3794184923171... |
def predeleteobject ( self, callback, * args ) : if args : self. _ objecttobedeleted = args [ 0 ]. name | [
0.10339020192623138,
-0.28067341446876526,
0.6338297724723816,
0.1673591136932373,
0.44709673523902893,
0.5216520428657532,
1.0874844789505005,
-0.36918362975120544,
0.9333826899528503,
-0.1754406839609146,
-0.8018065690994263,
0.35244932770729065,
-0.3589569628238678,
0.43233078718185425,... |
def slack _ post ( message ) : gw _ url = read _ secret ( " gateway _ url " ) slack _ url = " { 0 } / function / slack - notify ". format ( gw _ url ) response = requests. post ( slack _ url, message, headers = {'content - type':'application / text'} ) return { " status " : response. status _ code } | [
0.920316219329834,
0.29236242175102234,
0.6275895833969116,
-0.2116774022579193,
0.05863714590668678,
-0.5348396897315979,
-0.7926748991012573,
-0.2518133223056793,
-0.5328092575073242,
-0.07346964627504349,
-1.1010057926177979,
0.7550696134567261,
-0.38195550441741943,
0.982979416847229,
... |
def load _ location _ receivers ( sender ) : # using decorator pattern with old syntax # in order to decorate an existing function receiver ( post _ save, sender = sender, dispatch _ uid ='ws _ update _ mobile _ location') ( update _ mobile _ location ) | [
-0.7877530455589294,
-1.1182829141616821,
0.48524436354637146,
0.20370370149612427,
-0.6534938216209412,
-0.48373091220855713,
0.5314450263977051,
0.6981233358383179,
1.1889865398406982,
0.14549534022808075,
-0.6412065625190735,
-0.3935902714729309,
0.807384192943573,
0.30292850732803345,
... |
def knapsack ( items, capacity ) : if len ( items ) = = 0 or capacity = = 0 : return 0 value _ without = knapsack ( items [ 1 : ], capacity ) if capacity < items [ 0 ] [ 1 ] : return value _ without value _ with = items [ 0 ] [ 2 ] + knapsack ( items [ 1 : ], capacity - items [ 0 ] [ 1 ] ) return max ( value _ with, va... | [
-0.2755873501300812,
-0.27853068709373474,
0.8741295337677002,
1.2403849363327026,
-0.24047191441059113,
-0.6389234662055969,
-0.0503222830593586,
-0.10623925924301147,
-0.014592114835977554,
0.17884261906147003,
-0.7006715536117554,
-0.9001678228378296,
0.3322483003139496,
0.0120869539678... |
def maybe _ load _ voices ( self ) : if self. voices _ dict : # voices already loaded return _ logger. debug ( " loading voices from % s ", self. base _ dir ) for voice _ jar in self. base _ dir. rglob ( " *. jar " ) : if ( not voice _ jar. name. startswith ( " voice - " ) ) or ( not voice _ jar. is _ file ( ) ) : cont... | [
-0.6839901804924011,
-0.5855235457420349,
0.6340529322624207,
-0.453561395406723,
0.20117546617984772,
0.15664392709732056,
-0.4998740553855896,
-0.42967796325683594,
-0.7313600182533264,
0.18855077028274536,
-0.42383357882499695,
-0.8183056712150574,
-0.03733479976654053,
1.24493563175201... |
def _ save _ tile _ neighbors _ relationship ( self, reference _ tile, north _ neighbor, east _ neighbor, south _ neighbor, west _ neighbor ) : self. _ neighborhood [ reference _ tile ] = [ north _ neighbor, east _ neighbor, south _ neighbor, west _ neighbor ] | [
-0.1631944328546524,
0.05624834820628166,
0.6192562580108643,
-0.86252760887146,
0.35584327578544617,
0.72128826379776,
0.04487324878573418,
-0.8628607392311096,
-0.525952935218811,
0.982786238193512,
-0.8441787958145142,
-0.03501464053988457,
-0.4597563147544861,
0.2682604193687439,
0.7... |
def loglikelihoodcensored ( self, k ) : llkh = 0. 0 for j, y in enumerate ( self. y ) : if y < self. c : # # # not censored llkh + = binom. logpmf ( k = y, n = k, p = self. dil [ j ] ) else : # # # censored : likelihood prod _ i ^ m p ( y _ i > c | k ) llkh + = log ( sum ( binom. pmf ( k = arange ( self. c, 2 * self. p... | [
0.7381913661956787,
-0.7642704844474792,
0.5699486136436462,
-0.054345160722732544,
-1.3728528022766113,
0.7020156383514404,
-0.715644896030426,
-0.2702445387840271,
0.3440384864807129,
0.09732372313737869,
-0.29472851753234863,
0.5023232698440552,
-0.5882156491279602,
0.6310490965843201,
... |
def test _ validacion _ tipo _ parametros ( self ) : # primer parametro una lista self. assertraises ( typeerror, slices. obtener _ slices _ de _ tamanio, ( 132, 1 ) ) # segundo parametro un entero self. assertraises ( typeerror, slices. obtener _ slices _ de _ tamanio, ( [ ], [ ] ) ) | [
0.2545120120048523,
0.41103458404541016,
0.5051426291465759,
0.8844019174575806,
1.0877715349197388,
0.374715656042099,
-0.550218403339386,
-0.9540554881095886,
-0.16061945259571075,
0.6559721827507019,
0.14701737463474274,
0.4753689765930176,
-0.629138171672821,
0.9085142016410828,
-0.0... |
def get _ schema ( self ) : return structtype ( [ structfield ( " ingredients ", stringtype ( ), true ), structfield ( " difficulty ", stringtype ( ), true ), structfield ( " name ", stringtype ( ), true ), structfield ( " url ", stringtype ( ), true ), structfield ( " image ", stringtype ( ), true ), structfield ( " p... | [
-0.5339266657829285,
0.28178608417510986,
0.7110321521759033,
-0.32304173707962036,
0.5402771830558777,
-0.02925810217857361,
-0.5463521480560303,
0.3451237678527832,
0.31900009512901306,
-0.24805483222007751,
-0.9212004542350769,
-0.3374795913696289,
-0.39522480964660645,
-0.0219257846474... |
def load _ data ( ) : adj _ list = [ ] with open ( '. / data / kargeradj. txt ','r') as f : for line in f : line = line. strip ('\ r \ n') fields = line. split ( ) row = [ ] for field in fields : row. append ( int ( field ) ) adj _ list. append ( row ) return adj _ list | [
-0.6212291121482849,
0.2227848470211029,
0.4898194670677185,
-0.7643092274665833,
-1.002874732017517,
0.4764246344566345,
-0.39973562955856323,
1.148140549659729,
-0.5944402813911438,
0.3542335033416748,
-0.4028206765651703,
-0.23415546119213104,
0.11847824603319168,
0.6238600015640259,
... |
def _ find _ host _ link ( solution, h1, h2 ) : for he in solution [ " host _ edges " ] : if he [ " source " ] = = h1 and he [ " target " ] = = h2 : return he return none | [
-0.04365909844636917,
-0.7884101271629333,
0.6120358109474182,
0.3272976279258728,
-0.015827149152755737,
-0.10147430002689362,
-0.03085474856197834,
0.06062731146812439,
-1.4341075420379639,
0.03775787353515625,
0.8020443320274353,
0.6504989862442017,
-0.08815091103315353,
-0.817607760429... |
def get _ prob _ of _ card ( self, card ) : return self. card _ probs [ card ] | [
-0.3269074261188507,
-0.13090680539608002,
0.47768113017082214,
0.08042309433221817,
-0.17440278828144073,
0.047201935201883316,
-0.9681058526039124,
-0.24439765512943268,
0.47456222772598267,
0.3554222881793976,
0.07274586707353592,
0.18691830337047577,
-0.17973628640174866,
-0.6184780597... |
def getattributevaluesrange ( attribute, condition ) : if getattr ( condition, attribute ) = ='*': values = copy. copy ( support _ matrix [ attribute ] ) else : values = set ( [ getattr ( condition, attribute ) ] ) # filter out impossible values given condition platform. this is admittedly # fragile to changes in our s... | [
-0.17990823090076447,
-0.007941368967294693,
0.3293953239917755,
0.32253405451774597,
-0.3352116346359253,
0.05665857344865799,
0.6797161102294922,
0.29515960812568665,
-0.8201121091842651,
0.5306341648101807,
0.7389399409294128,
0.7037695050239563,
0.40234339237213135,
0.13843779265880585... |
def clear _ sums ( self ) : self. row _ sum = 0 self. col _ sum = 0 self. diagonal1 _ sum = 0 self. diagonal2 _ sum = 0 | [
0.6165152788162231,
-0.0888577327132225,
0.5726487040519714,
-0.40484562516212463,
0.5566927194595337,
0.23502621054649353,
0.6812121868133545,
-1.2393152713775635,
0.2985599637031555,
0.5242339372634888,
-0.8893218040466309,
1.051303505897522,
1.087848424911499,
-0.03350117430090904,
-0... |
def load _ and _ process _ image ( self, path, imggen = none ) : img = super ( ). load _ and _ process _ image ( path, imggen ) imagenet _ utils. preprocess _ input ( img ) return img | [
-0.7652060389518738,
0.18873193860054016,
0.36350351572036743,
-0.5311602354049683,
-0.23765292763710022,
-0.13225212693214417,
-0.14198344945907593,
0.05047043040394783,
0.46102696657180786,
-0.7030297517776489,
-0.010312304832041264,
-0.07521952688694,
0.2629562020301819,
0.3364211320877... |
def _ render _ element ( el ) : if el = = block : return gym. utils. colorize ('■ ','blue') elif el = = surface : return gym. utils. colorize ('','white') elif el = = gripper : return gym. utils. colorize ('# ','green') | [
-0.7640183568000793,
0.00030475191306322813,
0.6778465509414673,
-0.32121968269348145,
-0.21248111128807068,
0.5424312949180603,
-0.8995673060417175,
-0.3710063397884369,
0.11882521957159042,
0.3970417082309723,
0.4604600965976715,
0.1976628303527832,
0.1946052461862564,
0.5850802659988403... |
def test _ deny _ deletion _ to _ task _ not _ new ( self ) : self. task. status = task. status. assigned self. task. save ( ) self. url = reverse ( " tasks : delete _ task ", kwargs = { " pk " : self. task. pk } ) response = self. client. post ( self. url, { } ) self. assertequal ( response. status _ code, 400 ) | [
0.4750121533870697,
1.0069100856781006,
0.613939106464386,
0.7597770094871521,
1.059427261352539,
1.1770373582839966,
0.4160397946834564,
-0.3089352548122406,
0.17546993494033813,
0.04202017933130264,
-0.37754830718040466,
0.1182078868150711,
0.3794642388820648,
1.4531052112579346,
0.268... |
def parse _ profile _ shapes ( default _ shapes, min _ args, opt _ args, max _ args ) : def get _ shapes ( lst, idx ) : nonlocal default _ shapes default _ shapes = copy. copy ( default _ shapes ) if idx < len ( lst ) : default _ shapes. update ( parse _ meta ( lst [ idx ], includes _ dtype = false ) ) # don't care abo... | [
0.033260658383369446,
0.3689308762550354,
0.6897491812705994,
0.02350804954767227,
0.7797473073005676,
0.08583921939134598,
-0.4766353368759155,
-0.9733477234840393,
-0.46348336338996887,
0.9132617712020874,
-0.6612231731414795,
-0.1342710554599762,
-0.19509223103523254,
-0.046942003071308... |
def assert _ correct _ config _ syntax ( config ) : # todo pass | [
-0.4555031657218933,
-0.44519901275634766,
0.5079411268234253,
0.9924375414848328,
0.2839115858078003,
0.4062355160713196,
0.9884361028671265,
0.911211371421814,
0.19444818794727325,
-0.029057640582323074,
-0.43435540795326233,
0.3793887197971344,
-0.04590572416782379,
1.5245189666748047,
... |
def test _ create _ pfe _ profile ( self, context ) : # these could come from a data file id = " no _ proxy _ profile _ post " name = " no proxy profile " # define a test step with pytest. allure. step ( " create client ` { } ` ( { } ). ". format ( name, id ) ) : # create a place in context. status for storing pfe prof... | [
0.2672485411167145,
1.1077988147735596,
0.676468551158905,
0.26218411326408386,
0.9523694515228271,
0.4093068838119507,
0.28105971217155457,
-0.6092823147773743,
0.3523111939430237,
-0.4335145950317383,
-0.728272020816803,
-0.356283038854599,
-0.4561060965061188,
0.21281303465366364,
-0.... |
def test _ startservicerunning ( self ) : self. assertfalse ( self. component. running ) self. component. startservice ( ) self. asserttrue ( self. component. running ) | [
0.227060005068779,
-0.8812384605407715,
0.15600772202014923,
0.30494001507759094,
1.0348037481307983,
1.2564339637756348,
0.061307746917009354,
0.7488570213317871,
-0.01612112484872341,
-1.4719510078430176,
-0.3159790337085724,
-0.15626399219036102,
-0.9991958737373352,
0.2890898287296295,... |
def rawcompressed ( self ) - > databytes : return self. m _ pub _ key. rawcompressed ( ) | [
0.03748874366283417,
0.512840211391449,
0.32613605260849,
-0.07944002747535706,
-1.4476679563522339,
0.04449783265590668,
-0.5866538882255554,
-0.3348585069179535,
-0.1399814337491989,
-0.41802871227264404,
-0.5430179834365845,
0.4293724298477173,
-0.7322670221328735,
0.4429302215576172,
... |
def calculate _ internal _ heatsource ( w, z, temperature, density, volumes, mstar, mu = 2. 279, alpha = 0. 01 ) : from hyperion. util. constants import k, g, m _ h p = k * density * temperature / ( mu * m _ h ) # ideal gas law. pressure in erg / cm ^ 3 ww, zz = np. meshgrid ( w, z ) ww = ww [ np. newaxis, : ] omega = ... | [
-0.08591985702514648,
0.20599640905857086,
0.4056563377380371,
-0.915565013885498,
-0.7824981212615967,
-0.23006445169448853,
-0.18120057880878448,
0.9886627197265625,
-0.6083105802536011,
0.21108929812908173,
-0.3432537913322449,
0.1402597725391388,
-0.3529522716999054,
0.5871795415878296... |
def print _ zones _ instances ( self, compute, project ) : zones _ instances = self. get _ zones _ instances ( compute, project ) for k, v in zones _ instances. items ( ) : print ( k + " : " ) for i in v : print ( " " + i ) | [
-0.32137733697891235,
-0.09990737587213516,
0.46966928243637085,
0.12486971169710159,
-0.382537305355072,
1.1498887538909912,
0.5085346698760986,
0.24371561408042908,
-0.6900599598884583,
1.032814860343933,
-0.13477230072021484,
1.0291556119918823,
-0.5426397919654846,
0.1778792142868042,
... |
def _ translate _ _ interfaces _ state _ interface ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. type. _ changed ( ) : input _ yang _ obj. type = input _ yang _ obj. type if input _ yang _ obj. admin _ status. _ changed ( ) : input _ yang _ obj. admin _ status = input _ yang _ obj. adm... | [
-0.6903086304664612,
0.044751495122909546,
0.6846329569816589,
-0.7214754223823547,
-0.6631557941436768,
0.028777526691555977,
1.1089342832565308,
-0.9320433139801025,
0.837823212146759,
-0.10786180198192596,
-0.5110366344451904,
-0.1729317456483841,
-0.47821685671806335,
0.191367626190185... |
def local _ dc ( self ) - > optional [ str ] : return self. _ _ local _ dc | [
1.2746890783309937,
-0.5860748291015625,
0.5838017463684082,
-0.38843676447868347,
-0.17031273245811462,
0.32973363995552063,
0.6596810221672058,
-0.4847728908061981,
0.4778148829936981,
-0.561413586139679,
0.6199124455451965,
0.007397926412522793,
0.5408770442008972,
0.1935213804244995,
... |
def interp1d _ curve ( mask, margin = ( 60, 60 ) ) : # 1. find boundary bound = find _ boundaries ( mask > 127, mode ='outer') # 2. crop marginal parts ( may be noise ) lhs, rhs = margin bound [ :, : lhs ] = 0 # left hand side bound [ :, - rhs : ] = 0 # right hand side # 3. process upper and lower boundary respectively... | [
-0.05032776668667793,
-0.5858880281448364,
0.9648439884185791,
-0.2873683571815491,
0.0009534709970466793,
0.5797927975654602,
0.3323172926902771,
-0.011003607884049416,
0.7062261700630188,
0.3210934102535248,
0.5102063417434692,
0.3932477831840515,
0.0013302065199241042,
-0.51470661163330... |
def topo _ sort _ lines ( lines, lines _ optional = ( ) ) : graph = graph ( ) for dependent, dependency in lines _ to _ relationships ( lines ) : graph. add ( dependent, dependency ) for dependent, dependency in lines _ to _ relationships ( lines _ optional ) : graph. add _ optional ( dependent, dependency ) return''. ... | [
0.6532796621322632,
-0.3467269241809845,
0.4582050144672394,
0.0675552561879158,
-0.40325796604156494,
0.25147417187690735,
-0.15599238872528076,
-0.5422389507293701,
-0.34469717741012573,
-0.1654607504606247,
0.7665694952011108,
-0.8554084300994873,
0.6792864799499512,
-0.4441761672496795... |
def compound ( * args ) : return _ topods. topods _ compound ( * args ) | [
-0.9009273052215576,
0.207096666097641,
0.40322425961494446,
0.8342000842094421,
0.3684183359146118,
0.15020842850208282,
0.42505577206611633,
-1.3038132190704346,
-0.018573911860585213,
-0.24690307676792145,
-0.0018756687641143799,
-1.0912238359451294,
-0.7992947101593018,
0.2495929747819... |
def compute _ attention _ masks _ for _ extend _ step ( time _ step : jtensor, seq _ len : int, segment _ mask : optional [ jtensor ] = none, cross _ inputs : optional [ jtensor ] = none, cross _ paddings : optional [ jtensor ] = none, cross _ segment _ mask : optional [ jtensor ] = none ) - > tuple [ jtensor, union [ ... | [
-0.04044138267636299,
-0.6050190925598145,
0.7602494955062866,
0.721077561378479,
0.20301301777362823,
-0.4552432894706726,
0.48096078634262085,
-0.27940866351127625,
0.16701361536979675,
0.5083757638931274,
-0.20388180017471313,
0.7280550003051758,
1.0583919286727905,
0.5236747860908508,
... |
def entry _ repr ( entry, format _ style = none ) : if format _ style is none : format _ style = format _ style _ default if format _ style is format _ style _ simple : return _ entry _ repr _ simple ( entry ) elif format _ style is format _ style _ full : return _ entry _ repr _ full ( entry ) else : raise exception (... | [
-0.05549488961696625,
-0.5954605937004089,
0.4150782525539398,
0.1323489248752594,
-0.3307538330554962,
-0.4679080843925476,
-0.4825822114944458,
0.2725421190261841,
1.3242218494415283,
0.387311726808548,
0.6513041853904724,
0.5745036602020264,
0.10546932369470596,
0.11551928520202637,
0... |
def rm ( self, conditions, inv = false ) : if not isinstance ( conditions, list ) : conditions = [ conditions ] def check _ conds ( ind, label ) : for cond in conditions : if hasattr ( cond,'_ _ call _ _') : match = cond ( label ) elif isinstance ( cond, str ) : match = bool ( re. search ( cond, label ) ) else : match ... | [
-0.7657413482666016,
0.5653249621391296,
0.5942237377166748,
-0.09634486585855484,
-0.4927547574043274,
0.10694527626037598,
0.1852109283208847,
0.4732677936553955,
-0.5922124981880188,
0.5252752304077148,
1.2119847536087036,
0.19417208433151245,
-1.2040504217147827,
-0.24346303939819336,
... |
def print _ columns _ human ( lines, verbose ) : for line in lines : assert len ( line ) = = len ( lines [ 0 ] ) num _ cols = len ( lines [ 0 ] ) format _ string ='' for col in xrange ( num _ cols - 1 ) : col _ width = max ( len ( str ( line [ col ] ) ) for line in lines ) + 1 format _ string + ='% -'+ str ( col _ widt... | [
0.4411187767982483,
0.22145387530326843,
0.7944345474243164,
0.39080706238746643,
0.44131550192832947,
-0.1422998160123825,
-0.594210147857666,
-0.3274817168712616,
-0.9512622356414795,
0.43094703555107117,
0.7877997159957886,
-0.12936489284038544,
0.5804064273834229,
0.17820778489112854,
... |
def _ run _ scenario ( self, scenario ) : scenario _ data = list ( ) # set boundaries for random actions low = np. array ( [ - 0. 5, - 0. 02 ] ) high = np. array ( [ 0. 5, 0. 02 ] ) self. _ env. reset ( scenario = scenario ) done = false while done is false : action = np. random. uniform ( low = low, high = high, size ... | [
-1.3466533422470093,
0.06080442667007446,
0.49755626916885376,
-0.08103886991739273,
0.32837390899658203,
0.300643652677536,
0.1287001669406891,
-0.4359029531478882,
0.0918092429637909,
0.9041341543197632,
-0.9124016165733337,
0.22266682982444763,
0.3000871241092682,
0.45043817162513733,
... |
def to _ jacobian ( self ) : if not self : return jacobianpoint ( x = 0, y = 0, z = 0 ) return jacobianpoint ( x = self. x, y = self. y, z = 1 ) | [
-0.19499604403972626,
-0.8893280029296875,
0.4549414813518524,
0.04681330546736717,
-0.11629783362150192,
0.3953719735145569,
0.37523987889289856,
-0.06999622285366058,
0.3024839460849762,
-0.3426752984523773,
-0.361903578042984,
0.4628016948699951,
-0.30822107195854187,
-0.080468520522117... |
def test _ run ( self ) : if hardwarethread. _ hardwarethread _ _ singleton is not none : hardwarethread. _ drop ( ) lamp _ start = 0 lamp _ duration = 2 room _ start = 1 room _ duration = 2 coffee _ time = 3 total _ time = 5 start _ time = 0 # mocking the _ launch _ lamp method def mock _ launch _ lamp ( cls ) : self.... | [
-0.5822045207023621,
0.08320042490959167,
0.8282808065414429,
0.15513361990451813,
0.6102621555328369,
0.7915810346603394,
0.7107426524162292,
0.074296735227108,
-0.2612462639808655,
-0.6275759339332581,
-0.13108006119728088,
-0.19401927292346954,
-0.9005454778671265,
1.0057504177093506,
... |
def libs ( self ) : is _ shared = " + shared " in self. spec libs = find _ libraries ( " libhypre ", root = self. prefix, shared = is _ shared, recursive = true ) return libs or none | [
0.14888547360897064,
0.22807550430297852,
0.6838372945785522,
1.03329336643219,
0.998993456363678,
-0.02184782736003399,
0.5036208033561707,
-0.3667808175086975,
0.8605966567993164,
-0.6439242362976074,
0.47084754705429077,
-0.41160327196121216,
-0.5473014116287231,
0.6185884475708008,
-... |
def testbatchnormarbitraryshapes ( self ) : self. _ testbatchnormarbitraryshapes ( ( 3, 3 ), ( 1, 3 ) ) self. _ testbatchnormarbitraryshapes ( ( 3, 3 ), ( 3, 1 ) ) self. _ testbatchnormarbitraryshapes ( ( 3, 2, 4, 5 ), ( 1, 2, 1, 1 ) ) self. _ testbatchnormarbitraryshapes ( ( 2, 3, 2, 4, 5 ), ( 1, 1, 1, 4, 5 ), atol = ... | [
0.2331244796514511,
-0.2720409035682678,
0.6457043290138245,
0.22783349454402924,
-0.22729778289794922,
0.3590339720249176,
0.46109798550605774,
-1.2131550312042236,
-0.5777376890182495,
-0.020914148539304733,
-0.6362546682357788,
-0.06551247835159302,
0.22729557752609253,
-0.0746565982699... |
def permission _ create ( request ) : data = json _ from _ request ( request ) expected _ keys = [ " name ", " description " ] check _ keys ( expected _ keys, data ) # check name not in use by school if permission. query. filter _ by ( name = data ['name'], school _ id = g. user. school _ id ). first ( ) is not none : ... | [
-0.7012333869934082,
0.1339114010334015,
0.704002320766449,
0.32678282260894775,
-0.0903935432434082,
0.10311246663331985,
-0.3074027895927429,
-0.4224603772163391,
0.27713659405708313,
0.8897795081138611,
-0.3597638010978699,
-0.6287574768066406,
-0.4864460229873657,
-0.028324028477072716... |
def persist _ result _ redis ( company _ id : str, processing _ result : dict, redis _ manager ) - > none : redis _ score _ field = " score " # empty data if not processing _ result : logger. warning ( msg = " no data to be persisted in redis. " ) return company _ redis _ data = redis _ manager. retrieve ( key = compan... | [
-0.5122196078300476,
0.8392388224601746,
0.6540898680686951,
-0.42824387550354004,
0.48315274715423584,
0.5247408151626587,
-1.001625418663025,
-0.06566832959651947,
0.40293967723846436,
0.43260258436203003,
-0.2502725124359131,
-0.1395760029554367,
-0.46374061703681946,
0.0975473672151565... |
def send _ dhcp _ over _ qvb ( self, port _ id, port _ mac ) : qvb _ device = utils. get _ vif _ name ( constants. qvb _ device _ prefix, port _ id ) ethernet = scapy. ether ( dst ='ff : ff : ff : ff : ff : ff ', src = port _ mac, type = 0x800 ) ip = scapy. ip ( src ='0. 0. 0. 0 ', dst ='255. 255. 255. 255') udp = scap... | [
0.1404246985912323,
0.3837627172470093,
0.8470063805580139,
0.8985780477523804,
0.2642711400985718,
-0.40435561537742615,
-0.08158749341964722,
-1.1935060024261475,
0.14727933704853058,
0.33988165855407715,
-0.06581483781337738,
0.0783606469631195,
-0.5667158365249634,
-0.2162187397480011,... |
def _ create _ histogram _ and _ stats _ pyramids ( self, hist ) : bins = len ( hist ) # compress a histogram ratio = 2 reductions = int ( math. log ( bins, ratio ) ) compressionfactor = [ ] histpyramid = [ ] omegapyramid = [ ] mupyramid = [ ] for _ in range ( reductions ) : histpyramid. append ( hist ) reducedhist = [... | [
0.3539039194583893,
0.8098074793815613,
0.5759404301643372,
-0.24158942699432373,
0.31425726413726807,
-0.3514910638332367,
0.3969251811504364,
-0.10050275176763535,
0.8204728960990906,
-0.3832138180732727,
-1.320817232131958,
-0.3178825080394745,
-0.06391295790672302,
0.9296546578407288,
... |
def showdb ( ) : try : db _ window = tk ( ) db _ window. title ( " entery times " ) db _ window. geometry ( " 500x400 " ) data = times _ cursor. execute ('''select * from logs order by rowid desc limit 15''') i = 0 for names in data : for j in range ( len ( names ) ) : e = label ( db _ window, text = names [ j ], width... | [
0.49357694387435913,
0.7611106038093567,
0.7358987927436829,
-0.5241117477416992,
-0.30118200182914734,
0.40043431520462036,
0.8674874901771545,
-0.27718132734298706,
-0.3355415463447571,
0.326388955116272,
0.8409004211425781,
0.9983705878257751,
-0.16769027709960938,
1.6796104907989502,
... |
def test _ modulepickling _ change _ cache _ dir ( tmpdir ) : dir _ 1 = str ( tmpdir. mkdir ('first') ) dir _ 2 = str ( tmpdir. mkdir ('second') ) item _ 1 = _ nodecacheitem ('bla ', [ ] ) item _ 2 = _ nodecacheitem ('bla ', [ ] ) path _ 1 ='fake path 1'path _ 2 ='fake path 2'hashed _ grammar = load _ grammar ( ). _ ha... | [
-0.4677489399909973,
0.2716049551963806,
0.6660900115966797,
0.31793123483657837,
0.6734762787818909,
-0.20111516118049622,
0.14286687970161438,
-0.3598131537437439,
-0.3389529585838318,
0.24171525239944458,
-1.0715752840042114,
0.7782924771308899,
0.2736356854438782,
-0.23379692435264587,... |
def main ( path = none ) : click. echo ( " processing : { } ". format ( path ) ) click. echo ( ) result = slugifile _ directory ( path ) if ( " success " in result and " messages " in result and result [ " success " ] and len ( result [ " messages " ] ) ) : for message in result [ " messages " ] : click. echo ( message... | [
-0.2717137932777405,
0.9408698081970215,
0.6846004724502563,
0.043767962604761124,
0.7234583497047424,
-0.8354693055152893,
0.5289224982261658,
0.3222159147262573,
-0.935344934463501,
-0.10838522762060165,
0.5023435950279236,
0.6190862059593201,
-0.5456810593605042,
0.6732978224754333,
-... |
def put _ metadata _ values _ into ( metadata _ values, data, defaults ) : if defaults or ( metadata _ values is not none ) : if metadata _ values is none : metadata _ values = { } data ['metadata'] = metadata _ values return data | [
-0.3705015480518341,
1.1061599254608154,
0.24029161036014557,
-0.5090319514274597,
1.340206265449524,
0.1079651340842247,
-1.9857947826385498,
0.6849802136421204,
-0.6300843954086304,
0.31144216656684875,
-0.17418915033340454,
0.3000304102897644,
-0.025451593101024628,
0.138182133436203,
... |
def top _ sentences ( query, sentences, idfs, n ) : # what are the types of supervised learning? top _ list = [ ] # list of pairs of sentence and its corresponding idfs for s in sentences : idf = 0 for word in query : if word in sentences [ s ] : idf + = idfs [ word ] if idf = = 0 : continue if len ( top _ list ) < n :... | [
-0.26826345920562744,
-0.6856524348258972,
0.7162166237831116,
-0.43019556999206543,
-0.5600900053977966,
-0.8230891823768616,
-0.7544339299201965,
-0.7429490685462952,
0.5383029580116272,
0.2012365311384201,
0.5266730785369873,
-0.128471240401268,
0.030437519773840904,
0.1941327601671219,... |
def rec _ jacobi01 ( n, a, b ) : if a < = - 1 or b < = - 1 : raise valueerror ('''jacobi coefficients are defined only for alpha, beta > - 1''') if not isinstance ( n, int ) : raise typeerror ('n must be an integer') if n < 1 : raise valueerror ('n must be at least 1') c, d = rec _ jacobi ( n, a, b ) alpha = ( 1 + c ) ... | [
-0.27496063709259033,
-0.5400673747062683,
0.47416505217552185,
-0.21920853853225708,
0.043794747442007065,
-0.26453545689582825,
0.32091230154037476,
-0.8183881044387817,
-0.9575681090354919,
0.29139453172683716,
-0.5718969106674194,
0.22187691926956177,
-0.3753688931465149,
0.91199165582... |
def supports _ export ( ) : return false | [
-0.040425144135951996,
0.8479701280593872,
0.3636201322078705,
1.5432347059249878,
-0.9416273832321167,
0.38252127170562744,
-0.30405521392822266,
0.30128228664398193,
0.368596613407135,
-0.22530831396579742,
-0.2349899560213089,
-0.2680647671222687,
-1.0137066841125488,
0.2398411184549331... |
async def test _ process _ percent ( self ) : xknx = xknx ( ) expose _ sensor = exposesensor ( xknx, " testsensor ", value _ type = " percent ", group _ address = " 1 / 2 / 3 " ) await expose _ sensor. process ( telegram ( destination _ address = groupaddress ( " 1 / 2 / 3 " ), payload = groupvaluewrite ( dptarray ( ( ... | [
0.22413286566734314,
0.780022382736206,
0.628100574016571,
-0.09287414699792862,
-0.14582638442516327,
0.5979616045951843,
0.0919596254825592,
-0.9523163437843323,
0.27243342995643616,
-0.11216163635253906,
0.09959596395492554,
-0.2546093761920929,
-0.39624232053756714,
-0.4528512060642242... |
def n _ modalities ( self ) - > int : return len ( self. modalities ) | [
-0.3201531767845154,
-0.21847973763942719,
0.21342188119888306,
-0.6411716938018799,
0.2809765934944153,
0.4189010560512543,
-0.5372796654701233,
0.16540361940860748,
0.44121888279914856,
-0.33718183636665344,
-0.7767946124076843,
0.43830111622810364,
-0.22387447953224182,
0.81496101617813... |
def get _ view ( self, cls, index = 0 ) : views = self. list _ views ( cls ) if index < = len ( views ) - 1 : return views [ index ] | [
-1.0344090461730957,
0.5446285009384155,
0.4188513159751892,
0.011256529949605465,
0.4899052083492279,
-0.7297741174697876,
0.1087815910577774,
-1.133603572845459,
0.8993668556213379,
-1.204713225364685,
0.9295158386230469,
0.918351948261261,
-0.4315964877605438,
-0.5554718971252441,
-0.... |
def test _ import _ full ( self ) : self. assertequal ( len ( self. contingency _ data. circuits ), 5 ) self. assertequal ( len ( self. contingency _ data. tx2 ), 3 ) self. assertequal ( len ( self. contingency _ data. tx3 ), 2 ) self. assertequal ( len ( self. contingency _ data. busbars ), 1 ) self. assertequal ( len... | [
0.6292192935943604,
0.1904093325138092,
0.5866861939430237,
-0.6051859259605408,
0.5698813796043396,
0.48701736330986023,
0.6525168418884277,
0.8028113842010498,
0.2401566356420517,
0.004117819480597973,
-1.3697574138641357,
-0.18784399330615997,
-0.22997252643108368,
-0.12290037423372269,... |
def perform _ prompt ( case _ name, method _ name, exit _ code = 0 ) : commands = { # prompt commands'exit':'q ','debug':'d ','continue':'c ', } prompt ='> > { }. { } [ { } ] : '. format ( case _ name, method _ name, ', '. join ( [ c for _, c in commands. items ( ) ] ) ) command = raw _ input ( prompt ). strip ( ) if c... | [
-0.6692246198654175,
0.12563587725162506,
0.7492551803588867,
0.6268705725669861,
0.40448930859565735,
-0.18754056096076965,
0.15380845963954926,
-0.6372539401054382,
-0.05795104056596756,
0.37395739555358887,
0.2639179527759552,
0.02546638622879982,
0.030841046944260597,
-0.04553340375423... |
def validate _ application _ exception _ message ( expected _ message ) : @ transient _ function _ wrapper ('newrelic. core. stats _ engine ','statsengine. notice _ error') def _ validate _ application _ exception _ message ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except : rai... | [
0.06439876556396484,
-0.12558677792549133,
0.24602992832660675,
-0.6222350001335144,
0.16829605400562286,
-0.04222387075424194,
-0.3146986663341522,
-0.9007108807563782,
0.2543984353542328,
0.3480927050113678,
0.9213840961456299,
0.5452514886856079,
0.32521873712539673,
0.20156975090503693... |
def get _ user _ following _ groups _ with _ http _ info ( self, user _ id, start, end, logged _ in _ user _ id, access _ token, client _ token, * * kwargs ) : all _ params = ['user _ id ','start ','end ','logged _ in _ user _ id ','access _ token ','client _ token ','fields'] all _ params. append ('callback') all _ pa... | [
-0.16250017285346985,
0.8575233221054077,
0.9286373257637024,
0.890164315700531,
-1.067344069480896,
-0.19561663269996643,
-0.0580923892557621,
-1.637478232383728,
-0.8563671112060547,
-0.16467665135860443,
-0.006869588512927294,
0.9534117579460144,
-0.6511746048927307,
0.3790367543697357,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.