text stringlengths 25 2.19k | embedding listlengths 768 768 |
|---|---|
def truc ( g, nbr _ func, even _ priorities, priorities ) : # priorities are sorted so we can take the min priority easily max _ values = [ l [ len ( l ) - 1 ] for l in priorities ] # print ( " max priorities " + str ( max _ even _ priorities ) ) empty _ set = set ( ) cache = set ( ) t = set ( g. nodes. keys ( ) ) whil... | [
0.048948317766189575,
1.0373256206512451,
0.5311838388442993,
-0.3684576451778412,
0.4031825065612793,
-0.9681621789932251,
0.23278145492076874,
0.33606836199760437,
-0.9844478368759155,
0.45649683475494385,
-0.3471914827823639,
0.06977801769971848,
-0.30681276321411133,
-0.283837497234344... |
def expired ( self ) - > bool : return datetime. datetime. now ( ) - self. when > self. expires _ after | [
-0.03860627859830856,
0.08410053700208664,
0.49248069524765015,
0.385404497385025,
-0.4577426612377167,
0.30605557560920715,
-1.6041285991668701,
0.5622497797012329,
-0.24541683495044708,
0.21937808394432068,
-0.26155856251716614,
0.07469582557678223,
-0.41288214921951294,
0.20319929718971... |
def initfig ( self, project _ id : int ) : projects = projects ( self. token ) self. project _ info = projects. get _ info ( project _ id ) self. article _ list = projects. list _ articles ( project _ id ) | [
0.19269061088562012,
0.49636679887771606,
0.20332539081573486,
-0.4357197880744934,
0.5409576296806335,
-0.14782766997814178,
-0.7811915874481201,
0.0998229905962944,
-1.337700605392456,
-0.2008877545595169,
-0.9140013456344604,
0.027764292433857918,
0.051700297743082047,
0.501671373844146... |
def get _ all _ samples _ with _ len ( self, length, model _ output, inputs, pruning _ scheme, name = none ) : if self. eval _ matcher is none : self. eval _ matcher = self. _ get _ eval _ matcher ( pruning _ scheme ) if hasattr ( self. eval _ matcher,'get _ all _ samples') : return self. eval _ matcher. get _ all _ sa... | [
0.24097320437431335,
-0.45751434564590454,
0.6674131751060486,
0.7592976689338684,
-0.285502165555954,
-0.0557129941880703,
-0.5984868407249451,
-0.012892046011984348,
0.24867570400238037,
-0.006377703510224819,
-0.17667236924171448,
-0.16104130446910858,
-0.211257204413414,
0.425226658582... |
def getsentoverallopinion ( sent, words, opinioncorpus ) : score = 0. 0 if len ( words )! = 0 : for w in words : if w in opinioncorpus ['positive'] : score + = 1. 0 elif w in opinioncorpus ['negative'] : score - = 1. 0 return score / len ( words ) else : return score | [
0.2798486053943634,
0.015662411227822304,
0.48378080129623413,
-0.33143696188926697,
-0.16411960124969482,
0.00040910523966886103,
-0.8946188688278198,
0.23455508053302765,
0.3638724684715271,
1.8052300214767456,
0.623267412185669,
-0.5246263146400452,
-1.3930615186691284,
0.23879539966583... |
def test _ post _ _ empty ( self ) - > none : response : httpresponse = self. client. post ( self. path ) assert httpstatus. ok = = response. status _ code assert self. asserttemplateused ('accounts / register. html') form : modelform = response. context ['user _ form'] # noqa : e701 assert [ ] = = form. non _ field _ ... | [
-0.6395845413208008,
1.0626240968704224,
0.5725610256195068,
0.302278071641922,
0.8700414896011353,
0.8015532493591309,
-0.02139011211693287,
-0.21824045479297638,
-0.6741504073143005,
-0.7684718370437622,
-1.134458303451538,
-0.07587751746177673,
0.07779090851545334,
0.5169485807418823,
... |
def ev2kjoulemol ( x ) : return x * ev _ to _ kjoulemol | [
0.308505117893219,
0.11096084862947464,
0.28543683886528015,
0.33195027709007263,
-0.702028751373291,
0.8117563128471375,
-0.7075912952423096,
0.038221362978219986,
0.1374090313911438,
0.8353464007377625,
-0.5622677206993103,
-0.18497148156166077,
0.9192075133323669,
-0.4885319769382477,
... |
def reset _ map ( self ) : catalogue = [ ] if self. raster _ layer : catalogue. append ( qgsmapcanvaslayer ( self. raster _ layer ) ) catalogue. append ( qgsmapcanvaslayer ( self. catalogue _ layer ) ) self. canvas. setlayerset ( catalogue + [ qgsmapcanvaslayer ( s ) for s in self. source _ layers. values ( ) ] + [ qgs... | [
-0.4437485933303833,
-0.5244548320770264,
0.16124369204044342,
-0.1745784431695938,
0.3406144380569458,
-0.05547712743282318,
-0.037923455238342285,
-0.47508957982063293,
0.38426661491394043,
-0.9264793992042542,
0.3139899671077728,
0.5562374591827393,
0.031478401273489,
0.4036782681941986... |
def test _ roman _ phot ( ) : import time image _ pos = galsim. positiond ( 153, 921 ) bp _ dict = galsim. roman. getbandpasses ( ) bandpass = bp _ dict ['j129'] sed = galsim. sed ('cww _ scd _ ext. sed ', wave _ type ='nm ', flux _ type ='flambda') flux = 1. e6 gal _ achrom = galsim. sersic ( n = 2. 8, half _ light _ ... | [
0.6586688160896301,
0.41845253109931946,
0.7630007266998291,
-0.08151523023843765,
0.2728925943374634,
0.13755489885807037,
0.1493459939956665,
-0.5446403622627258,
-0.043746303766965866,
-1.0498048067092896,
-0.42213132977485657,
0.3095678985118866,
0.4969310760498047,
0.26005882024765015... |
def test _ check _ occ ( db _ test _ app, generate _ parser, data _ path, generate _ calc _ job _ node, sto _ calc _ inputs ) : inputs = sto _ calc _ inputs output _ folder = " si2 - occ " atoms = bulk ( " si2 ", " zincblende ", a = 4. 0 ) inputs. structure = structuredata ( ase = atoms ). store ( ) inputs. metadata. o... | [
0.6410906314849854,
-0.3341391384601593,
0.5797058939933777,
0.46154287457466125,
-0.03022630512714386,
0.26313161849975586,
0.8456618189811707,
0.1919805109500885,
-0.43238773941993713,
0.210657000541687,
0.5290984511375427,
0.23448589444160461,
0.07028769701719284,
-0.1751551479101181,
... |
def is _ run _ el ( obj ) : return hasattr ( obj, " run " ) and callable ( obj. run ) | [
-0.2969985008239746,
-0.2376878261566162,
0.5340919494628906,
1.349907636642456,
-0.48799842596054077,
0.48195916414260864,
0.6613601446151733,
-0.3436090648174286,
1.1547574996948242,
0.25349241495132446,
-0.679684042930603,
0.2124856561422348,
0.0832236036658287,
0.2789515554904938,
-0... |
def setscale ( self, scale = 0. 05 ) : self. scale = scale | [
0.2656135559082031,
-0.6093252301216125,
0.5145108103752136,
0.3252924382686615,
0.24022242426872253,
0.8604835867881775,
-0.2693612575531006,
-0.6877696514129639,
-0.8459346294403076,
0.37703585624694824,
-0.48349833488464355,
-0.60636967420578,
-0.919701099395752,
1.371427059173584,
0.... |
def get _ range _ as _ disjunction ( slot : slotexpression ) - > set [ classdefinitionname ] : conjs = [ ] if slot. any _ of or slot. exactly _ one _ of : disj = set ( ) for s in slot. any _ of + slot. exactly _ one _ of : disj. update ( get _ range _ as _ disjunction ( s ) ) conjs. append ( disj ) if slot. range _ exp... | [
-1.3240516185760498,
-1.0350220203399658,
0.5464304685592651,
0.20093847811222076,
-0.06112191453576088,
-0.2975717782974243,
0.9172463417053223,
0.0198246818035841,
0.007244916167110205,
-0.46660080552101135,
0.13828080892562866,
-0.30146437883377075,
0.14538972079753876,
0.85382205247879... |
def sm _ flavor _ create ( context, values ) : return impl. sm _ flavor _ create ( context, values ) | [
0.22946037352085114,
0.27225401997566223,
0.20233726501464844,
0.8686847686767578,
-0.3783242106437683,
-0.8584916591644287,
-0.028250066563487053,
-0.6316708326339722,
0.44318124651908875,
0.1630021631717682,
-0.5650235414505005,
0.2921765446662903,
0.4333690404891968,
0.23813912272453308... |
def from _ db ( cls, *, data : dict ) : if not data : return data return cls ( * * data ) | [
0.2893715798854828,
0.5211963653564453,
0.2720469534397125,
0.26569053530693054,
-0.7362072467803955,
0.7136496305465698,
-1.6366887092590332,
0.08733253180980682,
0.5560072064399719,
-0.3776962459087372,
-0.15330718457698822,
-0.2174118310213089,
0.008245173841714859,
-0.01328510884195566... |
def evaluate _ score ( score ) : if score > 100 or score < 0 : result = " invalid score " elif score > = 90 : result = " excellent " elif score > = 50 : result = " passable " else : result = " bad " return result | [
-1.4638077020645142,
-0.5766733288764954,
0.5486334562301636,
-0.7142332196235657,
-0.5470709800720215,
0.1624360978603363,
-0.7721334099769592,
0.032604657113552094,
0.2406904548406601,
0.8304033875465393,
0.47595643997192383,
-0.05159495025873184,
-0.31607937812805176,
-0.474292486906051... |
def kafka _ subscribe _ to _ topic ( self ) : return self. messagingqueue. subscribe _ to _ topic ( ) | [
0.28563711047172546,
-0.4760712683200836,
0.4542536735534668,
0.07719201594591141,
-0.24506813287734985,
-0.32792195677757263,
-1.2459824085235596,
-0.34135863184928894,
-0.29262828826904297,
0.1629478931427002,
0.19494488835334778,
0.20055918395519257,
-0.5486879348754883,
-0.228196218609... |
def fitsol _ value ( self, xfit = none, idx = none ) : if xfit is none : xfit = self. _ detns if self. _ fitdict ['coeff'] is not none : if idx is none : return np. polyval ( self. _ fitdict [ " coeff " ], xfit / self. _ fitdict [ " scale " ] ) else : return np. polyval ( self. _ fitdict [ " coeff " ], xfit [ idx ] / s... | [
0.349356472492218,
-0.7797876596450806,
0.6903640627861023,
-0.6735160946846008,
-0.4573214650154114,
-0.2797761857509613,
-1.170939564704895,
-1.0023775100708008,
0.571307361125946,
-0.5936126708984375,
-0.022045519202947617,
1.2492856979370117,
-0.4945671558380127,
-0.5628012418746948,
... |
def intersector _ generalized ( x, y ) : if x [ 0 ]! = y [ 0 ] : return - 1 else : nbr _ functions = len ( x ) res = [ x [ 0 ] ] for func in range ( 1, nbr _ functions ) : res. append ( intersector ( x [ func ], y [ func ] ) ) return res | [
-1.5070219039916992,
1.4310791492462158,
0.7495386004447937,
1.2405322790145874,
-0.005782505497336388,
-0.5265144109725952,
-0.5250310301780701,
-0.27546221017837524,
-0.708958089351654,
0.9558306336402893,
-0.6098402142524719,
-0.018101880326867104,
-0.20844852924346924,
0.38065165281295... |
def lambda _ handler ( event, context ) : # config object cmap _ config = {'wind _ speed': {'color _ map': cm. get _ cmap ('viridis'),'data _ range': [ 0, 25 ] },'current _ speed': {'color _ map': cm. get _ cmap ('magma'),'data _ range': [ 0, 2 ] },'wave _ amp': {'color _ map': cm. get _ cmap ('jet'),'data _ range': [ ... | [
0.8426079154014587,
0.20997539162635803,
0.8498201966285706,
-0.7272163033485413,
0.11151519417762756,
0.24598407745361328,
0.31929463148117065,
0.6893309354782104,
0.06312950700521469,
0.6836041808128357,
-0.6736258864402771,
0.5319389700889587,
0.5933483839035034,
0.4436662495136261,
0... |
def get _ linkname _ outparams _ add ( self ) : return " output _ parameters _ add " | [
-0.7400705218315125,
-0.7977036237716675,
0.6071158647537231,
0.03821070119738579,
0.18235550820827484,
0.5265259146690369,
0.21635468304157257,
-0.25824999809265137,
-0.39134150743484497,
0.360469251871109,
0.49571356177330017,
0.9849330186843872,
0.07759107649326324,
0.27208203077316284,... |
def result ( results, scene, test _ number ) : # if there are no transactions, return none and test number. if len ( results [ 0 ]. analyzers. getbyname ( " transactions " ). get _ analysis ( ) ) = = 0 : print ( f " { test _ number } has no transactions. " ) return if scene [ " save _ tearsheet " ] : agg _ dict = { } t... | [
0.5426820516586304,
0.6829614043235779,
0.7484316229820251,
-0.31335514783859253,
0.6401439905166626,
-0.5183999538421631,
0.8869239091873169,
-0.7404500842094421,
0.3061862587928772,
-0.28341391682624817,
-0.09863616526126862,
-0.49979349970817566,
0.2962453067302704,
0.2859342694282532,
... |
def read _ keyfile ( filepath ) : key = np. loadtxt ( filepath, dtype = np. uint32 ) suffix = filepath. rsplit ('_ ', maxsplit = 1 ) [ - 1 ] if suffix. startswith ('(') and suffix. endswith (')') : # restore it correctly shape = literal _ eval ( suffix ) # cut off the appended tuple and interpret it as one key = key. r... | [
-0.5488408803939819,
0.06334949284791946,
0.440622478723526,
-1.2764633893966675,
-0.7619339823722839,
0.07485480606555939,
0.014496604911983013,
0.3023633062839508,
-0.697860062122345,
1.103880524635315,
-0.39259737730026245,
-0.017549654468894005,
-0.7424532175064087,
-0.6530619859695435... |
def test _ stratisd _ version _ permissions ( self ) : self. _ test _ permissions ( stratisdbus. stratisd _ version, [ ], false ) | [
-0.423917680978775,
0.6419768929481506,
0.31491002440452576,
0.4493018686771393,
0.3118840754032135,
0.721550464630127,
0.3158436417579651,
-0.41021209955215454,
-0.2820311486721039,
0.8271965980529785,
-0.1639794409275055,
0.06255229562520981,
-0.07725466787815094,
-0.21539728343486786,
... |
def mail _ nicknames ( self ) - > sequence [ str ] : return pulumi. get ( self, " mail _ nicknames " ) | [
-0.7064502835273743,
0.6434094905853271,
0.2699905037879944,
0.1899229884147644,
0.371319979429245,
0.816373348236084,
-0.880710244178772,
-0.69666987657547,
0.5381032824516296,
0.3841712176799774,
-2.0139946937561035,
1.4652211666107178,
0.4732939600944519,
-0.7960522770881653,
-1.50304... |
def get _ encoder ( encoder _ cfg : roformerencoderconfig ) : return roformer _ encoder. roformerencoder ( vocab _ size = encoder _ cfg. vocab _ size, hidden _ size = encoder _ cfg. hidden _ size, num _ layers = encoder _ cfg. num _ layers, num _ attention _ heads = encoder _ cfg. num _ attention _ heads, intermediate ... | [
0.21639473736286163,
-0.9029964208602905,
0.08641500771045685,
0.14884738624095917,
0.006149729248136282,
-0.599063515663147,
0.6510028839111328,
0.16431009769439697,
0.027175845578312874,
0.15969504415988922,
-0.30592188239097595,
0.15481138229370117,
-0.2989150285720825,
1.10722661018371... |
def test _ topo _ to _ sph ( ) : rng = np. random. randomstate ( 0 ) angles = rng. rand ( 10 ) * 360 radii = rng. rand ( 10 ) angles [ 0 ] = 30 radii [ 0 ] = 0. 25 # new way sph = _ topo _ to _ sph ( np. array ( [ angles, radii ] ). t ) new = _ sph _ to _ cart ( sph ) new [ :, [ 0, 1 ] ] = new [ :, [ 1, 0 ] ] * [ - 1, ... | [
-0.36953410506248474,
-0.559577226638794,
0.6559941172599792,
-0.39711689949035645,
-0.013909083791077137,
0.7816565036773682,
0.14883144199848175,
-0.20690646767616272,
-0.16202731430530548,
0.4036678969860077,
-0.6337287425994873,
0.23043018579483032,
0.05881655588746071,
-0.314212739467... |
def solve _ var ( expr, vars ) : try : return result ( structured. resolve ( vars, expr. value ), ( ) ) except ( keyerror, attributeerror ) as e : # raise a better exception for accessing a non - existent member. raise errors. efilterkeyerror ( root = expr, key = expr. value, message = e, query = expr. source ) except ... | [
-0.1840551346540451,
-0.11045238375663757,
0.5110170841217041,
-1.0917807817459106,
-0.3061886429786682,
-1.3116036653518677,
-0.4121762216091156,
0.19105765223503113,
0.18682801723480225,
-0.1272382289171219,
0.06387198716402054,
0.5150933861732483,
0.042978495359420776,
-0.14139282703399... |
def _ _ init _ _ ( _ _ self _ _, *, datastore _ cluster _ id : optional [ pulumi. input [ str ] ] = none, enabled : optional [ pulumi. input [ bool ] ] = none, mandatory : optional [ pulumi. input [ bool ] ] = none, name : optional [ pulumi. input [ str ] ] = none, virtual _ machine _ ids : optional [ pulumi. input [ s... | [
-0.3738677501678467,
0.5774664878845215,
0.5773764252662659,
-0.2861611843109131,
0.4590701758861542,
0.5661303997039795,
-0.8790648579597473,
0.8631163835525513,
0.3878397047519684,
0.8570771217346191,
-1.2753928899765015,
0.3398839831352234,
0.0635092481970787,
-0.40334224700927734,
-0... |
def unpickle ( file _ or _ filename, nobjects = none, new = true ) : if hasattr ( file _ or _ filename,'read') : f = file _ or _ filename elif file _ or _ filename [ - 3 : ] = = ". gz " : import gzip f = gzip. open ( file _ or _ filename ) else : f = open ( file _ or _ filename ) def unpickle1 ( ) : o = pickle. load ( ... | [
-0.5174557566642761,
-0.19028927385807037,
0.9063063859939575,
0.05697024613618851,
0.1499839872121811,
-0.6522809267044067,
0.5688601732254028,
0.13426202535629272,
-0.913036048412323,
0.2544197142124176,
0.040651727467775345,
-0.7503484487533569,
0.15696318447589874,
-0.25040000677108765... |
def start _ range ( self ) : def flatten ( d, tag = none ) : # flatten a nest of dictionaries into ( tuple of keys, value ) pairs l = list ( ) if tag is none : tag = tuple ( ) for k, v in d. iteritems ( ) : if isinstance ( v, mutablemapping ) : l. extend ( flatten ( v, tag + ( k, ) ) ) else : l. append ( ( tag + ( k, )... | [
-0.9430777430534363,
-0.18927989900112152,
0.5756516456604004,
0.0526033490896225,
0.13931380212306976,
-0.651231586933136,
0.6028335094451904,
-0.18006275594234467,
-0.6774693131446838,
0.3394472599029541,
0.3597382605075836,
0.46667447686195374,
0.1341916024684906,
-0.12799452245235443,
... |
def player _ turn ( player, dominoes, played, winner ) : if winner : return none # find left and right most played numbers left = played [ 0 ] [ 0 ] length = len ( played ) right = played [ length - 1 ] [ 1 ] pick = false print ( " status : it's your turn to make a move. enter your command. " ) while not pick : cmd = i... | [
-0.32581058144569397,
-0.18204468488693237,
1.0547411441802979,
-0.03030720166862011,
-0.3654717803001404,
0.008558879606425762,
0.920659065246582,
0.17510336637496948,
0.11119981855154037,
0.07356218993663788,
-0.3061427175998688,
-0.15166203677654266,
-0.3983953595161438,
-0.616532921791... |
async def _ _ call _ _ ( self, * args, * * kwargs ) : self. simplug _ hooks. _ sort _ registry ( ) results = [ ] for plugin in self. simplug _ hooks. _ registry. values ( ) : if not plugin. enabled : continue hook = plugin. hook ( self. name ) if hook is none : continue plugin _ args = ( plugin. plugin, * args ) if hoo... | [
-0.4617343842983246,
0.1145581603050232,
0.7362763285636902,
0.5388271808624268,
1.1226060390472412,
-0.9515470862388611,
0.31401026248931885,
0.24907582998275757,
0.29942581057548523,
0.41652143001556396,
-0.509676992893219,
0.16789205372333527,
-0.7366313934326172,
0.018760712817311287,
... |
def processmethod ( data, s _ name, is _ lock = false, args = false ) : type _ list = getallextdatatype ( ) results = { } # we retrieve the proxy configuration if data and data. has _ key ('proxy') : proxy = data ['proxy'] else : proxy = false # 1. observe the type of source ( database, file,... ) if data and data ['da... | [
-0.3590526580810547,
0.7261720895767212,
0.7681573629379272,
-0.02974691241979599,
0.45122677087783813,
-0.6811147928237915,
-0.08883699774742126,
-0.28777068853378296,
-0.06356728076934814,
0.4116986393928528,
-0.23850955069065094,
-0.09760132431983948,
-0.05607011541724205,
0.86226332187... |
def getrandom ( self ) : # note that randint ( a, b ) to pick a random integer a < = random < = b. ri = self. random. randint ( 0, len ( self. numloc ) - 1 ) return self. numloc [ ri ] | [
-0.2428024709224701,
-0.4400664269924164,
0.42458418011665344,
-0.3632661998271942,
0.31502729654312134,
0.7816224694252014,
1.087661862373352,
-0.16611067950725555,
0.6352010369300842,
-0.8624599575996399,
0.2563256621360779,
0.3315001428127289,
-0.9086665511131287,
-0.48582154512405396,
... |
def find _ by _ name ( self, name ) : if not self. has _ name : raise blenderfilereadexception ('object type do not have a name') name _ bytes = name. encode ( ) for obj in self : _ name = obj. id. name if _ name [ 2 : _ name. index ( 0 ) ] = = name _ bytes : return obj raise keyerror ('file do not have { } objects nam... | [
0.14462251961231232,
-1.1691958904266357,
0.7094252109527588,
0.12462107092142105,
-0.38939887285232544,
0.3399076461791992,
0.7760230898857117,
-1.4578920602798462,
-1.2389588356018066,
0.49431005120277405,
-0.9572977423667908,
-0.0518590472638607,
-1.0933862924575806,
0.25959962606430054... |
def as _ wkb ( self, ewkb = true ) : if self. srid and ewkb : geos. wkbwriter. defaults ['include _ srid'] = true else : geos. wkbwriter. defaults ['include _ srid'] = false return self. _ shape. wkb _ hex | [
0.3243336081504822,
0.14238415658473969,
0.44075101613998413,
-0.20537276566028595,
-0.20178842544555664,
0.7402205467224121,
0.2085237205028534,
0.4522482454776764,
0.5132907032966614,
0.4142303466796875,
0.6180111169815063,
0.023787258192896843,
-0.2863143980503082,
1.1477806568145752,
... |
def _ _ init _ _ ( self, name ='', database _ name = none ) : self. name = name self. _ trial _ id _ map = { } self. apps = [ ] # [ ( name, desc, [ row idxs ] ) ] self. machines = [ ] # [ ( name, desc, [ row idxs ] ) ] self. datasets = [ ] # [ ( name, desc, [ row idxs ] ) ] self. metrics = [ ] # [ ( name, desc, type ) ... | [
0.7217654585838318,
0.45481032133102417,
0.5580909252166748,
0.3029121160507202,
0.15126609802246094,
0.11243381351232529,
-0.0980381891131401,
-0.004504513926804066,
-0.14043234288692474,
0.2546418309211731,
-0.4030746519565582,
0.14880718290805817,
0.05022556334733963,
1.0185049772262573... |
def strtofloat ( string ) : try : if " / " in string : slashpos = string. index ( " / " ) num = float ( string [ : slashpos ] ) den = float ( string [ slashpos + 1 : ] ) res = num / den return res else : return float ( string ) except typeerror : raise typeerror ( " the argument must be a number loaded in a string " ) | [
0.5892179608345032,
-0.17285005748271942,
0.5405047535896301,
-0.07008892297744751,
-0.2832810878753662,
-0.3976001441478729,
0.9330213069915771,
-0.4780840575695038,
-0.48776373267173767,
-0.7272965908050537,
0.5481588840484619,
-0.44207286834716797,
-0.7856513857841492,
-0.49699345231056... |
def get _ auth ( self ) : if not self. token : self. _ set _ auth ( ) return self. token | [
-0.8844019770622253,
-0.4716714322566986,
0.24899618327617645,
0.9620102643966675,
-0.05833140015602112,
-0.5294092297554016,
0.4422898292541504,
-0.15737341344356537,
0.7968756556510925,
-1.4074803590774536,
0.05249345302581787,
1.06990647315979,
-0.15855608880519867,
-0.652920126914978,
... |
def make _ pair _ maps ( pair _ file, fmt, qbed, sbed ) : qmap = collections. defaultdict ( list ) # key is query, value is a list of subject hits smap = collections. defaultdict ( list ) print > > sys. stderr, " pair file : ", pair _ file for pair in get _ pair ( pair _ file, fmt, qbed, sbed ) : if pair is none : brea... | [
-0.7762717008590698,
-0.4533535838127136,
0.375754177570343,
-0.5362856388092041,
-0.5656634569168091,
0.7381641268730164,
0.5729807019233704,
0.4165976345539093,
0.11953334510326385,
-0.34234243631362915,
-0.32731932401657104,
-0.626782238483429,
0.17378778755664825,
0.4064851403236389,
... |
def learning _ by _ penalized _ gradient ( y, tx, w, gamma, lambda _ ) : loss, gradient, hessian = penalized _ logistic _ regression ( y, tx, w, lambda _ ) w = w - gamma * np. linalg. inv ( hessian ). dot ( gradient ) return loss, w | [
0.4362281262874603,
-0.45524054765701294,
0.5778142213821411,
-0.3616039752960205,
-0.3857611417770386,
-0.14542420208454132,
0.08632275462150574,
-0.7212151885032654,
-1.0375618934631348,
0.8262881636619568,
-0.1065923348069191,
0.3341434895992279,
0.014727357774972916,
0.3824805021286011... |
def get _ weight _ grad ( model, inputs, outputs ) : grads = model. optimizer. get _ gradients ( model. total _ loss, model. trainable _ weights ) symb _ inputs = ( model. _ feed _ inputs + model. _ feed _ targets + model. _ feed _ sample _ weights ) f = k. function ( symb _ inputs, grads ) x, y, sample _ weight = mode... | [
0.11615943163633347,
0.007212416268885136,
0.4955044090747833,
0.5540949702262878,
-0.7506064176559448,
-0.9241226315498352,
-0.11327334493398666,
-0.4848930835723877,
-1.473968744277954,
0.09674250334501266,
0.2045060396194458,
0.00016513396985828876,
-0.17830030620098114,
0.1938061267137... |
def hint _ pose _ qx ( self, qx ) : if not number. is _ real _ number ( qx ) : raise validationerror ( " quarternion x component must be a number ( value is % s ) " % qx ) elif not number. is _ finite ( qx ) : raise validationerror ( " quaternion x component must be a finite number " " ( value is % s ) " % qx ) else : ... | [
-0.07678432762622833,
0.2572818994522095,
0.6991194486618042,
-0.2771665155887604,
-0.5905253291130066,
1.5309109687805176,
0.3185226023197174,
-1.3108726739883423,
0.8500805497169495,
-1.1391979455947876,
-0.4553918242454529,
-0.3115692436695099,
-0.18515914678573608,
-0.6188894510269165,... |
def test _ user _ email _ invalid ( self ) : with self. assertraises ( valueerror ) : get _ user _ model ( ). objects. create _ user ( none, " test123 " ) | [
0.6611291766166687,
0.8716357946395874,
-0.08835350722074509,
0.6709941625595093,
0.6143541932106018,
0.5392187237739563,
-0.07341663539409637,
0.803780734539032,
-0.2869335114955902,
-0.4864463806152344,
-0.6112214922904968,
-0.018983816727995872,
-0.6525219082832336,
-0.14474362134933472... |
def darks _ and _ zeros ( ) : keywords = keywords _ dark _ zero result = dict ( ) for fn in all _ files : try : f = pyfits. open ( fn ) header = f [ 0 ]. header f. close ( ) date = fn. split ('/') date = date [ - 2 ] except : continue # take only darks try : imagetyp = header ['imagetyp']. upper ( ) except : print ('% ... | [
-0.5619703531265259,
-1.042661428451538,
0.6100063920021057,
-0.20500588417053223,
-0.5663226246833801,
-0.20734547078609467,
-0.39112749695777893,
-0.08741258829832077,
-0.5568045377731323,
-0.27467209100723267,
-0.13127350807189941,
0.13859319686889648,
0.06140437722206116,
1.28325235843... |
def get _ res ( self ) : # todo maybe do this different # or if complexer output node exists take from there. xpath _ energy ='/ fleuroutput / scfloop / iteration / totalenergy / @ value'xpath _ distance ='/ fleuroutput / scfloop / iteration / densityconvergence / chargedensity / @ distance'# be aware of magnetism # de... | [
-0.2867094874382019,
-0.528810977935791,
0.6609746813774109,
0.0958947166800499,
0.13954439759254456,
-0.2919773459434509,
0.7893169522285461,
0.29087337851524353,
-0.33638718724250793,
-0.6895593404769897,
0.38520509004592896,
-0.7357297539710999,
0.5543959140777588,
-0.007670951075851917... |
def load _ data ( self, debug = false ) : with open ( self. config. vocab _ file,'r') as f : self. vocab = pickle. load ( f ) self. char = character ( ) train _ text = [ ] valid _ text = [ ] test _ text = [ ] train _ chars = [ ] valid _ chars = [ ] test _ chars = [ ] input _ text = [ ] chars = [ ] last _ char = " " las... | [
-0.3292965888977051,
-0.29276224970817566,
0.8197404742240906,
-0.3761993646621704,
-0.43460556864738464,
-0.1908414661884308,
-0.2011498212814331,
0.42288434505462646,
0.3333524465560913,
0.2222183644771576,
-0.6875012516975403,
0.5245921611785889,
-0.19074906408786774,
-0.326079368591308... |
def forward ( self, x1, x2, diag = false, last _ dim _ is _ batch = false, full _ covar = true, * * params ) : if last _ dim _ is _ batch : raise notimplementederror ( ) else : z1 = self. model ( x1 ) z2 = self. model ( x2 ) out = torch. matmul ( z1, z2. t ) if diag : return torch. diag ( out ) else : return out | [
0.07338879257440567,
0.5313588380813599,
0.5332438349723816,
0.8447732925415039,
-0.23753008246421814,
0.08571197092533112,
0.5053116083145142,
0.835164487361908,
-0.9979850053787231,
0.18442682921886444,
0.012243918143212795,
0.6560865640640259,
0.6013416647911072,
-0.7482312321662903,
... |
def compile _ str _ from _ parsed ( parsed ) : result ='' for literal _ text, field _ name, format _ spec, conversion in parsed : # output the literal text if literal _ text : result + = literal _ text # if there's a field, output it if field _ name is not none : result + ='{'if field _ name! ='' : result + = field _ n... | [
0.4233971834182739,
-1.4630533456802368,
0.6978192925453186,
-0.6544806957244873,
-0.1574581116437912,
0.18258750438690186,
-0.9664545059204102,
-0.10872090607881546,
-0.8307138681411743,
-0.27532869577407837,
0.4758501350879669,
0.1828078329563141,
0.3517529368400574,
-0.13459259271621704... |
def enable _ buttons ( click ) : global images _ path, anns _ path, analysis _ path if click : # if user inserted images and anns if images _ path! = " " and anns _ path! = " " : analysis _ path = analyze _ dataset ( images _ path, anns _ path ) # dashboard click event dashboard _ click = int ( time. time ( ) ) return ... | [
0.26096177101135254,
0.9501145482063293,
0.8519428372383118,
0.48782119154930115,
0.2330884337425232,
0.244890034198761,
0.47988125681877136,
1.1200376749038696,
-0.4375500977039337,
-0.19312959909439087,
-0.29718247056007385,
-0.43991807103157043,
0.2255939245223999,
0.6886070370674133,
... |
def printalletitler ( dic ) : for key in sorted ( dic ) : print ( key ) | [
0.8057761788368225,
-0.8428035974502563,
0.4961155652999878,
-0.4839458465576172,
-0.9386224150657654,
0.33110716938972473,
-1.5074491500854492,
-0.26741790771484375,
-0.42576226592063904,
0.8227728009223938,
-0.12064740806818008,
0.5363025069236755,
0.2344045490026474,
1.3223830461502075,... |
def save _ data ( df, database _ filename ) : engine = create _ engine ('sqlite : / / /'+ database _ filename ) table _ name = database _ filename. replace ( ". db ", " " ) + " _ table " print ('table _ name : { } '. format ( table _ name ) ) df. to _ sql ( table _ name, engine, index = false, if _ exists ='replace') | [
-0.16099044680595398,
0.6889426112174988,
0.5617651343345642,
0.56159508228302,
0.5164526104927063,
-0.08007015287876129,
0.05648016184568405,
0.5774583220481873,
-1.4156216382980347,
0.5330036878585815,
-0.6225144863128662,
0.19903896749019623,
0.14799536764621735,
0.29247409105300903,
... |
def _ _ offset _ slot ( self, max _ players _ team, slot ) : # clamp slot number to min or max of the gamemode if slot < 0 : ind = 0 elif slot > ( max _ players _ team * 2 ) - 1 : ind = ( max _ players _ team * 2 ) - 1 else : ind = slot # if the slot is on team2, offset it to find the real position in playerlist if slo... | [
-0.6913836598396301,
-0.2185329794883728,
0.5638619065284729,
-0.8289437890052795,
-1.769511342048645,
0.6915944218635559,
0.27984535694122314,
0.35516035556793213,
-0.5641693472862244,
0.7015485167503357,
0.32156166434288025,
-0.06356292963027954,
-0.17635416984558105,
-0.1818533092737198... |
def _ _ init _ _ ( self, base _ path : optional [ union [ str, path ] ] = none, in _ memory : bool = true, wiki _ language : str = " dewiki ", * * corpusargs, ) - > none : self. wiki _ language = wiki _ language base _ path = flair. cache _ root / " datasets " if not base _ path else path ( base _ path ) # this dataset... | [
-0.27487632632255554,
0.06225830689072609,
0.784045934677124,
-0.7328396439552307,
-0.32813549041748047,
-0.46070849895477295,
-0.0442458838224411,
0.820529043674469,
-0.502815306186676,
-0.8814654350280762,
0.1056278869509697,
-0.08973953872919083,
0.6187304258346558,
0.271209716796875,
... |
def instance _ system _ metadata _ delete ( context, instance _ uuid, key ) : impl. instance _ system _ metadata _ delete ( context, instance _ uuid, key ) | [
-1.3635846376419067,
0.22861452400684357,
0.3021598160266876,
-0.2257518470287323,
0.05878037214279175,
0.7814584374427795,
-0.028856510296463966,
0.85518878698349,
-0.65876305103302,
1.2864943742752075,
-0.0005816279444843531,
0.8591709733009338,
-0.07894623279571533,
-0.32309138774871826... |
def staff _ email ( self, email ) : if not self. auth or not self. auth. domains : return false staff _ domains = self. auth. domains domain = email [ email. index ('@') + 1 : ] return domain. lower ( ) in [ staff _ domain. lower ( ) for staff _ domain in staff _ domains ] | [
-0.44823157787323,
0.7772592306137085,
0.639011800289154,
0.18464210629463196,
-0.5785694122314453,
0.32560864090919495,
0.1046639233827591,
0.029574234038591385,
-0.2359682023525238,
-0.32453835010528564,
-0.0027841669507324696,
1.6572725772857666,
-0.8465524911880493,
0.30565327405929565... |
def height ( self ) : m = self. text. rows return m * self. char _ height + ( m - 1 ) * self. y _ space | [
0.8091994524002075,
-0.2886078655719757,
0.5066651105880737,
0.5129194259643555,
-0.8587861657142639,
0.0940626859664917,
0.6958016157150269,
0.6301866173744202,
-0.11689944565296173,
-0.08704764395952225,
-0.3825884759426117,
0.1651354432106018,
-0.17409542202949524,
0.0931088775396347,
... |
def device _ info ( self ) : return { " identifiers " : { ( domain, self. _ uuid ) }, " name " : self. _ device. device _ data [ self. _ uuid ] [ " name " ], " manufacturer " : " nest labs ", " model " : " camera ", } | [
-1.0880463123321533,
0.05489913746714592,
0.23348166048526764,
0.1527055948972702,
-0.34407925605773926,
-0.10079048573970795,
-0.2883516252040863,
-0.46766114234924316,
-0.16377019882202148,
-0.29483702778816223,
-1.2036688327789307,
0.40292105078697205,
0.49296557903289795,
0.19428808987... |
def chain _ count ( self ) : return len ( self. chains ( ) ) | [
0.21733304858207703,
-0.15363077819347382,
0.365648090839386,
0.0024051174987107515,
0.8087153434753418,
0.48250579833984375,
0.08873136341571808,
-0.000014636446394433733,
-0.31968143582344055,
-1.4320720434188843,
-0.47438499331474304,
0.8978627920150757,
-0.4343098998069763,
0.399087548... |
def filter _ cases ( suite _ id, comp _ list, pid ) : comp = [ ] for cn in comp _ list : query ='select * from testcasemanage _ component where comp _ name = " { 0 } " '. format ( cn ) result = autodb. select _ one _ record ( query ) temp = result [ 0 ] ['comp _ id'] comp. append ( str ( temp ) ) compstr = ', '. join (... | [
-0.09635365009307861,
-0.9639861583709717,
0.636985719203949,
0.339986115694046,
0.470718115568161,
-0.0485021211206913,
0.07762465626001358,
0.33272501826286316,
0.5506106615066528,
0.6980060338973999,
0.4445251226425171,
-0.369430273771286,
-0.797719419002533,
0.8292331695556641,
-0.41... |
def get _ initial _ parameters ( scenario _ number ) : # stop trtmo trtl mor inr mop avgdur scenario _ dict = { 0 : ( 0, false, 0, 1. 0, 4. 0, 0. 1, 4. 0 ), 1 : ( 150, false, 0, 0. 1, 0. 4, 0. 25, 3. 0 ), 2 : ( 150, true, 150000, 0. 1, 0. 4, 0. 25, 3. 0 ), 3 : ( 0, true, 150000, 0. 25, 1. 5, 0. 1, 4. 0 ), 4 : ( 20, fal... | [
-0.01292501948773861,
-0.0702228844165802,
0.7438912391662598,
-0.12360020726919174,
-0.28060927987098694,
-0.08721770346164703,
0.9599831700325012,
-0.10155493021011353,
-0.34968969225883484,
1.1388230323791504,
-0.3224126696586609,
0.23624294996261597,
0.13237662613391876,
0.256403446197... |
def make _ length ( self, value ) : return round ( float ( value ) * self. mult * self. scale, 3 ) | [
0.435585618019104,
-0.17508052289485931,
0.18746043741703033,
-1.291993498802185,
-0.7013759016990662,
1.1919598579406738,
0.21570612490177155,
-0.7105446457862854,
0.5593507885932922,
0.6481262445449829,
-0.12227986752986908,
-1.0303860902786255,
0.2546733319759369,
-0.0712289810180664,
... |
def create _ alias ( self, name ) : # create the alias res = requests. put ( self. index _ endpoint +'/ _ aliases / % s'% name ) if res. status _ code! = 200 : raise httperror ( res. status _ code, res. content ) else : return true | [
-1.0341025590896606,
0.2944905757904053,
0.7620953917503357,
-0.3163529634475708,
0.16402174532413483,
0.8859577178955078,
-0.49419987201690674,
-0.4142667055130005,
-0.1095343604683876,
0.976952850818634,
-1.0307433605194092,
-0.44141319394111633,
-0.6490374803543091,
-0.41830310225486755... |
def encode ( self, value ) : padding = self. padding if self. precision > 0 and self. padding > 0 : # padding shouldn't include decimal digits or the decimal point. padding + = self. precision + 1 return super ( numberfield, self ). encode ( ('% % 0 % d. % df'% ( padding, self. precision ) ) % ( value + self. offset ) ... | [
0.025712454691529274,
0.43720152974128723,
0.699087381362915,
-0.43073365092277527,
-0.4722633361816406,
0.6617252826690674,
0.13081178069114685,
-0.48496484756469727,
0.14137353003025055,
-0.8533822894096375,
-0.11544729024171829,
-0.34466353058815,
0.0626542791724205,
0.523652970790863,
... |
def compute _ group _ auto _ corr ( v, maxlag ) : # get dimensions of input array with samples n _ pts = np. shape ( v ) [ 0 ] n _ var = np. shape ( v ) [ 1 ] # initialize array auto _ corr = np. zeros ( ( maxlag, n _ var ) ) # get mean and variance of v for each variable over the samples provided v _ m = v. mean ( 0 )... | [
-0.09165104478597641,
-0.3195117712020874,
0.6329291462898254,
0.13659651577472687,
-0.248494952917099,
-0.36512258648872375,
0.8498808145523071,
0.4948172867298126,
-0.7300512790679932,
0.9221989512443542,
0.3099732995033264,
1.097396731376648,
-0.3878875970840454,
-0.12089436501264572,
... |
def put _ state ( id : int, options : dict ) : return request ( " put ", f " groups / { id } / action ", dumps ( options ) ) | [
-1.7834104299545288,
0.20880703628063202,
0.31682902574539185,
-0.6291929483413696,
0.41541895270347595,
-0.2916411757469177,
0.2208900898694992,
-1.1264171600341797,
0.15992489457130432,
0.581935465335846,
-0.3845517039299011,
0.5043084621429443,
-1.3840705156326294,
-0.8001540899276733,
... |
def discount _ cumsum ( self, x, discount ) : return signal. lfilter ( [ 1 ], [ 1, float ( - discount ) ], x [ : : - 1 ], axis = 0 ) [ : : - 1 ] | [
0.5623955130577087,
0.3902968764305115,
0.8970307111740112,
0.7925388813018799,
0.03267665579915047,
-0.1665426343679428,
0.1292976588010788,
-0.3111623525619507,
0.2757166922092438,
0.5080379843711853,
0.36176303029060364,
1.0827656984329224,
0.7100291848182678,
-0.42178454995155334,
-0... |
def get _ document ( sha1 ) : objects = models. document. objects. filter ( file _ _ sha1 = sha1 ). order _ by ('- date _ modified') if not objects : raise http404 return objects [ 0 ] | [
0.221157968044281,
-0.33063456416130066,
0.6150370240211487,
0.30004453659057617,
0.2989432215690613,
0.01248363871127367,
0.22017671167850494,
-0.3136509656906128,
-0.07457560300827026,
0.5308856964111328,
1.137609839439392,
-0.467397004365921,
-0.2835959494113922,
-0.26638153195381165,
... |
def _ _ init _ _ ( self, domain, auth _ token = none, * * kwargs ) : gdata. client. gdclient. _ _ init _ _ ( self, auth _ token = auth _ token, * * kwargs ) self. domain = domain | [
0.14549624919891357,
0.4551090896129608,
0.4334491789340973,
-0.5095869898796082,
0.40712276101112366,
0.7612391114234924,
-0.337851345539093,
-0.7689340114593506,
-0.5866461396217346,
-1.2983943223953247,
-0.30945730209350586,
1.8463072776794434,
0.12424816191196442,
0.021200144663453102,... |
def ce _ eval _ tf _ examples _ fn ( serialized _ tf _ examples ) : xf _ feature _ spec = tf _ transform _ output. transformed _ feature _ spec ( ) label _ spec = [ f for f in xf _ feature _ spec if f. startswith ('label _') ] eval _ spec = [ f for f in xf _ feature _ spec if not f. endswith ('_ xf') ] transformed _ fe... | [
-0.4433850646018982,
-0.9329208135604858,
0.3568686246871948,
-0.49605700373649597,
-0.003545493585988879,
-0.49134430289268494,
0.5179490447044373,
0.7973838448524475,
-0.6399358510971069,
0.38714516162872314,
-0.5600556135177612,
-0.37548205256462097,
1.0360267162322998,
-0.9903556704521... |
def about ( ) : return render _ template ('about. html ', name = " mary jane " ) | [
1.0084723234176636,
0.42426350712776184,
0.33886590600013733,
0.2894679605960846,
-0.6570500135421753,
0.6520472764968872,
-0.0006911650998517871,
1.0320066213607788,
-0.7582167983055115,
0.4670126438140869,
-0.142815500497818,
-0.41250601410865784,
-0.18530873954296112,
0.7528278231620789... |
def assert _ allclose ( self, * args, * * kwargs ) : return assert _ allclose ( * args, * * kwargs ) | [
-0.6710858941078186,
-0.7998132705688477,
0.811467170715332,
0.9400829672813416,
0.24626311659812927,
0.9196192026138306,
-0.18435312807559967,
-0.5477746725082397,
-0.2643546164035797,
-0.4935782551765442,
0.43368664383888245,
0.1683320701122284,
-1.2258007526397705,
1.3870830535888672,
... |
async def close ( self ) - > none : if not self. closed : if self. pending _ count = = 0 : logger. info ( " closing client... " ) else : logger. warning ( " closing client while % s messages are still pending... ", self. pending _ count ) try : if self. _ transport : await self. _ transport. disconnect ( ) await self. ... | [
-0.49084457755088806,
-0.3907715082168579,
0.5682371258735657,
-0.9092921614646912,
0.04965290427207947,
0.1572958528995514,
0.6826343536376953,
-0.5617241859436035,
-0.6528862714767456,
-0.8598179221153259,
0.2941713333129883,
0.13788799941539764,
-0.3296716809272766,
0.25592538714408875,... |
def agent _ build _ get _ all ( context ) : return impl. agent _ build _ get _ all ( context ) | [
-0.18960581719875336,
-1.2680246829986572,
0.3519287109375,
1.083488941192627,
0.6726364493370056,
-0.22122526168823242,
-0.6395938396453857,
-0.5923553705215454,
0.639775276184082,
-0.7572106122970581,
0.2695154845714569,
0.6821379065513611,
0.5996841788291931,
-0.3103817105293274,
-0.8... |
def make _ fhir _ document ( self ) : doc, finalized = self. _ make _ biobank _ order _ request ( ) return doc, finalized | [
-0.10010208934545517,
0.1172121986746788,
0.37199506163597107,
0.30190277099609375,
0.24174579977989197,
-0.22995786368846893,
0.6013895273208618,
-0.3568757176399231,
-0.07563208788633347,
-0.22864511609077454,
-0.09816862642765045,
-0.1343688815832138,
-0.3424355685710907,
-0.02446644008... |
def split _ multinovel ( self ) : subbooks = [ ] subbooknr = 0 booktext = re. sub ( r " \ n ", " < nl > ", self. originaltext ) # replace newlines with something else in order for the pattern matching to work patterns = re. findall ( r " \ [ start _ ( \ d + ) _ ( \ d + ) _ ( [ ^ \ ] ] + ) \ ] ( ( (?! \ [ end ). ) * ) \... | [
-0.11397051811218262,
-0.8865718841552734,
0.856890857219696,
1.0543599128723145,
0.017541877925395966,
0.9272482395172119,
0.13815224170684814,
0.6434840559959412,
-0.058489423245191574,
-0.07278461754322052,
-0.6266704201698303,
0.052398569881916046,
-0.5606045126914978,
0.63616788387298... |
def make _ boolean ( vars, min _ max, dont _ care = none, * * kwargs ) : ones = [ ] while ( true ) : if'minterms'in kwargs : if kwargs ['minterms'] is true : ones = min _ max if ones [ - 1 ] > = pow ( 2, len ( vars ) ) : raise exception ( " error : invalid minterms " ) break elif'maxterms'in kwargs : if kwargs ['maxter... | [
-0.06110074743628502,
-0.21549740433692932,
0.6705965399742126,
-0.018016548827290535,
-0.6353292465209961,
-0.1949019879102707,
-1.0441142320632935,
-0.09555137902498245,
-0.25219061970710754,
0.2446216195821762,
-0.815351665019989,
0.6232390403747559,
-0.7809404730796814,
0.0297337602823... |
def convert _ response _ as _ text ( tokens ) : return " ". join ( change _ perspective ( tokens ) ) | [
-0.2031802386045456,
-1.2466648817062378,
0.43311411142349243,
-1.0352227687835693,
-0.5020445585250854,
-0.8486731052398682,
-1.8995307683944702,
-0.8398545384407043,
0.9165581464767456,
0.7407923340797424,
-0.6212203502655029,
-0.24676036834716797,
-0.06325468420982361,
-1.14012849330902... |
def get _ filters ( ) : print ('hello! let \'s explore some us bikeshare data!') # get user input for city ( chicago, new york city, washington ). hint : use a while loop to handle invalid inputs city = input ( " enter name of the city to analyze ( chicago, new york city or washington ) : " ). lower ( ) # check if the ... | [
-0.20873922109603882,
0.26571381092071533,
0.8759347200393677,
0.09399300813674927,
-0.6255385279655457,
0.8480488657951355,
0.32913464307785034,
-0.39433979988098145,
-0.9876227974891663,
-0.6908242106437683,
0.040937624871730804,
0.6639302968978882,
-0.13921096920967102,
0.53359490633010... |
def printgrid ( self ) : for i in self. cells : print ( i ) | [
0.017065543681383133,
-0.25977596640586853,
0.33253613114356995,
0.31109243631362915,
0.7694433331489563,
0.08732618391513824,
-0.09615969657897949,
-0.11737985163927078,
-1.493090033531189,
-0.3671589195728302,
0.6650779247283936,
0.9600180387496948,
-0.4075984060764313,
1.201453804969787... |
def _ _ init _ _ ( self, created _ date = none, email _ body _ template _ external = none, email _ body _ template _ id = none, email _ subject _ template _ id = none, id = none, name = none, sms _ template _ id = none, updated _ date = none ) : self. _ created _ date = none self. _ email _ body _ template _ external =... | [
0.5559272766113281,
-0.24050605297088623,
0.857822060585022,
-0.07465653121471405,
-0.5956353545188904,
-0.03420748934149742,
-0.8323625922203064,
0.3252759277820587,
0.6394939422607422,
-0.18161728978157043,
-1.1755740642547607,
0.7275859713554382,
0.21619051694869995,
0.5421209335327148,... |
def return _ youngs _ modulus ( simname ) : df1, df2 = extract. extract _ def ( simname ) df3, df4 = extract. extract _ def ('cg _ 256c _ 128dp _ v20 _ deform _ lj _ kg _ uk _ 2 _ x') df1 = df1. values df2 = df2. values df3 = df3. values deformation _ along = np. argmax ( np. array ( [ np. std ( df1 [ :, 1 ] ), np. std... | [
-0.3964090943336487,
0.021155767142772675,
0.8075856566429138,
-0.6094266176223755,
-0.2704126536846161,
-0.12384242564439774,
0.4325631558895111,
-0.28392988443374634,
0.14588427543640137,
-0.6524765491485596,
0.10057966411113739,
0.21207676827907562,
-0.6614223718643188,
0.08106947690248... |
def add _ nodedep _ two _ knots ( curr _ doc : currentdoc, el, el _ type ) : left _ node, right _ node, ( x _ middle, y _ middle ), length, angle = \ vis _ el. get _ 1st2nd _ center _ length _ angle ( el. x1 _, el. y1 _, el. x2 _, el. y2 _ ) knot1 = get _ knot _ name _ from _ nodeindep _ list ( curr _ doc. data _ sourc... | [
-0.5504894852638245,
-0.4140852093696594,
0.9861818552017212,
-0.4955213963985443,
-0.5809442400932312,
0.673839271068573,
0.5375008583068848,
-0.06965719163417816,
0.2519002854824066,
0.2337653934955597,
-0.40137964487075806,
1.1423468589782715,
0.4266861379146576,
0.8664856553077698,
0... |
def test _ random _ uniform _ and _ belongs ( self ) : point = self. beta. random _ point ( ) result = self. beta. belongs ( point ) expected = true self. assertallclose ( expected, result ) | [
0.5274838209152222,
-0.1120009496808052,
0.4030497670173645,
0.25781896710395813,
1.2454335689544678,
1.8732599020004272,
0.46494805812835693,
0.02481304295361042,
0.45423054695129395,
-1.2665386199951172,
-0.5442954897880554,
0.0059071802534163,
-1.1561307907104492,
0.19109965860843658,
... |
def reset _ struct ( self ) : self. struct _ dict = self. struct. as _ dict ( ) return self. struct | [
-0.24976284801959991,
-0.5848080515861511,
0.13265694677829742,
-0.8830172419548035,
-0.5363008379936218,
-0.30496180057525635,
0.36755257844924927,
-0.43161317706108093,
-0.10857808589935303,
-0.6427831649780273,
-0.8603797554969788,
0.8632757067680359,
-0.8229636549949646,
-1.22678029537... |
async def test _ text _ value _ outside _ bounds ( hass ) : with pytest. raises ( valueerror ) : mocktextentity ( " hello world ", native _ min = 2, native _ max = 5, pattern = r " [ a - z ] " ). state with pytest. raises ( valueerror ) : mocktextentity ( " hello world ", native _ min = 15, native _ max = 20, pattern =... | [
0.15296007692813873,
0.0526653453707695,
0.36177200078964233,
-0.29466721415519714,
-0.43132758140563965,
1.1438405513763428,
-0.8393914103507996,
0.06869020313024521,
-0.2835635244846344,
-0.1108037605881691,
-0.39309296011924744,
-0.20279629528522491,
0.3800950050354004,
0.60510122776031... |
def is _ a ( self, * args ) : return self. field _ type in args | [
-0.6001965403556824,
-0.12614886462688446,
0.49842116236686707,
0.03575814887881279,
1.6760482788085938,
0.6061656475067139,
-0.048719827085733414,
-0.1911081075668335,
-0.315093457698822,
-0.8227261900901794,
0.2437686026096344,
0.7827597260475159,
-0.6379216313362122,
0.7138454914093018,... |
def _ _ init _ _ ( self, s ='' ) : self. tokens = [ ] if s is not none : for word in s. replace ('( ','('). replace (') ',')'). split ( ) : if word. upper ( ) in self. keywords : self. tokens. append ( word ) elif len ( self. tokens ) is not 0 : self. tokens [ - 1 ] + = " " + word | [
0.16626191139221191,
-0.08464337885379791,
0.584493100643158,
0.25396469235420227,
-1.078997015953064,
-1.2886369228363037,
-0.6882082223892212,
0.9595388770103455,
0.9649627208709717,
0.0024460717104375362,
-0.17809264361858368,
0.732551097869873,
-0.6704152822494507,
0.9193446040153503,
... |
def add _ new ( s, bugid, pattern, comment = none ) : s. add ( bugid, pattern, comment ) s. bugs [ - 1 ]. new = true | [
0.11130939424037933,
-0.784226655960083,
0.4442271292209625,
0.35504111647605896,
1.0332980155944824,
0.14876152575016022,
-0.13735461235046387,
-0.24808800220489502,
0.5484041571617126,
-0.6277992725372314,
-1.0981659889221191,
0.3038223385810852,
-0.44891950488090515,
0.06026666611433029... |
def _ _ init _ _ ( _ _ self _ _, resource _ name : str, args : registryenterpriseinstanceargs, opts : optional [ pulumi. resourceoptions ] = none ) :... | [
-0.3845049738883972,
0.684362530708313,
0.36755967140197754,
-0.5626394152641296,
0.5929717421531677,
0.14442294836044312,
0.362474262714386,
0.8817942142486572,
0.9843000173568726,
0.3571556508541107,
-0.38805365562438965,
0.4638211131095886,
-0.2810855209827423,
-0.6759346723556519,
-0... |
def locate _ poles ( ) : n1 = np. array ( [ 1, 1 ] ) n2 = np. array ( [ 1, 2 ] ) d1 = np. array ( [ 1, 2j ] ) d2 = np. array ( [ 1, - 2j ] ) d3 = np. array ( [ 1, 3 ] ) numerator _ g, denominator _ g = np. array ( [ 6, 0, 1 ] ), np. array ( [ 1, 3, 3, 1 ] ) sys _ g = ct. tf ( numerator _ g, denominator _ g ) zeros _ g ... | [
0.29352715611457825,
-0.041431766003370285,
0.6951141953468323,
0.08797766268253326,
0.4667123854160309,
-0.0039629386737942696,
1.2779693603515625,
-0.11580795794725418,
-0.5085640549659729,
-0.42478546500205994,
-0.1014055535197258,
-0.13578064739704132,
0.22300682961940765,
0.5634810328... |
def get _ option _ access ( self, section _ name, option _ name ) : section _ restrictions = self. restrictions. get ( section _ name, none ) if section _ restrictions is none : return self. default _ access # return access level with fallbacks return section _ restrictions. get ( option _ name, section _ restrictions.... | [
0.14256426692008972,
-0.440032958984375,
0.6935055255889893,
0.5578417181968689,
-0.04953228682279587,
-0.48368969559669495,
0.4576641321182251,
-0.1549156755208969,
-0.34320592880249023,
0.4742574393749237,
1.6857236623764038,
0.5231484174728394,
-0.10054387152194977,
-0.21395131945610046... |
def setup ( self ) : self. addcleanup ( clean _ up ) if process _ exists ( " stratisd " ) is none : exec _ command ( [ " systemctl ", " start ", " stratisd " ] ) time. sleep ( 20 ) clean _ up ( ) time. sleep ( 1 ) exec _ command ( [ " udevadm ", " settle " ] ) | [
0.8727974891662598,
0.5614773035049438,
0.5611104369163513,
0.05228515341877937,
0.9047213792800903,
0.536467432975769,
0.5261529088020325,
-0.1827801614999771,
0.8698644042015076,
-0.35063278675079346,
0.13280370831489563,
0.13144315779209137,
0.13845539093017578,
0.5762453079223633,
-0... |
def summoners _ by _ name ( self, names, region ) : # create format string for names and format the names into it name _ str ='('+'\'{ } \'' + ( ', \'{ } \'' * ( len ( names ) - 1 ) ) +')'name _ str = name _ str. format ( * names ) rows = self. stat _ db. select _ values ('summoners ', ['*'], ['standardname in { } '. f... | [
0.2561200261116028,
-0.10153862088918686,
0.27859580516815186,
-0.48081734776496887,
-0.5732482075691223,
-0.9554011225700378,
-1.3527790307998657,
-0.1687140017747879,
-0.18129770457744598,
0.4570038318634033,
-0.8069347739219666,
-0.09450473636388779,
-0.811609148979187,
0.24186672270298... |
def load _ json _ file ( filepath ) : try : with open ( filepath,'r') as jsonfile : return json. load ( jsonfile ) except : logging. error ('could not load. json file % s'% filepath ) return none | [
0.021733954548835754,
-0.4782206416130066,
0.3218423128128052,
-0.7485620975494385,
-0.5797809958457947,
-0.07899021357297897,
0.10531431436538696,
-1.5411736965179443,
0.13244907557964325,
0.7456852197647095,
-0.42748913168907166,
-0.02514033578336239,
-0.11225074529647827,
-0.29494595527... |
def get _ x _ and _ y _ degrees ( network ) : edges = network. edges ( ) n _ edges = len ( edges ) x _ degrees = np. zeros ( 2 * n _ edges ) y _ degrees = np. zeros ( 2 * n _ edges ) for i, ( u, v ) in enumerate ( edges ) : x _ degrees [ i ] = network. degree [ u ] y _ degrees [ i ] = network. degree [ v ] for i in ran... | [
-0.47348031401634216,
-0.2498665601015091,
0.6374167799949646,
-0.5915778279304504,
0.3539765775203705,
-0.18769115209579468,
0.14011888206005096,
-0.11060173064470291,
0.05937369167804718,
0.08239057660102844,
-0.495027631521225,
-0.08806991577148438,
-0.07960330694913864,
0.4596216380596... |
def get _ endpoints ( self ) : return self. api _ endpoints _ v2 | [
-0.5328109264373779,
-1.1490504741668701,
0.11363152414560318,
1.1798350811004639,
0.46410298347473145,
-0.11458565294742584,
-1.068772554397583,
0.45125097036361694,
-0.008783899247646332,
-0.06462841480970383,
-0.3934233784675598,
1.1185764074325562,
-0.11738698184490204,
-0.916951835155... |
def handle ( cls, * args, * * kwargs ) : names _ filename = environ. get ( names _ env _ var, names _ def ) nodes _ filename = environ. get ( nodes _ env _ var, nodes _ def ) n = 10 * 1000 if not kwargs ['no _ names'] : add _ names ( names _ filename ) if not kwargs ['no _ nodes'] : add _ nodes ( nodes _ filename ) if ... | [
-0.1841503083705902,
1.1675920486450195,
0.592195451259613,
-0.2028408944606781,
1.1950962543487549,
0.437699556350708,
-0.32217177748680115,
0.016002142801880836,
-0.9485039710998535,
-0.18777360022068024,
-0.3832489848136902,
0.37058547139167786,
0.4101939797401428,
0.8720887899398804,
... |
def load ( self, yaml _ dir ) : piece _ path = os. path. join ( yaml _ dir,'piece. yaml') f = open ( piece _ path,'r') text = f. read ( ) f. close ( ) yaml _ data = yaml. load ( text ) self. title = yaml _ data ['title'] self. filename = yaml _ data ['filename'] self. composer = yaml _ data ['composer'] self. emsis _ n... | [
-0.1922863870859146,
-0.5239489078521729,
0.7690116763114929,
-1.180492639541626,
-0.3987807631492615,
0.1496608853340149,
0.24184280633926392,
0.3556615710258484,
-0.10352692753076553,
-0.19687554240226746,
-0.5337876081466675,
0.6215430498123169,
0.06874660402536392,
0.6509205102920532,
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.