rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
for link,target in links.items(): res = self.__makeDirs(os.path.dirname(link))
for link, target in links.items(): res = self.__makeDirs( os.path.dirname( link ) )
def createLink(self,link): res = self.__checkArgumentFormat(link) if not res['OK']: return res links = res['Value'] # If we have less than three lfns to query a session doesn't make sense created = self.__openSession() failed = {} successful = {} for link,target in links.items(): res = self.__makeDirs(os.path.dirname(link)) if not res['OK']: failed[link] = res['Message'] else: res = self.__makeLink(link,target) if not res['OK']: failed[link] = res['Message'] else: successful[link] = target if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 2098, 12, 2890, 16, 1232, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 1232, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 4716, 273, 400, 3292, 620, 3546, 468, 971, 732...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2098, 12, 2890, 16, 1232, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 1232, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 4716, 273, 400, 3292, 620, 3546, 468, 971, 732...
([0], [0])
([0], [])
def blocks_and_cut_vertices(self): """ Computes the blocks and cut vertices of the graph. In the case of a digraph, this computation is done on the underlying graph. A cut vertex is one whose deletion increases the number of connected components. A block is a maximal induced subgraph which itself has no cut vertices. Two distinct blocks cannot overlap in more than a single cut vertex. OUTPUT: ( B, C ), where B is a list of blocks- each is a list of vertices and the blocks are the corresponding induced subgraphs- and C is a list of cut vertices. EXAMPLES:: sage: graphs.PetersenGraph().blocks_and_cut_vertices() ([[6, 4, 9, 7, 5, 8, 3, 2, 1, 0]], []) sage: graphs.PathGraph(6).blocks_and_cut_vertices() ([[5, 4], [4, 3], [3, 2], [2, 1], [1, 0]], [4, 3, 2, 1]) sage: graphs.CycleGraph(7).blocks_and_cut_vertices() ([[6, 5, 4, 3, 2, 1, 0]], []) sage: graphs.KrackhardtKiteGraph().blocks_and_cut_vertices() ([[9, 8], [8, 7], [7, 4, 6, 5, 2, 3, 1, 0]], [8, 7]) sage: G=Graph() # make a bowtie graph where 0 is a cut vertex sage: G.add_vertices(range(5)) sage: G.add_edges([(0,1),(0,2),(0,3),(0,4),(1,2),(3,4)]) sage: G.blocks_and_cut_vertices() ([[2, 1, 0], [4, 3, 0]], [0]) sage: graphs.StarGraph(3).blocks_and_cut_vertices() ([[1, 0], [2, 0], [3, 0]], [0]) TESTS::
2b70760f18935cbdd74a6fcdeceb6d1fdc677780 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2b70760f18935cbdd74a6fcdeceb6d1fdc677780/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
print "Training spam:" train(bayes, spam, True)
for s in spam: print "Training spam (%s):" % s train(bayes, s, True)
def main(): """Main program; parse options and go.""" try: opts, args = getopt.getopt(sys.argv[1:], 'hdfg:s:p:u:') except getopt.error, msg: usage(2, msg) if not opts: usage(2, "No options given") pck = DEFAULTDB good = spam = unknown = None do_filter = usedb = False for opt, arg in opts: if opt == '-h': usage(0) elif opt == '-g': good = arg elif opt == '-s': spam = arg elif opt == '-p': pck = arg elif opt == "-d": usedb = True elif opt == "-f": do_filter = True elif opt == '-u': unknown = arg if args: usage(2, "Positional arguments not allowed") save = False bayes = createbayes(pck, usedb) if good: print "Training ham:" train(bayes, good, False) save = True if spam: print "Training spam:" train(bayes, spam, True) save = True if save: bayes.update_probabilities() if not usedb and pck: fp = open(pck, 'wb') pickle.dump(bayes, fp, 1) fp.close() if do_filter: filter(bayes, sys.stdin, sys.stdout) if unknown: score(bayes, unknown)
1820777a870d1d95c91535ea940c14660d922882 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/1820777a870d1d95c91535ea940c14660d922882/hammie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 5402, 31, 1109, 702, 471, 1960, 12123, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 22057, 2137, 30, 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, 2774, 13332, 3536, 6376, 5402, 31, 1109, 702, 471, 1960, 12123, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 296, 22057, 2137, 30, 87, ...
self.openEmptyDB()
try: self.openEmptyDB() except: self.handleDatabaseLoadError()
def __init__(self, dbPath=None, restore=True): try: self.txn = None self.dc = None self.toUpdate = set() self.toRemove = set() self.errorState = False if dbPath is not None: self.dbPath = dbPath else: self.dbPath = config.get(prefs.BSDDB_PATHNAME) start = clock() self.openEmptyDB() if restore: try: try: self.db.open ("database") self.version = int(self.db[VERSION_KEY]) except (bsddb.db.DBNoSuchFileError, KeyError): self.closeInvalidDB() try: restoreDatabase() except KeyboardInterrupt: raise except: print "WARNING: ERROR RESTORING OLD DATABASE" traceback.print_exc() self.saveDatabase() else: self.loadDatabase() except KeyboardInterrupt: raise except databaseupgrade.DatabaseTooNewError: raise except: self.handleDatabaseLoadError() else: self.saveDatabase() eventloop.addIdle(self.checkpoint, "Remove Unused Database Logs") end = clock() if end - start > 0.05 and util.chatter: print "Database load slow: %.3f" % (end - start,) except bsddb.db.DBNoSpaceError: frontend.exit(28)
ad3aecbf6106ce6cdf5a374c650e0ee82bf2b9a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/ad3aecbf6106ce6cdf5a374c650e0ee82bf2b9a3/storedatabase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 743, 33, 7036, 16, 5217, 33, 5510, 4672, 775, 30, 365, 18, 24790, 273, 599, 365, 18, 7201, 273, 599, 365, 18, 869, 1891, 273, 444, 1435, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 743, 33, 7036, 16, 5217, 33, 5510, 4672, 775, 30, 365, 18, 24790, 273, 599, 365, 18, 7201, 273, 599, 365, 18, 869, 1891, 273, 444, 1435, 365, 18,...
else
else:
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 633) else quickfix.DoubleField.__init__(self, 633, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3707, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 3707, 13, 469, 30, 9549, 904, 18, 5265, 974, 16186, 27...
(schema, user, password, host, port, path, args) = self._parseURI(uri)
(schema, user, password, host, port, path, args) = _parseURI(uri)
def connect(self, uri): """the uri string's syntax is the same as that of sqlobject. Unfortunately, only postgres and mysql are going to be supported in the near future. scheme://[user[:password]@]host[:port]/database[?parameters] Examples: mysql://user:password@host/database mysql://host/database?debug=1 postgres://user@host/database?debug=&cache= postgres:///full/path/to/socket/database postgres://host:5432/database """ (schema, user, password, host, port, path, args) = self._parseURI(uri) if schema == 'postgres': import psycopg2 as dbmod elif schema == 'mysql': import MySQLdb as dbmod self.dbmod = dbmod dbArgDict = {} if user: dbArgDict['user'] = user if password: dbArgDict['password'] = password if host: dbArgDict['host'] = host if port: dbArgDict['port'] = port if path: dbArgDict['database'] = path[1:] self._dirty = True self.conn = self.dbmod.connect(**dbArgDict)
914335463cf95b57b6ce129d8bf6106fa5882b1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/914335463cf95b57b6ce129d8bf6106fa5882b1d/orngSQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 2003, 4672, 3536, 5787, 2003, 533, 1807, 6279, 353, 326, 1967, 487, 716, 434, 4744, 383, 489, 18, 1351, 24233, 16, 1338, 1603, 14107, 471, 7219, 854, 8554, 358, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 2003, 4672, 3536, 5787, 2003, 533, 1807, 6279, 353, 326, 1967, 487, 716, 434, 4744, 383, 489, 18, 1351, 24233, 16, 1338, 1603, 14107, 471, 7219, 854, 8554, 358, 506, ...
gcmtitle=target, gcmnamespace=u'14', gcmlimit=u'max', prop='info'):
gcmtitle=target, gcmnamespace=u'14', gcmlimit=u'max', prop='info|categoryinfo'):
def run(self): """Run the bot""" self.site = wikipedia.getSite() self.catprefix = self.site.namespace(14)+":" self.result_queue = Queue.Queue() self.log_text = []
ca6eab2770b59d8de16a37e0a8778c56d5e52a34 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/ca6eab2770b59d8de16a37e0a8778c56d5e52a34/category_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1997, 326, 2512, 8395, 365, 18, 4256, 273, 21137, 18, 588, 4956, 1435, 365, 18, 2574, 3239, 273, 365, 18, 4256, 18, 4937, 12, 3461, 13, 9078, 2773, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3536, 1997, 326, 2512, 8395, 365, 18, 4256, 273, 21137, 18, 588, 4956, 1435, 365, 18, 2574, 3239, 273, 365, 18, 4256, 18, 4937, 12, 3461, 13, 9078, 2773, 365, 18,...
for address in address_obj.browse(cursor, user, address_ids):
for address in address_obj.browse(cursor, user, address_ids, context=context):
def address_get(self, cursor, user, partner_id, type=None): """ Try to find an address for the given type, if no type match the first address is return. """ address_obj = self.pool.get("partner.address") address_ids = address_obj.search( cursor, user, [("partner","=",partner_id),("active","=",True)], order="sequence, id") if not address_ids: return None default_address = address_ids[0] if not type: return default_address for address in address_obj.browse(cursor, user, address_ids): if address[type]: return address.id return default_address
4a1d8e146f6ca6856d39b44d9ad8dd32ab2108e3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9269/4a1d8e146f6ca6856d39b44d9ad8dd32ab2108e3/partner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1758, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 19170, 67, 350, 16, 618, 33, 7036, 4672, 3536, 6161, 358, 1104, 392, 1758, 364, 326, 864, 618, 16, 309, 1158, 618, 845, 326, 1122, 175...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1758, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 19170, 67, 350, 16, 618, 33, 7036, 4672, 3536, 6161, 358, 1104, 392, 1758, 364, 326, 864, 618, 16, 309, 1158, 618, 845, 326, 1122, 175...
msg = 'Subject: %s\n' % subj + msg
def sendmail_smtp ( to_addrs, subj, msg, from_addr = Configuration.FromAddress ): """** <p>Called by <code>sendmail</code> function, this function uses SMTP to send a mail message. Function raises a <code>MailError</code> if it cannot connect to the SMTP server; any other errors are merely sent as warnings to the SkunkWeb error log.</p> """ try: conn = smtplib.SMTP ( _mailhost ) except (socket.error, smtplib.SMTPException), val: WARN ( 'Cannot open smtp connection to %s: %s' % (_mailhost, str(val)) ) raise MailError, 'cannot connect to %s: %s' % (_mailhost, str(val) ) # add subject to the message msg = 'Subject: %s\n' % subj + msg try: try: errs = conn.sendmail ( from_addr, to_addrs, msg ) except smtplib.SMTPException, val: # Log, in case the template catches the exception WARN ( 'sendmail: %s' % str(val) ) # Raise the error raise MailError, 'error while sending mail: %s' % str(val) finally: # Always close the connection conn.quit() if errs: # Not everyone received messages, just print an error WARN ( 'URL %s: sendmail: not all recepients received mail:' ) for k, v in errs.items: WARN ( '---> %s: %s' % ( k, v ) ) # All done!
5aaf09af19f1815efbe786252684a482132aa94b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/5aaf09af19f1815efbe786252684a482132aa94b/MailServices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 67, 20278, 261, 358, 67, 23305, 16, 15333, 16, 1234, 16, 628, 67, 4793, 273, 4659, 18, 1265, 1887, 262, 30, 3536, 636, 411, 84, 34, 8185, 635, 411, 710, 34, 4661, 4408, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 4408, 67, 20278, 261, 358, 67, 23305, 16, 15333, 16, 1234, 16, 628, 67, 4793, 273, 4659, 18, 1265, 1887, 262, 30, 3536, 636, 411, 84, 34, 8185, 635, 411, 710, 34, 4661, 4408, 1...
res = TeamSetStatRes2()
res = TeamSetStatRes2(qc.self)
def TeamCapturePlayerUpdate(*qwp_extra): e = engine.world n = None t = None s1 = None s2 = None s3 = None res = None if qc.self.laststattime > qc.time: return TeamCaptureCheckUpdate() qc.self.laststattime = qc.time + PLAYERSTATTIME if qc.self.motd_count: MOTD() return if qc.self.statstate < 0: return res = TeamSetStatRes(qc.self) if defs.gamestart: if ctfgame.vote_leader == qc.world: qc.centerprint2(qc.self, res, ' Choose an exit...') else: res = TeamSetStatRes2() n = str(ctfgame.voteexit_time - qc.time) qc.centerprint5(qc.self, res, ctfgame.vote_leader.message, ' leads\012', n, ' seconds until exit') return # .1234567890123456789012345678901234567 # Res.R.B. Capture The Flag # Res.R.B. BLUE 999 if qc.self.player_flag & defs.ITEM_RUNE1_FLAG: s1 = 'Resist \205' elif qc.self.player_flag & defs.ITEM_RUNE2_FLAG: s1 = 'Strength\205' elif qc.self.player_flag & defs.ITEM_RUNE3_FLAG: s1 = 'Haste \205' elif qc.self.player_flag & defs.ITEM_RUNE4_FLAG: s1 = 'Regen \205' else: s1 = ' \205' e = qc.find(qc.world, 'classname', 'item_flag_team1') if e.cnt == teamplay.FLAG_AT_BASE: s2 = ' \205' elif e.cnt == teamplay.FLAG_CARRIED: s2 = 'R\205' else: s2 = '\322\205' e = qc.find(qc.world, 'classname', 'item_flag_team2') if e.cnt == teamplay.FLAG_AT_BASE: s3 = ' \205' elif e.cnt == teamplay.FLAG_CARRIED: s3 = 'B\205' else: s3 = '\302\205' if teamplay.teamscr1 == 0 and teamplay.teamscr2 == 0: qc.centerprint5(qc.self, res, s1, s2, s3, ' Capture The Flag') # CTFBOT return if qc.time < (teamplay.last_flag_capture + 6): if teamplay.last_capture_team == teamplay.TEAM_COLOR1: if teamplay.teamscr1 > teamplay.teamscr2: t = 'Red Capture! RED ' n = str(teamplay.teamscr1 - teamplay.teamscr2) elif teamplay.teamscr1 < teamplay.teamscr2: t = 'Red Capture! BLUE ' n = str(teamplay.teamscr2 - teamplay.teamscr1) else: t = 'Red Capture! TIED ' n = None else: if teamplay.teamscr1 > teamplay.teamscr2: t = 'Blue Capture! RED ' n = str(teamplay.teamscr1 - teamplay.teamscr2) elif teamplay.teamscr1 < teamplay.teamscr2: t = 'Blue Capture! BLUE ' n = str(teamplay.teamscr2 - teamplay.teamscr1) else: t = 'Blue Capture! TIED ' n = None else: if teamplay.teamscr1 > teamplay.teamscr2: t = ' RED ' n = str(teamplay.teamscr1 - teamplay.teamscr2) elif teamplay.teamscr1 < teamplay.teamscr2: t = ' BLUE ' n = str(teamplay.teamscr2 - teamplay.teamscr1) else: t = ' TIED ' n = None qc.centerprint7(qc.self, res, s1, s2, s3, ' ', t, n) #
70b9f64c9e8483b147e64a167b13082424f6f06e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11389/70b9f64c9e8483b147e64a167b13082424f6f06e/status.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10434, 12372, 12148, 1891, 30857, 85, 8612, 67, 7763, 4672, 425, 273, 4073, 18, 18179, 290, 273, 599, 268, 273, 599, 272, 21, 273, 599, 272, 22, 273, 599, 272, 23, 273, 599, 400, 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, 10434, 12372, 12148, 1891, 30857, 85, 8612, 67, 7763, 4672, 425, 273, 4073, 18, 18179, 290, 273, 599, 268, 273, 599, 272, 21, 273, 599, 272, 22, 273, 599, 272, 23, 273, 599, 400, 273, ...
f_id= pool.get('ir.model.fields').search(cr, uid,[('name','=',line['name']),('model_id','=',object.id)])
if obj._inherits: inherits_ids= pool.get('ir.model').search(cr, uid, [('model', '=', obj._inherits.keys()[0])]) f_id= pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', 'in', (object.id, inherits_ids[0]))]) else: f_id= pool.get('ir.model.fields').search(cr, uid, [('name', '=', line['name']), ('model_id', '=', object.id)])
def create_log_line(self, cr, uid, id, object, lines=[]): pool = pooler.get_pool(cr.dbname) obj=pool.get(object.model) object_name=obj._name obj_ids= pool.get('ir.model').search(cr, uid,[('model','=',object_name)]) model_object=pool.get('ir.model').browse(cr,uid,obj_ids)[0] for line in lines: f_id= pool.get('ir.model.fields').search(cr, uid,[('name','=',line['name']),('model_id','=',object.id)]) if len(f_id): fields=pool.get('ir.model.fields').read(cr, uid,f_id) old_value='old_value' in line and line['old_value'] or '' new_value='new_value' in line and line['new_value'] or '' old_value_text='old_value_text' in line and line['old_value_text'] or '' new_value_text='new_value_text' in line and line['new_value_text'] or '' if fields[0]['ttype']== 'many2one': if type(old_value)==tuple: old_value=old_value[0] if type(new_value)==tuple: new_value=new_value[0] log_line_id = pool.get('audittrail.log.line').create(cr, uid, {"log_id": id, "field_id": f_id[0] ,"old_value":old_value ,"new_value":new_value,"old_value_text":old_value_text ,"new_value_text":new_value_text,"field_description":fields[0]['field_description']}) cr.commit() return True
d8781cd0f2eee29372e5a54862aa63c732ae3150 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/d8781cd0f2eee29372e5a54862aa63c732ae3150/audittrail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1330, 67, 1369, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 733, 16, 2362, 33, 8526, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1081, 33, 6011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1330, 67, 1369, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 733, 16, 2362, 33, 8526, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 1081, 33, 6011, ...
instance.menuRecentFiles.add_command(label=fileName, command=instance.__RecentFileCallback(fileName))
callback = instance.__RecentFileCallback(fileName) if i > ullen: ul=None menu.add_command(label=ullist[i] + " " + fileName, command=callback, underline=ul) i += 1
def UpdateRecentFilesList(self,newFile=None): "Load or update the recent files list, and menu if required" rfList=[] if os.path.exists(self.recentFilesPath): RFfile=open(self.recentFilesPath,'r') try: rfList=RFfile.readlines() finally: RFfile.close() if newFile: newFile=os.path.abspath(newFile)+'\n' if newFile in rfList: rfList.remove(newFile) rfList.insert(0,newFile) rfList=self.__CleanRecentFiles(rfList) #print self.flist.inversedict #print self.top.instanceDict #print self if rfList: for instance in self.top.instanceDict.keys(): instance.menuRecentFiles.delete(1,END) for file in rfList: fileName=file[0:-1] instance.menuRecentFiles.add_command(label=fileName, command=instance.__RecentFileCallback(fileName))
34beeca8ea67404b2dc4a611958549e1fffc4a8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/34beeca8ea67404b2dc4a611958549e1fffc4a8f/EditorWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 17076, 2697, 682, 12, 2890, 16, 2704, 812, 33, 7036, 4672, 315, 2563, 578, 1089, 326, 8399, 1390, 666, 16, 471, 3824, 309, 1931, 6, 9075, 682, 33, 8526, 309, 1140, 18, 803, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 17076, 2697, 682, 12, 2890, 16, 2704, 812, 33, 7036, 4672, 315, 2563, 578, 1089, 326, 8399, 1390, 666, 16, 471, 3824, 309, 1931, 6, 9075, 682, 33, 8526, 309, 1140, 18, 803, 18, ...
temp = path.expanduser(self.options['temp_dir'])
temp = os.path.expanduser(self.options['temp_dir'])
def __init__(self, input_file): try: # Read the configuration file if win32: # Check the home dir first and then the program dir config_path = path.expanduser('~\\ZopeEdit.ini') global_config = path.join(sys.path[0], 'ZopeEdit.ini') if not path.exists(config_path) \ and os.path.exists(global_config): config_path = global_config else: config_path = path.expanduser('~/.zope-external-edit') self.config = Configuration(config_path)
6d4ecbc86879f2fecef558188076078002d226f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/6d4ecbc86879f2fecef558188076078002d226f3/zopeedit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 810, 67, 768, 4672, 775, 30, 468, 2720, 326, 1664, 585, 309, 5657, 1578, 30, 468, 2073, 326, 6382, 1577, 1122, 471, 1508, 326, 5402, 1577, 642, 67, 803, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 810, 67, 768, 4672, 775, 30, 468, 2720, 326, 1664, 585, 309, 5657, 1578, 30, 468, 2073, 326, 6382, 1577, 1122, 471, 1508, 326, 5402, 1577, 642, 67, 803, ...
col += len(self.classifiers)
col += len(self.predictors)
def updateTableOutcomes(self): """updates the columns associated with the classifiers""" if self.freezeAttChange: # program-based changes should not alter the table immediately return if not self.data or not self.classifiers: return
63e34d56e155a4f1aba288f36a71868771294735 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/63e34d56e155a4f1aba288f36a71868771294735/OWPredictions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1388, 1182, 10127, 12, 2890, 4672, 3536, 14703, 326, 2168, 3627, 598, 326, 667, 3383, 8395, 309, 365, 18, 29631, 3075, 3043, 30, 468, 5402, 17, 12261, 3478, 1410, 486, 10182, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1388, 1182, 10127, 12, 2890, 4672, 3536, 14703, 326, 2168, 3627, 598, 326, 667, 3383, 8395, 309, 365, 18, 29631, 3075, 3043, 30, 468, 5402, 17, 12261, 3478, 1410, 486, 10182, 326, ...
cb_service = clipboardservice.get_instance() cb_service.set_object_percent(self._cb_object_id, 100)
os.remove(self._dl_jobject.file_path) self._dl_jobject.destroy() self._dl_jobject = None
def onStateChange(self, web_progress, request, state_flags, status): if state_flags == interfaces.nsIWebProgressListener.STATE_START: self._create_journal_object() self._create_clipboard_object() elif state_flags == interfaces.nsIWebProgressListener.STATE_STOP: if NS_FAILED(status): # download cancelled return
2523babd3abb4f0c46890cda42591d5cf6d24a20 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6905/2523babd3abb4f0c46890cda42591d5cf6d24a20/downloadmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 22505, 12, 2890, 16, 3311, 67, 8298, 16, 590, 16, 919, 67, 7133, 16, 1267, 4672, 309, 919, 67, 7133, 422, 7349, 18, 2387, 45, 4079, 5491, 2223, 18, 7998, 67, 7570, 30, 365, 6315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22505, 12, 2890, 16, 3311, 67, 8298, 16, 590, 16, 919, 67, 7133, 16, 1267, 4672, 309, 919, 67, 7133, 422, 7349, 18, 2387, 45, 4079, 5491, 2223, 18, 7998, 67, 7570, 30, 365, 6315...
while self.parent.isRunning() and shutdownData is None:
while self._parent.isRunning() and shutdownData is None:
def run(self): self.parent.logger.log(Log.DEBUG, "listening for shutdown event at %s s intervals" % self._pollintv)
65a5ee5db100f00f3fbc036c0dc3d5333cd137bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/65a5ee5db100f00f3fbc036c0dc3d5333cd137bb/ProductionRunManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 365, 18, 2938, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 18085, 310, 364, 5731, 871, 622, 738, 87, 272, 10389, 6, 738, 365, 6315, 3915, 5671, 90, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 2890, 4672, 365, 18, 2938, 18, 4901, 18, 1330, 12, 1343, 18, 9394, 16, 315, 18085, 310, 364, 5731, 871, 622, 738, 87, 272, 10389, 6, 738, 365, 6315, 3915, 5671, 90, 13, 2, ...
text = "&%s;" % ref
if _debug: sys.stderr.write("entering handle_entityref with %s\n" % ref) if ref in ('lt', 'gt', 'quot', 'amp', 'apos'): text = '&%s;' % ref else: def name2cp(k): import htmlentitydefs if hasattr(htmlentitydefs, "name2codepoint"): return htmlentitydefs.name2codepoint[k] k = htmlentitydefs.entitydefs[k] if k.startswith("& return int(k[2:-1]) return ord(k) try: name2cp(ref) except KeyError: text = "&%s;" % ref else: text = unichr(name2cp(ref)).encode('utf-8')
def handle_entityref(self, ref): # called for each entity reference, e.g. for "&copy;", ref will be "copy" # Reconstruct the original entity reference. if not self.elementstack: return text = "&%s;" % ref self.elementstack[-1][2].append(text)
99200d105c483d0627b0c87195d2d3372fe4ba91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/99200d105c483d0627b0c87195d2d3372fe4ba91/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1096, 1734, 12, 2890, 16, 1278, 4672, 468, 2566, 364, 1517, 1522, 2114, 16, 425, 18, 75, 18, 364, 7830, 3530, 31, 3113, 1278, 903, 506, 315, 3530, 6, 468, 868, 10062, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1096, 1734, 12, 2890, 16, 1278, 4672, 468, 2566, 364, 1517, 1522, 2114, 16, 425, 18, 75, 18, 364, 7830, 3530, 31, 3113, 1278, 903, 506, 315, 3530, 6, 468, 868, 10062, 326, ...
if not self.effectsDialog: self.effectsDialog = InstrumentEffectsDialog.InstrumentEffectsDialog( self.instrument, self.OnEffectsDialogDestroyed, self.mainview.icon) else: self.effectsDialog.BringWindowToFront()
if not Globals.LADSPA_NAME_MAP == []: if not self.effectsDialog: self.effectsDialog = InstrumentEffectsDialog.InstrumentEffectsDialog( self.instrument, self.OnEffectsDialogDestroyed, self.mainview.icon) else: self.effectsDialog.BringWindowToFront() else: message = gtk.MessageDialog(parent=None, flags=0, type=gtk.MESSAGE_INFO,buttons=gtk.BUTTONS_OK, message_format="You do not have the LADSPA effects plugins installed") message.format_secondary_text("Jokosher requires this package to be able to use effects, please install the relevant package for your distribution.\n\nNOTE FOR WINDOWS USERS: Jokosher with LADSPA is not currently supported on Windows.") message.show_all() response = message.run() if response == gtk.RESPONSE_OK: message.destroy()
def OnEffectsButtonClicked(self, widget): """ Creates and shows the instrument effects dialog Parameters: widget -- reserved for GTK callbacks, don't use it explicitly. mouse -- reserved for GTK callbacks, don't use it explicitly. """ Globals.debug("props button pressed") if not self.effectsDialog: self.effectsDialog = InstrumentEffectsDialog.InstrumentEffectsDialog( self.instrument, self.OnEffectsDialogDestroyed, self.mainview.icon) else: self.effectsDialog.BringWindowToFront()
cc017a18182ce9d29115aa89044b7fa6de37cf2e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10033/cc017a18182ce9d29115aa89044b7fa6de37cf2e/ControlsBox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 29013, 3616, 27633, 12, 2890, 16, 3604, 4672, 3536, 10210, 471, 17975, 326, 10353, 16605, 6176, 225, 7012, 30, 3604, 1493, 8735, 364, 19688, 47, 6689, 16, 2727, 1404, 999, 518, 8122,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2755, 29013, 3616, 27633, 12, 2890, 16, 3604, 4672, 3536, 10210, 471, 17975, 326, 10353, 16605, 6176, 225, 7012, 30, 3604, 1493, 8735, 364, 19688, 47, 6689, 16, 2727, 1404, 999, 518, 8122,...
"""Sort esms to the top.""" def __init__(self,prefix=''): Link.__init__(self) self.prefix = prefix def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,self.prefix+_('Type'),kind=wx.ITEM_CHECK) menu.AppendItem(menuItem) menuItem.Check(window.esmsFirst) def Execute(self,event): self.window.esmsFirst = not self.window.esmsFirst self.window.PopulateItems()
"""Sort esms to the top.""" def __init__(self,prefix=''): Link.__init__(self) self.prefix = prefix def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,self.prefix+_('Type'),kind=wx.ITEM_CHECK) menu.AppendItem(menuItem) menuItem.Check(window.esmsFirst) def Execute(self,event): self.window.esmsFirst = not self.window.esmsFirst self.window.PopulateItems()
def DoEdit(self,event): data = Mods_LoadListData(self.window) dialog = balt.ListEditor(self.window,-1,_('Load Lists'),data) dialog.ShowModal() dialog.Destroy()
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 4666, 12, 2890, 16, 2575, 4672, 501, 273, 3431, 87, 67, 2563, 682, 751, 12, 2890, 18, 5668, 13, 6176, 273, 324, 2390, 18, 682, 6946, 12, 2890, 18, 5668, 16, 17, 21, 16, 67, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2256, 4666, 12, 2890, 16, 2575, 4672, 501, 273, 3431, 87, 67, 2563, 682, 751, 12, 2890, 18, 5668, 13, 6176, 273, 324, 2390, 18, 682, 6946, 12, 2890, 18, 5668, 16, 17, 21, 16, 67, 2...
private_hrefs = [self._link_to_html(c) for c in classes] public_hrefs = [self._link_to_html(c) for c in classes if c.is_public()]
hrefs = [(c, self._link_to_html(c)) for c in classes] private_hrefs = [href for (c, href) in hrefs] public_hrefs = [href for (c, href) in hrefs if c.is_public()]
def _write_imports(self, public, private, classes, excepts, functions, variables): if not self._show_imports: return
21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 21350, 12, 2890, 16, 1071, 16, 3238, 16, 3318, 16, 1335, 87, 16, 4186, 16, 3152, 4672, 309, 486, 365, 6315, 4500, 67, 21350, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 21350, 12, 2890, 16, 1071, 16, 3238, 16, 3318, 16, 1335, 87, 16, 4186, 16, 3152, 4672, 309, 486, 365, 6315, 4500, 67, 21350, 30, 327, 2, -100, -100, -100, -100, -100, ...
elif bom == 0xFFFE0000: pos += 2
elif bom == BOM32_REVERSE: pos += 4
def str_decode_utf_32_helper(s, size, errors, final=True, errorhandler=None, byteorder="native"): if errorhandler is None: errorhandler = raise_unicode_exception_decode bo = 0 if BYTEORDER == 'little': iorder = [0, 1, 2, 3] else: iorder = [3, 2, 1, 0] # Check for BOM marks (U+FEFF) in the input and adjust current # byte order setting accordingly. In native mode, the leading BOM # mark is skipped, in all other modes, it is copied to the output # stream as-is (giving a ZWNBSP character). pos = 0 if byteorder == 'native': if size >= 4: bom = ((ord(s[iorder[3]]) << 24) | (ord(s[iorder[2]]) << 16) | (ord(s[iorder[1]]) << 8) | ord(s[iorder[0]])) if BYTEORDER == 'little': if bom == 0x0000FEFF: pos += 4 bo = -1 elif bom == 0xFFFE0000: pos += 4 bo = 1 else: if bom == 0x0000FEFF: pos += 2 bo = 1 elif bom == 0xFFFE0000: pos += 2 bo = -1 elif byteorder == 'little': bo = -1 else: bo = 1 if size == 0: return u'', 0, bo if bo == -1: # force little endian iorder = [0, 1, 2, 3] elif bo == 1: # force big endian iorder = [3, 2, 1, 0] result = UnicodeBuilder(size // 4) while pos < size: # remaining bytes at the end? (size should be divisible by 4) if len(s) - pos < 4: if not final: break r, pos = errorhandler(errors, 'utf-32', "truncated data", s, pos, len(s)) result.append(r) if len(s) - pos < 4: break continue ch = ((ord(s[pos + iorder[3]]) << 24) | (ord(s[pos + iorder[2]]) << 16) | (ord(s[pos + iorder[1]]) << 8) | ord(s[pos + iorder[0]])) if ch >= 0x110000: r, pos = errorhandler(errors, 'utf-32', "codepoint not in range(0x110000)", s, pos, len(s)) result.append(r) continue if MAXUNICODE < 65536 and ch >= 0x10000: ch -= 0x10000L result.append(unichr(0xD800 + (ch >> 10))) result.append(unichr(0xDC00 + (ch & 0x03FF))) else: result.append(UNICHR(ch)) pos += 4 return result.build(), pos, bo
fdebcf0959de2c3d1b15f32988290d4eb5cce2e7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/fdebcf0959de2c3d1b15f32988290d4eb5cce2e7/runicode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 67, 3922, 67, 3158, 67, 1578, 67, 4759, 12, 87, 16, 963, 16, 1334, 16, 727, 33, 5510, 16, 555, 4176, 33, 7036, 16, 1160, 1019, 1546, 13635, 6, 4672, 309, 555, 4176, 353, 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, 609, 67, 3922, 67, 3158, 67, 1578, 67, 4759, 12, 87, 16, 963, 16, 1334, 16, 727, 33, 5510, 16, 555, 4176, 33, 7036, 16, 1160, 1019, 1546, 13635, 6, 4672, 309, 555, 4176, 353, 599, ...
self.rootitem.destroy()
self.cleanup_game()
def end(self):
116286e59eddd55b7293e53bd7313f2d41db53b3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/116286e59eddd55b7293e53bd7313f2d41db53b3/guessnumber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
parser.ParseFile(file)
parser.ParseFile(fileobj)
def parse(self, file): from xml.parsers.expat import ParserCreate parser = ParserCreate() parser.StartElementHandler = self.handleBeginElement parser.EndElementHandler = self.handleEndElement parser.CharacterDataHandler = self.handleData parser.ParseFile(file) return self.root
95387a18956b2ab60709a79aaa93cfddec8978d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/95387a18956b2ab60709a79aaa93cfddec8978d9/plistlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 585, 4672, 628, 2025, 18, 11104, 18, 2749, 270, 1930, 6783, 1684, 2082, 273, 6783, 1684, 1435, 2082, 18, 1685, 1046, 1503, 273, 365, 18, 4110, 8149, 1046, 2082, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 585, 4672, 628, 2025, 18, 11104, 18, 2749, 270, 1930, 6783, 1684, 2082, 273, 6783, 1684, 1435, 2082, 18, 1685, 1046, 1503, 273, 365, 18, 4110, 8149, 1046, 2082, 18, ...
elif column._type == "date":
elif column._type == "date" and is_string(expression):
def _eval_field(self, model, field_name, expression): # TODO this should be refactored as something like model.get_field() in bin/osv if field_name in model._columns: column = model._columns[field_name] elif field_name in model._inherit_fields: column = model._inherit_fields[field_name][2] else: raise KeyError("Object '%s' does not contain field '%s'" % (model, field_name)) if is_ref(expression): elements = self.process_ref(expression, column) if column._type in ("many2many", "one2many"): value = [(6, 0, elements)] else: # many2one value = self._get_first_result(elements) elif column._type == "many2one": value = self.get_id(expression) elif column._type == "one2many": other_model = self.get_model(column._obj) value = [(0, 0, self._create_record(other_model, fields)) for fields in expression] elif column._type == "many2many": ids = [self.get_id(xml_id) for xml_id in expression] value = [(6, 0, ids)] elif column._type == "date": # enforce ISO format for date values, to be locale-agnostic during tests time.strptime(expression, misc.DEFAULT_SERVER_DATE_FORMAT) value = expression elif column._type == "datetime": # enforce ISO format for datetime values, to be locale-agnostic during tests time.strptime(expression, misc.DEFAULT_SERVER_DATETIME_FORMAT) value = expression else: # scalar field if is_eval(expression): value = self.process_eval(expression) else: value = expression # raise YamlImportException('Unsupported column "%s" or value %s:%s' % (field_name, type(expression), expression)) return value
cd3692125ffad6bed23131b0890a8affcda9e44e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/cd3692125ffad6bed23131b0890a8affcda9e44e/yaml_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1518, 12, 2890, 16, 938, 16, 652, 67, 529, 16, 2652, 4672, 468, 2660, 333, 1410, 506, 283, 3493, 7653, 487, 5943, 3007, 938, 18, 588, 67, 1518, 1435, 316, 4158, 19, 53...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8622, 67, 1518, 12, 2890, 16, 938, 16, 652, 67, 529, 16, 2652, 4672, 468, 2660, 333, 1410, 506, 283, 3493, 7653, 487, 5943, 3007, 938, 18, 588, 67, 1518, 1435, 316, 4158, 19, 53...
bgcolor=mm_cfg.WEB_HEADERCOLOR)
bgcolor=mm_cfg.WEB_HEADER_COLOR)
def loginpage(mlist, doc, user, cgidata): realname = mlist.real_name obuser = Utils.ObscureEmail(user) # Set up the login page form = Form('%s/%s' % (mlist.GetScriptURL('options'), obuser)) table = Table(width='100%', border=0, cellspacing=4, cellpadding=5) # Set up the title title = _('%(realname)s list: member options for user %(user)s') doc.SetTitle(title) table.AddRow([Center(Header(2, title))]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, bgcolor=mm_cfg.WEB_HEADERCOLOR) # Preamble table.AddRow([_("""In order to change your membership option, you must first log in by giving your membership password in the section below. If you don't remember your membership password, you can have it emailed to you by clicking on the button below. If you just want to unsubscribe from this list, click on the <em>Unsubscribe</em> button and a confirmation message will be sent to you. <p><strong><em>Important:</em></strong> From this point on, you must have cookies enabled in your browser, otherwise none of your changes will take effect. <p>Session cookies are used in Mailman's membership options interface so that you don't need to re-authenticate with every operation. This cookie will expire automatically when you exit your browser, or you can explicitly expire the cookie by hitting the <em>Logout</em> link (which you'll see once you successfully log in). """)]) # Password and login button ptable = Table(width='50%', border=0, cellspacing=4, cellpadding=5) ptable.AddRow([Label(_('Password:')), PasswordBox('password', size=20)]) ptable.AddRow([Center(SubmitButton('login', _('Log in')))]) ptable.AddCellInfo(ptable.GetCurrentRowIndex(), 0, colspan=2) table.AddRow([Center(ptable)]) # Unsubscribe section, but only if the user didn't just unsubscribe if not cgidata.has_key('login-unsub'): table.AddRow([Center(Header(2, _('Unsubscribe')))]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, bgcolor=mm_cfg.WEB_HEADERCOLOR) table.AddRow([_("""By clicking on the <em>Unsubscribe</em> button, a confirmation message will be emailed to you. This message will have a link that you should click on to complete the removal process (you can also confirm by email; see the instructions in the confirmation message).""")]) table.AddRow([Center(SubmitButton('login-unsub', _('Unsubscribe')))]) # Password reminder section, but only if the user didn't just request a # password reminder if not cgidata.has_key('login-remind'): table.AddRow([Center(Header(2, _('Password reminder')))]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, bgcolor=mm_cfg.WEB_HEADERCOLOR) table.AddRow([_("""By clicking on the <em>Remind</em> button, your password will be emailed to you.""")]) table.AddRow([Center(SubmitButton('login-remind', _('Remind')))]) # Finish up glomming together the login page form.AddItem(table) doc.AddItem(form) doc.AddItem(mlist.GetMailmanFooter())
e3fa9ac21ace757364bf1352e5c3d184280bc75b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/e3fa9ac21ace757364bf1352e5c3d184280bc75b/options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 2433, 12, 781, 376, 16, 997, 16, 729, 16, 14947, 350, 396, 4672, 2863, 529, 273, 312, 1098, 18, 7688, 67, 529, 3768, 1355, 273, 6091, 18, 10516, 1017, 594, 4134, 12, 1355, 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, 3925, 2433, 12, 781, 376, 16, 997, 16, 729, 16, 14947, 350, 396, 4672, 2863, 529, 273, 312, 1098, 18, 7688, 67, 529, 3768, 1355, 273, 6091, 18, 10516, 1017, 594, 4134, 12, 1355, 13, ...
def list(self, n): return [self(i) for i in range(1,n+1)]
offset = 1
def list(self, n): return [self(i) for i in range(1,n+1)]
2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2c9ec0e9ee4b6a66dba3cad312fef1c27ffc8925/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 327, 306, 2890, 12, 77, 13, 364, 277, 316, 1048, 12, 21, 16, 82, 15, 21, 25887, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 666, 12, 2890, 16, 290, 4672, 327, 306, 2890, 12, 77, 13, 364, 277, 316, 1048, 12, 21, 16, 82, 15, 21, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return self.sender in WL
self.log.debug("[check_lists]: WHITE_LIST=%s" % WL) return sender in WL
def check_lists(self, config): """ Check if the user is authorized to use the handler """
d4c83e442added28c91a5b63bb8ef7f5aea9a05f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3144/d4c83e442added28c91a5b63bb8ef7f5aea9a05f/MailHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9772, 12, 2890, 16, 642, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 999, 326, 1838, 3536, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 9772, 12, 2890, 16, 642, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 999, 326, 1838, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.read("serverrc")
self.read(path)
def __init__(self):
eb304d9880f40880d3fea34b92fe57a97a7ea8fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/eb304d9880f40880d3fea34b92fe57a97a7ea8fc/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if elementType:
if elementType != closeMacroType:
#enddef - closes a scope
8ef90f9a112ed379de9d5ae4b3e974c09cd6ae77 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/8ef90f9a112ed379de9d5ae4b3e974c09cd6ae77/wmliterator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 409, 536, 300, 13445, 279, 2146, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
_task_params['task_id'] = run_sql("""INSERT INTO schTASK (id,proc,runtime, sleeptime,status,arguments)
_task_params['task_id'] = run_sql("""INSERT INTO schTASK (id,proc,user, runtime,sleeptime,status,arguments)
def _task_submit(authorization_action, authorization_msg): """Submits task to the BibSched task queue. This is what people will be invoking via command line.""" ## sanity check: remove eventual "task" option: if _options.has_key("task"): del _options["task"] ## authenticate user: _options['user'] = authenticate(_options.get("user", ""), authorization_action, authorization_msg) ## submit task: if _options["verbose"] >= 9: print "" write_message("storing task options %s\n" % _options) _task_params['task_id'] = run_sql("""INSERT INTO schTASK (id,proc,runtime, sleeptime,status,arguments) VALUES (NULL,%s,%s,%s,%s,'WAITING',%s)""", (_task_params['task_name'], _options['user'], _options["runtime"], _options["sleeptime"], marshal.dumps(_options))) ## update task number: _options["task"] = _task_params['task_id'] run_sql("""UPDATE schTASK SET arguments=%s WHERE id=%s""", (marshal.dumps(_options), _task_params['task_id'])) write_message("Task #%d submitted." % _task_params['task_id']) return _task_params['task_id']
da2e26a4598bc95467d969795c671e7f29b92bb2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/da2e26a4598bc95467d969795c671e7f29b92bb2/bibtask.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4146, 67, 9297, 12, 12218, 67, 1128, 16, 6093, 67, 3576, 4672, 3536, 1676, 22679, 1562, 358, 326, 605, 495, 55, 2049, 1562, 2389, 18, 225, 1220, 353, 4121, 16951, 903, 506, 15387, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4146, 67, 9297, 12, 12218, 67, 1128, 16, 6093, 67, 3576, 4672, 3536, 1676, 22679, 1562, 358, 326, 605, 495, 55, 2049, 1562, 2389, 18, 225, 1220, 353, 4121, 16951, 903, 506, 15387, ...
logger.warn("Mobilized Plone site must be configured to be accessed using subdomains.")
logger.warn("Mobilized Plone site must be configured to be accessed " "using subdomains.")
def getCookieDomain(request): """ Get a parent domain name to be used in the cookie One cookie covers all *.yoursite.com domains. """ if "SERVER_URL" in request.environ: # WSGI based servers server_url = request.environ["SERVER_URL"] else: # Zope's Medusa server_url = request.other["SERVER_URL"] parts = urlparse.urlparse(server_url) netloc = parts[1] domain = netloc.split(":")[0] # Looks like at least Firefox does not allow set cookie domain ".localhost" # ugh # things gets ugly here # web.localhost -> localhost if "localhost" in domain: logger.warn("Mobilized Plone site must be configured to be accessed using subdomains.") logger.warn("Otherwise preview and mobile site access.") logger.warn("Add following to your /etc/hosts:") logger.warn("127.0.0.1 mobi.site.foo web.site.foo preview.site.foo") logger.warn("..and access site site using fake domain name web.site.foo.") logger.warn("Also DO NOT do Zope HTTP Basic Auth, since it is not subdomain aware - use only Plone interface for login") logger.warn("See gomobile.mobile.monkeypatch for more info") if len(domain.split(".")) == 1: raise RuntimeError("You need to use subdomain to access the site. E.g. web.localhost instead of localhost") domain_root = ".".join(domain.split(".")[1:]) return "." + domain_root
96ab5b60f3acc0d0bb8d77001d241b0fe2136956 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10164/96ab5b60f3acc0d0bb8d77001d241b0fe2136956/monkeypatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 3748, 12, 2293, 4672, 3536, 968, 279, 982, 2461, 508, 358, 506, 1399, 316, 326, 3878, 225, 6942, 3878, 25559, 777, 380, 18, 93, 477, 4256, 18, 832, 10128, 18, 3536, 225, 309, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24643, 3748, 12, 2293, 4672, 3536, 968, 279, 982, 2461, 508, 358, 506, 1399, 316, 326, 3878, 225, 6942, 3878, 25559, 777, 380, 18, 93, 477, 4256, 18, 832, 10128, 18, 3536, 225, 309, 31...
items.append(item) answer_text = ical.serialize( headers=self._calendar.headers, items=items) etag = item.etag
if item: items = self._calendar.timezones items.append(item) answer_text = ical.serialize( headers=self._calendar.headers, items=items) etag = item.etag else: self.send_response(client.GONE) return
def do_HEAD(self): """Manage HEAD request.""" item_name = xmlutils.name_from_path(self.path) if item_name: # Get calendar item items = self._calendar.timezones item = self._calendar.get_item(item_name) items.append(item) answer_text = ical.serialize( headers=self._calendar.headers, items=items) etag = item.etag else: # Get whole calendar answer_text = self._calendar.text etag = self._calendar.etag
873dec1d5df02c8df83273bd0b1f2993febf2f29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12432/873dec1d5df02c8df83273bd0b1f2993febf2f29/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 12458, 12, 2890, 4672, 3536, 21258, 14792, 590, 12123, 761, 67, 529, 273, 2025, 5471, 18, 529, 67, 2080, 67, 803, 12, 2890, 18, 803, 13, 309, 761, 67, 529, 30, 468, 968, 568...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 12458, 12, 2890, 4672, 3536, 21258, 14792, 590, 12123, 761, 67, 529, 273, 2025, 5471, 18, 529, 67, 2080, 67, 803, 12, 2890, 18, 803, 13, 309, 761, 67, 529, 30, 468, 968, 568...
p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3)
if p1.startswith('"') and p1.endswith('"'): p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p1) else: p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) if p1.startswith('"') and p1.endswith('"'): p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p2) else: p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) if p3.startswith('"') and p3.endswith('"'): p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p3) else: p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3)
def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """Perform search, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page.""" # wash all passed arguments: cc = wash_url_argument(cc, 'str') p = wash_url_argument(p, 'str') f = wash_url_argument(f, 'str') rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'string') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_url_argument(p1, 'str') f1 = wash_url_argument(f1, 'str') m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_url_argument(p2, 'str') f2 = wash_url_argument(f2, 'str') m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_url_argument(p3, 'str') f3 = wash_url_argument(f3, 'str') m3 = wash_url_argument(m3, 'str') sc = wash_url_argument(sc, 'int') jrec = wash_url_argument(jrec, 'int') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'int') search = wash_url_argument(search, 'str') d1y = wash_url_argument(d1y, 'str') d1m = wash_url_argument(d1m, 'str') d1d = wash_url_argument(d1d, 'str') d2y = wash_url_argument(d2y, 'str') d2m = wash_url_argument(d2m, 'str') d2d = wash_url_argument(d2d, 'str') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) # deduce user id: uid = getUid(req) # start output if of.startswith('x'): # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") if of.startswith("xm"): req.write("""<collection xmlns="http://www.loc.gov/MARC21/slim">\n""") else: req.write("""<collection>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": # we are passing list of recIDs pass else: # we are doing HTML output: req.content_type = "text/html" req.send_http_header() # write header: req.write(create_header(cc, as, uid)) if sysnb or id>0: ## 1 - detailed record display if sysnb: # ALEPH sysnb is passed, so deduce MySQL id for the record: id = get_mysql_recid_from_aleph_sysno(sysnb) if of=="hb": of = "hd" if record_exists(id): if idb<=id: # sanity check idb=id+1 print_records(req, range(id,idb), -1, -9999, of, ot) else: # record does not exist if of.startswith("h"): (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) print_warning(req, "Requested record does not seem to exist.", None, "<p>") elif search == "Browse": ## 2 - browse needed (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) if as==1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) else: ## 3 - search needed # wash passed collection arguments: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) # run search: t1 = os.times()[4] if as == 1 or (p1 or p2 or p3): # 3A - advanced search results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() else: # 3B - simple search search_cache_key = p+"@"+f+"@"+string.join(colls_to_search,",") if search_cache.has_key(search_cache_key): # is the result in search cache? results_final = search_cache[search_cache_key] else: results_final = search_pattern(req, p, f, colls_to_search) search_cache[search_cache_key] = results_final if len(search_cache) > cfg_search_cache_size: # is the cache full? (sanity cleaning) search_cache.clear() # search done; was there a time restriction? if yes, apply it now: if day1 != "": results_of_time_restriction = search_in_bibrec(day1, day2) for coll in colls_to_search: results_final[coll].intersect(results_of_time_restriction) results_final[coll].calculate_nbhits() t2 = os.times()[4] cpu_time = t2 - t1 # find total number of records found in each collection results_final_nb_total = 0 results_final_nb = {} for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # was there at least one hit? if results_final_nb_total == 0: # nope, so try silently dash-slash-etc-less matches first: if as==1 or (p1 or p2 or p3): if re.search(r'\w[^a-zA-Z0-9]\w',p1) or \ re.search(r'\w[^a-zA-Z0-9]\w',p2) or \ re.search(r'\w[^a-zA-Z0-9]\w',p3): p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3) if of.startswith('h'): print_warning(req, "No match found. Trying similar queries...", "", "<p>","<p>") results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] else: if re.search(r'\w[^a-zA-Z0-9]\w',p): p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p) if of.startswith('h'): print_warning(req, "No match found. Trying %s..." % p, "", "<p>","<p>") results_final = search_pattern(req, p, f, colls_to_search, None) for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # once again, was there at least one hit? if results_final_nb_total == 0: # nope, so try similar queries: if of.startswith('h'): print_warning(req, "No match found. Trying similar queries...", "", "<p>","<p>") req.write("<p>") if as==1 or (p1 or p2 or p3): if p1: search_pattern(req, p1, f1, colls_to_search, m1, 1) if p2: search_pattern(req, p2, f2, colls_to_search, m2, 1) if p3: search_pattern(req, p3, f3, colls_to_search, m3, 1) else: search_pattern(req, p, f, colls_to_search, None, 1) else: # yes, some hits found, so print results overview: if of == "id": # we have been asked to return list of recIDs results_final_for_all_colls = HitList() for coll in colls_to_search: results_final_for_all_colls.union(results_final[coll]) return results_final_for_all_colls.items() elif of.startswith("h"): req.write(print_results_overview(colls_to_search, results_final_nb_total, results_final_nb, cpu_time)) # print records: if len(colls_to_search)>1: cpu_time = -1 # we do not want to have search time printed on each collection for coll in colls_to_search: if results_final[coll]._nbhits: if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) results_final_sorted = results_final[coll].items() if sf: results_final_sorted = sort_records(req, results_final_sorted, sf, so, sp) print_records(req, results_final_sorted, jrec, rg, of, ot) if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time, 1)) # log query: try: log_query(req.get_remote_host(), req.args, uid) except: # do not log query if req is None (used by CLI interface) pass log_query_info("ss", p, f, colls_to_search, results_final_nb_total) # 4 -- write footer: if of.startswith('h'): req.write(create_footer()) elif of.startswith('x'): req.write("""</collection>\n""") # 5 - return value if of == "id": return [] else: return "\n"
00571ecfce005ad123c8fb732964d852ab74e5a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/00571ecfce005ad123c8fb732964d852ab74e5a9/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3073, 67, 2293, 67, 3072, 12, 3658, 33, 7036, 16, 4946, 33, 71, 2377, 529, 16, 276, 33, 7036, 16, 293, 1546, 3113, 284, 1546, 3113, 14524, 1546, 2163, 3113, 9033, 1546, 3113, 1427, 154...
log.debug(templates)
log.debug(templates)
def _query_xen_templates(self): """ probe the xenserver for available templates to use """ log.debug('in _find_xen_templates') log.debug('scanning all templates in XenServer') template_uuids = {} for uuid in self.all_vm_records: for key in self.all_vm_records[uuid]: if 'is_a_template' in key and self.all_vm_records[uuid]['is_a_template']: uuid_name_label = self.all_vm_records[uuid]['name_label'] templates = { uuid_name_label : uuid } templates = {}
e45089ed55ac0207acae8b910779bf0ea751bac0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6488/e45089ed55ac0207acae8b910779bf0ea751bac0/mkvm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 92, 275, 67, 8502, 12, 2890, 4672, 3536, 10695, 326, 23048, 3567, 364, 2319, 5539, 358, 999, 3536, 613, 18, 4148, 2668, 267, 389, 4720, 67, 92, 275, 67, 8502, 6134, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 92, 275, 67, 8502, 12, 2890, 4672, 3536, 10695, 326, 23048, 3567, 364, 2319, 5539, 358, 999, 3536, 613, 18, 4148, 2668, 267, 389, 4720, 67, 92, 275, 67, 8502, 6134, 225,...
yaml.add_constructor(u"!ref", ref_constructor)
yaml.add_constructor(u"!ir_set", ir_set_constructor)
def ref_constructor(loader, node): xmlid = loader.construct_scalar(node) return Ref(xmlid)
cf74d934f8b3c61b178c032a5687be19ca007388 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/cf74d934f8b3c61b178c032a5687be19ca007388/yaml_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 67, 12316, 12, 6714, 16, 756, 4672, 2025, 350, 273, 4088, 18, 10062, 67, 8748, 12, 2159, 13, 327, 3941, 12, 2902, 350, 13, 225, 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, 1278, 67, 12316, 12, 6714, 16, 756, 4672, 2025, 350, 273, 4088, 18, 10062, 67, 8748, 12, 2159, 13, 327, 3941, 12, 2902, 350, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
self.getPackages(), self.getProperties(),
self.getPackages(), self.getMainProperties(),
def dumpMain(self): meths = [] if self.javamain: code = [] newargs = jast.Identifier("newargs") code.append(jast.Declare("String[]", newargs, jast.NewArray("String", ["args.length+1"]))) code.append(jast.Set(jast.Identifier("newargs[0]"), jast.StringConstant(self.name)))
decc97c4b1072a622283e593eca2464ec902d34f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6753/decc97c4b1072a622283e593eca2464ec902d34f/PythonModule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 6376, 12, 2890, 4672, 7917, 87, 273, 5378, 309, 365, 18, 19207, 301, 530, 30, 981, 273, 5378, 394, 1968, 273, 525, 689, 18, 3004, 2932, 2704, 1968, 7923, 981, 18, 6923, 12, 78, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4657, 6376, 12, 2890, 4672, 7917, 87, 273, 5378, 309, 365, 18, 19207, 301, 530, 30, 981, 273, 5378, 394, 1968, 273, 525, 689, 18, 3004, 2932, 2704, 1968, 7923, 981, 18, 6923, 12, 78, ...
for prodID in sortList(prods): res = rpc.getStorageDirectorySummary(dir,fileType,prodID,ses)
for prodID in sortList( prods ): res = rpc.getStorageDirectorySummary( dir, fileType, prodID, ses )
def usage(): print 'Usage: %s [<options>] <Directory>' % (Script.scriptName) print ' Get a summary of the storage usage <for an optionally supplied directory>.' print ' The usage can be given in any of the following units: (MB,GB,TB,PB)' print ' The sites options should be a space or comma separated list e.g. --Sites="CNAF-RAW,GRIDKA-RAW" or --Sites="CNAF-RAW GRIDKA-RAW"' print ' Type "%s --help" for the available options and syntax' % Script.scriptName DIRAC.exit(2)
d2db378c63ced0c70abdfd0e1e47c60e42f24767 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d2db378c63ced0c70abdfd0e1e47c60e42f24767/dirac-dms-storage-usage-summary.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 2853, 1870, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 968, 279, 4916, 434, 326, 2502, 4084, 411, 1884, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 306, 32, 2116, 34, 65, 411, 2853, 1870, 738, 261, 3651, 18, 4263, 461, 13, 1172, 296, 968, 279, 4916, 434, 326, 2502, 4084, 411, 1884, 392, ...
def __init__(self, db_path='/var/lib/yum/yumdb'):
def __init__(self, db_path='/var/lib/yum/yumdb', version_path=None):
def __init__(self, db_path='/var/lib/yum/yumdb'): self.conf = misc.GenericHolder() self.conf.db_path = db_path self.conf.writable = False self._packages = {} # pkgid = dir if not os.path.exists(self.conf.db_path): try: os.makedirs(self.conf.db_path) except (IOError, OSError), e: # some sort of useful thing here? A warning? return self.conf.writable = True else: if os.access(self.conf.db_path, os.W_OK): self.conf.writable = True # Don't call _load_all_package_paths to preload, as it's expensive # if the dirs. aren't in cache. self.yumdb_cache = {'attr' : {}}
d68af7e711cdec200f3b7a8201eeea9ec3355006 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5445/d68af7e711cdec200f3b7a8201eeea9ec3355006/rpmsack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1319, 67, 803, 2218, 19, 1401, 19, 2941, 19, 93, 379, 19, 93, 379, 1966, 2187, 1177, 67, 803, 33, 7036, 4672, 365, 18, 3923, 273, 20448, 18, 7014, 6064...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1319, 67, 803, 2218, 19, 1401, 19, 2941, 19, 93, 379, 19, 93, 379, 1966, 2187, 1177, 67, 803, 33, 7036, 4672, 365, 18, 3923, 273, 20448, 18, 7014, 6064...
FakeProxyHandler.digest_auth_handler.set_users({ self.USER : self.PASSWD }) FakeProxyHandler.digest_auth_handler.set_realm(self.REALM) self.server = LoopbackHttpServerThread(FakeProxyHandler)
self.digest_auth_handler = DigestAuthHandler() self.digest_auth_handler.set_users({self.USER: self.PASSWD}) self.digest_auth_handler.set_realm(self.REALM) def create_fake_proxy_handler(*args, **kwargs): return FakeProxyHandler(self.digest_auth_handler, *args, **kwargs) self.server = LoopbackHttpServerThread(create_fake_proxy_handler)
def setUp(self): FakeProxyHandler.digest_auth_handler.set_users({ self.USER : self.PASSWD }) FakeProxyHandler.digest_auth_handler.set_realm(self.REALM)
f210feb95bc20808adbf73b6362f0ec8349adfc8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/f210feb95bc20808adbf73b6362f0ec8349adfc8/test_urllib2_localnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 11551, 3886, 1503, 18, 10171, 67, 1944, 67, 4176, 18, 542, 67, 5577, 12590, 365, 18, 4714, 294, 365, 18, 10884, 16006, 289, 13, 11551, 3886, 1503, 18, 10171, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 11551, 3886, 1503, 18, 10171, 67, 1944, 67, 4176, 18, 542, 67, 5577, 12590, 365, 18, 4714, 294, 365, 18, 10884, 16006, 289, 13, 11551, 3886, 1503, 18, 10171, 67, ...
todata.append('MAILTO:' + parent.email)
if parent.email: todata.append('MAILTO:' + parent.email)
def _compute_data(self, cr, uid, ids, name, arg, context): name = name[0] result = {}
e5f3ead146ae9fd9acbfacb79d41010b3ab19718 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e5f3ead146ae9fd9acbfacb79d41010b3ab19718/base_calendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9200, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 4672, 508, 273, 508, 63, 20, 65, 563, 273, 2618, 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, 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, 389, 9200, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 4672, 508, 273, 508, 63, 20, 65, 563, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, ...
is_completed_file_name = os.path.join(
is_completed_file_name = op.join(
def refresh(self): is_completed_file_name = os.path.join( self.build_path, "libtbx_refresh_is_completed") if (os.path.exists(is_completed_file_name)): os.remove(is_completed_file_name) assert not os.path.exists(is_completed_file_name) self.assemble_pythonpath() self.show_build_options_and_module_listing() self.reset_dispatcher_bookkeeping() print 'Creating files in build directory:\n "%s"' % self.build_path self.write_dispatcher_include_template() self.write_lib_dispatcher_head() self.write_setpath_files() self.pickle() if (self.is_ready_for_build()): self.write_SConstruct() if (os.name != "nt"): self.write_Makefile() if (os.name != "nt"): self.write_run_tests_csh() self.clear_bin_directory() if (not os.path.isdir(self.bin_path)): os.makedirs(self.bin_path) python_dispatchers = ["libtbx.python"] if (self.is_development_environment()): python_dispatchers.append("python") for file_name in python_dispatchers: self._write_dispatcher_in_bin( source_file=self.python_exe, target_file=file_name) for module in self.module_list: module.process_command_line_directories() os.environ["LIBTBX_BUILD"] = self.build_path # to support libtbx.load_env for path in self.pythonpath: sys.path.insert(0, path) for module in self.module_list: module.process_libtbx_refresh_py() self.write_python_and_show_path_duplicates() self.process_exe() self.write_command_version_duplicates() self.pickle() print >> open(is_completed_file_name, "w"), "libtbx_refresh_is_completed"
621ff93ea6f104ac4c6d943d7e9d6c18b1468502 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/621ff93ea6f104ac4c6d943d7e9d6c18b1468502/env_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 4672, 353, 67, 13615, 67, 768, 67, 529, 273, 1061, 18, 5701, 12, 365, 18, 3510, 67, 803, 16, 315, 2941, 18587, 92, 67, 9144, 67, 291, 67, 13615, 7923, 309, 261, 538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4460, 12, 2890, 4672, 353, 67, 13615, 67, 768, 67, 529, 273, 1061, 18, 5701, 12, 365, 18, 3510, 67, 803, 16, 315, 2941, 18587, 92, 67, 9144, 67, 291, 67, 13615, 7923, 309, 261, 538, ...
global __test__
def _run(args = None): import sys if args is not None: sys.argv = args # See which of the numeric modules are installed has_numeric = 0 try: import Numeric except ImportError: pass else: has_numeric = 1 m = Numeric has_numarray = 0 try: import numarray except ImportError: pass else: has_numarray = 1 m = numarray # Bail if neither one is installed if not (has_numeric or has_numarray): return 0 # test the info routine outside the doctest. See numpy.cpp for an # explanation import numpy_ext if (has_numarray): numpy_ext.info(m.array((1,2,3))) failures = 0 # # Run tests 4 different ways if both modules are installed, just # to show that set_module_and_type() is working properly # # run all the tests with default module search print 'testing default extension module:', \ numpy_ext.get_module_name() or '[numeric support not installed]' failures += _count_failures() # test against Numeric if installed if has_numeric: print 'testing Numeric module explicitly' numpy_ext.set_module_and_type('Numeric', 'ArrayType') failures += _count_failures() global __test__ if has_numarray: print 'testing numarray module explicitly' numpy_ext.set_module_and_type('numarray', 'NDArray') # Add the _numarray_tests to the list of things to test in # this case. failures += _count_failures(('_numarray_tests', 'numeric_tests')) # see that we can go back to the default numpy_ext.set_module_and_type('', '') print 'testing default module again:', \ numpy_ext.get_module_name() or '[numeric support not installed]' failures += _count_failures() return failures
3a53c1dec0290d932a03a6b7bad63747749062cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/3a53c1dec0290d932a03a6b7bad63747749062cb/numpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 1968, 273, 599, 4672, 1930, 2589, 225, 309, 833, 353, 486, 599, 30, 2589, 18, 19485, 273, 833, 225, 468, 2164, 1492, 434, 326, 6389, 4381, 854, 5876, 711, 67, 5246, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 1968, 273, 599, 4672, 1930, 2589, 225, 309, 833, 353, 486, 599, 30, 2589, 18, 19485, 273, 833, 225, 468, 2164, 1492, 434, 326, 6389, 4381, 854, 5876, 711, 67, 5246, 273,...
n.mQueryToken not in self.mMapNid2Domains or \ n.mSbjctToken not in self.mMapNid2Domains: continue
str(n.mQueryToken) not in self.mMapNid2Domains or \ str(n.mSbjctToken) not in self.mMapNid2Domains: continue
def applyMethod(self, neighbours ): """estimate ADDA penalties.
ef32bf0fbf57eeee1b6d3380648580b0886113cd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8010/ef32bf0fbf57eeee1b6d3380648580b0886113cd/AddaFit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 1305, 12, 2890, 16, 27662, 262, 30, 3536, 23562, 11689, 37, 14264, 2390, 606, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 1305, 12, 2890, 16, 27662, 262, 30, 3536, 23562, 11689, 37, 14264, 2390, 606, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""Implements a file object on top of a regular socket object."""
"""Faux file object attached to a socket object.""" default_bufsize = 8192
_s = "def %s(self, *args): return self._sock.%s(*args)\n\n"
dee4f185d018d143d63db650d2b9ee53fe09c8e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/dee4f185d018d143d63db650d2b9ee53fe09c8e9/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 389, 87, 273, 315, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 365, 6315, 15031, 7866, 87, 30857, 1968, 5153, 82, 64, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 389, 87, 273, 315, 536, 738, 87, 12, 2890, 16, 380, 1968, 4672, 327, 365, 6315, 15031, 7866, 87, 30857, 1968, 5153, 82, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if type(obj) == Job and self.valid( obj.runningJob ):
if type(obj) == Job : if not self.valid( obj.runningJob ): raise SchedulerError('invalid object', str( obj.runningJob ))
def getOutput( self, obj, outdir='' ): """ retrieve job output """
55a0d373215e2d2c4f99fe71353cbd62af3d7838 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8886/55a0d373215e2d2c4f99fe71353cbd62af3d7838/SchedulerGLite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11062, 12, 365, 16, 1081, 16, 15398, 2218, 11, 262, 30, 3536, 4614, 1719, 876, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.re_nm = re.compile(r'T\s+_(' + self.generator.export_symbols_regex + r')\b')
re_nm = re.compile(r'T\s+_(' + self.generator.export_symbols_regex + r')\b')
def run(self): syms = [] for x in self.inputs: if 'msvc' in (self.env.CC_NAME, self.env.CXX_NAME): self.re_nm = re.compile(r'External\s+\|\s+_(' + self.generator.export_symbols_regex + r')\b') s = self.filter(self.generator.bld.cmd_and_log(['dumpbin', '/symbols', x.abspath()], quiet=STDOUT)) else: if self.generator.bld.get_dest_binfmt() == 'pe': #gcc uses nm, and has a preceding _ on windows self.re_nm = re.compile(r'T\s+_(' + self.generator.export_symbols_regex + r')\b') else: self.re_nm = re.compile(r'T\s+(' + self.generator.export_symbols_regex + r')\b') s = self.filter(self.generator.bld.cmd_and_log(['nm', x.abspath()], quiet=STDOUT)) s and syms.append(s) if self.generator.bld.get_dest_binfmt() == 'pe': self.outputs[0].write('EXPORTS\n' + '\n'.join(syms)) elif self.generator.bld.get_dest_binfmt() == 'elf': self.outputs[0].write('{ global:\n' + ';\n'.join(syms) + ";\nlocal: *; };\n") else: raise NotImplemented
b1e5bc5bedba26fff7e0ac5baa242ef0ad393efe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2886/b1e5bc5bedba26fff7e0ac5baa242ef0ad393efe/syms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 24367, 273, 5378, 364, 619, 316, 365, 18, 10029, 30, 309, 296, 959, 4227, 11, 316, 261, 2890, 18, 3074, 18, 6743, 67, 1985, 16, 365, 18, 3074, 18, 39, 5619, 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, 1086, 12, 2890, 4672, 24367, 273, 5378, 364, 619, 316, 365, 18, 10029, 30, 309, 296, 959, 4227, 11, 316, 261, 2890, 18, 3074, 18, 6743, 67, 1985, 16, 365, 18, 3074, 18, 39, 5619, 67,...
Q = [ k+1 for k in range(B) ] R = [ 0 ] + [ s*k for k in range(1,B+1) for s in [1,-1] ]
Q = range(1, B + 1) R = [ 0 ] + [ s*k for k in range(1, B+1) for s in [1, -1] ]
def enum_affine_rational_field(X,B): """ Enumerates affine rational points on scheme X (defined over `\QQ`) up to bound B. INPUT: - ``X`` - a scheme or set of abstract rational points of a scheme - ``B`` - a positive integer bound OUTPUT: - a list containing the affine points of X of height up to B, sorted. EXAMPLES:: sage: A.<x,y,z> = AffineSpace(3,QQ) sage: from sage.schemes.generic.rational_point import enum_affine_rational_field sage: enum_affine_rational_field(A(QQ),1) [(-1, -1, -1), (-1, -1, 0), (-1, -1, 1), (-1, 0, -1), (-1, 0, 0), (-1, 0, 1), (-1, 1, -1), (-1, 1, 0), (-1, 1, 1), (0, -1, -1), (0, -1, 0), (0, -1, 1), (0, 0, -1), (0, 0, 0), (0, 0, 1), (0, 1, -1), (0, 1, 0), (0, 1, 1), (1, -1, -1), (1, -1, 0), (1, -1, 1), (1, 0, -1), (1, 0, 0), (1, 0, 1), (1, 1, -1), (1, 1, 0), (1, 1, 1)] :: sage: A.<w,x,y,z> = AffineSpace(4,QQ) sage: S = A.subscheme([x^2-y*z+3,w^3+z+y^2]) sage: enum_affine_rational_field(S(QQ),2) [] sage: enum_affine_rational_field(S(QQ),3) [(-2, 0, -3, -1)] :: sage: A.<x,y> = AffineSpace(2,QQ) sage: C = Curve(x^2+y-x) sage: enum_affine_rational_field(C,10) [(-2, -6), (-1, -2), (0, 0), (1, 0), (2, -2), (3, -6)] AUTHOR: David R. Kohel <kohel@maths.usyd.edu.au> (small adjustments by Charlie Turner 06-2010) """ if is_Scheme(X): X = X(X.base_ring()) n = X.codomain().ambient_space().ngens() if X.value_ring() is ZZ: Q = [ 1 ] else: # rational field Q = [ k+1 for k in range(B) ] R = [ 0 ] + [ s*k for k in range(1,B+1) for s in [1,-1] ] pts = [] P = [ 0 for _ in range(n) ] m = ZZ(0) try: pts.append(X(P)) except: pass iters = [ iter(R) for _ in range(n) ] [ iters[j].next() for j in range(n) ] i = 0 while i < n: try: a = ZZ(iters[i].next()) m = m.gcd(a) P[i] = a for b in Q: if m.gcd(b) == 1: try: pts.append(X([ num/b for num in P ])) except: pass i = 0 m = ZZ(0) except StopIteration: iters[i] = iter(R) # reset P[i] = iters[i].next() # reset P[i] to 0 and increment i += 1 pts.sort() return pts
0c1f24a85f1dccaf5341fcaca9e87554c8bacafa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0c1f24a85f1dccaf5341fcaca9e87554c8bacafa/rational_point.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 67, 7329, 558, 67, 7034, 287, 67, 1518, 12, 60, 16, 38, 4672, 3536, 6057, 264, 815, 28381, 436, 8371, 3143, 603, 4355, 1139, 261, 2178, 1879, 1375, 64, 53, 53, 24065, 731, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2792, 67, 7329, 558, 67, 7034, 287, 67, 1518, 12, 60, 16, 38, 4672, 3536, 6057, 264, 815, 28381, 436, 8371, 3143, 603, 4355, 1139, 261, 2178, 1879, 1375, 64, 53, 53, 24065, 731, 358, ...
self._requests[request.rsalt] = _Request(request, args, expire_time)
self._requests[request.rsalt] = _Request(request, args, expire_time, targets)
def SendRequest(self, request, args=None, coverage=None, async=True): """Send a confd request to some MCs
bfbbc22328ad29f71d2f1eceec40c2782fb553b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/bfbbc22328ad29f71d2f1eceec40c2782fb553b2/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2479, 691, 12, 2890, 16, 590, 16, 833, 33, 7036, 16, 11196, 33, 7036, 16, 4326, 33, 5510, 4672, 3536, 3826, 279, 2195, 72, 590, 358, 2690, 490, 14272, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2479, 691, 12, 2890, 16, 590, 16, 833, 33, 7036, 16, 11196, 33, 7036, 16, 4326, 33, 5510, 4672, 3536, 3826, 279, 2195, 72, 590, 358, 2690, 490, 14272, 2, -100, -100, -100, -100, -100, ...
return (1, "%s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], make_apache_message(name_action, arguments, user_info.get('referer', None))))
return (1, "%s %s" % (CFG_WEBACCESS_WARNING_MSGS[1], make_apache_message(name_action, arguments)))
def acc_authorize_action(req, name_action, verbose=0, check_only_uid_p=False, **arguments): """Check if user is allowed to perform action with given list of arguments. Return (0, message) if authentication succeeds, (error code, error message) if it fails. The arguments are as follows: req - could be either one of these three things: id_user of the current user user_info dictionary built against the user details req mod_python request object name_action - the name of the action arguments - dictionary with keyword=value pairs created automatically by python on the extra arguments. these depend on the given action.
65ea7094ab75e683f85f6867dca65a9d596afbcc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/65ea7094ab75e683f85f6867dca65a9d596afbcc/access_control_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4078, 67, 22488, 67, 1128, 12, 3658, 16, 508, 67, 1128, 16, 3988, 33, 20, 16, 866, 67, 3700, 67, 1911, 67, 84, 33, 8381, 16, 2826, 7099, 4672, 3536, 1564, 309, 729, 353, 2935, 358, ...
print "Warning: this should never happen"
pass
def _execute_line(self, line, wait_for_prompt=True, expect_eof=False): E = self._expect try: if len(line) > 4095: raise RuntimeError,"Passing commands this long to gap would hang" E.sendline(line) except OSError: return RuntimeError, "Error evaluating %s in %s"%(line, self) if wait_for_prompt == False: return ('','') if len(line)==0: return ('','') try: E.expect("\r\n") # seems to be necessary to skip TWO echoes E.expect("\r\n") # one from the pty and one from GAP, I guess normal_outputs = [] error_outputs = [] current_outputs = normal_outputs while True: x = E.expect(['@p\d+\.','@@','@[A-Z]','@[123456!"#$%&][^+]*\+', '@e','@c','@f','@h','@i','@m','@n','@r','@s\d','@w.*\+', '@x','@z']) current_outputs.append(E.before) if x == 0: # @p if E.after != '@p1.': print "Warning: possibly wrong version of GAP package interface\n" print "Crossing fingers and continuing\n" elif x == 1: #@@ current_outputs.append('@') elif x == 2: #special char current_outputs.append(chr(ord(E.after[1:2])-ord('A')+1)) elif x == 3: # garbage collection info, ignore pass elif x == 4: # @e -- break loop E.sendline(" ") #E.expect("\r\n") #E.expect("\r\n") elif x == 5: # @c completion, doesn't seem to happen when -p is in use print "I didn't think GAP could do this\n" elif x == 6: # @f GAP error message current_outputs = error_outputs; elif x == 7: # @h help text, but this stopped happening with new help print "I didn't think GAP could do this" elif x == 8: # @i awaiting normal input break; elif x == 9: # @m finished running a child # not generated in GAP 4 print "Warning: this should never happen" elif x==10: #@n normal output line current_outputs = normal_outputs; elif x==11: #@r echoing input E.expect('@J') elif x==12: #@sN shouldn't happen print "Warning: this should never happen" elif x==13: #@w GAP is trying to send a Window command print "Warning: this should never happen" elif x ==14: #@x seems to be safely ignorable pass elif x == 15:#@z GAP starting a subprocess # actually not used print "Warning: this should never happen" except pexpect.EOF: if not expect_eof: raise RuntimeError, "Unexpected EOF from %s executing %s"%(self,line) except IOError: raise RuntimeError, "IO Error from %s executing %s"%(self,line) return ("".join(normal_outputs),"".join(error_outputs))
d601943d3e621bfd0668d6308aa7ca91a1a55abe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/d601943d3e621bfd0668d6308aa7ca91a1a55abe/gap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 1369, 12, 2890, 16, 980, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 4489, 67, 9339, 33, 8381, 4672, 512, 273, 365, 6315, 12339, 775, 30, 309, 562, 12, 1369, 13, 405,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8837, 67, 1369, 12, 2890, 16, 980, 16, 2529, 67, 1884, 67, 13325, 33, 5510, 16, 4489, 67, 9339, 33, 8381, 4672, 512, 273, 365, 6315, 12339, 775, 30, 309, 562, 12, 1369, 13, 405,...
"""PopupMenu widget.
"""PopupMenu widget can be used as a replacement of the tk_popup command. The advantage of the Tix PopupMenu widget is it requires less application code to manipulate.
def panes(self): names = self.tk.call(self._w, 'panes') ret = [] for x in names: ret.append(self.subwidget(x)) return ret
48af83dadc128720a7642beb50800c6971404eb9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/48af83dadc128720a7642beb50800c6971404eb9/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2800, 281, 12, 2890, 4672, 1257, 273, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 7355, 281, 6134, 325, 273, 5378, 364, 619, 316, 1257, 30, 325, 18, 6923, 12, 2890, 18, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2800, 281, 12, 2890, 4672, 1257, 273, 365, 18, 16099, 18, 1991, 12, 2890, 6315, 91, 16, 296, 7355, 281, 6134, 325, 273, 5378, 364, 619, 316, 1257, 30, 325, 18, 6923, 12, 2890, 18, 17...
[ {'x': 150.0, 'y': 101.0, 'image': "melody/xylofon/son1.png", 'sound': "sounds/melody/xylofon/son1.ogg"}, {'x': 284.0, 'y': 118.0, 'image': "melody/xylofon/son2.png", 'sound': "sounds/melody/xylofon/son2.ogg"}, {'x': 412.0, 'y': 140.0, 'image': "melody/xylofon/son3.png", 'sound': "sounds/melody/xylofon/son3.ogg"}, {'x': 546.0, 'y': 157.0, 'image': "melody/xylofon/son4.png", 'sound': "sounds/melody/xylofon/son4.ogg"} ] ],
[ {'x': 150.0, 'y': 101.0, 'image': "melody/xylofon/son1.png", 'sound': "melody/sounds/xylofon/son1.ogg"}, {'x': 284.0, 'y': 118.0, 'image': "melody/xylofon/son2.png", 'sound': "melody/sounds/xylofon/son2.ogg"}, {'x': 412.0, 'y': 140.0, 'image': "melody/xylofon/son3.png", 'sound': "melody/sounds/xylofon/son3.ogg"}, {'x': 546.0, 'y': 157.0, 'image': "melody/xylofon/son4.png", 'sound': "melody/sounds/xylofon/son4.ogg"} ] ],
def start(self): self.saved_policy = gcompris.sound.policy_get() gcompris.sound.policy_set(gcompris.sound.PLAY_AND_INTERRUPT)
53e16dfc17525dcb2669464eb848b2387d47a260 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11306/53e16dfc17525dcb2669464eb848b2387d47a260/melody.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 14077, 67, 5086, 273, 314, 832, 683, 291, 18, 29671, 18, 5086, 67, 588, 1435, 314, 832, 683, 291, 18, 29671, 18, 5086, 67, 542, 12, 75, 832, 683, 291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 12, 2890, 4672, 365, 18, 14077, 67, 5086, 273, 314, 832, 683, 291, 18, 29671, 18, 5086, 67, 588, 1435, 314, 832, 683, 291, 18, 29671, 18, 5086, 67, 542, 12, 75, 832, 683, 291, ...
0.66623943249251527 + 1.0612750619050357*I
0.666239432492515 + 1.06127506190503*I
def asin(self): """ EXAMPLES: sage: (1+I).asin() 0.66623943249251527 + 1.0612750619050357*I """ return self.parent()(self._pari_().asin())
293427b47ee2bb564117092226099ed44acd171f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9417/293427b47ee2bb564117092226099ed44acd171f/complex_number.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 487, 267, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 261, 21, 15, 45, 2934, 345, 267, 1435, 374, 18, 25308, 4366, 11290, 1578, 7616, 2947, 3600, 397, 404, 18, 7677, 142...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 487, 267, 12, 2890, 4672, 3536, 5675, 8900, 11386, 30, 272, 410, 30, 261, 21, 15, 45, 2934, 345, 267, 1435, 374, 18, 25308, 4366, 11290, 1578, 7616, 2947, 3600, 397, 404, 18, 7677, 142...
the group. ::
the group::
def _magma_init_(self, magma): r""" Returns a string showing how to declare / intialize self in Magma. EXAMPLES: We explicitly construct the alternating group on four elements. In Magma, one would type the string below to construct the group. :: sage: A4 = PermutationGroup([[(1,2,3)],[(2,3,4)]]); A4 Permutation Group with generators [(2,3,4), (1,2,3)] sage: A4._magma_init_(magma) 'PermutationGroup<4 | (2,3,4), (1,2,3)>' """ g = str(self.gens())[1:-1] return 'PermutationGroup<%s | %s>'%(self.degree(), g)
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, 389, 4527, 2540, 67, 2738, 67, 12, 2890, 16, 4447, 2540, 4672, 436, 8395, 2860, 279, 533, 17253, 3661, 358, 14196, 342, 509, 1710, 365, 316, 490, 9454, 18, 225, 5675, 8900, 11386, 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, 389, 4527, 2540, 67, 2738, 67, 12, 2890, 16, 4447, 2540, 4672, 436, 8395, 2860, 279, 533, 17253, 3661, 358, 14196, 342, 509, 1710, 365, 316, 490, 9454, 18, 225, 5675, 8900, 11386, 30, ...
if status in STATUS_EMBLEMS:
if status in rabbitvcs.ui.STATUS_EMBLEMS:
def set_icon_from_status(self, icon, status, size=gtk.ICON_SIZE_BUTTON): if status in STATUS_EMBLEMS: icon.set_from_icon_name("emblem-" + STATUS_EMBLEMS[status], size)
7b85488d69855171f840d101a168add22740a6c5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/7b85488d69855171f840d101a168add22740a6c5/property_page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3950, 67, 2080, 67, 2327, 12, 2890, 16, 4126, 16, 1267, 16, 963, 33, 4521, 79, 18, 21745, 67, 4574, 67, 20068, 4672, 309, 1267, 316, 767, 70, 3682, 18982, 18, 4881, 18, 8608...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 3950, 67, 2080, 67, 2327, 12, 2890, 16, 4126, 16, 1267, 16, 963, 33, 4521, 79, 18, 21745, 67, 4574, 67, 20068, 4672, 309, 1267, 316, 767, 70, 3682, 18982, 18, 4881, 18, 8608...
return 0 if len(d) > 15: wordsDictHTML[word] = None
print "skipped %s" % (word)
def addWordHTML(word, resource, id, section, relevance): global wordsDictHTML if word == None or len(word) < 3: return -1 if resource == None or section == None: return -1 if wordsDictHTML.has_key(word): d = wordsDictHTML[word] if d == None: return 0 if len(d) > 15: wordsDictHTML[word] = None return 0 try: (r,i,s) = d[resource] if i != None: id = i if s != None: section = s relevance = relevance + r except: pass else: wordsDictHTML[word] = {} wordsDictHTML[word][resource] = (relevance, id, section) return relevance
a6287a463c7f9e3c4b6db7a2b12f9c84ad0b2020 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/a6287a463c7f9e3c4b6db7a2b12f9c84ad0b2020/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 3944, 4870, 12, 1095, 16, 1058, 16, 612, 16, 2442, 16, 6707, 5882, 4672, 2552, 4511, 5014, 4870, 225, 309, 2076, 422, 599, 578, 562, 12, 1095, 13, 411, 890, 30, 327, 300, 21, 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, 527, 3944, 4870, 12, 1095, 16, 1058, 16, 612, 16, 2442, 16, 6707, 5882, 4672, 2552, 4511, 5014, 4870, 225, 309, 2076, 422, 599, 578, 562, 12, 1095, 13, 411, 890, 30, 327, 300, 21, 30...
'cfg',
def finish(self): """ General cleanup on end of request
a4c20a3eb0ce8499a38e1f795916f770f7f9aada /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/a4c20a3eb0ce8499a38e1f795916f770f7f9aada/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 3536, 9544, 6686, 603, 679, 434, 590, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4076, 12, 2890, 4672, 3536, 9544, 6686, 603, 679, 434, 590, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
jam_build_dir = "bin.linuxx86"
cpu = os.uname()[4] if re.match("i.86", cpu): jam_build_dir = "bin.linuxx86"; else: jam_build_dir = "bin.linux" + os.uname()[4]
def __init__(self, arguments="", executable = 'bjam', match = TestCmd.match_exact, boost_build_path = None, translate_suffixes = 1, pass_toolset = 1, **keywords):
d56e81487792ebe4b253c4ea901127dd46d81e57 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9981/d56e81487792ebe4b253c4ea901127dd46d81e57/BoostBuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1775, 1546, 3113, 9070, 273, 296, 441, 301, 2187, 845, 273, 7766, 5931, 18, 1916, 67, 17165, 16, 14994, 67, 3510, 67, 803, 273, 599, 16, 4204, 67, 8477, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1775, 1546, 3113, 9070, 273, 296, 441, 301, 2187, 845, 273, 7766, 5931, 18, 1916, 67, 17165, 16, 14994, 67, 3510, 67, 803, 273, 599, 16, 4204, 67, 8477, ...
sd = 1
sd = 4
def nextedIterator (*items): for item in items: for i in item: try: if not i in used: used.add(i) yield i except: print items, item, i raise
281f9c45823b667e558e97c803277321221555c8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5339/281f9c45823b667e558e97c803277321221555c8/PyChess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 329, 3198, 261, 14, 3319, 4672, 364, 761, 316, 1516, 30, 364, 277, 316, 761, 30, 775, 30, 309, 486, 277, 316, 1399, 30, 1399, 18, 1289, 12, 77, 13, 2824, 277, 1335, 30, 1172, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1024, 329, 3198, 261, 14, 3319, 4672, 364, 761, 316, 1516, 30, 364, 277, 316, 761, 30, 775, 30, 309, 486, 277, 316, 1399, 30, 1399, 18, 1289, 12, 77, 13, 2824, 277, 1335, 30, 1172, ...
self.rolloverAt = currentTime + self.interval
self.rolloverAt = self.computeRollover(int(time.time())) def computeRollover(self, currentTime): """ Work out the rollover time based on the specified time. """ result = currentTime + self.interval
def __init__(self, filename, when='h', interval=1, backupCount=0, encoding=None, delay=0, utc=0): BaseRotatingHandler.__init__(self, filename, 'a', encoding, delay) self.when = string.upper(when) self.backupCount = backupCount self.utc = utc # Calculate the real rollover interval, which is just the number of # seconds between rollovers. Also set the filename suffix used when # a rollover occurs. Current 'when' events supported: # S - Seconds # M - Minutes # H - Hours # D - Days # midnight - roll over at midnight # W{0-6} - roll over on a certain day; 0 - Monday # # Case of the 'when' specifier is not important; lower or upper case # will work. currentTime = int(time.time()) if self.when == 'S': self.interval = 1 # one second self.suffix = "%Y-%m-%d_%H-%M-%S" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}$" elif self.when == 'M': self.interval = 60 # one minute self.suffix = "%Y-%m-%d_%H-%M" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}$" elif self.when == 'H': self.interval = 60 * 60 # one hour self.suffix = "%Y-%m-%d_%H" self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}$" elif self.when == 'D' or self.when == 'MIDNIGHT': self.interval = 60 * 60 * 24 # one day self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" elif self.when.startswith('W'): self.interval = 60 * 60 * 24 * 7 # one week if len(self.when) != 2: raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when) if self.when[1] < '0' or self.when[1] > '6': raise ValueError("Invalid day specified for weekly rollover: %s" % self.when) self.dayOfWeek = int(self.when[1]) self.suffix = "%Y-%m-%d" self.extMatch = r"^\d{4}-\d{2}-\d{2}$" else: raise ValueError("Invalid rollover interval specified: %s" % self.when)
b6b55f914cab157fc22a2fd66d9cfc33a233507b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/b6b55f914cab157fc22a2fd66d9cfc33a233507b/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 16, 4624, 33, 20, 16, 9439, 33, 20, 4672, 3360, 8570, 1776, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1544, 16, 1347, 2218, 76, 2187, 3673, 33, 21, 16, 5114, 1380, 33, 20, 16, 2688, 33, 7036, 16, 4624, 33, 20, 16, 9439, 33, 20, 4672, 3360, 8570, 1776, ...
headerSize = str(len(frameHeader)).rjust(FRAME_HEADER_DIGITS,"0") if len(headerSize) > FRAME_HEADER_DIGITS: raise AttributeError, "Frame Header too large! Max:"+ FRAME_HEADER_DIGITS+ " Actual:"+ len(headerSize)
headerSize = str(len(frameHeader)).rjust(MULTIPLEXER_FRAME_HEADER_DIGITS,"0") if len(headerSize) > MULTIPLEXER_FRAME_HEADER_DIGITS: raise AttributeError, "Frame Header too large! Max:"+ MULTIPLEXER_FRAME_HEADER_DIGITS+ " Actual:"+ len(headerSize)
def toString(self): """ <Purpose> Converts the frame to a string.
c0a4cb118694010ecadc522882f9681e1ce41a0b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/c0a4cb118694010ecadc522882f9681e1ce41a0b/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 20377, 326, 2623, 358, 279, 533, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1762, 12, 2890, 4672, 3536, 411, 10262, 4150, 34, 20377, 326, 2623, 358, 279, 533, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not (self.cfg.mail_enabled or self.cfg.jabber_enabled and self.request.user.valid):
if not ((self.cfg.mail_enabled or self.cfg.jabber_enabled) and self.request.user.valid):
def subscribeLink(self, page): """ Return subscribe/unsubscribe link to valid users
1fadf5d2b27dbff331702b0f78d1027df17dab66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/1fadf5d2b27dbff331702b0f78d1027df17dab66/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9129, 2098, 12, 2890, 16, 1363, 4672, 3536, 2000, 9129, 19, 318, 9174, 1692, 358, 923, 3677, 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, 9129, 2098, 12, 2890, 16, 1363, 4672, 3536, 2000, 9129, 19, 318, 9174, 1692, 358, 923, 3677, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertTrue(self.user.has_perm('can_ship', self.obj))
self.assertTrue(self.otherUser.has_perm('all_can_pass', self.obj)) del settings.CENTRAL_AUTHORIZATIONS def test_central_authorizations_right_module_passes_over(self): settings.CENTRAL_AUTHORIZATIONS = 'utils' self.assertFalse(self.otherUser.has_perm('can_ship', self.obj))
def test_central_authorizations_right_module(self): settings.CENTRAL_AUTHORIZATIONS = 'utils' self.assertTrue(self.user.has_perm('can_ship', self.obj)) del settings.CENTRAL_AUTHORIZATIONS
0decc5f449f95534edb0ff217a4eab899041a460 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14254/0decc5f449f95534edb0ff217a4eab899041a460/test_core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 12839, 67, 4161, 7089, 67, 4083, 67, 2978, 12, 2890, 4672, 1947, 18, 19666, 54, 1013, 67, 17866, 15297, 273, 296, 5471, 11, 365, 18, 11231, 5510, 12, 2890, 18, 3011, 1299...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 71, 12839, 67, 4161, 7089, 67, 4083, 67, 2978, 12, 2890, 4672, 1947, 18, 19666, 54, 1013, 67, 17866, 15297, 273, 296, 5471, 11, 365, 18, 11231, 5510, 12, 2890, 18, 3011, 1299...
if dx<2: self.drawminmax(aFullPNString,x,ymax, ymin) else:
self.drawminmax(aFullPNString,x,ymax, ymin) if dx>1: return True else: return False
def drawpoint_minmax(self, aFullPNString, datapoint): #get datapoint x y values #convert to plot coordinates if self.trace_onoff[aFullPNString]==gtk.FALSE: return 0 x=self.convertx_to_plot(datapoint[DP_TIME]) ymax=self.converty_to_plot(datapoint[DP_MAX]) ymin=self.converty_to_plot(datapoint[DP_MIN])
8f18e3850a6316681f1074fff213ca716c4f5df5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12724/8f18e3850a6316681f1074fff213ca716c4f5df5/Plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1153, 67, 1154, 1896, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 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, 3724, 1153, 67, 1154, 1896, 12, 2890, 16, 279, 5080, 15124, 780, 16, 25252, 4672, 468, 588, 25252, 619, 677, 924, 468, 6283, 358, 3207, 5513, 309, 365, 18, 5129, 67, 265, 3674, 63, 69,...
module = reload(module)
del sys.modules[modname] module = __import__(modname)
def simple_import(path_to_module): err_prefix = "Importing '%s' failed: " % path_to_module if not os.path.exists(path_to_module): raise DataError(err_prefix + 'File does not exist') moddir, modname = _split_path_to_module(path_to_module) try: try: module = __import__(modname) if normpath(moddir) != normpath(os.path.dirname(module.__file__)): module = reload(module) except: raise DataError(err_prefix + get_error_message()) finally: sys.path.pop(0) return module
823e10a20b4869296643774d4b37ce578690add5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7408/823e10a20b4869296643774d4b37ce578690add5/importing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 67, 5666, 12, 803, 67, 869, 67, 2978, 4672, 393, 67, 3239, 273, 315, 5010, 310, 1995, 87, 11, 2535, 30, 315, 738, 589, 67, 869, 67, 2978, 309, 486, 1140, 18, 803, 18, 1808, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4143, 67, 5666, 12, 803, 67, 869, 67, 2978, 4672, 393, 67, 3239, 273, 315, 5010, 310, 1995, 87, 11, 2535, 30, 315, 738, 589, 67, 869, 67, 2978, 309, 486, 1140, 18, 803, 18, 1808, 1...
'SR' : str(xenapi.SR.get_by_name_label(self.xensession, self.aggr)[0]) ,
'SR' : str(xenapi.SR.get_by_name_label(self.xensession, self.aggr)['Value'][0]) ,
def create(self): """ this section will create the disk image for the VM, set its properties and prepare it to boot """
5e1d691f10b2b6e3e6602c7969a36c9a06bb7296 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6488/5e1d691f10b2b6e3e6602c7969a36c9a06bb7296/mkvm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 4672, 3536, 333, 2442, 903, 752, 326, 4234, 1316, 364, 326, 8251, 16, 444, 2097, 1790, 471, 2911, 518, 358, 4835, 3536, 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, 0, 0, 0, 0, 0, 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, 752, 12, 2890, 4672, 3536, 333, 2442, 903, 752, 326, 4234, 1316, 364, 326, 8251, 16, 444, 2097, 1790, 471, 2911, 518, 358, 4835, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
jobKey = tableId + '_' + jobId + '_JobState'
jobKey = tableId + '_' + jobId + 'JS'
def jobFinished(eM, tableId, jobId): tableStr = str(tableId) t0 = eM.queryState(tableStr + 'NumJobs') print 'addJob: Current num: ', t0 t1 = int(t0) - 1 eM.updateState(tableStr + 'NumJobs', str(t1)) print 'addJob: New num: ', t1 jobKey = tableId + '_' + jobId + '_JobState' eM.updateState(jobKey, 'FINISHED') eM.updateState(jobKey + 'finishedTime', time.ctime()) eM.showStates()
301f0721672c7b17c6ad91948a2b7cc4b9c0b21c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/301f0721672c7b17c6ad91948a2b7cc4b9c0b21c/myJobMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1719, 10577, 12, 73, 49, 16, 1014, 548, 16, 13845, 4672, 1014, 1585, 273, 609, 12, 2121, 548, 13, 268, 20, 273, 425, 49, 18, 2271, 1119, 12, 2121, 1585, 397, 296, 2578, 7276, 6134, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1719, 10577, 12, 73, 49, 16, 1014, 548, 16, 13845, 4672, 1014, 1585, 273, 609, 12, 2121, 548, 13, 268, 20, 273, 425, 49, 18, 2271, 1119, 12, 2121, 1585, 397, 296, 2578, 7276, 6134, 1...
def getLintResult(self): try: return self.lintResult except AttributeError: pass
def getLintResult(self): if not self.hasGenerator: raise RuntimeError, "%s %s has no generate.py script!" %(self.libraryName, self.versionName)
def getLintResult(self): try: return self.lintResult except AttributeError: pass from lintRunner import QxLint class LintOpts: def __init__(self,workdir,mailto = None): self.workdir = workdir self.mailto = mailto self.outputfile = None lintOpts = LintOpts(self.path) lint = QxLint(lintOpts) self.lintResult = lint.data return self.lintResult
9092db6ab87a7dcb194af7c0699d62c81f6fa8f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9092db6ab87a7dcb194af7c0699d62c81f6fa8f0/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 1652, 9014, 474, 1253, 12, 2890, 4672, 309, 486, 365, 18, 5332, 3908, 30, 1002, 7265, 16, 2213, 87, 738, 87, 711, 1158, 2103, 18, 2074, 2728, 4442, 8975, 2890, 18, 12083, 461, 16, 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, 225, 1652, 9014, 474, 1253, 12, 2890, 4672, 309, 486, 365, 18, 5332, 3908, 30, 1002, 7265, 16, 2213, 87, 738, 87, 711, 1158, 2103, 18, 2074, 2728, 4442, 8975, 2890, 18, 12083, 461, 16, 365, ...
store.add((message, SIOC['content'], Literal(self.getBody())))
store.add((message, SIOC['content'], Literal(self.getBody())))
def toRDF(self): """ Print a message into RDF in XML format """ #rdf graph store = ConjunctiveGraph() #namespaces store.bind('sioc', SIOC) store.bind('foaf', FOAF) store.bind('rdfs', RDFS) store.bind('dc', DC) store.bind('dct', DCT)
8193f8a0c5095160f9997eedc83a82f8b0d21cf2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2232/8193f8a0c5095160f9997eedc83a82f8b0d21cf2/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 30137, 12, 2890, 4672, 3536, 3038, 279, 883, 1368, 13539, 316, 3167, 740, 3536, 225, 468, 19299, 2667, 1707, 273, 735, 78, 6931, 688, 4137, 1435, 225, 468, 16078, 1707, 18, 4376, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 30137, 12, 2890, 4672, 3536, 3038, 279, 883, 1368, 13539, 316, 3167, 740, 3536, 225, 468, 19299, 2667, 1707, 273, 735, 78, 6931, 688, 4137, 1435, 225, 468, 16078, 1707, 18, 4376, 26...
gump.addButton(15, yoffset, 4005, 4007, 0x80000000 | (actions + j))
gump.addButton(15, yoffset, 4005, 4007, 0x01000000 | (actions + j))
def send(self, player, args = []): # Close gumps of the same type if self.gumptype != 0: player.socket.closegump(self.gumptype, 0xFFFF)
379e090080cf9a5b69ae382e37d98807fb971cd8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/379e090080cf9a5b69ae382e37d98807fb971cd8/makemenus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 7291, 16, 833, 273, 5378, 4672, 468, 3527, 314, 23868, 434, 326, 1967, 618, 309, 365, 18, 75, 379, 27672, 480, 374, 30, 7291, 18, 7814, 18, 4412, 75, 2801, 12, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 7291, 16, 833, 273, 5378, 4672, 468, 3527, 314, 23868, 434, 326, 1967, 618, 309, 365, 18, 75, 379, 27672, 480, 374, 30, 7291, 18, 7814, 18, 4412, 75, 2801, 12, 28...
mod=PyParser.PyModule(outfilepath)
mod=PyParser.PyModule(os.path.join(self.targetRoot,outfilepath))
def generatePackage(self,package,recursive=1): package.generatedModules=[] package.generatedClasses=[] if package.getName() == 'java': #to suppress these unneccesary implicit created java packages (ArcgoUML and Poseidon) return self.makeDir(package.getFilePath()) for element in package.getClasses()+package.getInterfaces(): #skip stub and internal classes if element.isInternal() or element.hasStereoType(self.stub_stereotypes): continue
e58693df8b60a5334142080f26a4e16748a1cac0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/e58693df8b60a5334142080f26a4e16748a1cac0/ArchGenXML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2261, 12, 2890, 16, 5610, 16, 10543, 33, 21, 4672, 2181, 18, 11168, 7782, 33, 8526, 2181, 18, 11168, 4818, 33, 8526, 309, 2181, 18, 17994, 1435, 422, 296, 6290, 4278, 468, 869, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2261, 12, 2890, 16, 5610, 16, 10543, 33, 21, 4672, 2181, 18, 11168, 7782, 33, 8526, 2181, 18, 11168, 4818, 33, 8526, 309, 2181, 18, 17994, 1435, 422, 296, 6290, 4278, 468, 869, 1...
ld t1, ds, [scale, index, base], disp
ld t1, ds, [1, t0, t7], disp
def macroop XOR_P_R
0e6be2a9b16660903306b2762e69a2678a54a6ba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/0e6be2a9b16660903306b2762e69a2678a54a6ba/logical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 28086, 67, 52, 67, 54, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 28086, 67, 52, 67, 54, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
test_list += find_tests(os.path.join(test_dir, arg))
test_list += find_tests(os.path.normpath(os.path.join(test_dir, arg)))
def run_tests(tests, lib_dir): pb = None if not OPTIONS.hide_progress and not OPTIONS.show_cmd: try: from progressbar import ProgressBar pb = ProgressBar('', len(tests), 13) except ImportError: pass failures = [] complete = False try: for i, test in enumerate(tests): if not run_test(test, lib_dir): failures.append(test) n = i + 1 if pb: pb.label = '[%3d|%3d|%3d]'%(n - len(failures), len(failures), n) pb.update(n) complete = True except KeyboardInterrupt: pass if pb: pb.finish() if failures: print('FAILURES:') for test in failures: if OPTIONS.show_failed: print(' ' + get_test_cmd(test, lib_dir)) else: print(' ' + test) else: print('PASSED ALL' + ('' if complete else ' (partial run -- interrupted by user)'))
0e254a9229217bfef23a879d72111a9f32d13f33 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/0e254a9229217bfef23a879d72111a9f32d13f33/trace-test-py2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 12, 16341, 16, 2561, 67, 1214, 4672, 6386, 273, 599, 309, 486, 16726, 18, 11248, 67, 8298, 471, 486, 16726, 18, 4500, 67, 4172, 30, 775, 30, 628, 31730, 1930, 27793, 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, 1086, 67, 16341, 12, 16341, 16, 2561, 67, 1214, 4672, 6386, 273, 599, 309, 486, 16726, 18, 11248, 67, 8298, 471, 486, 16726, 18, 4500, 67, 4172, 30, 775, 30, 628, 31730, 1930, 27793, 6...
if self.item.isMutating():
if self.item is None or self.item.isMutating():
def onWatchedItemChanged(self, op, uItem, attributes): # Ignore notifications during stamping or deleting if self.item.isMutating(): #logger.debug("%s: ignoring changes to %s during stamping or deletion.", #debugName(self), attributes) return
08fc6ebfd16211db77f3ff3dfa0bb37621bc1084 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/08fc6ebfd16211db77f3ff3dfa0bb37621bc1084/Detail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5234, 329, 1180, 5033, 12, 2890, 16, 1061, 16, 582, 1180, 16, 1677, 4672, 468, 8049, 9208, 4982, 14429, 310, 578, 12993, 309, 365, 18, 1726, 353, 599, 578, 365, 18, 1726, 18, 291,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 5234, 329, 1180, 5033, 12, 2890, 16, 1061, 16, 582, 1180, 16, 1677, 4672, 468, 8049, 9208, 4982, 14429, 310, 578, 12993, 309, 365, 18, 1726, 353, 599, 578, 365, 18, 1726, 18, 291,...
a string.
a PHC_Object object containing the phcpack output string.
def blackbox(self, polys, input_ring, verbose=False): """ Returns as a string the result of running PHC with the given polynomials under blackbox mode (the '-b' option). INPUT: polys -- a list of multivariate polynomials (elements of a multivariate polynomial ring). input_ring: for coercion of the variables into the desired ring. verbose -- print lots of verbose information about what this function does.
39cfe10eafed3d425985580d7bd8d9f58d8cfb54 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/39cfe10eafed3d425985580d7bd8d9f58d8cfb54/phc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7721, 2147, 12, 2890, 16, 2952, 1900, 16, 810, 67, 8022, 16, 3988, 33, 8381, 4672, 3536, 2860, 487, 279, 533, 326, 563, 434, 3549, 15490, 39, 598, 326, 864, 16991, 87, 3613, 7721, 2147...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7721, 2147, 12, 2890, 16, 2952, 1900, 16, 810, 67, 8022, 16, 3988, 33, 8381, 4672, 3536, 2860, 487, 279, 533, 326, 563, 434, 3549, 15490, 39, 598, 326, 864, 16991, 87, 3613, 7721, 2147...
'''
"""
def __call__(obj, request, exc_info): '''Effect persistent side-effects.
1efc979e1e3a1ded9db92b29d7fe03b1f6a70c2e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9825/1efc979e1e3a1ded9db92b29d7fe03b1f6a70c2e/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2603, 16, 590, 16, 3533, 67, 1376, 4672, 9163, 12477, 9195, 4889, 17, 13867, 87, 18, 2, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2603, 16, 590, 16, 3533, 67, 1376, 4672, 9163, 12477, 9195, 4889, 17, 13867, 87, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'literal_block' : ('\n.nf\n', '\n.fi\n'),
'literal_block' : ('.nf\n', '\n.fi\n\n'),
def __init__(self, document): nodes.NodeVisitor.__init__(self, document) self.settings = settings = document.settings lcode = settings.language_code self.language = languages.get_language(lcode) self.head = [] self.body = [] self.foot = [] self.section_level = 0 self.context = [] self.topic_class = '' self.colspecs = [] self.compact_p = 1 self.compact_simple = None # the list style "*" bullet or "#" numbered self._list_char = [] # writing the header .TH and .SH NAME is postboned after # docinfo. self._docinfo = { "title" : "", "title_upper": "", "subtitle" : "", "manual_section" : "", "manual_group" : "", "author" : "", "date" : "", "copyright" : "", "version" : "", } self._in_docinfo = None self._active_table = None self._in_entry = None self.header_written = 0 self.authors = [] self.section_level = 0 self._indent = [0] # central definition of simple processing rules # what to output on : visit, depart self.defs = { 'indent' : ('.INDENT %.1f\n', '.UNINDENT\n'), 'definition' : ('', ''), 'definition_list' : ('', '.TP 0\n'), 'definition_list_item' : ('.TP', ''), #field_list #field 'field_name' : ('.TP\n.B ', '\n'), 'field_body' : ('', '.RE\n'), 'literal' : ('\\fB', '\\fP'), 'literal_block' : ('\n.nf\n', '\n.fi\n'),
a7d3bf46a7f850660521f8e2a0dee06c5bf19833 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1278/a7d3bf46a7f850660521f8e2a0dee06c5bf19833/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 328, 710, 273, 1947, 18, 4923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 328, 710, 273, 1947, 18, 4923, ...
self.env.create_attachment(self.db(), 'ticket', str(id), attachment, description,
attachment.filename = attachment.filename.encode('utf-8') self.env.create_attachment(self.db(), 'ticket', str(id), attachment, description.encode('utf-8'),
def addAttachment(self, id, attachment, description, author): print 'inserting attachment for ticket %s -- %s' % (id, description) self.env.create_attachment(self.db(), 'ticket', str(id), attachment, description, author, 'unknown')
07933404cd3c6d8d1b0920e0a7194f09369331e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/07933404cd3c6d8d1b0920e0a7194f09369331e1/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6803, 12, 2890, 16, 612, 16, 6042, 16, 2477, 16, 2869, 4672, 1172, 296, 6387, 310, 6042, 364, 9322, 738, 87, 1493, 738, 87, 11, 738, 261, 350, 16, 2477, 13, 6042, 18, 3459, 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, 6803, 12, 2890, 16, 612, 16, 6042, 16, 2477, 16, 2869, 4672, 1172, 296, 6387, 310, 6042, 364, 9322, 738, 87, 1493, 738, 87, 11, 738, 261, 350, 16, 2477, 13, 6042, 18, 3459, 273,...
'default': self.opts.get(opt, None)
'default': self.defaults.get(opt, None)
def getUsage(self, width=None): #If subOptions exists by now, then there was probably an error while #parsing its options. if hasattr(self, 'subOptions'): return self.subOptions.getUsage(width=width)
c97387b7bba3125419a1baeb8669e5a74deb8710 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c97387b7bba3125419a1baeb8669e5a74deb8710/usage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5357, 12, 2890, 16, 1835, 33, 7036, 4672, 468, 2047, 720, 1320, 1704, 635, 2037, 16, 1508, 1915, 1703, 8656, 392, 555, 1323, 468, 24979, 2097, 702, 18, 309, 3859, 12, 2890, 16, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5357, 12, 2890, 16, 1835, 33, 7036, 4672, 468, 2047, 720, 1320, 1704, 635, 2037, 16, 1508, 1915, 1703, 8656, 392, 555, 1323, 468, 24979, 2097, 702, 18, 309, 3859, 12, 2890, 16, 29...
if not XAnchors: XAnchors = numpy.array([a[0] for a in anchorData], numpy.Float) if not YAnchors: YAnchors = numpy.array([a[1] for a in anchorData], numpy.Float)
if XAnchors == None: XAnchors = numpy.array([a[0] for a in anchorData], numpy.float) if YAnchors == None: YAnchors = numpy.array([a[1] for a in anchorData], numpy.float)
def optimize_LDA_Separation(self, attrIndices, anchorData, XAnchors = None, YAnchors = None): dataSize = len(self.graph.rawdata) classCount = len(self.graph.rawdata.domain.classVar.values) validData = self.graph.getValidList(attrIndices) selectedData = numpy.compress(validData, numpy.take(self.graph.noJitteringScaledData, attrIndices, axis = 0), axis = 1)
918bc3de478b76dc69a8dc2791ecd3193eceb7a8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/918bc3de478b76dc69a8dc2791ecd3193eceb7a8/orngLinProj.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 48, 9793, 67, 5097, 4302, 12, 2890, 16, 1604, 8776, 16, 6984, 751, 16, 1139, 979, 15482, 273, 599, 16, 1624, 979, 15482, 273, 599, 4672, 30216, 273, 562, 12, 2890, 18, 4660,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10979, 67, 48, 9793, 67, 5097, 4302, 12, 2890, 16, 1604, 8776, 16, 6984, 751, 16, 1139, 979, 15482, 273, 599, 16, 1624, 979, 15482, 273, 599, 4672, 30216, 273, 562, 12, 2890, 18, 4660,...
self.add_link('alternate', '?format=diff', 'Unified Diff',
self.add_link(req, 'alternate', '?format=diff', 'Unified Diff',
def render(self, req): self.perm.assert_permission (perm.CHANGESET_VIEW)
a58bf75f08d28944f258f5229101a5bf8f73f15a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/a58bf75f08d28944f258f5229101a5bf8f73f15a/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 4672, 365, 18, 12160, 18, 11231, 67, 9827, 261, 12160, 18, 14473, 4043, 67, 12145, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
logging.info("Instance not attached to a device") raise errors.BlockDeviceError("Can't find device")
_ThrowError("drbd%d: can't Attach() in Close()", self._aminor)
def Close(self): """Make the local state secondary.
82463074c0c011a83cf2239affbdb44cb2940801 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/82463074c0c011a83cf2239affbdb44cb2940801/bdev.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3527, 12, 2890, 4672, 3536, 6464, 326, 1191, 919, 9946, 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, 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, 3527, 12, 2890, 4672, 3536, 6464, 326, 1191, 919, 9946, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
and st.st_ctime == oldst.st_ctime):
and st.st_ctime == oldst.st_ctime and st.st_size == oldst.st_size):
def load(self): v = self.defversion try: f = self.opener(self.indexfile) i = f.read(4) f.seek(0) except IOError, inst: if inst.errno != errno.ENOENT: raise i = "" else: try: st = util.fstat(f) except AttributeError, inst: st = None else: oldst = self.indexstat if (oldst and st.st_dev == oldst.st_dev and st.st_ino == oldst.st_ino and st.st_mtime == oldst.st_mtime and st.st_ctime == oldst.st_ctime): return self.indexstat = st if len(i) > 0: v = struct.unpack(versionformat, i)[0] flags = v & ~0xFFFF fmt = v & 0xFFFF if fmt == REVLOGV0: if flags: raise RevlogError(_("index %s unknown flags %#04x for format v0") % (self.indexfile, flags >> 16)) elif fmt == REVLOGNG: if flags & ~REVLOGNGINLINEDATA: raise RevlogError(_("index %s unknown flags %#04x for revlogng") % (self.indexfile, flags >> 16)) else: raise RevlogError(_("index %s unknown format %d") % (self.indexfile, fmt)) self.version = v if v == REVLOGV0: self.indexformat = indexformatv0 shaoffset = v0shaoffset else: self.indexformat = indexformatng shaoffset = ngshaoffset
78ca3e872d2f26b85ef9e5cc44f2632f6b3c6174 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/78ca3e872d2f26b85ef9e5cc44f2632f6b3c6174/revlog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 4672, 331, 273, 365, 18, 536, 1589, 775, 30, 284, 273, 365, 18, 25098, 12, 2890, 18, 1615, 768, 13, 277, 273, 284, 18, 896, 12, 24, 13, 284, 18, 16508, 12, 20, 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, 1262, 12, 2890, 4672, 331, 273, 365, 18, 536, 1589, 775, 30, 284, 273, 365, 18, 25098, 12, 2890, 18, 1615, 768, 13, 277, 273, 284, 18, 896, 12, 24, 13, 284, 18, 16508, 12, 20, 13, ...
if request.method == 'POST': if(not id): form = StateForm(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: state = State.objects.get(id=id) form = StateForm(request.POST, instance = state) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
if request.method == 'POST': if(not id): form = StateForm(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: state = State.objects.get(id=id) form = StateForm(request.POST, instance = state) if form.is_valid(): form.save() return HttpResponse("1") else: return HttpResponse("0")
def save_state_offline(request, id): if request.method == 'POST': if(not id): form = StateForm(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: state = State.objects.get(id=id) form = StateForm(request.POST, instance = state) 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, 2019, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 3287, 1204, 12, 2293, 18, 3798, 13, 309, 646, 18, 291...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 2019, 67, 23787, 12, 2293, 16, 612, 4672, 309, 590, 18, 2039, 422, 296, 3798, 4278, 309, 12, 902, 612, 4672, 646, 273, 3287, 1204, 12, 2293, 18, 3798, 13, 309, 646, 18, 291...
uid, word, [], operator='=')
uid, word, [], operator='=', context=context)
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = '' data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue field = fields[i] if (len(field)==len(prefix)+1) and field[len(prefix)].endswith(':id'): res_id = False if line[i]: if fields_def[field[len(prefix)][:-3]]['type']=='many2many': res_id = [] for word in line[i].split(config.get('csv_internal_sep')): if '.' in word: module, xml_id = word.rsplit('.', 1) else: module, xml_id = current_module, word id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id2 = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] if res_id2: res_id.append(res_id2) if len(res_id): res_id = [(6, 0, res_id)] else: if '.' in line[i]: module, xml_id = line[i].rsplit('.', 1) else: module, xml_id = current_module, line[i] id = ir_model_data_obj._get_id(cr, uid, module, xml_id) res_id = ir_model_data_obj.read(cr, uid, [id], ['res_id'])[0]['res_id'] row[field[0][:-3]] = res_id or False continue if (len(field) == len(prefix)+1) and \ len(field[len(prefix)].split(':lang=')) == 2: f, lang = field[len(prefix)].split(':lang=') translate.setdefault(lang, {})[f]=line[i] or False continue if (len(field) == len(prefix)+1) and \ (prefix == field[0:len(prefix)]): if field[len(prefix)] == "id": # XML ID db_id = False is_xml_id = data_id = line[i] d = data_id.split('.') module = len(d)>1 and d[0] or '' name = len(d)>1 and d[1] or d[0] data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('name','=',name)]) if len(data_ids): d = ir_model_data_obj.read(cr, uid, data_ids, ['res_id'])[0] db_id = d['res_id'] if is_db_id and not db_id: data_ids = ir_model_data_obj.search(cr, uid, [('module','=',module),('model','=',model_name),('res_id','=',is_db_id)]) if not len(data_ids): ir_model_data_obj.create(cr, uid, {'module':module, 'model':model_name, 'name':name, 'res_id':is_db_id}) db_id = is_db_id if is_db_id and int(db_id) != int(is_db_id): warning += ("Id is not the same than existing one: " + str(is_db_id) + " !\n") logger.notifyChannel("import", netsvc.LOG_ERROR, "Id is not the same than existing one: " + str(is_db_id) + ' !\n') continue
c309ce273fbb7eb47884ecfe66b5bbadbf6d9cc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/c309ce273fbb7eb47884ecfe66b5bbadbf6d9cc9/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
def appendChild(self, child): self.childNodes.append(child)
def appendChild(self, child): # should we be checking the type of the child? self.childNodes.append(child)
eef50ed66d79b00b89311c49981932bc8ecbb36a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/eef50ed66d79b00b89311c49981932bc8ecbb36a/microdom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5833, 12, 2890, 16, 1151, 4672, 468, 1410, 732, 506, 6728, 326, 618, 434, 326, 1151, 35, 365, 18, 3624, 3205, 18, 6923, 12, 3624, 13, 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, 5833, 12, 2890, 16, 1151, 4672, 468, 1410, 732, 506, 6728, 326, 618, 434, 326, 1151, 35, 365, 18, 3624, 3205, 18, 6923, 12, 3624, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100,...
Iterate through the subsets of the multiset ``self._s``. Note
Iterates through the subsets of the multiset ``self._s``. Note
def iterator(self): """ Iterate through the subsets of the multiset ``self._s``. Note that each subset is represented by a list of its elements rather than a set since we can have multiplicities (no multiset data structure yet in sage).
645d3d05e6b578bd712664e332a1dfc78aee3840 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/645d3d05e6b578bd712664e332a1dfc78aee3840/subset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2775, 12, 2890, 4672, 3536, 3016, 815, 3059, 326, 30760, 434, 326, 22945, 278, 12176, 2890, 6315, 87, 68, 8338, 225, 3609, 716, 1517, 7931, 353, 10584, 635, 279, 666, 434, 2097, 2186, 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, 2775, 12, 2890, 4672, 3536, 3016, 815, 3059, 326, 30760, 434, 326, 22945, 278, 12176, 2890, 6315, 87, 68, 8338, 225, 3609, 716, 1517, 7931, 353, 10584, 635, 279, 666, 434, 2097, 2186, 91...
self.client.server_close()
self.client.server_close(self)
def put_response (self, data, protocol, status, msg, headers): response = "%s %d %s"%(protocol, status, msg) self.client.server_response(self, response, status, headers) self.client.server_content(data) self.client.server_close()
62d4636ce54feef4b9975dd71b99376f23d7ca21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/62d4636ce54feef4b9975dd71b99376f23d7ca21/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 67, 2740, 261, 2890, 16, 501, 16, 1771, 16, 1267, 16, 1234, 16, 1607, 4672, 766, 273, 2213, 87, 738, 72, 738, 87, 6, 17105, 8373, 16, 1267, 16, 1234, 13, 365, 18, 2625, 18, 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, 1378, 67, 2740, 261, 2890, 16, 501, 16, 1771, 16, 1267, 16, 1234, 16, 1607, 4672, 766, 273, 2213, 87, 738, 72, 738, 87, 6, 17105, 8373, 16, 1267, 16, 1234, 13, 365, 18, 2625, 18, 3...
err_type = err.message
err_type = err.args[0]
def _read(self): buf = '' # put in a loop so that we retry on transient errors while True: try: buf = self._ssl.read(self._bufsize) except socket.sslerror as err: err_type = err.message if (err_type == socket.SSL_ERROR_WANT_READ or err_type == socket.SSL_ERROR_WANT_WRITE): continue if (err_type == socket.SSL_ERROR_ZERO_RETURN or err_type == socket.SSL_ERROR_EOF): break raise except socket.error as err: err_type = err.message if err_type == errno.EINTR: continue if err_type == errno.EBADF: # XXX socket was closed? break raise else: break return buf
1d6ba71bcaa05e769688a67865f6a2377c37bff0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/1d6ba71bcaa05e769688a67865f6a2377c37bff0/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 12, 2890, 4672, 1681, 273, 875, 468, 1378, 316, 279, 2798, 1427, 716, 732, 3300, 603, 12315, 1334, 1323, 1053, 30, 775, 30, 1681, 273, 365, 6315, 8157, 18, 896, 12, 2890, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 12, 2890, 4672, 1681, 273, 875, 468, 1378, 316, 279, 2798, 1427, 716, 732, 3300, 603, 12315, 1334, 1323, 1053, 30, 775, 30, 1681, 273, 365, 6315, 8157, 18, 896, 12, 2890, 631...
i = insert_ert(file.body, i, 'Collapsed', ert, file.format + 1)
i = insert_ert(file.body, i, 'Collapsed', ert, file.format - 1)
def convert_frameless_box(file): pos = ['t', 'c', 'b'] inner_pos = ['c', 't', 'b', 's'] i = 0 while 1: i = find_token(file.body, '\\begin_inset Frameless', i) if i == -1: return j = find_end_of_inset(file.body, i) if j == -1: file.warning("Malformed LyX file: Missing '\\end_inset'.") i = i + 1 continue del file.body[i] j = j - 1 # Gather parameters params = {'position':0, 'hor_pos':'c', 'has_inner_box':'1', 'inner_pos':1, 'use_parbox':'0', 'width':'100col%', 'special':'none', 'height':'1in', 'height_special':'totalheight', 'collapsed':'false'} for key in params.keys(): value = replace(get_value(file.body, key, i, j), '"', '') if value != "": if key == 'position': # convert new to old position: 'position "t"' -> 0 value = find_token(pos, value, 0) if value != -1: params[key] = value elif key == 'inner_pos': # convert inner position value = find_token(inner_pos, value, 0) if value != -1: params[key] = value else: params[key] = value j = del_token(file.body, key, i, j) i = i + 1 # Convert to minipage or ERT? # Note that the inner_position and height parameters of a minipage # inset are ignored and not accessible for the user, although they # are present in the file format and correctly read in and written. # Therefore we convert to ERT if they do not have their LaTeX # defaults. These are: # - the value of "position" for "inner_pos" # - "\totalheight" for "height" if (params['use_parbox'] != '0' or params['has_inner_box'] != '1' or params['special'] != 'none' or params['height_special'] != 'totalheight' or len2value(params['height']) != 1.0): # Here we know that this box is not supported in file format 224. # Therefore we need to convert it to ERT. We can't simply convert # the beginning and end of the box to ERT, because the # box inset may contain layouts that are different from the # surrounding layout. After the conversion the contents of the # box inset is on the same level as the surrounding text, and # paragraph layouts and align parameters can get mixed up. # A possible solution for this problem: # Convert the box to a minipage and redefine the minipage # environment in ERT so that the original box is simulated. # For minipages we could do this in a way that the width and # position can still be set from LyX, but this did not work well. # This is not possible for parboxes either, so we convert the # original box to ERT, put the minipage inset inside the box # and redefine the minipage environment to be empty. # Commands that are independant of a particular box can go to # the preamble. # We need to define lyxtolyxrealminipage with 3 optional # arguments although LyX 1.3 uses only the first one. # Otherwise we will get LaTeX errors if this document is # converted to format 225 or above again (LyX 1.4 uses all # optional arguments). add_to_preamble(file, ['% Commands inserted by lyx2lyx for frameless boxes', '% Save the original minipage environment', '\\let\\lyxtolyxrealminipage\\minipage', '\\let\\endlyxtolyxrealminipage\\endminipage', '% Define an empty lyxtolyximinipage environment', '% with 3 optional arguments', '\\newenvironment{lyxtolyxiiiminipage}[4]{}{}', '\\newenvironment{lyxtolyxiiminipage}[2][\\lyxtolyxargi]%', ' {\\begin{lyxtolyxiiiminipage}{\\lyxtolyxargi}{\\lyxtolyxargii}{#1}{#2}}%', ' {\\end{lyxtolyxiiiminipage}}', '\\newenvironment{lyxtolyximinipage}[1][\\totalheight]%', ' {\\def\\lyxtolyxargii{{#1}}\\begin{lyxtolyxiiminipage}}%', ' {\\end{lyxtolyxiiminipage}}', '\\newenvironment{lyxtolyxminipage}[1][c]%', ' {\\def\\lyxtolyxargi{{#1}}\\begin{lyxtolyximinipage}}', ' {\\end{lyxtolyximinipage}}']) if params['use_parbox'] != '0': ert = '\\parbox' else: ert = '\\begin{lyxtolyxrealminipage}' # convert optional arguments only if not latex default if (pos[params['position']] != 'c' or inner_pos[params['inner_pos']] != pos[params['position']] or params['height_special'] != 'totalheight' or len2value(params['height']) != 1.0): ert = ert + '[' + pos[params['position']] + ']' if (inner_pos[params['inner_pos']] != pos[params['position']] or params['height_special'] != 'totalheight' or len2value(params['height']) != 1.0): ert = ert + '[' + convert_len(params['height'], params['height_special']) + ']' if inner_pos[params['inner_pos']] != pos[params['position']]: ert = ert + '[' + inner_pos[params['inner_pos']] + ']' ert = ert + '{' + convert_len(params['width'], params['special']) + '}' if params['use_parbox'] != '0': ert = ert + '{' ert = ert + '\\let\\minipage\\lyxtolyxminipage%\n' ert = ert + '\\let\\endminipage\\endlyxtolyxminipage%\n' old_i = i i = insert_ert(file.body, i, 'Collapsed', ert, file.format + 1) j = j + i - old_i - 1 file.body[i:i] = ['\\begin_inset Minipage', 'position %d' % params['position'], 'inner_position 1', 'height "1in"', 'width "' + params['width'] + '"', 'collapsed ' + params['collapsed']] i = i + 6 j = j + 6 # Restore the original minipage environment since we may have # minipages inside this box. # Start a new paragraph because the following may be nonstandard file.body[i:i] = ['\\layout Standard', '', ''] i = i + 2 j = j + 3 ert = '\\let\\minipage\\lyxtolyxrealminipage%\n' ert = ert + '\\let\\endminipage\\lyxtolyxrealendminipage%' old_i = i i = insert_ert(file.body, i, 'Collapsed', ert, file.format + 1) j = j + i - old_i - 1 # Redefine the minipage end before the inset end. # Start a new paragraph because the previous may be nonstandard file.body[j:j] = ['\\layout Standard', '', ''] j = j + 2 ert = '\\let\\endminipage\\endlyxtolyxminipage' j = insert_ert(file.body, j, 'Collapsed', ert, file.format + 1) j = j + 1 file.body.insert(j, '') j = j + 1 # LyX writes '%\n' after each box. Therefore we need to end our # ERT with '%\n', too, since this may swallow a following space. if params['use_parbox'] != '0': ert = '}%\n' else: ert = '\\end{lyxtolyxrealminipage}%\n' j = insert_ert(file.body, j, 'Collapsed', ert, file.format + 1) # We don't need to restore the original minipage after the inset # end because the scope of the redefinition is the original box. else: # Convert to minipage file.body[i:i] = ['\\begin_inset Minipage', 'position %d' % params['position'], 'inner_position %d' % params['inner_pos'], 'height "' + params['height'] + '"', 'width "' + params['width'] + '"', 'collapsed ' + params['collapsed']] i = i + 6
a9bfd2b130721928fceba4476331d6a3ccfe7b33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7514/a9bfd2b130721928fceba4476331d6a3ccfe7b33/lyx_1_4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 74, 1940, 12617, 67, 2147, 12, 768, 4672, 949, 273, 10228, 88, 2187, 296, 71, 2187, 296, 70, 3546, 3443, 67, 917, 273, 10228, 71, 2187, 296, 88, 2187, 296, 70, 2187, 296, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 74, 1940, 12617, 67, 2147, 12, 768, 4672, 949, 273, 10228, 88, 2187, 296, 71, 2187, 296, 70, 3546, 3443, 67, 917, 273, 10228, 71, 2187, 296, 88, 2187, 296, 70, 2187, 296, 8...
except: if self.__LOG: self.__LOG = 0 print 'Cannot use logarithmic scale 1' r.grid(nx=10, ny=40) r.plot(wlist, type='n', main='Worsts optima evolution', xlab='Test index', ylab='Optima value') r.lines(wlist) r.points(wlist, bg ='white', pch = 21) r.grid(nx=10, ny=40) r.plot(mlist, type='n', main='Median optima evolution', xlab='Test index', ylab='Optima value') r.lines(mlist) r.points(mlist, bg ='white', pch = 21) r.grid(nx=10, ny=40) r.matplot(r.cbind(olist, mlist, wlist), type='n', main='Optima evolution: worst, median, and best', xlab='Test index', ylab='Value')
def __plot_3(self): """ Plot the graph of optimas' values, to finally have one Point for each Test, we present 3 selections : - best optimum - worst optimum - median optimum value""" fileName = os.path.join(self.__dir, 'graph_optima.ps') r.postscript(fileName, paper='letter') # make best optima list (minima) olist = [(min([p.value for p in points])) for points in self.__optimas ] # make worst optima list (maxima) wlist = [(max([p.value for p in points])) for points in self.__optimas ] # make media optima list (sort and take (len/2)'s index value) [ points.sort() for points in self.__optimas ] # all sublist should have the same length, that is NB_RUN length = len(self.__optimas[0]) medianIndex = length/2 # integer division, ok with first index = zero mlist = [ points[medianIndex].value for points in self.__optimas]
9d772658899621fec0b2e9d01d95c13375e1f370 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2996/9d772658899621fec0b2e9d01d95c13375e1f370/ometahstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4032, 67, 23, 12, 2890, 4672, 3536, 15211, 326, 2667, 434, 5213, 345, 11, 924, 16, 358, 3095, 1240, 1245, 4686, 364, 1517, 7766, 16, 732, 3430, 890, 21738, 294, 300, 3796, 2153, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4032, 67, 23, 12, 2890, 4672, 3536, 15211, 326, 2667, 434, 5213, 345, 11, 924, 16, 358, 3095, 1240, 1245, 4686, 364, 1517, 7766, 16, 732, 3430, 890, 21738, 294, 300, 3796, 2153, ...
loopaddr = mm_cfg.MAILMAN_SITE_LIST + '-loop' loopmbox = os.path.join(mm_cfg.DATA_DIR, 'owner-bounces.mbox') print >> fp, ' print >> fp, '%s: %s' % (loopaddr, loopmbox)
print >> fp, ' print >> fp, '%s: %s' % (Utils.ParseEmail(loopaddr)[0], loopmbox)
def addlist(mlist, db, fp): listname = mlist.internal_name() fieldsz = len(listname) + len('-request') # Seek to the end of the file, but if it's empty write the standard # disclaimer, and the loop catch address. fp.seek(0, 2) if not fp.tell(): print >> fp, """\
0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/0f74c78c0fe989ebf5c2a1c7fe6b1a538f381ac5/Postfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1098, 12, 781, 376, 16, 1319, 16, 4253, 4672, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 1466, 94, 273, 562, 12, 1098, 529, 13, 397, 562, 2668, 17, 2293, 6134, 468, 1536...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1098, 12, 781, 376, 16, 1319, 16, 4253, 4672, 666, 529, 273, 312, 1098, 18, 7236, 67, 529, 1435, 1466, 94, 273, 562, 12, 1098, 529, 13, 397, 562, 2668, 17, 2293, 6134, 468, 1536...
""" Given a stresscalc object (stress), calculate the fits between that stress and the lineament, at a number of backrotations (nb) """ for b in linspace(0,pi,num=nb): self.fits.append(lin.lonshift(b).stresscomp(stress))
""" Given a stresscalc object (stress), calculate the fits between that stress and the lineament, at a number of backrotations (nb) """ for b in linspace(0,pi,num=nb): self.fits.append(lin.lonshift(b).stresscomp(stress))
def calc_fits(stress, nb): #{{{2
5fbbfb8841a8a08c3a5afb94b372c8920b111266 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3464/5fbbfb8841a8a08c3a5afb94b372c8920b111266/lineament.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 18352, 12, 334, 663, 16, 4264, 4672, 3735, 12187, 22, 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, 7029, 67, 18352, 12, 334, 663, 16, 4264, 4672, 3735, 12187, 22, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def stext(self, escape=0):
def stext(self, escape=0, hyperlink=1):
def stext(self, escape=0): ''' Render the value of the property as StructuredText.
c8c3f4ef5b550e6c5029510af5d3e559c95e1b4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/c8c3f4ef5b550e6c5029510af5d3e559c95e1b4b/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 384, 408, 12, 2890, 16, 4114, 33, 20, 16, 9512, 1232, 33, 21, 4672, 9163, 6987, 326, 460, 434, 326, 1272, 487, 7362, 2862, 1528, 18, 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, 384, 408, 12, 2890, 16, 4114, 33, 20, 16, 9512, 1232, 33, 21, 4672, 9163, 6987, 326, 460, 434, 326, 1272, 487, 7362, 2862, 1528, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not _sharedData: _sharedData = SharedData()
if not _sharedData: _sharedData = SharedData()
def getSharedData(): u"""Return a shared instance of SharedData(), creating one if neccessary. Truncates if necessary.""" global _sharedData if not _sharedData: _sharedData = SharedData() if getConfig()['global']['maxLogLength'] and len(_sharedData.scanoutput) > getConfig()['global']['maxLogLength']: del _sharedData.scanoutput[:len(_sharedData.scanoutput) - getConfig()['global']['maxLogLength'] ] return _sharedData
87e68aa179ddb5b8355b2b97811bad9b19e23ab2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/87e68aa179ddb5b8355b2b97811bad9b19e23ab2/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23427, 751, 13332, 582, 8395, 990, 279, 5116, 791, 434, 10314, 751, 9334, 4979, 1245, 309, 290, 557, 614, 814, 18, 22228, 815, 309, 4573, 12123, 2552, 389, 11574, 751, 309, 486, 389, 115...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23427, 751, 13332, 582, 8395, 990, 279, 5116, 791, 434, 10314, 751, 9334, 4979, 1245, 309, 290, 557, 614, 814, 18, 22228, 815, 309, 4573, 12123, 2552, 389, 11574, 751, 309, 486, 389, 115...
print >>gv.out, ' return Py_None;'
print >>gv.out, ' return __to_py(self->__ss_object->%s);' % gv.cpp_name(var.name)
print >>gv.out, 'typedef struct {'
eca16fba8f1425ac7e6039d8df15440472b0fa5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6661/eca16fba8f1425ac7e6039d8df15440472b0fa5b/extmod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1172, 1671, 75, 90, 18, 659, 16, 296, 723, 536, 1958, 13666, 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, 1172, 1671, 75, 90, 18, 659, 16, 296, 723, 536, 1958, 13666, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
text = self.feed.createTextNode(unicode(nodeText))
text = self.feed.createTextNode(unicodeC(nodeText))
def makeTextNode(self, nodeName, nodeText, nodeAttributes=()): """returns an xml text element node, with input being the name of the node, text, and optionally node attributes as a sequence of tuple pairs (attributeName, attributeValue) """ node = self.feed.createElement(nodeName) text = self.feed.createTextNode(unicode(nodeText)) node.appendChild(text) if nodeAttributes: for i in ( node.setAttribute(attribute, value) for attribute, value in nodeAttributes ): pass return node
15efa811c3a3c7e375db44557ec2cc39fdd58d98 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1664/15efa811c3a3c7e375db44557ec2cc39fdd58d98/rssdler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 17299, 12, 2890, 16, 7553, 16, 756, 1528, 16, 756, 2498, 33, 1435, 4672, 3536, 6154, 392, 2025, 977, 930, 756, 16, 598, 810, 3832, 326, 508, 434, 326, 756, 16, 977, 16, 471, 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, 1221, 17299, 12, 2890, 16, 7553, 16, 756, 1528, 16, 756, 2498, 33, 1435, 4672, 3536, 6154, 392, 2025, 977, 930, 756, 16, 598, 810, 3832, 326, 508, 434, 326, 756, 16, 977, 16, 471, 87...
note("loaded commit %s" % (self.command.mark or self.command.ref,)) def escape_commit_message(self, msg):
def _escape_commit_message(self, message): """Replace xml-incompatible control characters."""
def post_process_files(self): """Save the revision.""" if self.verbose: note("applied inventory delta ...") for entry in self.inv_delta: note(" %r" % (entry,)) self.inventory.apply_delta(self.inv_delta) self.cache_mgr.inventories[self.command.ref] = self.inventory if self.verbose: note("creating inventory ...") for entry in self.inventory: note(" %r" % (entry,))
b5f8fae83e6efdbfa9ab887eec72707bb079dd2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8703/b5f8fae83e6efdbfa9ab887eec72707bb079dd2b/generic_processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 67, 2567, 67, 2354, 12, 2890, 4672, 3536, 4755, 326, 6350, 12123, 309, 365, 18, 11369, 30, 4721, 2932, 438, 3110, 13086, 3622, 1372, 7923, 364, 1241, 316, 365, 18, 5768, 67, 9878, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1603, 67, 2567, 67, 2354, 12, 2890, 4672, 3536, 4755, 326, 6350, 12123, 309, 365, 18, 11369, 30, 4721, 2932, 438, 3110, 13086, 3622, 1372, 7923, 364, 1241, 316, 365, 18, 5768, 67, 9878, ...
packageName = self.packageInfo["Title"] rootFolder = packageName + ".pkg" contFolder = join(rootFolder, "Contents") resourceFolder = join(contFolder, "Resources") os.mkdir(rootFolder)
contFolder = join(self.PackageRootFolder, "Contents") self.packageResourceFolder = join(contFolder, "Resources") os.mkdir(self.PackageRootFolder)
def _makeFolders(self): "Create package folder structure."
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, 389, 6540, 14885, 12, 2890, 4672, 315, 1684, 2181, 3009, 3695, 1199, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 14885, 12, 2890, 4672, 315, 1684, 2181, 3009, 3695, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
readsize = min(100, size) while True: if size == 0: return "".join(bufs)
while size != 0:
def readline(self, size=-1): if size < 0: size = sys.maxint bufs = [] readsize = min(100, size) # Read from the file in small chunks while True: if size == 0: return "".join(bufs) # Return resulting line
cbb40392b5a44908c95859921bd9148e4bbc99c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cbb40392b5a44908c95859921bd9148e4bbc99c3/gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12023, 12, 2890, 16, 963, 29711, 21, 4672, 309, 963, 411, 374, 30, 963, 273, 2589, 18, 1896, 474, 1681, 87, 273, 5378, 855, 1467, 273, 1131, 12, 6625, 16, 963, 13, 565, 468, 2720, 62...