rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
print ' %s %s\n => %s %s' % (cmd, args, typ, dat)
_mesg(' %s %s\n => %s %s' % (cmd, args, typ, dat))
def run(cmd, args): typ, dat = apply(eval('M.%s' % cmd), args) print ' %s %s\n => %s %s' % (cmd, args, typ, dat) return dat
3ed0d45ba04fb3ad067d8cb3774d68c8d62b8723 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/3ed0d45ba04fb3ad067d8cb3774d68c8d62b8723/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4172, 16, 833, 4672, 3815, 16, 1150, 273, 2230, 12, 8622, 2668, 49, 7866, 87, 11, 738, 1797, 3631, 833, 13, 389, 26244, 75, 2668, 738, 87, 738, 87, 64, 82, 225, 516, 738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4172, 16, 833, 4672, 3815, 16, 1150, 273, 2230, 12, 8622, 2668, 49, 7866, 87, 11, 738, 1797, 3631, 833, 13, 389, 26244, 75, 2668, 738, 87, 738, 87, 64, 82, 225, 516, 738, ...
if verbose: print 'unpack sequence' a, b, c = Seq() if a != 0 or b != 1 or c != 2: raise TestFailed
>>> a, b, c = 'one' >>> a == 'o' and b == 'n' and c == 'e' True
def __getitem__(self, i): if i >= 0 and i < 3: return i raise IndexError
4f813074150348704b07b2ebfc7dc357e888a6aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4f813074150348704b07b2ebfc7dc357e888a6aa/test_unpack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 309, 277, 1545, 374, 471, 277, 411, 890, 30, 327, 277, 1002, 10195, 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, 1001, 31571, 972, 12, 2890, 16, 277, 4672, 309, 277, 1545, 374, 471, 277, 411, 890, 30, 327, 277, 1002, 10195, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(theano.tensor.pow(fx*fy+fz,fx*fy),(fx,fy,fz),(fxv,fyv,fzv),2,numpy.power(fxv*fyv+fzv,fxv*fyv),'float32'),
(theano.tensor.pow(fx*fy+fz,fx*fy),(fx,fy,fz),(fxv,fyv,fzv),1,numpy.power(fxv*fyv+fzv,fxv*fyv),'float32'),
def my_init(shp, dtype='float64', num=0): #ret = theano._asarray(numpy.random.rand(*shp),dtype=dtype) ret = numpy.zeros(shp, dtype=dtype)+num return ret
499b3da6cc300cf4d6d62fc557923cf6b25eeb3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/499b3da6cc300cf4d6d62fc557923cf6b25eeb3f/test_opt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 67, 2738, 12, 674, 84, 16, 3182, 2218, 5659, 1105, 2187, 818, 33, 20, 4672, 468, 1349, 273, 326, 31922, 6315, 345, 1126, 12, 15974, 18, 9188, 18, 7884, 30857, 674, 84, 3631, 8972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3399, 67, 2738, 12, 674, 84, 16, 3182, 2218, 5659, 1105, 2187, 818, 33, 20, 4672, 468, 1349, 273, 326, 31922, 6315, 345, 1126, 12, 15974, 18, 9188, 18, 7884, 30857, 674, 84, 3631, 8972...
self.maxJobsPerChannel = self.am_getOption('MaxJobsPerChannel',2)
self.maxJobsPerChannel = self.am_getOption( 'MaxJobsPerChannel', 2 )
def initialize(self):
75a149be6b3b3e1970a5e02d5a7dfaf10cbe2b74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/75a149be6b3b3e1970a5e02d5a7dfaf10cbe2b74/FTSSubmitAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 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, 4046, 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, -...
display_type=self.display_type, random=True,
type=self.display_type, random=True,
def random_play(self): """ play the playlist in random order """ Playlist(playlist=self.playlist, parent=self.parent, display_type=self.display_type, random=True, repeat=self.repeat).play()
4f386d04e392b956916454ca64a656dc1d7bedd2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4f386d04e392b956916454ca64a656dc1d7bedd2/playlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 1601, 12, 2890, 4672, 3536, 6599, 326, 16428, 316, 2744, 1353, 3536, 19592, 1098, 12, 1601, 1098, 33, 2890, 18, 1601, 1098, 16, 982, 33, 2890, 18, 2938, 16, 618, 33, 2890, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 1601, 12, 2890, 4672, 3536, 6599, 326, 16428, 316, 2744, 1353, 3536, 19592, 1098, 12, 1601, 1098, 33, 2890, 18, 1601, 1098, 16, 982, 33, 2890, 18, 2938, 16, 618, 33, 2890, 18...
no_of_valid_deletions = param_obj.no_of_valid_deletions no_of_deletions = param_obj.no_of_deletions no_of_non_valid_deletions = no_of_deletions-no_of_valid_deletions false_positive_rate = no_of_non_valid_deletions/float(no_of_deletions) sys.stderr.write("False positive rate: %s/%s(%s).\n"%\ (no_of_non_valid_deletions, no_of_deletions, false_positive_rate))
for array_id, qc_data in param_obj.array_id2qc_data.iteritems(): no_of_valid_deletions = qc_data.no_of_valid_deletions no_of_deletions = qc_data.no_of_deletions no_of_non_valid_deletions = no_of_deletions-no_of_valid_deletions false_positive_rate = no_of_non_valid_deletions/float(no_of_deletions) sys.stderr.write("Array %s false positive rate: %s/%s(%s).\n"%(array_id, \ no_of_non_valid_deletions, no_of_deletions, false_positive_rate)) if getattr(param_obj, 'array_id2no_of_probes2qc_data', None): no_of_probes2qc_data = param_obj.array_id2no_of_probes2qc_data[array_id] no_of_probes_ls = no_of_probes2qc_data.keys() no_of_probes_ls.sort() for no_of_probes in no_of_probes_ls: qc_data = no_of_probes2qc_data[no_of_probes] no_of_valid_deletions = qc_data.no_of_valid_deletions no_of_deletions = qc_data.no_of_deletions no_of_non_valid_deletions = no_of_deletions-no_of_valid_deletions false_positive_rate = no_of_non_valid_deletions/float(no_of_deletions) sys.stderr.write("\t%s\t%s\t%s\t%s\n"%(no_of_probes, \ no_of_non_valid_deletions, no_of_deletions, false_positive_rate))
def outputFalsePositiveRate(cls, param_obj): """ 2009-11-4 """ no_of_valid_deletions = param_obj.no_of_valid_deletions no_of_deletions = param_obj.no_of_deletions no_of_non_valid_deletions = no_of_deletions-no_of_valid_deletions false_positive_rate = no_of_non_valid_deletions/float(no_of_deletions) sys.stderr.write("False positive rate: %s/%s(%s).\n"%\ (no_of_non_valid_deletions, no_of_deletions, false_positive_rate))
1440ce5092ec2e1bfdd9b1e187e40f109bf0000b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9645/1440ce5092ec2e1bfdd9b1e187e40f109bf0000b/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 8381, 14900, 4727, 12, 6429, 16, 579, 67, 2603, 4672, 3536, 4044, 29, 17, 2499, 17, 24, 3536, 364, 526, 67, 350, 16, 29032, 67, 892, 316, 579, 67, 2603, 18, 1126, 67, 350, 22, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 876, 8381, 14900, 4727, 12, 6429, 16, 579, 67, 2603, 4672, 3536, 4044, 29, 17, 2499, 17, 24, 3536, 364, 526, 67, 350, 16, 29032, 67, 892, 316, 579, 67, 2603, 18, 1126, 67, 350, 22, ...
_putFragLine(tx, line)
_putFragLine(offset, tx, line)
def _justifyDrawParaLineX( tx, offset, line, last=0): setXPos(tx,offset) extraSpace = line.extraSpace nSpaces = line.wordCount - 1 if last or not nSpaces or abs(extraSpace)<=1e-8 or line.lineBreak: _putFragLine(tx, line) #no space modification else: tx.setWordSpace(extraSpace / float(nSpaces)) _putFragLine(tx, line) tx.setWordSpace(0) setXPos(tx,-offset) return offset
ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7053/ae97b90f6a178f0d7566cbd8acc91dc0dd0700c1/paragraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3732, 1164, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 23733, 1616, 12, 978, 16, 3348, 13, 2870, 3819, 273, 980, 18, 7763, 3819, 290, 12077, 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, 3732, 1164, 6493, 23529, 1670, 60, 12, 2229, 16, 1384, 16, 980, 16, 1142, 33, 20, 4672, 23733, 1616, 12, 978, 16, 3348, 13, 2870, 3819, 273, 980, 18, 7763, 3819, 290, 12077, 273, ...
set sms
set sms
def send_help_message(self, to): msg = """Hi, I am %s. You can try talking directly with me.
b0a0ee420c18e518e9e31fb2fbfb98cfd051a503 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11180/b0a0ee420c18e518e9e31fb2fbfb98cfd051a503/iemchatbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 5201, 67, 2150, 12, 2890, 16, 358, 4672, 1234, 273, 3536, 25009, 16, 467, 2125, 738, 87, 18, 225, 4554, 848, 775, 26591, 310, 5122, 598, 1791, 18, 2, 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, 1366, 67, 5201, 67, 2150, 12, 2890, 16, 358, 4672, 1234, 273, 3536, 25009, 16, 467, 2125, 738, 87, 18, 225, 4554, 848, 775, 26591, 310, 5122, 598, 1791, 18, 2, -100, -100, -100, -100, ...
search_pattern=[], xml_record=None, user_info=None):
search_pattern=None, xml_record=None, user_info=None):
def format_record(recID, of, ln=CFG_SITE_LANG, verbose=0, search_pattern=[], xml_record=None, user_info=None): """ Formats a record given output format. Main entry function of bibformat engine. Returns a formatted version of the record in the specified language, search pattern, and with the specified output format. The function will define which format template must be applied. You can either specify an record ID to format, or give its xml representation. if 'xml_record' is not None, then use it instead of recID. 'user_info' allows to grant access to some functionalities on a page depending on the user's priviledges. 'user_info' is the same object as the one returned by 'webuser.collect_user_info(req)' @param recID the ID of record to format @param of an output format code (or short identifier for the output format) @param ln the language to use to format the record @param verbose the level of verbosity from 0 to 9 (O: silent, 5: errors, 7: errors and warnings, stop if error in format elements 9: errors and warnings, stop if error (debug mode )) @param search_pattern list of strings representing the user request in web interface @param xml_record an xml string representing the record to format @param user_info the information of the user who will view the formatted page @return formatted record """ out = "" errors_ = [] # Temporary workflow (during migration of formats): # Call new BibFormat # But if format not found for new BibFormat, then call old BibFormat #Create a BibFormat Object to pass that contain record and context bfo = BibFormatObject(recID, ln, search_pattern, xml_record, user_info, of) if of.lower() != 'xm' and len(bfo.get_record()) <= 1: # Record only has recid: do not format, excepted # for xm format return "" #Find out which format template to use based on record and output format. template = decide_format_template(bfo, of) if verbose == 9 and template is not None: out += """\n<br/><span class="quicknote"> Using %s template for record %i. </span>""" % (template, recID) ############### FIXME: REMOVE WHEN MIGRATION IS DONE ############### path = "%s%s%s" % (CFG_BIBFORMAT_TEMPLATES_PATH, os.sep, template) if template is None or not os.access(path, os.R_OK): # template not found in new BibFormat. Call old one if verbose == 9: if template is None: out += """\n<br/><span class="quicknote"> No template found for output format %s and record %i. (Check invenio.err log file for more details) </span>""" % (of, recID) else: out += """\n<br/><span class="quicknote"> Template %s could not be read. </span>""" % (template) if CFG_PATH_PHP: if verbose == 9: out += """\n<br/><span class="quicknote"> Using old BibFormat for record %s. </span>""" % recID return out + call_old_bibformat(recID, format=of, on_the_fly=True, verbose=verbose) ############################# END ################################## error = get_msgs_for_code_list([("ERR_BIBFORMAT_NO_TEMPLATE_FOUND", of)], stream='error', ln=CFG_SITE_LANG) errors_.append(error) if verbose == 0: register_errors(error, 'error') elif verbose > 5: return out + error[0][1] return out # Format with template (out_, errors) = format_with_format_template(template, bfo, verbose) errors_.extend(errors) out += out_ return out
31abd19a3d0346e5cfc692d7491edcf4fba17417 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2763/31abd19a3d0346e5cfc692d7491edcf4fba17417/bibformat_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 3366, 12, 3927, 734, 16, 434, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 3988, 33, 20, 16, 1623, 67, 4951, 33, 7036, 16, 2025, 67, 3366, 33, 7036, 16, 729, 67, 1376, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 740, 67, 3366, 12, 3927, 734, 16, 434, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 16, 3988, 33, 20, 16, 1623, 67, 4951, 33, 7036, 16, 2025, 67, 3366, 33, 7036, 16, 729, 67, 1376, 3...
i = k
i = i + len(newstuff)
def convert_url(document): 'Convert url insets to url charstyles' if document.backend == "docbook": return i = 0 while True: i = find_token(document.body, "\\begin_inset CommandInset url", i) if i == -1: break n = find_token(document.body, "name", i) if n == i + 2: # place the URL name in typewriter before the new URL insert # grab the name 'bla' from the e.g. the line 'name "bla"', # therefore start with the 6th character name = document.body[n][6:-1] newname = [name + " "] document.body[i:i] = newname i = i + 1 j = find_token(document.body, "target", i) if j == -1: document.warning("Malformed LyX document: Can't find target for url inset") i = j continue target = document.body[j][8:-1] k = find_token(document.body, "\\end_inset", j) if k == -1: document.warning("Malformed LyX document: Can't find end of url inset") i = k continue newstuff = ["\\begin_inset Flex URL", "status collapsed", "", "\\begin_layout Standard", "", target, "\\end_layout", ""] document.body[i:k] = newstuff i = k
3a8121ddee60ee6360ffa91efd7e91f26829f616 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7514/3a8121ddee60ee6360ffa91efd7e91f26829f616/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 718, 12, 5457, 4672, 296, 2723, 880, 23576, 358, 880, 1149, 10218, 11, 309, 1668, 18, 9993, 422, 315, 2434, 3618, 6877, 327, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 718, 12, 5457, 4672, 296, 2723, 880, 23576, 358, 880, 1149, 10218, 11, 309, 1668, 18, 9993, 422, 315, 2434, 3618, 6877, 327, 277, 273, 374, 1323, 1053, 30, 277, 273, 1104, 67...
s.insert(0, i[(w-y-len(buf)-1)/2:])
s.insert(0, i[rest/factor:])
def _wrap(text, width, indent, firstindent): if not text: return '' text = text.strip() s = [] pos = 0 for i in rx.finditer(text): if i.start() > pos: s.extend(text[pos:i.start()].split()) s.append(i.group()) pos = i.end() if pos < len(text): s.extend(text[pos:].split()) ss = [s[0]] #get first element character is asian char flag flag = unicodedata.east_asian_width(s[0][0]) != 'Na' for i in range(1, len(s)): f = unicodedata.east_asian_width(s[i][0]) != 'Na' if f and f == flag: ss[-1] = ss[-1] + s[i] else: ss.append(s[i]) flag = f s = ss t = [] y = 0 buf = [] x = 0 while s: i = s.pop(0) if unicodedata.east_asian_width(i[0]) != 'Na': factor = 2 else: factor = 1 if x == 0: w = width - len(firstindent) step = firstindent else: w = width - len(indent) step = indent length = y + len(i)*factor + len(buf) if length == w: buf.append(i) t.append(step + ' '.join(buf)) x = 1 buf = [] y = 0 elif length > w: if factor == 2 or (factor==1 and len(i) * factor >= w): buf.append(i[:(w-y-len(buf)-1)/factor]) t.append(step + ' '.join(buf)) x = 1 s.insert(0, i[(w-y-len(buf)-1)/2:]) buf = [] y = 0 continue else: t.append(step + ' '.join(buf)) x = 1 s.insert(0, i) buf = [] y = 0 continue else: buf.append(i) y += factor * len(i) if buf: t.append(step + ' '.join(buf)) return cr.join(t)
8bf42d52cd9dbef73540588b7c0c57ae17cd8821 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/686/8bf42d52cd9dbef73540588b7c0c57ae17cd8821/wraptext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 12, 955, 16, 1835, 16, 3504, 16, 1122, 9355, 4672, 309, 486, 977, 30, 327, 875, 977, 273, 977, 18, 6406, 1435, 272, 273, 5378, 949, 273, 374, 364, 277, 316, 8581, 18, 4720...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4113, 12, 955, 16, 1835, 16, 3504, 16, 1122, 9355, 4672, 309, 486, 977, 30, 327, 875, 977, 273, 977, 18, 6406, 1435, 272, 273, 5378, 949, 273, 374, 364, 277, 316, 8581, 18, 4720...
markup = [a.strip().lower() for a in args.markup.split(',')]
markup = [a.strip().lower() for a in args.markup.split(',')] if args.markup else None
def main(): parser = argparse.ArgumentParser(description="""A tool to generate a static blog, with restructured text input files.""") parser.add_argument(dest='path', help='Path where to find the content files') parser.add_argument('-t', '--theme-path', dest='theme', help='Path where to find the theme templates. If not specified, it will' 'use the default one included with pelican.') parser.add_argument('-o', '--output', dest='output', help='Where to output the generated files. If not specified, a directory' ' will be created, named "output" in the current path.') parser.add_argument('-m', '--markup', default='', dest='markup', help='the markup language to use (rst or md).') parser.add_argument('-s', '--settings', dest='settings', help='the settings of the application. Default to None.') parser.add_argument('-k', '--keep-output-directory', dest='keep', action='store_true', help='Keep the output directory and just update all the generated files.' 'Default is to delete the output directory.') args = parser.parse_args() markup = [a.strip().lower() for a in args.markup.split(',')] run_pelican(args.settings, args.path, args.theme, args.output, markup, args.keep)
75707282893a1d6e577302f3a8b8e3706c1c8aa4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14457/75707282893a1d6e577302f3a8b8e3706c1c8aa4/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 12436, 18, 1379, 2678, 12, 3384, 1546, 3660, 37, 5226, 358, 2103, 279, 760, 10700, 16, 598, 400, 8813, 2862, 977, 810, 1390, 12123, 13, 225, 2082, 18, 1289, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 12436, 18, 1379, 2678, 12, 3384, 1546, 3660, 37, 5226, 358, 2103, 279, 760, 10700, 16, 598, 400, 8813, 2862, 977, 810, 1390, 12123, 13, 225, 2082, 18, 1289, 67, ...
if not self.__olduser:
if not hasattr(self, "__olduser") or not self.__olduser:
def getOld(self): if not self.__olduser: self.__olduser = User() self.__olduser.__dict__ = self.__dict__ return self.__olduser
7f245e0e4e101fe30b5ff7d38ce6d1ebb1133f00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12041/7f245e0e4e101fe30b5ff7d38ce6d1ebb1133f00/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7617, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 10425, 1673, 1355, 7923, 578, 486, 365, 16186, 1673, 1355, 30, 365, 16186, 1673, 1355, 273, 2177, 1435, 365, 16186, 1673, 1355, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7617, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 10425, 1673, 1355, 7923, 578, 486, 365, 16186, 1673, 1355, 30, 365, 16186, 1673, 1355, 273, 2177, 1435, 365, 16186, 1673, 1355, 1...
raise exceptions.AlreadyExistsError("the new name you have choosen, %s, is already taken by another group !" % styles.stylize(styles.ST_NAME, new_name))
raise exceptions.AlreadyExistsError( '''the new name you have choosen, %s, is already taken by ''' '''another group !''' % \ styles.stylize(styles.ST_NAME, new_name))
def RenameGroup(self, profilelist, name, new_name): """ Modify the name of a group."""
2c25685af98e96114695a04efeb86385220aeb9c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/2c25685af98e96114695a04efeb86385220aeb9c/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19996, 1114, 12, 2890, 16, 450, 7540, 5449, 16, 508, 16, 394, 67, 529, 4672, 3536, 9518, 326, 508, 434, 279, 1041, 12123, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19996, 1114, 12, 2890, 16, 450, 7540, 5449, 16, 508, 16, 394, 67, 529, 4672, 3536, 9518, 326, 508, 434, 279, 1041, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
use_images = (1 or wxPlatform == '__WXMSW__')
def __init__(self, editor, filename=None, slave_mode=1): wxFrame.__init__(self, editor, -1, 'Debugger')
5670e50e1632ce1c246206653a7700bc0df89b49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/5670e50e1632ce1c246206653a7700bc0df89b49/Debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4858, 16, 1544, 33, 7036, 16, 11735, 67, 3188, 33, 21, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 4858, 16, 300, 21, 16, 296, 24113, 6134, 2, 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, 1, 1, 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, 4858, 16, 1544, 33, 7036, 16, 11735, 67, 3188, 33, 21, 4672, 7075, 3219, 16186, 2738, 972, 12, 2890, 16, 4858, 16, 300, 21, 16, 296, 24113, 6134, 2, -1...
"""Calculates the adverage anisotropy for all Atoms in the AtomList.
"""Calculates the average anisotropy for all Atoms in the AtomList.
def calc_adv_anisotropy(self): """Calculates the adverage anisotropy for all Atoms in the AtomList. """ num_atoms = 0 adv_aniso = 0.0
87204581d574348ad806746f22f5ca2156710a50 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10674/87204581d574348ad806746f22f5ca2156710a50/Structure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 28107, 67, 23952, 12, 2890, 4672, 3536, 10587, 326, 8164, 392, 21218, 364, 777, 7149, 87, 316, 326, 7149, 682, 18, 3536, 818, 67, 14937, 273, 374, 17825, 67, 304, 9699, 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, 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, 7029, 67, 28107, 67, 23952, 12, 2890, 4672, 3536, 10587, 326, 8164, 392, 21218, 364, 777, 7149, 87, 316, 326, 7149, 682, 18, 3536, 818, 67, 14937, 273, 374, 17825, 67, 304, 9699, 273, ...
if self.path_dict["length"] == 2: return True elif (self.path_dict["length"] == 1 and
if (self.path_dict["length"] == 1 and
def diff(self, data=None): if self.path_dict["length"] == 2: return True elif (self.path_dict["length"] == 1 and self.path_dict["is_in_a_or_a_working_copy"] and (self.path_dict["is_modified"] or self.path_dict["has_modified"])): return True return False
f08bc22e98a565e1518532a9fb386cde49ebf9fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5119/f08bc22e98a565e1518532a9fb386cde49ebf9fc/contextmenu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3122, 12, 2890, 16, 501, 33, 7036, 4672, 309, 261, 2890, 18, 803, 67, 1576, 9614, 2469, 11929, 422, 404, 471, 365, 18, 803, 67, 1576, 9614, 291, 67, 267, 67, 69, 67, 280, 67, 69, 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, 3122, 12, 2890, 16, 501, 33, 7036, 4672, 309, 261, 2890, 18, 803, 67, 1576, 9614, 2469, 11929, 422, 404, 471, 365, 18, 803, 67, 1576, 9614, 291, 67, 267, 67, 69, 67, 280, 67, 69, 6...
experiment_file = 'biolog-experiments.lisp'
experiment_file = 'data/biolog-experiments.lisp'
def parse_gene_names( filename ): stream = open( filename ) header = stream.readline().strip().split('\t') genes = {} for line in stream: gene, blattner = line.strip().split('\t') genes[blattner] = gene return genes
420e04f822f0a5d51259f9c38fbdf55fc82eadf6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4796/420e04f822f0a5d51259f9c38fbdf55fc82eadf6/parse-biolog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 11857, 67, 1973, 12, 1544, 262, 30, 1407, 273, 1696, 12, 1544, 262, 1446, 273, 1407, 18, 896, 1369, 7675, 6406, 7675, 4939, 2668, 64, 88, 6134, 11423, 273, 2618, 364, 980, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 67, 11857, 67, 1973, 12, 1544, 262, 30, 1407, 273, 1696, 12, 1544, 262, 1446, 273, 1407, 18, 896, 1369, 7675, 6406, 7675, 4939, 2668, 64, 88, 6134, 11423, 273, 2618, 364, 980, 31...
def read_process_output(self, mode='stdout'):
def read_process_output(self, mode=None):
def read_process_output(self, mode='stdout'): """Waits for the process to finish and returns its output. `mode` defines which outputs are returned. If it contains 'stdout', the standard output is returned. If it contains 'stderr', the standard error is returned. If it contains 'stderr' and 'stdout' or 'both', the standard output and standard error are returned. If the `mode` contains only 'stdout', but there are contents on stderr, this keyword fails. Note that although the process is finished, it is not removed from the process list. Trying to read from a stopped process nevertheless fails. To reset the process list (and indexes and aliases), `Stop All Processes` must be used. See `Start Process` and `Switch Process` for more information. """ process = PROCESSES.get_current() if (utils.contains(mode, 'stdout') and utils.contains(mode, 'stderr')) \ or utils.contains(mode, 'both'): return process.read_stdout_and_stderr() if utils.contains(mode, 'stderr'): return process.read_stderr() return process.read_stdout()
2eeca91c189c12c090a519de7775b97e9e4d0b40 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/2eeca91c189c12c090a519de7775b97e9e4d0b40/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2567, 67, 2844, 12, 2890, 16, 1965, 33, 7036, 4672, 3536, 26153, 364, 326, 1207, 358, 4076, 471, 1135, 2097, 876, 18, 225, 1375, 3188, 68, 11164, 1492, 6729, 854, 2106, 18, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 67, 2567, 67, 2844, 12, 2890, 16, 1965, 33, 7036, 4672, 3536, 26153, 364, 326, 1207, 358, 4076, 471, 1135, 2097, 876, 18, 225, 1375, 3188, 68, 11164, 1492, 6729, 854, 2106, 18, 97...
try: os.link(local, target) except OSError, e: if e.errno == 18: shutil.copy2(local, target) else: self.logger.error('Got an error linking from cache: %s' % e) raise OSError, e
self._link(local, target)
def downloadPackages(self): """Cycle through the list of package objects and download them from their respective repos."""
5af01719d36778fba2380cafc820d66aedd832ca /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/5af01719d36778fba2380cafc820d66aedd832ca/gather.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 11425, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 4224, 2182, 628, 3675, 17613, 13686, 12123, 2, 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, 4224, 11425, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 2181, 2184, 471, 4224, 2182, 628, 3675, 17613, 13686, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def __init__(self, control): self.control = control def __call__(self, value): self.control.setValue(value)
def __init__(self, control): self.control = control def __call__(self, value): self.control.setValue(value) class CallFront_lineEdit: def __init__(self, control): self.control = control def __call__(self, value): self.control.setText(str(value))
def __init__(self, control): self.control = control
7abe12326ad3cc73b55d7b6d29e51c9eacee5a84 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/7abe12326ad3cc73b55d7b6d29e51c9eacee5a84/OWGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3325, 4672, 365, 18, 7098, 273, 3325, 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, 1001, 2738, 972, 12, 2890, 16, 3325, 4672, 365, 18, 7098, 273, 3325, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
type="float", args=2, help="Set the minimum and "\
type="float", nargs=2, help="Set the minimum and "\
def __init__(self, usage=None, option_list=None, options_class=None, version=None, conflict_handler='error', description=None, **kwargs): """ Constructor for C{DgsOptions}
e2d956de68e9167bfbcae33b253713cfeed8eef4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/763/e2d956de68e9167bfbcae33b253713cfeed8eef4/hlr_dgs_options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4084, 33, 7036, 16, 1456, 67, 1098, 33, 7036, 16, 702, 67, 1106, 33, 7036, 16, 1177, 33, 7036, 16, 7546, 67, 4176, 2218, 1636, 2187, 2477, 33, 7036, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4084, 33, 7036, 16, 1456, 67, 1098, 33, 7036, 16, 702, 67, 1106, 33, 7036, 16, 1177, 33, 7036, 16, 7546, 67, 4176, 2218, 1636, 2187, 2477, 33, 7036, 16...
if (self.drone.getDistance(self.player)<500):
if (self.drone.getDistance(self.player)<1100):
def orbitMe (self): #self.player.SetTarget(self.drone) # if the drone is more than 500m away it will set if (self.drone.getDistance(self.player)>=500): # orientate the nose of the drone towards the player ship vec = Vector.Sub(self.player.Position(),self.drone.Position()) self.drone.SetOrientation((1,0,0),vec) # set velocity proportional to distance from player vec = Vector.Scale(Vector.SafeNorm(vec),self.drone.getDistance(self.player)/10) self.drone.SetVelocity(vec) #self.stayputtime = VS.GetGameTime() # if drone has approached player until 500m then stop it if (self.drone.getDistance(self.player)<500): self.drone.SetVelocity((0,0,0)) # this is also needed to stop rotation of the drone self.drone.SetAngularVelocity((0,0,0)) return 0
861b2caa755798430035f1444afb9bbbe7242a92 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2883/861b2caa755798430035f1444afb9bbbe7242a92/quest_tutorial.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17656, 4667, 261, 2890, 4672, 468, 2890, 18, 14872, 18, 694, 2326, 12, 2890, 18, 3069, 476, 13, 468, 309, 326, 5081, 476, 353, 1898, 2353, 6604, 81, 10804, 518, 903, 444, 309, 261, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17656, 4667, 261, 2890, 4672, 468, 2890, 18, 14872, 18, 694, 2326, 12, 2890, 18, 3069, 476, 13, 468, 309, 326, 5081, 476, 353, 1898, 2353, 6604, 81, 10804, 518, 903, 444, 309, 261, 289...
Return the derived series of this group as a list of
Return the lower central series of this group as a list of
def lower_central_series(self): """ Return the derived series of this group as a list of permutation groups.
e9624a3eb707f1c9d3a1b217906f1eb759cc73d4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e9624a3eb707f1c9d3a1b217906f1eb759cc73d4/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2612, 67, 71, 12839, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 2612, 18291, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 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, 0, 0, 0, 0, 0, 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, 2612, 67, 71, 12839, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 2612, 18291, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100...
raise ValueError, "%r: IPv6 Address with more than 8 hexletts" % (ipstr)
raise ValueError, "%r: IPv6 Address with more than 8 hextets" % (ipstr)
0x0123456789abcdef # IPv4 if <= 0xffffffff else IPv6
beeb5ca0480c8d1ae505244beb56772f807ba70e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/14367/beeb5ca0480c8d1ae505244beb56772f807ba70e/IPy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 374, 92, 26684, 28953, 6647, 468, 7853, 24, 309, 1648, 374, 28857, 469, 7853, 26, 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, ...
[ 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, 374, 92, 26684, 28953, 6647, 468, 7853, 24, 309, 1648, 374, 28857, 469, 7853, 26, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
output, errput = main.run_svn(1, "proplist", path)
output, errput = main.run_svn(1, "proplist", path, "--verbose")
def get_props(path): "Return a hash of props for PATH, using the svn client." # It's not kosher to look inside .svn/ and try to read the internal # property storage format. Instead, we use 'svn proplist'. After # all, this is the only way the user can retrieve them, so we're # respecting the black-box paradigm. props = {} output, errput = main.run_svn(1, "proplist", path) for line in output: if line.startswith('Properties on '): continue name, value = line.split(' : ') name = string.strip(name) value = string.strip(value) props[name] = value return props
e4123eb3d7407e8c153bfa3725a2340db71e2820 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6036/e4123eb3d7407e8c153bfa3725a2340db71e2820/tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9693, 12, 803, 4672, 315, 990, 279, 1651, 434, 3458, 364, 7767, 16, 1450, 326, 5893, 82, 1004, 1199, 225, 468, 2597, 1807, 486, 417, 538, 1614, 358, 2324, 4832, 263, 31505, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9693, 12, 803, 4672, 315, 990, 279, 1651, 434, 3458, 364, 7767, 16, 1450, 326, 5893, 82, 1004, 1199, 225, 468, 2597, 1807, 486, 417, 538, 1614, 358, 2324, 4832, 263, 31505, 19...
accepted_imts = [ type.split(';')[0] for type in accept_header.split(',') ]
accepted_imts = [ type.split(';')[0].strip() for type in accept_header.split(',') ]
def get_resource(environ, start_response): #FIXME: Needs update to forward cookies, i.e. headers to moinrest (see put_resource) #Set up to use HTTP auth for all wiki requests first_request(environ) baseuri = environ['SCRIPT_NAME'].rstrip('/') #$ServerPath/zen handler = copy_auth(environ, baseuri) opener = urllib2.build_opener(handler) if handler else urllib2.build_opener() #Pass on the full moinrest and zen base URIs for the resources accessed on this request environ['zen.RESOURCE_URI'] = join(zenlib.moinmodel.ZEN_BASEURI, environ['PATH_INFO'].lstrip('/').split('/')[0]) environ['moinrest.RESOURCE_URI'] = join(zenlib.moinmodel.MOINREST_BASEURI, environ['PATH_INFO'].lstrip('/').split('/')[0]) H = httplib2.Http('/tmp/.cache') zenlib.moinmodel.H = H resource = node.lookup(zenuri_to_moinrest(environ), opener=opener) if not resource: start_response(status_response(400),[('Content-Type','text/plain')]) return( "Unable to access resource\n" ) resolver = resource.resolver # Choose a preferred media type from the Accept header, using application/json as presumed # default, and stripping out any wildcard types and type parameters # # FIXME Ideally, this should use the q values and pick the best media type, rather than # just picking the first non-wildcard type. Perhaps: http://code.google.com/p/mimeparse/ accepted_imts = [] accept_header = environ.get('HTTP_ACCEPT') if accept_header : accepted_imts = [ type.split(';')[0] for type in accept_header.split(',') ] accepted_imts.append('application/json') logger.debug('accepted_imts: ' + repr(accepted_imts)) imt = first_item(dropwhile(lambda x: '*' in x, accepted_imts)) qparams = cgi.parse_qs(environ['QUERY_STRING']) rulesheet_override = qparams.get('rulesheet') if rulesheet_override: handler = rulesheet(rulesheet_override[0], resource.resource_type, resolver=resolver).run(environ, 'GET', imt) else: handler = resource.resource_type.run_rulesheet(environ, 'GET', imt) rendered = handler(resource) headers = [("Content-Type", str(handler.imt)), ("Vary", "Accept")] if handler.ttl: headers.append(("Cache-Control", "max-age="+str(handler.ttl))) start_response(status_response(httplib.OK), headers) #start_response(status_response(status), [("Content-Type", ctype), (moin.ORIG_BASE_HEADER, moin_base_info)]) return rendered
3fa9d661fc1ab36093e983e61504cc9afbad411d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7225/3fa9d661fc1ab36093e983e61504cc9afbad411d/zen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3146, 12, 28684, 16, 787, 67, 2740, 4672, 468, 25810, 30, 29164, 1089, 358, 5104, 7237, 16, 277, 18, 73, 18, 1607, 358, 312, 885, 8792, 261, 5946, 1378, 67, 3146, 13, 468, 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, 336, 67, 3146, 12, 28684, 16, 787, 67, 2740, 4672, 468, 25810, 30, 29164, 1089, 358, 5104, 7237, 16, 277, 18, 73, 18, 1607, 358, 312, 885, 8792, 261, 5946, 1378, 67, 3146, 13, 468, 6...
if self.element.symbol == 'Pe' and len(self.bonds) == 1 and \
if 0 and self.element.symbol == 'Pe' and len(self.bonds) == 1 and \
def _draw_atom_style(self): #bruce 070409 split this out of draw_atom_sphere """[private helper method for draw_atom_sphere, and perhaps related methods like draw_wirespheres] Return a short hardcoded string (known to draw_atom_sphere) saying in what style to draw the atom's sphere. None means use an actual sphere; other values distinguish the special cases encoded into draw_atom_sphere. We check not only the desirability of the special cases, but all their correctness conditions, making sure that those don't depend on the other parameters of draw_atom_sphere (like abs_coords), and making it easier for draw_atom_sphere to fallback to its default style when those conditions fail. """ # WARNING: various routines make use of this return value in different ways, # but these ways are not independent (eg one might draw a cone and one might estimate its size), # so changes in any of the uses need to be reviewed for possibly needing changes in the others. [bruce 070409] if self.element is Singlet and len(self.bonds) == 1: if debug_pref("draw Pl-bondpoints as arrowheads", Choice_boolean_False): #bruce 070409, revised/deprecated 070415 other = self.bonds[0].other(self) if other.element.symbol == 'Pl' and len(other.bonds) == 2: if len(other.singNeighbors()) == 1: # at end, but not isolated return 'arrowhead-away1' ###e REVIEW: does Bond.draw need to be updated due to this, if "draw bondpoints as stubs" is True? if debug_pref("draw bondpoints as stubs", Choice_boolean_False, prefs_key = True): # current implem has cosmetic bugs (details commented there), so don't say non_debug = True return 'bondpoint-stub' #k this might need to correspond with related code in Bond.draw if self.element.symbol == 'Pe' and len(self.bonds) == 1 and \ debug_pref("draw Pe as arrowhead", Choice_boolean_False): #bruce 070409, revised/deprecated 070415 other = self.bonds[0].other(self) # other is a bondpoint or a real pseudoatom, in either case farther away than self # from the end of the strand (arrow should point other way). # (We want to draw even an isolated Pe (with bondpoint) as a cone, in case it's in MMKit, # since it always looks like a cone when in use.) if other.molecule is not self.molecule: # It's too hard to support this case for now; a bug report (bruce, A9) should be filed. # The implem issues are (1) baseposns are in different coord systems; (2) self.molecule display list # would need updating if self -> other direction (in self's coordsys) changed. return None return 'arrowhead-away1' if self.element.symbol == 'Pl' and len(self.bonds) == 2 and \ debug_pref("draw Pl at end as arrowhead", Choice_boolean_False): #bruce 070409, revised/deprecated 070415 if len(self.singNeighbors()) == 1: # at end, but not isolated return 'arrowhead-to-bp' return None
cd79836bc81615ff8f163132777c1b0ff2d5f998 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/cd79836bc81615ff8f163132777c1b0ff2d5f998/chem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 7466, 67, 4060, 12, 2890, 4672, 468, 2848, 3965, 10934, 3028, 5908, 1416, 333, 596, 434, 3724, 67, 7466, 67, 87, 9346, 3536, 63, 1152, 4222, 707, 364, 3724, 67, 7466, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 7466, 67, 4060, 12, 2890, 4672, 468, 2848, 3965, 10934, 3028, 5908, 1416, 333, 596, 434, 3724, 67, 7466, 67, 87, 9346, 3536, 63, 1152, 4222, 707, 364, 3724, 67, 7466, 67...
names = sorted(os.listdir(dir_path))
names = os.listdir(dir_path) names.sort()
def _ls_tree_lines(dir_path, skip_pattern, indent, branch_indent, last_indent, last_branch_indent): if dir_path == "": dir_path = os.getcwd() lines = [] names = sorted(os.listdir(dir_path)) dirs, nondirs = [], [] for name in names: if re.match(skip_pattern, name): continue if os.path.isdir(os.path.join(dir_path, name)): dirs.append(name) else: nondirs.append(name) # list non-directories first entries = list(itertools.chain(((name, False) for name in nondirs), ((name, True) for name in dirs))) def ls_entry(name, is_dir, ind, branch_ind): if not is_dir: yield ind + name else: path = os.path.join(dir_path, name) if not os.path.islink(path): yield ind + name subtree = _ls_tree_lines(path, skip_pattern, indent, branch_indent, last_indent, last_branch_indent) for x in subtree: yield branch_ind + x for name, is_dir in entries[:-1]: for line in ls_entry(name, is_dir, indent, branch_indent): yield line if entries: name, is_dir = entries[-1] for line in ls_entry(name, is_dir, last_indent, last_branch_indent): yield line
5e26af3147a320fd69bff892269cf18ed3339fa6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11821/5e26af3147a320fd69bff892269cf18ed3339fa6/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3251, 67, 3413, 67, 3548, 12, 1214, 67, 803, 16, 2488, 67, 4951, 16, 3504, 16, 3803, 67, 9355, 16, 1142, 67, 9355, 16, 1142, 67, 7500, 67, 9355, 4672, 309, 1577, 67, 803, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3251, 67, 3413, 67, 3548, 12, 1214, 67, 803, 16, 2488, 67, 4951, 16, 3504, 16, 3803, 67, 9355, 16, 1142, 67, 9355, 16, 1142, 67, 7500, 67, 9355, 4672, 309, 1577, 67, 803, 422, ...
Returns the smalest positive integer quadratic non-residue in Z/pZ for primes p>2.
Returns the smallest positive integer quadratic non-residue in Z/pZ for primes p>2.
def quadratic_nonresidue(p): """ Returns the smalest positive integer quadratic non-residue in Z/pZ for primes p>2. EXAMPLES: sage: quadratic_nonresidue(5) 2 """ p1 = abs(p) ## Deal with the prime p = 2 and |p| <= 1. if p1 == 2: raise TypeError, "Oops! There are no quadratic non-residues in Z/2Z." if p1 < 2: raise TypeError, "Oops! p must be a prime number > 2." ## TO DO: Test that p is prime??? ## Find the smallest non-residue mod p for r in range(2,p): if legendre_symbol(r, p) == -1: return r
7f26a943dfbea43bc9f801b67b58b67e9019391e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/7f26a943dfbea43bc9f801b67b58b67e9019391e/extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26146, 67, 5836, 23388, 12, 84, 4672, 3536, 2860, 326, 13541, 6895, 3571, 26146, 1661, 17, 23388, 316, 2285, 19, 84, 62, 364, 846, 4485, 293, 34, 22, 18, 225, 5675, 8900, 11386, 30, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26146, 67, 5836, 23388, 12, 84, 4672, 3536, 2860, 326, 13541, 6895, 3571, 26146, 1661, 17, 23388, 316, 2285, 19, 84, 62, 364, 846, 4485, 293, 34, 22, 18, 225, 5675, 8900, 11386, 30, 27...
ET.SubElement(root, 'dc:title').text = self.title
ET.SubElement(root, qname('title',DC_NS)).text = self.title
def toElement(self,**kwargs):
e9c4345533fd24eede4febe6e6cd4c5c3b16e15c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11626/e9c4345533fd24eede4febe6e6cd4c5c3b16e15c/DIDLLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 1046, 12, 2890, 16, 636, 4333, 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, 358, 1046, 12, 2890, 16, 636, 4333, 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,...
if pattern.search(pattern):
if pattern.search(line):
def search_cpp (self, pattern, body=None, headers=None, include_dirs=None, lang="c"): """Construct a source file (just like 'try_cpp()'), run it through the preprocessor, and return true if any line of the output matches 'pattern'. 'pattern' should either be a compiled regex object or a string containing a regex. If both 'body' and 'headers' are None, preprocesses an empty file -- which can be useful to determine the symbols the preprocessor and compiler set by default. """
68a69970cef87dcc115d5fdb6c88d14301f66686 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/68a69970cef87dcc115d5fdb6c88d14301f66686/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 4057, 84, 261, 2890, 16, 1936, 16, 1417, 33, 7036, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7249, 279, 1084, 585, 261, 3732, 300...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4057, 84, 261, 2890, 16, 1936, 16, 1417, 33, 7036, 16, 1607, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 3303, 1546, 71, 6, 4672, 3536, 7249, 279, 1084, 585, 261, 3732, 300...
wc.proxy.HEADERS.append((self.url, 1, self.headers.headers))
def process_headers(self): # Headers are terminated by a blank line .. now in the regexp, # we want to say it's either a newline at the beginning of # the document, or it's a lot of headers followed by two newlines. # The cleaner alternative would be to read one line at a time # until we get to a blank line... m = re.match(r'^((?:[^\r\n]+\r?\n)*\r?\n)', self.recv_buffer) if not m: return
df1de478c20eda8c306e8db15d03c1d2b49b9eb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/df1de478c20eda8c306e8db15d03c1d2b49b9eb0/HttpServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2485, 12, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 67, 2485, 12, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434, ...
self.assertEquals(jdict['status'], 'new')
self.assertEquals(jdict['status'], 'completed')
def _done_job(self, job_id): self.assertEquals(type(job_id), str) jdict = self.dsage_server.get_job_by_id(job_id) self.assertEquals(jdict['status'], 'new') self.assertEquals(jdict['output'], 'Nothing.')
5920cf9d72f3d8026091ab24bf767e3a12f7d452 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/5920cf9d72f3d8026091ab24bf767e3a12f7d452/test_remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8734, 67, 4688, 12, 2890, 16, 1719, 67, 350, 4672, 365, 18, 11231, 8867, 12, 723, 12, 4688, 67, 350, 3631, 609, 13, 525, 1576, 273, 365, 18, 2377, 410, 67, 3567, 18, 588, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8734, 67, 4688, 12, 2890, 16, 1719, 67, 350, 4672, 365, 18, 11231, 8867, 12, 723, 12, 4688, 67, 350, 3631, 609, 13, 525, 1576, 273, 365, 18, 2377, 410, 67, 3567, 18, 588, 67, ...
self.set_password(value, already_hashed=False)
self.set_password(value, already_hashed = False)
def _set_raw_password(self, value): """Set a password directly, forcing a hash step.""" self.set_password(value, already_hashed=False)
31f1a17022804adb2d15701d138a8345a6f685f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1351/31f1a17022804adb2d15701d138a8345a6f685f5/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 1899, 67, 3664, 12, 2890, 16, 460, 4672, 3536, 694, 279, 2201, 5122, 16, 364, 2822, 279, 1651, 2235, 12123, 365, 18, 542, 67, 3664, 12, 1132, 16, 1818, 67, 2816, 329, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 1899, 67, 3664, 12, 2890, 16, 460, 4672, 3536, 694, 279, 2201, 5122, 16, 364, 2822, 279, 1651, 2235, 12123, 365, 18, 542, 67, 3664, 12, 1132, 16, 1818, 67, 2816, 329, 3...
portal_uidhandler = getUserId(IUniqueIdHandler)
portal_uidhandler = getUtility(IUniqueIdHandler)
def __init__(self, history_id, original, clone, referenced_data, app_metadata, sys_metadata, is_registered, approxSize): # parent reference (register the parent with the unique id handler) # register with sys_metadata as there is no other possibility obj = original.object parent = aq_parent(aq_inner(obj)) portal_uidhandler = getUserId(IUniqueIdHandler) # set defaults if missing sys_metadata['comment'] = sys_metadata.get('comment', '') sys_metadata['timestamp'] = sys_metadata.get('timestamp', int(time.time())) sys_metadata['originator'] = sys_metadata.get('originator', None) sys_metadata['principal'] = getUserId() sys_metadata['approxSize'] = approxSize sys_metadata['parent'] = { 'history_id': portal_uidhandler.register(parent), 'version_id': getattr(parent, "version_id", None), 'location_id': getattr(parent, "location_id", None), } # bundle application and system metadata in different namespaces metadata = { 'sys_metadata': sys_metadata, 'app_metadata': app_metadata, } self.history_id = history_id self.original = original self.clone = clone self.referenced_data = referenced_data self.metadata = metadata self.is_registered = is_registered
646e0a9f57484cead1dc7ce99b18ed98663d6dc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11952/646e0a9f57484cead1dc7ce99b18ed98663d6dc6/ArchivistTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4927, 67, 350, 16, 2282, 16, 3236, 16, 8042, 67, 892, 16, 595, 67, 4165, 16, 2589, 67, 4165, 16, 353, 67, 14327, 16, 10818, 1225, 4672, 225, 468, 982, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4927, 67, 350, 16, 2282, 16, 3236, 16, 8042, 67, 892, 16, 595, 67, 4165, 16, 2589, 67, 4165, 16, 353, 67, 14327, 16, 10818, 1225, 4672, 225, 468, 982, ...
(options, command, args) = self._parse_args()
(options, args) = self._parse_args()
def start(self): """Starts the interface""" try: (options, command, args) = self._parse_args() self.phonebook = PhoneBook(options.file) try: function = self._get_cmd_function(command) function(*args) except AttributeError: sys.exit(_('Unknown command: %s') % command) # run the command with all specified arguments except TypeError: sys.exit(_('Invalid arguments for command "%s"') % command) except KeyboardInterrupt: sys.exit(_('Dying peacefully ...'))
500a390f053c916fbb5e449916c39bcc41901f78 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/500a390f053c916fbb5e449916c39bcc41901f78/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 3536, 11203, 326, 1560, 8395, 775, 30, 261, 2116, 16, 833, 13, 273, 365, 6315, 2670, 67, 1968, 1435, 365, 18, 10540, 3618, 273, 12895, 9084, 12, 2116, 18, 768, 13,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 787, 12, 2890, 4672, 3536, 11203, 326, 1560, 8395, 775, 30, 261, 2116, 16, 833, 13, 273, 365, 6315, 2670, 67, 1968, 1435, 365, 18, 10540, 3618, 273, 12895, 9084, 12, 2116, 18, 768, 13,...
if email:
if host or user or email:
def get_key_statistics(self, end_date, report_days, host=None, user=None, email=None): if email: return None
a953f59a4211f2213827dc4cc8e49beb5ddfb506 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/a953f59a4211f2213827dc4cc8e49beb5ddfb506/untangle_base_webfilter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 67, 14438, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 1479, 578, 729, 578, 2699, 30, 327, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 856, 67, 14438, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 1479, 578, 729, 578, 2699, 30, 327, 5...
s.sendmail(email_from, email_to + email_cc + email_bcc, msg.as_string())
s.sendmail(email_from, flatten([email_to, email_cc, email_bcc]), msg.as_string())
def email_send_attach(email_from, email_to, subject, body, email_cc=None, email_bcc=None, on_error=False, reply_to=False, attach=None, tinycrm=False): """Send an email.""" if not email_cc: email_cc=[] if not email_bcc: email_bcc=[] if not attach: attach=[] import smtplib from email.MIMEText import MIMEText from email.MIMEBase import MIMEBase from email.MIMEMultipart import MIMEMultipart from email.Header import Header from email.Utils import formatdate, COMMASPACE from email import Encoders msg = MIMEMultipart() msg['Subject'] = Header(subject.decode('utf8'), 'utf-8') msg['From'] = email_from del msg['Reply-To'] if reply_to: msg['Reply-To'] = reply_to msg['To'] = COMMASPACE.join(email_to) if email_cc: msg['Cc'] = COMMASPACE.join(email_cc) if email_bcc: msg['Bcc'] = COMMASPACE.join(email_bcc) if tinycrm: msg['Message-Id'] = '<'+str(time.time())+'-tinycrm-'+str(tinycrm)+'@'+socket.gethostname()+'>' msg['Date'] = formatdate(localtime=True) msg.attach( MIMEText(body or '', _charset='utf-8') ) for (fname,fcontent) in attach: part = MIMEBase('application', "octet-stream") part.set_payload( fcontent ) Encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % (fname,)) msg.attach(part) try: s = smtplib.SMTP() s.connect(config['smtp_server']) if config['smtp_user'] or config['smtp_password']: s.login(config['smtp_user'], config['smtp_password']) s.sendmail(email_from, email_to + email_cc + email_bcc, msg.as_string()) s.quit() except Exception, e: import logging logging.getLogger().info(str(e)) return True
fce14013d20efcad758ea85f13e3050627091579 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/fce14013d20efcad758ea85f13e3050627091579/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2699, 67, 4661, 67, 7331, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2699, 67, 4661, 67, 7331, 12, 3652, 67, 2080, 16, 2699, 67, 869, 16, 3221, 16, 1417, 16, 2699, 67, 952, 33, 7036, 16, 2699, 67, 31345, 33, 7036, 16, 603, 67, 1636, 33, 8381, 16, 43...
messages.append(q.readheaders(p)[0])
ph = q.readheaders(p) messages.append(ph.message)
def fold(ui, repo, *files, **opts): """fold the named patches into the current patch Patches must not yet be applied. Each patch will be successively applied to the current patch in the order given. If all the patches apply successfully, the current patch will be refreshed with the new cumulative patch, and the folded patches will be deleted. With -k/--keep, the folded patch files will not be removed afterwards. The header for each folded patch will be concatenated with the current patch header, separated by a line of '* * *'.""" q = repo.mq if not files: raise util.Abort(_('qfold requires at least one patch name')) if not q.check_toppatch(repo): raise util.Abort(_('No patches applied')) message = cmdutil.logmessage(opts) if opts['edit']: if message: raise util.Abort(_('option "-e" incompatible with "-m" or "-l"')) parent = q.lookup('qtip') patches = [] messages = [] for f in files: p = q.lookup(f) if p in patches or p == parent: ui.warn(_('Skipping already folded patch %s') % p) if q.isapplied(p): raise util.Abort(_('qfold cannot fold already applied patch %s') % p) patches.append(p) for p in patches: if not message: messages.append(q.readheaders(p)[0]) pf = q.join(p) (patchsuccess, files, fuzz) = q.patch(repo, pf) if not patchsuccess: raise util.Abort(_('Error folding patch %s') % p) patch.updatedir(ui, repo, files) if not message: message, comments, user = q.readheaders(parent)[0:3] for msg in messages: message.append('* * *') message.extend(msg) message = '\n'.join(message) if opts['edit']: message = ui.edit(message, user or ui.username()) q.refresh(repo, msg=message) q.delete(repo, patches, opts) q.save_dirty()
a08f944f5ede5216ab055dc6f66d0194f0c9d217 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/a08f944f5ede5216ab055dc6f66d0194f0c9d217/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11590, 12, 4881, 16, 3538, 16, 380, 2354, 16, 2826, 4952, 4672, 3536, 16007, 326, 4141, 16482, 1368, 326, 783, 4729, 225, 12042, 281, 1297, 486, 4671, 506, 6754, 18, 8315, 4729, 903, 506...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11590, 12, 4881, 16, 3538, 16, 380, 2354, 16, 2826, 4952, 4672, 3536, 16007, 326, 4141, 16482, 1368, 326, 783, 4729, 225, 12042, 281, 1297, 486, 4671, 506, 6754, 18, 8315, 4729, 903, 506...
def logln(self, level, data): self._checkLogLevel(level)
def logLn(self, level, data): """ Log data without and prefix, but append a newline. """ self._checkLogLevel(level, min=self.FATAL, max=self.DEBUG_MAX)
def logln(self, level, data): self._checkLogLevel(level) self._log(level, 1, 1, "%s", data)
3d7d63966162f8881fad278dc8cc728a7e5a1f77 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/3d7d63966162f8881fad278dc8cc728a7e5a1f77/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 13780, 12, 2890, 16, 1801, 16, 501, 4672, 3536, 1827, 501, 2887, 471, 1633, 16, 1496, 714, 279, 9472, 18, 3536, 365, 6315, 1893, 21806, 12, 2815, 16, 1131, 33, 2890, 18, 29891, 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, 613, 13780, 12, 2890, 16, 1801, 16, 501, 4672, 3536, 1827, 501, 2887, 471, 1633, 16, 1496, 714, 279, 9472, 18, 3536, 365, 6315, 1893, 21806, 12, 2815, 16, 1131, 33, 2890, 18, 29891, 16...
from pyrticle.reconstruction import ShapeFunctionReconstructor
from pyrticle.reconstruction import \ ShapeFunctionReconstructor, \ NormalizedShapeFunctionReconstructor
def run_setup(casename, setup, discr, pusher): from hedge.timestep import RK4TimeStepper from hedge.visualization import VtkVisualizer, SiloVisualizer from hedge.operators import MaxwellOperator vis = SiloVisualizer(discr) #vis = VtkVisualizer(discr, "pic") from pyrticle.cloud import ParticleCloud from pyrticle.reconstruction import ShapeFunctionReconstructor cloud = ParticleCloud(discr, units, ShapeFunctionReconstructor(), pusher(), 3, 3, verbose_vis=True) e, h = setup.fields(discr) b = units.MU0 * h init_positions = setup.positions(0) init_velocities = setup.velocities(0) #print "x", init_positions #print "v", init_velocities cloud.add_particles( positions=init_positions, velocities=init_velocities, charges=setup.charge, masses=units.EL_MASS) final_time = setup.final_time() nsteps = setup.nsteps() dt = final_time/nsteps print "#elements=%d, dt=%s, #steps=%d" % ( len(discr.mesh.elements), dt, nsteps) from pytools.log import LogManager, \ add_simulation_quantities, \ add_general_quantities, \ add_run_info, ETA from pyrticle.log import add_particle_quantities logmgr = LogManager("%s.dat" % casename) add_run_info(logmgr) add_general_quantities(logmgr) add_simulation_quantities(logmgr, dt) add_particle_quantities(logmgr, cloud) cloud.add_instrumentation(logmgr) logmgr.add_quantity(ETA(nsteps)) logmgr.add_watches(["step", "t_sim", "t_step", "t_eta", "n_part"]) # timestepping ------------------------------------------------------------ def rhs(t, y): return cloud.rhs(t, e, b) stepper = RK4TimeStepper() from time import time last_tstep = time() t = 0 def check_result(): from hedge.tools import cross deriv_dt = 1e-12 dim = discr.dimensions all_x = setup.positions(t) all_v = setup.velocities(t) all_sim_v = cloud.velocities().adaptee all_f = [(p2-p1)/(2*deriv_dt) for p1, p2 in zip(setup.momenta(t-deriv_dt), setup.momenta(t+deriv_dt))] from pyrticle.tools import NumberShiftableVector all_sim_f = NumberShiftableVector.unwrap( cloud.vis_info["mag_force"] + cloud.vis_info["el_force"]) local_e = setup.e() local_b = units.MU0 * setup.h() x_err = 0 v_err = 0 f_err = 0 for i in range(len(cloud)): x = all_x[i] sim_x = cloud.positions.adaptee[i*dim:(i+1)*dim] v = all_v[i] sim_v = cloud.velocities().adaptee[i*dim:(i+1)*dim] f = all_f[i] sim_f = all_sim_f[i*dim:(i+1)*dim] real_f = num.array(cross(sim_v, setup.charge*local_b)) + setup.charge*local_e print "pos%d:" % i, comp.norm_2(x-sim_x) print "vel%d:" % i, comp.norm_2(v-sim_v) print "vel%d:..." % i, v, sim_v #print "acc%d:" % i, comp.norm_2(a-sim_a) #u = num.vstack((v, sim_v, f, sim_f, real_f)) #print "acc%d:\n%s" % (i, u) #raw_input() x_err = max(x_err, comp.norm_2(v-sim_v)/comp.norm_2(v)) v_err = max(v_err, comp.norm_2(v-sim_v)/comp.norm_2(v)) f_err = max(f_err, comp.norm_2(f-sim_f)/comp.norm_2(f)) return x_err, v_err, f_err # make sure verbose-vis fields are filled rhs(t, cloud) errors = (0, 0, 0) from pytools.log import IntervalTimer check_timer = IntervalTimer("t_check", "Time spent checking results") vis_timer = IntervalTimer("t_vis", "Time spent visualizing") logmgr.add_quantity(check_timer) logmgr.add_quantity(vis_timer) for step in xrange(nsteps): logmgr.tick() #if step % (setup.nsteps()/100) == 0: if True: check_timer.start() errors = tuple( max(old_err, new_err) for old_err, new_err in zip(errors, check_result())) check_timer.stop() raw_input() last_tstep = time() vis_timer.start() if True: visf = vis.make_file("%s-%04d" % (casename, step)) cloud.add_to_vis(vis, visf, time=t, step=step) if False: vis.add_data(visf, [ ("e", e), ("h", h), ], write_coarse_mesh=True, time=t, step=step) else: vis.add_data(visf, [], time=t, step=step) visf.close() vis_timer.stop() cloud.upkeep() cloud = stepper(cloud, t, dt, rhs) t += dt logmgr.tick() logmgr.save() print print "l_inf errors (pos,vel,acc):", errors vis.close()
4e0642717da58c59dedfc3098f1fadd944e86d35 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12869/4e0642717da58c59dedfc3098f1fadd944e86d35/static-field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8401, 12, 6349, 1069, 16, 3875, 16, 1015, 3353, 16, 1817, 264, 4672, 628, 366, 7126, 18, 8584, 395, 881, 1930, 534, 47, 24, 950, 4160, 457, 628, 366, 7126, 18, 26671, 1588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 8401, 12, 6349, 1069, 16, 3875, 16, 1015, 3353, 16, 1817, 264, 4672, 628, 366, 7126, 18, 8584, 395, 881, 1930, 534, 47, 24, 950, 4160, 457, 628, 366, 7126, 18, 26671, 1588, ...
if self.timer_inc : gtk.timeout_remove(self.timer_inc)
def end(self):
47c7b2de69f2ef74a5ccace1a52699180780bde1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/47c7b2de69f2ef74a5ccace1a52699180780bde1/ballcatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 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, 679, 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, -1...
return self.css.props(' '.join(self.current_object_path))
path = ' '.join(self.current_object_path) return self.css.get_properties_str(path)
def get_css_props(self): if self.css is None: return {} else: return self.css.props(' '.join(self.current_object_path))
2686be156d21fbfc7264862270e0c16c89ab528f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/2686be156d21fbfc7264862270e0c16c89ab528f/rml2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5212, 67, 9693, 12, 2890, 4672, 309, 365, 18, 5212, 353, 599, 30, 327, 2618, 469, 30, 327, 365, 18, 5212, 18, 9693, 2668, 2418, 5701, 12, 2890, 18, 2972, 67, 1612, 67, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5212, 67, 9693, 12, 2890, 4672, 309, 365, 18, 5212, 353, 599, 30, 327, 2618, 469, 30, 327, 365, 18, 5212, 18, 9693, 2668, 2418, 5701, 12, 2890, 18, 2972, 67, 1612, 67, 803, ...
self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth)
self._soundpos = self._soundpos + len(data) // (self._nchannels * self._sampwidth)
def readframes(self, nframes): if self._ssnd_seek_needed: self._ssnd_chunk.seek(0) dummy = self._ssnd_chunk.read(8) pos = self._soundpos * self._framesize if pos: self._ssnd_chunk.seek(pos + 8) self._ssnd_seek_needed = 0 if nframes == 0: return '' data = self._ssnd_chunk.read(nframes * self._framesize) if self._convert and data: data = self._convert(data) self._soundpos = self._soundpos + len(data) / (self._nchannels * self._sampwidth) return data
ac23917f909ac429091f6f96e924fad8fc36d260 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/ac23917f909ac429091f6f96e924fad8fc36d260/aifc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 10278, 12, 2890, 16, 290, 10278, 4672, 309, 365, 6315, 1049, 4880, 67, 16508, 67, 17471, 30, 365, 6315, 1049, 4880, 67, 6551, 18, 16508, 12, 20, 13, 9609, 273, 365, 6315, 1049, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 855, 10278, 12, 2890, 16, 290, 10278, 4672, 309, 365, 6315, 1049, 4880, 67, 16508, 67, 17471, 30, 365, 6315, 1049, 4880, 67, 6551, 18, 16508, 12, 20, 13, 9609, 273, 365, 6315, 1049, 48...
print dir(request.path)
def view_diff(request, object_id, template_name='diffviewer/view_diff.html'): try: diffset = DiffSet.objects.get(pk=object_id) except DiffSet.DoesNotExist: raise Http404 try: files = get_diff_files(diffset) print dir(request.path) return render_to_response(template_name, RequestContext(request, { 'diffset': diffset, 'files': files, 'collapseall': request.GET.get('collapse', False) })) except Exception, e: context = { 'error': e, } if e.__class__ is not UserVisibleError: context['trace'] = traceback.format_exc() return render_to_response(template_name, RequestContext(request, context))
df1f9714ebb40bb4157bd83b3d3b50f1e9dbddc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/df1f9714ebb40bb4157bd83b3d3b50f1e9dbddc6/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 5413, 12, 2293, 16, 733, 67, 350, 16, 1542, 67, 529, 2218, 5413, 25256, 19, 1945, 67, 5413, 18, 2620, 11, 4672, 775, 30, 1901, 988, 273, 13008, 694, 18, 6911, 18, 588, 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, 1476, 67, 5413, 12, 2293, 16, 733, 67, 350, 16, 1542, 67, 529, 2218, 5413, 25256, 19, 1945, 67, 5413, 18, 2620, 11, 4672, 775, 30, 1901, 988, 273, 13008, 694, 18, 6911, 18, 588, 12, ...
def __get_sample(self): return self.__sample def __set_sample(self, sample): """ Sets the generator to be based on a new sample text. """ self.__sample = sample self.__generate_chains(sample) self.__generate_statistics(sample)
def __get_sample(self): return self.__sample
bc9d5a1d58b676e7cc6dcf78f4cef02419954da2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3480/bc9d5a1d58b676e7cc6dcf78f4cef02419954da2/lipsum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 6358, 12, 2890, 4672, 327, 365, 16186, 6358, 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, ...
[ 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, 1001, 588, 67, 6358, 12, 2890, 4672, 327, 365, 16186, 6358, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.dicts[i]['distEpi'])
self.dicts[i]['distHypo'])
def calculateStationMagnitudes(self): for i in range(len(self.streams)): if (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax1') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) timedelta /= self.streams[i][1].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distEpi']) amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) timedelta /= self.streams[i][2].stats.sampling_rate mag += estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distEpi']) mag /= 2. self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s,%s' % (self.streams[i][1].stats.channel, self.streams[i][2].stats.channel) print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin1') and self.dicts[i].has_key('MagMax1')): amp = self.dicts[i]['MagMax1'] - self.dicts[i]['MagMin1'] timedelta = abs(self.dicts[i]['MagMax1T'] - self.dicts[i]['MagMin1T']) timedelta /= self.streams[i][1].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazN'], amp, timedelta, self.dicts[i]['distEpi']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][1].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel']) elif (self.dicts[i].has_key('MagMin2') and self.dicts[i].has_key('MagMax2')): amp = self.dicts[i]['MagMax2'] - self.dicts[i]['MagMin2'] timedelta = abs(self.dicts[i]['MagMax2T'] - self.dicts[i]['MagMin2T']) timedelta /= self.streams[i][2].stats.sampling_rate #print self.dicts[i]['pazN'] mag = estimateMagnitude(self.dicts[i]['pazE'], amp, timedelta, self.dicts[i]['distEpi']) self.dicts[i]['Mag'] = mag self.dicts[i]['MagChannel'] = '%s' % self.streams[i][2].stats.channel print 'calculated new magnitude for %s: %0.2f (channels: %s)' \ % (self.dicts[i]['Station'], self.dicts[i]['Mag'], self.dicts[i]['MagChannel'])
f46eb3773ab1df8b9332ea35469134ee517b70ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/f46eb3773ab1df8b9332ea35469134ee517b70ce/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4604, 16672, 11372, 82, 24751, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 16320, 3719, 30, 309, 261, 2890, 18, 16287, 63, 77, 8009, 5332, 67, 856, 2668, 11372, 2930, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4604, 16672, 11372, 82, 24751, 12, 2890, 4672, 364, 277, 316, 1048, 12, 1897, 12, 2890, 18, 16320, 3719, 30, 309, 261, 2890, 18, 16287, 63, 77, 8009, 5332, 67, 856, 2668, 11372, 2930, ...
def patchFeature(job, key, renamedJobs):
def patchJobReferences(job, key, renamedJobs):
def patchFeature(job, key, renamedJobs): newlist = [] oldlist = job.getFeature(key) for jobentry in oldlist: if (isinstance(jobentry, types.StringTypes) and jobentry in renamedJobs): newlist.append(renamedJobs[jobentry]) else: newlist.append(jobentry) job.setFeature(key, newlist)
372a4efe6debd4c58bfc95cd1f877087525f6ac2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/372a4efe6debd4c58bfc95cd1f877087525f6ac2/Config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 2278, 8221, 12, 4688, 16, 498, 16, 17657, 7276, 4672, 394, 1098, 273, 5378, 1592, 1098, 273, 1719, 18, 588, 4595, 12, 856, 13, 364, 1719, 4099, 316, 1592, 1098, 30, 309, 261, 291...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4729, 2278, 8221, 12, 4688, 16, 498, 16, 17657, 7276, 4672, 394, 1098, 273, 5378, 1592, 1098, 273, 1719, 18, 588, 4595, 12, 856, 13, 364, 1719, 4099, 316, 1592, 1098, 30, 309, 261, 291...
self.selected_index = self.entries.index (entry)
self.selected_index = self._entries.index (entry)
def set_selected (self, entry): self.selected_index = self.entries.index (entry)
ed500b819555108af67057bd24de252315b598d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2233/ed500b819555108af67057bd24de252315b598d2/edit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8109, 261, 2890, 16, 1241, 4672, 365, 18, 8109, 67, 1615, 273, 365, 6315, 8219, 18, 1615, 261, 4099, 13, 225, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8109, 261, 2890, 16, 1241, 4672, 365, 18, 8109, 67, 1615, 273, 365, 6315, 8219, 18, 1615, 261, 4099, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id']
d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id']
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if prefix and not prefix[0] in field: continue if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':db_id'): # Database ID res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) if len(res_id): res = [(6, 0, res_id)] else: try: _check_db_id(self, model_rel, line[i]) res = line[i] except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) row[field_name] = res or False continue
9f8394a3119b661e0f978387e8467c7103893025 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/9f8394a3119b661e0f978387e8467c7103893025/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
elif url.startswith(wikiutil.CHILD_PREFIX): return self._word_repl(url, text) elif Page(self.request, url).exists():
elif (url.startswith(wikiutil.CHILD_PREFIX) or is_self_reference or Page(self.request, url).exists()):
def interwiki(self, url_and_text, **kw): # TODO: maybe support [wiki:Page http://wherever/image.png] ? if len(url_and_text) == 1: url = url_and_text[0] text = None else: url, text = url_and_text
f6e45ec96398975f0e532d936349bb51a96d416e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/f6e45ec96398975f0e532d936349bb51a96d416e/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1554, 13044, 12, 2890, 16, 880, 67, 464, 67, 955, 16, 2826, 9987, 4672, 468, 2660, 30, 6944, 2865, 306, 13044, 30, 1964, 1062, 2207, 6051, 502, 19, 2730, 18, 6446, 65, 692, 309, 562, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1554, 13044, 12, 2890, 16, 880, 67, 464, 67, 955, 16, 2826, 9987, 4672, 468, 2660, 30, 6944, 2865, 306, 13044, 30, 1964, 1062, 2207, 6051, 502, 19, 2730, 18, 6446, 65, 692, 309, 562, ...
sys.stdin = self.save_stdin sys.stdout = self.save_stdout sys.stderr = self.save_stderr
sys.stdin = self.save_stdin sys.stdout = self.save_stdout sys.stderr = self.save_stderr
def restore_files(self):
3ec38f0ee48b31c80510c60b3df0e6bc4dfb89f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3ec38f0ee48b31c80510c60b3df0e6bc4dfb89f9/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 2354, 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, ...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5217, 67, 2354, 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, -10...
print "open", askopenfilename(filetypes=[("all filez", "*")]) print "saveas", asksaveasfilename()
enc = "utf-8" try: import locale enc = locale.nl_langinfo(locale.CODESET) except (ImportError, AttributeError): pass print "open", askopenfilename(filetypes=[("all filez", "*")]).encode(enc) print "saveas", asksaveasfilename().encode(enc)
def askdirectory (**options): "Ask for a directory, and return the file name" return Directory(**options).show()
5627324ad9b53a5e4fc9e14a2fca1c3290b735e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/5627324ad9b53a5e4fc9e14a2fca1c3290b735e4/tkFileDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 5149, 261, 636, 2116, 4672, 315, 23663, 364, 279, 1867, 16, 471, 327, 326, 585, 508, 6, 327, 8930, 12, 636, 2116, 2934, 4500, 1435, 225, 2, 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, 6827, 5149, 261, 636, 2116, 4672, 315, 23663, 364, 279, 1867, 16, 471, 327, 326, 585, 508, 6, 327, 8930, 12, 636, 2116, 2934, 4500, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -1...
def test_close_fds(self): os.pipe() p = subprocess.Popen([sys.executable, "-c", 'import sys,os;' \ 'sys.stdout.write(str(os.dup(0)))'], stdout=subprocess.PIPE, close_fds=1) self.assertEqual(p.stdout.read(), "3")
def test_preexec(self): # preexec function p = subprocess.Popen([sys.executable, "-c", 'import sys,os;' \ 'sys.stdout.write(os.getenv("FRUIT"))'], stdout=subprocess.PIPE, preexec_fn=lambda: os.putenv("FRUIT", "apple")) self.assertEqual(p.stdout.read(), "apple")
883199234eaab6ebccc5bc67b63a1ed5f32ae43b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/883199234eaab6ebccc5bc67b63a1ed5f32ae43b/test_subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1484, 4177, 12, 2890, 4672, 468, 675, 4177, 445, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 296, 5666, 2589, 16, 538, 4359, 521, 296, 9499, 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, 1842, 67, 1484, 4177, 12, 2890, 4672, 468, 675, 4177, 445, 293, 273, 6652, 18, 52, 3190, 3816, 9499, 18, 17751, 16, 3701, 71, 3113, 296, 5666, 2589, 16, 538, 4359, 521, 296, 9499, 18, ...
self.prevmousex = event.x self.prevmousey = event.y
self.prevmousex = event.x_root self.prevmousey = event.y_root
def button_pressed(self, widget, event): # Changes the cursor to the 'resize' cursor, like GIMP, on a middle click: if event.button == 2 or event.button == 1: self.layout.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR)) self.prevmousex = event.x self.prevmousey = event.y # Right-click popup: elif self.image_loaded == True and event.button == 3: self.UIManager.get_widget('/Popup').popup(None, None, None, event.button, event.time) return True
76a2283830945fb2f62193dae50ef08730d10a74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2291/76a2283830945fb2f62193dae50ef08730d10a74/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 10906, 12, 2890, 16, 3604, 16, 871, 4672, 468, 17776, 326, 3347, 358, 326, 296, 15169, 11, 3347, 16, 3007, 611, 9883, 16, 603, 279, 7689, 4682, 30, 309, 871, 18, 5391, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3568, 67, 10906, 12, 2890, 16, 3604, 16, 871, 4672, 468, 17776, 326, 3347, 358, 326, 296, 15169, 11, 3347, 16, 3007, 611, 9883, 16, 603, 279, 7689, 4682, 30, 309, 871, 18, 5391, 422, ...
(?:[ ]+|$)
([ ]+|$)
def comment(self, match): if not match.string[match.end():].strip() \ and self.state_machine.is_next_line_blank(): # an empty comment? return [nodes.comment()], 1 # "A tiny but practical wart." indented, indent, offset, blank_finish = \ self.state_machine.get_first_known_indented(match.end()) text = '\n'.join(indented) return [nodes.comment(text, text)], blank_finish
9aa86b66cf632d24cd8412c352ecb461084727da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/9aa86b66cf632d24cd8412c352ecb461084727da/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2879, 12, 2890, 16, 845, 4672, 309, 486, 845, 18, 1080, 63, 1916, 18, 409, 13332, 8009, 6406, 1435, 521, 471, 365, 18, 2019, 67, 9149, 18, 291, 67, 4285, 67, 1369, 67, 12111, 13332, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2879, 12, 2890, 16, 845, 4672, 309, 486, 845, 18, 1080, 63, 1916, 18, 409, 13332, 8009, 6406, 1435, 521, 471, 365, 18, 2019, 67, 9149, 18, 291, 67, 4285, 67, 1369, 67, 12111, 13332, ...
output_start.backward_to_tag_toggle(OUTPUT) assert output_start.begins_tag(OUTPUT) _before_newline, after_newline = it.backward_search( '\n', 0, output_start)
output_tag = tb.get_tag_table().lookup(OUTPUT) output_start.backward_to_tag_toggle(output_tag) assert output_start.begins_tag(output_tag) r = it.backward_search('\n', 0, output_start) if r is not None: _before_newline, after_newline = r else: after_newline = output_start
def write(self, data, tag_names, onnewline=False, addbreaks=True): """ Write data (unicode string) to the text buffer, marked with tag_names. (tag_names can be either a string or a list of strings) If onnewline is True, will add a newline if the output until now doesn't end with one. If addbreaks is True, '\r' chars will be added so that lines will be broken and output will not burden the textview. Return a TextIter pointing to the end of the written text. """ tb = self.textbuffer if isinstance(tag_names, basestring): tag_names = [tag_names] if not data: return if self.added_newline: if onnewline: # If we added a newline, it means that the section didn't end # with a newline, so we need to add one. data = '\n' + data it = tb.get_iter_at_mark(self.mark) it2 = it.copy() it2.backward_char() assert tb.get_text(it2, it) == '\n' tb.delete(it2, it) self.added_newline = False
84929a93dffa8d3fd0d903b1839c2eee795e9b2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10932/84929a93dffa8d3fd0d903b1839c2eee795e9b2b/output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 16, 1047, 67, 1973, 16, 603, 22861, 33, 8381, 16, 527, 29292, 33, 5510, 4672, 3536, 2598, 501, 261, 9124, 533, 13, 358, 326, 977, 1613, 16, 9350, 598, 1047, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 12, 2890, 16, 501, 16, 1047, 67, 1973, 16, 603, 22861, 33, 8381, 16, 527, 29292, 33, 5510, 4672, 3536, 2598, 501, 261, 9124, 533, 13, 358, 326, 977, 1613, 16, 9350, 598, 1047, ...
for file in command.files:
for file in (f for f in command.files if not f.closed):
def _CH_process_results(self, command): for file in command.files: try: bonjour.DNSServiceProcessResult(file.file) except: # Should we close the file? The documentation doesn't say anything about this. -Luci import traceback traceback.print_exc() # reinsert the files which were not closed in the select list for file in (f for f in command.files if not f.closed): self._files.append(file) self._select_proc.kill(RestartSelect)
8e35ab24bf2b7ebd86f546a9d1d49ec606190fd1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5703/8e35ab24bf2b7ebd86f546a9d1d49ec606190fd1/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1792, 67, 2567, 67, 4717, 12, 2890, 16, 1296, 4672, 364, 585, 316, 261, 74, 364, 284, 316, 1296, 18, 2354, 309, 486, 284, 18, 12204, 4672, 775, 30, 324, 265, 78, 477, 18, 11602,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1792, 67, 2567, 67, 4717, 12, 2890, 16, 1296, 4672, 364, 585, 316, 261, 74, 364, 284, 316, 1296, 18, 2354, 309, 486, 284, 18, 12204, 4672, 775, 30, 324, 265, 78, 477, 18, 11602,...
map = VarMap() pass
rulemap = varmap.copy() if query.unify(rule.consequent, rulemap): for antmap in self.answer_iter(rule.antecedents, rulemap): for finalmap in self.answer_iter(rest, antmap): yield finalmap if __name__ == '__main__': r1 = Rule(Predicate('exists', [ Predicate('file',[Predicate('myfile'), Predicate('.c')]) ])) r2 = Rule(Predicate('buildable', [ Predicate('file',[Var('base'), Predicate('.o')]) ]), [Predicate('exists', [ Predicate('file',[Var('base'), Predicate('.c')]) ]) ]) q = Predicate('buildable', [Predicate('file',[Predicate('myfile'), Predicate('.o')])]) prolog = Prolog() prolog.add_rule(r1) prolog.add_rule(r2) for answer in prolog.answer_iter( [q] ): print answer
def answer_iter( self, query ): # TODO: this is the meat of everything, right? for rule in self.rules: map = VarMap() # TODO: unify with the consequent. If success, add to queries and # do it all over again.... # # We may want to make this a queries (plural) iterator and allow a # (copy of a) map to be passed.... pass
4c11f87c46e68caaf61290f0e699940ee52ad8b4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6444/4c11f87c46e68caaf61290f0e699940ee52ad8b4/prolog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5803, 67, 2165, 12, 365, 16, 843, 262, 30, 468, 2660, 30, 333, 353, 326, 1791, 270, 434, 7756, 16, 2145, 35, 364, 1720, 316, 365, 18, 7482, 30, 852, 273, 4562, 863, 1435, 468, 2660, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5803, 67, 2165, 12, 365, 16, 843, 262, 30, 468, 2660, 30, 333, 353, 326, 1791, 270, 434, 7756, 16, 2145, 35, 364, 1720, 316, 365, 18, 7482, 30, 852, 273, 4562, 863, 1435, 468, 2660, ...
for result in self._leakDetector.getContainerByIdGen(id):
for container in self._leakDetector.getContainerByIdGen(id):
def run(self): try: ids = self._leakDetector.getContainerIds() for id in ids: yield None try: for result in self._leakDetector.getContainerByIdGen(id): yield None container = result except: # reference is invalid, remove it self._leakDetector.removeContainerById(id) except Exception, e: print 'PruneContainerRefs job caught exception: %s' % e if __dev__: #raise e pass yield Job.Done
2144050758ff193ad2f7bd973df523fae0d7fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/2144050758ff193ad2f7bd973df523fae0d7fd5c/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 775, 30, 3258, 273, 365, 6315, 298, 581, 12594, 18, 588, 2170, 2673, 1435, 364, 612, 316, 3258, 30, 2824, 599, 775, 30, 364, 1478, 316, 365, 6315, 298, 581, 12594...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 775, 30, 3258, 273, 365, 6315, 298, 581, 12594, 18, 588, 2170, 2673, 1435, 364, 612, 316, 3258, 30, 2824, 599, 775, 30, 364, 1478, 316, 365, 6315, 298, 581, 12594...
(reader.line_num, file_name), (file_name, reader.line_num),
(line_num, file_name), (file_name, line_num),
def _ReadCsvDict(self, file_name, all_cols, required): """Reads lines from file_name, yielding a dict of unicode values.""" assert file_name.endswith(".txt") table_name = file_name[0:-4] contents = self._GetUtf8Contents(file_name) if not contents: return
abdfa0b8f5b185dd8841178602aff17fe260b6a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6302/abdfa0b8f5b185dd8841178602aff17fe260b6a4/transitfeed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1994, 16759, 5014, 12, 2890, 16, 585, 67, 529, 16, 777, 67, 6842, 16, 1931, 4672, 3536, 7483, 2362, 628, 585, 67, 529, 16, 31009, 279, 2065, 434, 5252, 924, 12123, 1815, 585, 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, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1994, 16759, 5014, 12, 2890, 16, 585, 67, 529, 16, 777, 67, 6842, 16, 1931, 4672, 3536, 7483, 2362, 628, 585, 67, 529, 16, 31009, 279, 2065, 434, 5252, 924, 12123, 1815, 585, 67, ...
''' return a new HTMLItem '''
""" return a new HTMLItem """
def __getattr__(self, attr): ''' return a new HTMLItem ''' if not self._value: # handle a special page templates lookup if attr == '__render_with_namespace__': def nothing(*args, **kw): return '' return nothing msg = self._('Attempt to look up %(attr)s on a missing value') return MissingValue(msg%locals()) i = HTMLItem(self._client, self._prop.classname, self._value) return getattr(i, attr)
16a3ebf380b95607b344181655488d818a27791f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/16a3ebf380b95607b344181655488d818a27791f/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 327, 279, 394, 3982, 1180, 3536, 309, 486, 365, 6315, 1132, 30, 468, 1640, 279, 4582, 1363, 5539, 3689, 309, 1604, 422, 4940, 5902, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 327, 279, 394, 3982, 1180, 3536, 309, 486, 365, 6315, 1132, 30, 468, 1640, 279, 4582, 1363, 5539, 3689, 309, 1604, 422, 4940, 5902, ...
sage: EllipticCurve('123a1').sha_an_padic(41)
NOTE: the following doctest is DISABLED. When I put in the fix for trac I'm not sure whether this indicates a bug, possibly a normalisation issue. sage.: EllipticCurve('123a1').sha_an_padic(41)
def sha_an_padic(self, p, prec=0): r""" Returns the conjectural order of Sha(E), according to the $p$-adic analogue of the BSD conjecture.
4e7327ce3ed08a54abc7fb27757a46f6fb3a5baa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/4e7327ce3ed08a54abc7fb27757a46f6fb3a5baa/ell_rational_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6056, 67, 304, 67, 6982, 335, 12, 2890, 16, 293, 16, 13382, 33, 20, 4672, 436, 8395, 2860, 326, 356, 937, 3766, 1353, 434, 2638, 69, 12, 41, 3631, 4888, 358, 326, 271, 84, 8, 17, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6056, 67, 304, 67, 6982, 335, 12, 2890, 16, 293, 16, 13382, 33, 20, 4672, 436, 8395, 2860, 326, 356, 937, 3766, 1353, 434, 2638, 69, 12, 41, 3631, 4888, 358, 326, 271, 84, 8, 17, 2...
ids = move_line_pool.search(cr, uid, [('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context)
search_type = 'credit' account_type = False if ttype == 'receipt': search_type = 'debit' account_type = 'receivable' elif ttype == 'payment': search_type = 'credit' account_type = 'payable' ids = move_line_pool.search(cr, uid, [('account_id.type','=', account_type), ('reconcile_id','=', False), ('partner_id','=',partner_id)], context=context) total = 0.0
def onchange_partner_id(self, cr, uid, ids, partner_id, ttype, journal_id=False, context={}): """ Returns a dict that contains new values and context @param cr: A database cursor @param user: ID of the user currently logged in @param partner_id: latest value from user input for field partner_id @param args: other arguments @param context: context arguments, like lang, time zone @return: Returns a dict which contains new values, and context """ move_pool = self.pool.get('account.move') line_pool = self.pool.get('account.voucher.line') move_line_pool = self.pool.get('account.move.line') partner_pool = self.pool.get('res.partner') journal_pool = self.pool.get('account.journal') res = [] context.update({ 'type':ttype, 'partner_id':partner_id, 'voucher':True, }) if journal_id: context.update({ 'journal_id':journal_id, }) default = { 'value':{}, 'context':context, } if not partner_id or not ttype: if ids: line_ids = line_pool.search(cr, uid, [('voucher_id','=',ids[0])]) if line_ids: line_pool.unlink(cr, uid, line_ids) return default
5e56a23f983ef8307bea7ad99f730bb7aee1eb09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5e56a23f983ef8307bea7ad99f730bb7aee1eb09/voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 19170, 67, 350, 16, 27963, 16, 13001, 67, 350, 33, 8381, 16, 819, 12938, 4672, 3536, 2860, 279, 2065, 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, 603, 3427, 67, 31993, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 19170, 67, 350, 16, 27963, 16, 13001, 67, 350, 33, 8381, 16, 819, 12938, 4672, 3536, 2860, 279, 2065, 716, ...
in_ert = 0
in_ert = False
def revert_unicode(document): '''Transform unicode symbols according to the unicode list.
8397a051fa11df82b80bc62458ae1c9a387f891b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/8397a051fa11df82b80bc62458ae1c9a387f891b/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 9124, 12, 5457, 4672, 9163, 4059, 5252, 7963, 4888, 358, 326, 5252, 666, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 15226, 67, 9124, 12, 5457, 4672, 9163, 4059, 5252, 7963, 4888, 358, 326, 5252, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.telnet = telnetlib.Telnet(self.IP, self.Query, self.Timeout)
self.telnet = telnetlib.Telnet(self.IP, self.Query)
def connect(self): """ Open a link to the Teamspeak 3 query port @return: A tulpe with a error code. Example: ('error', 0, 'ok') """ try: self.telnet = telnetlib.Telnet(self.IP, self.Query, self.Timeout) except telnetlib.socket.error: raise TS3Error(10, 'Can not open a link on the port or IP') output = self.telnet.read_until('TS3', self.Timeout) if output.endswith('TS3') == False: raise TS3Error(20, 'This is not a Teamspeak 3 Server') else: return True
fc2187c364b08787b0db579e0001de2e6588d973 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12780/fc2187c364b08787b0db579e0001de2e6588d973/PyTS3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 4672, 3536, 3502, 279, 1692, 358, 326, 10434, 87, 10244, 890, 843, 1756, 632, 2463, 30, 432, 268, 332, 347, 598, 279, 555, 981, 18, 5090, 30, 7707, 1636, 2187, 374, 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, 3077, 12, 2890, 4672, 3536, 3502, 279, 1692, 358, 326, 10434, 87, 10244, 890, 843, 1756, 632, 2463, 30, 432, 268, 332, 347, 598, 279, 555, 981, 18, 5090, 30, 7707, 1636, 2187, 374, 16,...
if sys.platform == 'win33':
if sys.platform == 'win32':
def dashboard(): """ Builds a ti app for the bashboard. you must have the tit env setup linux builds a OpenGeo Suite.tgz file windows builds a OpenGeo Suite.exe file <-- which is really a zip file. """ # build dashboard userhome = os.getenv("HOME") TIBUILD = "%s/.titanium/" % userhome TIENV = "%s/.titanium/sdk/linux/0.6.0/" % userhome base_path = path(os.getcwd().strip("buildscripts")) dash_base = path.joinpath(base_path,"dashboard") dashboard = path.joinpath(dash_base,"OpenGeo Suite") # will this work? with pushd(dashboard): if sys.platform == 'linux2': sh("tibuild.py -v -d . -n -t bundle -s %s -a %s ." % (TIBUILD, TIENV)) if sys.platform == 'win32': sh("""tibuild.py -v -d . -s "C:\Documents and Settings\All Users\Application Data\Titanium" -a "C:\Documents and Settings\All Users\Application Data\Titanium\sdk\win32\0.6.0" . -n -t bundle""") else: # What do we on OS X ? pass # move finished if sys.platform == 'linux2': copy(path.joinpath(dashboard,"OpenGeo Suite.tgz"),source_path) with pushd(source_path): sh("gunzip OpenGeo\ Suite.tgz ; tar -xf OpenGeo\ Suite.tar") os.remove("OpenGeo Suite.tar") if sys.platform == 'win33': copy(path.joinpath(dashboard,"OpenGeo Suite.exe"),source_path) with pushed(source_path): unzip_file("OpenGeo Suite.exe") os.remove("OpenGeo Suite.ext")
70fd77a84cce55ee585cf36fb7a32e1c785c9273 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3279/70fd77a84cce55ee585cf36fb7a32e1c785c9273/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11825, 13332, 3536, 3998, 87, 279, 11374, 595, 364, 326, 324, 6219, 18, 1846, 1297, 1240, 326, 268, 305, 1550, 3875, 225, 19725, 10736, 279, 3502, 12447, 348, 9519, 18, 88, 9764, 585, 99...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11825, 13332, 3536, 3998, 87, 279, 11374, 595, 364, 326, 324, 6219, 18, 1846, 1297, 1240, 326, 268, 305, 1550, 3875, 225, 19725, 10736, 279, 3502, 12447, 348, 9519, 18, 88, 9764, 585, 99...
self._code.append('%s T*' % self._formatText(line)) if self._canvas.bottomup: self._y = self._y - self._leading else: self._y = self._y + self._leading self._x = self._x0
self.textLine(line)
def textLines(self, stuff, trim=1): """prints multi-line or newlined strings, moving down. One comon use is to quote a multi-line block in your Python code; since this may be indented, by default it trims whitespace off each line and from the beginning; set trim=0 to preserve whitespace.""" if type(stuff) == StringType: lines = string.split(string.strip(stuff), '\n') if trim==1: lines = map(string.strip,lines) elif type(stuff) == ListType: lines = stuff elif type(stuff) == TupleType: lines = stuff else: assert 1==0, "argument to textlines must be string,, list or tuple"
c8807bcce56d0da528e6e56ed9baa7e7f4382f44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/c8807bcce56d0da528e6e56ed9baa7e7f4382f44/textobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 5763, 12, 2890, 16, 10769, 16, 2209, 33, 21, 4672, 3536, 1188, 87, 3309, 17, 1369, 578, 394, 22316, 2064, 16, 12499, 2588, 18, 225, 6942, 532, 265, 999, 353, 358, 3862, 279, 3309,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 977, 5763, 12, 2890, 16, 10769, 16, 2209, 33, 21, 4672, 3536, 1188, 87, 3309, 17, 1369, 578, 394, 22316, 2064, 16, 12499, 2588, 18, 225, 6942, 532, 265, 999, 353, 358, 3862, 279, 3309,...
topindex = self.model.index(0,0,QtCore.QModelIndex())
topindex = self.model.index(0, 0, QtCore.QModelIndex())
def rowCount(self): """ Tests self.model's implementation of QtCore.QAbstractItemModel::rowCount() and hasChildren()
ed4ea4fec39587cca2aeb18d36a0fa5f722ca150 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/ed4ea4fec39587cca2aeb18d36a0fa5f722ca150/modeltest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14888, 12, 2890, 4672, 3536, 7766, 87, 365, 18, 2284, 1807, 4471, 434, 20193, 18, 53, 7469, 1180, 1488, 2866, 492, 1380, 1435, 471, 27780, 1435, 2, 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, 0, 0, 0, 0, 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, 14888, 12, 2890, 4672, 3536, 7766, 87, 365, 18, 2284, 1807, 4471, 434, 20193, 18, 53, 7469, 1180, 1488, 2866, 492, 1380, 1435, 471, 27780, 1435, 2, -100, -100, -100, -100, -100, -100, -1...
'%H:%M'):
'%H:%M', '%Y-%m'):
def _dateConvertFromDB(d): if d==None: return None for format in ('%Y-%m-%d', # Y/M/D '%H:%M:%S', # hh:mm:ss '%H:%M'): # hh:mm try: return DateTime.strptime(d, format) except: pass dashind = d.rfind('-') tz = d[dashind:] d = d[:dashind] try: return DateTime.strptime(d, '%H:%M:%S'), tz # timetz except: pass try: # why is tz returned above and not here? return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S') # full date except: raise
5d28910fad22d51075deea77ab5b1b00056146ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/5d28910fad22d51075deea77ab5b1b00056146ed/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 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, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 4...
self.hboxlayout3.addItem(spacerItem4) self.vboxlayout6.addLayout(self.hboxlayout3) self.vboxlayout5.addWidget(self.update_btngrp) self.vboxlayout4.addWidget(self.groupBox2)
self.hboxlayout4.addItem(spacerItem4) self.vboxlayout4.addLayout(self.hboxlayout4) self.vboxlayout3.addWidget(self.update_btngrp) self.vboxlayout1.addWidget(self.groupBox2)
def setupUi(self, MinimizeEnergyPropDialog): MinimizeEnergyPropDialog.setObjectName("MinimizeEnergyPropDialog") MinimizeEnergyPropDialog.resize(QtCore.QSize(QtCore.QRect(0,0,400,842).size()).expandedTo(MinimizeEnergyPropDialog.minimumSizeHint()))
4cf7d69a606c10cf896a0045c5df06ba517408f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4cf7d69a606c10cf896a0045c5df06ba517408f0/MinimizeEnergyPropDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
diff = list(set(oim) - set(gratia) - set(excluded))
diff = [] diff = list(set(gratia) & set(oimInActive) - set(excluded))
def compareVOs(argv=None): # get the list of vos reported by gratia gratia = AccountingReports.GetReportingVOs(AccountingReports.gBegin, AccountingReports.gEnd) # get the list of vos reported by oim oim = AccountingReports.GetListOfRegisteredVO(voType = 'active') excluded = ['unknown','other'] # What is in gratia that is not in oim diff = list(set(gratia) - set(oim) - set(excluded)) # Find out the sites that report these VOs. The code below creates a detailed formatted report. voStr="" # Construct the mysql query string using the conditions for VOnames like (VOName='zeus' or VOName='aceace') for vo in sorted(diff,key=str.lower): voStr+="VOName=\"" + vo + "\" or " voStr=re.compile("VOName=.*\"",re.IGNORECASE).search(voStr).group(0) # join query to find the list of sites that reported these VOs. See the voStr constructed above being used here query = "select T.SiteName, J.VOName from Site T, Probe P, VOProbeSummary J where (" + voStr + ") and P.siteid = T.siteid and J.ProbeName = P.probename and EndTime >= \"" + str(AccountingReports.gBegin) + "\" and EndTime < \"" + str(AccountingReports.gEnd) + "\" and J.ProbeName not like \"psacct:%\" group by J.VOName,T.SiteName order by lower(J.VOName),lower(T.SiteName);" # Run the query and get the results siteVO = AccountingReports.RunQueryAndSplit(query) # Title for the report message = "VO discrepancy between OIM and gratia from "+ str(AccountingReports.gBegin) +" to "+str(AccountingReports.gEnd) + "\n\n" #siteVO=[] # fake test to simulate a the else (All OK) condition # If one or more VOs matched this criteria, then create a formatted report if len(siteVO)!=0: subject = "ALERT! "+ str(len(diff)) + " VOs reported by gratia from " + str(AccountingReports.gBegin) +" to " + str(AccountingReports.gEnd) + " are not in OIM." # alerting header that could be caught by the wrapper script to alert in the subject line of the email message+=subject message+="\nListed below are these VOs along with the sites that reported them.\n" dashLen=59; # for decoration count=0 message+=dashLen*"-" + "\n" message+=(" %s |%5s%-20s|%5s %-20s|"%("# "," ","VO"," ","SITE"))+"\n" message+=dashLen*"-"+"\n" for entry in siteVO: count+=1 site = entry.split('\t')[0] vo = entry.split('\t')[1] if(count<10): message+=(" %d. |%5s%-20s|%5s %-20s|"%(count," ",vo," ",site))+"\n" else: message+=(" %d. |%5s%-20s|%5s %-20s|"%(count," ",vo," ",site))+"\n" message+=dashLen*"-"+"\n" # If no VO matched the criteria else: subject = "All OK! Gratia did not report any VOs not found in OIM for " + str(AccountingReports.gBegin) + " to " + str(AccountingReports.gEnd) # alerting header that could be caught by the wrapper script to alert in the subject line of the email message+=subject message+="\n\n" # What is in oim that is not in gratia - might indicate inactivity for that particular VO diff = list(set(oim) - set(gratia) - set(excluded)) if(len(diff) > 0): message+=str(len(diff)) + " VOs in OIM did not report to gratia. These VOs are listed below."+"\n\n" # sort VOs in the list alphabetically ignoring case count=0 for vo in sorted(diff,key=str.lower): count+=1 message+= vo + "; " if count%5==0: message+="\n" else: message+="All VOs in OIM have reported"+"\n" message+="\n" message+="\n" message = "<pre>" + message + "</pre>" content={} content['text'] = message content['html'] = message content['csv'] = str(None) AccountingReports.sendEmail( (['karthik'], ['karunach@nhn.ou.edu']), subject, content, None,None,'phyast.nhn.ou.edu')
18f59209b1eb9c75171cf9afeb73163acd3a94ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/18f59209b1eb9c75171cf9afeb73163acd3a94ac/compareVOs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 58, 15112, 12, 19485, 33, 7036, 4672, 468, 336, 326, 666, 434, 331, 538, 14010, 635, 3821, 270, 1155, 3821, 270, 1155, 273, 6590, 310, 18631, 18, 967, 29285, 58, 15112, 12, 3032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3400, 58, 15112, 12, 19485, 33, 7036, 4672, 468, 336, 326, 666, 434, 331, 538, 14010, 635, 3821, 270, 1155, 3821, 270, 1155, 273, 6590, 310, 18631, 18, 967, 29285, 58, 15112, 12, 3032, ...
switch.emit('switch', padname, stop_time, start_time)
switch.emit('switch', newpad, stop_time, start_time)
def switch(self, padname): switch = self.pipeline.get_by_name('s') stop_time = switch.emit('block') newpad = switch.get_static_pad(padname) start_time = newpad.get_property('running-time') gst.warning('stop time = %d' % (stop_time,)) gst.warning('stop time = %s' % (gst.TIME_ARGS(stop_time),))
113959d55a9403716892e843b4c646d34c8a6f90 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1020/113959d55a9403716892e843b4c646d34c8a6f90/switch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1620, 12, 2890, 16, 4627, 529, 4672, 1620, 273, 365, 18, 14511, 18, 588, 67, 1637, 67, 529, 2668, 87, 6134, 2132, 67, 957, 273, 1620, 18, 18356, 2668, 2629, 6134, 394, 6982, 273, 1620,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1620, 12, 2890, 16, 4627, 529, 4672, 1620, 273, 365, 18, 14511, 18, 588, 67, 1637, 67, 529, 2668, 87, 6134, 2132, 67, 957, 273, 1620, 18, 18356, 2668, 2629, 6134, 394, 6982, 273, 1620,...
raise ExtractError, "could not change mode"
raise ExtractError("could not change mode")
def chmod(self, tarinfo, targetpath): """Set file permissions of targetpath according to tarinfo. """ if hasattr(os, 'chmod'): try: os.chmod(targetpath, tarinfo.mode) except EnvironmentError, e: raise ExtractError, "could not change mode"
9d576e732e0c14bd37ecb65d8001d6f596cc8566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9d576e732e0c14bd37ecb65d8001d6f596cc8566/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13413, 12, 2890, 16, 8232, 1376, 16, 1018, 803, 4672, 3536, 694, 585, 4371, 434, 1018, 803, 4888, 358, 8232, 1376, 18, 3536, 309, 3859, 12, 538, 16, 296, 343, 1711, 11, 4672, 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, 13413, 12, 2890, 16, 8232, 1376, 16, 1018, 803, 4672, 3536, 694, 585, 4371, 434, 1018, 803, 4888, 358, 8232, 1376, 18, 3536, 309, 3859, 12, 538, 16, 296, 343, 1711, 11, 4672, 775, 30, ...
]),
],
def dtdecode(dt): return datetime.strptime(dt, DATETIMEFMT)
6b8d1fad4d635e8dda40fcb18a8ccd0b55c277a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/726/6b8d1fad4d635e8dda40fcb18a8ccd0b55c277a1/fix42.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3681, 3922, 12, 7510, 4672, 327, 3314, 18, 701, 10650, 12, 7510, 16, 31337, 42, 6152, 13, 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...
[ 1, 1, 1, 1, 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, 3681, 3922, 12, 7510, 4672, 327, 3314, 18, 701, 10650, 12, 7510, 16, 31337, 42, 6152, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if progress_callback: progress_callback(filename, None)
if progress_callback: progress_callback(filename)
def _write(self, directory, progress_callback): """ A helper for L{write} that writes all documentation to a given directory. This is typically called once for the public API documentation, and once for the private API documentation. """ # Write the object documentation. self._write_docs(directory, progress_callback) # Write the tree file (package & class hierarchies) filename = os.path.join(directory, 'trees.html') if progress_callback: progress_callback(filename, None) self._write_trees(filename)
ff8a7768302f9a81d34b7d6002d78ad59f4ed37f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ff8a7768302f9a81d34b7d6002d78ad59f4ed37f/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 12, 2890, 16, 1867, 16, 4007, 67, 3394, 4672, 3536, 432, 4222, 364, 511, 95, 2626, 97, 716, 7262, 777, 7323, 358, 279, 864, 1867, 18, 225, 1220, 353, 14755, 2566, 3647, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 12, 2890, 16, 1867, 16, 4007, 67, 3394, 4672, 3536, 432, 4222, 364, 511, 95, 2626, 97, 716, 7262, 777, 7323, 358, 279, 864, 1867, 18, 225, 1220, 353, 14755, 2566, 3647, 364,...
rlist = [(disk, ren_fn(disk, temp_suffix)) for disk in old_lvs]
rlist = [] for to_ren in old_lvs: find_res = rpc.call_blockdev_find(tgt_node, to_ren) if find_res is not None: rlist.append((to_ren, ren_fn(to_ren, temp_suffix))) info("renaming the old LVs on the target node")
def _ExecD8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for dbrd8.
cff90b79a6d0d95a4694e8c3f4b9fe35f6e54506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/cff90b79a6d0d95a4694e8c3f4b9fe35f6e54506/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, 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, 389, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, -100, -100, -100, -100, -100, -100, -...
"""
r"""
def gen(self,i=0): """ The $i$-th generator of the monoid.
ca219b0206186a194cdf8e11d2082bec654536f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/ca219b0206186a194cdf8e11d2082bec654536f8/string_monoid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 12, 2890, 16, 77, 33, 20, 4672, 436, 8395, 1021, 271, 77, 8, 17, 451, 4456, 434, 326, 6921, 839, 18, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 12, 2890, 16, 77, 33, 20, 4672, 436, 8395, 1021, 271, 77, 8, 17, 451, 4456, 434, 326, 6921, 839, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print 'Usage: %s <JobID> [<JobID>]' %(Script.scriptName) DIRAC.exit(2)
print 'Usage: %s <JobID> [<JobID>]' % ( Script.scriptName ) DIRAC.exit( 2 )
def usage(): print 'Usage: %s <JobID> [<JobID>]' %(Script.scriptName) DIRAC.exit(2)
b88356c8571ab409f104405a01e9407cfe8f8ed6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b88356c8571ab409f104405a01e9407cfe8f8ed6/dirac-admin-get-job-pilot-output.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 2278, 734, 34, 306, 32, 2278, 734, 34, 3864, 738, 261, 7739, 18, 4263, 461, 262, 18544, 2226, 18, 8593, 12, 576, 262, 225, 2, 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, 1, 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, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 411, 2278, 734, 34, 306, 32, 2278, 734, 34, 3864, 738, 261, 7739, 18, 4263, 461, 262, 18544, 2226, 18, 8593, 12, 576, 262, 225, 2, -100, -1...
def to_html (self, author = 'twee'): "returns an HTML representation of this tiddler"
def toHtml (self, author = 'twee'): """Returns an HTML representation of this tiddler."""
def to_html (self, author = 'twee'): "returns an HTML representation of this tiddler" now = time.localtime() output = '<div tiddler="' + self.title + '" tags="' for tag in self.tags: output += tag + ' ' output = output.strip() output += '" modified="' + encode_date(self.modified) + '"' output += ' created="' + encode_date(self.created) + '"' output += ' modifier="' + author + '">' output += encode_text(self.text) + '</div>' return output
6c1969959d8e0961fa5075dac2f76e60b7f2c5fe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11433/6c1969959d8e0961fa5075dac2f76e60b7f2c5fe/tiddlywiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 4353, 261, 2890, 16, 2869, 273, 296, 11246, 1340, 11, 4672, 3536, 1356, 392, 3982, 4335, 434, 333, 268, 1873, 749, 12123, 225, 2037, 273, 813, 18, 3729, 957, 1435, 876, 273, 2368, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4353, 261, 2890, 16, 2869, 273, 296, 11246, 1340, 11, 4672, 3536, 1356, 392, 3982, 4335, 434, 333, 268, 1873, 749, 12123, 225, 2037, 273, 813, 18, 3729, 957, 1435, 876, 273, 2368, ...
self.tk.call(self._w, 'anchor', 'set', entry)
self.tk.call(self._w, 'anchor', 'set', entry)
def anchor_set(self, entry):
b0e44d61d9e592e1acd6aa05eac9704ba5776f61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0e44d61d9e592e1acd6aa05eac9704ba5776f61/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6984, 67, 542, 12, 2890, 16, 1241, 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, 6984, 67, 542, 12, 2890, 16, 1241, 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, ...
qu1.append('(%s.%s %s %s)' % (table._table, x[0], x1, table._columns[x[0]]._symbol_set[0]))
if x[0] in table._columns: qu1.append('(%s.%s %s %s)' % (table._table, x[0], x1, table._columns[x[0]]._symbol_set[0])) else: qu1.append('(%s.%s %s \'%s\')' % (table._table, x[0], x1, x[2]))
def _rec_get(ids, table, parent): if not ids: return [] if 'active' in table._columns: ids2 = table.search(cr, user, [(parent,'in',ids),('active','in', [True, False])]) else: ids2 = table.search(cr, user, [(parent, 'in', ids)]) return ids + _rec_get(ids2, table, parent)
1807dadbfcd077f613c72860e924fae9826a32a4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/1807dadbfcd077f613c72860e924fae9826a32a4/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 309, 296, 3535, 11, 316, 1014, 6315, 5112, 30, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 729,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3927, 67, 588, 12, 2232, 16, 1014, 16, 982, 4672, 309, 486, 3258, 30, 327, 5378, 309, 296, 3535, 11, 316, 1014, 6315, 5112, 30, 3258, 22, 273, 1014, 18, 3072, 12, 3353, 16, 729,...
returned.) If ``pdflatex`` is True and there are no errors, then
returned.) If engine is pdflatex or xelatex and there are no errors, then
def _run_latex_(filename, debug=False, density=150, pdflatex=None, png=False, do_in_background=False): """ This runs LaTeX on the TeX file "filename.tex". It produces files "filename.dvi" (or "filename.pdf"` if ``pdflatex`` is ``True``) and if ``png`` is True, "filename.png". If ``png`` is True and dvipng can't convert the dvi file to png (because of postscript specials or other issues), then dvips is called, and the PS file is converted to a png file. INPUT: - ``filename`` - string: file to process, including full path - ``debug`` - bool (optional, default False): whether to print verbose debugging output - ``density`` - integer (optional, default 150): how big output image is. - ``pdflatex`` - bool (optional, default False): whether to use pdflatex. - ``png`` - bool (optional, default False): whether to produce a png file. - ``do_in_background`` - bool (optional, default False): whether to run in the background. OUTPUT: string, which could be a string starting with 'Error' (if there was a problem), or it could be 'pdf' or 'dvi'. If ``pdflatex`` is False, then a dvi file is created, but if there appear to be problems with it (because of PS special commands, for example), then a pdf file is created instead. The function returns 'dvi' or 'pdf' to indicate which type of file is created. (Detecting problems requires that dvipng be installed; if it is not, then the dvi file is not checked for problems and 'dvi' is returned.) If ``pdflatex`` is True and there are no errors, then 'pdf' is returned. .. warning:: If ``png`` is True, then when using latex (the default), you must have 'dvipng' (or 'dvips' and 'convert') installed on your operating system, or this command won't work. When using pdflatex, you must have 'convert' installed. EXAMPLES:: sage: from sage.misc.latex import _run_latex_, _latex_file_ sage: file = os.path.join(SAGE_TMP, "temp.tex") sage: O = open(file, 'w') sage: O.write(_latex_file_([ZZ[x], RR])); O.close() sage: _run_latex_(file) # random - depends on whether latex is installed 'dvi' """ if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] if not pdflatex and not have_latex(): print "Error: LaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" if pdflatex and not have_pdflatex(): print "Error: PDFLaTeX does not seem to be installed. Download it from" print "ctan.org and try again." return "Error" # if png output + latex, check to see if dvipng or convert is installed. if png: if not pdflatex and not (have_dvipng() or have_convert()): print "" print "Error: neither dvipng nor convert (from the ImageMagick suite)" print "appear to be installed. Displaying LaTeX or PDFLaTeX output" print "requires at least one of these programs, so please install" print "and try again." print "" print "Go to http://sourceforge.net/projects/dvipng/ and" print "http://www.imagemagick.org to download these programs." return "Error" # if png output + pdflatex, check to see if convert is installed. elif pdflatex and not have_convert(): print "" print "Error: convert (from the ImageMagick suite) does not" print "appear to be installed. Displaying PDFLaTeX output" print "requires this program, so please install and try again." print "" print "Go to http://www.imagemagick.org to download it." return "Error" # check_validity: check to see if the dvi file is okay by trying # to convert to a png file. if this fails, return_suffix will be # set to "pdf". return_suffix is the return value for this # function. # # thus if not png output, check validity of dvi output if dvipng # or convert is installed. else: check_validity = have_dvipng() # set up filenames, other strings: base, filename = os.path.split(filename) filename = os.path.splitext(filename)[0] # get rid of extension if len(filename.split()) > 1: raise ValueError, "filename must contain no spaces" if not debug: redirect=' 2>/dev/null 1>/dev/null ' else: redirect='' if do_in_background: background = ' &' else: background = '' if pdflatex: command = "pdflatex" # 'suffix' is used in the string 'convert' ... suffix = "pdf" return_suffix = "pdf" else: command = "latex" suffix = "ps" return_suffix = "dvi" # Define the commands to be used: lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) # dvipng is run with the 'picky' option: this means that if # there are warnings, no png file is created. dvipng = 'cd "%s"&& sage-native-execute dvipng --picky -q -T tight -D %s %s.dvi -o %s.png'%(base, density, filename, filename) dvips = 'sage-native-execute dvips %s.dvi %s'%(filename, redirect) ps2pdf = 'sage-native-execute ps2pdf %s.ps %s'%(filename, redirect) # We seem to need a larger size when using convert compared to # when using dvipng: density = int(1.4 * density / 1.3) convert = 'sage-native-execute convert -density %sx%s -trim %s.%s %s.png %s '%\ (density,density, filename, suffix, filename, redirect) e = 1 # it is possible to get through the following commands # without running a program, so in that case we force error if pdflatex: if png: cmd = ' && '.join([lt, convert]) else: cmd = lt if debug: print cmd e = os.system(cmd + ' ' + redirect + background) else: # latex, not pdflatex if (png or check_validity): if have_dvipng(): cmd = ' && '.join([lt, dvipng]) if debug: print cmd e = os.system(cmd + ' ' + redirect) dvipng_error = not os.path.exists(base + '/' + filename + '.png') # If there is no png file, then either the latex # process failed or dvipng failed. Assume that dvipng # failed, and try running dvips and convert. (If the # latex process failed, then dvips and convert will # fail also, so we'll still catch the error.) if dvipng_error: if png: if have_convert(): cmd = ' && '.join(['cd "%s"'%(base,), dvips, convert]) if debug: print "'dvipng' failed; trying 'convert' instead..." print cmd e = os.system(cmd + ' ' + redirect + background) else: print "Error: 'dvipng' failed and 'convert' is not installed." return "Error: dvipng failed." else: # not png, i.e., check_validity return_suffix = "pdf" cmd = ' && '.join(['cd "%s"'%(base,), dvips, ps2pdf]) if debug: print "bad dvi file; running dvips and ps2pdf instead..." print cmd e = os.system(cmd) if e: # error running dvips and/or ps2pdf command = "pdflatex" lt = 'cd "%s"&& sage-native-execute %s \\\\nonstopmode \\\\input{%s.tex} %s'%(base, command, filename, redirect) if debug: print "error running dvips and ps2pdf; trying pdflatex instead..." print cmd e = os.system(cmd + background) else: # don't have dvipng, so must have convert. run latex, dvips, convert. cmd = ' && '.join([lt, dvips, convert]) if debug: print cmd e = os.system(cmd + ' ' + redirect + background) if e: print "An error occurred." try: print open(base + '/' + filename + '.log').read() except IOError: pass return "Error latexing slide." return return_suffix
f861246ed3920cddfa7558f769e8b83392788530 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/f861246ed3920cddfa7558f769e8b83392788530/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2681, 67, 26264, 67, 12, 3459, 16, 1198, 33, 8381, 16, 12142, 33, 23014, 16, 8169, 26264, 33, 7036, 16, 14476, 33, 8381, 16, 741, 67, 267, 67, 9342, 33, 8381, 4672, 3536, 1220, ...
def testCreateAndDeleteEmptyDocumentAtomTitle(self): self.new_entry.title = gdata.atom.Title(text=self.TITLE) created_entry = self.doclist.Post(self.new_entry, '/feeds/documents/private/full') self.doclist.Delete(created_entry.GetEditLink().href) self.assertEqual(created_entry.title.text, self.TITLE) self.assertEqual(created_entry.category[0].label, 'document')
def testCreateAndDeleteEmptyDocumentAtomTitle(self): self.new_entry.title = gdata.atom.Title(text=self.TITLE) created_entry = self.doclist.Post(self.new_entry, '/feeds/documents/private/full') self.doclist.Delete(created_entry.GetEditLink().href) self.assertEqual(created_entry.title.text, self.TITLE) self.assertEqual(created_entry.category[0].label, 'document')
6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5609/6a1d41e0ebd05471e1aa915fdf0a98f4af4bce69/service_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 1684, 1876, 2613, 1921, 2519, 3641, 4247, 12, 2890, 4672, 365, 18, 2704, 67, 4099, 18, 2649, 273, 314, 892, 18, 7466, 18, 4247, 12, 955, 33, 2890, 18, 14123, 13, 2522, 67, 4099, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1684, 1876, 2613, 1921, 2519, 3641, 4247, 12, 2890, 4672, 365, 18, 2704, 67, 4099, 18, 2649, 273, 314, 892, 18, 7466, 18, 4247, 12, 955, 33, 2890, 18, 14123, 13, 2522, 67, 4099, ...
class WinPopen(Popen): def _execute_child(self, args, executable, preexec_fn, close_fds, cwd, env, universal_newlines, startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite): """Execute program (MS Windows version)""" if not isinstance(args, types.StringTypes): args = subprocess.list2cmdline(args) try: hp, ht, pid, tid = CreateProcess(executable, args, None, None, 0, creationflags, env, cwd, None) except IOError, e: raise WindowsError(*e.args) self._child_created = True self._handle = hp self.pid = pid ht.Close() if p2cread is not None: p2cread.Close() if c2pwrite is not None: c2pwrite.Close() if errwrite is not None: errwrite.Close()
def ReadMessage(From, To, ExitFlag): while True: # read one line a time Line = From.readline() # empty string means "end" if Line != None and Line != "": To(Line.rstrip()) else: break if ExitFlag.isSet(): break
74d6abe349aa3185d9b5482c97db7212732925e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/74d6abe349aa3185d9b5482c97db7212732925e8/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2720, 1079, 12, 1265, 16, 2974, 16, 9500, 4678, 4672, 1323, 1053, 30, 468, 855, 1245, 980, 279, 813, 5377, 273, 6338, 18, 896, 1369, 1435, 468, 1008, 533, 4696, 315, 409, 6, 309, 5377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2720, 1079, 12, 1265, 16, 2974, 16, 9500, 4678, 4672, 1323, 1053, 30, 468, 855, 1245, 980, 279, 813, 5377, 273, 6338, 18, 896, 1369, 1435, 468, 1008, 533, 4696, 315, 409, 6, 309, 5377,...
failif.addifstmt(StmtReturn(ExprLiteral.FALSE))
failif.addifstmt(StmtReturn(ExprLiteral.NULL))
def implementManagerIface(self): p = self.protocol routedvar = ExprVar('aRouted') idvar = ExprVar('aId') shmemvar = ExprVar('aShmem') sizevar = ExprVar('aSize') typevar = ExprVar('type') listenertype = Type('ChannelListener', ptr=1)
4e364ae1be3e0d14bfec732bd5ee4df9aa5066ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/4e364ae1be3e0d14bfec732bd5ee4df9aa5066ec/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2348, 1318, 45, 865, 12, 2890, 4672, 293, 273, 365, 18, 8373, 3237, 329, 1401, 273, 8074, 1537, 2668, 69, 4583, 329, 6134, 612, 1401, 273, 8074, 1537, 2668, 69, 548, 6134, 699, 3917, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2348, 1318, 45, 865, 12, 2890, 4672, 293, 273, 365, 18, 8373, 3237, 329, 1401, 273, 8074, 1537, 2668, 69, 4583, 329, 6134, 612, 1401, 273, 8074, 1537, 2668, 69, 548, 6134, 699, 3917, 1...
logger.warning('full output is in file: %s',soutfile)
if mention_outputfile_on_errors: logger.warning('full output is in file: %s',soutfile)
def cmd(self,cmd,soutfile=None,allowed_exit=[0], capture_stderr=False,timeout=None): "Execute an OS command and captures the stderr and stdout which are returned in a file"
9c3906617fc090c6f61000de8904627597651fb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/9c3906617fc090c6f61000de8904627597651fb0/Shell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 12, 2890, 16, 4172, 16, 87, 26050, 33, 7036, 16, 8151, 67, 8593, 22850, 20, 6487, 7477, 67, 11241, 33, 8381, 16, 4538, 33, 7036, 4672, 315, 5289, 392, 5932, 1296, 471, 21922, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 12, 2890, 16, 4172, 16, 87, 26050, 33, 7036, 16, 8151, 67, 8593, 22850, 20, 6487, 7477, 67, 11241, 33, 8381, 16, 4538, 33, 7036, 4672, 315, 5289, 392, 5932, 1296, 471, 21922, 326...
print 'drawstring "%s"' % string
print 'drawstring (%d;%d) "%s"' % (x, y, string)
def drawstring(self, string, x, y, fgcolor=None, bgcolor=None, font=None, ptsize=0):
6826051ba7063a0a8d275264d88746e7a3a1dfce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6826051ba7063a0a8d275264d88746e7a3a1dfce/osd_sdl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1080, 12, 2890, 16, 533, 16, 619, 16, 677, 16, 10186, 3266, 33, 7036, 16, 31509, 33, 7036, 16, 3512, 33, 7036, 16, 5818, 1467, 33, 20, 4672, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1080, 12, 2890, 16, 533, 16, 619, 16, 677, 16, 10186, 3266, 33, 7036, 16, 31509, 33, 7036, 16, 3512, 33, 7036, 16, 5818, 1467, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -1...
print '!! Attr decl %s created type definition %s' % (self.name(), self.__typeDefinition)
def _resolve (self, wxs): if self.isResolved(): return self #print 'Resolving AD %s' % (self.name(),) node = self.__domNode
d564904c54eda6ecda7cdea92b5f10e44422c2fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/d564904c54eda6ecda7cdea92b5f10e44422c2fc/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10828, 261, 2890, 16, 7075, 87, 4672, 309, 365, 18, 291, 12793, 13332, 327, 365, 468, 1188, 296, 2903, 6282, 11738, 738, 87, 11, 738, 261, 2890, 18, 529, 9334, 13, 756, 273, 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, 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, 10828, 261, 2890, 16, 7075, 87, 4672, 309, 365, 18, 291, 12793, 13332, 327, 365, 468, 1188, 296, 2903, 6282, 11738, 738, 87, 11, 738, 261, 2890, 18, 529, 9334, 13, 756, 273, 365, ...
l.extend(decoding_map_code) if decoding_table_code:
l.extend(decoding_map_code) else:
def getregentry(): return (Codec().encode,Codec().decode,StreamReader,StreamWriter)
88a416f24d864b5c6b03a1e6abf27f80832face9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/88a416f24d864b5c6b03a1e6abf27f80832face9/gencodec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1574, 4099, 13332, 225, 327, 261, 11008, 7675, 3015, 16, 11008, 7675, 3922, 16, 31495, 16, 29421, 13, 225, 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, 336, 1574, 4099, 13332, 225, 327, 261, 11008, 7675, 3015, 16, 11008, 7675, 3922, 16, 31495, 16, 29421, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.halfvspace=round(self.vspace/2)
self.halfvspace=int(round(self.vspace/2))
def __init__(self, canvas, parent, item, colortheme, vspace=20): self.canvas = canvas self.parent = parent self.item = item self.state = 'collapsed' self.selected = False self.edited = False self.children = [] self.colortheme =colortheme self.x = self.y = None self.vspace=vspace self.halfvspace=round(self.vspace/2) self.evenodd=0 if not self.parent: self.canvas.bind('<Configure>',self.reconfig)
61ff8e5b24a5fbf2ce149b080af681dd49c9bbe6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/61ff8e5b24a5fbf2ce149b080af681dd49c9bbe6/treewidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5953, 16, 982, 16, 761, 16, 2036, 7997, 16, 331, 2981, 33, 3462, 4672, 365, 18, 15424, 273, 5953, 365, 18, 2938, 273, 982, 365, 18, 1726, 273, 761, 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, 5953, 16, 982, 16, 761, 16, 2036, 7997, 16, 331, 2981, 33, 3462, 4672, 365, 18, 15424, 273, 5953, 365, 18, 2938, 273, 982, 365, 18, 1726, 273, 761, 365...
Idiomatic usage would look like:
Idiomatic usage would look like::
def whenReady(d): """ Wrap a deferred returned from a pb method in another deferred that expects a RemotePublished as a result. This will allow you to wait until the result is really available. Idiomatic usage would look like: publish.whenReady(serverObject.getMeAPublishable()).addCallback(lookAtThePublishable) """ d2 = defer.Deferred() d.addCallbacks(_pubReady, d2.errback, callbackArgs=(d2,)) return d2
807bb1e3f7877f0a843c0daa60222c2f77db85ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/807bb1e3f7877f0a843c0daa60222c2f77db85ee/publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1347, 8367, 12, 72, 4672, 3536, 4266, 279, 7045, 2106, 628, 279, 6386, 707, 316, 4042, 7045, 716, 10999, 279, 6304, 16451, 487, 279, 563, 18, 225, 1220, 903, 1699, 1846, 358, 2529, 3180,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1347, 8367, 12, 72, 4672, 3536, 4266, 279, 7045, 2106, 628, 279, 6386, 707, 316, 4042, 7045, 716, 10999, 279, 6304, 16451, 487, 279, 563, 18, 225, 1220, 903, 1699, 1846, 358, 2529, 3180,...
if len(argss) > 2: nLines = int(argss[2])
if len( argss ) > 2: nLines = int( argss[2] )
def getLog( self, argss ): """ Get the tail of the log file of the given component """ if len( argss ) < 2: print print self.do_show.__doc__ return
3f21e8ff4ce8897d3ec22f33d1dd4f408a5a68de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3f21e8ff4ce8897d3ec22f33d1dd4f408a5a68de/SystemAdministratorClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9189, 12, 365, 16, 833, 87, 262, 30, 3536, 968, 326, 5798, 434, 326, 613, 585, 434, 326, 864, 1794, 3536, 309, 562, 12, 833, 87, 262, 411, 576, 30, 1172, 1172, 365, 18, 2896, 67, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9189, 12, 365, 16, 833, 87, 262, 30, 3536, 968, 326, 5798, 434, 326, 613, 585, 434, 326, 864, 1794, 3536, 309, 562, 12, 833, 87, 262, 411, 576, 30, 1172, 1172, 365, 18, 2896, 67, 4...
else: self.top_sectionlevel = 2
def __init__(self, document, builder): nodes.NodeVisitor.__init__(self, document) self.builder = builder self.body = []
112154efdea1867f3ef58ae6145818a4100b29ac /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5532/112154efdea1867f3ef58ae6145818a4100b29ac/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 16, 2089, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 9574, 273, 2089, 365, 18, 3432, 273, 5378, 2, 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, 1001, 2738, 972, 12, 2890, 16, 1668, 16, 2089, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 9574, 273, 2089, 365, 18, 3432, 273, 5378, 2, -100, -100, ...
newEnv = extendEnv(VAR, self.env, func_map(lambda x, env=self.env: cons(car(x), evalExp(cadr(x), env)), bindings))
newEnv = extendEnv(VAR, self.env, func_map(lambda x, env=self.env: cons(car(x), evalExp(cdr(x), env)), bindings))
def __call__(self, *args): bindings = [] i = 0 crap = self.llist while crap: var = car(crap) bindings = cons(cons(var, args[i]), bindings) i = i + 1 crap = cdr(crap)
f11e92fe2bc52adb4dffa8e2dd606c09d7b3ccc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/f11e92fe2bc52adb4dffa8e2dd606c09d7b3ccc3/eco.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 7394, 273, 5378, 277, 273, 374, 276, 1266, 273, 365, 18, 80, 1098, 1323, 276, 1266, 30, 569, 273, 5926, 12, 71, 1266, 13, 7394, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 380, 1968, 4672, 7394, 273, 5378, 277, 273, 374, 276, 1266, 273, 365, 18, 80, 1098, 1323, 276, 1266, 30, 569, 273, 5926, 12, 71, 1266, 13, 7394, 273, 1...
vref = GetSliceVref (self.api).call(auth,slice_id) if vref: return vref
def call(self, auth, slice_id_or_name): # Get slice information slices = Slices(self.api, [slice_id_or_name]) if not slices: raise PLCInvalidArgument, "No such slice %r"%slice_id_or_name slice = slices[0] slice_id = slice['slice_id']
642f769c3ba968d944cf14813058640a2d8d350d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7598/642f769c3ba968d944cf14813058640a2d8d350d/GetSliceFamily.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 745, 12, 2890, 16, 1357, 16, 2788, 67, 350, 67, 280, 67, 529, 4672, 468, 968, 2788, 1779, 12390, 273, 9708, 1242, 12, 2890, 18, 2425, 16, 306, 6665, 67, 350, 67, 280, 67, 529, 5717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 745, 12, 2890, 16, 1357, 16, 2788, 67, 350, 67, 280, 67, 529, 4672, 468, 968, 2788, 1779, 12390, 273, 9708, 1242, 12, 2890, 18, 2425, 16, 306, 6665, 67, 350, 67, 280, 67, 529, 5717, ...
self.assertEqual(len(self._foaf.sha), 40)
self.assertEqual(len(self._foaf.sha[0]), 40)
def testCreation(self): self.assertEqual(self._foaf.name, "Ivan Frade") # sha as string self.assertEqual(len(self._foaf.sha), 40)
7f622ce37bf2970211676812a7d7a28535f5e0fd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2682/7f622ce37bf2970211676812a7d7a28535f5e0fd/testfoaf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9906, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 6315, 617, 1727, 18, 529, 16, 315, 45, 90, 304, 478, 354, 323, 7923, 468, 6056, 487, 533, 365, 18, 11231, 5812, 12, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 9906, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 2890, 6315, 617, 1727, 18, 529, 16, 315, 45, 90, 304, 478, 354, 323, 7923, 468, 6056, 487, 533, 365, 18, 11231, 5812, 12, 1897, ...
except tvdb_shownotfound: self._displayMessage(u"tvdb Series not found(%s)" % cfile['filename'])
except Exception: self._displayMessage(u"tvdb Series not found(%s) or there are connection problems with thetvdb.com" % cfile['filename'])
def _getTvdbMetadata(self, cfile, available_metadata): '''Download thetvdb.com meta data return what was input or results from a secondary source return dictionary of metadata ''' global video_type, UI_title video_type=u'TV series' UI_title = cfile['file_seriesname']
881a9111c0613ff73ff321ac94e0e0ed204b9de1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/881a9111c0613ff73ff321ac94e0e0ed204b9de1/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 56, 90, 1966, 2277, 12, 2890, 16, 276, 768, 16, 2319, 67, 4165, 4672, 9163, 7109, 286, 278, 90, 1966, 18, 832, 2191, 501, 327, 4121, 1703, 810, 578, 1686, 628, 279, 9946, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 588, 56, 90, 1966, 2277, 12, 2890, 16, 276, 768, 16, 2319, 67, 4165, 4672, 9163, 7109, 286, 278, 90, 1966, 18, 832, 2191, 501, 327, 4121, 1703, 810, 578, 1686, 628, 279, 9946, 1...
print "renamed", file, "to", bak
print("renamed", file, "to", bak)
def check(file): if os.path.isdir(file) and not os.path.islink(file): if verbose: print "listing directory", file names = os.listdir(file) for name in names: fullname = os.path.join(file, name) if ((recurse and os.path.isdir(fullname) and not os.path.islink(fullname)) or name.lower().endswith(".py")): check(fullname) return if verbose: print "checking", file, "...", try: f = open(file) except IOError as msg: errprint("%s: I/O Error: %s" % (file, str(msg))) return r = Reindenter(f) f.close() if r.run(): if verbose: print "changed." if dryrun: print "But this is a dry run, so leaving it alone." if not dryrun: bak = file + ".bak" if os.path.exists(bak): os.remove(bak) os.rename(file, bak) if verbose: print "renamed", file, "to", bak f = open(file, "w") r.write(f) f.close() if verbose: print "wrote new", file else: if verbose: print "unchanged."
6247fdbf93a8c72e1be40d396102b7f1a1271c95 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/6247fdbf93a8c72e1be40d396102b7f1a1271c95/reindent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 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, 866, 12, 768, 4672, 309, 1140, 18, 803, 18, 291, 1214, 12, 768, 13, 471, 486, 1140, 18, 803, 18, 291, 1232, 12, 768, 4672, 309, 3988, 30, 1172, 315, 21228, 1867, 3113, 585, 1257, 273...