rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
self.model.size['width'] = event.GetSize().x self.model.size['height'] = event.GetSize().y
def OnSize(self, event): self.model.size['width'] = event.GetSize().x self.model.size['height'] = event.GetSize().y """ Calling Skip causes wxWindows to continue processing the event, which will cause the parent class to get a crack at the event. """ event.Skip()
63eee33ceffbaf41edc0717242c99ded7fc46397 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/63eee33ceffbaf41edc0717242c99ded7fc46397/ChandlerWindow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 4672, 3536, 21020, 6611, 14119, 7075, 10399, 358, 1324, 4929, 326, 871, 16, 1492, 903, 4620, 326, 982, 667, 358, 336, 279, 276, 21580, 622, 326, 871, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1225, 12, 2890, 16, 871, 4672, 3536, 21020, 6611, 14119, 7075, 10399, 358, 1324, 4929, 326, 871, 16, 1492, 903, 4620, 326, 982, 667, 358, 336, 279, 276, 21580, 622, 326, 871, 18, ...
globalElements = range(color,self.globalSize,self.mySize) map = mc.GenerateMap(color) result = map.MyGlobalElements() self.assertEqual(len(result), len(globalElements)) for i in range(len(result)): self.assertEqual(result[i],globalElements[i])
map = mc.GenerateMap(color) result = map.MyGlobalElements() self.assertEqual(len(result), 1) self.assertEqual(result[0],self.map.GID(color))
def testGenerateMap(self): "Test Epetra.MapColoring GenerateMap method" colors = range(self.mySize) mc = Epetra.MapColoring(self.map,colors) for color in colors: globalElements = range(color,self.globalSize,self.mySize) map = mc.GenerateMap(color) result = map.MyGlobalElements() self.assertEqual(len(result), len(globalElements)) for i in range(len(result)): self.assertEqual(result[i],globalElements[i])
47eea12a07633f45d3a14e09431f8925a6c14266 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1130/47eea12a07633f45d3a14e09431f8925a6c14266/testMapColoring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4625, 863, 12, 2890, 4672, 315, 4709, 512, 6951, 354, 18, 863, 2957, 310, 6654, 863, 707, 6, 5740, 273, 1048, 12, 2890, 18, 4811, 1225, 13, 6108, 377, 273, 512, 6951, 354, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 4625, 863, 12, 2890, 4672, 315, 4709, 512, 6951, 354, 18, 863, 2957, 310, 6654, 863, 707, 6, 5740, 273, 1048, 12, 2890, 18, 4811, 1225, 13, 6108, 377, 273, 512, 6951, 354, 18, ...
if PILAvailable:
if not PILAvailable:
def __init__(self,master,file=None,magnification=1.0): self.opLock = threading.Lock() self.parent = master self.magnification = magnification self.previousZoom = self.magnification self.magList = [0.1,0.25,1.0/3,0.5,1,2,3,4,5,10] self.bindGlobalEvents() self.createWidgets() self.resetGUI() if sys.platform[:3] == "win": site="http://effbot.org/downloads/PIL-1.1.6.win32-py2.5.exe" if sys.version_info[0] != "2" or sys.version_info[1] != "5": tkMessageBox.showerror("Failed Dependencies","Xasy requires Python 2.5. Please install http://www.python.org/ftp/python/2.5/python-2.5.msi") self.parent.destroy() sys.exit(1) else: site="http://effbot.org/downloads/Imaging-1.1.6.tar.gz after applying the patch http://asymptote.svn.sourceforge.net/viewvc/asymptote/trunk/asymptote/patches/TkAlpha-Imaging-1.1.6.patch" if PILAvailable: tkMessageBox.showerror("Failed Dependencies","An error occurred loading the required PIL library. Please install "+site) self.parent.destroy() sys.exit(1) if file != None: self.loadFile(file) self.parent.after(100,self.tickHandler)
9447249d3b473e643fdd4c1940bc8dba0cb1fa70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2929/9447249d3b473e643fdd4c1940bc8dba0cb1fa70/xasyMainWin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7525, 16, 768, 33, 7036, 16, 4527, 82, 1480, 33, 21, 18, 20, 4672, 365, 18, 556, 2531, 273, 17254, 18, 2531, 1435, 365, 18, 2938, 273, 4171, 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, 7525, 16, 768, 33, 7036, 16, 4527, 82, 1480, 33, 21, 18, 20, 4672, 365, 18, 556, 2531, 273, 17254, 18, 2531, 1435, 365, 18, 2938, 273, 4171, 365, 18, ...
normalize = True)
normalize = True, collect = False)
def exercise_pair_tables(): d = crystal.pair_sym_dict() assert len(d) == 0 sym_ops = sgtbx.space_group("P 41").all_ops() for i,j_sym in enumerate([10,18,13]): d[j_sym] = crystal.pair_sym_ops(sym_ops[:i]) assert len(d) == i+1 assert len(d[j_sym]) == i assert [str(s) for s in sym_ops[:i]] == [str(s) for s in d[j_sym]] d[j_sym] = sym_ops[:i] assert [str(s) for s in sym_ops[:i]] == [str(s) for s in d[j_sym]] assert [key for key in d] == [10,13,18] assert d[13].size() == 2 d[13].append(sym_ops[-1]) assert d[13].size() == 3 del d[13][0] assert d[13].size() == 2 d[13].clear() assert d[13].size() == 0 t = crystal.pair_sym_table() t.append(d) assert t.size() == 1 assert len(t[0][10]) == 0 t.append(d) assert t.size() == 2 assert len(t[1][18]) == 1 t = crystal.pair_sym_table(3) for d in t: assert len(d) == 0 t[1][10] = sym_ops[:2] assert len(t[1]) == 1 assert len(t[1][10]) == 2 # t = crystal.pair_asu_table_table(3) for d in t: assert len(d) == 0 t[1][10] = crystal.pair_asu_j_sym_groups() assert t[1][10].size() == 0 t[1][10].append(crystal.pair_asu_j_sym_group()) assert t[1][10].size() == 1 assert t[1][10][0].size() == 0 t[1][10][0].insert(3) assert t[1][10][0].size() == 1 t[1][10].append(crystal.pair_asu_j_sym_group()) assert t[1][10][1].size() == 0 t[1][10][1].insert([4,5,4]) assert t[1][10][1].size() == 2 # structure = trial_structure() asu_mappings = structure.asu_mappings(buffer_thickness=3.5) asu_table = crystal.pair_asu_table(asu_mappings=asu_mappings) assert asu_table.asu_mappings().is_locked() assert asu_table.table().size() == 3 assert not asu_table.contains(i_seq=0, j_seq=1, j_sym=2) assert asu_table.pair_counts().all_eq(0) assert asu_table.add_all_pairs(distance_cutoff=3.5) is asu_table assert [d.size() for d in asu_table.table()] == [2,3,2] assert asu_table.add_all_pairs(3.5, epsilon=1.e-6) is asu_table assert [d.size() for d in asu_table.table()] == [2,3,2] expected_asu_pairs = [ [0, 0, 2], [0, 0, 1], [0, 1, 0], [0, 1, 8], [1, 0, 0], [1, 1, 4], [1, 1, 1], [1, 2, 0], [2, 1, 0], [2, 1, 11], [2, 2, 1], [2, 2, 2]] check_pair_asu_table(asu_table, expected_asu_pairs) asu_table = crystal.pair_asu_table(asu_mappings=asu_mappings) for minimal in [True, False]: pair_generator = crystal.neighbors_fast_pair_generator( asu_mappings, distance_cutoff=3.5, minimal=minimal) for pair in pair_generator: asu_table.add_pair(pair=pair) asu_table.pair_counts().all_eq(4) check_pair_asu_table(asu_table, expected_asu_pairs) for p in expected_asu_pairs: assert asu_table.contains(i_seq=p[0], j_seq=p[1], j_sym=p[2]) pair = asu_mappings.make_trial_pair(*p) assert pair in asu_table f = StringIO() asu_table.show(f=f) assert f.getvalue() == """\
df6d397e77d744781d0ceb9bc70ffd2b89c84eb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/df6d397e77d744781d0ceb9bc70ffd2b89c84eb0/tst_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 6017, 67, 9373, 13332, 302, 273, 4422, 31365, 18, 6017, 67, 8117, 67, 1576, 1435, 1815, 562, 12, 72, 13, 422, 374, 5382, 67, 4473, 273, 272, 4521, 70, 92, 18, 2981, 67, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 6017, 67, 9373, 13332, 302, 273, 4422, 31365, 18, 6017, 67, 8117, 67, 1576, 1435, 1815, 562, 12, 72, 13, 422, 374, 5382, 67, 4473, 273, 272, 4521, 70, 92, 18, 2981, 67, 16...
print SelectTlb()
print SelectTlb().__dict__
def SelectTlb(title="Select Library", excludeFlags = 0): """Display a list of all the type libraries, and select one. Returns None if cancelled """ import pywin.dialogs.list items = EnumTlbs(excludeFlags) items.sort() rc = pywin.dialogs.list.SelectFromLists(title, items, ["Type Library"]) if rc is None: return None return items[rc]
f71cee684863cce3b83790c73f56bc5713e0c3a7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/f71cee684863cce3b83790c73f56bc5713e0c3a7/selecttlb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 56, 20404, 12, 2649, 1546, 3391, 18694, 3113, 4433, 5094, 273, 374, 4672, 3536, 4236, 279, 666, 434, 777, 326, 618, 14732, 16, 471, 2027, 1245, 18, 282, 2860, 599, 309, 13927, 3536...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6766, 56, 20404, 12, 2649, 1546, 3391, 18694, 3113, 4433, 5094, 273, 374, 4672, 3536, 4236, 279, 666, 434, 777, 326, 618, 14732, 16, 471, 2027, 1245, 18, 282, 2860, 599, 309, 13927, 3536...
while wait_count > 0 or not connected or self._channel: notification = self._channel.wait() if notification.name == 'MediaStreamDidStart': wait_count -= 1 elif notification.name == 'SIPInvitationChangedState': if notification.data.state == 'connected': if not connected: connected = True notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=200, reason='OK', ack_received=True)) elif notification.data.prev_state == 'connected': unhandled_notifications.append(notification) else: unhandled_notifications.append(notification) except MediaStreamDidFailError, e:
with api.timeout(self.media_stream_timeout): while wait_count > 0 or not connected or self._channel: notification = self._channel.wait() if notification.name == 'MediaStreamDidStart': wait_count -= 1 elif notification.name == 'SIPInvitationChangedState': if notification.data.state == 'connected': if not connected: connected = True notification_center.post_notification('SIPSessionDidProcessTransaction', self, TimestampedNotificationData(originator='remote', method='INVITE', code=200, reason='OK', ack_received=True)) elif notification.data.prev_state == 'connected': unhandled_notifications.append(notification) else: unhandled_notifications.append(notification) except (MediaStreamDidFailError, api.TimeoutError), e:
def accept(self, streams): self.greenlet = api.getcurrent() notification_center = NotificationCenter() settings = SIPSimpleSettings()
c6b627ee8c71d5dc7eed81b082010f1d49fe657b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/c6b627ee8c71d5dc7eed81b082010f1d49fe657b/session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2791, 12, 2890, 16, 8205, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 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, 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, 2791, 12, 2890, 16, 8205, 4672, 365, 18, 11571, 1810, 273, 1536, 18, 588, 2972, 1435, 3851, 67, 5693, 273, 8050, 8449, 1435, 1947, 273, 348, 2579, 5784, 2628, 1435, 2, -100, -100, -100, ...
gcompris.admin.start(board_log, self.active_profile)
gcompris.admin.board_config_start(board_log, self.active_profile)
def login_configure(self, button):
2c527fbd2fb71f597b00889b3f7c1bfb02d2b5dd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11306/2c527fbd2fb71f597b00889b3f7c1bfb02d2b5dd/board_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 67, 14895, 12, 2890, 16, 3568, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 67, 14895, 12, 2890, 16, 3568, 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...
f.write(src.replace('from libprs500', 'from calibre').encode('utf-8'))
src = 'from __future__ import with_statement\n' + src src = src.replace('from libprs500', 'from calibre').encode('utf-8') f.write(src)
def compile_recipe(src): ''' Compile the code in src and return the first object that is a recipe or profile. @param src: Python source code @type src: string @return: Recipe/Profile class or None, if no such class was found in C{src} ''' global _tdir, _crep if _tdir is None or not os.path.exists(_tdir): _tdir = path(PersistentTemporaryDirectory('_recipes')) temp = _tdir/('recipe%d.py'%_crep) _crep += 1 if not isinstance(src, unicode): match = re.search(r'coding[:=]\s*([-\w.]+)', src[:200]) enc = match.group(1) if match else 'utf-8' src = src.decode(enc) f = open(temp, 'wb') src = 'from %s.web.feeds.news import BasicNewsRecipe, AutomaticNewsRecipe\n'%__appname__ + src src = 'from %s.ebooks.lrf.web.profiles import DefaultProfile, FullContentProfile\n'%__appname__ + src src = '# coding: utf-8\n' + src f.write(src.replace('from libprs500', 'from calibre').encode('utf-8')) f.close() module = imp.find_module(temp.namebase, [temp.dirname()]) module = imp.load_module(temp.namebase, *module) classes = inspect.getmembers(module, lambda x : inspect.isclass(x) and \ issubclass(x, (DefaultProfile, BasicNewsRecipe)) and \ x not in basic_recipes) if not classes: return None return classes[0][1]
5dd27c22e631cf80e54f668f25ca32168ed61e02 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/5dd27c22e631cf80e54f668f25ca32168ed61e02/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3927, 3151, 12, 4816, 4672, 9163, 16143, 326, 981, 316, 1705, 471, 327, 326, 1122, 733, 716, 353, 279, 16100, 578, 3042, 18, 632, 891, 1705, 30, 6600, 1084, 981, 632, 723, 17...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 3927, 3151, 12, 4816, 4672, 9163, 16143, 326, 981, 316, 1705, 471, 327, 326, 1122, 733, 716, 353, 279, 16100, 578, 3042, 18, 632, 891, 1705, 30, 6600, 1084, 981, 632, 723, 17...
menuwidget.refresh(reload=1)
def eventhandler(self, event): """ eventhandler for mplayer control. If an event is not bound in this function it will be passed over to the items eventhandler """
220e53b16778b2b37e73deb7a669d3a708b7b8d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/220e53b16778b2b37e73deb7a669d3a708b7b8d9/mplayer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 4672, 3536, 871, 4176, 364, 312, 14872, 3325, 18, 971, 392, 871, 353, 486, 2489, 316, 333, 445, 518, 903, 506, 2275, 1879, 358, 326, 1516, 871, 4176, 3536...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 4176, 12, 2890, 16, 871, 4672, 3536, 871, 4176, 364, 312, 14872, 3325, 18, 971, 392, 871, 353, 486, 2489, 316, 333, 445, 518, 903, 506, 2275, 1879, 358, 326, 1516, 871, 4176, 3536...
self.assertPattern('<a href=\'
self.assertPattern('<a href=\'
def test_printable_fa(self): # using 'full' html version of pdf for easier testing fullfa_url = reverse('fa:full-fa', kwargs={'id': 'raoul548'}) response = self.client.get(fullfa_url) expected = 200 self.assertEqual(response.status_code, expected, 'Expected %s but returned %s for %s' % \ (expected, response.status_code, fullfa_url)) # publication infor self.assertPattern('Emory University.*Manuscript, Archives, and Rare Book Library.*Atlanta, GA 30322', response.content, "publication statement included")
4dad10bc358413e2fc2241a93d4315ef0ddc39ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10178/4dad10bc358413e2fc2241a93d4315ef0ddc39ab/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1188, 429, 67, 507, 12, 2890, 4672, 468, 1450, 296, 2854, 11, 1729, 1177, 434, 8169, 364, 15857, 7769, 1983, 507, 67, 718, 273, 4219, 2668, 507, 30, 2854, 17, 507, 2187, 1205...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1188, 429, 67, 507, 12, 2890, 4672, 468, 1450, 296, 2854, 11, 1729, 1177, 434, 8169, 364, 15857, 7769, 1983, 507, 67, 718, 273, 4219, 2668, 507, 30, 2854, 17, 507, 2187, 1205...
Returns True if the (x,y) is an affine point on this curve.
Returns True if (x,y) is an affine point on this curve.
def is_on_curve(self, x, y): """ Returns True if the (x,y) is an affine point on this curve.
09e345b25236d5bd15eecd86cc093a836e7ba6db /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/09e345b25236d5bd15eecd86cc093a836e7ba6db/ell_generic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 265, 67, 16683, 12, 2890, 16, 619, 16, 677, 4672, 3536, 2860, 1053, 309, 326, 261, 92, 16, 93, 13, 353, 392, 28381, 1634, 603, 333, 8882, 18, 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, 353, 67, 265, 67, 16683, 12, 2890, 16, 619, 16, 677, 4672, 3536, 2860, 1053, 309, 326, 261, 92, 16, 93, 13, 353, 392, 28381, 1634, 603, 333, 8882, 18, 2, -100, -100, -100, -100, -100...
consumerdata = { 'id' : "1", 'description' : 'prad.rdu.redhat.com', }
def clean(self): pass
9a111be4d86394185488bf195d0aa8529e55b3b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/9a111be4d86394185488bf195d0aa8529e55b3b0/connection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 1342, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 12, 2890, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
print "--- TCP/IP to Serial redirector --- type Ctrl-C / BREAK to quit" print "--- %s %s,%s,%s,%s ---" % (ser.portstr, ser.baudrate, 8, ser.parity, 1)
sys.stderr.write("--- TCP/IP to Serial redirector --- type Ctrl-C / BREAK to quit\n") sys.stderr.write("--- %s %s,%s,%s,%s ---\n" % (ser.portstr, ser.baudrate, 8, ser.parity, 1))
def stop(self): """Stop copying""" if self.alive: self.alive = False self.thread_read.join()
4ecea3dab2a6a60d58f5e81772097e13990d8140 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2937/4ecea3dab2a6a60d58f5e81772097e13990d8140/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 3536, 4947, 8933, 8395, 309, 365, 18, 11462, 30, 365, 18, 11462, 273, 1083, 365, 18, 5930, 67, 896, 18, 5701, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -...
[{'width': 200.0-180.0, 'height': 360.0-200.0, 'stroke_color_rgba': 0x1010FFFFL, 'line_width': 4.0, 'y': 200.0, 'x': 180.0, 'tool': 'RECT'}, {'width': 340.0-180.0, 'height': 400.0-380.0, 'stroke_color_rgba': 0x1010FFFFL, 'line_width': 4.0, 'y':380.0, 'x': 180.0, 'tool': 'RECT'}, {'width': 380.0-360.0, 'height': 400.0-240.0, 'stroke_color_rgba': 0x1010FFFFL, 'line_width': 4.0, 'y': 240.0, 'x': 360.0, 'tool': 'RECT'}, {'width': 380.0-220.0, 'height': 220.0-200.0, 'stroke_color_rgba': 0x1010FFFFL, 'line_width': 4.0, 'y': 200.0, 'x': 220.0, 'tool': 'RECT'}]
[{'width': 200.0-180.0, 'height': 360.0-200.0, 'stroke_color_rgba': C_BLUE|C_STROKE, 'line_width': 4.0, 'y': 200.0, 'x': 180.0, 'tool': 'RECT'}, {'width': 340.0-180.0, 'height': 400.0-380.0, 'stroke_color_rgba': C_BLUE|C_STROKE, 'line_width': 4.0, 'y':380.0, 'x': 180.0, 'tool': 'RECT'}, {'width': 380.0-360.0, 'height': 400.0-240.0, 'stroke_color_rgba': C_BLUE|C_STROKE, 'line_width': 4.0, 'y': 240.0, 'x': 360.0, 'tool': 'RECT'}, {'width': 380.0-220.0, 'height': 220.0-200.0, 'stroke_color_rgba': C_BLUE|C_STROKE, 'line_width': 4.0, 'y': 200.0, 'x': 220.0, 'tool': 'RECT'}]
def init_item_list(self):
afe6d4cfa4a483507d506d63168d467aba7acf11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11306/afe6d4cfa4a483507d506d63168d467aba7acf11/redraw.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1726, 67, 1098, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 1726, 67, 1098, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if not line:
if line is None:
def readlines(self, timeout=0, stream="stdout"): while True: line = self.readline(timeout, stream) if not line: break yield line
8a6b32d2e2273f0015183fe2e5ab021bb0826317 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10929/8a6b32d2e2273f0015183fe2e5ab021bb0826317/process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 16, 2021, 33, 20, 16, 1407, 1546, 10283, 6, 4672, 1323, 1053, 30, 980, 273, 365, 18, 896, 1369, 12, 4538, 16, 1407, 13, 309, 980, 353, 599, 30, 898, 2824, 980, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17546, 12, 2890, 16, 2021, 33, 20, 16, 1407, 1546, 10283, 6, 4672, 1323, 1053, 30, 980, 273, 365, 18, 896, 1369, 12, 4538, 16, 1407, 13, 309, 980, 353, 599, 30, 898, 2824, 980, 2, ...
return Dec_n1
return _Dec_n1
def compare_total(self, other): """Compares self to other using the abstract representations.
7ea2d399fb15e34ed3695ca0160f84f982b9194c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/7ea2d399fb15e34ed3695ca0160f84f982b9194c/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 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, 3400, 67, 4963, 12, 2890, 16, 1308, 4672, 3536, 19199, 365, 358, 1308, 1450, 326, 8770, 27851, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
CONObject._attribute_type_registry[type][0](subelement, attr_val)
CONObject._attribute_type_registry[attr_def['type']][0](subelement, attr_val)
def object_serializer(cls, element, value): """ Serializer function used by CONObject's serializing mechanism for serializing CONObject-objects.
9c238fb79ee95b3c72da20c6bc0bc86cd1154d59 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2616/9c238fb79ee95b3c72da20c6bc0bc86cd1154d59/conobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 733, 67, 15663, 12, 6429, 16, 930, 16, 460, 4672, 3536, 15348, 445, 1399, 635, 3492, 921, 1807, 2734, 6894, 12860, 364, 2734, 6894, 3492, 921, 17, 6911, 18, 2, 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, 733, 67, 15663, 12, 6429, 16, 930, 16, 460, 4672, 3536, 15348, 445, 1399, 635, 3492, 921, 1807, 2734, 6894, 12860, 364, 2734, 6894, 3492, 921, 17, 6911, 18, 2, -100, -100, -100, -100, ...
self.current_state is not None or
self.state is not None or self.activated is not None or
def hasContent_(self): if ( self.generated_uuid is not None or self.local_uuid is not None or self.activation_date is not None or self.scheduled_event_start_date is not None or self.launch_date is not None or self.ssl_client_certificate is not None or self.ssl_client_key is not None or self.ssl_server_certificate is not None or self.launching_user is not None or self.target_type is not None or self.target_name is not None or self.target_system_id is not None or self.available is not None or self.is_manageable is not None or self.log is not None or self.managed_status is not None or self.force_update_url is not None or self.description is not None or self.instance_id is not None or self.name is not None or self.out_of_date is not None or self.public_dns_name is not None or self.reservation_id is not None or self.current_state is not None or self.target is not None or self.system_log is not None or self.networks is not None ): return True else: return False
0edf7ff39fb592b3aec2afae94ce938d1f08b997 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7635/0edf7ff39fb592b3aec2afae94ce938d1f08b997/generateds_system_1_0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1350, 67, 12, 2890, 4672, 309, 261, 365, 18, 11168, 67, 7080, 353, 486, 599, 578, 365, 18, 3729, 67, 7080, 353, 486, 599, 578, 365, 18, 16908, 67, 712, 353, 486, 599, 578, 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, 711, 1350, 67, 12, 2890, 4672, 309, 261, 365, 18, 11168, 67, 7080, 353, 486, 599, 578, 365, 18, 3729, 67, 7080, 353, 486, 599, 578, 365, 18, 16908, 67, 712, 353, 486, 599, 578, 365, ...
def _get_seeds(self, work): return [k for k, v in SeedView().map(work)] def _find_old_work(self, edition_key): """Returns the key of the work that has this edition by querying the works_db. """ pass
def _get_editions(self, changeset): return [doc for doc in changeset.get("docs", []) if doc['key'].startswith("/books/")]
3424bcb5082c82afaf523c9ed6e3cfd2a8c2c832 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/3424bcb5082c82afaf523c9ed6e3cfd2a8c2c832/updater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 329, 5029, 12, 2890, 16, 22463, 4672, 327, 306, 2434, 364, 997, 316, 22463, 18, 588, 2932, 8532, 3113, 5378, 13, 309, 997, 3292, 856, 29489, 17514, 1918, 2932, 19, 12567, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 329, 5029, 12, 2890, 16, 22463, 4672, 327, 306, 2434, 364, 997, 316, 22463, 18, 588, 2932, 8532, 3113, 5378, 13, 309, 997, 3292, 856, 29489, 17514, 1918, 2932, 19, 12567, ...
"An integer was expected in the value '%s'" % escape(v)
"An integer was expected in the value %s" % escape(`v`)
def field2int(v): if isinstance(v, (ListType, TupleType)): return map(field2int, v) v = field2string(v) if v: try: return int(v) except ValueError: raise ValueError, ( "An integer was expected in the value '%s'" % escape(v) ) raise ValueError, 'Empty entry when <strong>integer</strong> expected'
fca9a010fcede1e9ef026951f09eadb0dcac800c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/fca9a010fcede1e9ef026951f09eadb0dcac800c/Converters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 22, 474, 12, 90, 4672, 309, 1549, 12, 90, 16, 261, 19366, 16, 7257, 559, 3719, 30, 327, 852, 12, 1518, 22, 474, 16, 331, 13, 331, 273, 652, 22, 1080, 12, 90, 13, 309, 331, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 652, 22, 474, 12, 90, 4672, 309, 1549, 12, 90, 16, 261, 19366, 16, 7257, 559, 3719, 30, 327, 852, 12, 1518, 22, 474, 16, 331, 13, 331, 273, 652, 22, 1080, 12, 90, 13, 309, 331, 3...
sage: sr = mq.SR(1,1,1,4)
sage: sr = mq.SR(1, 1, 1, 4)
def lin_matrix(self, length = None): """ Return the Lin matrix.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 273, 599, 4672, 3536, 2000, 326, 27865, 3148, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4739, 67, 5667, 12, 2890, 16, 769, 273, 599, 4672, 3536, 2000, 326, 27865, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if sage_trac_re.match(bundle) and not bundle.endswith('?format=raw'): bundle += '?format=raw'
if sage_trac_re.match(bundle): bundle = bundle.replace('sage_trac/attachment/', 'sage_trac/raw-attachment/')
def unbundle(self, bundle, update=True, options=''): """ Apply patches from a hg patch to the repository.
65e577aa425528500eddb1aad3a5ef5c97b8e202 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/65e577aa425528500eddb1aad3a5ef5c97b8e202/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 9991, 12, 2890, 16, 3440, 16, 1089, 33, 5510, 16, 702, 2218, 11, 4672, 3536, 5534, 16482, 628, 279, 22576, 4729, 358, 326, 3352, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 9991, 12, 2890, 16, 3440, 16, 1089, 33, 5510, 16, 702, 2218, 11, 4672, 3536, 5534, 16482, 628, 279, 22576, 4729, 358, 326, 3352, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
description = event.getChildValue('summary')
description = event.getChildValue('description')
def importProcess(self, text, extension=None, item=None, changes=None, previousView=None, updateCallback=None): # the item parameter is so that a share item can be passed in for us # to populate.
d12965232671da03893b3924cfdb34aca2a56106 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d12965232671da03893b3924cfdb34aca2a56106/ICalendar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 2227, 12, 2890, 16, 977, 16, 2710, 33, 7036, 16, 761, 33, 7036, 16, 3478, 33, 7036, 16, 2416, 1767, 33, 7036, 16, 1089, 2428, 33, 7036, 4672, 468, 326, 761, 1569, 353, 1427, 71...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1930, 2227, 12, 2890, 16, 977, 16, 2710, 33, 7036, 16, 761, 33, 7036, 16, 3478, 33, 7036, 16, 2416, 1767, 33, 7036, 16, 1089, 2428, 33, 7036, 4672, 468, 326, 761, 1569, 353, 1427, 71...
DrawTextFramed('%s ' % info.album, iv, x=left, y=top, width=500,height=35, mode='soft')
DrawTextFramed('%s ' % info.album, iv, x=left, y=top, width=500,height=-1, mode='soft')
def DrawMP3(self, info):
e320e1c9ff85e423ac5c0816f66daeb375083006 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e320e1c9ff85e423ac5c0816f66daeb375083006/skin_main1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4566, 23, 12, 2890, 16, 1123, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 4566, 23, 12, 2890, 16, 1123, 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...
self._wbuf.extend(filter(None, map(str, list)))
lines = filter(None, map(str, list)) self._wbuf_len += sum(map(len, lines)) self._wbuf.extend(lines)
def writelines(self, list): # XXX We could do better here for very long lists # XXX Should really reject non-string non-buffers self._wbuf.extend(filter(None, map(str, list))) if (self._wbufsize <= 1 or self._get_wbuf_len() >= self._wbufsize): self.flush()
36c3928fdc7d246fda50d48c108fb6116c315229 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/36c3928fdc7d246fda50d48c108fb6116c315229/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6004, 1465, 12, 2890, 16, 666, 4672, 468, 11329, 1660, 3377, 741, 7844, 2674, 364, 8572, 1525, 6035, 468, 11329, 9363, 8654, 4925, 1661, 17, 1080, 1661, 17, 28101, 2362, 273, 1034, 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, 6004, 1465, 12, 2890, 16, 666, 4672, 468, 11329, 1660, 3377, 741, 7844, 2674, 364, 8572, 1525, 6035, 468, 11329, 9363, 8654, 4925, 1661, 17, 1080, 1661, 17, 28101, 2362, 273, 1034, 12, 7...
print retVal for mvField in self.__multiValueDefFields: retVal = self._update( "DELETE FROM `tq_TQTo%s` WHERE TQId = %s" % ( mvField, tqId ), conn = connObj ) if not retVal[ 'OK' ]: return retVal return S_OK( True )
sqlCmd = "SELECT TQId FROM `tq_TaskQueues` WHERE `tq_TaskQueues`.TQId = %s" % tqId retVal = self._update( sqlCmd, conn = connObj ) if not retVal[ 'OK' ]: return retVal print retVal['Value'] if not retVal['Value']: for mvField in self.__multiValueDefFields: retVal = self._update( "DELETE FROM `tq_TQTo%s` WHERE TQId = %s" % ( mvField, tqId ), conn = connObj ) if not retVal[ 'OK' ]: return retVal return S_OK( True )
def deleteTaskQueueIfEmpty( self, tqId, connObj = False ): """ Try to delete a task queue if its empty """ if not connObj: retVal = self._getConnection() if not retVal[ 'OK' ]: return S_ERROR( "Can't insert job: %s" % retVal[ 'Message' ] ) connObj = retVal[ 'Value' ] sqlCmd = "DELETE FROM `tq_TaskQueues` WHERE `tq_TaskQueues`.TQId = %s" % tqId sqlCmd = "%s AND `tq_TaskQueues`.TQId not in ( SELECT DISTINCT TQId from `tq_Jobs` )" % sqlCmd retVal = self._update( sqlCmd, conn = connObj ) if not retVal[ 'OK' ]: return S_ERROR( "Could not delete task queue %s: %s" % ( tqId, retVal[ 'Message' ] ) ) print retVal # if connObj.num_rows() == 1: for mvField in self.__multiValueDefFields: retVal = self._update( "DELETE FROM `tq_TQTo%s` WHERE TQId = %s" % ( mvField, tqId ), conn = connObj ) if not retVal[ 'OK' ]: return retVal return S_OK( True ) return S_OK( False )
f7eeefab131d0fed617a200727affb9b800272c2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/f7eeefab131d0fed617a200727affb9b800272c2/TaskQueueDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 2174, 3183, 26326, 12, 365, 16, 20061, 548, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 6161, 358, 1430, 279, 1562, 2389, 309, 2097, 1008, 3536, 309, 486, 1487, 2675, 30, 12197, 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, 1430, 2174, 3183, 26326, 12, 365, 16, 20061, 548, 16, 1487, 2675, 273, 1083, 262, 30, 3536, 6161, 358, 1430, 279, 1562, 2389, 309, 2097, 1008, 3536, 309, 486, 1487, 2675, 30, 12197, 273,...
defines = ' '.join(k+'='+v for k, v in kw.items())
defines = ' '.join(k+'='+str(v) for k, v in kw.items())
def nmake(makefile, command="", **kw): defines = ' '.join(k+'='+v for k, v in kw.items()) cmd = NMAKE % (makefile, defines, command) print("\n\n"+cmd+"\n") if os.system(cmd) != 0: raise RuntimeError(cmd)
9f59fa5d67030eb5749938a99c4fe105955aedcc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/9f59fa5d67030eb5749938a99c4fe105955aedcc/build_tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 6540, 12, 6540, 768, 16, 1296, 1546, 3113, 2826, 9987, 4672, 11164, 273, 296, 2418, 5701, 12, 79, 6797, 2218, 15, 701, 12, 90, 13, 364, 417, 16, 331, 316, 5323, 18, 3319, 10756, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 6540, 12, 6540, 768, 16, 1296, 1546, 3113, 2826, 9987, 4672, 11164, 273, 296, 2418, 5701, 12, 79, 6797, 2218, 15, 701, 12, 90, 13, 364, 417, 16, 331, 316, 5323, 18, 3319, 10756, ...
_index_bands = Dict
_index_bands = Dict()
def __init__(self): super(ColormappedScatterPlotView, self).__init__() vgroup = self.content vgroup.content[0].content.append(Item("fill_alpha", label="Fill alpha", editor=RangeEditor(low=0.0, high=1.0))) return
b5711dd6bc94190629b0de86a1a606aa2263ac30 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13167/b5711dd6bc94190629b0de86a1a606aa2263ac30/colormapped_scatterplot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 914, 18804, 1845, 1541, 9293, 11532, 1767, 16, 365, 2934, 972, 2738, 972, 1435, 331, 1655, 273, 365, 18, 1745, 331, 1655, 18, 1745, 63, 20, 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, 1001, 2738, 972, 12, 2890, 4672, 2240, 12, 914, 18804, 1845, 1541, 9293, 11532, 1767, 16, 365, 2934, 972, 2738, 972, 1435, 331, 1655, 273, 365, 18, 1745, 331, 1655, 18, 1745, 63, 20, 8...
b = int_w__Long(space, w_long2)
shiftby = int_w__Long(space, w_long2)
def lshift__Long_Long(space, w_long1, w_long2): if w_long2.sign < 0: raise OperationError(space.w_ValueError, space.wrap("negative shift count")) elif w_long2.sign == 0: return w_long1 try: b = int_w__Long(space, w_long2) except OverflowError: # b too big raise OperationError(space.w_OverflowError, space.wrap("shift count too large")) wordshift = b // LONG_BIT remshift = r_uint(b) % LONG_BIT oldsize = len(w_long1.digits) newsize = oldsize + wordshift if remshift != 0: newsize += 1 w_result = W_LongObject(space, [r_uint(0)] * newsize, w_long1.sign) rightshift = LONG_BIT - remshift LOWER_MASK = (r_uint(1) << r_uint(rightshift)) - 1 UPPER_MASK = ~LOWER_MASK accum = r_uint(0) i = wordshift j = 0 while j < oldsize: digit = w_long1.digits[j] w_result.digits[i] = (accum | (digit << remshift)) accum = (digit & UPPER_MASK) >> rightshift i += 1 j += 1 if remshift: w_result.digits[i] = accum else: assert not accum w_result._normalize() return w_result
ad929a678777d2ef2df66adef7cd3564d723bca6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ad929a678777d2ef2df66adef7cd3564d723bca6/longobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4012, 972, 3708, 67, 3708, 12, 2981, 16, 341, 67, 5748, 21, 16, 341, 67, 5748, 22, 4672, 309, 341, 67, 5748, 22, 18, 2977, 411, 374, 30, 1002, 4189, 668, 12, 2981, 18, 91, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 328, 4012, 972, 3708, 67, 3708, 12, 2981, 16, 341, 67, 5748, 21, 16, 341, 67, 5748, 22, 4672, 309, 341, 67, 5748, 22, 18, 2977, 411, 374, 30, 1002, 4189, 668, 12, 2981, 18, 91, 67,...
for group_id in source.get_groups_roles_map().keys(): group_users.extend(source.group_member_ids(group_id))
for group_id in self.sources[source_id]['group_map'].keys(): group_users.extend( source.group_member_ids(group_id) )
def get_users(self): if not hasattr(self, '_v_external_user_cache'): self._v_external_user_cache = {} cache = self._v_external_user_cache users = []
c95e6e4b132778e289b481687f73f58af081bc1c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/c95e6e4b132778e289b481687f73f58af081bc1c/directory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5577, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 90, 67, 9375, 67, 1355, 67, 2493, 11, 4672, 365, 6315, 90, 67, 9375, 67, 1355, 67, 2493, 273, 2618, 1247, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5577, 12, 2890, 4672, 309, 486, 3859, 12, 2890, 16, 2070, 90, 67, 9375, 67, 1355, 67, 2493, 11, 4672, 365, 6315, 90, 67, 9375, 67, 1355, 67, 2493, 273, 2618, 1247, 273, 365,...
q = mt.random_double(size=q.size())
q = q_fixed.deep_copy() q.extend(mt.random_double(size=q_size_moving)*two_pi)
def process(file_name): time_start = time.time() pdb_inp = iotbx.pdb.input(file_name=file_name) pdb_atoms = pdb_inp.atoms() print "Time reading pdb file: %.2f" % (time.time() - time_start) print "Number of atoms:", pdb_atoms.size() pdb_atoms.set_chemical_element_simple_if_necessary() sites_cart = pdb_atoms.extract_xyz() # time_start = time.time() edge_list = build_edge_list( sites_cart=sites_cart, elements=pdb_atoms.extract_element()) print "Time building bond list: %.2f" % (time.time() - time_start) print "Number of bonds:", len(edge_list) # time_start = time.time() tardy_tree = scitbx.graph.tardy_tree.construct( sites=sites_cart, edge_list=edge_list) print "Time building tardy tree: %.2f" % (time.time() - time_start) # time_start = time.time() tardy_model = scitbx.rigid_body.tardy_model( labels=[atom.id_str() for atom in pdb_atoms], sites=sites_cart, masses=[1]*sites_cart.size(), tardy_tree=tardy_tree, potential_obj=None) q = tardy_model.pack_q() print "Time building tardy model: %.2f" % (time.time() - time_start) print "Number of degrees of freedom:", q.size() # mt = flex.mersenne_twister() time_start = time.time() n_conf = 10000 for i_conf in xrange(n_conf): q = mt.random_double(size=q.size()) tardy_model.unpack_q(q_packed=q) conf_sites_cart = tardy_model.sites_moved() time_diff = time.time() - time_start print "time / %d conf: %.2f seconds" % (n_conf, time_diff) print "time / conf: %.3f milli seconds" % (time_diff / n_conf * 1000) if (time_diff != 0): print "conf / second: %.2f" % (n_conf / time_diff)
6fc4e17633acb8acf6592038a60d7e227de0f5a4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/6fc4e17633acb8acf6592038a60d7e227de0f5a4/pdb_tardy_conf_sampling_simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 768, 67, 529, 4672, 813, 67, 1937, 273, 813, 18, 957, 1435, 10892, 67, 31647, 273, 30956, 70, 92, 18, 17414, 18, 2630, 12, 768, 67, 529, 33, 768, 67, 529, 13, 10892, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 768, 67, 529, 4672, 813, 67, 1937, 273, 813, 18, 957, 1435, 10892, 67, 31647, 273, 30956, 70, 92, 18, 17414, 18, 2630, 12, 768, 67, 529, 33, 768, 67, 529, 13, 10892, 67, ...
def ylabel(self,t):
def ytitle(self,t):
def ylabel(self,t): cmd = 'set ylabel "' + t + '"' self._replot(cmd)
6a704f0bcf83e352f39dea8e27e6094efb896ef0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/6a704f0bcf83e352f39dea8e27e6094efb896ef0/pyPlot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 2649, 12, 2890, 16, 88, 4672, 1797, 273, 296, 542, 16305, 2491, 397, 268, 397, 4754, 365, 6315, 266, 4032, 12, 4172, 13, 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, 677, 2649, 12, 2890, 16, 88, 4672, 1797, 273, 296, 542, 16305, 2491, 397, 268, 397, 4754, 365, 6315, 266, 4032, 12, 4172, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
dtype : dtype Data type of the output. If None, the type of the data argument is used. If dtype is not None and different from data.dtype, a copy is performed. copy : bool Whether to copy the input data (True), or to use a reference instead. Note: data are NOT copied by default. subok : {True, boolean}
dtype : {dtype}, optional Data type of the output. If dtype is None, the type of the data argument (`data.dtype`) is used. If dtype is not None and different from `data.dtype`, a copy is performed. copy : {False, True}, optional Whether to copy the input data (True), or to use a reference instead. Note: data are NOT copied by default. subok : {True, False}, optional
def next(self): "Returns the next element of the iterator." d = self.ma_iter.next() if self.maskiter is not None and self.maskiter.next(): d = masked return d
c5137ea1a63bd721dd47bb2a5d588d161d0e9b76 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/c5137ea1a63bd721dd47bb2a5d588d161d0e9b76/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 315, 1356, 326, 1024, 930, 434, 326, 2775, 1199, 302, 273, 365, 18, 2540, 67, 2165, 18, 4285, 1435, 309, 365, 18, 4455, 2165, 353, 486, 599, 471, 365, 18, 4455, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 315, 1356, 326, 1024, 930, 434, 326, 2775, 1199, 302, 273, 365, 18, 2540, 67, 2165, 18, 4285, 1435, 309, 365, 18, 4455, 2165, 353, 486, 599, 471, 365, 18, 4455, ...
if _rating_delete(url):
try: del rating_store[url] rating_store.write()
def _form_delete (): global url if _rating_delete(url): info['ratingdeleted'] = True else: error['ratingdeleted'] = True
ed0cb748778a86c3afc9c838eeebee993fcf208d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ed0cb748778a86c3afc9c838eeebee993fcf208d/rating_html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 687, 67, 3733, 1832, 30, 2552, 880, 775, 30, 1464, 13953, 67, 2233, 63, 718, 65, 13953, 67, 2233, 18, 2626, 1435, 1123, 3292, 17326, 8600, 3546, 273, 1053, 469, 30, 555, 3292, 173...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 687, 67, 3733, 1832, 30, 2552, 880, 775, 30, 1464, 13953, 67, 2233, 63, 718, 65, 13953, 67, 2233, 18, 2626, 1435, 1123, 3292, 17326, 8600, 3546, 273, 1053, 469, 30, 555, 3292, 173...
from sage.misc.all import cputime
def save(self, filename=None): from sage.misc.all import cputime if filename is None: t = cputime() F = os.path.abspath(self.__filename) try: shutil.copy(F, F[:-5] + '-backup.sobj') except IOError: pass print "Saving notebook to %s"%self.__filename SageObject.save(self, os.path.abspath(self.__filename), compress=False) print "Time: %s"%cputime(t) else: SageObject.save(self, os.path.abspath(filename), compress=False)
89d34e956d4a19bceaf407959a515b03943ecec9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/89d34e956d4a19bceaf407959a515b03943ecec9/notebook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 33, 7036, 4672, 309, 1544, 353, 599, 30, 268, 273, 276, 458, 494, 1435, 478, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 16186, 3459, 13, 775, 30, 11060, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 1544, 33, 7036, 4672, 309, 1544, 353, 599, 30, 268, 273, 276, 458, 494, 1435, 478, 273, 1140, 18, 803, 18, 5113, 803, 12, 2890, 16186, 3459, 13, 775, 30, 11060, 1...
self._install(dwnpkg, cs, lk, None, pruneweight, depth)
task = self._install(dwnpkg, cs, lk, None, pruneweight, depth) for res in task: yield res
def _updown(self, pkg, changeset, locked, pruneweight, depth=0, force=0): depth += 1 trace(1, depth, "_updown(%s, pw=%f, f=%d)", (pkg, pruneweight, force))
0a3ab4bfdab2b5f93bf6292cceb0351050047a0d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/0a3ab4bfdab2b5f93bf6292cceb0351050047a0d/transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 416, 2378, 12, 2890, 16, 3475, 16, 22463, 16, 8586, 16, 846, 318, 359, 1274, 16, 3598, 33, 20, 16, 2944, 33, 20, 4672, 3598, 1011, 404, 2606, 12, 21, 16, 3598, 16, 4192, 416, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 416, 2378, 12, 2890, 16, 3475, 16, 22463, 16, 8586, 16, 846, 318, 359, 1274, 16, 3598, 33, 20, 16, 2944, 33, 20, 4672, 3598, 1011, 404, 2606, 12, 21, 16, 3598, 16, 4192, 416, ...
self.container.set_spacing(2)
self.container.set_spacing(0)
def change_orient(self,arg1,data): for group in self.groups.get_names(): self.container.remove(self.groups.get_group(group).button) self.applet.remove(self.container) self.container.destroy() self.container = None if self.applet.get_orient() == gnomeapplet.ORIENT_DOWN or self.applet.get_orient() == gnomeapplet.ORIENT_UP: self.container = gtk.HBox() self.orient = "h" else: self.container = gtk.VBox() self.orient = "v" self.applet.add(self.container) for group in self.groups.get_names(): self.container.pack_start(self.groups.get_group(group).button,False) self.container.set_spacing(2) self.container.show_all()
0263e433d37d88f5c738704c9cf2ba8be0404a06 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7075/0263e433d37d88f5c738704c9cf2ba8be0404a06/dockbarx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2549, 67, 14766, 12, 2890, 16, 3175, 21, 16, 892, 4672, 364, 1041, 316, 365, 18, 4650, 18, 588, 67, 1973, 13332, 365, 18, 3782, 18, 4479, 12, 2890, 18, 4650, 18, 588, 67, 1655, 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, 2549, 67, 14766, 12, 2890, 16, 3175, 21, 16, 892, 4672, 364, 1041, 316, 365, 18, 4650, 18, 588, 67, 1973, 13332, 365, 18, 3782, 18, 4479, 12, 2890, 18, 4650, 18, 588, 67, 1655, 12, ...
if not hasattr(item, attributeName): return
def SetAttributeValue (self, item, attributeName, valueString): if not valueString: if not hasattr(item, attributeName): return # no change try: delattr(item, attributeName) except AttributeError: pass else: # lookup an existing item by name, if we can find it, value = Calendar.Location.getLocation (item.itsView, valueString) if getattr(item, attributeName, None) is value: return # no change setattr (item, attributeName, value) self.AttributeChanged()
bb63d6a70f99d068c2a0defadc56dfa5c6766916 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/bb63d6a70f99d068c2a0defadc56dfa5c6766916/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 14942, 261, 2890, 16, 761, 16, 9734, 16, 24998, 4672, 309, 486, 24998, 30, 468, 1158, 2549, 775, 30, 1464, 1747, 12, 1726, 16, 9734, 13, 1335, 6394, 30, 1342, 469, 30, 468, 3689,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 14942, 261, 2890, 16, 761, 16, 9734, 16, 24998, 4672, 309, 486, 24998, 30, 468, 1158, 2549, 775, 30, 1464, 1747, 12, 1726, 16, 9734, 13, 1335, 6394, 30, 1342, 469, 30, 468, 3689,...
pathSURL = self.getUrl(urlDict['surl'])['Value']
pathSURL = urlDict['surl']
def getTransportURL(self,path,protocols=False): """ Obtain the TURLs for the supplied path and protocols """ if type(path) == types.StringType: urls = [path] elif type(path) == types.ListType: urls = path else: return S_ERROR("SRM2Storage.getTransportURL: Supplied path must be string or list of strings")
c729d1016adac008ed3fa514541b061de05759d3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/c729d1016adac008ed3fa514541b061de05759d3/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29801, 1785, 12, 2890, 16, 803, 16, 31018, 33, 8381, 4672, 3536, 24850, 326, 399, 15749, 364, 326, 4580, 589, 471, 16534, 3536, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 6903...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29801, 1785, 12, 2890, 16, 803, 16, 31018, 33, 8381, 4672, 3536, 24850, 326, 399, 15749, 364, 326, 4580, 589, 471, 16534, 3536, 309, 618, 12, 803, 13, 422, 1953, 18, 780, 559, 30, 6903...
elif node.nodeName=="
elif node.nodeName=="
def drawThemeItem(page, itemsonthispage, itemnum, menuitem, bgimage, draw, bgimagemask, drawmask, highlightcolor, spumuxdom, spunode, numberofitems, chapternumber, chapterlist): """Draws text and graphics onto a dvd menu, called by createMenu and createChapterMenu""" #Get the XML containing information about this item infoDOM = xml.dom.minidom.parse( os.path.join(getItemTempPath(itemnum),"info.xml") ) #Error out if its the wrong XML if infoDOM.documentElement.tagName != "fileinfo": fatalError("The info.xml file (%s) doesn't look right" % os.path.join(getItemTempPath(itemnum),"info.xml")) #boundarybox holds the max and min dimensions for this item so we can auto build a menu highlight box boundarybox=9999,9999,0,0 wantHighlightBox = True #Loop through all the nodes inside this menu item for node in menuitem.childNodes: #Process each type of item to add it onto the background image if node.nodeName=="graphic": #Overlay graphic image onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage, chapternumber, chapterlist) if doesFileExist(imagefilename): picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added image %s" % imagefilename) boundarybox=checkBoundaryBox(boundarybox, node) else: write( "Image file does not exist '%s'" % imagefilename) elif node.nodeName=="text": #Apply some text to the background, including wordwrap if required. text=expandItemText(infoDOM,node.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(node, "x"), getScaledAttribute(node, "y"), getScaledAttribute(node, "w"), getScaledAttribute(node, "h"), text, themeFonts[int(node.attributes["font"].value)], node.attributes["colour"].value, node.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text elif node.nodeName=="previous": if page>1: #Overlay previous graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for previous button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for previous button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added previous button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","previous") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="next": if itemnum < numberofitems: #Overlay next graphic button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for next button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for next button (%s)." % maskimagefilename) picture = Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture = picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button image %s " % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture write( "Added next button mask image %s" % imagefilename) button = spumuxdom.createElement("button") button.setAttribute("name","next") button.setAttribute("x0","%s" % getScaledAttribute(node, "x")) button.setAttribute("y0","%s" % getScaledAttribute(node, "y")) button.setAttribute("x1","%s" % (getScaledAttribute(node, "x") + getScaledAttribute(node, "w"))) button.setAttribute("y1","%s" % (getScaledAttribute(node, "y") + getScaledAttribute(node, "h"))) spunode.appendChild(button) elif node.nodeName=="button": wantHighlightBox = False #Overlay item graphic/text button onto background imagefilename = expandItemText(infoDOM,node.attributes["filename"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(imagefilename): fatalError("Cannot find image for menu button (%s)." % imagefilename) maskimagefilename = expandItemText(infoDOM,node.attributes["mask"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if not doesFileExist(maskimagefilename): fatalError("Cannot find mask image for menu button (%s)." % maskimagefilename) picture=Image.open(imagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimage.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")), picture) del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textnormal") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) if text>"": paintText( draw, getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], textnode.attributes["colour"].value, textnode.attributes["align"].value ) boundarybox=checkBoundaryBox(boundarybox, node) del text write( "Added button image %s" % imagefilename) picture=Image.open(maskimagefilename,"r").resize((getScaledAttribute(node, "w"), getScaledAttribute(node, "h"))) picture=picture.convert("RGBA") bgimagemask.paste(picture, (getScaledAttribute(node, "x"), getScaledAttribute(node, "y")),picture) #del picture # if we have some text paint that over the image textnode = node.getElementsByTagName("textselected") if textnode.length > 0: textnode = textnode[0] text=expandItemText(infoDOM,textnode.attributes["value"].value, itemnum, page, itemsonthispage,chapternumber,chapterlist) textImage=Image.new("1",picture.size) textDraw=ImageDraw.Draw(textImage) if text>"": paintText(textDraw, getScaledAttribute(node, "x") - getScaledAttribute(textnode, "x"), getScaledAttribute(node, "y") - getScaledAttribute(textnode, "y"), getScaledAttribute(textnode, "w"), getScaledAttribute(textnode, "h"), text, themeFonts[int(textnode.attributes["font"].value)], "white", textnode.attributes["align"].value ) bgimagemask.paste(textnode.attributes["colour"].value, (getScaledAttribute(textnode, "x"), getScaledAttribute(textnode, "y")), textImage) boundarybox=checkBoundaryBox(boundarybox, node) textImage.save(os.path.join(getTempPath(),"textimage-%s.png" % itemnum),"PNG",quality=99,optimize=0) del text, textImage, textDraw del picture elif node.nodeName=="#text": #Do nothing assert True else: write( "Dont know how to process %s" % node.nodeName) if drawmask == None: return #Draw the mask for this item if wantHighlightBox == True: #Make the boundary box bigger than the content to avoid over write(ing (2 pixels) boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 #draw.rectangle(boundarybox,outline="white") drawmask.rectangle(boundarybox,outline=highlightcolor) #Draw another line to make the box thicker - PIL does not support linewidth boundarybox=boundarybox[0]-1,boundarybox[1]-1,boundarybox[2]+1,boundarybox[3]+1 #draw.rectangle(boundarybox,outline="white") drawmask.rectangle(boundarybox,outline=highlightcolor) node = spumuxdom.createElement("button") #Fiddle this for chapter marks.... if chapternumber>0: node.setAttribute("name","%s" % chapternumber) else: node.setAttribute("name","%s" % itemnum) node.setAttribute("x0","%d" % int(boundarybox[0])) node.setAttribute("y0","%d" % int(boundarybox[1])) node.setAttribute("x1","%d" % int(boundarybox[2] + 1)) node.setAttribute("y1","%d" % int(boundarybox[3] + 1)) spunode.appendChild(node)
9e121f6bafeabacd733cabc0d27599be47ae1900 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/13713/9e121f6bafeabacd733cabc0d27599be47ae1900/mythburn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 8335, 1180, 12, 2433, 16, 761, 816, 2211, 2433, 16, 761, 2107, 16, 3824, 1726, 16, 7611, 2730, 16, 3724, 16, 7611, 15374, 351, 835, 16, 3724, 4455, 16, 8839, 3266, 16, 1694, 379,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 8335, 1180, 12, 2433, 16, 761, 816, 2211, 2433, 16, 761, 2107, 16, 3824, 1726, 16, 7611, 2730, 16, 3724, 16, 7611, 15374, 351, 835, 16, 3724, 4455, 16, 8839, 3266, 16, 1694, 379,...
ddi = cron_util.getDefaultDateInterval(cursor,self.tableName,datetime.timedelta(0),initialDeltaDate,defaultDeltaWindow,me.fileLogger)
ddi = cron_util.getDefaultDateInterval(cursor,self.tableName,datetime.timedelta(0),initialDeltaDate,defaultDeltaWindow,None,me.fileLogger)
def testGetDefaultDateInterval(self): cursor = self.connection.cursor() initialDeltaDate = datetime.timedelta(days=1) defaultDeltaWindow = datetime.timedelta(minutes=24)
cafbae83143e839351f7e00f20999c211cfa9fdb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12383/cafbae83143e839351f7e00f20999c211cfa9fdb/testUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 967, 1868, 1626, 4006, 12, 2890, 4672, 3347, 273, 365, 18, 4071, 18, 9216, 1435, 2172, 9242, 1626, 273, 3314, 18, 31295, 12, 9810, 33, 21, 13, 805, 9242, 3829, 273, 3314, 18, 312...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 967, 1868, 1626, 4006, 12, 2890, 4672, 3347, 273, 365, 18, 4071, 18, 9216, 1435, 2172, 9242, 1626, 273, 3314, 18, 31295, 12, 9810, 33, 21, 13, 805, 9242, 3829, 273, 3314, 18, 312...
for iname in sys.argv[1:]:
for iname in inames:
pat = r'typedef *(list|vector) *< *([^ ].*[^ ]) *>'
11ace61991eeade2a6548e8a8ab7571d7e74cf65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/310/11ace61991eeade2a6548e8a8ab7571d7e74cf65/extract_some_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 9670, 273, 436, 1404, 388, 536, 380, 12, 1098, 96, 7737, 13, 380, 32, 380, 8178, 308, 4509, 5969, 308, 13, 380, 1870, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 9670, 273, 436, 1404, 388, 536, 380, 12, 1098, 96, 7737, 13, 380, 32, 380, 8178, 308, 4509, 5969, 308, 13, 380, 1870, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.header not in obj.headers:
try: return obj.headers[self.header] except KeyError:
def __get__(self, obj, type=None): if obj is None: return self if self.header not in obj.headers: return self.default else: return obj.headers[self.header]
a24e493d23b2c0a6772078b31bd9aa3839a8fd7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12287/a24e493d23b2c0a6772078b31bd9aa3839a8fd7b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 1081, 16, 618, 33, 7036, 4672, 309, 1081, 353, 599, 30, 327, 365, 775, 30, 327, 1081, 18, 2485, 63, 2890, 18, 3374, 65, 1335, 4999, 30, 327, 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, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 972, 12, 2890, 16, 1081, 16, 618, 33, 7036, 4672, 309, 1081, 353, 599, 30, 327, 365, 775, 30, 327, 1081, 18, 2485, 63, 2890, 18, 3374, 65, 1335, 4999, 30, 327, 365, 18, ...
cs.unpackdir(mythread.data, options.campaigns_dir)
cs.unpackdir(mythread.data, options.campaigns_dir, verbose = options.verbose)
def unpackdir(self, data, path, i = 0): """ Call this to unpack a campaign contained in a WML object to the filesystem. The data parameter is the WML object, path is the path under which it will be placed. """ try: os.mkdir(path) except: pass for f in data.get_all("file"): name = f.get_text_val("name", "?") contents = f.get_binary_val("contents") if contents: print i * " " + name + " (" +\ str(len(contents)) + ")" file(path + "/" + name, "wb").write(contents) for dir in data.get_all("dir"): name = dir.get_text_val("name", "?") shutil.rmtree(path + "/" + name, True) os.mkdir(path + "/" + name) print i * " " + name self.unpackdir(dir, path + "/" + name, i + 2)
cff58537521ede54f019fd3fa82bb710569a895a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9355/cff58537521ede54f019fd3fa82bb710569a895a/campaign_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1214, 12, 2890, 16, 501, 16, 589, 16, 277, 273, 374, 4672, 3536, 3049, 333, 358, 6167, 279, 8965, 7542, 316, 279, 678, 1495, 733, 358, 326, 6496, 18, 1021, 501, 1569, 353, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6167, 1214, 12, 2890, 16, 501, 16, 589, 16, 277, 273, 374, 4672, 3536, 3049, 333, 358, 6167, 279, 8965, 7542, 316, 279, 678, 1495, 733, 358, 326, 6496, 18, 1021, 501, 1569, 353, 326, ...
def _pprint_var_value(self, var, multiline=1):
def _pprint_var_value(self, var, multiline=1, summary_linelen=0):
def _pprint_var_value(self, var, multiline=1): if not var.has_value(): return '' val = var.uid().value()
21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 84, 1188, 67, 1401, 67, 1132, 12, 2890, 16, 569, 16, 19431, 33, 21, 16, 4916, 67, 7511, 292, 275, 33, 20, 4672, 309, 486, 569, 18, 5332, 67, 1132, 13332, 327, 875, 1244, 273, ...
other = findClass(self.foreignKey)
print [self, self.soClass] other = findClass(self.foreignKey, self.soClass.sqlmeta.registry)
def postgresCreateSQL(self): sql = SOKeyCol.postgresCreateSQL(self) other = findClass(self.foreignKey) tName = other.sqlmeta.table idName = other.sqlmeta.idName if self.cascade is not None: if self.cascade == 'null': action = 'ON DELETE SET NULL' elif self.cascade: action = 'ON DELETE CASCADE' else: action = 'ON DELETE RESTRICT' else: action = '' constraint = ('CONSTRAINT %(colName)s_exists ' 'FOREIGN KEY (%(colName)s) ' 'REFERENCES %(tName)s (%(idName)s) ' '%(action)s' % {'tName': tName, 'colName': self.dbName, 'idName': idName, 'action': action}) sql = ', '.join([sql, constraint]) return sql
6698ccbfa4a596b7641cba61d4c908e1bf211d4e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/6698ccbfa4a596b7641cba61d4c908e1bf211d4e/col.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 14107, 1684, 3997, 12, 2890, 4672, 1847, 273, 7460, 653, 914, 18, 2767, 14107, 1684, 3997, 12, 2890, 13, 1172, 306, 2890, 16, 365, 18, 2048, 797, 65, 1308, 273, 1104, 797, 12, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 14107, 1684, 3997, 12, 2890, 4672, 1847, 273, 7460, 653, 914, 18, 2767, 14107, 1684, 3997, 12, 2890, 13, 1172, 306, 2890, 16, 365, 18, 2048, 797, 65, 1308, 273, 1104, 797, 12, 28...
print " <3> Scatter Data Labels:", combined_scatter_data_labels[0][scatter_counter]
print "Scatter Data Labels:", combined_scatter_data_labels[0][scatter_counter]
def extract_comp_data(comp_file_info): ## Read in d line dict from config file and Process data from source .csv files. d1_data = [] d2_data = [] d1_data_dict = {} d2_data_dict = {} d1_scatter_data_labels = [] d2_scatter_data_labels = [] #List of variables from configuration file column names. d1_data_filename = comp_file_info['d1_Filename'] #String of filename d1_column_name_row_index = int(comp_file_info['d1_Col_Name_Row'])-1 #Data 1, Column Name Row Number d1_data_row_index = int(comp_file_info['d1_Data_Row'])-1 #Data 1, Starting Row Number d1_start_data_val = comp_file_info['d1_Start'] #String value to start d1 plot data d1_stop_data_val = comp_file_info['d1_End'] #String value to stop d1 plot data d1_start_comp_val = comp_file_info['d1_Comp_Start'] #String value to start d1 compare data d1_stop_comp_val = comp_file_info['d1_Comp_End'] #String value to start d1 compare data d1_initial_value = comp_file_info['d1_Initial_Value'] #Initial Value for Quantity d1_ind_column_name_value = comp_file_info['d1_Ind_Col_Name'].strip() #Data 1, Independent Data Column Name d1_Dep_column_name_value = comp_file_info['d1_Dep_Col_Name'].strip() #Data 1, Dep Column Name ind_Scale_Factor = float(comp_file_info['Scale_Ind']) Dep_Scale_Factor = float(comp_file_info['Scale_Dep']) d2_data_filename = comp_file_info['d2_Filename'] #String of filename d2_column_name_row_index = int(comp_file_info['d2_Col_Name_Row'])-1 #Data Set 2, Data Column Name Row Number d2_data_row_index = int(comp_file_info['d2_Data_Row'])-1 #Data Set 2, Data Starting Row Number d2_start_data_val = comp_file_info['d2_Start'] #String value to start d2 plot data d2_stop_data_val = comp_file_info['d2_End'] #String value to stop d2 plot data d2_start_comp_val = comp_file_info['d2_Comp_Start'] #String value to start d2 compare data d2_stop_comp_val = comp_file_info['d2_Comp_End'] #String value to start d2 compare data d2_initial_value = comp_file_info['d2_Initial_Value'] #Initial value for Quantity d2_ind_column_name_value = comp_file_info['d2_Ind_Col_Name'].strip() #Data Set 2, Independent Data Column Name d2_Dep_column_name_value = comp_file_info['d2_Dep_Col_Name'].strip() #Data Set 2, Dep Column Name # Create Scatter Data Labels for the comparison results. if d1_Dep_column_name_value[0] == '[': if diagnostic_level >= 2: print "Data Set 1, Column Name List Detected" d1_compound_col_names = eval(d1_Dep_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 1, Compound Column Names:", d1_compound_col_names for name in d1_compound_col_names: if diagnostic_level >= 2: print "Data Set 1, Sub-Column Name:", name d1_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: if diagnostic_level >= 2: print "Single Data Set 1, Column Name:", d1_Dep_column_name_value d1_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+d1_Dep_column_name_value+"~"+d1_ind_column_name_value) if d2_Dep_column_name_value[0] == '[': if diagnostic_level >= 2: print "Data Set 2, Column Name List Detected" d2_compound_col_names = eval(d2_Dep_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 2, Compound Column Names:", d2_Dep_column_name_value for name in d2_compound_col_names: if diagnostic_level >= 2: print "Data Set 2, Sub-Column Name:", name d2_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+name) else: if diagnostic_level >= 2: print "Single Data Set 2, Column Name:", d2_Dep_column_name_value d2_scatter_data_labels.append(comp_file_info['Quantity']+"~"+comp_file_info['Group']+"~"+comp_file_info['Dataname']+"~"+d2_Dep_column_name_value+"~"+d2_ind_column_name_value) if diagnostic_level >= 3: print " <3> Data Set 1, Data Labels:\n", d1_scatter_data_labels print " <3> Data Set 2, Data Labels:\n", d2_scatter_data_labels combined_scatter_data_labels = [d1_scatter_data_labels,d2_scatter_data_labels] if diagnostic_level >= 3: print " <3> Combined Scatter Data:",combined_scatter_data_labels metric = comp_file_info['Metric'] #String indicating the type of metric required. group_value = int(comp_file_info['Group']) try: d1_file_object = open(data_directory+d1_data_filename, "U") except: print "!!! Data Set 1, filename "+d1_data_filename+" will not open. !!!" exit() try: d2_file_object = open(data_directory+d2_data_filename, "U") except: print "!!! Data Set 2, filename "+d2_data_filename+" will not open. !!!" exit() if diagnostic_level >= 2: print "*** Start File Processing ***" # Read in Data Set 1, data and flip lists from rows to columns. if diagnostic_level >= 2: print "Reading in:", d1_data_filename for x in range(d1_column_name_row_index): d1_file_object.next() d1_data_cols = zip(*csv.reader(d1_file_object)) if diagnostic_level >= 3: print " <3> Data Set 1, Data Columns:",d1_data_cols # Find Ind_Axis index number and confirm Col_Name based on d1_Ind_Col_Name value in config file. column_counter = 0 for column in d1_data_cols: if column[0].strip() == d1_ind_column_name_value: if diagnostic_level >= 2: print "Data Set 1, Independent Data Col name is: ",column[0].strip() if diagnostic_level >= 3: print " <3> The Index Value is:",column_counter d1_ind_axis_column_name = column[0].strip() else: column_counter = column_counter + 1 if column_counter == len(d1_data_cols): print "!!! Problem with d1_Ind_Col_Name: "+column[0].strip()+" value in Config File !!!" exit() #Convert tuples to lists. d1_data_list = [list(sublist) for sublist in d1_data_cols] if diagnostic_level >= 3: print " <3> Data Set 1, Data List:", d1_data_list if diagnostic_level >= 2: print "*** Build Data Set 1 Dictionary. ***" #Catch errors if conversion of data from string to float fails. for d1_list in d1_data_list: if diagnostic_level >= 3: print " <3> Data Set 1, List:", d1_list try: temp_list = [] for x in d1_list[(d1_data_row_index-d1_column_name_row_index):]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) if diagnostic_level >= 3: print " <3> Temp List:", temp_list d1_data_dict[d1_list[0].strip()] = temp_list except: print "!!! Data Set 1, Conversion Error in Column Name "+d1_list[0].strip()+". !!!" exit() #Read in d2 data and flip lists from rows to columns. if diagnostic_level >= 2: print "Reading in:", d2_data_filename for x in range(d2_column_name_row_index): d2_file_object.next() d2_data_cols = zip(*csv.reader(d2_file_object)) if diagnostic_level >= 3: print " <3> Data Set 2, Data Columns:", d2_data_cols #Find Ind_Axis index number and confirm Col_Name based on d2_Ind_Col_Name value in config file. column_counter = 0 for column in d2_data_cols: if column[0].strip() == d2_ind_column_name_value: if diagnostic_level >= 2: print "Data Set 2, Independent Data Col name is: ",column[0].strip() if diagnostic_level >= 3: print " <3> The Index Value is: ",column_counter d2_ind_axis_column_name = column[0].strip() else: column_counter = column_counter + 1 if column_counter == len(d2_data_cols): print "!!! Problem with d2_Ind_Col_Name value in Config File !!!" exit() #Convert tuples to lists. d2_data_list = [list(sublist) for sublist in d2_data_cols] #Build Prediction/Data Set 2, Data Dictionary #Catch errors if conversion of data from string to float fails. for d2_list in d2_data_list: try: temp_list = [] for x in d2_list[(d2_data_row_index-d2_column_name_row_index):]: if x == 'Null' or x == '' or x == 'NaN' or x == 'inf' or x == '-inf': list_value = 'Null' else: list_value = float(x) temp_list.append(list_value) d2_data_dict[d2_list[0].strip()] = temp_list except: print "!!! Data Set 2, Conversion Error in Column Name "+d2_list[0].strip()+". !!!" exit() # Passing in the Ind_Axis Column Name. d1_comp_ranges = find_start_stop_index(d1_data_dict,d1_ind_axis_column_name,d1_start_data_val,d1_stop_data_val,d1_start_comp_val,d1_stop_comp_val,ind_Scale_Factor) d2_comp_ranges = find_start_stop_index(d2_data_dict,d2_ind_axis_column_name,d2_start_data_val,d2_stop_data_val,d2_start_comp_val,d2_stop_comp_val,ind_Scale_Factor) if diagnostic_level >= 3: print " <3> D1 COMP RANGES: ",d1_comp_ranges print " <3> D2 COMP RANGES: ",d2_comp_ranges #### Begin Column specific operations. scatter_counter = 0 for scatter_label in combined_scatter_data_labels[0]: if diagnostic_level >= 3: print " <3> Scatter Counter Value:", scatter_counter d1_label_temp = [] d2_label_temp = [] d1_label_temp = split("~",combined_scatter_data_labels[0][scatter_counter]) d2_label_temp = split("~",combined_scatter_data_labels[1][scatter_counter]) if diagnostic_level >= 3: print " <3> Data Set 1, Label Split:", d1_label_temp print " <3> Data Set 2, Label Split:", d2_label_temp ##Find metric values. d1_data_values_comp = d1_data_dict[d1_label_temp[3]][d1_comp_ranges[2]:(d1_comp_ranges[3]+1)] d2_data_values_comp = d2_data_dict[d2_label_temp[3]][d2_comp_ranges[2]:(d2_comp_ranges[3]+1)] if diagnostic_level >= 3: print " <3> Data Set 1, data values:", d1_data_values_comp print " <3> Data Set 2, data values:", d2_data_values_comp # This allows the d line Quantity value to be set to 0 when either d1 or d2 data is missing. if comp_file_info['Quantity'] == str(0): print "Quantity set to 0, no comparison made." else: if metric == 'max': if diagnostic_level >= 2: print "*** Compute Rise ***" temp_d1_data_values = [x for x in d1_data_values_comp if x != 'Null'] d1_rise_value = max(temp_d1_data_values) - float(d1_initial_value) temp_d2_data_values = [x for x in d2_data_values_comp if x != 'Null'] d2_rise_value = max(temp_d2_data_values) - float(d2_initial_value) if diagnostic_level >= 2: print "Data Set 1, Initial Value is:", d1_initial_value print "Data Set 1, Rise Value is:", d1_rise_value print "Data Set 2, Initial Value is:", d2_initial_value print "Data Set 2, Rise Value is:", d2_rise_value print "\n*** Computing Rise Relative Difference ***" try: relative_difference = ((d2_rise_value-d1_rise_value)/d1_rise_value) if diagnostic_level >= 2: print "Rise Relative Difference is:", relative_difference except: print "!!! Computation of Rise relative_difference failed. !!!\nCheck source data for columns listed above." exit() #Append Rise Values to Global Scatter Data Dictionary. if diagnostic_level >= 3: print " <3> Scatter Data Labels:", combined_scatter_data_labels[0][scatter_counter] scatter_data_dict[combined_scatter_data_labels[0][scatter_counter]] = [d1_rise_value,d2_rise_value,relative_difference] elif metric == 'min': if diagnostic_level >= 2: print "*** Compute Drop ***" temp_d1_data_values = [x for x in d1_data_values_comp if x != 'Null'] d1_drop_value = float(d1_initial_value) - min(temp_d1_data_values) temp_d2_data_values = [x for x in d2_data_values_comp if x != 'Null'] d2_drop_value = float(d2_initial_value) - min(temp_d2_data_values) if diagnostic_level >= 2: print "Data Set 1, Initial Value is:", d1_initial_value print "Data Set 1, Drop Value is:", d1_drop_value print "Data Set 2, Initial Value is:", d2_initial_value print "Data Set 2, Drop Value is:", d2_drop_value print "\n*** Computing Drop Relative Difference ***" try: relative_difference = ((d2_drop_value-d1_drop_value)/d1_drop_value) if diagnostic_level >= 2: print "Min Relative Difference is:", relative_difference except: print "!!! Computation of Min relative_difference failed. !!!\nCheck source data for columns listed above." exit() #Append Drop Values to Global Scatter Data Dictionary. scatter_data_dict[combined_scatter_data_labels[0][scatter_counter]] = [d1_drop_value,d2_drop_value,relative_difference] else: print "!!! Metric is undefined in the input file. !!!" exit() #Create data lists based on specified ranges d1_data_seconds = zip(d1_data_dict[d1_ind_axis_column_name][d1_comp_ranges[0]:(d1_comp_ranges[1]+1)], d1_data_dict[d1_label_temp[3]][d1_comp_ranges[0]:(d1_comp_ranges[1]+1)]) if diagnostic_level >= 3: print " <3> Data Set 1, Data:", d1_data_seconds d2_data_seconds = zip(d2_data_dict[d2_ind_axis_column_name][d2_comp_ranges[0]:(d2_comp_ranges[1]+1)], d2_data_dict[d2_label_temp[3]][d2_comp_ranges[0]:(d2_comp_ranges[1]+1)]) if diagnostic_level >= 3: print " <3> Data Set 2, Data:", d2_data_seconds #Scale Ind_Axis Data. d1_data.append([[x[0] / ind_Scale_Factor, x[1]] for x in d1_data_seconds]) if diagnostic_level >= 3: print " <3> Scaled Data Set 1, Data:", d1_data d2_data.append([[x[0] / ind_Scale_Factor, x[1]] for x in d2_data_seconds]) if diagnostic_level >= 3: print " <3> Scaled Prediction Data:", d2_data #Need to Scale Dep_Axis Data... scatter_counter = scatter_counter + 1 if diagnostic_level >= 3: print "\n <3> Scatter Counter:", scatter_counter, "\n" # Close files d1_file_object.close() d2_file_object.close() return [d1_data,d2_data]
f66ca75013a32a9d59d8e58dec0baa78eda49b79 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12/f66ca75013a32a9d59d8e58dec0baa78eda49b79/Validation_Data_Processor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 302, 21, 67, 892, 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, 2608, 67, 2919, 67, 892, 12, 2919, 67, 768, 67, 1376, 4672, 7541, 2720, 316, 302, 980, 2065, 628, 642, 585, 471, 4389, 501, 628, 1084, 263, 6715, 1390, 18, 225, 302, 21, 67, 892, 273...
I = I.replace('\\\n','')
if self.get_cell_system(C) not in ['latex']: I = I.replace('\\\n','')
def start_next_comp(self): if len(self.__queue) == 0: return
853944dacd360c631cf42ce94b9d8413fe681716 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/853944dacd360c631cf42ce94b9d8413fe681716/worksheet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4285, 67, 2919, 12, 2890, 4672, 309, 562, 12, 2890, 16186, 4000, 13, 422, 374, 30, 327, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 4285, 67, 2919, 12, 2890, 4672, 309, 562, 12, 2890, 16186, 4000, 13, 422, 374, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
query=Query(queryDict['words'], filetype=queryDict['mime_type']),
query=_query,
def xmlrpc_distributedQuery(self, queryDict): """On node has sent a query (P2pQuerier.sendQuery) """ print "MaayRPCServer distributedQuery : %s " % queryDict query = P2pQuery(sender=queryDict['sender'], port=queryDict['port'], query=Query(queryDict['words'], filetype=queryDict['mime_type']), ttl=queryDict['ttl'], qid=queryDict['qid'], host = self._lastClient.host) querier = self._sessions[ANONYMOUS_AVATARID] querier.registerNode(query.sender, query.host, query.port) # schedule the query for later processing and return immediately # this enables the sender to query several nodes in a row reactor.callLater(.01, getP2pQuerier().receiveQuery, query) return self.nodeId
51a613ebfad59ca36ae1baea855106ced32c795d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2259/51a613ebfad59ca36ae1baea855106ced32c795d/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31811, 67, 2251, 11050, 1138, 12, 2890, 16, 843, 5014, 4672, 3536, 1398, 756, 711, 3271, 279, 843, 261, 52, 22, 84, 928, 264, 2453, 18, 4661, 1138, 13, 3536, 1172, 315, 49, 69, 528, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31811, 67, 2251, 11050, 1138, 12, 2890, 16, 843, 5014, 4672, 3536, 1398, 756, 711, 3271, 279, 843, 261, 52, 22, 84, 928, 264, 2453, 18, 4661, 1138, 13, 3536, 1172, 315, 49, 69, 528, ...
brkitr_index.write(line[line.find("/")+1:end] + empty_value)
brkitrs.add(line[line.find("/")+1:end])
def GenResIndex(dat_list_file_path): res_index = "res_index.txt" header_locale = "res_index:table(nofallback) {\n CLDRVersion { " header_locale += CLDR_VERSION + " }\n InstalledLocales {\n" header = "res_index:table(nofallback) {\nInstalledLocales {\n" footer = " }\n}" empty_value = " {\"\"}\n" # key-value pair for all locale entries locale_index = open(os.path.join(TMP_DAT_PATH, res_index), "w") locale_index.write(header_locale) brkitr_index = open(os.path.join(TMP_DAT_PATH, "brkitr", res_index), "w") brkitr_index.write(header) coll_index = open(os.path.join(TMP_DAT_PATH, "coll", res_index), "w") coll_index.write(header) rbnf_index = open(os.path.join(TMP_DAT_PATH, "rbnf", res_index), "w") rbnf_index.write(header) for line in open(dat_list_file_path, "r"): if line.find("root.") >= 0: continue if line.find("res_index") >= 0: continue if line.find("_.res") >= 0: continue; start = line.find("brkitr/") if start >= 0: end = line.find(".res") if end > 0: brkitr_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("coll/") >= 0: start = line.find("coll/") end = line.find(".res") if end > 0: coll_index.write(line[line.find("/")+1:end] + empty_value) elif line.find("rbnf/") >= 0: start = line.find("rbnf/") end = line.find(".res") if end > 0: rbnf_index.write(line[line.find("/")+1:end] + empty_value) elif line.find(".res") >= 0: # We need to determine the resource is locale resource or misc resource. # To determine the locale resource, we assume max script length is 3. end = line.find(".res") if end <= 3: locale_index.write(line[:end] + empty_value) elif line.find("_") <= 3: if line.find("_") > 0: locale_index.write(line[:end] + empty_value) locale_index.write(footer) brkitr_index.write(footer) coll_index.write(footer) rbnf_index.write(footer) locale_index.close() brkitr_index.close() coll_index.close() rbnf_index.close() # Call genrb to generate new res_index.res. InvokeIcuTool("genrb", TMP_DAT_PATH, [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "brkitr"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "coll"), [res_index]) InvokeIcuTool("genrb", os.path.join(TMP_DAT_PATH, "rbnf"), [res_index])
e8aab5e9f14e1c3a670fbea64057a2a5f5c35245 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10672/e8aab5e9f14e1c3a670fbea64057a2a5f5c35245/icu_dat_generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 1446, 67, 6339, 273, 315, 455, 67, 1615, 30, 2121, 12, 82, 792, 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, 10938, 607, 1016, 12, 3404, 67, 1098, 67, 768, 67, 803, 4672, 400, 67, 1615, 273, 315, 455, 67, 1615, 18, 5830, 6, 1446, 67, 6339, 273, 315, 455, 67, 1615, 30, 2121, 12, 82, 792, 7...
include_path = prefix + '/include' environ['CPATH'] = merge_strings(include_path, environ.get('CPATH', ''),
include_wp = prefix_wp + '/include' environ['CPATH'] = merge_strings(include_wp, environ.get('CPATH', ''),
def set_environment_variables(msys, options): """Set the environment variables used by the scripts""" environ = msys.environ msys_root = msys.msys_root prefix = options.prefix if not prefix: prefix = environ.get('PREFIX', '') if prefix: prefix = msys.windows_to_msys(prefix) else: prefix = default_msys_prefix environ['PREFIX'] = prefix path = environ['PATH'] environ['PATH'] = "%s:%s/bin" % (path, prefix) environ['BDCONF'] = as_flag(options.configure and not options.clean_only) environ['BDCOMP'] = as_flag(options.compile and not options.clean_only) environ['BDINST'] = as_flag(options.install and options.compile and not options.clean_only) environ['BDSTRIP'] = as_flag(options.compile and options.install and options.strip and not options.clean_only) environ['BDCLEAN'] = as_flag(options.clean or options.clean_only) environ.pop('INCLUDE', None) # INCLUDE causes problems with MIXER. lib_path = prefix + '/lib' msvcr71_path = '' if options.msvcr71: # Hide the msvcrt.dll import libraries with those for msvcr71.dll. # Their subdirectory is in the same directory as the SDL library. msvcr71_path = lib_path + '/msvcr71' environ['DBMSVCR71'] = msvcr71_path environ['LDFLAGS'] = merge_strings(environ.get('LDFLAGS', ''), as_linker_lib_path(lib_path), as_linker_lib_path(msvcr71_path), sep=' ') # For dependency headers. include_path = prefix + '/include' environ['CPATH'] = merge_strings(include_path, environ.get('CPATH', ''), sep=';')
6cc175b4d62b091cb925208acc4e34512909ee4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1298/6cc175b4d62b091cb925208acc4e34512909ee4f/msys_build_deps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 10274, 67, 7528, 12, 959, 1900, 16, 702, 4672, 3536, 694, 326, 3330, 3152, 1399, 635, 326, 8873, 8395, 225, 5473, 273, 4086, 1900, 18, 28684, 4086, 1900, 67, 3085, 273, 4086, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 10274, 67, 7528, 12, 959, 1900, 16, 702, 4672, 3536, 694, 326, 3330, 3152, 1399, 635, 326, 8873, 8395, 225, 5473, 273, 4086, 1900, 18, 28684, 4086, 1900, 67, 3085, 273, 4086, ...
def cmpfiles(a, b, common, shallow=1, use_statcache=0):
def cmpfiles(a, b, common, shallow=1, use_statcache=None):
def cmpfiles(a, b, common, shallow=1, use_statcache=0): """Compare common files in two directories. a, b -- directory names common -- list of file names found in both directories shallow -- if true, do comparison based solely on stat() information use_statcache -- obsolete argument Returns a tuple of three lists: files that compare equal files that are different filenames that aren't regular files. """ res = ([], [], []) for x in common: ax = os.path.join(a, x) bx = os.path.join(b, x) res[_cmp(ax, bx, shallow)].append(x) return res
c3a56c3f904f4e8e334426abe8f0e9de1635b125 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c3a56c3f904f4e8e334426abe8f0e9de1635b125/filecmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9411, 2354, 12, 69, 16, 324, 16, 2975, 16, 18501, 33, 21, 16, 999, 67, 5642, 2493, 33, 7036, 4672, 3536, 8583, 2975, 1390, 316, 2795, 6402, 18, 225, 279, 16, 324, 1493, 1867, 1257, 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, 9411, 2354, 12, 69, 16, 324, 16, 2975, 16, 18501, 33, 21, 16, 999, 67, 5642, 2493, 33, 7036, 4672, 3536, 8583, 2975, 1390, 316, 2795, 6402, 18, 225, 279, 16, 324, 1493, 1867, 1257, 2...
def sum_credit_seller(self, object): auct_id=object.auction_id.id self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%d and (paid_vnd='1' or paid_vnd is null)"%(auct_id))
def sum_credit_seller(self, object_id): self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%d and (paid_vnd='1' or paid_vnd is null)"%(object_id))
def sum_credit_seller(self, object): auct_id=object.auction_id.id self.cr.execute("select sum(seller_price) from auction_lots where auction_id=%d and (paid_vnd='1' or paid_vnd is null)"%(auct_id)) res = self.cr.fetchone() return str(res[0] or 0)
616eeef3981b06ec896b775d6aa5d4bbfe2b6125 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/616eeef3981b06ec896b775d6aa5d4bbfe2b6125/auction_total_rml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2142, 67, 20688, 67, 1786, 749, 12, 2890, 16, 733, 67, 350, 4672, 225, 365, 18, 3353, 18, 8837, 2932, 4025, 2142, 12, 1786, 749, 67, 8694, 13, 628, 279, 4062, 67, 80, 6968, 1625, 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, 2142, 67, 20688, 67, 1786, 749, 12, 2890, 16, 733, 67, 350, 4672, 225, 365, 18, 3353, 18, 8837, 2932, 4025, 2142, 12, 1786, 749, 67, 8694, 13, 628, 279, 4062, 67, 80, 6968, 1625, 279...
if self.db and self.db.transactions:
if self.db and self.db_uncommitted:
def interactive(self): '''Run in an interactive mode ''' print _('Roundup %s ready for input.\nType "help" for help.' % roundup_version) try: import readline except ImportError: print _('Note: command history and editing not available')
b4bc53b620c479e80aca68e0d219a5bde84e7750 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1906/b4bc53b620c479e80aca68e0d219a5bde84e7750/admin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12625, 12, 2890, 4672, 9163, 1997, 316, 392, 12625, 1965, 9163, 1172, 389, 2668, 11066, 416, 738, 87, 5695, 364, 810, 8403, 82, 559, 315, 5201, 6, 364, 2809, 1093, 738, 3643, 416, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12625, 12, 2890, 4672, 9163, 1997, 316, 392, 12625, 1965, 9163, 1172, 389, 2668, 11066, 416, 738, 87, 5695, 364, 810, 8403, 82, 559, 315, 5201, 6, 364, 2809, 1093, 738, 3643, 416, 67, ...
self._setup()
self._sharing_setup()
def _joined_cb(self, activity): if not self._shared_activity: return
a94fe2c9f710927505538e633b6fe55af383ea5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/121/a94fe2c9f710927505538e633b6fe55af383ea5d/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5701, 329, 67, 7358, 12, 2890, 16, 5728, 4672, 309, 486, 365, 6315, 11574, 67, 9653, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5701, 329, 67, 7358, 12, 2890, 16, 5728, 4672, 309, 486, 365, 6315, 11574, 67, 9653, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def getFile(self,lfn,destinationDir='',printOutput=False):
def getFile(self,lfn,destDir='',printOutput=False):
def getFile(self,lfn,destinationDir='',printOutput=False): """Retrieve a single file or list of files from Grid storage to the current directory. lfn is the desired logical file name for the file, fullPath is the local path to the file and diracSE is the Storage Element name for the upload. The fileGuid is optional, if not specified a GUID will be generated on the fly.
6bd189c3c9f0249f69cb844be1879a506f5cbe6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/6bd189c3c9f0249f69cb844be1879a506f5cbe6d/Dirac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 80, 4293, 16, 10488, 1621, 2218, 2187, 1188, 1447, 33, 8381, 4672, 3536, 5767, 279, 2202, 585, 578, 666, 434, 1390, 628, 7145, 2502, 358, 326, 783, 1867, 18, 328, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 12, 2890, 16, 80, 4293, 16, 10488, 1621, 2218, 2187, 1188, 1447, 33, 8381, 4672, 3536, 5767, 279, 2202, 585, 578, 666, 434, 1390, 628, 7145, 2502, 358, 326, 783, 1867, 18, 328, 4...
lab2=Label(iframe2, text='Freq DF Pol UTC dB DT W')
lab2=Label(iframe2, text='Freq DF Pol UTC DT dB')
def update(): global root_geom,isec0,naz,nel,ndmiles,ndkm,nopen, \ im,pim,cmap0,isync,isync_save,idsec,first,itol,txsnrdb,tx6alt,\ bm_geom,bm2_geom utc=time.gmtime(time.time()+0.1*idsec) isec=utc[5] if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) Audio.gcom2.utcdate=t[:12] ldate.configure(text=t) t="Rx noise: %.1f dB" % Audio.gcom2.rxnoise msg4.configure(text=t) t="Drop: %.1f %%" % Audio.gcom2.pctlost msg5.configure(text=t) root_geom=root.geometry() try: bm_geom=bm.geometry() bm2_geom=bm2.geometry() except: pass utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 naz,nel,ndmiles,ndkm,nhotaz,nhotabetter=Audio.azdist0( \ options.MyGrid.get().upper(),HisGrid.get().upper(),utchours) azdist() g.nfreq=nfreq.get() if Audio.gcom2.ndecoding==0: g.AzSun,g.ElSun,g.AzMoon,g.ElMoon,g.AzMoonB,g.ElMoonB,g.ntsky, \ g.ndop,g.ndop00,g.dbMoon,g.RAMoon,g.DecMoon,g.HA8,g.Dgrd, \ g.sd,g.poloffset,g.MaxNR,g.dfdt,g.dfdt0,g.RaAux,g.DecAux, \ g.AzAux,g.ElAux = Audio.astro0(utc[0],utc[1],utc[2], \ utchours,nfreq.get(),options.MyGrid.get().upper(), \ options.auxra.get()+' '[:9], \ options.auxdec.get()+' '[:9]) if len(HisGrid.get().strip())<4: g.ndop=g.ndop00 g.dfdt=g.dfdt0 astrotext.delete(1.0,END) astrotext.insert(END,' Moon\n') astrotext.insert(END,"Az: %7.1f\n" % g.AzMoon) astrotext.insert(END,"El: %7.1f\n" % g.ElMoon) astrotext.insert(END,"DxAz: %5.1f\n" % g.AzMoonB) astrotext.insert(END,"DxEl: %5.1f\n" % g.ElMoonB) astrotext.insert(END,' Sun\n') astrotext.insert(END,"Az: %7.1f\n" % g.AzSun) astrotext.insert(END,"El: %7.1f\n\n" % g.ElSun) astrotext.insert(END,"Dop:%7d\n" % g.ndop) astrotext.insert(END,"Dgrd:%6.1f\n" % g.Dgrd) if g.freeze_decode and mode.get()[:4]=='JT65': itol=5 ltol.configure(text='Tol '+str(500)) Audio.gcom2.dftolerance=500 nfreeze.set(1) Audio.gcom2.nfreeze=1 if Audio.gcom2.monitoring: Audio.gcom2.ndecoding=1 # Audio.gcom2.nagain=0 Audio.gcom2.nagain=1 else: Audio.gcom2.ndecoding=4 Audio.gcom2.nagain=1 g.freeze_decode=0 t=g.ftnstr(Audio.gcom2.decodedfile) i=g.rfnd(t,".") t=t[:i] if mode.get() != g.mode or first: msg1.configure(bg='#00FFFF') g.mode=mode.get() first=0 samfac_out=Audio.gcom1.mfsample2/110250.0 t="%6.4f" % (samfac_out) options.meas_rateout.setvalue(t) msg1.configure(text=mode.get()) t="QSO Freq:%4d" % (int(Audio.gcom2.mousefqso),) msg2.configure(text=t) t="QSO DF:%4d" % (int(Audio.gcom2.mousedf),) msg3.configure(text=t) if mode.get()[:4]=='JT65' and (Audio.gcom2.ndecoding>0 or \ (isec>45 and Audio.gcom2.monitoring==1 and \ Audio.datcom.kkdone!=-99 and Audio.gcom2.ndiskdat!=1)):
6917102e9a7d0cb10bb91f5f71d7fdeac86204d5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2394/6917102e9a7d0cb10bb91f5f71d7fdeac86204d5/map65.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 3190, 16, 521, 709, 16, 84, 381, 16, 22738, 20, 16, 291,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 82, 1561, 16, 3084, 16, 4880, 81, 1449, 16, 82, 2883, 81, 16, 82, 3190, 16, 521, 709, 16, 84, 381, 16, 22738, 20, 16, 291,...
if '_enabled' in params and not params['_enabled'] or \
if '_enabled' in params and not params['_enabled'].lower() in ('1', 'y', 'true', 'on', 'yes') or \
def load_backends(self, caps=None, names=None, modules=None, storage=None): loaded = {} if storage is None: storage = self.storage
d632fb6164862994280324f20ed92aa78e0acc60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7471/d632fb6164862994280324f20ed92aa78e0acc60/ouiboube.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 823, 5839, 12, 2890, 16, 15788, 33, 7036, 16, 1257, 33, 7036, 16, 4381, 33, 7036, 16, 2502, 33, 7036, 4672, 4203, 273, 2618, 309, 2502, 353, 599, 30, 2502, 273, 365, 18, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 823, 5839, 12, 2890, 16, 15788, 33, 7036, 16, 1257, 33, 7036, 16, 4381, 33, 7036, 16, 2502, 33, 7036, 4672, 4203, 273, 2618, 309, 2502, 353, 599, 30, 2502, 273, 365, 18, 56...
self.__translated += 1
self._translated += 1
def __init__(self, filepath, template): self.__filepath = filepath self.__template = template self.__count = 0 self.__translated = 0 self.__untranslated = 0 self.__fuzzy = 0 self.__porevisiondate = '' self.__potcreationdate = '' self.__translators = [] if os.access(filepath, os.R_OK): #If PO(T) file can read... reMsgId = re.compile('^msgid "(.*)"$', re.IGNORECASE) reMsgStr = re.compile('^msgstr "(.*)"$', re.IGNORECASE) reMsgContinued = re.compile('^"(.*)"$', re.IGNORECASE) reTranslator = re.compile('^# \* (.*)$', re.IGNORECASE) rePoRevisionDate = re.compile('PO-Revision-Date: ([0-9 :\+\-]+)', re.IGNORECASE) rePotCreationDate = re.compile('POT-Creation-Date: ([0-9 :\+\-]+)', re.IGNORECASE) iMsgStarted = 0 sMsgId = '' sMsgStr = '' bIsFuzzy = False bIsMaintainer = False pofile = open(filepath, 'r') for line in pofile: #For all lines... line = line.strip() if line: #If NOT empty line... if line[0] != '#': #If NOT comment line... if reMsgId.findall(line): #If "msgid"... iMsgStarted = 1 tmp = reMsgId.findall(line) sMsgId = tmp[0] elif reMsgStr.findall(line): #If "msgstr"... iMsgStarted = 2 tmp = reMsgStr.findall(line) sMsgStr = tmp[0] elif reMsgContinued.findall(line): #If "msgid" or "msgstr" continued... tmp = reMsgContinued.findall(line) if iMsgStarted == 1: sMsgId = sMsgId + tmp[0] elif iMsgStarted == 2: sMsgStr = sMsgStr + tmp[0] else: #If comment line... iMsgStarted = -1 if line.startswith('#,'): #If "Reference" line... if line.find('fuzzy') > -1: #If "fuzzy"... bIsFuzzy = True elif line.startswith('# Maintainer:'): #If maintainer list starts... bIsMaintainer = True elif line.startswith('# Translators:'): #If translators list starts... bIsMaintainer = False elif reTranslator.findall(line): #If translator/maintainer... translator = reTranslator.findall(line) if re.findall('\<(.*)\>', translator[0]): #If mail address exists... tmp = re.findall('(.*) \<(.*)\>', translator[0]) sName = tmp[0][0] sMail = tmp[0][1] else: #If mail address NOT exists... sName = translator[0] sMail = '' self.__translators.append(Translator(sName, sMail, bIsMaintainer)) else: #If empty line... iMsgStarted = 0 if iMsgStarted == 0: #If NOT inside a translation... if sMsgId != '': self.__count += 1 if bIsFuzzy == False: #If NOT a fuzzy translation... if sMsgStr != '': self.__translated += 1 else: self.__untranslated += 1 else: #If a fuzzy translation... self.__fuzzy += 1 elif sMsgStr != '': tmp = rePoRevisionDate.findall(sMsgStr) if tmp: #If "PO-Revision-Date"... #TODO: Convert to date! self.__porevisiondate = tmp[0] tmp = rePotCreationDate.findall(sMsgStr) if tmp: #If "POT-Creation-Date"... #TODO: Convert to date! self.__potcreationdate = tmp[0] sMsgId = '' sMsgStr = '' bIsFuzzy = False pofile.close()
e85ef62312df51ac83b838d96a1b779626f60785 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5344/e85ef62312df51ac83b838d96a1b779626f60785/GetTranslationsStatus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3608, 16, 1542, 4672, 365, 16186, 10561, 273, 3608, 365, 16186, 3202, 273, 1542, 365, 16186, 1883, 273, 374, 365, 16186, 22899, 273, 374, 365, 16186, 318, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3608, 16, 1542, 4672, 365, 16186, 10561, 273, 3608, 365, 16186, 3202, 273, 1542, 365, 16186, 1883, 273, 374, 365, 16186, 22899, 273, 374, 365, 16186, 318, ...
return
return 0
def handle(self): """Handle a single HTTP request.
d13ed6d099f3dfa102d9ef830bb1cb77337decd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d13ed6d099f3dfa102d9ef830bb1cb77337decd7/BaseHTTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 3259, 279, 2202, 2239, 590, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 12, 2890, 4672, 3536, 3259, 279, 2202, 2239, 590, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'ru': u'?????'
'ru': u'Видео'
def __init__(self): family.Family.__init__(self) self.name = 'wowwiki'
ac57dcc1d290fc37f75e701afd6115fa317bbd91 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/ac57dcc1d290fc37f75e701afd6115fa317bbd91/wowwiki_family.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 91, 543, 13044, 11, 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, 1001, 2738, 972, 12, 2890, 4672, 6755, 18, 9203, 16186, 2738, 972, 12, 2890, 13, 365, 18, 529, 273, 296, 91, 543, 13044, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
while i < len(endoids):
while i < len(endoids):
def get_snmp_table(hostname, ip, oid_info): # oid_info is either ( oid, columns ) or # ( oid, suboids, columns ) # suboids is a list if OID-infixes that are put between baseoid # and the columns and also prefixed to the index column. This # allows to merge distinct SNMP subtrees with a similar structure # to one virtual new tree (look into cmctc_temp for an example) if len(oid_info) == 2: oid, targetcolumns = oid_info suboids = [None] else: oid, suboids, targetcolumns = oid_info all_values = [] index_column = -1 index_format = None number_rows = -1 info = [] for suboid in suboids: colno = -1 columns = [] # Detect missing (empty columns) max_len = 0 max_len_col = -1 for column in targetcolumns: # column may be integer or string like "1.5.4.2.3" colno += 1 # if column is 0, we do not fetch any data from snmp, but use # a running counter as index. If the index column is the first one, # we do not know the number of entries right now. We need to fill # in later. If the column in OID_STRING or OID_BIN we do something # similar: we fill in the complete OID of the entry, either as # string or as binary UTF-8 encoded number string if column in [ OID_END, OID_STRING, OID_BIN ]: index_column = colno columns.append([]) index_format = column continue fetchoid = oid if suboid: fetchoid += "." + str(suboid) fetchoid += "." + str(column) if opt_use_snmp_walk or is_usewalk_host(hostname): rowinfo = get_stored_snmpwalk(hostname, fetchoid) else: rowinfo = snmpwalk_on_suboid(hostname, ip, fetchoid) if len(rowinfo) > 0 or True: columns.append(rowinfo) number_rows = len(rowinfo) if len(rowinfo) > max_len: max_len = len(rowinfo) max_len_col = colno if index_column != -1: index_rows = [] # Take end-oids of non-index columns as indices for o, value in columns[max_len_col]: if index_format == OID_END: index_rows.append((o, o.split('.')[-1])) elif index_format == OID_STRING: index_rows.append((o, o)) else: index_rows.append((o, oid_to_bin(o))) columns[index_column] = index_rows # prepend suboid to first column if suboid and len(columns) > 0: first_column = columns[0] new_first_column = [] for o, val in first_column: new_first_column.append((o, str(suboid) + "." + str(val))) columns[0] = new_first_column # Swap X and Y axis of table (we want one list of columns per item) # Here we have to deal with a nasty problem: Some brain-dead devices # omit entries in some sub OIDs. This happens e.g. for CISCO 3650 # in the interfaces MIB with 64 bit counters. So we need to look at # the OIDs and watch out for gaps we need to fill with dummy values. # First compute the complete list of end-oids appearing in the output endoids = [] for column in columns: for o, value in column: endoid = o.rsplit('.', 1)[-1] if endoid not in endoids: endoids.append(endoid) # Now fill gaps in columns where some endois are missing. Remove OIDs new_columns = [] for column in columns: i = 0 new_column = [] for o, value in column: beginoid, endoid = o.rsplit('.', 1) while i < len(endoids) and endoids[i] != endoid: new_column.append("") # (beginoid + '.' +endoids[i], "" ) ) i += 1 new_column.append(value) i += 1 while i < len(endoids): # trailing OIDs missing new_column.append("") # (beginoid + '.' +endoids[i], "") ) i += 1 new_columns.append(new_column) columns = new_columns # Now construct table by swapping X and Y new_info = [] index = 0 if len(columns) > 0: for item in columns[0]: new_info.append([ c[index] for c in columns ]) index += 1 info += new_info return info
af9e5d71b7a6d5f797d58bf7199ee859481cb21e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/af9e5d71b7a6d5f797d58bf7199ee859481cb21e/snmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26527, 67, 2121, 12, 10358, 16, 2359, 16, 7764, 67, 1376, 4672, 468, 7764, 67, 1376, 353, 3344, 261, 7764, 16, 2168, 262, 578, 468, 261, 7764, 16, 720, 21061, 16, 2168, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 26527, 67, 2121, 12, 10358, 16, 2359, 16, 7764, 67, 1376, 4672, 468, 7764, 67, 1376, 353, 3344, 261, 7764, 16, 2168, 262, 578, 468, 261, 7764, 16, 720, 21061, 16, 2168, 262, ...
return 'sphboard_rendered_body_%s' % str(self.id)
return '%s-sphboard_rendered_body_%s' % (settings.CACHE_MIDDLEWARE_KEY_PREFIX, str(self.id))
def __get_render_cachekey(self): return 'sphboard_rendered_body_%s' % str(self.id)
e03478b96517d6e9a5c86698cbd9e47613523b4d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11563/e03478b96517d6e9a5c86698cbd9e47613523b4d/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 5902, 67, 2493, 856, 12, 2890, 4672, 327, 296, 87, 844, 3752, 67, 26332, 67, 3432, 10185, 87, 11, 738, 609, 12, 2890, 18, 350, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 588, 67, 5902, 67, 2493, 856, 12, 2890, 4672, 327, 296, 87, 844, 3752, 67, 26332, 67, 3432, 10185, 87, 11, 738, 609, 12, 2890, 18, 350, 13, 2, -100, -100, -100, -100, -100, -10...
sage: S == loads(dumps(S)) True
sage: TestSuite(S).run()
def unrank(self, r): """ Returns the subset of s that has rank k. EXAMPLES:: sage: Subsets(3,2).unrank(0) {1, 2} sage: Subsets([2,4,5],2).unrank(0) {2, 4} """
6dd43e2ae3a87c0f3bc63b742b30474be0cdba0f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6dd43e2ae3a87c0f3bc63b742b30474be0cdba0f/subset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 11500, 12, 2890, 16, 436, 4672, 3536, 2860, 326, 7931, 434, 272, 716, 711, 6171, 417, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 2592, 4424, 12, 23, 16, 22, 2934, 318, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 11500, 12, 2890, 16, 436, 4672, 3536, 2860, 326, 7931, 434, 272, 716, 711, 6171, 417, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 2592, 4424, 12, 23, 16, 22, 2934, 318, ...
if lestart is not None: params['lestart'] = lestart if leend is not None: params['leend'] = leend if leend is not None: params['leuser'] = leuser if leend is not None: params['letitle'] = letitle data = query.GetData(params, useAPI = True, encodeTitle = False) try: imagesData = data['query']['logevents'] except KeyError: raise ServerError("The APIs don't return the data, the site may be down")
if lestart != None: params['lestart'] = lestart if leend != None: params['leend'] = leend if leend != None: params['leuser'] = leuser if leend != None: params['letitle'] = letitle
def newimages(self, number = 100, lestart = None, leend = None, leuser = None, letitle = None, repeat = False): """ Yield ImagePages from APIs, call: action=query&list=logevents&letype=upload&lelimit=500
1c25f9d598893de162ba3e02fbcb2d236f9e1fe0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/1c25f9d598893de162ba3e02fbcb2d236f9e1fe0/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 7369, 12, 2890, 16, 1300, 273, 2130, 16, 328, 27893, 273, 599, 16, 884, 409, 273, 599, 16, 884, 1355, 273, 599, 16, 2231, 1280, 273, 599, 16, 7666, 273, 1083, 4672, 3536, 31666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 7369, 12, 2890, 16, 1300, 273, 2130, 16, 328, 27893, 273, 599, 16, 884, 409, 273, 599, 16, 884, 1355, 273, 599, 16, 2231, 1280, 273, 599, 16, 7666, 273, 1083, 4672, 3536, 31666, ...
self.logger.warn('Could not follow link to '+tag['href']) self.process_children(tag, tag_css, tag_pseudo_css) elif tag.has_key('name') or tag.has_key('id'): self.process_anchor(tag, tag_css, tag_pseudo_css) elif tagname == 'img': if tag.has_key('src'): path = munge_paths(self.target_prefix, tag['src'])[0] if not os.path.exists(path): path = path.replace('&', '%26') if os.access(path, os.R_OK) and os.path.isfile(path): width, height = None, None
self.logger.debug("Failed to process: %s", str(tag)) elif tagname in ['style', 'link']: ncss, npcss = {}, {} if tagname == 'style': for c in tag.contents: if isinstance(c, NavigableString): css, pcss = self.parse_css(str(c)) ncss.update(css) npcss.update(pcss) elif tag.has_key('type') and tag['type'] == "text/css" \ and tag.has_key('href'): path = munge_paths(self.target_prefix, tag['href'])[0]
def parse_tag(self, tag, parent_css): try: tagname = tag.name.lower() except AttributeError: if not isinstance(tag, HTMLConverter.IGNORED_TAGS): self.add_text(tag, parent_css, {}) return tag_css, tag_pseudo_css = self.tag_css(tag, parent_css=parent_css) try: # Skip element if its display attribute is set to none if tag_css['display'].lower() == 'none' or \ tag_css['visibility'].lower() == 'hidden': return except KeyError: pass end_page = self.process_page_breaks(tag, tagname, tag_css) if tagname in ["title", "script", "meta", 'del', 'frameset']: pass elif tagname == 'a' and self.link_levels >= 0: if tag.has_key('href') and not self.link_exclude.match(tag['href']): path = munge_paths(self.target_prefix, tag['href'])[0] ext = os.path.splitext(path)[1] if ext: ext = ext[1:].lower() if os.access(path, os.R_OK) and os.path.isfile(path): if ext in ['png', 'jpg', 'bmp', 'jpeg']: self.process_image(path, tag_css) else: text = self.get_text(tag, limit=1000) if not text.strip(): text = "Link" self.add_text(text, tag_css, {}, force_span_use=True) self.links.append(self.create_link(self.current_para.contents, tag)) if tag.has_key('id') or tag.has_key('name'): key = 'name' if tag.has_key('name') else 'id' self.targets[self.target_prefix+tag[key]] = self.current_block self.current_block.must_append = True else: self.logger.warn('Could not follow link to '+tag['href']) self.process_children(tag, tag_css, tag_pseudo_css) elif tag.has_key('name') or tag.has_key('id'): self.process_anchor(tag, tag_css, tag_pseudo_css) elif tagname == 'img': if tag.has_key('src'): path = munge_paths(self.target_prefix, tag['src'])[0] if not os.path.exists(path): path = path.replace('&', '%26') # convertlit replaces & with %26 if os.access(path, os.R_OK) and os.path.isfile(path): width, height = None, None try: width = int(tag['width']) height = int(tag['height']) except: pass dropcaps = tag.has_key('class') and tag['class'] == 'libprs500_dropcaps' self.process_image(path, tag_css, width, height, dropcaps=dropcaps) elif not urlparse(tag['src'])[0]: self.logger.warn('Could not find image: '+tag['src']) else: self.logger.debug("Failed to process: %s", str(tag)) elif tagname in ['style', 'link']: ncss, npcss = {}, {} if tagname == 'style': for c in tag.contents: if isinstance(c, NavigableString): css, pcss = self.parse_css(str(c)) ncss.update(css) npcss.update(pcss) elif tag.has_key('type') and tag['type'] == "text/css" \ and tag.has_key('href'): path = munge_paths(self.target_prefix, tag['href'])[0] try: f = open(path, 'rb') src = f.read() f.close() match = self.PAGE_BREAK_PAT.search(src) if match and not re.match('avoid', match.group(1), re.IGNORECASE): self.page_break_found = True ncss, npcss = self.parse_css(src) except IOError: self.logger.warn('Could not read stylesheet: '+tag['href']) if ncss: update_css(ncss, self.css) self.css.update(self.override_css) if npcss: update_css(npcss, self.pseudo_css) self.pseudo_css.update(self.override_pcss) elif tagname == 'pre': self.end_current_para() self.end_current_block() self.current_block = self.book.create_text_block() ts = self.current_block.textStyle.copy() self.current_block.textStyle = ts self.current_block.textStyle.attrs['parindent'] = '0' if tag.contents: c = tag.contents[0] if isinstance(c, NavigableString): c = unicode(c).replace('\r\n', '\n').replace('\r', '\n') if c.startswith('\n'): c = c[1:] tag.contents[0] = NavigableString(c) tag.contents[0].setup(tag) self.process_children(tag, tag_css, tag_pseudo_css) self.end_current_block() elif tagname in ['ul', 'ol', 'dl']: self.list_level += 1 if tagname == 'ol': old_counter = self.list_counter self.list_counter = 1 prev_bs = self.current_block.blockStyle self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = self.list_indent*self.list_level bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style) self.process_children(tag, tag_css, tag_pseudo_css) self.end_current_block() self.current_block.blockStyle = prev_bs self.list_level -= 1 if tagname == 'ol': self.list_counter = old_counter elif tagname in ['li', 'dt', 'dd']: margin = self.list_indent*self.list_level if tagname == 'dd': margin += 80 if int(self.current_block.blockStyle.attrs['sidemargin']) != margin: self.end_current_block() attrs = self.current_block.blockStyle.attrs attrs = attrs.copy() attrs['sidemargin'] = margin attrs['blockwidth'] = int(attrs['blockwidth']) + margin bs = self.book.create_block_style(**attrs) self.current_block = self.book.create_text_block( blockStyle=bs, textStyle=self.unindented_style)
602c205bbef2424f5a17390dd5fdd65608cc3d47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9125/602c205bbef2424f5a17390dd5fdd65608cc3d47/convert_from.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2692, 12, 2890, 16, 1047, 16, 982, 67, 5212, 4672, 775, 30, 25586, 273, 1047, 18, 529, 18, 8167, 1435, 1335, 6394, 30, 309, 486, 1549, 12, 2692, 16, 3982, 5072, 18, 3047, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2692, 12, 2890, 16, 1047, 16, 982, 67, 5212, 4672, 775, 30, 25586, 273, 1047, 18, 529, 18, 8167, 1435, 1335, 6394, 30, 309, 486, 1549, 12, 2692, 16, 3982, 5072, 18, 3047, 3...
if not list: sys.stderr.write("no division warnings for %s\n" % file) return
assert list
def process(file, list): print "-"*70 if not list: sys.stderr.write("no division warnings for %s\n" % file) return try: fp = open(file) except IOError, msg: sys.stderr.write("can't open: %s\n" % msg) return print "Processing:", file f = FileContext(fp) list.sort() index = 0 # list[:index] has been processed, list[index:] is still to do orphans = [] # subset of list for which no / operator was found unknown = [] # lines with / operators for which no warnings were seen g = tokenize.generate_tokens(f.readline) while 1: startlineno, endlineno, slashes = lineinfo = scanline(g) if startlineno is None: break assert startlineno <= endlineno is not None while index < len(list) and list[index][0] < startlineno: orphans.append(list[index]) index += 1 warnings = [] while index < len(list) and list[index][0] <= endlineno: warnings.append(list[index]) index += 1 if not slashes and not warnings: pass elif slashes and not warnings: report(slashes, "Unexecuted code") elif warnings and not slashes: reportphantomwarnings(warnings, f) else: if len(slashes) > 1: report(slashes, "More than one / operator") else: (row, col), line = slashes[0] line = chop(line) if line[col:col+1] != "/": print "*** Can't find the / operator in line %d:" % row print "*", line continue intlong = [] floatcomplex = [] bad = [] for lineno, what in warnings: if what in ("int", "long"): intlong.append(what) elif what in ("float", "complex"): floatcomplex.append(what) else: bad.append(what) if bad: print "*** Bad warning for line %d:" % row, bad print "*", line elif intlong and not floatcomplex: print "%dc%d" % (row, row) print "<", line print "---" print ">", line[:col] + "/" + line[col:] elif floatcomplex and not intlong: print "True division / operator at line %d:" % row print "=", line fp.close()
1411e89cd48fda4dab58a672e67677772c9670ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1411e89cd48fda4dab58a672e67677772c9670ec/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 768, 16, 666, 4672, 1172, 7514, 14, 7301, 1815, 666, 775, 30, 4253, 273, 1696, 12, 768, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 2932, 4169, 1404, 1696, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 768, 16, 666, 4672, 1172, 7514, 14, 7301, 1815, 666, 775, 30, 4253, 273, 1696, 12, 768, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 2932, 4169, 1404, 1696, 30, ...
def getFilesFromDirectory( self, directory, days=0, wildcard='*' ):
def getFilesFromDirectory( self, directory, days = 0, wildcard = '*' ):
def getFilesFromDirectory( self, directory, days=0, wildcard='*' ): if type( directory ) in types.StringTypes: directories = [directory] else: directories = directory gLogger.info( "Obtaining the files older than %d days in %d directories:" % ( days, len( directories ) ) ) for directory in directories: gLogger.info( directory ) activeDirs = directories allFiles = [] while len( activeDirs ) > 0: currentDir = activeDirs[0] res = self.getCatalogListDirectory( currentDir, True, singleFile=True ) activeDirs.remove( currentDir ) if not res['OK']: gLogger.error( "Error retrieving directory contents", "%s %s" % ( currentDir, res['Message'] ) ) else: dirContents = res['Value'] subdirs = dirContents['SubDirs'] for subdir, metadata in subdirs.items(): if ( not days ) or self.__isOlderThan(metadata['CreationDate'], days ): if subdir[0] <> '/': subdir = currentDir + '/' + subdir activeDirs.append( subdir ) for filename, fileInfo in dirContents['Files'].items(): if fileInfo.has_key( 'MetaData' ): fileInfo = fileInfo['MetaData'] if ( not days ) or self.__isOlderThan( fileInfo['CreationDate'], days ): if fnmatch.fnmatch( filename, wildcard ): if fileInfo.has_key( 'LFN' ): filename = fileInfo['LFN'] allFiles.append( filename ) files = dirContents['Files'].keys() gLogger.info( "%s: %d files, %d sub-directories" % ( currentDir, len( files ), len( subdirs ) ) ) return S_OK( allFiles )
8cfc8d124489ba672254aee3d1fff4f748757c6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/8cfc8d124489ba672254aee3d1fff4f748757c6c/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 1265, 2853, 12, 365, 16, 1867, 16, 4681, 273, 374, 16, 8531, 273, 5306, 262, 30, 309, 618, 12, 1867, 262, 316, 1953, 18, 780, 2016, 30, 6402, 273, 306, 5149, 65, 469, 30, 6402...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18262, 1265, 2853, 12, 365, 16, 1867, 16, 4681, 273, 374, 16, 8531, 273, 5306, 262, 30, 309, 618, 12, 1867, 262, 316, 1953, 18, 780, 2016, 30, 6402, 273, 306, 5149, 65, 469, 30, 6402...
return filenamestring.split('/')
return misc.unique(filenamestring.split('/'))
def decodefilenamelist(filenamestring): return filenamestring.split('/')
a4b8fd2b2be057d4a5050deed5fab5904e571ae1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/a4b8fd2b2be057d4a5050deed5fab5904e571ae1/sqlitesack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2495, 7540, 275, 301, 5449, 12, 19875, 371, 4672, 327, 20448, 18, 6270, 12, 19875, 371, 18, 4939, 2668, 2473, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 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, 2495, 7540, 275, 301, 5449, 12, 19875, 371, 4672, 327, 20448, 18, 6270, 12, 19875, 371, 18, 4939, 2668, 2473, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
assert extract_folder_names(client.list_sub_folders()) == []
assert extract_normal_folders(client.list_sub_folders()) == []
def test_subscriptions(client): # Start with a clean slate clear_folders(client) for folder in extract_folder_names(client.list_sub_folders()): client.unsubscribe_folder(folder) test_folders = ['foobar', 'stuff & things', u'test & \u2622'] for folder in test_folders: client.create_folder(folder) all_folders = sorted(extract_folder_names(client.list_folders())) for folder in all_folders: client.subscribe_folder(folder) assert all_folders == sorted(extract_folder_names(client.list_sub_folders())) for folder in all_folders: client.unsubscribe_folder(folder) assert extract_folder_names(client.list_sub_folders()) == [] assert_raises(imapclient.IMAPClient.Error, client.subscribe_folder, 'this folder is not likely to exist')
882c0fc011701dc48ddf39dc2b95c9d09d8fd22c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9352/882c0fc011701dc48ddf39dc2b95c9d09d8fd22c/livetest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 19964, 12, 2625, 4672, 468, 3603, 598, 279, 2721, 2020, 340, 2424, 67, 16064, 12, 2625, 13, 225, 364, 3009, 316, 2608, 67, 5609, 67, 1973, 12, 2625, 18, 1098, 67, 1717, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 19964, 12, 2625, 4672, 468, 3603, 598, 279, 2721, 2020, 340, 2424, 67, 16064, 12, 2625, 13, 225, 364, 3009, 316, 2608, 67, 5609, 67, 1973, 12, 2625, 18, 1098, 67, 1717, 67, ...
for i in range(-100, 100): if pow(type(i), 3) != i*i*i: raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) pow2 = 1 for i in range(0,31): if pow(2, i) != pow2: raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) if i != 30 : pow2 = pow2*2 for othertype in int, long: for i in range(-10, 0) + range(1, 10): ii = type(i) for j in range(1, 11): jj = -othertype(j) try: pow(ii, jj) except ValueError: raise ValueError, "pow(%s, %s) failed" % (ii, jj) for othertype in int, long, float: for i in range(1, 100): zero = type(0) exp = -othertype(i/10.0) if exp == 0: continue try: pow(zero, exp) except ZeroDivisionError: pass else: raise ValueError, "pow(%s, %s) did not fail" % (zero, exp) print " Testing 3-argument pow() function..." il, ih = -20, 20 jl, jh = -5, 5 kl, kh = -10, 10 compare = cmp if type == float: il = 1 compare = test_support.fcmp elif type == int: jl = 0 elif type == long: jl, jh = 0, 15 for i in range(il, ih+1): for j in range(jl, jh+1): for k in range(kl, kh+1): if k != 0: if type == float or j < 0: try: pow(type(i),j,k) except TypeError: pass else: raise ValueError, "expected TypeError from " + \ "pow%r" % ((type(i), j, k),) continue if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ "," +str(k)+ ") != pow(" +str(i)+ "," + \ str(j)+ ") % " +str(k) print 'Testing integer mode...' powtest(int) print 'Testing long integer mode...' powtest(long) print 'Testing floating point mode...' powtest(float) print 'The number in both columns should match.' print `pow(3,3) % 8`, `pow(3,3,8)` print `pow(3,3) % -8`, `pow(3,3,-8)` print `pow(3,2) % -2`, `pow(3,2,-2)` print `pow(-3,3) % 8`, `pow(-3,3,8)` print `pow(-3,3) % -8`, `pow(-3,3,-8)` print `pow(5,2) % -8`, `pow(5,2,-8)` print print `pow(3L,3L) % 8`, `pow(3L,3L,8)` print `pow(3L,3L) % -8`, `pow(3L,3L,-8)` print `pow(3L,2) % -2`, `pow(3L,2,-2)` print `pow(-3L,3L) % 8`, `pow(-3L,3L,8)` print `pow(-3L,3L) % -8`, `pow(-3L,3L,-8)` print `pow(5L,2) % -8`, `pow(5L,2,-8)` print print for i in range(-10, 11): for j in range(0, 6): for k in range(-7, 11): if j >= 0 and k != 0: o = pow(i,j) % k n = pow(i,j,k) if o != n: print 'Integer mismatch:', i,j,k if j >= 0 and k != 0: o = pow(long(i),j) % k n = pow(long(i),j,k) if o != n: print 'Integer mismatch:', i,j,k class TestRpow: def __rpow__(self, other): return None None ** TestRpow()
if __name__ == "__main__": test_main()
def powtest(type): if type != float: print " Testing 2-argument pow() function..." for i in range(-1000, 1000): if pow(type(i), 0) != 1: raise ValueError, 'pow('+str(i)+',0) != 1' if pow(type(i), 1) != type(i): raise ValueError, 'pow('+str(i)+',1) != '+str(i) if pow(type(0), 1) != type(0): raise ValueError, 'pow(0,'+str(i)+') != 0' if pow(type(1), 1) != type(1): raise ValueError, 'pow(1,'+str(i)+') != 1' for i in range(-100, 100): if pow(type(i), 3) != i*i*i: raise ValueError, 'pow('+str(i)+',3) != '+str(i*i*i) pow2 = 1 for i in range(0,31): if pow(2, i) != pow2: raise ValueError, 'pow(2,'+str(i)+') != '+str(pow2) if i != 30 : pow2 = pow2*2 for othertype in int, long: for i in range(-10, 0) + range(1, 10): ii = type(i) for j in range(1, 11): jj = -othertype(j) try: pow(ii, jj) except ValueError: raise ValueError, "pow(%s, %s) failed" % (ii, jj) for othertype in int, long, float: for i in range(1, 100): zero = type(0) exp = -othertype(i/10.0) if exp == 0: continue try: pow(zero, exp) except ZeroDivisionError: pass # taking zero to any negative exponent should fail else: raise ValueError, "pow(%s, %s) did not fail" % (zero, exp) print " Testing 3-argument pow() function..." il, ih = -20, 20 jl, jh = -5, 5 kl, kh = -10, 10 compare = cmp if type == float: il = 1 compare = test_support.fcmp elif type == int: jl = 0 elif type == long: jl, jh = 0, 15 for i in range(il, ih+1): for j in range(jl, jh+1): for k in range(kl, kh+1): if k != 0: if type == float or j < 0: try: pow(type(i),j,k) except TypeError: pass else: raise ValueError, "expected TypeError from " + \ "pow%r" % ((type(i), j, k),) continue if compare(pow(type(i),j,k), pow(type(i),j)% type(k)): raise ValueError, "pow(" +str(i)+ "," +str(j)+ \ "," +str(k)+ ") != pow(" +str(i)+ "," + \ str(j)+ ") % " +str(k)
1127e98fd0be9ff7c67c7bfa9d802d9c21b40579 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1127e98fd0be9ff7c67c7bfa9d802d9c21b40579/test_pow.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7602, 3813, 12, 723, 4672, 309, 618, 480, 1431, 30, 1172, 315, 565, 7766, 310, 576, 17, 3446, 7602, 1435, 445, 7070, 364, 277, 316, 1048, 19236, 18088, 16, 4336, 4672, 309, 7602, 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, 7602, 3813, 12, 723, 4672, 309, 618, 480, 1431, 30, 1172, 315, 565, 7766, 310, 576, 17, 3446, 7602, 1435, 445, 7070, 364, 277, 316, 1048, 19236, 18088, 16, 4336, 4672, 309, 7602, 12, 7...
dict = {'__path__': [file]}
dict['__path__'] = [file]
def readmodule(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' i = string.rfind(module, '.') if i >= 0: # Dotted module name package = string.strip(module[:i]) submodule = string.strip(module[i+1:]) parent = readmodule(package, path, inpackage) child = readmodule(submodule, parent['__path__'], 1) return child if _modules.has_key(module): # we've seen this module before... return _modules[module] if module in sys.builtin_module_names: # this is a built-in module dict = {} _modules[module] = dict return dict # search the path for the module f = None if inpackage: try: f, file, (suff, mode, type) = \ imp.find_module(module, path) except ImportError: f = None if f is None: fullpath = list(path) + sys.path f, file, (suff, mode, type) = imp.find_module(module, fullpath) if type == imp.PKG_DIRECTORY: dict = {'__path__': [file]} _modules[module] = dict # XXX Should we recursively look for submodules? return dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() dict = {} _modules[module] = dict return dict dict = {} _modules[module] = dict imports = [] classstack = [] # stack of (class, indent) pairs src = f.read() f.close() # To avoid having to stop the regexp at each newline, instead # when we need a line number we simply string.count the number of # newlines in the string since the last time we did this; i.e., # lineno = lineno + \ # string.count(src, '\n', last_lineno_pos, here) # last_lineno_pos = here countnl = string.count lineno, last_lineno_pos = 1, 0 i = 0 while 1: m = _getnext(src, i) if not m: break start, i = m.span() if m.start("Method") >= 0: # found a method definition or function thisindent = _indent(m.group("MethodIndent")) # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # and we know the class it belongs to meth_name = m.group("MethodName") lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) elif m.start("String") >= 0: pass elif m.start("Class") >= 0: # we found a class definition thisindent = _indent(m.group("ClassIndent")) # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start class_name = m.group("ClassName") inherit = m.group("ClassSupers") if inherit: # the class inherits from other classes inherit = string.strip(inherit[1:-1]) names = [] for n in string.splitfields(inherit, ','): n = string.strip(n) if dict.has_key(n): # we know this super class n = dict[n] else: c = string.splitfields(n, '.') if len(c) > 1: # super class # is of the # form module.class: # look in # module for class m = c[-2] c = c[-1] if _modules.has_key(m): d = _modules[m] if d.has_key(c): n = d[c] names.append(n) inherit = names # remember this class cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif m.start("Import") >= 0: # import module for n in string.split(m.group("ImportList"), ','): n = string.strip(n) try: # recursively read the imported module d = readmodule(n, path, inpackage) except: print 'module', n, 'not found' elif m.start("ImportFrom") >= 0: # from module import stuff mod = m.group("ImportFromPath") names = string.split(m.group("ImportFromList"), ',') try: # recursively read the imported module d = readmodule(mod, path, inpackage) except: print 'module', mod, 'not found' continue # add any classes that were defined in the # imported module to our name space if they # were mentioned in the list for n in names: n = string.strip(n) if d.has_key(n): dict[n] = d[n] elif n == '*': # only add a name if not # already there (to mimic what # Python does internally) # also don't add names that # start with _ for n in d.keys(): if n[0] != '_' and \ not dict.has_key(n): dict[n] = d[n] else: assert 0, "regexp _getnext found something unexpected" return dict
462dfce99b90ce796273c74b0427879994cb346c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/462dfce99b90ce796273c74b0427879994cb346c/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589, 18, 803...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589, 18, 803...
ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, max(date) from account_analytic_line where account_id IN (%s) and invoice_id is not null GROUP BY account_analytic_line.account_id;"%acc_set) res = {} for account_id, sum in cr.fetchall(): res[account_id] = sum
res = {} ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) if ids2: acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, max(date) \ from account_analytic_line \ where account_id IN (%s) \ and invoice_id is not null \ GROUP BY account_analytic_line.account_id;"%acc_set) for account_id, sum in cr.fetchall(): res[account_id] = sum
def _last_worked_invoiced_date_calc (self, cr, uid, ids, name, arg, context={}): ids2 = self.search(cr, uid, [('parent_id', 'child_of', ids)]) acc_set = ",".join(map(str, ids2)) cr.execute("select account_analytic_line.account_id, max(date) from account_analytic_line where account_id IN (%s) and invoice_id is not null GROUP BY account_analytic_line.account_id;"%acc_set) res = {} for account_id, sum in cr.fetchall(): res[account_id] = sum for id in ids: res[id] = res.get(id, '') return res
a2fff80cd3c45dd2b2d56090c72d5883b2287d1d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8241/a2fff80cd3c45dd2b2d56090c72d5883b2287d1d/account_analytic_analysis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2722, 67, 1252, 329, 67, 16119, 72, 67, 712, 67, 12448, 261, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 3258, 22, 273, 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, 389, 2722, 67, 1252, 329, 67, 16119, 72, 67, 712, 67, 12448, 261, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 3258, 22, 273, 365, 18,...
if maxMutAge == 0: maxMutAge = endGen
def FreqTrajectoryMultiStochWithSubPop( curGen, numLoci, freq, NtFunc, fitness, minMutAge, maxMutAge, mode = 'uneven', ploidy=2, restartIfFail=True): ''' Simulate frequency trajectory with subpopulation structure, migration is currently ignored. The essential part of this script is to simulate the trajectory of each subpopulation independently by calling FreqTrajectoryMultiStoch with properly wrapped NtFunc function. If mode = 'even' (default) When freq is the same length of the number of loci. The allele frequency at the last generation will be multi-nomially distributed. If freq for each subpop is specified in the order of loc1-sp1, loc1-sp2, .. loc2-sp1, .... This freq will be used directly. If mode = 'uneven'. The number of disease alleles will be proportional to the interval lengths of 0 x x x 1 while x are uniform [0,1]. The distribution of interval lengths, are roughly exponential (conditional on overall length 1). ' If mode = 'none', subpop will be ignored. This script assume a single-split model of NtFunc ''' numSP = len(NtFunc(curGen)) if numSP == 1 or mode == 'none': traj = FreqTrajectoryMultiStoch( curGen=curGen, freq=freq, NtFunc=NtFunc, fitness=fitness, minMutAge=minMutAge, maxMutAge=maxMutAge, ploidy=ploidy, restartIfFail=restartIfFail) if len(traj) == 0: print "Failed to generate trajectory. You may need to set a different set of parameters." sys.exit(1) return (traj, [curGen-len(x)+1 for x in traj], trajFunc(curGen, traj)) # other wise, do it in two stages # get the split generation. split = curGen; while(True): if len(NtFunc(split)) == 1: break split -= 1 split += 1 # set default for min/max mutage if minMutAge < curGen - split: minMutAge = split if maxMutAge == 0: maxMutAge = endGen if minMutAge > maxMutAge: print "Minimal mutant age %d is larger then maximum age %d" % (minMutAge, maxMutAge) sys.exit(1) # now, NtFunc(split) has subpopulations # # for each subpopulation if len(freq) == numSP*numLoci: freqAll = freq elif len(freq) == numLoci: freqAll = [0]*(numLoci*numSP) if mode == 'even': for i in range(numLoci): wt = NtFunc(curGen) ps = sum(wt) # total allele number totNum = int(freq[i]*ps) # in subpopulations, according to population size num = rng().randMultinomialVal(totNum, [x/float(ps) for x in wt]) for sp in range(numSP): freqAll[sp+i*numSP] = num[sp]/float(wt[sp]) elif mode == 'uneven': for i in range(numLoci): wt = NtFunc(curGen) # total allele number totNum = int(freq[i]*sum(wt)) while(True): # get [ x x x x x ] while x is uniform [0,1] num = [0,1]+[rng().randUniform01() for x in range(numSP-1)] num.sort() for sp in range(numSP): freqAll[sp+i*numSP] = (num[sp+1]-num[sp])*totNum/wt[sp] if max(freqAll) < 1: break; else: print "Wrong mode parameter is used: ", mode print "Using ", mode, "distribution of alleles at the last generation" print "Frequencies at the last generation: sp0-loc0, loc1, ..., sp1-loc0,..." for sp in range(numSP): print "SP ", sp, ': ', for i in range(numLoci): print "%.3f " % freqAll[sp+i*numSP], print else: raise exceptions.ValueError("Wrong freq length") spTraj = [0]*numSP*numLoci for sp in range(numSP): print "Generting trajectory for subpopulation %d (generation %d - %d)" % (sp, split, curGen) # FreqTraj... will probe Nt for the next geneartion. def spPopSize(gen): if gen < split: return [NtFunc(split-1)[0]] else: return [NtFunc(gen)[sp]] while True: t = FreqTrajectoryMultiStoch( curGen=curGen, freq=[freqAll[sp+x*numSP] for x in range(numLoci)], NtFunc=spPopSize, fitness=fitness, minMutAge=curGen-split, maxMutAge=curGen-split, ploidy=ploidy, restartIfFail=False) # failed to generate one of the trajectory if 0 in [len(x) for x in t]: print "Failed to generate trajectory. You may need to set a different set of parameters." sys.exit(1) if 0 in [x[0] for x in t]: print "Subpop return 0 index. restart " else: break; # now spTraj has SP0: loc0,1,2..., SP1 loc 0,1,2,..., ... for i in range(numLoci): spTraj[sp+i*numSP] = t[i] # add all trajectories traj = [] for i in range(numLoci): traj.append([]) for g in range(split, curGen+1): totAllele = sum( [ spTraj[sp+i*numSP][g-split] * NtFunc(g)[sp] for sp in range(numSP) ]) traj[i].append( totAllele / sum(NtFunc(g)) ) # print "Starting allele frequency (at split) ", [traj[i][0] for i in range(numLoci)] print "Generating combined trajsctory with range: ", minMutAge, " - ", maxMutAge trajBeforeSplit = FreqTrajectoryMultiStoch( curGen=split, freq=[traj[i][0] for i in range(numLoci)], NtFunc=NtFunc, fitness=fitness, minMutAge=minMutAge-len(traj[0])+1, maxMutAge=maxMutAge-len(traj[0])+1, ploidy=ploidy, restartIfFail=True) if 1 in [len(x) for x in trajBeforeSplit]: print "Failed to generated trajectory. (Tried more than 1000 times)" sys.exit(0) def trajFuncWithSubPop(gen): if gen >= split: return [spTraj[x][gen-split] for x in range(numLoci*numSP)] else: freq = [] for tr in trajBeforeSplit: if gen < split - len(tr) + 1: freq.append( 0 ) else: freq.append( tr[ gen - (split - len(tr) + 1) ] ) return freq trajAll = [] for i in range(numLoci): trajAll.append( [] ) trajAll[i].extend(trajBeforeSplit[i]) trajAll[i].extend(traj[i][1:]) # how exactly should I return a trajectory? return (trajAll, [curGen-len(x)+1 for x in trajAll ], trajFuncWithSubPop)
c04115316d55d6d425fcf0c9b8e30aa7d152ee20 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/401/c04115316d55d6d425fcf0c9b8e30aa7d152ee20/simuUtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 478, 3658, 1609, 19528, 5002, 510, 9842, 1190, 1676, 7049, 12, 662, 7642, 16, 818, 1333, 77, 16, 7684, 16, 423, 88, 2622, 16, 20351, 16, 1131, 7420, 9692, 16, 943, 7420, 9692, 16, 1965...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 478, 3658, 1609, 19528, 5002, 510, 9842, 1190, 1676, 7049, 12, 662, 7642, 16, 818, 1333, 77, 16, 7684, 16, 423, 88, 2622, 16, 20351, 16, 1131, 7420, 9692, 16, 943, 7420, 9692, 16, 1965...
PiXi = np.dot(self.PXiY, self.PY)
def sample(self, method='naive'): """Sample probabilities of system.
b8cb922c664b3bf6a86dd9b2672831867e18bd40 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11824/b8cb922c664b3bf6a86dd9b2672831867e18bd40/pyentropy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 707, 2218, 6582, 688, 11, 4672, 3536, 8504, 17958, 434, 2619, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 707, 2218, 6582, 688, 11, 4672, 3536, 8504, 17958, 434, 2619, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if not _os_has_dup:
if not _can_dup_socket:
def fromfd(fd, family=AF_INET, type=SOCK_STREAM, proto=0): nfd = os.dup(fd) return socket(family, type, proto, fileno=nfd)
96b1c539e5218dc73de334fdb979c7925461060f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/96b1c539e5218dc73de334fdb979c7925461060f/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8313, 12, 8313, 16, 6755, 33, 6799, 67, 18819, 16, 618, 33, 3584, 3507, 67, 13693, 16, 3760, 33, 20, 4672, 290, 8313, 273, 1140, 18, 26427, 12, 8313, 13, 327, 2987, 12, 9309, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 8313, 12, 8313, 16, 6755, 33, 6799, 67, 18819, 16, 618, 33, 3584, 3507, 67, 13693, 16, 3760, 33, 20, 4672, 290, 8313, 273, 1140, 18, 26427, 12, 8313, 13, 327, 2987, 12, 9309, 16...
geoip_db_build = ft.partial(build_geoip_db, optz.spool_path, optz.maxmind_db)
geoip_db_build = ft.partial( build_geoip_db, geoip_db_path, optz.spool_path, optz.maxmind_db )
def initialize(optz): 'Prepare necessary paths, locks and geoip_db. Must be run before event-loop.' optz = AttrDict._from_optz(optz) ### Logging logging.basicConfig( level=logging.DEBUG if optz.debug else logging.WARNING ) ### Check/expand paths os.umask(077) # no need to share cache w/ someone if optz.maxmind_db: from glob import iglob try: optz.maxmind_db = os.path.abspath(sorted(iglob(optz.maxmind_db))[-1]) # latest one except IndexError: log.warn('Unable to stat MaxMind GeoIP database: {0}'.format(optz.maxmind_db)) optz.maxmind_db = None log.debug('Globbed MaxMind db path: {0}'.format(optz.maxmind_db)) optz.spool_path = os.path.abspath(optz.spool_path) if not os.path.exists(optz.spool_path): log.debug('Creating spool path: {0}'.format(optz.spool_path)) os.mkdir(optz.spool_path) os.chdir(optz.spool_path) ### Instance lock optz.display = (optz.display or os.getenv('DISPLAY') or '').lstrip(':') if not optz.display: parser.error('Unable to determine X display for instance, try setting it explicitly') elif not re.match('\d+(\.\d+)?', optz.display): parser.error('Incorrect X display specification, expected something like ":1.0"') optz.instance = 'planetscape_{0}'.format(optz.display) import fcntl optz.instance_lock = open(os.path.join(optz.spool_path, '{0}.lock'.format(optz.instance)), 'w+') try: fcntl.flock(optz.instance_lock, fcntl.LOCK_EX | fcntl.LOCK_NB) except (OSError, IOError): parser.error('Unable to secure instance lock for display "{0}"'.format(optz.display)) else: optz.instance_lock.seek(0, os.SEEK_SET) optz.instance_lock.truncate() optz.instance_lock.write(str(os.getpid()) + '\n') optz.instance_lock.flush() ### GeoIP db management import sqlite3 geoip_db_path = os.path.join(optz.spool_path, 'geoip.sqlite') geoip_db_build = ft.partial(build_geoip_db, optz.spool_path, optz.maxmind_db) ## Path/mtime/schema version checks if os.path.exists(geoip_db_path): with sqlite3.connect(geoip_db_path) as link: with closing(link.cursor()) as cur: try: if optz.maxmind_db: ts = os.stat(optz.maxmind_db).st_mtime ts_chk = geoip_db_var(cur, 'mmdb_timestamp') + 1 # for rounding quirks if ts_chk < ts: log.debug( 'MaxMind archive seem to be newer' ' than sqlite db ({0} > {1})'.format(ts_chk, ts) ) raise KeyError except (KeyError, sqlite3.OperationalError): log.debug('Dropping sqlite geoip db cache') os.unlink(geoip_db_path) ts_chk = geoip_db_var(cur, 'db_version') if ts_chk < geoip_db_version: geoip_db_build(from_version=ts_chk, link=link, cur=cur) if optz.discard_cache: cur.execute('DELETE FROM object_cache') link.commit() ## (Re)Build, if necessary if not os.path.exists(geoip_db_path): if not optz.maxmind_db or not os.path.exists(optz.maxmind_db): parser.error('No path to MaxMind GeoIP database specified' ' and no geoip data cached, one of these issues should be addressed.') geoip_db_build() ## Maps if optz.get('image'): try: if isinstance(optz.image, types.StringTypes): raise ValueError img_day, img_night = optz.image except ValueError: img_day = img_night = optz.image img_path = os.path.join(optz.spool_path, 'images') if not os.path.exists(img_path): os.mkdir(img_path) img_day_src, img_day = img_day, os.path.basename(img_day) shutil.copy(img_day_src, os.path.join(img_path, img_day)) img_night_src, img_night = img_night, os.path.basename(img_night) shutil.copy(img_night_src, os.path.join(img_path, img_night)) else: img_day, img_night = 'earth.jpg', 'night.jpg' ## Static configuration file optz.instance_conf = os.path.join(optz.spool_path, '{0}.conf'.format(optz.instance)) for k in 'arcs', 'markers': path = os.path.join(optz.spool_path, k) if not os.path.exists(path): os.mkdir(path) setattr(optz, 'instance_{0}'.format(k), os.path.join(path, optz.instance)) del k, path with open(optz.instance_conf, 'wb') as conf: conf.write('\n'.join([ '[default]', 'marker_color=red', 'shade=30', 'text_color={255,0,0}', 'twilight=6', '[earth]', '"Earth"', 'color={28, 82, 110}', 'image={0}'.format(img_day), 'night_map={0}'.format(img_night), 'arc_file={0}'.format(os.path.basename(optz.instance_arcs)), 'marker_file={0}'.format(os.path.basename(optz.instance_markers)), 'marker_fontsize=10' ])+'\n') ### Home location if not optz.home_lat and optz.home_lon and (optz.home_lat or optz.home_lon): parser.error('Either both latitude/longitude options should be specified or neither.') if not optz.home_lat or not optz.home_lon: log.debug('Determining home-location') from BeautifulSoup import BeautifulSoup from urllib2 import urlopen, URLError, HTTPError socket_to = socket.getdefaulttimeout() socket.setdefaulttimeout(10) try: soup = BeautifulSoup(urlopen( 'http://www.geobytes.com/' 'IpLocator.htm?GetLocation&template=php3.txt' ).read()) optz.home_lat = soup.find('meta', dict(name='latitude'))['content'] optz.home_lon = soup.find('meta', dict(name='longitude'))['content'] except (TypeError, KeyError, URLError, HTTPError): parser.error('Unable to determine current location via online lookup') finally: socket.setdefaulttimeout(socket_to) log.debug('Auto-detected home-location: {0} {1}'.format(optz.home_lat, optz.home_lon)) ### Netstat/trace/xplanet options # I don't use raw /proc/net/tcp here because it does not contain v6-mapped # ipv4's, although I guess these should be available somewhere else try: optz.ns_tool = ft.partial( proc_skel, **dict(it.izip((b'protocol', b'command'), dict( ss = (SS, (optz.ns_tool_binary or '/sbin/ss', '-tn')) )[optz.ns_tool])) ) except KeyError: parser.error(( 'Netstat-like command {0} protocol' ' is not implemented (yet?)' ).format(optz.ns_tool)) try: optz.trace_tool = ft.partial( proc_skel, **dict(it.izip((b'protocol', b'command'), dict( mtr = (MTR, lambda ip: ( optz.trace_tool_binary or '/usr/sbin/mtr', '-c{0}'.format(optz.trace_count), '-r', '--raw', '--no-dns', ip )) )[optz.trace_tool])) ) except KeyError: parser.error(( 'Trace command {0} protocol' ' is not implemented (yet?)' ).format(optz.trace_tool)) if optz.oneshot: optz.xplanet_args += ['-num_times', '1'] optz.xplanet = ft.partial( proc_skel, protocol=XPlanet, command=list(str_cat( optz.xplanet, '-searchdir', optz.spool_path, '-config', os.path.basename(optz.instance_conf), '-latitude', optz.home_lat, '-longitude', optz.home_lon, optz.xplanet_args )) ) ### Service colors/names optz.svc_colors = { 'default': 0xffffff, # basic stuff 21: 0x00ffff, # ftp 22: 0xffff00, # ssh 23: 0xffff00, # telnet 53: 0x99ff00, # dns 79: 0x0099ff, # finger # web 80: 0x9900ff, # http 443: 0x9900ff, # https 3128: 0x9900ff, # http proxy # mail stuff 25: 0xff00ff, # smtp 110: 0xff9900, # pop3 119: 0xff9900, # nntp 143: 0xff9900, # imap 993: 0xff9900, # imaps 995: 0xff9900, # pop3s # IM 5190: 0x009999, # AIM 5222: 0x009999, # XMPP (Jabber) 5223: 0x009999, # XMPP with old-fashioned SSL (GMail XMPP) # others 873: 0x999900, # rsync 6667: 0x990099, # irc 7000: 0x990099 # ircs } optz.svc_names = dict() for port in optz.svc_colors.iterkeys(): try: optz.svc_names[port] = socket.getservbyport(port) except (TypeError, socket.error): pass ### Parametrized calls optz.geoip_db = sqlite3.connect(geoip_db_path) optz.cache = ft.partial( cache_object, optz.geoip_db, obsoletion=optz.cache_obsoletion, max_size=optz.cache_max_size ) optz.trace = ft.partial( trace, cache=optz.cache, trace_pool = defer.DeferredSemaphore(optz.trace_pool_size), trace_tool = lambda ip, trace=optz.trace_tool, resolve=ft.partial( ips_to_locs, cur=optz.geoip_db.cursor() ): trace(ip).addCallback(resolve) ) optz.ptr_lookup = ft.partial(ptr_lookup, cache=optz.cache) return optz
5e94408e0156676ae75306358ca71ecfa12cef2d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10697/5e94408e0156676ae75306358ca71ecfa12cef2d/planetscape.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 3838, 94, 4672, 296, 7543, 4573, 2953, 16, 13046, 471, 7856, 625, 67, 1966, 18, 6753, 506, 1086, 1865, 871, 17, 6498, 1093, 225, 2153, 94, 273, 11289, 5014, 6315, 2080, 67, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 3838, 94, 4672, 296, 7543, 4573, 2953, 16, 13046, 471, 7856, 625, 67, 1966, 18, 6753, 506, 1086, 1865, 871, 17, 6498, 1093, 225, 2153, 94, 273, 11289, 5014, 6315, 2080, 67, 3...
parent = self.curNode node.parentNode = parent
node.parentNode = self.curNode
def startElementNS(self, name, tagName , attrs): uri,localname = name if uri: # When using namespaces, the reader may or may not # provide us with the original name. If not, create # *a* valid tagName from the current context. if tagName is None: tagName = self._current_context[uri] + ":" + localname node = self.document.createElementNS(uri, tagName) else: # When the tagname is not prefixed, it just appears as # localname node = self.document.createElement(localname)
87e48ef0a12be7fca2480ca8f7557916899a9bb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/87e48ef0a12be7fca2480ca8f7557916899a9bb6/pulldom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 7196, 269, 3422, 4672, 2003, 16, 3729, 529, 273, 508, 309, 2003, 30, 468, 5203, 1450, 7728, 16, 326, 2949, 2026, 578, 2026, 486, 468, 5615, 584, 598...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 3156, 12, 2890, 16, 508, 16, 7196, 269, 3422, 4672, 2003, 16, 3729, 529, 273, 508, 309, 2003, 30, 468, 5203, 1450, 7728, 16, 326, 2949, 2026, 578, 2026, 486, 468, 5615, 584, 598...
self.assertRaises(ValueError, time.strftime, '',
self.assertRaises(ValueError, func,
def test_strftime_bounds_checking(self): # Make sure that strftime() checks the bounds of the various parts #of the time tuple (0 is valid for *all* values).
e5bdf5740529b4ba238a2559495df94fbf74c768 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/e5bdf5740529b4ba238a2559495df94fbf74c768/test_time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 701, 9982, 67, 10576, 67, 24609, 12, 2890, 4672, 468, 4344, 3071, 716, 10405, 1435, 4271, 326, 4972, 434, 326, 11191, 2140, 468, 792, 326, 813, 3193, 261, 20, 353, 923, 364, ...
"""Unbloats savegame.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Remove Bloat...')) menu.AppendItem(menuItem) menuItem.Enable(False) def Execute(self,event): saveName = GPath(self.data[0]) saveInfo = self.window.data[saveName] progress = balt.Progress(_("Scanning for Bloat")) delObjRefs = 0 try: saveFile = bosh.SaveFile(saveInfo) saveFile.load(SubProgress(progress,0,0.8)) createdCounts,nullRefCount = saveFile.findBloating(SubProgress(progress,0.8,1.0)) progress.Destroy() if not createdCounts and not nullRefCount: balt.showOk(self.window,_("No bloating found."),saveName.s) return message = '' if createdCounts: for type,name in sorted(createdCounts): message += ' %s %s: %s\n' % (type,name,formatInteger(createdCounts[(type,name)])) if nullRefCount: message += _(' Null Ref Objects: %s\n') % (formatInteger(nullRefCount),) message = _("Remove savegame bloating?\n%s\nWARNING: This is a risky procedure that may corrupt your savegame! Use only if necessary!") % (message,) if not balt.askYes(self.window,message,_("Remove bloating?")): return progress = balt.Progress(_("Removing Bloat")) nums = saveFile.removeBloating(createdCounts.keys(),True,SubProgress(progress,0,0.9)) progress(0.9,_("Saving...")) saveFile.safeSave() progress.Destroy() balt.showOk(self.window, _("Uncreated Objects: %d\nUncreated Refs: %d\nUnNulled Refs: %d") % nums, saveName.s) self.window.RefreshUI(saveName) finally: progress.Destroy()
"""Unbloats savegame.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Remove Bloat...')) menu.AppendItem(menuItem) menuItem.Enable(False) def Execute(self,event): saveName = GPath(self.data[0]) saveInfo = self.window.data[saveName] progress = balt.Progress(_("Scanning for Bloat")) delObjRefs = 0 try: saveFile = bosh.SaveFile(saveInfo) saveFile.load(SubProgress(progress,0,0.8)) createdCounts,nullRefCount = saveFile.findBloating(SubProgress(progress,0.8,1.0)) progress.Destroy() if not createdCounts and not nullRefCount: balt.showOk(self.window,_("No bloating found."),saveName.s) return message = '' if createdCounts: for type,name in sorted(createdCounts): message += ' %s %s: %s\n' % (type,name,formatInteger(createdCounts[(type,name)])) if nullRefCount: message += _(' Null Ref Objects: %s\n') % (formatInteger(nullRefCount),) message = _("Remove savegame bloating?\n%s\nWARNING: This is a risky procedure that may corrupt your savegame! Use only if necessary!") % (message,) if not balt.askYes(self.window,message,_("Remove bloating?")): return progress = balt.Progress(_("Removing Bloat")) nums = saveFile.removeBloating(createdCounts.keys(),True,SubProgress(progress,0,0.9)) progress(0.9,_("Saving...")) saveFile.safeSave() progress.Destroy() balt.showOk(self.window, _("Uncreated Objects: %d\nUncreated Refs: %d\nUnNulled Refs: %d") % nums, saveName.s) self.window.RefreshUI(saveName) finally: progress.Destroy()
def Execute(self,event): fileName = GPath(self.data[0]) fileInfo = self.window.data[fileName] saveFile = bosh.SaveFile(fileInfo) progress = balt.Progress(_("Statistics")) try: saveFile.load(SubProgress(progress,0,0.9)) log = bolt.LogFile(cStringIO.StringIO()) progress(0.9,_("Calculating statistics.")) saveFile.logStats(log) progress.Destroy() text = log.out.getvalue() balt.showLog(self.window,text,fileName.s,asDialog=False,fixedFont=False,icons=bashBlue) finally: progress.Destroy()
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 3968, 273, 611, 743, 12, 2890, 18, 892, 63, 20, 5717, 12538, 273, 365, 18, 5668, 18, 892, 63, 17812, 65, 1923, 812, 273, 324, 17636, 18, 4755, 812, 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, 7903, 12, 2890, 16, 2575, 4672, 3968, 273, 611, 743, 12, 2890, 18, 892, 63, 20, 5717, 12538, 273, 365, 18, 5668, 18, 892, 63, 17812, 65, 1923, 812, 273, 324, 17636, 18, 4755, 812, 12...
results += [parent] + self.get_child_iters_by_parent(next)
results += [parent] + self.get_child_iters_by_parent(self.model, next)
def get_all_beans(self): results = [] next = self.model.get_iter_first() if next: parent = self.get_bean_from_iter(next) results += [parent] + self.get_child_iters_by_parent(next) else: return None flag = True while flag: next = self.model.iter_next(next) if not next: flag = False else: parent = self.get_bean_from_iter(next) results += [parent] + self.get_child_iters_by_parent(next) return results
3a1eef384846fb294d594329d48b4e92447c6347 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/3a1eef384846fb294d594329d48b4e92447c6347/common_tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 67, 2196, 634, 12, 2890, 4672, 1686, 273, 5378, 1024, 273, 365, 18, 2284, 18, 588, 67, 2165, 67, 3645, 1435, 225, 309, 1024, 30, 982, 273, 365, 18, 588, 67, 14496, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 67, 2196, 634, 12, 2890, 4672, 1686, 273, 5378, 1024, 273, 365, 18, 2284, 18, 588, 67, 2165, 67, 3645, 1435, 225, 309, 1024, 30, 982, 273, 365, 18, 588, 67, 14496, 67, ...
sources_in_use = set((p.index, p.value) for p in itertools.chain(*self.plots.values()))
sources_in_use = set() for p in itertools.chain(*self.plots.values()): sources_in_use.add(p.index) sources_in_use.add(p.value)
def delplot(self, *names): """ Removes the named sub-plots. """
d5954bf8ad011d4e1cd85f0cdf9c06d1449130ee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13167/d5954bf8ad011d4e1cd85f0cdf9c06d1449130ee/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 4032, 12, 2890, 16, 380, 1973, 4672, 3536, 20284, 326, 4141, 720, 17, 13214, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1464, 4032, 12, 2890, 16, 380, 1973, 4672, 3536, 20284, 326, 4141, 720, 17, 13214, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"titles" : titles})
"titles" : titles}, align)
def _usefields(adict): try: names = adict[-1] except KeyError: names = None if names is None: allfields = [] fnames = adict.keys() for fname in fnames: obj = adict[fname] n = len(obj) if not isinstance(obj, tuple) or n not in [2,3]: raise ValueError, "entry not a 2- or 3- tuple" if (n > 2) and (obj[2] == fname): continue num = int(obj[1]) if (num < 0): raise ValueError, "invalid offset." format = dtypedescr(obj[0]) if (format.itemsize == 0): raise ValueError, "all itemsizes must be fixed." if (n > 2): title = obj[2] else: title = None allfields.append((fname, format, num, title)) # sort by offsets allfields.sort(lambda x,y: cmp(x[2],y[2])) names = [x[0] for x in allfields] formats = [x[1] for x in allfields] offsets = [x[2] for x in allfields] titles = [x[3] for x in allfields] else: formats = [] offsets = [] titles = [] for name in names: res = adict[name] formats.append(res[0]) offsets.append(res[1]) if (len(res) > 2): titles.append(res[2]) else: titles.append(None) return dtypedescr({"names" : names, "formats" : formats, "offsets" : offsets, "titles" : titles})
22f9b8625e2de47755ba9a308478a373476aac4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14925/22f9b8625e2de47755ba9a308478a373476aac4f/_internal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1202, 2821, 12, 361, 933, 4672, 775, 30, 1257, 273, 1261, 933, 18919, 21, 65, 1335, 4999, 30, 1257, 273, 599, 309, 1257, 353, 599, 30, 777, 2821, 273, 5378, 25294, 273, 1261, 933,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1202, 2821, 12, 361, 933, 4672, 775, 30, 1257, 273, 1261, 933, 18919, 21, 65, 1335, 4999, 30, 1257, 273, 599, 309, 1257, 353, 599, 30, 777, 2821, 273, 5378, 25294, 273, 1261, 933,...
def getcheckdetails(self, pofilenames, linkbase):
def getcheckdetails(self, pofilenames, linkbase, url_opts={}):
def getcheckdetails(self, pofilenames, linkbase): """return a list of strings describing the results of checks""" projectstats = self.project.combine_unit_stats(pofilenames) total = max(len(projectstats.get("total", [])), 1) checklinks = [] keys = projectstats.keys() keys.sort() for checkname in keys: if not checkname.startswith("check-"): continue checkcount = len(projectstats[checkname]) checkname = checkname.replace("check-", "", 1) if total and checkcount: stats = self.nlocalize("%d string (%d%%) failed", "%d strings (%d%%) failed", checkcount, checkcount, (checkcount * 100 / total)) checklink = {"href": self.makelink(linkbase, **{str(checkname):1}), "text": checkname, "stats": stats} checklinks += [checklink] return checklinks
453fde85a31c143f65673eb2b3585722000751e5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11388/453fde85a31c143f65673eb2b3585722000751e5/indexpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1893, 6395, 12, 2890, 16, 293, 792, 330, 6809, 16, 29692, 16, 880, 67, 4952, 12938, 4672, 3536, 2463, 279, 666, 434, 2064, 16868, 326, 1686, 434, 4271, 8395, 1984, 5296, 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, 336, 1893, 6395, 12, 2890, 16, 293, 792, 330, 6809, 16, 29692, 16, 880, 67, 4952, 12938, 4672, 3536, 2463, 279, 666, 434, 2064, 16868, 326, 1686, 434, 4271, 8395, 1984, 5296, 273, 365, ...
self.__universe = 'scheduler'
self.__universe = 'local'
def __init__(self,cache_dir,log_dir,config_file,dax=0): """ @param cache_dir: the directory to write the output lal cache files to. @param log_dir: the directory to write the stderr file to. @param config_file: ConfigParser object containing the path to the LSCdataFind executable in the [condor] section and a [datafind] section from which the LSCdataFind options are read. """ self.__executable = config_file.get('condor','datafind') self.__universe = 'scheduler' CondorDAGJob.__init__(self,self.__universe,self.__executable) AnalysisJob.__init__(self,config_file) self.__cache_dir = cache_dir self.__dax = dax self.__config_file = config_file
d77daff15fe9ebbc3158c25313efbd7c71e07ddd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3589/d77daff15fe9ebbc3158c25313efbd7c71e07ddd/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2493, 67, 1214, 16, 1330, 67, 1214, 16, 1425, 67, 768, 16, 72, 651, 33, 20, 4672, 3536, 632, 891, 1247, 67, 1214, 30, 326, 1867, 358, 1045, 326, 876, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2493, 67, 1214, 16, 1330, 67, 1214, 16, 1425, 67, 768, 16, 72, 651, 33, 20, 4672, 3536, 632, 891, 1247, 67, 1214, 30, 326, 1867, 358, 1045, 326, 876, ...
cell.focus();
def notebook_lib(): s= r"""
59ad0fb34c606e547e27f848771ba61f160fd040 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/59ad0fb34c606e547e27f848771ba61f160fd040/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
x_range = (0,100), y_range = (minbenef, maxbenef),
x_range = (x_range_a, x_range_b), y_range = (y_range_a, y_range_b),
def create(self, cr, uid, ids, datas, context={}): assert len(ids), 'You should provide some ids!' responsible_data = {} responsible_names = {} data = [] minbenef = 999999999999999999999 maxbenef = 0
8bc8d7e1ebf134188f249588074e909ff7ac299e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/8bc8d7e1ebf134188f249588074e909ff7ac299e/report_businessopp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5386, 16, 819, 12938, 4672, 1815, 562, 12, 2232, 3631, 296, 6225, 1410, 5615, 2690, 3258, 5124, 14549, 67, 892, 273, 2618, 14549, 67, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5386, 16, 819, 12938, 4672, 1815, 562, 12, 2232, 3631, 296, 6225, 1410, 5615, 2690, 3258, 5124, 14549, 67, 892, 273, 2618, 14549, 67, 1...
this = apply(_quickfix.new_InstrAttribType, args)
this = _quickfix.new_InstrAttribType(*args)
def __init__(self, *args): this = apply(_quickfix.new_InstrAttribType, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 382, 701, 12399, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 382, 701, 12399, 559, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
return self.tk.call(self.stylename, 'cget', '-%s'%key, value)
return self.tk.call(self.stylename, 'cget', '-%s'%key, value)
def __getitem__(self,key):
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, 31571, 972, 12, 2890, 16, 856, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 856, 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...
self.rollback()
self.db.rollback()
def addEntry(self, item, recurse, withFiles, withFileContents, excludeAutoSource, returnVal, size): (name, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute) = \ item
a7f346ceec6c619f9a55d175b49410fad4fdc40b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/a7f346ceec6c619f9a55d175b49410fad4fdc40b/cacheset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1622, 12, 2890, 16, 761, 16, 11502, 16, 598, 2697, 16, 598, 812, 6323, 16, 4433, 4965, 1830, 16, 28702, 16, 963, 4672, 261, 529, 16, 261, 1673, 1444, 16, 1592, 2340, 9444, 3631, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1622, 12, 2890, 16, 761, 16, 11502, 16, 598, 2697, 16, 598, 812, 6323, 16, 4433, 4965, 1830, 16, 28702, 16, 963, 4672, 261, 529, 16, 261, 1673, 1444, 16, 1592, 2340, 9444, 3631, ...
except AttributeError:
except:
def get_list_nodes(self, list_id): """ Return a list with the items of the selection list, first try RefLists then try RefTrees""" ptool = self.getPortletsTool() try: return ptool.getRefListById(list_id).get_list() except AttributeError: try: tree_thread = ptool.getRefTreeById(list_id).get_tree_thread() return [x['ob'] for x in tree_thread] except AttributeError: return []
8233ed0cea326b14c5bdb5ad0e20e8211e8bebac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/8233ed0cea326b14c5bdb5ad0e20e8211e8bebac/NySite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1098, 67, 4690, 12, 2890, 16, 666, 67, 350, 4672, 3536, 2000, 279, 666, 598, 326, 1516, 434, 326, 4421, 666, 16, 1122, 775, 3941, 7432, 1508, 775, 3941, 26590, 8395, 293, 6738...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1098, 67, 4690, 12, 2890, 16, 666, 67, 350, 4672, 3536, 2000, 279, 666, 598, 326, 1516, 434, 326, 4421, 666, 16, 1122, 775, 3941, 7432, 1508, 775, 3941, 26590, 8395, 293, 6738...
{'clsids': clsids, 'classes': classes, 'sorting_options': cmp_fn.keys()})
{'clsids': clsids, 'classes': classes, 'sorting_options': cmp_fn.keys(), 'sort_name_list': ",".join(sort_name_list) })
def catalog(self, request, tl, one, two, module, extra, prog): " this sets the order of classes for the catalog. " cmp_fn = { "": Class.class_sort_noop, "category": Class.class_sort_by_category, "id": Class.class_sort_by_id, "teachers": Class.class_sort_by_teachers, "title": Class.class_sort_by_title, "timeblock": Class.class_sort_by_timeblock }
feba2a003e0009b06bf39b5711a84f8d0b664324 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12041/feba2a003e0009b06bf39b5711a84f8d0b664324/programprintables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6222, 12, 2890, 16, 590, 16, 8332, 16, 1245, 16, 2795, 16, 1605, 16, 2870, 16, 11243, 4672, 315, 333, 1678, 326, 1353, 434, 3318, 364, 326, 6222, 18, 315, 225, 9411, 67, 4293, 273, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6222, 12, 2890, 16, 590, 16, 8332, 16, 1245, 16, 2795, 16, 1605, 16, 2870, 16, 11243, 4672, 315, 333, 1678, 326, 1353, 434, 3318, 364, 326, 6222, 18, 315, 225, 9411, 67, 4293, 273, 2...
stderr_regexp=None, fail_if_match=False):
stderr_regexp=None, fail_if_match=False, print_output=True):
def retry_command(cmd, retries, timeout, sleeptime, stdout_regexp=None, stderr_regexp=None, fail_if_match=False): # Which iteration we're on i = 0 # Current return code rc = False while True: i += 1 rc = run_with_timeout(cmd, timeout, stdout_regexp, stderr_regexp, fail_if_match) if rc: break if retries > 0 and i >= retries: log.info("Number of retries exceeded maximum (%i), giving up.", retries) break if sleeptime: log.info("Sleeping for %i.", sleeptime) time.sleep(sleeptime) return rc
8dface2063bd8f3c552c615d3b3ff1178d8aa2e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6206/8dface2063bd8f3c552c615d3b3ff1178d8aa2e8/retry.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 3076, 12, 4172, 16, 9453, 16, 2021, 16, 272, 11182, 10650, 16, 3909, 67, 17745, 33, 7036, 16, 4514, 67, 17745, 33, 7036, 16, 2321, 67, 430, 67, 1916, 33, 8381, 16, 1172, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3300, 67, 3076, 12, 4172, 16, 9453, 16, 2021, 16, 272, 11182, 10650, 16, 3909, 67, 17745, 33, 7036, 16, 4514, 67, 17745, 33, 7036, 16, 2321, 67, 430, 67, 1916, 33, 8381, 16, 1172, 67...
return pretty_date(dt)
return dt
def get_date(s): dt = datetime.strptime(s, '%Y-%m-%d %H:%M:%S') dt -= timedelta(seconds=time.timezone) # sqlite seems to save at GMT... ata :P return pretty_date(dt) # found this online
4b3b0887bbd7693b28f3887b7bce2d7daf7358e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3078/4b3b0887bbd7693b28f3887b7bce2d7daf7358e8/minitwit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 712, 12, 87, 4672, 3681, 273, 3314, 18, 701, 10650, 12, 87, 16, 1995, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 6134, 3681, 3947, 10661, 12, 7572, 33, 957, 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, 336, 67, 712, 12, 87, 4672, 3681, 273, 3314, 18, 701, 10650, 12, 87, 16, 1995, 61, 6456, 81, 6456, 72, 738, 44, 5319, 49, 5319, 55, 6134, 3681, 3947, 10661, 12, 7572, 33, 957, 18, ...
import vdrpylib
import vdr.vdr
def add_data_vdr(self, vdr_epg_file): try: import vdrpylib except: print 'vdrpylib not installed'
77d075e2a24e5a102d969590ee6fb2860253d80a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/77d075e2a24e5a102d969590ee6fb2860253d80a/guide.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 90, 3069, 12, 2890, 16, 331, 3069, 67, 881, 75, 67, 768, 4672, 775, 30, 1930, 331, 3069, 18, 90, 3069, 1335, 30, 1172, 296, 90, 3069, 2074, 2941, 486, 5876, 11, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 892, 67, 90, 3069, 12, 2890, 16, 331, 3069, 67, 881, 75, 67, 768, 4672, 775, 30, 1930, 331, 3069, 18, 90, 3069, 1335, 30, 1172, 296, 90, 3069, 2074, 2941, 486, 5876, 11, 2...
if '.' in key: prefix, attribute = key.split('.', 1)
idx = key.rfind('.') if idx > 0: prefix, attribute = key[:idx], key[idx+1:]
def render_macro(self, req, name, content): intertracs = {} for key, value in self.config.options('intertrac'): if '.' in key: prefix, attribute = key.split('.', 1) intertrac = intertracs.setdefault(prefix, {}) intertrac[attribute] = value else: intertracs[key] = value # alias
fb90120b6b472456d4be45c352796f290ccf90fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/fb90120b6b472456d4be45c352796f290ccf90fe/intertrac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 1554, 313, 28965, 273, 2618, 364, 498, 16, 460, 316, 365, 18, 1425, 18, 2116, 2668, 2761, 313, 1077, 11, 4672, 2067, 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, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 1554, 313, 28965, 273, 2618, 364, 498, 16, 460, 316, 365, 18, 1425, 18, 2116, 2668, 2761, 313, 1077, 11, 4672, 2067, 273, ...
if md.decl.type.hasReply():
if (md.decl.type.hasReply() or md.decl.type.isCtor() or md.decl.type.isDtor()):
def visitMessageDecl(self, md): # where we squirrel away some common information md._cxx = _struct()
6bc1e02cdfe40a4fec223a706e06496d7e54cb5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/6bc1e02cdfe40a4fec223a706e06496d7e54cb5d/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 1079, 3456, 12, 2890, 16, 3481, 4672, 468, 1625, 732, 17715, 481, 2878, 10804, 2690, 2975, 1779, 3481, 6315, 71, 5279, 273, 389, 1697, 1435, 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, 0, 0, 0, 0, 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, 3757, 1079, 3456, 12, 2890, 16, 3481, 4672, 468, 1625, 732, 17715, 481, 2878, 10804, 2690, 2975, 1779, 3481, 6315, 71, 5279, 273, 389, 1697, 1435, 2, -100, -100, -100, -100, -100, -100, ...
from dos import stat, getcwd
from dos import stat, getcwd, environ, listdir
def _os_bootstrap(): "Set up 'os' module replacement functions for use during import bootstrap." global _os_stat, _os_path_join, _os_path_dirname, _os_getcwd names = sys.builtin_module_names join = dirname = None mindirlen = 0 if 'posix' in names: from posix import stat, getcwd sep = '/' mindirlen = 1 elif 'nt' in names: from nt import stat, getcwd sep = '\\' mindirlen = 3 elif 'dos' in names: from dos import stat, getcwd sep = '\\' mindirlen = 3 elif 'os2' in names: from os2 import stat, getcwd sep = '\\' elif 'mac' in names: from mac import stat, getcwd def join(a, b): if a == '': return b path = s if ':' not in a: a = ':' + a if a[-1:] != ':': a = a + ':' return a + b else: raise ImportError, 'no os specific module found' if join is None: def join(a, b, sep=sep): if a == '': return b lastchar = a[-1:] if lastchar == '/' or lastchar == sep: return a + b return a + sep + b if dirname is None: def dirname(a, sep=sep, mindirlen=mindirlen): for i in range(len(a)-1, -1, -1): c = a[i] if c == '/' or c == sep: if i < mindirlen: return a[:i+1] return a[:i] return '' _os_stat = stat _os_getcwd = getcwd _os_path_join = join _os_path_dirname = dirname
59d55e3eafa5f2caeb1279be446bd3e94a5799a4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11925/59d55e3eafa5f2caeb1279be446bd3e94a5799a4/iu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 538, 67, 12722, 13332, 315, 694, 731, 296, 538, 11, 1605, 6060, 4186, 364, 999, 4982, 1930, 7065, 1199, 225, 2552, 389, 538, 67, 5642, 16, 389, 538, 67, 803, 67, 5701, 16, 389, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 538, 67, 12722, 13332, 315, 694, 731, 296, 538, 11, 1605, 6060, 4186, 364, 999, 4982, 1930, 7065, 1199, 225, 2552, 389, 538, 67, 5642, 16, 389, 538, 67, 803, 67, 5701, 16, 389, ...
if debug: pass
def compile (self, sources, output_dir=None, macros=None, include_dirs=None, debug=0, extra_preargs=None, extra_postargs=None):
c9db91300cada056e565e829810030a89aaff9b4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c9db91300cada056e565e829810030a89aaff9b4/msvccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4074, 261, 2890, 16, 5550, 16, 876, 67, 1214, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 1198, 33, 20, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, ...
print location self._ttl = 5
self._ttl = 5
def __init__(self, image, location): GameObject.__init__(self, image, location) print location self._ttl = 5
65f19c5b04f609c7e0c3f70cf05223c8690e140a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13800/65f19c5b04f609c7e0c3f70cf05223c8690e140a/spaceswarm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1316, 16, 2117, 4672, 14121, 921, 16186, 2738, 972, 12, 2890, 16, 1316, 16, 2117, 13, 1172, 2117, 365, 6315, 12546, 273, 1381, 2, 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, 1001, 2738, 972, 12, 2890, 16, 1316, 16, 2117, 4672, 14121, 921, 16186, 2738, 972, 12, 2890, 16, 1316, 16, 2117, 13, 1172, 2117, 365, 6315, 12546, 273, 1381, 2, -100, -100, -100, -100, ...