rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
def get_price_uom(self, cursor, user, ids, name, arg, context=None):
def get_price_uom(self, cursor, user, ids, name, context=None):
def get_price_uom(self, cursor, user, ids, name, arg, context=None): product_uom_obj = self.pool.get('product.uom') res = {} if context is None: context = {} field = name[:-4] if context.get('uom'): to_uom = self.pool.get('product.uom').browse( cursor, user, context['uom'], context=context) for product in self.browse(cursor, user, ids, context=context): res[product.id] = product_uom_obj.compute_price( cursor, user, product.default_uom, product[field], to_uom, context=context) else: for product in self.browse(cursor, user, ids, context=context): res[product.id] = product[field] return res
8e516dd1fcdc0e958e67fc8dbf8995b1b5702886 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9285/8e516dd1fcdc0e958e67fc8dbf8995b1b5702886/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8694, 67, 89, 362, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 819, 33, 7036, 4672, 3017, 67, 89, 362, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 89, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8694, 67, 89, 362, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 819, 33, 7036, 4672, 3017, 67, 89, 362, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 5896, 18, 89, ...
'References':"%s" % (message_id)
x_headers['References'] = "%s" % (message_id)
def action_send(self, cr, uid, ids, context=None): """ This sends an email to ALL the addresses of the selected partners. """
f6b5858e5c28f9c375a2beab229becadbdea2b68 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/f6b5858e5c28f9c375a2beab229becadbdea2b68/crm_send_email.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 4661, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1220, 9573, 392, 2699, 358, 8061, 326, 6138, 434, 326, 3170, 1087, 9646, 18, 3536, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 4661, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 3536, 1220, 9573, 392, 2699, 358, 8061, 326, 6138, 434, 326, 3170, 1087, 9646, 18, 3536, 2, -100, -100,...
'set my own avatar on this connection')
'set my own avatar on this connection' % conn.object_path)
def _set_self_avatar(self, tp): conn = tp.get_connection() icon_data = self._icon
2b4b443ea2e82ac77289f8d77723d782d62e7a6b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/2b4b443ea2e82ac77289f8d77723d782d62e7a6b/buddy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 2890, 67, 19660, 12, 2890, 16, 8071, 4672, 1487, 273, 8071, 18, 588, 67, 4071, 1435, 4126, 67, 892, 273, 365, 6315, 3950, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 542, 67, 2890, 67, 19660, 12, 2890, 16, 8071, 4672, 1487, 273, 8071, 18, 588, 67, 4071, 1435, 4126, 67, 892, 273, 365, 6315, 3950, 2, -100, -100, -100, -100, -100, -100, -100, -10...
v='(dp'+id+'\012' x=0 while x<len(D): v=v+D[x]+'s' x=x+1 return v def save_item(self, tag, data): v='' for x in data[2:]: v=v+x return v def save_pickle(self, tag, data): v=data[2]+'.'
v=save_put(self, '(d', data[1]) if D: v=v+string.join(D,'s')+'s'
def save_dict(self, tag, data): binary=self.binary D=data[2:] a=data[1] id=a['id'] prefix=string.rfind(id,'.') if prefix>=0: id=id[prefix+1:] if binary: id=string.atoi(id) s=mdumps(id)[1:] if (id < 256): id=s[0] put='q' else: id=s put='r' v='}'+put+id if len(D)>0: v=v+'(' x=0 while x < len(D): v=v+D[x] x=x+1 if len(D)>0: v=v+'u' else: v='(dp'+id+'\012' x=0 while x<len(D): v=v+D[x]+'s' x=x+1 return v
b3044d78409b750569423711b47a47edfd53dde3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b3044d78409b750569423711b47a47edfd53dde3/ppml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 1576, 12, 2890, 16, 1047, 16, 501, 4672, 3112, 33, 2890, 18, 8578, 463, 33, 892, 63, 22, 26894, 279, 33, 892, 63, 21, 65, 612, 33, 69, 3292, 350, 3546, 1633, 33, 1080, 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, 1923, 67, 1576, 12, 2890, 16, 1047, 16, 501, 4672, 3112, 33, 2890, 18, 8578, 463, 33, 892, 63, 22, 26894, 279, 33, 892, 63, 21, 65, 612, 33, 69, 3292, 350, 3546, 1633, 33, 1080, 18...
moved_ref = {}
ref_defined = {}
def fixReferenceNodes(self, node): ref_nodes = node.getChildNodesByClass(Reference) name2children = {}
09312d800951f5fded0c333b3c44d7a31fd20211 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12391/09312d800951f5fded0c333b3c44d7a31fd20211/treecleaner.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 2404, 3205, 12, 2890, 16, 756, 4672, 225, 1278, 67, 4690, 273, 756, 18, 588, 22460, 30032, 12, 2404, 13, 225, 508, 22, 5906, 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, 0, 0, 0, 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, 2917, 2404, 3205, 12, 2890, 16, 756, 4672, 225, 1278, 67, 4690, 273, 756, 18, 588, 22460, 30032, 12, 2404, 13, 225, 508, 22, 5906, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -10...
return self.__errorReport(str(x),'Expected integer for number of records')
return self.__errorReport('Expected integer for number of records')
def getLoggerSummary(self,numberOfRecords=10,printOutput=False): """Under Development, retrieve logging informations. """ if not type(numberOfRecords)==type(1): return self.__errorReport(str(x),'Expected integer for number of records') logger = LoggerClient() result = logger.getGroupedMessages(groupField='FixedTextString',orderList=[['recordCount','DESC']],maxRecords=numberOfRecords) if printOutput: print self.pPrint.pformat(result) return result
416613da37828f5503882a8d79f99a25ea40298e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/416613da37828f5503882a8d79f99a25ea40298e/Dirac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7156, 4733, 12, 2890, 16, 2696, 951, 6499, 33, 2163, 16, 1188, 1447, 33, 8381, 4672, 3536, 14655, 1505, 11284, 16, 4614, 2907, 26978, 18, 3536, 309, 486, 618, 12, 2696, 951, 6499, 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, 7156, 4733, 12, 2890, 16, 2696, 951, 6499, 33, 2163, 16, 1188, 1447, 33, 8381, 4672, 3536, 14655, 1505, 11284, 16, 4614, 2907, 26978, 18, 3536, 309, 486, 618, 12, 2696, 951, 6499, 13, ...
Again, but with a custom isprivate function allowing _f: >>> t = Tester(globs={}, verbose=0, isprivate=lambda x,y: 0)
Again, but with the default isprivate function allowing _f: >>> t = Tester(globs={}, verbose=0)
... def bar(self):
d5be5ad4f89b7e2cb87e93ca13241a39b08f8d53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d5be5ad4f89b7e2cb87e93ca13241a39b08f8d53/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 565, 1652, 4653, 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, 1372, 565, 1652, 4653, 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...
The given path must be absolute and path separators ('/' or '\\') must be set correctly. This is often easiest done using built-in variables '${CURDIR}' and '${/}' as shown in the examples below. | Import Variables | ${CURDIR}${/}variables.py | | | | Import Variables | ${CURDIR}${/}..${/}vars${/}env.py | arg1 | arg2 | """ NAMESPACES.current.import_variables(path, args, overwrite=True)
The given path must be absolute. Starting from 2.0.2 version, forward slashes can be used as path separator regardless the operating system, but on earlier versions ${/} variable must be used instead. Examples: | Import Variables | ${CURDIR}/variables.py | | | | Import Variables | ${CURDIR}/../vars/env.py | arg1 | arg2 | """ NAMESPACES.current.import_variables(path.replace('/', os.sep), args, overwrite=True)
def import_variables(self, path, *args): """Imports a variable file with the given path and optional arguments. Variables imported with this keyword are set into the test suite scope similarly when importing them in the Setting table using the Variables setting. These variables override possible existing variables with the same names and this functionality can thus be used to import new variables, e.g. for each test in a test suite. The given path must be absolute and path separators ('/' or '\\') must be set correctly. This is often easiest done using built-in variables '${CURDIR}' and '${/}' as shown in the examples below. | Import Variables | ${CURDIR}${/}variables.py | | | | Import Variables | ${CURDIR}${/}..${/}vars${/}env.py | arg1 | arg2 | """ NAMESPACES.current.import_variables(path, args, overwrite=True)
da7e8376d7281ad08ceebcb876a57e6fcaebf955 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6988/da7e8376d7281ad08ceebcb876a57e6fcaebf955/BuiltIn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 7528, 12, 2890, 16, 589, 16, 380, 1968, 4672, 3536, 13347, 279, 2190, 585, 598, 326, 864, 589, 471, 3129, 1775, 18, 225, 23536, 9101, 598, 333, 4932, 854, 444, 1368, 326, 184...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 7528, 12, 2890, 16, 589, 16, 380, 1968, 4672, 3536, 13347, 279, 2190, 585, 598, 326, 864, 589, 471, 3129, 1775, 18, 225, 23536, 9101, 598, 333, 4932, 854, 444, 1368, 326, 184...
parse_exit(result)
signal.alarm(0)
def sigalarm_handler(signum, frame): print '%s timed out after %d seconds' % (sys.argv[0], options.timeout) sys.exit(CRITICAL)
bcc8d42c7ab9447ba44b394a2e5e59078c4944b2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4345/bcc8d42c7ab9447ba44b394a2e5e59078c4944b2/check_dell_warranty.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 20681, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 1172, 1995, 87, 7491, 596, 1839, 738, 72, 3974, 11, 738, 261, 9499, 18, 19485, 63, 20, 6487, 702, 18, 4538, 13, 2589, 18, 8593, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3553, 20681, 67, 4176, 12, 2977, 379, 16, 2623, 4672, 1172, 1995, 87, 7491, 596, 1839, 738, 72, 3974, 11, 738, 261, 9499, 18, 19485, 63, 20, 6487, 702, 18, 4538, 13, 2589, 18, 8593, ...
if Properties.JOB_SHARING not in CS.getPropertiesForGroup( group ):
if Properties.JOB_SHARING not in CS.getPropertiesForGroup( tqMatchDict[ 'OwnerGroup' ] ):
def __generateTQMatchSQL( self, tqMatchDict, numQueuesToGet = 1 ): """ Generate the SQL needed to match a task queue """ sqlCondList = [] sqlTables = [ "`tq_TaskQueues`" ] if 'OwnerDN' in tqMatchDict: if 'OwnerGroup' in tqMatchDict: if Properties.JOB_SHARING not in CS.getPropertiesForGroup( group ): sqlCondList.append( "`tq_TaskQueues`.OwnerDN = '%s'" % tqMatchDict[ 'OwnerDN' ] ) else: sqlCondList.append( "`tq_TaskQueues`.OwnerDN = '%s'" % tqMatchDict[ 'OwnerDN' ] ) if 'OwnerGroup' in tqMatchDict: sqlCondList.append( "`tq_TaskQueues`.OwnerGroup = '%s'" % tqMatchDict[ 'OwnerGroup' ] ) #Type of pilot conditions for field in ( 'CPUTime', 'Setup' ): if field in tqMatchDict: if field in ( 'CPUTime' ): sqlCondList.append( "`tq_TaskQueues`.%s <= %s" % ( field, tqMatchDict[ field ] ) ) else: sqlCondList.append( "`tq_TaskQueues`.%s = '%s'" % ( field, tqMatchDict[ field ] ) ) #Match multi value fields for field in self.__multiValueMatchFields: if field in tqMatchDict: fieldValue = tqMatchDict[ field ].strip() if not fieldValue: continue #It has to be %ss , with an 's' at the end because the columns names # are plural and match options are singular tableName = '`tq_TQTo%ss`' % field # sqlTables.append( tableName ) sqlMultiCondList = [] if field != 'GridCE' or 'Site' in tqMatchDict: # Jobs for masked sites can be matched if they specified a GridCE # Site is removed from tqMatchDict if the Site is mask. In this case we want # that the GridCE matches explicetly so the COUNT can not be 0 (that means # not specified for the corresponding jobs. sqlMultiCondList.append( "( SELECT COUNT(%s.Value) FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId ) = 0 " % (tableName,tableName,tableName ) ) sqlMultiCondList.append( "'%s' in ( SELECT %s.Value FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId )" % ( fieldValue, tableName, tableName, tableName ) ) sqlCondList.append( "( %s )" % " OR ".join(sqlMultiCondList) ) if field == 'Site': bannedTable = '`tq_TQToBannedSites`' sqlCondList.append( "'%s' not in ( SELECT %s.Value FROM %s WHERE %s.TQId = `tq_TaskQueues`.TQId )" % ( fieldValue, bannedTable, bannedTable, bannedTable ) )
606c23ff8634d9ec6490c35c17a8f7000e9e45a5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/606c23ff8634d9ec6490c35c17a8f7000e9e45a5/TaskQueueDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7163, 56, 53, 2060, 3997, 12, 365, 16, 20061, 2060, 5014, 16, 818, 17428, 774, 967, 273, 404, 262, 30, 3536, 6654, 326, 3063, 3577, 358, 845, 279, 1562, 2389, 3536, 1847, 12441, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7163, 56, 53, 2060, 3997, 12, 365, 16, 20061, 2060, 5014, 16, 818, 17428, 774, 967, 273, 404, 262, 30, 3536, 6654, 326, 3063, 3577, 358, 845, 279, 1562, 2389, 3536, 1847, 12441, ...
issuer = reference() booth = reference()
issuer = reference(allowNone=False) booth = reference(allowNone=False)
def createResource(self): return FreeSignerUpper(self)
a3df2558490e15e43c0af80c77553c298d422439 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6980/a3df2558490e15e43c0af80c77553c298d422439/signup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24317, 12, 2890, 4672, 327, 15217, 15647, 5988, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 24317, 12, 2890, 4672, 327, 15217, 15647, 5988, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
'badext': "File name must have '$extention' extension",
'badext': "File name must have '$extention' extention",
def _validate(self, value): value = super(PasswordField, self)._validate(value) return value or twc.EmptyField
97e57b5bd76c4e72bdcd391fb1a7e4e47df68b6e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11476/97e57b5bd76c4e72bdcd391fb1a7e4e47df68b6e/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 460, 4672, 460, 273, 2240, 12, 3913, 974, 16, 365, 2934, 67, 5662, 12, 1132, 13, 327, 460, 578, 2339, 71, 18, 1921, 974, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 12, 2890, 16, 460, 4672, 460, 273, 2240, 12, 3913, 974, 16, 365, 2934, 67, 5662, 12, 1132, 13, 327, 460, 578, 2339, 71, 18, 1921, 974, 2, -100, -100, -100, -100, -100, -10...
pass
items = [] for i in range(self.GetItemCount()): items.append(self.GetItemText(i,0)) items.append(self.GetItemText(i,1)) win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "BreakpointList", "\t".join(items)) win32ui.WriteProfileVal("Debugger Windows\\" + self.title, "Visible", self.IsWindowVisible()) return 1
def SaveState(self): pass
f425433016427c29ff17026c13961c7210732ab1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/677/f425433016427c29ff17026c13961c7210732ab1/debugger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 1119, 12, 2890, 4672, 1342, 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, 7074, 1119, 12, 2890, 4672, 1342, 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, -...
return (ErlList(elements), remainingData[1:])
return (ErlList(elements), remainingData[1:])
def _UnpackOneTerm(data): dataLen = len(data) if len(data) == 0: return (None, data) data0 = ord(data[0]) if data0 == MAGIC_SMALL_INTEGER: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) return (ErlNumber(n), data[2:]) elif data0 == MAGIC_INTEGER: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) return (ErlNumber(n), data[5:]) elif data0 == MAGIC_FLOAT: if dataLen < 32: return (None, data) floatData = data[1:32] try: nullIndex = string.index(floatData, chr(0)) floatStr = floatData[0:nullIndex] except ValueError: floatStr = floatData f = string.atof(floatStr) return (ErlNumber(f), data[32:]) elif data0 == MAGIC_ATOM: if dataLen < 3: return (None, data) atomLen = _ReadInt2(data[1:3]) if dataLen < 3 + atomLen: return (None, data) atomText = data[3:3 + atomLen] return (ErlAtom(atomText), data[3 + atomLen:]) elif data0 == MAGIC_REFERENCE: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlRef(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PORT: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 5: return (None, data) id = _ReadId(remainingData[0:4]) creation = _ReadCreation(remainingData[4]) return (ErlPort(node, id, creation), remainingData[5:]) elif data0 == MAGIC_PID: (node, remainingData) = _UnpackOneTerm(data[1:]) if node == None: return (None, data) if len(remainingData) < 9: return (None, data) id = _ReadId(remainingData[0:4], 15) serial = _ReadInt4(remainingData[4:8]) creation = _ReadCreation(remainingData[8]) return (ErlPid(node, id, serial, creation), remainingData[9:]) elif data0 == MAGIC_SMALL_TUPLE: if dataLen < 2: return (None, data) arity = _ReadInt1(data[1]) (elements, remainingData) = _UnpackTermSeq(arity, data[2:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_LARGE_TUPLE: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlTuple(elements), remainingData) elif data0 == MAGIC_NIL: return (ErlList([]), data[1:]) elif data0 == MAGIC_STRING: if dataLen < 3: return (None, data) strlen = _ReadInt2(data[1:3]) if dataLen < 3 + strlen: return (None, data) s = data[3:3 + strlen] return (ErlString(s), data[3 + strlen:]) elif data0 == MAGIC_LIST: if dataLen < 5: return (None, data) arity = _ReadInt4(data[1:5]) (elements, remainingData) = _UnpackTermSeq(arity, data[5:]) if elements == None: return (None, data) return (ErlList(elements), remainingData[1:]) elif data0 == MAGIC_BINARY: if dataLen < 5: return (None, data) binlen = _ReadInt4(data[1:5]) if dataLen < 5 + binlen: return (None, data) s = data[5:5 + binlen] return (ErlBinary(s), data[5 + binlen:]) elif data0 == MAGIC_SMALL_BIG: if dataLen < 2: return (None, data) n = _ReadInt1(data[1]) if dataLen < 2 + 1 + n: return (None, data) sign = _ReadInt1(data[2]) bignum = 0L for i in range(n): d = _ReadInt1(data[3 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[3 + n:]) elif data0 == MAGIC_LARGE_BIG: if dataLen < 5: return (None, data) n = _ReadInt4(data[1:5]) if dataLen < 5 + 1 + n: return (None, data) sign = _ReadInt1(data[5]) bignum = 0L for i in range(n): d = _ReadInt1(data[6 + n - i - 1]) bignum = bignum * 256L + long(d) if sign: bignum = bignum * -1L return (ErlNumber(bignum), data[6 + n:]) elif data0 == MAGIC_NEW_CACHE: if dataLen < 4: return (None, data) index = _ReadInt1(data[1]) atomLen = _ReadInt2(data[2:4]) if dataLen < 4 + atomLen: return (None, data) atomText = data[4:4 + atomLen] return (ErlAtom(atomText, cache=index), data[4 + atomLen:]) elif data0 == MAGIC_CACHED_ATOM: if dataLen < 2: return (None, data) index = _ReadInt1(data[1]) return (ErlAtom(None, cache=index), data[2:]) elif data0 == MAGIC_NEW_REFERENCE: if dataLen < 3: return (None, data) idLen = _ReadInt2(data[1:3]) (node, remainingData) = _UnpackOneTerm(data[3:]) if node == None: return (None, data) nprim = 4 * idLen if len(remainingData) < 1 + nprim: return (None, data) creation = _ReadCreation(remainingData[0]) remainingData = remainingData[1:] id0 = _ReadId(remainingData[0:4]) id = [id0] remainingData = remainingData[4:] for i in idLen: i = _ReadInt4(remainingData[0:4]) remainingData = remainingData[4:] return (ErlRef(node, creation, id), remainingData) elif data0 == MAGIC_FUN: if dataLen < 5: return (None, data) freevarsLen = _ReadInt4(data[1:5]) (pid, remainingData1) = _UnpackOneTerm(data[5:]) if pid == None: return (None, data) (module, remainingData2) = _UnpackOneTerm(remainingData1) if module == None: return (None, data) (index, remainingData3) = _UnpackOneTerm(remainingData2) if index == None: return (None, data) (uniq, remainingData4) = _UnpackOneTerm(remainingData3) if uniq == None: return (None, data) (freeVars, remainingData5) = _UnpackTermSeq(freevarsLen,remainingData4) if freeVars == None: return (None, data) return (ErlFun(pid, module, index, uniq, freeVars), remainingData5) else: print "Bad tag %s" % `data0` return (None, data)
a3bdf68b0dd0a8fe258354b35efca1d05a1c51fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7565/a3bdf68b0dd0a8fe258354b35efca1d05a1c51fd/erl_term.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 23649, 3335, 4065, 12, 892, 4672, 501, 2891, 273, 562, 12, 892, 13, 225, 309, 562, 12, 892, 13, 422, 374, 30, 327, 261, 7036, 16, 501, 13, 225, 501, 20, 273, 4642, 12, 892, 63...
cty.POINTER(FL_POPUP_ENTRY), STRING],
cty.POINTER(FL_POPUP_ENTRY), STRING],
def fl_insert_nmenu_items(p1, p2, p3): """ fl_insert_nmenu_items(p1, p2, p3) -> popup_entry """ retval = _fl_insert_nmenu_items(p1, p2, p3) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 6387, 67, 82, 5414, 67, 3319, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 6387, 67, 82, 5414, 67, 3319, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 6387, 67, 82, 5414, 67, 3319, 12, 84, 21, 16, 293, 22, 16, 293, 23, 4672, 3536, 1183, 67, 6387, 67, 82, 5414, 67, 3319, 12, 84, 21, 16, 293, 22, 16, 293, 23, 13, 317, ...
lines = '\n'.split(text)
lines = text.split('\n')
def printColorizedInWindows(self, text, targetStream): """ This only works in Python 2.5 or higher. """ if ctypes_found: std_out_handle = ctypes.windll.kernel32.GetStdHandle(-11) # Color tags might be cascaded, e.g. because of transliteration. # Therefore we need this stack. colorStack = [] tagM = True while tagM: tagM = colorTagR.search(text) if tagM: # print the text up to the tag. targetStream.write(text[:tagM.start()].encode(config.console_encoding, 'replace')) newColor = tagM.group('name') if newColor == 'default': if len(colorStack) > 0: colorStack.pop() if len(colorStack) > 0: lastColor = colorStack[-1] else: lastColor = 'default' ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, windowsColors[lastColor]) else: colorStack.append(newColor) # set the new color ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, windowsColors[newColor]) text = text[tagM.end():] # print the rest of the text targetStream.write(text.encode(config.console_encoding, 'replace')) # just to be sure, reset the color ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, windowsColors['default']) else: # ctypes is only available since Python 2.5, and we won't # try to colorize without it. Instead we add *** after the text as a whole # if anything needed to be colorized. lines = '\n'.split(text) for line in lines: line, count = colorTagR.subn('', line) if count > 0: line += '***' line += '\n' targetStream.write(line.encode(config.console_encoding, 'replace'))
0a1b3f8a238446cb54b4cd270b1aac545e9523ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/0a1b3f8a238446cb54b4cd270b1aac545e9523ab/terminal_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2957, 1235, 382, 10399, 12, 2890, 16, 977, 16, 1018, 1228, 4672, 3536, 1220, 1338, 6330, 316, 6600, 576, 18, 25, 578, 10478, 18, 3536, 309, 6983, 67, 7015, 30, 2044, 67, 659, 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, 1172, 2957, 1235, 382, 10399, 12, 2890, 16, 977, 16, 1018, 1228, 4672, 3536, 1220, 1338, 6330, 316, 6600, 576, 18, 25, 578, 10478, 18, 3536, 309, 6983, 67, 7015, 30, 2044, 67, 659, 67,...
print filename
def scan(self, path): """Recursively scan all files within the specified path, creating or updating their cache entries. """ for root, dirs, files in os.walk(path): for name in files: filename = os.path.join(root, name) print filename self.lookup(filename)
fabff75fae929d05168d9e56a6ef34fa6a316c41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/fabff75fae929d05168d9e56a6ef34fa6a316c41/Metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 16, 589, 4672, 3536, 12474, 4135, 777, 1390, 3470, 326, 1269, 589, 16, 4979, 578, 9702, 3675, 1247, 3222, 18, 3536, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 16, 589, 4672, 3536, 12474, 4135, 777, 1390, 3470, 326, 1269, 589, 16, 4979, 578, 9702, 3675, 1247, 3222, 18, 3536, 364, 1365, 16, 7717, 16, 1390, 316, 1140, 18, 11348, ...
j = int(random() * n)
j = _int(random() * n)
def sample(self, population, k, int=int): """Chooses k unique random elements from a population sequence.
c6fad9738f35b8210ade1fea15d91e5fd4881247 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c6fad9738f35b8210ade1fea15d91e5fd4881247/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 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, 0, 0, 0, 0, 0, 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, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
s = s.encode(outcodec)
s = s.encode(outcodec, errors)
def append(self, s, charset=None): """Append a string to the MIME header.
f447e64f559d49e6d7077d36b4c07c4eef258424 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/f447e64f559d49e6d7077d36b4c07c4eef258424/Header.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 12, 2890, 16, 272, 16, 4856, 33, 7036, 4672, 3536, 5736, 279, 533, 358, 326, 13195, 1446, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
as the master) relheight=amount - height of this widget between 0.0 and 1.0
as the master) relheight=amount - height of this widget between 0.0 and 1.0
def place_configure(self, cnf={}, **kw): """Place a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account """ for k in ['in_']: if k in kw: kw[k[:-1]] = kw[k] del kw[k] self.tk.call( ('place', 'configure', self._w) + self._options(cnf, kw))
5b912a16970b62a46efa1c90b9e5e7b0acaf60d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/5b912a16970b62a46efa1c90b9e5e7b0acaf60d5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3166, 67, 14895, 12, 2890, 16, 23118, 28793, 2826, 9987, 4672, 3536, 6029, 279, 3604, 316, 326, 982, 3604, 18, 2672, 487, 702, 30, 316, 33, 7525, 300, 4171, 3632, 358, 1492, 326, 3604, ...
"'\xd5': '&
def _load(self, project): Repository._load(self, project) cget = project.config.get self.EXECUTABLE = cget(self.name, 'darcs-command', 'darcs') init_options = cget(self.name, 'init-options', '') if init_options: self.init_options = tuple(init_options.split(' ')) else: self.init_options = None self.use_look_for_adds = cget(self.name, 'look-for-adds', 'False') self.post_commit_check = cget(self.name, 'post-commit-check', 'False') self.replace_badchars = eval(cget(self.name, 'replace-badchars', "{" "'\xb4': '&#180;'," "'\xc1': '&#193;'," "'\xc9': '&#201;'," "'\xcd': '&#205;'," "'\xd3': '&#211;'," "'\xd6': '&#214;'," "'\xd5': '&#336;'," "'\xda': '&#218;'," "'\xdc': '&#220;'," "'\xdb': '&#368;'," "'\xe1': '&#225;'," "'\xe9': '&#233;'," "'\xed': '&#237;'," "'\xf3': '&#243;'," "'\xf6': '&#246;'," "'\xf5': '&#337;'," "'\xfa': '&#250;'," "'\xfc': '&#252;'," "'\xfb': '&#369;'," "'\xf1': '&#241;'," "'\xdf': '&#223;'," "'\xe5': '&#229;'" "}"))
bdad3b27ea7576b4c81b5836cdb72c061d1c162c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5981/bdad3b27ea7576b4c81b5836cdb72c061d1c162c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1984, 4672, 6281, 6315, 945, 12, 2890, 16, 1984, 13, 276, 588, 273, 1984, 18, 1425, 18, 588, 365, 18, 15271, 1693, 2782, 273, 276, 588, 12, 2890, 18, 529, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 12, 2890, 16, 1984, 4672, 6281, 6315, 945, 12, 2890, 16, 1984, 13, 276, 588, 273, 1984, 18, 1425, 18, 588, 365, 18, 15271, 1693, 2782, 273, 276, 588, 12, 2890, 18, 529, 16,...
if password == u['password']:
if password == str(u['password']):
def check_credentials(login, password, db_name, permission=None): """Verifies credentials for login and password. """ if login: u = users.get(login, None) if u != None: u['name'] = login if db_name == u['database']: if password == u['password']: if (permission == None) or (u['permission'] in permission): return u else: print "permission denied" return False else: print "Incorrect password" return False else: print "No access for that database" return False else: print "Sorry, login: (%s) is not in the database" % (login) return False else: return False
14ec1642854d975dc29bc549e31e012a86a87dff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14271/14ec1642854d975dc29bc549e31e012a86a87dff/auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 11687, 12, 5819, 16, 2201, 16, 1319, 67, 529, 16, 4132, 33, 7036, 4672, 3536, 19802, 4448, 364, 3925, 471, 2201, 18, 225, 3536, 225, 309, 3925, 30, 582, 273, 3677, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 11687, 12, 5819, 16, 2201, 16, 1319, 67, 529, 16, 4132, 33, 7036, 4672, 3536, 19802, 4448, 364, 3925, 471, 2201, 18, 225, 3536, 225, 309, 3925, 30, 582, 273, 3677, 18, 588, ...
opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'],
opcodes = Diff._get_opcodes(['A', 'B b'], ['A', 'B B'],
def test_space_and_case_changes(self): opcodes = diff2._get_opcodes(['A', 'B b'], ['A', 'B B'], ignore_case=0, ignore_space_changes=0) self.assertEqual(('equal', 0, 1, 0, 1), opcodes.next()) self.assertEqual(('replace', 1, 2, 1, 2), opcodes.next())
f0e6a3afeb9f648f246fa50a5aac86386a0128b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/f0e6a3afeb9f648f246fa50a5aac86386a0128b9/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2981, 67, 464, 67, 3593, 67, 6329, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 324, 17337, 10228, 37, 2187, 296, 38, 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, 1842, 67, 2981, 67, 464, 67, 3593, 67, 6329, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 324, 17337, 10228, 37, 2187, 296, 38, 225, ...
''' % { 'weburl': weburl, 'recid': row ['recid'], 'ln': ln,
''' % { 'weburl': weburl, 'recid': recID, 'ln': ln,
def tmpl_detailed_record_statistics(self, recID, ln, citinglist, citationhistory, cociting, downloadsimilarity, downloadhistory, viewsimilarity): """Returns the statistics page of a record
be3065e7f2472be568571e003c15ed067ef57bb8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/be3065e7f2472be568571e003c15ed067ef57bb8/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 72, 6372, 67, 3366, 67, 14438, 12, 2890, 16, 1950, 734, 16, 7211, 16, 276, 305, 310, 1098, 16, 21145, 8189, 16, 276, 504, 305, 310, 16, 4224, 22985, 560, 16, 4224, 8189, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10720, 67, 72, 6372, 67, 3366, 67, 14438, 12, 2890, 16, 1950, 734, 16, 7211, 16, 276, 305, 310, 1098, 16, 21145, 8189, 16, 276, 504, 305, 310, 16, 4224, 22985, 560, 16, 4224, 8189, 1...
Testing bad charent includes:
Testing errors in included file:
def suite(): s = DocutilsTestSupport.ParserTestSuite() s.generateTests(totest) return s
0f6dd539e83565870e60959cfbe85fcfddde1b61 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8194/0f6dd539e83565870e60959cfbe85fcfddde1b61/test_include.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11371, 13332, 272, 273, 3521, 5471, 4709, 6289, 18, 2678, 4709, 13587, 1435, 272, 18, 7163, 14650, 12, 3307, 395, 13, 327, 272, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
party.get('supplier_' + tax.group.code).id)
party['supplier_' + tax.group.code].id)
def on_change_product(self, cursor, user, ids, vals, context=None): party_obj = self.pool.get('relationship.party') product_obj = self.pool.get('product.product') uom_obj = self.pool.get('product.uom') if context is None: context = {} if not vals.get('product'): return {} res = {}
87d7a053c81f2f728bc24622817b2bf16eadecf4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9276/87d7a053c81f2f728bc24622817b2bf16eadecf4/purchase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 18285, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 12873, 18, 21214, 6134, 3017, 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, 603, 67, 3427, 67, 5896, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 18285, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 12873, 18, 21214, 6134, 3017, 6...
Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, b*c]
Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C30 x C64 x C729 generated by [a, b*c]
def __init__(self, ambient, gens, names="f"): """ EXAMPLES: sage: F = AbelianGroup(5,[30,64,729],names = list("abcde")) sage: a,b,c,d,e = F.gens() sage: F.subgroup([a^3,b]) Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a^3, b] sage: F.subgroup([c]) Multiplicative Abelian Group isomorphic to C2 x C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [c] sage: F.subgroup([a,c]) Multiplicative Abelian Group isomorphic to Z x C2 x C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, c] sage: F.subgroup([a,b*c]) Multiplicative Abelian Group isomorphic to Z x Z, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a, b*c] sage: F.subgroup([b*c,d]) Multiplicative Abelian Group isomorphic to Z x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [b*c, d] sage: F.subgroup([a*b,c^6,d],names = list("xyz")) Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: H.<x,y,z> = F.subgroup([a*b, c^6, d]); H Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: G = F.subgroup([a*b,c^6,d],names = list("xyz")) sage: G Multiplicative Abelian Group isomorphic to Z x C5 x C64, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x Z x C2 x C3 x C5 x C64 x C729 generated by [a*b, c^6, d] sage: x,y,z = G.gens() sage: x.order() +Infinity sage: y.order() 5 sage: z.order() 64 sage: A = AbelianGroup(5,[3, 5, 5, 7, 8], names = "abcde") sage: a,b,c,d,e = A.gens() sage: A.subgroup([a,b]) Multiplicative Abelian Group isomorphic to C3 x C5, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b] sage: A.subgroup([a,b,c,d^2,e]) Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b, c, d^2, e] sage: A.subgroup([a,b,c,d^2,e^2]) Multiplicative Abelian Group isomorphic to C3 x C4 x C5 x C5 x C7, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [a, b, c, d^2, e^2] sage: B = A.subgroup([a^3,b,c,d,e^2]); B Multiplicative Abelian Group isomorphic to C4 x C5 x C5 x C7, which is the subgroup of Multiplicative Abelian Group isomorphic to C3 x C5 x C5 x C7 x C8 generated by [b, c, d, e^2] sage: B.invariants() [4, 5, 5, 7] sage: A = AbelianGroup(4,[1009, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B.invariants() [1009, 2003, 3001, 4001] sage: A.order() 24266473210027 sage: B.order() 24266473210027 sage: A = AbelianGroup(4,[1008, 2003, 3001, 4001], names = "abcd") sage: a,b,c,d = A.gens() sage: B = A.subgroup([a^3,b,c,d]) sage: B Multiplicative Abelian Group isomorphic to C3 x C7 x C16 x C2003 x C3001 x C4001, which is the subgroup of Multiplicative Abelian Group isomorphic to C7 x C9 x C16 x C2003 x C3001 x C4001 generated by [a^3, b, c, d] Infinite groups can also be handled: sage: G = AbelianGroup([3,4,0], names = "abc") sage: a,b,c = G.gens() sage: F = G.subgroup([a,b^2,c]); F Multiplicative Abelian Group isomorphic to Z x C3 x C4, which is the subgroup of Multiplicative Abelian Group isomorphic to Z x C3 x C4 generated by [a, b^2, c] sage: F.invariants() [0, 3, 4] sage: F.gens() [a, b^2, c] sage: F.order() +Infinity
ac7b9e1e09a437ce1112b2a6f61db8126e9ee984 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ac7b9e1e09a437ce1112b2a6f61db8126e9ee984/abelian_group.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 63...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13232, 1979, 16, 314, 773, 16, 1257, 1546, 74, 6, 4672, 3536, 225, 5675, 8900, 11386, 30, 272, 410, 30, 478, 273, 9771, 292, 2779, 1114, 12, 25, 16, 63...
def __init__(self,app):
def __init__(self, app):
def __init__(self,app): gtk.Window.__init__(self) self.set_title(_("Layers")) self.set_role("Layers") self.app = app self.connect('delete-event', self.app.hide_window_cb) self.app.kbm.add_window(self) self.set_size_request(300, 300) self.callbacks_active = True
fa08ff4ae584c23e5712c79fef315eae8185c0e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/fa08ff4ae584c23e5712c79fef315eae8185c0e4/layerswindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 595, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 2649, 24899, 2932, 9282, 6, 3719, 365, 18, 542, 67, 4615, 2932, 9282, 7923,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 595, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 67, 2649, 24899, 2932, 9282, 6, 3719, 365, 18, 542, 67, 4615, 2932, 9282, 7923,...
header = self.email_parser.parsestr(data[0][1], headersonly=True) disposition = header.get_params(list(), "content-disposition")
header = self.email_parser.parsestr(data[0], headersonly=True) disposition = header.get_params((), "content-disposition")
def find_payload(self, num, path=()): path = list(path) + [0] while True: path[-1] += 1 path_str = ".".join(map(str, path)) fetch = "(BODY.PEEK[%s.MIME])" % path_str
552eae9ac5529e594a8f99a6ed167158cb41d9fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14361/552eae9ac5529e594a8f99a6ed167158cb41d9fb/imapbot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 7648, 12, 2890, 16, 818, 16, 589, 33, 1435, 4672, 589, 273, 666, 12, 803, 13, 397, 306, 20, 65, 1323, 1053, 30, 589, 18919, 21, 65, 1011, 404, 589, 67, 701, 273, 4585, 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, 1104, 67, 7648, 12, 2890, 16, 818, 16, 589, 33, 1435, 4672, 589, 273, 666, 12, 803, 13, 397, 306, 20, 65, 1323, 1053, 30, 589, 18919, 21, 65, 1011, 404, 589, 67, 701, 273, 4585, 18...
except: Damnlog('Stream copy: failed to write', len(i), 'bytes to output stream.')
except Exception, e: Damnlog('Stream copy: failed to write', len(i), 'bytes to output stream:',e)
def run(self): firstread = True firstwrite = True Damnlog('Stream copy: Begin') i = 'Let\'s go' while len(i): try: i = self.s1.read(self.buffer) if firstread: Damnlog('Stream copy: first read successful, read', len(i), 'bytes.') firstread = False try: self.s2.write(i) if firstwrite: Damnlog('Stream copy: first write successful, wrote ', len(i), 'bytes.') firstwrite = False except: Damnlog('Stream copy: failed to write', len(i), 'bytes to output stream.') except: Damnlog('Stream copy: Filed to read from input stream.') Damnlog('Stream copying done.') if self.closes1: try: self.s1.close() except: Damnlog('Stream copy: closing input stream failed.') if self.closes2: try: self.s2.close() except: Damnlog('Stream copy: closing output stream failed.')
6efe94af856bb918c22e3763b1f81660ac519337 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/6efe94af856bb918c22e3763b1f81660ac519337/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1122, 896, 273, 1053, 1122, 2626, 273, 1053, 463, 301, 82, 1330, 2668, 1228, 1610, 30, 14323, 6134, 277, 273, 296, 24181, 3730, 87, 1960, 11, 1323, 562, 12, 77, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1122, 896, 273, 1053, 1122, 2626, 273, 1053, 463, 301, 82, 1330, 2668, 1228, 1610, 30, 14323, 6134, 277, 273, 296, 24181, 3730, 87, 1960, 11, 1323, 562, 12, 77, 4...
def _recursive_sub(self, kwds): return self
def _recursive_sub(self, kwds): return self
ac98908c56806427fc921a599f29aef608e43289 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ac98908c56806427fc921a599f29aef608e43289/constants.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 67, 1717, 12, 2890, 16, 17149, 4672, 327, 365, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10543, 67, 1717, 12, 2890, 16, 17149, 4672, 327, 365, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
global notebook, waiting
def render(self, request): if request.args.has_key('email'): if request.args['email'][0] is not None : global notebook, waiting user = request.args['username'][0] passwd = request.args['password'][0] destaddr = """%s""" % request.args['email'][0] from sage.server.notebook.smtpsend import send_mail from sage.server.notebook.register import make_key, build_msg # TODO: make this come from the server settings key = make_key() listenaddr = notebook.address port = notebook.port secure = notebook.secure fromaddr = 'no-reply@%s' % listenaddr body = build_msg(key, user, listenaddr, port, secure) send_mail(self, fromaddr, destaddr, "SAGE Notebook Registration",body) waiting[key] = user # now say that the user has been registered. s = """\
5750883d6ff6e2e1612d918d21d4cdf4f47cbb6d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5750883d6ff6e2e1612d918d21d4cdf4f47cbb6d/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 309, 590, 18, 1968, 18, 5332, 67, 856, 2668, 3652, 11, 4672, 309, 590, 18, 1968, 3292, 3652, 3546, 63, 20, 65, 353, 486, 599, 294, 729, 273, 590, 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, 1743, 12, 2890, 16, 590, 4672, 309, 590, 18, 1968, 18, 5332, 67, 856, 2668, 3652, 11, 4672, 309, 590, 18, 1968, 3292, 3652, 3546, 63, 20, 65, 353, 486, 599, 294, 729, 273, 590, 18, ...
pManager.manager.DebugStr('cNeighbourOwl '+ __version__ +': Cant do RPC for '+str(self.IP)+':'+str(self.iPort)+'. Deleting owl from list of known owls.')
pManager.manager.DebugStr('cNeighbourOwl '+ __version__ +': Cant do RPC for '+str(self.IP)+':'+str(self.iPort)+'. Discarding owl.')
def Request(self, sRequest): """send Request"""
5c015b4a2d7362fd37ea2d16c445c66e2c3db9e0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2853/5c015b4a2d7362fd37ea2d16c445c66e2c3db9e0/cNeighbourOwl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1567, 12, 2890, 16, 272, 691, 4672, 3536, 4661, 1567, 8395, 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, 1567, 12, 2890, 16, 272, 691, 4672, 3536, 4661, 1567, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def mangle_neg(vals): """ Returns the product of all values in vals, with the result nonnegative if any of the values is nonnegative. EXAMPLES:: sage: from sage.plot.contour_plot import mangle_neg sage: mangle_neg([-1.2, -0.74, -2.56, -1.01]) -2.29601280000000 sage: mangle_neg([-1.2, 0.0, -2.56]) 0.000000000000000 sage: mangle_neg([-1.2, -0.74, -2.56, 1.01]) 2.29601280000000 """ from sage.misc.misc_c import prod res = abs(prod(vals)) if any(map(lambda v: v>=0, vals)): return res else: return -res
def equify(f): """ Returns the equation rewritten as a symbolic function to give negative values when True, positive when False. EXAMPLES:: sage: from sage.plot.contour_plot import equify sage: var('x, y') (x, y) sage: equify(x^2 < 2) x^2 - 2 sage: equify(x^2 > 2) -x^2 + 2 sage: equify(x*y > 1) -x*y + 1 sage: equify(y > 0) -y """ import operator from sage.calculus.all import symbolic_expression op = f.operator() if op is operator.gt or op is operator.ge: return symbolic_expression(f.rhs() - f.lhs()) else: return symbolic_expression(f.lhs() - f.rhs())
98d332aa4388605d75a37f824a43a7ac50c110c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/98d332aa4388605d75a37f824a43a7ac50c110c0/contour_plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1298, 1164, 12, 74, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 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, 1298, 1164, 12, 74, 4672, 3536, 2860, 326, 15778, 26768, 487, 279, 16754, 445, 358, 8492, 6092, 924, 1347, 1053, 16, 6895, 1347, 1083, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30...
lines.appendChild(node_line)
lines.append(node_line)
def _append_node(name, text): n = new_doc.createElement(name) t = new_doc.createTextNode(text) n.appendChild(t) config.appendChild(n)
ce28b92c9e314579334271a58fcf4c5c65873e36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ce28b92c9e314579334271a58fcf4c5c65873e36/custom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6923, 67, 2159, 12, 529, 16, 977, 4672, 290, 273, 394, 67, 2434, 18, 2640, 1046, 12, 529, 13, 268, 273, 394, 67, 2434, 18, 2640, 17299, 12, 955, 13, 290, 18, 6923, 1763, 12, 8...
if not f._obj.graph.normalized_for_calls:
if not getattr(f._obj.graph, 'normalized_for_calls', False):
def rtype_call_args(self, hop): f, rinputs, rresult = self.function_signatures().itervalues().next() # the function arguments may have been normalized by normalizecalls() # already if not f._obj.graph.normalized_for_calls: assert False, "XXX do stuff here" vlist = hop.inputargs(self, Void, *rinputs) return hop.genop('direct_call', vlist[:1] + vlist[2:], resulttype = rresult)
8028fd4c2956a84ab1ba018d8a80fa6a9e4ba306 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/8028fd4c2956a84ab1ba018d8a80fa6a9e4ba306/rpbc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9328, 67, 1991, 67, 1968, 12, 2890, 16, 19055, 4672, 284, 16, 436, 10029, 16, 436, 2088, 273, 365, 18, 915, 67, 30730, 7675, 2165, 2372, 7675, 4285, 1435, 468, 326, 445, 1775, 2026, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9328, 67, 1991, 67, 1968, 12, 2890, 16, 19055, 4672, 284, 16, 436, 10029, 16, 436, 2088, 273, 365, 18, 915, 67, 30730, 7675, 2165, 2372, 7675, 4285, 1435, 468, 326, 445, 1775, 2026, 12...
except:
except Exception, x: LOG('XWFMailingList', PROBLEM, 'A problem was experienced while getting values: %s' % x)
def getValueFor(self, key): # getting the maillist and moderatedlist is a special case, working in with the # XWFT group framework pass_group_id = False if key in ('digestmaillist', 'maillist', 'moderator', 'moderatedlist','mailinlist'): maillist = [] if key in ('digestmaillist', 'maillist'): address_getter = 'get_deliveryEmailAddressesByKey' member_getter = 'get_memberUserObjects' #address_getter = 'get_preferredEmailAddresses' pass_group_id = True maillist_script = getattr(self, 'maillist_members', None) elif key in ('moderator',): address_getter = 'get_emailAddresses' member_getter = 'get_moderatorUserObjects' maillist_script = None maillist = self.aq_inner.getProperty('moderator', []) if not maillist: maillist = self.aq_parent.getProperty('moderator',[]) elif key in ('moderatedlist',): address_getter = 'get_emailAddresses' member_getter = 'get_moderatedUserObjects' maillist_script = None maillist = self.aq_inner.getProperty('moderatedlist', []) if not maillist: maillist = self.aq_parent.getProperty('moderatedlist',[]) else: address_getter = 'get_emailAddresses' member_getter = 'get_memberUserObjects' maillist_script = getattr(self, 'mailinlist_members', None) # look for a maillist script if maillist_script: return maillist_script() try: users = getattr(self, member_getter)() for user in users: # we're looking to send out regular email, but this user is set to digest if key == 'maillist' and user.get_deliverySettingsByKey(self.getId()) == 3: continue elif key == 'digestmaillist' and user.get_deliverySettingsByKey(self.getId()) != 3: continue
5bd82550831bbccb7d4675bcee2c81d4524ca299 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6274/5bd82550831bbccb7d4675bcee2c81d4524ca299/XWFMailingList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2366, 1290, 12, 2890, 16, 498, 4672, 468, 8742, 326, 4791, 1098, 471, 681, 19007, 1098, 353, 279, 4582, 648, 16, 5960, 316, 598, 326, 468, 1139, 59, 4464, 1041, 8257, 1342, 67, 1655, 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, 2366, 1290, 12, 2890, 16, 498, 4672, 468, 8742, 326, 4791, 1098, 471, 681, 19007, 1098, 353, 279, 4582, 648, 16, 5960, 316, 598, 326, 468, 1139, 59, 4464, 1041, 8257, 1342, 67, 1655, 6...
urldata[url] = ud return urldata[url]
urldata[fn][url] = ud return urldata[fn][url]
def initdata(url, d): if url not in urldata: ud = FetchData() (ud.type, ud.host, ud.path, ud.user, ud.pswd, ud.parm) = bb.decodeurl(data.expand(url, d)) ud.date = Fetch.getSRCDate(d) for m in methods: if m.supports(url, ud, d): ud.localpath = m.localpath(url, ud, d) ud.md5 = ud.localpath + '.md5' # if user sets localpath for file, use it instead. if "localpath" in ud.parm: ud.localpath = ud.parm["localpath"] ud.method = m break urldata[url] = ud return urldata[url]
d8f7680dc0221880a1eeb7bf2275642dfd3ce263 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8123/d8f7680dc0221880a1eeb7bf2275642dfd3ce263/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 892, 12, 718, 16, 302, 4672, 309, 880, 486, 316, 880, 892, 30, 23969, 273, 8065, 751, 1435, 261, 1100, 18, 723, 16, 23969, 18, 2564, 16, 23969, 18, 803, 16, 23969, 18, 1355, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 892, 12, 718, 16, 302, 4672, 309, 880, 486, 316, 880, 892, 30, 23969, 273, 8065, 751, 1435, 261, 1100, 18, 723, 16, 23969, 18, 2564, 16, 23969, 18, 803, 16, 23969, 18, 1355, 16...
self.controller.yawVehicle(-45) self.stateMachine.change_state("waitForReadyThenScan") def waitForReadyThenScan(self): if self.controller.isReady(): self.stateMachine.change_state("firstLightScan") def firstLightScan(self): if self.controller.isReady(): self.controller.yawVehicle(self.scanDegrees) self.scanCount += 1 if self.scanCount == 18: self.scanDegrees = -1*scanDegrees self.scanCount = 0 self.stateMachine.change_state("findRedLight") def findRedLight(self): lightDetector = self.vision.forward.RedLightDetector orangeDetector = self.vision.downward.OrangeDetector if lightDetector.found(): self.seenLight += 1 if self.seenLight > 10: self.seenLight = 10 self.lightx = lightDetector.getX() self.lighty = lightDetector.getY() self.complexControl.navigateToward(self.lightx,self.lighty) elif orangeDetector.found(): self.seenLight = self.seenLight - 1 if self.seenLight < 5: self.stateMachine.change_state("foundFirstRedLight") else: self.stateMachine.change_state("firstLightScan") def foundFirstRedLight(self): self.vision.forward.redLightDetectOff() self.vision.downward.orangeDetectOff() self.stateMachine.change_state("initializePipeline") def initializePipeline(self): self.orangex = -1.0 self.orangey = -1.0 self.scanCount = 0 self.scanDegrees = 5 self.binCount = 0 self.orangeCount = 0 self.countDown = 15 self.lostPipeCountDown = 40 self.countOfTimesPipeLost = 0 self.vision.downward.orangeDetectOn() self.vision.downward.binDetectOn() self.controller.setSpeed(2) self.controller.yawVehicle(-30) self.stateMachine.change_state("waitThenPipeScan") def waitThenPipeScan(self): if self.controller.isReady(): self.stateMachine.change_state("pipeScan") def pipeScan(self): if self.controller.isReady():
self.controller.yawVehicle(-45) self.stateMachine.change_state("waitForReadyThenScan") def waitForReadyThenScan(self): if self.controller.isReady(): self.stateMachine.change_state("firstLightScan") def firstLightScan(self): if self.controller.isReady(): self.controller.yawVehicle(self.scanDegrees) self.scanCount += 1 if self.scanCount == 18: self.scanDegrees = -1*scanDegrees self.scanCount = 0 self.stateMachine.change_state("findRedLight") def findRedLight(self): lightDetector = self.vision.forward.RedLightDetector orangeDetector = self.vision.downward.OrangeDetector if lightDetector.found(): self.seenLight += 1 if self.seenLight > 10: self.seenLight = 10 self.lightx = lightDetector.getX() self.lighty = lightDetector.getY() self.complexControl.navigateToward(self.lightx,self.lighty) elif orangeDetector.found(): self.seenLight = self.seenLight - 1 if self.seenLight < 5: self.stateMachine.change_state("foundFirstRedLight") else: self.stateMachine.change_state("firstLightScan") def foundFirstRedLight(self): self.vision.forward.redLightDetectOff() self.vision.downward.orangeDetectOff() self.stateMachine.change_state("initializePipeline") def initializePipeline(self): self.orangex = -1.0 self.orangey = -1.0 self.scanCount = 0 self.scanDegrees = 5 self.binCount = 0 self.orangeCount = 0 self.countDown = 15 self.lostPipeCountDown = 40 self.countOfTimesPipeLost = 0 self.vision.downward.orangeDetectOn() self.vision.downward.binDetectOn() self.controller.setSpeed(2) self.controller.yawVehicle(-30) self.stateMachine.change_state("waitThenPipeScan") def waitThenPipeScan(self): if self.controller.isReady(): self.stateMachine.change_state("pipeScan") def pipeScan(self): if self.controller.isReady():
def initFirstRedLight(self): self.lightx=-1.0 self.lighty=-1.0 self.scanDegrees=5 self.scanCount=0 self.seenLight=0 self.vision.forward.redLightDetectOn() self.vision.downward.orangeDetectOn() self.controller.setSpeed(2) self.controller.yawVehicle(-45) #45 degrees to the right self.stateMachine.change_state("waitForReadyThenScan")
b10a92e535b20c0b6cda01a39be7e0c41877eb1b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10608/b10a92e535b20c0b6cda01a39be7e0c41877eb1b/cleanAI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 3759, 3715, 12128, 12, 2890, 4672, 365, 18, 5099, 92, 29711, 21, 18, 20, 365, 18, 5099, 93, 29711, 21, 18, 20, 365, 18, 9871, 24400, 33, 25, 365, 18, 9871, 1380, 33, 20, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 3759, 3715, 12128, 12, 2890, 4672, 365, 18, 5099, 92, 29711, 21, 18, 20, 365, 18, 5099, 93, 29711, 21, 18, 20, 365, 18, 9871, 24400, 33, 25, 365, 18, 9871, 1380, 33, 20, 365, ...
print "Registering type %s as %s" % (tp, self.exported_types_id)
def register_type(self, protocol, tp): try: return self.exported_types[tp] except KeyError: print "Registering type %s as %s" % (tp, self.exported_types_id) self.exported_types[tp] = self.exported_types_id self.exported_types_reverse[self.exported_types_id] = tp tp_id = self.exported_types_id self.exported_types_id += 1 # XXX: We don't support inheritance here, nor recursive types # shall we??? _dict = dict([(key, protocol.wrap(getattr(tp, key))) for key in dir(tp) if not self.ignore(key, getattr(tp, key))]) protocol.send(("type_reg", (tp_id, tp.__name__, _dict))) return tp_id
c7990ab913003c3db7e0b2cc9e1031343232208c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/c7990ab913003c3db7e0b2cc9e1031343232208c/objkeeper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 67, 723, 12, 2890, 16, 1771, 16, 8071, 4672, 775, 30, 327, 365, 18, 338, 1798, 67, 2352, 63, 6834, 65, 1335, 4999, 30, 225, 365, 18, 338, 1798, 67, 2352, 63, 6834, 65, 273, 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, 1744, 67, 723, 12, 2890, 16, 1771, 16, 8071, 4672, 775, 30, 327, 365, 18, 338, 1798, 67, 2352, 63, 6834, 65, 1335, 4999, 30, 225, 365, 18, 338, 1798, 67, 2352, 63, 6834, 65, 273, 3...
if (self.getsep() == '/' or self.getconfboolean('existsok', 0)) \
if (self.getsep() == '/' or self.getconfboolean('existsok', 0) or foldername == '.') \
def makefolder(self, foldername): self.debug("makefolder called with arg " + repr(foldername)) # Do the chdir thing so the call to makedirs does not make the # self.root directory (we'd prefer to raise an error in that case), # but will make the (relative) paths underneath it. Need to use # makedirs to support a / separator. if self.getsep() == '/': for invalid in ['new', 'cur', 'tmp', 'offlineimap.uidvalidity']: for component in foldername.split('/'): assert component != invalid, "When using nested folders (/ as a separator in the account config), your folder names may not contain 'new', 'cur', 'tmp', or 'offlineimap.uidvalidity'."
bd1d1010e77fb10f243fea8be1bbaf2e0d2c8b65 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5335/bd1d1010e77fb10f243fea8be1bbaf2e0d2c8b65/Maildir.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 5609, 12, 2890, 16, 3009, 529, 4672, 365, 18, 4148, 2932, 6540, 5609, 2566, 598, 1501, 315, 397, 8480, 12, 5609, 529, 3719, 468, 2256, 326, 14029, 7757, 1427, 326, 745, 358, 12151,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5609, 12, 2890, 16, 3009, 529, 4672, 365, 18, 4148, 2932, 6540, 5609, 2566, 598, 1501, 315, 397, 8480, 12, 5609, 529, 3719, 468, 2256, 326, 14029, 7757, 1427, 326, 745, 358, 12151,...
version='0.2.4',
version='0.2.5',
def append_if_valid(target, tuple): if os.path.exists(tuple[0]): target.append(tuple)
f160cdf6c8e788e47ad9e1faf96969d3ea71f622 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/633/f160cdf6c8e788e47ad9e1faf96969d3ea71f622/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 430, 67, 877, 12, 3299, 16, 3193, 4672, 309, 1140, 18, 803, 18, 1808, 12, 8052, 63, 20, 65, 4672, 1018, 18, 6923, 12, 8052, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 714, 67, 430, 67, 877, 12, 3299, 16, 3193, 4672, 309, 1140, 18, 803, 18, 1808, 12, 8052, 63, 20, 65, 4672, 1018, 18, 6923, 12, 8052, 13, 225, 2, -100, -100, -100, -100, -100, -100, ...
padx=6,pady=3)
**extraKwds)
def CreateWidgets(self): self.tabPages = TabbedPageSet(self, page_names=['Fonts/Tabs','Highlighting','Keys','General']) frameActionButtons = Frame(self,pady=2) #action buttons self.buttonHelp = Button(frameActionButtons,text='Help', command=self.Help,takefocus=FALSE, padx=6,pady=3) self.buttonOk = Button(frameActionButtons,text='Ok', command=self.Ok,takefocus=FALSE, padx=6,pady=3) self.buttonApply = Button(frameActionButtons,text='Apply', command=self.Apply,takefocus=FALSE, padx=6,pady=3) self.buttonCancel = Button(frameActionButtons,text='Cancel', command=self.Cancel,takefocus=FALSE, padx=6,pady=3) self.CreatePageFontTab() self.CreatePageHighlight() self.CreatePageKeys() self.CreatePageGeneral() self.buttonHelp.pack(side=RIGHT,padx=5) self.buttonOk.pack(side=LEFT,padx=5) self.buttonApply.pack(side=LEFT,padx=5) self.buttonCancel.pack(side=LEFT,padx=5) frameActionButtons.pack(side=BOTTOM) Frame(self, height=2, borderwidth=0).pack(side=BOTTOM) self.tabPages.pack(side=TOP,expand=TRUE,fill=BOTH)
9e35004509f3744a6ee51e89540b8ff41d0d73c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/9e35004509f3744a6ee51e89540b8ff41d0d73c9/configDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 16166, 12, 2890, 4672, 365, 18, 7032, 5716, 273, 9483, 2992, 1964, 694, 12, 2890, 16, 1363, 67, 1973, 33, 3292, 5711, 87, 19, 17348, 17023, 16205, 310, 17023, 2396, 17023, 12580, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 16166, 12, 2890, 4672, 365, 18, 7032, 5716, 273, 9483, 2992, 1964, 694, 12, 2890, 16, 1363, 67, 1973, 33, 3292, 5711, 87, 19, 17348, 17023, 16205, 310, 17023, 2396, 17023, 12580, 1...
>>>>>>> .r109
def process(self, item_id, source, metadata, options=None): self.item_id = item_id self.source = source self.metadata = metadata #self.options = {} self.args = self.get_args(options) self.ext = self.get_file_extension() self.command = 'sox "'+self.source+'" -q -w -r 44100 -t wav -c2 - '+ \ '| flac '+self.args+' -c -'
97cd7b6ffeab639b5109216cf5056c78b1b5358d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12043/97cd7b6ffeab639b5109216cf5056c78b1b5358d/flac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 761, 67, 350, 16, 1084, 16, 1982, 16, 702, 33, 7036, 4672, 365, 18, 1726, 67, 350, 273, 761, 67, 350, 365, 18, 3168, 273, 1084, 365, 18, 4165, 273, 1982, 468, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 2890, 16, 761, 67, 350, 16, 1084, 16, 1982, 16, 702, 33, 7036, 4672, 365, 18, 1726, 67, 350, 273, 761, 67, 350, 365, 18, 3168, 273, 1084, 365, 18, 4165, 273, 1982, 468, 2...
return not isinstance(other, deque) or list.__ne__(self, other)
if isinstance(other, deque): return list(self) != list(other) else: return NotImplemented
def __ne__(self, other): return not isinstance(other, deque) or list.__ne__(self, other)
98d77cf1aef09187f66c5d480f696aed0614be1e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/98d77cf1aef09187f66c5d480f696aed0614be1e/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 1549, 12, 3011, 16, 21147, 13, 578, 666, 16186, 4644, 972, 12, 2890, 16, 1308, 13, 225, 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, 0, 0, 0, 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, 4644, 972, 12, 2890, 16, 1308, 4672, 327, 486, 1549, 12, 3011, 16, 21147, 13, 578, 666, 16186, 4644, 972, 12, 2890, 16, 1308, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100...
if fn and normalize_path(fn).startswith(loc):
if fn and (normalize_path(fn).startswith(loc) or fn.startswith(self.location)):
def check_version_conflict(self): if self.key=='distribute': return # ignore the inevitable setuptools self-conflicts :(
4da7cdd3ea61af90e56e0cbe63811b8ef13cd484 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/495/4da7cdd3ea61af90e56e0cbe63811b8ef13cd484/pkg_resources.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1589, 67, 20340, 12, 2890, 4672, 309, 365, 18, 856, 18920, 2251, 887, 4278, 327, 1377, 468, 2305, 326, 316, 14965, 9085, 444, 30693, 365, 17, 20340, 87, 225, 294, 12, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1589, 67, 20340, 12, 2890, 4672, 309, 365, 18, 856, 18920, 2251, 887, 4278, 327, 1377, 468, 2305, 326, 316, 14965, 9085, 444, 30693, 365, 17, 20340, 87, 225, 294, 12, 2, -100,...
"SET status=?, metainfo=?, fast_resume_data=?", (new_status, metainfo_value, fast_resume_data_value))
"SET status=?, metainfo=?, fast_resume_data=? " "WHERE id=?", (new_status, metainfo_value, fast_resume_data_value, id))
def upgrade105(cursor): """Move metainfo and fastResumeData out of the status dict """ # create new colums cursor.execute("ALTER TABLE remote_downloader ADD metainfo BLOB") cursor.execute("ALTER TABLE remote_downloader ADD fast_resume_data BLOB") # move things cursor.execute("SELECT id, status FROM remote_downloader") for row in cursor.fetchall(): id, status_repr = row status = eval_container(status_repr) metainfo = status.pop('metainfo', None) fast_resume_data = status.pop('fastResumeData', None) new_status = repr(status) if metainfo is not None: metainfo_value = buffer(metainfo) else: metainfo_value = None if fast_resume_data is not None: fast_resume_data_value = buffer(fast_resume_data) else: fast_resume_data_value = None cursor.execute("UPDATE remote_downloader " "SET status=?, metainfo=?, fast_resume_data=?", (new_status, metainfo_value, fast_resume_data_value))
38ba1bb5a10c53dc4dbc4a68e4f1cdbc112a98e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/38ba1bb5a10c53dc4dbc4a68e4f1cdbc112a98e4/databaseupgrade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 21661, 12, 9216, 4672, 3536, 7607, 5100, 28935, 471, 4797, 20911, 751, 596, 434, 326, 1267, 2065, 3536, 468, 752, 394, 645, 379, 87, 3347, 18, 8837, 2932, 18843, 7567, 2632, 67, 23...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8400, 21661, 12, 9216, 4672, 3536, 7607, 5100, 28935, 471, 4797, 20911, 751, 596, 434, 326, 1267, 2065, 3536, 468, 752, 394, 645, 379, 87, 3347, 18, 8837, 2932, 18843, 7567, 2632, 67, 23...
self.identity(atts['addr']) = ('psn ', '\x00\x00\x00\x00\x00\x00\x00\x02'):
self._identity(atts['addr'])[1] == ('psn ', '\x00\x00\x00\x00\x00\x00\x00\x02'):
def coercefromdesc(self, desc, modeflags): if desc.type == typeAppleEvent: code, atts, params = self.appscriptservices.unpackappleevent(desc) if code == 'ascrtell': target = params['----'] self.source = '' #'TARGET: %r %r' % (target, self._identity(target)) elif code == 'ascrtend': self.source = '' elif code == 'ascrgdte': target = atts['addr'] self.source = '# getting terminology for %r' % self._identity(target) elif code == 'ascrcmnt' and \ self.identity(atts['addr']) = ('psn ', '\x00\x00\x00\x00\x00\x00\x00\x02'): if '----' in params: self.source = '# %r' % params['----'] else: self.source = '#' else: target = atts['addr'] self.source = 'EVENT: %r %r \n\t\t%r \n\t\t%r' % (code, self._identity(target), atts, params) # TO DO: format event as string else: self.value = desc
3a6ed0563a2a63b5627321f8ce75b8d14ee09a02 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10961/3a6ed0563a2a63b5627321f8ce75b8d14ee09a02/pyosa_scriptmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12270, 2080, 5569, 12, 2890, 16, 3044, 16, 1965, 7133, 4672, 309, 3044, 18, 723, 422, 618, 1294, 1802, 1133, 30, 981, 16, 15687, 16, 859, 273, 365, 18, 2910, 4263, 8387, 18, 17309, 438...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12270, 2080, 5569, 12, 2890, 16, 3044, 16, 1965, 7133, 4672, 309, 3044, 18, 723, 422, 618, 1294, 1802, 1133, 30, 981, 16, 15687, 16, 859, 273, 365, 18, 2910, 4263, 8387, 18, 17309, 438...
self.local_keys.append((prefix + attr.key, lisp[name]))
if prefix is not None: key = prefix + ' ' + attr.key self.local_keys.append((key, lisp[name]))
def do_refactor(prefix, self=self, refactoring=attr): initial_asking = prefix is None refactoring(self).show(initial_asking=initial_asking)
fa8a6503435cb821fcd26e4997e056399f55b5ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8283/fa8a6503435cb821fcd26e4997e056399f55b5ea/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 266, 6812, 12, 3239, 16, 365, 33, 2890, 16, 283, 3493, 6053, 33, 1747, 4672, 2172, 67, 835, 310, 273, 1633, 353, 599, 283, 3493, 6053, 12, 2890, 2934, 4500, 12, 6769, 67, 83...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 67, 266, 6812, 12, 3239, 16, 365, 33, 2890, 16, 283, 3493, 6053, 33, 1747, 4672, 2172, 67, 835, 310, 273, 1633, 353, 599, 283, 3493, 6053, 12, 2890, 2934, 4500, 12, 6769, 67, 83...
"""void fl_set_form_hotspot(FL_FORM * form, FL_Coord x, FL_Coord y)
"""void fl_set_form_hotspot(FL_FORM * form, FL_Coord x, FL_Coord y)
def fl_set_form_hotspot(pForm, x, y): """ fl_set_form_hotspot(pForm, x, y) """ _fl_set_form_hotspot = cfuncproto( load_so_libforms(), "fl_set_form_hotspot", \ None, [cty.POINTER(FL_FORM), FL_Coord, FL_Coord], \ """void fl_set_form_hotspot(FL_FORM * form, FL_Coord x, FL_Coord y) """) ix = convert_to_FL_Coord(x) iy = convert_to_FL_Coord(y) keep_elem_refs(pForm, x, ix, y, iy) _fl_set_form_hotspot(pForm, ix, iy)
bd6cf497d94f877a33a2bba90b9d74b9e4c950cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/bd6cf497d94f877a33a2bba90b9d74b9e4c950cb/library.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 15224, 19032, 12, 84, 1204, 16, 619, 16, 677, 4672, 3536, 1183, 67, 542, 67, 687, 67, 15224, 19032, 12, 84, 1204, 16, 619, 16, 677, 13, 3536, 225, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 15224, 19032, 12, 84, 1204, 16, 619, 16, 677, 4672, 3536, 1183, 67, 542, 67, 687, 67, 15224, 19032, 12, 84, 1204, 16, 619, 16, 677, 13, 3536, 225, 389, ...
changed = update_booklist(self._card_a_prefix, path, row[0], row[1], mime, row[2], row[5], row[6], row[7])
changed = update_booklist(self._card_a_prefix, path, row[0], row[1], mime, row[2], row[5], row[6], row[7], row[4])
def update_booklist(prefix, path, title, authors, mime, date, ContentType, ImageID, readstatus): changed = False # if path_to_ext(path) in self.FORMATS: try: lpath = path.partition(self.normalize_path(prefix))[2] if lpath.startswith(os.sep): lpath = lpath[len(os.sep):] lpath = lpath.replace('\\', '/') # debug_print("LPATH: ", lpath, " - Title: " , title)
f81cd1413e030f2174ff61a9b71a66e1df1e06f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f81cd1413e030f2174ff61a9b71a66e1df1e06f0/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 3618, 1098, 12, 3239, 16, 589, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 16, 855, 2327, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 408, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 3618, 1098, 12, 3239, 16, 589, 16, 2077, 16, 14494, 16, 4892, 16, 1509, 16, 11691, 16, 3421, 734, 16, 855, 2327, 4672, 3550, 273, 1083, 468, 309, 589, 67, 869, 67, 408, 12,...
if DEBUG: logger.debug("...removing from inclusions (%s)", self.inclusions.getItemDisplayName().encode('ascii', 'replace'))
def remove(self, item): """ Remove an item from the collection. """
ffbafa2c10bbb63bff531dba7da53521f8e95bf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/ffbafa2c10bbb63bff531dba7da53521f8e95bf8/collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 1849, 18, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 761, 4672, 3536, 3581, 392, 761, 628, 326, 1849, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if context is None: context = getcontext() ans = self._check_nans(context=context) if ans: return ans
if self._is_special: ans = self._check_nans(context=context) if ans: return ans
def __pos__(self, context=None): """Returns a copy, unless it is a sNaN.
323d0b30a64964b89a85e1b02e8fcc4017ce9fa7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/323d0b30a64964b89a85e1b02e8fcc4017ce9fa7/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 917, 972, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 1356, 279, 1610, 16, 3308, 518, 353, 279, 272, 21172, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 917, 972, 12, 2890, 16, 819, 33, 7036, 4672, 3536, 1356, 279, 1610, 16, 3308, 518, 353, 279, 272, 21172, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
cs = get_member_struc(m)
cs = idaapi.get_member_struc(m)
def GetMemberStrId(id, member_offset): """ Get structure id of a member @param id: structure type ID @param member_offset: member offset. The offset can be any offset in the member. For example, is a member is 4 bytes long and starts at offset 2, then 2,3,4,5 denote the same structure member. @return: -1 if bad structure type ID is passed or no such member in the structure otherwise returns structure id of the member. If the current member is not a structure, returns -1. """ s = idaapi.get_struc(id) if not s: return -1 m = idaapi.get_member(s, member_offset) if not m: return -1 cs = get_member_struc(m) if cs: return cs.id else: return -1
f9e166c69c5fa7e2fba545a418208d297e4f758b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4773/f9e166c69c5fa7e2fba545a418208d297e4f758b/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4419, 1585, 548, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 3695, 612, 434, 279, 3140, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, 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, 968, 4419, 1585, 548, 12, 350, 16, 3140, 67, 3348, 4672, 3536, 968, 3695, 612, 434, 279, 3140, 225, 632, 891, 612, 30, 3695, 618, 1599, 632, 891, 3140, 67, 3348, 30, 3140, 1384, 18, ...
ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_old) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() self.stop_server(pid)
try: ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_old) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() finally: self.stop_server(pid)
def test_verify_cb_old(self): pid = self.start_server(self.args) ctx = SSL.Context() ctx.set_verify(SSL.verify_peer | SSL.verify_fail_if_no_peer_cert, 9, self.verify_cb_old) s = SSL.Connection(ctx) try: s.connect(self.srv_addr) except SSL.SSLError, e: assert 0, e data = self.http_get(s) s.close() self.stop_server(pid) self.failIf(string.find(data, 's_server -quiet -www') == -1)
787f56abaf95d4b31f93406cbd1f766e498b370b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/787f56abaf95d4b31f93406cbd1f766e498b370b/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8705, 67, 7358, 67, 1673, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 775, 30, 1103, 273, 7419, 18, 1042, 1435, 1103, 18, 542, 67, 8705, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8705, 67, 7358, 67, 1673, 12, 2890, 4672, 4231, 273, 365, 18, 1937, 67, 3567, 12, 2890, 18, 1968, 13, 775, 30, 1103, 273, 7419, 18, 1042, 1435, 1103, 18, 542, 67, 8705, 12,...
self.assert_(set(self._box.list_folders()) ==
self.assertEqual(set(self._box.list_folders()),
def test_list_folders(self): # List folders self._box.add_folder('one') self._box.add_folder('two') self._box.add_folder('three') self.assertEqual(len(self._box.list_folders()), 3) self.assert_(set(self._box.list_folders()) == set(('one', 'two', 'three')))
9d1fae6c21b9661e8074aa8a166635ba69122b4b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9d1fae6c21b9661e8074aa8a166635ba69122b4b/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1098, 67, 16064, 12, 2890, 4672, 468, 987, 9907, 365, 6315, 2147, 18, 1289, 67, 5609, 2668, 476, 6134, 365, 6315, 2147, 18, 1289, 67, 5609, 2668, 15415, 6134, 365, 6315, 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, 1842, 67, 1098, 67, 16064, 12, 2890, 4672, 468, 987, 9907, 365, 6315, 2147, 18, 1289, 67, 5609, 2668, 476, 6134, 365, 6315, 2147, 18, 1289, 67, 5609, 2668, 15415, 6134, 365, 6315, 2147, ...
for option in diff_options:
for option in diff_options[1]:
def render_diff(self, req, repos, chgset, diff_options): """Raw Unified Diff version""" req.send_response(200) req.send_header('Content-Type', 'text/plain;charset=utf-8') req.send_header('Content-Disposition', 'filename=Changeset%s.diff' % req.args.get('rev')) req.end_headers()
48c56ad401dad6fa254a7be7f860bb61cf7062f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/48c56ad401dad6fa254a7be7f860bb61cf7062f3/Changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 5413, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4809, 1351, 939, 13008, 1177, 8395, 1111, 18, 4661, 67, 2740, 12, 6976, 13, 1111, 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, 1743, 67, 5413, 12, 2890, 16, 1111, 16, 13686, 16, 462, 75, 542, 16, 3122, 67, 2116, 4672, 3536, 4809, 1351, 939, 13008, 1177, 8395, 1111, 18, 4661, 67, 2740, 12, 6976, 13, 1111, 18, ...
app.MainLoop()
app.MainLoop()
def WriteInLogWindow(text): if wx.GetApp().theMainFrame == None: sys.stdout.write(text) else: wx.GetApp().theMainFrame.logWin.logSubWin.AppendText(text)
7553225d34de9616cdb2a96eb102014dfe67b7a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14712/7553225d34de9616cdb2a96eb102014dfe67b7a9/Psycollider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 382, 1343, 3829, 12, 955, 4672, 309, 7075, 18, 967, 3371, 7675, 5787, 6376, 3219, 422, 599, 30, 2589, 18, 10283, 18, 2626, 12, 955, 13, 469, 30, 7075, 18, 967, 3371, 7675, 5787, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2598, 382, 1343, 3829, 12, 955, 4672, 309, 7075, 18, 967, 3371, 7675, 5787, 6376, 3219, 422, 599, 30, 2589, 18, 10283, 18, 2626, 12, 955, 13, 469, 30, 7075, 18, 967, 3371, 7675, 5787, ...
cols.remove(col)
if col in cols: cols.remove(col)
def get_columns(self): if self.cols: return self.cols
e068c52b9de61272140fbaee94f2f03d828a9f05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/e068c52b9de61272140fbaee94f2f03d828a9f05/Query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5112, 12, 2890, 4672, 309, 365, 18, 6842, 30, 327, 365, 18, 6842, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5112, 12, 2890, 4672, 309, 365, 18, 6842, 30, 327, 365, 18, 6842, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
if self.AbstractFormat is not None: showIndent(outfile, level) outfile.write('AbstractFormat=model_.AbstractFormat(\n') self.AbstractFormat.exportLiteral(outfile, level) showIndent(outfile, level) outfile.write('),\n')
def exportLiteralChildren(self, outfile, level, name_): super(AbstractBlock, self).exportLiteralChildren(outfile, level, name_) showIndent(outfile, level) outfile.write('content_ = [\n') for item_ in self.content_: item_.exportLiteral(outfile, level, name_) showIndent(outfile, level) outfile.write('],\n') showIndent(outfile, level) outfile.write('valueOf_ = """%s""",\n' % (self.valueOf_,))
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 6177, 4212, 12, 2890, 16, 8756, 16, 1801, 16, 508, 67, 4672, 2240, 12, 7469, 1768, 16, 365, 2934, 6530, 6177, 4212, 12, 26050, 16, 1801, 16, 508, 67, 13, 2405, 7790, 12, 26050, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 6177, 4212, 12, 2890, 16, 8756, 16, 1801, 16, 508, 67, 4672, 2240, 12, 7469, 1768, 16, 365, 2934, 6530, 6177, 4212, 12, 26050, 16, 1801, 16, 508, 67, 13, 2405, 7790, 12, 26050, ...
super(CatalogReport,self).stop()
super(CatalogReport, self).stop()
def stop(self): super(CatalogReport,self).stop() self.log()
78534fa5e44f63d640ff07c425ec3edd3bb48fe9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/78534fa5e44f63d640ff07c425ec3edd3bb48fe9/CatalogReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 2240, 12, 9769, 4820, 16, 365, 2934, 5681, 1435, 365, 18, 1330, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 2240, 12, 9769, 4820, 16, 365, 2934, 5681, 1435, 365, 18, 1330, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
r""" Number of labeled rooted trees on $n$ nodes: $n^{(n-2)}$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000272;a Number of labeled rooted trees with n nodes: n^(n-2). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 1 sage: a(2) 1 sage: a(10) 100000000 sage: a.list(11) [1, 1, 3, 16, 125, 1296, 16807, 262144, 4782969, 100000000, 2357947691] AUTHOR: -- Jaap Spies (2007-01-26) """ def __init__(self):
def __init__(self): r""" Number of labeled rooted trees on $n$ nodes: $n^{(n-2)}$. INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A000272;a Number of labeled rooted trees with n nodes: n^(n-2). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 1 sage: a(2) 1 sage: a(10) 100000000 sage: a.list(11) [1, 1, 3, 16, 125, 1296, 16807, 262144, 4782969, 100000000, 2357947691] AUTHOR: -- Jaap Spies (2007-01-26) """
def _eval(self, n): return Integer(n**(n-1))
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 12, 82, 17, 21, 3719, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 8622, 12, 2890, 16, 290, 4672, 327, 2144, 12, 82, 636, 12, 82, 17, 21, 3719, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.send_error(403, "CGI script is not a plain file (%r)" %
self.send_error(403, "CGI script is not a plain file (%r)" %
def run_cgi(self): """Execute a CGI script.""" dir, rest = self.cgi_info i = rest.rfind('?') if i >= 0: rest, query = rest[:i], rest[i+1:] else: query = '' i = rest.find('/') if i >= 0: script, rest = rest[:i], rest[i:] else: script, rest = rest, '' scriptname = dir + '/' + script scriptfile = self.translate_path(scriptname) if not os.path.exists(scriptfile): self.send_error(404, "No such CGI script (%r)" % scriptname) return if not os.path.isfile(scriptfile): self.send_error(403, "CGI script is not a plain file (%r)" % scriptname) return ispy = self.is_python(scriptname) if not ispy: if not (self.have_fork or self.have_popen2 or self.have_popen3): self.send_error(403, "CGI script is not a Python script (%r)" % scriptname) return if not self.is_executable(scriptfile): self.send_error(403, "CGI script is not executable (%r)" % scriptname) return
de7c2dd591360d4e96bc7847196a194d68bbaf52 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/de7c2dd591360d4e96bc7847196a194d68bbaf52/CGIHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 3127, 18, 86, 4720, 2668, 4899, 13, 309, 277, 1545, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19062, 12, 2890, 4672, 3536, 5289, 279, 385, 13797, 2728, 12123, 1577, 16, 3127, 273, 365, 18, 19062, 67, 1376, 277, 273, 3127, 18, 86, 4720, 2668, 4899, 13, 309, 277, 1545, ...
print >>out, install_mimetypes_registry(self) print >>out, install_portal_transforms(self)
def install_dependencies(self, out, required=1): qi=queryUtility(IQuickInstallerTool) if qi is None: if required: raise RuntimeError, ( 'portal_quickinstaller tool could not be found, and it is ' 'required to install Archetypes dependencies') else: print >>out, install_formcontroller(self) print >>out, install_mimetypes_registry(self) print >>out, install_portal_transforms(self) if not qi.isProductInstalled('CMFFormController'): qi.installProduct('CMFFormController',locked=1) print >>out, 'Installing CMFFormController' if not qi.isProductInstalled('MimetypesRegistry'): qi.installProduct('MimetypesRegistry') print >>out, 'Installing MimetypesRegistry' if not qi.isProductInstalled('PortalTransforms'): qi.installProduct('PortalTransforms') print >>out, 'Installing PortalTransforms'
1f87006a063d77e930380531234750ece5d3bb89 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12165/1f87006a063d77e930380531234750ece5d3bb89/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 11037, 12, 2890, 16, 596, 16, 1931, 33, 21, 4672, 1043, 77, 33, 2271, 6497, 12, 45, 13663, 18678, 6364, 13, 309, 1043, 77, 353, 599, 30, 309, 1931, 30, 1002, 7265, 16, 261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3799, 67, 11037, 12, 2890, 16, 596, 16, 1931, 33, 21, 4672, 1043, 77, 33, 2271, 6497, 12, 45, 13663, 18678, 6364, 13, 309, 1043, 77, 353, 599, 30, 309, 1931, 30, 1002, 7265, 16, 261,...
parameterValue = str(parameterValue) insertTuples.append("(%d,'%s','%s','%s')" % (transID,parameterName,parameterValue,parameterType))
parameterValue = str( parameterValue ) insertTuples.append( "(%d,'%s','%s','%s')" % ( transID, parameterName, parameterValue, parameterType ) )
def __addInputDataQuery(self, transID, queryDict, author='', connection=False): res = self.getTransformationInputDataQuery(transID, connection=connection) if res['OK']: return S_ERROR("Input data query already exists for transformation") if res['Message'] != 'No InputDataQuery found for transformation': return res insertTuples = [] for parameterName in sortList(queryDict.keys()): parameterValue = queryDict[parameterName] if not parameterValue: continue parameterType = 'String' if type(parameterValue) in [ListType,TupleType]: if type(parameterValue[0]) in [IntType,LongType]: parameterType = 'Integer' parameterValue = [str(x) for x in parameterValue] parameterValue = ';;;'.join(parameterValue) else: if type(parameterValue) in [IntType,LongType]: parameterType = 'Integer' parameterValue = str(parameterValue) insertTuples.append("(%d,'%s','%s','%s')" % (transID,parameterName,parameterValue,parameterType)) if not insertTuples: return S_ERROR("No input data query to be inserted") req = "INSERT INTO TransformationInputDataQuery (TransformationID,ParameterName,ParameterValue,ParameterType) VALUES %s" % ','.join(insertTuples) res = self._update(req,connection) if not res['OK']: message = 'Failed to add input data query' self.deleteTransformationInputDataQuery(transID,connection=connection) else: message = 'Added input data query' self.__updateTransformationLogging(transID,message,author,connection=connection) return res
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1289, 1210, 751, 1138, 12, 2890, 16, 906, 734, 16, 843, 5014, 16, 2869, 2218, 2187, 1459, 33, 8381, 4672, 400, 273, 365, 18, 588, 15292, 1210, 751, 1138, 12, 2338, 734, 16, 1459,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1289, 1210, 751, 1138, 12, 2890, 16, 906, 734, 16, 843, 5014, 16, 2869, 2218, 2187, 1459, 33, 8381, 4672, 400, 273, 365, 18, 588, 15292, 1210, 751, 1138, 12, 2338, 734, 16, 1459,...
psout = os.popen( "ps -p %s u"%pid ).read()
psout = os.popen( "ps u -p %s"%pid ).read()
def get_mem_usage(): """returns percentage and vsz mem usage of this script""" pid = os.getpid() psout = os.popen( "ps -p %s u"%pid ).read() parsed_psout = psout.split("\n")[1].split() return float(parsed_psout[3]), int( parsed_psout[4] )
81590782a8128dae53df1d56c8436f9db28916c8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10974/81590782a8128dae53df1d56c8436f9db28916c8/unit_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3917, 67, 9167, 13332, 3536, 6154, 11622, 471, 6195, 94, 1663, 4084, 434, 333, 2728, 8395, 4231, 273, 1140, 18, 588, 6610, 1435, 4250, 659, 273, 1140, 18, 84, 3190, 12, 315, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3917, 67, 9167, 13332, 3536, 6154, 11622, 471, 6195, 94, 1663, 4084, 434, 333, 2728, 8395, 4231, 273, 1140, 18, 588, 6610, 1435, 4250, 659, 273, 1140, 18, 84, 3190, 12, 315, 1...
n_kern1 = 30
n_kern1 = 10
def run_conv_nnet2(shared_fn): # pretend we are training LeNet for MNIST n_batch = 60 shape_img = (n_batch, 1, 32, 32) n_kern = 20 shape_kern = (n_kern, 1, 5, 5) n_kern1 = 30 shape_kern1 = (n_kern1, n_kern, 5, 5) logical_hid_shape = tcn.blas.GpuConv.logical_output_shape_2d((32, 32), (5, 5), 'valid') logical_hid_shape1 = tcn.blas.GpuConv.logical_output_shape_2d((logical_hid_shape[0]/2, logical_hid_shape[1]/2), (5, 5), 'valid') n_hid = n_kern1 * logical_hid_shape1[0] * logical_hid_shape1[1] n_out = 10 w0 = shared_fn(numpy.asarray(0.01*(numpy.random.rand(*shape_kern)-0.5), dtype='float32'), 'w0') b0 = shared_fn(numpy.asarray(numpy.zeros((n_kern,1,1)), dtype='float32'), 'b0') w1 = shared_fn(numpy.asarray(0.01*(numpy.random.rand(*shape_kern1)-0.5), dtype='float32'), 'w1') b1 = shared_fn(numpy.asarray(numpy.zeros((n_kern1,1,1)), dtype='float32'), 'b1') v = shared_fn(numpy.asarray(numpy.zeros((n_hid, n_out)), dtype='float32'), 'c') c = shared_fn(numpy.asarray(numpy.zeros(n_out), dtype='float32'), 'c') x = tensor.Tensor(dtype='float32', broadcastable=(0,0,0,0))('x') y = tensor.fmatrix('y') lr = tensor.fscalar('lr') conv_op = theano.sandbox.conv.ConvOp(shape_img[2:], shape_kern[2:], n_kern, n_batch, 1, 1) conv_op1 = theano.sandbox.conv.ConvOp((n_kern,logical_hid_shape[0]/2, logical_hid_shape[1]/2), shape_kern1[2:], n_kern1, n_batch, 1, 1) hid = tensor.tanh(conv_op(x, w0)+b0) hid1 = tensor.tanh(conv_op1(hid[:,:,::2,::2], w1) + b1) hid_flat = hid1.reshape((n_batch, n_hid)) out = tensor.tanh(tensor.dot(hid_flat, v)+c) loss = tensor.sum(0.5 * (out-y)**2 * lr) print 'loss type', loss.type params = [w0, b0, w1, b1, v, c] gparams = tensor.grad(loss, params) mode = get_mode() print 'building pfunc ...' train = pfunc([x,y,lr], [loss], mode=mode, updates=[(p, p-g) for p,g in zip(params, gparams)]) for i, n in enumerate(train.maker.env.toposort()): print i, n xval = numpy.asarray(numpy.random.rand(*shape_img), dtype='float32') yval = numpy.asarray(numpy.random.rand(n_batch,n_out), dtype='int32') lr = numpy.asarray(0.01, dtype='float32') for i in xrange(10): rval = train(xval, yval, lr) print_mode(mode) return rval
1b5c9a7103c69d9dffc5877df1986dce48c58747 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/1b5c9a7103c69d9dffc5877df1986dce48c58747/test_nnet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 4896, 67, 82, 2758, 22, 12, 11574, 67, 4293, 4672, 468, 675, 17445, 732, 854, 8277, 3519, 7308, 364, 490, 50, 5511, 225, 290, 67, 5303, 273, 4752, 2179, 67, 6081, 273, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4896, 67, 82, 2758, 22, 12, 11574, 67, 4293, 4672, 468, 675, 17445, 732, 854, 8277, 3519, 7308, 364, 490, 50, 5511, 225, 290, 67, 5303, 273, 4752, 2179, 67, 6081, 273, 261, ...
page.deletePage(unicode(comment), config.charset)
page.deletePage(unicode(comment, config.charset))
def delete(request, pagename, comment = None): _ = request.getText # Using the same access controls as in MoinMoin's xmlrpc_putPage # as defined in MoinMoin/wikirpc.py if (request.cfg.xmlrpc_putpage_trusted_only and not request.user.trusted): return xmlrpclib.Fault(1, _("You are not allowed to delete this page")) # check ACLs if not request.user.may.delete(pagename): return xmlrpclib.Fault(1, _("You are not allowed to delete this page")) #Deletespages page = PageEditor(request, pagename, do_editor_backup=0) page.deletePage(unicode(comment), config.charset) return True
43a78897debb346fc00653ea7ccf2c320355ff59 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/43a78897debb346fc00653ea7ccf2c320355ff59/DeletePage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2293, 16, 4262, 1069, 16, 2879, 273, 599, 4672, 389, 273, 590, 18, 588, 1528, 468, 11637, 326, 1967, 2006, 11022, 487, 316, 490, 885, 49, 885, 1807, 31811, 67, 458, 1964, 468...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2293, 16, 4262, 1069, 16, 2879, 273, 599, 4672, 389, 273, 590, 18, 588, 1528, 468, 11637, 326, 1967, 2006, 11022, 487, 316, 490, 885, 49, 885, 1807, 31811, 67, 458, 1964, 468...
print '<br/>' * 2
def create_plot(myHist): replag_data = 'replag_hist.csv' plot_name = 'replag_plot' pic_file = '../tmp/pics/replag.png' f = open( replag_data, 'w') for i, entry in enumerate( myHist): f.write('%s\t%s\n' % (i, entry) ) f.close() graph_title = 'Verteilung des Alters der ungesichteten Aenderungen' gnuplot = """ set terminal png enhanced #size 800,800 set xlabel "Rueckstand in Tagen" set ylabel "Anzahl Artikel" set output "%(pic_file)s" set title "%(graph_title)s" set xrange[-1:%(max_lag)s] plot "replag_hist.csv" notitle with boxes lt -1 lw 2 """ % { 'pic_file' : pic_file, 'graph_title' : graph_title, 'max_lag' : len( myHist ) } f = open(plot_name, 'w') f.write( gnuplot) f.close() import os os.system( "gnuplot %s" % plot_name ) print '<br/>' * 2 print "<img src=\"%s\">" % pic_file #cleanup os.system("rm %s" % plot_name) os.system("rm %s" % replag_data)
55c2d5d3119c95218884da44fabf535e76d954c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14207/55c2d5d3119c95218884da44fabf535e76d954c2/replag_lib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 4032, 12, 4811, 8648, 4672, 6831, 346, 67, 892, 273, 296, 26745, 346, 67, 11488, 18, 6715, 11, 3207, 67, 529, 273, 296, 26745, 346, 67, 4032, 11, 19189, 67, 768, 273, 225, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4032, 12, 4811, 8648, 4672, 6831, 346, 67, 892, 273, 296, 26745, 346, 67, 11488, 18, 6715, 11, 3207, 67, 529, 273, 296, 26745, 346, 67, 4032, 11, 19189, 67, 768, 273, 225, 2...
... >>> print x/0
... >>> print x//0
>>> def f(x):
a234b5762eb4de6cb8ecae9c9cb84c877a302afe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/a234b5762eb4de6cb8ecae9c9cb84c877a302afe/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 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,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 284, 12, 92, 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...
outfile = open(filename, "w")
outfile = IOTools.openFile(filename, "w", create_dir = True)
def getSamples( gene2go, genes, background, options ): sample_size = options.sample # List of all minimum probabilities in simulation simulation_min_pvalues = [] E.info( "sampling: calculating %i samples: " % (sample_size)) counts = {} prob_overs = {} prob_unders = {} samples = {} options.stdlog.write("# ") options.stdlog.flush() for x in range(sample_size): if options.loglevel >= 1: options.stdlog.write( "." ) options.stdlog.flush() ## get shuffled array of genes from background sample_genes = random.sample( background, len(genes) ) go_results = AnalyseGO( gene2go , sample_genes, background ) pairs = go_results.mResults.items() for k, v in pairs: if k not in counts: counts[k] = [] prob_overs[k] = [] prob_unders[k] = [] counts[k].append( v.mSampleCountsCategory ) prob_overs[k].append( v.mProbabilityOverRepresentation ) prob_unders[k].append( v.mProbabilityUnderRepresentation ) simulation_min_pvalues.append( min( v.mProbabilityUnderRepresentation, v.mProbabilityOverRepresentation ) ) if options.loglevel >= 1: sys.stdout.write("\n") sys.stdout.flush() E.info("sampling: sorting %i P-Values" % len(simulation_min_pvalues) ) simulation_min_pvalues.sort() simulation_min_pvalues = numpy.array(simulation_min_pvalues) samples = {} if options.output_filename_pattern: filename = options.output_filename_pattern % { 'go': ontology, 'section': "samples" } E.info( "sampling results go to %s" % filename ) outfile = open(filename, "w") else: outfile = sys.stdout outfile.write( "\t".join( ("goid", "min", "max", "mean", "median", "stddev", "CI95lower", "CI95upper", "pover", "punder", "goid", "category", "description") ) + "\n" ) for k in counts.keys(): c = counts[k] prob_overs[k].sort() prob_unders[k].sort() s = GOSample(min(c), max(c), scipy.mean(c), numpy.std(c), numpy.array(prob_overs[k]), numpy.array(prob_unders[k]), counts[k] ) samples[k] = s if k in go2info: n = go2info[k] else: n = "?" outfile.write( "%s\t%i\t%i\t%f\t%f\t%f\t%f\t%f\t%f\t%f\t%s\n" %\ (k, min(c), max(c), scipy.mean(c), scipy.median(c), numpy.std(c), scipy.stats.scoreatpercentile( c, 5 ), scipy.stats.scoreatpercentile( c, 95 ), min(prob_overs[k]), min(prob_unders[k]), n )) if options.output_filename_pattern: outfile.close() return samples, simulation_min_pvalues
950467e19974acf5042ec1347fef976f5f5f06f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4322/950467e19974acf5042ec1347fef976f5f5f06f1/GO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 2995, 12, 7529, 22, 3240, 16, 11423, 16, 5412, 16, 702, 262, 30, 225, 3296, 67, 1467, 273, 702, 18, 6358, 468, 987, 434, 777, 5224, 17958, 316, 14754, 14754, 67, 1154, 67, 84, ...
msg4=Message(iframe6, text='Message msg4.pack(side=LEFT, fill=X, padx=1) msg5=Message(iframe6, text='Message msg5.pack(side=LEFT, fill=X, padx=1)
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nhotaz,nhotabetter,nopen, \ im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\ bm_geom utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] ldate.configure(text=t) root_geom=root.geometry() try: bm_geom=bm.geometry() except: pass utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+' '[:9], \ options.auxdec.get()+' '[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 graph2.delete(ALL) graph2.create_text(80,13,anchor=CENTER,text="Moon",font=g2font) graph2.create_text(13,37,anchor=W, text="Az: %6.2f" % g.AzMoon,font=g2font) graph2.create_text(13,61,anchor=W, text="El: %6.2f" % g.ElMoon,font=g2font) graph2.create_text(13,85,anchor=W, text="Dop:%6d" % g.ndop,font=g2font) graph2.create_text(13,109,anchor=W,text="Dgrd:%5.1f" % g.Dgrd,font=g2font) if g.freeze_decode: itol=2 ltol.configure(text='Tol '+str(50)) Audio.gcom2.dftolerance=50 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 Audio.gcom2.nagain=0 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 n=int(20.0*log10(g.rms/770.0+0.01)) t="Rx noise:%3d dB" % (n,) if n>=-10 and n<=10: msg4.configure(text=t,bg='gray85') else: msg4.configure(text=t,bg='red') t=g.ftnstr(Audio.gcom2.decodedfile)
f15c753982ab17e3b44954cd158dec3caeb6c649 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/f15c753982ab17e3b44954cd158dec3caeb6c649/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 15224, 1561, 16, 82, 15224, 378, 11214, 16, 82, 3190, 16, ...
return self.paramW def setupGui(self): "agrega el widget para los parámetros + el título" self.paramW = QtGui.QWidget() self.paramW.setObjectName("MallaBaseGui") self.paramWlayout = QtGui.QVBoxLayout() self.paramWlayout.setMargin(0) self.paramWlayout.setSpacing(20) self.paramW.setLayout(self.paramWlayout) label = QtGui.QLabel("<h2>"+self.name+"</h2>") label.setAlignment(QtCore.Qt.AlignCenter) self.paramWlayout.insertWidget(0,label,0, QtCore.Qt.AlignTop) self.paramWlayout.addStretch()
return self.widget def addWidget(self,widget): self.widget.layout().addWidget(widget) def __len__(self): return len(self.rangeX) * len(self.rangeY) def checkReturnValue(self, func, val): if not operator.isSequenceType(val) or len(val) != 3: raise TypeError, "function %s does not produces a 3-tuple" % func def getParametersValues(self): return dict((par.name, par.getValue()) for par in self.parameters.values()) def addQuad(self,func,col=None): nargs = func.func_code.co_argcount freevars = set(getFreeVariables(func)) if nargs < 2: raise TypeError, "function %s needs at least 2 arguments" % func quad = Quad(func, len(self.rangeX), len(self.rangeY)) oldnames = set(self.parameters.keys()) newvars = freevars - oldnames for v in sorted(newvars): self.addParameter((v, 0, 1, 0)) d = self.getParametersValues() fbind = bindFreeVariables(func, d) val = fbind(1, 1) self.checkReturnValue(func, val) self.quads[func] = quad self.root.addChild(quad.root) def updateParameters(self): d = self.getParametersValues() for func,quad in self.quads.items(): quad.function = bindFreeVariables(func, d) def updateAll(self, val = 0): self.updateParameters() self.updateMesh() def updateMesh(self): for quad in self.quads.values(): vertices = range(len(self)) malla(vertices, quad.function, self.rangeX.min, self.rangeX.dt, len(self.rangeX), self.rangeY.min, self.rangeY.dt, len(self.rangeY)) quad.coords.point.setValues(0,len(vertices),vertices) def addParameter(self, rangep=('w', 0, 1, 0), qlabel = None): if len(rangep) == 3: rangep += rangep[1:2] sliderNpoints = 20 rangep += (sliderNpoints,) slider = Slider(rangep=rangep, func=self.updateAll) self.addWidget(slider) self.parameters[slider.name] = slider if qlabel != None: if not (type(qlabel) == list or type(qlabel) == tuple): qlabel = [qlabel] slider.qlabel = qlabel for lab in qlabel: conecta(slider, QtCore.SIGNAL("labelChanged(float)"), lab.setParamValue) return slider def getParameter(self, name): return self.parameters[name] def setRange(self, name, rangep): if name == "x": pass elif name == "y": pass else: self.getParameter(name).updateRange(rangep)
def getGui(self): return self.paramW
9891a8a08a1dc09bb4c61527ab936e9f81b96180 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12801/9891a8a08a1dc09bb4c61527ab936e9f81b96180/Plot3D.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 4881, 12, 2890, 4672, 327, 365, 18, 891, 59, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7162, 4881, 12, 2890, 4672, 327, 365, 18, 891, 59, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertEquals(len(outer_locals), 1, "len!=1 for %r" % outer_locals)
self.assertEquals(len(outer_locals), 1, "len!=1 for %r" % (outer_locals,))
def h(): i = x return locals()
6bbef917770adc0839fd7a780d922d74e9bd6b06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/6bbef917770adc0839fd7a780d922d74e9bd6b06/test_nestedscope.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 13332, 277, 273, 619, 327, 8985, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 13332, 277, 273, 619, 327, 8985, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
c.append((op, av))
cappend((op, av))
def _compile_info(code, pattern, flags): # internal: compile an info block. in the current version, # this contains min/max pattern width, and an optional literal # prefix or a character map lo, hi = pattern.getwidth() if lo == 0: return # not worth it # look for a literal prefix prefix = [] prefix_skip = 0 charset = [] # not used if not (flags & SRE_FLAG_IGNORECASE): # look for literal prefix for op, av in pattern.data: if op is LITERAL: if len(prefix) == prefix_skip: prefix_skip = prefix_skip + 1 prefix.append(av) elif op is SUBPATTERN and len(av[1]) == 1: op, av = av[1][0] if op is LITERAL: prefix.append(av) else: break else: break # if no prefix, look for charset prefix if not prefix and pattern.data: op, av = pattern.data[0] if op is SUBPATTERN and av[1]: op, av = av[1][0] if op is LITERAL: charset.append((op, av)) elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is BRANCH: c = [] for p in av[1]: if not p: break op, av = p[0] if op is LITERAL: c.append((op, av)) else: break else: charset = c elif op is IN: charset = av
99965c47f74c2ff93d6757a9e0ee25d545898b7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/99965c47f74c2ff93d6757a9e0ee25d545898b7b/sre_compile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 67, 1376, 12, 710, 16, 1936, 16, 2943, 4672, 468, 2713, 30, 4074, 392, 1123, 1203, 18, 225, 316, 326, 783, 1177, 16, 468, 333, 1914, 1131, 19, 1896, 1936, 1835, 16, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11100, 67, 1376, 12, 710, 16, 1936, 16, 2943, 4672, 468, 2713, 30, 4074, 392, 1123, 1203, 18, 225, 316, 326, 783, 1177, 16, 468, 333, 1914, 1131, 19, 1896, 1936, 1835, 16, 471, ...
self.grid_color = RGBf_to_QColor(self.grid_plane.grid_color) self.border_color = RGBf_to_QColor(self.grid_plane.normcolor)
def setup(self): self.oldNormColor = self.grid_plane.normcolor # Border color self.oldGridColor = self.grid_plane.grid_color # Grid color self.x_spacing = 2 self.name_linedit.setText(self.grid_plane.name) self.grid_color = RGBf_to_QColor(self.grid_plane.grid_color) self.border_color = RGBf_to_QColor(self.grid_plane.normcolor) self.width_spinbox.setValue(self.grid_plane.width) self.height_spinbox.setValue(self.grid_plane.height) self.x_spacing_spinbox.setValue(self.grid_plane.x_spacing) self.y_spacing_spinbox.setValue(self.grid_plane.y_spacing)
54679f8605598ab16c5711e03f5687b5ce3154b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/54679f8605598ab16c5711e03f5687b5ce3154b4/GridPlaneProp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 225, 365, 18, 1673, 14624, 2957, 273, 365, 18, 5222, 67, 21314, 18, 7959, 3266, 468, 13525, 2036, 365, 18, 1673, 6313, 2957, 273, 365, 18, 5222, 67, 21314, 18, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 4672, 225, 365, 18, 1673, 14624, 2957, 273, 365, 18, 5222, 67, 21314, 18, 7959, 3266, 468, 13525, 2036, 365, 18, 1673, 6313, 2957, 273, 365, 18, 5222, 67, 21314, 18, 52...
feedparser = _LooseFeedParser(baseuri, baselang, known_encoding and 'utf-8' or '')
feedparser = _LooseFeedParser(baseuri, baselang, known_encoding and 'utf-8' or '', entities)
def parse(url_file_stream_or_string, etag=None, modified=None, agent=None, referrer=None, handlers=[]): '''Parse a feed from a URL, file, stream, or string''' result = FeedParserDict() result['feed'] = FeedParserDict() result['entries'] = [] if _XML_AVAILABLE: result['bozo'] = 0 if type(handlers) == types.InstanceType: handlers = [handlers] try: f = _open_resource(url_file_stream_or_string, etag, modified, agent, referrer, handlers) data = f.read() except Exception, e: result['bozo'] = 1 result['bozo_exception'] = e data = '' f = None # if feed is gzip-compressed, decompress it if f and data and hasattr(f, 'headers'): if gzip and f.headers.get('content-encoding', '') == 'gzip': try: data = gzip.GzipFile(fileobj=_StringIO(data)).read() except Exception, e: # Some feeds claim to be gzipped but they're not, so # we get garbage. Ideally, we should re-request the # feed without the 'Accept-encoding: gzip' header, # but we don't. result['bozo'] = 1 result['bozo_exception'] = e data = '' elif zlib and f.headers.get('content-encoding', '') == 'deflate': try: data = zlib.decompress(data, -zlib.MAX_WBITS) except Exception, e: result['bozo'] = 1 result['bozo_exception'] = e data = '' # save HTTP headers if hasattr(f, 'info'): info = f.info() result['etag'] = info.getheader('ETag') last_modified = info.getheader('Last-Modified') if last_modified: result['modified'] = _parse_date(last_modified) if hasattr(f, 'url'): result['href'] = f.url result['status'] = 200 if hasattr(f, 'status'): result['status'] = f.status if hasattr(f, 'headers'): result['headers'] = f.headers.dict if hasattr(f, 'close'): f.close() # there are four encodings to keep track of: # - http_encoding is the encoding declared in the Content-Type HTTP header # - xml_encoding is the encoding declared in the <?xml declaration # - sniffed_encoding is the encoding sniffed from the first 4 bytes of the XML data # - result['encoding'] is the actual encoding, as per RFC 3023 and a variety of other conflicting specifications http_headers = result.get('headers', {}) result['encoding'], http_encoding, xml_encoding, sniffed_xml_encoding, acceptable_content_type = \ _getCharacterEncoding(http_headers, data) if http_headers and (not acceptable_content_type): if http_headers.has_key('content-type'): bozo_message = '%s is not an XML media type' % http_headers['content-type'] else: bozo_message = 'no Content-type specified' result['bozo'] = 1 result['bozo_exception'] = NonXMLContentType(bozo_message) result['version'], data = _stripDoctype(data) baseuri = http_headers.get('content-location', result.get('href')) baselang = http_headers.get('content-language', None) # if server sent 304, we're done if result.get('status', 0) == 304: result['version'] = '' result['debug_message'] = 'The feed has not changed since you last checked, ' + \ 'so the server sent no data. This is a feature, not a bug!' return result # if there was a problem downloading, we're done if not data: return result # determine character encoding use_strict_parser = 0 known_encoding = 0 tried_encodings = [] # try: HTTP encoding, declared XML encoding, encoding sniffed from BOM for proposed_encoding in (result['encoding'], xml_encoding, sniffed_xml_encoding): if not proposed_encoding: continue if proposed_encoding in tried_encodings: continue tried_encodings.append(proposed_encoding) try: data = _toUTF8(data, proposed_encoding) known_encoding = use_strict_parser = 1 break except: pass # if no luck and we have auto-detection library, try that if (not known_encoding) and chardet: try: proposed_encoding = chardet.detect(data)['encoding'] if proposed_encoding and (proposed_encoding not in tried_encodings): tried_encodings.append(proposed_encoding) data = _toUTF8(data, proposed_encoding) known_encoding = use_strict_parser = 1 except: pass # if still no luck and we haven't tried utf-8 yet, try that if (not known_encoding) and ('utf-8' not in tried_encodings): try: proposed_encoding = 'utf-8' tried_encodings.append(proposed_encoding) data = _toUTF8(data, proposed_encoding) known_encoding = use_strict_parser = 1 except: pass # if still no luck and we haven't tried windows-1252 yet, try that if (not known_encoding) and ('windows-1252' not in tried_encodings): try: proposed_encoding = 'windows-1252' tried_encodings.append(proposed_encoding) data = _toUTF8(data, proposed_encoding) known_encoding = use_strict_parser = 1 except: pass # if still no luck, give up if not known_encoding: result['bozo'] = 1 result['bozo_exception'] = CharacterEncodingUnknown( \ 'document encoding unknown, I tried ' + \ '%s, %s, utf-8, and windows-1252 but nothing worked' % \ (result['encoding'], xml_encoding)) result['encoding'] = '' elif proposed_encoding != result['encoding']: result['bozo'] = 1 result['bozo_exception'] = CharacterEncodingOverride( \ 'documented declared as %s, but parsed as %s' % \ (result['encoding'], proposed_encoding)) result['encoding'] = proposed_encoding if not _XML_AVAILABLE: use_strict_parser = 0 if use_strict_parser: # initialize the SAX parser feedparser = _StrictFeedParser(baseuri, baselang, 'utf-8') saxparser = xml.sax.make_parser(PREFERRED_XML_PARSERS) saxparser.setFeature(xml.sax.handler.feature_namespaces, 1) saxparser.setContentHandler(feedparser) saxparser.setErrorHandler(feedparser) source = xml.sax.xmlreader.InputSource() source.setByteStream(_StringIO(data)) if hasattr(saxparser, '_ns_stack'): # work around bug in built-in SAX parser (doesn't recognize xml: namespace) # PyXML doesn't have this problem, and it doesn't have _ns_stack either saxparser._ns_stack.append({'http://www.w3.org/XML/1998/namespace':'xml'}) try: saxparser.parse(source) except Exception, e: if _debug: import traceback traceback.print_stack() traceback.print_exc() sys.stderr.write('xml parsing failed\n') result['bozo'] = 1 result['bozo_exception'] = feedparser.exc or e use_strict_parser = 0 if not use_strict_parser: feedparser = _LooseFeedParser(baseuri, baselang, known_encoding and 'utf-8' or '') feedparser.feed(data) result['feed'] = feedparser.feeddata result['entries'] = feedparser.entries result['version'] = result['version'] or feedparser.version result['namespaces'] = feedparser.namespacesInUse return result
44482af2baebba8741223b8967e4efeaf8365c45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/44482af2baebba8741223b8967e4efeaf8365c45/feedparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 16, 4919, 33, 8526, 4672, 9163, 3201, 279, 4746...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 718, 67, 768, 67, 3256, 67, 280, 67, 1080, 16, 13655, 33, 7036, 16, 4358, 33, 7036, 16, 4040, 33, 7036, 16, 14502, 33, 7036, 16, 4919, 33, 8526, 4672, 9163, 3201, 279, 4746...
msg_root['Subject'] = Header(subject, charset)
msg_root['Subject'] = subject
def forge_email(fromaddr, toaddr, subject, content, html_content='', html_images={}, usebcc=False, header=None, footer=None, html_header=None, html_footer=None, ln=CFG_SITE_LANG, charset='utf-8'): """Prepare email. Add header and footer if needed. @param fromaddr: [string] sender @param toaddr: [string] receivers separated by , @param usebcc: [bool] True for using Bcc in place of To @param subject: [string] subject of the email @param content: [string] content of the email @param html_content: [string] html version of the email @param html_images: [dict] dictionary of image id, image path @param header: [string] None for the default header @param footer: [string] None for the default footer @param ln: language @param charset: which charset to use in message ('utf-8' by default) @return forged email as a string""" if header is None: content = email_header(ln) + content else: content = header + content if footer is None: content += email_footer(ln) else: content += footer if html_content: if html_header is None: html_content = email_html_header(ln) + html_content else: html_content = html_header + content if html_footer is None: html_content += email_html_footer(ln) else: html_content += html_footer msg_root = MIMEMultipart('related') msg_root['Subject'] = Header(subject, charset) msg_root['From'] = fromaddr if usebcc: msg_root['Bcc'] = toaddr else: msg_root['To'] = toaddr msg_root.preamble = 'This is a multi-part message in MIME format.' msg_alternative = MIMEMultipart('alternative') msg_root.attach(msg_alternative) msg_text = MIMEText(content, _charset=charset) msg_alternative.attach(msg_text) msg_text = MIMEText(html_content, 'html', _charset=charset) msg_alternative.attach(msg_text) for image_id, image_path in html_images.iteritems(): msg_image = MIMEImage(open(image_path, 'rb').read()) msg_image.add_header('Content-ID', '<%s>' % image_id) msg_image.add_header('Content-Disposition', 'attachment', filename=os.path.split(image_path)[1]) msg_root.attach(msg_image) else: msg_root = MIMEText(content, _charset=charset) msg_root['From'] = fromaddr if usebcc: msg_root['Bcc'] = toaddr else: msg_root['To'] = toaddr msg_root['Subject'] = Header(subject, charset) msg_root.add_header('User-Agent', 'CDS Invenio %s' % CFG_VERSION) return msg_root.as_string()
439e58f60a16891547553485949cee7c6b02a3c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/439e58f60a16891547553485949cee7c6b02a3c2/mailutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21388, 67, 3652, 12, 2080, 4793, 16, 358, 4793, 16, 3221, 16, 913, 16, 1729, 67, 1745, 2218, 2187, 1729, 67, 7369, 28793, 999, 31345, 33, 8381, 16, 1446, 33, 7036, 16, 9860, 33, 7036, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21388, 67, 3652, 12, 2080, 4793, 16, 358, 4793, 16, 3221, 16, 913, 16, 1729, 67, 1745, 2218, 2187, 1729, 67, 7369, 28793, 999, 31345, 33, 8381, 16, 1446, 33, 7036, 16, 9860, 33, 7036, ...
if is_white:
if is_white_key:
def key_class(updates, image_strip, image_rects, is_white=True): """Return a keyboard key widget class Arguments: updates - a set into which a key instance adds itself if it needs redrawing. image_strip - The surface containing the images of all key states. image_rects - A list of Rects giving the regions within image_strip that are relevant to this key class. is_white (default True) - Set false if this is a black key. This function automates the creation of a key widget class for the three basic key types. A key has two basic states, up or down ( depressed). Corresponding up and down images are drawn for each of these two states. But to give the illusion of depth, a key may have shadows cast upon it by the adjacent keys to its right. These shadows change depending on the up/down state of the key and its neighbors. So a key may support multiple images and states depending on the shadows. A key type is determined by the length of image_rects and the value of is_white. """ # Naming convention: Variables used by the Key class as part of a # closure start with 'c_'. # State logic and shadows: # # A key may cast a shadow upon the key to its left. A black key casts a # shadow on an adjacent white key. The shadow changes depending of whether # the black or white key is depressed. A white key casts a shadow on the # white key to its left if it is up and the left key is down. Therefore # a keys state, and image it will draw, is determined entirely by its # itself and the key immediately adjacent to it on the right. A white key # is always assumed to have an adjacent white key. # # There can be up to eight key states, representing all permutations # of the three fundamental states of self up/down, adjacent white # right up/down, adjacent black up/down. # down_state_none = 0 down_state_self = 1 down_state_white = down_state_self << 1 down_state_self_white = down_state_self | down_state_white down_state_black = down_state_white << 1 down_state_self_black = down_state_self | down_state_black down_state_white_black = down_state_white | down_state_black down_state_all = down_state_self | down_state_white_black # Some values used in the class. # c_down_state_initial = down_state_none c_down_state_rect_initial = image_rects[0] c_down_state_self = down_state_self c_updates = updates c_image_strip = image_strip c_width, c_height = image_rects[0].size # A key propagates its up/down state change to the adjacent white key on # the left by calling the adjacent key's _right_black_down or # _right_white_down method. # if is_white: key_color = 'white' else: key_color = 'black' c_notify_down_method = "_right_%s_down" % key_color c_notify_up_method = "_right_%s_up" % key_color # Images: # # A black key only needs two images, for the up and down states. Its # appearance is unaffected by the adjacent keys to its right, which cast no # shadows upon it. # # A white key with a no adjacent black to its right only needs three # images, for self up, self down, and both self and adjacent white down. # # A white key with both a black and white key to its right needs six # images: self up, self up and adjacent black down, self down, self and # adjacent white down, self and adjacent black down, and all three down. # # Each 'c_event' dictionary maps the current key state to a new key state, # along with corresponding image, for the related event. If no redrawing # is required for the state change then the image rect is simply None. # c_event_down = {down_state_none: (down_state_self, image_rects[1])} c_event_up = {down_state_self: (down_state_none, image_rects[0])} c_event_right_white_down = { down_state_none: (down_state_none, None), down_state_self: (down_state_self, None)} c_event_right_white_up = c_event_right_white_down.copy() c_event_right_black_down = c_event_right_white_down.copy() c_event_right_black_up = c_event_right_white_down.copy() if len(image_rects) > 2: c_event_down[down_state_white] = ( down_state_self_white, image_rects[2]) c_event_up[down_state_self_white] = (down_state_white, image_rects[0]) c_event_right_white_down[down_state_none] = (down_state_white, None) c_event_right_white_down[down_state_self] = ( down_state_self_white, image_rects[2]) c_event_right_white_up[down_state_white] = (down_state_none, None) c_event_right_white_up[down_state_self_white] = ( down_state_self, image_rects[1]) c_event_right_black_down[down_state_white] = ( down_state_white, None) c_event_right_black_down[down_state_self_white] = ( down_state_self_white, None) c_event_right_black_up[down_state_white] = ( down_state_white, None) c_event_right_black_up[down_state_self_white] = ( down_state_self_white, None) if len(image_rects) > 3: c_event_down[down_state_black] = (down_state_self_black, image_rects[4]) c_event_down[down_state_white_black] = (down_state_all, image_rects[5]) c_event_up[down_state_self_black] = (down_state_black, image_rects[3]) c_event_up[down_state_all] = (down_state_white_black, image_rects[3]) c_event_right_white_down[down_state_black] = ( down_state_white_black, None) c_event_right_white_down[down_state_self_black] = ( down_state_all, image_rects[5]) c_event_right_white_up[down_state_white_black] = ( down_state_black, None) c_event_right_white_up[down_state_all] = ( down_state_self_black, image_rects[4]) c_event_right_black_down[down_state_none] = ( down_state_black, image_rects[3]) c_event_right_black_down[down_state_self] = ( down_state_self_black, image_rects[4]) c_event_right_black_down[down_state_white] = ( down_state_white_black, image_rects[3]) c_event_right_black_down[down_state_self_white] = ( down_state_all, image_rects[5]) c_event_right_black_up[down_state_black] = ( down_state_none, image_rects[0]) c_event_right_black_up[down_state_self_black] = ( down_state_self, image_rects[1]) c_event_right_black_up[down_state_white_black] = ( down_state_white, image_rects[0]) c_event_right_black_up[down_state_all] = ( down_state_self_white, image_rects[2]) class Key(object): """A key widget, maintains key state and draws the key's image Constructor arguments: ident - A unique key identifier. Any immutable type suitable as a key. posn - The location of the key on the display surface. key_left - Optional, the adjacent white key to the left. Changes in up and down state are propagated to that key. A key has an associated position and state. Related to state is the image drawn. State changes are managed with method calls, one method per event type. The up and down event methods are public. Other internal methods are for passing on state changes to the key_left key instance. The key will evaluate True if it is down, False otherwise. """ def __init__(self, ident, posn, key_left = None): """Return a new Key instance The initial state is up, with all adjacent keys to the right also up. """ if key_left is None: key_left = null_key rect = Rect(posn[0], posn[1], c_width, c_height) self.rect = rect self._state = c_down_state_initial self._source_rect = c_down_state_rect_initial self._ident = ident self._hash = hash(ident) self._notify_down = getattr(key_left, c_notify_down_method) self._notify_up = getattr(key_left, c_notify_up_method) self._key_left = key_left self._background_rect = Rect(rect.left, rect.bottom - 10, c_width, 10) c_updates.add(self) def down(self): """Signal that this key has been depressed (is down)""" self._state, source_rect = c_event_down[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) self._notify_down() def up(self): """Signal that this key has been released (is up)""" self._state, source_rect = c_event_up[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) self._notify_up() def _right_white_down(self): """Signal that the adjacent white key has been depressed This method is for internal propagation of events between key instances. """ self._state, source_rect = c_event_right_white_down[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) def _right_white_up(self): """Signal that the adjacent white key has been released This method is for internal propagation of events between key instances. """ self._state, source_rect = c_event_right_white_up[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) def _right_black_down(self): """Signal that the adjacent black key has been depressed This method is for internal propagation of events between key instances. """ self._state, source_rect = c_event_right_black_down[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) def _right_black_up(self): """Signal that the adjacent black key has been released This method is for internal propagation of events between key instances. """ self._state, source_rect = c_event_right_black_up[self._state] if source_rect is not None: self._source_rect = source_rect c_updates.add(self) def __eq__(self, other): """True if same identifiers""" return self._ident == other._ident def __hash__(self): """Return the immutable hash value""" return self._hash def __str__(self): """Return the key's identifier and position as a string""" return ("<Key %s at (%d, %d)>" % (self._ident, self.rect.top, self.rect.left)) def __nonzero__(self): """True if the key is down""" return bool(self._state & c_down_state_self) def draw(self, surf, background, dirty_rects): """Redraw the key on the surface surf The background is redrawn. The altered region is added to the dirty_rects list. """ surf.blit(background, self._background_rect, self._background_rect) surf.blit(c_image_strip, self.rect, self._source_rect) dirty_rects.append(self.rect) return Key
9e61bac9fc6608263eef619c47ffd88c510cb83f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/9e61bac9fc6608263eef619c47ffd88c510cb83f/midi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 1106, 12, 14703, 16, 1316, 67, 6406, 16, 1316, 67, 2607, 87, 16, 353, 67, 14739, 33, 5510, 4672, 3536, 990, 279, 16263, 498, 3604, 667, 225, 13599, 30, 4533, 300, 279, 444, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 1106, 12, 14703, 16, 1316, 67, 6406, 16, 1316, 67, 2607, 87, 16, 353, 67, 14739, 33, 5510, 4672, 3536, 990, 279, 16263, 498, 3604, 667, 225, 13599, 30, 4533, 300, 279, 444, ...
if not lfnFilesIDs.has_key(lfn):
if not lfnFilesIDs.has_key( lfn ):
def setReplicaHost(self,replicaTuples,connection=False): gLogger.info("TransformationDB.setReplicaHost: Attempting to set SE for %s replicas." % len(replicaTuples)) successful = {} failed = {} lfns = [] for lfn,pfn,oldSE,newSE in replicaTuples: lfns.append(lfn) connection = self.__getConnection(connection) res = self.__getFileIDsForLfns(lfns,connection=connection) if not res['OK']: return res fileIDs,lfnFilesIDs = res['Value'] for lfn in lfns: if not lfnFilesIDs.has_key(lfn): successful[lfn] = 'File did not exist' seFiles = {} if fileIDs: for lfn,pfn,oldSE,newSE in replicaTuples: if not seFiles.has_key(oldSE): seFiles[oldSE] = {} if not seFiles[oldSE].has_key(newSE): seFiles[oldSE][newSE] = [] seFiles[oldSE][newSE].append(lfnFilesIDs[lfn]) for oldSE,seDict in seFiles.items(): for newSE,files in seDict.items(): res = self.__updateReplicaSE(files,oldSE,newSE,connection=connection) if not res['OK']: for fileID in files: failed[fileIDs[fileID]] = res['Message'] else: for fileID in files: successful[fileIDs[fileID]] = True resDict = {'Successful':successful,'Failed':failed} return S_OK(resDict)
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 14222, 2594, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 542, 14222, 2594, 30, 12864, 310, 358, 444, 3174, 364, 738, 87, 21545,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14222, 2594, 12, 2890, 16, 30065, 25813, 16, 4071, 33, 8381, 4672, 314, 3328, 18, 1376, 2932, 15292, 2290, 18, 542, 14222, 2594, 30, 12864, 310, 358, 444, 3174, 364, 738, 87, 21545,...
if param.has_key('finite_basis_corr') and param['finite_basis_corr'].lower() == 'true': energy_lines = filter(lambda s: s.startswith('Total energy corrected for finite basis set'), \
if param.has_key('finite_basis_corr') and param['finite_basis_corr'].lower() != 'none': energy_lines = filter(lambda s: s.startswith(' Total energy corrected for finite basis set'), \
def CastepOutputReader(castep_file, cluster=None, abort=True, save_params=False): """Parse .castep file, and return Atoms object with positions, energy, forces, and possibly stress and atomic populations as well""" if type(castep_file) == type(''): castep_file = open(castep_file,'r') castep_file = iter(castep_file) param = CastepParam() got_header = False eof = False while True: castep_output = [] while True: try: line = castep_file.next() except StopIteration: eof = True break castep_output.append(line) if line == ' | CCC AA SSS TTTTT EEEEE PPPP |\n': if got_header: got_param = True break else: got_header = True if line.startswith(' Starting BFGS iteration'): break if line.startswith(' BFGS: improving iteration'): break # NB: CASTEP doesn't always print 'Total time' run_time = -1.0 total_time = filter(lambda s: s.startswith('Total time'), castep_output) if total_time == []: has_converged = filter(lambda s: s.startswith('Total energy has converged'), castep_output) if abort and has_converged == []: raise ValueError("castep didn't complete") else: run_time = float(total_time[0].split()[3]) # Now we should have contents of a valid .castep file in castep_output # First let's read the user parameters for this run from top of file new_param = CastepParam() try: new_param.read_from_castep_output(castep_output) param.update(new_param) except ValueError: pass #if abort: # raise # Next let's extract the lattice and atomic positions lattice_lines = [i for (i,x) in enumerate(castep_output) if x == ' Unit Cell\n'] if lattice_lines == []: if abort: raise ValueError('No unit cell found in castep file') else: continue lattice_line = lattice_lines[-1] # last lattice lattice_lines = castep_output[lattice_line+3:lattice_line+6] lattice = fzeros((3,3)) lattice[:,1] = map(float, lattice_lines[0].split()[0:3]) lattice[:,2] = map(float, lattice_lines[1].split()[0:3]) lattice[:,3] = map(float, lattice_lines[2].split()[0:3]) cell_contents = [i for (i,x) in enumerate(castep_output) if x == ' Cell Contents\n'] if cell_contents == []: raise ValueError('No cell contents found in castep file') cell_first_line = cell_contents[-1] # last cell contents line try: n_atoms = int(castep_output[cell_first_line+2].split()[-1]) offset = 10 except IndexError: offset = 7 if cluster is not None: # If we were passed in an Atoms object, construct mapping from # CASTEP (element, number) to original atom index atoms = cluster.copy() species_count = {} lookup = {} for i in frange(atoms.n): el = atoms.species[i].stripstrings() if species_count.has_key(el): species_count[el] += 1 else: species_count[el] = 1 lookup[(el,species_count[el])] = i else: # Otherwise we make a new, empty Atoms object. Atoms will # be ordered as they are in .castep file. lookup = {} atoms = Atoms(n=n_atoms,lattice=lattice) atoms.params['castep_run_time'] = run_time cell_lines = castep_output[cell_first_line+offset:cell_first_line+offset+n_atoms] # Fill in species and fractional positions atoms.add_property('frac_pos',0.0,n_cols=3) for i, line in fenumerate(cell_lines): x1, el, num, u, v, w, x2 = line.split() num = int(num) if not (el,num) in lookup: lookup[(el,num)] = i atoms.set_species(lookup[(el,num)], el) atoms.frac_pos[:,lookup[(el,num)]] = map(float, (u,v,w)) # Calculate cartesian postions from fractional positions atoms.pos[:] = numpy.dot(atoms.lattice, atoms.frac_pos) if param.has_key('finite_basis_corr') and param['finite_basis_corr'].lower() == 'true': energy_lines = filter(lambda s: s.startswith('Total energy corrected for finite basis set'), \ castep_output) elif param.has_key('task') and param['task'].lower() == 'geometryoptimization': energy_lines = filter(lambda s: s.startswith(' BFGS: Final Enthalpy'), castep_output) else: energy_lines = filter(lambda s: s.startswith('Final energy') and not s.endswith('<- EDFT\n'), castep_output) if (len(energy_lines) == 0): if abort: raise ValueError('No total energy found in castep file') else: # Energy is second to last field on line (last is "eV") # Use last matching energy line in file atoms.params['energy'] = float(energy_lines[-1].split()[-2]) try: for fn in ('Forces', 'Symmetrised Forces'): force_start_lines = [i for (i,s) in enumerate(castep_output) if s.find('****** %s ******' % fn) != -1] if force_start_lines != []: break if force_start_lines == []: raise ValueError # Use last set of forces force_start = force_start_lines[-1] # Extract force lines from .castep file force_lines = castep_output[force_start+6:force_start+6+atoms.n] atoms.add_property('force',0.0,n_cols=3) # Fill in the forces for i, line in enumerate(force_lines): line = line.replace('*','') # Remove the *s el, num_str, fx, fy, fz = line.split() num = int(num_str) atoms.force[:,lookup[(el,num)]] = (fx,fy,fz) except ValueError, m: if abort: raise ValueError('No forces found in castep file %s: ' % m) # Have we calculated stress? if 'calculate_stress' in param and param['calculate_stress'].lower() == 'true': try: stress_start = castep_output.index(' ***************** Stress Tensor *****************\n') stress_lines = castep_output[stress_start+6:stress_start+9] virial = fzeros((3,3),float) for i, line in fenumerate(stress_lines): star1, label, vx, vy, vz, star2 = line.split() virial[:,i] = [float(v) for v in (vx,vy,vz) ] # Convert to libAtoms units and add to atoms.params atoms.params['virial'] = virial/GPA except ValueError: if abort: raise ValueError('No stress tensor found in .castep file') # Have we calculated local populations and charges? if 'popn_calculate' in param and param['popn_calculate'].lower() == 'true': try: popn_start = castep_output.index(' Atomic Populations\n') popn_lines = castep_output[popn_start+4:popn_start+4+atoms.n] atoms.add_property('popn_s',0.0) atoms.add_property('popn_p',0.0) atoms.add_property('popn_d',0.0) atoms.add_property('popn_f',0.0) atoms.add_property('popn_total',0.0) atoms.add_property('popn_charge',0.0) for line in popn_lines: el, num_str, s, p, d, f, tot, charge = line.split() num = int(num_str) atoms.popn_s[lookup[(el,num)]] = float(s) atoms.popn_p[lookup[(el,num)]] = float(p) atoms.popn_d[lookup[(el,num)]] = float(d) atoms.popn_f[lookup[(el,num)]] = float(f) atoms.popn_total[lookup[(el,num)]] = float(tot) atoms.popn_charge[lookup[(el,num)]] = float(charge) except ValueError: if abort: raise ValueError('No populations found in castep file') if save_params: atoms.params.update(param) yield atoms if eof: break
7e5bf464f0e7348cf82532f710e9393fadf1426d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/7e5bf464f0e7348cf82532f710e9393fadf1426d/castep.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19782, 881, 1447, 2514, 12, 4155, 881, 67, 768, 16, 2855, 33, 7036, 16, 6263, 33, 5510, 16, 1923, 67, 2010, 33, 8381, 4672, 3536, 3201, 263, 4155, 881, 585, 16, 471, 327, 7149, 87, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19782, 881, 1447, 2514, 12, 4155, 881, 67, 768, 16, 2855, 33, 7036, 16, 6263, 33, 5510, 16, 1923, 67, 2010, 33, 8381, 4672, 3536, 3201, 263, 4155, 881, 585, 16, 471, 327, 7149, 87, 7...
for repo in scan_paths(location).values():
for repo in scan_paths(self.repo_location).values():
def update_index(self): log.debug('STARTING INCREMENTAL INDEXING UPDATE') idx = open_dir(IDX_LOCATION, indexname=self.indexname) # The set of all paths in the index indexed_paths = set() # The set of all paths we need to re-index to_index = set() reader = idx.reader() writer = idx.writer() # Loop over the stored fields in the index for fields in reader.all_stored_fields(): indexed_path = fields['path'] indexed_paths.add(indexed_path) if not os.path.exists(indexed_path): # This file was deleted since it was indexed log.debug('removing from index %s' % indexed_path) writer.delete_by_term('path', indexed_path) else: # Check if this file was changed since it # was indexed indexed_time = fields['modtime'] mtime = os.path.getmtime(indexed_path) if mtime > indexed_time: # The file has changed, delete it and add it to the list of # files to reindex log.debug('adding to reindex list %s' % indexed_path) writer.delete_by_term('path', indexed_path) to_index.add(indexed_path) #writer.commit() # Loop over the files in the filesystem # Assume we have a function that gathers the filenames of the # documents to be indexed for repo in scan_paths(location).values(): for path in self.get_paths(repo.path): if path in to_index or path not in indexed_paths: # This is either a file that's changed, or a new file # that wasn't indexed before. So index it! self.add_doc(writer, path, repo) log.debug('reindexing %s' % path) writer.commit(merge=True) #idx.optimize() log.debug('>>> FINISHED <<<')
9678d60a22f33156e6641f2bbf1088d57998287c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/9678d60a22f33156e6641f2bbf1088d57998287c/daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 4672, 613, 18, 4148, 2668, 7570, 1360, 2120, 23923, 1013, 12425, 1360, 11028, 6134, 225, 2067, 273, 1696, 67, 1214, 12, 25647, 67, 15277, 16, 770, 529, 33, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1615, 12, 2890, 4672, 613, 18, 4148, 2668, 7570, 1360, 2120, 23923, 1013, 12425, 1360, 11028, 6134, 225, 2067, 273, 1696, 67, 1214, 12, 25647, 67, 15277, 16, 770, 529, 33, 2890...
'Use secureSend instead!' % self.absulute_url(0))
'Use secureSend instead!' % self.absolute_url(0))
def send(self, messageText, mto=None, mfrom=None, subject=None, encode=None): """Send email """ #raise MailHostError, 'send is disabled' if not hasattr(self,'_v_send'): LOG('SecureMailHost', WARNING, 'Deprecation warning: ' 'The usage of send() in %s is deprecated. ' 'Use secureSend instead!' % self.absulute_url(0)) self._v_send = 1
327b106d508a5b987bb386ea92c954bbee5a6b21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/327b106d508a5b987bb386ea92c954bbee5a6b21/SecureMailHost.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 883, 1528, 16, 312, 869, 33, 7036, 16, 312, 2080, 33, 7036, 16, 3221, 33, 7036, 16, 2017, 33, 7036, 4672, 3536, 3826, 2699, 3536, 468, 11628, 11542, 2594, 668, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 883, 1528, 16, 312, 869, 33, 7036, 16, 312, 2080, 33, 7036, 16, 3221, 33, 7036, 16, 2017, 33, 7036, 4672, 3536, 3826, 2699, 3536, 468, 11628, 11542, 2594, 668, 16, ...
logfilename = self.TMP_DIR + ("/%s." % tool_name) + "%p"
logfilename = self.temp_dir + ("/%s." % tool_name) + "%p"
def ToolCommand(self): """Get the valgrind command to run.""" # Note that self._args begins with the exe to be run. tool_name = self.ToolName()
a3decc81bc111808600ef9c54e85c3481d635d1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/a3decc81bc111808600ef9c54e85c3481d635d1a/valgrind_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 2189, 12, 2890, 4672, 3536, 967, 326, 1244, 3197, 728, 1296, 358, 1086, 12123, 468, 3609, 716, 365, 6315, 1968, 17874, 598, 326, 15073, 358, 506, 1086, 18, 5226, 67, 529, 273, 365...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13288, 2189, 12, 2890, 4672, 3536, 967, 326, 1244, 3197, 728, 1296, 358, 1086, 12123, 468, 3609, 716, 365, 6315, 1968, 17874, 598, 326, 15073, 358, 506, 1086, 18, 5226, 67, 529, 273, 365...
str = self._start_of('Packages') str += '<h2 class="tocheading">Packages</h2>\n' public.write(str); private.write(str) for uid in uids: if uid.is_package():
packages = [uid for uid in uids if uid.is_package()] if packages: str = self._start_of('Packages') str += '<h2 class="tocheading">Packages</h2>\n' public.write(str); private.write(str) for uid in packages:
def _write_toc(self, public, private): """ Write an HTML page containing the top-level table of contents. This page is used to select a module table of contents page, or the \"everything\" table of contents page. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. """ # Sort the list of uids by full name (case insensitive) decorated = [(u.name().lower(), u) for u in self._docmap.keys() if u.is_module()] decorated.sort() uids = [d[-1] for d in decorated]
ad7db6d38933ca92581442b5e3990a2d4d0c7dee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/ad7db6d38933ca92581442b5e3990a2d4d0c7dee/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1391, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 392, 3982, 1363, 4191, 326, 1760, 17, 2815, 1014, 434, 2939, 18, 1220, 1363, 353, 1399, 358, 2027, 279, 1605, 1014, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 67, 1391, 12, 2890, 16, 1071, 16, 3238, 4672, 3536, 2598, 392, 3982, 1363, 4191, 326, 1760, 17, 2815, 1014, 434, 2939, 18, 1220, 1363, 353, 1399, 358, 2027, 279, 1605, 1014, ...
elif line[0:7] == "$TABLE:" : self.title = initial_spaces.sub("", re.sub("\ *:\ *$", "", line[8:]))
elif line.startswith("$TABLE") : self.title = initial_spaces.sub("", line.split(":")[1])
def import_loggraph (self, loggraph_lines) : sections_passed = 0 initial_spaces = re.compile("^\s*") trailing_spaces = re.compile("\s*$") trailing_dollars = re.compile("\$\$\ *$") graph_lines = None if isinstance(loggraph_lines, str) : lines = loggraph_lines.split("\n") else : lines = loggraph_lines for raw_line in lines : line = initial_spaces.sub("", raw_line) if line == "" : pass elif line[0:7] == "$TABLE:" : self.title = initial_spaces.sub("", re.sub("\ *:\ *$", "", line[8:])) elif line[0:7] == "$GRAPHS" : graph_lines = line[8:] elif graph_lines is not None and sections_passed == 0 : graph_lines += line elif sections_passed == 1 : clean_line = trailing_dollars.sub("", line) column_labels = clean_line.split() self.column_labels = [ re.sub("_", " ", lbl) for lbl in column_labels ] elif sections_passed == 3 and line[0:2] != "$$" : fields = [ _atof(x) for x in line.split() ] self.add_row(fields) if trailing_spaces.sub("", line)[-2:] == "$$" : sections_passed += 1 if sections_passed == 1 : if graph_lines is None : graph_lines = line[:-2] else : graph_lines += line[:-2] graph_string = re.sub(":\s*$", "", re.sub("^\s*:", "", graph_lines)) fields = graph_string.split(":") i = 0 while i < len(fields) : col_strs = fields[i+2].split(",") self.add_graph(name=fields[i], type=fields[i+1], columns=[ (_atoi(x_str)-1) for x_str in col_strs ]) i += 4 elif sections_passed == 4 : break for i, column in enumerate(self.data) : column_is_ints = [ x is None or int(x)==x for x in column ] if not False in column_is_ints : newcol = [] for x in column : if x is None : newcol.append(x) else : newcol.append(int(x)) self.data[i] = newcol
69b08eca070c48e652382e2e9e0c928314a47935 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/696/69b08eca070c48e652382e2e9e0c928314a47935/data_plots.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1330, 4660, 261, 2890, 16, 613, 4660, 67, 3548, 13, 294, 7178, 67, 23603, 273, 374, 2172, 67, 9554, 273, 283, 18, 11100, 2932, 17134, 87, 7388, 13, 7341, 67, 9554, 273, 283, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 67, 1330, 4660, 261, 2890, 16, 613, 4660, 67, 3548, 13, 294, 7178, 67, 23603, 273, 374, 2172, 67, 9554, 273, 283, 18, 11100, 2932, 17134, 87, 7388, 13, 7341, 67, 9554, 273, 283, ...
V.x = A.a * B.x + A.b * B.y + A.c * B.z + A.d V.y = A.e * B.x + A.f * B.y + A.g * B.z + A.h V.z = A.i * B.x + A.j * B.y + A.k * B.z + A.l
V.x = A.a * B.x + A.b * B.y + A.c * B.z V.y = A.e * B.x + A.f * B.y + A.g * B.z V.z = A.i * B.x + A.j * B.y + A.k * B.z
def __mul__(self, other): A = self B = other if isinstance(other, Matrix4): C = Matrix4() C.a = A.a * B.a + A.b * B.e + A.c * B.i + A.d * B.m C.b = A.a * B.b + A.b * B.f + A.c * B.j + A.d * B.n C.c = A.a * B.c + A.b * B.g + A.c * B.k + A.d * B.o C.d = A.a * B.d + A.b * B.h + A.c * B.l + A.d * B.p C.e = A.e * B.a + A.f * B.e + A.g * B.i + A.h * B.m C.f = A.e * B.b + A.f * B.f + A.g * B.j + A.h * B.n C.g = A.e * B.c + A.f * B.g + A.g * B.k + A.h * B.o C.h = A.e * B.d + A.f * B.h + A.g * B.l + A.h * B.p C.i = A.i * B.a + A.j * B.e + A.k * B.i + A.l * B.m C.j = A.i * B.b + A.j * B.f + A.k * B.j + A.l * B.n C.k = A.i * B.c + A.j * B.g + A.k * B.k + A.l * B.o C.l = A.i * B.d + A.j * B.h + A.k * B.l + A.l * B.p C.m = A.m * B.a + A.n * B.e + A.o * B.i + A.p * B.m C.n = A.m * B.b + A.n * B.f + A.o * B.j + A.p * B.n C.o = A.m * B.c + A.n * B.g + A.o * B.k + A.p * B.o C.p = A.m * B.d + A.n * B.h + A.o * B.l + A.p * B.p return C else: assert isinstance(other, Vector3) V = Vector3(0, 0, 0) V.x = A.a * B.x + A.b * B.y + A.c * B.z + A.d V.y = A.e * B.x + A.f * B.y + A.g * B.z + A.h V.z = A.i * B.x + A.j * B.y + A.k * B.z + A.l return V
0faef5da65a012cb7b57905eb383d74d673a4f74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7978/0faef5da65a012cb7b57905eb383d74d673a4f74/euclid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 16411, 972, 12, 2890, 16, 1308, 4672, 432, 273, 365, 605, 273, 1308, 309, 1549, 12, 3011, 16, 7298, 24, 4672, 385, 273, 7298, 24, 1435, 385, 18, 69, 273, 432, 18, 69, 380, 605,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16411, 972, 12, 2890, 16, 1308, 4672, 432, 273, 365, 605, 273, 1308, 309, 1549, 12, 3011, 16, 7298, 24, 4672, 385, 273, 7298, 24, 1435, 385, 18, 69, 273, 432, 18, 69, 380, 605,...
task = plugin_api.get_task()
task = plugin_api.get_ui().get_task()
def onTaskOpened(self, plugin_api): # add button button = gtk.ToolButton() button.set_label("Start") button.set_icon_name('hamster-applet') button.set_tooltip_text(_("Start a new activity in Hamster Time " + \ " Tracker based on this task")) button.connect('clicked', self.task_cb, plugin_api) button.show() self.taskbutton = plugin_api.add_toolbar_item(button) task = plugin_api.get_task() records = self.get_records(task) if len(records): # add section to bottom of window vbox = gtk.VBox() inner_table = gtk.Table(rows=len(records), columns=2) if len(records)>8: s = gtk.ScrolledWindow() s.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) v=gtk.Viewport() v.add(inner_table) s.add(v) v.set_shadow_type(gtk.SHADOW_NONE) s.set_size_request(-1, 150) else: s=inner_table outer_table = gtk.Table(rows=1, columns=2) vbox.pack_start(s) vbox.pack_start(outer_table) vbox.pack_end(gtk.HSeparator()) total = 0 def add(w, a, b, offset, active=False): if active: a = "<span color='red'>%s</span>"%a b = "<span color='red'>%s</span>"%b dateLabel=gtk.Label(a) dateLabel.set_use_markup(True) dateLabel.set_alignment(xalign=0.0, yalign=0.5) dateLabel.set_size_request(200, -1) w.attach(dateLabel, left_attach=0, right_attach=1, top_attach=offset, bottom_attach=offset+1, xoptions=gtk.FILL, xpadding=20, yoptions=0) durLabel=gtk.Label(b) durLabel.set_use_markup(True) durLabel.set_alignment(xalign=0.0, yalign=0.5) w.attach(durLabel, left_attach=1, right_attach=2, top_attach=offset, bottom_attach=offset+1, xoptions=gtk.FILL, yoptions=0) active_id = self.get_active_id() for offset,i in enumerate(records): t = calc_duration(i) total += t add(inner_table, format_date(i), format_duration(t), offset, i['id'] == active_id) add(outer_table, "<big><b>Total</b></big>", "<big><b>%s</b></big>"%format_duration(total), 1) self.vbox = plugin_api.add_widget_to_taskeditor(vbox)
dfd87ad1d24fb79f33748d3fc0f46eb449fecfd0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/dfd87ad1d24fb79f33748d3fc0f46eb449fecfd0/hamster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 2174, 23115, 12, 2890, 16, 1909, 67, 2425, 4672, 468, 527, 3568, 3568, 273, 22718, 18, 6364, 3616, 1435, 3568, 18, 542, 67, 1925, 2932, 1685, 7923, 3568, 18, 542, 67, 3950, 67, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2174, 23115, 12, 2890, 16, 1909, 67, 2425, 4672, 468, 527, 3568, 3568, 273, 22718, 18, 6364, 3616, 1435, 3568, 18, 542, 67, 1925, 2932, 1685, 7923, 3568, 18, 542, 67, 3950, 67, 52...
"universe":"vanilla"
"universe":"vanilla",
def __init__(self,job,trig,cp,opts,dag): """ """ self.friendlyName = 'Make checklist' pipeline.CondorDAGNode.__init__(self,job)
c602db687f1408ba27408041036870cba78d18d2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/c602db687f1408ba27408041036870cba78d18d2/fu_Condor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4688, 16, 313, 360, 16, 4057, 16, 4952, 16, 30204, 4672, 3536, 3536, 365, 18, 29111, 461, 273, 296, 6464, 866, 1098, 11, 5873, 18, 12441, 280, 40, 1781, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 4688, 16, 313, 360, 16, 4057, 16, 4952, 16, 30204, 4672, 3536, 3536, 365, 18, 29111, 461, 273, 296, 6464, 866, 1098, 11, 5873, 18, 12441, 280, 40, 1781, ...
[ self.buffer.setdefault(u['uid'][0], u['cn'][0]) for u in users ]
[ self.buffer.setdefault(u['uid'][0], self.decode_cn(u['cn'][0])) for u in users ]
def findLDAPUsers(self, acl_folder, params='', term='', role='', dn=''): """ search for users in LDAP """ if self.REQUEST.has_key('search_user'): if params and term: try: self.buffer = {} users = acl_folder.findUser(search_param=params, search_term=term) [ self.buffer.setdefault(u['uid'], u['cn']) for u in users ] return users except: return () else: return () elif self.REQUEST.has_key('search_role'): try: self.buffer = {} users = self.getUsersByRole(acl_folder, [(role, dn)]) [ self.buffer.setdefault(u['uid'][0], u['cn'][0]) for u in users ] return users except: return () else: return ()
e5154838cf90f1a7ae7f250f42a94f43108b9a40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/e5154838cf90f1a7ae7f250f42a94f43108b9a40/plugLDAPUserFolder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 15496, 6588, 12, 2890, 16, 7895, 67, 5609, 16, 859, 2218, 2187, 2481, 2218, 2187, 2478, 2218, 2187, 8800, 2218, 11, 4672, 3536, 1623, 364, 3677, 316, 11916, 3536, 309, 365, 18, 551...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 15496, 6588, 12, 2890, 16, 7895, 67, 5609, 16, 859, 2218, 2187, 2481, 2218, 2187, 2478, 2218, 2187, 8800, 2218, 11, 4672, 3536, 1623, 364, 3677, 316, 11916, 3536, 309, 365, 18, 551...
'bg': 'Link FA', 'br': 'Liamm PuB', 'bs': 'Link FA', 'ca': 'Enllaç AD', 'da': 'Link FA', 'de': 'Link FA', 'en': 'Link FA', 'eo': 'LigoElstara', 'es': 'destacado', 'fr': 'lien AdQ', 'hr': 'Link FA', 'it': 'Link AdQ', 'lt': 'Link FA', 'lv': 'Link FA', 'nl': 'Link FA', 'no': 'Link UA', 'pl': 'Link FA', 'pt': 'Link FA', 'ru': 'Link FA', 'sl': 'Link FA', 'sr': 'Link FA', 'sv': 'UA', 'tr': 'Link FA', 'vi': 'Liên kết chọn lọc',
'bg': u'Link FA', 'br': u'Liamm PuB', 'bs': u'Link FA', 'ca': u'Enllaç AD', 'da': u'Link FA', 'de': u'Link FA', 'en': u'Link FA', 'eo': u'LigoElstara', 'es': u'destacado', 'fr': u'lien AdQ', 'hr': u'Link FA', 'it': u'Link AdQ', 'lt': u'Link FA', 'lv': u'Link FA', 'nl': u'Link FA', 'no': u'Link UA', 'pl': u'Link FA', 'pt': u'Link FA', 'ru': u'Link FA', 'sl': u'Link FA', 'sr': u'Link FA', 'sv': u'UA', 'tr': u'Link FA', 'vi': u'Liên kết chọn lọc',
def LINKS(site,name, ignore=[]): p=wikipedia.Page(site, name) links=p.linkedPages() for n in links[:]: t=n.titleWithoutNamespace() if t[0] in u"/#" or t in ignore: links.remove(n) links.sort() return links
09aab92b74b29b78fbb1e2084b167b7cb6ee205c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/09aab92b74b29b78fbb1e2084b167b7cb6ee205c/featured.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22926, 55, 12, 4256, 16, 529, 16, 2305, 33, 8526, 4672, 293, 33, 11999, 13744, 18, 1964, 12, 4256, 16, 508, 13, 4716, 33, 84, 18, 17738, 5716, 1435, 364, 290, 316, 4716, 10531, 14542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22926, 55, 12, 4256, 16, 529, 16, 2305, 33, 8526, 4672, 293, 33, 11999, 13744, 18, 1964, 12, 4256, 16, 508, 13, 4716, 33, 84, 18, 17738, 5716, 1435, 364, 290, 316, 4716, 10531, 14542, ...
'Arrangements of the (multi-)set [1, 2, 3] of length 2' """ return "Arrangements of the (multi-)set %s of length %s"%(self.mset,self.k)
'Arrangements of the set [1, 2, 3] of length 2' """ return "Arrangements of the set %s of length %s"%(self.set,self.k)
def __repr__(self): """ TESTS: sage: repr(Arrangements([1,2,3],2)) 'Arrangements of the (multi-)set [1, 2, 3] of length 2' """ return "Arrangements of the (multi-)set %s of length %s"%(self.mset,self.k)
2cd989d0145c5f5058eae905bd3f0d97a625d18d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/2cd989d0145c5f5058eae905bd3f0d97a625d18d/permutation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 3536, 22130, 55, 30, 272, 410, 30, 8480, 12, 5715, 539, 17110, 3816, 21, 16, 22, 16, 23, 6487, 22, 3719, 296, 5715, 539, 17110, 434, 326, 261, 7027, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12715, 972, 12, 2890, 4672, 3536, 22130, 55, 30, 272, 410, 30, 8480, 12, 5715, 539, 17110, 3816, 21, 16, 22, 16, 23, 6487, 22, 3719, 296, 5715, 539, 17110, 434, 326, 261, 7027, ...
def fl_set_input_scrollbarsize(ob, hh, vw): """ fl_set_input_scrollbarsize(ob, hh, vw) """ _fl_set_input_scrollbarsize(ob, hh, vw)
def fl_set_input_scrollbarsize(pObject, hh, vw): """ fl_set_input_scrollbarsize(pObject, hh, vw) """ _fl_set_input_scrollbarsize(pObject, hh, vw)
def fl_set_input_scrollbarsize(ob, hh, vw): """ fl_set_input_scrollbarsize(ob, hh, vw) """ _fl_set_input_scrollbarsize(ob, hh, vw)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 2630, 67, 12033, 3215, 1467, 12, 84, 921, 16, 18629, 16, 331, 91, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 12033, 3215, 1467, 12, 84, 921, 16, 18629, 16, 331, 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, 1183, 67, 542, 67, 2630, 67, 12033, 3215, 1467, 12, 84, 921, 16, 18629, 16, 331, 91, 4672, 3536, 1183, 67, 542, 67, 2630, 67, 12033, 3215, 1467, 12, 84, 921, 16, 18629, 16, 331, 91, ...
return http.Response(stream = template('source_code.html', src_filename=self.path, src=src, username=self.username))
return HTMLResponse(stream = template('source_code.html', src_filename=self.path, src=src, username=self.username))
def render(self, ctx): filename = self.path if os.path.isfile(filename): if not os.path.exists(filename): src = "No such file '%s'"%filename else: src = open(filename).read() src = escape(src) return http.Response(stream = template('source_code.html', src_filename=self.path, src=src, username=self.username)) else: return static.File(filename)
39855fabbbbe971c1c1d64566b1625e9c1c6d482 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/39855fabbbbe971c1c1d64566b1625e9c1c6d482/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 1544, 273, 365, 18, 803, 309, 1140, 18, 803, 18, 291, 768, 12, 3459, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 3459, 4672, 1705, 273, 315, 2279, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 1544, 273, 365, 18, 803, 309, 1140, 18, 803, 18, 291, 768, 12, 3459, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 3459, 4672, 1705, 273, 315, 2279, 41...
elif mode == 2:
elif whence == 2:
def seek(self, pos, mode = 0): """Seek to specified position into the chunk. Default position is 0 (start of chunk). If the file is not seekable, this will result in an error.
b823bf7efa5496356485b77548b3924e03e9736f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b823bf7efa5496356485b77548b3924e03e9736f/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 949, 16, 1965, 273, 374, 4672, 3536, 16134, 358, 1269, 1754, 1368, 326, 2441, 18, 2989, 1754, 353, 374, 261, 1937, 434, 2441, 2934, 971, 326, 585, 353, 486, 6520, 4...
if contrib > amount: contrib = amount
def _calculate(self, cr, uid, ids, field_names, arg, context): res = {} for rs in self.browse(cr, uid, ids, context): allow = 0.0 deduct = 0.0 others = 0.0 obj = {'basic':rs.basic} for line in rs.line_ids: amount = 0.0 if line.amount_type == 'per': amount = line.amount * eval(line.category_id.base, obj) elif line.amount_type == 'fix': amount = line.amount
141651ca39fe619b710e09c88b7a98313e1f96e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/141651ca39fe619b710e09c88b7a98313e1f96e4/hr_payroll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11162, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 4672, 400, 273, 2618, 364, 3597, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11162, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 652, 67, 1973, 16, 1501, 16, 819, 4672, 400, 273, 2618, 364, 3597, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16, 3258, 16, 819,...
... "Returns the nth item or empty list" ... return list(islice(iterable, n, n+1))
... "Returns the nth item or None" ... return next(islice(iterable, n, None), None)
>>> def nth(iterable, n):
5864b91df5330e0effe1712ff908c6df9e68b8b9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/5864b91df5330e0effe1712ff908c6df9e68b8b9/test_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 20196, 12, 15364, 16, 290, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 20196, 12, 15364, 16, 290, 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, -1...
self.crop = (0, 0, 50, 50)
self.crop = (0, 1, 63, 67)
def __init__(self): GameDataMod.__init__(self) self.gamedata = Fame() self.crop = (0, 0, 50, 50)
f0c6ea67b60f48b2f15e4536d87b33ce61cce790 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1596/f0c6ea67b60f48b2f15e4536d87b33ce61cce790/gamedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 14121, 751, 1739, 16186, 2738, 972, 12, 2890, 13, 365, 18, 75, 2808, 396, 273, 478, 339, 1435, 365, 18, 13758, 273, 261, 20, 16, 374, 16, 6437, 16, 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, 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, 14121, 751, 1739, 16186, 2738, 972, 12, 2890, 13, 365, 18, 75, 2808, 396, 273, 478, 339, 1435, 365, 18, 13758, 273, 261, 20, 16, 374, 16, 6437, 16, 6...
fileinfo="Created using Pylo",
fileinfo="Created using PyVisfile",
def __init__(self, pathname, create=True, mode=None, fileinfo="Created using Pylo", target=DB_LOCAL, filetype=None): if create: if mode is None: mode = DB_NOCLOBBER if filetype is None: filetype = DB_PDB _internal.DBFile.__init__(self, pathname, mode, target, fileinfo, filetype) else: if mode is None: mode = DB_APPEND if filetype is None: filetype = DB_UNKNOWN _internal.DBFile.__init__(self, pathname, filetype, mode)
bcdcc0cf4d66f4619dbb85f174a3a5a5ac2d35a5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12867/bcdcc0cf4d66f4619dbb85f174a3a5a5ac2d35a5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9806, 16, 752, 33, 5510, 16, 1965, 33, 7036, 16, 25253, 1546, 6119, 1450, 4707, 3282, 768, 3113, 1018, 33, 2290, 67, 14922, 16, 18902, 33, 7036, 4672, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9806, 16, 752, 33, 5510, 16, 1965, 33, 7036, 16, 25253, 1546, 6119, 1450, 4707, 3282, 768, 3113, 1018, 33, 2290, 67, 14922, 16, 18902, 33, 7036, 4672, 30...
[9.2223794013, 13.907549862, 17.442776978, 19.656513140, 22.336103640]
[9.22237939, 13.9075498, 17.4427769, 19.6565131, 22.3361036]
def zeros(self, n, L=''): """ Return the imaginary parts of the first $n$ nontrivial zeros of the $L$-function in the upper half plane, as 32-bit reals.
af576a1b95672091929f0aca5790ac0d5f4e1538 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/af576a1b95672091929f0aca5790ac0d5f4e1538/lcalc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4922, 12, 2890, 16, 290, 16, 511, 2218, 11, 4672, 3536, 2000, 326, 30852, 2140, 434, 326, 1122, 271, 82, 8, 1661, 313, 20109, 4922, 434, 326, 271, 48, 8, 17, 915, 316, 326, 3854, 881...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4922, 12, 2890, 16, 290, 16, 511, 2218, 11, 4672, 3536, 2000, 326, 30852, 2140, 434, 326, 1122, 271, 82, 8, 1661, 313, 20109, 4922, 434, 326, 271, 48, 8, 17, 915, 316, 326, 3854, 881...