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
TixSubWidget.__init__(self, master, name, destroy_physically)
TixSubWidget.__init__(self, master, name, destroy_physically)
def __init__(self, master, name, destroy_physically=1):
86af7ef7e3f4448abc89aa941517a84075d99a38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/86af7ef7e3f4448abc89aa941517a84075d99a38/Tix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 508, 16, 5546, 67, 844, 1900, 6478, 33, 21, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
previous_prime(randint(3,n)) return previous_prime(randint(3,n))
previous_prime(random.randint(3,n)) return previous_prime(random.randint(3,n))
def random_prime(n): """ Returns a random prime p satisfying between 2 and p (i.e. 2 <= p <= n). EXAMPLES: """ if n < 2 or not n in IntegerRing(): raise BadError elif n == 2: return sage.rings.integer.Integer(n) else: previous_prime(randint(3,n)) return previous_prime(randint(3,n))
6f1f26bd15c28cca422ed0a668c661c7d7944854 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/6f1f26bd15c28cca422ed0a668c661c7d7944854/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 67, 16382, 12, 82, 4672, 3536, 2860, 279, 2744, 17014, 293, 9281, 14946, 3086, 576, 471, 293, 261, 77, 18, 73, 18, 576, 1648, 293, 1648, 290, 2934, 225, 5675, 8900, 11386, 30, 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, 2744, 67, 16382, 12, 82, 4672, 3536, 2860, 279, 2744, 17014, 293, 9281, 14946, 3086, 576, 471, 293, 261, 77, 18, 73, 18, 576, 1648, 293, 1648, 290, 2934, 225, 5675, 8900, 11386, 30, 35...
self.session.message_transfer(destination="amq.match", content=Content("foobar", properties={'application_headers':headers}))
mp=self.session.message_properties(application_headers=headers) self.session.message_transfer(destination="amq.match", message=Message(mp, "foobar"))
def myBasicPublish(self, headers): self.session.message_transfer(destination="amq.match", content=Content("foobar", properties={'application_headers':headers}))
74701253cb10e3ca35e613669e068da23ae2bc7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/74701253cb10e3ca35e613669e068da23ae2bc7b/exchange.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 8252, 6024, 12, 2890, 16, 1607, 4672, 6749, 33, 2890, 18, 3184, 18, 2150, 67, 4738, 12, 3685, 67, 2485, 33, 2485, 13, 365, 18, 3184, 18, 2150, 67, 13866, 12, 10590, 1546, 301, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3399, 8252, 6024, 12, 2890, 16, 1607, 4672, 6749, 33, 2890, 18, 3184, 18, 2150, 67, 4738, 12, 3685, 67, 2485, 33, 2485, 13, 365, 18, 3184, 18, 2150, 67, 13866, 12, 10590, 1546, 301, ...
field_defs = "\n ".join([
field_defs = ",\n ".join([
def forwards_code(self): field_defs = "\n ".join([ "(%r, %s)" % (name, defn) for name, defn in self.triples_to_defs(self.model_def).items() ]) return self.FORWARDS_TEMPLATE % { "model_name": self.model._meta.object_name, "table_name": self.model._meta.db_table, "app_label": self.model._meta.app_label, "field_defs": field_defs, }
9c8f734c3eb142f6103a251323c829cadb899da1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/9c8f734c3eb142f6103a251323c829cadb899da1/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24578, 67, 710, 12, 2890, 4672, 225, 652, 67, 12537, 273, 31726, 82, 5411, 3552, 5701, 3816, 7751, 9, 86, 16, 738, 87, 2225, 738, 261, 529, 16, 1652, 82, 13, 364, 508, 16, 1652, 82, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24578, 67, 710, 12, 2890, 4672, 225, 652, 67, 12537, 273, 31726, 82, 5411, 3552, 5701, 3816, 7751, 9, 86, 16, 738, 87, 2225, 738, 261, 529, 16, 1652, 82, 13, 364, 508, 16, 1652, 82, ...
findTemplate=re.compile(ur'\{\{[Cc]ommons')
findTemplate=re.compile(ur'\{\{[Cc]ommonscat')
def pages(self): for page in self.generator: try: wikipedia.output(u'\n>>>> %s <<<<' % page.title()) commons = wikipedia.getSite('commons', 'commons') commonspage = wikipedia.Page(commons, page.title()) try: getcommons = commonspage.get(get_redirect=True) if page.title() == commonspage.title(): oldText = page.get() text = oldText
f4f09a5929a3628ec3201242dfc00746c7493262 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/f4f09a5929a3628ec3201242dfc00746c7493262/commons_link.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4689, 12, 2890, 4672, 364, 1363, 316, 365, 18, 8812, 30, 775, 30, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 1363, 18, 2649, 10756, 24021, 273, 21137, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4689, 12, 2890, 4672, 364, 1363, 316, 365, 18, 8812, 30, 775, 30, 21137, 18, 2844, 12, 89, 8314, 82, 9778, 9778, 738, 87, 14360, 32, 11, 738, 1363, 18, 2649, 10756, 24021, 273, 21137, ...
fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try:
with TemporaryFile("w+") as fileobj:
def test_read_long_with_rest_no_fieldnames(self): fd, name = tempfile.mkstemp() fileobj = os.fdopen(fd, "w+b") try: fileobj.write("f1,f2\r\n1,2,abc,4,5,6\r\n") fileobj.seek(0) reader = csv.DictReader(fileobj, restkey="_rest") self.assertEqual(next(reader), {"f1": '1', "f2": '2', "_rest": ["abc", "4", "5", "6"]}) finally: fileobj.close() os.unlink(name)
3372cde256bb490026e8a5e8c2502a82d2e6c5a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3372cde256bb490026e8a5e8c2502a82d2e6c5a0/test_csv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 67, 5748, 67, 1918, 67, 8792, 67, 2135, 67, 1518, 1973, 12, 2890, 4672, 598, 22791, 812, 2932, 91, 15, 7923, 487, 17041, 30, 17041, 18, 2626, 2932, 74, 21, 16, 74, 22,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 896, 67, 5748, 67, 1918, 67, 8792, 67, 2135, 67, 1518, 1973, 12, 2890, 4672, 598, 22791, 812, 2932, 91, 15, 7923, 487, 17041, 30, 17041, 18, 2626, 2932, 74, 21, 16, 74, 22,...
self.s_apply(self.r_execfile, args)
return self.s_apply(self.r_execfile, args)
def s_execfile(self, *args): self.s_apply(self.r_execfile, args)
9626d92183ad55670ae3bf25df8672eb992673fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9626d92183ad55670ae3bf25df8672eb992673fe/rexec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 67, 4177, 768, 12, 2890, 16, 380, 1968, 4672, 365, 18, 87, 67, 9010, 12, 2890, 18, 86, 67, 4177, 768, 16, 833, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 67, 4177, 768, 12, 2890, 16, 380, 1968, 4672, 365, 18, 87, 67, 9010, 12, 2890, 18, 86, 67, 4177, 768, 16, 833, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
editor = line.getEditor(request)
editor = line.getInterwikiEditorData(request)
def show_editors(request, pagename, timestamp): _ = request.getText timestamp = int(timestamp * 1000000) log = editlog.EditLog(request) editors = {} pages = {} for line in log.reverse(): if line.ed_time_usecs < timestamp: break if not request.user.may.read(line.pagename): continue editor = line.getEditor(request) if not line.pagename in pages: pages[line.pagename] = 1 editors[editor] = editors.get(editor, 0) + 1 editors = [(nr, editor) for editor, nr in editors.iteritems()] editors.sort() pg = Page.Page(request, pagename) dataset = TupleDataset() dataset.columns = [Column('editor', label=_("Editor"), align='left'), Column('pages', label=_("Pages"), align='right'), Column('link', label='', align='left')] for nr, editor in editors: dataset.addRow((editor, unicode(nr), pg.link_to(request, text=_("Select Author"), querystr={ 'action': 'Despam', 'editor': editor, # was: url_quote_plus() }))) table = DataBrowserWidget(request) table.setData(dataset) table.render()
0d93a80ae17c4402d607efb8b3cea8840b31315c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/0d93a80ae17c4402d607efb8b3cea8840b31315c/Despam.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 4619, 1383, 12, 2293, 16, 4262, 1069, 16, 2858, 4672, 389, 273, 590, 18, 588, 1528, 225, 2858, 273, 509, 12, 5508, 380, 15088, 13, 613, 273, 3874, 1330, 18, 4666, 1343, 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, 2405, 67, 4619, 1383, 12, 2293, 16, 4262, 1069, 16, 2858, 4672, 389, 273, 590, 18, 588, 1528, 225, 2858, 273, 509, 12, 5508, 380, 15088, 13, 613, 273, 3874, 1330, 18, 4666, 1343, 12, ...
self._level = 0 self._debug_level = 0
self._level = { } self._debug_level = { }
def __init__(self, info_max=5, debug_max=10): """ Logger class initialization """ self._level = 0 self._debug_level = 0 self._format = "" self._date_format = "" self._label = { } self._logging = { } self._domains = { }
5e21eaf199cb2a3a81aefe5be1fd9cac8312f653 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/5e21eaf199cb2a3a81aefe5be1fd9cac8312f653/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1123, 67, 1896, 33, 25, 16, 1198, 67, 1896, 33, 2163, 4672, 3536, 4242, 667, 10313, 3536, 365, 6315, 2815, 273, 288, 289, 365, 6315, 4148, 67, 2815, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1123, 67, 1896, 33, 25, 16, 1198, 67, 1896, 33, 2163, 4672, 3536, 4242, 667, 10313, 3536, 365, 6315, 2815, 273, 288, 289, 365, 6315, 4148, 67, 2815, 273,...
print >> output.stdout, format_bond_length(dij, ddij, ij, symij)
print >> output.stdout, _format_bond_length(dij, ddij, ij, symij)
def blen(self, *args): """blen(i, j) --> Show bond length defined by atoms i and j.
afd1dd9f23adb7cfeddb39f6b03f9c6c2969e191 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8375/afd1dd9f23adb7cfeddb39f6b03f9c6c2969e191/pdffit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 1897, 12, 2890, 16, 380, 1968, 4672, 3536, 70, 1897, 12, 77, 16, 525, 13, 15431, 9674, 8427, 769, 2553, 635, 9006, 277, 471, 525, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 1897, 12, 2890, 16, 380, 1968, 4672, 3536, 70, 1897, 12, 77, 16, 525, 13, 15431, 9674, 8427, 769, 2553, 635, 9006, 277, 471, 525, 18, 2, -100, -100, -100, -100, -100, -100, -100, ...
}, depends=['company', 'type', 'centralised'])
}, depends=['type', 'centralised'])
def default_readonly(self, cursor, user, context=None): return False
253f2eab122413e4733847dbfe234f1482260e5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9290/253f2eab122413e4733847dbfe234f1482260e5d/journal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 16365, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 16365, 12, 2890, 16, 3347, 16, 729, 16, 819, 33, 7036, 4672, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
libraries = None,
libraries = ["QuantLib"],
def run(self): import sys # Invoke the 'build' command to "build" pure Python modules # (ie. copy 'em into the build tree) self.run_command('build')
a1f5e47a25ff89f64c108a4ce8cacc1555c0d8ef /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/885/a1f5e47a25ff89f64c108a4ce8cacc1555c0d8ef/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 2589, 468, 14373, 326, 296, 3510, 11, 1296, 358, 315, 3510, 6, 16618, 6600, 4381, 468, 261, 1385, 18, 1610, 296, 351, 1368, 326, 1361, 2151, 13, 365, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 1930, 2589, 468, 14373, 326, 296, 3510, 11, 1296, 358, 315, 3510, 6, 16618, 6600, 4381, 468, 261, 1385, 18, 1610, 296, 351, 1368, 326, 1361, 2151, 13, 365, 18, 26...
{'abcoulomb':'CGS unit defined to be 10 coulombs.', 'coulomb':'SI derived unit of charge.\nDefined to be the amount of electric charge transported by 1 ampere in 1 second.', 'elementary_charge':'Defined to be the amount of electric charge carried by a single proton or negative charge carried by a single electron.\nApproximately equal to 1.602176462*10^-19 coulombs.', 'faraday':'Defined to be the magnitude of electric charge in one mole of electrons.\nApproximately equal to 96485.3399 coulombs.', 'franklin':'CGS unit defined to be the amount of electric charge necessary such that if two stationary objects placed one centimeter apart had one franklin of charge each they would repel each other with a force of one dyne.\nApproximately equal to 3.3356*10^-10 coulombs.', 'statcoulomb':'Equivalent to franklin.\nApproximately equal to 3.3356*10^-10 coulombs.'},
{'abcoulomb':'CGS unit defined to be 10 coulombs.', 'coulomb':'SI derived unit of charge.\nDefined to be the amount of electric charge transported by 1 ampere in 1 second.', 'elementary_charge':'Defined to be the amount of electric charge carried by a single proton or negative charge carried by a single electron.\nApproximately equal to 1.602176462*10^-19 coulombs.', 'faraday':'Defined to be the magnitude of electric charge in one mole of electrons.\nApproximately equal to 96485.3399 coulombs.', 'franklin':'CGS unit defined to be the amount of electric charge necessary such that if two stationary objects placed one centimeter apart had one franklin of charge each they would repel each other with a force of one dyne.\nApproximately equal to 3.3356*10^-10 coulombs.', 'statcoulomb':'Equivalent to franklin.\nApproximately equal to 3.3356*10^-10 coulombs.'},
def evalunitdict(): """ Replace all the string values of the unitdict variable by their evaluated forms, and builds some other tables for ease of use. This function is mainly used internally, for efficiency (and flexibility) purposes, making it easier to describe the units. EXAMPLES:: sage: sage.symbolic.units.evalunitdict() """ from sage.misc.all import sage_eval for key, value in unitdict.iteritems(): unitdict[key] = dict([(a,sage_eval(repr(b))) for a, b in value.iteritems()]) # FEATURE IDEA: create a function that would allow users to add # new entries to the table without having to know anything about # how the table is stored internally. # # Format the table for easier use. # for k, v in unitdict.iteritems(): for a in v: unit_to_type[a] = k for w in unitdict.iterkeys(): for j in unitdict[w].iterkeys(): if type(unitdict[w][j]) == tuple: unitdict[w][j] = unitdict[w][j][0] value_to_unit[w] = dict(zip(unitdict[w].itervalues(), unitdict[w].iterkeys()))
ed891e5784edd8a5e4d544f1ef837edc82b93924 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ed891e5784edd8a5e4d544f1ef837edc82b93924/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5302, 4873, 1576, 13332, 3536, 6910, 777, 326, 533, 924, 434, 326, 2836, 1576, 2190, 635, 3675, 12697, 10138, 16, 471, 10736, 2690, 1308, 4606, 364, 28769, 434, 999, 18, 1220, 445, 353, ...
if (query.__query_string__).__contains__(' JOIN '):
if (query.__query_string__).find(' JOIN ') != -1:
def delete_rows(self, query): """ DOCSTRING COMMENTS: - Query must have no join statements (you can only delete from one table at a time) (This might be an interesting TODO later, ie: another function that creates multiple delete statements from a query with joins... I don't think it's really necessary at this time though. - Use a query instance to modify your database. - Note that you cannot use a GenericSQLQuery. (NO RESPONSIBILITY) - If you would like to remove all data that satisfies a query, enter that query as a parameter in the delete_rows function. - Recommended use: have some kind of primary key column that you use as a parameter in the query - Be careful, test your query first. - (Examples of this) - Also note that this database must be the database that the query is associated with (test that?) ROBERT : I haven't tested this... if if doesn't work, then it is probably the param_tuple thing... send me an email if it's not working EXAMPLES: sage: DB = SQLDatabase() sage: DB.create_table('simon',{'a1':{'sql':'bool','primary_key':False}, 'b2':{'sql':'int', 'primary_key':False}}) sage: DB.add_data('simon',[(0,0),(1,1),(1,2)]) sage: p = SQLQuery(DB, {'table_name':'simon', 'display_cols':'b2', 'dillhole':['b2','=', 0]}) sage: DB.delete_rows(p) sage: cur = DB.get_cursor() sage: (cur.execute('select * from simon')).fetchall() [(1, 1), (1, 2)] syntax: delete from table_name where blah=val """ # Check query is associated with this database # TODO : Robert, does this work? And do you suggest any other checking? if not isinstance(query, SQLQuery): raise TypeError('%s is not a valid SQLQuery'%query) if query.__database__ is not self: raise ValueError('%s is not associated to this database.'%query) if (query.__query_string__).__contains__(' JOIN '): raise ValueError('%s is not a valid query. Can only delete from one table at a time.'%query) delete_statement = re.sub('SELECT .* FROM', 'DELETE FROM', query.__query_string__) try: tup = str(query.__param_tuple__).rstrip(')') + ',)' cur = self.__connection__.cursor() if query.__param_tuple__ is not None: tup = [] for i in range(len(query.__param_tuple__)): tup.append(str(query.__param_tuple__[i])) cur.execute(delete_statement, tuple(tup)) else: cur.execute(delete_statement) except: raise RuntimeError('Failure to complete delete. Check your data.')
12098d45ba68813e42a6a22032a2f2e6d360e158 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/12098d45ba68813e42a6a22032a2f2e6d360e158/database.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3870, 12, 2890, 16, 843, 4672, 3536, 5467, 39, 5804, 19400, 55, 30, 300, 2770, 1297, 1240, 1158, 1233, 6317, 261, 19940, 848, 1338, 1430, 628, 1245, 1014, 622, 279, 813, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 3870, 12, 2890, 16, 843, 4672, 3536, 5467, 39, 5804, 19400, 55, 30, 300, 2770, 1297, 1240, 1158, 1233, 6317, 261, 19940, 848, 1338, 1430, 628, 1245, 1014, 622, 279, 813, 13, ...
def load(self, row):
def load_row(self, row):
def load(self, row): self.code = trim(row[0]) self.sort_order = safeint(row[1]) self.only_registered = tf2bool(row[2]) self.only_admin = tf2bool(row[3]) self.only_sysadmin = tf2bool(row[4]) self.registered_count = int(db.read_value('SELECT COUNT(*) FROM page WHERE only_registered or only_admin or only_sysadmin')) self.admin_count = int(db.read_value('SELECT COUNT(*) FROM page WHERE only_admin or only_sysadmin')) self.sysadmin_count = int(db.read_value('SELECT COUNT(*) FROM page WHERE only_sysadmin')) sql = "SELECT lang, section_name FROM section_i18n WHERE section_code=" + wsq(self.code) cursor = db.select(sql) while (1): row = cursor.fetchone() if row==None: break lang = row[0] self.name[lang] = trim(row[1])
076b15b1c97d57e9f42e83a3568b1d2350396f3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/076b15b1c97d57e9f42e83a3568b1d2350396f3e/WebLayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 492, 12, 2890, 16, 1027, 4672, 365, 18, 710, 1082, 1377, 273, 2209, 12, 492, 63, 20, 5717, 365, 18, 3804, 67, 1019, 4202, 273, 4183, 474, 12, 492, 63, 21, 5717, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 492, 12, 2890, 16, 1027, 4672, 365, 18, 710, 1082, 1377, 273, 2209, 12, 492, 63, 20, 5717, 365, 18, 3804, 67, 1019, 4202, 273, 4183, 474, 12, 492, 63, 21, 5717, 365, 18, ...
self.fireEvent( 'simulation_updated' )
def thread_proc(): self.fireEvent( 'simulation_started' ) if time: self.theSession.run( time ) self.fireEvent( 'simulation_updated' ) self.theRunningFlag = False self.message( "%15s:Stop" % self.getCurrentTime() ) else: aCounter = 0 while self.theRunningFlag: self.theSession.step() aCounter += 1 if ( aCounter > self.theUpdateInterval ): self.fireEvent( 'simulation_updated' ) aCounter = 0
15c4bb33d8a7a1408ad42ff7e2b7e5925b590fad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12724/15c4bb33d8a7a1408ad42ff7e2b7e5925b590fad/GtkSessionMonitor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2650, 67, 9381, 13332, 365, 18, 12179, 1133, 12, 296, 9812, 6234, 67, 14561, 11, 262, 309, 813, 30, 365, 18, 5787, 2157, 18, 2681, 12, 813, 262, 365, 18, 5787, 7051, 4678, 273, 1083, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2650, 67, 9381, 13332, 365, 18, 12179, 1133, 12, 296, 9812, 6234, 67, 14561, 11, 262, 309, 813, 30, 365, 18, 5787, 2157, 18, 2681, 12, 813, 262, 365, 18, 5787, 7051, 4678, 273, 1083, ...
def __init__(self, name, axes, doAutoscale, **kargs):
def __init__(self, stripChartWdg, subplotInd, **kargs):
def __init__(self, name, axes, doAutoscale, **kargs): """Create a line Inputs: - name: name of line - axes: the matplotlib Axes or Subplot instance displaying this line - doAutoscale: if True then autoscale the y axis - **kargs: keyword arguments for matplotlib Line2D, such as color """ self.name = name self.axes = axes self.line = matplotlib.lines.Line2D([], [], animated=_UseAnimation, **kargs) self.axes.add_line(self.line) self._doAutoscale = doAutoscale
3b283b48ede157cec1c6e79ad973ff5a399f5fbe /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6354/3b283b48ede157cec1c6e79ad973ff5a399f5fbe/StripChartWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2569, 7984, 59, 72, 75, 16, 19826, 3866, 16, 2826, 79, 1968, 4672, 3536, 1684, 279, 980, 225, 24472, 30, 300, 508, 30, 508, 434, 980, 300, 6515, 30, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2569, 7984, 59, 72, 75, 16, 19826, 3866, 16, 2826, 79, 1968, 4672, 3536, 1684, 279, 980, 225, 24472, 30, 300, 508, 30, 508, 434, 980, 300, 6515, 30, 32...
dbg("[RCFile] located at %s" % self.rcfilename)
dbg(" VS_RCFile: config file located at %s" % self.rcfilename)
def __init__ (self): self.type = "RCFile" try: directory = os.environ['XDG_CONFIG_HOME'] except KeyError, e: dbg("Environment variable %s not found. defaulting to ~/.config" % e.message) directory = os.path.join (os.path.expanduser("~"), ".config") self.rcfilename = os.path.join(directory, "terminator/config") dbg("[RCFile] located at %s" % self.rcfilename) if os.path.exists (self.rcfilename): rcfile = open (self.rcfilename) rc = rcfile.readlines () rcfile.close ()
0c658913ca5e8d20321cc9c4c2a27fbb70db8275 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/0c658913ca5e8d20321cc9c4c2a27fbb70db8275/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 365, 18, 723, 273, 315, 11529, 812, 6, 775, 30, 1867, 273, 1140, 18, 28684, 3292, 22953, 43, 67, 7203, 67, 14209, 3546, 1335, 4999, 16, 425, 30, 28966...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 4672, 365, 18, 723, 273, 315, 11529, 812, 6, 775, 30, 1867, 273, 1140, 18, 28684, 3292, 22953, 43, 67, 7203, 67, 14209, 3546, 1335, 4999, 16, 425, 30, 28966...
if child_cls is not None and (True if child_cls is [c for c in [SidebarsByValEntry]] else False):
if child_cls is not None and child_cls is SidebarsByValEntry:
def _parse_element(self, element, *args, **kwargs): for child in element: child_cls = self._xml_application.get_element(child.tag) if child_cls is not None and (True if child_cls is [c for c in [SidebarsByValEntry]] else False): try: list.append(self, child_cls.from_element(child, *args, **kwargs)) except ValidationError: pass
1c9fe7c720994fa651059d9d0fceae54f4915dc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3449/1c9fe7c720994fa651059d9d0fceae54f4915dc3/conference.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2956, 12, 2890, 16, 930, 16, 380, 1968, 16, 2826, 4333, 4672, 364, 1151, 316, 930, 30, 1151, 67, 6429, 273, 365, 6315, 2902, 67, 3685, 18, 588, 67, 2956, 12, 3624, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 2956, 12, 2890, 16, 930, 16, 380, 1968, 16, 2826, 4333, 4672, 364, 1151, 316, 930, 30, 1151, 67, 6429, 273, 365, 6315, 2902, 67, 3685, 18, 588, 67, 2956, 12, 3624, 18,...
return {'value': {'balance_start': balance_start}}
account_id = self.pool.get('account.journal').read(cr, uid, journal_id, ['default_debit_account_id'], context=context)['default_debit_account_id'] return {'value': {'balance_start': balance_start, 'account_id': account_id}}
def onchange_journal_id(self, cursor, user, statement_id, journal_id, context=None): cursor.execute('SELECT balance_end_real \ FROM account_bank_statement \ WHERE journal_id = %s AND NOT state = %s \ ORDER BY date DESC,id DESC LIMIT 1', (journal_id, 'draft')) res = cursor.fetchone() balance_start = res and res[0] or 0.0 return {'value': {'balance_start': balance_start}}
382f6fc8c55cb866c4bc8d54c7a4b13694648d46 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/382f6fc8c55cb866c4bc8d54c7a4b13694648d46/account_bank_statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 22644, 67, 350, 12, 2890, 16, 3347, 16, 729, 16, 3021, 67, 350, 16, 13001, 67, 350, 16, 819, 33, 7036, 4672, 3347, 18, 8837, 2668, 4803, 11013, 67, 409, 67, 7688, 521,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 22644, 67, 350, 12, 2890, 16, 3347, 16, 729, 16, 3021, 67, 350, 16, 13001, 67, 350, 16, 819, 33, 7036, 4672, 3347, 18, 8837, 2668, 4803, 11013, 67, 409, 67, 7688, 521,...
""" Test cases for change_root_directory function """ def setUp(self): """ Set up test fixtures """
""" Test cases for change_root_directory function. """ def setUp(self): """ Set up test fixtures. """
def test_error_message_contains_original_error_message(self): """ Should raise a DaemonError with original message. """ args = self.test_args test_error = OSError(errno.ENOENT, "No such directory") os.chdir.mock_raises = test_error expect_error = daemon.daemon.DaemonOSEnvironmentError try: daemon.daemon.change_working_directory(**args) except expect_error, exc: pass self.failUnlessIn(str(exc), str(test_error))
33a5bfc655a6417210c5c80d9f942714bf596533 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/33a5bfc655a6417210c5c80d9f942714bf596533/test_daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1636, 67, 2150, 67, 12298, 67, 8830, 67, 1636, 67, 2150, 12, 2890, 4672, 3536, 9363, 1002, 279, 13054, 668, 598, 2282, 883, 18, 3536, 833, 273, 365, 18, 3813, 67, 1968, 1842,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1636, 67, 2150, 67, 12298, 67, 8830, 67, 1636, 67, 2150, 12, 2890, 4672, 3536, 9363, 1002, 279, 13054, 668, 598, 2282, 883, 18, 3536, 833, 273, 365, 18, 3813, 67, 1968, 1842,...
if band == consts.MM_NETWORK_BAND_ANY:
if band in self.custom.band_dict.keys():
def set_band(self, band): # XXX: Fix set_band ASAP if band == consts.MM_NETWORK_BAND_ANY: return defer.succeed('OK')
420532773dec2fa503acf62671c4a2362aceb73e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12036/420532773dec2fa503acf62671c4a2362aceb73e/ericsson.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 12752, 12, 2890, 16, 8937, 4672, 468, 11329, 30, 12139, 444, 67, 12752, 5355, 2203, 430, 8937, 316, 365, 18, 3662, 18, 12752, 67, 1576, 18, 2452, 13332, 225, 327, 2220, 18, 87...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12752, 12, 2890, 16, 8937, 4672, 468, 11329, 30, 12139, 444, 67, 12752, 5355, 2203, 430, 8937, 316, 365, 18, 3662, 18, 12752, 67, 1576, 18, 2452, 13332, 225, 327, 2220, 18, 87...
if not rec_res_id and not rec_res_id:
if not rec_res_id and not pay_res_id:
def onchange_company_id(self, cr, uid, ids, company_id, part_id, type, invoice_line, currency_id): val = {} dom = {} obj_journal = self.pool.get('account.journal') if company_id and part_id and type: acc_id = False partner_obj = self.pool.get('res.partner').browse(cr,uid,part_id) if partner_obj.property_account_payable and partner_obj.property_account_receivable: if partner_obj.property_account_payable.company_id.id != company_id and partner_obj.property_account_receivable.company_id.id != company_id: rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)]) pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('res_id','=','res.partner,'+str(part_id)+''),('company_id','=',company_id)]) if not rec_pro_id: rec_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_receivable'),('company_id','=',company_id)]) if not pay_pro_id: pay_pro_id = self.pool.get('ir.property').search(cr, uid, [('name','=','property_account_payable'),('company_id','=',company_id)]) rec_line_data = self.pool.get('ir.property').read(cr, uid, rec_pro_id, ['name','value','res_id']) pay_line_data = self.pool.get('ir.property').read(cr, uid, pay_pro_id, ['name','value','res_id']) rec_res_id = rec_line_data and int(rec_line_data[0]['value'].split(',')[1]) or False pay_res_id = pay_line_data and int(pay_line_data[0]['value'].split(',')[1]) or False if not rec_res_id and not rec_res_id: raise osv.except_osv(_('Configration Error !'), _('Can not find account chart for this company, Please Create account.')) if type in ('out_invoice', 'out_refund'): acc_id = rec_res_id else: acc_id = pay_res_id val= {'account_id': acc_id} if ids: if company_id: inv_obj = self.browse(cr,uid,ids) for line in inv_obj[0].invoice_line: if line.account_id: if line.account_id.company_id.id != company_id: result_id = self.pool.get('account.account').search(cr, uid, [('name','=',line.account_id.name),('company_id','=',company_id)]) if not result_id: raise osv.except_osv(_('Configration Error !'), _('Can not find account chart for this company in invoice line account, Please Create account.')) r_id = self.pool.get('account.invoice.line').write(cr, uid, [line.id], {'account_id': result_id[0]}) else: if invoice_line: for inv_line in invoice_line: obj_l = self.pool.get('account.account').browse(cr, uid, inv_line[2]['account_id']) if obj_l.company_id.id != company_id: raise osv.except_osv(_('Configration Error !'), _('invoice line account company is not match with invoice company.')) else: continue if company_id and type: if type in ('out_invoice', 'out_refund'): journal_type = 'sale' else: journal_type = 'purchase' journal_ids = obj_journal.search(cr, uid, [('company_id','=',company_id), ('type', '=', journal_type)]) if journal_ids: val['journal_id'] = journal_ids[0] else: raise osv.except_osv(_('Configration Error !'), _('Can not find account journal for this company in invoice, Please Create journal.')) dom = {'journal_id': [('id', 'in', journal_ids)]} else: journal_ids = obj_journal.search(cr, uid, [])
9d3752728703af0f57a66468fda2058d9e5cfcdc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/9d3752728703af0f57a66468fda2058d9e5cfcdc/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 16840, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 9395, 67, 350, 16, 1087, 67, 350, 16, 618, 16, 9179, 67, 1369, 16, 5462, 67, 350, 4672, 1244, 273, 2618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3427, 67, 16840, 67, 350, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 9395, 67, 350, 16, 1087, 67, 350, 16, 618, 16, 9179, 67, 1369, 16, 5462, 67, 350, 4672, 1244, 273, 2618, ...
if(img.data[img.step*i + j] > 0): cloud.points.append(point)
data = img.data[img.step*i+j] val = struct.unpack("B", data)[0] if(val/255.0 > 0.1): cloud.points.append(Point32(point.x, point.y, point.z))
def image_callback(img, pub): cloud = PointCloud() cloud.header.stamp = rospy.Time.now() cloud.header.frame_id = "/vision_cloud" point = Point32(300*0.05, -300*0.05, 0.1) for i in range(0, img.height): point.y = -300*0.05 for j in range(0, img.width): if(img.data[img.step*i + j] > 0): cloud.points.append(point) point.y += 0.05 point.x -= 0.05 pub.publish(cloud)
3123db4ff321ad447b52f810220ed99bf5a5359a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14739/3123db4ff321ad447b52f810220ed99bf5a5359a/image_to_point_cloud.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 67, 3394, 12, 6081, 16, 5634, 4672, 5051, 273, 4686, 6230, 1435, 5051, 18, 3374, 18, 14317, 273, 721, 30884, 18, 950, 18, 3338, 1435, 5051, 18, 3374, 18, 3789, 67, 350, 273, 2206...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1316, 67, 3394, 12, 6081, 16, 5634, 4672, 5051, 273, 4686, 6230, 1435, 5051, 18, 3374, 18, 14317, 273, 721, 30884, 18, 950, 18, 3338, 1435, 5051, 18, 3374, 18, 3789, 67, 350, 273, 2206...
EXPECT_EQ(0, result->size);%(gl_error_test)s
EXPECT_EQ(0u, result->size);%(gl_error_test)s
typedef %(name)s::Result Result;
a115074299ce0ef525addadc3040aeb6715c121a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/a115074299ce0ef525addadc3040aeb6715c121a/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 618, 536, 8975, 529, 13, 87, 2866, 1253, 3438, 31, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 618, 536, 8975, 529, 13, 87, 2866, 1253, 3438, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif type(stderr) == int:
elif isinstance(stderr, int):
def _get_handles(self, stdin, stdout, stderr): """Construct and return tupel with IO objects: p2cread, p2cwrite, c2pread, c2pwrite, errread, errwrite """ if stdin == None and stdout == None and stderr == None: return (None, None, None, None, None, None)
587e8b6e7deec97da104d8c9590d53e2cbdee4c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/587e8b6e7deec97da104d8c9590d53e2cbdee4c5/subprocess.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 15822, 292, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 24111, 12, 2890, 16, 8801, 16, 3909, 16, 4514, 4672, 3536, 7249, 471, 327, 15822, 292, 598, 1665, 2184, 30, 293, 22, 71, 896, 16, 293, 22, 71, 2626, 16, 276, 22, 84, ...
This class must `not` be instanciated directly.
This class must *not* be instanciated directly.
def save(self, fpath): """ Save the binary representation of the file to `fpath`.
d8198b8084c69bfb0e84293dcc1b4bcf7ead9311 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9209/d8198b8084c69bfb0e84293dcc1b4bcf7ead9311/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 13543, 4672, 3536, 7074, 326, 3112, 4335, 434, 326, 585, 358, 1375, 28900, 8338, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 13543, 4672, 3536, 7074, 326, 3112, 4335, 434, 326, 585, 358, 1375, 28900, 8338, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if not host: return addinfo(open(url2pathname(file), 'r'), noheaders())
if not host: return addinfourl(open(url2pathname(file), 'r'), noheaders(), self.openedurl)
def open_local_file(self, url): host, file = splithost(url) if not host: return addinfo(open(url2pathname(file), 'r'), noheaders()) host, port = splitport(host) if not port and socket.gethostbyname(host) in ( localhost(), thishost()): file = unquote(file) return addinfo(open(url2pathname(file), 'r'), noheaders()) raise IOError, ('local file error', 'not on local host')
2ef371cc555b6d6b747bc517ed82705a38e0b8d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/2ef371cc555b6d6b747bc517ed82705a38e0b8d2/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 3190, 12, 718, 22, 28336, 12, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 3729, 67, 768, 12, 2890, 16, 880, 4672, 1479, 16, 585, 273, 6121, 483, 669, 12, 718, 13, 309, 486, 1479, 30, 327, 527, 10625, 477, 80, 12, 3190, 12, 718, 22, 28336, 12, 7...
self.bzUrl = config.get('bugzilla.url', 'https://bugzilla.redhat.com/') self.bzQueryUrl = config.get('bugzilla.queryurl', self.bzUrl)
def __init__(self, appTitle=None): '''Create a Packages Controller.
160130658c0a7526c38aa3e90cf9c83bd7344862 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9953/160130658c0a7526c38aa3e90cf9c83bd7344862/bugs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 595, 4247, 33, 7036, 4672, 9163, 1684, 279, 7930, 1023, 6629, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 595, 4247, 33, 7036, 4672, 9163, 1684, 279, 7930, 1023, 6629, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if not self.critical_section_enter(): return None self.w.progress.set_pulse_step (1.0 / num_dirs) self.w.progress.set_text ("Scanning for older versions (%d/%d)" % (current_dir, num_dirs)) self.critical_section_leave ()
gobject.idle_add (self.w.progress.set_pulse_step, (1.0 / num_dirs)) gobject.idle_add (self.w.progress.set_text, ("Scanning for older versions (%d/%d)" % (current_dir, num_dirs)))
def run(self): l = self.w.snap_path.split (".zfs") path_before_snap = l[0] l = self.w.filename.split (path_before_snap) path_after_snap = l[1] snap_path = "%s.zfs/snapshot/" % path_before_snap; dirs = os.listdir(snap_path)
76dfaec72b6d234901dd0cafefd54ce8da26001e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11404/76dfaec72b6d234901dd0cafefd54ce8da26001e/fileversion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 328, 273, 365, 18, 91, 18, 28449, 67, 803, 18, 4939, 7566, 18, 94, 2556, 7923, 589, 67, 5771, 67, 28449, 273, 328, 63, 20, 65, 328, 273, 365, 18, 91, 18, 3459...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 328, 273, 365, 18, 91, 18, 28449, 67, 803, 18, 4939, 7566, 18, 94, 2556, 7923, 589, 67, 5771, 67, 28449, 273, 328, 63, 20, 65, 328, 273, 365, 18, 91, 18, 3459...
'or the ISBN key.')).exec_()
'and/or removing the ISBN.')).exec_() self.reject()
def hangcheck(self): if self.fetcher.is_alive() and \ time.time() - self.start_time < self.HANG_TIME: return self._hangcheck.stop() try: if self.fetcher.is_alive(): error_dialog(self, _('Could not find metadata'), _('The metadata download seems to have stalled. ' 'Try again later.')).exec_() self.terminate() return self.queue_reject.emit() self.model = Matches(self.fetcher.results) warnings = [(x[0], unicode(x[1])) for x in \ self.fetcher.exceptions if x[1] is not None] if warnings: warnings='<br>'.join(['<b>%s</b>: %s'%(name, exc) for name,exc in warnings]) self.warning.setText('<p><b>'+ _('Warning')+':</b>'+\ _('Could not fetch metadata from:')+\ '<br>'+warnings+'</p>') self.warning.setVisible(True) if self.model.rowCount() < 1: info_dialog(self, _('No metadata found'), _('No metadata found, try adjusting the title and author ' 'or the ISBN key.')).exec_() return
f9006854a088217e0e057d0a583ad7a5d8733301 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/f9006854a088217e0e057d0a583ad7a5d8733301/fetch_metadata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25733, 1893, 12, 2890, 4672, 309, 365, 18, 5754, 264, 18, 291, 67, 11462, 1435, 471, 521, 813, 18, 957, 1435, 300, 365, 18, 1937, 67, 957, 411, 365, 18, 44, 3388, 67, 4684, 30, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25733, 1893, 12, 2890, 4672, 309, 365, 18, 5754, 264, 18, 291, 67, 11462, 1435, 471, 521, 813, 18, 957, 1435, 300, 365, 18, 1937, 67, 957, 411, 365, 18, 44, 3388, 67, 4684, 30, 327, ...
""" Retrieve all the revisions containing this path (no newer than 'rev').
"""Retrieve all the revisions containing this path If given, `rev` is used as a starting point (i.e. no revision ''newer'' than `rev` should be returned).
def get_path_history(self, path, rev=None, limit=None): """ Retrieve all the revisions containing this path (no newer than 'rev'). The result format should be the same as the one of Node.get_history() """ raise NotImplementedError
0091f73d9ddb2e28de9da1a025ba0c0cfaf2b458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/0091f73d9ddb2e28de9da1a025ba0c0cfaf2b458/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 803, 67, 8189, 12, 2890, 16, 589, 16, 5588, 33, 7036, 16, 1800, 33, 7036, 4672, 3536, 5767, 777, 326, 18325, 4191, 333, 589, 225, 971, 864, 16, 1375, 9083, 68, 353, 1399, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 803, 67, 8189, 12, 2890, 16, 589, 16, 5588, 33, 7036, 16, 1800, 33, 7036, 4672, 3536, 5767, 777, 326, 18325, 4191, 333, 589, 225, 971, 864, 16, 1375, 9083, 68, 353, 1399, 48...
gc.move_to(x, self.y-self.cell_border_width/2.0) gc.line_to(x, self.y+self.height+self.cell_border_width/2.0)
gc.move_to(x, self.y) gc.line_to(x, self.y+self.height)
def _draw_grid_lines(self, gc): gc.set_stroke_color(self.cell_border_color_) gc.set_line_dash(self.cell_border_style_) gc.set_line_width(self.cell_border_width)
ef512bbadb70fe942a25ab512540073b0ab2f779 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13166/ef512bbadb70fe942a25ab512540073b0ab2f779/text_grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9446, 67, 5222, 67, 3548, 12, 2890, 16, 8859, 4672, 8859, 18, 542, 67, 16181, 67, 3266, 12, 2890, 18, 3855, 67, 8815, 67, 3266, 67, 13, 8859, 18, 542, 67, 1369, 67, 21817, 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, 389, 9446, 67, 5222, 67, 3548, 12, 2890, 16, 8859, 4672, 8859, 18, 542, 67, 16181, 67, 3266, 12, 2890, 18, 3855, 67, 8815, 67, 3266, 67, 13, 8859, 18, 542, 67, 1369, 67, 21817, 12, ...
self.cpu = self.sensor(case, '@', self.hotstack)
self.case = self.sensor(case, '@', self.hotstack)
def __init__(self, cpu='temp3', case='temp2' , ram='MemTotal'): IdleBarPlugin.__init__(self) self.hotstack = 0 self.case = None if isinstance (cpu,types.StringType): self.cpu = self.sensor(cpu, '@', self.hotstack) else: self.cpu = self.sensor(cpu[0], cpu[1], self.hotstack) if case: if isinstance (case,types.StringType): self.cpu = self.sensor(case, '@', self.hotstack) else: self.cpu = self.sensor(case[0], case[1], self.hotstack)
953ae8df92661bcbc5d580f7cd283c946001766a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/953ae8df92661bcbc5d580f7cd283c946001766a/system.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8326, 2218, 5814, 23, 2187, 648, 2218, 5814, 22, 11, 269, 24975, 2218, 3545, 5269, 11, 4672, 28156, 5190, 3773, 16186, 2738, 972, 12, 2890, 13, 282, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8326, 2218, 5814, 23, 2187, 648, 2218, 5814, 22, 11, 269, 24975, 2218, 3545, 5269, 11, 4672, 28156, 5190, 3773, 16186, 2738, 972, 12, 2890, 13, 282, 365, ...
cursor.execute('SELECT end_balance FROM statement_statement '\ 'ORDER BY date DESC limit 1') if not cursor.rowcount:
statement_ids = self.search( cursor, user, [('journal', '=', value['journal'])], order=[('date','DESC')], limit=1, context=context) if not statement_ids:
def on_change_journal(self, cursor, user, ids, value, context=None): if not value.get('journal'): return {} cursor.execute('SELECT end_balance FROM statement_statement '\ 'ORDER BY date DESC limit 1') if not cursor.rowcount: return {} return {'start_balance': cursor.fetchone()[0]}
ef8babae0bdf5319f4050acfcd7432ae9a88d521 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9288/ef8babae0bdf5319f4050acfcd7432ae9a88d521/statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 22644, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 460, 16, 819, 33, 7036, 4672, 309, 486, 460, 18, 588, 2668, 22644, 11, 4672, 327, 2618, 3021, 67, 2232, 273, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3427, 67, 22644, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 460, 16, 819, 33, 7036, 4672, 309, 486, 460, 18, 588, 2668, 22644, 11, 4672, 327, 2618, 3021, 67, 2232, 273, 365,...
def processing(self): return "/l" def flow_code(self): return "/-"
def processing(self): return "h/h" def flow_code(self): return "-/-"
def processing(self): return "/l"
61494e8ee9c7393e912b5c1a9a5e563ed50a2ea5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/929/61494e8ee9c7393e912b5c1a9a5e563ed50a2ea5/insertCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4929, 12, 2890, 4672, 327, 2206, 80, 6, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4929, 12, 2890, 4672, 327, 2206, 80, 6, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
v = eval(v, {})
v = filter(None, [vi.strip() for vi in v[1:-1].split(',')])
def make_set(container, set_node): import Configuration from Compatibility import getToolByName from Products.Formulator.TALESField import TALESMethod # compatiblity.. ick if not set_node.has_key('title'): set_node['title']='' if not set_node.has_key('description'): set_node['description']='' pm = getToolByName(container, 'portal_metadata') collection = getattr(pm, Configuration.MetadataCollection) collection.addMetadataSet(set_node.id, set_node.ns_prefix, set_node.ns_uri, set_node.title, set_node.description) set = pm.getMetadataSet(set_node.id) for e_node in set_node.elements: # compatiblity.. ick if not e_node.has_key('acquire_p'): e_node['acquire_p'] = 0 if not e_node.has_key('read_only_p'): e_node['read_only_p'] = 0 if not e_node.has_key('index_p'): e_node['index_p'] = 0 # type possible is string, convert to 'boolean' for p in ['index_p', 'acquire_p', 'read_only_p']: try: e_node[p] = not not int(e_node[p]) except ValueError: e_node[p] = 0 set.addMetadataElement(e_node.id, e_node.field_type, e_node.index_type, e_node.index_p, e_node.acquire_p, e_node.read_only_p) element = set.getElement(e_node.id) field = element.field for fv in e_node.field_values: k = fv.key v = fv.value t = fv.type if t == 'int': v = int(v) elif t == 'float': v = float(v) elif t == 'list': # XXX this is incomplete support for lists # the originial version of formulator xml support # did an eval here, which is not an option # XXX we'll make use of this option anyway # metadata sets are edited on the filesystem after all v = eval(v, {}) field.values[k]=v # some sort of formulator hack if e_node.field_type == 'DateTimeField': field.on_value_input_style_changed(field.get_value('input_style')) for ft in e_node.field_tales: if ft.expr: field.tales[ft.key] = TALESMethod(ft.expr) for fm in e_node.field_messages: field.message_values[fm.name]=fm.text constructor_args = {} for iav in e_node.index_args: constructor_args[iav['key']]=iav['value'] element.index_constructor_args = constructor_args
3c61af3069c640aafeb0287b90172273026cd33a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1807/3c61af3069c640aafeb0287b90172273026cd33a/Import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 542, 12, 3782, 16, 444, 67, 2159, 4672, 225, 1930, 4659, 628, 5427, 270, 3628, 1930, 336, 6364, 5911, 628, 8094, 87, 18, 1204, 11775, 18, 9833, 11386, 974, 1930, 399, 37, 113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 542, 12, 3782, 16, 444, 67, 2159, 4672, 225, 1930, 4659, 628, 5427, 270, 3628, 1930, 336, 6364, 5911, 628, 8094, 87, 18, 1204, 11775, 18, 9833, 11386, 974, 1930, 399, 37, 113...
dialog.connect("response", self.open_file_or_folder_response, isfile)
dialog.connect("response", self.open_file_or_folder_response, isfile, recursivebutton)
def open_file_or_folder(self, action, isfile): cancel = self.autosave_image() if cancel: return # If isfile = True, file; If isfile = False, folder dialog = gtk.FileChooserDialog(title=_("Open"),action=gtk.FILE_CHOOSER_ACTION_OPEN,buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_OPEN,gtk.RESPONSE_OK)) if isfile: filter = gtk.FileFilter() filter.set_name(_("Images")) filter.add_pixbuf_formats() dialog.add_filter(filter) filter = gtk.FileFilter() filter.set_name(_("All files")) filter.add_pattern("*") dialog.add_filter(filter) preview = gtk.Image() dialog.set_preview_widget(preview) dialog.set_use_preview_label(False) dialog.connect("update-preview", self.update_preview, preview) else: dialog.set_action(gtk.FILE_CHOOSER_ACTION_SELECT_FOLDER) recursivebutton = gtk.CheckButton(label=_("Include images in subdirectories")) dialog.set_extra_widget(recursivebutton) dialog.set_default_response(gtk.RESPONSE_OK) dialog.set_select_multiple(True) if self.use_last_dir: if self.last_dir != None: dialog.set_current_folder(self.last_dir) else: if self.fixed_dir != None: dialog.set_current_folder(self.fixed_dir) dialog.connect("response", self.open_file_or_folder_response, isfile) response = dialog.show()
5e02f83f21e7874821386f6be3efd7123f12a683 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2291/5e02f83f21e7874821386f6be3efd7123f12a683/mirage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 768, 67, 280, 67, 5609, 12, 2890, 16, 1301, 16, 8814, 4672, 3755, 273, 365, 18, 21996, 836, 67, 2730, 1435, 309, 3755, 30, 327, 468, 971, 8814, 273, 1053, 16, 585, 31, 971,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 768, 67, 280, 67, 5609, 12, 2890, 16, 1301, 16, 8814, 4672, 3755, 273, 365, 18, 21996, 836, 67, 2730, 1435, 309, 3755, 30, 327, 468, 971, 8814, 273, 1053, 16, 585, 31, 971,...
self.setPixmap(QPixmap('/usr/share/pixmaps/fusion-icon.png'))
self.setPixmap(QPixmap('../icons/hicolor/22x22/apps/fusion-icon.png'))
def __init__(self, icon, parent = None, name = "Fusion-Icon"): QLabel.__init__(self, parent, name, Qt.WMouseNoMask |\ Qt.WRepaintNoErase | Qt.WType_TopLevel | Qt.WStyle_Customize |\ Qt.WStyle_NoBorder | Qt.WStyle_StaysOnTop) self.setMinimumSize(22,22); self.setBackgroundMode(Qt.X11ParentRelative) self.setBackgroundOrigin(QWidget.WindowOrigin)
ab81baed0421f5904d68ea4e5a79652b14c09cb7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/909/ab81baed0421f5904d68ea4e5a79652b14c09cb7/interface_qt3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4126, 16, 982, 273, 599, 16, 508, 273, 315, 42, 7063, 17, 5554, 6, 4672, 225, 2024, 873, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 7354, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4126, 16, 982, 273, 599, 16, 508, 273, 315, 42, 7063, 17, 5554, 6, 4672, 225, 2024, 873, 16186, 2738, 972, 12, 2890, 16, 982, 16, 508, 16, 7354, 18, ...
self.storageUsageClient = StorageUsageClient()
self.storageUsageClient = StorageUsageClient()
def initialize( self ): """Sets defaults """ self.replicaManager = ReplicaManager() self.transClient = TransformationClient() self.wmsClient = WMSClient() self.requestClient = RequestClient() self.metadataClient = FileCatalogClient() self.storageUsageClient = StorageUsageClient() self.am_setModuleParam( "shifterProxy", "DataManager" ) self.am_setModuleParam( "shifterProxyLocation", "%s/runit/%s/proxy" % ( gConfig.getValue( '/LocalSite/InstancePath', rootPath ), AGENT_NAME ) ) self.transformationTypes = sortList(self.am_getOption( 'TransformationTypes', ['MCSimulation', 'DataReconstruction', 'DataStripping', 'MCStripping', 'Merge','Replication'])) gLogger.info("Will consider the following transformation types: %s" % str(self.transformationTypes)) self.directoryLocations = sortList(self.am_getOption('DirectoryLocations',['TransformationDB','StorageUsage','MetadataCatalog'])) gLogger.info("Will search for directories in the following locations: %s" % str(self.directoryLocations)) self.transfidmeta = self.am_getOption('TransfIDMeta',"TransformationID") gLogger.info("Will use %s as metadata tag name for TransformationID"%self.transfidmeta) self.archiveAfter = self.am_getOption('ArchiveAfter',7) # days gLogger.info("Will archive Completed transformations after %d days" % self.archiveAfter) self.activeStorages = sortList(self.am_getOption('ActiveSEs',[])) gLogger.info("Will check the following storage elements: %s" % str(self.activeStorages)) self.logSE = self.am_getOption('TransformationLogSE','LogSE') gLogger.info("Will remove logs found on storage element: %s" % self.logSE) return S_OK()
c3853ad0438058db66814335a87076cdaecd2d33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c3853ad0438058db66814335a87076cdaecd2d33/TransformationCleaningAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 3536, 2785, 3467, 3536, 365, 18, 30065, 1318, 273, 16928, 1318, 1435, 365, 18, 2338, 1227, 273, 21274, 1227, 1435, 365, 18, 91, 959, 1227, 273, 678, 3537, 1227, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 3536, 2785, 3467, 3536, 365, 18, 30065, 1318, 273, 16928, 1318, 1435, 365, 18, 2338, 1227, 273, 21274, 1227, 1435, 365, 18, 91, 959, 1227, 273, 678, 3537, 1227, ...
logger.debug("Adding new deps " + str(newdeps))
logger.debug("Package %s: adding new deps %s" \ %(item, str(newdeps)))
def complete(self, metadata, packages, unresolved, debug=False): # perhaps cache arch? #arch = [a for a in self.arches if a in metadata.groups][0] # return newpkg, unknown newpkg = set(packages) unknown = set() work = set(unresolved) seen = set() while work: item = work.pop() seen.add(item) if self.is_package(metadata, item): if debug: logger.debug("Added Package %s" % item) newpkg.add(item) try: newdeps = [x for x in self.get_deps(metadata, item) \ if x not in newpkg and x not in work] if debug and newdeps: logger.debug("Adding new deps " + str(newdeps)) work.update(newdeps) except NoData: continue else: # provides dep try: pset = self.get_provides(metadata, item) if debug: logger.debug("Got provides for %s" % item) logger.debug(pset) if len(pset) == 1: work.update(pset) else: if True not in [p in newpkg for p in pset]: # FIXME: still hacky; unchosen multiple provides still not handled unknown.add(item) except NoData: unknown.add(item) work = work.difference(seen) return (newpkg, unknown)
3419c67e473c171d5cff9b669427da96f71b000c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/3419c67e473c171d5cff9b669427da96f71b000c/Packages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3912, 12, 2890, 16, 1982, 16, 5907, 16, 20573, 16, 1198, 33, 8381, 4672, 468, 26282, 1247, 6637, 35, 468, 991, 273, 306, 69, 364, 279, 316, 365, 18, 991, 281, 309, 279, 316, 1982, 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, 3912, 12, 2890, 16, 1982, 16, 5907, 16, 20573, 16, 1198, 33, 8381, 4672, 468, 26282, 1247, 6637, 35, 468, 991, 273, 306, 69, 364, 279, 316, 365, 18, 991, 281, 309, 279, 316, 1982, 18...
if space.is_true(is_free(space, w_obj1)): if space.is_true(is_free(space, w_obj2)):
if space.is_true(space.is_free(w_obj1)): if space.is_true(space.is_free(w_obj2)):
def eq(w_obj1, w_obj2): if space.is_true(space.is_nb_(w_obj1, w_obj2)): return space.newbool(True) if space.is_true(is_free(space, w_obj1)): if space.is_true(is_free(space, w_obj2)): if space.is_true(alias_of(space, w_obj1, w_obj2)): return space.newbool(True) # and just go on ... return parentfn(wait(space, w_obj1), wait(space, w_obj2))
54c01b836a2e69981f5f892c328d0e5629452fc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/54c01b836a2e69981f5f892c328d0e5629452fc1/logic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7555, 12, 91, 67, 2603, 21, 16, 341, 67, 2603, 22, 4672, 309, 3476, 18, 291, 67, 3767, 12, 2981, 18, 291, 67, 6423, 67, 12, 91, 67, 2603, 21, 16, 341, 67, 2603, 22, 3719, 30, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7555, 12, 91, 67, 2603, 21, 16, 341, 67, 2603, 22, 4672, 309, 3476, 18, 291, 67, 3767, 12, 2981, 18, 291, 67, 6423, 67, 12, 91, 67, 2603, 21, 16, 341, 67, 2603, 22, 3719, 30, 327...
doc = hit.getDocument() ver = long(doc['version']) if ver <= toVersion and UUID(doc['value']) not in keep:
if long(hit.getDocument()['version']) == version:
def purgeDocuments(self, txn, counter, indexSearcher, indexReader, uItem, toVersion=None):
f7036d7f3debee5c923bee7501174e1c46813284 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/f7036d7f3debee5c923bee7501174e1c46813284/FileContainer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12922, 12, 2890, 16, 7827, 16, 3895, 16, 770, 2979, 264, 16, 770, 2514, 16, 582, 1180, 16, 358, 1444, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11668, 12922, 12, 2890, 16, 7827, 16, 3895, 16, 770, 2979, 264, 16, 770, 2514, 16, 582, 1180, 16, 358, 1444, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.always_evaluate(True) self.last_trigger_time = TimeIn.value
self.super(PropertyModifierInt).__init__()
def __init__(self): self.always_evaluate(True) self.last_trigger_time = TimeIn.value self.PropertyInc.value = False self.PropertyDec.value = False self.Enable.value = False self.PropertyStepSize.value = 1 self.PropertyMin.value = 0 self.PropertyMax.value = 100000 self.TriggerTimeDelta.value = 0.05
06bc2489bc34aff885b81bb01041ee2bcf45f8b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8421/06bc2489bc34aff885b81bb01041ee2bcf45f8b1/_property_modifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 9565, 12, 1396, 9829, 1702, 2934, 972, 2738, 972, 1435, 225, 365, 18, 1396, 14559, 18, 1132, 273, 1083, 365, 18, 1396, 1799, 18, 1132, 273, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 9565, 12, 1396, 9829, 1702, 2934, 972, 2738, 972, 1435, 225, 365, 18, 1396, 14559, 18, 1132, 273, 1083, 365, 18, 1396, 1799, 18, 1132, 273, 10...
print print 'Worklog:' print '-' * 78
print '--- Worklog: ---'
def runCommand(self): if len(self._args) > 0: partial = self._args[0] else: partial = '*' bugfiles = self.findBugsByNumOrPartial(self._args[0])
b7a79a59faa44848f167a27fe3f6bb067491a719 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3557/b7a79a59faa44848f167a27fe3f6bb067491a719/showcommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 1968, 13, 405, 374, 30, 4702, 273, 365, 6315, 1968, 63, 20, 65, 469, 30, 4702, 273, 5306, 225, 7934, 2354, 273, 365, 18, 4720, 31559, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31933, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 1968, 13, 405, 374, 30, 4702, 273, 365, 6315, 1968, 63, 20, 65, 469, 30, 4702, 273, 5306, 225, 7934, 2354, 273, 365, 18, 4720, 31559, ...
query_href = req.href.query(group=query.group, groupdesc=query.groupdesc and 1 or None, verbose=query.verbose and 1 or None, **query.constraints)
def display_html(self, context, query): req = context.req db = self.env.get_db_cnx() tickets = query.execute(req, db)
deceff61ea11a3edb845d5d742258b4ea748d1ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/deceff61ea11a3edb845d5d742258b4ea748d1ff/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 67, 2620, 12, 2890, 16, 819, 16, 843, 4672, 1111, 273, 819, 18, 3658, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 24475, 273, 843, 18, 8837, 12, 3658, 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, 2562, 67, 2620, 12, 2890, 16, 819, 16, 843, 4672, 1111, 273, 819, 18, 3658, 1319, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 24475, 273, 843, 18, 8837, 12, 3658, 16,...
self.exclude = string2list(self.options.get('exclude', ''), EXCLUDE)
self.exclude = ( string2list(self.options.get('exclude', ''), []) + EXCLUDE)
def __init__(self, buildout, name, options): self.buildout = buildout self.name = name self.options = options
4e4b7a0280a2b4fb2be5ae0c3e2ac1fdf1e1ade9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9586/4e4b7a0280a2b4fb2be5ae0c3e2ac1fdf1e1ade9/recipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 659, 16, 508, 16, 702, 4672, 365, 18, 3510, 659, 273, 1361, 659, 365, 18, 529, 273, 508, 365, 18, 2116, 273, 702, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1361, 659, 16, 508, 16, 702, 4672, 365, 18, 3510, 659, 273, 1361, 659, 365, 18, 529, 273, 508, 365, 18, 2116, 273, 702, 2, -100, -100, -100, -100, -100...
config.STATUS.replace('%VERSION%', self.bot.version_version)))
config.STATUS).replace('%VERSION%', self.bot.version_version))
def join(self, groupchat, nick=None): if nick == None: nick = self.get_nick(groupchat) else: self.set_nick(groupchat, nick) groupchat = groupchat.replace('\n', '') groupchat = self.bot.g.setdefault(groupchat, new_room(self.bot, groupchat)) p = domish.Element(('jabber:client', 'presence')) p['to'] = u'%s/%s' % (groupchat.jid, nick) p.addElement('status').addContent(options.get_option(groupchat.jid, 'status', \ config.STATUS.replace('%VERSION%', self.bot.version_version))) p.addElement('x', 'http://jabber.org/protocol/muc').addElement('history').__setitem__('maxchars', '0') self.bot.wrapper.send(p) q = self.load_groupchats() if not (groupchat.jid in q): self.dump_groupchats(q+[groupchat.jid]) return groupchat
bd4f676b32b035e2cf9b32baf657bf3037714307 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2729/bd4f676b32b035e2cf9b32baf657bf3037714307/muc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1233, 12, 2890, 16, 1041, 10880, 16, 10909, 33, 7036, 4672, 309, 10909, 422, 599, 30, 10909, 273, 365, 18, 588, 67, 17091, 12, 1655, 10880, 13, 469, 30, 365, 18, 542, 67, 17091, 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, 1233, 12, 2890, 16, 1041, 10880, 16, 10909, 33, 7036, 4672, 309, 10909, 422, 599, 30, 10909, 273, 365, 18, 588, 67, 17091, 12, 1655, 10880, 13, 469, 30, 365, 18, 542, 67, 17091, 12, ...
if len(hatevotes[nickname]) >= (int(round(len(users)*VOTEQUOTA))):
if len(hatevotes[nickname]) >= \ (int(round(len(users) * VOTEQUOTA))):
def checkTimeOut(votes): if votes[0][1] + TIMEOUT > time(): return votes # no votes have timed out elif len(votes) > 1: return checkTimeOut(votes[1:]) # oldest vote has timed out, continue checking else: return [] # no valid vote left
17c61548967182a27edf171b75277fa10ff63052 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14907/17c61548967182a27edf171b75277fa10ff63052/scherbengericht.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 950, 1182, 12, 27800, 4672, 309, 19588, 63, 20, 6362, 21, 65, 397, 24374, 405, 813, 13332, 327, 19588, 10792, 468, 1158, 19588, 1240, 7491, 596, 1327, 562, 12, 27800, 13, 405, 404, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 950, 1182, 12, 27800, 4672, 309, 19588, 63, 20, 6362, 21, 65, 397, 24374, 405, 813, 13332, 327, 19588, 10792, 468, 1158, 19588, 1240, 7491, 596, 1327, 562, 12, 27800, 13, 405, 404, ...
def _save(db):
def _save(db, lock): if not lock.locked(): raise LockFile.NotLockedError
def _save(db): # Lock must be acquired. evictions = db['evictions'] now = time.time() for cookie, data in db.items(): if cookie in ('evictions', 'version'): continue timestamp = evictions[cookie] if now > timestamp: # The entry is stale, so remove it. del db[cookie] del evictions[cookie] # Clean out any bogus eviction entries. for cookie in evictions.keys(): if not db.has_key(cookie): del evictions[cookie] db['version'] = mm_cfg.PENDING_FILE_SCHEMA_VERSION omask = os.umask(007) # Always save this as a pickle (safely), and after that succeeds, blow # away any old marshal file. tmpfile = PCKFILE + '.tmp' fp = None try: fp = open(tmpfile, 'w') cPickle.dump(db, fp) fp.close() fp = None os.rename(tmpfile, PCKFILE) if os.path.exists(DBFILE): os.remove(DBFILE) finally: if fp: fp.close() os.umask(omask)
496da7301195b3472cf282c56be0463c46ff842a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/496da7301195b3472cf282c56be0463c46ff842a/Pending.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 12, 1966, 4672, 468, 3488, 1297, 506, 20598, 18, 23606, 87, 273, 1319, 3292, 73, 15712, 87, 3546, 2037, 273, 813, 18, 957, 1435, 364, 3878, 16, 501, 316, 1319, 18, 3319, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 12, 1966, 4672, 468, 3488, 1297, 506, 20598, 18, 23606, 87, 273, 1319, 3292, 73, 15712, 87, 3546, 2037, 273, 813, 18, 957, 1435, 364, 3878, 16, 501, 316, 1319, 18, 3319, 133...
(?: \s+ | ( [^\s[\](){} )+
[^[\](){}
def dump(*stuff): sys.__stdout__.write(string.join(map(str, stuff), " ") + "\n")
4cc70e65630de507fbdf3a38a192284618d3f7ac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/4cc70e65630de507fbdf3a38a192284618d3f7ac/PyParse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4657, 30857, 334, 3809, 4672, 2589, 16186, 10283, 25648, 2626, 12, 1080, 18, 5701, 12, 1458, 12, 701, 16, 10769, 3631, 315, 9369, 397, 1548, 82, 7923, 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, 0, 0, 0, 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, 4657, 30857, 334, 3809, 4672, 2589, 16186, 10283, 25648, 2626, 12, 1080, 18, 5701, 12, 1458, 12, 701, 16, 10769, 3631, 315, 9369, 397, 1548, 82, 7923, 2, -100, -100, -100, -100, -100, -1...
self.sslContext.set_session_id( "DISETConnection" )
self.sslContext.set_session_id( "DISETConnection%s" % str( time.time() ) )
def __generateServerContext( self ): self.__generateContextWithCerts() self.sslContext.set_session_id( "DISETConnection" ) self.sslContext.get_cert_store().set_flags( crypto.X509_CRL_CHECK ) self.sslContext.set_GSI_verify()
9801ffecbe0282410390a58cb9648f323169d375 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/9801ffecbe0282410390a58cb9648f323169d375/SocketInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7163, 2081, 1042, 12, 365, 262, 30, 365, 16186, 7163, 1042, 1190, 16273, 1435, 365, 18, 8157, 1042, 18, 542, 67, 3184, 67, 350, 12, 315, 2565, 4043, 1952, 9, 87, 6, 738, 609, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 7163, 2081, 1042, 12, 365, 262, 30, 365, 16186, 7163, 1042, 1190, 16273, 1435, 365, 18, 8157, 1042, 18, 542, 67, 3184, 67, 350, 12, 315, 2565, 4043, 1952, 9, 87, 6, 738, 609, 1...
EXAMPLES::
.. SEEALSO:: - :func:`CRT_list` EXAMPLES: Using ``crt`` by giving it pairs of residues and moduli::
def crt(a,b,m=None,n=None): r""" Returns a solution to a Chinese Remainder Theorem problem. INPUT: - ``a``, ``b`` - two residues (elements of some ring for which extended gcd is available), or two lists, one of residues and one of moduli. - ``m``, ``n`` - two moduli, or None. OUTPUT: If ``m``, ``n`` are not None, returns a solution `x` to the simultaneous congruences `x\equiv a \bmod m` and `x\equiv b \bmod n`, if one exists; which is if and only if `a\equiv b\pmod{\gcd(m,n)}` by the Chinese Remainder Theorem. The solution `x` is only well-defined modulo lcm`(m,n)`. If ``a`` and ``b`` are lists, returns a simultaneous solution to the congruences `x\equiv a_i\pmod{b_i}`, if one exists. EXAMPLES:: sage: crt(2, 1, 3, 5) 11 sage: crt(13,20,100,301) 28013 You can also use upper case:: sage: c = CRT(2,3, 3, 5); c 8 sage: c % 3 == 2 True sage: c % 5 == 3 True Note that this also works for polynomial rings:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<y> = K[] sage: f = y^2 + 3 sage: g = y^3 - 5 sage: CRT(1,3,f,g) -3/26*y^4 + 5/26*y^3 + 15/26*y + 53/26 sage: CRT(1,a,f,g) (-3/52*a + 3/52)*y^4 + (5/52*a - 5/52)*y^3 + (15/52*a - 15/52)*y + 27/52*a + 25/52 You can also do this for any number of moduli:: sage: K.<a> = NumberField(x^3 - 7) sage: R.<x> = K[] sage: CRT([], []) 0 sage: CRT([a], [x]) a sage: f = x^2 + 3 sage: g = x^3 - 5 sage: h = x^5 + x^2 - 9 sage: k = CRT([1, a, 3], [f, g, h]); k (127/26988*a - 5807/386828)*x^9 + (45/8996*a - 33677/1160484)*x^8 + (2/173*a - 6/173)*x^7 + (133/6747*a - 5373/96707)*x^6 + (-6/2249*a + 18584/290121)*x^5 + (-277/8996*a + 38847/386828)*x^4 + (-135/4498*a + 42673/193414)*x^3 + (-1005/8996*a + 470245/1160484)*x^2 + (-1215/8996*a + 141165/386828)*x + 621/8996*a + 836445/386828 sage: k.mod(f) 1 sage: k.mod(g) a sage: k.mod(h) 3 If the moduli are not coprime, a solution may not exist:: sage: crt(4,8,8,12) 20 sage: crt(4,6,8,12) Traceback (most recent call last): ... ValueError: No solution to crt problem since gcd(8,12) does not divide 4-6 sage: x = polygen(QQ) sage: crt(2,3,x-1,x+1) -1/2*x + 5/2 sage: crt(2,x,x^2-1,x^2+1) -1/2*x^3 + x^2 + 1/2*x + 1 sage: crt(2,x,x^2-1,x^3-1) Traceback (most recent call last): ... ValueError: No solution to crt problem since gcd(x^2 - 1,x^3 - 1) does not divide 2-x """ if isinstance(a,list): return CRT_list(a,b) g, alpha, beta = XGCD(m,n) q,r = (b-a).quo_rem(g) if r!=0: raise ValueError, "No solution to crt problem since gcd(%s,%s) does not divide %s-%s"%(m,n,a,b) return (a+q*alpha*m) % lcm(m,n)
c4c4857b06059d9fdba46cbaf64ffd83c3f8bac4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/c4c4857b06059d9fdba46cbaf64ffd83c3f8bac4/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2860, 279, 6959, 358, 279, 1680, 25331, 2663, 25407, 1021, 479, 81, 6199, 18, 225, 12943, 30, 225, 300, 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, 30677, 12, 69, 16, 70, 16, 81, 33, 7036, 16, 82, 33, 7036, 4672, 436, 8395, 2860, 279, 6959, 358, 279, 1680, 25331, 2663, 25407, 1021, 479, 81, 6199, 18, 225, 12943, 30, 225, 300, 12...
parts.host, parts.port or 80)
parts.netloc)
def __init__(self, parser, args): super(XMLRPCCommand, self).__init__(parser, args) parts = urlparse.urlsplit(args.dashboard_url) if args.username and args.password: netloc = "%s:%s@%s:%d" % ( args.username, args.password, parts.host, parts.port or 80) else: netloc = parts.netloc urltext = urlparse.urlunsplit((parts.scheme, netloc, "/xml-rpc/", "", "")) self.server = xmlrpclib.ServerProxy(urltext, use_datetime=True, allow_none=True, verbose=args.verbose_xml_rpc)
d8372aad4212bb869971e6367b3db61691b43d75 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7382/d8372aad4212bb869971e6367b3db61691b43d75/dashboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 833, 4672, 2240, 12, 4201, 8087, 2189, 16, 365, 2934, 972, 2738, 972, 12, 4288, 16, 833, 13, 2140, 273, 15185, 18, 718, 4939, 12, 1968, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2082, 16, 833, 4672, 2240, 12, 4201, 8087, 2189, 16, 365, 2934, 972, 2738, 972, 12, 4288, 16, 833, 13, 2140, 273, 15185, 18, 718, 4939, 12, 1968, 18, 1...
if self.testRunner is None: self.testRunner = TextTestRunner(verbosity=self.verbosity) result = self.testRunner.run(self.test)
if isinstance(self.testRunner, (type, types.ClassType)): try: testRunner = self.testRunner(verbosity=self.verbosity) except TypeError: testRunner = self.testRunner() else: testRunner = self.testRunner result = testRunner.run(self.test)
def runTests(self): if self.testRunner is None: self.testRunner = TextTestRunner(verbosity=self.verbosity) result = self.testRunner.run(self.test) sys.exit(not result.wasSuccessful())
e9be2a8e19e37c7e6d2c4452c86a735e55cf3576 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/e9be2a8e19e37c7e6d2c4452c86a735e55cf3576/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 14650, 12, 2890, 4672, 309, 1549, 12, 2890, 18, 3813, 9709, 16, 261, 723, 16, 1953, 18, 18328, 3719, 30, 775, 30, 1842, 9709, 273, 365, 18, 3813, 9709, 12, 16629, 8807, 33, 2890,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 14650, 12, 2890, 4672, 309, 1549, 12, 2890, 18, 3813, 9709, 16, 261, 723, 16, 1953, 18, 18328, 3719, 30, 775, 30, 1842, 9709, 273, 365, 18, 3813, 9709, 12, 16629, 8807, 33, 2890,...
self.description = None
self.title = None
def __init__(self, name): self.name = name self.description = None self.maintainer = None self.complete = False # *packages* maps a set of tags to *Package* instances. A *Package* # contains dependencies to install a project from a binary distribution. self.packages = {} self.patch = None self.repository = None self.installedVersion = None
4a9bbf3c5ea7429f402e63ad28ed48a40972ea00 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/4a9bbf3c5ea7429f402e63ad28ed48a40972ea00/dws.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 2649, 273, 599, 365, 18, 81, 1598, 1521, 273, 599, 365, 18, 6226, 273, 1083, 468, 380, 10308, 14, 7565, 279...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 4672, 365, 18, 529, 273, 508, 365, 18, 2649, 273, 599, 365, 18, 81, 1598, 1521, 273, 599, 365, 18, 6226, 273, 1083, 468, 380, 10308, 14, 7565, 279...
self.in_list_item = 0
self.in_list_item = False
def format(self, text, out, escape_newlines=False): self.out = out self._open_tags = [] self._list_stack = []
f810b18d112c077bd62642b4be3834c17653a926 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/f810b18d112c077bd62642b4be3834c17653a926/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 977, 16, 596, 16, 4114, 67, 31276, 33, 8381, 4672, 365, 18, 659, 273, 596, 365, 6315, 3190, 67, 4156, 273, 5378, 365, 6315, 1098, 67, 3772, 273, 5378, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 977, 16, 596, 16, 4114, 67, 31276, 33, 8381, 4672, 365, 18, 659, 273, 596, 365, 6315, 3190, 67, 4156, 273, 5378, 365, 6315, 1098, 67, 3772, 273, 5378, 2, -100, -10...
from timing import start, finish, milli
def time(function,*args,**kwargs): from timing import start, finish, milli repeat_range=range(repeat_count) apply(function,args,kwargs) start() for i in repeat_range: apply(function,args,kwargs) finish() return float(milli())/len(repeat_range)
ae9f1be84782f767256031744538ea72bc3962de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ae9f1be84782f767256031744538ea72bc3962de/Test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 12, 915, 16, 14, 1968, 16, 636, 4333, 4672, 7666, 67, 3676, 33, 3676, 12, 9374, 67, 1883, 13, 2230, 12, 915, 16, 1968, 16, 4333, 13, 787, 1435, 364, 277, 316, 7666, 67, 3676, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 813, 12, 915, 16, 14, 1968, 16, 636, 4333, 4672, 7666, 67, 3676, 33, 3676, 12, 9374, 67, 1883, 13, 2230, 12, 915, 16, 1968, 16, 4333, 13, 787, 1435, 364, 277, 316, 7666, 67, 3676, ...
qx_icon_path = "/Users/fabianpb/Desktop/icon-convert/qx/16" tango_icon_path = "/Users/fabianpb/opt/tango/share/icons/Tango/16x16"
if not output in ["html", "patch", "info", "debug"]: raise Usage("invalid parameter for output.")
def main(argv=None): if argv is None: argv = sys.argv try: try: opts, args = getopt.getopt(argv[1:], "ho:v", ["help", "output="]) except getopt.error, msg: raise Usage(msg) # option processing for option, value in opts: if option == "-v": verbose = True if option in ("-h", "--help"): raise Usage(help_message) if option in ("-o", "--output"): output = value qx_icon_path = "/Users/fabianpb/Desktop/icon-convert/qx/16" tango_icon_path = "/Users/fabianpb/opt/tango/share/icons/Tango/16x16" #tango_icon_path = "/Users/fabianpb/Desktop/icon-convert/tg/Tango/16x16" #tango_icon_path = "/Users/fabianpb/Desktop/icon-convert/fd/nuvola/16x16" (qx_to_tango_map, qx_not_in_tango, qx_in_tango_without_image) = fix_names(qx_icon_path, tango_icon_path) print get_html(qx_to_tango_map, qx_not_in_tango, qx_in_tango_without_image, qx_icon_path, tango_icon_path) #print get_migration_info(qx_to_tango_map, qx_not_in_tango, qx_in_tango_without_image, qx_icon_path, tango_icon_path) #print get_migration_patch(qx_to_tango_map, qx_not_in_tango, qx_in_tango_without_image, qx_icon_path, tango_icon_path) except Usage, err: print >> sys.stderr, sys.argv[0].split("/")[-1] + ": " + str(err.msg) print >> sys.stderr, "\t for help use --help" return 2
2f300aed26339cba4d5a8bd9454aed0f1c939a9f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/2f300aed26339cba4d5a8bd9454aed0f1c939a9f/fix-names.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 19485, 63, 21, 30, 6487, 315...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 33, 7036, 4672, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 19485, 63, 21, 30, 6487, 315...
libc.memcpy(self._data, p, len(str)) self._pos += len(str)
libc.memcpy(self._data, p, data_len) self._pos += data_len
def write(self, str): self._check_valid() self._check_writeable() if self._pos + len(str) > self._size: raise OperationError(self.space.w_ValueError, self.space.wrap("data out of range")) p = c_char_p(str) libc.memcpy(self._data, p, len(str)) self._pos += len(str)
490daf5312c57c5b8ec887614c2449486a62ac47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/490daf5312c57c5b8ec887614c2449486a62ac47/interp_mmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 609, 4672, 365, 6315, 1893, 67, 877, 1435, 365, 6315, 1893, 67, 2626, 429, 1435, 225, 309, 365, 6315, 917, 397, 562, 12, 701, 13, 405, 365, 6315, 1467, 30, 1002, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 609, 4672, 365, 6315, 1893, 67, 877, 1435, 365, 6315, 1893, 67, 2626, 429, 1435, 225, 309, 365, 6315, 917, 397, 562, 12, 701, 13, 405, 365, 6315, 1467, 30, 1002, ...
if uglynumber.startswith("1") and len(uglynumber) == 11:
if uglynumber.startswith("+"): pass elif uglynumber.startswith("1") and len(uglynumber) == 11:
def normalize_number(prettynumber): """ function to take a phone number and strip out all non-numeric characters >>> normalize_number("+012-(345)-678-90") '+01234567890' >>> normalize_number("1-(345)-678-9000") '+13456789000' >>> normalize_number("+1-(345)-678-9000") '+13456789000' """ uglynumber = re.sub('[^0-9+]', '', prettynumber) if uglynumber.startswith("1") and len(uglynumber) == 11: uglynumber = "+"+uglynumber elif len(uglynumber) == 10: uglynumber = "+1"+uglynumber #validateRe = re.compile("^\+?[0-9]{10,}$") #assert validateRe.match(uglynumber) is not None return uglynumber
d5e83934d71da982e8a0b671254dd0be4ee87838 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13096/d5e83934d71da982e8a0b671254dd0be4ee87838/misc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3883, 67, 2696, 12, 1484, 748, 878, 1226, 4672, 3536, 445, 358, 4862, 279, 7353, 1300, 471, 2569, 596, 777, 1661, 17, 5246, 3949, 225, 4080, 3883, 67, 2696, 2932, 15, 1611, 22, 17, 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, 3883, 67, 2696, 12, 1484, 748, 878, 1226, 4672, 3536, 445, 358, 4862, 279, 7353, 1300, 471, 2569, 596, 777, 1661, 17, 5246, 3949, 225, 4080, 3883, 67, 2696, 2932, 15, 1611, 22, 17, 12,...
self.OC_ci = _OSAComponentInstance(_OpenDefaultComponent(kOSAComponentType, type))
self.OC_ci = OSAComponentInstance(OpenDefaultComponent(kOSAComponentType, type))
def __init__(self, type='ascr', codecs=_defaultCodecs): self._type = type self.OC_codecs = codecs self.OC_ci = _OSAComponentInstance(_OpenDefaultComponent(kOSAComponentType, type)) self.OC_compilecallbacks = (None, None, None, None) self.OC_recordcallbacks = (None, None, None, None) self.OC_runcallbacks = (None, None, None, None)
306228947d4bfcdb8563cb28c775f7d9b6adfd5a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10961/306228947d4bfcdb8563cb28c775f7d9b6adfd5a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 2218, 345, 3353, 2187, 17437, 33, 67, 1886, 1085, 2143, 4672, 365, 6315, 723, 273, 618, 365, 18, 10809, 67, 710, 2143, 273, 17437, 365, 18, 10809, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 2218, 345, 3353, 2187, 17437, 33, 67, 1886, 1085, 2143, 4672, 365, 6315, 723, 273, 618, 365, 18, 10809, 67, 710, 2143, 273, 17437, 365, 18, 10809, 6...
elif w_bigint2.sign == 0: return w_bigint1 shiftby = w_bigint2.toint() a = w_bigint1
elif other.sign == 0: return self shiftby = other.toint()
def lshift(w_bigint1, w_bigint2): if w_bigint2.sign < 0: raise ValueError("negative shift count") elif w_bigint2.sign == 0: return w_bigint1 shiftby = w_bigint2.toint()
87da397eba037ce53e8c5847c7c4b29acfda97b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/87da397eba037ce53e8c5847c7c4b29acfda97b2/rbigint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4012, 12, 91, 67, 14002, 474, 21, 16, 341, 67, 14002, 474, 22, 4672, 309, 341, 67, 14002, 474, 22, 18, 2977, 411, 374, 30, 1002, 2068, 2932, 13258, 4654, 1056, 7923, 1327, 341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4012, 12, 91, 67, 14002, 474, 21, 16, 341, 67, 14002, 474, 22, 4672, 309, 341, 67, 14002, 474, 22, 18, 2977, 411, 374, 30, 1002, 2068, 2932, 13258, 4654, 1056, 7923, 1327, 341, ...
print "blue_text '%s'" %(blue_text)
def updateState(self): if self.timer[0] is not None: green_text = self["key_green"].getText() print "green_text '%s'" %(green_text) if self.timer[0].disabled and green_text != _("Enable"): self["actions"].actions.update({"green":self.toggleTimer1}) self["key_green"].setText(_("Enable")) self["key_green"].instance.invalidate() elif self.timer[0].isRunning() and green_text != "": del self["actions"].actions["green"] self["key_green"].setText("") self["key_green"].instance.invalidate() elif not self.timer[0].disabled and green_text != _("Disable"): self["actions"].actions.update({"green":self.toggleTimer1}) self["key_green"].setText(_("Disable")) self["key_green"].instance.invalidate() if len(self.timer) > 1: x = self["list"].getSelectedIndex() print "x: ",x print "timer[x]: ", self.timer[x] if self.timer[x] is not None: blue_text = self["key_blue"].getText() print "blue_text '%s'" %(blue_text) if self.timer[x].disabled and blue_text != _("Enable"): self["actions"].actions.update({"blue":self.toggleTimer2}) self["key_blue"].setText(_("Enable")) self["key_blue"].instance.invalidate() elif self.timer[x].isRunning() and blue_text != "": del self["actions"].actions["blue"] self["key_blue"].setText("") self["key_blue"].instance.invalidate() elif not self.timer[x].disabled and blue_text != _("Disable"): self["actions"].actions.update({"blue":self.toggleTimer2}) self["key_blue"].setText(_("Disable")) self["key_blue"].instance.invalidate() else:
b227fb3853c96c073116b784c93c653cafda99f7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/b227fb3853c96c073116b784c93c653cafda99f7/TimerEdit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1119, 12, 2890, 4672, 309, 365, 18, 12542, 63, 20, 65, 353, 486, 599, 30, 10004, 67, 955, 273, 365, 9614, 856, 67, 11571, 6, 8009, 588, 1528, 1435, 1172, 315, 11571, 67, 955, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1119, 12, 2890, 4672, 309, 365, 18, 12542, 63, 20, 65, 353, 486, 599, 30, 10004, 67, 955, 273, 365, 9614, 856, 67, 11571, 6, 8009, 588, 1528, 1435, 1172, 315, 11571, 67, 955, 1...
if nadeData != None: self.order[len(self.order)+1] = nadeData if knifeData != None: self.order[len(self.order)+1] = knifeData
for weapon in nadeData: self.order[len(self.order)+1] = weapon for weapon in knifeData: self.order[len(self.order)+1] = weapon
def __set_weapon_order_type(self, type): # ===================================================================== # RANDOM WEAPON ORDER # ===================================================================== if type == '#random': # Get weapons weapons = self.order.values()
2f22a91521a8eefc4faac36b3a3525a48c2f568c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4555/2f22a91521a8eefc4faac36b3a3525a48c2f568c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 67, 1814, 28629, 67, 1019, 67, 723, 12, 2890, 16, 618, 4672, 468, 422, 9917, 12275, 468, 534, 28159, 13880, 2203, 673, 10205, 468, 422, 9917, 12275, 309, 618, 422, 2946, 9188,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 542, 67, 1814, 28629, 67, 1019, 67, 723, 12, 2890, 16, 618, 4672, 468, 422, 9917, 12275, 468, 534, 28159, 13880, 2203, 673, 10205, 468, 422, 9917, 12275, 309, 618, 422, 2946, 9188,...
copier = robocopy.PyRobocopier(generator._console) args = ['-c', '-s', '-x'] + [",".join(self.skip_list)] + [srcPath, targPath]
copier = copytool.CopyTool(generator._console) args = ['-s', '-u', '-x'] + [",".join(self.skip_list)] + [srcPath, targPath]
def _copyResources(self, srcPath, targPath): # targPath *has* to be directory -- there is now way of telling a # non-existing target file from a non-existing target directory :-) generator = self #generator._console.debug("_copyResource: %s => %s" % (srcPath, targPath)) #copier = copytool.CopyTool(generator._console) #args = ['-s', '-u', '-x'] + [",".join(self.skip_list)] + [srcPath, targPath] copier = robocopy.PyRobocopier(generator._console) args = ['-c', '-s', '-x'] + [",".join(self.skip_list)] + [srcPath, targPath] copier.parse_args(args) copier.do_work()
c9e81ba1f72846b84ebc98055a8f1056fb8d2081 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/c9e81ba1f72846b84ebc98055a8f1056fb8d2081/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 3805, 12, 2890, 16, 19497, 16, 24202, 743, 4672, 468, 24202, 743, 380, 5332, 14, 358, 506, 1867, 225, 1493, 1915, 353, 2037, 4031, 434, 9276, 310, 279, 468, 1661, 17, 11711, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3530, 3805, 12, 2890, 16, 19497, 16, 24202, 743, 4672, 468, 24202, 743, 380, 5332, 14, 358, 506, 1867, 225, 1493, 1915, 353, 2037, 4031, 434, 9276, 310, 279, 468, 1661, 17, 11711, ...
homedir = os.path.dirname(sys.argv[0])
homedir = "/tmp"
def main(): form = cgi.FieldStorage() print "Content-type: text/html" print cmd = form.getvalue("cmd") or "view" page = form.getvalue("page") or "FrontPage" wiki = WikiPage(page) wiki.load() method = getattr(wiki, 'cmd_' + cmd, None) or wiki.cmd_view method(form)
48123b266cd8d041ca6d66f148c3a6c054b2cc00 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/48123b266cd8d041ca6d66f148c3a6c054b2cc00/cgi3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 646, 273, 276, 10052, 18, 974, 3245, 1435, 1172, 315, 1350, 17, 723, 30, 977, 19, 2620, 6, 1172, 1797, 273, 646, 18, 588, 1132, 2932, 4172, 7923, 578, 315, 1945, 6, 1363, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 646, 273, 276, 10052, 18, 974, 3245, 1435, 1172, 315, 1350, 17, 723, 30, 977, 19, 2620, 6, 1172, 1797, 273, 646, 18, 588, 1132, 2932, 4172, 7923, 578, 315, 1945, 6, 1363, ...
static const char *gen_filepath(int no) {
static const char *gen_filepath(int no, int nr ATTRIBUTE_UNUSED) {
def is_known_param_type(name): for type in known_param_types: if type == name: return 1 return 0
3d97e669eca6f4849c7b3014f472cacc57817015 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12659/3d97e669eca6f4849c7b3014f472cacc57817015/gentest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2994, 67, 891, 67, 723, 12, 529, 4672, 364, 618, 316, 4846, 67, 891, 67, 2352, 30, 309, 618, 422, 508, 30, 327, 404, 327, 374, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 2994, 67, 891, 67, 723, 12, 529, 4672, 364, 618, 316, 4846, 67, 891, 67, 2352, 30, 309, 618, 422, 508, 30, 327, 404, 327, 374, 225, 2, -100, -100, -100, -100, -100, -100, ...
MapBuffer.write('\n\n%s (Fix Memory Offset, BaseAddress=-0x%010X, EntryPoint=-0x%010X)\n' % (ModuleName, 0 - BaseAddress, 0 - (BaseAddress + ModuleInfo.Image.EntryPoint)))
MapBuffer.write('\n\n%s (Fixed Memory Offset, BaseAddress=-0x%010X, EntryPoint=-0x%010X)\n' % (ModuleName, 0 - BaseAddress, 0 - (BaseAddress + ModuleInfo.Image.EntryPoint)))
def _RebaseModule (self, MapBuffer, BaseAddress, ModuleList, AddrIsOffset = True, ModeIsSmm = False): if ModeIsSmm: AddrIsOffset = False InfFileNameList = ModuleList.keys() #InfFileNameList.sort() for InfFile in InfFileNameList: sys.stdout.write (".") sys.stdout.flush() ModuleInfo = ModuleList[InfFile] ModuleName = ModuleInfo.BaseName ## for SMM module in SMRAM, the SMRAM will be allocated from base to top. if not ModeIsSmm: BaseAddress = BaseAddress - ModuleInfo.Image.Size # # Update Image to new BaseAddress by GenFw tool # LaunchCommand(["GenFw", "--rebase", str(BaseAddress), "-r", ModuleInfo.Image.FileName], ModuleInfo.OutpuDir) else: # # Set new address to the section header only for SMM driver. # LaunchCommand(["GenFw", "--address", str(BaseAddress), "-r", ModuleInfo.Image.FileName], ModuleInfo.OutpuDir) # # Add general information. # if ModeIsSmm: MapBuffer.write('\n\n%s (Fix SMRAM Offset, BaseAddress=0x%010X, EntryPoint=0x%010X)\n' % (ModuleName, BaseAddress, BaseAddress + ModuleInfo.Image.EntryPoint)) elif AddrIsOffset: MapBuffer.write('\n\n%s (Fix Memory Offset, BaseAddress=-0x%010X, EntryPoint=-0x%010X)\n' % (ModuleName, 0 - BaseAddress, 0 - (BaseAddress + ModuleInfo.Image.EntryPoint))) else: MapBuffer.write('\n\n%s (Fix Memory Address, BaseAddress=0x%010X, EntryPoint=0x%010X)\n' % (ModuleName, BaseAddress, BaseAddress + ModuleInfo.Image.EntryPoint)) # # Add guid and general seciton section. # TextSectionAddress = 0 DataSectionAddress = 0 for SectionHeader in ModuleInfo.Image.SectionHeaderList: if SectionHeader[0] == '.text': TextSectionAddress = SectionHeader[1] elif SectionHeader[1] == '.data': DataSectionAddress = SectionHeader[1] if AddrIsOffset: MapBuffer.write('(GUID=%s, .textbaseaddress=-0x%010X, .databaseaddress=-0x%010X)\n\n' % (ModuleInfo.Guid, 0 - (BaseAddress + TextSectionAddress), 0 - (BaseAddress + DataSectionAddress))) else: MapBuffer.write('(GUID=%s, .textbaseaddress=0x%010X, .databaseaddress=0x%010X)\n\n' % (ModuleInfo.Guid, BaseAddress + TextSectionAddress, BaseAddress + DataSectionAddress)) # # Add funtion address # ImageMapTable = ModuleInfo.Image.FileName.replace('.efi', '.map') if not os.path.exists(ImageMapTable): continue ImageMap = open (ImageMapTable, 'r') for LinStr in ImageMap: if len (LinStr.strip()) == 0: continue StrList = LinStr.split() if len (StrList) > 4: if StrList[3] == 'f' or StrList[3] =='F': if AddrIsOffset: MapBuffer.write(' -0x%010X %s\n' % (0 - (BaseAddress + int (StrList[2], 16)), StrList[1])) else: MapBuffer.write(' 0x%010X %s\n' % (BaseAddress + int (StrList[2], 16), StrList[1])) ImageMap.close()
ef3747968bba5f59e31e3a867cfc32eb8a676f78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/914/ef3747968bba5f59e31e3a867cfc32eb8a676f78/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 426, 1969, 3120, 261, 2890, 16, 1635, 1892, 16, 3360, 1887, 16, 5924, 682, 16, 10216, 2520, 2335, 273, 1053, 16, 8126, 2520, 55, 7020, 273, 1083, 4672, 309, 8126, 2520, 55, 7020, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 426, 1969, 3120, 261, 2890, 16, 1635, 1892, 16, 3360, 1887, 16, 5924, 682, 16, 10216, 2520, 2335, 273, 1053, 16, 8126, 2520, 55, 7020, 273, 1083, 4672, 309, 8126, 2520, 55, 7020, ...
raise Exception('Couldn\'t find %s in %s, referenced by %s' % (
raise gclient_utils.Error( 'Couldn\'t find %s in %s, referenced by %s' % (
def LateOverride(self, url): """Resolves the parsed url from url.
21a852a5adfcef94e3f326c8281ddef4c796f902 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/21a852a5adfcef94e3f326c8281ddef4c796f902/gclient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 340, 6618, 12, 2890, 16, 880, 4672, 3536, 17453, 326, 2707, 880, 628, 880, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 511, 340, 6618, 12, 2890, 16, 880, 4672, 3536, 17453, 326, 2707, 880, 628, 880, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for st in streams:
for i in range(len(self.streams))[::-1]: st = self.streams[i]
def __init__(self, streams = None, options = None): self.streams = streams self.options = options #Define some flags, dictionaries and plotting options self.flagFilt=False #False:no filter True:filter self.flagFiltTyp=0 #0: bandpass 1: bandstop 2:lowpass 3: highpass self.dictFiltTyp={'Bandpass':0, 'Bandstop':1, 'Lowpass':2, 'Highpass':3} self.flagFiltZPH=False #False: no zero-phase True: zero-phase filtering self.valFiltLow=np.NaN # These are overridden with low/high estimated from sampling rate self.valFiltHigh=np.NaN self.flagWheelZoom=True #Switch use of mousewheel for zooming self.flagPhase=0 #0:P 1:S 2:Magnitude self.dictPhase={'P':0, 'S':1, 'Mag':2} self.dictPhaseInverse = {} # We need the reverted dictionary for switching throug the Phase radio button for i in self.dictPhase.items(): self.dictPhaseInverse[i[1]] = i[0] self.dictPhaseColors={'P':'red', 'S':'blue', 'Psynth':'black', 'Ssynth':'black', 'Mag':'green'} self.dictPhaseLinestyles={'P':'-', 'S':'-', 'Psynth':'--', 'Ssynth':'--'} self.pickingColor = self.dictPhaseColors['P'] self.magPickWindow=10 #Estimating the maximum/minimum in a sample-window around click self.magMinMarker='x' self.magMaxMarker='x' self.magMarkerEdgeWidth=1.8 self.magMarkerSize=20 self.axvlinewidths=1.2 #dictionary for key-bindings self.dictKeybindings = {'setPick': 'alt', 'setPickError': ' ', 'delPick': 'escape', 'setMagMin': 'alt', 'setMagMax': ' ', 'switchPhase': 'control', 'delMagMinMax': 'escape', 'switchWheelZoom': 'z', 'switchPan': 'p', 'prevStream': 'y', 'nextStream': 'x', 'setPWeight0': '0', 'setPWeight1': '1', 'setPWeight2': '2', 'setPWeight3': '3', # 'setPWeight4': '4', 'setPWeight5': '5', 'setSWeight0': '0', 'setSWeight1': '1', 'setSWeight2': '2', 'setSWeight3': '3', # 'setSWeight4': '4', 'setSWeight5': '5', 'setPPolUp': 'u', 'setPPolPoorUp': '+', 'setPPolDown': 'd', 'setPPolPoorDown': '-', 'setSPolUp': 'u', 'setSPolPoorUp': '+', 'setSPolDown': 'd', 'setSPolPoorDown': '-', 'setPOnsetImpulsive': 'i', 'setPOnsetEmergent': 'e', 'setSOnsetImpulsive': 'i', 'setSOnsetEmergent': 'e'} self.threeDlocPath = '/baysoft/obspyck/3dloc/' self.threeDlocOutfile = self.threeDlocPath + '3dloc-out' self.threeDlocInfile = self.threeDlocPath + '3dloc-in' self.threeDlocPreCall = 'rm %s %s &> /dev/null' \ % (self.threeDlocOutfile, self.threeDlocInfile) self.threeDlocCall = 'export D3_VELOCITY=/scratch/rh_vel/vp_5836/;' + \ 'export D3_VELOCITY_2=/scratch/rh_vel/vs_32220/;' + \ 'cd %s;' % self.threeDlocPath + \ '3dloc_pitsa' self.hyp2000Path = '/baysoft/obspyck/hyp_2000/' self.hyp2000Controlfile = self.hyp2000Path + 'bay2000.inp' self.hyp2000Phasefile = self.hyp2000Path + 'hyp2000.pha' self.hyp2000Stationsfile = self.hyp2000Path + 'stations.dat' self.hyp2000Summary = self.hyp2000Path + 'hypo.prt' self.hyp2000PreCall = 'rm %s %s %s &> /dev/null' \ % (self.hyp2000Phasefile, self.hyp2000Stationsfile, self.hyp2000Summary) self.hyp2000Call = 'export HYP2000_DATA=%s;' % (self.hyp2000Path) + \ 'cd $HYP2000_DATA;' + \ 'hyp2000 < bay2000.inp &> /dev/null' self.xmlEventID = None self.locationType = None self.flagSpectrogram = False # indicates which of the available events from seishub was loaded self.seishubEventCurrent = None # indicates how many events are available from seishub self.seishubEventCount = None # If keybindings option is set only show keybindings and exit if self.options.keybindings: for k, v in self.dictKeybindings.iteritems(): print "%s: \"%s\"" % (k, v) return
50570db0175b1852c554a55b2bd91b8f3d8fb93f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10346/50570db0175b1852c554a55b2bd91b8f3d8fb93f/obspyck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8205, 273, 599, 16, 702, 273, 599, 4672, 365, 18, 16320, 273, 8205, 365, 18, 2116, 273, 702, 468, 11644, 2690, 2943, 16, 16176, 471, 20947, 702, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 8205, 273, 599, 16, 702, 273, 599, 4672, 365, 18, 16320, 273, 8205, 365, 18, 2116, 273, 702, 468, 11644, 2690, 2943, 16, 16176, 471, 20947, 702, 365, 18,...
if pid == self.lastEvent.get_pid(): self.default_disasm_target = next_address else: self.default_disasm_target = '%s %s' % (next_address, pid)
self.default_disasm_target = next_address
def do_disassemble(self, arg): """ u <address> [process] - show code disassembly disassemble <address> [process] - show code disassembly """ if not arg: arg = self.default_disasm_target token_list = self.split_tokens(arg, 1, 2) pid, address = self.input_address_and_process(token_list) process = self.lastEvent.debug.system.get_process(pid) try: code = process.disassemble(address, 15*8)[:8] except Exception, e: msg = "can't disassemble address %s" msg = msg % winappdbg.HexDump.address(address) raise CmdError, msg if code: last_code = code[-1] next_address = last_code[0] + last_code[1] next_address = winappdbg.HexOutput.integer(next_address) if pid == self.lastEvent.get_pid(): self.default_disasm_target = next_address else: self.default_disasm_target = '%s %s' % (next_address, pid) for line in code: print winappdbg.CrashDump.dump_code_line(line)
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, 2251, 29676, 12, 2890, 16, 1501, 4672, 3536, 582, 411, 2867, 34, 306, 2567, 65, 300, 2405, 981, 1015, 28050, 1015, 29676, 411, 2867, 34, 306, 2567, 65, 300, 2405, 981, 1015, 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, 741, 67, 2251, 29676, 12, 2890, 16, 1501, 4672, 3536, 582, 411, 2867, 34, 306, 2567, 65, 300, 2405, 981, 1015, 28050, 1015, 29676, 411, 2867, 34, 306, 2567, 65, 300, 2405, 981, 1015, 2...
generator.new(op.args[0].value)
try: op.args[0].value._hints['_suggested_external'] generator.ilasm.new(op.args[0].value._name.split('.')[-1]) except (KeyError, AttributeError): generator.new(op.args[0].value)
def render(self, generator, op): generator.new(op.args[0].value)
c16e375c4136d9281f9db10d40571671ec7d0675 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/c16e375c4136d9281f9db10d40571671ec7d0675/metavm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 4456, 16, 1061, 4672, 4456, 18, 2704, 12, 556, 18, 1968, 63, 20, 8009, 1132, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 4456, 16, 1061, 4672, 4456, 18, 2704, 12, 556, 18, 1968, 63, 20, 8009, 1132, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
raise SyntaxError, "Error on entry 0x%4.4X:\nSubindex 0 must be defined for an ARRAY or a RECORD entry"%entry
max_subindex = values["SUBNUMBER"] - 1 consecutive = True
def GenerateNode(filepath, nodeID = 0): global Node # Create a new node Node = node.Node(id = nodeID) try: # Parse file and extract dictionary of EDS entry eds_dict = ParseEDSFile(filepath) # Extract Profile Number from Device Type entry ProfileNb = eds_dict[0x1000]["DEFAULTVALUE"] & 0x0000ffff # If profile is not DS-301 or DS-302 if ProfileNb not in [301, 302]: # Compile Profile name and path to .prf file ProfileName = "DS-%d"%ProfileNb ProfilePath = os.path.join(os.path.split(__file__)[0], "config/%s.prf"%ProfileName) # Verify that profile is available if os.path.isfile(ProfilePath): try: # Load Profile execfile(ProfilePath) Node.SetProfileName(ProfileName) Node.SetProfile(Mapping) Node.SetSpecificMenu(AddMenuEntries) except: pass # Read all entries in the EDS dictionary for entry, values in eds_dict.items(): # All sections with a name in keynames are escaped if entry in SECTION_KEYNAMES: pass else: # Extract informations for the entry entry_infos = Node.GetEntryInfos(entry) # If no informations are available, then we write them if not entry_infos: # First case, entry is a VAR if values["OBJECTTYPE"] == 7: # Add mapping for entry Node.AddMappingEntry(entry, name = values["PARAMETERNAME"], struct = 1) # Add mapping for first subindex Node.AddMappingEntry(entry, 0, values = {"name" : values["PARAMETERNAME"], "type" : values["DATATYPE"], "access" : ACCESS_TRANSLATE[values["ACCESSTYPE"]], "pdo" : values.get("PDOMAPPING", 0) == 1}) # Second case, entry is an ARRAY elif values["OBJECTTYPE"] == 8: # Extract maximum subindex number defined try: max_subindex = values["subindexes"][0]["DEFAULTVALUE"] except: raise SyntaxError, "Error on entry 0x%4.4X:\nSubindex 0 must be defined for an ARRAY entry"%entry # Add mapping for entry Node.AddMappingEntry(entry, name = values["PARAMETERNAME"], struct = 3) # Add mapping for first subindex Node.AddMappingEntry(entry, 0, values = {"name" : "Number of Entries", "type" : 0x05, "access" : "ro", "pdo" : False}) # Add mapping for other subindexes for subindex in xrange(1, int(max_subindex) + 1): # if subindex is defined if subindex in values["subindexes"]: Node.AddMappingEntry(entry, subindex, values = {"name" : values["subindexes"][subindex]["PARAMETERNAME"], "type" : values["subindexes"][subindex]["DATATYPE"], "access" : ACCESS_TRANSLATE[values["subindexes"][subindex]["ACCESSTYPE"]], "pdo" : values["subindexes"][subindex].get("PDOMAPPING", 0) == 1}) # if not, we add a mapping for compatibility else: Node.AddMappingEntry(entry, subindex, values = {"name" : "Compatibility Entry", "type" : 0x05, "access" : "rw", "pdo" : False}) # Third case, entry is an RECORD elif values["OBJECTTYPE"] == 9: # Verify that the first subindex is defined if 0 not in values["subindexes"]: raise SyntaxError, "Error on entry 0x%4.4X:\nSubindex 0 must be defined for a RECORD entry"%entry # Add mapping for entry Node.AddMappingEntry(entry, name = values["PARAMETERNAME"], struct = 7) # Add mapping for first subindex Node.AddMappingEntry(entry, 0, values = {"name" : "Number of Entries", "type" : 0x05, "access" : "ro", "pdo" : False}) # Verify that second subindex is defined if 1 in values: Node.AddMappingEntry(entry, 1, values = {"name" : values["PARAMETERNAME"] + " %d[(sub)]", "type" : values["subindexes"][1]["DATATYPE"], "access" : ACCESS_TRANSLATE[values["subindexes"][1]["ACCESSTYPE"]], "pdo" : values["subindexes"][1].get("PDOMAPPING", 0) == 1}) else: raise SyntaxError, "Error on entry 0x%4.4X:\nA RECORD entry must have at least 2 subindexes"%entry # Define entry for the new node # First case, entry is a VAR if values["OBJECTTYPE"] == 7: # Take default value if it is defined if "DEFAULTVALUE" in values: value = values["DEFAULTVALUE"] # Find default value for value type of the entry else: value = GetDefaultValue(entry) Node.AddEntry(entry, 0, value) # Second case, entry is an ARRAY or a RECORD elif values["OBJECTTYPE"] in (8, 9): # Verify that "Subnumber" attribute is defined and has a valid value if "SUBNUMBER" in values and values["SUBNUMBER"] > 0: # Extract maximum subindex number defined try: max_subindex = values["subindexes"][0]["DEFAULTVALUE"] except: raise SyntaxError, "Error on entry 0x%4.4X:\nSubindex 0 must be defined for an ARRAY or a RECORD entry"%entry Node.AddEntry(entry, value = []) # Define value for all subindexes except the first for subindex in xrange(1, int(max_subindex) + 1): # Take default value if it is defined and entry is defined if subindex in values["subindexes"] and "DEFAULTVALUE" in values["subindexes"][subindex]: value = values["subindexes"][subindex]["DEFAULTVALUE"] # Find default value for value type of the subindex else: value = GetDefaultValue(entry, subindex) Node.AddEntry(entry, subindex, value) else: raise SyntaxError, "Array or Record entry 0x%4.4X must have a \"SubNumber\" attribute"%entry return Node except SyntaxError, message: return "Unable to import EDS file\n%s"%message
b7d273ac1d153daea8944d9456f9d5babd9da1cf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11017/b7d273ac1d153daea8944d9456f9d5babd9da1cf/eds_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 907, 12, 10561, 16, 14871, 273, 374, 4672, 2552, 2029, 468, 1788, 279, 394, 756, 2029, 273, 756, 18, 907, 12, 350, 273, 14871, 13, 775, 30, 468, 2884, 585, 471, 2608, 3880, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 907, 12, 10561, 16, 14871, 273, 374, 4672, 2552, 2029, 468, 1788, 279, 394, 756, 2029, 273, 756, 18, 907, 12, 350, 273, 14871, 13, 775, 30, 468, 2884, 585, 471, 2608, 3880, 434, ...
sage: print LatinSquare(3).nrows()
sage: LatinSquare(3).nrows()
def nrows(self): """ Number of rows in the latin square.
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18871, 12, 2890, 4672, 3536, 3588, 434, 2595, 316, 326, 30486, 8576, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18871, 12, 2890, 4672, 3536, 3588, 434, 2595, 316, 326, 30486, 8576, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if ( packet.getbyte(i) != statusRequest[i] ):
if (packet.getbyte(i) != statusRequest[i]):
def handleStatus(socket, packet): statusPacket = 1 for i in range( 0, packet.size ): if ( packet.getbyte(i) != statusRequest[i] ): statusPacket = 0 if statusPacket == 1: status = 'olfpack, Clients=%i, Items=%i, Chars=%i, Version=%s' % ( wolfpack.sockets.count(), wolfpack.itemcount(), wolfpack.charcount(), wolfpack.serverversion() ) packet = wolfpack.packet(87, len(status) + 1) packet.setascii(1, status) packet.send(socket) socket.log(LOG_MESSAGE, "Sent status information.\n") return statusPacket
2d007f2ef3da1d8f98207268ae7056c52566f670 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/2d007f2ef3da1d8f98207268ae7056c52566f670/uogstatus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1482, 12, 7814, 16, 4414, 4672, 225, 1267, 6667, 273, 404, 364, 277, 316, 1048, 12, 374, 16, 4414, 18, 1467, 262, 30, 309, 261, 11482, 18, 588, 7229, 12, 77, 13, 480, 1267, 691...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 1482, 12, 7814, 16, 4414, 4672, 225, 1267, 6667, 273, 404, 364, 277, 316, 1048, 12, 374, 16, 4414, 18, 1467, 262, 30, 309, 261, 11482, 18, 588, 7229, 12, 77, 13, 480, 1267, 691...
"""Return an object implementing IProtocol, or None.
"""Return an object implementing L{IProtocol}, or None.
def buildProtocol(self, addr): """Return an object implementing IProtocol, or None.
2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2049631dd0aa73ddfc33a2c3c8f41078e4f4fcf8/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5752, 12, 2890, 16, 3091, 4672, 3536, 990, 392, 733, 19981, 467, 5752, 16, 578, 599, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 5752, 12, 2890, 16, 3091, 4672, 3536, 990, 392, 733, 19981, 467, 5752, 16, 578, 599, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1) or 0.0,
'amount_currency': company_currency <> current_currency and currency_pool.compute(cr, uid, company_currency, current_currency, diff * -1, context=context_multi_currency) or 0.0,
def _get_payment_term_lines(term_id, amount): term_pool = self.pool.get('account.payment.term') if term_id and amount: terms = term_pool.compute(cr, uid, term_id, amount) return terms return False
02af34f56048406372b55ae89131f75f8d3688e5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/02af34f56048406372b55ae89131f75f8d3688e5/account_voucher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 9261, 67, 6408, 67, 3548, 12, 6408, 67, 350, 16, 3844, 4672, 2481, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 9261, 18, 6408, 6134, 309, 2481, 67, 350, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 9261, 67, 6408, 67, 3548, 12, 6408, 67, 350, 16, 3844, 4672, 2481, 67, 6011, 273, 365, 18, 6011, 18, 588, 2668, 4631, 18, 9261, 18, 6408, 6134, 309, 2481, 67, 350, 471,...
def _ebRender(self, failure): '''Custom error render method (used by our XMLRPC objects)''' if isinstance(failure.value, xmlrpclib.Fault): return failure.value
if not _ldtp_debug: def _ebRender(self, failure): '''Custom error render method (used by our XMLRPC objects)''' if isinstance(failure.value, xmlrpclib.Fault): return failure.value
def _ebRender(self, failure): '''Custom error render method (used by our XMLRPC objects)''' if isinstance(failure.value, xmlrpclib.Fault): return failure.value
89607e76b487ccd2061e9e6cfc039823fcdd8e82 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11266/89607e76b487ccd2061e9e6cfc039823fcdd8e82/xmlrpc_daemon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24008, 3420, 12, 2890, 16, 5166, 4672, 9163, 3802, 555, 1743, 707, 261, 3668, 635, 3134, 3167, 8087, 2184, 2506, 6309, 309, 1549, 12, 12251, 18, 1132, 16, 2025, 13832, 830, 495, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 24008, 3420, 12, 2890, 16, 5166, 4672, 9163, 3802, 555, 1743, 707, 261, 3668, 635, 3134, 3167, 8087, 2184, 2506, 6309, 309, 1549, 12, 12251, 18, 1132, 16, 2025, 13832, 830, 495, 18,...
if not title: title = get_title('Summary', self.suite.name) self._use_template(outfile, templates.REPORT, title,
self._use_template(outfile, templates.REPORT, title or '%s Summary Report' % self.suite.name,
def serialize_summary(self, path, title=None, background=None): outfile = self._get_outfile(path, 'summary') if not outfile: return if not title: title = get_title('Summary', self.suite.name) self._use_template(outfile, templates.REPORT, title, self._get_background_color(background)) self.statistics.serialize(SummaryStatSerializer(outfile)) outfile.write('</body>\n</html>\n') outfile.close() LOGGER.output_file('Summary', path)
bb471f6915d01d81f958a47ac2dcdb134bd6c40c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7408/bb471f6915d01d81f958a47ac2dcdb134bd6c40c/testoutput.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 7687, 12, 2890, 16, 589, 16, 2077, 33, 7036, 16, 5412, 33, 7036, 4672, 8756, 273, 365, 6315, 588, 67, 26050, 12, 803, 16, 296, 7687, 6134, 309, 486, 8756, 30, 327, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4472, 67, 7687, 12, 2890, 16, 589, 16, 2077, 33, 7036, 16, 5412, 33, 7036, 4672, 8756, 273, 365, 6315, 588, 67, 26050, 12, 803, 16, 296, 7687, 6134, 309, 486, 8756, 30, 327, 365, 631...
data = self.events.get(timeout=2)
data = self.events.get(timeout=WAIT_TIMEOUT)
def popevent(self, name=None): while 1: if self.use_callback: data = self.events.get(timeout=2) else: data = self.slp.channel.receive(timeout=2) ev = EventCall(data) if name is None or ev.name == name: return ev print("skipping %s" % (ev,))
51815940c27a7e1f5b40d716ab3f97b39aaa2fc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1924/51815940c27a7e1f5b40d716ab3f97b39aaa2fc5/test_remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1306, 616, 12, 2890, 16, 508, 33, 7036, 4672, 1323, 404, 30, 309, 365, 18, 1202, 67, 3394, 30, 501, 273, 365, 18, 5989, 18, 588, 12, 4538, 33, 19046, 67, 9503, 13, 469, 30, 50...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 293, 1306, 616, 12, 2890, 16, 508, 33, 7036, 4672, 1323, 404, 30, 309, 365, 18, 1202, 67, 3394, 30, 501, 273, 365, 18, 5989, 18, 588, 12, 4538, 33, 19046, 67, 9503, 13, 469, 30, 50...
self.content_type = mimetypes.guess_type(fileName, False)[0] or 'text/plain'
self.content_type = mimetypes.guess_type(sFilename, False)[0] or 'text/plain'
def writeFile(self, sFilename, sStream, isAttachment=True): """Writes a file stream to the response using a specified filename.
ffef5168529c25e47b12fb8d70c6127fed1e9cba /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2504/ffef5168529c25e47b12fb8d70c6127fed1e9cba/response.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13286, 12, 2890, 16, 272, 5359, 16, 272, 1228, 16, 353, 6803, 33, 5510, 4672, 3536, 8368, 279, 585, 1407, 358, 326, 766, 1450, 279, 1269, 1544, 18, 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, 1652, 13286, 12, 2890, 16, 272, 5359, 16, 272, 1228, 16, 353, 6803, 33, 5510, 4672, 3536, 8368, 279, 585, 1407, 358, 326, 766, 1450, 279, 1269, 1544, 18, 2, -100, -100, -100, -100, -100, -10...
], CONTEXT)
], 0, None, None, CONTEXT)
def test0040numeric(self): ''' Test Numeric. ''' numeric1_id = self.numeric.create({ 'numeric': Decimal('1.1'), }, CONTEXT) self.assert_(numeric1_id)
52062c763bf1737b3f2071e48338f60845edc54d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9266/52062c763bf1737b3f2071e48338f60845edc54d/test_tryton.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 7132, 5246, 12, 2890, 4672, 9163, 7766, 16980, 18, 9163, 6389, 21, 67, 350, 273, 365, 18, 5246, 18, 2640, 12590, 296, 5246, 4278, 11322, 2668, 21, 18, 21, 19899, 19879, 13862,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 713, 7132, 5246, 12, 2890, 4672, 9163, 7766, 16980, 18, 9163, 6389, 21, 67, 350, 273, 365, 18, 5246, 18, 2640, 12590, 296, 5246, 4278, 11322, 2668, 21, 18, 21, 19899, 19879, 13862,...
queryPage = 'http://www.imdb.com/find?s=all&q=%s&x=0&y=0' % serieName.replace(' ', '+')
queryPage = 'http://www.imdb.com/find?s=all&q=%s&x=0&y=0' % serieName.replace(' ', '+').replace('&', '%26')
def getSerieUrl(self, serieName): # FIXME: encode url correctly queryPage = 'http://www.imdb.com/find?s=all&q=%s&x=0&y=0' % serieName.replace(' ', '+') # use urlencode or sth? resultPage = urlopen(queryPage)
2cf43f2091b6d970757a57a4a2d099010b602e01 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11141/2cf43f2091b6d970757a57a4a2d099010b602e01/IMDBSerieMetadataFinder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 827, 1385, 1489, 12, 2890, 16, 24295, 461, 4672, 468, 9852, 30, 2017, 880, 8783, 843, 1964, 273, 296, 2505, 2207, 5591, 18, 381, 1966, 18, 832, 19, 4720, 35, 87, 33, 454, 10, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 827, 1385, 1489, 12, 2890, 16, 24295, 461, 4672, 468, 9852, 30, 2017, 880, 8783, 843, 1964, 273, 296, 2505, 2207, 5591, 18, 381, 1966, 18, 832, 19, 4720, 35, 87, 33, 454, 10, 85...
else: for client in var.clients: edge = pd.Edge(astr,apply_name(client[0])) g.add_edge(edge) g.set_simplify(True)
def apply_name(node): return str(node.op).replace(':','_')+' '+str(topo.index(node))
613fd23db537a0246bc951d8dc88fbd9dc17de96 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/613fd23db537a0246bc951d8dc88fbd9dc17de96/printing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 529, 12, 2159, 4672, 327, 609, 12, 2159, 18, 556, 2934, 2079, 2668, 30, 17023, 4623, 13, 6797, 565, 15126, 701, 12, 3669, 83, 18, 1615, 12, 2159, 3719, 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, 2230, 67, 529, 12, 2159, 4672, 327, 609, 12, 2159, 18, 556, 2934, 2079, 2668, 30, 17023, 4623, 13, 6797, 565, 15126, 701, 12, 3669, 83, 18, 1615, 12, 2159, 3719, 2, -100, -100, -100, ...
sys.stdout.write(text[i])
sys.stdout.write(text[i].encode(config.console_encoding, 'replace'))
def printColorizedInWindows(self, text, colors): """ This only works in Python 2.5 or higher. """ try: import ctypes std_out_handle = ctypes.windll.kernel32.GetStdHandle(-11) lastColor = None for i in range(0, len(colors)): if colors[i] != lastColor: #sys.stdout.flush() if colors[i] == None: ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, 8) else: ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, colors[i]) # print one text character. sys.stdout.write(text[i]) lastColor = colors[i] if lastColor != None: # reset the color to default at the end ctypes.windll.kernel32.SetConsoleTextAttribute(std_out_handle, 8) except ImportError: # ctypes is only available since Python 2.5, and we won't # try to colorize without it. sys.stdout.write(text)
67acc624b465432a38a423663787556a577973e8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/67acc624b465432a38a423663787556a577973e8/terminal_interface.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 2957, 1235, 382, 10399, 12, 2890, 16, 977, 16, 5740, 4672, 3536, 1220, 1338, 6330, 316, 6600, 576, 18, 25, 578, 10478, 18, 3536, 775, 30, 1930, 6983, 2044, 67, 659, 67, 4110, 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, 1172, 2957, 1235, 382, 10399, 12, 2890, 16, 977, 16, 5740, 4672, 3536, 1220, 1338, 6330, 316, 6600, 576, 18, 25, 578, 10478, 18, 3536, 775, 30, 1930, 6983, 2044, 67, 659, 67, 4110, 273...
except CommandError:
except (CommandError, OSError):
def main(): parser = OptionParser() parser.add_option("-n", "--ns3-branch", dest="ns3_branch", default="ns-3-dev", help="Name of the ns-3 repository", metavar="BRANCH_NAME") parser.add_option("-r", "--regression-branch", dest="regression_branch", default="ns-3-dev-ref-traces", help="Name of the ns-3 regression traces repository", metavar="REGRESSION_BRANCH_NAME") (options, dummy_args) = parser.parse_args() # first of all, change to the directory of the script os.chdir(os.path.abspath(os.path.dirname(__file__))) # Create the configuration file config = dom.getDOMImplementation().createDocument(None, "config", None) # -- download NS-3 -- ns3_dir = get_ns3(options.ns3_branch) ns3_config = config.documentElement.appendChild(config.createElement("ns-3")) ns3_config.setAttribute("dir", ns3_dir) ns3_config.setAttribute("branch", options.ns3_branch) # -- download regression reference traces for NS-3 -- try: traces_dir = get_regression_traces(ns3_dir, options.regression_branch) except CommandError: print " *** Problem fetching regression reference traces; regression testing will not work." else: traces_config = config.documentElement.appendChild(config.createElement("ns-3-traces")) traces_config.setAttribute("dir", traces_dir) traces_config.setAttribute("branch", options.regression_branch) # -- download pybindgen -- try: pybindgen_dir, pybindgen_version = get_pybindgen(ns3_dir) except CommandError: print " *** Problem fetching pybindgen; python bindings will not work." else: pybindgen_config = config.documentElement.appendChild(config.createElement("pybindgen")) pybindgen_config.setAttribute("dir", pybindgen_dir) pybindgen_config.setAttribute("version", pybindgen_version) # -- download network simulation cradle -- try: nsc_dir, nsc_version = get_nsc(ns3_dir) except (CommandError, IOError, RuntimeError): print " *** Problem fetching NSC; NSC will not be available." else: nsc_config = config.documentElement.appendChild(config.createElement("nsc")) nsc_config.setAttribute("dir", nsc_dir) nsc_config.setAttribute("version", nsc_version) # write the config to a file dot_config = open(".config", "wt") config.writexml(dot_config, addindent=" ", newl="\n") dot_config.close() return 0
b411b5e4a4cb3236e7fb9f2b8235d7bd41997f06 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1665/b411b5e4a4cb3236e7fb9f2b8235d7bd41997f06/download.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 82, 3113, 5238, 2387, 23, 17, 7500, 3113, 1570, 1546, 2387, 23, 67, 7500, 3113, 805, 1546, 2387, 17, 23, 17, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 2082, 273, 18862, 1435, 2082, 18, 1289, 67, 3482, 2932, 17, 82, 3113, 5238, 2387, 23, 17, 7500, 3113, 1570, 1546, 2387, 23, 67, 7500, 3113, 805, 1546, 2387, 17, 23, 17, 52...
raise error.AutoservSSHTimeout("ssh timed out", result)
raise error.AutoservSSHTimeout("ssh timed out", result)
def _run(self, command, timeout, ignore_status, stdout, stderr, connect_timeout, env, options): """Helper function for run()."""
5c04916cd0e1aca2cffa2895da52eaba47458edb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/5c04916cd0e1aca2cffa2895da52eaba47458edb/ssh_host.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 16, 1296, 16, 2021, 16, 2305, 67, 2327, 16, 3909, 16, 4514, 16, 3077, 67, 4538, 16, 1550, 16, 702, 4672, 3536, 2276, 445, 364, 1086, 1435, 12123, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2681, 12, 2890, 16, 1296, 16, 2021, 16, 2305, 67, 2327, 16, 3909, 16, 4514, 16, 3077, 67, 4538, 16, 1550, 16, 702, 4672, 3536, 2276, 445, 364, 1086, 1435, 12123, 2, -100, -100, ...
gcc -shared -shared-libgcc $LDFLAGS -L. -L/usr/local/lib -o SDL_mixer.dll -def SDL_mixer.def \ "$BDLIB/libSDL_mixer.a" -lSDL -lsmpeg -lvorbisfile -lFLAC -lWs2_32 -lwinmm
gcc -shared -static-libgcc $LDFLAGS -L. -L"$BDLIB" -def SDL_mixer.def \ "$BDLIB/libSDL_mixer.a" -mwindows -lSDL -lsmpeg -lvorbisfile -lFLAC -lmikmod -lWs2_32 -lwinmm -o SDL_mixer.dll
gcc -shared -shared-libgcc $LDFLAGS -L. -L/usr/local/lib -o SDL_mixer.dll -def SDL_mixer.def \ "$BDLIB/libSDL_mixer.a" -lSDL -lsmpeg -lvorbisfile -lFLAC -lWs2_32 -lwinmm
5ed962a58a84830cbe0f649aee7072426feb4c22 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/5ed962a58a84830cbe0f649aee7072426feb4c22/msys_link_VC_2008_dlls.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 314, 952, 300, 11574, 300, 11574, 17, 2941, 75, 952, 271, 48, 4577, 6552, 55, 300, 48, 18, 300, 48, 19, 13640, 19, 3729, 19, 2941, 300, 83, 17157, 67, 14860, 264, 18, 27670, 300, 536, 1715...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 314, 952, 300, 11574, 300, 11574, 17, 2941, 75, 952, 271, 48, 4577, 6552, 55, 300, 48, 18, 300, 48, 19, 13640, 19, 3729, 19, 2941, 300, 83, 17157, 67, 14860, 264, 18, 27670, 300, 536, 1715...
line1 = " +--------------+\n" line2 = " | %s %s %s |\n"%(lst[0],lst[1],lst[2]) line3 = " | %s top %s |\n"%(lst[3],lst[4]) line4 = " | %s %s %s |\n"%(lst[5],lst[6],lst[7]) line5 = " +--------------+--------------+--------------+--------------+\n" line6 = " | %s %s %s | %s %s %s | %s %s %s | %s %s %s |\n"%(lst[8],lst[9],lst[10],lst[16],lst[17],lst[18],lst[24],lst[25],lst[26],lst[32],lst[33],lst[34]) line7 = " | %s left %s | %s front %s | %s right %s | %s rear %s |\n"%(lst[11],lst[12],lst[19],lst[20],lst[27],lst[28],lst[35],lst[36]) line8 = " | %s %s %s | %s %s %s | %s %s %s | %s %s %s |\n"%(lst[13],lst[14],lst[15],lst[21],lst[22],lst[23],lst[29],lst[30],lst[31],lst[37],lst[38],lst[39]) line9 = " +--------------+--------------+--------------+--------------+\n" line10 = " | %s %s %s |\n"%(lst[40],lst[41],lst[42]) line11 = " | %s bottom %s |\n"%(lst[43],lst[44]) line12 = " | %s %s %s |\n"%(lst[45],lst[46],lst[47]) line13 = " +--------------+\n"
line1 = " +--------------+\n" line2 = " |%3d %3d %3d |\n"%(lst[0],lst[1],lst[2]) line3 = " |%3d top %3d |\n"%(lst[3],lst[4]) line4 = " |%3d %3d %3d |\n"%(lst[5],lst[6],lst[7]) line5 = "+------------+--------------+-------------+------------+\n" line6 = "|%3d %3d %3d |%3d %3d %3d |%3d %3d %3d |%3d %3d %3d |\n"%(lst[8],lst[9],lst[10],lst[16],lst[17],lst[18],lst[24],lst[25],lst[26],lst[32],lst[33],lst[34]) line7 = "|%3d left%3d |%3d front%3d |%3d right%3d |%3d rear%3d |\n"%(lst[11],lst[12],lst[19],lst[20],lst[27],lst[28],lst[35],lst[36]) line8 = "|%3d %3d %3d |%3d %3d %3d |%3d %3d %3d |%3d %3d %3d |\n"%(lst[13],lst[14],lst[15],lst[21],lst[22],lst[23],lst[29],lst[30],lst[31],lst[37],lst[38],lst[39]) line9 = "+------------+--------------+-------------+------------+\n" line10 = " |%3d %3d %3d |\n"%(lst[40],lst[41],lst[42]) line11 = " |%3d bottom%3d |\n"%(lst[43],lst[44]) line12 = " |%3d %3d %3d |\n"%(lst[45],lst[46],lst[47]) line13 = " +--------------+\n"
def display2d(self,mv): r""" Displays a 2d map of the Rubik's cube after the move mv has been made. Nothing is returned. EXAMPLES: sage: rubik = CubeGroup() sage: rubik.display2d("") +--------------+ | 1 2 3 | | 4 top 5 | | 6 7 8 | +--------------+--------------+--------------+--------------+ | 9 10 11 | 17 18 19 | 25 26 27 | 33 34 35 | | 12 left 13 | 20 front 21 | 28 right 29 | 36 rear 37 | | 14 15 16 | 22 23 24 | 30 31 32 | 38 39 40 | +--------------+--------------+--------------+--------------+ | 41 42 43 | | 44 bottom 45 | | 46 47 48 | +--------------+
ffecca43e67eb5a268ace7448b4aa9b938a485ff /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/ffecca43e67eb5a268ace7448b4aa9b938a485ff/cubegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 22, 72, 12, 2890, 16, 17509, 4672, 436, 8395, 9311, 87, 279, 576, 72, 852, 434, 326, 534, 373, 1766, 1807, 18324, 1839, 326, 3635, 7701, 711, 2118, 7165, 18, 13389, 353, 2106, 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, 2562, 22, 72, 12, 2890, 16, 17509, 4672, 436, 8395, 9311, 87, 279, 576, 72, 852, 434, 326, 534, 373, 1766, 1807, 18324, 1839, 326, 3635, 7701, 711, 2118, 7165, 18, 13389, 353, 2106, 18...
create_results_log(results, logdir, missing)
create_results_log(results, logdir, missing, summary=summary, coverdir=coverdir)
def main(argv = None): import getopt if argv is None: argv = sys.argv try: opts, prog_argv = getopt.getopt(argv[1:], "tcrRf:d:m", ["help", "version", "trace", "count", "report", "no-report", "file=", "logdir=", "missing", "ignore-module=", "ignore-dir="]) except getopt.error, msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Try `%s --help' for more information\n" % sys.argv[0]) sys.exit(1) trace = 0 count = 0 report = 0 no_report = 0 counts_file = None logdir = "." missing = 0 ignore_modules = [] ignore_dirs = [] for opt, val in opts: if opt == "--help": usage(sys.stdout) sys.exit(0) if opt == "--version": sys.stdout.write("trace 2.0\n") sys.exit(0) if opt == "-t" or opt == "--trace": trace = 1 continue if opt == "-c" or opt == "--count": count = 1 continue if opt == "-r" or opt == "--report": report = 1 continue if opt == "-R" or opt == "--no-report": no_report = 1 continue if opt == "-f" or opt == "--file": counts_file = val continue if opt == "-d" or opt == "--logdir": logdir = val continue if opt == "-m" or opt == "--missing": missing = 1 continue if opt == "--ignore-module": ignore_modules.append(val) continue if opt == "--ignore-dir": for s in string.split(val, os.pathsep): s = os.path.expandvars(s) # should I also call expanduser? (after all, could use $HOME) s = string.replace(s, "$prefix", os.path.join(sys.prefix, "lib", "python" + sys.version[:3])) s = string.replace(s, "$exec_prefix", os.path.join(sys.exec_prefix, "lib", "python" + sys.version[:3])) s = os.path.normpath(s) ignore_dirs.append(s) continue assert 0, "Should never get here" if len(prog_argv) == 0: _err_exit("missing name of file to run") if count + trace + report > 1: _err_exit("can only specify one of --trace, --count or --report") if count + trace + report == 0: _err_exit("must specify one of --trace, --count or --report") if report and counts_file is None: _err_exit("--report requires a --file") if report and no_report: _err_exit("cannot specify both --report and --no-report") if logdir is not None: # warn if the directory doesn't exist, but keep on going # (is this the correct behaviour?) if not os.path.isdir(logdir): sys.stderr.write( "trace: WARNING, --logdir directory %s is not available\n" % `logdir`) sys.argv = prog_argv progname = prog_argv[0] if eval(sys.version[:3])>1.3: sys.path[0] = os.path.split(progname)[0] # ??? # everything is ready ignore = Ignore(ignore_modules, ignore_dirs) if trace: t = Trace(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err.strerror)) elif count: t = Coverage(ignore) try: run(t.trace, 'execfile(' + `progname` + ')') except IOError, err: _err_exit("Cannot run file %s because: %s" % \ (`sys.argv[0]`, err.strerror)) except SystemExit: pass results = t.results() # Add another lookup from the program's file name to its import name # This give the right results, but I'm not sure why ... results.modules[progname] = os.path.splitext(progname)[0] if counts_file: # add in archived data, if available try: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) except IOError: pass else: results.update(CoverageResults(old_counts, old_modules)) if not no_report: create_results_log(results, logdir, missing) if counts_file: try: marshal.dump( (results.counts, results.modules), open(counts_file, 'wb')) except IOError, err: _err_exit("Cannot save counts file %s because: %s" % \ (`counts_file`, err.strerror)) elif report: old_counts, old_modules = marshal.load(open(counts_file, 'rb')) results = CoverageResults(old_counts, old_modules) create_results_log(results, logdir, missing) else: assert 0, "Should never get here"
66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c/trace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 19485, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 273, 599, 4672, 1930, 336, 3838, 225, 309, 5261, 353, 599, 30, 5261, 273, 2589, 18, 19485, 775, 30, 1500, 16, 11243, 67, 19485, 273, 336, 3838, 18, 588, 3838, 12, 1948...
if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough()
if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough() else: if api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough()
def event_gainFocus(self): if self.isContentEditable: self.TextInfo=MSHTMLTextInfo self.role=controlTypes.ROLE_EDITABLETEXT if not api.isVirtualBufferPassThrough(): api.toggleVirtualBufferPassThrough() IAccessible.event_gainFocus(self)
d4333f0e683521abd7952d0d7b0f712d5c85b672 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9340/d4333f0e683521abd7952d0d7b0f712d5c85b672/MSHTML.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 67, 25540, 9233, 12, 2890, 4672, 309, 365, 18, 291, 1350, 15470, 30, 365, 18, 1528, 966, 33, 49, 2664, 2838, 1528, 966, 365, 18, 4615, 33, 7098, 2016, 18, 16256, 67, 10776, 2782, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25540, 9233, 12, 2890, 4672, 309, 365, 18, 291, 1350, 15470, 30, 365, 18, 1528, 966, 33, 49, 2664, 2838, 1528, 966, 365, 18, 4615, 33, 7098, 2016, 18, 16256, 67, 10776, 2782, ...
else: for item in items: t.AddRow([item])
def Format(self, indent=0):
3e1ae52bd2838ec45824a41f79837325a29b5092 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/3e1ae52bd2838ec45824a41f79837325a29b5092/htmlformat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4077, 12, 2890, 16, 3504, 33, 20, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4077, 12, 2890, 16, 3504, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Column('meta', types.UnicodeText, nullable=True), Column('revision_id', types.UnicodeText, ForeignKey('revision.id'), nullable=True), Column('timestamp', DateTime, default=datetime.datetime.now), Column('is_tip', types.Boolean, default=False),
def queue_incoming(self, changeset_data): # Todo: Validate the data (dict with id str, meta dict, and changes list). changeset_id = unicode(changeset_data['id']) if changeset_id in self: raise Exception, "Already have changeset with id '%s'." % changeset_id changes = [] changes_data = changeset_data['changes'] change_register = ChangeRegister() for change_data in changes_data: ref = unicode(change_data['ref']) diff_data = change_data['diff'] diff = unicode(self.dumps(diff_data)) change = change_register.create_entity(ref=ref, diff=diff) changes.append(change) meta = changeset_data['meta'] status = self.object_type.STATUS_QUEUED changeset = self.create_entity(id=changeset_id, meta=meta, status=status, changes=changes) Session.commit() Session.remove() return changeset.id
0f67162ab2ce407da598e5b403544fc61aeaaa81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/265/0f67162ab2ce407da598e5b403544fc61aeaaa81/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 67, 31033, 12, 2890, 16, 22463, 67, 892, 4672, 468, 399, 7370, 30, 3554, 326, 501, 261, 1576, 598, 612, 609, 16, 2191, 2065, 16, 471, 3478, 666, 2934, 22463, 67, 350, 273, 5252, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2389, 67, 31033, 12, 2890, 16, 22463, 67, 892, 4672, 468, 399, 7370, 30, 3554, 326, 501, 261, 1576, 598, 612, 609, 16, 2191, 2065, 16, 471, 3478, 666, 2934, 22463, 67, 350, 273, 5252, ...
task.output.write(run_shell (["ssh", "root@%s" % self.name, "vzctl --version" ], config.remote_dry_run))
res = self.get_result("vzctl --version; echo $?") task.output.write(res) assert res.split("\n")[-2] == "0", "OpenVZ error" task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for kvm...\n") res = self.get_result("qm list; echo $?") task.output.write(res) assert res.split("\n")[-2] == "0", "OpenVZ error"
def check(self, task): """ Checks if the host is reachable, login works and the needed software is installed """ from util import run_shell task.output.write("checking for openvz...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "vzctl --version" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for bridge utils...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "brctl show" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for dummynet...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "ipfw -h" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1 task.output.write("checking for tinc...\n") task.output.write(run_shell (["ssh", "root@%s" % self.name, "tincd --version" ], config.remote_dry_run)) task.subtasks_done = task.subtasks_done + 1
a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3860/a6b3ac5d5b06ef067a9ca8931ca12d7e299c0fac/hosts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 1562, 4672, 3536, 13074, 309, 326, 1479, 353, 19234, 16, 3925, 6330, 471, 326, 3577, 17888, 353, 5876, 3536, 628, 1709, 1930, 1086, 67, 10304, 1562, 18, 2844, 18, 2626...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 16, 1562, 4672, 3536, 13074, 309, 326, 1479, 353, 19234, 16, 3925, 6330, 471, 326, 3577, 17888, 353, 5876, 3536, 628, 1709, 1930, 1086, 67, 10304, 1562, 18, 2844, 18, 2626...
logging.warning('''privilege %s is already not present in the '''
logging.info('''privilege %s is already not present in the '''
def remove(self, privilege): """ Remove without throw of exception """ try: list.remove(self, privilege) except ValueError: logging.warning('''privilege %s is already not present in the ''' '''whitelist, skipped.''' % \ styles.stylize(styles.ST_NAME, privilege))
bde6015db327e7049b910183ab7c4d388fac0e1b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/bde6015db327e7049b910183ab7c4d388fac0e1b/privileges.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 16905, 4672, 3536, 3581, 2887, 604, 434, 1520, 3536, 775, 30, 666, 18, 4479, 12, 2890, 16, 16905, 13, 1335, 2068, 30, 2907, 18, 1376, 2668, 6309, 28459, 908, 738, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 12, 2890, 16, 16905, 4672, 3536, 3581, 2887, 604, 434, 1520, 3536, 775, 30, 666, 18, 4479, 12, 2890, 16, 16905, 13, 1335, 2068, 30, 2907, 18, 1376, 2668, 6309, 28459, 908, 738, 8...
if self.paging != 'none' and re.match("(?:[^\n]*\n){%i}" % minlines, text):
if self.paging != 'none' and \ re.match("(?:[^\n]*\n){%i}" % minlines, text):
def _page(self, text, html=False): """ Displays text using the pager if it exceeds the height of the viewport.
dce5323df534b3c926d8dd0139870847def37795 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4217/dce5323df534b3c926d8dd0139870847def37795/console_widget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2433, 12, 2890, 16, 977, 16, 1729, 33, 8381, 4672, 3536, 9311, 87, 977, 1450, 326, 12679, 309, 518, 14399, 326, 2072, 434, 326, 10482, 18, 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, 389, 2433, 12, 2890, 16, 977, 16, 1729, 33, 8381, 4672, 3536, 9311, 87, 977, 1450, 326, 12679, 309, 518, 14399, 326, 2072, 434, 326, 10482, 18, 2, -100, -100, -100, -100, -100, -100, -...
elif c.selSense == DELETE_SELECTION: todo = [] for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): if a.is_singlet(): continue todo.append(a) for a in todo[:]: if a.filtered(): continue a.kill() else: print "Error in shape._atomsSelect(): Invalid selSense=", c.selSense def _chunksSelect(self, assy): """ Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ c = self.curve if c.selSense == START_NEW_SELECTION: for m in assy.selmols[:]: m.unpick() if c.selSense == ADD_TO_SELECTION or c.selSense == START_NEW_SELECTION: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): a.molecule.pick() break if c.selSense == SUBTRACT_FROM_SELECTION: for m in assy.selmols[:]: if m.hidden: continue disp = m.get_dispdef() for a in m.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): m.unpick() break if c.selSense == DELETE_SELECTION: todo = [] for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): todo.append(mol) break for mol in todo: mol.kill() return def findObjInside(self, assy): """ Find atoms/chunks that are inside the shape. """ rst = [] c = self.curve if assy.selwhat: rstMol = {} for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): rstMol[id(a.molecule)] = a.molecule break rst.extend(rstMol.itervalues()) else: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): rst += [a] return rst
elif c.selSense == SUBTRACT_FROM_SELECTION: for a in assy.selatoms.values(): if a.molecule.hidden: continue if c.isin(a.posn()) and a.visible(): a.unpick() elif c.selSense == DELETE_SELECTION: todo = [] for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): if a.is_singlet(): continue todo.append(a) for a in todo[:]: if a.filtered(): continue a.kill() else: print "Error in shape._atomsSelect(): Invalid selSense =", c.selSense def _chunksSelect(self, assy): """ Loop thru all the atoms that are visible and select any that are 'in' the shape, ignoring the thickness parameter. pick the parts that contain them """ c = self.curve if c.selSense == START_NEW_SELECTION: for m in assy.selmols[:]: m.unpick() if c.selSense == ADD_TO_SELECTION or c.selSense == START_NEW_SELECTION: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): a.molecule.pick() break if c.selSense == SUBTRACT_FROM_SELECTION: for m in assy.selmols[:]: if m.hidden: continue disp = m.get_dispdef() for a in m.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): m.unpick() break if c.selSense == DELETE_SELECTION: todo = [] for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): todo.append(mol) break for mol in todo: mol.kill() return def findObjInside(self, assy): """ Find atoms/chunks that are inside the shape. """ rst = [] c = self.curve if assy.selwhat: rstMol = {} for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): rstMol[id(a.molecule)] = a.molecule break rst.extend(rstMol.itervalues()) else: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): rst += [a] return rst pass
def _atomsSelect(self, assy): """ Select all atoms inside the shape according to its selection selSense. """ c = self.curve if c.selSense == ADD_TO_SELECTION: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): a.pick() elif c.selSense == START_NEW_SELECTION: for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): a.pick() else: a.unpick() elif c.selSense == SUBTRACT_FROM_SELECTION: for a in assy.selatoms.values(): if a.molecule.hidden: continue #bruce 041214 if c.isin(a.posn()) and a.visible(): a.unpick() elif c.selSense == DELETE_SELECTION: todo = [] for mol in assy.molecules: if mol.hidden: continue disp = mol.get_dispdef() for a in mol.atoms.itervalues(): if c.isin(a.posn()) and a.visible(disp): if a.is_singlet(): continue todo.append(a) for a in todo[:]: if a.filtered(): continue a.kill() else: print "Error in shape._atomsSelect(): Invalid selSense=", c.selSense #& debug method. mark 060211.
be7153ce421a674e97de640e3063c3bb1bccf4a9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/be7153ce421a674e97de640e3063c3bb1bccf4a9/shape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14937, 3391, 12, 2890, 16, 1551, 93, 4672, 3536, 6766, 777, 9006, 4832, 326, 2179, 4888, 358, 2097, 4421, 357, 29713, 18, 3536, 276, 273, 365, 18, 16683, 309, 276, 18, 1786, 29713, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14937, 3391, 12, 2890, 16, 1551, 93, 4672, 3536, 6766, 777, 9006, 4832, 326, 2179, 4888, 358, 2097, 4421, 357, 29713, 18, 3536, 276, 273, 365, 18, 16683, 309, 276, 18, 1786, 29713, ...
count = count + 1
self.count = self.count + 1
def run_test(self, cr, uid, module_path): len_module = len(module_path.split('/')) module_name = module_path.split('/') module_name = module_name[len_module-1] list_files = os.listdir(module_path) self.result_dict = {} f_list = [] module_dict = {} module_dict['module'] = [] count = 0 final_score = 0.0
0dda5ea5dc3a5a65af454e7303ddfa578d871533 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7339/0dda5ea5dc3a5a65af454e7303ddfa578d871533/structure_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 2890, 16, 4422, 16, 4555, 16, 1605, 67, 803, 4672, 562, 67, 2978, 273, 562, 12, 2978, 67, 803, 18, 4939, 2668, 2473, 3719, 1605, 67, 529, 273, 1605, 67, 803, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 3813, 12, 2890, 16, 4422, 16, 4555, 16, 1605, 67, 803, 4672, 562, 67, 2978, 273, 562, 12, 2978, 67, 803, 18, 4939, 2668, 2473, 3719, 1605, 67, 529, 273, 1605, 67, 803, 18, ...
def parseitem(x, self=self): return x[:1] + tuple(map(getint, x[1:])) return map(parseitem, data)
return map(self.__winfo_parseitem, data) def __winfo_parseitem(self, t): return t[:1] + tuple(map(self.__winfo_getint, t[1:])) def __winfo_getint(self, x): return _string.atoi(x, 0)
def parseitem(x, self=self): return x[:1] + tuple(map(getint, x[1:]))
39bc6f387bdecd575777ab15cefc0e70a8fdabd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/39bc6f387bdecd575777ab15cefc0e70a8fdabd1/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1726, 12, 92, 16, 365, 33, 2890, 4672, 327, 619, 10531, 21, 65, 397, 3193, 12, 1458, 12, 588, 474, 16, 619, 63, 21, 30, 22643, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1109, 1726, 12, 92, 16, 365, 33, 2890, 4672, 327, 619, 10531, 21, 65, 397, 3193, 12, 1458, 12, 588, 474, 16, 619, 63, 21, 30, 22643, 2, -100, -100, -100, -100, -100, -100, -100, -100...