text
stringlengths
25
2.19k
embedding
listlengths
768
768
def getdesktop ( ) : global stardesktop if stardesktop = = none : stardesktop = createunoservice ( " com. sun. star. frame. desktop " ) return stardesktop
[ -0.24802283942699432, 0.7743261456489563, 0.5240756869316101, 1.2711025476455688, -1.0015910863876343, -0.05569589138031006, 0.06366576999425888, -0.49410170316696167, 0.773545503616333, -1.1997967958450317, -0.4332447350025177, 0.5347014665603638, -0.47714120149612427, 0.2991761863231659,...
async def create _ zmq _ connection ( self, protocol _ factory, zmq _ type, *, bind = none, connect = none, zmq _ sock = none ) : try : if zmq _ sock is none : zmq _ sock = self. _ zmq _ context. socket ( zmq _ type ) elif zmq _ sock. getsockopt ( zmq. type )! = zmq _ type : raise valueerror ( " invalid zmq _ sock type...
[ -0.7326973080635071, -0.5313560962677002, 0.4908604323863983, 0.28280016779899597, -0.3999233543872833, -0.6455298662185669, -0.11580487340688705, -0.6778327226638794, 0.058087024837732315, 0.34473761916160583, 0.15290498733520508, 0.4995947778224945, -0.9686570763587952, 0.540701091289520...
def get _ raw ( self ) : return self. raw _ data
[ -0.5057799220085144, -0.16457322239875793, 0.2524128258228302, -0.31001320481300354, -0.6455278992652893, 0.5621994137763977, -0.8187093734741211, -0.6437132954597473, 0.043598271906375885, -1.2337011098861694, -0.16631631553173065, 1.0116416215896606, 0.6460036635398865, -0.46439790725708...
def _ operator _ fallbacks ( monomorphic _ operator, fallback _ operator ) : def forward ( a, b ) : if isinstance ( b, ( int, fraction ) ) : return monomorphic _ operator ( a, b ) elif isinstance ( b, float ) : return fallback _ operator ( float ( a ), b ) elif isinstance ( b, complex ) : return fallback _ operator ( c...
[ -0.23131300508975983, -0.0628008171916008, 0.7536291480064392, -0.3804614841938019, -0.26932239532470703, -0.48772892355918884, 0.8471314311027527, -0.008180061355233192, 0.03495249152183533, -0.19380663335323334, -0.4956292510032654, -0.27429789304733276, -0.007139892783015966, -0.5553040...
def init _ params ( self ) : if self. version is none : self. version = [ self. versions. net _ delay, self. versions. deadline ] if not isinstance ( self. version, list ) : self. version = [ self. version ]
[ -0.51939857006073, -0.29615265130996704, 0.3669711947441101, 0.28956544399261475, 0.31560036540031433, 0.8210265040397644, -0.6897529363632202, 0.8428249955177307, -0.2745662331581116, 0.6024544835090637, -1.1414923667907715, -0.07680794596672058, -0.18836455047130585, 1.6155511140823364, ...
def prepare _ shopify _ product _ for _ update _ export ( self, new _ product, template, instance, is _ set _ basic _ detail, is _ publish, is _ set _ price ) : if is _ set _ basic _ detail or is _ publish : self. shopify _ set _ template _ value _ in _ shopify _ obj ( new _ product, template, is _ publish, is _ set _ ...
[ -0.6548288464546204, -0.25338172912597656, 0.45225441455841064, 0.5667091608047485, -0.27383941411972046, 0.722044050693512, -0.31770825386047363, -0.36340001225471497, 0.6343821287155151, 0.8894389271736145, -0.5363445281982422, 0.35015878081321716, 0.16310912370681763, 0.0298749879002571...
def test _ atomic _ base64 _ binary _ enumeration _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 1 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 1. xsd ", i...
[ -0.6550339460372925, -0.8306001424789429, 0.5607604384422302, 1.376616358757019, 0.19449567794799805, 0.06795338541269302, 0.6674103736877441, 0.052680812776088715, 0.16914035379886627, 0.7636606097221375, -0.11908860504627228, 0.197125643491745, -0.3548623025417328, 0.15852366387844086, ...
def test _ atomic _ any _ uri _ length _ 4 _ nistxml _ sv _ iv _ atomic _ any _ uri _ length _ 5 _ 1 ( 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.12453730404376984, -0.21741774678230286, 0.35760316252708435, 0.8885466456413269, -0.3900476098060608, -0.3591603636741638, 0.25311222672462463, -0.46283555030822754, -0.234316885471344, 0.2295832484960556, -0.06796655803918839, -0.42506781220436096, -0.667486310005188, 0.43199557065963...
def is _ admin ( self ) : return self. role = = self. permissionchoice. admin \ or self. user. is _ staff
[ -0.4961291551589966, 0.4857074022293091, 0.3186034560203552, 1.03935706615448, 0.036032289266586304, 0.2619755268096924, -0.6509026288986206, -1.1329267024993896, 0.768599808216095, 0.3021971881389618, 1.1362098455429077, 1.4788681268692017, -0.38141241669654846, 0.44325411319732666, -0....
def get _ player _ state ( self ) : return self. get _ api _ v1 ( " me / player " )
[ -1.5526270866394043, -0.7469577789306641, 0.36573636531829834, 0.8967788219451904, -0.4627428650856018, -0.4683981239795685, -0.77053302526474, -0.7910983562469482, 0.5267270803451538, 0.030105512589216232, -0.5007950067520142, 0.7980835437774658, -0.9010840058326721, -0.7618637084960938, ...
def print _ modl _ sig ( modl, roi ) : # the sig column gets stars * * * or. for p < 0. 1, empty for p > 0. 1 for effect in modl. coefs. index : if effect = = " ( intercept ) " : # of course there is a non - zero intercept continue if modl. coefs. loc [ effect,'sig']! ='' : print _ log ( " significant effect of { effec...
[ 0.40204209089279175, -0.49010545015335083, 0.6413203477859497, -0.40026187896728516, -0.1909959763288498, 0.16941416263580322, -0.09000080078840256, 0.28732284903526306, 0.1871803253889084, 0.2645743787288666, -0.48427852988243103, 0.5905982851982117, -0.43950238823890686, 0.15892298519611...
def _ _ repr _ _ ( self ) : output ='\ n'output + ='robot state : \ n'output + ='\ t x = { : 6. 2f }, y = { : 6. 2f }, hdg = { : 6. 2f } \ n '. format ( self. robot. x, self. robot. y, self. robot. bearing * 180. / pi ) output + ='locations reached : { } \ n '. format ( self. reached _ locations ) output + ='remaining ...
[ -0.18712301552295685, -1.2790371179580688, 0.5550722479820251, -1.5035533905029297, -0.9140571355819702, 0.3989143669605255, -0.20199351012706757, -0.5611796379089355, -0.11830645799636841, -0.045418646186590195, -0.0637742280960083, 0.10371187329292297, 0.6272216439247131, -0.184668079018...
def _ _ str _ _ ( self ) - > str : return str ( self. _ _ dict _ _ )
[ -0.33452990651130676, -1.724190592765808, 0.5494548082351685, -1.4641408920288086, -0.8634861707687378, 0.8294766545295715, -0.4684443473815918, -0.4492897391319275, 0.25741153955459595, -0.329319566488266, 0.9514384865760803, 0.7380936741828918, 0.5575076341629028, -0.48787784576416016, ...
def handle _ other _ factory _ method ( attr, minimum, maximum ) : if attr = ='percentage': if minimum : minimum = ast. literal _ eval ( minimum ) else : minimum = 0 if maximum : maximum = ast. literal _ eval ( maximum ) else : maximum = 100 val = random. uniform ( minimum, maximum ) return val # if ` attr ` isn't spec...
[ -0.9333571195602417, -0.12616126239299774, 0.4318503439426422, -0.37762075662612915, -0.7671403288841248, -0.3762316405773163, -0.14620032906532288, -0.8711850643157959, -0.23511077463626862, -0.039593297988176346, 0.5511443614959717, -0.19785086810588837, 0.9463524222373962, 0.16573423147...
def region ( self ) - > optional [ pulumi. input [ str ] ] : return pulumi. get ( self, " region " )
[ 0.7329532504081726, 0.4287255108356476, 0.21755269169807434, -0.15690095722675323, 0.7977968454360962, 1.209448218345642, 0.8268726468086243, -0.12466927617788315, 1.0406135320663452, -0.1533542424440384, 0.6837860941886902, 1.0941147804260254, 0.09942789375782013, -1.0025651454925537, -...
def get _ class _ urls ( cazy _ home, excluded _ classes, max _ tries, logger ) : class _ urls = crawler. get _ cazy _ class _ urls ( cazy _ home, excluded _ classes, max _ tries, logger ) try : if len ( class _ urls ) = = 0 : logger. error ( " failed to retrieve urls to cazy class pages. \ nterminating program " ) sys...
[ -1.558091640472412, 0.4541760981082916, 0.435761034488678, 0.5947414636611938, 0.4481237828731537, 0.05243493244051933, 0.06122395023703575, 0.6689755320549011, 0.2494756132364273, 0.06792310625314713, -0.26648151874542236, -0.129466712474823, 0.06091400980949402, 1.1215788125991821, 0.9...
def train _ test _ split ( df, n ) : # create two copies of our dataframe that we can modify df _ test = df. copy ( deep = true ) df _ train = df. copy ( deep = true ) # group by user _ id and select only the last n item # test dataframe df _ test = df _ test. groupby ( ['user _ id'] ). tail ( n ) df _ test = df _ test...
[ -0.7275692820549011, 0.31034401059150696, 0.6393668055534363, -0.04059728607535362, 0.1553003191947937, -0.40625661611557007, 0.1163676381111145, 0.3344130218029022, -0.1772002875804901, 0.32161745429039, 0.15351653099060059, 0.6268483400344849, -0.9236848950386047, -0.5157210826873779, ...
def multi _ variant _ gaussian ( x, mu, sigma2 ) : assert ( x. shape [ 0 ] = = mu. shape [ 0 ] ) xn = x - mu var = np. diag ( sigma2. squeeze ( ) ) k = xn. shape [ 0 ] p = ( ( 2 * np. pi ) * * ( - k / 2 ) ) * ( np. linalg. det ( var ) * * ( - 0. 5 ) ) * np. exp ( - 0. 5 * np. sum ( np. dot ( np. linalg. pinv ( var ), x...
[ 0.24684718251228333, -0.3124410808086395, 0.6464138031005859, 0.543438196182251, -1.4195518493652344, -0.04990067332983017, -0.6923653483390808, 0.17614547908306122, 0.38608574867248535, 1.156113862991333, -0.28627249598503113, 1.0836776494979858, -0.1446666121482849, -0.34083858132362366,...
def _ getch _ windows ( prompt ) : print ( prompt, end = " " ) key = msvcrt. getch ( ) if ord ( key ) = = 224 : key = msvcrt. getch ( ) return key print ( key. decode ( ) ) return key. decode ( )
[ -0.19962529838085175, 0.09404546767473221, 0.30799898505210876, 0.876015841960907, -0.5936279296875, -1.0764821767807007, -0.22334755957126617, -0.6463922262191772, -0.16830934584140778, 0.07821982353925705, -0.13967452943325043, 0.9408640265464783, -1.6943669319152832, -0.4634333252906799...
def about ( ) : return render _ template ('about. html')
[ 1.0314371585845947, 0.11960245668888092, 0.30025866627693176, 0.7428718209266663, 0.11700402200222015, 0.2432006597518921, 0.1406620442867279, 1.289851188659668, -1.0799651145935059, 0.3077375888824463, 0.6821244955062866, -0.5258241891860962, -0.18466302752494812, 0.6857105493545532, -0...
def getdevicetype ( self, typeid ) : devicetypeurl = apiclient. devicetypeurl % ( self. host, typeid ) r = requests. get ( devicetypeurl, auth = self. credentials, verify = self. verify ) status = r. status _ code if status = = 200 : self. logger. debug ( " device type was successfully retrieved " ) return r. json ( ) ...
[ -1.7668126821517944, -0.1296597570180893, 0.6713244915008545, 0.4324331283569336, 0.02298657037317753, -0.8974826335906982, 0.050383493304252625, -1.127223253250122, 0.17871597409248352, 0.47056713700294495, -0.07344093918800354, 0.928817629814148, -1.493467926979065, 0.6595383882522583, ...
def reduce _ one _ dimension ( self ) : if self. domains [ " secondary " ] = = [ ] : return self. orphans [ 0 ] elif self. domains [ " tertiary " ] = = [ ] : return primarybroadcast ( self. orphans [ 0 ], self. domains [ " secondary " ] ) else : domains = { " primary " : self. domains [ " secondary " ], " secondary " :...
[ -0.16133549809455872, 0.034425947815179825, 0.6497815847396851, -1.0184825658798218, -0.07419372349977493, -0.1145908460021019, 0.4640806317329407, -0.267094224691391, 0.6358599066734314, 0.1115182638168335, 0.37971246242523193, 1.837946891784668, -0.47219571471214294, -0.15139995515346527...
def connect ( self ) - > none : try : # create a connection with the specified server, port and timeout self. _ _ logger. debug ( " creating socket for % s : % s ", self. _ _ server, self. _ _ port ) self. _ _ socket = socket. create _ connection ( ( self. _ _ server, self. _ _ port ), self. _ _ timeout ) except socket...
[ -0.3964376449584961, 0.3774004876613617, 0.6151449680328369, -0.07391934841871262, 0.05237533524632454, 0.0628315657377243, -0.3184489905834198, 0.1700524538755417, -1.1241950988769531, -0.4428587555885315, 0.132563054561615, 0.39791348576545715, -0.7188742756843567, 0.6466390490531921, ...
def day _ low _ high ( stock, all _ dates = none ) : assert stock is not none and len ( stock ) > = 3 quotes = quotation. objects. filter ( asx _ code = stock ) \. filter ( fetch _ date _ _ in = all _ dates ) \. exclude ( error _ code = " id - or - code - invalid " ) rows = [ ] for q in quotes : rows. append ( {'date':...
[ -0.6091654896736145, -0.07462310791015625, 0.566448450088501, -0.21365080773830414, 0.4769202172756195, -0.33494821190834045, -0.7166865468025208, -0.20731595158576965, -0.24889980256557465, -0.2424406111240387, 0.4982002079486847, 0.6339658498764038, 0.37328580021858215, 0.155820205807685...
def laplace _ rgb ( image ) : return filters. laplace ( image )
[ 0.061776306480169296, -0.30018237233161926, 0.22677387297153473, -0.6343534588813782, 0.0652519166469574, 0.3655349016189575, -0.03336301073431969, -0.6040903925895691, 0.26945802569389343, 0.3550960123538971, 0.6696889400482178, 0.4303908944129944, -0.6512205600738525, 0.29344192147254944...
def rotationmatrix ( axis, angle ) : k = np. matrix ( [ [ 0, - axis [ 2 ], axis [ 1 ] ], [ axis [ 2 ], 0, - axis [ 0 ] ], [ - axis [ 1 ], axis [ 0 ], 0 ] ] ) r = np. eye ( 3 ) + np. sin ( angle ) * k + ( 1 - np. cos ( angle ) ) * np. linalg. matrix _ power ( k, 2 ) return r
[ -0.031310439109802246, -0.1854943037033081, 0.7034478783607483, -0.2065201997756958, 0.009347913786768913, -0.20244310796260834, -0.11802517622709274, 0.5603607892990112, -0.21662954986095428, 0.7374823093414307, 0.05872545391321182, 0.3112192749977112, -0.2693421244621277, -0.866993784904...
def get _ scale ( prev _ pose, cur _ pose ) : x _ ref, y _ ref, z _ ref = prev _ pose x _ cur, y _ cur, z _ cur = cur _ pose return np. sqrt ( ( x _ cur - x _ ref ) * * 2 + ( y _ cur - y _ ref ) * * 2 + ( z _ cur - z _ ref ) * * 2 )
[ 0.7111017107963562, -1.2380512952804565, 0.7586683630943298, -0.7442358732223511, 0.006027630064636469, -0.06205710396170616, 0.0931909903883934, -0.2351790964603424, -0.8992480039596558, 1.0671043395996094, 0.24891938269138336, 0.3266724944114685, -0.8028445243835449, -0.21082551777362823...
def cyclecapitalizationstyle ( self, inputevent = none ) : currentstyle = _ settingsmanager. getsetting ('capitalizationstyle') if currentstyle = = settings. capitalization _ style _ none : newstyle = settings. capitalization _ style _ spell full = messages. capitalization _ spell _ full brief = messages. capitalizatio...
[ -0.7344993948936462, -0.1501363068819046, 0.7383793592453003, 0.5878753066062927, -0.2939693033695221, -0.10045810788869858, 0.9308256506919861, -0.7163820862770081, 0.3877306878566742, 0.7892469763755798, 0.23988232016563416, 0.05332469567656517, -1.0656120777130127, 0.6749042272567749, ...
def test _ atomic _ language _ max _ length _ 4 _ nistxml _ sv _ iv _ atomic _ language _ max _ length _ 5 _ 1 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / language / schema + instance / nistschema - sv - iv - atomic - language - maxlength - 5. xsd ", instance = " nistda...
[ 0.20461340248584747, -0.056869376450777054, 0.1167808324098587, 0.7094743847846985, -0.787505030632019, 0.1500990390777588, -0.05492870509624481, -0.21827462315559387, 0.07727817445993423, 0.9415550231933594, -0.6416698098182678, -0.22671988606452942, -0.39512649178504944, 0.15780802071094...
def train ( self, x, v, u, w, b, c, h0 ) : m, _ = self. w. shape k, npts = x. shape h0 = np. zeros ( ( m, npts ) ) # initial hidden states h = np. zeros ( ( m, npts ) ) # hidden states after one pass a = np. zeros ( ( m, npts ) ) # one pass values p = np. zeros ( ( k, npts ) ) # normalized output probabilities for itr ...
[ 0.04835272580385208, -0.11307916790246964, 0.6720374226570129, -0.9127963185310364, -0.8434666395187378, -0.039064157754182816, 0.6612293720245361, 0.4460679888725281, -0.7726198434829712, 0.20031917095184326, -0.48122695088386536, -0.11435052007436752, -0.16425152122974396, -0.31983190774...
def change _ fleet _ direction ( aliens, ai _ settings ) : for alien in aliens. sprites ( ) : alien. rect. y + = ai _ settings. fleet _ drop _ speed ai _ settings. fleet _ direction * = - 1
[ -1.460797667503357, 0.12848830223083496, 0.6678912043571472, 0.31326353549957275, 1.0953186750411987, -0.4554669260978699, 0.17128127813339233, 0.33733972907066345, -0.5335185527801514, 0.2197655737400055, -0.3608177602291107, -0.27042102813720703, 1.006047010421753, 0.9890627264976501, ...
def _ _ add _ _ ( self, other ) : add _ val = 1 if isinstance ( other, encryptedmessage ) : if self. pub! = other. pub : raise valueerror ( " public keys don't match " ) # to add two ctxts we just multiply them together add _ val = other. ctxt elif isinstance ( other, ( int, long ) ) : # to add an int k, we multiply by...
[ 0.07963991910219193, 0.107208751142025, 0.6731425523757935, 0.20960989594459534, -0.33138248324394226, -0.2320779263973236, -0.5234502553939819, -1.3447473049163818, 1.0386128425598145, -0.12788228690624237, 0.1378173828125, 0.5461307764053345, -1.4370784759521484, 0.38673821091651917, -...
def panbrailleindirection ( panamount = 0, pantoleft = true ) : if pantoleft : return braille. panleft ( panamount ) else : return braille. panright ( panamount )
[ 0.4170916676521301, -0.24942761659622192, 0.4499284327030182, 0.24270984530448914, -0.8169047236442566, 0.6724960803985596, -0.13123051822185516, 0.02930649183690548, 0.5004310011863708, -0.15239398181438446, -0.4191291332244873, 0.008362770080566406, -1.0114558935165405, 0.056444086134433...
def test _ load _ config _ from _ file ( ) - > none : file _ like = stringio ( " " " [ compaction. constants ] c = 3. 14 " " " ) config = load _ config ( file _ like ) expected = { " constants " : { " c " : 3. 14, " porosity _ min " : 0. 0, " porosity _ max " : 0. 5, " rho _ grain " : 2650. 0, " rho _ void " : 1000. 0,...
[ 0.9616331458091736, -0.2243460714817047, 0.36229896545410156, -0.3002150356769562, -0.5436007380485535, 0.5401679873466492, -0.5032867789268494, 0.7206011414527893, -1.2332669496536255, 0.60757976770401, -1.011802315711975, -0.7040683031082153, 0.2084009349346161, 0.3791068494319916, 0.7...
def slugify ( text ) : non _ safe = [ c for c in text if c in non _ url _ safe ] if non _ safe : for c in non _ safe : text = text. replace ( c,'' ) # strip leading, trailing and multiple whitespace, convert remaining whitespace to _ text = u'_ '. join ( text. split ( ) ) return text. lower ( )
[ 0.04201711341738701, 0.21626166999340057, 0.5961503982543945, -1.0214314460754395, -0.5170812606811523, -0.09035935997962952, -0.7683245539665222, 0.963226318359375, 0.08458735048770905, 0.17859137058258057, -0.8118281960487366, 0.25175994634628296, -0.7903305292129517, 0.3329760730266571,...
def test _ atomic _ base64 _ binary _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 5. xsd ...
[ -0.6676889061927795, -0.9443382620811462, 0.4332274794578552, 1.0906448364257812, -0.40380170941352844, -0.2698858678340912, 0.44054192304611206, -0.7485838532447815, -0.7264566421508789, 0.725090742111206, -0.9130193591117859, 0.25517505407333374, -0.6713700890541077, 0.5331725478172302, ...
def test _ results ( self ) : output = str ( self. output ) expected _ output = [ " runtest ( plugin. mock _ tests. related _ tests. relatedtestcase )... ok ", " ran 1 test in ", ] self. assertin ( expected _ output [ 0 ], output ) self. assertin ( expected _ output [ 1 ], output )
[ 0.3438561260700226, -0.35400161147117615, 0.38003093004226685, 0.2981679439544678, 0.8918396234512329, -0.051493700593709946, 1.2777529954910278, 0.07417074590921402, 0.1205320730805397, -0.8850575685501099, -0.11089549958705902, -0.6385557055473328, -0.8388239741325378, -0.046858366578817...
def test _ logged _ out _ message _ add ( self ) : with self. client as c : response = c. post ( " / messages / new ", data = { " text " : " hello " }, follow _ redirects = true ) self. assertequal ( response. status _ code, 200 ) self. assertin ( " access unauthorized ", str ( response. data ) )
[ 0.037606894969940186, 0.11449017375707626, 0.6054523587226868, 0.11762063205242157, 0.4393894374370575, 0.9084107279777527, -0.35910385847091675, -0.47394534945487976, 0.18418937921524048, -0.9412317276000977, -0.0382554866373539, 0.4598175883293152, -0.2772986590862274, 0.1284652948379516...
def rebuildall ( self, env, prefix, glossary _ index, author = " < author > " ) : pre _ text = self. text index _ name = " / ". join ( [ prefix, glossary _ index ] ) for p in wiki. wikisystem ( env ). get _ pages ( prefix ) : if p! = index _ name : self. addpagelink ( model. wikipage ( env, p ), author ) # = = = = = = ...
[ -0.9722540974617004, -0.9774070382118225, 0.6828359365463257, -0.12766508758068085, 0.23867931962013245, -0.2994017004966736, 0.25436216592788696, 1.1093724966049194, 0.7364173531532288, -0.028322765603661537, -0.38672563433647156, 0.19507735967636108, -0.8043204545974731, 0.26816248893737...
def getnextposition ( self, oldpos, direction ) : # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # you have to make changes here # see direction dictionary in config. py and add # this to oldpos to get new position of the peg if moved # in given direction, you can remove next line ret...
[ -0.47633519768714905, -0.9502622485160828, 0.6875370144844055, -0.5612007975578308, -0.9463067650794983, -0.1445276290178299, -0.3062284588813782, 0.48577868938446045, 0.06228894367814064, 0.5214080810546875, -0.4452885091304779, -0.02334296703338623, -0.5355220437049866, 0.450153529644012...
def build _ response _ card ( title, subtitle, options, image = none ) : buttons = none if options is not none : buttons = [ ] for i in range ( min ( 5, len ( options ) ) ) : buttons. append ( options [ i ] ) return {'contenttype':'application / vnd. amazonaws. card. generic ','version': 1,'genericattachments': [ {'tit...
[ -0.23765945434570312, -0.7105852365493774, 0.6048586964607239, -0.6431220769882202, -0.10734626650810242, -0.10236501693725586, -0.8169453740119934, -0.6491794586181641, 0.5920377969741821, 0.24702169001102448, -0.5819662809371948, 0.2346644550561905, 0.11614564061164856, -0.53466749191284...
def test _ atomic _ qname _ white _ space _ nistxml _ sv _ iv _ atomic _ qname _ white _ space _ 1 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / qname / schema + instance / nistschema - sv - iv - atomic - qname - whitespace - 1. xsd ", instance = " nistdata / atomic /...
[ -0.46485742926597595, -0.6010311245918274, 0.48080122470855713, -0.039094895124435425, -0.2935827076435089, 0.13537569344043732, 0.029223408550024033, -0.9677231907844543, 0.3315371572971344, 0.48194149136543274, -0.056821420788764954, 0.3921118676662445, 0.2114943265914917, 0.827522695064...
def test _ example _ loader ( app, example _ message _ factory ) : msg = example _ message _ factory ( " subject ", " body " ) assert msg. subject = = " subject " assert msg. body = = " body "
[ 0.5729706287384033, -0.06449202448129654, 0.2466929703950882, -0.36419346928596497, -0.34186503291130066, 0.6359391212463379, -1.1291906833648682, -0.639850914478302, -0.12818530201911926, -0.5063302516937256, -0.6896950602531433, 0.694830596446991, 0.20130985975265503, 1.0056649446487427,...
def withdraw ( self, account _ name, amount ) : if self. account _ exists ( account _ name ) : success = self. accounts [ account _ name ]. withdraw ( amount ) if success : note = " withdrawal of { } from { } accepted " self. report ( note. format ( amount, account _ name ) ) return true else : note = " withdrawal of {...
[ -0.07369807362556458, 0.7981212735176086, 0.7494882941246033, -0.6515729427337646, 0.01626560278236866, 0.5135343074798584, 0.2629372477531433, 0.6297236084938049, 0.6229546070098877, -0.18807949125766754, 0.11151552200317383, 0.03160553798079491, -0.6009507179260254, -0.11587099730968475,...
def list _ top _ contact ( self ) : print ('- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -') print _ contact ( {'name':'name ','phone':'phone ','outgoing':'outgoing call'}, top = true ) print ('- - - - - - - - - - - - - -...
[ 0.512519121170044, -1.36533522605896, 1.2320001125335693, -0.37157583236694336, -0.9908545613288879, 0.19739219546318054, 0.4730220139026642, -0.8203486204147339, -0.45618996024131775, 0.05051694065332413, -0.1047438308596611, 0.516875147819519, -0.0772528201341629, 0.7164528965950012, -...
def sample _ sphere _ distance ( distance _ min = 0, distance _ max = 1, size = none, random _ state = " random - seed " ) : random _ state = get _ random _ state ( random _ state ) # since the differential distribution is dp / dr ~ r ^ 2, # we have a cumulative distribution # p ( r ) = a * r ^ 3 + b # with p ( r _ min...
[ 0.07763197273015976, -0.39561882615089417, 0.7700397372245789, -0.5207517743110657, -1.0183405876159668, 0.8146344423294067, 0.018889836966991425, 0.675595223903656, 1.7208887338638306, 0.30062296986579895, -0.7503423690795898, 0.7059328556060791, -0.15273933112621307, -0.9039162397384644,...
def get _ full _ name ( self, reverse = false ) : if reverse : return ', '. join ( [ self. last _ name, self. first _ names ] ) else : return''. join ( [ self. first _ names, self. last _ name ] )
[ -0.04223911836743355, 0.020446980372071266, 0.9541593194007874, -0.6072161793708801, -0.055302850902080536, 0.22574354708194733, -1.2765344381332397, 0.16610661149024963, -0.23017765581607819, 0.2698371112346649, 0.09660584479570389, 0.42933204770088196, -0.41120070219039917, 0.12716454267...
def boxplots ( ) : fig, ax = plt. subplots ( 1, 2, figsize = [ 8, 3 ] ) all _ overal _ min = [ ] for j, error _ method in enumerate ( ['absolute ','mean squared'] ) : all _ best = [ ] all _ last = [ ] cooling ='linear'filename ='sa _'+ cooling +'_'+ error _ method + '. csv'with open ( filename ) as csvfile : reader = c...
[ 0.36274147033691406, -0.25219589471817017, 0.8308038115501404, -0.05059021711349487, 0.07691223174333572, -0.03964240103960037, 0.3776896595954895, -0.4445226788520813, -0.08848407119512558, -0.16590434312820435, 0.21604692935943604, 1.0565992593765259, 0.6658797264099121, 0.06197423487901...
def test _ atomic _ base64 _ binary _ min _ length _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ min _ length _ 5 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - minlength - 5. xsd ...
[ 0.28533467650413513, -0.5479434728622437, 0.3144892752170563, 0.8106318712234497, -0.43300968408584595, -0.3386676609516144, 0.06384479999542236, -0.8758224844932556, -0.3369382321834564, 0.41491931676864624, -0.8617240786552429, 0.20059311389923096, -0.9570058584213257, 0.3001050055027008...
def get _ account _ holds ( self, accountid ) : return self. trading _ api _ request ('get ','/ api / v1 / accounts /'+ accountid +'/ holds')
[ -0.31075236201286316, 0.3808514475822449, 0.3716775178909302, -0.0965636819601059, 1.0763822793960571, 0.40005916357040405, -0.33413809537887573, -0.9896312952041626, 1.0527985095977783, -0.3559319078922272, -0.1016370952129364, 1.0906647443771362, -0.6484493017196655, 0.5823737978935242, ...
def sd _ coef ( c _ mk, gam ) : vs = np. zeros ( c _ mk ) incr = c _ mk / 100 while prod _ erf ( vs / np. sqrt ( 2 ) ) < = ( 1 - gam ) : vs = vs + ( np. ones ( c _ mk ) * incr ) vs _ erf = prod _ erf ( vs / np. sqrt ( 2 ) ) print ( " had vs satisfied the condition with erf ( vs / sqrt ( 2 ) ) = " + str ( vs _ erf ) + "...
[ 0.7504791021347046, -0.3326834738254547, 0.48597007989883423, -0.03536710888147354, -0.5299685001373291, -0.3186262547969818, 0.7645750641822815, -0.6030495166778564, 0.06554560363292694, 0.21102136373519897, 0.08762294799089432, 1.3293229341506958, 0.4446268379688263, 0.08362002670764923,...
def test _ model _ tree ( self ) : treestring = " ( a, b, c ) " for tree in ( treestring, make _ tree ( treestring = treestring ), none ) : mod = evo _ app. model ( " hky85 ", tree = tree ) expect = none if tree is none else make _ tree ( treestring = treestring ) self. assertisinstance ( mod. _ tree, expect. _ _ class...
[ -0.12998990714550018, 0.42019373178482056, 0.23726844787597656, -0.38982462882995605, 0.3689720630645752, 0.03308764845132828, -0.6509077548980713, -0.49179646372795105, 0.14474572241306305, 0.1405695229768753, -0.5492354035377502, -0.04286767914891243, 0.07063566148281097, 0.6300565004348...
def _ _ init _ _ ( self, parent, add _ callback, close _ callback ) : tk. frame. _ _ init _ _ ( self, parent ) self. _ add _ cb = add _ callback self. _ close _ cb = close _ callback parent. title ('add song using url') # frames self. top _ frame = tk. frame ( self. master ) self. top _ frame. grid ( row = 0, padx = 30...
[ 0.04362141713500023, 0.4736157953739166, 1.1396068334579468, -0.21840262413024902, -0.35353565216064453, 0.3200112581253052, 0.9157031774520874, -0.2521789073944092, 0.15752728283405304, 0.11078191548585892, -0.18859830498695374, -0.28140613436698914, 0.07796350866556168, 1.539181113243103...
def _ read _ from _ internal _ buffer ( self, read _ fn ) : self. _ read _ buffer. seek ( self. _ read _ position ) result = read _ fn ( ) self. _ read _ position + = len ( result ) self. _ uncompressed _ position + = len ( result ) self. _ read _ buffer. seek ( 0, os. seek _ end ) # allow future writes. return result
[ -0.42189058661460876, -0.8134065866470337, 0.5936718583106995, -0.5546706914901733, -0.19222483038902283, -0.5273987054824829, 0.5689400434494019, -0.2924331724643707, -0.7886627912521362, -1.242753267288208, 0.39949384331703186, -0.25940507650375366, 0.022224348038434982, -1.3071857690811...
def _ render ( value, deps ) : tpl = {'@': value } tpl _ vars = { } for dep _ name, dep _ node in deps. items ( ) : tpl _ vars [ dep _ name ] = dep _ node. value # so we can render this value # load template environment tpl _ env = jinja2. environment ( loader = jinja2. dictloader ( tpl ) ) # register all globals and f...
[ -0.7045093178749084, 0.16754090785980225, 0.44862520694732666, -1.4067858457565308, -0.808533787727356, 0.38929829001426697, -0.8418287634849548, -0.35835155844688416, 0.04120539128780365, 0.8745023012161255, -0.07475361227989197, -0.3167724907398224, 0.2536873519420624, 0.3898760676383972...
def to _ int ( obj : any ) - > symbolicexpression | int : if isinstance ( obj, symbolicexpression ) : return obj. expr _ cls ( int,'int ( { } ) ', [ obj ] ) return int ( obj )
[ 0.034591104835271835, -0.15841245651245117, 0.23112289607524872, 0.02893325686454773, -0.292636901140213, -0.5658683776855469, 1.2451553344726562, 0.4572694003582001, 0.6186809539794922, 0.10698045790195465, -1.208958625793457, 0.783977746963501, -0.2615307569503784, 0.05859081447124481, ...
def test _ example _ input _ one _ valid _ length _ name ( self, ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) : input _ page = inputpage ( ucc _ smartx _ selenium _ helper, ucc _ smartx _ rest _ helper ) input _ page. create _ new _ input. select ( " example input one " ) input _ page. entity1. exam...
[ -0.1955670714378357, 0.4042495787143707, 0.4449032247066498, -0.2602471113204956, 0.030604928731918335, 1.1147540807724, 0.09071098268032074, -0.04866329953074455, 0.7382894158363342, 0.645294725894928, -0.886049747467041, -0.216297447681427, -0.06027573347091675, 0.17646564543247223, 0....
def deserialize _ safe _ map ( cls, byts ) : subkeytype, subvaltype = cls. subtypes unpack = uint16 _ unpack length = 2 numelements = unpack ( byts [ : length ] ) if numelements = = 0 and len ( byts ) > 2 : unpack = int32 _ unpack length = 4 numelements = unpack ( byts [ : length ] ) p = length themap = ordereddict ( )...
[ -0.13275358080863953, 0.1477406769990921, 0.841912567615509, -0.26014184951782227, -0.9781779646873474, -0.31130728125572205, -0.08665735274553299, -0.13264380395412445, 0.2862076759338379, -0.26505324244499207, -1.0653741359710693, 0.028276365250349045, -0.3438921570777893, -0.96671247482...
def _ b _ mod _ ( b, p ) : rr = b. divmod ( p ) return rr. second
[ -0.14154423773288727, 0.525600254535675, 0.26868128776550293, 0.618920624256134, 0.304844468832016, -0.3570486307144165, -0.5074738264083862, 0.10428520292043686, -0.16643992066383362, 0.5425801873207092, 0.07932256162166595, 0.43859630823135376, -1.373598575592041, -0.5561200380325317, ...
def test _ atomic _ base64 _ binary _ enumeration _ 4 _ nistxml _ sv _ iv _ atomic _ base64 _ binary _ enumeration _ 5 _ 3 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / atomic / base64binary / schema + instance / nistschema - sv - iv - atomic - base64binary - enumeration - 5. xsd ...
[ -0.6424428224563599, -0.3240206837654114, 0.5399214625358582, 0.9950648546218872, -0.1623324304819107, 0.10232246667146683, 0.38943612575531006, -0.6449194550514221, -0.039644476026296616, 0.6958767771720886, -0.7140964865684509, -0.08429297059774399, -0.9384483695030212, 0.157397896051406...
def test _ list _ decimal _ max _ length _ 1 _ nistxml _ sv _ iv _ list _ decimal _ max _ length _ 2 _ 2 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / decimal / schema + instance / nistschema - sv - iv - list - decimal - maxlength - 2. xsd ", instance = " nistdata / list / ...
[ -0.5030369758605957, -0.5171858668327332, 0.40723440051078796, 0.9925859570503235, -0.2674136757850647, -0.10253274440765381, -0.6066814064979553, 0.3919014632701874, 0.45248427987098694, -0.24262389540672302, -1.224001169204712, 0.03479012846946716, 0.5008421540260315, 0.7040797472000122,...
def test _ formingmagicsquare ( ) : assert formingmagicsquare ( s = [ [ 4, 9, 2 ], [ 3, 5, 7 ], [ 8, 1, 5 ] ] ) = = 1 assert formingmagicsquare ( s = [ [ 4, 8, 2 ], [ 4, 5, 7 ], [ 6, 1, 6 ] ] ) = = 4
[ -0.6960223913192749, -0.6764177083969116, 0.4893099367618561, 0.40279144048690796, -0.31659048795700073, -0.8987376093864441, 0.21225333213806152, 0.05495815724134445, 0.7054576873779297, -0.20911303162574768, -0.6790424585342407, -0.14986950159072876, 0.3047555387020111, 0.613218307495117...
def _ startmanualtest ( options ) : browser _ to _ create = browser _ finder. findbrowser ( options ) print'starting browser : % s.'% options. browser _ type with browser _ to _ create. create ( options ) as _ : # loop until we get a response that we can parse. while true : sys. stderr. write ('revision is [ ( g ) ood ...
[ -0.24182188510894775, -0.19481410086154938, 0.6057180166244507, 0.5758553743362427, 0.35418128967285156, 0.17356225848197937, 0.8121522665023804, -0.5705494284629822, 0.39482539892196655, -0.4777542054653168, 0.782364547252655, 0.629072368144989, -0.5302804708480835, 0.24062156677246094, ...
def createqospolicy ( ctx, # mandatory main parameter name, # non mandatory subparameter of a mandatory main parameter ( not fully decomposed ) miniops = none, # non mandatory subparameter of a mandatory main parameter ( not fully decomposed ) maxiops = none, # non mandatory subparameter of a mandatory main parameter (...
[ -0.1783028542995453, 0.24144764244556427, 0.8735781311988831, 0.07630163431167603, 0.11890514940023422, 0.8422920107841492, -0.534692645072937, -1.1206932067871094, 0.5498860478401184, 0.22556768357753754, -0.3333331048488617, 0.5001025199890137, -0.7521631717681885, -0.44693711400032043, ...
def _ _ init _ _ ( self, function : callable, gradient : callable ) : super ( ). _ _ init _ _ ( function ) self. _ gradient = gradient
[ 0.21231798827648163, 0.7365479469299316, 0.43165311217308044, 0.29847270250320435, -0.028570812195539474, 0.15246917307376862, -0.29402512311935425, 0.025237396359443665, -0.6526747941970825, 0.09598873555660248, -0.6942580342292786, 0.9382597804069519, 0.6181953549385071, 0.53572446107864...
def gen2dsample _ square ( num : int, func : callable, maxval : float ) : count = 0 sample = np. zeros ( ( num, 2 ) ) while count < num : z = np. random. rand ( 2 ) u = np. random. rand ( 1 ) val = func ( z [ 0 ], z [ 1 ] ) if u < val / maxval : sample [ count ] = z. copy ( ) count + = 1 print ( count ) return sample
[ -0.8748524785041809, 0.35346999764442444, 0.6319093704223633, 0.7330730557441711, -0.9935283660888672, -0.12569928169250488, 0.8365033864974976, -0.2844555377960205, 0.12263691425323486, -0.5050500631332397, -0.3213275074958801, 1.0469471216201782, 0.9539493918418884, -0.0417921356856823, ...
def partition ( items, group _ sizes ) : i = 0 for group in group _ sizes : yield items [ i : i + group ] i + = group
[ -0.13292312622070312, 0.1021326407790184, 0.6053266525268555, -0.06845057010650635, -0.16010504961013794, -0.11880939453840256, -0.10420358180999756, -0.6181320548057556, -0.3434019982814789, 0.4255705177783966, 0.3679327964782715, -0.5001065731048584, -0.8632413744926453, -0.7079821228981...
def makegraph ( rdf _ object ) : g = rdflib _ to _ networkx _ multidigraph ( rdf _ object ) # plot networkx instance of rdf graph pos = nx. spring _ layout ( g, scale = 2 ) edge _ labels = nx. get _ edge _ attributes ( g,'r') nx. draw _ networkx _ edge _ labels ( g, pos, labels = edge _ labels ) nx. draw ( g, with _ la...
[ 0.5052635073661804, 0.3062823712825775, 0.6680017709732056, -0.47012585401535034, -0.7655360698699951, 1.1688872575759888, 0.7607499957084656, 0.14450882375240326, 1.136551022529602, -0.7734414339065552, -1.1037778854370117, 0.10677940398454666, -0.1120915338397026, -0.37203195691108704, ...
def gen ( ) : while true : ret, frame = cap. read ( ) label = none if np. shape ( frame ) = = ( ) or ret = = false or frame is none : print ( " error reading webcam " ) continue ( frame, label ) = detect _ mask ( frame ) encode _ return _ code, image _ buffer = cv2. imencode ( '. jpg ', frame ) io _ buf = io. bytesio (...
[ -0.07458022981882095, -0.42658600211143494, 0.8498085141181946, 1.2015266418457031, -0.10613013058900833, 0.16570185124874115, 0.2511030435562134, -1.2485215663909912, 0.14171630144119263, -0.03671739250421524, 0.005334210116416216, 0.7300570607185364, 0.02890736423432827, 0.51500433683395...
def test _ list _ integer _ enumeration _ 2 _ nistxml _ sv _ iv _ list _ integer _ enumeration _ 3 _ 5 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - enumeration - 3. xsd ", instance = " nistdata / list / ...
[ -0.7683823108673096, -0.5268646478652954, 0.5113274455070496, 0.33023110032081604, -0.3832894265651703, 0.28499945998191833, -0.10286767780780792, 0.5333982706069946, 0.918134868144989, 1.1313273906707764, -1.3326647281646729, -0.20291824638843536, -0.3182884454727173, 0.4419754445552826, ...
def _ _ extract _ user _ info ( self, url _ list, output ) : try : # obtain url from list with open ( url _ list,'r ', encoding = " utf - 8 " ) as file : self. content = file. readlines ( ) if self. content! ='' : self. content = [ x. strip ( ) for x in self. content ] for user in self. content : profile _ info = insta...
[ -0.6340502500534058, -0.8906383514404297, 0.4431734085083008, 0.7786954045295715, -0.057374753057956696, -0.17563505470752716, 0.7901835441589355, -0.13101136684417725, -0.5401054620742798, 0.06482391804456711, -1.129516839981079, -0.5323699116706848, -0.28148454427719116, 1.07380330562591...
def test _ v1 _ auth ( self ) : def fake _ do _ request ( cls, url, method, headers = none, body = none ) : if url. find ( " 2. 0 " )! = - 1 : self. fail ( " invalid v1. 0 token path ( % s ) " % url ) headers = headers or { } resp = webob. response ( ) if ( headers. get ('x - auth - user')! ='user1'or headers. get ('x ...
[ -0.29100704193115234, -0.1967972368001938, 0.6293617486953735, 0.7719406485557556, -0.29842591285705566, -0.06195218488574028, -0.14900237321853638, -0.414389044046402, 0.28412339091300964, 0.4483039081096649, -0.5012074112892151, 0.3033868074417114, 0.24781173467636108, -0.162918448448181...
def games ( player, arms, nb _ trials, nb _ games ) : best _ mean = max ( [ a. mean ( ) for a in arms ] ) chosen _ arm = np. zeros ( ( nb _ games, nb _ trials ) ) reward = np. zeros ( ( nb _ games, nb _ trials ) ) expected _ reward = np. zeros ( ( nb _ games, nb _ trials ) ) expected _ best _ reward = np. zeros ( ( nb ...
[ -0.11737029999494553, 0.3064236044883728, 0.492147833108902, -0.8522248268127441, 1.0698834657669067, 0.11427944898605347, 0.1622723639011383, -0.7150987982749939, -0.5990541577339172, 0.7330101132392883, -0.004987928085029125, 0.6623144149780273, 0.2653365433216095, -0.11018750816583633, ...
def locusoffocuschanged ( self, event, oldlocusoffocus, newlocusoffocus ) : if not newlocusoffocus : orca _ state. nofocustimestamp = time. time ( ) return if newlocusoffocus. getstate ( ). contains ( pyatspi. state _ defunct ) : return if self. utilities. issameobject ( oldlocusoffocus, newlocusoffocus ) : return try ...
[ 0.4992142617702484, -1.475236177444458, 0.5750722885131836, -0.2548736035823822, -0.1957310289144516, -0.4006446897983551, 0.2758404612541199, -0.19561277329921722, 0.6534256935119629, 0.16892410814762115, 0.09841285645961761, 0.6482028365135193, -0.09888456016778946, 0.2314562201499939, ...
def average ( lst : list ) - > list : average _ = 0 return _ list = [ ] for item in lst : x, y, z = item average _ = ( x + y + z ) / / 3 # integer division return _ tuple = ( average _, average _, average _ ) return _ list + = [ return _ tuple ] return return _ list
[ -1.316535472869873, 0.6721456050872803, 0.37152227759361267, 0.9099246263504028, 0.5527260899543762, 0.7204716205596924, -0.0004015881277155131, 0.27418088912963867, -0.19902655482292175, 1.1279312372207642, -1.5884311199188232, -1.2186046838760376, -0.18054835498332977, 0.1563243120908737...
def is _ expired ( self, db _ item, scraped _ items ) : try : next ( item for item in scraped _ items if db _ item. ad _ url = = item ['ad _ url'] ) # item exists both in db and scraped results, so not yet expired return false except stopiteration : # not in the scraped results return true
[ -0.8149374723434448, -0.019164979457855225, 0.32243070006370544, -0.09461202472448349, 0.1922115981578827, 1.0850887298583984, -1.1743780374526978, 0.18565335869789124, 0.10865850746631622, 0.8691595792770386, -0.1734236180782318, -0.26342129707336426, -0.5296218395233154, 0.38915258646011...
def separate _ digit _ text ( text ) : regex _ patter = re. compile ( r'( [ \ d ] + ) ( [ a - za - z ] + )') clean _ text = regex _ patter. sub ( r'\ 1 \ 2 ', text ) return clean _ text
[ -0.31359565258026123, -0.4268400967121124, 0.451735258102417, 0.24311068654060364, -0.700203537940979, 0.5405693054199219, 0.782974362373352, 0.7582729458808899, 0.7255547642707825, 0.015665020793676376, -1.1791239976882935, -0.4854297637939453, -0.5453332662582397, 0.43766480684280396, ...
def make _ cursor _ line ( size ) : # # # todo - work out how ( and where ) to do this elegantly font _ w = 6 width = ( font _ w - 1 ) * size height = 2 * size cursor _ line = displayio. bitmap ( width, height, 8 ) # # # todo... for pix _ idx in range ( width * height ) : cursor _ line [ pix _ idx ] = 6 # # # todo retu...
[ 0.5148268342018127, -0.4455595016479492, 0.49413514137268066, -0.45622044801712036, -0.6982614994049072, -0.3909916579723358, -0.11882206797599792, -0.8904441595077515, 0.6018370389938354, -0.4106024205684662, -0.42735159397125244, 0.3747003674507141, 0.23401331901550293, -0.20898957550525...
def kl _ divergence ( p, q, eps = 1e - 20 ) : return tf. math. reduce _ mean ( p * tf. math. log ( ( p + eps ) / ( q + eps ) ) - p + q )
[ 1.0781489610671997, 0.05634984001517296, 0.2752861976623535, -0.7605814933776855, -0.2550855576992035, 1.1613227128982544, -0.9962688088417053, 0.40808022022247314, 0.44666096568107605, 0.21747013926506042, 0.21913562715053558, 0.05102657899260521, 0.44521939754486084, -0.43558037281036377...
def test _ list _ integer _ length _ 3 _ nistxml _ sv _ iv _ list _ integer _ length _ 4 _ 4 ( mode, save _ output, output _ format ) : assert _ bindings ( schema = " nistdata / list / integer / schema + instance / nistschema - sv - iv - list - integer - length - 4. xsd ", instance = " nistdata / list / integer / schem...
[ -0.31625983119010925, -0.020149990916252136, 0.2806401550769806, 0.202091783285141, -0.09537853300571442, -0.0848042219877243, -0.38762348890304565, 0.2829630374908447, 1.0017365217208862, 0.6873219609260559, -0.9774113297462463, -0.7947429418563843, -0.6466598510742188, 0.3392769992351532...
def get _ prefilters ( self ) - > list [ scopefilter ] : return scopefilter. parse _ options ( self. _ options )
[ -0.9578170776367188, 0.4271257817745209, 0.5013331174850464, 0.4391535520553589, 1.0859308242797852, -0.620507538318634, -0.04068765416741371, -0.622901976108551, 1.098920226097107, 0.26315757632255554, -1.0788288116455078, 0.7658985257148743, -0.27868422865867615, 0.455939918756485, -1....
def create _ distortion _ matrix ( _ fx, _ cx, _ fy, _ cy ) : return np. array ( [ [ _ fx, 0, _ cx ], [ 0, _ fy, _ cy ], [ 0, 0, 1 ] ] )
[ -0.28811103105545044, -0.14948579668998718, 0.4631043076515198, -0.3467015027999878, 1.3484649658203125, -0.04156522452831268, 0.3400126099586487, -0.0611216202378273, -1.021680235862732, -0.16308560967445374, 0.07872533053159714, -0.33993327617645264, 0.2893771231174469, 0.041943646967411...
def reviewabove ( self, inputevent ) : context = self. getflatreviewcontext ( ) moved = context. goabove ( flat _ review. context. char, flat _ review. context. wrap _ line ) if moved : self. _ reviewcurrentitem ( inputevent, self. targetcursorcell ) return true
[ -0.6019138693809509, -0.5219627022743225, 0.6098608374595642, 0.021298164501786232, -0.6696656346321106, 1.3202546834945679, -0.24300305545330048, -0.42633041739463806, -0.33609694242477417, 0.535467267036438, -0.4212277829647064, 0.29463377594947815, -0.5135825276374817, -0.17182394862174...
def _ _ init _ _ ( self, name, fullname, limitname ) : self. _ name = name self. _ fullname = fullname self. _ limitname = limitname if limitname else name if name in process. _ _ processes _ _ : raise keyerror ( " process with name { 0 } defined twice ". format ( name ) ) process. _ _ processes _ _ [ name ] = self
[ 0.8291553258895874, -0.8414021730422974, 0.717240035533905, -0.3977360129356384, -0.5868646502494812, -0.18761944770812988, -0.3429040312767029, -0.32563942670822144, 0.28775012493133545, -0.3110465109348297, -0.9591532945632935, 0.6637850999832153, -0.010063727386295795, -0.34933057427406...
def deck _ of _ cards ( self ) : return self. _ deck _ of _ cards
[ 0.3530590236186981, 0.2531346082687378, 0.3768272399902344, 0.44902411103248596, 0.3081579804420471, -0.3882446885108948, 0.11895487457513809, -0.13143698871135712, 0.30004796385765076, -1.3079677820205688, 0.5013831257820129, 0.1564246416091919, 0.7410001158714294, 0.004415709525346756, ...
def load _ data ( database _ filepath ) : engine = create _ engine ( f'sqlite : / / / { database _ filepath }') df = pd. read _ sql _ table ('disasterresponse ', engine ) # creating the x and y datasets x = df. loc [ :,'message'] y = df. iloc [ :, 4 : ] # creating list of category _ names category _ names = y. columns ...
[ 0.05641895905137062, 0.5557719469070435, 0.4772210717201233, -1.3460575342178345, 0.4901356101036072, 0.02737339399755001, -0.49362510442733765, -0.16801145672798157, -0.5258901119232178, -0.16045045852661133, 0.1468248963356018, -0.5656670331954956, 0.011196037754416466, -0.61866742372512...
def media _ album _ name ( self ) - > str | none : if self. _ currently _ playing. get ( " item " ) is none : return none return self. _ currently _ playing [ " item " ] [ " album " ] [ " name " ]
[ -0.3562166392803192, -1.1900856494903564, 0.47007623314857483, 0.8993174433708191, 0.057998623698949814, 0.7164910435676575, 0.42742571234703064, -0.8967092037200928, 0.16152051091194153, 1.1251592636108398, -0.034186940640211105, 0.3043998181819916, -0.7985072731971741, -0.144300073385238...
def test _ inbound _ delay _ seconds ( self ) : batch _ id, all _ keys = ( yield self. msg _ seq _ helper. create _ inbound _ message _ sequence ( msg _ count = 3, delay _ seconds = 2 ) ) timestamps = [ parse _ vumi _ date ( ts ) for _, ts, _ in all _ keys ] self. assertequal ( timestamps [ 0 ] - timestamps [ 1 ], time...
[ 0.4684273600578308, -0.20050659775733948, 0.575147807598114, 0.5226536989212036, 0.34496572613716125, 0.6436084508895874, -0.4789292812347412, -0.3428184986114502, -0.803529679775238, -0.3237333595752716, -0.8159840106964111, 0.13901102542877197, 0.07233861833810806, 0.23201659321784973, ...
def remove _ authorized _ key ( pub _ key _ file = '. ssh / id _ rsa. pub ', key _ name = none ) : mkdir _ ssh ( ) if key _ name : repo ='git @ bitbucket. org / magnet - cl / keygen. git'local ('git archive - - remote = ssh : / / { } master { } | tar - x '. format ( repo, key _ name ) ) pub _ key = open ( key _ name ) ...
[ 0.6411053538322449, 0.11197073012590408, 0.4699731767177582, 0.5928537845611572, -0.5607699155807495, 0.5562797784805298, -0.3132465183734894, 1.7151738405227661, -1.2675669193267822, 0.4583956003189087, 0.07082613557577133, 0.28849726915359497, -0.3356751799583435, 1.0250440835952759, 0...
def start _ game ( stats, aliens, bullets, ship, ai _ settings, screen, sb ) : # resets dynamic settings ai _ settings. initialize _ dynamic _ settings ( ) # hide the mouse cursor pygame. mouse. set _ visible ( false ) # reset the game statistics stats. reset _ stats ( ) stats. game _ active = true # renders in score i...
[ -0.07819420099258423, 0.22458501160144806, 0.4049835801124573, 0.5734444856643677, 1.4058706760406494, -0.1946815848350525, 0.24447813630104065, -0.33765244483947754, -0.015269210562109947, 0.4970530569553375, 0.12169434130191803, 0.1708376556634903, 0.815515398979187, 0.5086451172828674, ...
def _ reslice ( self, xslice, yslice, data, xy _ range ) : # - check boundaries xmin, xmax, ymin, ymax = xy _ range if xslice. start < xmin : dx = xmin - xslice. start xslice = slice ( xmin, xslice. stop ) data = data [ :, dx : ] if xslice. stop > xmax : dx = xslice. stop - xmax xslice = slice ( xslice. start, xmax ) d...
[ -0.2985812723636627, -0.19153010845184326, 0.9786128401756287, -0.5844155550003052, -0.27743619680404663, -0.30018147826194763, -1.2592597007751465, -0.334807813167572, 0.06177534535527229, 0.2711314260959625, 0.07882436364889145, 0.3916642665863037, 0.40991416573524475, -0.660108864307403...
def esm _ analysis ( ) : import esm _ analysis with temporarydirectory ( ) as cache _ dir : esm _ analysis. reader. _ cache _ dir = path ( cache _ dir ) esm _ analysis. cacheing. _ cache _ dir = path ( cache _ dir ) yield esm _ analysis
[ -0.30578139424324036, -0.3613030016422272, 0.503006637096405, -0.058827709406614304, -0.3250857889652252, -0.3985123932361603, 0.7032429575920105, 0.14502544701099396, 0.5510020852088928, -0.32120588421821594, 0.18617887794971466, 0.061115916818380356, 1.128896951675415, 0.2534730732440948...
def uninstall ( spack _ path, sroot, package ) : spack _ bin = os. path. join ( spack _ path,'bin ','spack') cmd = [ spack _ bin,'view ','- v ','- d ','false ','rm ','- - no - remove - dependents ', sroot, package ] run _ cmd ( cmd ) cmd = [ spack _ bin,'uninstall ','- y ','- f ','- a ', package ] run _ cmd ( cmd )
[ 0.7657591104507446, 0.9022290706634521, 0.7897182106971741, -0.7194809913635254, -0.35869917273521423, -0.27351683378219604, 0.7438313364982605, 1.2846795320510864, 0.256495863199234, -0.4081781804561615, -0.2405492514371872, 0.38351085782051086, -0.435880571603775, -0.19332574307918549, ...
def _ handle _ tf _ scalar ( self, wrapped _ scalar _ f, name, data, step = none, description = none ) : # pylint : disable = unused - argument vals = self. _ summary _ values ( step ) if vals : self. log. debug ( " summary values via scalar : % s ", vals ) for tag, val in vals. items ( ) : if val is not none : wrapped...
[ 0.2830319106578827, 0.09381575137376785, 0.23914392292499542, 0.18494310975074768, -0.24423065781593323, -0.7655407190322876, -0.022610822692513466, 0.015318145044147968, -0.9125992059707642, -0.0678815096616745, 0.15095999836921692, 0.2609233856201172, 1.0057164430618286, 1.02249658107757...
def get _ td _ lm _ allmodes ( template = none, * * kwargs ) : input _ params = props ( template, lm _ allmodes _ required _ args, * * kwargs ) # get required args mfinal = input _ params ['mfinal'] sfinal = input _ params ['sfinal'] lmns = input _ params ['lmns'] # the following may not be in input _ params delta _ t ...
[ -0.11151785403490067, 0.2311764806509018, 0.778890073299408, -0.07606865465641022, -0.20900766551494598, 0.342318594455719, -0.5160776972770691, 0.008944982662796974, -0.24320662021636963, 0.2649400234222412, -0.03610553219914436, -0.5839905142784119, 0.5813095569610596, 0.5563384294509888...
def read _ rmh ( dir, output, threads, chunksize ) : files = [ xml _ file for xml _ file in glob ( f'{ dir } / * * / *. xml ', recursive = true ) if not ( xml _ file. endswith ('rmh2hdr. xml') or xml _ file. endswith ('rmh1hdr. xml') ) ] log. info ( f'processing dir = { dir }, files found = { len ( files ) }') for line...
[ 0.3245791494846344, -0.7909060120582581, 0.783179521560669, 0.3699369728565216, -0.39399734139442444, 0.16108159720897675, 0.17287896573543549, -0.29668179154396057, -1.1476742029190063, 0.16849777102470398, 0.7447277307510376, -0.10182490944862366, -0.5637852549552917, 0.6853940486907959,...
def add _ bom _ parser _ args ( parser, defaults ) : if hasattr ( parser,'added _ gce _ image _ project') : return parser. added _ gce _ image _ project = true add _ parser _ argument ( parser,'publish _ gce _ image _ project ', defaults, none, help ='project to publish images to.')
[ -0.08076459169387817, 0.4934566020965576, 0.39848822355270386, -0.09519672393798828, 1.069239854812622, 0.1854734867811203, 0.005262657068669796, -0.3168134093284607, -0.4447518587112427, 0.285098135471344, -0.03483831509947777, 0.08780313283205032, -0.4946294128894806, 0.9728236794471741,...
def beta _ schedule ( self, t ) : beta = self. k * t assert beta > = 0, " error, beta = { }, k = { }, t = { } ". format ( beta, self. k, t ) return beta
[ -0.2714383602142334, -0.7544053196907043, 0.5487198233604431, -0.3461521565914154, 0.42218074202537537, 0.19830235838890076, -0.7297107577323914, -0.7775436639785767, -1.5138522386550903, 0.38609251379966736, -0.33712199330329895, -0.03424758464097977, -0.48555654287338257, 0.0599834471940...
def tanh ( x ) : try : return variable ( x. name, np. tanh ( x. val ), { k : v / ( np. cosh ( x. val ) * * 2 ) for ( k, v ) in x. der. items ( ) }, false ) except attributeerror : return np. tanh ( x )
[ 0.7538274526596069, 0.5115676522254944, 0.4264265298843384, -0.17222866415977478, -1.0697535276412964, 0.46070078015327454, -0.4374898672103882, -0.4127516448497772, -0.25000372529029846, -0.346998929977417, -0.32627183198928833, -0.07197294384241104, 0.38794469833374023, -0.58023935556411...
def test _ update _ market _ value _ of _ asset _ earlier _ date ( ) : start _ dt = pd. timestamp ('2017 - 10 - 05 08 : 00 : 00 ', tz = pytz. utc ) earlier _ dt = pd. timestamp ('2017 - 10 - 04 08 : 00 : 00 ', tz = pytz. utc ) later _ dt = pd. timestamp ('2017 - 10 - 06 08 : 00 : 00 ', tz = pytz. utc ) port = portfolio...
[ 0.6534888744354248, 0.6973287463188171, 0.765783429145813, -0.7055620551109314, 0.09551345556974411, -0.09107056260108948, 0.42993447184562683, -0.9118075966835022, -0.643994927406311, 0.09679102897644043, 0.13623955845832825, 0.5923901796340942, 0.228265643119812, -0.1402396559715271, -...