text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def test _ ensure _ interface _ exist ( self ) : manufacturer = manufacturer. objects. create ( name = " cisco ", slug = " cisco " ) device _ role = devicerole. objects. create ( name = " switch ", slug = " switch " ) device _ type = devicetype. objects. create ( slug = " c2960 ", model = " c2960 ", manufacturer = manu... | [
-0.020655743777751923,
0.7169399857521057,
0.7057772278785706,
1.0830638408660889,
0.9067382216453552,
0.7491734623908997,
0.6959380507469177,
-0.21011146903038025,
-0.0486782044172287,
-0.8174526691436768,
-0.9358267784118652,
-0.651772677898407,
-0.4238414764404297,
0.9660589098930359,
... |
def on _ start ( self ) : self. client. post ( " / login ", { " username " : " lifebear ", " password " : " th850413 " } ) | [
0.16353143751621246,
-0.39087241888046265,
0.40121036767959595,
1.143003225326538,
0.6050488352775574,
0.7461985349655151,
-0.7250909805297852,
-0.1685681939125061,
0.3115188777446747,
-0.10477112978696823,
-1.273560881614685,
0.6491343975067139,
-0.3479171395301819,
0.16930611431598663,
... |
def extract _ image _ features ( get _ pano _ image _ fn, save _ pano _ features _ fn, panoids, feature _ extractor _ name, h _ stride, v _ stride, feature _ height, fov ) : # settings for " extracting " raw image features if feature _ extractor _ name = = " raw " : imsize = feature _ height # settings for extracting n... | [
-0.5964475870132446,
-0.4871934950351715,
0.7470238208770752,
1.0564237833023071,
-0.2528926432132721,
-0.4595322608947754,
0.34819653630256653,
-0.05196819826960564,
-0.2241397500038147,
-0.20222161710262299,
-1.0900931358337402,
-0.11124811321496964,
0.3292691111564636,
0.007246529683470... |
def simpsonerror ( func, b, a, h ) : xsi = 1 print ( " ƒ ( x ) : ", func ) f2 = sp. diff ( func, x, 4 ) print ( " ƒ⁴ : ", f2 ) diff _ 4 = lambdify ( x, f2 ) print ( " ƒ⁴ ( ", xsi, " ) = ", diff _ 4 ( xsi ) ) return ( math. pow ( h, 4 ) / 180 ) * ( b - a ) * diff _ 4 ( xsi ) | [
0.747102677822113,
0.0794219896197319,
0.42625874280929565,
-0.4005473554134369,
0.03578903526067734,
-0.21425586938858032,
0.2883921265602112,
0.3801268935203552,
0.19835221767425537,
-0.4430423080921173,
-0.17832940816879272,
0.8784496784210205,
-0.32943499088287354,
0.6172158122062683,
... |
def process _ lds _ ords ( self, original _ obj ) : for lds _ ord in original _ obj. get _ lds _ ord _ list ( ) : if lds _ ord : self. process _ lds _ ord ( lds _ ord ) | [
0.02457590028643608,
-0.6888406276702881,
0.47267019748687744,
-1.0330815315246582,
-1.2683731317520142,
0.41336366534233093,
-0.03947416692972183,
-0.16793161630630493,
0.5724265575408936,
0.3873402178287506,
-0.2543213963508606,
0.5107120871543884,
0.12464531511068344,
1.088389277458191,... |
def get _ std _ norm _ samples ( self, shape ) : return tf. random _ normal ( shape = shape ) | [
-0.09970778971910477,
-0.8021626472473145,
0.34354323148727417,
0.28027376532554626,
-0.9918971657752991,
0.7866560816764832,
0.18809692561626434,
0.09187039732933044,
-0.031866688281297684,
0.20452827215194702,
-0.585303783416748,
0.5882914662361145,
0.16996337473392487,
-0.22245113551616... |
def get _ max _ page _ number ( self ) : return int ( self. metadata [ " total _ pages " ] ) | [
0.2032955288887024,
-0.23969285190105438,
0.5372456908226013,
0.12125492841005325,
0.8779980540275574,
0.252803772687912,
-0.39576485753059387,
0.5898615717887878,
0.4109657108783722,
0.45861631631851196,
0.8469775319099426,
-0.19328869879245758,
0.3893454670906067,
-0.4701007008552551,
... |
def language _ model _ for ( nick ) : lines = readfromlogs. lines _ said _ by ( nick ) print ( " got lines " ) sentences = [ ] for line in lines : tokenized = nltk. word _ tokenize ( line ) justwords = list ( filter ( word _ or _ contraction, tokenized ) ) joined = merge _ contractions ( justwords ) sentences. append (... | [
0.5859825611114502,
0.026937957853078842,
0.528933584690094,
-0.2487093061208725,
0.07883480936288834,
-0.3576425611972809,
-0.47660180926322937,
-0.4086288809776306,
0.07978598773479462,
-0.022582149133086205,
-0.43801191449165344,
-1.2530879974365234,
-0.08458689600229263,
-0.04501486569... |
def get _ link _ quaternion _ function ( self, link : str, base _ link : str, n : int = 1, numpy _ output : bool = false, ) - > cs. function : return self. make _ function ( " quat ", link, self. get _ link _ quaternion, n = n, base _ link = base _ link, numpy _ output = numpy _ output, ) | [
-0.41041886806488037,
-0.5644627213478088,
0.26578953862190247,
-0.23012351989746094,
0.08309885114431381,
-1.503179907798767,
0.15777811408042908,
-1.0395451784133911,
-0.007963702082633972,
-1.1761387586593628,
-0.3386314809322357,
0.9250451922416687,
0.19741249084472656,
-1.440322875976... |
def about _ us ( ) : global username return template ( " about ", username = username ) | [
0.586996853351593,
-0.0698770135641098,
0.177142933011055,
0.7003718018531799,
-1.11460542678833,
0.2226804494857788,
0.7355791926383972,
1.3236712217330933,
-0.6718237996101379,
-0.19283558428287506,
-0.4534001648426056,
0.06790901720523834,
0.09507419914007187,
0.26284706592559814,
0.5... |
def beat _ pointdata ( ) : arduino = serial. serial ('/ dev / serial / by - id / usb - gravitech _ arduino _ nano _ 13bp1066 - if00 - port0 ', 115200 ) hb = eval ( arduino. readline ( ). strip ( ) ) st = time. strftime ( " % y - % m - % dt % h : % m : % s " ) data = [ { " sensorid " : 9, " timestamp " : st, " data " : ... | [
0.04531078413128853,
0.19431570172309875,
0.6649086475372314,
0.6209603548049927,
0.6279190182685852,
0.6840556859970093,
-0.44417890906333923,
-0.2527853548526764,
-0.7454917430877686,
0.4064389765262604,
-0.6986092329025269,
0.20752139389514923,
0.07641203701496124,
-0.36980926990509033,... |
def test _ atomic _ hex _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ hex _ binary _ min _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / hexbinary / schema + instance / nistschema - sv - iv - atomic - hexbinary - minlength - 5. xsd ", instance ... | [
0.1898389458656311,
-0.5051867961883545,
0.3437765836715698,
0.43430060148239136,
-0.5505914688110352,
-0.0397614911198616,
-0.43586835265159607,
-0.6496087908744812,
-0.2957712411880493,
0.21921882033348083,
-0.9017558097839355,
-0.34640395641326904,
-0.6107507944107056,
0.604980170726776... |
def current _ cover _ position ( self ) : set _ req = self. gateway. const. setreq return self. _ values. get ( set _ req. v _ dimmer ) | [
-0.6852934956550598,
-0.48651888966560364,
0.28651219606399536,
0.7129694223403931,
-0.5935987234115601,
0.25171342492103577,
0.7743536233901978,
-0.5668981075286865,
-0.23393648862838745,
0.030751323327422142,
0.09220544248819351,
-0.3341497480869293,
-0.5978301167488098,
0.49024447798728... |
def with _ analyzers ( self, analyzers ) : b = self. _ copy ( ) b. config ['analyzers'] = analyzers return b | [
-0.17532213032245636,
0.10448500514030457,
0.29957935214042664,
0.8251953125,
-0.45653235912323,
0.1693028211593628,
-0.32942891120910645,
-0.9740724563598633,
1.0166773796081543,
-0.719031035900116,
-0.3490816354751587,
0.0776606947183609,
-0.3623717725276947,
-0.3269064128398895,
-0.78... |
def run _ mapfost _ af ( self, * * kwargs ) - > str : if autofoc _ mapfost is none : return'ctrl : error during mapfost - could not import " mapfost " package.'# todo : add rotation parameter ( maybe also the measurement ) default _ kwargs = dict ( defocus _ arr = [ 8, 8, 6, 6, 4, 4, 2, 1 ] ) # todo : make adaptable ( ... | [
-0.07799267023801804,
-0.33539843559265137,
0.43504226207733154,
0.5788545608520508,
-0.0958186462521553,
-0.700977623462677,
0.5985956788063049,
-0.7596662044525146,
0.6088319420814514,
-0.21611803770065308,
0.4780774712562561,
0.5054542422294617,
0.205007866024971,
1.5072544813156128,
... |
async def _ get _ count _ rows ( self ) - > int : query = sql. select ( [ sql. func. count ( ). label ('count') ] ) \. select _ from ( self. _ table ) if self. _ filters : clause = self. _ get _ filters ( ) query = query. where ( sql. and _ ( * clause ) ) cursor : resultproxy = await self. _ conn. execute ( query ) res... | [
-0.10274985432624817,
1.2333950996398926,
0.5347585678100586,
0.2835114300251007,
0.35159820318222046,
-1.378099799156189,
0.051925238221883774,
0.6775949001312256,
-0.9123335480690002,
0.0877404734492302,
0.6860447525978088,
0.002767252502962947,
0.26298582553863525,
0.5643816590309143,
... |
def new ( * args, * * kargs ) : obj = itksubtractconstantfromimagefilterif3dif3. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj | [
0.9847553968429565,
0.5726211667060852,
0.4126420319080353,
-0.7626638412475586,
-0.6100991368293762,
0.36487552523612976,
0.4505543112754822,
0.4361002445220947,
0.30591222643852234,
0.26097169518470764,
-0.8118467330932617,
-0.5273280739784241,
0.09705380350351334,
-0.10621040314435959,
... |
def region ( self ) - > pulumi. output [ str ] : return pulumi. get ( self, " region " ) | [
0.9468267560005188,
-0.025528553873300552,
0.28688308596611023,
-0.15964031219482422,
-0.006151541136205196,
0.7859527468681335,
0.8453065156936646,
-0.055092234164476395,
0.4031781256198883,
-0.092949278652668,
0.861553430557251,
0.8822820782661438,
0.39196619391441345,
-1.013382315635681... |
def siret ( self, siret ) : self. _ siret = siret | [
-0.2051505446434021,
-0.05469634383916855,
0.06367801129817963,
-0.31874215602874756,
0.06561757624149323,
0.13664144277572632,
-0.267650842666626,
-0.3630256652832031,
-0.02412925846874714,
0.05607737600803375,
-1.6707195043563843,
-0.5408144593238831,
-0.10408685356378555,
-0.54411816596... |
def listen ( self ) : thread = thread ( target = self. listen _ thread, daemon = true ) thread. start ( ) | [
1.3204509019851685,
-0.9874756336212158,
0.2812539339065552,
-0.6612330079078674,
1.5786184072494507,
0.5521813035011292,
-0.13012675940990448,
1.4286179542541504,
-0.46158158779144287,
-0.9776181578636169,
0.15971559286117554,
0.9997612237930298,
-0.11550120264291763,
-0.02513570338487625... |
def editor _ ignore _ comments ( default _ text ) : edited _ text = editor. edit ( contents = default _ text ) lines = edited _ text. split ('\ n') return " \ n ". join ( [ line for line in lines if not line. startswith ( " # " ) ] ) | [
0.3499937355518341,
-0.792975902557373,
0.5429918766021729,
-0.2812027037143707,
0.22903329133987427,
0.3156719505786896,
0.07994110137224197,
-0.45841455459594727,
-0.3592478334903717,
0.2646087110042572,
-0.10048731416463852,
-0.6539957523345947,
-0.7838737368583679,
-0.15256428718566895... |
def new ( ) : data = data _ manager. get _ table _ from _ file ( ) data. append ( [ str ( len ( data ) + 1 ), request. form ['title'], request. form ['story'], request. form ['criteria'], request. form ['value'], request. form ['estimation'], request. form ['status'] ] ) data _ manager. write _ table _ to _ file ( data... | [
-0.3571917712688446,
-0.17996695637702942,
0.621326208114624,
0.06896485388278961,
0.23339541256427765,
0.472356379032135,
-0.7788029313087463,
0.840989351272583,
-1.715338110923767,
-0.741940438747406,
-0.20759926736354828,
0.16653485596179962,
0.8155903220176697,
0.8402757048606873,
-0... |
def remove _ noise ( text, stop ) : text = remove _ between _ square _ brackets ( text ) text = remove _ url ( text ) text = remove _ special _ characters ( text ) text = remove _ multiple _ spaces ( text ) text = re. sub ( " nbsp ", " ", text ) text = re. sub ( " amp ", " ", text ) text = re. sub ( "'", " ", text ) te... | [
-0.2968541085720062,
-0.31485915184020996,
0.6329286098480225,
-0.12501196563243866,
-1.1205389499664307,
-0.13824447989463806,
-0.6288431882858276,
-0.02144191786646843,
-0.08835162222385406,
0.5351572036743164,
-0.7269434928894043,
0.05106049031019211,
-0.912081241607666,
0.2345795631408... |
def _ _ getitem _ _ ( self, key ) : keys = self. keys ( ) try : index = keys. index ( key ) return self. values ( ) [ index ] except valueerror : raise keyerror ( ( " no field named { }. note that the data api only returns fields " " placed on your filemaker layout. " ). format ( key ) ) | [
-0.260284960269928,
0.5123432278633118,
0.19870716333389282,
-0.800553560256958,
-0.31604698300361633,
-0.19056253135204315,
-0.09956343472003937,
-0.5471308827400208,
-0.5923035144805908,
-1.0231895446777344,
0.6601184606552124,
-0.2790566384792328,
0.32438328862190247,
-0.540593266487121... |
def getbraillecaretcontext ( event ) : return braille. getcaretcontext ( event ) | [
1.2803783416748047,
-1.3309260606765747,
0.7047038078308105,
0.29137569665908813,
-0.21660387516021729,
0.08317382633686066,
0.14732910692691803,
-0.894852876663208,
0.5263757705688477,
0.2631034553050995,
-0.12008171528577805,
0.14442801475524902,
0.0022698938846588135,
-0.439657360315322... |
def scalar _ mul ( scalar, x, name = none ) : base _ dtype = dtypes. as _ dtype ( x. dtype ). base _ dtype scalar = ops. convert _ to _ tensor ( scalar, dtype = base _ dtype, name = " scalar " ) shape = scalar. get _ shape ( ) if shape. ndims = = 0 : if isinstance ( x, indexed _ slices. indexedslices ) : return indexed... | [
-0.104764424264431,
0.09136059880256653,
0.7042282223701477,
0.8496208190917969,
-1.2620278596878052,
-0.13111840188503265,
-0.03174775466322899,
-0.27948153018951416,
0.5817554593086243,
-0.09964299201965332,
0.10281269997358322,
0.6132209897041321,
0.8228259682655334,
-0.2340295314788818... |
def get _ dns ( self ) : dns = { " domain _ name " : none } show _ ip _ nameserver = self. _ send _ command ('show ip name - server') for l in show _ ip _ nameserver. splitlines ( ) : if " domain - name " in l : dns [ " domain _ name " ] = l. split ( ) [ - 1 ] continue return dns | [
-0.8266394138336182,
0.8838189244270325,
0.36310428380966187,
0.26925888657569885,
-0.5412698984146118,
-1.206099510192871,
-0.6173179745674133,
-0.7870233058929443,
0.11221174895763397,
-0.10595168173313141,
-1.4693323373794556,
0.6269437074661255,
0.42148926854133606,
0.21467742323875427... |
def _ _ sub _ _ ( self, rhs ) : try : if isinstance ( rhs, list ) : raise " cannot compare list to smtimeseries! " if isinstance ( rhs, numbers. real ) : ts1 = filestoragemanagersingleton. get ( self. _ id ) product = ts1 - rhs return smtimeseries ( product. times ( ), product. values ( ) ) else : ts1 = filestoragemana... | [
-0.6222344636917114,
-0.14485706388950348,
0.5352801084518433,
0.7470723986625671,
-0.9700985550880432,
0.27950775623321533,
-0.030615240335464478,
-0.5481802821159363,
1.0731278657913208,
0.5478425025939941,
-1.206028699874878,
0.6405553817749023,
-0.5836547017097473,
0.7951847314834595,
... |
def _ _ call _ _ ( self, doc ) : matches = self. matcher ( doc ) spans = [ ] # keep the spans for later so we can merge them afterwards for _, start, end in matches : # generate span representing the entity & set label entity = span ( doc, start, end, label = self. label ) spans. append ( entity ) # set custom attribut... | [
-0.6013758182525635,
-0.20187222957611084,
0.6850059628486633,
-0.39362072944641113,
-0.6316535472869873,
0.5817456841468811,
0.8215315341949463,
0.2687171399593353,
0.8767314553260803,
-0.2224861979484558,
0.20468181371688843,
-0.14190205931663513,
-0.08857274800539017,
0.1618715822696685... |
async def set _ default _ role ( self, ctx : commands. context, role : discord. role = 0 ) : # unset the default role ( set it to zero ) if role = = 0 : await ctx. bot. pool. execute ( serverssql. update _ default _ role, ctx. guild. id, role ) await ctx. send ( f " default role has been unset. " ) # role is higher in ... | [
-0.21038970351219177,
0.7708179354667664,
0.6060847640037537,
0.09487107396125793,
1.306885838508606,
0.14873135089874268,
-0.6131501197814941,
0.5781769752502441,
0.1975039392709732,
-0.151397243142128,
-0.15208159387111664,
0.5991008281707764,
-1.3204565048217773,
0.8846588134765625,
0... |
def setup ( self ) : # pylint : disable = invalid - name super ( testmailtemplatemixin, self ). setup ( ) text _ template = open ( path. join ( path. dirname ( _ _ file _ _ ), " templates ", " mail. txt " ) ). read ( ) html _ template = open ( path. join ( path. dirname ( _ _ file _ _ ), " templates ", " mail. html " )... | [
0.34344273805618286,
-0.028809616342186928,
0.7202878594398499,
-0.5449622273445129,
0.362398624420166,
0.4367055296897888,
0.24125497043132782,
0.45253896713256836,
-0.15977589786052704,
-0.08598092198371887,
-1.102737545967102,
-0.3681981861591339,
-0.31994640827178955,
0.030673786997795... |
def main ( ) : parser = argparse. argumentparser ( ) parser. add _ argument ('- - version ', action ='version ', version ='% ( prog ) s { } '. format ( _ _ version _ _ ) ) parser. add _ argument ( " - f ", " - - file ", type = str, required = false ) args = parser. parse _ args ( ) qapplication. setattribute ( qt. aa _... | [
0.6159694790840149,
-0.4629690945148468,
1.0354301929473877,
0.44614505767822266,
-0.9832542538642883,
0.634816586971283,
0.6843947172164917,
0.9558718204498291,
-0.42313069105148315,
-0.394236296415329,
0.6785144805908203,
0.06006484106183052,
0.2182081937789917,
0.8816509246826172,
-0.... |
def describebillresourcesummary ( self, request ) : try : params = request. _ serialize ( ) headers = request. headers body = self. call ( " describebillresourcesummary ", params, headers = headers ) response = json. loads ( body ) model = models. describebillresourcesummaryresponse ( ) model. _ deserialize ( response ... | [
-0.606971800327301,
1.1260533332824707,
0.5537786483764648,
-0.37930163741111755,
-0.543529212474823,
0.3171728849411011,
0.43723034858703613,
-0.48824143409729004,
-0.14987404644489288,
-0.014200336299836636,
-0.5855600833892822,
0.40094372630119324,
-0.3843878507614136,
0.925283133983612... |
def volume ( self, volume ) : q = urllib. parse. urlencode ( { " volume _ percent " : volume } ) url = " me / player / volume " self. put _ api _ v1 ( url, q ) | [
-1.0882275104522705,
-0.16689296066761017,
0.5384955406188965,
0.26169049739837646,
0.11958067864179611,
-0.05596030130982399,
-0.5286397933959961,
-0.2627418339252472,
0.31795695424079895,
0.012739031575620174,
-0.22059348225593567,
-0.04811258614063263,
-1.5457431077957153,
-0.5405151247... |
def _ resolve _ tasklet _ name ( self, name ) : if name = = " c _ tasklet " : return " rwdtsperf - c " if name = = " py _ tasklet " : return " rwdtsperftasklet " raise valueerror ( " incorrect tasklet _ type specified % s " % name ) | [
0.3488328456878662,
0.11923131346702576,
0.43395182490348816,
-1.0970710515975952,
-0.250985711812973,
0.8959342241287231,
0.2660406529903412,
-0.8540403246879578,
-0.24605512619018555,
0.5499101877212524,
0.7524124383926392,
-0.8592445850372314,
-0.30860891938209534,
0.6531022191047668,
... |
def cast ( * args ) : return _ itksubtractconstantfromimagefilterpython. itksubtractconstantfromimagefilterid2did2 _ cast ( * args ) | [
0.06396456807851791,
-1.454007625579834,
0.40086227655410767,
-0.8133507966995239,
-0.49498844146728516,
0.8315567374229431,
0.4800756573677063,
-0.4065404236316681,
-0.40820619463920593,
0.29819604754447937,
-0.4924400746822357,
0.9802634716033936,
0.2149684578180313,
-0.01000110246241092... |
def high _ differential ( self, n _ dim, deg, current _ page ) : # handle trivial case if self. hom [ current _ page - 1 ] [ n _ dim ] [ deg ]. dim = = 0 : return np. array ( [ ] ) # take last total complex entry of hom reps chains = self. hom _ reps [ current _ page - 1 ] [ n _ dim ] [ deg ] [ current _ page - 1 ] hom... | [
-0.45333245396614075,
-0.21964168548583984,
0.6781907081604004,
-0.05905402824282646,
0.6148134469985962,
0.16675573587417603,
0.4996621608734131,
-0.12840056419372559,
-0.7124364376068115,
-0.24448473751544952,
-0.37324798107147217,
0.5368778705596924,
0.15460234880447388,
0.4952609837055... |
def map _ labels _ to _ example _ indices ( label _ vectors ) : indices _ for _ label = ordereddict ( ( i, [ ] ) for i in range ( 15 ) ) for i, labels in enumerate ( label _ vectors ) : # record which disease classes ( 1 - 14 ) this example belongs to for j, label in enumerate ( labels ) : if label = = 1 : indices _ fo... | [
-1.4161075353622437,
-0.7318606376647949,
0.44333913922309875,
-0.9766144752502441,
-0.1378207802772522,
0.6100518107414246,
0.43210431933403015,
0.4096839129924774,
0.3065347671508789,
0.08799213171005249,
-0.2853119373321533,
0.3557951748371124,
0.6059117317199707,
-0.15498828887939453,
... |
def max _ epoch ( self, max _ epoch ) : self. _ max _ epoch = max _ epoch | [
0.0738074854016304,
-0.23657850921154022,
0.25043603777885437,
0.5782913565635681,
-0.4175788164138794,
1.1551742553710938,
-0.7149333357810974,
1.6755045652389526,
-1.0713824033737183,
-0.003509900765493512,
-1.2153034210205078,
-0.3889562487602234,
0.799513041973114,
0.23194698989391327,... |
def nco _ freq ( self ) : if self. module. device : self. _ settings. nco _ freq = self. module. device. sequencers [ self. sequencer _ number ]. get ( f " nco _ freq " ) return self. _ settings. nco _ freq | [
-0.05797813460230827,
0.5778151750564575,
0.30387863516807556,
0.695069432258606,
0.03525670990347862,
-0.4579125642776489,
0.7738154530525208,
-0.8966724872589111,
-0.007929437793791294,
0.04970284178853035,
-0.33446890115737915,
-0.48295801877975464,
-0.3490816652774811,
0.38729855418205... |
def logonstatus ( ) : site = urllib2. urlopen ( " https : / / acs. hin. no / logon " ) the _ page = site. read ( ) print getlogonstatus ( the _ page ) sys. exit ( ) | [
-0.007651637773960829,
-0.7347302436828613,
0.4330645501613617,
0.03335993364453316,
0.1788974106311798,
-0.19501124322414398,
-0.8310543894767761,
0.20866453647613525,
0.025371288880705833,
-0.25880420207977295,
-0.9260764122009277,
0.8343659043312073,
0.31588214635849,
-0.811544477939605... |
def standardize _ keyword ( token ) : return token. upper ( ) | [
0.685781717300415,
-0.37296736240386963,
0.20467129349708557,
0.35221269726753235,
-0.7284451723098755,
0.4293908178806305,
-1.352250337600708,
0.6892220973968506,
-0.3012450039386749,
1.1499543190002441,
-0.24165809154510498,
0.8360095024108887,
-0.09683594852685928,
0.26344412565231323,
... |
def catcosts ( ) : year = request. args. get ( " year ", " " ). zfill ( 2 ) month = request. args. get ( " month ", " " ). zfill ( 2 ) period = f " " " { year } { month } " " " # # print ( f " period : { period } " ) um _ period = " " if not period or period = = " 0000 " : um _ period = " extract ( year _ month from no... | [
-0.3485237658023834,
-0.14035780727863312,
0.9397736191749573,
0.08762170374393463,
-0.802881121635437,
-0.5169559121131897,
0.3776475787162781,
-0.5666921734809875,
-0.39448466897010803,
0.30937692523002625,
0.012001648545265198,
-0.3449550271034241,
0.3375416100025177,
0.5933458805084229... |
def sample _ momenta ( self, q ) : return np. random. standard _ normal ( np. shape ( q ) ) | [
-0.4549444615840912,
-0.8557010293006897,
0.4188835620880127,
-0.5986648201942444,
-1.4502992630004883,
0.8426511287689209,
-0.879409909248352,
-0.6336044073104858,
1.8291770219802856,
0.6777419447898865,
0.28000888228416443,
0.7613340020179749,
-0.41296514868736267,
0.7643353939056396,
... |
def gen _ bitstream ( self, input _ x, length ) : probability = input _ x * ( 1 - self. p _ e ) + self. p _ e * ( 1 - input _ x ) frac = fraction ( decimal ( str ( probability ) ) ) ratio = 16 / frac. denominator new _ num = int ( frac. numerator * ratio ) binary _ list = list ( bin ( new _ num ) [ 2 : ]. zfill ( 4 ) )... | [
-0.2902388572692871,
0.28136083483695984,
0.8887678980827332,
0.8170552849769592,
-0.08400348573923111,
0.21104733645915985,
-0.19816353917121887,
-0.20831894874572754,
-0.4102124273777008,
0.38984864950180054,
-1.1471296548843384,
0.08390724658966064,
-0.7980474233627319,
1.08161425590515... |
def _ add _ traced _ attr ( self, attr _ type, attr _ name, * * kwargs ) : # replace spaces in name not to cause maya - warnings attr _ name = attr _ name. replace ('','_') # check whether attribute already exists. if so ; return early! attr = " { }. { } ". format ( self. node, attr _ name ) if cmds. objexists ( attr )... | [
0.4193466603755951,
-0.03608439117670059,
0.6881241202354431,
-0.8040211200714111,
0.04930185154080391,
-0.6833999752998352,
0.35292568802833557,
-0.49193212389945984,
0.30574992299079895,
-0.00009208940900862217,
0.23104651272296906,
0.6552501916885376,
0.5232905149459839,
0.3487481772899... |
def astar ( maze, start, end ) : # create start and end node start _ node = node ( none, start ) start _ node. g = start _ node. h = start _ node. f = 0 end _ node = node ( none, end ) end _ node. g = end _ node. h = end _ node. f = 0 # initialize both open and closed list open _ list = [ ] closed _ list = set ( ) # < ... | [
-0.6464671492576599,
-0.10774940997362137,
0.9724795818328857,
0.23548737168312073,
-1.145552158355713,
0.09693624824285507,
0.9420033097267151,
0.596619725227356,
-0.5478979349136353,
0.5406902432441711,
-0.1400958150625229,
-0.3077954947948456,
-0.38726675510406494,
0.39457446336746216,
... |
def _ sparse _ dense _ truediv ( sp _ indices, sp _ values, sp _ shape, y, name = none ) : with ops. name _ scope ( name, " truediv ", [ sp _ indices, sp _ values, sp _ shape, y ] ) as name : sp _ values = ops. convert _ to _ tensor ( sp _ values, name = " sp _ values " ) y = ops. convert _ to _ tensor ( y, name = " y ... | [
0.05846451222896576,
0.1405564397573471,
0.6079509258270264,
0.3138790726661682,
-0.624642014503479,
-0.36819130182266235,
0.4646003246307373,
-0.14830850064754486,
0.035353437066078186,
0.815870463848114,
-0.004640946630388498,
0.264206200838089,
0.20972657203674316,
-0.5070502758026123,
... |
def test _ atomic _ any _ uri _ pattern _ 1 _ nistxml _ sv _ iv _ atomic _ any _ uri _ pattern _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - pattern - 2. xsd ", instance = " nistdata / atomic / ... | [
-0.36156848073005676,
-0.7721503973007202,
0.576266348361969,
1.278826355934143,
-0.2745175361633301,
-0.12153057008981705,
0.07775978744029999,
0.11625631153583527,
-0.5995863080024719,
-0.2635382115840912,
0.16194257140159607,
0.00746018486097455,
0.18880543112754822,
0.19692334532737732... |
def wp _ physical _ quantities ( self, rng ) : energy = 0 nhit = self. wp _ nhit _ spectrum ( rng ) charge = 0 x = 0 y = 0 z = 0 fmax = 0 fquad = 0 fpsd _ t1 = 0 fpsd _ t2 = 0 f2inch _ maxq = 0 return ( energy, nhit, charge, x, y, z, fmax, fquad, fpsd _ t1, fpsd _ t2, f2inch _ maxq, ) | [
-0.859743058681488,
-0.6470723748207092,
0.523963451385498,
-0.9365795254707336,
-0.47207704186439514,
-0.012202105484902859,
-0.2561669647693634,
-1.0428252220153809,
-0.6695309281349182,
-0.4175138771533966,
-0.44977280497550964,
-0.19649702310562134,
0.22910532355308533,
0.8030871152877... |
def update _ policy ( env, policy, v, discount _ factor ) : for state in range ( env. ns ) : # for a given state compute state - action value. action _ values = one _ step _ lookahead ( env, state, v, discount _ factor ) # choose the action which maximize the state - action value. policy [ state ] = np. argmax ( action... | [
-0.3555302917957306,
-0.2874680757522583,
0.3102840483188629,
0.15217474102973938,
0.597255289554596,
-0.048402708023786545,
-0.6318066716194153,
0.3509606122970581,
1.0966899394989014,
0.5176020860671997,
0.17388691008090973,
0.9643303751945496,
0.7873712778091431,
0.3062351644039154,
0... |
def read _ json ( file _ path ) : if not os. path. isfile ( file _ path ) or file _ path. split ( ". " ) [ - 1 ]! = " json " : return none try : with open ( file _ path, " r " ) as fp : logger. info ( " successfully read the json file : { } ". format ( file _ path ) ) return json. load ( fp ) except ioerror : logger. e... | [
0.03853776305913925,
-0.5666290521621704,
0.6991355419158936,
-0.15136250853538513,
-0.3329128921031952,
-0.039360083639621735,
0.05309553071856499,
-0.9061732888221741,
-0.13598327338695526,
0.5867186188697815,
0.6368897557258606,
0.24122175574302673,
-0.19597841799259186,
-0.503635406494... |
def generate _ dt ( dtstart, dtend ) : # convert to datetime64 to make calculations # easier start _ dt = np. datetime64 ( dtstart ) end _ dt = np. datetime64 ( dtend ) time _ diff = end _ dt - start _ dt print ('time diff ', time _ diff ) random _ time _ diff = random. uniform ( 0, time _ diff ) print ('random _ time ... | [
-0.5411708354949951,
0.47000476717948914,
0.9672462344169617,
-0.38787803053855896,
-0.575977623462677,
1.2637678384780884,
-0.23978424072265625,
-0.8407771587371826,
0.06602642685174942,
0.5758300423622131,
-0.12974880635738373,
-0.0965690165758133,
0.3535884618759155,
-0.3375175595283508... |
def asdict ( self ) : data = { } if self. name : data ['name'] = self. name if self. id : data ['id'] = self. id if self. id _ str : data ['id _ str'] = self. id _ str if self. screen _ name : data ['screen _ name'] = self. screen _ name if self. following : data ['following'] = self. following if self. followed _ by :... | [
-0.8859986066818237,
-1.0704526901245117,
0.5952139496803284,
-0.6515325903892517,
-1.1536767482757568,
0.7062739729881287,
-0.5846666097640991,
-1.2772420644760132,
0.4203445017337799,
-0.21224842965602875,
-0.9397626519203186,
0.34355297684669495,
0.026046384125947952,
1.0792139768600464... |
def balance ( self ) : print ( " balance : ", self. card. balance ) | [
0.6407313942909241,
-1.3218462467193604,
0.544837474822998,
-0.1004360243678093,
0.7965104579925537,
0.41166526079177856,
0.00995524600148201,
-0.25980237126350403,
0.4183114767074585,
-0.4105188846588135,
0.11559081077575684,
0.763296902179718,
-0.040940962731838226,
0.46519431471824646,
... |
def encode ( data, encodingtype ) : if type ( data ) is list : data =''. join ( data ) elif type ( data ) is not str : raise ( urlencodeerror ( " bad data type : % s. use string or list " % type ( data ) ) ) if encodingtype not in available _ types : raise ( urlencodeerror ( " bad encoding type. please refer to " " url... | [
-1.0375546216964722,
-0.14347228407859802,
0.43186137080192566,
1.1112297773361206,
-0.284918874502182,
0.5352607369422913,
-0.6381735801696777,
-0.1016002669930458,
0.518050491809845,
0.3081778883934021,
0.009269185364246368,
1.058598518371582,
-0.4576876163482666,
0.9447873830795288,
0... |
def clone _ by _ word ( self, words, target _ gid, clone _ executor, including _ disabled = false, including _ pinned = true ) : if isinstance ( words, ( str, unicode ) ) : words = [ words ] if target _ gid = = bot. remote. public _ token ( ) : target _ gid = public _ group _ id filter _ dict = { pair _ data. keyword :... | [
0.06545200198888779,
0.7575257420539856,
0.3897238075733185,
0.48102089762687683,
-1.0941038131713867,
0.28985360264778137,
-0.5282214283943176,
0.09585902094841003,
0.0757322683930397,
1.4167474508285522,
0.6241596341133118,
1.6151620149612427,
-1.1272592544555664,
0.19816724956035614,
... |
def to _ db ( self, val = none ) : if val is none : val = self. _ val return val | [
-0.9387204647064209,
0.6845552325248718,
0.48371124267578125,
-0.3101345896720886,
-0.26213690638542175,
0.04602360725402832,
-0.09658371657133102,
-0.8259095549583435,
0.5241681933403015,
0.11255273967981339,
-0.4850325882434845,
0.23788711428642273,
-0.7863659858703613,
0.509838163852691... |
def plot _ vlines ( self, igs = none, * * kwargs ) : if self. plot _ pipe is not none : send = self. plot _ pipe. send if igs is none : igs = range ( self. n _ gr ) for ig in igs : x = self. x _ values [ ig ] if len ( x ) : send ( ['ig ', ig ] ) send ( ['vline ', x [ - 1 ], kwargs ] ) send ( ['continue'] ) | [
-0.036432232707738876,
0.5030843019485474,
0.37489497661590576,
0.4501163363456726,
-0.07099542021751404,
-0.00826186127960682,
-0.23845092952251434,
-0.39979124069213867,
-0.3977876603603363,
0.1323568969964981,
0.06254228949546814,
1.011828899383545,
-0.8636108636856079,
0.02039294131100... |
def arcsin ( x ) : try : if x. val < - 1 or x. val > 1 : raise valueerror ('math domain error') return variable ( x. name, np. arcsin ( x. val ), { k : v / np. sqrt ( 1 - x. val * * 2 ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : if x < - 1 or x > 1 : raise valueerror ('math domain error') retu... | [
-0.131673663854599,
-0.05191412568092346,
0.5653892755508423,
-0.22831648588180542,
-1.8746531009674072,
0.7824881076812744,
-0.2617635130882263,
-1.0494776964187622,
0.2852630615234375,
-0.4529474079608917,
0.30034780502319336,
1.1639031171798706,
0.16084076464176178,
-0.31519293785095215... |
def gen _ fake _ player _ data ( ) : player = player ( player _ id = 116380, first = " raul ", last = " ibanez ", boxname = " ibanez ", rl = " r ", bats = " l ", ) return player | [
-0.6817842125892639,
-0.3495888411998749,
0.36476126313209534,
-0.16008061170578003,
0.1945846974849701,
0.7138638496398926,
-0.5000963807106018,
-0.4907127618789673,
-0.14323800802230835,
-0.3790748417377472,
-1.5578081607818604,
-0.1561041623353958,
-0.8018114566802979,
0.191802009940147... |
def to _ dict ( self ) : # type : ( ) - > dict [ str, object ] result = { } # type : dict for attr, _ in six. iteritems ( self. deserialized _ 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... | [
-0.8550395965576172,
-0.22694331407546997,
1.042946219444275,
-1.009812355041504,
-0.571128249168396,
-0.6303919553756714,
0.43556711077690125,
-0.6962941288948059,
0.36665666103363037,
-0.0425393283367157,
-0.6213132739067078,
-0.12489156424999237,
0.378558874130249,
0.8222927451133728,
... |
def test _ example _ input _ two _ add _ valid _ title ( 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 two " ) input _ page. entity2. exampl... | [
0.33352920413017273,
-0.1353280395269394,
0.6952437162399292,
0.2175694853067398,
-0.10921528935432434,
0.9432839155197144,
-1.0775349140167236,
-0.7813556790351868,
0.6370759010314941,
-0.024946965277194977,
-0.1814711093902588,
-0.19576849043369293,
0.07127664238214493,
-0.12779009342193... |
def get ( self, topic _ id : str ) - > none : assert self. user _ id is not none topic _ rights = topic _ fetchers. get _ topic _ rights ( topic _ id, strict = false ) if topic _ rights is none : raise self. invalidinputexception ('expected a valid topic id to be provided.') user _ actions _ info = user _ services. get... | [
-0.19901883602142334,
-0.20586441457271576,
0.22472022473812103,
0.2846686542034149,
-0.032181184738874435,
-0.344483345746994,
-0.019519411027431488,
-0.17802076041698456,
0.05270412564277649,
0.3699047863483429,
1.062374234199524,
1.0144996643066406,
0.37379419803619385,
0.16125582158565... |
def download _ image ( self, rom ) : image _ url = self. find _ url _ for _ rom ( rom ) if image _ url = = " " : raise providererror ( " we couldn't find an image for % s. if you find one you like, upload it to http : / / consolegrid. com, and next time ice runs it will be used " % rom. name ( ) ) ( path, headers ) = u... | [
-0.7358659505844116,
0.10607276111841202,
0.4557326138019562,
0.5219357013702393,
-0.09488723427057266,
-0.7040600776672363,
0.840917706489563,
-0.4268580377101898,
-0.050611767917871475,
0.060920920222997665,
0.2751178443431854,
-0.173160582780838,
-0.4702981114387512,
0.3254532814025879,... |
def send _ alert ( body ) : try : logger. debug ('preparing to send available slots data to the user provided mobile no.') client = client ( config _ dict ['account _ sid'], config _ dict ['token'] ) message = client. messages. create ( body = body, from _ = config _ dict ['sender _ no'], to = config _ dict ['receiver ... | [
-0.09678222239017487,
0.006189816631376743,
0.5558854937553406,
-0.671847939491272,
-0.2834547460079193,
0.5632320642471313,
0.2734993100166321,
-0.37728655338287354,
-0.4120590388774872,
0.5905963778495789,
-0.17019528150558472,
1.5876340866088867,
-0.04577668756246567,
0.5381335616111755... |
def extract ( record, seq _ type = " nucl ", ftype = [ ], qual = [ ], qvalue = [ ] ) : print ( " extract % s seq from record % s " % ( ", ". join ( qvalue ), record. id ) ) r = " " for feature in record. features : # check featrue. type if ftype : if feature. type in ftype : pass else : continue else : pass start = fea... | [
0.040696240961551666,
-0.866349995136261,
0.8063210248947144,
0.03312886506319046,
-0.8963669538497925,
-0.2606728672981262,
0.18781590461730957,
0.1737702190876007,
-0.2634700536727905,
0.5872108340263367,
-0.4243316650390625,
0.44911277294158936,
0.430907279253006,
0.5762002468109131,
... |
def log _ image ( self, name : str, image : union [ torch. tensor, np. ndarray ], dataformats : str = " chw ", ) - > none : # add scope prefixes name = self. log _ scope _ prefix ( name ) # log scalar optimizer _ steps = cast ( " _ buddyoptimizer ", self ). optimizer _ steps self. log _ writer. add _ image ( name, imag... | [
-0.1885349154472351,
0.3777064383029938,
0.47939765453338623,
-0.14885464310646057,
0.19898033142089844,
-0.4083915650844574,
-0.40598002076148987,
-0.14644810557365417,
0.05019405856728554,
-0.002465711208060384,
-0.9080058932304382,
1.470597267150879,
0.40099260210990906,
0.5508913397789... |
async def handle _ substitute _ command ( self, message : message ) : # if the command replied to a message, then use that to get the message to edit. if message. reference is not none : target = message. reference. resolved # otherwise, assume the most recent message within 5 messages. else : prev _ messages = message... | [
-0.03040628880262375,
0.1889680027961731,
0.7959492802619934,
-0.9023764729499817,
0.7815438508987427,
-1.0723459720611572,
0.28773051500320435,
0.11004918068647385,
0.005739561282098293,
-0.449840784072876,
0.6358155012130737,
0.7181947231292725,
-0.6487952470779419,
0.13555821776390076,
... |
def nextpermutation ( self, n ) : for i in range ( len ( n ) - 1, 0, - 1 ) : if n [ i - 1 ] < n [ i ] : sm = i for j in range ( i + 1, len ( n ) ) : if n [ j ] > n [ i - 1 ] and n [ j ] < n [ sm ] : sm = j n [ i - 1 ], n [ sm ] = n [ sm ], n [ i - 1 ] temp = [ k for k in n [ i : ] ] temp. sort ( ) for k in range ( len ... | [
-0.8959840536117554,
0.7906160354614258,
0.87774658203125,
0.2129608392715454,
-1.2382265329360962,
-0.2174207717180252,
0.8814927935600281,
-0.6789762377738953,
0.40021762251853943,
0.5030223727226257,
0.01685982011258602,
-0.40596896409988403,
-0.34497588872909546,
0.6984393000602722,
... |
def equal ( x, y, name = none ) : return gen _ math _ ops. equal ( x, y, name = name ) | [
-0.1556461602449417,
0.3257367014884949,
0.6467381715774536,
0.23633597791194916,
-0.708737850189209,
0.07034517824649811,
-0.5461915135383606,
-1.4157423973083496,
-0.917815089225769,
1.1319313049316406,
-0.8994174599647522,
0.4245609939098358,
0.6952711939811707,
-1.0675601959228516,
-... |
def test _ db _ metadata ( ) : return metadata ( _ get _ test _ db _ conn ( ) ) | [
0.30864959955215454,
0.0033718992490321398,
0.24329449236392975,
0.10612165927886963,
0.920738697052002,
-0.09994518756866455,
-0.37909436225891113,
-0.08814648538827896,
-0.746788740158081,
0.37375643849372864,
-0.36148130893707275,
0.41784512996673584,
-0.8330590724945068,
-0.54301095008... |
def draw _ top _ t ( x = 1, y = 1 ) : print ( " { } { } ; { } ". format ( csi, y, x ), end = " ", flush = true ) | [
-0.2588936388492584,
0.039883289486169815,
0.7095669507980347,
-0.9616162180900574,
-0.6303335428237915,
0.500092625617981,
-0.6219910979270935,
-0.6018113493919373,
-0.13769297301769257,
0.8659136891365051,
-0.11291293799877167,
0.7901630997657776,
0.09032903611660004,
-0.631764829158783,... |
async def _ get _ task _ result ( self ) - > any : self. _ task = self. _ loop. create _ task ( self. _ coro ) return await self. _ task | [
-0.588156521320343,
0.972502589225769,
0.38697922229766846,
-0.1427723914384842,
0.6143064498901367,
-0.3380584418773651,
-0.025872474536299706,
0.05267851799726486,
-1.5283399820327759,
-0.17351648211479187,
-0.857109785079956,
0.019218355417251587,
-0.2788120210170746,
-1.045338153839111... |
def draw _ function ( func, true _ values = none, bounds = none, label = none ) : # plt. clf ( ) ax = plt. subplot ( 111 ) if true _ values is not none : # plot train data distribution sns. distplot ( true _ values, ax = ax, hist = false, label = label ) [ line. set _ linestyle ( " - - " ) for line in ax. lines ] if bo... | [
0.485110342502594,
0.8525053858757019,
0.7681300640106201,
-0.7049064040184021,
-0.5574691891670227,
0.8145331144332886,
-0.3172948956489563,
0.4821033477783203,
0.4176563620567322,
-0.8781736493110657,
0.42423442006111145,
1.4530656337738037,
1.0237586498260498,
-0.09732713550329208,
-0... |
def allocate _ label ( self, dut ) : if self. _ terminated : return none return self. _ mim. allocate ( dut, self ) | [
-0.6230757236480713,
-0.4931156039237976,
0.6543015241622925,
0.0332002267241478,
-0.030699394643306732,
0.588219165802002,
-0.37392911314964294,
-1.2016079425811768,
1.4124187231063843,
0.5798928737640381,
0.15222075581550598,
1.1236064434051514,
-0.5484806895256042,
-1.4016047716140747,
... |
def get _ relative _ freqs ( type2freq ) : n = sum ( type2freq. values ( ) ) type2p = { t : s / n for t, s in type2freq. items ( ) } return type2p | [
-0.4077697694301605,
-0.1379057615995407,
0.7400779724121094,
-0.33388784527778625,
-0.5554880499839783,
0.22110134363174438,
0.8031509518623352,
-1.2374600172042847,
-0.4867688715457916,
0.7135433554649353,
-0.2347871959209442,
-0.49859878420829773,
-0.25647085905075073,
0.180606871843338... |
def handle ( self, * args, * * opts ) : status = {'undetermined': {'pos': 0,'neg': 0, } } for mlst in srst2. objects. filter ( ) : st ='undetermined'if mlst. is _ exact : st = mlst. st _ stripped if st not in status : status [ mlst. st _ stripped ] = {'pos': 0,'neg': 0, } s80f = tosnp. objects. filter ( sample = mlst. ... | [
-0.44229593873023987,
-0.3199880123138428,
0.4935441315174103,
-0.7034472227096558,
0.3743630349636078,
0.22768090665340424,
0.09902950376272202,
0.4099707007408142,
-0.22523093223571777,
-0.10072235763072968,
-0.16470414400100708,
-0.2058606594800949,
0.7309718132019043,
0.418188989162445... |
def add _ variable ( self, vname, ts, te, data ) : print ( " adding { 0 } at time : { 1! s }, { 2! s }. ". format ( vname, ts, te ) ) g = self. require _ group ('/ var /'+ vname ) d = g. get ('data') t = g. get ('time') new _ t _ size = d. shape [ 0 ] + 1 dslice = d. shape [ 1 : ] if ( data. shape! = dslice ) : form = ... | [
-0.46408411860466003,
0.24665339291095734,
0.5226801633834839,
-0.9958771467208862,
-0.01849128119647503,
-0.06581483781337738,
-0.24436448514461517,
-0.5229379534721375,
-0.5102730393409729,
0.6377646327018738,
-0.6397984623908997,
0.2338007092475891,
-0.44674211740493774,
-0.058886341750... |
def test _ list _ integer _ pattern _ 4 _ nistxml _ sv _ iv _ list _ integer _ pattern _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - pattern - 5. xsd ", instance = " nistdata / list / integer / sc... | [
-0.6093297004699707,
-0.3422294855117798,
0.3999490439891815,
0.2649345099925995,
-0.4887390434741974,
-0.33718112111091614,
0.36153465509414673,
0.07212521880865097,
0.6604902148246765,
0.8685285449028015,
-1.1731480360031128,
-0.4156845211982727,
-0.8401821851730347,
0.5692843794822693,
... |
def import _ messages ( lang, infile ) : data = dict ( get _ all _ messages _ from _ file ( infile ) ) for ( basepath, folders, files ) in os. walk ( '.') : def _ update _ lang _ file ( mtype ) : " " " create a langauge file for the given message type " " " messages = get _ messages ( basepath, mtype ) if not messages ... | [
-0.027603479102253914,
-0.7100253701210022,
0.9186923503875732,
-0.3800444006919861,
-0.30853691697120667,
0.49550822377204895,
0.6180725693702698,
-0.8692408800125122,
-0.6730294823646545,
0.3357327878475189,
-0.7184709906578064,
0.16489380598068237,
-0.1945272833108902,
0.863279879093170... |
def fit _ transform ( self, x, y = none ) : return self. fit ( x, y ). transform ( x, y ) | [
-0.4717918634414673,
-0.5684353709220886,
0.48772796988487244,
0.1239837110042572,
-0.24376699328422546,
-0.4894779622554779,
-1.3796659708023071,
-0.8603150844573975,
0.40590354800224304,
-0.778640866279602,
-0.9292775392532349,
1.0085369348526,
-0.04510927572846413,
-0.4535778760910034,
... |
def fitness ( individual, target ) : sum = reduce ( add, individual, 0 ) return abs ( target - sum ) | [
-0.25494033098220825,
0.029805507510900497,
0.36198973655700684,
1.2304785251617432,
0.2686910033226013,
0.34653496742248535,
0.0566958524286747,
0.3920539915561676,
-0.1864083856344223,
-0.33877426385879517,
0.08631961792707443,
0.5742915272712708,
-0.034592702984809875,
-1.05596375465393... |
def distance ( self, origins, destinations, mode = none, avoid = none ) : data = self. client. get _ data ( origins, destinations, mode, avoid ) if data : self. build ( data ) return self. manager | [
-1.019321084022522,
-0.20273245871067047,
0.5055829286575317,
-0.07490139454603195,
-0.31719154119491577,
0.6877282857894897,
-1.3928751945495605,
0.6823532581329346,
-0.12225678563117981,
-0.5821588635444641,
-0.13108251988887787,
0.18363916873931885,
-0.05816004052758217,
-0.663879215717... |
def getclusterid ( self, positions, cutoff, func ) : sz = np. shape ( positions ) pos3 = positions. reshape ( ( int ( sz [ 0 ] * sz [ 1 ] / 3 ), 3 ) ) bt = balltree ( pos3, metric ='euclidean') rng = radius _ neighbors _ graph ( bt, np. sqrt ( cutoff ) ) rng = squashrngcoocython ( rng, int ( sz [ 1 ] / 3 ) ) self. rng ... | [
-0.24889682233333588,
0.1143961101770401,
0.3128778636455536,
-0.4794309437274933,
0.08343645930290222,
0.24464015662670135,
0.5659281611442566,
-0.5711348652839661,
0.5839971303939819,
0.5459214448928833,
-0.2544088065624237,
-0.10304893553256989,
-0.6198073625564575,
-0.8990882039070129,... |
def verify _ endpoint _ resource ( self, endpointname, resources ) : for item in resources : with self. subtest ( item = item ) : new _ endpoint = endpointname + " / " + item cmd = baserestendpointtest. curl _ cmd6. format ( new _ endpoint ) try : handle = urlopen ( cmd ) except httperror as err : if not self. _ is _ a... | [
-0.1423957645893097,
-0.7551015019416809,
0.47742214798927307,
0.678982138633728,
0.6076121926307678,
0.45683553814888,
-0.454951673746109,
-0.30086851119995117,
-0.047449514269828796,
0.025241294875741005,
0.0082776490598917,
-0.29977765679359436,
-0.3966163396835327,
0.05667054280638695,... |
def remove _ punctuation ( text ) : return text. translate ( str. maketrans ('','', punct _ to _ remove ) ) | [
-0.3382529318332672,
-0.5438936948776245,
0.13256588578224182,
-0.19954045116901398,
-0.5739138722419739,
-0.3648439645767212,
0.16019512712955475,
1.7520135641098022,
0.382598340511322,
-0.0038055595941841602,
-0.7101901173591614,
-0.3546217381954193,
-0.6355838775634766,
-1.1724294424057... |
def get _ next _ non _ whitespace _ character ( input _ file ) : next _ char = get _ next _ character ( input _ file ) while next _ char. isspace ( ) : next _ char = get _ next _ character ( input _ file ) return next _ char | [
0.15474537014961243,
-0.4013950526714325,
0.3942359685897827,
-0.12111418694257736,
-0.6609299182891846,
0.8225426077842712,
0.6558225154876709,
0.2292487919330597,
-0.32022106647491455,
-0.9889934062957764,
0.2746303379535675,
0.9098144769668579,
-0.6119317412376404,
0.7186520099639893,
... |
def admin _ get _ user ( userpoolid = none, username = none ) : pass | [
-0.2589281499385834,
0.5192438960075378,
0.03701619803905487,
1.0699158906936646,
0.4002707898616791,
-0.33203256130218506,
0.6205583214759827,
-1.2377516031265259,
-0.098941870033741,
0.013468827120959759,
-0.4341667592525482,
2.285426139831543,
-0.9418776631355286,
-0.4046885073184967,
... |
def play _ against _ self _ randomly _ ( ) : board = np. zeros ( ( 2, 3, 3 ) ) player = 0 # return 0. 5 if tie, 1 if computer player won, 0 if we lost while true : if has _ won ( board, 0 ) : return 1, board if has _ won ( board, 1 ) : return 0, board if is _ board _ full ( board ) : return 0. 5, board # determine the ... | [
-0.7582777142524719,
0.05240767076611519,
0.7930477857589722,
0.27314192056655884,
-0.11948373168706894,
0.17742140591144562,
0.8688289523124695,
-0.6103956699371338,
0.3854875862598419,
0.45698055624961853,
-0.28191325068473816,
-0.017086060717701912,
-0.7387385368347168,
0.12553347647190... |
def validate _ code ( itf : int ) - > bool : code, chksum = split _ code ( itf ) return calculate _ check _ digit ( code ) = = chksum | [
-0.5320338010787964,
1.090720295906067,
0.511521577835083,
0.5131914019584656,
0.005769556388258934,
0.0033024055883288383,
0.7894724607467651,
-0.18500250577926636,
-0.08043421804904938,
-0.17249464988708496,
-0.10959041118621826,
-1.079116940498352,
-0.3245995044708252,
0.083511456847190... |
def test _ remove _ peaks _ around _ precursor _ without _ precursor _ mz ( spectrum _ in ) : spectrum _ in. metadata = { } with pytest. raises ( assertionerror ) as msg : _ = remove _ peaks _ around _ precursor _ mz ( spectrum _ in ) assert str ( msg. value ) = = " precursor mz absent. ", " expected different error me... | [
0.7633036971092224,
-0.25795668363571167,
0.23053158819675446,
0.2770084738731384,
-0.4912368357181549,
1.283561110496521,
0.8896564841270447,
1.2599929571151733,
0.3727804124355316,
0.015829013660550117,
-0.6343523859977722,
0.48175302147865295,
-1.108697772026062,
1.52751624584198,
0.5... |
def post ( self, request ) : form = addpartform ( request. post ) if form. is _ valid ( ) : damagepart. objects. create ( part = form. cleaned _ data ['part'] ) return redirect ('/ damages /') else : return render ( request, " part _ add. html. html ", {'form': form } ) | [
0.27651384472846985,
0.08183786273002625,
0.8478898406028748,
-0.1503225713968277,
0.7428449392318726,
1.1120253801345825,
-1.0382447242736816,
-0.276000052690506,
0.15133018791675568,
-1.1385542154312134,
0.5661658048629761,
-0.9022979736328125,
-0.6324693560600281,
0.21080808341503143,
... |
def get _ remote _ auth ( alias = none, environ = none ) : remote _ folder = get _ remote _ folder ( environ ) name ='remote _ auth'if alias is none else alias filename = os. path. join ( remote _ folder,'{ }. json '. format ( name ) ) if os. path. isfile ( filename ) : with open ( filename ) as data _ file : data = js... | [
-0.9014730453491211,
-0.8269476294517517,
0.8692184686660767,
-0.20959268510341644,
-0.7511877417564392,
0.715066134929657,
-0.7393335700035095,
0.563410758972168,
-0.6444311738014221,
0.955655038356781,
-1.049803376197815,
0.7294023633003235,
0.19107189774513245,
-0.3360046446323395,
1.... |
def mtr ( self, variable _ str ='e00200p ', negative _ finite _ diff = false, zero _ out _ calculated _ vars = false, calc _ all _ already _ called = false, wrt _ full _ compensation = true ) : # pylint : disable = too - many - arguments, too - many - statements # pylint : disable = too - many - locals, too - many - br... | [
0.3519303500652313,
-0.6068013906478882,
0.9277949333190918,
-0.4659944772720337,
-0.7693029046058655,
0.11507686972618103,
0.20711439847946167,
0.4120093286037445,
-0.17010821402072906,
0.4891737103462219,
0.3468100428581238,
-0.06453516334295273,
-0.3006114959716797,
0.5088904500007629,
... |
def closed ( self ) : return self. byte _ source. closed ( ) | [
-0.20402976870536804,
-0.03828167915344238,
0.4206426739692688,
-1.0152549743652344,
-0.6555354595184326,
0.6627105474472046,
-0.3871474266052246,
-0.21249070763587952,
0.26704680919647217,
-1.1200854778289795,
-1.04526948928833,
0.31691238284111023,
-1.1138505935668945,
0.4797550737857818... |
def run _ in _ graph _ and _ eager _ modes ( func = none, config = none, use _ gpu = true ) : def decorator ( f ) : " " " decorator for a method. " " " def decorated ( self, * args, * * kwargs ) : " " " run the decorated test method. " " " if not tf. executing _ eagerly ( ) : raise valueerror ('must be executing eagerl... | [
-0.36105456948280334,
0.0543365404009819,
0.7320552468299866,
-0.007657198701053858,
0.3618853986263275,
0.044462792575359344,
1.1193469762802124,
-0.429720938205719,
0.42506739497184753,
0.2748318016529083,
0.4869174063205719,
0.20822861790657043,
0.6557292938232422,
0.11748434603214264,
... |
def visual _ forward ( self, subj _ feats, pred _ feats, obj _ feats ) : subj _ feats = self. fc _ subject ( subj _ feats ) pred _ feats = self. fc _ predicate ( pred _ feats ) obj _ feats = self. fc _ object ( obj _ feats ) pred _ scores = self. pred _ classifier ( torch. cat ( ( subj _ feats, pred _ feats, obj _ feat... | [
0.5517063736915588,
0.013094652444124222,
0.6506392955780029,
0.014631086960434914,
-0.1621265411376953,
0.5435753464698792,
0.442409873008728,
0.49077120423316956,
-0.4694226086139679,
-0.9123933911323547,
0.024389294907450676,
1.3974337577819824,
1.2521289587020874,
0.11794727295637131,
... |
def recursive _ list ( self, engine _ path, path ) : secret _ list = self. list ( engine _ path, path ) for secret in secret _ list : new _ secret = self. vault. normalize ( path + " / " + secret ) yield new _ secret if secret. endswith ( " / " ) : recursive _ secrets = self. recursive _ list ( engine _ path, new _ sec... | [
-0.04237600415945053,
-0.04841509088873863,
0.5420582890510559,
0.9295445680618286,
0.16275851428508759,
-0.2620541453361511,
-0.8590378165245056,
-0.21628105640411377,
-0.026038940995931625,
0.17086195945739746,
-0.5967626571655273,
-0.17086243629455566,
0.15027563273906708,
0.94069045782... |
def revoke _ token ( self, token, token _ type _ hint, request, * args, * * kwargs ) : raise notimplementederror ('subclasses must implement this method.') | [
0.35825058817863464,
-0.4294423460960388,
0.6687628030776978,
0.2380072921514511,
0.47138670086860657,
0.04081335663795471,
-0.14991162717342377,
0.46281805634498596,
-0.07148497551679611,
-0.5126379132270813,
-0.2490273267030716,
0.5268682241439819,
0.04024122282862663,
-0.639599382877349... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.