rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
files = tuple(files)
if files is None: files = sys.argv[1:]
def __init__(self, files=(), inplace=0, backup=""): if type(files) == type(''): files = (files,) else: files = tuple(files) if not files: files = tuple(sys.argv[1:]) if not files: files = ('-',) self._files = files self._inplace = inplace self._backup = backup self._savestdout = None self._output = None self._filename = None self._lineno = 0 self._filelineno = 0 self._file = None self._isstdin = 0 self._backupfilename = None
413b6a4a69e7d1143fbf5d8036bf65adb7bced6c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/413b6a4a69e7d1143fbf5d8036bf65adb7bced6c/fileinput.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1390, 33, 9334, 11783, 33, 20, 16, 5114, 1546, 6, 4672, 309, 618, 12, 2354, 13, 422, 618, 2668, 11, 4672, 1390, 273, 261, 2354, 16, 13, 469, 30, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1390, 33, 9334, 11783, 33, 20, 16, 5114, 1546, 6, 4672, 309, 618, 12, 2354, 13, 422, 618, 2668, 11, 4672, 1390, 273, 261, 2354, 16, 13, 469, 30, 309, ...
for func in itertools.repeat(self.edit_entry, number): entry = phonebook.Entry() func(entry, True)
entries = [Entry() for Entry in itertools.repeat(phonebook.Entry, number)] self.edit_entries(entries)
def _cmd_create(self, options, *args): """Interactivly create a new entry""" number = 1 if len(args) == 1: try: number = int(args[0]) except ValueError: sys.exit(_('--create needs a number')) if len(args) > 1: sys.exit(_('--create accepts only one argument')) for func in itertools.repeat(self.edit_entry, number): entry = phonebook.Entry() func(entry, True)
8ccd379498d1d27031b3b1ad7ea07c99bd6ef743 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/8ccd379498d1d27031b3b1ad7ea07c99bd6ef743/tel_console.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4172, 67, 2640, 12, 2890, 16, 702, 16, 380, 1968, 4672, 3536, 2465, 11422, 715, 752, 279, 394, 1241, 8395, 1300, 273, 404, 309, 562, 12, 1968, 13, 422, 404, 30, 775, 30, 1300, 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, 4172, 67, 2640, 12, 2890, 16, 702, 16, 380, 1968, 4672, 3536, 2465, 11422, 715, 752, 279, 394, 1241, 8395, 1300, 273, 404, 309, 562, 12, 1968, 13, 422, 404, 30, 775, 30, 1300, 2...
legendBorderX, workdayHourEnd * self.hourHeight)
legendBorderX, workdayHourEnd * self.hourHeight + 1)
def DrawBackground(self, dc): styles = self.parent self._doDrawingCalculations()
590a7421d4a56497721ad83a36a6f3eb4226407e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/590a7421d4a56497721ad83a36a6f3eb4226407e/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 8199, 12, 2890, 16, 6744, 4672, 5687, 273, 365, 18, 2938, 365, 6315, 2896, 26885, 4844, 1012, 1435, 2, 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, 10184, 8199, 12, 2890, 16, 6744, 4672, 5687, 273, 365, 18, 2938, 365, 6315, 2896, 26885, 4844, 1012, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
respect to this partition will be computed. The default is the unit partition.
respect to this set partition will be computed. The default is the unit set partition.
def canonical_label(self, partition=None, certify=False, verbosity=0, edge_labels=False): """ Returns the canonical label with respect to the partition. If no partition is given, uses the unit partition.
f6e3eeeb2a8f2125bc5ebd98cba6b22480df83c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/f6e3eeeb2a8f2125bc5ebd98cba6b22480df83c2/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7378, 67, 1925, 12, 2890, 16, 3590, 33, 7036, 16, 3320, 1164, 33, 8381, 16, 11561, 33, 20, 16, 3591, 67, 5336, 33, 8381, 4672, 3536, 2860, 326, 7378, 1433, 598, 8762, 358, 326, 3590, ...
zoom = "%s" % z str_x = "%s" % x
def render_tiles(bbox, mapfile, tile_dir, minZoom=1,maxZoom=18, name="unknown"): print "render_tiles(",bbox, mapfile, tile_dir, minZoom,maxZoom, name,")" if not os.path.isdir(tile_dir): os.mkdir(tile_dir) gprj = GoogleProjection(maxZoom+1) m = Map(2 * 256,2 * 256) load_map(m,mapfile) prj = Projection("+proj=merc +datum=WGS84") ll0 = (bbox[0],bbox[3]) ll1 = (bbox[2],bbox[1]) for z in range(minZoom,maxZoom + 1): px0 = gprj.fromLLtoPixel(ll0,z) px1 = gprj.fromLLtoPixel(ll1,z) for x in range(int(px0[0]/256.0),int(px1[0]/256.0)+1): for y in range(int(px0[1]/256.0),int(px1[1]/256.0)+1): p0 = gprj.fromPixelToLL((x * 256.0, (y+1) * 256.0),z) p1 = gprj.fromPixelToLL(((x+1) * 256.0, y * 256.0),z) # render a new tile and store it on filesystem c0 = prj.forward(Coord(p0[0],p0[1])) c1 = prj.forward(Coord(p1[0],p1[1])) bbox = Envelope(c0.x,c0.y,c1.x,c1.y) bbox.width(bbox.width() * 2) bbox.height(bbox.height() * 2) m.zoom_to_box(bbox) # check if we have directories in place zoom = "%s" % z str_x = "%s" % x str_y = "%s" % y if not os.path.isdir(tile_dir + zoom): os.mkdir(tile_dir + zoom) if not os.path.isdir(tile_dir + zoom + '/' + str_x): os.mkdir(tile_dir + zoom + '/' + str_x) tile_uri = tile_dir + zoom + '/' + str_x + '/' + str_y + '.png' exists= "" if os.path.isfile(tile_uri): exists= "exists" else: im = Image(512, 512) render(m, im) view = im.view(128,128,256,256) # x,y,width,height save_to_file(tile_uri,'png',view) command = "convert -colors 255 %s %s" % (tile_uri,tile_uri) call(command, shell=True) bytes=os.stat(tile_uri)[6] empty= '' if bytes == 137: empty = " Empty Tile " print name,"[",minZoom,"-",maxZoom,"]: " ,z,x,y,"p:",p0,p1,exists, empty
a7fa294241e329e31de538f00c7cf3d366e08c29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9131/a7fa294241e329e31de538f00c7cf3d366e08c29/generate_tiles.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 28366, 12, 20737, 16, 852, 768, 16, 4769, 67, 1214, 16, 1131, 11497, 33, 21, 16, 1896, 11497, 33, 2643, 16, 508, 1546, 8172, 6, 4672, 1172, 315, 5902, 67, 28366, 2932, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 28366, 12, 20737, 16, 852, 768, 16, 4769, 67, 1214, 16, 1131, 11497, 33, 21, 16, 1896, 11497, 33, 2643, 16, 508, 1546, 8172, 6, 4672, 1172, 315, 5902, 67, 28366, 2932, 16, ...
package = __import__(name) name = path
package = __import__(pathOrName) if '.' in pathOrName: subname = 'package' + pathOrName[string.find(pathOrName, '.'):] package = eval(subname) name = pathOrName
def documentPackage0(path, builder=DocBuilder0()): """Generate documentation for one Python package in some format. Rigiht now, 'path' must be a filesystem path, later it will also be a package name whose path will be resolved by importing the top-level module. The doc file will always be saved in the current directory. """ name = path if string.find(path, os.sep) > -1: name = os.path.splitext(os.path.basename(path))[0] else: package = __import__(name) name = path path = os.path.dirname(package.__file__) cwd = os.getcwd() builder.beginPackage(name) os.path.walk(path, _packageWalkCallback, builder) builder.endPackage(name) os.chdir(cwd)
55005c7079d87799b39b50803338d97c2a77c532 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/55005c7079d87799b39b50803338d97c2a77c532/graphicsdoc0.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 2261, 20, 12, 803, 16, 2089, 33, 1759, 1263, 20, 1435, 4672, 3536, 4625, 7323, 364, 1245, 6600, 2181, 316, 2690, 740, 18, 225, 534, 360, 77, 647, 2037, 16, 296, 803, 11, 1297, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1668, 2261, 20, 12, 803, 16, 2089, 33, 1759, 1263, 20, 1435, 4672, 3536, 4625, 7323, 364, 1245, 6600, 2181, 316, 2690, 740, 18, 225, 534, 360, 77, 647, 2037, 16, 296, 803, 11, 1297, ...
self.eventTimeFont = smallBoldFont self.legendFont = smallFont
self.eventLabelHeight = Styles.getMeasurements(defaultFont).height self.eventTimeFont = defaultBoldFont self.legendFont = defaultFont
def InitializeStyles(self): # This is where all the styles come from if '__WXMAC__' in wx.PlatformInfo: bigFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.NORMAL) bigBoldFont = wx.Font(13, wx.NORMAL, wx.NORMAL, wx.BOLD) smallFont = wx.Font(11, wx.SWISS, wx.NORMAL, wx.NORMAL, face="Verdana") smallBoldFont = wx.Font(10, wx.SWISS, wx.NORMAL, wx.BOLD, face="Verdana") else: bigFont = wx.Font(11, wx.NORMAL, wx.NORMAL, wx.NORMAL) bigBoldFont = wx.Font(11, wx.NORMAL, wx.NORMAL, wx.BOLD) smallFont = wx.Font(9, wx.SWISS, wx.NORMAL, wx.NORMAL, face="Verdana") smallBoldFont = wx.Font(8, wx.SWISS, wx.NORMAL, wx.BOLD, face="Verdana")
8eace90be88e98cc9d34c820558edb9e140b1b26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/8eace90be88e98cc9d34c820558edb9e140b1b26/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9190, 9725, 12, 2890, 4672, 468, 1220, 353, 1625, 777, 326, 5687, 12404, 628, 309, 4940, 59, 60, 10875, 7250, 316, 7075, 18, 8201, 966, 30, 225, 5446, 5711, 273, 7075, 18, 5711, 12, 34...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9190, 9725, 12, 2890, 4672, 468, 1220, 353, 1625, 777, 326, 5687, 12404, 628, 309, 4940, 59, 60, 10875, 7250, 316, 7075, 18, 8201, 966, 30, 225, 5446, 5711, 273, 7075, 18, 5711, 12, 34...
numargs = f.func_code.co_argcount if hasattr(f,"im_self"): numargs -= 1
numargs = codeObj.co_argcount if not _PY3K: if hasattr(f,"im_self"): numargs -= 1 else: if hasattr(f,"__self__"): numargs -= 1
def _normalizeParseActionArgs( f ): """Internal method used to decorate parse actions that take fewer than 3 arguments, so that all parse actions can be called as f(s,l,t).""" STAR_ARGS = 4
33883f48f6824f787e8351de12e152523ca1309a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12364/33883f48f6824f787e8351de12e152523ca1309a/pyparsing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12237, 3201, 1803, 2615, 12, 284, 262, 30, 3536, 3061, 707, 1399, 358, 15752, 1109, 4209, 716, 4862, 27886, 2353, 890, 1775, 16, 1427, 716, 777, 1109, 4209, 848, 506, 2566, 487, 284...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12237, 3201, 1803, 2615, 12, 284, 262, 30, 3536, 3061, 707, 1399, 358, 15752, 1109, 4209, 716, 4862, 27886, 2353, 890, 1775, 16, 1427, 716, 777, 1109, 4209, 848, 506, 2566, 487, 284...
cur_line.append(chunks.pop(0))
cur_line.append(reversed_chunks.pop())
def _handle_long_word(self, chunks, cur_line, cur_len, width): """_handle_long_word(chunks : [string], cur_line : [string], cur_len : int, width : int)
8bfa8935ea2fc645e5f166f180c2ba18cf11ade3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8bfa8935ea2fc645e5f166f180c2ba18cf11ade3/textwrap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 5748, 67, 1095, 12, 2890, 16, 6055, 16, 662, 67, 1369, 16, 662, 67, 1897, 16, 1835, 4672, 3536, 67, 4110, 67, 5748, 67, 1095, 12, 14691, 294, 306, 1080, 6487, 662, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 67, 5748, 67, 1095, 12, 2890, 16, 6055, 16, 662, 67, 1369, 16, 662, 67, 1897, 16, 1835, 4672, 3536, 67, 4110, 67, 5748, 67, 1095, 12, 14691, 294, 306, 1080, 6487, 662, 67,...
char.socket.clilocmessage(501677)
char.socket.clilocmessage(501677)
def copy_response(char, args, target): if len(args) != 1: return key = wolfpack.finditem(args[0]) if not key or not char.canreach(key,5): char.socket.clilocmessage(501661) return # Check if the targetted item is a key if not target.item or not target.item.hasscript( 'key' ): char.socket.clilocmessage(501679) return # Also a blank key? if not target.item.hastag('lock'): char.socket.clilocmessage(501675) return # Check if the player can reach the item if not char.canreach(target.item,5): char.socket.clilocmessage(501661) return # Tinkering check (15%-30%, 25% chance of loosing the key on failure) if char.checkskill(TINKERING, 150, 300): key.settag('lock',target.item.gettag('lock')) key.resendtooltip() char.socket.clilocmessage(501676) else: char.socket.clilocmessage(501677) # 25% chance of destroying the blank key if random.randint(1,4) == 1: char.socket.clilocmessage(501678) key.remove()
516c1fcdf800cd69abc81c17dada3a6bf321ca8c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/516c1fcdf800cd69abc81c17dada3a6bf321ca8c/key.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 2740, 12, 3001, 16, 833, 16, 1018, 4672, 309, 562, 12, 1968, 13, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 1968, 63, 20, 5717, 309, 486, 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, 1610, 67, 2740, 12, 3001, 16, 833, 16, 1018, 4672, 309, 562, 12, 1968, 13, 480, 404, 30, 327, 225, 498, 273, 341, 355, 74, 2920, 18, 4720, 1726, 12, 1968, 63, 20, 5717, 309, 486, 4...
"return None for a non-3d-arrow-key, or a direction vector for one, taken from space or DEFAULT_DIRECTIONS"
""" return None for a non-3d-arrow-key, or a direction vector for one, taken from space or DEFAULT_DIRECTIONS """
def interpret_arrow_key( key, space = None): ###TODO: pass space if nec. "return None for a non-3d-arrow-key, or a direction vector for one, taken from space or DEFAULT_DIRECTIONS" if not space: space = DEFAULT_DIRECTIONS if key == Qt.Key_Up: # 4115:# up means in = lineofsight = away from user return space.away elif key == Qt.Key_Down: # 4117: # down means out = towards user return space.towards elif key == Qt.Key_Left: # 4114: # left, right mean themselves return space.left elif key == Qt.Key_Right: # 4116: return space.right elif key == Qt.Key_PageUp: # 4118: # pageup means up return space.up elif key == Qt.Key_PageDown: # 4119: # pagedown means down return space.down return None
55ac4fdc2a170bd52fcbe417587721669a976b6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/55ac4fdc2a170bd52fcbe417587721669a976b6f/test_animation_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10634, 67, 7815, 67, 856, 12, 498, 16, 3476, 273, 599, 4672, 11849, 6241, 30, 1342, 3476, 309, 290, 557, 18, 3536, 327, 599, 364, 279, 1661, 17, 23, 72, 17, 7815, 17, 856, 16, 578, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10634, 67, 7815, 67, 856, 12, 498, 16, 3476, 273, 599, 4672, 11849, 6241, 30, 1342, 3476, 309, 290, 557, 18, 3536, 327, 599, 364, 279, 1661, 17, 23, 72, 17, 7815, 17, 856, 16, 578, ...
self.name + " timeout<br/>")
self.name + " timeout<br/>\n")
def evaluateCommand(self, cmd): superResult = ShellCommand.evaluateCommand(self, cmd) for line in cmd.logs['stdio'].readlines(channel=HEADER): if "command timed out" in line: self.addCompleteLog('timeout', 'buildbot.slave.commands.TimeoutError: ' + line + "TinderboxPrint: " + self.name + " timeout<br/>") return WARNINGS return superResult
44285a5e9897db163049b2b02667f728f954c944 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13067/44285a5e9897db163049b2b02667f728f954c944/steps.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 2189, 12, 2890, 16, 1797, 4672, 2240, 1253, 273, 19433, 2189, 18, 21024, 2189, 12, 2890, 16, 1797, 13, 364, 980, 316, 1797, 18, 10011, 3292, 5084, 1594, 29489, 896, 3548, 12, 4327,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5956, 2189, 12, 2890, 16, 1797, 4672, 2240, 1253, 273, 19433, 2189, 18, 21024, 2189, 12, 2890, 16, 1797, 13, 364, 980, 316, 1797, 18, 10011, 3292, 5084, 1594, 29489, 896, 3548, 12, 4327,...
return self.startb == 0 and self.lenb == 0
remove = self.gitpatch is None or self.gitpatch.op == 'DELETE' return self.startb == 0 and self.lenb == 0 and remove
def rmfile(self): return self.startb == 0 and self.lenb == 0
5a1443f44e92507e3b48da11d3cd85f591d0a29e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/5a1443f44e92507e3b48da11d3cd85f591d0a29e/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 768, 12, 2890, 4672, 327, 365, 18, 1937, 70, 422, 374, 471, 365, 18, 1897, 70, 422, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6692, 768, 12, 2890, 4672, 327, 365, 18, 1937, 70, 422, 374, 471, 365, 18, 1897, 70, 422, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
return { 'VOName': certinfo['FQAN'], 'ReportableVOName': certinfo['VO'] } def readCertInfo(localJobId, probeName)
return { 'VOName': certInfo['FQAN'], 'ReportableVOName': certInfo['VO'] } def readCertInfo(localJobId, probeName):
def verifyFromCertInfo(xmlDoc, userIdentityNode, namespace, prefix): " Use localJobID and probeName to find cert info file and insert info into XML record" # Collect data needed by certinfo reader JobIdentityNode = GetNode(xmlDoc.getElementsByTagNameNS(namespace, 'JobIdentity')) if JobIdentityNode == None: return localJobId = GetNodeData(JobIdentityNode.getElementsByTagNameNS(namespace, 'LocalJobId')) usageRecord = userIdentityNode.parentNode probeName = GetNodeData(usageRecord.getElementsByTagNameNS(namespace, 'ProbeName')) # Read certinfo certInfo = readCertInfo(localJobId, probeName) if certInfo == None or not certInfo.hasKey('DN') or not certInfo['DN']: return # Use certinfo # First, find a KeyInfo node or make one: keyInfoNS = 'http://www.w3.org/2000/09/xmldsig#'; keyInfoNode = GetNode(userIdentityNode.getElementsByTagNameNS(keyInfoNS, 'KeyInfo')) if not keyInfoNode: keyInfoNode = xmlDoc.createElementNS(keyInfoNS, 'ds:KeyInfo') keyInfoNode.setAttribute('xmlns:ds', keyInfoNS) # Namespace prefix definition # Next, find an X509Data node or make one: x509DNodes = keyInfoNode.getElementsByTagNameNS(keyInfoNS, 'X509Data') needDNode = True if x509DNodes: for x509DNode in x509DNodes: if GetNodeData(x509DNode.getElementsByTagNameNS(keyInfoNS, 'X509SubjectName')) \ == certInfo['DN']: needDNode = False break if needDNode: x509DNode = xmlDoc.createElementNS(keyInfoNS, 'ds:X509Data') x509SNode = xmlDoc.createElementNS(keyInfoNS, 'ds:X509SubjectName') textNode = xmlDoc.createTextNode(certinfo['DN']) # "Standard" slash format x509SNode.appendChild(textNode) x509DNode.appendChild(x509SNode) keyInfoNode.appendChild(x509DNode) if not keyInfoNode.parentNode: userIdentityNode.appendChild(keyInfoNode) # Return VO information for insertion in a common place. return { 'VOName': certinfo['FQAN'], 'ReportableVOName': certinfo['VO'] }
51ede0c708fe8defac686f35f9a8d75038b92238 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/637/51ede0c708fe8defac686f35f9a8d75038b92238/Gratia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 1265, 5461, 966, 12, 2902, 1759, 16, 729, 4334, 907, 16, 1981, 16, 1633, 4672, 315, 2672, 1191, 2278, 734, 471, 10695, 461, 358, 1104, 3320, 1123, 585, 471, 2243, 1123, 1368, 3167,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3929, 1265, 5461, 966, 12, 2902, 1759, 16, 729, 4334, 907, 16, 1981, 16, 1633, 4672, 315, 2672, 1191, 2278, 734, 471, 10695, 461, 358, 1104, 3320, 1123, 585, 471, 2243, 1123, 1368, 3167,...
(0, top, x_inc, height, 'rgb(0, 29, 66)'), (x_inc, top, x_inc, height, 'rgb(255, 255, 255)'), (x_inc*2, top, x_inc, height, 'rgb(44, 0, 92)'),
(0, top, sixth, height, 'rgb(0, 29, 66)'), (sixth, top, sixth, height, 'rgb(255, 255, 255)'), (2*sixth, top, sixth, height, 'rgb(44, 0, 92)'),
def draw(self, drawing, frame=1): assert isinstance(drawing, Drawing) log.debug("Drawing ColorBars") x, y = self.position width, height = self.size
8a91922ea2d416450320cef316b3abf37499fcfd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4675/8a91922ea2d416450320cef316b3abf37499fcfd/layer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 16327, 16, 2623, 33, 21, 4672, 1815, 1549, 12, 9446, 310, 16, 10184, 310, 13, 613, 18, 4148, 2932, 26885, 5563, 5190, 87, 7923, 619, 16, 677, 273, 365, 18, 3276, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 16327, 16, 2623, 33, 21, 4672, 1815, 1549, 12, 9446, 310, 16, 10184, 310, 13, 613, 18, 4148, 2932, 26885, 5563, 5190, 87, 7923, 619, 16, 677, 273, 365, 18, 3276, ...
keyval = gdk.keyval_to_lower(event.keyval) if keyval != event.keyval and not event.get_state() & gdk.LOCK_MASK:
keyval_lower = gdk.keyval_to_lower(keyval) if keyval_lower != keyval:
def key_press_cb(self, widget, event): if not self.enabled: return # See gtk sourcecode in gtkmenu.c function gtk_menu_key_press, # which uses the same code as below when changing an accelerator. keymap = gdk.keymap_get_default() # figure out what modifiers went into determing the keyval res = keymap.translate_keyboard_state(event.hardware_keycode, event.state, event.group) if not res: # PyGTK returns None when gdk_keymap_translate_keyboard_state() returns false. # Not sure if this is a bug or a feature - the only time I have seen this # happen is when I put my laptop into sleep mode. print 'Warning: translate_keyboard_state() returned None. Strange key pressed?' return trash1, trash2, trash3, consumed_modifiers = res # We want to ignore irrelevant modifiers like ScrollLock. # The stored key binding does not include modifiers that affected its keyval. modifiers = event.state & gtk.accelerator_get_default_mod_mask() & ~consumed_modifiers # Except that key bindings are always stored in lowercase. keyval = gdk.keyval_to_lower(event.keyval) if keyval != event.keyval and not event.get_state() & gdk.LOCK_MASK: modifiers |= gdk.SHIFT_MASK action = self.keymap.get((keyval, modifiers)) if not action: # try hardcoded keys action = self.keymap2.get((keyval, modifiers))
beb7bec80f0be5369eb4975a97bf9a095b1a4e97 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/beb7bec80f0be5369eb4975a97bf9a095b1a4e97/keyboard.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 1028, 67, 7358, 12, 2890, 16, 3604, 16, 871, 4672, 309, 486, 365, 18, 5745, 30, 327, 468, 2164, 22718, 1084, 710, 316, 22718, 5414, 18, 71, 445, 22718, 67, 5414, 67, 856, 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, 498, 67, 1028, 67, 7358, 12, 2890, 16, 3604, 16, 871, 4672, 309, 486, 365, 18, 5745, 30, 327, 468, 2164, 22718, 1084, 710, 316, 22718, 5414, 18, 71, 445, 22718, 67, 5414, 67, 856, 67...
for i in range(len(attrList)):
for i in range(len(attr_tmp_list)):
def getAttributesForJobList(self,jobIDList,attrList=[]): """ Get attributes for the jobs in the the jobIDList. Returns an S_OK structure with a dictionary of dictionaries as its Value: ValueDict[jobID][attribute_name] = attribute_value """
2cdc052871bad4a94040dc59b4de126b09c4e209 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12864/2cdc052871bad4a94040dc59b4de126b09c4e209/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10183, 1290, 2278, 682, 12, 2890, 16, 4688, 24583, 16, 1747, 682, 33, 8526, 4672, 3536, 968, 1677, 364, 326, 6550, 316, 326, 326, 1719, 24583, 18, 2860, 392, 348, 67, 3141, 3695, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10183, 1290, 2278, 682, 12, 2890, 16, 4688, 24583, 16, 1747, 682, 33, 8526, 4672, 3536, 968, 1677, 364, 326, 6550, 316, 326, 326, 1719, 24583, 18, 2860, 392, 348, 67, 3141, 3695, 598, ...
suff = suff[1:]
def is_cube_free(self): r""" Returns True if self does not contain cubes, and False otherwise. EXAMPLES:: sage: W = Words('123') sage: W('12312').is_cube_free() True sage: W('32221').is_cube_free() False sage: W().is_cube_free() True """ l = self.length() if l < 3: return True suff = self for i in xrange(0, l - 3): for ll in xrange(3, l-i+1, 3): if suff[:ll].is_cube(): return False suff = suff[1:] return True
608ca0250585b254464e69042498a89fb0e15156 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/608ca0250585b254464e69042498a89fb0e15156/finite_word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 21186, 67, 9156, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 365, 1552, 486, 912, 276, 23317, 16, 471, 1083, 3541, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 678, 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, 353, 67, 21186, 67, 9156, 12, 2890, 4672, 436, 8395, 2860, 1053, 309, 365, 1552, 486, 912, 276, 23317, 16, 471, 1083, 3541, 18, 225, 5675, 8900, 11386, 2866, 225, 272, 410, 30, 678, 27...
template = """ <profile namespace="condor" key="universe">%s</profile>"""
template = """ <profile namespace="condor" key="universe">%s</profile>\n"""
def write_abstract_dag(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dax_file_path: # this workflow is not dax-compatible, so don't write a dax return try: dagfile = open( self.__dax_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
a7bd5749d7e3884dc25892a5f5265bab9a159fab /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a7bd5749d7e3884dc25892a5f5265bab9a159fab/pipeline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 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, 1045, 67, 17801, 67, 30204, 12, 2890, 4672, 3536, 2598, 777, 326, 2199, 316, 326, 6095, 358, 326, 463, 2501, 585, 18, 3536, 309, 486, 365, 16186, 72, 651, 67, 768, 67, 803, 30, 468, ...
"""Return a list with the distribution of k-dcrossings on complete matchings on n vertices.
""" Return a list with the distribution of k-dcrossings on complete matchings on n vertices.
def dcrossvec_cm(n): """Return a list with the distribution of k-dcrossings on complete matchings on n vertices. INPUT: n -- a nonnegative integer. OUTPUT: A list whose k'th entry is the number of complete matchings m for which dcrossing(m) = k. For example, let L = dcrossvec_cm(4). We have L = [0, 1, 0, 2]. L[1] is 1 because there's one matching on 4 vertices that is 1-dcrossing: [(2, 4), (1, 3)]. L[0] is zero because dcrossing() returns the *largest* k for which the matching has a dcrossing, and 0-dcrossing is equivalent to 1-dcrossing for complete matchings. One tricky bit is that noncrossing matchings get put at the end, because L[-1] is the last element of the list. Because of this, you should not think of the last element of the list as having index n-1, but rather -1. If n is negative, you get silly results. Don't use them in your next paper. :) EXAMPLES: The single complete matching on 2 vertices has no crossings, so the only nonzero entry of the list (the last entry) is 1: sage: from sage.tests.arxiv_0812_2725 import * sage: dcrossvec_cm(2) [0, 1] Similarly, the empty matching has no crossings: sage: dcrossvec_cm(0) [1] For odd n, there are no complete matchings, so the list has all zeros: sage: dcrossvec_cm(5) [0, 0, 0, 0, 0] sage: dcrossvec_cm(4) [0, 1, 0, 2] """ vec = [0] * max(n, 1) for m in CompleteMatchings(n): vec[dcrossing(m)] += 1 return vec
17c4a709968ba110a1cc8691b92c5f9d2030c4bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/17c4a709968ba110a1cc8691b92c5f9d2030c4bd/arxiv_0812_2725.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6744, 3984, 8799, 67, 7670, 12, 82, 4672, 3536, 2000, 279, 666, 598, 326, 7006, 434, 417, 17, 7201, 3984, 899, 603, 3912, 845, 899, 603, 290, 6928, 18, 225, 12943, 30, 290, 1493, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6744, 3984, 8799, 67, 7670, 12, 82, 4672, 3536, 2000, 279, 666, 598, 326, 7006, 434, 417, 17, 7201, 3984, 899, 603, 3912, 845, 899, 603, 290, 6928, 18, 225, 12943, 30, 290, 1493, 279, ...
ld t1, ds, [scale, index, base], disp
ld t1, ds, [0, t0, t7], disp
def macroop ADC_P_I
edaaf1ebf1461b20c0bfa06472d5188a975e47c7 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6787/edaaf1ebf1461b20c0bfa06472d5188a975e47c7/add_and_subtract.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11522, 556, 432, 5528, 67, 52, 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, 432, 5528, 67, 52, 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, ...
gloss.set_languages_list(language, self.gl_get_language_name(language))
gloss.set_languages_list(language, language_name) gloss.updateObjectsByLang(language_name)
def gl_add_site_language_custom(self, language): #this is called to handle other types of multilanguage objects catalog_tool = self.getCatalogTool() for b in self.getCatalogedBrains(meta_type=[METATYPE_NYPHOTOFOLDER, METATYPE_NYPHOTO]): x = catalog_tool.getobject(b.data_record_id_) try: x.add_language(language) except: pass for r in self.objectValues(METATYPE_NYNETREPOSITORY): try: r.add_language(language) except: pass for gloss in self.objectValues(NAAYAGLOSSARY_CENTRE_METATYPE): try: catalog_obj = gloss._getOb(NAAYAGLOSSARY_CATALOG_NAME) index_extra = record() index_extra.default_encoding = 'utf-8' try: catalog_obj.manage_addIndex(self.gl_get_language_name(language), 'TextIndexNG2',index_extra) except: pass gloss.set_languages_list(language, self.gl_get_language_name(language)) gloss._p_changed = 1 except: pass
689b817caf4be4890bbdc9e78f66d0be95861f90 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/689b817caf4be4890bbdc9e78f66d0be95861f90/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5118, 67, 1289, 67, 4256, 67, 4923, 67, 3662, 12, 2890, 16, 2653, 4672, 468, 2211, 353, 2566, 358, 1640, 1308, 1953, 434, 1778, 330, 1701, 2184, 6222, 67, 6738, 273, 365, 18, 588, 9769...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5118, 67, 1289, 67, 4256, 67, 4923, 67, 3662, 12, 2890, 16, 2653, 4672, 468, 2211, 353, 2566, 358, 1640, 1308, 1953, 434, 1778, 330, 1701, 2184, 6222, 67, 6738, 273, 365, 18, 588, 9769...
api = ComponentAPI()
keyfile, certfile = get_keypair(None) api = ComponentAPI(key_file=keyfile, cert_file=certfile)
def start(): logger.log("sfagid: plugin starting up ...") if not sfa: return api = ComponentAPI() api.get_node_key()
a1b8649eb48bec7cddb692f115cdc806eddc9baf /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6995/a1b8649eb48bec7cddb692f115cdc806eddc9baf/sfagids.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 13332, 1194, 18, 1330, 2932, 21668, 346, 350, 30, 1909, 5023, 731, 1372, 7923, 309, 486, 272, 507, 30, 327, 28632, 16, 3320, 768, 273, 336, 67, 856, 6017, 12, 7036, 13, 1536, 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, 787, 13332, 1194, 18, 1330, 2932, 21668, 346, 350, 30, 1909, 5023, 731, 1372, 7923, 309, 486, 272, 507, 30, 327, 28632, 16, 3320, 768, 273, 336, 67, 856, 6017, 12, 7036, 13, 1536, 273,...
if os.path.exists('build'): shutil.rmtree('build')
def _build_sdist(projdir, destdir, version): """Build an sdist out of a develop egg.""" startdir = os.getcwd() try: os.chdir(projdir) # clean up any old builds if os.path.exists('build'): shutil.rmtree('build') _build_dist('sdist', destdir) if sys.platform == 'win32': # turn .zip file into .tar.gz file so setuptools will find it on the server base = os.path.join(destdir, os.path.basename(projdir)+'-%s' % version) zipname = base+'.zip' tarname = base+'.tar.gz' logging.debug('converting %s to %s' % (zipname, tarname)) zarch = zipfile.ZipFile(zipname, 'r') zarch.extractall() zarch.close() archive = tarfile.open(tarname, 'w:gz') archive.add(os.path.basename(base)) archive.close() print 'listdirs = ', os.listdir('.') print 'removing %s' % zipname os.remove(zipname) print 'removing tree of %s' % base shutil.rmtree(base) if os.path.exists('build'): shutil.rmtree('build') finally: os.chdir(startdir)
e7671d63e42e8a55f702624f7303cbc1c9d851c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/e7671d63e42e8a55f702624f7303cbc1c9d851c4/mkrelease.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3510, 67, 87, 4413, 12, 17995, 1214, 16, 1570, 1214, 16, 1177, 4672, 3536, 3116, 392, 272, 4413, 596, 434, 279, 17196, 25144, 12123, 787, 1214, 273, 1140, 18, 588, 11089, 1435, 775,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3510, 67, 87, 4413, 12, 17995, 1214, 16, 1570, 1214, 16, 1177, 4672, 3536, 3116, 392, 272, 4413, 596, 434, 279, 17196, 25144, 12123, 787, 1214, 273, 1140, 18, 588, 11089, 1435, 775,...
pass
pass
def unregister(): pass
9e019cf6920a9a6529b88274f9a1869e7c61caea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11963/9e019cf6920a9a6529b88274f9a1869e7c61caea/render_to_print.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 13332, 1342, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10232, 13332, 1342, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.parser.tokenizer.state = self.parser.tokenizer.states[stateFlags[name]]
self.parser.tokenizer.contentModelFlag = contentModelFlags[cmFlags[name]]
def startTagTitleStyle(self, name, attributes): stateFlags = {"title":"RCDATA", "style":"CDATA"} element = self.parser.createElement(name, attributes) self.appendToHead(element) self.parser.tokenizer.state = self.parser.tokenizer.states[stateFlags[name]] # We have to start collecting characters self.collectingCharacters = True self.collectionStartTag = name
6bc7941c16c64cd9f9d3fb7afe784cbd71460eba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10463/6bc7941c16c64cd9f9d3fb7afe784cbd71460eba/parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 4247, 2885, 12, 2890, 16, 508, 16, 1677, 4672, 919, 5094, 273, 12528, 2649, 15563, 11529, 4883, 3113, 315, 4060, 15563, 18375, 6, 97, 930, 273, 365, 18, 4288, 18, 2640, 1046, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1805, 4247, 2885, 12, 2890, 16, 508, 16, 1677, 4672, 919, 5094, 273, 12528, 2649, 15563, 11529, 4883, 3113, 315, 4060, 15563, 18375, 6, 97, 930, 273, 365, 18, 4288, 18, 2640, 1046, ...
except TypeError: l.append(" = ".join((path, str(value))))
else: l.append("%s = %s" % (label(path), str(value)))
def difference(sets): # fully-qualified names of attributes with first value visited = {} # fully-qualified names of differing attributes diff = {} # fully-qualified names with value for each parameter set attrs = [] # iterate over parameter sets for parameters in sets: pairs = [] # iterate over all nodes in parameters group for node in parameters._f_walkNodes(): # iterate over attribute names in node for attr in node._v_attrs._f_list(): # fully-qualified attribute name path = node._v_name + "/" + attr value = node._v_attrs.__getattr__(attr) pairs.append((path, value)) if not path in visited: visited[path] = value elif not visited[path] == value: diff[path] = True attrs.append(pairs) # plot labels labels = [] for pairs in attrs: l = [] for (path, value) in pairs: if path in diff: try: # parameter with doubleing-point value l.append("%s = %.3G" % (label(path), value)) except TypeError: # parameter with arbitrary value l.append(" = ".join((path, str(value)))) labels.append(", ".join(l)) return labels
c03462f63f92a92d3dcb9f9947007d599c513400 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10316/c03462f63f92a92d3dcb9f9947007d599c513400/parameter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7114, 12, 4424, 4672, 468, 7418, 17, 19724, 1257, 434, 1677, 598, 1122, 460, 9711, 273, 2618, 468, 7418, 17, 19724, 1257, 434, 15221, 310, 1677, 3122, 273, 2618, 468, 7418, 17, 19724, 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, 7114, 12, 4424, 4672, 468, 7418, 17, 19724, 1257, 434, 1677, 598, 1122, 460, 9711, 273, 2618, 468, 7418, 17, 19724, 1257, 434, 15221, 310, 1677, 3122, 273, 2618, 468, 7418, 17, 19724, 12...
def bookmarkReference(self, name):
def _bookmarkReference(self, name):
def bookmarkReference(self, name): """get a reference to a (possibly undefined, possibly unbound) bookmark""" d = self._destinations try: return d[name] except: result = d[name] = pdfdoc.Destination(name) # newly defined, unbound return result
2424475e071e1c37b73f3c67658b0731bda9a15e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/2424475e071e1c37b73f3c67658b0731bda9a15e/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3618, 3355, 2404, 12, 2890, 16, 508, 4672, 3536, 588, 279, 2114, 358, 279, 261, 917, 8781, 3109, 16, 10016, 30177, 13, 13696, 8395, 302, 273, 365, 6315, 10488, 10144, 775, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3618, 3355, 2404, 12, 2890, 16, 508, 4672, 3536, 588, 279, 2114, 358, 279, 261, 917, 8781, 3109, 16, 10016, 30177, 13, 13696, 8395, 302, 273, 365, 6315, 10488, 10144, 775, 30, 327, ...
SRM_SIZE=`srm-get-metadata %s 2>/dev/null | grep 'size :[0-9]' | cut -f2 -d":"`
SRM_SIZE=`srm-get-metadata -retry_num=0 %s 2>/dev/null | grep 'size :[0-9]' | cut -f2 -d":"`
def createStageOutCommand(self, sourcePFN, targetPFN, options = None): """ _createStageOutCommand_
e508055f166572617c81472ef522ae198cdd6c4f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8887/e508055f166572617c81472ef522ae198cdd6c4f/SRMImpl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 8755, 1182, 2189, 12, 2890, 16, 1084, 52, 19793, 16, 1018, 52, 19793, 16, 702, 273, 599, 4672, 3536, 389, 2640, 8755, 1182, 2189, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 8755, 1182, 2189, 12, 2890, 16, 1084, 52, 19793, 16, 1018, 52, 19793, 16, 702, 273, 599, 4672, 3536, 389, 2640, 8755, 1182, 2189, 67, 2, -100, -100, -100, -100, -100, -100, -100, ...
if message[1] in self._message_handlers: message_id = message[1] channel_id = ord(message[2]) frequency = ord(message[3]) << 8 | ord(message[4])
message_id = message[1] channel_id = ord(message[2]) frequency = ord(message[3]) << 8 | ord(message[4]) if message_id in self._message_handlers:
def handle_request(self, permid, selversion, message): """ Received CRAWLER_REQUEST message from OverlayApps """ if selversion >= OLPROTO_VER_SEVENTH and len(message) >= 5: if message[1] in self._message_handlers:
9b8406fc5766270ec88644481348ce3943e64485 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/9b8406fc5766270ec88644481348ce3943e64485/Crawler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 2293, 12, 2890, 16, 4641, 350, 16, 357, 1589, 16, 883, 4672, 3536, 21066, 385, 10821, 14668, 67, 5519, 883, 628, 26834, 16339, 3536, 309, 357, 1589, 1545, 531, 48, 25455, 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, 1640, 67, 2293, 12, 2890, 16, 4641, 350, 16, 357, 1589, 16, 883, 4672, 3536, 21066, 385, 10821, 14668, 67, 5519, 883, 628, 26834, 16339, 3536, 309, 357, 1589, 1545, 531, 48, 25455, 67, ...
rawvar = ExprVar('rawmem') allocShmem.addstmt(StmtDecl( Decl(_autoptr(_rawShmemType()), rawvar.name), initargs=[ _shmemAlloc(sizevar) ])) failif = StmtIf(ExprNot(rawvar)) failif.addifstmt(StmtReturn(ExprLiteral.FALSE)) allocShmem.addstmt(failif) handlevar = ExprVar('handle') allocShmem.addstmt(StmtDecl( Decl(_shmemHandleType(), handlevar.name))) failif = StmtIf(ExprNot(ExprCall( ExprSelect(rawvar, '->', 'ShareToProcess'), args=[ ExprCall(p.otherProcessMethod()), ExprAddrOf(handlevar) ]))) failif.addifstmt(StmtReturn(ExprLiteral.FALSE)) allocShmem.addstmt(failif) allocShmem.addstmt(StmtDecl( Decl(_shmemIdType(), idvar.name), ExprCall(p.registerShmemVar(), args=[ rawvar ]))) msgvar = ExprVar('msg') allocShmem.addstmt(StmtDecl( Decl(Type('Message', ptr=1), msgvar.name), ExprNew(Type(_shmemCreatedMsgVar().name), args=[ p.routingId(), handlevar, idvar, sizevar ]))) failif = StmtIf(ExprNot(ExprCall( ExprSelect(p.channelVar(), p.channelSel(), 'Send'), args=[ msgvar ]))) failif.addifstmts([ StmtExpr(ExprCall(p.unregisterShmemVar(), args=[ idvar ])), StmtReturn(ExprLiteral.FALSE) ]) allocShmem.addstmt(failif)
ifallocfails = StmtIf(ExprNot(rawvar)) ifallocfails.addifstmt(StmtReturn(ExprLiteral.FALSE))
def makeShmemIface(self): p = self.protocol idvar = ExprVar('aId')
55736d114f5decf54ef10e9091f3ec3c037fb43b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11102/55736d114f5decf54ef10e9091f3ec3c037fb43b/lower.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 1555, 3917, 45, 865, 12, 2890, 4672, 293, 273, 365, 18, 8373, 612, 1401, 273, 8074, 1537, 2668, 69, 548, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1221, 1555, 3917, 45, 865, 12, 2890, 4672, 293, 273, 365, 18, 8373, 612, 1401, 273, 8074, 1537, 2668, 69, 548, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
layout10_4.addWidget(self.pushButton54) LayoutWidget_5 = QWidget(self.elementGroupBox,"layout8") LayoutWidget_5.setGeometry(QRect(20,130,524,60)) layout8 = QHBoxLayout(LayoutWidget_5,11,6,"layout8") self.pushButton13 = QPushButton(LayoutWidget_5,"pushButton13") pushButton13_font = QFont(self.pushButton13.font()) pushButton13_font.setPointSize(9) pushButton13_font.setBold(1) self.pushButton13.setFont(pushButton13_font) self.pushButton13.setFocusPolicy(QPushButton.NoFocus) self.pushButton13.setToggleButton(1) self.pushButton13.setAutoDefault(0) layout8.addWidget(self.pushButton13) self.pushButton14 = QPushButton(LayoutWidget_5,"pushButton14") pushButton14_font = QFont(self.pushButton14.font()) pushButton14_font.setBold(1) self.pushButton14.setFont(pushButton14_font) self.pushButton14.setFocusPolicy(QPushButton.NoFocus) self.pushButton14.setToggleButton(1) self.pushButton14.setAutoDefault(0) layout8.addWidget(self.pushButton14) self.pushButton15 = QPushButton(LayoutWidget_5,"pushButton15") pushButton15_font = QFont(self.pushButton15.font()) pushButton15_font.setBold(1) self.pushButton15.setFont(pushButton15_font) self.pushButton15.setFocusPolicy(QPushButton.NoFocus) self.pushButton15.setToggleButton(1) self.pushButton15.setAutoDefault(0) layout8.addWidget(self.pushButton15) self.pushButton16 = QPushButton(LayoutWidget_5,"pushButton16") pushButton16_font = QFont(self.pushButton16.font()) pushButton16_font.setBold(1) self.pushButton16.setFont(pushButton16_font) self.pushButton16.setFocusPolicy(QPushButton.NoFocus) self.pushButton16.setToggleButton(1) self.pushButton16.setAutoDefault(0) layout8.addWidget(self.pushButton16) self.pushButton17 = QPushButton(LayoutWidget_5,"pushButton17") self.pushButton17.setBackgroundOrigin(QPushButton.WindowOrigin) pushButton17_font = QFont(self.pushButton17.font()) pushButton17_font.setBold(1) self.pushButton17.setFont(pushButton17_font) self.pushButton17.setFocusPolicy(QPushButton.NoFocus) self.pushButton17.setToggleButton(1) self.pushButton17.setAutoDefault(0) layout8.addWidget(self.pushButton17) self.pushButton18 = QPushButton(LayoutWidget_5,"pushButton18") self.pushButton18.setEnabled(1) pushButton18_font = QFont(self.pushButton18.font()) pushButton18_font.setBold(1) self.pushButton18.setFont(pushButton18_font) self.pushButton18.setToggleButton(1) self.pushButton18.setAutoDefault(0) layout8.addWidget(self.pushButton18)
layout26.addWidget(self.pushButton54)
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
6166f547dc5eda73f10b7fa994920bda8fcb86cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/6166f547dc5eda73f10b7fa994920bda8fcb86cc/ElementSelectorDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
sage: magma.GetVerbose("Groebner")
sage: magma.GetVerbose("Groebner")
def GetVerbose(self, type): """ Get the verbosity level of a given algorithm class etc. in Magma.
06891bc866b47f420feaea6eefc08baf44cc4cb9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/06891bc866b47f420feaea6eefc08baf44cc4cb9/magma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 14489, 12, 2890, 16, 618, 4672, 3536, 968, 326, 11561, 1801, 434, 279, 864, 4886, 667, 5527, 18, 316, 490, 9454, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 968, 14489, 12, 2890, 16, 618, 4672, 3536, 968, 326, 11561, 1801, 434, 279, 864, 4886, 667, 5527, 18, 316, 490, 9454, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return self._actions or None
return self._actions or []
def listActions( self, info=None ):
8477c91471653a628fa07b2a031ab08a8ff4f71f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1843/8477c91471653a628fa07b2a031ab08a8ff4f71f/ActionProviderBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 6100, 12, 365, 16, 1123, 33, 7036, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 666, 6100, 12, 365, 16, 1123, 33, 7036, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
el1 = etree.SubElement(el, 'table:table-column', attrib={
el1 = SubElement(el, 'table:table-column', attrib={
def visit_option_list(self, node): #self.document.reporter.debug_flag = 1 #self.document.reporter.attach_observer(self.show_message) table_name = 'rststyle-tableoption' # # Generate automatic styles if not self.optiontablestyles_generated: self.optiontablestyles_generated = True el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': table_name, 'style:family': 'table'}) el1 = etree.SubElement(el, 'style:table-properties', attrib={ 'style:width': '17.59cm', 'table:align': 'left', 'style:shadow': 'none'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A' % table_name, 'style:family': 'table-column'}) el1 = etree.SubElement(el, 'style:table-column-properties', attrib={ 'style:column-width': '4.999cm'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B' % table_name, 'style:family': 'table-column'}) el1 = etree.SubElement(el, 'style:table-column-properties', attrib={ 'style:column-width': '12.587cm'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A1' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:background-color': 'transparent', 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': 'none', 'fo:border-top': '0.035cm solid #000000', 'fo:border-bottom': '0.035cm solid #000000'}) el2 = etree.SubElement(el1, 'style:background-image') el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B1' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border': '0.035cm solid #000000'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.A2' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': 'none', 'fo:border-top': 'none', 'fo:border-bottom': '0.035cm solid #000000'}) el = etree.SubElement(self.automatic_styles, 'style:style', attrib={ 'style:name': '%s.B2' % table_name, 'style:family': 'table-cell'}) el1 = etree.SubElement(el, 'style:table-cell-properties', attrib={ 'fo:padding': '0.097cm', 'fo:border-left': '0.035cm solid #000000', 'fo:border-right': '0.035cm solid #000000', 'fo:border-top': 'none', 'fo:border-bottom': '0.035cm solid #000000'}) # # Generate table data el = self.append_child('table:table', attrib={ 'table:name': table_name, 'table:style-name': table_name, }) el1 = etree.SubElement(el, 'table:table-column', attrib={ 'table:style-name': '%s.A' % table_name}) el1 = etree.SubElement(el, 'table:table-column', attrib={ 'table:style-name': '%s.B' % table_name}) el1 = etree.SubElement(el, 'table:table-header-rows') el2 = etree.SubElement(el1, 'table:table-row') el3 = etree.SubElement(el2, 'table:table-cell', attrib={ 'table:style-name': '%s.A1' % table_name, 'office:value-type': 'string'}) el4 = etree.SubElement(el3, 'text:p', attrib={ 'text:style-name': 'Table_20_Heading'}) el4.text= 'Option' el3 = etree.SubElement(el2, 'table:table-cell', attrib={ 'table:style-name': '%s.B1' % table_name, 'office:value-type': 'string'}) el4 = etree.SubElement(el3, 'text:p', attrib={ 'text:style-name': 'Table_20_Heading'}) el4.text= 'Description' self.set_current_element(el)
277ba1af817dc725b8179dbbf649a815fdff5939 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/277ba1af817dc725b8179dbbf649a815fdff5939/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3482, 67, 1098, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5457, 18, 266, 7988, 18, 4148, 67, 6420, 273, 404, 468, 2890, 18, 5457, 18, 266, 7988, 18, 7331, 67, 30971, 12, 2890...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 3482, 67, 1098, 12, 2890, 16, 756, 4672, 468, 2890, 18, 5457, 18, 266, 7988, 18, 4148, 67, 6420, 273, 404, 468, 2890, 18, 5457, 18, 266, 7988, 18, 7331, 67, 30971, 12, 2890...
def stop(machine="localhost",port=4812, user = "",password=""):
def stop(machine="localhost",port="4812", user="",password=""):
def stop(machine="localhost",port=4812, user = "",password=""): if user: url="http://%s:%d/stop?USER=%s&PASS=%s" \ % (machine, port, user, password) else: url="http://%s:%d/stop" % (machine, port) try: url=urllib.urlopen (url) except IOError, message: print "Cannot connect to %s, error:%s"%(machine, message) sys.exit (-1) page=url.read() if regex.search ("Engine Stopped", page) >= 0: print "Engine stopped" else: print "Cannot stop Engine, this is the raw page I got:" print page
aefe40e1215ac3738f47b12b533b7e082b659ac8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3918/aefe40e1215ac3738f47b12b533b7e082b659ac8/stopEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 9149, 1546, 13014, 3113, 655, 1546, 8875, 2138, 3113, 729, 1546, 3113, 3664, 1546, 6, 4672, 309, 729, 30, 880, 1546, 2505, 23155, 87, 5319, 72, 19, 5681, 35, 4714, 5095, 87, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 9149, 1546, 13014, 3113, 655, 1546, 8875, 2138, 3113, 729, 1546, 3113, 3664, 1546, 6, 4672, 309, 729, 30, 880, 1546, 2505, 23155, 87, 5319, 72, 19, 5681, 35, 4714, 5095, 87, ...
if (optlevel==2): cmd = cmd + " -O1 -DNDEBUG" if (optlevel==3): cmd = cmd + " -O2 -DNDEBUG"
if (optlevel==2): cmd = cmd + " -O1" if (optlevel==3): cmd = cmd + " -O2"
def CompileCxx(obj,src,ipath,opts): ipath = ["built/tmp"] + ipath + ["built/include"] wobj = FindLocation(obj, ipath) wsrc = FindLocation(src, ipath) if (COMPILER=="MSVC"): cmd = "cl /wd4996 /Fo" + wobj + " /nologo /c " if (OMIT.count("PYTHON")==0): cmd = cmd + " /Ithirdparty/win-python/include" for ver in DXVERSIONS: if (PkgSelected(opts,"DX"+ver)): cmd = cmd + ' /I"' + DIRECTXSDK["DX"+ver] + '/include"' for ver in MAYAVERSIONS: if (PkgSelected(opts,"MAYA"+ver)): cmd = cmd + ' /I"' + MAYASDK["MAYA"+ver] + '/include"' cmd = cmd + " /DMAYAVERSION=" + ver for ver in MAXVERSIONS: if (PkgSelected(opts,"MAX"+ver)): cmd = cmd + ' /I"' + MAXSDK["MAX"+ver] + '/include" /I"' + MAXSDKCS["MAX"+ver] + '" /DMAX' + ver for pkg in PACKAGES: if (pkg[:4] != "MAYA") and (pkg[:3]!="MAX") and (pkg[:2]!="DX") and PkgSelected(opts,pkg): cmd = cmd + " /I" + THIRDPARTYLIBS + pkg.lower() + "/include" for x in ipath: cmd = cmd + " /I" + x if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305' if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA' if (opts.count("MSFORSCOPE")): cmd = cmd + ' /Zc:forScope-' optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " /MD /Zi /RTCs /GS" if (optlevel==2): cmd = cmd + " /MD /Zi /DNDEBUG " if (optlevel==3): cmd = cmd + " /MD /Zi /O2 /Ob2 /DFORCE_INLINING /DNDEBUG " if (optlevel==4): cmd = cmd + " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /DNDEBUG /GL " cmd = cmd + " /Fd" + wobj[:-4] + ".pdb" building = getbuilding(opts) if (building): cmd = cmd + " /DBUILDING_" + building cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + wsrc oscmd(cmd) if (COMPILER=="LINUX"): if (wsrc.endswith(".c")): cmd = 'gcc -fPIC -c -o ' + wobj else: cmd = 'g++ -ftemplate-depth-30 -fPIC -c -o ' + wobj if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"' if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'vrpn/include' if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fftw/include' if (PkgSelected(opts,"FMODEX")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmodex/include' if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'nvidiacg/include' if (PkgSelected(opts,"FFMPEG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'ffmpeg/include' if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2' for x in ipath: cmd = cmd + ' -I' + x if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA' optlevel = getoptlevel(opts,OPTIMIZE) if (optlevel==1): cmd = cmd + " -g" if (optlevel==2): cmd = cmd + " -O1 -DNDEBUG" if (optlevel==3): cmd = cmd + " -O2 -DNDEBUG" if (optlevel==4): cmd = cmd + " -O2 -DNDEBUG" building = getbuilding(opts) if (building): cmd = cmd + " -DBUILDING_" + building cmd = cmd + ' ' + wsrc oscmd(cmd)
a20a220e47917af619d7b2113fc7b38ba9301800 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/a20a220e47917af619d7b2113fc7b38ba9301800/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 5279, 12, 2603, 16, 4816, 16, 625, 421, 16, 4952, 4672, 277, 803, 273, 8247, 12406, 19, 5645, 11929, 397, 277, 803, 397, 8247, 12406, 19, 6702, 11929, 341, 2603, 273, 4163, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 39, 5279, 12, 2603, 16, 4816, 16, 625, 421, 16, 4952, 4672, 277, 803, 273, 8247, 12406, 19, 5645, 11929, 397, 277, 803, 397, 8247, 12406, 19, 6702, 11929, 341, 2603, 273, 4163, ...
prefix = os.path.commonprefix(files)
prefix = re.sub("[^/]*$", "", os.path.commonprefix(files))
def consolidateFiles(self, xmlFiles): """Given a commit, find the directory common to all files and return a 2-tuple with that directory followed by a list of files within that directory. """ files = [] if xmlFiles: for fileTag in xmlFiles.elements(): if fileTag.name == 'file': files.append(str(fileTag))
9c8792367611b5c9df9af20aa8649aecd4ab5afb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6757/9c8792367611b5c9df9af20aa8649aecd4ab5afb/Formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21785, 340, 2697, 12, 2890, 16, 2025, 2697, 4672, 3536, 6083, 279, 3294, 16, 1104, 326, 1867, 2975, 358, 777, 1390, 471, 327, 279, 576, 17, 8052, 598, 716, 1867, 10860, 635, 279, 666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21785, 340, 2697, 12, 2890, 16, 2025, 2697, 4672, 3536, 6083, 279, 3294, 16, 1104, 326, 1867, 2975, 358, 777, 1390, 471, 327, 279, 576, 17, 8052, 598, 716, 1867, 10860, 635, 279, 666, ...
resultcount = 0
needupdate = copy(uidlist)
def addmessagesflags(self, uidlist, flags): imapobj = self.imapserver.acquireconnection() try: imapobj.select(self.getfullname()) r = imapobj.uid('store', ','.join([str(uid) for uid in uidlist]), '+FLAGS', imaputil.flagsmaildir2imap(flags))[1] finally: self.imapserver.releaseconnection(imapobj) resultcount = 0 for result in r: resultcount += 1 flags = imaputil.flags2hash(imaputil.imapsplit(result)[1])['FLAGS'] uid = long(imaputil.flags2hash(imaputil.imapsplit(result)[1])['UID']) self.messagelist[uid]['flags'] = imaputil.flagsimap2maildir(flags) assert resultcount == len(uidlist), "Got incorrect number of results back"
817a10ce0f545a37cc5d47f1bd69c8436d6ec740 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5335/817a10ce0f545a37cc5d47f1bd69c8436d6ec740/IMAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6833, 7133, 12, 2890, 16, 4555, 1098, 16, 2943, 4672, 20226, 2603, 273, 365, 18, 12161, 3567, 18, 1077, 1039, 4071, 1435, 775, 30, 20226, 2603, 18, 4025, 12, 2890, 18, 588, 21885, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 6833, 7133, 12, 2890, 16, 4555, 1098, 16, 2943, 4672, 20226, 2603, 273, 365, 18, 12161, 3567, 18, 1077, 1039, 4071, 1435, 775, 30, 20226, 2603, 18, 4025, 12, 2890, 18, 588, 21885, ...
button.pack(side = LEFT)
button.pack(side = LEFT, padx=2, pady=1)
def AppendMenu(mbar, text, menu_list, underline): theme=app.uimanager.currentColorTheme button = TMenubutton(mbar, text = text, underline=underline, style='RootMenuButton')
ddbf94a2ccc9e5cdf6cb59314d54c7c2b34766f5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3123/ddbf94a2ccc9e5cdf6cb59314d54c7c2b34766f5/tkext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 4599, 12, 1627, 297, 16, 977, 16, 3824, 67, 1098, 16, 25985, 4672, 5006, 33, 2910, 18, 89, 381, 1063, 18, 2972, 2957, 8335, 3568, 273, 27435, 275, 373, 2644, 12, 1627, 297, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 4599, 12, 1627, 297, 16, 977, 16, 3824, 67, 1098, 16, 25985, 4672, 5006, 33, 2910, 18, 89, 381, 1063, 18, 2972, 2957, 8335, 3568, 273, 27435, 275, 373, 2644, 12, 1627, 297, 16, ...
def _cmp_(self, other): return cmp(self._triple, other._triple)
def __cmp__(self, other): """ EXAMPLES: sage: B.<t> = PolynomialRing(Integers(125)) sage: x, t = monsky_washnitzer.SpecialCubicQuotientRing(t^3 - t + B(1/4)).gens() sage: x == t False sage: x == x True sage: x == x + x - x True """ return cmp(self._triple, other._triple)
def _cmp_(self, other): return cmp(self._triple, other._triple)
94448733193758bcb2d08a68125fe9eceaf38aaf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/94448733193758bcb2d08a68125fe9eceaf38aaf/monsky_washnitzer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9625, 67, 12, 2890, 16, 1308, 4672, 327, 9411, 12, 2890, 6315, 313, 2444, 16, 1308, 6315, 313, 2444, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9625, 67, 12, 2890, 16, 1308, 4672, 327, 9411, 12, 2890, 6315, 313, 2444, 16, 1308, 6315, 313, 2444, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 736) else quickfix.StringField.__init__(self, 736, 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, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 5718, 13, 469, 9549, 904, 18, 780, 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, 780, 974, 16186, 2738, 972, 12, 2890, 16, 2371, 5718, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, ...
return_value = fn(self, *args, **kwargs) lock.release() return return_value
try: return fn(self, *args, **kwargs) finally: lock.release()
def _wrapper(self, *args, **kwargs): lock.acquire() return_value = fn(self, *args, **kwargs) lock.release() return return_value
9507e0f7ed21c2e89305317b47e1a1ba7fea37b6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/9507e0f7ed21c2e89305317b47e1a1ba7fea37b6/declarative.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8376, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2176, 18, 1077, 1039, 1435, 327, 67, 1132, 273, 2295, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 13, 2176, 18, 9340, 1435, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8376, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2176, 18, 1077, 1039, 1435, 327, 67, 1132, 273, 2295, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 13, 2176, 18, 9340, 1435, 327, ...
self.assertEquals(strval.string(), open(__file__, 'rb').read())
self.assertEquals(strval.string(), open(filePath, 'rb').read())
def testInitWithURL(self): url = NSURL.fileURLWithPath_(__file__)
873d3791f60f205e9baa50d4c898050fd5f1dc16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/97/873d3791f60f205e9baa50d4c898050fd5f1dc16/test_nsattributedstring.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2570, 1190, 1785, 12, 2890, 4672, 880, 273, 11472, 1785, 18, 768, 1785, 1190, 743, 67, 12, 972, 768, 972, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 2570, 1190, 1785, 12, 2890, 4672, 880, 273, 11472, 1785, 18, 768, 1785, 1190, 743, 67, 12, 972, 768, 972, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
jsfile = path.join(package_dir, 'locale', self.config.language, 'LC_MESSAGES', 'sphinx.js') if path.isfile(jsfile): copyfile(jsfile, path.join(self.outdir, '_static', 'translations.js'))
jsfile_list = [path.join(package_dir, 'locale', self.config.language, 'LC_MESSAGES', 'sphinx.js'), path.join(sys.prefix, 'share/sphinx/locale', self.config.language, 'sphinx.js')] for jsfile in jsfile_list: if path.isfile(jsfile): copyfile(jsfile, path.join(self.outdir, '_static', 'translations.js')) break
def sorthelper(entry): name = entry[0] if name == '': # heading name = entry[4] return name.lower()
984d406b443403af3d6f58096b3a05cc59d395de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7032/984d406b443403af3d6f58096b3a05cc59d395de/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 7825, 1602, 12, 4099, 4672, 508, 273, 1241, 63, 20, 65, 309, 508, 422, 875, 30, 468, 11053, 508, 273, 1241, 63, 24, 65, 327, 508, 18, 8167, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 7825, 1602, 12, 4099, 4672, 508, 273, 1241, 63, 20, 65, 309, 508, 422, 875, 30, 468, 11053, 508, 273, 1241, 63, 24, 65, 327, 508, 18, 8167, 1435, 2, -100, -100, -100, -100, -100...
return getint(
return self.tk.getint(
def winfo_id(self): return getint( self.tk.call('winfo', 'id', self._w))
cca4a14b3b55632e347e8f8c1dd2e85d1d57122a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/cca4a14b3b55632e347e8f8c1dd2e85d1d57122a/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 1376, 67, 350, 12, 2890, 4672, 327, 365, 18, 16099, 18, 588, 474, 12, 365, 18, 16099, 18, 1991, 2668, 91, 1376, 2187, 296, 350, 2187, 365, 6315, 91, 3719, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 341, 1376, 67, 350, 12, 2890, 4672, 327, 365, 18, 16099, 18, 588, 474, 12, 365, 18, 16099, 18, 1991, 2668, 91, 1376, 2187, 296, 350, 2187, 365, 6315, 91, 3719, 2, -100, -100, -100, -...
r=''
r=[]
def encodetiles(self,tilelist): if not tilelist: return '' r='' for t in tilelist: #The browser swaps the X and Y values, it seems. r+="%d%d%d"%(t.pos[1],t.pos[0],t.uncovered) if t.bomb: r+="X" else: r+=str(t.adjacency) return r
146b666f749ad20ba42d4c049d42b6474b7c5e65 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14104/146b666f749ad20ba42d4c049d42b6474b7c5e65/webmines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17755, 278, 1449, 12, 2890, 16, 1025, 5449, 4672, 309, 486, 268, 330, 5449, 30, 327, 875, 436, 33, 8526, 364, 268, 316, 268, 330, 5449, 30, 468, 1986, 4748, 1352, 6679, 326, 1139, 471,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17755, 278, 1449, 12, 2890, 16, 1025, 5449, 4672, 309, 486, 268, 330, 5449, 30, 327, 875, 436, 33, 8526, 364, 268, 316, 268, 330, 5449, 30, 468, 1986, 4748, 1352, 6679, 326, 1139, 471,...
sys.stdout.write(" (%ss)\n" % (time.clock()-c1, ))
msg.finish()
def crackEdgeMap(labelImage, initLabelImage = True, eightConnectedRegions = True): c = time.clock() msg = progress.StatusMessage("- following crack edges") result = crackEdgeGraph( labelImage, eightConnectedRegions = eightConnectedRegions, progressHook = progress.ProgressHook(msg)) msg.finish() sys.stdout.write(" removing deg.2 nodes..."); c1 = time.clock() maputils.mergeDegree2Nodes(result) sys.stdout.write(" (%ss)\n" % (time.clock()-c1, )) sys.stdout.write(" sorting edges..."); c1 = time.clock() result.sortEdgesDirectly() sys.stdout.write(" (%ss)\n" % (time.clock()-c1, )) sys.stdout.write(" initializing faces..."); c1 = time.clock() result.initializeMap(initLabelImage) sys.stdout.write(" (%ss)\n" % (time.clock()-c1, )) # mark the border edges: assert result.face(0).holeCount() == 1, "infinite face should have exactly one contour, not %d!?" % result.face(0).holeCount() for dart in result.face(0).holeContours().next().phiOrbit(): edge = dart.edge() if not edge.leftFaceLabel() or not edge.rightFaceLabel(): edge.setFlag(BORDER_PROTECTION) sys.stdout.write(" done. (%ss)\n" % (time.clock()-c, )) return result
a94194260b0ee2a979b184709c2d70b6c499169d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10394/a94194260b0ee2a979b184709c2d70b6c499169d/crackConvert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 276, 21580, 6098, 863, 12, 1925, 2040, 16, 1208, 2224, 2040, 273, 1053, 16, 425, 750, 8932, 17344, 273, 1053, 4672, 276, 273, 813, 18, 18517, 1435, 1234, 273, 4007, 18, 1482, 1079, 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, 276, 21580, 6098, 863, 12, 1925, 2040, 16, 1208, 2224, 2040, 273, 1053, 16, 425, 750, 8932, 17344, 273, 1053, 4672, 276, 273, 813, 18, 18517, 1435, 1234, 273, 4007, 18, 1482, 1079, 2932,...
title=u"Secondary Email Address", required=False, description=u"Email address.")
title=u"Secondary Email", required=False)
def setPassword(password): """Set the password in a hashed form, so it can be verified later.
2bbe1ac63333590a7b48992c129c74244c28fb9d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/2bbe1ac63333590a7b48992c129c74244c28fb9d/interfaces.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23753, 12, 3664, 4672, 3536, 694, 326, 2201, 316, 279, 14242, 646, 16, 1427, 518, 848, 506, 13808, 5137, 18, 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, 23753, 12, 3664, 4672, 3536, 694, 326, 2201, 316, 279, 14242, 646, 16, 1427, 518, 848, 506, 13808, 5137, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.log ('listen', 'info')
self.log ('listen %r' % (addr,), 'info')
def __init__ ( self, Dispatcher, addr, precision, max, family=socket.AF_INET ): assert ( type (precision) == int and precision > 0 and type (max) == int and max > 0 and family in SOCKET_FAMILIES ) self.server_dispatchers = [] self.server_named = {} self.Server_dispatcher = Dispatcher self.server_precision = precision # # async_core.Dispatcher.__init__ (self) self.create_socket (family, socket.SOCK_STREAM) self.set_reuse_addr () self.bind (addr) self.listen (max) # anonymous (self) accept_all (self) metered (self) # self.log ('listen', 'info')
f116ff77f0d9b8b3c7a03a89a9adc9438bd24b09 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2577/f116ff77f0d9b8b3c7a03a89a9adc9438bd24b09/async_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 365, 16, 16710, 16, 3091, 16, 6039, 16, 943, 16, 6755, 33, 7814, 18, 6799, 67, 18819, 262, 30, 1815, 261, 618, 261, 14548, 13, 422, 509, 471, 6039, 405, 374, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 261, 365, 16, 16710, 16, 3091, 16, 6039, 16, 943, 16, 6755, 33, 7814, 18, 6799, 67, 18819, 262, 30, 1815, 261, 618, 261, 14548, 13, 422, 509, 471, 6039, 405, 374, 47...
print "VALIDATION ERRORS: %r" % validation_errors
def _get_validation_errors(self, message, form, form_entry): validation_errors = [] # do form level validation form_errors = form.get_validation_errors(form_entry) if form_errors: validation_errors.extend(form_errors) # also forward to any apps that have registered with this for app_name in form.apps.all(): if self.form_handlers.has_key(app_name.name): app = self.form_handlers[app_name.name] errors = getattr(app,'validate')(message, form_entry) if errors: validation_errors.extend(errors) print "VALIDATION ERRORS: %r" % validation_errors return validation_errors
873b2cfc5851f5a527769306c426622624280c38 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11809/873b2cfc5851f5a527769306c426622624280c38/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 8685, 67, 4324, 12, 2890, 16, 883, 16, 646, 16, 646, 67, 4099, 4672, 3379, 67, 4324, 273, 5378, 225, 468, 741, 646, 1801, 3379, 646, 67, 4324, 273, 646, 18, 588, 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, 389, 588, 67, 8685, 67, 4324, 12, 2890, 16, 883, 16, 646, 16, 646, 67, 4099, 4672, 3379, 67, 4324, 273, 5378, 225, 468, 741, 646, 1801, 3379, 646, 67, 4324, 273, 646, 18, 588, 67, ...
help_exit("Invalid number of arguments with option -c, need <log_directory>")
help_exit("Invalid number of arguments with option -cseattle or -cseattlegeni, need <log_directory>")
def checkArgs(cron=False): if cron and len(sys.argv) < 3: help_exit("Invalid number of arguments with option -c, need <log_directory>") elif len(sys.argv) < 2: help_exit("Invalid number of arguments")
cbd94fc147846594507186a09be21adfe3f2809f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/cbd94fc147846594507186a09be21adfe3f2809f/deploy_monitor_processes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 2615, 12, 18041, 33, 8381, 4672, 225, 309, 9998, 471, 562, 12, 9499, 18, 19485, 13, 411, 890, 30, 2809, 67, 8593, 2932, 1941, 1300, 434, 1775, 598, 1456, 300, 71, 307, 4558, 298, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2615, 12, 18041, 33, 8381, 4672, 225, 309, 9998, 471, 562, 12, 9499, 18, 19485, 13, 411, 890, 30, 2809, 67, 8593, 2932, 1941, 1300, 434, 1775, 598, 1456, 300, 71, 307, 4558, 298, ...
self.args += [ "-dvd-compat", "-Z", harddiskmanager.getCD(), "-V", volName, "-publisher", "Dreambox", "-use-the-force-luke=dummy" ]
self.args += [ "-dvd-compat", "-Z", "/dev/" + harddiskmanager.getCD(), "-V", volName, "-publisher", "Dreambox", "-use-the-force-luke=dummy" ]
def __init__(self, job, extra_args=[]): Task.__init__(self, job, _("Burn to DVD..."))
0cfa2e76e477e6e0abf46c97640a2e38a2fc308d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/0cfa2e76e477e6e0abf46c97640a2e38a2fc308d/Process.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 16, 2870, 67, 1968, 33, 8526, 4672, 3837, 16186, 2738, 972, 12, 2890, 16, 1719, 16, 389, 2932, 38, 321, 358, 463, 21544, 7070, 3719, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1719, 16, 2870, 67, 1968, 33, 8526, 4672, 3837, 16186, 2738, 972, 12, 2890, 16, 1719, 16, 389, 2932, 38, 321, 358, 463, 21544, 7070, 3719, 2, -100, -100,...
if call_id == -1:
if call_id != -1:
def _cb_on_typing(self, call_id, from_uri, to_uri, contact, is_typing, acc_id): call = None if call_id == -1: call = self._lookup_call(call_id) if call: call._cb.on_typing(is_typing) else: acc = self._lookup_account(acc_id) buddy = self._lookup_buddy(-1, from_uri) if buddy: buddy._cb.on_typing(is_typing) else: acc._cb.on_typing(from_uri, contact, is_typing)
c2967a2c733ebf7b9d8b38359a43b745bfb65a03 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8531/c2967a2c733ebf7b9d8b38359a43b745bfb65a03/pjsua.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7358, 67, 265, 67, 12846, 310, 12, 2890, 16, 745, 67, 350, 16, 628, 67, 1650, 16, 358, 67, 1650, 16, 5388, 16, 353, 67, 12846, 310, 16, 4078, 67, 350, 4672, 745, 273, 599, 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, 389, 7358, 67, 265, 67, 12846, 310, 12, 2890, 16, 745, 67, 350, 16, 628, 67, 1650, 16, 358, 67, 1650, 16, 5388, 16, 353, 67, 12846, 310, 16, 4078, 67, 350, 4672, 745, 273, 599, 309...
sage: sr = mq.SR(1,2,2,4,gf2=True)
sage: sr = mq.SR(1, 2, 2, 4, gf2=True)
def shift_rows_matrix(self): """ Return the ShiftRows matrix.
cd82551727ddbae04c5b28f55b59ec14654a84ab /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cd82551727ddbae04c5b28f55b59ec14654a84ab/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4654, 67, 3870, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 21444, 4300, 3148, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4654, 67, 3870, 67, 5667, 12, 2890, 4672, 3536, 2000, 326, 21444, 4300, 3148, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
title = Markup('Ticket <em title="%s"> summary, id, type, verb, author)
if format == 'rss': title = 'Ticket (id, type.lower(), verb, summary) else: title = Markup('Ticket <em title="%s"> summary, id, type, verb, author)
def produce((id, t, author, type, summary), status, fields, comment, cid): if status == 'edit': if 'ticket_details' in filters: info = '' if len(fields) > 0: info = ', '.join(['<i>%s</i>' % f for f in \ fields.keys()]) + ' changed<br />' else: return None elif 'ticket' in filters: if status == 'closed' and fields.has_key('resolution'): info = fields['resolution'] if info and comment: info = '%s: ' % info else: info = '' else: return None kind, verb = status_map[status] title = Markup('Ticket <em title="%s">#%s</em> (%s) %s by %s', summary, id, type, verb, author) href = format == 'rss' and req.abs_href.ticket(id) or \ req.href.ticket(id) if cid: href += '#comment:' + cid if status == 'new': message = summary else: message = Markup(info) if comment: if format == 'rss': message += wiki_to_html(comment, self.env, req, db, absurls=True) else: message += wiki_to_oneliner(comment, self.env, db, shorten=True) return kind, href, title, t, author, message
7356b09985ee21df80d7dceca9c158115a3eb6d0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/7356b09985ee21df80d7dceca9c158115a3eb6d0/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11402, 12443, 350, 16, 268, 16, 2869, 16, 618, 16, 4916, 3631, 1267, 16, 1466, 16, 2879, 16, 7504, 4672, 309, 1267, 422, 296, 4619, 4278, 309, 296, 16282, 67, 6395, 11, 316, 3415, 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, 11402, 12443, 350, 16, 268, 16, 2869, 16, 618, 16, 4916, 3631, 1267, 16, 1466, 16, 2879, 16, 7504, 4672, 309, 1267, 422, 296, 4619, 4278, 309, 296, 16282, 67, 6395, 11, 316, 3415, 30, ...
sage: print B.top_left_empty_cell()
sage: B.top_left_empty_cell()
def top_left_empty_cell(self): """ Returns the least [r, c] such that self[r, c] is an empty cell. If all cells are filled then we return None.
494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 67, 4482, 67, 5531, 67, 3855, 12, 2890, 4672, 3536, 2860, 326, 4520, 306, 86, 16, 276, 65, 4123, 716, 365, 63, 86, 16, 276, 65, 353, 392, 1008, 2484, 18, 971, 777, 5983, 854, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1760, 67, 4482, 67, 5531, 67, 3855, 12, 2890, 4672, 3536, 2860, 326, 4520, 306, 86, 16, 276, 65, 4123, 716, 365, 63, 86, 16, 276, 65, 353, 392, 1008, 2484, 18, 971, 777, 5983, 854, ...
if platform == 'darwin':
if platform in ('darwin', 'mac'):
def build_extensions(self):
b0a93d596dd677e9726266d099f56d846345d9ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/b0a93d596dd677e9726266d099f56d846345d9ee/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 9489, 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, 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, 1361, 67, 9489, 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, -100, -10...
{'fill': 'red', 'tags': 'box'})
{'fill': 'blue', 'tags': 'box'})
def __init__(self, master=None, cnf={}): Canvas.__init__(self, master, {'width': 100, 'height': 100}) Canvas.config(self, cnf) self.create_rectangle(30, 30, 70, 70, {'fill': 'red', 'tags': 'box'}) Canvas.bind(self, 'box', '<Enter>', self.enter) Canvas.bind(self, 'box', '<Leave>', self.leave)
e7571856f3f59c73527ceefcf01e8a6b6f42502b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e7571856f3f59c73527ceefcf01e8a6b6f42502b/tst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 33, 7036, 16, 23118, 12938, 4672, 20966, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 13666, 2819, 4278, 2130, 16, 296, 4210, 4278, 2130, 6792, 20966, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4171, 33, 7036, 16, 23118, 12938, 4672, 20966, 16186, 2738, 972, 12, 2890, 16, 4171, 16, 13666, 2819, 4278, 2130, 16, 296, 4210, 4278, 2130, 6792, 20966, 1...
return proto.list("", ""
return proto.list("", "*"
def cbAuthentication(result, proto): # List a bunch of mailboxes return proto.list("", "" ).addCallback(cbMailboxList, proto )
96b4adc6a21f3d57ef4fd4dd2bc15555d4ca3753 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/96b4adc6a21f3d57ef4fd4dd2bc15555d4ca3753/imap4client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 6492, 12, 2088, 16, 3760, 4672, 468, 987, 279, 25606, 434, 14187, 281, 327, 3760, 18, 1098, 2932, 3113, 10971, 262, 18, 1289, 2428, 12, 7358, 30239, 682, 16, 3760, 262, 225, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2875, 6492, 12, 2088, 16, 3760, 4672, 468, 987, 279, 25606, 434, 14187, 281, 327, 3760, 18, 1098, 2932, 3113, 10971, 262, 18, 1289, 2428, 12, 7358, 30239, 682, 16, 3760, 262, 225, 2, -...
@expat("DefaultHandler", guard="not self.dtd", returns="self._empty_source")
@expat("DefaultHandler", guard="not_in_dtd", returns=empty_source)
def resolveEntity(self, name, publicId, baseURI, systemId): return "&%s;" % name
fc7b75abc8f3b6470abdffb9a5da73a0f780fb11 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6753/fc7b75abc8f3b6470abdffb9a5da73a0f780fb11/expat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2245, 1943, 12, 2890, 16, 508, 16, 1071, 548, 16, 1026, 3098, 16, 30083, 4672, 327, 7830, 9, 87, 4868, 738, 508, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2245, 1943, 12, 2890, 16, 508, 16, 1071, 548, 16, 1026, 3098, 16, 30083, 4672, 327, 7830, 9, 87, 4868, 738, 508, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.data_file is None:
if self.data_file=='':
def _save_data_file_event_fired(self): if self.data_file is None: filename = save_file() if filename=='': return self.data_file = filename self._save_all_data()
bbfcbae9af76ce263b65221ec9ef39d20dbc2975 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1832/bbfcbae9af76ce263b65221ec9ef39d20dbc2975/yasso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 892, 67, 768, 67, 2575, 67, 74, 2921, 12, 2890, 4672, 309, 365, 18, 892, 67, 768, 18920, 4278, 1544, 273, 1923, 67, 768, 1435, 309, 1544, 18920, 4278, 327, 365, 18, 89...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5688, 67, 892, 67, 768, 67, 2575, 67, 74, 2921, 12, 2890, 4672, 309, 365, 18, 892, 67, 768, 18920, 4278, 1544, 273, 1923, 67, 768, 1435, 309, 1544, 18920, 4278, 327, 365, 18, 89...
if type(attrname) is type(""):
if type(attrname) is StringType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _comment_rx.match(line) if m: text = m.group(1) if text: self.write("(COMMENT\n- %s \n)COMMENT\n-\\n\n" % encode(text)) line = line[m.end():] continue m = _begin_env_rx.match(line) if m: # re-write to use the macro handler line = r"\%s %s" % (m.group(1), line[m.end():]) continue m = _end_env_rx.match(line) if m: # end of environment envname = m.group(1) if envname == "document": # special magic for n in stack[1:]: if n not in self.autoclosing: raise LaTeXFormatError( "open element on stack: " + `n`) # should be more careful, but this is easier to code: stack = [] self.write(")document\n") elif stack and envname == stack[-1]: self.write(")%s\n" % envname) del stack[-1] popping(envname, "a", len(stack) + depth) else: self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) line = line[m.end():] continue m = _begin_macro_rx.match(line) if m: # start of macro macroname = m.group(1) if macroname == "verbatim": # really magic case! pos = string.find(line, "\\end{verbatim}") text = line[m.end(1):pos] self.write("(verbatim\n") self.write("-%s\n" % encode(text)) self.write(")verbatim\n") line = line[pos + len("\\end{verbatim}"):] continue numbered = 1 opened = 0 if macroname[-1] == "*": macroname = macroname[:-1] numbered = 0 if macroname in self.autoclosing and macroname in stack: while stack[-1] != macroname: top = stack.pop() if top and top not in self.discards: self.write(")%s\n-\\n\n" % top) popping(top, "b", len(stack) + depth) if macroname not in self.discards: self.write("-\\n\n)%s\n-\\n\n" % macroname) popping(macroname, "c", len(stack) + depth - 1) del stack[-1] # if macroname in self.discards: self.push_output(StringIO.StringIO()) else: self.push_output(self.ofp) # params, optional, empty, environ = self.start_macro(macroname) if not numbered: self.write("Anumbered TOKEN no\n") # rip off the macroname if params: if optional and len(params) == 1: line = line[m.end():] else: line = line[m.end(1):] elif empty: line = line[m.end(1):] else: line = line[m.end():] # # Very ugly special case to deal with \item[]. The catch # is that this needs to occur outside the for loop that # handles attribute parsing so we can 'continue' the outer # loop. # if optional and type(params[0]) is type(()): # the attribute name isn't used in this special case pushing(macroname, "a", depth + len(stack)) stack.append(macroname) self.write("(%s\n" % macroname) m = _start_optional_rx.match(line) if m: self.line = line[m.end():] line = self.subconvert("]", depth + len(stack)) line = "}" + line continue # handle attribute mappings here: for attrname in params: if optional: optional = 0 if type(attrname) is type(""): m = _optional_rx.match(line) if m: line = line[m.end():] self.write("A%s TOKEN %s\n" % (attrname, encode(m.group(1)))) elif type(attrname) is type(()): # This is a sub-element; but don't place the # element we found on the stack (\section-like) pushing(macroname, "b", len(stack) + depth) stack.append(macroname) self.write("(%s\n" % macroname) macroname = attrname[0] m = _start_group_rx.match(line) if m: line = line[m.end():] elif type(attrname) is type([]): # A normal subelement: <macroname><attrname>...</>... attrname = attrname[0] if not opened: opened = 1 self.write("(%s\n" % macroname) pushing(macroname, "c", len(stack) + depth) self.write("(%s\n" % attrname) pushing(attrname, "sub-elem", len(stack) + depth + 1) self.line = skip_white(line)[1:] line = self.subconvert("}", len(stack) + depth + 1)[1:] dbgmsg("subconvert() ==> " + `line[:20]`) popping(attrname, "sub-elem", len(stack) + depth + 1) self.write(")%s\n" % attrname) else: m = _parameter_rx.match(line) if not m: raise LaTeXFormatError( "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) value = m.group(1) if _token_rx.match(value): dtype = "TOKEN" else: dtype = "CDATA" self.write("A%s %s %s\n" % (attrname, dtype, encode(value))) line = line[m.end():] if params and type(params[-1]) is type('') \ and (not empty) and not environ: # attempt to strip off next '{' m = _start_group_rx.match(line) if not m: raise LaTeXFormatError( "non-empty element '%s' has no content: %s" % (macroname, line[:12])) line = line[m.end():] if not opened: self.write("(%s\n" % macroname) pushing(macroname, "d", len(stack) + depth) if empty: line = "}" + line stack.append(macroname) self.pop_output() continue if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line[1:] return self.line if line[0] == "}": # end of macro or group macroname = stack[-1] conversion = self.table.get(macroname) if macroname \ and macroname not in self.discards \ and type(conversion) is not type(""): # otherwise, it was just a bare group self.write(")%s\n" % stack[-1]) popping(macroname, "d", len(stack) + depth - 1) del stack[-1] line = line[1:] continue if line[0] == "{": pushing("", "e", len(stack) + depth) stack.append("") line = line[1:] continue if line[0] == "\\" and line[1] in ESCAPED_CHARS: self.write("-%s\n" % encode(line[1])) line = line[2:] continue if line[:2] == r"\\": self.write("(BREAK\n)BREAK\n") line = line[2:] continue m = _text_rx.match(line) if m: text = encode(m.group()) self.write("-%s\n" % text) line = line[m.end():] continue # special case because of \item[] if line[0] == "]": self.write("-]\n") line = line[1:] continue # avoid infinite loops extra = "" if len(line) > 100: extra = "..." raise LaTeXFormatError("could not identify markup: %s%s" % (`line[:100]`, extra)) while stack and stack[-1] in self.autoclosing: self.write("-\\n\n") self.write(")%s\n" % stack[-1]) popping(stack.pop(), "e", len(stack) + depth - 1) if stack: raise LaTeXFormatError("elements remain on stack: " + string.join(stack, ", ")) # otherwise we just ran out of input here...
54fb7fb9d0ff1c96849572ff809cc9323e87bfa4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/54fb7fb9d0ff1c96849572ff809cc9323e87bfa4/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
report(lang, rep_page, username, com)
report(lang, rep_page, username, com, rep_text)
def report(lang, rep_page, username, com): another_page = wikipedia.Page(lang, rep_page) if another_page.exists(): text_get = another_page.get() else: text_get = '' pos = 0 # The talk page includes "_" between the two names, in this way i replace them to " " regex = talk.replace('_', ' ') + username n = re.compile(regex, re.UNICODE) y = n.search(text_get, pos) if y == None: # Adding the log :) rep_text = rep_text % username another_page.put(text_get + rep_text, comment = com, minorEdit = True) wikipedia.output(u"...Reported...") else: pos = y.end() wikipedia.output(u"The user is already in the report page.")
e84f02593b3eb100ad10b8fa43c2d6d5085e2faa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/e84f02593b3eb100ad10b8fa43c2d6d5085e2faa/welcome.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 4936, 16, 2071, 67, 2433, 16, 2718, 16, 532, 4672, 4042, 67, 2433, 273, 21137, 18, 1964, 12, 4936, 16, 2071, 67, 2433, 13, 309, 4042, 67, 2433, 18, 1808, 13332, 977, 67, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 4936, 16, 2071, 67, 2433, 16, 2718, 16, 532, 4672, 4042, 67, 2433, 273, 21137, 18, 1964, 12, 4936, 16, 2071, 67, 2433, 13, 309, 4042, 67, 2433, 18, 1808, 13332, 977, 67, 58...
""" This function is only used when debugging is on. It sends the output similar to what you'd see when using Python interactively to the browser """
""" This function is only used when debugging is on. It sends the output similar to what you'd see when using Python interactively to the browser """
def ReportError(self, etype, evalue, etb, req=None, filter=None, srv=None, phase="N/A", hname="N/A", debug=0):
3de9a0d15ba9eb7275476985ecfc3381876d7703 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10002/3de9a0d15ba9eb7275476985ecfc3381876d7703/apache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 668, 12, 2890, 16, 24700, 16, 425, 1132, 16, 3393, 70, 16, 1111, 33, 7036, 16, 1034, 33, 7036, 16, 7302, 33, 7036, 16, 6855, 1546, 50, 19, 37, 3113, 366, 529, 1546, 50, 19, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 668, 12, 2890, 16, 24700, 16, 425, 1132, 16, 3393, 70, 16, 1111, 33, 7036, 16, 1034, 33, 7036, 16, 7302, 33, 7036, 16, 6855, 1546, 50, 19, 37, 3113, 366, 529, 1546, 50, 19, 3...
res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) if len(res_id): res = [(6, 0, res_id)]
res = False if line[i]: field_name = field[0].split(':')[0] model_rel = fields_def[field_name]['relation'] if fields_def[field[len(prefix)][:-6]]['type']=='many2many': res_id = [] for db_id in line[i].split(config.get('csv_internal_sep')): try: _check_db_id(self, model_rel, db_id) res_id.append(db_id) except Exception,e: warning += [tools.exception_to_unicode(e)] logger.notifyChannel("import", netsvc.LOG_ERROR, tools.exception_to_unicode(e)) if len(res_id): res = [(6, 0, res_id)]
def process_liness(self, datas, prefix, current_module, model_name, fields_def, position=0): line = datas[position] row = {} translate = {} todo = [] warning = [] data_id = False data_res_id = False is_xml_id = False is_db_id = False ir_model_data_obj = self.pool.get('ir.model.data') # # Import normal fields # for i in range(len(fields)): if i >= len(line): raise Exception(_('Please check that all your lines have %d columns.') % (len(fields),)) if not line[i]: continue
827ce83b5767611573e3e504cd882f1684b5bd2a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/827ce83b5767611573e3e504cd882f1684b5bd2a/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 80, 6336, 12, 2890, 16, 5386, 16, 1633, 16, 783, 67, 2978, 16, 938, 67, 529, 16, 1466, 67, 536, 16, 1754, 33, 20, 4672, 980, 273, 5386, 63, 3276, 65, 1027, 273, 2618, 420...
tmp_dir = 'linux.%s/%s' % (j, os.path.basename(self.tarball).strip('.tar.bz2'))
def run_once(self): """ Represents a single iteration of the process. Uncompresses a previously calculated number of copies of the linux kernel, sequentially or in parallel, and then compares the tree with a base tree, that was uncompressed on the very beginning. """
2430f4e85f0de621aac81e66c6a2f6e4f7fdce3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10349/2430f4e85f0de621aac81e66c6a2f6e4f7fdce3d/dma_memtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 4672, 3536, 868, 6706, 87, 279, 2202, 6532, 434, 326, 1207, 18, 1351, 14706, 281, 279, 7243, 8894, 1300, 434, 13200, 434, 326, 19725, 5536, 16, 695, 6979, 6261,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 8243, 12, 2890, 4672, 3536, 868, 6706, 87, 279, 2202, 6532, 434, 326, 1207, 18, 1351, 14706, 281, 279, 7243, 8894, 1300, 434, 13200, 434, 326, 19725, 5536, 16, 695, 6979, 6261,...
os.remove(self.test_db.name) return self.server.stopListening()
class ClientRemoteCallsTest(RemoteTests): """ Tests of remote procedure calls go here. """
def tearDown(self): from sqlalchemy.orm import clear_mappers self.jobdb._shutdown() clear_mappers() self.connection.disconnect() os.remove(self.test_db.name)
ad833768026b7acaa34c3de07f15de4db343d934 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/ad833768026b7acaa34c3de07f15de4db343d934/test_remote.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 628, 1847, 24182, 18, 535, 1930, 2424, 67, 1458, 10422, 365, 18, 4688, 1966, 6315, 15132, 1435, 2424, 67, 1458, 10422, 1435, 365, 18, 4071, 18, 20177, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 2091, 4164, 12, 2890, 4672, 628, 1847, 24182, 18, 535, 1930, 2424, 67, 1458, 10422, 365, 18, 4688, 1966, 6315, 15132, 1435, 2424, 67, 1458, 10422, 1435, 365, 18, 4071, 18, 20177, 14...
y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo)
y = copier(memo)
def deepcopy(x, memo = None): """Deep copy operation on arbitrary Python objects. See the module's __doc__ string for more info. """ if memo is None: memo = {} d = id(x) if d in memo: return memo[d] try: copierfunction = _deepcopy_dispatch[type(x)] except KeyError: try: copier = x.__deepcopy__ except AttributeError: try: reductor = x.__reduce__ except AttributeError: raise error, \ "un-deep-copyable object of type %s" % type(x) else: y = _reconstruct(x, reductor(), 1, memo) else: y = copier(memo) else: y = copierfunction(x, memo) memo[d] = y return y
11ade1ddc053dcec884e2431b55fb1c1727c65d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/11ade1ddc053dcec884e2431b55fb1c1727c65d7/copy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7217, 12, 92, 16, 11063, 273, 599, 4672, 3536, 13980, 1610, 1674, 603, 11078, 6600, 2184, 18, 225, 2164, 326, 1605, 1807, 1001, 2434, 972, 533, 364, 1898, 1123, 18, 3536, 225, 309, 11063...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7217, 12, 92, 16, 11063, 273, 599, 4672, 3536, 13980, 1610, 1674, 603, 11078, 6600, 2184, 18, 225, 2164, 326, 1605, 1807, 1001, 2434, 972, 533, 364, 1898, 1123, 18, 3536, 225, 309, 11063...
ALL_T = 1+2+4+8+16+32+64+128
PROPERTY = 256 ALL_T = 1+2+4+8+16+32+64+128+256
def _is_private(str): """ @return: True if C{str} is the name of a public object. @rtype: C{boolean} @param str: The name to check. @type str: C{string} """ if str == '...': return 0 for piece in str.split('.'): if piece[0] == '_' and piece[-1] != '_': return 1 return 0
31a49639abf72b18b5c72d645c2a76cbb0c7a4f1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/31a49639abf72b18b5c72d645c2a76cbb0c7a4f1/checker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 1152, 12, 701, 4672, 3536, 632, 2463, 30, 1053, 309, 385, 95, 701, 97, 353, 326, 508, 434, 279, 1071, 733, 18, 632, 86, 723, 30, 385, 95, 6494, 97, 632, 891, 609, 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, 389, 291, 67, 1152, 12, 701, 4672, 3536, 632, 2463, 30, 1053, 309, 385, 95, 701, 97, 353, 326, 508, 434, 279, 1071, 733, 18, 632, 86, 723, 30, 385, 95, 6494, 97, 632, 891, 609, 30,...
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 child = popen2.Popen4(cmd) child.tochild.close() while 1: line = child.fromchild.readline() if not line: break if output: output.write(line) return child.wait()
def _cmd(self, output, dir, *cmditems): """Internal routine to run a shell command in a given directory.""" cmd = ("cd \"%s\"; " % dir) + " ".join(cmditems) if output: output.write("+ %s\n" % cmd) if NO_EXECUTE: return 0 child = popen2.Popen4(cmd) child.tochild.close() while 1: line = child.fromchild.readline() if not line: break if output: output.write(line) return child.wait()
febcb863ca7d0946923a410edd2f9082b0ce60b8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/febcb863ca7d0946923a410edd2f9082b0ce60b8/pimp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
`AddFoldPanel`. Then use the AdddFoldPanelWindow` to add
`AddFoldPanel`. Then use the `AdddFoldPanelWindow` to add
def RedrawIconBitmap(self): """ Redraws the icons (if they exists). """
b82f68a95b19519e472b69190af41a9e48bcf92d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/b82f68a95b19519e472b69190af41a9e48bcf92d/foldpanelbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4621, 1899, 5554, 12224, 12, 2890, 4672, 3536, 4621, 1899, 87, 326, 17455, 261, 430, 2898, 1704, 2934, 3536, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4621, 1899, 5554, 12224, 12, 2890, 4672, 3536, 4621, 1899, 87, 326, 17455, 261, 430, 2898, 1704, 2934, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
for datasetName,lfns in datasets.items(): res = self.__executeOperation(datasetName,'exists')
for datasetName, lfns in datasets.items(): res = self.__executeOperation( datasetName, 'exists' )
def createDataset(self,dataset): res = self.__checkArgumentFormat(dataset) if not res['OK']: return res datasets = res['Value'] created = self.__openSession() successful = {} failed = {} for datasetName,lfns in datasets.items(): res = self.__executeOperation(datasetName,'exists') if not res['OK']: return res elif res['Value']: return S_ERROR("LcgFileCatalogClient.createDataset: This dataset already exists.") res = self.__createDataset(datasetName,lfns) if res['OK']: successful[datasetName] = True else: self.__executeOperation(datasetName,'removeDataset') failed[datasetName] = res['Message'] if created: self.__closeSession() resDict = {'Failed':failed,'Successful':successful} return S_OK(resDict)
6280f3782654b93320f684f56a83a6624459bcec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/6280f3782654b93320f684f56a83a6624459bcec/LcgFileCatalogClient.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 10656, 12, 2890, 16, 8682, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 8682, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 11109, 273, 400, 3292, 620, 3546, 2522, 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, 752, 10656, 12, 2890, 16, 8682, 4672, 400, 273, 365, 16186, 1893, 1379, 1630, 12, 8682, 13, 309, 486, 400, 3292, 3141, 3546, 30, 327, 400, 11109, 273, 400, 3292, 620, 3546, 2522, 273, ...
patch_apply_process = subprocess.Popen(args, stdin=curl_process.stdout)
if patch.get('url'): curl_process = subprocess.Popen(['curl', '--silent', '--show-error', patch['url']], stdout=subprocess.PIPE) patch_apply_process = subprocess.Popen(args, stdin=curl_process.stdout) elif patch.get('diff'): patch_apply_process = subprocess.Popen(args, stdin=subprocess.PIPE) patch_apply_process.communicate(patch['diff']) else: error("Unknown patch object.")
def apply_patch(self, patch, force=False): # It's possible that the patch was not made from the root directory. # We should detect and handle that case. curl_process = subprocess.Popen(['curl', '--silent', '--show-error', patch['url']], stdout=subprocess.PIPE) args = [self.script_path('svn-apply'), '--reviewer', patch['reviewer']] if force: args.append('--force') patch_apply_process = subprocess.Popen(args, stdin=curl_process.stdout)
6685782b391ab41ef08e1776a128ef7f67afc605 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/6685782b391ab41ef08e1776a128ef7f67afc605/scm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2272, 12, 2890, 16, 4729, 16, 2944, 33, 8381, 4672, 468, 2597, 1807, 3323, 716, 326, 4729, 1703, 486, 7165, 628, 326, 1365, 1867, 18, 468, 1660, 1410, 5966, 471, 1640, 716, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2230, 67, 2272, 12, 2890, 16, 4729, 16, 2944, 33, 8381, 4672, 468, 2597, 1807, 3323, 716, 326, 4729, 1703, 486, 7165, 628, 326, 1365, 1867, 18, 468, 1660, 1410, 5966, 471, 1640, 716, 6...
print "FindControl(%s, %s) -> (%s, %s)" % \
if DEBUG: print "FindControl(%s, %s) -> (%s, %s)" % \
def do_inContent(self, partcode, window, event): (what, message, when, where, modifiers) = event local = GlobalToLocal(where) ctltype, control = FindControl(local, window) if ctltype and control: pcode = control.TrackControl(local) if pcode: self.do_controlhit(window, control, pcode, event) else: print "FindControl(%s, %s) -> (%s, %s)" % \ (local, window, ctltype, control)
7a58336511b8c405e01bcda0b886b19c2947189a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7a58336511b8c405e01bcda0b886b19c2947189a/FrameWork.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 267, 1350, 12, 2890, 16, 1087, 710, 16, 2742, 16, 871, 4672, 261, 23770, 16, 883, 16, 1347, 16, 1625, 16, 10429, 13, 273, 871, 1191, 273, 8510, 774, 2042, 12, 6051, 13, 2190...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 267, 1350, 12, 2890, 16, 1087, 710, 16, 2742, 16, 871, 4672, 261, 23770, 16, 883, 16, 1347, 16, 1625, 16, 10429, 13, 273, 871, 1191, 273, 8510, 774, 2042, 12, 6051, 13, 2190...
return '\n'.join(output)
return '\n'.join(output) + '\n'
def script_from_examples(s): r"""Extract script from text with examples. Converts text with examples to a Python script. Example input is converted to regular code. Example output and all other words are converted to comments: >>> text = ''' ... Here are examples of simple math. ... ... Python has super accurate integer addition ... ... >>> 2 + 2 ... 5 ... ... And very friendly error messages: ... ... >>> 1/0 ... To Infinity ... And ... Beyond ... ... You can use logic if you want: ... ... >>> if 0: ... ... blah ... ... blah ... ... ... ... Ho hum ... ''' >>> print script_from_examples(text) # Here are examples of simple math. # # Python has super accurate integer addition # 2 + 2 # Expected: ## 5 # # And very friendly error messages: # 1/0 # Expected: ## To Infinity ## And ## Beyond # # You can use logic if you want: # if 0: blah blah # # Ho hum """ output = [] for piece in DocTestParser().parse(s): if isinstance(piece, Example): # Add the example's source code (strip trailing NL) output.append(piece.source[:-1]) # Add the expected output: want = piece.want if want: output.append('# Expected:') output += ['## '+l for l in want.split('\n')[:-1]] else: # Add non-example text. output += [_comment_line(l) for l in piece.split('\n')[:-1]] # Trim junk on both ends. while output and output[-1] == '#': output.pop() while output and output[0] == '#': output.pop(0) # Combine the output, and return it. return '\n'.join(output)
9a87e587a1d1ba950bcda6b8fe86a50053ef27e5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/9a87e587a1d1ba950bcda6b8fe86a50053ef27e5/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 2080, 67, 16858, 12, 87, 4672, 436, 8395, 4976, 2728, 628, 977, 598, 10991, 18, 225, 20377, 977, 598, 10991, 358, 279, 6600, 2728, 18, 225, 5090, 810, 353, 5970, 358, 6736, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2728, 67, 2080, 67, 16858, 12, 87, 4672, 436, 8395, 4976, 2728, 628, 977, 598, 10991, 18, 225, 20377, 977, 598, 10991, 358, 279, 6600, 2728, 18, 225, 5090, 810, 353, 5970, 358, 6736, 9...
CCompiler = "/usr/bin/CCompiler"
CCompiler = "/usr/bin/cc"
def Boot(): global BuildLocal BuildLocal += " -boot -keep -DM3CC_TARGET=" + Config Version = "1" # This information is duplicated from the config files. # TBD: put it only in one place. # The older bootstraping method does get that right. vms = StringTagged(Config, "VMS") # pick the compiler if Config == "ALPHA32_VMS": CCompiler = "CCompiler" CCompilerFlags = " " elif Config == "ALPHA64_VMS": CCompiler = "CCompiler" CCompilerFlags = "/pointer_size=64 " elif StringTagged(Config, "SOLARIS") or Config == "SOLsun": CCompiler = "/usr/bin/CCompiler" CCompilerFlags = "-g -mt -xldscope=symbolic " else: # gcc platforms CCompiler = { "SOLgnu" : "/usr/sfw/bin/gcc", }.get(Config) or "gcc" CCompilerFlags = { "I386_INTERIX" : "-g ", # gcc -fPIC generates incorrect code on Interix "SOLgnu" : "-g ", # -fPIC? }.get(Config) or "-g -fPIC " CCompilerFlags = CCompilerFlags + ({ "AMD64_LINUX" : " -m64 -mno-align-double ", "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -march=armv6 -mcpu=arm1176jzf-s ", "LINUXLIBC6" : " -m32 -mno-align-double ", "I386_LINUX" : " -m32 -mno-align-double ", "MIPS64_OPENBSD" : " -mabi=64 ", "SOLgnu" : " -m32 -mcpu=v9 ", "I386_SOLARIS" : " -xarch=pentium_pro -Kpic ", "AMD64_SOLARIS" : " -xarch=amd64 -Kpic ", "SOLsun" : " -xarch=v8plus -xcode=pic32 ", "SPARC32_SOLARIS" : " -xarch=v8plus -xcode=pic32 ", "SPARC64_SOLARIS" : " -xarch=v9 -xcode=pic32 ", "SPARC32_LINUX" : " -m32 -mcpu=v9 -munaligned-doubles ", "SPARC64_LINUX" : " -m64 -munaligned-doubles ", }.get(Config) or " ") Link = "$(CC) $(CFLAGS) *.mo *.io *.o " # link flags if StringTagged(Target, "DARWIN"): pass elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): Link = Link + " -lrt -lm -lnsl -lsocket -lpthread " elif StringTagged(Target, "HPUX"): Link = Link + " -lrt -lm " elif StringTagged(Target, "INTERIX"): Link = Link + " -lm " else: Link = Link + " -lm -lpthread " # add -c to compiler but not link (i.e. not CCompilerFlags) Compile = "$(CC) $(CFLAGS) " if not StringTagged(Config, "VMS"): Compile = Compile + " -c " AssembleOnTarget = not vms AssembleOnHost = not AssembleOnTarget # pick assembler AssemblerFlags = " " if StringTagged(Target, "VMS") and AssembleOnTarget: AssemblerMk = "macro" # not right, come back to it later AssemblerSh = "macro" # not right, come back to it later AssemblerFlags = "/alpha " # not right, come back to it later elif Target == "I386_SOLARIS" or Target == "AMD64_SOLARIS": # # see http://gcc.gnu.org/ml/gcc/2010-05/msg00155.html # see http://gcc.gnu.org/install/specific.html#ix86-x-solaris210 # a = (" if test -x /usr/sfw/bin/gas ; then echo /usr/sfw/bin/gas ; \\\n" + " elif test -x /opt/csw/gnu/as ; then echo /opt/csw/gnu/as ; \\\n" + " else echo \"unable to find GNU assembler\" ; fi") AssemblerMk = "$(shell " + a + ")" AssemblerSh = "`" + a + "`" elif StringTagged(Target, "SOLARIS") or Target.startswith("SOL"): AssemblerMk = "/usr/ccs/bin/as" AssemblerSh = "/usr/ccs/bin/as" else: AssemblerMk = "as" AssemblerSh = "as" # set assembler flags if Target != "PPC32_OPENBSD" and Target != "PPC_LINUX": # "Tag" not right for LINUX due to LINUXLIBC6 # "Tag" not right for BSD or 64 either. if Target.find("LINUX") != -1 or Target.find("BSD") != -1: if Target.find("64") != -1 or (StringTagged(Target, "ALPHA") and not StringTagged(Target, "ALPHA32")): AssemblerFlags = AssemblerFlags + " --64" else: AssemblerFlags = AssemblerFlags + " --32" AssemblerFlags = (AssemblerFlags + ({ "AMD64_DARWIN" : " -arch x86_64 ", "PPC64_DARWIN" : " -arch ppc64 ", "ARM_DARWIN" : " -arch armv6 ", # -s puts symbols where linker won't automatically strip them "I386_SOLARIS" : " -s ", "AMD64_SOLARIS" : " -s -xarch=amd64 ", "SOLgnu" : " -s -xarch=v8plus ", "SOLsun" : " -s -xarch=v8plus ", "SPARC32_SOLARIS" : " -s -xarch=v8plus ", "SPARC64_SOLARIS" : " -s -xarch=v9 ", }.get(Target) or "")) GnuPlatformPrefix = { "ARM_DARWIN" : "arm-apple-darwin8-", "ALPHA32_VMS" : "alpha-dec-vms-", "ALPHA64_VMS" : "alpha64-dec-vms-", }.get(Target) or "" if not vms: CCompiler = GnuPlatformPrefix + CCompiler Link = GnuPlatformPrefix + Link if (not vms) or AssembleOnHost: AssemblerMk = GnuPlatformPrefix + AssemblerMk AssemblerSh = GnuPlatformPrefix + AssemblerSh # # squeeze runs of spaces and spaces at ends # CCompilerFlags = re.sub(" +", " ", CCompilerFlags) CCompilerFlags = re.sub(" +$", "", CCompilerFlags) CCompilerFlags = re.sub("^ +", "", CCompilerFlags) Compile = re.sub(" +", " ", Compile) Compile = re.sub(" +$", "", Compile) Compile = re.sub("^ +", "", Compile) Link = re.sub(" +", " ", Link) Link = re.sub(" +$", "", Link) AssemblerFlags = re.sub(" +", " ", AssemblerFlags) AssemblerFlags = re.sub(" +$", "", AssemblerFlags) BootDir = "./cm3-boot-" + Target + "-" + Version P = [ "m3cc", "import-libs", "m3core", "libm3", "sysutils", "m3middle", "m3quake", "m3objfile", "m3linker", "m3back", "m3front", "cm3" ] #DoPackage(["", "realclean"] + P) or sys.exit(1) DoPackage(["", "buildlocal"] + P) or sys.exit(1) try: shutil.rmtree(BootDir) except: pass try: os.mkdir(BootDir) except: pass # # This would probably be a good use of XSL (xml style sheets) # Make = open(os.path.join(BootDir, "make.sh"), "wb") VmsMake = open(os.path.join(BootDir, "vmsmake.com"), "wb") VmsLink = open(os.path.join(BootDir, "vmslink.opt"), "wb") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") UpdateSource = open(os.path.join(BootDir, "updatesource.sh"), "wb") Objects = { } Makefile.write(".SUFFIXES:\n" + ".SUFFIXES: .c .is .ms .s .o .obj .io .mo\n\n" + "all: cm3\n\n" + "clean:\n" + "\trm -rf *.io *.mo *.o *.obj\n\n") for a in [UpdateSource, Make]: a.write("#!/bin/sh\n\n" + "set -e\n" + "set -x\n\n") for a in [Makefile]: a.write("# edit up here\n\n" + "CC ?= " + CCompiler + "\n" + "CFLAGS ?= " + CCompilerFlags + "\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerMk + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for a in [Make]: a.write("# edit up here\n\n" + "CC=${CC:-" + CCompiler + "}\n" + "CFLAGS=${CFLAGS:-" + CCompilerFlags + "}\n" + "Compile=" + Compile + "\n" + "Assemble=" + AssemblerSh + " " + AssemblerFlags + "\n" + "Link=" + Link + "\n" + "\n# no more editing should be needed\n\n") for q in P: dir = GetPackagePath(q) for a in os.listdir(os.path.join(Root, dir, Config)): ext_c = a.endswith(".c") ext_h = a.endswith(".h") ext_s = a.endswith(".s") ext_ms = a.endswith(".ms") ext_is = a.endswith(".is") if not (ext_c or ext_h or ext_s or ext_ms or ext_is): continue fullpath = os.path.join(Root, dir, Config, a) if ext_h or ext_c or not vms or AssembleOnTarget: CopyFile(fullpath, BootDir) if ext_h: continue Object = GetObjectName(a) if Objects.get(Object): continue Objects[Object] = 1 if ext_c: VmsMake.write("$ " + Compile + " " + a + "\n") else: if AssembleOnHost: # must have cross assembler a = AssemblerMk + " " + fullpath + " -o " + BootDir + "/" + Object print(a) os.system(a) else: VmsMake.write("$ " + AssemblerMk + " " + a + "\n") VmsLink.write(Object + "/SELECTIVE_SEARCH\n") Makefile.write(".c.o:\n" + "\t$(Compile) -o $@ $<\n\n" + ".c.obj:\n" + "\t$(Compile) -o $@ $<\n\n" + ".is.io:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".s.o:\n" + "\t$(Assemble) -o $@ $<\n\n" + ".ms.mo:\n" + "\t$(Assemble) -o $@ $<\n\n") Makefile.write("cm3:") Objects = Objects.keys() Objects.sort() k = 4 for a in Objects: k = k + 1 + len(a) if k > 76: # line wrap Makefile.write(" \\\n") k = 1 + len(a) Makefile.write(" " + a) Makefile.write("\n\t") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.o\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.obj\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.mo\n") VmsMake.write("$ set file/attr=(rfm=var,rat=none) *.io\n") VmsMake.write("$ link /executable=cm3.exe vmslink/options\n") for a in [Make, Makefile]: a.write("$(Link) -o cm3\n") for a in [ # # Add to this list as needed. # Adding more than necessary is ok -- assume the target system has no changes, # so we can replace whatever is there. # "m3-libs/libm3/src/os/POSIX/OSConfigPosix.m3", "m3-libs/libm3/src/random/m3makefile", "m3-libs/m3core/src/m3makefile", "m3-libs/m3core/src/Uwaitpid.quake", "m3-libs/m3core/src/thread.quake", "m3-libs/m3core/src/C/m3makefile", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/m3makefile", "m3-libs/m3core/src/Csupport/m3makefile", "m3-libs/m3core/src/float/m3makefile", "m3-libs/m3core/src/runtime/m3makefile", "m3-libs/m3core/src/runtime/common/m3makefile", "m3-libs/m3core/src/runtime/common/Compiler.tmpl", "m3-libs/m3core/src/runtime/common/m3text.h", "m3-libs/m3core/src/runtime/common/RTError.h", "m3-libs/m3core/src/runtime/common/RTMachine.i3", "m3-libs/m3core/src/runtime/common/RTProcess.h", "m3-libs/m3core/src/runtime/common/RTSignalC.c", "m3-libs/m3core/src/runtime/common/RTSignalC.h", "m3-libs/m3core/src/runtime/common/RTSignalC.i3", "m3-libs/m3core/src/runtime/common/RTSignal.i3", "m3-libs/m3core/src/runtime/common/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/m3makefile", "m3-libs/m3core/src/runtime/" + Target + "/RTMachine.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTSignal.m3", "m3-libs/m3core/src/runtime/" + Target + "/RTThread.m3", "m3-libs/m3core/src/text/TextLiteral.i3", "m3-libs/m3core/src/thread/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/m3makefile", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThread.m3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.i3", "m3-libs/m3core/src/thread/PTHREAD/ThreadPThreadC.c", "m3-libs/m3core/src/time/POSIX/m3makefile", "m3-libs/m3core/src/unix/m3makefile", "m3-libs/m3core/src/unix/Common/m3makefile", "m3-libs/m3core/src/unix/Common/m3unix.h", "m3-libs/m3core/src/unix/Common/Udir.i3", "m3-libs/m3core/src/unix/Common/UdirC.c", "m3-libs/m3core/src/unix/Common/Usignal.i3", "m3-libs/m3core/src/unix/Common/Ustat.i3", "m3-libs/m3core/src/unix/Common/UstatC.c", "m3-libs/m3core/src/unix/Common/UtimeC.c", "m3-libs/m3core/src/unix/Common/Uucontext.i3", "m3-sys/cminstall/src/config-no-install/SOLgnu", "m3-sys/cminstall/src/config-no-install/SOLsun", "m3-sys/cminstall/src/config-no-install/Solaris.common", "m3-sys/cminstall/src/config-no-install/Unix.common", "m3-sys/cminstall/src/config-no-install/cm3cfg.common", "m3-sys/cminstall/src/config-no-install/" + Target, "m3-sys/m3cc/src/m3makefile", "m3-sys/m3cc/src/gcc/m3cg/parse.c", "m3-sys/m3middle/src/Target.i3", "m3-sys/m3middle/src/Target.m3", "scripts/python/pylib.py", "m3-libs/m3core/src/C/" + Target + "/Csetjmp.i3", "m3-libs/m3core/src/C/" + Target + "/m3makefile", "m3-libs/m3core/src/C/Common/Csetjmp.i3", "m3-libs/m3core/src/C/Common/Csignal.i3", "m3-libs/m3core/src/C/Common/Cstdio.i3", "m3-libs/m3core/src/C/Common/Cstring.i3", "m3-libs/m3core/src/C/Common/m3makefile", ]: source = os.path.join(Root, a) if FileExists(source): name = GetLastPathElement(a) reldir = RemoveLastPathElement(a) destdir = os.path.join(BootDir, reldir) dest = os.path.join(destdir, name) try: os.makedirs(destdir) except: pass CopyFile(source, dest) for b in [UpdateSource, Make]: b.write("mkdir -p /dev2/cm3/" + reldir + "\n") b.write("cp " + a + " /dev2/cm3/" + a + "\n") for a in [UpdateSource, Make, Makefile, VmsMake, VmsLink]: a.close() # write entirely new custom makefile for NT # We always have object files so just compile and link in one fell swoop. if StringTagged(Config, "NT") or Config == "NT386": DeleteFile("updatesource.sh") DeleteFile("make.sh") Makefile = open(os.path.join(BootDir, "Makefile"), "wb") Makefile.write("cm3.exe: *.io *.mo *.c\r\n" + " cl -Zi -MD *.c -link *.mo *.io -out:cm3.exe user32.lib kernel32.lib wsock32.lib comctl32.lib gdi32.lib advapi32.lib netapi32.lib\r\n") Makefile.close() if vms or StringTagged(Config, "NT") or Config == "NT386": _MakeZip(BootDir[2:]) else: _MakeTGZ(BootDir[2:])
d914ba405ba7a2127bb1b90ea294618a40d4c8bb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9328/d914ba405ba7a2127bb1b90ea294618a40d4c8bb/pylib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26254, 13332, 225, 2552, 3998, 2042, 3998, 2042, 1011, 315, 300, 7137, 300, 10102, 300, 16125, 23, 6743, 67, 16374, 1546, 397, 1903, 225, 4049, 273, 315, 21, 6, 225, 468, 1220, 1779, 353...
<words x="4" y="20" fontsize="12" font="Bitstream Vera Sans"
<words id="left" x="4" y="20" fontsize="12" font="Bitstream Vera Sans"
def testPositioning(self): Player.loadString(""" <avg width="160" height="120"> <line pos1="(4, 20.5)" pos2="(157, 20.5)" color="FF0000"/> <line pos1="(4.5, 20.5)" pos2="(4.5, 110)" color="FF0000"/> <line pos1="(156.5, 20.5)" pos2="(156.5, 110)" color="FF0000"/> <line pos1="(80.5, 20.5)" pos2="(80.5, 110)" color="FF0000"/> <words x="4" y="20" fontsize="12" font="Bitstream Vera Sans" variant="roman" text="Norm"/> <words x="45" y="20" fontsize="12" font="Bitstream Vera Sans" variant="roman" text="orm"/> <words x="75" y="20" fontsize="12" font="Bitstream Vera Sans" variant="roman" text="ÖÄÜ"/> <words x="4" y="40" fontsize="12" font="Bitstream Vera Sans" variant="oblique" text="Jtalic"/> <words x="156" y="60" fontsize="12" alignment="right" font="Bitstream Vera Sans" variant="roman" text="Right-aligned"/> <words x="80" y="80" fontsize="12" alignment="center" font="Bitstream Vera Sans" variant="roman" text="Centered"/> </avg> """) self.start(None, (lambda: self.compareImage("testPositioning", True), ))
6851255504275c88528ffd65c249f43e8ef43654 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7300/6851255504275c88528ffd65c249f43e8ef43654/WordsTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2555, 310, 12, 2890, 4672, 19185, 18, 945, 780, 2932, 3660, 411, 14141, 1835, 1546, 16874, 6, 2072, 1546, 22343, 6441, 411, 1369, 949, 21, 1546, 12, 24, 16, 4200, 18, 25, 2225, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2555, 310, 12, 2890, 4672, 19185, 18, 945, 780, 2932, 3660, 411, 14141, 1835, 1546, 16874, 6, 2072, 1546, 22343, 6441, 411, 1369, 949, 21, 1546, 12, 24, 16, 4200, 18, 25, 2225, 9...
open(file, 'w').write(simplejson.dumps(data, sort_keys=True, indent=indent, separators=separators))
open(file, 'w').write(json.dumps(data, sort_keys=True, indent=indent, separators=separators))
def depsToJsonFile(classDepsIter, depsLogConf): data = {} for (packageId, classId, depId, loadOrRun) in classDepsIter: if classId not in data: data[classId] = {} data[classId]["load"] = [] data[classId]["run"] = []
37ff735a15d950e877ac68861405f1893d4ff769 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/37ff735a15d950e877ac68861405f1893d4ff769/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 3185, 812, 12, 1106, 14430, 2360, 16, 8740, 1343, 3976, 4672, 501, 273, 2618, 364, 261, 5610, 548, 16, 31181, 16, 5993, 548, 16, 1262, 1162, 1997, 13, 316, 667, 14430, 2360, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8740, 774, 3185, 812, 12, 1106, 14430, 2360, 16, 8740, 1343, 3976, 4672, 501, 273, 2618, 364, 261, 5610, 548, 16, 31181, 16, 5993, 548, 16, 1262, 1162, 1997, 13, 316, 667, 14430, 2360, ...
database.commands.c.scheduler == '', database.commands.c.scheduler == scheduler_name, database.commands.c.scheduler == None)
)).filter(sqlalchemy.or_( database.commands_on_host.c.scheduler == '', database.commands_on_host.c.scheduler == scheduler_name, database.commands_on_host.c.scheduler == None)
def stopElapsedCommands(scheduler_name): # we return a list of deferred deffereds = [] # will hold all deferred session = sqlalchemy.create_session() database = MscDatabase() logger = logging.getLogger() logger.debug("MSC_Scheduler->stopElapsedCommands()...") # gather candidates: # retain tasks already in progress # take tasks with end_date in the future, but not null for q in session.query(CommandsOnHost).\ select_from(database.commands_on_host.join(database.commands)).\ filter(database.commands.c.end_date != '0000-00-00 00:00:00').\ filter(database.commands.c.end_date <= time.strftime("%Y-%m-%d %H:%M:%S")).\ filter(sqlalchemy.or_( database.commands_on_host.c.current_state == 'upload_in_progress', database.commands_on_host.c.current_state == 'execution_in_progress', database.commands_on_host.c.current_state == 'delete_in_progress', database.commands_on_host.c.current_state == 'inventory_in_progress', database.commands.c.scheduler == '', database.commands.c.scheduler == scheduler_name, database.commands.c.scheduler == None) ).all(): # enter the maze: stop command deffered = stopCommand(q.id) if deffered: deffereds.append(deffered) session.close() logging.getLogger().info("Scheduler: %d tasks to perform" % len(deffereds)) return deffereds
73cd4c71bcd7384e724630021be966b0cab3150e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/73cd4c71bcd7384e724630021be966b0cab3150e/scheduling.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 28827, 9127, 12, 19972, 67, 529, 4672, 468, 732, 327, 279, 666, 434, 7045, 1652, 586, 9765, 273, 5378, 468, 903, 6887, 777, 7045, 1339, 273, 1847, 24182, 18, 2640, 67, 3184, 1435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 28827, 9127, 12, 19972, 67, 529, 4672, 468, 732, 327, 279, 666, 434, 7045, 1652, 586, 9765, 273, 5378, 468, 903, 6887, 777, 7045, 1339, 273, 1847, 24182, 18, 2640, 67, 3184, 1435, ...
Return the allowed options for the Ellipse class.
Return the allowed options for the ``Ellipse`` class.
def _allowed_options(self): """ Return the allowed options for the Ellipse class.
5be14d52af6bacc0b6e9a15c729933c57aed3aae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/5be14d52af6bacc0b6e9a15c729933c57aed3aae/ellipse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8151, 67, 2116, 12, 2890, 4672, 3536, 2000, 326, 2935, 702, 364, 326, 10426, 10472, 667, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8151, 67, 2116, 12, 2890, 4672, 3536, 2000, 326, 2935, 702, 364, 326, 10426, 10472, 667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
class Rel_ai(models.Model): """ Astrophotocalibration-Image relation """ astrophotocalibration = models.ForeignKey(Astrophotocalibration,null=True,blank= True,db_column='astrophotocalibration_id') image = models.ForeignKey(Image,null=True,blank= True,db_column='image_id') class Meta: unique_together = ('astrophotocalibration','image') verbose_name="Ingested Image involved in Astrometric/Photometric Calibration" verbose_name_plural="Ingested Images involved in Astrometric/Photometric Calibration" def __unicode__(self): return self.astrophotocalibration
class Rel_imgrel(models.Model): """ Image-Release relation """ image = models.ForeignKey(Image) release = models.ForeignKey(Release) class Meta: unique_together = ('image', 'release') def __unicode__(self): return self.name
def __unicode__(self): return self.name
8ab51fde140d02e92061fef4be62f4634f3aae1b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/8ab51fde140d02e92061fef4be62f4634f3aae1b/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 9124, 972, 12, 2890, 4672, 327, 365, 18, 529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
% (node.id, seg_node.id, seg[0], seg[1]))
def walk(self, node, seg, errh, seg_count, cur_line, ls_id): """ Handle required segment/loop missed (not found in seg) Handle found segment = Not used """
bb619bf611150eaa5b70d0f12ddff224e1468784 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/bb619bf611150eaa5b70d0f12ddff224e1468784/map_walker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 2890, 16, 756, 16, 2291, 16, 393, 76, 16, 2291, 67, 1883, 16, 662, 67, 1369, 16, 7180, 67, 350, 4672, 3536, 5004, 1931, 3267, 19, 6498, 25143, 261, 902, 1392, 316, 2291, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5442, 12, 2890, 16, 756, 16, 2291, 16, 393, 76, 16, 2291, 67, 1883, 16, 662, 67, 1369, 16, 7180, 67, 350, 4672, 3536, 5004, 1931, 3267, 19, 6498, 25143, 261, 902, 1392, 316, 2291, 13...
r1 = self._search(query.left) r2 = self._search(query.right)
r1 = self.__search(query.left) r2 = self.__search(query.right)
def _search(self, query): if isinstance(query, Query.Simple): # A simple query fields = self.get_handler('fields') documents = {} field_number = fields.field_numbers[query.name] field = fields.fields[field_number] if field_number in fields.indexed_fields: tree = self.get_handler('f%d' % field_number) # XXX Analyse value = query.value if field.type == 'bool': value = str(int(value)) for doc_number, weight in tree.search_word(value).items(): documents[doc_number] = weight return documents else: # A complex query r1 = self._search(query.left) r2 = self._search(query.right) documents = {} if query.operator == 'and': for number in r1: if number in r2: documents[number] = r1[number] + r2[number] return documents elif query.operator == 'or': for number, weight in r2.items(): if number in r1: r1[number] += weight else: r1[number] = weight return r1
24f5ae2688285eadb944da262a4798fc6f82877d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/24f5ae2688285eadb944da262a4798fc6f82877d/Catalog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 12, 2890, 16, 843, 4672, 309, 1549, 12, 2271, 16, 2770, 18, 5784, 4672, 468, 432, 4143, 843, 1466, 273, 365, 18, 588, 67, 4176, 2668, 2821, 6134, 7429, 273, 2618, 652, 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, 389, 3072, 12, 2890, 16, 843, 4672, 309, 1549, 12, 2271, 16, 2770, 18, 5784, 4672, 468, 432, 4143, 843, 1466, 273, 365, 18, 588, 67, 4176, 2668, 2821, 6134, 7429, 273, 2618, 652, 67, ...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.IntField.__init__(self, 692) else quickfix.IntField.__init__(self, 692, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 9975, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 1702, 974, 16186, 2738, 972, 12, 2890, 16, 1666, 9975, 13, 469, 9549, 904, 18, 1702, 974, 16186, 2738, ...
However, as it contains no induced subgraphs isomorphic to `P_6`, an exception is raised in this case :: sage: g.induced_subgraph_search(graphs.PathGraph(6)) Traceback (most recent call last): ... ValueError: No induced copy of the graph exists
However, the Petersen graph does not contain a subgraph isomorphic to `K_3`:: sage: g.subgraph_search(graphs.CompleteGraph(3)) is None True Nor does it contain a nonempty induced subgraph isomorphic to `P_6`:: sage: g.subgraph_search(graphs.PathGraph(6), induced=True) is None True The empty graph is a subgraph of every graph:: sage: g.subgraph_search(graphs.EmptyGraph()) Graph on 0 vertices sage: g.subgraph_search(graphs.EmptyGraph(), induced=True) Graph on 0 vertices
def induced_subgraph_search(self, G): r""" Returns an induced copy of `G` in self.
ff7673c4297965681e16ef36d204d5f5d4c2273d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/ff7673c4297965681e16ef36d204d5f5d4c2273d/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1547, 26372, 67, 1717, 4660, 67, 3072, 12, 2890, 16, 611, 4672, 436, 8395, 2860, 392, 1547, 26372, 1610, 434, 1375, 43, 68, 316, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1547, 26372, 67, 1717, 4660, 67, 3072, 12, 2890, 16, 611, 4672, 436, 8395, 2860, 392, 1547, 26372, 1610, 434, 1375, 43, 68, 316, 365, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
logger.error('Job %d has status %s and so the merge can not continue. '\ 'This can be overridden with the ignorefailed flag.', j.id, j.status)
logger.error('Job %s has status %s and so the merge can not continue. '\ 'This can be overridden with the ignorefailed flag.', j.fqid, j.status)
def merge(self, jobs, outputdir = None, ignorefailed = None, overwrite = None): """ Method to merge the output of jobs. jobs may be a single job instance or a sequence of Jobs outputdir is the name of the directry to put the merge results in. It will be created if needed. ignorefailed and overwrite have the same meaning as in the schema, but override the schema values.
e22fb79dc6db84ce7b972b3d6370e43de872b397 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/e22fb79dc6db84ce7b972b3d6370e43de872b397/Merger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
result += "|" + res[i][0] + "\n" result += "|[[GUIVariable
result += "| " + res[i][0] + "\n" result += "| [[GUIVariable
def create_config_table(data): """Creates a table for data in a config table.
22886e3d2ac9ebe679b9ccd6010e89e8fc51ae1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/22886e3d2ac9ebe679b9ccd6010e89e8fc51ae1c/wiki_grabber.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 1425, 67, 2121, 12, 892, 4672, 3536, 2729, 279, 1014, 364, 501, 316, 279, 642, 1014, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 67, 1425, 67, 2121, 12, 892, 4672, 3536, 2729, 279, 1014, 364, 501, 316, 279, 642, 1014, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def ignorableWhitespace(self, chars, start, end): self._cont_handler.ignorableWhitespace(chars, start, end)
def ignorableWhitespace(self, chars): self._cont_handler.ignorableWhitespace(chars)
def ignorableWhitespace(self, chars, start, end): self._cont_handler.ignorableWhitespace(chars, start, end)
fc643c339d5dd23e7090a3fcfb1ee92f7e5dc8e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fc643c339d5dd23e7090a3fcfb1ee92f7e5dc8e4/saxutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9750, 15514, 9431, 12, 2890, 16, 5230, 16, 787, 16, 679, 4672, 365, 6315, 1213, 67, 4176, 18, 724, 15514, 9431, 12, 7549, 16, 787, 16, 679, 13, 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, 9750, 15514, 9431, 12, 2890, 16, 5230, 16, 787, 16, 679, 4672, 365, 6315, 1213, 67, 4176, 18, 724, 15514, 9431, 12, 7549, 16, 787, 16, 679, 13, 2, -100, -100, -100, -100, -100, -100, ...
patchf.close()
patchf.rename()
def refresh(self, repo, pats=None, **opts): if len(self.applied) == 0: self.ui.write(_("No patches applied\n")) return 1 msg = opts.get('msg', '').rstrip() newuser = opts.get('user') newdate = opts.get('date') if newdate: newdate = '%d %d' % util.parsedate(newdate) wlock = repo.wlock() try: self.check_toppatch(repo) (top, patchfn) = (self.applied[-1].rev, self.applied[-1].name) top = revlog.bin(top) if repo.changelog.heads(top) != [top]: raise util.Abort(_("cannot refresh a revision with children")) cparents = repo.changelog.parents(top) patchparent = self.qparents(repo, top) ph = self.readheaders(patchfn)
dfe0c30cf55e8ab5730a99afe15f33fc0eabea81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/dfe0c30cf55e8ab5730a99afe15f33fc0eabea81/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 16, 3538, 16, 293, 2323, 33, 7036, 16, 2826, 4952, 4672, 309, 562, 12, 2890, 18, 438, 3110, 13, 422, 374, 30, 365, 18, 4881, 18, 2626, 24899, 2932, 2279, 16482, 6754, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12, 2890, 16, 3538, 16, 293, 2323, 33, 7036, 16, 2826, 4952, 4672, 309, 562, 12, 2890, 18, 438, 3110, 13, 422, 374, 30, 365, 18, 4881, 18, 2626, 24899, 2932, 2279, 16482, 6754, ...
finalInputData = currentFiles+';'+extraFiles uniqueInputData = uniqueElements(finalInputData.split(';')) paramsDict['InputData']['value'] = string.join(uniqueInputData,';') self.log.verbose('Final unique Input Data %s' %(string.join(uniqueInputData,';')))
finalInputData = currentFiles + ';' + extraFiles uniqueInputData = uniqueElements( finalInputData.split( ';' ) ) paramsDict['InputData']['value'] = string.join( uniqueInputData, ';' ) self.log.verbose( 'Final unique Input Data %s' % ( string.join( uniqueInputData, ';' ) ) )
def _toJDL(self,xmlFile=''): #messy but need to account for xml file being in /tmp/guid dir """Creates a JDL representation of itself as a Job. """ #Check if we have to do old bootstrap... classadJob = ClassAd('[]')
50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 869, 46, 8914, 12, 2890, 16, 2902, 812, 2218, 11, 4672, 468, 81, 403, 93, 1496, 1608, 358, 2236, 364, 2025, 585, 3832, 316, 342, 5645, 19, 14066, 1577, 3536, 2729, 279, 804, 8914,...
import sage.rings.residue_field return sage.rings.residue_field.ResidueField(prime, names = names)
from sage.rings.residue_field import ResidueField return ResidueField(prime, names = names, check = check)
def residue_field(self, prime, names = None, check = False): """ Return the residue field of this number field at a given prime, ie $O_K / p O_K$.
238acb701bf054dd774adc06c54451559582da3b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/238acb701bf054dd774adc06c54451559582da3b/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14765, 67, 1518, 12, 2890, 16, 17014, 16, 1257, 273, 599, 16, 866, 273, 1083, 4672, 3536, 2000, 326, 14765, 652, 434, 333, 1300, 652, 622, 279, 864, 17014, 16, 9228, 271, 51, 67, 47, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14765, 67, 1518, 12, 2890, 16, 17014, 16, 1257, 273, 599, 16, 866, 273, 1083, 4672, 3536, 2000, 326, 14765, 652, 434, 333, 1300, 652, 622, 279, 864, 17014, 16, 9228, 271, 51, 67, 47, ...
log.error("Could not find required logging config file: %s" % log_ini)
log.error("Error configuring logging: %s" % e)
def main(retParams): # defaults config_opts = {} setup_default_config_opts(config_opts) (options, args) = command_parse(config_opts) # config path -- can be overridden on cmdline config_path=MOCKCONFDIR if options.configdir: config_path = options.configdir # check args if len(args) < 1: log.error("No srpm or command specified - nothing to do") sys.exit(50) # Read in the config files: default, and then user specified for cfg in ( os.path.join(config_path, 'defaults.cfg'), '%s/%s.cfg' % (config_path, options.chroot)): if os.path.exists(cfg): execfile(cfg) else: log.error("Could not find required config file: %s" % cfg) if options.chroot == "default": log.error(" Did you forget to specify the chroot to use with '-r'?") sys.exit(1) # reconfigure logging in case config file was overridden log_ini = os.path.join(config_path, config_opts["log_config_file"]) try: log_cfg = ConfigParser.ConfigParser() logging.config.fileConfig(log_ini) log_cfg.read(log_ini) except (IOError, OSError), e: log.error("Could not find required logging config file: %s" % log_ini) sys.exit(50) # set up logging format strings config_opts['build_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['build_log_fmt_name'], "format", raw=1) config_opts['root_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['root_log_fmt_name'], "format", raw=1) config_opts['state_log_fmt_str'] = log_cfg.get("formatter_%s" % config_opts['state_log_fmt_name'], "format", raw=1) # cmdline options override config options log.info("mock.py version %s starting..." % __VERSION__) set_config_opts_per_cmdline(config_opts, options) warn_obsolete_config_options(config_opts) # do whatever we're here to do # uidManager saves current real uid/gid which are unpriviledged (callers) # due to suid helper, our current effective uid is 0 uidManager = mock.uid.uidManager(os.getuid(), os.getgid()) chroot = mock.backend.Root(config_opts, uidManager) # elevate privs uidManager.becomeUser(0) retParams["chroot"] = chroot retParams["config_opts"] = config_opts os.umask(002) if args[0] in ('chroot', 'shell', 'install', 'installdeps'): config_opts['clean'] = 0 if config_opts['clean']: chroot.clean() if args[0] == 'init': chroot.init() elif args[0] == 'clean': if chroot.state() != "clean": chroot.clean() elif args[0] in ('chroot', 'shell'): chroot.init() chroot._mountall() try: cmd = ' '.join(args[1:]) os.system("PS1='mock-chroot> ' /usr/sbin/chroot %s %s" % (chroot.rootdir, cmd)) finally: chroot._umountall() elif args[0] == 'installdeps': if len(args) > 1: srpms = args[1:] else: log.critical("You must specify an SRPM file.") sys.exit(50) for hdr in mock.util.yieldSrpmHeaders(srpms, plainRpmOk=1): pass chroot.init() chroot._mountall() try: chroot.installSrpmDeps(*srpms) finally: chroot._umountall() elif args[0] == 'install': if len(args) > 1: srpms = args[1:] else: log.critical("You must specify a package list to install.") sys.exit(50) chroot.init() chroot.yumInstall(*srpms) elif args[0] == 'rebuild': do_rebuild(config_opts, chroot, args[1:]) else: raise mock.exception.BadCmdline, "Unknown command specified: %s" % args[0]
5add76128fcc10555264392307d5da998a05401b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7328/5add76128fcc10555264392307d5da998a05401b/mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 1349, 1370, 4672, 468, 3467, 642, 67, 4952, 273, 2618, 3875, 67, 1886, 67, 1425, 67, 4952, 12, 1425, 67, 4952, 13, 261, 2116, 16, 833, 13, 273, 1296, 67, 2670, 12, 1425, 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, 2774, 12, 1349, 1370, 4672, 468, 3467, 642, 67, 4952, 273, 2618, 3875, 67, 1886, 67, 1425, 67, 4952, 12, 1425, 67, 4952, 13, 261, 2116, 16, 833, 13, 273, 1296, 67, 2670, 12, 1425, 67...
return run_cmd('bzcat ' + file + ' | ' + command, ignore_status)
cat = 'bzcat'
def cat_file_to_cmd(file, command, ignore_status=0, return_output=False): """ equivalent to 'cat file | command' but knows to use zcat or bzcat if appropriate """ if return_output: run_cmd = utils.system_output else: run_cmd = utils.system if not os.path.isfile(file): raise NameError('invalid file %s to cat to command %s' % (file, command)) if file.endswith('.bz2'): return run_cmd('bzcat ' + file + ' | ' + command, ignore_status) elif (file.endswith('.gz') or file.endswith('.tgz')): return run_cmd('zcat ' + file + ' | ' + command, ignore_status) else: return run_cmd('cat ' + file + ' | ' + command, ignore_status)
c441dcc970c8465009fb0c4b0cb7e7d8d71db69c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/c441dcc970c8465009fb0c4b0cb7e7d8d71db69c/autotest_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6573, 67, 768, 67, 869, 67, 4172, 12, 768, 16, 1296, 16, 2305, 67, 2327, 33, 20, 16, 327, 67, 2844, 33, 8381, 4672, 3536, 7680, 358, 296, 2574, 585, 571, 1296, 11, 1496, 21739, 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, 6573, 67, 768, 67, 869, 67, 4172, 12, 768, 16, 1296, 16, 2305, 67, 2327, 33, 20, 16, 327, 67, 2844, 33, 8381, 4672, 3536, 7680, 358, 296, 2574, 585, 571, 1296, 11, 1496, 21739, 358, ...
logger.info(u"Simulation: Creating the MythVideo directory (%s)." % (channels_to_copy[dir_key]))
logger.info(u"Simulation: Creating the MythVideo directory (%s)." % (copy_dir))
def main(): """Support mirobridge from the command line returns True """ global localhostname, simulation, verbose, storagegroups, ffmpeg, channel_id, channel_num global flat, download_sleeptime, channel_watch_only, channel_mythvideo_only, channel_new_watch_copy global vid_graphics_dirs, imagemagick, statistics, requirements_are_met global graphic_suffix, graphic_path_suffix, graphic_name_suffix global mythcommflag_recordings, mythcommflag_videos global local_only parser = OptionParser(usage=u"%prog usage: mirobridge -huevstdociVHSCWM [parameters]\n") parser.add_option( "-e", "--examples", action="store_true", default=False, dest="examples", help=u"Display examples for executing the jamu script") parser.add_option( "-v", "--version", action="store_true", default=False, dest="version", help=u"Display version and author information") parser.add_option( "-s", "--simulation", action="store_true", default=False, dest="simulation", help=u"Simulation (dry run), no files are copied, symlinks created or MythTV data bases altered. If option (-n) is NOT specified Miro auto downloads WILL take place. See option (-n) help for details.") parser.add_option( "-t", "--testenv", action="store_true", default=False, dest="testenv", help=u"Test that the local environment can run all mirobridge functionality") parser.add_option( "-n", "--no_autodownload", action="store_true", default=False, dest="no_autodownload", help=u"Do not perform Miro Channel updates, video expiry and auto-downloadings. Default is to perform all perform all Channel maintenance features.") parser.add_option( "-o", "--nosubdirs", action="store_true", default=False, dest="nosubdirs", help=u"Organise MythVideo's Miro directory WITHOUT Miro channel subdirectories. The default is to have Channel subdirectories.") parser.add_option( "-c", "--channel", metavar="CHANNEL_ID:CHANNEL_NUM", default="", dest="channel", help=u'Specifies the channel id that is used for Miros unplayed recordings. Enter as "xxxx:yyy". Default is 9999:999. Be warned that once you change the default channel_id "9999" you must always use this option!') #parser.add_option( "-i", "--import", metavar="CONFIGFILE", default="", dest="import", # help=u'Import Miro exported configuration file and or channel changes.') parser.add_option( "-V", "--verbose", action="store_true", default=False, dest="verbose", help=u"Display verbose messages when processing") parser.add_option( "-H", "--hostname", metavar="HOSTNAME", default="", dest="hostname", help=u"MythTV Backend hostname mirobridge is to up date") parser.add_option( "-S", "--sleeptime", metavar="SLEEP_DELAY_SECONDS", default="", dest="sleeptime", help=u"The amount of seconds to wait for an auto download to start.\nThe default is 60 seconds, but this may need to be adjusted for slower Internet connections.") parser.add_option( "-C", "--addchannel", metavar="ICONFILE_PATH", default="OFF", dest="addchannel", help=u'Add a Miro Channel record to MythTV. This gets rid of the "#9999 #9999" on the Watch Recordings screen and replaces it with the usual\nthe channel number and channel name.\nThe default if not overridden by the (-c) option is channel number 999.\nIf a filename and path is supplied it will be set as the channels icon. Make sure your override channel number is NOT one of your current MythTV channel numbers.\nThis option is typically only used once as there can only be one Miro channel record at a time.') parser.add_option( "-N", "--new_watch_copy", action="store_true", default=False, dest="new_watch_copy", help=u'For ALL Miro Channels: Use the "Watch Recording" screen to watch new Miro downloads then once watched copy the videos, icons, screen shot and metadata to MythVideo. Once coping is complete delete the video from Miro.\nThis option overrides any "mirobridge.conf" settings.') parser.add_option( "-W", "--watch_only", action="store_true", default=False, dest="watch_only", help=u'For ALL Miro Channels: Only use "Watch Recording" never move any Miro videos to MythVideo.\nThis option overrides any "mirobridge.conf" settings.') parser.add_option( "-M", "--mythvideo_only", action="store_true", default=False, dest="mythvideo_only", help=u'For ALL Miro Channel videos: Copy newly downloaded Miro videos to MythVideo and removed from Miro. These Miro videos never appear in the MythTV "Watch Recording" screen.\nThis option overrides any "mirobridge.conf" settings.') opts, args = parser.parse_args() if opts.examples: # Display example information sys.stdout.write(examples_txt+'\n') sys.exit(True) if opts.version: # Display program information sys.stdout.write(u"\nTitle: (%s); Version: description(%s); Author: (%s)\n%s\n" % ( __title__, __version__, __author__, __purpose__ )) sys.exit(True) if opts.testenv: test_environment = True else: test_environment = False # Verify that Miro is not currently running if isMiroRunning(): sys.exit(False) # Verify that only None or one of the mutually exclusive (-W), (-M) and (-N) options is being used x = 0 if opts.new_watch_copy: x+=1 if opts.watch_only: x+=1 if opts.mythvideo_only: x+=1 if x > 1: logger.critical(u"The (-W), (-M) and (-N) options are mutually exclusive, so only one can be specified at a time.") sys.exit(False) # Set option related global variables simulation = opts.simulation verbose = opts.verbose if opts.hostname: # Override localhostname if the user specified an hostname localhostname = opts.hostname # Validate settings # Make sure mirobridge is to update a real MythTV backend if not mythdb.getSetting(u'BackendServerIP', hostname = localhostname): logger.critical(u"The MythTV backend (%s) is not a MythTV backend." % localhostname) if test_environment: requirements_are_met = False else: sys.exit(False) ## Video base directory and current version and revision numbers base_video_dir = config.get(prefs.MOVIES_DIRECTORY) miro_version_rev = u"%s r%s" % (config.get(prefs.APP_VERSION), config.get(prefs.APP_REVISION_NUM)) displayMessage(u"Miro Version (%s)" % (miro_version_rev)) displayMessage(u"Base Miro Video Directory (%s)" % (base_video_dir,)) logger.info(u'') # Verify Miro version sufficent and Video file configuration correct. if not os.path.isdir(base_video_dir): logger.critical(u"The Miro Videos directory (%s) does not exist." % str(base_video_dir)) if test_environment: requirements_are_met = False else: sys.exit(False) if config.get(prefs.APP_VERSION) < u"2.0.3": logger.critical(u"The installed version of Miro (%s) is too old. It must be at least v2.0.3 or higher." % config.get(prefs.APP_VERSION)) if test_environment: requirements_are_met = False else: sys.exit(False) # Get storage groups if getStorageGroups() == False: logger.critical(u"Retrieving storage groups from the MythTV data base failed") if test_environment: requirements_are_met = False else: sys.exit(False) elif not u'default' in storagegroups.keys(): logger.critical(u"There must be a 'Default' storage group") if test_environment: requirements_are_met = False else: sys.exit(False) if opts.channel: channel = opts.channel.split(u':') if len(channel) != 2: logger.critical(u"The Channel (%s) must be in the format xxx:yyy with x an y all numeric." % str(opts.channel)) if test_environment: requirements_are_met = False else: sys.exit(False) elif not _can_int(channel[0]) or not _can_int(channel[1]): logger.critical(u"The Channel_id (%s) and Channel_num (%s) must be numeric." % (channel[0], channel[1])) if test_environment: requirements_are_met = False else: sys.exit(False) else: channel_id = int(channel[0]) channel_num = int(channel[1]) if opts.sleeptime: if not _can_int(opts.sleeptime): logger.critical(u"Auto-dewnload sleep time (%s) must be numeric." % str(opts.sleeptime)) if test_environment: requirements_are_met = False else: sys.exit(False) else: download_sleeptime = float(opts.sleeptime) getMythtvDirectories() # Initialize all the Video and graphics directory dictionary if opts.nosubdirs: # Did the user want a flat MythVideo "Miro" directory structure? flat = True # Get the values in the mirobridge.conf configuration file setUseroptions() if opts.watch_only: # ALL Miro videos will only be viewed in the MythTV "Watch Recordings" screen channel_watch_only = [u'all'] if opts.mythvideo_only: # ALL Miro videos will be copied to MythVideo and removed from Miro channel_mythvideo_only = {u'all': vid_graphics_dirs[u'mythvideo']+u'Miro/'} # Once watched ALL Miro videos will be copied to MythVideo and removed from Miro if opts.new_watch_copy: channel_new_watch_copy = {u'all': vid_graphics_dirs[u'mythvideo']+u'Miro/'} # Verify that "Mythvideo Only" and "New-Watch-Copy" channels do not clash if len(channel_mythvideo_only) and len(channel_new_watch_copy): for key in channel_mythvideo_only.keys(): if key in channel_new_watch_copy.keys(): logger.critical(u'The Miro Channel (%s) cannot be used as both a "Mythvideo Only" and "New-Watch-Copy" channel.' % key) if test_environment: requirements_are_met = False else: sys.exit(False) # Verify that ImageMagick is installed ret = useImageMagick(u"convert -version") if ret < 0 or ret > 1: logger.critical(u"ImageMagick must be installed, graphics cannot be resized or converted to the required graphics format (e.g. jpg and or png)") if test_environment: requirements_are_met = False else: sys.exit(False) # Verify that mythcommflag is installed mythcommflagpath = getlocationMythcommflag() if mythcommflagpath: mythcommflag_recordings = mythcommflag_recordings % mythcommflagpath mythcommflag_videos = mythcommflag_videos % mythcommflagpath else: logger.critical(u"mythcommflag must be installed so that Miro video seek tables can be built.") if test_environment: requirements_are_met = False else: sys.exit(False) if opts.testenv: # All tests passed getVideoDetails(u"") # Test that ffmpeg is available if ffmpeg and requirements_are_met: logger.info(u"The environment test passed !\n\n") sys.exit(True) else: logger.critical(u"The environment test FAILED. See previously displayed error messages!") sys.exit(False) if opts.addchannel != u'OFF': # Add a Miro Channel record - Should only be done once createChannelRecord(opts.addchannel, channel_id, channel_num) logger.info(u"The Miro Channel record has been successfully created !\n\n") sys.exit(True) ########################################### # Mainlogic for all Miro and MythTV bridge ########################################### # # Start the Miro Front and Backend - This allows mirobridge to execute actions on the Miro backend # displayMessage(u"Starting Miro Frontend and Backend") startup.initialize(config.get(prefs.THEME_NAME)) app.cli_events = EventHandler() app.cli_events.connect_to_signals() startup.startup() app.cli_events.startup_event.wait() if app.cli_events.startup_failure: logger.critical(u"Starting Miro Frontend and Backend failed: (%s)" % app.cli_events.startup_failure[0]) print_text(app.cli_events.startup_failure[1]) app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) app.cli_interpreter = MiroInterpreter() if opts.verbose: app.cli_interpreter.verbose = True else: app.cli_interpreter.verbose = False app.cli_interpreter.simulation = opts.simulation app.cli_interpreter.videofiles = [] app.cli_interpreter.downloading = False app.cli_interpreter.icon_cache_dir = config.get(prefs.ICON_CACHE_DIRECTORY) app.cli_interpreter.imagemagick = imagemagick app.cli_interpreter.statistics = statistics if config.get(prefs.APP_VERSION) < u"2.5.0": app.renderer = app.cli_interpreter else: app.movie_data_program_info = app.cli_interpreter.movie_data_program_info # # Optionally Update Miro feeds and # download any "autodownloadable" videos which are pending # if not opts.no_autodownload: if opts.verbose: app.cli_interpreter.verbose = False app.cli_interpreter.do_mythtv_getunwatched(u'') before_download = len(app.cli_interpreter.videofiles) if opts.verbose: app.cli_interpreter.verbose = True app.cli_interpreter.do_mythtv_update_autodownload(u'') time.sleep(download_sleeptime) firsttime = True while True: app.cli_interpreter.do_mythtv_check_downloading(u'') if app.cli_interpreter.downloading: time.sleep(30) firsttime = False continue elif firsttime: time.sleep(download_sleeptime) firsttime = False continue else: break if opts.verbose: app.cli_interpreter.verbose = False app.cli_interpreter.do_mythtv_getunwatched(u'') after_download = len(app.cli_interpreter.videofiles) statistics[u'Miros_videos_downloaded'] = after_download - before_download if opts.verbose: app.cli_interpreter.verbose = True # Deal with orphaned oldrecorded records. # These records indicate that the MythTV user deleted the video from the Watched Recordings screen # or from MythVideo # These video items must also be deleted from Miro videostodelete = getOldrecordedOrphans() if len(videostodelete): displayMessage(u"Starting Miro delete of videos deleted in the MythTV Watched Recordings screen.") for video in videostodelete: # Completely remove the video and item information from Miro app.cli_interpreter.do_mythtv_item_remove([video[u'title'], video[u'subtitle']]) # # Collect the set of played Miro video files # app.cli_interpreter.videofiles = getPlayedMiroVideos() # # Updated the played status of items # if app.cli_interpreter.videofiles: displayMessage(u"Starting Miro update of watched MythTV videos") app.cli_interpreter.do_mythtv_updatewatched(u'') # # Get the unwatched videos details from Miro # app.cli_interpreter.do_mythtv_getunwatched(u'') unwatched = app.cli_interpreter.videofiles # # Get the watched videos details from Miro # app.cli_interpreter.do_mythtv_getwatched(u'') watched = app.cli_interpreter.videofiles # # Remove any duplicate Miro videoes from the unwatched or watched list of Miro videos # This means that Miro has duplicates due to a Miro/Channel website issue # These videos should not be added to the MythTV Watch Recordings screen # unwatched_copy = [] for item in unwatched: unwatched_copy.append(item) for item in unwatched_copy: # Check for a duplicate against already watched Miro videos for x in watched: if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: try: unwatched.remove(item) # Completely remove this duplicate video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(item[u'videoFilename']) displayMessage(u"Skipped adding a duplicate Miro video to the MythTV Watch Recordings screen (%s - %s) which is already in MythVideo.\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime." % (item[u'channelTitle'], item[u'title'])) except ValueError: pass duplicates = [] for item in unwatched_copy: dup_flag = 0 for x in unwatched: # Check for a duplicate against un-watched Miro videos if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: dup_flag+=1 if dup_flag > 1: for x in duplicates: if item[u'channelTitle'] == x[u'channelTitle'] and item[u'title'] == x[u'title']: break else: duplicates.append(item) for duplicate in duplicates: try: unwatched.remove(duplicate) # Completely remove this duplicate video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(duplicate[u'videoFilename']) displayMessage(u"Skipped adding a Miro video to the MythTV Watch Recordings screen (%s - %s) as there are duplicate 'new' video items.\nSometimes a Miro channel has the same video downloaded multiple times.\nThis is a Miro/Channel web site issue and often rectifies itself overtime." % (duplicate[u'channelTitle'], duplicate[u'title'])) except ValueError: pass # # Deal with any Channel videos that are to be copied and removed from Miro # copy_items = [] # Copy unwatched and watched Miro videos (all or only selected Channels) if u'all' in channel_mythvideo_only: for array in [watched, unwatched]: for item in array: copy_items.append(item) elif len(channel_mythvideo_only): for array in [watched, unwatched]: for video in array: if filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_mythvideo_only.keys(): copy_items.append(video) # Copy ONLY watched Miro videos (all or only selected Channels) if u'all' in channel_new_watch_copy: for video in watched: copy_items.append(video) elif len(channel_new_watch_copy): for video in watched: if filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_new_watch_copy.keys(): copy_items.append(video) channels_to_copy = {} for key in channel_mythvideo_only.keys(): channels_to_copy[key] = channel_mythvideo_only[key] for key in channel_new_watch_copy.keys(): channels_to_copy[key] = channel_new_watch_copy[key] for video in copy_items: dir_key = filter(is_not_punct_char, video[u'channelTitle'].lower()) # Create the subdirectories to copy the video into directory_coverart = False if not os.path.isdir(channels_to_copy[dir_key]): if simulation: logger.info(u"Simulation: Creating the MythVideo directory (%s)." % (channels_to_copy[dir_key])) else: os.makedirs(channels_to_copy[dir_key]) directory_coverart = True # If the directory was just created it needs coverart else: if video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) if not os.path.isfile(u"%s%s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'].lower(), ext)): directory_coverart = True # If the directory was just created it needs coverart elif video[u'item_icon']: ext = getExtention(video[u'item_icon']) if not os.path.isfile(u"%s%s - %s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'].lower(), video[u'title'].lower(), ext)): directory_coverart = True # If the directory was just created it needs coverart # Copy the Channel icon located in the posters/coverart directory if directory_coverart and video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) tmp_path = channels_to_copy[dir_key][:-1] foldername = tmp_path[tmp_path.rindex(u'/')+1:] dirpath = u"%s%s" % (channels_to_copy[dir_key], u'folder.jpg') dirpath2 = u"%s%s" % (channels_to_copy[dir_key], u'folder.png') if os.path.isfile(dirpath) or os.path.isfile(dirpath2): # See if a folder cover already exists pass else: if simulation: logger.info(u"Simulation: Copy a Channel Icon (%s) for directory (%s)." % (video[u'channel_icon'], dirpath)) else: try: # Miro Channel icon copy for the new subdirectory useImageMagick(u'convert "%s" "%s"' % (video[u'channel_icon'], dirpath)) except: logger.critical(u"Copy a Channel Icon (%s) for directory (%s) failed." % (video[u'channel_icon'], dirpath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) # Copy the Miro video file save_video_filename = video[u'videoFilename'] # This filename is needed later for deleting in Miro ext = getExtention(video[u'videoFilename']) if ext.lower() == u'm4v': ext = u'mpg' filepath = u"%s%s - %s.%s" % (channels_to_copy[dir_key], video[u'channelTitle'], video[u'title'], ext) if simulation: logger.info(u"Simulation: Copying the Miro video (%s) to the MythVideo directory (%s)." % (video[u'videoFilename'], filepath)) else: try: # Miro video copied into a MythVideo directory shutil.copy2(video[u'videoFilename'], filepath) statistics[u'Miros_MythVideos_copied']+=1 if u'mythvideo' in storagegroups.keys() and not local_only: video[u'videoFilename'] = filepath.replace(storagegroups[u'mythvideo'], u'') else: video[u'videoFilename'] = filepath except: logger.critical(u"Copying the Miro video (%s) to the MythVideo directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'videoFilename'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) # Copy the Channel or item's icon if video[u'channel_icon'] and not video[u'channelTitle'].lower() in channel_icon_override: pass else: if video[u'item_icon']: video[u'channel_icon'] = video[u'item_icon'] if video[u'channel_icon']: ext = getExtention(video[u'channel_icon']) if video[u'channelTitle'].lower() in channel_icon_override: filepath = u"%s%s - %s%s.%s" % (vid_graphics_dirs[u'posterdir'], video[u'channelTitle'], video[u'title'], graphic_suffix[u'posterdir'], ext) else: filepath = u"%s%s%s.%s" % (vid_graphics_dirs[u'posterdir'], video[u'channelTitle'], graphic_suffix[u'posterdir'], ext) # There may already be a Channel icon available or it is a symlink which needs to be replaced if not os.path.isfile(filepath) or os.path.islink(filepath): if simulation: logger.info(u"Simulation: Copying the Channel Icon (%s) to the poster directory (%s)." % (video[u'channel_icon'], filepath)) else: try: # Miro Channel icon copied into a MythVideo directory try: # Remove any old symlink file os.remove(filepath) except OSError: pass shutil.copy2(video[u'channel_icon'], filepath) if u'posterdir' in storagegroups.keys() and not local_only: video[u'channel_icon'] = filepath.replace(storagegroups[u'posterdir'], u'') else: video[u'channel_icon'] = filepath except: logger.critical(u"Copying the Channel Icon (%s) to the poster directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'channel_icon'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) else: if u'posterdir' in storagegroups.keys() and not local_only: video[u'channel_icon'] = filepath.replace(storagegroups[u'posterdir'], u'') else: video[u'channel_icon'] = filepath # There may already be a Screenshot available or it is a symlink which needs to be replaced if video[u'screenshot']: ext = getExtention(video[u'screenshot']) filepath = u"%s%s - %s%s.%s" % (vid_graphics_dirs[u'episodeimagedir'], video[u'channelTitle'], video[u'title'], graphic_suffix[u'episodeimagedir'], ext) else: filepath = u'' if not os.path.isfile(filepath) or os.path.islink(filepath): if video[u'screenshot']: if simulation: logger.info(u"Simulation: Copying the Screenshot (%s) to the Screenshot directory (%s)." % (video[u'screenshot'], filepath)) else: try: # Miro Channel icon copied into a MythVideo directory try: # Remove any old symlink file os.remove(filepath) except OSError: pass shutil.copy2(video[u'screenshot'], filepath) displayMessage(u"Copied Miro screenshot file (%s) to MythVideo (%s)" % (video[u'screenshot'], filepath)) if u'episodeimagedir' in storagegroups.keys() and not local_only: video[u'screenshot'] = filepath.replace(storagegroups[u'episodeimagedir'], u'') else: video[u'screenshot'] = filepath except: logger.critical(u"Copying the Screenshot (%s) to the Screenshot directory (%s).\n This maybe a permissions error (mirobridge.py does not have permission to write to the directory)." % (video[u'screenshot'], filepath)) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete sys.exit(False) elif video[u'screenshot']: if u'episodeimagedir' in storagegroups.keys() and not local_only: video[u'screenshot'] = filepath.replace(storagegroups[u'episodeimagedir'], u'') else: video[u'screenshot'] = filepath video[u'copied'] = True # Mark this video item as being copied # Completely remove the video and item information from Miro app.cli_interpreter.do_mythtv_item_remove(save_video_filename) # Gracefully close the Miro database and shutdown the Miro Front and Back ends app.controller.shutdown() time.sleep(5) # Let the shutdown processing complete # # Add and delete MythTV (Watch Recordings) Miro recorded records # Add and remove symlinks for Miro video files # # Check if the user does not want any channels Added to the "Watch Recordings" screen if channel_mythvideo_only.has_key(u'all'): for video in unwatched: watched.append(video) unwatched = [] else: if len(channel_mythvideo_only): unwatched_copy = [] for video in unwatched: if not filter(is_not_punct_char, video[u'channelTitle'].lower()) in channel_mythvideo_only.keys(): unwatched_copy.append(video) else: watched.append(video) unwatched = unwatched_copy statistics[u'Total_unwatched'] = len(unwatched) if not len(unwatched): displayMessage(u"There are no Miro unwatched video items to add as MythTV Recorded videos.") if not updateMythRecorded(unwatched): logger.critical(u"Updating MythTV Recording with Miro video files failed." % str(base_video_dir)) sys.exit(False) # # Add and delete MythVideo records for played Miro Videos # Add and delete symbolic links to Miro Videos and subdirectories # Add and delete symbolic links to coverart/Miro icons and Miro screenshots/fanart # if len(channel_watch_only): # If the user does not want any channels moved to MythVideo exit if channel_watch_only[0].lower() == u'all': printStatistics() return True if not len(watched): displayMessage(u"There are no Miro watched items to add to MythVideo") if not updateMythVideo(watched): logger.critical(u"Updating MythVideo with Miro video files failed.") sys.exit(False) printStatistics() return True
0f178cb606ce1cfb96840e30bd489d420b041e6d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/0f178cb606ce1cfb96840e30bd489d420b041e6d/mirobridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6289, 312, 11373, 18337, 628, 326, 1296, 980, 1135, 1053, 3536, 2552, 1191, 10358, 16, 14754, 16, 3988, 16, 2502, 4650, 16, 6875, 19951, 16, 1904, 67, 350, 16, 1904, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6289, 312, 11373, 18337, 628, 326, 1296, 980, 1135, 1053, 3536, 2552, 1191, 10358, 16, 14754, 16, 3988, 16, 2502, 4650, 16, 6875, 19951, 16, 1904, 67, 350, 16, 1904, 6...
try: return (open(filepath).read(), filepath) except IOError:
try: return (open(filepath).read(), filepath) except IOError: try: t = Template.objects.get(name__exact=template_name, sites__pk=site.id) try: f = open(filepath, 'w') f.write(t.content) f.close() except IOError: pass return (t.content, 'db:%s:%s' % (settings.DATABASE_ENGINE, template_name)) except: pass else:
def load_template_source(template_name, template_dirs=None): """ Loads templates from the database by querying the database field ``name`` with a template path and ``sites`` with the current site. """ if site is not None: if cache_dir is not None: filepath = os.path.join(cache_dir, template_name) try: return (open(filepath).read(), filepath) except IOError: try: t = Template.objects.get(name__exact=template_name, sites__pk=site.id) try: f = open(filepath, 'w') f.write(t.content) f.close() except IOError: pass return (t.content, 'db:%s:%s' % (settings.DATABASE_ENGINE, template_name)) except: pass raise TemplateDoesNotExist, template_name
06dfbb440208ad796518bb3b0a72533d194617b1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1201/06dfbb440208ad796518bb3b0a72533d194617b1/loader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 3202, 67, 3168, 12, 3202, 67, 529, 16, 1542, 67, 8291, 33, 7036, 4672, 3536, 4444, 87, 5539, 628, 326, 2063, 635, 23936, 326, 2063, 652, 12176, 529, 10335, 598, 279, 1542, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 3202, 67, 3168, 12, 3202, 67, 529, 16, 1542, 67, 8291, 33, 7036, 4672, 3536, 4444, 87, 5539, 628, 326, 2063, 635, 23936, 326, 2063, 652, 12176, 529, 10335, 598, 279, 1542, 58...
''' % (grid_par['nz']/2,grid_par['nz']/2), stdout=0 )
''' % (grid_par['nz']/2,grid_par['nz']/2), stdout=0 )
def rfield (real_par,grid_par,covar_par):
79742fe120e5b66d8c972da746344f265417c962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3143/79742fe120e5b66d8c972da746344f265417c962/rfield.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 436, 1518, 261, 7688, 67, 1065, 16, 5222, 67, 1065, 16, 2894, 1401, 67, 1065, 4672, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 436, 1518, 261, 7688, 67, 1065, 16, 5222, 67, 1065, 16, 2894, 1401, 67, 1065, 4672, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def __init__(self, generator, sort=False, create=False, editSummary='', dry=False):
def __init__(self, generator, sort_by_last_name=False, create=False, editSummary='', dry=False):
def __init__(self, generator, sort=False, create=False, editSummary='', dry=False): self.generator = generator self.sort = sort # sort by last name self.create = create self.site = pywikibot.getSite() self.always = False self.dry = dry self.newcatTitle = None self.editSummary = editSummary
07172eeccd9ae15dc7f41867a9b91428b7226440 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/07172eeccd9ae15dc7f41867a9b91428b7226440/category.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4456, 16, 1524, 67, 1637, 67, 2722, 67, 529, 33, 8381, 16, 752, 33, 8381, 16, 3874, 4733, 2218, 2187, 10299, 33, 8381, 4672, 365, 18, 8812, 273, 4456, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4456, 16, 1524, 67, 1637, 67, 2722, 67, 529, 33, 8381, 16, 752, 33, 8381, 16, 3874, 4733, 2218, 2187, 10299, 33, 8381, 4672, 365, 18, 8812, 273, 4456, ...
_logger.debug(('eraseDataset',dispatchDBlock))
_logger.debug((self.timestamp,'eraseDataset',dispatchDBlock))
def _setupSource(self): fileList = {} prodList = [] prodError = {} dispSiteMap = {} dispError = {} # extract prodDBlock for job in self.jobs: # ignore failed jobs if job.jobStatus == 'failed': continue # production datablock if job.prodDBlock != 'NULL' and (not self.pandaDDM): # get VUID and record prodDBlock into DB if not prodError.has_key(job.prodDBlock): time.sleep(1) _logger.debug(('queryDatasetByName',job.prodDBlock)) prodError[job.prodDBlock] = '' for iDDMTry in range(3): status,out = ddm.repositoryClient.main('queryDatasetByName',job.prodDBlock) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) if status != 0 or out.find('Error') != -1: prodError[job.prodDBlock] = "Setupper._setupSource() could not get VUID of prodDBlock" _logger.error(out) else: try: exec "vuids = %s['%s']['vuids']" % (out.split('\n')[0],job.prodDBlock) nfiles = 0 # dataset spec ds = DatasetSpec() ds.vuid = vuids[0] ds.name = job.prodDBlock ds.type = 'input' ds.status = 'completed' ds.numberfiles = nfiles ds.currentfiles = nfiles prodList.append(ds) except: type, value, traceBack = sys.exc_info() _logger.error("_setupSource() : %s %s" % (type,value)) prodError[job.prodDBlock] = "Setupper._setupSource() could not decode VUID of prodDBlock" # error if prodError[job.prodDBlock] != '': job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_Setupper job.ddmErrorDiag = prodError[job.prodDBlock] continue # dispatch datablock if job.dispatchDBlock != 'NULL': # src/dst sites tmpSrcID = 'BNL_ATLAS_1' if self.siteMapper.checkCloud(job.cloud): # use cloud's source tmpSrcID = self.siteMapper.getCloud(job.cloud)['source'] srcDQ2ID = self.siteMapper.getSite(tmpSrcID).ddm # use srcDQ2ID as dstDQ2ID when dst SE is same as src SE srcSEs = brokerage.broker_util.getSEfromSched(self.siteMapper.getSite(tmpSrcID).se) dstSEs = brokerage.broker_util.getSEfromSched(self.siteMapper.getSite(job.computingSite).se) if srcSEs == dstSEs: dstDQ2ID = srcDQ2ID else: dstDQ2ID = self.siteMapper.getSite(job.computingSite).ddm dispSiteMap[job.dispatchDBlock] = {'src':srcDQ2ID,'dst':dstDQ2ID,'site':job.computingSite} # filelist if not fileList.has_key(job.dispatchDBlock): fileList[job.dispatchDBlock] = {'lfns':[],'guids':[],'fsizes':[],'md5sums':[],'chksums':[]} # collect LFN and GUID for file in job.Files: if file.type == 'input' and file.status == 'pending': if not file.lfn in fileList[job.dispatchDBlock]['lfns']: fileList[job.dispatchDBlock]['lfns'].append(file.lfn) fileList[job.dispatchDBlock]['guids'].append(file.GUID) if file.fsize in ['NULL',0]: fileList[job.dispatchDBlock]['fsizes'].append(None) else: fileList[job.dispatchDBlock]['fsizes'].append(long(file.fsize)) if file.md5sum in ['NULL','']: fileList[job.dispatchDBlock]['md5sums'].append(None) elif file.md5sum.startswith("md5:"): fileList[job.dispatchDBlock]['md5sums'].append(file.md5sum) else: fileList[job.dispatchDBlock]['md5sums'].append("md5:%s" % file.md5sum) if file.checksum in ['NULL','']: fileList[job.dispatchDBlock]['chksums'].append(None) else: fileList[job.dispatchDBlock]['chksums'].append(file.checksum) # get replica locations if not self.replicaMap.has_key(job.dispatchDBlock): self.replicaMap[job.dispatchDBlock] = {} if not self.allReplicaMap.has_key(file.dataset): for iDDMTry in range(3): _logger.debug(('listDatasetReplicas',file.dataset)) status,out = ddm.DQ2.main('listDatasetReplicas',file.dataset,0,None,False) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1 \ or out == '()': time.sleep(60) else: break _logger.debug(out) if status != 0 or out.startswith('Error'): dispError[job.dispatchDBlock] = 'could not get locations for %s' % file.dataset _logger.error(dispError[job.dispatchDBlock]) else: tmpRepSites = {} try: # convert res to map exec "tmpRepSites = %s" % out self.allReplicaMap[file.dataset] = tmpRepSites except: dispError[job.dispatchDBlock] = 'could not convert HTTP-res to replica map for %s' % file.dataset _logger.error(dispError[job.dispatchDBlock]) _logger.error(out) if self.allReplicaMap.has_key(file.dataset): self.replicaMap[job.dispatchDBlock][file.dataset] = self.allReplicaMap[file.dataset] # register dispatch dataset _logger.debug('%s 5' % self.timestamp) dispList = [] for dispatchDBlock in fileList.keys(): # ignore empty dataset if len(fileList[dispatchDBlock]['lfns']) == 0: continue _logger.debug('%s 6' % self.timestamp) # use DQ2 if (not self.pandaDDM) and (not dispSiteMap[dispatchDBlock]['src'] in PandaDDMSource) \ and (job.prodSourceLabel != 'ddm') and (not dispSiteMap[dispatchDBlock]['site'].endswith("_REPRO")): # delete dataset from DB and DDM just in case if self.resubmit: # make sure if it is dis datasets if re.search('_dis\d+$',dispatchDBlock) != None: time.sleep(1) _logger.debug(('eraseDataset',dispatchDBlock)) for iDDMTry in range(3): status,out = ddm.DQ2.main('eraseDataset',dispatchDBlock) if status != 0 and out.find('DQUnknownDatasetException') != -1: break elif status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) ret = self.taskBuffer.deleteDatasets([dispatchDBlock]) _logger.debug(ret) # register dispatch dataset time.sleep(1) disFiles = fileList[dispatchDBlock] _logger.debug(('registerNewDataset',dispatchDBlock,disFiles['lfns'],disFiles['guids'], disFiles['fsizes'],disFiles['chksums'])) for iDDMTry in range(3): status,out = ddm.DQ2.main('registerNewDataset',dispatchDBlock,disFiles['lfns'],disFiles['guids'], disFiles['fsizes'],disFiles['chksums']) if status != 0 and out.find('DQDatasetExistsException') != -1: break elif status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: _logger.debug("sleep %s for %s" % (iDDMTry,dispatchDBlock)) _logger.debug(status) _logger.debug(out) _logger.debug("-------------") time.sleep(60) else: break _logger.debug(out) if status != 0 or out.find('Error') != -1: _logger.error(out) dispError[dispatchDBlock] = "Setupper._setupSource() could not register dispatchDBlock" continue vuidStr = out # freezeDataset dispatch dataset time.sleep(1) _logger.debug(('freezeDataset',dispatchDBlock)) for iDDMTry in range(3): status,out = ddm.DQ2.main('freezeDataset',dispatchDBlock) if status != 0 or out.find("DQ2 internal server exception") != -1 \ or out.find("An error occurred on the central catalogs") != -1 \ or out.find("MySQL server has gone away") != -1: time.sleep(60) else: break _logger.debug(out) if status != 0 or (out.find('Error') != -1 and out.find("is frozen") == -1): _logger.error(out) dispError[dispatchDBlock] = "Setupper._setupSource() could not freeze dispatchDBlock" continue else: # use PandaDDM self.dispFileList[dispatchDBlock] = fileList[dispatchDBlock] # create a fake vuidStr for PandaDDM tmpMap = {'vuid':commands.getoutput('uuidgen')} vuidStr = "%s" % tmpMap # get VUID try: exec "vuid = %s['vuid']" % vuidStr # dataset spec ds = DatasetSpec() ds.vuid = vuid ds.name = dispatchDBlock ds.type = 'dispatch' ds.status = 'defined' ds.numberfiles = len(fileList[dispatchDBlock])/2 ds.currentfiles = len(fileList[dispatchDBlock])/2 dispList.append(ds) self.vuidMap[ds.name] = ds.vuid except: type, value, traceBack = sys.exc_info() _logger.error("_setupSource() : %s %s" % (type,value)) dispError[dispatchDBlock] = "Setupper._setupSource() could not decode VUID dispatchDBlock" # insert datasets to DB _logger.debug('%s 7' % self.timestamp) self.taskBuffer.insertDatasets(prodList+dispList) # job status for job in self.jobs: if dispError.has_key(job.dispatchDBlock) and dispError[job.dispatchDBlock] != '': job.jobStatus = 'failed' job.ddmErrorCode = ErrorCode.EC_Setupper job.ddmErrorDiag = dispError[job.dispatchDBlock] # delete explicitly some huge variables del fileList del prodList del prodError del dispSiteMap _logger.debug('%s 8' % self.timestamp)
4e25ff459b78e50b61ea2614281204d0c39c6fc9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/4e25ff459b78e50b61ea2614281204d0c39c6fc9/Setupper.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8401, 1830, 12, 2890, 4672, 18645, 565, 273, 2618, 10791, 682, 565, 273, 5378, 10791, 668, 282, 273, 2618, 16232, 4956, 863, 273, 2618, 16232, 668, 282, 273, 2618, 468, 2608, 10791, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8401, 1830, 12, 2890, 4672, 18645, 565, 273, 2618, 10791, 682, 565, 273, 5378, 10791, 668, 282, 273, 2618, 16232, 4956, 863, 273, 2618, 16232, 668, 282, 273, 2618, 468, 2608, 10791, ...
nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
nodelist = [] nodelist.extend(flatten_nodes(self.nodes)) return tuple(nodelist)
def getChildNodes(self): nodes = [] nodes.extend(flatten_nodes(self.nodes)) return tuple(nodes)
7dce7618a9a2ec21fadacd49967dbf4d460b4941 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/7dce7618a9a2ec21fadacd49967dbf4d460b4941/ast.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23895, 12, 2890, 4672, 2199, 273, 5378, 2199, 18, 14313, 12, 16940, 67, 4690, 12, 2890, 18, 4690, 3719, 327, 3193, 12, 4690, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...