text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def check _ facets ( self, facets, config ) : for facet in set ( facets ). intersection ( self. attributes. keys ( ) ) - set ( ignored _ keys ) : config. check _ options ( { facet : self. attributes [ facet ] } ) for facet in set ( facets ). difference ( self. attributes. keys ( ) ) - set ( ignored _ keys ) : try : sel... | [
-0.8284733891487122,
0.07612734287977219,
0.5260748267173767,
-0.08951842784881592,
0.018472136929631233,
0.18615682423114777,
0.11115332692861557,
0.032236214727163315,
-0.12959739565849304,
0.9222051501274109,
0.0016586354468017817,
-0.20143964886665344,
0.15905073285102844,
0.7934393882... |
def closeevent ( self, event ) : quit _ msg = " are you sure you want to exit the program? " reply = qtwidgets. qmessagebox. question ( self,'message ', quit _ msg, qtwidgets. qmessagebox. yes, qtwidgets. qmessagebox. no ) if reply = = qtwidgets. qmessagebox. yes : event. accept ( ) else : event. ignore ( ) | [
0.5713010430335999,
0.3674680292606354,
0.7474788427352905,
-0.07994149625301361,
-0.9695990681648254,
1.9313210248947144,
0.3091299831867218,
-0.704679012298584,
0.37211233377456665,
-0.14353187382221222,
0.4045853912830353,
0.13210651278495789,
-0.8078594207763672,
0.7062571048736572,
... |
def count _ points ( self ) : if self. gewinner = ='human': self. human _ points + = 1 if self. gewinner = ='ai': self. ai _ points + = 1 | [
-0.7633994221687317,
0.31254342198371887,
0.5528672337532043,
0.5389280915260315,
0.3652656078338623,
0.8115447163581848,
0.2750770151615143,
0.8024142384529114,
-0.17358224093914032,
1.0499502420425415,
-0.35112425684928894,
0.3882472515106201,
0.866401731967926,
0.23466171324253082,
1.... |
def em _ process _ multiseq ( self, trees ) : try : total _ ll = 0 initial _ counts = self. initial _ counts transition _ counts = self. transition _ counts final _ counts = self. final _ counts emission _ counts = self. emission _ counts c = 0 for c, tree in enumerate ( trees, 1 ) : # prepare tree representation self.... | [
0.06333150714635849,
-0.3473016917705536,
0.7247277498245239,
-0.47400030493736267,
0.5829715728759766,
-0.45927828550338745,
-0.3050732910633087,
0.07794710248708725,
-0.3124566972255707,
0.7469533085823059,
-0.09351834654808044,
-0.06829839199781418,
0.16907431185245514,
1.42333078384399... |
def unix _ epoch _ to _ dotnet _ ticks ( unix _ column : union [ str, column ] ) - > column : if not isinstance ( unix _ column, ( str, column ) ) : raise valueerror ( f " given column must be a column name ( str ) or column instance ( column ) : { type ( unix _ column ) } " ) sc = sparkcontext. _ active _ spark _ cont... | [
-0.38255739212036133,
0.04935181140899658,
0.5185871720314026,
-0.45685437321662903,
0.5692708492279053,
-0.35357749462127686,
0.4038858711719513,
-0.05373069643974304,
0.2965332567691803,
-0.4196507930755615,
-0.615080714225769,
0.7979437112808228,
0.7358004450798035,
-0.46942323446273804... |
def getrndnid ( self, * args ) : return _ snap. tungraph _ getrndnid ( self, * args ) | [
0.307166188955307,
0.33348312973976135,
0.5122319459915161,
0.47287043929100037,
-0.0946570560336113,
0.49022558331489563,
-0.667436420917511,
0.05374513939023018,
-0.20966339111328125,
-0.676759660243988,
-0.8307198286056519,
0.34810394048690796,
-0.8632771968841553,
0.5990319848060608,
... |
def remove ( self, names ) : if isinstance ( names, str ) : raise valueerror ( " names must be an iterator of string " ) new _ instance = self. _ _ class _ _ ( self ) for name in names : if not name in new _ instance. _ column : raise valueerror ( " heading not present : " + repr ( name ) ) del new _ instance. _ column... | [
-1.0780516862869263,
0.11563258618116379,
0.6020708084106445,
-0.40176162123680115,
-1.0488852262496948,
0.2076953649520874,
-0.4746217429637909,
-0.542478084564209,
-0.4070518910884857,
0.37935757637023926,
-0.2953486442565918,
-0.7049829959869385,
-1.1486011743545532,
-0.2587133646011352... |
def transformyiq2rgb ( imgyiq : np. ndarray ) - > np. ndarray : rgb _ mat = np. array ( [ [ 1, 0. 956, 0. 619 ], [ 1, - 0. 272, - 0. 647 ], [ 1, - 1. 106, 1. 703 ] ] ) imgrgb = np. dot ( imgyiq, rgb _ mat. t. copy ( ) ) return imgrgb | [
-0.14780199527740479,
-0.44700169563293457,
0.7807667255401611,
-0.4579373300075531,
1.012873888015747,
-0.3680567145347595,
0.3746687173843384,
-0.29908522963523865,
0.7285473346710205,
0.6070235967636108,
-0.12452689558267593,
0.0890280231833458,
-0.20690202713012695,
0.3141056299209595,... |
def delete _ an _ order ( self, order _ id ) : if orders not in orders : return invalid _ email ( ) del orders [ order _ id ] return { " order deleted successfully " } | [
0.13264796137809753,
-0.11181066185235977,
0.010340324603021145,
0.31686967611312866,
0.25966304540634155,
-0.9786221385002136,
-1.7628122568130493,
0.9508563280105591,
1.0008083581924438,
0.45170482993125916,
-0.27827689051628113,
0.6118276715278625,
-0.3884008526802063,
0.751672565937042... |
def construct _ feature _ columns ( input _ features ) : return set ( [ tf. feature _ column. numeric _ column ( my _ feature ) for my _ feature in input _ features ] ) | [
-0.8908516764640808,
-0.5895351767539978,
0.30782124400138855,
0.07474132627248764,
0.8064725995063782,
-0.10116397589445114,
0.4178857207298279,
-0.17898300290107727,
-1.2330067157745361,
-0.03253449499607086,
-0.8205524682998657,
-0.22654855251312256,
0.7403607368469238,
-0.7049182653427... |
def get _ file _ history ( self ) - > dict : if not self. _ file _ revisions : self. site. loadimageinfo ( self, history = true ) return self. _ file _ revisions | [
0.35396164655685425,
0.43714600801467896,
0.394835889339447,
-0.5744172930717468,
0.14506249129772186,
-0.7876405119895935,
-0.06394700706005096,
-0.03849426656961441,
-0.11656225472688675,
-0.5173190832138062,
-0.35878753662109375,
-0.06432350724935532,
0.28673821687698364,
1.299961924552... |
def _ _ init _ _ ( self, assigner, period, system, type, use, value ) : self. assigner = assigner self. period = period self. system = system self. type = type self. use = use self. value = value | [
-0.3242686688899994,
-0.30627697706222534,
0.6470664143562317,
0.8772518038749695,
-0.34931182861328125,
0.6764057278633118,
0.029972892254590988,
-0.15645599365234375,
-0.007799816783517599,
-0.14140641689300537,
1.0209827423095703,
0.5522487163543701,
-0.14675013720989227,
1.066677331924... |
def _ get _ default _ sm _ configuration _ with _ proxy _ pc ( self ) : config = { unixremote. connection _ hops : { unixremote. proxy _ pc : { # from unixremote. unix _ remote : { # to " execute _ command " : " ssh ", # using command " command _ params " : { # with parameters " target _ newline " : " \ n " }, " requir... | [
-0.40666767954826355,
-0.2382356822490692,
0.7068833708763123,
-0.5118129849433899,
-0.10951422899961472,
0.29517418146133423,
-0.8376670479774475,
-0.15686385333538055,
-0.725310742855072,
0.15816214680671692,
-0.49832236766815186,
0.08566965907812119,
-0.5457000136375427,
0.7988601326942... |
def test _ can _ hook _ response ( self ) : class myapiclient ( apiclient ) : @ apiclienthook. hook _ client _ response ( client ='httpbin ', requests = ['*'] ) # register this for all the hooks def return _ custom _ api _ obj ( self, response, * * kwargs ) : if kwargs. get ('request _ name') = ='get _ my _ headers': u... | [
0.15234027802944183,
-1.164441704750061,
0.6277088522911072,
0.32272103428840637,
-0.28586819767951965,
0.43045803904533386,
0.7448264360427856,
-0.6496148109436035,
0.7207474708557129,
-0.5702391862869263,
-0.3336390256881714,
-0.2991509735584259,
-0.9439663290977478,
-1.035140037536621,
... |
def stop ( self ) : self. _ osc. stop ( ) self. _ raw _ stream. setvalue ( [ 0, 0, 0 ] ) self. _ analyzed _ stream. setvalue ( [ 0, 0, 0 ] ) self. _ trig _ func. stop ( ) | [
-0.023314710706472397,
-0.39361560344696045,
0.16571642458438873,
-0.6803439855575562,
1.4871819019317627,
-0.10184050351381302,
1.1144148111343384,
-0.4152984023094177,
-1.5160932540893555,
-0.41866809129714966,
-0.19762805104255676,
0.5959625244140625,
-0.1241791620850563,
0.405320107936... |
def read _ terms ( csv _ file ) : lod _ gi _ to _ go = dict ( ) logging. info ( " reading gi / go tuples from % s... ", csv _ file ) with open ( csv _ file, " r ", newline = " " ) as f : handle = csv. reader ( f, delimiter = " \ t " ) next ( handle ) for record in handle : lod = record [ 0 ] gi _ term = record [ 1 ] go... | [
-0.019467994570732117,
0.036395881325006485,
0.4572965204715729,
-1.2853789329528809,
-0.19806300103664398,
0.26583242416381836,
-0.2526146173477173,
0.8928314447402954,
-1.3001716136932373,
1.1558165550231934,
-0.35723811388015747,
-0.27410268783569336,
-0.015009090304374695,
-0.598626971... |
def parse _ uptime ( uptime _ str ) : # initialize to zero ( days, hours, minutes, seconds ) = ( 0, 0, 0, 0 ) m = re. match ( ". * (? p < days > [ 0 - 9 ] + ) d (? p < hours > [ 0 - 9 ] + ) h (? p < minutes > [ 0 - 9 ] + ) m (? p < seconds > [ 0 - 9 ] + ) s. * ", uptime _ str ) if m : days = int ( m. groupdict ( ) [ " ... | [
-0.12156298756599426,
-0.4288189709186554,
0.8675394654273987,
-0.28067561984062195,
-0.5019276142120361,
-0.5328586101531982,
0.43836745619773865,
-0.08221228420734406,
-0.43263158202171326,
0.7048371434211731,
-0.1892794817686081,
-0.3899461328983307,
-0.33767277002334595,
-0.13975127041... |
def selection _ sort ( initial _ list : list ) - > list : for i in range ( len ( initial _ list ) ) : min _ pos = i for j in range ( i + 1, len ( initial _ list ) ) : if initial _ list [ min _ pos ] > initial _ list [ j ] : min _ pos = j temp = initial _ list [ i ] initial _ list [ i ] = initial _ list [ min _ pos ] in... | [
-0.6630185842514038,
-0.9624572992324829,
0.33607766032218933,
0.08488128334283829,
-0.19618256390094757,
-0.05269301310181618,
0.2964956760406494,
-0.1442314088344574,
0.5382417440414429,
0.25422120094299316,
-1.3312426805496216,
0.49874505400657654,
-0.3603045344352722,
0.659142732620239... |
def endei ( self, * args ) : return _ snap. tngraph _ endei ( self, * args ) | [
-0.24854618310928345,
1.678013563156128,
0.13745978474617004,
0.8403347730636597,
0.9644526839256287,
-0.15568609535694122,
0.9595280289649963,
0.26275327801704407,
-1.613907814025879,
0.6714462041854858,
-0.700143039226532,
-1.382377028465271,
-1.4887140989303589,
-0.3385116457939148,
0... |
def rms ( y ) : return librosa. feature. rms ( y = y, frame _ length = config. n _ fft, hop _ length = config. hop _ length ) | [
-0.2200791984796524,
0.02991994470357895,
0.2522415220737457,
0.7126497626304626,
-0.12849731743335724,
-1.1159294843673706,
-0.4167170226573944,
-0.5745627284049988,
0.8182586431503296,
-0.13959740102291107,
-0.1416483372449875,
0.12573884427547455,
-0.2356831431388855,
1.4356354475021362... |
def update ( self, org, sddc, network _ id, sddc _ network, ) : return self. _ invoke ('update ', {'org': org,'sddc': sddc,'network _ id': network _ id,'sddc _ network': sddc _ network, } ) | [
-1.0079739093780518,
-0.27844488620758057,
0.2879539430141449,
-0.14998415112495422,
-0.037480153143405914,
-0.013312862254679203,
-0.6640579700469971,
-0.19041875004768372,
0.9045933485031128,
-0.7421097159385681,
-0.15350434184074402,
0.22656986117362976,
-0.24039965867996216,
-0.1348505... |
def mi _ 1d _ gg ( x, y, biascorrect = true, demeaned = false ) : x, y = np. atleast _ 2d ( x ), np. atleast _ 2d ( y ) if ( x. ndim > 2 ) or ( y. ndim > 2 ) : raise valueerror ( " x and y must be at most 2d " ) nvarx, ntrl = x. shape nvary = y. shape [ 0 ] nvarxy = nvarx + nvary if y. shape [ 1 ]! = ntrl : raise value... | [
0.09119567275047302,
0.5164355635643005,
0.9075639247894287,
-0.8482513427734375,
-0.9216740727424622,
-0.025060171261429787,
-0.6232449412345886,
-0.5447735786437988,
-0.649117112159729,
1.1535528898239136,
0.578283429145813,
0.7089720368385315,
-0.8606895208358765,
0.017966561019420624,
... |
def erfinv ( x, name = none ) : with ops. name _ scope ( name, " erfinv ", [ x ] ) : return gen _ math _ ops. erfinv ( x ) | [
-1.1172746419906616,
0.9525889754295349,
0.4763238728046417,
0.6496297121047974,
-0.646416962146759,
-0.23918215930461884,
-0.2697047293186188,
-0.11815106868743896,
-0.17864105105400085,
0.6049715280532837,
-0.595523476600647,
1.4524537324905396,
0.3340906798839569,
-0.7373247742652893,
... |
def detect _ db ( property : dict = none, save _ results = false ) : df = read _ df ( { }, projection = {'latitude': true,'longitude': true,'outcode': true,'furnished _ state': true,'rental _ prices. shared _ occupancy': true,'details _ url': true,'property _ type': true,'status': true,'num _ bedrooms': true,'num _ bat... | [
-0.29496699571609497,
0.49507245421409607,
0.7413312792778015,
0.8386741876602173,
0.8947256803512573,
-0.2572193443775177,
-0.35297951102256775,
0.1384132206439972,
-0.09327006340026855,
-0.30362778902053833,
0.6360865831375122,
-0.0740533396601677,
-0.52907395362854,
-0.3881660997867584,... |
def update _ readme ( self, template _ readme : template ) : readme = os. path. join ( self. cached _ repo, " readme. md " ) if os. path. exists ( readme ) : os. remove ( readme ) links = { model _ type : { } for model _ type in self. models. keys ( ) } for model _ type, model _ uuids in self. models. items ( ) : for m... | [
-0.9995837807655334,
-0.5768665075302124,
0.5098652243614197,
-0.20564937591552734,
0.6950540542602539,
0.6618178486824036,
0.16108497977256775,
0.945252001285553,
-0.9085283875465393,
0.7248199582099915,
-0.5357180237770081,
-0.4282223582267761,
-0.5259001851081848,
-0.2402498424053192,
... |
def tangentcircles ( centre1, centre2, radius, pathtype ) : # convert to numpy array for calculation centre1 = numpy. array ( centre1 ) centre2 = numpy. array ( centre2 ) # compute vector between circle centres and calculate length vector1 = centre2 - centre1 length = numpy. linalg. norm ( vector1 ) # if length greater... | [
0.20762139558792114,
-0.19180136919021606,
0.700869619846344,
-1.0656074285507202,
-0.11068625003099442,
0.05287874490022659,
0.8584935665130615,
-0.6088069081306458,
-0.1531064808368683,
0.8275492191314697,
-0.7393870949745178,
-0.09682261198759079,
-0.6567073464393616,
-1.018697381019592... |
def _ _ init _ _ ( self, db, table _ name, options = none ) : # create the list of callbacks objects which are to be passed to the #'gpudbtablemonitor. client'class constructor callbacks = [ gpudbtablemonitor. callback ( gpudbtablemonitor. callback. type. insert _ raw, self. on _ insert _ raw, self. on _ error ), gpudb... | [
0.043012697249650955,
0.49007123708724976,
0.7132385969161987,
0.3279764652252197,
0.44229236245155334,
-0.3464449644088745,
-0.1628795862197876,
-0.4479342997074127,
-0.1550295650959015,
-0.1301921159029007,
-0.8770551085472107,
-0.7654675245285034,
-0.02296604961156845,
0.747019290924072... |
def _ ros _ options _ callback ( self, msg ) : def chunks ( l, n ) : " " " yield successive n - sized chunks from l. " " " for i in range ( 0, len ( l ), n ) : yield l [ i : i + n ] options _ keyboard = replykeyboardmarkup ( keyboard = list ( chunks ( msg. options, 5 ) ), resize _ keyboard = true, one _ time _ keyboard... | [
0.16033658385276794,
0.944577693939209,
0.5811251997947693,
-0.1287534385919571,
0.4202789068222046,
-0.6433990597724915,
0.9499402046203613,
-0.8665058016777039,
0.1424083262681961,
0.887510359287262,
-0.12150299549102783,
-0.07300412654876709,
-0.246943861246109,
0.689960241317749,
-1.... |
def reset ( self ) : self. subnets = dict ( ) for p in self. source _ hash. points : p. forward _ cands = [ ] p. subnet = none for i, p in enumerate ( self. dest _ hash. points ) : # p. back _ cands = [ ] p. subnet = i self. subnets [ i ] = set ( ), { p } | [
0.28031885623931885,
0.5779708623886108,
0.2743985056877136,
-0.12669773399829865,
0.17682157456874847,
0.6499413847923279,
0.2822805941104889,
0.4650568664073944,
-0.45032986998558044,
0.23349179327487946,
-0.5183109045028687,
0.985505223274231,
0.4323442578315735,
-0.3452926576137543,
... |
def _ neg ( x, name = none ) : return negative ( x, name ) | [
-1.209584355354309,
0.21837686002254486,
0.6013925075531006,
0.12364787608385086,
-1.2924555540084839,
-0.38699495792388916,
-1.6396855115890503,
-0.23745566606521606,
-0.4527831971645355,
0.05427270010113716,
-0.6264814734458923,
-0.018493739888072014,
0.4233919084072113,
-0.6327335238456... |
def agg _ min ( m ) : return np. min ( m ) | [
0.23379984498023987,
-0.4356718957424164,
0.417660117149353,
-0.13783448934555054,
-0.07532988488674164,
0.1928417980670929,
-0.5853869915008545,
-0.7053472995758057,
-0.2838085889816284,
0.523018479347229,
1.0299848318099976,
0.0699700340628624,
-0.8595991134643555,
-0.1325417459011078,
... |
def my _ print ( self ) : if self. size = = 0 : print ( " " ) else : for i in range ( self. size ) : for j in range ( self. size ) : print ( " # ", end = " " ) print ( " " ) | [
0.38830333948135376,
-0.12598837912082672,
0.6656821966171265,
-0.1879619061946869,
0.405598521232605,
0.23679594695568085,
-0.04115075245499611,
-0.13886405527591705,
-0.21172185242176056,
-0.4057339131832123,
0.8291407227516174,
0.8191960453987122,
-0.5503659248352051,
1.1219326257705688... |
def test _ atomic _ qname _ max _ length _ nistxml _ sv _ iv _ atomic _ qname _ max _ length _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - maxlength - 1. xsd ", instance = " nistdata / atomic / qn... | [
0.3241157531738281,
0.0018930146470665932,
0.30905231833457947,
0.3061400055885315,
-0.5270166397094727,
0.6607974171638489,
-0.5229746699333191,
-0.2845974564552307,
0.9173091053962708,
0.5441531538963318,
-0.31447282433509827,
-0.39610499143600464,
-0.22545038163661957,
-0.28156042098999... |
def postprocess _ model _ xml ( xml _ str ) : path = os. path. split ( robosuite. _ _ file _ _ ) [ 0 ] path _ split = path. split ( " / " ) # replace mesh and texture file paths tree = et. fromstring ( xml _ str ) root = tree asset = root. find ( " asset " ) meshes = asset. findall ( " mesh " ) textures = asset. findal... | [
0.43879541754722595,
-1.0891284942626953,
0.6524356603622437,
-0.4013340473175049,
-0.6522694826126099,
0.3356376588344574,
1.1127656698226929,
0.22029456496238708,
0.26181453466415405,
0.058753352612257004,
0.4287591278553009,
-0.6362586617469788,
0.28923046588897705,
-0.10526721924543381... |
def url ( self, path = " ", request = none, mobile = false ) : if self. alias _ popular is not none : return actor _ url ( _ get _ actor _ urlnick _ from _ nick ( self. alias _ popular ), self. type, path = path, request = request, mobile = mobile ) return actor _ url ( _ get _ actor _ urlnick _ from _ nick ( self. nic... | [
-0.7444835901260376,
-0.48191195726394653,
0.30100998282432556,
1.0634708404541016,
-0.05444774404168129,
0.2176663726568222,
0.6444939374923706,
0.3940427005290985,
0.4244604706764221,
-0.14101529121398926,
0.03243996948003769,
0.5623298287391663,
0.5270820260047913,
0.1273835450410843,
... |
def calibrate _ cb ( rgb1, depth1, rgb2, depth2 ) : rtn1, corners1 = cbt. get _ corners _ rgb ( rgb1, cb _ rows, cb _ cols ) xyz1 = clouds. depth _ to _ xyz ( depth, asus _ xtion _ pro _ f ) rtn2, corners2 = cbt. get _ corners _ rgb ( rgb2, cb _ rows, cb _ cols ) xyz2 = clouds. depth _ to _ xyz ( depth, asus _ xtion _ ... | [
0.5510702729225159,
-0.2651956379413605,
0.7209047675132751,
0.386697381734848,
0.16966217756271362,
-0.2704470157623291,
-0.3436580300331116,
-0.15579193830490112,
-0.1414603888988495,
0.7743481397628784,
0.2047065794467926,
0.6109237670898438,
-0.22959373891353607,
0.4154609143733978,
... |
def leave _ section ( self, section ) : self. current _ ast _ section = section. parent if self. current _ ast _ section is not none : self. current _ ir _ section = self. sections [ section. parent. get _ qualified _ name ( ) ] else : self. current _ ir _ section = none self. rule _ hashes. pop ( ) | [
0.3832608759403229,
-0.46484413743019104,
0.48986712098121643,
-0.8302168846130371,
-0.08058048784732819,
0.4972699284553528,
0.2933139204978943,
-0.23632827401161194,
-0.6446303129196167,
0.8913668394088745,
0.3876912295818329,
-0.48255792260169983,
-0.2681962549686432,
1.188014030456543,... |
def recent ( mtx, datecol, astcol, bmkcol, risk _ free _ rate, recent _ period _ cls = utl. date. year, periods = [ 1 ], sample _ period _ cls = utl. date. month, interp _ func = none ) : try : results = { } for period in periods : end _ date = utl. date. date. today ( ) begin _ date = end _ date - recent _ period _ cl... | [
-0.2458825707435608,
0.8289607167243958,
0.6546065211296082,
-0.6048979759216309,
-0.9190501570701599,
-0.46912112832069397,
-0.14213518798351288,
-0.6946257948875427,
-0.8531762957572937,
0.3533060550689697,
-0.5016942024230957,
-0.47627946734428406,
0.4923650324344635,
-0.472975850105285... |
def apply ( self, message ) : prefix = f " { self. username } " return f " { prefix } - { message } " | [
0.4223572909832001,
0.2057459056377411,
0.40303298830986023,
-0.4068810045719147,
-0.18940454721450806,
0.25542762875556946,
0.02935105562210083,
0.5085679888725281,
0.33592304587364197,
-0.6553187966346741,
0.844220757484436,
0.9185003638267517,
-0.3284984529018402,
0.4628840684890747,
... |
def _ _ ne _ _ ( self, * args ) : return _ snap. tint _ _ _ ne _ _ ( self, * args ) | [
-0.9049779772758484,
-0.2671237587928772,
0.34237584471702576,
0.31904077529907227,
0.6125782132148743,
-0.27389267086982727,
-0.8047665953636169,
-0.5580936074256897,
-1.00189208984375,
-0.03458758443593979,
-0.6905606389045715,
-0.3233369290828705,
-0.4139946401119232,
-0.128322839736938... |
def function _ batch ( x, fun, batch _ size = 128, * * kwargs ) : # todo : tf. data. datasets have a maximum size of 2gb, so this might not work for # large arrays. dataset = tf. data. dataset. from _ tensor _ slices ( x ) outputs = [ ] for this _ x in dataset. batch ( batch _ size ) : outputs. append ( fun ( this _ x,... | [
0.1072225496172905,
0.7135282158851624,
0.5300784707069397,
1.1217507123947144,
-0.17134933173656464,
-1.0620551109313965,
-0.7586550116539001,
0.0054968600161373615,
-0.3761797845363617,
-0.09286607056856155,
-0.6529868841171265,
0.9424225091934204,
0.9477383494377136,
0.1440736949443817,... |
def _ load _ job ( self ) : if self. input _ file is not none : try : filetemp = open ( self. input _ file,'r') job = filetemp. read ( ) filetemp. close ( ) if not'[ job ]'in job. lower ( ) : job ='[ job ] \ n'+ job job = stringio ( job ) except ioerror : job = stringio ('[ job ] \ n') else : job = stringio ('[ job ] \... | [
0.7166436314582825,
-0.6604599952697754,
0.6120691299438477,
-0.22559750080108643,
-0.6462261080741882,
0.2291029989719391,
-0.6579669117927551,
0.433964341878891,
-1.151506781578064,
-0.604528546333313,
0.6531834602355957,
0.07440038025379181,
-0.9523189663887024,
-0.17892293632030487,
... |
def _ find _ observable _ paths ( extra _ files = none ) : rv = set ( os. path. dirname ( os. path. abspath ( x ) ) if os. path. isfile ( x ) else os. path. abspath ( x ) for x in sys. path ) for filename in extra _ files or ( ) : rv. add ( os. path. dirname ( os. path. abspath ( filename ) ) ) for module in list ( sys... | [
-0.0505722351372242,
0.12446599453687668,
0.9414972066879272,
0.7269582748413086,
-0.07726732641458511,
0.41047167778015137,
1.1072005033493042,
0.15379123389720917,
-0.08614236116409302,
0.32957297563552856,
0.5067505836486816,
-0.5176291465759277,
-0.10242130607366562,
1.114692211151123,... |
def set _ bias _ noise ( self, bias _ noise = 0. 0 ) : new _ ary = np. zeros ( ( 1, ) ) + bias _ noise new _ bn = to _ fx ( new _ ary ) for layer in self. shared _ layers : layer. bias _ noise. set _ value ( new _ bn ) for layer in self. output _ layers : layer. bias _ noise. set _ value ( new _ bn ) return | [
-0.005210512783378363,
-0.15406659245491028,
0.6914276480674744,
0.6081233024597168,
0.9212929606437683,
-0.14042696356773376,
0.859779417514801,
0.16795335710048676,
-0.7729176878929138,
0.5870535969734192,
-0.6904808878898621,
0.8715529441833496,
-0.5376123785972595,
0.8589683771133423,
... |
def run ( debug, threaded, host, port ) : host, port = host, port print " running on % s : % d " % ( host, port ) app. run ( host = host, port = port, debug = debug, threaded = threaded ) | [
0.6943239569664001,
-0.8077302575111389,
0.5715572834014893,
0.08433593809604645,
0.8925726413726807,
0.5972216129302979,
-0.4507436156272888,
-0.24755844473838806,
-0.9969263076782227,
-0.2147180587053299,
-0.5246573686599731,
1.000363826751709,
-0.1731680929660797,
0.13859018683433533,
... |
def shipping _ address2 ( self, shipping _ address2 ) : self. _ shipping _ address2 = shipping _ address2 | [
-0.7686122059822083,
-0.6705936789512634,
0.16632692515850067,
0.31993725895881653,
-0.8811607956886292,
0.5419788956642151,
0.37590491771698,
0.5132157206535339,
-0.7774451375007629,
0.09569711983203888,
-0.7929171323776245,
0.3344199061393738,
0.44080448150634766,
0.27213647961616516,
... |
def add _ custom _ event _ field ( self, key, value ) : self. custom _ event _ fields _ attributes. append ( fomoeventcustomattribute ( key, value ) ) | [
0.01302647590637207,
-0.20748382806777954,
0.5695213079452515,
-0.1834057867527008,
-0.6967266798019409,
-0.11958952248096466,
0.0009718947694636881,
0.28262561559677124,
0.4577041566371918,
0.05631209537386894,
-0.6339858174324036,
0.07470635324716568,
-0.14577965438365936,
-0.29265326261... |
def splitonch ( self, * args ) : return _ snap. tstr _ splitonch ( self, * args ) | [
-0.5295736789703369,
0.11456744372844696,
0.37717437744140625,
0.11823775619268417,
-0.0033211379777640104,
0.48326313495635986,
1.185487151145935,
0.322261244058609,
-0.9048876166343689,
-0.03744915500283241,
-1.528172254562378,
-0.10535841435194016,
-0.05096662789583206,
0.59087699651718... |
def peek ( self ) : if self. stack! = [ ] : return self. stack [ - 1 ]. data return none | [
0.027908047661185265,
0.8855906128883362,
0.9902446866035461,
0.208744078874588,
0.12997965514659882,
-0.4085974097251892,
-0.4521728754043579,
-1.3454854488372803,
0.1776915341615677,
0.04749827831983566,
0.06822557002305984,
0.7624374628067017,
-0.5325427055358887,
-0.10161744803190231,
... |
def parse _ caper _ arguments ( ) : # write default conf file if not exists default _ caper _ conf = os. path. expanduser ( default _ caper _ conf ) if not os. path. exists ( default _ caper _ conf ) : os. makedirs ( os. path. dirname ( default _ caper _ conf ), exist _ ok = true ) with open ( default _ caper _ conf,'w... | [
-0.23805049061775208,
-0.8650379776954651,
0.8032979369163513,
0.1822993904352188,
0.797016441822052,
0.15412159264087677,
0.7342214584350586,
0.7891404032707214,
-1.11007559299469,
0.8557161092758179,
-0.2653118073940277,
-0.48091161251068115,
0.5229426622390747,
1.0312668085098267,
0.6... |
def test _ view _ url _ edit _ user _ profile _ accessible _ by _ name ( self, client, proto _ user ) : client. login ( username = f " { proto _ user. username } ", password = " m = 9uak ^ c, tbq9n = t ", ) response = client. get ( reverse ( " edit _ user _ profile ", args = [ f " { proto _ user. pk } ", ], ) ) assert ... | [
-0.08772725611925125,
0.1973210871219635,
0.5404598712921143,
-0.1429135501384735,
-0.46315744519233704,
0.18350109457969666,
1.1162456274032593,
-0.1222049668431282,
-0.4221310317516327,
-0.19520580768585205,
-1.0398801565170288,
0.27036765217781067,
0.0823926031589508,
-0.559278011322021... |
def unique _ slug _ generator ( instance, new _ slug = none ) : if new _ slug : slug = new _ slug else : slug = slugify ( instance. title ) klass = instance. _ _ class _ _ qs _ exists = klass. objects. filter ( slug = slug ). exists ( ) if qs _ exists : new _ slug = " { } - { } ". format ( slug, random _ string _ gener... | [
-0.583440363407135,
-0.32756608724594116,
0.6677829027175903,
-0.3239254057407379,
0.07227053493261337,
0.20849774777889252,
-0.33389046788215637,
0.6779041886329651,
0.12056614458560944,
-0.18567971885204315,
-0.44600072503089905,
-0.23641125857830048,
0.05039846897125244,
0.2710946500301... |
def read _ query _ data ( ) : queries = [ ] gold = [ ] google = [ ] with open ( queries _ loc ) as f : for line in f : queries. append ( line. rstrip ( ) ) with open ( gold _ loc ) as f : for line in f : gold. append ( line. rstrip ( ) ) with open ( google _ loc ) as f : for line in f : google. append ( line. rstrip ( ... | [
0.022147592157125473,
-0.5665444731712341,
0.31531402468681335,
-0.9711177945137024,
0.4137592315673828,
1.5494804382324219,
0.026827314868569374,
-0.00709751108661294,
-0.646098256111145,
0.5440698266029358,
0.03503790125250816,
0.2601855993270874,
-0.18045704066753387,
-0.469600617885589... |
def linemerge ( self, lines ) : source = none if hasattr ( lines,'type') and lines. type = ='multilinestring': source = lines elif hasattr ( lines,'_ _ iter _ _') : try : source = asmultilinestring ( [ ls. coords for ls in lines ] ) except attributeerror : source = asmultilinestring ( lines ) if source is none : raise ... | [
-0.17897111177444458,
0.040787696838378906,
0.340747594833374,
0.11067043989896774,
-0.11176317930221558,
0.18494954705238342,
-1.5048048496246338,
0.08057432621717453,
0.2962246239185333,
-1.3174843788146973,
0.21115265786647797,
-0.6424956321716309,
0.22140926122665405,
-0.22456565499305... |
def test _ atomic _ base64 _ binary _ enumeration _ 1 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 2 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 2. xsd ... | [
-0.6137372851371765,
-1.0061986446380615,
0.580115020275116,
1.3436280488967896,
-0.14900986850261688,
-0.008890585973858833,
0.6926466226577759,
-0.2661064565181732,
-0.8870106339454651,
0.5135373473167419,
-0.9549968838691711,
0.4268847703933716,
-0.11426497995853424,
0.4313170909881592,... |
def get _ zip _ path ( cls, folder, year, year _ lookup ) : return os. path. join ( cls. get _ meps _ folder _ dir ( folder ), f " { year _ lookup [ year ] } dat. zip " ) | [
-0.6586793065071106,
-0.30437910556793213,
0.5289156436920166,
-0.53531414270401,
-0.3264269232749939,
1.3583194017410278,
0.6617512106895447,
0.5087786316871643,
0.4055121839046478,
-0.26971426606178284,
0.8041326403617859,
0.022315608337521553,
0.30561795830726624,
-0.2483377456665039,
... |
def merge ( self, qc ) : obj = qcirc _ merge ( self, qc ) qcirc = ctypes. cast ( obj. value, ctypes. pointer ( self. _ _ class _ _ ) ). contents return qcirc | [
-0.6478725075721741,
-0.7312338948249817,
0.44234803318977356,
-0.7815951108932495,
-0.47203224897384644,
-0.1267566829919815,
-0.5593320727348328,
-1.6618901491165161,
0.6871572136878967,
-0.6611847281455994,
-0.3824705481529236,
-0.007064836099743843,
-1.4863781929016113,
-0.460082739591... |
def _ parse _ json _ response ( query, results ) : response = response ( query. terms, query ) content = json. loads ( results. text ) # pipl only returns 20 results, so there are no more. response. no _ more _ results = true for record in content [ u'records'] : try : name = record [ u'names'] [ 0 ] [ u'display'] exce... | [
-0.8350730538368225,
-0.2128281593322754,
0.3440351188182831,
-1.5930986404418945,
-0.3324395716190338,
-0.6203632354736328,
-0.5726752877235413,
-0.26479628682136536,
0.6776391863822937,
0.2380082905292511,
-0.7574634552001953,
-0.9787670969963074,
0.3831346333026886,
-0.3513927757740021,... |
def isnode ( self, * args ) : return _ snap. tbpgraph _ isnode ( self, * args ) | [
-0.16531144082546234,
1.1463626623153687,
0.31247568130493164,
0.8731832504272461,
1.4565895795822144,
-0.26506227254867554,
0.6835104823112488,
0.11039883643388748,
-0.12507598102092743,
1.4232120513916016,
-0.21423642337322235,
-0.14885003864765167,
-1.303812861442566,
0.1187240406870842... |
def timeseries _ bootstrap ( tseries, block _ size, random _ state = none ) : import numpy as np if not random _ state : random _ state = np. random. randomstate ( ) # calculate number of blocks k = int ( np. ceil ( float ( tseries. shape [ 0 ] ) / block _ size ) ) # generate random indices of blocks r _ ind = np. floo... | [
-0.815552830696106,
0.07065009325742722,
0.8205532431602478,
-0.6398994326591492,
-1.012006402015686,
-0.2515838146209717,
0.37750881910324097,
-0.18198515474796295,
0.8667285442352295,
1.201909065246582,
-0.2666524648666382,
0.1558169275522232,
0.5525332689285278,
-0.00039410966564901173,... |
def new _ body ( name = none, pos = none, * * kwargs ) : if name is not none : kwargs [ " name " ] = name if pos is not none : kwargs [ " pos " ] = array _ to _ string ( pos ) element = et. element ( " body ", attrib = kwargs ) return element | [
0.051844000816345215,
-0.3423537611961365,
0.7792217135429382,
0.2942740321159363,
-0.7889832854270935,
0.3971295654773712,
-0.918710470199585,
-0.3661419749259949,
0.6288566589355469,
0.13432839512825012,
-0.6735090613365173,
-0.05978942662477493,
-0.43191584944725037,
0.2060389220714569,... |
def ones _ like ( * symbols ) : return full _ like ( symbols, 1 ) | [
-1.0626438856124878,
1.311604619026184,
0.17328280210494995,
0.25526508688926697,
0.22183017432689667,
-0.10528165847063065,
-0.028385033831000328,
-0.5829315781593323,
-0.04549626260995865,
-0.21813935041427612,
-0.8423973917961121,
0.10204775631427765,
-0.6869208216667175,
0.184563472867... |
def _ _ init _ _ ( self, value : mapping [ kt, vt _ co ] = none, *, homogeneous _ type : bool = false, remove _ none _ values : bool = false, no _ copy : bool = true, * * kwargs, ) : super ( ). _ _ init _ _ ( value, homogeneous _ type = homogeneous _ type, remove _ none _ values = remove _ none _ values, no _ copy = no... | [
0.16037830710411072,
0.6733173131942749,
0.5163151621818542,
0.8586694002151489,
-0.19723744690418243,
0.12854072451591492,
0.12263258546590805,
0.6796243786811829,
0.24994120001792908,
0.45922836661338806,
-0.8726343512535095,
0.0024290524888783693,
0.6313862800598145,
0.3236423432826996,... |
def create _ checksum _ object _ from _ stream ( f, algorithm = d1 _ common. const. default _ checksum _ algorithm ) : checksum _ str = calculate _ checksum _ on _ stream ( f, algorithm ) checksum _ pyxb = d1 _ common. types. dataonetypes. checksum ( checksum _ str ) checksum _ pyxb. algorithm = algorithm return checks... | [
0.5788823962211609,
-0.10940452665090561,
0.3360227346420288,
0.9793774485588074,
-0.5244112014770508,
0.5860809087753296,
0.04772618040442467,
-0.112618088722229,
-0.19935762882232666,
-0.43597450852394104,
-0.43588101863861084,
-0.08125141263008118,
0.28499266505241394,
0.275489419698715... |
def profile _ func ( func ) : @ wraps ( func ) def _ profile _ wrapper ( * args, * * kwargs ) : global profiler _ running if not profiler _ running : profiler _ running = true try : profiler. enable ( ) return func ( * args, * * kwargs ) finally : profiler. disable ( ) profiler _ running = false return _ profile _ wrap... | [
0.642627477645874,
-0.09073451161384583,
0.7327320575714111,
0.5587676167488098,
0.2936171591281891,
0.399722695350647,
0.6122207045555115,
-0.12290980666875839,
0.21391627192497253,
0.8351581692695618,
0.03569721803069115,
0.41482070088386536,
-0.9205805659294128,
-0.15055349469184875,
... |
def delete _ collapsed _ branch _ from _ small ( self, branch ) : # do we need to do anything here? pass | [
0.7740727663040161,
-0.2169487625360489,
0.7618534564971924,
0.813583254814148,
-0.783746063709259,
0.5359317064285278,
0.30346038937568665,
-0.018798934295773506,
0.877190887928009,
-1.0173509120941162,
-1.0609291791915894,
-0.02818245440721512,
-0.843403697013855,
0.5807234644889832,
0... |
def get _ satellites _ by _ hazard _ id ( self, hazard _ id : str ) - > list [ satellite ] : pass | [
-0.2555721402168274,
-0.06331796944141388,
0.23903729021549225,
0.7475171685218811,
0.87096107006073,
-0.25148895382881165,
-0.7056173086166382,
-1.0779516696929932,
0.3553737699985504,
-0.3495452404022217,
-0.28948044776916504,
0.5136627554893494,
0.6603275537490845,
1.018319845199585,
... |
def get _ ntp _ associations ( cls, client _ obj, * * kwargs ) : endpoint = " show ntp associations " expect _ prompt = ['bytes * ','>'] raw _ payload = client _ obj. connection. request ( endpoint, expect _ prompt ). response _ data # get the parser parser = " raw / horizontaltable " data _ parser = utilities. get _ d... | [
-0.5291445255279541,
0.4421520233154297,
0.7230195999145508,
-0.8827449083328247,
-0.9801690578460693,
0.2035875767469406,
-0.3799164891242981,
-0.42215725779533386,
-0.7454635500907898,
0.4431895613670349,
-0.3246186375617981,
0.29352879524230957,
-0.40178629755973816,
-0.3273138403892517... |
def sha256sum ( fpath, bs = 65536 ) : sha256 = hashlib. sha256 ( ) with open ( fpath,'rb') as f : for block in iter ( lambda : f. read ( bs ), b'' ) : sha256. update ( block ) return sha256. hexdigest ( ) | [
0.10202357172966003,
-0.6720870137214661,
0.43755480647087097,
-0.24934528768062592,
-0.40196454524993896,
-0.4661332070827484,
0.13935473561286926,
0.00466768816113472,
-0.09745057672262192,
0.7816029787063599,
-0.6726736426353455,
-0.37870165705680847,
0.42824140191078186,
-0.42356485128... |
def _ _ init _ _ ( self, bytes : list [ int ] ) :... | [
-0.34391698241233826,
0.04009184241294861,
0.18004772067070007,
0.5563936829566956,
0.0014127378817647696,
0.42164111137390137,
-0.03320414945483208,
0.499985933303833,
0.6029642820358276,
-0.6892129778862,
-1.8320125341415405,
-0.3990236818790436,
-0.7916598320007324,
0.7440569400787354,
... |
def gethexch ( * args ) : return _ snap. tch _ gethexch ( * args ) | [
0.9926648736000061,
0.34563735127449036,
0.4238963723182678,
0.5437277555465698,
1.0672948360443115,
0.8732278347015381,
0.7876701951026917,
0.8528712391853333,
-0.7449438571929932,
-0.5264334082603455,
-0.24880893528461456,
-0.4104445278644562,
0.04924541339278221,
0.8216292262077332,
1... |
def filter _ params ( target ) : def wrapper ( params, * args, * * kwargs ) : params = filter _ oauth _ params ( params ) return target ( params, * args, * * kwargs ) wrapper. _ _ doc _ _ = target. _ _ doc _ _ return wrapper | [
-0.49421197175979614,
-0.4930902421474457,
0.6382304430007935,
-0.29302603006362915,
-0.7452397346496582,
-0.265140175819397,
-0.36189568042755127,
-0.15659548342227936,
0.5982393026351929,
0.8319656848907471,
1.4312655925750732,
1.1105791330337524,
0.8441633582115173,
0.10125111043453217,... |
def _ inject _ tw _ links ( reader, words, line, words _ category _ index, logger ) : book, chapter, verse = reader. location ( ) # inject link at end if len ( words ) > 1 : logger. info ( u'injecting multiple words at { } { } : { } { } '. format ( book, chapter, verse, line ) ) for word in words : link ='x - tw = " { ... | [
-0.42065316438674927,
0.24694207310676575,
0.5378092527389526,
-1.3867731094360352,
0.46760833263397217,
-0.5119640231132507,
-0.46658679842948914,
0.3311206102371216,
-1.1420215368270874,
0.6706287860870361,
0.3161017894744873,
-0.18232528865337372,
0.17762307822704315,
0.724900484085083,... |
def evaluate ( self, dataset, metric = " auto ", missing _ value _ action ='error ', options = { }, * * kwargs ) : _ raise _ error _ if _ not _ sframe ( dataset, " dataset " ) options = options. copy ( ) options. update ( kwargs ) options. update ( {'model': self. _ _ proxy _ _,'dataset': dataset,'model _ name': self. ... | [
-0.24054233729839325,
0.6748992800712585,
0.4420631229877472,
0.3425186574459076,
-0.1977599561214447,
-0.07927080243825912,
0.33645233511924744,
-1.0777045488357544,
-0.3059666156768799,
-0.4889756143093109,
-0.5155216455459595,
0.4195113778114319,
0.08828681707382202,
0.19469650089740753... |
def deprecated _ init ( super _ init _ func, arg _ names, ignore = tuple ( ), deprecated _ aliases = { }, deprecated _ defaults = { }, category = pygideprecationwarning, stacklevel = 2 ) : # we use a list of argument names to maintain order of the arguments # being deprecated. this allows calls with positional argument... | [
-0.006905945483595133,
0.2549521028995514,
0.8129032254219055,
-0.2762078642845154,
0.12261351197957993,
-0.544694721698761,
-1.0568605661392212,
-0.32414111495018005,
-1.3067054748535156,
0.12372641265392303,
-0.7679625749588013,
0.5002281665802002,
0.3610507547855377,
0.3270713686943054,... |
def compare _ flat _ ttrees ( tree1, tree2, branch _ names ) : not _ found _ br = [ ] identical _ br = set ( ) diff _ br = set ( ) for br in branch _ names : are _ branches = tree1. getlistofbranches ( ). contains ( br ) are _ branches = are _ branches and tree2. getlistofbranches ( ). contains ( br ) if not are _ bran... | [
-0.1127314418554306,
-0.5321118235588074,
0.9854954481124878,
-0.22166351974010468,
0.6852459907531738,
0.5941020250320435,
-0.8760059475898743,
-0.4851565361022949,
-0.7933502793312073,
0.5421226620674133,
-0.10231063514947891,
-0.20630013942718506,
-0.6775175929069519,
1.069090485572815,... |
def trove _ dashboard _ uninstall ( relation _ id = none ) : status _ set ('maintenance ','remove dashboard files') trove _ dashboard _ remove _ dashboard _ files ( ) status _ set ('maintenance ','remove source files') trove _ dashboard _ remove _ source _ files ( ) " " " restart the openstack - dashboard. " " " if not... | [
0.741715133190155,
1.1144397258758545,
0.4431072771549225,
0.3267475664615631,
0.6599528193473816,
-0.5561404824256897,
1.161666750907898,
0.769088625907898,
-0.22552131116390228,
0.29031088948249817,
-0.018940234556794167,
-0.3947340250015259,
-0.56131511926651,
-0.34370020031929016,
0.... |
def _ _ eq _ _ ( self, * args ) : return _ snap. tflt _ _ _ eq _ _ ( self, * args ) | [
-0.6846704483032227,
-0.10891149193048477,
0.09309623390436172,
-0.7520968317985535,
0.4930626451969147,
0.5224807262420654,
0.8926142454147339,
0.11150959134101868,
-0.7248011827468872,
0.5773114562034607,
-1.451384425163269,
-1.8195881843566895,
0.3296504020690918,
0.758986234664917,
0... |
def wall _ from _ image ( self, path, adapt ='crop ', color = ( 255, 255, 255 ), dist = 0. 98 ) : mask = img _ to _ mask ( path, color, dist ) return self. wall _ from _ array ( mask, adapt = adapt ) | [
-0.1413658857345581,
-0.27364978194236755,
0.45053035020828247,
0.6470670104026794,
-0.6253343224525452,
0.34516942501068115,
0.06746641546487808,
-1.0626624822616577,
0.2830628454685211,
0.8919253349304199,
0.13175490498542786,
0.3331696391105652,
0.7100687026977539,
0.0471433587372303,
... |
async def download _ datfiles ( self ) : logger. info ('updating. dat files') systems _ dict = { } systems = ['dc ', # dreamcast'gc ', # gamecube'mac ', # macintosh'mcd ', # sega mega cd'palm ', # palm os'pc ', # pc'ps2 ', # playstation 2'ps3 ', # playstation 3'psp ', # playstation portable'psx ', # playstation'ss ', #... | [
-0.7050096988677979,
0.23917029798030853,
0.8496741652488708,
-0.4150906801223755,
0.4946621060371399,
0.7721568942070007,
-0.1956629604101181,
-0.2923257052898407,
-0.4245668947696686,
-0.13290607929229736,
-0.379061222076416,
-0.7376233339309692,
0.22642762959003448,
0.29387199878692627,... |
def _ sync _ db _ col ( self, column = " followers " ) : # sync db column - followers / following tmp _ file = " tmp _ { fol _ col }. csv ". format ( fol _ col = column ) if path. isfile ( tmp _ file ) : tmp _ df = pd. read _ csv ( tmp _ file ) col _ list = list ( tmp _ df [ column ] ) else : col _ list = self. _ _ get... | [
-0.37019017338752747,
0.008427039720118046,
0.7989410161972046,
0.5796812772750854,
-0.10127566754817963,
0.5266619324684143,
0.8040769100189209,
-0.28933510184288025,
-0.439385324716568,
1.1702916622161865,
-0.8408589363098145,
0.17127414047718048,
-0.0008124860469251871,
0.79754185676574... |
def getstrattrdatn ( self, * args ) : return _ snap. tneanet _ getstrattrdatn ( self, * args ) | [
-0.3335038721561432,
-0.23618857562541962,
0.17795705795288086,
-0.4917955994606018,
0.7564883232116699,
-0.8297082185745239,
0.7441572546958923,
0.2239808440208435,
-0.4442845284938812,
-1.2805445194244385,
-1.320112705230713,
-0.041269123554229736,
0.40752112865448,
0.4272204041481018,
... |
def compile ( self, loss, optimizer ) : if isinstance ( loss, str ) : if loss = ='mse': self. loss _ func = errors. meansquarederror ( ) elif loss = ='crossentropy': self. loss _ func = errors. crossentropy ( ) else : message = " " " you must specify a loss function of :'mse ','crossentropy ', or... " " " raise valueer... | [
-0.2336832731962204,
-0.6805207133293152,
0.3812275230884552,
0.4565685987472534,
0.32073256373405457,
-0.4633212089538574,
0.3518143892288208,
0.1344449818134308,
-0.27193188667297363,
0.013941146433353424,
-0.344143807888031,
0.7443592548370361,
0.43602806329727173,
0.9004574418067932,
... |
def tangentlines ( centre1, centre2, radius, pathtype ) : # assign both radius to the same radius1 = radius2 = radius # convert to numpy array for calculation centre1 = numpy. array ( centre1 ) centre2 = numpy. array ( centre2 ) # compute connecting vector vector = centre1 - centre2 distance = numpy. linalg. norm ( vec... | [
-0.09321407228708267,
-0.9750045537948608,
0.8489930033683777,
-0.09905792772769928,
-0.3565916121006012,
-0.004150707274675369,
0.5390004515647888,
-0.5549074411392212,
-0.14074064791202545,
0.7591642737388611,
0.06946305185556412,
-0.014443092979490757,
-0.5471054911613464,
-0.0024383452... |
def requete ( ul : str, form : str, ky : str ) - > object : adr = ul + form + ky res = requests. get ( adr ) status = res. status _ code if status! = 200 : raise connectionerror ( f " failed while trying to access the url with status code { status } " ) else : print ( " url successfully accessed ", flush = true ) retur... | [
-0.29168465733528137,
-0.5675432682037354,
0.6202428936958313,
-0.5897970199584961,
0.28249189257621765,
-0.20444893836975098,
-1.1817630529403687,
-0.06431987136602402,
-0.5719549059867859,
0.1190776526927948,
0.7744944095611572,
0.3286117911338806,
-0.11264049261808395,
-0.49094465374946... |
def getlineendpos ( self, * args ) : return _ snap. tmin _ getlineendpos ( self, * args ) | [
0.1228143498301506,
-0.5304797887802124,
0.2644985616207123,
-0.7527629733085632,
0.5842104554176331,
0.6852325797080994,
-1.2207223176956177,
-0.05037451162934303,
-1.173030972480774,
-0.42318564653396606,
-1.2797014713287354,
-1.0008676052093506,
-1.214854121208191,
0.4191492199897766,
... |
def get _ good _ ramp ( gnum, ydata, min _ dn = 0. 0, max _ dn = 62500. 0, keepfirst = false, nmax = none ) : # create clean versions of the data if keepfirst : startk = 0 else : startk = 1 if nmax is none : nmax = - 1 ydatat = ydata [ startk : nmax ] gnumt = gnum [ startk : nmax ] ( gindxs, ) = np. where ( ( ydatat > ... | [
-0.45424431562423706,
0.049465473741292953,
0.6927956938743591,
-0.6566014885902405,
-0.6289270520210266,
-0.016337715089321136,
-0.6155039072036743,
-0.594843864440918,
-0.4160618185997009,
-0.021614499390125275,
-0.7980951070785522,
1.2481411695480347,
0.6824395060539246,
0.2320967167615... |
def get _ surprisal _ scores ( system _ 1, system _ 2, base = 2, alpha = 1 ) : # normalize reference and comparison frequencies type2p _ 1 = get _ relative _ freqs ( system _ 1 ) type2p _ 2 = get _ relative _ freqs ( system _ 2 ) # get surprisal of each type type2surprisal _ 1 = get _ type _ surprisals ( type2p _ 1, ba... | [
-0.3906334936618805,
-0.22400665283203125,
0.9499738216400146,
0.34614062309265137,
-0.09721614420413971,
0.6942451000213623,
-0.2794915735721588,
-1.0880793333053589,
-0.3830769956111908,
0.4414135813713074,
0.020819706842303276,
0.7797451615333557,
-0.3027479350566864,
0.3176339268684387... |
def bandpass _ filter ( signal, fs, fc, n _ cycles = none, n _ seconds = none, plot _ frequency _ response = false, return _ kernel = false, print _ transition _ band = false, remove _ edge _ artifacts = true, compute _ transition _ bandwidth = true ) : # set default and throw warning if no filter length provided if n ... | [
0.12095315754413605,
0.622049868106842,
0.7023082971572876,
1.377766489982605,
-0.8086913824081421,
-0.9311187267303467,
0.49030014872550964,
-0.1935046911239624,
-0.03724820166826248,
-0.35904738306999207,
0.2969077229499817,
0.893631100654602,
0.6831758618354797,
0.26469558477401733,
0... |
def flatten ( self, root : treenode ) - > none : if root = = none : return branchpts = [ ] node = root while true : # go to leftmost leaf, identifying branch points along the way while node. left! = none or node. right! = none : if node. left! = none : if node. right! = none : branchpts. append ( node ) node = node. le... | [
0.30299943685531616,
0.1982426941394806,
1.0913676023483276,
-0.08463318645954132,
-0.6194608211517334,
0.10127407312393188,
-0.06694508343935013,
-0.1562933623790741,
0.6676315069198608,
0.31189385056495667,
0.3201783299446106,
-0.16315670311450958,
-0.7985868453979492,
1.3721235990524292... |
def test _ list _ integer _ enumeration _ 1 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 2 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 2. xsd ", instance = " nistdata / list / ... | [
-1.2140830755233765,
-0.9612135887145996,
0.5291857719421387,
0.9857107400894165,
-0.3686169385910034,
-0.11379622668027878,
-0.09213074296712875,
0.6317742466926575,
0.7472435235977173,
0.6095644235610962,
-0.9475270509719849,
0.14553286135196686,
0.09175297617912292,
0.8981022834777832,
... |
def from _ dict ( cls, dikt ) - >'taskinstancecollection': return util. deserialize _ model ( dikt, cls ) | [
-0.8735472559928894,
0.4762001037597656,
0.36558791995048523,
-0.912449061870575,
-0.9243281483650208,
0.35695740580558777,
0.1540495604276657,
-0.06558378785848618,
-0.3398114740848541,
0.19804270565509796,
-0.9916486740112305,
-1.172244906425476,
0.4135974943637848,
-0.28937578201293945,... |
def forgot _ password ( clientid = none, secrethash = none, username = none ) : pass | [
0.5335286259651184,
0.39054563641548157,
0.25672173500061035,
1.2120417356491089,
0.5346518158912659,
-0.8392066955566406,
0.728592574596405,
0.14191056787967682,
-0.5026779174804688,
-0.4472498297691345,
-0.8662236332893372,
0.7962951064109802,
-1.0881280899047852,
0.19266895949840546,
... |
def _ schedule _ safety _ net _ messages _ from _ adherence _ percentage _ list ( self, adherence _ percentage _ by _ patients _ list, threshold ) : if adherence _ percentage _ by _ patients _ list = = none : return for adherence _ percentage _ by _ patient in adherence _ percentage _ by _ patients _ list : patient = a... | [
0.3956610858440399,
-0.04777156934142113,
0.5758671164512634,
-0.09776105731725693,
0.1878705471754074,
0.7166299819946289,
-0.23429331183433533,
-0.16480599343776703,
-0.2891634404659271,
0.6142395734786987,
-0.489810585975647,
-0.6335717439651489,
0.19192035496234894,
0.4304870367050171,... |
def stream _ entry _ keyname ( self ) : return " % s / % s " % ( self. stream, self. uuid ) | [
-0.11108884960412979,
-1.297930121421814,
0.37901124358177185,
-0.45427751541137695,
-0.5049348473548889,
0.7956012487411499,
0.1655467003583908,
0.04015541076660156,
-0.5524845719337463,
0.673400342464447,
0.3310636579990387,
1.2676149606704712,
-0.3027011752128601,
-0.04672520235180855,
... |
def load ( self, directory _ = ". / ", input _ file = " inp. txt ", param _ file = " param ", remote _ dir _ = " " ) : remote _ dir = fixdir ( remote _ dir _ ) directory = fixdir ( directory _ ) if remote _ dir! = " " : self. fetch _ data ( remote _ dir, input _ file, param _ file, directory ) self. load _ input _ file... | [
0.02125883474946022,
0.007917962968349457,
0.7631696462631226,
0.04967018589377403,
0.11037714779376984,
1.0791890621185303,
-0.4519779086112976,
-0.037243179976940155,
-0.6703654527664185,
-0.03639771416783333,
-0.06890124827623367,
0.5060445070266724,
-0.3901849091053009,
0.3034510910511... |
def _ _ init _ _ ( self, cmd, cwd = '. ', stdin = none, stdout = none, stderr = none ) : self. cmd = cmd self. cwd = cwd self. stdin = stdin self. stdout = stdout self. stderr = stderr | [
0.4368572533130646,
-0.7365344166755676,
0.5767146348953247,
0.27224814891815186,
-0.4419560730457306,
0.5436782836914062,
0.475844144821167,
-0.033744506537914276,
-0.24441832304000854,
-1.0540134906768799,
0.695365309715271,
0.8912163376808167,
0.2515723407268524,
1.3016456365585327,
0... |
def parse _ arguments ( ) : parser = argparse. argumentparser ( ) # = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = # augmentor related arguments... : ) # = = = = = = = = = = = = = = = = = = = =... | [
0.9830247163772583,
-0.2977764904499054,
0.7889180779457092,
-0.17605240643024445,
0.060986071825027466,
0.1339567005634308,
0.6636231541633606,
0.1791592836380005,
-0.5193764567375183,
0.36309316754341125,
-0.7555292248725891,
0.20731113851070404,
-0.090638168156147,
1.1288471221923828,
... |
def with _ bundle _ key ( self, key ) : b = self. _ copy ( ) b. bundle _ key = key return b | [
-0.20755082368850708,
-0.21464617550373077,
0.3959908187389374,
1.1206194162368774,
-1.048205018043518,
0.4351544678211212,
0.10325505584478378,
-0.03389980271458626,
0.022165141999721527,
0.6517124176025391,
-0.0869494080543518,
0.08288753777742386,
-0.14135093986988068,
0.459212899208068... |
def _ savemetricsfile ( mean _ average _ precision, mean _ precisions, mean _ recalls, pr _ ranks, output _ path ) : with tf. gfile. gfile ( output _ path,'w') as f : for k in sorted ( mean _ average _ precision. keys ( ) ) : f. write ('{ } \ n map = { } \ n mp @ k { } { } \ n mr @ k { } { } \ n '. format ( k, np. arou... | [
0.07718363404273987,
-0.2773958146572113,
0.6482368111610413,
-0.6888755559921265,
-0.17142222821712494,
0.761690080165863,
0.5888572931289673,
-0.20629261434078217,
-1.2590806484222412,
0.5829723477363586,
0.20072521269321442,
0.08458300679922104,
0.14355124533176422,
-0.12390939891338348... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.