rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def test3Pickles(self): v1 = ds.DiscreteValueVect(ds.DiscreteValueType.ONEBITVALUE, 30) for i in range(15): v1[2*i] = 1 v2 = cPickle.loads(cPickle.dumps(v1)) self.failUnless(ds.ComputeL1Norm(v1, v2) == 0)
self.failUnless(ds.ComputeL1Norm(v1, v2) == 44)
def test3Pickles(self): v1 = ds.DiscreteValueVect(ds.DiscreteValueType.ONEBITVALUE, 30) for i in range(15): v1[2*i] = 1 v2 = cPickle.loads(cPickle.dumps(v1)) self.failUnless(ds.ComputeL1Norm(v1, v2) == 0)
e66f08dc33e8896796b91f2ff93260774da87ff2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9195/e66f08dc33e8896796b91f2ff93260774da87ff2/testDiscreteValueVect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 23, 17968, 1040, 12, 2890, 4672, 331, 21, 273, 3780, 18, 1669, 6883, 620, 58, 386, 12, 2377, 18, 1669, 6883, 17930, 18, 5998, 15650, 4051, 16, 5196, 13, 364, 277, 316, 1048, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 23, 17968, 1040, 12, 2890, 4672, 331, 21, 273, 3780, 18, 1669, 6883, 620, 58, 386, 12, 2377, 18, 1669, 6883, 17930, 18, 5998, 15650, 4051, 16, 5196, 13, 364, 277, 316, 1048, 12, ...
RESPONSE.redirect( self.aq_inner.aq_parent.absolute_url() + '/view' )
if RESPONSE is not None: RESPONSE.redirect( self.aq_inner.aq_parent.absolute_url() + '/view' )
def createReply(self, title, text, REQUEST, RESPONSE): """ Create a reply in the proper place """ container = self._container
6614129cb30e035bc4a7b50022d017f53a3ee62f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/6614129cb30e035bc4a7b50022d017f53a3ee62f/DiscussionItem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 7817, 12, 2890, 16, 2077, 16, 977, 16, 12492, 16, 20645, 4672, 3536, 1788, 279, 4332, 316, 326, 5338, 3166, 3536, 1478, 273, 365, 6315, 3782, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 7817, 12, 2890, 16, 2077, 16, 977, 16, 12492, 16, 20645, 4672, 3536, 1788, 279, 4332, 316, 326, 5338, 3166, 3536, 1478, 273, 365, 6315, 3782, 2, -100, -100, -100, -100, -100, -100, ...
failed = [x['email_address'] for x in ret['errors']]
failed = [x['row']['EMAIL'] for x in ret['errors']]
def send_email(self): """Send out the email and record the recipients.""" recipients = self.get_recipients() if not recipients: log.info('Nothing to do: List of recipients is empty.') return
2e7f2cbb999933d29541ed36f63a47a1f45995bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/193/2e7f2cbb999933d29541ed36f63a47a1f45995bb/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 2890, 4672, 3536, 3826, 596, 326, 2699, 471, 1409, 326, 12045, 12123, 12045, 273, 365, 18, 588, 67, 27925, 1435, 309, 486, 12045, 30, 613, 18, 1376, 2668, 23814, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 2890, 4672, 3536, 3826, 596, 326, 2699, 471, 1409, 326, 12045, 12123, 12045, 273, 365, 18, 588, 67, 27925, 1435, 309, 486, 12045, 30, 613, 18, 1376, 2668, 23814, 358,...
line = RewriteLine(line.strip(), sysroot)
line = RewriteLine(line.strip(), opts)
def main(argv): try: sysroot = argv[1] except IndexError: sys.stderr.write('usage: %s /path/to/sysroot\n' % argv[0]) return 1 for line in sys.stdin.readlines(): line = RewriteLine(line.strip(), sysroot) print line return 0
090e84f6c261bf1557fa3074a65c518eb7fc03c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/090e84f6c261bf1557fa3074a65c518eb7fc03c0/rewrite_dirs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 775, 30, 2589, 3085, 273, 5261, 63, 21, 65, 1335, 10195, 30, 2589, 18, 11241, 18, 2626, 2668, 9167, 30, 738, 87, 342, 803, 19, 869, 19, 9499, 3085, 64, 82, 11,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 4672, 775, 30, 2589, 3085, 273, 5261, 63, 21, 65, 1335, 10195, 30, 2589, 18, 11241, 18, 2626, 2668, 9167, 30, 738, 87, 342, 803, 19, 869, 19, 9499, 3085, 64, 82, 11,...
def SearchFontPath(font_file):
__foundFonts = [] def FindCustomFonts(): """Fill the __foundFonts list with those filenames, whose fonts can be found in the reportlab ttf font path. This process needs only be done once per loading of this module, it is cached. But, if the system admin adds some font in the meanwhile, the server must be restarted eventually. """ dirpath = [] global __foundFonts
def SearchFontPath(font_file): for dirname in rl_config.TTFSearchPath: for root, dirs, files in os.walk(os.path.abspath(dirname)): for file_name in files: filename = os.path.join(root, file_name) extension = os.path.splitext(filename)[1] if extension.lower() in ['.ttf']: if file_name==font_file: return True return False
0111fd15fb18e37d931edf925c3d132ed7255a7d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/0111fd15fb18e37d931edf925c3d132ed7255a7d/customfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1001, 7015, 5711, 87, 273, 5378, 225, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 268...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1001, 7015, 5711, 87, 273, 5378, 225, 1652, 4163, 3802, 5711, 87, 13332, 3536, 8026, 326, 1001, 7015, 5711, 87, 666, 598, 5348, 9066, 16, 8272, 16450, 848, 506, 1392, 316, 326, 2605, 7411, 268...
self.setCaption('Materials Report')
self.setWindowTitle('Materials Report')
def materialsReport(self, itemlist, showslot = 0): self.MMLabel.show() self.MatMultiplier.show() self.setCaption('Materials Report') self.materials = { 'Gems' : { }, 'Liquids' : {}, 'Dusts': {} } self.gemnames = { } self.totalcost = 0 if showslot == 0: lastslot = 5 else: lastslot = showslot for loc, item in itemlist.items(): activestate = item.getAttr('ActiveState') equipped = item.getAttr('Equipped') if activestate != 'player': continue for slot in range(max(showslot - 1,0), lastslot): if item.getSlotAttr(activestate, slot, 'Done') == '1' \ and showslot == 0 \ and self.parent.showDoneInMatsList: continue gemtype = item.getSlotAttr('player', slot, 'Type') effect = item.getSlotAttr('player', slot, 'Effect') amount = item.getSlotAttr('player', slot, 'Amount') for mattype, matl in SC.getGemMaterials(item, slot, self.parent.realm).items(): for mat, val in matl.items(): if self.materials[mattype].has_key(mat): self.materials[mattype][mat] += val else: self.materials[mattype][mat] = val if gemtype == 'Unused': continue gemname = SC.getGemName(item, slot) if self.gemnames.has_key(gemname): self.gemnames[gemname] += 1 else: self.gemnames[gemname] = 1
95ac679f3a48bd02e12600582c0bf17bbb352842 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6671/95ac679f3a48bd02e12600582c0bf17bbb352842/ReportWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31824, 4820, 12, 2890, 16, 761, 1098, 16, 2405, 14194, 273, 374, 4672, 365, 18, 49, 1495, 873, 18, 4500, 1435, 365, 18, 15947, 23365, 18, 4500, 1435, 365, 18, 542, 3829, 4247, 2668, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31824, 4820, 12, 2890, 16, 761, 1098, 16, 2405, 14194, 273, 374, 4672, 365, 18, 49, 1495, 873, 18, 4500, 1435, 365, 18, 15947, 23365, 18, 4500, 1435, 365, 18, 542, 3829, 4247, 2668, 11...
fopen = open(proxyLocation,'r')
fopen = open( proxyLocation, 'r' )
def __getProxy(self): # get proxy proxyLocation = getProxyLocation()
364464017f61dc703439c7a2235a47d4ba35aafe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/364464017f61dc703439c7a2235a47d4ba35aafe/DiracSiteAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 3886, 12, 2890, 4672, 468, 336, 2889, 2889, 2735, 273, 18992, 2735, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 3886, 12, 2890, 4672, 468, 336, 2889, 2889, 2735, 273, 18992, 2735, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
dq <address> [process] - show memory contents as qwords dq <address-address> [process] - show memory contents as qwords
[~thread] dq <register> - show memory contents as qwords [~thread] dq <register-register> - show memory contents as qwords [~thread] dq <register> <size> - show memory contents as qwords [~process] dq <address> - show memory contents as qwords [~process] dq <address-address> - show memory contents as qwords [~process] dq <address> <size> - show memory contents as qwords
def do_dq(self, arg): """ dq <address> [process] - show memory contents as qwords dq <address-address> [process] - show memory contents as qwords """ self.print_memory_display(arg, winappdbg.HexDump.hexblock_qword)
95edb553305e95a1ded0ce46aa595556f55c8dbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7261/95edb553305e95a1ded0ce46aa595556f55c8dbe/pdebug.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 72, 85, 12, 2890, 16, 1501, 4672, 3536, 306, 98, 5930, 65, 20803, 411, 4861, 34, 300, 2405, 3778, 2939, 487, 1043, 3753, 306, 98, 5930, 65, 20803, 411, 4861, 17, 4861, 34, 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, 741, 67, 72, 85, 12, 2890, 16, 1501, 4672, 3536, 306, 98, 5930, 65, 20803, 411, 4861, 34, 300, 2405, 3778, 2939, 487, 1043, 3753, 306, 98, 5930, 65, 20803, 411, 4861, 17, 4861, 34, 3...
if table_elem.validcolumns is None:
if table_elem.validcolumns is not None: column_type = table_elem.validcolumns[column_name] else:
def DBTable_get_xml(): """ Construct an XML document tree wrapping around the contents of the currently connected database. On success the return value is a ligolw.LIGO_LW element containing the tables as children. """ ligo_lw = ligolw.LIGO_LW() for table_name in DBTable_table_names(): # build the table document tree. copied from # lsctables.New() try: cls = TableByName[table_name] except: cls = DBTable table_elem = cls(AttributesImpl({u"Name": table_name + ":table"})) colnamefmt = table_name + ":%s" for column_name, column_type in DBTable_column_info(table_elem.dbtablename): if table_elem.validcolumns is None: column_type = types.FromSQLiteType[column_type] else: column_type = table_elem.validcolumns[column_name] column_name = colnamefmt % column_name table_elem.appendChild(table.Column(AttributesImpl({u"Name": column_name, u"Type": column_type}))) table_elem._end_of_columns() table_elem.appendChild(table.TableStream(AttributesImpl({u"Name": table_name + ":table"}))) ligo_lw.appendChild(table_elem) return ligo_lw
15e75a594d19df1c85ee3f7aac14312baeb8f068 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/15e75a594d19df1c85ee3f7aac14312baeb8f068/dbtables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2383, 1388, 67, 588, 67, 2902, 13332, 3536, 14291, 392, 3167, 1668, 2151, 14702, 6740, 326, 2939, 434, 326, 4551, 5840, 2063, 18, 225, 2755, 2216, 326, 327, 460, 353, 279, 16917, 355, 91...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2383, 1388, 67, 588, 67, 2902, 13332, 3536, 14291, 392, 3167, 1668, 2151, 14702, 6740, 326, 2939, 434, 326, 4551, 5840, 2063, 18, 225, 2755, 2216, 326, 327, 460, 353, 279, 16917, 355, 91...
return http.Response(stream = '')
return HTMLResponse(stream = '')
def render(self, ctx): id = self.id(ctx) typ = ctx.args['type'][0] W = self.worksheet W.get_cell_with_id(id).set_cell_output_type(typ) return http.Response(stream = '')
5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/5da3b1cd72cd4a94421b8bc914d7957cdbe6b56d/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 612, 273, 365, 18, 350, 12, 5900, 13, 3815, 273, 1103, 18, 1968, 3292, 723, 3546, 63, 20, 65, 678, 273, 365, 18, 1252, 8118, 678, 18, 588, 67, 3855, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1103, 4672, 612, 273, 365, 18, 350, 12, 5900, 13, 3815, 273, 1103, 18, 1968, 3292, 723, 3546, 63, 20, 65, 678, 273, 365, 18, 1252, 8118, 678, 18, 588, 67, 3855, ...
if not type \ or encoding is not None \
if encoding is not None \
def match(path): for pat, type, property, default_title in self.patterns: if web.re_compile('^' + pat).match(path): return type, property, default_title return None, None, None
be4936282b329b15e2efde13b036f596a40cf146 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/be4936282b329b15e2efde13b036f596a40cf146/processors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 12, 803, 4672, 364, 9670, 16, 618, 16, 1272, 16, 805, 67, 2649, 316, 365, 18, 13317, 30, 309, 3311, 18, 266, 67, 11100, 2668, 66, 11, 397, 9670, 2934, 1916, 12, 803, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 12, 803, 4672, 364, 9670, 16, 618, 16, 1272, 16, 805, 67, 2649, 316, 365, 18, 13317, 30, 309, 3311, 18, 266, 67, 11100, 2668, 66, 11, 397, 9670, 2934, 1916, 12, 803, 4672, 327, ...
convertor = option_spec[name]
convertor = options_spec[name]
def assemble_option_dict(option_list, option_spec): """ Return a mapping of option names to values. :Parameters: - `option_list`: A list of (name, value) pairs (the output of `extract_options()`). - `option_spec`: Dictionary mapping known option names to a conversion function such as `int` or `float`. :Exceptions: - `KeyError` for unknown option names. - `DuplicateOptionError` for duplicate options. - `ValueError` for invalid option values (raised by conversion function). """ options = {} for name, value in option_list: convertor = option_spec[name] # raises KeyError if unknown if options.has_key(name): raise DuplicateOptionError('duplicate option "%s"' % name) try: options[name] = convertor(value) except (ValueError, TypeError), detail: raise detail.__class__('(option: "%s"; value: %r)\n%s' % (name, value, detail)) return options
f7999939795674d6bb9916ebbf4bd199ddce697a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/f7999939795674d6bb9916ebbf4bd199ddce697a/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19540, 67, 3482, 67, 1576, 12, 3482, 67, 1098, 16, 1456, 67, 2793, 4672, 3536, 2000, 279, 2874, 434, 1456, 1257, 358, 924, 18, 225, 294, 2402, 30, 300, 1375, 3482, 67, 1098, 68, 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, 19540, 67, 3482, 67, 1576, 12, 3482, 67, 1098, 16, 1456, 67, 2793, 4672, 3536, 2000, 279, 2874, 434, 1456, 1257, 358, 924, 18, 225, 294, 2402, 30, 300, 1375, 3482, 67, 1098, 68, 30, ...
string.value = 'hello'
string.value = latin('hello')
def test_sharedctypes(self, lock=False): x = Value('i', 7, lock=lock) y = Value(c_double, 1.0/3.0, lock=lock) foo = Value(_Foo, 3, 2, lock=lock) arr = self.Array('d', list(range(10)), lock=lock) string = self.Array('c', 20, lock=lock) string.value = 'hello'
afa88b5dac1b068ccc33b65cd4da400a290b137e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/afa88b5dac1b068ccc33b65cd4da400a290b137e/test_multiprocessing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 619, 273, 1445, 2668, 77, 2187, 2371, 16, 2176, 33, 739, 13, 677, 273, 1445, 12, 71, 67, 9056, 16, 404, 18, 20, 19, 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, 1842, 67, 11574, 299, 989, 12, 2890, 16, 2176, 33, 8381, 4672, 619, 273, 1445, 2668, 77, 2187, 2371, 16, 2176, 33, 739, 13, 677, 273, 1445, 12, 71, 67, 9056, 16, 404, 18, 20, 19, 2...
('test-radio-action2', Gtk.RadioAction)) for action, cmp in zip(action_group.list_actions(), expected_results):
('test-radio-action2', Gtk.RadioAction)] for action in action_group.list_actions():
def test_radio_action_callback_data(action, current, user_data): self.assertEquals(user_data, callback_data);
ef74273c2043944708515e59a654ebe4944b46ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8659/ef74273c2043944708515e59a654ebe4944b46ff/test_overrides.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17006, 67, 1128, 67, 3394, 67, 892, 12, 1128, 16, 783, 16, 729, 67, 892, 4672, 365, 18, 11231, 8867, 12, 1355, 67, 892, 16, 1348, 67, 892, 1769, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17006, 67, 1128, 67, 3394, 67, 892, 12, 1128, 16, 783, 16, 729, 67, 892, 4672, 365, 18, 11231, 8867, 12, 1355, 67, 892, 16, 1348, 67, 892, 1769, 2, -100, -100, -100, -100, ...
if not self.rpmdb.contains(po=pkg): available.append(pkg)
if self.conf.showdupesfromrepos: if not self.rpmdb.contains(po=pkg): available.append(pkg) else: ipkgs = self.rpmdb.searchNevra(pkg.name, arch=pkg.arch) if not ipkgs or pkg > sorted(ipkgs, reverse=True)[0]: available.append(pkg)
def doPackageLists(self, pkgnarrow='all', patterns=None): """generates lists of packages, un-reduced, based on pkgnarrow option""" ygh = misc.GenericHolder() installed = [] available = [] updates = [] obsoletes = [] obsoletesTuples = [] recent = [] extras = []
802247e14ba676085951c90cbdd756180ea05c24 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/802247e14ba676085951c90cbdd756180ea05c24/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2261, 7432, 12, 2890, 16, 2365, 1600, 7815, 2218, 454, 2187, 6884, 33, 7036, 4672, 3536, 3441, 815, 6035, 434, 5907, 16, 640, 17, 1118, 26372, 16, 2511, 603, 2365, 1600, 7815, 1456,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2261, 7432, 12, 2890, 16, 2365, 1600, 7815, 2218, 454, 2187, 6884, 33, 7036, 4672, 3536, 3441, 815, 6035, 434, 5907, 16, 640, 17, 1118, 26372, 16, 2511, 603, 2365, 1600, 7815, 1456,...
print ( 'Answer has to be one of [%s]' % self.astr )
print ( 'Answer has to be one of [%s]' % astr )
def ask_quest ( self ): """ Ask the question, return the char the user chose. """ vals = list ( self._allowed ) for i in range ( 0, len(vals) ): if vals[i] == self._default: vals[i] = string.upper(vals[i]) astr = string.join ( vals, '/' )
5f7e9d2a1c3b3779e964dc958e46f0017ba51938 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/5f7e9d2a1c3b3779e964dc958e46f0017ba51938/prompt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 456, 261, 365, 262, 30, 3536, 25747, 326, 5073, 16, 327, 326, 1149, 326, 729, 462, 2584, 18, 3536, 5773, 273, 666, 261, 365, 6315, 8151, 262, 364, 277, 316, 1048, 261, 374, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6827, 67, 456, 261, 365, 262, 30, 3536, 25747, 326, 5073, 16, 327, 326, 1149, 326, 729, 462, 2584, 18, 3536, 5773, 273, 666, 261, 365, 6315, 8151, 262, 364, 277, 316, 1048, 261, 374, ...
0x0410: "it_IT", 0x0411: "ja_JA", 0x0414: "no_NO", 0x0816: "pt_PT", 0x0c0a: "es_ES", 0x0441: "sw_KE", 0x041d: "sv_SE", 0x081d: "sv_FI",
0x0421: "id_ID", 0x045d: "iu_CA", 0x085d: "iu_CA", 0x083c: "ga_IE", 0x0434: "xh_ZA", 0x0435: "zu_ZA", 0x0410: "it_IT", 0x0810: "it_CH", 0x0411: "ja_JP", 0x044b: "kn_IN", 0x043f: "kk_KZ", 0x0457: "kok_IN", 0x0412: "ko_KR", 0x0440: "ky_KG", 0x0426: "lv_LV", 0x0427: "lt_LT", 0x046e: "lb_LU", 0x042f: "mk_MK", 0x043e: "ms_MY", 0x083e: "ms_BN", 0x044c: "ml_IN", 0x043a: "mt_MT", 0x0481: "mi_NZ", 0x047a: "arn_CL", 0x044e: "mr_IN", 0x047c: "moh_CA", 0x0450: "mn_MN", 0x0461: "ne_NP", 0x0414: "nb_NO", 0x0814: "nn_NO", 0x0482: "oc_FR", 0x0448: "or_IN", 0x0463: "ps_AF", 0x0429: "fa_IR", 0x0415: "pl_PL", 0x0416: "pt_BR", 0x0816: "pt_PT", 0x0446: "pa_IN", 0x046b: "quz_BO", 0x086b: "quz_EC", 0x0c6b: "quz_PE", 0x0418: "ro_RO", 0x0417: "rm_CH", 0x0419: "ru_RU", 0x243b: "smn_FI", 0x103b: "smj_NO", 0x143b: "smj_SE", 0x043b: "se_NO", 0x083b: "se_SE", 0x0c3b: "se_FI", 0x203b: "sms_FI", 0x183b: "sma_NO", 0x1c3b: "sma_SE", 0x044f: "sa_IN", 0x0c1a: "sr_SP", 0x1c1a: "sr_BA", 0x081a: "sr_SP", 0x181a: "sr_BA", 0x046c: "ns_ZA", 0x0432: "tn_ZA", 0x041b: "sk_SK", 0x0424: "sl_SI", 0x040a: "es_ES", 0x080a: "es_MX", 0x0c0a: "es_ES", 0x100a: "es_GT", 0x140a: "es_CR", 0x180a: "es_PA", 0x1c0a: "es_DO", 0x200a: "es_VE", 0x240a: "es_CO", 0x280a: "es_PE", 0x2c0a: "es_AR", 0x300a: "es_EC", 0x340a: "es_CL", 0x380a: "es_UR", 0x3c0a: "es_PY", 0x400a: "es_BO", 0x440a: "es_SV", 0x480a: "es_HN", 0x4c0a: "es_NI", 0x500a: "es_PR", 0x0441: "sw_KE", 0x041d: "sv_SE", 0x081d: "sv_FI", 0x045a: "syr_SY", 0x0449: "ta_IN", 0x0444: "tt_RU", 0x044a: "te_IN", 0x041e: "th_TH",
def getpreferredencoding(do_setlocale = True): """Return the charset that the user is likely using, according to the system configuration.""" if do_setlocale: oldloc = setlocale(LC_CTYPE) setlocale(LC_CTYPE, "") result = nl_langinfo(CODESET) setlocale(LC_CTYPE, oldloc) return result else: return nl_langinfo(CODESET)
b709c2caba3c781d0f4602f28227993e565f0a87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b709c2caba3c781d0f4602f28227993e565f0a87/locale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23616, 5999, 12, 2896, 67, 542, 6339, 273, 1053, 4672, 3536, 990, 326, 4856, 716, 326, 729, 353, 10374, 1450, 16, 4888, 358, 326, 2619, 1664, 12123, 309, 741, 67, 542, 6339, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 23616, 5999, 12, 2896, 67, 542, 6339, 273, 1053, 4672, 3536, 990, 326, 4856, 716, 326, 729, 353, 10374, 1450, 16, 4888, 358, 326, 2619, 1664, 12123, 309, 741, 67, 542, 6339, 30, 1...
return r"{%s}\over{%s}"%(" ".join(pospart)," ".join(negpart))
return r"{%s \over %s}"%(" ".join(pospart)," ".join(negpart))
def tex(self, use_over = False): """TeX math mode representation. >>> print Exponents({'m':1,'s':-2}).tex() m/s^2 >>> print Exponents({'s':-1}).tex(use_over = True) {1}\over{s} """ pos, neg = self._posneg() pospart,negpart=[],[] for part,d in [(pospart,pos),(negpart,neg)]: for s,n in d: if n==1: part.append(s) else: n = str(n) if len(n)>1: n="{%s}"%n part.append(unicode(s)+"^"+n) if use_over and negpart: pospart = pospart or ["1"] return r"{%s}\over{%s}"%(" ".join(pospart)," ".join(negpart)) else: r = " ".join(pospart) if negpart: r += "/" if len(negpart)>1: r+= r"\left(" r += " ".join(negpart) if len(negpart)>1: r+= r"\right)" return r.strip()
8cbe382d979b7a8d71df74c9055c6f4591e5ef90 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/174/8cbe382d979b7a8d71df74c9055c6f4591e5ef90/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 12, 2890, 16, 999, 67, 1643, 273, 1083, 4672, 3536, 21575, 60, 4233, 1965, 4335, 18, 225, 4080, 1172, 29770, 87, 12590, 11, 81, 4278, 21, 11189, 87, 4278, 17, 22, 97, 2934, 2176...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16573, 12, 2890, 16, 999, 67, 1643, 273, 1083, 4672, 3536, 21575, 60, 4233, 1965, 4335, 18, 225, 4080, 1172, 29770, 87, 12590, 11, 81, 4278, 21, 11189, 87, 4278, 17, 22, 97, 2934, 2176...
pattern = re.compile("^(At|Updated to) revision (\\d+).$")
pattern = re.compile("^(At|Updated to) revision (\\d+)$")
def svn_up(): version = -1 pattern = re.compile("^(At|Updated to) revision (\\d+).$") output = popen_results(['svn', 'up']) lines = output.split("\n") for line in lines: match = pattern.match(line) if match: version = int(match.groups()[1]) return version
ad2e42b18fa6999d93365f15411281b24b7d083c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/ad2e42b18fa6999d93365f15411281b24b7d083c/deploy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5893, 82, 67, 416, 13332, 225, 1177, 273, 300, 21, 1936, 273, 283, 18, 11100, 2932, 29020, 861, 96, 7381, 358, 13, 6350, 261, 1695, 72, 6975, 8, 7923, 225, 876, 273, 30925, 67, 4717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5893, 82, 67, 416, 13332, 225, 1177, 273, 300, 21, 1936, 273, 283, 18, 11100, 2932, 29020, 861, 96, 7381, 358, 13, 6350, 261, 1695, 72, 6975, 8, 7923, 225, 876, 273, 30925, 67, 4717, ...
_keep_alive(args, memo)
def _deepcopy_inst(x, memo): if hasattr(x, '__deepcopy__'): return x.__deepcopy__(memo) if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() _keep_alive(args, memo) args = deepcopy(args, memo) y = apply(x.__class__, args) else: y = _EmptyClass() y.__class__ = x.__class__ memo[id(x)] = y if hasattr(x, '__getstate__'): state = x.__getstate__() _keep_alive(state, memo) else: state = x.__dict__ state = deepcopy(state, memo) if hasattr(y, '__setstate__'): y.__setstate__(state) else: y.__dict__.update(state) return y
166879d4a9363165c66fc150f42212e35807d556 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/166879d4a9363165c66fc150f42212e35807d556/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 12, 19521, 13, 309, 3859, 12, 92, 16, 4940...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 12, 19521, 13, 309, 3859, 12, 92, 16, 4940...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.DoubleField.__init__(self, 898) else quickfix.DoubleField.__init__(self, 898, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1725, 10689, 13, 469, 9549, 904, 18, 5265, 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, 5265, 974, 16186, 2738, 972, 12, 2890, 16, 1725, 10689, 13, 469, 9549, 904, 18, 5265, 974, 16186, 2738,...
_print_summary_line(summary, "Co-Action Publishing", currentyear, pubyear, total)
_print_summary_line(summary, "Co-Action Publishing", "cap", currentyear, pubyear, total)
def _main_procedure(): parser = _make_command_line_parser() (options, args) = parser.parse_args(values=parser.get_default_values()) _check_required_options(parser, options) db = MySQLdb.connect(host="localhost", user="edwardsb", passwd=options.dbpassword, db="burp") _update_required_options(db, options) # Initialize the hashes. # WARNING: If you update this list, you need to update three places: # 1. The list of publishers in the 'while auid is not None' loop. # 2. The summary report # 3. In BurpCheck.py, the _is_reported() method. publishers = ['aap', 'aip', 'ama', 'aps', 'acm', 'bep', 'bmc', 'cap', 'eup', 'elsevier', 'gtv', 'iop', 'wiley', 'lup', 'npg', 'oup', 'rup', 'rsc', 'rsp', 'sage', 'springer', 'ssr', 'tf'] total = {} pubyear = {} for publisher in publishers: pubyear[publisher] = {} total[publisher] = 0 for year in range(options.currentyear, options.minimumyear - 1, -1) + ["0"]: strYear = str(year) pubyear[publisher][strYear] = 0 cursorAuid = db.cursor() cursorAuid.execute("SELECT DISTINCT(auid) from burp WHERE rundate >= '" + str(options.reportdatestart) + "' AND rundate <= '" + str(options.reportdateend) + "' order by auid;") auid = cursorAuid.fetchone() while auid is not None: cursorArticles = db.cursor() cursorArticles.execute("SELECT MAX(numarticles), auyear FROM burp WHERE auid = \"" + auid[0] + "\" and rundate >= '" + str(options.reportdatestart) + "' AND rundate <= '" + str(options.reportdateend) +"';") articles = cursorArticles.fetchone() strYear = articles[1] if "-" in strYear: strYear = strYear[5:9] # If you change this list, be sure to change the equivalent # list in BurpCheck.py. if (auid[0].find("ClockssHighWirePlugin") != -1) and (auid[0].find("aappublications") != -1): pubyear['aap'][strYear] += articles[0] total['aap'] += articles[0] # No criteria for American Institute of Physics. if (auid[0].find("ClockssHighWirePlugin") != -1) and (auid[0].find("ama-assn") != -1): pubyear['ama'][strYear] += articles[0] total['ama'] += articles[0] if (auid[0].find("ClockssHighWirePlugin") != -1) and (auid[0].find("physiology%2Eorg") != -1): pubyear['aps'][strYear] += articles[0] total['aps'] += articles[0] # No criteria for Association for Computing Machinery if (auid[0].find("ClockssBerkeleyElectronicPressPlugin") != -1): pubyear['bep'][strYear] += articles[0] total['bep'] += articles[0] # No criteria for BioMed Central. if (auid[0].find("ClockssCoActionPublishingPlugin") != -1): pubyear['cap'][strYear] += articles[0] total['cap'] += articles[0] if (auid[0].find("ClockssEdinburghUniversityPressPlugin") != -1): pubyear['eup'][strYear] += articles[0] total['eup'] += articles[0] # No criteria for Elsevier. if (auid[0].find("ClockssGeorgThiemeVerlagPlugin") != -1): pubyear['gtv'][strYear] += articles[0] total['gtv'] += articles[0] # No criteria for IOP Publishing # No criteria for Wiley # No criteria for Liverpool if (auid[0].find("ClockssNaturePublishingGroupPlugin") != -1): pubyear['npg'][strYear] += articles[0] total['npg'] += articles[0] if (auid[0].find("HighWire") != -1) and (auid[0].find("oxfordjournals") != -1): pubyear['oup'][strYear] += articles[0] total['oup'] += articles[0] # No criteria for Rockefeller University Press if (auid[0].find("ClockssRoyalSocietyOfChemistryPlugin") != -1): pubyear['rsc'][strYear] += articles[0] total['rsc'] += articles[0] if (auid[0].find("HighWire") != -1) and (auid[0].find("royalsocietypublishing") != 0): pubyear['rsp'][strYear] += articles[0] total['rsp'][strYear] += articles[0] if (auid[0].find("HighWire") != -1) and (auid[0].find("sagepub") != -1): pubyear['sage'][strYear] += articles[0] total['sage'] += articles[0] # No criteria for Springer if (auid[0].find("HighWire") != -1) and (auid[0].find("biolreprod%2Eorg") != -1): pubyear['ssr'][strYear] += articles[0] total['ssr'] += articles[0] # No criteria for Taylor & Francis auid = cursorAuid.fetchone() # Verify our numbers! for publisher in publishers: testTotal = 0 for year in range(options.currentyear, options.minimumyear - 1, -1) + ["0"]: strYear = str(year) testTotal += pubyear[publisher][strYear] if total[publisher] != testTotal: print "ERROR: Publisher " + publisher + " doesn't have the right total." # Post the report to the database for publisher in publishers: for year in range(options.currentyear, options.minimumyear - 1, -1) + [0]: strYear = str(year) cursorAuid.execute("INSERT INTO burpreport(rundate, publisher, auyear, numarticles) VALUES (NOW(), \"%s\", %d, %d);" % (publisher, year, pubyear[publisher][strYear])) # Output the main report. filename = open(options.filename, 'w') filename.write("Dates of ingest," + str(options.reportdatestart) + " - " + str(options.reportdateend) + "\n") filename.write("Date of report," + str(date.today()) + "\n") filename.write("year,") for publisher in publishers: filename.write(publisher.upper() + ",") # Yes, there's an extra comma at the end. Same with everything else. # If that's a problem, we can fix it. filename.write("\n"); for year in range(options.currentyear, options.minimumyear - 1, -1) + ["0"]: strYear = str(year) printYear = strYear if (year == options.currentyear): printYear = "Current Ingest " + strYear if (year == "0"): printYear = "Data entry in progress -- Year TBD" filename.write( printYear + "," ) for publisher in publishers: filename.write(str(pubyear[publisher][strYear]) + ",") filename.write("\n") filename.write("Back Ingest Total,") for publisher in publishers: filename.write(str(total[publisher]) + ",") filename.write("\n") # Output the new summary report. # WARNING: I don't have a simple way to keep track of names compared # against publishers. You need to update these in two places: the # list called 'publishers' and here. currentyear = str(options.currentyear) summary = open(options.summary, "w") summary.write("Official Publisher Name,Publisher ID, Total Ingest for " + str(currentyear) + ", Total Ingest For all time\n") _print_summary_line(summary, "American Academy of Pediatrics", "aap", currentyear, pubyear, total) _print_summary_line(summary, "American Institute of Physics", "aip", currentyear, pubyear, total) _print_summary_line(summary, "American Medical Association", "ama", currentyear, pubyear, total) _print_summary_line(summary, "American Physiological Society", "aps", currentyear, pubyear, total) _print_summary_line(summary, "Association for Computing Machinery", "acm", currentyear, pubyear, total) _print_summary_line(summary, "Berkeley Electronic Press", "bep", currentyear, pubyear, total) _print_summary_line(summary, "BioMed Central", "bmc", currentyear, pubyear, total) _print_summary_line(summary, "Co-Action Publishing", currentyear, pubyear, total) _print_summary_line(summary, "Edinburgh University Press", "eup", currentyear, pubyear, total) _print_summary_line(summary, "Elsevier", "elsevier", currentyear, pubyear, total) _print_summary_line(summary, "Georg Thieme Verlag", currentyear, pubyear, total) _print_summary_line(summary, "IOP Publishing", "iop", currentyear, pubyear, total) _print_summary_line(summary, "John Wiley and Sons", "wiley", currentyear, pubyear, total) _print_summary_line(summary, "Liverpool University Press", "lup", currentyear, pubyear, total) _print_summary_line(summary, "Nature Publishing Group", "npg", currentyear, pubyear, total) _print_summary_line(summary, "Oxford University Press", "oup", currentyear, pubyear, total) _print_summary_line(summary, "Rockefeller University Press", "rup", currentyear, pubyear, total) _print_summary_line(summary, "RSC Publishing", "rsc", currentyear, pubyear, total) _print_summary_line(summary, "Royal Society Publishing", "rs", currentyear, pubyear, total) _print_summary_line(summary, "SAGE Publications", "sage", currentyear, pubyear, total) _print_summary_line(summary, "Springer", "springer", currentyear, pubyear, total) _print_summary_line(summary, "Society for the Study of Reproduction", currentyear, pubyear, total) _print_summary_line(summary, "Taylor and Francis", "tf", currentyear, pubyear, total)
a2b5f0906ebb19e0049518b4a8d75f4600597b9a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/766/a2b5f0906ebb19e0049518b4a8d75f4600597b9a/BurpReport.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5254, 67, 685, 8153, 13332, 2082, 273, 389, 6540, 67, 3076, 67, 1369, 67, 4288, 1435, 261, 2116, 16, 833, 13, 273, 2082, 18, 2670, 67, 1968, 12, 2372, 33, 4288, 18, 588, 67, 188...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 67, 685, 8153, 13332, 2082, 273, 389, 6540, 67, 3076, 67, 1369, 67, 4288, 1435, 261, 2116, 16, 833, 13, 273, 2082, 18, 2670, 67, 1968, 12, 2372, 33, 4288, 18, 588, 67, 188...
(uid, gid, pid) = self.GetContext() tsumufs.cacheManager.access(uid, path, os.R_OK)
context = self.GetContext() tsumufs.cacheManager.access(context['uid'], path, os.R_OK)
def getattr(self, path): ''' Callback which is called into when a stat() is performed on the user side of things.
c3478d05944e6e6bef9ad5c70ada99c0c43c2db1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10739/c3478d05944e6e6bef9ad5c70ada99c0c43c2db1/fusethread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3869, 12, 2890, 16, 589, 4672, 9163, 8444, 1492, 353, 2566, 1368, 1347, 279, 610, 1435, 353, 9591, 603, 326, 729, 4889, 434, 9198, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3869, 12, 2890, 16, 589, 4672, 9163, 8444, 1492, 353, 2566, 1368, 1347, 279, 610, 1435, 353, 9591, 603, 326, 729, 4889, 434, 9198, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not os.path.isdir('PopGen' + os.sep + 'simple') :
if not os.path.isdir(os.path.join('PopGen', 'simple')) :
def tearDown(self): if not os.path.isdir('PopGen' + os.sep + 'simple') : #Unit test must have failed to invoke simcaol, #and this it never created the directory. return for file in os.listdir('PopGen' + os.sep + 'simple'): os.remove(os.sep.join(['PopGen', 'simple', file])) os.rmdir('PopGen' + os.sep + 'simple')
96638f2212d6577ca5c4a60667d067e9f3dc19c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7167/96638f2212d6577ca5c4a60667d067e9f3dc19c6/test_PopGen_SimCoal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 2668, 7049, 7642, 2187, 296, 9647, 26112, 294, 468, 2802, 1842, 1297, 1240, 2535, 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, 268, 2091, 4164, 12, 2890, 4672, 309, 486, 1140, 18, 803, 18, 291, 1214, 12, 538, 18, 803, 18, 5701, 2668, 7049, 7642, 2187, 296, 9647, 26112, 294, 468, 2802, 1842, 1297, 1240, 2535, 3...
self.close()
new_configured_sats = nimmanager.getConfiguredSats() self.unconfed_sats = old_configured_sats - new_configured_sats self.satpos_to_remove = None self.deleteConfirmed(False) def deleteConfirmed(self, confirmed): if confirmed: eDVBDB.getInstance().removeServices(-1, -1, -1, self.satpos_to_remove) if self.satpos_to_remove is not None: self.unconfed_sats.remove(self.satpos_to_remove) self.satpos_to_remove = None for orbpos in self.unconfed_sats: self.satpos_to_remove = orbpos orbpos = self.satpos_to_remove try: sat_name = str(nimmanager.getSatDescription(orbpos)) except: if orbpos > 1800: orbpos = 3600 - orbpos h = _("W") else: h = _("E") sat_name = ("%d.%d" + h) % (orbpos / 10, orbpos % 10) self.session.openWithCallback(self.deleteConfirmed, MessageBox, _("Delete no more configured satellite\n%s?") %(sat_name)) break if not self.satpos_to_remove: self.close()
def keySave(self): self.run() self.close()
dc2fae0009c67e51c9e85e28693f47df8aa4b60c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/dc2fae0009c67e51c9e85e28693f47df8aa4b60c/Satconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 4755, 12, 2890, 4672, 365, 18, 2681, 1435, 365, 18, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 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, 498, 4755, 12, 2890, 4672, 365, 18, 2681, 1435, 365, 18, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
bank_statement_lines[st_line['name']]=st_line
bank_statement_lines[line[2:6] + st_line['name']]=st_line
def _coda_parsing(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) codafile = data['form']['coda'] jur_id = data['form']['journal_id'] def_pay_acc = data['form']['def_payable'] def_rec_acc = data['form']['def_receivable'] str_log = "" err_log = "" bank_statement={} bank_statement_lines={} bank_statements=[] recordlist = base64.decodestring(codafile).split('\n')#remove \r by dhaval recordlist.pop() for line in recordlist: if line[0] == '0': # header data
8771236bbdea36b286344d806879abc29c41dc0d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/8771236bbdea36b286344d806879abc29c41dc0d/coda_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1559, 69, 67, 24979, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 11012, 69, 768, 273, 501, 3292, 687,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1559, 69, 67, 24979, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 2845, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 13, 11012, 69, 768, 273, 501, 3292, 687,...
fstack = filter(None, self.margin_stack)
fstack = [m for m in self.margin_stack if m]
def pop_margin(self): if self.margin_stack: del self.margin_stack[-1] fstack = filter(None, self.margin_stack) if fstack: margin = fstack[-1] else: margin = None self.writer.new_margin(margin, len(fstack))
7cd67cc992acb659f1673706e037ee835648d60b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/7cd67cc992acb659f1673706e037ee835648d60b/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1843, 67, 10107, 12, 2890, 4672, 309, 365, 18, 10107, 67, 3772, 30, 1464, 365, 18, 10107, 67, 3772, 18919, 21, 65, 284, 3772, 273, 306, 81, 364, 312, 316, 365, 18, 10107, 67, 3772, 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, 1843, 67, 10107, 12, 2890, 4672, 309, 365, 18, 10107, 67, 3772, 30, 1464, 365, 18, 10107, 67, 3772, 18919, 21, 65, 284, 3772, 273, 306, 81, 364, 312, 316, 365, 18, 10107, 67, 3772, 3...
print '\tCAPABILITIES: %s' % `self.capabilities`
_mesg('CAPABILITIES: %s' % `self.capabilities`)
def __init__(self, host = '', port = IMAP4_PORT): self.host = host self.port = port self.debug = Debug self.state = 'LOGOUT' self.literal = None # A literal argument to a command self.tagged_commands = {} # Tagged commands awaiting response self.untagged_responses = {} # {typ: [data, ...], ...} self.continuation_response = '' # Last continuation response self.tagnum = 0
b10c0e30e74484a3863b7dcd5a9fd8e9e5849364 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b10c0e30e74484a3863b7dcd5a9fd8e9e5849364/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6354, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, 4148, 273, 4015, 365, 18, 2019, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1479, 273, 10226, 1756, 273, 6246, 2203, 24, 67, 6354, 4672, 365, 18, 2564, 273, 1479, 365, 18, 655, 273, 1756, 365, 18, 4148, 273, 4015, 365, 18, 2019, ...
cmdstr = ". %s && echo '%s' && env"%(filename,magic) import commands ret,cmdres = commands.getstatusoutput(cmdstr) if ret != 0: from exception import CommandFailure err = 'Failed to source "%s" from %s:\n%s' \ %(filename,os.getcwd(),cmdres) if dir: fs.goback() log.error(err) raise CommandFailure, err if dir: fs.goback()
sourcer = os.path.dirname(__file__) + '/source.sh' cmdstr = "%s %s %s"%(sourcer,filename,magic) cmdres = cmd(cmdstr,env,dir,True)
def source(filename,env=None,dir=None,output=False): '''Produce a dictionary giving environment variables after the given file has been "sourced", starting with the given env or the default one in which the application runs. If output is False, return this dictionary, if True return a tuple with this dictionary and a string containing any output from the source command.''' if dir: fs.goto(dir) log.info('sourcing %s in %s'%(filename,os.getcwd())) magic='magic%dmagic'%os.getpid() cmdstr = ". %s && echo '%s' && env"%(filename,magic) import commands ret,cmdres = commands.getstatusoutput(cmdstr) if ret != 0: from exception import CommandFailure err = 'Failed to source "%s" from %s:\n%s' \ %(filename,os.getcwd(),cmdres) if dir: fs.goback() log.error(err) raise CommandFailure, err if dir: fs.goback() res = [] newenv = {} inenv = False for line in cmdres.split('\n'): if line == magic: inenv = True continue if inenv: ind = line.find('=') key = line[:ind] val = line[ind+1:] newenv[key] = val else: res.append(line) continue if env: env.update(newenv) else: env = newenv if output: return (env,'\n'.join(res)) return env
d4be0b5a5095c8bf88f82fe00f3391d45380e0d6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9874/d4be0b5a5095c8bf88f82fe00f3391d45380e0d6/command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1084, 12, 3459, 16, 3074, 33, 7036, 16, 1214, 33, 7036, 16, 2844, 33, 8381, 4672, 9163, 25884, 279, 3880, 21057, 3330, 3152, 1839, 326, 864, 585, 711, 2118, 315, 3168, 72, 3113, 5023, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1084, 12, 3459, 16, 3074, 33, 7036, 16, 1214, 33, 7036, 16, 2844, 33, 8381, 4672, 9163, 25884, 279, 3880, 21057, 3330, 3152, 1839, 326, 864, 585, 711, 2118, 315, 3168, 72, 3113, 5023, ...
r""" Largest prime dividing $n$ (with $a(1)=1$). INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A006530;a Largest prime dividing n (with a(1)=1). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 1 sage: a(2) 2 sage: a(8) 2 sage: a(11) 11 sage: a.list(15) [1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5] AUTHOR: -- Jaap Spies (2007-01-25) """ def __init__(self):
def __init__(self): r""" Largest prime dividing $n$ (with $a(1)=1$). INPUT: n -- positive integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A006530;a Largest prime dividing n (with a(1)=1). sage: a(0) Traceback (most recent call last): ... ValueError: input n (=0) must be a positive integer sage: a(1) 1 sage: a(2) 2 sage: a(8) 2 sage: a(11) 11 sage: a.list(15) [1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 5] AUTHOR: -- Jaap Spies (2007-01-25) """
def _eval(self, n): return self.nwf(n, n)
8b300fed02e947af57b58146f62dccfc715cf0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/8b300fed02e947af57b58146f62dccfc715cf0b9/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 365, 18, 82, 15581, 12, 82, 16, 290, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 12, 2890, 16, 290, 4672, 327, 365, 18, 82, 15581, 12, 82, 16, 290, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if brace_level == 0 and _BULLET_RE.match(line, indent): break
if _BULLET_RE.match(line, indent): break elif _FIELD_BULLET_RE.match(bcontents): pass
def _tokenize_listart(lines, start, bullet_indent, tokens, warnings): """ Construct L{Token}s for the bullet and the first paragraph of the list item (or field) starting at C{lines[start]}, and append them to C{tokens}. C{bullet_indent} should be the indentation of the list item. Any warnings generated while tokenizing will be appended to C{warnings}. @param lines: The list of lines to be tokenized @param start: The index into C{lines} of the first line of the list item to be tokenized. @param bullet_indent: The indentation of C{lines[start]}. This is the indentation of the list item. @param warnings: A list of the warnings generated by parsing. Any new warnings generated while will tokenizing this paragraph will be appended to this list. @return: The line number of the first line following the list item's first paragraph. @type lines: C{list} of C{string} @type start: C{int} @type bullet_indent: C{int} @type tokens: C{list} of L{Token} @type warnings: C{list} of L{ParseError} @rtype: C{int} """ linenum = start + 1 para_indent = None brace_level = lines[start].count('{') - lines[start].count('}') if brace_level < 0: brace_level = 0 while linenum < len(lines): # Find the indentation of this line. line = lines[linenum] indent = len(line) - len(line.lstrip()) # A blank line ends the token if indent == len(line): break # Dedenting past bullet_indent ends the list item. if indent < bullet_indent: break # A line beginning with a bullet ends the token. if brace_level == 0 and _LIST_BULLET_RE.match(line, indent): if para_indent and indent == para_indent: estr = ("Sublists should be indented or separated "+ "by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break brace_level += line.count('{') brace_level -= line.count('}') if brace_level < 0: brace_level = 0 if indent == bullet_indent: if brace_level == 0 and _BULLET_RE.match(line, indent): # Don't complain if it's a field.?? break else: estr = ("List item contents should be indented; "+ "Paragraphs should be separated from "+ "lists by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break # If this is the second line, set the paragraph indentation, or # end the token, as appropriate. if para_indent == None: para_indent = indent # A change in indentation ends the token if indent != para_indent: break # Go on to the next line. linenum += 1 # Add the bullet token. para_start = _BULLET_RE.match(lines[start], bullet_indent).end() bcontents = lines[start][bullet_indent:para_start].strip() tokens.append(Token(Token.BULLET, start, bcontents, bullet_indent)) # Add the paragraph token. pcontents = ([lines[start][para_start:].strip()] + [line.strip() for line in lines[start+1:linenum]]) pcontents = ' '.join(pcontents).strip() if pcontents: tokens.append(Token(Token.PARA, start, pcontents, para_indent)) # Return the linenum after the paragraph token ends. return linenum
2c4f74c1fba59fe5e2e7422ffbf67a540493dbb8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/2c4f74c1fba59fe5e2e7422ffbf67a540493dbb8/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
self._update_state()
if self._update_state(): self._trigger()
def add_history(self, (init, hist)): self._logger.debug("add_history") self._history_lock.acquire() self._init_state = (int(init[0]), float(init[1])) changed = False for ev in hist: if self.add_event((float(ev[0]), int(ev[1]))): changed = True if changed: self._update_state() self._history_lock.release()
2e5ca1597ff0d23e6dffed2402f12da8a6d72a18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4034/2e5ca1597ff0d23e6dffed2402f12da8a6d72a18/stopwatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 8189, 12, 2890, 16, 261, 2738, 16, 5356, 3719, 30, 365, 6315, 4901, 18, 4148, 2932, 1289, 67, 8189, 7923, 365, 6315, 8189, 67, 739, 18, 1077, 1039, 1435, 365, 6315, 2738, 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, 527, 67, 8189, 12, 2890, 16, 261, 2738, 16, 5356, 3719, 30, 365, 6315, 4901, 18, 4148, 2932, 1289, 67, 8189, 7923, 365, 6315, 8189, 67, 739, 18, 1077, 1039, 1435, 365, 6315, 2738, 67, ...
def _trim_hosts(hosts):
def _trim_hosts(self, hosts):
def _trim_hosts(hosts): '''remove hosts who have no public categories or hcurls''' orig_hosts = copy(hosts) i=0 for h in orig_hosts: i=i+1 found=False for c in h.categories: if not c.publiclist: continue if len(h.category_urls(c)) > 0: if _has_up2date_dirs(h, c): found=True break if not found: del hosts[i-1] return hosts
aa10d64835c32a13e295e59df8ee8c318d72da0e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13031/aa10d64835c32a13e295e59df8ee8c318d72da0e/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5290, 67, 11588, 12, 2890, 16, 7206, 4672, 9163, 4479, 7206, 10354, 1240, 1158, 1071, 6477, 578, 11684, 10518, 26418, 1647, 67, 11588, 273, 1610, 12, 11588, 13, 277, 33, 20, 364, 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, 389, 5290, 67, 11588, 12, 2890, 16, 7206, 4672, 9163, 4479, 7206, 10354, 1240, 1158, 1071, 6477, 578, 11684, 10518, 26418, 1647, 67, 11588, 273, 1610, 12, 11588, 13, 277, 33, 20, 364, 36...
env.history.message(orangemsg("temp hack for bug 1265: move atoms back to earlier positions")) movie.moveAtoms(oldposns)
def sim_loop_using_dylib(self): #bruce 051231; compare to sim_loop_using_standalone_executable # 051231 6:29pm: works, except no trace file is written so results in history come from prior one (if any) """#doc """ movie = self._movie simopts = self._simopts simobj = self._simobj try: self.remove_old_moviefile(movie.filename) # can raise exceptions #bruce 051230 split this out self.remove_old_tracefile(self.traceFileName)
1b271c6587937f68aea28be8430dee01969ca7a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/1b271c6587937f68aea28be8430dee01969ca7a4/runSim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 6498, 67, 9940, 67, 15680, 2941, 12, 2890, 4672, 468, 2848, 3965, 374, 13757, 6938, 31, 3400, 358, 3142, 67, 6498, 67, 9940, 67, 10145, 12451, 67, 17751, 468, 374, 13757, 6938,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3142, 67, 6498, 67, 9940, 67, 15680, 2941, 12, 2890, 4672, 468, 2848, 3965, 374, 13757, 6938, 31, 3400, 358, 3142, 67, 6498, 67, 9940, 67, 10145, 12451, 67, 17751, 468, 374, 13757, 6938,...
return self._executeSingleStorageElementFunction(storageElementName,physicalFile,'prestageFile',{'lifetime':lifetime}) else: return self._executeStorageElementFunction(storageElementName,physicalFile,'prestageFile',{'lifetime':lifetime}) def getPrestageStorageFileStatus( self, physicalFile, storageElementName, singleFile=False ):
return self._executeSingleStorageElementFunction( storageElementName, physicalFile, 'prestageFile', {'lifetime':lifetime} ) else: return self._executeStorageElementFunction( storageElementName, physicalFile, 'prestageFile', {'lifetime':lifetime} ) def getPrestageStorageFileStatus( self, physicalFile, storageElementName, singleFile = False ):
def prestageStorageFile(self,physicalFile,storageElementName,lifetime=60*60*24,singleFile=False): """ Prestage physical files 'physicalFile' is the pfn(s) to be pre-staged 'storageElementName' is the Storage Element """ if singleFile: return self._executeSingleStorageElementFunction(storageElementName,physicalFile,'prestageFile',{'lifetime':lifetime}) else: return self._executeStorageElementFunction(storageElementName,physicalFile,'prestageFile',{'lifetime':lifetime})
8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 12869, 3245, 812, 12, 2890, 16, 20441, 812, 16, 5697, 30584, 16, 17155, 33, 4848, 14, 4848, 14, 3247, 16, 7526, 812, 33, 8381, 4672, 3536, 2962, 12869, 11640, 1390, 225, 296, 20441,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 675, 12869, 3245, 812, 12, 2890, 16, 20441, 812, 16, 5697, 30584, 16, 17155, 33, 4848, 14, 4848, 14, 3247, 16, 7526, 812, 33, 8381, 4672, 3536, 2962, 12869, 11640, 1390, 225, 296, 20441,...
if reply != "cancel":
if str(reply) != "cancel":
def close(self): reply = self.maybesave() if reply != "cancel": self._close() return reply
f38a43056e75ae60a6b086885aaad41cea945109 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/f38a43056e75ae60a6b086885aaad41cea945109/EditorWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 609, 12, 10629, 13, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1746, 12, 2890, 4672, 4332, 273, 365, 18, 24877, 70, 281, 836, 1435, 309, 609, 12, 10629, 13, 480, 315, 10996, 6877, 365, 6315, 4412, 1435, 327, 4332, 2, -100, -100, -100, -100, -100, ...
(PF_STRING, "save_path", "The path to export the HTML to", "/tmp"),
(PF_STRING, "save_path", "The path to export the HTML to", os.getcwd()),
def cell(self, src, width, height): out = ('\t\t<td><img alt=" " src="%%s" width="%d" height="%d"></td>' % (width, height)) self.write(out, src)
7ef0073577d4ef91cfdcfda1445908f21e753ec5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/7ef0073577d4ef91cfdcfda1445908f21e753ec5/py-slice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2484, 12, 2890, 16, 1705, 16, 1835, 16, 2072, 4672, 596, 273, 7707, 64, 88, 64, 88, 32, 4465, 4438, 6081, 3770, 1546, 315, 1705, 1546, 11438, 87, 6, 1835, 11613, 72, 6, 2072, 11613, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2484, 12, 2890, 16, 1705, 16, 1835, 16, 2072, 4672, 596, 273, 7707, 64, 88, 64, 88, 32, 4465, 4438, 6081, 3770, 1546, 315, 1705, 1546, 11438, 87, 6, 1835, 11613, 72, 6, 2072, 11613, ...
from debug_prefs import debug_pref, Choice_boolean_True from debug_prefs import Choice_boolean_False choices = [Choice_boolean_False, Choice_boolean_True] initial_choice = choices[use_c_renderer_initial_state]
initial_choice = choices[use_c_renderer_default]
def setup(): global CylList, diamondGridList, CapList, CubeList, solidCubeList global sphereList, rotSignList, linearLineList, linearArrowList global circleList, lonsGridList, lonsEdges, lineCubeList, SiCGridList global use_c_renderer_pref listbase = glGenLists(numSphereSizes + 21) for i in range(numSphereSizes): sphereList += [listbase+i] glNewList(sphereList[i], GL_COMPILE) glBegin(GL_TRIANGLES) ocdec = getSphereTriangles(i) for tri in ocdec: glNormal3fv(tri[0]) glVertex3fv(tri[0]) glNormal3fv(tri[1]) glVertex3fv(tri[1]) glNormal3fv(tri[2]) glVertex3fv(tri[2]) glEnd() glEndList() CylList = listbase+numSphereSizes glNewList(CylList, GL_COMPILE) glBegin(GL_TRIANGLE_STRIP) for (vtop, ntop, vbot, nbot) in cylinderEdges: glNormal3fv(nbot) glVertex3fv(vbot) glNormal3fv(ntop) glVertex3fv(vtop) glEnd() glEndList() CapList = CylList + 1 glNewList(CapList, GL_COMPILE) glNormal3fv(cap0n) glBegin(GL_POLYGON) for p in drum0: glVertex3fv(p) glEnd() glNormal3fv(cap1n) glBegin(GL_POLYGON) for p in drum1: glVertex3fv(p) glEnd() glEndList() diamondGridList = CapList + 1 glNewList(diamondGridList, GL_COMPILE) glBegin(GL_LINES) for p in digrid: glVertex(p[0]) glVertex(p[1]) glEnd() glEndList() lonsGridList = diamondGridList + 1 lonsEdges = _makeLonsCell() glNewList(lonsGridList, GL_COMPILE) glBegin(GL_LINES) for p in lonsEdges: glVertex(p[0]) glVertex(p[1]) glEnd() glEndList() CubeList = lonsGridList + 1 glNewList(CubeList, GL_COMPILE) glBegin(GL_QUAD_STRIP) # note: CubeList has only 4 faces of the cube; only suitable for use in wireframes; # see also solidCubeList [bruce 051215 comment reporting grantham 20051213 observation] glVertex((-1,-1,-1)) glVertex(( 1,-1,-1)) glVertex((-1, 1,-1)) glVertex(( 1, 1,-1)) glVertex((-1, 1, 1)) glVertex(( 1, 1, 1)) glVertex((-1,-1, 1)) glVertex(( 1,-1, 1)) glVertex((-1,-1,-1)) glVertex(( 1,-1,-1)) glEnd() glEndList() solidCubeList = CubeList + 1 glNewList(solidCubeList, GL_COMPILE) glBegin(GL_QUADS) for i in xrange(len(cubeIndices)): avenormals = V(0,0,0) #bruce 060302 fixed normals for flat shading for j in xrange(4) : nTuple = tuple(cubeNormals[cubeIndices[i][j]]) avenormals += A(nTuple) avenormals = norm(avenormals) for j in xrange(4) : ## nTuple = tuple(cubeNormals[cubeIndices[i][j]]) vTuple = tuple(cubeVertices[cubeIndices[i][j]]) vTuple = A(vTuple) * 0.5 #bruce 060302 made size compatible with glut.glutSolidCube(1.0) glNormal3fv(avenormals) glVertex3fv(vTuple) glEnd() glEndList() rotSignList = solidCubeList + 1 glNewList(rotSignList, GL_COMPILE) glBegin(GL_LINE_STRIP) for ii in xrange(len(rotS0n)): glVertex3fv(tuple(rotS0n[ii])) glEnd() glBegin(GL_LINE_STRIP) for ii in xrange(len(rotS1n)): glVertex3fv(tuple(rotS1n[ii])) glEnd() glBegin(GL_TRIANGLES) for v in arrow0Vertices + arrow1Vertices: glVertex3f(v[0], v[1], v[2]) glEnd() glEndList() linearArrowList = rotSignList + 1 glNewList(linearArrowList, GL_COMPILE) glBegin(GL_TRIANGLES) for v in linearArrowVertices: glVertex3f(v[0], v[1], v[2]) glEnd() glEndList() linearLineList = linearArrowList + 1 glNewList(linearLineList, GL_COMPILE) glEnable(GL_LINE_SMOOTH) glBegin(GL_LINES) glVertex3f(0.0, 0.0, -halfHeight) glVertex3f(0.0, 0.0, halfHeight) glEnd() glDisable(GL_LINE_SMOOTH) glEndList() circleList = linearLineList + 1 #glGenLists(1) glNewList(circleList, GL_COMPILE) glBegin(GL_LINE_LOOP) for ii in range(60): x = cos(ii*2.0*pi/60) y = sin(ii*2.0*pi/60) glVertex3f(x, y, 0.0) glEnd() glEndList() cvIndices = [0,1, 2,3, 4,5, 6,7, 0,3, 1,2, 5,6, 4,7, 0,4, 1,5, 2,6, 3,7] lineCubeList = circleList + 1 glNewList(lineCubeList, GL_COMPILE) glBegin(GL_LINES) for i in cvIndices: glVertex3fv(tuple(cubeVertices[i])) glEnd() glEndList() SiCGridList = lineCubeList + 1 glNewList(SiCGridList, GL_COMPILE) glBegin(GL_LINES) glVertex3fv(sic_vpdat[0]) glVertex3fv(sic_vpdat[2]) glEnd() glBegin(GL_LINE_STRIP) for v in sic_vpdat[1:]: glVertex3fv(v) glEnd() glEndList() # 20060313 grantham Added use_c_renderer_pref debug pref, can # take out when C renderer used by default. if quux_module_import_succeeded: from debug_prefs import debug_pref, Choice_boolean_True from debug_prefs import Choice_boolean_False choices = [Choice_boolean_False, Choice_boolean_True] initial_choice = choices[use_c_renderer_initial_state] use_c_renderer_pref = debug_pref("Use native C renderer?", initial_choice, non_debug = True, prefs_key = use_c_renderer_key) #e should remove non_debug = True before release! #initTexture('C:\\Huaicai\\atom\\temp\\newSample.png', 128,128) return
8209e3f8b4504aa57fd5e7ce58093776a3f8cabe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8209e3f8b4504aa57fd5e7ce58093776a3f8cabe/drawer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 2552, 22337, 80, 682, 16, 4314, 301, 1434, 6313, 682, 16, 11200, 682, 16, 385, 4895, 682, 16, 18035, 39, 4895, 682, 2552, 20041, 682, 16, 4168, 2766, 682, 16, 9103, 1670, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13332, 2552, 22337, 80, 682, 16, 4314, 301, 1434, 6313, 682, 16, 11200, 682, 16, 385, 4895, 682, 16, 18035, 39, 4895, 682, 2552, 20041, 682, 16, 4168, 2766, 682, 16, 9103, 1670, ...
self.do_zoom(self.scale.get_value() - 1, True, False)
self.do_zoom(self.scale.get_value() - 1, True)
def navigation(self, keyval): # Left = 65361 Up = 65362 # Right = 65363 Down = 65364 if keyval in range(65361, 65365): self.da_jump(keyval - 65360)
e69ef850fb40babae3c4edc4e559bf43d18bb9a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5373/e69ef850fb40babae3c4edc4e559bf43d18bb9a8/maps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10394, 12, 2890, 16, 498, 1125, 4672, 468, 13338, 225, 273, 15892, 5718, 21, 225, 1948, 282, 273, 15892, 5718, 22, 468, 13009, 273, 1666, 8643, 4449, 225, 10077, 273, 1666, 8643, 1105, 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, 10394, 12, 2890, 16, 498, 1125, 4672, 468, 13338, 225, 273, 15892, 5718, 21, 225, 1948, 282, 273, 15892, 5718, 22, 468, 13009, 273, 1666, 8643, 4449, 225, 10077, 273, 1666, 8643, 1105, 3...
if mobj._date_name in mobj._columns:
if hasattr(mobj, '_date_name') and mobj._date_name in mobj._columns:
def _views_get_fnc(self, cr, uid, ids, name, arg, context={}): res={} for act in self.browse(cr, uid, ids): res[act.id]=[(view.view_id.id, view.view_mode) for view in act.view_ids] if (not act.view_ids): modes = act.view_mode.split(',') find = False if act.view_id: res[act.id].append((act.view_id.id, act.view_id.type)) for t in modes: if act.view_id and (t == act.view_id.type) and not find: find = True continue res[act.id].append((False, t))
62977c6be16d6e9670a3e43d70bb9605efbecc40 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/62977c6be16d6e9670a3e43d70bb9605efbecc40/ir_actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7061, 67, 588, 67, 4293, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 12938, 364, 1328, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7061, 67, 588, 67, 4293, 71, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 12938, 364, 1328, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16,...
log.msg("Changing listening port in server.conf " +
log.msg("Changing listening port " +
def main(options): """ Main execution loop of the server. """ # config = get_conf('server') # LOG_FILE = config['log_file'] # LOG_LEVEL = config['log_level'] # SSL = get_bool(config['ssl']) # SSL_PRIVKEY = config['privkey_file'] # SSL_CERT = config['cert_file'] # CLIENT_PORT = int(config['client_port']) # PUBKEY_DATABASE = os.path.expanduser(config['pubkey_database']) # STATS_FILE = config['stats_file'] LOG_FILE = options.logfile LOG_LEVEL = options.loglevel SSL = get_bool(options.ssl) SSL_PRIVKEY = options.privkey SSL_CERT = options.cert CLIENT_PORT = options.port STATS_FILE = options.statsfile DB_FILE = options.dbfile FAILURE_THRESHOLD = options.job_failure_threshold # start logging startLogging(LOG_FILE) # Job database jobdb = JobDatabaseSQLite(db_file=DB_FILE, job_failure_threshold=FAILURE_THRESHOLD, log_file=LOG_FILE, log_level=LOG_LEVEL) # Worker database monitordb = MonitorDatabase(db_file=DB_FILE, log_file=LOG_FILE, log_level=LOG_LEVEL) # Client database clientdb = ClientDatabase() # Create the main DSage object dsage_server = DSageServer(jobdb, monitordb, clientdb, log_level=LOG_LEVEL) p = _SSHKeyPortalRoot(portal.Portal(Realm(dsage_server))) # Credentials checker p.portal.registerChecker(PublicKeyCredentialsCheckerDB(clientdb)) # HACK: unsafeTracebacks should eventually be TURNED off client_factory = pb.PBServerFactory(p, unsafeTracebacks=True) # Create the looping call that will output the XML file for Dashboard tsk1 = task.LoopingCall(write_stats, dsage_server, STATS_FILE) tsk1.start(5.0, now=False) # Create the PBServerFactory for workers # Use this for unauthorized workers # dsage_worker = DSageWorkerServer(jobdb, log_level=LOG_LEVEL) # worker_factory = WorkerPBServerFactory(dsage_worker) dsage_server.client_factory = client_factory attempts = 0 err_msg = "Could not find an open port after 50 attempts." NEW_CLIENT_PORT = CLIENT_PORT while True: if attempts > 50: log.err(err_msg) log.err('Last attempted port: %s' % (NEW_CLIENT_PORT)) sys.exit(-1) try: try: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect(('', NEW_CLIENT_PORT)) port_used = True except socket.error, msg: port_used = False if not port_used: if SSL: ssl_context = ssl.DefaultOpenSSLContextFactory( SSL_PRIVKEY, SSL_CERT) reactor.listenSSL(NEW_CLIENT_PORT, client_factory, contextFactory = ssl_context) break else: reactor.listenTCP(NEW_CLIENT_PORT, client_factory) break else: raise SystemError('Trying to bind to open port: ' + '%s.' % (NEW_CLIENT_PORT)) except (SystemError, error.CannotListenError): attempts += 1 NEW_CLIENT_PORT += 1 except Exception, msg: print 'Exception: ', msg if SSL: print 'Error starting server with SSL enabled, please ' + \ 'check your configuration' else: print 'Error starting server, please check your configuration' sys.exit() if CLIENT_PORT != NEW_CLIENT_PORT: log.msg(DELIMITER) log.msg("***NOTICE***") log.msg("Changing listening port in server.conf " + "to %s" % (NEW_CLIENT_PORT)) log.msg(DELIMITER) log.msg(DELIMITER) log.msg('DSAGE Server') log.msg('Started with PID: %s' % (os.getpid())) if SSL: log.msg('Using SSL: True') else: log.msg('Using SSL: False') log.msg('Listening on port: %s' % (NEW_CLIENT_PORT)) log.msg(DELIMITER) # Code below can be turned on to do countrefs # from sage.dsage.misc.countrefs import logInThread # logInThread(n=15) # reactor.callWhenRunning(create_manhole) # import pdb; pdb.set_trace() if options.noblock: reactor.run(installSignalHandlers=0) else: reactor.run(installSignalHandlers=1)
e7b20a5c741115464762f8cea57400cc636e9a52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/e7b20a5c741115464762f8cea57400cc636e9a52/dsage_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 4672, 3536, 12740, 4588, 2798, 434, 326, 1438, 18, 225, 3536, 225, 468, 642, 273, 336, 67, 3923, 2668, 3567, 6134, 468, 2018, 67, 3776, 273, 642, 3292, 1330, 67, 768, 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, 2774, 12, 2116, 4672, 3536, 12740, 4588, 2798, 434, 326, 1438, 18, 225, 3536, 225, 468, 642, 273, 336, 67, 3923, 2668, 3567, 6134, 468, 2018, 67, 3776, 273, 642, 3292, 1330, 67, 768, 3...
el1 = etree.SubElement(el, 'text:span',
el1 = SubElement(el, 'text:span',
def visit_topic(self, node): #ipshell('At visit_topic') #import pdb; pdb.set_trace() if 'classes' in node.attributes: if 'contents' in node.attributes['classes']: el = self.append_child('text:p', attrib={ 'text:style-name': 'rststyle-horizontalline'}) el = self.append_child('text:p', attrib={ 'text:style-name': 'rststyle-centeredtextbody'}) el1 = etree.SubElement(el, 'text:span', attrib={'text:style-name': 'rststyle-strong'}) el1.text = 'Contents' elif 'abstract' in node.attributes['classes']: el = self.append_child('text:p', attrib={ 'text:style-name': 'rststyle-horizontalline'}) el = self.append_child('text:p', attrib={ 'text:style-name': 'rststyle-centeredtextbody'}) el1 = etree.SubElement(el, 'text:span', attrib={'text:style-name': 'rststyle-strong'}) el1.text = 'Abstract'
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10476, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 10476, 6134, 468, 5666, 10892, 31, 10892, 18, 542, 67, 5129, 1435, 309, 296, 4701, 11, 316, 756, 18, 435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 10476, 12, 2890, 16, 756, 4672, 468, 625, 10304, 2668, 861, 3757, 67, 10476, 6134, 468, 5666, 10892, 31, 10892, 18, 542, 67, 5129, 1435, 309, 296, 4701, 11, 316, 756, 18, 435...
"<Image>/Filters/Render/Clouds/Add _fog...",
"<Image>/Filters/Render/Clouds/Add _Fog...",
def python_foggify(img, layer, name, colour, turbulence, opacity): img.undo_group_start() fog = gimp.Layer(img, name, layer.width, layer.height, RGBA_IMAGE, opacity, NORMAL_MODE) img.add_layer(fog, 0) oldbg = gimp.get_background() gimp.set_background(colour) pdb.gimp_edit_fill(fog, BACKGROUND_FILL) gimp.set_background(oldbg) # create a layer mask for the new layer mask = fog.create_mask(0) fog.add_mask(mask) # add some clouds to the layer pdb.plug_in_plasma(img, mask, int(time.time()), turbulence) # apply the clouds to the layer fog.remove_mask(MASK_APPLY) img.undo_group_end()
fc1bb9ee4103fa75531f13f15265e3196367d063 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/fc1bb9ee4103fa75531f13f15265e3196367d063/foggify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5790, 67, 617, 14253, 1164, 12, 6081, 16, 3018, 16, 508, 16, 15046, 16, 268, 15850, 332, 802, 16, 12636, 4672, 3774, 18, 31226, 67, 1655, 67, 1937, 1435, 225, 284, 717, 273, 314, 14532...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5790, 67, 617, 14253, 1164, 12, 6081, 16, 3018, 16, 508, 16, 15046, 16, 268, 15850, 332, 802, 16, 12636, 4672, 3774, 18, 31226, 67, 1655, 67, 1937, 1435, 225, 284, 717, 273, 314, 14532...
except string.atoi_error: port = None
except string.atoi_error: pass
def connect(self, host, *args): if args: if args[1:]: raise TypeError, 'too many args' port = args[0] else: i = string.find(host, ':') if i >= 0: host, port = host[:i], host[i+1:] try: port = string.atoi(port) except string.atoi_error: port = None if not port: port = HTTP_PORT self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if self.debuglevel > 0: print 'connect:', (host, port) self.sock.connect(host, port)
33e199e042c1ad93a5b73a0f8397c9bf534e02e2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/33e199e042c1ad93a5b73a0f8397c9bf534e02e2/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1479, 16, 380, 1968, 4672, 309, 833, 30, 309, 833, 63, 21, 30, 14542, 1002, 3580, 16, 296, 16431, 4906, 833, 11, 1756, 273, 833, 63, 20, 65, 469, 30, 277, 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, 3077, 12, 2890, 16, 1479, 16, 380, 1968, 4672, 309, 833, 30, 309, 833, 63, 21, 30, 14542, 1002, 3580, 16, 296, 16431, 4906, 833, 11, 1756, 273, 833, 63, 20, 65, 469, 30, 277, 273, ...
data = self.core.get_package_data(pid) lines.append('PACKAGE
data = self.sm.get_package_data(pid) lines.append('PACKAGE
def event_packages(self, args): pids = self.core.get_packages() if len(pids) == 0: return ["INFO: No packages."] lines = [] for pid in pids: data = self.core.get_package_data(pid) lines.append('PACKAGE #%d: %s (%d links)' % (pid, data["package_name"], len(self.core.get_package_files(pid)))) return lines
f6597059303316c4ff1c6e04602082b1c3184c14 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9838/f6597059303316c4ff1c6e04602082b1c3184c14/IRCInterface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 10308, 12, 2890, 16, 833, 4672, 20726, 273, 365, 18, 3644, 18, 588, 67, 10308, 1435, 309, 562, 12, 84, 2232, 13, 422, 374, 30, 327, 8247, 5923, 30, 2631, 5907, 1199, 65, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 10308, 12, 2890, 16, 833, 4672, 20726, 273, 365, 18, 3644, 18, 588, 67, 10308, 1435, 309, 562, 12, 84, 2232, 13, 422, 374, 30, 327, 8247, 5923, 30, 2631, 5907, 1199, 65, 225...
main(sys.argv[1])
main(sys.argv[1])
def main(filename): basename = os.path.basename(filename) # populate the hash table and tag set ht.consume_fasta_and_tag(filename, callback)
6445d513aff8a6a3ce836d4610e82cdd8316b62c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/6445d513aff8a6a3ce836d4610e82cdd8316b62c/get-occupancy2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 3459, 4672, 4882, 273, 1140, 18, 803, 18, 13909, 12, 3459, 13, 225, 468, 6490, 326, 1651, 1014, 471, 1047, 444, 14049, 18, 21224, 67, 13294, 67, 464, 67, 2692, 12, 3459, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 3459, 4672, 4882, 273, 1140, 18, 803, 18, 13909, 12, 3459, 13, 225, 468, 6490, 326, 1651, 1014, 471, 1047, 444, 14049, 18, 21224, 67, 13294, 67, 464, 67, 2692, 12, 3459, 16, ...
"Change view to our model's home view (for glpane's current part)."
""" Change view to our model's home view (for glpane's current part). """
def setViewHome(self): "Change view to our model's home view (for glpane's current part)." self.animateToCsys( self.part.homeCsys)
9dc95351096c9deab5f64e3e704bde7a93f95b49 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/9dc95351096c9deab5f64e3e704bde7a93f95b49/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19923, 8684, 12, 2890, 4672, 3536, 7576, 1476, 358, 3134, 938, 1807, 6382, 1476, 261, 1884, 5118, 29009, 1807, 783, 1087, 2934, 3536, 365, 18, 304, 4988, 774, 39, 9499, 12, 365, 18, 2680...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19923, 8684, 12, 2890, 4672, 3536, 7576, 1476, 358, 3134, 938, 1807, 6382, 1476, 261, 1884, 5118, 29009, 1807, 783, 1087, 2934, 3536, 365, 18, 304, 4988, 774, 39, 9499, 12, 365, 18, 2680...
self.assertTrue(u.fp.fp._sock.gettimeout() is None)
self.assertTrue(u.fp.fp.raw._sock.gettimeout() is None)
def test_ftp_basic(self): u = urllib2.urlopen("ftp://ftp.mirror.nl/pub/mirror/gnu/") self.assertTrue(u.fp.fp._sock.gettimeout() is None)
9834ba99773dc9627749f716d360358387ae516b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/9834ba99773dc9627749f716d360358387ae516b/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 13240, 12, 2890, 4672, 582, 273, 11527, 22, 18, 295, 18589, 2932, 11727, 2207, 11727, 18, 27197, 18, 14039, 19, 10174, 19, 27197, 19, 1600, 89, 4898, 13, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 11727, 67, 13240, 12, 2890, 4672, 582, 273, 11527, 22, 18, 295, 18589, 2932, 11727, 2207, 11727, 18, 27197, 18, 14039, 19, 10174, 19, 27197, 19, 1600, 89, 4898, 13, 365, 18, ...
setting.EMAIL_SUBJECT_PREFIX + (_("Configuration for %s/%s") % (d['hostname'], d['ip'])),
settings.EMAIL_SUBJECT_PREFIX + (_("Configuration for %s/%s") % (d['hostname'], d['ip'])),
def generate_image(d): """ Generates an image accoording to given configuration. """ logging.debug(repr(d)) if d['imagebuilder'] not in IMAGEBUILDERS: raise Exception("Invalid imagebuilder specified!") x = OpenWrtConfig() x.setUUID(d['uuid']) x.setOpenwrtVersion(d['openwrt_ver']) x.setArch(d['arch']) x.setPortLayout(d['port_layout']) x.setWifiIface(d['iface_wifi'], d['driver'], d['channel']) x.setWifiAnt(d['rx_ant'], d['tx_ant']) x.setLanIface(d['iface_lan']) x.setNodeType("adhoc") x.setPassword(d['root_pass']) x.setHostname(d['hostname']) x.setIp(d['ip']) x.setSSID(d['ssid']) # Add WAN interface and all subnets if d['wan_dhcp']: x.addInterface("wan", d['iface_wan'], init = True) else: x.addInterface("wan", d['iface_wan'], d['wan_ip'], d['wan_cidr'], d['wan_gw'], init = True) for subnet in d['subnets']: x.addSubnet(str(subnet['iface']), str(subnet['network']), subnet['cidr'], subnet['dhcp'], True) x.setCaptivePortal(d['captive_portal']) if d['vpn']: x.setVpn(d['vpn_username'], d['vpn_password'], d['vpn_mac'], d['vpn_limit']) if d['lan_wifi_bridge']: x.enableLanWifiBridge() if d['lan_wan_switch']: x.switchWanToLan() # Add optional packages for package in d['opt_pkg']: x.addPackage(package) # Cleanup stuff from previous builds os.chdir(WORKDIR) os.system("rm -rf build/files/*") os.system("rm -rf build/%s/bin/*" % d['imagebuilder']) os.mkdir("build/files/etc") x.generate("build/files/etc") if d['only_config']: # Just pack configuration and send it prefix = hashlib.md5(os.urandom(32)).hexdigest()[0:16] tempfile = os.path.join(DESTINATION, prefix + "-config.zip") zip = ZipFile(tempfile, 'w', ZIP_DEFLATED) os.chdir('build/files') for root, dirs, files in os.walk("etc"): for file in files: zip.write(os.path.join(root, file)) zip.close() # Generate checksum f = open(tempfile, 'r') checksum = hashlib.md5(f.read()) f.close() # We can take just first 22 characters as checksums are fixed size and we can reconstruct it filechecksum = urlsafe_b64encode(checksum.digest())[:22] checksum = checksum.hexdigest() result = "%s-%s-config-%s.zip" % (d['hostname'], d['router_name'], filechecksum) destination = os.path.join(DESTINATION, result) os.rename(tempfile, destination) # Send an e-mail t = loader.get_template('generator/email_config.txt') c = Context({ 'hostname' : d['hostname'], 'ip' : d['ip'], 'username' : d['vpn_username'], 'config' : result, 'checksum' : checksum, 'network' : { 'name' : settings.NETWORK_NAME, 'contact' : settings.NETWORK_CONTACT, 'description' : getattr(settings, 'NETWORK_DESCRIPTION', None) } }) send_mail( setting.EMAIL_SUBJECT_PREFIX + (_("Configuration for %s/%s") % (d['hostname'], d['ip'])), t.render(c), settings.EMAIL_IMAGE_GENERATOR_SENDER, [d['email']], fail_silently = False ) else: # Generate full image x.build("build/%s" % d['imagebuilder']) # Read image version try: f = open(glob('%s/build/%s/build_dir/target-*/root-*/etc/version' % (WORKDIR, d['imagebuilder']))[0], 'r') version = f.read().strip().replace('.', '_') f.close() except: version = 'unknown' # Get resulting image files = [] for file, type in d['imagefiles']: file = str(file) source = "%s/build/%s/bin/%s" % (WORKDIR, d['imagebuilder'], file) f = open(source, 'r') checksum = hashlib.md5(f.read()) f.close() # We can take just first 22 characters as checksums are fixed size and we can reconstruct it filechecksum = urlsafe_b64encode(checksum.digest())[:22] checksum = checksum.hexdigest() ext = os.path.splitext(file)[1] result = "%s-%s-%s%s-%s%s" % (d['hostname'], d['router_name'], version, ("-%s" % type if type else ""), filechecksum, ext) destination = os.path.join(DESTINATION, result) os.rename(source, destination) files.append({ 'name' : result, 'checksum' : checksum }) # Send an e-mail t = loader.get_template('generator/email.txt') c = Context({ 'hostname' : d['hostname'], 'ip' : d['ip'], 'username' : d['vpn_username'], 'files' : files, 'network' : { 'name' : settings.NETWORK_NAME, 'contact' : settings.NETWORK_CONTACT, 'description' : getattr(settings, 'NETWORK_DESCRIPTION', None) } }) send_mail( settings.EMAIL_SUBJECT_PREFIX + (_("Router images for %s/%s") % (d['hostname'], d['ip'])), t.render(c), settings.EMAIL_IMAGE_GENERATOR_SENDER, [d['email']], fail_silently = False )
6c450d9787ea656fd345ef6dc1ad51ec3071a894 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11345/6c450d9787ea656fd345ef6dc1ad51ec3071a894/gennyd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 12, 72, 4672, 3536, 31902, 392, 1316, 4078, 83, 517, 310, 358, 864, 1664, 18, 3536, 2907, 18, 4148, 12, 12715, 12, 72, 3719, 225, 309, 302, 3292, 2730, 9574, 3546, 486,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 2730, 12, 72, 4672, 3536, 31902, 392, 1316, 4078, 83, 517, 310, 358, 864, 1664, 18, 3536, 2907, 18, 4148, 12, 12715, 12, 72, 3719, 225, 309, 302, 3292, 2730, 9574, 3546, 486,...
if orientation == ORIENTATION_VERTICAL: vguides.append((image.get_guide_position(guide), guide)) elif orientation == ORIENTATION_HORIZONTAL: hguides.append((image.get_guide_position(guide), guide))
guide_position = image.get_guide_position(guide) if guide_position > 0: if orientation == ORIENTATION_VERTICAL: if guide_position < image.width: vguides.append((guide_position, guide)) elif orientation == ORIENTATION_HORIZONTAL: if guide_position < image.height: hguides.append((guide_position, guide))
def get_guides(image): vguides = [] hguides = [] for guide in GuideIter(image): orientation = image.get_guide_orientation(guide) if orientation == ORIENTATION_VERTICAL: vguides.append((image.get_guide_position(guide), guide)) elif orientation == ORIENTATION_HORIZONTAL: hguides.append((image.get_guide_position(guide), guide)) def position_sort(x, y): return cmp(x[0], y[0]) vguides.sort(position_sort) hguides.sort(position_sort) vguides = [g[1] for g in vguides] hguides = [g[1] for g in hguides] return vguides, hguides
caaf65cc7cdbce1b38dec58b3013377d3827fdcf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/caaf65cc7cdbce1b38dec58b3013377d3827fdcf/py-slice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 14066, 281, 12, 2730, 4672, 331, 14066, 281, 273, 5378, 366, 14066, 281, 273, 5378, 225, 364, 7343, 316, 13018, 2360, 12, 2730, 4672, 9820, 273, 1316, 18, 588, 67, 12118, 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, 14066, 281, 12, 2730, 4672, 331, 14066, 281, 273, 5378, 366, 14066, 281, 273, 5378, 225, 364, 7343, 316, 13018, 2360, 12, 2730, 4672, 9820, 273, 1316, 18, 588, 67, 12118, 67, ...
_keep_alive(state, memo)
def _deepcopy_inst(x, memo): if hasattr(x, '__deepcopy__'): return x.__deepcopy__(memo) if hasattr(x, '__getinitargs__'): args = x.__getinitargs__() _keep_alive(args, memo) args = deepcopy(args, memo) y = apply(x.__class__, args) else: y = _EmptyClass() y.__class__ = x.__class__ memo[id(x)] = y if hasattr(x, '__getstate__'): state = x.__getstate__() _keep_alive(state, memo) else: state = x.__dict__ state = deepcopy(state, memo) if hasattr(y, '__setstate__'): y.__setstate__(state) else: y.__dict__.update(state) return y
b753f6fdd68fd4032afb920a60b37a38ac193bdf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b753f6fdd68fd4032afb920a60b37a38ac193bdf/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 12, 19521, 13, 309, 3859, 12, 92, 16, 4940...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16589, 3530, 67, 8591, 12, 92, 16, 11063, 4672, 309, 3859, 12, 92, 16, 4940, 16589, 3530, 7250, 4672, 327, 619, 16186, 16589, 3530, 972, 12, 19521, 13, 309, 3859, 12, 92, 16, 4940...
"Please shutdown the %s virtual machine before using the %s creator") % (conf.PRODUCTNAME, ) * 3,
"Please shutdown the %s virtual machine before using the %s creator") % ((conf.PRODUCTNAME, ) * 3),
def creator(self): if self.creator_window: self.creator_window.showNormal() return
7ad3529c4ba2d74739be631c50b0db600ef6e64f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1208/7ad3529c4ba2d74739be631c50b0db600ef6e64f/gui_pyqt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11784, 12, 2890, 4672, 309, 365, 18, 20394, 67, 5668, 30, 365, 18, 20394, 67, 5668, 18, 4500, 5506, 1435, 327, 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, 11784, 12, 2890, 4672, 309, 365, 18, 20394, 67, 5668, 30, 365, 18, 20394, 67, 5668, 18, 4500, 5506, 1435, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key]))
mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key]))
def assertDictContainsSubset(self, expected, actual, msg=None): """Checks whether actual is a superset of expected.""" missing = [] mismatched = [] for key, value in expected.iteritems(): if key not in actual: missing.append(key) elif value != actual[key]: mismatched.append('%s, expected: %s, actual: %s' % (key, value, actual[key]))
46cc46af07b3d2e495117f10e591cf1dfc77608e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/46cc46af07b3d2e495117f10e591cf1dfc77608e/case.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 5014, 10846, 20315, 12, 2890, 16, 2665, 16, 3214, 16, 1234, 33, 7036, 4672, 3536, 4081, 2856, 3214, 353, 279, 1169, 21686, 434, 2665, 12123, 3315, 273, 5378, 7524, 11073, 273, 5378, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 5014, 10846, 20315, 12, 2890, 16, 2665, 16, 3214, 16, 1234, 33, 7036, 4672, 3536, 4081, 2856, 3214, 353, 279, 1169, 21686, 434, 2665, 12123, 3315, 273, 5378, 7524, 11073, 273, 5378, ...
re.MULTILINE, *flags),
re.MULTILINE | flags),
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)
a3b63ec494930ca0c304e5abc50083120d755f64 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/a3b63ec494930ca0c304e5abc50083120d755f64/sagedoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 296, 2892, 291, 1383, 11, 316, 389, 3072, 67, 4816, 67, 280, 67, 2434, 2668, 4816, 2187, 10731, 380, 536, 17014, 2187, 16592, 33, 8381, 13, 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, 0, 0, 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, 272, 410, 30, 296, 2892, 291, 1383, 11, 316, 389, 3072, 67, 4816, 67, 280, 67, 2434, 2668, 4816, 2187, 10731, 380, 536, 17014, 2187, 16592, 33, 8381, 13, 2, -100, -100, -100, -100, -100, -10...
def compute_seller_costs_summed(self, cr, uid, ids):ach_pay_id
def compute_seller_costs_summed(self, cr, uid, ids):
def compute_seller_costs_summed(self, cr, uid, ids):ach_pay_id taxes = self.compute_seller_costs(cr, uid, ids) taxes_summed = {} for tax in taxes: if tax['type'] == 1: tax['id'] = 0
35190ce5af3219450c07fafc2256dace1cc5fde9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/35190ce5af3219450c07fafc2256dace1cc5fde9/auction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 1786, 749, 67, 12398, 87, 67, 1364, 2937, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 5320, 281, 273, 365, 18, 9200, 67, 1786, 749, 67, 12398, 87, 12, 3353, 16, 4555, 16,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 67, 1786, 749, 67, 12398, 87, 67, 1364, 2937, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 4672, 5320, 281, 273, 365, 18, 9200, 67, 1786, 749, 67, 12398, 87, 12, 3353, 16, 4555, 16,...
tool = "mkisofs"
tool = "genisoimage"
def conduct(self): CheckDiskspaceTask(self) if self.project.settings.authormode.getValue().startswith("menu") or self.menupreview: Menus(self) if self.project.settings.titlesetmode.getValue() == "multi": CreateAuthoringXML_multiset(self) else: CreateAuthoringXML_singleset(self)
1ea870d755b410caec369b416b33899bcb359a7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6652/1ea870d755b410caec369b416b33899bcb359a7c/Process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 1828, 12, 2890, 4672, 2073, 6247, 2981, 2174, 12, 2890, 13, 309, 365, 18, 4406, 18, 4272, 18, 1944, 535, 390, 18, 24805, 7675, 17514, 1918, 2932, 5414, 7923, 578, 365, 18, 27617, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 356, 1828, 12, 2890, 4672, 2073, 6247, 2981, 2174, 12, 2890, 13, 309, 365, 18, 4406, 18, 4272, 18, 1944, 535, 390, 18, 24805, 7675, 17514, 1918, 2932, 5414, 7923, 578, 365, 18, 27617, ...
def _pprint_var_value(self, var, multiline=1):
def _pprint_var_value(self, var, multiline=1, summary_linelen=0):
def _pprint_var_value(self, var, multiline=1): if not var.has_value(): return '' val = var.uid().value()
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 273, ...
direction : {'x', 'y', 'z'}
direction: {'x', 'y', 'z'}
def truncate_along_axis(h, s, direction, centers_ic, cutoff): """Truncate h and s such along a cartesian axis. Parameters ========== h : (N, N) ndarray Hamiltonian matrix. s : (N, N) ndarray Overlap matrix. direction : {'x', 'y', 'z'} Truncate allong a cartesian axis. centers_ic : (N, 3) ndarray Centers of the basis functions. cutoff : float The (direction-axis projected) cutoff distance. """ dtype = h.dtype ni = len(centers_ic) d = 'xyz'.index(direction) pos_i = centers_ic[:, d] for i in range(ni): dpos_i = abs(pos_i - pos_i[i]) mask_i = (dpos_i < cutoff).astype(dtype) h[i, :] *= mask_i h[:, i] *= mask_i s[i, :] *= mask_i s[:, i] *= mask_i
f9860890196db1f763e532a4f4a35f7ea080fa6f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/f9860890196db1f763e532a4f4a35f7ea080fa6f/siesta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10310, 67, 287, 932, 67, 4890, 12, 76, 16, 272, 16, 4068, 16, 17723, 67, 335, 16, 13383, 4672, 3536, 25871, 366, 471, 272, 4123, 7563, 279, 24549, 2654, 18, 7012, 422, 1432, 366, 294, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10310, 67, 287, 932, 67, 4890, 12, 76, 16, 272, 16, 4068, 16, 17723, 67, 335, 16, 13383, 4672, 3536, 25871, 366, 471, 272, 4123, 7563, 279, 24549, 2654, 18, 7012, 422, 1432, 366, 294, ...
final_date = month+year code1='-'.join([camp_code, seq]) result[pro_id]=code1 i +=1
final_date = month + year code1 = '-'.join([camp_code, seq]) result[pro_id] = code1 i += 1
def _proposition_code(self, cr, uid, ids, name, args, context={}): result ={} for id in ids: pro = self.browse(cr,uid,[id])[0] pro_ids = self.search(cr,uid,[('camp_id','=',pro.camp_id.id)]) i=1 for pro_id in pro_ids: camp_code = pro.camp_id.code1 or '' offer_code = pro.camp_id.offer_id and pro.camp_id.offer_id.code or '' trademark_code = pro.camp_id.trademark_id and pro.camp_id.trademark_id.name or '' dealer_code =pro.camp_id.dealer_id and pro.camp_id.dealer_id.ref or '' date_start = pro.date_start or '' date = date_start.split('-') year = month = '' if len(date)==3: year = date[0][2:] month = date[1] country_code = pro.camp_id.country_id.code or '' seq = '%%0%sd' % 2 % i final_date = month+year code1='-'.join([camp_code, seq]) result[pro_id]=code1 i +=1 return result
7ee897432c7e7d5a5c8e889fc429c3c1b66627fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/7ee897432c7e7d5a5c8e889fc429c3c1b66627fd/dm_campaign.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 685, 3276, 67, 710, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 12938, 4672, 563, 273, 2916, 364, 612, 316, 3258, 30, 450, 273, 365, 18, 25731, 12, 3353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 685, 3276, 67, 710, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 833, 16, 819, 12938, 4672, 563, 273, 2916, 364, 612, 316, 3258, 30, 450, 273, 365, 18, 25731, 12, 3353, ...
self.fillList (os.getcwd ())
self.fillList (fullPath)
def downdir (self, dirName): self.model.clearDirFilter () os.chdir (dirName) self.view.clearScreen () self.selectedItem = 0 self.fillList (os.getcwd ()) self.afterDirChange ()
5f003fa66305ac8935c5608a773efc5e9baee6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9028/5f003fa66305ac8935c5608a773efc5e9baee6db/candy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2588, 1214, 261, 2890, 16, 20878, 4672, 365, 18, 2284, 18, 8507, 1621, 1586, 1832, 1140, 18, 343, 1214, 261, 1214, 461, 13, 365, 18, 1945, 18, 8507, 7956, 1832, 365, 18, 8109, 1180, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2588, 1214, 261, 2890, 16, 20878, 4672, 365, 18, 2284, 18, 8507, 1621, 1586, 1832, 1140, 18, 343, 1214, 261, 1214, 461, 13, 365, 18, 1945, 18, 8507, 7956, 1832, 365, 18, 8109, 1180, 27...
jobDB.setJobParameter(jobID,str(jobsParameterDict[jobID][0]),str(jobsParameterDict[jobID][0]))
jobDB.setJobParameter(jobID,str(jobsParameterDict[jobID][0]),str(jobsParameterDict[jobID][1]))
def export_setJobsParameter(self,jobsParameterDict): """ Set arbitrary parameter specified by name/value pair for job specified by its JobId """ for jobID in jobsParameterDict: jobDB.setJobParameter(jobID,str(jobsParameterDict[jobID][0]),str(jobsParameterDict[jobID][0])) return S_OK()
f87c17c7f840eaa34f5573c79aa186d48aad7d4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/f87c17c7f840eaa34f5573c79aa186d48aad7d4f/JobStateUpdateHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 542, 7276, 1662, 12, 2890, 16, 10088, 1662, 5014, 4672, 3536, 1000, 11078, 1569, 1269, 635, 508, 19, 1132, 3082, 364, 1719, 1269, 635, 2097, 30455, 3536, 364, 28913, 316, 6550, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 542, 7276, 1662, 12, 2890, 16, 10088, 1662, 5014, 4672, 3536, 1000, 11078, 1569, 1269, 635, 508, 19, 1132, 3082, 364, 1719, 1269, 635, 2097, 30455, 3536, 364, 28913, 316, 6550, ...
class ProxyAudioProducer(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ProxyAudioProducer, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ProxyAudioProducer, name) __repr__ = _swig_repr def __init__(self): if self.__class__ == ProxyAudioProducer:
class ProxyAudioProducerCallback(_object): __swig_setmethods__ = {} __setattr__ = lambda self, name, value: _swig_setattr(self, ProxyAudioProducerCallback, name, value) __swig_getmethods__ = {} __getattr__ = lambda self, name: _swig_getattr(self, ProxyAudioProducerCallback, name) __repr__ = _swig_repr def __init__(self): if self.__class__ == ProxyAudioProducerCallback:
def getContent(self, *args): return _tinyWRAP.ProxyVideoFrame_getContent(self, *args)
2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5606/2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a/tinyWRAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5154, 12, 2890, 16, 380, 1968, 4672, 327, 389, 88, 11652, 27664, 18, 3886, 10083, 3219, 67, 588, 1350, 12, 2890, 16, 380, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 5154, 12, 2890, 16, 380, 1968, 4672, 327, 389, 88, 11652, 27664, 18, 3886, 10083, 3219, 67, 588, 1350, 12, 2890, 16, 380, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
ret = ret + "User-agent: "+agent+"\n"
ret.extend(["User-agent: ", agent, "\n"])
def __str__(self): ret = "" for agent in self.useragents: ret = ret + "User-agent: "+agent+"\n" for line in self.rulelines: ret = ret + str(line) + "\n" return ret
ab0c902651fa0f64a798188c212ce6d4150a138b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/ab0c902651fa0f64a798188c212ce6d4150a138b/robotparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 325, 273, 1408, 364, 4040, 316, 365, 18, 1355, 23560, 30, 325, 18, 14313, 3816, 6, 1299, 17, 5629, 30, 3104, 4040, 16, 1548, 82, 6, 5717, 364, 980, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 325, 273, 1408, 364, 4040, 316, 365, 18, 1355, 23560, 30, 325, 18, 14313, 3816, 6, 1299, 17, 5629, 30, 3104, 4040, 16, 1548, 82, 6, 5717, 364, 980, 31...
rc, nf, x = minimize(function, [-7, 3], bounds=([-10, 10], [1, 10]))
rc, nf, x = fmin_tnc(function, [-7, 3], bounds=([-10, 10], [1, 10]))
def function(x): f = pow(x[0],2.0)+pow(abs(x[1]),3.0) g = [0,0] g[0] = 2.0*x[0] g[1] = 3.0*pow(abs(x[1]),2.0) if x[1]<0: g[1] = -g[1] return f, g
3138646cae18d97c5f5303e1ff1e0679b7fa2422 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/3138646cae18d97c5f5303e1ff1e0679b7fa2422/tnc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 445, 12, 92, 4672, 284, 273, 7602, 12, 92, 63, 20, 6487, 22, 18, 20, 27921, 23509, 12, 5113, 12, 92, 63, 21, 65, 3631, 23, 18, 20, 13, 314, 273, 306, 20, 16, 20, 65, 314, 63, 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, 445, 12, 92, 4672, 284, 273, 7602, 12, 92, 63, 20, 6487, 22, 18, 20, 27921, 23509, 12, 5113, 12, 92, 63, 21, 65, 3631, 23, 18, 20, 13, 314, 273, 306, 20, 16, 20, 65, 314, 63, 2...
set_cache_size(n)
context.cache_size = n
def set_cache_size(n): context.cache_size = n
23f269a2a35d4ee23c1812127248add0d9faca4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3681/23f269a2a35d4ee23c1812127248add0d9faca4b/decode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2493, 67, 1467, 12, 82, 4672, 819, 18, 2493, 67, 1467, 273, 290, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2493, 67, 1467, 12, 82, 4672, 819, 18, 2493, 67, 1467, 273, 290, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
scapy_module = sys.argv[0]
scapy_module = sys.argv[0][sys.argv[0].rfind("/")+1:]
def usage(): print "Usage: scapy.py [-s sessionfile]" sys.exit(0)
359ae3885f5f27a929d383ce2de3f365016c7d53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/359ae3885f5f27a929d383ce2de3f365016c7d53/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 315, 5357, 30, 888, 438, 93, 18, 2074, 23059, 87, 1339, 768, 4279, 2589, 18, 8593, 12, 20, 13, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
{ None : flavorFilter })
{ None : [ flavorFilter ] })
def getTroveVersionList(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {}
b1993e39d4684904f19500f71115359420e862a5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/b1993e39d4684904f19500f71115359420e862a5/netserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3181, 303, 537, 1444, 682, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 23432, 537, 461, 2340, 842, 1383, 16, 19496, 1586, 273, 599, 4672, 309, 1004, 1444, 1545, 10213, 30, 23432, 537, 1586,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3181, 303, 537, 1444, 682, 12, 2890, 16, 24050, 16, 1004, 1444, 16, 23432, 537, 461, 2340, 842, 1383, 16, 19496, 1586, 273, 599, 4672, 309, 1004, 1444, 1545, 10213, 30, 23432, 537, 1586,...
output = run_command(dcommit_command, error_handler=commit_error_handler)
output = self.run(dcommit_command, error_handler=commit_error_handler)
def push_local_commits_to_server(self): dcommit_command = ['git', 'svn', 'dcommit'] if self.dryrun: dcommit_command.append('--dry-run') output = run_command(dcommit_command, error_handler=commit_error_handler) # Return a string which looks like a commit so that things which parse this output will succeed. if self.dryrun: output += "\nCommitted r0" return output
85996a2e77defe11a90714e19a7eb1523a0e8092 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/85996a2e77defe11a90714e19a7eb1523a0e8092/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1817, 67, 3729, 67, 27000, 67, 869, 67, 3567, 12, 2890, 4672, 302, 7371, 67, 3076, 273, 10228, 6845, 2187, 296, 31505, 2187, 296, 72, 7371, 3546, 309, 365, 18, 25011, 2681, 30, 302, 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, 1817, 67, 3729, 67, 27000, 67, 869, 67, 3567, 12, 2890, 4672, 302, 7371, 67, 3076, 273, 10228, 6845, 2187, 296, 31505, 2187, 296, 72, 7371, 3546, 309, 365, 18, 25011, 2681, 30, 302, 73...
client_file = join(package_subdirectory, '%s.py' %client_mod) types_file = join(package_subdirectory, '%s.py' %types_mod)
client_file = os.path.join(package_subdirectory, '%s.py' %client_mod) types_file = os.path.join(package_subdirectory, '%s.py' %types_mod)
def load_wsdl_with_config(wsdlList): """load_wsdl_with_config(wsdlList: list of urls) -> (bool,list) This loads the wsdl list creating config files. Returns a tuple with two values. The first is a boolean that is True in case of success. The second is a list with problematic urls""" global schema global webServicesmodulesDict global complexsdict reg = core.modules.module_registry basic = core.modules.basic_modules not_loaded = [] result = True for w in wsdlList: #Validation if the user introduces a blank space in the list of #web services if w == '': continue complexsdict = {} #This dictionary stores the complex types for #a webservice w w = w.strip() #Check to see if the element is not repeated in the web services list numtimes = 0 for element in wsdlList: if w == element.strip(): numtimes = numtimes + 1 if numtimes > 1: print "The following web service is repeated in the list and won't \
0c5590653003ef890fc2b553c33c847bebe31a74 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/0c5590653003ef890fc2b553c33c847bebe31a74/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4749, 5761, 67, 1918, 67, 1425, 12, 4749, 5761, 682, 4672, 3536, 945, 67, 4749, 5761, 67, 1918, 67, 1425, 12, 4749, 5761, 682, 30, 666, 434, 6903, 13, 317, 261, 6430, 16, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 4749, 5761, 67, 1918, 67, 1425, 12, 4749, 5761, 682, 4672, 3536, 945, 67, 4749, 5761, 67, 1918, 67, 1425, 12, 4749, 5761, 682, 30, 666, 434, 6903, 13, 317, 261, 6430, 16, 1...
test_mesg = 'From: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)s' % {'user':USER, 'lf':CRLF}
test_mesg = 'From: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)s' % {'user':USER, 'lf':'\n'}
def Time2Internaldate(date_time): """Convert 'date_time' to IMAP4 INTERNALDATE representation. Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"' """ if isinstance(date_time, (int, float)): tt = time.localtime(date_time) elif isinstance(date_time, (tuple, time.struct_time)): tt = date_time elif isinstance(date_time, str) and (date_time[0],date_time[-1]) == ('"','"'): return date_time # Assume in correct format else: raise ValueError("date_time not of a known type") dt = time.strftime("%d-%b-%Y %H:%M:%S", tt) if dt[0] == '0': dt = ' ' + dt[1:] if time.daylight and tt[-1]: zone = -time.altzone else: zone = -time.timezone return '"' + dt + " %+03d%02d" % divmod(zone/60, 60) + '"'
47404fffff3e36699786082d0ee6565872d627e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/47404fffff3e36699786082d0ee6565872d627e1/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2647, 22, 3061, 712, 12, 712, 67, 957, 4672, 225, 3536, 2723, 296, 712, 67, 957, 11, 358, 6246, 2203, 24, 18139, 4594, 4335, 18, 225, 2000, 533, 316, 646, 30, 2119, 5698, 17, 49, 702...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2647, 22, 3061, 712, 12, 712, 67, 957, 4672, 225, 3536, 2723, 296, 712, 67, 957, 11, 358, 6246, 2203, 24, 18139, 4594, 4335, 18, 225, 2000, 533, 316, 646, 30, 2119, 5698, 17, 49, 702...
raise IncompleteRead(value)
raise IncompleteRead(b''.join(value))
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = b""
5a86acb6d643dd798673dbc59f314952a4514b17 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/5a86acb6d643dd798673dbc59f314952a4514b17/client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 324, 3660, 2, -100, -100, -100, ...
else:
elif (i + 1) < n:
def goahead(self, end): rawdata = self.rawdata i = 0 n = len(rawdata) while i < n: match = self.interesting.search(rawdata, i) # < or & if match: j = match.start() else: j = n if i < j: self.handle_data(rawdata[i:j]) i = self.updatepos(i, j) if i == n: break if rawdata[i] == '<': if starttagopen.match(rawdata, i): # < + letter k = self.parse_starttag(i) elif endtagopen.match(rawdata, i): # </ k = self.parse_endtag(i) if k >= 0: self.clear_cdata_mode() elif commentopen.match(rawdata, i): # <!-- k = self.parse_comment(i) elif piopen.match(rawdata, i): # <? k = self.parse_pi(i) elif declopen.match(rawdata, i): # <! k = self.parse_declaration(i) else: self.handle_data("<") k = i + 1 if k < 0: if end: raise HTMLParseError("EOF in middle of construct", self.getpos()) break i = self.updatepos(i, k) elif rawdata[i] == '&': match = charref.match(rawdata, i) if match: name = match.group()[2:-1] self.handle_charref(name) k = match.end() if rawdata[k-1] != ';': k = k - 1 i = self.updatepos(i, k) continue match = entityref.match(rawdata, i) if match: name = match.group(1) self.handle_entityref(name) k = match.end() if rawdata[k-1] != ';': k = k - 1 i = self.updatepos(i, k) continue match = incomplete.match(rawdata, i) if match: rest = rawdata[i:] if end and rest != "&" and match.group() == rest: raise HTMLParseError( "EOF in middle of entity or char ref", self.getpos()) return -1 # incomplete self.handle_data("&") i = self.updatepos(i, i + 1) else: assert 0, "interesting.search() lied" # end while if end and i < n: self.handle_data(rawdata[i:n]) i = self.updatepos(i, n) self.rawdata = rawdata[i:]
68eac2b574ed837099998d68ea592d02bd8ca129 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/68eac2b574ed837099998d68ea592d02bd8ca129/HTMLParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1960, 11617, 12, 2890, 16, 679, 4672, 1831, 892, 273, 365, 18, 1899, 892, 277, 273, 374, 290, 273, 562, 12, 1899, 892, 13, 1323, 277, 411, 290, 30, 845, 273, 365, 18, 2761, 10100, 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, 1960, 11617, 12, 2890, 16, 679, 4672, 1831, 892, 273, 365, 18, 1899, 892, 277, 273, 374, 290, 273, 562, 12, 1899, 892, 13, 1323, 277, 411, 290, 30, 845, 273, 365, 18, 2761, 10100, 18...
path = os.path.join(os.path.dirname(__file__), 'getinvolved.html') self.response.out.write(template.render(path, template_values))
self.render_template('getinvolved.html', template_values)
def get(self): user = util.get_current_user() user_data = UserData.get_for_current_user() logout_url = users.create_logout_url(self.request.uri) template_values = qa.add_template_values({'App': App, 'points': user_data.points, 'username': user and user.nickname() or "", 'login_url': util.create_login_url(self.request.uri), 'logout_url': logout_url}, self.request) path = os.path.join(os.path.dirname(__file__), 'getinvolved.html') self.response.out.write(template.render(path, template_values))
6d878f00e096131e1d877c83bff8ce52b7d25231 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12010/6d878f00e096131e1d877c83bff8ce52b7d25231/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 12735, 67, 718, 273, 3677, 18, 2640, 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, 12, 2890, 4672, 729, 273, 1709, 18, 588, 67, 2972, 67, 1355, 1435, 729, 67, 892, 273, 31109, 18, 588, 67, 1884, 67, 2972, 67, 1355, 1435, 12735, 67, 718, 273, 3677, 18, 2640, 67...
Check if the user is owner of the record, i.e. he is the submitter
Check if the user is owner of the record, i.e. he is the submitter
def is_user_owner_of_record(user_info, recid): """ Check if the user is owner of the record, i.e. he is the submitter and/or belongs to a owner-like group authorized to 'see' the record. @param user_info: the user_info dictionary that describe the user. @type user_info: user_info dictionary @param recid: the record identifier. @type recid: positive integer @return: True if the user is 'owner' of the record; False otherwise @rtype: bool """ authorized_emails_or_group = [] for tag in CFG_ACC_GRANT_AUTHOR_RIGHTS_TO_EMAILS_IN_TAGS: authorized_emails_or_group.extend(get_fieldvalues(recid, tag)) for email_or_group in authorized_emails_or_group: if email_or_group in user_info['group']: return True email = email_or_group.strip().lower() if user_info['email'].strip().lower() == email: return True return False
ef72285e273b16ea742043ae2c63c3528f3e59bf /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2139/ef72285e273b16ea742043ae2c63c3528f3e59bf/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1355, 67, 8443, 67, 792, 67, 3366, 12, 1355, 67, 1376, 16, 1950, 350, 4672, 3536, 2073, 309, 326, 729, 353, 3410, 434, 326, 1409, 16, 277, 18, 73, 18, 3904, 353, 326, 4879, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 1355, 67, 8443, 67, 792, 67, 3366, 12, 1355, 67, 1376, 16, 1950, 350, 4672, 3536, 2073, 309, 326, 729, 353, 3410, 434, 326, 1409, 16, 277, 18, 73, 18, 3904, 353, 326, 4879, ...
task = self.req.get_task(task_id) for tag in task.get_tags(): tasks_count = tag.get_tasks_nbr(workview=self.workview) if tasks_count <= 1: tag_name = tag.get_name() if tag_name in self.displayed: self.row_deleted(self.displayed[tag_name]) self.displayed.pop(tag_name) self._update_tag_from_name(self.req.get_alltag_tag().get_name()) self._update_tag_from_name(self.req.get_notag_tag().get_name()) def _update_tag_from_name(self, name): ''' Helper method to update a row, given the name of the tag ''' self.row_changed(*self._path_iter_from_tag_name(name))
self._update_all_tasks_and_no_tags() self.update_tags_for_task(task_id) def on_task_modified(self, sender, task_id): ''' This method handles the modification of tasks ''' self.update_tags_for_task(task_id)
def update_tag_task_deleted(self, sender, task_id): ''' This method handles the deleting of tasks, updating the "All task" entry in the tag pane and the "No tags" ''' task = self.req.get_task(task_id) for tag in task.get_tags(): tasks_count = tag.get_tasks_nbr(workview=self.workview) if tasks_count <= 1: tag_name = tag.get_name() if tag_name in self.displayed: self.row_deleted(self.displayed[tag_name]) self.displayed.pop(tag_name) self._update_tag_from_name(self.req.get_alltag_tag().get_name()) self._update_tag_from_name(self.req.get_notag_tag().get_name())
c8fbddaf26ab19611f3055231e3df9deeb20cb28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c8fbddaf26ab19611f3055231e3df9deeb20cb28/tagtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2692, 67, 4146, 67, 8600, 12, 2890, 16, 5793, 16, 1562, 67, 350, 4672, 9163, 1220, 707, 7372, 326, 12993, 434, 4592, 16, 9702, 326, 315, 1595, 1562, 6, 1241, 316, 326, 1047, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 2692, 67, 4146, 67, 8600, 12, 2890, 16, 5793, 16, 1562, 67, 350, 4672, 9163, 1220, 707, 7372, 326, 12993, 434, 4592, 16, 9702, 326, 315, 1595, 1562, 6, 1241, 316, 326, 1047, ...
print 'GROPE_STATUS: ', print (status, testname, reason) self.tests.append(test(testname, status, reason, self.kernel, self))
dprint('GROPE_STATUS: '+str((status, testname, reason))) self.tests.append(test(testname, status, reason, self.kernel, self))
def grope_status(self): # HACK. we don't have proper build tags in the status file yet # so we hardcode build/ and do it at the start of the job build = os.path.join(self.dir, 'build') if os.path.exists(build): self.kernel = kernel(build)
e645fb6fdecbbcb8353b7ece9c2c8fb1f34fc879 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/e645fb6fdecbbcb8353b7ece9c2c8fb1f34fc879/parse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 303, 347, 67, 2327, 12, 2890, 4672, 468, 670, 3649, 18, 732, 2727, 1404, 1240, 5338, 1361, 2342, 316, 326, 1267, 585, 4671, 468, 1427, 732, 7877, 710, 1361, 19, 471, 741, 518, 622...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 314, 303, 347, 67, 2327, 12, 2890, 4672, 468, 670, 3649, 18, 732, 2727, 1404, 1240, 5338, 1361, 2342, 316, 326, 1267, 585, 4671, 468, 1427, 732, 7877, 710, 1361, 19, 471, 741, 518, 622...
if self._checkNFS(dirs, image_extensions):
if self._checkNFS(dirs, image_extensions):
def validate_setVariables(self, args): """Validate the contents of specific configuration variables return False and exit the script if an invalid configuation value is found """ # Fix all variables which were changed by a users configuration files # to 'None', 'False' and 'True' literals back to their intended values keys=self.config.keys() types={'None': None, 'False': False, 'True': True} for key in keys: for literal in types.keys(): if self.config[key] == literal: self.config[key] = types[literal]
6089d4d60f2dab84c6af9981c242684b162de38e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/6089d4d60f2dab84c6af9981c242684b162de38e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 542, 6158, 12, 2890, 16, 833, 4672, 3536, 4270, 326, 2939, 434, 2923, 1664, 3152, 327, 1083, 471, 2427, 326, 2728, 309, 392, 2057, 642, 11407, 460, 353, 1392, 3536, 468, 12139,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 542, 6158, 12, 2890, 16, 833, 4672, 3536, 4270, 326, 2939, 434, 2923, 1664, 3152, 327, 1083, 471, 2427, 326, 2728, 309, 392, 2057, 642, 11407, 460, 353, 1392, 3536, 468, 12139,...
permission = pm.get(k.lower(), k)
permission = permission_mapping.get(tag.lower(), tag)
def getPermissionsDefinitions(self): """ \ returns a list of dictionaries. Each dict contains a key 'permission' with a string value and a key 'roles' with a list of strings as value. """
74aac3fbd88df8d0fb3fe2e021a7e05a7dbc2f59 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/74aac3fbd88df8d0fb3fe2e021a7e05a7dbc2f59/XMIParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25021, 7130, 12, 2890, 4672, 3536, 521, 1135, 279, 666, 434, 16176, 18, 8315, 2065, 1914, 279, 498, 296, 9827, 11, 598, 279, 533, 460, 471, 279, 498, 296, 7774, 11, 598, 279, 666, 434,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25021, 7130, 12, 2890, 4672, 3536, 521, 1135, 279, 666, 434, 16176, 18, 8315, 2065, 1914, 279, 498, 296, 9827, 11, 598, 279, 533, 460, 471, 279, 498, 296, 7774, 11, 598, 279, 666, 434,...
self.window.move(window_rect.x, window_rect.y)
def show(self): """Shows the main window and grabs the focus on it. """ # setting window in all desktops self.get_widget('window-root').stick()
6f15df5d3f80dd7889e37576f386a402ff155a03 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11147/6f15df5d3f80dd7889e37576f386a402ff155a03/guake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 3536, 24548, 326, 2774, 2742, 471, 3087, 2038, 326, 7155, 603, 518, 18, 3536, 468, 3637, 2742, 316, 777, 21304, 87, 365, 18, 588, 67, 6587, 2668, 5668, 17, 3085, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2405, 12, 2890, 4672, 3536, 24548, 326, 2774, 2742, 471, 3087, 2038, 326, 7155, 603, 518, 18, 3536, 468, 3637, 2742, 316, 777, 21304, 87, 365, 18, 588, 67, 6587, 2668, 5668, 17, 3085, ...
def test_buf_4971(self):
def test_bug_4971(self):
def test_buf_4971(self): # LETTER DZ WITH CARON: DZ, Dz, dz self.assertEqual(u"\u01c4".title(), u"\u01c5") self.assertEqual(u"\u01c5".title(), u"\u01c5") self.assertEqual(u"\u01c6".title(), u"\u01c5")
6ac69466e5c8b4117e7ed9f2e3670d53fab2b797 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/6ac69466e5c8b4117e7ed9f2e3670d53fab2b797/test_unicodedata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 925, 67, 7616, 11212, 12, 2890, 4672, 468, 16367, 463, 62, 13601, 385, 985, 673, 30, 463, 62, 16, 463, 94, 16, 24855, 365, 18, 11231, 5812, 12, 89, 12691, 89, 1611, 71, 24,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 925, 67, 7616, 11212, 12, 2890, 4672, 468, 16367, 463, 62, 13601, 385, 985, 673, 30, 463, 62, 16, 463, 94, 16, 24855, 365, 18, 11231, 5812, 12, 89, 12691, 89, 1611, 71, 24,...
path.extend(os.environ[env_var].split(':'))
paths.extend(os.environ[env_var].split(':'))
def find_files(files, env_var): paths = ['.'] if env_var in os.environ: path.extend(os.environ[env_var].split(':')) for file in files: for path in paths: file_path = path_join(path, file) if os.path.exists(file_path): yield file_path, realpath(file_path) continue raise StopIteration
5c38cbb32c26a19f4ca1adb6f5cbc59f69808bb6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9490/5c38cbb32c26a19f4ca1adb6f5cbc59f69808bb6/starch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2354, 12, 2354, 16, 1550, 67, 1401, 4672, 2953, 273, 10228, 1093, 65, 309, 1550, 67, 1401, 316, 1140, 18, 28684, 30, 2953, 18, 14313, 12, 538, 18, 28684, 63, 3074, 67, 1401, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 2354, 12, 2354, 16, 1550, 67, 1401, 4672, 2953, 273, 10228, 1093, 65, 309, 1550, 67, 1401, 316, 1140, 18, 28684, 30, 2953, 18, 14313, 12, 538, 18, 28684, 63, 3074, 67, 1401, ...
def fl_set_chart_maxnumb(ob, maxnumb): """ fl_set_chart_maxnumb(ob, maxnumb) -> num. """ retval = _fl_set_chart_maxnumb(ob, maxnumb) _fl_set_chart_autosize = cfuncproto(so_libforms, "fl_set_chart_autosize", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_chart_maxnumb(pObject, maxnumb): """ fl_set_chart_maxnumb(pObject, maxnumb) -> num. """ retval = _fl_set_chart_maxnumb(pObject, maxnumb) _fl_set_chart_autosize = cfuncproto(so_libforms, "fl_set_chart_autosize", None, [cty.POINTER(FL_OBJECT), cty.c_int],
def fl_set_chart_maxnumb(ob, maxnumb): """ fl_set_chart_maxnumb(ob, maxnumb) -> num. """ retval = _fl_set_chart_maxnumb(ob, maxnumb)
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11563, 67, 1896, 2107, 70, 12, 947, 16, 943, 2107, 70, 4672, 3536, 1183, 67, 542, 67, 11563, 67, 1896, 2107, 70, 12, 947, 16, 943, 2107, 70, 13, 317, 818, 18, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 11563, 67, 1896, 2107, 70, 12, 947, 16, 943, 2107, 70, 4672, 3536, 1183, 67, 542, 67, 11563, 67, 1896, 2107, 70, 12, 947, 16, 943, 2107, 70, 13, 317, 818, 18, 35...
return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id=%s", context=context)
return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id", context=context)
def get_id(self, cr, uid, sequence_id, test='id=%s', context={}): cr.execute('select id from ir_sequence where '+test+' and active=%s', (sequence_id, True,)) res = cr.dictfetchone() if res: for line in self.browse(cr, uid, res['id'], context=context).fiscal_ids: if line.fiscalyear_id.id==context.get('fiscalyear_id', False): return super(ir_sequence, self).get_id(cr, uid, line.sequence_id.id, test="id=%s", context=context) return super(ir_sequence, self).get_id(cr, uid, sequence_id, test, context)
9955c50c144cd7ea193daf6404069cf5c83ad483 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9955c50c144cd7ea193daf6404069cf5c83ad483/sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3102, 67, 350, 16, 1842, 2218, 350, 5095, 87, 2187, 819, 12938, 4672, 4422, 18, 8837, 2668, 4025, 612, 628, 9482, 67, 6178, 1625, 15126,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3102, 67, 350, 16, 1842, 2218, 350, 5095, 87, 2187, 819, 12938, 4672, 4422, 18, 8837, 2668, 4025, 612, 628, 9482, 67, 6178, 1625, 15126,...
return retval
def parse_MinusDNADR(self, context, operands): retval = self.parse_DNADR(context, operands) words = [] if context.currentRecord.code != None: for i in range(len(context.currentRecord.code)): words.append(~context.currentRecord.code[i]) context.currentRecord.code = words context.currentRecord.complete = True return retval
0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8152/0c60b51cc3a2e291ba9533bb9ab17f2ef2a0018f/directive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 18434, 8609, 1880, 54, 12, 2890, 16, 819, 16, 14883, 4672, 5221, 273, 365, 18, 2670, 67, 8609, 1880, 54, 12, 2472, 16, 14883, 13, 4511, 273, 5378, 309, 819, 18, 2972, 2115, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 18434, 8609, 1880, 54, 12, 2890, 16, 819, 16, 14883, 4672, 5221, 273, 365, 18, 2670, 67, 8609, 1880, 54, 12, 2472, 16, 14883, 13, 4511, 273, 5378, 309, 819, 18, 2972, 2115, ...
Waits until the |function| evalues to True or until |timeout| secs, whichever occurs earlier.
Waits until the |function| evalues to |expect_retval| or until |timeout| secs, whichever occurs earlier.
def WaitUntil(self, function, timeout=-1, retry_sleep=0.25, args=[]): """Poll on a condition until timeout.
91228cf9e257aa62f3e55a2d23dc75a2b99223cb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/91228cf9e257aa62f3e55a2d23dc75a2b99223cb/pyauto.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 9716, 12, 2890, 16, 445, 16, 2021, 29711, 21, 16, 3300, 67, 19607, 33, 20, 18, 2947, 16, 833, 33, 8526, 4672, 3536, 19085, 603, 279, 2269, 3180, 2021, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 9716, 12, 2890, 16, 445, 16, 2021, 29711, 21, 16, 3300, 67, 19607, 33, 20, 18, 2947, 16, 833, 33, 8526, 4672, 3536, 19085, 603, 279, 2269, 3180, 2021, 18, 2, -100, -100, -100, ...
if self.runtime_library_dirs:
if runtime_library_dirs:
def link_shared_object (self, objects, output_filename, output_dir=None, libraries=None, library_dirs=None, runtime_library_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
094421eab07cc20a87b329fe80a874e7eda3f413 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/094421eab07cc20a87b329fe80a874e7eda3f413/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1692, 67, 11574, 67, 1612, 261, 2890, 16, 2184, 16, 876, 67, 3459, 16, 876, 67, 1214, 33, 7036, 16, 14732, 33, 7036, 16, 5313, 67, 8291, 33, 7036, 16, 3099, 67, 12083, 67, 8291, 33, ...
if auth_code == 0 or _is_user_in_authorized_author_list_for_recid(user_info, recid):
if auth_code == 0 or is_user_owner_of_record(user_info, recid):
def check_user_can_view_record(user_info, recid): """ Check if the user is authorized to view the given recid. The function grants access in two cases: either user has author rights on this record, or he has view rights to the primary collection this record belongs to. @param user_info: the user_info dictionary that describe the user. @type user_info: user_info dictionary @param recid: the record identifier. @type recid: positive integer @return: (0, ''), when authorization is granted, (>0, 'message') when authorization is not granted @rtype: (int, string) """ if is_user_owner_of_record(user_info, recid): return (0, '') record_primary_collection = guess_primary_collection_of_a_record(recid) if collection_restricted_p(record_primary_collection): (auth_code, auth_msg) = acc_authorize_action(user_info, VIEWRESTRCOLL, collection=record_primary_collection) if auth_code == 0 or _is_user_in_authorized_author_list_for_recid(user_info, recid): return (0, '') else: return (auth_code, auth_msg) else: return (0, '')
eeb3d92326050ac8e18b5f83470f29a4a5833ff2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12027/eeb3d92326050ac8e18b5f83470f29a4a5833ff2/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1355, 67, 4169, 67, 1945, 67, 3366, 12, 1355, 67, 1376, 16, 1950, 350, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 1476, 326, 864, 1950, 350, 18, 1021, 445, 25638, 2006,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 1355, 67, 4169, 67, 1945, 67, 3366, 12, 1355, 67, 1376, 16, 1950, 350, 4672, 3536, 2073, 309, 326, 729, 353, 10799, 358, 1476, 326, 864, 1950, 350, 18, 1021, 445, 25638, 2006,...
ip = imageplan.ImagePlan(self, progtrack, False)
ip = imageplan.ImagePlan(self, progtrack, lambda x: False)
def repair(self, repairs, progtrack): """Repair any actions in the fmri that failed a verify.""" pps = [] for fmri, actions in repairs: msg("Repairing: %-50s" % fmri.get_pkg_stem()) m = self.get_manifest(fmri, filtered=True) pp = pkgplan.PkgPlan(self, progtrack, False)
adae82c82ba7ba43309a9181320cefad2deea8fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12612/adae82c82ba7ba43309a9181320cefad2deea8fa/image.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20994, 12, 2890, 16, 20994, 87, 16, 11243, 4101, 4672, 3536, 426, 6017, 1281, 4209, 316, 326, 10940, 566, 716, 2535, 279, 3929, 12123, 293, 1121, 273, 5378, 364, 10940, 566, 16, 4209, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20994, 12, 2890, 16, 20994, 87, 16, 11243, 4101, 4672, 3536, 426, 6017, 1281, 4209, 316, 326, 10940, 566, 716, 2535, 279, 3929, 12123, 293, 1121, 273, 5378, 364, 10940, 566, 16, 4209, 31...
'revisions': 'orig ' + ' '.join([i.debian for i in self.versions[::-1]]),
'revisions': 'orig ' + ' '.join([i.revision for i in self.versions[::-1]]),
def do_extra(self, packages, makefile): apply = self.templates['patch.apply']
8712429771683e48ee33cbbe8ca33286cdae9145 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5794/8712429771683e48ee33cbbe8ca33286cdae9145/gencontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7763, 12, 2890, 16, 5907, 16, 1221, 768, 4672, 2230, 273, 365, 18, 8502, 3292, 2272, 18, 9010, 3546, 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, 741, 67, 7763, 12, 2890, 16, 5907, 16, 1221, 768, 4672, 2230, 273, 365, 18, 8502, 3292, 2272, 18, 9010, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def execute(self):
def execute( self ):
def execute(self): res = self.prepareNewReplicas() return res
d68cb60fd991fa9f206177d2794f8d04f940cd00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/d68cb60fd991fa9f206177d2794f8d04f940cd00/RequestPreparationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 400, 273, 365, 18, 9366, 1908, 17248, 1435, 327, 400, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 365, 262, 30, 400, 273, 365, 18, 9366, 1908, 17248, 1435, 327, 400, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
def run(cmd):
def run(cmd, options):
def run(cmd): """Run command in a sub-process, capturing the output (stdout and stderr). Return the exist code, and output.""" # TODO: Use subprocess.Popen if we're running on Python 2.4 if os.name == 'nt' or sys.platform.startswith('java'): tochild, fromchild = os.popen4(cmd) tochild.close() output = fromchild.read() ret = fromchild.close() if ret == None: ret = 0 else: proc = Popen4(cmd) try: output = '' proc.tochild.close() output = proc.fromchild.read() ret = proc.wait() if os.WIFEXITED(ret): ret = os.WEXITSTATUS(ret) except Timeout: vlog('# Process %d timed out - killing it' % proc.pid) os.kill(proc.pid, signal.SIGTERM) ret = proc.wait() if ret == 0: ret = signal.SIGTERM << 8 output += ("\n### Abort: timeout after %d seconds.\n" % options.timeout) return ret, splitnewlines(output)
8148049fb59b4fc3d882a03d84d25cd064415947 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8148049fb59b4fc3d882a03d84d25cd064415947/run-tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4172, 16, 702, 4672, 3536, 1997, 1296, 316, 279, 720, 17, 2567, 16, 28789, 326, 876, 261, 10283, 471, 4514, 2934, 2000, 326, 1005, 981, 16, 471, 876, 12123, 468, 2660, 30, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 4172, 16, 702, 4672, 3536, 1997, 1296, 316, 279, 720, 17, 2567, 16, 28789, 326, 876, 261, 10283, 471, 4514, 2934, 2000, 326, 1005, 981, 16, 471, 876, 12123, 468, 2660, 30, 26...
exts.append( Extension('_Alias', ['alias/_Aliasmodule.c'],
exts.append( Extension('macfs', ['macfsmodule.c', '../Python/getapplbycreator.c'],
def detect_modules(self): # Ensure that /usr/local is always used add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
bc1f5a74849c11691df5d869e4f8617ce8f90688 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bc1f5a74849c11691df5d869e4f8617ce8f90688/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5966, 67, 6400, 12, 2890, 4672, 468, 7693, 716, 342, 13640, 19, 3729, 353, 3712, 1399, 527, 67, 1214, 67, 869, 67, 1098, 12, 2890, 18, 9576, 18, 12083, 67, 8291, 16, 1173, 13640, 19, ...
'''PRIVATE FUNCTION: Resets all active spawnpoint props'''
'''PRIVATE: Resets all active spawnpoint props'''
def __resetProps(self): '''PRIVATE FUNCTION: Resets all active spawnpoint props''' # Remove all props self.__hideAllProps() # Show props in new positions for index in self.getIndexIter(): self.__showProp(index)
da67f8f3bb609f62dedc87fdb55879e38abbfe2b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/da67f8f3bb609f62dedc87fdb55879e38abbfe2b/spawnpointlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6208, 5047, 12, 2890, 4672, 9163, 20055, 30, 1124, 2413, 777, 2695, 12560, 1153, 3458, 26418, 468, 3581, 777, 3458, 365, 16186, 11248, 1595, 5047, 1435, 225, 468, 9674, 3458, 316, 39...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6208, 5047, 12, 2890, 4672, 9163, 20055, 30, 1124, 2413, 777, 2695, 12560, 1153, 3458, 26418, 468, 3581, 777, 3458, 365, 16186, 11248, 1595, 5047, 1435, 225, 468, 9674, 3458, 316, 39...
def get_credentials_file (unixFile=UNIX_CREDENTIALS_FILE,
def get_credentials_file(unixFile=UNIX_CREDENTIALS_FILE,
def get_credentials_file (unixFile=UNIX_CREDENTIALS_FILE, windowsFile=WINDOWS_CREDENTIALS_FILE): if os.name == 'posix': homeDir = os.path.expanduser('~') return os.path.join (homeDir, unixFile) elif os.name : from win32com.shell import shellcon, shell homeDir = shell.SHGetFolderPath(0, shellcon.CSIDL_APPDATA, 0, 0) return os.path.join (homeDir, windowsFile) else: return None
e75848841ac96982524448e932e12fd6ff9cbe0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12637/e75848841ac96982524448e932e12fd6ff9cbe0c/fdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11687, 67, 768, 12, 21136, 812, 33, 10377, 60, 67, 31014, 30308, 67, 3776, 16, 9965, 812, 33, 31874, 67, 31014, 30308, 67, 3776, 4672, 309, 1140, 18, 529, 422, 296, 24463, 427...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11687, 67, 768, 12, 21136, 812, 33, 10377, 60, 67, 31014, 30308, 67, 3776, 16, 9965, 812, 33, 31874, 67, 31014, 30308, 67, 3776, 4672, 309, 1140, 18, 529, 422, 296, 24463, 427...
def maintainence_price():
def maintainence_price(addMarkup = True):
def maintainence_price(): "Calculate the price of maintainence" price = (float(maintainenceCost[1]) / float(maintainenceCost[0])) / 1000.0 price = price * transfer if addMarkup: price = addPercent(price, markup) return price
d3f2c0a0850f52eb2ff1045ad7b14363f01847c2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3020/d3f2c0a0850f52eb2ff1045ad7b14363f01847c2/hosting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17505, 802, 67, 8694, 12, 1289, 13111, 273, 1053, 4672, 315, 8695, 326, 6205, 434, 17505, 802, 6, 225, 6205, 273, 261, 5659, 12, 81, 1598, 530, 802, 8018, 63, 21, 5717, 342, 1431, 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, 17505, 802, 67, 8694, 12, 1289, 13111, 273, 1053, 4672, 315, 8695, 326, 6205, 434, 17505, 802, 6, 225, 6205, 273, 261, 5659, 12, 81, 1598, 530, 802, 8018, 63, 21, 5717, 342, 1431, 12, ...
def callback(name, data): self.count += 1
def test_callback_not_called_when_filter_not_satisfied(self): """ After registerring a callback function with a filter function, the callback should not be called if a packet which does not satisfy the callback's filter arrives. """ self.dispatch.register("test1", self.callback_check.call, lambda data: False) self.dispatch.run(oneshot=True) self.assertFalse(self.callback_check.called) def test_multiple_callbacks(self): """ Many callbacks should be called on the same packet if each callback's filter method is satisfied. """ callbacks = [] for i in range(0,10): check = CallbackCheck() callbacks.append(check) self.dispatch.register("test%d" % i, check.call, lambda data: True)
def callback(name, data): self.count += 1
fe908491d0204174bb7002a635ee321add07a856 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10420/fe908491d0204174bb7002a635ee321add07a856/test_dispatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3394, 67, 902, 67, 11777, 67, 13723, 67, 2188, 67, 902, 67, 12973, 21501, 12, 2890, 4672, 3536, 7360, 960, 376, 20245, 279, 1348, 445, 598, 279, 1034, 445, 16, 326, 1348, 141...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3394, 67, 902, 67, 11777, 67, 13723, 67, 2188, 67, 902, 67, 12973, 21501, 12, 2890, 4672, 3536, 7360, 960, 376, 20245, 279, 1348, 445, 598, 279, 1034, 445, 16, 326, 1348, 141...
conditional evaluations.
conditional evaluations. The variables_in dictionary will not be modified by this function.
def ProcessVariablesAndConditionsInDict(the_dict, is_late, variables, build_file, the_dict_key=None): """Handle all variable and command expansion and conditional evaluation. This function is the public entry point for all variable expansions and conditional evaluations. """ # Save a copy of the variables dict before loading automatics or the # variables dict. After performing steps that may result in either of # these changing, the variables can be reloaded into a copy of the original # state. variables_orig = variables.copy() LoadAutomaticVariablesFromDict(variables, the_dict) if 'variables' in the_dict: # Make sure all the local variables are added to the variables # list before we process them so that you can reference one # variable from another. They will be fully expanded by recursion # in ExpandVariables. for key, value in the_dict['variables'].iteritems(): variables[key] = value # Handle the associated variables dict first, so that any variable # references within can be resolved prior to using them as variables. # Pass a copy of the variables dict to avoid having it be tainted. # Otherwise, it would have extra automatics added for everything that # should just be an ordinary variable in this scope. ProcessVariablesAndConditionsInDict(the_dict['variables'], is_late, variables.copy(), build_file, 'variables') LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) for key, value in the_dict.iteritems(): # Skip "variables", which was already processed if present. if key != 'variables' and isinstance(value, str): expanded = ExpandVariables(value, is_late, variables, build_file) if not isinstance(expanded, str) and not isinstance(expanded, int): raise ValueError, \ 'Variable expansion in this context permits str and int ' + \ 'only, found ' + expanded.__class__.__name__ + ' for ' + key the_dict[key] = expanded # Variable expansion may have resulted in changes to automatics. Reload. # TODO(mark): Optimization: only reload if no changes were made. variables = variables_orig.copy() LoadAutomaticVariablesFromDict(variables, the_dict) LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) # Process conditions in this dict. This is done after variable expansion # so that conditions may take advantage of expanded variables. For example, # if the_dict contains: # {'type': '<(library_type)', # 'conditions': [['_type=="static_library"', { ... }]]}, # _type, as used in the condition, will only be set to the value of # library_type if variable expansion is performed before condition # processing. However, condition processing should occur prior to recursion # so that variables (both automatic and "variables" dict type) may be # adjusted by conditions sections, merged into the_dict, and have the # intended impact on contained dicts. # # This arrangement means that a "conditions" section containing a "variables" # section will only have those variables effective in subdicts, not in # the_dict. The workaround is to put a "conditions" section within a # "variables" section. For example: # {'conditions': [['os=="mac"', {'variables': {'define': 'IS_MAC'}}]], # 'defines': ['<(define)'], # 'my_subdict': {'defines': ['<(define)']}}, # will not result in "IS_MAC" being appended to the "defines" list in the # current scope but would result in it being appended to the "defines" list # within "my_subdict". By comparison: # {'variables': {'conditions': [['os=="mac"', {'define': 'IS_MAC'}]]}, # 'defines': ['<(define)'], # 'my_subdict': {'defines': ['<(define)']}}, # will append "IS_MAC" to both "defines" lists. # Evaluate conditions sections, allowing variable expansions within them # as well as nested conditionals. This will process a 'conditions' or # 'target_conditions' section, perform appropriate merging and recursive # conditional and variable processing, and then remove the conditions section # from the_dict if it is present. ProcessConditionsInDict(the_dict, is_late, variables, build_file) # Conditional processing may have resulted in changes to automatics or the # variables dict. Reload. # This is the last thing that might use variables_orig, so don't bother # copying it, just use it directly. # TODO(mark): Optimization: only reload if no changes were made. # ProcessConditonsInDict could return a value indicating whether changes # were made. variables = variables_orig LoadAutomaticVariablesFromDict(variables, the_dict) LoadVariablesFromVariablesDict(variables, the_dict, the_dict_key) # Recurse into child dicts, or process child lists which may result in # further recursion into descendant dicts. for key, value in the_dict.iteritems(): # Skip "variables" and string values, which were already processed if # present. if key == 'variables' or isinstance(value, str): continue if isinstance(value, dict): # Pass a copy of the variables dict so that subdicts can't influence # parents. ProcessVariablesAndConditionsInDict(value, is_late, variables.copy(), build_file, key) elif isinstance(value, list): # The list itself can't influence the variables dict, and # ProcessVariablesAndConditionsInList will make copies of the variables # dict if it needs to pass it to something that can influence it. No # copy is necessary here. ProcessVariablesAndConditionsInList(value, is_late, variables, build_file) elif not isinstance(value, int): raise TypeError, 'Unknown type ' + value.__class__.__name__ + \ ' for ' + key
258e1528741d7f7d6d3f5c2f2e8d2f3c5a83d40a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/258e1528741d7f7d6d3f5c2f2e8d2f3c5a83d40a/input.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 6158, 1876, 8545, 382, 5014, 12, 5787, 67, 1576, 16, 353, 67, 20293, 16, 3152, 16, 1361, 67, 768, 16, 326, 67, 1576, 67, 856, 33, 7036, 4672, 3536, 3259, 777, 2190, 471, 1296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 6158, 1876, 8545, 382, 5014, 12, 5787, 67, 1576, 16, 353, 67, 20293, 16, 3152, 16, 1361, 67, 768, 16, 326, 67, 1576, 67, 856, 33, 7036, 4672, 3536, 3259, 777, 2190, 471, 1296, ...
gettext.bindtextdomain('invest-applet', abspath(join(invest.defs.DATA_DIR, "locale"))) gettext.textdomain('invest-applet') locale.bindtextdomain('invest-applet', abspath(join(invest.defs.DATA_DIR, "locale"))) locale.textdomain('invest-applet')
gettext.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR) gettext.textdomain(invest.defs.GETTEXT_PACKAGE) locale.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR) locale.textdomain(invest.defs.GETTEXT_PACKAGE) gtk.glade.bindtextdomain(invest.defs.GETTEXT_PACKAGE, invest.defs.GNOMELOCALEDIR) gtk.glade.textdomain(invest.defs.GETTEXT_PACKAGE)
def _check(path): return exists(path) and isdir(path) and isfile(path+"/ChangeLog")
64dd6b2cbc9525d49832fe760ace79124d78c813 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11078/64dd6b2cbc9525d49832fe760ace79124d78c813/invest-applet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 12, 803, 4672, 327, 1704, 12, 803, 13, 471, 9783, 12, 803, 13, 471, 8814, 12, 803, 9078, 19, 3043, 1343, 7923, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1893, 12, 803, 4672, 327, 1704, 12, 803, 13, 471, 9783, 12, 803, 13, 471, 8814, 12, 803, 9078, 19, 3043, 1343, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tup = selection.get_selected() if tup is not None: iter = tup[1] protocol = model.get_value(iter, 0)
model, iter = selection.get_selected() if iter is not None: protocol = self.protocolmodel.get_value(iter, 0)
def OnRemove(self, widget): selection = self.ProtocolHandlers.get_selection() tup = selection.get_selected() if tup is not None: iter = tup[1] protocol = model.get_value(iter, 0) self.protocolmodel.remove(iter) del self.protocols[protocol]
3175c19a002b2d8d82ac8aa3f49d6dc005d37f83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8738/3175c19a002b2d8d82ac8aa3f49d6dc005d37f83/settingswindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3288, 12, 2890, 16, 3604, 4672, 4421, 273, 365, 18, 5752, 6919, 18, 588, 67, 10705, 1435, 938, 16, 1400, 273, 4421, 18, 588, 67, 8109, 1435, 309, 1400, 353, 486, 599, 30, 1771, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 3288, 12, 2890, 16, 3604, 4672, 4421, 273, 365, 18, 5752, 6919, 18, 588, 67, 10705, 1435, 938, 16, 1400, 273, 4421, 18, 588, 67, 8109, 1435, 309, 1400, 353, 486, 599, 30, 1771, ...
ATTopicSchema = BaseFolder.schema + ATContentTypeSchema + Schema((
ATTopicSchema = ATContentTypeSchema.copy() + Schema((
def __init__(self, prefix='', archive=False): pass
f98eabe813032df83369483850534aca1fdfcb3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11956/f98eabe813032df83369483850534aca1fdfcb3b/schemata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1633, 2218, 2187, 5052, 33, 8381, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1633, 2218, 2187, 5052, 33, 8381, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...