text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ _ init _ _ ( self, allowed _ paths : confignodepropertyarray = none, cq _ analytics _ saint _ exporter _ pagesize : confignodepropertyinteger = none ) : # noqa : e501 self. openapi _ types = {'allowed _ paths': confignodepropertyarray,'cq _ analytics _ saint _ exporter _ pagesize': confignodepropertyinteger } sel...
[ 0.029241150245070457, 0.04637811705470085, 0.4567728340625763, 0.7231709361076355, -1.0633548498153687, -0.1547742635011673, 0.9308068156242371, 0.5059471130371094, 0.6093160510063171, -0.1642601490020752, 0.18462933599948883, -0.2347036898136139, 0.6558094620704651, 0.38259631395339966, ...
def shell _ django ( session : djangosession, backend : shellbackend ) : namespace = {'session': session } namespace. update ( backend. get _ namespace ( ) ) embed ( user _ ns = namespace, header = backend. header )
[ 0.44298484921455383, 0.018810665234923363, 0.4164249002933502, 0.1280338019132614, -0.10622049123048782, 0.32524946331977844, -0.44752237200737, -1.0415443181991577, 0.9322884678840637, 0.0003978222084697336, -0.28886187076568604, 1.111528992652893, 0.5377634167671204, 0.3522054851055145, ...
def clean _ username ( self ) : existing = user. objects. filter ( username _ _ iexact = self. cleaned _ data ['username'] ) if existing. exists ( ) : raise forms. validationerror ( _ ( " a user with that username already exists. " ) ) else : return self. cleaned _ data ['username']
[ -0.5166054964065552, 0.11909272521734238, 0.44727811217308044, -0.30413228273391724, 0.2122136801481247, 0.4195912480354309, 0.7773277163505554, -0.19594299793243408, 0.021751170977950096, 0.3403112292289734, -0.08818922191858292, -0.48370981216430664, -0.3534426689147949, 0.02613272145390...
def setup _ drug _ codes ( ) : conn = sqlite3. connect ('source. db') curs = conn. cursor ( ) curs. execute ('drop table if exists ndc _ product ;') create _ string = " " " create table ndc _ product ( id integer primary key, product _ id text, name text, suffix text, non _ proprietary _ name text, dea _ schedule text ...
[ -0.5546396374702454, 0.39615029096603394, 0.7268043756484985, -0.07602443546056747, 0.39384040236473083, 0.08864106982946396, 0.08797871321439743, -0.46539977192878723, -0.28184959292411804, 1.2106561660766602, -0.8002521991729736, -0.29526129364967346, -0.5462079644203186, 0.2291509956121...
def instance _ type ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " instance _ type " )
[ 0.33903616666793823, 0.5456881523132324, 0.42551475763320923, -0.051582302898168564, 0.6791642904281616, 2.018336534500122, 0.5520007610321045, 0.21809829771518707, 0.39572346210479736, 0.3586835265159607, 0.21613550186157227, 1.437800407409668, -0.8819667100906372, -1.0089609622955322, ...
def reply ( request, pk ) : p = request. post if p [ " body " ] : thread = thread. objects. get ( pk = pk ) post = post. objects. create ( thread = thread, title = p [ " subject " ], body = p [ " body " ], creator = request. user ) increment _ post _ counter ( request ) return httpresponseredirect ( reverse ( " forum. ...
[ 0.14101393520832062, 0.5585412383079529, 0.8150531053543091, -0.3274567723274231, 0.741614043712616, 0.9548918604850769, 0.002084002597257495, -0.029116932302713394, 0.6856253743171692, -0.7670225501060486, -0.21831776201725006, -0.04701515659689903, -0.34498167037963867, -0.00639358814805...
def _ _ init _ _ ( self, geo : geo, config : configuration, ssdp : ssdpserver, port : int = none ) : super ( ). _ _ init _ _ ( ) self. geo = geo self. config = config self. port = port self. ssdp = ssdp self. locast _ service = locastservice ( self. config, self. geo )
[ 0.18898792564868927, -0.5574024319648743, 0.3960074186325073, -0.421199768781662, -0.36335691809654236, 0.8401401042938232, -0.44514593482017517, 0.7356916069984436, 0.5763883590698242, 0.042200129479169846, 0.3355308473110199, 0.8780459761619568, -0.10530876368284225, 0.7588136792182922, ...
def logged _ in ( self ) : return ( # are we connected? self. _ monitor _ task is not none and not self. _ monitor _ task. done ( ) # are we ready? and self. _ login _ completed. done ( ) and not self. _ login _ completed. cancelled ( ) and self. _ login _ completed. exception ( ) is none )
[ -0.652919352054596, -0.6057741641998291, 0.712252140045166, 0.24623781442642212, -0.1838536262512207, 0.08382025361061096, -0.06997328251600266, -0.02305196225643158, -0.0182218998670578, 0.1605740487575531, -1.0316739082336426, -0.2653101086616516, -0.25688156485557556, 0.1365134268999099...
def is _ application _ command _ mention ( text ) : return ( application _ command _ mention _ rp. fullmatch ( text ) is not none )
[ 1.067381739616394, -1.356151819229126, 0.43856364488601685, 0.7446141839027405, 0.1558217704296112, 0.42283332347869873, 0.102500319480896, 0.10000455379486084, 0.7306715846061707, 0.48346957564353943, 0.6313562393188477, 0.6512898802757263, -0.6621941328048706, 1.6509665250778198, -0.95...
def deletemediaitem ( self, media _ name : str ) - > dict : try : # get media item by media name item _ obj = self. mediaitembyname ( media _ name ) if item _ obj : # delete the media item item _ obj. delete ( ) ret _ val = {'responsecode': 200,'message':'item deleted successfully'} except objectdoesnotexist as ex : re...
[ -0.7982345223426819, -0.8351334929466248, 0.8389365673065186, 0.8458442091941833, -0.22267106175422668, 0.09352768957614899, 0.15361417829990387, 0.2929224371910095, 0.01586582139134407, 1.1209311485290527, 0.01709771901369095, -0.1940387785434723, -0.8743136525154114, 0.6886618733406067, ...
def parse _ wrong _ class _ str ( string ) : if isinstance ( string, str ) : output = string. replace ('[ ','' ). replace ('] ','' ). split ( ", " ) output = [ int ( idx ) for idx in output ] else : output = string return output
[ -1.1782630681991577, -0.9016944766044617, 0.5559223294258118, 0.31762373447418213, 0.1762312799692154, -0.299862265586853, 0.16616876423358917, 0.020511195063591003, 0.8298488855361938, 0.43506088852882385, 0.13739852607250214, 0.3467724323272705, -0.3775217533111572, -0.20772939920425415,...
def parse _ tests ( self, testcases, variables _ mapping = none ) : self. exception _ stage = " parse tests " variables _ mapping = variables _ mapping or { } parsed _ testcases _ list = [ ] for testcase in testcases : # parse config parameters config _ parameters = testcase. setdefault ( " config ", { } ). pop ( " par...
[ -0.9437779188156128, -0.0038324384950101376, 0.6423794031143188, 0.38088467717170715, -0.01677280105650425, -0.01038384810090065, 0.18590722978115082, -0.16362126171588898, 0.2515532374382019, 0.18653333187103271, -0.46375495195388794, -0.3203431963920593, 0.22312939167022705, 1.0792685747...
def departures _ handler ( self, airport : str, context : optional [ any ] = none ) - > message : states _ dict = self. get _ states _ dict ( ) data = self. _ flight _ connection _ handler ( airport, states _ dict = states _ dict, get _ flight _ connections _ handler = self. _ departures _ today _ handler ) return mess...
[ -1.51654052734375, 0.32991859316825867, 0.5229322910308838, -0.4385741651058197, 0.03599277883768082, -0.29079025983810425, -0.35738807916641235, -1.0068845748901367, -0.05891287326812744, -0.7760553359985352, -0.310567706823349, -0.7690531015396118, 0.1579996645450592, 0.8261501789093018,...
def _ _ init _ _ ( self, argument _ index _ or _ name, argument, valid _ types ) : super ( invalidargumenttype, self ). _ _ init _ _ ( " argument { } ( { } : { } ) { }. ". format ( str ( argument _ index _ or _ name ), str ( argument ), str ( argument. _ _ class _ _. _ _ name _ _ ), ( " must be of type { } ". format ( ...
[ -0.15316495299339294, -0.14150342345237732, 0.6269200444221497, 0.11567097902297974, 0.44061604142189026, 0.07913245260715485, 0.019391311332583427, 0.2709105312824249, 0.7413656115531921, 0.22653020918369293, 0.42595595121383667, 0.868821918964386, -0.3608567714691162, 0.449984610080719, ...
def test _ _ sample _ sample ( self ) : # setup instance = univariate ( ) instance. constant _ value = 15 expected _ result = np. array ( [ 15, 15, 15, 15, 15 ] ) # run result = instance. _ constant _ sample ( 5 ) # check compare _ nested _ iterables ( result, expected _ result )
[ 0.22651077806949615, 0.5616489052772522, 0.43791115283966064, 0.31714731454849243, -0.3595706522464752, 0.2458062320947647, 0.8936006426811218, 0.081649549305439, -0.07748748362064362, 0.17282012104988098, -0.05845998227596283, -0.13200519979000092, -0.38422641158103943, -0.051222480833530...
def _ convert _ to _ unicode ( ip ) : if six. py2 and type ( ip ) = = str : return six. u ( ip ) return ip
[ -1.147824764251709, -0.15520398318767548, 0.3966110944747925, 0.7321559190750122, -1.136625051498413, -0.5532553791999817, -0.5129109621047974, 0.11890530586242676, 0.5374904274940491, -0.015215206891298294, 0.2764865458011627, 0.00981887150555849, -0.03315715119242668, -1.6500886678695679...
def _ _ init _ _ ( self, creds _ path, sheet _ name ) : self. creds _ path = creds _ path self. sheet _ name = sheet _ name self. scope = ['https : / / spreadsheets. google. com / feeds ','https : / / www. googleapis. com / auth / drive']
[ 0.1734216958284378, -0.8524271249771118, 0.48294171690940857, -0.34675508737564087, 0.4116867184638977, -0.3037302494049072, -1.2236852645874023, 0.7677081227302551, -0.3282751142978668, -0.4333837628364563, 0.3877308964729309, 1.5705875158309937, -0.05326250195503235, 0.5820873379707336, ...
def generate ( self ) : node = self. model. chain [ random. choice ( [ key for key in self. model. chain. keys ( ) ] ) ] while len ( node. next _ states ) = = 0 : node = self. model. chain [ random. choice ( [ key for key in self. model. chain. keys ( ) ] ) ] while true : yield node. state [ - 1 ] if len ( node. next _...
[ -0.718364953994751, 0.3140771687030792, 0.7658987045288086, -0.2540839612483978, 0.26387956738471985, 0.21729275584220886, -0.30858567357063293, -0.5221821069717407, 0.17746903002262115, -0.10757430642843246, -0.19434045255184174, -0.06435155868530273, -0.4844350814819336, 0.03246676921844...
def _ _ enter _ _ ( self ) : return self
[ 0.13123047351837158, -0.782573401927948, 0.6316007971763611, -0.41870513558387756, 0.31926971673965454, 0.8569802641868591, 1.2538954019546509, -1.1540898084640503, 0.803473711013794, -1.208643913269043, 0.3296705186367035, 1.2520254850387573, -0.6983992457389832, -0.5274508595466614, -0...
def planning ( self, sx, sy, gx, gy ) : nstart = self. node ( self. calc _ xyindex ( sx, self. minx ), self. calc _ xyindex ( sy, self. miny ), 0. 0, - 1 ) ngoal = self. node ( self. calc _ xyindex ( gx, self. minx ), self. calc _ xyindex ( gy, self. miny ), 0. 0, - 1 ) open _ set = dict ( ) closed _ set = dict ( ) ope...
[ -0.42508968710899353, 0.5868960022926331, 0.8059907555580139, -0.21262642741203308, -0.3871791958808899, -0.3893815577030182, 0.26603269577026367, -0.3451833426952362, -0.21211236715316772, 0.7049893736839294, 0.2820858955383301, 0.12988300621509552, -0.31238865852355957, -0.26825398206710...
def hadd ( config ) : if config. recursive : _ recursive _ hadd ( config ) return good _ files = _ get _ good _ files ( config. input _ hists ) if config. dash _ hadd : if config. norm : raise valueerror ('normalization not allowed for dash - hadd') _ dash _ hadd ( good _ files, config. output, fast = config. fast, agg...
[ 0.5629481673240662, 0.5947814583778381, 0.6454320549964905, 0.7860475182533264, 0.31600460410118103, 0.4267297089099884, 0.7419112920761108, 1.1034832000732422, -0.1775183528661728, -0.6683980822563171, 0.2449711412191391, 0.2531574070453644, 0.2609975039958954, 0.9029232263565063, 1.071...
def test _ unarchive _ conflict ( self ) : work _ entry _ 1 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 9, 0 ), datetime ( 2018, 10, 10, 12, 0 ) ) work _ entry _ 2 = self. create _ work _ entry ( datetime ( 2018, 10, 10, 10, 0 ), datetime ( 2018, 10, 10, 18, 0 ) ) work _ entry _ 2. active = false self. ass...
[ 0.20000775158405304, -0.23532888293266296, 0.7552666068077087, 0.2787718176841736, 0.9123504757881165, 0.6418976783752441, 0.4585622251033783, 0.6273573637008667, 0.2213922142982483, 0.23853647708892822, -0.8009610176086426, -0.6462492942810059, -0.42755502462387085, -0.9794730544090271, ...
def send _ cmd ( self, cmd, payload = none ) : sentbytes = self. _ sendall ( pack ( cmd _ fmt, cmd ) ) if payload : self. send _ string ( payload ) return sentbytes
[ -0.4861648976802826, 0.32970482110977173, 0.39211225509643555, 0.028083989396691322, -0.6554701924324036, -0.5943331718444824, -0.9797549843788147, -1.052620768547058, 0.7988874912261963, -0.8905702829360962, 0.14632798731327057, 0.20649589598178864, -0.4654034972190857, 1.1120790243148804...
async def get _ complicated ( self, * * kwargs ) - > " models. salmon " : cls = kwargs. pop ('cls ', none ) # type : clstype [ " models. salmon " ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) # construct url url = self. get _ compli...
[ -0.7557319402694702, 0.04223558306694031, 0.9012581706047058, -0.11434201151132584, -0.08011704683303833, -0.9510483741760254, -0.6036670207977295, -0.28712621331214905, 0.1095983013510704, -0.42831116914749146, -0.33743739128112793, 0.9459531903266907, -0.17428597807884216, -0.65043509006...
def delete _ from _ revit ( self, doc ) : # type : ( document ) - > none doc. familymanager. removeparameter ( doc. familymanager. get _ parameter ( self. name ) )
[ 0.011011357419192791, 0.0168613251298666, 0.307485967874527, -0.5553553104400635, -0.0870949923992157, 0.4141262471675873, 0.6128620505332947, 0.05669941380620003, 0.11341110616922379, 0.18911004066467285, 0.20185013115406036, 0.4651227295398712, -0.6582412123680115, 0.5739090442657471, ...
def test _ version _ change ( self ) : cache = cache ( self. wsdir ) cache. set _ object ( " test ", 1, " data " ) self. assertequal ( cache. get _ object ( " test ", 1 ), " data " ) self. assertequal ( cache. get _ object ( " test ", 2 ), none ) new _ cache = cache ( self. wsdir ) self. assertequal ( new _ cache. get ...
[ -0.5691154599189758, -0.1895906925201416, 0.6191705465316772, 0.021613184362649918, -0.2367444485425949, 0.03532335162162781, 0.08500606566667557, -0.3710416555404663, 0.06928029656410217, 0.7235537767410278, -1.0543934106826782, 0.676737904548645, -0.27618607878685, 0.08337749540805817, ...
def crawl ( self, run _ date _ str : str, index _ from : int = 0, index _ to : int = 1 ) : if index _ to is none : index _ to = self. product _ config. default _ index _ to pool = threadpoolexecutor ( self. product _ config. num _ thread ) page _ per _ task = math. ceil ( ( index _ to - index _ from ) / self. product _...
[ -1.0955613851547241, 0.3306467831134796, 0.7586299180984497, 0.23628346621990204, 0.25839754939079285, 0.3355095386505127, 0.6563466787338257, -0.7189480066299438, -0.8563019037246704, -0.2132352590560913, 0.14336282014846802, 1.2640572786331177, 0.2621608376502991, -0.6604009866714478, ...
def partitions ( self, table ) : self. _ tables _ init ( ) # cache results for later. # if we don't know the partitions yet, get them now. if not'partitions'in self. tables [ table ]. keys ( ) : partition _ descs = self. query ('set hive. cli. print. header = false ; show partitions { 0 } ; '. format ( table ) ). split...
[ -0.4161032438278198, 0.5078806281089783, 0.44009730219841003, 0.41552555561065674, -0.20264162123203278, -0.7319494485855103, -0.8195635676383972, 0.024070432409644127, 0.3480488657951355, 0.18728508055210114, 0.3745315372943878, -0.1456255465745926, 0.22587227821350098, 0.1796393096446991...
def getstate ( self ) : return self. a. state
[ 0.11545606702566147, -1.0843600034713745, 0.3006078898906708, 0.12950818240642548, -0.1554953157901764, -0.02034938335418701, 1.26727294921875, -0.042185209691524506, 1.1339291334152222, -1.0076590776443481, 0.5259767174720764, 0.32306596636772156, -0.4656182527542114, 0.001592363347299397...
def test _ domain _ matches _ aspect _ ratio ( self, width, height, scale ) : assume ( scale > 0 ) domain = get _ real _ domain ( width, height, scale ) ylength = domain. ymax - domain. ymin xlength = domain. xmax - domain. xmin domain _ ratio = xlength / ylength aspect _ ratio = width / height assert domain _ ratio = ...
[ -0.12468057125806808, -0.5677049160003662, 0.4913319945335388, -0.1037629023194313, -0.4069550633430481, 0.19343635439872742, -0.13272559642791748, -0.4205319285392761, 0.510356605052948, -0.3907991051673889, 0.21981194615364075, 0.1255488097667694, 0.407024085521698, 0.988652229309082, ...
def test _ del _ nodes ( gr ) : gr. add _ node ('val1') gr. del _ node ('val1') assert'val1'not in gr. node _ dict
[ 0.25489985942840576, 1.602421760559082, 0.2577012777328491, -0.5891069173812866, 0.3007294535636902, 0.8663786053657532, -0.18265393376350403, 0.2462150603532791, -0.35373204946517944, 0.10183081030845642, -0.0517546609044075, 0.6119338274002075, -0.1802970916032791, -0.4088445007801056, ...
def unregisterhandler ( self, name, handler, typ ='', ns ='', xmlns = none ) : if not xmlns : xmlns = self. _ owner. defaultnamespace if not self. handlers. has _ key ( xmlns ) : return if not typ and not ns : typ ='default'for pack in self. handlers [ xmlns ] [ name ] [ typ + ns ] : if handler = = pack ['func'] : brea...
[ -0.36850640177726746, 0.4250780940055847, 0.35609912872314453, 0.187734916806221, 0.12476113438606262, -0.29391464591026306, -0.6479015350341797, -0.2863098978996277, 0.09180421382188797, -0.4864841103553772, -0.9023820161819458, 0.22035875916481018, -0.9406219720840454, 0.4069887399673462...
def save ( self, * args, * * kwargs ) : try : if getattr ( settings,'firebase _ sync ', false ) and ( self. slot and self. room ) : firebase _ secret = getattr ( settings, " firebase _ secret ", false ) firebase _ user = getattr ( settings, " firebase _ user ", false ) firebase _ pass = getattr ( settings, " firebase _...
[ -1.1711523532867432, -0.7057243585586548, 0.7571101784706116, -0.3036734163761139, 0.2184511423110962, 0.05546756088733673, 0.1912011206150055, -0.599878191947937, 0.21017034351825714, -0.12213537842035294, -0.6948172450065613, -1.0084693431854248, 0.13331617414951324, 1.533725619316101, ...
def exchangecols ( m, c1, c2 ) : for k in range ( len ( m ) ) : m [ k ] [ c1 ], m [ k ] [ c2 ] = m [ k ] [ c2 ], m [ k ] [ c1 ] return m
[ -0.30206891894340515, -0.6144995093345642, 0.6158123016357422, -1.1689563989639282, -0.33276090025901794, 0.2429518699645996, -0.5162845849990845, -0.1910395622253418, -1.6664912700653076, 0.9237427115440369, -0.0020445415284484625, 0.3822384476661682, 0.013840598985552788, -1.128433942794...
def _ checkfiles ( self ) : # verify that the top - level imports file exists. fpath = self. config. gettopimportsfilepath ( ) if not ( os. path. isfile ( fpath ) ) : raise runtimeerror ('the top - level imports source file could not be found : { 0 }. '. format ( fpath ) )
[ 0.20109499990940094, 0.5334030389785767, 0.4515897035598755, -0.588651716709137, 1.1235171556472778, 1.045822024345398, 0.5906959772109985, 0.11484893411397934, -0.7181435823440552, -0.3312421143054962, -0.11284195631742477, -0.15761591494083405, -0.1362108737230301, 0.5125483274459839, ...
def qae ( ae, q = 0. 9, nan _ flag = true ) : if nan _ flag : return np. quantile ( np. nan _ to _ num ( ae ), q, axis = 0 ) else : return np. quantile ( ae, q, axis = 0 )
[ -0.15223902463912964, 0.24801459908485413, 0.4882897436618805, -0.7330358624458313, -0.12825603783130646, -0.16524195671081543, -0.2629764676094055, 0.2861853241920471, 1.0661221742630005, 0.30223727226257324, 0.3560744822025299, 0.42532873153686523, 0.4610554277896881, 0.312322199344635, ...
def test _ diff _ of _ matrix ( self ) : matrix = matrix ( [ [ 1, 2, 3 ], [ 4, 3, 2 ] ] ) self. assertequals ( [ [ - 2, 0, 2 ], [ 3, - 1, - 5 ] ], matrix - matrix ( [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) ) self. assertequals ( [ [ - 2, 0, 2 ], [ 3, - 1, - 5 ] ], matrix - [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) self. assertraises ( diff...
[ -0.047067269682884216, 0.3907046914100647, 0.722329318523407, 0.24622903764247894, -0.3581181466579437, 0.5504851341247559, 0.5402427911758423, -0.2776366174221039, -0.10185238718986511, -0.32486578822135925, -0.3767235279083252, -0.23821717500686646, 0.1275971680879593, 0.6461365818977356...
def get _ by ( self, codigo ) : # se definie el query de la consulta. sql _ string = " " " select codigo, rh025, ha, hh, th from coef _ sharpe _ demichele where codigo = % ( codigo ) s " " " # se construye el diccionario que contiene los parametros del query. cursor = self. db. query ( sql _ string, { " codigo " : codi...
[ -0.3358554244041443, 0.4272235929965973, 0.3594833016395569, -0.6511766314506531, -0.04678898677229881, -1.0224403142929077, -0.15933623909950256, -0.32726818323135376, -0.8085016012191772, 0.2504690885543823, -0.5411465764045715, 0.21360217034816742, -0.3499048352241516, 0.192840695381164...
def hyper _ eval ( est, x _ train, y _ train, randseed, hype _ cv, params, scoring _ metric ) : cv = stratifiedkfold ( n _ splits = hype _ cv, shuffle = true, random _ state = randseed ) model = clone ( est ). set _ params ( * * params ) # flexibly handle whether random seed is given as'random _ seed'or'seed'- scikit l...
[ 0.3049268424510956, 0.791118860244751, 0.7013525366783142, 0.7503636479377747, 0.045844707638025284, 0.18088817596435547, 0.21664384007453918, 0.16043245792388916, -0.15850670635700226, 1.1875042915344238, 0.34835436940193176, 0.5285261273384094, 0.39965566992759705, 0.32241275906562805, ...
def multiply ( traj ) : z = traj. x * traj. y traj. f _ add _ result ('z ', z = z, comment ='i am the product of two reals!')
[ -0.8575998544692993, 0.6139122247695923, 0.3107501268386841, 0.6434938311576843, 0.6550123691558838, -0.5268092155456543, 0.7857025861740112, -0.7793805003166199, 0.07738357782363892, -0.4797167479991913, -0.8499778509140015, -1.316831111907959, 0.6230977773666382, -0.08190372586250305, ...
def qt _ theme ( self ) : return self. _ themes [ self. _ qt _ theme ]
[ 0.05918223410844803, -0.7867401242256165, 0.06713605672121048, -0.48060479760169983, -0.6246153116226196, 0.44282233715057373, -0.482006698846817, -1.2581497430801392, 0.400579035282135, 0.011322501115500927, 0.5382434725761414, 0.7550646662712097, 0.14716504514217377, -0.3856765925884247,...
def divide _ by _ pos _ wk ( data, pos, wk ) : df = data [ ( data ['pos1'] = = pos ) & ( data ['wk'] = = wk ) ] return df
[ -0.014343000017106533, -0.6099013090133667, 0.4911888539791107, -0.4966558516025543, -0.6571872234344482, -0.765272855758667, -0.06922277808189392, 0.6281917095184326, -0.6257578730583191, 0.5010596513748169, 0.31229451298713684, -0.4165703058242798, -0.3271191120147705, -0.492531955242157...
def test _ can _ cancel _ after _ cancellation _ period ( self, mock _ tz ) : mock _ tz. now. return _ value = datetime ( 2015, 2, 1, tzinfo = dt _ timezone. utc ) event = baker. make _ recipe ('booking. future _ ev ', date = datetime ( 2015, 2, 2, tzinfo = dt _ timezone. utc ), cancellation _ period = 48 ) booking = b...
[ 0.8954414129257202, 0.5047609806060791, 0.4887881875038147, 1.3115297555923462, -0.8631044030189514, 1.1259468793869019, 0.1803414225578308, 1.2623308897018433, 0.24566669762134552, -0.4144691526889801, 0.2896873354911804, -0.7734745740890503, -0.03322350233793259, 0.19798719882965088, 0...
def skip _ to _ next _ lane ( self ) : self. seek _ image ( self. _ image _ num _ max + 1 )
[ -0.9175055027008057, 0.3362405002117157, 0.4257116913795471, -0.24539802968502045, 0.6510609984397888, 0.7467326521873474, 0.8013020753860474, -0.339896023273468, -0.015226241201162338, -0.33931824564933777, 0.7378500699996948, 0.3835105895996094, 0.365205854177475, -0.5144250988960266, ...
def test _ import _ v1 _ database _ with _ dataset ( self ) : contents = { " databases / imported _ database. yaml " : yaml. safe _ dump ( database _ config ), " datasets / imported _ dataset. yaml " : yaml. safe _ dump ( dataset _ config ), " metadata. yaml " : yaml. safe _ dump ( database _ metadata _ config ), } com...
[ 0.32526591420173645, 0.832960307598114, 0.5346554517745972, 0.22348655760288239, 0.2572212815284729, 0.4637744128704071, 0.503107488155365, 0.7975723743438721, 0.2173614203929901, 0.6035084128379822, -0.5593156218528748, 0.3358581066131592, -0.34758490324020386, -0.4501315653324127, -0.4...
def reset ( self ) : with self. _ lock : self. _ candidates = dict ( ( address, none ) for address in self. _ candidates. iterkeys ( ) )
[ -0.9659330248832703, -0.7676242589950562, 0.2730068564414978, -0.4077119827270508, 0.07154534012079239, -0.6435791850090027, 0.5365245342254639, 0.690986156463623, -0.3526119589805603, 0.015750452876091003, -0.2784290015697479, 1.6064704656600952, -0.9933546185493469, -0.7517117261886597, ...
def _ add _ children ( tag, node, urlpath, is _ root = true ) : # if this is the root node of our tree, and we have'showroot'set # then add this as a top level list item if node is not none and is _ root is true and self. showroot is true : _ add _ root _ menu ( tag ) if node is none or node. children is none : return ...
[ 0.11739079654216766, 0.3884539306163788, 0.778323769569397, 0.8715915083885193, 0.18253424763679504, 0.08830856531858444, -0.145322784781456, 0.4041655361652374, 0.21858349442481995, -0.500400185585022, 0.6919189691543579, -0.14994516968727112, 0.024891920387744904, 1.2450591325759888, -...
def encrypt _ path ( dest, src, homedir = none, verbose = false ) : assert dest and dest. endswith ( '. gpg') and not os. path. isdir ( dest ) and \ os. path. isdir ( os. path. dirname ( dest ) ) assert src and os. path. isfile ( src ) cmd = ['gpg'] if verbose : print'\ nencrypt _ path ( % s, % s )'% ( dest, src ) cmd....
[ -0.19025789201259613, 0.7457001805305481, 0.8371827602386475, 0.22437931597232819, -0.07562724500894547, 0.2100050300359726, 0.23584571480751038, -0.5147619843482971, -0.31177660822868347, 0.9091315865516663, 0.052902135998010635, 0.6294651031494141, -0.20033805072307587, 0.069648057222366...
def set ( self, key, value ) : self. _ _ setattr _ _ ( key, value )
[ -0.9538317322731018, -0.4112790524959564, 0.45405474305152893, -0.7158610820770264, -0.8970551490783691, 0.6573905348777771, -0.5121504664421082, -0.24940888583660126, -0.646142303943634, 0.7499103546142578, -0.2697077989578247, 0.45391425490379333, 0.9638960957527161, 0.5122127532958984, ...
def _ is _ cpo _ interval _ value ( arg ) : return is _ int ( arg ) and ( interval _ min < = arg < = interval _ max )
[ -0.09266510605812073, -0.2858125865459442, 0.3673650920391083, 1.0663485527038574, -0.9374587535858154, 1.2164047956466675, -0.06280876696109772, 0.14217282831668854, -0.5566532611846924, 0.3786472976207733, -0.8990684151649475, 0.31390678882598877, -0.9157176613807678, 0.04978159442543983...
def get _ balance ( ) : balances = { } accounts = client. get _ account ( ) ['balances'] for account in accounts : if float ( account ['free'] ) > 0 : price = get _ coin _ price ( account ['asset'] ) balances [ str ( account ['asset'] ) ] = price * float ( account ['free'] ) return balances
[ -0.11739715933799744, 0.2756359577178955, 0.4901915192604065, -0.24988986551761627, -0.20227059721946716, -0.3397342264652252, -0.26975271105766296, -1.4521952867507935, -0.20768354833126068, 0.8451144695281982, -0.6178624629974365, -0.35253795981407166, 0.033022601157426834, 0.18944115936...
def test _ update _ incomplete _ payments _ no _ govuk _ payment _ found ( self, mock _ send _ email ) : with responses. requestsmock ( ) as rsps : mock _ auth ( rsps ) rsps. add ( rsps. get, api _ url ('/ payments /'), json = {'count': 1,'results': [ payment _ data ], }, status = 200, ) rsps. add ( rsps. get, govuk _ ...
[ -0.6095637679100037, 0.001218995195813477, 0.5365028381347656, -1.0310852527618408, 0.47396451234817505, 0.39595603942871094, -0.16882844269275665, -0.12188868969678879, -0.38421350717544556, -0.18703733384609222, -0.256494402885437, 0.37120306491851807, -0.7730429768562317, -0.09726989269...
def test _ get _ events _ using _ bad _ data ( bad _ data _ from _ site ) : assert " get _ events " in dir ( app ), " the get _ events function has not been created in app. py, please create it and " \ " check that the function name is correct " result = app. get _ events ( bad _ data _ from _ site ) assert result is n...
[ 0.48622646927833557, 0.2757274806499481, 0.44653311371803284, 0.6222012639045715, 0.6881474256515503, -0.04568963125348091, -0.27529868483543396, -0.3644907772541046, 0.3842635154724121, -0.05447117239236832, -0.48225000500679016, 0.6311152577400208, 0.46504494547843933, 0.2010140717029571...
def get _ sum ( self, nums, start, end ) : total = 0 for i in range ( start, end ) : total + = nums [ i ] return total
[ -0.2357897013425827, -0.7112177014350891, 0.5846578478813171, 0.28901407122612, 1.037691593170166, 0.22736956179141998, 0.13136017322540283, 0.37663546204566956, -0.49317970871925354, 0.6215788722038269, -0.5887275338172913, 1.0281169414520264, -0.22137124836444855, -1.0939314365386963, ...
def encode _ label ( label ) : encoded _ label = tf. train. feature ( int64 _ list = tf. train. int64list ( value = [ label ] ) ) feature _ dict = { " label " : encoded _ label } features = tf. train. features ( feature = feature _ dict ) return tf. train. example ( features = features )
[ -0.16888277232646942, 0.2189163714647293, -0.0418858602643013, 0.10220962017774582, -0.5379528403282166, 0.5720706582069397, -0.8219591379165649, 0.4677572548389435, 0.7921635508537292, 0.6082292795181274, -1.1813876628875732, 0.2966172993183136, -0.03751092031598091, -0.8149845004081726, ...
def asciize ( self, s ) : for original, plain in _ table. items ( ) : s = s. replace ( original, plain ) return s
[ -0.2583475708961487, -0.3345164358615875, 0.3400159776210785, -0.8193863034248352, -1.2239151000976562, -0.48795777559280396, -0.2950996458530426, 0.25610867142677307, -0.6571937799453735, 0.4811737835407257, -0.3250005841255188, 0.6351556181907654, -0.008784031495451927, -0.18227922916412...
def generate _ data ( x ) : x = [ ] i = 0 for a in x : b = a. split ( ) x. append ( [ ] ) for b in b : x [ i ]. append ( float ( b ) ) i = i + 1 return x
[ -0.12750692665576935, 0.7300268411636353, 0.6532225012779236, -0.10256019979715347, 0.23514324426651, 0.8442035913467407, -0.5831610560417175, 0.7328441739082336, -0.4530933201313019, -0.08202721178531647, -0.956536591053009, 0.018470419570803642, 0.03995852917432785, 0.5843407511711121, ...
def name ( self ) : return self. scope
[ -0.6941894888877869, -1.4626644849777222, 0.5078150033950806, -1.0563844442367554, -0.788345456123352, 0.13244423270225525, -0.0047273277305066586, -0.6740988492965698, 0.28412818908691406, 0.7550910711288452, 0.23656943440437317, 0.8596162796020508, 0.515091061592102, -0.43750038743019104...
def _ sendall ( self, msg ) : totalsent = 0 while totalsent < len ( msg ) : sent = self. send ( msg [ totalsent : ] ) if sent = = 0 : raise runtimeerror ('socket connection broken') totalsent = totalsent + sent return totalsent
[ -0.587516188621521, 0.5376241207122803, 0.630416750907898, -0.49889111518859863, 0.3632098138332367, -0.9740669131278992, -0.10498795658349991, -0.5818818211555481, -0.09101478010416031, 0.18841280043125153, -0.6975733041763306, -0.7432578802108765, -1.2929445505142212, 1.587319016456604, ...
def attribute _ is _ removable ( self, key, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ is _ removable ( us _ key, _ flow )
[ -1.2228013277053833, 0.10717029124498367, 0.5492485761642456, 0.4656105637550354, -0.8725894689559937, 0.08806005865335464, 0.35541683435440063, 0.5329834222793579, 0.09036845713853836, 1.1562066078186035, -0.49351996183395386, -0.1633964478969574, -0.4855676591396332, 0.029121579602360725...
def set _ end _ time ( self, end _ time ) : session = meta. get _ session ( self ) self. ended _ at = end _ time session. commit ( )
[ -0.8393004536628723, -0.4083961546421051, 0.42951613664627075, -0.2185140699148178, 0.660426139831543, 0.4995483160018921, -0.6872289776802063, 0.5915355682373047, -1.0264461040496826, 1.1513453722000122, -1.0477629899978638, -0.05287105217576027, -0.648606538772583, 0.9307592511177063, ...
def get _ attribute ( self, key, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ get ( us _ key, _ flow )
[ -0.978843629360199, 0.026677491143345833, 0.2586078941822052, 0.5647223591804504, -0.8580496311187744, -0.3173009157180786, 0.26524823904037476, -0.24196843802928925, 0.21789635717868805, 0.4426072835922241, 0.358578622341156, 0.3253622055053711, -0.24926291406154633, -0.17630891501903534,...
def read _ images _ and _ steering _ angles ( base _ path ) : lines = [ ] with open ( os. path. join ( base _ path,'driving _ log. csv') ) as csvfile : reader = csv. reader ( csvfile ) for line in reader : lines. append ( line ) images = [ ] measurements = [ ] img _ base _ path = os. path. join ( base _ path,'img') for...
[ -0.2674674987792969, -0.7302452325820923, 0.7131741046905518, -0.35487765073776245, 0.19253581762313843, 0.3027258813381195, 0.008348798379302025, 0.3452600836753845, -0.6193367838859558, 0.4525846242904663, 0.5278196930885315, -0.1802181750535965, 0.22721922397613525, 0.7658023834228516, ...
def get _ page _ rank ( self ) : if self. graph. number _ of _ nodes ( ) = = 0 : raise valueerror ( " the graph is empty... " ) pr = pagerank _ numpy ( self. graph ) return pr
[ 0.34004777669906616, 0.5115090608596802, 0.4373379349708557, 0.1898498833179474, 1.4362671375274658, 0.07290283590555191, -0.1674317568540573, 0.4433213174343109, -0.11676792055368423, -0.30999496579170227, 1.3213260173797607, 1.1221753358840942, -1.1169131994247437, 0.017147378996014595, ...
def io _ cb ( self, watcher, revents ) : if revents & pyev. ev _ read : ret = self. socket. handle _ read ( ) if ret = = self. socket. finished : self. reset ( pyev. ev _ write ) elif ret = = self. socket. error or ret = = self. socket. quit : self. close ( ) else : ret = self. socket. handle _ write ( ) if ret = = sel...
[ 0.3859417736530304, -0.5837058424949646, 1.0225697755813599, -0.05008816719055176, 0.26948487758636475, 0.049569062888622284, 0.7834802269935608, -0.6931492686271667, 0.15607400238513947, 0.22106197476387024, 0.6678270697593689, -0.5982213616371155, -0.6745446920394897, -0.3049556910991668...
def from _ iupac ( text, structure _ class = glycan, * * kwargs ) : res = glycan _ from _ iupac ( text, structure _ class = structure _ class, * * kwargs ) if len ( res ) > 1 : return res else : return res. root
[ -0.04838855192065239, 0.4437703490257263, 0.2409268021583557, 0.30231818556785583, -0.5173834562301636, -0.8018801212310791, 0.7185352444648743, -0.3747708797454834, 0.36455896496772766, -0.17975743114948273, -0.5586012601852417, 0.18649357557296753, -1.0833110809326172, -0.502651572227478...
def user _ data _ set ( self, userdata ) : self. _ userdata = userdata
[ -0.5796410441398621, 0.1874140352010727, -0.003908336162567139, -0.5501046776771545, -1.0208014249801636, 1.1659232378005981, 0.3844658434391022, -0.35124316811561584, -0.18389175832271576, -0.7237839698791504, -1.0654706954956055, 0.9087250828742981, 0.44923272728919983, -0.05354980751872...
def build _ data ( self ) : # set data modes lo _ modes = [ ] modes = self. mode. lower ( ). strip ( ) # adding functionality to do log resistivity if'log'in modes : rescode _ te, rescode _ tm = 1, 5 else : rescode _ te, rescode _ tm = 9, 10 if'both'in modes : lo _ modes. extend ( [ rescode _ te, rescode _ tm, 2, 6 ] )...
[ -0.5925602912902832, -0.5708256959915161, 0.8748869299888611, -0.38177844882011414, -0.09791452437639236, -0.29156649112701416, -0.44449466466903687, -0.00043562837527133524, -0.18545909225940704, -0.7897005081176758, 0.192873015999794, -0.360660195350647, 0.19742296636104584, -0.079059824...
def checkerboard ( width, height, factory = none ) : return io. read ('pattern : checkerboard ', width, height, factory )
[ -0.1761094629764557, 0.46094587445259094, 0.24376952648162842, 1.0064483880996704, -0.6115676164627075, -0.4331529140472412, 0.1104503870010376, -0.42479798197746277, -0.549439013004303, -0.2928762137889862, -0.19522081315517426, 0.20283237099647522, -0.4707237482070923, 0.2074815183877945...
def get _ school _ by _ id ( school _ id : int ) : try : schools = school _ service. get _ school _ by _ id ( school _ id ) current _ app. logger. info ( " return data for school _ id : { } ". format ( school _ id ) ) return jsonify ( { " data " : { " count " : len ( schools ), " schools " : schools } } ), 200 except s...
[ -0.7521814107894897, -0.5772233605384827, 0.5986621379852295, 0.13745996356010437, 0.75926673412323, -0.6558971405029297, -0.19529789686203003, -0.3477972149848938, 0.4252640902996063, 0.5368472337722778, -0.280047208070755, 0.9614023566246033, 0.058195583522319794, 0.7247716784477234, -...
def _ _ init _ _ ( self, uuid, api ) : super ( ). _ _ init _ _ ( ) self. _ uuid = uuid self. _ device = api self. _ time _ between _ snapshots = 30 self. _ last _ image = none self. _ next _ snapshot _ at = none
[ -1.0230518579483032, 0.5332624912261963, 0.40242505073547363, -0.08089534193277359, -0.11136721074581146, -0.044441480189561844, -0.32783016562461853, 0.41603711247444153, 0.06859107315540314, 0.10269846767187119, -0.5106711983680725, -0.1852835714817047, 0.4118945896625519, 0.236940309405...
def auto _ id ( self ) : # if the ids are within an acceptable tolerance, flag them as such wave _ est = self. _ fitdict ['full _ fit']. eval ( self. _ detns / self. _ fitdict ['xnorm'] ) for wav in range ( wave _ est. size ) : if self. _ lineflg [ wav ] = = 1 : # user has manually identified this line already continue...
[ 0.6134188175201416, -0.9198305606842041, 0.4151113033294678, -0.1378498524427414, 0.036587152630090714, 0.218319833278656, 0.5756548047065735, -0.0498206727206707, 0.3303394019603729, -0.6345962285995483, -0.5683575868606567, 0.5545526742935181, -0.4930616617202759, 1.081481695175171, 0....
def _ copy _ to _ repo ( self, day, utc, ow _ arr, ow _ cols, upd _ arr, upd _ cols ) : b, c, bs = self. dbar. load _ day ( day ) if len ( b )! = 0 : raise valueerror ('copy to non - empty repo!'+ day ) if repo. lpxc not in ow _ cols : raise valueerror ('lpx not in ow _ cols!'+ day ) if repo. utcc in ow _ cols : raise ...
[ -0.9995160698890686, -0.27853477001190186, 0.7048635482788086, -0.8952742218971252, 0.2705496847629547, 1.075573205947876, -0.026988638564944267, -0.1703033745288849, 0.2572115957736969, 0.5265768766403198, 0.2400527000427246, -0.15941159427165985, -0.06602592766284943, -0.5886962413787842...
def _ _ init _ _ ( self, target _ area, target _ std, area _ damping _ strength = 0. 8, std _ damping _ strength = 0. 8 ) : self. area _ damping _ strength = area _ damping _ strength self. std _ damping _ strength = std _ damping _ strength self. target _ area = target _ area self. target _ std = target _ std self. cu...
[ -0.21460749208927155, -0.6029930710792542, 0.4341478645801544, -0.5949298143386841, -0.24470752477645874, 0.6039626002311707, 0.22925466299057007, 0.6120790243148804, 0.818557620048523, -0.031100736930966377, 0.16011136770248413, 1.0723509788513184, 0.7481200098991394, 0.5703840851783752, ...
def _ attributes _ remove ( self, key, flow ) : # make sure interface is ready to use us _ key = self. _ attributes _ t _ underscore ( key ) d = self. _ attributes _ t _ init ( us _ key ) if self. _ attributes _ i _ is _ removable ( key, flow = flow ) : del ( d ['attributes'] [ us _ key ] )
[ -0.5083135366439819, -0.11700522154569626, 0.3137279748916626, -0.3165864050388336, -1.216489315032959, 0.08692628890275955, 0.31749898195266724, 1.0719189643859863, -0.049211207777261734, 0.8698276281356812, -0.08604151010513306, -0.2904299795627594, -0.6457059383392334, 0.083130627870559...
def _ _ init _ _ ( self, port = default _ port, ssl _ chain _ cert = none, ssl _ key = none, ssl _ ca _ cert = none, * * kwargs ) : super ( memcacheddriver, self ). _ _ init _ _ ( * * kwargs ) self. port = port self. ssl _ chain _ cert = ssl _ chain _ cert self. ssl _ key = ssl _ key self. ssl _ ca _ cert = ssl _ ca _ ...
[ 0.773682177066803, 0.5062832832336426, 0.7731108069419861, 0.7824955582618713, 0.954843282699585, 0.32409268617630005, -0.5398030877113342, 0.3722686767578125, -0.037940748035907745, -0.2220999002456665, -0.2570272982120514, 0.35735100507736206, -0.6422005891799927, 0.3916238248348236, 0...
def getvar ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. getvar ( self )
[ -0.6218374967575073, -1.0659526586532593, 0.5519675016403198, -0.02824714221060276, -0.21749745309352875, -0.04165831580758095, 0.7028742432594299, -0.11121916770935059, -0.8342573046684265, -0.919092059135437, -0.9324341416358948, 1.3143492937088013, -0.948387086391449, -0.421810120344162...
def sensor _ value _ to _ table ( sensor _ row, table ) : table. at [ sensor _ row ['timestamp'], sensor _ row ['sensors _ id'] ] = sensor _ row ['value']
[ 0.1741507649421692, -0.06571247428655624, 0.3696504831314087, -0.2513730525970459, 0.271419495344162, -0.21957539021968842, -0.8008942008018494, -0.38553357124328613, 0.2368975430727005, 0.9489732384681702, 0.21027274429798126, 0.543073832988739, 1.2544628381729126, -0.15985870361328125, ...
def unproject ( self, pts : np. ndarray ) - > np. ndarray : return cv2. perspectivetransform ( pts. reshape ( ( - 1, 1, 2 ) ), self. _ im. astype ( np. float32 ) )
[ -0.2834637463092804, 0.29140621423721313, 0.5932517647743225, -0.21954920887947083, 0.16393424570560455, 0.3145078122615814, -0.8096319437026978, -0.19134342670440674, 0.3583953082561493, 0.41556116938591003, -0.12850593030452728, -0.658453643321991, -0.4771125018596649, -1.027677059173584...
def core _ count ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " core _ count " )
[ 0.8762957453727722, 0.7865963578224182, 0.5864936113357544, -0.08290305733680725, 0.8177859783172607, 1.0890196561813354, 0.8250544667243958, 0.31667545437812805, 0.3611581027507782, 0.4490480422973633, -0.26835882663726807, 0.7963573932647705, -0.9994258880615234, -1.1464886665344238, -...
def apply ( self, func : " union [ callable [ ['any'],'any'], callable [ ['any'],'any'] ] ", dtype _ out : " optional ['datatype'] " = none, ) - > " dataframe " : df = self. agg _ list ( ) if isinstance ( self. selection, str ) : selection = [ self. selection ] else : selection = self. selection for name in selection :...
[ -1.0427197217941284, 1.0941795110702515, 0.515220582485199, 0.46173375844955444, 0.18265943229198456, -1.1957026720046997, 0.11459944397211075, 0.44439759850502014, -0.008131462149322033, -0.07174480706453323, 0.05578002333641052, 0.9214361906051636, 0.5932226777076721, 0.4547334611415863,...
def get _ bar100 _ stress _ strain ( model, key, is _ stress, vm _ word, itime, oxx, max _ principal, min _ principal, ovm, is _ element _ on, eids, header _ dict, keys _ map ) : if is _ stress : bars2 = model. cbar _ stress _ 10nodes else : bars2 = model. cbar _ strain _ 10nodes if key in bars2 : case = bars2 [ key ] ...
[ -0.6507663130760193, 0.40306422114372253, 0.6714078783988953, -0.2774553894996643, 0.09536701440811157, -0.5088095664978027, 0.32303833961486816, -0.54502934217453, -0.29594820737838745, 1.004176139831543, 0.06334538757801056, 0.06730499118566513, -0.1486092358827591, -0.04953540116548538,...
def symbolic _ conditional _ probabilities _ consecutive _ external ( symx, symy ) : if len ( symx )! = len ( symy ) : raise valueerror ('all arrays must have same length') symx = np. array ( symx ) symy = np. array ( symy ) cp = symbolic _ double _ conditional _ probabilities ( symx [ 1 : ], symy [ : - 1 ], symx [ : -...
[ 0.68904048204422, 0.4214472770690918, 0.7537479996681213, 0.530081570148468, -0.2926691472530365, -0.35210737586021423, 0.3895789086818695, -0.22681955993175507, -0.11932211369276047, 1.2078731060028076, 0.0978732630610466, 1.2534818649291992, -0.322710245847702, 0.05625620856881142, 0.4...
def _ _ init _ _ ( self, name = none, reason = none, version = none, user = none, stage = none, tracking _ url = none, uuid = none, description = none, released _ timestamp = none ) : # noqa : e501 # noqa : e501 self. _ name = none self. _ reason = none self. _ version = none self. _ user = none self. _ stage = none se...
[ 0.23430505394935608, 0.05318021774291992, 0.527714192867279, 0.0656287670135498, -0.6496980786323547, -0.16263516247272491, -0.16513971984386444, 0.6018468141555786, 0.4435209035873413, 0.18470066785812378, -0.8454930782318115, 0.37368836998939514, 0.0971924290060997, -0.07823903113603592,...
def tokenize _ input ( self, input ) : # convenience padding of special chars with spaces so the user # can be lazy about separating things that are clearly separate. # note that this has to be undone if it turns out to be txt. if self. diagnostic : print ('pending :'+ str ( self. partial _ pending ) ) for spec in self...
[ -0.8420434594154358, -0.5766350030899048, 0.7752835750579834, -0.19141261279582977, -0.3450683057308197, -0.21412329375743866, 0.6648039221763611, 0.781050980091095, 0.11572135239839554, -0.957711935043335, -0.4241304099559784, 0.011203332804143429, -0.18070246279239655, 0.5681694149971008...
def get _ user _ list ( ) : ret = none try : ret, err = _ get _ user _ or _ group _ list ( " users " ) if err : raise exception ( err ) except exception, e : return none,'error retrieving users list : % s'% str ( e ) else : return ret, none
[ -0.9271032810211182, 0.01483204122632742, 0.47499459981918335, 0.7052176594734192, 1.088699221611023, -0.6190901398658752, 0.3626624643802643, 0.11202207952737808, 0.2807210385799408, 0.3105944097042084, -0.19443072378635406, 0.11324556171894073, -0.43548932671546936, 0.41215965151786804, ...
def points _ in _ convex _ polygon _ 3d _ jit ( points, polygon _ surfaces, num _ surfaces = none ) : max _ num _ surfaces, max _ num _ points _ of _ surface = polygon _ surfaces. shape [ 1 : 3 ] num _ points = points. shape [ 0 ] num _ polygons = polygon _ surfaces. shape [ 0 ] if num _ surfaces is none : num _ surfac...
[ 0.36507290601730347, 0.021004239097237587, 0.7534582614898682, 0.7289913296699524, -0.262775182723999, 0.5901210904121399, 0.957680344581604, 0.3145374655723572, 0.4118518829345703, 0.6207522749900818, -0.7277251482009888, -0.363859087228775, 0.07768716663122177, -0.3430291414260864, -1....
def new ( * args, * * kargs ) : obj = itkimageserieswriterid3id2. _ _ new _ orig _ _ ( ) import itktemplate itktemplate. new ( obj, * args, * * kargs ) return obj
[ 0.1744442880153656, -1.1385539770126343, -0.046291906386613846, -0.6091169714927673, -0.32035568356513977, -0.01874360628426075, -1.0444750785827637, -0.13601253926753998, -0.5446314215660095, 1.3353025913238525, -0.6717959046363831, 0.42025667428970337, 0.07803583890199661, -0.16736620664...
async def test _ main _ build ( mocker : mockerfixture ) - > none : build = mocker. patch ( " nefelibata. console. build " ) build. run = mocker. asyncmock ( ) mocker. patch ( " nefelibata. console. docopt ", return _ value = { " - - loglevel " : " debug ", " init " : false, " new " : false, " build " : true, " publish...
[ -0.2440347969532013, 0.28382477164268494, 0.64014732837677, 0.73874431848526, 1.1251739263534546, 0.8717843890190125, 0.5901021957397461, -0.6722015738487244, -0.22026225924491882, -0.49071234464645386, -0.30716055631637573, 0.22702521085739136, -0.1997540444135666, 0.3627147376537323, 0...
def check _ latlng ( check _ bbox ) : for i in check _ bbox : if i < - 180 or i > 180 : failure ('this file is already projected.') return true
[ -0.1914462149143219, -0.06858649104833603, 0.4784395396709442, 0.21823900938034058, 0.696709156036377, 0.6722426414489746, -0.7559488415718079, -0.0427456758916378, -0.9591251611709595, 0.46518898010253906, 0.5088768601417542, -0.7790794372558594, -0.4525938332080841, 0.4897518455982208, ...
def _ scheduler ( self ) : priorityprocess = self. readylist. peek ( ) if self. process is not priorityprocess : # if running process no longer has priority or has been destroyed if self. process is not none and self. process. status [ " type " ]! = " blocked " : # set to ready if not blocked self. process. status [ " ...
[ -0.23570245504379272, -0.9570974111557007, 0.9160884022712708, -1.005440592765808, -0.5482022166252136, 0.08925334364175797, -0.6347486972808838, 0.8786985874176025, 0.4533436596393585, 0.5789613723754883, -0.17713405191898346, -0.009191453456878662, -0.5475035309791565, 0.3041787445545196...
def _ _ len _ _ ( self ) : return len ( self. children )
[ 0.12705765664577484, -0.342385470867157, 0.29239964485168457, -1.512796401977539, 0.28752753138542175, 0.24658741056919098, 0.5972625613212585, 0.8119792342185974, 0.4114189147949219, -1.1420307159423828, -1.2904249429702759, -0.6702542304992676, 0.541064977645874, -0.1964392364025116, -...
def extract _ chipdata ( chip _ file, n, outfile ) : if'nac'not in chip _ file : sheet _ num = 0 else : sheet _ num = 1 data = read _ chipdata ( chip _ file, sheetnum = sheet _ num ) parsed _ data = parse _ chipdata ( data ) sorted _ data = sort _ chipdata ( parsed _ data ) # delete rows with same positions sorted _ da...
[ 0.6151901483535767, -0.1717117428779602, 0.520065188407898, 0.2110874056816101, -0.721611738204956, -0.4100944399833679, 0.23258686065673828, 0.013701612129807472, 0.37794309854507446, -0.18519416451454163, 0.2643609046936035, 0.21210791170597076, -0.06695720553398132, 0.8709794282913208, ...
def common _ ar _ markers ( ar _ pos1, ar _ pos2 ) : ar1, ar2 = { }, { } common _ indices = np. intersect1d ( ar _ pos1. keys ( ), ar _ pos2. keys ( ) ) for i in common _ indices : ar1 [ i ] = ar _ pos1 [ i ] ar2 [ i ] = ar _ pos2 [ i ] return ar1, ar2
[ -0.675291121006012, -1.6225651502609253, 0.7564312815666199, -0.45784875750541687, -0.22631999850273132, 0.45396050810813904, 0.5181561708450317, 0.34831658005714417, -0.7507672905921936, 1.2041301727294922, 0.4905186593532562, 0.23497065901756287, 0.5240554213523865, -0.1751602739095688, ...
def cifar10 _ loss _ fun ( data, weights ) : from lecture3. loss import l _ svm return l _ svm ( data [ 0 ], data [ 1 ], weights )
[ 0.761019229888916, -0.027778534218668938, 0.22048307955265045, 0.05367507413029671, 0.20446722209453583, -0.7185807228088379, -0.7019635438919067, 0.21743638813495636, -0.09600622206926346, -0.19264645874500275, 0.2050110250711441, 0.1988861858844757, 0.29615896940231323, -0.43673586845397...
def get _ file ( path, mode ='rb ', source = source _ any ) : if os. path. isabs ( path ) : if os. path. isfile ( path ) : return open ( path, mode ) return none # not an absolute path, so process it. ensure _ paths ( ) if source & source _ profile : p _ path = os. path. join ( profile _ path, path ) if os. path. isfil...
[ 0.4224473834037781, -0.13914592564105988, 0.692710816860199, 0.06605899333953857, -0.6931442618370056, 0.153519406914711, 0.5831145644187927, -0.3708495497703552, 0.18509432673454285, -0.7606880068778992, 0.6532454490661621, -0.2718689739704132, 0.11677288264036179, -0.23374050855636597, ...
def get _ component _ type ( self ) - > str : return " cpu "
[ -0.15396268665790558, 0.1669112890958786, 0.4803307354450226, -0.3518613278865814, 0.6359055042266846, 1.1268733739852905, 0.2755487263202667, -0.010767072439193726, 0.1414286494255066, -0.39187219738960266, 0.040636803954839706, 0.6042781472206116, -0.6437740325927734, 0.08418096601963043...
def h _ prime ( self, x ) : h = self. h ( x ) return h * ( 1 - h )
[ -0.12793783843517303, 0.7310196757316589, 0.40719282627105713, 0.7957443594932556, -0.13322994112968445, 0.6312292814254761, -0.9426634311676025, -0.724183201789856, 0.08240791410207748, -0.11390522867441177, -0.2676961123943329, -0.37815508246421814, -0.7810018062591553, 0.182555705308914...
def done _ burning ( self, cur _ sample ) : return self. graph. get _ num _ sample _ vertices ( cur _ sample ) > = self. cutoff _ vertices
[ -0.5526801347732544, 0.005099205765873194, 0.48286208510398865, 0.8590173721313477, -1.5229196548461914, -0.1920984387397766, 0.2971212863922119, -0.0411420613527298, 0.371145099401474, 0.8399736285209656, -0.2142864465713501, 0.1672673523426056, -1.049074411392212, 0.17983584105968475, ...
def gettablemattresstrans ( kv, cu ) : kvtable = np. array ( [ 60, 80, 110, 125 ] ) cutable = np. array ( [ 0, 0. 1, 0. 2, 0. 3, 0. 6, 0. 9 ] ) lookup _ kv = find _ nearest ( kvtable, kv ) lookup _ cu = find _ nearest ( cutable, cu ) lookuparray = np. array ( [ [ 0. 66, 0. 68, 0. 71, 0. 72 ], [ 0. 73, 0. 75, 0. 78, 0. ...
[ 0.15064965188503265, -0.3313409388065338, 0.9073553085327148, -0.834163248538971, -0.5061720609664917, -0.024019045755267143, 0.2826736271381378, -0.8605829477310181, -0.390060693025589, 0.767909586429596, 0.4816058278083801, 0.28034496307373047, -0.3074493110179901, -0.06863456219434738, ...