text
stringlengths
25
2.19k
embedding
listlengths
768
768
def discard _ half ( self, hand, game _ state ) : return
[ 0.9279811978340149, -0.9012222290039062, 0.31665706634521484, 0.23635607957839966, -0.47192656993865967, 0.996003270149231, 0.40570592880249023, 0.27162784337997437, -0.48222020268440247, 0.24271351099014282, -0.5134179592132568, 0.025508303195238113, -0.275554895401001, 0.4734152257442474...
def patient _ matches ( database, patient _ id, type = none, with _ results = true ) : query = { " $ or " : [ { " data. patient. id " : patient _ id }, # collect matches triggered by patient { " results. patients. patient. id " : patient _ id }, # and matches where patient is among results ] } if type : query [ " match...
[ 0.2619762718677521, 0.19852852821350098, 0.41793763637542725, 0.16457295417785645, 0.2810538113117218, -0.4611667990684509, -0.6359384059906006, 0.15164756774902344, 0.03748727962374687, 0.009687034413218498, -0.12051373720169067, -0.34113258123397827, 0.15921711921691895, 0.67641085386276...
def setlinkhighlighter ( self, highlighter ) : self. _ linkhighlighter = highlighter
[ 0.7484380602836609, -1.1060999631881714, 0.23745082318782806, 0.23119932413101196, -0.1349278837442398, 0.5291546583175659, 0.0431889183819294, 0.7074560523033142, 0.2655332088470459, -2.4294469356536865, -0.813835084438324, 0.7173243165016174, 0.10073865950107574, 1.4899704456329346, 0....
def delete ( self, domain, name, * * kwargs ) : self. _ delete ( " / os - floating - ip - dns / % s / entries / % s " % ( _ quote _ domain ( domain ), name ), * * kwargs )
[ 0.49166107177734375, 0.7760933041572571, 0.3986528813838959, 0.002574748592451215, -0.15817026793956757, -0.3764689564704895, -0.020121393725275993, -0.221869096159935, -0.2173488438129425, -0.10206207633018494, -0.500914990901947, 0.3849831223487854, -0.3649722933769226, 0.392486512660980...
def count _ measurements _ in _ template ( self, template _ name : str ) : request = tsquerytemplatereq ( self. _ _ session _ id, template _ name, templatequerytype. count _ measurements. value, ) response = self. _ _ client. queryschematemplate ( request ) logger. debug ( " count measurements template { }, template na...
[ -0.6981328129768372, 0.21559734642505646, 0.44219517707824707, -0.5890840291976929, -0.24338288605213165, 0.10415584594011307, 0.12448304146528244, -0.16323566436767578, -0.3451120853424072, 0.48952680826187134, -0.8341245651245117, -0.9435587525367737, -0.4958721399307251, 0.9527735710144...
def get _ core _ count ( self, session : azuresession, location : str, vm _ size : str, default _ vcpus : int = 1 ) - > int : for result in \ session. compute _ client. virtual _ machine _ sizes. list ( location ) : if result. name. lower ( ) = = vm _ size. lower ( ) : return result. number _ of _ cores # unable to det...
[ 0.3510700762271881, 0.27424442768096924, 0.5581685304641724, 0.1252063512802124, 0.57060706615448, -0.5918059945106506, -0.1397595852613449, 0.158370241522789, -0.18111637234687805, 1.4276061058044434, 0.2510036528110504, -0.05915035307407379, -1.4921324253082275, 0.03726812079548836, -0...
def add _ checkpointer _ args ( parent _ parser : argumentparser ) : parser = parent _ parser. add _ argument _ group ( " checkpointer " ) parser. add _ argument ( " - - checkpoint _ dir ", default = path ( " trained _ models " ), type = path ) parser. add _ argument ( " - - checkpoint _ frequency ", default = 1, type ...
[ -0.42527660727500916, 0.03969318047165871, 0.8531949520111084, -0.010041698813438416, 0.5252019166946411, 0.5902503132820129, 0.30670851469039917, -0.24772310256958008, -1.135016918182373, 0.32137367129325867, 0.2693537175655365, -0.9445874094963074, 0.04913961514830589, 1.6467221975326538...
def emit ( self, * args, * * kwargs ) : for key in self. _ _ slots : func, _ = key func ( self. _ _ slots [ key ], * args, * * kwargs )
[ -1.4031857252120972, 0.14644759893417358, 0.27662450075149536, -0.2703920006752014, 0.11878862977027893, -0.3890428841114044, -0.08148650079965591, 0.03518490120768547, -1.1191740036010742, -0.16654230654239655, -0.4021309018135071, 0.8216119408607483, -0.11633357405662537, 1.5362963676452...
def build ( self ) : omobj = element ('omobj') ome = element ('ome') oms1 = element ('oms') oms1. attrib = {'cd':'arith _ error ','name':'divide _ by _ zero'} oms2 = element ('oms') oms2. attrib = {'cd': self. cd,'name': self. name } omobj. insert ( 1, ome ) ome. insert ( 1, oms1 ) ome. insert ( 2, oms2 ) return omobj
[ -0.241439551115036, -0.5723754167556763, 0.5482261776924133, -0.11422625929117203, -0.10549016296863556, 0.5083619356155396, 0.5193489193916321, -0.2586113214492798, 0.3355136513710022, -0.5535072684288025, 0.41172051429748535, -0.5967000722885132, 0.22398871183395386, -0.18251559138298035...
def least _ squares _ gd ( y, tx, initial _ w, max _ iters, gamma ) : losses = [ ] w = initial _ w threshold = 1e - 8 for n _ iter in range ( max _ iters ) : grad = compute _ gradient ( y, tx, w ) grad = grad / np. linalg. norm ( grad ) loss = compute _ mse _ loss ( y, tx, w ) w = w - gamma * grad # store loss in order...
[ 0.45576485991477966, -0.11636891216039658, 0.5760423541069031, -0.4940335154533386, -0.806523859500885, -0.2273106873035431, -0.21153399348258972, -0.4265183210372925, -0.5634390115737915, 0.6606289744377136, 0.8157454133033752, 0.6121083498001099, -0.11617578566074371, 1.4239423274993896,...
def getirdatafromzone ( image : list, positions : dict, zone _ name : str, iod : int ) : edges = [ positions [ zone _ name + " _ row _ start " ] [ iod ], positions [ zone _ name + " _ row _ end " ] [ iod ], positions [ zone _ name + " _ col _ start " ] [ iod ], positions [ zone _ name + " _ col _ end " ] [ iod ] ] roi ...
[ -0.3260155916213989, -0.9267697930335999, 0.6235265135765076, -0.09527207911014557, 0.3503033518791199, 0.238333061337471, -0.018087659031152725, 0.3405778706073761, -0.0756564810872078, 1.050661325454712, -0.004130426794290543, 0.1892593502998352, -0.12630054354667664, -0.6776381731033325...
def process _ file ( path, projectid, parentid, assignedto ) : book = xlrd. open _ workbook ( path ) # get the first worksheet first _ sheet = book. sheet _ by _ index ( 0 ) currentworkpackageid = parentid for rx in range ( 1, first _ sheet. nrows ) : row = first _ sheet. row ( rx ) name = row [ 0 ]. value description ...
[ -0.1322077065706253, -0.6076682806015015, 0.5336446762084961, -0.5500605702400208, 0.6353384852409363, 0.3804164230823517, -0.5161041021347046, 0.46174636483192444, -0.3355547785758972, 0.012664214707911015, 0.43214401602745056, -0.4425700902938843, -0.026006020605564117, 0.489902287721633...
def solarize ( image, threshold = 128 ) : lut = [ ] for i in range ( 256 ) : if i < threshold : lut. append ( i ) else : lut. append ( 255 - i ) return _ lut ( image, lut )
[ -0.5164716839790344, 0.3823443651199341, 0.3956584334373474, 0.2571631669998169, -1.2623765468597412, -0.582321047782898, -1.6373635530471802, 0.19195495545864105, 0.6987141370773315, -0.03643554076552391, -0.16858981549739838, 0.05642231926321983, -0.27033013105392456, -0.1571995615959167...
def translate ( contract, context ) : if isinstance ( contract, dict ) : return translate _ dict ( contract, context ) elif isinstance ( contract, list ) : return translate _ list ( contract, context ) elif isinstance ( contract, ( dsl _ types. yaqlexpression, expressions. statement ) ) : context = context. create _ ch...
[ -0.011526152491569519, 0.12054997682571411, 0.6569424867630005, 0.6671444773674011, -0.7089440226554871, -0.7544599175453186, -0.8582799434661865, 0.6472854018211365, 1.75950288772583, -0.3807569742202759, -0.7540220618247986, -0.025683313608169556, 0.24543572962284088, -0.6135406494140625...
def create _ history _ record ( self ) : history _ record = aspecd. history. processinghistoryrecord ( package = self. datasets [ 0 ]. package _ name, processing _ step = self ) return history _ record
[ 1.114059329032898, 0.6944393515586853, 0.22913385927677155, -0.8663418292999268, 0.34733662009239197, 0.33552756905555725, -0.18709659576416016, 0.6068200469017029, -0.538689374923706, -0.23118045926094055, 0.48767852783203125, 0.325287401676178, 0.1967252939939499, 0.923296332359314, 0....
def handle _ data ( self, data ) : self. line + = data. count ( " \ n " ) if " " in self. cur : self. cur [ " " ] + = data
[ 0.39324864745140076, 0.051338862627744675, 0.400907427072525, -0.7233023643493652, 0.45278987288475037, 0.030290137976408005, -0.8389813899993896, 0.2033361792564392, 0.2618243396282196, -1.5124640464782715, -0.2102697491645813, -0.1777188628911972, -0.11186709254980087, 0.7637273669242859...
def test _ set _ item _ attribute _ with _ info ( self ) : dset = dataset ( ) mapper = attributetypemapper ( dset. bind ) mapper. set _ item ( " x ", datasetscalar ( 1, info = attributeinfo ( doc = " abc " ) ), info = attributeinfo ( extra = " xyz " ) ) assert dset. attr _ info [ " x " ]. doc = = " abc " assert dset. a...
[ -0.2920077443122864, -0.5095896124839783, 0.23901964724063873, -0.636448860168457, -0.7127779722213745, 0.6884024143218994, -0.7219192385673523, -0.1750880479812622, 0.018374089151620865, 0.04338874667882919, -0.7357208728790283, 0.34974488615989685, 1.502270221710205, -0.3650529980659485,...
def mkdir ( self, * args ) : if len ( args )! = 0 : d = directory ( self. join ( * args ) ) d. mkdir ( ) return d os. makedirs ( self. _ path, exist _ ok = true ) return self
[ -0.5852256417274475, 0.5552738904953003, 0.5652362704277039, 0.5289521813392639, 0.6769791841506958, 0.7753076553344727, 0.4873941242694855, -0.13924111425876617, -0.27605366706848145, -1.149230718612671, 0.524145245552063, -1.1966902017593384, -0.9675999283790588, -0.00046392471995204687,...
def _ n ( self, f ) : return np. round ( ( np. log2 ( f / self. reference ) - 1. 0 / self. order ) * self. order )
[ -0.509397029876709, -0.027592862024903297, 0.2866637706756592, -0.26070281863212585, -0.09255941212177277, -0.9234049916267395, 0.20108413696289062, -0.977469801902771, -0.6389572024345398, 0.22229857742786407, 0.40876442193984985, 0.6012310981750488, 0.7129055261611938, 0.7103888392448425...
def init ( self, init _ source ) : # parsing state : # 0 = reading names and values # 1 = reading delta functions state = 0 delta _ funcs = [ ] if os. path. isfile ( init _ source ) : lines = open ( init _ source ). readlines ( ) elif isinstance ( init _ source, basestring ) : lines = init _ source. splitlines ( ) # st...
[ -0.765731155872345, -0.48145589232444763, 0.8507216572761536, -0.36824753880500793, -0.2711818814277649, 0.22592966258525848, 0.5118166208267212, -0.04529660567641258, -0.12747600674629211, -0.42082494497299194, -0.5612397789955139, -0.2932720184326172, 1.0110533237457275, 0.95076459646224...
def fixed _ ip _ associate _ pool ( context, network _ id, instance _ uuid = none, host = none ) : return impl. fixed _ ip _ associate _ pool ( context, network _ id, instance _ uuid, host )
[ -0.7423626780509949, -0.3992713391780853, 0.21658872067928314, 0.23918606340885162, 0.6395751237869263, 0.1867774873971939, 0.9330409169197083, -0.03336086496710777, -0.0306387972086668, 0.031842783093452454, 0.15332752466201782, 0.3159148395061493, -0.7343946099281311, -0.4015926122665405...
def _ create _ examples ( self, lines1, lines2, set _ type ) : examples = [ ] for ( i, line ) in enumerate ( lines1 ) : guid = " % s - % s " % ( set _ type, i ) text _ a = line text _ b = lines2 [ i ] label ='1'examples. append ( inputexample ( guid = guid, text _ a = text _ a, text _ b = text _ b, label = label ) ) re...
[ 0.00917903147637844, -0.13498640060424805, 0.34243470430374146, 0.1319950670003891, -0.043379440903663635, 0.30593836307525635, -1.0531483888626099, -0.3553965091705322, -0.5953831076622009, 0.5791905522346497, 0.13258805871009827, 0.3905121088027954, 0.10318095982074738, 0.441384971141815...
def prepare _ form _ data ( src, dest, time ) : src = src. strip ( ). upper ( ) dest = dest. strip ( ). upper ( ) # convert time to list form listtime = [ int ( time [ : 2 ] ), int ( time [ - 2 : ] ) ] return src, dest, listtime
[ -1.0781924724578857, -0.2713184952735901, 0.5599825382232666, -1.0989278554916382, -0.30629247426986694, -0.1339900940656662, -1.6114704608917236, 0.19337885081768036, -0.07799022644758224, 0.5936338901519775, -1.038759469985962, -0.040265437215566635, 0.5987945795059204, 1.022254228591919...
def _ _ init _ _ ( self, sess, loss, opt, dtype = tf. float64 ) : super ( sancoptimizer, self ). _ _ init _ _ ( sess, loss, dtype ) self. l1 _ nc = opt. get ('sanc _ l1 _ nc ', 1. 0 ) self. l2 _ nc = opt. get ('sanc _ l2 _ nc ', 1. 0 ) self. sigma = opt. get ('sanc _ sigma _ init ', 1. ) self. eta1 = opt. get ('sanc _ ...
[ 0.5067062973976135, 0.7367812991142273, 0.8089725375175476, 0.8961220383644104, -0.4766552150249481, -0.07928603887557983, 0.7195798754692078, -0.3938577175140381, -0.055660322308540344, 1.0974544286727905, -0.6789904832839966, -0.3283637464046478, 0.6927868723869324, 0.23442819714546204, ...
def apply _ async ( self, options = none ) : self. tasks _ options = options or { } if self. _ signature is none : self. freeze ( ) self. logger. info ( " scheduling workflow execution with options % s ", self. workflow _ options ) return self. _ signature. apply _ async ( * * self. workflow _ options )
[ -0.04674958437681198, 0.48966649174690247, 0.5090208053588867, 0.7369303107261658, 0.024446848779916763, -0.8608734607696533, 0.658051073551178, 0.3496650755405426, 0.3846254348754883, 0.11414951831102371, 0.05321795865893364, -0.7066977024078369, -0.8297892212867737, 0.3807941675186157, ...
def _ get _ formatter ( ) : return logging. formatter ('% ( asctime ) s [ % ( levelname ) 8s ] % ( message ) s')
[ -0.08027385920286179, -1.0347827672958374, 0.475483238697052, -1.2155340909957886, -0.8359983563423157, -0.6602204442024231, -1.0569162368774414, -0.3532786965370178, -0.29285576939582825, -0.17744027078151703, 0.4351605772972107, 0.104682557284832, -0.2828809916973114, 1.263930320739746, ...
def get _ lat ( self, idx _ lat ) : return latency ( sample = self. sample [ idx _ lat ], time = self. time [ idx _ lat ], sf = self. sf )
[ -0.0451553650200367, -0.9220924973487854, 0.29556381702423096, -1.0210046768188477, -0.39836472272872925, -0.9010476469993591, -1.429783821105957, -0.6306508183479309, 0.12429068982601166, 0.18155819177627563, 0.5753536224365234, -0.20087437331676483, -0.35209816694259644, -0.8296188712120...
def factors ( n ) : return set ( reduce ( list. _ _ add _ _, ( [ i, n / / i ] for i in range ( 1, int ( n * * 0. 5 ) + 1 ) if n % i = = 0 ) ) )
[ -0.10445178300142288, 0.5560807585716248, 0.24255460500717163, -0.17559707164764404, 0.18872006237506866, -0.33481916785240173, 0.46649137139320374, -0.8674455881118774, 0.12664446234703064, -0.4742020070552826, -0.6333940625190735, -0.5605400204658508, -0.9457858800888062, 0.2144365757703...
def download _ product ( self ) : url = settings. api _ off headers = { } category _ list = settings. categories for category in category _ list : payload = payload ( action = settings. payload ['action'], tag _ 0 = category, tag _ contains _ 0 = settings. payload ['tag _ contains _ 0'], tagtype _ 0 = settings. payload...
[ -0.7680827379226685, -0.13779005408287048, 0.5469520092010498, 0.7115815281867981, 0.38640815019607544, 0.25987255573272705, -0.38631343841552734, -1.007218837738037, 0.1119706928730011, 0.16815023124217987, -0.7735636830329895, 0.3503924012184143, 0.6473609209060669, 0.8845902681350708, ...
def floating _ ip _ set _ auto _ assigned ( context, address ) : return impl. floating _ ip _ set _ auto _ assigned ( context, address )
[ -1.1710529327392578, 0.027517056092619896, 0.3755837678909302, 0.2625487446784973, -0.2567482590675354, -0.34987297654151917, 1.4651439189910889, 0.18603579699993134, 0.27610212564468384, -0.3653312027454376, -0.35313910245895386, 0.573883593082428, 0.298626571893692, -0.08003304153680801,...
def notification _ settings ( self ) - > pulumi. output ['outputs. globalvmshutdownschedulenotificationsettings'] : return pulumi. get ( self, " notification _ settings " )
[ -0.17176833748817444, 0.805371105670929, 0.5743643641471863, 1.1055573225021362, 0.8009330034255981, 0.5233420729637146, 0.603567898273468, 0.2700541317462921, 0.06559993326663971, 1.1523610353469849, -0.4377947151660919, 0.2895757555961609, 0.10367006063461304, -0.6891403198242188, -0.6...
def test _ campaignsecurity ( self ) : # sale division self. login ( user _ name = sale _ login _ id ) # try to acceed the campaign module through restrictedtraverse # this will test the security of the module campaign _ module _ id = self. portal. getdefaultmoduleid ( portal _ type ='campaign') campaign _ module = sel...
[ 0.3399314880371094, -0.5191859602928162, 0.5280040502548218, 0.4476233124732971, 0.8813914060592651, 0.7357065677642822, 0.8843526840209961, -0.061886150389909744, 0.6211714744567871, -0.28540122509002686, -0.3929276764392853, 0.1810278445482254, -0.9040111303329468, -0.29302746057510376, ...
def can _ have _ side _ effect ( node, ctxt ) : if isinstance ( node, ast. ast ) : # print ( " can { } have side effects? ". format ( node ) ) if isinstance ( node, ast. call ) : # print ( " yes! " ) return true else : for field, old _ value in ast. iter _ fields ( node ) : if isinstance ( old _ value, list ) : return ...
[ 0.45180532336235046, 0.8399384021759033, 0.8439083099365234, -0.08579995483160019, -0.5482882857322693, 0.3038056790828705, -0.3239279091358185, 0.49460580945014954, -0.18292728066444397, -0.4558817148208618, -0.5710079669952393, 0.5998289585113525, -0.8106808662414551, 1.386725902557373, ...
def _ quote _ domain ( domain ) : return quote ( domain. replace ( '. ','% 2e') )
[ -0.5546776056289673, 0.011211121454834938, 0.19171571731567383, -0.791558563709259, 0.1695975512266159, -0.42237409949302673, -0.4771730303764343, 0.003354394808411598, 0.21103046834468842, 0.1404714286327362, 0.8011397123336792, 0.8384436964988708, 0.1842510998249054, 0.4880210757255554, ...
def get _ vnfr ( self, vnfrid ) : osm _ url = f " https : / / { self. ip } : 9999 / osm / nslcm / v1 / vnf _ instances / { vnfrid } " # get the vnfr from vnf id in json format while true : headers = {'content - type':'application / json ','accept':'application / json ','authorization': f'bearer { self. token } ', } res...
[ -0.5125744342803955, -0.3154190480709076, 0.38779759407043457, -0.21939855813980103, -0.09758919477462769, -1.2961657047271729, -1.4305952787399292, -0.9634219408035278, -0.22276246547698975, 0.4723535478115082, -0.5843993425369263, 0.9930805563926697, -1.1069374084472656, -0.0888391211628...
def set _ radius ( self, radius ) : self. radius = radius
[ -0.13408607244491577, -0.6755895018577576, 0.3537141680717468, -0.37864169478416443, -0.004974172450602055, 0.4560405910015106, 0.3607836961746216, 0.41765353083610535, -0.2009064108133316, 0.15028232336044312, -0.7381385564804077, 1.316988468170166, -0.5290956497192383, 1.2121593952178955...
def corresponding _ tables ( self, relationship _ list ) : merged _ tables = set ( ) for relationship in relationship _ list : relationship _ obj = self. schema _ graph. relationship _ dictionary [ relationship ] merged _ tables. add ( relationship _ obj. start ) merged _ tables. add ( relationship _ obj. end ) return ...
[ -0.33700746297836304, 0.17303584516048431, 0.5468140840530396, 0.43825066089630127, -0.051478683948516846, 0.9376835227012634, 0.18490205705165863, 0.4256475865840912, -0.261202335357666, 0.29684993624687195, -0.9176934957504272, -0.09159155189990997, -0.7973524928092957, 0.241537511348724...
def attribute _ is _ writeable ( self, key, _ flow = _ down ) : key = self. _ attributes _ t _ keycheck ( key ) us _ key = self. _ attributes _ t _ underscore ( key ) return self. _ attributes _ i _ is _ writeable ( us _ key, _ flow )
[ -1.5207197666168213, -0.14042754471302032, 0.4756874740123749, 0.44228395819664, -0.671124279499054, -0.09729383885860443, 0.9253881573677063, 0.3123149573802948, -0.022454412654042244, 1.3030825853347778, -0.09751219302415848, 0.20848111808300018, -0.20876693725585938, 0.3914954364299774,...
def physical _ address ( self, physical _ address ) : if physical _ address is not none and len ( physical _ address ) > 200 : raise valueerror ( " invalid value for ` physical _ address `, length must be less than or equal to ` 200 ` " ) # noqa : e501 self. _ physical _ address = physical _ address
[ -0.5526644587516785, -0.8733037710189819, -0.19185148179531097, 0.28521618247032166, 0.8679922819137573, 0.7143661975860596, -0.08892947435379028, 0.8275022506713867, -0.35998961329460144, -0.37992823123931885, -0.20620214939117432, 0.3969190716743469, -0.09789208322763443, -0.099346131086...
def module _ candidates ( base, prefix, match _ ext ) : for ( filename, name ) in candidates ( base, match _ ext ) : if name. endswith ('_ _ init _ _') : name = name [ : - 9 ] yield '. '. join ( ( prefix, name. replace ('/ ', '.') ) ). strip ( '.')
[ -0.375890851020813, -1.678398847579956, 0.8140304088592529, -0.05860020965337753, -0.35227543115615845, 0.0806148573756218, -0.3845583200454712, -0.05471407249569893, 0.12656216323375702, 0.31945738196372986, 0.14537368714809418, 0.8314107656478882, 0.25058186054229736, 0.4153470993041992,...
def get _ part _ name ( self, part ) : return self. get _ part _ ct _ param ( part, " name ", none )
[ -0.5087382793426514, -0.416013240814209, 0.3211882710456848, 0.13397091627120972, -0.8870862126350403, -0.001963500864803791, -0.0706280991435051, -1.1191785335540771, -0.17277546226978302, 0.6303651332855225, -0.11272504925727844, -0.3150235414505005, -0.8171039819717407, -0.0363316759467...
def get _ clowder _ context ( self, host, key ) : # set the default return values ret _ username, ret _ password, ret _ space = \ ( self. clowder _ user, self. clowder _ pass, self. clowderspace ) # check for overrides if not self. experiment _ metadata is none : clowder _ md = _ _ internal _ _. case _ insensitive _ fi...
[ -0.26880529522895813, 0.17420163750648499, 0.5734408497810364, 0.299206018447876, -0.1400013267993927, -0.29234549403190613, -0.6582378149032593, -0.2823498845100403, -0.2969689667224884, 0.8819474577903748, 0.23676958680152893, 0.16911748051643372, -0.9755010604858398, 1.2636637687683105,...
def test _ env _ host _ set _ when _ host _ prompt _ used ( self ) : copied _ host _ string = str ( env. host _ string ) fake = fake ('raw _ input ', callable = true ). returns ( copied _ host _ string ) env. host _ string = none env. host = none with settings ( hide ('everything'), patched _ input ( fake ) ) : run ( "...
[ -0.13213568925857544, -0.7663796544075012, 0.5333783626556396, 0.36094656586647034, -0.26848554611206055, 0.8225147128105164, 0.6960189938545227, 0.020000526681542397, -0.139046773314476, -0.2481730878353119, -0.19902962446212769, 0.9924219846725464, 0.2112853080034256, -0.3254925608634949...
def naivebayes _ pred ( pos, neg, posprob, negprob, x _ test ) : n, d = x _ test. shape ratio1 = loglikelihood ( posprob, negprob, x _ test, np. ones ( n ) ) - loglikelihood ( posprob, negprob, x _ test, - np. ones ( n ) ) ratio2 = np. log ( pos ) - np. log ( neg ) loglikelihood _ ratio = ratio1 + ratio2 prediction = -...
[ 0.78587806224823, -0.399027556180954, 0.6259840130805969, -0.1151214987039566, -0.8553206920623779, 0.4273655116558075, -0.9438877105712891, 0.3096429109573364, 0.29340171813964844, 0.14173179864883423, 0.16768400371074677, 0.1959328055381775, -0.50943922996521, -0.06648949533700943, 0.4...
def sql _ mogrify ( sql, params = none ) : if params is not none and _ has _ params ( sql ) : if isinstance ( params, dict ) : mog _ params = { k : _ type _ transform ( v ) for k, v in params. items ( ) } else : mog _ params = tuple ( _ type _ transform ( p ) for p in params ) return sql % mog _ params else : return sq...
[ -0.7684123516082764, 0.6342448592185974, 0.6505701541900635, 0.2233618199825287, 0.18197880685329437, -1.2146797180175781, -1.185659646987915, 0.11244701594114304, 0.2455056756734848, 0.9527701735496521, 1.055216908454895, 0.02026459015905857, 0.014541209675371647, 1.2308286428451538, 0....
def find _ rigid _ tfm ( points1, points2, homogeneous = true ) : points1 = np. asarray ( points1 ) points2 = np. asarray ( points2 ) if points1. shape! = points2. shape : yellowprint ( " not the same number of points ", false ) return elif points1. shape [ 0 ] < 3 : yellowprint ( " not enough points : % i " % points1....
[ 0.5951882600784302, -0.15108680725097656, 0.860298752784729, -0.03986525535583496, 0.19011572003364563, -0.3020823895931244, -0.4246203303337097, 0.6801590323448181, -0.07003693282604218, 1.2135710716247559, 0.05922378972172737, -0.37502601742744446, -0.38957005739212036, 0.106166005134582...
def load _ flows ( self, flows : typing. sequence [ flow. flow ] ) - > none : self. flowmap = { } for i in flows : if i. response : # type : ignore ctx. log. warn ( " = = = = = = = = = = = = = = = = = = = = = = = = = add flow to flowmap = = = = = = = = = = = = = = = = = = = = = \ n " ) ; sh = self. _ hash ( i ) l = sel...
[ -0.20937137305736542, -0.8582214713096619, 0.4641853868961334, 0.058638278394937515, 0.054478969424963, 0.43153050541877747, -0.22482237219810486, -0.3571566045284271, 0.9159976243972778, -0.5251359939575195, -1.2769417762756348, -0.19264881312847137, -0.7890909910202026, 0.563919007778167...
def parse _ name ( klass, flat _ name ) : patterns = [ # try a few common name formats. # this is crappy but sufficient r " ( [ a - z ] + ) ", # adam r " ( [ a - z ] + ) \ s + ( [ a - z ] + ) ", # evan wheeler r " ( [ a - z ] + ) \ s + [ a - z ] + \.? \ s + ( [ a - z ] + ) ", # mark e. johnston r " ( [ a - z ] + ) \ s ...
[ -0.32054319977760315, -0.6787041425704956, 0.816469132900238, -0.7094002366065979, -0.7098406553268433, 0.11309947073459625, -0.3438328504562378, -0.0249301940202713, -0.3846249282360077, 0.7912374138832092, -0.8135589957237244, -0.43157491087913513, 0.2851822078227997, 0.5075470805168152,...
def attributes _ str ( b : block, verbose ) - > str : answer = f'pos = { b. position }, size = { b. size }, level = { b. level },'if verbose : answer + = f'highlighted = { b. highlighted }, max _ depth = { b. max _ depth }'return answer
[ -0.04102025926113129, -0.8083769679069519, 0.6125423312187195, 0.05500468611717224, 0.04113984480500221, 0.05359548702836037, -0.2217152714729309, -0.16903573274612427, -0.5033329725265503, 0.6164931058883667, 0.1578381210565567, 0.47267797589302063, -0.258015900850296, 0.20614315569400787...
def transform ( in _ path, out _ format ) : in _ format = infer _ format ( in _ path ) out _ path = in _ path. replace ( in _ format. name, out _ format. name ) data = read ( in _ path, in _ format ) write ( out _ path, data, out _ format )
[ -0.10159362107515335, -1.2521779537200928, 0.7979335188865662, -0.3821888864040375, -0.11969481408596039, -0.4026603400707245, -0.4157513380050659, 1.1403462886810303, -0.2272893339395523, -0.26729825139045715, -0.31003838777542114, 0.709276556968689, 0.3394118547439575, -0.630739033222198...
def place _ orders ( self, board, actions ) : options = [ ] for ter in board : if ter. owner = = self : options. append ( ter ) for adjacent in ter. adjacent : for check in board : if check. name = = adjacent : options. append ( check ) random. shuffle ( options ) for ter in options : if self. score < 1 : return action...
[ -0.7957979440689087, 0.39551296830177307, 0.6187440156936646, 0.6410613059997559, 0.944067120552063, 0.5156797766685486, 0.9643703699111938, -0.6468853950500488, 0.7022683620452881, 0.899969220161438, 0.38585129380226135, -0.6192547678947449, -0.7303792834281921, -0.11069173365831375, -0...
def _ _ str _ _ ( self ) : return str ( self. to _ dict ( ) ) [ 1 : - 1 ]
[ -0.8756628036499023, -1.0378819704055786, 0.7205048203468323, -1.0568424463272095, 0.0339941531419754, 0.4209592044353485, -0.8909060955047607, -0.3248242437839508, -0.24415548145771027, 0.61475670337677, 0.35643842816352844, 0.6000535488128662, -0.04557327553629875, -1.007524013519287, ...
def register _ request _ handler ( self, callback, *, commands = none, contains = none, starts _ with = none, request _ type = none, func = none, state = default _ state, regexp = none, custom _ filters = none, * * kwargs ) : if custom _ filters is none : custom _ filters = [ ] prepared _ filers = generate _ default _ ...
[ -0.914301872253418, 0.08619114011526108, 0.5434478521347046, 0.6919432878494263, 0.5559856295585632, -0.2626778483390808, -0.3206971287727356, -0.2805030047893524, 0.4327980577945709, -1.3508262634277344, -0.249318927526474, 0.7152489423751831, -0.24972358345985413, 0.8520128130912781, -...
def avatar _ ids ( self ) : return self. _ avatar _ ids
[ -0.810900092124939, -0.18696995079517365, 0.17152723670005798, 0.4044451415538788, -0.11583881825208664, 1.1955599784851074, 0.0663645938038826, -0.19634322822093964, 1.015943169593811, 0.5181505680084229, -0.9433732628822327, 0.9712318181991577, -0.15895503759384155, -0.34564927220344543,...
def word _ tokenize ( s ) : for ( regexp, repl ) in _ tokenize _ regexps : s = regexp. sub ( repl, s ) return s. split ( )
[ -0.0903395265340805, -0.07627733796834946, 0.5961532592773438, 0.13715419173240662, -0.6704561114311218, -1.1464289426803589, 0.021828543394804, 1.4377268552780151, 1.1439576148986816, 0.43911078572273254, -0.5489075779914856, 0.7298992872238159, -0.6300803422927856, -0.333156943321228, ...
def complete _ output ( self ) : if self. sys _ stdout : sys. stdout = self. sys _ stdout sys. stderr = self. sys _ stdout self. sys _ stdout = none self. sys _ stdout = none return self. outputbuffer. getvalue ( )
[ 0.5360954999923706, -0.9285397529602051, 0.7393514513969421, 0.04624880105257034, -0.45925456285476685, -1.0765317678451538, 0.9840810894966125, -1.356935977935791, 0.08980758488178253, -0.41556891798973083, -0.43199753761291504, -0.08119584619998932, -0.7554885149002075, 0.632813751697540...
def get ( self ) : x0 = request. args. get ('x0 ', type = float ) x1 = request. args. get ('x1 ', type = float ) if x0 is none : status _ code = 400 success = false message = " missing mandatory argument x0 " elif x1 is none : status _ code = 400 success = false message = " missing mandatory argument x1 " else : succes...
[ -1.0298733711242676, 0.24186567962169647, 0.7219988703727722, -0.036362409591674805, 0.33135926723480225, -0.6284278035163879, -0.48876991868019104, -0.22797365486621857, -1.0198664665222168, 0.1242811530828476, -0.03456921502947807, 0.9503458738327026, 0.08092961460351944, 0.4496523439884...
def maskarray _ is _ valid ( maskarray ) : return maskarray is dsa. nonearray or \ isinstance ( maskarray, dsa. vtkarray ) or \ isinstance ( maskarray, dsa. vtkcompositedataarray )
[ -1.0242629051208496, -0.7768139243125916, 0.5822449922561646, 1.0849660634994507, 0.3800921142101288, 0.2670241594314575, 0.6845573782920837, -0.44361943006515503, 1.638381838798523, -0.170734241604805, 0.6031903028488159, 0.13205808401107788, -0.8671342134475708, 0.9352935552597046, 0.0...
def create _ stats ( network, experiment ) : if ( experiment. base _ obs = = none ) : return weightstats ( network, experiment. train ) return nodestats ( network, experiment )
[ 1.0791904926300049, 0.7876778244972229, 0.1744891107082367, 0.10648119449615479, 0.9967791438102722, 0.09499557316303253, -0.5857501029968262, -1.1706655025482178, 0.12241234630346298, -0.839424729347229, 1.2202304601669312, -0.41090384125709534, -0.11713001132011414, 0.19218213856220245, ...
def getnextmove ( self, prevcoords = none, dosort = true ) : def sortkey ( move ) : sidecoords = self. game. sides [ move. sideid ]. midpoint dist = sidecoords. dist ( prevcoords ) if prevcoords is not none else 1 return ( move. priority, dist ) def getfrommovelist ( ) : if len ( self. nextmovelist ) > 0 : if dosort : ...
[ -0.055998802185058594, 0.30137112736701965, 0.7594884634017944, 0.11841540038585663, -0.239577516913414, -0.3745870888233185, -0.7687547206878662, -0.5004861950874329, 0.35193419456481934, -0.23912934958934784, 0.4219917058944702, -0.004932395648211241, -0.8441221117973328, 0.5023927092552...
async def get _ labels _ for _ lst ( entities, lang ='en') : # make sure there is a cache for this language if lang not in cachelabels : cachelabels [ lang ] = inc. cache. cache ('labels _'+ lang, ['base'] ) try : res = await runquerysinglekey ( cachelabels [ lang ], entities, " " " select? base? l where { values? base...
[ -1.3832985162734985, 0.3527972102165222, 0.5127137303352356, -0.621063232421875, 0.046690601855516434, 0.09175622463226318, -1.6324892044067383, -0.07195913046598434, -0.1022581234574318, 1.2145745754241943, 0.13489514589309692, -0.49036988615989685, -0.053029876202344894, 0.70983779430389...
def decorator ( decode, callback, state, channel, method, properties, body ) : def errback ( exception ) : # these errors should only occur if the rabbitmq and / or postgresql connection is lost. it's not possible to # have a transaction that spans both systems, so it's possible to insert a row then fail to ack a messa...
[ -0.12322676181793213, 0.34404075145721436, 1.0950238704681396, -0.4252129793167114, 0.24189287424087524, -0.60322505235672, 0.3002602458000183, -0.2885844111442566, 0.5963216423988342, 0.25928759574890137, 0.9406707286834717, -0.31068918108940125, 0.11996883153915405, 0.4217751622200012, ...
def pack ( start = false, y = false, x = false, b = false, a = false, l = false, r = false, z = false, up = false, down = false, right = false, left = false, j _ x = 0x80, j _ y = 0x80, c _ x = 0x80, c _ y = 0x80, l _ shoulder = 0x00, r _ shoulder = 0x00 ) : magic = 0x0bd5 buttons = ( start, y, x, b, a, l, r, z, up, do...
[ -0.24161328375339508, -0.2785544693470001, 0.7555294632911682, -0.1461849957704544, -0.5429255962371826, -0.02311847358942032, 0.4181683361530304, -0.6016446948051453, 0.9576814770698547, 0.30456265807151794, -1.1678460836410522, -0.24205785989761353, -0.6168541312217712, 0.046865288168191...
def get _ collection _ dirs ( cache _ dir ) : for dirpath, dirnames, filenames in os. walk ( cache _ dir ) : new _ dirnames = [ ] for d in dirnames : if collection _ id _ rex. match ( d ) : yield os. path. join ( dirpath, d ) else : new _ dirnames. append ( d ) dirnames [ : ] = new _ dirnames
[ -0.40348151326179504, 0.14179028570652008, 0.7596403360366821, 0.7698814272880554, -0.06168896332383156, 0.1617758870124817, 0.5311059355735779, -0.9617950320243835, 0.500011682510376, -0.43650031089782715, -0.14874908328056335, 0.14616765081882477, 0.2335088700056076, 0.6580590009689331, ...
def return _ parmed _ structure ( filename ) : # ` parmed ` can read both pdbs and #. inpcrd /. prmtop files with the same function call. try : structure = pmd. load _ file ( filename ) log. info ( " loaded { }... ". format ( filename ) ) except baseexception : log. error ( " unable to load file : { } ". format ( filen...
[ 0.06489179283380508, -0.7685124278068542, 0.5338494181632996, -0.7101724147796631, -0.7991389632225037, 0.5538666248321533, -0.39221370220184326, 0.3158086836338043, -0.19097404181957245, -0.5772753357887268, 0.7947790026664734, -0.22210583090782166, -0.9372175335884094, -0.579872727394104...
def sorted _ nicely ( l ) : convert = lambda text : int ( text ) if text. isdigit ( ) else text alphanum _ key = lambda key : [ convert ( c ) for c in re. split ('( [ 0 - 9 ] + ) ', key ) ] return sorted ( l, key = alphanum _ key )
[ -0.787277102470398, -0.2839459180831909, 0.6176126599311829, -0.40704935789108276, -1.5760136842727661, -0.2694407105445862, -0.5892459154129028, 0.006089380476623774, 0.33948835730552673, 0.1348155289888382, -0.7634614706039429, -0.5625072121620178, -0.21830375492572784, 0.592916071414947...
def change _ period ( self, period, method = " current " ) : if method not in { " current ", " next ", " reset _ skip ", " reset _ noskip " } : raise valueerror ( " unrecognized changing method : { } ". format ( method ) ) old _ period = self. period self. period = period if method = = " reset _ noskip " : self. reset ...
[ -1.1953818798065186, 0.81478351354599, 0.42932552099227905, 0.6173508763313293, -0.10334800183773041, 0.28944504261016846, 0.9762397408485413, -0.4765207767486572, 0.29946741461753845, 0.5394165515899658, 0.4424661099910736, 1.3027180433273315, -0.1034257560968399, 0.2603991627693176, 0....
async def delete _ key ( self, name : str, * * kwargs : " any " ) - > deletedkey : polling _ interval = kwargs. pop ( " _ polling _ interval ", 2 ) deleted _ key = deletedkey. _ from _ deleted _ key _ bundle ( await self. _ client. delete _ key ( self. vault _ endpoint, name, error _ map = _ error _ map, * * kwargs ) )...
[ -0.18565909564495087, 0.4541472792625427, 0.8283112645149231, 0.7474797368049622, -0.44952577352523804, -0.4693531394004822, -0.704447865486145, -0.8566511273384094, 0.591001033782959, 0.33338305354118347, -0.19006888568401337, -0.03354290500283241, -0.25791624188423157, 0.0233507063239812...
def image _ config ( json _ bytes : bytes ) - > imageconfig : # do not use caching ; get a new instance for each test return imageconfig ( json _ bytes )
[ -0.5313567519187927, -0.8075577020645142, 0.2156352996826172, -1.3775497674942017, -1.0799789428710938, -0.8996530771255493, -0.5653023719787598, -0.019056914374232292, 1.0319722890853882, 0.730355441570282, -1.0805836915969849, 0.29674914479255676, -0.3009359538555145, 0.9318884015083313,...
def add _ game ( self ) : self. _ played + = 1
[ -0.7499351501464844, 0.37379202246665955, 0.9244348406791687, -0.48549747467041016, 1.1606905460357666, 0.7713034152984619, -0.16025137901306152, -0.36794358491897583, 0.15506643056869507, -0.33034181594848633, -0.606200098991394, 0.05297084152698517, -0.25909432768821716, 0.08116135001182...
def _ _ find _ greatest _ separator ( lista ) : sep ='' for i in lista : if'0'in i and len ( i ) > len ( sep ) : sep = i return sep
[ -0.41457611322402954, -0.21095271408557892, 0.7775821089744568, 0.293320894241333, -0.5046859383583069, -0.12506169080734253, -0.7626630067825317, 0.4170529842376709, 0.3762064278125763, -0.7666358351707458, -0.43730515241622925, -1.0913105010986328, -0.6334346532821655, 1.6678593158721924...
def collapse _ merge ( stack, labels, sort _ order ) : n = stack. n if n < = 2 : return false b, c, d, = stack. arr [ n - 3 : ] # last three merge positions # invariant condition number 2 if c - b < = d - c : # distance between merge _ indirect ( labels, sort _ order, b, c, d ) stack. remove ( n - 2 ) # remove the ` c ...
[ -0.25772690773010254, 0.9837378263473511, 0.9781442284584045, 0.09246370196342468, -0.3728044033050537, 0.5187472701072693, 0.37647688388824463, 0.32700884342193604, -0.40994033217430115, 0.3098032474517822, -0.6509765982627869, -1.560713768005371, -1.3226087093353271, -0.48924484848976135...
def trim _ abstract ( df ) : # df. abstract = df. abstract. str. replace ( " \ ( resume d'auteur \ ) ",'' ) \ #. str. replace ( " \ ( resume d'auteurs \ ) ",'' ) def _ chain _ replace ( str ) : for junk _ str in cfg. remove _ str _ list : str = str. replace ( junk _ str,'' ) return str logger. info ('trimming abstracts...
[ 0.5348133444786072, 0.1336250603199005, 0.4072391986846924, -1.1678274869918823, -0.1094830259680748, 0.3615098297595978, -0.21419699490070343, 0.1415165811777115, 0.013922019861638546, 0.35746851563453674, 0.36579757928848267, 0.8337872624397278, 0.5322138667106628, 0.21744659543037415, ...
def shares ( * * kwargs ) : date = kwargs ['today'] for data in api _ pricing. get _ shares ( ) : update ( data, date ) return true,'disk share usages updated ', kwargs
[ -1.4152493476867676, 1.0877642631530762, 0.5213274359703064, 0.2591675817966461, 0.5978332161903381, -0.4325968325138092, -0.25441789627075195, 0.22093267738819122, -1.3176242113113403, 0.130083367228508, -0.01612991653382778, -0.27082929015159607, -0.44947314262390137, 0.6950971484184265,...
def change _ color ( self, status ) : if status = ='enter': self. color = ( 250, 0, 0 ) elif status = ='exit': self. color = ( 0, 250, 0 )
[ -0.9277427792549133, -0.5805231332778931, 0.35622966289520264, -0.27735504508018494, 0.3243638575077057, 0.41610807180404663, -0.6900767683982849, 0.768714427947998, -0.07657490670681, 0.9102790951728821, -0.6161754131317139, 1.0106298923492432, 0.5792287588119507, 0.9424960613250732, 0....
def test _ table _ size ( new _ hash _ table ) : val = new _ hash _ table. to _ insert buckets = getattr ( new _ hash _ table. instance, buckets _ attr ) hashed = new _ hash _ table. instance. _ hash ( val ) assert - 1 < hashed % new _ hash _ table. size < len ( buckets )
[ 0.3105686902999878, 1.1146878004074097, 0.5007178783416748, 0.16487358510494232, -0.18169130384922028, 0.564799427986145, 0.8632680177688599, -1.0725208520889282, -0.7140960693359375, -0.9615843296051025, -0.4817475974559784, -0.9749839305877686, 0.0971091091632843, 0.43378230929374695, ...
def fix _ supair ( self, z, z _ std = none ) : if z _ std is not none : z = torch. cat ( [ z, z _ std ], - 1 ) # find state which has large difference between previous * and * next state # this is the weird one # get differences between states diffs = torch. abs ( z [ :, 1 :, :, : 2 ] - z [ :, : - 1, :, : 2 ] ). detach...
[ 0.3033893406391144, -0.47301986813545227, 0.9601543545722961, 0.16602671146392822, -1.2201672792434692, 0.04323331266641617, 1.1373851299285889, 0.6861627101898193, 0.04086131602525711, 0.14845873415470123, -0.1895572394132614, 0.1886906623840332, 0.3094310164451599, 0.17338110506534576, ...
def get _ lastname _ error ( self ) - > str : logging. info ( " get error message from'last name'field. " ) return self. driver. find _ element ( * addaddresslocators. lastname _ error ). text
[ -0.1329975575208664, 0.2104896754026413, 0.4945749044418335, -0.9327262043952942, 0.1122821494936943, 0.21946315467357635, -0.1298244595527649, -0.059760019183158875, 0.3538268506526947, 0.28057578206062317, 0.4242551624774933, -0.2844569683074951, -0.7648797035217285, -0.34186968207359314...
def gen _ yahoo _ prices _ table ( tablename, schema = none, method _ dict = { }, base = base, headers = ['tickers ','date ','open ','high ','low ','close ','volume ','adj _ close ','dividends'] ) : for header in headers : if not re. search ('date | ticker ', header. lower ( ) ) : method _ dict [ header. lower ( ) ] = ...
[ -0.45972079038619995, 0.45289346575737, 0.7763680219650269, 0.8219387531280518, -0.3140137195587158, -0.8542956113815308, -0.3424496054649353, 0.4848569929599762, -0.55101078748703, 0.16170690953731537, -0.1796453446149826, -0.8543078303337097, -0.020032530650496483, 1.0248013734817505, ...
def _ attributes _ i _ is _ removable ( self, key, flow ) : if self. _ attributes _ i _ is _ writeable ( key, flow = flow ) and \ self. _ attributes _ i _ is _ extended ( key, flow = flow ) : return true return false
[ -0.6565833687782288, -0.45343121886253357, 0.6124955415725708, 0.6635928153991699, -1.0378429889678955, 0.19153891503810883, 0.34053727984428406, 1.060621976852417, -0.27038899064064026, 0.9839991927146912, -0.26085513830184937, -0.2304208129644394, -1.516959547996521, -0.44033926725387573...
def root ( self ) : return self. tree
[ 0.7444848418235779, -0.6177224516868591, 0.23990757763385773, -0.04153980687260628, -0.07050762325525284, 0.6364847421646118, -0.06813863664865494, -0.34717199206352234, 0.7046746015548706, -0.6617794036865234, 0.2180449664592743, 1.5774154663085938, -0.7209938764572144, 0.6233465671539307...
def unpickle1 ( filename ) : return unpickle ( filename, 1 ) [ 0 ]
[ -0.016492433845996857, -0.4582577645778656, 0.4922477900981903, -0.32547158002853394, -0.11548474431037903, -0.49550870060920715, 0.477534681558609, 0.2331160008907318, -0.9796870946884155, -0.3499571681022644, 0.03703228384256363, 0.007970936596393585, -0.5779045224189758, -1.477207183837...
def launch _ template _ name ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " launch _ template _ name " )
[ 0.37086305022239685, -0.5213439464569092, 0.5454111695289612, 0.3735298216342926, -0.8269726037979126, 0.9473915100097656, -0.27439430356025696, 0.2584708631038666, 1.1330288648605347, 0.38445180654525757, -0.08985333144664764, 0.5490317940711975, 0.31946349143981934, -0.7150537371635437, ...
def target _ image _ folder _ id ( self, target _ image _ folder _ id ) : self. _ target _ image _ folder _ id = target _ image _ folder _ id
[ -1.5604051351547241, -1.0977040529251099, -0.4349294900894165, -0.29385679960250854, 0.1777770072221756, 0.9547468423843384, 0.3417036235332489, 0.8874707221984863, -0.5030038952827454, 0.49642351269721985, 0.027322379872202873, 0.8954182863235474, 0.456163614988327, 0.7266066670417786, ...
def get _ modified _ time ( self ) : return self. _ _ modified _ time
[ -0.6670883893966675, -0.5977620482444763, 0.35489600896835327, -0.27355819940567017, 0.44602033495903015, 0.3420945107936859, -0.2241733819246292, 0.2186695635318756, 0.25024721026420593, -0.04448825120925903, 0.0056676664389669895, 0.35780802369117737, -0.8770594000816345, 0.6166459321975...
def inspectobvioussideclues ( self, side ) : # do not process non - ` unset ` sides. if not side. isunset ( ) : return self. inspecthangingside ( side ) self. inspectconnectingtointersection ( side ) self. inspectcontinueactivelink ( side )
[ 0.2633800506591797, 0.31916454434394836, 0.5809202194213867, -1.4646450281143188, 0.5324206352233887, -0.9393144845962524, 0.9291200637817383, -1.387042760848999, -0.15170395374298096, 0.03554746136069298, 0.6857481002807617, 0.510135293006897, -0.2328106164932251, 0.9430614709854126, 0....
def zeta _ symmetric ( s ) : if not ( is _ complexnumber ( s ) or is _ realnumber ( s ) ) : s = complexfield ( ) ( s ) r = s. parent ( ) if s = = 1 : # deal with poles, hopefully return r ( 0. 5 ) return ( s / 2 + 1 ). gamma ( ) * ( s - 1 ) * ( r. pi ( ) * * ( - s / 2 ) ) * s. zeta ( )
[ -0.5973836183547974, -0.13247184455394745, 0.20474639534950256, 0.1290494203567505, -0.05891704931855202, -0.613758385181427, 1.741930603981018, 0.1047099158167839, 0.9666532874107361, -0.22530056536197662, -0.8744466304779053, 0.24337144196033478, 0.0374472476541996, -0.022685104981064796...
def do _ connect ( self, db _ name ) : self. conn = sqlite3. connect ( db _ name ) sql _ file _ path = os. path. join ( os. path. dirname ( os. path. abspath ( _ _ file _ _ ) ),'schema. sql') tables _ structure = open ( sql _ file _ path ). read ( ) try : self. conn. executescript ( tables _ structure ) except exceptio...
[ -0.3787938058376312, -0.534816563129425, 0.8546618223190308, 0.9149287939071655, -0.4385577440261841, 0.11022485047578812, 0.49104273319244385, 0.2356284111738205, -0.3573988974094391, 0.3914830982685089, 0.38178005814552307, -0.43302446603775024, -0.0745137482881546, 0.0716564729809761, ...
def is _ connected ( self ) - > bool : return self. logged _ in
[ -0.8691682815551758, -0.6062024235725403, 0.5253291726112366, 1.2253495454788208, 0.07250198721885681, 0.27740123867988586, -0.8104174137115479, 0.10883066058158875, -0.0027773710899055004, 0.019331522285938263, -0.5072329640388489, -0.22239266335964203, -0.20566557347774506, -0.6267097592...
def to _ dummies ( self ) - > " dataframe " : return wrap _ df ( self. _ df. to _ dummies ( ) )
[ -0.8622807264328003, 0.8031328916549683, 0.3840773403644562, -0.36956214904785156, 0.758465588092804, -0.20870627462863922, 0.2813836336135864, -1.1266727447509766, 0.4587305784225464, -0.37548404932022095, -0.33343565464019775, 1.4037306308746338, 1.0170557498931885, -0.39634501934051514,...
def calculateintersection ( a, b ) : temp = set ( a ) ni = len ( [ value for value in b if value in temp ] ) return ni
[ 0.20763075351715088, 0.533379077911377, 0.5460024476051331, -0.10114637762308121, -0.11484131962060928, -0.5516614317893982, -0.012341183610260487, 1.0582576990127563, -0.5583561062812805, 0.7991601824760437, -0.7160305380821228, -0.5474470257759094, -0.7048611044883728, 0.0204724203795194...
def test _ fitting _ error ( ) : ft = fillnatransformer _ backward ( columns = col _ a ) with pytest. raises ( attributeerror ) : ft. transform ( data )
[ 0.668134868144989, 0.29748785495758057, 0.31796133518218994, -0.5182759165763855, 0.7492571473121643, 0.1577611118555069, 0.311664342880249, -0.029741227626800537, -0.81061190366745, -1.028659701347351, -0.3376767933368683, 0.3983825445175171, 0.4778081774711609, 0.7793183922767639, 0.25...
def clone ( self, node ) : self. _ element. clone _ node ( node ) return self
[ -0.39397481083869934, 0.6282503008842468, 0.42413008213043213, 0.3347862660884857, -0.7069783806800842, 1.1466401815414429, -0.30934223532676697, -0.5163185596466064, 0.8542224168777466, -0.3124309778213501, -0.031633973121643066, 0.9157718420028687, 0.005879498552531004, -0.94412869215011...
def process _ orders ( self, side : str, orders, quantity, quote ) : while len ( orders ) > 0 and quantity > 0 : head _ order = orders. head traded _ price = head _ order. price if quantity < head _ order. quantity : traded _ quantity = quantity new _ book _ quantity = head _ order. quantity - quantity head _ order. up...
[ -0.0157523974776268, 0.015460786409676075, 0.9864394664764404, 0.07728008925914764, 0.628613293170929, -0.17658226191997528, -0.28661784529685974, -0.5299681425094604, 0.09819014370441437, 0.5099354386329651, -0.5245205163955688, 0.1943628489971161, -0.11670074611902237, 0.0628849789500236...
def move ( r, u = np. array ( [ 0, 0 ] ) ) : # change robot rotation a a = r [ 2 ] + u [ 1 ] a = zero _ angles ( a ) # position increment from control signal in global frame, # we transform only x coordinate as vel of u = [ vel, angle ] t, j _ f, j _ p = transform _ global ( r, np. array ( [ u [ 0 ], 0 ] ) ) j _ r = np...
[ -0.7014115452766418, 0.05022795870900154, 0.6414579749107361, 0.09061523526906967, -0.16594690084457397, -0.3439290225505829, 0.3982923924922943, 0.05933999642729759, 0.03886476159095764, 0.563399612903595, -0.6992276906967163, -0.12235070019960403, -0.3129896819591522, -0.2783539593219757...
def get _ life _ span ( self ) : return self. _ _ time _ span
[ -0.5959485769271851, -0.1610078066587448, 0.37554410099983215, -0.3659379780292511, 0.04536408931016922, 1.2795482873916626, -0.4973434805870056, -0.43786826729774475, 0.9715121388435364, -0.5301182270050049, -0.5527177453041077, 0.03732416406273842, 0.1767251044511795, 0.6929053068161011,...
def bubble _ sort ( file ) : for j in range ( len ( file ) ) : # iterate through the entire list. swapped = true for i in range ( len ( file ) - j - 1 ) : # iterate up the the outer index # swap until the element being swapped meets it match if file [ i ] > file [ i + 1 ] : swapped = true file [ i ], file [ i + 1 ] = f...
[ -0.7939257025718689, 0.08358175307512283, 0.7995757460594177, 0.0638800710439682, -1.031820297241211, 0.8208147883415222, 0.8279618620872498, 0.9073322415351868, -0.16252341866493225, -0.3626435697078705, -0.8473876714706421, 0.6008931994438171, -1.382396936416626, 1.2509862184524536, -0...
def peek ( self ) : priority = self. max _ priority ( ) if priority is none : raise keyerror ( " dequeue from empty queue " ) return priority, self. queue [ priority ] [ 0 ]
[ -0.01892968825995922, -0.4241505563259125, 0.9207956790924072, -0.633563756942749, -0.4145963788032532, -0.5755998492240906, -1.3562977313995361, 0.2057371735572815, 0.16256283223628998, -0.07352291792631149, -0.3659708499908447, 0.49196648597717285, 0.4619638919830322, 0.7227848768234253,...
def setup ( self ) : self. player _ list = arcade. spritelist ( ) # self. background = arcade. load _ texture ( map _ image ) vehicle _ length _ pixels = arcade. sprite ( vehicle _ png, character _ scaling ). height if use _ voyage : vehicle _ length _ meters = voyage _ van _ length else : vehicle _ length _ meters = t...
[ -0.6957048177719116, -0.2400081902742386, 0.8841787576675415, -0.36250540614128113, 0.3046623170375824, 0.013607839122414589, 0.3603616952896118, 0.18168087303638458, -0.21603330969810486, 0.043623197823762894, -0.023728396743535995, -0.14092473685741425, 0.002016159240156412, 0.7848719358...
def optimize _ parameters ( self ) : pass
[ -0.6788208484649658, 0.08332515507936478, 0.1443467140197754, 0.6838013529777527, 1.4576243162155151, -0.1527642458677292, 0.4065276086330414, -0.7061964273452759, -0.9609598517417908, 0.5452039837837219, -0.4433527886867523, 0.44934311509132385, -0.692330539226532, 0.870612382888794, -0...