text
stringlengths
25
2.19k
embedding
listlengths
768
768
def variable _ summaries ( var ) : with tf. name _ scope ('summaries') : mean = tf. reduce _ mean ( var ) tf. summary. scalar ('mean ', mean ) with tf. name _ scope ('stddev') : stddev = tf. sqrt ( tf. reduce _ mean ( tf. square ( var - mean ) ) ) tf. summary. scalar ('stddev ', stddev ) # tf. summary. scalar ('max ', ...
[ 0.24733734130859375, 1.04137122631073, 0.6711955070495605, -0.5538890361785889, -0.04607345536351204, 0.3967515528202057, 0.780064046382904, -0.15717434883117676, 0.1695907562971115, -0.005408767610788345, -1.2221752405166626, 0.959790825843811, 0.7590359449386597, 0.0962328389286995, 0....
def format _ main ( subreddit _ dict ) : # bundle the item groups together def format _ items ( item _ list ) : to _ join = [ tmp. item. format ( item [ 0 ], item [ 1 ] ) for item in item _ list ] return''. join ( to _ join ) # bundle the section groups together def format _ sections ( section _ list ) : to _ join = [ ...
[ 0.6934741139411926, -0.27211862802505493, 0.5620790123939514, -0.31413811445236206, -0.500209391117096, 0.7054620981216431, -0.7641242146492004, -0.004567932803183794, -0.3801857531070709, 0.40686851739883423, 1.0087027549743652, 0.027023931965231895, 0.5942136645317078, 1.045855164527893,...
def all _ toggle _ slugs ( ) : return [ toggle. slug for toggle in all _ toggles ( ) ]
[ -0.6764160990715027, -0.12305397540330887, 0.4867859482765198, 0.7576442360877991, 0.32792234420776367, -0.21312107145786285, -0.6713932752609253, 1.3966283798217773, -0.6432414650917053, 0.2094431221485138, -0.2362401932477951, 0.15014255046844482, -0.11454292386770248, 1.1264559030532837...
def input _ fn _ builder ( features, seq _ length ) : all _ unique _ ids = [ ] all _ input _ ids = [ ] all _ input _ mask = [ ] all _ input _ type _ ids = [ ] for feature in features : all _ unique _ ids. append ( feature. unique _ id ) all _ input _ ids. append ( feature. input _ ids ) all _ input _ mask. append ( fea...
[ 0.22392962872982025, -0.36614811420440674, 0.5203455090522766, -0.01824774593114853, -0.6057049632072449, -0.3717602789402008, 0.8883007764816284, 0.8987993597984314, 0.28737905621528625, -0.05074802041053772, -0.2443649023771286, 0.3288402557373047, 0.434027761220932, -0.9104120135307312,...
def init _ bus ( self ) : for x in dir ( self ) : # look through the class to avoid # triggering properties on the instance obj = getattr ( self. _ _ class _ _, x, none ) channel = getattr ( obj,'_ subscribe _ to ', none ) if channel : # since we looked through the class earlier, # we need to actually retrieve the meth...
[ -0.20080535113811493, 0.2314986139535904, 0.6499426364898682, 0.5173932313919067, 0.7411183714866638, -0.9618727564811707, 0.050455205142498016, -0.35015949606895447, 0.3609168529510498, -0.6704372763633728, -1.0380257368087769, 0.04451226070523262, -0.07466860860586166, 1.5469027757644653...
def decode _ image ( serialized _ example ) : features = tf. io. parse _ single _ example ( serialized _ example, features = { " image " : tf. io. fixedlenfeature ( [ ], tf. string ) }, ) image = tf. io. decode _ raw ( features [ " image " ], tf. uint8 ) return image
[ -0.1993284821510315, -0.4534143805503845, 0.21721582114696503, -0.22189770638942719, -0.40677300095558167, -0.498324453830719, 0.04165640100836754, 1.3645206689834595, 0.3576873540878296, -0.19565950334072113, -0.5134432315826416, 0.39100077748298645, 0.6925761103630066, -1.025768160820007...
def compute _ greens _ function ( self, line _ charge _ density ) : nx, ny = self. grid. nx, self. grid. ny y, x = np. meshgrid ( self. grid. x - self. grid. xmin, self. grid. y - self. grid. ymin ) self. g [ : nx, : ny ] = np. log ( x * * 2 + y * * 2, out = np. zeros _ like ( x ), where = ( x + y > 0 ) ) self. g * = 0...
[ 0.17789900302886963, -0.04696720466017723, 0.6348387002944946, -0.5230733752250671, 0.3392600119113922, 0.29152926802635193, -0.6960570216178894, 0.19808223843574524, -0.5775262117385864, 0.2946930229663849, 0.4178234338760376, 0.954826295375824, 0.8942540884017944, 0.34307727217674255, ...
def conv3x3 ( in _ planes, out _ planes, stride = 1 ) : return nn. conv2d ( in _ planes, out _ planes, kernel _ size = 3, stride = stride, padding = 1, bias = false )
[ 0.9446840286254883, -0.03730257228016853, 0.3336145579814911, 0.19440624117851257, -1.2206488847732544, 1.280963659286499, -1.3977582454681396, -0.0411563441157341, -0.4501476287841797, 0.608845591545105, -0.20295453071594238, 0.006514042615890503, -0.17177630960941315, -1.4275084733963013...
def print _ next _ prime ( number ) : index = number while true : index + = 1 if is _ prime ( index ) : print ( index )
[ -0.6826499700546265, 0.6198781132698059, 0.42932355403900146, 0.40832751989364624, -0.4688543379306793, 0.29410499334335327, 0.1233285441994667, -0.7061336040496826, 0.7921165227890015, -0.3820302486419678, -0.13870258629322052, 0.8450942039489746, -0.9523283243179321, -0.32396310567855835...
def get _ masked _ cnv _ manifest ( tcga _ id ) : payload = { " filters " : json. dumps ( { " op " : " and ", " content " : [ { " op " : " in ", " content " : { " field " : " cases. project. program. name ", " value " : [ " tcga " ] } }, { " op " : " in ", " content " : { " field " : " cases. project. project _ id ", "...
[ -0.4099125862121582, 0.22960124909877777, 0.43817809224128723, -0.40084362030029297, -0.13215060532093048, -0.6471033096313477, 0.046840470284223557, -0.6198199987411499, 0.12104994058609009, 0.5202392339706421, -0.008029439486563206, 0.6694949865341187, 0.1666022092103958, 0.7170224785804...
def test _ minimal _ data ( ufo _ module ) : font = generate _ minimal _ font ( ) family _ name = font. familyname ufos = to _ ufos ( font, ufo _ module = ufo _ module ) assert len ( ufos ) = = 1 ufo = ufos [ 0 ] assert len ( ufo ) = = 0 assert ufo. info. familyname = = family _ name # assert ( ufo. info. stylename, = ...
[ -0.869940996170044, 0.10030785202980042, 0.42028459906578064, -0.9385673999786377, 0.9390328526496887, 0.9010645747184753, 0.4051511883735657, -0.5510762333869934, 1.0364106893539429, -1.256192922592163, -1.071992039680481, -0.26404592394828796, 0.013758759014308453, 0.10185891389846802, ...
def _ _ init _ _ ( self, d _ ff, n _ experts = 64, temperature = 0. 7, mode ='train ', kernel _ initializer = init. glorotuniforminitializer ( ), bias _ initializer = init. randomnormalinitializer ( 1e - 6 ) ) : super ( ). _ _ init _ _ ( name = f'blocksparseff _ { d _ ff }') self. _ mode = mode self. _ d _ ff = d _ ff ...
[ 0.4413129389286041, 1.0187268257141113, 0.7356849908828735, 0.47729673981666565, -0.5513536930084229, -0.08354270458221436, 0.733368456363678, 0.7364465594291687, -0.4022020697593689, -0.6383366584777832, -0.7814684510231018, -0.26356256008148193, 0.02862302027642727, 1.0821095705032349, ...
def write _ remainder _ sams ( samlist, outfile, legal ) : goodcount, badcount = int ( 0 ), int ( 0 ) for infile in samlist : with open ( infile,'r') as fhin, open ( outfile,'a') as fhout : for line in fhin : if not line. startswith ( " @ " ) and len ( line. split ( ) ) > 5 : if good _ cigar ( legal, line. split ( ) [ ...
[ 0.083758644759655, -0.9998447895050049, 0.6048999428749084, 0.3058834373950958, -0.36686015129089355, -0.15964160859584808, 0.512241005897522, 0.5921108722686768, -0.22223956882953644, 0.388617604970932, -0.37425318360328674, -0.04498185217380524, -0.7388846278190613, 1.0306260585784912, ...
def extensions ( self ) : extension _ list = [ ] # from the empty tile : # check a direction # make it a list and look it an index # try nested lists, call a helper to de - tuple and retuple before you # add the mn puzzle to the extensions list maingrid = de _ tuple ( self. from _ grid ) # all i need is the index of th...
[ 0.13267287611961365, 0.7032016515731812, 0.9632659554481506, 0.7793552279472351, -1.0796862840652466, -0.1819400191307068, 0.17430123686790466, 0.6559556722640991, 1.2784316539764404, 0.8323776125907898, -0.5441790819168091, 0.07666438817977905, -0.7530814409255981, 0.3987100124359131, -...
def join _ data ( scores _ df, stats _ df, odds _ df ) : # add dates to join on scores _ df ['year'] = scores _ df ['start']. apply ( lambda x : datetime. datetime. strptime ( x, " % y - % m - % d % h : % m : % s " ). year ) scores _ df ['month'] = scores _ df ['start']. apply ( lambda x : datetime. datetime. strptime ...
[ 0.42054304480552673, -0.13061422109603882, 1.3093647956848145, 0.0311848483979702, 0.13573628664016724, 1.515331506729126, -0.046864498406648636, -0.3266502320766449, -0.3094229996204376, 0.3211192488670349, 0.32301682233810425, 0.5383102297782898, -0.34526389837265015, -0.0710372179746627...
def render _ page ( text, filename = none, gfm = false, context = none, render _ offline = false, username = none, password = none, style _ urls = [ ] ) : content = render _ content ( text, gfm, context, render _ offline, username, password ) return index _ template. render ( content = content, filename = filename, sty...
[ -0.05490076541900635, 0.255514532327652, 0.36714568734169006, 0.17467792332172394, -0.9996292591094971, -0.031137919053435326, -0.6435537934303284, 0.9480693340301514, 0.15294168889522552, 0.9801785349845886, 0.8174355626106262, -0.5202834010124207, -1.3142999410629272, -0.6135827898979187...
def eval ( self, context : mapping = { } ) - > t : code = compile ( ast. expression ( body = self ),'< expr > ','eval') try : return eval ( code, { }, context ) except nameerror : miss = { k for k in _ iter _ names ( self ) if k not in context } raise nameerror ( trans. _ ('names required to eval this expression are mi...
[ -0.415310800075531, -0.10519782453775406, 0.5690746307373047, -0.38905569911003113, -0.16473670303821564, 0.23725996911525726, -0.6616446375846863, 0.12538819015026093, 0.2680363059043884, 0.1640513837337494, -0.8194881677627563, 0.1641812026500702, 0.3525444567203522, 0.36436355113983154,...
def compute _ optimal _ thresh ( scores _ with _ gt ) : pos _ scores = [ ] neg _ scores = [ ] for score _ with _ gt in scores _ with _ gt : if score _ with _ gt ['is _ same'] : pos _ scores. append ( score _ with _ gt ['score'] ) else : neg _ scores. append ( score _ with _ gt ['score'] ) hist _ pos, bins = np. histogr...
[ -0.25556519627571106, 0.4349476993083954, 0.8518245816230774, 0.2914300858974457, 0.13902676105499268, 0.2834699749946594, 0.4843733310699463, -0.2299194484949112, -0.4636271595954895, 1.64298415184021, -0.2390180379152298, 0.38419970870018005, -0.5951499938964844, 0.09523186087608337, 0...
def run _ xgb _ full ( x _ train, y _ train, x _ test, y _ test, randseed, i, param _ grid, n _ trials, timeout, do _ plot, full _ path, training _ subsample, use _ uniform _ fi, primary _ metric ) : # check whether hyperparameters are fixed ( i. e. no hyperparameter sweep required ) or whether a set / range of values ...
[ 0.20104879140853882, 0.8693698048591614, 1.1179251670837402, 1.1749248504638672, -0.18589532375335693, 0.5309116244316101, 0.4092174172401428, 0.5662798881530762, -0.7626635432243347, 0.7862021923065186, 0.06440253555774689, 0.8393986821174622, 0.11642733961343765, -0.01532015297561884, ...
def api _ sen _ tokenizer _ call ( js, lang ) : if lang = = " en " : req = requests. post ( english _ tokenizer _ api, json = js ) elif lang = = " hi " : req = requests. post ( hindi _ tokenizer _ api, json = js ) else : print ( " not valid langauge code " ) return none obj = json. loads ( req. text ) sentences = [ i. ...
[ -0.8665065169334412, -0.6935238242149353, 0.6882030963897705, -0.3348644971847534, -0.34347233176231384, -1.342261791229248, -1.8208179473876953, -0.7126876711845398, -0.24180684983730316, 0.7408460378646851, -0.9890586733818054, 0.13453397154808044, -0.511949896812439, 0.6893851161003113,...
def pythagorean _ projection ( loc1, loc2 ) : lat1, lat2 = float ( loc1 [ 0 ] ), float ( loc2 [ 0 ] ) lon1, lon2 = float ( loc1 [ 1 ] ), float ( loc2 [ 1 ] ) mean _ lat = ( lat1 + lat2 ) / 2 delta _ lat = ( lat2 - lat1 ) * ( pi / 180 ) # converting from degree - decimal to radians delta _ lon = ( lon2 - lon1 ) * ( pi /...
[ -0.13097338378429413, -0.7670541405677795, 0.750925600528717, -0.8986295461654663, -0.3333105444908142, 0.42087075114250183, -0.7445048093795776, 0.18283472955226898, -0.1753029227256775, 1.0384005308151245, -0.09731204062700272, -0.048294395208358765, -0.10709498822689056, -1.149786233901...
def compsolid ( * args ) : return _ topods. topods _ compsolid ( * args )
[ 0.6838375926017761, -0.5284222960472107, 0.2156296670436859, -0.7770741581916809, 0.08495823293924332, 1.2120115756988525, 0.7096781134605408, -0.8750172853469849, 0.554201602935791, -0.5959731340408325, 0.1666834056377411, 0.13108980655670166, -1.393792986869812, 0.20415091514587402, -0...
def _ _ call _ _ ( self, batch ) : # current phrase input _ lengths, ids _ sorted _ decreasing = torch. sort ( torch. longtensor ( [ len ( x [ 1 ] ) for x in batch ] ), dim = 0, descending = true ) max _ input _ len = input _ lengths [ 0 ] text _ padded = torch. longtensor ( len ( batch ), max _ input _ len ) text _ pa...
[ 0.14234618842601776, 0.09600216895341873, 1.2004014253616333, -0.7232620120048523, -0.6726095676422119, 0.35135599970817566, -0.041142381727695465, 0.050797924399375916, 0.02347581833600998, 0.9127684235572815, -0.09249939769506454, -0.1255713701248169, -0.05337002873420715, 0.406305730342...
def get _ live _ labels ( df ) : logger. info ('getting descriptors labels...') # todo : progress indicator res = df. apply ( lambda r : get _ live _ descriptors _ labels ( r, r. iso _ lang ), axis = 1 ) # update the uris because some of them cannot be resolved especially for french # and also to maintain the same orde...
[ -0.6524015069007874, -0.21418136358261108, 0.29423096776008606, -0.09104049950838089, 0.6625307202339172, -0.6315950751304626, -0.8131698966026306, 0.8874825835227966, -0.5252866148948669, 0.0031279283575713634, 0.6241098046302795, -0.3901905417442322, 0.5150662064552307, -0.15766066312789...
def find _ n _ comps _ to _ use ( data, threshold, rand _ state, scaler = none ) : # if a scaler is not passed, create one and use it # pca performs much better when the data is scaled if scaler = = none : df = standardscaler ( ). fit _ transform ( data ) else : df = scaler. fit _ transform ( data ) # create the pca ob...
[ -0.5007968544960022, -0.28607186675071716, 0.7395884990692139, -0.4077579379081726, -0.5180196762084961, -0.9059302806854248, -0.04931160435080528, 0.35828274488449097, 0.4109976887702942, -0.5451757907867432, 0.07969391345977783, 0.013284093700349331, -0.04481557756662369, 0.6348371505737...
def no _ device ( self ) - > optional [ pulumi. input [ bool ] ] : return pulumi. get ( self, " no _ device " )
[ -0.7464911937713623, 1.0520031452178955, 0.43476402759552, 0.8663748502731323, 0.5599771738052368, 1.2600311040878296, 0.8512990474700928, 0.2480563074350357, -0.10537371039390564, -0.43836283683776855, 0.6937904357910156, 0.8024340271949768, -0.5977774262428284, -0.11210591346025467, -0...
def _ _ init _ _ ( self ) : frame. _ _ init _ _ ( self ) self. master. title ( " blackjack " ) self. grid ( ) # add the command buttons self. _ hitbutton = button ( self, text = " hit ", command = self. _ hit ) self. _ hitbutton. grid ( row = 0, column = 0 ) self. _ passbutton = button ( self, text = " pass ", command ...
[ 0.4719611406326294, 0.246175616979599, 1.0926443338394165, 0.37449905276298523, 0.055129438638687134, -0.310721218585968, 0.16392524540424347, 0.28975382447242737, 0.07391031831502914, -0.08658543974161148, -0.4878203868865967, -0.21359439194202423, 0.08183994889259338, 1.3910865783691406,...
def test _ advantage ( self ) : reward _ normalizer, strategy = self. _ setup (. 5 ) # apply update. targets = tf. range ( 20, dtype = tf. float32 ) self. _ update _ normalization _ statistics ( reward _ normalizer, strategy, targets ) # verify that normalization works correctly by seeing if the unnormalized # advantag...
[ 0.18681178987026215, 0.08599305152893066, 0.6020833253860474, 0.07656095176935196, 0.7252457737922668, 0.048894669860601425, 0.22033143043518066, 0.3709079623222351, 0.895211935043335, 0.09904641658067703, -0.15975958108901978, 0.19416843354701996, -0.4235750734806061, -0.27632391452789307...
def query _ esbl _ pts ( observation _ window _ hours ) : query = " " " with admissions as ( select admits. subject _ id, admits. hadm _ id, admits. admittime, admits. deathtime, microb. charttime, case when admits. deathtime < microb. charttime then 1 else 0 end as death _ before _ rslt, date _ diff ('hour ', admits. ...
[ 0.30441439151763916, -0.1278829127550125, 0.6765363812446594, -0.2277144193649292, -0.5717859268188477, -0.013570835813879967, -0.02828708477318287, -0.22957541048526764, -0.24060103297233582, 0.6401227712631226, 0.38263335824012756, 0.8085368275642395, 0.03646662086248398, 0.6515815258026...
def teststickyfindchromeuprevcandidate ( self ) : stable _ ebuilds = self. _ getstableebuilds ( ) candidate = cros _ mark _ chrome _ as _ stable. findchromeuprevcandidate ( stable _ ebuilds, constants. chrome _ rev _ sticky, self. sticky _ branch ) self. assertequal ( candidate. ebuild _ path, self. sticky _ rc )
[ 0.9686802625656128, -0.15325471758842468, 0.40529102087020874, 0.9075713157653809, 0.43465033173561096, 0.6609824895858765, 1.1873984336853027, 0.2964801490306854, -0.39665618538856506, -0.15147830545902252, 0.04046642780303955, 0.4869350492954254, -0.6214292049407959, 0.6178904175758362, ...
def zeros ( myshape, typecode = float, savespace = 0, axes = none, attributes = none, id = none, grid = none, dtype = none ) : dtype = _ convdtype ( dtype, typecode ) maresult = numpy. ma. zeros ( myshape, dtype = dtype ) return transientvariable ( maresult, axes = axes, attributes = attributes, id = id, grid = grid )
[ -0.27304506301879883, 0.10355543345212936, 0.6020961999893188, -0.677260160446167, -0.47931763529777527, -1.1742818355560303, -0.07614171504974365, -0.41210025548934937, 0.09567222744226456, -0.10659383237361908, -0.7279548048973083, 0.884204626083374, 0.12864135205745697, -0.3567689657211...
def register _ resource _ storage ( service _ name, service _ factory ) : def decorator ( cls ) : resourcestoragefactory. register _ factory ( service _ name, service _ factory ) return cls return decorator
[ -0.256450891494751, 0.037649255245923996, 0.4254210591316223, -0.016478803008794785, -0.4075142741203308, -0.23245294392108917, -0.17687298357486725, -0.32655617594718933, 0.27158302068710327, -0.022188272327184677, 0.0812406837940216, 0.06587949395179749, 0.9629020094871521, 0.08105731755...
def test _ no _ alchemical _ atoms ( ) : toluene = testsystems. tolueneimplicit ( ) # create parameters. with the exception of atom _ indices, all other # parameters must be legal, we don't want to catch an exception # different than the one we are testing. phase = alchemicalphase ( name ='solvent - implicit ', referen...
[ 0.10910773277282715, 0.5168426632881165, 0.32725125551223755, -0.8170341849327087, 0.5080408453941345, 0.8027140498161316, -0.027491487562656403, -0.426889032125473, -0.18936854600906372, -0.2053859829902649, -0.1525105983018875, -0.21227984130382538, 0.24037319421768188, -0.71663075685501...
def draw ( self ) : self. headerview. draw ( ) if self. player. phasecompleted : print " 1 : try to hit a match pile. \ r " else : print " 1 : try to complete the phase. \ r " print " 2 : discard and end turn. \ r "
[ 0.018343795090913773, -0.2308814823627472, 0.6750292778015137, -0.5494815707206726, -0.03002648614346981, 0.2873348891735077, 0.22485753893852234, -0.11699959635734558, -0.2329871654510498, -0.31255707144737244, 0.2092605084180832, -0.21022860705852509, -0.6658229231834412, -0.407441347837...
def get _ page _ layout ( filename, line _ overlap = 0. 5, char _ margin = 1. 0, line _ margin = 0. 5, word _ margin = 0. 1, boxes _ flow = 0. 5, detect _ vertical = true, all _ texts = true, ) : with open ( filename, " rb " ) as f : parser = pdfparser ( f ) document = pdfdocument ( parser ) if not document. is _ extra...
[ 0.26878222823143005, -0.5568346977233887, 0.9062854647636414, -0.14594081044197083, -0.97418212890625, -0.10826440900564194, 0.8056173324584961, 0.6761157512664795, -0.48942968249320984, -0.18733353912830353, 0.6415289640426636, -1.314984917640686, -0.04306384176015854, -0.2008944153785705...
def new ( * args, * * kargs ) : obj = itksmoothingrecursivegaussianimagefilterif3if3. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.7433047294616699, 1.3547863960266113, 0.1576082557439804, -0.22343821823596954, -0.3914796710014343, 0.4103618264198303, 0.2916713058948517, -1.0505291223526, -0.07305487245321274, -0.09792309999465942, -0.11722228676080704, 0.1215030699968338, -0.7776317596435547, 1.4336731433868408, ...
def main ( argv ) : args = sys. argv [ 1 : ] if ( len ( args ) < 2 ) : print ( " usage :. / markdown2html. py readme. md readme. html ", file = sys. stderr ) sys. exit ( 1 ) if ( not os. path. isfile ( args [ 0 ] ) ) : print ( " missing ", args [ 0 ], file = sys. stderr ) sys. exit ( 1 ) inputfile = args [ 0 ] outputfi...
[ 0.05131669342517853, -0.14417973160743713, 1.1373127698898315, 1.304463267326355, -0.12142839282751083, 0.9488410353660583, 0.4268130660057068, 0.7411385774612427, -1.3528392314910889, 0.33894363045692444, 1.7369898557662964, 0.5091818571090698, -0.051635947078466415, 0.07149806618690491, ...
def _ build _ actor _ network ( self ) : state = k. layers. input ( shape = ( self. state _ dim [ 0 ], ), name ='state _ input') advantage = k. layers. input ( shape = ( 1, ), name ='advantage _ input') old _ prediction = k. layers. input ( shape = ( 2 * self. action _ n, ), name ='old _ prediction _ input') dense = k....
[ -0.8154069781303406, -1.4440441131591797, 0.7056475877761841, 0.33977973461151123, -0.3283268213272095, -0.09617852419614792, 0.047417812049388885, 0.6083137392997742, 0.17642369866371155, 0.5412963032722473, 0.041802071034908295, 0.954334020614624, 0.5845959782600403, 0.3710070252418518, ...
def get _ articles ( category ) : base = " https : / / inshorts. com / en / read / " # we concatenate our base _ url with the category url = base + category # set the headers to show as netscape navigator on windows 98, b / c i feel like creating an anomaly in the logs headers = { " user - agent " : " mozilla / 4. 5 ( ...
[ -0.5600929856300354, -0.09119696170091629, 0.637382447719574, -0.3431854248046875, -0.7824073433876038, -0.8489193320274353, -1.1230871677398682, -0.06824152171611786, -0.5493189692497253, 0.1174779161810875, -0.5399189591407776, -0.021974636241793633, 0.1520838588476181, 0.861404716968536...
def term ( self ) : result = self. factor ( ) while self. c _ token. type in ( mul, div ) : token = self. c _ token if token. type = = mul : self. eat ( mul ) result = result * self. factor ( ) elif token. type = = div : self. eat ( div ) result = result / self. factor ( ) return result
[ -0.01298382505774498, 0.030993670225143433, 0.6831621527671814, 0.20494228601455688, -0.8064286708831787, -0.26064351201057434, 0.3139689266681671, -0.03699282556772232, 0.08372755348682404, -0.3692443072795868, -0.2103194296360016, 0.04201916977763176, -0.7399342656135559, 0.2239438444375...
def test _ as _ dict ( self ) : xyz _ 1 = {'symbols': ('c ','h ','h ','h ','h'),'isotopes': ( 12, 1, 1, 1, 1 ),'coords': ( ( 0. 0, 0. 0, 0. 0 ), ( 0. 6300326, 0. 6300326, 0. 6300326 ), ( - 0. 6300326, - 0. 6300326, 0. 6300326 ), ( - 0. 6300326, 0. 6300326, - 0. 6300326 ), ( 0. 6300326, - 0. 6300326, - 0. 6300326 ) ) } ...
[ 0.36887091398239136, -0.24630525708198547, 0.5222288966178894, -1.222923994064331, -0.16694094240665436, -0.08744564652442932, -0.16987384855747223, -0.5391753911972046, -0.18530629575252533, -0.1412704586982727, -0.6383209228515625, 0.2874085605144501, -0.06359045952558517, -0.23103488981...
def post ( self, resource, data ) : uri = self. _ mk _ uri ( resource ) data = json. dumps ( data ) rsp = requests. post ( uri, headers = self. _ mk _ headers ( ), data = data ) self. _ check _ response ( rsp, uri ) return json. loads ( rsp. text )
[ -0.9489638805389404, -0.6059800982475281, 0.45456355810165405, -0.5769397616386414, -1.1123324632644653, -0.05351870879530907, -1.3808847665786743, -0.7853214740753174, -0.20683354139328003, -0.277977854013443, -1.0489041805267334, -0.0419682078063488, -0.9801085591316223, -0.3806178569793...
def parse _ year _ page ( self, response ) : events = response. css ( '. decision') for event in events : event _ name = event. css ( '. list : : text'). get ( ) event _ date = datetime. datetime. strptime ( event. css ( '. list - center : : text'). get ( ). replace ('\ xa0 ','' ),'% b % d, % y'). date ( ) if ( ('ufc'i...
[ 0.1088935136795044, -0.24952812492847443, 0.8385989665985107, 0.14577975869178772, -0.22318583726882935, 0.15364859998226166, -0.21307635307312012, 0.22867491841316223, 0.4217122197151184, 0.09653062373399734, 0.5833312273025513, -0.38088420033454895, 0.7043330669403076, 0.7380459308624268...
def _ _ init _ _ ( self, id = none, name = none, slug = none, status = none, region = none, tenant = none, facility = none, asn = none, time _ zone = none, description = none, physical _ address = none, shipping _ address = none, latitude = none, longitude = none, contact _ name = none, contact _ phone = none, contact ...
[ 1.1527373790740967, 0.06900428235530853, 0.6820595264434814, -0.6028344035148621, 0.3479154706001282, -0.36961621046066284, -0.09844651818275452, -0.1362304985523224, 0.4696734547615051, 0.1379285305738449, -0.3192475736141205, 0.4694671630859375, 0.26961976289749146, -0.04272627457976341,...
def mypoints ( self, n ) : return self. pointslist [ n ]
[ -1.2113494873046875, -0.15301613509655, 0.08521119505167007, 0.06207588315010071, -0.6022975444793701, 0.013612179085612297, -0.8963173031806946, -0.2032412886619568, 0.3419179618358612, -0.20285959541797638, -0.9458441138267517, 0.0336294062435627, -0.3358202576637268, -0.0519128628075122...
def executor ( self, * * executor _ config ) - > executor : if'executor'in executor _ config : executor = executor _ config ['executor'] if isinstance ( executor, executor ) : return executor if'background'in executor _ config : if executor _ config ['background'] is true : return backgroundthreadexecutor ( ) else : re...
[ 0.3240016996860504, -0.02069295570254326, 0.5709240436553955, 0.07840880751609802, -0.1539331078529358, 0.10316050797700882, -0.14905591309070587, 0.9193474054336548, 0.34761276841163635, 0.25363680720329285, 0.4547024667263031, 0.5827090740203857, -0.21701985597610474, 0.42330846190452576...
def chunks ( input _ list, n ) : for i in xrange ( 0, len ( input _ list ), n ) : yield input _ list [ i : i + n ]
[ -0.708661675453186, 0.6463679075241089, 0.3584460914134979, 0.8273283839225769, -0.027764063328504562, 0.5671972036361694, -0.6847409009933472, 0.016812413930892944, -0.45334988832473755, -0.5177115201950073, -0.5106741189956665, -0.06382542103528976, -0.2971596419811249, 0.863897919654846...
async def test _ lock _ state _ update _ bug ( caplog, v3 _ server ) : caplog. set _ level ( logging. info ) v3 _ server. post ( ( f " https : / / api. simplisafe. com / v1 / ss3 / subscriptions / { test _ subscription _ id } " " / state / away " ), status = 200, body = load _ fixture ( " v3 _ state _ away _ response. ...
[ 0.13738495111465454, -0.3247970640659332, 0.5173438787460327, -0.1228715106844902, 0.04867273196578026, 1.1275423765182495, -0.19712665677070618, -0.14487941563129425, 1.385252594947815, -0.4994747042655945, -0.46982645988464355, 0.5532491207122803, -0.43654677271842957, -0.593154728412628...
def _ _ init _ _ ( self, cap ) : self. _ capacity = cap
[ -0.46071523427963257, -0.4323521554470062, 0.3027142584323883, 0.3851151466369629, -0.47795334458351135, -0.21099060773849487, 0.5286630392074585, -0.19205217063426971, 0.17074640095233917, -0.22474515438079834, -0.5925068855285645, -0.33517956733703613, 0.8225002884864807, -0.048632211983...
def register _ service _ view ( request ) : service _ name = ar. get _ value _ multiformat _ post _ checked ( request, " service _ name " ) service _ url = ar. get _ value _ multiformat _ post _ checked ( request, " service _ url " ) service _ type = ar. get _ value _ multiformat _ post _ checked ( request, " service _...
[ -0.553788959980011, 0.3919162452220917, 0.7337109446525574, 0.2830049991607666, 0.3215862214565277, 0.35846057534217834, -0.05272962152957916, -0.8707229495048523, -0.38555923104286194, -0.31376123428344727, 0.7383764982223511, 0.46946990489959717, -0.0846056416630745, 0.4778278172016144, ...
def resource _ url ( self, resource _ url : resourceurl ) : if resource _ url is none : raise valueerror ( " invalid value for ` resource _ url `, must not be ` none ` " ) # noqa : e501 self. _ resource _ url = resource _ url
[ 0.4066304862499237, 0.15199802815914154, -0.3508438467979431, 0.8883886933326721, 0.8016281127929688, 0.836887776851654, 0.3893779218196869, 0.6119366884231567, 0.09231187403202057, 0.47271716594696045, -0.5056442022323608, -0.1970553994178772, -0.367863267660141, 0.12563098967075348, -0...
def count _ triples ( obj : str = none ) - > int : headers = {'accept':'application / json'} payload = {'o': str ( obj ),'g':'< https : / / hdt. lod. labs. vu. nl / graph / lod - a - lot >'} url ='https : / / hdt. lod. labs. vu. nl / triple / count'status _ code = 0 count _ triples = 0 while status _ code! = 200 : coun...
[ -0.45474350452423096, -0.03326171264052391, 0.7894420027732849, -0.8984042406082153, -0.23996394872665405, 0.30794548988342285, -0.7243673801422119, -0.8437164425849915, 0.2527892589569092, 0.19843170046806335, -0.9938511252403259, 0.6888170838356018, -0.13912953436374664, -0.4258079826831...
def readable _ time _ until ( now : datetime, then : date ) : then _ datetime = datetime ( year = then. year, month = then. month, day = then. day ) td = abs ( now - then _ datetime ) return human _ readable ( td )
[ 0.5762530565261841, -0.08549179136753082, 0.5174257755279541, -0.727287769317627, -1.155839204788208, 0.586411714553833, -1.613816499710083, -0.8178776502609253, -1.8198477029800415, 1.655037760734558, 0.020055824890732765, 0.12519334256649017, 1.021578073501587, -0.07430823892354965, 0....
def _ _ gettoptendomains ( ) : dbc = connection _ handler. getconnection ( ) labels, sizes = [ ], [ ] for domain in dbc. gettoptendomains ( ) : labels. append ( domain [ 0 ] ) sizes. append ( domain [ 1 ] ) return labels, sizes
[ -1.6621463298797607, 0.2111641764640808, 0.5750336647033691, -1.2616007328033447, 0.6591029763221741, -0.2705644965171814, -0.05886286124587059, -0.17237956821918488, -0.16777263581752777, 0.1598343849182129, -0.8181536197662354, 0.9377810955047607, -0.1564468890428543, 0.40351739525794983...
def total _ wealth ( self ) : value = 0 for category in self. categories : if category. category _ wealth > 0 : value + = category. category _ wealth return value
[ -0.22519679367542267, 0.28100720047950745, 0.48022738099098206, 0.24203532934188843, 1.1913648843765259, 0.10610352456569672, 0.39196404814720154, -0.3057681620121002, -0.030301203951239586, -0.7127352356910706, -0.19822606444358826, 0.20522752404212952, 0.526508092880249, 0.90345668792724...
def _ responses ( self, request ) : request = self. _ filter _ request ( request ) if not request : return for index, ( stored _ request, response ) in enumerate ( self. data ) : if requests _ match ( request, stored _ request, self. _ match _ on ) : yield index, response
[ -1.0287551879882812, -0.8097260594367981, 0.40515270829200745, -0.31730011105537415, -0.5264182090759277, -0.3633861541748047, 0.44531160593032837, -0.6465353965759277, 0.8540583848953247, -0.8140829801559448, 0.11751870065927505, -0.15421196818351746, 0.247083380818367, -0.232586100697517...
def winbio _ winbiogetproperty ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " propertytype ", " propertyid ", " unitid ", " identity ", " subfactor ", " propertybuffer ", " propertybuffersize " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ...
[ 0.7404663562774658, -0.7729101777076721, 0.5231156945228577, 1.3642419576644897, 0.2964133024215698, 0.3788311183452606, 1.1481081247329712, -0.834150493144989, 0.23057077825069427, -0.42805415391921997, 0.013449086807668209, 0.5987483263015747, -1.6124736070632935, -0.22391170263290405, ...
def get _ worker _ id _ from _ name ( worker ) : # calculate sha256 of worker id to get 32 bytes. the tc spec proxy # model contracts expect byte32. then take a hexdigest for hex str. return hashlib. sha256 ( worker. encode ( " utf - 8 " ) ). hexdigest ( )
[ 0.3938392102718353, -0.18519248068332672, 0.18911683559417725, -0.9563532471656799, -0.8442625999450684, 0.7502495050430298, -0.7828830480575562, -0.3776092529296875, 0.33779454231262207, 0.6258018612861633, -1.207012414932251, -1.1358743906021118, -0.40826109051704407, -0.2464934736490249...
def writeyarasignaturereference ( self, blob _ id : rdf _ objects. blobid, username : text, cursor : mysqldb. cursors. cursor, ) - > none : query = " " " insert ignore into yara _ signature _ references values ( % ( blob _ id ) s, % ( username _ hash ) s, now ( 6 ) ) " " " args = { " blob _ id " : blob _ id. asbytes ( ...
[ 0.2838025987148285, -0.4063818156719208, 0.8402846455574036, 0.12839429080486298, 1.0153130292892456, 0.13470706343650818, 0.9072908759117126, 0.047394219785928726, -0.4914524555206299, 0.8005132675170898, -0.8687772750854492, -0.3453505337238312, -0.7201412916183472, 0.4375546872615814, ...
def get _ label _ and _ features _ from _ dataframe ( df : pd. dataframe ) - > ( np. ndarray, np. ndarray ) : y = df. label. values x = df [ df. columns [ 1 : ] ]. values. reshape ( ( - 1, 28, 28, 1 ) ). astype ( np. float ) return x, y
[ -1.0395232439041138, -0.44528913497924805, 0.509136438369751, -0.2807859182357788, 1.2089635133743286, 0.27246418595314026, -0.29080143570899963, -0.09192223846912384, -0.2653023898601532, 0.5336111783981323, 0.11321678012609482, 0.7761574387550354, 0.24631527066230774, 0.00927157700061798...
def save ( self, name = none, build _ dir ='' ) : # use default name prefix = name or self. group. alias # add. edl suffix if not prefix. endswith ( '. edl') : prefix + = '. edl'# create saved subdisplays self. _ save _ displays ( build _ dir = build _ dir ) # set main layout self. app. window. setlayout ( self, resize...
[ 0.0234182421118021, 0.01823657751083374, 0.5949694514274597, 0.5144895911216736, -0.47781604528427124, 0.978263795375824, 1.0576307773590088, -0.12248528003692627, -0.1842617690563202, 0.22298601269721985, -0.8434266448020935, -0.11816330999135971, 0.27249252796173096, 0.7021899819374084, ...
def registerhandleronce ( self, name, handler, typ ='', ns ='', xmlns = none, makefirst = 0, system = 0 ) : if not xmlns : xmlns = self. _ owner. defaultnamespace self. registerhandler ( name, handler, typ, ns, xmlns, makefirst, system )
[ -0.3687357008457184, 1.2812793254852295, 0.3671325445175171, 0.5649796724319458, 0.8339371681213379, 0.2577020227909088, -0.7266870737075806, -0.8510038256645203, 0.6531499028205872, -1.6090304851531982, -1.0788419246673584, 0.06574300676584244, -0.2606564164161682, 0.9679492115974426, 0...
def py3bt ( debugger = none, command = none, result = none, dict = none, thread = none ) : if debugger is none : debugger = lldb. debugger lldb. target = debugger. getselectedtarget ( ) if not isinstance ( thread, lldb. sbthread ) : thread = lldb. target. getprocess ( ). getselectedthread ( ) lldb. thread = thread num ...
[ 0.5052729845046997, -0.45420047640800476, 0.983245849609375, 0.4945718050003052, 0.16931743919849396, 0.02677849866449833, -0.14478091895580292, -0.04732023552060127, 0.007993209175765514, -0.2259092926979065, -0.5051011443138123, 0.4214496314525604, -0.5880668759346008, 0.9725501537322998...
def test _ target _ tuple ( self ) : band = self. band # add a composite unique constraint : band. raw ( " alter table band add constraint id _ name _ unique unique ( id, name ) " ). run _ sync ( ) band. insert ( band ( id = self. band. id, name = self. band. name, popularity = self. band. popularity, ) ). on _ conflic...
[ -1.4433633089065552, 0.9034323692321777, 0.4992624819278717, -0.4196152985095978, 1.242526888847351, 0.636124849319458, -0.1864655315876007, -0.4234866797924042, -0.04773702099919319, 0.1771811991930008, -0.4963147044181824, -0.4853498935699463, -0.7269102931022644, -1.4329509735107422, ...
def base _ distribution ( sequences ) : import pandas as pd df = pd. dataframe ( zip ( * np. unique ( sequences, return _ counts = true ) ), columns = ['sequence ','counts'] ) df ['len'] = df ['sequence']. apply ( len ) length = np. bincount ( df ['len'], df ['counts'] ). argmax ( ) df. query ('len = = @ length') y = [...
[ 0.325175404548645, -0.4413348436355591, 0.7935664057731628, -0.5218766927719116, -0.16171251237392426, -0.17264188826084137, 0.6047654747962952, -0.13460767269134521, 0.5859395861625671, 0.27878230810165405, 0.08818738907575607, 0.4542151391506195, -0.28319787979125977, -0.2042596638202667...
def test _ port _ vs _ host _ string _ value ( self ) : eq _ ( normalize ( " localhost : 123 " ) [ 2 ], " 123 " ) eq _ ( normalize ( " myhost : 123 " ) [ 2 ], " 123 " )
[ 0.2637355625629425, -0.4863259196281433, 0.3310299813747406, -0.33060750365257263, 0.17292192578315735, 0.6933656334877014, 0.010627889074385166, 0.2120986133813858, -0.6153260469436646, 0.07327470183372498, -0.18217520415782928, 0.13379843533039093, -0.31556040048599243, -0.56192117929458...
def default _ preprocessing ( df ) : def race ( row ) : if ( ( row ['hispanx'] = = 2 ) and ( row ['racev2x'] = = 1 ) ) : # non - hispanic whites are marked as white ; all others as non - white return'white'return'non - white'df ['racev2x'] = df. apply ( lambda row : race ( row ), axis = 1 ) df = df. rename ( columns = ...
[ -0.2807225286960602, 0.12886138260364532, 0.8508135080337524, -0.7224875092506409, -0.04322492703795433, -0.20805121958255768, 0.5112557411193848, 0.05110948905348778, 0.24892951548099518, 0.21406495571136475, 0.29103291034698486, 0.33361318707466125, 0.3937365412712097, 0.5616233944892883...
def df _ last _ valid ( df ) : def func ( x ) : if x. last _ valid _ index ( ) is none : return none else : return x. last _ valid _ index ( ) df2 = df. apply ( func, axis = 0 ) return df2
[ -0.07681095600128174, 0.12447231262922287, 0.49722233414649963, 0.17028795182704926, 0.491373747587204, -0.8196446299552917, -0.007831676863133907, -0.26640284061431885, 0.2829616665840149, -0.4377230405807495, 0.8405778408050537, 0.3114396929740906, 0.0032729324884712696, -1.2460833787918...
def mm4readmolwrite ( ) : mg1 = molecularcoordinates. readmm4file ('jp10stochfixedstruct. out ', 1 ) mg2 = molecularcoordinates. readmm4file ('jp10stochfixedstruct. out ', 295 ) mg1a = molecularcoordinates. readmm4file ('jp10stochfixedstruct. out ', 253 ) mg1. writemolfile ('jp10 _ mm4 _ 1. mol ','jp10 _ mm4 _ 1') mg2....
[ 0.1544824242591858, -1.6083495616912842, 0.8903661966323853, -0.24117527902126312, 0.09767219424247742, 0.4904506504535675, 0.5221579074859619, -0.13379409909248352, -0.12378925830125809, -0.09404313564300537, 0.23086366057395935, -0.6112019419670105, 0.6244615316390991, -0.236033678054809...
def vac2air ( wavelength, density = 1. 0 ) : wl = np. array ( wavelength ) wl2inv = ( 1. e4 / wl ) * * 2 refracstp = 272. 643 + 1. 2288 * wl2inv + 3. 555e - 2 * wl2inv * * 2 return wavelength / ( 1. + 1. e - 6 * density * refracstp )
[ 0.44985100626945496, -0.7464157342910767, 0.7023887634277344, -1.051461935043335, -0.8677405714988708, 0.08333265781402588, 0.2751300632953644, -0.7589777708053589, 0.41870489716529846, -0.21333527565002441, 1.225797414779663, 0.30448785424232483, -0.2975482642650604, 0.6355173587799072, ...
def plugins _ but _ context ( self, plugins : optional [ iterable [ any ] ] ) - > _ simplugcontextbut : return _ simplugcontextbut ( self, plugins )
[ 0.03049662709236145, -0.7006072402000427, 0.452383816242218, 0.6737088561058044, 0.34449175000190735, -0.47559690475463867, 0.11990292370319366, -0.8487340211868286, 1.9050191640853882, -0.05850957706570625, -0.3483242094516754, 0.45175567269325256, -1.008487343788147, -0.4896692633628845,...
def _ _ init _ _ ( self, data _ df, transforms, image _ dir, mean = np. array ( [ 0. 90949707, 0. 8188697, 0. 87795304 ] ), std = np. array ( [ 0. 36357649, 0. 49984502, 0. 40477625 ] ), n = 16, zoom _ level = 2, crop _ size = 128, use _ saved = false, * args, * * kwargs ) : self. data _ df = pd. read _ csv ( data _ df...
[ 0.09341549128293991, 0.5765602588653564, 0.6612356305122375, -0.005837774369865656, -0.3534368872642517, -0.4907752275466919, 0.3302176594734192, -0.012455093674361706, 0.2728613615036011, 0.06842126697301865, -0.4690239429473877, 0.3980567455291748, 0.993360698223114, 0.03270512446761131,...
def _ multiply _ from _ left ( mat _ list ) : out = mat _ list [ 0 ] for mat in mat _ list [ 1 : ] : out = out @ mat return out
[ 0.43506231904029846, -0.2462846338748932, 0.5973352789878845, 0.5739152431488037, 0.1725926250219345, 0.5777294039726257, -0.3110705316066742, -0.5062543749809265, 0.7791637778282166, 0.6670902967453003, -0.927983283996582, -0.9366324543952942, -0.40966111421585083, 1.2878053188323975, 0...
def to _ array ( self ) - > np. ndarray : array = np. zeros ( [ self. n, 4 ] ) i = 0 for couple in self. cs : array [ i, : ] = couple. to _ array ( ) i = i + 1 return array
[ -0.7040498852729797, -0.1805591881275177, 0.4813975989818573, -0.1259804219007492, 1.1921567916870117, 0.13050495088100433, 0.5786219835281372, -0.9716905951499939, -0.06033927947282791, -0.3393101990222931, -0.5945067405700684, -0.08337010443210602, -0.22905084490776062, 0.574248075485229...
def set _ row _ data ( self, rows : list, min _ cols : int = - 1, max _ search _ index : int = 2000 ) - > bool : # empty row list if not rows : self. setrowcount ( 1 ) self. setcolumncount ( 5 ) if min _ cols > 0 : self. setcolumncount ( min _ cols ) return false n _ row = len ( rows ) # detect delimiter ( comma or tab...
[ -0.7819913625717163, 0.8066300749778748, 0.8046518564224243, -0.10049000382423401, -0.43372222781181335, -0.012551506981253624, -0.316568523645401, -0.033548690378665924, -0.368208110332489, -0.13642998039722443, -0.5747063755989075, -0.8914119005203247, 0.16021685302257538, 0.060765914618...
def iter _ match ( self, topic ) : lst = topic. split ( " / " ) normal = not topic. startswith ( " $ " ) def rec ( node, i = 0 ) : if i = = len ( lst ) : if node. content is not none : yield node. content else : part = lst [ i ] if part in node. children : for content in rec ( node. children [ part ], i + 1 ) : yield c...
[ -0.04302623122930527, 0.04645022004842758, 0.9112743735313416, 0.2994319796562195, -1.3316090106964111, 0.3141344487667084, 0.7230040431022644, -0.44731107354164124, -0.34757643938064575, -0.10915622860193253, 0.9315198659896851, -0.4038669466972351, -0.9686448574066162, 0.0601186603307724...
def test _ get _ landmarks _ for _ redetect _ one ( self ) : for case in self. landmarkscases : with self. subtest ( landmarks5 = case. detect5landmarks, landmarks68 = case. detect68landmarks ) : for detector in self. detectors : with self. subtest ( detectortype = detector. detectortype ) : detectone = detector. detec...
[ 0.3461827039718628, 0.40472763776779175, 0.44782280921936035, 1.1008661985397339, 1.1439048051834106, 0.14297758042812347, 0.3654768168926239, -0.015073156915605068, 1.008284091949463, -0.3698490560054779, -0.3305132985115051, -0.1146276518702507, 0.24768739938735962, 1.1169745922088623, ...
def _ _ init _ _ ( self, capacity ) : self. capacity = capacity # capacity of your queue self. head = none # expect an instance of type node - this is the starting point of the linked list self. tail = none self. num _ items = 0 # number of elements in the queue
[ 0.10600917786359787, -0.9073665142059326, 0.4273971915245056, 0.14731131494045258, 0.06172504276037216, -0.8637951016426086, 0.46844905614852905, 0.43800631165504456, 0.3575019836425781, -0.47042781114578247, -0.5785439610481262, 0.6067846417427063, -0.04079413414001465, 0.7274489402770996...
def test _ cant _ delete _ car _ invalid _ id ( self ) : json _ response = api _ call ( self, " delete ",'/ car / delete ', dict ( id = 102030 ), 200, true ) self. assertequal ( json _ response [ " status _ code " ], 404 ) self. assertequal ( json _ response [ " message " ], " car not found " ) json _ response = api _ ...
[ -0.6048396229743958, -0.5493239760398865, 0.7225611805915833, 0.010114100761711597, 0.5490953922271729, 0.23418165743350983, -1.1937353610992432, 0.5014215707778931, -0.14520740509033203, -0.13659803569316864, -0.6426377892494202, 0.19576005637645721, -0.4686596393585205, 0.427962958812713...
def solve _ map ( expr, vars ) : lhs _ values, _ = _ _ solve _ for _ repeated ( expr. lhs, vars ) def lazy _ map ( ) : try : for lhs _ value in repeated. getvalues ( lhs _ values ) : yield solve ( expr. rhs, _ _ nest _ scope ( expr. lhs, vars, lhs _ value ) ). value except errors. efilternoneerror as error : error. roo...
[ -0.7854538559913635, 0.09195469319820404, 0.6431965231895447, -0.0963769257068634, 0.0757903903722763, -0.9480271339416504, -0.2860179543495178, -0.07388697564601898, -0.06645353138446808, -0.005812448915094137, -0.4539579153060913, 0.00838999543339014, 0.5829897522926331, 0.68021374940872...
def connect _ exit _ signal _ to _ slot ( self, slot ) : self. exit _ signal. connect ( slot )
[ -1.3656436204910278, -0.5641583204269409, 0.29374387860298157, -0.5086788535118103, -0.3735346496105194, 0.676342248916626, -0.053508397191762924, -0.5707150101661682, -0.906832754611969, 1.1206424236297607, -0.9368072748184204, -0.4359458088874817, 0.20620843768119812, 0.6676062345504761,...
def description ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " description " )
[ 1.4110032320022583, 0.002744983648881316, 0.40980464220046997, 0.6387355923652649, 0.5551992654800415, 0.2977924942970276, -0.4041776955127716, -0.348375529050827, 0.4860498309135437, 0.1632668823003769, 0.685564398765564, 0.6303316950798035, -0.1967124342918396, -0.8524026870727539, -1....
def create _ connection ( url, timeout = none, username = " ", password = " ", loop = none, session = none, force _ close = false, future _ class = none, connector = none ) : loop = loop or asyncio. get _ event _ loop ( ) graph = graphdatabase ( url, timeout = timeout, username = username, password = password, loop = l...
[ -1.067939281463623, 0.6670646071434021, 0.6043651700019836, 0.7388110160827637, -0.8395823240280151, -0.5267227292060852, -0.21585656702518463, 0.4257229268550873, -0.12562762200832367, 0.6152395606040955, -0.08482179790735245, -0.21245117485523224, -0.22467803955078125, -0.498673319816589...
def _ _ ge _ _ ( self, other ) : sort _ vec = sorted ( self, reverse = true ) sort _ other = sorted ( other, reverse = true ) for first, second in zip ( sort _ vec, sort _ other ) : if first < second : return false return true
[ -0.7179921269416809, 0.8680705428123474, 1.0838162899017334, 0.3498735725879669, 0.5320769548416138, 0.5555856823921204, -0.4045320749282837, -0.8621709942817688, -1.1232188940048218, -0.22384639084339142, -0.40963780879974365, -0.8286238312721252, -0.5425792336463928, 0.49307990074157715,...
def _ commonmarkasstabletest ( self, chrome _ rev, new _ version, old _ ebuild _ path, new _ ebuild _ path, commit _ string _ indicator ) : self. mox. stuboutwithmock ( cros _ build _ lib,'runcommand') self. mox. stuboutwithmock ( portage _ utilities. ebuild,'commitchange') stable _ candidate = cros _ mark _ chrome _ a...
[ 0.23743075132369995, -0.17415590584278107, 0.7262363433837891, 0.4694463312625885, 1.1243319511413574, 0.9534248113632202, 0.7555217146873474, 0.03278461471199989, -0.11452654749155045, 0.26325032114982605, -0.3061375617980957, 0.776206374168396, -0.38325071334838867, -0.03137706592679024,...
def inspecttheoreticals ( self, cell ) : if cell. reqsides is not none and not cell. isfullyset ( memoize = true ) : # get the number of actual blank sides and actual active sides actualblankcount = cell. countblanksides ( ) actualactivecount = cell. countactivesides ( ) setsidescount = actualactivecount + actualblankc...
[ 0.04153362289071083, 0.6654387712478638, 0.8369993567466736, -0.387399822473526, 0.6296340227127075, -0.3200451731681824, 0.5780586004257202, -0.4606388509273529, 0.04747301712632179, -0.3345436751842499, 0.15368883311748505, 0.0875011533498764, 0.4162583351135254, 0.5327884554862976, 0....
async def createmarkdownformergerequest _ linux ( gl, event, project _ id, gitlab _ clone _ url, namespace, source _ branch, target _ branch, merge _ iid, merge _ error, path _ with _ namespace ) : # add git credentials to clone url replacementstring ='https : / /'+ os. environ. get ('git _ user') +':'+ os. environ. ge...
[ 0.4259692430496216, -0.10937397181987762, 1.0219420194625854, 0.4974769055843353, 0.4618169963359833, 0.9282350540161133, -0.8171272873878479, 0.19558106362819672, -0.7632067203521729, -0.2162483036518097, 0.1524171531200409, 0.6230438947677612, -0.19312486052513123, 0.9107423424720764, ...
def get _ text _ from _ subnode ( self, subnode _ xpath _ expr ) : sub _ node = self. node. find ( subnode _ xpath _ expr ) if sub _ node is not none : return sub _ node. text return none
[ 0.668228268623352, 0.07089037448167801, 0.524043619632721, 0.19909873604774475, -0.9857202172279358, -0.2614818215370178, -0.49051544070243835, -0.10233213007450104, 0.04810534417629242, 0.36434319615364075, -0.17314395308494568, 1.2380961179733276, -0.1438073217868805, -0.8754240870475769...
def calc _ action _ log _ probs ( output : torch. tensor, sequences : torch. longtensor, num _ actions : int ) - > torch. tensor : logits = output ['logits'] log _ probs = _ log _ probs _ from _ logits ( logits [ :, : - 1, : ], sequences [ :, 1 : ] ) return log _ probs [ :, - num _ actions : ]
[ 0.21887080371379852, -0.7673349380493164, 0.27619147300720215, -0.1776350736618042, -0.30642080307006836, -0.7352346777915955, -0.23408758640289307, -0.22040989995002747, 0.5772073268890381, 0.9877753853797913, -0.18989470601081848, 0.6062465310096741, 0.13830196857452393, -1.4908359050750...
def test _ publican _ go _ to _ counter ( self ) : # by defaut, our tavern is created with a publican publican = self. tavern. creatures [ 0 ] self. assertcanticktilltaskis ( publican, serving, 20 )
[ 0.37074732780456543, 0.707457959651947, 0.194340780377388, -0.14875201880931854, 0.6974567174911499, 1.0793590545654297, 1.3724299669265747, -0.11539608240127563, -1.1256024837493896, -0.437123566865921, -1.0691652297973633, 0.4726371169090271, -0.09307747334241867, 0.7694500684738159, -...
def _ _ init _ _ ( _ _ self _ _, *, created _ time : str, endpoint _ type : str, primary _ connection _ string : str, provisioning _ state : str, dead _ letter _ secret : optional [ str ] = none, secondary _ connection _ string : optional [ str ] = none ) : pulumi. set ( _ _ self _ _, " created _ time ", created _ time...
[ -0.6052572727203369, 0.1106940284371376, 0.6815627217292786, 0.8483478426933289, 0.8621913194656372, 0.906305193901062, -0.7228526473045349, 0.48168304562568665, 0.05264418199658394, 0.1693829596042633, -1.359786033630371, 0.6955173015594482, 0.016536202281713486, -0.25294896960258484, -...
def is _ engineered ( self ) : return self. _ is _ eng
[ -0.8372769951820374, 0.6293359398841858, 0.21381576359272003, 0.6744816899299622, 0.42329901456832886, 0.9622170925140381, 0.2648514211177826, 0.009731952100992203, 0.2996390759944916, 0.02217171899974346, -0.46260038018226624, 0.3470304608345032, -0.05500485375523567, -0.16227878630161285...
def send _ email ( name, email, mess ) : mail = mailer ( host = email ['host'], port = email ['port'], use _ tls = email ['use _ tls'], usr = email ['user'], pwd = email ['password'] ) message = message ( from ='help @ rxmedaccess. com ', to = ['oyefesobi. paul @ gmail. com'], subject = " message from { } ". format ( e...
[ 0.21633070707321167, -0.15633821487426758, 0.5911248326301575, 0.31073591113090515, -0.06403046101331711, 0.5871062278747559, -0.6647276878356934, -0.279159277677536, -0.7866001129150391, 0.3454207479953766, -0.35379934310913086, 1.122626781463623, -0.39959070086479187, -0.0722877755761146...
def collect _ representation ( self, *, pipeline = none, dialect = " python " ) : self. columns _ used ( ) # for table consistency check / raise return self. collect _ representation _ implementation ( pipeline = pipeline, dialect = dialect )
[ -0.9063609838485718, 0.39193305373191833, 0.4217086434364319, -0.4060390293598175, 0.38270246982574463, -0.6860529780387878, 0.32568591833114624, -0.7378387451171875, -0.5091596245765686, 0.574479877948761, 0.08196534961462021, 0.025729667395353317, 0.6988853216171265, 0.3960280418395996, ...
def hash _ file ( filepath ) : digest = hashlib. sha1 ( ) with open ( filepath,'rb') as f : while true : chunk = f. read ( 1024 * 1024 ) if not chunk : break digest. update ( chunk ) return digest. hexdigest ( )
[ 0.916772186756134, 0.1765645444393158, 0.36020055413246155, 0.002772146137431264, -0.16685983538627625, 1.29233717918396, 0.140154629945755, 0.9946006536483765, -0.5254083871841431, 0.5170300602912903, 0.47890740633010864, -0.21661198139190674, -0.11284665763378143, -0.4830126464366913, ...
def instrumentlookup ( instrument _ df, symbol ) : try : return instrument _ df [ instrument _ df. tradingsymbol = = symbol ]. instrument _ token. values [ 0 ] except : return - 1
[ -1.2799018621444702, 0.5605268478393555, 0.4559547007083893, 0.06192079186439514, 0.05675118416547775, -1.1398956775665283, 1.0679576396942139, 0.15032309293746948, -0.28916409611701965, 0.6140518188476562, 1.3207086324691772, 0.34586477279663086, -0.07562022656202316, -1.0444890260696411,...
def _ _ radd _ _ ( self, other ) : if len ( self )! = len ( other ) : raise valueerror ( " the length for two input vectors are not compatible " ) return vector ( [ first + second for first, second in zip ( list ( self ), list ( other ) ) ] )
[ -0.13544832170009613, -0.01431095227599144, 0.7726772427558899, -0.34086373448371887, 0.3451484143733978, 0.5974445343017578, -0.5947041511535645, -0.5982218384742737, 1.0380038022994995, -0.24953578412532806, -0.16287460923194885, 0.7887630462646484, -0.5244841575622559, 0.266793817281723...
def maybe _ download _ and _ extract ( data _ dir = data _ path, data _ url = data _ url ) : dest _ directory = data _ dir if not os. path. exists ( dest _ directory ) : os. makedirs ( dest _ directory ) filename = data _ url. split ('/') [ - 1 ] filepath = os. path. join ( dest _ directory, filename ) if not os. path....
[ 0.6584787368774414, 0.0033300116192549467, 0.7173367738723755, 0.04920734092593193, 0.755251944065094, -0.7969161868095398, 0.49237555265426636, 0.6959509253501892, -0.09845263510942459, -0.12178061157464981, -0.0443352647125721, -0.17747820913791656, 0.46540120244026184, 0.181692361831665...
def test _ get _ module _ source _ 2 ( self ) : source = os. path. join ( exo _ source, " planetpopulation ", " knownrvplanets. py " ) # basic test m = get _ module ( source ) self. validate _ module ( m, " planetpopulation " ) # again - - unspecified type m = get _ module ( source ) self. validate _ module ( m, " plan...
[ -0.44178301095962524, 0.16994737088680267, 0.3550201654434204, 0.4184647798538208, 1.2094873189926147, 0.6364046931266785, 0.4177303910255432, -0.8371021151542664, 0.04491475969552994, -0.04191996529698372, -0.59133380651474, 0.5189981460571289, 0.5864570140838623, 0.31703120470046997, 0...
def registerprotocol ( self, tag _ name, proto, xmlns = none, order ='info') : if not xmlns : xmlns = self. _ owner. defaultnamespace self. debug ('registering protocol " % s " as % s ( % s )'% ( tag _ name, proto, xmlns ), order ) self. handlers [ xmlns ] [ tag _ name ] = { type : proto,'default': [ ] }
[ -0.32654234766960144, 0.6820966601371765, 0.18432146310806274, 0.24589957296848297, 1.1538736820220947, -0.13345342874526978, -1.008134126663208, -0.8270959854125977, -0.14628179371356964, -1.2287653684616089, -1.4232734441757202, -0.21493370831012726, -0.5713027119636536, 0.11430043727159...