text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def _ _ next _ _ ( self ) : return self. next ( ) | [
-0.4172441363334656,
-0.3925095498561859,
0.3645573854446411,
-0.10840034484863281,
-0.790529727935791,
0.30154258012771606,
-0.013681894168257713,
-0.8713060021400452,
0.60784912109375,
-1.318213701248169,
0.25029271841049194,
0.46845459938049316,
-0.3013141453266144,
-0.9278415441513062,... |
def format _ protein ( self ) : if ( self. start = = self. end and self. ref _ allele = = self. ref2 _ allele = = self. alt _ allele ) : # match. # example : glu1161 = pep _ extra = self. pep _ extra if self. pep _ extra else'='return self. ref _ allele + str ( self. start ) + pep _ extra elif ( self. start = = self. e... | [
-0.2266012281179428,
-1.0413322448730469,
0.8585336804389954,
-0.2508637607097626,
-0.6871686577796936,
0.40762263536453247,
-0.8792217969894409,
-0.7748453617095947,
0.0487779937684536,
0.553000271320343,
0.4384456276893616,
0.7647666931152344,
0.03716577589511871,
-0.3471497595310211,
... |
def _ _ filladdpushtasksrequest ( self, task, task _ request, transactional ) : task _ request. mode = taskqueue _ service _ pb2. taskqueuemode. push self. _ _ filltaskcommon ( task, task _ request, transactional ) adjusted _ url = task. url if task. on _ queue _ url : adjusted _ url = self. _ _ url + task. url task _ ... | [
-0.6621353030204773,
0.517264723777771,
0.7147268652915955,
0.17715440690517426,
0.0187560822814703,
0.4153731167316437,
-0.5892472267150879,
-0.8174798488616943,
-0.4871579706668854,
0.3564106225967407,
-0.04546571522951126,
0.2221546471118927,
0.6431624889373779,
1.2368069887161255,
0.... |
def stop ( self ) : try : result = self. future. result ( timeout = self. wait _ timeout _ seconds ) if result : logging. error ( " logging thread % s produced an error when executing : % s " % ( self. tag, str ( result ) ) ) except concurrent. futures. timeouterror : logging. error ( " logging thread % s failed to fin... | [
-0.07555170357227325,
-0.2899898290634155,
0.436851441860199,
-0.13211959600448608,
0.40715110301971436,
-0.5042080283164978,
-0.4758637547492981,
1.164259910583496,
-1.378479242324829,
0.10253715515136719,
-0.053061388432979584,
-0.0051066093146800995,
0.26139548420906067,
-0.078595086932... |
def test _ nfc _ wps _ password _ token _ sta _ init ( dev, apdev ) : ssid = " test - wps - nfc - pw - token - init " hapd = hostapd. add _ ap ( apdev [ 0 ], { " ssid " : ssid, " eap _ server " : " 1 ", " wps _ state " : " 1 " } ) logger. info ( " wps provisioning step using password token from station " ) pw = dev [ 0... | [
-0.42723792791366577,
-0.27921485900878906,
0.5757219791412354,
-0.2909831702709198,
0.003762628650292754,
0.5835657119750977,
-0.26760295033454895,
0.18497641384601593,
-0.012992235831916332,
0.10571169853210449,
-0.11833608150482178,
0.2777937948703766,
0.6377050876617432,
0.622825086116... |
def reduceparticles ( self, thetaparticles ) : print " reducing particles... " onedimension = list ( thetaparticles [ 0, : ] ) uniqueelements = list ( set ( onedimension ) ) nbuniqueparticles = len ( uniqueelements ) print " # of unique particles ", nbuniqueparticles proportions = zeros ( nbuniqueparticles, dtype = int... | [
-0.19039608538150787,
-0.06852120906114578,
0.31491947174072266,
-1.5833110809326172,
1.208422064781189,
-0.05525688827037811,
0.41781410574913025,
0.4251123070716858,
0.004243828821927309,
0.4605468809604645,
-0.5060868263244629,
0.21921345591545105,
-0.9417212009429932,
0.140282571315765... |
def request ( self, method, path, body = none ) : body = json. dumps ( body ) if body is not none else none resp = self. _ request ( method, path, body ) code, msg, data = _ read _ response ( resp ) if code in self. errormsgs : text = self. errormsgs [ code ] elif code < 200 or code > = 300 : text ='api error : { code ... | [
-1.3162482976913452,
-0.24359352886676788,
0.8251410126686096,
-0.017496030777692795,
0.13079196214675903,
-0.2939324975013733,
-0.7994208931922913,
-0.808739960193634,
0.26677778363227844,
0.0541338212788105,
0.729524552822113,
1.2178120613098145,
-0.6209842562675476,
-0.226392924785614,
... |
def get _ hotel _ by _ id ( id ) : hotel = none for value in hotels : if value. get ( " id " ) = = id : hotel = value break return render _ template ( " hoteldetail. htm ", hotel = hotel ) | [
-0.002121553523465991,
0.34164831042289734,
0.140890970826149,
0.4775201678276062,
-0.17383204400539398,
0.2953602969646454,
-0.03268304467201233,
0.7940922975540161,
-0.30458229780197144,
0.6002163290977478,
0.07000811398029327,
-0.11381565779447556,
0.01138867437839508,
0.441406816244125... |
def _ standardize ( data, field _ name, mx = none, mn = none, relh _ slope = 0. 005 ) : if field _ name = ='h _ iso0': field _ std = 2. / ( 1. + np. ma. exp ( - relh _ slope * data ) ) - 1. return field _ std if ( mx is none ) or ( mn is none ) : dlimits _ dict = _ data _ limits _ table ( ) if field _ name not in dlimi... | [
0.9353168606758118,
-0.10396165400743484,
0.8541669249534607,
-0.36366453766822815,
-0.43824002146720886,
0.35631269216537476,
-0.3881675601005554,
0.5706974267959595,
-0.3108084797859192,
0.4161100685596466,
-0.4128219187259674,
0.640312910079956,
-0.6252002120018005,
-0.3182263672351837,... |
def rectify _ boxes ( image : np. array, boxes : list ) : # deepcopy image so that original is not altered image = copy. deepcopy ( image ) # rectify quads rectified _ boxes = [ ] for ind, box in enumerate ( boxes ) : pts = np. array ( box, dtype = " float32 " ) # unwarp four point region to rectangle rectified _ box =... | [
-0.33477407693862915,
-0.6286512017250061,
0.40855151414871216,
0.1002277135848999,
0.2608585059642792,
-0.5913745164871216,
-0.44049572944641113,
0.06091640144586563,
0.5205385684967041,
-0.010180562734603882,
-1.133362054824829,
-0.04944167286157608,
0.11582876741886139,
-0.0365481190383... |
def set _ current _ name ( self, value ) : for idx, item in enumerate ( self. _ items ) : if item = = value : self. _ widget. setcurrentindex ( idx ) | [
-1.2388592958450317,
-0.9544222950935364,
0.33584892749786377,
-0.7589991688728333,
-0.5884253978729248,
0.5149843692779541,
0.5372434258460999,
-0.5853952765464783,
-0.2512543499469757,
1.1035702228546143,
-1.1799851655960083,
-0.11813811957836151,
-0.41253212094306946,
0.2411830872297287... |
def has _ non _ trivial _ description ( self ) : return " description " in self. _ data | [
0.2006249725818634,
0.7458312511444092,
0.33319419622421265,
0.11444582045078278,
0.35126549005508423,
0.7359054088592529,
-0.8200000524520874,
-0.14334049820899963,
-0.004834033083170652,
-0.1873057335615158,
0.30790063738822937,
-0.1517266482114792,
-0.3177867531776428,
1.554661035537719... |
def add _ to _ buffer ( self, images, labels, nb _ to _ add = none ) : if not nb _ to _ add : nb _ to _ add = self. batch _ size / / 2 if self. first _ time : self. first _ time = false self. buffer = np. copy ( images ) # code. interact ( local = locals ( ) ) if len ( labels ) = = 2 : self. labels = np. copy ( labels ... | [
-1.185450792312622,
0.05573657900094986,
0.9970406889915466,
0.07171030342578888,
0.4587515592575073,
0.6042912006378174,
0.23417264223098755,
-0.047311630100011826,
0.44403332471847534,
-0.2768530249595642,
-0.12493923306465149,
0.08875968307256699,
-0.5864624977111816,
0.8888256549835205... |
def append _ to _ list ( self ) : for item in self. db _ key _ db : if item = = self. key _ attr : main _ obj = self. db _ key _ db [ item ] # print ( main _ obj ) # test print break main _ obj. append ( self. tmp ) self. db _ key _ db [ item ] = main _ obj # print ( self. db _ key _ db. _ _ dict _ _ [ item ] ) # test ... | [
-0.929473876953125,
-0.32465100288391113,
0.45182135701179504,
-0.418357253074646,
-0.010942261666059494,
0.7618162035942078,
0.1271573156118393,
0.5968267321586609,
0.5482408404350281,
0.6830779314041138,
-0.7804362773895264,
-0.6323988437652588,
-0.8038883805274963,
1.6340441703796387,
... |
def equatorial _ to _ ecliptic ( ra, decl, input = " sexigesimal ", output = " deg ", \ j2000 = true ) : if j2000 : obliquity = 0. 409092804 # radians else : obliquity = 0. 409206212 # radians # convert equatorial coords to radians if input = = " sexigesimal " : ra = protractor. convert ( ra, " hmsstr ", " rad " ) decl... | [
-0.5991902947425842,
-1.3500031232833862,
0.9149344563484192,
-1.4165470600128174,
-0.6089445948600769,
0.3575785458087921,
-0.4171237647533417,
0.6373748183250427,
-0.1662265956401825,
0.8999914526939392,
-0.449016273021698,
0.6064102649688721,
0.5425436496734619,
0.06043446063995361,
1... |
def check _ best ( self ) : self. best = self. set. ischecked ( ) | [
-0.6280704736709595,
0.029766499996185303,
0.3315354883670807,
1.0052751302719116,
0.8975006937980652,
0.3224157691001892,
-0.10405910760164261,
-0.06041831150650978,
-0.8284274339675903,
0.10590789467096329,
0.029703151434659958,
1.9931308031082153,
-0.005748581141233444,
0.78767466545104... |
def split _ fasta ( master _ fasta ) : f = open ( master _ fasta,'r') lines = f. readlines ( ) f. close ( ) # find the indices of all starting sequences indices = [ i for i in range ( len ( lines ) ) if lines [ i ] [ 0 ] = = " > " ] indices + = [ len ( lines ) ] files = list ( ) for i in range ( len ( indices ) - 1 ) :... | [
-0.5288345813751221,
-0.728330671787262,
0.9059121608734131,
0.3060753643512726,
-0.017879877239465714,
0.08519326895475388,
1.2605090141296387,
1.1975525617599487,
0.5959757566452026,
0.6158692240715027,
-0.11304569244384766,
-0.858892023563385,
-0.410812646150589,
0.35563206672668457,
... |
def config ( ) : global conf configuration _ file = " docker - covenant. yml " if os. path. isfile ( configuration _ file ) : with open ( configuration _ file, " r " ) as conf _ file : conf = yaml. safe _ load ( conf _ file ) if conf [ " debug " ] : print ( ( " configuration file : ", configuration _ file ) ) else : pr... | [
0.7942607402801514,
-0.5993386507034302,
0.7776742577552795,
0.240653857588768,
0.38803911209106445,
0.10334542393684387,
1.1626883745193481,
0.9309194684028625,
-0.3389144539833069,
0.11361956596374512,
-0.5552381277084351,
0.04886344075202942,
0.690929651260376,
1.1076667308807373,
1.1... |
def waveform _ sampling _ rate ( self ) : return self. recordings [ 0 ]. waveform _ sampling _ rate | [
0.3786344826221466,
0.4568440318107605,
0.299279123544693,
-0.28495752811431885,
-0.030651673674583435,
-0.5034170746803284,
-0.28110581636428833,
-0.1622716337442398,
0.417438805103302,
0.3169291019439697,
-0.27650612592697144,
0.3408539295196533,
-0.48849859833717346,
1.0602531433105469,... |
def test _ high _ correlation ( ) : test _ list1 = [ ('abdomen 2 circumference ( cm ) ', 0. 813432284781049 ), ('hip circumference ( cm ) ', 0. 6252009175086622 ), ('weight ( lbs ) ', 0. 6124140022026474 ), ('biceps ( extended ) circumference ( cm ) ', 0. 49327112589161576 ), ] test _ list = ['abdomen 2 circumference (... | [
0.3833535611629486,
0.06669264286756516,
0.5824514627456665,
0.23967814445495605,
0.44870948791503906,
0.39671793580055237,
0.3815050721168518,
0.6167611479759216,
0.182294100522995,
-0.15621721744537354,
-0.9380322694778442,
0.08553386479616165,
-0.3441641330718994,
0.4992350935935974,
... |
def add _ edge ( self, parent, child, * * kwargs ) : new _ eid = self. redis. get ( self. next _ eid _ key ) new _ edge = edge ( self, new _ eid ) self. redis. sadd ( self. edges _ key, new _ eid ) for k in kwargs : new _ edge. prop. _ _ setattr _ _ ( k, kwargs [ k ] ) self. _ index ( new _ edge. name, k, kwargs [ k ] ... | [
-0.2633175849914551,
0.24044956266880035,
0.8030092716217041,
-0.41621413826942444,
-0.025745967403054237,
-0.18360930681228638,
-0.7302893400192261,
-0.043697237968444824,
-0.19296479225158691,
0.4707166254520416,
-0.09962864965200424,
-0.4975411295890808,
-0.8197699189186096,
0.145224317... |
def _ _ getgroups ( self, data, groupname, name ) : retval = { } for key in data : if isinstance ( data [ key ], dict ) : recusivedict = self. _ _ getgroups ( data [ key ], groupname, name ) retval. update ( recusivedict ) if isinstance ( data [ key ], dict ) and " groups " in data [ key ] : if name and not key = = nam... | [
-0.8996191620826721,
0.3497439920902252,
0.6183417439460754,
-0.28381869196891785,
-1.117974042892456,
-1.022078275680542,
-0.6062814593315125,
-0.7152837514877319,
-1.0347976684570312,
0.24135847389698029,
0.17727066576480865,
-0.3626098036766052,
-0.8097983002662659,
0.9008691310882568,
... |
def _ _ init _ _ ( self ) : self. face _ rect = none self. left _ eye _ rect = none self. right _ eye _ rect = none self. nose _ rect = none self. mouth _ rect = none | [
-0.6732657551765442,
-0.42228949069976807,
0.4809612035751343,
-0.31666725873947144,
0.7811800837516785,
-0.5604789853096008,
-0.46171966195106506,
-0.6140385866165161,
0.3527330458164215,
-0.37668198347091675,
-0.8510391116142273,
-0.28266528248786926,
-0.15218470990657806,
0.935755372047... |
def _ config _ ( self ) : config = [ ] for attributename, attributevalue in self. _ _ dict _ _. items ( ) : if \ not attributename. startswith ( " _ _ " ) \ and not attributename. startswith ( " default " ) \ and not attributename. endswith ( " _ _ " ) : config. append ( attributetuple \ ( name = attributename, value =... | [
-1.7926549911499023,
-0.16466893255710602,
0.4030012786388397,
-0.4581587314605713,
-0.41025394201278687,
0.07512301206588745,
-0.5473237037658691,
0.21549761295318604,
-1.0155154466629028,
0.7101203203201294,
-0.7530444860458374,
-1.2817468643188477,
0.3440278172492981,
0.9425346851348877... |
def failure _ response ( status, message ) : logger. info ( " status : % s message : % s " % ( status, message ) ) json _ obj = { " errors " : [ {'code': status,'message': message } ] } to _ json = json. dumps ( json _ obj ) return httpresponse ( to _ json, status = status, content _ type ='application / json') | [
-0.46715599298477173,
-1.1280806064605713,
0.5519798994064331,
-0.3093186914920807,
-0.27425748109817505,
-0.7397281527519226,
-0.6024026274681091,
-0.4289274513721466,
-0.2519969046115875,
0.6161180138587952,
-0.7228420972824097,
0.5501059889793396,
-0.5577950477600098,
0.2719420492649078... |
def is _ stopword ( word ) : return word in stop _ words | [
-0.6840755343437195,
0.21923287212848663,
0.13506443798542023,
0.6437743306159973,
-0.6760477423667908,
0.31849098205566406,
-0.6981003880500793,
0.25592151284217834,
-0.3568783104419708,
0.5904083847999573,
-0.16380736231803894,
0.2914758324623108,
-0.40668386220932007,
0.2247743010520935... |
def gen _ data ( self, n ) : mixture _ idx = np. random. choice ( list ( self. pi. keys ( ) ), size = n, replace = true, p = list ( self. pi. values ( ) ) ) data _ a = self. gaus ['a']. rvs ( np. sum ( mixture _ idx = ='a') ) y _ a = linear _ regression ( self. coefs ['a'], data _ a ) data _ a = np. concatenate ( [ dat... | [
0.06344518065452576,
-0.3589014708995819,
0.7442512512207031,
-1.3295395374298096,
0.8213721513748169,
0.3907563388347626,
0.26486727595329285,
0.4451902508735657,
0.08875542879104614,
-0.5227763652801514,
-0.5581450462341309,
0.22325821220874786,
-0.15309320390224457,
0.15245914459228516,... |
def _ bytes _ feature ( value ) : if isinstance ( value, type ( tf. constant ( 0 ) ) ) : value = value. numpy ( ) # byteslist won't unpack a string from an eagertensor. return tf. train. feature ( bytes _ list = tf. train. byteslist ( value = [ value ] ) ) | [
0.37000176310539246,
0.11187447607517242,
0.321005254983902,
-0.7734204530715942,
-0.004251243080943823,
-0.3601284921169281,
-0.06765459477901459,
0.10826363414525986,
0.3428564965724945,
-0.597488284111023,
-1.065613031387329,
0.3395875096321106,
0.009522741660475731,
-0.3220871090888977... |
def add _ occupancy _ subscriber ( self, occupancy _ group _ id : str, callback _ : callable [ [ ], none ] ) : self. _ occupancy _ subscribers [ occupancy _ group _ id ] = callback _ | [
-0.20739522576332092,
-0.268929660320282,
0.3948515057563782,
-0.14394409954547882,
-0.2821308374404907,
-0.4998205900192261,
0.15800872445106506,
-0.38782358169555664,
0.07815727591514587,
-0.2833429276943207,
-0.14317455887794495,
-0.2632148563861847,
-0.08543357998132706,
0.720769464969... |
def test _ foreground ( self ) : self. assertequal ( text. assembleformattedtext ( a. normal [ a. fg. red ['hello,'], a. fg. green ['world!'] ] ),'\ x1b [ 31mhello, \ x1b [ 32mworld!') | [
0.5418084859848022,
-0.45972636342048645,
0.4811026453971863,
0.039738498628139496,
-0.486359179019928,
0.48046308755874634,
-0.32803091406822205,
-0.3561875522136688,
0.21691161394119263,
-0.13471485674381256,
-0.0029111821204423904,
0.3008979260921478,
-0.6800808310508728,
0.552660584449... |
def take _ picture ( camera, user _ id, photo _ number ) : camera. capture ( path. join ( photo _ dir, user _ id, " %. 2d. jpg " % ( photo _ number ) ) ) return true | [
0.12306106835603714,
0.10913950204849243,
0.5081984996795654,
1.8439793586730957,
-0.41416019201278687,
0.736594557762146,
0.3768468499183655,
-0.1100546270608902,
-0.03788099065423012,
-0.09470272064208984,
-0.8300098180770874,
-0.03469226881861687,
0.6401785016059875,
-0.1283843070268631... |
def getimport ( obj, alias ='', verify = true, builtin = false, enclosing = false ) : if enclosing : from dill. detect import outermost _ obj = outermost ( obj ) obj = _ obj if _ obj else obj # get the namespace qual = _ namespace ( obj ) head = '. '. join ( qual [ : - 1 ] ) tail = qual [ - 1 ] # for named things... wi... | [
0.18364793062210083,
-0.19642381370067596,
0.9603749513626099,
0.2285853773355484,
-0.7924653887748718,
-0.6502494215965271,
0.04465058445930481,
-0.23289181292057037,
0.8824345469474792,
0.2502933144569397,
-0.5294585824012756,
0.7221552729606628,
0.1672918051481247,
0.19741731882095337,
... |
def test _ exp ( self ) : gs. random. seed ( 123 ) n _ samples = self. n _ samples points = self. beta. random _ point ( n _ samples ) vectors = self. beta. random _ point ( n _ samples ) initial _ vectors = gs. array ( [ [ vec _ x, vec _ x ] for vec _ x in vectors [ :, 0 ] ] ) points = gs. array ( [ [ param _ a, param... | [
0.6579776406288147,
-0.000197100147488527,
0.45530131459236145,
0.3486541509628296,
0.7131598591804504,
0.7850491404533386,
0.6404674649238586,
0.031085819005966187,
-0.37991735339164734,
0.08457831293344498,
0.09844977408647537,
-0.5041470527648926,
-0.3055970072746277,
0.4547119140625,
... |
def n _ iter _ ( self, val ) : raise attributeerror ( \ " attribute'n _ iter _'of tsne is not writable " ) | [
-0.48176681995391846,
0.39882826805114746,
0.43696123361587524,
-0.08908126503229141,
-0.5456076860427856,
0.5681443810462952,
1.0391974449157715,
-0.395359605550766,
-1.1125943660736084,
0.33970388770103455,
0.039615411311388016,
-0.41997721791267395,
0.9111164808273315,
0.722290694713592... |
def _ make _ photo ( self ) : self. _ log. debug ('making photo') with picamera. array. pirgbarray ( self. _ camera ) as stream : self. _ camera. capture ( stream, format ='rgb') image = stream. array self. _ save _ photo ( image ) | [
-0.38781413435935974,
0.46224290132522583,
0.34553083777427673,
0.8361063003540039,
0.4426123797893524,
0.3260326683521271,
0.14368879795074463,
-0.18942523002624512,
-0.2202720046043396,
-0.38269901275634766,
-0.2785542607307434,
-0.22944839298725128,
0.5597053170204163,
-0.22330769896507... |
def insert ( website _ name, product _ id, url, sentiment _ score, sentiment, positive _ count, negative _ count, neutral _ count, very _ positive _ count, very _ negative _ count ) : new _ product = amazonin ( product _ id = product _ id, url = url, sentiment _ score = sentiment _ score, sentiment = sentiment, added _... | [
-0.07223667204380035,
-0.16606305539608002,
0.4202055335044861,
0.2638782858848572,
0.7443457245826721,
1.3904516696929932,
-0.17390044033527374,
-0.23393025994300842,
-0.06590432673692703,
0.12695170938968658,
-0.7592342495918274,
-0.22688771784305573,
-1.1386762857437134,
0.1326520740985... |
def write ( self, command, n = 5 ) : self. serial. write ( bytes ( self. address + command + " \ r ", encoding = " ascii " ) ) response _ bytes = self. serial. read ( n ) if self. verbose : print ( " \ t { } - { } ". format ( command, response _ bytes ) ) response = response _ bytes. decode ( ) if len ( response ) = = ... | [
-1.033356785774231,
-0.1462956964969635,
0.5948449969291687,
-0.23185418546199799,
0.2625183165073395,
-0.17213696241378784,
0.25158533453941345,
-1.0470207929611206,
0.9163872599601746,
-0.6184496283531189,
-0.38726145029067993,
-0.4502239525318146,
-1.2726423740386963,
-0.026381636038422... |
def test _ check _ config _ params _ valid ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture gitdelver. _ check _ config _ params ( config _ params ) | [
-0.5057559609413147,
-0.026654262095689774,
0.3691956698894501,
0.3077932894229889,
0.11677079647779465,
0.576802670955658,
0.0030480180867016315,
1.0778021812438965,
-0.5568364858627319,
0.756081759929657,
-0.800025999546051,
0.09135451912879944,
-0.03962384909391403,
0.7372429370880127,
... |
def get _ context _ data ( self, * * kwargs ) : ctx = super ( checkoutsessionmixin, self ). get _ context _ data ( * * kwargs ) ctx ['shipping _ address'] = self. get _ shipping _ address ( ) method = self. get _ shipping _ method ( ) if method : ctx ['shipping _ method'] = method ctx ['shipping _ total _ excl _ tax'] ... | [
-0.4766625165939331,
0.3057164251804352,
0.7188901901245117,
0.039862316101789474,
-0.1997261941432953,
-0.2669529616832733,
0.34778591990470886,
-0.5430916547775269,
1.4595190286636353,
0.35639482736587524,
-0.02807462215423584,
0.24233615398406982,
0.7027861475944519,
-0.3576726913452148... |
def _ _ log _ to _ stdout ( color, date, tag, message ) : entry = " % s [ % s ] % s - % s % s \ n " % ( color, date, tag, message, attr ( 0 ) ) _ _ log ( stdout, entry ) | [
0.48183634877204895,
-0.19556713104248047,
0.604455292224884,
-0.5366042852401733,
0.3561984598636627,
-0.7699664831161499,
-0.6566178798675537,
-0.8627960085868835,
-1.247597098350525,
-0.10698491334915161,
0.20432519912719727,
0.7332919836044312,
0.8766562938690186,
0.32968607544898987,
... |
def _ create _ id _ array ( dataobject, attributetype ) : if not dataobject : raise runtimeerror ( " dataobject cannot be none " ) if dataobject. isa ( " vtkcompositedataset " ) : ids = [ ] for ds in dataobject : ids. append ( _ create _ id _ array ( ds, attributetype ) ) return dsa. vtkcompositedataarray ( ids ) else ... | [
-0.5325331091880798,
-0.5438395738601685,
0.36393019556999207,
0.42482560873031616,
0.6694100499153137,
-0.002946782624348998,
0.41329219937324524,
-0.14723239839076996,
1.0923337936401367,
0.18147939443588257,
-0.6189649701118469,
0.5417432188987732,
-0.252314954996109,
0.3694903552532196... |
def getinput ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterirgbus3irgbus2 _ getinput ( self, * args ) | [
-0.2831684350967407,
0.10567084699869156,
0.6189404726028442,
0.5258489847183228,
0.46725067496299744,
0.5400170683860779,
0.4782513678073883,
-0.19604496657848358,
-0.18372343480587006,
-0.1352112591266632,
-0.25167664885520935,
0.988987147808075,
-1.4048025608062744,
-1.168953537940979,
... |
def draw _ debug _ rects ( self, image ) : if ( utils. is _ gray ( image ) ) : facecolor = 255 lefteyecolor = 255 righteyecolor = 255 nosecolor = 255 mouthcolor = 255 else : facecolor = ( 255, 255, 255 ) # white lefteyecolor = ( 0, 0, 255 ) # red righteyecolor = ( 0, 255, 255 ) # yellow nosecolor = ( 0, 255, 0 ) # gree... | [
-0.8276214599609375,
0.34682485461235046,
1.1182793378829956,
-1.366385579109192,
0.9641963243484497,
0.162986621260643,
-0.16609252989292145,
-0.6218327879905701,
0.9329469799995422,
-0.30572474002838135,
0.2448737472295761,
0.14057469367980957,
0.10308943688869476,
1.3955134153366089,
... |
def test _ mirrors _ same _ bar ( minimal _ conf _ noscreen, manager _ nospawn ) : config = minimal _ conf _ noscreen tbox = textbox ( " testing mirrors " ) config. screens = [ libqtile. config. screen ( top = libqtile. bar. bar ( [ tbox, tbox ], 10 ) ) ] manager _ nospawn. start ( config ) info = manager _ nospawn. c.... | [
-0.9109545946121216,
0.2944382429122925,
0.44340938329696655,
-0.48408517241477966,
-0.41863512992858887,
0.7232569456100464,
0.8111209273338318,
0.03337608277797699,
0.3414872884750366,
-0.24623848497867584,
-0.960990309715271,
0.25069209933280945,
-0.6063709259033203,
1.3897044658660889,... |
def _ validate _ deployment _ flavor ( model _ config, flavor ) : if flavor not in supported _ deployment _ flavors : raise mlflowexception ( message = ( f " the specified flavor : ` { flavor } ` is not supported for deployment. " f " please use one of the supported flavors : { supported _ deployment _ flavors } " ), e... | [
-0.1986335664987564,
-0.11142463237047195,
0.3801195025444031,
0.16163703799247742,
-0.14942091703414917,
-0.08972884714603424,
-0.3508419096469879,
0.5606846213340759,
-0.554571807384491,
0.8767971396446228,
0.6600103974342346,
0.7360000014305115,
-0.07159394770860672,
0.8265042304992676,... |
def mse ( y _ hat : np. ndarray, y : np. ndarray ) - > float : return ( np. square ( y - y _ hat ) ). mean ( ) | [
0.4371952712535858,
-0.9876453280448914,
0.52122962474823,
0.33462342619895935,
-0.21083417534828186,
0.027525993064045906,
-0.03327808529138565,
-0.5865856409072876,
0.37254512310028076,
0.7399249076843262,
-0.6121873259544373,
0.9277297854423523,
0.8690071702003479,
0.7487906813621521,
... |
def _ _ call _ _ ( self, request ) : response = self. process _ request ( request ) if response is none : # if process _ request returned none, we must call the next middleware or # the view. note that here, we are sure that self. get _ response is not # none because this method is executed only in new - style middlewa... | [
-0.3926754891872406,
-0.03884298726916313,
0.6614698767662048,
0.157903790473938,
0.06259512156248093,
-1.0192872285842896,
0.015567024238407612,
-1.172181248664856,
1.3838096857070923,
-0.7190565466880798,
0.6445030570030212,
-0.4468253552913666,
-0.6494854092597961,
0.3636608421802521,
... |
def diff _ image ( image _ dict, base _ ip, other _ ip, url ) : base _ image = image. open ( bytesio ( image _ dict [ base _ ip ] ) ) other _ image = image. open ( bytesio ( image _ dict [ other _ ip ] ) ) diff = imagechops. difference ( base _ image, other _ image ) filename = compute _ filename ( url, base _ ip, othe... | [
-0.805659294128418,
-0.7836264967918396,
0.6413474678993225,
-0.04480414465069771,
0.26919999718666077,
0.3826242983341217,
-0.05186718329787254,
1.062265157699585,
-0.22833657264709473,
0.3438631594181061,
-0.4777402877807617,
-0.7821613550186157,
0.3132227957248688,
-0.2874140739440918,
... |
def fetch _ setup _ data _ details ( self, host _ ip : str ) - > dict : try : setup _ data _ str = self. run ( self. setup _ data _ cmd, ssh _ to _ host = host _ ip, find _ route _ to _ host = false ) except ssherror : # missing setup data file is not a fatal error return { } try : setup _ data = yaml. safe _ load ( se... | [
-0.25681301951408386,
-0.15532724559307098,
0.47726961970329285,
0.09203219413757324,
-0.17352887988090515,
-0.14572210609912872,
0.06602878868579865,
-0.05749211460351944,
-0.8513994812965393,
0.6237473487854004,
-0.6637834310531616,
-0.28742527961730957,
0.5829010605812073,
0.48691090941... |
def create _ outer _ df ( root ) : columns = [ " id ", " text ", " relevance ", " sentiment ", " opinion " ] df = pd. dataframe ( columns = columns ) for node in root : id = node. attrib. get ( " id " ) text = node. find ( " text " ). text relevance = node. find ( " relevance " ). text if node is not none else np. nan ... | [
-0.40662309527397156,
0.233639195561409,
0.5141962766647339,
-0.5619323253631592,
-0.2919222414493561,
0.12487687915563583,
-0.1762765347957611,
-0.0576447993516922,
-0.19271764159202576,
-0.20801101624965668,
1.0474272966384888,
0.5511783957481384,
-0.2142573744058609,
0.2609471380710602,... |
def json _ rpc _ format ( self ) : error = {'name': unicode ( self. _ _ class _ _. _ _ name _ _ ),'code': self. code,'message': " % s : % s " % ( unicode ( self. _ _ class _ _. _ _ name _ _ ), unicode ( self. message ) ),'data': self. data } from django. conf import settings if settings. debug : import sys, traceback e... | [
-0.3029158413410187,
-0.7930878400802612,
0.6106809377670288,
-1.5166893005371094,
0.08819309622049332,
-0.4116298258304596,
-0.14315983653068542,
-1.1894149780273438,
0.019736310467123985,
0.42255815863609314,
-0.3925125002861023,
0.7118971347808838,
-1.100053310394287,
1.1807087659835815... |
def report _ func ( epoch, batch, num _ batches, start _ time, lr, report _ stats ) : if batch % opt. report _ every = = - 1 % opt. report _ every : report _ stats. output ( epoch, batch + 1, num _ batches, start _ time ) if opt. exp _ host : report _ stats. log ( " progress ", experiment, lr ) report _ stats = onmt. s... | [
0.24291838705539703,
0.40368664264678955,
0.4336164593696594,
0.5901030898094177,
0.061325009912252426,
-0.8822021484375,
0.1450803577899933,
-0.10509725660085678,
-0.7275633215904236,
-0.39839449524879456,
0.9188302159309387,
-0.40796107053756714,
-0.13506032526493073,
0.2902155816555023,... |
def _ start _ mitmdump _ service ( self ) - > none : self. ami. call ( [ " sudo ", " systemctl ", " start ", " mitmdump " ] ) | [
-0.18394017219543457,
-0.40622854232788086,
0.3229333758354187,
0.0380336157977581,
0.4251419007778168,
0.2695312201976776,
-0.5417895913124084,
0.889483630657196,
0.6752682328224182,
-0.1867261677980423,
-0.34555742144584656,
1.5462726354599,
0.6946600675582886,
0.3976222574710846,
-0.1... |
def test _ data _ structure ( self ) : expected _ columns = ['title ','score ','id ','url ','comms _ num ','body ','gilded'] dataframe = json _ normalize ( self. data ) actual _ columns = dataframe. columns self. assertequal ( set ( expected _ columns ), set ( actual _ columns ) ) | [
-0.5940612554550171,
0.2533453702926636,
0.3491517901420593,
-0.7957190871238708,
0.289521723985672,
0.011492121033370495,
0.30930235981941223,
-0.5396315455436707,
0.13092634081840515,
-0.8076595067977905,
-0.7000219225883484,
-0.042627498507499695,
-0.13415761291980743,
-1.18385207653045... |
def markcircles ( self, circles ) : if circles = = none : return self. _ image for c in circles : x, y = self. _ reversecoordinates ( c. x, c. y ) if x > = self. _ width or y > = self. _ height or x < 0 or y < 0 : continue # vanjski krug cv2. circle ( self. _ image, ( x, y ), c. radius, green _ bgr, 2 ) # sredina kruga... | [
-0.9830595254898071,
0.1564154177904129,
0.6295696496963501,
-0.33772411942481995,
0.6956489682197571,
-0.13595807552337646,
0.4841226041316986,
-1.1499165296554565,
0.4039040803909302,
0.46711570024490356,
-0.03764675557613373,
0.3548715114593506,
-0.30390092730522156,
-0.0001594370114617... |
def count _ cigar _ operations ( reads, chromosome _ name, chromosomal _ cigar _ counts, n _ alignments, n _ primary, n _ supplementary, n _ secondary, map _ qualities ) : for read in reads : n _ alignments + = 1 map _ qualities. update ( read. mapping _ quality ) if read. is _ secondary : n _ secondary + = 1 if read. ... | [
-0.19482487440109253,
-0.5459063053131104,
0.628667950630188,
0.22213402390480042,
-0.7345433831214905,
-0.5129729509353638,
0.46327680349349976,
0.9846481680870056,
-0.3788788616657257,
0.3952045440673828,
-0.40562185645103455,
0.36866551637649536,
0.6463125348091125,
-0.23910881578922272... |
def deprocess _ image ( img, means, stds, extremes ) : img = np. squeeze ( img ) img = img * stds + means for i in range ( img. shape [ - 1 ] ) : img [ :, :, i ] = np. clip ( img [ :, :, i ], extremes [ i ] [ 0 ], extremes [ i ] [ 1 ] ) return img | [
-1.0417804718017578,
0.345109224319458,
0.6000444889068604,
-1.2960779666900635,
-0.7611039280891418,
0.20638981461524963,
-0.519521951675415,
0.41345176100730896,
-0.4169512987136841,
1.110278844833374,
1.0334022045135498,
1.2344001531600952,
0.20454192161560059,
-0.7482175827026367,
0.... |
def create _ new _ queue ( self, max _ batches = 0, total _ new = false ) : files _ list = self. create _ filelist ( ) max _ filename = int ( files _ list [ - 1 ]. split ( '.') [ 0 ] ) queue = queue ( ) counter = 0 for i in range ( 0, max _ filename / / self. batchsize ) : cur _ batch = [ ] for _ in range ( 0, self. ba... | [
-0.6539146304130554,
-0.7235417366027832,
0.8183371424674988,
0.41888901591300964,
-0.5225811004638672,
-0.13915187120437622,
-0.09250742942094803,
0.48443546891212463,
-0.5707013607025146,
0.2522222399711609,
-0.1554446965456009,
-0.31231656670570374,
-0.36377257108688354,
0.3296766877174... |
def get _ period _ ns ( self ) : self. microblaze. write _ blocking _ command ( measure _ period ) count = self. microblaze. read _ mailbox ( 0 ) return count * self. clk _ period _ ns | [
-0.022166110575199127,
1.3060332536697388,
0.3638630211353302,
1.0400521755218506,
-0.3643576502799988,
-0.03685828298330307,
0.6130983829498291,
-0.8110620975494385,
0.17643825709819794,
0.1483580470085144,
-0.3776536285877228,
0.8136656880378723,
-0.8612648844718933,
0.36387962102890015,... |
def photoionizationratemultifreq ( self, qdot, n, tau _ r _ e, tau _ c ) : q0 = qdot * np. exp ( - tau _ r _ e ) # number of photons entering cell per sec dq = q0 * ( 1. - np. exp ( - tau _ c ) ) # number of photons absorbed in cell per sec ionizationrate = dq / n / self. grid. vsh # ionizations / sec / atom if self. p... | [
-0.059070415794849396,
0.8246521353721619,
0.5950193405151367,
0.2637998163700104,
0.4988069236278534,
-0.7173237204551697,
-0.7507360577583313,
-0.20236602425575256,
0.001621644594706595,
-0.23776866495609283,
0.5816888809204102,
-0.8807907700538635,
-0.26003625988960266,
0.81102824211120... |
def stop ( self ) : self. _ run _ flag = false self. wait ( ) | [
-0.46032628417015076,
-0.5694781541824341,
0.23416489362716675,
-0.02879607118666172,
0.20423798263072968,
1.5067745447158813,
0.9034485816955566,
0.6558344960212708,
-1.7239999771118164,
-0.7506501078605652,
-0.7793113589286804,
0.10652334988117218,
-0.8863714933395386,
-0.054592758417129... |
def get _ sample _ ids ( self, fc _ id, sample _ prj = none ) : self. log. debug ( " retrieving sample ids subset by flowcell'{ }'and sample _ prj'{ }'". format ( fc _ id, sample _ prj ) ) sample _ ids = [ self. name _ fc _ view [ k ]. id for k in self. name _ fc _ view. keys ( ) if self. name _ fc _ view [ k ]. value ... | [
0.47265803813934326,
-0.1817665845155716,
0.5531788468360901,
0.17173318564891815,
-0.4534563422203064,
-0.2964826822280884,
0.16063405573368073,
-0.007872745394706726,
0.24404679238796234,
0.02668934501707554,
0.13948018848896027,
0.48833030462265015,
-0.4584546685218811,
0.37203198671340... |
def sentences ( a, b ) : result = [ ] sent _ a = sent _ tokenize ( a ) sent _ b = sent _ tokenize ( b ) for line in sent _ a : if line in sent _ b : if line! ='' and line. strip ( ) not in result : result. append ( line. strip ( ) ) return result | [
0.6601899266242981,
-0.9693049788475037,
0.8574190735816956,
0.0000270481232291786,
0.25728216767311096,
-1.2347267866134644,
-1.3080971240997314,
0.07015284895896912,
-0.8462050557136536,
0.8739640712738037,
0.009543109685182571,
0.2246527224779129,
-0.42857983708381653,
0.710664033889770... |
def wigner _ distribution ( x0, hess, masses, zero _ threshold = 1. 0e - 9, is _ molecule = true ) : # convert hessian to mass - weighted coordinates hess _ mwc = hess / np. sqrt ( np. outer ( masses, masses ) ) # mass weighted coordinates are now qi = sqrt ( mi ) dxi # compute eigen values of hess _ mwc omega2, modes ... | [
0.7298619747161865,
-1.0566238164901733,
0.7650173902511597,
0.0016480408376082778,
-0.1863962858915329,
0.2606341242790222,
0.14908336102962494,
0.5944623351097107,
-0.04790135845541954,
0.14184701442718506,
0.4238435924053192,
-0.581051230430603,
-0.14577867090702057,
0.8793273568153381,... |
def test _ serve _ build _ field ( self ) : pass | [
-0.4599481225013733,
0.35486412048339844,
0.5351828932762146,
0.6279954314231873,
0.4594009220600128,
1.8014899492263794,
1.965119481086731,
0.006929608527570963,
-0.6223843693733215,
-0.7637618184089661,
-1.5214958190917969,
0.4033081829547882,
-1.0438768863677979,
-0.10183076560497284,
... |
def merchant _ index ( ) : rows = db. execute ( " select is _ merchant from users where user _ id = : user _ id ", user _ id = session [ " user _ id " ] ) if rows [ 0 ] [ " is _ merchant " ] = ='2': return apology ( " sorry, you are not a merchant ( jsut yet ). " ) if request. method = = " get " : return render _ templ... | [
0.2909674048423767,
0.30344638228416443,
0.7684388160705566,
0.27054545283317566,
0.18820720911026,
-0.13164544105529785,
0.23949533700942993,
0.5021824240684509,
0.18012207746505737,
0.35027793049812317,
0.8271079063415527,
0.6944140791893005,
-0.4791337847709656,
0.47046688199043274,
-... |
def summarize _ plant _ to _ location ( df, grid ) : _ check _ data _ frame ( df, " pg " ) _ check _ grid ( grid ) _ check _ plants _ are _ in _ grid ( df. columns. to _ list ( ), grid ) all _ locations = grid. plant [ [ " lat ", " lon " ] ] locations _ in _ df = all _ locations. loc [ df. columns ]. to _ records ( ind... | [
-0.3702026903629303,
0.21735617518424988,
0.5809147357940674,
-0.3453645408153534,
0.715003490447998,
-0.3633725345134735,
0.598029375076294,
0.5373041033744812,
-0.34944742918014526,
0.6651341915130615,
0.7180221080780029,
0.3327336609363556,
1.161691427230835,
-0.7400198578834534,
0.71... |
def _ observe _ scale _ factor ( self, change ) : if change : type _ = change. get ('type') if type _! ='create': value = change ['value'] self. surface _ model. warp _ geometry. setscalefactor ( value / 100. ) deferred _ call ( self. view. render ) | [
-0.45578011870384216,
0.10353193432092667,
0.453885555267334,
-0.15509501099586487,
0.21706922352313995,
0.22846558690071106,
0.6754221320152283,
-1.2595264911651611,
-0.2827208936214447,
0.13442541658878326,
-0.4147770404815674,
0.4696584939956665,
0.8070073127746582,
1.9126125574111938,
... |
def game _ detail ( request, pk ) : try : game = game. objects. get ( pk = pk ) except game. doesnotexist : return httpresponse ( status = 404 ) if request. method = ='get': serializer = gameserializer ( game ) return jsonresponse ( serializer. data ) elif request. method = ='put': data = jsonparser ( ). parse ( reques... | [
-0.829793393611908,
0.04559618979692459,
0.9903715252876282,
0.05533275380730629,
0.4298784136772156,
0.404073566198349,
-0.15359124541282654,
-0.12663237750530243,
0.709685206413269,
0.8254570364952087,
0.645139753818512,
-0.4368308186531067,
0.2876407206058502,
0.5294826626777649,
-0.6... |
def clear ( self, * args, * * kwargs ) : # real signature unknown pass | [
-0.21948076784610748,
0.08996019512414932,
0.37491312623023987,
0.8260043263435364,
0.24492695927619934,
0.28454989194869995,
0.15882647037506104,
-0.8399916887283325,
0.06789401173591614,
0.084222212433815,
-0.3127796947956085,
1.1819543838500977,
-0.25294509530067444,
-0.0421314015984535... |
def projecttensorrepresentationsinschema ( schema : schema _ pb2. schema, tensor _ names : iterable [ str ] ) - > schema _ pb2. schema : tensor _ representations = gettensorrepresentationsfromschema ( schema ) if tensor _ representations is none : tensor _ representations = infertensorrepresentationsfromschema ( schema... | [
-0.4692589044570923,
0.2952868342399597,
0.4171196222305298,
0.15993428230285645,
-0.011118353344500065,
0.06789153814315796,
0.3797209560871124,
0.38204312324523926,
-0.09701995551586151,
0.6286250352859497,
-0.3786040246486664,
-0.027291174978017807,
-0.25273996591567993,
-0.877513527870... |
def ca _ host _ verify ( self, value ) : if value. lower ( ) not in ['no ','yes'] : raise valueerror ('value should be either no / yes') self. _ update _ values ('hashi _ vault _ pre _ python _ 279 _ cahostverify ', value, parent _ attribute ='inputs') | [
0.2793741822242737,
0.7398340702056885,
0.29602861404418945,
1.2090648412704468,
-0.489212304353714,
1.3161195516586304,
0.8390100002288818,
0.07759418338537216,
-0.32159721851348877,
-0.31896209716796875,
-0.9159930944442749,
0.3362487852573395,
0.15730944275856018,
1.0564173460006714,
... |
def _ _ init _ _ ( self, # noqa : r0913 input _ size, lin _ layer _ sizes, lin _ layer _ dropouts, output _ size, use _ sigmoid = false ) : super ( ). _ _ init _ _ ( ) self. output _ size = output _ size self. use _ sigmoid = use _ sigmoid # final linear layers just before prediction self. dense _ bn _ dropout = denseb... | [
0.7399960160255432,
0.27632689476013184,
0.6062059998512268,
1.0825483798980713,
-0.12298095226287842,
-0.5564971566200256,
0.37153515219688416,
0.36755433678627014,
-0.13629725575447083,
0.2840419113636017,
0.05371612310409546,
-0.42181217670440674,
-0.2959570586681366,
0.5917307138442993... |
def test _ available _ languages _ initial _ for _ update ( self, mock _ sync ) : org = factories. org ( available _ languages = ['en ','es'] ) form = self. form _ class ( instance = org ) self. assertequal ( form. fields ['available _ languages']. initial, ['en ','es'] ) | [
-0.019918840378522873,
-0.18871696293354034,
0.35890910029411316,
-0.39489251375198364,
0.3812536299228668,
1.0433893203735352,
-0.08028972148895264,
1.1933823823928833,
-0.23788534104824066,
0.2099323570728302,
-0.9402145743370056,
-0.40291792154312134,
0.1971728801727295,
0.0488307327032... |
def create ( self, collab _ id : str, project _ id : str, expt _ id : str, run _ id : str, algorithm : str = " fedprox ", batch _ size : int = none, rounds : int = 10, epochs : int = 100, lr : float = 0. 001, weight _ decay : float = 0. 0, lr _ decay : float = 0. 1, mu : float = 0. 1, l1 _ lambda : float = 0. 0, l2 _ l... | [
0.2336408942937851,
0.9246628284454346,
1.0068392753601074,
0.1620330512523651,
0.8623525500297546,
0.015443728305399418,
-1.0345592498779297,
-0.45826587080955505,
0.14259742200374603,
0.5310562252998352,
-0.49968352913856506,
1.1840734481811523,
-0.8787298798561096,
0.42760899662971497,
... |
def split _ heads ( self, x, batch _ size ) : x = tf. reshape ( x, ( batch _ size, - 1, self. heads _ count, self. head _ size ) ) return tf. transpose ( x, perm = [ 0, 2, 1, 3 ] ) | [
-0.23040249943733215,
0.1712295562028885,
0.5837132334709167,
0.03162340447306633,
0.15735270082950592,
-0.31695786118507385,
0.06859124451875687,
-0.06448745727539062,
0.4288243353366852,
0.5415561199188232,
-0.7894280552864075,
-0.08525770157575607,
-0.32163119316101074,
-1.263671875,
... |
def _ _ init _ _ ( self, name, directory, archive _ dir, defaultmode = none ) : self. archive _ dir = archive _ dir dailylogfile. _ _ init _ _ ( self, name, directory, defaultmode = defaultmode ) | [
0.5476588010787964,
0.06972416490316391,
0.47691810131073,
0.45527687668800354,
0.4482707679271698,
0.04091064631938934,
-0.29527026414871216,
1.147031307220459,
-0.3531692624092102,
-0.24050210416316986,
-0.005211274605244398,
-0.020909778773784637,
0.3530871570110321,
-0.0916746929287910... |
def post ( self, url, expected _ response = none, data = none, auth = none, * * kwargs ) : pnote ( " perform a http post ", " info " ) try : response = self. req. post ( url, data = data, auth = auth, * * kwargs ) except exception as e : status, response = self. catch _ expection _ return _ error ( e, url ) else : stat... | [
-0.6749503016471863,
-0.30240076780319214,
0.5853606462478638,
0.2520582377910614,
0.5203560590744019,
0.5316749215126038,
-0.23451149463653564,
0.3486076593399048,
0.5190855860710144,
-0.6689329743385315,
-0.28404539823532104,
-0.20806746184825897,
-0.7356995344161987,
-0.1288227587938308... |
def _ push _ operators ( self, my _ priority : int, token : operator ) - > none : self. _ result. append ( self. _ operators. pop ( ) ) while len ( self. _ operators ) > 0 : operator = self. _ operators [ - 1 ] if operator = = " ( " or operator. get _ priority ( ) < my _ priority : break self. _ result. append ( self. ... | [
-0.8122660517692566,
0.9961538910865784,
0.6846348643302917,
-0.5730864405632019,
-0.18016503751277924,
-1.2418540716171265,
-1.5367398262023926,
-0.4057329595088959,
-0.3857252895832062,
0.5768700242042542,
-0.6200957298278809,
-0.009174001403152943,
-0.9089275598526001,
0.122057311236858... |
def _ build _ cell ( orientation, gradient, nbins ) : cell _ histogram = np. zeros ( shape = nbins ) b _ step = 180 / nbins for orient, grad in zip ( orientation, gradient ) : for o, g in zip ( orient, grad ) : c _ bin = np. int8 ( np. abs ( o / / 20 ) ) prop = np. abs ( o % b _ step ) / b _ step if c _ bin = = ( nbins... | [
-0.0688278079032898,
0.22467781603336334,
0.4439484179019928,
0.6724910736083984,
0.5649530291557312,
0.3697892725467682,
0.861783504486084,
-0.16733253002166748,
-0.4719720780849457,
0.3001213073730469,
0.11016345024108887,
0.06560575217008591,
0.26872631907463074,
0.13423308730125427,
... |
def make _ gene _ list ( ) : os. system ('mkdir - p org _ gff') # # # # # # # # # # # change final. contigs. long. fa to my file. os. system ( " grep'>'final. contigs. long. fa | cut - f1 - d'' | cut - f2 - d'>'> org _ list " ) # # # # # # # # # # # change metagg. gff to my file. os. system ( " for org in ` cat org _ l... | [
0.09686505794525146,
0.11030685156583786,
0.5597338676452637,
0.3434164822101593,
0.2168084681034088,
0.3088679611682892,
0.4195842444896698,
0.7041255235671997,
-0.5912359952926636,
-0.025186004117131233,
-1.0093815326690674,
0.7645998597145081,
1.2610305547714233,
0.669514000415802,
0.... |
def addneighbor ( self, nbr ) : self. connectedto. append ( nbr ) | [
-0.9308310747146606,
0.13471972942352295,
0.5935059189796448,
0.26617372035980225,
0.19626112282276154,
1.371502161026001,
-0.18957307934761047,
-1.1690478324890137,
-0.1944873183965683,
-0.7162122130393982,
-1.456366777420044,
-1.037248134613037,
-1.2525668144226074,
0.6415814161300659,
... |
def creategroupjointtojoint ( self, center ='', fromcenter = false, step = 1 ) : joints = cmds. ls ( sl = 1, type ='joint') jnt = [ ] grp = [ ] n = 0 for item in joints : cmds. select ( cl = 1 ) jnt. append ( cmds. joint ( ) ) grp. append ( cmds. group ( jnt [ n ], n ='joint _ grp') ) pos = cmds. xform ( item, q = 1, w... | [
-0.19124367833137512,
-0.16400189697742462,
0.8499426245689392,
0.03721536323428154,
-0.3315690755844116,
0.0994163304567337,
0.4397207200527191,
0.061696961522102356,
-0.861162543296814,
0.10816077888011932,
0.04898031800985336,
-0.6569567322731018,
-0.8202459812164307,
0.6943065524101257... |
def _ fitgh _ residuals _ err ( par, x, data, err ) : return ( ( data. ravel ( ) - gausshermite ( x, par ) ) / err. ravel ( ) ) | [
0.7359509468078613,
0.15961256623268127,
0.173894003033638,
-0.39430657029151917,
0.2225637435913086,
0.5549516081809998,
-1.0175412893295288,
0.4770524203777313,
-0.06578922271728516,
0.2305942177772522,
0.28772807121276855,
0.35226958990097046,
-1.0421690940856934,
-0.27763351798057556,
... |
def fit ( self, scene _ pos, true _ pos ) : # arrays of scene position xs = np. array ( scene _ pos ) [ :, 0 ]. reshape ( - 1, 1 ) ys = np. array ( scene _ pos ) [ :, 1 ]. reshape ( - 1, 1 ) # arrays of true position xt = np. array ( true _ pos ) [ :, 0 ]. reshape ( - 1, 1 ) yt = np. array ( true _ pos ) [ :, 1 ]. resh... | [
-0.023377181962132454,
-0.756477415561676,
0.7947308421134949,
-1.2897168397903442,
-0.10053779929876328,
-0.49829989671707153,
-0.6908649802207947,
-0.0747423768043518,
-0.1957634538412094,
0.3376656472682953,
-1.1995502710342407,
-0.5960959792137146,
-0.47370222210884094,
-0.836040854454... |
def write _ with _ compliance ( data _ frame = none, dataframe = none, dataset _ name = none, dataset = none, filters = none ) : if dataframe is none : # this step is here for retro - compat and should be removed asap dataframe = data _ frame if filters : other _ columns = [ x for x in dataframe. columns if x not in fi... | [
-0.44821223616600037,
0.24248097836971283,
0.6475077271461487,
0.7262053489685059,
-0.1345776468515396,
-0.765385091304779,
0.31795865297317505,
1.0472393035888672,
0.36210575699806213,
-0.09665542095899582,
0.4358128011226654,
0.4584334194660187,
-0.062392424792051315,
0.10495128482580185... |
def read _ from _ file ( self, filename ) : h = fits. header ( ) import json headers = { } with open ( filename, " r " ) as f : sheaders = json. load ( f ) for band in sheaders. keys ( ) : headers [ band ] = { } for expid, h in sheaders [ band ]. items ( ) : headers [ band ] [ expid ] = h. fromstring ( h ) return heade... | [
-0.46686941385269165,
-1.0161068439483643,
0.5560300350189209,
-0.5943522453308105,
-1.1471867561340332,
0.889400839805603,
-0.5857545137405396,
-0.42703694105148315,
-0.5346531867980957,
0.14064425230026245,
-0.16557174921035767,
0.047807153314352036,
0.07065798342227936,
-0.2048627734184... |
def convert _ string _ to _ tuple ( string, key = none, n = none ) : try : tup = ast. literal _ eval ( string ) except valueerror as e : if key is not none : raise bilbypipeerror ( f " error { e } : unable to convert { key } : { string } " ) else : raise bilbypipeerror ( f " error { e } : unable to { string } " ) if n ... | [
-0.8858237862586975,
-0.14512284100055695,
0.47586438059806824,
-0.6365916728973389,
-0.4650367796421051,
-1.3000494241714478,
-0.4490322768688202,
0.5247662663459778,
-0.8876434564590454,
1.1152276992797852,
-0.22063669562339783,
-0.5447794198989868,
-0.5973677039146423,
-0.49014794826507... |
def timedeltastr ( pbstime ) : dayspat = re. compile ('\ days?,') return dayspat. sub ('d ', str ( pbstime ) ) | [
-0.5230640769004822,
-0.23118452727794647,
0.46161729097366333,
-0.8105378746986389,
-0.6429837346076965,
1.2508270740509033,
-0.919321596622467,
-0.4614628851413727,
-0.10235967487096786,
-0.0788644477725029,
0.7846823334693909,
0.0025565812829881907,
0.06590484827756882,
-0.0712542831897... |
def get _ total _ droprate ( self, src _ adr = none ) : start _ time = none end _ time = none last _ packet = none total _ dropped _ packets = 0. 0 total _ packets = 0. 0 for packet in self. packets : if src _ adr is not none and packet [ 1 ]. src _ adr = = src _ adr : if start _ time is none : start _ time = packet [ ... | [
-0.48773327469825745,
0.562702476978302,
1.0049433708190918,
-0.8326638340950012,
-0.4473150968551636,
-0.425488144159317,
-0.0793154165148735,
0.07826300710439682,
0.8949984908103943,
0.6180015206336975,
0.17617365717887878,
0.39340201020240784,
-0.8986600041389465,
0.5185903906822205,
... |
def _ translate _ _ interfaces _ interface _ encapsulation _ dot1q _ vlan _ outer _ tag ( input _ yang _ obj, translated _ yang _ obj = none ) : if input _ yang _ obj. tag _ type. _ changed ( ) : input _ yang _ obj. tag _ type = input _ yang _ obj. tag _ type if input _ yang _ obj. vlan _ id. _ changed ( ) : input _ ya... | [
-0.4598515033721924,
0.05708374083042145,
0.2538270354270935,
-0.4368610978126526,
-0.5102683305740356,
0.5743358135223389,
0.6091622710227966,
-1.0328789949417114,
0.37284770607948303,
0.9114235639572144,
-0.3054116666316986,
0.2904350757598877,
-0.16665804386138916,
1.2941596508026123,
... |
def test _ update _ booking _ cancelled _ for _ full _ event ( self ) : event = baker. make _ recipe ('booking. future _ ev ', max _ participants = 3 ) booking = baker. make _ recipe ('booking. booking ', status ='cancelled ', event = event ) baker. make _ recipe ('booking. booking ', status ='open ', event = event, _ ... | [
0.44024792313575745,
-0.08555253595113754,
0.60099196434021,
0.6524421572685242,
-0.9383585453033447,
0.41731640696525574,
-0.5961471796035767,
1.2957483530044556,
-0.08495289832353592,
0.06663252413272858,
-0.6195265054702759,
-0.7553778290748596,
0.4150337278842926,
-0.15495608747005463,... |
def analyze ( self, event ) : taus = collection ( event, " tau " ) jets = collection ( event, " jet " ) jetproducer _ njet = 0 jetproducer _ nbjetl = jetproducer _ nbjetm = jetproducer _ nbjett = 0 for jet in jets : if jet. pt > 20 and abs ( jet. eta ) < 2. 5 and ( 4 & jet. jetid ) : mindr = 9. for tau in taus : if ( 1... | [
0.44446972012519836,
0.6531727910041809,
0.9454180002212524,
-0.5978101491928101,
-0.3068401515483856,
0.1655253767967224,
0.19843506813049316,
-0.5683443546295166,
0.24055540561676025,
-0.394633948802948,
-0.429941326379776,
-0.03216738626360893,
-0.36998581886291504,
1.1612604856491089,
... |
def test _ replace _ feature _ parameters ( self ) : pass | [
-0.1675376296043396,
0.42526552081108093,
0.27392226457595825,
1.0859615802764893,
0.5740043520927429,
-0.5389207005500793,
1.1831530332565308,
1.3760170936584473,
-0.15105317533016205,
-0.3428996503353119,
-1.3890043497085571,
0.7577137351036072,
-0.650793194770813,
0.5185303092002869,
... |
def superpose ( self ) : traj = self. _ traj indices = traj. _ indices mob = mov = self. _ getxyz ( ) weights = traj. _ weights if indices is none : tar = traj. _ coords mov = none else : tar = traj. _ coords [ indices ] mob = mob [ indices ] if weights is not none : weights = weights [ indices ] linalg = importla ( ) ... | [
0.7442227005958557,
0.316895991563797,
0.9427337050437927,
0.2033824473619461,
0.2269478142261505,
-0.25677886605262756,
0.006919217295944691,
0.6858145594596863,
0.15340708196163177,
0.48755332827568054,
0.022402135655283928,
-0.7973852157592773,
-0.15568587183952332,
-0.13353358209133148... |
def update ( self, state, action, nextstate, reward ) : " * * * your code here * * * " util. raisenotdefined ( ) | [
-0.30816057324409485,
-0.36695295572280884,
0.21917936205863953,
0.5713760852813721,
0.0190091785043478,
0.26444482803344727,
-0.22908376157283783,
-0.24892456829547882,
1.0069447755813599,
0.29335278272628784,
-0.3120930790901184,
0.9490422606468201,
-0.1820429265499115,
-0.52958554029464... |
def lasso _ gd _ adapt _ step ( y, tx, initial _ w, max _ iters, gamma, lambda _, computeloss = true ) : w = initial _ w grad = compute _ gradient ( y, tx, w ) for n _ iter in range ( max _ iters ) : w1 = w - gamma * grad grad1 = compute _ gradient _ lasso ( y, tx, w1, lambda _ ) gamma = ( ( grad - grad1 ). t. dot ( w ... | [
0.1786341667175293,
0.3223373591899872,
0.8138743042945862,
-0.3658510446548462,
-0.9761572480201721,
-0.16818012297153473,
0.5593878626823425,
0.04777698963880539,
-0.7580331563949585,
0.7053455114364624,
0.2205369621515274,
1.137040615081787,
0.5325998067855835,
0.9946602582931519,
-0.... |
def start ( self, host ) : log, barreleye _ instance = init _ env ( self. _ bac _ config _ fpath, self. _ bac _ logdir, self. _ bac _ log _ to _ file ) host = cmd _ general. check _ argument _ str ( log, " host ", host ) hostnames = cmd _ general. parse _ list _ string ( log, host ) if hostnames is none : log. cl _ err... | [
-0.02427288331091404,
-0.7116773724555969,
0.6935840249061584,
0.40172278881073,
0.24301029741764069,
0.07265821099281311,
0.29803234338760376,
0.5962682962417603,
-0.6382545828819275,
0.34931501746177673,
-0.4673992097377777,
0.7951548099517822,
0.070622019469738,
0.4646480083465576,
-0... |
def convert _ line1 ( self, sen ) : task _ id = self. args. task _ id if task _ id > 2 and sen. strip ( ). startswith ( " what do you think of this option : resto " ) : print ('convert sentence : { } '. format ( sen ) ) prefix = sen. split (': ', 1 ) [ 0 ] +':'sen = sen. split ('_ ', 1 ) sen = sen [ 1 ] slist = sen. sp... | [
-0.0641760304570198,
-0.5513735413551331,
0.8785496354103088,
0.422105997800827,
-0.2401140034198761,
-0.0798351988196373,
-0.7038904428482056,
0.38276293873786926,
0.12418723106384277,
0.9823577404022217,
-0.6955215930938721,
0.21945802867412567,
0.22999946773052216,
-0.32432660460472107,... |
def _ initialize _ array _ size _ params _ inside _ wrapper ( writer, parameters ) : # get every array type parameter, that has a size definition not as a digit ( size passed as function argument ) array _ params = [ param for param in parameters if param. is _ array and not str ( param. sizes [ 0 ] ). isdigit ( ) ] # ... | [
-0.40396347641944885,
-0.6585600972175598,
0.7582696676254272,
0.16418802738189697,
0.7710788249969482,
-0.5212884545326233,
0.6913200616836548,
-0.8066263198852539,
0.09266354888677597,
0.8094332218170166,
-0.15930096805095673,
0.8279262781143188,
0.5256679058074951,
1.5497756004333496,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.