text
stringlengths
25
2.19k
embedding
listlengths
768
768
def symbolic _ joint _ probabilities _ triple ( symx, symy, symz ) : if ( len ( symx )! = len ( symy ) ) or ( len ( symy )! = len ( symz ) ) : raise valueerror ('all arrays must have same length') symx = np. array ( symx ) symy = np. array ( symy ) symz = np. array ( symz ) # initialize jp = { } n = len ( symx ) for x,...
[ 0.4674966633319855, 0.02300375886261463, 0.5948032140731812, -0.06595864146947861, -0.34861159324645996, -0.264992356300354, 0.7051028609275818, 0.5231123566627502, 0.26124265789985657, 0.6233288049697876, -0.34908875823020935, -0.16811855137348175, -0.732866108417511, 0.23873881995677948,...
def get _ authors ( ) : query = " create view topfive as \ select articles. author, articles. title, \ count ( log. path ) as views \ from articles left join log \ on articles. slug = replace ( log. path,'/ article / ','' ) \ group by log. path, articles. title, articles. author \ order by views desc ; \ select authors...
[ 0.3278045058250427, -0.22073876857757568, 0.758169412612915, -0.03157413750886917, -0.328821063041687, -0.5236626267433167, 0.5697733163833618, 0.18237024545669556, -0.6901573538780212, -0.042076773941516876, 0.347511351108551, 0.9211654663085938, 0.11845282465219498, 0.16656622290611267, ...
def test _ packages ( self ) : self. asserttrue ( self. check _ package _ output ( " python - - version ", " python 3. 8. " ) ) self. asserttrue ( self. is _ package _ present ( " pip " ) )
[ -0.19912953674793243, 0.37015432119369507, 0.3935932219028473, 0.4611636698246002, 0.8934471011161804, 1.2430320978164673, -0.4194141924381256, 0.5190210342407227, 0.6203867793083191, -0.23008978366851807, -0.5522213578224182, -0.26911869645118713, 0.4004855155944824, 0.5044050216674805, ...
def peek ( self ) : return self. head. item
[ -0.20351560413837433, 0.7132559418678284, 0.6633118987083435, 0.14001165330410004, -0.4624697268009186, 0.1013820543885231, -0.2979087829589844, -1.5386816263198853, -0.13097317516803741, -0.4518207013607025, -0.25584015250205994, 0.6591601371765137, -0.23870275914669037, -0.72053509950637...
def _ edit ( self ) : if self. _ account = = none : print ( " no account is current " ) else : name = self. _ account. getname ( ) pin = self. _ account. getpin ( ) balance = self. _ account. getbalance ( ) while true : print ( " 1 change the name " ) print ( " 2 change the balance " ) print ( " 3 quit \ n " ) number =...
[ -0.22858910262584686, 0.037065234035253525, 0.711215078830719, 0.17455635964870453, -0.1190105751156807, 0.7545351386070251, 1.6020714044570923, -0.49413952231407166, 0.04940318688750267, -0.15610046684741974, -0.7074875831604004, 0.4423465132713318, -0.4759742021560669, -0.239548161625862...
def aggregate _ metadata _ get ( context, aggregate _ id ) : return impl. aggregate _ metadata _ get ( context, aggregate _ id )
[ -0.5488231778144836, 0.30695369839668274, 0.456606924533844, -0.12185068428516388, 0.9739667773246765, -0.8568078279495239, -0.6016029119491577, -0.8537341356277466, -0.7431154251098633, 0.9626956582069397, 0.6281032562255859, 0.9510664343833923, 0.62250155210495, -0.11977165192365646, -...
def execute _ query _ statement ( self, sql, timeout = 0 ) : request = tsexecutestatementreq ( self. _ _ session _ id, sql, self. _ _ statement _ id, self. _ _ fetch _ size, timeout ) resp = self. _ _ client. executequerystatement ( request ) return sessiondataset ( sql, resp. columns, resp. datatypelist, resp. columnn...
[ -0.9306228756904602, 0.12065284699201584, 0.455575168132782, -0.1471243053674698, -0.8472728133201599, -0.388100266456604, -1.0583629608154297, -0.6195877194404602, 1.5003811120986938, -0.03460086137056351, 0.2857774794101715, 0.5942928194999695, -0.3399559259414673, -1.2712968587875366, ...
def run _ blast ( database : str, query : str ) - > typing. tuple [ blastmatch ] : cmd = ( " blastn ", " - db ", database, " - query ", query, " - outfmt ", " 16 " ) logger. info ( " executing % s ", repr ( " ". join ( cmd ) ) ) return parse _ blastn _ xml ( subprocess. check _ output ( cmd ). decode ( " utf - 8 " ), p...
[ 0.19564767181873322, -0.0438823476433754, 0.5836383700370789, 0.47000786662101746, -0.055728986859321594, -0.20979321002960205, -0.937609851360321, -0.35069718956947327, 0.04763729125261307, -0.10275094956159592, -0.369993656873703, -0.6004104614257812, -0.7040250301361084, -0.887616217136...
def inter _ pt ( self, line1, line2 ) : x1 = line1 [ 0 ] [ 0 ] y1 = line1 [ 0 ] [ 1 ] x2 = line1 [ 1 ] [ 0 ] y2 = line1 [ 1 ] [ 1 ] x3 = line2 [ 0 ] [ 0 ] y3 = line2 [ 0 ] [ 1 ] x4 = line2 [ 1 ] [ 0 ] y4 = line2 [ 1 ] [ 1 ] ptx = ( ( x1 * y2 - y1 * x2 ) * ( x3 - x4 ) - ( x1 - x2 ) * ( x3 * y4 - y3 * x4 ) ) / ( ( x1 - x...
[ 0.8026355504989624, -0.7408091425895691, 1.2807772159576416, -1.1324048042297363, -0.03961963951587677, 0.34806618094444275, -0.2771182060241699, -0.24583250284194946, -0.8694537878036499, 0.44014251232147217, 0.13750159740447998, -0.42477965354919434, -0.9854600429534912, -0.5288663506507...
def inexactlinesearch ( func _ alpha, grad _ alpha, condition = " goldstein ", rho = 0. 1, sigma = 0. 7, tau = 0. 1, xi = 9 ) : alpha _ u = 1e99 alpha _ l = 0 alpha _ 0 = 1 # check condition according to input. if ( condition = = " goldstein " ) : lc, rc = goldsteincondition ( alpha _ 0, alpha _ u, alpha _ l, func _ al...
[ 0.6972029805183411, -0.26788946986198425, 1.0694845914840698, -0.16148138046264648, -0.2837566137313843, 0.049602702260017395, 0.0016140189254656434, 0.5917301774024963, -0.2575736939907074, -0.18997538089752197, -0.0409301295876503, 0.19686856865882874, -0.18453899025917053, 1.29587185382...
def _ _ init _ _ ( _ _ self _ _, *, client _ id : optional [ str ] = none, client _ secret : optional [ str ] = none, custom _ parameters : optional [ mapping [ str,'outputs. apioauthsettingsparameterresponse'] ] = none, identity _ provider : optional [ str ] = none, properties : optional [ any ] = none, redirect _ url...
[ -0.7248578667640686, 0.4307717978954315, 0.708419919013977, -0.8311361074447632, 0.4630838632583618, -0.22603599727153778, -0.800395131111145, -0.09625869989395142, 1.3498976230621338, 1.3064744472503662, -0.6241598725318909, 0.7782468199729919, 0.467653751373291, -1.0831772089004517, 0....
def reshape _ for _ prediction ( self, segmentation _ enabled, preprocess ='default ', network ='detection') : if segmentation _ enabled and not self. is _ segmentation _ loaded ( ) : self. debug ( " [! ] segmentation enabled but no segmentation data loaded! " ) return image _ mode = none if ( network = ='detection') :...
[ -0.7139422297477722, 0.033258385956287384, 0.8462370038032532, 0.49584120512008667, 0.5856419205665588, 0.007451268844306469, 0.46717092394828796, 0.7173206806182861, 0.024699481204152107, 0.8310720324516296, 0.4220561981201172, -0.4532501995563507, -0.3105994462966919, 0.6973564028739929,...
def sum ( self ) : return self. apply ( sum )
[ -0.42958417534828186, -0.2771133780479431, 0.2796594500541687, 0.2643420398235321, 0.32475346326828003, -0.25653016567230225, 0.48419317603111267, 0.1830081343650818, 0.7099853157997131, -0.9956929087638855, -0.8051313161849976, 0.13454414904117584, -0.268503874540329, -0.30879706144332886...
def data _ for ( self, version, * * kwargs ) : version = normalize _ version _ number ( version ) for data in self. version _ data ( reverse = true, * * kwargs ) : # since the data is reversed, the latest version is first. if # latest was requested, return it. if _ latest _ soft _ match ( version, data ['version'] ) : ...
[ -0.4334867596626282, -0.4733348488807678, 0.6910125017166138, 0.5875056982040405, -0.23929539322853088, -0.07699710130691528, -1.0920495986938477, -0.5457114577293396, -0.4765298068523407, -0.47907355427742004, 0.07241929322481155, 0.5923309922218323, -0.32371917366981506, -0.2623184919357...
def get _ value ( self, c _ puct ) : self. _ u = ( c _ puct * self. _ p * np. sqrt ( self. _ parent. _ n _ visits ) / ( 1 + self. _ n _ visits ) ) return self. _ q + self. _ u
[ -0.31301215291023254, 0.849372148513794, 0.5768381953239441, -0.29998448491096497, -0.30719995498657227, 0.47114962339401245, 0.8295196890830994, 0.20250536501407623, -0.0400930754840374, -0.9071577787399292, -0.10425354540348053, 0.2430105209350586, -0.08090980350971222, -0.54887849092483...
def time _ left ( self, t = none, bound _ below = true ) : t = t or time. time ( ) dtime = self. next - t if bound _ below : dtime = max ( dtime, 0. ) return dtime
[ 0.41069912910461426, 0.2587866485118866, 0.6054109930992126, -0.0724426805973053, -0.5454868078231812, 0.9233672618865967, -0.5991955399513245, -0.7026916146278381, -0.22492197155952454, 0.47676900029182434, -0.745939314365387, -0.8304715752601624, -0.9065312147140503, 1.139411449432373, ...
def gf _ sqf _ p ( f, p ) : lc, f = gf _ monic ( f, p ) if not f : return true else : return gf _ gcd ( f, gf _ diff ( f, p ), p ) = = [ 1 ]
[ 0.6489193439483643, 0.3712667226791382, 0.5340993404388428, 0.6203718781471252, 0.29471153020858765, 0.42223358154296875, -0.7908682227134705, 0.29928410053253174, -0.3273885250091553, 0.6087653636932373, 0.07272853702306747, -0.03354677930474281, -1.0290201902389526, -0.5290910005569458, ...
def title ( buffr ) : lb = len ( buffr ) if lb > tmax : lb = tmax if lb < tmin : return 0 qm = buffr [ 0 ] if qm! = adq and qm! = ldq : return 0 ib = 1 while ib < lb : bc = buffr [ ib ] ib + = 1 if bc = = rdq : break if not ellychar. isuppercaseletter ( bc ) : return 0 while ib < lb : bc = buffr [ ib ] ib + = 1 if bc =...
[ -1.1428898572921753, -0.3150961995124817, 0.9078754782676697, -0.4109934866428375, -0.7430574893951416, 0.4422104060649872, -0.11695202440023422, -0.430557519197464, 0.6432797908782959, 0.07987334579229355, -0.009186972863972187, 0.09417849779129028, -1.5075393915176392, 0.3869936168193817...
def security _ group _ rule _ count _ by _ group ( context, security _ group _ id ) : return impl. security _ group _ rule _ count _ by _ group ( context, security _ group _ id )
[ 0.5169323086738586, 0.37546050548553467, 0.33589404821395874, -0.48196932673454285, 1.0942800045013428, 0.12682439386844635, 0.6724308133125305, 0.3873978555202484, -0.5425216555595398, 0.5585825443267822, 0.035483840852975845, 0.12389670312404633, -0.19508717954158783, 0.24315257370471954...
def login ( self ) : self. driver. get ( self. base _ url +'accounts / login /') # has to wait because if no wait, it search first before load and wont found self. driver. implicitly _ wait ( 2 ) # find the text - boxes and login button username _ box = self. driver. find _ element _ by _ name ('username') password _ b...
[ -0.3838961720466614, 0.11107499897480011, 0.7570494413375854, -0.017103081569075584, 0.7948278784751892, 0.19802920520305634, 0.02525605633854866, 0.7549253106117249, -0.26052460074424744, 0.08422064036130905, -0.5787477493286133, -0.36457234621047974, -0.4951920509338379, 0.53757041692733...
def add ( self, input1, input2 ) : a, b = self. _ _ parseinput ( input1, input2 ) c = bin ( int ( a, 2 ) + int ( b, 2 ) ) if c [ 0 ] = ='-': return c [ 3 : ] else : return c [ 2 : ]
[ -0.5356568098068237, -0.05969047546386719, 0.9152495861053467, 1.0750635862350464, -0.2535097301006317, 1.0858662128448486, -0.9271883368492126, -1.0909802913665771, -0.19728919863700867, -0.5220681428909302, -0.0040128519758582115, 0.7828695178031921, -1.0261116027832031, -0.4661577641963...
def create _ key ( self, context, algorithm, length, name = none, * * kwargs ) : if length % 8 : msg = _ ( " length must be multiple of 8. " ) raise valueerror ( msg ) key _ id = uuid. uuid4 ( ). hex key _ value = os. urandom ( ( length or 256 ) / / 8 ) key = sym _ key. symmetrickey ( algorithm, length or 256, key _ va...
[ -0.13372358679771423, 0.637595534324646, 0.24419672787189484, -0.35838237404823303, 0.1532062292098999, -0.13005656003952026, -0.06681572645902634, -0.4599664509296417, 0.5568684935569763, 0.7949628233909607, -1.1487385034561157, 0.11265559494495392, -0.20353417098522186, 0.100613437592983...
def run _ self _ check ( self ) : self. active _ storage _ backend = self. storage _ backend _ session # check for keyring module if sys. version _ info [ : 2 ] > = ( 3, 5 ) : # python 3. 5 import _ result = importlib. util. find _ spec ( " keyring " ) else : # python 2 code import _ result = imp. find _ module ( " key...
[ 0.12967927753925323, -0.7482356429100037, 0.7526858448982239, 0.49950313568115234, 0.4875982403755188, 0.4197380244731903, 0.5633979439735413, -1.0942493677139282, -0.13203749060630798, 0.6379453539848328, -0.5507565140724182, 0.5662711262702942, -0.5718755722045898, -0.2651803195476532, ...
def poll _ for _ checkins ( self ) : fapi = foursquare. api ( ) checkins = fapi. get _ checkins ( self. _ cfghandler. options [ " foursquare _ username " ], self. _ cfghandler. options [ " foursquare _ password " ] ) print checkins # check the date of the checkin.. if it is newer than the last update time then display ...
[ -0.7611405849456787, -0.0015013192314654589, 0.6979399919509888, 0.36471882462501526, -0.4731335937976837, 0.23940373957157135, -0.02317858301103115, -0.017028307542204857, 0.00011218889994779602, 0.4007888734340668, -0.40566426515579224, -0.2493010014295578, 0.09989116340875626, 0.7805343...
def get _ user _ name ( self, user _ id : str ) - > str : return self. sqldata. get _ user _ name ( user _ id )
[ -0.7479448318481445, 0.20462994277477264, 0.28020161390304565, 0.7042576670646667, -0.9715929627418518, -0.05296555161476135, -0.554583728313446, -0.6904788613319397, -0.4263244569301605, 0.7573637962341309, -0.15162117779254913, 0.3185657560825348, 0.3809071183204651, 0.35573649406433105,...
def ln _ of _ factorial ( n ) : return math. log ( factorial ( n ) )
[ 0.2087535411119461, 0.4163506031036377, -0.015826746821403503, 0.09951981157064438, -0.06507431715726852, -0.48115167021751404, -0.5710151791572571, -0.3741685152053833, 0.3474644124507904, -1.3291685581207275, -0.34028804302215576, 0.19628848135471344, 1.4451777935028076, 0.48073458671569...
def translate ( pat : str ) - > str : i, n = 0, len ( pat ) res ='' while i < n : c = pat [ i ] i = i + 1 if c = ='*': # changes begins : understands'* * '. if i < n and pat [ i ] = ='*': res = res + '. *?'i = i + 1 else : res = res + r'[ ^ \. ] *?'# changes ends. elif c = = '?': res = res + '.'elif c = ='[': j = i if ...
[ 0.038297370076179504, 0.31121864914894104, 0.934643566608429, -0.3536609709262848, -1.4662389755249023, -0.8565065264701843, 0.1658368706703186, -0.2584153413772583, 0.671890377998352, 0.7015424370765686, -0.8358830213546753, 0.16954176127910614, 0.19154927134513855, -1.0181944370269775, ...
def _ _ rmnegativerates ( self, data ) : return [ ( ts, val ) for ts, val in data if val > = 0 ]
[ -0.46361833810806274, 0.21330860257148743, 0.5896404385566711, 0.11404779553413391, -0.4994274973869324, 0.3910250663757324, -1.9232611656188965, -0.11249808967113495, -0.5137184858322144, 1.2266061305999756, 0.15257735550403595, -0.4997371435165405, -0.6834729313850403, 0.6952353119850159...
def test _ emptydesc ( self ) : testresult = { } testresult = dataparser _ map. advancesearch ( " 2 ", " description ", " " ) # print ( testresult ) self. assertequal ( testresult [ 0 ] [ " description " ], " ", " empty description not found " ) self. assertequal ( testresult [ 0 ] [ " _ id " ], " 53ae78d0 - 40a9 - 444...
[ -0.5328363180160522, 0.028154466301202774, 0.5836305618286133, -1.0933520793914795, 0.26366671919822693, 0.6134177446365356, -0.7366958856582642, -0.14997918903827667, -0.7681729197502136, -0.7104659080505371, -0.412836492061615, 0.10422691702842712, -0.19927434623241425, 0.342018842697143...
def reservation _ create ( context, uuid, usage, project _ id, resource, delta, expire ) : return impl. reservation _ create ( context, uuid, usage, project _ id, resource, delta, expire )
[ -0.2512764036655426, 0.524400532245636, 0.3608818054199219, 0.16079649329185486, 0.3690244257450104, 0.4376825988292694, -0.556115448474884, 0.3952389657497406, -0.5334709882736206, 0.7261836528778076, -0.02922786958515644, -0.8140239119529724, -0.09749153256416321, -1.5208297967910767, ...
def getquestion ( self, username ) : with self. con : self. cur. execute ( " select question from users where name ='" + username + "'; " ) question = self. cur. fetchall ( ) for qst in question : for q in qst : return q
[ 0.013038048520684242, -0.4455314874649048, 0.4100918173789978, 0.4923844337463379, -0.5513771176338196, 0.18702943623065948, -0.20153822004795074, -0.08571285754442215, -0.5056143403053284, 0.13013896346092224, -0.042128585278987885, -0.07852593809366226, -1.1999907493591309, 0.04761477932...
def is _ exhausted ( settings ) : retry _ counts = ( settings ['total'], settings ['connect'], settings ['read'], settings ['status'] ) retry _ counts = list ( filter ( none, retry _ counts ) ) if not retry _ counts : return false return min ( retry _ counts ) < 0
[ -0.1395876705646515, 0.14885865151882172, 0.41996461153030396, -0.2013637274503708, 0.5317433476448059, 0.22881656885147095, -0.9984531998634338, -0.8354670405387878, -0.27025192975997925, 0.40272057056427, -0.011385014280676842, -0.34005674719810486, -0.48734888434410095, -0.0519929341971...
def to _ python ( self, value ) : if isinstance ( value, groupdescriptor ) : value = value. _ value result = { } for name, field in self. fields. items ( ) : result [ name ] = field. to _ python ( value. get ( name, none ) ) return groupdescriptor ( result )
[ -1.0048141479492188, 0.5316402912139893, 0.44604235887527466, -1.1500606536865234, -0.39248818159103394, -0.25936171412467957, -0.3254067301750183, -0.868111789226532, -0.6003313064575195, -0.046565230935811996, -0.6583226919174194, 0.5404419898986816, 0.07444331049919128, 0.49831134080886...
def fuel _ burn _ limit _ balance _ rel _ rule ( mod, f, ba, bt, h ) : return ( mod. total _ horizon _ fuel _ burn _ by _ fuel _ and _ fuel _ ba _ from _ all _ sources _ expression [ f, ba, bt, h ] - mod. fuel _ burn _ max _ overage _ rel _ unit _ expression [ f, ba, bt, h ] < = mod. fraction _ of _ relative _ fuel _ b...
[ 0.3799251317977905, -0.08321362733840942, 0.6765865087509155, 0.18646256625652313, 0.24927891790866852, 0.7958053350448608, 0.15279056131839752, 0.304846853017807, -0.5089377164840698, -0.25639840960502625, 0.37296995520591736, 0.1366920918226242, -0.9991404414176941, 0.3247019350528717, ...
def objective _ xcs ( trial, est, x _ train, y _ train, randseed, hype _ cv, param _ grid, scoring _ metric ) : params = {'learning _ iterations': trial. suggest _ categorical ('learning _ iterations ', param _ grid ['learning _ iterations'] ),'n': trial. suggest _ categorical ('n ', param _ grid ['n'] ),'nu': trial. s...
[ 0.5584105849266052, 0.5464453101158142, 0.820996105670929, 0.6283139586448669, -0.22382347285747528, -0.17882148921489716, -0.7397129535675049, -0.27710700035095215, -0.7142336964607239, 0.9755041599273682, 0.5951619148254395, 0.8602815270423889, 1.0385667085647583, -0.5016264915466309, ...
def calculate _ height ( table, record _ height ) : rows _ amount = ( len ( table ) * record _ height ) + 1 + record _ height return rows _ amount
[ 0.6291797161102295, 0.6210855841636658, 0.4043154716491699, 1.296761393547058, -0.5303539633750916, -0.9474209547042847, 0.7238994240760803, 1.148423671722412, -0.3634400963783264, 0.5961943864822388, -0.3172650933265686, 0.2093713879585266, 0.01640128716826439, 0.47244060039520264, 0.65...
def inviter ( self, inviter ) : self. _ inviter = inviter
[ 0.18207865953445435, -0.5461813807487488, -0.0072342585772275925, 0.7918567657470703, -0.8400565385818481, 0.857612133026123, 0.6890737414360046, 1.417153239250183, -0.94176185131073, 0.13497883081436157, -1.07794988155365, 0.19405128061771393, -0.5262652635574341, 1.1240378618240356, 0....
def target _ design _ member _ id ( self ) : return self. _ target _ design _ member _ id
[ 0.319587379693985, -0.30697566270828247, 0.23888038098812103, 0.30857333540916443, 0.6581658124923706, 1.2178442478179932, -0.027661265805363655, -0.032051071524620056, 0.9843912720680237, -1.0520020723342896, -0.008890929631888866, 1.2139586210250854, 0.4233417510986328, -0.65036374330520...
def do _ setup ( self, context ) : if not self. config. gateway _ vip : raise exception. invalidinput ( reason = _ ('gateway vip is not set') ) if not self. config. gateway _ mga : raise exception. invalidinput ( reason = _ ('gateway ip for mg - a is not set') ) if not self. config. gateway _ mgb : raise exception. inv...
[ 0.32248157262802124, -0.4316391348838806, 0.871277928352356, 0.21886007487773895, 0.3236396312713623, -0.4887622892856598, 0.1705792248249054, -0.005011726636439562, -0.16152994334697723, 1.0437700748443604, 0.12754009664058685, -0.015503189526498318, -0.2531473934650421, 0.103369846940040...
def get _ perms ( self, obj ) : response = set ( ) if isinstance ( obj, model ) : content _ type = contenttype. objects. get _ for _ model ( obj. _ _ class _ _ ) user _ perms = models. userobjectpermission. objects. filter ( content _ type = content _ type ). filter ( object _ pk = obj. pk ). filter ( user = self ). va...
[ 0.15387991070747375, 0.010113186202943325, 0.8888037204742432, 0.5801864862442017, -0.8007391095161438, -0.1722293347120285, 0.3778020739555359, -0.9929202795028687, -0.06314724683761597, 0.2712811529636383, -0.2163475900888443, 0.028071969747543335, -0.19224992394447327, 0.218049675226211...
def apply _ snapshot ( self, machine _ id : str, tag : str ) - > apiresponse : return self. _ put ( " detail ", { " pk " : self. user _ pk, " sdi _ id " : self. sdi _ pk, " machine _ id " : machine _ id, " snap _ tag " : tag } )
[ -0.7275782227516174, 0.7681459784507751, 0.327351450920105, 0.3491080701351166, -1.0233454704284668, 0.28479063510894775, -0.7835357189178467, 0.39841142296791077, 0.4561210870742798, -0.34736907482147217, -0.5216116905212402, 0.12003497034311295, 0.5671689510345459, 0.6512497663497925, ...
def color ( wait : float, fade : str = none, rgb _ value : rgb = none ) : if fade is none : fade = " in " if rgb _ value is none : rgb _ value = 0xff if fade = = " in " : for i in range ( 0, 255 ) : for x in range ( 4 ) : for y in range ( 4 ) : key = keypad [ x, y ] r = rgb _ value. red & i g = rgb _ value. green & i b...
[ -0.6499196290969849, 0.2504613697528839, 0.7757499814033508, -0.13767875730991364, -0.07153889536857605, 0.5206161141395569, -0.10350412875413895, -0.0864735096693039, -0.8223624229431152, 0.6215726733207703, -0.4729005992412567, 0.42782899737358093, -0.12365064024925232, 1.309620380401611...
def round _ two _ dec ( value ) : return round ( value, 2 )
[ 0.08373408019542694, -0.664217472076416, 0.3633449673652649, -1.227936029434204, 0.10343319177627563, -0.1260310560464859, 0.7216223478317261, -1.561205506324768, -0.9279032349586487, -0.888080358505249, 0.17925500869750977, 0.5177631378173828, 1.2997851371765137, 0.6934916377067566, 0.5...
def flux ( pixel, spectrum ) : cacheid = " { 0 : d } - { 1 : d } ". format ( pixel, spectrum ) response = cache. get ( cacheid ) if response is none : data = get _ spectrum ( pixel, spectrum ) response = jsonify ( data ) response. headers. add ('access - control - allow - origin ','*') cache. set ( cacheid, response, t...
[ -0.319905549287796, -0.20184461772441864, 0.4866753816604614, 0.09108254313468933, -0.4209422767162323, -0.5219513177871704, -1.027646780014038, -0.44178685545921326, 0.2762077748775482, -0.029890544712543488, -0.6417221426963806, 1.5828765630722046, -0.1415955275297165, 0.2794033885002136...
def reconcile ( context, host _ data, dom _ factory = dom. dom _ factory ( ), db _ session = none ) : if not db _ session : db _ session = session. get _ session ( ) try : with db _ session. begin ( ) : _ reconcile _ host ( context, host _ data, dom _ factory, db _ session ) except exception as e : _ log _ before _ and...
[ 0.158327117562294, 0.28427761793136597, 0.7290461659431458, 0.19970765709877014, 0.3947058916091919, -0.8941643238067627, 0.3215809464454651, 0.40833407640457153, -0.22039614617824554, -0.20283259451389313, 0.2678048610687256, 0.09792628884315491, -0.1069115400314331, -0.15522724390029907,...
def validate _ and _ format _ value ( self, value : t. optional [ str ] ) - > str : raise notimplementederror ( " need to implement the validate _ and _ format _ value method " )
[ -0.18029679358005524, -1.365983247756958, 0.5428387522697449, 0.1406935602426529, -0.7137951254844666, 0.4446905553340912, -0.09893138706684113, -0.3844582438468933, 0.9328369498252869, 0.0831654742360115, 1.1686640977859497, 0.2988358736038208, 0.89237380027771, 1.0064523220062256, 0.26...
def get _ lmp ( self, structure, pair _ coeff _ file, label ) : types _ of _ species =''. join ( [ tos. symbol for tos in structure. types _ of _ specie ] ) atomic _ mass = [ str ( i + 1 ) +'' + tos. atomic _ mass. _ _ repr _ _ ( ) for i, tos in enumerate ( structure. types _ of _ specie ) ] self. parameters ['pair _ c...
[ -0.19256119430065155, -0.9141910076141357, 0.48285937309265137, -1.6499282121658325, 0.3860734701156616, 0.024553734809160233, -0.5570136308670044, 0.4179689288139343, -0.2093191295862198, -0.05889284610748291, 0.2462943196296692, 0.12129563838243484, -1.053391456604004, -0.142184659838676...
def remove _ batch _ session ( self, curr _ date _ time ) : while self. session _ queue : past _ ip = self. session _ queue [ 0 ] past _ session = self. ip _ session _ data [ past _ ip ] past _ datetime = past _ session. get _ last _ session _ time ( ) seconds _ difference = ( curr _ date _ time - past _ datetime ). to...
[ -0.485418438911438, -0.9784724712371826, 0.7226704359054565, 0.03255800902843475, -0.7749967575073242, 0.01880885660648346, 0.15210458636283875, -0.15807384252548218, -0.2189975380897522, 0.8787322044372559, -0.3554915487766266, -0.31766679883003235, -0.23388859629631042, -0.08566726744174...
def bulk _ group _ update ( users, guuid ) : all _ user _ ids = [ ] # build a blank list i = 0 while i < len ( users ) : all _ user _ ids. append ( { " value " : users [ i ] [ " id " ], " display " : users [ i ] [ " username " ], " type " : " user " } ) i + = 1 payload = { " schemas " : [ schemas ], " members " : all _...
[ -1.6423394680023193, -0.008709153160452843, 0.38767871260643005, -0.298735648393631, -0.7722700834274292, -0.3622383773326874, -0.4770938754081726, -0.3705058693885803, -0.43671756982803345, 1.0582935810089111, -0.1833561360836029, 1.1573859453201294, -1.6972885131835938, 0.247775271534919...
def upcoming _ movies ( ) : return render _ template ( " upcoming. html " )
[ -0.9868407845497131, -0.2913001477718353, 0.24316665530204773, 0.4038398563861847, -0.26507389545440674, 0.3834984302520752, -0.6036326885223389, 1.2431749105453491, -0.9703047275543213, 0.3640945851802826, 0.2272159457206726, 0.3648909330368042, 0.5017830729484558, 0.8553344011306763, -...
def _ plain _ field _ arg _ check _ trigger _ function ( self, outer _ self, * args, * * kwargs ) : changed _ related _ field = kwargs. pop ('changed _ related _ field ', none ) if changed _ related _ field : changed _ related _ field = [ changed _ related _ field ] else : changed _ related _ field = [ ] changed _ fiel...
[ -0.4217221438884735, 0.04234457015991211, 0.4932694435119629, -0.5823496580123901, 0.2186918556690216, 0.4263431131839752, 0.19044135510921478, 0.8056933283805847, 0.021808015182614326, -0.36103370785713196, -0.693070113658905, 1.0285040140151978, -0.4665355682373047, 0.1728057861328125, ...
def rm _ post ( post _ id ) : if psblog. existing _ post _ id ( post _ id ) : os. remove ( post _ id + ". txt " ) os. remove ( post _ id + ". meta " ) os. remove ( post _ id + ". comments " )
[ 1.6200400590896606, -0.14402097463607788, 0.42035213112831116, 0.24640525877475739, 0.13429872691631317, 0.7226946353912354, -0.38109877705574036, 0.3622073829174042, -0.2850331962108612, 0.46303626894950867, -0.11410900205373764, -0.1475532203912735, -0.5392942428588867, 0.501068711280822...
def printenfilm ( dic, tittel ) : if tittel in dic : print ( " tittel : { } \ n regissor : { } \ n sjanger : { } \ n utgivelsesaar : { } \ n hylleplassering : { } ". format ( tittel, dic [ tittel ] [ 0 ], dic [ tittel ] [ 1 ], dic [ tittel ] [ 2 ], dic [ tittel ] [ 3 ] ) )
[ -0.08241540193557739, -0.14271192252635956, 0.5475060343742371, -0.719078004360199, -0.5386030673980713, 0.832870364189148, -0.5398184061050415, 0.13835623860359192, -0.3045908808708191, 0.8579484820365906, -0.45748230814933777, 0.8778051733970642, 0.21781998872756958, 0.5382534861564636, ...
def save _ header _ file ( arbor, filename, fields, root _ field _ data, group _ nnodes, group _ ntrees ) : ds = { } for attr in [ " hubble _ constant ", " omega _ matter ", " omega _ lambda " ] : if getattr ( arbor, attr, none ) is not none : ds [ attr ] = getattr ( arbor, attr ) # data structures for disk fields. mai...
[ -0.09950140863656998, -0.40173885226249695, 0.7610389590263367, 0.30045759677886963, 0.13946689665317535, 0.222508504986763, 1.229602575302124, -0.4693087041378021, -1.1652202606201172, -0.4509292244911194, -0.6857785582542419, 0.08891655504703522, -0.10578401386737823, -0.0836184620857238...
def extract ( self, location ) : # used in ` save `. baton = ( location, location in self. _ touched, self. _ range. get ( location, none ), location in self. _ writeable, ) self. set _ writeable ( location ) return baton
[ -0.8752970099449158, -0.7560649514198303, 0.4064786732196808, -0.1641760915517807, -0.12565988302230835, 0.1043028011918068, 0.6326585412025452, 0.16177871823310852, -0.022888757288455963, 0.16436566412448883, -1.5904220342636108, -0.7199616432189941, -0.8576047420501709, -0.50210583209991...
def nuevo _ recurso ( request ) : if request. method = ='post': form = recursoform ( request. post, request. files ) if form. is _ valid ( ) : recurso = form. save ( commit = false ) recurso. autor = request. user recurso. save ( ) return redirect ('recursos : detalle _ recursos ', pk = recurso. pk ) else : form = recu...
[ 0.4828989803791046, 0.3605584502220154, 0.4728665053844452, 0.8749292492866516, 0.05493775010108948, -0.471367746591568, 0.4150148928165436, -0.024644926190376282, -0.28721103072166443, -0.8468770980834961, -0.3287070095539093, 0.03005380555987358, 0.7105109095573425, 0.26012691855430603, ...
def compress _ path ( dest, src, verbose = false ) : assert dest and dest. endswith ( '. xz') and not os. path. isdir ( dest ) and \ os. path. isdir ( os. path. dirname ( dest ) ) assert src and os. path. isfile ( src ) cmd = ['xz'] if verbose : print'\ ncompress _ path ( % s, % s )'% ( dest, src ) cmd. append ('- - ve...
[ 0.781862735748291, 0.45286649465560913, 0.9141460061073303, 0.6298395395278931, -0.1936306357383728, 0.32339218258857727, 0.2053869217634201, -0.4344911575317383, -0.09838297218084335, 0.3243807852268219, 0.20500943064689636, 0.1394685059785843, -0.3853161334991455, 0.2146340310573578, 0...
def test _ blocked _ ip _ specific _ direct ( self ) - > none : channel = self. make _ request ( " get ", " preview _ url? url = http : / / 192. 168. 1. 1 ", shorthand = false ) # no requests made. self. assertequal ( len ( self. reactor. tcpclients ), 0 ) self. assertequal ( channel. json _ body, { " errcode " : " m _...
[ -0.8363096714019775, 1.2552138566970825, 0.48665904998779297, 0.056856751441955566, 0.4700305759906769, 0.5538330078125, 0.09240486472845078, -0.5856468677520752, -0.3458017110824585, -0.8685386180877686, 0.16969463229179382, 0.6804734468460083, 0.8296083807945251, -0.5257545709609985, 0...
def shutdown ( self ) : self. led. power _ off ( )
[ -0.023494943976402283, -0.6058086156845093, 0.24906784296035767, -0.5696065425872803, 0.3549889028072357, 0.92056804895401, 0.32957178354263306, 0.7097837328910828, -0.1438470184803009, 0.19020095467567444, 0.3703949451446533, 0.3948591351509094, -1.4528217315673828, 0.38820528984069824, ...
async def test _ text _ new _ min _ max _ pattern ( hass ) : text = mocktextentity ( native _ min = - 1, native _ max = 500, pattern = r " [ a - z ] " ) text. hass = hass assert text. capability _ attributes = = { attr _ min : 0, attr _ max : max _ length _ state _ state, attr _ mode : textmode. text, attr _ pattern : ...
[ -0.31611013412475586, -0.24061591923236847, 0.36395102739334106, -0.4679633677005768, -0.7058069109916687, 0.3873596787452698, -0.5555866956710815, 0.8949660062789917, 0.6239527463912964, 0.14398425817489624, -0.9974268078804016, 0.07809759676456451, 0.8213592171669006, -0.0658096671104431...
def getcpd ( self ) : self. set _ bayesnet ( ) return tablecpdfactorization ( self. bn )
[ 0.46789175271987915, 0.16647540032863617, 0.1770523637533188, 1.1733043193817139, 0.3494529724121094, 0.1303640455007553, 0.20930306613445282, 0.06719042360782623, -0.7330747842788696, -1.4983136653900146, 0.9686126112937927, 1.511407494544983, -0.6444818377494812, -0.07077829539775848, ...
def init _ gsheet ( credentials _ path ) : scope = ['https : / / spreadsheets. google. com / feeds ','https : / / www. googleapis. com / auth / drive'] credentials = serviceaccountcredentials. from _ json _ keyfile _ name ( credentials _ path, scope ) gc = gspread. authorize ( credentials ) return gc
[ 0.6462900042533875, -0.6852916479110718, 0.6624948382377625, -0.5730836987495422, 0.009620369412004948, 0.1820361167192459, -0.4341461956501007, -0.3705071806907654, -0.6919896006584167, -0.44271036982536316, -0.03731660544872284, 1.6709343194961548, -0.34764885902404785, 0.680108726024627...
def execute _ sql _ statement ( self, statement ) : try : cursor = self. db _ connection. cursor ( ) cursor. execute ( statement ) return cursor. fetchall ( ) except exception : logging. error ( " something went wrong when tried to execute statement " ) logging. error ( " { } : { } ". format ( sys. exc _ info ( ) [ 0 ]...
[ -0.7749711871147156, -0.279685914516449, 0.8508250117301941, 0.47120216488838196, -0.4031044840812683, 0.016807809472084045, -1.1237388849258423, -0.6130384802818298, 0.42045828700065613, 0.627404510974884, 0.4608660936355591, -0.5245557427406311, -0.5974507331848145, 0.044274184852838516,...
def make _ df _ downloadble ( df : pd. dataframe, file : str ) : if st. button ( " create download link " ) : file _ name = os. path. splitext ( os. path. split ( file ) [ - 1 ] ) [ 0 ] + ". csv " get _ table _ download _ link ( df, file _ name )
[ 0.04398951679468155, 0.19391700625419617, 0.5401618480682373, 0.9183505773544312, 0.4376756548881531, -0.14063718914985657, 0.480607271194458, -0.028034307062625885, -1.366706132888794, -0.8099063038825989, 0.32964786887168884, 0.6133990287780762, 0.8077234625816345, -0.14335615932941437, ...
def _ attributes _ i _ is _ vector ( self, key, flow ) : # make sure interface is ready to use d = self. _ attributes _ t _ init ( key ) # check if we know about that attribute if d ['attributes'] [ key ] ['flavor'] = = vector : return true return false
[ -0.9395094513893127, -0.4222802221775055, 0.36514225602149963, 0.18556123971939087, -0.269782155752182, -0.3654421269893646, 0.25121772289276123, 0.16098545491695404, -0.00923055037856102, 0.8151798844337463, -0.09940316528081894, 0.6520329117774963, -0.42436277866363525, 0.445726603269577...
def test _ attachment _ registration ( self ) : identifier = libmonzotests. config [ " attachment _ transaction _ id " ] # get the transaction transaction = libmonzotests. client. transaction ( identifier = identifier ) try : # confirm there are no attachments : self. assertequal ( 0, len ( transaction. attachments ) )...
[ -0.05225861445069313, 0.9385481476783752, 0.5065193176269531, -0.3785233795642853, 0.6189929842948914, -0.5336894392967224, 0.5097231268882751, 0.18797704577445984, 0.5516074895858765, -0.06190675497055054, -0.682056188583374, -0.07772800326347351, -0.05728413537144661, -0.0267550237476825...
def show _ info ( self ) : print ('\ n') print ('- - - - - - - - - - - - dataset information - - - - - - - - - - - -') print ('n _ samples : ', self. _ _ len _ _ ( ) ) print ('n _ classes : ', len ( self. classes ) ) print ('image embedding size : ', self. image _ embeddings. shape [ 1 ] ) print ('class embedding size ...
[ 0.2322232872247696, -0.31947121024131775, 0.8958988785743713, -0.9235123991966248, -0.4152800142765045, 0.30572956800460815, 0.7632097005844116, 0.014987432397902012, -0.9347178936004639, -0.3009850084781647, 0.20670409500598907, 1.340643048286438, 0.7925598621368408, 0.8355148434638977, ...
def linked _ transaction ( self ) : return self. _ linked _ transaction
[ 1.1163071393966675, -0.6508888602256775, 0.6015143990516663, -0.3164445757865906, 0.5115498304367065, 0.6321567296981812, 0.2681020498275757, -0.865724503993988, 1.1493680477142334, -0.9774707555770874, -0.06467346847057343, 0.23525384068489075, -0.5857400298118591, -1.0012184381484985, ...
def fwd ( self, x _ cell _ pos, y _ cell _ pos, prob _ units, time _ spotted, current _ time, change _ trans _ matrix ) : steps = max ( 0, ( current _ time - time _ spotted ) * average _ speed / / math. sqrt ( self. cell _ size ) ) # split to possibilities for i in range ( 1, 4 ) : for j in range ( 1, 4 ) : x = x _ cel...
[ -0.17215189337730408, 0.36064383387565613, 0.5882418751716614, 0.4442775547504425, -0.041319143027067184, -0.3292376399040222, 0.7878847122192383, -0.36799460649490356, -0.5605407953262329, 0.18341459333896637, 0.5593792796134949, 0.0013754876563325524, 0.19234266877174377, 0.6017962098121...
def pip ( package ) : install _ package ( " pip ", package )
[ -0.3258507251739502, 1.3439428806304932, 0.22509533166885376, 0.17760998010635376, 0.585142970085144, 0.11154037714004517, -0.3783456087112427, 1.2118182182312012, 0.1051359474658966, 0.5036892890930176, -0.20107051730155945, -0.9744534492492676, 0.8460646271705627, -0.9994716644287109, ...
def best _ match _ content _ type ( self ) : supported = ('application / json ', ) bm = self. accept. best _ match ( supported ) return bm or'application / json '
[ 0.3836733400821686, -0.47399625182151794, 0.6850849390029907, 0.8002537488937378, -0.5869491696357727, 0.05750799551606178, -0.48221415281295776, -0.31507736444473267, -0.19347693026065826, -0.2511902153491974, 1.0528411865234375, 0.598440945148468, -0.3522951006889343, 0.5242496132850647,...
def getwater ( self, amount ) : return self. getsupply ( amount )
[ -0.45706430077552795, -0.3047164976596832, 0.47012412548065186, -0.15237917006015778, -0.7001953721046448, -0.8402307033538818, -0.13743291795253754, -1.366048812866211, 0.8312138915061951, -0.0017484277486801147, 0.3599315285682678, 0.1940630078315735, -0.9096888303756714, 0.5251652598381...
def get _ custom ( self, url, params ) : if self. token : params ['token'] = self. token response = requests. get ( url, params = params ) return response. json ( )
[ -0.3980759084224701, -0.6012725830078125, 0.4573642313480377, 0.16129198670387268, -0.15624937415122986, -1.3697975873947144, -1.2660237550735474, -0.3940129578113556, -0.0677584558725357, 0.18026205897331238, -0.690893292427063, 1.6105989217758179, -0.053439490497112274, -0.37599769234657...
def on _ edit _ article _ pressed ( self ) : if len ( self. article _ list ) > 0 : # get the list of article id numbers from the selected items in the article list widget article _ ids = list ( self. article _ list _ widget. get _ selection ( ) ) if len ( article _ ids ) > 0 : # close the current project ariticles wind...
[ -0.10846318304538727, 0.0751504898071289, 0.277883917093277, -0.42857274413108826, 0.3469347059726715, 0.03086499124765396, 1.0587576627731323, 0.871433436870575, 0.017818806692957878, 0.652253270149231, -0.17034892737865448, 0.6287449598312378, -0.5528926253318787, 0.3458116054534912, 0...
def normalize _ audio ( y ) : # todo : study other normalizing methods like rms normalizing y = y * 1. 0 return y / np. max ( np. abs ( y ) )
[ 0.46897226572036743, -0.952844500541687, 0.741954505443573, 1.2121334075927734, -0.48634418845176697, 0.17575962841510773, 0.25136351585388184, -0.500515341758728, 1.0779399871826172, 0.17422661185264587, 1.011743187904358, 0.2087453305721283, -0.2701335847377777, 0.6797387599945068, 0.9...
def on _ update ( self, new _ config : dict ) - > bool : pass
[ -0.4432002902030945, -0.8444303870201111, 0.44696906208992004, 0.8434755802154541, -0.5856215953826904, 0.12798918783664703, -1.2578434944152832, 0.35150444507598877, -0.12175288796424866, 1.1524815559387207, -1.2986443042755127, -0.5463926196098328, 0.1204746663570404, 0.3495411276817322,...
def reset _ parameters ( self ) : self. rnn. reset _ parameters ( ) self. action _ lookup. reset _ parameters ( ) # self. state _ dict _ lookup. reset _ parameters ( ) self. oc _ 1 _ lookup. reset. parameters ( ) self. oc _ 2 _ lookup. reset _ parameters ( ) self. oc _ 3 _ lookup. reset _ parameters ( ) self. os _ 1 _ ...
[ -0.5910277962684631, -0.44335249066352844, 0.6860432624816895, -0.22696712613105774, 0.6095176339149475, -0.002832111669704318, 1.2246812582015991, -0.2991649806499481, -0.6305994391441345, 0.735314130783081, -0.2253548800945282, 0.6380268931388855, -0.4891709089279175, 0.5035351514816284,...
def compare _ samples ( var _ names, hydro _ names, weight, synthetic _ obs, fm, clust _ labels, ks _ threshold, alpha, cv _ approach, n _ samples _ obs, n _ samples _ syn = 50, margin _ ratio = 0. 1, relh _ slope = 0. 001, allow _ label _ duplicates = false ) : total _ weight = np. sum ( weight ) labels = - 1 + np. ze...
[ -0.030519599094986916, -0.3275590240955353, 0.8417239785194397, 0.3823934495449066, 0.05204460397362709, 0.16712670028209686, 0.28707268834114075, 0.2143946886062622, -0.888493537902832, 0.6209682822227478, 0.3460184931755066, 0.4522697925567627, 0.5430027842521667, 0.4554104804992676, 0...
def add _ comma _ english ( number : any ) - > str : return f " { int ( number ) :, } "
[ -0.42615020275115967, -0.4189414381980896, 0.5828881859779358, -0.9150043725967407, 0.2343134731054306, 0.18244698643684387, -0.7987518906593323, 0.4916812777519226, 0.6826812624931335, 0.444957435131073, 0.5839665532112122, -0.5639833807945251, 0.5059598684310913, -0.6887117028236389, -...
def testflatw0wa ( self ) : h0 = 96. 0 for om0 in numpy. arange ( start = 0. 1, stop = 0. 95, step = 0. 4 ) : for w0 in numpy. arange ( start = - 1. 1, stop = - 0. 89, step = 0. 2 ) : for wa in numpy. arange ( start = - 0. 1, stop = 0. 11, step = 0. 2 ) : universe = cosmologyobject ( h0 = h0, om0 = om0, w0 = w0, wa = w...
[ 0.21007801592350006, -0.409239262342453, 0.8239243626594543, -0.5718907713890076, -0.058112066239118576, 0.4618377685546875, 0.8465995192527771, -0.5355643630027771, 0.5005791187286377, -0.7248112559318542, -0.3668449819087982, -0.18485960364341736, -0.16278919577598572, 1.645747184753418,...
def update _ statics ( log = none ) : config = get _ config ( ) target _ dir = api _ settings. static _ endpoint _ folder if log : log. write ( target _ dir ) if not os. path. exists ( target _ dir ) : os. makedirs ( target _ dir ) for endpoint in config. get ('endpoints ', [ ] ) : with open ( target _ dir + endpoint [...
[ -1.6068586111068726, -0.42934852838516235, 0.6169701814651489, -0.23027896881103516, 0.306075781583786, -0.26620346307754517, 0.3140084147453308, 0.0059815142303705215, -0.2132599800825119, 1.0019800662994385, -0.6969711780548096, 0.6258905529975891, 0.2069474756717682, -0.0873825773596763...
def strip _ consts ( graph _ def, max _ const _ size = 32 ) : strip _ def = tf. graphdef ( ) for n0 in graph _ def. node : n = strip _ def. node. add ( ) n. mergefrom ( n0 ) if n. op = ='const': tensor = n. attr ['value']. tensor size = len ( tensor. tensor _ content ) if size > max _ const _ size : tensor. tensor _ co...
[ 0.6409310102462769, 1.1322169303894043, 0.48287639021873474, -0.24686896800994873, -0.546481192111969, 0.5747342705726624, 0.48092707991600037, 0.693986713886261, -0.3661556839942932, 0.786800742149353, -0.6900084614753723, 0.07866761088371277, 0.34440159797668457, -0.4878102242946625, -...
def test _ empty _ fields ( self ) : # an empty formset should always be ignored and validate true form = self. form _ data ( " ", " ", " ", " " ) self. asserttrue ( form. is _ valid ( ) )
[ 0.22199618816375732, 0.6799883246421814, 0.4315330684185028, -0.847674548625946, 0.7630892395973206, 1.275376796722412, -0.7923858761787415, 0.4399586021900177, 0.027035672217607498, -1.705146074295044, -0.6003792881965637, -0.2632264494895935, -0.280813992023468, -0.28335022926330566, -...
def test _ protlig _ irmsd ( protlig _ caprimodule ) : protlig _ caprimodule. calc _ irmsd ( ) assert round _ two _ dec ( protlig _ caprimodule. irmsd ) = = 0. 22
[ 1.007143259048462, -0.8623051643371582, 0.2679898142814636, -0.1325289011001587, 0.0692744106054306, 0.679271399974823, -0.039520394057035446, 0.01969844289124012, -0.3106451630592346, -0.7388882040977478, 0.23144082725048065, 0.2917081415653229, -0.6659777164459229, 0.723041832447052, 1...
def merge ( cls, left, right, * * kwargs ) : # ensure both dataset objects are eith cudf or pandas based if left. cpu and not right. cpu : _ right = cls ( right. to _ ddf ( ) ) _ right. to _ cpu ( ) elif not left. cpu and right. cpu : _ right = cls ( right. to _ ddf ( ) ) _ right. to _ gpu ( ) return cls ( left. to _ d...
[ -0.25524628162384033, 1.1765069961547852, 0.8258695006370544, 0.3477444350719452, -0.3430232107639313, 0.12469793111085892, -1.0113399028778076, -0.35325756669044495, -0.19303838908672333, -1.1590036153793335, 0.1321873962879181, 0.4144960045814514, -0.4161008596420288, -0.1150137558579444...
def find _ missing _ chunks ( organization, chunks ) : owned = set ( fileblobowner. objects. filter ( blob _ _ checksum _ _ in = chunks, organization = organization, ). values _ list ('blob _ _ checksum ', flat = true ) ) return list ( set ( chunks ) - owned )
[ 1.0384379625320435, -1.2060054540634155, 0.6104398965835571, 0.5372331142425537, 0.9585781693458557, 0.4355492889881134, -0.11824502050876617, 0.03977826237678528, -0.6162629127502441, 0.6110715866088867, -0.36540305614471436, -0.32404825091362, -0.23621535301208496, 0.48582643270492554, ...
def loaddata ( data, schema ) : return { k : v for k, v in izip ( schema, json. loads ( data ) ) }
[ -0.8332111239433289, -0.1345347911119461, 0.454956978559494, -0.4178590476512909, -1.407528281211853, -0.894886314868927, -1.8363330364227295, 0.7008042335510254, 0.20324233174324036, 0.3643467426300049, -1.2499475479125977, 0.09240535646677017, -0.5704458951950073, -0.36227160692214966, ...
def cansplit ( self ) : return true
[ -0.6704586744308472, 0.6329081058502197, 0.5917041897773743, 1.1695101261138916, -0.3505770266056061, 0.7971600294113159, 0.8887810707092285, 1.2238788604736328, -0.266837477684021, -0.31975463032722473, -0.5596989393234253, -0.371540367603302, -1.1041383743286133, -0.25809863209724426, ...
def check _ request _ body _ original _ patch ( self, request _ info ) : logger. info ( f " [ 전처리 테스트 ] 요청 id [ { self. original _ data _ pk } ] 의 필수 파라미터 검사... " ) # 필수 파라미터 검사 ( 4101 ) is _ keys = self. _ mandatory _ key _ exists _ original _ patch ( element = request _ info ) if isinst...
[ -0.3357556462287903, -0.04068547859787941, 1.0771139860153198, -0.43466487526893616, -0.6301833987236023, 0.5958299040794373, 0.45823046565055847, 0.46632903814315796, 0.17326995730400085, 0.3027536869049072, -0.49411913752555847, 0.08517295122146606, -0.04166786000132561, -0.0622763410210...
def solve _ system ( a : np. ndarray, b : np. array ) - > np. array : # todo add your code here l, u = crout ( a ) x = forward _ substitution ( l, b ) y = back _ substitution ( u, x ) return y
[ 0.6613913774490356, 0.7007264494895935, 0.6507624387741089, 0.1275813728570938, 1.0369764566421509, -0.7543376088142395, -0.20635859668254852, 0.1302535980939865, -0.04489677771925926, 0.08283215761184692, -0.012101941742002964, 1.1149059534072876, -0.2483198344707489, -0.3223583698272705,...
def download _ article _ button ( self ) : btn = qpushbutton ( ) btn. seticon ( qicon ( os. path. normpath ( _ _ file _ _ +'/.. /.. / img / figshare _ download. png') ) ) press _ button ( self. app, btn ) btn. settooltip ('download selected articles') btn. settooltipduration ( 1000 ) btn. pressed. connect ( self. on _ ...
[ 0.6659599542617798, 0.16539965569972992, 0.4945148825645447, -0.5698943734169006, 0.08698669075965881, 0.12646520137786865, 0.966026782989502, 0.33930307626724243, 0.22946523129940033, 0.26114895939826965, -0.6959915161132812, 0.03213991969823837, 0.21512986719608307, -0.2846422791481018, ...
def at _ server _ init ( ) : import athanor if athanor. startup _ called : return athanor. startup _ called = true # from mudrich import install _ mudrich # install _ mudrich ( ) from evennia. utils. utils import callables _ from _ module from django. conf import settings from athanor import aspect _ slot _ classes, qu...
[ -0.8981488943099976, -0.44426852464675903, 0.6986806988716125, -0.7886828184127808, -0.009957369416952133, -0.35544148087501526, 0.30843186378479004, -0.4850137531757355, -0.2692304253578186, 0.07340609282255173, -0.2982267141342163, 0.6827314496040344, 1.169100284576416, 1.264839887619018...
def _ _ init _ _ ( self ) : self. collection _ name = settings. _ flight _ collection _ name # name of the mongodb collection self. record = flightrecord # positional processing rules self. title _ position = none # zero - based position of the record set title self. header _ position = 0 # zero - based position of the...
[ 0.4910642206668854, -0.47675079107284546, 0.6959763169288635, 0.013212529011070728, 0.5738491415977478, 0.1498187780380249, -0.3455185890197754, -0.025419993326067924, -0.9401283860206604, -0.1609519124031067, 0.28144145011901855, -0.5382242202758789, -0.6044427752494812, 0.959220051765441...
def get _ score ( self ) : return self. _ _ score
[ -0.1165108010172844, -0.6278272271156311, 0.3780881464481354, -0.11249678581953049, 0.6524683833122253, 0.09875734150409698, -0.26079994440078735, -0.5328396558761597, -0.07436801493167877, -0.6126900911331177, 0.4592772424221039, 0.1012498140335083, -0.5127391219139099, -0.707328796386718...
def print _ stats ( coord ) : print " latitude : min : { }, max : { }, avg : { }, stdev : { } ". format ( coord [ 0 ]. min ( ), coord [ 0 ]. max ( ), coord [ 0 ]. mean ( ), coord [ 0 ]. std ( ) ) print " longitude : min : { }, max : { }, avg : { }, stdev : { } ". format ( coord [ 1 ]. min ( ), coord [ 1 ]. max ( ), coo...
[ 0.40371137857437134, 0.07069908827543259, 0.8794977068901062, -0.9367563724517822, -0.16861703991889954, 0.781708300113678, -0.24519601464271545, -1.2351330518722534, -0.5497787594795227, 0.1450023651123047, -0.1861276775598526, 0.8459770679473877, 0.14994147419929504, 0.1907394826412201, ...
def connscan ( self ) : log. debug ( " executing volatility connscan plugin on " " { 0 } ". format ( self. memdump ) ) self. _ _ config ( ) results = [ ] command = self. plugins [ " connscan " ] ( self. config ) for tcp _ object in command. calculate ( ) : new = { " offset " : hex ( int ( tcp _ object. obj _ offset ) )...
[ -0.5970012545585632, -0.9720736145973206, 0.6786774396896362, -0.7341578006744385, -0.03597721457481384, -0.9358639717102051, -0.6660280823707581, 0.04665223881602287, -0.22478272020816803, 0.811249315738678, -0.6507971286773682, 0.07754998654127121, -0.3182879686355591, 0.1722106188535690...
def run _ main ( workdir, config _ file = none, fc _ dir = none, run _ info _ yaml = none, parallel = none, workflow = none ) : os. chdir ( workdir ) config, config _ file = load _ system _ config ( config _ file, workdir ) if config. get ( " log _ dir ", none ) is none : config [ " log _ dir " ] = os. path. join ( wor...
[ -0.4333549439907074, -0.18097656965255737, 0.9619697332382202, 0.38951054215431213, -0.544859766960144, 0.06893578916788101, 0.406449556350708, 0.521940290927887, -0.15757915377616882, -0.005738904699683189, 0.12229000777006149, 0.37831172347068787, -0.13568724691867828, 0.7052369713783264...
def check _ data _ for _ bugs ( table, title _ list ) : if ( not table ) or ( not title _ list ) : raise valueerror ('not enough data delivered.') is _ data _ in _ table _ broken = check _ table _ for _ type _ bugs ( table ) is _ data _ in _ title _ list _ broken = check _ title _ list _ for _ type _ bugs ( title _ lis...
[ -0.3827362060546875, 0.2266533225774765, 0.6523522138595581, 0.6075644493103027, 0.1594076156616211, 1.0838714838027954, -0.5423067212104797, -0.6388684511184692, -0.3705964982509613, -0.21251334249973297, -0.32640665769577026, 0.7075496315956116, -0.43593886494636536, 1.0853726863861084, ...
def test _ qlibrary _ instantiate _ basequbit ( self ) : design = designs. designplanar ( ) try : basequbit except exception : self. fail ( " basequbit failed " ) with self. assertraises ( notimplementederror ) : basequbit ( design, " my _ name " ) with self. assertraises ( notimplementederror ) : basequbit ( design, "...
[ -0.05944860354065895, -0.21007350087165833, 0.33847159147262573, -0.42342832684516907, -0.32563474774360657, 1.4800647497177124, 0.05943446233868599, -1.0862191915512085, -0.32176244258880615, -0.6098846197128296, -0.42442160844802856, -0.31956174969673157, -0.551261305809021, 0.1476488858...
def choose _ action ( self, sess, states ) : return sess. run ( self. sample _ op, { self. states _ ph : states } ) [ 0 ]
[ -0.0028019140008836985, -0.1297547072172165, 0.18649080395698547, 0.5157476663589478, -0.014809821732342243, -0.41021275520324707, 0.19523434340953827, -0.481583833694458, 1.0426496267318726, 0.18986840546131134, 0.5410580635070801, 0.36812809109687805, -0.07453423738479614, -0.80332803726...