text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def get _ labels ( self ) : raise notimplementederror ( ) | [
-0.8620126247406006,
-0.5854068398475647,
0.4062725603580475,
0.5119527578353882,
0.5031130313873291,
1.005350112915039,
-0.33830153942108154,
-0.5374916195869446,
0.04205108433961868,
-0.14095506072044373,
-0.5187523365020752,
-0.04305156320333481,
0.07276514172554016,
0.5691254734992981,... |
def test _ null _ converter _ init ( null _ converter, caplog ) : nulldistanceconverter. _ _ init _ _ ( null _ converter, d _ min = 10 ) assert " kwargs {'d _ min': 10 } will be ignored " in caplog. text | [
-0.19340801239013672,
-0.4348307251930237,
0.4319397807121277,
-0.2370690107345581,
-0.40203970670700073,
0.18147942423820496,
-0.8223071098327637,
-0.1892411708831787,
0.7079036831855774,
-0.8779398798942566,
-1.1741198301315308,
-0.324189692735672,
0.5113879442214966,
1.2025482654571533,... |
def groupby _ status ( checks ) : return groupby ( checks, lambda x : x. get ('status ', none ) ) | [
0.24540306627750397,
-0.15644745528697968,
0.13915319740772247,
0.3573448657989502,
-0.026432262733578682,
0.2866162359714508,
-0.2920234799385071,
0.3920774757862091,
-0.30309218168258667,
-0.09829888492822647,
0.8979833722114563,
0.0453544557094574,
-0.4131940007209778,
0.208039715886116... |
def rename _ attribute ( self, attribute : str, new _ name : str ) - > none : for key _ node, _ in self. yaml _ node. value : if key _ node. value = = attribute : key _ node. value = new _ name break | [
-0.38220494985580444,
-1.2934150695800781,
0.36608126759529114,
-0.6707349419593811,
-0.6489039063453674,
-0.561728835105896,
-0.2445949763059616,
0.9578548669815063,
-0.662326991558075,
1.4082735776901245,
0.11560894548892975,
1.4745076894760132,
1.3862404823303223,
0.3196484446525574,
... |
def train _ word2vec ( self ) : embedding = word2vec ( vector _ size = self. train _ params [ " size " ], alpha = self. train _ params [ " alpha " ], window = self. train _ params [ " window " ], min _ count = self. train _ params [ " min _ count " ], max _ vocab _ size = self. train _ params [ " max _ vocab _ size " ]... | [
0.2499513179063797,
-0.44114869832992554,
0.8163647055625916,
0.0037288146559149027,
-0.01455739140510559,
0.011919013224542141,
0.5836089849472046,
0.2306358367204666,
-0.6368538737297058,
-0.05174547806382179,
-0.06818240135908127,
1.1051602363586426,
-0.174516499042511,
1.17280268669128... |
def test _ sample ( self, scipy _ mock ) : # setup class scipywrappersubclass ( scipywrapper ) : model _ class ='mock _ model'probability _ density = none cumulative _ distribution = none percent _ point = none sample ='sample'model _ instance _ mock = magicmock ( spec = ['sample'] ) model _ instance _ mock. sample. re... | [
-0.5213650465011597,
0.2375829666852951,
0.6176192164421082,
-0.174829363822937,
0.050353143364191055,
0.9609120488166809,
-0.180824413895607,
-0.4042021632194519,
0.5274298191070557,
-0.6251962780952454,
0.12920540571212769,
0.1042700931429863,
-0.9737229943275452,
0.35005611181259155,
... |
def forward ( self, a _ pred, label ) : # a _ pred, a _ gt, mask ) : a _ gt = label [ :, - 2 : - 1, :, : ] mask = label [ :, - 1 :, :, : ] dis = mask * ( a _ pred - a _ gt ) # dis is every loss = torch. sqrt ( torch. pow ( dis, 2 ). sum ( ) + torch. pow ( self. eps, 2 ) ) return loss | [
0.041947636753320694,
-0.30066531896591187,
0.5091366767883301,
-0.41594964265823364,
-0.7427639365196228,
0.7611504793167114,
0.3186347782611847,
0.32000380754470825,
-0.1745666116476059,
0.1266464740037918,
0.7382208704948425,
0.44081681966781616,
1.1414748430252075,
-0.3545878827571869,... |
def execute ( self, weight ) : # fill tree if write _ to _ tree flag is set if self. store. get ('write _ to _ tree ', false ) : if self. _ n _ events _ tree = = 0 : self. initialize _ branches ( ) else : self. update _ branches ( ) self. tree. fill ( ) self. _ n _ events _ tree + = 1 else : pass self. _ n _ events + =... | [
-0.3286244571208954,
0.745574414730072,
0.8330130577087402,
0.3925275206565857,
0.5697575211524963,
-0.3337635099887848,
0.4121868312358856,
-0.4010111391544342,
0.20723430812358856,
0.4653971195220947,
0.5220872759819031,
-0.8123957514762878,
-0.8209388852119446,
0.852990448474884,
0.01... |
def get _ university _ logo ( sess, university _ name : str ) - > str ( ) : university _ logo _ base _ link ='https : / / www. google. com / search? q = university + % s + logo + wikipedia & sclient = img & tbm = isch'uni _ logo _ page = sess. get ( university _ logo _ base _ link % university _ name ) soup = beautiful... | [
-1.055782437324524,
0.20127920806407928,
0.5302183032035828,
-0.281424343585968,
-0.8546526432037354,
-0.3572753965854645,
-0.0012967705260962248,
1.4557584524154663,
0.8964426517486572,
0.4029681086540222,
-0.4547528028488159,
0.4448873698711395,
0.48991361260414124,
-0.10767295211553574,... |
def print _ current _ products ( list _ of _ rows ) : print ( " * * * * * * * the current products are : * * * * * * * " ) for prods in list _ of _ rows : print ( prods. product _ name + ", $ " + prods. product _ price ) print ( " * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * " )... | [
-0.12465491890907288,
-1.3319097757339478,
0.7565335035324097,
0.4338936507701874,
0.24566945433616638,
0.535991907119751,
0.11168819665908813,
-0.24784913659095764,
0.05762866511940956,
0.6551927924156189,
0.14745734632015228,
1.0423483848571777,
0.3456643223762512,
1.0410023927688599,
... |
def test _ sortfun ( self ) : f ='f'sigf ='sigf'data = self. as. sortfun _ stdin _ template. format ( f = f, sigf = sigf ) reference _ data = " " " title * * spmi packing h k l f for crystal * * sortfun resol 100. 2. 5 labi fp = f sigfp = sigf " " " self. assertequal ( data, reference _ data ) | [
0.7412156462669373,
-0.4593498408794403,
0.2755759060382843,
0.5419132113456726,
0.36852559447288513,
0.4991062879562378,
0.38050100207328796,
-0.5707272291183472,
-0.4317912757396698,
-0.6225582957267761,
-0.15063825249671936,
0.03955334797501564,
-0.4220188856124878,
-0.02434498816728592... |
def circumference ( self ) : side _ wall _ inches = self. _ side _ wall _ inches ( ) total _ diameter = side _ wall _ inches * 2 + self. diameter return ( round ( total _ diameter * math. pi, 1 ) ) | [
0.40230923891067505,
0.19536972045898438,
0.6375584006309509,
-0.5630070567131042,
0.14105381071567535,
-0.09070110321044922,
1.342180609703064,
-0.31261998414993286,
0.09370561689138412,
0.4881243407726288,
0.046212345361709595,
-0.11033958196640015,
-0.5460432171821594,
0.227746933698654... |
def delete ( self, subject _ id ) : self. curr. execute ( " " " delete from subjects where subject _ id = { } " " ". format ( subject _ id ) ) self. conn. commit ( ) self. curr. close ( ) | [
0.9587743878364563,
-0.3053913414478302,
0.3657068610191345,
-0.21909750998020172,
-0.29123836755752563,
0.012714878655970097,
-0.04237141087651253,
0.012889848090708256,
-0.1564996987581253,
0.15425950288772583,
0.34339356422424316,
0.7744253277778625,
-0.32516390085220337,
0.399739176034... |
def define ( cls, spec ) : # yapf : disable super ( ). define ( spec ) spec. input ('parent _ folder ', valid _ type = orm. remotedata, help ='output folder of a completed ` pwcalculation `') spec. output ('output _ parameters ', valid _ type = orm. dict, help ='the ` output _ parameters ` output node of the successful... | [
0.4091838300228119,
-0.0379679910838604,
0.7463042140007019,
-0.26866695284843445,
0.13181094825267792,
0.19002889096736908,
0.9354196190834045,
-0.3153367042541504,
-1.603751540184021,
-0.6038362979888916,
-0.0018281462835147977,
-0.6829052567481995,
0.9145678281784058,
0.7076972723007202... |
def _ attributes _ i _ is _ writeable ( self, key, flow ) : return not self. _ attributes _ i _ is _ readonly ( key, flow = flow ) | [
-1.6705602407455444,
-0.19258460402488708,
0.36133894324302673,
0.7137690782546997,
-0.4100475311279297,
0.03905191645026207,
1.0202454328536987,
0.535768449306488,
-0.4794459640979767,
1.1881426572799683,
0.4009663760662079,
-0.18543539941310883,
-1.240053653717041,
0.15814338624477386,
... |
def test _ onlysupportedreactors ( self ) : def getreactortypes ( ) : yield twisted _ reactors. default options = app. reactorselectionmixin ( ) options. _ getreactortypes = getreactortypes options. messageoutput = nativestringio ( ) self. assertraises ( systemexit, options. opt _ help _ reactors ) message = options. m... | [
-0.12417150288820267,
0.4271029829978943,
0.21362853050231934,
-0.05634766072034836,
0.5363137125968933,
0.14943385124206543,
-0.1562071293592453,
0.5684047937393188,
0.27475234866142273,
-0.48269182443618774,
-0.3404325246810913,
-0.5177034139633179,
-0.9169924855232239,
0.369512587785720... |
def test _ campaign _ add ( self ) : pass | [
-0.02920464426279068,
-0.6854300498962402,
0.26887035369873047,
0.37677955627441406,
1.080816388130188,
0.8208093643188477,
0.6098945140838623,
0.493479460477829,
0.5019290447235107,
-0.6364368200302124,
-0.34217584133148193,
0.4651934504508972,
-0.9958390593528748,
-0.1557128131389618,
... |
def _ solve _ search _ problem ( self, search _ problem ) : start = time ( ) result = search _ problem. solve ( ) if search _ problem. solved _ milp ( ) : self. _ num _ milp _ solved + = 1 end = time ( ) self. _ elapsed _ time _ in _ seconds _ for _ search _ problem + = end - start return result | [
-0.9121281504631042,
0.1922394186258316,
0.48368391394615173,
0.5175873637199402,
0.5643166303634644,
0.22894664108753204,
0.2111683338880539,
-0.3055836856365204,
0.39257708191871643,
0.0017082294216379523,
-0.7055679559707642,
-0.4696962833404541,
-0.5931218862533569,
0.08592590689659119... |
def common _ options ( * options ) : def wrapper ( function ) : for option in reversed ( options ) : function = option ( function ) return function return wrapper | [
-0.25539231300354004,
0.35052990913391113,
0.45475202798843384,
0.5729246139526367,
1.773830533027649,
-0.15764111280441284,
-0.0886874794960022,
-0.8991525173187256,
-0.13088011741638184,
0.3828081786632538,
0.6692380309104919,
-0.3172682225704193,
-0.12262418121099472,
-0.555381894111633... |
def bbh _ recoil _ hlz _ aligned ( q, chi1para, chi2para ) : # check that the spins are at most extremal if abs ( chi1para ) > 1 : print ( " warning : aligned component of spin 1 has a magnitude of % 3f \ n > 1 " % abs ( chi1para ) ) if abs ( chi2para ) > 1 : print ( " warning : aligned component of spin 2 has a magnit... | [
0.6517131924629211,
-0.7389479875564575,
0.8848531246185303,
-0.25978824496269226,
0.24001489579677582,
0.1314956098794937,
-0.15661868453025818,
0.7530742883682251,
-0.2143913060426712,
0.1781754344701767,
0.016772516071796417,
0.6988702416419983,
-0.9089622497558594,
0.053603775799274445... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, opts : optional [ pulumi. resourceoptions ] = none, _ _ props _ _ = none ) :... | [
0.5946102142333984,
0.1512841433286667,
0.5437927842140198,
-0.3599438965320587,
0.0443134605884552,
-0.23819683492183685,
-0.04379333183169365,
0.3191032409667969,
1.183851718902588,
-0.05402393639087677,
0.05099058151245117,
0.4532599151134491,
0.8092259168624878,
-1.4123927354812622,
... |
def _ _ init _ _ ( self, in _ planes, out _ planes = none ) : super ( ). _ _ init _ _ ( ) if out _ planes is none : self. linear1 = tf. keras. models. sequential ( ( layers. inputlayer ( input _ shape = ( 2 * in _ planes, ) ), layers. dense ( in _ planes ), layers. batchnormalization ( momentum = 0. 9, epsilon = 1e - 5... | [
0.9452289938926697,
-0.2183249592781067,
0.7068085074424744,
0.5654929280281067,
-0.499483585357666,
0.5842710733413696,
0.17889618873596191,
0.32166919112205505,
-0.3989546000957489,
-0.10245583206415176,
-0.5210322737693787,
-0.3369564712047577,
0.07251732796430588,
0.2769647240638733,
... |
def auto _ adapt _ to _ methods ( decorator ) : def adapt ( func ) : return _ methoddecoratoradaptor ( decorator, func ) return adapt | [
-1.054419755935669,
-0.2217036485671997,
0.38834643363952637,
0.11536572128534317,
-1.186362624168396,
-1.472046136856079,
0.841593325138092,
-0.12574446201324463,
1.021986961364746,
-0.5261659026145935,
0.6689309477806091,
0.21328532695770264,
1.0989903211593628,
0.5616738796234131,
0.0... |
def vpnvserver _ auditsyslogpolicy _ bindings ( self ) : try : return self. _ vpnvserver _ auditsyslogpolicy _ binding except exception as e : raise e | [
0.610527515411377,
-0.346429705619812,
0.2725858986377716,
0.8904904723167419,
-0.3841997981071472,
0.9691714644432068,
0.5773741006851196,
0.2971417307853699,
1.4286489486694336,
0.12518610060214996,
-0.6144445538520813,
1.4173884391784668,
-0.45219889283180237,
0.17943203449249268,
0.7... |
def _ attributes _ set _ global _ lister ( self, lister, flow ) : d = self. _ attributes _ t _ init ( ) # register the attribute and properties d ['lister'] = lister | [
-0.5239895582199097,
-0.5689805746078491,
0.2465192675590515,
-0.20088252425193787,
0.4366911053657532,
0.24762491881847382,
-0.18449705839157104,
1.5007468461990356,
0.11858291178941727,
0.7777056097984314,
-0.958408534526825,
0.8423176407814026,
0.03041006252169609,
0.6544734835624695,
... |
def generate ( self, input _ files, output _ files ) : writers = [ ] for output _ file in output _ files : writers. append ( tf. io. tfrecordwriter ( output _ file, options = self. record _ option ) ) writer _ index = 0 total = 0 for input _ file in input _ files : if not os. path. exists ( input _ file ) : logging. wa... | [
-0.027648435905575752,
-0.11872819066047668,
0.593911349773407,
-0.3906971514225006,
0.7490679621696472,
-0.328321248292923,
0.543096125125885,
0.16819122433662415,
-0.9909892678260803,
0.5077670812606812,
-0.3699703514575958,
-0.3649715185165405,
-0.2103024572134018,
-0.17348022758960724,... |
def exonrangefinder ( transtbl ) : exonrf = rangefinder ( ) for trans in transtbl : addexons ( exonrf, trans ) return exonrf | [
-0.08992927521467209,
-0.35672518610954285,
0.31975340843200684,
0.7426919341087341,
-0.4840785562992096,
-0.42397481203079224,
-0.6932528614997864,
0.370808869600296,
-0.16335898637771606,
0.49296507239341736,
-1.2457185983657837,
-1.3486213684082031,
-0.48218807578086853,
0.1483748704195... |
def qnmatch ( name : str, pattern : str ) - > bool : match = _ compile _ pattern ( pattern ) return match ( name ) is not none | [
0.29288992285728455,
-0.5030176639556885,
0.5074962973594666,
-0.1432577520608902,
-0.6207689046859741,
-0.1908470243215561,
-1.2895621061325073,
-0.3069734573364258,
0.5054507851600647,
-0.3189094066619873,
-0.9578624367713928,
-0.3998887836933136,
-0.5047908425331116,
-0.6493719816207886... |
def test _ qlibrary _ instantiate _ route _ meander ( self ) : try : routemeander except exception : self. fail ( " routemeander failed " ) | [
-0.4389173090457916,
-0.3574312627315521,
0.4989766478538513,
-0.4993663728237152,
0.27433663606643677,
1.1517000198364258,
-0.05345454439520836,
-0.48934388160705566,
0.29894644021987915,
-0.17912429571151733,
-0.6098276376724243,
-0.4844752848148346,
-0.9096255898475647,
1.51987373828887... |
def _ attempt _ login ( self, code = none ) : if code : # get access token from spotify try : token _ info = self. sp _ oauth. get _ access _ token ( code ) except spotifyoautherror : self. _ notify _ bad _ link ( ) return else : # get token from cache token _ info = self. sp _ oauth. get _ cached _ token ( ) if not to... | [
-0.7284591794013977,
-0.017031602561473846,
0.46549826860427856,
-0.09846992045640945,
0.32976168394088745,
-0.1763790398836136,
0.008703280240297318,
-0.33470818400382996,
0.288899302482605,
-0.26288408041000366,
0.09634386748075485,
0.4622199535369873,
-0.1879819631576538,
0.034159030765... |
def _ _ init _ _ ( self, file _ or _ folder, log _ dir = " ", args _ to _ update = none, * * kwargs ) : if not args _ to _ update : args _ to _ update = dict ( ) args _ to _ update. update ( kwargs ) super ( ). _ _ init _ _ ( name _ scope = " spelling - encoder ", version = 2, file _ or _ folder = file _ or _ folder, l... | [
-0.3704183101654053,
-0.502539873123169,
0.7456881999969482,
0.21744529902935028,
-0.39257290959358215,
-0.2806099057197571,
0.31172969937324524,
0.4755488336086273,
-0.6666358709335327,
1.002375602722168,
0.16194964945316315,
-0.013782797381281853,
0.2975202202796936,
0.9700554013252258,
... |
def test _ app _ update _ mutation _ superuser _ can _ add _ any _ permissions _ to _ app ( app, permission _ manage _ apps, permission _ manage _ products, permission _ manage _ users, superuser _ api _ client, ) : query = app _ update _ mutation id = graphene. node. to _ global _ id ( " app ", app. id ) variables = {... | [
0.5961356163024902,
-0.17218410968780518,
0.6233657598495483,
1.1795384883880615,
0.19427238404750824,
0.6327246427536011,
-0.5324089527130127,
0.045111481100320816,
0.054255224764347076,
0.06566042453050613,
-0.04418228566646576,
0.4018630385398865,
-0.12630774080753326,
-0.45784366130828... |
def test _ tc _ assetca _ 004 _ searchandupdateassetca _ mat ( self ) : msgupdated = " the asset condition assessment updated successfully. " datalist = assetcalistview ( self. uidriver, self. assetcaref ) searchatlistview ( self, datalist, assetcalistview. assetid2, newassetid ) # newassetid updaterefdata ( self, asse... | [
-0.09915465116500854,
-1.1053638458251953,
0.3412984609603882,
-0.5517593026161194,
-0.11605893075466156,
0.2826380431652069,
0.6629502177238464,
-0.9916496872901917,
0.16272513568401337,
0.26069000363349915,
0.24987074732780457,
0.140111044049263,
0.2191704958677292,
-0.23193970322608948,... |
def test _ check _ input _ diff _ shapes ( ) : with pytest. raises ( valueerror ) : mob. check _ inputs ( chmask, basevalues _ idx = [ 0 ], window _ idx = 1, landmap = np. ones ( ( 3, 3, 3 ) ) ) | [
0.45359763503074646,
0.48243239521980286,
0.46947139501571655,
0.909531831741333,
1.374942421913147,
1.4480962753295898,
0.6465471982955933,
-1.0004770755767822,
0.12794868648052216,
-0.3430149257183075,
-0.24469773471355438,
0.5158529281616211,
-0.5333936214447021,
0.8969932198524475,
0... |
def test _ check _ config _ params _ missing _ repo _ path ( gitdelver _ config _ params _ fixture : callable [ [ none ], dict [ str, str ] ] ) : config _ params = gitdelver _ config _ params _ fixture. pop ( " repo _ path ", none ) with pytest. raises ( systemexit ) : gitdelver. _ check _ config _ params ( config _ pa... | [
0.4057081937789917,
0.6107876896858215,
0.3828672170639038,
0.542076587677002,
0.4667668640613556,
0.42458823323249817,
0.20719873905181885,
0.7916275262832642,
-0.569405198097229,
0.9943070411682129,
-0.8674359917640686,
-0.47592100501060486,
-0.11567574739456177,
1.042600393295288,
0.8... |
def init _ parser _ func ( nlp, skill _ file _ path, file _ type ='csv') : if file _ type = ='csv': keyword _ = pd. read _ csv ( skill _ file _ path ) else : try : keyword _ = pd. read _ excel ( skill _ file _ path ) print ( " success! " ) except exception as e : print ( e ) matcher = phrasematcher ( nlp. vocab ) for e... | [
0.6901348233222961,
-0.5528629422187805,
0.5860661864280701,
0.08178899437189102,
-0.5224806666374207,
0.5613378286361694,
-0.954667329788208,
0.14606916904449463,
-0.4267207086086273,
0.02294372022151947,
0.4591391384601593,
-0.5069296956062317,
-0.10064283013343811,
0.3424634039402008,
... |
def parse _ additional _ observations ( x ) : uncommon _ annotation _ dict = json. loads ( x ) [ 2 ] results = [ ] if len ( uncommon _ annotation _ dict [ " value " ] ) > 0 : results. append ( parse _ uncommon _ labels ( uncommon _ annotation _ dict [ " value " ] ) ) # combine results into a single dataframe results = ... | [
-0.5355662703514099,
0.2434273511171341,
0.40718239545822144,
-0.48705896735191345,
-0.2849697768688202,
-0.6466060876846313,
-0.5343537926673889,
-0.14833925664424896,
0.5075322389602661,
0.06233489513397217,
0.11489281058311462,
0.036371633410453796,
0.29371586441993713,
0.25323995947837... |
def login ( self, username, password ) : if self. _ username = = username and \ self. _ password = = password : return if url _ open. check _ cookie ( " megaupload. com " ) : log. info ( " already logged to mu " ) self. logged = true return self. verified = false self. _ username = username self. _ password = password ... | [
-1.0764912366867065,
0.13929586112499237,
0.6604170203208923,
0.4870941638946533,
-0.0033059027045965195,
-0.1458434760570526,
-0.3562468886375427,
0.7688786387443542,
0.5242494344711304,
-0.10003163665533066,
-0.42492181062698364,
0.8378595113754272,
-0.5709795355796814,
0.427835226058959... |
def on _ mailbox _ new _ mail _ received ( self, mail _ message ) : pass | [
0.3969980478286743,
-0.5369475483894348,
0.360588401556015,
-0.3054044842720032,
-0.009482610039412975,
0.07350216060876846,
-0.8152860403060913,
-0.4109242856502533,
0.3453756868839264,
-0.46341294050216675,
-0.6866833567619324,
1.3051576614379883,
-0.21492624282836914,
0.1799538582563400... |
def get _ prid _ and _ ministry _ list ( month, year, lang ) : def _ is _ element _ stale ( try _ element ) : " " " check whether selenium web - element is stale or not true - if element is stale " " " try : try _ element. is _ displayed ( ) return false except staleelementreferenceexception : return true except nosuch... | [
-0.4378381371498108,
-1.1441128253936768,
0.9150158166885376,
-0.04104599356651306,
-0.060745738446712494,
0.32838279008865356,
-0.6520193219184875,
0.05115161091089249,
0.758903980255127,
0.5451946258544922,
-0.303088515996933,
0.12364783883094788,
-0.16947361826896667,
0.9819806218147278... |
def from _ string ( cls, patch _ str ) : patch = json. loads ( patch _ str ) return cls ( patch ) | [
0.3708247244358063,
-1.910980463027954,
0.30256807804107666,
-0.786635160446167,
-1.7418098449707031,
0.5757297277450562,
-0.8756340146064758,
0.21719959378242493,
0.7009578943252563,
-0.4676527678966522,
-0.0953773483633995,
0.3801809549331665,
-0.3943156599998474,
-1.3520777225494385,
... |
def median _ filtering ( bgrd, ikid _ ref = 0, offset = true, flat = true, * * kwargs ) : # note that bgrd content is lost here bgrd _ cleanned, med _ flatfield, med _ offset, _ = correlated _ median _ removal ( bgrd, iref = ikid _ ref, offset = offset, flat = flat ) if offset : bgrd _ cleanned - = med _ offset [ :, np... | [
0.15611106157302856,
-0.4186304807662964,
0.5162706971168518,
-0.26823264360427856,
-0.43170154094696045,
0.3606201708316803,
0.504709780216217,
0.46810418367385864,
0.13483422994613647,
0.8007588982582092,
1.3198390007019043,
0.907917320728302,
-1.2540454864501953,
-0.031078053638339043,
... |
def add _ default _ keyspace ( self, keyspace ) : # hold the count of connection ids conn _ id = counter ( ) # for each source object for ports _ params _ and _ sinks in itervalues ( self. _ connections ) : # for each transmission parameter, sinks pair for params _ and _ sinks in chain ( * itervalues ( ports _ params _... | [
-0.11067145317792892,
0.21370060741901398,
0.34222036600112915,
-0.1736835390329361,
0.8082972764968872,
-0.1337326169013977,
-0.1431826651096344,
-0.639607846736908,
0.45701634883880615,
-0.5817567706108093,
-0.8473232984542847,
-0.05870753899216652,
-0.913305401802063,
1.978002667427063,... |
def api _ doc ( * * kwds ) - > callable : def wrapper ( func : callable ) : d = kwds. pop ( " description ", func. _ _ doc _ _ or " " ) kwds [ " description " ] = d func = doc ( * * kwds ) ( func ) return func return wrapper | [
-0.05234779417514801,
0.16469712555408478,
0.465637743473053,
-0.7803938984870911,
-0.8108157515525818,
-0.12117097526788712,
-0.9692155718803406,
0.330995112657547,
0.27374765276908875,
-0.13662661612033844,
0.7498370409011841,
0.8684753179550171,
0.6836446523666382,
-0.36638855934143066,... |
def load _ cluster _ parquet ( clusterparquets ) : if isinstance ( clusterparquets, str ) : clusterparquets = [ clusterparquets ] dfs = [ ] for clusterparquet in clusterparquets : dfs. append ( pd. read _ parquet ( clusterparquet ) ) dfs = pd. concat ( dfs ) return dfs | [
-0.4940130412578583,
0.11226844787597656,
0.5906581282615662,
0.5830694437026978,
-0.07673110067844391,
0.7759742140769958,
0.03655527904629707,
-0.24466413259506226,
0.3561175465583801,
0.3586138188838959,
0.6810657382011414,
-0.17574261128902435,
-0.6500656008720398,
-0.82779860496521,
... |
def get _ morris _ elementary _ effects ( samples, values ) : nvars = samples. shape [ 0 ] nqoi = values. shape [ 1 ] assert samples. shape [ 1 ] % ( nvars + 1 ) = = 0 assert samples. shape [ 1 ] = = values. shape [ 0 ] ntrajectories = samples. shape [ 1 ] / / ( nvars + 1 ) elem _ effects = np. empty ( ( nvars, ntrajec... | [
-0.04829910025000572,
-0.31339746713638306,
0.5261742472648621,
0.608668863773346,
0.2656697928905487,
0.13134610652923584,
0.9608699083328247,
-0.6689333319664001,
0.39472565054893494,
0.35432401299476624,
-0.12224358320236206,
-0.021294794976711273,
0.07420844584703445,
0.627897262573242... |
def test _ edit _ profile _ successfully ( authn _ policy, form _ validator, user _ model ) : authn _ policy. authenticated _ userid. return _ value = " johndoe " form _ validator. return _ value = ( none, { " username " : " johndoe ", " pwd " : " password ", " subscriptions " : " ", } ) user _ model. validate _ user. ... | [
0.025616267696022987,
0.6131292581558228,
0.41564467549324036,
0.24165329337120056,
0.600045382976532,
0.7872100472450256,
0.23545999825000763,
-0.49880823493003845,
0.14511771500110626,
-0.3470938205718994,
-1.3228161334991455,
-0.49295011162757874,
0.2747080326080322,
-0.0889749452471733... |
def swot _ filt _ qual _ plot ( filename, filename _ den _ dp, nlambda, filename _ den _ bc, filename _ den _ ga, levels _ ssh, dseason, vms ) : # filename _ a = filedir +'med _ 1km _ nogap _'+ dseason +'_ swotfastphase _ box _ c'+ str ( ncyc ). zfill ( 2 ) +'_ p'+ str ( npass ). zfill ( 3 ) +'_ v2. nc'# print ( filena... | [
0.11171064525842667,
0.02707335725426674,
0.7819035053253174,
-0.658204972743988,
-0.4434256851673126,
0.5594870448112488,
0.39512842893600464,
-0.032072439789772034,
-1.005960464477539,
0.34701985120773315,
0.39439356327056885,
0.7917645573616028,
0.43875056505203247,
0.5632811784744263,
... |
def container ( bg : bool = false, name = " prefect - dev ", api : bool = true, tag : str = none ) : exit _ with _ error _ if _ not _ editable _ install ( ) import docker from docker. models. containers import container client = docker. from _ env ( ) containers = client. containers. list ( ) container _ names = { cont... | [
-0.1666131168603897,
0.3048361539840698,
0.7691250443458557,
0.10094756633043289,
1.087214708328247,
-0.677927553653717,
0.7186213731765747,
-0.6735410094261169,
-0.22177261114120483,
1.1391618251800537,
-0.1411518007516861,
0.2669566869735718,
0.207121342420578,
0.6145914196968079,
0.36... |
def do _ update _ all ( self ) : _ error _ code = 0 _ msg ='' for _ node in self. tree. all _ nodes ( ) : try : _ error _ code, _ debug _ msg = self. do _ update ( _ node. identifier ) _ msg = _ msg + _ debug _ msg +'\ n'except attributeerror : _ error _ code = 1 _ msg = ( " ramstk error : one or more records in the ns... | [
-0.3241862654685974,
-0.16661062836647034,
0.7858367562294006,
-0.00996270403265953,
0.5848671793937683,
-0.4865369200706482,
0.2120954990386963,
0.017490645870566368,
-0.8340311646461487,
0.6655027866363525,
-0.17486591637134552,
0.4716196656227112,
-0.3854133188724518,
1.2773367166519165... |
def print _ phone _ number ( data, pattern ) : template = ('{ naam : < 23 }'' { number : > 16 } { mobiel : > 16 } { presence : ^ 16 }') print ( template. format ( naam ='naam ', number ='intern ', mobiel ='mobiel ', presence ='waar?') ) print ( 80 *'-') for elem in sorted ( data, key = lambda d : d ['naam'] ) : # where... | [
0.19024866819381714,
-0.279195636510849,
0.7172495722770691,
-0.38697701692581177,
-0.3979663550853729,
0.29473790526390076,
0.20047442615032196,
0.7722781300544739,
0.9952014088630676,
0.17149679362773895,
0.5313956141471863,
0.0701761469244957,
-0.004710089415311813,
-0.05025610327720642... |
def domain _ iterator ( self ) : return _ domain _ iterator ( self. domain ) | [
-0.7503520846366882,
-0.5554590821266174,
0.0675707459449768,
0.01790517009794712,
-0.4350541830062866,
0.11610278487205505,
0.21822799742221832,
-0.6563444137573242,
-0.09670138359069824,
-0.8304714560508728,
0.7832939624786377,
1.5848218202590942,
0.6409404277801514,
-0.2779546082019806,... |
def convert _ file ( fname _ in : str, fname _ out : str, base _ dir : str ) - > bool : fin = none json _ out = " " log. debug ( " reading input file : % s ", os. path. abspath ( fname _ in ) ) with open ( fname _ in, mode = " r " ) as fin : json _ out = _ _ convert ( json. load ( fin ), base _ dir ) log. debug ( " wri... | [
-0.757656455039978,
-0.927070677280426,
1.0490483045578003,
-0.431255578994751,
-0.546259880065918,
0.18498988449573517,
-0.24858897924423218,
0.416609525680542,
-0.997988224029541,
0.268833190202713,
-0.5827610492706299,
-0.12787312269210815,
0.4119023382663727,
-0.6097217798233032,
-0.... |
def import _ from _ dict ( session : session, data : dict [ str, any ], sync : optional [ list [ str ] ] = none ) - > none : if not sync : sync = [ ] if isinstance ( data, dict ) : logger. info ( " importing % d % s ", len ( data. get ( databases _ key, [ ] ) ), databases _ key ) for database in data. get ( databases _... | [
-0.4362110197544098,
1.1459683179855347,
0.6526013612747192,
0.05649900436401367,
0.06526681780815125,
0.05757041648030281,
0.32043692469596863,
-0.08929451555013657,
0.779873788356781,
1.296545386314392,
-0.6828362345695496,
0.03209490701556206,
-0.1691402792930603,
0.13136200606822968,
... |
async def loop ( self ) : self. _ running = true while self. _ running : updates = await self. api _ call ( " getupdates ", offset = self. _ offset + 1, timeout = self. api _ timeout ) self. _ process _ updates ( updates ) | [
-0.5456733703613281,
-0.8361774682998657,
0.49536722898483276,
-0.3961912989616394,
0.5183041095733643,
0.6657148599624634,
-0.7661895751953125,
0.03352361544966698,
-0.44921189546585083,
-0.08041352033615112,
0.17689815163612366,
0.6256927251815796,
-0.9594181776046753,
-0.619689881801605... |
def input _ addresses ( blockheight = directory _ block _ height ) : transactions : object = factomd. factoid _ block _ by _ height ( blockheight ) ['fblock'] ['transactions'] for result in transactions : inputs = result ['inputs'] filtered _ inputs = list ( filter ( none, inputs ) ) # filter out empty strings for addr... | [
0.15390223264694214,
0.11841755360364914,
0.5264662504196167,
0.2612149119377136,
-0.20547999441623688,
-1.0230011940002441,
0.9312859773635864,
-0.4596724808216095,
-0.2802797853946686,
0.5550582408905029,
-0.15566383302211761,
0.7307996153831482,
-0.46515199542045593,
0.24164257943630219... |
def put ( self ) : if jwthandler. authorize _ action ( self, 2 ) = = false : return none body _ categories = { " username " : 1, " password " : 0, " admin " : 0 } user _ dict = errorutil. check _ fields ( self. request. body. decode ( ), body _ categories, self ) if user _ dict = = false or userutil. change _ user _ fi... | [
-1.2377792596817017,
0.7899781465530396,
0.6246964931488037,
0.15561580657958984,
-0.38402047753334045,
0.2089373916387558,
0.25023889541625977,
-1.0529439449310303,
-0.1686147302389145,
0.05730808526277542,
-0.8815943002700806,
0.47369587421417236,
-0.9023647308349609,
-0.0369026437401771... |
def read _ pdb ( filename ) : # read in file with open ( filename,'r') as f : # read lines from file flines = [ ] for lines in f : flines. append ( lines ) # close file ( be kind rewind ) # initiate suscriptable collection to store atom data atom _ data = [ ] # iterate over line data for line in flines : # split the li... | [
0.11866839975118637,
-0.5178417563438416,
0.5897082090377808,
-0.08347441256046295,
-0.36805465817451477,
1.153147578239441,
-0.6128706932067871,
0.6965140104293823,
-1.5176633596420288,
-0.15412777662277222,
-0.5315263271331787,
0.3305760324001312,
-0.04976092651486397,
-0.362385600805282... |
def create _ thin _ pool ( self, name = none, size _ str = none ) : if not self. supports _ thin _ provisioning ( self. _ root _ helper ) : log. error ( _ le ('requested to setup thin provisioning,'' however current lvm version does not'' support it.') ) return none if name is none : name ='% s - pool'% self. vg _ name... | [
0.13066087663173676,
-0.3089503049850464,
0.7620709538459778,
-0.7818654179573059,
-0.7778031826019287,
0.3169333040714264,
-0.021077224984765053,
-0.5281134247779846,
0.4490601420402527,
0.4279416799545288,
-0.5735604763031006,
0.738374650478363,
-0.887611448764801,
-0.43684980273246765,
... |
def fuz _ date ( approx _ date, date _ format = " y - m - d ", mode = " e " ) : return dateformat. format ( approx _ date. date ( mode ), date _ format ) | [
0.3768502175807953,
-0.6922378540039062,
0.4270007014274597,
-0.5739812850952148,
-0.7588157653808594,
0.6736331582069397,
-0.40020883083343506,
0.24146218597888947,
0.2401028275489807,
-0.287847638130188,
0.34048396348953247,
0.7205581665039062,
1.1084744930267334,
0.8124508261680603,
1... |
def _ _ get _ grid ( self, ind ) : if ind = = 0 : gname = self. get _ option ('base') b = 0 else : gname = self. get _ option ('plus') [ ind - 1 ] ['name'] b = self. get _ option ('plus') [ ind - 1 ] ['buf'] return self. grid2 _ by _ name ( gname ), b | [
-0.813198447227478,
-0.16215546429157257,
0.7021666765213013,
-0.009556950069963932,
-0.22286838293075562,
-0.6155177354812622,
-0.07936184853315353,
-1.2695355415344238,
-0.33212122321128845,
0.36062708497047424,
-0.5669310688972473,
0.10886992514133453,
-0.4475197196006775,
-0.2240912467... |
def string _ from _ interwebs ( input _ value ) : return escape ( unquote ( input _ value ) ) | [
0.29084405303001404,
-0.4057588577270508,
0.3251064717769623,
-0.04758985713124275,
-0.8611559271812439,
0.4397820830345154,
0.03402223810553551,
-0.47303149104118347,
0.5658203363418579,
0.49699336290359497,
0.0722387433052063,
0.33603912591934204,
-0.8329924941062927,
-0.4336556792259216... |
def _ watch _ notifications ( self ) : while true : update, address = yield from self. _ notifier. watch ( ) if update = = self. _ notifier. server : yield from self. _ send _ status ( address ) elif update = = self. _ notifier. tag : status = yield from self. _ cache. get ( address ) if ( status. tags < = self. _ incl... | [
0.348648339509964,
-0.22679248452186584,
0.6710371971130371,
0.22928601503372192,
-0.6318774819374084,
0.31402429938316345,
0.3135889172554016,
-0.04900204762816429,
-0.42126959562301636,
0.09155675023794174,
-0.7289175987243652,
0.6966758370399475,
0.15816228091716766,
0.7528910636901855,... |
def detectandfilter ( self, image, scalefactor, minsize, maxsize, score _ threshold, overlap _ threshold, nobjects = float ( " inf " ) ) : # initial detection bboxes, rejectlevel, levelweights = self. detectmultiscale3 ( image, scalefactor, minneighbors = 1, minsize = minsize, maxsize = maxsize, outputrejectlevels = tr... | [
-0.5028444528579712,
-0.3393798768520355,
0.7503775954246521,
0.5958351492881775,
-0.2317942976951599,
-0.06985035538673401,
0.14553530514240265,
-0.8705188632011414,
-0.052018582820892334,
0.2549377977848053,
-0.46528464555740356,
0.18932458758354187,
-0.1285485178232193,
0.98757278919219... |
def getrow ( self ) - > int :... | [
-0.3253692090511322,
1.413908839225769,
0.36397063732147217,
1.1216797828674316,
0.07569949328899384,
-0.9276610016822815,
0.9903262257575989,
0.258649617433548,
-0.7984328866004944,
-1.3755544424057007,
0.33481577038764954,
0.7804034948348999,
-0.2224351018667221,
0.5602312684059143,
0.... |
def importtfidfquery ( self, pathtofile ) : self. tfidfqueriesdictionary = self. parsequeriesfile ( pathtofile ) | [
0.25524255633354187,
-0.30464285612106323,
0.22788114845752716,
-1.08616304397583,
0.051783956587314606,
0.742343544960022,
0.5063023567199707,
-0.044599685817956924,
-0.637305736541748,
0.22458168864250183,
-0.3955766260623932,
-1.031961441040039,
-0.06034098565578461,
-0.2263503819704055... |
def on _ enter _ prepare ( self ) : logger. info ( " preparing to record ", extra = dict ( event ='record _ prepare _ start') ) self. prepare _ recording ( ) | [
0.41494646668434143,
0.07675212621688843,
0.42566975951194763,
0.38102805614471436,
0.6781635880470276,
-0.7399200201034546,
0.3228633403778076,
0.35338345170021057,
0.27262574434280396,
0.4203173518180847,
-0.21550846099853516,
0.8406552672386169,
0.46928101778030396,
0.27172142267227173,... |
def clean _ questions ( df ) : number _ of _ columns = 13 number _ of _ rest _ columns = 9 # use a loop to modify the whole data frame prev = np. array ( [ ] ) while ( df. shape [ 1 ] > number _ of _ columns ) : prev = np. unique ( np. concatenate ( [ prev, modifyrow ( df, prev, number _ of _ columns, number _ of _ res... | [
0.89072585105896,
0.6237286925315857,
0.848578929901123,
-0.23938508331775665,
0.01681847684085369,
-0.009242559783160686,
0.5394707918167114,
-0.16862010955810547,
0.39354947209358215,
0.1378604769706726,
0.8918782472610474,
-0.2585591971874237,
0.5317279100418091,
0.00400637648999691,
... |
def corr ( a, b ) : return 100 * np. corrcoef ( a. flatten ( ), b. flatten ( ) ) [ 0, 1 ] | [
-0.5299107432365417,
0.0047834874130785465,
0.4361498951911926,
-0.2954612672328949,
-0.2983669340610504,
-0.8884325623512268,
0.01729712449014187,
0.32362616062164307,
-0.028701400384306908,
0.6785178184509277,
1.0131183862686157,
0.4972422122955322,
-0.0260369461029768,
-0.86126470565795... |
def get ( resource _ name : str, id : pulumi. input [ str ], opts : optional [ pulumi. resourceoptions ] = none, archive _ size _ bytes : optional [ pulumi. input [ float ] ] = none, creation _ timestamp : optional [ pulumi. input [ str ] ] = none, description : optional [ pulumi. input [ str ] ] = none, disk _ size _ ... | [
-1.2515977621078491,
0.4302780032157898,
0.48045817017555237,
-0.12454724311828613,
-0.007547943387180567,
-0.3838224411010742,
-0.4356456696987152,
0.5781476497650146,
0.15322186052799225,
0.45856156945228577,
0.1196516677737236,
0.6032726168632507,
-0.16616429388523102,
-0.32872813940048... |
def get _ file _ and _ year _ range ( exp, realm ) : f = glob. glob ( tsdir +'/'+ exp +'/'+ realm +'/'+ exp +'_???? _???? _ time - series _ *. nc') # assume only one time series file if f : ma = reg. match ( f [ 0 ] ) return ma. group ( 0 ), ma. group ( 1 ), ma. group ( 2 ) else : print ('could not find a time series f... | [
-0.37587472796440125,
-0.7886099815368652,
0.671653687953949,
-0.20847609639167786,
0.06122796982526779,
0.4308282136917114,
0.09046459943056107,
0.5969362854957581,
-0.5619178414344788,
0.6253420114517212,
0.5020259618759155,
0.17055204510688782,
0.16851206123828888,
0.04945807158946991,
... |
def swap ( array _ of _ stuff, start, end ) : array _ of _ stuff [ start ], array _ of _ stuff [ end ] = array _ of _ stuff [ end ], array _ of _ stuff [ start ] | [
-1.3718489408493042,
-1.1560131311416626,
0.7878552079200745,
-0.3717591464519501,
0.058062952011823654,
0.38186317682266235,
-1.418886423110962,
0.5421785712242126,
-0.3550986349582672,
0.14114439487457275,
-0.3359255790710449,
1.7570668458938599,
0.16960887610912323,
-0.6964719891548157,... |
def _ _ init _ _ ( self, heuristic : callable [ [ hashablestate ], float ], max _ lao _ star _ iterations = int ( 1e5 ), dynamic _ programming _ iterations = 100, randomize _ action _ order : bool = true, randomize _ nextstate _ order : bool = true, event _ listener _ class : " laostareventlistener " = none, seed = non... | [
-0.11064352840185165,
0.9117622971534729,
0.5783963203430176,
0.7344917058944702,
-0.20542991161346436,
-0.22016720473766327,
-0.5133588314056396,
0.5482411980628967,
0.7173604965209961,
-0.020262574777007103,
-0.47339028120040894,
-0.29961803555488586,
0.9367112517356873,
0.91785711050033... |
def t _ name ( name ) : basname = os. path. basename ( name ). split ( '.') [ 0 ] # basname = basname. split ('_') [ - 1 ] return basname | [
-0.3268766701221466,
-0.8154593110084534,
0.7228243947029114,
-0.6230604648590088,
-0.4927525222301483,
0.35753676295280457,
0.6491276025772095,
-0.6734055876731873,
-0.360563188791275,
1.488673448562622,
-0.9006750583648682,
-0.5512588024139404,
0.3765096962451935,
-0.7532691955566406,
... |
def _ get _ recurso ( self, recurso, resolution = 1 ) : # # generar la coleccion del recurso y consultarla para este punto collection = ee. imagecollection ( recurso ). filterdate ( self. fasa, self. faco ) serie _ vi = collection. getregion ( self. gee _ geometry, resolution ). getinfo ( ) mod = pd. dataframe ( serie ... | [
-0.5185630917549133,
0.4031236469745636,
0.5149576663970947,
-0.06257638335227966,
-0.10705385357141495,
-0.9197564721107483,
-0.1510588526725769,
-0.530983030796051,
-0.011821883730590343,
-0.12291309237480164,
0.4343567192554474,
0.3737674951553345,
0.6641331315040588,
-0.255563855171203... |
def post _ process _ image ( self ) : image = self. modification _ information. image original _ dimensions = self. modification _ information. original _ dimensions post _ processed _ image = im. crop _ image ( image, original _ dimensions ) new _ dimensions = self. preference. dimensions post _ processed _ image = im... | [
-0.5049185156822205,
0.10804416984319687,
0.6341672539710999,
-0.6875219345092773,
-0.630553126335144,
-0.4254196286201477,
-0.02423538826406002,
-0.004662525374442339,
0.46376851201057434,
0.23147715628147125,
1.2947866916656494,
1.0372732877731323,
0.2752794623374939,
0.7683475613594055,... |
def routing _ loop _ adv ( ) : clf = load ( " adv _ agent. joblib " ) reg = load ( " time _ agent. joblib " ) print ( " welcome to the advanced ticket routing agent. " ) loop _ string = " " while loop _ string! = " q " : print ( " please enter y / n to answer the following questions. " ) query = build _ query ( clf ) p... | [
-0.6860570907592773,
-0.2868295907974243,
0.6712953448295593,
-0.010095860809087753,
-0.3812901973724365,
0.9415984153747559,
0.7412003874778748,
-0.6104465126991272,
-0.6980158090591431,
-0.058883558958768845,
0.12205618619918823,
0.6299388408660889,
0.32438185811042786,
0.313081383705139... |
def build _ mmd _ loss ( source _ tensor, target _ tensor, scope = none ) : sigmas = [ 1e - 6, 1e - 5, 1e - 4, 1e - 3, 1e - 2, 1e - 1, 1, 5, 10, 15, 20, 25, 30, 35, 100, 1e3, 1e4, 1e5, 1e6 ] gaussian _ kernel = partial ( utils. gaussian _ kernel _ matrix, sigmas = tf. constant ( sigmas ) ) loss _ value = maximum _ mean... | [
-0.44602102041244507,
-0.37879887223243713,
0.46890878677368164,
-0.2854591906070709,
-0.987129271030426,
0.2632233798503876,
-0.05995535850524902,
0.6234084367752075,
0.6849866509437561,
0.2727588415145874,
0.8968838453292847,
1.1230589151382446,
0.30573973059654236,
-0.19402514398097992,... |
def register ( self, request, * * cleaned _ data ) : if site. _ meta. installed : site = site. objects. get _ current ( ) else : site = requestsite ( request ) create _ user = registrationprofile. objects. create _ inactive _ user new _ user = create _ user ( cleaned _ data ['username'], cleaned _ data ['email'], clean... | [
-0.39397045969963074,
0.3151932656764984,
0.4984770119190216,
0.7404541969299316,
0.011080135591328144,
0.06547754257917404,
0.0749516636133194,
-0.1326540857553482,
-0.5470039248466492,
-0.19618435204029083,
-1.2005184888839722,
0.6078882813453674,
-0.3557366728782654,
-0.2941556870937347... |
def setstate ( self, value ) : self. a. state = value | [
-0.37470319867134094,
-0.04596132040023804,
0.25958600640296936,
-0.7511895298957825,
-0.21330080926418304,
0.6308598518371582,
1.1280298233032227,
0.1531616449356079,
0.6909429430961609,
-0.01428559236228466,
-0.4191209077835083,
-0.20930083096027374,
-0.1264420449733734,
0.79629725217819... |
def find ( self, item ) : for pos, value in self. items ( ) : if item = = value : return pos return none | [
-0.3526904284954071,
-0.6748348474502563,
0.43154725432395935,
-0.23775312304496765,
0.10722275823354721,
-0.053475409746170044,
0.17389853298664093,
-1.0023319721221924,
-0.2832225263118744,
0.295146107673645,
-0.42314669489860535,
-1.0050512552261353,
-0.5694342851638794,
-0.406592279672... |
def _ get _ overnight _ lr ( self, day, firstpx ) : # check the contract tdi = l1. tradingdayiterator ( day ) tdi. prev ( ) day _ prev = tdi. yyyymmdd ( ) if l1. is _ future ( self. symbol ) : ct _ today = l1. fc ( self. symbol, day ) ct _ prev = l1. fc ( self. symbol, day _ prev ) if ct _ prev! = ct _ today : print ('... | [
-0.4946770966053009,
-0.0018100370652973652,
0.7325807213783264,
-1.0460866689682007,
-0.24327664077281952,
0.6837383508682251,
-0.6838697195053101,
-0.3200393617153168,
-0.3339659869670868,
0.4623143970966339,
0.7731554508209229,
-0.4117225706577301,
-1.1829509735107422,
0.269815176725387... |
def build _ dataset _ hierarchy ( host, secret _ key, clowder _ user, clowder _ pass, root _ space, season, experiment, root _ coll _ name, year ='', month ='', date ='', leaf _ ds _ name ='' ) : if season : season _ collect = get _ collection _ or _ create ( host, secret _ key, clowder _ user, clowder _ pass, season, ... | [
0.2548244297504425,
-0.048615504056215286,
0.9874417781829834,
0.5310083627700806,
0.20161737501621246,
1.0361005067825317,
-0.33036693930625916,
-0.5659319758415222,
-0.23461075127124786,
-0.46890324354171753,
0.3405524790287018,
0.624966025352478,
-0.17911258339881897,
0.4841233789920807... |
def parsevar ( vcf _ file, ref _ seq ) : import re # pass on the file, saving info fields too prog = re. compile ('# # info = < id = (. * ), number. *, description = " (. * ) " >') vc _ lines = [ ] with open ( vcf _ file ) as h : for l in h : if l. startswith ('#') : res = prog. match ( l ) try : info _ fields [ res. g... | [
0.6027672290802002,
-0.7003363370895386,
0.7508682608604431,
-0.2634706497192383,
-0.1595935970544815,
-0.29861384630203247,
0.3534562885761261,
0.26728758215904236,
-0.6355165839195251,
0.4725832939147949,
-0.4570116102695465,
0.11995581537485123,
0.21888595819473267,
0.046114761382341385... |
def _ attributes _ t _ call _ getter ( self, key ) : # make sure interface is ready to use. d = self. _ attributes _ t _ init ( key ) # avoid recursion if d ['attributes'] [ key ] ['recursion'] : return # no callbacks for private keys if key [ 0 ] = ='_'and d ['private'] : return # key getter overwrites results from al... | [
-0.8061075210571289,
0.09437017142772675,
0.6241021752357483,
-0.2818492352962494,
-1.0298388004302979,
-0.9768559336662292,
-0.5539615154266357,
-0.49755433201789856,
-0.2424727976322174,
0.31800875067710876,
0.08086948096752167,
0.04386338219046593,
0.23465149104595184,
0.856955528259277... |
def claim ( self, schema : optional [ type [ basemodel ] ] = none ) - > " userinfoauth " : clone = self. _ clone ( ) clone. user _ info = schema return clone | [
0.7063630223274231,
-0.3432962894439697,
0.3880894184112549,
1.2005268335342407,
-0.6669160723686218,
0.9149036407470703,
-0.1535404473543167,
0.0626542940735817,
1.198351263999939,
-0.6633855700492859,
-0.1612788587808609,
0.6048405766487122,
-0.5290248990058899,
-0.9011293053627014,
-0... |
def build _ ip _ list ( self ) : self. ips = set ( ) ips _ dict = self. api. query ( ). ips ( ). get ( ) for ip in ips _ dict ['ips'] : self. ips. add ( ip ( self, ip ) ) | [
-1.9639414548873901,
-0.06649032235145569,
0.2804112136363983,
-0.4985227584838867,
0.6030696630477905,
-0.8681508898735046,
-1.2393566370010376,
1.293673038482666,
0.3355464041233063,
0.2670067548751831,
0.14562611281871796,
-0.8811166882514954,
0.8763559460639954,
-0.8750171661376953,
... |
def get _ users _ output ( employee _ ids : optional [ pulumi. input [ optional [ sequence [ str ] ] ] ] = none, ignore _ missing : optional [ pulumi. input [ optional [ bool ] ] ] = none, mail _ nicknames : optional [ pulumi. input [ optional [ sequence [ str ] ] ] ] = none, object _ ids : optional [ pulumi. input [ o... | [
-0.561075747013092,
0.26784083247184753,
0.7363926768302917,
0.36564961075782776,
0.31946924328804016,
0.35185012221336365,
-0.08980735391378403,
-0.42234668135643005,
0.5972476005554199,
0.263916015625,
-0.17053337395191193,
1.1197422742843628,
-1.0062185525894165,
-1.0541259050369263,
... |
def startapplication ( self ) : self. root. mainloop ( ) | [
1.1674370765686035,
-1.4506504535675049,
0.44825056195259094,
1.4167283773422241,
-0.11561200022697449,
1.2884987592697144,
0.9528100490570068,
0.17773157358169556,
0.1942506581544876,
-0.32636454701423645,
0.6885655522346497,
0.500981330871582,
0.13828665018081665,
1.4075181484222412,
-... |
def get _ instructors ( self, soup ) : instructor _ name = [ ] for name in soup. find _ all ( " td ", class _ = " column - 2 " ) : instructor _ name. append (''. join ( name. findall ( text = true ) ) ) instructor _ name. append ('\ n') self. new _ list. append ( instructor _ name ) return instructor _ name | [
-1.4552600383758545,
0.09534250199794769,
0.6270689368247986,
0.20451653003692627,
-0.04770531505346298,
-0.37856048345565796,
-0.16156569123268127,
0.20127063989639282,
0.06644736230373383,
1.0971235036849976,
-0.3570294976234436,
-0.2799762189388275,
0.40707725286483765,
0.79546785354614... |
def do ( self, command, environ = { } ) : if not isinstance ( command, basestring ) : if isinstance ( command, collections. sequence ) : command =''. join ( pipes. quote ( c ) for c in command ) else : raise typeerror ('command must be a string or a sequence of'' strings, not'+ repr ( command ) ) if not isinstance ( en... | [
-1.2088680267333984,
0.4212852716445923,
1.2334462404251099,
-0.6141163110733032,
0.1934664398431778,
0.5974055528640747,
-0.5892236828804016,
-0.3523831367492676,
-0.7088878154754639,
0.24036966264247894,
-0.5140443444252014,
0.6795164942741394,
-0.29894375801086426,
-0.000111295958049595... |
def allowed _ to _ buzz ( ) : global allowuntil return allowuntil > datetime. datetime. now ( ) | [
-0.08486298471689224,
0.3198266923427582,
0.452824205160141,
0.5373584032058716,
-1.2397633790969849,
1.7844613790512085,
-0.5978825092315674,
0.20373684167861938,
-0.7484259009361267,
0.2233966886997223,
-0.19902239739894867,
0.6226744651794434,
-0.9588265419006348,
-0.34205272793769836,
... |
def _ get _ ce _ eval _ tf _ examples _ fn ( model, tf _ transform _ output ) : model. tft _ layer = tf _ transform _ output. transform _ features _ layer ( ) @ tf. function def ce _ eval _ tf _ examples _ fn ( serialized _ tf _ examples ) : " " " returns the output to be used in the ce _ eval signature. " " " xf _ fea... | [
0.03581191971898079,
-0.7184377908706665,
0.2805922329425812,
-0.6422573328018188,
-0.19074119627475739,
-0.6580764055252075,
0.604063868522644,
0.5453910231590271,
-0.6892802119255066,
0.09682226926088333,
-0.8143811821937561,
-0.6121392846107483,
1.0494853258132935,
-0.6314415335655212,
... |
def clear ( self ) - > none : for y in range ( 0, self. size. y ) : self. cursor _ set ( xy ( 0, y ) ) for x in range ( 0, self. size. x ) : self. write ('' ) self. cursor _ set ( xy ( 0, 0 ) ) | [
0.3008390963077545,
-0.04822355508804321,
0.3214512765407562,
-0.6241438388824463,
0.22970932722091675,
-0.2276717722415924,
0.5606579184532166,
-0.4589417576789856,
0.03651083633303642,
0.7828205227851868,
0.3933616578578949,
0.889110267162323,
0.48753106594085693,
0.6691234707832336,
-... |
async def cleanup _ background _ tasks ( app ) : # delete ready file on tear down # note matlab does not delete this file on shutdown. matlab _ ready _ file, matlab _ log _ dir = mwi _ connector. get _ matlab _ ready _ file ( app [ " port " ] ) matlab _ ready _ file. unlink ( ) | [
1.6149885654449463,
-0.6585097312927246,
0.4887690544128418,
0.27101629972457886,
0.09818611294031143,
0.8811757564544678,
1.3144274950027466,
0.08777152746915817,
0.08013542741537094,
0.21586571633815765,
0.2294500321149826,
-0.3375122845172882,
-0.058575376868247986,
0.015957092866301537... |
def fate ( self, row, col ) : # the light implementation does not know the fates, so it cheats by # returning " survive " for all currently live cells and " stay dead " for # all currently dead cells. line = self. cells. take ( row, axis = 0, mode ='wrap') cell = line. take ( col, mode ='wrap') return fate. survive if ... | [
0.24245548248291016,
-0.2194969654083252,
0.4371171295642853,
0.6101837754249573,
0.024218445643782616,
-0.2485930472612381,
-0.8840959072113037,
-0.6797177791595459,
-0.4917806088924408,
0.12315962463617325,
0.3612438142299652,
-0.4210904538631439,
0.9761880040168762,
0.05523749813437462,... |
def test _ pool _ add _ data _ permissions ( self ) : pool _ name = p _ n ( ) pool _ path = make _ test _ pool ( pool _ name, stratiscertify. disks [ 0 : 2 ] ) self. _ test _ permissions ( stratisdbus. pool _ add _ data, [ pool _ path, stratiscertify. disks [ 2 : 3 ] ], true ) | [
-0.4098456799983978,
0.9803816080093384,
0.45723971724510193,
0.14055226743221283,
0.7266461849212646,
1.0674843788146973,
0.4195138216018677,
-0.4152340590953827,
-0.1538110077381134,
-0.18888695538043976,
-0.19969552755355835,
0.6450202465057373,
-0.4654078781604767,
-0.13170558214187622... |
def enable _ encryption ( key, drive, backend _ path = backend _ binary _ path ) : if key : command = [ backend _ path,'- d ', drive,'- k ', key ] try : proc = subprocess. popen ( command, close _ fds = true, stdin = subprocess. pipe, stdout = subprocess. pipe ) cmd _ out, cmd _ err = proc. communicate ( ) return proc.... | [
0.6175113916397095,
-0.4502582252025604,
0.8567488789558411,
-0.06905766576528549,
0.16589823365211487,
-0.40428218245506287,
-0.16167418658733368,
0.37470364570617676,
-0.7255638837814331,
0.8914955854415894,
0.6213077306747437,
0.6434722542762756,
-0.974920392036438,
-0.04595175385475159... |
def parse _ columns ( df ) : columns = list ( df. columns ) id _ vars, dates = [ ], [ ] for c in columns : if c. endswith ( " 20 " ) : dates. append ( c ) else : id _ vars. append ( c ) return id _ vars, dates | [
-0.7909325361251831,
-0.05519510805606842,
0.41921254992485046,
-0.5574727654457092,
0.18414795398712158,
0.06758096814155579,
-0.3971584141254425,
0.16049450635910034,
-0.6091894507408142,
0.38447919487953186,
-1.187635064125061,
-0.07607123255729675,
0.08508086204528809,
-0.2289175838232... |
def execute ( self, job : job ) : self. jobid = job. id self. jobtotal = job. total self. log ('execute - start') try : self. _ open _ input _ chunks ( job = job ) self. initialise ( ) with self. _ get _ temporary _ dataset ( jobid = job. id ). open ('w') as self. output : sourceiterator = self. source _ iterator ( par... | [
-0.11310369521379471,
-0.41177263855934143,
0.6147699952125549,
-0.7343899607658386,
-0.07525243610143661,
0.10202961415052414,
0.11748944222927094,
-0.16762155294418335,
-0.6185221672058105,
-0.3619978129863739,
-0.10077714174985886,
-0.2976341247558594,
-1.0427215099334717,
0.30601969361... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.