rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
print bold_green("[F]ONT SIZE CACHE <Kb>") print bold_green("[I]MAGE SIZE CACHE <Kb>")
print bold_green("[f]ont size cache <Kb>") print bold_green("[i]mage size cache <Kb>")
def e17_cache(): try: import pyetun_cache font=pyetun_cache.get_font_cache() img=pyetun_cache.get_image_cache() print "> Cache values:" print bold_yellow("=> "), print "Font: ",font[0],"Kb [default: 512Kb]" print bold_yellow("=> "), print "Image:",img[0], "Kb [default: 4096Kb]" print bold_red("> Options: ") print bold_green("[F]ONT SIZE CACHE <Kb>") print bold_green("[I]MAGE SIZE CACHE <Kb>") print "> CTRL+C - Main Menu" valu=raw_input("Option: ") while 1: try: t=valu.split(" ") opt=t[0] value=t[1] except: print bold ("> Error: m00, wrong move! Try again..") e17_cache() if opt=="f": try: value=float(value) pyetun_cache.set_font_cache(value) print bold("Done!") e17_cache() except ValueError: print bold("[error]: Value must be a valid number") e17_cache() elif opt=="i": try: value=float(value) pyetun_cache.set_image_cache(value) print bold("Done!") e17_cache() except ValueError: print bold("[error]: Value must be a valid number") e17_cache() else: print bold("[error] m000 wrong option!") e17_cache() except KeyboardInterrupt: print "\nOops! exiting ;)" console()
2dc56bf12f43e29753088b6cfaeea43096646f6a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2281/2dc56bf12f43e29753088b6cfaeea43096646f6a/pyetun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 4033, 67, 2493, 13332, 225, 775, 30, 1930, 2395, 278, 318, 67, 2493, 3512, 33, 2074, 278, 318, 67, 2493, 18, 588, 67, 5776, 67, 2493, 1435, 3774, 33, 2074, 278, 318, 67, 2493, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 425, 4033, 67, 2493, 13332, 225, 775, 30, 1930, 2395, 278, 318, 67, 2493, 3512, 33, 2074, 278, 318, 67, 2493, 18, 588, 67, 5776, 67, 2493, 1435, 3774, 33, 2074, 278, 318, 67, 2493, 1...
return (paging_informations, results[paging_informations[0]:paging_informations[1]])
return (paging_informations, res[paging_informations[0]:paging_informations[1]])
def simpleSearch(self, query='', skey='', rkey=0, page_search_start='', search_languages=[], obj_types='', sreleased='', sreleased_when='0', where='all'): """ Default search method """ try: page_search_start = int(page_search_start) except: page_search_start = 0 if query: if where == 'all': path = '' else: path = where if type(query) == type(''): query = self.utStrEscapeForSearch(query) results = [] l_query = 'self.getCatalogedObjects(approved=1, path=path' if obj_types != '': l_query += ', meta_type=%s' % obj_types try: l_released = self.utConvertStringToDateTimeObj(sreleased) except: l_released = '' if l_released: if sreleased_when == '1': l_query += ', releasedate=l_released, releasedate_range=\'min\'' else: l_query += ', releasedate=l_released, releasedate_range=\'max\'' try: trans_query = self.translateQuery(query, search_languages) for lang in search_languages: l_expr = l_query if query: l_expr += ', objectkeywords_%s=trans_query[\'%s\']' % (lang, lang) l_expr += ')' results.extend(eval(l_expr)) l_query += ', PrincipiaSearchSource=query)' results.extend(eval(l_query)) except: results = [] results = self.utEliminateDuplicatesByURL(results) batch_obj = batch_utils(self.numberresultsperpage, len(results), page_search_start) if skey != '': results = self.utSortObjsListByAttr(results, skey, rkey) if len(results) > 0: paging_informations = batch_obj.butGetPagingInformations() else: paging_informations = (-1, 0, 0, -1, -1, 0, self.numberresultsperpage, [0]) return (paging_informations, results[paging_informations[0]:paging_informations[1]]) else: return []
7228bb0404730bf7e4e34cc31c86a189ccf234c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/7228bb0404730bf7e4e34cc31c86a189ccf234c1/SEMIDESite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4143, 2979, 12, 2890, 16, 843, 2218, 2187, 272, 856, 2218, 2187, 436, 856, 33, 20, 16, 1363, 67, 3072, 67, 1937, 2218, 2187, 1623, 67, 14045, 22850, 6487, 1081, 67, 2352, 2218, 2187, 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, 4143, 2979, 12, 2890, 16, 843, 2218, 2187, 272, 856, 2218, 2187, 436, 856, 33, 20, 16, 1363, 67, 3072, 67, 1937, 2218, 2187, 1623, 67, 14045, 22850, 6487, 1081, 67, 2352, 2218, 2187, 2...
except: log("bad query: %s" % self._obj.query, netsvc.LOG_ERROR)
except Exception, e: log("bad query: %s" % self._obj.query) log(e)
def execute(self, query, params=None): self.count+=1 if '%d' in query or '%f' in query: log(query, netsvc.LOG_WARNING) log("SQL queries mustn't containt %d or %f anymore. Use only %s", netsvc.LOG_WARNING) if params: query = query.replace('%d', '%s').replace('%f', '%s')
12277aacd8c2401105c01fa9bf276c17588faefa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12853/12277aacd8c2401105c01fa9bf276c17588faefa/sql_db.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 843, 16, 859, 33, 7036, 4672, 365, 18, 1883, 15, 33, 21, 309, 1995, 72, 11, 316, 843, 578, 1995, 74, 11, 316, 843, 30, 613, 12, 2271, 16, 21954, 4227, 18, 4842,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 843, 16, 859, 33, 7036, 4672, 365, 18, 1883, 15, 33, 21, 309, 1995, 72, 11, 316, 843, 578, 1995, 74, 11, 316, 843, 30, 613, 12, 2271, 16, 21954, 4227, 18, 4842,...
arch__name__in=(self.arch.name, 'Any'))
arch__name__in=(self.arch.name, 'any'))
def get_requiredby(self): """ Returns a list of package objects. """ requiredby = Package.objects.select_related('arch', 'repo').filter( packagedepend__depname=self.pkgname, arch__name__in=(self.arch.name, 'Any')) return requiredby.order_by('pkgname')
9374a2821c3c3d5be4f2b32bc404b920698d5281 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11256/9374a2821c3c3d5be4f2b32bc404b920698d5281/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4718, 1637, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2181, 2184, 18, 3536, 1931, 1637, 273, 7508, 18, 6911, 18, 4025, 67, 9243, 2668, 991, 2187, 296, 7422, 16063, 2188, 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, 336, 67, 4718, 1637, 12, 2890, 4672, 3536, 2860, 279, 666, 434, 2181, 2184, 18, 3536, 1931, 1637, 273, 7508, 18, 6911, 18, 4025, 67, 9243, 2668, 991, 2187, 296, 7422, 16063, 2188, 12, ...
declare_opcode_set(op_load, 0x8E, 2, 0x10)
declare_opcode_set(op_load, 0x8E, 3, 0x10)
def op_load(self, *args): """"""
92af643ed01cfa78abdc1df4c1f1030d7e8c8acd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2052/92af643ed01cfa78abdc1df4c1f1030d7e8c8acd/zcpu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1061, 67, 945, 12, 2890, 16, 380, 1968, 4672, 3536, 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, 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, 1061, 67, 945, 12, 2890, 16, 380, 1968, 4672, 3536, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: self.SelectBlock (rowStart, 0, rowEnd, columns, True) except: import pdb; pdb.set_trace()
self.SelectBlock (rowStart, 0, rowEnd, columns, True)
def UpdateSelection(columns): """ Update the grid's selection based on the collection's selection.
69735f32a6bc57fc5de969e4b22a429dcc156cc5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/69735f32a6bc57fc5de969e4b22a429dcc156cc5/Table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 6233, 12, 5112, 4672, 3536, 2315, 326, 3068, 1807, 4421, 2511, 603, 326, 1849, 1807, 4421, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2315, 6233, 12, 5112, 4672, 3536, 2315, 326, 3068, 1807, 4421, 2511, 603, 326, 1849, 1807, 4421, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
arguments[arg] = conv[arg](value)
arguments[arg] = converters[types[arg]](value)
func, doc, arg_def = actions[args.pop(0)]
9d229c12a656f5bdeb54d83e4be6a68383a180f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14437/9d229c12a656f5bdeb54d83e4be6a68383a180f7/script.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1326, 16, 997, 16, 1501, 67, 536, 273, 4209, 63, 1968, 18, 5120, 12, 20, 25887, 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, 1326, 16, 997, 16, 1501, 67, 536, 273, 4209, 63, 1968, 18, 5120, 12, 20, 25887, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""fails the test if C{condition} evaluates to False
""" Fail the test if C{condition} evaluates to True.
def failIf(self, condition, msg=None): """fails the test if C{condition} evaluates to False
434843ce198b9e23446e9e85eb5ec545f8834e3e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12595/434843ce198b9e23446e9e85eb5ec545f8834e3e/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 12, 2890, 16, 2269, 16, 1234, 33, 7036, 4672, 3536, 6870, 87, 326, 1842, 309, 385, 95, 4175, 97, 20996, 358, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 12, 2890, 16, 2269, 16, 1234, 33, 7036, 4672, 3536, 6870, 87, 326, 1842, 309, 385, 95, 4175, 97, 20996, 358, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
super(SoftwareAudio, self).__init__(name, """ ( capsselect name=capsselect ! seamless-a52dec ! audioconvert ! audioscale ! capsaggreg name=capsaggreg ! seamless-queue name=audioqueue ! { %(audioSink)s name=audiosink } capsselect.src%%d ! dvdlpcmdec ! audioconvert ! audioscale ! capsaggreg.sink%%d capsselect.src%%d ! dtsdec ! audioconvert ! audioscale ! capsaggreg.sink%%d ) """ % options) self.ghostify('capsselect', 'sink') self.clock = self.get_by_name('audiosink').get_clock() def getClock(self): return self.clock class SpdifAudio(ParsedBin):
super(SoftwareAudio, self).__init__(name) self.makeSubelem('a52dec') self.makeSubelem('audioconvert') self.makeSubelem('queue') self.makeSubelem(options['audioSink'], 'audiosink') self.link('a52dec', 'audioconvert') self.link('audioconvert', 'queue') self.link('queue', 'audiosink') self.ghostify('a52dec', 'sink') class SpdifAudio(Bin):
def __init__(self, options, name='audiodec'): super(SoftwareAudio, self).__init__(name, """ ( capsselect name=capsselect ! seamless-a52dec ! audioconvert ! audioscale ! capsaggreg name=capsaggreg ! seamless-queue name=audioqueue ! { %(audioSink)s name=audiosink }
70235f0b26c68b6a00cbb5861103371054ee2dac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5222/70235f0b26c68b6a00cbb5861103371054ee2dac/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 4672, 2240, 12, 21742, 12719, 16, 365, 2934, 972, 2738, 972, 12, 529, 16, 3536, 261, 3523, 1049, 13759, 508, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 702, 16, 508, 2218, 24901, 77, 390, 71, 11, 4672, 2240, 12, 21742, 12719, 16, 365, 2934, 972, 2738, 972, 12, 529, 16, 3536, 261, 3523, 1049, 13759, 508, ...
self.abeLoginName = "login-abe.ncsa.teragrid.org" self.abeFTPName = "gridftp-abe.ncsa.teragrid.org" self.abePrefix = "gsiftp://"+self.abeFTPName
def __init__(self, runid, logger, verbosity): # TODO: these should be in the .paf file self.abeLoginName = "login-abe.ncsa.teragrid.org" self.abeFTPName = "gridftp-abe.ncsa.teragrid.org" self.abePrefix = "gsiftp://"+self.abeFTPName self.runid = runid self.logger = logger self.logger.log(Log.DEBUG, "DagmanPipelineConfigurator:__init__") self.verbosity = verbosity
1fb3f7fa866723cfb3d990406bd820081e110527 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6549/1fb3f7fa866723cfb3d990406bd820081e110527/DagmanPipelineConfigurator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1086, 350, 16, 1194, 16, 11561, 4672, 468, 2660, 30, 4259, 1410, 506, 316, 326, 263, 84, 1727, 585, 565, 365, 18, 2681, 350, 273, 1086, 350, 365, 18, 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, 1001, 2738, 972, 12, 2890, 16, 1086, 350, 16, 1194, 16, 11561, 4672, 468, 2660, 30, 4259, 1410, 506, 316, 326, 263, 84, 1727, 585, 565, 365, 18, 2681, 350, 273, 1086, 350, 365, 18, 4...
raise builderrors.LoadRecipeError('unable to load recipe file %s: %s'\
raise builderrors.LoadRecipeError('unable to load recipe file %s:\n%s'\
def __init__(self, filename, cfg=None, repos=None, component=None, branch=None, ignoreInstalled=False, directory=None): try: self._load(filename, cfg, repos, component, branch, ignoreInstalled, directory) except Exception, err: raise builderrors.LoadRecipeError('unable to load recipe file %s: %s'\ % (filename, err))
3f656a1f46959bfd61935d1e05f5c3985ca76a65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/3f656a1f46959bfd61935d1e05f5c3985ca76a65/loadrecipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 2776, 33, 7036, 16, 13686, 33, 7036, 16, 1794, 33, 7036, 16, 3803, 33, 7036, 16, 2305, 16747, 33, 8381, 16, 1867, 33, 7036, 4672, 775, 30, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1544, 16, 2776, 33, 7036, 16, 13686, 33, 7036, 16, 1794, 33, 7036, 16, 3803, 33, 7036, 16, 2305, 16747, 33, 8381, 16, 1867, 33, 7036, 4672, 775, 30, 36...
def get_keyword_map(self): """Return a dict of all keywords."""
def get_modules(self, fn2index): rv = {} for name, (doc, _, _, _) in self.env.modules.iteritems(): rv[name] = fn2index[doc] return rv def get_descrefs(self, fn2index):
def get_keyword_map(self): """Return a dict of all keywords.""" rv = {} dt = self._desctypes for kw, (ref, _, _, _) in self.env.modules.iteritems(): rv[kw] = (ref, 0) for kw, (ref, ref_type) in self.env.descrefs.iteritems(): try: i = dt[ref_type] except KeyError: i = len(dt) dt[ref_type] = i rv[kw] = (ref, i) return rv
0cc9cc5eaab5f76da7e3e52a5f0891dc3e6a2e14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5532/0cc9cc5eaab5f76da7e3e52a5f0891dc3e6a2e14/search.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6400, 12, 2890, 16, 2295, 22, 1615, 4672, 5633, 273, 2618, 364, 508, 16, 261, 2434, 16, 389, 16, 389, 16, 389, 13, 316, 365, 18, 3074, 18, 6400, 18, 2165, 3319, 13332, 5633,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6400, 12, 2890, 16, 2295, 22, 1615, 4672, 5633, 273, 2618, 364, 508, 16, 261, 2434, 16, 389, 16, 389, 16, 389, 13, 316, 365, 18, 3074, 18, 6400, 18, 2165, 3319, 13332, 5633,...
try: id = int(qualifier)
try: uid = int(qualifier)
def text_to_entrytuple(self, text): """Return entrytuple given text like 'user:foo:r--'""" typetext, qualifier, permtext = text.split(':') if qualifier: try: id = int(qualifier) except ValueError: namepair = (None, qualifier) else: namepair = (uid, None)
edf68632dab8c73b2959a25dc8085fbdb1db887e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/edf68632dab8c73b2959a25dc8085fbdb1db887e/eas_acls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 67, 869, 67, 4099, 8052, 12, 2890, 16, 977, 4672, 3536, 990, 1241, 8052, 864, 977, 3007, 296, 1355, 30, 11351, 30, 86, 413, 11, 8395, 3815, 27830, 16, 12327, 16, 4641, 955, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 67, 869, 67, 4099, 8052, 12, 2890, 16, 977, 4672, 3536, 990, 1241, 8052, 864, 977, 3007, 296, 1355, 30, 11351, 30, 86, 413, 11, 8395, 3815, 27830, 16, 12327, 16, 4641, 955, 273, ...
log( "sl.recv len", 1 )
def run( self ): global terminate
7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10890/7c7a679102e6ac5ef4702ffb14ac6f40280d6ba5/slimv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 2552, 10850, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 365, 262, 30, 2552, 10850, 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...
tb = ['Traceback (innermost last):\n',
tb = [tb_id+'\n',
def readlines(self): return self.data
7ee3cac39bfb677751dc2f74cc73505ab26060f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/7ee3cac39bfb677751dc2f74cc73505ab26060f2/ErrorStack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 4672, 327, 365, 18, 892, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 4672, 327, 365, 18, 892, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
checkHBox.pack_start (self.label, FALSE, FALSE, 0)
checkHBox.pack_start (self.label, False, False, 0)
def __init__ (self, label, justify=gtk.JUSTIFY_LEFT, wrap=TRUE, width=-1, height=-1): """ Constructor. """ gtk.CheckButton.__init__ (self) checkHBox = gtk.HBox() self.text = escapeMarkup (label) self.label = gtk.Label(label) self.label.set_justify (justify) self.label.set_line_wrap (wrap) self.label.set_size_request (width, height) self.label.show() checkHBox.pack_start (self.label, FALSE, FALSE, 0) checkHBox.show() self.add (checkHBox)
ab8126074d7036807d1d842171687cc01617a181 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4580/ab8126074d7036807d1d842171687cc01617a181/driconf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 1433, 16, 31455, 33, 4521, 79, 18, 46, 5996, 12096, 67, 10066, 16, 2193, 33, 18724, 16, 1835, 29711, 21, 16, 2072, 29711, 21, 4672, 3536, 11417, 18, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 261, 2890, 16, 1433, 16, 31455, 33, 4521, 79, 18, 46, 5996, 12096, 67, 10066, 16, 2193, 33, 18724, 16, 1835, 29711, 21, 16, 2072, 29711, 21, 4672, 3536, 11417, 18, 353...
print "t = %f, w = %f" % (t, w)
def updateFunc(self, t, event=Interval.IVAL_NONE): """ updateFunc(t, event) Go to time t """ if (self.actor.isEmpty()): self.notify.warning('updateFunc() - %s empty actor!' % self.name) return
24959a514a0e1da2fab982e5d99bdb2d2d5c4db3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/24959a514a0e1da2fab982e5d99bdb2d2d5c4db3/ActorInterval.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2622, 12, 2890, 16, 268, 16, 871, 33, 4006, 18, 45, 2669, 67, 9826, 4672, 3536, 1089, 2622, 12, 88, 16, 871, 13, 4220, 358, 813, 268, 3536, 309, 261, 2890, 18, 3362, 18, 291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 2622, 12, 2890, 16, 268, 16, 871, 33, 4006, 18, 45, 2669, 67, 9826, 4672, 3536, 1089, 2622, 12, 88, 16, 871, 13, 4220, 358, 813, 268, 3536, 309, 261, 2890, 18, 3362, 18, 291, ...
params[col._label] = mapper._get_state_attr_by_column(row_switches.get(state, state), col) params[col.key] = mapper.version_id_generator(params[col._label])
params[col._label] = \ mapper._get_state_attr_by_column( row_switch or state, col) params[col.key] = \ mapper.version_id_generator(params[col._label])
def _save_obj(self, states, uowtransaction, postupdate=False, post_update_cols=None, single=False): """Issue ``INSERT`` and/or ``UPDATE`` statements for a list of objects.
dfab13e9ae147a7112a23db5abc4e4b7addc00fa /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/dfab13e9ae147a7112a23db5abc4e4b7addc00fa/mapper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 2603, 12, 2890, 16, 5493, 16, 18215, 7958, 16, 1603, 2725, 33, 8381, 16, 1603, 67, 2725, 67, 6842, 33, 7036, 16, 2202, 33, 8381, 4672, 3536, 12956, 12176, 11356, 10335, ...
[(0,1,0,0,1),(1,1,1,1,1)], 'reflect')
array([start, end]), 'reflect')
def do_draw(self, gc): w = gc.width() h = gc.height() # Draw a red gradient filled box with green border gc.rect(w/4, h/4, w/2, h/2) gc.set_line_width(5.0) gc.set_stroke_color((0.0, 1.0, 0.0, 1.0)) gc.radial_gradient(w/4, h/4, 200, w/4+100, h/4+100, [(0,1,0,0,1),(1,1,1,1,1)], 'reflect') gc.draw_path() return
8bd3a659d2220ac943209aa64904a046b18b375e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/8bd3a659d2220ac943209aa64904a046b18b375e/qt4_simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 9446, 12, 2890, 16, 8859, 4672, 341, 273, 8859, 18, 2819, 1435, 366, 273, 8859, 18, 4210, 1435, 468, 10184, 279, 1755, 10292, 6300, 3919, 598, 10004, 5795, 8859, 18, 2607, 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, 741, 67, 9446, 12, 2890, 16, 8859, 4672, 341, 273, 8859, 18, 2819, 1435, 366, 273, 8859, 18, 4210, 1435, 468, 10184, 279, 1755, 10292, 6300, 3919, 598, 10004, 5795, 8859, 18, 2607, 12, ...
preset_name = pubsub_evt.data
preset_name = pubsub_evt.data
def SaveRaycastingPreset(self, pubsub_evt): preset_name = pubsub_evt.data preset = prj.Project().raycasting_preset preset['name'] = preset_name preset_dir = os.path.join(const.USER_RAYCASTING_PRESETS_DIRECTORY, preset_name + '.plist') plistlib.writePlist(preset, preset_dir)
eac91d7223d3ddf2f0aaa35ff98f32be4b182cf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10228/eac91d7223d3ddf2f0aaa35ff98f32be4b182cf6/control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 54, 528, 4155, 310, 18385, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 12313, 67, 529, 273, 23288, 67, 73, 11734, 18, 892, 12313, 273, 27378, 18, 4109, 7675, 435, 4155, 310, 67, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7074, 54, 528, 4155, 310, 18385, 12, 2890, 16, 23288, 67, 73, 11734, 4672, 12313, 67, 529, 273, 23288, 67, 73, 11734, 18, 892, 12313, 273, 27378, 18, 4109, 7675, 435, 4155, 310, 67, 27...
self.sendCreateAccountEmail(firstname + ' ' + lastname, email, username, REQUEST)
self.sendCreateAccountEmail('', firstname + ' ' + lastname, email, '', username, '', '', '')
def processCreateAccountForm(self, username='', password='', confirm='', firstname='', lastname='', email='', REQUEST=None): """ Creates an account on the local acl_users and sends an email to the maintainer with the account infomation """ #create an account without any role try: self.getAuthenticationTool().manage_addUser(username, password, confirm, [], [], firstname, lastname, email) except Exception, error: err = error else: err = '' if err: if REQUEST: self.setSessionErrors(err) self.setCreateAccountSession(username, firstname, lastname, email, password) return REQUEST.RESPONSE.redirect(REQUEST.HTTP_REFERER) if not err: self.sendCreateAccountEmail(firstname + ' ' + lastname, email, username, REQUEST) if REQUEST: self.setSession('title', 'Thank you for registering') self.setSession('body', 'You will receive a confirmation email.') REQUEST.RESPONSE.redirect('%s/messages_html' % self.absolute_url())
5fdb194b5cc07d6dac0cf0ddee3d4bfd8e6e814f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3287/5fdb194b5cc07d6dac0cf0ddee3d4bfd8e6e814f/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 1684, 3032, 1204, 12, 2890, 16, 2718, 2218, 2187, 2201, 2218, 2187, 6932, 2218, 2187, 1122, 529, 2218, 2187, 1142, 529, 2218, 2187, 2699, 2218, 2187, 12492, 33, 7036, 4672, 3536, 102...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1684, 3032, 1204, 12, 2890, 16, 2718, 2218, 2187, 2201, 2218, 2187, 6932, 2218, 2187, 1122, 529, 2218, 2187, 1142, 529, 2218, 2187, 2699, 2218, 2187, 12492, 33, 7036, 4672, 3536, 102...
if K is None:
if K is None or K is self.ground_ring():
def ramification_index(self, K = None): if K is None: return self.modulus().degree() else: raise NotImplementedError
06c7fcba9289398dbea2506a1019bd8c5b10df6a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/06c7fcba9289398dbea2506a1019bd8c5b10df6a/eisenstein_extension_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24975, 1480, 67, 1615, 12, 2890, 16, 1475, 273, 599, 4672, 309, 1475, 353, 599, 578, 1475, 353, 365, 18, 2915, 67, 8022, 13332, 327, 365, 18, 1711, 17284, 7675, 21361, 1435, 469, 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, 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, 24975, 1480, 67, 1615, 12, 2890, 16, 1475, 273, 599, 4672, 309, 1475, 353, 599, 578, 1475, 353, 365, 18, 2915, 67, 8022, 13332, 327, 365, 18, 1711, 17284, 7675, 21361, 1435, 469, 30, 1...
@return: The DOM representation of an epytext description of this parameter's type. @rtype: L{xml.dom.minidom.Element}
@return: A description of this parameter's type. @rtype: L{markup.ParsedDocstring}
def type(self): """ @return: The DOM representation of an epytext description of this parameter's type. @rtype: L{xml.dom.minidom.Element} """ return self._type
d0164ceec6b7c656820c9cc53370c59eb64d4605 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/d0164ceec6b7c656820c9cc53370c59eb64d4605/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 12, 2890, 4672, 3536, 632, 2463, 30, 432, 2477, 434, 333, 1569, 1807, 618, 18, 632, 86, 723, 30, 511, 95, 15056, 18, 11257, 1759, 1080, 97, 3536, 327, 365, 6315, 723, 225, 2, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 618, 12, 2890, 4672, 3536, 632, 2463, 30, 432, 2477, 434, 333, 1569, 1807, 618, 18, 632, 86, 723, 30, 511, 95, 15056, 18, 11257, 1759, 1080, 97, 3536, 327, 365, 6315, 723, 225, 2, -1...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 690) else quickfix.IntField.__init__(self, 690, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 9349, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 9349, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
statusTime = fromString(statusDate)
statusTime = fromString( statusDate )
def __parseJobStatus( self, job, gridType ):
743eb717f8631ae1d44eb80904361c6f63f19adf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/743eb717f8631ae1d44eb80904361c6f63f19adf/PilotStatusAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 23422, 12, 365, 16, 1719, 16, 3068, 559, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2670, 23422, 12, 365, 16, 1719, 16, 3068, 559, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
checkin.release()
self.checkin_mutex.release()
def enter(self): checkin, checkout = self.checkin, self.checkout
66865d2ebd5a877523dbc87be2d86aafb3cdc59a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/66865d2ebd5a877523dbc87be2d86aafb3cdc59a/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 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, ...
[ 1, 1, 1, 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, 6103, 12, 2890, 4672, 866, 267, 16, 13926, 273, 365, 18, 1893, 267, 16, 365, 18, 17300, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if (start + i < (len(oldLines) - hunk.fromLen)):
if ((start + i) <= (len(oldLines) - hunk.fromLen)):
def patch(oldLines, unifiedDiff): i = 0 last = len(unifiedDiff) hunks = [] while i < last: (magic1, fromRange, toRange, magic2) = unifiedDiff[i].split() if magic1 != "@@" or magic2 != "@@" or fromRange[0] != "-" or \ toRange[0] != "+": raise BadHunkHeader() (fromStart, fromLen) = fromRange.split(",") fromStart = int(fromStart[1:]) - 1 fromLen = int(fromLen) (toStart, toLen) = toRange.split(",") toStart = int(toStart[1:]) - 1 toLen = int(toLen) fromCount = 0 toCount = 0 lines = [] i += 1 while i < last and unifiedDiff[i][0] != '@': lines.append(unifiedDiff[i]) ch = unifiedDiff[i][0] if ch == " ": fromCount += 1 toCount += 1 elif ch == "-": fromCount += 1 elif ch == "+": toCount += 1 else: raise BadHunk() i += 1 if toCount != toLen or fromCount != fromLen: print toCount, toLen raise BadHunk() hunks.append(Hunk(fromStart, fromLen, toStart, toLen, lines)) i = 0 last = len(unifiedDiff) result = [] fromLine = 0 offset = 0 for hunk in hunks: start = hunk.fromStart + offset conflicts = hunk.countConflicts(oldLines, start) i = 0 while conflicts: i = i + 1 tried = 0 if (start - abs(i) >= 0): tried = 1 conflicts = hunk.countConflicts(oldLines, start - i) if not conflicts: i = -i break if (start + i < (len(oldLines) - hunk.fromLen)): tried = 1 conflicts = hunk.countConflicts(oldLines, start + i) if not conflicts: break if not tried: break if conflicts: raise Conflict() offset = i start += i while (fromLine < start): result.append(oldLines[fromLine]) fromLine = fromLine + 1 result += hunk.apply(oldLines, start) fromLine += hunk.fromLen while (fromLine < len(oldLines)): result.append(oldLines[fromLine]) fromLine = fromLine + 1 return result
54494d6346f8bb3842a41fcad78dda81868cf267 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/54494d6346f8bb3842a41fcad78dda81868cf267/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 1673, 5763, 16, 27136, 5938, 4672, 277, 273, 374, 1142, 273, 562, 12, 318, 939, 5938, 13, 366, 1683, 87, 273, 5378, 1323, 277, 411, 1142, 30, 261, 11179, 21, 16, 628, 2655, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 1673, 5763, 16, 27136, 5938, 4672, 277, 273, 374, 1142, 273, 562, 12, 318, 939, 5938, 13, 366, 1683, 87, 273, 5378, 1323, 277, 411, 1142, 30, 261, 11179, 21, 16, 628, 2655, ...
generic.PluginInterface.__init__(self)
def __init__(self, device='dvb0'): self.name = device self.device = config.TV_SETTINGS[device] generic.PluginInterface.__init__(self)
01ef9b178c9fb5a80f0e908142cdda3da06fe90e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/01ef9b178c9fb5a80f0e908142cdda3da06fe90e/dvb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2346, 2218, 15679, 70, 20, 11, 4672, 365, 18, 529, 273, 2346, 365, 18, 5964, 273, 642, 18, 15579, 67, 19428, 63, 5964, 65, 5210, 18, 3773, 1358, 16186, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2346, 2218, 15679, 70, 20, 11, 4672, 365, 18, 529, 273, 2346, 365, 18, 5964, 273, 642, 18, 15579, 67, 19428, 63, 5964, 65, 5210, 18, 3773, 1358, 16186, ...
""" if _debug: print "\t%s: Called Scene.add()" % rendererName
@type obj: object """ debugMsg("%s: Called Scene.add()") if obj is None: raise ValueError, "You must specify an object to add"
def add(self, obj): """ Add a new item to the scene
13da8900bbde5a565b734192728a411ec4ccdad6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/13da8900bbde5a565b734192728a411ec4ccdad6/scene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1081, 4672, 3536, 1436, 279, 394, 761, 358, 326, 9065, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 1081, 4672, 3536, 1436, 279, 394, 761, 358, 326, 9065, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.node_count += self.branching_factor
self.node_count += child_count
def expand(self, node): assert node.children is None node.children = [] for _ in xrange(self.branching_factor ** self.dimensions): child = Node() child.children = None child.wins = self.initial_wins child.visits = self.initial_visits child.value = self.initial_wins / self.initial_visits child.rsqrt_visits = self.initial_rsqrt_visits node.children.append(child) self.node_count += self.branching_factor
a015d2dffe264028e0ed132a992a02e93fbe50e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6121/a015d2dffe264028e0ed132a992a02e93fbe50e2/mcts_tuners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 12, 2890, 16, 756, 4672, 1815, 756, 18, 5906, 353, 599, 756, 18, 5906, 273, 5378, 364, 389, 316, 12314, 12, 2890, 18, 7500, 310, 67, 6812, 2826, 365, 18, 14797, 4672, 1151, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 12, 2890, 16, 756, 4672, 1815, 756, 18, 5906, 353, 599, 756, 18, 5906, 273, 5378, 364, 389, 316, 12314, 12, 2890, 18, 7500, 310, 67, 6812, 2826, 365, 18, 14797, 4672, 1151, 273, ...
return self.ldo.search_s("dc=mozilla", ldap.SCOPE_SUBTREE, "mail="+email) def __usernamesearch(self, username): """Do a search on the given username; returns the standard result of search_s query. In this implementation, we just call __mailsearch, since Mozilla just uses e-mail addresses as usernames; however, this is the only function in which that assumption is made, so it is easily adaptable to a non-email based username system. """ return self.__mailsearch(username) def __hasRights(self, acctDict, acctType): """Tests to see if the user with LDAP returned dictionary acctDict has the rights specified by acctType; this is a separate method because it is LDAP implementation specific. """ return (acctType in acctDict['objectClass']) def __findFullName(self, acctDict): """Returns the full name from the provided LDAP entry""" return "%s %s" % (acctDict['givenName'][0], acctDict['sn'][0])
raise NotImplementedError
def __mailsearch(self, email): """Do a search on the given e-mail address; returns the standard result of search_s query. """
4d2d0fe5a513038fd2443c1ce683be382bfedece /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/4d2d0fe5a513038fd2443c1ce683be382bfedece/mozldap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 4408, 3072, 12, 2890, 16, 2699, 4672, 3536, 3244, 279, 1623, 603, 326, 864, 425, 17, 4408, 1758, 31, 1135, 326, 4529, 563, 434, 1623, 67, 87, 843, 18, 225, 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, 1001, 4408, 3072, 12, 2890, 16, 2699, 4672, 3536, 3244, 279, 1623, 603, 326, 864, 425, 17, 4408, 1758, 31, 1135, 326, 4529, 563, 434, 1623, 67, 87, 843, 18, 225, 3536, 2, -100, -100, ...
self.__term = term._adaptForScope(self, self._scope())
self.__pendingTerm = term
def __init__ (self, term, *args, **kw): """Create a particle from the given DOM node.
97a23ffbe2ae0cfebd28adc717e68c09e968c8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/97a23ffbe2ae0cfebd28adc717e68c09e968c8d8/structures.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 2481, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 1684, 279, 20036, 628, 326, 864, 4703, 756, 18, 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, 1001, 2738, 972, 261, 2890, 16, 2481, 16, 380, 1968, 16, 2826, 9987, 4672, 3536, 1684, 279, 20036, 628, 326, 864, 4703, 756, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
where create_date in ( select max(create_date)
where f.create_date in ( select max(i.create_date)
def init(self, cr): cr.execute(""" create or replace view report_document_wall as ( select max(f.id) as id, min(title) as file_name, to_char(min(f.create_date),'YYYY-MM-DD HH24:MI:SS') as last, f.user_id as user_id, f.user_id as user, to_char(f.create_date,'Month') as month from ir_attachment f where create_date in ( select max(create_date) from ir_attachment i inner join res_users u on (i.user_id=u.id) group by i.user_id) group by f.user_id,f.create_date having (CURRENT_DATE - to_date(to_char(f.create_date,'YYYY-MM-DD'),'YYYY-MM-DD')) > 30 ) """)
44cfce315260e8400590447dfc08d34a81264185 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/44cfce315260e8400590447dfc08d34a81264185/report_document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605, 67, 5457, 67, 8019, 487, 261, 2027, 943, 12, 74, 18, 350, 13, 487, 612, 16, 1131, 12, 2649, 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, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605, 67, 5457, 67, 8019, 487, 261, 2027, 943, 12, 74, 18, 350, 13, 487, 612, 16, 1131, 12, 2649, 13...
if len(lfns) > 2:
if len( lfns ) > 2:
def getFileSize(self, lfn): """ Get the size of a supplied file """ res = self.__checkArgumentFormat(lfn) if not res['OK']: return res lfns = res['Value'] # If we have less than three lfns to query a session doesn't make sense created = False if len(lfns) > 2: created = self.__openSession() failed = {} successful = {} for lfn in lfns.keys(): res = self.__getPathStat(lfn) if not res['OK']: failed[lfn] = res['Message'] else: successful[lfn] = res['Value'].filesize if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 1225, 12, 2890, 16, 328, 4293, 4672, 3536, 968, 326, 963, 434, 279, 4580, 585, 3536, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 80, 4293, 13, 309, 486, 400, 3292, 3141, 3546, 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, 6034, 1225, 12, 2890, 16, 328, 4293, 4672, 3536, 968, 326, 963, 434, 279, 4580, 585, 3536, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 80, 4293, 13, 309, 486, 400, 3292, 3141, 3546, 30...
'state': fields.selection([('change_request', 'Change Request'),('change_proposed', 'Change Proposed'), ('in_production', 'In Production'), ('to_update', 'To Update'), ('validate', 'To Validate'), ('cancel', 'Cancel')], 'Status'), 'target_document_id': fields.many2one('document.directory', 'Target Document'), 'target':fields.binary('Target'),
'state': fields.selection([('in_production', 'In Production'), ('requested', 'Change Request'),('proposed', 'Change Proposed'), ('validated', 'To Validate'), ('cancel', 'Cancel')], 'State'), 'target_directory_id': fields.many2one('document.directory', 'Target Document'), 'target_document_id':fields.binary('Target'),
def state_done_set(self, cr, uid, ids, *args): self.write(cr, uid, ids, {'state':'done'}) return True
1cc0a4f66a306de207bb1f8a2ac9b90f8bb78c15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1cc0a4f66a306de207bb1f8a2ac9b90f8bb78c15/document_change.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 919, 67, 8734, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 365, 18, 2626, 12, 3353, 16, 4555, 16, 3258, 16, 13666, 2019, 11, 2497, 8734, 11, 6792, 327, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 919, 67, 8734, 67, 542, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 380, 1968, 4672, 365, 18, 2626, 12, 3353, 16, 4555, 16, 3258, 16, 13666, 2019, 11, 2497, 8734, 11, 6792, 327, 1053...
RunCommand(['%s/cros_run_vm_update' % self.crosutilsbin, '--update_image_path=%s' % image_path, '--vm_image_path=%s' % self.vm_image_path, '--snapshot', vm_graphics_flag, '--persist', '--kvm_pid=%s' % _KVM_PID_FILE, stateful_change_flag, '--src_image=%s' % self.source_image, ], enter_chroot=False)
(code, stdout, stderr) = RunCommandCaptureOutput([ '%s/cros_run_vm_update' % self.crosutilsbin, '--update_image_path=%s' % image_path, '--vm_image_path=%s' % self.vm_image_path, '--snapshot', vm_graphics_flag, '--persist', '--kvm_pid=%s' % _KVM_PID_FILE, stateful_change_flag, '--src_image=%s' % self.source_image, ]) if code != 0: raise UpdateException(code, stdout) def UpdateUsingPayload(self, update_path, stateful_change='old'): """Updates a remote image using image_to_live.sh.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) if self.source_image == base_image_path: self.source_image = self.vm_image_path (code, stdout, stderr) = RunCommandCaptureOutput([ '%s/cros_run_vm_update' % self.crosutilsbin, '--payload=%s' % update_path, '--vm_image_path=%s' % self.vm_image_path, '--snapshot', vm_graphics_flag, '--persist', '--kvm_pid=%s' % _KVM_PID_FILE, stateful_change_flag, '--src_image=%s' % self.source_image, ]) if code != 0: raise UpdateException(code, stdout)
def UpdateImage(self, image_path, stateful_change='old'): """Updates VM image with image_path.""" stateful_change_flag = self.GetStatefulChangeFlag(stateful_change) if self.source_image == base_image_path: self.source_image = self.vm_image_path
969a67304525cae2d03af218137f445591964072 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9626/969a67304525cae2d03af218137f445591964072/cros_au_test_harness.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 2040, 12, 2890, 16, 1316, 67, 803, 16, 28188, 67, 3427, 2218, 1673, 11, 4672, 3536, 5121, 8251, 1316, 598, 1316, 67, 803, 12123, 28188, 67, 3427, 67, 6420, 273, 365, 18, 967, 111...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 2040, 12, 2890, 16, 1316, 67, 803, 16, 28188, 67, 3427, 2218, 1673, 11, 4672, 3536, 5121, 8251, 1316, 598, 1316, 67, 803, 12123, 28188, 67, 3427, 67, 6420, 273, 365, 18, 967, 111...
return addinfourl(open(url2pathname(file), 'rb'),
return addinfourl(open(localname, 'rb'),
def open_local_file(self, url): """Use local file.""" import mimetypes, mimetools, StringIO mtype = mimetypes.guess_type(url)[0] headers = mimetools.Message(StringIO.StringIO( 'Content-Type: %s\n' % (mtype or 'text/plain'))) host, file = splithost(url) if not host: urlfile = file if file[:1] == '/': urlfile = 'file://' + file return addinfourl(open(url2pathname(file), 'rb'), headers, urlfile) host, port = splitport(host) if not port \ and socket.gethostbyname(host) in (localhost(), thishost()): urlfile = file if file[:1] == '/': urlfile = 'file://' + file return addinfourl(open(url2pathname(file), 'rb'), headers, urlfile) raise IOError, ('local file error', 'not on local host')
ef141c8252e5527b22cd6ac842db63a0ffa522a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/ef141c8252e5527b22cd6ac842db63a0ffa522a0/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 3536, 3727, 1191, 585, 12123, 1930, 20369, 15180, 16, 20369, 278, 8192, 16, 15777, 22189, 273, 20369, 15180, 18, 20885, 67, 723, 12, 718...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 3536, 3727, 1191, 585, 12123, 1930, 20369, 15180, 16, 20369, 278, 8192, 16, 15777, 22189, 273, 20369, 15180, 18, 20885, 67, 723, 12, 718...
if StringData != None:
if StringData != None and len(StringData) > 0:
def GenSection(self, OutputPath, ModuleName, SecNum, KeyStringList, FfsInf = None, Dict = {}) : """Prepare the parameter of GenSection""" if FfsInf != None : InfFileName = FfsInf.InfFileName SectionType = FfsInf.__ExtendMarco__(self.SectionType) Filename = FfsInf.__ExtendMarco__(self.FileName) """print 'Buile Num: %s' %self.BuildNum""" BuildNum = FfsInf.__ExtendMarco__(self.BuildNum) """print 'After extend Build Num: %s' %self.BuildNum""" StringData = FfsInf.__ExtendMarco__(self.StringData) InfOverrideString = False if FfsInf.Ui != None: StringData = FfsInf.Ui InfOverrideString = True if FfsInf.ver != None: StringData = FfsInf.ver InfOverrideString = True else: SectionType = self.SectionType Filename = self.Filename BuildNum = self.BuildNum InfFileName = '' """If the file name was pointed out, add it in FileList""" FileList = [] if Filename != None: Filename = GenFdsGlobalVariable.MacroExtend(Filename, Dict) if not self.Optional: FileList.append(Filename) elif os.path.exists(Filename): FileList.append(Filename) else: FileList, IsSect = Section.Section.GetFileList(FfsInf, self.FileType, self.FileExtension, Dict) if IsSect : return FileList, self.Alignment
af4ca6fb880bb4aca595d6fc4db9ca298fbc461f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/af4ca6fb880bb4aca595d6fc4db9ca298fbc461f/EfiSection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 5285, 12, 2890, 16, 3633, 743, 16, 5924, 461, 16, 3232, 2578, 16, 1929, 780, 682, 16, 478, 2556, 13149, 273, 599, 16, 9696, 273, 2618, 13, 294, 3536, 7543, 326, 1569, 434, 10938...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 5285, 12, 2890, 16, 3633, 743, 16, 5924, 461, 16, 3232, 2578, 16, 1929, 780, 682, 16, 478, 2556, 13149, 273, 599, 16, 9696, 273, 2618, 13, 294, 3536, 7543, 326, 1569, 434, 10938...
print >>sys.stderr, "running tests via", repr(objspace())
print >> sys.stderr, "running tests via", repr(objspace())
def run_tests_on_space(suite, spacename=''): """ run the suite on the given space """ if Options.runcts: runner = CtsTestRunner() # verbosity=Options.verbose+1) else: runner = MyTextTestRunner(verbosity=Options.verbose+1) if spacename: Options.spacename = spacename warnings.defaultaction = Options.showwarning and 'default' or 'ignore' print >>sys.stderr, "running tests via", repr(objspace()) runner.run(suite)
11312f2b52164738a5844b976985d33cbdd48834 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/11312f2b52164738a5844b976985d33cbdd48834/test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 67, 265, 67, 2981, 12, 30676, 16, 1694, 1077, 1069, 2218, 11, 4672, 3536, 1086, 326, 11371, 603, 326, 864, 3476, 3536, 309, 5087, 18, 2681, 299, 87, 30, 8419, 273, 385...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 16341, 67, 265, 67, 2981, 12, 30676, 16, 1694, 1077, 1069, 2218, 11, 4672, 3536, 1086, 326, 11371, 603, 326, 864, 3476, 3536, 309, 5087, 18, 2681, 299, 87, 30, 8419, 273, 385...
author='Jasper Spaans, Jan-Jaap Driessen', author_email='jspaans@thehealthagency.com',
author='The Health Agency', author_email='techniek@thehealthagency.com',
def read(*rnames): return open(os.path.join(*rnames)).read()
04ae395921eb52b60dc59dbc1f4e84c01a873531 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1818/04ae395921eb52b60dc59dbc1f4e84c01a873531/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 30857, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 30857, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
retVal = self._insert( "type%s" % typeName, self.dbCatalog[ typeName ][ 'typeFields' ], insertList )
retVal = self._insert( self.__getTableName( "type", typeName ), self.dbCatalog[ typeName ][ 'typeFields' ], insertList )
def addEntry( self, typeName, startTime, endTime, valuesList ): """ Add an entry to the type contents """ gMonitor.addMark( "registeradded", 1 ) if not typeName in self.dbCatalog: return S_ERROR( "Type %s has not been defined in the db" % typeName ) #Discover key indexes for keyPos in range( len( self.dbCatalog[ typeName ][ 'keys' ] ) ): keyName = self.dbCatalog[ typeName ][ 'keys' ][ keyPos ] keyValue = valuesList[ keyPos ] retVal = self.__addKeyValue( keyName, keyValue ) if not retVal[ 'OK' ]: return retVal gLogger.info( "Value %s for key %s has id %s" % ( keyValue, keyName, retVal[ 'Value' ] ) ) valuesList[ keyPos ] = retVal[ 'Value' ] insertList = list( valuesList ) insertList.append( startTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) insertList.append( endTime.strftime( "%Y-%m-%d %H:%M:%S" ) ) retVal = self._insert( "type%s" % typeName, self.dbCatalog[ typeName ][ 'typeFields' ], insertList ) if not retVal[ 'OK' ]: return retVal return self.__splitInBuckets( typeName, startTime, endTime, valuesList )
7663d95782c4987a99eb5394bb9f465c2ab982d5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/7663d95782c4987a99eb5394bb9f465c2ab982d5/AccountingDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1622, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 924, 682, 262, 30, 3536, 1436, 392, 1241, 358, 326, 618, 2939, 3536, 314, 7187, 18, 1289, 3882, 12, 315, 4861, 9665, 3113, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1622, 12, 365, 16, 8173, 16, 8657, 16, 13859, 16, 924, 682, 262, 30, 3536, 1436, 392, 1241, 358, 326, 618, 2939, 3536, 314, 7187, 18, 1289, 3882, 12, 315, 4861, 9665, 3113, 404, ...
(junkentry, oldhandle) = find_tip_entry('TCP',localip,localport)
oldhandle = find_tipo_commhandle('TCP', localip, localport, False)
def waitforconn(localip, localport,function): """ <Purpose> Waits for a connection to a port. Calls function with a socket-like object if it succeeds. <Arguments> localip: The local IP to listen on localport: The local port to bind to function: The function to call. It should take five arguments: (remoteip, remoteport, socketlikeobj, thiscommhandle, maincommhandle) If your function has an uncaught exception, the socket-like object it is using will be closed. <Exceptions> None. <Side Effects> Starts an event handler that listens for connections. <Returns> A handle to the comm object. This can be used to stop listening """ if not localip or localip == '0.0.0.0': raise Exception("Must specify a local IP address") if type(localport) is not int and type(localport) is not long: raise Exception("Local port number must be an integer") restrictions.assertisallowed('waitforconn',localip,localport) nanny.tattle_check('connport',localport) # If they specify an IP, we must use it... if specificIP and localip not in whitelistedIPs and specificIP != localip: raise Exception, "IP '"+localip+"' is not allowed. User restricts outgoing traffic to IP: '"+specificIP+"'" # check if I'm already listening on this port / ip (junkentry, oldhandle) = find_tip_entry('TCP',localip,localport) if oldhandle: # if it was already there, update the function and return comminfo[oldhandle]['function'] = function return oldhandle handle = idhelper.getuniqueid() # we'll need to add it, so add a socket... nanny.tattle_add_item('insockets',handle) # get the socket try: mainsock = get_real_socket(localip,localport) # NOTE: Should this be anything other than a hardcoded number? mainsock.listen(5) # set up our table entry comminfo[handle] = {'type':'TCP','remotehost':None, 'remoteport':None,'localip':localip,'localport':localport,'socket':mainsock, 'outgoing':False, 'function':function} except: nanny.tattle_remove_item('insockets',handle) raise # start the selector if it's not running already check_selector() return handle
2920cf355d747fa3580e3d18326f4b2ed3423971 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/2920cf355d747fa3580e3d18326f4b2ed3423971/emulcomm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 1884, 4646, 12, 3729, 625, 16, 1191, 655, 16, 915, 4672, 3536, 411, 10262, 4150, 34, 678, 12351, 364, 279, 1459, 358, 279, 1756, 18, 282, 23665, 445, 598, 279, 2987, 17, 5625, 73...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 1884, 4646, 12, 3729, 625, 16, 1191, 655, 16, 915, 4672, 3536, 411, 10262, 4150, 34, 678, 12351, 364, 279, 1459, 358, 279, 1756, 18, 282, 23665, 445, 598, 279, 2987, 17, 5625, 73...
visf.close() vis_timer.stop() return ArithmeticList([ f_and_c.rhs(t, f_and_c), advop.rhs(t, adv_rho) ])
visf.close() vis_timer.stop()
def rhs(t, (f_and_c, adv_rho)): from hedge.mesh import TAG_ALL, TAG_NONE from hedge.operators import StrongAdvectionOperator advop = StrongAdvectionOperator( discr, v=-cloud.velocities()[0], inflow_tag=TAG_ALL, outflow_tag=TAG_NONE, flux_type="central")
3b8516963de31ecf967dd3d1b6a8e28c1dada331 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12869/3b8516963de31ecf967dd3d1b6a8e28c1dada331/with-charge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7711, 12, 88, 16, 261, 74, 67, 464, 67, 71, 16, 17825, 67, 25603, 3719, 30, 628, 366, 7126, 18, 15557, 1930, 8358, 67, 4685, 16, 8358, 67, 9826, 628, 366, 7126, 18, 30659, 1930, 3978...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7711, 12, 88, 16, 261, 74, 67, 464, 67, 71, 16, 17825, 67, 25603, 3719, 30, 628, 366, 7126, 18, 15557, 1930, 8358, 67, 4685, 16, 8358, 67, 9826, 628, 366, 7126, 18, 30659, 1930, 3978...
def view_image_or_file(self,REQUEST,RESPONSE):
def view_image_or_file(self,URL1):
def view_image_or_file(self,REQUEST,RESPONSE):
2970a29487b7f52c4cfcd5833226880a444fe771 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2970a29487b7f52c4cfcd5833226880a444fe771/Image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 2730, 67, 280, 67, 768, 12, 2890, 16, 5519, 16, 14508, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 67, 2730, 67, 280, 67, 768, 12, 2890, 16, 5519, 16, 14508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return [s],[s]
return [s],[]
def blocks_and_cut_vertices(self): """ Computes the blocks and cut vertices of the graph. In the case of a digraph, this computation is done on the underlying graph.
66553ffc1b1efb77e8a1bb1e26d0ad20bc27d613 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/66553ffc1b1efb77e8a1bb1e26d0ad20bc27d613/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4398, 67, 464, 67, 5150, 67, 17476, 12, 2890, 4672, 3536, 14169, 281, 326, 4398, 471, 6391, 6928, 434, 326, 2667, 18, 657, 326, 648, 434, 279, 3097, 1483, 16, 333, 16039, 353, 2731, 60...
elif 'win' in slavename:
elif 'win' in slavename or 'w32' in slavename:
def get_default_options(slavename): d = {'slavename': quote_option(slavename)} header = DEFAULT_HEADER footer = DEFAULT_FOOTER basedir = None buildmaster_host = None if 'slave' in slavename: buildmaster_host = BUILD_BUILDMASTER if 'linux' in slavename or 'darwin' in slavename: basedir = '/builds/slave' elif 'win' in slavename: basedir = 'e:\\builds\\moz2_slave' elif 'talos' in slavename or '-try' in slavename or 'r3' in slavename: footer = TALOS_FOOTER if '-try' in slavename: buildmaster_host = TALOS_TRY_BUILDMASTER d['port'] = 9011 else: platform = re.match("t(alos)?-r3-(?P<platform>\w+)-\d+", slavename).groupdict()['platform'] for platform_list,host in TALOS_BUILDMASTERS.iteritems(): if platform in platform_list: buildmaster_host = host d['port'] = 9012 if 'linux' in slavename or 'ubuntu' in slavename or 'fed' in slavename: basedir = '/home/cltbld/talos-slave' elif 'tiger' in slavename or 'leopard' in slavename or \ 'snow' in slavename: basedir = '/Users/cltbld/talos-slave' d['usepty'] = 0 elif 'xp' in slavename or 'w7' in slavename: basedir = 'C:\\talos-slave' d['usepty'] = 0 # quote_option will throw if defaults couldn't be found for either of these # These are processed separately because they should be unset if a default # wasn't found. try: d['buildmaster_host'] = quote_option(buildmaster_host) except TypeError: # Don't error out, because missing values may have been passed to # the program pass try: d['basedir'] = quote_option(basedir, raw=True) except TypeError: pass return d, header, footer
65f1b1662f340a46a572c2c91575cbcdc565a552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/65f1b1662f340a46a572c2c91575cbcdc565a552/buildbot-tac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1886, 67, 2116, 12, 2069, 842, 1069, 4672, 302, 273, 13666, 2069, 842, 1069, 4278, 3862, 67, 3482, 12, 2069, 842, 1069, 16869, 1446, 273, 3331, 67, 7557, 9860, 273, 3331, 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, 336, 67, 1886, 67, 2116, 12, 2069, 842, 1069, 4672, 302, 273, 13666, 2069, 842, 1069, 4278, 3862, 67, 3482, 12, 2069, 842, 1069, 16869, 1446, 273, 3331, 67, 7557, 9860, 273, 3331, 67, ...
self.section_sinks = {}
self.section_sinks = {'__main__': self.main_sink}
def __init__(self, main_file_name, modules): super(MyMultiSectionFactory, self).__init__() self.main_file_name = main_file_name self.main_sink = FileCodeSink(open(main_file_name, "wt")) self.header_name = "ns3module.h" header_file_name = os.path.join(os.path.dirname(self.main_file_name), self.header_name) self.header_sink = FileCodeSink(open(header_file_name, "wt")) self.section_sinks = {}
f0d34acab9d99e34c0a8738887b6ffa1a526c89b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7746/f0d34acab9d99e34c0a8738887b6ffa1a526c89b/ns3modulegen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2774, 67, 768, 67, 529, 16, 4381, 4672, 2240, 12, 12062, 5002, 5285, 1733, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 5254, 67, 768, 67, 529, 273, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2774, 67, 768, 67, 529, 16, 4381, 4672, 2240, 12, 12062, 5002, 5285, 1733, 16, 365, 2934, 972, 2738, 972, 1435, 365, 18, 5254, 67, 768, 67, 529, 273, 2...
def likes_mime_p(x, s=self, v=mm_cfg.DisableMime):
def likes_mime_p(x, s=mlist, v=mm_cfg.DisableMime):
def likes_mime_p(x, s=self, v=mm_cfg.DisableMime): return not s.GetUserOption(x, v)
14cf5da2f1f3d7f535be4dbb63df355bcfa31de4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/14cf5da2f1f3d7f535be4dbb63df355bcfa31de4/ToDigest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7906, 281, 67, 11757, 67, 84, 12, 92, 16, 272, 33, 781, 376, 16, 331, 33, 7020, 67, 7066, 18, 11879, 13320, 4672, 327, 486, 272, 18, 967, 1299, 1895, 12, 92, 16, 331, 13, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7906, 281, 67, 11757, 67, 84, 12, 92, 16, 272, 33, 781, 376, 16, 331, 33, 7020, 67, 7066, 18, 11879, 13320, 4672, 327, 486, 272, 18, 967, 1299, 1895, 12, 92, 16, 331, 13, 2, -100, ...
builder.append(unichr(0xDC00 + (chr & 0x03FF)))
builder.append(unichr(0xDC00 + (chr & 0x03FF)))
def hexescape(builder, s, pos, digits, encoding, errorhandler, message, errors): import sys chr = 0 if pos + digits > len(s): message = "end of string in escape sequence" res, pos = errorhandler(errors, "unicodeescape", message, s, pos-2, len(s)) builder.append(res) else: try: chr = r_uint(int(s[pos:pos+digits], 16)) except ValueError: endinpos = pos while s[endinpos] in hexdigits: endinpos += 1 res, pos = errorhandler(errors, encoding, message, s, pos-2, endinpos+1) builder.append(res) else: # when we get here, chr is a 32-bit unicode character if chr <= MAXUNICODE: builder.append(unichr(chr)) pos += digits elif chr <= 0x10ffff: chr -= 0x10000L builder.append(unichr(0xD800 + (chr >> 10))) builder.append(unichr(0xDC00 + (chr & 0x03FF))) pos += digits else: message = "illegal Unicode character" res, pos = errorhandler(errors, encoding, message, s, pos-2, pos+digits) builder.append(res) return pos
4b7cda27b028f6294e3089272cf6ea1eab2275f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/4b7cda27b028f6294e3089272cf6ea1eab2275f7/runicode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 6939, 12, 9574, 16, 272, 16, 949, 16, 6815, 16, 2688, 16, 555, 4176, 16, 883, 16, 1334, 4672, 1930, 2589, 4513, 273, 374, 309, 949, 397, 6815, 405, 562, 12, 87, 4672, 883, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 6939, 12, 9574, 16, 272, 16, 949, 16, 6815, 16, 2688, 16, 555, 4176, 16, 883, 16, 1334, 4672, 1930, 2589, 4513, 273, 374, 309, 949, 397, 6815, 405, 562, 12, 87, 4672, 883, 273,...
(errno, errstr) = e raise DistutilsFileError( "could not create '%s': %s" % (dst, errstr))
raise DistutilsFileError( "could not create '%s': %s" % (dst, e.strerror))
def _copy_file_contents(src, dst, buffer_size=16*1024): """Copy the file 'src' to 'dst'; both must be filenames. Any error opening either file, reading from 'src', or writing to 'dst', raises DistutilsFileError. Data is read/written in chunks of 'buffer_size' bytes (default 16k). No attempt is made to handle anything apart from regular files. """ # Stolen from shutil module in the standard library, but with # custom error-handling added. fsrc = None fdst = None try: try: fsrc = open(src, 'rb') except os.error as e: (errno, errstr) = e raise DistutilsFileError("could not open '%s': %s" % (src, errstr)) if os.path.exists(dst): try: os.unlink(dst) except os.error as e: (errno, errstr) = e raise DistutilsFileError( "could not delete '%s': %s" % (dst, errstr)) try: fdst = open(dst, 'wb') except os.error as e: (errno, errstr) = e raise DistutilsFileError( "could not create '%s': %s" % (dst, errstr)) while True: try: buf = fsrc.read(buffer_size) except os.error as e: (errno, errstr) = e raise DistutilsFileError( "could not read from '%s': %s" % (src, errstr)) if not buf: break try: fdst.write(buf) except os.error as e: (errno, errstr) = e raise DistutilsFileError( "could not write to '%s': %s" % (dst, errstr)) finally: if fdst: fdst.close() if fsrc: fsrc.close()
c981ef9dcd7d5c4df48e6ad2ca282a9e1cebf307 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/c981ef9dcd7d5c4df48e6ad2ca282a9e1cebf307/file_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 67, 768, 67, 3980, 12, 4816, 16, 3046, 16, 1613, 67, 1467, 33, 2313, 14, 2163, 3247, 4672, 3536, 2951, 326, 585, 296, 4816, 11, 358, 296, 11057, 13506, 3937, 1297, 506, 9066...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3530, 67, 768, 67, 3980, 12, 4816, 16, 3046, 16, 1613, 67, 1467, 33, 2313, 14, 2163, 3247, 4672, 3536, 2951, 326, 585, 296, 4816, 11, 358, 296, 11057, 13506, 3937, 1297, 506, 9066...
def _get_dashboard_cls(dashboard_cls):
def _get_dashboard_cls(dashboard_cls, context):
def _get_dashboard_cls(dashboard_cls): if type(dashboard_cls) is types.DictType: curr_url = context.get('request').META['PATH_INFO'] for key in dashboard_cls: admin_site_mod, admin_site_inst = key.rsplit('.', 1) admin_site_mod = import_module(admin_site_mod) admin_site = getattr(admin_site_mod, admin_site_inst) admin_url = reverse('%s:index' % admin_site.name) if curr_url.startswith(admin_url): mod, inst = dashboard_cls[key].rsplit('.', 1) mod = import_module(mod) return getattr(mod, inst) else: mod, inst = dashboard_cls.rsplit('.', 1) mod = import_module(mod) return getattr(mod, inst) raise ValueError('Dashboard matching "%s" not found' % dashboard_cls)
e1b75732008a854c5cbede34cc843724219f044f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8993/e1b75732008a854c5cbede34cc843724219f044f/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13479, 67, 6429, 12, 13479, 67, 6429, 16, 819, 4672, 309, 618, 12, 13479, 67, 6429, 13, 353, 1953, 18, 5014, 559, 30, 4306, 67, 718, 273, 819, 18, 588, 2668, 2293, 1606...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 13479, 67, 6429, 12, 13479, 67, 6429, 16, 819, 4672, 309, 618, 12, 13479, 67, 6429, 13, 353, 1953, 18, 5014, 559, 30, 4306, 67, 718, 273, 819, 18, 588, 2668, 2293, 1606...
gm = vigra.transformImage(grad, "\l x: norm(x)")
gm = vigra.norm(grad)
def gaussianGradient(img, scale, sqrt = True): """Return (gm, grad) tuple, which is either the result of `colorGradient`, or of the usual `vigra.gaussianGradient` family for single-band images.""" if img.bands() > 1: return colorGradient(img, scale, sqrt) grad = vigra.gaussianGradientAsVector(img, scale) if sqrt: gm = vigra.transformImage(grad, "\l x: norm(x)") else: gm = vigra.transformImage(grad, "\l x: squaredNorm(x)") return gm, grad
eb087341bc20760be04e803c8af312824ba889e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10394/eb087341bc20760be04e803c8af312824ba889e2/bi_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21490, 15651, 12, 6081, 16, 3159, 16, 5700, 273, 1053, 4672, 3536, 990, 261, 23336, 16, 6058, 13, 3193, 16, 1492, 353, 3344, 326, 563, 434, 1375, 3266, 15651, 9191, 578, 434, 326, 25669,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21490, 15651, 12, 6081, 16, 3159, 16, 5700, 273, 1053, 4672, 3536, 990, 261, 23336, 16, 6058, 13, 3193, 16, 1492, 353, 3344, 326, 563, 434, 1375, 3266, 15651, 9191, 578, 434, 326, 25669,...
if data != 'CVS':
if data != '.svn':
def examples_data(): import os dataList = os.listdir(os.curdir + '/examples/data/') result = [] for data in dataList: if data != 'CVS': result = result + ['examples/data/' + data] return result
90c6602e0997f193dfe393e7a531b002a7e348d2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10139/90c6602e0997f193dfe393e7a531b002a7e348d2/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10991, 67, 892, 13332, 1930, 1140, 501, 682, 273, 1140, 18, 1098, 1214, 12, 538, 18, 1397, 1214, 397, 1173, 16858, 19, 892, 2473, 13, 563, 273, 5378, 364, 501, 316, 501, 682, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10991, 67, 892, 13332, 1930, 1140, 501, 682, 273, 1140, 18, 1098, 1214, 12, 538, 18, 1397, 1214, 397, 1173, 16858, 19, 892, 2473, 13, 563, 273, 5378, 364, 501, 316, 501, 682, 30, 309, ...
on thGET /alfresco/service/api/node/{store_type}/{store_id}/{id}?filter={filter?}&returnVersion={returnVersion?}
on th GET /alfresco/service/api/node/{store_type}/{store_id}/{id}?filter={filter?}&returnVersion={returnVersion?}
def get_properties(self): """ getAllowableActions Description Returns the list of allowable actions for a document, folder, or relationship object based on thGET /alfresco/service/api/node/{store_type}/{store_id}/{id}?filter={filter?}&returnVersion={returnVersion?} GET /alfresco/service/api/path/{store_type}/{store_id}/{id}?filter={filter?}&returnVersion={returnVersion?} --- Returns the properties of an object, and optionally the operations that the user is allowed to perform on the object Inputs: ID objectId (Optional) Enum returnVersion: This (Default), Latest, LatestMajor (Optional) String filter: Filter for properties to be returned (Optional) Boolean includeAllowableActions: False (default) (Optional) Enum includeRelationships: none (default), source, target, both Outputs: Collection propertyCollection Collection allowableActionCollection Notes: If “includeAllowableActions” is TRUE, the repository will return the allowable actions for the current user for the object as part of the output. "IncludeRelationships" indicates whether relationships are also returned for the object. If it is set to "source" or "target", relationships for which the returned object is a source, or respectively a target, will also be returned. If it is set to "both", relationships for which the returned object is either a source or a target will be returned. If it is set to "none", relationships are not returned. Does not return the content-stream of a document PropertyCollection includes changeToken (if applicable to repository) e current user’s context. """ pass
8d0171682262bad5b80c787206c898c457577733 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4571/8d0171682262bad5b80c787206c898c457577733/cmis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4738, 12, 2890, 4672, 3536, 336, 31508, 6100, 6507, 2860, 326, 666, 434, 30727, 4209, 364, 279, 1668, 16, 3009, 16, 578, 5232, 733, 2511, 603, 286, 4978, 342, 6186, 455, 2894, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4738, 12, 2890, 4672, 3536, 336, 31508, 6100, 6507, 2860, 326, 666, 434, 30727, 4209, 364, 279, 1668, 16, 3009, 16, 578, 5232, 733, 2511, 603, 286, 4978, 342, 6186, 455, 2894, ...
sage: a.save()
sage: a.save('sage.gif')
def graphics_array(self, ncols=3): """ Return a graphics array with the given number of columns with plots of the frames of this animation.
58db227460d45eff3c90fec66fa358578231f04d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/58db227460d45eff3c90fec66fa358578231f04d/animate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17313, 67, 1126, 12, 2890, 16, 21330, 33, 23, 4672, 3536, 2000, 279, 17313, 526, 598, 326, 864, 1300, 434, 2168, 598, 17931, 434, 326, 7793, 434, 333, 8794, 18, 2, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17313, 67, 1126, 12, 2890, 16, 21330, 33, 23, 4672, 3536, 2000, 279, 17313, 526, 598, 326, 864, 1300, 434, 2168, 598, 17931, 434, 326, 7793, 434, 333, 8794, 18, 2, -100, -100, -100, -1...
TargetAdd('PandaModules.py', input='libp3direct.dll')
if (PkgSkip("DIRECT")==0): TargetAdd('PandaModules.py', input='libp3direct.dll')
pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
c6dfd441896ff5495b07156d5e66cf7242be0e43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7242/c6dfd441896ff5495b07156d5e66cf7242be0e43/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 293, 464, 842, 722, 67, 76, 1011, 1548, 82, 7, 318, 536, 225, 453, 4307, 37, 67, 3932, 1653, 39, 6365, 67, 5757, 64, 82, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
result = squeeze(transpose(reshape(result,dims[::-1])))
result = squeeze(transpose(reshape(result,tupdims)))
def _parse_mimatrix(fid,bytes): dclass, cmplx, nzmax =_parse_array_flags(fid) dims = _get_element(fid)[0] name = ''.join(asarray(_get_element(fid)[0]).astype('c')) if dclass in mxArrays: result, unused =_get_element(fid) if type == mxCHAR_CLASS: result = ''.join(asarray(result).astype('c')) else: if cmplx: imag, unused =_get_element(fid) result = result + cast[imag.typecode()](1j) * imag result = squeeze(transpose(reshape(result,dims[::-1]))) elif dclass == mxCELL_CLASS: length = product(dims) result = zeros(length, PyObject) for i in range(length): sa, unused = _get_element(fid) result[i]= sa result = squeeze(transpose(reshape(result,dims[::-1]))) if rank(result)==0: result = result.toscalar() elif dclass == mxSTRUCT_CLASS: length = product(dims) result = zeros(length, PyObject) namelength = _get_element(fid)[0] # get field names names = _get_element(fid)[0] splitnames = [names[i:i+namelength] for i in \ xrange(0,len(names),namelength)] fieldnames = [''.join(asarray(x).astype('c')).strip('\x00') for x in splitnames] for i in range(length): result[i] = mat_struct() for element in fieldnames: val,unused = _get_element(fid) result[i].__dict__[element] = val result = squeeze(transpose(reshape(result,dims[::-1]))) if rank(result)==0: result = result.toscalar() # object is like a structure with but with a class name elif dclass == mxOBJECT_CLASS: class_name = ''.join(asarray(_get_element(fid)[0]).astype('c')) length = product(dims) result = zeros(length, PyObject) namelength = _get_element(fid)[0] # get field names names = _get_element(fid)[0] splitnames = [names[i:i+namelength] for i in \ xrange(0,len(names),namelength)] fieldnames = [''.join(asarray(x).astype('c')).strip('\x00') for x in splitnames] for i in range(length): result[i] = mat_obj() result[i]._classname = class_name for element in fieldnames: val,unused = _get_element(fid) result[i].__dict__[element] = val result = squeeze(transpose(reshape(result,dims[::-1]))) if rank(result)==0: result = result.toscalar() elif dclass == mxSPARSE_CLASS: rowind, unused = _get_element(fid) colind, unused = _get_element(fid) res, unused = _get_element(fid) if cmplx: imag, unused = _get_element(fid) res = res + cast[imag.typecode()](1j)*imag if have_sparse: spmat = scipy.sparse.csc_matrix(res, (rowind[:len(res)], colind), M=dims[0],N=dims[1]) result = spmat else: result = (dims, rowind, colind, res) return result, name
5e019f26834d259e6bbeec69c1511aad635cced1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/5e019f26834d259e6bbeec69c1511aad635cced1/mio.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 81, 381, 1942, 12, 27268, 16, 3890, 4672, 302, 1106, 16, 5003, 412, 92, 16, 15062, 1896, 273, 67, 2670, 67, 1126, 67, 7133, 12, 27268, 13, 9914, 273, 389, 588, 67, 295...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2670, 67, 81, 381, 1942, 12, 27268, 16, 3890, 4672, 302, 1106, 16, 5003, 412, 92, 16, 15062, 1896, 273, 67, 2670, 67, 1126, 67, 7133, 12, 27268, 13, 9914, 273, 389, 588, 67, 295...
os.utime(self.lockfile)
os.utime(self.lockfile, None)
def touchLock(self): """Run me inside...""" os.utime(self.lockfile)
1fb52865f3b017cf6d6c2615d59bba29e7d2728b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9870/1fb52865f3b017cf6d6c2615d59bba29e7d2728b/WikiDump.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 2531, 12, 2890, 4672, 3536, 1997, 1791, 4832, 7070, 3660, 1140, 18, 322, 494, 12, 2890, 18, 739, 768, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6920, 2531, 12, 2890, 4672, 3536, 1997, 1791, 4832, 7070, 3660, 1140, 18, 322, 494, 12, 2890, 18, 739, 768, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
extgeom = "ST_Envelope(ST_SetSRID('POLYGON((%f %f,%f %f,%f %f,%f %f,%f %f))'::geometry, %d))" % \
extgeom = "ST_Envelope(ST_SetSRID('POLYGON((%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f,%.15f %.15f))'::geometry, %d))" % \
def make_sql_addrastercolumn(options, pixeltypes, nodata, pixelsize, blocksize, extent): assert len(pixeltypes) > 0, "No pixel types given" ts = make_sql_schema_table_names(options.table) pt = make_sql_value_array(pixeltypes) nd = 'null' if nodata is not None and len(nodata) > 0: nd = make_sql_value_array(nodata) odb = 'false' if options.register: odb = 'true' rb = 'false' extgeom = 'null' bs = ( 'null', 'null' ) # Check if regular blocking mode requested if options.block_size is not None: assert pixelsize is not None, "Pixel size is none, but regular blocking requested" assert blocksize is not None, "Block size is none, but regular blocking requested" assert extent is not None, "Extent is none, but regular blocking requested" assert len(pixelsize) == 2, "Invalid pixel size, two values expected" assert len(blocksize) == 2, "Invalid block size, two values expected" assert len(extent) == 4, "Invalid extent, four coordinates expected" assert len(extent[0]) == len(extent[3]) == 2, "Invalid extent, pair of X and Y pair expected" rb = 'true' bs = ( blocksize[0], blocksize[1] ) extgeom = "ST_Envelope(ST_SetSRID('POLYGON((%f %f,%f %f,%f %f,%f %f,%f %f))'::geometry, %d))" % \ (extent[0][0], extent[0][1], extent[1][0], extent[1][1], extent[2][0], extent[2][1], extent[3][0], extent[3][1], extent[0][0], extent[0][1], options.srid) sql = "SELECT AddRasterColumn('%s','%s','%s',%d, %s, %s, %s, %s, %f, %f, %s, %s, %s);\n" % \ (ts[0], ts[1], options.column, options.srid, pt, odb, rb, nd, pixelsize[0], pixelsize[1], bs[0], bs[1], extgeom) logit("SQL: %s" % sql) return sql
0e3b39fcfbd547a6a79bbfd3dd1bb9d81601c12d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11120/0e3b39fcfbd547a6a79bbfd3dd1bb9d81601c12d/raster2pgsql.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 4669, 67, 1289, 24215, 2827, 12, 2116, 16, 4957, 2352, 16, 14003, 396, 16, 4957, 1467, 16, 18440, 16, 11933, 4672, 1815, 562, 12, 11743, 2352, 13, 405, 374, 16, 315, 2279, 49...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 4669, 67, 1289, 24215, 2827, 12, 2116, 16, 4957, 2352, 16, 14003, 396, 16, 4957, 1467, 16, 18440, 16, 11933, 4672, 1815, 562, 12, 11743, 2352, 13, 405, 374, 16, 315, 2279, 49...
try:
if 1:
def _dateConvertFromDB(d): if d==None: return None for format in ('%Y-%m-%d', # Y/M/D '%H:%M:%S', # hh:mm:ss '%H:%M'): # hh:mm try: return DateTime.strptime(d, format) except: pass dashind = d.rfind('-') tz = d[dashind:] d = d[:dashind] try: return DateTime.strptime(d, '%H:%M:%S'), tz # timetz except: pass try: # why is tz returned above and not here? return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S') # full date except: raise
5d28910fad22d51075deea77ab5b1b00056146ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/5d28910fad22d51075deea77ab5b1b00056146ed/postconn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 712, 2723, 1265, 2290, 12, 72, 4672, 309, 302, 631, 7036, 30, 327, 599, 364, 740, 316, 7707, 9, 61, 6456, 81, 6456, 72, 2187, 468, 225, 1624, 19, 49, 19, 40, 1995, 44, 5319, 4...
self.assertRaises(UnknownFileError, cmd.run)
self.assertRaises((UnknownFileError, CompileError), cmd.run)
def test_optional_extension(self):
95c0c612d23286a3556d4070299b8f00997a0d86 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/95c0c612d23286a3556d4070299b8f00997a0d86/test_build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10444, 67, 6447, 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, ...
[ 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, 1842, 67, 10444, 67, 6447, 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...
if not buffer.get_selection_bounds():
bounds = buffer.get_selection_bounds() if (not bounds) or (bounds[1].get_offset() - bounds[0].get_offset() == 1):
def __on_button_release(self, widget, event, data=None): buffer = self.get_buffer() if not buffer.get_selection_bounds(): self.select_a_char() # return False in order to let other handler handle it return False
c56cda71352e944f9353a0d229ed50598b33cc43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4850/c56cda71352e944f9353a0d229ed50598b33cc43/hexview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 67, 5391, 67, 9340, 12, 2890, 16, 3604, 16, 871, 16, 501, 33, 7036, 4672, 1613, 273, 365, 18, 588, 67, 4106, 1435, 4972, 273, 1613, 18, 588, 67, 10705, 67, 10576, 1435, 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, 265, 67, 5391, 67, 9340, 12, 2890, 16, 3604, 16, 871, 16, 501, 33, 7036, 4672, 1613, 273, 365, 18, 588, 67, 4106, 1435, 4972, 273, 1613, 18, 588, 67, 10705, 67, 10576, 1435, 30...
def start_doctype_decl(self, name, pubid, sysid, has_internal_subset):
def start_doctype_decl(self, name, sysid, pubid, has_internal_subset):
def start_doctype_decl(self, name, pubid, sysid, has_internal_subset): self._lex_handler_prop.startDTD(name, pubid, sysid)
be026281b8bdfd13e85e7a9eeabd98a778176897 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/be026281b8bdfd13e85e7a9eeabd98a778176897/expatreader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2896, 12387, 67, 8840, 12, 2890, 16, 508, 16, 2589, 350, 16, 5634, 350, 16, 711, 67, 7236, 67, 15657, 4672, 365, 6315, 4149, 67, 4176, 67, 5986, 18, 1937, 25728, 12, 529, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2896, 12387, 67, 8840, 12, 2890, 16, 508, 16, 2589, 350, 16, 5634, 350, 16, 711, 67, 7236, 67, 15657, 4672, 365, 6315, 4149, 67, 4176, 67, 5986, 18, 1937, 25728, 12, 529, 16...
while 1:
while True:
def receiver(): # Open and initialize the socket s = openmcastsock(MYGROUP, MYPORT) # # Loop, printing any data we receive while 1: data, sender = s.recvfrom(1500) while data[-1:] == '\0': data = data[:-1] # Strip trailing \0's print sender, ':', repr(data)
6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/6493d788f0e6b96cd7d2ed70e8e39f8b8b7ec8d8/mcast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 1053, 30, 501,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5971, 13332, 468, 3502, 471, 4046, 326, 2987, 272, 273, 1696, 81, 4155, 15031, 12, 22114, 8468, 16, 22069, 6354, 13, 468, 468, 9720, 16, 19171, 1281, 501, 732, 6798, 1323, 1053, 30, 501,...
buf += " if (!(se_nacl_new))\n"
buf += " if (!se_nacl_new)\n"
def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name): buf = "" f = fabric_mod_dir_var + "/" + fabric_mod_name + "_configfs.c" print "Writing file: " + f p = open(f, 'w'); if not p: tcm_mod_err("Unable to open file: " + f) buf = "#include <linux/module.h>\n" buf += "#include <linux/moduleparam.h>\n" buf += "#include <linux/version.h>\n" buf += "#include <generated/utsrelease.h>\n" buf += "#include <linux/utsname.h>\n" buf += "#include <linux/init.h>\n" buf += "#include <linux/slab.h>\n" buf += "#include <linux/kthread.h>\n" buf += "#include <linux/types.h>\n" buf += "#include <linux/string.h>\n" buf += "#include <linux/configfs.h>\n" buf += "#include <linux/ctype.h>\n" buf += "#include <asm/unaligned.h>\n\n" buf += "#include <target/target_core_base.h>\n" buf += "#include <target/target_core_fabric.h>\n" buf += "#include <target/target_core_fabric_configfs.h>\n" buf += "#include <target/target_core_configfs.h>\n" buf += "#include <target/configfs_macros.h>\n\n" buf += "#include \"" + fabric_mod_name + "_base.h\"\n" buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n" buf += "/* Local pointer to allocated TCM configfs fabric module */\n" buf += "struct target_fabric_configfs *" + fabric_mod_name + "_fabric_configfs;\n\n" buf += "static struct se_node_acl *" + fabric_mod_name + "_make_nodeacl(\n" buf += " struct se_portal_group *se_tpg,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct se_node_acl *se_nacl, *se_nacl_new;\n" buf += " struct " + fabric_mod_name + "_nacl *nacl;\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " u64 wwpn = 0;\n" buf += " u32 nexus_depth;\n\n" buf += " /* " + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n" buf += " return ERR_PTR(-EINVAL); */\n" buf += " se_nacl_new = " + fabric_mod_name + "_alloc_fabric_acl(se_tpg);\n" buf += " if (!(se_nacl_new))\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += "//#warning FIXME: Hardcoded nexus depth in " + fabric_mod_name + "_make_nodeacl()\n" buf += " nexus_depth = 1;\n" buf += " /*\n" buf += " * se_nacl_new may be released by core_tpg_add_initiator_node_acl()\n" buf += " * when converting a NodeACL from demo mode -> explict\n" buf += " */\n" buf += " se_nacl = core_tpg_add_initiator_node_acl(se_tpg, se_nacl_new,\n" buf += " name, nexus_depth);\n" buf += " if (IS_ERR(se_nacl)) {\n" buf += " " + fabric_mod_name + "_release_fabric_acl(se_tpg, se_nacl_new);\n" buf += " return se_nacl;\n" buf += " }\n" buf += " /*\n" buf += " * Locate our struct " + fabric_mod_name + "_nacl and set the FC Nport WWPN\n" buf += " */\n" buf += " nacl = container_of(se_nacl, struct " + fabric_mod_name + "_nacl, se_node_acl);\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " nacl->" + fabric_mod_init_port + "_wwpn = wwpn;\n" buf += " /* " + fabric_mod_name + "_format_wwn(&nacl->" + fabric_mod_init_port + "_name[0], " + fabric_mod_name.upper() + "_NAMELEN, wwpn); */\n\n" buf += " return se_nacl;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_nodeacl(struct se_node_acl *se_acl)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_nacl *nacl = container_of(se_acl,\n" buf += " struct " + fabric_mod_name + "_nacl, se_node_acl);\n" buf += " core_tpg_del_initiator_node_acl(se_acl->se_tpg, se_acl, 1);\n" buf += " kfree(nacl);\n" buf += "}\n\n" buf += "static struct se_portal_group *" + fabric_mod_name + "_make_tpg(\n" buf += " struct se_wwn *wwn,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + "*" + fabric_mod_port + " = container_of(wwn,\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n\n" buf += " struct " + fabric_mod_name + "_tpg *tpg;\n" buf += " unsigned long tpgt;\n" buf += " int ret;\n\n" buf += " if (strstr(name, \"tpgt_\") != name)\n" buf += " return ERR_PTR(-EINVAL);\n" buf += " if (strict_strtoul(name + 5, 10, &tpgt) || tpgt > UINT_MAX)\n" buf += " return ERR_PTR(-EINVAL);\n\n" buf += " tpg = kzalloc(sizeof(struct " + fabric_mod_name + "_tpg), GFP_KERNEL);\n" buf += " if (!(tpg)) {\n" buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_tpg\");\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += " }\n" buf += " tpg->" + fabric_mod_port + " = " + fabric_mod_port + ";\n" buf += " tpg->" + fabric_mod_port + "_tpgt = tpgt;\n\n" buf += " ret = core_tpg_register(&" + fabric_mod_name + "_fabric_configfs->tf_ops, wwn,\n" buf += " &tpg->se_tpg, (void *)tpg,\n" buf += " TRANSPORT_TPG_TYPE_NORMAL);\n" buf += " if (ret < 0) {\n" buf += " kfree(tpg);\n" buf += " return NULL;\n" buf += " }\n" buf += " return &tpg->se_tpg;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_tpg(struct se_portal_group *se_tpg)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_tpg *tpg = container_of(se_tpg,\n" buf += " struct " + fabric_mod_name + "_tpg, se_tpg);\n\n" buf += " core_tpg_deregister(se_tpg);\n" buf += " kfree(tpg);\n" buf += "}\n\n" buf += "static struct se_wwn *" + fabric_mod_name + "_make_" + fabric_mod_port + "(\n" buf += " struct target_fabric_configfs *tf,\n" buf += " struct config_group *group,\n" buf += " const char *name)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + ";\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " u64 wwpn = 0;\n\n" buf += " /* if (" + fabric_mod_name + "_parse_wwn(name, &wwpn, 1) < 0)\n" buf += " return ERR_PTR(-EINVAL); */\n\n" buf += " " + fabric_mod_port + " = kzalloc(sizeof(struct " + fabric_mod_name + "_" + fabric_mod_port + "), GFP_KERNEL);\n" buf += " if (!(" + fabric_mod_port + ")) {\n" buf += " printk(KERN_ERR \"Unable to allocate struct " + fabric_mod_name + "_" + fabric_mod_port + "\");\n" buf += " return ERR_PTR(-ENOMEM);\n" buf += " }\n" if proto_ident == "FC" or proto_ident == "SAS": buf += " " + fabric_mod_port + "->" + fabric_mod_port + "_wwpn = wwpn;\n" buf += " /* " + fabric_mod_name + "_format_wwn(&" + fabric_mod_port + "->" + fabric_mod_port + "_name[0], " + fabric_mod_name.upper() + "__NAMELEN, wwpn); */\n\n" buf += " return &" + fabric_mod_port + "->" + fabric_mod_port + "_wwn;\n" buf += "}\n\n" buf += "static void " + fabric_mod_name + "_drop_" + fabric_mod_port + "(struct se_wwn *wwn)\n" buf += "{\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + " *" + fabric_mod_port + " = container_of(wwn,\n" buf += " struct " + fabric_mod_name + "_" + fabric_mod_port + ", " + fabric_mod_port + "_wwn);\n" buf += " kfree(" + fabric_mod_port + ");\n" buf += "}\n\n" buf += "static ssize_t " + fabric_mod_name + "_wwn_show_attr_version(\n" buf += " struct target_fabric_configfs *tf,\n" buf += " char *page)\n" buf += "{\n" buf += " return sprintf(page, \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n" buf += " \"on \"UTS_RELEASE\"\\n\", " + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n" buf += " utsname()->machine);\n" buf += "}\n\n" buf += "TF_WWN_ATTR_RO(" + fabric_mod_name + ", version);\n\n" buf += "static struct configfs_attribute *" + fabric_mod_name + "_wwn_attrs[] = {\n" buf += " &" + fabric_mod_name + "_wwn_version.attr,\n" buf += " NULL,\n" buf += "};\n\n" buf += "static struct target_core_fabric_ops " + fabric_mod_name + "_ops = {\n" buf += " .get_fabric_name = " + fabric_mod_name + "_get_fabric_name,\n" buf += " .get_fabric_proto_ident = " + fabric_mod_name + "_get_fabric_proto_ident,\n" buf += " .tpg_get_wwn = " + fabric_mod_name + "_get_fabric_wwn,\n" buf += " .tpg_get_tag = " + fabric_mod_name + "_get_tag,\n" buf += " .tpg_get_default_depth = " + fabric_mod_name + "_get_default_depth,\n" buf += " .tpg_get_pr_transport_id = " + fabric_mod_name + "_get_pr_transport_id,\n" buf += " .tpg_get_pr_transport_id_len = " + fabric_mod_name + "_get_pr_transport_id_len,\n" buf += " .tpg_parse_pr_out_transport_id = " + fabric_mod_name + "_parse_pr_out_transport_id,\n" buf += " .tpg_check_demo_mode = " + fabric_mod_name + "_check_false,\n" buf += " .tpg_check_demo_mode_cache = " + fabric_mod_name + "_check_true,\n" buf += " .tpg_check_demo_mode_write_protect = " + fabric_mod_name + "_check_true,\n" buf += " .tpg_check_prod_mode_write_protect = " + fabric_mod_name + "_check_false,\n" buf += " .tpg_alloc_fabric_acl = " + fabric_mod_name + "_alloc_fabric_acl,\n" buf += " .tpg_release_fabric_acl = " + fabric_mod_name + "_release_fabric_acl,\n" buf += " .tpg_get_inst_index = " + fabric_mod_name + "_tpg_get_inst_index,\n" buf += " .release_cmd = " + fabric_mod_name + "_release_cmd,\n" buf += " .shutdown_session = " + fabric_mod_name + "_shutdown_session,\n" buf += " .close_session = " + fabric_mod_name + "_close_session,\n" buf += " .stop_session = " + fabric_mod_name + "_stop_session,\n" buf += " .fall_back_to_erl0 = " + fabric_mod_name + "_reset_nexus,\n" buf += " .sess_logged_in = " + fabric_mod_name + "_sess_logged_in,\n" buf += " .sess_get_index = " + fabric_mod_name + "_sess_get_index,\n" buf += " .sess_get_initiator_sid = NULL,\n" buf += " .write_pending = " + fabric_mod_name + "_write_pending,\n" buf += " .write_pending_status = " + fabric_mod_name + "_write_pending_status,\n" buf += " .set_default_node_attributes = " + fabric_mod_name + "_set_default_node_attrs,\n" buf += " .get_task_tag = " + fabric_mod_name + "_get_task_tag,\n" buf += " .get_cmd_state = " + fabric_mod_name + "_get_cmd_state,\n" buf += " .queue_data_in = " + fabric_mod_name + "_queue_data_in,\n" buf += " .queue_status = " + fabric_mod_name + "_queue_status,\n" buf += " .queue_tm_rsp = " + fabric_mod_name + "_queue_tm_rsp,\n" buf += " .get_fabric_sense_len = " + fabric_mod_name + "_get_fabric_sense_len,\n" buf += " .set_fabric_sense_len = " + fabric_mod_name + "_set_fabric_sense_len,\n" buf += " .is_state_remove = " + fabric_mod_name + "_is_state_remove,\n" buf += " /*\n" buf += " * Setup function pointers for generic logic in target_core_fabric_configfs.c\n" buf += " */\n" buf += " .fabric_make_wwn = " + fabric_mod_name + "_make_" + fabric_mod_port + ",\n" buf += " .fabric_drop_wwn = " + fabric_mod_name + "_drop_" + fabric_mod_port + ",\n" buf += " .fabric_make_tpg = " + fabric_mod_name + "_make_tpg,\n" buf += " .fabric_drop_tpg = " + fabric_mod_name + "_drop_tpg,\n" buf += " .fabric_post_link = NULL,\n" buf += " .fabric_pre_unlink = NULL,\n" buf += " .fabric_make_np = NULL,\n" buf += " .fabric_drop_np = NULL,\n" buf += " .fabric_make_nodeacl = " + fabric_mod_name + "_make_nodeacl,\n" buf += " .fabric_drop_nodeacl = " + fabric_mod_name + "_drop_nodeacl,\n" buf += "};\n\n" buf += "static int " + fabric_mod_name + "_register_configfs(void)\n" buf += "{\n" buf += " struct target_fabric_configfs *fabric;\n" buf += " int ret;\n\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + " fabric module %s on %s/%s\"\n" buf += " \" on \"UTS_RELEASE\"\\n\"," + fabric_mod_name.upper() + "_VERSION, utsname()->sysname,\n" buf += " utsname()->machine);\n" buf += " /*\n" buf += " * Register the top level struct config_item_type with TCM core\n" buf += " */\n" buf += " fabric = target_fabric_configfs_init(THIS_MODULE, \"" + fabric_mod_name[4:] + "\");\n" buf += " if (!(fabric)) {\n" buf += " printk(KERN_ERR \"target_fabric_configfs_init() failed\\n\");\n" buf += " return -ENOMEM;\n" buf += " }\n" buf += " /*\n" buf += " * Setup fabric->tf_ops from our local " + fabric_mod_name + "_ops\n" buf += " */\n" buf += " fabric->tf_ops = " + fabric_mod_name + "_ops;\n" buf += " /*\n" buf += " * Setup default attribute lists for various fabric->tf_cit_tmpl\n" buf += " */\n" buf += " TF_CIT_TMPL(fabric)->tfc_wwn_cit.ct_attrs = " + fabric_mod_name + "_wwn_attrs;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_base_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_attrib_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_param_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_np_base_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_base_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_attrib_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_auth_cit.ct_attrs = NULL;\n" buf += " TF_CIT_TMPL(fabric)->tfc_tpg_nacl_param_cit.ct_attrs = NULL;\n" buf += " /*\n" buf += " * Register the fabric for use within TCM\n" buf += " */\n" buf += " ret = target_fabric_configfs_register(fabric);\n" buf += " if (ret < 0) {\n" buf += " printk(KERN_ERR \"target_fabric_configfs_register() failed\"\n" buf += " \" for " + fabric_mod_name.upper() + "\\n\");\n" buf += " return ret;\n" buf += " }\n" buf += " /*\n" buf += " * Setup our local pointer to *fabric\n" buf += " */\n" buf += " " + fabric_mod_name + "_fabric_configfs = fabric;\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Set fabric -> " + fabric_mod_name + "_fabric_configfs\\n\");\n" buf += " return 0;\n" buf += "};\n\n" buf += "static void " + fabric_mod_name + "_deregister_configfs(void)\n" buf += "{\n" buf += " if (!(" + fabric_mod_name + "_fabric_configfs))\n" buf += " return;\n\n" buf += " target_fabric_configfs_deregister(" + fabric_mod_name + "_fabric_configfs);\n" buf += " " + fabric_mod_name + "_fabric_configfs = NULL;\n" buf += " printk(KERN_INFO \"" + fabric_mod_name.upper() + "[0] - Cleared " + fabric_mod_name + "_fabric_configfs\\n\");\n" buf += "};\n\n" buf += "static int __init " + fabric_mod_name + "_init(void)\n" buf += "{\n" buf += " int ret;\n\n" buf += " ret = " + fabric_mod_name + "_register_configfs();\n" buf += " if (ret < 0)\n" buf += " return ret;\n\n" buf += " return 0;\n" buf += "};\n\n" buf += "static void " + fabric_mod_name + "_exit(void)\n" buf += "{\n" buf += " " + fabric_mod_name + "_deregister_configfs();\n" buf += "};\n\n" buf += "#ifdef MODULE\n" buf += "MODULE_DESCRIPTION(\"" + fabric_mod_name.upper() + " series fabric driver\");\n" buf += "MODULE_LICENSE(\"GPL\");\n" buf += "module_init(" + fabric_mod_name + "_init);\n" buf += "module_exit(" + fabric_mod_name + "_exit);\n" buf += "#endif\n" ret = p.write(buf) if ret: tcm_mod_err("Unable to write f: " + f) p.close() return
52bd0b610395d98ace77436d5aa575b6cc3824b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5327/52bd0b610395d98ace77436d5aa575b6cc3824b8/tcm_mod_builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 1711, 67, 3510, 67, 1425, 2556, 12, 9393, 67, 6392, 16, 21127, 67, 1711, 67, 1214, 67, 1401, 16, 21127, 67, 1711, 67, 529, 4672, 1681, 273, 1408, 225, 284, 273, 21127, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1715, 81, 67, 1711, 67, 3510, 67, 1425, 2556, 12, 9393, 67, 6392, 16, 21127, 67, 1711, 67, 1214, 67, 1401, 16, 21127, 67, 1711, 67, 529, 4672, 1681, 273, 1408, 225, 284, 273, 21127, ...
if (res.find('tp') > -1) or (res == 'tdhtml'):
else:
def send_to_graph(results_server, results_link, title, date, browser_config, results): tbox = title url_format = "http://%s/%s" link_format= "<a href = \"%s\">%s</a>" #value, testname, tbox, timeval, date, branch, buildid, type, data result_format = "%.2f,%s,%s,%d,%d,%s,%s,%s,%s,\n" result_format2 = "%.2f,%s,%s,%d,%d,%s,%s,%s,\n" links = '' for res in results: filename = tempfile.mktemp() tmpf = open(filename, "w") browser_dump, counter_dump = results[res] filename = tempfile.mktemp() tmpf = open(filename, "w") if res == 'ts': i = 0 for val in browser_dump: tmpf.write(result_format % (float(val), res, tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", "ms")) i += 1 if (res.find('tp') > -1) or (res == 'tdhtml'): # each line of the string is of the format i;page_name;median;mean;min;max;time vals\n for bd in browser_dump: bd.rstrip('\n') page_results = bd.splitlines() i = 0 for mypage in page_results[2:]: r = mypage.split(';') if r[1].find('/') > -1 : page = r[1].split('/')[1] else: page = r[1] try: val = float(r[2]) except ValueError: print 'WARNING: value error for median in tp' val = 0 tmpf.write(result_format % (val, res + '_loadtime', tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete", page)) i += 1 tmpf.flush() tmpf.close() links += post_chunk(results_server, results_link, res, filename) os.remove(filename) for cd in counter_dump: for count_type in cd: val_list = cd[count_type] chunks = chunk_list(val_list) chunk_link = '' i = 0 for chunk in chunks: filename = tempfile.mktemp() tmpf = open(filename, "w") for val in chunk: tmpf.write(result_format2 % (float(val), res + "_" + count_type.replace("%", "Percent"), tbox, i, date, browser_config['branch'], browser_config['buildid'], "discrete")) i += 1 tmpf.flush() tmpf.close() chunk_link = post_chunk(results_server, results_link, '%s_%s (%d values)' % (res, count_type, len(chunk)), filename) os.remove(filename) links += chunk_link lines = links.split('\n') for line in lines: if line == "": continue values = line.split(":") linkName = values[1] if float(values[2]) > 0: linkName += "_T: " + values[2] else: linkName += "_1" url = url_format % (results_server, values[0],) link = link_format % (url, linkName,) print "RETURN: " + link
9bb9f870fe7337e8a9b9500bc9342ab9e1fde678 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12156/9bb9f870fe7337e8a9b9500bc9342ab9e1fde678/run_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 869, 67, 4660, 12, 4717, 67, 3567, 16, 1686, 67, 1232, 16, 2077, 16, 1509, 16, 4748, 67, 1425, 16, 1686, 4672, 268, 2147, 273, 2077, 880, 67, 2139, 273, 315, 2505, 23155, 8...
write_array(f, set[0], item_sep, nest_prefix, nest_suffix, nest_sep)
write_array(f, set[0], item_sep, nest_prefix, nest_suffix, nest_sep)
def write_array(f, set, item_sep=' ', nest_prefix='', nest_suffix='\n', nest_sep=''): """Write an array of arbitrary dimension to a file. A general recursive array writer. The last four parameters allow a great deal of freedom in choosing the output format of the array. The defaults for those parameters give output that is gnuplot-readable. But using, for example, ( ',', '{', '}', ',\\n' ) would output an array in a format that Mathematica could read. item_sep should not contain '%' (or if it does, it should be escaped to '%%' ) since item_sep is put into a format string. """ if len(set.shape) == 1: (columns,) = set.shape assert columns > 0 fmt = string.join(['%s'] * columns, item_sep) f.write(nest_prefix) f.write(fmt % tuple(set.tolist())) f.write(nest_suffix) elif len(set.shape) == 2: # This case could be done with recursion, but `unroll' for # efficiency. (points, columns) = set.shape assert points > 0 assert columns > 0 fmt = string.join(['%s'] * columns, item_sep) f.write(nest_prefix + nest_prefix) f.write(fmt % tuple(set[0].tolist())) f.write(nest_suffix) for point in set[1:]: f.write(nest_sep + nest_prefix) f.write(fmt % tuple(point.tolist())) f.write(nest_suffix) f.write(nest_suffix) else: assert set.shape[0] > 0 f.write(nest_prefix) write_array(f, set[0], item_sep, nest_prefix, nest_suffix, nest_sep) for subset in set[1:]: f.write(nest_sep) write_array(f, subset, item_sep, nest_prefix, nest_suffix, nest_sep) f.write(nest_suffix)
0a4f7548fadcad2f9565bf390a8db9021c445c01 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9569/0a4f7548fadcad2f9565bf390a8db9021c445c01/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1126, 12, 74, 16, 444, 16, 761, 67, 10814, 2218, 2265, 15095, 67, 3239, 2218, 2187, 15095, 67, 8477, 2218, 64, 82, 2187, 15095, 67, 10814, 2218, 11, 4672, 3536, 3067, 392, 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, 1045, 67, 1126, 12, 74, 16, 444, 16, 761, 67, 10814, 2218, 2265, 15095, 67, 3239, 2218, 2187, 15095, 67, 8477, 2218, 64, 82, 2187, 15095, 67, 10814, 2218, 11, 4672, 3536, 3067, 392, 52...
s,o=exec_command('echo "$BBB"')
s,o=exec_command('echo "$BBB"',**kws)
def test_posix(): s,o=exec_command("echo Hello") assert s==0 and o=='Hello',(s,o) s,o=exec_command('echo $AAA') assert s==0 and o=='',(s,o) s,o=exec_command('echo "$AAA"',AAA='Tere') assert s==0 and o=='Tere',(s,o) s,o=exec_command('echo "$AAA"') assert s==0 and o=='',(s,o) os.environ['BBB'] = 'Hi' s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('echo "$BBB"',BBB='Hey') assert s==0 and o=='Hey',(s,o) s,o=exec_command('echo "$BBB"') assert s==0 and o=='Hi',(s,o) s,o=exec_command('this_is_not_a_command') assert s!=0 and o!='',(s,o) s,o=exec_command('echo path=$PATH') assert s==0 and o!='',(s,o) s,o=exec_command('python -c "import sys,os;sys.stderr.write(os.name)"') assert s==0 and o=='posix',(s,o) s,o=exec_command('python -c "raise \'Ignore me.\'"') assert s==1 and o,(s,o) s,o=exec_command('python -c "import sys;sys.stderr.write(\'0\');sys.stderr.write(\'1\');sys.stderr.write(\'2\')"') assert s==0 and o=='012',(s,o) s,o=exec_command('python -c "import sys;sys.exit(15)"') assert s==15 and o=='',(s,o) s,o=exec_command('python -c "print \'Heipa\'"') assert s==0 and o=='Heipa',(s,o) print 'ok'
59c6f7c8809104ffcc97e2083529ae4111b41755 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/59c6f7c8809104ffcc97e2083529ae4111b41755/exec_command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 24463, 13332, 272, 16, 83, 33, 4177, 67, 3076, 2932, 12946, 20889, 7923, 1815, 272, 631, 20, 471, 320, 18920, 18601, 2187, 12, 87, 16, 83, 13, 225, 272, 16, 83, 33, 4177, 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, 1842, 67, 24463, 13332, 272, 16, 83, 33, 4177, 67, 3076, 2932, 12946, 20889, 7923, 1815, 272, 631, 20, 471, 320, 18920, 18601, 2187, 12, 87, 16, 83, 13, 225, 272, 16, 83, 33, 4177, 6...
'''
"""
def __del__(self): '''This makes sure that no system resources are left open. Python only garbage collects Python objects. Since OS file descriptors are not Python objects, so they must be handled manually. ''' if self.child_fd is not -1: os.close (self.child_fd)
a6436229531e4cc3cceb58c0322f4ecc258e53d4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9386/a6436229531e4cc3cceb58c0322f4ecc258e53d4/pexpect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 9163, 2503, 7297, 3071, 716, 1158, 2619, 2703, 854, 2002, 1696, 18, 6600, 1338, 15340, 30976, 6600, 2184, 18, 7897, 5932, 585, 14215, 854, 486, 6600, 2184,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3771, 972, 12, 2890, 4672, 9163, 2503, 7297, 3071, 716, 1158, 2619, 2703, 854, 2002, 1696, 18, 6600, 1338, 15340, 30976, 6600, 2184, 18, 7897, 5932, 585, 14215, 854, 486, 6600, 2184,...
Zip(PackageSetName) TarBzip2(PackageSetName)
if (Target != "NT386GNU" or PackageSetName != "std"): if Target == "NT386": Zip(PackageSetName) else: TarBzip2(PackageSetName)
def MakeArchives(): for PackageSetName in ["min", "std", "core", "base"]: Zip(PackageSetName) TarBzip2(PackageSetName)
d05c4d7a35451f2404c851871edf4e1de4df519c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9328/d05c4d7a35451f2404c851871edf4e1de4df519c/make-dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 12269, 3606, 13332, 364, 7508, 11924, 316, 8247, 1154, 3113, 315, 5084, 3113, 315, 3644, 3113, 315, 1969, 11929, 30, 309, 261, 2326, 480, 315, 1784, 23, 5292, 8318, 57, 6, 578, 750...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 12269, 3606, 13332, 364, 7508, 11924, 316, 8247, 1154, 3113, 315, 5084, 3113, 315, 3644, 3113, 315, 1969, 11929, 30, 309, 261, 2326, 480, 315, 1784, 23, 5292, 8318, 57, 6, 578, 750...
"contact_email", "licence")
"contact_email", "licence", "classifiers")
def is_pure (self): return (self.has_pure_modules() and not self.has_ext_modules() and not self.has_c_libraries())
0aa9e235bddfa022b778f96b2814d5140432a2f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0aa9e235bddfa022b778f96b2814d5140432a2f3/dist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 84, 594, 261, 2890, 4672, 327, 261, 2890, 18, 5332, 67, 84, 594, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 408, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 71, 67, 314...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 353, 67, 84, 594, 261, 2890, 4672, 327, 261, 2890, 18, 5332, 67, 84, 594, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 408, 67, 6400, 1435, 471, 486, 365, 18, 5332, 67, 71, 67, 314...
gUefiUnloadImageString = [ """ GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverUnloadImageCount = ${Count}; EFI_STATUS EFIAPI ProcessModuleUnloadList ( IN EFI_HANDLE ImageHandle ) { return EFI_SUCCESS; } """, """ GLOBAL_REMOVE_IF_UNREFERENCED const UINT8 _gDriverUnloadImageCount = ${Count};
gUefiUnloadImagePrototype = """
#ifndef _AUTOGENH_${Guid}
c0df5fc3f54d659cf283e68f6c5e03b271e178cb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/914/c0df5fc3f54d659cf283e68f6c5e03b271e178cb/GenC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 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, 468, 430, 82, 536, 389, 18909, 16652, 44, 67, 18498, 22549, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
parse_limit = 350
parse_limit = 250
def get_commits_stats(repo_name, ts_min_y, ts_max_y): from rhodecode.model.db import Statistics, Repository log = get_commits_stats.get_logger() author_key_cleaner = lambda k: person(k).replace('"', "") #for js data compatibilty commits_by_day_author_aggregate = {} commits_by_day_aggregate = {} repos_path = get_hg_ui_settings()['paths_root_path'].replace('*', '') repo = MercurialRepository(repos_path + repo_name) skip_date_limit = True parse_limit = 350 #limit for single task changeset parsing optimal for last_rev = 0 last_cs = None timegetter = itemgetter('time') sa = get_session() dbrepo = sa.query(Repository)\ .filter(Repository.repo_name == repo_name).scalar() cur_stats = sa.query(Statistics)\ .filter(Statistics.repository == dbrepo).scalar() if cur_stats: last_rev = cur_stats.stat_on_revision if not repo.revisions: return True if last_rev == repo.revisions[-1] and len(repo.revisions) > 1: #pass silently without any work if we're not on first revision or current #state of parsing revision(from db marker) is the last revision return True if cur_stats: commits_by_day_aggregate = OrderedDict( json.loads( cur_stats.commit_activity_combined)) commits_by_day_author_aggregate = json.loads(cur_stats.commit_activity) log.debug('starting parsing %s', parse_limit) for cnt, rev in enumerate(repo.revisions[last_rev:]): last_cs = cs = repo.get_changeset(rev) k = '%s-%s-%s' % (cs.date.timetuple()[0], cs.date.timetuple()[1], cs.date.timetuple()[2]) timetupple = [int(x) for x in k.split('-')] timetupple.extend([0 for _ in xrange(6)]) k = mktime(timetupple) if commits_by_day_author_aggregate.has_key(author_key_cleaner(cs.author)): try: l = [timegetter(x) for x in commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data']] time_pos = l.index(k) except ValueError: time_pos = False if time_pos >= 0 and time_pos is not False: datadict = commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data'][time_pos] datadict["commits"] += 1 datadict["added"] += len(cs.added) datadict["changed"] += len(cs.changed) datadict["removed"] += len(cs.removed) else: if k >= ts_min_y and k <= ts_max_y or skip_date_limit: datadict = {"time":k, "commits":1, "added":len(cs.added), "changed":len(cs.changed), "removed":len(cs.removed), } commits_by_day_author_aggregate\ [author_key_cleaner(cs.author)]['data'].append(datadict) else: if k >= ts_min_y and k <= ts_max_y or skip_date_limit: commits_by_day_author_aggregate[author_key_cleaner(cs.author)] = { "label":author_key_cleaner(cs.author), "data":[{"time":k, "commits":1, "added":len(cs.added), "changed":len(cs.changed), "removed":len(cs.removed), }], "schema":["commits"], } #gather all data by day if commits_by_day_aggregate.has_key(k): commits_by_day_aggregate[k] += 1 else: commits_by_day_aggregate[k] = 1 if cnt >= parse_limit: #don't fetch to much data since we can freeze application break overview_data = [] for k, v in commits_by_day_aggregate.items(): overview_data.append([k, v]) overview_data = sorted(overview_data, key=itemgetter(0)) if not commits_by_day_author_aggregate: commits_by_day_author_aggregate[author_key_cleaner(repo.contact)] = { "label":author_key_cleaner(repo.contact), "data":[0, 1], "schema":["commits"], } stats = cur_stats if cur_stats else Statistics() stats.commit_activity = json.dumps(commits_by_day_author_aggregate) stats.commit_activity_combined = json.dumps(overview_data) log.debug('last revison %s', last_rev) leftovers = len(repo.revisions[last_rev:]) log.debug('revisions to parse %s', leftovers) if last_rev == 0 or leftovers < parse_limit: stats.languages = json.dumps(__get_codes_stats(repo_name)) stats.repository = dbrepo stats.stat_on_revision = last_cs.revision try: sa.add(stats) sa.commit() except: log.error(traceback.format_exc()) sa.rollback() return False if len(repo.revisions) > 1: run_task(get_commits_stats, repo_name, ts_min_y, ts_max_y) return True
20c9fe9ddf153257e8da19d54332f7d8e73dc563 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4230/20c9fe9ddf153257e8da19d54332f7d8e73dc563/tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27000, 67, 5296, 12, 7422, 67, 529, 16, 3742, 67, 1154, 67, 93, 16, 3742, 67, 1896, 67, 93, 4672, 628, 6259, 390, 710, 18, 2284, 18, 1966, 1930, 22964, 16, 6281, 613, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 27000, 67, 5296, 12, 7422, 67, 529, 16, 3742, 67, 1154, 67, 93, 16, 3742, 67, 1896, 67, 93, 4672, 628, 6259, 390, 710, 18, 2284, 18, 1966, 1930, 22964, 16, 6281, 613, 273, ...
if is_method: print >>gv.out, ' %(type)s_self = __to_ss<%(type)s>(self);' % {'type' : '__%s__::'%gv.module.ident+cpp.typesetreprnew(func.vars[func.formals[0]], func)}
def do_extmod_method(gv, func): is_method = isinstance(func.parent, class_) if is_method: formals = func.formals[1:] else: formals = func.formals if isinstance(func.parent, class_): id = func.parent.ident+'_'+func.ident else: id = gv.cpp_name(func.ident) print >>gv.out, 'PyObject *%s(PyObject *self, PyObject *args) {' % id print >>gv.out, ' if(PyTuple_Size(args) < %d || PyTuple_Size(args) > %d) {' % (len(formals)-len(func.defaults), len(formals)) print >>gv.out, ' PyErr_SetString(PyExc_Exception, "invalid number of arguments");' print >>gv.out, ' return 0;' print >>gv.out, ' }\n' print >>gv.out, ' try {' if is_method: print >>gv.out, ' %(type)s_self = __to_ss<%(type)s>(self);' % {'type' : '__%s__::'%gv.module.ident+cpp.typesetreprnew(func.vars[func.formals[0]], func)} # convert [self,] args for i, formal in enumerate(formals): gv.start('') typ = cpp.typesetreprnew(func.vars[formal], func) cls = [t[0] for t in gv.mergeinh[func.vars[formal]] if isinstance(t[0], class_)] if [c for c in cls if c.mv.module == getgx().main_module]: typ = ('__%s__::'%c.mv.module.ident)+typ gv.append(' %(type)sarg_%(num)d = (PyTuple_Size(args) > %(num)d) ? __to_ss<%(type)s>(PyTuple_GetItem(args, %(num)d)) : ' % {'type' : typ, 'num' : i}) if i >= len(formals)-len(func.defaults): defau = func.defaults[i-(len(formals)-len(func.defaults))] cast = cpp.assign_needs_cast(defau, None, func.vars[formal], func) if cast: gv.append('(('+cpp.typesetreprnew(func.vars[formal], func)+')') if defau in func.mv.defaults: if gv.mergeinh[defau] == set([(defclass('none'),0)]): gv.append('0') else: gv.append('%s::default_%d' % ('__'+func.mv.module.ident+'__', func.mv.defaults[defau])) else: gv.visit(defau, func) if cast: gv.append(')') else: gv.append('0') gv.eol() print >>gv.out # call if is_method: where = '_self->' else: where = '__'+gv.module.ident+'__::' print >>gv.out, ' return __to_py('+where+gv.cpp_name(func.ident)+'('+', '.join(['arg_%d' % i for i in range(len(formals))])+'));\n' # convert exceptions print >>gv.out, ' } catch (Exception *e) {' print >>gv.out, ' PyErr_SetString(__to_py(e), e->msg->unit.c_str());' print >>gv.out, ' return 0;' print >>gv.out, ' }' print >>gv.out, '}\n'
eca16fba8f1425ac7e6039d8df15440472b0fa5b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6661/eca16fba8f1425ac7e6039d8df15440472b0fa5b/extmod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 408, 1711, 67, 2039, 12, 75, 90, 16, 1326, 4672, 353, 67, 2039, 273, 1549, 12, 644, 18, 2938, 16, 667, 67, 13, 309, 353, 67, 2039, 30, 646, 1031, 273, 1326, 18, 687, 1031,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 408, 1711, 67, 2039, 12, 75, 90, 16, 1326, 4672, 353, 67, 2039, 273, 1549, 12, 644, 18, 2938, 16, 667, 67, 13, 309, 353, 67, 2039, 30, 646, 1031, 273, 1326, 18, 687, 1031,...
self.db.getjournal('b', bid)
def test_removeClass(self): self.init_ml() aid = self.db.a.create(name='apple') bid = self.db.b.create(name='bear', fooz=[aid]) self.db.commit(); self.db.close()
b93a11990da4ab3c444cbd0f36c6bdb8f73387c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/b93a11990da4ab3c444cbd0f36c6bdb8f73387c5/db_test_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4479, 797, 12, 2890, 4672, 365, 18, 2738, 67, 781, 1435, 20702, 273, 365, 18, 1966, 18, 69, 18, 2640, 12, 529, 2218, 438, 1802, 6134, 9949, 273, 365, 18, 1966, 18, 70, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4479, 797, 12, 2890, 4672, 365, 18, 2738, 67, 781, 1435, 20702, 273, 365, 18, 1966, 18, 69, 18, 2640, 12, 529, 2218, 438, 1802, 6134, 9949, 273, 365, 18, 1966, 18, 70, 18, ...
def print_stats(self): """Print per-port stats to stdout""" print "port number : %d" % (self.port_number) print "port speed (bps) : %f" % \ (self.port_cap.compute_max_port_speed_bps()) print "ttl rx bytes : %d" % (self.total_rx_bytes) print "ttl tx bytes : %d" % (self.total_tx_bytes) print "ttl rx packets : %d" % (self.total_rx_packets) print "ttl tx packets : %d" % (self.total_tx_packets) print "ttl rx packets dropped : %d" % (self.total_rx_packets_dropped) print "ttl tx packets dropped : %d" % (self.total_tx_packets_dropped) print "ttl rx errors : %d" % (self.total_rx_errors) print "ttl tx errors : %d" % (self.total_tx_errors) print "delta rx bytes : %d" % (self.delta_rx_bytes) print "delta tx bytes : %d" % (self.delta_tx_bytes) print "delta rx packets : %d" % (self.delta_rx_packets) print "delta tx packets : %d" % (self.delta_tx_packets) print "delta rx packets dropped: %d" % (self.delta_rx_packets_dropped) print "delta tx packets dropped: %d" % (self.delta_tx_packets_dropped) print "delta rx errors : %d" % (self.delta_rx_errors) print "delta tx errors : %d" % (self.delta_tx_errors) print "bits rx/sec : %f" % \ (self.estimate_bits_received_per_sec()) print "bits tx/sec : %f" % \ (self.estimate_bits_sent_per_sec()) print "packets rx/sec : %f" % \ (self.estimate_packets_received_per_sec()) print "packets tx/sec : %f" % \ (self.estimate_packets_sent_per_sec()) print "rx utilization : %f" % \ (self.estimate_port_rx_utilization()) print "tx utilization : %f" % \ (self.estimate_port_tx_utilization())
def to_dict(self): dict = {} dict['port_number'] = self.port_number # Save the nested capabilities structure dict['port_cap'] = self.port_cap.to_dict() # Counters dict['total_rx_bytes'] = self.total_rx_bytes dict['total_tx_bytes'] = self.total_tx_bytes dict['total_rx_packets'] = self.total_rx_packets dict['total_tx_packets'] = self.total_tx_packets dict['total_rx_packets_dropped'] = self.total_rx_packets_dropped dict['total_tx_packets_dropped'] = self.total_tx_packets_dropped dict['total_rx_errors'] = self.total_rx_errors dict['total_tx_errors'] = self.total_tx_errors # Deltas dict['delta_rx_bytes'] = self.delta_rx_bytes dict['delta_tx_bytes'] = self.delta_tx_bytes dict['delta_rx_packets'] = self.delta_rx_packets dict['delta_tx_packets'] = self.delta_tx_packets dict['delta_rx_packets_dropped'] = self.delta_rx_packets_dropped dict['delta_tx_packets_dropped'] = self.delta_tx_packets_dropped dict['delta_rx_errors'] = self.delta_rx_errors dict['delta_tx_errors'] = self.delta_tx_errors return dict
7ac8a1fbddf31c441a2860afea03f1182e25f717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/7ac8a1fbddf31c441a2860afea03f1182e25f717/monitoring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 1576, 12, 2890, 4672, 2065, 273, 2618, 2065, 3292, 655, 67, 2696, 3546, 273, 365, 18, 655, 67, 2696, 468, 7074, 326, 4764, 12359, 3695, 2065, 3292, 655, 67, 5909, 3546, 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, 358, 67, 1576, 12, 2890, 4672, 2065, 273, 2618, 2065, 3292, 655, 67, 2696, 3546, 273, 365, 18, 655, 67, 2696, 468, 7074, 326, 4764, 12359, 3695, 2065, 3292, 655, 67, 5909, 3546, 273, 3...
\item There's a paper at
(3) There's a paper at
def exp(self, prec = infinity): r""" Returns exp of this power series to the indicated precision.
a96f79fd33a3d9d3ee1201b250a167d4a712e1bb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/a96f79fd33a3d9d3ee1201b250a167d4a712e1bb/power_series_ring_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1329, 12, 2890, 16, 13382, 273, 27272, 4672, 436, 8395, 2860, 1329, 434, 333, 7212, 4166, 358, 326, 17710, 6039, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1329, 12, 2890, 16, 13382, 273, 27272, 4672, 436, 8395, 2860, 1329, 434, 333, 7212, 4166, 358, 326, 17710, 6039, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return states[v.lower()]
return self._boolean_states[v.lower()]
def getboolean(self, section, option): states = {'1': 1, 'yes': 1, 'true': 1, 'on': 1, '0': 0, 'no': 0, 'false': 0, 'off': 0} v = self.get(section, option) if not v.lower() in states: raise ValueError, 'Not a boolean: %s' % v return states[v.lower()]
c2ff9051d2dace414d5ec928fa3e41edd9297992 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/c2ff9051d2dace414d5ec928fa3e41edd9297992/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6494, 12, 2890, 16, 2442, 16, 1456, 4672, 5493, 273, 13666, 21, 4278, 404, 16, 296, 9707, 4278, 404, 16, 296, 3767, 4278, 404, 16, 296, 265, 4278, 404, 16, 296, 20, 4278, 374, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6494, 12, 2890, 16, 2442, 16, 1456, 4672, 5493, 273, 13666, 21, 4278, 404, 16, 296, 9707, 4278, 404, 16, 296, 3767, 4278, 404, 16, 296, 265, 4278, 404, 16, 296, 20, 4278, 374, 1...
failed_xrefs = self.htmlwriter._failed_xrefs if not failed_xrefs.has_key(identifier): failed_xrefs[identifier] = {} failed_xrefs[identifier][`self.container`] = 1 return '<span class="link">%s</span>' % label
return '<code class="link">%s</code>' % label
def translate_identifier_xref(self, identifier, label=None): if label is None: label = markup.plaintext_to_html(identifier)
1cd34dc4f7b279e4ac150be4b4be74d3336fb477 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/1cd34dc4f7b279e4ac150be4b4be74d3336fb477/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5644, 67, 22044, 12, 2890, 16, 2756, 16, 1433, 33, 7036, 4672, 309, 1433, 353, 599, 30, 1433, 273, 9813, 18, 412, 10133, 67, 869, 67, 2620, 12, 5644, 13, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4204, 67, 5644, 67, 22044, 12, 2890, 16, 2756, 16, 1433, 33, 7036, 4672, 309, 1433, 353, 599, 30, 1433, 273, 9813, 18, 412, 10133, 67, 869, 67, 2620, 12, 5644, 13, 2, -100, -100, -10...
.tolist()
.to_list()
def distinct(self): return Query([2,2,3,5,5]) \ .distinct() \ .tolist()
f134b825431ac82f3dbba76e7a945a0e195d27cf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14315/f134b825431ac82f3dbba76e7a945a0e195d27cf/pyquery.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10217, 12, 2890, 4672, 327, 2770, 3816, 22, 16, 22, 16, 23, 16, 25, 16, 25, 5717, 521, 263, 24592, 1435, 521, 263, 3490, 376, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10217, 12, 2890, 4672, 327, 2770, 3816, 22, 16, 22, 16, 23, 16, 25, 16, 25, 5717, 521, 263, 24592, 1435, 521, 263, 3490, 376, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
def write(self, cr, uid, ids, vals, context=None):
def write(self, cr, uid, ids, vals, context=None):
def write(self, cr, uid, ids, vals, context=None): res=self.search(cr,uid,[('id','in',ids)]) if not len(res): return False if not self._check_duplication(cr,uid,vals,ids,'write'): raise except_orm('ValidateError', 'File name must be unique!') result = super(document_file,self).write(cr,uid,ids,vals,context=context) cr.commit() try: for f in self.browse(cr, uid, ids, context=context): #if 'datas' not in vals: # vals['datas']=f.datas res = content_index(base64.decodestring(vals['datas']), f.datas_fname, f.file_type or None) super(document_file,self).write(cr, uid, ids, { 'index_content': res }) cr.commit() except: pass return result
02e76107e25226ec737069adf4f356d08ed0e278 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/02e76107e25226ec737069adf4f356d08ed0e278/document.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 400, 33, 2890, 18, 3072, 12, 3353, 16, 1911, 16, 63, 2668, 350, 17023, 267, 2187, 2232, 13, 5717, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 4672, 400, 33, 2890, 18, 3072, 12, 3353, 16, 1911, 16, 63, 2668, 350, 17023, 267, 2187, 2232, 13, 5717, 309...
wikipedia.output('\03{lightred}** wikipedia:%s has %i %s articles\03{default}' % (site.lang, len(arts), feature))
wikipedia.output('\03{lightred}** wikipedia:%s has %i %s articles\03{default}' % (site.lang, len(arts), pType))
def featuredArticles(site, pType): arts=[] try: if pType == 'good': method=good_name[site.lang][0] elif pType == 'list': method=lists_name[site.lang][0] else: method=featured_name[site.lang][0] except KeyError: wikipedia.output(u'Error: language %s doesn\'t has %s category source.' % (site.lang, feature)) return arts if pType == 'good': name=good_name[site.lang][1] elif pType == 'list': name=lists_name[site.lang][1] else: name=featured_name[site.lang][1] raw=method(site, name) for p in raw: if p.namespace()==0: # Article arts.append(p) elif p.namespace()==1 and site.lang <> 'el': # Article talk (like in English) arts.append(wikipedia.Page(p.site(), p.titleWithoutNamespace())) wikipedia.output('\03{lightred}** wikipedia:%s has %i %s articles\03{default}' % (site.lang, len(arts), feature)) return arts
885201754d1379c0acc29a6540a5b07c634ccfba /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/885201754d1379c0acc29a6540a5b07c634ccfba/featured.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2572, 72, 19001, 12, 4256, 16, 29171, 4672, 419, 3428, 33, 8526, 775, 30, 309, 29171, 422, 296, 19747, 4278, 707, 33, 19747, 67, 529, 63, 4256, 18, 4936, 6362, 20, 65, 1327, 29171, 422...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2572, 72, 19001, 12, 4256, 16, 29171, 4672, 419, 3428, 33, 8526, 775, 30, 309, 29171, 422, 296, 19747, 4278, 707, 33, 19747, 67, 529, 63, 4256, 18, 4936, 6362, 20, 65, 1327, 29171, 422...
gzf = gzip.GzipFile(path, "wb", fileobj = os.fdopen(os.dup(fd), "w"))
gzf = gzip.GzipFile('', "wb", fileobj = os.fdopen(os.dup(fd), "w"))
def getNextFile(self): if not self.items: return None
5e116c568dc7a66c94d65f172a930733bbb3f886 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/5e116c568dc7a66c94d65f172a930733bbb3f886/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6927, 812, 12, 2890, 4672, 309, 486, 365, 18, 3319, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6927, 812, 12, 2890, 4672, 309, 486, 365, 18, 3319, 30, 327, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sys.stderr.write("sorted: %s %i %i\n" % (title, fileno, articlePointer))
def makeFullIndex(): global trailerLength global aarFile, aarFileLength iPrev = 0 iNext = 0 headerpack = "LLhL" headerlen = struct.calcsize(headerpack) sep = "\xFD\xFD\xFD\xFD" count = 0 for item in sortex: if count % 100 == 0: sys.stderr.write("\r" + str(count)) count = count + 1 sortkey, title = item.split("___", 2) try: articlePointer = long(indexDb[title]) if makeSingleFile: fileno = 0 else: for fileno in range(1, len(aarFile)): if articlePointer < aarFileLength[fileno]: break articlePointer -= aarFileLength[fileno] except KeyError: sys.stderr.write("Redirect not found: %s\n" % title) fileno = -1 articlePointer = 0 sys.stderr.write("sorted: %s %i %i\n" % (title, fileno, articlePointer)) iNext = 4 + headerlen + len(sortkey) + 3 + len(title) wunit = sep + struct.pack(headerpack, long(iNext), long(iPrev), fileno, long(articlePointer)) + sortkey + "___" + title aarFile[0].write(wunit) aarFileLength[0] += len(wunit) iPrev = iNext sys.stderr.write("\r" + str(count) + "\n")
43fddfb837db665e4931252b621871fba8869df6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14305/43fddfb837db665e4931252b621871fba8869df6/compiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 5080, 1016, 13332, 2552, 25899, 1782, 2552, 279, 297, 812, 16, 279, 297, 812, 1782, 225, 277, 9958, 273, 374, 277, 2134, 273, 374, 225, 1446, 2920, 273, 315, 4503, 76, 48, 6, 144...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5080, 1016, 13332, 2552, 25899, 1782, 2552, 279, 297, 812, 16, 279, 297, 812, 1782, 225, 277, 9958, 273, 374, 277, 2134, 273, 374, 225, 1446, 2920, 273, 315, 4503, 76, 48, 6, 144...
ui.write(gettext(doc))
else: doc = gettext(doc) ui.write(doc)
def underlined(s, text=""): ui.write("%s\n%s\n%s\n" % (s, "-"*len(s), text))
8a9ac88a5dc985f4569d8d2031483d04b517771e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8a9ac88a5dc985f4569d8d2031483d04b517771e/gendoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3613, 22316, 12, 87, 16, 977, 1546, 6, 4672, 5915, 18, 2626, 27188, 87, 64, 82, 9, 87, 64, 82, 9, 87, 64, 82, 6, 738, 261, 87, 16, 7514, 14, 1897, 12, 87, 3631, 977, 3719, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3613, 22316, 12, 87, 16, 977, 1546, 6, 4672, 5915, 18, 2626, 27188, 87, 64, 82, 9, 87, 64, 82, 9, 87, 64, 82, 6, 738, 261, 87, 16, 7514, 14, 1897, 12, 87, 3631, 977, 3719, 2, -...
json = wget("%s/%s?limit=%d" % (url, offset, chunksize))
json = self.wget("%s/%s?limit=%d" % (url, offset, chunksize))
def read_log(url, callback, chunksize=100): offset = read_offset(self.offset_file) or default_offset()
8e8c09448d02e28b7e360ded35c899a8f846309a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/8e8c09448d02e28b7e360ded35c899a8f846309a/manage-lists.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 1330, 12, 718, 16, 1348, 16, 23256, 33, 6625, 4672, 1384, 273, 855, 67, 3348, 12, 2890, 18, 3348, 67, 768, 13, 578, 805, 67, 3348, 1435, 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, 855, 67, 1330, 12, 718, 16, 1348, 16, 23256, 33, 6625, 4672, 1384, 273, 855, 67, 3348, 12, 2890, 18, 3348, 67, 768, 13, 578, 805, 67, 3348, 1435, 2, -100, -100, -100, -100, -100, -10...
def __init__(self, path=None, debug=0, excludes = [], replace_paths = []):
def __init__(self, path=None, debug=0, excludes=[], replace_paths=[]):
def __init__(self, path=None, debug=0, excludes = [], replace_paths = []): if path is None: path = sys.path self.path = path self.modules = {} self.badmodules = {} self.debug = debug self.indent = 0 self.excludes = excludes self.replace_paths = replace_paths self.processed_paths = [] # Used in debugging only
dbfb2a7b450d883612d89aa4a2fb95a93f90cf3d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/dbfb2a7b450d883612d89aa4a2fb95a93f90cf3d/modulefinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 33, 7036, 16, 1198, 33, 20, 16, 13644, 22850, 6487, 1453, 67, 4481, 33, 8526, 4672, 309, 589, 353, 599, 30, 589, 273, 2589, 18, 803, 365, 18, 803,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 33, 7036, 16, 1198, 33, 20, 16, 13644, 22850, 6487, 1453, 67, 4481, 33, 8526, 4672, 309, 589, 353, 599, 30, 589, 273, 2589, 18, 803, 365, 18, 803,...
out(']</b></center>\n')
out(']</b></center><br />\n')
def write_index_pointers(self, out, indices): """ A helper for the index page generation functions, which generates a header that can be used to navigate between the different indices. """ if len(indices) > 1: out('<center><b>[\n') out(' <a href="identifier-index.html">Identifier Index</a>\n') if indices['term']: out('| <a href="term-index.html">Term Definition Index</a>\n') if indices['bug']: out('| <a href="bug-index.html">Bug List</a>\n') if indices['todo']: out('| <a href="todo-index.html">To Do List</a>\n') out(']</b></center>\n')
5c410b5b6e25df3bdbc6da266f7773518165cb02 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5c410b5b6e25df3bdbc6da266f7773518165cb02/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 67, 10437, 87, 12, 2890, 16, 596, 16, 4295, 4672, 3536, 432, 4222, 364, 326, 770, 1363, 9377, 4186, 16, 1492, 6026, 279, 1446, 716, 848, 506, 1399, 358, 28479, 3086, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1615, 67, 10437, 87, 12, 2890, 16, 596, 16, 4295, 4672, 3536, 432, 4222, 364, 326, 770, 1363, 9377, 4186, 16, 1492, 6026, 279, 1446, 716, 848, 506, 1399, 358, 28479, 3086, 32...
if prob < cutoff:
if prob < ham_cutoff:
def filter(self, msg, header=DISPHEADER, cutoff=SPAM_THRESHOLD): """Score (judge) a message and add a disposition header.
eedbf69cc368f103644dc88488b8a335b25ddbc9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/eedbf69cc368f103644dc88488b8a335b25ddbc9/hammie.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1034, 12, 2890, 16, 1234, 16, 1446, 33, 2565, 3118, 7557, 16, 13383, 33, 3118, 2192, 67, 23840, 4672, 3536, 7295, 261, 78, 27110, 13, 279, 883, 471, 527, 279, 23913, 1446, 18, 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, 1034, 12, 2890, 16, 1234, 16, 1446, 33, 2565, 3118, 7557, 16, 13383, 33, 3118, 2192, 67, 23840, 4672, 3536, 7295, 261, 78, 27110, 13, 279, 883, 471, 527, 279, 23913, 1446, 18, 2, -100,...
self.get_file(file, headers) def get_contents_to_filename(self, filename, headers=None):
self.get_file(fp, headers, cb) def get_contents_to_filename(self, filename, headers=None, cb=None): """ Retrieve an object from S3 using the name of the Key object as the key in S3. Store contents of the object to a file named by 'filename'. See get_contents_to_file method for details about the parameters. """
def get_contents_to_file(self, file, headers=None): if self.bucket != None: self.get_file(file, headers)
8815b75e1e9a04196177bd43eae30028f576ab63 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1098/8815b75e1e9a04196177bd43eae30028f576ab63/key.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3980, 67, 869, 67, 768, 12, 2890, 16, 585, 16, 1607, 33, 7036, 4672, 309, 365, 18, 7242, 480, 599, 30, 365, 18, 588, 67, 768, 12, 768, 16, 1607, 13, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 3980, 67, 869, 67, 768, 12, 2890, 16, 585, 16, 1607, 33, 7036, 4672, 309, 365, 18, 7242, 480, 599, 30, 365, 18, 588, 67, 768, 12, 768, 16, 1607, 13, 2, -100, -100, -100, ...
_nonuniform_test([0,3,5], [0,1,3], [[3,6],[2,4]], [0,1,2,3,4,5], [0,1,2,3], [[1]*3]*5) _nonuniform_test([0,3,5,7], [0,1,3], [[3,4],[6,2],[4,4]], [0,1,2,3,4,5,6,7], [0,1,2,3], [[1]*3]*7)
x,y,I = [0,3,5,7], [0,1,3], [[3,6],[2,4],[2,4]] xo,yo,Io = range(8), range(4), [[1]*3]*7 x,y,I,xo,yo,Io = [numpy.array(A,'d') for A in [x,y,I,xo,yo,Io]] _check2d(x,y,I,xo,yo,Io) _check2d(x[::-1],y,I[::-1,:],xo,yo,Io) _check2d(x,y[::-1],I[:,::-1],xo,yo,Io) _check2d(x,y,I,[7,3,0],yo,[[4]*3,[3]*3]) _check2d(x,y,I,xo,[3,2,0],[[1,2]]*7) _check2d(y,x,I.T,yo,xo,Io.T)
def _test2d(): _nonuniform_test([0,3,5], [0,1,3], [[3,6],[2,4]], [0,1,2,3,4,5], [0,1,2,3], [[1]*3]*5) _nonuniform_test([0,3,5,7], [0,1,3], [[3,4],[6,2],[4,4]], [0,1,2,3,4,5,6,7], [0,1,2,3], [[1]*3]*7) # Test smallest possible result _nonuniform_test([-1,2,4], [0,1,3], [[3,2],[6,4]], [1,2], [1,2], [1]) # subset/superset _nonuniform_test([0,1,2,3], [0,1,2,3], [[1]*3]*3, [0.5,1.5,2.5], [0.5,1.5,2.5], [[1]*2]*2) _nonuniform_test([0,1,2,3,4], [0,1,2,3,4], [[1]*4]*4, [-2,-1,2,5,6], [-2,-1,2,5,6], [[0,0,0,0],[0,4,4,0],[0,4,4,0],[0,0,0,0]]) # non-square test _uniform_test([1,2.5,4,0.5],[3,1,2.5,1,3.5]) _uniform_test([3,2],[1,2])
ecc5cc9311b8dae4343a8a0700e16623fb2319a7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13135/ecc5cc9311b8dae4343a8a0700e16623fb2319a7/rebin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 22, 72, 13332, 619, 16, 93, 16, 45, 273, 306, 20, 16, 23, 16, 25, 16, 27, 6487, 306, 20, 16, 21, 16, 23, 6487, 12167, 23, 16, 26, 6487, 63, 22, 16, 24, 6487, 63, 22,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3813, 22, 72, 13332, 619, 16, 93, 16, 45, 273, 306, 20, 16, 23, 16, 25, 16, 27, 6487, 306, 20, 16, 21, 16, 23, 6487, 12167, 23, 16, 26, 6487, 63, 22, 16, 24, 6487, 63, 22,...
self.cur.setinputsizes(eval("%s=cx_Oracle.BLOB") % k)
self.cur.setinputsizes(eval("%s=cx_Oracle.BLOB" % k))
def _search_zipfile(self, items): logging.debug("In OracleForward::_search_zipfile()") logging.debug(":: items: %s" % str(items)) for k, v in items.iteritems(): if v.find(".zip") != -1: if os.path.exists(v) and os.path.isfile(v): self.cur.setinputsizes(eval("%s=cx_Oracle.BLOB") % k) items[k] = self._zipfile_to_bin(v)
fe70124b305cd7c69c5f90c59393ae0a40f408fc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4910/fe70124b305cd7c69c5f90c59393ae0a40f408fc/e_oracle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 67, 4450, 768, 12, 2890, 16, 1516, 4672, 2907, 18, 4148, 2932, 382, 28544, 8514, 2866, 67, 3072, 67, 4450, 768, 1435, 7923, 2907, 18, 4148, 2932, 2866, 1516, 30, 738, 87, 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, 389, 3072, 67, 4450, 768, 12, 2890, 16, 1516, 4672, 2907, 18, 4148, 2932, 382, 28544, 8514, 2866, 67, 3072, 67, 4450, 768, 1435, 7923, 2907, 18, 4148, 2932, 2866, 1516, 30, 738, 87, 6,...
'Theta'
'Theta',
def _sys_init_(self, system): return self._name
631b754625caff2d26d2c6f0c51c000b669102c3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/631b754625caff2d26d2c6f0c51c000b669102c3/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9499, 67, 2738, 67, 12, 2890, 16, 2619, 4672, 327, 365, 6315, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
about.set_comments('''FlyBack is a backup and recovery tool loosley modeled after Apple's new "Time Machine".''')
about.set_comments('''FlyBack is a backup and recovery tool loosely modeled after Apple's new "Time Machine".''')
def show_about_dialog(self, o): about = gtk.AboutDialog() about.set_name('FlyBack') about.set_version('v0.1') about.set_copyright('Copyright (c) 2007 Derek Anderson') about.set_comments('''FlyBack is a backup and recovery tool loosley modeled after Apple's new "Time Machine".''') about.set_license(GPL) about.set_website('http://code.google.com/p/flyback/') about.set_authors(['Derek Anderson','http://kered.org']) about.connect('response', lambda x,y: about.destroy()) about.show()
86c0cc7aefe2168fdb20f5518c4f5b0075f096ea /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/317/86c0cc7aefe2168fdb20f5518c4f5b0075f096ea/flyback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 21071, 67, 12730, 12, 2890, 16, 320, 4672, 2973, 273, 22718, 18, 24813, 6353, 1435, 2973, 18, 542, 67, 529, 2668, 42, 715, 2711, 6134, 2973, 18, 542, 67, 1589, 2668, 90, 20, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 21071, 67, 12730, 12, 2890, 16, 320, 4672, 2973, 273, 22718, 18, 24813, 6353, 1435, 2973, 18, 542, 67, 529, 2668, 42, 715, 2711, 6134, 2973, 18, 542, 67, 1589, 2668, 90, 20, ...
URLBookmarks.appendURL(mode.buffer.url)
FileCabinet.appendURL(mode.buffer.url)
def action(self, index=-1, multiplier=1): assert self.dprint("id=%x name=%s index=%s" % (id(self),self.name,str(index))) # If it's called from a popup, use the tab on which it was clicked, not # the current mode try: mode = self.frame.tabs.getContextMenuWrapper().editwin except IndexError: mode = self.mode URLBookmarks.appendURL(mode.buffer.url)
d31fbfc834159b6ce3ad2ea806caedd981ece285 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/d31fbfc834159b6ce3ad2ea806caedd981ece285/openrecent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 1815, 365, 18, 72, 1188, 2932, 350, 5095, 92, 508, 5095, 87, 770, 5095, 87, 6, 738, 261, 350, 12, 2890, 3631, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 770, 29711, 21, 16, 15027, 33, 21, 4672, 1815, 365, 18, 72, 1188, 2932, 350, 5095, 92, 508, 5095, 87, 770, 5095, 87, 6, 738, 261, 350, 12, 2890, 3631, 2890, 18, ...
file_ = file_.getObject()
if file_.portal_type == 'PSCFileLink': file_ = file_.getObject() file_ = DistantFile(file_.getExternalURL()) else: file_ = file_.getObject()
def _discovering_dist_ids(project): # for each file in the project we # extract the distutils name project_path = '/'.join(project.getPhysicalPath()) files = cat(**{'portal_type': 'PSCFile', 'path': project_path}) ids = [] for file_ in files: file_ = file_.getObject() id_ = extract_distutils_id(file_) if id_ is not None and id_ not in ids: ids.append(id_) return ids
ad2acae4aa18e118b4b5bea884fdd2d85dd7d095 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12516/ad2acae4aa18e118b4b5bea884fdd2d85dd7d095/setuphandlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2251, 3165, 310, 67, 4413, 67, 2232, 12, 4406, 4672, 468, 364, 1517, 585, 316, 326, 1984, 732, 468, 2608, 326, 2411, 5471, 508, 1984, 67, 803, 273, 2023, 18, 5701, 12, 4406, 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, 389, 2251, 3165, 310, 67, 4413, 67, 2232, 12, 4406, 4672, 468, 364, 1517, 585, 316, 326, 1984, 732, 468, 2608, 326, 2411, 5471, 508, 1984, 67, 803, 273, 2023, 18, 5701, 12, 4406, 18, ...
self._resetID()
def _saveDB(self): """Overloaded - we dont have nextval() in mysql""" # We're a "fresh" copy now self._updated = time.time() if not self._validID(): operation = 'INSERT' self._resetID() # Ie. get a new one else: operation = 'UPDATE' (sql, fields) = self._prepareSQL(operation) values = [] for field in fields: value = getattr(self, field) if isinstance(value, Forgetter): # It's another object, we store only the ID if value._new: # It's a new object too, it must be saved! value.save() try: (value,) = value._getID() except: raise "Can't reference multiple-primary-key: %s" % value values.append(value) cursor = self.cursor() cursor.execute(sql, values) # cursor.commit()
9c470f56174d8a16e2dbc1109fe08bb0bf6a4131 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1051/9c470f56174d8a16e2dbc1109fe08bb0bf6a4131/forgetSQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 2290, 12, 2890, 4672, 3536, 4851, 4230, 300, 732, 14046, 1240, 1024, 1125, 1435, 316, 7219, 8395, 468, 1660, 4565, 279, 315, 74, 1955, 6, 1610, 2037, 365, 6315, 7007, 273, 813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5688, 2290, 12, 2890, 4672, 3536, 4851, 4230, 300, 732, 14046, 1240, 1024, 1125, 1435, 316, 7219, 8395, 468, 1660, 4565, 279, 315, 74, 1955, 6, 1610, 2037, 365, 6315, 7007, 273, 813...
hOutVecAX = data.outputValue( self.aOutVecAX ) hOutVecAY = data.outputValue( self.aOutVecAY ) hOutVecAZ = data.outputValue( self.aOutVecAZ ) hOutVecBX = data.outputValue( self.aOutVecBX ) hOutVecBY = data.outputValue( self.aOutVecBY ) hOutVecBZ = data.outputValue( self.aOutVecBZ ) hOutVecAX.setDouble( vVecA.x ) hOutVecAY.setDouble( vVecA.y ) hOutVecAZ.setDouble( vVecA.z ) hOutVecBX.setDouble( vVecB.x ) hOutVecBY.setDouble( vVecB.y ) hOutVecBZ.setDouble( vVecB.z ) data.setClean(self.aOutVecA) data.setClean(self.aOutVecAX) data.setClean(self.aOutVecAY) data.setClean(self.aOutVecAZ) data.setClean(self.aOutVecB) data.setClean(self.aOutVecBX) data.setClean(self.aOutVecBY) data.setClean(self.aOutVecBZ)
def compute( self, plug, data ): if plug == self.aOutRotate or plug == self.aOutRotateX or plug == self.aOutRotateY or plug == self.aOutRotateZ or ( plug == self.aOutVecA or plug == self.aOutVecAX or plug == self.aOutVecAY or plug == self.aOutVecAZ or plug == self.aOutVecB or plug == self.aOutVecBX or plug == self.aOutVecBY or plug == self.aOutVecBZ): #get handles to the attributes hInWorldMatrixA = data.inputValue(self.aInWorldMatrixA) matWorldA = hInWorldMatrixA.asMatrix() matWorldAinv = matWorldA.inverse() xformA = OpenMaya.MTransformationMatrix(matWorldA)
f1c759ba3053b307b5bdba374a5e546ef55ef587 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1810/f1c759ba3053b307b5bdba374a5e546ef55ef587/twistNode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 12, 365, 16, 15852, 16, 501, 262, 30, 309, 15852, 422, 365, 18, 69, 1182, 16357, 578, 15852, 422, 365, 18, 69, 1182, 16357, 60, 578, 15852, 422, 365, 18, 69, 1182, 16357, 61, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 12, 365, 16, 15852, 16, 501, 262, 30, 309, 15852, 422, 365, 18, 69, 1182, 16357, 578, 15852, 422, 365, 18, 69, 1182, 16357, 60, 578, 15852, 422, 365, 18, 69, 1182, 16357, 61, 5...
print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************"
if self.notify.getDebug(): print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************"
def printInterests(self): if not WantInterestPrintout: return 1 """ Part of the new otp-server code. """ print "*********************** Interest Sets **************" for i in DoInterestManager._interests.keys(): print "Interest ID:%s, Description=%s Scope=%s Event=%s Mode=%s"%( i, DoInterestManager._interests[i][0], DoInterestManager._interests[i][1], DoInterestManager._interests[i][2], DoInterestManager._interests[i][3]) print "****************************************************" return 1 # for assert()
6e61ed0fb1287e63d516c6d0dcca3fe87008a147 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/6e61ed0fb1287e63d516c6d0dcca3fe87008a147/DoInterestManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2465, 25563, 12, 2890, 4672, 309, 486, 678, 970, 29281, 5108, 659, 30, 327, 404, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 18, 3536, 309, 365, 18, 12336, 18, 588, 2829, 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, 1172, 2465, 25563, 12, 2890, 4672, 309, 486, 678, 970, 29281, 5108, 659, 30, 327, 404, 3536, 6393, 434, 326, 394, 28625, 17, 3567, 981, 18, 3536, 309, 365, 18, 12336, 18, 588, 2829, 13...
apply(self.tk.call, (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = _dummyButton(self, name) return self.subwidget_list[name]
apply(self.tk.call, (self._w, 'add', name) + self._options(cnf, kw)) self.subwidget_list[name] = _dummyButton(self, name) return self.subwidget_list[name]
def add(self, name, cnf={}, **kw):
22710823fb554a796dc96c44885d7a9389426824 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/22710823fb554a796dc96c44885d7a9389426824/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 508, 16, 23118, 28793, 2826, 9987, 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, ...
[ 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, 527, 12, 2890, 16, 508, 16, 23118, 28793, 2826, 9987, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...