text
stringlengths
25
2.19k
embedding
listlengths
768
768
def _ fit ( self, x ) : # validate hyper parameters self. _ validate _ parameters ( ) inp _ data = frovedisfeaturedata ( x, \ caller = " [ " + self. _ _ class _ _. _ _ name _ _ + " ] fit : ", \ dense _ kind ='rowmajor ', densify = true ) input _ x = inp _ data. get ( ) x _ dtype = inp _ data. get _ dtype ( ) ( host, po...
[ 0.19887031614780426, 0.428506463766098, 0.6359851360321045, -0.025386307388544083, -0.3725090026855469, -0.2159126251935959, -0.19140006601810455, 0.49671441316604614, -0.4469855725765228, -0.2577608823776245, -0.09171058982610703, 0.15311568975448608, 0.04923034459352493, 0.61450242996215...
def _ _ getitem _ _ ( self, index : int ) - > pattern : return self. _ sequence [ index ]
[ -0.8925250768661499, 0.16160795092582703, 0.37536925077438354, -0.7563287019729614, 0.10578960180282593, 0.03209567815065384, 0.5366290211677551, -0.8496651649475098, 0.8045689463615417, -0.33220791816711426, -0.30314871668815613, 0.6155650615692139, 0.2286680042743683, -1.5126882791519165...
def nu2lambda ( nu ) : return c / _ np. asanyarray ( nu )
[ -0.16127696633338928, -0.8240188956260681, 0.34860122203826904, -0.8790501952171326, 0.07470342516899109, 0.5717835426330566, -0.15767984092235565, -0.4739447832107544, 1.6512267589569092, 0.14413157105445862, 0.2193187177181244, 0.7391443848609924, 0.6499544382095337, 0.24235688149929047,...
def testgettipoftrunkversion ( self ) : arbitrary _ url ='pratooey'path = os. path. join ( cros _ mark _ chrome _ as _ stable. _ getsvnurl ( arbitrary _ url ),'src ','chrome ','version') self. mox. stuboutwithmock ( cros _ build _ lib,'runcommand') cros _ build _ lib. runcommand ( ['svn ','info ', arbitrary _ url ], re...
[ 0.08400148898363113, 0.011656083166599274, 0.4714486002922058, 0.7263270616531372, 1.2877299785614014, 0.1535162329673767, -0.13953635096549988, -0.2130655199289322, 0.245846688747406, -0.10524725168943405, -0.42186009883880615, 0.2087436020374298, 0.3976428806781769, -0.1980169415473938, ...
def _ load _ or _ create _ keys ( self ) - > none : if not self. _ uuid : raise exception ( " missing uuid to load key from keystore " ) # try to load the keystore or create a new one try : self. _ ks = jks. keystore. load ( self. _ ks _ file, self. _ ks _ password ) except filenotfounderror : log. warning ( " creating...
[ -0.9239034056663513, -0.24148383736610413, 0.5373316407203674, -0.11104562133550644, -0.534585177898407, -0.24953699111938477, 0.16955263912677765, 0.5383365154266357, 0.1769377589225769, 0.49192696809768677, -0.3217293620109558, -0.8712586760520935, 0.14224916696548462, 0.4321317374706268...
def collectlabel ( self, l ) : labels = { } for i in l : labels = dict ( labels. items ( ) + i. items ( ) ) return labels. keys ( )
[ -1.3710687160491943, -0.975192666053772, 0.46528762578964233, -1.0706493854522705, -0.21050727367401123, 0.8193570375442505, -1.0227655172348022, -0.31320685148239136, 0.07827672362327576, 1.1182187795639038, -0.6973708271980286, -0.9931896924972534, 0.38579249382019043, 1.1746755838394165...
def generate _ inputs ( spec, # union [ sequence [ tf. tensorspec ], tf. tensorspec ] input _ generator : inputgeneratortype, ) - > sequence [ np. ndarray ] : make _ static = lambda shape : [ dim if dim is not none else 2 for dim in shape ] generate = lambda spec : input _ generator ( make _ static ( spec. shape ), spe...
[ -1.1663267612457275, -0.0755254328250885, 0.48392453789711, 0.05287489295005798, -0.0957234725356102, 0.09000127762556076, 0.5091649293899536, 0.48102742433547974, -0.7465436458587646, 0.1333283931016922, -0.3325858414173126, 0.233316570520401, 1.0558021068572998, 0.2924581468105316, 0.3...
def get _ group _ by _ name ( self, name, * * kwargs ) : groups = self. get _ groups ( * * kwargs ) for grp in groups : if grp ['displayname'] = = name : return [ grp ] return none
[ -0.5165563821792603, 0.19906015694141388, 0.24773813784122467, 0.1831163614988327, -0.9644385576248169, -1.1425198316574097, -0.552984893321991, -1.211822271347046, -0.21181446313858032, 0.6079171895980835, 0.06896228343248367, 0.47081583738327026, -0.8815928101539612, 0.29912522435188293,...
def add _ error _ to _ sfs ( sfs _ i, sfs _ d, e _ i, e _ d ) : error _ i = [ ] error _ d = [ ] for i in range ( 0, len ( sfs _ d ) ) : n _ i = sfs _ i [ i ] - ( sfs _ i [ i ] * e _ i ) + ( sfs _ d [ - ( i + 1 ) ] * e _ d ) n _ d = sfs _ d [ i ] - ( sfs _ d [ i ] * e _ d ) + ( sfs _ i [ - ( i + 1 ) ] * e _ i ) error _ ...
[ -1.1451566219329834, 0.004996496718376875, 0.5695644021034241, -0.8964558243751526, 0.632464587688446, -0.05270974338054657, 0.7155888080596924, 0.14465278387069702, 0.15978045761585236, -0.4034377336502075, -0.10568752139806747, 0.07359059154987335, 0.5845057964324951, 0.6254608035087585,...
def save _ loop ( camera, name : str ) - > none : faces = [ ] process _ this = true face _ to _ be _ saved = none while true : ret, frame = camera. read ( ) if process _ this : faces = prc. process _ faces ( frame ) process _ this = not process _ this # changing name of each face to empty string message ='' for face in...
[ -0.5170287489891052, -0.38767319917678833, 0.6726966500282288, 0.765224277973175, 0.08585207909345627, -0.42183107137680054, 0.5229358077049255, -0.6976259350776672, 0.2246849536895752, 0.5534734129905701, -0.9265874028205872, 0.38680195808410645, -0.9116188287734985, 1.277895450592041, ...
def clean _ references _ helper ( corpus, dry _ run ) : corpus _ path = path _ corpus ( corpus ) try : references = read _ references ( corpus _ path ) except ioerror : references = { } references _ paths = [ os. path. join ( corpus _ path,'references ', reference ) for reference in references ] all _ files = glob. glo...
[ 0.3903961777687073, -0.6558599472045898, 0.8664175271987915, -0.25790417194366455, 0.5608397126197815, 0.0814206600189209, 1.5357316732406616, -0.44523659348487854, -0.6264347434043884, 0.8776711821556091, 0.41068461537361145, -0.21998395025730133, -0.6756016612052917, 1.1831812858581543, ...
def test _ get _ worker _ containertask ( self ) : returned = self. container _ task. get _ worker ( ) self. assert _ ( returned,'no worker was returned') self. assertequal ( returned, self. worker,'worker retrieved was not the expected worker')
[ 0.2611386775970459, 0.3501998484134674, 0.38827723264694214, 0.4004655182361603, 1.1605144739151, 0.08115334063768387, 0.30466127395629883, -0.4581298232078552, 0.14028558135032654, -0.8334866762161255, -0.5638753771781921, -0.4466651380062103, -0.07504493743181229, -0.5253087878227234, ...
def canny ( img, low _ threshold, high _ threshold ) : return cv2. canny ( img, low _ threshold, high _ threshold )
[ 0.8639759421348572, -1.1161669492721558, 0.3401552438735962, 0.84327632188797, 0.3088643550872803, -1.2295674085617065, -0.8821263909339905, -0.10723728686571121, -0.7214374542236328, -0.5324352383613586, -0.24468742311000824, 1.048264980316162, 0.9486973881721497, 0.32675060629844666, 0...
def start _ game ( self ) : self. do _ outputs ( ) while self. keep _ playing : self. get _ inputs ( ) self. do _ outputs ( )
[ -0.2333458811044693, -0.494780957698822, 0.676658570766449, 0.7740519642829895, 0.6734358668327332, -0.011104566976428032, 0.5808666944503784, -1.454668402671814, -0.4225049316883087, -0.39872169494628906, 1.108109474182129, -0.3979319930076599, -0.3922004699707031, -0.310406357049942, 0...
def register _ type ( cls ) : # todo do some sanity checks on class typeregistry. registered _ types. append ( {'type _ id': cls. type _ id,'name': cls. type _ name,'asn1': cls. type _ asn1,'asn1 _ condition': cls. type _ asn1 _ condition,'asn1 _ fulfillment': cls. type _ asn1 _ fulfillment,'class': cls } )
[ -0.608098566532135, 0.49499866366386414, 0.5769056081771851, 0.318785160779953, 1.5670918226242065, 0.1173427551984787, -0.3921608030796051, -0.3435317873954773, 0.3502158522605896, 0.012470093555748463, -1.3157191276550293, 0.48922738432884216, 0.2752941846847534, 1.0400220155715942, 1....
def test _ password _ memory _ on _ user _ switch ( self ) : def _ to _ user ( user ) : return join _ host _ strings ( user, env. host, env. port ) user1 ='root'user2 = user with settings ( hide ('everything'), password = none ) : # connect as user1 ( thus populating both the fallback and # user - specific caches ) wit...
[ 0.2811536490917206, 0.4323122501373291, 0.5820139050483704, 0.9712350368499756, -0.24848701059818268, 0.28750863671302795, 0.46755239367485046, -0.515082061290741, 0.3466513156890869, -0.5512098670005798, -0.8037234544754028, 0.06798315793275833, 0.00569809228181839, 0.46363556385040283, ...
def children ( self ) - > iterable [ ocrwordentity ] : yield from self. _ ocr _ words
[ -0.051107317209243774, -0.35282227396965027, 0.4889446496963501, -0.4313131868839264, -0.1199992299079895, 0.28612130880355835, -0.2173001617193222, -0.7682027220726013, 0.5587378740310669, 0.009507899172604084, 0.1273352950811386, 0.6519408226013184, -0.0007783483597449958, 0.805135250091...
def list _ files ( self, prefix, flat = false ) : layer _ path = self. get _ path _ to _ file ( " " ) path = os. path. join ( layer _ path, prefix ) for blob in self. _ bucket. list _ blobs ( prefix = path ) : filename = blob. name. replace ( layer _ path,'' ) if not flat and filename [ - 1 ]! ='/': yield filename elif...
[ -0.06030995026230812, -0.5431029796600342, 0.8620192408561707, -0.4165455400943756, -0.07641711831092834, 0.031999632716178894, 0.06007181107997894, -0.0899767056107521, -0.19608436524868011, 0.03232881426811218, -0.2841640114784241, -0.1698954999446869, 0.21977004408836365, 0.157160341739...
def preproc ( fasta _ file ) : # flybase fasta file has internal newline in the same seqeunce seqs = fix _ fasta. fix _ fasta ( fasta _ file ) [ 1 ] # contains list of sequences return seqs
[ -0.030817314982414246, -1.0483107566833496, 0.6279930472373962, 0.1829858273267746, 0.6303859353065491, -0.7005165219306946, 0.10601231455802917, 0.6099932789802551, 0.5154260993003845, 0.23005226254463196, -0.13006660342216492, -0.9661694765090942, -0.08421842753887177, 1.2293716669082642...
def manage _ afteradd ( self, item, container ) : pass
[ -0.02922590635716915, -1.0601508617401123, 0.4491397440433502, 0.8845998048782349, 0.531241238117218, 0.4505341351032257, 0.2797544598579407, -1.1678987741470337, 1.3609546422958374, -0.9191646575927734, -0.5612510442733765, -0.17598991096019745, 0.2147946059703827, 0.4189548194408417, 0...
def delete _ tag ( tag _ id ) : tag _ svc. delete ( tag _ id )
[ 1.4598071575164795, 0.025922046974301338, -0.19648706912994385, 0.1690935641527176, 1.3872759342193604, -0.10087589919567108, -0.4144502580165863, 0.5084795355796814, 0.049804531037807465, -0.18018043041229248, -0.12649095058441162, 0.7382083535194397, -0.07639432698488235, 1.6619347333908...
def get _ payload ( payload ) : payload _ str = payload. decode ( utf _ 8 ) payload _ json = json. loads ( payload _ str ) return payload _ json
[ -0.6299898028373718, -0.4928399324417114, 0.3250056505203247, -1.1742950677871704, -1.4480072259902954, -0.5365808606147766, -1.0282241106033325, -0.5879424810409546, -0.09750211983919144, 1.13432776927948, -1.1500920057296753, 0.16218210756778717, -0.09183616191148758, -0.949917733669281,...
def appendmsa ( newmsa, hitstart, querystart ) : # todo : this needs to be in some sort of positioned - partial - # alignment object. global hitmsa global hitmsaquerypos global hitmsahitpos # pad with some gapped sequence to the right position in # each to accept the new alignment. # how much padding do we need in each...
[ -0.04819190874695778, -0.9562893509864807, 0.718391478061676, -0.7705506086349487, -0.5741400718688965, -0.047220680862665176, -0.014089047908782959, -0.3109841048717499, 1.0215729475021362, 0.1349954456090927, 0.2656250298023224, 0.5399903655052185, -0.3144855797290802, 0.2028140574693679...
def make _ soup ( url ) : page = requests. get ( url ) return beautifulsoup ( page. content,'html. parser')
[ -0.437643826007843, 0.22983235120773315, 0.1703164428472519, -0.23398776352405548, -0.11240996420383453, 0.22626528143882751, -0.42276597023010254, -0.13127237558364868, 0.16279944777488708, -0.2432786226272583, 0.0486113466322422, -0.5205945372581482, 1.1964017152786255, -1.39147043228149...
def _ serialize ( value ) : serialized = pickle. dumps ( value, 2 ) length = len ( serialized ) values = [ ] for i in range ( 0, length, _ chunk _ size ) : values. append ( serialized [ i : i + _ chunk _ size ] ) return values
[ -0.4394626021385193, 0.684279203414917, 0.4530520737171173, -0.4431566596031189, 0.21496237814426422, -1.080682396888733, -0.23758642375469208, -0.4582081735134125, -0.06432125717401505, 0.13482990860939026, -1.139837622642517, -0.14288870990276337, 0.012707782909274101, 0.1764849871397018...
def children ( self ) - > iterable [ tokenentity ] : yield from self. words
[ 0.5220999717712402, -0.419359028339386, 0.4852653741836548, -0.5052515864372253, -0.3190486431121826, 0.2337365448474884, -0.5826218128204346, -0.01265831757336855, -0.3099967837333679, -0.5991017818450928, -0.12179029732942581, 0.5624892115592957, 0.06319715082645416, 0.6574092507362366, ...
def frequencycount ( seq : int, length : int, m : int, wrap : bool = true ) - > list [ int ] : if m > length : raise valueerror ( " m must not be larger than length " ) ba = seq. to _ bytes ( ( length + 7 ) / / 8, " little " ) if 50 * 2 * * m < length and m < 24 : # if 2 * * m is significantly smaller than length then ...
[ 0.5873785614967346, 0.3164167106151581, 0.6458595395088196, -0.10710910707712173, -0.9401832222938538, -0.7727017402648926, 0.8545309901237488, 0.6556306481361389, 1.0458705425262451, 0.5186853408813477, -1.0586237907409668, 0.266704797744751, 0.17531831562519073, -0.2156827300786972, -0...
def _ fatal _ error _ code ( self, response ) : # known non - fatal response codes # retry _ codes = { 1024 :'lun deletion in progress, try again later ', 14032 :'lc _ err _ lock _ busy'} if response ['code'] = = 14000 : # lc _ generic _ error raise violinbackenderr ( message = response ['message'] ) elif response ['co...
[ 0.48237019777297974, -0.7789385914802551, 0.805892288684845, -0.5409967303276062, 0.15713638067245483, -0.4711785912513733, 0.21690517663955688, 0.17153659462928772, 0.4965469539165497, 0.021271638572216034, 0.022383781149983406, 0.27094176411628723, -0.4264746606349945, 0.2399535775184631...
def websocket _ route ( self, path : str, name : typing. optional [ str ] = none ) - > typing. callable : # type : ignore [ type - arg ] warnings. warn ( " the ` websocket _ route ` decorator is deprecated, and will be removed in version 1. 0. 0. refer to " # noqa : e501 " https : / / www. starlette. io / routing / # w...
[ -0.36351683735847473, 0.05432108789682388, 0.6767544746398926, -0.43371546268463135, -0.6924758553504944, -0.6823763847351074, -0.07807446271181107, -0.20890595018863678, 0.466636061668396, 0.9105814099311829, -0.4308004379272461, 0.9810258746147156, 0.7112184166908264, -0.0149542074650526...
def predict _ query _ answer ( query, img _ vec = none ) : # initial states of decoder are the output states of encoder + image if img _ vec : states _ enc _ q = model _ encoder _ vqa. predict ( query ) else : states _ enc _ q = model _ encoder _ text _ only. predict ( query ) # initial iteration starts off with begin ...
[ -0.8115759491920471, -0.6057961583137512, 0.8931035995483398, -0.13352103531360626, -1.633439540863037, -0.05388811230659485, 0.4125644266605377, -0.32535144686698914, -0.06508073955774307, 0.7695052623748779, 0.5354123711585999, 0.6484355926513672, 0.4745398461818695, 0.49742546677589417,...
def test _ valid _ read ( self ) : valid1 ='e00010000000000000014 " service restarting "'message = read _ message ( valid1, _ proto _ version ) self. assertisinstance ( message, retryresultmessage ) self. assertequal ( message. request _ id, " 0001 " ) self. assertequal ( message. payload,'" service restarting "')
[ 0.2170930802822113, 0.17860156297683716, 0.5236034989356995, 0.32547518610954285, 0.048350825905799866, 0.23021388053894043, -0.5636588931083679, -0.4121914207935333, 0.13060596585273743, -0.9325372576713562, 0.689700722694397, 0.37563297152519226, -1.177620768547058, -1.1073296070098877, ...
def from _ port ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " from _ port " )
[ 1.2132034301757812, 0.28639575839042664, 0.6302675604820251, 0.10208121687173843, 0.8900313973426819, 1.286542296409607, 1.0885244607925415, -0.16167998313903809, 0.42948392033576965, -0.009294198825955391, -0.12188133597373962, 0.9114920496940613, -0.1404706984758377, -1.6890180110931396,...
def check _ attendance _ by _ id ( cls, student _ id ) : student _ attendance _ list = [ ] student = student. get _ student _ from _ list _ by _ id ( student _ id ) if student is not none : for attendance in cls. _ attendance _ list : if attendance. student _ id = = student. id : student _ attendance _ list. append ( a...
[ -0.37505900859832764, -0.8995819687843323, 0.6081015467643738, 0.7235972881317139, -0.4392848610877991, -0.2973945140838623, -0.2326510101556778, 0.014133298769593239, 0.7543506026268005, 1.4979875087738037, -0.4378490746021271, 0.6120778322219849, 0.3197612464427948, 1.5071890354156494, ...
def winbio _ winbiocontrolunitprivileged ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " sessionhandle ", " unitid ", " component ", " controlcode ", " sendbuffer ", " sendbuffersize ", " receivebuffer ", " receivebuffersize ", " receivedatasize ", " operationstatus " ] ) raise runtimeerror ('api not ...
[ 0.4688451886177063, -0.06203938275575638, 0.7595642805099487, 0.04853707179427147, 0.46298590302467346, 0.0653427243232727, 0.7191755175590515, -0.251370370388031, 0.8206913471221924, -0.40370067954063416, -0.47763791680336, 0.6573556661605835, -1.243001937866211, 0.4577779769897461, 0.5...
def get _ all _ plugins ( self, raw : bool = false ) - > dict [ str, simplugwrapper ] : if not raw : return self. hooks. _ registry return ordereddiot ( [ ( name, plugin. plugin ) for name, plugin in self. hooks. _ registry. items ( ) ] )
[ -0.8807871341705322, 0.29018837213516235, 0.4983605742454529, 0.3838777542114258, 0.08444630354642868, -0.6584694385528564, -0.048233695328235626, 0.06162712723016739, 0.6221171617507935, -0.2576237916946411, -0.24697928130626678, 0.7204139232635498, 0.6717228889465332, -0.0431171767413616...
async def test _ clear _ notifications ( v3 _ server ) : v3 _ server. delete ( f " https : / / api. simplisafe. com / v1 / subscriptions / { test _ subscription _ id } / messages ", status = 200, body = load _ fixture ( " v3 _ settings _ response. json " ), ) async with aiohttp. clientsession ( ) as session : simplisaf...
[ 0.3446667790412903, 1.0595310926437378, 0.4523772895336151, 0.12905779480934143, 1.0258429050445557, 0.08032110333442688, -0.211745947599411, -0.9879141449928284, 0.8579360246658325, 0.3707449734210968, -0.8206349611282349, 1.1377010345458984, 0.13566550612449646, -0.1311177760362625, -0...
def preprocess ( self, lexical _ input : str = none, * * kwargs ) - > " numpy. ndarray " : if " input " in kwargs : lexical _ input = kwargs [ " input " ] warning _ message = " the'input'parameter is deprecated and will be removed in the next major release. " warning _ message + = " use the'lexical _ input'parameter in...
[ -0.004707712214440107, 0.17782224714756012, 0.8392181396484375, -0.11967936903238297, 0.04156264290213585, -0.5531805753707886, -0.6079568862915039, -0.16340991854667664, 0.1726676970720291, 0.4756565988063812, -0.3864049017429352, 0.5858196020126343, -1.2798796892166138, 0.625985026359558...
def get _ static ( args, clip, r, score, mode ='train') : c = args. clip _ y [ clip ] if mode = ='train': a _ cv = r ['train _ mode'] # mean across folds t = np. nanmean ( a _ cv ['c _ train _ % s'% score ] [ c ] ) v = np. nanmean ( a _ cv ['c _ val _ % s'% score ] [ c ] ) else : a = r ['test _ mode'] t = a ['c _ train...
[ -1.0318617820739746, -0.3183383047580719, 0.6406593322753906, -0.27702873945236206, -0.39323532581329346, 0.3934919238090515, 0.29136067628860474, -0.3682438135147095, -0.2851521968841553, 1.7092612981796265, -0.00943201594054699, 0.367019385099411, 1.4636591672897339, -0.2307346910238266,...
def mrenclave _ hex _ string ( enclave _ metadata _ file ) : with open ( enclave _ metadata _ file, " r " ) as file : hexlist = file. read ( ). rstrip ('\ r \ n'). split ('' ) hexbytes = bytes ( [ int ( x, 0 ) for x in hexlist ] ) hexstring = hexbytes. hex ( ) return hexstring
[ -0.1591750979423523, -0.534984827041626, 0.3248700201511383, -0.8587666153907776, 0.37003248929977417, 0.9125832319259644, -1.1527448892593384, 1.0704622268676758, -0.40906012058258057, 1.1139159202575684, 0.2959020137786865, -0.13596296310424805, 0.19721093773841858, 0.06479442119598389, ...
def eval _ lobatto ( np. ndarray [ float64, mode ='c ', ndim = 1 ] coors not none, int32 order ) : cdef int32 ii cdef fun eval _ fun cdef int32 n _ coor = coors. shape [ 0 ] cdef np. ndarray [ float64, ndim = 1 ] out = np. zeros ( n _ coor, dtype = np. float64 ) cdef float64 * _ coors = & coors [ 0 ] cdef float64 * _ o...
[ 0.19577676057815552, 0.07442846149206161, 0.5277725458145142, -0.31591519713401794, 0.2706412374973297, -0.022750280797481537, -0.4598155915737152, -0.8267729878425598, -0.9532608389854431, 0.22983957827091217, -0.7200331091880798, 0.5408254265785217, 0.35377728939056396, 0.207800716161727...
def is _ package ( directory ) : for ext in [ '. py ', '. pyc'] : if os. path. exists ( os. path. join ( directory,'_ _ init _ _'+ ext ) ) : return true
[ -0.8330509066581726, -0.007125170901417732, 0.8116008043289185, 0.25673577189445496, 0.24587786197662354, -0.3911498188972473, -0.06236108019948006, 0.2577018141746521, 1.255098581314087, 0.17960576713085175, -0.3678865134716034, 0.4740404486656189, 0.3866157531738281, 1.0976656675338745, ...
def annotate ( atomspace, annotations, genes ) : scheme _ function, genes = generate _ scheme _ function ( annotations, genes ) gene _ result = scheme _ eval ( atomspace, genes ). decode ('utf - 8') print ( gene _ result ) if int ( gene _ result [ 0 ] ) = = 1 : return gene _ result [ 2 : ], none print ( " doing annotat...
[ 0.027813171967864037, -0.6338515281677246, 0.45198220014572144, 0.006118839140981436, 0.5597723126411438, -0.9205105900764465, 0.032797399908304214, 0.39372435212135315, -0.10391129553318024, 0.291546106338501, -0.33120962977409363, 0.2536408305168152, 0.23502689599990845, 0.13591977953910...
def set _ warning _ v ( self ) : label _ text = " < font color ='red'> input is not a number < / font > " self. warning _ v = qlabel ( label _ text, self ) self. warning _ v. move ( 400, 15 ) self. warning _ v. resize ( 200, 30 ) self. warning _ v. hide ( )
[ -0.2133084088563919, 0.3567411005496979, 0.4281940758228302, 0.2367243468761444, 0.16497434675693512, 0.8450376391410828, 0.28935950994491577, -0.49981215596199036, 0.6024846434593201, 0.5510819554328918, -0.3371312618255615, 0.6093593239784241, 0.36870861053466797, 0.22763532400131226, ...
def get _ user _ id ( *, user _ email ) : try : with db _ session ( ) as db : user = db. query ( models. useraccount ) \. filter _ by ( email = user _ email ) \. one ( ) except ( sqlalchemy. exc. dbapierror, sqlalchemy. exc. sqlalchemyerror ) as err : return none else : return user. id
[ 0.506209671497345, 0.37666454911231995, 0.33476728200912476, 0.7642093300819397, 0.8207635283470154, -0.3001341223716736, 1.0617603063583374, -0.194144606590271, 0.9006081223487854, 0.48017993569374084, 0.48698538541793823, -0.19303365051746368, -0.7192389965057373, -0.28615641593933105, ...
def xippmex ( * args ) : assert ( len ( args ) > = 1 ) if args [ 0 ] = ='time': return xipppy. time ( ) elif args [ 0 ] = ='cont': return cont ( * args [ 1 : ] ) elif args [ 0 ] = ='stimseq': stimseq ( * args [ 1 : ] ) # elif args [ 0 ] = ='stim': # stim (
[ -0.2474314272403717, -0.15668626129627228, 0.8743582963943481, 0.771916925907135, -0.5731428861618042, -0.17341385781764984, -0.939450740814209, -0.28662872314453125, -0.5365338921546936, 0.6513721942901611, 0.5368906259536743, -0.44012004137039185, -1.1222268342971802, -0.6214457750320435...
def to _ upper ( thing ) : if type ( thing ) is str : return thing. upper ( ) elif type ( thing ) in [ list, tuple ] : newlist = [ ] for each in thing : newlist. append ( to _ upper ( each ) ) if type ( thing ) is tuple : newlist = tuple ( newlist ) return newlist elif type ( thing ) is dict : newdict = { } for key in ...
[ -1.785043716430664, -0.18970364332199097, 1.1131271123886108, 0.5366708040237427, -0.8063956499099731, -0.0448138490319252, -0.8762158155441284, 0.1523272693157196, 0.15976811945438385, 0.4712234139442444, -0.186661958694458, 0.4425281584262848, 0.24515196681022644, -0.14564929902553558, ...
def dns ( self, name, qtype, cnames = none ) : result = self. cache. get ( ( name, qtype ) ) cname = none if not result : for k, v in dnslookup ( name, qtype ) : if k = = ( name,'cname') : cname = v self. cache. setdefault ( k, [ ] ). append ( v ) result = self. cache. get ( ( name, qtype ), [ ] ) if not result and cna...
[ -0.902519702911377, 1.3767824172973633, 0.6703552007675171, -0.020250750705599785, -0.8813160061836243, -0.39460504055023193, -0.4649133086204529, -0.740727961063385, 1.1851304769515991, -0.05097290500998497, -0.5641294717788696, 0.1592160314321518, -0.2040601521730423, 0.12672622501850128...
def throw ( self, exception ) : giter = self. _ giter self. _ trace ( " throw % r % r ", giter, exception ) giter. throw ( exception )
[ 0.2955564558506012, 0.8421327471733093, 0.2899411916732788, -0.06342821568250656, -0.20725424587726593, 0.9046884775161743, 0.340957909822464, -0.3882943391799927, 0.10788857191801071, 0.7402467727661133, -0.20360183715820312, 0.05854719504714012, -0.8853082656860352, 0.6758419275283813, ...
def calcimpropersall ( frame, natoms = 6 ) : impropers = np. zeros ( natoms ) for i in xrange ( natoms ) : if np. any ( frame. atoms [ i ]. dipole ) : impropers [ i ] = frame. dipoleimproper ( i, ( i + 1 ) % natoms, ( i + 5 ) % natoms ) return impropers
[ -0.3709810674190521, 0.14425191283226013, 0.4300631880760193, -0.7413527965545654, 0.12862710654735565, -0.42470550537109375, 0.2702641785144806, 0.1321336328983307, 1.0520998239517212, 0.29109036922454834, -0.6708415746688843, -0.15317802131175995, -0.9610273838043213, -0.2219166159629821...
def lcm ( a, b ) : return a * b / gcd ( a, b )
[ 1.035936951637268, -0.38394320011138916, 0.45227500796318054, -1.7380741834640503, 0.20822997391223907, 0.019816046580672264, -1.6021665334701538, -0.5971041917800903, 0.30422139167785645, -0.3712727725505829, 1.1149437427520752, 0.09255615621805191, -0.07290323823690414, -0.47123277187347...
def get _ grades ( self, student ) : try : # return a copy of student's grade return self. grades [ student. get _ id _ num ( ) ] [ : ] except keyerror : raise valueerror ( " student not in the grade book " )
[ -0.6074230670928955, -0.04449774697422981, 0.23813208937644958, 1.17831289768219, -0.14072243869304657, 0.3880458474159241, -1.3856514692306519, -0.3067820966243744, -0.4379641115665436, 0.2925238609313965, -0.08986083418130875, 0.21698899567127228, -1.0574630498886108, 0.3319151997566223,...
def astype ( self, dtype, queue = none ) : if dtype = = self. dtype : return self. copy ( ) result = self. _ new _ like _ me ( dtype = dtype ) self. _ copy ( result, self, queue = queue ) return result
[ -0.6801108121871948, 0.34891411662101746, 0.7621265649795532, -0.1712692826986313, -1.1835557222366333, -0.08469019830226898, 0.06571938097476959, -1.5899094343185425, 1.348742127418518, -0.1106903925538063, -0.6444763541221619, 1.1878345012664795, -0.8133659958839417, 0.09998070448637009,...
def make _ plot ( ) : def plus _ minus _ plot ( high _ spec, ax ) : ax. plot ( als _ spec ['minus'] ['phot'], als _ spec ['minus'] ['spec'], linestyle = sd, color ='m ', label ='$ \ sigma _ - $ \ nsync.') ax. plot ( als _ spec ['plus'] ['phot'], als _ spec ['plus'] ['spec'], linestyle = sd, color ='c ', label ='$ \ sig...
[ 0.6574063301086426, 0.011985362507402897, 0.8141699433326721, -0.7298928499221802, -0.23269468545913696, 0.47074708342552185, -0.2123647928237915, -0.010661418549716473, -0.45372283458709717, -0.8015533089637756, 0.14551076292991638, 0.8943882584571838, 1.6024545431137085, 0.37400230765342...
def test _ l2 _ metric _ log _ vectorization ( self ) : curves _ ab = self. l2 _ metric _ s2. geodesic ( self. curve _ a, self. curve _ b ) curves _ bc = self. l2 _ metric _ s2. geodesic ( self. curve _ b, self. curve _ c ) curves _ ab = curves _ ab ( self. times ) curves _ bc = curves _ bc ( self. times ) tangent _ ve...
[ 0.8836121559143066, -0.06349150836467743, 0.5763765573501587, -0.4199233949184418, 0.6239253878593445, 0.6625989079475403, -0.3004865050315857, -1.1307023763656616, -0.9094671010971069, -0.08291849493980408, 0.016389459371566772, 0.2120756208896637, 0.6502331495285034, -0.48909100890159607...
def test _ sum _ of _ matrix ( self ) : matrix = matrix ( [ [ 1, 2, 3 ], [ 4, 3, 2 ] ] ) self. assertequals ( [ [ 4, 4, 4 ], [ 5, 7, 9 ] ], matrix + matrix ( [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) ) self. assertequals ( [ [ 4, 4, 4 ], [ 5, 7, 9 ] ], matrix + [ [ 3, 2, 1 ], [ 1, 4, 7 ] ] ) self. assertraises ( differentdimensio...
[ 0.023741886019706726, 0.1598256230354309, 0.8624340295791626, 0.0048362924717366695, 0.19302360713481903, 0.28052836656570435, 0.636941134929657, -0.6688903570175171, 0.5846607685089111, -0.13055363297462463, -0.013283982872962952, -0.28433871269226074, -0.09533560276031494, 0.123084463179...
def findcell ( self, p _ float =..., p _ float =..., p _ float =..., * args, * * kwargs ) :...
[ 0.22438853979110718, 0.04397798702120781, 0.5586337447166443, 1.3791478872299194, 1.3127212524414062, 0.33179497718811035, 0.5135906338691711, -0.8907330632209778, -1.8699713945388794, -0.8966927528381348, 0.8786115050315857, -0.37839066982269287, -0.8520590662956238, 0.48215967416763306, ...
def linear _ regression _ simulation _ cond _ ys ( nobs, xs, param _ matrix, ymeans, yvars ) : vals = identity ( xs. dot ( param _ matrix ) ) mean _ y, var _ y = set _ matrices ( 1, ymeans, yvars ) cond _ ys = simulate _ from _ mvn _ covariance _ structure ( nobs, 1, mean _ y, var _ y ) ys = vals + cond _ ys return ys
[ 0.06148063763976097, 0.3242892622947693, 0.46024614572525024, -0.3603617548942566, -0.35573363304138184, -0.18764445185661316, 0.4681414067745209, -0.06382179260253906, 0.22750692069530487, 0.7300972938537598, 0.09133319556713104, 0.5913801789283752, 0.13853909075260162, -0.125102683901786...
def dashes _ to _ unders _ in _ keys ( self ) - > none : for key _ node, _ in self. yaml _ node. value : key _ node. value = key _ node. value. replace ('- ','_')
[ -0.8045504093170166, -0.06200284883379936, 0.8012580871582031, -1.283845067024231, 0.04709026962518692, -0.18704168498516083, -0.9321374893188477, 0.567111074924469, -1.4145123958587646, -0.2889578342437744, -0.9934781789779663, 0.6529558897018433, 1.4504663944244385, 0.9402113556861877, ...
def non _ max _ suppression ( boxes, max _ bbox _ overlap, scores = none ) : if len ( boxes ) = = 0 : return [ ] boxes = boxes. astype ( np. float ) pick = [ ] x1 = boxes [ :, 0 ] y1 = boxes [ :, 1 ] x2 = boxes [ :, 2 ] + boxes [ :, 0 ] y2 = boxes [ :, 3 ] + boxes [ :, 1 ] area = ( x2 - x1 + 1 ) * ( y2 - y1 + 1 ) if sc...
[ -0.7205331325531006, -0.18538065254688263, 1.167436957359314, 0.6352630853652954, -0.4998355507850647, -0.2778286039829254, 0.7251780033111572, -0.5560452342033386, 0.2566259205341339, 0.9607342481613159, -0.3506724238395691, -0.3764183223247528, -0.019116703420877457, -0.17485831677913666...
def _ getlookups ( self, indices ) : lookuplist = self. lookuplist lookuprecords = lookuplist. lookup lookups = [ lookuprecords [ index ] for index in sorted ( indices ) ] return lookups
[ -1.0680137872695923, 0.19377735257148743, 0.6737095713615417, -0.0886596068739891, -0.11431797593832016, 0.09073283523321152, -0.8563510775566101, 0.05257583409547806, 1.0686651468276978, 0.48257461190223694, -0.4086918532848358, -0.32479801774024963, -0.42448464035987854, -1.1134504079818...
def getmousepos ( self, event, x, y, flags, param ) : if event = = cv2. event _ lbuttondown and param ['a'] and self. homogotclick is true : self. homogotclick = true # save x and y position self. homoxytmp = {'picx': x,'picy': y } self. homostring = " get x value : "
[ 0.3406364321708679, -0.6331483721733093, 0.6040529012680054, 0.20227374136447906, 0.25221121311187744, 0.16226030886173248, -0.1266731321811676, -0.012169234454631805, -0.07701434195041656, 0.024575330317020416, -1.1830312013626099, -0.6479518413543701, 0.15034997463226318, -0.053051229566...
def encode ( self, longurl ) : global alphabet global database shorturl ='http : / / tinyurl. com /'+''. join ( ( random. choice ( alphabet ) ) for x in range ( 6 ) ) database [ shorturl ] = longurl return shorturl
[ -0.7742471098899841, 0.2598121464252472, 0.3536127507686615, -0.5080458521842957, -0.18584319949150085, 0.6249109506607056, 0.05476512387394905, -0.09828368574380875, 1.116771936416626, 0.45232871174812317, -2.1066954135894775, 0.09152040630578995, -0.6846808791160583, 0.29296228289604187,...
def to _ builddir ( self ) : from wasp import ctx if self. is _ subpath ( ctx. builddir ) : return self. copy ( ) return path ( ctx. builddir. join ( self. _ path ) )
[ 0.1838863492012024, -0.46788328886032104, 0.3862597942352295, 0.7113881707191467, -0.180000439286232, 1.1068735122680664, 0.7588408589363098, -0.24069438874721527, 0.901696503162384, -0.6957270503044128, 0.5898054838180542, 0.6635189652442932, -0.20433557033538818, -0.642795979976654, -0...
def rack _ count ( self, rack _ count ) : self. _ rack _ count = rack _ count
[ 0.9375219941139221, 0.6316757798194885, 0.3883126974105835, 0.8185606598854065, 0.9651971459388733, 0.6884052753448486, 1.0452055931091309, 0.5955194234848022, -2.076423406600952, -0.17501984536647797, -0.8032144904136658, -0.30658337473869324, 0.3419933319091797, 0.5555312633514404, 0.5...
def test _ power _ law _ to _ uniform _ parameter ( power _ law _ converter ) : d = 20 power _ law _ converter. scale = 10 power _ law _ converter. _ power = 2 power _ law _ converter. _ log _ jacobian = mock ( return _ value = 2 ) du, lj = powerlawconverter. to _ uniform _ parameter ( power _ law _ converter, d ) powe...
[ -0.8494738936424255, 0.053554367274045944, 0.5595335960388184, -0.4339313209056854, 0.2553914785385132, 0.18546026945114136, 0.02369418926537037, -0.1603582799434662, -0.2975037097930908, 0.4498419463634491, -0.9966874718666077, 0.14002898335456848, 1.0263599157333374, 0.9118399024009705, ...
def keys ( self ) : allkeys = [ ] for b in self. buckets : for i in b : allkeys. append ( i. data [ 0 ] ) return allkeys # todo : collect all keys in each of the buckets
[ -0.15365393459796906, -0.7823145985603333, 0.546259343624115, 0.3590910732746124, 0.6795063018798828, 0.660662055015564, -0.6816094517707825, -0.08505658805370331, 0.1356332153081894, 0.26524803042411804, -0.4244231581687927, 0.4019720256328583, -0.3094117343425751, 0.3667815029621124, -...
def best _ guess ( self, spf = default _ spf ) : return self. check ( spf )
[ -0.25214871764183044, -0.183881476521492, 0.2007993906736374, 1.5774215459823608, 0.053389132022857666, -0.05889524146914482, 0.006631483789533377, 0.7357189059257507, -0.10858351737260818, -0.9774069786071777, -0.28029897809028625, 0.14661867916584015, -1.1814638376235962, -0.237319648265...
def make _ svg ( self, css _ styles : str | path | none = none, svg _ definitions : str | none = none, * * params, ) - > str : svg _ io = stringio ( ) self. save ( svg _ io, canvas _ cls = figurecanvassvg, * * params ) svg _ io. seek ( 0 ) return add _ styling _ to _ svg ( svg _ io. read ( ), css _ styles, svg _ defini...
[ 0.18293772637844086, 1.2184479236602783, 0.3751629889011383, 0.41644608974456787, 0.23838728666305542, 0.034632351249456406, -0.24706679582595825, -0.17838142812252045, -0.27059051394462585, -0.005261973012238741, 0.2586875259876251, 0.4542528986930847, 1.0183477401733398, -0.6592764258384...
def core _ application _ stats _ engine _ error ( error _ type, app _ name = none ) : stats = core _ application _ stats _ engine ( app _ name ) errors = stats. error _ data ( ) return next ( ( e for e in errors if e. type = = error _ type ), none )
[ 0.47083207964897156, -0.10324726998806, 0.24054621160030365, 0.47020038962364197, -0.20056970417499542, 0.06469301134347916, -0.4453493356704712, -1.0089277029037476, 0.30359476804733276, 0.20282381772994995, 1.5211927890777588, 0.42275941371917725, 0.2471802532672882, 0.02141338214278221,...
def _ _ and _ _ ( self, other ) : # if other is true : # do not use = = because it is overloaded # return self # if other is false : # do not use = = because it is overloaded # return false other = build _ cpo _ expr ( other ) assert self. is _ kind _ of ( type _ boolexpr ) and other. is _ kind _ of ( type _ boolexpr )...
[ -0.5185195803642273, -1.4098179340362549, 0.7902109622955322, 0.38943347334861755, -1.0106114149093628, 0.758808434009552, 0.39351892471313477, 0.17719268798828125, 0.04563894867897034, 0.6598913073539734, -0.030226321890950203, 0.577465295791626, -0.749285876750946, -0.16304682195186615, ...
def get _ command ( ) : user _ command = input ( " enter your command \ n " ) # user _ command = user _ input _ data. get _ command ( ) return p. parse ( user _ command )
[ -0.1114392876625061, -0.3093571066856384, 0.48458197712898254, 0.903243362903595, 0.2534697949886322, 0.47223055362701416, -0.17898426949977875, -0.20769216120243073, -0.13185648620128632, -1.4170104265213013, -0.1357881724834442, 1.0995575189590454, -0.7144457101821899, -0.422589391469955...
def to _ port ( self ) - > optional [ pulumi. input [ int ] ] : return pulumi. get ( self, " to _ port " )
[ 0.99746173620224, 0.6907103061676025, 0.6207172870635986, -0.12898476421833038, 1.588219165802002, 0.6720282435417175, 1.4568716287612915, -0.2951159179210663, 0.4516923725605011, 0.6593620777130127, -0.27087730169296265, 0.616840124130249, -0.31289705634117126, -1.8946279287338257, -0.4...
def find _ all _ unarchived _ courses ( ) : # setup connection to database database _ config _ file = dir +'/.. / config / database. json'with open ( database _ config _ file ) as open _ file : open _ json = json. load ( open _ file ) db _ host = open _ json ['database _ host'] db _ user = open _ json ['database _ user...
[ -0.2177909016609192, -0.3199370205402374, 1.0118443965911865, 0.037250079214572906, 0.0771138146519661, 0.1162603348493576, -0.09137777239084244, 0.8581321239471436, -0.5559132099151611, 0.477281391620636, 0.3973518908023834, -0.0032986898440867662, 0.25637006759643555, 0.760370671749115, ...
def reload _ to _ device ( self ) : self. send _ device _ mitm ( managementreload ( ) )
[ -0.7706130146980286, 0.22030159831047058, 0.12132268399000168, 0.827042281627655, 0.6342753767967224, -0.12875139713287354, -0.02812543697655201, -1.1698940992355347, 0.19410598278045654, -0.38857853412628174, 0.31739532947540283, 1.4533239603042603, 0.2341679483652115, -0.1682413220405578...
def _ extract _ format ( self, input _ format : str ) : elements = input _ format. split ('' ) minute, second, direction ='','','' for ele in elements : last _ char = ele [ - 1 : ] if last _ char in self. notations ['degree'] : degree = float ( ele [ : - 1 ] ) if last _ char in self. notations ['min'] : try : minute = ...
[ -0.4361322522163391, -0.7585169076919556, 0.6824191808700562, -0.18202437460422516, 0.12139421701431274, -0.4404602646827698, -0.016790810972452164, -0.5502523183822632, -0.8509781956672668, 0.01058567501604557, -0.2609875798225403, -0.28171899914741516, -0.10991282016038895, 0.44574177265...
def test _ area _ memory _ test _ score ( self ) : memory = memory ( bot ( ) ) key, value ='hi. hola ', " yo " test _ dict = { key : value } test _ dict2 = {'a': value } test _ list = [ test _ dict, test _ dict2 ] store = store ( data = test _ dict ) res _ dict = store ( _ area = memory ) self. asserttrue ( test _ dict...
[ 0.21351179480552673, -0.23631137609481812, 0.5433920621871948, -0.8494775891304016, -0.3893987536430359, 0.39767488837242126, 0.39446911215782166, -0.09198293834924698, 0.8466162085533142, 0.11172474920749664, -0.3541564643383026, 0.2652696371078491, -0.34485360980033875, 0.680119693279266...
def exp _ sin ( x, alpha, x _ delay, points ) : y = np. sin ( 10 * x ) h = np. exp ( - alpha * x ) z = np. zeros ( ( 1000, ) ) x _ interval = ( x [ - 1 ] - x [ 0 ] ) / 1000 points _ delay = int ( x _ delay / x _ interval ) - 1 print ( points _ delay ) print ( points ) z [ 0 : points _ delay ] = y [ 0 : points _ delay ]...
[ 0.8244994878768921, -0.19575992226600647, 0.6100407242774963, -0.02136734314262867, -0.2635193467140198, 0.7111238241195679, 0.4809597134590149, 1.8417423963546753, 0.5774850845336914, -0.16628342866897583, -0.48444998264312744, 0.46466875076293945, 0.06919652223587036, 0.47594285011291504...
def parse _ event ( self, response ) : fighter _ links = response. css ( '. b - fight - details _ _ table - text. b - link : : attr ( href )'). extract ( ) self. fighter _ list = [ x. split ('/') [ - 1 ] for x in fighter _ links ]
[ 0.31767162680625916, -0.16595865786075592, 0.4753488302230835, 0.4933614134788513, 1.6378651857376099, -1.1746222972869873, -0.5637104511260986, 0.7351263165473938, 0.06673584133386612, -0.6671295762062073, -0.5655048489570618, -0.4729103744029999, 0.6692185401916504, 0.4413162171840668, ...
def admin _ client ( db, admin _ user ) : from django. test. client import client client = client ( ) client. login ( username = admin _ user. username, password = " password " ) return client
[ 0.19263146817684174, 0.27606314420700073, -0.03814356029033661, -0.23988202214241028, -0.6213114857673645, 0.9100522398948669, 0.23784351348876953, -1.2349555492401123, -0.025294937193393707, -0.16245493292808533, -0.4535687565803528, 0.726967453956604, -0.5720481872558594, -0.186895787715...
def submit _ btnv _ pressed ( self ) : self. text _ v = self. enter _ v. text ( ) if self. check ( self. text _ v ) : self. submit _ button _ v. setstylesheet ( " background - color : # 88d498 ; border - style : outset ; border - radius : 2px " ) self. new _ graph _ v = int ( self. text _ v ) self. new _ graph. set _ v...
[ 0.1510380655527115, 0.37840384244918823, 0.6270649433135986, 0.1683410257101059, -0.26878172159194946, 0.30001214146614075, 0.41802120208740234, -0.40818077325820923, 0.10823945701122284, 1.0631566047668457, -0.3176167607307434, 1.372931957244873, -0.13607370853424072, 0.25521862506866455,...
def get _ season _ and _ experiment ( self, timestamp, sensor ) : season _ name, experiment _ name, experiment _ md = \ ('unknown season ','unknown experiment ', none ) # we first see if the caller is asking for terra ref metadata if not self. terraref _ metadata is none and not timestamp is none and not sensor is none...
[ -0.27028313279151917, -0.17402344942092896, 0.5558445453643799, -0.2324157953262329, 0.25467291474342346, -0.27398067712783813, -0.2958817780017853, -0.6672064065933228, 0.474202036857605, 0.4972512423992157, 0.7706860899925232, 0.5988487601280212, 0.09467355161905289, 0.061091892421245575...
def version _ string ( self ) : return self. server _ version +'' + self. sys _ version
[ -0.2757663428783417, -1.9737982749938965, 0.3591870367527008, -0.011472663842141628, 0.14146004617214203, 1.5183080434799194, -0.3338247835636139, -0.32385721802711487, 0.16636234521865845, 0.5088964700698853, -0.5731726884841919, 0.8042244911193848, 0.05090813711285591, 0.5522249341011047...
def data _ source ( self ) : return self. broker. data _ source ( * * { " ifgroupmemberid " : self. ifgroupmemberid } )
[ 0.08642475306987762, 0.924846351146698, -0.021039361134171486, -0.24835169315338135, -0.269117146730423, -1.128064513206482, -0.10604222118854523, 0.15305405855178833, -0.3077026903629303, -0.32363662123680115, -0.2806997001171112, 0.6738485097885132, -1.4415926933288574, -0.18500004708766...
def generatesearchword ( ) : f = open ('/ usr / share / dict / words') words = f. readlines ( ) words _ length = len ( words ) rand _ int = random. randint ( 0, words _ length ) # print'the randomly generated word is : { 0 } '. format ( words [ rand _ int ]. strip ('\ n') ) return words [ rand _ int ]. strip ('\ n')
[ -0.3938921391963959, 0.5215079188346863, 0.6022124886512756, -0.6103053092956543, -0.0009614848531782627, 0.9965673089027405, 0.3712124526500702, 0.664881706237793, -0.18815340101718903, 0.08199367672204971, 0.06816021353006363, -0.11202279478311539, -0.9574304223060608, 0.2072873264551162...
def getnextstate ( self, state, moves ) : if self. thebackingmachine = = none : return none try : return self. thebackingmachine. getnextstate ( state, moves ) except transitiondefinitionexception as te : raise te except exception as e : self. failgracefully ( e, none ) except threaddeath as d : raise d except outofmem...
[ 0.43874460458755493, 0.6536074876785278, 0.530759334564209, 0.5817946195602417, -0.46505796909332275, -0.34602025151252747, -0.6021592020988464, -0.7858437299728394, 0.48752209544181824, -0.15013612806797028, 0.47015315294265747, 0.18739694356918335, -0.2934032082557678, -0.340731978416442...
def readcorners ( inputdatafile, path = '.') : datafile = open ( inputdatafile,'r') headerlist = datafile. readline ( ). split ( ) corner _ filestem = headerlist [ 0 ] framecnt = int ( headerlist [ 1 ] ) startframe = int ( headerlist [ 2 ] ) # this last item may or may not exist in various files. # when it didn't exist...
[ 0.13088466227054596, -0.7737560272216797, 0.7963420748710632, -1.0718952417373657, -0.11279704421758652, -0.6203294396400452, 0.6351636052131653, -0.3427405059337616, -1.0943700075149536, 0.41279369592666626, -0.6851386427879333, -0.1516922414302826, -0.08867423981428146, 0.185009226202964...
def add _ celery _ group ( self, group, dependencies ) : depend _ on = [ ] for task in inspect. get _ group _ tasks ( group ) : task _ dependencies = self. add _ celery _ canvas ( task, dependencies ) depend _ on. extend ( task _ dependencies ) # use previous dependencies if group is empty depend _ on = depend _ on or ...
[ -0.6829970479011536, 0.554564356803894, 0.6292928457260132, 0.6721189022064209, -0.4059180021286011, -0.17035137116909027, 0.9532450437545776, -0.45577332377433777, 0.42539238929748535, 0.14837466180324554, -0.5891797542572021, -0.3901349902153015, 0.21299444139003754, 1.590807557106018, ...
def str2bool ( v ) : if isinstance ( v, bool ) : return v if v. lower ( ) in ('yes ','true ','t ','y ','1') : return true elif v. lower ( ) in ('no ','false ','f ','n ','0') : return false else : raise argparse. argumenttypeerror ('boolean value expected.')
[ -0.33909764885902405, -0.4639642536640167, 0.6714246273040771, -0.010092797689139843, -0.0002692748385015875, 1.0415894985198975, -0.1755724996328354, 0.31884169578552246, -0.8777872323989868, 0.4275587499141693, 0.03829251974821091, 0.6562148928642273, -0.26081886887550354, -0.09437847882...
def sub ( input _ 1, input _ 2 ) : return _ value = input _ 1 char _ list = list ( input _ 2 ) for character in char _ list : return _ value = return _ value. replace ( character,'' ) return return _ value
[ -0.4251498281955719, -0.40528780221939087, 0.7431865334510803, 0.17747056484222412, -0.6533653736114502, 0.11401844024658203, -0.8639874458312988, 0.8661350607872009, -1.0923070907592773, 0.3018743395805359, -1.482534408569336, 1.2142908573150635, -0.7469972372055054, -0.5785588026046753, ...
def update _ css ( self ) : make _ full _ directory ( resources _ path ( " css " ) ) shutil. copyfile ( self. get _ base _ template _ path ( " app. css " ), resources _ path ( " css / app. css " ) )
[ 0.3586491048336029, -1.1122719049453735, 0.4792318642139435, 0.629048228263855, -0.628483235836029, 1.4574579000473022, 0.10034492611885071, 0.025915706530213356, -0.1439557522535324, 0.35646170377731323, 0.47017166018486023, -0.039515234529972076, 0.6899203062057495, -0.45318183302879333,...
def arrayintersection ( nums1, nums2 ) : result = [ ] for val in nums1 : if val in nums2 and val not in result : result. append ( val ) return result
[ 0.3312244117259979, -0.4624153971672058, 0.5453993082046509, 0.06251941621303558, 0.24261821806430817, 0.45737335085868835, -0.5925811529159546, 0.30425116419792175, -0.7158072590827942, 0.9946985244750977, -0.13480064272880554, 0.8082759976387024, -0.9163001775741577, -0.00089282687986269...
def trace ( self ) : return self. _ trace
[ 0.7550718784332275, -0.1253742128610611, 0.22071129083633423, 0.19993239641189575, 0.7847292423248291, 0.9177537560462952, 0.642204225063324, -0.9886465072631836, 0.8745883703231812, -1.0619280338287354, 0.0995635986328125, -0.1260499656200409, -0.8483913540840149, -0.6061422824859619, -...
def create _ server ( host = " localhost ", remote _ port = 22, local _ port = 2222 ) : # threadedtcpserver for multiple connections server = threadedtcpserver ( ( host, int ( local _ port ) ), tcprelay ) server. rport = int ( remote _ port ) server. bufsize = 128 thread = serversession ( server ) thread. start ( ) ret...
[ 0.3173592686653137, -0.5091409087181091, 0.46954238414764404, -0.8974418044090271, 0.5874496102333069, 0.6911214590072632, -0.13416269421577454, -0.2861734628677368, 0.526561975479126, -0.28413382172584534, -0.6217653155326843, -0.1999383121728897, -0.5900976061820984, -0.5786291360855103,...
def check _ git ( path ) : with cd ( path ) : with settings ( warn _ only = true ) : result = run ('git status') if result. return _ code! = 0 : print " this is false " return false else : print " this is tru " return true
[ 0.01835293509066105, 0.3813767731189728, 0.7209715843200684, 0.5906991958618164, 0.050146281719207764, 1.1736741065979004, -0.5967209339141846, 0.33518436551094055, -0.5279360413551331, 0.30897390842437744, -0.19102230668067932, 0.1620602309703827, -0.32276785373687744, -0.0523046180605888...
def parse _ date _ range ( dates ) : while not dates. empty : start = 0 end = ( 7 - dates [ start ]. weekday ( ) ) - 1 if end > len ( dates ) : end = len ( dates ) - 1 yield ( dates [ start ], dates [ end ] ) dates = dates [ end + 1 : ]
[ -1.1656494140625, 0.4959705173969269, 0.6486023664474487, -0.3324575126171112, -0.4553022086620331, 0.02031128481030464, -0.45245131850242615, -0.2349347472190857, 0.4719018340110779, -0.2001430094242096, 0.004450404550880194, -0.7198064923286438, -0.43090808391571045, 0.3506082594394684, ...
def p4addfile ( fpath, changelist = " " ) : if not fpath : return cmd = " p4 add " if changelist : cmd + = " - c " + changelist + " " ret = os. popen ( cmd + fpath ). readline ( ). strip ( ) if not ret. endswith ( " opened for add " ) : print " couldn't open ", fpath, " for add : " print ret raise valueerror
[ -0.2453732043504715, 0.19519901275634766, 0.7800545692443848, -0.0015124862547963858, 0.2887604236602783, 1.1983613967895508, -0.1277776062488556, 0.18836258351802826, -0.5053567886352539, 0.08703286945819855, 0.09334419667720795, -0.4415369927883148, -0.5477235913276672, 0.530513763427734...
async def fake _ matlab _ started ( app ) : # if " 123 @ brokenhost " is specified as the mlm _ license _ file, exit to simulate an # error nlm = os. environ. get ( mwi _ env. get _ env _ name _ network _ license _ manager ( ) ) if nlm = = " 123 @ brokenhost " : # todo this should output the exact same text as matlab w...
[ 0.9558265805244446, -0.6724263429641724, 0.6828113198280334, -0.463375985622406, 0.31475985050201416, 0.8589876294136047, -0.0912744477391243, 0.4431334137916565, -0.15353958308696747, 0.4998863637447357, 0.20586732029914856, -0.2043345868587494, -0.12461910396814346, 0.1143752783536911, ...
def reset _ login _ attempts ( self ) : self. login _ attempts = 0
[ -0.8295563459396362, -0.5526620745658875, 0.2968927323818207, -0.40043142437934875, 0.5677528381347656, 0.46254268288612366, -0.21414297819137573, 0.23591355979442596, -0.27517169713974, -0.2700607478618622, 0.2954162061214447, 1.2865768671035767, -1.1486366987228394, -0.4373452067375183, ...
def winbio _ winbiocloseframework ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " frameworkhandle " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.7281055450439453, -0.02446732297539711, 0.4301163852214813, 0.9879412055015564, -0.17152415215969086, 0.49645286798477173, 1.921882152557373, -0.5674982666969299, -0.07823744416236877, -0.6699468493461609, -0.025027599185705185, -0.3763250410556793, -1.8496055603027344, 1.04297578334808...
def print _ field ( string, width ) : for i, chunk in enumerate ( chunker ( string, width ) ) : print ('$ { alignc }'+ chunk ) return
[ 0.6810230016708374, -0.26674023270606995, 0.4391559958457947, -1.1038371324539185, -0.20692937076091766, 0.26915377378463745, -0.21279177069664001, -0.42663973569869995, -1.1397302150726318, -0.07755134999752045, 0.33834588527679443, -0.049515124410390854, -0.8979127407073975, -0.171418845...