text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def streamtriangle ( self, p _ int, p _ float, p _ int _ 1, p _ float _ 1, p _ int _ 2, p _ float _ 2 ) :... | [
-0.0036468505859375,
0.5687639713287354,
0.4463564157485962,
-0.37053489685058594,
0.9600474834442139,
0.4645703136920929,
0.8120337128639221,
-1.3113033771514893,
-1.487454891204834,
0.12292835116386414,
0.12596596777439117,
0.7385076880455017,
-1.2979122400283813,
-1.1888904571533203,
... |
def signed _ area ( pr2 ) : xs, ys = map ( list, zip ( * pr2 ) ) xs. append ( xs [ 1 ] ) ys. append ( ys [ 1 ] ) return sum ( xs [ i ] * ( ys [ i + 1 ] - ys [ i - 1 ] ) for i in range ( 1, len ( pr2 ) ) ) / 2. 0 | [
-0.7117269039154053,
-0.9754468202590942,
0.6995860934257507,
-0.39221876859664917,
-0.6498793363571167,
0.31831303238868713,
0.12672489881515503,
0.17266559600830078,
0.7256931662559509,
0.7663017511367798,
-0.004861390218138695,
0.08376260846853256,
-0.9053435921669006,
0.679541051387786... |
def remove _ player ( self, user ) : self. players. remove ( user ) self. save ( ) | [
-0.9501140713691711,
-0.2860350012779236,
0.1549023687839508,
0.6180859804153442,
-0.18302175402641296,
0.6777929067611694,
0.3293660283088684,
0.2299477607011795,
-0.001310814986936748,
0.5825001001358032,
-1.158176064491272,
-0.19164590537548065,
-1.0145071744918823,
-0.41278189420700073... |
def setup ( self ) - > none : # close previous in case of re - creation self. close ( ) self. _ processed _ events _ count = 0 handler = _ eventhandler ( cache = self ) watch _ manager = pyinotify. watchmanager ( ) self. _ notifier = pyinotify. notifier ( watch _ manager = watch _ manager, default _ proc _ fun = handle... | [
-0.11876315623521805,
0.7789897918701172,
0.6316136121749878,
0.4209294319152832,
0.7053534388542175,
-0.24387623369693756,
1.4744151830673218,
0.06448714435100555,
-0.24475090205669403,
-0.11847690492868423,
-0.41462284326553345,
-0.5300079584121704,
-0.09305360913276672,
1.12539565563201... |
def get _ 5gnr _ bwp _ ch _ ptrs _ k ( self ) : rdstr = " < tbs > " return rdstr | [
0.4679158627986908,
-0.06853391975164413,
0.24497315287590027,
-1.0489774942398071,
-0.11048438400030136,
0.4170909821987152,
-0.12204944342374802,
-1.3042927980422974,
0.05830629542469978,
0.504699170589447,
0.5779422521591187,
0.4620475769042969,
-1.6576411724090576,
-0.07231710851192474... |
def mse _ grad ( x, y, w, b _ mat ) : sse _ gradient = sse _ grad ( x, y, w, b _ mat ) mse _ gradient = sse _ gradient / len ( x ) return mse _ gradient | [
0.4033849537372589,
0.6321206092834473,
0.4096129536628723,
-0.3484436869621277,
-0.34509873390197754,
0.06950336694717407,
-0.19992561638355255,
0.2173416018486023,
-0.5434569120407104,
1.444093108177185,
-0.6824639439582825,
0.3233928084373474,
-0.20278950035572052,
1.3531129360198975,
... |
def i _ ml ( tag, messages ) : if not isinstance ( messages, list ) : raise typeerror for message in messages : if message = = " " : continue i ( tag, message ) | [
-0.2816500961780548,
-0.05020838975906372,
0.34773504734039307,
0.3698483407497406,
0.6364868879318237,
-0.22704631090164185,
0.13200512528419495,
-0.4863142669200897,
-0.725223183631897,
0.6825738549232483,
-0.1721234768629074,
-0.5679882168769836,
-1.2721623182296753,
1.1338725090026855,... |
def name ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " name " ) | [
0.4056740999221802,
-0.1332448124885559,
0.4592471122741699,
0.0712871178984642,
0.5618416666984558,
0.8966432809829712,
0.05829976126551628,
-0.3534308969974518,
0.6611905097961426,
0.6750726103782654,
0.007086693309247494,
0.44384101033210754,
0.4012885093688965,
-0.8495960831642151,
-... |
def validate _ csrf _ get ( fn ) : @ wraps ( fn ) def wrapper ( * args, * * kwargs ) : if request. args. get ('state')! = login _ session ['state'] : response = make _ response ( json. dumps ('invalid state parameter.'), 401 ) response. headers ['content - type'] ='application / json'return response else : return fn ( ... | [
-0.5403904914855957,
-1.1518570184707642,
0.7719866037368774,
0.20406591892242432,
-0.06835609674453735,
-0.18924733996391296,
-0.4235050678253174,
-0.6726399660110474,
1.011997103691101,
-0.2045314759016037,
0.7104604244232178,
0.19730889797210693,
0.8171209692955017,
-0.5635432600975037,... |
def to _ xdr _ object ( self ) - > xdr. types. price : return xdr. types. price ( n = self. n, d = self. d ) | [
-0.28680482506752014,
-0.10577742010354996,
0.44584527611732483,
-1.0755670070648193,
-0.07893726229667664,
-0.06364012509584427,
-0.34618234634399414,
-1.2424386739730835,
0.9874539375305176,
-0.053727246820926666,
0.05144504830241203,
0.30511125922203064,
-0.09815232455730438,
-0.2717505... |
def postprocessor _ group ( search _ params, result ) : for data in result ['objects'] : data ['centroid'] = geojson. feature ( geometry = ( to _ shape ( data ['centroid'] ) ), properties = { } ) return result | [
-0.3669016361236572,
-0.37788915634155273,
0.17151084542274475,
-0.5704361200332642,
0.10603882372379303,
-0.21539625525474548,
0.3661576807498932,
0.43978825211524963,
-0.5840752124786377,
0.5600517392158508,
-0.5680108666419983,
-0.07985381036996841,
0.035439372062683105,
0.0106801912188... |
def oss _ bucket _ set ( self ) - > pulumi. output [ bool ] : return pulumi. get ( self, " oss _ bucket _ set " ) | [
0.04569585993885994,
1.125459909439087,
0.6529386639595032,
0.24838972091674805,
0.12628674507141113,
1.2120842933654785,
-0.0538463220000267,
-0.6413857936859131,
-0.3524842858314514,
-0.19328808784484863,
-0.33350151777267456,
0.5046507716178894,
0.1410651057958603,
-0.6702247858047485,
... |
def status _ source ( self, id : union [ status, idtype ] ) - > statussource : id = self. _ _ unpack _ id ( id ) return self. _ _ api _ request ('get ', f " / api / v1 / statuses / { id } / source " ) | [
-0.8817353248596191,
0.09139794111251831,
-0.0899762436747551,
0.11808957904577255,
-0.4212879240512848,
-0.5494301319122314,
-0.7812991142272949,
0.2102176994085312,
1.0951547622680664,
-0.031358752399683,
-1.2788617610931396,
0.682613730430603,
-0.08531266450881958,
0.015986265614628792,... |
def to _ json ( data, schema ) : if isinstance ( data, np. matrix ) : for x in data. tolist ( ) : yield json. dumps ( jsonencoder ( schema, x ) ) elif isinstance ( data, pd. series ) : for datum in data : yield json. dumps ( jsonencoder ( schema, datum ) ) elif isinstance ( data, pd. dataframe ) : for datum in data. to... | [
-0.6757001280784607,
0.04601613059639931,
0.8260015845298767,
0.21794839203357697,
-0.6410825848579407,
-0.39172273874282837,
-0.18391582369804382,
-0.09037476778030396,
0.45888814330101013,
-0.10758785158395767,
-0.352342426776886,
0.9924917817115784,
-0.07986035197973251,
0.4080655574798... |
def get ( self ) : return self. render ('index. html ', databench _ version = databench _ version, meta _ infos = self. meta _ infos ( ), * * self. info ) | [
0.35370519757270813,
0.35842466354370117,
0.06390047073364258,
-0.0971011146903038,
-0.09067345410585403,
0.33773234486579895,
-0.39707034826278687,
0.3699771761894226,
-0.9104667901992798,
-0.5149850845336914,
0.7758570313453674,
0.6233403086662292,
-0.02243664301931858,
0.030643343925476... |
def _ _ setitem _ _ ( self, key, value ) : with self. lock : if len ( self ) = = self. max _ len : if key in self : del self [ key ] else : try : self. popitem ( last = false ) except keyerror : pass if type ( value ) = = tuple : seconds = time. time ( ) + value [ 1 ] if seconds > self. timer : seconds = self. timer or... | [
-0.8738464117050171,
0.8168884515762329,
0.7076560854911804,
-0.2320503294467926,
-0.6370053887367249,
-0.018428055569529533,
-0.3663523495197296,
-0.17711900174617767,
-0.4305974245071411,
1.214909315109253,
-0.2768082618713379,
-0.06025601550936699,
-0.1394108384847641,
0.147001698613166... |
def inspect _ class _ imbalance ( df : pd. dataframe ) : fig, axes = plt. subplots ( 2, 2, figsize = ( 8, 8 ) ) sns. barplot ( x = " index ", y = " gender ", ax = axes [ 0, 0 ], data = pd. dataframe ( df. gender. value _ counts ( ) ). reset _ index ( ) ) axes [ 0, 0 ]. set _ ylabel ( " count " ) axes [ 0, 0 ]. set _ xl... | [
-0.23237282037734985,
0.0710606724023819,
0.9695860147476196,
-1.0806488990783691,
0.3226005434989929,
1.0469061136245728,
1.340140461921692,
-0.453422874212265,
-0.45639318227767944,
-0.29505741596221924,
0.7619725465774536,
0.5315211415290833,
0.7273159027099609,
0.5848559141159058,
1.... |
def extend ( self, * args, * * kwargs ) : # real signature unknown pass | [
0.4645581841468811,
0.26351338624954224,
0.4296397268772125,
1.1858680248260498,
0.2114880383014679,
0.4094759225845337,
-0.2287108153104782,
0.0700918659567833,
0.7845284342765808,
-0.7819991111755371,
-1.1149119138717651,
0.28121617436408997,
-0.23196470737457275,
0.4924512505531311,
-... |
def _ _ init _ _ ( self, result ) : self. result = result if'error'in result : self. error = result ['error'] self. outputs = [ ] else : self. error = none self. outputs = result ['additions'] | [
0.04382994398474693,
-0.2600455582141876,
0.3108251094818115,
0.4139220118522644,
-0.6748133897781372,
-1.3034874200820923,
0.3156111538410187,
-0.4429892897605896,
0.896088182926178,
-0.8368322253227234,
-0.3557623624801636,
-0.7991191148757935,
-0.36158308386802673,
0.7909867763519287,
... |
def get _ player _ name ( self ) : return self. player _ name | [
-0.8626633882522583,
-1.2215723991394043,
0.4875614047050476,
0.2945976257324219,
-0.25447356700897217,
0.609968900680542,
0.140834242105484,
0.09349039196968079,
-0.10657095909118652,
0.8438297510147095,
0.2680377662181854,
0.38472217321395874,
-0.3631410598754883,
-0.19159400463104248,
... |
def update _ camera ( self, keys, mouse _ d, lock ) : lock. acquire ( ) # acquire lock to make sure multithreading things don't get messed up self. camera. rotate ( mouse _ d [ 0 ], - mouse _ d [ 1 ], 0, sensitivity =. 001 ) self. camera. move ( ( keys [ 2 ] - keys [ 3 ], 0, keys [ 0 ] - keys [ 1 ] ), speed = 0. 001 ) ... | [
-1.2741345167160034,
-0.9430939555168152,
0.4142376184463501,
0.4823898673057556,
0.37590038776397705,
-0.21000546216964722,
-0.2000517100095749,
-0.27020227909088135,
-0.20640575885772705,
1.0181443691253662,
-0.30050453543663025,
0.273848295211792,
-0.7073286771774292,
-0.192339241504669... |
def in _ ipynb ( ) : _ _ valid _ notebooks = [ " < class'google. colab. _ shell. shell'> ", " < class'ipykernel. zmqshell. zmqinteractiveshell'> " ] try : return str ( type ( get _ ipython ( ) ) ) in _ _ valid _ notebooks except nameerror : return false | [
-0.9754176735877991,
0.20410749316215515,
0.5827696323394775,
0.5145905613899231,
0.2363647222518921,
0.6379347443580627,
-0.3872529864311218,
-0.47223395109176636,
-0.2747330367565155,
0.19556348025798798,
0.027477869763970375,
0.45278021693229675,
-1.2152310609817505,
-0.0323915146291255... |
def _ prepare _ create ( self, name : str, resource : str ) - > none : if os. path. exists ( resource ) : self. log. error ( f " an instance named'{ name }'already exists in the { self. schemaspace } schemaspace at { resource }. " ) raise metadataexistserror ( self. schemaspace, name ) # although the resource doesn't e... | [
-0.38919797539711,
0.19399107992649078,
0.4948963522911072,
-0.6658653616905212,
0.25017049908638,
0.5727378129959106,
-0.4553212523460388,
-0.8213687539100647,
0.009492717683315277,
0.6495216488838196,
0.32957980036735535,
0.07743474841117859,
0.6505370736122131,
0.5295853018760681,
0.4... |
def startssl ( self, keyfile = none, certfile = none, server _ side = false, cert _ reqs = 0, ca _ certs = none ) :... | [
0.35906749963760376,
-0.12192878872156143,
0.47812363505363464,
1.3991971015930176,
-0.2102154791355133,
0.8689384460449219,
0.23512819409370422,
0.4363001883029938,
-0.3181762993335724,
-1.2241820096969604,
-0.3451307415962219,
0.7401871681213379,
-0.16710752248764038,
0.5449627637863159,... |
def loglikelihoodbetabinom ( self, k ) : llkh = 0. 0 for j, y in enumerate ( self. y ) : # n0 = ceil ( 1. 0 / ( 1 - self. dil [ j ] ) ) # la = 2 # without the restriction of la s * > 1 la = 1 / self. dil [ j ] + 1 a = la * self. dil [ j ] # = 2 p = self. dil [ j ] b = la * ( 1 - self. dil [ j ] ) # betabinom ( y | k, a... | [
0.486735999584198,
-0.8938909769058228,
0.7971093058586121,
-0.017821408808231354,
-0.22172600030899048,
0.5919352769851685,
-0.1498814821243286,
-0.004557354375720024,
-0.029052115976810455,
-0.4942874014377594,
-0.13328048586845398,
0.06406412273645401,
-0.14850333333015442,
0.6788237094... |
def deserialize ( self, data ) : data = json. dumps ( data ) if not data : return nodes = [ ( treenode ( int ( v ) ) if v! ='#'else none ) for v in data. split ( ',') ] i, j = 0, 1 while j < len ( nodes ) : if nodes [ i ] is not none : nodes [ i ]. left = nodes [ j ] j + = 1 nodes [ i ]. right = nodes [ j ] j + = 1 i +... | [
-0.08294673264026642,
0.07585413753986359,
0.7667906284332275,
-1.0099848508834839,
-0.5999656915664673,
-0.9173157215118408,
-0.3575519621372223,
-0.07893931120634079,
0.6836114525794983,
0.3370359539985657,
-0.3382890522480011,
-0.02886624075472355,
-1.133730411529541,
-0.347074508666992... |
def target _ portal ( self ) : return self. _ target _ portal | [
-0.40879788994789124,
-1.3728934526443481,
0.2973594665527344,
-0.9270430207252502,
0.5920674204826355,
1.2793034315109253,
0.4174911379814148,
-0.5189650654792786,
1.120884656906128,
0.24486197531223297,
0.597030520439148,
1.5553033351898193,
0.07166223227977753,
-1.6638453006744385,
-0... |
async def say ( self, text : str, voice _ id : str, * * kwargs ) - > bytes : if not self. session : self. session = aiohttp. clientsession ( ) locale = self. voice _ locales. get ( voice _ id ) if not locale : async for voice in self. voices ( ) : if voice. id = = voice _ id : locale = voice. locale. replace ( " - ", "... | [
-0.08498787134885788,
-0.01690308190882206,
0.6880596280097961,
0.0404377318918705,
-0.21734072268009186,
-0.16490377485752106,
-1.444886565208435,
-0.4683414399623871,
0.211785688996315,
0.3225725293159485,
0.09811166673898697,
1.1974955797195435,
-1.2641578912734985,
0.5302514433860779,
... |
def setincrementindex ( self, * args ) : return _ itkimageserieswriterpython. itkimageserieswriterif3if2 _ setincrementindex ( self, * args ) | [
-0.4086868166923523,
0.36499494314193726,
0.3130427598953247,
0.4242839515209198,
-0.07233311235904694,
0.6578257083892822,
0.33086511492729187,
-0.7199051380157471,
-0.5541036128997803,
0.21489150822162628,
-1.034738302230835,
0.1877232939004898,
-0.1543079912662506,
0.6652010083198547,
... |
def get _ latency ( self, delta, src _ adr = none ) : pairs = [ ] p1 = none p2 = none sqnc _ num = none start _ time = none output = [ ] for packet in self. packets : if p1 is none and packet [ 1 ]. name = = " tcp " and packet [ 1 ]. src _ node = = src _ adr : if start _ time is none : start _ time = packet [ 1 ]. time... | [
0.05456037446856499,
-0.15010379254817963,
1.2081637382507324,
-0.5852077007293701,
-0.4444828927516937,
-0.2195960283279419,
0.2868962585926056,
0.4797310531139374,
0.4492093622684479,
0.7871127128601074,
0.05871082469820976,
0.12444708496332169,
-0.2945857644081116,
0.784949779510498,
... |
def multifreqcoefficients ( self, data, absorber, t = none ) : k _ heat = np. zeros ( self. grid. dims ) k _ ion2 = np. zeros _ like ( self. grid. zeros _ grid _ x _ absorbers ) i = self. grid. absorbers. index ( absorber ) n = self. n [ absorber ] n = self. n [ absorber ] # optical depth up to cells at energy e n = np... | [
-0.04079902917146683,
0.5490303635597229,
0.7070819139480591,
0.2654499411582947,
0.4572222828865051,
-1.011950969696045,
0.06677074730396271,
0.0823637843132019,
-0.3496090769767761,
0.19492579996585846,
0.45022398233413696,
-0.15069451928138733,
0.7010138630867004,
1.0023404359817505,
... |
def candidate _ components ( c ) : component _ set = subgraphs. component _ set ( c ) return list ( ( v - set ( component _ set ) ) - d ) | [
-0.2534899115562439,
-0.858017086982727,
0.42684322595596313,
-0.0028298867400735617,
-0.1053108498454094,
0.8761266469955444,
0.6399251818656921,
0.30686864256858826,
1.0026257038116455,
0.32289016246795654,
-0.5641886591911316,
0.4437936246395111,
0.298784464597702,
-0.08744005858898163,... |
def get _ name ( self, target ) : return query _ string _ attribute ( self, target, 0, nv _ ctrl _ string _ product _ name ) | [
-1.2411543130874634,
-0.28421664237976074,
0.42116039991378784,
0.5638335347175598,
-0.3745163083076477,
-0.2786921262741089,
0.2040584236383438,
-1.8318575620651245,
0.6041797995567322,
1.0217252969741821,
-0.04117188975214958,
-0.23635223507881165,
0.3172961473464966,
-0.7497588992118835... |
def _ _ get _ render _ region ( self ) : data = qtwidgets. qapplication. clipboard ( ). text ( ) crop _ data = data. split ( ", " ) if crop _ data is not none : if len ( crop _ data ) = = 4 : reg _ x = int ( float ( crop _ data [ 0 ] ) * float ( self. output. origin _ res _ x ) ) reg _ y = int ( float ( crop _ data [ 1... | [
-0.40069541335105896,
-0.35579368472099304,
0.6114810705184937,
-0.8636402487754822,
-0.5599184632301331,
-0.25855496525764465,
0.6314998269081116,
0.3908243477344513,
0.4727042317390442,
0.1355450302362442,
-0.28176218271255493,
-0.12592735886573792,
0.19557464122772217,
-0.37381801009178... |
def _ eqn _ vjp _ fn ( eqn : optional [ jaxpreqn ], cts _ in : np. ndarray, * invals ) - > tuple [ np. ndarray,... ] : if eqn is none : # identity function return cts _ in, name _ stack = ( ad. source _ info _ util. current _ name _ stack ( ) + eqn. source _ info. name _ stack ) with ad. source _ info _ util. user _ co... | [
-0.511707603931427,
-0.12265180051326752,
0.6704855561256409,
-0.4798649549484253,
-0.3716464340686798,
-1.0067734718322754,
-0.33960458636283875,
-0.20410047471523285,
0.2991337776184082,
0.6895372271537781,
0.3855683207511902,
-0.7574048638343811,
0.11108478158712387,
-0.4029838144779205... |
def index ( self :'linked _ list ', test : callable [ [ any ], bool ] ) - > int : if self. head is none : return 0 if test ( self. head. data ) : return 0 else : return 1 + linked _ list ( self. head. link, self. size - 1 ). index ( test ) | [
-0.3313559889793396,
0.36232131719589233,
0.3026096224784851,
-0.08120990544557571,
-0.3484724462032318,
-0.3740121126174927,
0.8581253886222839,
0.31795069575309753,
0.6699130535125732,
-0.8786907196044922,
-0.03189950808882713,
0.7719142436981201,
-0.7946298718452454,
0.42929258942604065... |
def _ do _ calculate _ reliability _ metrics ( attributes ) : if attributes ['hazard _ rate _ type _ id'] = = 2 : attributes ['hazard _ rate _ active'] = \ attributes ['hazard _ rate _ specified'] elif attributes ['hazard _ rate _ type _ id'] = = 3 : attributes ['hazard _ rate _ active'] = ( 1. 0 / attributes ['mtbf _ ... | [
0.15340569615364075,
-0.2522290349006653,
0.6086319088935852,
-0.5914647579193115,
0.48970168828964233,
-0.021306520327925682,
0.02035011537373066,
0.14081606268882751,
-0.6201990246772766,
0.7083166241645813,
0.339464008808136,
-0.4158071279525757,
-0.18312735855579376,
-0.148716524243354... |
def loadconfigandsetup ( log _ dir ) : algo _ name = " " for algo in list ( registered _ rl. keys ( ) ) : if algo in log _ dir : algo _ name = algo break algo _ class, algo _ type, _ = registered _ rl [ algo _ name ] if algo _ type = = algotype. other : raise valueerror ( algo _ name + " is not supported for evaluation... | [
-0.6155274510383606,
-0.444826602935791,
0.9501197338104248,
-0.331965833902359,
-0.43490737676620483,
-0.282002329826355,
0.27695828676223755,
-0.003223883919417858,
-0.2693300247192383,
1.0366854667663574,
-0.18043144047260284,
0.5898333191871643,
0.4527088701725006,
0.6945995688438416,
... |
def getdistance ( point1, point2x, point2y ) : distance = np. sqrt ( ( point2x - point1 [ 0 ] ) * * 2 + ( point2y - point1 [ 1 ] ) * * 2 ) return distance | [
0.12459789216518402,
-1.0855202674865723,
0.43299946188926697,
0.8954912424087524,
0.020316440612077713,
0.73215252161026,
-0.8862689137458801,
0.0010726579930633307,
-0.577103316783905,
0.6169772744178772,
-0.28378596901893616,
1.0381977558135986,
0.001184521010145545,
-0.5547856092453003... |
def to _ file ( self, full _ path ) : with open ( full _ path, " w " ) as file : out = { " client _ id " : str ( self. client _ id ), " client _ secret " : str ( self. client _ secret ) } json. dump ( out, file, indent = " " ) return self | [
-0.19932477176189423,
-1.395947813987732,
0.5431039333343506,
-0.97098308801651,
0.2845896780490875,
0.3877829909324646,
0.09212973713874817,
-0.0168833676725626,
-0.6302522420883179,
0.07235625386238098,
-1.3374292850494385,
0.327982634305954,
0.46747949719429016,
-0.08132068812847137,
... |
def do _ insert ( self, * * kwargs ) : _ design = ramstkdesignelectric ( ) _ design. hardware _ id = kwargs ['hardware _ id'] _ error _ code, _ msg = ramstkdatamodel. do _ insert ( self, entities = [ _ design, ] ) if _ error _ code = = 0 : self. tree. create _ node ( _ design. hardware _ id, _ design. hardware _ id, pa... | [
-0.06440023332834244,
1.5116982460021973,
0.6046057939529419,
0.2729252278804779,
0.5906187295913696,
0.2817489504814148,
-0.15581253170967102,
-0.10870591551065445,
-0.8255629539489746,
0.12540005147457123,
-0.5153124928474426,
-0.3864375650882721,
-0.23792792856693268,
0.5035153031349182... |
def process ( self ) : raise notimplemented | [
0.1313413381576538,
-0.7884041666984558,
0.6454517245292664,
0.32713583111763,
0.18346528708934784,
1.3140392303466797,
0.5993071794509888,
-0.36861953139305115,
0.6287412047386169,
-0.8902411460876465,
-0.5447837114334106,
0.20489878952503204,
0.6256435513496399,
0.5461553931236267,
0.1... |
def decimal _ to _ n ( num, base _ to, numerals = " 0123456789abcdefghijklmnopqrstuvwxyz " ) : if num = = 0 : return " 0 " if num < 0 : return'-'+ decimal _ to _ n ( ( - 1 ) * num, base _ to, numerals ) if not 2 < = base _ to < = len ( numerals ) : raise valueerror ('base must be between 2 - % d'% len ( numerals ) ) le... | [
-0.8391583561897278,
0.37056660652160645,
0.5904746651649475,
-0.06850412487983704,
-0.19925837218761444,
-0.27682602405548096,
-0.49225616455078125,
-0.08831978589296341,
0.11162227392196655,
-0.0011789947748184204,
-0.7913505434989929,
0.3892175853252411,
-0.3463359773159027,
0.136138513... |
def get _ meta ( cls, method _ name, context ) : if not method _ name : return meta _ module. aggregate _ meta ( cls, context ) method = cls. find _ single _ method ( method _ name ) return meta _ module. aggregate _ meta ( method, context ) | [
-0.413389652967453,
0.7356903553009033,
0.7645559310913086,
0.8538966178894043,
0.7319861650466919,
-0.7207483053207397,
-0.01383336540311575,
-0.5415368676185608,
0.21245989203453064,
0.5284554362297058,
1.0500917434692383,
0.8692878484725952,
0.7178146839141846,
0.5279760956764221,
-0.... |
def set _ 5gnr _ trigger _ source ( self, source ) : self. write ( f': trig : nrmm : meas : mev : sour " { source } "') | [
-0.3853439390659332,
-0.21197909116744995,
0.32823142409324646,
-0.515181839466095,
-0.4093511700630188,
-0.0069633363746106625,
1.0217258930206299,
-0.752758264541626,
0.010238259099423885,
-0.30955079197883606,
-1.2000075578689575,
0.2721591591835022,
-0.3900398015975952,
0.3112908303737... |
def dicom _ read _ and _ write ( self ) : # get test data fulldicomfile = pydicom. dcmread ( self. path ) # assign image data imagedata = fulldicomfile. pixel _ array imagedimensions = imagedata. shape # pandas data frame for meta data # https : / / stackoverflow. com / questions / 56601525 / how - to - store - the - h... | [
-0.5181137919425964,
-0.6272693276405334,
0.6319112181663513,
-0.4693664312362671,
0.40808138251304626,
-0.6293125152587891,
0.6949015855789185,
0.3055639863014221,
-0.35901686549186707,
-0.2702080309391022,
0.47885143756866455,
-0.22357919812202454,
0.38319796323776245,
-0.559754490852356... |
def scan ( themename, themepath = theme _ path ) : umls = " " stats = stats ( ) theme = theme ( name = themename, path = themepath ) assert stats. isempty ( ) rootdir = os. path. join ( themepath, f " { themename } / layouts / " ) assert os. path. exists ( rootdir ), f " no such dir { rootdir } " outdir = " out / " if ... | [
-0.0005530301132239401,
0.135189488530159,
1.0030388832092285,
-0.3968515992164612,
-0.9975098371505737,
0.07963813096284866,
1.8695977926254272,
-0.3594871163368225,
1.1174983978271484,
-0.5111947059631348,
0.33296194672584534,
0.12596924602985382,
0.2838636338710785,
0.4276607632637024,
... |
def manu _ tl ( self ) : return self. ci _ field [ 0 ] in ( 0xaa, ) | [
0.254207968711853,
-0.19675296545028687,
0.3373296558856964,
-0.31472885608673096,
0.14250993728637695,
0.09105964004993439,
-0.26291969418525696,
0.7175242304801941,
0.4713960886001587,
0.8075612783432007,
0.26720893383026123,
-0.615022599697113,
-0.502727746963501,
0.11396864801645279,
... |
def _ get _ promotion _ candidate ( self, low _ budget, high _ budget, n _ configs ) : # finding the individuals that have been evaluated ( fitness < np. inf ) evaluated _ configs = np. where ( self. de [ low _ budget ]. fitness! = np. inf ) [ 0 ] promotion _ candidate _ pop = self. de [ low _ budget ]. population [ ev... | [
-0.4039347767829895,
-0.141379252076149,
0.9495353102684021,
0.5518595576286316,
0.4869941771030426,
0.2748238444328308,
-0.3228965699672699,
0.19726556539535522,
-0.1477225422859192,
0.5542318820953369,
0.32786422967910767,
1.13301682472229,
-0.31920871138572693,
0.15612433850765228,
0.... |
async def async _ set _ percentage ( self, percentage : int ) - > none : self. _ percentage = percentage if self. _ set _ percentage _ script : await self. async _ run _ script ( self. _ set _ percentage _ script, run _ variables = { attr _ percentage : self. _ percentage }, context = self. _ context, ) if self. _ temp... | [
-0.6991519927978516,
0.23555703461170197,
0.4238564074039459,
0.3856890797615051,
0.0768483504652977,
-0.28391310572624207,
0.7113504409790039,
0.2343931943178177,
-0.2951374650001526,
0.4376741945743561,
-0.2242804616689682,
-0.4690645635128021,
-0.4053785502910614,
0.267833411693573,
0... |
def get _ user _ details ( self, response ) : email = response. get ( " email " ) or " " username = email. split ( " @ " ) [ 0 ] if email else " " return { " username " : username, " email " : email, " fullname " : response. get ( " full _ name " ) or " ", " first _ name " : response. get ( " first _ name " ) or " ", "... | [
0.3260478377342224,
-0.5181291103363037,
0.5099140405654907,
-0.8353350162506104,
-0.3475557267665863,
-0.6721429228782654,
-0.631329357624054,
-0.36228302121162415,
0.0064947763457894325,
-0.5541385412216187,
-1.2913380861282349,
-0.8377645611763,
0.059082578867673874,
-0.1549427509307861... |
def create _ table ( self, create _ table _ sql ) : conn = self. conn try : c = conn. cursor ( ) c. execute ( create _ table _ sql ) conn. commit ( ) print ( " table created " ) except error as e : print ( e ) | [
1.1550698280334473,
0.07956631481647491,
0.3979773223400116,
1.3286433219909668,
1.2297459840774536,
0.2682742774486542,
-0.19292974472045898,
-0.0494593046605587,
-1.0323033332824707,
0.24884456396102905,
0.2942832112312317,
-0.028913207352161407,
0.16631703078746796,
0.33100801706314087,... |
def set _ 5gnr _ evm _ avgcount ( self, avg ) : self. write ( f': conf : nrmm : meas : mev : sco : mod { avg }') | [
-0.02807711623609066,
-0.0021039319690316916,
0.5531982779502869,
-0.24113729596138,
-0.15039919316768646,
0.439044713973999,
0.7386278510093689,
-0.45512619614601135,
-0.6797056198120117,
0.8360300064086914,
-0.4687422215938568,
0.3947296142578125,
-0.5922578573226929,
1.1131834983825684,... |
def test _ get _ vcs _ labeling _ options ( self ) : pass | [
-0.15699860453605652,
0.17393356561660767,
0.35235917568206787,
0.6470264792442322,
0.3953309655189514,
0.04476383700966835,
0.19040870666503906,
-0.13263751566410065,
0.6624200344085693,
0.033407244831323624,
-0.514755368232727,
-0.2230539470911026,
-1.2718569040298462,
-0.29117551445961,... |
def dump _ inspections ( self, filename = none ) : if not filename : filename = vi _ filename data = [ item. to _ dict ( ) for item in self. all ( ) ] with open ( filename,'w') as outfile : json. dump ( data, outfile, indent = 4 ) | [
-0.42637327313423157,
-0.627641499042511,
0.6564351320266724,
0.034559477120637894,
0.39920100569725037,
-0.127909854054451,
0.9225475788116455,
0.9399598836898804,
-0.5911821722984314,
-0.0885751023888588,
-0.5181238651275635,
-0.2641887068748474,
-0.17923462390899658,
0.520362138748169,
... |
def testgetvaluesforquerywithbinaryvalue ( self ) : securetagapi ( self. user ). create ( [ ( u'username / tag1 ', u'description'), ( u'username / tag2 ', u'description') ] ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : objectid = uuid4 ( ) thriftvalue = createbinarythrift... | [
0.005897378548979759,
0.1331174075603485,
0.5439684987068176,
-0.5985837578773499,
0.21872322261333466,
0.5189282894134521,
-0.17470130324363708,
-0.9905913472175598,
-0.32124245166778564,
-0.9148304462432861,
-0.8095220923423767,
0.18133920431137085,
0.23888683319091797,
0.393178790807724... |
def generate _ jwt _ token ( user, refresh _ token = false ) : exp _ time = datetime. datetime. utcnow ( ) + datetime. timedelta ( weeks = 1 ) if ( not refresh _ token ) : exp _ time = datetime. datetime. utcnow ( ) + datetime. timedelta ( weeks = 1 ) token = jwt. encode ( { " username " : user [ " username " ], " refr... | [
-0.27301260828971863,
0.5236997604370117,
0.731322705745697,
-0.04674440994858742,
-1.74027419090271,
0.18175548315048218,
0.09099942445755005,
-0.9059361815452576,
0.7865786552429199,
-0.4290657639503479,
-0.49924236536026,
0.19940078258514404,
0.346435546875,
-0.03249607980251312,
0.25... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : instanceargs, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
0.17712633311748505,
0.09230512380599976,
0.5906197428703308,
-0.8677892684936523,
-0.016644222661852837,
0.4289853572845459,
-0.07413440942764282,
0.7314653396606445,
0.6002878546714783,
0.3273029625415802,
0.04084371030330658,
0.42513617873191833,
0.1000806987285614,
-1.0243191719055176,... |
def generate _ sections ( meta, type _ weights ) : section _ list = meta. get ('io. murano. metadata. forms. section ', [ ] ) sections _ map = { } for section in section _ list : name = section. get _ property ('name') ex _ section = sections _ map. get ( name ) if not ex _ section : pass elif ( type _ weights [ ex _ s... | [
-0.45382726192474365,
-0.5878114700317383,
0.9027313590049744,
-0.21907640993595123,
-0.375016987323761,
0.2657167613506317,
-0.05694180354475975,
-0.7780032157897949,
-0.5963993072509766,
0.31018170714378357,
0.31575673818588257,
-0.38752803206443787,
0.5873339176177979,
1.020068168640136... |
def _ process _ session _ termination _ tcp _ message ( self, pdu ) : if pdu. type = = messagetype. session _ termination _ response _ message : log. debug ( " - - > got session termination response message " ) self. session _ reset ( ) | [
0.07438695430755615,
-0.14776214957237244,
0.2692345678806305,
0.05526573583483696,
1.1529871225357056,
-0.9818934202194214,
0.3772525489330292,
-1.078627586364746,
1.535124659538269,
0.49242356419563293,
-0.09252198785543442,
-0.17573769390583038,
-0.6937086582183838,
-1.1098473072052002,... |
def density _ of _ states ( input _ file, units ='ev ', bins = 50, window = ( - 100, 100 ) ) : lower, upper = window levels, homos = read _ energy _ levels ( input _ file, units ) occ, virt = np. array ( [ ] ), np. array ( [ ] ) for spin, homo in zip ( levels, homos ) : o, v = spin [ : homo + 1 ], spin [ homo + 1 : ] o... | [
0.09245065599679947,
-0.4052058160305023,
0.49774959683418274,
-0.3656802475452423,
-0.4433004856109619,
0.36086222529411316,
0.8510469198226929,
0.29275181889533997,
0.21211712062358856,
-0.2513922154903412,
0.7032901048660278,
0.5421640872955322,
0.2528957724571228,
0.21021580696105957,
... |
def _ _ init _ _ ( self, parent _ path : str = " " ) : self. _ parent _ path = parent _ path | [
0.8980161547660828,
-0.4071081280708313,
0.35310670733451843,
0.6829863786697388,
-0.429151326417923,
0.3295442461967468,
0.5619592070579529,
0.43221938610076904,
-0.35934293270111084,
-0.7306618094444275,
-0.08117157965898514,
0.036372069269418716,
-0.5255562663078308,
0.3186669945716858,... |
def parallel _ merge _ sort ( input, max _ cores ) : jobs = [ ] length = len ( input ) shared _ array = multiprocessing. array ('i ', input ) depth = math. log ( length, 2 ) for level in range ( 0, int ( depth ) ) : # print ( " level : ", level ) core _ number, processing _ field = _ get _ core _ and _ processing _ fie... | [
-0.5855794548988342,
0.5306013226509094,
0.8652275800704956,
-0.03279063478112221,
-0.29095491766929626,
0.11235136538743973,
0.5141645073890686,
-0.5623343586921692,
0.18706999719142914,
-0.0719372108578682,
-0.42812469601631165,
0.5563333034515381,
-1.616134762763977,
0.4839010536670685,... |
def test _ list _ alumno _ curso _ admin ( self ) : self. client. force _ authenticate ( user = self. user _ admin ) curso _ 1 = self. curso _ 1. id curso _ 3 = self. curso _ 3. id alumno = self. alumno _ 1. id anio _ lectivo _ 2 = self. anio _ lectivo _ 2. id anio _ lectivo _ 1 = self. anio _ lectivo _ 1. id response ... | [
0.3882308602333069,
-0.295955628156662,
0.6999607682228088,
-0.07759050279855728,
0.9962389469146729,
0.67955082654953,
-0.3822338581085205,
0.07861781865358353,
-0.06491640955209732,
0.23398920893669128,
-0.8545675873756409,
1.1608072519302368,
0.7200183272361755,
0.2927536964416504,
0.... |
def get _ morning _ events ( self ) : events = [ ] for check in self. morningcheckboxes : if check. ischecked ( ) and check. text ( )! = " checkbox " : events. append ( check. text ( ) ) if self. morningcheckboxes [ - 1 ]. ischecked ( ) : if self. m _ lineedit. text ( )! = " " : events. append ( self. m _ lineedit. tex... | [
-0.3379974961280823,
-1.384139895439148,
0.7492948174476624,
1.1529009342193604,
0.27113357186317444,
0.44490617513656616,
-0.4151446521282196,
-0.3218225836753845,
0.5949864983558655,
0.4059807360172272,
-0.10461480915546417,
0.3204623758792877,
-0.3865976929664612,
1.619857907295227,
-... |
def get _ radzone _ from _ orbit ( orbit ) : start _ radzone = datetime ( orbit [ " start _ radzone " ], format = " date " ) stop _ radzone = datetime ( orbit [ " stop _ radzone " ], format = " date " ) tstart = start _ radzone. secs tstop = stop _ radzone. secs dur = tstop - tstart radzone = { " start " : start _ radz... | [
-1.0248901844024658,
-0.255278617143631,
0.5264127254486084,
-1.5478718280792236,
-0.6255559921264648,
0.021201858296990395,
-0.3141065239906311,
-0.5352786183357239,
0.13805727660655975,
0.8369882702827454,
-1.033466100692749,
0.05926428735256195,
0.22864249348640442,
-0.333977609872818,
... |
def test _ get _ feature ( self ) : pass | [
0.5309933423995972,
0.09103720635175705,
0.11613786965608597,
1.651652216911316,
1.5671192407608032,
-0.7282678484916687,
1.145527720451355,
0.24183186888694763,
-0.08294771611690521,
-1.7055225372314453,
-1.054674506187439,
0.9399250149726868,
-0.9997726678848267,
-0.36618587374687195,
... |
def get _ ssl _ dir ( ) - > str : return join ( config _ dir,'ssl') | [
0.5702247619628906,
-0.22907856106758118,
0.6805897355079651,
0.1234515979886055,
0.25356119871139526,
0.8765386939048767,
0.9355821013450623,
0.29034096002578735,
0.06615261733531952,
-0.3459133505821228,
0.09668494015932083,
0.7666125893592834,
0.3073427379131317,
0.051197350025177,
-0... |
def get _ avg _ price ( instance _ type, hours = 5, aws _ access _ key = none, aws _ secret _ key = none ) : kwargs = {'aws _ access _ key _ id': aws _ access _ key,'aws _ secret _ access _ key': aws _ secret _ key } clients = [ ] for ami in amis : clients. append ( boto3. client ('ec2 ', region _ name = ami [ 1 ], * *... | [
-1.337231993675232,
-0.5717660188674927,
0.6514198780059814,
-0.0769348219037056,
0.014543223194777966,
0.6415302753448486,
0.12828245759010315,
0.06427580118179321,
-0.1923104226589203,
1.6149128675460815,
0.13021114468574524,
1.3126426935195923,
0.16113637387752533,
0.8911678791046143,
... |
def applyglass ( boolean, widget ) : try : if boolean : widget. setwindowflags ( qtcore. qt. framelesswindowhint ) else : widget. setwindowflags ( dock. windowflags ( ) & ~ qtcore. qt. framelesswindowhint ) except : pass try : widget. setattribute ( qtcore. qt. wa _ nosystembackground, boolean ) except : pass try : wid... | [
0.4309339225292206,
0.3429016172885895,
0.8527078628540039,
0.25468355417251587,
-0.22331008315086365,
0.48733198642730713,
0.41253864765167236,
0.38676655292510986,
0.34202104806900024,
0.020854268223047256,
0.0684705600142479,
-0.06215723231434822,
-0.6244544982910156,
1.066007375717163,... |
def get _ zones _ instances ( self, compute, project ) : zones _ instances = { } zones = self. get _ zones ( compute, project ) if " items " not in zones : return zones _ instances for zone in [ x [ " name " ] for x in zones [ " items " ] ] : instances = self. get _ instances ( compute, project, zone ) if " items " not... | [
-0.33071815967559814,
0.16546928882598877,
0.4753377437591553,
-0.08001799881458282,
-0.4729522466659546,
0.5291120409965515,
0.2633199989795685,
0.36616265773773193,
-0.08072256296873093,
1.2326409816741943,
-1.0255399942398071,
0.15702928602695465,
-0.4982125461101532,
0.6379382014274597... |
def _ _ init _ _ ( self, train _ inputs, train _ outputs, hypotheses ) : self. _ train _ inputs = train _ inputs self. _ train _ outputs = train _ outputs self. _ hypotheses = hypotheses self. _ continuous _ variables = [ ] # number of features self. _ features _ no = len ( self. _ train _ inputs [ 0 ] ) # number of tr... | [
0.3439413607120514,
0.11632223427295685,
0.6961774230003357,
0.5848469734191895,
0.3640342652797699,
0.19268418848514557,
0.4662759304046631,
0.9661999940872192,
-1.2167154550552368,
-0.35855138301849365,
-0.39037197828292847,
-0.09134910255670547,
-0.014226685278117657,
-0.025825567543506... |
def read _ image _ from _ disc ( image _ path, shape = none, dtype = tf. uint8 ) : image _ raw = tf. read _ file ( image _ path ) if dtype = = tf. uint8 : image = tf. image. decode _ image ( image _ raw ) else : image = tf. image. decode _ png ( image _ raw, dtype = dtype ) if shape is none : image. set _ shape ( [ non... | [
-0.7911010384559631,
0.38579997420310974,
0.41276344656944275,
-0.6171634793281555,
-0.23322848975658417,
-0.1262318640947342,
-0.06412515044212341,
-0.08261507004499435,
-0.1585700362920761,
0.35593998432159424,
0.6290826201438904,
0.3340594470500946,
0.6461978554725647,
-0.72096014022827... |
def vgg13 ( pretrained = false, * * kwargs ) : model = vgg ( make _ layers ( cfg ['b'] ), * * kwargs ) if pretrained : model. load _ state _ dict ( model _ zoo. load _ url ( model _ urls ['vgg13'] ) ) return model | [
-0.034260742366313934,
1.1056160926818848,
0.027249718084931374,
0.9219959378242493,
-0.42944279313087463,
0.14505517482757568,
0.05756635218858719,
0.8230046033859253,
0.37107181549072266,
0.10328181087970734,
-0.4244110584259033,
0.10759897530078888,
-0.9761629104614258,
0.15200981497764... |
def test _ logon _ robot _ controller _ with _ username _ incorrect ( self ) : is _ logged _ in, _ = user _ auth. logon _ robot _ controller _ with _ username ( self. controller,'wrong user ','robotics') self. assertfalse ( is _ logged _ in ) is _ logged _ in, _ = user _ auth. logon _ robot _ controller _ with _ userna... | [
-0.2800501883029938,
-0.46294063329696655,
0.39104342460632324,
0.790742039680481,
0.6930118203163147,
0.5149934887886047,
0.06278406083583832,
-0.06533248722553253,
0.021469369530677795,
-0.1839674860239029,
-1.1216228008270264,
0.3041321635246277,
-0.2531621754169464,
-0.0190900284796953... |
def mcgroupcountmode ( self ) : if self. force _ auto _ sync : self. get ('mcgroupcountmode') return self. _ mcgroupcountmode | [
-0.35933130979537964,
0.4610787332057953,
0.5713188648223877,
0.5107725262641907,
0.049777720123529434,
0.8173099756240845,
1.3634284734725952,
-0.1816939264535904,
-0.4215538203716278,
-0.14128929376602173,
-0.6202086210250854,
0.48025983572006226,
-0.612281084060669,
-0.21335457265377045... |
def data _ format ( self, data _ format ) : self. _ data _ format = data _ format | [
0.20652584731578827,
-0.3126718997955322,
0.0013080998323857784,
-1.0411778688430786,
-0.1408761590719223,
0.570651650428772,
-0.46519431471824646,
0.7000112533569336,
-0.663358211517334,
-0.9728521704673767,
-1.0670169591903687,
0.3136962950229645,
0.6895568370819092,
1.0377655029296875,
... |
def create _ school ( ) : data = request. get _ json ( ) if data is none : return post _ request _ empty ( ) try : address _ id = address _ service. create _ address ( { " division " : data. get ( " division " ), " district " : data. get ( " district " ), " township " : data. get ( " township " ), " street _ address " ... | [
-0.8523719310760498,
-0.28188350796699524,
0.8754721283912659,
0.4110974073410034,
0.31007158756256104,
0.20813487470149994,
-0.3444775938987732,
-0.886320173740387,
0.27075788378715515,
0.4223708510398865,
0.18658052384853363,
0.42068490386009216,
-0.24023739993572235,
-0.1574848890304565... |
def test _ tel _ large _ import ( self ) : log. info ( " = = = = = = = start qual test telemetered large import = = = = = = = = = = = = = " ) # the telemetered data file referenced in the idd contains 454 vel3d _ l sio # blocks which contain 16374 instrument records and 1 metadata record for # each sio block. self. cre... | [
1.3638569116592407,
0.1855067014694214,
0.5891827940940857,
-0.9248526096343994,
0.49346309900283813,
0.37424519658088684,
-0.37003523111343384,
0.2124636024236679,
0.3511911630630493,
0.13502706587314606,
-1.0348230600357056,
0.3190537989139557,
-0.2581908702850342,
-0.14535152912139893,
... |
def test _ intraday _ agg ( self ) : def mock _ get _ prices ( * args, * * kwargs ) : dt _ idx = pd. datetimeindex ( [ " 2018 - 06 - 29 ", " 2018 - 06 - 30 " ] ) times = [ " 11 : 00 : 00 ", " 12 : 00 : 00 " ] fields = [ " close " ] idx = pd. multiindex. from _ product ( [ fields, dt _ idx, times ], names = [ " field ",... | [
-0.6036312580108643,
0.6480720043182373,
0.8873482346534729,
-0.6826189756393433,
0.27713197469711304,
0.04520805552601814,
0.055860213935375214,
-0.0869392678141594,
-0.23667111992835999,
0.18627279996871948,
0.28949156403541565,
0.38884472846984863,
-0.8283451795578003,
-0.32081925868988... |
def _ browse _ classifier ( self, classifiers ) : with ciu. pypi. pypi _ client ( ) as client : list _ of _ packages = client. browse ( list ( classifiers ) ) list _ of _ package _ names = [ v [ 0 ] for v in list _ of _ packages ] return list _ of _ package _ names | [
-1.7090762853622437,
0.050221651792526245,
0.40929582715034485,
0.744030773639679,
0.8391930460929871,
-0.5185375213623047,
-0.3858351409435272,
-0.14710064232349396,
0.394941508769989,
0.5450692772865295,
-0.24227449297904968,
0.44855523109436035,
-0.21927709877490997,
0.6788004636764526,... |
def test _ observer _ init _ rv _ behavior ( ) : sc _ init = spectralcoord ( [ 4000, 5000 ] * u. angstrom, observer = none, target = none, radial _ velocity = 100 * u. km / u. s ) assert sc _ init. observer is none assert sc _ init. target is none assert _ quantity _ allclose ( sc _ init. radial _ velocity, 100 * u. km... | [
0.22380566596984863,
-0.14835292100906372,
0.7850329875946045,
-0.5428730249404907,
0.4023555517196655,
0.002240458270534873,
0.02518526464700699,
-0.5767896175384521,
0.17681732773780823,
-0.33934685587882996,
-0.61388099193573,
0.4260503649711609,
-0.5315131545066833,
-0.1222716048359870... |
def recordset _ to _ json ( recordset, schema ) : return [ x for x in to _ json ( recordset, schema ) ] | [
-1.4478060007095337,
-0.837170422077179,
0.1735725998878479,
0.07061658054590225,
-0.20647956430912018,
-1.241394281387329,
-1.2473013401031494,
0.043385863304138184,
0.43528810143470764,
0.7123251557350159,
-0.9937359094619751,
1.2367216348648071,
0.1367994248867035,
-0.00465650437399745,... |
def nq ( self ) : return self. num _ nodes ( kind ='q') | [
-0.6083551645278931,
0.34013521671295166,
0.21604065597057343,
0.3832849860191345,
-0.0009482190944254398,
-0.10835762321949005,
0.00783522054553032,
-0.5004766583442688,
0.28529226779937744,
-0.4672747254371643,
-0.4218568205833435,
0.6337490677833557,
0.287432461977005,
0.158092692494392... |
def concatdatavertically ( data1, data2 ) : return data1 + data2 | [
0.9320335388183594,
-0.352953165769577,
0.6806836724281311,
0.562311053276062,
-0.9962297081947327,
0.4692944884300232,
-2.21281361579895,
-0.9298057556152344,
-1.187866449356079,
0.4045088589191437,
-0.13518230617046356,
2.209256887435913,
0.005269544664770365,
-0.039256446063518524,
-1... |
def applecost ( ) : costfunc = float ( input ('enter the price of an apple :') ) return costfunc | [
0.02666393853724003,
0.4702773988246918,
0.09143751114606857,
0.4463006854057312,
-1.1104878187179565,
-0.06082197651267052,
0.9716688990592957,
0.11616603285074234,
-0.5801475644111633,
0.21470651030540466,
-0.15503127872943878,
-0.41942399740219116,
0.24486508965492249,
-0.65387684106826... |
def smart _ int ( s, fallback = 0 ) : try : return int ( float ( s ) ) except ( valueerror, typeerror, overflowerror ) : return fallback | [
0.6808111667633057,
0.4049922227859497,
0.2863946259021759,
-0.2641361951828003,
-0.49822983145713806,
-1.113500714302063,
0.6876561045646667,
-0.16497424244880676,
0.38894426822662354,
-0.6617004871368408,
0.387822687625885,
-0.11311846226453781,
-0.666706919670105,
-0.35442590713500977,
... |
def _ _ init _ _ ( self, target ) : py _ typecheck. check _ type ( target, executor _ base. executor ) self. _ target = target self. _ last _ used _ index = 0 self. _ trace = [ ] | [
-0.3017274737358093,
0.4128599464893341,
0.34000304341316223,
0.23290252685546875,
0.2639564871788025,
-1.2354968786239624,
0.5751515030860901,
-0.0807684063911438,
0.3347815275192261,
-0.2923450767993927,
-0.3286512792110443,
0.5395415425300598,
0.30891862511634827,
1.0157421827316284,
... |
def sliding _ window ( image, window _ size, step _ size ) : for y in range ( 0, image. shape [ 0 ], step _ size ) : for x in range ( 0, image. shape [ 1 ], step _ size ) : # yield the current window img = image [ y : y + window _ size [ 1 ], x : x + window _ size [ 0 ] ] if img. shape = = ( int ( window _ size [ 1 ] )... | [
-0.10880374163389206,
-0.41150951385498047,
0.6204833984375,
0.8009231686592102,
-0.8407362699508667,
-0.3994496166706085,
0.42570871114730835,
-0.25772204995155334,
-0.7342095971107483,
0.41165560483932495,
0.37037602066993713,
1.0445518493652344,
-0.16521283984184265,
1.4232723712921143,... |
def closest ( values, elements, scope = none, strict = true ) : res = [ ] def add ( val, index, elem ) : " " " add elem to res " " " diff = abs ( elem - val ) if scope is none : res. append ( ( index, elem ) ) elif diff < scope if strict else diff < = scope : res. append ( ( index, elem ) ) else : res. append ( ( none,... | [
-0.4276152551174164,
-0.44084280729293823,
0.9302405714988708,
0.038151659071445465,
-0.2642827033996582,
0.04155275970697403,
0.15629595518112183,
-0.6795183420181274,
0.08190286159515381,
0.2870294153690338,
0.2169252634048462,
0.14406853914260864,
-0.4793269634246826,
0.8024113178253174... |
def ael _ main ( execparam ) : # import front modules. import fbdpworld importlib. reload ( fbdpworld ) import fbdpperform importlib. reload ( fbdpperform ) import fbdpyieldcurvelib importlib. reload ( fbdpyieldcurvelib ) import fvpsperform importlib. reload ( fvpsperform ) import fvpsyieldcurve importlib. reload ( fvp... | [
0.04124113544821739,
-0.13742603361606598,
0.8104168176651001,
0.3590274453163147,
0.7240026593208313,
0.17356550693511963,
0.41160231828689575,
-0.5035223960876465,
0.5329505205154419,
0.7349971532821655,
0.4610477387905121,
0.5165338516235352,
0.3633083403110504,
-0.019297555088996887,
... |
def transform ( self, x ) : return _ transform ( x, self. mean _, self. components _ ) | [
-1.0695499181747437,
0.2505987882614136,
0.40693962574005127,
-0.7570786476135254,
-0.06089009717106819,
0.2495012730360031,
0.23927779495716095,
-0.7474708557128906,
0.7174175381660461,
-0.05149276927113533,
-0.805101215839386,
0.17550140619277954,
0.2340894490480423,
-0.5050684809684753,... |
def _ _ init _ _ ( self, wheel _ index ) : configs = config ( ) self. _ _ wheel = wheelpos ( wheel _ index ) self. _ _ active = false self. _ _ data = data ( ) self. _ _ data _ log = [ ] self. _ _ info = info self. _ _ window _ id = ac. newapp ( " live telemetry { } ". format ( self. _ _ wheel. name ( ) ) ) ac. drawbor... | [
1.0197176933288574,
-0.7009523510932922,
1.0142537355422974,
-0.5346229672431946,
0.04472019523382187,
0.3378123342990875,
0.008034885860979557,
-0.16147737205028534,
0.29546451568603516,
-0.2656758427619934,
-0.7298799753189087,
-1.0845866203308105,
0.25194501876831055,
0.7026172280311584... |
def test _ start _ pre _ upgrade _ pod _ io ( pause _ cluster _ load, pre _ upgrade _ pods _ running _ io ) : for pod in pre _ upgrade _ pods _ running _ io : log. info ( " waiting for all fio pods to come up " ) helpers. wait _ for _ resource _ state ( pod, constants. status _ running, timeout = 600 ) | [
-0.6366428136825562,
-0.7591111660003662,
0.3816055655479431,
1.2402493953704834,
1.0413609743118286,
0.20991866290569305,
0.683944046497345,
0.05714244022965431,
0.0610341913998127,
0.32078006863594055,
-1.1454155445098877,
-0.5019534230232239,
0.4645203948020935,
-0.2138442099094391,
0... |
def getworkingdir ( self ) : pass | [
-1.1071279048919678,
-0.3211650848388672,
0.4969399571418762,
1.138838291168213,
0.20972391963005066,
0.4920802712440491,
1.023139476776123,
0.1008688434958458,
-0.26762494444847107,
-2.114943027496338,
-0.14424529671669006,
0.5631809234619141,
-0.9987947344779968,
-0.041572388261556625,
... |
def _ _ init _ _ ( self, db = none ) : self. resetall ( ) self. setdb ( db ) | [
-0.13997982442378998,
0.48729515075683594,
0.2020503580570221,
0.9724070429801941,
-0.18469665944576263,
-0.01124472264200449,
0.012761655263602734,
0.6979812979698181,
0.9380828142166138,
-0.48894351720809937,
-0.7301674485206604,
0.0019642433617264032,
-0.658660888671875,
1.6154737472534... |
def create _ qr _ code2 ( doc, method ) : region = get _ region ( doc. company ) if region not in ['saudi arabia'] : return # if qr code field not present, do nothing if not hasattr ( doc,'qr _ code') : return # don't create qr code if it already exists qr _ code = doc. get ( " qr _ code " ) if qr _ code and frappe. db... | [
0.29088497161865234,
-0.4104765057563782,
0.7533278465270996,
-0.24422037601470947,
0.12854276597499847,
0.1326494812965393,
-0.0347403958439827,
-0.2212381362915039,
-0.491752028465271,
-0.09908636659383774,
0.21003690361976624,
-0.6049492359161377,
0.2649013102054596,
0.5991131663322449,... |
def sample _ last _ hop ( a, nodes ) : n = a. shape [ 0 ] sampled = np. random. randint ( 0, n, len ( nodes ) ) nnz = a [ nodes, sampled ]. nonzero ( ) [ 1 ] while len ( nnz )! = 0 : new _ sample = np. random. randint ( 0, n, len ( nnz ) ) sampled [ nnz ] = new _ sample nnz = a [ nnz, new _ sample ]. nonzero ( ) [ 1 ] ... | [
-0.5522060394287109,
-0.5765985250473022,
0.892006516456604,
-0.09662339836359024,
-0.4020388126373291,
0.13569146394729614,
0.5927025079727173,
-0.22647027671337128,
1.2114465236663818,
1.3911956548690796,
1.0307199954986572,
0.08055373281240463,
-0.3121531009674072,
-0.24989354610443115,... |
def _ _ init _ _ ( self, addr, requesthandler = simplejsonrpcrequesthandler, logrequests = true, encoding = none, bind _ and _ activate = true, address _ family = socket. af _ inet, config = jsonrpclib. config. default ) : # set up the dispatcher fields simplejsonrpcdispatcher. _ _ init _ _ ( self, encoding, config ) #... | [
0.016248062252998352,
-0.3827511966228485,
1.0402796268463135,
0.4397978186607361,
-0.8649606704711914,
0.24163833260536194,
-0.3395515978336334,
-0.013341517187654972,
0.5192802548408508,
-0.7811787128448486,
-0.07533799111843109,
-0.1670575886964798,
-0.3897891342639923,
0.42332401871681... |
def parse _ cli _ args ( self ) : parser = argparse. argumentparser ( description ='produce an ansible inventory file based on ovh') parser. add _ argument ('- - list ', action ='store _ true ', default = true, help ='list instances ( default : true )') parser. add _ argument ('- - host ', action ='store ', help ='get ... | [
-0.49802476167678833,
0.23971141874790192,
0.45176854729652405,
-0.30738338828086853,
0.9430392980575562,
0.4263380169868469,
-0.5860121250152588,
0.2702753245830536,
-0.8517941832542419,
0.2904587686061859,
-0.25998455286026,
-0.030883608385920525,
-0.2506538927555084,
0.33117225766181946... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.