text
stringlengths
25
2.19k
embedding
listlengths
768
768
def outliercleaner ( predictions, ages, net _ worths ) : # cleaned _ data = [ ] # # # your code goes here # print ( predictions, ages, net _ worths ) size _ = len ( predictions ) print ( size _ ) abs _ = map ( lambda x : x * * 2, predictions - net _ worths ) map _ = zip ( ages, net _ worths, abs _ ) # 三 元 sorted _ = so...
[ -0.976921796798706, 0.03070439212024212, 0.7998150587081909, 0.8470914959907532, -0.21702413260936737, 1.1618280410766602, 0.03895637392997742, 0.08115345984697342, -0.18096859753131866, 0.1701500415802002, 0.1915535181760788, 0.3706957697868347, 0.29918164014816284, 0.3322441577911377, ...
def farm _ stop ( self, job _ ids ) : pass
[ -1.076195478439331, -0.9369711875915527, 0.1529647409915924, 0.3511037826538086, 0.6879104971885681, -0.1190243512392044, 0.08152437955141068, -0.06432991474866867, -1.1158441305160522, 0.4462663233280182, -0.17690955102443695, 0.17000511288642883, -0.38844823837280273, -0.347353458404541,...
def hide ( self ) : print " amsnwindow. hide " pass
[ 0.8708951473236084, -0.13473594188690186, 0.18256473541259766, 1.0155776739120483, -0.4322279393672943, 1.1761490106582642, 0.5166173577308655, -0.33346277475357056, 0.15293118357658386, -0.9394239187240601, -0.26726317405700684, 0.6927056312561035, -0.32811546325683594, -0.127915591001510...
def get _ orbit _ points ( tlrfiles ) : orbit _ points = [ ] # tlrfiles = prune _ a _ loads ( tlrfiles ) for tlrfile in tlrfiles : # parse thing like this : # 2012 : 025 : 21 : 22 : 21. 732 eqf013m 1722 proton flux entry for energy 0 level... # 012345678901234567890123456789012345678901234567890123456789 logger. info (...
[ -0.2184491902589798, -0.38123276829719543, 0.6494497656822205, -0.6051954030990601, -0.42148563265800476, 0.6912410259246826, -0.7303921580314636, 0.30239588022232056, -0.9041820764541626, 0.7145568132400513, -0.04149721935391426, -0.4177893400192261, 0.027249807491898537, 0.63444906473159...
def print _ tables ( ) : tab _ dict = orfipy. translation _ tables. translation _ tables _ dict print ('translation tables compiled from : ', tab _ dict ['source'] ) print ('table # ','name ','start ','stop') for k in tab _ dict : if'source'in k : continue print ( k, tab _ dict [ k ] ['name'],'['+ ', '. join ( tab _ di...
[ 0.2503894865512848, -0.06731151789426804, 0.6715869903564453, -0.7404346466064453, -1.0965538024902344, 0.7038452625274658, 0.27430233359336853, -0.34292274713516235, -1.1815671920776367, 0.40930694341659546, -1.0031189918518066, 0.42549657821655273, 0.5123136639595032, 0.10611836612224579...
def _ _ init _ _ ( self, obj ) : self. obj = obj
[ 0.006176390685141087, -1.0015748739242554, 0.34375864267349243, 0.4092911183834076, -0.5637316107749939, 0.9712947607040405, 0.6992565989494324, 0.08213488012552261, 0.8970324397087097, -0.5662539601325989, -1.1092305183410645, 0.3464730679988861, 0.6541996002197266, 0.4795752167701721, ...
def fix _ compatibility ( self ) : if'preferences'in self. sections ( ) : for option in self. options ('preferences') : self. set ('settings ', option, self. get ('preferences ', option ) ) self. remove _ section ('preferences') self. save ( ) if'recentfiles'in self. options ('recent') : paths = [ f. strip ( ) for f in...
[ -0.2767670750617981, -0.09797704964876175, 0.6627370119094849, 0.15455356240272522, 1.194690465927124, 0.11540291458368301, 0.5830996632575989, 0.5677012801170349, -0.33902043104171753, 0.7569381594657898, 1.1204798221588135, -0.7180615663528442, -0.7391210794448853, 0.9706858396530151, ...
def get _ decoder ( filename, mimetype = none ) : if mimetype is none : _, ext = _ splitext ( filename ) if ext. lower ( ) in ( '. htm ', '. html ', '. xhtml') : mimetype ='text / html'else : mimetype ='text / plain'if mimetype = ='text / plain': from pyglet. text. formats import plaintext return plaintext. plaintextde...
[ -0.3708536624908447, -0.6049361228942871, 0.5696402788162231, -0.27221086621284485, -1.1594781875610352, 0.5355257391929626, -0.4207303822040558, 0.1777743548154831, 0.19444578886032104, -0.1298283189535141, 0.28042837977409363, 0.3102995455265045, -1.0803608894348145, 0.46270865201950073,...
def transform ( self, x, y = none ) : x = self. square ( x ) x = self. log ( x ) x = self. sqrt ( x ) return x
[ -0.09878824651241302, -0.17537598311901093, 0.5799104571342468, -0.27462583780288696, -0.1473660171031952, -0.6572032570838928, -1.2882626056671143, -1.0125277042388916, 1.4665672779083252, -0.9117068648338318, -0.915455162525177, 1.0677313804626465, 0.0895489826798439, -0.5508272647857666...
def have _ dm ( self ) : for executable, config in ( ( " gdm ", " etc / gdm / custom. conf " ), ( " gdm3 ", " etc / gdm3 / daemon. conf " ) ) : bin _ path = " {! s } / usr / bin / {! s } ". format ( self. root _ mount _ point, executable ) sbin _ path = " {! s } / usr / sbin / {! s } ". format ( self. root _ mount _ po...
[ -0.4470056891441345, -0.0769817978143692, 0.6508619785308838, 0.23211947083473206, 0.2334110587835312, 0.057940442115068436, 0.040092479437589645, -0.15919379889965057, -0.6285941004753113, -0.4563438892364502, -0.07994626462459564, 0.024683166295289993, -0.20290511846542358, 1.43867778778...
def disconnect ( ) : env = environment ( loader = packageloader ('view ','templates'), autoescape = select _ autoescape ( ['html ','xml'] ) ) s = socket. socket ( socket. af _ inet, socket. sock _ dgram ) s. connect ( ( " 8. 8. 8. 8 ", 80 ) ) address = s. getsockname ( ) [ 0 ] s. close ( ) company _ details = {'name': ...
[ -0.5935147404670715, 0.9179538488388062, 0.8553774356842041, -0.5378316640853882, -0.14227518439292908, -0.2608621120452881, -0.04562772065401077, 0.0856223776936531, -0.38395971059799194, 1.0308219194412231, 0.5688598155975342, 0.454523503780365, -0.5336711406707764, -0.6125415563583374, ...
def uhf ( rng ) : p = 567629137 a = np. random. randint ( 1, p ) b = np. random. randint ( 0, p ) return lambda x : ( ( a * x + b ) % p ) % rng pass
[ -0.6984619498252869, 0.06262415647506714, 0.5341463685035706, -1.2620452642440796, -0.026898622512817383, 0.1582808494567871, 0.27900800108909607, 0.7634127736091614, 1.9787157773971558, -1.0968329906463623, 0.2389315813779831, -0.5102170705795288, 0.0004982828977517784, -0.738303601741790...
def noclook _ get _ ports ( handle _ id ) : return nc. get _ node _ model ( nc. graphdb. manager, handle _ id ). get _ ports ( )
[ 0.9593029022216797, 1.1921591758728027, 0.35185763239860535, 0.2706919312477112, 1.2599045038223267, -0.1804058849811554, 0.5935661792755127, -0.8637121319770813, -0.44724559783935547, -0.3810606002807617, -0.38190799951553345, 0.2948094308376312, -0.8021425008773804, 0.4665193557739258, ...
def dicts _ same ( dict1, dict2 ) : for key, val in dict1. iteritems ( ) : if key in dict2 : if type ( val ) is dict and type ( dict2 [ key ] ) is dict : dicts _ same ( val, dict2 [ key ] ) if val! = dict2 [ key ] : return false else : return false return true
[ -0.832852840423584, 0.024310940876603127, 0.9562188982963562, 0.4130961000919342, -1.0309758186340332, 0.3385620415210724, -0.0978856012225151, -0.027706073597073555, -0.027131875976920128, 0.524024486541748, -0.30211660265922546, 0.6260430812835693, -0.5550936460494995, 0.8873696327209473...
async def create _ table _ teacher _ application ( self, ctx ) - > none : if await self. table _ teacher _ application _ exists ( ) : return await ctx. send ( " * * table ` teacherapplication ` already exists! * * " ) mycursor, db = await the _ database ( ) await mycursor. execute ('''create table teacherapplication ( ...
[ -0.23068749904632568, -0.04265255853533745, 0.5578905344009399, 0.25364387035369873, 0.519143283367157, 0.6817054152488708, 0.5383619070053101, -0.39835068583488464, -0.6329858899116516, 0.5629085898399353, -0.36641693115234375, 0.560728907585144, -0.8544975519180298, 0.8849197626113892, ...
def entity ( case _ node, case _ result : str ) - > entity : name = case _ node. get ( " name ", " < nameless test case > " ) return dict ( key = name, name = name, class _ name = case _ node. get ( " classname ", " " ), test _ result = case _ result )
[ -0.6465569734573364, -0.8081964254379272, 0.27934038639068604, -0.6682731509208679, 0.0018702363595366478, -0.29745233058929443, 0.09222609549760818, -0.31950080394744873, 0.16256579756736755, 0.12506608664989471, -0.26324909925460815, -0.359853059053421, 0.17753060162067413, 0.47763845324...
async def update _ event _ manager _ application ( self, event _ manager _ id : int, txt _ id : int, vc _ id : int ) - > none : mycursor, db = await the _ database ( ) await mycursor. execute ('''update eventmanagerapplication set channel _ open ='yes ', txt _ id = % s, vc _ id = % s where event _ manager _ id = % s'' ...
[ 0.2280350625514984, -1.202568769454956, 0.4863411784172058, -0.602584719657898, -0.8117630481719971, 0.3944595456123352, -0.5532313585281372, 0.5678112506866455, -0.6193264126777649, 1.1727675199508667, 0.523731529712677, 0.7718266844749451, -0.9248901009559631, 0.4372580051422119, -0.19...
def get _ python2 _ github _ packages ( self ) : python2 _ only _ packages = set ( self. _ get _ python2 _ only _ packages ( ) ) github _ packages = set ( self. _ get _ all _ github _ packages ( ) ) python2 _ github _ packages = python2 _ only _ packages. intersection ( github _ packages ) return list ( python2 _ githu...
[ -0.4423748552799225, -0.6111374497413635, 0.46145379543304443, 1.2043622732162476, 0.6183621287345886, 0.3071351647377014, -0.7267553806304932, 0.18214929103851318, 0.7631487250328064, -0.14085042476654053, -0.199677973985672, 0.9318333864212036, -0.19526277482509613, 0.5945183634757996, ...
def wavwrite ( y, fs, filename ) : x = copy. deepcopy ( y ) # copy array x * = int16 _ fac # scaling floating point - 1 to 1 range signal to int16 range x = np. int16 ( x ) # converting to int16 type write ( filename, fs, x )
[ -0.3229261040687561, -0.05074442923069, 0.5113939642906189, 0.4277615547180176, 0.5278946161270142, -0.36075571179389954, 0.3416661322116852, -0.2665790915489197, 0.48063287138938904, 0.04347534850239754, -0.2633706033229828, 0.2567681074142456, 0.5940387845039368, 0.27784132957458496, 0...
def fit ( self, x, y = none ) : if self. lb and self. lb _ replacement is none : if self. replacement _ style = ='min _ max': self. lb _ replacement = np. min ( x [ self. col ] ) elif self. replacement _ style = ='med': med = np. nanmedian ( np. where ( x [ self. col ] > self. lb, x [ self. col ], np. nan ) ) self. lb ...
[ 0.2739296853542328, -0.16585685312747955, 0.6996902227401733, 0.35858240723609924, -0.25248485803604126, 0.48832249641418457, -0.7412341833114624, 0.06816526502370834, -0.1911243051290512, -0.26927652955055237, 0.014679302461445332, 1.2257415056228638, -0.24608543515205383, 0.1095108240842...
def main ( argv ) : epd = epd ( ) print ('panel = { p : s } { w : d } x { h : d } version = { v : s } cog = { g : d } film = { f : d } '. format ( p = epd. panel, w = epd. width, h = epd. height, v = epd. version, g = epd. cog, f = epd. film ) ) epd. clear ( ) demo ( epd )
[ 0.48723113536834717, -0.1780732125043869, 0.8747784495353699, -0.273688942193985, 0.1332891285419464, 1.0233627557754517, -0.014217603020370007, 0.1103818267583847, -0.15618208050727844, -0.3760002553462982, 0.11361782252788544, 0.998151421546936, 0.1982177048921585, 0.6306896209716797, ...
def all _ female ( self ) : for i in self : if self [ i ]. sex = = " 2 " : yield self [ i ]
[ -0.9238854646682739, -0.7000855207443237, 0.7269431352615356, 1.1319085359573364, -0.038742583245038986, -0.09943801909685135, -1.0627943277359009, -0.4548887312412262, -0.932622492313385, -0.1517474353313446, -1.0847965478897095, 0.5513877868652344, 0.553551971912384, 1.1119502782821655, ...
def config _ digest _ signed ( request ) - > formattedsha256 : return formattedsha256. parse ( get _ test _ data ( request, _ _ name _ _, " config _ signed. json. digest ", " r " ) )
[ -0.9535443782806396, -1.0662837028503418, 0.3931795060634613, 0.016157226637005806, 0.1881714016199112, -0.47134149074554443, -0.10875801742076874, -0.09131508320569992, 0.5382192134857178, 0.5939860343933105, 0.14287051558494568, -0.256527304649353, 0.41924336552619934, 0.0984686538577079...
def luma _ matrix _ vertical _ size ( self, luma _ matrix _ vertical _ size ) : # type : ( int ) - > none if luma _ matrix _ vertical _ size is not none : if not isinstance ( luma _ matrix _ vertical _ size, int ) : raise typeerror ( " invalid type for ` luma _ matrix _ vertical _ size `, type has to be ` int ` " ) sel...
[ 0.15324944257736206, -0.4697292447090149, -0.44427916407585144, 0.29970094561576843, 0.10799182951450348, 0.1360633671283722, -0.05272812023758888, 0.48761457204818726, -0.5662455558776855, -0.37006253004074097, -0.332817018032074, 0.08354580402374268, -0.578826904296875, -0.22122271358966...
def get _ mta _ fits _ data ( msid, start, stop ) : # # - - - find which year ( s ) the requested period falls # date = chandra. time. datetime ( start ) byear = int ( float ( date. year ) ) date = chandra. time. datetime ( stop ) eyear = int ( float ( date. year ) ) chk = 0 for year in range ( byear, eyear + 1 ) : # #...
[ -0.5437857508659363, -0.8095937967300415, 0.944522500038147, -0.3905310034751892, -0.547239363193512, 0.002207975834608078, 0.15174530446529388, -0.14662876725196838, -0.30632466077804565, 0.7019532322883606, 0.3786742687225342, 0.7932976484298706, -0.12368807941675186, 0.8878054618835449,...
def test _ tutorial _ list ( self ) : self. client. login ( username = self. user. username, password ='test') resp = self. client. get ( self. url ) self. assertequal ( booking. objects. all ( ). count ( ), 1 ) self. assertequal ( resp. status _ code, 200 ) self. assertequal ( resp. context _ data ['purchased _ tutori...
[ -0.8442123532295227, 1.0670478343963623, 0.5282134413719177, 1.2371453046798706, 1.3196072578430176, 0.9382439255714417, 0.11135803908109665, 1.0309239625930786, 0.4326317608356476, -0.3862444758415222, -0.7525520324707031, -0.3722127676010132, 0.5386876463890076, -0.21067483723163605, -...
def test _ gf _ write _ feature _ footer _ no _ blank _ line _ if _ description ( disabled _ colors, capsys, mocker ) : # given feature = mocker. magicmock ( spec = feature ) feature. description = [ " foo " ] feature. rules = [ ] # when write _ feature _ footer ( feature ) # then stdout = capsys. readouterr ( ). out a...
[ 0.9532279968261719, 0.7392680644989014, 0.29664555191993713, 0.6892116069793701, 1.0860111713409424, 0.40993088483810425, -0.09082002937793732, -0.0015407371101900935, -0.5075039863586426, -0.2971307635307312, 0.4284164309501648, 0.017316026613116264, -0.25983256101608276, 1.54539310932159...
def create _ jet _ dictionary ( e, cluster = none, regression = false, r = 1. 0 ) : jet = { } if regression : ye = e [ - 1 ] e = e [ 0 ] jet [ " genpt " ] = ye t = cast ( e ) tree, content, mass, pt = cluster ( t, jet _ algorithm = 1, r = r ) [ 0 ] # dump highest pt jet only jet [ " root _ id " ] = 0 jet [ " tree " ] =...
[ 0.1814500391483307, 0.018071841448545456, 0.677776038646698, -0.6627708077430725, -0.8235947489738464, 0.508725106716156, 0.01676269806921482, -0.03553846850991249, -0.8978685140609741, 0.5819648504257202, -0.5903456211090088, -0.2764616310596466, -0.46172308921813965, 0.9571310877799988, ...
def contextualizedcorrection ( sent, words ) : count = 0 corrected _ sentence = sent words = words while ( count < = len ( corrected _ sentence ) - 2 ) : prevword = corrected _ sentence [ count ] nextword = corrected _ sentence [ count + 1 ] validwords = wordcounter ( ). keys ( ) inidial _ candidates = edits1 ( prevwor...
[ 0.6719165444374084, -0.05523098632693291, 0.8462924361228943, -0.4745115637779236, -0.2764070928096771, -0.6219059228897095, 1.3582338094711304, 0.8298397660255432, 0.0046960036270320415, 1.451204538345337, 0.1676620990037918, 0.9177036881446838, -0.9479359984397888, 0.2893389165401459, ...
def select _ season ( df, # df to slice, index should be datetime month _ lst # list of month for convective season ) : df = df. copy ( ) df _ conv _ season = df [ df. index. month. isin ( month _ lst ) ] return df _ conv _ season
[ -0.03982463851571083, -0.5472591519355774, 0.697993278503418, 0.8757978677749634, -0.219578817486763, 0.23627418279647827, 0.38575395941734314, -0.11205696314573288, 0.30348095297813416, 1.1237385272979736, 0.4553883969783783, 1.6976995468139648, -0.06561505049467087, -1.8756545782089233, ...
def p _ delete ( ) : conn, cursor = init _ db ( ) get _ id = request. args. get ('id') conn = get _ db ( ) cursor = conn. cursor ( ) cursor. execute ('delete from foundations where id =? ', ( get _ id, ) ) conn. commit ( ) return redirect ( url _ for ('main') )
[ 0.019366221502423286, 0.7876904010772705, 0.6047346591949463, 0.4635891318321228, 0.49773162603378296, -0.012059079483151436, 0.2668834626674652, 0.4461149573326111, -0.14403167366981506, -0.22182218730449677, 1.0231329202651978, -0.7140085101127625, -0.1645634025335312, 0.7067628502845764...
def onframeconfigure ( self, event ) - > none : self. canvas. configure ( scrollregion = self. canvas. bbox ( " all " ) )
[ 1.1558914184570312, 0.5200928449630737, 0.5621224641799927, 0.019943520426750183, -0.21618418395519257, -0.188402459025383, 0.1607438325881958, -0.7477200627326965, 0.18255266547203064, -1.1164741516113281, -0.5665427446365356, 0.4776029586791992, 0.3621647357940674, 1.3666114807128906, ...
def load _ file _ lines ( path : str ) - > list : with open ( path, " r ", encoding = " utf8 " ) as fh : lines = fh. readlines ( ) return lines
[ 0.3214944005012512, -0.5145618915557861, 0.28981876373291016, -0.6208575367927551, 0.11084381490945816, 0.5554888248443604, -1.6277061700820923, 0.3406134843826294, -0.45533445477485657, 0.5217477083206177, -0.3079116642475128, -0.4291938841342926, 0.2504420280456543, -0.2401697039604187, ...
def problem156 ( ) : answer = 0 for i in range ( 1, 10 ) : answer + = problem156 _ inner ( i ) return answer
[ -0.32189151644706726, 0.714347779750824, 0.38487857580184937, -0.13907533884048462, 1.0773452520370483, -0.4410029947757721, 0.4369940459728241, 0.29931092262268066, 0.5399676561355591, -0.4091075658798218, -0.5460371375083923, -0.27651306986808777, -0.9168781042098999, -0.3065765202045440...
def test _ lmdb _ insert _ empty _ value _ ok ( ) : with temporarydirectory ( ) as dbpath : env = lmdb. open ( dbpath ) with env. begin ( write = true ) as txn : key = b'foo'data = b'' txn. put ( key, data ) with env. begin ( ) as txn : cursor = txn. cursor ( ) assert cursor. first ( ) assert cursor. value ( ) = = b'' ...
[ -0.01458344142884016, 0.6253552436828613, 0.33354243636131287, -0.43932440876960754, 0.7629562020301819, 0.5734621286392212, 0.15649281442165375, 0.61235111951828, -0.7968468070030212, -0.11043127626180649, -0.7242202162742615, 0.02246660366654396, -1.239095687866211, 0.4299478828907013, ...
def log _ exception ( sender, exception, * * extra ) : sender. logger. debug ('got exception during processing : % s ', exception )
[ 0.1265588402748108, 0.19837108254432678, 0.6596843004226685, -0.4233325123786926, -0.1689382791519165, -0.7645900845527649, -0.7612015008926392, 0.7570746541023254, 0.5490517616271973, 0.44742491841316223, -0.9413068890571594, 0.24410247802734375, 0.5778107643127441, 0.5653139352798462, ...
def showelems ( self ) : definitions = self. definitions redefinitions = self. redefinitions for ( name, info ) in sorted ( definitions. items ( ), key = self. ekey ) : tag = info [ " tag " ] mixed = " mixed " if info [ " mixed " ] else " - - - - - " abstract = " abstract " if info [ " abstract " ] else " - - - - - - -...
[ -0.029419373720884323, -0.31441164016723633, 1.0271731615066528, -0.3790397346019745, -0.21958765387535095, 0.2524888217449188, -0.34980490803718567, -0.7494240999221802, -0.06688639521598816, -0.004553510341793299, -0.18239080905914307, 0.8525109887123108, 1.247227430343628, 1.35847508907...
def get _ dropbox _ dbfile ( filename ) : if sys. platform = = " win32 " : db _ path = os. path. expandvars ( " % appdata % / dropbox " ) db _ path = os. path. normpath ( os. path. join ( db _ path, filename ) ) else : notimplementederror ( " platform not supported " ) if not os. path. exists ( db _ path ) : raise ioer...
[ -0.13716207444667816, 0.18143460154533386, 0.590637743473053, -0.09240801632404327, 0.21487833559513092, 1.3159048557281494, 0.837082028388977, -0.32665175199508667, -0.799087405204773, -0.24042671918869019, 0.623323380947113, -0.31979209184646606, -0.3907075822353363, 0.413206547498703, ...
def _ transition ( self, concert _ client, new _ state ) : old _ state = concert _ client. state self. _ clients _ by _ state [ new _ state ] [ concert _ client. gateway _ name ] = concert _ client del self. _ clients _ by _ state [ old _ state ] [ concert _ client. gateway _ name ] return concert _ client. transition ...
[ 0.2671433091163635, -0.6822678446769714, 0.4750925302505493, -0.6153088808059692, -0.678127646446228, -0.15426543354988098, 0.3704614043235779, 0.09885474294424057, 0.15607132017612457, 1.3175733089447021, -0.7336946129798889, 0.696662425994873, -0.4660837948322296, -0.1635936051607132, ...
def get _ kadastrale _ afdeling _ by _ id ( self, aid ) : def creator ( ) : url = self. base _ url + " / department / % s " % ( aid ) h = self. base _ headers p = { " geometry " : " full ", " srs " : " 31370 " } res = capakey _ rest _ gateway _ request ( url, h, p ). json ( ) return afdeling ( id = res [ " departmentco...
[ 0.1212102398276329, 0.41499778628349304, 0.5053234696388245, -0.3103572428226471, -1.3698866367340088, -0.35461071133613586, -0.5196554064750671, -0.6029192805290222, 1.3474838733673096, 0.16966991126537323, 0.9290931224822998, 0.4794270992279053, 0.19355778396129608, 1.2613611221313477, ...
def new _ chat _ members ( self, bot : bot, update : update ) - > none : with self. db _ session ( ) as session : for member in update. message. new _ chat _ members : self. logger. info ( " new user joined : % s ", self. _ log _ user ( member ) ) quizpass = get _ active _ quizpass ( session, member. id ) allowed _ to ...
[ 0.18193437159061432, -0.9140551686286926, 0.5905982255935669, 0.7763152718544006, -0.3307107985019684, 0.4399966299533844, 0.013308304361999035, -0.5800901651382446, -0.6287566423416138, 0.2714413106441498, -0.6424358487129211, 0.09294839203357697, -0.9877565503120422, 0.326518714427948, ...
def extract ( self, sort = false ) : assert self. _ data is not none data = self. _ data self. _ data = none if sort : data. sort ( reverse = true ) return data
[ -0.12356793880462646, 0.16613788902759552, 0.6804890632629395, -0.12325598299503326, -0.6270997524261475, -0.2850112318992615, -0.2185077667236328, -0.5476987957954407, 0.008055298589169979, -0.7545447945594788, 0.053211234509944916, 0.29541483521461487, -0.671155571937561, 0.0470789186656...
def add _ alias _ field ( self, alias, field, units = none, force _ add = true ) : if alias in self. field _ info : if force _ add : ftype = self. field _ info [ alias ]. get ( " type ", " on - disk " ) if ftype in [ " alias ", " derived " ] : fl = self. derived _ field _ list else : fl = self. field _ list mylog. warn...
[ 0.12279365211725235, 0.08308243751525879, 0.7343306541442871, -0.0590653233230114, 0.8764128684997559, 1.6042309999465942, -0.003722146851941943, 0.05378638952970505, -0.7001011371612549, -0.28978094458580017, -0.36086004972457886, 0.3247844874858856, 0.26613926887512207, 0.362520605325698...
def maximum _ bytes _ per _ session ( self ) - > pulumi. output [ optional [ int ] ] : return pulumi. get ( self, " maximum _ bytes _ per _ session " )
[ 0.6354571580886841, -0.32338616251945496, 0.5884143710136414, 0.5938613414764404, -0.14202994108200073, 0.5283417701721191, 0.34888792037963867, -0.6111510396003723, 1.6370360851287842, -0.5832458734512329, 0.03017737716436386, 0.1850043684244156, -0.33902350068092346, -0.8599256873130798,...
def main ( ) : pat = sys. argv [ 1 ] txt = sys. argv [ 2 ] kmp = kmp ( pat ) print ( " text : { } ". format ( txt ) ) offset = kmp. search ( txt ) print ( " pattern : ", end ='' ) for i in range ( 0, offset ) : print ( " ", end ='' ) print ( pat )
[ 0.8207042217254639, -0.14449697732925415, 1.0235157012939453, -0.25982362031936646, -0.16865821182727814, 1.7906261682510376, 0.5962955355644226, 0.7102141976356506, -0.4712658226490021, 0.5561801195144653, 0.007062316406518221, 1.296195387840271, -0.30541133880615234, -0.4222365617752075,...
def tokenize ( input _ str, eos = 1 ) : # it takes streams and returns streams, # we get around it by making a 1 - element stream with ` iter `. inputs = next ( trax. data. tokenize ( iter ( [ input _ str ] ), vocab _ dir ='vocab _ dir / ', vocab _ file ='summarize32k. subword. subwords') ) # mark the end of the senten...
[ 0.2852826416492462, 0.3300768733024597, 0.5140135884284973, 0.5500586032867432, 0.23070669174194336, -0.20397824048995972, -0.12173677235841751, 0.6488107442855835, 0.16651420295238495, 0.4055687189102173, -0.46234649419784546, 0.5674101710319519, 0.45491963624954224, 0.43716487288475037, ...
def process _ login _ form ( ) : email = request. form. get ('email') password1 = request. form. get ('password') user = user. query. filter _ by ( email = email ). first ( ) if user : authenticated _ user = bcrypt. check _ password _ hash ( user. password, password1 ) if authenticated _ user : flash ( " login successf...
[ 0.28716039657592773, 0.09479860216379166, 0.7109934091567993, 0.8746912479400635, 0.27096304297447205, 0.3983997404575348, 0.5856428146362305, -0.3205925226211548, -0.19850556552410126, 0.18462206423282623, -0.39664793014526367, 0.0019470601109787822, 0.2524808943271637, -0.579907357692718...
def openfile ( self ) - > none : self. image _ file _ name = filedialog. askopenfilename ( filetypes = ( ( " image file ", image _ formats ), ( " all files ", " *. * " ) ), title = " choose a file. " ) # if a file is selected, check its validity try : self. update _ root _ name ( ) self. error _ massage ['text'] = " " ...
[ -0.2456001192331314, -0.2828342318534851, 0.3115085959434509, 0.37245333194732666, -0.4746200144290924, 0.16339538991451263, 0.6630955934524536, 0.6763412356376648, -0.26531341671943665, -0.7625137567520142, 0.8757898211479187, 0.3763900101184845, -0.058436885476112366, 0.734677255153656, ...
async def async _ step _ confirm _ change _ plan ( self, user _ input : dict [ str, str ] | none = none, ) - > flowresult : if user _ input is not none : return await self. async _ step _ change _ plan ( ) return self. async _ show _ form ( step _ id = " confirm _ change _ plan ", data _ schema = vol. schema ( { } ) )
[ 0.2366018444299698, 0.05728398635983467, 0.26747095584869385, 0.5157951712608337, -0.5580239295959473, 0.038235053420066833, 0.04013452306389809, -0.01900522969663143, -0.04946212098002434, 0.4261413812637329, -0.1953873485326767, 1.7412476539611816, 0.4666571319103241, 0.4231339693069458,...
def step ( self, action ) : new _ frame, reward, done, info = self. env. step ( action ) # determine lives if info ['ale. lives'] < self. lives : life _ lost = true else : life _ lost = done self. lives = info ['ale. lives'] # process frame and append it to state processed _ frame = process _ atari _ frame ( new _ fram...
[ -0.5576398968696594, -0.25527501106262207, 0.6320810914039612, -0.40982967615127563, 0.7537173628807068, 0.033718641847372055, -0.5364673137664795, -0.6095408201217651, 0.47352099418640137, 0.06280199438333511, -0.24340304732322693, 0.06731005012989044, 0.3625102639198303, 0.57122957706451...
def test _ resample _ to _ bin2 _ from _ bin2 _ returns _ same ( self ) : ccd = ccddata ( np. zeros ( ( 10, 10 ) ), unit = u. adu ) ccd. header ['ccd - temp'] = - 20 ccd. header ['xbinning'] = 2 result = calibrationutils. resample _ to _ bin2 ( ccd ) self. assertequals ( result, ccd )
[ 0.06929676234722137, -0.5716844201087952, 0.3062134087085724, 0.4855363965034485, -0.34899887442588806, 0.4908137321472168, -0.6303731799125671, -0.5718091726303101, 0.24901199340820312, -1.0026028156280518, -1.2071934938430786, 0.9753248691558838, 0.2094944417476654, -0.14395396411418915,...
def _ _ init _ _ ( self ) : self. data = [ ]
[ -0.2026151418685913, -0.5582361817359924, 0.21747802197933197, -0.42536813020706177, 0.6204526424407959, 0.5932007431983948, -0.6523874998092651, 0.6153153777122498, 0.07371383905410767, -0.8884726166725159, -1.3908166885375977, 0.636775016784668, -0.05672529339790344, 0.9557230472564697, ...
def _ makevarlentensorrepresentation ( name : str, ragged : bool ) - > schema _ pb2. tensorrepresentation : if ragged : return schema _ pb2. tensorrepresentation ( ragged _ tensor = schema _ pb2. tensorrepresentation. raggedtensor ( feature _ path = path _ pb2. path ( step = [ name ] ) ) ) return schema _ pb2. tensorre...
[ 0.43420857191085815, -0.39887529611587524, 0.2874656617641449, -1.4456286430358887, -0.4460518956184387, -0.35074880719184875, -0.4797101616859436, 0.09957967698574066, 0.49603328108787537, 0.5894195437431335, -0.6031957268714905, 0.2260335087776184, 0.028999602422118187, -1.15510642528533...
def testgetvaluesforquerywithreadreturnpermissiondenied ( self ) : userapi ( ). create ( [ ( u'fred ', u'password ', u'fred ', u'fred @ example. com') ] ) user = getuser ( u'fred') permissions = cachingpermissionapi ( user ) tagapi ( user ). create ( [ ( u'fred / bar ', u'description'), ( u'fred / foo ', u'description'...
[ -0.020467784255743027, 0.9793388247489929, 0.5195515155792236, 0.04505782946944237, 0.5147217512130737, 0.4596858024597168, -0.3346009850502014, -0.8970816135406494, -0.5376976132392883, -1.0121608972549438, 0.2012515366077423, -0.2673981487751007, -0.07112880051136017, 0.32672029733657837...
def test _ 03 _ irrigation ( self ) : l _ irr = self. m _ api. read _ irrigation _ xml ( self. m _ pyhouse _ obj ) l _ obj = self. m _ api. write _ irrigation _ xml ( l _ irr ) # print ( prettyformatany. form ( l _ obj,'c1 - 03 - a - irrigate') ) self. assertequal ( self. m _ pyhouse _ obj. house. irrigation, { } )
[ -0.22107067704200745, -0.6752166748046875, 0.4797340929508209, -0.39999252557754517, 0.1984039694070816, 0.5211958289146423, 0.2627112567424774, 0.2255636304616928, 0.8357658982276917, -1.0174471139907837, 0.5911378860473633, 0.043673913925886154, -0.9420724511146545, -0.2930630147457123, ...
def _ getimport ( head, tail, alias ='', verify = true, builtin = false ) : # special handling for a few common types if tail in ['ellipsis ','notimplemented'] and head in ['types'] : head = len. _ _ module _ _ elif tail in ['none'] and head in ['types'] : _ alias ='% s ='% alias if alias else'' if alias = = tail : _ a...
[ 0.05791674554347992, -0.5509270429611206, 0.7969644069671631, -0.11401543766260147, -0.5261180400848389, -0.3567725718021393, 0.29661980271339417, -0.6595639586448669, 0.48387444019317627, 0.40025994181632996, -0.3593878149986267, 0.947884738445282, 0.43641477823257446, 0.34790194034576416...
def login _ session ( request, username ) : try : # authenticate / login. user = user. objects. get ( username = username ) user. backend ='django. contrib. auth. backends. modelbackend'login ( request, user ) except user. doesnotexist : messages. error ( request, " user % s does not exist " % ( username ) ) return req...
[ -0.6416223645210266, -0.5098466277122498, 0.6664763689041138, 0.49367302656173706, 0.3774314224720001, 0.17976413667201996, 0.8250129222869873, -0.5451961159706116, 0.26851457357406616, 0.00403140764683485, -1.3774348497390747, -0.5357905626296997, -0.1911534070968628, 0.04039067402482033,...
def is _ connected ( self ) : return self. _ client is not none
[ -0.0986858531832695, -0.5479079484939575, 0.4328831434249878, -0.07685910165309906, 0.5918295383453369, -0.22298577427864075, -0.981251060962677, -0.08667773008346558, -0.6992300748825073, -0.02759215235710144, -0.6756683588027954, -0.3442992866039276, -0.40698203444480896, -0.307160019874...
def retry _ options ( self ) : return self. _ _ retry _ options
[ 0.41171953082084656, -0.4199468195438385, 0.3704844117164612, 0.5190180540084839, 0.9355719089508057, 0.3495134115219116, 0.32970085740089417, -0.8164284229278564, 0.4505464732646942, -0.11997580528259277, -0.6105161905288696, 1.0552103519439697, -0.26274561882019043, -0.6537374258041382, ...
def delete _ ip ( args ) : connectcouchdb ( ) file = raw _ input ('enter a filename of ips :') with open ( file ) as json _ file : data = json. load ( json _ file ) for p in data ['info'] : try : if portable _ ip _ db [ p ['_ id'] ] : print p ['_ id'], " in repo " doc = portable _ ip _ db [ p ['_ id'] ] print doc ['_ i...
[ -0.7268765568733215, -0.16761557757854462, 0.4529290199279785, -0.35082653164863586, -0.39436575770378113, 0.7973995804786682, -0.20190711319446564, 0.6486949324607849, -1.0542747974395752, 0.6503143310546875, 0.2668002247810364, -0.8615347743034363, -0.8559026718139648, -0.890730738639831...
def move _ homes _ around ( array, s ) : # preinitialise the familiarity / diversity arrays n = array. shape [ 0 ] familiarity _ array = np. zeros ( ( n, n ) ) diversity _ array = np. zeros ( ( n, n ) ) moves = 1 # continually perform this process until moves = 0. that is, until no more houses move while moves > 0 : # ...
[ -0.7135525345802307, -0.21410945057868958, 0.6780493855476379, -0.16267453134059906, 0.8190422654151917, -0.5134389996528625, 1.1145894527435303, -0.11152831465005875, 0.44107958674430847, 0.0325368233025074, 0.48960694670677185, 0.5713340044021606, -0.03543678671121597, 0.9573436975479126...
def detrend ( signals, degree = 2 ) : _, len _ signal = signals. shape x = np. array ( [ np. power ( np. arange ( len _ signal ), k ) for k in range ( degree + 1 ) ] ). t hat = x. dot ( np. linalg. inv ( x. t. dot ( x ) ) ). dot ( x. t ) return signals - signals. dot ( hat )
[ 0.4298853874206543, 0.28095370531082153, 0.5627419352531433, -0.3654329478740692, -0.4895142912864685, 0.4814123511314392, 0.09234876930713654, 0.5772360563278198, -0.2452249377965927, 0.601811408996582, -0.8857824206352234, 0.16466382145881653, -0.37518614530563354, -0.43912622332572937, ...
def create _ io _ block ( self, name, capacity, input _ = true, output = true ) : if name in self. _ modules : raise prgaapierror ( " module'{ }'is already created ". format ( name ) ) io _ primitive = ( ( self. primitives ['iopad'] if output else self. primitives ['inpad'] ) if input _ else ( self. primitives ['outpad...
[ -0.8875854015350342, -0.022786445915699005, 0.3978627324104309, 0.23096203804016113, -0.022905422374606133, 0.5688211917877197, -0.11437007039785385, -0.8036134243011475, -0.8203405737876892, -0.06858654320240021, -0.3159885108470917, 0.15399102866649628, -0.9890676140785217, 0.09700001776...
def getdimensions ( self ) : return ( self. _ width, self. _ height )
[ -0.7657187581062317, 0.23701241612434387, 0.6437863111495972, -0.12848587334156036, -0.23768441379070282, -0.10988451540470123, -0.021368911489844322, -0.5298534035682678, -0.004771056585013866, -0.3921056389808655, -0.793764591217041, -0.7108244299888611, -0.4566476345062256, 0.8175851702...
def validate _ csrf _ post ( fn ) : @ wraps ( fn ) def wrapper ( * args, * * kwargs ) : if flask. request. method = ='post': if request. form ['csrf _ token']! = login _ session ['state'] : response = make _ response ( json. dumps ('invalid state parameter.'), 401 ) response. headers ['content - type'] ='application / ...
[ -0.22538071870803833, -0.9707777500152588, 0.7759365439414978, 0.739052414894104, -0.2639414072036743, 0.14168307185173035, -0.5363513827323914, -0.6319378614425659, 0.8448330760002136, -0.22619445621967316, 0.49581387639045715, -0.32564327120780945, 0.7921372056007385, 0.06694337725639343...
def construct _ group _ menu _ context ( request, group, selected, group _ type, others ) : kwargs = dict ( acronym = group. acronym ) if group _ type : kwargs [ " group _ type " ] = group _ type # menu entries entries = [ ] if group. features. has _ documents : entries. append ( ( " documents ", urlreverse ( " ietf. g...
[ -0.9058912992477417, -0.2034856528043747, 0.6956350803375244, 0.1137143149971962, -0.011573665775358677, -0.42068740725517273, 0.4980666935443878, -0.3064686954021454, -0.3952582776546478, 0.23459771275520325, 0.5626917481422424, 0.22132857143878937, 0.5441436171531677, 1.0560424327850342,...
def make _ converter ( c, f ) : u, v, w, x, y = [ make _ connector ( ) for _ in range ( 5 ) ] multiplier ( c, w, u ) multiplier ( v, x, u ) adder ( v, y, f ) constant ( w, 9 ) constant ( x, 5 ) constant ( y, 32 )
[ 0.485702782869339, 0.6574664115905762, 0.5075055360794067, -0.033839646726846695, -0.09744635224342346, -0.21556510031223297, -0.05268274247646332, -0.9172642230987549, -0.9565295577049255, -0.31174951791763306, -0.7644937038421631, -0.5935831069946289, 0.24590180814266205, -0.040239155292...
def update ( self, obj ) : # override try : embedded _ clone, updated = obj. embed _ into ( self, check = true ) except : log. error ('exception in inventory. update ( % s ) ', str ( obj ) ) raise if updated : self. register _ update ( embedded _ clone ) return embedded _ clone
[ -0.5543422698974609, -0.45720791816711426, 0.5836940407752991, 0.6365687251091003, -0.9482263326644897, 1.2225310802459717, 0.2744145691394806, -0.9151084423065186, 0.9487608075141907, 0.4603864848613739, -0.11835749447345734, 0.11369995027780533, -1.3616938591003418, -0.9001397490501404, ...
def login _ required ( f ) : @ wraps ( f ) def decorated _ function ( * args, * * kwargs ) : if session. get ( " user _ id " ) is none : return redirect ( " / login " ) return f ( * args, * * kwargs ) return decorated _ function
[ -0.8155171871185303, -0.6001651883125305, 0.8058783411979675, 0.6877695322036743, -0.015980154275894165, 0.3659901022911072, -0.4105885326862335, -0.34681427478790283, 1.2263292074203491, -0.13603121042251587, 0.7236295342445374, 0.7189892530441284, 0.8725478053092957, 0.06341597437858582,...
def get _ physical _ devices ( self ) : return self. storage. pvs
[ -1.242321252822876, -0.29089778661727905, 0.5493233799934387, 1.4762263298034668, -0.0815838947892189, 0.18533450365066528, -1.2058405876159668, -0.7419460415840149, 0.061010852456092834, -0.4252645969390869, 0.45131370425224304, -0.23532187938690186, -0.32860997319221497, -0.4439120590686...
def _ modify _ model _ objectives ( self, equal _ priority = false, obj _ index _ 2 _ weight = none ) : model = self. _ model if equal _ priority : for i in range ( 2 ) : model. setparam ( " objnumber ", i ) model. setattr ( " objnpriority ", 1 ) obj _ index _ 2 _ weight = obj _ index _ 2 _ weight or { } for obj _ inde...
[ -1.8193174600601196, -0.41778364777565, 0.8541436791419983, -0.2414322942495346, 0.504326343536377, 0.052001312375068665, 0.19534935057163239, -0.08272849768400192, -0.294656366109848, 0.3135632574558258, -0.06011110171675682, -0.6091607809066772, 0.9326969385147095, 0.7645692229270935, ...
def add ( self, item ) : if item. state not in self. set : self. set [ item. state ] = item heapq. heappush ( self. heap, item )
[ 0.07531590759754181, 0.20576617121696472, 0.5482599139213562, -0.2933681309223175, 0.2391938418149948, 0.9404788017272949, -0.8814122080802917, -1.0245435237884521, 1.0382580757141113, 0.12299931049346924, -0.4225136339664459, 0.019666997715830803, -0.4032571315765381, 0.19204284250736237,...
def _ add _ sea ( server _ sea, db _ vio _ server, context, db _ session, dom _ factory ) : msg = ( ras. vif _ get _ msg ('info ','reconcile _ sea _ add _ start') % {'host': db _ vio _ server. get _ host _ name ( ),'vios': db _ vio _ server. lpar _ id,'adpt': server _ sea. name } ) ras. trace ( log, _ _ name _ _, ras. ...
[ -0.10443296283483505, -0.1587243527173996, 0.6722456216812134, -0.3086567521095276, 0.7904424667358398, -0.0019714536610990763, -0.008517769165337086, 0.11668407917022705, 1.119916319847107, 0.39970460534095764, -0.05656750872731209, 0.9589225053787231, 0.2570885419845581, 0.63259279727935...
def discount _ rewards ( r, gamma ) : discounted _ r = np. zeros ( len ( r ) ) running _ add = 0 # most recent reward is last for t in reversed ( range ( 0, len ( r ) ) ) : running _ add = running _ add * gamma + r [ t ] discounted _ r [ t ] = running _ add return discounted _ r
[ -0.014994010329246521, -0.574819803237915, 0.5074645280838013, -0.6480687856674194, 1.2249560356140137, 0.16170324385166168, 0.33932819962501526, 0.5023749470710754, 0.3884359300136566, 0.6581184267997742, 0.5053008198738098, 0.725480854511261, -0.3950793445110321, -0.21552418172359467, ...
def getblockids ( fp ) : block _ id = { } line = ensure _ string ( fp. readline ( ) ) while not line. startswith ('block id :') and line! ='' : line = ensure _ string ( fp. readline ( ) ) if line! ='' : while line. startswith ('block id :') : bb = int ( line. split ('block id :') [ 1 ]. split ( ) [ 0 ] ) count = int ( ...
[ 0.5448248386383057, -0.3488951027393341, 0.8414897322654724, 0.21632248163223267, -0.49060457944869995, 0.14486972987651825, 0.9469475150108337, 0.1433509737253189, -1.0211800336837769, 0.5279801487922668, -1.2620919942855835, 0.35740551352500916, -0.4904835820198059, 0.5820504426956177, ...
def _ feed _ item _ from _ annotation ( annotation, annotation _ url ) : try : name = util. user. split _ user ( annotation. userid ) [ " username " ] except invaliduserid : name = annotation. userid return { " author " : { " name " : name }, " title " : annotation. title, " description " : annotation. description, " p...
[ 0.3542737662792206, -0.7536787390708923, 0.20866405963897705, -0.1569972187280655, -0.386153906583786, -0.1944238543510437, -0.782515823841095, 0.04256158322095871, -0.2858985364437103, -0.12432859092950821, -0.6693169474601746, 0.225381538271904, 0.2526577115058899, -0.30526793003082275, ...
def randomized _ svd ( m, n _ components, n _ oversamples = 10, n _ iter = " auto ", power _ iteration _ normalizer = " auto ", transpose = " auto ", flip _ sign = true, random _ state = 0, ) : m = astensor ( m ) random _ state = check _ random _ state ( random _ state ) n _ random = n _ components + n _ oversamples n ...
[ -0.050426606088876724, -0.2632692754268646, 0.9094098806381226, 0.27342018485069275, -0.9548627138137817, 0.3505920469760895, 0.19108237326145172, 0.5318464040756226, 0.6829535365104675, 0.5291296243667603, 0.6523678302764893, -0.1546601802110672, -0.08944713324308395, 0.006257120985537767...
def to _ post _ request _ information ( self, body : optional [ calendarpermission ] = none, request _ configuration : optional [ calendarpermissionsrequestbuilderpostrequestconfiguration ] = none ) - > requestinformation : if not body : raise typeerror ( " body cannot be null. " ) request _ info = requestinformation (...
[ -0.8139574527740479, 0.1093808189034462, 0.8452268242835999, -0.04339466989040375, -0.46270161867141724, 0.22753441333770752, -0.7128564119338989, -0.4834708571434021, -0.1769554316997528, -0.13918133080005646, -0.02379028871655464, 0.09237661957740784, 0.09870970994234085, -0.003527361433...
def run _ server ( ) : new _ server = server ( ) new _ server. start ( ) print'stopping ec2 server instance...'lambda _ proxy ('stop _ instance') print'server stopped.'exit ( 0 )
[ -1.6123789548873901, -0.40336382389068604, 0.47098541259765625, -0.9802479147911072, 0.8315249681472778, 0.9939578175544739, 0.05218948796391487, 1.1736054420471191, -0.7943025827407837, 0.1713842749595642, -0.741473913192749, 0.9311821460723877, -0.2973344624042511, -0.3528395891189575, ...
def maketips ( self, angle = 140, tiplength = 0. 2, relative = true ) : if relative : l = self. length * tiplength else : l = tiplength v = self. v / self. length * l v _ rot = v. dot ( self. get _ rotation _ matrix ( angle ) ) self. c = self. b + v _ rot v _ rot = v. dot ( self. get _ rotation _ matrix ( - angle ) ) s...
[ -0.976984977722168, 0.4317512512207031, 0.5187788605690002, -0.9208207130432129, -0.07916152477264404, 0.3555716276168823, 0.3733867108821869, 0.1370566040277481, 0.3253890573978424, 0.3066517412662506, 0.014960124157369137, -0.7919268608093262, 0.08386393636465073, -1.4574403762817383, ...
def _ connect _ port ( self, port ) : sock = none for res in socket. getaddrinfo ( host, port, socket. af _ unspec, socket. sock _ stream ) : af, socktype, proto, canonname, sa = res try : sock = socket. socket ( af, socktype, proto ) except socket. error : sock = none continue try : sock. connect ( sa ) except socket....
[ -0.011714233085513115, -0.3182022273540497, 0.38911086320877075, -0.335750013589859, -0.3470025062561035, -0.524101972579956, 0.3265611231327057, -1.1784250736236572, -0.07474387437105179, -0.11851099133491516, 0.6664712429046631, -0.2708387076854706, -0.4314448833465576, -0.14577709138393...
def drawimage ( self, image, x1, y1, x2 = none, y2 = none ) : from pixmapwrapper import pixmapwrapper pm = pixmapwrapper ( ) # make a qd pixel map pm. fromimage ( image ) # load the image into it if x2 = = none : x2 = x1 + pm. bounds [ 2 ] - pm. bounds [ 0 ] if y2 = = none : y2 = y1 + pm. bounds [ 3 ] - pm. bounds [ 1 ...
[ -0.4617578387260437, 0.0682315081357956, 0.648254930973053, -0.12831126153469086, -0.0926649272441864, 0.745685338973999, -0.8830750584602356, -0.1672167032957077, 0.06676753610372543, -1.1557419300079346, 0.25455373525619507, 0.45988330245018005, 0.1296512633562088, 0.0247315913438797, ...
def delay _ for ( self, delay, original _ wait _ time ) : delay _ str = self. delay _ obj. get _ string _ for _ delay ( delay ) mutant = self. mutant. copy ( ) mutant. set _ token _ value ( delay _ str ) # set the upper and lower bounds delta = original _ wait _ time * self. delta _ percent upper _ bound = ( delay * 2 ...
[ -0.32207661867141724, -0.5618352890014648, 0.7974346280097961, 0.2235596626996994, -0.6608061194419861, 0.5022289752960205, 0.24008436501026154, -0.3418155312538147, -0.298568457365036, -0.6969192624092102, -0.27375707030296326, -0.06608188897371292, -0.5507573485374451, -0.349184304475784...
def get _ short _ name ( self ) : return self. name
[ 0.4658036231994629, -0.8698285222053528, 0.4840160012245178, -0.220261812210083, -0.9227904081344604, 0.6327377557754517, 0.2036697119474411, -0.7570878267288208, 0.2927899956703186, -0.001388745615258813, 0.037382204085588455, 0.5350731611251831, 0.3357899487018585, -0.255563348531723, ...
def version _ one ( ) : os. chdir ( " filestosort " ) for dir _ name, sub _ dirs, filenames in os. walk ( '.') : for filename in filenames : if filename [ 0 ]! = '.': # if not a hidden file extension = os. path. splitext ( filename ) [ 1 ] [ 1 : ] if not os. path. exists ( extension ) : os. mkdir ( extension ) print ( ...
[ 0.32418033480644226, 0.3661370873451233, 1.1688834428787231, 0.6123679876327515, -0.08718367666006088, 0.7695088386535645, 1.479500651359558, 0.026585472747683525, -0.2902747392654419, 1.112189769744873, -0.5685628056526184, 0.32916295528411865, -0.45926156640052795, 0.09263357520103455, ...
def roc _ plot ( y, preds, fname = none, figsize = ( 8, 6 ), verbose = true ) : fpr, tpr, thresholds = roc _ curve ( y, y _ score = preds ) roc _ auc = roc _ auc _ score ( y, y _ score = preds ) plt. figure ( figsize = figsize ) plt. plot ( fpr, tpr, color ='darkorange ', lw = 2 ) plt. plot ( [ 0, 1 ], [ 0, 1 ], color ...
[ 1.0610485076904297, -0.21715854108333588, 0.5575680732727051, -0.5807192325592041, -0.20933428406715393, -0.2442122846841812, 0.7896629571914673, 0.40883776545524597, -0.18549731373786926, -0.0042855809442698956, -0.21691715717315674, 1.099370002746582, 0.8958970308303833, -0.1179574206471...
def bind _ socket ( self ) : try : self. sock. setsockopt ( socket. sol _ socket, socket. so _ reuseaddr, 1 ) except socket. error, e : logging. error ( " error setting the reuese _ address option : % s " % e ) else : try : self. sock. bind ( ( self. server _ address, self. server _ port ) ) except socket. error, e : l...
[ -0.11436223983764648, -0.19819094240665436, 0.7284784913063049, 0.029322968795895576, 0.9288752675056458, 0.07325011491775513, 0.7763282060623169, 0.5500314235687256, 0.1610010862350464, -0.08103253692388535, 0.5169017910957336, 1.8356136083602905, -0.8541396260261536, 0.5824159383773804, ...
def _ _ str _ _ ( self ) : return " { }, with document : { } ". format ( self. first _ name, self. document )
[ 0.5106687545776367, -2.0979955196380615, 0.5328983664512634, -1.1700466871261597, -0.6538235545158386, 0.6916316151618958, -0.5121057033538818, -0.6178280711174011, 0.021516947075724602, -0.04638734832406044, 0.5021032094955444, 0.6510340571403503, -0.2423134446144104, 0.19609473645687103,...
def test _ ad _ solver ( new _ benchmark _ ad, input _ file ) : if new _ benchmark _ ad : ( ice, illumination, rt _ config, model _ config, plot _ config, impurities, ) = setup _ snicar ( " default " ) ice, illumination, impurities, rt _ config, model _ config = match _ matlab _ config ( ice, illumination, rt _ config,...
[ 0.41518861055374146, 0.1824803203344345, 0.8958034515380859, 0.22246453166007996, 0.5952661633491516, 0.6016852855682373, 1.2126411199569702, 0.08127826452255249, -0.4803130328655243, 0.27724209427833557, -0.3492416739463806, -0.05352991819381714, -0.8437289595603943, 0.5848287343978882, ...
def until ( self, method, message ='' ) : screen = none stacktrace = none start _ time = datetime. datetime. now ( ) end _ time = time. time ( ) + self. _ timeout while true : try : value = method ( self. _ utiltime. datediff ( start _ time, datetime. datetime. now ( ) ) ) if value : return value except exception as ex...
[ -0.14508551359176636, 0.8365342020988464, 0.7154914140701294, 0.2455935776233673, -0.3067004680633545, 0.569834291934967, 0.3589026927947998, -1.2530783414840698, -0.46816036105155945, 0.349027544260025, 0.5193198323249817, 0.6784239411354065, -0.47453758120536804, 0.7748923301696777, -0...
def to _ str ( self ) : return pformat ( self. to _ dict ( ) )
[ -0.3156525194644928, -1.1576071977615356, 0.37752002477645874, -1.1022119522094727, -0.20021124184131622, 0.4693031311035156, -1.2643425464630127, -0.3139212131500244, 0.25353115797042847, -0.17005473375320435, 1.0700582265853882, -0.2424885332584381, -0.049409545958042145, -0.226218611001...
def connectsl ( ) : global slclient global networkman slid = os. environ. get ('sl _ username') slapikey = os. environ. get ('sl _ api _ key') slclient = softlayer. create _ client _ from _ env ( username = slid, api _ key = slapikey ) try : account = slclient ['account']. getobject ( ) print " sl account : " + slid ne...
[ 0.05090742185711861, -0.7175540924072266, 0.5517624020576477, 0.3039710521697998, -0.19482143223285675, 0.41522881388664246, 0.42035117745399475, -0.10588903725147247, -0.04567095637321472, -0.5909629464149475, -0.3340885043144226, 0.1397874653339386, -0.4638811945915222, 0.579994559288024...
def yielding _ construction ( resolver : callable, ) - > union [ yieldwithcontainer, yieldwithoutcontainer ] : func _ arity = arity ( resolver ) if func _ arity = = 0 : return yieldwithoutcontainer ( resolver ) if func _ arity = = 1 : return yieldwithcontainer ( resolver ) raise invaliddependencydefinition ( f " arity ...
[ -0.5121316313743591, -0.176324725151062, 0.6740655303001404, 0.6423348784446716, 0.11664427071809769, -0.3468649089336395, 0.463596910238266, 0.11072028428316116, -0.1841672956943512, -1.047250509262085, 0.4672520160675049, -0.5952914357185364, 0.716518223285675, 0.7821556925773621, 0.56...
def to _ dict ( self ) : result = { } for attr, _ in six. iteritems ( self. swagger _ types ) : value = getattr ( self, attr ) if isinstance ( value, list ) : result [ attr ] = list ( map ( lambda x : x. to _ dict ( ) if hasattr ( x, " to _ dict " ) else x, value ) ) elif hasattr ( value, " to _ dict " ) : result [ att...
[ -0.7353226542472839, -0.23781068623065948, 0.7614322304725647, -0.8721303343772888, -0.6342906951904297, -0.6596683263778687, 0.4902494251728058, -0.4452497661113739, -0.05775731801986694, 0.1537473350763321, -0.6756056547164917, -0.12896190583705902, 0.10802530497312546, 0.916053712368011...
def theend ( words ) : words. append ('the end') return words
[ -0.11237416416406631, 0.4823874533176422, 0.3115334212779999, -0.571633517742157, 1.0943323373794556, 0.14249639213085175, -1.0149073600769043, 0.532298743724823, -0.09287196397781372, 1.1545253992080688, 0.25707459449768066, 0.22699154913425446, -0.9567083120346069, 0.7825124859809875, ...
def get _ read ( fq ) : out _ list = list ( ) for i in range ( 4 ) : out _ list. append ( fq. readline ( ). rstrip ( ) ) return out _ list
[ -0.18685376644134521, -0.7107321619987488, 0.5106104612350464, -0.37285879254341125, -0.23467569053173065, -0.5125674605369568, -0.8324980139732361, 0.0168648362159729, -0.39568212628364563, -0.6858579516410828, -0.06080694869160652, -0.44545412063598633, 0.06867733597755432, 0.13966730237...
def create _ fake _ copies ( files, destination ) : dest _ files = [ ] for filename in files : leaf _ dest _ folder = os. path. join ( destination, os. path. dirname ( filename ) ) if not os. path. exists ( leaf _ dest _ folder ) : os. makedirs ( leaf _ dest _ folder ) dest _ file = os. path. join ( destination, filena...
[ -0.11243950575590134, 0.22032198309898376, 0.8182597756385803, -0.0544574148952961, -0.08251535892486572, 0.3523208796977997, 0.11796844750642776, 0.44645386934280396, -0.54302579164505, 1.1768178939819336, 0.25948646664619446, -0.253656268119812, 0.8091760277748108, 0.4643702507019043, ...
def save _ graphs ( graphdict, pathname = '. /') : for g in graphdict : f = open ( pathname + str ( g ) + '. pickle ','w') cpickle. dump ( graphdict [ g ], f ) f. close ( )
[ 0.06259959191083908, 0.5291104316711426, 0.37918999791145325, 0.04715441167354584, 0.5210058093070984, 0.4433676600456238, 0.04784140735864639, -0.5984812378883362, -0.7134175300598145, 1.4685720205307007, -1.1724724769592285, -0.3217334747314453, -0.6908384561538696, -0.5377458333969116, ...
def obscuremovefurniturebutton ( self, increment ) : self. movefurniturebuttonobscured + = increment self. refreshonscreenbuttons ( )
[ -0.42239463329315186, -0.12034452706575394, 0.38866570591926575, 0.5351520776748657, -0.06025056540966034, 0.30382391810417175, 0.6555302143096924, -0.34490883350372314, 0.22013111412525177, -0.7125483155250549, -0.8807101845741272, 0.31511905789375305, 1.058043122291565, -0.07665323466062...
def get _ eligible _ instances ( self, claims ) : logger. debug ('get eligible instances.') result = [ ] claims _ by _ beneficiary = self. group _ claims _ by _ field _ values ( self. fields _ to _ group _ by, claims ) for beneficiary _ claims _ subset in claims _ by _ beneficiary : filtered _ subset = ( self. filter _...
[ -0.2705092430114746, 0.01770937256515026, 0.57244473695755, -0.28995370864868164, 0.20385907590389252, 0.652632474899292, -0.5143864750862122, 0.20487526059150696, -0.21148310601711273, -0.32332220673561096, 0.6244005560874939, 0.9039997458457947, 0.29102054238319397, 0.308644562959671, ...