rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
if l[:2] == '
if l[:2] == '
def make(filename, outfile): ID = 1 STR = 2 # Compute .mo name from .po name and arguments if filename.endswith('.po'): infile = filename else: infile = filename + '.po' if outfile is None: outfile = os.path.splitext(infile)[0] + '.mo' try: lines = open(infile).readlines() except IOError, msg: print >> sys.stderr, msg sys.exit(1) section = None fuzzy = 0 # Parse the catalog lno = 0 for l in lines: lno += 1 # If we get a comment line after a msgstr, this is a new entry if l[0] == '#' and section == STR: add(msgid, msgstr, fuzzy) section = None fuzzy = 0 # Record a fuzzy mark if l[:2] == '#,' and l.find('fuzzy'): fuzzy = 1 # Skip comments if l[0] == '#': continue # Now we are in a msgid section, output previous section if l.startswith('msgid'): if section == STR: add(msgid, msgstr, fuzzy) section = ID l = l[5:] msgid = msgstr = '' # Now we are in a msgstr section elif l.startswith('msgstr'): section = STR l = l[6:] # Skip empty lines l = l.strip() if not l: continue # XXX: Does this always follow Python escape semantics? l = eval(l) if section == ID: msgid += l elif section == STR: msgstr += l else: print >> sys.stderr, 'Syntax error on %s:%d' % (infile, lno), \ 'before:' print >> sys.stderr, l sys.exit(1) # Add last entry if section == STR: add(msgid, msgstr, fuzzy) # Compute output output = generate() try: open(outfile,"wb").write(output) except IOError,msg: print >> sys.stderr, msg
1a9361d35b254ddd45f73cb878ab79462011daf2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/1a9361d35b254ddd45f73cb878ab79462011daf2/msgfmt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12, 3459, 16, 8756, 4672, 1599, 273, 404, 7128, 273, 576, 225, 468, 8155, 263, 8683, 508, 628, 263, 1631, 508, 471, 1775, 309, 1544, 18, 5839, 1918, 2668, 18, 1631, 11, 4672, 145...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12, 3459, 16, 8756, 4672, 1599, 273, 404, 7128, 273, 576, 225, 468, 8155, 263, 8683, 508, 628, 263, 1631, 508, 471, 1775, 309, 1544, 18, 5839, 1918, 2668, 18, 1631, 11, 4672, 145...
defaultHeaders = {}
defaultHeaders = { 'User-Agent': "qps.qMail/%s" % qps.__version__ }
def send(self, message): logger.info('Sending mail to %s', message['to'])
3857d11d8b4d17b3b11f942449d06b9705b5f156 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1871/3857d11d8b4d17b3b11f942449d06b9705b5f156/qMail.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 883, 4672, 1194, 18, 1376, 2668, 16322, 4791, 358, 738, 87, 2187, 883, 3292, 869, 19486, 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, 1366, 12, 2890, 16, 883, 4672, 1194, 18, 1376, 2668, 16322, 4791, 358, 738, 87, 2187, 883, 3292, 869, 19486, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 501) else quickfix.StringField.__init__(self, 501, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1611, 13, 469, 30, 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, 1, 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, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 1381, 1611, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738...
self.agregerSession(self.racine)
self.agregerSession(racine)
def agregation(self): """ fait l'agregation de fichiersXML, noeudsXML, resultatsSQL et session dans un seul document DOM. Ne devrait pas etre surchargee. """ domDocument = libxml2.newDoc("1.0") racine = domDocument.newChild(None, self.racineXML, None); if len(self.session) > 0: self.agregerSession(self.racine) if len(self.fichiersXML) > 0: self.agregerFichiersXML(racine) if len(self.resultatsSQL) > 0: self.agregerResultatsSQL(racine) if len(self.noeudsXML) > 0: # [TODO] pass # Decommenter cette ligne pour activer le mode debug # [TODO] gerer ce mode debug avec un flag dans la conf #~ res = domDocument.saveFile("/tmp/flstXML.xml") return domDocument
752a2eacafad96d04cf1a87de45217f10fbc04b0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2604/752a2eacafad96d04cf1a87de45217f10fbc04b0/transformation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1574, 367, 12, 2890, 4672, 3536, 284, 1540, 328, 11, 346, 1574, 367, 443, 284, 1354, 20778, 4201, 16, 1158, 73, 1100, 87, 4201, 16, 563, 2323, 3997, 3393, 1339, 26224, 640, 695, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1574, 367, 12, 2890, 4672, 3536, 284, 1540, 328, 11, 346, 1574, 367, 443, 284, 1354, 20778, 4201, 16, 1158, 73, 1100, 87, 4201, 16, 563, 2323, 3997, 3393, 1339, 26224, 640, 695, ...
self.indicies = [(0, len(self.gears_w[x].wrappeditems)) for x in range(0, self.num_gears)]
self.indicies = [(0, space.int_w(space.len(w_gear))) for w_gear in self.gears_w]
def __init__(self, space, args_w, repeat_w): self.space = space self.gears_w = [x for x in args_w] * repeat_w.intval self.num_gears = len(self.gears_w) # initialization of indicies to loop over self.indicies = [(0, len(self.gears_w[x].wrappeditems)) for x in range(0, self.num_gears)] self.cont = True
ee84408ae739ca9adec3035b71795179bcfc9e7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/ee84408ae739ca9adec3035b71795179bcfc9e7c/interp_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3476, 16, 833, 67, 91, 16, 7666, 67, 91, 4672, 365, 18, 2981, 273, 3476, 365, 18, 908, 5913, 67, 91, 273, 306, 92, 364, 619, 316, 833, 67, 91, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3476, 16, 833, 67, 91, 16, 7666, 67, 91, 4672, 365, 18, 2981, 273, 3476, 365, 18, 908, 5913, 67, 91, 273, 306, 92, 364, 619, 316, 833, 67, 91, 65, ...
"""Class wrapper for BIO_s_fp. This class is intended to interface Python and OpenSSL functions that expect BIO *. If you wish to manipulate files in Python, use Python's file object."""
"""Class wrapper for BIO_s_fp. This class is intended to interface Python and OpenSSL functions that expect BIO *. If you wish to manipulate files in Python, use Python's file object."""
def read_all(self): try: return m2.bio_read(self.bio, m2.bio_ctrl_pending(self.bio)) except: return ''
52768953b32ebd1acf4ab8995564ff0e0957a506 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10522/52768953b32ebd1acf4ab8995564ff0e0957a506/BIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 454, 12, 2890, 4672, 775, 30, 327, 312, 22, 18, 21010, 67, 896, 12, 2890, 18, 21010, 16, 312, 22, 18, 21010, 67, 16277, 67, 9561, 12, 2890, 18, 21010, 3719, 1335, 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, 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, 855, 67, 454, 12, 2890, 4672, 775, 30, 327, 312, 22, 18, 21010, 67, 896, 12, 2890, 18, 21010, 16, 312, 22, 18, 21010, 67, 16277, 67, 9561, 12, 2890, 18, 21010, 3719, 1335, 30, 327, ...
if type(signature) == AEDescType:
if isinstance(signature, AEDescType):
def __init__(self, signature=None, start=0, timeout=0): """Create a communication channel with a particular application.
f9b95d4dda8ced9e1179ff54757ff27bb6abd6f3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/f9b95d4dda8ced9e1179ff54757ff27bb6abd6f3/aetools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3372, 33, 7036, 16, 787, 33, 20, 16, 2021, 33, 20, 4672, 3536, 1684, 279, 18279, 1904, 598, 279, 6826, 2521, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3372, 33, 7036, 16, 787, 33, 20, 16, 2021, 33, 20, 4672, 3536, 1684, 279, 18279, 1904, 598, 279, 6826, 2521, 18, 2, -100, -100, -100, -100, -100, -100, ...
self.splitter.SplitHorizontally(self.treeCtrl, self.detail, 200)
self.editTab= wxRepositoryViewerEdit(self.notebook, -1) self.notebook.AddPage(self.viewTab, "View", select=1) self.notebook.AddPage(self.editTab, "Edit") notebookContainer = wxBoxSizer(wxVERTICAL) notebookContainer.Add(wxNotebookSizer(self.notebook), 1, wxEXPAND, 0) self.notebookPanel.SetAutoLayout(1) self.notebookPanel.SetSizer(notebookContainer) notebookContainer.Fit(self.notebookPanel) notebookContainer.SetSizeHints(self.notebookPanel) viewContainer = wxBoxSizer(wxVERTICAL) viewContainer.Add(self.detail, -1, wxEXPAND) self.viewTab.SetAutoLayout(1) self.viewTab.SetSizer(viewContainer) self.splitter.SplitHorizontally(self.treeCtrl, self.notebookPanel, 200)
def OnInit(self): """ Initializes the repository viewer, setting up the layout and populating the tree ctrl. """ # @@@ sizer layout should be handled in xrc, but xrc # does not yet support wxTreeListCtrl
86c5b86176d7fa090fa4e11b866395109276fdd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/86c5b86176d7fa090fa4e11b866395109276fdd7/RepositoryViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 3536, 10188, 3128, 326, 3352, 14157, 16, 3637, 731, 326, 3511, 471, 3650, 1776, 326, 2151, 6414, 18, 3536, 468, 22175, 36, 272, 1824, 3511, 1410, 506, 7681, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 2570, 12, 2890, 4672, 3536, 10188, 3128, 326, 3352, 14157, 16, 3637, 731, 326, 3511, 471, 3650, 1776, 326, 2151, 6414, 18, 3536, 468, 22175, 36, 272, 1824, 3511, 1410, 506, 7681, 3...
for x, y in [(0, 1), (1, 0), (2, 1), (1, 2), (0, 0), (2, 0), (2, 2), (0, 2)]:
for x, y in ((0, 1), (1, 0), (2, 1), (1, 2), (0, 0), (2, 0), (2, 2), (0, 2)):
def __init__(self, name, parent):
863caaba1295d6ae6d8b2ebbd6522a15badd83d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5768/863caaba1295d6ae6d8b2ebbd6522a15badd83d0/TargetFrame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 508, 16, 982, 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...
[ 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, 2738, 972, 12, 2890, 16, 508, 16, 982, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.total_duration += c.get_duration()
c.got_duration = False
def add(self, sound_file): output_filename = self.window.prefs.generate_filename(sound_file) path = urlparse.urlparse(output_filename) [2] path = unquote_filename(path) exists = True try: gnomevfs.get_file_info(gnomevfs.URI((output_filename))) except gnomevfs.NotFoundError: exists = False except gnomevfs.InvalidURIError: log("Invalid URI: '%s'" % output_filename) return if exists: if self.overwrite_action != None: result = self.overwrite_action else: dialog = self.window.existsdialog
a41e757a9e615ab7e5e7abbfd7863edced34e942 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/a41e757a9e615ab7e5e7abbfd7863edced34e942/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 14190, 67, 768, 4672, 225, 876, 67, 3459, 273, 365, 18, 5668, 18, 1484, 2556, 18, 7163, 67, 3459, 12, 29671, 67, 768, 13, 589, 273, 15185, 18, 718, 2670, 12, 2844,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 2890, 16, 14190, 67, 768, 4672, 225, 876, 67, 3459, 273, 365, 18, 5668, 18, 1484, 2556, 18, 7163, 67, 3459, 12, 29671, 67, 768, 13, 589, 273, 15185, 18, 718, 2670, 12, 2844,...
template_args = { 'findingaid' : fa, 'series' : series,
template_args = { 'ead' : fa, 'series' : series,
def full_fa(request, id, mode, preview=False): """View the full contents of a single finding aid as PDF or plain html. :param id: eadid for the document to be displayed :param mode: one of 'html' or 'pdf' - note that the html mode is not publicly linked anywhere, and is intended mostly for development and testing of the PDF display :param preview: boolean indicating preview mode, defaults to False """ fa = get_findingaid(id, preview=preview) series = _subseries_links(fa.dsc, url_ids=[fa.eadid], url_callback=_series_anchor) template = 'findingaids/full.html' template_args = { 'findingaid' : fa, 'series' : series, 'mode' : mode, 'preview': preview, 'request' : request} if mode == 'html': return render_to_response(template, template_args) elif mode == 'pdf': return render_to_pdf(template, template_args, filename='%s.pdf' % fa.eadid.value)
b5bb8883d2051f804fac9903079f6f404a1b6f11 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10178/b5bb8883d2051f804fac9903079f6f404a1b6f11/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 507, 12, 2293, 16, 612, 16, 1965, 16, 10143, 33, 8381, 4672, 3536, 1767, 326, 1983, 2939, 434, 279, 2202, 13727, 20702, 487, 12667, 578, 7351, 1729, 18, 225, 294, 891, 612, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1983, 67, 507, 12, 2293, 16, 612, 16, 1965, 16, 10143, 33, 8381, 4672, 3536, 1767, 326, 1983, 2939, 434, 279, 2202, 13727, 20702, 487, 12667, 578, 7351, 1729, 18, 225, 294, 891, 612, 3...
percent = (margin - indent) / style['width'] cssdict['margin-left'] = "%d%%" % (percent * 100)
try: percent = (margin - indent) / style['width'] cssdict['margin-left'] = "%d%%" % (percent * 100) except ZeroDivisionError: pass
def force_int(raw): return int(re.search(r'([0-9+-]+)', raw).group(1))
8bf7a5a42d8a49e8838526ed2acc8371f4392639 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/8bf7a5a42d8a49e8838526ed2acc8371f4392639/flatcss.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 474, 12, 1899, 4672, 327, 509, 12, 266, 18, 3072, 12, 86, 11, 3816, 20, 17, 29, 18549, 7941, 2187, 1831, 2934, 1655, 12, 21, 3719, 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, 2944, 67, 474, 12, 1899, 4672, 327, 509, 12, 266, 18, 3072, 12, 86, 11, 3816, 20, 17, 29, 18549, 7941, 2187, 1831, 2934, 1655, 12, 21, 3719, 2, -100, -100, -100, -100, -100, -100, -1...
if fname not in pdfmetrics.standardFonts: fname = self.canvas._fontname
def setFont(self, node): from reportlab.pdfbase import pdfmetrics fname = node.get('name') #TODO : other fonts should be supported if fname not in pdfmetrics.standardFonts: fname = self.canvas._fontname return self.canvas.setFont(fname, utils.unit_get(node.get('size')))
dc7ec86c28ef2259486a9efe7a8751c5ffe35904 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/dc7ec86c28ef2259486a9efe7a8751c5ffe35904/trml2pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20454, 12, 2890, 16, 756, 4672, 628, 2605, 7411, 18, 7699, 1969, 1930, 8169, 9597, 5299, 273, 756, 18, 588, 2668, 529, 6134, 468, 6241, 294, 1308, 16450, 1410, 506, 3260, 2463, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20454, 12, 2890, 16, 756, 4672, 628, 2605, 7411, 18, 7699, 1969, 1930, 8169, 9597, 5299, 273, 756, 18, 588, 2668, 529, 6134, 468, 6241, 294, 1308, 16450, 1410, 506, 3260, 2463, 365, 18, ...
self.Store(arg, self.loc(arg), self.stack_bindings[arg])
self.Store(arg, self.loc(arg), loop.arglocs[i])
def consider_jump(self, op, ignored): later_loads = [] reloaded = [] middle_busy_regs = [] for i in range(len(op.args)): arg = op.args[i] loop = op.jump_target res = loop.arglocs[i] if not (isinstance(arg, Const) or (arg in self.loop_consts and self.loop_consts[arg] == i)): if arg in self.reg_bindings: if not isinstance(res, REG): self.Store(arg, self.loc(arg), self.stack_bindings[arg]) elif res is self.reg_bindings[arg]: middle_busy_regs.append(res) else: # register, but wrong # we're going to need it (otherwise it'll be dead), so # we spill it and reload # if our register is free, easy for v, reg in self.reg_bindings.items(): if reg is res: self.Store(arg, self.loc(arg), self.stack_loc(arg)) later_loads.append((arg, self.stack_loc(arg), res)) break else: self.Load(arg, self.loc(arg), res) else: if arg not in self.stack_bindings: # we can load it correctly, because we don't care # any more about the previous var staying there assert not isinstance(res, REG) self.Store(arg, self.loc(arg), res) else: assert arg not in self.dirty_stack if isinstance(res, REG): later_loads.append((arg, self.loc(arg), res)) else: arg0 = self.loc(arg) assert isinstance(arg0, MODRM) assert isinstance(res, MODRM) if arg0.position != res.position: reloaded.append((arg, self.loc(arg), res)) elif isinstance(arg, Const): later_loads.append((arg, self.loc(arg), res)) self.eventually_free_vars(op.args) if reloaded: # XXX performance free_reg = None for reg in REGS: if reg not in middle_busy_regs: free_reg = reg break if free_reg is None: # a very rare case v = self.reg_bindings.keys()[0] free_reg = self.reg_bindings[v] self.Store(v, self.loc(v), self.stack_loc(v)) later_loads.insert(0, (v, self.stack_loc(v), self.loc(v))) for v, from_l, to_l in reloaded: self.Load(v, from_l, free_reg) self.Store(v, free_reg, to_l) for v, from_l, to_l in later_loads: self.Load(v, from_l, to_l) self.PerformDiscard(op, [])
43943e378edbb2d7cacbcf34108f55157bd1a928 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/43943e378edbb2d7cacbcf34108f55157bd1a928/regalloc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5260, 67, 24574, 12, 2890, 16, 1061, 16, 5455, 4672, 5137, 67, 17135, 273, 5378, 283, 4230, 273, 5378, 7689, 67, 9274, 93, 67, 266, 564, 273, 5378, 364, 277, 316, 1048, 12, 1897, 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, 5260, 67, 24574, 12, 2890, 16, 1061, 16, 5455, 4672, 5137, 67, 17135, 273, 5378, 283, 4230, 273, 5378, 7689, 67, 9274, 93, 67, 266, 564, 273, 5378, 364, 277, 316, 1048, 12, 1897, 12, ...
// Destructured left side of for in comprehension tails.
def comprehensionTail(tokenizer, compilerContext) { var body, node var builder = compilerContext.builder // tokenizer.token.type must be FOR body = builder.COMP_TAIL$build(tokenizer)
58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1161, 266, 76, 1451, 12363, 12, 2316, 1824, 16, 5274, 1042, 13, 288, 569, 1417, 16, 756, 569, 2089, 273, 5274, 1042, 18, 9574, 368, 10123, 18, 2316, 18, 723, 1297, 506, 12108, 1417, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1161, 266, 76, 1451, 12363, 12, 2316, 1824, 16, 5274, 1042, 13, 288, 569, 1417, 16, 756, 569, 2089, 273, 5274, 1042, 18, 9574, 368, 10123, 18, 2316, 18, 723, 1297, 506, 12108, 1417, 27...
"""Only used to detect the end of a freehand selection curve.
"""
def mouseReleaseEvent(self, event): """Only used to detect the end of a freehand selection curve. """ self.debug_event(event, 'mouseReleaseEvent') ## but = event.state() but = self.fix_event(event, 'release', self.mode) #print "Button released: ", but try: if but & leftButton: if but & shiftButton: self.mode.leftShiftUp(event) elif but & cntlButton: self.mode.leftCntlUp(event) else: self.mode.leftUp(event)
f7f63a419b39b9f414213170265e24e466db7c7d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/f7f63a419b39b9f414213170265e24e466db7c7d/GLPane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7391, 1133, 12, 2890, 16, 871, 4672, 3536, 3536, 365, 18, 4148, 67, 2575, 12, 2575, 16, 296, 11697, 7391, 1133, 6134, 7541, 1496, 273, 871, 18, 2019, 1435, 1496, 273, 365, 18, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7644, 7391, 1133, 12, 2890, 16, 871, 4672, 3536, 3536, 365, 18, 4148, 67, 2575, 12, 2575, 16, 296, 11697, 7391, 1133, 6134, 7541, 1496, 273, 871, 18, 2019, 1435, 1496, 273, 365, 18, 90...
mod.dir = libpath mod.mod_dir = mod.mod_path
mod.dir = relname mod.mod_dir = relpath
def parse_module(name, ast=None, parent=None, node=None): # --- valid name? for c in name: if not c in string.letters+string.digits+'_.': print ("*ERROR*:%s.py: module names should consist of letters, digits and underscores" % name) sys.exit() # --- parse ident = name.split('.')[-1] mod = module(ident, node) mod.builtin = False if ast: # XXX mod.ast = ast mod.filename = name+'.py' mod.dir = '' mod.mod_path = [name] mod.mod_dir = [] else: # --- locate module relname = name.replace('.', '/') relpath = name.split('.') if parent: path = connect_paths(parent.dir, relname) else: path = name libpath = connect_paths(getgx().libdir, relname) rootpath = connect_paths(os.getcwd(), relname) if os.path.isfile(path+'.py'): # local module mod.filename = path+'.py' if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath split = path.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = not parent or parent.builtin elif os.path.isfile(connect_paths(path, '__init__.py')): mod.filename = connect_paths(path, '__init__.py') if parent: mod.mod_path = parent.mod_dir + relpath else: mod.mod_path = relpath mod.dir = path mod.mod_dir = mod.mod_path mod.builtin = not parent or parent.builtin elif os.path.isfile(rootpath+'.py'): # root module mod.filename = rootpath+'.py' mod.mod_path = relpath split = rootpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] elif os.path.isfile(connect_paths(rootpath, '__init__.py')): mod.filename = connect_paths(rootpath, '__init__.py') mod.mod_path = relpath mod.dir = rootpath mod.mod_dir = mod.mod_path elif os.path.isfile(libpath+'.py'): # library module mod.filename = libpath+'.py' mod.mod_path = relpath split = libpath.split('/') mod.dir = '/'.join(split[:-1]) mod.mod_dir = mod.mod_path[:-1] mod.builtin = True elif os.path.isfile(connect_paths(libpath, '__init__.py')): mod.filename = connect_paths(libpath, '__init__.py') mod.mod_path = relpath mod.dir = libpath mod.mod_dir = mod.mod_path mod.builtin = True else: error('cannot locate module: '+name, node) modpath = '.'.join(mod.mod_path) if modpath in getgx().modules: # cached? return getgx().modules[modpath] #print 'not cached', modpath getgx().modules[modpath] = mod mod.ast = parsefile(mod.filename) old_mv = getmv() mod.mv = mv = moduleVisitor(mod) setmv(mv) mv.visit = mv.dispatch mv.visitor = mv mv.dispatch(mod.ast) mv = old_mv setmv(mv) mod.funcs = mod.mv.funcs mod.classes = mod.mv.classes return mod
d7ff07b382c793e4aea86abd70975b573665754e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4470/d7ff07b382c793e4aea86abd70975b573665754e/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2978, 12, 529, 16, 3364, 33, 7036, 16, 982, 33, 7036, 16, 756, 33, 7036, 4672, 468, 9948, 923, 508, 35, 364, 276, 316, 508, 30, 309, 486, 276, 316, 533, 18, 26054, 15, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2978, 12, 529, 16, 3364, 33, 7036, 16, 982, 33, 7036, 16, 756, 33, 7036, 4672, 468, 9948, 923, 508, 35, 364, 276, 316, 508, 30, 309, 486, 276, 316, 533, 18, 26054, 15, 10...
if self.files: self.set_status(_("%d files verified and ok.") % len(self.files), STATE_CORRECT) else:
if not self.files:
def update_and_check_file_list(self): changed, missing, error = self.update_file_list() if changed or missing or error: self.set_status(_("Warning: %d files are different!") % (changed+missing+error),STATE_CORRUPTED) else: if self.files: self.set_status(_("%d files verified and ok.") % len(self.files), STATE_CORRECT) else: self.set_status(_("Ready."))
65876d1e2138464085ca6544043de6d507359d13 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2200/65876d1e2138464085ca6544043de6d507359d13/parano.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 464, 67, 1893, 67, 768, 67, 1098, 12, 2890, 4672, 3550, 16, 3315, 16, 555, 273, 365, 18, 2725, 67, 768, 67, 1098, 1435, 309, 3550, 578, 3315, 578, 555, 30, 365, 18, 542, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 464, 67, 1893, 67, 768, 67, 1098, 12, 2890, 4672, 3550, 16, 3315, 16, 555, 273, 365, 18, 2725, 67, 768, 67, 1098, 1435, 309, 3550, 578, 3315, 578, 555, 30, 365, 18, 542, ...
if not self.learners[l.id]:
print "xxx %s" % str(l.id) if not l.id in self.learners:
def sendResults(self): """commit evaluation results""" valid = [(l.results, [x.id for x in l.results.learners].index(l.id)) for l in self.learners.values() if l.scores] if not (self.data and len(valid)): self.send("Evaluation Results", None) return rlist = dict([(l.results,1) for l in self.learners.values() if l.scores]).keys() rlen = [r.numberOfLearners for r in rlist] results = rlist.pop(rlen.index(max(rlen))) for (i, l) in enumerate(results.learners): if not self.learners[l.id]: results.remove(i) del results.learners[i] for r in rlist: for (i, l) in enumerate(r.learners): if (r, i) in valid: results.add(r, i) results.learners.append(r.learners[i]) self.learners[r.learners[i].id].results = results self.send("Evaluation Results", results) self.results = results
70d3be61d668a18e0f8c4aa875a591ec3655f9dd /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/70d3be61d668a18e0f8c4aa875a591ec3655f9dd/OWTestLearners.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 3447, 12, 2890, 4672, 3536, 7371, 9873, 1686, 8395, 923, 273, 306, 12, 80, 18, 4717, 16, 306, 92, 18, 350, 364, 619, 316, 328, 18, 4717, 18, 21346, 414, 8009, 1615, 12, 80, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 3447, 12, 2890, 4672, 3536, 7371, 9873, 1686, 8395, 923, 273, 306, 12, 80, 18, 4717, 16, 306, 92, 18, 350, 364, 619, 316, 328, 18, 4717, 18, 21346, 414, 8009, 1615, 12, 80, 18,...
if ev == iPlayableService.evNewProgramInfo:
if ev == iPlayableService.evUpdatedInfo:
def gotServiceEvent(self, ev): service = self.session.nav.getCurrentService() if ev == iPlayableService.evNewProgramInfo: self.checkTunerState(service)
eb4b29cf6ed88fc882082789788843a1b531ec36 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6652/eb4b29cf6ed88fc882082789788843a1b531ec36/InfoBarGenerics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 1179, 1133, 12, 2890, 16, 2113, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 2113, 422, 277, 11765, 429, 1179, 18, 14965, 7381, 966, 30, 365, 18, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2363, 1179, 1133, 12, 2890, 16, 2113, 4672, 1156, 273, 365, 18, 3184, 18, 11589, 18, 588, 3935, 1179, 1435, 309, 2113, 422, 277, 11765, 429, 1179, 18, 14965, 7381, 966, 30, 365, 18, 18...
palette = QtGui.
def setLineColor(self): currentColor = self.lineColorButton.palette().color(QtGui.QPalette.Background) color = QtGui.QColorDialog.getColor(currentColor, self) palette = QtGui. if color.isValid(): self.lineColorButton.setText(color.name()) self.lineColorButton.setPalette(QtGui.QPalette(color)) self.currentLineColor = color
d178cede323e2b0ade1d755598a2733854f66a60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/d178cede323e2b0ade1d755598a2733854f66a60/plotconfig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26482, 2957, 12, 2890, 4672, 783, 2957, 273, 365, 18, 1369, 2957, 3616, 18, 26474, 7675, 3266, 12, 23310, 18070, 18, 53, 25863, 18, 8199, 13, 2036, 273, 23425, 18, 53, 2957, 6353, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26482, 2957, 12, 2890, 4672, 783, 2957, 273, 365, 18, 1369, 2957, 3616, 18, 26474, 7675, 3266, 12, 23310, 18070, 18, 53, 25863, 18, 8199, 13, 2036, 273, 23425, 18, 53, 2957, 6353, 18, ...
badargs = 10, 10L, 34.5, "abc", {}, [], () for badarg in badargs:
for badarg in OTHERSTUFF:
def test_compare(self): t1 = self.theclass(2, 3, 4) t2 = self.theclass(2, 3, 4) self.failUnless(t1 == t2) self.failUnless(t1 <= t2) self.failUnless(t1 >= t2) self.failUnless(not t1 != t2) self.failUnless(not t1 < t2) self.failUnless(not t1 > t2) self.assertEqual(cmp(t1, t2), 0) self.assertEqual(cmp(t2, t1), 0)
d43d9d9fe8e29351c56a4519805cd0d96749e872 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/d43d9d9fe8e29351c56a4519805cd0d96749e872/test_datetime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9877, 12, 2890, 4672, 268, 21, 273, 365, 18, 451, 557, 459, 12, 22, 16, 890, 16, 1059, 13, 268, 22, 273, 365, 18, 451, 557, 459, 12, 22, 16, 890, 16, 1059, 13, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9877, 12, 2890, 4672, 268, 21, 273, 365, 18, 451, 557, 459, 12, 22, 16, 890, 16, 1059, 13, 268, 22, 273, 365, 18, 451, 557, 459, 12, 22, 16, 890, 16, 1059, 13, 365, 18,...
""" pass
""" if not self.connectionInit: raise AttributeError, "Multiplexer is not yet initialized!" if localip == None: localip = self.socketInfo["localip"] if localport == None: localport = self.socketInfo["localport"] frame = MultiplexerFrame() requestedID = self.referenceCounter self.referenceCounter = self.referenceCounter + 1 frame.initClientFrame(requestedID, desthost, destport, localip, localport) self._sendFrame(frame) self.pendingSockets[requestedID] = [False, getlock(), None] self.pendingSockets[requestedID][2] = settimer(timeout, self._openconn_timeout, [requestedID]) self.pendingSockets[requestedID][1].acquire() self.pendingSockets[requestedID][1].acquire() success = self.pendingSockets[requestedID][0] handle = self.pendingSockets[requestedID][2] del self.pendingSockets[requestedID] if success: info = {"localip":localip,"localport":localport,"remoteip":desthost,"remoteport":destport} socket = MultiplexerSocket(requestedID, self, self.defaultBufSize, info) socket.socketLocks["nodata"].acquire() self.virtualSocketsLock.acquire() self.virtualSockets[requestedID] = socket self.virtualSocketsLock.release() return socket else: if handle == None: raise EnvironmentError, "Connection Refused!" else: raise EnvironmentError, "Connection timed out!" def _openconn_timeout(self, refID): try: self.pendingSockets[refID][1].release() except: pass
def openconn(self, desthost, destport, localip=None,localport=None,timeout=5): """ <Purpose> Opens a connection, returning a socket-like object
c37b97bba15a8b09425588f9b67749b496d89933 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/c37b97bba15a8b09425588f9b67749b496d89933/Multiplexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 4646, 12, 2890, 16, 1570, 2564, 16, 1570, 655, 16, 1191, 625, 33, 7036, 16, 3729, 655, 33, 7036, 16, 4538, 33, 25, 4672, 3536, 411, 10262, 4150, 34, 6066, 773, 279, 1459, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 4646, 12, 2890, 16, 1570, 2564, 16, 1570, 655, 16, 1191, 625, 33, 7036, 16, 3729, 655, 33, 7036, 16, 4538, 33, 25, 4672, 3536, 411, 10262, 4150, 34, 6066, 773, 279, 1459, 16, 5...
self.__decomp = [D[i](vals[i]) for i in range(len(D))] return self.__decomp
return [D[i](vals[i]) for i in range(len(D))]
def decomposition(self): """ Return the decomposition of self as a product of Dirichlet characters of prime power modulus, where the prime powers exactly divide the modulus of this character. EXAMPLES:: sage: G.<a,b> = DirichletGroup(20) sage: c = a*b sage: d = c.decomposition(); d [[-1], [zeta4]] sage: d[0].parent() Group of Dirichlet characters of modulus 4 over Cyclotomic Field of order 4 and degree 2 sage: d[1].parent() Group of Dirichlet characters of modulus 5 over Cyclotomic Field of order 4 and degree 2 We can't multiply directly, since coercion of one element into the other parent fails in both cases:: sage: d[0]*d[1] == c Traceback (most recent call last): ... TypeError: unsupported operand parent(s) for '*': 'Group of Dirichlet characters of modulus 4 over Cyclotomic Field of order 4 and degree 2' and 'Group of Dirichlet characters of modulus 5 over Cyclotomic Field of order 4 and degree 2' We can multiply if we're explicit about where we want the multiplication to take place. :: sage: G(d[0])*G(d[1]) == c True
2d29bdbbd76a69f79b998867461156f2c290f64a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/2d29bdbbd76a69f79b998867461156f2c290f64a/dirichlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26288, 12, 2890, 4672, 3536, 2000, 326, 26288, 434, 365, 487, 279, 3017, 434, 8446, 1354, 1810, 3949, 434, 17014, 7212, 24770, 16, 1625, 326, 17014, 7602, 414, 8950, 12326, 326, 24770, 434...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26288, 12, 2890, 4672, 3536, 2000, 326, 26288, 434, 365, 487, 279, 3017, 434, 8446, 1354, 1810, 3949, 434, 17014, 7212, 24770, 16, 1625, 326, 17014, 7602, 414, 8950, 12326, 326, 24770, 434...
tables = [x.table for x in entries_list] sources = [x.source for x in entries_list]
tables = set(x.table for x in entries_list) sources = set(x.source for x in entries_list)
def store_entries(entries_list, dbmodel, conn): """ Given a list of entries to be stored, try to store as much data as possible in the given database model.""" curs = conn.cursor() # Drop the old data from this document from the previous tables. tables = [x.table for x in entries_list] sources = [x.source for x in entries_list] for table in tables: if table not in dbmodel: continue for source in sources: curs.execute("DELETE FROM %s WHERE %s = %%s" % (table, col_source), (source,)) dbmodel = dict((k, dict(v)) for (k,v) in dbmodel.iteritems()) for e in entries_list: try: dbcols = dbmodel[e.table] except KeyError: pass # Table for available. outcols = [col_source] outvalues = [e.source] colseen = set() for cname, cvalue in e.values: cname = cname # If the columns cannot be stored in the current model, don't. if cname not in dbcols: continue if cname in colseen: logging.warning("Duplicate field name at %s" % e.locator) continue else: colseen.add(cname) dbtype = dbcols[cname].lower() if dbtype in ('text', 'varchar', 'char'): value = unicode(cvalue) elif dbtype in ('integer',): value = int(cvalue) elif dbtype in ('numeric', 'float'): value = float(cvalue) else: raise NotImplementedError("Unsupported type: '%s'" % dbtype) outcols.append(cname) outvalues.append(value) if outvalues: curs.execute(""" INSERT INTO %s (%s) VALUES (%s) """ % (e.table, ','.join(outcols), ','.join(['%s'] * len(outvalues))), outvalues) conn.commit()
2e36541c90224154027f2b76859da3220e27cb68 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1278/2e36541c90224154027f2b76859da3220e27cb68/rstlime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 8219, 12, 8219, 67, 1098, 16, 1319, 2284, 16, 1487, 4672, 3536, 16803, 279, 666, 434, 3222, 358, 506, 4041, 16, 775, 358, 1707, 487, 9816, 501, 487, 3323, 316, 326, 864, 2063...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 8219, 12, 8219, 67, 1098, 16, 1319, 2284, 16, 1487, 4672, 3536, 16803, 279, 666, 434, 3222, 358, 506, 4041, 16, 775, 358, 1707, 487, 9816, 501, 487, 3323, 316, 326, 864, 2063...
raise DimensionError("Can't specify both width and height")
raise FileDimensionError("Can't specify both width and height")
def download(self, width=False, height=False, location=False): """Download the image to a local file width/height - set width OR height of the downloaded image location - set the filename to save to. If not set, the page title minus the namespace prefix will be used and saved to the current directory """ if self.pageid == 0: self.setPageInfo() params = {'action':'query', 'prop':'imageinfo', 'iiprop':'url' } if width and height: raise DimensionError("Can't specify both width and height") if width: params['iiurlwidth'] = width if height: params['iiurlheight'] = height if self.pageid != 0: params['pageids'] = self.pageid elif self.title: params['titles'] = self.title else: self.setPageInfo() if not self.exists: # Non-existant files may be on a shared repo (e.g. commons) params['titles'] = self.title else: params['pageids'] = self.pageid req = api.APIRequest(self.site, params) res = req.query(False) key = res['query']['pages'].keys()[0] url = res['query']['pages'][key]['imageinfo'][0]['url'] if not location: location = self.title.split(':', 1)[1] opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(self.site.cookies)) headers = { "User-agent": self.site.useragent } request = urllib2.Request(url, None, headers) data = opener.open(request) f = open(location, 'wb', 0) f.write(data.read()) f.close() return location
91a7520e87b31995c38f6f412d9c78fb77e266d8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10544/91a7520e87b31995c38f6f412d9c78fb77e266d8/wikifile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 1835, 33, 8381, 16, 2072, 33, 8381, 16, 2117, 33, 8381, 4672, 3536, 7109, 326, 1316, 358, 279, 1191, 585, 225, 1835, 19, 4210, 300, 444, 1835, 4869, 2072, 434, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 12, 2890, 16, 1835, 33, 8381, 16, 2072, 33, 8381, 16, 2117, 33, 8381, 4672, 3536, 7109, 326, 1316, 358, 279, 1191, 585, 225, 1835, 19, 4210, 300, 444, 1835, 4869, 2072, 434, 326,...
scripts = [scriptBuilder.build(profileParams, proj)]
scripts = [scriptBuilder.build(profileParams, proj, useMavenJars=useMavenJars)]
def buildProfileScripts(proj, useMavenJars=False): scriptBuilder.setVarSh() profileParams = sodScriptParameters([scriptBuilder.sharkParameters()], proj, mavenRepoStructure=useMavenJars) profileParams.name='profile' scripts = [scriptBuilder.build(profileParams, proj)] scriptBuilder.setVarWindows() profileParams = sodScriptParameters([scriptBuilder.profileParameters(), scriptBuilder.windowsParameters()], proj, mavenRepoStructure=useMavenJars) profileParams.name='profile' scripts.append(scriptBuilder.build(profileParams, proj)) return scripts
e7139b76bc9102eb721cadf497970d82bd452e3a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9210/e7139b76bc9102eb721cadf497970d82bd452e3a/build.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4029, 15041, 12, 17995, 16, 999, 49, 7638, 46, 5913, 33, 8381, 4672, 2728, 1263, 18, 542, 1537, 1555, 1435, 3042, 1370, 273, 272, 369, 3651, 2402, 3816, 4263, 1263, 18, 674, 1313, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4029, 15041, 12, 17995, 16, 999, 49, 7638, 46, 5913, 33, 8381, 4672, 2728, 1263, 18, 542, 1537, 1555, 1435, 3042, 1370, 273, 272, 369, 3651, 2402, 3816, 4263, 1263, 18, 674, 1313, ...
checker=self.checker)
checker=self.checker)
def __init__(self, text, url, verbose=VERBOSE, maxpage=MAXPAGE, checker=None): self.text = text self.url = url self.verbose = verbose self.maxpage = maxpage self.checker = checker
f97eecccb714a71cf5a1ca9399cd9c579014a5b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/f97eecccb714a71cf5a1ca9399cd9c579014a5b9/wcnew.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 16, 880, 16, 3988, 33, 21900, 16, 943, 2433, 33, 6694, 11219, 16, 12489, 33, 7036, 4672, 365, 18, 955, 273, 977, 365, 18, 718, 273, 880, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 16, 880, 16, 3988, 33, 21900, 16, 943, 2433, 33, 6694, 11219, 16, 12489, 33, 7036, 4672, 365, 18, 955, 273, 977, 365, 18, 718, 273, 880, 365, 18, ...
self.task = self.bossSession.removeTask(self.taskId)
self.bossSession.removeTask(self.task) self.task = None
def removeTask(self) : """ __loadTask__ """
76ec705cf6944a63e099dea515f54a2a23e3d6c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8886/76ec705cf6944a63e099dea515f54a2a23e3d6c8/TaskAPITests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 2174, 12, 2890, 13, 294, 3536, 1001, 945, 2174, 972, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 2174, 12, 2890, 13, 294, 3536, 1001, 945, 2174, 972, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
fn = self.shlib_compiler.library_filename(fn,'shared') print "shlib",fn return fn
return self.shlib_compiler.library_filename(fn,'shared')
def get_ext_filename(self, fullname): filename = _build_ext.get_ext_filename(self,fullname) for ext in self.shlibs: if self.get_ext_fullname(ext.name)==fullname: fn, ext = os.path.splitext(filename) fn = self.shlib_compiler.library_filename(fn,'shared') print "shlib",fn return fn return filename
0e9451ebd06c7cc608bd206eccd088877a97d569 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8186/0e9451ebd06c7cc608bd206eccd088877a97d569/build_ext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 408, 67, 3459, 12, 2890, 16, 13321, 4672, 1544, 273, 389, 3510, 67, 408, 18, 588, 67, 408, 67, 3459, 12, 2890, 16, 21885, 13, 364, 1110, 316, 365, 18, 674, 21571, 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, 336, 67, 408, 67, 3459, 12, 2890, 16, 13321, 4672, 1544, 273, 389, 3510, 67, 408, 18, 588, 67, 408, 67, 3459, 12, 2890, 16, 21885, 13, 364, 1110, 316, 365, 18, 674, 21571, 30, 309, ...
elif envname == stack[-1]:
elif stack and envname == stack[-1]:
def subconvert(self, endchar=None, depth=0): if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) stack = [] line = self.line 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 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. 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 = subconvert("}", depth + len(stack) + 2) 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...
6d0931003cfff1a870c8f6ddb9287b190f316868 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6d0931003cfff1a870c8f6ddb9287b190f316868/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, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, 6283, 9275, 87, 5153, 82, 225, 980, 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, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, 6283, 9275, 87, 5153, 82, 225, 980, 273, ...
print "gcompris:frames_total : ", fles.frames_total
def matrix(a, b, c, d, e, f): return (a , b, c, d, e, f)
b0960edd4ee4dd41f5a02508b5bede9378e8a56b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/b0960edd4ee4dd41f5a02508b5bede9378e8a56b/anim.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3148, 12, 69, 16, 324, 16, 276, 16, 302, 16, 425, 16, 284, 4672, 327, 261, 69, 269, 324, 16, 276, 16, 302, 16, 425, 16, 284, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3148, 12, 69, 16, 324, 16, 276, 16, 302, 16, 425, 16, 284, 4672, 327, 261, 69, 269, 324, 16, 276, 16, 302, 16, 425, 16, 284, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
a3 = Table('addresses', meta3,
a3 = Table('addresses', meta3,
def test_override_create_fkcols(self): """test that you can override columns and create new foreign keys to other reflected tables. this is common with MySQL MyISAM tables.""" meta = MetaData(testbase.db) users = Table('users', meta, Column('id', Integer, primary_key=True), Column('name', String(30))) addresses = Table('addresses', meta, Column('id', Integer, primary_key=True), Column('street', String(30)), Column('user_id', Integer)) meta.create_all() try: meta2 = MetaData(testbase.db) a2 = Table('addresses', meta2, Column('user_id', Integer, ForeignKey('users.id')), autoload=True) u2 = Table('users', meta2, autoload=True) assert len(a2.c.user_id.foreign_keys) == 1 assert len(a2.foreign_keys) == 1 assert [c.parent for c in a2.foreign_keys] == [a2.c.user_id] assert [c.parent for c in a2.c.user_id.foreign_keys] == [a2.c.user_id] assert list(a2.c.user_id.foreign_keys)[0].parent is a2.c.user_id assert u2.join(a2).onclause == u2.c.id==a2.c.user_id
35ff8ed25e8a03b36461fbe09d0530bb1164ce82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/35ff8ed25e8a03b36461fbe09d0530bb1164ce82/reflection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10601, 67, 2640, 67, 23120, 6842, 12, 2890, 4672, 3536, 3813, 716, 1846, 848, 3849, 2168, 471, 752, 394, 5523, 1311, 358, 1308, 21591, 4606, 18, 333, 353, 2975, 598, 13485, 800...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 10601, 67, 2640, 67, 23120, 6842, 12, 2890, 4672, 3536, 3813, 716, 1846, 848, 3849, 2168, 471, 752, 394, 5523, 1311, 358, 1308, 21591, 4606, 18, 333, 353, 2975, 598, 13485, 800...
self.assertEqual('attachment', ns)
self.assertEqual('raw-attachment', ns)
def test_wiki_link_subpage(self): attachment = Attachment(self.env, 'wiki', 'SomePage/SubPage') attachment.insert('foo.txt', tempfile.TemporaryFile(), 0)
5212b3d75f41c5849287b8b689aab1f5fa9d36fe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/5212b3d75f41c5849287b8b689aab1f5fa9d36fe/attachment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13044, 67, 1232, 67, 1717, 2433, 12, 2890, 4672, 6042, 273, 15939, 12, 2890, 18, 3074, 16, 296, 13044, 2187, 296, 17358, 1964, 19, 1676, 1964, 6134, 6042, 18, 6387, 2668, 11351...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 13044, 67, 1232, 67, 1717, 2433, 12, 2890, 4672, 6042, 273, 15939, 12, 2890, 18, 3074, 16, 296, 13044, 2187, 296, 17358, 1964, 19, 1676, 1964, 6134, 6042, 18, 6387, 2668, 11351...
path = path.replace('/', os.sep)
path = self._absnorm(path)
def directory_should_not_exist(self, path, msg=None): """Fails if the given path points to an existing file. The path can be given as an exact path or as a pattern similarly as with `File Should Exist` keyword. The default error message can be overridden with the `msg` argument. """ path = path.replace('/', os.sep) matches = [ p for p in glob.glob(path) if os.path.isdir(p) ] if not matches: self._info("Directory '%s' does not exist" % path) return if msg is None: if self._is_pattern_path(path): matches.sort() name = len(matches) == 1 and 'directory' or 'directories' msg = "Path '%s' matches %s %s" % (path, name, utils.seq2str(matches)) else: msg = "Directory '%s' exists" % path raise AssertionError(msg)
8394d54a14ff248630063a73df253438178dff53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/8394d54a14ff248630063a73df253438178dff53/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1867, 67, 13139, 67, 902, 67, 7398, 12, 2890, 16, 589, 16, 1234, 33, 7036, 4672, 3536, 30800, 309, 326, 864, 589, 3143, 358, 392, 2062, 585, 18, 225, 1021, 589, 848, 506, 864, 487, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1867, 67, 13139, 67, 902, 67, 7398, 12, 2890, 16, 589, 16, 1234, 33, 7036, 4672, 3536, 30800, 309, 326, 864, 589, 3143, 358, 392, 2062, 585, 18, 225, 1021, 589, 848, 506, 864, 487, 3...
if style[0] == 'O' or style[0] == 'o':
if style[0] in ('O','o'):
def get_pango_desc(self): """ Get a pango font description for this pgufont. Assumes font has been set and will not change, as once the pango description is computed it remains fixed. """ if self.pango_desc is not None: return self.pango_desc self.pango_desc = pango.FontDescription() family = self.get_font_part('Family') if family == '*': self.pango_desc.set_family('Sans') else: self.pango_desc.set_family(family) style = self.get_font_part('Slant') if style[0] == 'I' or style[0] == 'i': self.pango_desc.set_style(pango.STYLE_ITALIC) if style[0] == 'O' or style[0] == 'o': self.pango_desc.set_style(pango.STYLE_OBLIQUE) size = self.get_font_part('Pixel Size') if size == '*': self.pango_desc.set_size(12) else: self.pango_desc.set_size(int(size)) weight = self.get_font_part('Weight') if weight[0] == 'B' or weight[0] == 'b': self.pango_desc.set_weight(pango.WEIGHT_BOLD) stretch = self.get_font_part('Set') if stretch[0] == 'C' or stretch[0] == 'c': self.pango_desc.set_stretch(pango.STRETCH_CONDENSED) if stretch[0] == 'E' or stretch[0] == 'e': self.pango_desc.set_stretch(pango.STRETCH_EXPANDED)
6cfe0b0ebc1d4511b611dddafdec6dc059fe54b2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11090/6cfe0b0ebc1d4511b611dddafdec6dc059fe54b2/pgufont.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 84, 6399, 67, 5569, 12, 2890, 4672, 3536, 968, 279, 293, 6399, 3512, 2477, 364, 333, 7184, 696, 1580, 18, 25374, 3512, 711, 2118, 444, 471, 903, 486, 2549, 16, 487, 3647, 326,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 84, 6399, 67, 5569, 12, 2890, 4672, 3536, 968, 279, 293, 6399, 3512, 2477, 364, 333, 7184, 696, 1580, 18, 25374, 3512, 711, 2118, 444, 471, 903, 486, 2549, 16, 487, 3647, 326,...
context = {'course': course, 'activity': activity, 'activityinfo': activityinfo, 'display_summary': display_summary}
else: reason_msg = '' if student_count < STUD_NUM_TO_DISP_ACTSTAT: reason_msg = 'Summary statistics disabled for small classes.' elif activity.status != 'RLS': reason_msg = 'Summary statistics disabled for unrelease activities.' context = {'course': course, 'activity': activity, 'activityinfo': activityinfo, 'display_summary': display_summary, 'reason_msg': reason_msg}
def _activity_info_student(request, course_slug, activity_slug): course = get_object_or_404(CourseOffering, slug=course_slug) activities = all_activities_filter(slug=activity_slug, offering=course) if len(activities) != 1: return NotFoundResponse(request) activity = activities[0] if activity.status=="INVI": return NotFoundResponse(request) # only display summary stats for courses with at least STUD_NUM_TO_DISP_ACTSTAT students student_count = Member.objects.filter(offering=course, role="STUD").count() display_summary = student_count >= STUD_NUM_TO_DISP_ACTSTAT and activity.status=="RLS" student = Member.objects.get(offering=course, person__userid=request.user.username, role='STUD') activityinfo = create_StudentActivityInfo_list(course, activity, student=student)[0] if display_summary: activityinfo.append_activity_stat() context = {'course': course, 'activity': activity, 'activityinfo': activityinfo, 'display_summary': display_summary} return render_to_response('grades/activity_info_student.html', context, context_instance=RequestContext(request))
e22c6ed008b1405c4863f465561c73db7c7a78f8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/e22c6ed008b1405c4863f465561c73db7c7a78f8/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9653, 67, 1376, 67, 26240, 12, 2293, 16, 4362, 67, 6436, 16, 5728, 67, 6436, 4672, 4362, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 39, 3117, 17800, 16, 4959, 33, 5566, 67, 643...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9653, 67, 1376, 67, 26240, 12, 2293, 16, 4362, 67, 6436, 16, 5728, 67, 6436, 4672, 4362, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 39, 3117, 17800, 16, 4959, 33, 5566, 67, 643...
if label and label[0] in ("'",'"'): label = label[1:-1]
label = self._unquote(label)
def _lhref_formatter(self, match, fullmatch): ns = fullmatch.group('lns') target = fullmatch.group('ltgt') if target and target[0] in ("'",'"'): target = target[1:-1] label = fullmatch.group('label') if not label: # e.g. `[http://target]` or `[wiki:target]` if target: if target.startswith('//'): # for `[http://target]` label = ns+':'+target # use `http://target` else: # for `wiki:target` label = target # use only `target` else: # e.g. `[search:]` label = ns if label and label[0] in ("'",'"'): label = label[1:-1] rel = fullmatch.group('rel') if rel: return self._make_relative_link(rel, label or rel) else: return self._make_link(ns, target, match, label)
1f03dd3afd00a1741a5cf57f41956c7034b3ba35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/1f03dd3afd00a1741a5cf57f41956c7034b3ba35/formatter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 80, 7547, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 3153, 273, 1983, 1916, 18, 1655, 2668, 2370, 87, 6134, 1018, 273, 1983, 1916, 18, 1655, 2668, 5618, 4521, 6134, 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, 80, 7547, 67, 12354, 12, 2890, 16, 845, 16, 1983, 1916, 4672, 3153, 273, 1983, 1916, 18, 1655, 2668, 2370, 87, 6134, 1018, 273, 1983, 1916, 18, 1655, 2668, 5618, 4521, 6134, 309, ...
return self.url
return self._widget.get_location() url = property(get_current_url)
def get_current_url(self): return self.url
5bef5d1b50a5d76217aeacbe607093c20db9fdc9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/5bef5d1b50a5d76217aeacbe607093c20db9fdc9/widgetset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 718, 12, 2890, 4672, 327, 365, 18, 718, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2972, 67, 718, 12, 2890, 4672, 327, 365, 18, 718, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if (occupied_size + ellipses_size) < width:
if (occupied_size + ellipses_size) <= width:
def drawstringframedhard(self, string, x, y, width, height, fgcolor=None, bgcolor=None, font=None, ptsize=0, align_h='left', align_v='top', layer=None, ellipses='...'):
a2e8f74eb29a1de2e5fa817618b9c39c8c1a4abb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/a2e8f74eb29a1de2e5fa817618b9c39c8c1a4abb/osd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1080, 74, 1940, 329, 20379, 12, 2890, 16, 533, 16, 619, 16, 677, 16, 1835, 16, 2072, 16, 10186, 3266, 33, 7036, 16, 31509, 33, 7036, 16, 3512, 33, 7036, 16, 5818, 1467, 33, 20,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 1080, 74, 1940, 329, 20379, 12, 2890, 16, 533, 16, 619, 16, 677, 16, 1835, 16, 2072, 16, 10186, 3266, 33, 7036, 16, 31509, 33, 7036, 16, 3512, 33, 7036, 16, 5818, 1467, 33, 20,...
assert_array_equal(gmm.gm.w, dic['w']) assert_array_equal(gmm.gm.mu, dic['mu']) assert_array_equal(gmm.gm.va, dic['va'])
assert_array_almost_equal(gmm.gm.w, dic['w'], DEF_DEC) assert_array_almost_equal(gmm.gm.mu, dic['mu'], DEF_DEC) assert_array_almost_equal(gmm.gm.va, dic['va'], DEF_DEC)
def test_1d_full(self, level = 1): d = 1 k = 4 mode = 'full' # Data are exactly the same than in diagonal mode, just test that # calling full mode works even in 1d, even if it is kind of stupid to # do so dic = load_dataset('diag_1d_4k.mat')
76afc91d8ddf202146c1cc1b22949de3110c98d0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/76afc91d8ddf202146c1cc1b22949de3110c98d0/test_gmm_em.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 21, 72, 67, 2854, 12, 2890, 16, 1801, 273, 404, 4672, 302, 273, 404, 417, 273, 1059, 1965, 273, 296, 2854, 11, 468, 1910, 854, 8950, 326, 1967, 2353, 316, 15425, 1965, 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, 1842, 67, 21, 72, 67, 2854, 12, 2890, 16, 1801, 273, 404, 4672, 302, 273, 404, 417, 273, 1059, 1965, 273, 296, 2854, 11, 468, 1910, 854, 8950, 326, 1967, 2353, 316, 15425, 1965, 16, ...
self.CM.log("Detach/Reattach scenarios are not possible with OCFS2 services present") return self.find_ocfs2_resources(node)
if self.find_ocfs2_resources(node): self.CM.log("Detach/Reattach scenarios are not possible with OCFS2 services present") return 0 return 1
def canrunnow(self, node): '''Return TRUE if we can meaningfully run right now''' self.CM.log("Detach/Reattach scenarios are not possible with OCFS2 services present") return self.find_ocfs2_resources(node)
26634b60d289cc4b781637149768b45097691b9d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11962/26634b60d289cc4b781637149768b45097691b9d/CTStests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 2681, 3338, 12, 2890, 16, 756, 4672, 9163, 990, 5383, 309, 732, 848, 12256, 4095, 1086, 2145, 2037, 26418, 365, 18, 9611, 18, 1330, 2932, 17650, 19, 426, 7331, 22456, 854, 486, 3323...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 2681, 3338, 12, 2890, 16, 756, 4672, 9163, 990, 5383, 309, 732, 848, 12256, 4095, 1086, 2145, 2037, 26418, 365, 18, 9611, 18, 1330, 2932, 17650, 19, 426, 7331, 22456, 854, 486, 3323...
self.status = True
self.enabled = True
def endElement(self, name, value, connection): if name == 'CNAME': self.cnames.append(value) elif name == 'Origin': self.origin = value elif name == 'Comment': self.comment = value elif name == 'Enabled': if value.lower == 'true': self.status = True else: self.status = False elif name == 'CallerReference': self.caller_reference = value else: setattr(self, name, value)
80838330ed9333da4b3a68d3dfff1ebd3d33d567 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/80838330ed9333da4b3a68d3dfff1ebd3d33d567/distribution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14840, 12, 2890, 16, 508, 16, 460, 16, 1459, 4672, 309, 508, 422, 296, 39, 1985, 4278, 365, 18, 71, 1973, 18, 6923, 12, 1132, 13, 1327, 508, 422, 296, 7571, 4278, 365, 18, 10012, 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, 14840, 12, 2890, 16, 508, 16, 460, 16, 1459, 4672, 309, 508, 422, 296, 39, 1985, 4278, 365, 18, 71, 1973, 18, 6923, 12, 1132, 13, 1327, 508, 422, 296, 7571, 4278, 365, 18, 10012, 273...
steps = 0
def optimize(self, nrOfSteps = -1): self.optimizeButton.hide() self.stopButton.show() self.cancelOptimization = 0
124412186d12bde3fe0b836818de0b9222b5f935 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/124412186d12bde3fe0b836818de0b9222b5f935/OWFreeVizOptimization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 12, 2890, 16, 9884, 951, 11811, 273, 300, 21, 4672, 365, 18, 29155, 3616, 18, 11248, 1435, 365, 18, 5681, 3616, 18, 4500, 1435, 365, 18, 10996, 13930, 1588, 273, 374, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10979, 12, 2890, 16, 9884, 951, 11811, 273, 300, 21, 4672, 365, 18, 29155, 3616, 18, 11248, 1435, 365, 18, 5681, 3616, 18, 4500, 1435, 365, 18, 10996, 13930, 1588, 273, 374, 2, -100, -...
self.Encoding_List = gtk.ListStore(gobject.TYPE_STRING) self.Encoding = gtk.ComboBox() self.Encoding.show() self.Encoding.connect("changed", self.OnEncodingChanged) self.Encoding.set_model(self.Encoding_List)
self.Encoding1_List = gtk.ListStore(gobject.TYPE_STRING) self.Encoding1 = gtk.ComboBox() self.Encoding1.show() self.Encoding1.connect("changed", self.OnEncodingChanged) self.Encoding1.set_model(self.Encoding1_List)
def __init__(self, create = True, accel_group = None, tooltips = None): if accel_group is None: self.accel_group = gtk.AccelGroup() else: self.accel_group = accel_group if tooltips is None: self.tooltips = gtk.Tooltips() else: self.tooltips = tooltips self.tooltips.enable() if create: self.PrivateChatTab = gtk.Window() self.PrivateChatTab.set_title(_("window1")) self.PrivateChatTab.add_accel_group(self.accel_group) self.PrivateChatTab.show()
363cba988d4bed5afdae4b3f448f4bf00e734531 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8738/363cba988d4bed5afdae4b3f448f4bf00e734531/nicotine_glade.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 752, 273, 1053, 16, 15153, 67, 1655, 273, 599, 16, 358, 4397, 7146, 273, 599, 4672, 309, 15153, 67, 1655, 353, 599, 30, 365, 18, 30737, 67, 1655, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 752, 273, 1053, 16, 15153, 67, 1655, 273, 599, 16, 358, 4397, 7146, 273, 599, 4672, 309, 15153, 67, 1655, 353, 599, 30, 365, 18, 30737, 67, 1655, 273, ...
cell_esd = map(float, file_contents[i].split()[-6:])
if '-1.0E+00-1.0E+00-1.0E+00' in file_contents[i]: cell_esd = [-1.0, -1.0, -1.0, -1.0, -1.0, -1.0] else: cell_esd = map(float, file_contents[i].split()[-6:])
def _parse_correct_lp(filename): '''Parse the contents of the CORRECT.LP file pointed to by filename.''' if not os.path.split(filename)[-1] == 'CORRECT.LP': raise RuntimeError, 'input filename not CORRECT.LP' file_contents = open(filename, 'r').readlines() postrefinement_stats = { } for i in range(len(file_contents)): if 'OF SPOT POSITION (PIXELS)' in file_contents[i]: rmsd_pixel = float(file_contents[i].split()[-1]) postrefinement_stats['rmsd_pixel'] = rmsd_pixel if 'OF SPINDLE POSITION (DEGREES)' in file_contents[i]: rmsd_phi = float(file_contents[i].split()[-1]) postrefinement_stats['rmsd_phi'] = rmsd_phi # want to convert this to mm in some standard setting! if 'DETECTOR COORDINATES (PIXELS) OF DIRECT BEAM' in file_contents[i]: beam = map(float, file_contents[i].split()[-2:]) postrefinement_stats['beam'] = beam if 'CRYSTAL TO DETECTOR DISTANCE (mm)' in file_contents[i]: distance = float(file_contents[i].split()[-1]) postrefinement_stats['distance'] = distance if 'UNIT CELL PARAMETERS' in file_contents[i]: cell = map(float, file_contents[i].split()[-6:]) postrefinement_stats['cell'] = cell if 'E.S.D. OF CELL PARAMETERS' in file_contents[i]: cell_esd = map(float, file_contents[i].split()[-6:]) postrefinement_stats['cell_esd'] = cell_esd if 'REFLECTIONS ACCEPTED' in file_contents[i]: postrefinement_stats['n_ref'] = int(file_contents[i].split()[0]) # look for I/sigma (resolution) information... if 'RESOLUTION RANGE I/Sigma Chi^2 R-FACTOR R-FACTOR' in \ file_contents[i]: resolution_info = [] j = i + 3 while not '-----' in file_contents[j]: l = file_contents[j].split() resolution_info.append((float(l[1]),float(l[2]))) j += 1 # bug # 2409 - this seems a little harsh set as 1.0 so # set this to 0.75 - even then 0.5 may be better.. resolution = _resolution_estimate(resolution_info, 0.5) postrefinement_stats['resolution_estimate'] = resolution # also recover the highest resolution limit of the data j += 1 postrefinement_stats['highest_resolution'] = float( file_contents[j].split()[1]) return postrefinement_stats
c09c5c645f1452c57a4fdfcec675c7a5fb16a833 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3290/c09c5c645f1452c57a4fdfcec675c7a5fb16a833/XDSCorrectHelpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 6746, 67, 9953, 12, 3459, 4672, 9163, 3201, 326, 2939, 434, 326, 28359, 4512, 18, 14461, 585, 25874, 358, 635, 1544, 1093, 6309, 225, 309, 486, 1140, 18, 803, 18, 4939, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 67, 6746, 67, 9953, 12, 3459, 4672, 9163, 3201, 326, 2939, 434, 326, 28359, 4512, 18, 14461, 585, 25874, 358, 635, 1544, 1093, 6309, 225, 309, 486, 1140, 18, 803, 18, 4939, ...
this = apply(_quickfix.new_Spread, args)
this = _quickfix.new_Spread(*args)
def __init__(self, *args): this = apply(_quickfix.new_Spread, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 28719, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 28719, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, 365, 18, 22...
try: keyname, value = assignment.split("=") except: raise SyntaxError, "\"%s\" is not a valid EDS line"%assignment.strip()
keyname, value = assignment.split("=", 1)
def ParseCPJFile(filepath): networks = [] # Read file text cpj_file = open(filepath,'r').read() sections = ExtractSections(cpj_file) # Parse assignments for each section for section_name, assignments in sections: # Verify that section name is TOPOLOGY if section_name.upper() in "TOPOLOGY": # Reset values for topology topology = {"Name" : "", "Nodes" : {}} for assignment in assignments: # Escape any comment if assignment.startswith(";"): pass # Verify that line is a valid assignment elif assignment.find('=') > 0: # Split assignment into the two values keyname and value # Verify that there is only one '=' character in the line try: keyname, value = assignment.split("=") except: raise SyntaxError, "\"%s\" is not a valid EDS line"%assignment.strip() # keyname must be immediately followed by the "=" sign, so we # verify that there is no whitespace into keyname if keyname.isalnum(): # value can be preceded and followed by whitespaces, so we escape them value = value.strip() # First case, value starts with "0x", then it's an hexadecimal value if value.startswith("0x"): try: computed_value = int(value, 16) except: raise SyntaxError, "\"%s\" is not a valid value for attribute \"%s\" of section \"[%s]\""%(value, keyname, section_name) elif value.isdigit(): # Second case, value is a number and starts with "0", then it's an octal value if value.startswith("0"): computed_value = int(value, 8) # Third case, value is a number and don't start with "0", then it's a decimal value else: computed_value = int(value) # In any other case, we keep string value else: computed_value = value # Search if the section name match any cpj expression nodepresent_result = nodepresent_model.match(keyname.upper()) nodename_result = nodename_model.match(keyname.upper()) nodedcfname_result = nodedcfname_model.match(keyname.upper()) if keyname.upper() == "NETNAME": if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Name"] = computed_value elif keyname.upper() == "NODES": if not is_integer(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Number"] = computed_value elif keyname.upper() == "EDSBASENAME": if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) topology["Path"] = computed_value elif nodepresent_result: if not is_boolean(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodepresent_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["Present"] = computed_value elif nodename_result: if not is_string(value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodename_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["Name"] = computed_value elif nodedcfname_result: if not is_string(computed_value): raise SyntaxError, "Invalid value \"%s\" for keyname \"%s\" of section \"[%s]\""%(value, keyname, section_name) nodeid = int(nodedcfname_result.groups()[0]) if nodeid not in topology["Nodes"].keys(): topology["Nodes"][nodeid] = {} topology["Nodes"][nodeid]["DCFName"] = computed_value else: raise SyntaxError, "Keyname \"%s\" not recognised for section \"[%s]\""%(keyname, section_name) # All lines that are not empty and are neither a comment neither not a valid assignment elif assignment.strip() != "": raise SyntaxError, "\"%s\" is not a valid CPJ line"%assignment.strip() if "Number" not in topology.keys(): raise SyntaxError, "\"Nodes\" keyname in \"[%s]\" section is missing"%section_name if topology["Number"] != len(topology["Nodes"]): raise SyntaxError, "\"Nodes\" value not corresponding to number of nodes defined" for nodeid, node in topology["Nodes"].items(): if "Present" not in node.keys(): raise SyntaxError, "\"Node%dPresent\" keyname in \"[%s]\" section is missing"%(nodeid, section_name) networks.append(topology) # In other case, there is a syntax problem into CPJ file else: raise SyntaxError, "Section \"[%s]\" is unrecognized"%section_name return networks
f74eabf1947f53aa36192fb06c72a58267a5a8fb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/116/f74eabf1947f53aa36192fb06c72a58267a5a8fb/eds_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 4258, 46, 812, 12, 10561, 4672, 13884, 273, 5378, 468, 2720, 585, 977, 3283, 78, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, 12, 4057, 78, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 4258, 46, 812, 12, 10561, 4672, 13884, 273, 5378, 468, 2720, 585, 977, 3283, 78, 67, 768, 273, 1696, 12, 10561, 11189, 86, 16063, 896, 1435, 7178, 273, 8152, 15965, 12, 4057, 78, ...
self.agregerFichiersXML(racine)
self.agregerFichiersXML(racine, domDocument)
def agregation(self): """ fait l'agregation de fichiersXML, noeudsXML, resultatsSQL et session dans un seul document DOM. Ne devrait pas etre surchargee. """ domDocument = libxml2.newDoc("1.0") racine = domDocument.newChild(None, self.racineXML, None); if len(self.session) > 0: self.agregerSession(racine) if len(self.fichiersXML) > 0: self.agregerFichiersXML(racine) if len(self.resultatsSQL) > 0: self.agregerResultatsSQL(racine) if len(self.noeudsXML) > 0: # [TODO] pass # Decommenter cette ligne pour activer le mode debug # [TODO] gerer ce mode debug avec un flag dans la conf #~ res = domDocument.saveFile("/tmp/flstXML.xml") return domDocument
2ae51bc9bdddb5886b738a1b6ae9acc027f38e34 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2604/2ae51bc9bdddb5886b738a1b6ae9acc027f38e34/transformation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1574, 367, 12, 2890, 4672, 3536, 284, 1540, 328, 11, 346, 1574, 367, 443, 284, 1354, 20778, 4201, 16, 1158, 73, 1100, 87, 4201, 16, 563, 2323, 3997, 3393, 1339, 26224, 640, 695, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1737, 1574, 367, 12, 2890, 4672, 3536, 284, 1540, 328, 11, 346, 1574, 367, 443, 284, 1354, 20778, 4201, 16, 1158, 73, 1100, 87, 4201, 16, 563, 2323, 3997, 3393, 1339, 26224, 640, 695, ...
- excample: the Example object that failed
- example: the Example object that failed
def __str__(self): return str(self.test)
0b925b22b30f533ea0f01a43f4e7c3be5834cfa7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0b925b22b30f533ea0f01a43f4e7c3be5834cfa7/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 3813, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 609, 12, 2890, 18, 3813, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
dbg('ConfigBase::get_item: found in plugin %s (%s)' % ( plugin, self.plugins[plugin][key]))
dbg('ConfigBase::get_item: %s found in plugin %s: %s' % ( key, plugin, self.plugins[plugin][key]))
def get_item(self, key, profile='default', plugin=None): """Look up a configuration item""" dbg('ConfigBase::get_item: %s:%s' % (profile, key)) if self.global_config.has_key(key): dbg('ConfigBase::get_item: found in globals: %s' % self.global_config[key]) return(self.global_config[key]) elif self.profiles[profile].has_key(key): dbg('ConfigBase::get_item: found in profile %s (%s)' % ( profile, self.profiles[profile][key])) return(self.profiles[profile][key]) elif key == 'keybindings': return(self.keybindings) elif plugin is not None and self.plugins[plugin].has_key(key): dbg('ConfigBase::get_item: found in plugin %s (%s)' % ( plugin, self.plugins[plugin][key])) return(self.plugins[plugin][key]) else: raise KeyError('ConfigBase::get_item: unknown key %s' % key)
3d72c7b55895402710a8d79e0e73242d626c335d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1032/3d72c7b55895402710a8d79e0e73242d626c335d/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1726, 12, 2890, 16, 498, 16, 3042, 2218, 1886, 2187, 1909, 33, 7036, 4672, 3536, 9794, 731, 279, 1664, 761, 8395, 28966, 2668, 809, 2171, 2866, 588, 67, 1726, 30, 738, 87, 531...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1726, 12, 2890, 16, 498, 16, 3042, 2218, 1886, 2187, 1909, 33, 7036, 4672, 3536, 9794, 731, 279, 1664, 761, 8395, 28966, 2668, 809, 2171, 2866, 588, 67, 1726, 30, 738, 87, 531...
if proxy: proxy.close()
def guessCommunity(self, ignored, proxy, ip, communities): """Try to guess a community.
b450c5c5a66c63ed2f89158706157af41700f40c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13050/b450c5c5a66c63ed2f89158706157af41700f40c/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 12136, 13352, 12, 2890, 16, 5455, 16, 2889, 16, 2359, 16, 8391, 1961, 4672, 3536, 7833, 358, 7274, 279, 19833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 12136, 13352, 12, 2890, 16, 5455, 16, 2889, 16, 2359, 16, 8391, 1961, 4672, 3536, 7833, 358, 7274, 279, 19833, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if( self._key_waiting == 'References' ):
if self._key_waiting == 'References':
def start_ol( self, attrs ): if( self._key_waiting == 'References' ): self._state = 'references' self._reference_state = 'pubmed_id' self._flush_text() self._references = []
057a42016586e300ec42f7a5a6468a5d7f6c179c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7167/057a42016586e300ec42f7a5a6468a5d7f6c179c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 355, 12, 365, 16, 3422, 262, 30, 309, 365, 6315, 856, 67, 20241, 422, 296, 8221, 4278, 365, 6315, 2019, 273, 296, 14353, 11, 365, 6315, 6180, 67, 2019, 273, 296, 10174, 2937, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 355, 12, 365, 16, 3422, 262, 30, 309, 365, 6315, 856, 67, 20241, 422, 296, 8221, 4278, 365, 6315, 2019, 273, 296, 14353, 11, 365, 6315, 6180, 67, 2019, 273, 296, 10174, 2937, ...
try: from mx import DateTime except ImportError: import DateTime from DateTime import Date, Time, Timestamp, ISO, \ DateTimeType, DateTimeDeltaType
try: from mx import DateTime from mx.DateTime import Date, Time, Timestamp, ISO, \ DateTimeType, DateTimeDeltaType except ImportError: import DateTime from DateTime import Date, Time, Timestamp, ISO, \ DateTimeType, DateTimeDeltaType
def Thing2Literal(o, d={}): return string_literal(str(o))
7fde6af81872e65fe7b04c0f34e7ea2754362cf1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10477/7fde6af81872e65fe7b04c0f34e7ea2754362cf1/MySQLdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 25803, 22, 6177, 12, 83, 16, 302, 12938, 4672, 327, 533, 67, 13107, 12, 701, 12, 83, 3719, 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, ...
[ 1, 1, 1, 1, 1, 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, 25803, 22, 6177, 12, 83, 16, 302, 12938, 4672, 327, 533, 67, 13107, 12, 701, 12, 83, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
flagdata2(vis = self.vis, selectdata=True, antenna="2")
flagdata2(vis = self.vis, selectdata=True, antenna="2", manualflag=True)
def test2(self): """Create, then restore autoflag"""
05385c9baca107ae37130d13ada12822cc89d8d5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2098/05385c9baca107ae37130d13ada12822cc89d8d5/test_flagdata2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 22, 12, 2890, 4672, 3536, 1684, 16, 1508, 5217, 30181, 22532, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 22, 12, 2890, 4672, 3536, 1684, 16, 1508, 5217, 30181, 22532, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.valueOf_ or
def hasContent_(self): if ( self.valueOf_ or super(AbstractChar, self).hasContent_() ): return True else: return False
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1350, 67, 12, 2890, 4672, 309, 261, 2240, 12, 7469, 2156, 16, 365, 2934, 5332, 1350, 67, 1435, 262, 30, 327, 1053, 469, 30, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 1350, 67, 12, 2890, 4672, 309, 261, 2240, 12, 7469, 2156, 16, 365, 2934, 5332, 1350, 67, 1435, 262, 30, 327, 1053, 469, 30, 327, 1083, 2, -100, -100, -100, -100, -100, -100, -100,...
print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
if self.verbose: print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
def report_unbalanced(self, tag): print '*** Unbalanced </' + tag + '>' print '*** Stack:', self.stack
c3a73d73d7017f1a0fa6de0cf546921fc570b8aa /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c3a73d73d7017f1a0fa6de0cf546921fc570b8aa/sgmllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 318, 12296, 72, 12, 2890, 16, 1047, 4672, 1172, 296, 14465, 1351, 12296, 72, 411, 2473, 397, 1047, 397, 7481, 1172, 296, 14465, 7283, 30, 2187, 365, 18, 3772, 2, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2605, 67, 318, 12296, 72, 12, 2890, 16, 1047, 4672, 1172, 296, 14465, 1351, 12296, 72, 411, 2473, 397, 1047, 397, 7481, 1172, 296, 14465, 7283, 30, 2187, 365, 18, 3772, 2, -100, -100, ...
del d['__cmp__']
d.remove('__cmp__')
def cls_delta(clsname, expl1, cls1, expl2, cls2): cache = cls_delta_cache print "; cls %s" % clsname try: rep = cache[(cls1, cls2)] return rep except KeyError: pass rep = ClassReport(clsname) rep.shortname = clsname.split('.')[1] rep.set_status(cls1, cls2, expl1) cls1_is_not_a_class = False if not expl1.is_class(cls1): if cls1 is not NOTFOUND: cls1 = NOTFOUND cls1_is_not_a_class = True if not expl2.is_class(cls2): cls2 = NOTFOUND assert not cls1_is_not_a_class names = Set() for cls in expl1.get_mro(cls1): names.update(expl1.names(cls)) for cls in expl2.get_mro(cls2): d = Set(expl2.names(cls)) if ('__cmp__' in d and '__cmp__' not in names and '__eq__' in d and '__ne__' in d and '__lt__' in d and '__le__' in d and '__gt__' in d and '__ge__' in d): del d['__cmp__'] names.update(d) if cls2 is type: # strange strange attributes we don't care about del names['__basicsize__'] del names['__cmp__'] del names['__dictoffset__'] del names['__itemsize__'] del names['__weakrefoffset__'] names = list(names) names.sort() for name in names: obj1 = expl1.findattr(cls1, name) obj2 = expl2.findattr(cls2, name) if obj1 is NOTFOUND and obj2 is NOTFOUND: continue # spurious :( entry = Entry(name) if cls1_is_not_a_class: entry.status = expl2 else: entry.set_status(obj1, obj2, expl1) entry.attach(rep) cache[(cls1, cls2)] = rep return rep
c09dbd8c77966028e40c6e2eaf24bec8973b1b2d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/c09dbd8c77966028e40c6e2eaf24bec8973b1b2d/delta.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2028, 67, 9878, 12, 6429, 529, 16, 22991, 21, 16, 2028, 21, 16, 22991, 22, 16, 2028, 22, 4672, 1247, 273, 2028, 67, 9878, 67, 2493, 1172, 13636, 2028, 738, 87, 6, 738, 2028, 529, 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, 2028, 67, 9878, 12, 6429, 529, 16, 22991, 21, 16, 2028, 21, 16, 22991, 22, 16, 2028, 22, 4672, 1247, 273, 2028, 67, 9878, 67, 2493, 1172, 13636, 2028, 738, 87, 6, 738, 2028, 529, 775...
vo = 'lhcb'
vo = DIRAC.gConfig.getValue('/DIRAC/VirtualOrganization', 'lhcb')
def usage(): print 'Usage: %s ce' %(Script.scriptName) DIRAC.exit(2)
3549d5939002dc087926079427d5f388e0a444ff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/3549d5939002dc087926079427d5f388e0a444ff/dirac-admin-bdii-sa.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 5898, 11, 8975, 3651, 18, 4263, 461, 13, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 296, 5357, 30, 738, 87, 5898, 11, 8975, 3651, 18, 4263, 461, 13, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
return ([], dict([('users', users), ('macs', self.store.entries['bb.xml'].macs)]))
return dict([('users', users), ('macs', self.store.entries['bb.xml'].macs)])
def get_additional_metadata(self, metadata): users = {} for user in self.store.entries['bb.xml'].users.get(metadata.hostname, []): pubkeys = [] for fname in glob.glob('/home/%s/.ssh/*.pub'%user): pubkeys.append(open(fname).read()) users[user] = pubkeys return ([], dict([('users', users), ('macs', self.store.entries['bb.xml'].macs)]))
c10e96ca5fa8f54cef51234e012f7228348f9de3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11867/c10e96ca5fa8f54cef51234e012f7228348f9de3/BB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 13996, 67, 4165, 12, 2890, 16, 1982, 4672, 225, 3677, 273, 2618, 364, 729, 316, 365, 18, 2233, 18, 8219, 3292, 9897, 18, 2902, 29489, 5577, 18, 588, 12, 4165, 18, 10358, 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, 336, 67, 13996, 67, 4165, 12, 2890, 16, 1982, 4672, 225, 3677, 273, 2618, 364, 729, 316, 365, 18, 2233, 18, 8219, 3292, 9897, 18, 2902, 29489, 5577, 18, 588, 12, 4165, 18, 10358, 16, ...
if cap < 0 or cap > dominfo.getVCpuCount() * 100:
if cap < 0 or cap > self.getVCpuCount() * 100:
def _constructDomain(self): """Construct the domain.
55d3a65b35bc1838a00c67b404f0af8f41a72ad0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/55d3a65b35bc1838a00c67b404f0af8f41a72ad0/XendDomainInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10062, 3748, 12, 2890, 4672, 3536, 7249, 326, 2461, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10062, 3748, 12, 2890, 4672, 3536, 7249, 326, 2461, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return wrap(ScintillaShellView(hwnd, self.path), useDispatcher=debug>0)
return wrap(ScintillaShellView(hwnd, self.path), iid, useDispatcher=debug>0)
def CreateViewObject(self, hwnd, iid): return wrap(ScintillaShellView(hwnd, self.path), useDispatcher=debug>0)
8216b30a77097d3b45747f427de06d488491eaca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/8216b30a77097d3b45747f427de06d488491eaca/shell_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1788, 1767, 921, 12, 2890, 16, 16139, 4880, 16, 22819, 4672, 327, 2193, 12, 1541, 474, 10745, 13220, 1767, 12, 20701, 4880, 16, 365, 18, 803, 3631, 999, 6681, 33, 4148, 34, 20, 13, 2, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1788, 1767, 921, 12, 2890, 16, 16139, 4880, 16, 22819, 4672, 327, 2193, 12, 1541, 474, 10745, 13220, 1767, 12, 20701, 4880, 16, 365, 18, 803, 3631, 999, 6681, 33, 4148, 34, 20, 13, 2, ...
'gmt+0100':'GMT+1','gmt+0200':'GMT+2','gmt+0300':'GMT+3', 'gmt+0400':'GMT+4','gmt+0500':'GMT+5','gmt+0600':'GMT+6', 'gmt+0700':'GMT+7','gmt+0800':'GMT+8','gmt+0900':'GMT+9',
'gmt+0100':'GMT+1', 'gmt+0200':'GMT+2', 'gmt+0300':'GMT+3', 'gmt+0400':'GMT+4', 'gmt+0500':'GMT+5', 'gmt+0600':'GMT+6', 'gmt+0700':'GMT+7', 'gmt+0800':'GMT+8', 'gmt+0900':'GMT+9',
def info(self,t=None): idx=self.index(t)[0] zs =self.az[self.tinfo[idx][2]:] return self.tinfo[idx][0],self.tinfo[idx][1],zs[:find(zs,'\000')]
e3c3fc51844495761b2c4fd0f0464373800ac912 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/e3c3fc51844495761b2c4fd0f0464373800ac912/DateTime.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 2890, 16, 88, 33, 7036, 4672, 2067, 33, 2890, 18, 1615, 12, 88, 25146, 20, 65, 998, 87, 273, 2890, 18, 1561, 63, 2890, 18, 88, 1376, 63, 3465, 6362, 22, 14542, 65, 327, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1123, 12, 2890, 16, 88, 33, 7036, 4672, 2067, 33, 2890, 18, 1615, 12, 88, 25146, 20, 65, 998, 87, 273, 2890, 18, 1561, 63, 2890, 18, 88, 1376, 63, 3465, 6362, 22, 14542, 65, 327, 3...
self.irc_id = prefix if DEBUG: print "irc_id: %s" % (prefix)
if self.irc_id != prefix: self.irc_id = prefix if DEBUG: print "irc_id: %s" % (prefix)
def process_data(self): """[Internal]"""
29f0268dfee4fc0977650ea17c594b7a7db4c172 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9915/29f0268dfee4fc0977650ea17c594b7a7db4c172/irclib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 892, 12, 2890, 4672, 3536, 63, 3061, 65, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 892, 12, 2890, 4672, 3536, 63, 3061, 65, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return IteratorWrapper(iterator)
return IteratorWrapper(iterator, start_response_started)
def start_response_wrapper(*args, **kw): assert len(args) == 2 or len(args) == 3, ( "Invalid number of arguments: %s" % args) assert not kw, "No keyword arguments allowed" status = args[0] headers = args[1] if len(args) == 3: exc_info = args[2] else: exc_info = None
9b4d86328e40817bcdcbd5619e8b438dd6e7c764 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11400/9b4d86328e40817bcdcbd5619e8b438dd6e7c764/lint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 67, 2740, 67, 8376, 30857, 1968, 16, 2826, 9987, 4672, 1815, 562, 12, 1968, 13, 422, 576, 578, 562, 12, 1968, 13, 422, 890, 16, 261, 315, 1941, 1300, 434, 1775, 30, 738, 87, 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, 787, 67, 2740, 67, 8376, 30857, 1968, 16, 2826, 9987, 4672, 1815, 562, 12, 1968, 13, 422, 576, 578, 562, 12, 1968, 13, 422, 890, 16, 261, 315, 1941, 1300, 434, 1775, 30, 738, 87, 6, ...
self._read_lock = threading.Lock()
self._read_lock = Lock()
def __init__(self, raw, buffer_size=DEFAULT_BUFFER_SIZE): """Create a new buffered reader using the given readable raw IO object. """ raw._checkReadable() _BufferedIOMixin.__init__(self, raw) self.buffer_size = buffer_size self._reset_read_buf() self._read_lock = threading.Lock()
07373bf5136eea3953b5f995d4c4e5048805927f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/07373bf5136eea3953b5f995d4c4e5048805927f/io.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1831, 16, 1613, 67, 1467, 33, 5280, 67, 11302, 67, 4574, 4672, 3536, 1684, 279, 394, 11445, 2949, 1450, 326, 864, 7471, 1831, 1665, 733, 18, 3536, 1831, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1831, 16, 1613, 67, 1467, 33, 5280, 67, 11302, 67, 4574, 4672, 3536, 1684, 279, 394, 11445, 2949, 1450, 326, 864, 7471, 1831, 1665, 733, 18, 3536, 1831, ...
result = interpreter.execute(None, pip, locator, version, view, aliases)
return interpreter.execute(None, pip, locator, version, view, aliases) def run(locator, workflow, parameters=''): """run(locator: VistrailLocator, workflow: int or str) -> boolean Run the workflow 'workflow' for the given locator. Returns False in case of error. workflow can be a tag name or a version. """ result = run_and_get_results(locator, workflow, parameters)
def run(locator, workflow, parameters=''): """run(locator: VistrailLocator, workflow: int or str) -> boolean Run the workflow 'workflow' in the 'input' file and generates Returns False in case of error. workflow can be a tag name or a version. """ elements = parameters.split(",") aliases = {} if locator.origin == VistrailLocator.ORIGIN.FILE: v = db.services.io.openVistrailFromXML(locator.name) Vistrail.convert(v) elif locator.origin == VistrailLocator.ORIGIN.DB: config = {} config['host'] = locator.host config['port'] = locator.port config['db'] = locator.db config['user'] = locator.user config['passwd'] = locator.db v = vistrail = db.services.io.open_from_db(config, locator.vt_id) Vistrail.convert(v) if type(workflow) == type("str"): version = v.tagMap[workflow] elif type(workflow) == type(1): version = workflow else: msg = "Invalid version tag or number: %s" % workflow raise VistrailsInternalError(msg) parser.closeVistrail() pip = v.getPipeline(workflow) for e in elements: pos = e.find("=") if pos != -1: key = e[:pos].strip() value = e[pos+1:].strip() if pip.hasAlias(key): ptype = pip.aliases[key][0] aliases[key] = (ptype,expression.parse_expression(value)) error = False view = DummyView() interpreter = core.interpreter.default.get_default_interpreter() result = interpreter.execute(None, pip, locator, version, view, aliases) (objs, errors, executed) = (result.objects, result.errors, result.executed) for i in objs.iterkeys(): if errors.has_key(i): error = True if error: return False else: return True
34233881c9aeb544b0138e15eccc688c61d51809 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6341/34233881c9aeb544b0138e15eccc688c61d51809/console_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 20048, 16, 6095, 16, 1472, 2218, 11, 4672, 3536, 2681, 12, 20048, 30, 776, 3337, 671, 5786, 16, 6095, 30, 509, 578, 609, 13, 317, 1250, 1939, 326, 6095, 296, 13815, 11, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 20048, 16, 6095, 16, 1472, 2218, 11, 4672, 3536, 2681, 12, 20048, 30, 776, 3337, 671, 5786, 16, 6095, 30, 509, 578, 609, 13, 317, 1250, 1939, 326, 6095, 296, 13815, 11, 316, ...
if len(h) < 4:
if len(h) < 8:
def _parseRIFFChunk(self,file): h = file.read(8) if len(h) < 4: return False name = h[:4] size = struct.unpack('<I',h[4:8])[0]
efc8bb057b332436c763be4ff242f319185f0ae4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11721/efc8bb057b332436c763be4ff242f319185f0ae4/riff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 2259, 2246, 5579, 12, 2890, 16, 768, 4672, 366, 273, 585, 18, 896, 12, 28, 13, 309, 562, 12, 76, 13, 411, 1725, 30, 327, 1083, 508, 273, 366, 10531, 24, 65, 963, 273, 19...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2670, 2259, 2246, 5579, 12, 2890, 16, 768, 4672, 366, 273, 585, 18, 896, 12, 28, 13, 309, 562, 12, 76, 13, 411, 1725, 30, 327, 1083, 508, 273, 366, 10531, 24, 65, 963, 273, 19...
else return
else: return self
def __float__(self): if len(self._varlist) != 1: raise TypeError, "Cannot coerce %s to a float" % self
679d40e26275752c3865fef86824ae38d77f645e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/679d40e26275752c3865fef86824ae38d77f645e/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5659, 972, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 1401, 1098, 13, 480, 404, 30, 1002, 3580, 16, 315, 4515, 12270, 738, 87, 358, 279, 1431, 6, 738, 365, 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, 1001, 5659, 972, 12, 2890, 4672, 309, 562, 12, 2890, 6315, 1401, 1098, 13, 480, 404, 30, 1002, 3580, 16, 315, 4515, 12270, 738, 87, 358, 279, 1431, 6, 738, 365, 2, -100, -100, -100, ...
p = xmlrpclib.ServerProxy(URL, transport=t)
p = xmlrpclib.ServerProxy(self.url, transport=t)
def test_transport(self): t = xmlrpclib.Transport() p = xmlrpclib.ServerProxy(URL, transport=t) self.assertEqual(p('transport'), t)
a44b5a332620c8fc0fcf25f81025e5f9d832a5e2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/a44b5a332620c8fc0fcf25f81025e5f9d832a5e2/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13049, 12, 2890, 4672, 268, 273, 2025, 13832, 830, 495, 18, 6568, 1435, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 16, 4736, 33, 88, 13, 365, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 13049, 12, 2890, 4672, 268, 273, 2025, 13832, 830, 495, 18, 6568, 1435, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 12, 2890, 18, 718, 16, 4736, 33, 88, 13, 365, 18, 1...
def MakeRandomPassword(length=4): password = "" while len(password) < length: password = password + GetRandomSeed() password = password[:length] return password
def mkletter(c): if 0 <= c < 26: c = c + 65 if 26 <= c < 52: c = c - 26 + 97 return c
d6898ddea948499b945c4fb27e8ce43ac90e8335 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/d6898ddea948499b945c4fb27e8ce43ac90e8335/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5028, 13449, 12, 71, 4672, 309, 374, 1648, 276, 411, 10659, 30, 276, 273, 276, 397, 15892, 309, 10659, 1648, 276, 411, 18106, 30, 276, 273, 276, 300, 10659, 397, 16340, 327, 276, 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, 5028, 13449, 12, 71, 4672, 309, 374, 1648, 276, 411, 10659, 30, 276, 273, 276, 397, 15892, 309, 10659, 1648, 276, 411, 18106, 30, 276, 273, 276, 300, 10659, 397, 16340, 327, 276, 2, -1...
for name, stepper in self.steppers.iteritems(): stepper.setDisabled()
if g.numTokens() == 0: g.setTokens(["X", "Y", "Z", "E", "H"]) for i in range(g.numTokens()): axis = g.tokenLetter(i) self.steppers[axis].setDisabled()
def _execute(self, g): if g.code() == "G1": # Move (G1 X0.1 Y40.2 F3000) if g.hasLetter("F"): # Get the feed rate self.feed_rate = float(g.getValueByLetter("F"))/60000.0 # Convert from mm/min to SI unit m/s g.removeTokenByLetter("F") smds = {} # All steppers for i in range(g.numTokens()): # Run through all tokens axis = g.tokenLetter(i) # Get the axis, X, Y, Z or E smds[axis] = float(g.tokenValue(i))/1000.0 # Get the value, new position or vector if g.hasLetter("E") and self.current_tool != "E": # We are using a different tool, switch.. smds[self.current_tool] = smds["E"] del smds["E"] path = Path(smds, self.feed_rate, self.movement, g.is_crc())# Make a path segment from the axes self.path_planner.add_path(path) # Add the path. This blocks until the path planner has capacity #logging.debug("Moving to: "+' '.join('%s:%s' % i for i in smds.iteritems())) elif g.code() == "G21": # Set units to mm self.factor = 1.0 elif g.code() == "G28": # Home the steppers if g.numTokens() == 0: # If no token is given, home all g.setTokens(["X0", "Y0", "Z0"]) smds = {} # All steppers for i in range(g.numTokens()): # Run through all tokens axis = g.tokenLetter(i) # Get the axis, X, Y, Z or E smds[axis] = float(g.tokenValue(i)) # Get tha value, new position or vector path = Path(smds, self.feed_rate, "ABSOLUTE", False) # Make a path segment from the axes #logging.debug("moving to "+str(smds)) self.path_planner.add_path(path) # Add the path. This blocks until the path planner has capacity elif g.code() == "G90": # Absolute positioning self.movement = "ABSOLUTE" elif g.code() == "G91": # Relative positioning self.movement = "RELATIVE" elif g.code() == "G92": # Set the current position of the following steppers #self.path_planner.wait_until_done() if g.numTokens() == 0: logging.debug("Adding all to G92") g.setTokens(["X0", "Y0", "Z0", "E0", "H0"]) # If no token is present, do this for all #for i in range(g.numTokens()): # axis = g.tokenLetter(i) # val = float(g.tokenValue(i)) # self.path_planner.set_pos(axis, val) pos = {} # All steppers for i in range(g.numTokens()): # Run through all tokens axis = g.tokenLetter(i) # Get the axis, X, Y, Z or E pos[axis] = float(g.tokenValue(i))/1000.0 # Get the value, new position or vector logging.debug(pos) path = Path(pos, self.feed_rate, "G92") # Make a path segment from the axes self.path_planner.add_path(path) elif g.code() == "M17": # Enable all steppers self.path_planner.wait_until_done() for name, stepper in self.steppers.iteritems(): stepper.setEnabled() Stepper.commit() elif g.code() == "M19": # Reset all steppers self.path_planner.wait_until_done() for name, stepper in self.steppers.iteritems(): stepper.reset() elif g.code() == "M30": # Set microstepping (Propietary to Replicape) for i in range(g.numTokens()): self.steppers[g.tokenLetter(i)].set_microstepping(int(g.tokenValue(i))) Stepper.commit() elif g.code() == "M31": # Set stepper current limit (Propietery to Replicape) for i in range(g.numTokens()): self.steppers[g.tokenLetter(i)].setCurrentValue(float(g.tokenValue(i))) Stepper.commit() elif g.code() == "M84": # Disable all steppers self.path_planner.wait_until_done() for name, stepper in self.steppers.iteritems(): stepper.setDisabled() Stepper.commit() elif g.code() == "M92": # M92: Set axis_steps_per_unit for i in range(g.numTokens()): # Run through all tokens axis = g.tokenLetter(i) # Get the axis, X, Y, Z or E self.steppers[axis].set_steps_pr_mm(float(g.tokenValue(i))) Stepper.commit() elif g.code() == "M101": # Deprecated pass elif g.code() == "M103": # Deprecated pass elif g.code() == "M104": # Set extruder temperature if g.hasLetter("P"): if int(g.getValueByLetter("P")) == 0: self.ext1.setTargetTemperature(float(g.getValueByLetter("S"))) elif int(g.getValueByLetter("P")) == 1: logging.debug("setting ext 2 temp to "+str(g.getValueByLetter("S"))) self.ext2.setTargetTemperature(float(g.getValueByLetter("S"))) else: logging.debug("setting ext 1 temp to "+str(g.tokenValue(0))) self.ext1.setTargetTemperature(float(g.tokenValue(0))) elif g.code() == "M105": # Get Temperature answer = "ok T:"+str(self.ext1.getTemperature()) if hasattr(self, "hbp"): answer += " B:"+str(int(self.hbp.getTemperature())) if hasattr(self, "ext2"): answer += " T1:"+str(int(self.ext2.getTemperature())) if hasattr(self, "cold_end_1"): answer += " T2:"+str(int(self.cold_end_1.getTemperature())) g.setAnswer(answer) elif g.code() == "M106": # Fan on if g.hasLetter("P"): fan = self.fans[int(g.getValueByLetter("P"))] fan.set_value(float(g.getValueByLetter("S"))/255.0) # According to reprap wiki, the number is 0..255 else: # if there is no fan-number present, do it for the first fan self.fan_1.set_value(float(g.tokenValue(0))/255.0) elif g.code() == "M107": # Fan on if g.hasLetter("P"): fan = self.fans[int(g.getValueByLetter("P"))] fan.set_value(0) # According to reprap wiki, the number is 0..255 else: # if there is no fan-number present, do it for the first fan self.fan_1.set_value(0) elif g.code() == "M108": # Deprecated pass elif g.code() == "M109": self.hbp.setTargetTemperature(float(g.getValueByLetter("S"))) elif g.code() == "M110": # Reset the line number counter Gcode.line_number = 0 elif g.code() == "M114": g.setAnswer("ok C: "+' '.join('%s:%s' % i for i in self.current_pos.iteritems())) elif g.code() == "M130": # Set PID P-value, Format (M130 P0 S8.0) pass #if int(self.tokens[0][1]) == 0: # self.ext1.setPvalue(float(self.tokens[1][1::])) elif g.code() == "M131": # Set PID I-value, Format (M131 P0 S8.0) pass #if int(self.tokens[0][1]) == 0: # self.p.ext1.setPvalue(float(self.tokens[1][1::])) elif g.code() == "M132": # Set PID D-value, Format (M132 P0 S8.0) pass #if int(self.tokens[0][1]) == 0: # self.p.ext1.setPvalue(float(self.tokens[1][1::])) elif g.code() == "M140": # Set bed temperature self.hbp.setTargetTemperature(float(g.tokenValue(0))) elif g.code() == "M141": fan = self.fans[int(g.getValueByLetter("P"))] fan.setPWMFrequency(int(g.getValueByLetter("F"))) fan.set_value(float(g.getValueByLetter("S"))) elif g.code() == "M190": self.hbp.setTargetTemperature(float(g.getValueByLetter("S"))) elif g.code() == "T0": # Select tool 0 self.current_tool = "E" elif g.code() == "T1": # select tool 1 self.current_tool = "H" elif g.message == "ok": pass else: logging.warning("Unknown command: "+g.message)
f093924dd669002b67423cde1fb1d44a08f9cd95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6605/f093924dd669002b67423cde1fb1d44a08f9cd95/Redeem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 12, 2890, 16, 314, 4672, 309, 314, 18, 710, 1435, 422, 315, 43, 21, 6877, 4766, 3639, 468, 9933, 261, 43, 21, 1139, 20, 18, 21, 1624, 7132, 18, 22, 478, 23, 3784, 13, 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, 8837, 12, 2890, 16, 314, 4672, 309, 314, 18, 710, 1435, 422, 315, 43, 21, 6877, 4766, 3639, 468, 9933, 261, 43, 21, 1139, 20, 18, 21, 1624, 7132, 18, 22, 478, 23, 3784, 13, 30...
obj = self.pool.get('ir.model.data').read(self.cr, self.uid, ir_id, ['res_id'])
obj = self.pool.get('ir.model.data').read(self.cr, self.uid, ir_id, ['res_id']) or {}
def get_id(self, xml_id): if not xml_id: raise YamlImportException("The xml_id should be a non empty string.") if isinstance(xml_id, types.IntType): id = xml_id elif xml_id in self.id_map: id = self.id_map[xml_id] else: if '.' in xml_id: module, checked_xml_id = xml_id.split('.', 1) else: module = self.module checked_xml_id = xml_id ir_id = self.pool.get('ir.model.data')._get_id(self.cr, self.uid, module, checked_xml_id) obj = self.pool.get('ir.model.data').read(self.cr, self.uid, ir_id, ['res_id']) id = int(obj['res_id']) self.id_map[xml_id] = id return id
04c05faf9b5469afdbc0d446246a39d860fc5345 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/04c05faf9b5469afdbc0d446246a39d860fc5345/yaml_import.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 16, 2025, 67, 350, 4672, 309, 486, 2025, 67, 350, 30, 1002, 13960, 5010, 503, 2932, 1986, 2025, 67, 350, 1410, 506, 279, 1661, 1008, 533, 1199, 13, 309, 1549, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 350, 12, 2890, 16, 2025, 67, 350, 4672, 309, 486, 2025, 67, 350, 30, 1002, 13960, 5010, 503, 2932, 1986, 2025, 67, 350, 1410, 506, 279, 1661, 1008, 533, 1199, 13, 309, 1549, ...
about = "Test program" title = "Test program title"
def action(self, pos=None): from wx.lib.wordwrap import wordwrap info = wx.AboutDialogInfo() info.Name = substitutes['prog'] info.Version = substitutes['version'] info.Copyright = substitutes['copyright'] info.Description = wordwrap(substitutes['description'], 350, wx.ClientDC(self.frame)) info.WebSite = (__url__, "%(prog)s home page" % substitutes) devs = [ substitutes['author'], "", "Contributions by:", ] dprint([a for a,c in credits]) devs.extend([a for a,c in credits]) devs.extend(("", "See the file THANKS for more credits")) info.Developers = devs dprint(info.Developers)
fbd23ea2f23e985faeb677f864ce15706f274987 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/fbd23ea2f23e985faeb677f864ce15706f274987/about.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 949, 33, 7036, 4672, 628, 7075, 18, 2941, 18, 1095, 4113, 1930, 2076, 4113, 225, 1123, 273, 7075, 18, 24813, 6353, 966, 1435, 1123, 18, 461, 273, 7461, 993, 3292, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 12, 2890, 16, 949, 33, 7036, 4672, 628, 7075, 18, 2941, 18, 1095, 4113, 1930, 2076, 4113, 225, 1123, 273, 7075, 18, 24813, 6353, 966, 1435, 1123, 18, 461, 273, 7461, 993, 3292, 1...
p.add_constraint( Sum( r_edge_used[(u,v)] for u in self.neighbors(v)), max = 1-epsilon)
p.add_constraint( Sum(r_edge_used[(u,v)] for u in self.neighbors(v)), max=1-epsilon)
def longest_path(self, s = None, t = None, weighted = False, algorithm = "MILP", solver = None, verbose = 0): r""" Returns a longest path of ``self``.
1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/1ce3f98f3b3a6c76baa509a4ebc0110ea7853d74/generic_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12163, 67, 803, 12, 2890, 16, 272, 273, 599, 16, 268, 273, 599, 16, 13747, 273, 1083, 16, 4886, 273, 315, 49, 2627, 52, 3113, 12776, 273, 599, 16, 3988, 273, 374, 4672, 436, 8395, 28...
For infinite periodic words (resp. for finite words of type `u^i u[0:j]`), the reduced Rauzy graph of order `n` (resp. for `n` smaller or equal to `(i-1)|u|+j`) is the directed graph whose unique vertex is the prefix `p` of length `n` of self and which has an only edge which is a loop on `p` labelled by `w[n+1:|w|] p` where `w` is the unique return word to `p`. In other cases, it is the directed graph defined as followed. Let `G_n` be the Rauzy graph of order `n` of self. The vertices are the vertices of `G_n` that are either special or not prolongable to the right of to the left. For each couple (`u`, `v`) of such vertices and each directed path in `G_n` from `u` to `v` that contains no other vertices that are special, there is an edge from `u` to `v` in the reduced Rauzy graph of order `n` whose label is the label of the path in `G_n`. NOTE: In the case of infinite recurrent non periodic words, this definition correspond to the following one that can be found in [1] and [2] where a simple path is a path that begins with a special factor, ends with a special factor and contains no other vertices that are special: The reduced Rauzy graph of factors of length `n` is obtained from `G_n` by replacing each simple path `P=v_1 v_2 ... v_{\ell}` with an edge `v_1 v_{\ell}` whose label is the concatenation of the labels of the edges of `P`. INPUT: - ``n`` - integer OUTPUT: Digraph
For infinite periodic words (resp. for finite words of type `u^i u[0:j]`), the reduced Rauzy graph of order `n` (resp. for `n` smaller or equal to `(i-1)|u|+j`) is the directed graph whose unique vertex is the prefix `p` of length `n` of self and which has an only edge which is a loop on `p` labelled by `w[n+1:|w|] p` where `w` is the unique return word to `p`. In other cases, it is the directed graph defined as followed. Let `G_n` be the Rauzy graph of order `n` of self. The vertices are the vertices of `G_n` that are either special or not prolongable to the right or to the left. For each couple (`u`, `v`) of such vertices and each directed path in `G_n` from `u` to `v` that contains no other vertices that are special, there is an edge from `u` to `v` in the reduced Rauzy graph of order `n` whose label is the label of the path in `G_n`. .. NOTE:: In the case of infinite recurrent non periodic words, this definition correspond to the following one that can be found in [1] and [2] where a simple path is a path that begins with a special factor, ends with a special factor and contains no other vertices that are special: The reduced Rauzy graph of factors of length `n` is obtained from `G_n` by replacing each simple path `P=v_1 v_2 ... v_{\ell}` with an edge `v_1 v_{\ell}` whose label is the concatenation of the labels of the edges of `P`.
def reduced_rauzy_graph(self, n): r""" Returns the reduced Rauzy graph of order `n` of self.
cb274fd835ea23e7eb945f0898a8e8ab0bca5eef /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/cb274fd835ea23e7eb945f0898a8e8ab0bca5eef/word.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13162, 67, 354, 89, 21832, 67, 4660, 12, 2890, 16, 290, 4672, 436, 8395, 2860, 326, 13162, 534, 8377, 21832, 2667, 434, 1353, 1375, 82, 68, 434, 365, 18, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13162, 67, 354, 89, 21832, 67, 4660, 12, 2890, 16, 290, 4672, 436, 8395, 2860, 326, 13162, 534, 8377, 21832, 2667, 434, 1353, 1375, 82, 68, 434, 365, 18, 2, -100, -100, -100, -100, -10...
result.addFailure(self,self.__exc_info())
result.addFailure(self,sys.exc_info())
def __call__(self, result=None): if result is None: result = self.defaultTestResult() result.startTest(self) testMethod = getattr(self, self.__testMethodName) try: try: self.setUp() except: result.addError(self,self.__exc_info()) return
4961fcb54b912c41bbc65cc24e1264e1ee517d39 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/4961fcb54b912c41bbc65cc24e1264e1ee517d39/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 563, 33, 7036, 4672, 309, 563, 353, 599, 30, 563, 273, 365, 18, 1886, 4709, 1253, 1435, 563, 18, 1937, 4709, 12, 2890, 13, 1842, 1305, 273, 3869, 12, 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, 1001, 1991, 972, 12, 2890, 16, 563, 33, 7036, 4672, 309, 563, 353, 599, 30, 563, 273, 365, 18, 1886, 4709, 1253, 1435, 563, 18, 1937, 4709, 12, 2890, 13, 1842, 1305, 273, 3869, 12, 2...
print "usage:", sys.argv[0], "file ..."
print "usage:", sys.argv[0], "[-t tabwidth] file ..."
def main(): tabsize = 8 try: opts, args = getopt.getopt(sys.argv[1:], "t:") if not args: raise getopt.error, "At least one file argument required" except getopt.error, msg: print msg print "usage:", sys.argv[0], "file ..." return for file in args: process(file, tabsize)
6ad57e179390a3aef9909c5a8753284a0d84ad24 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/6ad57e179390a3aef9909c5a8753284a0d84ad24/untabify.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3246, 1467, 273, 1725, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 88, 2773, 13, 309, 486, 833, 30, 1002, 336, 383...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3246, 1467, 273, 1725, 775, 30, 1500, 16, 833, 273, 336, 3838, 18, 588, 3838, 12, 9499, 18, 19485, 63, 21, 30, 6487, 315, 88, 2773, 13, 309, 486, 833, 30, 1002, 336, 383...
function draw_pie(){
function draw_pie() {
def getReport(self, request, reportId): """ Generates a report. @param reportId report Id as returned by the reports() function """ post = request.POST
ce21b020d55e67fbb0fb394b2ff46cd12de7201d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/ce21b020d55e67fbb0fb394b2ff46cd12de7201d/qualityfitsin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22452, 12, 2890, 16, 590, 16, 2605, 548, 4672, 3536, 31902, 279, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 487, 2106, 635, 326, 10557, 1435, 445, 3536, 1603, 273, 590, 18, 3798, 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, 22452, 12, 2890, 16, 590, 16, 2605, 548, 4672, 3536, 31902, 279, 2605, 18, 632, 891, 2605, 548, 2605, 3124, 487, 2106, 635, 326, 10557, 1435, 445, 3536, 1603, 273, 590, 18, 3798, 2, -1...
logging.debug("(%s) Gameserver did not respond!" % self.host)
logging.debug("%s did not respond!" % self.host)
def check(self): # Check we can connect to the host s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: logging.debug("(%s) Checking gameserver's vitality..." % self.host) s.settimeout(10.0) s.connect((self.host, gamePort)) s.close() return True except: logging.debug("(%s) Gameserver did not respond!" % self.host) return False
7a688bdf45f8f156c52ea7e98fb761b56b80bba1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13981/7a688bdf45f8f156c52ea7e98fb761b56b80bba1/wzmasterserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 2890, 4672, 468, 2073, 732, 848, 3077, 358, 326, 1479, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 775, 30, 2907, 18, 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, 866, 12, 2890, 4672, 468, 2073, 732, 848, 3077, 358, 326, 1479, 272, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 775, 30, 2907, 18, 4...
self.package_mirror_status_file = self.cp.getint("main", 'package_mirror_status_file')
self.package_mirror_status_file = self.cp.get("main", 'package_mirror_status_file')
def setup(self, config_file): # Load configuration file if sys.platform != "win32": self.cp = MMCConfigParser() else: self.cp = ConfigParser.ConfigParser() self.cp.read(config_file)
29039a875cc510980725c72c51e0fdf309ce9920 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5988/29039a875cc510980725c72c51e0fdf309ce9920/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 642, 67, 768, 4672, 468, 4444, 1664, 585, 309, 2589, 18, 9898, 480, 315, 8082, 1578, 6877, 365, 18, 4057, 273, 18295, 39, 809, 2678, 1435, 469, 30, 365, 18, 4057, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 12, 2890, 16, 642, 67, 768, 4672, 468, 4444, 1664, 585, 309, 2589, 18, 9898, 480, 315, 8082, 1578, 6877, 365, 18, 4057, 273, 18295, 39, 809, 2678, 1435, 469, 30, 365, 18, 4057, ...
if oRequest.isSubRequestEmpty(ind,'integrity')['Value']: oRequest.setSubRequestStatus(ind,'integrity','Done')
if oRequest.isSubRequestEmpty( ind, 'integrity' )['Value']: oRequest.setSubRequestStatus( ind, 'integrity', 'Done' )
def execute(self):
00d8a55a0d409a04efa1a3f677ff9c2bc47dd619 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/00d8a55a0d409a04efa1a3f677ff9c2bc47dd619/SEvsLFCAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 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, 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, 1836, 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, -100, -100, -...
action = fti.getActionInfo(actionId)['url'].split('/')[-1]
action = fti.getActionInfo(actionId, object=context)['url'].split('/')[-1]
def _lookupTypeActionTemplate(self, actionId): context = aq_inner(self.context) fti = context.getTypeInfo() try: # XXX: This isn't quite right since it assumes the action starts with ${object_url} action = fti.getActionInfo(actionId)['url'].split('/')[-1] except ValueError: # If the action doesn't exist, stop return None
3a9260de97328832b11fb83aece20e3eac528e4b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12185/3a9260de97328832b11fb83aece20e3eac528e4b/context.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8664, 559, 1803, 2283, 12, 2890, 16, 1301, 548, 4672, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 284, 9096, 273, 819, 18, 588, 17305, 1435, 775, 30, 468, 11329, 30, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8664, 559, 1803, 2283, 12, 2890, 16, 1301, 548, 4672, 819, 273, 279, 85, 67, 7872, 12, 2890, 18, 2472, 13, 284, 9096, 273, 819, 18, 588, 17305, 1435, 775, 30, 468, 11329, 30, 12...
current_pos = m.end()
current_pos += m.end()
def configure_mozilla(config_location): """Configure Mozilla to use the SpamBayes POP3 and SMTP proxies, and configure SpamBayes to proxy the servers that Mozilla was connecting to.""" prefs_file = file("%s%sprefs.js" % (config_location, os.sep), "r") prefs = prefs_file.read() prefs_file.close() save_prefs = prefs pop_accounts = {} smtp_accounts = {} r = re.compile(r"user_pref\(\"mail.server.server(\d+).(real)?hostname\", \"([^\"]*)\"\);") current_pos = 0 results = [] while True: m = r.search(prefs[current_pos:]) if not m: break server_num = m.group(1) real = m.group(2) or '' server = m.group(3) current_pos += m.end() old_pref = 'user_pref("mail.server.server%s.%shostname", "%s");' % \ (server_num, real, server) # Find the port, if there is one port_string = 'user_pref("mail.server.server%s.port", ' % \ (server_num,) port_loc = prefs.find(port_string) if port_loc == -1: port = "110" old_port = None else: loc_plus_len = port_loc + len(port_string) end_of_number = loc_plus_len + prefs[loc_plus_len:].index(')') port = prefs[loc_plus_len : end_of_number] old_port = "%s%s);" % (port_string, port) # Find the type of connection type_string = 'user_pref("mail.server.server%s.type", "' % \ (server_num,) type_loc = prefs.find(type_string) if type_loc == -1: # no type, so ignore this one continue type_loc += len(type_string) account_type = prefs[type_loc : \ type_loc + prefs[type_loc:].index('"')] if account_type == "pop3": new_pref = 'user_pref("mail.server.server%s.%shostname", ' \ '"127.0.0.1");' % (server_num, real) if not pop_accounts.has_key(server_num) or real: pop_accounts[server_num] = (new_pref, old_pref, old_port, server, port) elif account_type == "imap": # Setup imapfilter instead pass proxy_port = pop_proxy_port for num, (pref, old_pref, old_port, server, port) in pop_accounts.items(): server = "%s:%s" % (server, port) proxy_port = move_to_next_free_port(proxy_port) port_pref = 'user_pref("mail.server.server%s.port", %s);' % \ (num, proxy_port) options["pop3proxy", "remote_servers"] += (server,) options["pop3proxy", "listen_ports"] += (proxy_port,) if old_port is None: pref = "%s\n%s" % (pref, port_pref) else: save_prefs = save_prefs.replace(old_port, port_pref) save_prefs = save_prefs.replace(old_pref, pref) results.append("[%s] Proxy %s on localhost:%s" % \ (num, server, proxy_port)) # Do the SMTP server. # Mozilla recommends that only advanced users setup more than one, # so we'll just set that one up. Advanced users can setup SpamBayes # themselves <wink>. prefs = save_prefs r = re.compile(r"user_pref\(\"mail.smtpserver.smtp(\d+).hostname\", \"([^\"]*)\"\);") current_pos = 0 while True: m = r.search(prefs[current_pos:]) if not m: break current_pos = m.end() server_num = m.group(1) server = m.group(2) old_pref = 'user_pref("mail.smtpserver.smtp%s.hostname", ' \ '"%s");' % (server_num, server) new_pref = 'user_pref("mail.smtpserver.smtp%s.hostname", ' \ '"127.0.0.1");' % (server_num,) # Find the port port_string = 'user_pref("mail.smtpserver.smtp1.port", ' port_loc = prefs.find(port_string) if port_loc == -1: port = "25" old_port = None else: loc_plus_len = port_loc + len(port_string) end_of_number = loc_plus_len + prefs[loc_plus_len:].index(')') port = prefs[loc_plus_len : end_of_number] old_port = 'user_pref("mail.smtpserver.smtp%s.port", %s);' % \ (server_num, port) smtp_accounts[server_num] = (new_pref, old_pref, old_port, server, port) proxy_port = smtp_proxy_port for num, (pref, old_pref, old_port, server, port) in smtp_accounts.items(): server = "%s:%s" % (server, port) proxy_port = move_to_next_free_port(proxy_port) port_pref = 'user_pref("mail.smtpserver.smtp%s.port", %s);' % \ (num, proxy_port) options["smtpproxy", "remote_servers"] += (server,) options["smtpproxy", "listen_ports"] += (proxy_port,) if old_port is None: pref = "%s\n%s" % (pref, port_pref) else: save_prefs = save_prefs.replace(old_port, port_pref) save_prefs = save_prefs.replace(old_pref, pref) results.append("[%s] Proxy %s on localhost:%s" % \ (num, server, proxy_port)) prefs_file = file("%s%sprefs.js" % (config_location, os.sep), "w") prefs_file.write(save_prefs) prefs_file.close() options.update_file(optionsPathname) # Setup filtering rules. # Assumes that the folders already exist! I don't know how difficult # it would be to create new Mozilla mail folders. filter_filename = "%s%smsgFilterRules.dat" % (config_location, os.sep) store_name = "" # how do we get this? spam_folder_url = "mailbox:////%s//Junk%20Mail" % (store_name,) unsure_folder_url = "mailbox:////%s//Possible%20Junk" % (store_name,) header_name = options["Headers", "classification_header_name"] spam_tag = options["Headers", "header_spam_string"] unsure_tag = options["Headers", "header_unsure_string"] rule = 'name="SpamBayes-Spam"\n' \ 'enabled="yes"\n' \ 'type="1"\n' \ 'action="Move to folder"\n' \ 'actionValue="%s"\n' \ 'condition="OR (\"%s\",contains,%s)"\n' \ 'name="SpamBayes-Unsure"\n' \ 'enabled="yes"\n' \ 'type="1"\n' \ 'action="Move to folder"\n' \ 'actionValue="%s"\n' \ 'condition="OR (\"%s\",contains,%s)"\n' % \ (spam_folder_url, header_name, spam_tag, unsure_folder_url, header_name, unsure_tag) # This should now be written to the file, but I'm not sure how we # determine which subdirectory it goes into - does it have to go # into them all? # We are assuming that a rules file already exists, otherwise there # is a bit more to go at the top. return results
30f1d6854fee0d525078ec8c7c26a93e7cef1e3b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/30f1d6854fee0d525078ec8c7c26a93e7cef1e3b/autoconfigure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 8683, 15990, 12, 1425, 67, 3562, 4672, 3536, 11207, 19058, 10745, 358, 999, 326, 5878, 301, 38, 528, 281, 26839, 23, 471, 18102, 13263, 16, 471, 5068, 5878, 301, 38, 528, 281, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5068, 67, 8683, 15990, 12, 1425, 67, 3562, 4672, 3536, 11207, 19058, 10745, 358, 999, 326, 5878, 301, 38, 528, 281, 26839, 23, 471, 18102, 13263, 16, 471, 5068, 5878, 301, 38, 528, 281, ...
def URLPath(request): from twisted.python import urlpath return urlpath.URLPath.fromString(prePathURL(request))
def ResourceTemplate(path, registry): from quixote import ptl_compile
def URLPath(request): from twisted.python import urlpath return urlpath.URLPath.fromString(prePathURL(request))
a6f9b1004d2fe42a11a3c1e0fb62efa3b08afccc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a6f9b1004d2fe42a11a3c1e0fb62efa3b08afccc/requtil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2591, 2283, 12, 803, 16, 4023, 4672, 628, 719, 697, 1168, 1930, 5818, 80, 67, 11100, 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, 2591, 2283, 12, 803, 16, 4023, 4672, 628, 719, 697, 1168, 1930, 5818, 80, 67, 11100, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.devclass_widgets = gtk.glade.XML('bluetool-gui.glade', 'bt_devclass_panel')
self.devclass_widgets = gtk.glade.XML('bluetool_gui.glade', 'bt_devclass_panel')
def __init__(self):
bced10be3e728c7e32309f3ce16cf534869135ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2587/bced10be3e728c7e32309f3ce16cf534869135ca/bluetool_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 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, 1001, 2738, 972, 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, -1...
"""getSeparator(self) -> string"""
"""getSeparator() -> string"""
def getSeparator(*args): """getSeparator(self) -> string""" return _moose.PyMooseBase_getSeparator(*args)
48650eb25e1a74cd9d55a697293b2e4f62133018 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2961/48650eb25e1a74cd9d55a697293b2e4f62133018/moose.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1322, 881, 5880, 30857, 1968, 4672, 3536, 588, 6581, 1435, 317, 533, 8395, 327, 389, 8683, 2584, 18, 9413, 16727, 2584, 2171, 67, 588, 6581, 30857, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1322, 881, 5880, 30857, 1968, 4672, 3536, 588, 6581, 1435, 317, 533, 8395, 327, 389, 8683, 2584, 18, 9413, 16727, 2584, 2171, 67, 588, 6581, 30857, 1968, 13, 2, -100, -100, -100, -100, -...
if '>><<' in line.replace(' ', ''): self.no_862 = True
def format(self, formatter, inhibit_p=False): """ For each line, scan through looking for magic strings, outputting verbatim any intervening text. """ self.formatter = formatter self.hilite_re = self.formatter.page.hilite_re
099b5af37aecdee05032e3a30b1b70efa5ff5eb2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/099b5af37aecdee05032e3a30b1b70efa5ff5eb2/text_moin_wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 12, 2890, 16, 4453, 16, 316, 31597, 67, 84, 33, 8381, 4672, 3536, 2457, 1517, 980, 16, 4135, 3059, 7849, 364, 8146, 2064, 16, 876, 1787, 29526, 1281, 1554, 3995, 310, 977, 18, 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, 740, 12, 2890, 16, 4453, 16, 316, 31597, 67, 84, 33, 8381, 4672, 3536, 2457, 1517, 980, 16, 4135, 3059, 7849, 364, 8146, 2064, 16, 876, 1787, 29526, 1281, 1554, 3995, 310, 977, 18, 353...
keys = self.aliases.keys() keys.sort()
keys = sorted(self.aliases.keys())
def do_alias(self, arg): args = arg.split() if len(args) == 0: keys = self.aliases.keys() keys.sort() for alias in keys: print("%s = %s" % (alias, self.aliases[alias]), file=self.stdout) return if args[0] in self.aliases and len(args) == 1: print("%s = %s" % (args[0], self.aliases[args[0]]), file=self.stdout) else: self.aliases[args[0]] = ' '.join(args[1:])
8cd1980d8013c867c3c7cfc0094749ac47901763 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/8cd1980d8013c867c3c7cfc0094749ac47901763/pdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4930, 12, 2890, 16, 1501, 4672, 833, 273, 1501, 18, 4939, 1435, 309, 562, 12, 1968, 13, 422, 374, 30, 1311, 273, 3115, 12, 2890, 18, 13831, 18, 2452, 10756, 364, 2308, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4930, 12, 2890, 16, 1501, 4672, 833, 273, 1501, 18, 4939, 1435, 309, 562, 12, 1968, 13, 422, 374, 30, 1311, 273, 3115, 12, 2890, 18, 13831, 18, 2452, 10756, 364, 2308, 316, ...
import tempfile module = _normalize_module(module) testsrc = testsource(module, name)
def debug(module, name): """Debug a single docstring containing doctests. Provide the module (or dotted name of the module) containing the docstring to be debugged, and the name (within the module) of the object with the docstring to be debugged. The doctest examples are extracted (see function testsource()), and written to a temp file. The Python debugger (pdb) is then invoked on that file. """ import os import pdb import tempfile module = _normalize_module(module) testsrc = testsource(module, name) srcfilename = tempfile.mktemp("doctestdebug.py") f = file(srcfilename, 'w') f.write(testsrc) f.close() globs = {} globs.update(module.__dict__) try: # Note that %r is vital here. '%s' instead can, e.g., cause # backslashes to get treated as metacharacters on Windows. pdb.run("execfile(%r)" % srcfilename, globs, globs) finally: os.remove(srcfilename)
a6afa35755a4baa401905be750203fee48f42bb3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/a6afa35755a4baa401905be750203fee48f42bb3/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2978, 16, 508, 4672, 3536, 2829, 279, 2202, 14525, 4191, 31263, 25563, 18, 225, 26569, 326, 1605, 261, 280, 20965, 508, 434, 326, 1605, 13, 4191, 326, 14525, 358, 506, 1198, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 12, 2978, 16, 508, 4672, 3536, 2829, 279, 2202, 14525, 4191, 31263, 25563, 18, 225, 26569, 326, 1605, 261, 280, 20965, 508, 434, 326, 1605, 13, 4191, 326, 14525, 358, 506, 1198, 24...
ddate_col.set_attributes(render_text, markup=self.CTASKS_MODEL_DDATE_STR)
ddate_col.set_attributes( render_text, markup=self.CTASKS_MODEL_DDATE_STR)
def __create_closed_tasks_tview(self):
fac54dcba973acc5967f43b60fb540659a1a87a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/fac54dcba973acc5967f43b60fb540659a1a87a8/browser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2640, 67, 12204, 67, 9416, 67, 88, 1945, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
image = self.info if attr == 'geometry': print "geometry=%sx%s" % (image.width, image.height) return '%sx%s' % (image.width, image.height)
t = str(Item.__getitem__(self, key)) if t: return time.strftime(config.TV_DATETIMEFORMAT, time.strptime(t, '%Y:%m:%d %H:%M:%S'))
def __getitem__(self, key): """ return the specific attribute as string or an empty string """ if key in [ "geometry" ]: try: image = self.info if attr == 'geometry': print "geometry=%sx%s" % (image.width, image.height) return '%sx%s' % (image.width, image.height) except: pass return Item.__getitem__(self, key)
6a33cae152d46adac0d7b0594609ab9ecf67fddd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/6a33cae152d46adac0d7b0594609ab9ecf67fddd/imageitem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 3536, 327, 326, 2923, 1566, 487, 533, 578, 392, 1008, 533, 3536, 309, 498, 316, 306, 315, 14330, 6, 308, 30, 775, 30, 268, 273, 609, 12, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 31571, 972, 12, 2890, 16, 498, 4672, 3536, 327, 326, 2923, 1566, 487, 533, 578, 392, 1008, 533, 3536, 309, 498, 316, 306, 315, 14330, 6, 308, 30, 775, 30, 268, 273, 609, 12, 11...
str += self._func_summary(doc.methods(),
str += self._func_summary(doc.methods(), doc.sort_order(),
def _class_to_html(self, uid): 'Return an HTML page for a Class' doc = self._docmap[uid] modname = doc.uid().module().name() descr = doc.descr() # Name & summary str = self._header(`uid`) str += self._navbar('class', uid) if self._show_both: str += self._public_private_link(uid) str += self._start_of('Class Description') str += '<h2><font size="-1">\n'+modname+'</font><br>\n' str += 'Class ' + `uid`+'</h2>\n\n' if doc.bases(): str += '<pre class="base-tree">\n' str += self._base_tree(uid) str += '</pre><br>\n\n' children = doc.children() if children: str += '<dl><dt><b>Known Subclasses:</b></dt>\n<dd>' for cls in children: str += ' '+self._link_to_href(cls) + ',\n' str = str[:-2] + '</dd></dl>\n\n' if descr: str += '<hr/>\n' + self._descr(descr) str += '\n\n' str += '<hr/>\n\n'
29127a15ecd548178da747376d81226f0a835ef6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/29127a15ecd548178da747376d81226f0a835ef6/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1106, 67, 869, 67, 2620, 12, 2890, 16, 4555, 4672, 296, 990, 392, 3982, 1363, 364, 279, 1659, 11, 997, 273, 365, 6315, 2434, 1458, 63, 1911, 65, 16037, 273, 997, 18, 1911, 7675, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1106, 67, 869, 67, 2620, 12, 2890, 16, 4555, 4672, 296, 990, 392, 3982, 1363, 364, 279, 1659, 11, 997, 273, 365, 6315, 2434, 1458, 63, 1911, 65, 16037, 273, 997, 18, 1911, 7675, ...
generateRandom(randomLog))
generateRandom(randomLog), rev)
def randomCommit(): """Create a random commit message""" return """ <message> <generator><name>torture_stats.py</name></generator> <source><project>%s</project></source> <body> <commit> <author>%s</author> <log>%s</log> </commit> </body> </message> """ % (generateRandom(randomProject), generateRandom(randomAuthor), generateRandom(randomLog))
d0ac1c2d2a3f14e3f1f3b6256e4b4de7af15ee27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9478/d0ac1c2d2a3f14e3f1f3b6256e4b4de7af15ee27/torture_stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2744, 5580, 13332, 3536, 1684, 279, 2744, 3294, 883, 8395, 327, 3536, 411, 2150, 34, 411, 8812, 4438, 529, 34, 88, 499, 594, 67, 5296, 18, 2074, 1757, 529, 4695, 8812, 34, 411, 3168, 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, 2744, 5580, 13332, 3536, 1684, 279, 2744, 3294, 883, 8395, 327, 3536, 411, 2150, 34, 411, 8812, 4438, 529, 34, 88, 499, 594, 67, 5296, 18, 2074, 1757, 529, 4695, 8812, 34, 411, 3168, 4...
sage: a = sloane.A000255; a
sage: a = sloane.A000255;a
def list(self, n): self._eval(n) # force computation return self._b[:n]
17696bad4576e0d4a9f73f71f06b50e19587f0be /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/17696bad4576e0d4a9f73f71f06b50e19587f0be/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 12, 2890, 16, 290, 4672, 365, 6315, 8622, 12, 82, 13, 282, 468, 2944, 16039, 327, 365, 6315, 70, 10531, 82, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if _debug: print "\t%s: Called Plane.mapImageToPlane()" % rendererName
debugMsg("Called Plane.mapImageToPlane()")
def mapImageToPlane(self,image): """ Maps an Image object onto a Plane object """ if _debug: print "\t%s: Called Plane.mapImageToPlane()" % rendererName
431189e7e535c0ce614e7ffbef2068439f08912a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/431189e7e535c0ce614e7ffbef2068439f08912a/plane.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 2730, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 3008, 8806, 18, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 852, 2040, 774, 19505, 12, 2890, 16, 2730, 4672, 3536, 19837, 392, 3421, 733, 10170, 279, 3008, 8806, 733, 3536, 309, 389, 4148, 30, 1172, 1548, 88, 9, 87, 30, 11782, 3008, 8806, 18, 1...
m.gn = Method([], m.random.normal((2,2))) made = m.make() made.random.initialize() fn_val0 = made.fn() fn_val1 = made.fn() gn_val0 = made.gn() rng_seed = numpy.random.RandomState(234).randint(2**30) rng = numpy.random.RandomState(int(rng_seed))
made = m.make() made.random.initialize(seed=utt.fetch_seed()) fn_val0 = made.fn() fn_val1 = made.fn() rng_seed = numpy.random.RandomState(utt.fetch_seed()).randint(2**30) rng = numpy.random.RandomState(int(rng_seed))
def test_basics(self): m = Module() m.random = RandomStreams(234) m.fn = Method([], m.random.uniform((2,2))) m.gn = Method([], m.random.normal((2,2))) made = m.make() made.random.initialize()
b90ec1d2718d658a78f6697ba4a7a2577c493f3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/b90ec1d2718d658a78f6697ba4a7a2577c493f3e/test_randomstreams.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9157, 2102, 12, 2890, 4672, 312, 273, 5924, 1435, 312, 18, 9188, 273, 8072, 10301, 12, 17959, 13, 312, 18, 4293, 273, 2985, 3816, 6487, 312, 18, 9188, 18, 24120, 12443, 22, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9157, 2102, 12, 2890, 4672, 312, 273, 5924, 1435, 312, 18, 9188, 273, 8072, 10301, 12, 17959, 13, 312, 18, 4293, 273, 2985, 3816, 6487, 312, 18, 9188, 18, 24120, 12443, 22, 1...
res=atcc_t_menu(test_type = 'tests')
res=atcc_t_menu(test_type = 'tests', t = 'Tests selection menu')
def main(): while 1: res=int(atcc_main_menu()) if res == 1: res=atcc_t_menu(test_type = 'tests') atcc_t_run(res, test_type = 'tests') elif res == 2: res=atcc_t_menu(test_type = 'profilers') atcc_t_run(res, test_type = 'profilers') elif res == 3: atcc_tests_results() elif res == 4: atcc_configure(test_type = 'tests') elif res == 0: sys.exit(1)
82ae57ec577b4ac80c359f383f7ee878a849f40e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/82ae57ec577b4ac80c359f383f7ee878a849f40e/menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1323, 404, 30, 400, 33, 474, 12, 270, 952, 67, 5254, 67, 5414, 10756, 309, 400, 422, 404, 30, 400, 33, 270, 952, 67, 88, 67, 5414, 12, 3813, 67, 723, 273, 296, 16341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1323, 404, 30, 400, 33, 474, 12, 270, 952, 67, 5254, 67, 5414, 10756, 309, 400, 422, 404, 30, 400, 33, 270, 952, 67, 88, 67, 5414, 12, 3813, 67, 723, 273, 296, 16341, ...
if jobID > 0: result = jobDB.setJobStatus(jobID,status='Matched',minor='Assigned') result = jobLoggingDB.addLoggingRecord(jobID, status='Matched', minor='Assigned', source='Matcher') result = jobDB.getJobJDL(jobID) if not result['OK']: return S_ERROR('Failed to get the job JDL') else:
if jobID == 0:
def selectJob(self, resourceJDL): """ Main job selection function to find the highest priority job matching the resource capacity """
74269a00ba9c0d024d2d7f687918a33012e56f91 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/74269a00ba9c0d024d2d7f687918a33012e56f91/MatcherHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2027, 2278, 12, 2890, 16, 1058, 46, 8914, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 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, 0, 0, 0, 0, 0, 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, 2027, 2278, 12, 2890, 16, 1058, 46, 8914, 4672, 3536, 12740, 1719, 4421, 445, 358, 1104, 326, 9742, 4394, 1719, 3607, 326, 1058, 7519, 3536, 2, -100, -100, -100, -100, -100, -100, -100, ...
raise self.failureException, (msg or '%s == %s' % (first, second))
raise self.failureException, \ (msg or '%s == %s' % (`first`, `second`))
def failIfEqual(self, first, second, msg=None): """Fail if the two objects are equal as determined by the '==' operator. """ if first == second: raise self.failureException, (msg or '%s == %s' % (first, second))
cf8e2d1d34b67b8c9b879e9b1a2cceb805236e1c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cf8e2d1d34b67b8c9b879e9b1a2cceb805236e1c/unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 326, 22853, 3726, 18, 3536, 309, 1122, 422, 2205, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 2047, 5812, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 3754, 309, 326, 2795, 2184, 854, 3959, 487, 11383, 635, 326, 22853, 3726, 18, 3536, 309, 1122, 422, 2205, ...