text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def execute ( self, context ) : addon _ data = bpy. context. scene. maplus _ data maplus _ geom. set _ item _ coords ( addon _ data. easy _ axis _ rotate _ src, ('line _ start ','line _ end'), [ [ 0, 0, 0 ], [ 0, 0, 0 ] ], ) return {'finished'} | [
-0.5345186591148376,
-0.05248210206627846,
0.3626026511192322,
-0.31265532970428467,
0.7683217525482178,
-0.061489131301641464,
-0.5338176488876343,
-0.04440982639789581,
-0.24466952681541443,
-0.028780588880181313,
-0.8499165773391724,
0.27944597601890564,
-0.18242166936397552,
-0.3411354... |
def import _ shopify _ stock ( self, instance ) : stock _ inventory _ obj = self. env [ " stock. inventory " ] common _ log _ line _ obj = self. env [ " common. log. lines. ept " ] model = " shopify. product. product. ept " model _ id = common _ log _ line _ obj. get _ model _ id ( model ) log _ line _ array = [ ] inve... | [
-1.0178065299987793,
-0.1450587809085846,
0.660932719707489,
-0.09334768354892731,
0.9419543743133545,
0.3644035756587982,
0.6569005846977234,
-0.5469529628753662,
0.46902042627334595,
0.6221054196357727,
-1.1439486742019653,
0.028465578332543373,
0.16314905881881714,
0.45825663208961487,
... |
def create _ binary _ labels ( self, labels _ df ) : for idx, row in labels _ df. iterrows ( ) : labels _ df. at [ idx,'finding'] = int ( row [ [ * self. str _ labels ] ]. sum ( ) > 0 ) return labels _ df | [
-1.3316822052001953,
-0.062187425792217255,
0.4887751042842865,
-0.8295950889587402,
0.9744635820388794,
0.26637640595436096,
0.23161672055721283,
-0.6667288541793823,
-0.8674814105033875,
0.3095752000808716,
0.4486613869667053,
-0.04404030740261078,
-0.17293967306613922,
-0.47073963284492... |
def test _ atomic _ any _ uri _ length _ 3 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 4. xsd ", instance = " nistdata / atomic / any... | [
0.1603155881166458,
-0.13569402694702148,
0.4074576497077942,
0.6598287224769592,
-0.4156268537044525,
-0.11006597429513931,
0.03792045637965202,
-0.12602724134922028,
-0.48065128922462463,
0.010372159071266651,
-0.39599910378456116,
-0.5807761549949646,
-0.48250868916511536,
-0.0044421334... |
def download _ acs ( year : int = typer. option (..., help = " year of survey ( 2000 - 2019 ) ", ), state : str = typer. option (..., help = " one of the 50 us states or district of columbia " ), survey : str = typer. option ( " 1 - year ", help = " one of'1 - ','3 -'or'5 - year'" ), sample _ unit : str = typer. option... | [
0.12139537930488586,
-0.5724256634712219,
0.7863558530807495,
-0.5947237014770508,
-0.1372765600681305,
-0.15879419445991516,
0.4427691102027893,
-0.6651228070259094,
0.7885903120040894,
-0.38504379987716675,
0.6097328662872314,
0.5662596821784973,
0.43324318528175354,
-0.4408549964427948,... |
def test _ invalid _ message _ show ( self ) : with self. client as c : with c. session _ transaction ( ) as session : session [ curr _ user _ key ] = self. testuser. id response = c. get ( " / messages / 12345678 ", follow _ redirects = true ) self. assertequal ( response. status _ code, 404 ) | [
0.19836284220218658,
0.39941006898880005,
0.3806305527687073,
0.09573578834533691,
0.49457862973213196,
1.0106148719787598,
1.0136983394622803,
-0.3324357569217682,
0.31126493215560913,
-0.8859758973121643,
0.6303278207778931,
0.4761011600494385,
-0.37722837924957275,
0.3723083436489105,
... |
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att... | [
-0.34811073541641235,
-0.1911822408437729,
0.8675342202186584,
-0.7681518197059631,
-0.670648455619812,
-0.5909392833709717,
0.27139905095100403,
-0.2706073224544525,
0.057331204414367676,
-0.0680062398314476,
-0.5875020027160645,
0.23161444067955017,
0.09360967576503754,
0.790578544139862... |
async def trigger _ homelink ( self ) - > none : if self. homelink _ device _ count is none : raise homelinkerror ( f " no homelink devices added to { self. display _ name }. " ) if self. homelink _ nearby is not true : raise homelinkerror ( f " no homelink devices near { self. display _ name }. " ) lat, long = self. _... | [
-0.5476179122924805,
0.025399649515748024,
0.4364794194698334,
0.6699919104576111,
0.9950066804885864,
-0.5983094573020935,
0.5835533738136292,
0.03737695887684822,
0.13996930420398712,
-0.539471447467804,
-0.6279634237289429,
1.0041848421096802,
-0.7950962781906128,
-0.127285897731781,
... |
def subtask _ id ( self ) : return self. schedule _ id | [
1.5542057752609253,
-0.6583570837974548,
0.7150757312774658,
1.0226666927337646,
-0.44378724694252014,
1.222997784614563,
0.3227273225784302,
0.7644191384315491,
0.8434491157531738,
-0.3864859342575073,
-1.0245434045791626,
1.1356942653656006,
0.19613103568553925,
-0.6082196831703186,
-0... |
def _ continuous ( self, pattern _ dict ) : _ freq _ recurrence _ factor = pattern _ dict. get ('job _ interval ', 30 ) pattern _ dict ['freq _ interval'] = 30 if not isinstance ( _ freq _ recurrence _ factor, int ) else _ freq _ recurrence _ factor pattern _ dict ['freq _ type'] = 4096 self. _ pattern _ json ( pattern... | [
-0.18590396642684937,
0.33940908312797546,
0.6086097359657288,
-0.905616283416748,
0.4785747826099396,
0.09063181281089783,
0.8077342510223389,
0.5774263143539429,
-0.15790759027004242,
0.2371971309185028,
-0.03313027322292328,
0.08065809309482574,
0.2982117533683777,
-0.6293066740036011,
... |
def removefromqueue ( seriesid ) : login ( ) if not isregistered ( ) : return false response = makeapirequest2 ( " req = rpcapiuserqueue _ delete & group _ id = % s " % seriesid ) # fixme response should have meaning ; do something here? log. debug ( " remove response : % s " % response ) return true | [
-1.0782103538513184,
0.008737036027014256,
0.455024391412735,
-0.3212816119194031,
-0.6888870000839233,
-0.18812866508960724,
0.22122974693775177,
-0.7473704218864441,
1.0728603601455688,
0.21910953521728516,
-0.4828139841556549,
0.6052885055541992,
-1.5544689893722534,
0.02782189100980758... |
def checklocalgitstate ( self ) : if self. _ command in ('close ','create ','create - pr ','create _ pr ','lint ','lint - test ','lint _ test ','update') : if not self. _ git _ helper. checkhasprojectupstream ( ) : print ('{ 0 : s } aborted - missing project upstream. '. format ( self. _ command. title ( ) ) ) print ('... | [
0.1703696995973587,
-0.2701506018638611,
0.9652206301689148,
0.11494423449039459,
-0.024550285190343857,
1.0983794927597046,
-0.07027440518140793,
-0.4776928424835205,
-0.44774383306503296,
-0.12056931108236313,
0.38081875443458557,
0.35313212871551514,
-0.7969014644622803,
0.7035826444625... |
def main ( ) : parser = optionparser ( description ='simple http transparent proxy ', version = version ) parser. add _ option ('- h ','- - host ', default ='127. 0. 0. 1 ', help ='host to listen [ % default ]') parser. add _ option ('- p ','- - port ', type ='int ', default = 8800, help ='port to listen [ % default ]'... | [
0.19356244802474976,
-0.1894627809524536,
1.4279276132583618,
-0.0482642836868763,
0.22493599355220795,
0.6569130420684814,
0.22739651799201965,
0.3837307393550873,
-0.6524027585983276,
0.30755162239074707,
-0.12011142075061798,
0.2992572784423828,
-0.9928229451179504,
-0.5564078092575073,... |
def file ( self, i ) : raise filenotfounderror | [
-0.12769921123981476,
-0.577341616153717,
0.27228567004203796,
0.0008933352655731142,
0.5095406770706177,
0.9049103856086731,
1.2467628717422485,
0.02910868637263775,
-1.4303157329559326,
0.007985251024365425,
0.20830002427101135,
-0.6486021876335144,
0.37806281447410583,
-0.58478844165802... |
def is _ estimate ( self, numpy. ndarray [ dtype = numpy. float64 _ t, ndim = 1 ] y, numpy. ndarray [ dtype = numpy. float64 _ t, ndim = 2 ] z, numpy. ndarray [ dtype = numpy. int16 _ t, ndim = 1 ] index ) : cdef py _ ssize _ t d, i, j cdef float log _ proposal, log _ target, log _ det _ f, x _ f _ x, const, loop, w, m... | [
-0.3874063491821289,
0.005722293630242348,
0.9389564990997314,
0.2507545053958893,
-0.07943081110715866,
-0.09783729910850525,
0.5765529870986938,
-0.14344988763332367,
0.25884658098220825,
1.1648414134979248,
0.21988272666931152,
1.1146031618118286,
-0.3906971216201782,
0.4928233623504638... |
def take _ name ( line ) : t _ name = line. split ( ) [ 0 ]. rpartition ('=') [ - 1 ] [ 1 : - 3 ] return t _ name | [
-0.5015218257904053,
0.03954385593533516,
0.6662482023239136,
-0.48452022671699524,
0.055503975600004196,
-0.16586440801620483,
-0.22007638216018677,
-0.35539013147354126,
-0.7120211124420166,
1.4766863584518433,
-0.9462644457817078,
-0.5381134152412415,
-0.06298322975635529,
-1.1804057359... |
def update _ batch _ metadata ( tsca _ id, path _ to _ batch _ samples _ info, paths _ to _ batches _ info, namespace, workspace, google _ bucket _ id ) : # prepare all metadata for batch prepare _ all _ data _ for _ metadata _ export ( tsca _ id, path _ to _ batch _ samples _ info, paths _ to _ batches _ info, google ... | [
0.024779237806797028,
-0.41498005390167236,
0.433357834815979,
0.4962793290615082,
0.6920689344406128,
0.14183910191059113,
-0.45177415013313293,
-0.287561297416687,
-0.5964975953102112,
0.5858261585235596,
-0.5459184646606445,
0.9447187185287476,
0.7711556553840637,
0.3702317476272583,
... |
def test _ fail _ threshold _ too _ small ( self ) : self. assertfiltererrors ( {'threshold': - 1,'addresses': [ address ( self. trytes1 ) ], }, {'threshold': [ f. min. code _ too _ small ], }, ) | [
0.24853217601776123,
0.5870690941810608,
0.2335769534111023,
-0.3155435621738434,
-0.4264978766441345,
-0.2511407732963562,
-0.044222958385944366,
-0.5121722221374512,
-0.2416275590658188,
-0.35496729612350464,
-0.8734803199768066,
0.5930967926979065,
0.027759071439504623,
0.40276920795440... |
def get _ user ( self, user _ id = none ) : if not user _ id : user _ id = self. user _ id ( ) result = self. get _ api _ v1 ( " users / { } ". format ( user _ id ) ) return user ( result ) | [
-0.20469063520431519,
-0.052882544696331024,
0.07380049675703049,
1.0851283073425293,
1.017625331878662,
-0.5736420154571533,
-0.3783152103424072,
-0.12531468272209167,
0.5687286257743835,
-0.9535893797874451,
0.016531864181160927,
1.1616294384002686,
-0.4363228976726532,
0.473384439945220... |
async def test _ socks5 _ request _ failed _ to _ provide _ auth ( ) : network _ backend = httpcore. asyncmockbackend ( [ # v5 username / password b " \ x05 \ x02 ", ] ) async with httpcore. asyncsocksproxy ( proxy _ url = " socks5 : / / localhost : 8080 / ", network _ backend = network _ backend, ) as proxy : # sendin... | [
-0.8533017039299011,
0.8492194414138794,
0.339906245470047,
0.008645986206829548,
0.09988527745008469,
0.043197982013225555,
0.21546094119548798,
-0.42585405707359314,
-0.06459981203079224,
-0.3274605870246887,
0.16819335520267487,
0.30259591341018677,
-0.4630116820335388,
0.21551224589347... |
def teardown ( self ) : print ( " testcase00 : teardown _ : begin " ) # # do something... print ( " testcase00 : teardown _ : end " ) | [
0.8819313049316406,
-0.7707306146621704,
0.424770712852478,
0.44041237235069275,
0.6990498304367065,
0.8694020509719849,
1.784428596496582,
0.04451407119631767,
0.40661272406578064,
-0.20711492002010345,
0.23835980892181396,
1.160025715827942,
-0.793488085269928,
0.021412363275885582,
-0... |
def _ aliencollison ( self ) : for bolt in self. _ bolts : for i in range ( len ( self. _ aliens ) ) : if self. _ aliens [ i ] is not none : for j in range ( len ( self. _ aliens [ i ] ) ) : if self. _ aliens [ i ] [ j ] is not none : if self. _ aliens [ i ] [ j ]. collides ( bolt ) : self. _ bolts. remove ( bolt ) sel... | [
-0.1046893298625946,
-0.6710866093635559,
0.8932230472564697,
-0.5604610443115234,
0.7495785355567932,
-0.5060790181159973,
0.4820455312728882,
-0.5229714512825012,
-0.2607840597629547,
1.4362409114837646,
-0.06735125184059143,
-1.0013645887374878,
-0.6050565242767334,
0.4555727541446686,
... |
def _ _ str _ _ ( self ) : return self. text _ repr ( ) | [
-0.3004947006702423,
-1.2308430671691895,
0.41558200120925903,
-1.3044655323028564,
-0.8690142631530762,
0.3590964376926422,
-0.49660176038742065,
0.24100276827812195,
0.3439386785030365,
0.22697941958904266,
0.5461894273757935,
0.4083844721317291,
-0.3143513798713684,
-0.6452308893203735,... |
def api _ root ( request, format = none ) : if os. environ. get ('env') = ='production': return response ( {'product apis': " https : / / wiconet. herokuapp. com / product - api / ",'partner apis': " https : / / wiconet. herokuapp. com / partner - api / ",'company apis': " https : / / wiconet. herokuapp. com / company ... | [
-0.7965473532676697,
-0.5967094898223877,
0.9447376728057861,
0.3029361963272095,
0.12857156991958618,
-0.22468747198581696,
-0.6846103072166443,
0.29701560735702515,
0.1819188892841339,
0.2786414623260498,
0.1442151516675949,
0.44340479373931885,
-0.18620553612709045,
0.4030176103115082,
... |
def escrever ( self, * args, * * kwargs ) - > none : | [
0.2610737681388855,
0.4379194378852844,
0.32343482971191406,
0.3450903296470642,
0.4430491626262665,
-0.13791978359222412,
-0.5102106928825378,
0.5952089428901672,
-0.5722042918205261,
-0.2473592311143875,
-0.8433611989021301,
0.565578818321228,
-0.37360745668411255,
0.45927533507347107,
... |
def won ( self ) : return self. is _ ended ( ) and self. moves % 2 = = 1 | [
-1.2116912603378296,
0.16248776018619537,
0.6685801148414612,
1.3525207042694092,
0.31796446442604065,
-0.14888834953308105,
0.010968239046633244,
0.5655898451805115,
-0.42501842975616455,
-0.5319229364395142,
-0.6924221515655518,
0.044224463403224945,
-0.3757534921169281,
0.33535140752792... |
def numpyarrays64 ( * args, * * kwargs ) : return np. array ( * args, dtype = np. int64, * * kwargs ) | [
-0.05357762798666954,
-0.28931841254234314,
0.5593304634094238,
0.4210372567176819,
0.030488798394799232,
0.10781082510948181,
-0.5734214782714844,
-0.4742397964000702,
0.3702205717563629,
0.23487229645252228,
-0.6535911560058594,
0.6772083044052124,
-0.3309648036956787,
0.5846621990203857... |
def check _ consistency ( self ) : dps = self. dps # check that ps and ss dps are on the correct sides of the le ps = list ( range ( self. te _ dps [ 0 ], self. le _ dps [ 0 ] + 1 ) ) ss = list ( range ( self. le _ dps [ 1 ], self. te _ dps [ 1 ] + 1 ) ) for i in range ( self. ni ) : for j in ps : try : min _ width = s... | [
-0.6657631993293762,
-0.07990027964115143,
0.9111514687538147,
-0.9011427760124207,
0.56590336561203,
-0.025606120005249977,
-0.14116384088993073,
0.03218869864940643,
0.7467502951622009,
0.25937649607658386,
1.2308239936828613,
-0.6099737882614136,
-0.06983596086502075,
0.8183181881904602... |
def get _ section _ size ( self, index : int, _ type : section. sectiontype ) - > int : if _ type = = section. sectiontype. text : return self. textsections [ index ]. size elif _ type = = section. sectiontype. data : return self. datasections [ index ]. size | [
-0.5665395259857178,
0.34659358859062195,
0.6798717975616455,
-0.7408127188682556,
-0.027841081842780113,
-0.26953232288360596,
-0.13068829476833344,
-1.1649655103683472,
0.08020173013210297,
0.06670650839805603,
0.46668413281440735,
0.4151334762573242,
-0.09424540400505066,
0.592789649963... |
def finalize ( self ) : if not self. _ object : self. _ object = atomiccmd ( self. call, * * self. kwargs ) return self. _ object | [
-0.0349007323384285,
-0.28428590297698975,
0.5053297877311707,
-0.1788921058177948,
0.4794568121433258,
0.05750469118356705,
-0.09650800377130508,
-1.6935421228408813,
0.6416885256767273,
-1.2389236688613892,
0.5164868235588074,
0.203559011220932,
-0.786114513874054,
0.25010859966278076,
... |
def interp ( xp, xt, x ) : mn = x. shape if len ( mn ) = = 2 : m = mn [ 0 ] n = mn [ 1 ] elif len ( mn ) = = 1 : m = 1 n = mn [ 0 ] else : raise valueerror ( " x is greater than 2d " ) nn = len ( xp ) y = np. zeros ( ( m, nn ) ) for ( pi, p ) in enumerate ( xp ) : si = np. tile ( np. sinc ( xt - p ), ( m, 1 ) ) y [ :, ... | [
-0.31335121393203735,
0.12787216901779175,
0.6931970119476318,
-0.3623936176300049,
-0.2546136677265167,
0.4025242328643799,
-0.870635986328125,
0.49019092321395874,
0.17266954481601715,
0.5514793395996094,
0.03689301759004593,
-0.2728070914745331,
-0.5231767892837524,
-0.6476948857307434,... |
def getcounters ( self ) : pass | [
0.10214278846979141,
-0.7219367027282715,
0.23721030354499817,
0.5869203805923462,
0.7899778485298157,
0.3632597327232361,
0.3005135655403137,
-0.21097905933856964,
0.01091054081916809,
-1.3255722522735596,
-0.9350469708442688,
0.2630341649055481,
-0.8638498187065125,
0.7771426439285278,
... |
def prepare _ webpage _ data ( df, content _ key ) : prepped _ df = df. copy ( ) prepped _ df ['clean'] = prepped _ df [ content _ key ]. apply ( basic _ clean ) prepped _ df ['clean'] = prepped _ df ['clean']. apply ( tokenize ) prepped _ df ['clean'] = prepped _ df ['clean']. apply ( remove _ stopwords ) prepped _ df... | [
-0.6776574850082397,
0.32247158885002136,
0.5807302594184875,
-0.8775124549865723,
-0.502964198589325,
-0.00696693966165185,
-0.5759799480438232,
-0.16520601511001587,
-0.13482066988945007,
0.29999780654907227,
0.21182283759117126,
0.6215860843658447,
0.24907885491847992,
0.340770602226257... |
def create _ midi ( prediction _ output, filename ) : offset = 0 output _ notes = [ ] # create note and chord objects based on values generated by model for pattern in prediction _ output : # pattern is a chord if ( '.'in pattern ) or pattern. isdigit ( ) : notes _ in _ chord = pattern. split ( '.') notes = [ ] for cur... | [
0.08339843899011612,
-0.9745126366615295,
0.6960625052452087,
0.6955066919326782,
-0.5474885106086731,
1.0391525030136108,
1.1089589595794678,
-0.2603369951248169,
-0.5637428164482117,
0.06535398960113525,
-0.2919851839542389,
-0.2810877561569214,
-0.44715365767478943,
-0.14156511425971985... |
def create _ admin _ group ( ) : group = group. objects. create ( name ='administrators') # retriving permission that was specified in our user model meta class. perms = permission. objects. filter ( q ( content _ type _ _ app _ label ='profiles') | q ( content _ type _ _ model ='group') ) group. permissions. add ( * p... | [
1.0363211631774902,
0.7814395427703857,
0.1386966109275818,
0.08727355301380157,
-0.17963950335979462,
0.3254796862602234,
-0.7483720183372498,
-0.8790259957313538,
-0.3988115191459656,
0.2375240921974182,
0.8480981588363647,
0.7778598666191101,
-0.33385971188545227,
0.8492118120193481,
... |
def test _ evaluate _ alert _ true _ alert _ no _ alarm2 ( self, send _ alert ) : trigger = trigger. objects. get ( pk = 2 ) trigger. alert _ on _ out _ of _ alarm = true trigger. save ( ) # saving the trigger created a new alert with in _ alarm = false # so make another with in _ alarm = true old _ alert = trigger. cr... | [
0.13264097273349762,
-0.23644356429576874,
0.35076704621315,
0.4515106976032257,
0.4203129708766937,
0.6512331962585449,
-0.16060307621955872,
0.03779751434922218,
-0.5877277255058289,
0.06680130213499069,
-0.7714428305625916,
0.20197534561157227,
-0.8092489838600159,
0.22155825793743134,
... |
def tag _ remover ( doc : str ) - > str : return re. sub ( exclude _ regex,'', str ( doc ) ) | [
0.6263730525970459,
0.3020629584789276,
0.4338158965110779,
-0.6305402517318726,
-1.3627113103866577,
0.7673321962356567,
-0.13219666481018066,
1.106054663658142,
-0.5614756941795349,
0.2644840180873871,
-0.4052841365337372,
-0.26199546456336975,
-0.7778508067131042,
-0.4172854423522949,
... |
async def set _ sentry _ mode ( self, value : bool ) - > none : # if car is asleep, sentry is already off data = await self. _ send _ command ( " set _ sentry _ mode ", on = value, wake _ if _ asleep = value ) if data and data [ " response " ] [ " result " ] is true : params = { " sentry _ mode " : value } self. _ vehi... | [
-0.8465338349342346,
0.08170083910226822,
0.5994552373886108,
-0.11866270005702972,
0.49025624990463257,
0.644875705242157,
-0.5551126003265381,
-0.39672553539276123,
-0.1687614619731903,
1.0843374729156494,
-0.6682966947555542,
0.27875253558158875,
-0.7157818078994751,
0.17224059998989105... |
def test _ list _ decimal _ max _ length _ 4 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 5. xsd ", instance = " nistdata / list / ... | [
-0.40543103218078613,
-0.3042420744895935,
0.2774750292301178,
0.5148527026176453,
-0.5709324479103088,
-0.3509492874145508,
-0.2931225597858429,
-0.09924103319644928,
0.32212087512016296,
0.19233542680740356,
-1.4781014919281006,
-0.34785395860671997,
-0.01834809221327305,
0.6379256844520... |
def test _ get _ signup _ form1 ( self ) : pass | [
-0.9215564131736755,
0.2742837369441986,
0.4328533113002777,
1.2143746614456177,
0.2657431960105896,
0.36390653252601624,
1.340740442276001,
0.34381359815597534,
-0.25525718927383423,
-0.7241957187652588,
-0.3981383740901947,
-0.163267120718956,
-0.2514881193637848,
-0.9579558968544006,
... |
def msjse _ hlds _ bandwidths ( dsm _ hds, k _ h, n, n _ components, x _ lds, fit _ u = true ) : # computing the multi - scale hds similarities. element sigma _ ij [ i, j ] contains sigma _ { ij }. sigma _ { ii } is set to 0. element tau _ hi [ h, i ] contains tau _ { hi } = 2 / pi _ { hi }. sigma _ ij, tau _ hi = msjs... | [
0.15930020809173584,
-0.0581834502518177,
0.7296103239059448,
0.01369723305106163,
-0.31707796454429626,
-0.1424614042043686,
-0.7175710201263428,
0.49316221475601196,
-0.11453902721405029,
-0.005016223061829805,
-0.009035087190568447,
0.42621278762817383,
0.29345759749412537,
1.3952929973... |
def gameinit ( self ) : print ( " what type of game do you want to play? " ) temp ='' # opponent's choice while temp! ='1'and temp! ='2': temp = input ( "'1 '. player vs program \ n'2 '. program vs program \ n " ) if temp! ='1'and temp! ='2': print ( " \ nplease enter'1'or'2'" ) if temp = ='1': print ( " player vs prog... | [
-0.3366870880126953,
-0.053076643496751785,
1.0132689476013184,
-0.36535996198654175,
-0.32080692052841187,
0.7699723243713379,
0.23600351810455322,
-0.5820581316947937,
-0.2503302991390228,
0.4222007691860199,
0.10484239459037781,
0.8127371072769165,
-0.304298460483551,
0.6714738607406616... |
def compress _ submitted _ ballot ( ballot : submittedballot, plaintext _ ballot : plaintextballot, ballot _ nonce : elementmodq, ) - > compactsubmittedballot : return compactsubmittedballot ( compress _ plaintext _ ballot ( plaintext _ ballot ), ballot. timestamp, ballot _ nonce, ballot. code _ seed, ballot. code, bal... | [
0.990994393825531,
0.1044812798500061,
0.3583393394947052,
-0.3953184485435486,
-0.8000832200050354,
0.6737216114997864,
-0.9480881094932556,
-0.057697925716638565,
-0.29867249727249146,
-0.17242448031902313,
-0.2645147144794464,
1.1296977996826172,
-0.6809199452400208,
0.12836581468582153... |
def maketestfile ( ) : from prconfig. testfileobjects import testfiles from prconfig. testfiledb import test _ file _ db import os t = testfiles ( filenames = truefiles, myname = name ( ), qualifiers = myzip ( { " format " : format ( ), " datatype " : datatype ( ), " date " : datetime. datetime. now ( ). _ _ str _ _ ( ... | [
0.8770779967308044,
-0.4129277169704437,
0.6604781746864319,
0.20783096551895142,
-0.5022436380386353,
0.9864529967308044,
0.887584924697876,
-0.15746742486953735,
-0.47086191177368164,
-0.5738009810447693,
0.22128058969974518,
-0.3457827568054199,
-1.3936421871185303,
-0.6073004007339478,... |
def test _ atomic _ boolean _ pattern _ nistxml _ sv _ iv _ atomic _ boolean _ pattern _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / boolean / schema + instance / nistschema - sv - iv - atomic - boolean - pattern - 1. xsd ", instance = " nistdata / atomic / boolea... | [
-0.17758195102214813,
0.0014217001153156161,
0.5836156010627747,
0.8731205463409424,
0.09776255488395691,
0.7629316449165344,
0.07412497699260712,
0.1942811757326126,
0.2854785621166229,
1.1341197490692139,
-0.10780003666877747,
-0.14841796457767487,
-0.36018088459968567,
-0.54174983501434... |
def test _ atomic _ qname _ min _ length _ 3 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 4 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 4. xsd ", instance = " nistdata / atomic ... | [
0.5326106548309326,
-0.8860533237457275,
0.32695114612579346,
-0.3266924023628235,
-0.7248052954673767,
0.0009656071779318154,
-0.6276552081108093,
-0.8592959642410278,
0.2803739607334137,
0.039168402552604675,
-0.5437020659446716,
-0.20120804011821747,
-0.40450695157051086,
-0.30634793639... |
def delete ( self, value ) : current = self. head if ( current. value = = value ) : self. head = current. next self. length - = 1 while current. value! = value and current. next : if current. next. value = = value : current. next = current. next. next self. length - = 1 return else : current = current. next | [
0.37275680899620056,
0.3295251429080963,
0.7287637591362,
-0.13918818533420563,
-0.7378683090209961,
0.052263043820858,
1.168048620223999,
-0.007929472252726555,
1.6829302310943604,
0.42033809423446655,
-0.4063761234283447,
0.6220039129257202,
-1.7369564771652222,
0.8689951300621033,
-0.... |
def get _ value ( self ) : if self. smearer : res = pinhole2d ( data = self. data, index = self. index, nsigma = 3. 0, accuracy = self. accuracy, coords = self. coords ) val = self. model. evaldistribution ( res. q _ calc ) return res. apply ( val ) else : index = self. index if self. index is not none else slice ( non... | [
-0.3439714312553406,
-0.08696994930505753,
0.38268378376960754,
-0.16675351560115814,
-0.3430973291397095,
0.7517104148864746,
0.37684711813926697,
-0.4894838333129883,
0.8570820689201355,
-0.23016977310180664,
0.010042479261755943,
0.8671035766601562,
-0.2443307489156723,
-0.2461522221565... |
def add ( self, objects ) : if not objects : return self. eval _ js ('table. add _ ( { } ) ; '. format ( dumps ( objects ) ) ) | [
-1.261269211769104,
0.37564048171043396,
0.5216823816299438,
0.42177653312683105,
0.2614073157310486,
-0.3106788992881775,
0.08047885447740555,
-0.8126727342605591,
-0.3997015357017517,
0.6740946173667908,
-0.64375239610672,
-0.044205136597156525,
0.48100802302360535,
0.7767115235328674,
... |
def test _ invalid _ message _ delete ( self ) : with self. client as c : with c. session _ transaction ( ) as session : session [ curr _ user _ key ] = self. testuser. id response = c. post ( " / messages / 12345678 / delete ", follow _ redirects = true ) self. assertequal ( response. status _ code, 404 ) | [
0.6015083193778992,
0.14644786715507507,
0.5108638405799866,
0.5009341835975647,
0.9744800329208374,
0.851659893989563,
0.7079463005065918,
-0.0585380420088768,
0.6248205900192261,
-0.44817695021629333,
0.32543715834617615,
0.22633135318756104,
-1.0646989345550537,
0.23824115097522736,
0... |
def distance ( city1, city2 ) : " * * * your code here * * * " dis = sqrt ( ( ( get _ lat ( city1 ) ) - get _ lat ( city2 ) ) * * 2 + ( ( get _ lon ( city1 ) ) - get _ lon ( city2 ) ) * * 2 ) return dis | [
0.11166008561849594,
-1.3887296915054321,
0.34965652227401733,
0.19761641323566437,
-0.7819195985794067,
0.8055262565612793,
-0.2495265007019043,
0.7551988363265991,
-0.2412857562303543,
0.0958654135465622,
-0.8167421221733093,
0.2589696943759918,
-0.38214561343193054,
-0.295613557100296,
... |
def rgbn ( self ) : rgb = self. rgb return none if rgb is none else self. rgb / 255. | [
-0.16132743656635284,
0.23922882974147797,
0.4218674302101135,
0.5190334320068359,
0.3738607168197632,
-0.3239670991897583,
-0.3028533160686493,
-1.3514336347579956,
0.04135745391249657,
-0.8284434080123901,
-0.7073091268539429,
-0.004819174762815237,
-0.7460293173789978,
0.877702772617340... |
def backupdir ( path, dirname, bckdir, bckopt ) : timestamp = datetime. datetime. now ( ). strftime ( " % y % m % d - % h : % m " ) targetdir ='% s % s / % s'% ( bckdir, path, dirname ) newbckfile ='% s / % s _ % s _ full'% ( targetdir, dirname, timestamp ) oldestbckfile ='' info = os. lstat ('% s / % s'% ( path, dirna... | [
-0.1885446310043335,
-0.07130540162324905,
1.2324588298797607,
-0.0665183812379837,
-0.09250401705503464,
-1.3028478622436523,
1.6750574111938477,
0.12218242138624191,
0.2523331046104431,
-0.6860092878341675,
0.019049277529120445,
-0.15474051237106323,
-0.16567648947238922,
0.0100574521347... |
def print _ grid2 ( columns = 2, width = 1 ) : for i in range ( columns + 1 ) : main _ row _ str ='+'+ ('-'* width ) +'' next _ row _ str ='|'+ ('' * width ) +'' print ( ( main _ row _ str * columns ) +'+') if i < columns : for j in range ( width ) : print ( ( next _ row _ str * columns ) +'|') return | [
-0.17415280640125275,
0.3060692250728607,
0.9161683917045593,
0.46882522106170654,
-1.0481328964233398,
0.15747930109500885,
-0.4512391984462738,
-0.2448294460773468,
-1.0882413387298584,
-0.09327156841754913,
0.7173200249671936,
0.5155225992202759,
-0.37147772312164307,
0.6118397116661072... |
def project ( fromtable : arrable, columns : list ) : # columns = list ( args ) print ( " columns = ", columns ) result = [ ] for ( j, row ) in enumerate ( fromtable. get _ rows ( ) ) : new _ row = { col : row [ col ] for col in columns } result. append ( new _ row ) newarrable = arrable ( ). init _ from _ arrable ( co... | [
-0.3703823387622833,
0.2896718382835388,
0.6587426662445068,
1.3681557178497314,
-0.7310978174209595,
-0.7873560190200806,
-0.8652390241622925,
-0.06125790998339653,
-0.9997973442077637,
0.6120328307151794,
0.3798462450504303,
-0.49037444591522217,
0.23677434027194977,
-0.5832310318946838,... |
def test _ atomic _ any _ uri _ max _ length _ 2 _ nistxml _ sv _ iv _ atomic _ any _ uri _ max _ length _ 3 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - maxlength - 3. xsd ", instance = " nistdata... | [
0.3377079963684082,
-0.1263194978237152,
0.43734800815582275,
0.9456625580787659,
-0.16243156790733337,
0.11631454527378082,
-0.7526124119758606,
0.03398759290575981,
0.30822691321372986,
-0.05785483866930008,
0.15640263259410858,
-0.3084050714969635,
-0.2941541373729706,
-0.10307452827692... |
def updateheadermap ( self, row _ data, end _ index, header _ map ) : # find headers in sheet results = [ ] used _ index _ list = [ ] for header in header _ map : assert'row'in header or'regex'in header,'header map should contain " row " or " regex " field!'tmp = none for i in range ( end _ index ) : # search until end... | [
-1.1264299154281616,
-1.251295566558838,
0.9500951170921326,
0.36466825008392334,
-0.10157644748687744,
-0.36858323216438293,
-0.32257968187332153,
-0.2252073884010315,
-0.44500061869621277,
0.2725764214992523,
-0.03073018230497837,
0.1373240351676941,
-0.30788031220436096,
0.2015975117683... |
def update _ product _ images ( self, shopify _ template ) : if not shopify _ template. shopify _ image _ ids : return false shopify _ images = self. request _ for _ shopify _ product _ images ( shopify _ template ) position = 0 for image in shopify _ template. shopify _ image _ ids : position + = 1 if not image. shopi... | [
-1.623509168624878,
-0.5844471454620361,
0.8913685083389282,
-0.220604807138443,
0.21883289515972137,
0.07134530693292618,
0.33967161178588867,
-0.5126868486404419,
0.13693967461585999,
0.7646329402923584,
-1.6626299619674683,
0.054082777351140976,
-0.0647350549697876,
0.45592352747917175,... |
def test _ atomic _ qname _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ qname _ min _ length _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - minlength - 5. xsd ", instance = " nistdata / atomic ... | [
0.4134131968021393,
-0.47599783539772034,
0.36375367641448975,
-0.43614593148231506,
-0.6883723735809326,
0.16275787353515625,
-0.31302210688591003,
-1.221477746963501,
0.5921602845191956,
0.23549091815948486,
-0.6436755657196045,
-0.19745098054409027,
-0.773322343826294,
-0.29006469249725... |
def test _ list _ integer _ pattern _ 1 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 2 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 2. xsd ", instance = " nistdata / list / integer / sc... | [
-0.7108409404754639,
-0.554550051689148,
0.535257875919342,
0.7117315530776978,
-0.29141467809677124,
-0.23837372660636902,
-0.07229136675596237,
0.32934707403182983,
0.5242899060249329,
0.3694722354412079,
-0.8857561349868774,
-0.19863297045230865,
-0.3045807480812073,
0.8704639077186584,... |
def user ( self, username ) : rep = self. send ( f " user { username } " + crlf ) return rep | [
-0.5586376786231995,
0.4842192530632019,
0.20432551205158234,
-0.09473973512649536,
-0.2909148037433624,
-0.27872198820114136,
0.5139469504356384,
-0.7046207785606384,
0.17438840866088867,
-0.43829604983329773,
-0.5668482184410095,
0.30769169330596924,
-1.2600905895233154,
-0.8160795569419... |
def test _ atomic _ any _ uri _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ enumeration _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - enumeration - 5. xsd ", instance = " nistdata... | [
-0.7625773549079895,
-1.1640905141830444,
0.41181448101997375,
0.7494831085205078,
-0.627239465713501,
-0.4486791491508484,
0.23823392391204834,
-0.6768530011177063,
-0.44713371992111206,
0.21963907778263092,
-0.2415275126695633,
-0.2804025709629059,
-0.49134159088134766,
0.443730533123016... |
def plot _ noisy _ recon ( self, n _ examples = 20, mean = 0, var = 0. 1, save = false ) : test _ xs = mnist. test. images [ 0 : n _ examples ] xs _ noisy = np. clip ( test _ xs + np. random. normal ( mean, var, test _ xs. shape ), 0, 1 ) recon = self. predict ( xs _ noisy ) fig, axs = plt. subplots ( 2, n _ examples, ... | [
-0.25413602590560913,
0.6005004644393921,
0.569333553314209,
-0.22704090178012848,
-0.9773484468460083,
-0.09954120963811874,
0.40926891565322876,
0.5596616864204407,
0.16433198750019073,
0.5197076797485352,
-0.3838486075401306,
0.821994423866272,
-0.04646369814872742,
0.323686420917511,
... |
def crosssum ( self, vvset ) : if ( len ( self. set ) = = 0 ) : result = valuevectorset ( ) result. addall ( vvset. set ) return result if ( len ( vvset. set ) = = 0 ) : result = valuevectorset ( ) result. addall ( self. set ) return result newset = [ ] for i in range ( len ( self. set ) ) : for j in range ( len ( vvse... | [
-0.20644626021385193,
-0.05872789025306702,
0.8486003875732422,
0.3231876790523529,
-0.11998892575502396,
-0.6084074974060059,
-0.10495443642139435,
-0.8880072236061096,
1.3585337400436401,
0.555415153503418,
0.7804467082023621,
0.13510502874851227,
-0.8508862853050232,
-0.1605950444936752... |
def _ _ init _ _ ( self, filename ) : # - open fits file fx = pyfits. open ( filename ) # - load basic dimensions self. npix _ x = int ( fx [ 0 ]. header ['npix _ x'] ) self. npix _ y = int ( fx [ 0 ]. header ['npix _ y'] ) self. nspec = int ( fx [ 0 ]. header ['nspec'] ) self. nflux = int ( fx [ 0 ]. header ['nflux'] ... | [
-0.11364325881004333,
-0.38759690523147583,
0.6284515261650085,
-0.07710585743188858,
-0.3167480230331421,
-0.14924335479736328,
0.012670046649873257,
0.5393673777580261,
-0.8828211426734924,
-0.5074913501739502,
-0.11829608678817749,
0.30681127309799194,
-0.008954777382314205,
0.537716269... |
def _ is _ light _ red _ europe _ style ( self, lights _ list ) : ego _ vehicle _ location = self. _ vehicle _ location ego _ vehicle _ waypoint = self. get _ waypoint ( ego _ vehicle _ location ) if not ego _ vehicle _ waypoint : if not rospy. is _ shutdown ( ) : rospy. logwarn ( " could not get waypoint for ego vehic... | [
-1.0786962509155273,
-0.5972341299057007,
0.5813484787940979,
-0.1561800092458725,
-0.48539671301841736,
-0.09444408863782883,
-0.6805350184440613,
0.12669692933559418,
0.8060150146484375,
1.0796922445297241,
-0.7269667983055115,
-0.2306841015815735,
0.08237429708242416,
0.6724867224693298... |
def calculate ( * args ) : # the value " * args " is used when you are not sure the number of arguments that will pass through the function try : value = float ( feet. get ( ) ) meters. set ( ( 0. 3048 * value * 10000. 0 + 0. 5 ) / 10000. 0 ) except valueerror : pass | [
0.5969271659851074,
0.49811699986457825,
0.5731201171875,
0.5394623279571533,
0.8780996799468994,
-0.24177780747413635,
0.17013171315193176,
0.057912275195121765,
-0.6451640129089355,
-0.3337113857269287,
-0.21096283197402954,
-0.8847520351409912,
-1.003367304801941,
0.9591547846794128,
... |
def get _ divisors ( self, exercise, * numbers ) : for n, number in enumerate ( numbers [ : : - 1 ] ) : self. questions. append ( models. question ( exercise = exercise, type ='char ', position = n, group ='numbers ', char _ value = str ( number ) ) ) primes = list ( prime _ numbers ) lines = [ ] line = list ( numbers ... | [
-0.9560903310775757,
-0.06976553797721863,
0.8450304269790649,
0.22464662790298462,
0.06589040160179138,
0.1423172503709793,
0.8160003423690796,
-0.3328782021999359,
0.014787618070840836,
0.06831902265548706,
0.35464438796043396,
-0.7213800549507141,
-0.20217207074165344,
0.765986859798431... |
def writedataframes ( self, parsed _ dict ) : dataframes = { } for data in parsed _ dict : new _ dataframe = pd. dataframe ( parsed _ dict [ data ] ) dataframes [ data ] = new _ dataframe return dataframes | [
-1.0002716779708862,
-0.06232842057943344,
0.37658414244651794,
-0.8171904683113098,
0.6982405781745911,
-0.09804046154022217,
-0.046008285135030746,
0.5690796375274658,
-0.14210210740566254,
-1.1694101095199585,
-0.17260895669460297,
-0.44958290457725525,
-0.13071393966674805,
0.384400308... |
def extract _ data _ in _ mask ( imgs, mask ) : if type ( imgs ) is not list : imgs = [ imgs ] data = np. zeros ( [ mask. shape [ 0 ], mask. shape [ 1 ], mask. shape [ 2 ], len ( imgs ) ] ) for i in range ( len ( imgs ) ) : assert os. path. isfile ( imgs [ i ] ) img = nib. load ( imgs [ i ] ). get _ data ( ) img = img.... | [
-0.051325421780347824,
-0.36447280645370483,
0.7372360825538635,
0.9834141135215759,
-0.14308397471904755,
-0.5318149924278259,
-0.06026742234826088,
-0.14322225749492645,
-0.2525390684604645,
0.8220890760421753,
-0.20292222499847412,
-0.5024935007095337,
-0.3883163630962372,
0.13751792907... |
def liststatsbyaccessgroup ( ctx, # optional main parameter volumeaccessgroups = none, # optional main parameter includevirtualvolumes = none ) : " " " specified volume access group ( s ). " " " cli _ utils. establish _ connection ( ctx ) volumeaccessgroups = parser. parse _ array ( volumeaccessgroups ) ctx. logger. in... | [
0.4058898985385895,
-0.6463929414749146,
0.7082117795944214,
-0.2977294921875,
-0.11611627787351608,
-0.6442344784736633,
0.07746940851211548,
-0.8614885807037354,
0.44190725684165955,
0.4840756058692932,
0.8777130842208862,
1.1112390756607056,
-0.07941332459449768,
-0.061539746820926666,
... |
def get _ file _ exists ( self, repository, path, revision, base _ commit _ id, * args, * * kwargs ) : url = self. _ get _ file _ url ( repository, revision, base _ commit _ id, path ) try : self. _ api _ head ( url ) return true except ( httperror, urlerror ) as e : if e. code = = 404 : return false else : logging. wa... | [
-0.43836718797683716,
-0.11688232421875,
0.7615535259246826,
0.28738871216773987,
1.2016377449035645,
0.043244440108537674,
-1.226906657218933,
-0.051786135882139206,
-1.2360632419586182,
-0.05993524193763733,
0.5037270784378052,
0.3300741910934448,
-0.18529823422431946,
-0.456935077905654... |
def list _ instance _ keys ( self ) : return [ x [ " projectkey " ] for x in self. list _ instances ( ) ] | [
-1.2302322387695312,
0.5173565745353699,
0.19802412390708923,
0.030751364305615425,
-0.12032882124185562,
0.5214447379112244,
-0.9617863893508911,
0.4288090467453003,
-0.25073400139808655,
1.3734008073806763,
-0.793744683265686,
1.0523746013641357,
-0.816955029964447,
0.5557110905647278,
... |
def exception _ dates ( self, day _ list ) : pattern _ dict = dict ( ) pattern _ dict ['freq _ type'] = self. schedule _ freq _ type pattern _ dict ['exception _ dates'] = day _ list schedule _ pattern = schedulepattern ( self. _ pattern ) self. _ pattern = schedule _ pattern. create _ schedule _ pattern ( pattern _ di... | [
-0.9479541778564453,
1.2306102514266968,
0.39775145053863525,
0.12211763858795166,
0.020629864186048508,
0.3015775680541992,
0.331454873085022,
1.0210435390472412,
0.4661509692668915,
-0.5495607852935791,
-0.6779652833938599,
0.2839921712875366,
0.05160584673285484,
0.19417855143547058,
... |
def load _ fumehoods ( filename ='fumehoods. csv') : return pd. read _ csv ( filename ). set _ index ('hood _ id') | [
-0.6311635375022888,
0.43382227420806885,
0.08790788054466248,
0.14457225799560547,
0.1300169974565506,
-0.6011208891868591,
-0.164266437292099,
0.4189716577529907,
-0.26273027062416077,
-0.6467025279998779,
0.1278238743543625,
0.5431921482086182,
0.12751270830631256,
-0.41694745421409607,... |
def pytest _ addoption ( parser ) : parser. addoption ( " - - disable - logging ", action = " store _ true ", default = false, help = " disable all logging during test run " ) parser. addoption ( " - - error - log - only ", action = " store _ true ", default = false, help = " disable all logging output below'error'leve... | [
0.7425597310066223,
-0.12341869622468948,
0.7660903930664062,
0.7541327476501465,
1.119562029838562,
0.39775726199150085,
0.4168871343135834,
0.3106865882873535,
0.8203248381614685,
-0.17918239533901215,
-0.3668357729911804,
0.09493310749530792,
-0.020804323256015778,
0.4923534393310547,
... |
def main ( ) : narg = len ( sys. argv ) if ( narg < 2 or narg > 3 ) : usage ( ) else : file = sys. argv [ 1 ] indent = 4 if narg = = 2 else sys. argv [ 2 ] parser = make _ parser ( ) prettyprintingcontenthandler = prettyprintingcontenthandler ( indent ) parser. setcontenthandler ( prettyprintingcontenthandler ) parser.... | [
-0.04352765157818794,
-0.07646895200014114,
0.7844675779342651,
0.20655928552150726,
-0.37670084834098816,
0.3622010350227356,
0.30612021684646606,
0.695388913154602,
-1.0040584802627563,
-0.4585874676704407,
0.669025719165802,
0.23331031203269958,
-0.234452024102211,
-0.009608052670955658... |
def on _ pretrain _ routine _ start ( self, trainer : pl. trainer, pl _ module : pl. lightningmodule ) - > none : for metric in [ * self. train _ metrics, * self. val _ metrics ] : metric. to ( device = pl _ module. device ) # type : ignore pl _ module. non _ linear _ evaluator = sslevaluator ( n _ input = self. z _ di... | [
0.21258585155010223,
0.2816433608531952,
0.6068426966667175,
-0.042297545820474625,
0.12265363335609436,
0.7404513955116272,
0.8394298553466797,
0.08376754820346832,
-0.48974889516830444,
0.19787433743476868,
-0.704334557056427,
0.6938503980636597,
0.6371710300445557,
0.5429796576499939,
... |
async def toggle ( self, ctx : commands. context ) - > none : guild = ctx. message. guild if not await self. config. guild ( guild ). toggle ( ) : await self. config. guild ( guild ). toggle. set ( true ) await ctx. send ( _ ( " i will reply when i am mentioned. " ) ) else : await self. config. guild ( guild ). toggle.... | [
-0.2895932197570801,
0.9433999061584473,
0.9745330810546875,
-0.2829302251338959,
0.7994703054428101,
0.7424495816230774,
-0.18797753751277924,
0.5479310154914856,
0.551726758480072,
0.46831610798835754,
-0.229548841714859,
1.5763695240020752,
-1.4910072088241577,
0.7137905955314636,
-0.... |
def deactivate ( self ) : self. _ insayall = false self. _ sayallisinterrupted = false self. pointofreference = { } | [
0.03436170518398285,
-1.0630837678909302,
0.03349204361438751,
-0.5146477222442627,
0.10620355606079102,
-0.3675552010536194,
0.7174219489097595,
0.11326439678668976,
0.004177911672741175,
0.3370077311992645,
0.3244290053844452,
0.18659807741641998,
-0.5780351161956787,
-0.2299837172031402... |
def meshgrid _ vertices ( w, urange = [ 0, 1 ], vrange = [ 0, 1 ] ) : try : nu, nv = w except typeerror : nu = w nv = w g = np. mgrid [ urange [ 0 ] : urange [ 1 ] : complex ( nu ), vrange [ 0 ] : vrange [ 1 ] : complex ( nv ) ] v = np. vstack ( list ( map ( np. ravel, g ) ) ). t return np. ascontiguousarray ( v ) | [
-0.18241827189922333,
0.15604111552238464,
0.48780494928359985,
0.5021195411682129,
0.504009485244751,
0.0005931835039518774,
0.5136309266090393,
-0.09072529524564743,
0.5739412307739258,
0.5405465364456177,
0.026001060381531715,
0.7352308034896851,
-0.25475645065307617,
0.2943502068519592... |
def path _ generator ( self, relative _ path : str ) - > str : return path. join ( path. abspath ('' ), relative _ path ) | [
0.4124373197555542,
-0.3345388174057007,
0.6520991325378418,
0.2579079568386078,
-1.0375561714172363,
1.9016737937927246,
-0.1011836975812912,
0.13700713217258453,
-0.6535848379135132,
-0.5018443465232849,
1.000457525253296,
-0.8822659850120544,
0.28305965662002563,
-0.4161352217197418,
... |
def tune _ to _ ratio ( note _ head, ratio, quarter _ tones = false, ) : ratio = quicktions. fraction ( ratio ) log _ ratio = quicktions. fraction ( math. log10 ( ratio ) ) log _ 2 = quicktions. fraction ( 1200 / math. log10 ( 2 ) ) ji _ cents = quicktions. fraction ( log _ ratio * log _ 2 ) semitones = ji _ cents / 10... | [
0.35592159628868103,
-0.39310136437416077,
0.7095544934272766,
-0.8396186828613281,
0.015493911691009998,
-0.47443240880966187,
0.5287814736366272,
-0.7898440361022949,
0.019266635179519653,
0.020366832613945007,
0.16745896637439728,
-0.29579806327819824,
-0.35880202054977417,
-0.880422711... |
def _ _ wait _ for _ write ( self, raw _ socket : socket. socket, timeout : float ) - > none : self. _ _ logger. debug ( " waiting for socket to be writable " ) _, ready _ to _ write, _ = select ( [ ], [ raw _ socket ], [ ], timeout ) if raw _ socket not in ready _ to _ write : raise ircsocketexception ( " socket opera... | [
-1.258831262588501,
0.12776914238929749,
0.3434613049030304,
-1.1234400272369385,
-0.0514945387840271,
-0.32597285509109497,
0.036432500928640366,
-0.00778744975104928,
-0.4482232928276062,
0.4554794430732727,
0.28998667001724243,
0.6028933525085449,
-0.002207063836976886,
-0.3625949025154... |
def get _ bprop _ fn ( prim ) : out = bprop _ getters. get ( prim, none ) if out : return out ( prim ) return bprops. get ( prim, none ) | [
-0.771244466304779,
-0.23648421466350555,
0.4416252374649048,
0.45302101969718933,
0.04904763028025627,
-1.6949360370635986,
0.33156174421310425,
-0.43547526001930237,
-0.20720133185386658,
-0.9905447959899902,
0.25427359342575073,
0.9339919090270996,
-0.38221028447151184,
-0.8342165946960... |
def call ( command, args, errorclass = commanderror ) : retcode = subprocess. call ( _ get _ args ( command, args ) ) if retcode : raise errorclass ( command, retcode, args ) | [
-0.09973009675741196,
0.5771371126174927,
0.6026061177253723,
0.1968272179365158,
0.2804242670536041,
0.5786082148551941,
-1.3486559391021729,
-0.07902588695287704,
-0.3172917366027832,
0.3546083867549896,
0.6246153712272644,
0.5808524489402771,
-0.33187538385391235,
0.4526365399360657,
... |
def updatedbelement ( dbfname, submachine, element, * * kwargs ) : kw = { " elemname " : element } for k in [ " elemtype ", " cell ", " girder ", " symmetry ", " elemlength ", " elemposition ", " elemindex ", " elemgroups ", " virtual " ] : if k not in kwargs or kwargs [ k ] is none : continue kw [ k ] = kwargs. pop ( ... | [
-0.2137303203344345,
0.7394803166389465,
0.436038613319397,
0.4828971326351166,
-0.5239377617835999,
0.28374314308166504,
-0.27743086218833923,
0.1260092705488205,
0.0934147760272026,
0.18991412222385406,
-0.9928040504455566,
0.42637231945991516,
-0.8379618525505066,
0.9248005151748657,
... |
def map _ threshold ( stat _ img, mask _ img, threshold, height _ control ='fpr ', cluster _ threshold = 0 ) : # masking masker = niftimasker ( mask _ img = mask _ img ) stats = np. ravel ( masker. fit _ transform ( stat _ img ) ) n _ voxels = np. size ( stats ) # thresholding if height _ control = ='fpr': z _ th = nor... | [
0.2722777724266052,
-0.7253934144973755,
0.5634166598320007,
0.7134056091308594,
-0.27334946393966675,
-0.3147940933704376,
0.13498908281326294,
-0.4722175598144531,
0.38894009590148926,
0.0624426007270813,
0.5210155844688416,
-0.02031714655458927,
0.3909488916397095,
-0.3241938054561615,
... |
def remove _ tags ( exclude _ regex : str ) - > str2strt : exclude _ regex = re. compile ( str ( exclude _ regex ) ) def tag _ remover ( doc : str ) - > str : " " " removes matches to the given regular expression from a string. parameters - - - - - - - - - - doc : str a document given as a single string. returns - - - ... | [
0.43953821063041687,
0.0021103965118527412,
0.598359227180481,
-0.7420956492424011,
-1.0324240922927856,
-0.10009844601154327,
0.04214055836200714,
1.0122559070587158,
-0.17120049893856049,
0.3578077256679535,
0.02029447630047798,
0.30775633454322815,
-0.08185547590255737,
-1.1398025751113... |
def trim ( self, start, end, dryrun = false, delete _ original = false ) : error _ flag = false # correctly transform the user's start parameter into a format ffmpeg can accept. start _ time = self. _ format _ secs ( start ) for entry in self. files : print ('processing % s'% entry ) # get the duration of the file and ... | [
-0.3568556606769562,
0.0672144964337349,
0.9444854855537415,
0.5139391422271729,
0.13897188007831573,
0.013887344859540462,
0.17180222272872925,
-0.01079096831381321,
-0.9585438370704651,
0.4390188455581665,
0.13988237082958221,
0.4488949775695801,
-0.8389403223991394,
0.5695207118988037,
... |
def gui ( ) : # setup device connections labjack = labjackconnection ( ) relays = relays ( labjack ) electrometer = electrometercontrol ( ) hvamp = hvamp ( labjack ) humidity _ sensor = sensorhtm2500lf ( labjack ) # define basic labjack parameters labjack. set _ analog _ in _ resolution ( parameters. lj _ analog _ in _... | [
0.8181666135787964,
0.42655515670776367,
0.7738338708877563,
-0.0494387224316597,
-0.14117395877838135,
0.47656115889549255,
0.372246116399765,
-0.33917680382728577,
0.2765171527862549,
0.11758780479431152,
0.322031706571579,
-0.07526132464408875,
-1.250463843345642,
1.2709671258926392,
... |
def log _ callback ( cls, msg ) : logger. debug ( " callback received : % s ", msg ) | [
0.5381600856781006,
-0.26375043392181396,
0.5097385048866272,
-0.7747862339019775,
-0.11465363204479218,
-0.0765942633152008,
-0.17938879132270813,
0.7970247864723206,
0.7247670888900757,
-0.4814286530017853,
-0.4142771363258362,
0.35955822467803955,
0.031364697962999344,
0.952184081077575... |
def test _ create _ existent _ cve ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2021 - 0004 _ published. json') as json _ file : data = json. load ( json _ file ) res = requests. post ( f'{ env. awg _ base _ url } { cve _ url } / cve - 2021 - 0004 ', headers = utils. base _ headers,... | [
0.40616899728775024,
-0.787641167640686,
0.6125479340553284,
-0.25193777680397034,
1.2585679292678833,
1.0066885948181152,
-0.6253458261489868,
0.14341260492801666,
-0.5041932463645935,
0.4279303550720215,
-0.8600109219551086,
0.5746638178825378,
-0.046857453882694244,
0.1027040183544159,
... |
def _ update _ parameters ( self ) : self. n = len ( self. members ) self. mean = self. orig _ mean = stattool. calc _ mean ( self. members ) self. sd = self. orig _ sd = stattool. calc _ sd ( self. members, self. is _ population ) print ( " got % d samples, mean : %. 3f, sd : %. 3f " % ( self. n, self. mean, self. sd ... | [
-0.05814266949892044,
-0.5896028876304626,
0.16948892176151276,
-0.1739979088306427,
-0.3239191174507141,
0.20965340733528137,
0.6015592813491821,
-0.3381900191307068,
-0.9017371535301208,
0.5935531854629517,
0.181875541806221,
1.1521167755126953,
0.3451099097728729,
0.6618207693099976,
... |
def test _ example _ input _ one _ unchecked _ example _ checkbox ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. enti... | [
-0.35328152775764465,
0.3741728365421295,
0.5718870759010315,
0.6899287104606628,
1.1096301078796387,
0.5461650490760803,
0.5609736442565918,
0.8744121193885803,
0.4273918569087982,
-0.07017717510461807,
-0.46501415967941284,
-0.12294015288352966,
-0.07379573583602905,
0.14197111129760742,... |
def upload _ image ( ) : if " fileup " in request. files : fileup = request. files [ " fileup " ] # uploaded file ext = get _ ext ( fileup. filename ) if ext not in img _ exts : return jsonify ( { " error " : " invalid extension : " + str ( ext ) } ) newfilename = fileup. filename # rand _ string ( ) + ". " + ext newpa... | [
-1.3814281225204468,
-0.4206397235393524,
0.9257301092147827,
0.25990572571754456,
-0.651839554309845,
-0.21017202734947205,
0.02872103452682495,
-0.0726005956530571,
0.04930412024259567,
0.827855110168457,
0.159507155418396,
-0.008410822600126266,
-0.08371468633413315,
0.4484659433364868,... |
def get _ mask _ for _ loss ( output _ shape : tuple [ int, int ], valid _ lengths : mx. np. ndarray, ) - > mx. np. ndarray : label _ mask = mx. np. expand _ dims ( mx. np. ones ( output _ shape, ctx = valid _ lengths. ctx ), axis = - 1 ) # noinspection pyunresolvedreferences label _ mask = mx. npx. sequence _ mask ( l... | [
-0.8511387705802917,
-0.5031031370162964,
0.5878713726997375,
-0.4683467447757721,
-0.010209140367805958,
0.08326259255409241,
-0.17676550149917603,
-0.4970681071281433,
0.37084412574768066,
-0.054379358887672424,
0.7413043975830078,
0.7197566628456116,
0.47688236832618713,
-0.855844497680... |
def getlaplacian ( thresh ) : a, d = getadjacencyanddegreematrix ( thresh ) return d - a | [
1.1072087287902832,
-0.19268128275871277,
0.32721224427223206,
-1.3928042650222778,
-0.4218975007534027,
-0.08850359171628952,
0.6316412687301636,
-0.16048990190029144,
0.8132907748222351,
-0.62954181432724,
0.9973227977752686,
0.3429454565048218,
1.0463155508041382,
-0.700427770614624,
... |
def save ( self, * args, * * kwargs ) : if not self. steam _ url : self. steam _ url = self. generate _ unique _ steam _ url ( ) super ( author, self ). save ( * args, * * kwargs ) | [
-0.935816764831543,
0.5275997519493103,
0.40687745809555054,
0.6442041993141174,
0.947645902633667,
0.09680821001529694,
0.23229220509529114,
1.3464607000350952,
-0.41925108432769775,
0.053422313183546066,
-0.8557316660881042,
-0.09827962517738342,
0.2723563015460968,
0.7332032322883606,
... |
def format _ num ( num ) : try : inum = int ( num ) return locale. format ( " %. * f ", ( 0, inum ), true ) except ( valueerror, typeerror ) : return str ( num ) | [
0.2114075869321823,
-0.12084360420703888,
0.5241760015487671,
0.7307895421981812,
-0.3793526887893677,
0.11226679384708405,
0.12347185611724854,
-0.25647619366645813,
0.3709072768688202,
-0.2772189974784851,
1.7836779356002808,
-0.37876465916633606,
-0.46607309579849243,
0.1251323074102401... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.