text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def pop _ tag ( self, index = 0 ) : index = self. _ _ validate _ tag _ index ( index ) pos = 12 + 4 * index tag = self. get _ long ( pos ) data = self. get _ bytes ( ) del data [ pos : pos + 4 ] self. set _ bytes ( data ) self. tag _ cnt - = 1 return ethernettag ( tag ) | [
-0.20515763759613037,
0.8811778426170349,
0.7895290851593018,
-0.751869797706604,
0.15007983148097992,
0.12477821111679077,
-0.4012567698955536,
-0.7078973054885864,
0.02564990147948265,
0.553772509098053,
-0.8644124865531921,
-0.8883788585662842,
-0.6580236554145813,
-0.3801899552345276,
... |
def generate _ data ( initial _ image, num _ images, num _ tranforms ) : transforms = np. zeros ( ( num _ images * num _ tranforms, 3 ) ) with open ('training _ data / transforms. csv ','w') as transform _ csv : for i in range ( num _ images ) : fixed _ image = generate _ image ( initial _ image ) fixed _ im _ name ='t... | [
0.17537131905555725,
0.37288588285446167,
0.6247771382331848,
0.6053871512413025,
0.47301387786865234,
0.40834975242614746,
0.8850542902946472,
0.2687590420246124,
-0.5846606492996216,
-0.4054862856864929,
-0.6994781494140625,
-0.0036848809104412794,
0.5385153293609619,
0.5565956234931946,... |
def testsettaginstancewithunicodevalue ( self ) : tagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) tag = gettags ( paths = [ u'username / bar'] ). one ( ) objectid = uuid4 ( ) self. store. commit ( ) with login ( u'username ', uuid4 ( ), self. transact ) as session : thriftvalue = createthrif... | [
-0.12678976356983185,
0.495673269033432,
0.49473583698272705,
-0.7254124283790588,
0.19994400441646576,
0.6970441341400146,
0.054408662021160126,
-0.36013561487197876,
-0.14537844061851501,
-0.5852729678153992,
-1.2438820600509644,
-0.22947625815868378,
0.260405570268631,
0.300421983003616... |
def wikify _ region ( ) : user _ id = session [ " uid " ] project _ id = request. form [ " pid " ] action = request. form [ " action " ] region = request. form [ " region " ] project _ config _ path = get _ project _ config _ path ( user _ id, project _ id ) project = project ( project _ config _ path ) data _ file _ n... | [
-0.23431731760501862,
-0.5789141654968262,
0.7891287803649902,
-0.02237914502620697,
0.49070239067077637,
-0.037279773503541946,
0.04736106097698212,
0.6544325947761536,
-1.0016224384307861,
0.400251567363739,
-0.06982304155826569,
0.5964146256446838,
0.07223550230264664,
0.227449804544448... |
def testupdatevaluesforquerieswithmultiplequeries ( self ) : securetagapi ( self. user ). create ( [ ( u'username / bar ', u'description') ] ) objectid1 = uuid4 ( ) objectid2 = uuid4 ( ) # fixme replace this with securetagvalueapi once the index is # integrated values = { objectid1 : { u'username / bar': 42 }, objectid... | [
-0.506214439868927,
0.13011085987091064,
0.5100038051605225,
0.03093770518898964,
0.568149209022522,
0.5019180774688721,
-0.007258934434503317,
-0.4656429886817932,
-0.4842512011528015,
-0.44685280323028564,
-0.6884560585021973,
-0.41494959592819214,
0.08230172097682953,
-0.090594455599784... |
def get _ range _ list _ at _ offset _ ex ( self, offset ) : return self. _ rnglists. get _ range _ list _ at _ offset _ ex ( offset ) | [
-2.039578914642334,
0.029842469841241837,
0.5252336263656616,
0.04935399815440178,
-0.49543190002441406,
0.9358074069023132,
-1.0392086505889893,
0.5012036561965942,
0.9847847819328308,
0.442830890417099,
-1.4277071952819824,
0.24623827636241913,
-0.1686270385980606,
0.368296355009079,
-... |
def _ _ init _ _ ( self, k : int ) : self. capacity = k + 1 self. items = [ 0 for _ in range ( k + 1 ) ] self. head = 0 self. tail = 0 | [
-0.6222791075706482,
0.33165818452835083,
0.49293652176856995,
0.328191339969635,
-0.28343430161476135,
-0.011999513022601604,
0.1944034844636917,
0.7658953666687012,
-0.019952431321144104,
0.08814380317926407,
-1.3205636739730835,
-0.538597047328949,
-0.03854629769921303,
0.91759008169174... |
def analyses _ info ( self ) : f _ config = os. path. join ( self. analyses _ path,'index. yaml') tornado. autoreload. watch ( f _ config ) with io. open ( f _ config,'r ', encoding ='utf8') as f : config = yaml. safe _ load ( f ) self. info. update ( config ) if self. debug : self. info ['version'] + = '. debug - { : ... | [
0.13011212646961212,
-0.6583083271980286,
0.3488061726093292,
-0.6120917797088623,
0.536156177520752,
0.028161216527223587,
0.3232614994049072,
-0.04752957448363304,
-0.8224364519119263,
0.37477925419807434,
-0.21506500244140625,
0.29880326986312866,
0.5819445848464966,
0.4028718173503876,... |
def discard _ refresh _ token ( self, client _ id, refresh _ token ) : refreshtoken. delete ( client _ id, refresh _ token ) | [
1.9884543418884277,
-0.7356407642364502,
0.060693539679050446,
0.13526317477226257,
-0.5412125587463379,
0.8921994566917419,
-0.6140382885932922,
-0.8810477256774902,
0.046879734843969345,
-0.09911351650953293,
-0.5870906710624695,
0.8430404663085938,
-0.009492842480540276,
0.3039753139019... |
def near0 _ ix ( timeseries _ 1d, radius = 5 ) : return np. where ( timeseries _ 1d < radius ) [ 0 ] | [
-0.5578397512435913,
-0.4725036919116974,
0.3675183653831482,
-0.5413265824317932,
-1.0452696084976196,
-0.05283687636256218,
0.14627504348754883,
-1.267648458480835,
-0.31357866525650024,
0.11043009907007217,
0.8408904671669006,
1.4389835596084595,
-0.30345582962036133,
0.0840884000062942... |
def movepagesby ( self, starting, steps ) : sliced = self. filter ( page _ number _ _ gte = starting ) if steps < 0 : # check for collisions or going into < = 0 real _ starting = sliced. aggregate ( real _ starting = models. min ('page _ number') ) [ " real _ starting " ] if real _ starting + steps < = 0 : raise pagemo... | [
-0.6000202894210815,
-0.5191095471382141,
0.47426536679267883,
1.0214266777038574,
0.7501943111419678,
0.30087804794311523,
0.5265487432479858,
0.08865737915039062,
-0.7801477909088135,
0.3285125195980072,
0.5330880880355835,
-0.4229416847229004,
-0.01248433068394661,
0.26944679021835327,
... |
def load _ data ( data ) : # load the agency name = data ['name'] slug = agency. slug _ for ( name ) a, created = agency. objects. get _ or _ create ( slug = slug, name = name ) # load the agency - specific values load _ agency _ fields ( a, data ) # if the agency only has a single department the contactable fields if ... | [
-0.47713932394981384,
0.44032320380210876,
0.711351215839386,
-0.38050711154937744,
0.07125799357891083,
0.09920196235179901,
-0.042946454137563705,
0.05095883086323738,
0.941635251045227,
-0.06039751321077347,
-0.40765467286109924,
-0.5685933828353882,
0.33947569131851196,
0.7039703130722... |
def to _ python ( self, value ) : if value is not none : try : return int ( value ) except ( typeerror, valueerror ) : raise validationerror ( " field must be an integer " ) | [
-0.4336612820625305,
-0.023356417194008827,
0.5422369241714478,
-0.5813953876495361,
0.1351528912782669,
0.05472966283559799,
0.27462294697761536,
-0.42642346024513245,
0.045977406203746796,
0.36754941940307617,
-0.26104071736335754,
-0.447767049074173,
-0.7339261770248413,
0.2164831161499... |
def _ _ region _ update _ ui ( self ) : if self. _ _ ui _ update : for output in self. selected _ outputs : output. ui. region _ enabled = self. _ _ render _ region _ check _ box. is _ checked ( ) | [
0.02279553934931755,
-0.8152045607566833,
0.5329518914222717,
0.054723385721445084,
-0.05168577656149864,
-0.303495317697525,
0.5896543264389038,
0.18547606468200684,
0.029221219941973686,
0.13314169645309448,
0.1846197247505188,
0.4120787978172302,
-0.8946079611778259,
0.4630987048149109,... |
def check _ no _ reps ( name2dp ) : all _ functions = [ ] all _ resources = [ ] for _, ndp in name2dp. items ( ) : assert isinstance ( ndp, nameddp ), ndp all _ functions. extend ( ndp. get _ fnames ( ) ) all _ resources. extend ( ndp. get _ rnames ( ) ) if there _ are _ repetitions ( all _ functions ) or there _ are _... | [
-0.8009695410728455,
0.7910569310188293,
0.7693638205528259,
-1.1510181427001953,
0.047064390033483505,
0.10313008725643158,
0.42819157242774963,
-0.24735935032367706,
0.02316860854625702,
-0.0138417799025774,
-0.2775225341320038,
0.3373119831085205,
-0.10048682987689972,
1.168601751327514... |
def kernel ( self, x1, x2 = none ) : if x2 is none : x2 = self. x _ train b = self. kernel _ function ( x1, x2 ) self. kernel _ matrix = np. concatenate ( ( self. kernel _ matrix, b [ 0, : - 1 ]. reshape ( 1, - 1 ) ), axis = 0 ) self. kernel _ matrix = np. concatenate ( ( self. kernel _ matrix, b. t ), axis = 1 ) # inv... | [
-0.4490041732788086,
0.16377569735050201,
0.8108911514282227,
0.45107293128967285,
0.1533595472574234,
-0.8234796524047852,
-0.03546709567308426,
0.8335055112838745,
-1.4083483219146729,
0.4192538857460022,
0.13146738708019257,
0.6190047860145569,
0.10284062474966049,
-0.17917217314243317,... |
def _ does _ quack ( explanation ) : if not hasattr ( explanation, explainparams. num _ classes ) : return false return hasattr ( explanation, explainparams. classes ) | [
-0.2979477643966675,
0.7242015600204468,
0.41206538677215576,
0.06736565381288528,
-0.2514069676399231,
-0.31238994002342224,
0.9637491703033447,
0.4728427827358246,
0.8418408632278442,
0.04792528226971626,
0.43608859181404114,
-0.8980937600135803,
0.5635217428207397,
0.7629823684692383,
... |
def a _ orig ( self ) : return self. _ a _ original | [
0.33196043968200684,
-1.0847547054290771,
0.5391416549682617,
-0.8587419390678406,
-0.918912410736084,
0.7196198105812073,
1.0036885738372803,
0.9923203587532043,
-0.14286944270133972,
-0.5834131240844727,
0.45896750688552856,
0.8090755343437195,
0.9007575511932373,
-0.6518452167510986,
... |
def test _ transaction _ authenticated _ success ( client, acc1 _ usd _ deposit _ transaction _ factory, acc2 _ eth _ withdrawal _ transaction _ factory, ) : acc1 _ usd _ deposit _ transaction _ factory ( client _ address ) withdrawal = acc2 _ eth _ withdrawal _ transaction _ factory ( client _ address ) withdrawal. st... | [
-0.030500028282403946,
0.32915815711021423,
0.44742780923843384,
0.28309524059295654,
0.07086021453142166,
0.28952381014823914,
-0.3541967272758484,
-0.18308666348457336,
-0.08103635162115097,
-0.7378144860267639,
-0.988391637802124,
-0.13134466111660004,
1.3605403900146484,
-0.78472971916... |
def set _ tpid ( self, value ) : return self. set _ word ( 0, value ) | [
-0.055208250880241394,
0.06123844161629677,
0.38172242045402527,
-1.3616961240768433,
0.07160110026597977,
0.9059011936187744,
-0.04914151132106781,
-0.28702613711357117,
-0.08017843216657639,
1.8284550905227661,
0.12061624228954315,
-0.3096795976161957,
-1.0696362257003784,
-0.32135495543... |
def brokers ( self, brokers ) : self. _ brokers = brokers | [
-0.41290685534477234,
0.10718429088592529,
-0.03868589922785759,
0.8368123173713684,
-0.22752411663532257,
0.7672684788703918,
0.08307050168514252,
0.45447036623954773,
-0.08530643582344055,
-0.36672061681747437,
-1.3989628553390503,
0.3216496706008911,
-0.9812833070755005,
0.5464807748794... |
def _ _ init _ _ ( self, seed ) : self. _ seed = seed self. _ uint32 _ max = 0xffffffff # the values for the linear congruential generator. self. _ lgc _ a = 0xbeef self. _ lgc _ c = 0xbadc0de self. _ lgc _ m = 0xffffffff # the values for the xor shift. self. _ xor _ a1 = 3 self. _ xor _ a2 = 29 self. _ xor _ a3 = 7 # ... | [
1.1628549098968506,
0.3180115520954132,
0.6178073883056641,
-0.11556904762983322,
-0.34308040142059326,
-0.003590795211493969,
0.1441851556301117,
0.24759365618228912,
0.12628993391990662,
-0.9195669293403625,
-0.1558968424797058,
-0.16652806103229523,
-0.6254024505615234,
0.38896805047988... |
def check _ signal ( ser, timeout = 0 ) : ser. write ('at + csq \ r') res = wait _ for _ strs ( ser, ['error ','ok'], timeout = timeout ) if'error'in res : return {'error': res,'rssi': none,'ber': none } # parse the signal quality m = res. split ('+ csq :') [ 1 ]. replace ('ok ','' ). replace ('\ n ','' ). strip ( ) rs... | [
-0.6160688400268555,
-0.5041726231575012,
0.3897694945335388,
0.2762502133846283,
-1.1280444860458374,
-0.5177279710769653,
-1.110747218132019,
-0.26671627163887024,
-0.11641234159469604,
0.6990542411804199,
-1.3731815814971924,
0.20977307856082916,
-0.1672399342060089,
0.213822141289711,
... |
def copy _ from _ csv ( client, dataset, table, source _ file _ path, upload _ type ) : try : dataset _ ref = client. dataset ( dataset ) table _ ref = dataset _ ref. table ( table ) job _ config = bigquery. loadjobconfig ( ) if upload _ type = ='overwrite': job _ config. write _ disposition = bigquery. writedispositio... | [
0.3955731689929962,
-0.00882484670728445,
0.45425814390182495,
0.9176486730575562,
-0.2835548520088196,
0.733432412147522,
0.021961990743875504,
-0.26418691873550415,
-0.6337254643440247,
0.6725655794143677,
0.5064842700958252,
1.239234209060669,
0.1304129958152771,
-0.1533115953207016,
... |
def to _ list _ schema ( self, relation _ type = none, relation _ npartitions = none, * args, * * kwargs ) : return self. _ generate _ relation ( relation _ type, relation _ npartitions ) | [
-0.9142995476722717,
0.07077641785144806,
0.3682594895362854,
-0.6866579055786133,
0.9455041289329529,
-0.4130190908908844,
-1.1320582628250122,
0.909956157207489,
0.9584054350852966,
0.23535819351673126,
-0.4125601351261139,
-0.21820102632045746,
-0.26891401410102844,
-0.0955539420247078,... |
def start ( num _ users, base _ dir = '. / ', session _ name ='my _ hugging _ session') : session = server. new _ session ( session _ name ) # session. kill _ window ( 0 ) for user in tqdm. tqdm ( range ( num _ users ) ) : window = session. new _ window ( session _ name + str ( user ) ) pane = window. panes [ 0 ] port ... | [
-0.9147072434425354,
0.05899754911661148,
0.6639819741249084,
1.1624226570129395,
-0.06402165442705154,
0.24145036935806274,
1.3069509267807007,
-0.31833162903785706,
-0.20422318577766418,
0.14816249907016754,
-0.083670474588871,
1.1247878074645996,
-0.007481015753000975,
0.141295731067657... |
def test _ update _ roomhire _ booking _ to _ paid ( self ) : roomhire = baker. make _ recipe ('booking. future _ rh ', cost = 10 ) booking = baker. make _ recipe ('booking. booking ', user = self. user, event = roomhire, paid = false ) baker. make _ recipe ('booking. block ', block _ type _ _ event _ type = roomhire. ... | [
0.14204274117946625,
-0.01920422539114952,
0.538252055644989,
1.398755669593811,
-0.7889005541801453,
0.8324218988418579,
-0.25718873739242554,
0.678931474685669,
-0.1535436511039734,
0.5344911217689514,
-0.8572819828987122,
-0.36742034554481506,
-0.6466723084449768,
0.7079347372055054,
... |
def distance ( start, destination ) : ac = offset _ to _ cube ( * start ) bc = offset _ to _ cube ( * destination ) return cube _ distance ( ac, bc ) | [
-0.5453171730041504,
-0.04130185395479202,
0.48953765630722046,
-0.24942146241664886,
-0.9456894993782043,
0.3052766025066376,
-0.22036567330360413,
0.5582761764526367,
-0.6048409938812256,
1.729784607887268,
-0.37556466460227966,
1.0400022268295288,
0.2962799668312073,
-1.5399140119552612... |
def test _ extended _ tuple ( ) : ver = _ version. version ( " 1. 2. 3. 4. foo ", true, 5 ) assert ver = = ( 1, 2, 3, 4,'foo') | [
-0.3597472310066223,
0.5083569884300232,
0.45887961983680725,
0.4331732988357544,
-0.6479178071022034,
0.5487449169158936,
-0.40237605571746826,
0.29727303981781006,
-0.5510286092758179,
0.7546099424362183,
-1.7925102710723877,
-1.2359058856964111,
0.29355284571647644,
-0.8117228150367737,... |
def writedefs ( self, outputdir ) : verbose = self. verbose outputfile = self. outputfile outputpath = f " { outputdir } / { outputfile } " with open ( outputpath, " w ", encoding = " utf8 " ) as fh : fh. write ( self. getdefs ( astsv = true ) ) if verbose > = 0 : console ( f " analysis written to { outputpath } \ n " ... | [
-0.3636736273765564,
-0.17396794259548187,
0.4257432520389557,
0.7694569230079651,
0.7081311941146851,
-0.139723539352417,
0.5381354093551636,
-0.19888952374458313,
-0.7629705667495728,
-0.4530889093875885,
0.2230043113231659,
0.23534730076789856,
0.9476155042648315,
1.3991670608520508,
... |
def get _ majority _ element ( seq, default = none ) : candidate = default count = 0 for x in seq : if count = = 0 : candidate = x count = 1 else : count = count + 1 if candidate = = x else count - 1 if seq. count ( candidate ) > len ( seq ) / / 2 : return candidate return default | [
-0.3251497745513916,
-0.16125863790512085,
0.43146684765815735,
1.2514225244522095,
0.36333444714546204,
-0.24251729249954224,
0.030847517773509026,
0.47181767225265503,
0.7772899866104126,
-0.04608974978327751,
-0.27691981196403503,
0.038147203624248505,
-0.7382634282112122,
0.39351767301... |
def sample _ range _ from _ range ( range _ ) : if len ( range _ ) = = 1 : val = abs ( range _ [ 0 ] ) return [ - val, val ] assert len ( range _ ) = = 3 while true : # for low last endpoint is not included list _ = np. arange ( * range _ ) low = np. random. choice ( list _, 1 ) [ 0 ] list _ = list ( np. arange ( low, ... | [
-0.5587403178215027,
-1.014088749885559,
0.7840070724487305,
0.6577514410018921,
-0.24600553512573242,
0.9198439717292786,
-0.4412223994731903,
0.15133367478847504,
0.4796742796897888,
0.965935230255127,
-0.17801138758659363,
-0.13329721987247467,
-0.23932042717933655,
0.16554348170757294,... |
def load _ bbox _ data ( filename ) : path = path ( " data ", filename ) with open ( path, newline = " " ) as stream : reader = csv. reader ( stream ) iterator = cycle ( list ( reader ) ) return iterator | [
-0.19586604833602905,
-0.16849681735038757,
0.5591261386871338,
-1.0098965167999268,
-0.3576394319534302,
0.3783678412437439,
-0.35356059670448303,
-0.6692280769348145,
-0.706669807434082,
-0.28410589694976807,
0.1845339834690094,
0.3271554410457611,
-0.1756233125925064,
-0.650731265544891... |
def decompose _ openmm _ energy ( simulation, groups = [ 0, 1 ], names = [ " non - restraint ", " restraint " ] ) : energies = dict ( ) # get the total potential energy state = simulation. context. getstate ( getenergy = true ) energy = state. getpotentialenergy ( ) / unit. kilocalorie _ per _ mole energies. update ( {... | [
-0.32294729351997375,
-0.1605284959077835,
0.7092782855033875,
-0.663362443447113,
-1.2754544019699097,
-0.9970546960830688,
-0.19797788560390472,
0.43822306394577026,
-0.7752470374107361,
0.7663033604621887,
-0.13956846296787262,
-1.1482957601547241,
-1.3154871463775635,
-0.27949777245521... |
def build _ xor _ gadget ( addr, xor _ mask ) : if len ( xor _ mask ) > 4 : raise valueerror ('length of xor mask greater than 4 bytes') buf = struct. pack ('< i ', xor _ gadget ) buf + = b'c'* 4 buf + = struct. pack ('< i ', addr ) buf + = xor _ mask return buf | [
0.1674119085073471,
0.5377740263938904,
0.2992956340312958,
0.10965923219919205,
-0.4158434271812439,
0.19529737532138824,
-0.40053966641426086,
-0.7991162538528442,
0.6990097761154175,
-0.4095865488052368,
-0.4698358476161957,
0.35982105135917664,
-0.5690390467643738,
-1.404238224029541,
... |
def run ( self, input _ file ) : start _ time = timeit. default _ timer ( ) error = false try : # scaling the image to a given radius img, scale _ factor = self. _ _ scale _ to _ radius ( cv2. imread ( input _ file ) ) # detecting empty rows row _ scores = np. max ( np. sum ( img, axis = 2 ), axis = 1 ) row _ mask = np... | [
-0.4901374280452728,
-0.45402511954307556,
1.2929248809814453,
0.04201093316078186,
0.2822377681732178,
0.07782385498285294,
0.9270828366279602,
0.6319764256477356,
0.31969597935676575,
0.7337780594825745,
0.5016579627990723,
0.5477938652038574,
0.0933183878660202,
0.5378296971321106,
0.... |
def get _ destinations ( origin, budget, date _ outbound, date _ inbound ) : # get the list of potential destinations based on flight costs potential _ destinations, costs = get _ potential _ destinations ( origin, budget, date _ outbound, date _ inbound ) if potential _ destinations is none : return [ ] destinations =... | [
-0.7338220477104187,
-0.0020435238257050514,
0.8436386585235596,
1.4803109169006348,
0.3191695809364319,
0.13012738525867462,
-0.9604151844978333,
0.5088098645210266,
-0.7047441005706787,
0.040475573390722275,
-0.12952889502048492,
0.5705076456069946,
0.3809482753276825,
0.5189852714538574... |
def find _ by _ type _ id ( type _ id ) : # determine type of condition if type _ id > max _ safe _ integer _ js : raise unsupportedtypeerror ('type { } is not supported '. format ( type _ id ) ) for registered _ type in typeregistry. registered _ types : if type _ id = = registered _ type ['type _ id'] : return regist... | [
0.7014983892440796,
-0.33939388394355774,
0.35936427116394043,
0.06822679936885834,
0.431561678647995,
-0.3689866065979004,
0.817021369934082,
-0.9064735770225525,
0.06764136999845505,
0.8274800181388855,
0.9455985426902771,
0.6187179088592529,
-0.793570876121521,
1.2897604703903198,
0.4... |
def _ _ init _ _ ( self, datasetfilename, supp, verbose = true ) : self. verb = verbose self. datasetfilename = datasetfilename self. supp = supp self. rerulatt = none self. clrerulatt = none | [
0.9664472937583923,
-0.039327122271060944,
0.4331699311733246,
-0.05776107311248779,
-0.4183548092842102,
-0.02053649351000786,
-0.4639550745487213,
1.7380738258361816,
-0.551236629486084,
-0.1228538379073143,
-0.006757828872650862,
0.9750252366065979,
0.13236956298351288,
0.28663575649261... |
def _ mgui _ set _ min _ width ( self, value : int ) - > none : self. _ qwidget. setminimumwidth ( value ) self. _ qwidget. resize ( self. _ qwidget. sizehint ( ) ) | [
0.045014142990112305,
0.2093273252248764,
0.5751782059669495,
-0.4602026045322418,
-0.3357366621494293,
0.32534709572792053,
0.03272977098822594,
-0.9390072226524353,
0.983454167842865,
-0.4780081510543823,
-0.0515281967818737,
-0.6363601684570312,
-0.4996316134929657,
1.1330476999282837,
... |
def simulate _ terminations _ snr ( * args, gait _ funcs = [ gaiting. pw1e ], rollings = ['snr'], thresholds = [ 1. 0, 0. 75, 0. 5, 0. 25 ], * * kwargs ) : return simulate _ terminations ( * args, gait _ funcs = gait _ funcs, rollings = rollings, thresholds = thresholds, * * kwargs ) | [
0.08914101868867874,
0.6399341225624084,
0.6757239699363708,
0.8339201211929321,
-0.5187149047851562,
-0.38597357273101807,
-0.702246904373169,
-0.29524269700050354,
-0.03152073919773102,
0.24147500097751617,
-0.7048569917678833,
0.13947135210037231,
0.06089744344353676,
0.0110835675150156... |
def create _ df _ from _ two _ lists ( lists, odds = false ) : if odds : column _ names = ['avg _ home _ win _ odds ','avg _ draw _ odds ','avg _ away _ win _ odds ','avg _ last _ home _ team _ wins ','avg _ last _ away _ team _ wins ','home _ team _ scored _ goals ','away _ team _ scored _ goals ','home _ team _ conce... | [
0.1652824580669403,
0.4124491512775421,
0.7435407638549805,
-0.13417768478393555,
0.4600368142127991,
0.4369727373123169,
-0.3678975999355316,
-0.10392478853464127,
-0.1890447586774826,
0.22159288823604584,
-0.014066958799958229,
0.5462353229522705,
0.2638185918331146,
-0.2851495146751404,... |
def read _ table ( file _ name, sheet = 0, unit _ line = true ) : # define script names aux _ to _ orig _ name = dict ( # common long ='longitude ', # degrees lat ='latitude ', # degrees alt ='surface altitude ', # m jtsk _ x ='jtsk x ', jtsk _ y ='jtsk y ', sa ='a - hch ', sb ='b - hch ', sc ='c - hch ', sd ='d - hch ... | [
0.264108270406723,
-0.33182260394096375,
0.8991223573684692,
-0.3076503276824951,
-0.7478137612342834,
0.24518534541130066,
0.09719710052013397,
0.0451415553689003,
-0.8085468411445618,
0.5727165937423706,
0.4825911223888397,
1.0218360424041748,
0.9296600818634033,
0.23749659955501556,
1... |
def check _ images ( first _ path : str, second _ path : str ) - > none : first _ pixels = pil. image. open ( first _ path ) first _ array = np. array ( first _ pixels ) del first _ pixels second _ pixels = pil. image. open ( second _ path ) second _ array = np. array ( second _ pixels ) del second _ pixels if first _ ... | [
0.2583765685558319,
-0.3510948121547699,
0.9123595356941223,
0.10310088843107224,
0.7317103743553162,
0.5558565258979797,
0.10678255558013916,
-0.22148998081684113,
-0.5696467757225037,
0.38902902603149414,
0.5232862234115601,
0.4092654287815094,
0.20426495373249054,
1.18189537525177,
0.... |
def evaluatetype ( self, item ) : if item. formatname = = self. formatname : return self. evaluate ( item. data ) return false | [
-0.9591255784034729,
-0.9178167581558228,
0.4000501334667206,
-0.31707245111465454,
0.13594332337379456,
0.0011597746051847935,
-0.5048784017562866,
-1.0810701847076416,
0.5964381694793701,
0.2923669219017029,
-0.5868455171585083,
-0.10067728161811829,
-1.1840614080429077,
0.11826462298631... |
async def _ load _ ra3 _ occupancy _ groups ( self ) : _ log. debug ( " finding occupancy sensors from bridge " ) occdevice _ json = await self. _ request ( " readrequest ", " / device? where = isthisdevice : false " ) if occdevice _ json. body is none : return occdevices = occdevice _ json. body. get ( " devices ", { ... | [
-0.8200024962425232,
0.4625000059604645,
0.4450342655181885,
-0.20656727254390717,
0.4947432577610016,
0.2891502380371094,
0.258749783039093,
-0.773234486579895,
0.4743727743625641,
0.636320173740387,
0.6749246716499329,
-0.37945258617401123,
-0.7053306698799133,
0.34852758049964905,
1.0... |
def mnist _ standard _ vs _ procrustes ( nrange, digits, num _ sample, outfile ) : eucl _ dist = lambda a, b : np. linalg. norm ( a - b ) proc _ dist1 = lambda a, b : procrustes. procrustes ( a, b ) proc _ dist2 = lambda a, b : procrustes. procrustes2 ( a, b ) proc _ dist3 = lambda a, b : procrustes. procrustes3 ( a, b... | [
0.5930082201957703,
-0.24640445411205292,
0.6824497580528259,
0.006372374948114157,
-0.3777135908603668,
0.39813464879989624,
0.8450146317481995,
-0.31211715936660767,
0.15591466426849365,
0.17225748300552368,
-0.7302867770195007,
0.8263081312179565,
0.09710846841335297,
0.2461569756269455... |
def isvalidaddress ( self, addr : addresstype, *, performisalignedcheck : bool = false ) - > bool : if ( not isinstance ( addr, int ) ) or ( addr < 0 ) : raise invalidaddresserror ( " @ addr ( { } ) must be natural integer ". format ( addr ) ) if performisalignedcheck : if not isaddressaligned ( addr ) : return false r... | [
-0.7466837763786316,
0.1795368641614914,
0.5896243453025818,
0.8026145100593567,
-0.7678889036178589,
0.752623438835144,
0.3230575919151306,
-0.025631941854953766,
0.7788271307945251,
-0.5629366040229797,
0.7630907297134399,
0.6349290609359741,
0.051443763077259064,
1.086029291152954,
0.... |
def get _ or _ update _ games ( self ) : g = github ( self. token ) gh _ user = g. get _ user ( ) all _ repos = filter ( lambda r : not r. fork, gh _ user. get _ repos ( ) ) new _ repos = [ ] try : all _ games = game. objects. filter ( user = self. user ) if all _ games is not none : all _ games _ repos = map ( lambda ... | [
0.34967467188835144,
-0.28490155935287476,
0.9581989049911499,
0.4373745918273926,
0.9256229400634766,
0.08868458122015,
-0.769116222858429,
0.1391204297542572,
0.5152842402458191,
0.8247285485267639,
0.03448783978819847,
-0.011146589182317257,
-0.5575650334358215,
0.5937981605529785,
-0... |
def setfields ( self, field _ names ) : self. _ field _ names = field _ names | [
-0.45762747526168823,
0.4905311167240143,
0.12373408675193787,
-0.7689741253852844,
0.6915017366409302,
0.5644270777702332,
-0.35343411564826965,
0.3584286868572235,
-0.3579092025756836,
-0.4456084072589874,
-1.881844162940979,
-0.08261550962924957,
-0.09488522261381149,
-0.150920242071151... |
def test _ withindistance _ yes ( intercompartylist ) : stanfordinvite = intercompartylist. withindistance ( stanford, office, longdistance ) verify _ answer ( stanfordinvite, true ) | [
0.5508150458335876,
-0.009337269701063633,
0.3935994803905487,
0.3623763620853424,
-0.9362742304801941,
1.5102543830871582,
-1.2008041143417358,
0.7842680811882019,
-0.35588908195495605,
0.5438194274902344,
-1.3172754049301147,
0.7077793478965759,
-1.4657788276672363,
-0.2827562987804413,
... |
def resolve _ relative _ path ( path, config _ path ) : if os. path. isabs ( path ) : return path return os. path. join ( os. path. dirname ( config _ path ), path ) | [
0.5042263269424438,
0.021718036383390427,
0.7095608115196228,
0.4382303059101105,
-0.17972008883953094,
0.5505232810974121,
-0.2621755301952362,
-0.062088482081890106,
-0.4052126109600067,
0.36672812700271606,
0.7642670273780823,
-0.7194716930389404,
-0.37049147486686707,
-0.19861228764057... |
def progress _ in _ exercises ( ) : pass | [
-0.40762168169021606,
0.0030077577102929354,
0.4174288809299469,
1.111715316772461,
0.5580544471740723,
0.8069454431533813,
2.0254273414611816,
-0.22204303741455078,
0.03967072814702988,
-0.12158451229333878,
0.44358760118484497,
-0.8232769966125488,
-0.6822689771652222,
-0.19832843542099,... |
def loss _ fn ( outputs, targets ) : loss = nn. bceloss ( ) return loss ( outputs, targets ) | [
-0.21278341114521027,
-0.9163119196891785,
0.15262071788311005,
0.8728575110435486,
0.1358812153339386,
-1.4679811000823975,
0.4306046664714813,
-0.37746164202690125,
-0.36445099115371704,
-0.9178823828697205,
0.3199012875556946,
-0.35243186354637146,
0.7028631567955017,
-0.847969830036163... |
def update _ screenboard ( self, board _ id, description ) : return self. http _ request ('put ','/ screen /'+ str ( board _ id ), description ) | [
-1.067382574081421,
0.5123534798622131,
0.4027245044708252,
0.6065760850906372,
-0.2824518084526062,
0.5080450773239136,
-1.0302810668945312,
-0.0997874066233635,
0.28312188386917114,
0.4992552697658539,
-0.3190838694572449,
0.9551514983177185,
-1.8706040382385254,
0.9527315497398376,
0.... |
def teardown ( self ) : try : list = os. listdir ( os. path. join ( settings. media _ root,'uploads / images / galleries /') ) except : return for file in list : os. remove ( os. path. join ( settings. media _ root, f'uploads / images / galleries / { file }') ) | [
0.16607585549354553,
0.05998070910573006,
0.7202687859535217,
0.24597804248332977,
0.8170217871665955,
0.11681875586509705,
1.5324362516403198,
-0.27867722511291504,
0.7424840927124023,
0.4438331425189972,
-0.11030665785074234,
-0.1678817719221115,
-0.7008516192436218,
1.0580052137374878,
... |
def apphome ( request ) : assert isinstance ( request, httprequest ) return render ( request,'app / apphome. html ', {'title':'app home page ','year':'2016'} ) | [
0.8247866034507751,
-0.17979544401168823,
0.6130297780036926,
1.0903019905090332,
-0.41460883617401123,
1.1503537893295288,
-0.3785509169101715,
-0.23527289927005768,
0.344952791929245,
0.562942624092102,
1.1864664554595947,
-0.023137792944908142,
0.5596425533294678,
0.15254974365234375,
... |
def square ( num ) : if not ( isinstance ( num, int ) or isinstance ( num, float ) ) : return " only integers and floats accepted as parametres. " if not num : return " please enter a number. " return num * * 2 | [
-0.5219386219978333,
0.2409137487411499,
0.61195969581604,
0.6224771738052368,
-0.2634631097316742,
0.21133464574813843,
0.6730244755744934,
-0.941538393497467,
-0.026218675076961517,
-0.12103544175624847,
0.9898869395256042,
0.5281962752342224,
-1.0447232723236084,
0.5337658524513245,
0... |
def parseparen ( string ) : stack = [ ] for i, c in enumerate ( string ) : if c = ='(': stack. append ( i ) elif c = =')'and stack : start = stack. pop ( ) yield ( len ( stack ), string [ start + 1 : i ] ) | [
-0.18133953213691711,
0.1574336588382721,
0.8579310774803162,
-0.3744203746318817,
-0.9070520401000977,
-0.6682165265083313,
0.694977343082428,
0.11144687235355377,
0.13342313468456268,
0.4912394881248474,
-1.0660936832427979,
0.30435097217559814,
-1.2284693717956543,
-0.5105542540550232,
... |
def tohtmlstring ( self ) : out = " " for x in self. _ elements : if x. gettype ( ) = = stringview. text _ element : print " plain text found " out + = x. getvalue ( ) elif x. gettype ( ) = = stringview. italic _ element : print " italic text found " if x. getvalue ( ) = = true : out + = " < i > " else : out + = " < / ... | [
-0.6289727091789246,
-0.8978042006492615,
0.7952507734298706,
-0.09970226883888245,
-0.9713244438171387,
0.7434532642364502,
-0.015850527212023735,
-0.3750573396682739,
0.14044292271137238,
-0.37718692421913147,
0.6711307764053345,
0.13841833174228668,
-0.11186040937900543,
0.4542029201984... |
def test _ show _ due _ date _ time _ event _ with _ cancellation _ period ( self, mock _ tz ) : mock _ tz. now. return _ value = datetime ( 2015, 2, 1, tzinfo = dt _ timezone. utc ) event. objects. all ( ). delete ( ) booking. objects. all ( ). delete ( ) event = baker. make _ recipe ('booking. future _ pc ', advance ... | [
0.41114065051078796,
0.6864619851112366,
0.8651860356330872,
0.6567084789276123,
-0.5844914317131042,
0.7017945051193237,
-0.16678093373775482,
1.1994143724441528,
-0.3112432360649109,
-0.06990610063076019,
-0.3586702346801758,
-0.3684428930282593,
0.13314835727214813,
0.15795329213142395,... |
async def on _ message ( self, msg ) : content = msg. content channel = msg. channel # delete original rhytm bot message and re - send in dedicated channel if msg. author. bot and msg. author. name = = " rythm " and msg. channel. name! = " rythm " : embed = msg. embeds [ 0 ] if msg. embeds else none print ( f " deletin... | [
0.770257830619812,
-0.7504530549049377,
0.7638350129127502,
0.2924768924713135,
0.943147599697113,
0.5369023680686951,
0.3507283329963684,
0.17739802598953247,
0.01865762658417225,
-0.11195479333400726,
0.45908400416374207,
0.7723610997200012,
-0.676825761795044,
1.0153648853302002,
0.24... |
def showoverrides ( self ) : verbose = self. verbose override = self. override if override : overrides = self. overrides same = sum ( 1 for x in overrides. items ( ) if x [ 1 ] is none ) distinct = len ( overrides ) - same if verbose = = 1 : console ( f " { same : > 3 } identical override ( s ) " ) if verbose > = 0 : c... | [
0.5135322213172913,
0.39338523149490356,
0.7366106510162354,
-0.4458129405975342,
0.25578877329826355,
-0.4987119138240814,
0.1531587690114975,
-0.6704254746437073,
0.3974171578884125,
-0.05887336656451225,
-0.3967573344707489,
1.1477370262145996,
-0.21579456329345703,
0.4045736491680145,
... |
def depot ( self ) : return self. _ depot | [
0.46130210161209106,
-0.1551089882850647,
0.1822514533996582,
-1.5316718816757202,
-0.05124247446656227,
0.6696857213973999,
1.146247386932373,
-0.43394187092781067,
0.4823336601257324,
-0.9597074389457703,
-0.04228835925459862,
-0.22293545305728912,
-0.6810030341148376,
-1.235372424125671... |
def get _ json ( ) : if request. method = ='post': sentence = request. get _ json ( ). get ('sentence'). lower ( ) return response ( process _ sentence ( sentence ), mimetype ='application / json') else : return " - 1 " | [
-0.4659365117549896,
-0.9362440705299377,
0.6872929930686951,
0.667294979095459,
-0.3030626177787781,
-1.1047173738479614,
-0.38646113872528076,
-0.5380737781524658,
0.07120217382907867,
0.937207043170929,
0.16608349978923798,
-0.23254400491714478,
-0.9993203282356262,
0.7941144108772278,
... |
def _ compute _ energies ( self ) : # create and cache integrator and context if needed. if not hasattr ( self,'_ context') : self. _ cache _ context ( ) logger. debug ( " computing energies... " ) start _ time = time. time ( ) # retrieve context. context = self. _ context if self. mpicomm : # mpi version. # compute en... | [
0.14954854547977448,
0.31785848736763,
0.6536860466003418,
-0.050866249948740005,
-0.1269998848438263,
-0.22842371463775635,
0.6383374333381653,
0.8853000998497009,
-0.27405160665512085,
0.504734456539154,
0.21691438555717468,
0.18157881498336792,
0.595158040523529,
-0.4508611559867859,
... |
def sample _ orient ( r, step _ size = 45 ) : if step _ size not in [ 30, 45 ] : raise valueerror ( " step _ size { } not supported. ". format ( step _ size ) ) # theta is angle from x axis. 0 < = theta < = 360 - step _ size theta = np. radians ( np. arange ( 360 / step _ size ) * step _ size ) # phi is angle from z ax... | [
-0.9160507917404175,
-0.22395601868629456,
0.5486810207366943,
-0.2529267370700836,
-0.5607904195785522,
0.32986772060394287,
0.949932336807251,
-0.023170193657279015,
0.5593693852424622,
0.8964830040931702,
-0.7261824011802673,
0.2679380476474762,
-0.23058049380779266,
-0.3275922834873199... |
def _ vmap ( f : callable, in _ axes, out _ axes, squeeze _ out : bool = true ) - > callable : in _ axes _ plus _ 1 = tree _ map ( lambda x : x if x in ( none, - 1 ) else x + 1, in _ axes ) @ utils. wraps ( f ) def f _ vmapped ( * args ) : args = tree _ map ( _ expand _ dims, args, in _ axes _ plus _ 1, is _ leaf = _ i... | [
-0.1255984753370285,
0.33714279532432556,
0.6657595634460449,
0.13538624346256256,
-0.9164363741874695,
-0.46258050203323364,
0.5056765079498291,
0.13170814514160156,
0.16570769250392914,
0.9836260676383972,
0.7339377999305725,
0.3481751084327698,
0.9585891366004944,
-0.6241394877433777,
... |
def _ _ removecardsfromplayer _ _ ( self, playerid : str, cards : " list [ card ] " ) : for c in cards : self. playershands [ playerid ]. remove ( c ) | [
-0.6006259322166443,
-1.3121005296707153,
0.07840508222579956,
-0.3599555492401123,
-0.24806249141693115,
0.24721604585647583,
-0.5074923038482666,
0.7574017643928528,
-0.1634947657585144,
0.9154319167137146,
-0.7915191650390625,
-0.2731530964374542,
-1.0553538799285889,
0.2523882687091827... |
def decrypt ( self, data : bytearray ) - > bytearray : if not isinstance ( data, ( bytes, bytearray ) ) : self. clear ( ) raise gostciphererror ('invalid ciphertext data') gamma = bytearray ( ) result = bytearray ( ) for i in range ( get _ num _ block ( data, self. block _ size ) ) : gamma = self. _ cipher _ obj. encry... | [
-0.33803892135620117,
0.5271729230880737,
0.9547947645187378,
0.06346511840820312,
-0.11703846603631973,
-0.5664445757865906,
1.1705294847488403,
-0.4554257392883301,
0.4123627245426178,
0.35540086030960083,
-0.9508573412895203,
0.16434018313884735,
-1.3998196125030518,
0.1717987060546875,... |
def from _ authorization _ code ( self, client _ id, code, scope ) : key ='oauth2. authorization _ code. % s : % s'% ( client _ id, code ) data = self. redis. get ( key ) if data is not none : data = json. loads ( data ) # validate scope and client _ id if ( scope = ='' or scope = = data. get ('scope') ) and \ data. ge... | [
0.03677036985754967,
-0.09867429733276367,
0.5207913517951965,
-0.3617641031742096,
-0.8744869232177734,
-1.037423014640808,
-1.126806616783142,
-0.6757171750068665,
0.5958239436149597,
0.9865920543670654,
0.9393274784088135,
1.278726577758789,
0.19533859193325043,
-0.4500185549259186,
1... |
def initial _ conditions _ wigner ( x0, hess, masses, nsample = 50, zero _ threshold = 1. 0e - 8 ) : vib _ freq, vib _ modes = vibrational _ analysis ( x0, hess, masses, zero _ threshold = zero _ threshold ) aw, bw = wigner _ distribution ( x0, hess, masses, zero _ threshold = zero _ threshold ) gw = gaussianwavepacket... | [
0.735169529914856,
-1.0841028690338135,
0.3315000832080841,
0.11145009100437164,
-0.7670924663543701,
-0.266585111618042,
-0.4622993469238281,
0.4220505356788635,
-0.03961721435189247,
0.37836766242980957,
0.05872608721256256,
0.3741194009780884,
-0.5590649247169495,
0.9911810755729675,
... |
def api _ get _ dataset _ user ( id = none ) : auth _ func ( ) if not id : datasets = db. session. query ( dataset ). all ( ) else : datasets = db. session. query ( dataset ). filter _ by ( user _ id = id ) results = [ ] for elem in datasets : results. append ( elem. as _ dict ( ) ) return jsonify ( results ) | [
-1.5566480159759521,
0.6153007745742798,
0.2539351284503937,
0.5205307602882385,
-0.3545008599758148,
-0.9084836840629578,
-0.8405701518058777,
-0.18066132068634033,
0.3163960874080658,
-0.3284832239151001,
-0.2632427513599396,
0.9984656572341919,
0.6045061945915222,
0.4911457598209381,
... |
def json _ bytes _ signed _ canonical ( request ) - > bytes : return get _ test _ data ( request, _ _ name _ _, " config _ signed _ canonical. json " ) | [
-1.2596222162246704,
-0.4587521255016327,
0.32170647382736206,
-0.08745866268873215,
-0.4164067208766937,
0.29125404357910156,
0.19915075600147247,
-0.957484245300293,
-0.06540229916572571,
0.43043774366378784,
-0.776907205581665,
0.3787404000759125,
-0.12204790860414505,
-0.05900504440069... |
def getcontrollercardmodel ( ) : andor _ solis. getcontrollercardmodel. restype = ctypes. c _ uint controllercardmodel = ctypes. create _ string _ buffer ( str _ buffer _ size ) result = andor _ solis. getcontrollercardmodel ( ctypes. byref ( controllercardmodel ) ) check _ status ( result ) return str ( controllercard... | [
-0.1353289783000946,
-0.5097313523292542,
0.3639063537120819,
-0.18166278302669525,
0.10782705247402191,
0.5293593406677246,
-0.12900251150131226,
0.15770301222801208,
0.569747269153595,
0.03609562665224075,
-0.6912327408790588,
-0.09096138179302216,
-0.08519880473613739,
-0.25894796848297... |
def unispeech _ sat _ url ( ckpt, refresh = false, * args, * * kwargs ) : return unispeech _ sat _ local ( _ urls _ to _ filepaths ( ckpt, refresh = refresh ), * args, * * kwargs ) | [
0.23242470622062683,
0.0025996037293225527,
0.3282400369644165,
0.39457565546035767,
0.00421556131914258,
-0.0394362173974514,
-0.19130052626132965,
-0.041799772530794144,
0.2497909516096115,
0.2311086356639862,
0.016803979873657227,
-0.28747493028640747,
0.46898236870765686,
0.03153038024... |
def draw ( self, render ) : pass | [
-0.3666630685329437,
-0.24328576028347015,
0.393626868724823,
0.6210371851921082,
0.26162949204444885,
0.5716703534126282,
-0.48920938372612,
0.29101264476776123,
-0.3139307200908661,
-1.667153000831604,
-0.7053992748260498,
0.14921143651008606,
-0.7205591797828674,
0.02416645735502243,
... |
def has _ path ( self, * path, * * kwargs ) : try : self. expand _ path ( * path, * * kwargs ) return true except candidatenotfound : return false | [
-0.1773165464401245,
0.04786146804690361,
0.4175459146499634,
1.3307956457138062,
-0.05316632613539696,
0.6101387143135071,
-0.27624326944351196,
0.6156126260757446,
-0.09506572037935257,
-0.6647729277610779,
0.2020403891801834,
-0.8313347101211548,
-0.8323511481285095,
0.13940739631652832... |
def _ guestbookkey ( ) : return db. key. from _ path ('guestbook ','default _ guestbook') | [
-0.8461305499076843,
0.16811376810073853,
-0.03285980224609375,
1.393347144126892,
0.2963532507419586,
0.8048207759857178,
0.03389888256788254,
0.23525987565517426,
-1.3577380180358887,
1.2433632612228394,
-0.7139070630073547,
-0.9443091154098511,
-1.2722752094268799,
-0.9706494808197021,
... |
def tools _ convertyargstopx ( yposition, objh, texth ) : if yposition = = " top " : y = 0 elif yposition = = " center " : y = int ( 0. 5 * objh - 0. 5 * texth ) elif yposition = = " bottom " : y = int ( objh - texth ) else : try : y = int ( yposition ) except : print ( " [ pssmol ] invalid input for yposition " ) retu... | [
-0.1608801782131195,
-0.882568359375,
0.8189055323600769,
-0.4704929292201996,
-1.0380398035049438,
-0.11645352840423584,
-0.096930593252182,
-0.2312411367893219,
0.23265931010246277,
0.14830948412418365,
-0.6081119775772095,
-0.3619358241558075,
-0.12887905538082123,
0.3710736036300659,
... |
def writelines ( self, lines ) : pass | [
-0.9912844896316528,
-1.0504454374313354,
0.06102482229471207,
0.4219001829624176,
1.7363014221191406,
0.8879926800727844,
-0.1388658583164215,
0.4831766188144684,
0.4263281226158142,
-0.8450300097465515,
0.25445735454559326,
-1.0196924209594727,
-0.32144618034362793,
0.9050199389457703,
... |
def name ( self ) : return gen _ name _ from _ class ( self ) | [
-1.188873529434204,
-0.967971920967102,
0.6195135712623596,
0.24867591261863708,
-0.6859889030456543,
1.196110725402832,
0.17862799763679504,
-0.48148804903030396,
0.13448938727378845,
0.41956233978271484,
-0.73545241355896,
-0.52113276720047,
0.982381284236908,
0.12276677787303925,
-0.4... |
def unfreeze ( self ) : return clustergroup ( [ partialcluster ( i. exprs, i. stencil ) if isinstance ( i, cluster ) else i for i in self ] ) | [
-0.29603344202041626,
0.11235199868679047,
0.40686431527137756,
-0.039932720363140106,
-0.49252620339393616,
-0.7623205184936523,
0.8230156302452087,
-0.8956301808357239,
-0.108460932970047,
0.115540511906147,
0.5099365711212158,
0.45250701904296875,
-2.3796679973602295,
-0.153071254491806... |
def data _ step ( self, * args, * * kwargs ) : raise notimplementederror | [
-1.0672392845153809,
0.03216187655925751,
0.399798184633255,
-0.002055979799479246,
0.45031243562698364,
0.732505202293396,
-0.7318680882453918,
0.26017701625823975,
-0.9681414365768433,
-1.065968632698059,
-1.3252475261688232,
0.615332841873169,
0.5440635681152344,
0.838347315788269,
-1... |
def ldr ( self, shape = ( 1, ), name = none ) : new _ ldr = decrule ( self, shape, name ) return new _ ldr | [
0.7630190849304199,
0.05553973838686943,
0.5658732056617737,
-1.6152132749557495,
-0.24250826239585876,
-0.09904256463050842,
-1.435511827468872,
-0.027664219960570335,
-0.03170473873615265,
-0.15246744453907013,
-0.23291096091270447,
0.2688002586364746,
-0.823888897895813,
-0.116437889635... |
def test _ model _ updating _ works _ properly ( self ) : tm = testmodel. create ( count = 8, text ='123456789') tm. count = 100 tm. save ( ) tm. count = 80 tm. save ( ) tm. count = 60 tm. save ( ) tm. count = 40 tm. save ( ) tm. count = 20 tm. save ( ) tm2 = testmodel. get ( tm. vid ) self. assertequals ( tm. count, t... | [
-0.5430495738983154,
-0.7286613583564758,
0.4982234835624695,
0.23487719893455505,
0.3895237445831299,
0.54543137550354,
0.13786627352237701,
-0.4510038495063782,
-0.7710596323013306,
0.2816600799560547,
-1.0165259838104248,
-0.8042169809341431,
0.11069688946008682,
0.13585683703422546,
... |
def merge _ video _ audio ( video, audio, output, vcodec ='copy ', acodec ='copy ', ffmpeg _ output = false ) : return [ " ffmpeg ", " - y ", " - i ", audio, " - i ", video, " - vcodec ", vcodec, " - acodec ", acodec, output ] | [
0.6268474459648132,
-0.5128372311592102,
0.578167736530304,
0.863741397857666,
0.6345072388648987,
-0.7297411561012268,
-0.2218349725008011,
-0.04743380844593048,
0.5814927816390991,
0.27783721685409546,
-0.23356324434280396,
-0.22813089191913605,
0.5246120691299438,
0.07077407836914062,
... |
def set _ pages ( self, selenium : fixture ) - > none : self. rides : rides = rides ( selenium ) | [
0.38929471373558044,
0.7308335304260254,
0.2041141539812088,
0.09927796572446823,
1.1562707424163818,
0.23568260669708252,
0.006807195954024792,
0.19465748965740204,
0.8407608270645142,
0.16786359250545502,
0.0076697529293596745,
-0.021367106586694717,
0.4484398365020752,
0.68367600440979,... |
def loop ( earth, satellite ) : time = 0 # initialize time timestep = 60 # one minute timelimit = 3600 # one day primary = turtle. turtle ( ) secondary = turtle. turtle ( ) secondary. speed ( 0 ) primary _ params = {'color':'red ','size': 25 } secondary _ params = {'color':'yellow ','size': 12 } earth. render _ body ( ... | [
-0.9420075416564941,
0.3538396954536438,
0.43033576011657715,
-1.4620492458343506,
-0.7561841011047363,
0.5775121450424194,
-0.899118959903717,
-1.0917755365371704,
-0.27396291494369507,
0.2911810874938965,
-0.39290156960487366,
1.0417383909225464,
0.24305583536624908,
0.9811937212944031,
... |
def asyncrecvline ( self, lineencoding ='utf - 8 ', onlinerecv = none, onlinerecvarg = none, timeoutsec = none ) :... | [
0.551450788974762,
0.045822568237781525,
0.4913497567176819,
0.5588542222976685,
-0.04818018525838852,
-0.4667930603027344,
-0.8273811936378479,
0.3856546878814697,
-0.5506596565246582,
0.07670611143112183,
-0.49344587326049805,
0.7670391798019409,
-0.2891722321510315,
-0.4744058847427368,... |
def add _ arguments ( cls, parser : argumentparser ) : pass | [
-0.8440696597099304,
-0.6732508540153503,
0.4751828610897064,
0.09905646741390228,
1.355548620223999,
0.7728637456893921,
-0.6998984813690186,
0.4814568758010864,
-0.05812295898795128,
-0.3590618968009949,
-0.3341350555419922,
-0.30959102511405945,
-0.21071046590805054,
1.3071686029434204,... |
def initialize _ grid ( self, num _ pts, disturb _ centre, time _ centre, variance _ centre, rel _ coords, variance _ random = 1 ) : self. num _ pts = num _ pts self. rel _ coords = rel _ coords l = 2 self. x _ line = np. linspace ( 0, num _ pts, num _ pts ) # 0, 4 can be changed self. y _ line = np. linspace ( 0, num ... | [
0.9032482504844666,
-0.09069758653640747,
1.0419819355010986,
-0.4595879316329956,
1.0421897172927856,
-0.3181597590446472,
0.708000898361206,
0.05048878863453865,
0.0035988260060548782,
0.012386697344481945,
0.1790883094072342,
0.3485099673271179,
-0.06914865970611572,
0.8203544020652771,... |
def to _ str ( self ) : return pprint. pformat ( self. to _ dict ( ) ) | [
-0.11679229140281677,
-0.9131585359573364,
0.5253970623016357,
-1.2576525211334229,
-0.17642568051815033,
0.5209487676620483,
-1.102938175201416,
-0.5069779753684998,
0.09333008527755737,
0.0525115467607975,
0.8043856024742126,
0.46302059292793274,
-0.02955469861626625,
-0.2601685822010040... |
def demo _ bc _ gaussian ( c = 1, nx = 80, t = 4 ) : # scaled problem : l = 1, c = 1, max i = 1 action = plotandstoresolution ('gaussian ', - 1. 3, 1. 3, skip _ frame = 1, title ='u ( 0, t ) = 0, du ( l, t ) / dn = 0. ', filename ='tmpdata') l = 1. dt = ( l / nx ) / c # choose the stability limit with given nx cpu, has... | [
0.057342514395713806,
0.5699568390846252,
0.8186808228492737,
0.7184121012687683,
0.009743540547788143,
0.4764210879802704,
0.14673787355422974,
-0.02374975197017193,
-0.2941060960292816,
-0.14094950258731842,
-1.1079583168029785,
1.0791797637939453,
-0.42879927158355713,
0.109465271234512... |
def background _ thread ( ) : while true : running _ robots = [ ] robot _ log = db. session. query ( robotlog ). filter ( robotlog. end _ time = = none ). all ( ) for robot in robot _ log : running _ robots. append ( robot. robot _ name ) # json _ data = json. dumps ( [ i. serialize for i in robot _ log ] ) [ 0 ] # pri... | [
-0.1992405354976654,
-0.5654670596122742,
0.5731220841407776,
-0.5784914493560791,
0.41982385516166687,
0.071725033223629,
-0.5661390423774719,
-0.9566224217414856,
-0.7178407907485962,
0.2556893825531006,
-0.6247542500495911,
1.2182202339172363,
-1.1205649375915527,
-0.07852619886398315,
... |
def current _ line _ changed ( self, model, doc, line ) : pass | [
-0.11627154797315598,
-1.6125274896621704,
0.10893545299768448,
0.5727147459983826,
0.5146578550338745,
0.5574067234992981,
-0.2488783448934555,
-0.18900734186172485,
-0.5679003596305847,
0.006978147197514772,
-0.7652688026428223,
0.25476640462875366,
0.26769620180130005,
0.410326570272445... |
def test _ check _ config _ params _ missing _ satd _ keywords ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture. pop ( " satd _ keywords ", none ) with pytest. raises ( systemexit ) : gitdelver. _ check _ config _ params ( con... | [
0.3624868392944336,
0.29444456100463867,
0.31002089381217957,
-0.007178203202784061,
-0.26860660314559937,
0.6612827181816101,
-0.6841808557510376,
0.19793464243412018,
-0.9358133673667908,
0.9932421445846558,
-0.47275084257125854,
-0.05730254575610161,
0.015444652177393436,
1.756922364234... |
def test _ cancel _ ride ( self, ride _ factory : factory, service : fixture ) - > none : cancellation _ reason : str = fake. sentence ( nb _ words = 3 ) ride : dict = ride _ factory. create ( service = service ) self. rides. visit ( ) self. rides. cancel _ ride ( cancellation _ reason, ride ) row : riderow = self. rid... | [
1.1659737825393677,
1.08952796459198,
0.1779111623764038,
0.43650394678115845,
-0.25077518820762634,
0.7875173091888428,
0.2732602655887604,
0.795227587223053,
-0.21593180298805237,
-0.08592579513788223,
0.27026045322418213,
-0.0505857989192009,
0.6930389404296875,
0.2913718819618225,
0.... |
def test _ underline ( self ) : self. assertequal ( text. assembleformattedtext ( a. underline ['hello, world.'] ),'\ x1b [ 4mhello, world.') | [
0.863399088382721,
-0.8440070748329163,
0.3274097740650177,
-0.3304019272327423,
0.15504863858222961,
0.3994693160057068,
-0.6188138723373413,
0.19237668812274933,
0.38282811641693115,
-0.8227807283401489,
-0.8869445323944092,
0.2130439132452011,
-0.6040683388710022,
-0.5161842703819275,
... |
def update ( self, validate = false ) : # check the resultset since eucalyptus ignores the volumeid param unfiltered _ rs = self. connection. get _ all _ volumes ( [ self. id ] ) rs = [ x for x in unfiltered _ rs if x. id = = self. id ] if len ( rs ) > 0 : self. _ update ( rs [ 0 ] ) # rs = self. connection. get _ all ... | [
-0.6632493138313293,
-1.0437365770339966,
0.6889872550964355,
0.29530221223831177,
0.21313214302062988,
-0.9732199311256409,
-0.8895971179008484,
-0.04191996529698372,
0.807574987411499,
-0.06577008962631226,
0.48732802271842957,
-0.38187408447265625,
-1.044148325920105,
0.4544180035591125... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.