rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
self.portal.restrictedTraverse('++resource++geo-openlayers.js')
for name in ('geo-openlayers.js', 'proj4js.min.js'): self.portal.restrictedTraverse('++resource++%s' % name)
def test_resource_geoopenlayers_js(self): # bleach -- but to persist is diabolical try: self.portal.restrictedTraverse('++resource++geo-openlayers.js') except AttributeError: self.fail('geo-openlayers.js resource not found')
082be6a166e12f84e01463ae394b8d264f980a40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11395/082be6a166e12f84e01463ae394b8d264f980a40/test_setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3146, 67, 12376, 3190, 10396, 67, 2924, 12, 2890, 4672, 468, 24706, 497, 1493, 1496, 358, 3898, 353, 4314, 378, 1415, 287, 775, 30, 364, 508, 316, 7707, 12376, 17, 3190, 10396,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3146, 67, 12376, 3190, 10396, 67, 2924, 12, 2890, 4672, 468, 24706, 497, 1493, 1496, 358, 3898, 353, 4314, 378, 1415, 287, 775, 30, 364, 508, 316, 7707, 12376, 17, 3190, 10396,...
fulllog, old = False, 0
fulllog, old = False, ""
def main(): log = "" git_test = getoutput("git log --format=%n") if "fatal" in git_test or "--format" in git_test: print("ERROR: your git version is to old.") os.system("git --version") exit(1) if not os.path.exists("cweb.git"): print("* no c3d2-web git repository found") os.mkdir("cweb.git") os.system(git+"init") os.system(git+"remote add web git://194.77.75.60/c3d2-web/git.git") if os.system(git+"fetch web master") == 0: os.system(git+"branch --track master FETCH_HEAD") print("* get filenames from log") log = getoutput(git+"log --name-only --format=%n") else: print("* an error occured during fetch") exit(1) else: print("* fetching updates") createbranch = "master" not in getoutput(git+"branch") if createbranch: print("* guessing error at initial fetch") fulllog, old = False, 0 else: fulllog, old = getstatusoutput(git+"log -1 --format=%h") fulllog = fulllog != 0 if not fulllog: print("* current revision is "+old) else: print("* no revisions available") if os.system(git+"fetch web master") != 0: print("* an error occured during fetch") exit(1) if createbranch: os.system(git+"branch --track master FETCH_HEAD") os.system(git+"update-ref HEAD FETCH_HEAD") new = getoutput(git+"log -1 --format=%h") if not fulllog: print("* fetched revision is "+new) if old != new or fulllog: print("* get filenames from log") if fulllog:log = getoutput(git+"log --name-only --format=%n") else: log = getoutput( "{0}log --name-only --format=%n {1}..{2}".\ format(git,old,new)) else: print("* no new updates") if not update_all: exit() while "\n\n" in log: log = log.replace("\n\n","\n").split("\n") files = [] for line in log: m = re_news.match(line) if m is not None: filename = m.group('file') if filename not in files: files.append(filename) if files: print("* load files from git") os.system(git+"checkout --merge master -- "+" ".join(files)) else: files = list(map(lambda fn:"content/news/"+fn, os.listdir("content/news/"))) for filename in files: if debug: print("* try to add to db: "+filename) data = load_file(filename) else: try: data = load_file(filename) print("* add to db: "+filename) except: data = None print("\033[31m* errör during parsing: "+filename+"\033[m") if data: try: old = Episode.find().filter_by(filename = filename).one() File.find().filter_by(episode = old.id).delete() Link.find().filter_by(episode = old.id).delete() except: old = 0 episode = Episode(filename=filename, **data['episode']) episode.save() if old: Comment.find().filter_by(episode=old.id).update({'episode':episode.id}) Episode.find().filter_by(id = old.id).delete() list(map(lambda kwargs: File(episode=episode.id, **kwargs).add(), data['files'])) list(map(lambda kwargs: Link(episode=episode.id, **kwargs).add(), data['links'])) session().commit() print("done.")
fcd8dacdc190ecb30015f49855df2f26d03d0276 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11349/fcd8dacdc190ecb30015f49855df2f26d03d0276/cwebfetcher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 613, 273, 1408, 225, 5071, 67, 3813, 273, 336, 2844, 2932, 6845, 613, 1493, 2139, 5095, 82, 7923, 309, 315, 30709, 6, 316, 5071, 67, 3813, 578, 5238, 2139, 6, 316, 5071, 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, 2774, 13332, 613, 273, 1408, 225, 5071, 67, 3813, 273, 336, 2844, 2932, 6845, 613, 1493, 2139, 5095, 82, 7923, 309, 315, 30709, 6, 316, 5071, 67, 3813, 578, 5238, 2139, 6, 316, 5071, 6...
sql += " AND message_id IN (%s)" % ", ".join(map(str, message_ids))
sql += " AND message_id IN (%s)" % ", ".join(map(api.db.quote, message_ids))
def __init__(self, api, message_ids, enabled = None): Table.__init__(self, api, Message) sql = "SELECT %s from messages WHERE True" % \ ", ".join(Message.fields)
3906f1deb51d64e57d39dd02192b691ddb83628b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/3906f1deb51d64e57d39dd02192b691ddb83628b/Messages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1536, 16, 883, 67, 2232, 16, 3696, 273, 599, 4672, 3555, 16186, 2738, 972, 12, 2890, 16, 1536, 16, 2350, 13, 225, 1847, 273, 315, 4803, 738, 87, 628, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1536, 16, 883, 67, 2232, 16, 3696, 273, 599, 4672, 3555, 16186, 2738, 972, 12, 2890, 16, 1536, 16, 2350, 13, 225, 1847, 273, 315, 4803, 738, 87, 628, 2...
sql = "select * from iemchat_userprop WHERE \
sql = "select * from nwschat_userprop WHERE \
def confirm_sms(self, elem, bstring): print "confirm_sms step1" _from = jid.JID( elem["from"] ) cs = bstring.strip() sql = "select * from iemchat_userprop WHERE \ username = '%s' and name = 'sms_confirm' and propvalue = '%s'"\ % (_from.user, cs) print sql DBPOOL.runQuery(sql).addCallback(self.confirm_sms2, elem['from'])
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, 6932, 67, 20984, 12, 2890, 16, 3659, 16, 324, 1080, 4672, 1172, 315, 10927, 67, 20984, 2235, 21, 6, 389, 2080, 273, 14201, 18, 46, 734, 12, 3659, 9614, 2080, 11929, 262, 2873, 273, 324...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6932, 67, 20984, 12, 2890, 16, 3659, 16, 324, 1080, 4672, 1172, 315, 10927, 67, 20984, 2235, 21, 6, 389, 2080, 273, 14201, 18, 46, 734, 12, 3659, 9614, 2080, 11929, 262, 2873, 273, 324...
body = _("Collection")+" "+str(coll_id)+" "+_("not found"),
body = _("Collection")+" "+str(coll.id)+" "+_("not found"),
def kb_export(req, kbname="", format="", ln=CFG_SITE_LANG): """ Exports the given kb so that it is listed in stdout (the browser). """ ln = wash_language(ln) _ = gettext_set_language(ln) names = "" errors = "" navtrail_previous_links = bibformatadminlib.getnavtrail(''' &gt; <a class="navtrail" href="%s/admin/bibformat/bibformatadmin.py/kb_manage?ln=%s">%s</a>''' % (CFG_SITE_URL, ln, _("Manage Knowledge Bases"))) if not kbname: return page(title=_("Knowledge base name missing"), body = """Required parameter kbname is missing.""", language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) #in order to make 'wget' downloads easy we do not require authorization #first check the type of the KB kbtype = None kbid = bibformat_dblayer.get_kb_id(kbname) if kbid: kbtype = bibformat_dblayer.get_kb_type(kbid) if kbtype == None or kbtype == 'w': #get the kb and print it mappings = bibformat_dblayer.get_kb_mappings(kbname) if not mappings: return page(title=_("No such knowledge base"), body = "There is no knowledge base named "+kbname+" or it is empty", language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) else: #there were mappings seq = [] #sequence: right sides need to made unique for m in mappings: mkey = m['key'] mvalue = m['value'] if format == "right" or format == "kba": seq.append(mvalue) else: req.write(mkey+"---"+mvalue+"\n") #make unique seq and print it useq = uniq(seq) for s in useq: req.write(s+"\n") if kbtype == 'c': #collection type: call export #get the config of this KB cconfig = bibformat_dblayer.get_kb_coll_config(kbid) errorconf = "" if not cconfig.has_key('field'): errorconf = "field" if not cconfig.has_key('coll_id'): errorconf = "coll_id" if errorconf: return page(title=_("Required config option missing"), body = _("The configuration of this knowledge base is faulty.")+" "+_("Missing option")+" "+errorconf, language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) #we are here and everything's ok.. get the collection name clist = get_alphabetically_ordered_collection_list() colldbquery = "" collname = "" for c in clist: [cname,cformname] = c coll = get_collection(cname) if coll.id == cconfig['coll_id']: collname = cformname colldbquery = coll.dbquery if not collname: return page(title=_("Invalid collection"), body = _("Collection")+" "+str(coll_id)+" "+_("not found"), language=ln, navtrail = navtrail_previous_links, lastupdated=__lastupdated__, req=req) expr = "" if cconfig.has_key('expression'): expr = cconfig['expression'] res = "" #if colldbquery is empty search_pattern will return infinite.. if colldbquery: res = search_pattern(p=colldbquery) else: res = perform_request_search() #just return id's #if there is an expression, query again using it and combine.. res2 = "" if expr: pattern=expr+"*" res2 = search_pattern(p=pattern, f=cconfig['field']) if res2: res = list(Set(res)&Set(res2)) seq = [] #sequence of values to be printed for recid in res: #get the field that was configured myvals = get_fieldvalues(recid, cconfig['field']) #print it myval = " ".join(myvals) if myval: seq.append(myval) useq = uniq(seq) for s in useq: req.write(s+"\n")
ae69a1a358e7ca986ca39bf8e7dd45556a01a38f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2763/ae69a1a358e7ca986ca39bf8e7dd45556a01a38f/bibformatadmin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9182, 67, 6530, 12, 3658, 16, 9182, 529, 1546, 3113, 740, 1546, 3113, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 1312, 4363, 326, 864, 9182, 1427, 716, 518, 353, 12889, 316, 3909...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9182, 67, 6530, 12, 3658, 16, 9182, 529, 1546, 3113, 740, 1546, 3113, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 3536, 1312, 4363, 326, 864, 9182, 1427, 716, 518, 353, 12889, 316, 3909...
process.id = id
def commandForker(cmd, cbCommandEnd, id, defer_results, callbackName, max_exec_time, group, kind): """ """ process = commandProtocol(cmd) if not ProcessList().addProcess(process, id): # a process with the same ID already exists logging.getLogger().warn('launcher %s: attempted to add command %s twice' % (LauncherConfig().name, id)) return False # FIXME: codec should be taken from conf file try: process.handler = twisted.internet.reactor.spawnProcess( process, cmd[0], map(lambda(x): x.encode('utf-8', 'ignore'), cmd), None, # env None, # path None, # uid None, # gid None, # usePTY { 1: 'r', 2: 'r' } # FDs: closing STDIN as not used ) except OSError, e: try: process.handler.loseConnection() except Exception, e2: logging.getLogger().error('launcher %s: loseConnection: %s' % (LauncherConfig().name, e2)) logging.getLogger().error('launcher %s: failed daemonization in commandForker: %d (%s)' % (LauncherConfig().name, e.errno, e.strerror)) return False logging.getLogger().debug('launcher %s: about to execute %s in commandForker' % (LauncherConfig().name, ' '.join(cmd))) process.returnxmlrpcfunc = callbackName process.id = id process.defer_results = defer_results process.endback = cbCommandEnd process.max_age = max_exec_time process.group = group process.kind = kind return True
cf0767600df8f7af46b7388a601ffcaf48e045df /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/cf0767600df8f7af46b7388a601ffcaf48e045df/process_control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1296, 22662, 264, 12, 4172, 16, 2875, 2189, 1638, 16, 612, 16, 2220, 67, 4717, 16, 1348, 461, 16, 943, 67, 4177, 67, 957, 16, 1041, 16, 3846, 4672, 3536, 3536, 1207, 273, 1296, 5752, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1296, 22662, 264, 12, 4172, 16, 2875, 2189, 1638, 16, 612, 16, 2220, 67, 4717, 16, 1348, 461, 16, 943, 67, 4177, 67, 957, 16, 1041, 16, 3846, 4672, 3536, 3536, 1207, 273, 1296, 5752, ...
fi.pluralequation ='(n != 1)'
fi.pluralequation = '(n != 1)'
def create_default_languages(): from pootle_app.core import Language af = Language(code="af") af.fullname = u"Afrikaans" af.specialchars = u"ëïêôûáéíóúý" af.nplurals = '2' af.pluralequation = "(n != 1)" af.save()
705dd9e8bba1245496893550d0b060f0049a0893 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/705dd9e8bba1245496893550d0b060f0049a0893/initdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1886, 67, 14045, 13332, 628, 293, 1632, 298, 67, 2910, 18, 3644, 1930, 9889, 225, 10073, 273, 9889, 12, 710, 1546, 1727, 7923, 10073, 18, 21885, 273, 582, 6, 12664, 566, 7282, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1886, 67, 14045, 13332, 628, 293, 1632, 298, 67, 2910, 18, 3644, 1930, 9889, 225, 10073, 273, 9889, 12, 710, 1546, 1727, 7923, 10073, 18, 21885, 273, 582, 6, 12664, 566, 7282, ...
self.CILabel.setEnabled(True)
self.CICheck.makeConsistent()
def classifier(self, cl): self.closeContext() self.error(2)
73262a6b44aac8122745c128bc45bdad25f591e8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/73262a6b44aac8122745c128bc45bdad25f591e8/OWNomogram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14622, 12, 2890, 16, 927, 4672, 365, 18, 4412, 1042, 1435, 365, 18, 1636, 12, 22, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14622, 12, 2890, 16, 927, 4672, 365, 18, 4412, 1042, 1435, 365, 18, 1636, 12, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
UI.ProgressBar(value=ru, max=rt, width="100"),
UI.ProgressBar(value=ru, max=rt, width="100") if rt != '0' else None,
def get_ui(self): ru, rt = self.get_swap() w = UI.Widget( UI.HContainer( UI.Image(file='/dl/loadavg/widget_swap.png'), UI.Label(text='Swap:', bold=True), UI.ProgressBar(value=ru, max=rt, width="100"), UI.Label(text="%sM / %sM"%(ru,rt)) ) ) return w
d3d8700301cef6a688619fba114aa21f144a3820 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3600/d3d8700301cef6a688619fba114aa21f144a3820/widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4881, 12, 2890, 4672, 19621, 16, 8253, 273, 365, 18, 588, 67, 22270, 1435, 341, 273, 6484, 18, 4609, 12, 6484, 18, 44, 2170, 12, 6484, 18, 2040, 12, 768, 2218, 19, 5761, 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, 4881, 12, 2890, 4672, 19621, 16, 8253, 273, 365, 18, 588, 67, 22270, 1435, 341, 273, 6484, 18, 4609, 12, 6484, 18, 44, 2170, 12, 6484, 18, 2040, 12, 768, 2218, 19, 5761, 19,...
get_NA_rate_for_one_row = classmethod(get_NA_rate_for_one_row)
@classmethod
def get_NA_rate_for_one_row(cls, data_matrix, row_index): """ 2008-05-12 """ return QualityControl.get_NA_rate_for_one_slice(data_matrix, row_index)
c13cb33cb1a6b269be23f22968b5981b73c60e17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9645/c13cb33cb1a6b269be23f22968b5981b73c60e17/TwoSNPData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11277, 67, 5141, 67, 1884, 67, 476, 67, 492, 12, 6429, 16, 501, 67, 5667, 16, 1027, 67, 1615, 4672, 3536, 4044, 28, 17, 6260, 17, 2138, 3536, 327, 4783, 7919, 3367, 18, 588,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11277, 67, 5141, 67, 1884, 67, 476, 67, 492, 12, 6429, 16, 501, 67, 5667, 16, 1027, 67, 1615, 4672, 3536, 4044, 28, 17, 6260, 17, 2138, 3536, 327, 4783, 7919, 3367, 18, 588,...
'''Import information from Control section''' for key in debinfo.keys(): value = debinfo.get(key) self.set(key, value)
'''Patch for olders python-apt libraries''' def getFromDpkg(self,path): control_fields = ['Package', 'Source', 'Version', 'Section','Priority', 'Architecture', 'Maintainer','Pre-Depends', 'Depends', 'Suggests', 'Recommends', 'Enhances', 'enhances', 'Conflicts', 'Provides','Replaces', 'Esential', 'Filename', 'Size', 'Installed-Size', 'MD5sum', 'Description', 'Uploaders', 'Bugs', 'Origin', 'Task'] for key in control_fields: try: command = "/usr/bin/dpkg --field %s %s"%(path, key) value = os.popen(command).read() if len(value) > 0: self.set(key, value.strip()) except: print "Error lanzando dpkg" sys.exit(-20)
def importDebInfo(self,path): file = open(path,"r") #Getting size from the file size = os.stat(path).st_size.__int__() #Getting md5sum content = file.read() file.close() md5_sum = md5.new(content).hexdigest() file = open(path,"r") debinfo = apt_pkg.ParseSection(apt_inst.debExtractControl(file)) file.close() self.set('Size', size) self.set('MD5sum', md5_sum) '''Import information from Control section''' for key in debinfo.keys(): value = debinfo.get(key) self.set(key, value)
9efb1cc95e1a2c5706c6f55501c3674733f4cd4d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1007/9efb1cc95e1a2c5706c6f55501c3674733f4cd4d/package.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 758, 70, 966, 12, 2890, 16, 803, 4672, 225, 585, 273, 1696, 12, 803, 10837, 86, 7923, 468, 19213, 963, 628, 326, 585, 963, 273, 1140, 18, 5642, 12, 803, 2934, 334, 67, 1467, 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, 1930, 758, 70, 966, 12, 2890, 16, 803, 4672, 225, 585, 273, 1696, 12, 803, 10837, 86, 7923, 468, 19213, 963, 628, 326, 585, 963, 273, 1140, 18, 5642, 12, 803, 2934, 334, 67, 1467, 16...
class UnramifiedExtensionRingLazy(UnramifiedExtensionGeneric, pAdicLazyRingGeneric): def __init__(self, poly, prec, halt, print_mode, names): UnramifiedExtensionGeneric.__init__(self, poly, prec, print_mode, names, UnramifiedExtensionLazyElement) pAdicLazyRingGeneric.__init__(self, poly.base_ring().prime(), prec, print_mode, names, halt)
def __init__(self, poly, prec, halt, print_mode, names): UnramifiedExtensionGeneric.__init__(self, poly, prec, print_mode, names, UnramifiedExtensionCappedRelativeElement)
3f749fc2d07ac2b736b4a6e08cfee62c70e3d53b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/3f749fc2d07ac2b736b4a6e08cfee62c70e3d53b/padic_extension_leaves.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 1257, 4672, 1351, 1940, 939, 3625, 7014, 16186, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 1172, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 18389, 16, 1172, 67, 3188, 16, 1257, 4672, 1351, 1940, 939, 3625, 7014, 16186, 2738, 972, 12, 2890, 16, 7573, 16, 13382, 16, 1172, 6...
sys.stderr.write('--- Miniterm on %s: %d,%s,%s,%s. ---\n' % (
sys.stderr.write('--- Miniterm on %s: %d,%s,%s,%s ---\n' % (
def main(): import optparse parser = optparse.OptionParser( usage = "%prog [options] [port [baudrate]]", description = "Miniterm - A simple terminal program for the serial port." ) parser.add_option("-p", "--port", dest = "port", help = "port, a number (default 0) or a device name (deprecated option)", default = None ) parser.add_option("-b", "--baud", dest = "baudrate", action = "store", type = 'int', help = "set baud rate, default 9600", default = 9600 ) parser.add_option("--parity", dest = "parity", action = "store", help = "set parity, one of [N, E, O, S, M], default=N", default = 'N' ) parser.add_option("-e", "--echo", dest = "echo", action = "store_true", help = "enable local echo (default off)", default = False ) parser.add_option("--rtscts", dest = "rtscts", action = "store_true", help = "enable RTS/CTS flow control (default off)", default = False ) parser.add_option("--xonxoff", dest = "xonxoff", action = "store_true", help = "enable software flow control (default off)", default = False ) parser.add_option("--cr", dest = "cr", action = "store_true", help = "do not send CR+LF, send CR only", default = False ) parser.add_option("--lf", dest = "lf", action = "store_true", help = "do not send CR+LF, send LF only", default = False ) parser.add_option("-D", "--debug", dest = "repr_mode", action = "count", help = """debug received data (escape non-printable chars)
0f6a48ec722750ef078f74b1aa09e2fb405fc04e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10955/0f6a48ec722750ef078f74b1aa09e2fb405fc04e/miniterm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 2153, 2670, 225, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 4084, 273, 2213, 14654, 306, 2116, 65, 306, 655, 306, 12124, 1100, 5141, 13563, 3113, 2477, 273, 315, 49, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 2153, 2670, 225, 2082, 273, 2153, 2670, 18, 1895, 2678, 12, 4084, 273, 2213, 14654, 306, 2116, 65, 306, 655, 306, 12124, 1100, 5141, 13563, 3113, 2477, 273, 315, 49, 2...
t = WorkerThread(self.queue)
t = WorkerThread(self.queue, self.render)
def __init__(self): GtkHTML.__init__(self) self.queue = Queue.Queue() self.threads = [] for num_threads in range(NUM_THREADS): t = WorkerThread(self.queue) t.start() self.threads.append(t)
ebc6f62fdc8954e04a0a653e201595386562b99c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12352/ebc6f62fdc8954e04a0a653e201595386562b99c/gtkhtml_demo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 22132, 4870, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4000, 273, 7530, 18, 3183, 1435, 365, 18, 12495, 273, 5378, 364, 818, 67, 12495, 316, 1048, 12, 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, 1001, 2738, 972, 12, 2890, 4672, 22132, 4870, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4000, 273, 7530, 18, 3183, 1435, 365, 18, 12495, 273, 5378, 364, 818, 67, 12495, 316, 1048, 12, 6...
for f in self.outgoingDccFiles:
for f in self._outgoingDccFiles:
def dcc_RESUME(self, user, channel, data): data = text.splitQuoted(data) if len(data) < 3: raise IRCBadMessage, "malformed DCC SEND RESUME request: %r" % (data,) (filename, port, resumePos) = data[:3] try: port = int(port) resumePos = int(resumePos) except ValueError: return # lets see which outgoingFile this goes to for f in self.outgoingDccFiles: if f.user == user and f.port == port: f._gotResumeRequest(filename, resumePos) return
a8d1dc47ec79709995d1f32c5dc36657b9184c01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a8d1dc47ec79709995d1f32c5dc36657b9184c01/irc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 952, 67, 862, 30590, 12, 2890, 16, 729, 16, 1904, 16, 501, 4672, 501, 273, 977, 18, 4939, 15919, 12, 892, 13, 309, 562, 12, 892, 13, 411, 890, 30, 1002, 467, 11529, 6434, 1079, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 302, 952, 67, 862, 30590, 12, 2890, 16, 729, 16, 1904, 16, 501, 4672, 501, 273, 977, 18, 4939, 15919, 12, 892, 13, 309, 562, 12, 892, 13, 411, 890, 30, 1002, 467, 11529, 6434, 1079, ...
sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(block as numeric(7,3)) from small" )
sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(data as numeric(7,3)) from small" )
def ogr_sql_17(): expect = [ '1', '2' ] ds = ogr.Open( 'data/small.mif' ) sql_lyr = ds.ExecuteSQL( "select CAST(fid as CHARACTER(10)), CAST(block as numeric(7,3)) from small" ) fld_def = sql_lyr.GetLayerDefn().GetFieldDefn(0) if fld_def.GetName() != 'fid': gdaltest.post_reason( 'got wrong fid field name' ) print(fld_def.GetName()) return 'fail' if fld_def.GetType() != ogr.OFTString: gdaltest.post_reason( 'got wrong fid field type' ) print(fld_def.GetType()) if fld_def.GetWidth() != 10: gdaltest.post_reason( 'got wrong fid field width' ) print(fld_def.GetWidth()) fld_def = sql_lyr.GetLayerDefn().GetFieldDefn(1) if fld_def.GetName() != 'block': gdaltest.post_reason( 'got wrong block field name' ) print(fld_def.GetName()) return 'fail' if fld_def.GetType() != ogr.OFTReal: gdaltest.post_reason( 'got wrong block field type' ) print(fld_def.GetType()) if fld_def.GetWidth() != 7: gdaltest.post_reason( 'got wrong block field width' ) print(fld_def.GetWidth()) if fld_def.GetPrecision() != 3: gdaltest.post_reason( 'got wrong block field precision' ) print(fld_def.GetPrecision()) tr = ogrtest.check_features_against_list( sql_lyr, 'fid', expect ) ds.ReleaseResultSet( sql_lyr ) ds = None if tr: return 'success' else: return 'fail'
bbb60399133bc8de50cbc4ccc5f573423c88b301 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/bbb60399133bc8de50cbc4ccc5f573423c88b301/ogr_sql_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 320, 3197, 67, 4669, 67, 4033, 13332, 225, 4489, 273, 306, 296, 21, 2187, 296, 22, 11, 308, 225, 3780, 273, 320, 3197, 18, 3678, 12, 296, 892, 19, 12019, 18, 81, 430, 11, 262, 1847, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 320, 3197, 67, 4669, 67, 4033, 13332, 225, 4489, 273, 306, 296, 21, 2187, 296, 22, 11, 308, 225, 3780, 273, 320, 3197, 18, 3678, 12, 296, 892, 19, 12019, 18, 81, 430, 11, 262, 1847, ...
(x,y,z)=matrix.transform(x,y,z)
if self.matrix[-1]: (x,y,z)=self.matrix[-1].transform(x,y,z)
def makepoly(self, haveuv, vtx, idx=None): if self.t==None: return False # Only care about textured polygons if not self.loc: return False # Not for library objects if self.debug: self.debug.write("Poly: %s %s %s %d " % (basename(self.tex[self.t]), self.alt, self.layer, self.zbias))
d87ee6f81b21f2c4fda5318c88bdcdd71b150057 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11663/d87ee6f81b21f2c4fda5318c88bdcdd71b150057/convbgl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 881, 355, 93, 12, 2890, 16, 1240, 16303, 16, 331, 978, 16, 2067, 33, 7036, 4672, 309, 365, 18, 88, 631, 7036, 30, 327, 1083, 202, 7, 5098, 7671, 2973, 977, 2862, 17294, 309, 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, 29796, 881, 355, 93, 12, 2890, 16, 1240, 16303, 16, 331, 978, 16, 2067, 33, 7036, 4672, 309, 365, 18, 88, 631, 7036, 30, 327, 1083, 202, 7, 5098, 7671, 2973, 977, 2862, 17294, 309, 4...
elif not self.info.item_viewed and not self.info.expiration_date and not self.info.is_external:
elif (not self.info.item_viewed and not self.info.expiration_date and not self.info.is_external and not self.info.downloaded):
def render(self, context, layout, selected, hotspot, hover): if self.info.state == 'downloading': icon = self.downloading_icon elif self.info.downloaded and self.info.is_playable and not self.info.video_watched: icon = self.unwatched_icon elif not self.info.item_viewed and not self.info.expiration_date and not self.info.is_external: icon = self.new_icon else: return x = int((context.width - self.width) / 2) y = int((context.height - self.height) / 2) icon.draw(context, x, y, self.width, self.height)
6a019769f33e4015c6616b98796205b78bfb2032 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/6a019769f33e4015c6616b98796205b78bfb2032/style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 819, 16, 3511, 16, 3170, 16, 12811, 19032, 16, 15758, 4672, 309, 365, 18, 1376, 18, 2019, 422, 296, 7813, 310, 4278, 4126, 273, 365, 18, 7813, 310, 67, 3950, 1327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1743, 12, 2890, 16, 819, 16, 3511, 16, 3170, 16, 12811, 19032, 16, 15758, 4672, 309, 365, 18, 1376, 18, 2019, 422, 296, 7813, 310, 4278, 4126, 273, 365, 18, 7813, 310, 67, 3950, 1327, ...
self.packageRootFolder = root
self.sourceFolder = root
def build(self, root, resources=None, **options): """Create a package for some given root folder.
9428c10ace2561d7e95b339d8627931d772c6212 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9428c10ace2561d7e95b339d8627931d772c6212/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 1365, 16, 2703, 33, 7036, 16, 2826, 2116, 4672, 3536, 1684, 279, 2181, 364, 2690, 864, 1365, 3009, 18, 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, 1361, 12, 2890, 16, 1365, 16, 2703, 33, 7036, 16, 2826, 2116, 4672, 3536, 1684, 279, 2181, 364, 2690, 864, 1365, 3009, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
assert(scale(1.1, 12.3) == (1.0, 13.0, 1.0)) assert(scale(-1.1, 12.3) == (-2.0, 13.0, 1.0))
assert(scale(1.1, 12.3) == (0.0, 14.0, 2.0)) assert(scale(-1.1, 12.3) == (-2.0, 14.0, 2.0))
def pickLabelFormat(increment): i_log = math.log10(increment) if i_log < 0 : i_log = abs(i_log) decimal_places = int(i_log) if i_log != decimal_places : decimal_places += 1 else : decimal_places = 0 return "%%.%df" % decimal_places
0918dadc20713f02bd4addb96b25d07d3ffefa39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1013/0918dadc20713f02bd4addb96b25d07d3ffefa39/utilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6002, 2224, 1630, 12, 15016, 4672, 225, 277, 67, 1330, 273, 4233, 18, 1330, 2163, 12, 15016, 13, 309, 277, 67, 1330, 411, 374, 294, 277, 67, 1330, 273, 2417, 12, 77, 67, 1330, 13, 69...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6002, 2224, 1630, 12, 15016, 4672, 225, 277, 67, 1330, 273, 4233, 18, 1330, 2163, 12, 15016, 13, 309, 277, 67, 1330, 411, 374, 294, 277, 67, 1330, 273, 2417, 12, 77, 67, 1330, 13, 69...
'--remove_dead_assignments', 'false', '--remove_dead_code', 'false', '--remove_unused_vars', 'false', '--remove_unused_prototype_props', 'false', '--collapse_variable_declarations', 'false', '--disable_function_inline', 'true', '--noextract_prototype_member_decl', 'true', '--pretty_print',
def BuildCompiledO3DJS(o3djs_files, externs_path, o3d_externs_js_path, compiled_o3djs_outpath): Execute([ _java_exe, '-jar', MakePath('../../o3d-internal/jscomp/JSCompiler_deploy.jar'), '--property_renaming', 'OFF', '--variable_renaming', 'LOCAL', '--remove_dead_assignments', 'false', '--remove_dead_code', 'false', '--remove_unused_vars', 'false', '--remove_unused_prototype_props', 'false', #'--check_missing_return', 'true', # '--collapse_variable_declarations', 'false', '--disable_function_inline', 'true', '--noextract_prototype_member_decl', 'true', #'--disable_convert_to_dotted_properties', 'true', #'--inline_functions', 'false', # TODO(gman): Remove the flags below once the compiled js actually works. '--pretty_print', #'--print_input_delimiter', 'true', #'--strip_whitespace_and_comments_only', 'true', ##'--logging_level', '', '--strict', '--externs=%s' % externs_path, ('--externs=%s' % o3d_externs_js_path), ('--js_output_file=%s' % compiled_o3djs_outpath)] + ['-js=%s' % (x, ) for x in o3djs_files]); # strip out goog.exportSymbol and o3djs.require stuff file = open(compiled_o3djs_outpath, 'r') contents = file.read() file.close() contents = re.sub(r'goog.exportSymbol\([^\)]*\);\n', '', contents) contents = re.sub(r'o3djs.require\([^\)]*\);\n', '', contents) file = open(compiled_o3djs_outpath, 'w') file.write(contents) file.close()
756ac71a81a5be5e4e1b23c2734b5631848fe0fc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/756ac71a81a5be5e4e1b23c2734b5631848fe0fc/build_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3998, 20733, 51, 23, 40, 6479, 12, 83, 23, 72, 2924, 67, 2354, 16, 18885, 87, 67, 803, 16, 320, 23, 72, 67, 338, 798, 87, 67, 2924, 67, 803, 16, 7743, 67, 83, 23, 72, 2924, 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, 3998, 20733, 51, 23, 40, 6479, 12, 83, 23, 72, 2924, 67, 2354, 16, 18885, 87, 67, 803, 16, 320, 23, 72, 67, 338, 798, 87, 67, 2924, 67, 803, 16, 7743, 67, 83, 23, 72, 2924, 67, ...
dirs = [dir]
dirs = [dirname]
def findRpms(dir, uselstat=None, verbose=0): s = os.stat if uselstat: s = os.lstat dirs = [dir] files = [] while dirs: d = dirs.pop() for f in os.listdir(d): path = "%s/%s" % (d, f) st = s(path) if S_ISREG(st.st_mode) and f[-4:] == ".rpm": files.append(path) elif S_ISDIR(st.st_mode): dirs.append(path) else: if verbose > 2: print "ignoring non-rpm", path return files
e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 54, 84, 959, 12, 1214, 16, 584, 292, 5642, 33, 7036, 16, 3988, 33, 20, 4672, 272, 273, 1140, 18, 5642, 309, 584, 292, 5642, 30, 272, 273, 1140, 18, 80, 5642, 7717, 273, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1104, 54, 84, 959, 12, 1214, 16, 584, 292, 5642, 33, 7036, 16, 3988, 33, 20, 4672, 272, 273, 1140, 18, 5642, 309, 584, 292, 5642, 30, 272, 273, 1140, 18, 80, 5642, 7717, 273, 306, ...
'peppy.major_mode': ['*.peppy-plugin' ],
'peppy.major_modes': ['*.peppy-plugin' ],
def addmodules(arg, dirname, names): if '__init__.py' in names: prefix = os.path.commonprefix((path, dirname)) mod = "%s%s" % (name, dirname[len(prefix):].replace(os.sep,'.')) if mod not in packages: packages.append(mod)
8087df4e11fb0165549363038ed96407bfa16490 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/8087df4e11fb0165549363038ed96407bfa16490/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6400, 12, 3175, 16, 4283, 16, 1257, 4672, 309, 4940, 2738, 25648, 2074, 11, 316, 1257, 30, 1633, 273, 1140, 18, 803, 18, 6054, 3239, 12443, 803, 16, 4283, 3719, 681, 273, 2213, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6400, 12, 3175, 16, 4283, 16, 1257, 4672, 309, 4940, 2738, 25648, 2074, 11, 316, 1257, 30, 1633, 273, 1140, 18, 803, 18, 6054, 3239, 12443, 803, 16, 4283, 3719, 681, 273, 2213, 87...
utils.run("rm -rf /tmp/zero")
if os.path.isfile("/tmp/zero"): os.remove("/tmp/zero")
def transfer_test(vm, host_path, guest_path, timeout=120): """ vm.copy_files_to does not raise exception, so we need a wrapper in order to make it to be used by BackgroundTest. """ if not vm.copy_files_to(host_path, guest_path, timeout=timeout): raise error.TestError("Fail to do the file transfer!")
980c0cedc86579ba2e369eca78484efd491d6527 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12268/980c0cedc86579ba2e369eca78484efd491d6527/migration_with_file_transfer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7412, 67, 3813, 12, 3489, 16, 1479, 67, 803, 16, 13051, 67, 803, 16, 2021, 33, 22343, 4672, 3536, 4268, 18, 3530, 67, 2354, 67, 869, 1552, 486, 1002, 1520, 16, 1427, 732, 1608, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7412, 67, 3813, 12, 3489, 16, 1479, 67, 803, 16, 13051, 67, 803, 16, 2021, 33, 22343, 4672, 3536, 4268, 18, 3530, 67, 2354, 67, 869, 1552, 486, 1002, 1520, 16, 1427, 732, 1608, 279, ...
def test_wide(self):
def test_width(self):
def test_wide(self): self.assertEqual(u''.width(), 0) self.assertEqual(u'abcd'.width(), 4) self.assertEqual(u'\u0187\u01c9'.width(), 2) self.assertEqual(u'\u2460\u2329'.width(), 3) self.assertEqual(u'\u2329\u2460'.width(), 3) self.assertEqual(u'\ud55c\uae00'.width(), 4) self.assertEqual(u'\ud55c\u2606\uae00'.width(), 5)
942d49cd54ed07c52e72955e5a00828aa421f0ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/942d49cd54ed07c52e72955e5a00828aa421f0ef/test_unicode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2819, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 89, 6309, 18, 2819, 9334, 374, 13, 365, 18, 11231, 5812, 12, 89, 11, 378, 4315, 10332, 2819, 9334, 1059, 13, 365, 18, 11231, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2819, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 89, 6309, 18, 2819, 9334, 374, 13, 365, 18, 11231, 5812, 12, 89, 11, 378, 4315, 10332, 2819, 9334, 1059, 13, 365, 18, 11231, ...
return surf
return pygame.Surface((0, self.height), 0, renpy.game.interface.display.sample_surface)
def render(self, text, antialias, color, black_color=(0, 0, 0, 255), background=None):
61aa933d971bc9d3be7ef8a580b6b0aa6ab7c587 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10962/61aa933d971bc9d3be7ef8a580b6b0aa6ab7c587/font.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 977, 16, 17841, 649, 1795, 16, 2036, 16, 7721, 67, 3266, 28657, 20, 16, 374, 16, 374, 16, 4561, 3631, 5412, 33, 7036, 4672, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 977, 16, 17841, 649, 1795, 16, 2036, 16, 7721, 67, 3266, 28657, 20, 16, 374, 16, 374, 16, 4561, 3631, 5412, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, ...
self.mysqlConnectionsStore = connections
self.mysqlConnectionsStore = result[1]
def getMySQLStatus(self): self.checksLogger.debug('getMySQLStatus: start') if 'MySQLServer' in self.agentConfig and 'MySQLUser' in self.agentConfig and 'MySQLPass' in self.agentConfig and self.agentConfig['MySQLServer'] != '' and self.agentConfig['MySQLUser'] != '' and self.agentConfig['MySQLPass'] != '': self.checksLogger.debug('getMySQLStatus: config') # Try import MySQLdb - http://sourceforge.net/projects/mysql-python/files/ try: import MySQLdb except ImportError, e: self.checksLogger.debug('getMySQLStatus: unable to import MySQLdb') return False # Connect try: db = MySQLdb.connect(self.agentConfig['MySQLServer'], self.agentConfig['MySQLUser'], self.agentConfig['MySQLPass']) except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL connection error: ' + str(message)) return False self.checksLogger.debug('getMySQLStatus: connected') self.checksLogger.debug('getMySQLStatus: getting Connections') # Connections try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Connections"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Connections: ' + str(message)) if self.mysqlConnectionsStore == None: self.checksLogger.debug('getMySQLStatus: mysqlConnectionsStore unset storing for first time') self.mysqlConnectionsStore = result[1] connections = 0 else: self.checksLogger.debug('getMySQLStatus: mysqlConnectionsStore set so calculating') self.checksLogger.debug('getMySQLStatus: self.mysqlConnectionsStore = ' + str(self.mysqlConnectionsStore)) self.checksLogger.debug('getMySQLStatus: result = ' + str(result[1])) connections = float(float(result[1]) - float(self.mysqlConnectionsStore)) / 60 self.mysqlConnectionsStore = connections self.checksLogger.debug('getMySQLStatus: connections = ' + str(connections)) self.checksLogger.debug('getMySQLStatus: getting Connections - done') self.checksLogger.debug('getMySQLStatus: getting Created_tmp_disk_tables') # Created_tmp_disk_tables try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Created_tmp_disk_tables"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Created_tmp_disk_tables: ' + str(message)) if self.mysqlCreatedTmpDiskTablesStore == None: self.checksLogger.debug('getMySQLStatus: mysqlCreatedTmpDiskTablesStore unset so storing for first time') self.mysqlCreatedTmpDiskTablesStore = result[1] createdTmpDiskTables = 0 else: self.checksLogger.debug('getMySQLStatus: mysqlCreatedTmpDiskTablesStore set so calculating') self.checksLogger.debug('getMySQLStatus: self.mysqlCreatedTmpDiskTablesStore = ' + str(self.mysqlCreatedTmpDiskTablesStore)) self.checksLogger.debug('getMySQLStatus: result = ' + str(result[1])) createdTmpDiskTables = float(float(result[1]) - float(self.mysqlCreatedTmpDiskTablesStore)) / 60 self.checksLogger.debug('getMySQLStatus: createdTmpDiskTables = ' + str(createdTmpDiskTables)) self.checksLogger.debug('getMySQLStatus: getting Created_tmp_disk_tables - done') self.checksLogger.debug('getMySQLStatus: getting Max_used_connections') # Max_used_connections try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Max_used_connections"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Max_used_connections: ' + str(message)) maxUsedConnections = result[1] self.checksLogger.debug('getMySQLStatus: maxUsedConnections = ' + str(createdTmpDiskTables)) self.checksLogger.debug('getMySQLStatus: getting Max_used_connections - done') self.checksLogger.debug('getMySQLStatus: getting Open_files') # Open_files try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Open_files"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Open_files: ' + str(message)) openFiles = result[1] self.checksLogger.debug('getMySQLStatus: openFiles = ' + str(openFiles)) self.checksLogger.debug('getMySQLStatus: getting Open_files - done') self.checksLogger.debug('getMySQLStatus: getting Slow_queries') # Slow_queries try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Slow_queries"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Slow_queries: ' + str(message)) if self.mysqlSlowQueriesStore == None: self.checksLogger.debug('getMySQLStatus: mysqlSlowQueriesStore unset so storing for first time') self.mysqlSlowQueriesStore = result[1] slowQueries = 0 else: self.checksLogger.debug('getMySQLStatus: mysqlSlowQueriesStore set so calculating') self.checksLogger.debug('getMySQLStatus: self.mysqlSlowQueriesStore = ' + str(self.mysqlSlowQueriesStore)) self.checksLogger.debug('getMySQLStatus: result = ' + str(result[1])) slowQueries = float(float(result[1]) - float(self.mysqlSlowQueriesStore)) / 60 self.checksLogger.debug('getMySQLStatus: slowQueries = ' + str(slowQueries)) self.checksLogger.debug('getMySQLStatus: getting Slow_queries - done') self.checksLogger.debug('getMySQLStatus: getting Table_locks_waited') # Table_locks_waited try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Table_locks_waited"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Table_locks_waited: ' + str(message)) if self.mysqlTableLocksWaited == None: self.checksLogger.debug('getMySQLStatus: mysqlTableLocksWaited unset so storing for first time') self.mysqlTableLocksWaited = result[1] tableLocksWaited = 0 else: self.checksLogger.debug('getMySQLStatus: mysqlTableLocksWaited set so calculating') self.checksLogger.debug('getMySQLStatus: self.mysqlTableLocksWaited = ' + str(self.mysqlTableLocksWaited)) self.checksLogger.debug('getMySQLStatus: result = ' + str(result[1])) tableLocksWaited = float(float(result[1]) - float(self.mysqlTableLocksWaited)) / 60 self.checksLogger.debug('getMySQLStatus: tableLocksWaited = ' + str(tableLocksWaited)) self.checksLogger.debug('getMySQLStatus: getting Table_locks_waited - done') self.checksLogger.debug('getMySQLStatus: getting Threads_connected') # Threads_connected try: cursor = db.cursor() cursor.execute('SHOW GLOBAL STATUS LIKE "Threads_connected"') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting Threads_connected: ' + str(message)) threadsConnected = result[1] self.checksLogger.debug('getMySQLStatus: threadsConnected = ' + str(threadsConnected)) self.checksLogger.debug('getMySQLStatus: getting Threads_connected - done') self.checksLogger.debug('getMySQLStatus: getting Seconds_Behind_Master') # Seconds_Behind_Master try: cursor = db.cursor() cursor.execute('SHOW SLAVE STATUS') result = cursor.fetchone() except MySQLdb.OperationalError, message: self.checksLogger.debug('getMySQLStatus: MySQL query error when getting SHOW SLAVE STATUS: ' + str(message)) if result != None: try: secondsBehindMaster = result[28] self.checksLogger.debug('getMySQLStatus: secondsBehindMaster = ' + str(secondsBehindMaster)) except IndexError, e: secondsBehindMaster = None self.checksLogger.debug('getMySQLStatus: secondsBehindMaster empty') else: secondsBehindMaster = None self.checksLogger.debug('getMySQLStatus: secondsBehindMaster empty') self.checksLogger.debug('getMySQLStatus: getting Seconds_Behind_Master - done') return {'connections' : connections, 'createdTmpDiskTables' : createdTmpDiskTables, 'maxUsedConnections' : maxUsedConnections, 'openFiles' : openFiles, 'slowQueries' : slowQueries, 'tableLocksWaited' : tableLocksWaited, 'threadsConnected' : threadsConnected, 'secondsBehindMaster' : secondsBehindMaster}
fcbca9451804c26e5f880f97a13d6e4cd6b32a53 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13266/fcbca9451804c26e5f880f97a13d6e4cd6b32a53/checks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2108, 93, 3997, 1482, 12, 2890, 4672, 365, 18, 12366, 3328, 18, 4148, 2668, 588, 28723, 1482, 30, 787, 6134, 225, 309, 296, 28723, 2081, 11, 316, 365, 18, 5629, 809, 471, 296, 28723, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2108, 93, 3997, 1482, 12, 2890, 4672, 365, 18, 12366, 3328, 18, 4148, 2668, 588, 28723, 1482, 30, 787, 6134, 225, 309, 296, 28723, 2081, 11, 316, 365, 18, 5629, 809, 471, 296, 28723, 1...
else: raise ValueError("not a valid color name") elif isinstance(value, tuple):
raise ValueError("not a valid color name") if isinstance(value, (tuple,list)):
def check(self, value): """ A color can be defined (1) as a verbose string ('black', 'blue', ...) (2) as a 3-tuple (r,g,b) where each value is a floating point number in between 0 and 1 (3) as a 3-digit hex code (#rgb) (3) as a 6-digit hex code (#rrggbb)
5eb8599b421a4aaf3fec3e1a4ac12381b2b69d9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2510/5eb8599b421a4aaf3fec3e1a4ac12381b2b69d9d/checkwidgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 460, 4672, 3536, 432, 2036, 848, 506, 2553, 261, 21, 13, 487, 279, 3988, 533, 7707, 11223, 2187, 296, 14081, 2187, 1372, 13, 261, 22, 13, 487, 279, 890, 17, 8052, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2890, 16, 460, 4672, 3536, 432, 2036, 848, 506, 2553, 261, 21, 13, 487, 279, 3988, 533, 7707, 11223, 2187, 296, 14081, 2187, 1372, 13, 261, 22, 13, 487, 279, 890, 17, 8052, ...
for base in obj.__bases__:
try: bases = obj.__bases__ except: bases = [] for base in bases:
def add_one(self, obj): """ Add an object's documentation to this documentation map. If you also want to include the objects contained by C{obj}, then use L{add}.
d3395d508175517a8a8289ffc33bd81b4ee231c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/d3395d508175517a8a8289ffc33bd81b4ee231c2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 476, 12, 2890, 16, 1081, 4672, 3536, 1436, 392, 733, 1807, 7323, 358, 333, 7323, 852, 18, 225, 971, 1846, 2546, 2545, 358, 2341, 326, 2184, 7542, 635, 385, 95, 2603, 5779, 150...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 476, 12, 2890, 16, 1081, 4672, 3536, 1436, 392, 733, 1807, 7323, 358, 333, 7323, 852, 18, 225, 971, 1846, 2546, 2545, 358, 2341, 326, 2184, 7542, 635, 385, 95, 2603, 5779, 150...
self.whatis(irc, msg, [results[0][0]])
self.whatis(irc, msg, [channel, results[0][0]])
def p(s, r=arg): return int(bool(r.search(s)))
643be4346677bb462813dce82d7c5bf119a1a686 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12790/643be4346677bb462813dce82d7c5bf119a1a686/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 12, 87, 16, 436, 33, 3175, 4672, 327, 509, 12, 6430, 12, 86, 18, 3072, 12, 87, 20349, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 12, 87, 16, 436, 33, 3175, 4672, 327, 509, 12, 6430, 12, 86, 18, 3072, 12, 87, 20349, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.insertTypeTableHoteOfHebergementMaj()
if tableHotePk: self.insertTypeTableHoteOfHebergementMaj(hebPk, tableHotePk)
def addHebergementMaj(self): """ gestion de l'ajout des données de maj d'une hebergement """ fields = self.request hebPk = fields.get('heb_maj_hebpk') hebNom = fields.get('heb_maj_nom') hebergement = self.getHebergementByHebPk(hebPk) for elem in hebergement: hebergementPk = elem.heb_pk if int(hebPk) == hebergementPk: isHebergementMajExist = self.getHebergementMajByhebPk(hebPk) if isHebergementMajExist: #si une maj existe déjà, # suppression de ce record dans table hebergement_maj # suppression des record table hote # insertion des nouvelles données. self.deleteHebergementMajByHebPk(hebPk) self.deleteTypeTableHoteOfHebergementMajByHebPk(hebPk) self.insertHebergementMaj() self.insertTypeTableHoteOfHebergementMaj() else: self.insertHebergementMaj() self.insertTypeTableHoteOfHebergementMaj()
eaa2245d7973a45a229c70676ae128fdccb1ea3c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10188/eaa2245d7973a45a229c70676ae128fdccb1ea3c/hebergement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5256, 31317, 820, 49, 4365, 12, 2890, 4672, 3536, 314, 6868, 443, 328, 11, 4365, 659, 2832, 2727, 82, 132, 107, 281, 443, 29478, 302, 11, 7556, 3904, 31317, 820, 3536, 1466, 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, 527, 5256, 31317, 820, 49, 4365, 12, 2890, 4672, 3536, 314, 6868, 443, 328, 11, 4365, 659, 2832, 2727, 82, 132, 107, 281, 443, 29478, 302, 11, 7556, 3904, 31317, 820, 3536, 1466, 273, ...
raise BugtrackerError("Unknown trackertype: %s" % group.trackertype())
self.log.warning("Unknown trackertype: %s (%s)" % (group.trackertype(), name))
def __init__(self, irc): callbacks.PluginRegexp.__init__(self, irc) self.db = ircutils.IrcDict() events = [] for name in self.registryValue('bugtrackers'): registerBugtracker(name) group = self.registryValue('bugtrackers.%s' % name.replace('.','\\.'), value=False) if group.trackertype() in defined_bugtrackers.keys(): self.db[name] = defined_bugtrackers[group.trackertype()](name, group.url(), group.description()) else: raise BugtrackerError("Unknown trackertype: %s" % group.trackertype()) self.shorthand = utils.abbrev(self.db.keys())
5652223e2fc05690ea59a89d951b363f3218e1be /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3104/5652223e2fc05690ea59a89d951b363f3218e1be/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 277, 1310, 4672, 6689, 18, 3773, 14621, 16186, 2738, 972, 12, 2890, 16, 277, 1310, 13, 365, 18, 1966, 273, 277, 1310, 5471, 18, 45, 1310, 5014, 1435, 264...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 277, 1310, 4672, 6689, 18, 3773, 14621, 16186, 2738, 972, 12, 2890, 16, 277, 1310, 13, 365, 18, 1966, 273, 277, 1310, 5471, 18, 45, 1310, 5014, 1435, 264...
raise error_reply, resp
raise NNTPReplyError(resp)
def xpath(self,id): """Process an XPATH command (optional server extension) Arguments: - id: Message id of article Returns: resp: server response if succesful path: directory path to article"""
6e5a5b653cf6d01e04eb75ed5d23ba576162ee46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6e5a5b653cf6d01e04eb75ed5d23ba576162ee46/nntplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6748, 12, 2890, 16, 350, 4672, 3536, 2227, 392, 1139, 4211, 1296, 261, 10444, 1438, 2710, 13, 13599, 30, 300, 612, 30, 2350, 612, 434, 7559, 2860, 30, 1718, 30, 1438, 766, 309, 8667, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6748, 12, 2890, 16, 350, 4672, 3536, 2227, 392, 1139, 4211, 1296, 261, 10444, 1438, 2710, 13, 13599, 30, 300, 612, 30, 2350, 612, 434, 7559, 2860, 30, 1718, 30, 1438, 766, 309, 8667, 7...
if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*abs(sin(fpt[1]))*abs(sin(fpt[1])) \ <= ds*ds/4:
if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4.0 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*sin(cpt[0])*sin(cpt[0]) \ <= ds*ds/4.0:
def map_grids(coarsegrid,finegrid,coarseres=4.0): """ takes the two grids (lists of lat/lon tuples) and returns a dictionary where the points in the coarse grid are the keys and lists of tuples of points in the fine grid are the values """ fgtemp = finegrid coarsedict = {} ds = coarseres*pi/180 for cpt in coarsegrid: flist = [] for fpt in fgtemp: if (cpt[0]-fpt[0])*(cpt[0]-fpt[0]) <= ds*ds/4 and \ (cpt[1]-fpt[1])*(cpt[1]-fpt[1])*abs(sin(fpt[1]))*abs(sin(fpt[1])) \ <= ds*ds/4: flist.append(fpt) coarsedict[cpt] = flist for rpt in flist: fgtemp.remove(rpt) return coarsedict, fgtemp
92cbddf405d13484ba64bef9acff8c41d7ebb714 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/92cbddf405d13484ba64bef9acff8c41d7ebb714/skylocutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 67, 5222, 87, 12, 2894, 24378, 5222, 16, 74, 558, 5222, 16, 2894, 297, 550, 281, 33, 24, 18, 20, 4672, 3536, 5530, 326, 2795, 3068, 87, 261, 9772, 434, 2516, 19, 9379, 10384, 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, 852, 67, 5222, 87, 12, 2894, 24378, 5222, 16, 74, 558, 5222, 16, 2894, 297, 550, 281, 33, 24, 18, 20, 4672, 3536, 5530, 326, 2795, 3068, 87, 261, 9772, 434, 2516, 19, 9379, 10384, 13...
if block:
if not block: return self.put_nowait(item) self.not_full.acquire() try:
def put(self, item, block=True, timeout=None): """Put an item into the queue.
5af0e414822e0e5da17566e1156005df520d1ae0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5af0e414822e0e5da17566e1156005df520d1ae0/Queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 12, 2890, 16, 761, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 6426, 392, 761, 1368, 326, 2389, 18, 2, 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, 1378, 12, 2890, 16, 761, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 6426, 392, 761, 1368, 326, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
insn = int(m.group('insn'), 16) iname = dis(insn) Rd = (insn >> 12) & 0xF Rn = (insn >> 16) & 0xF Rdval = transRegVal(Rd, m.group('Rd')) Rnval = transRegVal(Rn, m.group('Rn')) if Rd == Rn and Rdval == Rnval: regs = Rdval
m = re_trace.match(line) if m is not None: insn = int(m.group('insn'), 16) iname = dis(insn) changed = int(m.group('changed'), 16) if changed: changed = " (%08x)" % changed else: changed = "" print "%s %s: %-21s getClock(m), m.group('addr'), iname , m.group('vaddr'), m.group('val'), changed) return m = re_irq.match(line) if m is not None: print getClock(m), m.group('data')
def procline(line): m = re_debug.match(line) if m is None: m = re_irq.match(line) if m is not None: print getClock(m), m.group('data') else: memalias.procline(line) return insn = int(m.group('insn'), 16) iname = dis(insn) Rd = (insn >> 12) & 0xF Rn = (insn >> 16) & 0xF Rdval = transRegVal(Rd, m.group('Rd')) Rnval = transRegVal(Rn, m.group('Rn')) if Rd == Rn and Rdval == Rnval: regs = Rdval else: regs = Rdval + " " + Rnval print "%s %s: %-30s # %s" % ( getClock(m), m.group('addr'), iname, regs)
1fb3bfc1cc7464981e27d8f8340534f4d92180c0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12923/1fb3bfc1cc7464981e27d8f8340534f4d92180c0/dis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 830, 558, 12, 1369, 4672, 312, 273, 283, 67, 4148, 18, 1916, 12, 1369, 13, 309, 312, 353, 599, 30, 312, 273, 283, 67, 481, 85, 18, 1916, 12, 1369, 13, 309, 312, 353, 486, 599,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 450, 830, 558, 12, 1369, 4672, 312, 273, 283, 67, 4148, 18, 1916, 12, 1369, 13, 309, 312, 353, 599, 30, 312, 273, 283, 67, 481, 85, 18, 1916, 12, 1369, 13, 309, 312, 353, 486, 599,...
self.manager.log(manager.LOG_HIGH, "FATAL ERROR: " + msg.args[1], before=2)
self.manager.log(manager.LOG_HIGH, "FATAL ERROR: %s" % (msg,), before=2)
def run( self ): try: self.manager.log(manager.LOG_HIGH, "----- Running CalDAV Tests from \"%s\"... -----" % self.name, before=1) result = self.dorequests( "Executing Start Requests...", self.start_requests, False, True ) if not result: self.manager.log(manager.LOG_HIGH, "Start items failed - tests will not be run.") ok = 0 failed = 1 ignored = 0 else: ok, failed, ignored = self.run_tests() self.doenddelete( "Deleting Requests..." ) self.dorequests( "Executing End Requests...", self.end_requests, False ) return ok, failed, ignored except socket.error, msg: self.manager.log(manager.LOG_HIGH, "FATAL ERROR: " + msg.args[1], before=2) return 0, 1, 0
f2f821ff00de1f38a610c343b69b0bbaa5f4d990 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/129/f2f821ff00de1f38a610c343b69b0bbaa5f4d990/caldavtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 775, 30, 365, 18, 4181, 18, 1330, 12, 4181, 18, 4842, 67, 29996, 16, 315, 13465, 20480, 3596, 17735, 7766, 87, 628, 22049, 87, 2412, 2777, 9135, 6, 738, 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, 1086, 12, 365, 262, 30, 775, 30, 365, 18, 4181, 18, 1330, 12, 4181, 18, 4842, 67, 29996, 16, 315, 13465, 20480, 3596, 17735, 7766, 87, 628, 22049, 87, 2412, 2777, 9135, 6, 738, 365, ...
def get_requred(self): return self.requred def set_requred(self, requred): self.requred = requred
def get_required(self): return self.required def set_required(self, required): self.required = required
def get_requred(self): return self.requred
91b7fa5f4789cd99e181dad4d2401509c907da8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7635/91b7fa5f4789cd99e181dad4d2401509c907da8c/generateds_system_1_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4523, 1118, 12, 2890, 4672, 327, 365, 18, 4523, 1118, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4523, 1118, 12, 2890, 4672, 327, 365, 18, 4523, 1118, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.ui.diis = p
self.ui.dirscf = p
def info_gamess_setitem(self, name, val, interp, error_if_name_not_known = False): #bruce 050701; extended by Mark 050704 to read and set the actual params; bruce 050704 added error_if_name_not_known """This must set the parameter in self with the given name to the value encoded by the string val (read from an mmp file from which this parameter set and its gamess jig is being read). If it doesn't recognize name or can't parse val, it should do nothing (except possibly print a message if atom_debug is set), unless error_if_name_not_known is true, in which case it should print an error message reporting a bug. (If it's too tedious to avoid exceptions in parsing val, change the caller (which already ignores those exceptions, but always prints a message calling them bugs) to classify those exceptions as not being bugs (and to only print a message when atom_debug is set). [See also the docstring of Gamess.readmmp_info_gamess_setitem, which calls this.] """ if name == 'comment': # Description/Comment self.ui.comment = val elif name == 'conv': # Density and Energy Convergence (1-4) p = interp.decode_int(val) if p is not None: self.ui.conv = p elif name == 'damp': # DAMP p = interp.decode_bool(val) if p is not None: self.ui.damp = p elif name == 'dfttyp': # DFT Functional Type p = interp.decode_int(val) if p is not None: self.ui.dfttyp = p elif name == 'diis': # DIIS p = interp.decode_bool(val) if p is not None: self.ui.diis = p elif name == 'dirscf': # DIRSCF p = interp.decode_bool(val) if p is not None: self.ui.diis = p elif name == 'ecm': # emc = None (0), DFT (1) or MP2 (2) p = interp.decode_int(val) if p is not None: self.ui.ecm = p elif name == 'extrap': # EXTRAP p = interp.decode_bool(val) if p is not None: self.ui.diis = p elif name == 'gbasis': # Basis Set Id p = interp.decode_int(val) if p is not None: self.ui.gbasis = p elif name == 'gbasisname': # Basis Set Name self.ui.gbasisname = val elif name == 'gridsize': # Grid Size p = interp.decode_int(val) if p is not None: self.ui.gridsize = p elif name == 'icharg': # Charge p = interp.decode_int(val) if p is not None: self.ui.icharg = p elif name == 'iterations': # Iterations p = interp.decode_int(val) if p is not None: self.ui.iterations = p elif name == 'memory': # System Memory p = interp.decode_int(val) if p is not None: self.ui.memory = p elif name == 'mult': # Multiplicity p = interp.decode_int(val) if p is not None: self.ui.mult = p elif name == 'ncore': # Include core electrons p = interp.decode_bool(val) if p is not None: self.ui.ncore = p elif name == 'rmsdconv': # RMSD convergence (1-4) p = interp.decode_int(val) if p is not None: self.ui.rmsdconv = p elif name == 'rstrct': # RSTRCT p = interp.decode_bool(val) if p is not None: self.ui.rstrct = p elif name == 'runtyp': # RUNTYP = Energy (0), or Optimize (1) p = interp.decode_int(val) if p is not None: self.ui.runtyp = p elif name == 'scftyp': # SCFTYP = RHF (0), UHF (1), or ROHF (2) p = interp.decode_int(val) if p is not None: self.ui.scftyp = p elif name == 'shift': # SHIFT p = interp.decode_bool(val) if p is not None: self.ui.shift = p elif name == 'soscf': # SOSCF p = interp.decode_bool(val) if p is not None: self.ui.soscf = p
e1c9d9af951a0d7a9d8d40b5f071dfa38ad33871 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/e1c9d9af951a0d7a9d8d40b5f071dfa38ad33871/jig_Gamess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 67, 75, 301, 403, 67, 542, 1726, 12, 2890, 16, 508, 16, 1244, 16, 8174, 16, 555, 67, 430, 67, 529, 67, 902, 67, 2994, 273, 1083, 4672, 468, 2848, 3965, 374, 3361, 27, 1611, 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, 1123, 67, 75, 301, 403, 67, 542, 1726, 12, 2890, 16, 508, 16, 1244, 16, 8174, 16, 555, 67, 430, 67, 529, 67, 902, 67, 2994, 273, 1083, 4672, 468, 2848, 3965, 374, 3361, 27, 1611, 3...
from Components.Sources.StaticText import StaticText
def __init__(self, session, currDir): from Components.Sources.StaticText import StaticText Screen.__init__(self, session) HelpableScreen.__init__(self) self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Use"))
94c1b09ff6293557b0bceda29ff9116ba2a434ae /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/94c1b09ff6293557b0bceda29ff9116ba2a434ae/settings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 4306, 1621, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 11288, 429, 7956, 16186, 2738, 972, 12, 2890, 13, 225, 365, 9614, 856, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 4306, 1621, 4672, 10146, 16186, 2738, 972, 12, 2890, 16, 1339, 13, 11288, 429, 7956, 16186, 2738, 972, 12, 2890, 13, 225, 365, 9614, 856, 67, 1...
logger.notify('master %s seems to be equivalent to tag %s' % (current_rev, tag))
logger.notify('Revision %s seems to be equivalent to tag %s' % (current_rev, tag))
def get_src_requirement(dist, location, find_tags): if not (os.path.exists(os.path.join(location, '.svn')) or os.path.exists(os.path.join(location, '.git'))): logger.warn('cannot determine version of editable source in %s (is not svn checkout or git clone)' % location) return dist.as_requirement() if os.path.exists(os.path.join(location, '.svn')): repo = get_svn_url(location) if repo is None: return None parts = repo.split('/') ## FIXME: why not project name? egg_project_name = dist.egg_name().split('-', 1)[0] if parts[-2] in ('tags', 'tag'): # It's a tag, perfect! return 'svn+%s#egg=%s-%s' % (repo, egg_project_name, parts[-1]) elif parts[-2] in ('branches', 'branch'): # It's a branch :( rev = get_svn_revision(location) return 'svn+%s@%s#egg=%s%s-r%s' % (repo, rev, dist.egg_name(), parts[-1], rev) elif parts[-1] == 'trunk': # Trunk :-/ rev = get_svn_revision(location) if find_tags: tag_url = '/'.join(parts[:-1]) + '/tags' tag_revs = get_svn_tag_revs(tag_url) match = find_svn_tag_match(rev, tag_revs) if match: logger.notify('trunk checkout %s seems to be equivalent to tag %s' % match) return 'svn+%s/%s#egg=%s-%s' % (tag_url, match, egg_project_name, match) return 'svn+%s@%s#egg=%s-dev' % (repo, rev, dist.egg_name()) else: # Don't know what it is logger.warn('svn URL does not fit normal structure (tags/branches/trunk): %s' % repo) rev = get_svn_revision(location) return 'svn+%s@%s#egg=%s-dev' % (repo, rev, egg_project_name) elif os.path.exists(os.path.join(location, '.git')): repo = get_git_url(location) egg_project_name = dist.egg_name().split('-', 1)[0] if not repo: return None current_rev = get_git_revision(location) tag_revs = get_git_tag_revs(location) branch_revs = get_git_branch_revs(location) master_rev = get_git_master_revision(location) if current_rev in tag_revs: # It's a tag, perfect! tag = tag_revs.get(current_rev, current_rev) return 'git+%s@%s#egg=%s-%s' % (repo, tag, egg_project_name, tag) elif current_rev in branch_revs: # It's the head of a branch, nice too. branch = branch_revs.get(current_rev, current_rev) return 'git+%s@%s#egg=%s-%s' % (repo, current_rev, dist.egg_name(), current_rev) elif current_rev == master_rev: if find_tags: if current_rev in tag_revs: tag = tag_revs.get(current_rev, current_rev) logger.notify('master %s seems to be equivalent to tag %s' % (current_rev, tag)) return 'git+%s@%s#egg=%s-%s' % (repo, tag, egg_project_name, tag) return 'git+%s@%s#egg=%s-dev' % (repo, master_rev, dist.egg_name()) else: # Don't know what it is logger.warn('git URL does not fit normal structure: %s' % repo) rev = get_git_revision(location) return '%s@%s#egg=%s-dev' % (repo, rev, egg_project_name)
07705cd47355a1a10042b18aab154e5eeeafcbcd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12982/07705cd47355a1a10042b18aab154e5eeeafcbcd/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4816, 67, 30848, 12, 4413, 16, 2117, 16, 1104, 67, 4156, 4672, 309, 486, 261, 538, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 3562, 16, 2418, 31505, 26112, 578, 1140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4816, 67, 30848, 12, 4413, 16, 2117, 16, 1104, 67, 4156, 4672, 309, 486, 261, 538, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 3562, 16, 2418, 31505, 26112, 578, 1140...
StructureTest()
StructureTest(dir="rigid_organics", test="C3H6")
def test_rigid_organics_C3H6(self): StructureTest()
d4548954f0b2ec61c249ce8e1b4af97c07a52a78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/d4548954f0b2ec61c249ce8e1b4af97c07a52a78/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 86, 28542, 67, 22543, 2102, 67, 39, 23, 44, 26, 12, 2890, 4672, 13348, 4709, 1435, 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, 1842, 67, 86, 28542, 67, 22543, 2102, 67, 39, 23, 44, 26, 12, 2890, 4672, 13348, 4709, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return s, c.lower()
c = c.lower() if c.lower() == self.charset: return s, c try: return unicode(s, c), None except (UnicodeError, LookupError): return None, None
def decode_charset(self, field): if field.find("=?") == -1: return None, None try: s, c = EncWord.decode(field) except ValueError: return None, None return s, c.lower()
a780dc064bdd3eb810e0564ca2e821810cde5802 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/a780dc064bdd3eb810e0564ca2e821810cde5802/HyperArch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 67, 9999, 12, 2890, 16, 652, 4672, 309, 652, 18, 4720, 2932, 25501, 13, 422, 300, 21, 30, 327, 599, 16, 599, 775, 30, 272, 16, 276, 273, 8594, 3944, 18, 3922, 12, 1518, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 67, 9999, 12, 2890, 16, 652, 4672, 309, 652, 18, 4720, 2932, 25501, 13, 422, 300, 21, 30, 327, 599, 16, 599, 775, 30, 272, 16, 276, 273, 8594, 3944, 18, 3922, 12, 1518, 13, 1...
print "loaded chains:", len(self.loadedChains) self.renderer.cleanSecondaryStructures() for chain in self.loadedChains: print "helices in chain: ", len(filter(lambda x: x.type == "helix", chain.secelList.values())) print "strands in chain: ", len(filter(lambda x: x.type == "strand", chain.secelList.values())) print "loops in chain: ", len(filter(lambda x: x.type == "loop", chain.secelList.values())) lastType = "" secelix = 0 helColor = self.getHelixColor() strandColor = self.getStrandColor() loopColor = self.getLoopColor() for i, secel in chain.secelList.items(): if secel.type == "helix" and lastType != "helix": secelix = self.renderer.startHelix() lastType = "helix" elif secel.type == "strand" and lastType != "strand": secelix = self.renderer.startStrand() lastType = "strand" elif secel.type == "loop" and lastType != "loop": secelix = self.renderer.startLoop() lastType = "loop" if i in chain.residueList: for atomName in chain[i].getAtomNames(): if atomName == "CA": atom = chain[i].getAtom(atomName) if atom: if secel.type == "helix": atom.setColor(helColor.redF(), helColor.greenF(), helColor.blueF(), helColor.alphaF()) self.renderer.addHelixElement(secelix, atom.getHashKey()) if secel.type == "strand": atom.setColor(strandColor.redF(), strandColor.greenF(), strandColor.blueF(), strandColor.alphaF()) self.renderer.addStrandElement(secelix, atom.getHashKey()) if secel.type == "loop": atom.setColor(loopColor.redF(), loopColor.greenF(), loopColor.blueF(), loopColor.alphaF()) self.renderer.addLoopElement(secelix, atom.getHashKey())
pass
def setAtomColorsAndVisibility(self, displayStyle): if displayStyle == self.DisplayStyleBackbone: self.setAllAtomColor(self.getAtomColor()) elif displayStyle == self.DisplayStyleRibbon: #Pass into c++ layer all data needed to draw ribbon diagram here! print "loaded chains:", len(self.loadedChains) self.renderer.cleanSecondaryStructures() #makes sure we don't have multiple structures loaded, or multiple copies of the same structure for chain in self.loadedChains: print "helices in chain: ", len(filter(lambda x: x.type == "helix", chain.secelList.values())) print "strands in chain: ", len(filter(lambda x: x.type == "strand", chain.secelList.values())) print "loops in chain: ", len(filter(lambda x: x.type == "loop", chain.secelList.values())) lastType = "" #attempt to make contiguous types be stored as one large secel secelix = 0 helColor = self.getHelixColor() strandColor = self.getStrandColor() loopColor = self.getLoopColor() for i, secel in chain.secelList.items(): #print len(chain.secelList.items()) #print i #print secel #print secel.type if secel.type == "helix" and lastType != "helix": secelix = self.renderer.startHelix() lastType = "helix" elif secel.type == "strand" and lastType != "strand": secelix = self.renderer.startStrand() lastType = "strand" elif secel.type == "loop" and lastType != "loop": secelix = self.renderer.startLoop() lastType = "loop" if i in chain.residueList: #print "atoms in residue list: ", len(chain[i].getAtomNames()) for atomName in chain[i].getAtomNames(): if atomName == "CA": atom = chain[i].getAtom(atomName) if atom: if secel.type == "helix": atom.setColor(helColor.redF(), helColor.greenF(), helColor.blueF(), helColor.alphaF()) self.renderer.addHelixElement(secelix, atom.getHashKey()) if secel.type == "strand": atom.setColor(strandColor.redF(), strandColor.greenF(), strandColor.blueF(), strandColor.alphaF()) self.renderer.addStrandElement(secelix, atom.getHashKey()) if secel.type == "loop": atom.setColor(loopColor.redF(), loopColor.greenF(), loopColor.blueF(), loopColor.alphaF()) self.renderer.addLoopElement(secelix, atom.getHashKey())
4b605b0fdb19575bc9c140baa036485544e8a5c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4399/4b605b0fdb19575bc9c140baa036485544e8a5c2/calpha_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3641, 12570, 1876, 10135, 12, 2890, 16, 2562, 2885, 4672, 309, 2562, 2885, 422, 365, 18, 4236, 2885, 2711, 19930, 30, 365, 18, 542, 1595, 3641, 2957, 12, 2890, 18, 588, 3641, 2957, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 3641, 12570, 1876, 10135, 12, 2890, 16, 2562, 2885, 4672, 309, 2562, 2885, 422, 365, 18, 4236, 2885, 2711, 19930, 30, 365, 18, 542, 1595, 3641, 2957, 12, 2890, 18, 588, 3641, 2957, ...
num_header = 1;
num_header = what.num_header;
def GenericRange(what, range_end = datetime.date.today(), range_begin = None, output = "text"): factor = 3600 # Convert number of seconds to number of hours if (not range_begin or range_begin == None): range_begin = range_end + datetime.timedelta(days=-1) if (not range_end or range_end == None): range_end = range_begin + datetime.timedelta(days=+1) timediff = range_end - range_begin if (output != "None") : if (what.title != "") : print what.title % ( DateToString(range_begin,False), DateToString(range_end,False) ) if (what.headline != "") : print what.headline % ( DateToString(range_begin,False), DateToString(range_end,False) ) print what.lines[output] print " ", what.formats[output] % what.headers print what.lines[output] # First get the previous' range-length's information totalwall = 0 totaljobs = 0 oldValues = {} result = [] start = range_begin - timediff end = range_end - timediff lines = what.GetData(start,end) for i in range (0,len(lines)): val = lines[i].split('\t') offset = 0 lkeys = ["","",""] for iheaders in range(0,what.num_header): lkeys[iheaders] = val[iheaders] if what.headers[0] == "VO": # "site" is really "VO": hack to harmonize Panda output if lkeys[0] != "unknown": lkeys[0] = string.lower(lkeys[0]) if lkeys[0] == "atlas": lkeys[0] = "usatlas" if (len(val)==4) : # Nasty hack to harmonize Panda output if what.headers[1] == "VO": if lkeys[1] != "unknown": lkeys[1] = string.lower(lkeys[1]) if lkeys[1] == "atlas": lkeys[1] = "usatlas" #for iheaders in range(1,len(keys)): # key = key + keys[iheaders] + " " keys = tuple(lkeys) num_header = what.num_header; offset = num_header - 1; njobs= string.atoi( val[offset+1] ) wall = string.atof( val[offset+2] ) / factor totalwall = totalwall + wall totaljobs = totaljobs + njobs if (oldValues.has_key(keys)): oldValues[keys][0] += njobs oldValues[keys][1] += wall else: oldValues[keys] = [njobs,wall] oldValues[("total","","")] = (totaljobs, totalwall) # Then getting the current information and print it totalwall = 0 totaljobs = 0 start = range_begin end = range_end lines = what.GetData(start,end) num_header = 1; index = 0 printValues = {} for i in range (0,len(lines)): val = lines[i].split('\t') lkeys = ["","",""] for iheaders in range(0,what.num_header): lkeys[iheaders] = val[iheaders] if what.headers[0] == "VO": # "site" is really "VO": hack to harmonize Panda output if lkeys[0] != "unknown": lkeys[0] = string.lower(lkeys[0]) if lkeys[0] == "atlas": lkeys[0] = "usatlas" if (len(val)==4) : # Nasty hack to harmonize Panda output if what.headers[1] == "VO": if lkeys[1] != "unknown": lkeys[1] = string.lower(lkeys[1]) if lkeys[1] == "atlas": lkeys[1] = "usatlas"
2ec11b7a0d15b9c61f2f19056ac3ff489fc46212 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/637/2ec11b7a0d15b9c61f2f19056ac3ff489fc46212/AccountingReports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7928, 2655, 12, 23770, 16, 1048, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 6, 4672, 5578, 273, 12396, 225, 468, 4037, 1300, 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, 7928, 2655, 12, 23770, 16, 1048, 67, 409, 273, 3314, 18, 712, 18, 30064, 9334, 1048, 67, 10086, 273, 599, 16, 876, 273, 315, 955, 6, 4672, 5578, 273, 12396, 225, 468, 4037, 1300, 434, ...
sources = ['sage/ext/fast_eval.pyx']), \
sources = ['sage/ext/fast_eval.pyx']),
def is_newer(file1, file2): """ Return True if either file2 does not exist or is older than file1. If file1 does not exist, always return False. """ if not os.path.exists(file1): return False if not os.path.exists(file2): return True if os.path.getmtime(file2) < os.path.getmtime(file1): return True return False
c82811cc0b935d826f6cfba833e4406f8eb9ed19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/c82811cc0b935d826f6cfba833e4406f8eb9ed19/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 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, 353, 67, 2704, 264, 12, 768, 21, 16, 585, 22, 4672, 3536, 2000, 1053, 309, 3344, 585, 22, 1552, 486, 1005, 578, 353, 12156, 2353, 585, 21, 18, 225, 971, 585, 21, 1552, 486, 1005, 16,...
count = num = int(os.popen('sysctl -n hw.ncpu').read())
count = int(os.popen('sysctl -n hw.ncpu').read())
def cores(): ''' Returns the number of CPUs in the system ''' # ------------------------------------- # # From: http://pyprocessing.berlios.de/ # # ------------------------------------- # try: count = 0 if system("linux"): ##Another way count = os.sysconf('SC_NPROCESSORS_ONLN') #for line in open('/proc/cpuinfo'): # if line.startswith("core id"): # count += 1 elif system("darwin"): ##Another way count = num = int(os.popen('sysctl -n hw.ncpu').read()) #str = subprocess.Popen(["sysctl","hw.ncpu"],stdout=subprocess.PIPE).communicate()[0] #count = int(str.split(" ")[1].strip()) elif system("win"): ##Another way count = int(os.environ['NUMBER_OF_PROCESSORS']) return max(count, 1) # if an error occurs simply return one except Exception: pass return 1
9d868fb7d20b1eaca18281974ae962a002d95220 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/331/9d868fb7d20b1eaca18281974ae962a002d95220/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15355, 13332, 9163, 2860, 326, 1300, 434, 5181, 3477, 316, 326, 2619, 9163, 468, 19134, 553, 468, 468, 6338, 30, 1062, 2207, 2074, 10632, 18, 744, 549, 538, 18, 323, 19, 468, 468, 19134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15355, 13332, 9163, 2860, 326, 1300, 434, 5181, 3477, 316, 326, 2619, 9163, 468, 19134, 553, 468, 468, 6338, 30, 1062, 2207, 2074, 10632, 18, 744, 549, 538, 18, 323, 19, 468, 468, 19134,...
return cmp(type(other), type(self))
return False def __ne__(self, other): r""" Return True if ``self`` and ``other`` are two different posets. TESTS:: sage: [[p1.__ne__(p2) for p1 in Posets(2)] for p2 in Posets(2)] [[False, True], [True, False]] sage: P = Poset([[1,2,4],[3],[3]]) sage: Q = Poset([[1,2],[],[1],[4]]) sage: P != Q True sage: P != P False sage: Q != Q False sage: [[p1.__ne__(p2) for p1 in Posets(2)] for p2 in Posets(2)] [[False, True], [True, False]] """ return (not self.__eq__(other))
def __cmp__(self, other): r""" Define comparison for finite posets.
1ad49a5fca760a553f7c332939f6399dee5514ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1ad49a5fca760a553f7c332939f6399dee5514ff/posets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 13184, 5826, 364, 25922, 949, 2413, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 13184, 5826, 364, 25922, 949, 2413, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"CVSRevision":"$Revision: 1.48 $",
"CVSRevision":"$Revision: 1.49 $",
def callingparams(self): """Returns list of parameters to save with results.""" #Test whether k has been set try: self.k except (NameError, AttributeError): self.k=None try: self.mass except (NameError, AttributeError): self.mass=None #Form dictionary of inputs params = {"ystart":self.ystart, "tstart":self.tstart, "tend":self.tend, "tstep_wanted":self.tstep_wanted, "tstep_min":self.tstep_min, "k":self.k, #model dependent params "mass":self.mass, "eps":self.eps, "dxsav":self.dxsav, "solver":self.solver, "classname":self.__class__.__name__, "CVSRevision":"$Revision: 1.48 $", "datetime":datetime.datetime.now() } return params
7875acb8d2096ab1cfdb49b2b530666050c53e4a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7283/7875acb8d2096ab1cfdb49b2b530666050c53e4a/cosmomodels.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4440, 2010, 12, 2890, 4672, 3536, 1356, 666, 434, 1472, 358, 1923, 598, 1686, 12123, 468, 4709, 2856, 417, 711, 2118, 444, 775, 30, 365, 18, 79, 1335, 261, 461, 668, 16, 6394, 4672, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4440, 2010, 12, 2890, 4672, 3536, 1356, 666, 434, 1472, 358, 1923, 598, 1686, 12123, 468, 4709, 2856, 417, 711, 2118, 444, 775, 30, 365, 18, 79, 1335, 261, 461, 668, 16, 6394, 4672, 36...
Dlist = [5,8,12,13,17,21,24,28,29]
Dlist = [5,8,12,13,17,21,24,28,29, 33, 37, 40, 41, 44, 53, 56, 57, 60, 61, 65, 69, 73, 76, 77, 85, 88, 89, 92, 93, 97]
def _find_scaling_L_ratio(self): r""" This function is use to set ``_scaling``, the factor used to adjust the scalar multiple of the modular symbol. If `[0]`, the modular symbol evaluated at 0, is non-zero, we can just scale it with respect to the approximation of the L-value. It is known that the quotient is a rational number with small denominator. Otherwise we try to scale using quadratic twists.
ccd9827ad09ec152373415abbdaf9c16b21128bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ccd9827ad09ec152373415abbdaf9c16b21128bb/ell_modular_symbols.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4720, 67, 24576, 67, 48, 67, 9847, 12, 2890, 4672, 436, 8395, 1220, 445, 353, 999, 358, 444, 12176, 67, 24576, 68, 9191, 326, 5578, 1399, 358, 5765, 326, 4981, 3229, 434, 326, 681...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4720, 67, 24576, 67, 48, 67, 9847, 12, 2890, 4672, 436, 8395, 1220, 445, 353, 999, 358, 444, 12176, 67, 24576, 68, 9191, 326, 5578, 1399, 358, 5765, 326, 4981, 3229, 434, 326, 681...
logging_conf.setup(logs_path, logging.DEBUG)
logging_conf.setup(logs_path, logging.CRITICAL)
def __init__(self, dht_addr, logs_path): logging_conf.setup(logs_path, logging.DEBUG) self.controller = controller.Controller(dht_addr) self.controller.start()
94817bc268ec05e91fe2c53602c7201445055849 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9686/94817bc268ec05e91fe2c53602c7201445055849/kadtracker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 302, 647, 67, 4793, 16, 5963, 67, 803, 4672, 2907, 67, 3923, 18, 8401, 12, 10011, 67, 803, 16, 2907, 18, 5093, 21377, 13, 365, 18, 5723, 273, 2596, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 302, 647, 67, 4793, 16, 5963, 67, 803, 4672, 2907, 67, 3923, 18, 8401, 12, 10011, 67, 803, 16, 2907, 18, 5093, 21377, 13, 365, 18, 5723, 273, 2596, 18,...
raise NotImplementedError( "%s did not specify a typeName attribute" % (qual(T),))
T.typeName = normalize(qual(T))
def __new__(meta, name, bases, dictionary): T = slotmachine.SchemaMetaMachine.__new__(meta, name, bases, dictionary) if T.__name__ == 'Item' and T.__module__ == __name__: return T T.__already_inherited__ += 1 if T.__already_inherited__ >= 2: raise NoInheritance("already inherited from item once: " "in-database inheritance not yet supported") if T.typeName is None: raise NotImplementedError( "%s did not specify a typeName attribute" % (qual(T),)) if T.schemaVersion is None: raise NotImplementedError( "%s did not specify a schemaVersion attribute" % (qual(T),)) if T.typeName in _typeNameToMostRecentClass: if T.__legacy__: return T raise RuntimeError("2 definitions of axiom typename %r: %r %r" % ( T.typeName, T, _typeNameToMostRecentClass[T.typeName])) _typeNameToMostRecentClass[T.typeName] = T return T
0b11f87e0fb454a8867bbb13365f4e1b78c67770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6981/0b11f87e0fb454a8867bbb13365f4e1b78c67770/item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 3901, 16, 508, 16, 8337, 16, 3880, 4672, 399, 273, 4694, 9149, 18, 3078, 2781, 6981, 16186, 2704, 972, 12, 3901, 16, 508, 16, 8337, 16, 3880, 13, 309, 399, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2704, 972, 12, 3901, 16, 508, 16, 8337, 16, 3880, 4672, 399, 273, 4694, 9149, 18, 3078, 2781, 6981, 16186, 2704, 972, 12, 3901, 16, 508, 16, 8337, 16, 3880, 13, 309, 399, 16186, ...
buxon = Buxon()
buxon = Buxon(base)
def __init__(self): GtkUI.__init__(self, 'buxon') self.cache = None self.treeTranslator = {}
41a05be58c4b847b8905254a06aaf82384035e52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2232/41a05be58c4b847b8905254a06aaf82384035e52/buxon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 225, 22132, 5370, 16186, 2738, 972, 12, 2890, 16, 296, 70, 2616, 265, 6134, 225, 365, 18, 2493, 273, 599, 365, 18, 3413, 12233, 273, 2618, 225, 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, 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, 4672, 225, 22132, 5370, 16186, 2738, 972, 12, 2890, 16, 296, 70, 2616, 265, 6134, 225, 365, 18, 2493, 273, 599, 365, 18, 3413, 12233, 273, 2618, 225, 2, -100...
EXAMPLES: These computations use pseudo-random numbers, so we set
EXAMPLES: These computations use pseudo-random numbers, so we set
def derived_series(self): """ Return the derived series of this group as a list of permutation groups. EXAMPLES: These computations use pseudo-random numbers, so we set the seed for reproducible testing. :: sage: set_random_seed(0) sage: G = PermutationGroup([[(1,2,3),(4,5)],[(3,4)]]) sage: G.derived_series() # random output [Permutation Group with generators [(1,2,3)(4,5), (3,4)], Permutation Group with generators [(1,5)(3,4), (1,5)(2,4), (2,4)(3,5)]] """ current_randstate().set_seed_gap() ans = [] DS = self._gap_().DerivedSeries() n = DS.Length() for i in range(1,n+1): ans.append(PermutationGroup(DS[i].GeneratorsOfGroup())) return ans
1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10379, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 10379, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 225, 5675, 8900, 11386, 30, 225, 8646, 5305, 1012, 999, 12454, 17, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10379, 67, 10222, 12, 2890, 4672, 3536, 2000, 326, 10379, 4166, 434, 333, 1041, 487, 279, 666, 434, 17440, 3252, 18, 225, 5675, 8900, 11386, 30, 225, 8646, 5305, 1012, 999, 12454, 17, 91...
except BaseSCardException as exc:
except BaseSCardException,exc:
def __str__(self): return repr('Failure to remove reader: ' + self.readername + ' from group: ' + self.groupname + ' ' + smartcard.scard.SCardGetErrorMessage(self.hresult))
1585aa14f214716c9dddc8bf66a966154c16245f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3537/1585aa14f214716c9dddc8bf66a966154c16245f/PCSCExceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 8480, 2668, 5247, 358, 1206, 2949, 30, 296, 397, 365, 18, 10530, 529, 397, 296, 628, 1041, 30, 296, 397, 365, 18, 1655, 529, 397, 296, 296, 397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 701, 972, 12, 2890, 4672, 327, 8480, 2668, 5247, 358, 1206, 2949, 30, 296, 397, 365, 18, 10530, 529, 397, 296, 628, 1041, 30, 296, 397, 365, 18, 1655, 529, 397, 296, 296, 397, ...
name = 'eClicto device interface'
name = 'eClicto Device Interface'
def windows_sort_drives(self, drives): main = drives.get('main', None) card = drives.get('carda', None) if card and main and card < main: drives['main'] = card drives['carda'] = main
870875ab01d89fd5a4c13074f32691da75e7ee41 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/870875ab01d89fd5a4c13074f32691da75e7ee41/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9965, 67, 3804, 67, 3069, 3606, 12, 2890, 16, 5081, 3606, 4672, 2774, 273, 5081, 3606, 18, 588, 2668, 5254, 2187, 599, 13, 5270, 273, 5081, 3606, 18, 588, 2668, 3327, 69, 2187, 599, 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, 9965, 67, 3804, 67, 3069, 3606, 12, 2890, 16, 5081, 3606, 4672, 2774, 273, 5081, 3606, 18, 588, 2668, 5254, 2187, 599, 13, 5270, 273, 5081, 3606, 18, 588, 2668, 3327, 69, 2187, 599, 13...
def formatLang(self, value, digits=2, date=False,date_time=False, grouping=True, monetary=False, currency=None): if not value: return ''
def formatLang(self, value, digits=2, date=False,date_time=False, grouping=True, monetary=False, currency=False):
def formatLang(self, value, digits=2, date=False,date_time=False, grouping=True, monetary=False, currency=None): if not value: return '' pool_lang=self.pool.get('res.lang') lang = self.localcontext.get('lang', 'en_US') or 'en_US' lang_obj = pool_lang.browse(self.cr,self.uid,pool_lang.search(self.cr,self.uid,[('code','=',lang)])[0]) if date or date_time: date_format = lang_obj.date_format if date_time: date_format = lang_obj.date_format + " " + lang_obj.time_format if not isinstance(value, time.struct_time): # assume string, parse it if len(str(value)) == 10: # length of date like 2001-01-01 is ten # assume format '%Y-%m-%d' date = mx.DateTime.strptime(value,DT_FORMAT) else: # assume format '%Y-%m-%d %H:%M:%S' value = str(value)[:19] date = mx.DateTime.strptime(str(value),DHM_FORMAT) else: date = mx.DateTime.DateTime(*(value.timetuple()[:6])) return date.strftime(date_format) return lang_obj.format('%.' + str(digits) + 'f', value, grouping=grouping, monetary=monetary)
3264c272ee3b71b911b45a468d5d53b795f84501 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/3264c272ee3b71b911b45a468d5d53b795f84501/report_sxw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 7275, 12, 2890, 16, 460, 16, 6815, 33, 22, 16, 1509, 33, 8381, 16, 712, 67, 957, 33, 8381, 16, 12116, 33, 5510, 16, 31198, 33, 8381, 16, 5462, 33, 8381, 4672, 225, 2845, 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, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 7275, 12, 2890, 16, 460, 16, 6815, 33, 22, 16, 1509, 33, 8381, 16, 712, 67, 957, 33, 8381, 16, 12116, 33, 5510, 16, 31198, 33, 8381, 16, 5462, 33, 8381, 4672, 225, 2845, 67, 4...
for index in sorted(msgstrs.keys()):
try: keys = sorted(msgstrs.keys()) except NameError: keys = msgstrs.keys() keys.sort() for index in keys:
def __str__(self, wrapwidth=78): """ Common string representation of the POEntry and MOEntry objects. """ if self.obsolete: delflag = '#~ ' else: delflag = '' # write the msgid lines = _strsplit(self.msgid, '\n') if self._is_multiline_msgid: ret = '%smsgid ""\n' % delflag for msgid in lines: ret += '%s"%s"\n' % (delflag, msgid) else: ret = '%smsgid "%s"\n' % (delflag, lines[0]) # write the msgid_plural if any if self.msgid_plural: lines = _strsplit(self.msgid_plural, '\n') if self._is_multiline_msgid_plural: ret += '%smsgid_plural ""\n' % delflag for msgid in lines: ret += '%s"%s"\n' % (delflag, msgid) else: ret += '%smsgid_plural "%s"\n' % (delflag, lines[0]) if self.msgstr_plural: msgstrs = self.msgstr_plural else: msgstrs = {0:self.msgstr} for index in sorted(msgstrs.keys()): msgstr = msgstrs[index] lines = _strsplit(msgstr, '\n') plural_index = '' is_multiline_msgstr = self._is_multiline_msgstr if self.msgstr_plural: plural_index = '[%s]' % index try: is_multiline_msgstr = \ self._is_multiline_msgstr_plural[index] except: pass if is_multiline_msgstr: ret += '%smsgstr%s ""\n' % (delflag, plural_index) for mstr in lines: ret += '%s"%s"\n' % (delflag, mstr) else: ret += '%smsgstr%s "%s"\n' % (delflag, plural_index, lines[0]) return ret
a9880ec20675d077a5ae87573051f34bcd6adb05 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9209/a9880ec20675d077a5ae87573051f34bcd6adb05/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 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, 1001, 701, 972, 12, 2890, 16, 2193, 2819, 33, 8285, 4672, 3536, 5658, 533, 4335, 434, 326, 13803, 1622, 471, 16070, 1622, 2184, 18, 3536, 309, 365, 18, 10992, 19513, 30, 1464, 6420, 273,...
else:
except ImportError:
def openrsrc(name, *mode): if not mode: mode = '*rb' else: mode = '*' + mode[0] return openrf(name, mode)
3cc48ceed9d84dd8ea049cba45c2d8356ee7f2e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/3cc48ceed9d84dd8ea049cba45c2d8356ee7f2e5/binhex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 86, 4816, 12, 529, 16, 380, 3188, 4672, 309, 486, 1965, 30, 1965, 273, 14609, 6731, 11, 1335, 11308, 30, 1965, 273, 5306, 397, 1965, 63, 20, 65, 327, 1696, 5809, 12, 529, 16, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1696, 86, 4816, 12, 529, 16, 380, 3188, 4672, 309, 486, 1965, 30, 1965, 273, 14609, 6731, 11, 1335, 11308, 30, 1965, 273, 5306, 397, 1965, 63, 20, 65, 327, 1696, 5809, 12, 529, 16, 1...
self.parent = self.context.get_dir_node(cr, dbro.parent_id.id)
self.parent = self.context.get_dir_node(cr, dbro.parent_id)
def move_to(self, cr, ndir_node, new_name=False, fil_obj=None, ndir_obj=None, in_write=False): if ndir_node.context != self.context: raise NotImplementedError("Cannot move files between contexts")
9dec9c2863bb41a997510b7eedab1945412a6cb0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9dec9c2863bb41a997510b7eedab1945412a6cb0/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 869, 12, 2890, 16, 4422, 16, 290, 1214, 67, 2159, 16, 394, 67, 529, 33, 8381, 16, 661, 67, 2603, 33, 7036, 16, 290, 1214, 67, 2603, 33, 7036, 16, 316, 67, 2626, 33, 8381,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3635, 67, 869, 12, 2890, 16, 4422, 16, 290, 1214, 67, 2159, 16, 394, 67, 529, 33, 8381, 16, 661, 67, 2603, 33, 7036, 16, 290, 1214, 67, 2603, 33, 7036, 16, 316, 67, 2626, 33, 8381,...
None,
[],
def build(self, config): if not self.wants_package(): return
fb3c47fee9dd51cc20d076b14a9af7c453afdb68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/fb3c47fee9dd51cc20d076b14a9af7c453afdb68/bootstrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 16, 642, 4672, 309, 486, 365, 18, 91, 4388, 67, 5610, 13332, 327, 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, ...
[ 1, 1, 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, 1361, 12, 2890, 16, 642, 4672, 309, 486, 365, 18, 91, 4388, 67, 5610, 13332, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
fitsins = Plugin_fitsin.objects.filter(task__success = True).values('id') fitsinsIds = [g['id'] for g in fitsins] nongraded = []
def getReport(self, request, reportId): """ Generates a report. @param reportId report Id as returned by the reports() function """ post = request.POST
9e0ba5fc357c6b59f09099f1f44fc7560b484d88 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11651/9e0ba5fc357c6b59f09099f1f44fc7560b484d88/qualityfitsin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22452, 12, 2890, 16, 590, 16, 2605, 548, 4672, 3536, 31902, 279, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 487, 2106, 635, 326, 10557, 1435, 445, 3536, 1603, 273, 590, 18, 3798, 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, 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, 22452, 12, 2890, 16, 590, 16, 2605, 548, 4672, 3536, 31902, 279, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 487, 2106, 635, 326, 10557, 1435, 445, 3536, 1603, 273, 590, 18, 3798, 2, -1...
mb = MHMailbox(mbox)
if os.path.isdir(os.path.join(mbox, 'cur')): mb = Maildir(mbox) else: mb = MHMailbox(mbox)
def _test(): import time import sys import string import os args = sys.argv[1:] if not args: for key in 'MAIL', 'LOGNAME', 'USER': if os.environ.has_key(key): mbox = os.environ[key] break else: print "$MAIL, $LOGNAME nor $USER set -- who are you?" return else: mbox = args[0] if mbox[:1] == '+': mbox = os.environ['HOME'] + '/Mail/' + mbox[1:] elif not '/' in mbox: mbox = '/usr/mail/' + mbox if os.path.isdir(mbox): mb = MHMailbox(mbox) else: fp = open(mbox, 'r') mb = UnixMailbox(fp) msgs = [] while 1: msg = mb.next() if msg is None: break msgs.append(msg) msg.fp = None if len(args) > 1: num = string.atoi(args[1]) print 'Message %d body:'%num msg = msgs[num-1] msg.rewindbody() sys.stdout.write(msg.fp.read()) else: print 'Mailbox',mbox,'has',len(msgs),'messages:' for msg in msgs: f = msg.getheader('from') or "" s = msg.getheader('subject') or "" d = msg.getheader('date') or "" print '%20.20s %18.18s %-30.30s'%(f, d[5:], s)
fa3bb53dbfbaea7fa7985f61f3464bdb0509a324 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/fa3bb53dbfbaea7fa7985f61f3464bdb0509a324/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 813, 1930, 2589, 1930, 533, 1930, 1140, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 486, 833, 30, 364, 498, 316, 296, 18191, 2187, 296, 4842, 1985, 2187, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 13332, 1930, 813, 1930, 2589, 1930, 533, 1930, 1140, 225, 833, 273, 2589, 18, 19485, 63, 21, 26894, 309, 486, 833, 30, 364, 498, 316, 296, 18191, 2187, 296, 4842, 1985, 2187, ...
cline = cline + " -SEQNOS=%s" % self.add_seqnos
cline += " -SEQNOS=%s" % self.add_seqnos
def __str__(self): """Write out the command line as a string.""" cline = self.command + " " + self.sequence_file
2eec844bd4b813ca4a021c23a58ac4936477a812 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/2eec844bd4b813ca4a021c23a58ac4936477a812/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 3536, 3067, 596, 326, 1296, 980, 487, 279, 533, 12123, 927, 558, 273, 365, 18, 3076, 397, 315, 315, 397, 365, 18, 6178, 67, 768, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 701, 972, 12, 2890, 4672, 3536, 3067, 596, 326, 1296, 980, 487, 279, 533, 12123, 927, 558, 273, 365, 18, 3076, 397, 315, 315, 397, 365, 18, 6178, 67, 768, 2, -100, -100, -100, ...
treeview.get_model().append(parent, [DictWrapper(track), icon, tt, td, tip])
treeview.get_model().append(parent, [track, icon, tt, td, tip])
def add_treeview_item(self, treeview, album): if not isinstance(album['image'], GdkPixbuf.Pixbuf): # album image pixbuf is not yet built try: pb = GdkPixbuf.Pixbuf.new_from_file(album['image']) os.unlink(album['image']) album['image'] = pb except: # do not fail for this, just display a dummy pixbuf album['image'] = GdkPixbuf.Pixbuf.new(GdkPixbuf.Colorspace.RGB, True, 8, 1, 1) # format title title = '<b>%s</b>\n' % self._format_str(album['name']) title += _('Artist: %s') % self._format_str(album['artist_name']) # format duration dur = self._format_duration(album['duration']) # format tooltip try: # Translators: this is the release date of an album in Python strptime format release = time.strptime(album['dates']['release'][0:10], _('%Y-%m-%d')) # Translators: this is the release time of an album in Python strftime format release = time.strftime(_('%x'), release) except: release = '' tip = '\n'.join([ '<b>%s</b>' % self._format_str(album['name']), _('Artist: %s') % self._format_str(album['artist_name']), _('Genre: %s') % self._format_str(album['genre']), _('Released on: %s') % release, _('License: %s') % self._format_str(album['license'][0]), ]) # append album row parent = treeview.get_model().append(None, [DictWrapper(album), album['image'], title, dur, tip] )
db514ed6f5d61929a0b240f7cca7eddc9139f373 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11070/db514ed6f5d61929a0b240f7cca7eddc9139f373/jamendo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3413, 1945, 67, 1726, 12, 2890, 16, 2151, 1945, 16, 14844, 4672, 309, 486, 1549, 12, 25090, 3292, 2730, 17337, 611, 2883, 21816, 4385, 18, 21816, 4385, 4672, 468, 14844, 1316, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3413, 1945, 67, 1726, 12, 2890, 16, 2151, 1945, 16, 14844, 4672, 309, 486, 1549, 12, 25090, 3292, 2730, 17337, 611, 2883, 21816, 4385, 18, 21816, 4385, 4672, 468, 14844, 1316, 1...
self.api = api
self.api = api
def __init__(self, api, nodegroup_id_or_name_list = None): self.api = api
e18556e71838d07f78aaf9746640d2e037ff4d80 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7598/e18556e71838d07f78aaf9746640d2e037ff4d80/NodeGroups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1536, 16, 756, 1655, 67, 350, 67, 280, 67, 529, 67, 1098, 273, 599, 4672, 365, 18, 2425, 273, 1536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 1536, 16, 756, 1655, 67, 350, 67, 280, 67, 529, 67, 1098, 273, 599, 4672, 365, 18, 2425, 273, 1536, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, stageId, policy):
def __init__(self, stageId = -1, policy = None):
def __init__(self, stageId, policy):
53d0f56cf1ba10a6c2030f859b932a4dd158b224 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6535/53d0f56cf1ba10a6c2030f859b932a4dd158b224/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6009, 548, 16, 3329, 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,...
[ 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, 2738, 972, 12, 2890, 16, 6009, 548, 16, 3329, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
data = self.get_results(SID, self.read_items_url) feed_data = self.list_feeds(SID)
data = self.get_results(auth, self.read_items_url) feed_data = self.list_feeds(auth)
def get_unread_items(self, SID): feed_db = [] data = self.get_results(SID, self.read_items_url) feed_data = self.list_feeds(SID) node = ET.XML(data) feed_node = ET.XML(feed_data) total_unread = 0 node = node.find("list") feed_node = feed_node.find("list") for o in node.findall("object"): feed = "" total_unread = 0 feed_title = "" for n in o.findall("string"): if (n.attrib["name"] == "id"): feed = n.text for n in o.findall("number"): if (n.attrib["name"] == "count"): total_unread = int(n.text) if feed[0:5] != "user/": for x in feed_node.findall("object"): found = False for y in x.findall("string"): if(y.attrib["name"] == "id" and y.text == feed): found = True if(y.attrib["name"] == "title" and found == True): feed_title = y.text if feed_title != "" and total_unread > 0: f = Feed(feed_title, total_unread) feed_db.append(f) return feed_db
d660fa8de448b6d558aaa117af54d4e5873436cc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10818/d660fa8de448b6d558aaa117af54d4e5873436cc/watch_web_greader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 318, 896, 67, 3319, 12, 2890, 16, 23150, 4672, 4746, 67, 1966, 273, 5378, 501, 273, 365, 18, 588, 67, 4717, 12, 1944, 16, 365, 18, 896, 67, 3319, 67, 718, 13, 4746, 67, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 318, 896, 67, 3319, 12, 2890, 16, 23150, 4672, 4746, 67, 1966, 273, 5378, 501, 273, 365, 18, 588, 67, 4717, 12, 1944, 16, 365, 18, 896, 67, 3319, 67, 718, 13, 4746, 67, 89...
domain="[('type', '=', 'storage')]", )
domain="[('type', 'not in', " \ "('supplier', 'customer', 'warehouse'))]")
def button_draft(self, cursor, user, ids, context=None): workflow_service = LocalService('workflow') for packing in self.browse(cursor, user, ids, context=context): workflow_service.trg_create(user, self._name, packing.id, cursor, context=context)
05cbdfaefdf49a337fcb6346f54d4fa5f8fe1147 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9298/05cbdfaefdf49a337fcb6346f54d4fa5f8fe1147/packing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3568, 67, 17153, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 6095, 67, 3278, 273, 3566, 1179, 2668, 13815, 6134, 364, 2298, 310, 316, 365, 18, 25731, 12, 9216, 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, 3568, 67, 17153, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 6095, 67, 3278, 273, 3566, 1179, 2668, 13815, 6134, 364, 2298, 310, 316, 365, 18, 25731, 12, 9216, 16, ...
window.add_with_viewport(self.treeview)
window.add_with_viewport(treeview)
def create_tree_view(self): self.treeview = gtk.TreeView() self.similar_songs_model = OnlineListModel(self.treeview) self.treeview.connect("drag-end", self.on_drag_end) self.treeview.connect("button-press-event", self.onPlaySong, self.similar_songs_model)
30621b1b35c9b66de07824444a8beb2d55e3d510 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/30621b1b35c9b66de07824444a8beb2d55e3d510/online_controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3413, 67, 1945, 12, 2890, 4672, 365, 18, 3413, 1945, 273, 22718, 18, 2471, 1767, 1435, 365, 18, 22985, 67, 816, 564, 67, 2284, 273, 2755, 1369, 682, 1488, 12, 2890, 18, 3413, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3413, 67, 1945, 12, 2890, 4672, 365, 18, 3413, 1945, 273, 22718, 18, 2471, 1767, 1435, 365, 18, 22985, 67, 816, 564, 67, 2284, 273, 2755, 1369, 682, 1488, 12, 2890, 18, 3413, ...
startup_pipe.write("READY")
startup_pipe.write(struct.pack('@H', listen_port))
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca) print 'HTTPS server started on port %d...' % port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url server._sync_handler = None # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) print 'FTP server started on port %d...' % port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") startup_pipe.write("READY") startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
13e4418cd94e979f87299cfa629823a71d8e73d4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/13e4418cd94e979f87299cfa629823a71d8e73d4/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
sum = '<table border="0" cellpadding="3" width="100%" class="status_table">'
sum = '<table class="status_table">'
def submission_summary_info(self, job_id): """Checks for any "other" problems with the user-selected chains. """ ## TODO: Post-sanity checks, 2009-01-08 chains = mysql.job_get_chain_sizes(job_id).rstrip(";")
ebe7911aaa6579796c3b771f64c91ad7ae981d9b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10674/ebe7911aaa6579796c3b771f64c91ad7ae981d9b/webtlsmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8515, 67, 7687, 67, 1376, 12, 2890, 16, 1719, 67, 350, 4672, 3536, 4081, 364, 1281, 315, 3011, 6, 9688, 598, 326, 729, 17, 8109, 13070, 18, 3536, 7541, 2660, 30, 5616, 17, 87, 10417, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8515, 67, 7687, 67, 1376, 12, 2890, 16, 1719, 67, 350, 4672, 3536, 4081, 364, 1281, 315, 3011, 6, 9688, 598, 326, 729, 17, 8109, 13070, 18, 3536, 7541, 2660, 30, 5616, 17, 87, 10417, ...
totest['empty file'] = [ [ """\ """, latex_head + """\ \\title{} \\author{} \\date{} \\raggedbottom \\begin{document} \\maketitle Document empty; must have contents. \\end{document} """ ], ] totest['tables_of_contents'] = [
totest['table_of_contents'] = [
def suite(): s = DocutilsTestSupport.LatexPublishTestSuite() s.generateTests(totest) return s
b40a407f41d83aec6e5cc91308aa4714c0351b38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/b40a407f41d83aec6e5cc91308aa4714c0351b38/test_latex2e.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 6607, 338, 6024, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 6607, 338, 6024, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 282, 2, -100, -100, -100, -100, -100, -100, -10...
while as : r.append((as[0], as[1]))
while as: r.append ((as[0], as[1]))
def zip_to_pairs(as): r = [] while as : r.append((as[0], as[1])) as = as[2:] return r
d96cc8339091f674ea0fc313632dcc5c333eeb78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/d96cc8339091f674ea0fc313632dcc5c333eeb78/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3144, 67, 869, 67, 11545, 12, 345, 4672, 436, 273, 5378, 1323, 487, 30, 436, 18, 6923, 14015, 345, 63, 20, 6487, 487, 63, 21, 22643, 487, 273, 487, 63, 22, 26894, 327, 436, 225, 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, 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, 3144, 67, 869, 67, 11545, 12, 345, 4672, 436, 273, 5378, 1323, 487, 30, 436, 18, 6923, 14015, 345, 63, 20, 6487, 487, 63, 21, 22643, 487, 273, 487, 63, 22, 26894, 327, 436, 225, 2, ...
if len(qu1_join): qu1 = qu1 + ' and ' qu1 += ' and '.join(qu1_join)
where.extend(qu1_join) where_str = " WHERE %s" % " AND ".join(where)
def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): """ Search for record/s based on a search domain.
1f7945ce68a0aed1e6ebde11f89caf8e77650d76 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/1f7945ce68a0aed1e6ebde11f89caf8e77650d76/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 3536, 5167, 364, 1409, 19, 87, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4422, 16, 729, 16, 833, 16, 1384, 33, 20, 16, 1800, 33, 7036, 16, 1353, 33, 7036, 16, 819, 33, 7036, 16, 1056, 33, 8381, 4672, 3536, 5167, 364, 1409, 19, 87, 25...
def expect_addition(self, names):
def expect_addition(self, names):
def expect_addition(self, names): for name in self.adjust_names(names): try: glob_remove(self.unexpected_difference.added_files,name) except: print "File %s not added as expected" % (name,) self.fail_test(1)
7fd3402b2f4f82737ed801341b64ce21798622c6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9981/7fd3402b2f4f82737ed801341b64ce21798622c6/BoostBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 67, 1289, 608, 12, 2890, 16, 1257, 4672, 364, 508, 316, 365, 18, 13362, 67, 1973, 12, 1973, 4672, 775, 30, 4715, 67, 4479, 12, 2890, 18, 21248, 67, 23444, 18, 9665, 67, 2354, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4489, 67, 1289, 608, 12, 2890, 16, 1257, 4672, 364, 508, 316, 365, 18, 13362, 67, 1973, 12, 1973, 4672, 775, 30, 4715, 67, 4479, 12, 2890, 18, 21248, 67, 23444, 18, 9665, 67, 2354, 1...
FetchData['Update'].append( item ) if os.access( os.path.join( download_path, ArgumentOptions.zip_update_file ), os.F_OK ): log.err( "%s already present.\nRemove it first.\n" % ( zip_update_file ) ) sys.exit( 1 ) if ArgumentOptions.fetch_upgrade: try: raw_data_list = open( ArgumentOptions.fetch_upgrade, 'r' ).readlines() except IOError, ( errno, strerror ): log.err( "%s %s\n" % ( errno, strerror ) ) errfunc( errno, '' ) FetchData['Upgrade'] = [] for item in raw_data_list: FetchData['Upgrade'].append( item ) if os.access( os.path.join( download_path, ArgumentOptions.zip_upgrade_file ), os.F_OK ): log.err( "%s already present.\nRemove it first.\n" % ( zip_upgrade_file ) ) sys.exit( 1 )
FetchData['Item'].append( item )
def __init__( self, width, lock ): DownloadFromWeb.__init__( self, width=width ) #ProgressBar.__init__(self, width) #self.width = width AptOfflineLib.Archiver.__init__( self, lock=lock ) #self.lock = lock
da63a417a8560a39ca821994468a1533f4c1445a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12499/da63a417a8560a39ca821994468a1533f4c1445a/AptOfflineCoreLib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 1835, 16, 2176, 262, 30, 13059, 1265, 4079, 16186, 2738, 972, 12, 365, 16, 1835, 33, 2819, 262, 468, 31547, 16186, 2738, 972, 12, 2890, 16, 1835, 13, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 365, 16, 1835, 16, 2176, 262, 30, 13059, 1265, 4079, 16186, 2738, 972, 12, 365, 16, 1835, 33, 2819, 262, 468, 31547, 16186, 2738, 972, 12, 2890, 16, 1835, 13, 468,...
raise "\nERROR: Invalid Item"
raise Exception("\nERROR: Invalid Item")
def GetItemWindowEnabled(self, item): """Returns whether the window associated to the item is enabled."""
e1463b9df091ad0e9d76292564d4389882b28de1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/e1463b9df091ad0e9d76292564d4389882b28de1/customtreectrl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 1180, 3829, 1526, 12, 2890, 16, 761, 4672, 3536, 1356, 2856, 326, 2742, 3627, 358, 326, 761, 353, 3696, 12123, 2, 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, 968, 1180, 3829, 1526, 12, 2890, 16, 761, 4672, 3536, 1356, 2856, 326, 2742, 3627, 358, 326, 761, 353, 3696, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
return self._getmember(name)
return tarinfo
def getmember(self, name): """Return a TarInfo object for member `name'. If `name' can not be found in the archive, KeyError is raised. If a member occurs more than once in the archive, its last occurence is assumed to be the most up-to-date version. """ self._check() if name not in self.membernames and not self._loaded: self._load() if name not in self.membernames: raise KeyError, "filename %r not found" % name return self._getmember(name)
d0fb0ac63c5db48d344c6e8e8dab57214f04e854 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/d0fb0ac63c5db48d344c6e8e8dab57214f04e854/tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5990, 12, 2890, 16, 508, 4672, 3536, 990, 279, 20334, 966, 733, 364, 3140, 1375, 529, 10332, 971, 1375, 529, 11, 848, 486, 506, 1392, 316, 326, 5052, 16, 4999, 353, 11531, 18, 971...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5990, 12, 2890, 16, 508, 4672, 3536, 990, 279, 20334, 966, 733, 364, 3140, 1375, 529, 10332, 971, 1375, 529, 11, 848, 486, 506, 1392, 316, 326, 5052, 16, 4999, 353, 11531, 18, 971...
else:
if not build_found:
def get_build_for_slave(self, name, properties): """Check whether one of the pending builds can be built by the build slave. :param name: the name of the slave :type name: `basestring` :param properties: the slave configuration :type properties: `dict` :return: the allocated build, or `None` if no build was found :rtype: `Build` """ self.log.debug('Checking for pending builds...')
c94787f5d7c70e1690f0a3dddd5ef573c2d72b7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4547/c94787f5d7c70e1690f0a3dddd5ef573c2d72b7b/queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3510, 67, 1884, 67, 27352, 12, 2890, 16, 508, 16, 1790, 4672, 3536, 1564, 2856, 1245, 434, 326, 4634, 10736, 848, 506, 6650, 635, 326, 1361, 11735, 18, 225, 294, 891, 508, 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, 336, 67, 3510, 67, 1884, 67, 27352, 12, 2890, 16, 508, 16, 1790, 4672, 3536, 1564, 2856, 1245, 434, 326, 4634, 10736, 848, 506, 6650, 635, 326, 1361, 11735, 18, 225, 294, 891, 508, 30,...
reflist = self.document.refnames[target['name']]
reflist = self.document.refnames.get(target['name'], [])
def nonexistent_indirect_target(self, target): naming = '' if target.hasattr('name'): naming = '"%s" ' % target['name'] reflist = self.document.refnames[target['name']] else: reflist = self.document.refnames[target['id']] naming += '(id="%s")' % target['id'] msg = self.document.reporter.warning( 'Indirect hyperlink target %s refers to target "%s", ' 'which does not exist.' % (naming, target['refname'])) self.document.messages += msg msgid = self.document.set_id(msg) for ref in reflist: prb = nodes.problematic( ref.rawsource, ref.rawsource, refid=msgid) prbid = self.document.set_id(prb) msg.add_backref(prbid) ref.parent.replace(ref, prb) target.resolved = 1
e4360182623c8084c11a7209a02cc7b17e830be9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/e4360182623c8084c11a7209a02cc7b17e830be9/references.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1661, 19041, 67, 728, 867, 67, 3299, 12, 2890, 16, 1018, 4672, 14634, 273, 875, 309, 1018, 18, 5332, 1747, 2668, 529, 11, 4672, 14634, 273, 22563, 87, 6, 296, 738, 1018, 3292, 529, 354...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1661, 19041, 67, 728, 867, 67, 3299, 12, 2890, 16, 1018, 4672, 14634, 273, 875, 309, 1018, 18, 5332, 1747, 2668, 529, 11, 4672, 14634, 273, 22563, 87, 6, 296, 738, 1018, 3292, 529, 354...
"""Marker Interface: can determine something about an instances properties by using the provided convenience functions. """ class DefinitionMarker: """marker for definitions """ pass class DeclarationMarker: """marker for declarations """ pass class AttributeMarker: """marker for attributes """ pass class AttributeGroupMarker: """marker for attribute groups """ pass class WildCardMarker: """marker for wildcards """ pass class ElementMarker: """marker for wildcards """ pass class ReferenceMarker: """marker for references """ pass class ModelGroupMarker: """marker for model groups """ pass class ExtensionMarker: """marker for extensions """ pass class RestrictionMarker: """marker for restrictions """ facets = ['enumeration', 'length', 'maxExclusive', 'maxInclusive',\ 'maxLength', 'minExclusive', 'minInclusive', 'minLength',\ 'pattern', 'fractionDigits', 'totalDigits', 'whiteSpace'] class SimpleMarker: """marker for simple type information """ pass class ComplexMarker: """marker for complex type information """ pass class MarkerInterface: def isDefinition(self): return isinstance(self, DefinitionMarker) def isDeclaration(self): return isinstance(self, DeclarationMarker) def isAttribute(self): return isinstance(self, AttributeMarker) def isAttributeGroup(self): return isinstance(self, AttributeGroupMarker) def isElement(self): return isinstance(self, ElementMarker) def isReference(self): return isinstance(self, ReferenceMarker) def isWildCard(self): return isinstance(self, WildCardMarker) def isModelGroup(self): return isinstance(self, ModelGroupMarker) def isExtension(self): return isinstance(self, ExtensionMarker) def isRestriction(self): return isinstance(self, RestrictionMarker) def isSimple(self): return isinstance(self, SimpleMarker) def isComplex(self): return isinstance(self, ComplexMarker)
def getImportSchemas(self): """returns WSDLTools.WSDL types Collection """ return self._parent().types
85e69b65134313ec3f3db57e106088fcd5133b18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/85e69b65134313ec3f3db57e106088fcd5133b18/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5010, 16749, 12, 2890, 4672, 3536, 6154, 30567, 10348, 18, 2651, 8914, 1953, 2200, 3536, 327, 365, 6315, 2938, 7675, 2352, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 5010, 16749, 12, 2890, 4672, 3536, 6154, 30567, 10348, 18, 2651, 8914, 1953, 2200, 3536, 327, 365, 6315, 2938, 7675, 2352, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
error(t.lineno(1), 'instruction format "%s" not defined.' % t[1]) codeObj = format.defineInst(t[3], t[5], t.lineno(1))
error(t.lexer.lineno, 'instruction format "%s" not defined.' % t[1]) codeObj = format.defineInst(t[3], t[5], t.lexer.lineno)
def p_inst_1(t): 'inst : ID DBLCOLON ID LPAREN arg_list RPAREN' try: format = formatMap[t[1]] except KeyError: error(t.lineno(1), 'instruction format "%s" not defined.' % t[1]) codeObj = format.defineInst(t[3], t[5], t.lineno(1)) comment = '\n// %s::%s(%s)\n' % (t[1], t[3], t[5]) codeObj.prepend_all(comment) t[0] = codeObj
afeef4c0622dd3b0d90a8446c97b6671679c1a82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/afeef4c0622dd3b0d90a8446c97b6671679c1a82/isa_parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 67, 8591, 67, 21, 12, 88, 4672, 296, 8591, 294, 1599, 2383, 48, 4935, 673, 1599, 511, 15111, 1501, 67, 1098, 534, 15111, 11, 775, 30, 740, 273, 740, 863, 63, 88, 63, 21, 13563, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 67, 8591, 67, 21, 12, 88, 4672, 296, 8591, 294, 1599, 2383, 48, 4935, 673, 1599, 511, 15111, 1501, 67, 1098, 534, 15111, 11, 775, 30, 740, 273, 740, 863, 63, 88, 63, 21, 13563, ...
res = GetRegistryKey(key, "MAYA_INSTALL_LOCATION") if (res != 0): res = res.replace("\\", "/").rstrip("/") SDK[res] = ver
for dev in ["Alias|Wavefront","Alias","Autodesk"]: fullkey="SOFTWARE\\"+dev+"\\Maya\\"+key+"\\Setup\\InstallPath" res = GetRegistryKey(fullkey, "MAYA_INSTALL_LOCATION") if (res != 0): res = res.replace("\\", "/").rstrip("/") SDK[res] = ver
def SdkLocateMaya(): if (sys.platform != "win32"): return for (ver,key) in MAYAVERSIONINFO: if (PkgSkip(ver)==0): if (SDK.has_key(ver)==0): ddir = "sdks/"+ver.lower().replace("x","") if (os.path.isdir(ddir)): SDK[ver] = ddir else: res = GetRegistryKey(key, "MAYA_INSTALL_LOCATION") if (res != 0): res = res.replace("\\", "/").rstrip("/") SDK[res] = ver
d166883bfe7b6b516456bce3f80b73d00e7d5dd4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/d166883bfe7b6b516456bce3f80b73d00e7d5dd4/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 49, 528, 69, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 364, 261, 502, 16, 856, 13, 316, 490, 5255, 37, 5757, 5923, 30, 309, 261, 11264, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3426, 1333, 340, 49, 528, 69, 13332, 309, 261, 9499, 18, 9898, 480, 315, 8082, 1578, 6, 4672, 327, 364, 261, 502, 16, 856, 13, 316, 490, 5255, 37, 5757, 5923, 30, 309, 261, 11264, 63...
success = S.interrupt(INTERRUPT_TRIES, timeout=0.3, quit_on_fail=False)
success = S.interrupt(INTERRUPT_TRIES, quit_on_fail=False)
def interrupt(self): """ Interrupt all currently queued up calculations.
1953598013603de89232713817539974d30874d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/1953598013603de89232713817539974d30874d0/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13123, 12, 2890, 4672, 3536, 3094, 4483, 777, 4551, 12234, 731, 20882, 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, 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, 13123, 12, 2890, 4672, 3536, 3094, 4483, 777, 4551, 12234, 731, 20882, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
msg['Subject'] = tools.ustr(subject)
msg['Subject'] = tools.ustr(subject)
def createReport(cr, uid, report, ids, name=False): files = [] for id in ids: try: service = netsvc.LocalService(report) (result, format) = service.create(cr, uid, [id], {}, {}) if not name: report_file = '/tmp/reports'+ str(id) + '.pdf' else: report_file = name fp = open(report_file,'wb+') fp.write(result); fp.close(); files += [report_file] except Exception,e: continue return files
5a558b6b1034593b8c71deeda96db7e8dd5329c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/5a558b6b1034593b8c71deeda96db7e8dd5329c3/smtpclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4820, 12, 3353, 16, 4555, 16, 2605, 16, 3258, 16, 508, 33, 8381, 4672, 1390, 273, 5378, 364, 612, 316, 3258, 30, 775, 30, 1156, 273, 21954, 4227, 18, 25635, 12, 6006, 13, 261, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 4820, 12, 3353, 16, 4555, 16, 2605, 16, 3258, 16, 508, 33, 8381, 4672, 1390, 273, 5378, 364, 612, 316, 3258, 30, 775, 30, 1156, 273, 21954, 4227, 18, 25635, 12, 6006, 13, 261, 2...
prefix = encode('')
prefix = encode('')
def sniff_encoding(xml): """Detects the XML encoding as per XML 1.0 section F.1.""" enc = sniff_bom_encoding(xml) # Now the fun really starts. We compile the encoded sniffer regexp. # We must use an encoder to handle utf_8_sig properly. encode = codecs.lookup(enc).incrementalencoder().encode prefix = encode('') L = lambda s: re.escape(encode(s)) # encoded form of literal s optional = lambda s: '(?:%s)?' % s oneof = lambda opts: '(?:%s)' % '|'.join(opts) charset = lambda s: oneof([L(c) for c in s]) upper = charset('ABCDEFGHIJKLMNOPQRSTUVWXYZ') lower = charset('abcdefghijklmnopqrstuvwxyz') digits = charset('0123456789') punc = charset('._-') name = '(?:%s%s*)' % (oneof([upper, lower]), oneof([upper, lower, digits, punc])) Ss = charset(' \t\r\n')+'*' # optional white space Sp = charset(' \t\r\n')+'+' # required white space Eq = ''.join([Ss, L('='), Ss]) VersionInfo = ''.join([ Sp, L('version'), Eq, oneof([L("'1.")+digits+L("'"), L('"1.')+digits+L('"')]) ]) # standalone="yes" is valid XML but almost certainly a lie... SDDecl = ''.join([ Sp, L('standalone'), Eq, oneof([L("'")+oneof(['yes', 'no'])+L("'"), L('"')+oneof(['yes', 'no'])+L('"')])]) R = ''.join([ prefix, # any header such as a UTF-8 BOM L('<?xml'), optional(VersionInfo), Sp, L('encoding'), Eq, '(?P<enc>%s|%s)' % ( L("'")+name+L("'"), L('"')+name+L('"')), optional(SDDecl), Ss, L('?>') ]) m = re.match(R, xml) if m: decl_enc = m.group('enc')[1:-1].decode(enc).encode('ascii') if (enc==enc.lower() and codecs.lookup(enc) != codecs.lookup(decl_enc)): raise ValidationError( "Multiply-specified encoding (BOM: %s, XML decl: %s)" % (enc, decl_enc), 0, 1, 1, []) return decl_enc else: return 'UTF-8'
7a06e148144d149fb4de5633ab51c94ff9e7a8fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10679/7a06e148144d149fb4de5633ab51c94ff9e7a8fb/xhtmlify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26974, 67, 5999, 12, 2902, 4672, 3536, 12081, 87, 326, 3167, 2688, 487, 1534, 3167, 404, 18, 20, 2442, 478, 18, 21, 12123, 2446, 273, 26974, 67, 70, 362, 67, 5999, 12, 2902, 13, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26974, 67, 5999, 12, 2902, 4672, 3536, 12081, 87, 326, 3167, 2688, 487, 1534, 3167, 404, 18, 20, 2442, 478, 18, 21, 12123, 2446, 273, 26974, 67, 70, 362, 67, 5999, 12, 2902, 13, 468, ...
gsm = zapi.getGlobalSiteManager()
gsm = getGlobalSiteManager()
def setUp(self): setup.placefulSetUp() self.rootFolder = setup.buildSampleFolderTree() gsm = zapi.getGlobalSiteManager() de_catalog = MessageCatalog('de', 'default') de_catalog.setMessage('short_greeting', 'Hallo!', 10) de_catalog.setMessage('long_greeting', 'Guten Tag!', 10) # register global translation domain and add the catalog. domain = GlobalTranslationDomain('default') domain.addCatalog(de_catalog) gsm.registerUtility(domain, ITranslationDomain, 'default')
e15d8c340dc64841e1edd340001a36a84bc9a614 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9528/e15d8c340dc64841e1edd340001a36a84bc9a614/test_translationdomain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3875, 18, 964, 18474, 1211, 1435, 365, 18, 3085, 3899, 273, 3875, 18, 3510, 8504, 3899, 2471, 1435, 314, 4808, 273, 20591, 4956, 1318, 1435, 443, 67, 7199, 273, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 24292, 12, 2890, 4672, 3875, 18, 964, 18474, 1211, 1435, 365, 18, 3085, 3899, 273, 3875, 18, 3510, 8504, 3899, 2471, 1435, 314, 4808, 273, 20591, 4956, 1318, 1435, 443, 67, 7199, 273, 23...
def __init__( self, model ): self.model = model def __distances( self, atom ): """distances( int_atom ) -> distances of all atoms to given atom""" xyz = self.model.xyz return N.sqrt( N.sum( N.power( xyz - xyz[atom], 2), 1 ) )
def __init__( self, model, orbit, center=None ): """ model - PDBModel orbit - float, center-to-center distance of binding partner in complex exclude- [ 1|0 ], atom mask of atoms to exclude from patches """ self.model = model self.orbit = orbit self.center = center or model.center() def __distances( self, point, xyz=None ): """ point - 3 x 1 array of float; point of origin xyz - 3 x n array of float; coordinates, if None -- take model atoms -> distances of all atoms to given point """ if xyz is None: xyz = self.model.getXyz() return N.sqrt( N.sum( N.power( xyz - point, 2), 1 ) ) def random_translations( self, n=1, center=None ): """ n Random translations on a sphere around center with fixed radius. The radius must be given as orbit to __init__. n - int, number of random coordinates to generate center - 3 array of float -> array n x 3 of float """ if center is None: center = self.center xyz = ra.random( (n,3) ) - 0.5 scale = self.orbit*1.0 / N.sqrt( N.sum( xyz**2, 1 ) ) r = N.array( [ scale[i]*xyz[i] for i in range(n) ] ) return r + center def patchAround( self, center, nAtoms ): """ patchAround( float_center, int_nAtoms ) -> mask for self.model Create single patch of nAtoms atoms that are closest to center. """ dist = self.__distances( center ) order = N.argsort( dist ) r = N.zeros( len( self.model ), 'i' ) N.put( r, order[:nAtoms], 1 ) return self.centerPatch( r ) def centerPatch( self, patch_mask ): """ patch_mask - [ 1|0 ], mask of non-centered patch -> [ 1|0 ], mask of patch around geometric center of first patch """ c = self.model.center( patch_mask ) dist = self.__distances( c ) n_atoms= len( N.nonzero( patch_mask ) ) i_dist = N.argsort( dist )[:n_atoms] result = N.zeros( len( patch_mask ) ) N.put( result, i_dist, 1 ) return result def orderCenters( self, points, origin=None ): """ Order random points by increasing distance to first or to origin. points - n x 3 array of float, random center coordinates origin - 3 array of float -> [ int ], indices into points ordered by increasing distance """ origin = origin if origin is None: origin = points[0] dist = self.__distances( origin, points )
def __init__( self, model ): self.model = model
e5244fcd6e879bc27ccfd3cf243d90f2bd6a63fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/482/e5244fcd6e879bc27ccfd3cf243d90f2bd6a63fb/PatchGeneratorFromOrbit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 938, 262, 30, 365, 18, 2284, 273, 938, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 938, 262, 30, 365, 18, 2284, 273, 938, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
dt = 2.3*second fault = FaultCohesiveKin()
dt = 2.4*second (mesh, fault, fields) = self._initialize()
def test_stableTimeStep(self): """ Test stableTimeStep(). """ from pyre.units.time import second dt = 2.3*second fault = FaultCohesiveKin() fault.timeStep(dt) self.assertEqual(dt, fault.stableTimeStep()) return
70fdf68ec3daca8df452e09c8fdf36cd397ce5c4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8645/70fdf68ec3daca8df452e09c8fdf36cd397ce5c4/TestFaultCohesiveKin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15021, 950, 4160, 12, 2890, 4672, 3536, 7766, 14114, 950, 4160, 7675, 3536, 628, 2395, 266, 18, 7705, 18, 957, 1930, 2205, 3681, 273, 576, 18, 24, 14, 8538, 261, 15557, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15021, 950, 4160, 12, 2890, 4672, 3536, 7766, 14114, 950, 4160, 7675, 3536, 628, 2395, 266, 18, 7705, 18, 957, 1930, 2205, 3681, 273, 576, 18, 24, 14, 8538, 261, 15557, 16, 1...
print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error) try: print >>sys.stderr, """ The specified output encoding (%s) cannot handle all of the output.""" % error.encoding except AttributeError: print >>sys.stderr, """ The specified output encoding cannot handle all of the output.""" print """\ Try setting "--output-encoding-error-handler" to * "xmlcharrefreplace" (for HTML & XML output);"""
sys.stderr.write( '%s: %s\n' '\n' 'The specified output encoding (%s) cannot\n' 'handle all of the output.\n' 'Try setting "--output-encoding-error-handler" to\n' '\n' '* "xmlcharrefreplace" (for HTML & XML output);\n' % (error.__class__.__name__, error, self.settings.output_encoding))
def report_UnicodeError(self, error): print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error)
e21a74ec155459aef1d0abcb5b2911319d648bcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/e21a74ec155459aef1d0abcb5b2911319d648bcf/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 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, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 2, -100, -1...
from libs import tools tools.logRequest(py.get('logfile',''), '304') renderer.addHeader(['ETag: "%s"' % entryList[0]['mtime'], 'Last-Modified: %s' % lastModed])
from libs import tools tools.logRequest(config.get('logfile',''), '304') renderer.addHeader(['ETag: "%s"' % entryList[0]['mtime'], 'Last-Modified: %s' % lastModed])
def prepare(args): request = args[0] data = request.getData() entryList = data["entry_list"] renderer = data["renderer"] if entryList: import os, time # Get our first file timestamp for ETag and Last Modified # Last-Modified: Wed, 20 Nov 2002 10:08:12 GMT # ETag: "2bdc4-7b5-3ddb5f0c" lastModed = time.strftime('%a, %d %b %Y %H:%M:%S GMT', time.gmtime(entryList[0]['mtime'])) if ((os.environ.get('HTTP_IF_NONE_MATCH','') == '"%s"' % entryList[0]['mtime']) or (os.environ.get('HTTP_IF_NONE_MATCH','') == '%s' % entryList[0]['mtime']) or (os.environ.get('HTTP_IF_MODIFIED_SINCE','') == lastModed)): renderer.addHeader(['Status: 304 Not Modified', 'ETag: "%s"' % entryList[0]['mtime'], 'Last-Modified: %s' % lastModed]) renderer.needsContentType(None) renderer.render() from libs import tools tools.logRequest(py.get('logfile',''), '304') renderer.addHeader(['ETag: "%s"' % entryList[0]['mtime'], 'Last-Modified: %s' % lastModed])
d835ec42452d602279efdc7bf4905e3cb7b7dde6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/d835ec42452d602279efdc7bf4905e3cb7b7dde6/conditionalhttp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 1968, 4672, 590, 273, 833, 63, 20, 65, 501, 273, 590, 18, 588, 751, 1435, 1241, 682, 273, 501, 9614, 4099, 67, 1098, 11929, 5690, 273, 501, 9614, 14374, 11929, 225, 309, 1241...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2911, 12, 1968, 4672, 590, 273, 833, 63, 20, 65, 501, 273, 590, 18, 588, 751, 1435, 1241, 682, 273, 501, 9614, 4099, 67, 1098, 11929, 5690, 273, 501, 9614, 14374, 11929, 225, 309, 1241...
self.appendMessages(lines, keyedMessages[header], label) lines.append("""<tr><td></td><td></td><td align='center'>&nbsp;<br>
self.appendMessages(lines, keyedMessages[header], label, startAt, howMany) lines.append("""<tr><td></td><td></td><td align='center' colspan='4'>&nbsp;<br>
def onReview(self, params): """Present a list of message for (re)training.""" # Train/discard submitted messages. id = '' numTrained = 0 numDeferred = 0 for key, value in params.items(): if key.startswith('classify:'): id = key.split(':')[2] if value == 'spam': targetCorpus = state.spamCorpus elif value == 'ham': targetCorpus = state.hamCorpus elif value == 'discard': targetCorpus = None try: state.unknownCorpus.removeMessage(state.unknownCorpus[id]) except KeyError: pass # Must be a reload. else: # defer targetCorpus = None numDeferred += 1 if targetCorpus: try: targetCorpus.takeMessage(id, state.unknownCorpus) if numTrained == 0: self.push("<p><b>Training... ") self.push(" ") numTrained += 1 except KeyError: pass # Must be a reload.
38162d4d907fe3e4c5679f4e7231ffe1339613bd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/38162d4d907fe3e4c5679f4e7231ffe1339613bd/proxytrainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 9159, 12, 2890, 16, 859, 4672, 3536, 6351, 279, 666, 434, 883, 364, 261, 266, 13, 17584, 12123, 468, 2197, 267, 19, 31992, 9638, 2743, 18, 612, 273, 875, 818, 1609, 1920, 273, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9159, 12, 2890, 16, 859, 4672, 3536, 6351, 279, 666, 434, 883, 364, 261, 266, 13, 17584, 12123, 468, 2197, 267, 19, 31992, 9638, 2743, 18, 612, 273, 875, 818, 1609, 1920, 273, 374...
print "*** HIT"
def foo(self, value): self._foo = max(0, value)
a6e515b90dcb84cd460c051ff2ba9d047dbe3257 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/a6e515b90dcb84cd460c051ff2ba9d047dbe3257/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8431, 12, 2890, 16, 460, 4672, 365, 6315, 11351, 273, 943, 12, 20, 16, 460, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 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, 8431, 12, 2890, 16, 460, 4672, 365, 6315, 11351, 273, 943, 12, 20, 16, 460, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
debug("parsing patch - file: %s hunks: %d" % (files["source"][nextfileno-1], len(files["hunks"][nextfileno-1])))
debug("parsing patch - hunks: %d\tfile: %s" % (len(files["hunks"][nextfileno-1]), files["source"][nextfileno-1]))
def read_patch(filename): # define possible file regions that will direct the parser flow header = False # comments before the patch body filenames = False # lines starting with --- and +++ hunkhead = False # @@ -R +R @@ sequence hunkbody = False # hunkskip = False # skipping invalid hunk mode header = True files = dict(source=[], target=[], hunks=[]) nextfileno = 0 nexthunkno = 0 #: even if index starts with 0 user messages number hunks from 1 lineends = dict(lf=0, crlf=0, cr=0) # hunkinfo holds parsed values, hunkactual - calculated hunkinfo = dict(startsrc=None, linessrc=None, starttgt=None, linestgt=None, invalid=False, text=[]) hunkactual = dict(linessrc=None, linestgt=None) fp = open(filename, "r") for lineno, line in enumerate(fp): # analyze state if header and line.startswith("--- "): header = False # switch to filenames state filenames = True #: skip hunkskip and hunkbody code until you read definition of hunkhead if hunkbody: # process line first if re.match(r"^[- \+\\]", line): # gather stats about line endings if line.endswith("\r\n"): lineends["crlf"] += 1 elif line.endswith("\n"): lineends["lf"] += 1 elif line.endswith("\r"): lineends["cr"] += 1 if line.startswith("-"): hunkactual["linessrc"] += 1 elif line.startswith("+"): hunkactual["linestgt"] += 1 elif not line.startswith("\\"): hunkactual["linessrc"] += 1 hunkactual["linestgt"] += 1 hunkinfo["text"].append(line) # todo: handle \ No newline cases else: warning("invalid hunk no.%d at %d for target file %s" % (nexthunkno, lineno+1, files["target"][nextfileno-1])) # add hunk status node files["hunks"][nextfileno-1].append(hunkinfo.copy()) files["hunks"][nextfileno-1][nexthunkno-1]["invalid"] = True # switch to hunkskip state hunkbody = False hunkskip = True # check exit conditions if hunkactual["linessrc"] > hunkinfo["linessrc"] or hunkactual["linestgt"] > hunkinfo["linestgt"]: warning("extra hunk no.%d lines at %d for target %s" % (nexthunkno, lineno+1, files["target"][nextfileno-1])) # add hunk status node files["hunks"][nextfileno-1].append(hunkinfo.copy()) files["hunks"][nextfileno-1][nexthunkno-1]["invalid"] = True # switch to hunkskip state hunkbody = False hunkskip = True elif hunkinfo["linessrc"] == hunkactual["linessrc"] and hunkinfo["linestgt"] == hunkactual["linestgt"]: files["hunks"][nextfileno-1].append(hunkinfo.copy()) # switch to hunkskip state hunkbody = False hunkskip = True # todo: newlines handling # - file.newlines # - rU universal file mode #if debugmode: # debuglines = dict(lineends) # debuglines.update(file=files["target"][nextfileno-1], hunk=nexthunkno) # debug("crlf: %(crlf)d lf: %(lf)d cr: %(cr)d\t - file: %(file)s hunk: %(hunk)d" % debuglines) if ((lineends["cr"]!=0) + (lineends["crlf"]!=0) + (lineends["lf"]!=0)) > 1: warning("inconsistent line endings") if hunkskip: match = re.match("^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))?", line) if match: # switch to hunkhead state hunkskip = False hunkhead = True elif line.startswith("--- "): # switch to filenames state hunkskip = False filenames = True if debugmode and len(files["source"]) > 0: debug("parsing patch - file: %s hunks: %d" % (files["source"][nextfileno-1], len(files["hunks"][nextfileno-1]))) if filenames: if line.startswith("--- "): if nextfileno in files["source"]: warning("skipping invalid patch for %s" % files["source"][nextfileno]) del files["source"][nextfileno] # double source filename line is encountered # attempt to restart from this second line re_filename = "^--- ([^\t]+)" match = re.match(re_filename, line) if not match: warning("skipping invalid filename at line %d" % lineno) # switch back to header state filenames = False header = True else: files["source"].append(match.group(1)) elif not line.startswith("+++ "): if nextfileno in files["source"]: warning("skipping invalid patch with no target for %s" % files["source"][nextfileno]) del files["source"][nextfileno] else: # this should be unreachable warning("skipping invalid target patch") filenames = False header = True else: if nextfileno in files["target"]: warning("skipping invalid patch - double target at line %d" % lineno) del files["source"][nextfileno] del files["target"][nextfileno] nextfileno -= 1 # double target filename line is encountered # switch back to header state filenames = False header = True else: re_filename = "^\+\+\+ ([^\t]+)" match = re.match(re_filename, line) if not match: warning("skipping invalid patch - no target filename at line %d" % lineno) # switch back to header state filenames = False header = True else: files["target"].append(match.group(1)) nextfileno += 1 # switch to hunkhead state filenames = False hunkhead = True nexthunkno = 0 files["hunks"].append([]) lineends = dict(lf=0, crlf=0, cr=0) continue if hunkhead: match = re.match("^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))?", line) if not match: if nextfileno-1 not in files["hunks"]: warning("skipping invalid patch with no hunks for file %s" % files["target"][nextfileno-1]) # switch to header state hunkhead = False header = True continue else: # switch to header state hunkhead = False header = True else: hunkinfo["startsrc"] = int(match.group(1)) hunkinfo["linessrc"] = int(match.group(3) if match.group(3) else 1) hunkinfo["starttgt"] = int(match.group(4)) hunkinfo["linestgt"] = int(match.group(6) if match.group(6) else 1) hunkinfo["invalid"] = False hunkinfo["text"] = [] hunkactual["linessrc"] = hunkactual["linestgt"] = 0 # switch to hunkbody state hunkhead = False hunkbody = True nexthunkno += 1 continue else: if not hunkskip: warning("patch file incomplete - %s" % filename) # sys.exit(?) else: if debugmode and len(files["source"]) > 0: debug("parsing patch - file: %s hunks: %d" % (files["source"][nextfileno-1], len(files["hunks"][nextfileno-1]))) fp.close() return files
90991863304b2d6cd8afaae80b004ffaf3658142 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4098/90991863304b2d6cd8afaae80b004ffaf3658142/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2272, 12, 3459, 4672, 468, 4426, 3323, 585, 10085, 716, 903, 2657, 326, 2082, 4693, 1446, 273, 1083, 565, 468, 5678, 1865, 326, 4729, 1417, 9066, 273, 1083, 468, 2362, 5023, 598...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2272, 12, 3459, 4672, 468, 4426, 3323, 585, 10085, 716, 903, 2657, 326, 2082, 4693, 1446, 273, 1083, 565, 468, 5678, 1865, 326, 4729, 1417, 9066, 273, 1083, 468, 2362, 5023, 598...
if socket_connect(fd, address): return 0 if time.time() >= end: raise socket.timeout(errno.EAGAIN)
def connect_ex(self, address): if self.act_non_blocking: return self.fd.connect_ex(address) fd = self.fd if self.gettimeout() is None: while not socket_connect(fd, address): try: trampoline(fd, write=True) except socket.error, ex: return ex[0] else: end = time.time() + self.gettimeout() while True: if socket_connect(fd, address): return 0 if time.time() >= end: raise socket.timeout(errno.EAGAIN) try: trampoline(fd, write=True, timeout=end-time.time(), timeout_exc=socket.timeout(errno.EAGAIN)) except socket.error, ex: return ex[0]
8072243926ecc1890fc6098357047497f043a57a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10078/8072243926ecc1890fc6098357047497f043a57a/greenio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 338, 12, 2890, 16, 1758, 4672, 309, 365, 18, 621, 67, 5836, 67, 18926, 30, 327, 365, 18, 8313, 18, 3612, 67, 338, 12, 2867, 13, 5194, 273, 365, 18, 8313, 309, 365, 18, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 338, 12, 2890, 16, 1758, 4672, 309, 365, 18, 621, 67, 5836, 67, 18926, 30, 327, 365, 18, 8313, 18, 3612, 67, 338, 12, 2867, 13, 5194, 273, 365, 18, 8313, 309, 365, 18, 58...
if request.method == 'POST': if(not id): form = PersonShownInVideoForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personshowninvideo = PersonShownInVideo.objects.get(id=id) form = PersonShownInVideoForm(request.POST, instance = personshowninvideo) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
if request.method == 'POST': if(not id): form = PersonShownInVideoForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personshowninvideo = PersonShownInVideo.objects.get(id=id) form = PersonShownInVideoForm(request.POST, instance = personshowninvideo) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
def save_personshowninvideo_offline(request, id): if request.method == 'POST': if(not id): form = PersonShownInVideoForm(request.POST) if form.is_valid(): new_form = form.save(commit=False) new_form.id = request.POST['id'] new_form.save() return HttpResponse("1") else: return HttpResponse("0") else: personshowninvideo = PersonShownInVideo.objects.get(id=id) form = PersonShownInVideoForm(request.POST, instance = personshowninvideo) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 12479, 674, 995, 267, 9115, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 11573, 27042, 382, 10083, 1204, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 67, 12479, 674, 995, 267, 9115, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 11573, 27042, 382, 10083, 1204, 1...
m = re.match('.*
m = re.match('.*
def get_gdb_repr(self, source, cmds_after_breakpoint=None, import_site=False): # Given an input python source representation of data, # run "python -c'print DATA'" under gdb with a breakpoint on # PyObject_Print and scrape out gdb's representation of the "op" # parameter, and verify that the gdb displays the same string # # For a nested structure, the first time we hit the breakpoint will # give us the top-level structure gdb_output = self.get_stack_trace(source, breakpoint='PyObject_Print', cmds_after_breakpoint=cmds_after_breakpoint, import_site=import_site) m = re.match('.*#0 PyObject_Print \(op\=(.*?), fp=.*\).*', gdb_output, re.DOTALL) #print m.groups() return m.group(1), gdb_output
9362d7b9455f0d54064561e221047077a1c94d81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/9362d7b9455f0d54064561e221047077a1c94d81/test_gdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 75, 1966, 67, 12715, 12, 2890, 16, 1084, 16, 13446, 67, 5205, 67, 8820, 1153, 33, 7036, 16, 1930, 67, 4256, 33, 8381, 4672, 468, 16803, 392, 810, 5790, 1084, 4335, 434, 501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 75, 1966, 67, 12715, 12, 2890, 16, 1084, 16, 13446, 67, 5205, 67, 8820, 1153, 33, 7036, 16, 1930, 67, 4256, 33, 8381, 4672, 468, 16803, 392, 810, 5790, 1084, 4335, 434, 501, ...
def __init__(self,fn='rl_dbgmemo.dbg',mode='w',getScript=1,modules=(),**kw):
def __init__(self,fn='rl_dbgmemo.dbg',mode='w',getScript=1,modules=(),capture_traceback=1, **kw):
def __init__(self,fn='rl_dbgmemo.dbg',mode='w',getScript=1,modules=(),**kw): import time, socket self.fn = fn if mode!='w': return self.store = store = {} if sys.exc_info() != (None,None,None): import traceback s = getStringIO() traceback.print_exc(None,s) store['__traceback'] = s.getvalue() cwd=os.getcwd() lcwd = os.listdir(cwd) exed = os.path.abspath(os.path.dirname(sys.argv[0])) store.update({ 'gmt': time.asctime(time.gmtime(time.time())), 'platform': sys.platform, 'version': sys.version, 'executable': sys.executable, 'prefix': sys.prefix, 'path': sys.path, 'argv': sys.argv, 'cwd': cwd, 'hostname': socket.gethostname(), 'lcwd': lcwd, }) if exed!=cwd: store.update({'exed': exed, 'lexed': os.listdir(exed), }) if hasattr(os,'uname'): store.update({ 'uname': os.uname(), 'ctermid': os.ctermid(), 'getgid': os.getgid(), 'getuid': os.getuid(), 'getegid': os.getegid(), 'geteuid': os.geteuid(), 'getlogin': os.getlogin(), 'getgroups': os.getgroups(), 'getpgrp': os.getpgrp(), 'getpid': os.getpid(), 'getppid': os.getppid(), }) if getScript: fn = os.path.abspath(sys.argv[0]) if os.path.isfile(fn): store['__script'] = open(fn,'r').read() module_versions = {} for n,m in sys.modules.items(): if n=='reportlab' or n=='rlextra' or n[:10]=='reportlab.' or n[:8]=='rlextra.': v = getattr(m,'__version__',None) if v: module_versions[n] = v store['__module_versions'] = module_versions self.store['__payload'] = {} self._add(kw)
7931417e3db96e08462b6b8ca4db2012f6275f45 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/7931417e3db96e08462b6b8ca4db2012f6275f45/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4293, 2218, 1321, 67, 1966, 75, 19521, 18, 1966, 75, 2187, 3188, 2218, 91, 2187, 588, 3651, 33, 21, 16, 6400, 33, 9334, 19250, 67, 21696, 33, 21, 16, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4293, 2218, 1321, 67, 1966, 75, 19521, 18, 1966, 75, 2187, 3188, 2218, 91, 2187, 588, 3651, 33, 21, 16, 6400, 33, 9334, 19250, 67, 21696, 33, 21, 16, 2...
con = 'http://' + wikipedia.getSite().hostname() + '/wiki/' + contib + '/'+ UN.urlname() contribs = pageText(con)
con = '/wiki/' + contib + '/'+ UN.urlname() contribs = welcomesite.getUrl(con)
def parselog(raw): users = list() pos = 0 load = True # I search with a regex how many user have not the talk page # and i put them in a list (i find it more easy and secure) while load == True: reg = '\(<a href=\"/w/index.php\?title=' + talk + '(.*?)&(amp;|)action=edit\"' p = re.compile(reg, re.UNICODE) x = p.search(raw, pos) if x == None: if len(done) >= 1: load = False wikipedia.output(u"\nLoaded all users...") continue elif len(done) == 0: load = False wikipedia.output(u"There is nobody to welcomed...") continue pos = x.end() username = x.group(1) if username not in done: done.append(username) UN = wikipedia.Page(welcomesite, username) UNT = wikipedia.Page(welcomesite, talk + username) con = 'http://' + wikipedia.getSite().hostname() + '/wiki/' + contib + '/'+ UN.urlname() contribs = pageText(con) contribnum = contribs.count('<li>') #This is not an accurate count, it just counts the first #50 contributions if contribnum >= number: wikipedia.output( username + u" has enough edits to be welcomed") users.append([username, contribnum]) elif contribnum < number: if contribnum == 0: wikipedia.output( username + u" has no contributions") else: wikipedia.output( username + u" has only " + str(contribnum) + u" contributions") return users
e84f02593b3eb100ad10b8fa43c2d6d5085e2faa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/e84f02593b3eb100ad10b8fa43c2d6d5085e2faa/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 12, 1899, 4672, 3677, 273, 666, 1435, 949, 273, 374, 1262, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363, 468, 471, 277, 1378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 779, 1786, 717, 12, 1899, 4672, 3677, 273, 666, 1435, 949, 273, 374, 1262, 273, 1053, 468, 467, 1623, 598, 279, 3936, 3661, 4906, 729, 1240, 486, 326, 26591, 1363, 468, 471, 277, 1378, ...