text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ atomic _ id _ enumeration _ nistxml _ sv _ iv _ atomic _ id _ enumeration _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / id / schema + instance / nistschema - sv - iv - atomic - id - enumeration - 1. xsd ", instance = " nistdata / atomic / id / schema + ... | [
-0.06318406760692596,
-0.9456357955932617,
0.420877605676651,
0.23726649582386017,
-0.017410067841410637,
-0.14946456253528595,
0.47844815254211426,
-0.4279448986053467,
0.49258536100387573,
0.5836185216903687,
0.01258712075650692,
-0.17408956587314606,
-0.1461118459701538,
-0.005728851072... |
def root _ name ( self, name ) : self. _ root _ name = name self. ui. root _ name. settext ( " < b > % s < / b > " % ( name, ) ) | [
0.46648839116096497,
-0.20435482263565063,
0.42827466130256653,
0.3528105318546295,
-1.073232889175415,
-0.01600707694888115,
0.15960945188999176,
-0.19047001004219055,
0.42227843403816223,
0.7040867209434509,
-0.9302486181259155,
1.0682963132858276,
0.5253309011459351,
0.9648149609565735,... |
def hypervolume ( self, reference ) : min _ pf = tf. reduce _ min ( self. front, 0, keep _ dims = true ) r = tf. expand _ dims ( reference, 0 ) pseudo _ pf = tf. concat ( ( min _ pf, self. front, r ), 0 ) d = tf. shape ( pseudo _ pf ) [ 1 ] n = tf. shape ( self. bounds. ub ) [ 0 ] idx = tf. tile ( tf. expand _ dims ( t... | [
0.3185085356235504,
-0.07905581593513489,
0.802667498588562,
-0.4146121144294739,
-0.16579855978488922,
0.12132187932729721,
0.5621852874755859,
0.3832363486289978,
0.09659644961357117,
0.3727160692214966,
0.21214984357357025,
0.9677392244338989,
-0.018372317776083946,
-0.02139223739504814... |
def get _ full _ name ( self ) : return " { } { } ". format ( self. first _ name, self. last _ name ) | [
0.5063603520393372,
-1.6014909744262695,
0.7599856853485107,
-0.6694906949996948,
-0.0746249184012413,
0.5348844528198242,
-1.5722427368164062,
0.06327663362026215,
-0.38886821269989014,
-0.17257216572761536,
0.18410024046897888,
0.5091435313224792,
0.23834764957427979,
0.4665098190307617,... |
def server _ sent _ event _ source ( * args, * * kwargs ) : retry = kwargs. get ('retry ', 30000 ) headers = kwargs. get ('headers ', { } ) def _ inner ( func ) : def _ wrapper ( request ) : request. sse _ first _ time = true request. is _ asynchronous = true # basic necessary http headers request. write ('http / 1. 1 ... | [
-0.3939187526702881,
-0.36003950238227844,
1.0574195384979248,
-0.17358529567718506,
-0.5392943024635315,
-0.7200191020965576,
-0.10339553654193878,
-0.48608601093292236,
-0.09010007977485657,
0.5051978230476379,
-0.3505963385105133,
0.47134527564048767,
0.038397785276174545,
0.41192290186... |
def on _ key _ release ( self, key, modifiers ) : if key = = arcade. key. up or key = = arcade. key. w : if self. physics _ engine. is _ on _ ladder ( ) : self. player _ sprite. change _ y = 0 elif key = = arcade. key. down or key = = arcade. key. s : if self. physics _ engine. is _ on _ ladder ( ) : self. player _ spr... | [
0.07581806927919388,
-0.1862657368183136,
0.8368123769760132,
-0.16686522960662842,
-0.15834929049015045,
-0.37488651275634766,
0.2703804671764374,
-0.06755469739437103,
0.01778091862797737,
0.38574355840682983,
-1.5005379915237427,
-0.2681432068347931,
-0.7921276688575745,
0.6450713872909... |
def execute _ student _ plan ( self, area _ map, sample _ todo, max _ distance = 1. 0, max _ steering = pi / 2. + 0. 01, horizon _ distance = 3. 0 ) : self. _ reset ( ) count = 0 state = state ( area _ map, sample _ todo, max _ distance, max _ steering, horizon _ distance ) if verbose _ flag : print ('initial state :')... | [
-0.6799025535583496,
-0.36059024930000305,
0.6112239956855774,
0.3882080614566803,
-0.47794854640960693,
0.7773575782775879,
0.19971099495887756,
0.6664848327636719,
0.06652067601680756,
1.0541433095932007,
-0.43430274724960327,
0.24480630457401276,
0.1544751226902008,
-0.45115330815315247... |
def test _ example _ input _ one _ search _ value _ single _ select _ group _ test ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) i... | [
-1.1862772703170776,
0.8014547824859619,
0.218174010515213,
0.5579198598861694,
0.652551531791687,
0.559539794921875,
0.10023722052574158,
-0.44094347953796387,
0.5065178275108337,
0.43564122915267944,
-0.29616579413414,
-0.048058848828077316,
-0.46222826838493347,
0.5008437037467957,
-0... |
def dbcreateuser ( user ) : err = [ ] syserr = [ ] try : user1 = dbaccessconnection. userinfo. select ( dbaccessconnection. userinfo. c. emailaddress = = user. emailaddress ). execute ( ). first ( ) except : syserr. append ('user already exists check has failed') if user1 is none : try : dbaccessconnection. con. execut... | [
0.07060562074184418,
0.045942533761262894,
1.0192185640335083,
-0.057957910001277924,
0.6383646130561829,
0.4337732195854187,
0.5011526942253113,
-0.3528231680393219,
0.07796340435743332,
0.15755954384803772,
-1.0421184301376343,
-0.6482839584350586,
-0.42135921120643616,
0.462796181440353... |
def test _ list _ integer _ pattern _ 1 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 2 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 2. xsd ", instance = " nistdata / list / integer / sc... | [
-0.8528569340705872,
-0.20043490827083588,
0.577505886554718,
0.5993781685829163,
-0.27401190996170044,
0.22023160755634308,
-0.38599053025245667,
0.6552086472511292,
0.9779728055000305,
0.535605788230896,
-0.8807348608970642,
-0.15472018718719482,
-0.10337691754102707,
0.517480731010437,
... |
def getcarraylen ( self ) : sz = np. shape ( self. pos ) molno = sz [ 0 ] carraylen = 4 + 3 * self. ats * molno + molno return carraylen | [
0.757108747959137,
-0.6299782991409302,
0.3428463339805603,
-0.7943726778030396,
0.11241625249385834,
-0.3506486713886261,
-0.22935117781162262,
0.08906980603933334,
-0.03834380954504013,
-0.3238426446914673,
-1.223793625831604,
-0.017782136797904968,
-0.11743734776973724,
-0.3447930514812... |
def describebillsummarybyproject ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillsummarybyproject ", params, headers = headers ) response = json. loads ( body ) model = models. describebillsummarybyprojectresponse ( ) model. _ deserialize ( respon... | [
-0.6895433068275452,
1.4187754392623901,
0.5567426085472107,
-0.05895528942346573,
-0.12055514007806778,
0.6972750425338745,
0.2839108109474182,
-0.7499221563339233,
-0.4793679118156433,
0.2149125635623932,
-0.27815577387809753,
0.8238404989242554,
-0.6652605533599854,
0.5948482155799866,
... |
def add _ style _ src ( self, filename ) : self. add _ header ( ('< link rel = " stylesheet " type = " text / css " href = " { } " / >'). format ( filename ) ) | [
-0.4312700927257538,
-0.1605566143989563,
0.5968437790870667,
-0.18434788286685944,
-0.002607736038044095,
0.6398443579673767,
-0.05180032551288605,
0.9548428654670715,
-0.17669329047203064,
-0.41137969493865967,
0.3765871226787567,
0.19423258304595947,
-0.16704539954662323,
0.262256115674... |
def _ _ init _ _ ( self, params ) : super ( volumetricslice, self ). _ _ init _ _ ( params ) | [
0.642378032207489,
-0.46849608421325684,
0.29581916332244873,
0.48784834146499634,
0.7182868123054504,
0.41414475440979004,
-0.4447609782218933,
-0.3301512897014618,
-0.4337061643600464,
0.22675667703151703,
0.3806248903274536,
-0.5284847617149353,
-0.045025769621133804,
0.533778190612793,... |
def read ( self, bytes _ to _ read : int ) - > optional [ bytes ] : received _ bytes = bytes ( ) self. _ _ logger. debug ( " reading at most % d bytes ", bytes _ to _ read ) bytes _ left = bytes _ to _ read while bytes _ left! = 0 : try : received _ part = self. _ _ socket. recv ( 4096 ) self. _ _ logger. debug ( " rea... | [
-0.052251093089580536,
0.020482433959841728,
1.112979769706726,
-0.8264420628547668,
-0.04327477887272835,
-0.2043071985244751,
-0.5235190391540527,
-0.6587714552879333,
-0.2907067835330963,
-0.5860149264335632,
0.4566635489463806,
0.41851410269737244,
-1.4397428035736084,
-0.3997998237609... |
def clock ( ) : current _ time = datetime. now ( ). strftime ( " % h : % m : % s " ) mytimelabel. config ( text = current _ time, font ='banschrift 30') root. after ( 1000, clock ) # run itself again after 1000 ms | [
0.23067398369312286,
-0.6360160708427429,
0.5359424948692322,
0.02863529697060585,
0.028666306287050247,
0.7118352651596069,
0.529312014579773,
0.2724760174751282,
-0.09919053316116333,
1.041988730430603,
-0.08384814858436584,
1.0742160081863403,
-0.45802292227745056,
1.3627948760986328,
... |
def gid ( key = " gid " ) : return r. incr ( key ) | [
-0.6134767532348633,
1.4241845607757568,
0.11367032676935196,
-0.651282787322998,
-0.5427837371826172,
0.10413004457950592,
0.0011225335765630007,
-0.3960779309272766,
-0.9122061729431152,
0.3563302159309387,
0.7749485373497009,
0.1569496989250183,
-1.1420533657073975,
0.1563614159822464,
... |
def removemaximisinglinearscalarisedvalue ( self, weight ) : maxscalval = - numpy. infinity maxvec = none for i in range ( len ( self. set ) ) : scalval = inner _ product ( self. set [ i ], weight ) if ( scalval > maxscalval ) : maxvec = self. set [ i ] maxscalval = scalval vvs = self. removevec ( maxvec ) return ( max... | [
0.5237491726875305,
-0.10522383451461792,
0.5861490368843079,
0.8798488974571228,
-1.1238716840744019,
-0.3882445693016052,
-0.6780356168746948,
0.12044976651668549,
0.5910980105400085,
0.8201854825019836,
-0.31740811467170715,
0.4642747938632965,
-0.3369055688381195,
0.5589698553085327,
... |
def view _ holded ( ) : token = request. headers. get ('authorization') communityid _ = request. json. get ('communityid') # has to be passed if find _ missing ( token, communityid _ ) : payload = {'message':'missing - params'} elif malformed _ length ( { token : [ 16, 1024 ], # 22 exactly } ) : payload = {'message':'b... | [
-0.32452914118766785,
-0.47967812418937683,
0.759099543094635,
-0.2541216015815735,
0.5754969120025635,
0.14018602669239044,
-0.2907961308956146,
-0.777916431427002,
0.38546720147132874,
0.058344766497612,
0.42379030585289,
0.6449825763702393,
-0.303509920835495,
0.73934006690979,
0.6899... |
def write _ coords ( file _ obj, plot _ name, x, y ) : string _ prep ='" { plot _ name } " : '. format ( plot _ name = plot _ name ) for x _ i, y _ i in zip ( x, y ) : string _ prep + = " ( { }, { } ), ". format ( x _ i, y _ i ) string _ prep = string _ prep [ : - 1 ] string _ prep + =';'file _ obj. write ( string _ pr... | [
0.13239029049873352,
-0.7396578192710876,
0.6047633290290833,
-0.30843204259872437,
-0.08460492640733719,
0.4981532096862793,
0.00419080164283514,
0.04513416439294815,
-1.0217242240905762,
0.08150549232959747,
-0.5617796778678894,
-0.09279142320156097,
0.5512940883636475,
-0.64224439859390... |
def get _ blob _ update _ time ( self, bucket _ name : str, object _ name : str ) : client = self. get _ conn ( ) bucket = client. bucket ( bucket _ name ) blob = bucket. get _ blob ( blob _ name = object _ name ) if blob is none : raise valueerror ( f " object ( { object _ name } ) not found in bucket ( { bucket _ nam... | [
0.5803530812263489,
-1.190307378768921,
1.052558422088623,
0.2828978896141052,
-0.3510507047176361,
0.25318849086761475,
-1.0066890716552734,
-0.9688554406166077,
-0.829620361328125,
1.4807952642440796,
-1.217921495437622,
0.6623860001564026,
-0.4675429165363312,
-0.5564100742340088,
-0.... |
def name _ prefix ( self ) : return self. _ name _ prefix | [
0.05278917774558067,
-0.10662029683589935,
0.31126537919044495,
-0.4801124632358551,
-0.5490401983261108,
0.840004563331604,
-0.3620475232601166,
-0.7214491367340088,
0.7308124899864197,
0.358376681804657,
-1.362420916557312,
0.5511425733566284,
0.348711222410202,
0.24475939571857452,
0.... |
def async _ client ( async _ app ) : return testing. testclient ( async _ app ) | [
0.9172637462615967,
-0.5697339177131653,
0.08229459077119827,
-0.3634369373321533,
0.12334731221199036,
-0.04820401594042778,
0.38802680373191833,
-0.3299086391925812,
0.5484844446182251,
0.170423224568367,
0.8827383518218994,
0.13030990958213806,
-0.5250446200370789,
-1.124780297279358,
... |
def test _ atomic _ language _ enumeration _ nistxml _ sv _ iv _ atomic _ language _ enumeration _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - enumeration - 1. xsd ", instance = " nistdata /... | [
-0.21023449301719666,
-0.8634896874427795,
0.413655161857605,
0.46994006633758545,
-0.06756681948900223,
-0.16120614111423492,
0.43534478545188904,
-0.03646327182650566,
0.34101489186286926,
0.7570980191230774,
-0.040737636387348175,
-0.4751582741737366,
-0.08673648536205292,
0.06874071806... |
def test _ atomic _ boolean _ pattern _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 1 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 1. xsd ", instance = " nistdata / atomic / boolea... | [
-0.10528772324323654,
-0.4629449248313904,
0.49764472246170044,
0.8999777436256409,
-0.1845725178718567,
0.4130939245223999,
0.7621342539787292,
0.04536238685250282,
-0.32220637798309326,
1.1912357807159424,
-0.43841975927352905,
0.11391378194093704,
-0.3416272699832916,
-0.187375500798225... |
def list _ item ( self, * * kw ) : if ( kw. has _ key ('search') ) : item _ select = table. care _ billing _ item if ( kw. has _ key ('description') ) : itemdescription = kw ['description'] if kw ['description _ search'] = ='wild card': item _ select = billingitem. select ( billingitem. q. description. contains ( itemd... | [
-0.048857904970645905,
-0.07570113986730576,
0.8311746120452881,
0.6856181621551514,
0.558717668056488,
0.14745935797691345,
-0.8848143219947815,
0.515930712223053,
0.15023908019065857,
-0.2902834415435791,
0.18932491540908813,
-0.07069950550794601,
0.13409112393856049,
0.962059497833252,
... |
def name ( self ) : return self. _ revit _ object. name | [
-0.06346164643764496,
-1.536912202835083,
0.548331618309021,
-0.4001210927963257,
-0.17496120929718018,
0.7564014792442322,
1.1039124727249146,
-0.3066774606704712,
0.20825713872909546,
-0.4107544422149658,
-0.18207216262817383,
0.4544689357280731,
0.3608144521713257,
-1.0888057947158813,
... |
def set _ brightness ( self, brightness ) : self. _ write _ command ( [ lcdbackpack. set _ brightness, brightness ] ) | [
-0.02118600159883499,
0.2631882131099701,
0.2699570953845978,
1.2146575450897217,
0.8721259832382202,
0.1011602059006691,
0.42966368794441223,
-0.31470897793769836,
0.5722121000289917,
-1.1495821475982666,
-1.091218113899231,
0.8012145757675171,
-1.0108622312545776,
0.8293408155441284,
0... |
def _ smtp _ create ( ) - > union [ smtplib. smtp, smtplib. smtp _ ssl ] : logger = current _ app. logger logger. debug ( " stellt verbindung zum smtp - server her... " ) smtp = smtplib. smtp ( " smtp. live. com : 587 " ) smtp. starttls ( ) with open ( os. path. join ( current _ app. instance _ path,'2357. p') ) as fil... | [
0.12819863855838776,
-0.855828046798706,
0.4371812343597412,
0.744834840297699,
-0.7827409505844116,
0.27631452679634094,
-0.2156154215335846,
0.667151689529419,
0.07228605449199677,
0.4529551863670349,
-0.2876845598220825,
0.5011451244354248,
-0.15159741044044495,
-0.36092180013656616,
... |
def following _ update _ all ( ) : print ( f'running following _ update _ all ; following { len ( following ) } posts') for followed in following : following _ update _ single ( followed ) | [
-0.1297185719013214,
-0.45084473490715027,
0.31247326731681824,
1.3844770193099976,
-0.08739344030618668,
1.2916022539138794,
0.17379288375377655,
0.18839912116527557,
-0.10887488722801208,
0.10663988441228867,
-0.9411109089851379,
0.46291643381118774,
-0.3203631639480591,
1.43618726730346... |
def rotkehlchen _ instance ( cli _ args, username, blockchain, accountant, start _ with _ logged _ in _ user, start _ with _ valid _ premium, function _ scope _ messages _ aggregator, db _ password, rotkehlchen _ api _ key, rotkehlchen _ api _ secret, ) : rotkehlchen = rotkehlchen ( cli _ args ) initialize _ mock _ rot... | [
0.26007628440856934,
-0.2183196246623993,
0.6221423149108887,
-0.04190578684210777,
-0.11936874687671661,
0.7503942847251892,
0.03014538623392582,
0.04759880527853966,
-0.287094384431839,
-0.02910304255783558,
0.11149299144744873,
0.34049755334854126,
-0.6232730746269226,
-0.10005995631217... |
def calc _ deps ( self, value = none ) : # all collected dependencies'keys will go in here deps = [ ] # since this method is recursive, it is capable of evaluating # as deep as the value goes, meaning that it can check dictionaries # and lists for any references of dependencies. at first, this # value is this node's va... | [
-0.6097081899642944,
-0.08610951155424118,
0.9146151542663574,
-0.009205467998981476,
-0.1141066774725914,
-0.47090259194374084,
0.3578622043132782,
-0.3792515695095062,
0.13038049638271332,
-0.2863160967826843,
-0.2907956838607788,
-0.1578867882490158,
0.25565123558044434,
1.4908407926559... |
def autolabel ( rects, rot, roti, posround ) : self _ rot = rot for i in range ( 0, len ( rects ) ) : height = round ( rects [ i ]. get _ height ( ), posround ) if i in roti : self _ rot = 0 ax. annotate ('{ } '. format ( height ), xy = ( rects [ i ]. get _ x ( ) + rects [ i ]. get _ width ( ) / 2, height ), xytext = (... | [
0.22808484733104706,
-0.9946238994598389,
0.6327133774757385,
0.08602208644151688,
-0.10787275433540344,
0.4860052168369293,
0.9012942314147949,
0.01295844279229641,
0.24027124047279358,
0.0695870965719223,
-0.1065400093793869,
0.09113587439060211,
0.14763934910297394,
-0.6934243440628052,... |
def variable _ summaries ( var ) : with tf. name _ scope ('summaries') : mean = tf. reduce _ mean ( var ) tf. summary. scalar ('mean ', mean ) with tf. name _ scope ('stddev') : stddev = tf. sqrt ( tf. reduce _ mean ( tf. square ( var - mean ) ) ) tf. summary. scalar ('stddev ', stddev ) tf. summary. scalar ('max ', tf... | [
0.08974577486515045,
0.7918856143951416,
0.5066803693771362,
-1.0588428974151611,
-0.010081765241920948,
0.11218499392271042,
0.3674105703830719,
-0.1422412246465683,
0.17742761969566345,
-0.060335781425237656,
-1.0075794458389282,
0.8332000374794006,
1.1453733444213867,
0.3964707255363464... |
def msjse _ hds _ similarities ( dsm _ hds, arr _ perp ) : # number of data points n = dsm _ hds. shape [ 0 ] # number of perplexities l = arr _ perp. size # matrix storing the multi - scale hds similarities sigma _ { ij }. element [ i, j ] contains sigma _ { ij }. sigma _ { ii } is set to 0. sigma _ ij = np. zeros ( s... | [
0.14989668130874634,
-0.1519608348608017,
0.8525212407112122,
0.33719509840011597,
-0.14633816480636597,
-0.43495064973831177,
-0.33983927965164185,
-0.1187792494893074,
-0.3263693153858185,
0.5419850945472717,
-0.35400906205177307,
-0.008804868906736374,
-0.21431176364421844,
0.6085434556... |
def loadtimeline ( found ) : if found : with open ('timeline - data / timeline. data ','rb') as f : t = pickle. load ( f ) else : t = timeline ( ) return t | [
0.3173886835575104,
-0.23972688615322113,
0.30510053038597107,
-0.1978663206100464,
-0.21390315890312195,
-0.27667489647865295,
-0.7722126841545105,
-0.5339537858963013,
0.012341133318841457,
0.04450608417391777,
-0.7936353087425232,
-0.5242832899093628,
-0.6024907827377319,
-0.68851512670... |
def invoke ( self, argument, from _ tty ) : try : args, kwargs = self. split _ args ( argument ) except systemexit : # raised when the usage is printed by an argparsedcommand return except ( typeerror, gdb. error ) : pwndbg. exception. handle ( self. function. _ _ name _ _ ) return try : self. repeat = self. check _ re... | [
-0.5960599780082703,
0.1625571846961975,
0.7155055403709412,
-0.2654540538787842,
-0.3479125499725342,
-0.3131994307041168,
0.13199985027313232,
-0.1743858903646469,
0.002726086648181081,
-0.12163810431957245,
0.04132620617747307,
0.5913423895835876,
-0.5345337986946106,
0.1749916523694992... |
def test _ atomic _ hex _ binary _ pattern _ 2 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ pattern _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - pattern - 3. xsd ", instance = " nistdata... | [
-0.10922615975141525,
-0.043912455439567566,
0.5557255148887634,
0.6739169955253601,
-0.12853080034255981,
0.7810208201408386,
-0.2903297543525696,
0.21350443363189697,
-0.24512217938899994,
0.6875213384628296,
-0.9239833950996399,
-0.26884564757347107,
-0.11692101508378983,
0.099398173391... |
def set _ participant _ file ( self, fname, include _ columns = none ) : df = pd. read _ csv ( fname ) try : cols = ['participant _ id ','sex ','age'] cols + = include _ columns if include _ columns is not none df = df [ cols ] df. to _ csv ( os. path. join ( self. data _ path,'participants. tsv'), sep ='\ t') except k... | [
0.06963453441858292,
-0.2991296648979187,
0.6704764366149902,
-0.06713707745075226,
0.051214225590229034,
0.9980456233024597,
0.2317178100347519,
1.6843844652175903,
-1.187692403793335,
0.5159469842910767,
0.049893349409103394,
0.13624820113182068,
-0.21305537223815918,
-0.9786383509635925... |
def generate _ lease _ requests ( machine _ type _ key, swarming _ server ) : machine _ type = machine _ type _ key. get ( ) if not machine _ type : logging. warning ('machinetype no longer exists : % s ', machine _ type _ key. id ( ) ) return [ ] expired _ requests = _ clean _ up _ expired _ leases ( machine _ type ) ... | [
-0.8044210076332092,
0.26591041684150696,
0.4750913977622986,
-0.053929299116134644,
0.22972185909748077,
0.11728351563215256,
-0.8689734935760498,
-0.10445623844861984,
-0.05408348888158798,
0.2600212097167969,
-0.558469295501709,
0.15370364487171173,
-0.29283231496810913,
1.3378832340240... |
def command _ dnsq ( self, brain, arg ) : pattern = " ". join ( arg ) siebel _ re = re. compile ( '. * % s. *'% pattern, re. i ) url = " http : / / tickets - rss. ops. yahoo. com / feeds / opsamericas / dns / allunassigned. rss " rss = xml. etree. elementtree. fromstring ( self. fetchurl ( url ) ) ticketlist = rss. fin... | [
-0.6557969450950623,
0.40943846106529236,
0.9245746731758118,
-0.723227322101593,
-0.10948476940393448,
-0.2830042839050293,
-0.5432812571525574,
0.014843931421637535,
0.5086198449134827,
0.008494790643453598,
-0.6933721303939819,
0.10879558324813843,
0.32714003324508667,
0.180090710520744... |
def speakmisspelledindicator ( self, obj, offset ) : verbosity = _ settingsmanager. getsetting ('speechverbositylevel') if verbosity = = settings. verbosity _ level _ verbose : try : text = obj. querytext ( ) except : return # if we're on whitespace, we cannot be on a misspelled word. # charandoffsets = \ text. gettext... | [
0.045495931059122086,
-0.4133266806602478,
0.60252845287323,
-0.17974187433719635,
-0.5158789753913879,
0.6368430852890015,
0.05652080103754997,
-0.09467916935682297,
1.3445605039596558,
0.24055235087871552,
0.07477723807096481,
0.6733775734901428,
-0.40407615900039673,
1.0345288515090942,... |
def test _ 01 _ volume _ snapshot ( self ) : # step 1 self. testdata [ " recurring _ snapshot " ] [ " intervaltype " ] ='hourly'recurring _ snapshot = snapshotpolicy. create ( self. apiclient, self. volume [ 0 ]. id, self. testdata [ " recurring _ snapshot " ] ) # listsnapshotpolicy should return newly created policy l... | [
-0.39117875695228577,
-0.3822755217552185,
0.7520447969436646,
0.19907808303833008,
0.8805024027824402,
0.3212292194366455,
-0.6447994709014893,
0.38129332661628723,
0.49570077657699585,
-0.026443984359502792,
-0.2142544984817505,
-0.5827834010124207,
-0.4515828490257263,
0.192936405539512... |
def connect ( addr, family = socket. af _ inet, bind = none ) : sock = socket. socket ( family, socket. sock _ stream ) if bind is not none : sock. bind ( bind ) sock. connect ( addr ) return sock | [
0.469706267118454,
-0.5776299238204956,
0.16223900020122528,
0.7608460783958435,
-1.906262755393982,
-0.28803566098213196,
-0.433566153049469,
0.1884685754776001,
0.5205208659172058,
-0.7692617774009705,
0.873877763748169,
0.6833032369613647,
-0.024746175855398178,
0.5155926942825317,
-0... |
def reload ( self ) : for attr in self. _ _ class _ _. _ _ dict _ _ : if isinstance ( getattr ( self. _ _ class _ _, attr ), cached _ property ) : if attr in self. _ _ dict _ _ : delattr ( self, attr ) @ threadable. threadable def req _ works ( username ) : self. _ soup _ works = self. request ( f " https : / / archive... | [
-0.959177553653717,
-0.04116480425000191,
0.7270429134368896,
0.3368094563484192,
0.6129938960075378,
-0.4715138375759125,
0.6390690803527832,
-0.6053013801574707,
-0.09489063918590546,
-0.7344728112220764,
-0.22006838023662567,
0.14922821521759033,
0.005682921502739191,
0.1289676725864410... |
def auxiliary _ accounts _ visible ( self, auxiliary _ accounts _ visible ) : self. _ auxiliary _ accounts _ visible = auxiliary _ accounts _ visible | [
0.37347182631492615,
-0.7201038599014282,
0.09145393967628479,
-0.4643922746181488,
-1.2043840885162354,
1.3134400844573975,
1.13393235206604,
0.5894204378128052,
-0.010983784683048725,
0.4837539792060852,
-0.6845690608024597,
-0.3750098645687103,
0.6285422444343567,
-0.4758721888065338,
... |
def eliminate ( values ) : solved _ values = [ box for box in values. keys ( ) if len ( values [ box ] ) = = 1 ] for box in solved _ values : digit = values [ box ] for peer in peers [ box ] : values [ peer ] = values [ peer ]. replace ( digit,'' ) return values | [
-0.9228956699371338,
0.6542605757713318,
0.6148286461830139,
-0.23621299862861633,
0.19252218306064606,
-0.3953549265861511,
0.19647324085235596,
0.3047924339771271,
0.2146518975496292,
0.25958237051963806,
-1.4528813362121582,
-0.9247202277183533,
-0.6442902684211731,
0.8241300582885742,
... |
def test _ lighteningballloser _ return ( self ) : with patch ('random. randint') as p : p. return _ value = 5 response = self. client. post ( url _ for ('postmylighteningball'), data = " 12 " ) self. assertequal ( {'match': false,'winningball': 5 }, response. json ) | [
-0.9034996628761292,
-0.049690160900354385,
0.41891470551490784,
-0.4432830810546875,
0.059782471507787704,
0.9962305426597595,
-0.5728501677513123,
-0.678795576095581,
-0.12966659665107727,
-1.1265902519226074,
-1.5072040557861328,
-0.24305248260498047,
-1.6063895225524902,
-0.16490268707... |
def sp _ integrate _ 1d _ ( pdf, xmin, xmax, * args, * * kwargs ) : if hasattr ( pdf,'setpars') : pdf. setpars ( ) func = pdf. function ( ) return func. sp _ integrate _ 1d ( xmin, xmax, * args, * * kwargs ) | [
0.07776125520467758,
-0.010094715282320976,
0.3465946912765503,
-0.021534491330385208,
-0.29988962411880493,
-0.7475782036781311,
-0.5800537467002869,
-0.1132005974650383,
0.18676361441612244,
-0.7809599041938782,
-0.09514764696359634,
0.40026602149009705,
-0.7624408006668091,
-0.316172748... |
def test _ pass _ happy _ path ( self ) : request = { # raw trytes are extracted to match the iri's json protocol.'addresses': [ self. trytes1, self. trytes2 ],'threshold': 80, } # once again, iota is going to use filters / test. py and " unittest " for testing # # # " def _ filter ( ) " below is going to be defined in... | [
-0.6192077398300171,
0.0318894237279892,
0.8292604088783264,
0.5435176491737366,
0.4721857011318207,
0.33826082944869995,
0.5352621674537659,
-1.3498938083648682,
0.270494669675827,
-1.0125781297683716,
0.08193133771419525,
0.3223724961280823,
0.33507686853408813,
-0.4365077018737793,
0.... |
def fitnessfun ( self, confvectores ) : fit = [ ] # lista que almacena los ajustes para las diferentes cis numelementos = self. size # tamano del automata numcis = len ( confvectores ) # numero de cis pasostiempo = len ( confvectores [ 0 ] ) # numero de pasos de tiempo for i in xrange ( numcis ) : inicial = confvectore... | [
0.008744040504097939,
-0.3122543394565582,
0.6256235837936401,
0.9676463007926941,
0.2542148232460022,
0.027378929778933525,
0.46966269612312317,
0.005664197728037834,
-0.38295331597328186,
0.18767377734184265,
-0.12458812445402145,
-0.1864391416311264,
-0.9741659164428711,
0.4773961901664... |
def trotx ( angle ) : t = np. eye ( 4 ) ca = np. cos ( angle ) ; sa = np. sin ( angle ) r = np. array ( [ [ 1., 0., 0. ], [ 0., ca, - sa ], [ 0., sa, ca ] ] ) t [ 0 : 3, 0 : 3 ] = r return t | [
0.04569360986351967,
0.7227693796157837,
0.5950564742088318,
-1.6600744724273682,
0.17672666907310486,
-0.5966275334358215,
-0.045112792402505875,
-0.3505385220050812,
0.6228999495506287,
1.3807532787322998,
-1.1421685218811035,
-0.763185977935791,
0.4112023115158081,
-1.3078316450119019,
... |
def ffmpeg _ version ( ) : cmd = [ " ffmpeg ", " - version " ] output = sp. check _ output ( cmd ) aac _ codecs = [ x for x in output. splitlines ( ) if " ffmpeg version " in str ( x ) ] [ 0 ] hay = aac _ codecs. decode ( " ascii " ) match = re. findall ( r " ffmpeg version \ w? ( \ d + \. )? ( \ d + \. )? ( \ * | \ d ... | [
0.05602242425084114,
-0.9981005787849426,
0.5981714129447937,
0.6061147451400757,
-0.5568780899047852,
-0.8143081665039062,
-0.13547077775001526,
-0.1856059730052948,
0.15467321872711182,
0.872046172618866,
0.1421668529510498,
0.6679509878158569,
-0.34532877802848816,
1.1217375993728638,
... |
def test _ create _ query ( self ) : user _ url ='api / user'data = { } url ='query /'data = { " user " : " 1 ", " tags " : [ " work ", " you ", " pos " ] } response = self. client. post ( url, data, format ='json') factory = apirequestfactory ( ) view = queryviewset. as _ view ( {'post':'create'} ) request = factory. ... | [
-0.18034936487674713,
0.3547986149787903,
0.2734951674938202,
0.26826855540275574,
0.029030101373791695,
0.5889889001846313,
-0.14117534458637238,
-0.2031916379928589,
-0.13472267985343933,
-1.1461995840072632,
0.08391815423965454,
-0.6947269439697266,
0.3137039542198181,
0.070115141570568... |
def backwards _ search ( node, visited _ nodes, shortest _ set = none ) : path = [ ] if node not in visited _ nodes : visited _ nodes. append ( node ) start _ node _ found _ outside = false # flag to find start node outside if node. type. name in node _ start _ name : path. append ( node ) else : edges = node. arriving... | [
-0.23624111711978912,
0.18871580064296722,
1.002014398574829,
-0.04146239161491394,
0.28521737456321716,
0.12989541888237,
0.32973310351371765,
0.3531126081943512,
-0.28459566831588745,
0.5313466787338257,
0.7731310129165649,
0.7325807809829712,
-0.6509643197059631,
-0.42678090929985046,
... |
def ct _ freezing ( sa, p, saturation _ fraction = 1 ) : sa, p, saturation _ fraction = np. broadcast _ arrays ( sa, p, saturation _ fraction ) if ( sa < 0 ). any ( ) : raise valueerror ('sa must be non - negative!') if np. logical _ or ( saturation _ fraction < 0, saturation _ fraction > 1 ). any ( ) : raise valueerro... | [
0.5942022800445557,
-0.004797737114131451,
0.6603270173072815,
0.008808773942291737,
-0.2232193499803543,
0.2250177562236786,
0.3802664577960968,
0.5346485376358032,
-0.4977659285068512,
0.7501373291015625,
0.3912891149520874,
0.10839471966028214,
-0.7436915040016174,
-0.5576991438865662,
... |
def getdevicetypes ( self, parameters = none ) : devicetypeurl = apiclient. devicetypesurl % ( self. host ) r = requests. get ( devicetypeurl, auth = self. credentials, params = parameters, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " device types successfully retrieved ... | [
-1.7796554565429688,
0.27165308594703674,
0.7099286913871765,
0.7011975049972534,
0.3031710386276245,
-0.7823504209518433,
0.07233279198408127,
-0.7010828256607056,
-0.24833635985851288,
0.5648074150085449,
-0.5258349776268005,
0.8436698913574219,
-1.6512951850891113,
0.5852203369140625,
... |
def setactiveturn ( self ) : if self. board. getturn ( ) = = self. team and not self. isempty ( ) : self. active = true else : self. active = false | [
0.4803619384765625,
-1.2770296335220337,
0.6081007122993469,
-0.16451187431812286,
0.636751651763916,
0.15598835051059723,
0.34554439783096313,
0.008318597450852394,
-0.21257907152175903,
0.08808210492134094,
-0.6982339024543762,
0.33833789825439453,
-0.7073781490325928,
-1.057923197746276... |
def _ _ sub _ _ ( self, other ) : if isinstance ( other, coordsystem ) : # coordsystem - coordsystem self _ transform = self. local _ to _ world _ transform other _ transform = other. world _ to _ local _ transform return self. from _ transform ( other _ transform. multiply ( self _ transform ) ) else : raise typeerror... | [
-0.29257601499557495,
-0.38723835349082947,
0.8717300891876221,
-0.028636304661631584,
-0.12242674827575684,
0.5298831462860107,
0.6172304749488831,
-0.4220525622367859,
0.68523108959198,
-0.9877117276191711,
-0.14391985535621643,
0.20858611166477203,
0.2303330898284912,
0.0027656420134007... |
def from _ files ( cls, files : typing. dict [ str, str ], stage : str ) - > pd. dataframe : cls. check _ files ( list ( files. values ( ) ) ) try : relations = [ ] with open ( files ['relations'],'r') as f : for line in f : line = line. strip ( ) tokens = line. split ( ) if len ( tokens )! = 3 : error _ msg = " invali... | [
0.4455154240131378,
-0.4912066161632538,
0.6752362847328186,
-0.41977643966674805,
-0.5787155032157898,
0.6996356844902039,
0.828748881816864,
0.07975256443023682,
-0.8273373246192932,
-0.13131365180015564,
1.0969569683074951,
-0.24856887757778168,
-0.07986066490411758,
-0.2255651801824569... |
def get _ params _ info ( cls ) : # type : ( ) - > dict [ str, str ] return dict ( dtsa _ params ='schematic parameters for the double tail sense amplifier. ', d2s _ params ='schematic parameters for the dynamic to static latch. ', ) | [
-0.6083337664604187,
-0.062173992395401,
0.4310830533504486,
-0.6131501197814941,
-0.6834034323692322,
-0.39237120747566223,
-0.38251179456710815,
-0.44530436396598816,
-1.2129427194595337,
0.3261755406856537,
-0.33728712797164917,
1.13883376121521,
1.6977510452270508,
0.651938796043396,
... |
def tree _ for _ node ( node ) : from. models import sitemapnode if not isinstance ( node, sitemapnode ) : real _ nodes = sitemapnode. objects. filter ( tree _ id = node. tree _ id, lft _ _ lte = node. lft ) node = first ( real _ nodes. reverse ( ) ) if node : parents = node. get _ ancestors ( ) siblings = node. get _ ... | [
0.30480533838272095,
0.1572023332118988,
0.7495006918907166,
-0.41102591156959534,
0.4435069262981415,
-0.01961287297308445,
-0.014478834345936775,
0.33629152178764343,
0.4596027731895447,
-0.1862052083015442,
0.02201509289443493,
0.3016243875026703,
-0.7466452717781067,
0.8801797032356262... |
def remove ( self ) : self. game _ state. add _ score ( ) | [
0.5120348334312439,
-0.030250661075115204,
0.6428488492965698,
-0.04597611352801323,
0.6175321936607361,
0.48577284812927246,
-0.429530531167984,
0.7223912477493286,
0.032429758459329605,
1.005098819732666,
-0.28212064504623413,
-0.2780015468597412,
-0.4533308148384094,
-0.0385088846087455... |
def clean _ one _ review ( raw _ review, clean _ method, remove _ numbers = true, remove _ punct = true ) : if clean _ method = ='beautifulsoup': rev _ clean = beautifulsoup ( raw _ review,'lxml'). get _ text ( ) if remove _ numbers and remove _ punct : rev _ clean = re. sub ('[ ^ a - za - z ] ','', rev _ clean ). lowe... | [
-0.5000208020210266,
-0.32877397537231445,
0.8194806575775146,
0.06818578392267227,
-1.0250451564788818,
-0.2742830812931061,
-0.10216720402240753,
0.7632367610931396,
0.6005381345748901,
0.19603894650936127,
1.0878795385360718,
-0.29968884587287903,
-0.21617181599140167,
0.390688210725784... |
def load ( self, model _ path = none, first = 0, log _ every = 0 ) : vectors _ dic = { } import pickle # open input file with open ( model _ path,'rb') as output : if log _ every > 0 : print ('start loading!') # read titles meta titles _ num = pickle. load ( output ) if titles _ num > 0 : self. titles = { } for _ in ra... | [
-0.07754034548997879,
-0.21388034522533417,
0.8611935377120972,
-0.4540764391422272,
-0.2438206821680069,
-0.3862448036670685,
-0.07471392303705215,
-0.04172510653734207,
-0.49120402336120605,
-0.2834510803222656,
-0.39535167813301086,
-0.48269474506378174,
0.1710665374994278,
0.2989584803... |
def getrandomtestimonial ( self ) : folder = self. catalog ( portal _ type ='testimonialfolder') if not folder : return folder = folder [ 0 ]. getobject ( ) testimonials = folder. getfoldercontents ( {'portal _ type':'testimonial ', } ) if not testimonials : return random _ testimonial = choice ( testimonials ). getobj... | [
-0.015850869938731194,
-0.16712471842765808,
0.4461233615875244,
0.10236141085624695,
0.06287927180528641,
0.6815975308418274,
-0.09964730590581894,
-0.035457514226436615,
0.3823552131652832,
0.3538922965526581,
0.1358327716588974,
0.6892162561416626,
-1.052215576171875,
-0.601551473140716... |
def make _ recipe ( self, structure, sg ) : # construct a pdfcontribution object pdf = pdfcontribution ( " contribution " ) # read experimental data try : pdf. loaddata ( self. input _ file ) except : print _ failure ( " failed to parse " + self. input _ file + ". exiting... " ) exit ( ) print ( " constructing pdf obje... | [
0.8712933659553528,
-0.9350862503051758,
0.5558673739433289,
-0.12037637084722519,
-0.465115487575531,
-0.34942883253097534,
0.39083734154701233,
1.0952808856964111,
-0.3130423128604889,
-0.3289545774459839,
0.4635782837867737,
-0.29727843403816223,
0.4155334532260895,
0.13180404901504517,... |
def show _ metrics ( self ) : return ['n _ trades ','sharpe _ ratio ','hit _ ratio ','cr _ trade ','cr _ day ','maximum _ drawdown ','maximum _ runup ','cum _ return ','unitary _ stake _ return ','volatility ( not annualised ) ','total _ pnl ','scale ','volatility _ annualised'] | [
0.04296432062983513,
0.6092479825019836,
0.5053284168243408,
-0.3221949636936188,
0.5715776681900024,
0.8325822949409485,
-0.008094520308077335,
-0.44933900237083435,
0.140488401055336,
0.8251461982727051,
0.13734570145606995,
0.9530526995658875,
0.6919146776199341,
0.007712900638580322,
... |
def add _ to _ buffer ( self, string, player ) : print string string = string. replace ( " you ", player. name ) self. buffer. append ( string ) self. buffer _ lines + = 1 | [
0.20488491654396057,
-0.881641149520874,
0.44224661588668823,
-0.4151357412338257,
-0.29806023836135864,
0.6013371348381042,
-0.36150237917900085,
-0.20423433184623718,
0.06218867748975754,
-0.7973350286483765,
-0.856238842010498,
1.2899644374847412,
-0.9180705547332764,
-0.066799253225326... |
def delete _ workflow ( workflow ) : # remove directory try : shutil. rmtree ( unicode ( workflow. path ) ) except oserror : logger. warning ( " workflow path { 0 } could not be removed ". format ( workflow. path ) ) # remove from database persistence. delete _ workflow ( workflow. id ) return jsonify ( { } ) | [
-0.732905387878418,
-0.2995196282863617,
0.33063289523124695,
0.35088440775871277,
0.3325863182544708,
-0.6697915196418762,
0.7933766841888428,
-0.30571526288986206,
0.6846652626991272,
0.0019663863349705935,
-0.5346686244010925,
-0.8730930089950562,
-0.7329487204551697,
0.3781664967536926... |
def dbtriggers ( self, env ) : from structures. msaddressbookgroupentry import msaddressbookgroupentry from structures. msaddressbookindividual import msaddressbookindividual from structures. whitelistentry import whitelistentry out = [ ] if self. allfields ['accountid']. present and \ self. allfields ['email']. presen... | [
-0.30018991231918335,
0.4265689551830292,
0.7385002374649048,
-0.34156036376953125,
0.47572967410087585,
0.31981104612350464,
0.3438672125339508,
0.47135451436042786,
0.004260788671672344,
0.459401935338974,
0.05796947702765465,
0.45534631609916687,
-0.8053997755050659,
0.7318459153175354,... |
def setup ( self, n ) : g1 = group. random ( g1 ) g2, h = group. random ( g2 ), group. random ( g2 ) u _ t = group. random ( zr ) u = [ group. random ( zr ) for i in range ( n + 1 ) ] u _ t = g2 * * u _ t u1 = [ g1 * * u [ i ] for i in range ( len ( u ) ) ] u2 = [ g2 * * u [ i ] for i in range ( len ( u ) ) ] pk = {'u1... | [
-1.1564735174179077,
0.5558770298957825,
0.4153478741645813,
-0.1429232358932495,
-0.4844917356967926,
-0.230626180768013,
0.8050810098648071,
-0.36198970675468445,
-0.17221982777118683,
0.3245881497859955,
-0.9285323619842529,
-0.4336213171482086,
0.20271199941635132,
0.22531269490718842,... |
def testreadstartupscript ( self ) : # no environment variable set, reading default script # pylint : disable = protected - access script = utils. readstartupscript ( ) self. asserttrue ( script. startswith ('#! / bin / bash') ) self. asserttrue ( script. endswith ('( exit $ { exit _ code } ) \ n') ) # environment vari... | [
-0.21551458537578583,
-0.6150972843170166,
0.5762896537780762,
0.050828732550144196,
0.2397628128528595,
-0.11876609176397324,
0.6461384892463684,
0.06064824387431145,
-0.08165682107210159,
-0.08777865022420883,
-0.15868930518627167,
1.1096134185791016,
0.590807318687439,
0.139923319220542... |
def billing _ address1 ( self, billing _ address1 ) : self. _ billing _ address1 = billing _ address1 | [
-0.4400113821029663,
0.016881249845027924,
-0.030754687264561653,
1.604889988899231,
-0.26606470346450806,
0.9666963219642639,
1.2520684003829956,
1.6342809200286865,
-0.4887935519218445,
0.2671133875846863,
-0.47113579511642456,
0.2738231420516968,
-0.2451648861169815,
0.723800778388977,
... |
def validate _ package _ name ( self, package _ name ) : parts = package _ name. split ('-') tar _ archive = '. '. join ( package _ name. split ( '.') [ - 2 : ] ) # get the tar archive extension package _ name _ without _ extension = '. '. join ( package _ name. split ( '.') [ : - 2 ] ) # get the package name without. ... | [
0.23482130467891693,
0.024783214554190636,
1.02048659324646,
0.07976512610912323,
-0.9898762106895447,
0.6319372057914734,
-0.47092390060424805,
0.29224449396133423,
0.3634936809539795,
0.7140169143676758,
-0.10395947098731995,
-0.691590428352356,
-0.1913727968931198,
-0.3027941584587097,
... |
def from _ arrow ( a : " union [ pa. table, pa. array ] ", rechunk : bool = true ) - > " dataframe " : if isinstance ( a, pa. table ) : return dataframe. from _ arrow ( a, rechunk ) if isinstance ( a, pa. array ) : return series. from _ arrow ( " ", a ) raise valueerror ( f " expected arrow table / array, got { a } " ) | [
0.26705700159072876,
0.256570428609848,
0.5794957280158997,
1.107595443725586,
-0.6478686928749084,
-0.4254046380519867,
0.4400006830692291,
-0.5759594440460205,
1.7385621070861816,
-0.9664385318756104,
0.498772531747818,
1.377707600593567,
1.0114846229553223,
-0.6052447557449341,
0.4187... |
def get _ stochastic _ event _ set _ poisson ( self, timespan = none ) : # # openquake version dependent call if oq _ version > ='2. 9. 0': event _ set = list ( oqhazlib. calc. stochastic _ event _ set ( [ self ] ) ) else : timespan = timespan or self. timespan event _ set = list ( oqhazlib. calc. stochastic _ event _ ... | [
-0.20742644369602203,
0.23343771696090698,
0.6497064232826233,
0.2927011549472809,
-0.09719409048557281,
-0.14137181639671326,
0.09379885345697403,
-0.6101614236831665,
0.0676468089222908,
0.07424887269735336,
-0.02405022270977497,
0.7075777649879456,
-0.22189107537269592,
-0.2517568171024... |
def get _ next _ one ( wint ) : next _ one = [ ] rows = len ( wint ) cols = len ( wint [ 0 ] ) def fixed _ i ( i ) : # return divmod ( i, rows ) [ 1 ], but lets optimize this a little if 0 < = i < rows : return i return i % rows def fixed _ j ( j ) : if 0 < = j < cols : return j return divmod ( j, cols ) [ 1 ] def neig... | [
-0.40284037590026855,
-0.02348640002310276,
0.9545125365257263,
0.797387957572937,
-1.1608250141143799,
-0.2125585675239563,
1.0692239999771118,
0.12536638975143433,
1.1180967092514038,
0.7938601970672607,
-0.1713549941778183,
-0.4249093532562256,
-0.7660746574401855,
0.781414806842804,
... |
def test _ get _ github _ callback ( self ) : pass | [
0.9060826301574707,
0.30268988013267517,
0.254883348941803,
1.2352008819580078,
0.9646068811416626,
0.32463809847831726,
1.1662124395370483,
0.4639110565185547,
0.4708906412124634,
-0.9306657314300537,
-0.47241610288619995,
0.2033592164516449,
-0.7411921620368958,
0.184513658285141,
0.57... |
def append _ after ( filename = " ", search _ string = " ", new _ string = " " ) : tmp = " " with open ( filename, encoding = " utf8 " ) as file : for line in file : if search _ string in line : tmp + = line [ : ] + new _ string else : tmp + = line [ : ] with open ( filename, mode = " w ", encoding = " utf8 " ) as file... | [
0.660826563835144,
-0.797271728515625,
0.3608352839946747,
0.5005717277526855,
0.0786457285284996,
0.8445518016815186,
-0.5480225682258606,
1.0493487119674683,
-0.5233199596405029,
0.0029482441022992134,
0.1413705050945282,
0.1960366666316986,
0.236608624458313,
0.008233387023210526,
0.0... |
def schedule _ lambda _ invocation ( self, invocation _ id, function _ name, input _ arg, timeout = none ) : attributes = {'id': invocation _ id,'name': function _ name } if input _ arg is not none : attributes ['input'] = utils. encode _ task _ input ( input _ arg ) if timeout : attributes ['starttoclosetimeout'] = st... | [
-0.3117799162864685,
-0.2862575948238373,
0.6117591261863708,
-0.30968135595321655,
0.06777089834213257,
0.21092231571674347,
-0.8878597617149353,
1.3572944402694702,
-0.4469226896762848,
0.2532635033130646,
-0.265359103679657,
1.177864909172058,
-0.1625841110944748,
0.2566863000392914,
... |
def file _ is _ shared ( self ) - > bool : # as of now, the only known repositories are commons and wikitravel # todo : put the urls to family file if not self. site. has _ image _ repository : return false try : info = self. latest _ file _ info except nopageerror : return false if'wikitravel _ shared'in self. site. s... | [
-0.4789709150791168,
0.43316811323165894,
0.5204921960830688,
-0.018048418685793877,
1.0094208717346191,
-0.08550391346216202,
0.32288312911987305,
1.1194493770599365,
-0.3268158435821533,
0.2205546647310257,
0.15094363689422607,
-0.5373767614364624,
-0.5177705883979797,
1.3309186697006226... |
def periodic ( ) : t _ wrapper = partial ( transform _ params, transform = np. exp ) def init _ fun ( rng, input _ shape ) : params = { " raw _ variance " : np. array ( 0. 0 ), " raw _ scale " : np. array ( 0. 0 ), " raw _ periods " : np. zeros ( ( input _ shape [ 1 ], ) ), } return ( input _ shape [ 0 ], input _ shape... | [
0.09038034081459045,
-0.29009294509887695,
0.9873383045196533,
-0.5192731022834778,
-0.7725722789764404,
-0.3164272904396057,
-0.10710864514112473,
-0.2260323166847229,
-0.40687841176986694,
0.09585724025964737,
-0.30265963077545166,
0.30362769961357117,
1.3485920429229736,
0.0203337594866... |
def _ generate _ pstep _ coltype _ map ( ) : tmap = { } s = preparation _ step ( ) for c in s. _ _ table _ _. columns : tmap [ c. name ] = c. type return tmap | [
-0.9718605279922485,
-0.39879778027534485,
0.6373470425605774,
-0.19984887540340424,
-0.24219107627868652,
-0.10163601487874985,
0.48343169689178467,
0.06721784919500351,
-1.3935112953186035,
0.4855651259422302,
-1.798434853553772,
-1.1005278825759888,
0.7011188864707947,
0.949798822402954... |
def retrieve _ all _ work _ arrangements ( self ) : return self. _ work _ arrangement _ repo. retrieve _ all ( ) | [
-1.2102786302566528,
0.7500587105751038,
0.25266119837760925,
0.8644180297851562,
0.07748663425445557,
0.4805183410644531,
0.3249762952327728,
-0.9949705004692078,
0.3753179907798767,
-0.31088781356811523,
-0.88113933801651,
-0.6791286468505859,
-0.8274379372596741,
0.22834189236164093,
... |
def main ( ) : # iterate over all lines in all files # listed in sys. argv [ 1 : ] # or stdin if no args given. current _ table _ name = none try : for line in fileinput. input ( ) : # look for an insert statement and parse it. if is _ create _ statement ( line ) : current _ table _ name = get _ mysql _ name _ value ( ... | [
-0.01611052080988884,
0.031169015914201736,
0.9561530351638794,
0.7666952610015869,
-0.27050283551216125,
0.07230505347251892,
0.4468705654144287,
0.38385921716690063,
-1.023467779159546,
-0.03281421586871147,
0.09399189800024033,
-0.04737188667058945,
-0.17876510322093964,
0.6964617967605... |
def privileges _ get ( self, user, host ) : cursor = self. connection. cursor ( ) output = { } cursor. execute ( " show grants for % s @ % s ", ( user, host ) ) grants = cursor. fetchall ( ) def pick ( x ) : if x = ='all privileges': return'all'else : return x for grant in grants : res = re. match ( " grant (. + ) on (... | [
0.23925626277923584,
0.258987158536911,
0.7192264795303345,
0.2430759072303772,
-0.9890275001525879,
-1.2716071605682373,
-0.9450146555900574,
0.3582857847213745,
-0.7575898766517639,
0.3227992355823517,
-0.8300102949142456,
0.4090012013912201,
-0.7881273627281189,
0.8813007473945618,
0.... |
def approximate _ b ( env, x, u, delta = 1e - 5, dt = 1e - 5 ) : state _ dim = x. shape [ 0 ] action _ dim = u. shape [ 0 ] b = np. zeros ( ( state _ dim, action _ dim ) ) us _ inc = np. tile ( u, ( action _ dim, 1 ) ) + delta * np. eye ( action _ dim ) us _ dec = np. tile ( u, ( action _ dim, 1 ) ) - delta * np. eye (... | [
-0.4406791925430298,
0.33009102940559387,
0.8381890654563904,
0.41713953018188477,
-0.231281578540802,
0.49424827098846436,
0.6617122292518616,
-0.17165237665176392,
-0.06083450838923454,
-0.07566489279270172,
-0.15515980124473572,
1.004391074180603,
-0.029773345217108727,
0.10119064897298... |
def test _ atomic _ hex _ binary _ length _ nistxml _ sv _ iv _ atomic _ hex _ binary _ length _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - length - 1. xsd ", instance = " nistdata / atom... | [
0.11533205211162567,
-0.24372783303260803,
0.4785633385181427,
0.685325026512146,
0.16163833439350128,
0.43717116117477417,
-0.01322841178625822,
0.5864897966384888,
0.26206108927726746,
0.5363453030586243,
-0.4051058888435364,
-0.6220027804374695,
0.012949198484420776,
0.6568548679351807,... |
def is _ center ( self ) : return len ( self. center ) = = 2 | [
-0.12898509204387665,
-0.260711669921875,
0.4795454442501068,
0.8574227690696716,
0.7101561427116394,
-0.2378208339214325,
-0.7282861471176147,
0.4601612687110901,
1.5021487474441528,
0.5056267976760864,
-0.528435230255127,
-0.0388450101017952,
-0.5003617405891418,
0.3874532878398895,
-1... |
def benchmark ( self, validation = false, batch _ size = 128, noisy = false, mean = 0, var = 0. 1 ) : # test log likelihood if validation : benchmark _ data = mnist. validation else : benchmark _ data = mnist. test total _ batch = benchmark _ data. num _ examples / / batch _ size ell = 0. for batch _ i in range ( total... | [
0.8767588138580322,
0.14437071979045868,
0.7915170788764954,
-0.2613227367401123,
-0.2249586284160614,
0.4786933362483978,
-0.2581270933151245,
0.46059587597846985,
0.7124976515769958,
0.27651306986808777,
-0.38593149185180664,
0.5278993844985962,
-0.06265918910503387,
0.9072160124778748,
... |
def describebillsummarybytag ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillsummarybytag ", params, headers = headers ) response = json. loads ( body ) model = models. describebillsummarybytagresponse ( ) model. _ deserialize ( response [ " respo... | [
-0.16825775802135468,
1.2637138366699219,
0.5584509372711182,
-0.45648178458213806,
-0.1187320277094841,
0.10342758893966675,
0.022882524877786636,
-0.9114595651626587,
-0.48300281167030334,
0.40041452646255493,
-0.5969570279121399,
0.5227679014205933,
-0.011536135338246822,
0.901842832565... |
def update ( self, * * assignments ) : assign = [ ] for name, value in assignments. items ( ) : data _ type, index = self. _ _ columns [ name ] assert isinstance ( value, data _ type ), " wrong datatype : { } ( {! r }, {! r } ) ". format ( name, value, data _ type ) assign. append ( ( index, value ) ) for row in self. ... | [
-1.859048843383789,
-0.19740471243858337,
0.3022960424423218,
-0.24340111017227173,
-0.4359626770019531,
0.3663170039653778,
0.23101454973220825,
0.11099646985530853,
-1.0357146263122559,
0.23105701804161072,
0.32933488488197327,
0.017856236547231674,
-0.014229496009647846,
0.7817445993423... |
def extract _ mapped _ chr ( chr, bam ) : res = [ ] bamfile = pysam. alignmentfile ( bam, " rb " ) reads = bamfile. fetch ( chr, multiple _ iterators = true ) for read in reads : res. append ( read. query _ name ) return ( res ) | [
0.31399333477020264,
-1.1824300289154053,
0.672918975353241,
0.7504796385765076,
-0.4723152816295624,
0.19889506697654724,
-0.3216661512851715,
-0.07182643562555313,
0.37764057517051697,
0.3722524046897888,
0.09591495245695114,
-0.6850299835205078,
0.3654591739177704,
-0.042482465505599976... |
def loadsubresults ( request ) : # limit to n minutes to avoid timeouts n _ minutes = 10 starttime = datetime. now ( ) # number of concurrent download requests to rucio n _ rows = 1 ids = [ ] cur = connection. cursor ( ) cur. autocommit = true is _ queue _ empty = false while not is _ queue _ empty or datetime. now ( )... | [
0.3146345019340515,
0.03568827360868454,
0.8993751406669617,
-0.3182065486907959,
-0.0394270084798336,
0.18010056018829346,
0.3706350326538086,
-0.8444814682006836,
-0.22672505676746368,
0.06306546181440353,
0.11841483414173126,
0.15244759619235992,
-0.0023324480280280113,
-0.0376983694732... |
def estimatenominalpower ( p, q ) : sn = np. median ( np. sqrt ( np. multiply ( p, p ) + np. multiply ( q, q ) ) ) # todo : should we grab the voltage associated with this sn to use as the # nominal voltage? the zip load model is designed such that at nominal # voltage we get nominal power, and not using the voltage as... | [
0.1805790811777115,
-0.8814260959625244,
0.605202317237854,
-0.43931081891059875,
-0.29344579577445984,
-0.11380790174007416,
-1.6982589960098267,
0.22268494963645935,
0.4093133509159088,
-0.12139051407575607,
0.8156614303588867,
0.4856055676937103,
-0.57427579164505,
0.3676457107067108,
... |
def test _ atomic _ hex _ binary _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 4 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 4. xsd ", instance ... | [
0.15366427600383759,
-0.06807294487953186,
0.44552233815193176,
0.7058882713317871,
-0.16218727827072144,
0.5758377313613892,
-0.5989261269569397,
0.06335055828094482,
0.3494713306427002,
0.18779440224170685,
-0.3466741144657135,
-0.7094812393188477,
-0.527165412902832,
-0.1945687830448150... |
def browser ( self ) - > " browser " : self. init _ browser ( ) return self. _ browser | [
-0.44969066977500916,
-0.4361501932144165,
-0.0960472896695137,
1.2541611194610596,
-0.10167431086301804,
-0.10481041669845581,
0.8876270651817322,
-0.31341227889060974,
0.518583357334137,
-1.5822311639785767,
-0.09044117480516434,
1.161190152168274,
-0.4521690905094147,
0.2400145530700683... |
def _ _ init _ _ ( self, assets = none ) : self. assets = [ ] self. assets. extend ( assets or [ ] ) | [
0.06342953443527222,
0.5358695983886719,
0.36077702045440674,
0.3581200838088989,
0.005665592849254608,
0.1117706224322319,
-0.5110646486282349,
0.1713981032371521,
0.9348354339599609,
-0.7044844627380371,
-0.09648344665765762,
-0.437649130821228,
-0.08777336031198502,
0.5161295533180237,
... |
def variable _ summaries ( self, var ) : with tf. name _ scope ('summaries') : mean = tf. reduce _ mean ( var ) tf. summary. scalar ('mean ', mean ) with tf. name. scope ('stddev') : stddev = tf. sqrt ( tf. reduce _ mean ( tf. square ( var - mean ) ) ) tf. summary. scalar ('stddev ', stddev ) tf. summary. scalar ('max ... | [
0.0311528779566288,
0.7685989141464233,
0.5011341571807861,
-1.1077821254730225,
0.08012078702449799,
0.17084218561649323,
0.28992193937301636,
-0.004382300656288862,
0.18355977535247803,
-0.041234858334064484,
-0.9359031915664673,
0.8509371280670166,
1.0782947540283203,
0.4650980532169342... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.