text
stringlengths
25
2.19k
embedding
listlengths
768
768
def testresolvequerywithparseerror ( self ) : with login ( u'username ', uuid4 ( ), self. transact ) as session : deferred = self. facade. resolvequery ( session,'wrong query > : )') yield self. assertfailure ( deferred, tparseerror )
[ 0.7488072514533997, 0.41242027282714844, 0.41264572739601135, -0.08846987783908844, 0.5040773153305054, 0.482281357049942, -1.060703158378601, -0.2533755898475647, -0.4568430483341217, -0.6809278726577759, -0.08134879171848297, -0.6752524375915527, 0.319172203540802, 0.1965939998626709, ...
def login ( self ) : self. logged _ in = false resp = yield from self. call ('login ', action ='request ', username = self. username, loginpassword ='', captcha ='' ) challenge = str ( resp. loginresponse. challenge ) public _ key = str ( resp. loginresponse. publickey ) self. _ cookie = str ( resp. loginresponse. cook...
[ -1.3096635341644287, -0.043114807456731796, 0.5357552170753479, 0.8193395733833313, -0.10959815233945847, -0.10679973661899567, 0.4554354250431061, -0.13173720240592957, 0.31314629316329956, -0.810255765914917, -0.349263995885849, -0.18905670940876007, 0.03577059879899025, -0.2778727710247...
def reload _ configuration ( self ) : path = os. path. join ( self. path, " lambentlight. json " ) # if the file is there, load it if os. path. isfile ( path ) : newconfig = { } with open ( path ) as file : loaded = json. load ( file ) for key, item in default. items ( ) : if key in loaded : newconfig [ key ] = loaded ...
[ -0.2396015077829361, -0.27735498547554016, 0.6171061992645264, -0.5404314398765564, -0.2297402173280716, -0.7022656798362732, -1.2016154527664185, -0.09608536958694458, -0.9412699341773987, 0.3232785761356354, -0.5181058645248413, 0.12912066280841827, -0.31587424874305725, 0.66195768117904...
def test _ remove _ extra _ spaces _ from _ voucher _ code ( self ) : voucher = baker. make ( eventvoucher, code ='test ', discount = 10 ) voucher. event _ types. add ( self. pole _ class _ event _ type ) booking = baker. make ('booking. booking ', event _ _ event _ type = self. pole _ class _ event _ type, event _ _ c...
[ 0.5840961337089539, 0.6767828464508057, 0.639437198638916, -0.2147739827632904, -0.12897974252700806, 0.35220634937286377, -0.31176596879959106, 0.8288613557815552, 0.34055566787719727, -0.2567387819290161, -0.034840770065784454, -0.3954541087150574, 0.4085734784603119, 1.403960108757019, ...
def _ _ init _ _ ( self, host ='127. 0. 0. 1 ', port = 2003 ) : self. host = host self. port = port
[ 0.57683926820755, -0.3612009882926941, 0.6487802863121033, 0.11206015944480896, -0.4964221715927124, 0.47714564204216003, -0.8236715793609619, 0.4928154945373535, -0.8179292678833008, -0.18321435153484344, -0.48704251646995544, 0.46331587433815, -0.3392816483974457, 0.0027420392725616693, ...
def _ _ len _ _ ( self ) : return ( 0 if not self. queue else sum ( len ( self. queue [ key ] ) for key in self. queue ) )
[ 0.005864378530532122, -0.5905779004096985, 0.546205997467041, -1.0413146018981934, 0.2141372263431549, 0.19424666464328766, -0.5065843462944031, 0.692851185798645, 0.6053431630134583, 0.5581313967704773, -1.0026259422302246, -0.7875128388404846, 0.04592752084136009, 0.91506427526474, -0....
def random _ icd ( ) : global icds if not icds : with sqlite3. connect ('source. db') as conn : cur = conn. cursor ( ) icds = [ row [ 0 ] for row in cur. execute ( " select code from icd9 " ) ] return random. choice ( icds )
[ -0.0484788715839386, 0.40727266669273376, 0.4476184844970703, -0.727171778678894, 0.12359984964132309, 0.023815564811229706, 0.1822667419910431, 0.46103325486183167, 0.6445438861846924, 0.08251854032278061, 0.6363787651062012, -0.2800179123878479, -1.3468366861343384, -0.7294279336929321, ...
def read _ from _ csv ( csv _ path = none ) : if not csv _ path : csv _ path = rpw. ui. forms. select _ file ( extensions ='csv files ( *. csv * ) | *. csv * ', title ='select file ', multiple = false, restore _ directory = true ) if not csv _ path : raise valueerror ( " no file selected " ) shared _ parameter _ list =...
[ -0.17464983463287354, -0.3446080982685089, 0.47315919399261475, 0.8437283039093018, -0.1428937315940857, 0.6128590106964111, 0.635898768901825, 0.049598418176174164, 0.428744912147522, 0.8317794799804688, 0.01872950606048107, 0.22561198472976685, -0.5598662495613098, 0.5413699746131897, ...
def skip ( self, count : int ) - >'dataset': return self. transform ( lambda items : ( item for i, item in enumerate ( self ) if i > = count ), background = false )
[ -1.0828238725662231, 0.4299643039703369, 0.4427402913570404, -0.5674715638160706, -0.4378877580165863, 0.17204642295837402, 0.6275210976600647, -0.6941413879394531, -0.6706137657165527, -0.421693354845047, -0.18198303878307343, 0.05908159539103508, -0.27859199047088623, -1.7124176025390625...
def add _ arguments ( self ) : return
[ -0.5164856910705566, -0.07617191225290298, 0.33661088347435, 0.24813249707221985, 1.354055404663086, 0.7025401592254639, -0.37666192650794983, 0.4047413468360901, -0.3173137903213501, -0.543989896774292, -0.07250098139047623, 0.1693318486213684, -1.19162118434906, 1.0963995456695557, -0....
def elements ( self, baseschema, override ) : if not self. analyser ( baseschema, override ) : return ( false, none ) e = self. analysers [ ( baseschema, override ) ] e. interpret ( ) if not e. good : result = ( false, none ) else : result = ( true, e. getdefs ( ) ) return result
[ -1.1805061101913452, 0.10078795999288559, 0.4741918742656708, -0.27781739830970764, 0.3898109495639801, -0.7393977046012878, -0.8435799479484558, 0.5071439146995544, 0.30256956815719604, -0.49277475476264954, -0.861484944820404, -0.03446543589234352, -0.8209178447723389, 0.9918129444122314...
def get _ colors _ c1 ( resn _ list, color, chain, model ) : matrix _ colors = [ ] if color = ='auto': for state in range ( 1, cmd. count _ states ( ) + 1 ) : colors = [ ] for i, resi in enumerate ( resn _ list ) : stored. colors = [ ] cmd. iterate _ state ( state,'model % s and chain % s and resi % s and name c1'% ( m...
[ -0.08656319230794907, -0.19094695150852203, 0.5403719544410706, 0.06899666041135788, 0.9677995443344116, -0.21454787254333496, 0.0034778378903865814, 0.1501990407705307, -0.03158627822995186, 0.17565587162971497, -0.51060950756073, 0.1538085788488388, -0.019140370190143585, 0.3178249001502...
def winbio _ winbioremovecredential ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " identity ", " type " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.4016246199607849, -0.6450643539428711, 0.5780473351478577, 0.7187752723693848, -0.061678409576416016, 0.8110895752906799, 0.9451390504837036, 0.23601338267326355, 0.09643633663654327, 0.9140560030937195, -0.8010700345039368, 0.16570770740509033, -2.0323169231414795, 0.5988056659698486, ...
def publish _ numbers ( self ) : output _ msg = message ( self. counter, timestamp ( coordinates = [ self. batch _ number ] ) ) self. get _ output _ stream ( " integer _ out " ). send ( output _ msg ) # decide if the watermark needs to be sent. if self. counter % self. batch _ size = = 0 : # the batch has completed. we...
[ -0.0992443859577179, 0.8841678500175476, 0.6339805126190186, 0.18552923202514648, -0.011177454143762589, -0.5646091103553772, 1.2609052658081055, -0.4320589005947113, -0.652658998966217, -0.5202279090881348, -0.26072928309440613, 1.0769479274749756, -0.010521681047976017, 0.956937551498413...
def get _ total _ npixels ( obsid ) : # we read the number of pixels from planet4. markings and subtract the overlaps new _ pixels _ per _ tile = ( markings. img _ x _ size - 100 ) * ( markings. img _ y _ size - 100 ) tile _ coords = get _ tilecoords ( ). query ( " obsid = = @ obsid " ) no _ of _ tiles = tile _ coords ...
[ -0.39171090722084045, 0.5418535470962524, 0.529271125793457, -0.7591284513473511, -0.3707623779773712, -0.22127246856689453, 0.7461867332458496, -0.3872673511505127, 0.8430352807044983, 0.012950878590345383, -0.2674435079097748, -0.5886468887329102, 0.041125908493995667, 0.4321112632751465...
def get _ thread _ storage ( ) : thread _ id = thread. get _ ident ( ) # identify the calling thread # return the ‘ thread identifier ’ of the current thread. thread identifiers may be recycled when a thread exits and another thread is created. tss = _ tss. get ( thread _ id ) # if tss is none : # first time being call...
[ 0.06371985375881195, -0.2581849694252014, 0.49355193972587585, -0.41140833497047424, -0.08406934142112732, -0.3399796485900879, -0.015530508942902088, -0.9495840072631836, 0.17656604945659637, -0.5961815714836121, -0.2824108600616455, -0.21514271199703217, -0.2691752314567566, 0.1569518148...
def _ add _ item ( self, item ) : try : n _ widgets = len ( item ) except typeerror : n _ widgets = 1 if n _ widgets = = 1 : # catch edge case in which we get an iterable with only one widget e. g. item = [ qlabel ] try : item = item [ 0 ] except typeerror : pass self. _ add _ to _ grid ( item, self. cnt _ row, 0 ) els...
[ -1.5461105108261108, 0.7184914350509644, 0.7433425188064575, 0.4778224527835846, 0.4535371661186218, -0.010236982256174088, 0.8046902418136597, 0.4506707787513733, 0.5712748765945435, 0.32922089099884033, 0.35862600803375244, -0.8795864582061768, -0.2174619883298874, 0.48570331931114197, ...
def deletenetwork ( self, session, _ id ) : dbnetwork = self. getnetworkbyid ( session, _ id ) self. getlogger ( ). debug ('attempting to delete network [ % s / % s ]'% ( dbnetwork. address, dbnetwork. netmask ) ) # make sure this network is not associated with anything if dbnetwork. hardwareprofilenetworks : nets = [ ...
[ -0.18832559883594513, 0.5694516897201538, 0.24989482760429382, 0.38114121556282043, 1.157837986946106, -0.1538299024105072, 0.2620651125907898, -0.5332598686218262, 1.0769928693771362, -0.6119511723518372, -0.9871876835823059, -0.7833188772201538, -0.553662121295929, 0.5932983160018921, ...
def add _ template ( self, dto ) : return self. request ('/ templates ', method ='post ', dto = dto )
[ -1.1832399368286133, 1.278303623199463, 0.43448400497436523, 0.05365878716111183, -0.40577778220176697, -0.1791057288646698, -0.9558611512184143, -0.49190056324005127, 0.36391279101371765, -0.9894301295280457, -0.8347822427749634, 0.04516206309199333, -0.8108778595924377, -0.58332490921020...
def setup _ logging ( default _ path ='logging _ config. yaml ', default _ level = logging. info, env _ key ='log _ cfg') : path = default _ path value = os. getenv ( env _ key, none ) if value : path = value if os. path. exists ( path ) : with open ( path,'rt') as f : try : config = yaml. safe _ load ( f. read ( ) ) l...
[ 0.21799485385417938, -0.2709508538246155, 0.6595581769943237, 0.5313718318939209, 0.6053001284599304, 0.2543747127056122, -0.214968740940094, 1.2363849878311157, -1.0825577974319458, 0.7623839378356934, -0.6185020804405212, -0.8522059917449951, 0.02835594303905964, 0.884955108165741, 0.0...
def set _ imsize ( self, imsize ) : self. _ _ inps. append ( imsize )
[ -1.2585057020187378, -0.07546956092119217, 0.43302175402641296, -0.4400896430015564, -0.32877758145332336, 0.2544858753681183, -0.11923188716173172, 0.008136502467095852, 1.0372402667999268, -0.19397003948688507, -0.6439207792282104, 0.11596252024173737, -1.1935261487960815, 0.488307893276...
def test _ status _ to _ activity _ tombstone ( self, * _ ) : status = models. status. objects. create ( content = " test content ", user = self. local _ user, deleted = true, deleted _ date = timezone. now ( ), ) activity = status. to _ activity ( ) self. assertequal ( activity [ " id " ], status. remote _ id ) self. ...
[ 0.3423020541667938, -0.06373778730630875, 0.3733459413051605, 0.06913106888532639, 0.4623332917690277, 0.22382117807865143, 0.8280965089797974, -0.7567629218101501, 1.1254030466079712, -0.036871280521154404, -0.6793858408927917, 0.44773998856544495, -0.4323066473007202, -0.454477995634079,...
def index ( request ) : new _ contacts = contact. objects. all ( ) [ : 5 ] # generate counts for some main objects num _ contacts = contact. objects. all ( ). count ( ) # available books ( status ='a') # num _ instances _ available = bookinstance. objects. filter ( status _ _ exact ='a'). count ( ) # num _ authors = au...
[ -0.1689072549343109, -0.5877035856246948, 0.3681468069553375, 0.28432127833366394, -0.09286494553089142, 0.7025440335273743, 0.8591688871383667, 0.4012979567050934, -0.25054439902305603, -0.020719215273857117, 0.35367056727409363, -0.6426472663879395, 0.19297930598258972, 0.140328496694564...
def resize ( a, new _ shape, axes = none, attributes = none, id = none, grid = none ) : ignore, attributes, id, ignore = _ extractmetadata ( a, axes, attributes, id ) if axes is not none : axesshape = [ len ( item ) for item in axes ] if axesshape! = list ( new _ shape ) : raise cdmserror ('axes must be shaped % s'% re...
[ 0.3342118263244629, 0.16092492640018463, 0.7299241423606873, -1.2529767751693726, -0.38621413707733154, -1.0600693225860596, 0.2053641676902771, 0.07698877900838852, -0.026111524552106857, 0.5038884878158569, 0.12261012196540833, 0.4277230203151703, 1.0439079999923706, -0.9435561895370483,...
def edit _ media ( request, media _ pk ) : if not request. user. is _ superuser : return redirect ('% s? next = % s'% ( reverse ('dc _ parse : admin _ auth'), request. path ) ) # common data media = media. objects. get ( pk = media _ pk ) tags _ existed = [ ] tags _ of _ media = tagmediabond. objects. filter ( media = ...
[ 0.02648499235510826, 0.13552458584308624, 0.8838993906974792, 0.3997590243816376, 0.5280659794807434, 0.03830508515238762, 1.0809062719345093, -0.5054317116737366, -0.2884432375431061, 0.07795347273349762, -0.45713287591934204, -0.3780079185962677, -0.25673606991767883, 1.1314195394515991,...
def view _ photos ( request, mode, page, username = none ) : all _ users = user. objects. all ( ) # grab normal photo if ( mode = = 0 ) : all _ photos = list ( photo. objects. filter ( draft = false ). order _ by ('- created _ at') ) elif ( mode = = 1 ) : all _ photos = list ( photo. objects. filter ( draft = false ). ...
[ -0.7758054733276367, 0.09788679331541061, 0.8343342542648315, 0.43719303607940674, -1.0538588762283325, 0.20687593519687653, 0.6905224919319153, 0.7065834403038025, 0.12391277402639389, -0.27340760827064514, 0.20221126079559326, -0.21574844419956207, 0.5641176104545593, 0.7055701613426208,...
def _ get _ update ( self ) : return [ a ( key, val ) for key, val in iteritems ( self. data ) ]
[ -1.5144789218902588, -1.3814599514007568, 0.48380735516548157, -0.8071205019950867, -0.6112323999404907, -0.3785440921783447, -1.401886224746704, 0.6825257539749146, 0.2069704234600067, 0.5658965110778809, 0.15509285032749176, -0.2750597596168518, 0.3862244486808777, -0.19653195142745972, ...
def get _ environ ( self ) : raise notimplementederror # pragma : no cover
[ -0.000881514570210129, -0.43233412504196167, 0.4218612015247345, 0.3809664845466614, 0.2615691125392914, 1.1027065515518188, 1.0306280851364136, 0.05719625577330589, -0.22079183161258698, -0.04792279750108719, -0.4513391852378845, 0.8756811618804932, 0.6624730825424194, 0.7314949035644531,...
def merge _ close _ lines ( ar, line _ tol = 2 ) : ret = [ ] for a in ar : if not ret : ret. append ( a ) else : temp = ret [ - 1 ] if np. isclose ( temp, a, atol = line _ tol ) : temp = ( temp + a ) / 2. 0 ret [ - 1 ] = temp else : ret. append ( a ) return ret
[ -0.6405262351036072, -0.9264431595802307, 0.9103296399116516, 0.6497272849082947, 0.34465792775154114, 0.36411482095718384, 0.21970859169960022, -0.18154051899909973, 0.26472777128219604, 0.4964454174041748, 0.9206425547599792, -0.7276433706283569, -0.3430697023868561, 0.17229843139648438,...
def _ _ rfloordiv _ _ ( self, other ) : return build _ cpo _ expr ( other ). _ _ floordiv _ _ ( self )
[ 0.7603944540023804, -0.26313886046409607, 0.42966195940971375, 0.6806790828704834, -0.5832188725471497, -0.029338592663407326, 1.1435272693634033, -0.6674935221672058, -0.27501630783081055, -0.45798251032829285, -0.6885527968406677, -0.24302013218402863, -0.5259755849838257, 0.596151113510...
def setattr _ changed ( obj : any, field : str, value : any ) - > bool : if getattr ( obj, field )! = value : setattr ( obj, field, value ) return true return false
[ -0.42951500415802, -0.3212035298347473, 0.5882551074028015, 0.056276094168424606, -0.3733077347278595, 0.5246639847755432, -0.12120628356933594, -0.9819175004959106, -0.03341974690556526, 0.8213610053062439, -0.760641872882843, 0.018353886902332306, 0.6174272298812866, 0.19909019768238068,...
def create _ catalog _ products ( total _ list, debug = false, phot _ mode ='both') : product _ list = [ ] for total _ product _ obj in total _ list : # determine total product filename if os. path. exists ( total _ product _ obj. product _ basename + " _ drc. fits " ) : total _ product _ name = total _ product _ obj. ...
[ -0.47544217109680176, 0.09387940168380737, 0.8653820753097534, 0.2613159120082855, 0.349656879901886, 0.5428553223609924, 1.0735219717025757, -0.07826787233352661, -0.2583273947238922, 0.3767150342464447, -0.633411705493927, -0.5568078756332397, 1.1571811437606812, 0.2641732394695282, 0....
def to _ plan ( self, project _ gateway : iprojectgateway, name : optional [ str ] = none, description : optional [ str ] = none, keywords : optional [ list [ str ] ] = none, creators : optional [ list [ person ] ] = none, date _ created : optional [ datetime ] = none, ) - > plan : plan = plan ( id = self. plan _ id, n...
[ 0.11974448710680008, -0.16231665015220642, 0.2261064201593399, -0.23762455582618713, -0.031481560319662094, -0.04424870386719704, -0.9630537033081055, -0.5898928046226501, 0.3883170485496521, -0.153806671500206, -0.5635666847229004, 1.1679937839508057, 0.004451374057680368, 0.0429687425494...
def cast ( * args ) : return _ itksmoothingrecursivegaussianimagefilterpython. itksmoothingrecursivegaussianimagefilterius2ius2 _ cast ( * args )
[ -0.9876177906990051, -1.0291911363601685, 0.16854307055473328, -0.25693029165267944, -0.00917149055749178, 0.15281127393245697, 0.05338774248957634, -0.8952635526657104, -0.30852755904197693, 0.21288032829761505, 0.30489224195480347, 1.0407917499542236, -0.7550073862075806, 1.4259682893753...
def winbio _ winbioasyncenumserviceproviders ( jitter ) : ret _ ad, args = jitter. func _ args _ stdcall ( [ " frameworkhandle ", " factor " ] ) raise runtimeerror ('api not implemented') jitter. func _ ret _ stdcall ( ret _ ad, ret _ value )
[ -0.46142178773880005, -0.14323686063289642, 0.17400377988815308, 0.2054608166217804, 0.38828739523887634, 0.1654215008020401, 0.7903059124946594, -0.1598520129919052, 0.45475828647613525, 0.1887243390083313, 0.19857923686504364, 0.2612723410129547, -1.6296595335006714, 1.0166935920715332, ...
def add _ success ( self, dest _ url, payload, hashing, query _ string, orig _ url, method ='url') : if payload ['browser'] = = " [ manual _ injection ] " : self. report ( " [ + ] checking : " + method + " attack with " + payload ['payload']. strip ( ) + "... ok \ n " ) elif payload ['browser'] = = " [ heuristic test ]...
[ -0.0535009391605854, 0.22393274307250977, 0.707798957824707, -0.1367175132036209, 0.9620985984802246, -0.045230329036712646, -0.4731268882751465, -0.01846340484917164, -0.15068644285202026, -0.1422475278377533, 0.323150634765625, -0.3033868968486786, -0.39616525173187256, 0.390873819589614...
def access _ key _ limit ( self ) - > int : return self. limits. get ( " access _ key _ limit " )
[ 0.2006392925977707, 0.37644100189208984, 0.372119277715683, 0.384383887052536, 0.016762657091021538, 0.1730106621980667, 0.1175202801823616, 0.245970219373703, 0.02240985631942749, 0.3148209750652313, 0.7767513990402222, 1.7167783975601196, 0.3366919159889221, -0.8001316785812378, 0.6327...
def maketestsuitev201008 ( ) : suite = unittest. testsuite ( ) suite. addtests ( unittest. makesuite ( geolocationservicetestv201008 ) ) return suite
[ -0.33913710713386536, -0.29305240511894226, 0.29185953736305237, 0.7075154781341553, 0.1858527511358261, 0.45624619722366333, 0.00699511356651783, 0.2169448435306549, 1.1771289110183716, 0.6682522892951965, 0.27950024604797363, -0.20423005521297455, 0.03004462830722332, -0.3378339409828186...
def detect ( self, filename, offset ) : return
[ -0.2494846135377884, -1.7502847909927368, 0.3853931725025177, 0.37508973479270935, -0.08724358677864075, 1.0227481126785278, -0.20855510234832764, 0.3626600205898285, -0.8817364573478699, -0.7638981938362122, -0.5719605088233948, 0.7608559727668762, -0.2013382911682129, -0.1036712154746055...
def get _ data ( folder _ wh _ data ) : # make inventory of sub folder names. inventory _ of _ sub _ folders = get _ all _ sub _ folders _ within _ folder ( path = folder _ wh _ data ) # declare an empty list to store data files. inventory _ of _ data _ sets = [ ] # iterate over sub folder, and then iterate over files ...
[ -0.551777184009552, 0.2488253116607666, 0.7312870621681213, 0.15646928548812866, 0.23801180720329285, 0.6412194967269897, 0.588711678981781, -0.184280663728714, -1.1001226902008057, -0.5858925580978394, 0.1695404052734375, 0.9658933281898499, 0.0022292400244623423, -0.33084210753440857, ...
def readucr ( filename ) : data = np. loadtxt ( filename, delimiter = ',') y = data [ :, 0 ] x = data [ :, 1 : ] return x, y
[ -0.06869036704301834, -0.5497260689735413, 0.6100271940231323, -1.0373656749725342, 0.0789993405342102, 0.1962074190378189, 0.3767762780189514, 0.8888826966285706, -0.44550976157188416, 0.48401105403900146, 0.11023766547441483, 0.2341630905866623, -0.25439220666885376, -1.071038842201233, ...
def retrieve ( self ) : for tag in self. _ vocab _ index : index = self. _ vocab _ index [ tag ] freq = 0 if tag! = self. _ unknown _ token : freq = self. _ freq [ tag ] yield ( tag, index, freq )
[ 0.19338186085224152, -0.23709836602210999, 0.321167528629303, -0.5005594491958618, 0.9559574723243713, -1.0223888158798218, -0.3704768121242523, -0.7108137011528015, -0.6292077302932739, -0.8753400444984436, -0.2518603503704071, -0.22790080308914185, 0.2699674367904663, -0.1559699773788452...
def parse _ database _ response ( database _ response, download _ dir ) : download _ list = [ ] for response in database _ response : download _ list = download _ list + [ ( response [ " url " ], os. path. join ( download _ dir, response [ " retailer " ], str ( response [ " product _ id " ] ) + " _ " + response [ " url...
[ -0.11977116018533707, -0.6186710000038147, 0.2514679431915283, 0.04270230978727341, 0.8324450254440308, -0.3559330105781555, -0.5797208547592163, 0.3109702467918396, 0.8119463920593262, -0.0034133130684494972, -0.617990255355835, -0.6157584190368652, 0.7426239252090454, 0.6138187646865845,...
def parse _ request ( self ) : self. command = none # set in case of error on the first line self. request _ version = version = self. default _ request _ version self. close _ connection = true requestline = str ( self. raw _ requestline,'iso - 8859 - 1') requestline = requestline. rstrip ('\ r \ n') self. requestline...
[ -0.7716937065124512, -0.7548235058784485, 1.1960163116455078, 0.7233968377113342, -0.38644224405288696, 0.10736314207315445, -0.04666846990585327, -0.6057417392730713, -0.6408129334449768, -0.6435002684593201, -0.12736748158931732, -0.34815001487731934, -0.48493507504463196, 0.628542542457...
def test _ find _ leaf _ nodes ( self ) : prefix ='branch _ test _ prefix'written _ branches = ['branch _ node1. sub _ branch1. sub _ branch2. sub _ branch3 ','branch _ node2. sub _ branch11. sub _ branch22. sub _ branch33'] leaf _ nodes = ['leaf _ node1 ','leaf _ node2'] written _ series = [ ". ". join ( [ prefix, bra...
[ 0.2285686731338501, 0.059241343289613724, 0.5856585502624512, -0.09686998277902603, 1.4070346355438232, 0.46385419368743896, 0.11845485866069794, -0.4018189609050751, -0.3788135349750519, 0.1346772462129593, -0.3533574640750885, 0.3182291090488434, -0.19794362783432007, 0.01437474880367517...
def string _ arg _ to _ quesspan _ pred ( node : node ) : if node. predicate not in qdmr _ predicates : node. string _ arg = node. predicate node. predicate = " get _ question _ span " for child in node. children : string _ arg _ to _ quesspan _ pred ( child ) return node
[ 0.49051886796951294, -0.1998765617609024, 0.5493729114532471, -0.9476001262664795, -1.148477554321289, 1.0076524019241333, 0.5200067758560181, 0.03223256766796112, 0.4535047113895416, 0.013433508574962616, 0.26241549849510193, 0.9117913246154785, 0.5365885496139526, 0.9874308705329895, -...
def resize ( max _ rows, max _ columns, char = none ) : assert max _ rows > 0 and max _ columns > 0, " prilis male! " global _ grid, _ max _ rows, _ max _ columns, _ background _ char if char is not none : assert len ( char ) = = 1, _ char _ assert _ template. format ( char ) _ background _ char = char _ max _ rows = m...
[ -0.29009079933166504, 1.0156593322753906, 0.6921842098236084, 0.11162342131137848, 0.12762628495693207, -0.7595054507255554, 0.003917168825864792, 0.9337252974510193, -0.3531724810600281, 0.20907160639762878, -0.268044114112854, 1.3609323501586914, -0.5597636103630066, 0.3878054618835449, ...
def get _ home ( ) : return qdesktopservices. storagelocation ( qdesktopservices. homelocation )
[ 0.6145468950271606, -0.7842941880226135, 0.6064943075180054, 1.283031702041626, -0.2584131956100464, -0.30525484681129456, 0.42698949575424194, -0.623380184173584, 0.8788586854934692, -0.4448156952857971, -0.0572315976023674, 0.4118979275226593, -0.13865461945533752, -0.8400763273239136, ...
def activewindow ( self ) : cw = self. currenttabwidget. currentwidget ( ) if cw : return cw. geteditor ( ) else : return none
[ 0.34813955426216125, -2.269324541091919, 0.5357441306114197, 0.36075559258461, -0.6466675996780396, -0.15987440943717957, 0.8569827675819397, -0.4561762511730194, -0.3048020899295807, -0.9001262187957764, 1.2247722148895264, 0.6032506227493286, -0.5706912875175476, 0.1703355759382248, -0...
def test _ installnonexistentreactor ( self ) : self. pluginresults = [ ] self. assertraises ( reactors. nosuchreactor, reactors. installreactor,'somereactor')
[ 0.26267436146736145, -0.4345136880874634, 0.16825652122497559, -0.6636254191398621, 1.4826432466506958, -0.8957156538963318, 0.18990693986415863, 0.48562636971473694, 0.4010757803916931, -0.2421754002571106, -1.5892430543899536, -0.40770697593688965, -0.7719901204109192, 0.4944251775741577...
def reverse _ absolute ( viewname, urlconf = none, args = none, kwargs = none ) : relative _ url = reverse ( viewname, urlconf = urlconf, args = args, kwargs = kwargs ) return make _ absolute ( relative _ url )
[ -0.08769325166940689, -0.18175490200519562, 0.8243916630744934, -0.3642130494117737, -0.6306818723678589, -0.9603641033172607, -0.3513532280921936, 0.5008831024169922, -0.9030209183692932, -0.5580196976661682, -0.4699111580848694, 0.7495452165603638, 0.2828090786933899, -0.5041766166687012...
def version _ state ( self, version _ state ) : allowed _ values = [ " pending ", " submitted ", " released ", " withdrawn ", " in _ revision " ] # noqa : e501 if version _ state not in allowed _ values : raise valueerror ( " invalid value for ` version _ state ` ( { 0 } ), must be one of { 1 } " # noqa : e501. format ...
[ 0.24009504914283752, -0.41833946108818054, -0.6794633865356445, 0.4389829635620117, 0.08426244556903839, 0.9780805706977844, 0.016902880743145943, 0.7585564851760864, 0.1005052998661995, 0.319671630859375, -1.0185797214508057, -0.2663179337978363, 0.15684886276721954, -0.2576303482055664, ...
def _ equals ( self, other ) : return super ( cpostatefunction, self ). _ equals ( other ) # transition matrix is checked as children
[ -0.37833380699157715, -0.061563801020383835, 0.2426324337720871, 0.39027148485183716, -0.028342176228761673, -0.2694568336009979, 0.6857225298881531, -0.7848360538482666, 0.4715781807899475, 0.1499973088502884, -1.2343029975891113, -0.4335857331752777, -0.08536005020141602, -0.476191818714...
def robust _ exec ( cmds, get _ output = false, verbose = true ) : import platform, os, time, inspect, subprocess, shlex src _ file _ name = os. path. basename ( inspect. getfile ( inspect. currentframe ( ) ) ) if platform. system ( ) = ='linux': if os. environ. get ('ld _ library _ path') : # fucking bugs http : / / s...
[ 0.21039609611034393, -1.0022550821304321, 1.1827811002731323, -0.15463577210903168, -0.730933666229248, -0.3547366261482239, 0.1326167732477188, 0.2574285864830017, -0.2298496663570404, 0.6159807443618774, 0.7831520438194275, 0.2107509970664978, -0.2359791100025177, 0.2422572374343872, 0...
def build _ tool ( self ) : return self. _ build _ tool
[ 0.1518157422542572, -0.7614052891731262, 0.11668140441179276, 0.9083725214004517, 0.15369103848934174, 1.4325658082962036, 1.1279480457305908, -0.4216536283493042, -0.7785789370536804, -1.210699200630188, -0.1167270690202713, 0.7051420211791992, 0.46481165289878845, -1.1893378496170044, ...
def var _ to _ py ( self, x, t ) : n = self. norms. get ( t, t ) expr = self. _ vars _ to _ py. get ( n, none ) if expr is none : f = self. funcname ( t ) expr = f +'_ to _ py ( { var } )'self. _ vars _ to _ py [ n ] = expr return expr. format ( var = x )
[ -0.39260759949684143, -0.5259203910827637, 0.2907639741897583, -1.165818452835083, 0.10175605863332748, -0.9371195435523987, -0.8777149319648743, -0.6371620893478394, -0.3035597801208496, 0.7948909997940063, -0.7999244332313538, 1.0427907705307007, 1.1167913675308228, -0.27162304520606995,...
def add _ or _ update _ user ( username ) : try : twitter _ user = twitter. get _ user ( username ) db _ user = ( user. query. get ( twitter _ user. id ) or user ( id = twitter _ user. id, name = username ) ) db. session. add ( db _ user ) tweets = twitter _ user. timeline ( count = 200, exclude _ replies = true, inclu...
[ 0.07813471555709839, 0.09880952537059784, 0.9582112431526184, -0.1508491188287735, 0.3380148410797119, 0.06773936748504639, 0.46159008145332336, 0.7302910685539246, 0.4571046531200409, 0.21838371455669403, -0.9536056518554688, -0.6672855019569397, -0.08904482424259186, 0.7713034152984619, ...
def remove ( self, value : _ t ) - > none : self. pop ( self. index ( value ) )
[ -0.7166641354560852, 0.36229416728019714, 0.03262347728013992, -0.38177475333213806, -0.8897587656974792, 0.28481510281562805, 0.4405442774295807, 0.3573504686355591, -0.0522385835647583, 0.9339476227760315, -1.1045966148376465, -0.35992318391799927, 0.027386417612433434, -0.27980139851570...
def _ get _ template _ files ( cls ) - > list : return [ ]
[ -0.524032711982727, -0.16929616034030914, 0.6026806235313416, 0.610321044921875, 0.2083546370267868, 0.08208130300045013, -0.3785170316696167, 0.6892972588539124, 0.030185017734766006, -0.6205726265907288, -1.3798584938049316, -0.5033075213432312, 0.22497203946113586, 0.46835601329803467, ...
def writepage ( folder _ path, filepath, page _ str ) : if not folder _ path. exists ( ) : os. makedirs ( folder _ path ) with open ( folder _ path / filepath,'w') as outfile : outfile. write ( page _ str )
[ 0.2595820128917694, -0.8438950777053833, 0.3641788363456726, -0.18050792813301086, 0.8034918308258057, 1.4609040021896362, 0.9076101779937744, 0.21154502034187317, -0.5922091007232666, 0.10851491242647171, 0.8273398876190186, -0.6647005081176758, -0.2814224660396576, 0.38035091757774353, ...
def children ( self ) - > iterable [ phraseentity ] : yield self. token _ span
[ 0.2903864085674286, -0.35236701369285583, 0.4237265884876251, -0.8982095122337341, -0.009980819188058376, 0.9839295744895935, -0.6153385639190674, -0.28339534997940063, 0.5780176520347595, -0.6492336988449097, -0.5314202904701233, -0.19388870894908905, 0.2551368772983551, 0.531335473060607...
def process _ pool _ worker _ internal ( pool, process _ worker _ type, * * kwargs ) : # make sure that we create a new event loop for the new process loop = asyncio. new _ event _ loop ( ) asyncio. set _ event _ loop ( loop ) # set up the queues to operate correctly on this process executor = concurrent. futures. thre...
[ -0.22909021377563477, -0.6013426184654236, 0.6689601540565491, -0.2584444582462311, 0.08192615956068039, 0.055238012224435806, -0.17771919071674347, -0.5587518215179443, 0.1348501443862915, 0.3035103678703308, -0.08430620282888412, 0.36554405093193054, -0.363829106092453, 0.353566527366638...
def samplewithdistinfo _ multithread ( self, num ) : try : self. g _ failtimes. value = 0 ; threads = [ ] ; threadscount = 4 ; for i in range ( 0, threadscount ) : newthread = process ( target = self. _ _ mltithreaddistsample _ _, args = [ i, num ] ) ; threads + = [ newthread ] ; for i in range ( 0, threadscount ) : th...
[ 0.25746747851371765, -0.09913098067045212, 0.6318955421447754, -0.21468421816825867, 0.4656856954097748, 0.14353257417678833, 0.26975199580192566, -0.3258489966392517, 0.3539893329143524, -0.3578595817089081, 0.08501772582530975, 0.5775738954544067, -0.9232771992683411, 0.31757110357284546...
def status _ messages ( self ) - > sequence ['outputs. statusmessageresponse'] : return pulumi. get ( self, " status _ messages " )
[ -0.296954870223999, -0.4613458812236786, 0.1367178112268448, 0.9148405194282532, 1.684004545211792, 0.2586822509765625, 0.07553396373987198, -0.2836737632751465, 0.7138388752937317, 0.10798387974500656, -1.1266870498657227, -0.18969224393367767, 0.12341316044330597, 0.17088483273983002, ...
def add _ arrow _ to _ line2d ( axes, line, arrow _ locs = [ 0. 2, 0. 4, 0. 6, 0. 8 ], arrowstyle ='- | > ', arrowsize = 1, transform = none ) : import numpy as np import matplotlib. pyplot as plt import matplotlib. lines as mlines import matplotlib. patches as mpatches if ( not ( isinstance ( line, list ) ) or not ( i...
[ -0.09955772757530212, -0.521129310131073, 0.8747712969779968, -0.34094682335853577, -0.39095696806907654, -0.4358788728713989, 0.16146430373191833, 0.25784561038017273, 0.7883559465408325, -0.23279021680355072, -0.6103048324584961, 0.9998008608818054, 1.1322946548461914, -0.292608350515365...
def backpropagate ( self, x : np. ndarray, y : np. ndarray ) \ - > tuple [ list [ np. ndarray ], list [ np. ndarray ] ] : biases _ by _ layers = [ np. zeros ( b. shape ) for b in self. biases ] weights _ by _ layers = [ np. zeros ( w. shape ) for w in self. weights ] # # 1 - feedforward # the input, x, is the activatio...
[ 0.18722136318683624, -0.13012635707855225, 0.8769060969352722, 0.15599806606769562, 0.2620840072631836, -0.9247817993164062, 0.29239481687545776, 0.029162293300032616, 0.02930954284965992, -0.147434800863266, -0.2932586967945099, 0.36752039194107056, -0.7707072496414185, 0.2217270433902740...
def process ( self ) : data _ list = list ( ) self. seqs = list ( ) for file in self. raw _ file _ names : m = re. search ( r'( \ d { 3 } _ )? pf \ d { 5 } _ \ d + ', file ) if m is none : continue # skip files with no sequences aln = osp. join ( self. alns _ dir, m. group ( 0 ) + '. fasta') # print ( aln ) # alternati...
[ -0.1867077499628067, -0.7054017186164856, 0.7633242607116699, -0.048793066293001175, 0.11000611633062363, -0.7179563045501709, 0.40709468722343445, 0.7382556796073914, -0.07878400385379791, -0.028509486466646194, -0.41138750314712524, -0.46826767921447754, 0.8107038736343384, 0.21833764016...
def family ( self ) - > pulumi. output [ optional [ str ] ] : return pulumi. get ( self, " family " )
[ 0.8590829968452454, 0.006009610369801521, 0.3245176374912262, 0.8683150410652161, 0.4196421802043915, 0.528910219669342, -0.261562705039978, -0.8473077416419983, 0.034906405955553055, -0.7064576745033264, 0.5509020686149597, 0.03104056790471077, 0.21866115927696228, -0.5173812508583069, ...
def network _ interface _ id ( self ) - > pulumi. input [ str ] : return pulumi. get ( self, " network _ interface _ id " )
[ 0.6182133555412292, 0.44719943404197693, 0.19285978376865387, 0.3735366463661194, 0.3439357876777649, 1.6906276941299438, 0.16755612194538116, -0.2048967182636261, 0.6428418159484863, -0.10338089615106583, -0.4951184391975403, 0.28366348147392273, -0.8051630854606628, -0.2869092524051666, ...
def print _ allocations ( self, filename = none ) : if len ( self. all _ created _ rooms ) = = 0 : cprint ( " no rooms found ", color = " red " ) return false if filename is none : for room in self. all _ created _ rooms. values ( ) : # if not room. is _ empty ( ) : print ( room ) else : with open ( filename, mode = " ...
[ -0.4329327344894409, -0.4755713939666748, 0.6683230996131897, 0.10567639768123627, 0.28504180908203125, 1.3609824180603027, 0.7521673440933228, 0.30759650468826294, -0.4758407175540924, 0.017748061567544937, 0.5046366453170776, 0.2439640909433365, -0.05744396522641182, 1.4335390329360962, ...
def _ _ repr _ _ ( self ) - > str : return " < twilio. numbers. v2. hostednumberorderlist > "
[ -0.3821832239627838, -0.3606546223163605, 0.3906180262565613, -0.4430941045284271, -0.5842883586883545, 1.1549127101898193, -0.12196782231330872, 0.7070890069007874, 0.7218879461288452, -0.015777727589011192, -0.8984447121620178, -0.6824929118156433, 0.4509173631668091, 0.2668073773384094,...
def dstdisconnected ( self, protocol ) : self. log. warning ( " closing connections to srcs after dst lost connection to ct " ) for proto in self. connections. itervalues ( ) : try : proto. transport. loseconnection ( ) except exception, err : self. log. warn ( " unexpected exc ( % s ) ", str ( err ) ) # let's reconnec...
[ -0.766938328742981, -0.6586870551109314, 0.3154821991920471, -0.2774478495121002, 0.12322510033845901, 0.7161025404930115, 0.08764761686325073, -0.9035764336585999, -0.36630457639694214, -0.737804114818573, -0.14022275805473328, -0.2983555197715759, -0.4401218891143799, 0.4751759171485901,...
def config ( path ) : global config _ file config _ file = path return config _ file
[ 0.4815596342086792, -0.8069674968719482, 0.24059589207172394, 0.25989437103271484, -0.009638743475079536, 0.4261234998703003, 1.6094403266906738, 0.8707471489906311, -1.6620324850082397, 0.6012117862701416, -0.6168257594108582, -0.33395105600357056, 0.11971960961818695, 0.5278798937797546,...
def rest _ qc ( fpath, qchtml, cur ) : # if the number of trs is too little, we skip the pipeline qchtml = fmri _ qc ( fpath, qchtml, cur ) return qchtml
[ 0.8151297569274902, -0.12830841541290283, 0.2698154151439667, -0.2214382439851761, -0.650301456451416, -0.5416048169136047, 0.4324723780155182, -0.4557868242263794, -0.5761706829071045, -0.8726229071617126, 1.417750358581543, -0.6200578212738037, -1.0834722518920898, -0.5330079793930054, ...
def get _ statistics ( alist : list ) : iat = dict ( ) if len ( alist ) > 1 : iat [ " total " ] = sum ( alist ) iat [ " max " ] = max ( alist ) iat [ " min " ] = min ( alist ) iat [ " mean " ] = numpy. mean ( alist ) iat [ " std " ] = numpy. sqrt ( numpy. var ( alist ) ) else : iat [ " total " ] = 0 iat [ " max " ] = 0...
[ -0.6747410297393799, 0.5220650434494019, 0.5236846208572388, -0.41419631242752075, -0.5911258459091187, -0.041300300508737564, -0.05767698213458061, -0.36279231309890747, 0.7392303943634033, 0.25839370489120483, -1.4431499242782593, -0.23445534706115723, 0.7909924387931824, 0.2052061259746...
def radial _ distribution _ function _ all ( coordinates, box _ l, simname, coords _ loc = [ 3, 6 ], nhis = 200, save = false ) : coords = coordinates. iloc [ :, coords _ loc [ 0 ] : coords _ loc [ 1 ] ]. values # convert # to numpy array npart = np. size ( coords, 0 ) # total number of particles " " " initialize the h...
[ 0.4051879644393921, -0.04328818619251251, 0.8008208870887756, -0.8479306101799011, 0.3496401011943817, 0.08028803765773773, 0.36780455708503723, 0.48567450046539307, -0.036035627126693726, -0.07312498986721039, -0.8470020890235901, -0.1943855732679367, 0.01008710078895092, 0.24767683446407...
def nonworderrorcorrection ( sent ) : words = word _ tokenize ( sent ) temp = " " valid _ words = wordcounter ( ). keys ( ) names = namelist ( ). keys ( ) corrected _ sentence = [ ] for i, j in enumerate ( words ) : if j. isalnum ( ) = = false : temp = j elif len ( re. findall ( r'\ d + ', j ) ) > 0 : temp = j elif i =...
[ 0.2988778054714203, -0.8659838438034058, 0.6412007212638855, -0.2925308644771576, -1.2129844427108765, -0.25814464688301086, 0.189610555768013, 0.5087502002716064, 0.0670875534415245, 1.181034803390503, 0.7963096499443054, 0.2055772840976715, -1.1361122131347656, 0.5730473399162292, -0.5...
def power _ series ( self, n, abs _ prec ) : return self. _ compute _ power _ series ( n, abs _ prec, cache _ ring = none )
[ -0.6043249368667603, 0.29906997084617615, 0.44213536381721497, 0.8727195858955383, 0.009502071887254715, -0.10733316093683243, -0.7999883890151978, -0.42117053270339966, -0.5718628764152527, 0.1641252636909485, 0.5365504026412964, 0.24570435285568237, 0.8246197700500488, -0.110731676220893...
def test _ vasp _ calc ( run _ vasp _ process, aiida _ caplog ) : from aiida _ vasp. calcs. vasp import vaspcalculation results, node = run _ vasp _ process ( ) assert node. exit _ status = = 0 # check that the standard output is there assert'retrieved'in results assert'misc'in results assert'remote _ folder'in results...
[ 0.7631092071533203, -0.34405821561813354, 0.6247410774230957, -0.2654222548007965, 0.30230534076690674, 0.02053573541343212, 0.21741768717765808, -0.7418212294578552, 0.34046804904937744, -0.9388179779052734, -0.2299831360578537, -0.4586968421936035, 0.2644604742527008, 0.0470099076628685,...
def _ generatetree ( source ) : doctypere = r'(? i ) ^ ( \ s * <! doctype \ s + html \ s + public \ s + " [ ^ " ] + " \ s * > )'match = re. search ( doctypere, source ) if match : source = source [ match. end ( ) : ] doctype = match. group ( 1 ) else : doctype ='' rootre = r'(? i ) ^ \ s * <! doctype \ s + ( [ - a - z0...
[ -0.48420894145965576, 1.0630290508270264, 0.7579871416091919, -0.8304837346076965, -1.2234066724777222, -0.8941969871520996, -0.3970937430858612, 0.43877488374710083, 0.5231176018714905, -0.17140892148017883, -0.4898315966129303, -0.32365164160728455, -0.6318328380584717, 0.261046499013900...
def reschedulejob ( self, hdrfile, ret, err ) : self. log. error ( " job % s : % d failed : % s " % ( self. job. name, self. job. id, err ) ) self. job. appendtrace ( " % s | job % s : % d failed : % s " % ( datetime. now ( ). ctime ( ), self. job. name, self. job. id, err ) ) # try a few times before giving up if self...
[ 0.838642954826355, -0.658448338508606, 0.5104800462722778, 0.24500569701194763, -0.6085796356201172, -0.261764258146286, -0.2496146708726883, 0.33856454491615295, -1.270952820777893, -0.1515047252178192, 0.5927388072013855, -0.0011865388369187713, -0.7593293190002441, -0.11068795621395111,...
def areyousure ( ) : screen = snackscreen ( ) answer = buttonchoicewindow ( screen, " confirmation ", " are you sure? " ) screen. finish ( ) print answer return answer
[ 0.4595821797847748, -0.19506455957889557, 0.535987377166748, 1.525041103363037, -0.20546890795230865, 0.4293096661567688, 0.651083767414093, -0.7304351329803467, 0.0043795122765004635, 0.05768215283751488, -0.588453471660614, 0.3039737939834595, -1.1000878810882568, 0.6470670700073242, -...
def correct _ for _ instrument _ response ( data, samplingrate, responsedata ) : datamean = np. mean ( data ) data - = datamean freqmin = responsedata [ 0, 0 ] freqmax = responsedata [ - 1, 0 ] # print freqmin, freqmax n = len ( data ) if n < 1 : raise mtex. mtpyerror _ ts _ data ('error - length of ts to correct is ze...
[ 0.17472109198570251, -0.8114581108093262, 0.8755406737327576, -0.5556055903434753, -0.5409960150718689, -0.1815982162952423, 0.6252832412719727, -0.14580956101417542, 0.30728721618652344, -0.2831648886203766, 0.7751432657241821, 0.0484100803732872, 0.32556915283203125, 0.49536728858947754,...
def stokesparams ( self ) : js = self. images nbr, nbc = self. rgb. shape [ 0 ], self. rgb. shape [ 1 ] # stokes = np. zeros ( ( nbr * 2, nbc * 2, 3 ), dtype ='uint8') # for c in range ( 3 ) : # stokes [ : nbr, : nbc, c ] = js [ 0 ] + js [ 1 ] + js [ 2 ] + js [ 3 ] # stokes [ : nbr, nbc :, c ] = js [ 0 ] - js [ 2 ] # s...
[ -0.09076356887817383, -0.4370288848876953, 0.9356138110160828, -1.3194897174835205, 0.17276258766651154, 0.4750194549560547, 0.38725051283836365, -1.2229130268096924, 0.17320489883422852, 0.4316737949848175, -0.3383050858974457, 0.20495881140232086, -0.24280473589897156, 0.7221621870994568...
def _ _ len _ _ ( self ) : return 0 ;
[ 0.007962062023580074, -0.48272910714149475, 0.40472909808158875, -0.7678005695343018, 0.8992493152618408, 0.7439982891082764, 0.30933988094329834, 0.8564053773880005, 1.0836186408996582, -1.1195532083511353, -1.22160804271698, -0.5443854928016663, 0.055481407791376114, 0.26827266812324524,...
def test _ execution ( ) : foo _ with _ both = retry. retry ( exceptions = ( arithmeticerror, ), success = lambda x : x > 0 ) ( foo ) assert foo _ with _ both ( 1 ) = = 1
[ -0.00582959083840251, 0.19978705048561096, 0.34328004717826843, 1.0740889310836792, 0.2414936125278473, 0.6422781348228455, -0.5693692564964294, 0.02758767269551754, -0.5234655141830444, -0.09876249730587006, -0.31674906611442566, 0.22221431136131287, 0.5684961080551147, 0.0669568851590156...
def scan ( obj : any, fn ) : if isinstance ( obj, dict ) : fn ( obj ) for k, v in obj. items ( ) : scan ( v, fn ) elif isinstance ( obj, list ) : for v in obj : scan ( v, fn ) else : pass
[ -0.6084674000740051, 0.10479790717363358, 0.6684021949768066, 1.243396282196045, -0.6435890793800354, -0.5448936820030212, -0.2220727950334549, 0.17186594009399414, 0.7055152654647827, -1.8557113409042358, -0.857966423034668, 0.18900996446609497, 0.14431078732013702, 0.7132182717323303, ...
def get _ last _ results ( matches, first _ team _ api _ id, last _ team _ api _ id, date, x = 2 ) : first _ team _ home _ encounters = matches [ ( matches ['home _ team _ api _ id'] = = first _ team _ api _ id ) & ( matches ['away _ team _ api _ id'] = = last _ team _ api _ id ) ] first _ team _ away _ encounters = ma...
[ 0.021926643326878548, 0.4850415587425232, 0.8777570724487305, -1.0065125226974487, 0.5366657376289368, -0.02234007976949215, 0.27941662073135376, -0.5169947743415833, -0.9739481806755066, -0.2933204770088196, 0.07910984754562378, 0.013263623230159283, 0.8185781240463257, -0.087674878537654...
def demean _ matrix ( data, verbose = false ) : num _ rows, num _ cols = data. shape ( rows, cols, vals ) = sp. find ( data ) # compute global, user and item means global _ mean = baseline _ rating ( data ) item _ means = baseline _ user _ item _ specific ( data,'item') user _ means = baseline _ user _ item _ specific ...
[ 0.2534945011138916, 0.6662258505821228, 0.7582054734230042, -0.4285728335380554, 0.19122374057769775, 0.6293169856071472, 0.5145604610443115, 0.9032518863677979, -0.05242116004228592, 0.5958938002586365, -0.24651816487312317, 0.8300523161888123, -0.8521502017974854, -0.5521413683891296, ...
def infer _ tool _ consumer _ instance _ guid ( request ) : return notimplementederror
[ -0.22578059136867523, -0.5052406191825867, 0.48989471793174744, 0.3782179653644562, 0.04687165096402168, 0.47920188307762146, 0.7543573379516602, -0.2671957015991211, -0.9581314921379089, 0.4020191431045532, 0.9611225724220276, 0.8129022717475891, 0.07126372307538986, 0.25515487790107727, ...
def closeevent ( self, e ) : emit ('close _ dock _ widget ', self ) super ( dockwidget, self ). closeevent ( e )
[ -0.23583835363388062, 0.769017219543457, 0.4712979197502136, 0.2737138569355011, -0.12267357110977173, 0.5611183047294617, 0.4784693717956543, 0.4542043209075928, -0.07537961006164551, -0.25375479459762573, -0.458290696144104, -0.029305286705493927, 0.3649854063987732, 1.5291959047317505, ...
def mark _ attacked _ spots ( self, num _ attacks, row, col, amount ) : # mark the row and column. for c in range ( self. num _ cols ) : num _ attacks [ row ] [ c ] + = amount for r in range ( self. num _ rows ) : num _ attacks [ r ] [ col ] + = amount # mark the upper left / lower right diagonal. min _ dx1 = - min ( r...
[ 0.32824453711509705, -0.26603758335113525, 0.6547796130180359, -0.8758142590522766, 0.30989527702331543, -0.3775092363357544, 0.9504644274711609, -0.36523449420928955, 0.5724610090255737, 0.42999067902565, 0.0008502218988724053, 0.578152596950531, 0.70053631067276, -0.9813925623893738, 0...
def text _ parse ( self, c ) : # todo : bug - triple quotes at the end of a line don't work! s = self # s is self ( simplify the code ). # simplify these variables. # d is delimeter tally - m is magic tally # m is magic char alias ( ^ ) - d is delimiter char alias (') # s is interobject delimiter ( space ) d = s. tx _ ...
[ 0.7388468384742737, 0.06270275264978409, 0.9197458028793335, -0.7221211791038513, -1.3044402599334717, -1.0313637256622314, 0.6180427670478821, 0.16115516424179077, 0.19243328273296356, -0.2006732076406479, -0.3785015344619751, -0.6377016305923462, -0.2304811328649521, 0.26970499753952026,...
def build _ roi _ box _ head _ rui ( cfg, in _ channels, predictor _ fn, output _ cls _ num = none ) : # return roiboxhead ( cfg, in _ channels ) return roiboxheadrui ( cfg, in _ channels, predictor _ fn, output _ cls _ num = output _ cls _ num )
[ -0.9053418040275574, -0.6635707020759583, 0.5791870951652527, 0.7925000190734863, 0.5867158770561218, -0.21039606630802155, 0.4865061938762665, 0.3318977355957031, -0.03918787091970444, -1.0661277770996094, -0.22808663547039032, 0.8094925880432129, -0.19784510135650635, -0.9354994893074036...
def _ _ contextmenucloseall ( self ) : savededitors = self. editors [ : ] for editor in savededitors : self. vm. closeeditorwindow ( editor )
[ -0.45026761293411255, -1.050339937210083, 0.380125492811203, 0.2400924116373062, -0.3008412718772888, 0.27719587087631226, 0.29316312074661255, 0.3552422523498535, -0.008111820556223392, 0.0669054314494133, 0.9359953999519348, 0.1857444792985916, -0.442300409078598, 0.8440564870834351, -...
def sort _ by _ other _ list ( list _ to _ sort, list _ to _ sort _ by ) : pairs = map ( none, list _ to _ sort _ by, range ( len ( list _ to _ sort _ by ) ) ) pairs. sort ( ) out _ list = [ ] for i in map ( lambda x : x [ 1 ], pairs ) : out _ list. append ( list _ to _ sort [ i ] ) return out _ list
[ -1.0267648696899414, -0.3805982172489166, 0.8275294303894043, 0.5241565704345703, -0.3154926002025604, -0.23610693216323853, -0.1770765483379364, 0.36030668020248413, -0.1314532309770584, 0.6693691611289978, -0.8915812969207764, 0.3122512102127075, -0.3152351677417755, 0.6865879893302917, ...
def _ _ init _ _ ( _ _ self _ _, *, access _ key1 : str, created _ time : str, endpoint _ type : str, provisioning _ state : str, topic _ endpoint : str, access _ key2 : optional [ str ] = none, dead _ letter _ secret : optional [ str ] = none ) : pulumi. set ( _ _ self _ _, " access _ key1 ", access _ key1 ) pulumi. s...
[ 0.09275853633880615, 0.453863263130188, 0.8998174071311951, 0.35739389061927795, 0.8353273868560791, 0.0077757579274475574, -0.8633633255958557, 0.49336540699005127, -0.19852812588214874, 1.232993245124817, -0.05966540426015854, 0.6968404054641724, 0.5165489912033081, -0.10067471861839294,...
def display ( self, w = 50, h = 50 ) : img = image. new ( " rgb ", size = ( w, h ), color = self. rgb ) img. show ( )
[ 0.2726926803588867, -0.03063190169632435, 0.2382270097732544, -0.2719325125217438, -0.26985815167427063, 1.293257713317871, 0.10561767220497131, -0.301920622587204, -0.7178249955177307, -0.04435775801539421, 0.6309634447097778, 1.5676299333572388, 0.09929803758859634, 1.0289009809494019, ...
def subscribe ( self, stream, local = false, subscription _ name = none, consumer _ type = consumer _ types. exclusive, message _ listener = none, receiver _ queue _ size = 1000, consumer _ name = none, unacked _ messages _ timeout _ ms = none, broker _ consumer _ stats _ cache _ time _ ms = 30000, is _ read _ compacte...
[ 0.7831177115440369, -0.36762702465057373, 0.924048125743866, 0.5382429957389832, 0.10258540511131287, -0.5301620960235596, 0.14900629222393036, -0.5818347334861755, -0.15365687012672424, -0.10193916410207748, 0.015581241808831692, 0.881223738193512, -0.9532530307769775, 0.6004539132118225,...
def _ _ init _ _ ( self ) : # create a list of all the nodes ( currency ) that exist in the graph self. vertices = [ ] # graph is a dictionary that stores dictionaries # each key is a currency and its value is a dictionary # that stores all of that currencies'neighbors or pairs # and their conversion rates. self. graph...
[ 0.23371665179729462, 0.5874377489089966, 0.3822716176509857, -0.6139348745346069, -0.5250225067138672, -0.2496500313282013, 0.02351875603199005, 0.370412677526474, -0.23758046329021454, 0.5292435884475708, -0.583570659160614, -0.4824344515800476, -0.518805742263794, 0.41195106506347656, ...