text
stringlengths
25
2.19k
embedding
listlengths
768
768
def setup ( self ) : pathname = os. path. dirname ( " / tmp / " ) self. _ logger = stdoutmodulelogger ( ) ; self. _ logger. set _ verbose ( 0 ) self. _ env = moduleenvironment ( self. _ logger, pathname, pathname, pathname )
[ 0.1939089149236679, -0.6985206604003906, 0.510894775390625, -0.6018788814544678, 0.47971150279045105, 0.36876147985458374, 1.060390830039978, 0.07237498462200165, -0.28804919123649597, 0.19362851977348328, 0.1170673593878746, 0.7784839868545532, 0.15371587872505188, 1.2665776014328003, -...
def impute _ outliers ( self, outl _ type = none ) : # requires the outlier dfs, the data df, the group bools orig _ data = self. roi _ gs _ df if self. imputed _ roi _ gs _ df is none : imputed _ data = self. roi _ gs _ df. copy ( ) else : print ( " using imputed _ roi _ gs _ df ( re - imputing ) " ) imputed _ data = ...
[ -0.5234906077384949, 0.2528366148471832, 0.7883760333061218, -0.1184578612446785, -0.1953495740890503, 0.32200101017951965, 0.6606348752975464, 0.5837030410766602, -0.524833619594574, 0.6965675354003906, 0.6603484749794006, 1.2003939151763916, 0.12676449120044708, -0.4192606508731842, 1....
def parse _ final ( self, response ) : items = pypiitem ( ) installation = response. xpath ( self. installxpath ). get ( ) lastreleasedate = response. xpath ( self. lastreleasexpath ). get ( ) author = response. xpath ( self. authorxpath ). get ( ) maintainers = response. xpath ( self. maintainersxpath ). get ( ) githu...
[ -0.37020522356033325, 0.08067586272954941, 0.6852326393127441, -0.06133056804537773, 0.7666910886764526, 0.4955436587333679, -0.7098533511161804, -0.08013691008090973, -0.4121691584587097, -0.27662426233291626, -0.26464375853538513, -0.9189099669456482, 0.005087041296064854, 0.269765138626...
def solve _ x ( self, y, method ='std') : if ( method = ='std') : return self. std _ form. solve _ x ( y ) if ( method = ='vert') : return self. vert _ form. solve _ x ( y ) if ( method = ='fac') : if ( self. fac _ form = = none ) : return none else : return self. fac _ form. solve _ x ( y )
[ -0.735683798789978, 0.5663480162620544, 0.8004769086837769, 0.47538653016090393, -0.07547091692686081, -0.8289415836334229, -0.2863149046897888, -1.8160730600357056, -0.14983811974525452, -0.4389611482620239, -0.2656008303165436, -0.14560768008232117, 0.11121352016925812, 0.533856391906738...
def draw ( self, surface ) : self. bar. draw ( surface )
[ -0.5792972445487976, 0.6681280136108398, -0.015112504363059998, 0.5811738967895508, 0.5371537804603577, 2.4140446186065674, 1.3046568632125854, -0.4442523717880249, -1.1721242666244507, -1.3727672100067139, 0.29083412885665894, 0.03398946672677994, -0.7676165699958801, 1.740753412246704, ...
def to _ float ( obj : any ) - > symbolicexpression | float : if isinstance ( obj, symbolicexpression ) : return obj. expr _ cls ( float,'float ( { } ) ', [ obj ] ) return float ( obj )
[ 0.5837472677230835, 0.04031118378043175, 0.29209840297698975, 0.7760816812515259, 0.43124687671661377, -0.4620954990386963, 0.842667818069458, 0.4875682592391968, 0.4108240008354187, -0.21185269951820374, -1.1285781860351562, 0.7550623416900635, 0.09301897138357162, 0.6090577840805054, -...
def lsi ( self, num _ vec ) : index _ arr = self. ini _ index. to _ numpy ( ) [ :, : - 1 ] u, s, vt = svd ( index _ arr ) sigma = np. zeros ( ( index _ arr. shape [ 0 ], index _ arr. shape [ 1 ] ) ) sigma [ : index _ arr. shape [ 1 ], : index _ arr. shape [ 1 ] ] = np. diag ( s ) sigma = sigma [ :, : num _ vec ] vt = v...
[ 0.2581360638141632, -0.13974647223949432, 0.57847660779953, 0.1845352202653885, -0.20132216811180115, -0.5189105868339539, 0.5620080232620239, 0.5904993414878845, 0.25117239356040955, -0.20740002393722534, -0.13043057918548584, 0.32208937406539917, -0.4064645767211914, -1.2078170776367188,...
def compute _ empirical _ efficiency ( self, collected _ volume, measured _ og ) : pot _ gravity = self. _ get _ potential _ gravity ( l _ to _ gal ( collected _ volume ) ) efficiency = 0 if pot _ gravity > 0 : efficiency = ( measured _ og - 1. ) / pot _ gravity return int ( efficiency * 100 )
[ -0.5363313555717468, -0.2248275727033615, 0.3641871213912964, 0.005303526762872934, 0.6722416877746582, 0.07837054133415222, 0.2444310188293457, -0.6963803172111511, -0.4269827902317047, 0.82430100440979, 0.5800696611404419, 0.7249667644500732, -0.0954073816537857, 0.4382535219192505, 0....
def sobel _ rgb ( image ) : return filters. sobel ( image )
[ 0.411358505487442, 0.46902963519096375, -0.055512282997369766, 0.9594969153404236, -0.1606249362230301, 0.6846540570259094, 0.4629850387573242, -0.5613451600074768, 0.985763430595398, 0.3987564146518707, 0.812484860420227, 0.5003238320350647, -0.36025184392929077, 0.8879513144493103, -0....
def sort _ mapped ( fq _ dict, mapped _ reads ) : fqd = { } unmapped = [ i for i in list ( fq _ dict. keys ( ) ) if i not in mapped _ reads ] mapped = [ i for i in list ( fq _ dict. keys ( ) ) if i in mapped _ reads ] # print ( unmap ) for r in unmapped : fqd [ r ] = ['u'] + fq _ dict [ r ] for r in mapped : fqd [ r ] ...
[ -0.11259489506483078, -1.407116413116455, 0.7372289299964905, -1.342458963394165, -1.2872065305709839, 0.7678911089897156, 0.012165380641818047, 0.43721818923950195, 0.043117422610521317, -0.537141740322113, 0.7541965842247009, -0.16383129358291626, 0.12341046333312988, 0.07283374667167664...
def decode ( mode = unicode _ errors _ default ) : def dec ( f ) : f. _ nvim _ decode = mode return f return dec
[ 0.12331020087003708, -0.7433401942253113, 0.42013341188430786, 0.7225289940834045, -0.7421122193336487, -0.35153207182884216, 0.11583948135375977, -0.3923957347869873, 0.09605023264884949, -0.8338271379470825, -0.4307093918323517, -0.8447696566581726, 0.2570677399635315, -1.052285790443420...
def test _ update _ cve _ reserved _ state ( ) : with open ( '. / src / test / cve _ tests / cve _ record _ fixtures / cve - 2017 - 5833 _ reserved. json') as json _ file : data = json. load ( json _ file ) res = requests. put ( f'{ env. awg _ base _ url } { cve _ url } / { reserved _ cve _ id } ', headers = utils. bas...
[ -0.06815493851900101, -0.03973720595240593, 0.6862829327583313, -0.3804594576358795, 0.4964342713356018, 0.14548493921756744, -0.3419398069381714, 0.6455847024917603, 0.5054454207420349, 0.47295668721199036, -1.1071046590805054, 0.7035214304924011, -0.01707853190600872, -1.3400540351867676...
def test _ list _ decimal _ enumeration _ 3 _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 4 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 4. xsd ", instance = " nistdata / list / ...
[ -0.6748166680335999, -0.5569291710853577, 0.6563614010810852, 0.6220434308052063, -0.13367366790771484, -0.08765244483947754, 0.2232515960931778, 0.3247450292110443, 0.2848137319087982, 0.15839290618896484, -1.5716713666915894, -0.8020451664924622, -0.10978943854570389, 0.0995790883898735,...
def _ reset _ parameters ( self ) : for p in self. parameters ( ) : if p. dim ( ) > 1 : xavier _ uniform _ ( p )
[ -0.48067742586135864, 0.95361328125, 0.1650800257921219, 0.055716920644044876, 1.0891250371932983, -0.22317098081111908, 0.29572540521621704, 0.2632133364677429, -0.622570812702179, 1.1076022386550903, -0.19013988971710205, 1.2785329818725586, -0.7973158955574036, 0.2838200032711029, -1....
def get _ and _ start _ processes ( num _ processes, process _ in _ queue, process _ out _ queue, seed ) : # initialize list to hold process objects. process _ objects = [ ] # initialize key word arguments for fitfornodeworker function func _ args = {'inq': process _ in _ queue,'outq': process _ out _ queue,'randomseed...
[ -0.020687498152256012, -0.5069326758384705, 0.5441352725028992, -0.04074479267001152, 0.6546881198883057, -0.43150874972343445, 0.17227806150913239, -0.42204421758651733, 0.01750338450074196, -0.6025394201278687, -0.542835533618927, 0.8733339905738831, 0.14956584572792053, -0.2410633563995...
def _ fix _ durations ( self, ret ) : last _ duration = none for i in range ( len ( ret ) - 1 ) : curr _ pts = ret [ i ] [ " pts " ] next _ pts = ret [ i + 1 ] [ " pts " ] if next _ pts < curr _ pts : print _ stderr ( " non - monotonically increasing pts, duration / bitrate may be invalid " ) last _ duration = next _ p...
[ -0.429439514875412, -0.0660148411989212, 0.5392160415649414, -0.024306226521730423, 0.4808337688446045, -0.13056667149066925, 0.6195974946022034, -0.07326722890138626, -0.009766927920281887, 1.063002586364746, 0.7480056285858154, 0.209663987159729, -0.32250818610191345, 0.3542276620864868,...
def test _ atomic _ any _ uri _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 5 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / anyuri / schema + instance / nistschema - sv - iv - atomic - anyuri - length - 5. xsd ", instance = " nistdata / atomic / any...
[ -0.002558392006903887, -0.32783257961273193, 0.34961679577827454, 0.6080135703086853, -0.40422531962394714, -0.5323417782783508, 0.1791698932647705, -0.5816686153411865, -0.3745754063129425, 0.12147171795368195, -0.18392355740070343, -0.47626060247421265, -0.6212649345397949, 0.42304608225...
def snmp _ walk ( self, snmp _ ver, system _ name, mib _ name = none, mib _ index = none, mib _ value = none, oid _ string = none, communityname = none, snmp _ timeout = 60, username = none, authkey = none, privkey = none, authprotocol = none, privprotocol = none, custom _ mib _ paths = none, load _ mib _ modules = non...
[ -0.16766980290412903, -0.6856396198272705, 0.6066386699676514, -0.037391096353530884, -0.22609016299247742, -0.1733916699886322, 0.531600832939148, -0.09488921612501144, 0.6264349818229675, -0.03193989768624306, -0.23142023384571075, -0.14044955372810364, -1.727590799331665, 0.018091762438...
def error _ popup ( self ) : messagebox. showwarning ( " warning ", " error " )
[ 0.7824472784996033, 0.3129894435405731, 0.26814356446266174, -0.06743770837783813, 0.1685139536857605, -0.044339608401060104, -0.0020515371579676867, 0.7677972912788391, -0.22218556702136993, 0.6622132062911987, 0.3579876124858856, 1.0088591575622559, 0.6199511885643005, 0.3027272820472717...
def build _ word _ dict ( args, examples ) : word _ dict = dictionary ( ) for w in load _ words ( args, examples ) : word _ dict. add ( w ) return word _ dict
[ -0.135279580950737, 0.06092548370361328, 0.31055963039398193, -0.8248977661132812, -0.7062167525291443, 0.028319373726844788, -0.024243535473942757, 0.5581985116004944, -0.9289721846580505, 0.5986000895500183, -0.3081466257572174, 0.43263983726501465, -0.010656040161848068, 1.5806112289428...
def calcrdr ( self, grain, group, showplot = true, length = 2. 5 ) : ulist = [ ] ; vlist = [ ] ; allxlist = [ ] ; allylist = [ ] ; # get all lines belonging to group points = [ ] for point in grain. pointslist : if point [ 2 ] = = group : points. append ( point [ 0 ] ) for point in points : x0 = point [ 0 ] ; y0 = poin...
[ 0.5114136934280396, 0.38789281249046326, 0.9788592457771301, -1.0159491300582886, -0.5676984190940857, 0.5328207015991211, 0.8307045698165894, 0.33994680643081665, -0.09260887652635574, 0.3681826591491699, -0.047375407069921494, 0.1218707412481308, -0.004066781606525183, 0.3091132640838623...
def left _ right _ parent _ state ( state, max _ depth ) : state = state [ : ] parent _ trees, full _ trees = get _ trees _ max _ depth ( state, max _ depth ) if len ( parent _ trees ) = = 0 : return [ ] last _ tree _ start = parent _ trees [ - 1 ] [ 0 ] my _ posns = [ last _ tree _ start ] for tree _ posns in reversed...
[ -0.25679031014442444, -0.4254210591316223, 0.9520139694213867, -0.7710156440734863, 0.2014191448688507, -0.22910772264003754, -0.38000309467315674, 0.3754919171333313, 0.22456452250480652, 0.9599573016166687, -0.5508573651313782, -0.7025789618492126, -0.3167904019355774, 0.3703494668006897...
def targeting _ scores ( board, ships, heuristics ) : scores = np. zeros ( ( len ( board ), len ( board [ 0 ] ) ), dtype = float ) # final scores # modifiers for heuristics to use. cell _ modifiers = np. ones ( ( len ( board ), len ( board [ 0 ] ) ), dtype = float ) # modifiers to apply to cell. ship _ modifiers = { } ...
[ -0.5582910180091858, 0.28283756971359253, 0.7071114778518677, -0.5326772332191467, 1.042738914489746, -0.5757039785385132, -0.2954867482185364, 0.16399149596691132, -0.1675727516412735, 0.4713704586029053, 0.6729762554168701, 0.2987135648727417, 1.1038144826889038, -0.21675413846969604, ...
def testlistinstancebylabels ( self, mock _ gce _ api, mock _ labels ) : mock _ gce _ api. return _ value. instances. return _ value = none mock _ labels. return _ value = mock _ gce _ operation _ instances _ labels _ success instances = fake _ analysis _ project. compute. listinstancebylabels ( labels _ filter = {'id'...
[ -1.0583343505859375, 0.23076802492141724, 0.5046627521514893, -1.300223708152771, 0.4699026942253113, 0.7560317516326904, -0.05293629691004753, -0.2380226105451584, 0.06429938226938248, 0.3439245820045471, 0.012148924171924591, -0.3724890649318695, -0.6247348785400391, -0.25743621587753296...
def test _ example _ input _ two _ delete _ close _ entity ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper, add _ input _ two ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) self. assert _ util ( input _ page. table. delete _ row, true, left _ args ...
[ -0.045961279422044754, 0.47163307666778564, 0.7982731461524963, 0.5246157646179199, 0.27144575119018555, 0.8638156652450562, -0.0713832676410675, -0.22755536437034607, 0.28323233127593994, 0.0676877573132515, 0.24253062903881073, -0.2487248331308365, 0.1933806836605072, 0.655799150466919, ...
def close ( self ) : self. cursor. close ( ) self. connection. close ( )
[ -0.170456662774086, -1.5764423608779907, 0.7195981740951538, -0.515709400177002, -0.13365866243839264, 0.8810668587684631, -0.28890177607536316, 0.7227976322174072, -0.9943840503692627, -0.4855442941188812, 0.35910120606422424, 0.29882723093032837, -0.6492835879325867, 1.1159961223602295, ...
def sub _ ledger _ id ( self, sub _ ledger _ id ) : if self. local _ vars _ configuration. client _ side _ validation and sub _ ledger _ id is none : # noqa : e501 raise valueerror ( " invalid value for ` sub _ ledger _ id `, must not be ` none ` " ) # noqa : e501 self. _ sub _ ledger _ id = sub _ ledger _ id
[ 0.8137645125389099, 0.0362643338739872, -0.19342854619026184, 0.8931723833084106, -0.2868848741054535, 1.3414751291275024, 0.2539280652999878, 0.6531096696853638, -0.26452407240867615, -0.0427531935274601, -1.2936123609542847, 1.1575998067855835, 0.11729686707258224, 0.6668848395347595, ...
def skip _ step ( self, event _ data = none ) : self. _ step _ complete = true self. _ step _ triggered = true
[ -0.08368594199419022, 0.14277024567127228, 0.4379078149795532, 0.5474557280540466, -0.12501393258571625, 0.49818241596221924, 0.8645840287208557, 0.6920424103736877, -1.2406953573226929, -0.35277020931243896, -1.3962814807891846, -0.6247109770774841, -0.07509255409240723, 0.339366286993026...
def qw _ test _ step ( x _ batch, y _ batch, writer = none ) : feed _ dict = { cnn. input _ x : x _ batch, cnn. input _ y : y _ batch, cnn. dropout _ keep _ prob : 1. 0, } step, summaries, loss, accuracy = sess. run ( [ global _ step, qw _ summary _ op, cnn. loss, cnn. accuracy ], feed _ dict ) time _ str = datetime. d...
[ 0.5111671686172485, -0.06512729823589325, 0.6442673802375793, 0.4292599558830261, 0.037239231169223785, 0.3785324990749359, 0.6463080644607544, -0.61739182472229, -0.6650526523590088, -0.19287432730197906, -0.3018132150173187, 0.6230877637863159, 0.192636638879776, 0.49669960141181946, -...
def latitude ( self ) : return self. _ latitude
[ 0.7999292612075806, -0.5850601196289062, -0.07307305932044983, -0.3969900906085968, -0.23745355010032654, 0.9216936230659485, 0.47398364543914795, -0.13006922602653503, 0.30517178773880005, -0.7491384148597717, 0.11801140755414963, -0.025649113580584526, -0.39391469955444336, -0.7155109047...
def triangulate _ point ( x1, x2, p1, p2 ) : m = np. zeros ( ( 6, 6 ) ) m [ : 3, : 4 ] = p1 m [ 3 :, : 4 ] = p2 m [ : 3, 4 ] = - x1 m [ 3 :, 5 ] = - x2 u, s, v = np. linalg. svd ( m ) x = v [ - 1, : 4 ] return x / x [ 3 ]
[ 0.7212017178535461, 0.43707406520843506, 0.5884568691253662, -0.08905793726444244, 0.6227816939353943, -0.052486978471279144, -0.7594352960586548, 0.7045689225196838, 0.007327341940253973, 0.41363969445228577, 0.2157641351222992, -0.0102678332477808, -0.31762126088142395, -1.72055244445800...
def categorical _ agg _ array _ features ( n, n _ feats, ks ) : features = [ ] for k in range ( ks ) : features. append ( categorical _ array _ features ( n, n _ feats ) ) features = np. stack ( features, axis = 2 ) return features
[ -0.4793948233127594, 0.508583664894104, 0.5209990739822388, 1.7382490634918213, 0.6128249764442444, -0.4580014646053314, -0.7049403786659241, 0.4655730426311493, -0.4042784869670868, 0.062186844646930695, -0.610681414604187, 0.8534883856773376, 0.9358329176902771, 1.0041214227676392, 0.1...
def initialize _ inputs ( ) : rng = np. random. default _ rng ( seed = 0 ) size = input _ pop _ size * network _ size return rng. integers ( 0, 2, size = size, dtype = np. int64 ) \. reshape ( ( input _ pop _ size, - 1 ) )
[ -1.0900413990020752, 0.634556233882904, 0.6824855208396912, -0.326840877532959, 0.8483279943466187, 0.07586593925952911, 0.38186755776405334, -0.34314748644828796, 0.38456469774246216, 0.001014195615425706, -0.3659411370754242, -0.2725120186805725, -0.09610917419195175, 0.24154962599277496...
def validate _ agreement _ number ( aid, err _ obj, err _ key, broker _ type, current _ agreement _ id = false ) : # min length : 4 # max length : 5 # if broker add 99 min _ length = 4 max _ length = 4 if broker _ type = ='broker': max _ length = 5 min _ length = 5 if aid [ : 1 ]! ='9': err _ obj [ err _ key ] ='agreem...
[ -0.6389869451522827, -0.9166985154151917, 1.0787791013717651, -0.2608804702758789, -0.3252542316913605, 0.9890788197517395, 0.7836601734161377, 0.22660352289676666, 0.05210382118821144, 0.8928149342536926, -0.08882541209459305, 0.07852672785520554, -0.38801831007003784, 0.5523951053619385,...
def _ _ init _ _ ( self, t, trajectory, ats, molno, compairs = np. array ( [ [ 0, 6 ], [ 1, 7 ], [ 2, 8 ], [ 3, 9 ], [ 4, 10 ], [ 5, 11 ] ] ), atype = u'ls') : self. timestep = t self. ats = ats self. box = none if type ( trajectory ) is np. ndarray : carray = trajectory self. timestep = int ( carray [ 0 ] ) self. ats ...
[ -0.013955371454358101, -0.011026041582226753, 0.7522002458572388, -0.5929927229881287, -0.4339638352394104, -0.39472806453704834, -0.16026170551776886, 0.09207212924957275, 0.8649048209190369, -0.0025944646913558245, -0.223936066031456, -0.22824017703533173, 0.2361326366662979, 0.002403318...
def _ search _ for _ intersections ( self, detector _ pane, random _ path ) : dist = cdist ( detector _ pane, random _ path, metric ='euclidean') min _ dist _ index = np. unravel _ index ( dist. argmin ( ), dist. shape ) # find the pixel pair with min. distance return min _ dist _ index
[ -0.6071500182151794, 0.19139526784420013, 0.5599151253700256, -0.21465784311294556, -0.47516870498657227, -0.1363404244184494, 0.635353684425354, 0.502300500869751, -0.4006790816783905, -0.5550519227981567, 0.39191934466362, -0.7680745720863342, -0.7242735624313354, 0.30946213006973267, ...
def test _ ensure _ platform _ present ( self ) : platform _ name = " juniper _ junos " manufacturer = manufacturer. objects. create ( name = " juniper ", slug = " juniper " ) device _ type = devicetype. objects. create ( slug = " srx3600 ", model = " srx3600 ", manufacturer = manufacturer ) platform = platform. object...
[ 0.14024263620376587, 0.5323442816734314, 0.5566479563713074, 0.5921946167945862, 1.0812923908233643, 0.4070506989955902, 0.2778424322605133, -0.38521483540534973, 0.08800741285085678, -0.2959402799606323, -0.7610684633255005, -0.6505948305130005, -0.3676789104938507, 1.3508368730545044, ...
def test _ ensure _ initialized ( self ) : self. assert _ ensure _ initialized ( response _ body = api _ versions, # pylint : disable = no - value - for - parameter response _ status _ code = 200, should _ initialize = true, should _ report _ healthy = true ) self. assert _ ensure _ initialized ( response _ body ='inva...
[ -0.21188095211982727, 0.04784753918647766, 0.41811633110046387, -0.17811653017997742, 1.377586007118225, 0.37561461329460144, 0.25489184260368347, -0.8419658541679382, 0.3419901728630066, -0.584564745426178, -1.0568568706512451, -0.11829758435487747, -0.04119008034467697, 1.001197218894958...
def set _ fp ( self, value ) : mant _ str, exp _ str ='{ :. e } '. format ( value ). split ( " e " ) mant _ idx = 0 dot _ idx = none new _ negative = false new _ mantissa = [ ] for idx, mant _ char in enumerate ( mant _ str ) : if mant _ char. isdigit ( ) : new _ mantissa. append ( int ( mant _ char ) ) elif mant _ cha...
[ -0.2992752492427826, -0.5194891095161438, 0.7536837458610535, -0.40397337079048157, -0.35812777280807495, 0.014393212273716927, -0.08447915315628052, -0.3386096656322479, 0.4377439618110657, -0.09338466823101044, -0.08288149535655975, 0.13055413961410522, 0.09649273753166199, 0.49858108162...
def max _ positions ( self ) : if self. embed _ positions is none : return self. max _ target _ positions return min ( self. max _ target _ positions, self. embed _ positions. max _ positions ( ) )
[ 0.08869828283786774, -0.5294986963272095, 0.5564891695976257, 0.7079905867576599, 1.3542367219924927, 0.19706550240516663, -0.6650233268737793, 0.39098086953163147, 0.7032532691955566, -0.17243987321853638, 0.25097447633743286, -0.48066264390945435, -0.7850772142410278, -0.2645306885242462...
def distance _ to ( self, m2 ) : centroid = self. get _ center ( ) if author. ametrictype = = authormetric. centroiddis : return dis ( centroid, m2, metric = author. mmetrictype ) temp = [ dis ( m1, m2, metric = author. mmetrictype ) for m1 in self. get _ matrices ( ) ] if author. ametrictype = = authormetric. minimumd...
[ 0.10279580950737, -0.5227915048599243, 0.29183849692344666, 0.8179559111595154, -0.664910614490509, 0.37982532382011414, 0.5833497643470764, -0.26222339272499084, 0.0659155398607254, 0.23302249610424042, 0.6242153644561768, 0.02350316382944584, -0.4842684864997864, -0.21323151886463165, ...
def checkio ( data ) : from collections import ordereddict data = [''. join ( ordereddict. fromkeys ( _ ) ) for _ in data ] associate _ part, isolate _ part = divide _ data ( data ) order = process _ associate _ part ( associate _ part ) if order : isolate _ part. add ( order ) result = process _ isolate _ part ( isola...
[ -0.3008379340171814, 0.08126525580883026, 0.47774454951286316, 0.15338405966758728, -0.4540250301361084, -0.4095795750617981, 0.21624071896076202, -0.6121248006820679, 0.22435760498046875, 0.6894229054450989, -0.1971968561410904, -0.6408812403678894, -0.46119025349617004, -0.77536791563034...
def convert _ to _ nums ( marble _ string ) : letter = ord ( marble _ string [ 0 ] ) num = int ( marble _ string [ 1 ] ) return letter, num
[ -0.46432504057884216, -1.2451623678207397, 0.2973865568637848, -1.0147066116333008, 0.25146952271461487, -0.39478838443756104, 0.593483567237854, 0.5805757641792297, 0.09476151317358017, 0.5756665468215942, -1.345515251159668, 0.8392394185066223, -0.1649613380432129, -0.2094114124774933, ...
def _ send _ characteristic ( self ) : characteristics = self. connection. getcharacteristics ( uuid = user _ command _ uuid ) if not characteristics : return none return characteristics [ 0 ]
[ -0.23888270556926727, -0.22310128808021545, 0.4589059054851532, 0.322765976190567, 0.16403426229953766, -0.5039657950401306, -0.20365464687347412, -0.6149143576622009, 0.011499103158712387, 0.23256386816501617, 0.007280757185071707, 1.2398661375045776, -0.9371058344841003, -1.1640956401824...
def get _ aggregated _ embeddings ( e, sets _ of _ words ) : embs = [ ] for set _ of _ words in sets _ of _ words : existing _ embeddings = [ e [ word ] for word in set _ of _ words if word in e ] if len ( existing _ embeddings ) = = 0 : continue aggregated = fun. reduce ( lambda x, y : x + y, existing _ embeddings ) e...
[ -0.04125327989459038, 0.9105510115623474, 0.6632431745529175, -0.03700648993253708, 0.3682312071323395, 0.021967049688100815, 1.0077308416366577, -0.14198501408100128, 0.7967137694358826, 0.9678271412849426, 0.4664657711982727, 0.2187625616788864, 0.1728309988975525, 1.2111324071884155, ...
def test _ list _ decimal _ enumeration _ nistxml _ sv _ iv _ list _ decimal _ enumeration _ 1 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - enumeration - 1. xsd ", instance = " nistdata / list / deci...
[ -0.7712900042533875, -0.37215250730514526, 0.6556029319763184, 0.6318459510803223, 0.2523314356803894, 0.11793393641710281, -0.010148726403713226, 0.5332427024841309, 1.4440796375274658, 0.22178955376148224, -0.6707838177680969, -0.5971781015396118, -0.07466910779476166, 0.3017539978027344...
def setup ( hass, config ) : " " " setup the hello _ world component. " " " # states are in the format domain. object _ id. hass. states. set ('hello _ world. hello _ wonderful _ world ','this works!') count = 0 # listener to handle fired events def handle _ event ( event ) : nonlocal count count + = 1 print ('total ev...
[ 0.07277446240186691, 0.08927835524082184, 0.741008460521698, -0.03575831279158592, 0.7936460971832275, -0.11347747594118118, 0.7898854613304138, 0.16750015318393707, 0.6172334551811218, -0.5512495040893555, -1.2603747844696045, -0.6158758401870728, 0.061158906668424606, 0.44163548946380615...
def test _ atomic _ base64 _ binary _ length _ 2 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ length _ 3 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - length - 3. xsd ", instance = "...
[ 0.38988184928894043, -0.04886333644390106, 0.46128425002098083, 0.7734822034835815, 0.3883964717388153, 0.39206305146217346, -0.2180594503879547, 0.13151641190052032, 0.3195907771587372, 0.6309320330619812, -0.4335840940475464, 0.05268392339348793, -0.3479269742965698, -0.03748681768774986...
async def get _ task _ log _ file ( user _ id : userid, project _ id : projectid, node _ uuid : nodeid, comp _ tasks _ repo : comptasksrepository = depends ( get _ repository ( comptasksrepository ) ), ) - > tasklogfileget : if not await comp _ tasks _ repo. task _ exists ( project _ id, node _ uuid ) : raise httpexcep...
[ 0.5931300520896912, 0.7133850455284119, 0.472531795501709, -0.6900991797447205, 0.30964478850364685, 0.4866583049297333, 0.017644518986344337, 0.07895760238170624, -1.842026948928833, 0.5343526601791382, 0.7716081142425537, 0.9502066373825073, 0.959690511226654, -0.5676846504211426, -0.0...
def create _ fc _ layer ( self, input _ tensor, input _ dim, output _ dim, layer _ name, activation _ func = tf. nn. relu ) : # todo : documentation with tf. name _ scope ( layer _ name ) : with tf. name _ scope ('weights') : weights = self. weight _ variable ( [ input _ dim, output _ dim ] ) variable _ summaries ( wei...
[ 0.37953752279281616, 0.12809814512729645, 0.326485276222229, 0.728378415107727, -0.5310242176055908, -0.7137245535850525, 0.8594685196876526, 0.02691064588725567, -0.35126522183418274, -0.26874685287475586, -0.09400659799575806, 0.09326404333114624, 0.6083977818489075, -0.1951286792755127,...
def model _ testing _ with _ loocv _ random ( ) : print'traing model with random atlas selection and test it with'+ \'leave - one - out cross - validation...'# - - directory config db _ dir = r'/ nfs / t2 / atlas / database'base _ dir = r'/ nfs / h1 / workingshop / huanglijie / autoroi'doc _ dir = os. path. join ( base...
[ -0.47196221351623535, -0.17133845388889313, 0.6831365823745728, 0.16950440406799316, 0.3242197632789612, 0.04866980388760567, 0.9914768934249878, 0.435605525970459, 0.4529324471950531, 0.6736810803413391, -0.3618617653846741, 0.011259634047746658, -0.05034724622964859, 0.9373208284378052, ...
def test _ sampling _ rate _ 1 ( ) : assert stereo _ 44100 _ 16bits. rate = = 44100
[ 1.2161377668380737, 0.9062696695327759, 0.2468198835849762, 0.934381902217865, 0.7357794642448425, 0.20676055550575256, 0.11383382976055145, -1.0607305765151978, 0.7394626140594482, -0.3408297002315521, 0.07072889804840088, -0.3234545588493347, -0.5381263494491577, 0.13308244943618774, -...
def _ make _ polygon ( points, tri _ vertices ) : edge _ points = [ ] def _ add _ edge ( i, j ) : " " " add a line between the i - th and j - th points " " " edge _ points. append ( points [ [ i, j ] ] ) # loop over triangles : # ia, ib, ic = indices of corner points of the triangle for ia, ib, ic in tri _ vertices : _...
[ 1.1905364990234375, 0.26857417821884155, 0.38044998049736023, -0.5053830146789551, -0.05720638111233711, 0.5472844839096069, -0.08938556164503098, 0.3776521682739258, 1.1492807865142822, 0.5993973016738892, -0.44866371154785156, -0.04730846732854843, 0.585708737373352, -1.6032556295394897,...
def toasciistr ( s ) : if s is none : return'' if not isinstance ( s, unicode ) and not isinstance ( s, str ) : raise typeerror ('expected a string or unicode object') if isinstance ( s, str ) : # delete chars > = 128 to begin with, encode ( ) won't handle them. # also, translate various spacing characters ( \ n etc ) ...
[ -0.20477290451526642, -0.5740697979927063, 0.15586695075035095, -0.16917026042938232, -1.3432096242904663, -0.37479791045188904, 0.05628620460629463, -0.4035855233669281, 0.8525875806808472, 0.08188148587942123, -0.05182936415076256, 0.9033336043357849, 0.026060985401272774, -0.17827834188...
def test _ init ( self ) : self. assertequal ( self. default _ app. name,'rdptaxonassigner')
[ 0.32760146260261536, -0.6699907779693604, 0.311945378780365, 0.6050565838813782, 0.6550431251525879, 1.3214091062545776, -0.011168118566274643, 0.06464019417762756, -0.08712892234325409, -0.02334599941968918, -0.46926093101501465, -0.5111039280891418, 0.04538785666227341, 0.061620384454727...
def value ( self, trump _ suit ) : # pylint : disable = unused - argument return int ( self. rank )
[ -0.5494551062583923, -0.034980159252882004, 0.24717117846012115, -0.557487428188324, 0.30425429344177246, -0.005672510247677565, 0.4963076114654541, -0.23954901099205017, -0.8669283986091614, -0.34449678659439087, -0.004473588429391384, 0.5367465019226074, 0.07157505303621292, 0.4826790690...
def extract _ component ( self, * indices ) - > boundaries : boundaries = [ boundary. extract _ component ( * indices ) for boundary in self ] return self. _ _ class _ _ ( boundaries )
[ -0.6061378717422485, -0.8331931233406067, 0.6693899035453796, 1.0583325624465942, 0.5924364328384399, 0.10265645384788513, -0.3571864664554596, -0.7657957673072815, 0.5160552263259888, -0.645549476146698, -0.15072409808635712, -0.7427896857261658, -0.9159785509109497, -0.975788414478302, ...
def rgb _ bg ( self ) : if not hasattr ( self,'_ rgb _ bg') : self. _ rgb, self. _ rgb _ bg, self. _ style = decode _ ansi ( self. _ ansi ) return self. _ rgb _ bg
[ 0.08053175359964371, 0.09927266091108322, 0.6853520274162292, 0.8170219659805298, -0.5104913115501404, -0.06511901319026947, -0.3251928389072418, -0.5863296389579773, -0.28935757279396057, 0.403324693441391, -1.090688943862915, 0.6864898800849915, -0.8918219804763794, 0.04696155712008476, ...
def getemptyarray ( self, emptyarray = none ) : if emptyarray is none or type ( emptyarray ) is not dicttype : x = { } else : x = emptyarray. copy ( ) x = taskdefinitioncontroller. getemptyarray ( self, x ) x ['mask'] = none x ['default _ category'] = none x ['current _ registry'] = 1 x ['private _ only'] = none x ['ac...
[ -1.4940205812454224, 0.05540500208735466, 0.5880611538887024, 0.39884692430496216, 0.4393253028392792, -0.07470480352640152, 0.2645953595638275, -0.2739095687866211, 0.4881657660007477, -0.06554930657148361, -1.0852917432785034, 0.7804970145225525, -0.06708467751741409, 0.8617175817489624,...
def gui _ distance _ units ( self ) - > str : return self. _ vehicle _ data. get ( " gui _ settings ", { } ). get ( " gui _ distance _ units " )
[ -0.7868509888648987, 0.0005359595525078475, 0.5631440877914429, -0.3906306326389313, 0.051608845591545105, 1.460923671722412, -0.5042316317558289, -0.04705940559506416, 0.17207135260105133, 0.10692724585533142, -0.609595537185669, -0.11345352977514267, -0.11602752655744553, 0.2394267022609...
def getcoordinate ( self, targ, size = [ 2, 2, 2 ], method ='peak') : if targ. ndim = = 3 : targ = np. expand _ dims ( targ, axis = 3 ) coordinate = np. empty ( ( targ. shape [ 3 ], self. regions, 3 ) ) for i in range ( targ. shape [ 3 ] ) : if self. atlas. ndim = = 3 : coordinate [ i,... ] = tools. get _ coordinate ( ...
[ -0.6976005434989929, -0.10111889988183975, 0.47233808040618896, -0.4324338138103485, 0.34423208236694336, -1.045702576637268, -0.25178763270378113, -0.07240918278694153, -0.11803296208381653, -0.0335719920694828, 0.11588813364505768, 0.07837994396686554, 0.04513989016413689, -0.47612237930...
def update ( self, x = none, y = none, rotation = none, scale = none, scale _ x = none, scale _ y = none ) : if scale is not none : self. _ v _ scale = scale self. _ scale = self. _ v _ scale * self. _ board. _ scale if x is not none : self. _ v _ x = x self. _ x = self. _ board. _ r _ x + ( self. _ v _ x * self. _ boa...
[ -0.6989906430244446, -0.5366027355194092, 0.8371702432632446, -0.1758647859096527, -0.19000254571437836, -0.3224848806858063, -0.6712197065353394, -0.46461987495422363, -0.06035206839442253, 0.7471227645874023, -0.7729059457778931, -0.15860626101493835, -0.1621156483888626, -0.091544739902...
def run _ nozzle ( w ) : # write the input file filename = " input. cfg " # the ( fixed ). cfg file dvname = " inputdv _ all. in " # write variables here flevel = 0 # fix low fidelity with open ( dvname,'w') as f : for val in w : f. write ( " { } \ n ". format ( val ) ) # run the nozzle nozzle = multif. nozzle. nozzles...
[ -0.5228440761566162, 0.35977572202682495, 0.4122660160064697, 0.010254984721541405, -0.01759517751634121, -0.21998488903045654, 1.058497667312622, -0.28313568234443665, -0.046137068420648575, -0.41830646991729736, -0.6591249108314514, -0.3500087559223175, -1.3160113096237183, 1.17141878604...
def save _ anchors ( self, value ) : # warning : if you set this to true, anchor links on # webpages will be saved as separate files. self. _ anchors = value
[ -0.5027300715446472, -0.09152548015117645, 0.27799123525619507, -0.8731014132499695, 0.7616173624992371, 1.2354047298431396, 1.1428039073944092, 0.2774825692176819, 0.5306304693222046, -0.5299273729324341, -1.5112202167510986, 0.03664833679795265, -0.2506762146949768, 0.1575537919998169, ...
def score _ word ( self, word ) : res = 0 for char in word : res + = self. letter _ values [ char ] return res
[ -0.7343428134918213, 0.05418803542852402, 0.366478830575943, -0.19963882863521576, 0.45102375745773315, 0.12512943148612976, -0.14135228097438812, -0.14027512073516846, -0.2705172300338745, 0.47679564356803894, -0.5302850008010864, -0.06267043203115463, -0.8294568657875061, 0.3339608013629...
def test _ atomic _ qname _ pattern _ nistxml _ sv _ iv _ atomic _ qname _ pattern _ 1 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - pattern - 1. xsd ", instance = " nistdata / atomic / qname / schema...
[ 0.10693635046482086, -0.5327467322349548, 0.44988778233528137, 0.24357976019382477, -0.18470701575279236, 0.2946860194206238, 0.12120348960161209, -0.6539524793624878, 0.323304146528244, 0.3927445113658905, -0.14362137019634247, -0.3635171949863434, -0.35519611835479736, -0.183731034398078...
def create ( self, path, mime _ type ='application / octet - stream ', compression _ type = compressiontypes. auto ) : # type : (... ) - > binaryio raise notimplementederror
[ 0.5457680821418762, -0.19947314262390137, 0.6247683167457581, 1.1916775703430176, 0.06814156472682953, 0.585957944393158, 0.017289312556385994, -0.9263524413108826, -0.8909830451011658, -0.38974708318710327, -0.8835417628288269, -0.11585742980241776, -0.3320164978504181, -0.112823732197284...
def gather _ features ( mode ='train ', return _ plot = true, return _ video = true, return _ id = false, reverse = false ) : print ( " gathering features from { } data ". format ( mode ) ) pklfile ='feature _ data _'+ mode data = load _ pkl ( pklfile ) plotfeatures, videofeatures, labels = [ ], [ ], [ ] ids = [ ] for ...
[ -0.27305835485458374, -0.4501434862613678, 0.6513015627861023, 0.49022409319877625, -0.059172045439481735, 0.21706829965114594, -0.5119170546531677, 0.24794365465641022, -0.3530721664428711, 0.3479169011116028, -0.7749525308609009, 0.9170477986335754, -0.4972042441368103, 0.316573232412338...
def return _ home ( self ) : self. a. destroy ( )
[ 0.3844588100910187, -0.8476937413215637, 0.27022233605384827, 0.18193747103214264, -0.04701707512140274, 0.008835287764668465, 1.3373504877090454, 0.5023466348648071, 0.4621935486793518, 0.6617744565010071, 1.0038166046142578, 0.34475409984588623, -1.2614296674728394, -0.3895559310913086, ...
def resample ( self, loglam ) : assert loglam. ndim = = 1 # - copy loglam, in case it is a slice of self. param ['loglam'] loglam = n. array ( loglam ) # - interpolate flux bins for this new loglam array orig _ loglam = self. param ['loglam'] # - 2d [ nspec, nflux ] # - resample parameters to this new grid self. nflux ...
[ -0.25371500849723816, -0.23076073825359344, 0.736926794052124, -0.14514267444610596, 0.09098038822412491, -0.6445448994636536, -0.17403250932693481, 0.36487728357315063, -0.43665266036987305, 0.009137004613876343, -0.22078365087509155, 0.9261887669563293, -0.19108030200004578, 0.0727779269...
def _ _ str _ _ ( self ) : printstring ='' for card in self. _ deck _ of _ cards : printstring + = " { } of { } \ n ". format ( card. card _ value, card. card _ suit ) return printstring
[ -0.1800868660211563, -1.2550289630889893, 0.7862251996994019, -0.7675184607505798, -0.397527277469635, 0.02007175236940384, -1.0681663751602173, -0.3861445486545563, -0.608698308467865, -0.5722329020500183, 0.6718969941139221, 0.7618126273155212, 0.9389668703079224, 0.3001563251018524, 0...
def convert _ mp4 _ to _ mp3 ( ) : videoclip = videofileclip ( f " { audio _ folder } / { background _ video _ name } " ) audioclip = videoclip. audio audioclip. write _ audiofile ( f " { audio _ folder } / { background _ music _ name } " )
[ -0.16707061231136322, -1.4155910015106201, 0.618684709072113, 0.7634753584861755, 0.6829819679260254, 0.3460751473903656, -0.32433801889419556, 0.37194037437438965, 0.4031446874141693, 0.8531877398490906, 0.044764019548892975, 0.6967169046401978, -0.9604085087776184, -0.597243070602417, ...
def add _ group ( self, names, yscale = none, xlabel = none, ylabel = none, formats = none ) : ig = self. n _ gr self. n _ gr + = 1 self. x _ values [ ig ] = [ ] self. data _ names [ ig ] = names self. yscales [ ig ] = yscale self. xlabels [ ig ] = xlabel self. ylabels [ ig ] = ylabel ii = self. n _ arg for iseq, name ...
[ -1.1330512762069702, 0.375460147857666, 0.671164870262146, -0.15373501181602478, -0.20659224689006805, 0.16543450951576233, 0.06359630078077316, -0.6938813924789429, -1.086727499961853, -0.3284064531326294, -0.13070949912071228, 0.5231394171714783, -0.5085726380348206, 0.9963095188140869, ...
def unique _ id ( self ) - > str : return self. _ address
[ 0.41703343391418457, -0.6353522539138794, 0.5222060084342957, -0.6528717279434204, 0.444474458694458, 1.0823100805282593, 0.1826971173286438, 0.7678983211517334, 1.7341623306274414, -0.9108894467353821, -0.08454623073339462, 1.2914083003997803, -0.39650943875312805, -1.3923383951187134, ...
def togglelight ( self ) : if self. light. on = = true : self. light. on = false else : self. light. on = true return
[ 0.46497049927711487, -0.27700725197792053, 0.6984232664108276, 0.004527609795331955, 0.4598323404788971, 0.6928505897521973, -0.49979421496391296, 1.2773774862289429, 0.22244440019130707, -0.10874982923269272, -0.9630098342895508, -0.13900111615657806, -1.2099535465240479, 0.56751602888107...
def top _ sentences ( query, sentences, idfs, n ) : sentence _ idf = dict ( ) sentence _ query _ density = dict ( ) for sentence in sentences : sentence _ idf [ sentence ] = sum ( [ idfs [ word ] for word in query if word in sentences [ sentence ] ] ) sentence _ query _ density [ sentence ] = sum ( [ word in query for ...
[ -0.17189529538154602, -0.22798016667366028, 0.4231550693511963, -0.21908195316791534, -0.4164941906929016, -0.8281393051147461, -0.4210706353187561, -0.8230579495429993, 0.18987378478050232, 0.9688249230384827, 0.7208625078201294, -0.8277520537376404, -0.23272064328193665, 0.32379409670829...
def login _ to _ mvweb ( self ) : login _ page = loginpage ( self. _ driver ) # log in login _ page. wait _ until _ ready ( login _ page. usernamefieldselector ) self. screenshot ( " before login " ) login _ page. login ( self. username, self. password ) # navigate to powertrax - if successful login, should see powertr...
[ -0.4226202666759491, -0.4254544675350189, 0.4623972475528717, 0.8061079382896423, -0.21096733212471008, 0.340497761964798, 0.14885112643241882, 0.24747252464294434, 0.38891857862472534, -0.3146224021911621, 0.30337509512901306, 0.016324153169989586, 0.7058270573616028, 0.093499556183815, ...
def hex _ to _ rgb ( value ) : value = value. lstrip ('#') lv = len ( value ) return tuple ( int ( value [ i : i + lv / / 3 ], 16 ) for i in range ( 0, lv, lv / / 3 ) )
[ 0.15537813305854797, 0.8971332311630249, 0.4744274914264679, -0.9380165934562683, 0.20659448206424713, 0.03179820254445076, -1.15751051902771, 0.8752117156982422, -0.3091392517089844, 0.6111403107643127, -1.0418754816055298, -0.6477410197257996, -0.23636530339717865, -0.05861007422208786, ...
def getstyle ( odrawdoc, cstylefamily, cstylename ) : return odrawdoc. getstylefamilies ( ). getbyname ( cstylefamily ). getbyname ( cstylename )
[ 0.4308714270591736, -0.3429064452648163, 0.2901674807071686, 0.12927231192588806, -0.6656743884086609, -0.6020843386650085, -0.014198632910847664, -0.5809653401374817, -0.48508986830711365, 0.5407924056053162, 0.6531068086624146, 0.2653522193431854, -0.4239511787891388, -0.6579762697219849...
def plotcumfreq ( self ) : plt. axhline ( self. l / 2. 0, color ='r ', linestyle ='dotted ', label ='median') plt. axvline ( self. mean ( ), color ='r ', linestyle ='dotted ', label ='mean') plt. plot ( numpy. sort ( self. data ), numpy. arange ( self. l ) + 1,'kx - ', label ='sorted data') plt. legend ( ) plt. ylabel ...
[ 1.172795057296753, 0.6268028020858765, 0.8859302401542664, -0.49097514152526855, -0.774966299533844, 0.6079935431480408, 0.4843333959579468, -0.2779770493507385, -0.31510964035987854, -0.3075881898403168, 0.8586582541465759, 1.3643635511398315, 0.3621513247489929, 0.7910689115524292, 0.6...
def sne _ bin _ search _ perp _ fit ( ds _ hds _ i _ js, i, log _ perp, x0 = 1. 0 ) : # find x _ up and x _ low such that sne _ bin _ search _ fct ( ds _ hds _ i _ js = ds _ hds _ i _ js, den _ s _ i = x _ up, i = i, log _ perp = log _ perp ) > 0 and sne _ bin _ search _ fct ( ds _ hds _ i _ js = ds _ hds _ i _ js, den...
[ 0.5188299417495728, 0.2559923827648163, 0.866460919380188, -0.4666193723678589, -0.845051109790802, -0.33366796374320984, 0.1905820071697235, -0.4978790283203125, 0.22062049806118011, -0.154063418507576, 0.188101664185524, 0.22784002125263214, -0.9131863713264465, -0.1403008997440338, 1....
def plot _ histogram ( ) : def calc _ bin _ edges _ intensity ( ) : " " " calculate various properties of the histogram bins, given a range in intensity defined by'intensity _ from'and'intensity _ to ', assuming a number of bins equal to 100. " " " edges = numpy. linspace ( intensity _ from, intensity _ to, n _ bins + ...
[ 0.8205595016479492, 0.3892730474472046, 0.6245406866073608, 0.18530769646167755, 0.5116277933120728, 0.48715144395828247, 0.5904317498207092, 0.6993768811225891, -0.43966975808143616, -0.2678341269493103, -0.15586960315704346, 0.5023443102836609, -0.171993687748909, -0.3090783953666687, ...
def move _ wrapper ( board, player, trials ) : move = mm _ move ( board, player ) assert move [ 1 ]! = ( 1, - 1 ), " returned illegal move ( - 1, - 1 ) " return move [ 1 ]
[ -0.8858014345169067, -0.39556390047073364, 0.3027154207229614, 0.9960975050926208, -0.673841118812561, -0.19145163893699646, -0.39880573749542236, -0.25098949670791626, -0.11246663331985474, 0.772576093673706, 1.27695894241333, 0.702514111995697, -0.5064182877540588, -0.46172425150871277, ...
async def test _ energysite _ with _ no _ name ( monkeypatch ) : _ mock = teslamock ( monkeypatch ) _ api = controller ( none ) _ energysite = _ mock. data _ request _ energysites ( ) [ 0 ] _ site _ config = { 12345 : _ mock. data _ request _ site _ config ( ) } _ site _ data = { 12345 : _ mock. data _ request _ site _...
[ -0.17121554911136627, 0.05215366184711456, 0.3539372384548187, -0.6519649028778076, 0.5454654693603516, 0.2850005030632019, -0.3930104970932007, -0.3851633071899414, 0.04185796529054642, -0.46426528692245483, -0.851318895816803, -0.3370746374130249, -0.07522667944431305, 0.4795080423355102...
def _ _ connect _ to _ endpoint ( self, retried = false ) - > dict : response = requests. request ( " get ", self. _ _ twitter _ end _ point, headers = self. _ _ headers, params = self. _ _ query ) if response. status _ code = = 200 : self. log. info ( " received valid response " ) json _ response = response. json ( ) ...
[ -0.22265051305294037, -0.41639983654022217, 0.8218859434127808, 0.016857484355568886, 0.3413405418395996, -0.9469002485275269, -0.29832127690315247, -0.8651612997055054, -0.3432863652706146, 0.9530070424079895, 0.5359471440315247, 0.424081951379776, -0.6768242120742798, -0.4604183435440063...
def get _ alien _ number _ x ( ai _ settings, alien _ width ) : # find the amount of x space available available _ space _ x = ai _ settings. screen _ width - ( 2 * alien _ width ) # find the amout of aliens as an int that can fit in x space available alien _ number _ x = int ( available _ space _ x / ( 2 * alien _ wid...
[ -0.6768483519554138, 0.19859902560710907, 0.49605584144592285, -0.2136039286851883, -0.6683453321456909, 0.08011321723461151, -0.07105620950460434, 0.13372422754764557, 0.39651253819465637, 0.5433472394943237, -0.019808921962976456, 0.011840960010886192, 0.2540992200374603, 0.6139548420906...
def closeevent ( self, event ) : reply = qmessagebox. question ( self,'message ', " etes - vous sur de vouloir quitter? ", qmessagebox. yes | qmessagebox. no, qmessagebox. no ) # selon le choix on fait une action precise if reply = = qmessagebox. yes : event. accept ( ) else : event. ignore ( )
[ 0.5752823352813721, -0.2352680265903473, 0.9358996152877808, 0.22809310257434845, -0.5918804407119751, 1.2886570692062378, -0.22434592247009277, -0.7119248509407043, 0.008413183502852917, -0.010369649156928062, 0.12173690646886826, 0.17138615250587463, -0.7608264088630676, 0.75209069252014...
def ti ( ) : return time. strftime ('% a % b % d % x % z % y : ', time. localtime ( time. time ( ) ) )
[ 0.3107900023460388, -1.1239632368087769, 0.6169317364692688, -1.4901562929153442, 0.09122796356678009, 0.03900258615612984, -0.7331839799880981, -0.4645681381225586, -0.7804323434829712, 1.744471549987793, -0.19818133115768433, -0.4639052748680115, 0.05222957208752632, -1.5775225162506104,...
def buildindex2 ( self, docs, docids ) : # with open ( r " d : \ pycharmprojects \ nlp \ code \ assign1 \ lisp. pkl ", " rb " ) as fp : # unpickling # lisp1 = pickle. load ( fp ) try : with open ( os. path. join ( self. root _ folder, " index _ bigrams _ df1. pkl " ), " rb " ) as fp : # unpickling index _ df = pickle. ...
[ 0.16445563733577728, -0.5837405920028687, 0.5518763661384583, 0.09357419610023499, 0.5079663991928101, -0.22728370130062103, 0.9330461025238037, 0.9849370121955872, -0.6996432542800903, 0.49749618768692017, -0.35250434279441833, 0.39150938391685486, -0.2639548182487488, -0.3648889660835266...
def generate _ topic ( pokemon _ set, graph, neighbours = false ) : topic _ dict = dict. fromkeys ( list ( graph. nodes ), 0 ) # loop over the pokemon sets if neighbours : for pokemon in pokemon _ set : # get all the pokemons that have high affinity with the pokemons in the input topic = list ( graph. neighbors ( pokem...
[ -0.2839907705783844, 1.273120641708374, 0.3674052059650421, -0.7741514444351196, -0.27371883392333984, 0.08301407098770142, -0.8405828475952148, -0.11377153545618057, -1.187154769897461, 0.8794249892234802, 0.5443640947341919, 0.35507312417030334, 0.339469313621521, 0.0812421441078186, -...
def _ async _ using ( domain : str, lock : optional [ keymasterlock ], entity _ id : optional [ str ], ent _ reg : optional [ entityregistry ], ) - > bool : if not ( lock or ( entity _ id and ent _ reg ) ) : raise exception ( " missing arguments " ) if lock : entity = lock. ent _ reg. async _ get ( lock. lock _ entity ...
[ 0.04466525465250015, 0.944114089012146, 0.5061172246932983, 0.33789798617362976, 0.4273380935192108, -0.30611827969551086, -0.6106113195419312, 0.022423788905143738, -0.25814127922058105, 0.6558330059051514, 1.2999610900878906, 0.8426815867424011, -0.31554272770881653, 0.4868190586566925, ...
def create _ with _ csv ( csv _ out _ name, csv _ in _ name, remove _ banner ) : with open ( csv _ in _ name,'r') as csv _ file _ in : csv _ reader = csv. reader ( csv _ file _ in ) with open ( csv _ out _ name,'w +') as csv _ file _ out : csv _ writer = csv. writer ( csv _ file _ out, delimiter = ', ', quoting = csv. ...
[ 0.15895679593086243, -0.0036077462136745453, 0.720812976360321, 0.4914953410625458, 0.4113742411136627, -0.06993892788887024, 0.19192923605442047, 0.6655031442642212, 0.1251055896282196, -0.13860686123371124, -0.25370389223098755, -0.17110306024551392, 0.38612353801727295, 0.54958146810531...
def on _ pushbutton _ time _ clicked ( self ) : # todo : not implemented yet self. sendcmdtime ( )
[ 0.2847476899623871, -0.02987975999712944, 0.5256900787353516, 0.14939746260643005, 0.36707964539527893, -0.20372804999351501, -0.45520561933517456, -0.48892682790756226, -0.13223838806152344, 1.69827401638031, -0.5360391736030579, -0.5547429919242859, -0.04038303345441818, 1.49783539772033...
def create _ template _ schema _ viewer _ from _ templates _ in _ db ( ) : # get all template in db templates = template _ api. get _ all _ templates ( ) for template in templates : try : # check if the templateschemaviewer does not exist already template _ schema _ viewer _ api. get _ by _ template _ id ( template. pk...
[ -0.44492107629776, 0.30144405364990234, 0.48870277404785156, 0.10918939858675003, 0.3085644245147705, -0.325386106967926, -0.27529510855674744, 0.8446840643882751, 0.4225766658782959, 0.028927305713295937, -0.5325965881347656, -0.8000130653381348, 0.32131341099739075, 1.2329660654067993, ...
def test _ failover ( self, primary _ cluster _ down, nodes _ multicluster, rdr _ workload, node _ restart _ teardown, ) : dr _ helpers. set _ current _ primary _ cluster _ context ( rdr _ workload. workload _ namespace ) primary _ cluster _ index = config. cur _ index node _ objs = get _ node _ objs ( ) scheduling _ i...
[ 0.12413694709539413, 0.14266517758369446, 0.737803041934967, 0.08979114890098572, 0.5737749338150024, 0.19284312427043915, 0.946758508682251, -0.42687681317329407, 0.013835079036653042, -0.18832503259181976, -0.09774970263242722, 0.20618857443332672, 0.16697683930397034, -0.197864189743995...
def close ( self ) : gevent. wait ( self. greenlets ) if self. step _ data : self. step _ data. presentation. finalize ( self. step _ stream ) self. step _ stream. close ( )
[ 0.2980290949344635, -0.724748432636261, 0.49619901180267334, -0.062089718878269196, -0.22442243993282318, 0.9918350577354431, 0.056344714015722275, 0.26809564232826233, -0.9903651475906372, -1.019418478012085, -0.10688796639442444, -0.539848804473877, -0.4963497221469879, 1.874154806137085...
def _ make _ zeros _ and _ ones ( cls ) : zeros _ and _ ones = displayio. bitmap ( 6 * cls. bit _ width, cls. bit _ height, cls. _ colors ) # # # draw background colours but leave right column blank for gap col _ idx = ( 3, 4, 5 ) x _ offset = 0 for col _ idx in col _ idx : for x in range ( x _ offset, x _ offset + 2 *...
[ -0.9863700270652771, -0.08890441060066223, 0.8803776502609253, -0.92524254322052, 0.0960020199418068, 0.08165831118822098, 0.9318219423294067, -0.7407506704330444, 0.6001304388046265, -0.31696903705596924, -0.3308505713939667, 0.39049479365348816, 0.1760880947113037, 0.36129432916641235, ...
def button _ split _ on _ own _ template ( self, cr, uid, ids, context = none ) : product _ attribute _ line _ obj = self. pool. get ('product. attribute. line') product _ attribute _ value _ obj = self. pool. get ('product. attribute. value') product _ attribute _ obj = self. pool. get ('product. attribute') product _...
[ -0.5943253040313721, -1.7284334897994995, 0.8969852328300476, -0.22951973974704742, -0.38061296939849854, -0.15575937926769257, 0.6527120471000671, -0.48779118061065674, 0.26222288608551025, 0.8389180898666382, -1.2045018672943115, 0.32914412021636963, 0.1969379484653473, 0.986363887786865...
def get _ total ( self ) : return sum ( self. get _ word _ counts ( ). values ( ) )
[ 0.8065630197525024, 0.20344196259975433, 0.4705445170402527, -0.7914335131645203, 0.831959068775177, -0.06930714845657349, 0.0985691174864769, -0.2053404450416565, -0.38264885544776917, 0.33184337615966797, 0.34458407759666443, 0.5162950158119202, -0.648154616355896, 0.19320285320281982, ...
def test _ get _ signup _ form ( self ) : pass
[ -0.4159957468509674, 0.39102986454963684, 0.29104939103126526, 0.465187132358551, 0.7677950263023376, -0.1184697076678276, 1.4336475133895874, 0.31106314063072205, -0.07533175498247147, -1.6361048221588135, -0.5516728758811951, -0.403533399105072, -0.2843526303768158, -1.2862510681152344, ...