text
stringlengths
25
2.19k
embedding
listlengths
768
768
def print _ tree ( self, * * options ) : _ nodepp. _ print _ tree _ helper ( self, 0, " ", [ none ], - 1, * * options )
[ 0.05778087303042412, 0.7552450895309448, 0.5852820873260498, 0.17511489987373352, 0.8101691007614136, -0.20968091487884521, -0.18852713704109192, -0.5049170851707458, -0.4772768020629883, -0.38841575384140015, 0.46163487434387207, 1.0718125104904175, -1.0468058586120605, 0.3627137541770935...
def prettyprint ( dct : dict ) : max _ key _ len = max ( [ len ( str ( key ) ) for key in dct. keys ( ) ] ) for key in sorted ( dct. keys ( ) ) : print ( key,'' * ( max _ key _ len - len ( str ( key ) ) ) +': ', dct [ key ] )
[ 0.11359294503927231, 0.19952228665351868, 0.6596593260765076, -1.1959211826324463, -0.8676672577857971, 0.6286372542381287, -0.4379135072231293, -0.2664377987384796, -0.15888099372386932, 0.674497663974762, -0.20250356197357178, 0.230116069316864, 0.9213576316833496, 0.4457795023918152, ...
def prob _ round ( x ) : floor = math. floor ( x ) if random. random ( ) < x - floor : floor + = 1 return floor
[ 0.29628708958625793, 0.3118070960044861, 0.413800448179245, -0.3607749938964844, -0.6294517517089844, 1.2975550889968872, 0.6809371113777161, -1.3541659116744995, 0.20178326964378357, -0.6985494494438171, 0.5141431093215942, 0.33301758766174316, -0.5116528272628784, 0.878503143787384, 0....
def port ( self ) : # most simple way is using ps and grep. this method here is to make sure this can be used on windows if self. _ port : return self. _ port cmd = ".. / platform - tools / adb devices " p = subprocess. popen ( cmd, shell = true, stderr = subprocess. stdout, stdout = subprocess. pipe ) out, err = p. co...
[ -0.11795414984226227, 0.11936124414205551, 0.88105309009552, 0.4531768560409546, -0.12510760128498077, -0.3063748776912689, 1.4907243251800537, -0.781076192855835, -0.5576595067977905, -0.19778166711330414, 0.5982518792152405, 0.1843033730983734, -0.3715941607952118, 0.5749807357788086, ...
def smartsplit ( string, sep ) : assert string is not none # or shlex will read from stdin if not six. py3 : # on 2. 6, shlex fails miserably with unicode input is _ unicode = isinstance ( string, unicode ) if is _ unicode : string = string. encode ('utf8') l = shlex. shlex ( string, posix = true ) l. whitespace + = ',...
[ 0.10358621925115585, -0.3973836600780487, 0.6350302696228027, 0.4621913433074951, -0.19475217163562775, 0.03266982361674309, -1.0335992574691772, 0.7600581645965576, 0.9984713196754456, 0.021520474925637245, 0.1721455305814743, 0.48655450344085693, -0.05696514621376991, -0.4444161355495453...
def max _ pool _ 2x2 ( x ) : return tf. nn. max _ pool ( x, ksize = [ 1, 2, 2, 1 ], strides = [ 1, 2, 2, 1 ], padding ='same')
[ 0.06165057048201561, -0.4776383638381958, 0.5579634308815002, 0.8183771967887878, -0.9918001890182495, 0.20251469314098358, -0.38431060314178467, -0.5829987525939941, 0.2791588008403778, 0.03224732726812363, -1.0961121320724487, 0.6590511798858643, 0.9237861037254333, -0.4474262297153473, ...
def _ check _ arg _ interval ( arg, name ) : # check default interval if arg is none : return default _ interval # check single value if is _ int ( arg ) : assert interval _ min < = arg < = interval _ max, " argument'{ }'should be in [ interval _ min, interval _ max ] ". format ( name ) return arg, arg assert isinstanc...
[ -0.5050932765007019, -0.5228487849235535, 0.6078368425369263, 0.3912799656391144, -0.2650938332080841, 1.239579200744629, 0.1697307676076889, 0.40779128670692444, -0.6021400094032288, 0.628009557723999, -0.13935300707817078, 0.5196595788002014, -0.8463962078094482, 0.38488057255744934, 0...
def added _ owners ( self, target ) : # type : ( udmofficegroup ) - > set [ udmofficeuser ] added, _ = self. owners _ changes ( target ) return added
[ -1.397891640663147, 0.5698272585868835, 0.3741271197795868, -0.08787579089403152, 0.03842729330062866, -1.042587399482727, -0.41799962520599365, -1.082581639289856, 0.452865332365036, -0.43250706791877747, -0.0717213824391365, 0.7744819521903992, 0.09977670013904572, -0.3325091004371643, ...
def kill _ player ( self ) : global high _ score if self. _ player _ dino. is _ dead : return self. _ player _ dino. is _ dead = true self. _ player _ dino. is _ ducking = false self. is _ game _ over = true self. finished = true if self. _ player _ dino. score > high _ score : high _ score = self. _ player _ dino. sco...
[ -0.5348710417747498, -0.6504131555557251, 0.6307911276817322, 1.5872694253921509, 1.1341078281402588, 0.2214757800102234, 0.10607833415269852, -0.3958320915699005, -0.3737447261810303, 1.2514514923095703, -0.2116260677576065, 0.06955020129680634, 0.2914806604385376, 0.16936106979846954, ...
def _ run _ one _ fire ( self ) : # set fire propagation matrix if not already defined if not hasattr ( self. centroids,'fire _ propa _ matrix') : self. _ set _ fire _ propa _ matrix ( ) # ignation only at centroids that burned in the past pos _ centr = np. argwhere ( self. centroids. fire _ propa _ matrix. reshape ( \...
[ -0.1867842674255371, -0.38826677203178406, 0.6116210222244263, 0.5018616318702698, 0.30322176218032837, -0.31415560841560364, 0.9380394220352173, 1.1099921464920044, 0.4621083438396454, 0.18368889391422272, 0.5835763812065125, 0.08747731149196625, -0.820355236530304, 0.1338757872581482, ...
def validate _ custom _ event _ collector _ json ( num _ events = 1 ) : @ transient _ function _ wrapper ('newrelic. core. application ','application. record _ transaction') def _ validate _ custom _ event _ collector _ json ( wrapped, instance, args, kwargs ) : try : result = wrapped ( * args, * * kwargs ) except : ra...
[ 0.21783575415611267, -0.9544788002967834, 0.6518605947494507, -1.2685041427612305, -0.6451718807220459, -0.7615599632263184, 0.025475911796092987, -1.1603012084960938, 0.5115374326705933, 0.5606064200401306, -0.10279633104801178, 0.08337555080652237, 0.5389719605445862, -0.4592918753623962...
def img _ stats _ main ( iargv ) : # parse the command line fits _ input, naxlims, outfile, stats, twodframe, update, verbose = \ parse _ cmd _ line ( iargv ) # get list of files to work on f _ files = ru. expand _ list _ files2 ( ipfiles = fits _ input, echo = verbose ) num _ files = len ( f _ files ) # loop through f...
[ 0.41626760363578796, -0.31889989972114563, 1.0001561641693115, 0.3034392297267914, -0.2889018952846527, -0.011132709681987762, 1.249687910079956, 0.16340433061122894, -0.40193673968315125, 0.19558826088905334, 0.6997067928314209, 0.25550577044487, 0.5636932849884033, 0.40583914518356323, ...
def test _ getitem ( self ) : self. assertequals ( [ 1, 2 ], self. matrix [ 0 ] ) self. assertequals ( 1, self. matrix [ 0 ] [ 0 ] )
[ -0.5666560530662537, -0.5555158853530884, 0.25203192234039307, 0.501238226890564, 1.2054169178009033, 0.31526803970336914, 0.8591128587722778, -0.031775787472724915, 0.07284050434827805, -0.9610525369644165, 0.02624497190117836, 0.5743615031242371, -0.1860845386981964, -0.5062129497528076,...
def loss ( self ) : if not self. store. has _ key ('loss') : return 0 return len ( self. store ['loss'] )
[ -0.8983355760574341, 0.49251288175582886, 0.22694045305252075, -0.6711208820343018, -0.0490872822701931, 0.2959185540676117, -0.179991215467453, 0.6118472218513489, 0.3797663748264313, -0.32384538650512695, -0.4931606948375702, -0.4446287453174591, -0.4114445149898529, 0.5181325078010559, ...
def unbindfield ( require _ var ) : def decorator ( function ) : if'unbind _ field'not in _ ipopo _ explorer : _ ipopo _ explorer ['unbind _ field'] = { require _ var : function } else : _ ipopo _ explorer ['unbind _ field'] [ require _ var ] = function return function return decorator
[ -1.0052472352981567, -0.40964677929878235, 0.5726876258850098, -0.705671489238739, -0.9696353673934937, 0.6338260173797607, 1.2717314958572388, 0.8152916431427002, 0.2750367224216461, 0.3363388180732727, -0.31808459758758545, -0.17230847477912903, 0.15632304549217224, -0.04681428149342537,...
def on _ disconnect ( client, userdata, result _ code ) : # pylint : disable = unused - argument client. connected = false client. disconnect _ failed = false if result _ code = = mqtt. mqtt _ err _ success : logger. info ( f " mqtt client successfully disconnected " ) else : client. disconnect _ failed = true logger. ...
[ 0.15369246900081635, -0.7692524194717407, 0.13171878457069397, -0.3112405836582184, -0.40092894434928894, -0.002761828014627099, -0.5665158033370972, -0.49895453453063965, -0.05242770537734032, 0.1492571234703064, -0.13565385341644287, 0.09583508968353271, 0.01470072753727436, -0.084661252...
def test _ peek ( ) : test _ list = deque ( ['a ','b ','c'] ) assert test _ list. peek ( ) = ='c '
[ -0.26540589332580566, 0.31709855794906616, 0.1785045713186264, -0.5246732234954834, 0.9695901870727539, -0.25520002841949463, -0.7367329001426697, -0.2609730362892151, 0.4086570739746094, -0.4874430298805237, -1.4833444356918335, 0.012923444621264935, 0.27374956011772156, 0.411812335252761...
def reduce _ set _ to _ equal _ distribution _ of _ classes ( features _ for _ training, targets _ for _ training ) : # compute count of all classes. count = np. bincount ( targets _ for _ training. astype ( int ) ) # get the smallest class. size = int ( count [ np. argmin ( count ) ] / 2 ) # declare lists to store new...
[ -1.158227562904358, -0.11098847538232803, 0.5217080116271973, -0.1388396918773651, 0.9716706871986389, -0.1969354748725891, 0.5075334906578064, -0.09366194903850555, -0.06570055335760117, 0.9248992204666138, 0.27525368332862854, 0.5654931664466858, 0.9716874957084656, -0.6696771383285522, ...
def _ _ init _ _ ( self, iterable : optional [ iterable [ _ t ] ] = none, binop : callable [ [ _ t, _ t ], _ t ] = add, inverse _ binop : optional [ callable [ [ _ t, _ t ], _ t ] ] = none ) : self. _ st = self. bit _ layout ( list ( iterable or [ ] ), binop ) self. binop = binop self. inverse = inverse _ binop
[ -0.43596330285072327, 0.580352783203125, 0.6427590250968933, 0.9268494844436646, -0.26672807335853577, 0.28206440806388855, 0.4854632019996643, 0.30521973967552185, -0.43043041229248047, 0.16912293434143066, -1.0291125774383545, -0.19357679784297943, -0.019232144579291344, -0.3823363184928...
def get _ top _ results ( decades ) : decades _ top _ words = { } for decade _ start in decades : num _ words = min ( top _ results, len ( decades [ decade _ start ] ) ) most _ common _ words = decades [ decade _ start ]. most _ common ( num _ words ) decades _ top _ words [ decade _ start ] = [ cell _ format ( most _ ...
[ -0.5199768543243408, 0.7459675073623657, 0.5144826173782349, -0.6944906711578369, -0.4129459857940674, -0.3186165988445282, 0.11234814673662186, -0.3201007544994354, -0.7663280963897705, 0.04766789823770523, -0.5156604647636414, -0.5328747630119324, 0.30684152245521545, 0.823118269443512, ...
def _ _ from _ arrow _ _ ( self, array : pyarrow. array | pyarrow. chunkedarray ) - > basestringarray : if self. storage = = " pyarrow " : from pandas. core. arrays. string _ arrow import arrowstringarray return arrowstringarray ( array ) elif self. storage = = " pyarrow _ numpy " : from pandas. core. arrays. string _ ...
[ -0.08940007537603378, -1.350703477859497, 0.6780195832252502, 0.057159174233675, -0.19950245320796967, -0.5238021016120911, 0.25698843598365784, -1.3429187536239624, 1.3052445650100708, 0.11505337804555893, 0.22371770441532135, 0.7974364757537842, 0.06588079035282135, 0.06398141384124756, ...
def status _ reply ( self, to _ status : union [ status, idtype ], status : str, media _ ids : optional [ list [ union [ mediaattachment, idtype ] ] ] = none, sensitive : bool = false, visibility : optional [ str ] = none, spoiler _ text : optional [ str ] = none, language : optional [ str ] = none, idempotency _ key :...
[ -0.19409547746181488, -0.5561162233352661, 0.7184081077575684, -0.34964966773986816, -0.46270859241485596, -0.3571414351463318, -0.4707183837890625, 0.12086133658885956, 0.586865246295929, 0.41748812794685364, -0.08840123564004898, 0.8167724013328552, -0.0696982741355896, 0.271466732025146...
def _ _ init _ _ ( self ) : self. _ _ source0 = none self. _ _ cv _ resize _ src = self. _ _ source0 self. _ _ cv _ resize _ dsize = ( 0, 0 ) self. _ _ cv _ resize _ fx = 1. 0 self. _ _ cv _ resize _ fy = 1. 0 self. _ _ cv _ resize _ interpolation = cv2. inter _ linear self. cv _ resize _ output = none self. _ _ hsl _ ...
[ -0.0017737307352945209, 0.128848597407341, 0.6926647424697876, 0.7447525262832642, -0.42402786016464233, -1.2036855220794678, 0.32560184597969055, -0.21647916734218597, 0.6030678153038025, -0.40989354252815247, -1.5744876861572266, -0.42234233021736145, 0.7754899263381958, 1.26934051513671...
def build _ gan ( self ) : # make weights in the discriminator not trainable self. d _ model. trainable = false # connect the outputs of the generator to the inputs of the discriminator gan _ output = self. d _ model ( self. g _ model. output ) # define gan model as taking noise and label and outputting real / fake and...
[ -0.6068899631500244, -0.4106403887271881, 0.5272661447525024, 0.9128435850143433, 0.5681878328323364, 0.4735911786556244, 0.02548753097653389, 1.005539894104004, -0.9551761746406555, -0.6063401699066162, -0.3390575349330902, 0.28655293583869934, -0.019738564267754555, 0.4994242489337921, ...
def set _ symmetry _ mask ( self, mask ) : self. _ grid _ masks ['symmetry'] = mask print self. symmetry _ mask ( ). summary ( )
[ -0.8959096074104309, 0.558971107006073, 0.3959410786628723, 0.8834430575370789, 1.0965561866760254, -0.1817685216665268, 1.4286561012268066, -0.7360334396362305, 0.06645236164331436, -0.7388052940368652, -0.7751268148422241, 1.0663479566574097, -0.1164718046784401, 0.5394430756568909, 0....
def text _ from _ response ( result ) : if not result. get ('responses') : logging. warning ( " no text response found. " ) return'' response = result ['responses'] [ 0 ] return response. get ('fulltextannotation ', { } ). get ('text ','' )
[ 0.4634873867034912, -0.858715295791626, 0.22381193935871124, -0.34843483567237854, -0.9354298114776611, -0.7703620195388794, -0.4820966422557831, -0.34488964080810547, 1.1777091026306152, 0.619145393371582, -0.8320266008377075, -0.9410098195075989, 0.15634675323963165, -1.022136926651001, ...
def _ get _ method _ info ( cls ) : result = { } methods = inspect. getmembers ( cls, inspect. ismethod ) for ( name, method ) in methods : if name. startswith ('_') : # skip non - public methods continue result [ name ] = ( method, _ get _ arg _ count ( method ) ) return result
[ -0.7650982737541199, 0.3774545192718506, 0.3475843369960785, -0.8545671105384827, -0.6960574388504028, -1.1501855850219727, -0.029123755171895027, -0.8626015782356262, -1.0354868173599243, 0.32113492488861084, -1.122751235961914, -0.5839996933937073, 0.6649736166000366, 1.334742546081543, ...
def test _ violate _ non _ target ( self ) : band = self. band new _ popularity = self. band. popularity + 1000 with self. assertraises ( exception ) as manager : band. insert ( band ( name = self. band. name, popularity = new _ popularity ) ). on _ conflict ( target = band. id, # target the primary key instead. action...
[ 0.17360612750053406, 1.2746846675872803, 0.4964422583580017, 0.8413102030754089, 0.8724777698516846, 0.40883487462997437, -0.005248000379651785, 0.08909343183040619, 0.6782296299934387, 0.44275450706481934, -0.24445223808288574, 0.0902378186583519, -0.9173136353492737, 0.27548569440841675,...
def settings ( self ) : return messagesettings ( self. connection. settings, self )
[ 0.06977793574333191, 0.4264010488986969, 0.19331033527851105, -0.2212359458208084, 0.4967717230319977, -0.7816673517227173, -0.49690908193588257, -1.541312575340271, -0.22966094315052032, 0.1939021646976471, 0.15178163349628448, 0.22595568001270294, -1.5034831762313843, 0.03810810297727585...
def testfirsteventtimestamploadsevent ( self ) : gen = _ eventgenerator ( self ) acc = self. _ make _ accumulator ( gen ) gen. addevent ( event _ pb2. event ( wall _ time = 1, step = 2, file _ version = " brain. event : 2 " ) ) self. assertequal ( acc. firsteventtimestamp ( ), 1 ) acc. reload ( ) self. assertequal ( ac...
[ 0.6320000290870667, 0.10898227989673615, 0.6203113198280334, 0.6872837543487549, 1.0927475690841675, 0.4459546208381653, 0.005216402933001518, -0.18176265060901642, -0.2504483163356781, -0.639556348323822, -0.5361976027488708, -0.36586642265319824, 0.33651721477508545, 0.6075010299682617, ...
def overlapaddparallel ( amat, hmat, l = none, nfft = none, y = none, verbose = false, logger = none, state _ setter = none, base _ state = " ", path = none ) : m = np. array ( hmat. shape ) na = np. array ( amat. shape ) ys = ( amat. shape [ 0 ] + hmat. shape [ 0 ] - 1, amat. shape [ 1 ] + hmat. shape [ 1 ] - 1 ) if p...
[ -0.4368198812007904, 0.21654275059700012, 1.2384551763534546, 0.042500149458646774, -0.20997054874897003, -0.007637117523699999, -0.17435625195503235, -0.36063507199287415, 0.1714451164007187, 0.21980585157871246, -0.14506278932094574, 0.7034990191459656, -0.30220139026641846, 1.1222845315...
def is _ signedoff ( self ) : return self. signedoff
[ -0.38384363055229187, -0.7744048833847046, 0.4280620515346527, 0.235313281416893, -0.5255489945411682, 1.0495647192001343, -0.20632661879062653, 0.1255541294813156, 0.6360840201377869, -0.07227367907762527, -0.4235091507434845, -0.2183367758989334, -1.3521862030029297, -0.34957918524742126...
def compute _ iou _ nms ( idx _ self, idx _ other, polygons, volumes, hs ) : # calculate intersection areas ious = [ ] box1 = polygons [ idx _ self ] for idx in idx _ other : box2 = polygons [ idx ] inter _ area = box1. intersection ( box2 ). area min _ h = min ( hs [ idx ], hs [ idx _ self ] ) inter _ volume = inter _...
[ -0.9282628297805786, -0.540328860282898, 0.7943508625030518, -0.25493448972702026, -0.07976893335580826, -0.3513506352901459, -0.43190687894821167, -0.6655029058456421, 0.11532934755086899, 0.2797083258628845, -0.046510249376297, 0.18473055958747864, -0.3912305235862732, -0.670764327049255...
def mark ( self, p ) : if p in self. parcels : raise runtimeerror ( " mark parcel was already present " ) self. parcels [ p ] = false
[ -0.521832287311554, -0.6816334128379822, 0.20551717281341553, -1.32346773147583, 0.621953010559082, 1.28073251247406, -0.7093582153320312, 0.4824952781200409, 0.5829570889472961, 0.16398410499095917, -0.47819364070892334, 0.5340635776519775, -1.1470887660980225, 0.2785649299621582, -0.66...
def init _ globals ( self, argv ) : self. _ library = none self. cookies = { } self. addon = xbmcaddon. addon ( ) self. addon _ id = self. addon. getaddoninfo ('id') self. plugin = self. addon. getaddoninfo ('name') self. version = self. addon. getaddoninfo ('version') self. default _ fanart = self. addon. getaddoninfo...
[ -0.45528295636177063, -0.403800368309021, 0.988214373588562, 0.36508142948150635, 0.44567349553108215, -0.18439516425132751, 0.005879984702914953, -0.7996657490730286, -0.2077595740556717, 0.41523951292037964, -1.123927354812622, 1.0400141477584839, -0.9266542792320251, 0.8879724144935608,...
def overwrite _ warning ( func ) : def wrapper ( force = false, * args, * * kwargs ) : " " " " " " if force is true : return func ( * args, * * kwargs ) else : raise warning ( " " " you are about to overwrite an object in your homologset object. \ if you're okay with overwriting, call this method \ again with the \ key...
[ -0.6374149918556213, -0.24624693393707275, 0.7617398500442505, -0.15489335358142853, -0.14691022038459778, -0.8149393796920776, 0.40100258588790894, -0.8197866082191467, 0.06458165496587753, 0.4864760637283325, 0.2795286774635315, 0.6178857684135437, 0.17443890869617462, -0.528085410594940...
def aliases ( self, aliases = none ) : # type : ( set [ str ] ) - > iterator [ str ] aliases = aliases if aliases is not none else self. adconnection _ aliases for alias _ name in aliases : self. current _ connection _ alias = alias _ name yield alias _ name self. current _ connection _ alias = none
[ -0.6091949343681335, -0.1551939994096756, 0.5725135803222656, -0.6996572017669678, -0.4133314788341522, 0.23060491681098938, -0.6729825139045715, 0.2324586659669876, -0.025512246415019035, 0.665192723274231, 0.5118144154548645, 0.1170693039894104, 0.49277669191360474, 0.47459080815315247, ...
def youtube _ id ( url ) : if url. startswith ( ('youtu ','www') ) : url ='http : / /'+ url query = urlparse ( url ) if'youtube'in query. hostname : if query. path = ='/ watch': return parse _ qs ( query. query ) ['v'] [ 0 ] elif query. path. startswith ( ('/ embed / ','/ v /') ) : return query. path. split ('/') [ 2 ]...
[ -0.27671217918395996, -0.5289176106452942, 0.6536922454833984, 0.8411624431610107, 0.16539913415908813, 0.25616344809532166, 0.741340696811676, 0.49411308765411377, 0.6064742207527161, 0.17067714035511017, -0.18426498770713806, 0.8011671900749207, -0.6412497162818909, 0.2781789302825928, ...
def scheduler ( epoch, lr ) : if ( epoch! = 0 ) and ( epoch % 30 = = 0 ) : return lr / 2 else : return lr
[ -0.2920301854610443, -0.5050448775291443, 0.46708157658576965, -0.554170548915863, -0.5921776294708252, 1.0145580768585205, -1.4072701930999756, 0.10191887617111206, -0.2825091481208801, 0.26171445846557617, 0.9390363693237305, 0.2948783338069916, -0.11731984466314316, 0.70225989818573, ...
def rose ( strikes ) : import numpy as np import matplotlib. pyplot as plt import mplstereonet # calculate the number of strikes every 10 degree bin _ edges = np. arange ( - 5, 366, 10 ) number _ of _ strikes, bin _ edges = np. histogram ( strikes, bin _ edges ) # sum the last value with the first value number _ of _ s...
[ 0.47777172923088074, 0.5493472218513489, 1.01066255569458, -0.7275562286376953, 0.4217577576637268, 0.921710729598999, 1.2397269010543823, 0.4927031695842743, -0.02630188874900341, -0.2470090091228485, -0.17149950563907623, 0.6075025796890259, -0.13838574290275574, -0.3877791464328766, 0...
def _ _ ignore _ sdv _ changed ( self ) : return self. _ _ subdivs _ check _ box. is _ checked ( )
[ -1.4171819686889648, 0.6329505443572998, 0.6154647469520569, 0.6424087882041931, -0.7341139912605286, 0.8040828108787537, 0.651562511920929, -0.34436318278312683, 0.2329510897397995, -0.22818122804164886, -0.598976731300354, 0.0441160649061203, -0.5159290432929993, 0.05337996035814285, -...
def _ _ delitem _ _ ( self, key ) : raise typeerror ( self. _ _ msg )
[ -0.3744197487831116, 0.26370781660079956, 0.7173090577125549, -0.24693338572978973, -0.22162698209285736, 0.31630054116249084, 0.08828036487102509, 0.006090178154408932, 0.11436934769153595, 0.16318726539611816, 0.6547827124595642, 0.077055923640728, -0.8400561809539795, 0.6035048365592957...
def _ _ contextmenusave ( self ) : if self. contextmenueditor : self. vm. saveeditored ( self. contextmenueditor )
[ -0.7367464303970337, -0.47069668769836426, 0.4704010486602783, 0.019697565585374832, 0.14441268146038055, -0.24812789261341095, 0.25827255845069885, 0.677569568157196, -0.18444332480430603, 0.36075514554977417, 0.08210736513137817, -0.30970269441604614, -1.1802737712860107, -0.079957030713...
def chartallsimresults ( self, plotly = false ) : if self. process. trials > 1 : print ( " error : single - trial function. set trials = 1 " ) return chart = ch. chart ( 5, 1, sharex = true, sharey = false, fontsize = 8, title ='sotw simulation trial results'+ str ( self. account. ramp. sum ( ) / 1e6 ) + " mm ", plotly...
[ 0.7625877857208252, 0.3380149304866791, 0.8508123755455017, -0.26777327060699463, -0.018161524087190628, 0.21460576355457306, 0.5147047638893127, -0.5610570311546326, -0.013199943117797375, -0.27571427822113037, 0.4631550908088684, 0.20115026831626892, 0.2468561977148056, 0.409002572298049...
def _ get _ port _ area ( self ) : return self. _ _ port _ area
[ 0.182338684797287, -0.9312431216239929, 0.6372339129447937, -0.8194481134414673, -0.4624573588371277, 0.4948734939098358, 1.1278252601623535, -0.1190713420510292, 0.10717055946588516, -0.02906392700970173, 1.1422148942947388, 0.40531882643699646, -0.8242884874343872, 0.34981000423431396, ...
def _ gamecenter _ team ( self, team ) : categories = [ " passing ", " rushing ", " receiving ", " fumbles ", " kickret ", " puntret ", " defense ", ] players = { } for category in categories : for player _ id, player _ stats in team [ category ]. items ( ) : if not player _ id in players : players [ player _ id ] = { ...
[ 0.3490178883075714, -0.19147145748138428, 0.4673352837562561, -1.1221892833709717, 0.4379453659057617, 0.39449265599250793, -0.7259597778320312, -0.9067317843437195, -0.45206207036972046, 0.99169921875, 0.20154623687267303, -0.8110167384147644, 0.2382785528898239, 0.02109273336827755, 0....
def read _ sequential ( self, amount = 100 ) : red _ buf = [ ] ir _ buf = [ ] for i in range ( amount ) : while gpio. digitalread ( self. interrupt ) = = 1 : # wait for interrupt signal, which means the data is available # do nothing here pass red, ir = self. read _ fifo ( ) red _ buf. append ( red ) ir _ buf. append (...
[ -0.6579830646514893, 0.06392146646976471, 0.7556819915771484, 0.1035153716802597, -0.2770940363407135, -0.25353050231933594, -0.44624367356300354, -0.22069378197193146, 0.08493834733963013, 0.30331623554229736, -0.2673856317996979, -0.052079278975725174, -0.28252795338630676, 0.75092506408...
def preico _ cap ( ) - > int : return to _ wei ( 5000, " ether " )
[ -0.017673270776867867, 0.5262097120285034, 0.2317630648612976, 0.6186312437057495, -0.7193319201469421, -0.44541895389556885, 0.5553359985351562, -0.2849811613559723, -0.3068196475505829, 1.04893958568573, -0.37097567319869995, -0.3698534667491913, 0.4860658645629883, 0.034135233610868454,...
def _ _ iter _ _ ( self ) : yield self. x yield self. y
[ -0.6537535786628723, -0.8912365436553955, 0.3003009557723999, -1.1669774055480957, 0.5319889187812805, 0.7749018669128418, 0.32184991240501404, -0.9068573117256165, -0.536414623260498, -0.9509490132331848, 0.624489426612854, 0.16718168556690216, 0.380439430475235, -0.6564639806747437, -0...
def clone ( self ) : # - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | - - - - + - - - - | return binomialdistbase. clone ( self )
[ -0.2521894574165344, -1.6281224489212036, 0.7876452803611755, 0.13750067353248596, -0.6952922344207764, 0.46056246757507324, -0.5084112882614136, -0.29988834261894226, 0.44122305512428284, 0.00621830066666007, -0.9011228084564209, 0.8290675282478333, -0.8513808250427246, -1.140435099601745...
def column _ number ( self, relationship _ list = none, single _ table = none ) : assert relationship _ list is none or single _ table is none, " specify either of the two options " def is _ multiplier ( attribute ) : for relationship in self. schema _ graph. relationships : if relationship. multiplier _ attribute _ na...
[ -0.9060720801353455, 0.5192883610725403, 0.7535883188247681, 0.7674574255943298, 0.17624488472938538, -0.35080286860466003, 1.4722412824630737, 0.2588375210762024, -0.22700455784797668, -0.3787597119808197, -0.747219443321228, -0.16541855037212372, -0.3276119530200958, 0.32646289467811584,...
def sensor _ update _ to _ bluetooth _ data _ update ( sensor _ update : sensorupdate, ) - > passivebluetoothdataupdate : return passivebluetoothdataupdate ( devices = { device _ id : sensor _ device _ info _ to _ hass _ device _ info ( device _ info ) for device _ id, device _ info in sensor _ update. devices. items (...
[ -0.21416355669498444, -0.9672802090644836, 0.626518189907074, -0.400516152381897, -0.2514447569847107, 0.2995726466178894, -1.2599859237670898, 0.11018674820661545, -0.04064279422163963, -0.16385208070278168, -0.09142662584781647, 0.760245680809021, -0.08633136004209518, 0.1345248073339462...
def get _ lexical _ type ( self ) : unit _ list = [ ] for phrase in self. utterance : if " syntax unit " in phrase [ 0 ] [ 0 ]. keys ( ) : syntax _ string = phrase [ 0 ] [ 0 ] [ " syntax unit " ] # syntax _ string example # + + + ( [ an ] ), tag ( det ), tokens ( [ an ] ) ] ), shapes ( [ # + + + ( [, ] ), tokens ( [ ] ...
[ 0.43450239300727844, -0.4546278417110443, 0.6224694848060608, -0.3083507716655731, 0.5613153576850891, -0.5070641040802002, -0.763104259967804, 0.2443286031484604, 0.06034929305315018, 0.35874706506729126, -0.3405620753765106, 0.2974550724029541, -0.16479836404323578, 0.5765642523765564, ...
def open _ connection ( self ) : try : if self. conn is none : self. conn = pymysql. connect ( self. host, user = self. user, passwd = self. passwd, db = self. db ) except pymysql. mysqlerror as e : print ('ошибка при подключении в бд :'+ e ) finally : print ('успешное подклчюение к бд')
[ -0.3799515962600708, -0.37791794538497925, 0.6930626630783081, 0.20898474752902985, 0.05667433887720108, 0.052135854959487915, 0.27858394384384155, 1.3563365936279297, -0.2900751233100891, -0.7584103941917419, -0.6189663410186768, -0.14087601006031036, -0.33273279666900635, 0.5091437697410...
def format _ locator ( locator, * args ) : return locator [ 0 ]. format ( * args ), locator [ 1 ]
[ -0.7890263199806213, -1.761344313621521, 0.2844170928001404, -0.6268343329429626, 0.34794551134109497, -0.8297616839408875, -0.33407169580459595, -0.01618846319615841, -0.2623221278190613, 0.25210145115852356, 0.8637604713439941, 0.3054034113883972, 0.8904537558555603, 0.5793247222900391, ...
def class _ factory ( context ) : @ specs. parameter ('schema ', schema ) @ specs. parameter ('name ', dsl. muranotypeparameter ( nullable = false, context = context ) ) @ specs. parameter ('default _ name ', dsl. muranotypeparameter ( nullable = true, context = context ) ) @ specs. parameter ('version _ spec ', yaqlty...
[ -0.20982146263122559, -0.26914888620376587, 0.6998873949050903, -0.3733001947402954, -0.5074941515922546, -0.6833674907684326, 0.04057881236076355, 0.1114480271935463, 0.1276865005493164, -0.0027028170879930258, -0.7021888494491577, 0.061706725507974625, 1.0864310264587402, 0.4239140152931...
def _ _ eq _ _ ( self, other ) : if type ( other ) is type ( self ) : if self. type! = other. type : return notimplemented elif isinstance ( other, discordentity ) : if self. type not in other. _ _ class _ _. _ _ name _ _ : return notimplemented else : return notimplemented return ( self. id = = other. id )
[ -1.1958762407302856, -0.8365527987480164, 0.7487998008728027, -0.8536841869354248, 0.6518930792808533, 0.181012362241745, 0.26143160462379456, -0.9910902380943298, 1.0846920013427734, 0.3028806149959564, -1.0145987272262573, 0.2221771627664566, -0.23473666608333588, 0.9786600470542908, -...
def test _ elastic _ and _ srv _ dist ( self ) : r2 = euclidean ( dim = 2 ) elastic _ metric = elasticmetric ( a = 1. 0, b = 0. 5 ) curves _ r2 = discretecurves ( ambient _ manifold = r2 ) curve _ a _ projected = gs. stack ( ( self. curve _ a [ :, 0 ], self. curve _ a [ :, 2 ] ), axis = - 1 ) curve _ b _ projected = gs...
[ 0.33527982234954834, -0.18169888854026794, 0.7255980372428894, 0.4032837450504303, 0.25867989659309387, 1.0275506973266602, 0.19515360891819, -0.374784380197525, 0.016985896974802017, 0.022842513397336006, 0.13982297480106354, 0.7841407656669617, -0.20569701492786407, -0.7152708768844604, ...
def handle _ set _ env ( self, env _ args ) : for env _ arg in env _ args : value = self. templatize ( env _ args [ env _ arg ] ) logger. debug ( f " setting env { env _ arg } to { value } " ) os. environ [ env _ arg ] = value
[ -0.3401970863342285, -0.20969529449939728, 0.2556244432926178, -0.4666895568370819, 1.2331352233886719, -0.3126508891582489, -0.4687659740447998, 0.5717555284500122, -0.8836958408355713, 0.5400367379188538, -0.8885977864265442, -0.1911158710718155, 0.6116393208503723, 1.0798766613006592, ...
async def get _ composed _ without _ discriminator ( self, * * kwargs ) - > " models. dotfishmarket " : cls = kwargs. pop ('cls ', none ) # type : clstype [ " models. dotfishmarket " ] error _ map = { 404 : resourcenotfounderror, 409 : resourceexistserror } error _ map. update ( kwargs. pop ('error _ map ', { } ) ) # c...
[ -1.3715516328811646, -0.30785202980041504, 0.7883543372154236, -0.1444351226091385, 0.012806909158825874, -0.7781903743743896, 0.5962512493133545, -0.276029497385025, 0.41153088212013245, -0.3213964104652405, -0.6401447057723999, 0.7375833988189697, -0.3667932450771332, -0.3420386910438537...
def transform _ image ( img, ang _ range, shear _ range, trans _ range ) : # rotation ang _ rot = np. random. uniform ( ang _ range ) - ang _ range / 2 rows, cols, ch = img. shape rot _ m = cv2. getrotationmatrix2d ( ( cols / 2, rows / 2 ), ang _ rot, 1 ) # translation tr _ x = trans _ range * np. random. uniform ( ) -...
[ 0.07228091359138489, 0.17750751972198486, 0.8350293636322021, -0.6422080993652344, -0.39319074153900146, -0.08837896585464478, 0.5120829343795776, -0.8144053220748901, 0.42239758372306824, 0.4371579885482788, -0.023727918043732643, 0.13727441430091858, 0.05653084069490433, -0.4197524785995...
def total _ donations ( self ) : value = 0 for category in self. categories : if category. category _ donations > 0 : value + = category. category _ donations return value
[ -0.1060728132724762, 0.07235937565565109, 0.6337660551071167, -0.33569052815437317, 0.45282766222953796, -0.1656349003314972, 0.5712185502052307, -0.13248205184936523, 0.014838064089417458, -0.153594970703125, 0.15328864753246307, -0.8807063698768616, 0.4975413680076599, 0.7418599724769592...
def insert _ aligned _ tablet ( self, tablet ) : status = self. _ _ client. inserttablet ( self. gen _ insert _ tablet _ req ( tablet, true ) ) logger. debug ( " insert one tablet to device { } message : { } ". format ( tablet. get _ device _ id ( ), status. message ) ) return session. verify _ success ( status )
[ -1.5435103178024292, 1.1403913497924805, 0.52349853515625, -0.0672653317451477, 0.35909876227378845, 1.1245992183685303, 0.6783207654953003, -1.1449278593063354, -0.6085506081581116, -0.3061010241508484, -0.6416999101638794, -0.5147872567176819, -1.287513256072998, 0.5262851715087891, -0...
def create _ blockchain _ zos _ vms ( zos _ node _ name ='main ', sshkeyname = none ) : sshkey = j. clients. sshkey. get ( sshkeyname ) # zos _ cl = j. clients. zero _ os. get ( zos _ node _ name ) zrobot _ cl = j. clients. zrobot. robots [ zos _ node _ name ] tft _ node _ data = {'name':'tft _ node ','flist':'https : ...
[ 0.2781132161617279, 0.46263211965560913, 0.5781593322753906, -0.4443909227848053, 1.3898078203201294, -0.42773300409317017, -0.3900006413459778, -0.054316360503435135, -0.5137221217155457, 0.8459175825119019, -0.4557567536830902, 0.21860209107398987, -0.2529365122318268, 0.8079648613929749...
def verify _ lpx _ lr _ vol _ vbs _ ism ( bar, bar5, uarr, barr, earr, day ) : f = 5 import matplotlib. pyplot as pl fig = pl. figure ( ) ax1 = fig. add _ subplot ( f, 1, 1 ) ax1. plot ( bar [ :, 0 ], bar [ :, repo. col _ idx ('lpx') ], '. - ', label ='hist lpx') ax1. plot ( uarr, barr [ :, - 1 ], label ='l1 mid') ax1....
[ 1.0715951919555664, 0.37106937170028687, 0.8744847178459167, 0.021869955584406853, 0.6269139051437378, 0.6957910656929016, 0.10904800891876221, -0.5709209442138672, 0.21040645241737366, 0.05185116082429886, 0.3819027245044708, 0.8177878260612488, -0.20084252953529358, 0.2664334774017334, ...
def enablepointsinteraction ( self, enable ) : if enable : for selectedpoint in self. _ pointslist : if selectedpoint ['pointwidget'] : selectedpoint ['pointwidget']. on ( ) else : for selectedpoint in self. _ pointslist : if selectedpoint ['pointwidget'] : selectedpoint ['pointwidget']. off ( )
[ 0.29579243063926697, -0.5103449821472168, 0.5013970732688904, 0.2975515127182007, 0.5879661440849304, 1.127873182296753, 0.19298216700553894, 1.7223578691482544, 0.5039694309234619, 0.6096727252006531, -0.34173914790153503, -0.024553023278713226, -1.2475919723510742, 0.5877681374549866, ...
def test _ invalid _ inputs ( self ) : invalid _ values = ( none,'','bob ','1bob ','b0b ','bob123 ','12. 321 ', '. 4 ','5. ', ) for value in invalid _ values : with self. assertraises ( http404 ) : get _ int _ or _ 404 ( value )
[ -0.3849313259124756, 0.5436127781867981, 0.5003072023391724, 0.17425982654094696, 0.4478517174720764, 0.5693169236183167, 0.2999250590801239, -0.5493956804275513, -0.18304647505283356, -0.8269796967506409, 0.13174788653850555, -0.3535098135471344, -0.5837348103523254, 0.9437586665153503, ...
def test _ host ( local ) : import aberbase. files host = aberbase. files. config ( ). host _ machine if local! = host : raise exception ( " abermud is only available on % s, not on % s \ n " % ( host, local ) )
[ 0.5455564856529236, -0.11058834940195084, 0.31257930397987366, 0.09577248990535736, 0.3254835307598114, 0.9205615520477295, 0.07300785928964615, -0.02798665128648281, -0.24879789352416992, -0.42789915204048157, 0.153662770986557, 0.592921793460846, -0.8004530668258667, 0.8999329805374146, ...
def test _ import _ v1 _ database _ masked _ password ( self ) : masked _ database _ config = database _ config. copy ( ) masked _ database _ config [ " sqlalchemy _ uri " ] = " postgresql : / / username : xxxxxxxxxx @ host : 12345 / db " contents = { " metadata. yaml " : yaml. safe _ dump ( database _ metadata _ confi...
[ 0.6898435354232788, 0.5168964862823486, 0.6380689740180969, 0.7781046628952026, 0.5269168615341187, 1.0181595087051392, 0.6570906639099121, 0.8655877709388733, 0.29324349761009216, 0.6010390520095825, -0.5017731785774231, 0.5249614119529724, -0.5815205574035645, 0.2148897349834442, 0.167...
def train ( data, num _ clusters ) : codebook, distortion = scipy. cluster. vq. kmeans ( data ['x'], num _ clusters ) return list ( codebook )
[ -0.6586704254150391, 0.5743934512138367, 0.19637055695056915, 0.8841877579689026, 0.21300354599952698, -0.38741534948349, -0.8490477204322815, 0.3688471019268036, 0.6966215968132019, 0.5383321642875671, -0.4045398235321045, 0.4142683148384094, -0.16562047600746155, -0.6386575102806091, -...
def payment _ output ( self ) : return self. _ _ payment _ output
[ 0.5916082262992859, -0.19296732544898987, 0.34076809883117676, -0.28889206051826477, -1.2180051803588867, -0.44777965545654297, 0.5090230107307434, -0.3201800286769867, 0.2094995379447937, -0.20773905515670776, 1.1178112030029297, 0.26724061369895935, -0.28166353702545166, -0.0949002206325...
def task ( ctx, config ) : if config is none : config = { } assert isinstance ( config, dict ), \'divergent _ priors task only accepts a dict for configuration'manager = ctx. managers ['ceph'] while len ( manager. get _ osd _ status ( ) ['up'] ) < 3 : time. sleep ( 10 ) manager. flush _ pg _ stats ( [ 0, 1, 2 ] ) manag...
[ -0.3233962655067444, 0.2790572941303253, 0.8423618674278259, -0.2700616121292114, 0.7393592596054077, 0.5980286598205566, 0.5935563445091248, -0.03152601420879364, -0.2759997844696045, 0.3504432737827301, -0.5391576290130615, 0.41430750489234924, 0.21453304588794708, 0.31328943371772766, ...
def add _ checkout ( self, regexp, fn ) : self. _ checkouts. append ( ( regexp, fn ) )
[ 0.12024790048599243, -0.020127177238464355, 0.36887097358703613, 0.6270861625671387, 0.668417751789093, -0.041009217500686646, -0.21165405213832855, 1.6202236413955688, 0.24699033796787262, -0.3109823167324066, -0.16842126846313477, 0.1669413149356842, -0.1879763901233673, -0.3831684589385...
def initialize _ file _ channel ( self ) : if self. passive : cmd ='pasv'self. send _ cmd ( cmd ) resp = self. get _ resp ( ) port = resp. split ( ) if len ( port )! = 1 : print ('server return illegal port number :'+ repr ( port ) ) return false self. file _ channel = self. connect _ to _ server ( ( self. server _ add...
[ -0.38537976145744324, -0.6446058750152588, 0.8581317067146301, -0.8834071159362793, 0.47488510608673096, 0.2842167615890503, -0.04719051346182823, 0.19036926329135895, -1.0747132301330566, -0.8592615127563477, 0.38665518164634705, 0.013371787965297699, -0.44151580333709717, 0.1197930574417...
def test _ create _ response _ uri _ logs _ to _ error ( self, log _ exception, create _ code ) : exception = exception ( " something went wrong! " ) create _ code. side _ effect = exception authorization _ endpoint = authorizeendpoint ( self. request ) authorization _ endpoint. validate _ params ( ) with self. assertr...
[ 0.10833074152469635, 0.6147727966308594, 0.5105314254760742, 0.6266037225723267, 1.2152104377746582, 0.1315336525440216, 0.5629262924194336, -0.5701949596405029, -0.0303267240524292, -0.2622798681259155, 0.032478079199790955, 0.052666403353214264, -0.1627107858657837, -0.47700220346450806,...
def load _ analysis ( self, ignore = ( ) ) : if self. verbose : print ('loading analysis for { } '. format ( self. fpath ) ) analysis = nwbio. load _ analysis ( self. fpath, ignore = ignore ) if self. verbose : print ('ensuring that loaded data matches with current recording instance.') # check that loaded units match ...
[ -0.08600537478923798, -0.03273898363113403, 0.8932600021362305, -0.03525874391198158, -0.24198676645755768, 1.0437220335006714, 0.813752293586731, -0.6052975058555603, -0.40304189920425415, -0.2995297610759735, 0.3469550609588623, -0.12407629936933517, -0.023495933040976524, 0.150428712368...
def is _ offscreen _ top ( self ) - > bool : return self. pos _ y < ( 0 - self. titlerect. height )
[ -1.4959152936935425, -1.0697213411331177, 0.8788400888442993, 0.34795841574668884, -1.0570818185806274, 0.9607886075973511, -0.5169845819473267, -0.8795400261878967, 0.06937529891729355, 0.2013740837574005, 0.4584455192089081, -0.15839792788028717, -0.2589452564716339, 0.14008747041225433,...
def run _ fleur ( self ) : self. change _ fleurinp ( ) fleurin = self. ctx. fleurinp'''if'settings'in self. inputs : settings = self. input. settings else : settings = parameterdata ( dict = {'files _ to _ retrieve': [ ],'files _ not _ to _ retrieve': [ ],'files _ copy _ remotely': [ ],'files _ not _ copy _ remotely': ...
[ -0.6511375308036804, -0.7669550180435181, 0.8375418186187744, 0.5072266459465027, -0.19125734269618988, 0.7114586234092712, 0.3999633491039276, -0.01945890299975872, -0.025887813419103622, -0.5606393814086914, -0.31330621242523193, 0.8742965459823608, -0.786129891872406, 0.2629842758178711...
def build _ char _ dictionary ( self, char _ dict = none, unknown _ label ='unk') : if char _ dict is none : char _ dict = self. char _ dict self. unknown _ label = unknown _ label chars = [ ] for c in char _ dict : chars. append ( c ) chars = list ( set ( chars ) ) chars. insert ( 0, unknown _ label ) self. num _ of _...
[ -0.8728302717208862, -0.3694542646408081, 0.5732862949371338, -1.241385817527771, -0.3770667016506195, -0.21714633703231812, 0.6312688589096069, 0.6037322282791138, -0.3317576050758362, 0.36491745710372925, -0.7337511777877808, 0.3238697648048401, 0.2932739853858948, -0.6589524745941162, ...
def get _ task _ data _ first _ timestamps ( self, major _ key, minor _ key ) : return [ x [ 0 ] for x in self. task _ data [ major _ key ] [ minor _ key ] ['timestamps'] ]
[ -0.35988590121269226, 0.21306674182415009, 0.7411133646965027, 0.2690648138523102, 0.3567121922969818, 0.12818434834480286, -0.6159987449645996, 0.4083746373653412, -0.2776311933994293, 1.088873028755188, -0.3808622360229492, -0.12464781105518341, 0.4990152418613434, 0.40107518434524536, ...
def update _ latex _ document ( latex _ document : tuple, updates : dict ) : names = ( " startdocname ", " targetname ", " title ", " author ", " theme ", " toctree _ only ", ) updated = list ( copy ( latex _ document ) ) for i, ( _, name ) in enumerate ( zip ( latex _ document, names ) ) : if name in updates : updated...
[ -0.6396282315254211, -1.4144915342330933, 0.5371016263961792, -0.14991556107997894, -0.8135103583335876, 0.2020958662033081, -0.975890040397644, 0.2398662269115448, -0.798311710357666, 1.507967472076416, -0.25770220160484314, -0.3841469883918762, -0.8995499014854431, -0.993172287940979, ...
def make _ data ( self, graph, graph _ transform = none, device = none, * * kwargs ) : self. graph = gf. get ( graph _ transform ) ( graph ) cfg = self. cfg. data if device is not none : self. data _ device = gf. device ( device, self. backend ) else : self. data _ device = self. device cfg. device = device _, kwargs =...
[ -0.037103790789842606, 0.8443988561630249, 0.48062440752983093, -0.2356845885515213, -0.005850090645253658, -0.01361277885735035, -0.6455116868019104, 0.11848517507314682, -0.8375400900840759, -0.9516998529434204, -1.029031753540039, 0.04573319852352142, 0.31578636169433594, -0.07248130440...
def urls ( self ) : return [ url _ obj. url for url _ obj in self. urlmodel _ set. all ( ) ]
[ -0.04758160188794136, -0.28747665882110596, 0.1699363887310028, 0.7323728799819946, 0.5866461396217346, 1.2092350721359253, -0.5966048240661621, 0.32957980036735535, -0.2333575040102005, -0.46666669845581055, -0.11883322894573212, -0.025938469916582108, 0.3568926155567169, 1.02268469333648...
def _ _ contextmenumovelast ( self ) : self. movetab ( self. contextmenuindex, self. count ( ) - 1 )
[ -0.9552109837532043, -0.8828050494194031, 0.6615809798240662, 0.2640586793422699, 0.6546309590339661, 0.32555803656578064, 0.45562687516212463, -0.1800123006105423, -0.64652419090271, 0.6564362645149231, 0.23448581993579865, -0.19516661763191223, -0.4396657943725586, -1.1469532251358032, ...
def test _ first ( self ) : # change the working directory to the value it had before this # test suite was started. where ['concurrent'] = subsequentdirectory = os. getcwd ( ) os. chdir ( rundirectory. path ) self. addcleanup ( os. chdir, subsequentdirectory ) secondrunner. run ( concurrentcase ('test _ second') )
[ 0.8495738506317139, 0.4289415776729584, 0.721704363822937, 0.591039776802063, 0.9568046927452087, -0.37063395977020264, 1.6851881742477417, 0.21452724933624268, 0.7783432602882385, -0.5757499933242798, 0.03309088200330734, 0.66201251745224, -0.31300580501556396, 0.3028945028781891, -0.34...
def file _ contents ( self, path, revision = none ) : raise notimplementederror
[ 0.37866267561912537, -0.7083154916763306, 0.5669254660606384, 0.12985534965991974, -0.8381521105766296, -0.04855072498321533, -0.5658717751502991, 0.1416337937116623, -1.0100047588348389, -0.46931612491607666, 0.8997030258178711, -0.343700647354126, 0.5863574147224426, -0.7719374299049377,...
def contains ( a, b ) : return len ( a & isomorphs ( b ) ) > 0
[ 0.024854691699147224, 0.30949339270591736, 0.3149656355381012, 0.32551535964012146, -0.6134210824966431, 0.6837645173072815, -0.964457631111145, 0.07595660537481308, 0.5071467757225037, 0.39774829149246216, 0.6661943197250366, 0.4408847987651825, -0.4113265872001648, -0.14147606492042542, ...
def calculatetfidf ( self, query ) : querydocumentscores = { } for term in self. ppr. tokenize ( self. ppr. tolowercase ( query ) ) : termscore = 0 termstemmed = self. ppr. stemwordporter ( term ) if ( len ( term ) > 0 ) and ( self. ppr. isnotastopword ( term ) ) : termdictionary = self. ii. gettermdocumentdictionary (...
[ 0.08743159472942352, -0.20324206352233887, 0.5517551898956299, -1.464512825012207, 0.061547085642814636, -0.08471454679965973, 0.15146072208881378, -0.6788425445556641, 0.011857043951749802, 0.6562563180923462, -0.08169826865196228, -0.1140252947807312, -0.808541476726532, 0.44301679730415...
def add _ coordinates ( p ) : return p. x + p. y
[ -0.7442550659179688, -0.5773353576660156, 0.4401358962059021, -0.7409563064575195, 0.5516301989555359, 1.023996353149414, -0.7020467519760132, -0.05073253810405731, 0.5687304139137268, -0.8397130966186523, 0.510066032409668, -0.8355842232704163, -0.8403369188308716, -1.0341508388519287, ...
def start ( self ) : try : print ('connecting to ip % s port % s'% ( self. ip, self. port ) ) # create a tcp / ip socket sock = socket. socket ( socket. af _ inet, socket. sock _ stream ) sock. connect ( ( self. ip, self. port ) ) print ('connected to server') # send receive example msg = sock. recv ( 1024 ) print ('re...
[ 0.5882822275161743, 0.09630098193883896, 0.8023231625556946, 0.5870776772499084, -0.006422638893127441, 0.32985278964042664, 0.15440493822097778, 0.7040605545043945, -0.8464296460151672, -0.43808454275131226, 0.0642523393034935, 0.4303160011768341, 0.10280055552721024, 0.20378129184246063,...
def remove _ gen _ mc ( self, ns _ key, ipv4 _ start, ipv4 _ count = 1 ) : ver _ args = [ {'name':'ns _ key ','arg': ns _ key,'t': emunamespacekey }, {'name':'ipv4 _ start ','arg': ipv4 _ start,'t':'ipv4 _ mc'}, {'name':'ipv4 _ count ','arg': ipv4 _ count,'t': int } ] emuvalidator. verify ( ver _ args ) ipv4 _ vec = se...
[ -1.318637490272522, -0.1938602775335312, 0.7026822566986084, -0.20813268423080444, -0.763658881187439, -0.5405657291412354, 0.647524356842041, 0.26458752155303955, -0.6111942529678345, 0.7741576433181763, -0.3514055013656616, 0.27115297317504883, -1.1300827264785767, 0.10338021069765091, ...
def png _ to _ plot ( self, png _ y, png _ x ) : plot _ height, plot _ width = self. plot _ shape png _ height, png _ width = self. png _ shape plot _ y = ( png _ height - 1 ) - png _ y plot _ y = plot _ y * ( plot _ height / png _ height ) plot _ x = png _ x * ( plot _ width / png _ width ) return ( plot _ y - self. p...
[ -0.4678144156932831, -0.6052417159080505, 0.6425633430480957, -1.3721916675567627, -0.7396746277809143, 0.5754046440124512, -0.7277442812919617, -0.6640092134475708, -0.6117125749588013, -0.09127853065729141, -0.5879867076873779, 0.94354248046875, 0.5079590678215027, -0.5939135551452637, ...
def stand _ in _ for _ table ( self, ops, table _ key ) : if isinstance ( ops, data _ algebra. data _ ops. tabledescription ) : if ops. key = = table _ key : return self else : return ops node = copy. copy ( ops ) node. sources = [ self. stand _ in _ for _ table ( ops = s, table _ key = table _ key ) for s in node. sou...
[ 0.10494037717580795, 0.7551552653312683, 0.3785301744937897, 1.0678951740264893, -0.27648890018463135, -0.1854449212551117, 0.6383311152458191, 0.2294216752052307, -0.19042256474494934, 0.7293838858604431, 0.6280873417854309, 0.20886459946632385, -0.12744632363319397, 0.10922732204198837, ...
def test _ trapraises ( self ) : failure = synchronousfailure ( runtimeerror ( ) ) self. assertraises ( synchronousfailure, failure. trap, zerodivisionerror )
[ 0.022364458069205284, 0.7896034121513367, 0.2570296823978424, 0.06306931376457214, -0.02029084973037243, 0.3458007276058197, 0.321772962808609, -0.1380271315574646, -0.16194893419742584, -0.9520947933197021, -0.34772536158561707, -0.3304861783981323, 0.0130673972889781, 0.448347270488739, ...
async def _ _ call _ _ ( self, scope : scope, receive : receive, send : send ) - > none : match, child _ scope = self. matches ( scope ) if match = = match. none : if scope [ " type " ] = = " http " : response = plaintextresponse ( " not found ", status _ code = 404 ) await response ( scope, receive, send ) elif scope ...
[ -0.06026891991496086, -0.17994700372219086, 1.0828958749771118, -0.6445809006690979, 0.005463930778205395, -0.5963461399078369, 0.30636608600616455, -0.9182257056236267, 0.6772112250328064, 0.3520272672176361, 0.006572283338755369, 0.6262229681015015, -0.4949556291103363, -0.14601233601570...
def download _ and _ unpack ( ) : archive = workdir +'/'+ geoserver +'- bin. zip'path = os. path. join ( geoserver _ url, archive ) if not os. path. isfile ( archive ) : # fixme : should also check integrity of zip file. cmd ='cd % s ; wget % s'% ( workdir, path ) run ( cmd, verbose = true ) # clean out s ='/ bin / rm ...
[ 0.118756003677845, -0.552401065826416, 0.7524261474609375, -0.13154731690883636, 0.2214640974998474, -0.13504813611507416, 0.7654754519462585, 0.4288400411605835, 0.7963704466819763, -0.21096760034561157, 0.2635171711444855, -0.12337241321802139, 0.27578651905059814, 0.37737491726875305, ...
def post _ to _ event ( self, post ) : return facebookpostevent ( * * post ). to _ dict ( )
[ 0.26225546002388, -0.2631828188896179, 0.48930811882019043, 0.34647396206855774, -0.5613039135932922, -0.7733684182167053, -1.0141254663467407, -0.17773084342479706, -0.022029511630535126, -0.30281704664230347, -0.8152668476104736, -0.25673919916152954, 0.12656715512275696, 0.4614669084548...
def on _ state _ change ( self, old, new, params = { } ) : return 0
[ -0.4958876669406891, -0.3779064416885376, 0.4250972867012024, 0.6619159579277039, -0.014856403693556786, -0.5137376189231873, -0.2878473103046417, 0.06422331929206848, -0.299303263425827, 0.5856972336769104, -0.7496784329414368, 0.13555262982845306, 0.5138903856277466, 0.5909231305122375, ...
def start ( self ) : self. show ( ) self. server _ thread. start ( )
[ 0.5340570211410522, -0.6022685766220093, 0.37558498978614807, 0.4881199300289154, 0.3121702969074249, 0.4650428891181946, 0.4865948557853699, 1.0236694812774658, 0.3354198932647705, -0.5949710607528687, -0.26557448506355286, 2.224282741546631, -0.14798100292682648, 0.9528903961181641, 0....
def get _ fidsout ( param _ tuple ) : paramlist, dim, num _ nodes, repeats, graph _ type, iters, fidsin, csubp, alternation, fo, x = param _ tuple # unpack param = paramlist [ x ] clean _ coef _ mat = get _ input _ coefficients ( num _ nodes, dim, graph _ type,'dp ', param ) coef _ mat = np. copy ( clean _ coef _ mat )...
[ -0.35562318563461304, 0.01699284464120865, 0.49249476194381714, -0.14684951305389404, -0.3155166208744049, -0.2068917602300644, 0.8841351270675659, 0.5755794048309326, -0.2859598398208618, 0.31404608488082886, -0.2765745520591736, 0.25694388151168823, 0.11280538886785507, -0.39398446679115...