rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.CharField.__init__(self, 589) else quickfix.CharField.__init__(self, 589, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 6675, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 2156, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 6675, 13, 469, 9549, 904, 18, 2156, 974, 16186, 2738, ...
gLogger.error("%s.processTransformation: Failed to generate tasks for transformation." % AGENT_NAME,res['Message'])
gLogger.error( "%s.processTransformation: Failed to generate tasks for transformation." % AGENT_NAME, res['Message'] )
def processTransformation(self,transDict): transID = transDict['TransformationID'] # First get the LFNs associated to the transformation res = self.transDB.getTransformationFiles(condDict={'TransformationID':transID,'Status':'Unused'}) if not res['OK']: gLogger.error("%s.processTransformation: Failed to obtain input data." % AGENT_NAME, res['Message']) return res transFiles = res['Value'] lfns = res['LFNs'] if not lfns: gLogger.info("%s.processTransformation: No 'Unused' files found for transformation." % AGENT_NAME) if transDict['Status'] == 'Flush': res = self.transDB.setTransformationParameter(transID,'Status','Active') if not res['OK']: gLogger.error("%s.execute: Failed to update transformation status to 'Active'." % AGENT_NAME, res['Message']) else: gLogger.info("%s.execute: Updated transformation status to 'Active'." % AGENT_NAME) return S_OK()
5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/5b98b3b45ce744b0fa8f66e9d9812d0b7910a0ab/TransformationAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 15292, 12, 2890, 16, 2338, 5014, 4672, 906, 734, 273, 906, 5014, 3292, 15292, 734, 3546, 468, 5783, 336, 326, 18803, 10386, 3627, 358, 326, 8620, 400, 273, 365, 18, 2338, 2290, 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, 1207, 15292, 12, 2890, 16, 2338, 5014, 4672, 906, 734, 273, 906, 5014, 3292, 15292, 734, 3546, 468, 5783, 336, 326, 18803, 10386, 3627, 358, 326, 8620, 400, 273, 365, 18, 2338, 2290, 18,...
print self._selected_idx, idx, self.viewport, self._selected_pos if abs(diff) >= self.grid.num_cols:
vertical = abs(diff) / self.grid.num_cols horizonal = abs(diff) % self.grid.num_cols if vertical:
def _set_selected(self, idx, secs): if not self.grid: return # FIXME: add some more and better logic here # ***************************************************************** # FIXME: this code is wrong when coming back from the image viewer # We MUST remeber how the grud looked like # ***************************************************************** # we need to figure out of the user moved horizonal or vertical # we guess it here by choosing the shortest path diff = self._selected_idx - idx print self._selected_idx, idx, self.viewport, self._selected_pos if abs(diff) >= self.grid.num_cols: # move up or down self._selected_pos[1] -= diff / self.grid.num_cols while self._selected_pos[1] >= self.viewport[1] + self.grid.num_rows: self.viewport[1] += self.grid.num_rows self.grid.scroll_by((0, self.grid.num_rows), secs, force=True) while self._selected_pos[1] < self.viewport[1]: self.viewport[1] -= self.grid.num_rows self.grid.scroll_by((0, -self.grid.num_rows), secs, force=True) else: # move left or right self._selected_pos[0] -= diff while self._selected_pos[0] >= self.viewport[0] + self.grid.num_cols: self.viewport[0] += self.grid.num_cols self.grid.scroll_by((self.grid.num_cols, 0), secs, force=True) while self._selected_pos[0] < self.viewport[0]: self.viewport[0] -= self.grid.num_cols self.grid.scroll_by((-self.grid.num_cols, 0), secs, force=True) self._selected_idx = idx self.grid.select(self._selected_pos, secs)
a21e0a36a337ebeea86ed75dd4fa3912c3018e9f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11399/a21e0a36a337ebeea86ed75dd4fa3912c3018e9f/listing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 8109, 12, 2890, 16, 2067, 16, 18043, 4672, 309, 486, 365, 18, 5222, 30, 327, 468, 9852, 30, 527, 2690, 1898, 471, 7844, 4058, 2674, 468, 19756, 468, 9852, 30, 333, 981, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 67, 8109, 12, 2890, 16, 2067, 16, 18043, 4672, 309, 486, 365, 18, 5222, 30, 327, 468, 9852, 30, 527, 2690, 1898, 471, 7844, 4058, 2674, 468, 19756, 468, 9852, 30, 333, 981, ...
while 1:
while True:
def main(): if not sys.argv[1:] or sys.argv[1] in ("--help", "-h"): print("usage: pdb.py scriptfile [arg] ...") sys.exit(2) mainpyfile = sys.argv[1] # Get script filename if not os.path.exists(mainpyfile): print('Error:', mainpyfile, 'does not exist') sys.exit(1) del sys.argv[0] # Hide "pdb.py" from argument list # Replace pdb's dir with script's dir in front of module search path. sys.path[0] = os.path.dirname(mainpyfile) # Note on saving/restoring sys.argv: it's a good idea when sys.argv was # modified by the script being debugged. It's a bad idea when it was # changed by the user from the command line. There is a "restart" command # which allows explicit specification of command line arguments. pdb = Pdb() while 1: try: pdb._runscript(mainpyfile) if pdb._user_requested_quit: break print("The program finished and will be restarted") except Restart: print("Restarting", mainpyfile, "with arguments:") print("\t" + " ".join(sys.argv[1:])) except SystemExit: # In most cases SystemExit does not warrant a post-mortem session. print("The program exited via sys.exit(). Exit status: ", end=' ') print(sys.exc_info()[1]) except: traceback.print_exc() print("Uncaught exception. Entering post mortem debugging") print("Running 'cont' or 'step' will restart the program") t = sys.exc_info()[2] pdb.interaction(None, t) print("Post mortem debugger finished. The " + mainpyfile + " will be restarted")
1e30bd3753e7b08dce13ff1e18ac1ae5c397fcea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/1e30bd3753e7b08dce13ff1e18ac1ae5c397fcea/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 486, 2589, 18, 19485, 63, 21, 26894, 578, 2589, 18, 19485, 63, 21, 65, 316, 7566, 413, 5201, 3113, 3701, 76, 6, 4672, 1172, 2932, 9167, 30, 10892, 18, 2074, 2728, 768...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 309, 486, 2589, 18, 19485, 63, 21, 26894, 578, 2589, 18, 19485, 63, 21, 65, 316, 7566, 413, 5201, 3113, 3701, 76, 6, 4672, 1172, 2932, 9167, 30, 10892, 18, 2074, 2728, 768...
self.assertEqual(result, 0.0, "expected underflow to 0 from %r" % underflow)
self.assertEqual(result, 0.0, 'expected underflow to 0 ' 'from {!r}'.format(underflow))
def test(self): huge = 1L << 40000 mhuge = -huge self.assertEqual(huge / huge, 1.0) self.assertEqual(mhuge / mhuge, 1.0) self.assertEqual(huge / mhuge, -1.0) self.assertEqual(mhuge / huge, -1.0) self.assertEqual(1 / huge, 0.0) self.assertEqual(1L / huge, 0.0) self.assertEqual(1 / mhuge, 0.0) self.assertEqual(1L / mhuge, 0.0) self.assertEqual((666 * huge + (huge >> 1)) / huge, 666.5) self.assertEqual((666 * mhuge + (mhuge >> 1)) / mhuge, 666.5) self.assertEqual((666 * huge + (huge >> 1)) / mhuge, -666.5) self.assertEqual((666 * mhuge + (mhuge >> 1)) / huge, -666.5) self.assertEqual(huge / (huge << 1), 0.5) self.assertEqual((1000000 * huge) / huge, 1000000)
5289349a5efd6e9cd17c406c4cc289e2c46e1844 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/5289349a5efd6e9cd17c406c4cc289e2c46e1844/test_long_future.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 366, 21627, 273, 404, 48, 2296, 1059, 2787, 17819, 21627, 273, 300, 76, 21627, 365, 18, 11231, 5812, 12, 76, 21627, 342, 366, 21627, 16, 404, 18, 20, 13, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 12, 2890, 4672, 366, 21627, 273, 404, 48, 2296, 1059, 2787, 17819, 21627, 273, 300, 76, 21627, 365, 18, 11231, 5812, 12, 76, 21627, 342, 366, 21627, 16, 404, 18, 20, 13, 365, 18,...
childrenFollowLocalChanges))
childrenFollowLocalChanges, updateOnly or not jobAdded))
# def _mergeGroupChanges -- main body begins here
80783a537f1ca63d21641d8a2178c982af50c893 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/80783a537f1ca63d21641d8a2178c982af50c893/update.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 389, 2702, 1114, 7173, 1493, 2774, 1417, 17874, 2674, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 468, 1652, 389, 2702, 1114, 7173, 1493, 2774, 1417, 17874, 2674, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
result.error = IntegrityError(result.error.msg)
result.error = IntegrityError(result.error.message)
def _execute(self, cmd, args=None): operation = cmd.split(' ', 1)[0].lower() if self.django_needs_begin and operation in CHANGE_OPS: bpgsql.Connection._execute(self, 'BEGIN') self.django_needs_begin = False if (not self.django_needs_begin) and (operation not in CHANGE_OPS) and (operation not in TRANSACTION_OPS): bpgsql.Connection._execute(self, 'COMMIT') debuglog('>>FORCED COMMIT\n') self.django_needs_begin = True
c26637363be5afd60a3fd4e967e2e51ef16fca87 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1238/c26637363be5afd60a3fd4e967e2e51ef16fca87/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 16, 1797, 16, 833, 33, 7036, 4672, 1674, 273, 1797, 18, 4939, 2668, 2265, 404, 25146, 20, 8009, 8167, 1435, 309, 365, 18, 24573, 67, 20600, 67, 10086, 471, 1674, 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, 389, 8837, 12, 2890, 16, 1797, 16, 833, 33, 7036, 4672, 1674, 273, 1797, 18, 4939, 2668, 2265, 404, 25146, 20, 8009, 8167, 1435, 309, 365, 18, 24573, 67, 20600, 67, 10086, 471, 1674, 3...
surf = pygame.Surface((100, 100), SRCALPHA, 32) for s_x, s_y, d_x, d_y, test_posn in overlaps: surf.fill(bgc) surf.fill(rectc_right, (25, 0, 25, 50)) surf.fill(rectc_left, (0, 0, 25, 50)) surf.blit(surf, (d_x, d_y), (s_x, s_y, 50, 50)) self.failUnlessEqual(surf.get_at(test_posn), rectc_right)
surfs = [pygame.Surface((100, 100), SRCALPHA, 32)] surf = pygame.Surface((100, 100), 0, 32) surf.set_alpha(255) surfs.append(surf) surf = pygame.Surface((100, 100), 0, 32) surf.set_colorkey((0, 1, 0)) surfs.append(surf) for surf in surfs: for s_x, s_y, d_x, d_y, test_posn in overlaps: surf.fill(bgc) surf.fill(rectc_right, (25, 0, 25, 50)) surf.fill(rectc_left, (0, 0, 25, 50)) surf.blit(surf, (d_x, d_y), (s_x, s_y, 50, 50)) self.failUnlessEqual(surf.get_at(test_posn), rectc_right)
def test_overlap_check(self): bgc = (0, 0, 0, 255) rectc_left = (128, 64, 32, 255) rectc_right = (255, 255, 255, 255) colors = [(255, 255, 255, 255), (128, 64, 32, 255)] overlaps = [(0, 0, 1, 0, (50, 0)), (0, 0, 49, 1, (98, 2)), (0, 0, 49, 49, (98, 98)), (49, 0, 0, 1, (0, 2)), (49, 0, 0, 49, (0, 98))] surf = pygame.Surface((100, 100), SRCALPHA, 32) for s_x, s_y, d_x, d_y, test_posn in overlaps: surf.fill(bgc) surf.fill(rectc_right, (25, 0, 25, 50)) surf.fill(rectc_left, (0, 0, 25, 50)) surf.blit(surf, (d_x, d_y), (s_x, s_y, 50, 50)) self.failUnlessEqual(surf.get_at(test_posn), rectc_right)
da1dba8599cf786a2b9e2d9d4eeef8d5753e462b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1298/da1dba8599cf786a2b9e2d9d4eeef8d5753e462b/surface_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17946, 67, 1893, 12, 2890, 4672, 7611, 71, 273, 261, 20, 16, 374, 16, 374, 16, 4561, 13, 4917, 71, 67, 4482, 273, 261, 10392, 16, 5178, 16, 3847, 16, 4561, 13, 4917, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 17946, 67, 1893, 12, 2890, 4672, 7611, 71, 273, 261, 20, 16, 374, 16, 374, 16, 4561, 13, 4917, 71, 67, 4482, 273, 261, 10392, 16, 5178, 16, 3847, 16, 4561, 13, 4917, 71, ...
adlist = None
adlist = ""
def getrouteaddr(self): """Parse a route address (Return-path value).
f830a529961b54d136aac71e1e499e6735627d99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f830a529961b54d136aac71e1e499e6735627d99/rfc822.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5547, 4793, 12, 2890, 4672, 3536, 3201, 279, 1946, 1758, 261, 990, 17, 803, 460, 2934, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 5547, 4793, 12, 2890, 4672, 3536, 3201, 279, 1946, 1758, 261, 990, 17, 803, 460, 2934, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
if values is _marker:
if values is None:
def unindex_object(self, documentId): """ Carefully unindex the object with integer id 'documentId'"""
79fcdda127d459e616b9e6e8c9afa6b52f74c043 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14312/79fcdda127d459e616b9e6e8c9afa6b52f74c043/index.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 1615, 67, 1612, 12, 2890, 16, 28573, 4672, 3536, 385, 834, 4095, 640, 1615, 326, 733, 598, 3571, 612, 296, 5457, 548, 11, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 640, 1615, 67, 1612, 12, 2890, 16, 28573, 4672, 3536, 385, 834, 4095, 640, 1615, 326, 733, 598, 3571, 612, 296, 5457, 548, 11, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
w = (time.time() > self._last_purge + 10) and self._children_to_purge or []
w = [] if (time.time() > self._last_purge + 10): w = [x for x in self._children_to_purge if x.fileno() != -1]
def run(self, sock): """ The main loop. Pass a socket that is ready to accept() client connections. Return value will be True or False indiciating whether or not the loop was exited due to SIGHUP. """ # Set up signal handlers. self._keepGoing = True self._hupReceived = False self._installSignalHandlers()
066a539a1b65b0f6cf221a96faec9ed3492db80c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7624/066a539a1b65b0f6cf221a96faec9ed3492db80c/preforkserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 7313, 4672, 3536, 1021, 2774, 2798, 18, 10311, 279, 2987, 716, 353, 5695, 358, 2791, 1435, 1004, 5921, 18, 2000, 460, 903, 506, 1053, 578, 1083, 4541, 22906, 2856, 57...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 7313, 4672, 3536, 1021, 2774, 2798, 18, 10311, 279, 2987, 716, 353, 5695, 358, 2791, 1435, 1004, 5921, 18, 2000, 460, 903, 506, 1053, 578, 1083, 4541, 22906, 2856, 57...
self.interval = interval
self.interval = int(interval)
def __init__(self,interval, event, repeat = True): self.interval = interval self.event = event self.repeat = repeat self.lastRun = now() DDBObject.__init__(self,ScheduleEvent.scheduler)
7a381c4247e3cc5d7697bbb0ba113a4f4d93a09e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/7a381c4247e3cc5d7697bbb0ba113a4f4d93a09e/scheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6624, 16, 871, 16, 7666, 273, 1053, 4672, 365, 18, 6624, 273, 509, 12, 6624, 13, 365, 18, 2575, 273, 871, 365, 18, 9374, 273, 7666, 365, 18, 2722, 1997...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 6624, 16, 871, 16, 7666, 273, 1053, 4672, 365, 18, 6624, 273, 509, 12, 6624, 13, 365, 18, 2575, 273, 871, 365, 18, 9374, 273, 7666, 365, 18, 2722, 1997...
parts = ['..'] * len(source_parts) + target_parts
parts = ['..'] * (len(source_parts) - 1) + target_parts
def relative_path(source, target): """ Build and return a path to `target`, relative to `source`. If there is no common prefix, return the absolute path to `target`. """ source_parts = os.path.abspath(source or '').split(os.sep) target_parts = os.path.abspath(target).split(os.sep) # Check first 2 parts because '/dir'.split('/') == ['', 'dir']: if source_parts[:2] != target_parts[:2]: # Nothing in common between paths. # Return absolute path, using '/' for URLs: return '/'.join(target_parts) source_parts.reverse() target_parts.reverse() while (source_parts and target_parts and source_parts[-1] == target_parts[-1]): # Remove path components in common: source_parts.pop() target_parts.pop() target_parts.reverse() parts = ['..'] * len(source_parts) + target_parts return '/'.join(parts)
5aa8b3787ce8b536ae3050c95633b381520c6f34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/5aa8b3787ce8b536ae3050c95633b381520c6f34/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3632, 67, 803, 12, 3168, 16, 1018, 4672, 3536, 3998, 471, 327, 279, 589, 358, 1375, 3299, 9191, 3632, 358, 1375, 3168, 8338, 225, 971, 1915, 353, 1158, 2975, 1633, 16, 327, 326, 4967, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3632, 67, 803, 12, 3168, 16, 1018, 4672, 3536, 3998, 471, 327, 279, 589, 358, 1375, 3299, 9191, 3632, 358, 1375, 3168, 8338, 225, 971, 1915, 353, 1158, 2975, 1633, 16, 327, 326, 4967, ...
self._cond.release() def put(self, f): self._out.remove(f) self._files.append(f) if not self._out: self._cond.acquire() try: if self.writing and not self._out: self._cond.notifyAll() finally: self._cond.release()
self._out.remove(f) self._files.append(f) if not self._out: with self._cond: if self.writers and not self._out: self._cond.notifyAll()
def get(self): self._cond.acquire() try: while self.writing: self._cond.wait() if self.closed: raise ValueError('closed')
233cea39af70d717fd8ab3c278d20ff46d363c7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10048/233cea39af70d717fd8ab3c278d20ff46d363c7f/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 365, 6315, 10013, 18, 1077, 1039, 1435, 775, 30, 1323, 365, 18, 14345, 30, 365, 6315, 10013, 18, 7048, 1435, 309, 365, 18, 12204, 30, 1002, 2068, 2668, 12204, 6134, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 4672, 365, 6315, 10013, 18, 1077, 1039, 1435, 775, 30, 1323, 365, 18, 14345, 30, 365, 6315, 10013, 18, 7048, 1435, 309, 365, 18, 12204, 30, 1002, 2068, 2668, 12204, 6134, ...
clsData = list(numpy.transpose(numpy.take(self.originalData, [colorIndex], axis = 0)))
clsData = numpy.take(self.originalData, [colorIndex], axis = 0)[0]
def updateData(self, xAttr, yAttr, colorAttr, shapeAttr = "", sizeShapeAttr = "", showColorLegend = 0, labelAttr = None, **args): self.removeDrawingCurves(removeLegendItems = 0) # my function, that doesn't delete selection curves self.removeMarkers() self.tips.removeAll() if not self.showLegend: self.enableLegend(0) self.tooltipData = [] self.potentialsClassifier = None self.shownXAttribute = xAttr self.shownYAttribute = yAttr
0c42b84195a2d9b9ebb860167f517dc9fc51ef3f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0c42b84195a2d9b9ebb860167f517dc9fc51ef3f/OWScatterPlotGraph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 751, 12, 2890, 16, 619, 3843, 16, 677, 3843, 16, 2036, 3843, 16, 2179, 3843, 273, 23453, 963, 8500, 3843, 273, 23453, 2405, 2957, 16812, 273, 374, 16, 1433, 3843, 273, 599, 16, 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, 1089, 751, 12, 2890, 16, 619, 3843, 16, 677, 3843, 16, 2036, 3843, 16, 2179, 3843, 273, 23453, 963, 8500, 3843, 273, 23453, 2405, 2957, 16812, 273, 374, 16, 1433, 3843, 273, 599, 16, 2...
'test'
'boost_python_test'
... def new_method(self):
7208104122237e24eafd16f471ebc6eedf289e6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9978/7208104122237e24eafd16f471ebc6eedf289e6b/comprehensive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 565, 1652, 394, 67, 2039, 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, 1372, 565, 1652, 394, 67, 2039, 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,...
sage: print is_bitrade(T1, T2)
sage: is_bitrade(T1, T2)
def tau2(T1, T2, cells_map): """ The definition of tau2 is: tau2 : T1 -> T1 tau2 = beta\^(-1)_3 beta_1 (composing left to right) where beta_i : T2 -> T1 changes just the i-th coordinate of a triple. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_bitrade(T1, T2) True sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: t2 = tau2(T1, T2, cells_map) sage: print t2 [21, 22, 23, 24, 25, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20] sage: print t2.to_cycles() [(1, 21, 16, 11, 6), (2, 22, 17, 12, 7), (3, 23, 18, 13, 8), (4, 24, 19, 14, 9), (5, 25, 20, 15, 10)] """ # The cells_map has both directions, i.e. integer to # cell and cell to integer, so the size of T1 is # just half of len(cells_map). x = (int(len(cells_map)/2) + 1) * [-1] for r in range(T1.nrows()): for c in range(T1.ncols()): e = T1[r, c] if e < 0: continue (r2, c2, e2) = beta3( (r,c,e), T1, T2) (r3, c3, e3) = beta1( (r2,c2,e2), T2, T1) x[ cells_map[(r,c)] ] = cells_map[ (r3,c3) ] x.pop(0) # remove the head of the list since we # have permutations on 1..(something). return Permutation(x)
0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0d333d6beb48cce2a6cb9f6c18b5d14e9b0765b2/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 22, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 22, 353, 30, 225, 12284, 22, 294, 399, 21, 317, 399, 21, 12284, 22, 273, 6796, 64, 66, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 22, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 22, 353, 30, 225, 12284, 22, 294, 399, 21, 317, 399, 21, 12284, 22, 273, 6796, 64, 66, 1...
if env['disable_clipboard']: spring_defines += ['NO_CLIPBOARD']
def stringarray_opt(key, default): if args.has_key(key): env[key] = args[key].split(';') else: env[key] = default
3c5941f23c592a86f4fc829baad5476b7da4b8ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1030/3c5941f23c592a86f4fc829baad5476b7da4b8ad/rts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 1126, 67, 3838, 12, 856, 16, 805, 4672, 309, 833, 18, 5332, 67, 856, 12, 856, 4672, 1550, 63, 856, 65, 273, 833, 63, 856, 8009, 4939, 2668, 4359, 13, 469, 30, 1550, 63, 856, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 533, 1126, 67, 3838, 12, 856, 16, 805, 4672, 309, 833, 18, 5332, 67, 856, 12, 856, 4672, 1550, 63, 856, 65, 273, 833, 63, 856, 8009, 4939, 2668, 4359, 13, 469, 30, 1550, 63, 856, 6...
except ImportError:
else:
def redo(self, p_name): """ Restores module declarations. Intended for built-in modules and thus does not handle import statements. """ self.out("# encoding: utf-8", 0); # NOTE: maybe encoding must be selectable if hasattr(self.module, "__name__"): mod_name = " calls itself " + self.module.__name__ else: mod_name = " does not know its name" self.out("# module " + p_name + mod_name, 0) if hasattr(self.module, "__file__"): self.out("# from file " + self.module.__file__, 0) self.outDocAttr(self.module, 0) # find whatever other self.imported_modules the module knows; effectively these are imports for item_name in self.module.__dict__: item = self.module.__dict__[item_name] if isinstance(item, type(sys)): self.imported_modules[item_name] = item if hasattr(item, "__name__"): self.out("import " + item.__name__ + " as " + item_name + " # refers to " + str(item)) else: self.out(item_name + " = None # XXX name unknown, refers to " + str(item)) self.out("", 0) # empty line after imports # group what else we have into buckets vars_simple = {} vars_complex = {} funcs = {} classes = {} reexports = {} # contains not real objects, but qualified id strings, like "sys.stdout" # for item_name in self.module.__dict__: if item_name in ("__dict__", "__doc__", "__module__", "__file__", "__name__"): continue try: item = getattr(self.module, item_name) # let getters do the magic except: item = self.module.__dict__[item_name] # have it raw # check if it has percolated from an imported module imported_name = self.findImportedName(item) if imported_name is not None: reexports[item_name] = imported_name else: if isinstance(item, type) or item is FakeClassObj: # some classes are callable, check them before functions classes[item_name] = item elif isCallable(item): funcs[item_name] = item elif isinstance(item, type(sys)): continue # self.imported_modules handled above already else: if isinstance(item, SIMPLEST_TYPES): vars_simple[item_name] = item else: vars_complex[item_name] = item # # sort and output every bucket if reexports: self.out("# reexported imports", 0) self.out("", 0) for item_name in sortedNoCase(reexports.keys()): item = reexports[item_name] self.out(item_name + " = " + item, 0) self._defined[item_name] = True self.out("", 0) # empty line after group # if vars_simple: prefix = "" # try to group variables by common prefix PREFIX_LEN = 2 # default prefix length if we can't guess better self.out("# Variables with simple values", 0) for item_name in sortedNoCase(vars_simple.keys()): item = vars_simple[item_name] # track the prefix if len(item_name) >= PREFIX_LEN: prefix_pos = string.rfind(item_name, "_") # most prefixes end in an underscore if prefix_pos < 1: prefix_pos = PREFIX_LEN beg = item_name[0:prefix_pos] if prefix != beg: self.out("", 0) # space out from other prefix prefix = beg else: prefix = "" # output replacement = self.REPLACE_MODULE_VALUES.get((p_name, item_name), None) if replacement is not None: self.out(item_name + " = " + replacement + " # real value of type "+ str(type(item)) + " replaced", 0); elif self.isSkippedInModule(p_name, item_name): self.out(item_name + " = None # real value of type "+ str(type(item)) + " skipped", 0) else: self.fmtValue(item, 0, prefix = item_name + " = " ) self._defined[item_name] = True self.out("", 0); # empty line after vars # if funcs: self.out("# functions", 0) self.out("", 0) for item_name in sortedNoCase(funcs.keys()): item = funcs[item_name] self.redoFunction(item, item_name, 0, p_modname=p_name) self._defined[item_name] = True self.out("", 0) # empty line after each item else: self.out("# no functions", 0) # if classes: self.out("# classes", 0) self.out("", 0) # sort classes so that inheritance order is preserved cls_list = [] # items are (class_name, mro_tuple) for cls_name in sortedNoCase(classes.keys()): cls = classes[cls_name] ins_index = len(cls_list) for i in range(ins_index): maybe_child_bases = cls_list[i][1] if cls in maybe_child_bases: ins_index = i # we could not go farther than current ins_index break # ...and need not go fartehr than first known child cls_list.insert(ins_index, (cls_name, getMRO(cls))) for item_name in [cls_item[0] for cls_item in cls_list]: item = classes[item_name] self.redoClass(item, item_name, 0, p_modname=p_name) self._defined[item_name] = True self.out("", 0) # empty line after each item else: self.out("# no classes", 0) # if vars_complex: self.out("# variables with complex values", 0) self.out("", 0) for item_name in sortedNoCase(vars_complex.keys()): item = vars_complex[item_name] replacement = self.REPLACE_MODULE_VALUES.get((p_name, item_name), None) if replacement is not None: self.out(item_name + " = " + replacement + " # real value of type "+ str(type(item)) + " replaced", 0); elif self.isSkippedInModule(p_name, item_name): self.out(item_name + " = None # real value of type "+ str(type(item)) + " skipped", 0); else: self.fmtValue(item, 0, prefix = item_name + " = " , as_name = item_name); self._defined[item_name] = True self.out("", 0) # empty line after each item
f29dc1cd78f0cd05c7976c9dc5ac5fd90bda3fa2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12157/f29dc1cd78f0cd05c7976c9dc5ac5fd90bda3fa2/generator3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24524, 12, 2890, 16, 293, 67, 529, 4672, 3536, 6320, 3485, 1605, 12312, 18, 657, 8140, 364, 6650, 17, 267, 4381, 471, 12493, 1552, 486, 1640, 1930, 6317, 18, 3536, 365, 18, 659, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24524, 12, 2890, 16, 293, 67, 529, 4672, 3536, 6320, 3485, 1605, 12312, 18, 657, 8140, 364, 6650, 17, 267, 4381, 471, 12493, 1552, 486, 1640, 1930, 6317, 18, 3536, 365, 18, 659, 2932, ...
sage: P5.homology()
The following computation can take a long time -- over half an hour -- with Sage's default computation of homology groups, but if you have CHomP installed, Sage will use that and the computation should only take a second or two. (You can download CHomP from http://chomp.rutgers.edu/, or you can install it as a Sage package using "sage -i chomp"). :: sage: P5.homology()
def RealProjectiveSpace(self, n): r""" A triangulation of `\Bold{R}P^n` for any `n \geq 0`.
48bcc4068d651cff86f439b3ba106c1b2aa53157 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/48bcc4068d651cff86f439b3ba106c1b2aa53157/examples.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15987, 4109, 688, 3819, 12, 2890, 16, 290, 4672, 436, 8395, 432, 6882, 539, 6234, 434, 1375, 64, 38, 1673, 95, 54, 97, 52, 66, 82, 68, 364, 1281, 1375, 82, 521, 908, 85, 374, 8338, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15987, 4109, 688, 3819, 12, 2890, 16, 290, 4672, 436, 8395, 432, 6882, 539, 6234, 434, 1375, 64, 38, 1673, 95, 54, 97, 52, 66, 82, 68, 364, 1281, 1375, 82, 521, 908, 85, 374, 8338, ...
if max_char != "" and max_char.isdigit() and \ int(max_char) < len(abstract_fr):
if max_chars != "" and max_chars.isdigit() and \ int(max_chars) < len(abstract_fr):
def format(bfo, prefix_en, prefix_fr, suffix_en, suffix_fr, limit, max_chars, extension_en="[...] ",extension_fr="[...] ", contextual="no", highlight='no', print_lang='en,fr'): """ Prints the abstract of a record in HTML. By default prints English and French versions. Printed languages can be chosen with the 'print_lang' parameter. @param prefix_en a prefix for english abstract (printed only if english abstract exists) @param prefix_fr a prefix for french abstract (printed only if french abstract exists) @param limit the maximum number of sentences of the abstract to display (for each language) @param max_chars the maximum number of chars of the abstract to display (for each language) @param extension_en a text printed after english abstracts longer than parameter 'limit' @param extension_fr a text printed after french abstracts longer than parameter 'limit' @param suffix_en a suffix for english abstract(printed only if english abstract exists) @param suffix_fr a suffix for french abstract(printed only if french abstract exists) @parmm contextual if 'yes' prints sentences the most relative to user search keyword (if limit < abstract) @param highlight if 'yes' highlights words from user search keyword @param print_lang the comma-separated list of languages to print. Now restricted to 'en' and 'fr' """ out = '' languages = print_lang.split(',') abstract_en = bfo.fields('520__a', escape=3) abstract_en.extend(bfo.fields('520__b', escape=3)) #abstract_en = [cgi.escape(val) for val in abstract_en] abstract_en = "<br/>".join(abstract_en) abstract_fr = bfo.fields('590__a', escape=3) abstract_fr.extend(bfo.fields('590__b', escape=3)) #abstract_fr = [cgi.escape(val) for val in abstract_fr] abstract_fr = "<br/>".join(abstract_fr) if contextual == 'yes' and limit != "" and \ limit.isdigit() and int(limit) > 0: context_en = bibformat_utils.get_contextual_content(abstract_en, bfo.search_pattern, max_lines=int(limit)) #FIXME add something like [...] before and after #contextual sentences when not at beginning/end of abstract #if not abstract_en.strip().startswith(context_en[0].strip()): # out += '[...]' abstract_en = "<br/>".join(context_en) context_fr = bibformat_utils.get_contextual_content(abstract_fr, bfo.search_pattern, max_lines=int(limit)) abstract_fr = "<br/>".join(context_fr) if len(abstract_en) > 0 and 'en' in languages: out += prefix_en print_extension = False if max_char != "" and max_char.isdigit() and \ int(max_char) < len(abstract_en): print_extension = True abstract_en = abstract_en[:int(max_char)] if limit != "" and limit.isdigit(): s_abstract = abstract_en.split(".") if int(limit) < len(s_abstract): print_extension = True s_abstract = s_abstract[:int(limit)] #for sentence in s_abstract: # out += sentence + "." out = '.'.join(s_abstract) # Add final dot if needed if abstract_en.endswith('.'): out += '.' if print_extension: out += " " + extension_en else: out += abstract_en out += suffix_en if len(abstract_fr) > 0 and 'fr' in languages: out += prefix_fr print_extension = False if max_char != "" and max_char.isdigit() and \ int(max_char) < len(abstract_fr): print_extension = True abstract_fr = abstract_fr[:int(max_char)] if limit != "" and limit.isdigit(): s_abstract = abstract_fr.split(".") if int(limit) < len(s_abstract): print_extension = True s_abstract = s_abstract[:int(limit)] #for sentence in s_abstract: # out += sentence + "." out = '.'.join(s_abstract) # Add final dot if needed if abstract_fr.endswith('.'): out += '.' if print_extension: out += " "+extension_fr else: out += abstract_fr out += suffix_fr if highlight == 'yes': out = bibformat_utils.highlight(out, bfo.search_pattern) return out
11026d93ba6cb8ecf3245185b16e78e0f67d5ca1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2763/11026d93ba6cb8ecf3245185b16e78e0f67d5ca1/bfe_abstract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 70, 617, 16, 1633, 67, 275, 16, 1633, 67, 4840, 16, 3758, 67, 275, 16, 3758, 67, 4840, 16, 1800, 16, 943, 67, 7549, 16, 2710, 67, 275, 1546, 63, 2777, 65, 3104, 6447, 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, 740, 12, 70, 617, 16, 1633, 67, 275, 16, 1633, 67, 4840, 16, 3758, 67, 275, 16, 3758, 67, 4840, 16, 1800, 16, 943, 67, 7549, 16, 2710, 67, 275, 1546, 63, 2777, 65, 3104, 6447, 67, ...
def trampoline(fd, read=None, write=None, timeout=None):
def trampoline(fd, read=False, write=False, timeout=None): """Suspend the current coroutine until the given socket object or file descriptor is ready to *read*, ready to *write*, or the specified *timeout* elapses, depending on arguments specified. To wait for *fd* to be ready to read, pass *read* ``=True``; ready to write, pass *write* ``=True``. To specify a timeout, pass the *timeout* argument in seconds. If the specified *timeout* elapses before the socket is ready to read or write, ``TimeoutError`` will be raised instead of ``trampoline()`` returning normally. """
def trampoline(fd, read=None, write=None, timeout=None): t = None hub = get_hub() self = greenlet.getcurrent() fileno = getattr(fd, 'fileno', lambda: fd)() def _do_close(fn): hub.remove_descriptor(fn) greenlib.switch(self, exc=socket.error(32, 'Broken pipe')) def _do_timeout(fn): hub.remove_descriptor(fn) greenlib.switch(self, exc=TimeoutError()) def cb(_fileno): if t is not None: t.cancel() hub.remove_descriptor(fileno) greenlib.switch(self, fd) if timeout is not None: t = hub.schedule_call(timeout, _do_timeout) hub.add_descriptor(fileno, read and cb, write and cb, _do_close) return hub.switch()
124e84e88ce31b3c12d0eb9eb3d6a099ef028bc8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/124e84e88ce31b3c12d0eb9eb3d6a099ef028bc8/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 433, 931, 15572, 12, 8313, 16, 855, 33, 8381, 16, 1045, 33, 8381, 16, 2021, 33, 7036, 4672, 3536, 55, 18815, 326, 783, 21857, 3180, 326, 864, 2987, 733, 578, 585, 4950, 353, 5695, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 433, 931, 15572, 12, 8313, 16, 855, 33, 8381, 16, 1045, 33, 8381, 16, 2021, 33, 7036, 4672, 3536, 55, 18815, 326, 783, 21857, 3180, 326, 864, 2987, 733, 578, 585, 4950, 353, 5695, 358,...
if False:
if __name__ == '__main__':
def makecrack(params): """Given a CrackParams object `param`, construct and return a new crack slab Atoms object.""" print_title('Initialisation') verbosity_push(params.io_verbosity) params.print_() print("Initialising classical potential with args " + params.classical_args.strip() + " from file " + xmlfilename) xmlfile.rewind() classicalpot = Potential(params.classical_args, xmlfile) classicalpot.print_() mpi_glob = MPI_context() print('Initialising potential') simple = Potential('Simple', classicalpot, mpi_obj=mpi_glob) simple.print_() crack_slab, width, height, E, v, v2, bulk = crack_make_slab(params, classicalpot, simple) # Save bulk cube (used for qm_rescale_r parameter in crack code) bulk.write(stem+'_bulk.xyz') crack_slab.params['OrigWidth'] = width crack_slab.params['OrigHeight'] = height crack_slab.params['YoungsModulus'] = E crack_slab.params['PoissonRatio_yx'] = v crack_slab.params['PoissonRatio_yz'] = v2 # Open surfaces, remain periodic in z direction (normal to plane) # and optionally also in x direction if crack_double_ended is true if not params.crack_double_ended: crack_slab.lattice[1,1] = crack_slab.lattice[1,1] + params.crack_vacuum_size crack_slab.lattice[2,2] = crack_slab.lattice[2,2] + params.crack_vacuum_size crack_slab.set_lattice(crack_slab.lattice, False) # 3D crack with free surfaces at z = +/- depth/2 if params.crack_free_surfaces: crack_slab.lattice[3,3] = crack_slab.lattice[3,3] + params.crack_vacuum_size crack_slab.set_lattice(crack_slab.lattice, False) # Add various properties to crack_slab crack_slab.add_property('hybrid', 0) crack_slab.add_property('hybrid_mark', HYBRID_NO_MARK) crack_slab.add_property('changed_nn', 0) crack_slab.add_property('move_mask', 0) crack_slab.add_property('nn', 0) crack_slab.add_property('old_nn', 0) crack_slab.add_property('md_old_changed_nn', 0) crack_slab.add_property('edge_mask', 0) print_title('Fixing Atoms') # Fix top and bottom edges - anything within crack_edge_fix_tol of ymax or ymin is fixed miny, maxy = crack_slab.pos[2,:].min(), crack_slab.pos[2,:].max() crack_slab.move_mask[:] = 1 crack_slab.move_mask[logical_or(abs(crack_slab.pos[2,:]-maxy) < params.crack_edge_fix_tol, abs(crack_slab.pos[2,:]-miny) < params.crack_edge_fix_tol)] = 0 print('%d atoms. %d fixed atoms' % (crack_slab.n, crack_slab.n - crack_slab.move_mask.count())) print_title('Setting edge mask') crack_setup_marks(crack_slab, params) crack_slab.edge_mask[:] = 0 minx, maxx = crack_slab.pos[1,:].min(), crack_slab.pos[1,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[1,:]-minx) < params.selection_edge_tol, abs(crack_slab.pos[1,:]-maxx) < params.selection_edge_tol)] = 1 miny, maxy = crack_slab.pos[2,:].min(), crack_slab.pos[2,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[2:1]-miny) < params.selection_edge_tol, abs(crack_slab.pos[2,:]-maxy) < params.selection_edge_tol)] = 1 if params.crack_free_surfaces: # Open surfaces at +/- z minz, maxz = crack_slab.pos[3,:].min(), crack_slab.pos[3,:].max() crack_slab.edge_mask[logical_or(abs(crack_slab.pos[3,:]-minz) < params.selection_edge_tol, abs(crack_slab.pos[3,:]-maxz) < params.selection_edge_tol)] = 1 #crack_make_seed(crack_slab, params) if (params.crack_apply_initial_load): crack_calc_load_field(crack_slab, params, classicalpot, simple, params.crack_loading, overwrite_pos=True, mpi=mpi_glob) if (not params.simulation_classical): crack_update_selection(crack_slab, params) return crack_slab
02a92f9d6158f955d81c62ae252f86fd86d7cb2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8914/02a92f9d6158f955d81c62ae252f86fd86d7cb2a/makecrack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 557, 21580, 12, 2010, 4672, 3536, 6083, 279, 385, 21580, 1370, 733, 1375, 891, 9191, 4872, 471, 327, 279, 394, 276, 21580, 27679, 7149, 87, 733, 12123, 225, 1172, 67, 2649, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29796, 557, 21580, 12, 2010, 4672, 3536, 6083, 279, 385, 21580, 1370, 733, 1375, 891, 9191, 4872, 471, 327, 279, 394, 276, 21580, 27679, 7149, 87, 733, 12123, 225, 1172, 67, 2649, 2668, ...
def rehash(self, signal=0, stack=0):
def onREHASH(self, signal=0, stack=0):
def rehash(self, signal=0, stack=0): self.env.reload()
5e0797288ce80ec439c29b038de52bd516501a6b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3020/5e0797288ce80ec439c29b038de52bd516501a6b/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 862, 15920, 12, 2890, 16, 4277, 33, 20, 16, 2110, 33, 20, 4672, 365, 18, 3074, 18, 17517, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 862, 15920, 12, 2890, 16, 4277, 33, 20, 16, 2110, 33, 20, 4672, 365, 18, 3074, 18, 17517, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
A -- a quaternion algebra basis -- list of 4 integral quaternions in A check -- whether to do type and other consistency checks
- ``A`` - a quaternion algebra - ``basis`` - list of 4 integral quaternions in ``A`` - ``check`` - whether to do type and other consistency checks
def __init__(self, A, basis, check=True): """ INPUT: A -- a quaternion algebra basis -- list of 4 integral quaternions in A check -- whether to do type and other consistency checks
1ec65dfa0c3aab294b8ecca3f5f5493e154b7172 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/1ec65dfa0c3aab294b8ecca3f5f5493e154b7172/quaternion_algebra.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 432, 16, 10853, 16, 866, 33, 5510, 4672, 3536, 12943, 30, 432, 1493, 279, 26774, 524, 29087, 10853, 1493, 666, 434, 1059, 21423, 719, 15827, 1115, 316, 432...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 432, 16, 10853, 16, 866, 33, 5510, 4672, 3536, 12943, 30, 432, 1493, 279, 26774, 524, 29087, 10853, 1493, 666, 434, 1059, 21423, 719, 15827, 1115, 316, 432...
local_y += fpx + fpa
if acodecs.index(a) < len(acodecs) - 1: local_y += fpx + fpa else: local_y += fpx + fpl
def get_s(x, y, fpx, c, th=False): style = "" if th: style = " font-weight: bold;" s = '\n<text x="%s" y="%s" style="font-size: %spx;%s">' %\ (x, y, fpx, style) s += '\n%s' % c s += '\n</text>' return s
72d128ccf7caa656104c3452e4d76a1f23b67fdc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1470/72d128ccf7caa656104c3452e4d76a1f23b67fdc/codec_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 87, 12, 92, 16, 677, 16, 4253, 92, 16, 276, 16, 286, 33, 8381, 4672, 2154, 273, 1408, 309, 286, 30, 2154, 273, 315, 3512, 17, 4865, 30, 13068, 4868, 272, 273, 2337, 82, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 87, 12, 92, 16, 677, 16, 4253, 92, 16, 276, 16, 286, 33, 8381, 4672, 2154, 273, 1408, 309, 286, 30, 2154, 273, 315, 3512, 17, 4865, 30, 13068, 4868, 272, 273, 2337, 82, 32...
self.equithick = 1
self.equithick = 0
def __init__( self, standard=None, atoms=(), package=None, molecule=None, type='n', order=1, simple_double=1): # initiation self.molecule = molecule oasa.bond.__init__( self, order=order, vs=atoms, type=type) meta_enabled.__init__( self, standard=standard) line_colored.__init__( self) drawable.__init__( self) with_line.__init__( self) # self.type = type self.order = order self.item = None self.second = [] self.third = [] self.items = [] if atoms: self.atom1, self.atom2 = atoms self.selector = None
c4d65b64aa4b3ddc8d32689d66ba017c8c9afd7b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4298/c4d65b64aa4b3ddc8d32689d66ba017c8c9afd7b/bond.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 4529, 33, 7036, 16, 9006, 33, 9334, 2181, 33, 7036, 16, 13661, 33, 7036, 16, 618, 2218, 82, 2187, 1353, 33, 21, 16, 4143, 67, 9056, 33, 21, 4672, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 4529, 33, 7036, 16, 9006, 33, 9334, 2181, 33, 7036, 16, 13661, 33, 7036, 16, 618, 2218, 82, 2187, 1353, 33, 21, 16, 4143, 67, 9056, 33, 21, 4672, 468, ...
if self.debuglevel > 0: print>>stderr, 'connect fail:', (host, port)
if self.debuglevel > 0: print>>stderr, 'connect fail:', msg
def connect(self, host='localhost', port = 0): """Connect to a host on a given port.
0cd3a75894292133243101353289d4840ce1da36 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0cd3a75894292133243101353289d4840ce1da36/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 12, 2890, 16, 1479, 2218, 13014, 2187, 1756, 273, 374, 4672, 3536, 5215, 358, 279, 1479, 603, 279, 864, 1756, 18, 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, 3077, 12, 2890, 16, 1479, 2218, 13014, 2187, 1756, 273, 374, 4672, 3536, 5215, 358, 279, 1479, 603, 279, 864, 1756, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.assertEqual(string, expected[i][1])
self.assertEqual(string.replace('\\','/'), expected[i][1])
def save_load(self, format, use_setuptools=False): """ Save to egg using `format` and reload. Writes egg natively or via setuptools. """ global SOURCE_INIT, SINK_INIT
e498cceb6e5fda0390dc0dbf54225f3ef3e6966c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12610/e498cceb6e5fda0390dc0dbf54225f3ef3e6966c/test_egg_save.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 67, 945, 12, 2890, 16, 740, 16, 999, 67, 542, 30693, 33, 8381, 4672, 3536, 7074, 358, 25144, 1450, 1375, 2139, 68, 471, 7749, 18, 30053, 25144, 10535, 4492, 578, 3970, 444, 30693, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1923, 67, 945, 12, 2890, 16, 740, 16, 999, 67, 542, 30693, 33, 8381, 4672, 3536, 7074, 358, 25144, 1450, 1375, 2139, 68, 471, 7749, 18, 30053, 25144, 10535, 4492, 578, 3970, 444, 30693, ...
(12,'Unclosed ',"[('section_id','=',"+str(section.id)+"),('state','<>','cancel'), ('state','<>','close')]", 8),
(12,'Unclosed ',"[('section_id','=',"+str(section.id)+"),('state','<>','cancel'), ('state','<>','done')]", 8),
def menu_create(self, cr, uid, ids, name, menu_parent_id=False, context={}): menus = {} menus[-1] = menu_parent_id for section in self.browse(cr, uid, ids, context): for (index, mname, mdomain, latest) in [ (0,'',"[('section_id','=',"+str(section.id)+")]", -1), (1,'My ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid)]", 0), (2,'My Unclosed ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','<>','cancel'), ('state','<>','close')]", 1), (5,'My Open ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','open')]", 2), (6,'My Pending ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','pending')]", 2), (7,'My Draft ',"[('section_id','=',"+str(section.id)+"),('user_id','=',uid), ('state','=','draft')]", 2),
b5602d7223bf3569d6a97d61570919ee3a0ea59b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/b5602d7223bf3569d6a97d61570919ee3a0ea59b/crm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3824, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 3824, 67, 2938, 67, 350, 33, 8381, 16, 819, 12938, 4672, 21374, 273, 2618, 21374, 18919, 21, 65, 273, 3824, 67, 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, 3824, 67, 2640, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 3824, 67, 2938, 67, 350, 33, 8381, 16, 819, 12938, 4672, 21374, 273, 2618, 21374, 18919, 21, 65, 273, 3824, 67, 2...
xmlrpc_dispatchter = PingbackXMLRPCDispatcher()
xmlrpc_dispatcher = PingbackXMLRPCDispatcher()
def handle_pingback_ping(self, source, target, request=None): """ Handles a Pingback (called via XML-RPC), receives the following parameters: ``source``: the remote url pinging us ``target``: our url which is pinged. Before saving the Pingback as a ``Trackback``-Object, the correct object is determined from the ``target``-url The big problem with pingbacks is to determine the target_object for which we receive an pingback because we only get the url on our site. If there a multiple objects on the page it's impossible. Also if there is only one object at the given url it may be impossible to figure which object it is only given the url. Below we first check if it is possible to figure out the object from the kwargs of the view function (which works at least for django's generic views). If this doesn't work we have to use a user-supplied callback function (TODO). """ if request is None: raise Fault(faultCode=PINGBACK_UPSTREAM_ERROR, faultString='PINGBACK_UPSTREAM_ERROR') obj = None for resolver in registry.resolvers: try: obj = resolver(target) if obj is not None: break except: pass #if not content_object is found raise an exception if obj is None: #raise Fault(faultCode=PINGBACK_TARGET_CANNOT_BE_USED, faultString='PINGBACK_TARGET_CANNOT_BE_USED') raise Fault(faultCode=PINGBACK_TARGET_DOES_NOT_EXIST, faultString='PINGBACK_TARGET_DOES_NOT_EXIST')
b69a7324a3736d5874dd1f178397c37c2cabc714 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11383/b69a7324a3736d5874dd1f178397c37c2cabc714/pingback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1382, 823, 67, 1382, 12, 2890, 16, 1084, 16, 1018, 16, 590, 33, 7036, 4672, 3536, 27020, 279, 18214, 823, 261, 11777, 3970, 3167, 17, 8087, 3631, 17024, 326, 3751, 1472, 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, 1640, 67, 1382, 823, 67, 1382, 12, 2890, 16, 1084, 16, 1018, 16, 590, 33, 7036, 4672, 3536, 27020, 279, 18214, 823, 261, 11777, 3970, 3167, 17, 8087, 3631, 17024, 326, 3751, 1472, 30, ...
self.selenium.type_keys('id=autocomplete-query', ' ')
self.selenium.click('//input[@value="Search"]')
def check_result(user): "Check if the user is alone in the result list" #Also check if the the results are right assert self.selenium.get_text(\ '//div[@class="datatable"]/table/tbody/tr[last()]/td[2]') ==\ user
061149c0cfaeafc563ea7bb09c9adbf701d497b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/061149c0cfaeafc563ea7bb09c9adbf701d497b2/test_user_management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2088, 12, 1355, 4672, 315, 1564, 309, 326, 729, 353, 24068, 316, 326, 563, 666, 6, 468, 1067, 2048, 866, 309, 326, 326, 1686, 854, 2145, 1815, 365, 18, 1786, 17327, 18, 588, ...
filename = keepnote.ensure_unicode(filename, keepnote.FS_ENCODING)
def load(self, filename=None): """Load the NoteBook from the file-system"""
b1c46372eb0958ba9fd26ac12acf4d74665c2005 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4738/b1c46372eb0958ba9fd26ac12acf4d74665c2005/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 1544, 33, 7036, 4672, 3536, 2563, 326, 3609, 9084, 628, 326, 585, 17, 4299, 8395, 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, 1262, 12, 2890, 16, 1544, 33, 7036, 4672, 3536, 2563, 326, 3609, 9084, 628, 326, 585, 17, 4299, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.skip(2*2)
self.skip(4)
def extractInfo(self, charInfo=1): """Extract typographic information from the loaded font file.
777650c46535c7f8d8c273db3ebb732aec256c29 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/777650c46535c7f8d8c273db3ebb732aec256c29/ttfonts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 966, 12, 2890, 16, 1149, 966, 33, 21, 4672, 3536, 4976, 3815, 16983, 1779, 628, 326, 4203, 3512, 585, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 966, 12, 2890, 16, 1149, 966, 33, 21, 4672, 3536, 4976, 3815, 16983, 1779, 628, 326, 4203, 3512, 585, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def debugancestor(ui, *args):
def debugancestor(ui, repo, *args):
def debugancestor(ui, *args): """find the ancestor revision of two revisions in a given index""" if len(args) == 3: index, rev1, rev2 = args r = revlog.revlog(util.opener(os.getcwd(), audit=False), index) elif len(args) == 2: rev1, rev2 = args repo = hg.repository(ui) r = repo.changelog else: raise util.Abort(_('either two or three arguments required')) a = r.ancestor(r.lookup(rev1), r.lookup(rev2)) ui.write("%d:%s\n" % (r.rev(a), hex(a)))
35008269c779e5409d57b31f9a77daa4c5e820ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/35008269c779e5409d57b31f9a77daa4c5e820ce/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 28798, 12, 4881, 16, 3538, 16, 380, 1968, 4672, 3536, 4720, 326, 9731, 6350, 434, 2795, 18325, 316, 279, 864, 770, 8395, 309, 562, 12, 1968, 13, 422, 890, 30, 770, 16, 5588, 21, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 28798, 12, 4881, 16, 3538, 16, 380, 1968, 4672, 3536, 4720, 326, 9731, 6350, 434, 2795, 18325, 316, 279, 864, 770, 8395, 309, 562, 12, 1968, 13, 422, 890, 30, 770, 16, 5588, 21, ...
for (k, v) in self.groups.iteritems():
for (k, v) in self.commands['group'].iteritems():
def generateFunction(self): """ generate documentation for a function """ docline = list() docline.append("== %s ==" % (self.name)) docline.append("=== Description ===") docline.extend(self.desc) docline.append("")
58e5719f8c1d5d076eb3b9af15ecc71594baba83 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13121/58e5719f8c1d5d076eb3b9af15ecc71594baba83/generate_doc_from_cmake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2083, 12, 2890, 4672, 3536, 2103, 7323, 364, 279, 445, 3536, 997, 1369, 273, 666, 1435, 997, 1369, 18, 6923, 2932, 631, 738, 87, 422, 6, 738, 261, 2890, 18, 529, 3719, 997, 1369,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 2083, 12, 2890, 4672, 3536, 2103, 7323, 364, 279, 445, 3536, 997, 1369, 273, 666, 1435, 997, 1369, 18, 6923, 2932, 631, 738, 87, 422, 6, 738, 261, 2890, 18, 529, 3719, 997, 1369,...
return self._blob.data
return self._blob.data_stream.read()
def text(self): return self._blob.data
6dd3f30cfab3eff24e4737478bce74242ed9d2ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/6dd3f30cfab3eff24e4737478bce74242ed9d2ae/git_repo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 12, 2890, 4672, 327, 365, 6315, 10721, 18, 892, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 977, 12, 2890, 4672, 327, 365, 6315, 10721, 18, 892, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
message.feed_id, current_display.feed_id)
message.id, current_display.id)
def handle_items_changed(self, message): current_display = app.display_manager.current_display if isinstance(current_display, displays.ItemListDisplay): if current_display.view.should_handle_message(message): current_display.view.handle_items_changed(message) else: logging.warn("wrong id for feed view (%s feed view: %s)", message.feed_id, current_display.feed_id) else: logging.warn("got item list, but display is: %s", current_display)
d58a6183605f3335e0a588e5357d1ca92ed1b210 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/d58a6183605f3335e0a588e5357d1ca92ed1b210/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3319, 67, 6703, 12, 2890, 16, 883, 4672, 783, 67, 5417, 273, 595, 18, 5417, 67, 4181, 18, 2972, 67, 5417, 309, 1549, 12, 2972, 67, 5417, 16, 22461, 18, 1180, 682, 4236, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 3319, 67, 6703, 12, 2890, 16, 883, 4672, 783, 67, 5417, 273, 595, 18, 5417, 67, 4181, 18, 2972, 67, 5417, 309, 1549, 12, 2972, 67, 5417, 16, 22461, 18, 1180, 682, 4236, 467...
planning.id::varchar(32) || '-' || '0' AS id,
(1000*(planning.id) - 1)::integer AS id,
def init(self, cr): cr.execute(""" CREATE OR REPLACE VIEW report_account_analytic_planning_user AS ( SELECT planning.id AS planning_id, planning.id::varchar(32) || '-' || COALESCE(users.id,0)::varchar(32) AS id, planning.business_days, users.id AS user_id, (SELECT sum(line1.amount_in_base_uom) FROM report_account_analytic_planning_line line1 WHERE ( SELECT COUNT(1) FROM project_task task WHERE task.planning_line_id = line1.id ) > 0 AND line1.user_id = users.id AND line1.planning_id = planning.id )AS plan_tasks, (SELECT SUM(line1.amount_in_base_uom) FROM report_account_analytic_planning_line line1 WHERE ( SELECT COUNT(1) FROM project_task task WHERE task.planning_line_id = line1.id ) = 0 AND line1.user_id = users.id AND line1.planning_id = planning.id ) AS plan_open, (SELECT -(SUM(holidays.number_of_days)) FROM hr_holidays holidays WHERE holidays.employee_id IN ( SELECT emp.id FROM hr_employee emp, resource_resource res WHERE emp.resource_id = res.id and res.user_id = users.id ) AND holidays.state IN ('validate') AND holidays.type = 'remove' AND holidays.date_from >= planning.date_from AND holidays.date_to <= planning.date_to ) AS holiday
60321a3fe5d8347efa6b894dd4048f0bb1b0bbf1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/60321a3fe5d8347efa6b894dd4048f0bb1b0bbf1/project_planning.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 13278, 4869, 23679, 21794, 2605, 67, 4631, 67, 304, 7834, 335, 67, 412, 10903, 67, 1355, 5355, 261, 9111, 886, 10903, 18, 350,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 13278, 4869, 23679, 21794, 2605, 67, 4631, 67, 304, 7834, 335, 67, 412, 10903, 67, 1355, 5355, 261, 9111, 886, 10903, 18, 350,...
if self.props.current_activity == actid: self.set_properties({_PROP_CURACT: None})
def remove_activity(self, activity): """Remove the activity from the Buddy's set of activities
896fc422151107954ac7259d892e152bc912b05f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/896fc422151107954ac7259d892e152bc912b05f/buddy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 9653, 12, 2890, 16, 5728, 4672, 3536, 3288, 326, 5728, 628, 326, 605, 29017, 1807, 444, 434, 17259, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 9653, 12, 2890, 16, 5728, 4672, 3536, 3288, 326, 5728, 628, 326, 605, 29017, 1807, 444, 434, 17259, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
pathIdListPattern = ",".join(( '?' ) * len(pathIdList)) cu = self.db.cursor() cu.execute("UPDATE DBTroveFiles SET isPresent=%d WHERE " "instanceId=%d AND pathId in (%s)" % (isPresent, instanceId, pathIdListPattern), pathIdList)
chunkSize = 990 plen = len(pathIdList) cu = self.db.cursor() i = 0 while i < plen: clen = min(chunkSize, plen - i) bvals = [ isPresent, instanceId ] + pathIdList[i : i + clen] bparams = ','.join('?' * clen) cu.execute("UPDATE DBTroveFiles " "SET isPresent=? " "WHERE instanceId=? AND pathId in (%s)" % bparams, bvals) i += clen
def _updatePathIdsPresent(self, instanceId, pathIdList, isPresent): pathIdListPattern = ",".join(( '?' ) * len(pathIdList)) cu = self.db.cursor()
c10faa1aed3da17e22b149faf015527d272e1313 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/c10faa1aed3da17e22b149faf015527d272e1313/sqldb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 743, 2673, 6351, 12, 2890, 16, 17608, 16, 589, 22117, 16, 12469, 4672, 589, 22117, 3234, 273, 5753, 18, 5701, 12443, 6787, 262, 380, 562, 12, 803, 22117, 3719, 15985, 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, 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, 2725, 743, 2673, 6351, 12, 2890, 16, 17608, 16, 589, 22117, 16, 12469, 4672, 589, 22117, 3234, 273, 5753, 18, 5701, 12443, 6787, 262, 380, 562, 12, 803, 22117, 3719, 15985, 273, 365...
self._toLang = self.dictLang.get(string.capitalize(l), self._toLang)
self._toLang = self.dictLang.get(string.capitalize(l), self._toLang)
def toLang(self, l = None): '''Get or set target language''' if l is not None: if l == 'auto': return False ## Check character code if l in self.dictLang.values(): self._toLang = l else: ## Check language name self._toLang = self.dictLang.get(string.capitalize(l), self._toLang) return self._toLang
882d67c8fe0f86c4b7052562c51b41df492db552 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9947/882d67c8fe0f86c4b7052562c51b41df492db552/traduisons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 7275, 12, 2890, 16, 328, 273, 599, 4672, 9163, 967, 578, 444, 1018, 2653, 26418, 309, 328, 353, 486, 599, 30, 309, 328, 422, 296, 6079, 4278, 327, 1083, 7541, 2073, 3351, 981, 309...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 7275, 12, 2890, 16, 328, 273, 599, 4672, 9163, 967, 578, 444, 1018, 2653, 26418, 309, 328, 353, 486, 599, 30, 309, 328, 422, 296, 6079, 4278, 327, 1083, 7541, 2073, 3351, 981, 309...
stmt = reindent(stmt, 8) setup = reindent(setup, 4) src = template % {'stmt': stmt, 'setup': setup} self.src = src code = compile(src, dummy_src_name, "exec")
def __init__(self, stmt="pass", setup="pass", timer=default_timer): """Constructor. See class doc string.""" self.timer = timer stmt = reindent(stmt, 8) setup = reindent(setup, 4) src = template % {'stmt': stmt, 'setup': setup} self.src = src # Save for traceback display code = compile(src, dummy_src_name, "exec") ns = {} exec code in globals(), ns self.inner = ns["inner"]
8b06dec4641dfcc99de5785340f892f476fae3bd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/8b06dec4641dfcc99de5785340f892f476fae3bd/timeit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3480, 1546, 5466, 3113, 3875, 1546, 5466, 3113, 5441, 33, 1886, 67, 12542, 4672, 3536, 6293, 18, 225, 2164, 667, 997, 533, 12123, 365, 18, 12542, 273, 5441...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3480, 1546, 5466, 3113, 3875, 1546, 5466, 3113, 5441, 33, 1886, 67, 12542, 4672, 3536, 6293, 18, 225, 2164, 667, 997, 533, 12123, 365, 18, 12542, 273, 5441...
if len(toreturn) == 0: return None else: return toreturn
return toreturn
def get_paths_for_node(self, node): """ Return a list of paths for a given node Return None if no path for that Node. """ toreturn = [] if node: tid = node.get_id() #For that node, we should convert the base_path to path if not node or not self.is_displayed(node.get_id()): #print "not displayed %s" %node return None #This is the cache so we don't compute it all the time #TODO: this is commented out as it still doesn't work with filter
54f636d25ce1c97dcc674436cac5d6b800315309 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8234/54f636d25ce1c97dcc674436cac5d6b800315309/filteredtree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4481, 67, 1884, 67, 2159, 12, 2890, 16, 756, 4672, 3536, 2000, 279, 666, 434, 2953, 364, 279, 864, 756, 2000, 599, 309, 1158, 589, 364, 716, 2029, 18, 3536, 358, 2463, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4481, 67, 1884, 67, 2159, 12, 2890, 16, 756, 4672, 3536, 2000, 279, 666, 434, 2953, 364, 279, 864, 756, 2000, 599, 309, 1158, 589, 364, 716, 2029, 18, 3536, 358, 2463, 273, ...
'SUM((COALESCE(l.debit, 0) - COALESCE(l.credit, 0))), ' \ 'a.company ' \
'SUM((COALESCE(l.debit, 0) - COALESCE(l.credit, 0))) ' \
def get_balance(self, cursor, user, ids, name, arg, context=None): res = {} company_obj = self.pool.get('company.company') currency_obj = self.pool.get('account.currency') move_line_obj = self.pool.get('account.move.line')
25065d86d8fded3ac7e7d4396f22f85404ac80f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/25065d86d8fded3ac7e7d4396f22f85404ac80f4/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12296, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12296, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 9395, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 16840, 18, 16840...
rcr reg, reg, imm
rcri reg, reg, imm
def macroop RCR_R_I
114a82fa822a0123ec295fa2299d0b3189b7ba42 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7385/114a82fa822a0123ec295fa2299d0b3189b7ba42/rotate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 534, 5093, 67, 54, 67, 45, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 534, 5093, 67, 54, 67, 45, 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, ...
print "_generate_object_xml>>>",rec,recv,doc
def _generate_object_xml(self, cr, uid, rec, recv, doc, result=None): print "_generate_object_xml>>>",rec,recv,doc record_list = [] noupdate = False if rec[4]=='write': for id in rec[5]: id,update = self._get_id(cr, uid, rec[3], id) noupdate = noupdate or update if not id: continue record,update = self._create_record(cr, uid, doc, rec[3], rec[6], id) noupdate = noupdate or update record_list += record elif rec[4]=='create': id = self._create_id(cr, uid, rec[3],rec[5]) record,noupdate = self._create_record(cr, uid, doc, rec[3], rec[5], id) self.ids[(rec[3],result)] = id record_list += record return record_list,noupdate
86dbc91231b51093fd5ba58d5c30d3acfe783579 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/86dbc91231b51093fd5ba58d5c30d3acfe783579/base_module_record.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 1612, 67, 2902, 12, 2890, 16, 4422, 16, 4555, 16, 1950, 16, 10665, 16, 997, 16, 563, 33, 7036, 4672, 1409, 67, 1098, 273, 5378, 1158, 2725, 273, 1083, 309, 1950, 63, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 1612, 67, 2902, 12, 2890, 16, 4422, 16, 4555, 16, 1950, 16, 10665, 16, 997, 16, 563, 33, 7036, 4672, 1409, 67, 1098, 273, 5378, 1158, 2725, 273, 1083, 309, 1950, 63, 2...
self.assertNotIn('hi hi', req.transport.getvalue())
self.assertEquals(-1, req.transport.getvalue().find('hi hi'))
def testImplicitHead(self): req = self._getReq() req.requestReceived('HEAD', '/newrender', 'HTTP/1.0') self.assertEquals(req.code, 200) self.assertNotIn('hi hi', req.transport.getvalue())
63fbfa7e0ce2f8d02d7a980e4f38345ccfaf4e38 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/63fbfa7e0ce2f8d02d7a980e4f38345ccfaf4e38/test_web.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 15787, 1414, 12, 2890, 4672, 1111, 273, 365, 6315, 588, 6113, 1435, 1111, 18, 2293, 8872, 2668, 12458, 2187, 1173, 2704, 5902, 2187, 296, 3693, 19, 21, 18, 20, 6134, 365, 18, 11231...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15787, 1414, 12, 2890, 4672, 1111, 273, 365, 6315, 588, 6113, 1435, 1111, 18, 2293, 8872, 2668, 12458, 2187, 1173, 2704, 5902, 2187, 296, 3693, 19, 21, 18, 20, 6134, 365, 18, 11231...
name = current_thread().get_name()
name = current_thread().name
def _readerThread(self, d, readerNum): time.sleep(0.01 * readerNum + 0.05) name = current_thread().get_name()
0e7a6b5193b00a984d9ddb5b6e63172b987fbc4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/0e7a6b5193b00a984d9ddb5b6e63172b987fbc4f/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10530, 3830, 12, 2890, 16, 302, 16, 2949, 2578, 4672, 813, 18, 19607, 12, 20, 18, 1611, 380, 2949, 2578, 397, 374, 18, 6260, 13, 508, 273, 783, 67, 5930, 7675, 588, 67, 529, 143...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 10530, 3830, 12, 2890, 16, 302, 16, 2949, 2578, 4672, 813, 18, 19607, 12, 20, 18, 1611, 380, 2949, 2578, 397, 374, 18, 6260, 13, 508, 273, 783, 67, 5930, 7675, 588, 67, 529, 143...
working_dir=self.basedir)
working_dir=self.basedir, branch=self.repository.module)
def _applyChangeset(self, changeset): cmd = self.repository.command("update", "--revision", changeset.revision) mtl = ExternalCommand(cwd=self.basedir, command=cmd) mtl.execute() if mtl.exit_status: raise ChangesetApplicationFailure("'mtn update' returned " "status %s" % mtl.exit_status) mtr = MonotoneRevToCset(repository=self.repository, working_dir=self.basedir) mtr.updateCset( changeset )
99161ee430dbc4a866be3eb80981544ead94434b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5981/99161ee430dbc4a866be3eb80981544ead94434b/monotone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9010, 29743, 12, 2890, 16, 22463, 4672, 1797, 273, 365, 18, 9071, 18, 3076, 2932, 2725, 3113, 5238, 13057, 3113, 22463, 18, 13057, 13, 5874, 80, 273, 11352, 2189, 12, 11089, 33, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9010, 29743, 12, 2890, 16, 22463, 4672, 1797, 273, 365, 18, 9071, 18, 3076, 2932, 2725, 3113, 5238, 13057, 3113, 22463, 18, 13057, 13, 5874, 80, 273, 11352, 2189, 12, 11089, 33, 289...
downloadBaseURL, product, platform):
downloadBaseURL, product, platform, branch):
def generateSnippet(abstDistDir, applicationIniFile, locale, downloadBaseURL, product, platform): # Let's extract information from application.ini c = ConfigParser() try: c.readfp(open(applicationIniFile)) except IOError, (stderror): sys.exit(stderror) buildid = c.get("App", "BuildID") appVersion = c.get("App", "Version") branchName = c.get("App", "SourceRepository").split('/')[-1] marFileName = '%s-%s.%s.%s.complete.mar' % ( product, appVersion, locale, platform) # Let's determine the hash and the size of the MAR file # This function exits the script if the file does not exist (completeMarHash, completeMarSize) = getFileHashAndSize( os.path.join(abstDistDir, marFileName)) # Construct the URL to where the MAR file will exist interfix = '' if locale == 'en-US': interfix = '' else: interfix = '-l10n' marDownloadURL = "%s/%s%s/%s" % (downloadBaseURL, datedDirPath(buildid, branchName), interfix, marFileName) snippet = """complete
08f789e67e62fd0347f5b1e5fd963be84d712128 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/08f789e67e62fd0347f5b1e5fd963be84d712128/generatesnippet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 19614, 12, 378, 334, 5133, 1621, 16, 2521, 22129, 812, 16, 2573, 16, 4224, 29064, 16, 3017, 16, 4072, 16, 3803, 4672, 468, 10559, 1807, 2608, 1779, 628, 2521, 18, 8767, 276, 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, 2103, 19614, 12, 378, 334, 5133, 1621, 16, 2521, 22129, 812, 16, 2573, 16, 4224, 29064, 16, 3017, 16, 4072, 16, 3803, 4672, 468, 10559, 1807, 2608, 1779, 628, 2521, 18, 8767, 276, 273, ...
return u'%s%s%s' % (item['section'].label, item['term'].first, item['section'].__name__)
section = removeSecurityProxy(item['section']) term = removeSecurityProxy(item['term']) return u'%s%s%s' % (section.label, term.first, section.__name__)
def sortKey(item): return u'%s%s%s' % (item['section'].label, item['term'].first, item['section'].__name__)
7c68b47228c3580a29d27197a43c9e0853de5c01 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7127/7c68b47228c3580a29d27197a43c9e0853de5c01/course.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1524, 653, 12, 1726, 4672, 327, 582, 11, 9, 87, 9, 87, 9, 87, 11, 738, 261, 1726, 3292, 3464, 29489, 1925, 16, 761, 3292, 6408, 29489, 3645, 16, 761, 3292, 3464, 3546, 16186, 529, 97...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1524, 653, 12, 1726, 4672, 327, 582, 11, 9, 87, 9, 87, 9, 87, 11, 738, 261, 1726, 3292, 3464, 29489, 1925, 16, 761, 3292, 6408, 29489, 3645, 16, 761, 3292, 3464, 3546, 16186, 529, 97...
self.currentBaselineDNA=None
self.levelEditor.replaceSelectedEnabled=0
def setSignBaselineStyle(self, val): baseline=self.currentBaselineDNA if baseline: settings={} if val == '<custom>': return elif val == 'Zero': self.currentBaselineDNA=None # Don't set string: self.baselineString.set('') self.addCurveFloater.set(0) self.addKernFloater.set(0) self.addWiggleFloater.set(0) self.addStumbleFloater.set(0) self.addStompFloater.set(0) self.bigFirstLetterIntVar.set(0) self.allCapsIntVar.set(0) self.dropShadowIntVar.set(0) self.currentBaselineDNA=baseline
104abb3e447b6977f90282142bc85b0ae7801add /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/104abb3e447b6977f90282142bc85b0ae7801add/LevelEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2766, 16635, 2885, 12, 2890, 16, 1244, 4672, 14243, 33, 2890, 18, 2972, 16635, 8609, 37, 309, 14243, 30, 1947, 12938, 309, 1244, 422, 2368, 3662, 1870, 30, 327, 1327, 1244, 422, 296...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2766, 16635, 2885, 12, 2890, 16, 1244, 4672, 14243, 33, 2890, 18, 2972, 16635, 8609, 37, 309, 14243, 30, 1947, 12938, 309, 1244, 422, 2368, 3662, 1870, 30, 327, 1327, 1244, 422, 296...
[1, -0.500000000000000? + 0.866025403784439?*I, -0.500000000000000? - 0.866025403784439?*I]
[1, -0.5000000000... + 0.8660254037...*I, -0.5000000000... - 0.8660254037...*I]
def spectrum(self, laplacian=False): r""" Returns a list of the eigenvalues of the adjacency matrix.
0f6d9551412e7025b18f03ea40b453d4a3148f29 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/0f6d9551412e7025b18f03ea40b453d4a3148f29/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17970, 12, 2890, 16, 7125, 30538, 2779, 33, 8381, 4672, 436, 8395, 2860, 279, 666, 434, 326, 29831, 434, 326, 25220, 3148, 18, 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, 0, 0, 0, 0, 0, 0, 0, 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, 17970, 12, 2890, 16, 7125, 30538, 2779, 33, 8381, 4672, 436, 8395, 2860, 279, 666, 434, 326, 29831, 434, 326, 25220, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self[0][0].parent().is_atomic_repr()))
self.base_ring().is_atomic_repr()))
def _repr_(self): cr = self._cr() if len(self) == 0: return str(self.__unit) try: atomic = ((isinstance(self[0][0], (int, long)) or \ self[0][0].parent().is_atomic_repr())) except AttributeError: atomic = False s = '' mul = ' * ' if cr: mul += '\n' for i in range(len(self)): t = str(self[i][0]) n = self[i][1] if (n>1 or len(self) > 1 or self.__unit != 1) and not atomic and ('+' in t or '-' in t or ' ' in t): t = '(%s)'%t if n != 1: t += '^%s'%n s += t if i < len(self)-1: s += mul if self.__unit != 1: if atomic: u = str(self.__unit) else: u = '(%s)'%self.__unit s = u + mul + s return s
7b30ddb30ae1a435bd7243058fc57880a92701a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7b30ddb30ae1a435bd7243058fc57880a92701a4/factorization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 4422, 273, 365, 6315, 3353, 1435, 309, 562, 12, 2890, 13, 422, 374, 30, 327, 609, 12, 2890, 16186, 4873, 13, 775, 30, 7960, 273, 14015, 291, 1336, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 4422, 273, 365, 6315, 3353, 1435, 309, 562, 12, 2890, 13, 422, 374, 30, 327, 609, 12, 2890, 16186, 4873, 13, 775, 30, 7960, 273, 14015, 291, 1336, 12, ...
self.orbitals.append("%s_%s" % (atomname,orbital))
self.aonames.append("%s_%s" % (atomname,orbital))
def parse(self): """Extract information from the logfile.""" inputfile = open(self.filename,"r") for line in inputfile: if line[1:8]=="NAtoms=":
47c8821cc88c71efe3af04aace14c00a4fd2b2e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8167/47c8821cc88c71efe3af04aace14c00a4fd2b2e5/g03parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 10837, 86, 7923, 364, 980, 316, 810, 768, 30, 225, 309, 980, 63, 21, 30, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 4672, 3536, 4976, 1779, 628, 326, 15204, 12123, 810, 768, 273, 1696, 12, 2890, 18, 3459, 10837, 86, 7923, 364, 980, 316, 810, 768, 30, 225, 309, 980, 63, 21, 30, 28, ...
self._decoded_text = decoded[skip_chars:]
self._decoded_text_offset = skip_chars
def seek(self, cookie, whence=0): if not self._seekable: raise IOError("underlying stream is not seekable") if whence == 1: # seek relative to current position if cookie != 0: raise IOError("can't do nonzero cur-relative seeks") # Seeking to the current position should attempt to # sync the underlying buffer with the current position. whence = 0 cookie = self.tell() if whence == 2: # seek relative to end of file if cookie != 0: raise IOError("can't do nonzero end-relative seeks") self.flush() position = self.buffer.seek(0, 2) self._decoded_text = "" self._snapshot = None if self._decoder: self._decoder.reset() return position if whence != 0: raise ValueError("invalid whence (%r, should be 0, 1 or 2)" % (whence,)) if cookie < 0: raise ValueError("negative seek position %r" % (cookie,)) self.flush()
420084188486cbed54ef83ecc334c8781c1f1af3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/420084188486cbed54ef83ecc334c8781c1f1af3/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 3878, 16, 23692, 33, 20, 4672, 309, 486, 365, 6315, 16508, 429, 30, 1002, 8340, 2932, 9341, 6291, 1407, 353, 486, 6520, 429, 7923, 309, 23692, 422, 404, 30, 468, 65...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6520, 12, 2890, 16, 3878, 16, 23692, 33, 20, 4672, 309, 486, 365, 6315, 16508, 429, 30, 1002, 8340, 2932, 9341, 6291, 1407, 353, 486, 6520, 429, 7923, 309, 23692, 422, 404, 30, 468, 65...
cl.create(name=option[i], order=i)
cl.create(name=options[i], order=i)
def Choice(name, *options): cl = Class(db, name, name=hyperdb.String(), order=hyperdb.String()) for i in range(len(options)): cl.create(name=option[i], order=i) return hyperdb.Link(name)
e1890a266b788129d73a5b0075366b60e4b578ce /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/e1890a266b788129d73a5b0075366b60e4b578ce/hyperdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16432, 12, 529, 16, 380, 2116, 4672, 927, 273, 1659, 12, 1966, 16, 508, 16, 508, 33, 17203, 1966, 18, 780, 9334, 1353, 33, 17203, 1966, 18, 780, 10756, 364, 277, 316, 1048, 12, 1897, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16432, 12, 529, 16, 380, 2116, 4672, 927, 273, 1659, 12, 1966, 16, 508, 16, 508, 33, 17203, 1966, 18, 780, 9334, 1353, 33, 17203, 1966, 18, 780, 10756, 364, 277, 316, 1048, 12, 1897, ...
""" Global elements are always qualified.
"""Global elements are always qualified.
def isQualified(self): """
22c8e615d0f712bb5c846c74d9185193b57e9c0f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/14538/22c8e615d0f712bb5c846c74d9185193b57e9c0f/XMLSchema.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 8708, 12, 2890, 4672, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 8708, 12, 2890, 4672, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if not widget.get_expanded(): cur_values = paned.child_get_property(w, 'resize'), \ paned.child_get_property(w, 'shrink')
if resize != None: paned.child_set_property(w, 'resize', resize) else: cur_values = w.get_data('pm::old_resize')
def __on_expanded(self, widget): for paned in self.paneds: w = paned.get_child1()
42607394802cdbfe1d1327e035edbe386cb5bbb3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11468/42607394802cdbfe1d1327e035edbe386cb5bbb3/MultiPaneds.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 67, 17336, 12, 2890, 16, 3604, 4672, 364, 2800, 329, 316, 365, 18, 7355, 9765, 30, 341, 273, 2800, 329, 18, 588, 67, 3624, 21, 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, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 265, 67, 17336, 12, 2890, 16, 3604, 4672, 364, 2800, 329, 316, 365, 18, 7355, 9765, 30, 341, 273, 2800, 329, 18, 588, 67, 3624, 21, 1435, 2, -100, -100, -100, -100, -100, -100, ...
if isGlobalCmakeBuildFile(modifiedFileFullPath):
if isGlobalBuildFile(modifiedFileFullPath):
def extractPackageEnablesFromChangeStatus(updateOutputStr, inOptions_inout, enablePackagesList_inout ) \ : trilinosDependencies = getTrilinosDependenciesFromXmlFile(defaultTrilinosDepsXmlInFile) modifiedFilesList = extractFilesListMatchingPattern( updateOutputStr.split('\n'), reModifedFiles ) for modifiedFileFullPath in modifiedFilesList: if isGlobalCmakeBuildFile(modifiedFileFullPath): if inOptions_inout.enableAllPackages == 'default': print "\nModifed file: '"+modifiedFileFullPath+"'\n" \ " => Enabling all Trilinos packages!" inOptions_inout.enableAllPackages = 'on' packageName = getPackageNameFromPath(trilinosDependencies, modifiedFileFullPath) if packageName and findInSequence(enablePackagesList_inout, packageName) == -1: print "\nModified file: '"+modifiedFileFullPath+"'\n" \ " => Enabling '"+packageName+"'!" enablePackagesList_inout.append(packageName)
8de4f439d557111e62761b11543f08a8164bfb0c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1130/8de4f439d557111e62761b11543f08a8164bfb0c/CheckinTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 2261, 25924, 1265, 3043, 1482, 12, 2725, 1447, 1585, 16, 316, 1320, 67, 267, 659, 16, 4237, 11425, 682, 67, 267, 659, 262, 521, 294, 225, 433, 330, 267, 538, 8053, 273, 336, 1070...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2261, 25924, 1265, 3043, 1482, 12, 2725, 1447, 1585, 16, 316, 1320, 67, 267, 659, 16, 4237, 11425, 682, 67, 267, 659, 262, 521, 294, 225, 433, 330, 267, 538, 8053, 273, 336, 1070...
def update_to(self, data=None):
def update_to_this_revision(self, data=None):
def update_to(self, data=None): return (len(self.revisions) == 1)
c7939b81d6a06876f00ea3bed9e951f592b1d448 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/c7939b81d6a06876f00ea3bed9e951f592b1d448/log.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 869, 67, 2211, 67, 13057, 12, 2890, 16, 501, 33, 7036, 4672, 327, 261, 1897, 12, 2890, 18, 29892, 13, 422, 404, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 869, 67, 2211, 67, 13057, 12, 2890, 16, 501, 33, 7036, 4672, 327, 261, 1897, 12, 2890, 18, 29892, 13, 422, 404, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
(objects, output_dir) = self._fix_link_args (objects, output_dir, takes_libs=0)
(objects, output_dir) = self._fix_object_args (objects, output_dir)
def create_static_lib (self, objects, output_libname, output_dir=None, debug=0):
e21dabe2e0f93aef55bf6a5352527f4874a31489 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e21dabe2e0f93aef55bf6a5352527f4874a31489/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3845, 67, 2941, 261, 2890, 16, 2184, 16, 876, 67, 2941, 529, 16, 876, 67, 1214, 33, 7036, 16, 1198, 33, 20, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3845, 67, 2941, 261, 2890, 16, 2184, 16, 876, 67, 2941, 529, 16, 876, 67, 1214, 33, 7036, 16, 1198, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return -2, "Failed to detach block device: /proc/partitions still showing that!"
return -2, "Failed to detach block device: " \ + "/proc/partitions still showing that!"
def detach(devname): block_detach(domain, devname) run = console.runCmd("cat /proc/partitions") if re.search(basename(devname), run["output"]): return -2, "Failed to detach block device: /proc/partitions still showing that!" return 0, None
60a55e6d55238f973aa477c2d311d7955be41024 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/60a55e6d55238f973aa477c2d311d7955be41024/10_block_attach_dettach_multiple_devices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10199, 12, 5206, 529, 4672, 1203, 67, 8238, 497, 12, 4308, 16, 4461, 529, 13, 225, 1086, 273, 2983, 18, 2681, 5931, 2932, 2574, 342, 9381, 19, 21275, 7923, 309, 283, 18, 3072, 12, 1390...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10199, 12, 5206, 529, 4672, 1203, 67, 8238, 497, 12, 4308, 16, 4461, 529, 13, 225, 1086, 273, 2983, 18, 2681, 5931, 2932, 2574, 342, 9381, 19, 21275, 7923, 309, 283, 18, 3072, 12, 1390...
Block.Block.findBlockByName('StatusBar').setStatusMessage (statusMessage, progressPercentage)
Block.findBlockByName('StatusBar').setStatusMessage (statusMessage, progressPercentage)
def setStatusMessage (self, statusMessage, progressPercentage=-1): """ Allows you to set the message contained in the status bar. You can also specify values for the progress bar contained on the right side of the status bar. If you specify a progressPercentage (as a float 0 to 1) the progress bar will appear. If no percentage is specified the progress bar will disappear. """
3522458f1f5c599b657817447ec0c1a546198d6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3522458f1f5c599b657817447ec0c1a546198d6b/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9433, 1079, 261, 2890, 16, 1267, 1079, 16, 4007, 16397, 29711, 21, 4672, 3536, 25619, 1846, 358, 444, 326, 883, 7542, 316, 326, 1267, 4653, 18, 4554, 848, 2546, 4800, 924, 364, 326, 4007...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9433, 1079, 261, 2890, 16, 1267, 1079, 16, 4007, 16397, 29711, 21, 4672, 3536, 25619, 1846, 358, 444, 326, 883, 7542, 316, 326, 1267, 4653, 18, 4554, 848, 2546, 4800, 924, 364, 326, 4007...
suffix = IsDebug()
suffix = IsDebug()
def SetupCore(searchPaths): """Setup the core Python information in the registry. This function makes no assumptions about the current state of sys.path. After this function has completed, you should have access to the standard Python library, and the standard Win32 extensions """ import sys for path in searchPaths: sys.path.append(path) import string, os import regutil, win32api, win32con installPath, corePaths = LocatePythonCore(searchPaths) # Register the core Pythonpath. print corePaths regutil.RegisterNamedPath(None, string.join(corePaths,";")) # Register the install path. hKey = win32api.RegCreateKey(regutil.GetRootKey() , regutil.BuildDefaultPythonKey()) try: # Core Paths. win32api.RegSetValue(hKey, "InstallPath", win32con.REG_SZ, installPath) finally: win32api.RegCloseKey(hKey) # The core DLL. regutil.RegisterCoreDLL() # Register the win32 extensions, as some of them are pretty much core! # Why doesnt win32con.__file__ give me a path? (ahh - because only the .pyc exists?) # Register the win32 core paths. win32paths = win32api.GetFullPathName( os.path.split(win32api.__file__)[0]) + ";" + \ win32api.GetFullPathName( os.path.split(LocateFileName("win32con.py;win32con.pyc", sys.path ) )[0] ) suffix = IsDebug() FindRegisterModule("pywintypes", "pywintypes15%s.dll" % suffix, [".", win32api.GetSystemDirectory()]) regutil.RegisterNamedPath("win32",win32paths)
5984d683556527b7db628b1403c6908f85705f8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/5984d683556527b7db628b1403c6908f85705f8a/regsetup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 4670, 12, 3072, 4466, 4672, 3536, 7365, 326, 2922, 6600, 1779, 316, 326, 4023, 18, 225, 1220, 445, 7297, 1158, 6287, 573, 2973, 326, 783, 919, 434, 2589, 18, 803, 18, 225, 7360, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10939, 4670, 12, 3072, 4466, 4672, 3536, 7365, 326, 2922, 6600, 1779, 316, 326, 4023, 18, 225, 1220, 445, 7297, 1158, 6287, 573, 2973, 326, 783, 919, 434, 2589, 18, 803, 18, 225, 7360, ...
dict_insert_src(gcceso_dict, env.options['SAGE_ROOT']+"/devel/sage/build/temp/sage/libs/mwrank/mwrank.o", mwrankcc.outfile)
dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/libs/mwrank/mwrank.o", mwrankcc.outfile)
def buildsage(env, gccc): """ This function actually builds sage """ TM = taskmanager.TM #acquire a list of all pyx files in the tree efw = extfilewalker() efw.addcallback('.pyx',lambda x: True) pyx_list = efw.walk('devel/sage/sage') #set the absolute devel directory if necessary develdir = os.path.realpath('devel/sage/') if verbose>100: print 'Devel Dir: ' + develdir #Create the cython compiler cyc = Cython_compiler() #We want -I. so that it correctly finds include files by default cyc.set_option_val('-I'+'.',None) #Create the build extension dict for all cython extensions pyx_pextn_dict = cyc.get_build_extensions(env, pyx_list, cwd = 'devel/sage') ################################################################### #Configure all extensions ################################################################### config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/flint/fmpz_poly.pyx",include_dirs = [real_sage_local(env, 'include/FLINT/')], libraries = ["csage", "flint", "gmp", "gmpxx", "m", "stdc++"],prop_options={ str(GCC_extension_object): {'-std':'c99' } } ) ntllibs = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"] config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_p.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pEContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pE.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_ZZ_pEX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_pContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_p.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_lzz_pX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2X.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2E.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EX.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_mat_ZZ.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_mat_GF2E.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/ntl/ntl_GF2EContext.pyx",language="C++", libraries=ntllibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/mwrank/mwrank.pyx", language='C++', define_macros=[("NTL_ALL",None)], libraries=["curvesntl", "g0nntl", "jcntl", "rankntl", "ntl", "gmp", "gmpxx", "stdc++", "m", "pari"] ) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/pari/gen.pyx",libraries=['pari', 'gmp']) cremonalibs = ['g0nntl', 'jcntl', 'gmpxx', 'ntl', 'gmp', 'm', 'stdc++', 'pari', 'curvesntl'] config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/mat.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/homspace.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/libs/cremona/newforms.pyx",language="C++", define_macros=[("NTL_ALL",None)], libraries=cremonalibs) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/rings/finite_field_givaro.pyx",language="C++", libraries=['givaro', 'gmpxx', 'gmp', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/finite_field_ntl_gf2e.pyx',language="C++", libraries=['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/rings/real_rqdf.pyx",language="C++", libraries=['qd', 'm', 'stdc++','gmp','mpfr','qd', 'csage' ]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/misc.pyx',libraries=['mpfr','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_2x2.pyx',libraries=['gmp']) BLAS = env.options['BLAS'] BLAS2 = env.options['BLAS2'] config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/linbox/linbox.pyx',language="C++", libraries=['linboxwrap', 'ntl', 'linbox', 'gmp', 'gmpxx', 'stdc++', 'givaro', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/singular/singular.pyx',language='C++', include_dirs=[real_sage_local(env,'include/singular')], libraries=['m', 'readline', 'singular', 'singfac', 'singcf', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/fplll/fplll.pyx',language='C++', include_dirs = [real_sage_local(env, 'include/fplll')], libraries=['gmp', 'mpfr', 'stdc++', 'fplll']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_modn_dense.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_mod2_dense.pyx',libraries = ['gmp','m4ri']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_rational_dense.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_sparse.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_rational_sparse.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_integer_dense.pyx',libraries = ['iml', 'gmp', 'm', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_real_double_dense.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs = [real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=[BLAS, BLAS2, 'gsl']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/change_ring.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=[BLAS, BLAS2, 'gsl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_complex_double_dense.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/solve.pyx',define_macros = [('GSL_DISABLE_DEPRECATED','1')], libraries = ['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/matrix/matrix_mpolynomial_dense.pyx',language="C++", include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_number.pyx',libraries = ['mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/probability_distribution.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/integration.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/ode.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/fft.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/interpolation.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/callback.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_double.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', 'gmp', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_double.pyx',libraries = ['gsl', BLAS, BLAS2, 'pari', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/real_double_vector.pyx',define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/complex_double_vector.pyx',define_macros = [('GSL_DISABLE_DEPRECAED','1')], include_dirs=[real_sage_local(env,'lib/python2.5/site-packages/numpy/core/include/numpy')], libraries = ['gsl', BLAS, BLAS2, 'pari','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/vector_integer_dense.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modules/vector_rational_dense.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/gsl_array.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl', BLAS, BLAS2]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/ode.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/gsl/dwt.pyx',define_macros=[('GSL_DISABLE_DEPRECATED','1')], libraries=['gsl',BLAS]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/symmetrica/symmetrica.pyx',libraries=['symmetrica']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/ext/arith_gmp.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/ext/multi_modular.pyx',libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/multi_polynomial_libsingular.pyx',language='C++', include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/multi_polynomial_ideal_libsingular.pyx',language='C++', include_dirs = [real_sage_local(env,'include/singular')], libraries = ['m', 'readline', 'singular', 'singcf', 'singfac', 'omalloc', 'givaro', 'gmpxx', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/structure/sage_object.pyx',libraries=['ntl']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_mpfr.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/real_mpfi.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/complex_interval.pyx',libraries = ['mpfi', 'mpfr', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer.pyx',libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer_ring.pyx',libraries = ['ntl', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/libs/libecm.pyx',libraries = ['ecm', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/pow_computer.pyx',language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/pow_computer_ext.pyx',language='C++', libraries = ["csage", "ntl", "gmp", "gmpxx", "m", "stdc++"]) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_fixed_mod_element.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_capped_absolute_element.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_capped_relative_element.pyx',libraries = ['gmp', 'csage']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ext_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_FM_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_CR_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_ZZ_pX_CA_element.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/padics/padic_printing.pyx',language = 'C++', libraries = ['gmp', 'ntl', 'csage', 'gmpxx', 'm', 'stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/memory.pyx',libraries = ['gmp','stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/bernoulli_mod_p.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries=['ntl','stdc++']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/')], libraries = ['ntl','stdc++', 'gmp', 'zn_poly']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/polynomial_integer_dense_ntl.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/polynomial_modn_dense_ntl.pyx',language = 'C++', include_dirs = [abs_sage_path(env,'devel/sage/libs/ntl/')], libraries = ['ntl','stdc++', 'gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/rational.pyx',libraries = ['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/sparse_poly.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/real_roots.pyx',libraries = ['mpfr', 'qd']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/number_field_element.pyx',language = 'C++', libraries=['ntl','gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/number_field_element_quadratic.pyx',language = 'C++', libraries=['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/number_field/totallyreal_data.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modular/modsym/heilbronn.pyx',libraries = ['gmp','m']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/modular/modsym/p1list.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/integer_mod.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/combinat/expnums.pyx',libraries = ['gmp']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/combinat/partitions.pyx',language='C++', libraries = ['qd', 'gmp', 'mpfr']) config_gcc_file(env,pyx_pextn_dict,"devel/sage/sage/combinat/matrices/dancing_links.pyx",language="C++") config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/graphs/graph_fast.pyx',libraries = ['gmp']) #config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/symbolics/symbolicarithmetic.pyx',libraries = ['glite']) #config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/symbolics/symbolicmularithmetic.pyx',libraries = ['glite']) config_gcc_file(env,pyx_pextn_dict,'devel/sage/sage/rings/polynomial/pbori.pyx',language='C++', include_dirs = [real_sage_local(env,'include/cudd'),real_sage_local(env,'include/polybori'), real_sage_local(env,'include/polybori/groebner')], libraries=['polybori','pboriCudd','groebner']) ################################################################### #End standard configurations ################################################################### tempdir = os.path.realpath(env.options['SAGE_ROOT']) #A dictionary of gcc objects extensions gcceo_dict = { } #A dictionary of gcc shared object extensions gcceso_dict = { } #Manually create the mwrank C extension mwrankcc = GCC_extension_object(gccc, env, ["devel/sage/sage/libs/mwrank/wrap.cc"], tempdir+"/devel/sage/build/temp/sage/libs/mwrank", language='C++', define_macros=[("NTL_ALL",None)], options = { '-fPIC':None } ) #Create the Hypellfrob extensions hypellfrob_cpp = GCC_extension_object(gccc, env,["devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob/hypellfrob.cpp"], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None }) recurrences_zn_poly = GCC_extension_object(gccc, env,[abs_sage_path(env,"sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_zn_poly.cpp")], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None } ) recurrences_ntl = GCC_extension_object(gccc, env,["devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob/recurrences_ntl.cpp"], tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob/", language='C++', include_dirs=[abs_sage_path(env, 'sage/libs/ntl'), abs_sage_path(env,'sage/schemes/hyperelliptic_curves/hypellfrob/') ], options = { '-fPIC':None } ) #Manually create the C paritions extension partitions_c = GCC_extension_object(gccc, env,["devel/sage/sage/combinat/partitions_c.cc"], tempdir+"/devel/sage/build/temp/sage/combinat", language='C++', options = { '-fPIC':None } ) #If we don't already have a temporary build directory for planarity, make it safemkdirs(tempdir+"/devel/sage/build/temp/sage/graphs/planarity") #Locate all files that can possibley have depfw = extfilewalker() depfw.addcallback('.pyx',lambda x: True) depfw.addcallback('.pxd',lambda x: True) depfw.addcallback('.pxi',lambda x: True) depfw.addcallback('.py',lambda x: x.find(".doctest") ==-1 ) dep_list = depfw.walk('devel/sage/sage') #Set the dependency locater function funcdict = { '.pyx':get_cython_file_deps, '.pxd':get_cython_file_deps, 'pxi':get_cython_file_deps } #Set possible include directories for various file extensions includedict = { '.pyx':[abs_sage_path(env,'')], '.pxd':[abs_sage_path(env,'')], '.pxi':[abs_sage_path(env,'')] } #Set cacheinfo (used for saving the state at the end of the build) global cacheinfo cacheinfo = get_compile_list(dep_list, funcdict, includedict, "sagebuild.chc", env.options['SAGE_ROOT']) #Add the task that runs on exit to write out the build cache TM.addfinishtask(sagebuild_exit) pyx_ext_dict = { } for x in cacheinfo[0]: if os.path.splitext(x)[1]==".pyx": pyx_ext_dict[x]=pyx_pextn_dict[x] if verbose>100: print '---------------PYX_EXT_DICT------------' print pyx_ext_dict print '----------------------------------------' #If we are building planarity if pyx_ext_dict.has_key('devel/sage/sage/graphs/planarity.pyx'): #Locate all planarity C files efwplan = extfilewalker() efwplan.addcallback('.c',lambda x: True) planarity_list = efwplan.walk('devel/sage/sage/graphs/planarity') planarity_ext = list() for x in planarity_list: #Create their extensions and enable them ext = GCC_extension_object(gccc, env, [x], tempdir+"/devel/sage/build/temp/sage/graphs/planarity", options = { '-fPIC':None } ) ext.generate_action(env).enable() planarity_ext.append(ext) #If we are building mwrank.pyx, build the mwrank c extensions if pyx_ext_dict.has_key("devel/sage/sage/libs/mwrank/mwrank.pyx"): mwrankcc.generate_action(env).enable() else: pass #If we are building hypellfrob, make sure the temporary directories exist and enable the C extensions if pyx_ext_dict.has_key('devel/sage/sage/schemes/hyperelliptic_curves/hypellfrob.pyx'): try: os.makedirs(hypellfrob_cpp.get_out_dir()) except: pass hypellfrob_cpp.generate_action(env).enable() recurrences_ntl.generate_action(env).enable() recurrences_zn_poly.generate_action(env).enable() #If we are building partions.pyx, we should build the partitions C extension if pyx_ext_dict.has_key('devel/sage/sage/combinat/partitions.pyx'): partitions_c.generate_action(env).enable() #For all Cython extensions, create gcc object file extensions for x in pyx_ext_dict.values(): q = x.generate_action(env) gcc_temp_dir = tempdir + '/devel/sage/build/temp/sage/' + (os.path.split(x.sources[0])[0])[len('devel/sage/sage/'):] gcceo = GCC_extension_object(gccc, env, [x], gcc_temp_dir, options = { '-fPIC':None } ) gcceo_dict[x.sources[0]] = gcceo gccaction = gcceo.generate_action(env) gccaction.dep_register(q) q.enable() #Create temporary directories for all object file extensions and enable them for gcceo in gcceo_dict.values(): try: os.makedirs(gcceo.get_out_dir()) except: pass gccaction = gcceo.generate_action(env) gccaction.enable() #For all object file extensions, create shared object file extensions and enable them for gcceo in gcceo_dict.values(): gcc_build_dir = develdir + '/build' + (os.path.split(gcceo.sources[0])[0])[len('devel/sage'):] gcceso = GCC_extension_shared_object(gccc,env, [gcceo], gcc_build_dir) gcceso_dict[gcceso.sources[0] ] = gcceso gcceso.generate_action(env).dep_register(gcceo.generate_action(env)) #Link mwrank C files if needed dict_insert_src(gcceso_dict, env.options['SAGE_ROOT']+"/devel/sage/build/temp/sage/libs/mwrank/mwrank.o", mwrankcc.outfile) #Setup dependencies for mwrank if needed try: gcceso_dict[env.options['SAGE_ROOT'] + "/devel/sage/build/temp/sage/libs/mwrank/mwrank.o"].generate_action(env).dep_register(mwrankcc.generate_action(env)) except KeyError: pass #Link hypellfrob C files if needed dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", hypellfrob_cpp.outfile) dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", recurrences_ntl.outfile) dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o", recurrences_zn_poly.outfile) #Setup dependencies for hypellfrob shared object if needed try: gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(hypellfrob_cpp.generate_action(env)) gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(recurrences_ntl.generate_action(env)) gcceso_dict[tempdir+"/devel/sage/build/temp/sage/schemes/hyperelliptic_curves/hypellfrob.o"].generate_action(env).dep_register(recurrences_zn_poly.generate_action(env)) except KeyError: pass #Link parition C file if needed dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/combinat/partitions.o", partitions_c.outfile) #Setup dependencies for parition if needed try: gcceso_dict[tempdir+"/devel/sage/build/temp/sage/combinat/partitions.o"].generate_action(env).dep_register(mwrankcc.generate_action(env)) except KeyError: pass #If we are building planarity, then we should link the C extensions into the planarity shared object if pyx_ext_dict.has_key('devel/sage/sage/graphs/planarity.pyx'): for x in planarity_ext: dict_insert_src(gcceso_dict, tempdir+"/devel/sage/build/temp/sage/graphs/planarity.o",x.outfile) #Make output directorys in site-packages if they don't already exist for gcceso in gcceso_dict.values(): try: os.makedirs(gcceso.get_out_dir()) except: pass gccesoaction = gcceso.generate_action(env) gccesoaction.enable() if verbose>10: print 'Copying *.py files' #Copy all python files to site-packages for filenm in cacheinfo[0]: if os.path.splitext(filenm)[1]==".py": filepart = (os.path.split(filenm)[0]) newdir = env.options['SAGE_ROOT'] + '/devel/sage/build/sage/' + filepart.replace('devel/sage/sage','') filename = os.path.split(filenm)[1] if filename[0]=='.': continue safemkdirs(newdir) cmd = 'cp %s %s/%s' % (filenm, newdir, filename) if verbose>30: print cmd os.system( cmd ) #Setup the site-packages symlink if it doesn't already exist safesymlink('../../../../devel/sage/build/sage','local/lib/python/site-packages/sage') #Handle DSage safemkdirs('local/dsage') safesymlink('../../devel/sage/sage/dsage/web', 'local/dsage/web')
fe65cd75c7a4f55a6a103f7bd133aad2068a6574 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/fe65cd75c7a4f55a6a103f7bd133aad2068a6574/sagebuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 3536, 1220, 445, 6013, 10736, 272, 410, 3536, 27435, 273, 1562, 4181, 18, 22903, 468, 1077, 1039, 279, 666, 434, 777, 2395, 92, 1390, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10736, 410, 12, 3074, 16, 314, 952, 71, 4672, 3536, 1220, 445, 6013, 10736, 272, 410, 3536, 27435, 273, 1562, 4181, 18, 22903, 468, 1077, 1039, 279, 666, 434, 777, 2395, 92, 1390, 316, ...
return '<span class="py-lineno">%s</span>' % n
return '<tt class="py-lineno">%s</tt>' % n
def lineno_to_html(self): template = '%%%ds' % self.linenum_size n = template % self.lineno return '<span class="py-lineno">%s</span>' % n
5bc1065ae92ac1cb6e043d081151eb3bcfca80a3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/5bc1065ae92ac1cb6e043d081151eb3bcfca80a3/html_colorize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7586, 67, 869, 67, 2620, 12, 2890, 4672, 1542, 273, 1995, 11438, 2377, 11, 738, 365, 18, 7511, 7924, 67, 1467, 290, 273, 1542, 738, 365, 18, 17782, 327, 2368, 3969, 667, 1546, 2074, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7586, 67, 869, 67, 2620, 12, 2890, 4672, 1542, 273, 1995, 11438, 2377, 11, 738, 365, 18, 7511, 7924, 67, 1467, 290, 273, 1542, 738, 365, 18, 17782, 327, 2368, 3969, 667, 1546, 2074, 17...
use DMLT – ''Desctructive Markup Toolkit'' – it's rather easy since it really
use DMLT – ''Descriptive Markup Language Toolkit'' – it's rather easy since it really
def parse(self, stream): dn = self.rule.enter begin, end = '%s_begin' % dn, '%s_end' % dn stream.expect(begin) children = parse_child_nodes(stream, self, end) stream.expect(end) return self.__directive_node__(children)
4c2720dccc003d063ef0129a4afc6c128f2eb7f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8613/4c2720dccc003d063ef0129a4afc6c128f2eb7f9/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 1407, 4672, 8800, 273, 365, 18, 5345, 18, 2328, 2376, 16, 679, 273, 1995, 87, 67, 10086, 11, 738, 8800, 16, 1995, 87, 67, 409, 11, 738, 8800, 1407, 18, 12339, 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, 1109, 12, 2890, 16, 1407, 4672, 8800, 273, 365, 18, 5345, 18, 2328, 2376, 16, 679, 273, 1995, 87, 67, 10086, 11, 738, 8800, 16, 1995, 87, 67, 409, 11, 738, 8800, 1407, 18, 12339, 12,...
xml_line += _refextract_markup_title_as_marcxml(prev_title, prev_volume,
xml_line += markup_title_as_marcxml(prev_title, prev_volume,
def convert_processed_reference_line_to_marc_xml(line_marker, line): """Given a processed reference line, convert it to MARC XML. @param line_marker: (string) - the marker for the reference line (e.g. [1]). @param line: (string) - the processed reference line, in which the recognised citations have been tagged. @return: (tuple) - + xml_line (string) - the reference line with all of its identified citations marked up into the various subfields. + count_misc (integer) - number of sections of miscellaneous found in the line + count_title (integer) - number of title-citations found in the line + count_reportnum (integer) - number of report numbers found in the line + count_url (integer) - number of URLs found in the line """ count_misc = count_title = count_reportnum = count_url = 0 xml_line = "" previously_cited_item = None processed_line = line ## Now display the marker in marked-up XML: xml_line += _refextract_markup_reference_line_marker_as_marcxml(line_marker) ## 2. Loop through remaining identified segments in line and tag them ## into MARC XML segments: cur_misc_txt = u"" ## a marker to hold gathered miscellaneous text before ## a citation tag_match = sre_tagged_citation.search(processed_line) while tag_match is not None: ## found a tag - process it: tag_match_start = tag_match.start() tag_match_end = tag_match.end() tag_type = tag_match.group(1) if tag_type == "TITLE": ## This tag is an identified journal TITLE. It should be followed ## by VOLUME, YEAR and PAGE tags. cur_misc_txt += processed_line[0:tag_match_start] ## extract the title from the line: idx_closing_tag = processed_line.find(CFG_REFEXTRACT_MARKER_CLOSING_TITLE, tag_match_end) ## Sanity check - did we find a closing TITLE tag? if idx_closing_tag == -1: ## no closing </cds.TITLE> tag found - strip the opening tag ## and move past it processed_line = processed_line[tag_match_end:] else: ## Closing tag was found: title_text = processed_line[tag_match_end:idx_closing_tag] ## Now trim this matched title and its tags from the start of the line: processed_line = processed_line[idx_closing_tag+len(CFG_REFEXTRACT_MARKER_CLOSING_TITLE):] ## Was this title followed by the tags of recognised VOLUME, YEAR and PAGE objects? numeration_match = sre_recognised_numeration_for_title.match(processed_line) if numeration_match is not None: ## recognised numeration immediately after the title - extract it: reference_volume = numeration_match.group(2) reference_year = numeration_match.group(3) reference_page = numeration_match.group(4) ## Skip past the matched numeration in the working line: processed_line = processed_line[numeration_match.end():] if previously_cited_item is None: ## There is no previously cited item - this should be added as the previously ## cited item: previously_cited_item = { 'type' : "TITLE", 'misc_txt' : cur_misc_txt, 'title' : title_text, 'volume' : reference_volume, 'year' : reference_year, 'page' : reference_page, } ## Now empty the miscellaneous text and title components: cur_misc_txt = "" title_text = "" reference_volume = "" reference_year = "" reference_page = "" elif (previously_cited_item is not None) and \ (previously_cited_item['type'] == "REPORTNUMBER") and \ (len(cur_misc_txt.lower().replace("arxiv", "").strip(".,:;- []")) == 0): ## This TITLE belongs with the REPORT NUMBER before it - add them both into ## the same datafield tag (REPORT NUMBER first, TITLE second): prev_report_num = previously_cited_item['report_num'] prev_misc_txt = previously_cited_item['misc_txt'].lstrip(".;, ").rstrip() xml_line += \ _refextract_markup_title_followed_by_report_number_as_marcxml(title_text, reference_volume, reference_year, reference_page, prev_report_num, prev_misc_txt) ## Increment the stats counters:
afd852f45332d11ac027b8d47ce1a922ce7f2cc6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/afd852f45332d11ac027b8d47ce1a922ce7f2cc6/refextract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1765, 67, 11005, 67, 6180, 67, 1369, 67, 869, 67, 3684, 71, 67, 2902, 12, 1369, 67, 11145, 16, 980, 4672, 3536, 6083, 279, 5204, 2114, 980, 16, 1765, 518, 358, 490, 27206, 3167, 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, 1765, 67, 11005, 67, 6180, 67, 1369, 67, 869, 67, 3684, 71, 67, 2902, 12, 1369, 67, 11145, 16, 980, 4672, 3536, 6083, 279, 5204, 2114, 980, 16, 1765, 518, 358, 490, 27206, 3167, 18, ...
for i, d in enumerate(t.dims): if i != 0: self.write(': ') self.dispatch(d)
interleave(lambda: self.write(', '), self.dispatch, t.dims)
def _ExtSlice(self, t): for i, d in enumerate(t.dims): if i != 0: self.write(': ') self.dispatch(d)
643abd1e07e9d2d1312ef50fdf241af321625a3e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/643abd1e07e9d2d1312ef50fdf241af321625a3e/unparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2482, 5959, 12, 2890, 16, 268, 4672, 364, 277, 16, 302, 316, 4241, 12, 88, 18, 8550, 4672, 309, 277, 480, 374, 30, 365, 18, 2626, 2668, 30, 8624, 365, 18, 10739, 12, 72, 13, 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, 389, 2482, 5959, 12, 2890, 16, 268, 4672, 364, 277, 16, 302, 316, 4241, 12, 88, 18, 8550, 4672, 309, 277, 480, 374, 30, 365, 18, 2626, 2668, 30, 8624, 365, 18, 10739, 12, 72, 13, 2...
if attr["id"] in self.old_idtoperson: newpersonid = self.old_idtoperson[attr["id"]] if personid and newpersonid <> personid: raise Exception, "%s : Two members now same person, were different %s, %s" % (attr["id"], personid, newpersonid) personid = newpersonid
if not re.match("uk.org.publicwhip/moffice/", attr["id"]): if attr["id"] in self.old_idtoperson: newpersonid = self.old_idtoperson[attr["id"]] if personid and newpersonid <> personid: raise Exception, "%s : Two members now same person, were different %s, %s" % (attr["id"], personid, newpersonid) personid = newpersonid
def outputxml(self, fout): for personset in self.personsets: # OK, we generate a person id based on the mp id.
d04cc69ca5587cb25fe844e247d7e5631cfb72e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8428/d04cc69ca5587cb25fe844e247d7e5631cfb72e1/personsets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 2902, 12, 2890, 16, 17382, 4672, 364, 6175, 542, 316, 365, 18, 12479, 4424, 30, 468, 7791, 16, 732, 2103, 279, 6175, 612, 2511, 603, 326, 6749, 612, 18, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 876, 2902, 12, 2890, 16, 17382, 4672, 364, 6175, 542, 316, 365, 18, 12479, 4424, 30, 468, 7791, 16, 732, 2103, 279, 6175, 612, 2511, 603, 326, 6749, 612, 18, 2, -100, -100, -100, -100,...
thumb = None desc = HTMLLinkGrabber.tagPattern.sub(' ',desc) self.links.append((link, desc, thumb))
link = urljoin(baseurl, linkURL) desc = match.group(4) imgMatch = HTMLLinkGrabber.imgPattern.match(desc) if imgMatch: try: thumb = urljoin(baseurl, imgMatch.group(1).encode('ascii')) except UnicodeDecodeError: print ("WARNING: scraped thumbnail url is non-ascii " "(%s) -- discarding" % imgMatch.group(1)) thumb = None else: thumb = None desc = HTMLLinkGrabber.tagPattern.sub(' ',desc) self.links.append((link, desc, thumb))
def getLinks(self,data, baseurl): self.links = [] self.lastLink = None self.inLink = False self.inObject = False self.baseurl = baseurl self.inTitle = False self.title = None self.thumbnailUrl = None
d6b5a8ca06fa3cd902e97521777ca7493ad9b10c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/d6b5a8ca06fa3cd902e97521777ca7493ad9b10c/feed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7100, 12, 2890, 16, 892, 16, 25427, 4672, 365, 18, 7135, 273, 5378, 365, 18, 2722, 2098, 273, 599, 365, 18, 267, 2098, 273, 1083, 365, 18, 267, 921, 273, 1083, 365, 18, 1969, 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, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7100, 12, 2890, 16, 892, 16, 25427, 4672, 365, 18, 7135, 273, 5378, 365, 18, 2722, 2098, 273, 599, 365, 18, 267, 2098, 273, 1083, 365, 18, 267, 921, 273, 1083, 365, 18, 1969, 71...
self.unpack('LLLL', self.data[self.index:self.index+16])
self.unpack('IIII', self.data[self.index:self.index+16])
def Tag_uint32_box(self): new_tag = unpack('B', self.data[self.index])[0] if ( new_tag == pxl_tags_dict['uint32_box'] ): self.index = self.index + 1 print "uint32_box %d %d %d %d" % \ self.unpack('LLLL', self.data[self.index:self.index+16]) self.index = self.index + 32 return 1 return 0
e189af671dcae8c04bd8f23d36319be14377393a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1296/e189af671dcae8c04bd8f23d36319be14377393a/pxldis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 11890, 1578, 67, 2147, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 309, 261, 394, 67, 2692, 422, 10318, 80...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4034, 67, 11890, 1578, 67, 2147, 12, 2890, 4672, 394, 67, 2692, 273, 6167, 2668, 38, 2187, 365, 18, 892, 63, 2890, 18, 1615, 5717, 63, 20, 65, 309, 261, 394, 67, 2692, 422, 10318, 80...
users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language))
users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language, sheet_ob.flash))
def _getFlashUsers(self, query=''): site = self.getSite() profiles_tool = site.getProfilesTool() users = [] users_a = users.append for user in site.getAuthenticationTool().getUsers(): profile = profiles_tool.getProfile(user.name) sheet_ob = profile.getSheetById(self.getInstanceSheetId()) if sheet_ob.notify or sheet_ob.flash: if query: if self.utToUnicode(user.name).find(query)!=-1 or user.email.find(query)!=-1 or \ self.utToUnicode(user.firstname).find(query)!=-1 or self.utToUnicode(user.lastname).find(query)!=-1: users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language)) else: users_a((user.name, user.firstname, user.lastname, user.email, sheet_ob.notify, sheet_ob.language)) return users
ba99780d7671ce36c67101fb48f36c410f5edbc3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3287/ba99780d7671ce36c67101fb48f36c410f5edbc3/FlashTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 11353, 6588, 12, 2890, 16, 843, 2218, 11, 4672, 2834, 273, 365, 18, 588, 4956, 1435, 11788, 67, 6738, 273, 2834, 18, 588, 12450, 6364, 1435, 3677, 273, 5378, 3677, 67, 69, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 11353, 6588, 12, 2890, 16, 843, 2218, 11, 4672, 2834, 273, 365, 18, 588, 4956, 1435, 11788, 67, 6738, 273, 2834, 18, 588, 12450, 6364, 1435, 3677, 273, 5378, 3677, 67, 69, 27...
self.action = { TS_UPDATE : 'Updating', TS_ERASE: 'Erasing', TS_INSTALL: 'Installing', TS_TRUEINSTALL : 'Installing', TS_OBSOLETED: 'Obsoleted', TS_OBSOLETING: 'Installing', TS_UPDATED: 'Cleanup', 'repackaging': 'Repackaging'}
self.action = { TS_UPDATE : _('Updating'), TS_ERASE: _('Erasing'), TS_INSTALL: _('Installing'), TS_TRUEINSTALL : _('Installing'), TS_OBSOLETED: _('Obsoleted'), TS_OBSOLETING: _('Installing'), TS_UPDATED: _('Cleanup'), 'repackaging': _('Repackaging')}
def __init__(self): self.action = { TS_UPDATE : 'Updating', TS_ERASE: 'Erasing', TS_INSTALL: 'Installing', TS_TRUEINSTALL : 'Installing', TS_OBSOLETED: 'Obsoleted', TS_OBSOLETING: 'Installing', TS_UPDATED: 'Cleanup', 'repackaging': 'Repackaging'} self.fileaction = { TS_UPDATE: 'Updated', TS_ERASE: 'Erased', TS_INSTALL: 'Installed', TS_TRUEINSTALL: 'Installed', TS_OBSOLETED: 'Obsoleted', TS_OBSOLETING: 'Installed', TS_UPDATED: 'Cleanup'} self.logger = logging.getLogger('yum.filelogging.RPMInstallCallback')
dc99092e393de07a8aeeb986c606db00830a8b09 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5445/dc99092e393de07a8aeeb986c606db00830a8b09/rpmtrans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1128, 273, 288, 15508, 67, 8217, 294, 389, 2668, 17858, 19899, 15508, 67, 654, 4429, 30, 389, 2668, 29228, 11730, 19899, 15508, 67, 28865, 30, 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, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 1128, 273, 288, 15508, 67, 8217, 294, 389, 2668, 17858, 19899, 15508, 67, 654, 4429, 30, 389, 2668, 29228, 11730, 19899, 15508, 67, 28865, 30, 3...
return (0, int(str(start_date - today).split('.')[0]))
return (0, int(str(self.start_date - today).split('.')[0]))
def get_days_left(self): """ Returns the remaining days for the consultation or the number of days before it starts """
d2c6f5d31fe0e549cc32b4581b127d8ae53e4798 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/d2c6f5d31fe0e549cc32b4581b127d8ae53e4798/tbconsultation_item.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9810, 67, 4482, 12, 2890, 4672, 3536, 2860, 326, 4463, 4681, 364, 326, 27710, 367, 578, 326, 1300, 434, 4681, 1865, 518, 2542, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9810, 67, 4482, 12, 2890, 4672, 3536, 2860, 326, 4463, 4681, 364, 326, 27710, 367, 578, 326, 1300, 434, 4681, 1865, 518, 2542, 3536, 2, -100, -100, -100, -100, -100, -100, -100,...
while current_loc < mem_size : line_data = line.replace("\n","") caseStmt = caseStmtTemplate caseStmt = caseStmt.replace("(address)", "%x" % current_loc) caseStmt = caseStmt.replace("(data)", "00000000") outputString += caseStmt if debug: outputString += " //Line %X" % current_loc outputString += "\n" current_loc += 1
def verilogLiteBootAndProgram(params): # Get pertinent values out of the parameters try: print params program_name = params['program_name'] program_loc = int(params['program_loc'], 16) mem_size = int(params['mem_size'], 16) output_name = params['output_name'] debug = params['debug'] template_name = params['verilog_template'] except KeyError: print "verilogBootAndProgram: A needed parameter was not defined!" # Initialize the current location and the output file. current_loc = 0 # We will construct our output in a string. outputString = "" caseStmtTemplate = "{1'b0, 16'h(address)}: instr <= 32'h(data);" # Last, write the program out to the memory. program_file = open(program_name, 'rU') for line in program_file: line_data = line.replace("\n","") caseStmt = caseStmtTemplate caseStmt = caseStmt.replace("(address)", "%x" % current_loc) caseStmt = caseStmt.replace("(data)", line_data) outputString += caseStmt if debug: outputString += " //Line %X" % current_loc outputString += "\n" current_loc += 1 program_file.close() # Make sure the program didn't overrun the memory (leave room for a final word of 0's) offset = mem_size - current_loc if offset < 0: print "Boot and Program Verilog: The program exceeded available memory region." \ " Read %d lines from %s" % (current_loc - program_loc, program_file) # Write 0's as a buffer between the program and the end of memory while current_loc < mem_size : line_data = line.replace("\n","") caseStmt = caseStmtTemplate caseStmt = caseStmt.replace("(address)", "%x" % current_loc) caseStmt = caseStmt.replace("(data)", "00000000") outputString += caseStmt if debug: outputString += " //Line %X" % current_loc outputString += "\n" current_loc += 1 # Now that we have constructed the replacement string, we will replace the token # in the template file with that string. verilog_file = open(template_name, 'rU') verilog_output = verilog_file.read() verilog_file.close() verilog_output = verilog_output.replace("(case_statements)", outputString) output_file = open(output_name, 'wb') output_file.write(verilog_output) output_file.close() print "Boot and Program Verilog: output %d words to file %s" % (current_loc / 4, output_name)
aa171b296f1d3f0bc43cf7325b790b9075468ce7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4793/aa171b296f1d3f0bc43cf7325b790b9075468ce7/verilogLiteBootAndProgram.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1924, 21947, 20291, 15817, 1876, 9459, 12, 2010, 4672, 225, 468, 968, 24445, 28736, 924, 596, 434, 326, 1472, 775, 30, 1172, 859, 5402, 67, 529, 273, 859, 3292, 12890, 67, 529, 3546, 540...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1924, 21947, 20291, 15817, 1876, 9459, 12, 2010, 4672, 225, 468, 968, 24445, 28736, 924, 596, 434, 326, 1472, 775, 30, 1172, 859, 5402, 67, 529, 273, 859, 3292, 12890, 67, 529, 3546, 540...
if prio >= parentPrio:
if prio > parentPrio:
def cleanParens(node): parent = node.parent if node.type == "function" and parent.type == "call": # Ignore for direct execution functions. This is required # for parsing e.g. (function(){})(); which does not work # without parens around the function instance other than # priorities might suggest pass elif getattr(node, "rel", None) == "condition": # inside a condition e.g. while(condition) or for(;condition;) we do not need # parens aroudn an expression node.parenthesized = False elif node.type in expressions and parent.type == "return": # Returns never need parens around the expression node.parenthesized = False elif node.type == "new" and parent.type == "dot": # Constructs like (new foo.bar.Object).doSomething() # "new" is defined with higher priority than "dot" but in # this case it does not work without parens. Interestingly # the same works without issues when having "new_with_args" # instead like: new foo.bar.Object("param").doSomething() pass elif node.type in expressions and parent.type in expressions: prio = expressionOrder[node.type] parentPrio = expressionOrder[node.parent.type] if prio >= parentPrio: node.parenthesized = False
7d22ecb9caa6ae99f9edc2afd63db9cea43f3970 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/7d22ecb9caa6ae99f9edc2afd63db9cea43f3970/BlockReducer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 52, 21660, 12, 2159, 4672, 982, 273, 756, 18, 2938, 225, 309, 756, 18, 723, 422, 315, 915, 6, 471, 982, 18, 723, 422, 315, 1991, 6877, 468, 8049, 364, 2657, 4588, 4186, 18, 122...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 52, 21660, 12, 2159, 4672, 982, 273, 756, 18, 2938, 225, 309, 756, 18, 723, 422, 315, 915, 6, 471, 982, 18, 723, 422, 315, 1991, 6877, 468, 8049, 364, 2657, 4588, 4186, 18, 122...
query = Q(history=review_request.diffset_history) try: draft = review_request.reviewrequestdraft_set.get() query = query & Q(reviewrequestdraft=draft) except ReviewRequestDraft.DoesNotExist: pass if revision != None:
try: draft = review_request.reviewrequestdraft_set.get() query = Q(reviewrequestdraft=draft) except ReviewRequestDraft.DoesNotExist: query = Q(history=review_request.diffset_history) if revision:
def _query_for_diff(review_request, revision, query_extra=None): query = Q(history=review_request.diffset_history) try: draft = review_request.reviewrequestdraft_set.get() query = query & Q(reviewrequestdraft=draft) except ReviewRequestDraft.DoesNotExist: pass if revision != None: query = query & Q(revision=revision) if query_extra != None: query = query & query_extra try: return DiffSet.objects.filter(query).latest() except: raise Http404
491256f530a009e42dcf15cb65bd2dff0b32c5a0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/491256f530a009e42dcf15cb65bd2dff0b32c5a0/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 1884, 67, 5413, 12, 16041, 67, 2293, 16, 6350, 16, 843, 67, 7763, 33, 7036, 4672, 225, 775, 30, 12246, 273, 10725, 67, 2293, 18, 16041, 2293, 17153, 67, 542, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 1884, 67, 5413, 12, 16041, 67, 2293, 16, 6350, 16, 843, 67, 7763, 33, 7036, 4672, 225, 775, 30, 12246, 273, 10725, 67, 2293, 18, 16041, 2293, 17153, 67, 542, 18, 588, ...
__implements__ = IZCatalog
def manage_addZCatalog(self, id, title, vocab_id=None, # Deprecated REQUEST=None): """Add a ZCatalog object """ id=str(id) title=str(title) c=ZCatalog(id, title, vocab_id, self) self._setObject(id, c) if REQUEST is not None: return self.manage_main(self, REQUEST,update_menu=1)
ee4a2a75639e19d6338268d60bdb049d1cbc8a53 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/ee4a2a75639e19d6338268d60bdb049d1cbc8a53/ZCatalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 62, 9769, 12, 2890, 16, 612, 16, 2077, 16, 9623, 67, 350, 33, 7036, 16, 468, 9336, 12492, 33, 7036, 4672, 3536, 986, 279, 2285, 9769, 733, 3536, 612, 33, 701, 12, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 1289, 62, 9769, 12, 2890, 16, 612, 16, 2077, 16, 9623, 67, 350, 33, 7036, 16, 468, 9336, 12492, 33, 7036, 4672, 3536, 986, 279, 2285, 9769, 733, 3536, 612, 33, 701, 12, 35...
if var == "CFLAGS":
if var.endswith ("CFLAGS"):
def check_cflags (cflags, var, xcflags = ""): """Check if compiler supports certain flags. This is done by creating a dummy source file and trying to compile it using the requested flags. :Parameters: `cflags` : str The compiler flags to check for `var` : str The name of the variable to append the flags to in the case if the flags are supported (e.g. "CFLAGS", "CXXFLAGS" etc) `xcflags` : str Additional flags to use during test compilation. These won't be appended to var. :Returns: True if the flags are supported, False if not. """ check_started ("Checking if compiler supports " + cflags) if var == "CFLAGS": srcf = "conftest.c" else: srcf = "conftest.cpp" write_file (srcf, """
3336832c0e0352f722b6bdae92de0f40754d8f13 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2556/3336832c0e0352f722b6bdae92de0f40754d8f13/tibs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 71, 7133, 261, 71, 7133, 16, 569, 16, 15192, 7133, 273, 1408, 4672, 3536, 1564, 309, 5274, 6146, 8626, 2943, 18, 1220, 353, 2731, 635, 4979, 279, 9609, 1084, 585, 471, 8374, 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, 866, 67, 71, 7133, 261, 71, 7133, 16, 569, 16, 15192, 7133, 273, 1408, 4672, 3536, 1564, 309, 5274, 6146, 8626, 2943, 18, 1220, 353, 2731, 635, 4979, 279, 9609, 1084, 585, 471, 8374, 3...
func(conduitcls(self, self.base, conf))
func(conduitcls(self, self.base, conf, **kwargs))
def run(self, slotname): '''Run all plugin functions for the given slot. ''' if not self.enabled: return # Determine handler class to use if slotname in ('config'): conduitcls = ConfigPluginConduit elif slotname == 'init': conduitcls = InitPluginConduit elif slotname == 'reposetup': conduitcls = RepoSetupPluginConduit elif slotname == 'close': conduitcls = PluginConduit elif slotname in ('pretrans', 'posttrans', 'exclude'): conduitcls = MainPluginConduit else: raise ValueError('unknown slot name "%s"' % slotname)
74b728ccf7d1b5825815fc6f5ef86064d0870891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/74b728ccf7d1b5825815fc6f5ef86064d0870891/plugins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4694, 529, 4672, 9163, 1997, 777, 1909, 4186, 364, 326, 864, 4694, 18, 9163, 309, 486, 365, 18, 5745, 30, 327, 225, 468, 10229, 1838, 667, 358, 999, 309, 4694, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 4694, 529, 4672, 9163, 1997, 777, 1909, 4186, 364, 326, 864, 4694, 18, 9163, 309, 486, 365, 18, 5745, 30, 327, 225, 468, 10229, 1838, 667, 358, 999, 309, 4694, 529,...
wiz_journal4('stock.traceability.lot.aval')
wiz_journal4('stock.traceability.lot.downstream')
def open_tab(self, cr, uid, data, context): obj = pooler.get_pool(cr.dbname).get('stock.move') ids = obj.search(cr, uid, [(field, 'in', data['ids'])]) cr.execute('select id from ir_ui_view where model=%s and field_parent=%s and type=%s', ('stock.move', type, 'tree')) view_id = cr.fetchone()[0] value = { 'domain': "[('id','in',["+','.join(map(str,ids))+"])]", 'name': ((type=='move_history_ids') and 'Upstream Traceability') or 'Downstream Traceability', 'view_type': 'tree', 'res_model': 'stock.move', 'field_parent': type, 'view_id': (view_id,'View'), 'type': 'ir.actions.act_window' } return value
67ca84598f4db922bc38f23e9b7031e452ee3b9e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/67ca84598f4db922bc38f23e9b7031e452ee3b9e/stock_traceability.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 7032, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1081, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 15381, 18, 8501, 6134, 3258, 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, 1696, 67, 7032, 12, 2890, 16, 4422, 16, 4555, 16, 501, 16, 819, 4672, 1081, 273, 2845, 264, 18, 588, 67, 6011, 12, 3353, 18, 20979, 2934, 588, 2668, 15381, 18, 8501, 6134, 3258, 273, ...
self.cmd1, self.cmd2 = pack(vbox, [gtk.Entry(23),gtk.Entry(23)])
pack(vbox, gtk.Label('Global: Use n, N, R, A, S:')) self.cmd1 = pack(vbox, gtk.Entry(43)) pack(vbox, gtk.Label('Atoms: Use a, x, y, z, s, Z')) self.cmd2 = pack(vbox, gtk.Entry(43))
def __init__(self, gui): gtk.Window.__init__(self) #self.window.set_position(gtk.WIN_POS_CENTER) #self.window.connect("destroy", lambda w: gtk.main_quit()) #self.window.connect('delete_event', self.exit) self.set_title('Execute') vbox = gtk.VBox() self.cmd1, self.cmd2 = pack(vbox, [gtk.Entry(23),gtk.Entry(23)]) self.cmd1.connect('activate', self.execute) self.cmd2.connect('activate', self.execute) self.selected = gtk.CheckButton('Only selected atoms') pack(vbox, self.selected) self.add(vbox) vbox.show() self.show() self.gui = gui
18bfbedd78e0f72197a89c27754d5c5a14cb0234 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5735/18bfbedd78e0f72197a89c27754d5c5a14cb0234/execute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13238, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 468, 2890, 18, 5668, 18, 542, 67, 3276, 12, 4521, 79, 18, 24572, 67, 7057, 67, 19835, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 13238, 4672, 22718, 18, 3829, 16186, 2738, 972, 12, 2890, 13, 468, 2890, 18, 5668, 18, 542, 67, 3276, 12, 4521, 79, 18, 24572, 67, 7057, 67, 19835, 13, ...
if job._getRoot().inputdata and job._getRoot().inputdata.redefine_partitions == "" and job._getRoot().splitter and job._getRoot().splitter.input_partitions == "":
if (job._getRoot().inputdata and job._getRoot().inputdata.redefine_partitions == ""):
def prepare(self,app,appconfig,appmasterconfig,jobmasterconfig): """Prepare the job"""
489145f362103259a3a462a4f9b7be7a79e8b92e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/489145f362103259a3a462a4f9b7be7a79e8b92e/AthenaMCLCGRTHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 16, 2910, 16, 2910, 1425, 16, 2910, 7525, 1425, 16, 4688, 7525, 1425, 4672, 3536, 7543, 326, 1719, 8395, 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, 2911, 12, 2890, 16, 2910, 16, 2910, 1425, 16, 2910, 7525, 1425, 16, 4688, 7525, 1425, 4672, 3536, 7543, 326, 1719, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
dic = ref_analyzer(citation_informations, citation_weight_dic_intermediate, citation_list_intermediate, reference_list_intermediate)
dic = ref_analyzer(citation_informations, citation_weight_dic_intermediate, citation_list_intermediate, reference_list_intermediate,config)
def get_citation_weight(rank_method_code, config): """return a dictionary which is used by bibrank daemon for generating the index of sorted research results by citation inforamtion """ begin_time = time.time() last_update_time = get_bibrankmethod_lastupdate(rank_method_code) #if task_get_option('verbose') >= 3: last_modified_records = get_last_modified_rec(last_update_time) write_message("Last update "+str(last_update_time)+" records: "+str(len(last_modified_records)), sys.stderr) if last_modified_records: updated_recid_list = create_recordid_list(last_modified_records) result_intermediate = last_updated_result(rank_method_code, updated_recid_list) #result_intermed should be warranted to exists! citation_weight_dic_intermediate = result_intermediate[0] citation_list_intermediate = result_intermediate[1] reference_list_intermediate = result_intermediate[2] citation_informations = get_citation_informations(updated_recid_list, config) #write_message("citation_informations: "+str(citation_informations),sys.stderr) dic = ref_analyzer(citation_informations, citation_weight_dic_intermediate, citation_list_intermediate, reference_list_intermediate) #dic is docid-numberofreferences like {1: 2, 2: 0, 3: 1} #write_message("Docid-number of known references "+str(dic),sys.stderr) end_time = time.time() print "Total time of software: ", (end_time - begin_time) else: dic = {} print "No new records added since last time this rank method was executed" return dic
8b4a8a9af6349e80f5e2d26d9d1503f19e02608b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/8b4a8a9af6349e80f5e2d26d9d1503f19e02608b/bibrank_citation_indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 71, 8773, 67, 4865, 12, 11500, 67, 2039, 67, 710, 16, 642, 4672, 3536, 2463, 279, 3880, 1492, 353, 1399, 635, 25581, 11500, 8131, 364, 12516, 326, 770, 434, 3115, 283, 3072, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 71, 8773, 67, 4865, 12, 11500, 67, 2039, 67, 710, 16, 642, 4672, 3536, 2463, 279, 3880, 1492, 353, 1399, 635, 25581, 11500, 8131, 364, 12516, 326, 770, 434, 3115, 283, 3072, 1...
return self.getSelection()[0].getPath()
x = self.getSelection()[0] if isinstance(x, eServiceReference): x = x.getPath() return x
def getFilename(self): return self.getSelection()[0].getPath()
d459fe1406ae27625c9e5988ff894f6be4a62519 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/d459fe1406ae27625c9e5988ff894f6be4a62519/FileList.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14632, 12, 2890, 4672, 327, 365, 18, 588, 6233, 1435, 63, 20, 8009, 588, 743, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14632, 12, 2890, 4672, 327, 365, 18, 588, 6233, 1435, 63, 20, 8009, 588, 743, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0:
sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, xi),1) if i == 0:
def generate_plot_points(f, xrange, plot_points=5, adaptive_tolerance=0.01, adaptive_recursion=5, randomize = True): r""" Calculate plot points for a function f in the interval xrange. The adaptive refinement algorithm for plotting a function f. See the docstring for plot for a description of the algorithm. INPUT: - ``f`` - a function of one variable - ``p1, p2`` - two points to refine between - ``plot_points`` - (default: 5) the minimal number of plot points. - ``adaptive_recursion`` - (default: 5) how many levels of recursion to go before giving up when doing adaptive refinement. Setting this to 0 disables adaptive refinement. - ``adaptive_tolerance`` - (default: 0.01) how large a difference should be before the adaptive refinement code considers it significant. See the documentation for plot() for more information. OUTPUT: - a list of points (x, f(x)) in the interval xrange, which aproximate the function f. TESTS:: sage: from sage.plot.plot import generate_plot_points sage: generate_plot_points(sin, (0, pi), plot_points=2, adaptive_recursion=0) [(0.0, 0.0), (3.1415926535897931, 1.2246...e-16)] sage: generate_plot_points(sin(x).function(x), (-pi, pi), randomize=False) [(-3.1415926535897931, -1.2246...e-16), (-2.748893571891069, -0.3826834323650898...), (-2.3561944901923448, -0.707106781186547...), (-2.1598449493429825, -0.831469612302545...), (-1.9634954084936207, -0.92387953251128674), (-1.7671458676442586, -0.98078528040323043), (-1.5707963267948966, -1.0), (-1.3744467859455345, -0.98078528040323043), (-1.1780972450961724, -0.92387953251128674), (-0.98174770424681035, -0.831469612302545...), (-0.78539816339744828, -0.707106781186547...), (-0.39269908169872414, -0.38268343236508978), (0.0, 0.0), (0.39269908169872414, 0.38268343236508978), (0.78539816339744828, 0.707106781186547...), (0.98174770424681035, 0.831469612302545...), (1.1780972450961724, 0.92387953251128674), (1.3744467859455345, 0.98078528040323043), (1.5707963267948966, 1.0), (1.7671458676442586, 0.98078528040323043), (1.9634954084936207, 0.92387953251128674), (2.1598449493429825, 0.831469612302545...), (2.3561944901923448, 0.707106781186547...), (2.748893571891069, 0.3826834323650898...), (3.1415926535897931, 1.2246...e-16)] This shows that lowering adaptive_tolerance and raising adaptive_recursion both increase the number of subdivision points:: sage: x = var('x') sage: f(x) = sin(1/x) sage: [len(generate_plot_points(f, (-pi, pi), adaptive_tolerance=i)) for i in [0.01, 0.001, 0.0001]] [42, 67, 104] sage: [len(generate_plot_points(f, (-pi, pi), adaptive_recursion=i)) for i in [5, 10, 15]] [34, 144, 897] """ x, data = var_and_list_of_values(xrange, plot_points) xmin = data[0] xmax = data[-1] delta = float(xmax-xmin) / plot_points random = current_randstate().python_random().random exceptions = 0; msg='' exception_indices = [] for i in range(len(data)): xi = data[i] # Slightly randomize the interior sample points if # randomize is true if randomize and i > 0 and i < plot_points-1: xi += delta*(random() - 0.5) try: data[i] = (float(xi), float(f(xi))) if str(data[i][1]) in ['nan', 'NaN', 'inf', '-inf']: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) exceptions += 1 exception_indices.append(i) except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: sage.misc.misc.verbose("%s\nUnable to compute f(%s)"%(msg, x),1) if i == 0: for j in range(1, 99): xj = xi + delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) elif i == plot_points-1: for j in range(1, 99): xj = xi - delta*j/100.0 try: data[i] = (float(xj), float(f(xj))) # nan != nan if data[i][1] != data[i][1]: continue break except (ZeroDivisionError, TypeError, ValueError, OverflowError), msg: pass else: exceptions += 1 exception_indices.append(i) else: exceptions += 1 exception_indices.append(i) exceptions += 1 exception_indices.append(i) data = [data[i] for i in range(len(data)) if i not in exception_indices] # adaptive refinement i, j = 0, 0 adaptive_tolerance = delta * float(adaptive_tolerance) adaptive_recursion = int(adaptive_recursion) while i < len(data) - 1: for p in adaptive_refinement(f, data[i], data[i+1], adaptive_tolerance=adaptive_tolerance, adaptive_recursion=adaptive_recursion): data.insert(i+1, p) i += 1 i += 1 if (len(data) == 0 and exceptions > 0) or exceptions > 10: sage.misc.misc.verbose("WARNING: When plotting, failed to evaluate function at %s points."%exceptions, level=0) sage.misc.misc.verbose("Last error message: '%s'"%msg, level=0) return data
53bc30b3387bfc0f18049d2b64fd1492c7912453 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/53bc30b3387bfc0f18049d2b64fd1492c7912453/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 4032, 67, 4139, 12, 74, 16, 12314, 16, 3207, 67, 4139, 33, 25, 16, 5855, 688, 67, 25456, 33, 20, 18, 1611, 16, 5855, 688, 67, 31347, 33, 25, 16, 2744, 554, 273, 1053, 467...
substring(l.create_date for 7),l.state,lot_type,l.create_uid
substring(l.create_date for 7),lot_type,l.create_uid
def init(self, cr): cr.execute(""" create or replace view report_auction_estimation_adj_category as ( select min(l.id) as id, substring(l.create_date for 7)||'-'||'01' as date, l.state as state, l.lot_type as lot_type, sum(l.lot_est1) as lot_est1, sum(l.lot_est2) as lot_est2, sum(l.obj_price) as adj_total, l.create_uid as user_id from auction_lots l,auction_dates m where l.auction_id=m.id and l.obj_price >0 and l.create_date > current_date + interval '-3 month' group by substring(l.create_date for 7),l.state,lot_type,l.create_uid ) """)
83af9d311c1190113a797464e4f3eac921eb3569 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7339/83af9d311c1190113a797464e4f3eac921eb3569/auction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605, 67, 69, 4062, 67, 395, 5115, 67, 13829, 67, 4743, 487, 261, 2027, 1131, 12, 80, 18, 350, 13, 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, 1208, 12, 2890, 16, 4422, 4672, 4422, 18, 8837, 2932, 3660, 752, 578, 1453, 1476, 2605, 67, 69, 4062, 67, 395, 5115, 67, 13829, 67, 4743, 487, 261, 2027, 1131, 12, 80, 18, 350, 13, 4...
ntime_diff = abs(ntime_merged - nvinfo_endtime)
ntime_diff = "%.01fs" % abs(ntime_merged - nvinfo_endtime)
def Exec(self, feedback_fn): """Verify integrity of cluster, performing various test on nodes.
92c1b5d6ab963f202f014f9368b83683457e8291 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/92c1b5d6ab963f202f014f9368b83683457e8291/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 8097, 24425, 434, 2855, 16, 14928, 11191, 1842, 603, 2199, 18, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 8097, 24425, 434, 2855, 16, 14928, 11191, 1842, 603, 2199, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
WHOAMI_FORMAT = re.compile("^You are .*\. valid=(.+?), trusted=(.+?).$", re.I)
WHOAMI_FORMAT = re.compile("^You are .*\. valid=(.+?)[\,\.]$", re.I)
def urlQuote(string): if isinstance(string, unicode): string = string.encode("utf-8") return urllib.quote(string, "/:")
9e24c9cecdbc17f043210ddbab6d5a6242c12962 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/9e24c9cecdbc17f043210ddbab6d5a6242c12962/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 10257, 12, 1080, 4672, 309, 1549, 12, 1080, 16, 5252, 4672, 533, 273, 533, 18, 3015, 2932, 3158, 17, 28, 7923, 327, 11527, 18, 6889, 12, 1080, 16, 2206, 2773, 13, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 880, 10257, 12, 1080, 4672, 309, 1549, 12, 1080, 16, 5252, 4672, 533, 273, 533, 18, 3015, 2932, 3158, 17, 28, 7923, 327, 11527, 18, 6889, 12, 1080, 16, 2206, 2773, 13, 225, 2, -100, ...
if selected == None: return False
def __key_press_event_cb(self, entry, event): keyname = gtk.gdk.keyval_name(event.keyval)
054e27672d643e40e7c64e89e16e0cf2dbe6b8ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6905/054e27672d643e40e7c64e89e16e0cf2dbe6b8ec/webtoolbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 856, 67, 1028, 67, 2575, 67, 7358, 12, 2890, 16, 1241, 16, 871, 4672, 27567, 273, 22718, 18, 75, 2883, 18, 856, 1125, 67, 529, 12, 2575, 18, 856, 1125, 13, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 856, 67, 1028, 67, 2575, 67, 7358, 12, 2890, 16, 1241, 16, 871, 4672, 27567, 273, 22718, 18, 75, 2883, 18, 856, 1125, 67, 529, 12, 2575, 18, 856, 1125, 13, 2, -100, -100, -100,...
linker_so='%s -mno-cygwin -mdll %s' % (self.linker_dll, entry_point))
linker_so='%s -mno-cygwin %s %s' % (self.linker_dll, shared_option, entry_point))
def __init__ (self, verbose=0, dry_run=0, force=0):
2168a6ae3bb19701d80a470cff4771668ab00d12 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/2168a6ae3bb19701d80a470cff4771668ab00d12/cygwinccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 16, 2944, 33, 20, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 2890, 16, 3988, 33, 20, 16, 10299, 67, 2681, 33, 20, 16, 2944, 33, 20, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
connectControl(combo, master, value, callback, "activated(int)", CallFront_comboBox(combo, None, control2attributeDict))
combo.cfront, combo.cback, combo.cfunc = connectControl(combo, master, value, callback, "activated(int)", CallFront_comboBox(combo, None, control2attributeDict))
def comboBox(widget, master, value, box=None, label=None, labelWidth=None, orientation='vertical', items=None, tooltip=None, callback=None, sendSelectedValue = 0, valueType = unicode, control2attributeDict = {}, emptyString = None, debuggingEnabled = 1): if box or label: hb = widgetBox(widget, box, orientation) widgetLabel(hb, label, labelWidth) else: hb = widget if tooltip: QToolTip.add(hb, tooltip) combo = QComboBox(hb) combo.box = hb if items: for i in items: combo.insertItem(unicode(i)) if len(items)>0: if sendSelectedValue and master.getdeepattr(value) in items: combo.setCurrentItem(items.index(master.getdeepattr(value))) elif not sendSelectedValue: combo.setCurrentItem(master.getdeepattr(value)) else: combo.setDisabled(True) if sendSelectedValue: control2attributeDict = dict(control2attributeDict) if emptyString: control2attributeDict[emptyString] = "" connectControl(combo, master, value, callback, "activated( const QString & )", CallFront_comboBox(combo, valueType, control2attributeDict), ValueCallbackCombo(master, value, valueType, control2attributeDict)) else: connectControl(combo, master, value, callback, "activated(int)", CallFront_comboBox(combo, None, control2attributeDict)) if debuggingEnabled: master._guiElements = getattr(master, "_guiElements", []) + [("comboBox", combo, value, sendSelectedValue, valueType, callback)] return combo
0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/0eb6f11acef0b90e11c4bafb9e83aa44e09ea65b/OWGUI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16778, 3514, 12, 6587, 16, 4171, 16, 460, 16, 3919, 33, 7036, 16, 1433, 33, 7036, 16, 1433, 2384, 33, 7036, 16, 9820, 2218, 17824, 2187, 1516, 33, 7036, 16, 11915, 33, 7036, 16, 1348, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16778, 3514, 12, 6587, 16, 4171, 16, 460, 16, 3919, 33, 7036, 16, 1433, 33, 7036, 16, 1433, 2384, 33, 7036, 16, 9820, 2218, 17824, 2187, 1516, 33, 7036, 16, 11915, 33, 7036, 16, 1348, ...
sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)]
sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)]
def __cmp__(self, other): r""" Compare self and other. If self and other are in a common ambient group, then self = other precisely if self is contained in other. EXAMPLES:: sage: G = CyclicPermutationGroup(4) sage: gens = G.gens() sage: H = DihedralGroup(4) sage: PermutationGroup_subgroup(H,list(gens)) Subgroup of Dihedral group of order 8 as a permutation group generated by [(1,2,3,4)] sage: K=PermutationGroup_subgroup(H,list(gens)) sage: G<K False sage: G>K False """ if self is other: return 0 if not isinstance(other, PermutationGroup_generic): return -1 c = cmp(self.ambient_group(), other.ambient_group()) if c: return c if self.is_subgroup(other): return -1 else: return 1
3d7a2db17ef7b85af951b4c4b603c8139fb89c43 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3d7a2db17ef7b85af951b4c4b603c8139fb89c43/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 365, 471, 1308, 18, 971, 365, 471, 1308, 854, 316, 279, 2975, 13232, 1979, 1041, 16, 1508, 365, 273, 1308, 13382, 291, 2357, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9625, 972, 12, 2890, 16, 1308, 4672, 436, 8395, 11051, 365, 471, 1308, 18, 971, 365, 471, 1308, 854, 316, 279, 2975, 13232, 1979, 1041, 16, 1508, 365, 273, 1308, 13382, 291, 2357, ...
'echo del %s' % path
'echo del "%s"' % path
def on_compare(self, path, kind, result): from os.path import join
b45eed493c16cbe98b7f918a48ebaf8000111e9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/692/b45eed493c16cbe98b7f918a48ebaf8000111e9f/cmpdirs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 9877, 12, 2890, 16, 589, 16, 3846, 16, 563, 4672, 628, 1140, 18, 803, 1930, 1233, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 9877, 12, 2890, 16, 589, 16, 3846, 16, 563, 4672, 628, 1140, 18, 803, 1930, 1233, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
_logger.debug('I am already in the room')
_logger.debug('%r: I am already in the room', self)
def got_all_members(members, local_pending, remote_pending): if members: self._text_channel_members_changed_cb('', members, (), (), (), 0, 0)
25577b1486c01197df936bb991230734bc38df7b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3113/25577b1486c01197df936bb991230734bc38df7b/activity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 67, 454, 67, 7640, 12, 7640, 16, 1191, 67, 9561, 16, 2632, 67, 9561, 4672, 309, 4833, 30, 365, 6315, 955, 67, 4327, 67, 7640, 67, 6703, 67, 7358, 2668, 2187, 4833, 16, 1832, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 67, 454, 67, 7640, 12, 7640, 16, 1191, 67, 9561, 16, 2632, 67, 9561, 4672, 309, 4833, 30, 365, 6315, 955, 67, 4327, 67, 7640, 67, 6703, 67, 7358, 2668, 2187, 4833, 16, 1832, 16...
matches = re.findall("^([0-9]*)(\.[0-9]{1,2})?([KMGT]{0,1}B)$", string)
matches = re.findall("^([0-9]*)(\.[0-9]{1,2})?([KMGT]{0,1}B)$", human)
def human_to_bytes(string, format = 'si'): """Convert a string like 10.2GB into bytes. By default use SI standard (base 10). The format of the GNU command 'du' (base 2) also supported.""" if 'si' == format: multiplier = { 'B' : 1, 'kB': 1000, 'MB': 1000**2, \ 'GB': 1000**3, 'TB': 1000**4 } matches = re.findall("^([0-9]*)(\.[0-9]{1,2})?([kMGT]{0,1}B)$", string) elif 'du' == format: multiplier = { 'B' : 1, 'KB': 1024, 'MB': 1024**2, \ 'GB': 1024**3, 'TB': 1024**4 } matches = re.findall("^([0-9]*)(\.[0-9]{1,2})?([KMGT]{0,1}B)$", string) else: raise ValueError("Invalid format: '%s'" % format) if [] == matches or 2 > len(matches[0]): raise ValueError("Invalid input for '%s' (format='%s')" % (string, format)) return int(float(matches[0][0]+matches[0][1]) * multiplier[matches[0][2]])
4935a515d81b04620ff2ab4659d81e155c21c9e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7853/4935a515d81b04620ff2ab4659d81e155c21c9e0/FileUtilities.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8672, 67, 869, 67, 3890, 12, 1080, 16, 740, 273, 296, 7722, 11, 4672, 3536, 2723, 279, 533, 3007, 1728, 18, 22, 5887, 1368, 1731, 18, 225, 2525, 805, 999, 5705, 4529, 261, 1969, 1728, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8672, 67, 869, 67, 3890, 12, 1080, 16, 740, 273, 296, 7722, 11, 4672, 3536, 2723, 279, 533, 3007, 1728, 18, 22, 5887, 1368, 1731, 18, 225, 2525, 805, 999, 5705, 4529, 261, 1969, 1728, ...
value += self._safe_read(chunk_left)
value.append(self._safe_read(chunk_left))
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = ''
469e40b614d390891d1b038fd22295ac6951dbcd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/469e40b614d390891d1b038fd22295ac6951dbcd/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 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, 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, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 2, -100, -100, -100, -100, ...