rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.soundmix = re.findall(conf.strings["imdb_soundmix_re"], page, re.MULTILINE) self.__setitem__("soundmix", self.soundmix)
def __parsePage(self, page):
94b2b16fd1c061001a6110209b8adf873a6b2c81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13971/94b2b16fd1c061001a6110209b8adf873a6b2c81/pythonbits.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 1964, 12, 2890, 16, 1363, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 1964, 12, 2890, 16, 1363, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
segments = message.get_segments()
segments = [] for seg, offset in get_segments(message): segments.append(seg)
def test_HTMLbis(self): text = u"""<em>J. David</em>""" result = [u'<em>J. David</em>']
f60259a351ba0ec0893ebab283ae29d948ec283a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/f60259a351ba0ec0893ebab283ae29d948ec283a/test_i18n.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4870, 70, 291, 12, 2890, 4672, 977, 273, 582, 8395, 32, 351, 34, 46, 18, 225, 463, 842, 350, 1757, 351, 2984, 3660, 563, 273, 306, 89, 11, 32, 351, 34, 46, 18, 463, 842, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4870, 70, 291, 12, 2890, 4672, 977, 273, 582, 8395, 32, 351, 34, 46, 18, 225, 463, 842, 350, 1757, 351, 2984, 3660, 563, 273, 306, 89, 11, 32, 351, 34, 46, 18, 463, 842, ...
zips = rc.retrieve_updates(rc.id)
zips = rc.retrieve_updates(rc.id, addons.get_modules_with_version())
def get_migration_scripts(self, password, contract_id, contract_password): security.check_super(password) l = netsvc.Logger() import tools.maintenance as tm try: rc = tm.remote_contract(contract_id, contract_password) if not rc.id: raise tm.RemoteContractException('This contract does not exist or is not active') if rc.status != 'full': raise tm.RemoteContractException('Can not get updates for a partial contract')
737f81534d1698583495ec248501df4f4ca5e67f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/737f81534d1698583495ec248501df4f4ca5e67f/web_services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15746, 67, 12827, 12, 2890, 16, 2201, 16, 6835, 67, 350, 16, 6835, 67, 3664, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 328, 273, 21954, 4227, 18, 3328, 1435, 1930, 8513, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 15746, 67, 12827, 12, 2890, 16, 2201, 16, 6835, 67, 350, 16, 6835, 67, 3664, 4672, 4373, 18, 1893, 67, 9565, 12, 3664, 13, 328, 273, 21954, 4227, 18, 3328, 1435, 1930, 8513, ...
extras = generate_extras(stree, gtree, freqdup)
extras = generate_extras(stree, gtree)
def sim_walk(gtree, snode, gnode, p, s_walk_time=0.0, g_walk_time=0.0, \ time_until_force=forcetime, eventlog=[]):
9e666bd2e1ce79720a70adc6d8dc1bb739182c1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7683/9e666bd2e1ce79720a70adc6d8dc1bb739182c1c/sim_v2_2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 11348, 12, 75, 3413, 16, 272, 2159, 16, 314, 2159, 16, 293, 16, 272, 67, 11348, 67, 957, 33, 20, 18, 20, 16, 314, 67, 11348, 67, 957, 33, 20, 18, 20, 16, 521, 813, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 11348, 12, 75, 3413, 16, 272, 2159, 16, 314, 2159, 16, 293, 16, 272, 67, 11348, 67, 957, 33, 20, 18, 20, 16, 314, 67, 11348, 67, 957, 33, 20, 18, 20, 16, 521, 813, 67, ...
0.417143558758384
0.417143558758385
def regulator(self, use_database=True, verbose=None, proof=True): """ Returns the regulator of this curve, which must be defined over Q.
490bf41219e08182aa07ee3edf473cac45224f99 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/490bf41219e08182aa07ee3edf473cac45224f99/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 960, 11775, 12, 2890, 16, 999, 67, 6231, 33, 5510, 16, 3988, 33, 7036, 16, 14601, 33, 5510, 4672, 3536, 2860, 326, 960, 11775, 434, 333, 8882, 16, 1492, 1297, 506, 2553, 1879, 2238, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 960, 11775, 12, 2890, 16, 999, 67, 6231, 33, 5510, 16, 3988, 33, 7036, 16, 14601, 33, 5510, 4672, 3536, 2860, 326, 960, 11775, 434, 333, 8882, 16, 1492, 1297, 506, 2553, 1879, 2238, 18...
import sys, os, tempfile
import sys, os, tempfile, time
def test_bug737473(self): import sys, os, tempfile savedpath = sys.path[:] testdir = tempfile.mkdtemp() try: sys.path.insert(0, testdir) testfile = os.path.join(testdir, 'test_bug737473.py') print >> open(testfile, 'w'), """\
6aa1c1c3813e9f595981d792a593a3ee412db2a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/6aa1c1c3813e9f595981d792a593a3ee412db2a9/test_traceback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 9036, 5608, 9036, 12, 2890, 4672, 1930, 2589, 16, 1140, 16, 13275, 16, 813, 225, 5198, 803, 273, 2589, 18, 803, 10531, 65, 1842, 1214, 273, 13275, 18, 24816, 72, 5814, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 9036, 5608, 9036, 12, 2890, 4672, 1930, 2589, 16, 1140, 16, 13275, 16, 813, 225, 5198, 803, 273, 2589, 18, 803, 10531, 65, 1842, 1214, 273, 13275, 18, 24816, 72, 5814, 1...
extra = basicWidth - length wordspace = extra*1.0/nwords
def draw(self): from reportlab.lib.enums import TA_LEFT, TA_CENTER, TA_RIGHT, TA_JUSTIFY style = self.style lines = self.lines rightIndent = style.rightIndent leftIndent = style.leftIndent leading = style.leading font = style.fontName size = style.fontSize alignment = style.alignment firstindent = style.firstLineIndent c = self.canv escape = c._escape #if debug: # print "FAST", id(self), "page number", c.getPageNumber() height = self.height #if debug: # c.rect(0,0,-1, height-size, fill=1, stroke=1) c.translate(0, height-size) textobject = c.beginText() code = textobject._code #textobject.setTextOrigin(0,firstindent) textobject.setFont(font, size) if style.textColor: textobject.setFillColor(style.textColor) first = 1 y = 0 basicWidth = self.availableWidth - rightIndent count = 0 nlines = len(lines) while count<nlines: (text, length, nwords) = lines[count] count = count+1 thisindent = leftIndent if first: thisindent = firstindent if alignment==TA_LEFT: x = thisindent elif alignment==TA_CENTER: extra = basicWidth - length x = thisindent + extra/2.0 elif alignment==TA_RIGHT: extra = basicWidth - length x = thisindent + extra elif alignment==TA_JUSTIFY: x = thisindent extra = basicWidth - length wordspace = extra*1.0/nwords if count<nlines: # patch from doug@pennatus.com, 9 Nov 2002 # was: textobject.setWordSpace(wordspace) textobject.setWordSpace((extra*1.0/(nwords - 1))) else: textobject.setWordSpace(0.0) textobject.setTextOrigin(x,y) text = escape(text) code.append('(%s) Tj' % text) #textobject.textOut(text) y = y-leading c.drawText(textobject)
8e964059053b9454c9007cadd13e3a4d20c46e8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/8e964059053b9454c9007cadd13e3a4d20c46e8f/para.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 628, 2605, 7411, 18, 2941, 18, 7924, 87, 1930, 399, 37, 67, 10066, 16, 399, 37, 67, 19835, 16, 399, 37, 67, 11847, 16, 399, 37, 67, 46, 5996, 12096, 2154, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 4672, 628, 2605, 7411, 18, 2941, 18, 7924, 87, 1930, 399, 37, 67, 10066, 16, 399, 37, 67, 19835, 16, 399, 37, 67, 11847, 16, 399, 37, 67, 46, 5996, 12096, 2154, 273, ...
print_warning(req, "Nested or mismatched parethneses. Continue search ignoring paretheses.")
print_warning(req, _("Nested or mismatched parentheses detected. Ignoring all parentheses in the query..."))
def search_pattern_parenthesised(req=None, p=None, f=None, m=None, ap=0, of="id", verbose=0, ln=CFG_SITE_LANG): """Search for complex pattern 'p' containing parenthesis within field 'f' according to matching type 'm'. Return hitset of recIDs. For more details on the parameters see 'search_pattern' """ # Try searching with parentheses try: parser = SearchQueryParenthesisedParser() # get a hitset with all recids result_hitset = get_collection_reclist(CFG_SITE_NAME) # parse the query. The result is list of [op1, expr1, op2, expr2, ..., opN, exprN] parsing_result = parser.parse_query(p) # go through every pattern # calculate hitset for it # combine pattern's hitset with the result using the corresponding operator for index in xrange(0, len(parsing_result)-1, 2 ): current_operator = parsing_result[index] current_pattern = parsing_result[index+1] # obtain a hitset for the current patter current_hitset = search_pattern(req, current_pattern, f, m, ap, of, verbose, ln) # combine the current hitset with resulting hitset using the current operator if current_operator == '+': result_hitset = result_hitset & current_hitset elif current_operator == '-': result_hitset = result_hitset - current_hitset elif current_operator == '|': result_hitset = result_hitset | current_hitset else: assert False, "Unknown operator in search_pattern_parenthesised()" return result_hitset # If searching with parenteses fails, perform search ignoring parentheses except InvenioWebSearchQueryParserException: print_warning(req, "Nested or mismatched parethneses. Continue search ignoring paretheses.") # remove the parentheses in the query. Current implementation removes all the parentheses, # but it could be improved to romove only these that are not insede quotes p = p.replace('(', ' ') p = p.replace(')', ' ') return search_pattern(req, p, f, m, ap, of, verbose, ln)
4591a3f22ce6cf6978c35a785b29d1dada96eb5e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/4591a3f22ce6cf6978c35a785b29d1dada96eb5e/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4951, 67, 13012, 7915, 5918, 12, 3658, 33, 7036, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 312, 33, 7036, 16, 513, 33, 20, 16, 434, 1546, 350, 3113, 3988, 33, 20, 16, 721...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4951, 67, 13012, 7915, 5918, 12, 3658, 33, 7036, 16, 293, 33, 7036, 16, 284, 33, 7036, 16, 312, 33, 7036, 16, 513, 33, 20, 16, 434, 1546, 350, 3113, 3988, 33, 20, 16, 721...
print "tcm_node --createdev " + f + "/" + g + " " + str(params)
print "tcm_node --establishdev " + f + "/" + g + " " + str(params)
def tcm_dump_configfs(): print "modprobe target_core_mod" # Loop through ALUA Logical Unit and Target Port groups # Note that the 'default_lu_gp' and 'default_tg_pt_gp' are automatically # created when target_core_mod is loaded. print "#### ALUA Logical Unit Groups" for lu_gp in os.listdir(tcm_root + "/alua/lu_gps"): if lu_gp == "default_lu_gp": continue print "mkdir -p " + tcm_root + "/alua/lu_gps/" + lu_gp lu_gp_id_file = tcm_root + "/alua/lu_gps/" + lu_gp + "/lu_gp_id" p = os.open(lu_gp_id_file, 0) value = os.read(p, 8) os.close(p) if not value: continue print "echo " + value.rstrip() + " > " + lu_gp_id_file print "#### ALUA Target Port Groups" for tg_pt_gp in os.listdir(tcm_root + "/alua/tg_pt_gps"): if tg_pt_gp == "default_tg_pt_gp": continue print "mkdir -p " + tcm_root + "/alua/tg_pt_gps/" + tg_pt_gp tg_pt_gp_id_file = tcm_root + "/alua/tg_pt_gps/" + tg_pt_gp + "/tg_pt_gp_id" p = os.open(tg_pt_gp_id_file, 0) value = os.read(p, 8) os.close(p) if not value: continue print "echo " + value.rstrip() + " > " + tg_pt_gp_id_file # Loop through HBA list for f in os.listdir(tcm_root): if f == "alua": continue;
50c6fb1ce023c6efa45ceb5bd9e4af038003575e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8449/50c6fb1ce023c6efa45ceb5bd9e4af038003575e/tcm_dump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 8481, 67, 1425, 2556, 13332, 225, 1172, 315, 1711, 27230, 1018, 67, 3644, 67, 1711, 6, 225, 468, 9720, 3059, 7981, 28203, 17085, 8380, 471, 5916, 6008, 3252, 468, 3609, 716...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 8481, 67, 1425, 2556, 13332, 225, 1172, 315, 1711, 27230, 1018, 67, 3644, 67, 1711, 6, 225, 468, 9720, 3059, 7981, 28203, 17085, 8380, 471, 5916, 6008, 3252, 468, 3609, 716...
maxJobsInFillMode = int( numberOfUses / self.maxJobsInFillMode )
maxJobsInFillMode = int( numberOfUses / pilotsToSubmit )
def _getPilotOptions( self, taskQueueDict, pilotsToSubmit ):
b23c3b9e200af71f17306d4fde887b9ab4ed5c2c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b23c3b9e200af71f17306d4fde887b9ab4ed5c2c/PilotDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 52, 22797, 1320, 12, 365, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 52, 22797, 1320, 12, 365, 16, 1562, 3183, 5014, 16, 24970, 6968, 774, 11620, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.AddToResponse("") self.AddToResponse("To change an option, do: " "set <option> <on|off> <password>") self.AddToResponse("") self.AddToResponse("Option explanations:") self.AddToResponse("--------------------")
self.AddToResponse("\n" "To change an option, do: " "set <option> <on|off> <password>\n" "\n" "Option explanations:\n" "--------------------")
def ProcessOptionsCmd(self, args, cmd, mail):
5551c37235c9c603bd7ae608093198c4c4d929f5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/5551c37235c9c603bd7ae608093198c4c4d929f5/MailCommandHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 1320, 5931, 12, 2890, 16, 833, 16, 1797, 16, 4791, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 1320, 5931, 12, 2890, 16, 833, 16, 1797, 16, 4791, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
author='Julian Infanger', author_email='info@4teamwork.ch',
author='%s, 4teamwork GmbH' % maintainer, author_email='mailto:info@4teamwork.ch',
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
3d4644554a672729890b1031d45113b1e0c91d53 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11860/3d4644554a672729890b1031d45113b1e0c91d53/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
md_fields = data.split('\n') for md in md_fields: val = retry_url(url + md) if val.find('\n') > 0: val = val.split('\n') metadata[md] = val return metadata
fields = data.split('\n') for field in fields: if field.endswith('/'): d[field[0:-1]] = _get_instance_metadata(url + field) else: p = field.find('=') if p > 0: field = field[0:p] val = retry_url(url + field) p = val.find('\n') if p > 0: val = val.split('\n') d[field] = val return d def get_instance_metadata(version='latest'): url = 'http://169.254.169.254/%s/meta-data/' % version return _get_instance_metadata(url)
def get_instance_metadata(version='latest'): metadata = {} url = 'http://169.254.169.254/%s/meta-data/' % version data = retry_url(url) if data: md_fields = data.split('\n') for md in md_fields: val = retry_url(url + md) if val.find('\n') > 0: val = val.split('\n') metadata[md] = val return metadata
881fd228fa7bda71e2878e4ae2445809f63edbad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1098/881fd228fa7bda71e2878e4ae2445809f63edbad/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1336, 67, 4165, 12, 1589, 2218, 13550, 11, 4672, 1982, 273, 2618, 880, 273, 296, 2505, 2207, 26035, 18, 26261, 18, 26035, 18, 26261, 5258, 87, 19, 3901, 17, 892, 2473, 738, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1336, 67, 4165, 12, 1589, 2218, 13550, 11, 4672, 1982, 273, 2618, 880, 273, 296, 2505, 2207, 26035, 18, 26261, 18, 26035, 18, 26261, 5258, 87, 19, 3901, 17, 892, 2473, 738, 11...
place1 = self.gla.get_widget("vbox2")
place1 = self.gla.get_widget("hboxObspyck")
def __init__(self, client = None, streams = None, options = None): self.client = client self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpass':2, 'Highpass':3} self.flagFiltZPH=False #False: no zero-phase True: zero-phase filtering self.valFiltHigh=self.options.highpass self.valFiltLow=self.options.lowpass self.flagWheelZoom=True #Switch use of mousewheel for zooming self.flagPhase=0 #0:P 1:S 2:Magnitude self.dictPhase={'P':0, 'S':1, 'Mag':2} self.dictPhaseInverse = {} # We need the reverted dictionary for switching throug the Phase radio button for i in self.dictPhase.items(): self.dictPhaseInverse[i[1]] = i[0] self.dictPhaseColors={'P':'red', 'S':'blue', 'Psynth':'black', 'Ssynth':'black', 'Mag':'green'} self.dictPhaseLinestyles={'P':'-', 'S':'-', 'Psynth':'--', 'Ssynth':'--'} self.pickingColor = self.dictPhaseColors['P'] self.magPickWindow=10 #Estimating the maximum/minimum in a sample-window around click self.magMinMarker='x' self.magMaxMarker='x' self.magMarkerEdgeWidth=1.8 self.magMarkerSize=20 self.axvlinewidths=1.2 #dictionary for key-bindings self.dictKeybindings = {'setPick': 'alt', 'setPickError': ' ', 'delPick': 'escape', 'setMagMin': 'alt', 'setMagMax': ' ', 'switchPhase': 'control', 'delMagMinMax': 'escape', 'switchWheelZoom': 'z', 'switchPan': 'p', 'prevStream': 'y', 'nextStream': 'x', 'setPWeight0': '0', 'setPWeight1': '1', 'setPWeight2': '2', 'setPWeight3': '3', # 'setPWeight4': '4', 'setPWeight5': '5', 'setSWeight0': '0', 'setSWeight1': '1', 'setSWeight2': '2', 'setSWeight3': '3', # 'setSWeight4': '4', 'setSWeight5': '5', 'setPPolUp': 'u', 'setPPolPoorUp': '+', 'setPPolDown': 'd', 'setPPolPoorDown': '-', 'setSPolUp': 'u', 'setSPolPoorUp': '+', 'setSPolDown': 'd', 'setSPolPoorDown': '-', 'setPOnsetImpulsive': 'i', 'setPOnsetEmergent': 'e', 'setSOnsetImpulsive': 'i', 'setSOnsetEmergent': 'e'} self.tmp_dir = tempfile.mkdtemp() + '/' self.threeDlocPath = self.options.pluginpath + '/3dloc/' self.threeDlocOutfile = self.tmp_dir + '3dloc-out' self.threeDlocInfile = self.tmp_dir + '3dloc-in' # copy 3dloc files to temp directory (only na.in) subprocess.call('cp %s/* %s &> /dev/null' % \ (self.threeDlocPath, self.tmp_dir), shell=True) self.threeDlocPreCall = 'rm %s %s &> /dev/null' \ % (self.threeDlocOutfile, self.threeDlocInfile) self.threeDlocCall = 'export D3_VELOCITY=/scratch/rh_vel/vp_5836/;' + \ 'export D3_VELOCITY_2=/scratch/rh_vel/vs_32220/;' + \ 'cd %s; 3dloc_pitsa' % self.tmp_dir self.hyp2000Path = self.options.pluginpath + '/hyp_2000/' self.hyp2000Controlfile = self.hyp2000Path + 'bay2000.inp' self.hyp2000Phasefile = self.tmp_dir + 'hyp2000.pha' self.hyp2000Stationsfile = self.tmp_dir + 'stations.dat' self.hyp2000Summary = self.tmp_dir + 'hypo.prt' # copy hypo2000 files to temp directory subprocess.call('cp %s/* %s &> /dev/null' % \ (self.hyp2000Path, self.tmp_dir), shell=True) self.hyp2000PreCall = 'rm %s %s %s &> /dev/null' \ % (self.hyp2000Phasefile, self.hyp2000Stationsfile, self.hyp2000Summary) self.hyp2000Call = 'export HYP2000_DATA=%s;' % (self.tmp_dir) + \ 'cd $HYP2000_DATA;' + \ './hyp2000 < bay2000.inp &> /dev/null' self.focmecPath = self.options.pluginpath + '/focmec/' self.focmecPhasefile = self.tmp_dir + 'focmec.dat' self.focmecStdout = self.tmp_dir + 'focmec.stdout' self.focmecSummary = self.tmp_dir + 'focmec.out' # copy focmec files to temp directory subprocess.call('cp %s/* %s &> /dev/null' % \ (self.focmecPath, self.tmp_dir), shell=True) self.focmecCall = 'cd %s;' % (self.tmp_dir) + \ './rfocmec' self.dictOrigin = {} self.dictMagnitude = {} self.dictFocalMechanism = {} # currently selected focal mechanism self.focMechList = [] # list for all focal mechanisms from focmec # indicates which of the available focal mechanisms is selected self.focMechCurrent = None # indicates how many focal mechanisms are available from focmec self.focMechCount = None self.dictEvent = {} self.dictEvent['xmlEventID'] = None #value for the "public" tag in the event xml (switched by button) self.flagPublicEvent = True self.flagSpectrogram = False # indicates which of the available events from seishub was loaded self.seishubEventCurrent = None # indicates how many events are available from seishub self.seishubEventCount = None # save username of current user self.username = os.environ['USER'] # setup server information self.server = {} self.server['Name'] = self.options.servername # "teide" self.server['Port'] = self.options.port # 8080 self.server['Server'] = self.server['Name'] + \ ":%i" % self.server['Port'] self.server['BaseUrl'] = "http://" + self.server['Server'] # If keybindings option is set only show keybindings and exit if self.options.keybindings: for k, v in self.dictKeybindings.iteritems(): print "%s: \"%s\"" % (k, v) return
b822b77814749ba0fa0b0a638d2c2e8ccf514f6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10470/b822b77814749ba0fa0b0a638d2c2e8ccf514f6c/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1004, 273, 599, 16, 8205, 273, 599, 16, 702, 273, 599, 4672, 365, 18, 2625, 273, 1004, 365, 18, 16320, 273, 8205, 365, 18, 2116, 273, 702, 468, 11644, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1004, 273, 599, 16, 8205, 273, 599, 16, 702, 273, 599, 4672, 365, 18, 2625, 273, 1004, 365, 18, 16320, 273, 8205, 365, 18, 2116, 273, 702, 468, 11644, ...
sage: r.png(file='"%s"'%filename)
sage: r.png(file='"%s"'%filename)
def png(self, *args, **kwargs): """ Creates an R PNG device. Note that when using the R pexpect interface in the notebook, you need to call r.dev_off() in the same cell as you opened the device on in order to get the plot to appear.
42a77e19371576e2f0fa4a64916832f43f940a8c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/42a77e19371576e2f0fa4a64916832f43f940a8c/r.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14476, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 10210, 392, 534, 22476, 2346, 18, 225, 3609, 716, 1347, 1450, 326, 534, 293, 12339, 1560, 316, 326, 14718, 16, 1846, 1608, 358...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14476, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 10210, 392, 534, 22476, 2346, 18, 225, 3609, 716, 1347, 1450, 326, 534, 293, 12339, 1560, 316, 326, 14718, 16, 1846, 1608, 358...
nickName = j[3]
nickName = j[1].strip().split()[2]
def getVOMSAttributes(proxy,switch="all"): """ Return VOMS proxy attributes as list elements if switch="all" (default) OR return the string prepared to be stored in DB if switch="db" OR return the string of elements to be used as the option string in voms-proxy-init if switch="option". If a given proxy is a grid proxy, then function will return an empty list. """
ccb3203977b697bf0db65d0281f24e9b329186b5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/ccb3203977b697bf0db65d0281f24e9b329186b5/GridCredentials.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11031, 1872, 55, 2498, 12, 5656, 16, 9610, 1546, 454, 6, 4672, 3536, 2000, 776, 1872, 55, 2889, 1677, 487, 666, 2186, 309, 1620, 1546, 454, 6, 261, 1886, 13, 4869, 327, 326, 533, 8208,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11031, 1872, 55, 2498, 12, 5656, 16, 9610, 1546, 454, 6, 4672, 3536, 2000, 776, 1872, 55, 2889, 1677, 487, 666, 2186, 309, 1620, 1546, 454, 6, 261, 1886, 13, 4869, 327, 326, 533, 8208,...
invalid=self._invalid
invalid = self._invalid
def setstate(self, object): oid=object._p_oid
8f44f0fa4dea8b55bb647630f9a0187d2cf2b3c9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/8f44f0fa4dea8b55bb647630f9a0187d2cf2b3c9/Connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2019, 12, 2890, 16, 733, 4672, 7764, 33, 1612, 6315, 84, 67, 839, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2019, 12, 2890, 16, 733, 4672, 7764, 33, 1612, 6315, 84, 67, 839, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
pl = (20.0, 0.1)
pli = (20.0, 0.1)
def tof_to_wavelength(obj,**kwargs): """ This function converts a primary axis of a SOM or SO from time-of-flight to wavelength. The wavelength axis for a SOM must be in units of microseconds. The primary axis of a SO is assumed to be in units of microseconds. A tuple of (tof, tof_err2) (assumed to be in units of microseconds) can be converted to (wavelength, wavelength_err2). Parameters: ---------- -> obj is the SOM, SO or tuple to be converted -> kwargs is a list of key word arguments that the function accepts: pathlength= a tuple or list of tuples containing the pathlength and its associated error^2 inst_param= a string containing the type of parameter requested from an associated instrument. For this function the acceptable parameters are primary and secondary. Default is primary. units= a string containing the expected units for this function. The default for this function is microseconds Return: ------ <- A SOM or SO with a primary axis in wavelength or a tuple converted to wavelength Exceptions: ---------- <- TypeError is raised if the incoming object is not a type the function recognizes <- RuntimeError is raised if the SOM x-axis units are not microseconds <- RuntimeError is raised if a SOM does not contain an instrument and no pathlength was provided <- RuntimeError is raised is no SOM is provided and no pathlength given """ # import the helper functions import hlr_utils # set up for working through data (result,res_descr)=hlr_utils.empty_result(obj) (o_descr,d_descr)=hlr_utils.get_descr(obj) # Setup keyword arguments try: inst_param = kwargs["inst_param"] except KeyError: inst_param = "primary" try: pathlength = kwargs["pathlength"] except KeyError: pathlength = None try: units = kwargs["units"] except KeyError: units = "microseconds" # Primary axis for transformation. If a SO is passed, the function, will # assume the axis for transformation is at the 0 position if o_descr == "SOM": axis = hlr_utils.hlr_1D_units(obj, units) else: axis = 0 result=hlr_utils.copy_som_attr(result,res_descr,obj,o_descr) if res_descr == "SOM": result = hlr_utils.hlr_force_units(result, "Angstroms", axis) result.setAxisLabel(axis, "wavelength") result.setYUnits("Counts/A") result.setYLabel("Intensity") else: pass if pathlength != None: (p_descr,e_descr) = hlr_utils.get_descr(pathlength) else: if o_descr == "SOM": try: obj.attr_list.instrument.get_primary() inst = obj.attr_list.instrument except RuntimeError: raise RuntimeError, "A detector was not provided" else: raise RuntimeError, "If no SOM is provided, then pathlength "\ +"information must be provided" # iterate through the values import axis_manip for i in range(hlr_utils.get_length(obj)): val = hlr_utils.get_value(obj,i,o_descr,"x",axis) err2 = hlr_utils.get_err2(obj,i,o_descr,"x",axis) map_so = hlr_utils.get_map_so(obj,None,i) if pathlength == None: (pl,pl_err2) = hlr_utils.get_parameter(inst_param,map_so,inst) else: pl = hlr_utils.get_value(pathlength,i,p_descr) pl_err2 = hlr_utils.get_err2(pathlength,i,p_descr) value=axis_manip.tof_to_wavelength(val, err2, pl, pl_err2) hlr_utils.result_insert(result,res_descr,value,map_so,"x",axis) return result
481f3c69e02c2688215a796ae23eec59561b6860 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/481f3c69e02c2688215a796ae23eec59561b6860/hlr_tof_to_wavelength.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 91, 16775, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, 19131, 358, 21410, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 74, 67, 869, 67, 91, 16775, 12, 2603, 16, 636, 4333, 4672, 3536, 1220, 445, 7759, 279, 3354, 2654, 434, 279, 348, 1872, 578, 7460, 628, 813, 17, 792, 17, 19131, 358, 21410, 18, ...
self.redirect(self.action_url(action))
self.redirect(self.action_url(self.action))
def post(self): message_subject = self.request.get('message_subject')
26a70ba9cd56633a766b20434726cb5f1db54309 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14392/26a70ba9cd56633a766b20434726cb5f1db54309/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 883, 67, 7857, 273, 365, 18, 2293, 18, 588, 2668, 2150, 67, 7857, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 883, 67, 7857, 273, 365, 18, 2293, 18, 588, 2668, 2150, 67, 7857, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
buffer = buffer + data while buffer: n = conn.send(buffer) buffer = buffer[n:]
self.buffer = self.buffer + data self.buffer = self.buffer.replace(SERVER_QUIT, '') try: while self.buffer: n = conn.send(self.buffer[:self.chunk_size]) time.sleep(0.001) self.buffer = self.buffer[n:] except: pass
def run(self): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) global PORT PORT = test_support.bind_port(sock, HOST, PORT) sock.listen(1) conn, client = sock.accept() buffer = "" while "\n" not in buffer: data = conn.recv(1) if not data: break buffer = buffer + data while buffer: n = conn.send(buffer) buffer = buffer[n:] conn.close() sock.close()
ec62423be4a84a056a9a0a1203875b8a29279365 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/ec62423be4a84a056a9a0a1203875b8a29279365/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 7313, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 7313, 18, 4424, 27844, 12, 7814, 18, 19815, 67, 25699, 16, 2987...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 7313, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 7313, 18, 4424, 27844, 12, 7814, 18, 19815, 67, 25699, 16, 2987...
siteconfig.settings.get("auth_enable_registration")):
siteconfig.get("auth_enable_registration")):
def account_register(request): """ Handles redirection to the appropriate registration page, depending on the authentication type the user has configured. """ siteconfig = SiteConfiguration.objects.get_current() auth_backend = siteconfig.get("auth_backend") if (auth_backend == "builtin" and siteconfig.settings.get("auth_enable_registration")): return register(request, next_page=settings.SITE_ROOT + 'dashboard/') return HttpResponseRedirect(reverse("login"))
628e7ba8df94730f047ff4787b1f6ed8d6843e6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1600/628e7ba8df94730f047ff4787b1f6ed8d6843e6d/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2236, 67, 4861, 12, 2293, 4672, 3536, 27020, 19611, 358, 326, 5505, 7914, 1363, 16, 8353, 603, 326, 5107, 618, 326, 729, 711, 4351, 18, 3536, 10982, 22703, 273, 9063, 1750, 18, 6911, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2236, 67, 4861, 12, 2293, 4672, 3536, 27020, 19611, 358, 326, 5505, 7914, 1363, 16, 8353, 603, 326, 5107, 618, 326, 729, 711, 4351, 18, 3536, 10982, 22703, 273, 9063, 1750, 18, 6911, 18,...
self.unique_sub_elements = set(chain(*[extract_sub_elements(sub) for sub in self.unique_elements]))
self.unique_sub_elements = set(chain(*[extract_unique_sub_elements(sub) for sub in self.unique_elements]))
def __init__(self, form, name="a", object_names={}): "Create form data for given form"
66878d96804095a2829ab7955fcfd1237a10b033 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/624/66878d96804095a2829ab7955fcfd1237a10b033/formdata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 646, 16, 508, 1546, 69, 3113, 733, 67, 1973, 12938, 4672, 315, 1684, 646, 501, 364, 864, 646, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 646, 16, 508, 1546, 69, 3113, 733, 67, 1973, 12938, 4672, 315, 1684, 646, 501, 364, 864, 646, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divsig = p.system.methodSignature('div') self.assertEqual(divsig, 'signatures not supported')
try: p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divsig = p.system.methodSignature('div') self.assertEqual(divsig, 'signatures not supported') except xmlrpclib.ProtocolError, e: self.fail("%s\n%s" % (e, e.headers))
def test_introspection3(self): # the SimpleXMLRPCServer doesn't support signatures, but # at least check that we can try p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) divsig = p.system.methodSignature('div') self.assertEqual(divsig, 'signatures not supported')
c65a5f1b14ff6bd995d7cb102e5b4577ce0f16e2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/c65a5f1b14ff6bd995d7cb102e5b4577ce0f16e2/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 474, 26362, 23, 12, 2890, 4672, 468, 326, 4477, 4201, 8087, 2081, 3302, 1404, 2865, 14862, 16, 1496, 468, 622, 4520, 866, 716, 732, 848, 775, 293, 273, 2025, 13832, 830, 495, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 474, 26362, 23, 12, 2890, 4672, 468, 326, 4477, 4201, 8087, 2081, 3302, 1404, 2865, 14862, 16, 1496, 468, 622, 4520, 866, 716, 732, 848, 775, 293, 273, 2025, 13832, 830, 495, ...
approvedStatus.statuscodeid) pkgListing.collection = develCollection
self.approvedStatus.statuscodeid) pkgListing.collection = self.develCollection
def add_package(self, package, owner, summary): '''Add a new package to the database. ''' # Check that the tg.identity is allowed to set an owner if not identity.in_any_group('cvsadmin'): return dict(status=False, message='User must be in cvsadmin')
48b4c95df35399b9205c63bf94720f75862df541 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/48b4c95df35399b9205c63bf94720f75862df541/dispatcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5610, 12, 2890, 16, 2181, 16, 3410, 16, 4916, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 392, 3410,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 5610, 12, 2890, 16, 2181, 16, 3410, 16, 4916, 4672, 9163, 986, 279, 394, 2181, 358, 326, 2063, 18, 9163, 468, 2073, 716, 326, 18289, 18, 10781, 353, 2935, 358, 444, 392, 3410,...
if self._inotifyon and not ignored:
if self._inotifyon and not ignored and not self._dirty:
def status(self, match, ignored, clean, unknown=True): files = match.files() if '.' in files: files = [] if self._inotifyon and not ignored: cli = client(ui, repo) try: result = cli.statusquery(files, match, False, clean, unknown) except QueryFailed, instr: ui.debug(str(instr)) # don't retry within the same hg instance inotifydirstate._inotifyon = False pass else: if ui.config('inotify', 'debug'): r2 = super(inotifydirstate, self).status( match, False, clean, unknown) for c,a,b in zip('LMARDUIC', result, r2): for f in a: if f not in b: ui.warn('*** inotify: %s +%s\n' % (c, f)) for f in b: if f not in a: ui.warn('*** inotify: %s -%s\n' % (c, f)) result = r2 return result return super(inotifydirstate, self).status( match, ignored, clean, unknown)
72d520a8ec5afbada729b7782e449ae14433dbf1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/72d520a8ec5afbada729b7782e449ae14433dbf1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 2890, 16, 845, 16, 5455, 16, 2721, 16, 5917, 33, 5510, 4672, 1390, 273, 845, 18, 2354, 1435, 309, 2611, 316, 1390, 30, 1390, 273, 5378, 309, 365, 6315, 267, 352, 1164, 265, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 2890, 16, 845, 16, 5455, 16, 2721, 16, 5917, 33, 5510, 4672, 1390, 273, 845, 18, 2354, 1435, 309, 2611, 316, 1390, 30, 1390, 273, 5378, 309, 365, 6315, 267, 352, 1164, 265, ...
cursor.execute("DELETE FROM session_attribute " "WHERE name <> 'password'") cursor.execute("DELETE FROM session")
cursor.execute(""" DELETE FROM session_attribute WHERE name <> 'password' """) cursor.execute(""" DELETE FROM session """)
def delete_session(db): cursor = db.cursor() if sid.lower() == 'anonymous': cursor.execute("DELETE FROM session_attribute " "WHERE authenticated = 0") cursor.execute("DELETE FROM session " "WHERE authenticated = 0") elif sid == '*': cursor.execute("DELETE FROM session_attribute " "WHERE name <> 'password'") cursor.execute("DELETE FROM session") else: cursor.execute("DELETE FROM session_attribute " "WHERE sid = %s", (sid,)) cursor.execute("DELETE FROM session WHERE sid = %s", (sid,))
4dbba84b306edf6862d2638abdd4283f65299711 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/4dbba84b306edf6862d2638abdd4283f65299711/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3184, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 309, 7348, 18, 8167, 1435, 422, 296, 19070, 4278, 3347, 18, 8837, 2932, 6460, 4571, 1339, 67, 4589, 315, 315, 12299, 9370...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3184, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 309, 7348, 18, 8167, 1435, 422, 296, 19070, 4278, 3347, 18, 8837, 2932, 6460, 4571, 1339, 67, 4589, 315, 315, 12299, 9370...
trees = parse_tree(sys.stdin.read())
trees = parse_tree(sys.stdin.read(), AugmentedPennParser)
def base_pprint(node, level=0, sep=' ', newline='\n', reduced_leaves=False): out = [] if level == 0: out.append('(') else: out.append( sep * level ) if node.is_leaf(): if reduced_leaves: out.append(node_repr(node)) else: out.append("(%s)" % node_repr(node)) else: # special case for nodes with all-leaf children if node.count() <= LeafCompressThreshold and all(kid.is_leaf() for kid in node): out.append( "(%s %s)" % (node_repr(node), ' '.join([base_pprint(child, 0, sep, '', reduced_leaves=True) for child in node])) ) else: out.append( "(%s%s" % (node_repr(node), newline) ) out += intersperse([pprint(child, level+1, sep, newline) for child in node], newline) out.append( ")" )
2acc370fb2320ea1a990dbf017ec224f1cbbd346 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8383/2acc370fb2320ea1a990dbf017ec224f1cbbd346/pprint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 84, 1188, 12, 2159, 16, 1801, 33, 20, 16, 5478, 2218, 282, 2265, 9472, 2218, 64, 82, 2187, 13162, 67, 298, 6606, 33, 8381, 4672, 596, 273, 5378, 309, 1801, 422, 374, 30, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 84, 1188, 12, 2159, 16, 1801, 33, 20, 16, 5478, 2218, 282, 2265, 9472, 2218, 64, 82, 2187, 13162, 67, 298, 6606, 33, 8381, 4672, 596, 273, 5378, 309, 1801, 422, 374, 30, 59...
(True, None)
True
def _normal_label(g, comb_emb, external_face): """ Helper function to schnyder method for computing coordinates in the plane to plot a planar graph with no edge crossings. Constructs a normal labelling of a triangular graph g, given the planar combinatorial embedding of g and a designated external face. Returns labels dictionary. The normal label is constructed by first contracting the graph down to its external face, then expanding the graph back to the original while simultaneously adding angle labels. INPUT: g -- the graph to find the normal labeling of (g must be triangulated) comb_emb -- a planar combinatorial embedding of g external_face -- the list of three edges in the external face of g RETURNS: x -- tuple with entries x[0] = dict of dicts of normal labeling for each vertex of g and each adjacent neighbors u,v (u < v) of vertex: { vertex : { (u,v): angel_label } } x[1] = (v1,v2,v3) tuple of the three vertices of the external face. EXAMPLES: sage: from sage.graphs.schnyder import _triangulate, _normal_label, _realizer sage: g = graphs.CycleGraph(7) sage: g.is_planar(set_embedding=True) (True, None) sage: faces = g.trace_faces(g._embedding) sage: _triangulate(g, g._embedding) [(2, 0), (4, 2), (6, 4), (5, 0), (3, 5), (1, 3), (4, 0), (3, 0)] sage: tn = _normal_label(g, g._embedding, faces[0]) sage: _realizer(g, tn) ({0: [<sage.graphs.schnyder.TreeNode instance at ...>]}, (0, 1, 2)) """ contracted = [] contractible = [] labels = {} external_vertices = [external_face[0][0], external_face[1][0], external_face[2][0]] external_vertices.sort() v1,v2,v3 = external_vertices v1_neighbors = Set(g.neighbors(v1)) neighbor_count = {} for v in g.vertices(): neighbor_count[v] = 0 for v in g.neighbors(v1): neighbor_count[v] = len(v1_neighbors.intersection( Set(g.neighbors(v)))) for v in v1_neighbors: if v in [v1,v2,v3]: continue if neighbor_count[v] == 2: contractible.append(v) # contraction phase: while g.order() > 3: try: v = contractible.pop() except: raise Exception('Contractible list is empty but graph still has %d vertices. (Expected 3.)'%g.order()) break # going to contract v v_neighbors = Set(g.neighbors(v)) contracted.append( (v, v_neighbors, v_neighbors - v1_neighbors - Set([v1])) ) g.delete_vertex(v) v1_neighbors -= Set([v]) for w in v_neighbors - v1_neighbors - Set([v1]): # adding edge (v1, w) g.add_edge( (v1, w) ) if g.order() == 3: break v1_neighbors += v_neighbors - Set([v1]) contractible = [] for w in g.neighbors(v1): if(len(v1_neighbors.intersection( Set(g.neighbors(w))))) == 2 and w not in [v1, v2, v3]: contractible.append(w) # expansion phase: v1, v2, v3 = g.vertices() #always in sorted order labels[v1] = {(v2,v3):1} labels[v2] = {(v1,v3):2} labels[v3] = {(v1,v2):3} while len(contracted) > 0: v, new_neighbors, neighbors_to_delete = contracted.pop() # going to add back vertex v labels[v] = {} for w in neighbors_to_delete: g.delete_edge((v1,w)) if len(neighbors_to_delete) == 0: # we are adding v into the face new_neighbors w1, w2, w3 = sorted(new_neighbors) labels[v] = {(w1, w2): labels[w3].pop((w1,w2)), (w2,w3) : labels[w1].pop((w2,w3)), (w1,w3) : labels[w2].pop((w1,w3))} labels[w1][tuple(sorted((w2,v)))] = labels[v][(w2,w3)] labels[w1][tuple(sorted((w3,v)))] = labels[v][(w2,w3)] labels[w2][tuple(sorted((w1,v)))] = labels[v][(w1,w3)] labels[w2][tuple(sorted((w3,v)))] = labels[v][(w1,w3)] labels[w3][tuple(sorted((w1,v)))] = labels[v][(w1,w2)] labels[w3][tuple(sorted((w2,v)))] = labels[v][(w1,w2)] else: new_neighbors_set = Set(new_neighbors) angles_out_of_v1 = set() vertices_in_order = [] l = [] for angle in labels[v1].keys(): if len(Set(angle).intersection(new_neighbors_set)) == 2: angles_out_of_v1.add(angle) l = l + list(angle) # find a unique element in l l.sort() i = 0 while i < len(l): if l[i] == l[i+1]: i = i + 2 else: break angle_set = Set(angles_out_of_v1) vertices_in_order.append(l[i]) while len(angles_out_of_v1) > 0: for angle in angles_out_of_v1: if vertices_in_order[-1] in angle: break if angle[0] == vertices_in_order[-1]: vertices_in_order.append(angle[1]) else: vertices_in_order.append(angle[0]) angles_out_of_v1.remove(angle) w = vertices_in_order # is w[0] a 2 or a 3? top_label = labels[w[0]][tuple(sorted((v1, w[1])))] if top_label == 3: bottom_label = 2 else: bottom_label = 3 i = 0 while i < len(w) - 1: labels[v][ tuple(sorted((w[i],w[i+1]))) ] = 1 labels[w[i]][ tuple(sorted( (w[i+1], v) )) ] = top_label labels[w[i+1]][ tuple(sorted( (w[i], v) )) ] = bottom_label i = i + 1 labels[v][tuple(sorted( (v1, w[0])))] = bottom_label labels[v][tuple(sorted( (v1, w[-1])))] = top_label labels[w[0]][tuple(sorted((v1,v)))] = top_label labels[w[-1]][tuple(sorted((v1,v)))] = bottom_label labels[v1][tuple(sorted( (w[0],v) ))] = 1 labels[v1][tuple(sorted( (w[-1],v) ))] = 1 #delete all the extra labels for angle in angle_set: labels[v1].pop( angle ) labels[w[0]].pop( tuple (sorted( (v1, w[1]) ) )) labels[w[-1]].pop( tuple (sorted( (v1, w[-2]) ) )) i = 1 while i < len(w) - 1: labels[w[i]].pop(tuple(sorted( (v1, w[i+1])))) labels[w[i]].pop(tuple(sorted( (v1, w[i-1])))) i = i + 1 for w in new_neighbors: g.add_edge((v,w)) return labels, (v1,v2,v3)
1a30b7778ea85d2e35e4beb95663dd42b7f846c5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/1a30b7778ea85d2e35e4beb95663dd42b7f846c5/schnyder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6130, 67, 1925, 12, 75, 16, 3894, 67, 351, 70, 16, 3903, 67, 865, 4672, 3536, 9705, 445, 358, 18551, 18538, 765, 707, 364, 20303, 5513, 316, 326, 11017, 358, 3207, 279, 4995, 297,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6130, 67, 1925, 12, 75, 16, 3894, 67, 351, 70, 16, 3903, 67, 865, 4672, 3536, 9705, 445, 358, 18551, 18538, 765, 707, 364, 20303, 5513, 316, 326, 11017, 358, 3207, 279, 4995, 297,...
if stat.S_ISLNK(st.st_mode) and hasattr(os, 'readlink'): basename = basename + " -> " + os.readlink(file)
if stat.S_ISLNK(st.st_mode) and hasattr(self, 'readlink'): basename = basename + " -> " + self.readlink(file)
def format_list(self, basedir, listing, ignore_err=True): """Return an iterator object that yields the entries of given directory emulating the "/bin/ls -lA" UNIX command output.
69192fe9d370a824d1f11ee41f483772182f5448 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7236/69192fe9d370a824d1f11ee41f483772182f5448/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1098, 12, 2890, 16, 15573, 16, 11591, 16, 2305, 67, 370, 33, 5510, 4672, 3536, 990, 392, 2775, 733, 716, 16932, 326, 3222, 434, 864, 1867, 801, 27967, 326, 2206, 4757, 19, 325...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1098, 12, 2890, 16, 15573, 16, 11591, 16, 2305, 67, 370, 33, 5510, 4672, 3536, 990, 392, 2775, 733, 716, 16932, 326, 3222, 434, 864, 1867, 801, 27967, 326, 2206, 4757, 19, 325...
self.addresses[client.get('address')] = client.get('name')
caddr = client.get('address') if self.addresses.has_key(caddr): self.addresses[caddr].append(client.get('name')) else: self.addresses[caddr] = [client.get('name')]
def HandleEvent(self, event): '''Handle update events for data files''' filename = event.filename.split('/')[-1] if filename in ['groups.xml', 'clients.xml']: dest = filename elif filename in reduce(lambda x,y:x+y, self.extra.values()): if event.code2str() == 'exists': return dest = [key for key, value in self.extra.iteritems() if filename in value][0] else: return if event.code2str() == 'endExist': return try: xdata = lxml.etree.parse("%s/%s" % (self.data, dest)) except lxml.etree.XMLSyntaxError: self.logger.error('Failed to parse %s' % (dest)) return included = [ent.get('href') for ent in \ xdata.findall('./{http://www.w3.org/2001/XInclude}include')] if included: for name in included: if name not in self.extra[dest]: self.core.fam.AddMonitor("%s/%s" % (self.data, name), self) self.extra[dest].append(name) try: xdata.xinclude() except lxml.etree.XIncludeError: self.logger.error("Failed to process XInclude for file %s" % dest)
347fb9e983255e89f1fa04090e4141bfdfe72e9e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11867/347fb9e983255e89f1fa04090e4141bfdfe72e9e/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 1133, 12, 2890, 16, 871, 4672, 9163, 3259, 1089, 2641, 364, 501, 1390, 26418, 1544, 273, 871, 18, 3459, 18, 4939, 2668, 2473, 13, 18919, 21, 65, 309, 1544, 316, 10228, 4650, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 1133, 12, 2890, 16, 871, 4672, 9163, 3259, 1089, 2641, 364, 501, 1390, 26418, 1544, 273, 871, 18, 3459, 18, 4939, 2668, 2473, 13, 18919, 21, 65, 309, 1544, 316, 10228, 4650, 18, ...
.heading { margin-top: 0ex; margin-bottom: 1ex;
.heading { margin-top: 0ex; margin-bottom: 1ex;
def flush(self): self.fp.flush()
1735f53d62c5bce47fbf6a82cfb8512a062bf3f7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2355/1735f53d62c5bce47fbf6a82cfb8512a062bf3f7/HTMLTestRunner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 365, 18, 7944, 18, 11330, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 365, 18, 7944, 18, 11330, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.run_build(gyp_file) def build_target(self, gyp_file, target):
self.run_build(gyp_file, **kw) def build_target(self, gyp_file, target, **kw):
def build_default(self, gyp_file): """ Runs scons with no additional command-line arguments to get the default build for the SCons configuration generated from the specified gyp_file. """ self.run_build(gyp_file)
78c46126ef5794f557a8eff8c82e1227fbf0f84c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/78c46126ef5794f557a8eff8c82e1227fbf0f84c/TestGyp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 1886, 12, 2890, 16, 314, 879, 67, 768, 4672, 3536, 1939, 87, 272, 8559, 598, 1158, 3312, 1296, 17, 1369, 1775, 358, 336, 326, 805, 1361, 364, 326, 20487, 1664, 4374, 628, 326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 1886, 12, 2890, 16, 314, 879, 67, 768, 4672, 3536, 1939, 87, 272, 8559, 598, 1158, 3312, 1296, 17, 1369, 1775, 358, 336, 326, 805, 1361, 364, 326, 20487, 1664, 4374, 628, 326...
ok = zetazero(8637740722918, verbose=True).ae(complex(0.5,2124447368584.39298170604))
ok = zetazero(8637740722918).ae(complex(0.5,2124447368584.39298170604))
def test_zetazero(): cases = [\ (399999999, 156762524.6750591511), (241389216, 97490234.2276711795), (526196239, 202950727.691229534), (542964976, 209039046.578535272), (1048449112, 388858885.231056486), (1048449113, 388858885.384337406), (1048449114, 388858886.002285122), (1048449115, 388858886.00239369), (1048449116, 388858886.690745053) ] for n, v in cases: print n, v, t1 = clock() ok = zetazero(n).ae(complex(0.5,v)) t2 = clock() print "ok =", ok, ("(time = %s)" % round(t2-t1,3)) print "Now computing two huge zeros (this may take hours)" print "Computing zetazero(8637740722917)" ok = zetazero(8637740722917, verbose=True).ae(complex(0.5,2124447368584.39296466152)) print "ok =", ok ok = zetazero(8637740722918, verbose=True).ae(complex(0.5,2124447368584.39298170604)) print "ok =", ok
f003b8b25e3c8798c870898e2ac56d7b95fafac4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11851/f003b8b25e3c8798c870898e2ac56d7b95fafac4/extratest_zeta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 94, 1066, 7124, 13332, 6088, 273, 23781, 261, 23, 7991, 7991, 16, 404, 4313, 6669, 2947, 3247, 18, 9599, 3361, 6162, 3600, 2499, 3631, 261, 3247, 3437, 6675, 22, 2313, 16, 2468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 94, 1066, 7124, 13332, 6088, 273, 23781, 261, 23, 7991, 7991, 16, 404, 4313, 6669, 2947, 3247, 18, 9599, 3361, 6162, 3600, 2499, 3631, 261, 3247, 3437, 6675, 22, 2313, 16, 2468...
ValueError: j values must be integer or half integer and fulfil the triangle relation
ValueError: j values must be integer or half integer and fulfill the triangle relation
def wigner_9j(j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9, prec=None): r""" Calculate the Wigner 9j symbol `Wigner9j(j_1,j_2,j_3,j_4,j_5,j_6,j_7,j_8,j_9)`. INPUT: - ``j_1``, ..., ``j_9`` - integer or half integer - ``prec`` - precision, default: None. Providing a precision can drastically speed up the calculation. OUTPUT: rational number times the square root of a rational number (if prec=None), or real number if a precision is given EXAMPLES: A couple of examples and test cases, note that for speed reasons a precision is given:: sage: wigner_9j(1,1,1, 1,1,1, 1,1,0 ,prec=64) # ==1/18 0.0555555555555555555 sage: wigner_9j(1,1,1, 1,1,1, 1,1,1) 0 sage: wigner_9j(1,1,1, 1,1,1, 1,1,2 ,prec=64) # ==1/18 0.0555555555555555556 sage: wigner_9j(1,2,1, 2,2,2, 1,2,1 ,prec=64) # ==-1/150 -0.00666666666666666667 sage: wigner_9j(3,3,2, 2,2,2, 3,3,2 ,prec=64) # ==157/14700 0.0106802721088435374 sage: wigner_9j(3,3,2, 3,3,2, 3,3,2 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.00944247746651111739 sage: wigner_9j(3,3,1, 3.5,3.5,2, 3.5,3.5,1 ,prec=64) # ==3221*sqrt(70)/(246960*sqrt(105)) - 365/(3528*sqrt(70)*sqrt(105)) 0.0110216678544351364 sage: wigner_9j(100,80,50, 50,100,70, 60,50,100 ,prec=1000)*1.0 1.05597798065761e-7 sage: wigner_9j(30,30,10, 30.5,30.5,20, 30.5,30.5,10 ,prec=1000)*1.0 # ==(80944680186359968990/95103769817469)*sqrt(1/682288158959699477295) 0.0000325841699408828 sage: wigner_9j(64,62.5,114.5, 61.5,61,112.5, 113.5,110.5,60, prec=1000)*1.0 -3.41407910055520e-39 sage: wigner_9j(15,15,15, 15,3,15, 15,18,10, prec=1000)*1.0 -0.0000778324615309539 sage: wigner_9j(1.5,1,1.5, 1,1,1, 1.5,1,1.5) 0 It is an error to have arguments that are not integer or half integer values or do not fulfil the triangle relation:: sage: wigner_9j(0.5,0.5,0.5, 0.5,0.5,0.5, 0.5,0.5,0.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation sage: wigner_9j(1,1,1, 0.5,1,1.5, 0.5,1,2.5,prec=64) Traceback (most recent call last): ... ValueError: j values must be integer or half integer and fulfil the triangle relation ALGORITHM: This function uses the algorithm of [Edmonds74] to calculate the value of the 3j symbol exactly. Note that the formula contains alternating sums over large factorials and is therefore unsuitable for finite precision arithmetic and only useful for a computer algebra system [Rasch03]. REFERENCES: - [Edmonds74] 'Angular Momentum in Quantum Mechanics', A. R. Edmonds, Princeton University Press (1974) - [Rasch03] 'Efficient Storage Scheme for Pre-calculated Wigner 3j, 6j and Gaunt Coefficients', J. Rasch and A. C. H. Yu, SIAM J. Sci. Comput. Volume 25, Issue 4, pp. 1416-1428 (2003) """ imin = 0 imax = min(j_1 + j_9, j_2 + j_6, j_4 + j_8) sumres = 0 for kk in range(imin, imax + 1): sumres = sumres + (2 * kk + 1) * \ racah(j_1, j_2, j_9, j_6, j_3, kk, prec) * \ racah(j_4, j_6, j_8, j_2, j_5, kk, prec) * \ racah(j_1, j_4, j_9, j_8, j_7, kk, prec) return sumres
2aae1a34350173041dcaa920c230128b23fb8288 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2aae1a34350173041dcaa920c230128b23fb8288/wigner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 29, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 525, 67, 24, 16, 525, 67, 25, 16, 525, 67, 26, 16, 525, 67, 27, 16, 525, 67, 28, 16, 525, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 724, 264, 67, 29, 78, 12, 78, 67, 21, 16, 525, 67, 22, 16, 525, 67, 23, 16, 525, 67, 24, 16, 525, 67, 25, 16, 525, 67, 26, 16, 525, 67, 27, 16, 525, 67, 28, 16, 525, 6...
os_info = os.uname() os_version = int(os_info[2].split('.')[0]) python_version = sys.version[0:3] if os_version == 10 and python_version == "2.6": eventloop.join()
eventloop.join()
def endLoop(loop): del loop.pool
f762d45a064a2b0450bac906d84c4ab06d783846 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/f762d45a064a2b0450bac906d84c4ab06d783846/Miro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 6452, 12, 6498, 4672, 1464, 2798, 18, 6011, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 6452, 12, 6498, 4672, 1464, 2798, 18, 6011, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
"""
u"""
def _getSimpleMatchFunction(self, searchStr, **options): simpleForms = self._getWildcardForms(searchStr, **options) return lambda reading: self._getReadingEntities(reading) in simpleForms
7113513f178bcd574bd86ef5fe518238142a3598 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11128/7113513f178bcd574bd86ef5fe518238142a3598/dictionary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5784, 2060, 2083, 12, 2890, 16, 1623, 1585, 16, 2826, 2116, 4672, 4143, 18529, 273, 365, 6315, 588, 12121, 18529, 12, 3072, 1585, 16, 2826, 2116, 13, 327, 3195, 6453, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 5784, 2060, 2083, 12, 2890, 16, 1623, 1585, 16, 2826, 2116, 4672, 4143, 18529, 273, 365, 6315, 588, 12121, 18529, 12, 3072, 1585, 16, 2826, 2116, 13, 327, 3195, 6453, 30, 365, ...
commiting. Bookmarks are local. They can be renamed, copied and
committing. Bookmarks are local. They can be renamed, copied and
def bookmark(ui, repo, mark=None, rev=None, force=False, delete=False, rename=None): '''Mercurial bookmarks Bookmarks are pointers to certain commits that move when commiting. Bookmarks are local. They can be renamed, copied and deleted. It is possible to use bookmark names in 'hg merge' and 'hg update' to merge and update respectively to a given bookmark. You can use 'hg bookmark NAME' to set a bookmark on the working directory's parent revision with the given name. If you specify a revision using -r REV (where REV may be an existing bookmark), the bookmark is assigned to that revision. ''' hexfn = ui.debugflag and hex or short marks = parse(repo) cur = repo.changectx('.').node() if rename: if rename not in marks: raise util.Abort(_("a bookmark of this name does not exist")) if mark in marks and not force: raise util.Abort(_("a bookmark of the same name already exists")) if mark is None: raise util.Abort(_("new bookmark name required")) marks[mark] = marks[rename] del marks[rename] if current(repo) == rename: setcurrent(repo, mark) write(repo, marks) return if delete: if mark is None: raise util.Abort(_("bookmark name required")) if mark not in marks: raise util.Abort(_("a bookmark of this name does not exist")) if mark == current(repo): setcurrent(repo, None) del marks[mark] write(repo, marks) return if mark != None: if "\n" in mark: raise util.Abort(_("bookmark name cannot contain newlines")) mark = mark.strip() if mark in marks and not force: raise util.Abort(_("a bookmark of the same name already exists")) if ((mark in repo.branchtags() or mark == repo.dirstate.branch()) and not force): raise util.Abort( _("a bookmark cannot have the name of an existing branch")) if rev: marks[mark] = repo.lookup(rev) else: marks[mark] = repo.changectx('.').node() setcurrent(repo, mark) write(repo, marks) return if mark is None: if rev: raise util.Abort(_("bookmark name required")) if len(marks) == 0: ui.status("no bookmarks set\n") else: for bmark, n in marks.iteritems(): if ui.configbool('bookmarks', 'track.current'): prefix = (bmark == current(repo) and n == cur) and '*' or ' ' else: prefix = (n == cur) and '*' or ' ' ui.write(" %s %-25s %d:%s\n" % ( prefix, bmark, repo.changelog.rev(n), hexfn(n))) return
8c6d775aef1d06e81a18ca8a7e11d99eff2b46db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8c6d775aef1d06e81a18ca8a7e11d99eff2b46db/bookmarks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13696, 12, 4881, 16, 3538, 16, 2267, 33, 7036, 16, 5588, 33, 7036, 16, 2944, 33, 8381, 16, 1430, 33, 8381, 16, 6472, 33, 7036, 4672, 9163, 8478, 1397, 649, 13696, 87, 225, 20258, 17439...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13696, 12, 4881, 16, 3538, 16, 2267, 33, 7036, 16, 5588, 33, 7036, 16, 2944, 33, 8381, 16, 1430, 33, 8381, 16, 6472, 33, 7036, 4672, 9163, 8478, 1397, 649, 13696, 87, 225, 20258, 17439...
data = np.empty(self.shape, np.float)
data = np.empty(self.shape, self.dtype)
def get_leaktest_scenario(self): self.assertAlmostEqual(np.prod(self.shape)*np.nbytes[np.float], \ self.footprint, -2) #100B
7b88fdcce5521d473c8d4302f68477e9e7b946f3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/7b88fdcce5521d473c8d4302f68477e9e7b946f3/vtk_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 6782, 18, 5659, 6487, 521...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 298, 581, 3813, 67, 26405, 12, 2890, 4672, 365, 18, 11231, 1067, 10329, 5812, 12, 6782, 18, 17672, 12, 2890, 18, 4867, 17653, 6782, 18, 82, 3890, 63, 6782, 18, 5659, 6487, 521...
g = PatchGenerator( model ) r = g.randomPatches( 85, 50, max_overlap=25 )
g = PatchGeneratorFromOrbit( model, center2center ) overlap = int( round( nAtoms / 4.0 ) ) r = g.randomPatches( nAtoms, 500, max_overlap=overlap, exclude=exclude )
def test( model ): from Biskit import Pymoler g = PatchGenerator( model ) r = g.randomPatches( 85, 50, max_overlap=25 ) profile = N.sum( N.array(r) ) pm = Pymoler() pm.addPdb( model, 'o' ) ms = [ model.take( N.flatnonzero(mask) ) for mask in r ] pm.addMovie( ms ) return pm
e5244fcd6e879bc27ccfd3cf243d90f2bd6a63fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/e5244fcd6e879bc27ccfd3cf243d90f2bd6a63fb/PatchGeneratorFromOrbit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 938, 262, 30, 225, 628, 605, 291, 8691, 1930, 453, 2942, 355, 264, 225, 314, 273, 12042, 3908, 1265, 1162, 3682, 12, 938, 16, 4617, 22, 5693, 262, 225, 7227, 273, 509, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 938, 262, 30, 225, 628, 605, 291, 8691, 1930, 453, 2942, 355, 264, 225, 314, 273, 12042, 3908, 1265, 1162, 3682, 12, 938, 16, 4617, 22, 5693, 262, 225, 7227, 273, 509, 12, ...
addFilter("W: glibc shared-lib-without-dependency-information /lib/ld-2.1.3.so") addFilter("W: glibc library-not-linked-against-libc /lib/libc-2.1.3.so")
addFilter("W: glibc shared-lib-without-dependency-information /lib/ld-2.*.so") addFilter("W: glibc library-not-linked-against-libc /lib/libc-2.*.so")
def isFiltered(s): global _filters for f in _filters: if f.search(s): return 1 return 0
d369d0af862c926649609cb76f94afe82f8b3540 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3346/d369d0af862c926649609cb76f94afe82f8b3540/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 14478, 12, 87, 4672, 2552, 389, 6348, 225, 364, 284, 316, 389, 6348, 30, 309, 284, 18, 3072, 12, 87, 4672, 327, 404, 327, 374, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 14478, 12, 87, 4672, 2552, 389, 6348, 225, 364, 284, 316, 389, 6348, 30, 309, 284, 18, 3072, 12, 87, 4672, 327, 404, 327, 374, 225, 2, -100, -100, -100, -100, -100, -100, -100, ...
if action.startswith('node-iso') or action.startswith('node-usb'):
if action == 'node-iso' or action == 'node-usb':
def hexa2 (c): return chr((c>>4)+65) + chr ((c&16)+65)
c8a588799344db08a0317644ebb9ebfc6ebf9860 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7598/c8a588799344db08a0317644ebb9ebfc6ebf9860/GetBootMedium.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 69, 22, 261, 71, 4672, 327, 4513, 12443, 71, 9778, 24, 27921, 9222, 13, 397, 4513, 14015, 71, 10, 2313, 27921, 9222, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 69, 22, 261, 71, 4672, 327, 4513, 12443, 71, 9778, 24, 27921, 9222, 13, 397, 4513, 14015, 71, 10, 2313, 27921, 9222, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if to_uom.factor_data: amount = rounding(amount / to_uom.factor_data, to_uom.rounding)
if to_uom.factor >= 1.0: amount = self.round(amount / to_uom.factor, to_uom.rounding)
def _compute_qty(self, cursor, user, from_uom_id, qty, to_uom=False): """ Convert quantity for given uom's. from_uom and to_uom should be browse records. """ if not from_uom or not qty or not to_uom: return qty if from_uom.category.id <> to_uom.category.id: return qty if from_uom.factor_data: amount = qty * from_uom.factor_data else: amount = qty / from_uom.factor if to_uom: if to_uom.factor_data: amount = rounding(amount / to_uom.factor_data, to_uom.rounding) else: amount = rounding(amount * to_uom.factor, to_uom.rounding) return amount
1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9285/1c3eb8968b62e8d0dd32434c2ed5ad19c170cb2e/uom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 85, 4098, 12, 2890, 16, 3347, 16, 729, 16, 628, 67, 89, 362, 67, 350, 16, 26667, 16, 358, 67, 89, 362, 33, 8381, 4672, 3536, 4037, 10457, 364, 864, 582, 362, 1807, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 85, 4098, 12, 2890, 16, 3347, 16, 729, 16, 628, 67, 89, 362, 67, 350, 16, 26667, 16, 358, 67, 89, 362, 33, 8381, 4672, 3536, 4037, 10457, 364, 864, 582, 362, 1807, 1...
xmlrpc_tests.append(KeepaliveServerTestCase)
xmlrpc_tests.append(KeepaliveServerTestCase1) xmlrpc_tests.append(KeepaliveServerTestCase2)
def test_main(): xmlrpc_tests = [XMLRPCTestCase, HelperTestCase, DateTimeTestCase, BinaryTestCase, FaultTestCase, TransportSubclassTestCase] xmlrpc_tests.append(SimpleServerTestCase) xmlrpc_tests.append(KeepaliveServerTestCase) xmlrpc_tests.append(GzipServerTestCase) xmlrpc_tests.append(ServerProxyTestCase) xmlrpc_tests.append(FailingServerTestCase) xmlrpc_tests.append(CGIHandlerTestCase) test_support.run_unittest(*xmlrpc_tests)
22d3e135102ba92f29384533c4ed8ce7afaaf554 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/22d3e135102ba92f29384533c4ed8ce7afaaf554/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 31811, 67, 16341, 273, 306, 4201, 54, 52, 1268, 395, 2449, 16, 9705, 4709, 2449, 16, 3716, 4709, 2449, 16, 7896, 4709, 2449, 16, 25609, 4709, 2449, 16, 9514, 1676,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 31811, 67, 16341, 273, 306, 4201, 54, 52, 1268, 395, 2449, 16, 9705, 4709, 2449, 16, 3716, 4709, 2449, 16, 7896, 4709, 2449, 16, 25609, 4709, 2449, 16, 9514, 1676,...
for test_runner in all_test_runners: run_all_target.AddDependency(test_runner)
for test_target in all_tests: run_all_target.AddDependency(test_target) ttpn = test_target.GetProperty('productName') script = 'echo note: running ' + ttpn + '\n' \ 'exec "${BUILT_PRODUCTS_DIR}/' + ttpn + '"\nexit 1\n' ssbp = gyp.xcodeproj_file.PBXShellScriptBuildPhase({ 'name': 'Run "' + ttpn + '"', 'shellScript': script, 'showEnvVarsInLog': 0, }) run_all_target.AppendProperty('buildPhases', ssbp)
def Finalize2(self, xcode_targets): # Finalize2 needs to happen in a separate step because the process of # updating references to other projects depends on the ordering of targets # within remote project files. Finalize1 is responsible for sorting duty, # and once all project files are sorted, Finalize2 can come in and update # these references.
8e1f5ce7f6c632cd6d0065dd8411588c6d1580c2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/8e1f5ce7f6c632cd6d0065dd8411588c6d1580c2/xcode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 22, 12, 2890, 16, 619, 710, 67, 11358, 4672, 468, 30740, 22, 4260, 358, 5865, 316, 279, 9004, 2235, 2724, 326, 1207, 434, 468, 9702, 5351, 358, 1308, 10137, 10935, 603, 326, 9543,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30740, 22, 12, 2890, 16, 619, 710, 67, 11358, 4672, 468, 30740, 22, 4260, 358, 5865, 316, 279, 9004, 2235, 2724, 326, 1207, 434, 468, 9702, 5351, 358, 1308, 10137, 10935, 603, 326, 9543,...
self._p_changed = 1 if REQUEST: self.setSessionInfoTrans(MESSAGE_SAVEDCHANGES, date=self.utGetTodayDate()) return REQUEST.RESPONSE.redirect('%s/admin_workgroups_html?w=%s' % (self.absolute_url(), id))
self._p_changed = True if REQUEST is not None: self.setSessionInfoTrans("Workgroup added") REQUEST.RESPONSE.redirect('%s/admin_workgroups_html?w=%s' % (self.absolute_url(), id))
def admin_addworkgroup(self, title='', location='', role='', REQUEST=None): """ """ err = [] if title=='': err.append('Title is required') if location=='': err.append('Location is required') else: try: #check for a valid location ob = self.unrestrictedTraverse(location) except: err.append('Invalid location') else: #check if no group was defiend for this location if self.getWorkgroupByLocation(location): err.append('A workgroup is already defined for this location') if role=='': err.append('Role is required') if err: if REQUEST: self.setSessionErrorsTrans(err) self.setSession('title', title) self.setSession('location', location) self.setSession('role', role) return REQUEST.RESPONSE.redirect('%s/admin_addworkgroup_html' % self.absolute_url()) else: id = self.utGenRandomId(4) self.workgroups.append((id, title, location, role)) self._p_changed = 1 if REQUEST: self.setSessionInfoTrans(MESSAGE_SAVEDCHANGES, date=self.utGetTodayDate()) return REQUEST.RESPONSE.redirect('%s/admin_workgroups_html?w=%s' % (self.absolute_url(), id))
83c9a05f7bcb0c9e391837f25115cc8d647c0436 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/83c9a05f7bcb0c9e391837f25115cc8d647c0436/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 1289, 1252, 1655, 12, 2890, 16, 2077, 2218, 2187, 2117, 2218, 2187, 2478, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 393, 273, 5378, 309, 2077, 18920, 4278, 393, 18, 6923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3981, 67, 1289, 1252, 1655, 12, 2890, 16, 2077, 2218, 2187, 2117, 2218, 2187, 2478, 2218, 2187, 12492, 33, 7036, 4672, 3536, 3536, 393, 273, 5378, 309, 2077, 18920, 4278, 393, 18, 6923, ...
LOG('Zope', WARNING, 'non-basic authentication attempted')
def validate(self,request,auth='',roles=None):
b524eb8d385b3d37d4c9cdb4f50ab88b14c32c5d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b524eb8d385b3d37d4c9cdb4f50ab88b14c32c5d/User.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 2293, 16, 1944, 2218, 2187, 7774, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 12, 2890, 16, 2293, 16, 1944, 2218, 2187, 7774, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
thisdest = dest if dest[-1:] == '/': thisdest = dest + os.path.basename(sources) elif len(sourcelist) > 1:
if dest[-1:] != '/' and len(sourcelist) > 1:
def doInstall(self, macros):
7688a8f067ec99b974392fd6647d1ec38b64ac93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/7688a8f067ec99b974392fd6647d1ec38b64ac93/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 6410, 12, 2890, 16, 24302, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 6410, 12, 2890, 16, 24302, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return self.domain().submodule(V, check=False)
return self.domain().submodule(V.basis(), check=False)
def kernel(self): V = self.matrix().kernel() D = self.domain() if not D.is_ambient(): # Transform V to ambient space # This is a matrix multiply: we take the linear combinations of the basis for # D given by the elements of the basis for V. B = V.basis_matrix() * D.basis_matrix() V = B.row_space() return self.domain().submodule(V, check=False)
951a5e884fedc07752322f55b3ba94690f3ef9d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/951a5e884fedc07752322f55b3ba94690f3ef9d8/matrix_morphism.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5536, 12, 2890, 4672, 776, 273, 365, 18, 5667, 7675, 8111, 1435, 463, 273, 365, 18, 4308, 1435, 309, 486, 463, 18, 291, 67, 2536, 1979, 13332, 468, 11514, 776, 358, 13232, 1979, 3476, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5536, 12, 2890, 4672, 776, 273, 365, 18, 5667, 7675, 8111, 1435, 463, 273, 365, 18, 4308, 1435, 309, 486, 463, 18, 291, 67, 2536, 1979, 13332, 468, 11514, 776, 358, 13232, 1979, 3476, ...
sys.stdout.write(unicode(items))
sys.stdout.write(eTree.tostring(items, encoding='UTF-8', method="xml", xml_declaration=True, pretty_print=True, ))
def queryXML(self, url): """Display a Movie query in XML format: http://www.mythtv.org/wiki/MythTV_Universal_Metadata_Format Returns nothing """ try: queryResult = eTree.parse(url, parser=self.xmlParser) except Exception, errmsg: sys.stderr.write(u"! Error: Invalid XML was received from themoviedb.org (%s)\n" % errmsg) sys.exit(1)
cb6bba18a7106aa81199dde96a79dd6d933f31c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/cb6bba18a7106aa81199dde96a79dd6d933f31c7/tmdb_api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 4201, 12, 2890, 16, 880, 4672, 3536, 4236, 279, 26963, 843, 316, 3167, 740, 30, 1062, 2207, 5591, 18, 4811, 451, 24161, 18, 3341, 19, 13044, 19, 12062, 451, 15579, 67, 984, 14651, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 4201, 12, 2890, 16, 880, 4672, 3536, 4236, 279, 26963, 843, 316, 3167, 740, 30, 1062, 2207, 5591, 18, 4811, 451, 24161, 18, 3341, 19, 13044, 19, 12062, 451, 15579, 67, 984, 14651, ...
self.parse_footer()
for line in self.handle : if line[:2]=="//" : break self.line = line.rstrip()
def parse_cds_features(self, handle, alphabet=generic_protein, tags2id=('protein_id','locus_tag','product')) : """Returns SeqRecord object iterator
adfd7d9a08ae08a098600738520d6029dfde68c5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/adfd7d9a08ae08a098600738520d6029dfde68c5/Scanner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 71, 2377, 67, 7139, 12, 2890, 16, 1640, 16, 10877, 33, 13540, 67, 24807, 16, 2342, 22, 350, 33, 2668, 24807, 67, 350, 17023, 1829, 407, 67, 2692, 17023, 5896, 26112, 294, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 71, 2377, 67, 7139, 12, 2890, 16, 1640, 16, 10877, 33, 13540, 67, 24807, 16, 2342, 22, 350, 33, 2668, 24807, 67, 350, 17023, 1829, 407, 67, 2692, 17023, 5896, 26112, 294, 353...
def mergefiles(outfile,myroot,mystart):
def mergefiles(outfile,mystart):
def mergefiles(outfile,myroot,mystart): mycurpath=os.getcwd() myfiles=os.listdir(mycurpath) for x in myfiles: floc=pathstrip(os.path.normpath(mycurpath+"/"+x),myroot,mystart) if os.path.islink(x): myto=os.readlink(x) if os.path.exists(floc[0]): if os.path.isdir(floc[0]): print "!!!",floc[0],"->",myto else: os.unlink(floc[0]) try: os.symlink(myto,floc[0]) print "<<<",floc[0],"->",myto outfile.write("sym "+floc[1]+" -> "+myto+" "+getmtime(floc[0])+"\n") except: print "!!!",floc[0],"->",myto elif os.path.isdir(x): mystat=os.stat(x) if not os.path.exists(floc[0]): os.mkdir(floc[0]) os.chmod(floc[0],mystat[0]) os.chown(floc[0],mystat[4],mystat[5]) print "<<<",floc[0]+"/" else: print "---",floc[0]+"/" #mtime doesn't mean much for directories -- we don't store it outfile.write("dir "+floc[1]+"\n") mywd=os.getcwd() os.chdir(x) mergefiles(outfile,myroot,mystart) os.chdir(mywd) elif os.path.isfile(x): mymd5=md5(mycurpath+"/"+x) if movefile(x,pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): zing="<<<" else: zing="!!!" print zing+" "+floc[0] print "md5",mymd5 outfile.write("obj "+floc[1]+" "+mymd5+" "+getmtime(floc[0])+"\n") elif isfifo(x): zing="!!!" if not os.path.exists(pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): if movefile(x,pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): zing="<<<" elif isfifo(pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): os.unlink(pathstrip(mycurpath,myroot,mystart)[0]+"/"+x) if movefile(x,pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): zing="<<<" print zing+" "+floc[0] outfile.write("fif "+floc[1]+"\n") else: if movefile(x,pathstrip(mycurpath,myroot,mystart)[0]+"/"+x): zing="<<<" else: zing="!!!" print zing+" "+floc[0] outfile.write("dev "+floc[1]+"\n")
37ec033936cd148abafc52a24966a719023ae65c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/37ec033936cd148abafc52a24966a719023ae65c/portage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 2354, 12, 26050, 16, 81, 1094, 485, 4672, 3399, 1397, 803, 33, 538, 18, 588, 11089, 1435, 3399, 2354, 33, 538, 18, 1098, 1214, 12, 4811, 1397, 803, 13, 364, 619, 316, 3399, 2354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 2354, 12, 26050, 16, 81, 1094, 485, 4672, 3399, 1397, 803, 33, 538, 18, 588, 11089, 1435, 3399, 2354, 33, 538, 18, 1098, 1214, 12, 4811, 1397, 803, 13, 364, 619, 316, 3399, 2354,...
self.authenticator=md5.new(header[0:4] + 16 * "\x00" + attr
self.authenticator=md5_constructor(header[0:4] + 16 * "\x00" + attr
def RequestPacket(self): """Create a ready-to-transmit authentication request packet
9c034ee55a7e6e126bafe0cf166ca5cba67a6d1e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12799/9c034ee55a7e6e126bafe0cf166ca5cba67a6d1e/packet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1567, 6667, 12, 2890, 4672, 3536, 1684, 279, 5695, 17, 869, 17, 2338, 1938, 5107, 590, 4414, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1567, 6667, 12, 2890, 4672, 3536, 1684, 279, 5695, 17, 869, 17, 2338, 1938, 5107, 590, 4414, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
sa.not_(db.machines.name.like('talos-r3%')),
sa.or_(db.machines.name.like('talos-r3%'), db.machines.name.like('talos-rev2-tiger%')),
def getTestSeries(branches, start_date, test_names): # Find all the Branch/OS/Test combinations if len(test_names) > 0: test_clause = db.tests.pretty_name.in_(test_names) else: test_clause = True q = sa.select( [db.branches.id, db.branches.name, db.os_list.id, db.os_list.name, db.tests.id, db.tests.pretty_name], sa.and_( db.test_runs.machine_id == db.machines.id, db.builds.id == db.test_runs.build_id, db.os_list.id == db.machines.os_id, db.tests.id == db.test_runs.test_id, db.test_runs.date_run > start_date, db.branches.name.in_(branches), sa.not_(db.machines.name.like('talos-r3%')), sa.not_(db.machines.name.like('%stage%')), sa.not_(db.tests.pretty_name.like("%NoChrome%")), sa.not_(db.tests.pretty_name.like("%Fast Cycle%")), test_clause )) q = q.distinct() retval = [] for row in q.execute(): retval.append(TestSeries(*row)) return retval
75b9de51d5fa9d5483b2de85334fe9fb3603c260 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9644/75b9de51d5fa9d5483b2de85334fe9fb3603c260/analyze_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29384, 6485, 12, 18078, 16, 787, 67, 712, 16, 1842, 67, 1973, 4672, 468, 4163, 777, 326, 15449, 19, 4618, 19, 4709, 17265, 309, 562, 12, 3813, 67, 1973, 13, 405, 374, 30, 1842, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29384, 6485, 12, 18078, 16, 787, 67, 712, 16, 1842, 67, 1973, 4672, 468, 4163, 777, 326, 15449, 19, 4618, 19, 4709, 17265, 309, 562, 12, 3813, 67, 1973, 13, 405, 374, 30, 1842, 67, 1...
str += ' </BR>\n <I>'+('&nbsp;'*10)+\ '(type=' + \ epytext.to_html(param.type()) +\ ')</I>' str += '</DD>\n' str += ' </DT></DL>\n'
str += ' <br>\n <i>'+('&nbsp;'*10) str += '(type=' + epytext.to_html(param.type()) str += ')</i>' str += '</dd>\n' str += ' </dl>\n'
def _func_details(self, functions, cls, heading='Function Details'): """## Return a detailed description of the functions in a class or module.""" functions = self._sort(functions) if len(functions) == 0: return '' str = self._table_header(heading, 'details')+'</TABLE>'
89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/89bd16eaf8c7e556babe42c6a92621dbc9b8a7e9/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 644, 67, 6395, 12, 2890, 16, 4186, 16, 2028, 16, 11053, 2218, 2083, 21897, 11, 4672, 3536, 1189, 2000, 279, 6864, 2477, 434, 326, 4186, 316, 279, 667, 578, 1605, 12123, 4186, 273, ...
self.openobject_injector.connector.close(self.connector)
self.openobject_injector.connector.close(self.conn)
def process(self):
315ae69e2530da90789d00268c348bd79d41bbc0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/315ae69e2530da90789d00268c348bd79d41bbc0/data_exist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
formatstr = (expectedToWork and " %s->%s %s\n") or " {%s->%s} %s\n"
formatstr = (expect_success and " %s->%s %s\n") or " {%s->%s} %s\n"
def tryProtocolCombo (server_protocol, client_protocol, expectedToWork, certsreqs=None):
0dd64f6a0e5850fce167a308c0d887027fbc21ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/0dd64f6a0e5850fce167a308c0d887027fbc21ee/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 775, 5752, 16156, 261, 3567, 67, 8373, 16, 1004, 67, 8373, 16, 2665, 774, 2421, 16, 13870, 25782, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.timeout == 0.0: return self._sock.accept()
def accept(self): if self.timeout == 0.0: return self._sock.accept() while True: try: res = self._sock.accept() except error, ex: if ex[0] == errno.EWOULDBLOCK: res = None else: raise if res is not None: client, addr = res return socket(_sock=client), addr wait_read(self._sock.fileno(), timeout=self.timeout)
35d9f001c11f344d4f3a9926f2c9e198050c89f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10423/35d9f001c11f344d4f3a9926f2c9e198050c89f1/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 4672, 1323, 1053, 30, 775, 30, 400, 273, 365, 6315, 15031, 18, 9436, 1435, 1335, 555, 16, 431, 30, 309, 431, 63, 20, 65, 422, 8402, 18, 7245, 51, 1506, 2290, 6589, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 4672, 1323, 1053, 30, 775, 30, 400, 273, 365, 6315, 15031, 18, 9436, 1435, 1335, 555, 16, 431, 30, 309, 431, 63, 20, 65, 422, 8402, 18, 7245, 51, 1506, 2290, 6589, 30...
self.selection.Bind(EVT_SELECT_ITEM, self.onChecked)
self.selection.Bind(EVT_ITEM_SELECT, self.onChecked)
def __init__(self, *args, **kwargs): super(DemoFrame, self).__init__(*args, **kwargs) self.selection = SelectionPanel(self,root='..') #self.Bind(tree.EVT_TREE_SEL_CHANGED, self.onSelected) self.selection.Bind(EVT_SELECT_ITEM, self.onChecked)
57a98c05403c1bb9f69fbcf4b31c1ca12b99be56 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13135/57a98c05403c1bb9f69fbcf4b31c1ca12b99be56/selection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 27126, 3219, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 13, 365, 18, 10705, 273, 12977, 5537, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 27126, 3219, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 13, 365, 18, 10705, 273, 12977, 5537, ...
plugin = chk_plugins.pop() if isinstance(plugin, Bcfg2.Server.Plugin.MetadataPlugin): self.metadata = plugin break
try: plugin = chk_plugins.pop() if isinstance(plugin, Bcfg2.Server.Plugin.MetadataPlugin): self.metadata = plugin break except: pass
def __init__(self, repo, plugins, structures, generators, password, svn, encoding): object.__init__(self) self.datastore = repo try: self.fam = monitor() except IOError: raise CoreInitError, "failed to connect to fam" self.pubspace = {} self.generators = [] self.structures = [] self.cron = {} self.plugins = {} self.revision = '-1' self.password = password self.svn = svn self.encoding = encoding try: if self.svn: self.read_svn_revision() except: self.svn = False
527a7b561b9e38933f30869fca0bf46e4af979d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/527a7b561b9e38933f30869fca0bf46e4af979d4/Core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3538, 16, 4799, 16, 12597, 16, 13327, 16, 2201, 16, 5893, 82, 16, 2688, 4672, 733, 16186, 2738, 972, 12, 2890, 13, 365, 18, 24522, 273, 3538, 775, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3538, 16, 4799, 16, 12597, 16, 13327, 16, 2201, 16, 5893, 82, 16, 2688, 4672, 733, 16186, 2738, 972, 12, 2890, 13, 365, 18, 24522, 273, 3538, 775, 30, ...
xmlfile.write(' <translator>\n') xmlfile.write(' <name>%s</name>\n' % (translator.name))
xmlfile.write(' <translator>\n') xmlfile.write(' <name>%s</name>\n' % (translator.name))
def writeToXmlFile(self, xmlpath): xmlfile = open(xmlpath, 'w') for project in self.__projects: #For all projects... xmlfile.write('<translations project="%s">\n' % (project.name)) xmlfile.write(' <update>%s</update>\n' % (time.strftime('%Y-%m-%d'))) for status1 in project.status: #For all ... xmlfile.write(' <translation>\n') xmlfile.write(' <language>%s</language>\n' % (status1.language)) xmlfile.write(' <file>%s</file>\n' % (status1.filename)) if status1.filetype == 'PO': #If a PO file... xmlfile.write(' <update>%s</update>\n' % (status1.porevisiondate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.translated)) xmlfile.write(' <fuzzy>%u</fuzzy>\n' % (status1.fuzzy)) xmlfile.write(' <untranslated>%u</untranslated>\n' % (status1.untranslated)) xmlfile.write(' </strings>\n') else: #If a POT file... xmlfile.write(' <update>%s</update>\n' % (status1.potcreationdate[0:10])) xmlfile.write(' <strings>\n') xmlfile.write(' <count>%u</count>\n' % (status1.count)) xmlfile.write(' <translated>%u</translated>\n' % (status1.count)) xmlfile.write(' <fuzzy>0</fuzzy>\n') xmlfile.write(' <untranslated>0</untranslated>\n') xmlfile.write(' </strings>\n') if status1.translators: #If translators exists... xmlfile.write(' <translators>\n') for translator in status1.translators: #For all translators... if (translator.ismaintainer): #If maintainer... xmlfile.write(' <translator maintainer="1">\n') else: #If NOT maintainer... xmlfile.write(' <translator>\n') xmlfile.write(' <name>%s</name>\n' % (translator.name)) if (translator.mail): #If mail address exists... xmlfile.write(' <mail>%s</mail>\n' % (translator.mail)) xmlfile.write(' </translator>\n') xmlfile.write(' </translators>\n') xmlfile.write(' </translation>\n') xmlfile.write('</translations>\n') xmlfile.close()
3dd31321b378fc1fb6df21dca72b973ea8dd5d0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5857/3dd31321b378fc1fb6df21dca72b973ea8dd5d0c/GetTranslationsStatus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12870, 4432, 812, 12, 2890, 16, 2025, 803, 4672, 2025, 768, 273, 1696, 12, 2902, 803, 16, 296, 91, 6134, 364, 1984, 316, 365, 16186, 13582, 30, 468, 1290, 777, 10137, 2777, 2025, 768, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12870, 4432, 812, 12, 2890, 16, 2025, 803, 4672, 2025, 768, 273, 1696, 12, 2902, 803, 16, 296, 91, 6134, 364, 1984, 316, 365, 16186, 13582, 30, 468, 1290, 777, 10137, 2777, 2025, 768, ...
sections[rname][oname] += ' %s' % ovalue
if ovalue: sections[rname][oname] += ' %s' % ovalue
def _read_config(f): meta, vars, sections, reqs = parse_config(f, dirs) # recursively add sections and variables of required libraries for rname, rvalue in reqs.items(): nmeta, nvars, nsections, nreqs = _read_config(pkg_to_filename(rvalue))
59a95e87f7225adcbad28bf40b0e1f4f6071f59f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/59a95e87f7225adcbad28bf40b0e1f4f6071f59f/npy_pkg_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1425, 12, 74, 4672, 2191, 16, 4153, 16, 7178, 16, 20927, 273, 1109, 67, 1425, 12, 74, 16, 7717, 13, 468, 8536, 527, 7178, 471, 3152, 434, 1931, 14732, 364, 436, 529, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 1425, 12, 74, 4672, 2191, 16, 4153, 16, 7178, 16, 20927, 273, 1109, 67, 1425, 12, 74, 16, 7717, 13, 468, 8536, 527, 7178, 471, 3152, 434, 1931, 14732, 364, 436, 529, 16...
filepath = os.path.join(install_item['path'],
filepath = os.path.join(install_item['path'],
def getInstalledVersion(pl): """ Attempts to determine the currently installed version of the item described by pl """ if 'receipts' in pl: for receipt in pl['receipts']: installedpkgvers = \ munkicommon.getInstalledPackageVersion(receipt['packageid']) munkicommon.display_debug2("Looking for %s, version %s" % (receipt['packageid'], receipt['version'])) if compareVersions(installedpkgvers, receipt['version']) == 2: # version is higher installedversion = "newer than %s" % pl['version'] return installedversion if compareVersions(installedpkgvers, receipt['version']) == -1: # version is lower installedversion = "older than %s" % pl['version'] return installedversion # if we get here all reciepts match return pl['version'] if 'installs' in pl: for install_item in pl['installs']: if install_item['type'] == 'application': name = install_item.get('CFBundleName') bundleid = install_item.get('CFBundleIdentifier') munkicommon.display_debug2( "Looking for application %s, version %s" % (name, install_item.get('CFBundleIdentifier'))) try: # check default location for app filepath = os.path.join(install_item['path'], 'Contents', 'Info.plist') pl = FoundationPlist.readPlist(filepath) installedappvers = pl.get('CFBundleShortVersionString') except FoundationPlist.NSPropertyListSerializationException: # that didn't work, fall through to the slow way # using System Profiler appinfo = [] appdata = getAppData() if appdata: for ad_item in appdata: if bundleid: if 'path' in ad_item: if getAppBundleID(ad_item['path']) == \ bundleid: appinfo.append(ad_item) elif name: if '_name' in ad_item: if ad_item['_name'] == name: appinfo.append(ad_item) for ai_item in appinfo: if 'version' in ai_item: if compareVersions(ai_item['version'], maxversion) == 2: # version is higher maxversion = ai_item['version'] installedappvers = maxversion if compareVersions(installedappvers, install_item['CFBundleShortVersionString']) == 2: # version is higher installedversion = "newer than %s" % pl['version'] return installedversion if compareVersions(installedappvers, install_item['CFBundleShortVersionString']) == -1: # version is lower installedversion = "older than %s" % pl['version'] return installedversion # if we get here all app versions match return pl['version'] # if we fall through to here we have no idea what version we have return "UNKNOWN"
5350042f4ddfb098468c8d75b15dfa28757b9321 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6241/5350042f4ddfb098468c8d75b15dfa28757b9321/updatecheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7854, 334, 4502, 1444, 12, 412, 4672, 3536, 6020, 9585, 358, 4199, 326, 4551, 5876, 1177, 434, 326, 761, 11893, 635, 886, 3536, 309, 296, 8606, 27827, 11, 316, 886, 30, 364, 16030, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7854, 334, 4502, 1444, 12, 412, 4672, 3536, 6020, 9585, 358, 4199, 326, 4551, 5876, 1177, 434, 326, 761, 11893, 635, 886, 3536, 309, 296, 8606, 27827, 11, 316, 886, 30, 364, 16030, 316, ...
(0, 10) * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * (Sqrt(kmin) + Sqrt(k + kmin))))) / (604800. * beta ** 2 * k ** 2))
10 * 1j * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * (Sqrt(kmin) + Sqrt(k + kmin))))) / (604800. * beta ** 2 * k ** 2))
def J_D(self, k, alpha, beta, C6, C7): """Solution for J_B which is the integral for B in terms of constants C3 and C4.""" kmax = k[-1] kmin = k[0] J_D = ((alpha ** 2 * (-((240 * beta ** 2 * (40 * C6 * (24 * k ** 3 + 9 * k ** 2 * kmax + 2 * k * kmax ** 2 - 4 * kmax ** 3) + C7 * kmax * (-105 * k ** 4 - 250 * k ** 3 * kmax + 104 * k ** 2 * kmax ** 2 + 48 * k * kmax ** 3 - 96 * kmax ** 4)) + (0, 10) * beta * (24 * C6 * (448 * k ** 4 - 239 * k ** 3 * kmax + 522 * k ** 2 * kmax ** 2 + 88 * k * kmax ** 3 - 176 * kmax ** 4) + C7 * kmax * (315 * k ** 5 - 3794 * k ** 4 * kmax - 2648 * k ** 3 * kmax ** 2 + 6000 * k ** 2 * kmax ** 3 + 1408 * k * kmax ** 4 - 2816 * kmax ** 5)) + 3 * kmax * (112 * C6 * (185 * k ** 4 - 70 * k ** 3 * kmax - 168 * k ** 2 * kmax ** 2 - 16 * k * kmax ** 3 + 32 * kmax ** 4) + C7 * (-945 * k ** 6 + 630 * k ** 5 * kmax + 6664 * k ** 4 * kmax ** 2 - 3152 * k ** 3 * kmax ** 3 - 11136 * k ** 2 * kmax ** 4 - 1280 * k * kmax ** 5 + 2560 * kmax ** 6))) / Sqrt(kmax / (k + kmax))) + (-240 * beta ** 2 * (40 * C6 * (24 * k ** 3 - 9 * k ** 2 * kmax + 2 * k * kmax ** 2 + 4 * kmax ** 3) + C7 * kmax * (105 * k ** 4 - 250 * k ** 3 * kmax - 104 * k ** 2 * kmax ** 2 + 48 * k * kmax ** 3 + 96 * kmax ** 4)) + (0, 10) * beta * (24 * C6 * (448 * k ** 4 + 239 * k ** 3 * kmax + 522 * k ** 2 * kmax ** 2 - 88 * k * kmax ** 3 - 176 * kmax ** 4) - C7 * kmax * (315 * k ** 5 + 3794 * k ** 4 * kmax - 2648 * k ** 3 * kmax ** 2 - 6000 * k ** 2 * kmax ** 3 + 1408 * k * kmax ** 4 + 2816 * kmax ** 5)) + 3 * kmax * (112 * C6 * (185 * k ** 4 + 70 * k ** 3 * kmax - 168 * k ** 2 * kmax ** 2 + 16 * k * kmax ** 3 + 32 * kmax ** 4) + C7 * (-945 * k ** 6 - 630 * k ** 5 * kmax + 6664 * k ** 4 * kmax ** 2 + 3152 * k ** 3 * kmax ** 3 - 11136 * k ** 2 * kmax ** 4 + 1280 * k * kmax ** 5 + 2560 * kmax ** 6))) / Sqrt(kmax / (-k + kmax)) + (240 * beta ** 2 * (40 * C6 * (24 * k ** 3 + 9 * k ** 2 * kmin + 2 * k * kmin ** 2 - 4 * kmin ** 3) + C7 * kmin * (-105 * k ** 4 - 250 * k ** 3 * kmin + 104 * k ** 2 * kmin ** 2 + 48 * k * kmin ** 3 - 96 * kmin ** 4)) + (0, 10) * beta * (24 * C6 * (448 * k ** 4 - 239 * k ** 3 * kmin + 522 * k ** 2 * kmin ** 2 + 88 * k * kmin ** 3 - 176 * kmin ** 4) + C7 * kmin * (315 * k ** 5 - 3794 * k ** 4 * kmin - 2648 * k ** 3 * kmin ** 2 + 6000 * k ** 2 * kmin ** 3 + 1408 * k * kmin ** 4 - 2816 * kmin ** 5)) + 3 * kmin * (112 * C6 * (185 * k ** 4 - 70 * k ** 3 * kmin - 168 * k ** 2 * kmin ** 2 - 16 * k * kmin ** 3 + 32 * kmin ** 4) + C7 * (-945 * k ** 6 + 630 * k ** 5 * kmin + 6664 * k ** 4 * kmin ** 2 - 3152 * k ** 3 * kmin ** 3 - 11136 * k ** 2 * kmin ** 4 - 1280 * k * kmin ** 5 + 2560 * kmin ** 6))) / Sqrt(kmin / (k + kmin)) - (240 * beta ** 2 * (40 * C6 * (24 * k ** 3 - 9 * k ** 2 * kmin + 2 * k * kmin ** 2 + 4 * kmin ** 3) + C7 * kmin * (105 * k ** 4 - 250 * k ** 3 * kmin - 104 * k ** 2 * kmin ** 2 + 48 * k * kmin ** 3 + 96 * kmin ** 4)) + (0, 20) * beta * (384 * C6 * (k - kmin) ** 2 * (14 * k ** 2 + 5 * k * kmin + 2 * kmin ** 2) + C7 * kmin * (945 * k ** 5 - 1162 * k ** 4 * kmin - 2696 * k ** 3 * kmin ** 2 + 1200 * k ** 2 * kmin ** 3 + 256 * k * kmin ** 4 + 512 * kmin ** 5)) + 3 * kmin * (112 * C6 * (185 * k ** 4 + 70 * k ** 3 * kmin - 168 * k ** 2 * kmin ** 2 + 16 * k * kmin ** 3 + 32 * kmin ** 4) + C7 * (-945 * k ** 6 - 630 * k ** 5 * kmin + 6664 * k ** 4 * kmin ** 2 + 3152 * k ** 3 * kmin ** 3 - 11136 * k ** 2 * kmin ** 4 + 1280 * k * kmin ** 5 + 2560 * kmin ** 6))) / Sqrt(kmin / (k - kmin)) + (315 * k ** 3 * ((0, -60) * beta * C7 * k ** 3 + 80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2)) * Pi) / 2. - 315 * k ** 3 * ((0, -60) * beta * C7 * k ** 3 + 80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2)) * ArcTan(Sqrt(kmin / (k - kmin))) + 315 * k ** 3 * (-80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2) + (0, 10) * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * Sqrt(k)) - 315 * k ** 3 * (-80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2) + (0, 10) * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * (Sqrt(kmax) + Sqrt(-k + kmax))) - 315 * k ** 3 * (-80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2) - (0, 10) * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * (Sqrt(kmax) + Sqrt(k + kmax))) + 315 * k ** 3 * (-80 * beta ** 2 * (8 * C6 - C7 * k ** 2) + 9 * k ** 2 * (16 * C6 + C7 * k ** 2) - (0, 10) * beta * (72 * C6 * k + C7 * k ** 3)) * Log(2 * (Sqrt(kmin) + Sqrt(k + kmin))))) / (604800. * beta ** 2 * k ** 2))
8a3dcbeb3a42e1c1040ab2e9d5cd6ce5cc20775d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7283/8a3dcbeb3a42e1c1040ab2e9d5cd6ce5cc20775d/analyticsolution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 67, 40, 12, 2890, 16, 417, 16, 4190, 16, 6796, 16, 385, 26, 16, 385, 27, 4672, 3536, 16135, 364, 804, 67, 38, 1492, 353, 326, 21423, 364, 605, 316, 6548, 434, 6810, 385, 23, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 804, 67, 40, 12, 2890, 16, 417, 16, 4190, 16, 6796, 16, 385, 26, 16, 385, 27, 4672, 3536, 16135, 364, 804, 67, 38, 1492, 353, 326, 21423, 364, 605, 316, 6548, 434, 6810, 385, 23, 4...
self.assertEquals(str(e), 'no element found: line 2, column 1')
self.assertEquals(str(e), 'unclosed token: line 2, column 0')
def test1(self): xml = "\0\r\n" parser = expat.ParserCreate() try: parser.Parse(xml, True) self.fail() except expat.ExpatError as e: self.assertEquals(str(e), 'no element found: line 2, column 1')
0c9c06bead5ad13e0ff81192ea9435cee267ab3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/0c9c06bead5ad13e0ff81192ea9435cee267ab3b/test_pyexpat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21, 12, 2890, 4672, 2025, 273, 1548, 20, 64, 86, 64, 82, 6, 2082, 273, 1329, 270, 18, 2678, 1684, 1435, 775, 30, 2082, 18, 3201, 12, 2902, 16, 1053, 13, 365, 18, 6870, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 21, 12, 2890, 4672, 2025, 273, 1548, 20, 64, 86, 64, 82, 6, 2082, 273, 1329, 270, 18, 2678, 1684, 1435, 775, 30, 2082, 18, 3201, 12, 2902, 16, 1053, 13, 365, 18, 6870, 1435, ...
return Time2Internaldate(time.mktime(parsed_date)) else: return Time2Internaldate(time.time())
try: return Time2Internaldate(time.mktime(parsed_date)) except OverflowError: pass return Time2Internaldate(time.time())
def extractTime(self): # When we create a new copy of a message, we need to specify # a timestamp for the message. If the message has a valid date # header we use that. Otherwise, we use the current time. message_date = self["Date"] if message_date is not None: parsed_date = parsedate(message_date) if parsed_date is not None: return Time2Internaldate(time.mktime(parsed_date)) else: return Time2Internaldate(time.time())
5c16c192b57be8769fc68986b219697b9fcc65fa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/5c16c192b57be8769fc68986b219697b9fcc65fa/sb_imapfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 950, 12, 2890, 4672, 468, 5203, 732, 752, 279, 394, 1610, 434, 279, 883, 16, 732, 1608, 358, 4800, 468, 279, 2858, 364, 326, 883, 18, 225, 971, 326, 883, 711, 279, 923, 1509, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 950, 12, 2890, 4672, 468, 5203, 732, 752, 279, 394, 1610, 434, 279, 883, 16, 732, 1608, 358, 4800, 468, 279, 2858, 364, 326, 883, 18, 225, 971, 326, 883, 711, 279, 923, 1509, 4...
if len (resolved.dns_resources) > 0:
if resolved.dns_resources:
def tcp_client_dns (self, channel, addr, resolved): if len (resolved.dns_resources) > 0: # DNS address resolved, connect ... channel.tcp_connect (( resolved.dns_resources[0], addr[1] )) else: del self.tcp_client_channels[addr] self.tcp_client_dns_error (channel, addr)
8cf87b7dd340388dce8975477c5b0977048faa8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/8cf87b7dd340388dce8975477c5b0977048faa8d/dns_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9658, 67, 2625, 67, 14926, 261, 2890, 16, 1904, 16, 3091, 16, 4640, 4672, 309, 4640, 18, 14926, 67, 4683, 30, 468, 8858, 1758, 4640, 16, 3077, 1372, 1904, 18, 14832, 67, 3612, 14015, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9658, 67, 2625, 67, 14926, 261, 2890, 16, 1904, 16, 3091, 16, 4640, 4672, 309, 4640, 18, 14926, 67, 4683, 30, 468, 8858, 1758, 4640, 16, 3077, 1372, 1904, 18, 14832, 67, 3612, 14015, 4...
individual_group_bit = (node >> 40L) & 1 universal_local_bit = (node >> 40L) & 2 message = "%012x doesn't look like a real MAC address" % node self.assertEqual(individual_group_bit, 0, message) self.assertEqual(universal_local_bit, 0, message) self.assertNotEqual(node, 0, message) self.assertNotEqual(node, 0xffffffffffffL, message) self.assertTrue(0 <= node, message)
message = "%012x is not an RFC 4122 node ID" % node self.assertTrue(0 < node, message)
def check_node(self, node, source): individual_group_bit = (node >> 40L) & 1 universal_local_bit = (node >> 40L) & 2 message = "%012x doesn't look like a real MAC address" % node self.assertEqual(individual_group_bit, 0, message) self.assertEqual(universal_local_bit, 0, message) self.assertNotEqual(node, 0, message) self.assertNotEqual(node, 0xffffffffffffL, message) self.assertTrue(0 <= node, message) self.assertTrue(node < (1L << 48), message)
70bc06864e7d20434f1ee882d938893d9467ec78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/70bc06864e7d20434f1ee882d938893d9467ec78/test_uuid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2159, 12, 2890, 16, 756, 16, 1084, 4672, 883, 273, 2213, 1611, 22, 92, 353, 486, 392, 8372, 1059, 22266, 756, 1599, 6, 738, 756, 365, 18, 11231, 5510, 12, 20, 411, 756, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2159, 12, 2890, 16, 756, 16, 1084, 4672, 883, 273, 2213, 1611, 22, 92, 353, 486, 392, 8372, 1059, 22266, 756, 1599, 6, 738, 756, 365, 18, 11231, 5510, 12, 20, 411, 756, 16, ...
if f != 'id' and temp[count] == 1:
if not line.get('__group') and f != 'id' and temp[count] == 1:
def _append_node(name, text): n = etree.SubElement(config, name) n.text = text
043431014637563ca06b30dfced7df8f4140160d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/043431014637563ca06b30dfced7df8f4140160d/ps_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 12031, 18, 1676, 1046, 12, 1425, 16, 508, 13, 290, 18, 955, 273, 977, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 12031, 18, 1676, 1046, 12, 1425, 16, 508, 13, 290, 18, 955, 273, 977, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return str(self.msg.getaddr('From')[0])
return str(self.getAddressFrom[0])
def getFromName(self): if(self.msg['From'].find('<')!= -1): #mail similar than: Name Surmane <name@domain.com> return str(self.msg.getaddr('From')[0]) else: #something like: Name Surmane name@domain.com from_name, from_mail = self.parseFrom(self.msg['From']) return from_name
e4fc328b2ad5db6985e54b3de1089e0f6fe35706 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/e4fc328b2ad5db6985e54b3de1089e0f6fe35706/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11859, 461, 12, 2890, 4672, 309, 12, 2890, 18, 3576, 3292, 1265, 29489, 4720, 2668, 32, 6134, 5, 33, 300, 21, 4672, 468, 4408, 7281, 2353, 30, 1770, 16680, 4728, 73, 411, 529, 36, 4308...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11859, 461, 12, 2890, 4672, 309, 12, 2890, 18, 3576, 3292, 1265, 29489, 4720, 2668, 32, 6134, 5, 33, 300, 21, 4672, 468, 4408, 7281, 2353, 30, 1770, 16680, 4728, 73, 411, 529, 36, 4308...
"""Add Builders and construction variables for ilink to an
"""Add Builders and construction variables for Borland ilink to an
def generate(env): """Add Builders and construction variables for ilink to an Environment.""" SCons.Tool.createSharedLibBuilder(env) SCons.Tool.createProgBuilder(env) env['LINK'] = '$CC' env['LINKFLAGS'] = SCons.Util.CLVar('') env['LINKCOM'] = '$LINK -q $LINKFLAGS $SOURCES $LIBS' env['LIBDIRPREFIX']='' env['LIBDIRSUFFIX']='' env['LIBLINKPREFIX']='' env['LIBLINKSUFFIX']='$LIBSUFFIX'
a1adb9579f95f7124a7f94e157d98a853ee8620e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/a1adb9579f95f7124a7f94e157d98a853ee8620e/ilink32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 605, 280, 15733, 277, 1232, 358, 392, 7518, 12123, 20487, 18, 6364, 18, 2640, 7887, 5664, 1263, 12, 3074, 13, 20487, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 605, 280, 15733, 277, 1232, 358, 392, 7518, 12123, 20487, 18, 6364, 18, 2640, 7887, 5664, 1263, 12, 3074, 13, 20487, 18...
checkouts.append(GuessVCS(options, os.getcwd()))
path = os.getcwd() if options.upstream_branch: path += '@' + options.upstream_branch checkouts.append(GuessVCS(options, path))
def TryChange(argv, file_list, swallow_exception, prog=None, extra_epilog=None): """ Args: argv: Arguments and options. file_list: Default value to pass to --file. swallow_exception: Whether we raise or swallow exceptions. """ # Parse argv parser = optparse.OptionParser(usage=USAGE, version=__version__, prog=prog) epilog = EPILOG % { 'prog': prog } if extra_epilog: epilog += extra_epilog parser.epilog = epilog # Remove epilog formatting parser.format_epilog = lambda x: parser.epilog parser.add_option("-v", "--verbose", action="count", default=0, help="Prints debugging infos") group = optparse.OptionGroup(parser, "Result and status") group.add_option("-u", "--user", default=getpass.getuser(), help="Owner user name [default: %default]") group.add_option("-e", "--email", default=os.environ.get('TRYBOT_RESULTS_EMAIL_ADDRESS', os.environ.get('EMAIL_ADDRESS')), help="Email address where to send the results. Use either " "the TRYBOT_RESULTS_EMAIL_ADDRESS environment " "variable or EMAIL_ADDRESS to set the email address " "the try bots report results to [default: %default]") group.add_option("-n", "--name", help="Descriptive name of the try job") group.add_option("--issue", type='int', help="Update rietveld issue try job status") group.add_option("--patchset", type='int', help="Update rietveld issue try job status. This is " "optional if --issue is used, In that case, the " "latest patchset will be used.") group.add_option("--dry_run", action='store_true', help="Just prints the diff and quits") parser.add_option_group(group) group = optparse.OptionGroup(parser, "Try job options") group.add_option("-b", "--bot", action="append", help="Only use specifics build slaves, ex: " "'--bot win,layout_mac'; see the try " "server waterfall for the slave's name") group.add_option("-r", "--revision", help="Revision to use for the try job; default: the " "revision will be determined by the try server; see " "its waterfall for more info") group.add_option("-c", "--clobber", action="store_true", help="Force a clobber before building; e.g. don't do an " "incremental build") # TODO(maruel): help="Select a specific configuration, usually 'debug' or " # "'release'" group.add_option("--target", help=optparse.SUPPRESS_HELP) group.add_option("--project", help="Override which project to use. Projects are defined " "server-side to define what default bot set to use") group.add_option("-t", "--testfilter", action="append", help="Add a gtest_filter to a test. Use multiple times to " "specify filters for different tests. (i.e. " "--testfilter base_unittests:ThreadTest.* " "--testfilter ui_tests) If you specify any testfilters " "the test results will not be reported in rietveld and " "only tests with filters will run.") parser.add_option_group(group) group = optparse.OptionGroup(parser, "Patch to run") group.add_option("-f", "--file", default=file_list, dest="files", metavar="FILE", action="append", help="Use many times to list the files to include in the " "try, relative to the repository root") group.add_option("--diff", help="File containing the diff to try") group.add_option("--url", help="Url where to grab a patch, e.g. " "http://example.com/x.diff") group.add_option("-R", "--rietveld_url", default="codereview.appspot.com", metavar="URL", help="Has 2 usages, both refer to the rietveld instance: " "Specify which code review patch to use as the try job " "or rietveld instance to update the try job results " "Default:%default") group.add_option("--root", help="Root to use for the patch; base subdirectory for " "patch created in a subdirectory") group.add_option("-p", "--patchlevel", type='int', metavar="LEVEL", help="Used as -pN parameter to patch") group.add_option("-s", "--sub_rep", action="append", default=[], help="Subcheckout to use in addition. This is mainly " "useful for gclient-style checkouts. In git, checkout " "the branch with changes first. Use @rev or " "@branch to specify the " "revision/branch to diff against. If no @branch is " "given the diff will be against the upstream branch. " "If @branch then the diff is branch..HEAD. " "All edits must be checked in.") group.add_option("--no_gclient", action="store_true", help="Disable automatic search for gclient checkout.") group.add_option("-E", "--exclude", action="append", default=['ChangeLog'], metavar='REGEXP', help="Regexp patterns to exclude files. Default: %default") parser.add_option_group(group) group = optparse.OptionGroup(parser, "Access the try server by HTTP") group.add_option("--use_http", action="store_const", const=_SendChangeHTTP, dest="send_patch", help="Use HTTP to talk to the try server [default]") group.add_option("-H", "--host", help="Host address") group.add_option("-P", "--port", help="HTTP port") group.add_option("--proxy", help="HTTP proxy") parser.add_option_group(group) group = optparse.OptionGroup(parser, "Access the try server with SVN") group.add_option("--use_svn", action="store_const", const=_SendChangeSVN, dest="send_patch", help="Use SVN to talk to the try server") group.add_option("-S", "--svn_repo", metavar="SVN_URL", help="SVN url to use to write the changes in; --use_svn is " "implied when using --svn_repo") parser.add_option_group(group) options, args = parser.parse_args(argv) # Note that the args array includes the script name, so # a single argument results in len(args) == 2. # If they've asked for help, give it to them if len(args) == 2 and args[1] == 'help': parser.print_help() return 0 # If they've said something confusing, don't spawn a try job until you # understand what they want. if len(args) > 1: plural = "" if len(args) > 2: plural = "s" print >> sys.stderr, ( 'Argument%s \"%s\" not understood' % (plural, ' '.join(args[1:]))) parser.print_help() return 1 LOG_FORMAT = '%(levelname)s %(filename)s(%(lineno)d): %(message)s' if not swallow_exception: if options.verbose == 0: logging.basicConfig(level=logging.WARNING, format=LOG_FORMAT) elif options.verbose == 1: logging.basicConfig(level=logging.INFO, format=LOG_FORMAT) elif options.verbose > 1: logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT) logging.debug(argv) # Strip off any @ in the user, otherwise svn gets confused. options.user = options.user.split('@', 1)[0] if options.rietveld_url: # Try to extract the review number if possible and fix the protocol. if not '://' in options.rietveld_url: options.rietveld_url = 'http://' + options.rietveld_url match = re.match(r'^(.*)/(\d+)$', options.rietveld_url) if match: if options.issue or options.patchset: parser.error('Cannot use both --issue and use a review number url') options.issue = int(match.group(2)) options.rietveld_url = match.group(1) try: # Always include os.getcwd() in the checkout settings. checkouts = [] checkouts.append(GuessVCS(options, os.getcwd())) checkouts[0].AutomagicalSettings() for item in options.sub_rep: checkout = GuessVCS(options, os.path.join(checkouts[0].checkout_root, item)) if checkout.checkout_root in [c.checkout_root for c in checkouts]: parser.error('Specified the root %s two times.' % checkout.checkout_root) checkouts.append(checkout) can_http = options.port and options.host can_svn = options.svn_repo # If there was no transport selected yet, now we must have enough data to # select one. if not options.send_patch and not (can_http or can_svn): parser.error('Please specify an access method.') # Convert options.diff into the content of the diff. if options.url: if options.files: parser.error('You cannot specify files and --url at the same time.') options.diff = urllib.urlopen(options.url).read() elif options.diff: if options.files: parser.error('You cannot specify files and --diff at the same time.') options.diff = gclient_utils.FileRead(options.diff, 'rb') elif options.issue and options.patchset is None: # Retrieve the patch from rietveld when the diff is not specified. # When patchset is specified, it's because it's done by gcl/git-try. if json is None: parser.error('json or simplejson library is missing, please install.') api_url = '%s/api/%d' % (options.rietveld_url, options.issue) logging.debug(api_url) contents = json.loads(urllib.urlopen(api_url).read()) options.patchset = contents['patchsets'][-1] diff_url = ('%s/download/issue%d_%d.diff' % (options.rietveld_url, options.issue, options.patchset)) diff = GetMungedDiff('', urllib.urlopen(diff_url).readlines()) options.diff = ''.join(diff) else: # Use this as the base. root = checkouts[0].checkout_root diffs = [] for checkout in checkouts: diff = checkout.GenerateDiff().splitlines(True) path_diff = gclient_utils.PathDifference(root, checkout.checkout_root) # Munge it. diffs.extend(GetMungedDiff(path_diff, diff)) options.diff = ''.join(diffs) if not options.bot: # Get try slaves from PRESUBMIT.py files if not specified. # Even if the diff comes from options.url, use the local checkout for bot # selection. try: import presubmit_support root_presubmit = checkouts[0].ReadRootFile('PRESUBMIT.py') options.bot = presubmit_support.DoGetTrySlaves( checkouts[0].GetFileNames(), checkouts[0].checkout_root, root_presubmit, False, sys.stdout) except ImportError: pass # If no bot is specified, either the default pool will be selected or the # try server will refuse the job. Either case we don't need to interfere. if options.name is None: if options.issue: options.name = 'Issue %s' % options.issue else: options.name = 'Unnamed' print('Note: use --name NAME to change the try job name.') if not options.email: parser.error('Using an anonymous checkout. Please use --email or set ' 'the TRYBOT_RESULTS_EMAIL_ADDRESS environment variable.') else: print('Results will be emailed to: ' + options.email) # Prevent rietveld updates if we aren't running all the tests. if options.testfilter is not None: options.issue = None options.patchset = None # Send the patch. if options.send_patch: # If forced. options.send_patch(options) PrintSuccess(options) return 0 try: if can_http: _SendChangeHTTP(options) PrintSuccess(options) return 0 except NoTryServerAccess: if not can_svn: raise _SendChangeSVN(options) PrintSuccess(options) return 0 except (InvalidScript, NoTryServerAccess), e: if swallow_exception: return 1 print >> sys.stderr, e return 1 except gclient_utils.Error, e: print >> sys.stderr, e return 1 return 0
8ce51c34d5650c18e99dd9250cd833bbf84ed3ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/8ce51c34d5650c18e99dd9250cd833bbf84ed3ee/trychange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6161, 3043, 12, 19485, 16, 585, 67, 1098, 16, 1352, 5965, 67, 4064, 16, 11243, 33, 7036, 16, 2870, 67, 881, 21947, 33, 7036, 4672, 3536, 6634, 30, 5261, 30, 13599, 471, 702, 18, 585, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6161, 3043, 12, 19485, 16, 585, 67, 1098, 16, 1352, 5965, 67, 4064, 16, 11243, 33, 7036, 16, 2870, 67, 881, 21947, 33, 7036, 4672, 3536, 6634, 30, 5261, 30, 13599, 471, 702, 18, 585, ...
print "Mimal supergroups generated by the sub-groups of the input space group:"
print "Minimal supergroups generated by the sub-groups of the input space group:"
def create_all_subgroups( sg1,show_all=True, reverse=False ): sg_high = sgtbx.space_group_info( sg1 ).group() sg_low = sgtbx.space_group_info( "p1" ).group() graph_object = pointgroup_tools.point_group_graph( sg_low, sg_high, False,True) highest_sg = str( sgtbx.space_group_info( sg1 ) ) rev_dict = reverse_dict( graph_object.graph.o ) maximum_subgroups = get_maximum_subgroup( highest_sg, rev_dict ) if show_all: print "Subgroups of input space groups which can be constructed by introducing one single operator (and group completion) in the subgroup:" for sg in rev_dict[ highest_sg ]: line = " " line += sg+(30-len(sg))*" "+str(graph_object.graph.edge_objects[ sg ][highest_sg])+(90-len( str(graph_object.graph.edge_objects[ sg ][highest_sg]) ))*" " print line print print "Maximum subgroup detected in the full sub-group-graph: " for sg in maximum_subgroups: line = " " line += sg print line print print print print " Cosets for each maximum sub-group and the input space group are listed:" for sg in maximum_subgroups: print "-----------------------------------------------------------------" show_cosets.run( sg,highest_sg ) print "-----------------------------------------------------------------" print print print print else: print "Maximal subgroups of %s: "%(sg1) for sg in maximum_subgroups: line = " " line += sg print line print print print if reverse: print "Mimal supergroups generated by the sub-groups of the input space group:" tmp_sg = sgtbx.space_group_info( sg1 ) for sg in maximum_subgroups: tmp_sgsg = sgtbx.space_group_info( sg ) cb_op = tmp_sgsg.change_of_basis_op_to_reference_setting() okai=False try: new_sg = tmp_sg.change_basis( cb_op ) okai=True print new_sg ," is a minimum supergroup of ", tmp_sgsg.change_basis(cb_op) except: pass if not okai: print "%s (%s) is a minimum supergroup of %s [*]"%(tmp_sg,cb_op, tmp_sgsg.change_basis(cb_op)) print print print
fcbb301b715eba4f9967592ba76cbf1e3e96a0a0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/fcbb301b715eba4f9967592ba76cbf1e3e96a0a0/maximum_subgroups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 454, 67, 1717, 4650, 12, 11150, 21, 16, 4500, 67, 454, 33, 5510, 16, 4219, 33, 8381, 262, 30, 11150, 67, 8766, 273, 272, 4521, 70, 92, 18, 2981, 67, 1655, 67, 1376, 12, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 454, 67, 1717, 4650, 12, 11150, 21, 16, 4500, 67, 454, 33, 5510, 16, 4219, 33, 8381, 262, 30, 11150, 67, 8766, 273, 272, 4521, 70, 92, 18, 2981, 67, 1655, 67, 1376, 12, 11...
list.append(self.text)
list.append(self) def set_editable(self, is_editable): self.text.set_editable(is_editable)
def addEditable(self, list): ''' Add any editable fields to the list. ''' list.append(self.text)
a19c49d50daf587bd65dc947110411a62bd2f4e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/a19c49d50daf587bd65dc947110411a62bd2f4e7/GTKsheetElements.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 15470, 12, 2890, 16, 666, 4672, 9163, 1436, 1281, 13754, 1466, 358, 326, 666, 18, 9163, 666, 18, 6923, 12, 2890, 18, 955, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 15470, 12, 2890, 16, 666, 4672, 9163, 1436, 1281, 13754, 1466, 358, 326, 666, 18, 9163, 666, 18, 6923, 12, 2890, 18, 955, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
mysavefig('plotbankefficiency_bank')
mysavefig('plotbankefficiency_bank.png')
def ParseParameters(): usage = """Usage: %prog [options] [trigs1 missed1 trigs2 missed2] Generate found and missed trig plots Example: plotinspmissed --time-dist --show-plot found.xml missed.xml """ parser = OptionParser( usage=usage, \ version="%prog CVS $Id$ \n" \ + "$Name$\n" ) parser.add_option("-s","--show-plot",action="store_true",default=False,\ help="display the figures on the terminal", dest="show_plot" ) parser.add_option("-v","--verbose",action="store_true",\ default=False, help="print information" ) parser.add_option("-g","--glob",action="store", type="string",\ default=None, help="print information" ) parser.add_option("-u","--user-tag",action="store", type="string",\ default="", help="pset a user tag for the figure's filename" ) (opts,args) = parser.parse_args() return opts,args
e68d6e443dba9ce03707309a1a4d7d9b9785f7ae /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5758/e68d6e443dba9ce03707309a1a4d7d9b9785f7ae/plotbankefficiency.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 2402, 13332, 4084, 273, 3536, 5357, 30, 738, 14654, 306, 2116, 65, 306, 313, 360, 87, 21, 25143, 21, 23142, 87, 22, 25143, 22, 65, 225, 6654, 1392, 471, 25143, 23142, 17931, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 2402, 13332, 4084, 273, 3536, 5357, 30, 738, 14654, 306, 2116, 65, 306, 313, 360, 87, 21, 25143, 21, 23142, 87, 22, 25143, 22, 65, 225, 6654, 1392, 471, 25143, 23142, 17931, 225, ...
filepath = os.path.join(env.ARCHIVE_OUTPUT_DIR, "eagle3d_"+self.version_to_filename(version)+".tar.gz")
filepath = os.path.join(env.ARCHIVE_OUTPUT_DIR, "eagle3d_"+release_safename+".tar.gz")
def release(self): quiet = config._get('quiet') version = config._get('version')
0caba114cd86255dcf1be4e04b0b7cd10933fdd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2758/0caba114cd86255dcf1be4e04b0b7cd10933fdd0/eagle3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 12, 2890, 4672, 10902, 273, 642, 6315, 588, 2668, 20380, 6134, 1177, 273, 642, 6315, 588, 2668, 1589, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3992, 12, 2890, 4672, 10902, 273, 642, 6315, 588, 2668, 20380, 6134, 1177, 273, 642, 6315, 588, 2668, 1589, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
g.draw()
def demo(self): D = Drawing(100, 100)
2153c6f9f7afc55d87d741aa392569b7c2232d19 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/2153c6f9f7afc55d87d741aa392569b7c2232d19/grids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 12, 2890, 4672, 463, 273, 10184, 310, 12, 6625, 16, 2130, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21477, 12, 2890, 4672, 463, 273, 10184, 310, 12, 6625, 16, 2130, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
quest_form, quest_fields = pooler.get_pool(cr.dbname).get('crm_profiling.questionnaire').browse(cr, uid, data['form']['questionnaire_name']).build_form(cr, uid, data, context)
quest_form, quest_fields = pooler.get_pool(cr.dbname).get('crm_profiling.questionnaire').build_form(cr, uid, data, context)
def build_form(self, cr, uid, data, context): quest_form, quest_fields = pooler.get_pool(cr.dbname).get('crm_profiling.questionnaire').browse(cr, uid, data['form']['questionnaire_name']).build_form(cr, uid, data, context) _QUEST_FORM. __init__(quest_form) _QUEST_FIELDS.__init__(quest_fields) return{}
d185ca258728848badb2c6d99e7f8fabedb63a78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7339/d185ca258728848badb2c6d99e7f8fabedb63a78/open_questionnaire.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 687, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 456, 67, 687, 16, 225, 456, 67, 2821, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 687, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 225, 456, 67, 687, 16, 225, 456, 67, 2821, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2...
def _get_document_paths(self): return [self._window.get_active_document().get_uri_for_display()]
def _get_document_path(self): document = self._window.get_active_document() path = self.base_dir if document: tmp_path = document.get_uri_for_display() if os.path.exists(tmp_path): path = tmp_path return path
def _get_document_paths(self): return [self._window.get_active_document().get_uri_for_display()]
f536a3b3d5a07da5e3600d24ae1bb1ebfa1cbd71 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/f536a3b3d5a07da5e3600d24ae1bb1ebfa1cbd71/rabbitvcs-plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5457, 67, 4481, 12, 2890, 4672, 327, 306, 2890, 6315, 5668, 18, 588, 67, 3535, 67, 5457, 7675, 588, 67, 1650, 67, 1884, 67, 5417, 1435, 65, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 5457, 67, 4481, 12, 2890, 4672, 327, 306, 2890, 6315, 5668, 18, 588, 67, 3535, 67, 5457, 7675, 588, 67, 1650, 67, 1884, 67, 5417, 1435, 65, 2, -100, -100, -100, -100, -...
if type( what ) is int: what = [ what ] if isinstance(what, list) or isinstance( what, N.ndarray):
if type( what[0] ) is int:
def removeRes( self, what ): """ Remove all atoms with a certain residue name.
7d47e30684f06ede1e30ead0e51c6b3c359090a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/482/7d47e30684f06ede1e30ead0e51c6b3c359090a5/PDBModel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 607, 12, 365, 16, 4121, 262, 30, 3536, 3581, 777, 9006, 598, 279, 8626, 14765, 508, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 607, 12, 365, 16, 4121, 262, 30, 3536, 3581, 777, 9006, 598, 279, 8626, 14765, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
_UprevCleanup(buildroot)
def main(): # Parse options usage = "usage: %prog [options] cbuildbot_config" parser = optparse.OptionParser(usage=usage) parser.add_option('-r', '--buildroot', help='root directory where build occurs', default=".") parser.add_option('-n', '--buildnumber', help='build number', type='int', default=0) parser.add_option('-f', '--revisionfile', help='file where new revisions are stored') parser.add_option('--clobber', action='store_true', dest='clobber', default=False, help='Clobbers an old checkout before syncing') parser.add_option('--debug', action='store_true', dest='debug', default=False, help='Override some options to run as a developer.') (options, args) = parser.parse_args() buildroot = options.buildroot revisionfile = options.revisionfile # Passed option to clobber. if options.clobber: RunCommand(['sudo', 'rm', '-rf', buildroot]) if len(args) >= 1: buildconfig = _GetConfig(args[-1]) else: Warning('Missing configuration description') parser.print_usage() sys.exit(1) try: if not os.path.isdir(buildroot): _FullCheckout(buildroot) else: _PreFlightRinse(buildroot) _IncrementalCheckout(buildroot) chroot_path = os.path.join(buildroot, 'chroot') if not os.path.isdir(chroot_path): _MakeChroot(buildroot) boardpath = os.path.join(chroot_path, 'build', buildconfig['board']) if not os.path.isdir(boardpath): _SetupBoard(buildroot, board=buildconfig['board']) if buildconfig['uprev']: _UprevPackages(buildroot, revisionfile, board=buildconfig['board']) _EnableLocalAccount(buildroot) _Build(buildroot) if buildconfig['unittests']: _RunUnitTests(buildroot) _BuildImage(buildroot) if buildconfig['smoke_bvt']: _BuildVMImageForTesting(buildroot) _RunSmokeSuite(buildroot) if buildconfig['uprev']: # Don't push changes for developers. if not options.debug: if buildconfig['master']: # Master bot needs to check if the other slaves completed. if cbuildbot_comm.HaveSlavesCompleted(config): _UprevPush(buildroot) else: # At least one of the slaves failed or we timed out. _UprevCleanup(buildroot) Die('CBUILDBOT - One of the slaves has failed!!!') else: # Publish my status to the master if its expecting it. if buildconfig['important']: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_COMPLETE) _UprevCleanup(buildroot) except: # Send failure to master bot. if not buildconfig['master'] and buildconfig['important']: cbuildbot_comm.PublishStatus(cbuildbot_comm.STATUS_BUILD_FAILED) raise
dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/dcd1de0bb91b646aa544b1aa28d4e4d67c3d9981/cbuildbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 2884, 702, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 2875, 680, 4819, 67, 1425, 6, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 2884, 702, 4084, 273, 315, 9167, 30, 738, 14654, 306, 2116, 65, 2875, 680, 4819, 67, 1425, 6, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 9167, 33, 9167, 13, 2082, 18,...
if 'purge' in node.attributes.get('purge', '') == 'true':
if node.attributes.get('purge', '') == 'true':
def _initResources(self, node): """ Initialize the registered resources based on the contents of the provided DOM node. """ registry = getToolByName(self.context, self.registry_id) reg_method = getattr(registry, self.register_method) unreg_method = getattr(registry, self.unregister_method) update_method = getattr(registry, self.update_method) if 'purge' in node.attributes.get('purge', '') == 'true': registry.clearResources() for child in node.childNodes: if child.nodeName != self.resource_type: continue
caf175f7d276dd4deb3f267b3af8170f1ca8715d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12274/caf175f7d276dd4deb3f267b3af8170f1ca8715d/resourceregistry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 3805, 12, 2890, 16, 756, 4672, 3536, 9190, 326, 4104, 2703, 2511, 603, 326, 2939, 434, 326, 2112, 4703, 756, 18, 3536, 4023, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2738, 3805, 12, 2890, 16, 756, 4672, 3536, 9190, 326, 4104, 2703, 2511, 603, 326, 2939, 434, 326, 2112, 4703, 756, 18, 3536, 4023, 273, 336, 6364, 5911, 12, 2890, 18, 2472, 16, 36...
self._ztable.update_database_schema(uindex, utype)
self._ztable.update_database_schema(uindex, utype, call)
def __init__(self,id,title=None): self.id=id self.title=title self._ztable=ZTablesCore.ZTable(id)
aeb8c0bccf2be057cdc2225d7e6d966e5868f97f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/aeb8c0bccf2be057cdc2225d7e6d966e5868f97f/Catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 350, 16, 2649, 33, 7036, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 365, 6315, 94, 2121, 33, 62, 6905, 4670, 18, 62, 1388, 12, 350, 13, 2,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 350, 16, 2649, 33, 7036, 4672, 365, 18, 350, 33, 350, 365, 18, 2649, 33, 2649, 365, 6315, 94, 2121, 33, 62, 6905, 4670, 18, 62, 1388, 12, 350, 13, 2,...
cname = name + '.jpg'
cname = sanitize_file_name(name) + '.jpg'
def export_to_dir(self, dir, indices, byauthor=False, single_dir=False, index_is_id=False): if not os.path.exists(dir): raise IOError('Target directory does not exist: '+dir) by_author = {} for index in indices: id = index if index_is_id else self.id(index) au = self.conn.execute('SELECT author_sort FROM books WHERE id=?', (id,)).fetchone()[0] if not au: au = self.authors(index, index_is_id=index_is_id) if not au: au = 'Unknown' au = au.split(',')[0] else: au = au.replace(',', ';') if not by_author.has_key(au): by_author[au] = [] by_author[au].append(index) for au in by_author.keys(): apath = os.path.join(dir, sanitize_file_name(au)) if not single_dir and not os.path.exists(apath): os.mkdir(apath) for idx in by_author[au]: title = re.sub(r'\s', ' ', self.title(idx, index_is_id=index_is_id)) tpath = os.path.join(apath, sanitize_file_name(title)) id = idx if index_is_id else self.id(idx) id = str(id) if not single_dir and not os.path.exists(tpath): os.mkdir(tpath) name = au + ' - ' + title if byauthor else title + ' - ' + au name += '_'+id base = dir if single_dir else tpath mi = OPFCreator(base, self.get_metadata(idx, index_is_id=index_is_id)) cover = self.cover(idx, index_is_id=index_is_id) if cover is not None: cname = name + '.jpg' cpath = os.path.join(base, cname) open(cpath, 'wb').write(cover) mi.cover = cname f = open(os.path.join(base, sanitize_file_name(name)+'.opf'), 'wb') mi.render(f) f.close() for fmt in self.formats(idx, index_is_id=index_is_id).split(','): data = self.format(idx, fmt, index_is_id=index_is_id) fname = name +'.'+fmt.lower() fname = sanitize_file_name(fname) f = open(os.path.join(base, fname), 'w+b') f.write(data) f.flush() f.seek(0) try: set_metadata(f, mi, fmt.lower()) except: print 'Error setting metadata for book:', mi.title traceback.print_exc() f.close()
589fa1ef13879c975ed6048d4e5e27dc8a77d3fc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/589fa1ef13879c975ed6048d4e5e27dc8a77d3fc/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 869, 67, 1214, 12, 2890, 16, 1577, 16, 4295, 16, 635, 4161, 33, 8381, 16, 2202, 67, 1214, 33, 8381, 16, 770, 67, 291, 67, 350, 33, 8381, 4672, 309, 486, 1140, 18, 803, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 869, 67, 1214, 12, 2890, 16, 1577, 16, 4295, 16, 635, 4161, 33, 8381, 16, 2202, 67, 1214, 33, 8381, 16, 770, 67, 291, 67, 350, 33, 8381, 4672, 309, 486, 1140, 18, 803, 18...
NotificationCenter().add_observer(self, 'SCSessionDidStart')
NotificationCenter().add_observer(self, 'SCSessionDidStart', sender=self._obj)
def __init__(self, *args, **kwargs): GreenSession.__init__(self, *args, **kwargs) self._obj._green = self self.history_file = None NotificationCenter().add_observer(self, 'SCSessionDidStart')
84c90dcccd319a13ea0d486c54c58cc0f771612e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/84c90dcccd319a13ea0d486c54c58cc0f771612e/sip_im_session2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 17766, 2157, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 13, 365, 6315, 2603, 6315, 11571, 273, 365, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 17766, 2157, 16186, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 13, 365, 6315, 2603, 6315, 11571, 273, 365, 365, ...
coinc_tables = CoincTables(xmldoc)
coinc_tables = CoincTables(xmldoc, vetoes = veto_segments)
def ligolw_rinca( xmldoc, process_id, EventListType, CoincTables, coinc_definer_row, event_comparefunc, thresholds, ntuple_comparefunc = lambda events: False, small_coincs = False, verbose = False
0fce8d6bacb5607dfdb98e99d811425ef668c866 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/0fce8d6bacb5607dfdb98e99d811425ef668c866/ligolw_rinca.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16917, 355, 91, 67, 86, 267, 5353, 12, 2025, 2434, 16, 1207, 67, 350, 16, 2587, 19366, 16, 28932, 71, 6905, 16, 13170, 71, 67, 5649, 264, 67, 492, 16, 871, 67, 9877, 644, 16, 19983, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16917, 355, 91, 67, 86, 267, 5353, 12, 2025, 2434, 16, 1207, 67, 350, 16, 2587, 19366, 16, 28932, 71, 6905, 16, 13170, 71, 67, 5649, 264, 67, 492, 16, 871, 67, 9877, 644, 16, 19983, ...
return _get_element(self, 'descendant::text:reference-mark-end', text_name=name)
return _get_element(self, 'descendant::text:reference-mark-end', text_name=name)
def get_reference_mark_end_by_name(self, name): return _get_element(self, 'descendant::text:reference-mark-end', text_name=name)
ce277637ece39c490aa0e17baab70b714a014dd4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10612/ce277637ece39c490aa0e17baab70b714a014dd4/element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6180, 67, 3355, 67, 409, 67, 1637, 67, 529, 12, 2890, 16, 508, 4672, 327, 389, 588, 67, 2956, 12, 2890, 16, 296, 26236, 970, 2866, 955, 30, 6180, 17, 3355, 17, 409, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6180, 67, 3355, 67, 409, 67, 1637, 67, 529, 12, 2890, 16, 508, 4672, 327, 389, 588, 67, 2956, 12, 2890, 16, 296, 26236, 970, 2866, 955, 30, 6180, 17, 3355, 17, 409, 2187, ...
expression = re.compile(r"\nBUG=(\d+)", re.IGNORECASE) issue.description = expression.sub("\nBUG=<a href='http://code.google.com/p/chromium/issues/detail?id=\g<1>'>\g<1></a>", issue.description)
expression = re.compile(r"(?<=BUG=)(\s*\d+\s*(?:,\s*\d+\s*)*)", re.IGNORECASE) issue.description = re.sub(expression, replace_bug, issue.description)
def show(request, form=None): """/<issue> - Show an issue.""" issue, patchsets, response = _get_patchset_info(request, None) if response: return response if not form: form = AddForm(initial={'reviewers': ', '.join(issue.reviewers)}) last_patchset = first_patch = None if patchsets: last_patchset = patchsets[-1] if last_patchset.patches: first_patch = last_patchset.patches[0] messages = [] has_draft_message = False for msg in issue.message_set.order('date'): if not msg.draft: messages.append(msg) elif msg.draft and request.user and msg.sender == request.user.email(): has_draft_message = True num_patchsets = len(patchsets) issue.description = cgi.escape(issue.description) issue.description = urlize(issue.description) expression = re.compile(r"\nBUG=(\d+)", re.IGNORECASE) issue.description = expression.sub("\nBUG=<a href='http://code.google.com/p/chromium/issues/detail?id=\g<1>'>\g<1></a>", issue.description) issue.description = issue.description.replace('\n', '<br/>') return respond(request, 'issue.html', {'issue': issue, 'patchsets': patchsets, 'messages': messages, 'form': form, 'last_patchset': last_patchset, 'num_patchsets': num_patchsets, 'first_patch': first_patch, 'has_draft_message': has_draft_message, })
57a8f6e1b9452e72a66569e3b58712edd819c7bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/476/57a8f6e1b9452e72a66569e3b58712edd819c7bf/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2293, 16, 646, 33, 7036, 4672, 3536, 28177, 13882, 34, 300, 9674, 392, 5672, 12123, 5672, 16, 4729, 4424, 16, 766, 273, 389, 588, 67, 2272, 542, 67, 1376, 12, 2293, 16, 599, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2293, 16, 646, 33, 7036, 4672, 3536, 28177, 13882, 34, 300, 9674, 392, 5672, 12123, 5672, 16, 4729, 4424, 16, 766, 273, 389, 588, 67, 2272, 542, 67, 1376, 12, 2293, 16, 599, ...
mo = HTTPBasicAuthHandler.rx.match(authreq)
mo = AbstractBasicAuthHandler.rx.match(authreq)
def http_error_401(self, req, fp, code, msg, headers): # XXX could be mult. headers authreq = headers.get('www-authenticate', None) if authreq: mo = HTTPBasicAuthHandler.rx.match(authreq) if mo: scheme, realm = mo.groups() if scheme.lower() == 'basic': return self.retry_http_basic_auth(req, realm)
8a18e99008c28156a7ba701ca8d6824a50fb0a9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8a18e99008c28156a7ba701ca8d6824a50fb0a9e/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 27002, 12, 2890, 16, 1111, 16, 4253, 16, 981, 16, 1234, 16, 1607, 4672, 468, 11329, 3377, 506, 1778, 18, 1607, 1357, 3658, 273, 1607, 18, 588, 2668, 5591, 17, 22035...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1062, 67, 1636, 67, 27002, 12, 2890, 16, 1111, 16, 4253, 16, 981, 16, 1234, 16, 1607, 4672, 468, 11329, 3377, 506, 1778, 18, 1607, 1357, 3658, 273, 1607, 18, 588, 2668, 5591, 17, 22035...
buttons = PerspectiveButtonControlls(controls).widget
buttons = PerspectiveButtonControlls(controls) buttons.show_all()
def __init__(self, controls): FControl.__init__(self, controls) vbox = gtk.VBox(False, 0) #scan = DirectoryScanner("/home/ivan/Music") self.controls.tree.clear() for path in ["/mnt/1tb_2/music", "/home/ivan/Музыка", "/home/ivan/Music"]: scan = DirectoryScanner(path) all = scan.get_music_results() self.controls.tree.append_from_scanner(all)
7572f81a33c957c39c1b35ab8adb2efc86d4892a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/7572f81a33c957c39c1b35ab8adb2efc86d4892a/left.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11022, 4672, 478, 3367, 16186, 2738, 972, 12, 2890, 16, 11022, 13, 331, 2147, 273, 22718, 18, 58, 3514, 12, 8381, 16, 374, 13, 225, 468, 9871, 273, 8930,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11022, 4672, 478, 3367, 16186, 2738, 972, 12, 2890, 16, 11022, 13, 331, 2147, 273, 22718, 18, 58, 3514, 12, 8381, 16, 374, 13, 225, 468, 9871, 273, 8930,...
c = Arch.sqlmeta.columns if 'publiclist' not in c and 'primaryArch' not in c: Arch.publiclist = Arch.sqlmeta.addColumn(BoolCol(name='publiclist', default=True), changeSchema=True) Arch.primaryArch = Arch.sqlmeta.addColumn(BoolCol(name='primary_arch', default=False), changeSchema=True)
try: Arch.sqlmeta.delColumn('publiclist', changeSchema=False) c = Arch.sqlmeta.addColumn(BoolCol(name='publiclist', default=True), changeSchema=True) Arch.publiclist = c Arch.sqlmeta.delColumn('primaryArch', changeSchema=False) c = Arch.sqlmeta.addColumn(BoolCol(name='primaryArch', default=False), changeSchema=True) Arch.primaryArch = c
def update_schema_arch(): rc = False c = Arch.sqlmeta.columns if 'publiclist' not in c and 'primaryArch' not in c: Arch.publiclist = Arch.sqlmeta.addColumn(BoolCol(name='publiclist', default=True), changeSchema=True) Arch.primaryArch = Arch.sqlmeta.addColumn(BoolCol(name='primary_arch', default=False), changeSchema=True) rc = True return rc
93a6931793a2678c7565d12bda2dbccbf92e0724 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13031/93a6931793a2678c7565d12bda2dbccbf92e0724/update_1_2_10.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4821, 67, 991, 13332, 4519, 273, 1083, 775, 30, 16959, 18, 4669, 3901, 18, 3771, 1494, 2668, 482, 1098, 2187, 2549, 3078, 33, 8381, 13, 276, 273, 16959, 18, 4669, 3901, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4821, 67, 991, 13332, 4519, 273, 1083, 775, 30, 16959, 18, 4669, 3901, 18, 3771, 1494, 2668, 482, 1098, 2187, 2549, 3078, 33, 8381, 13, 276, 273, 16959, 18, 4669, 3901, 18, 1...
print("Not understood.")
wikipedia.output(u"Not understood.")
def asktoadd(pl): ctoshow = 500 print print("==%s==")%pl.title() while 1: answer = raw_input("y(es)/n(o)/i(gnore)/(o)ther options? ") if answer=='y': include(pl) break if answer=='c': include(pl,realinclude=False) break if answer=='z': if pl.exists(): if not pl.isRedirectPage(): linkterm = wikipedia.input(u"In what manner should it be alphabetized?") include(pl,linkterm=linkterm) break include(pl) break elif answer=='n': exclude(pl) break elif answer=='i': exclude(pl,real_exclude=False) break elif answer=='o': print("t: Give the beginning of the text of the page") print("z: Add under another title (as [[Category|Title]])") print("x: Add the page, but do not check links to and from it") print("c: Do not add the page, but do check links") print("a: Add another page") print("l: Give a list of the pages to check") elif answer=='a': pagetitle = raw_input("Specify page to add:") page=wikipedia.Page(wikipedia.getSite(),pagetitle) if not page in checked.keys(): include(page) elif answer=='x': if pl.exists(): if pl.isRedirectPage(): print("Redirect page. Will be included normally.") include(pl,realinclude=False) else: include(pl,checklinks=False) else: print("Page does not exist; not added.") exclude(pl,real_exclude=False) break elif answer=='l': print("Number of pages still to check: %s")%len(tocheck) print("Pages to be checked:") print tocheck print("==%s==")%pl.title() elif answer=='t': print("==%s==")%pl.title() try: wikipedia.output(pl.get(get_redirect=True)[0:ctoshow]) except wikipedia.NoPage: print "Page does not exist." ctoshow += 500 else: print("Not understood.")
43ce29dfe9b2db05801502d948ed17e57be4c813 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/43ce29dfe9b2db05801502d948ed17e57be4c813/makecat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 869, 1289, 12, 412, 4672, 5691, 538, 13606, 273, 6604, 1172, 1172, 2932, 631, 9, 87, 631, 7923, 9, 412, 18, 2649, 1435, 1323, 404, 30, 5803, 273, 1831, 67, 2630, 2932, 93, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 869, 1289, 12, 412, 4672, 5691, 538, 13606, 273, 6604, 1172, 1172, 2932, 631, 9, 87, 631, 7923, 9, 412, 18, 2649, 1435, 1323, 404, 30, 5803, 273, 1831, 67, 2630, 2932, 93, 12, ...
_BindParamClause(None, o, _compared_to_operator=operator, _compared_to_type=self.type, unique=True)
_BindParamClause(None, o, _compared_to_operator=operator, _compared_to_type=self.type, unique=True)
def _bind_param(self, operator, obj): return _Tuple(*[ _BindParamClause(None, o, _compared_to_operator=operator, _compared_to_type=self.type, unique=True) for o in obj ]).self_group()
0b93f88d2c199737f8d1202bb95240fed122b531 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/0b93f88d2c199737f8d1202bb95240fed122b531/expression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4376, 67, 891, 12, 2890, 16, 3726, 16, 1081, 4672, 327, 389, 9038, 12, 26625, 389, 3357, 786, 7044, 12, 7036, 16, 320, 16, 389, 9877, 72, 67, 869, 67, 9497, 33, 9497, 16, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4376, 67, 891, 12, 2890, 16, 3726, 16, 1081, 4672, 327, 389, 9038, 12, 26625, 389, 3357, 786, 7044, 12, 7036, 16, 320, 16, 389, 9877, 72, 67, 869, 67, 9497, 33, 9497, 16, 389, ...
permdata = {'owner':'root', 'group':'root', 'type':'file', 'perms':'644'}
permdata = {'owner': 'root', 'group': 'root', 'type': 'file', 'perms': '644'}
def get_cert(self, entry, metadata): """ either grabs a prexisting cert hostfile, or triggers the generation of a new cert if one doesn't exist. """ # set path type and permissions, otherwise bcfg2 won't bind the file permdata = {'owner':'root', 'group':'root', 'type':'file', 'perms':'644'} [entry.attrib.__setitem__(key, permdata[key]) for key in permdata]
26d630dd735d76e947289ca1ff1ed69ca1e465b4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11867/26d630dd735d76e947289ca1ff1ed69ca1e465b4/SSLCA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7593, 12, 2890, 16, 1241, 16, 1982, 4672, 3536, 3344, 3087, 2038, 279, 675, 92, 376, 310, 3320, 1479, 768, 16, 578, 11752, 326, 9377, 434, 279, 394, 3320, 309, 1245, 3302, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 7593, 12, 2890, 16, 1241, 16, 1982, 4672, 3536, 3344, 3087, 2038, 279, 675, 92, 376, 310, 3320, 1479, 768, 16, 578, 11752, 326, 9377, 434, 279, 394, 3320, 309, 1245, 3302, 140...
(0, 0, 1)
(1, 0, 0)
def hom(self, im_gens, codomain=None, check=True): """ Homomorphism defined by giving the images of ``self.gens()`` in some fixed fg R-module. .. note :: We do not assume that the generators given by ``self.gens()`` are the same as the Smith form generators, since this may not be true for a general derived class. INPUTS:
ca52f77e0da09d77854b3404649ad54a9fb1523b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ca52f77e0da09d77854b3404649ad54a9fb1523b/fgp_module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13995, 12, 2890, 16, 709, 67, 23730, 16, 11012, 1530, 33, 7036, 16, 866, 33, 5510, 4672, 3536, 670, 362, 362, 7657, 6228, 2553, 635, 21057, 326, 4602, 434, 12176, 2890, 18, 23730, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13995, 12, 2890, 16, 709, 67, 23730, 16, 11012, 1530, 33, 7036, 16, 866, 33, 5510, 4672, 3536, 670, 362, 362, 7657, 6228, 2553, 635, 21057, 326, 4602, 434, 12176, 2890, 18, 23730, 1435, ...
except Exception, e: try: os.close(fd) except (OSError, IOError): pass
except (OSError, IOError), e: os.close(fd)
def check(self): log.debug('check drive status %s', self.device)
0a461f2bfd86539e99e8fa423ab1a0acf383cd1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11703/0a461f2bfd86539e99e8fa423ab1a0acf383cd1e/cdrom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 613, 18, 4148, 2668, 1893, 14316, 1267, 738, 87, 2187, 365, 18, 5964, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 613, 18, 4148, 2668, 1893, 14316, 1267, 738, 87, 2187, 365, 18, 5964, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
outgraph.label = self.request.getText("No data")
outgraph.label = encode(_("No data"))
def fixNodeUrls(self, outgraph): import re _ = self.request.getText # Make a different url for start nodes for nodename in self.startpages: node = outgraph.nodes.get(nodename) if node: node.URL = './\N' if not node.label: node.label = url_unquote(nodename)
575a055c361df8c98a4454bfe1bb4f27070b2593 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/888/575a055c361df8c98a4454bfe1bb4f27070b2593/ShowGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 907, 10509, 12, 2890, 16, 596, 4660, 4672, 1930, 283, 389, 273, 365, 18, 2293, 18, 588, 1528, 225, 468, 4344, 279, 3775, 880, 364, 787, 2199, 364, 14003, 1069, 316, 365, 18, 1937...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 907, 10509, 12, 2890, 16, 596, 4660, 4672, 1930, 283, 389, 273, 365, 18, 2293, 18, 588, 1528, 225, 468, 4344, 279, 3775, 880, 364, 787, 2199, 364, 14003, 1069, 316, 365, 18, 1937...
for user in self.getFlashUsers():
for user in self._getFlashUsers():
def exportFlashUsers(self, REQUEST=None, RESPONSE=None): """ """ data = [('Username', 'Firstname', 'Lastname', 'Email', 'Instant notification', 'Language')] data_app = data.append for user in self.getFlashUsers(): data_app((user[0], self.utToUtf8(user[1]), self.utToUtf8(user[2]), user[3], user[4], self.gl_get_language_name(user[5]))) tmp_name = tmpfile(data) content = open(str(tmp_name)).read() RESPONSE.setHeader('Content-Type', 'text/csv') RESPONSE.setHeader('Content-Disposition', 'attachment; filename=%s' % 'flashusers.csv') return content
f4a8bb1f53bdf1e472d14e62a2a6241db11a1c59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/f4a8bb1f53bdf1e472d14e62a2a6241db11a1c59/FlashTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 11353, 6588, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 3536, 501, 273, 306, 2668, 8575, 2187, 296, 3759, 529, 2187, 296, 3024, 529, 2187, 296, 4134, 2187, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 11353, 6588, 12, 2890, 16, 12492, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 3536, 501, 273, 306, 2668, 8575, 2187, 296, 3759, 529, 2187, 296, 3024, 529, 2187, 296, 4134, 2187, 296...
'name' : "Synchronization report.", 'act_from' : data['form']['user_id'],
'name' : "Synchronization report", 'act_from' : uid,
def _upload_download(self, db_name, uid, data, context): cr = pooler.get_db(db_name).cursor() start_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss') pool = pooler.get_pool(cr.dbname) server = pool.get('base.synchro.server').browse(cr, uid, data['form']['server_url'], context) for object in server.obj_ids: dt = time.strftime('%Y-%m-%d %H:%M:%S') self._synchronize(cr, uid, server, object, context) if object.action=='b': dt = time.strftime('%Y-%m-%d %H:%M:%S') pool.get('base.synchro.obj').write(cr, uid, [object.id], {'synchronize_date': dt}) cr.commit() end_date = time.strftime('%Y-%m-%d, %Hh %Mm %Ss') if 'user_id' in data['form'] and data['form']['user_id']: request = pooler.get_pool(cr.dbname).get('res.request') summary = '''Here is the Synchronization report. Synchronization Started; %s Synchronization Finnished; %s
64d0db9da783285f2b012b0836251a1b371ddcda /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/64d0db9da783285f2b012b0836251a1b371ddcda/base_synchro.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6327, 67, 7813, 12, 2890, 16, 1319, 67, 529, 16, 4555, 16, 501, 16, 819, 4672, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 67, 529, 2934, 9216, 1435, 787, 67, 712, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6327, 67, 7813, 12, 2890, 16, 1319, 67, 529, 16, 4555, 16, 501, 16, 819, 4672, 4422, 273, 2845, 264, 18, 588, 67, 1966, 12, 1966, 67, 529, 2934, 9216, 1435, 787, 67, 712, 273, ...
if stat.S_ISREG(st[0]):
if stat.S_ISREG(st[0]) or stat.S_ISLNK(st[0]):
def created(self, wpath): if wpath == '.hgignore': self.update_hgignore() try: st = self.stat(wpath) if stat.S_ISREG(st[0]): self.updatefile(wpath, st) except OSError: pass
66e3c7405e24938ef4d1855c82028148f94067db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/66e3c7405e24938ef4d1855c82028148f94067db/linuxserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2522, 12, 2890, 16, 341, 803, 4672, 309, 341, 803, 422, 2418, 26981, 6185, 4278, 365, 18, 2725, 67, 26981, 6185, 1435, 775, 30, 384, 273, 365, 18, 5642, 12, 91, 803, 13, 309, 610, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2522, 12, 2890, 16, 341, 803, 4672, 309, 341, 803, 422, 2418, 26981, 6185, 4278, 365, 18, 2725, 67, 26981, 6185, 1435, 775, 30, 384, 273, 365, 18, 5642, 12, 91, 803, 13, 309, 610, 18...
domain = event.object.component if isinstance(domain, TranslationDomain): domain.domain = event.object.name def unsetDomainOnDeactivation(event):
domain.domain = event.object.name def unsetDomainOnDeactivation(domain, event):
... def __init__(self, obj, name):
9173b17d4bf4a8fba189d9dcb27ae914da26d89f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9528/9173b17d4bf4a8fba189d9dcb27ae914da26d89f/translationdomain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 16, 508, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 2738, 972, 12, 2890, 16, 1081, 16, 508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...