rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
ddict[(low, high)] = (ctype, proto_str, level)
ddict[(low, high, proto_str)] = (ctype, level)
def get_all(self, locallist = 0): ddict = {} if locallist: (rc, self.plist) = semanage_port_list_local(self.sh) else: (rc, self.plist) = semanage_port_list(self.sh) if rc < 0: raise ValueError(_("Could not list ports"))
1f60e9b7a3efb70a3128a467188702d6915bd9f6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7147/1f60e9b7a3efb70a3128a467188702d6915bd9f6/seobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 12, 2890, 16, 1515, 454, 376, 273, 374, 4672, 302, 1576, 273, 2618, 309, 1515, 454, 376, 30, 261, 1310, 16, 365, 18, 17842, 13, 273, 6111, 304, 410, 67, 655, 67, 1098, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 454, 12, 2890, 16, 1515, 454, 376, 273, 374, 4672, 302, 1576, 273, 2618, 309, 1515, 454, 376, 30, 261, 1310, 16, 365, 18, 17842, 13, 273, 6111, 304, 410, 67, 655, 67, 1098, ...
replace = rec.hasAttribute('replace') and rec.getAttribute('replace')
replace = rec.hasAttribute('replace') and rec.getAttribute('replace') or True
def ref(str_id): return self.id_get(cr, None, str_id)
08b662555dc1996415b4f7726ab1cdeef0ad04c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7397/08b662555dc1996415b4f7726ab1cdeef0ad04c9/convert.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 12, 701, 67, 350, 4672, 327, 365, 18, 350, 67, 588, 12, 3353, 16, 599, 16, 609, 67, 350, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1278, 12, 701, 67, 350, 4672, 327, 365, 18, 350, 67, 588, 12, 3353, 16, 599, 16, 609, 67, 350, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
import appuifw
def __init__(self, bt_address = None): print "in __init__" try: if(bt_address == None): self.address,self.services=socket.bt_discover() else: self.address,self.services=socket.bt_discover(bt_address) print "Discovery successful" print self.address print self.services except: import traceback import appuifw traceback.print_exc() appuifw.query(unicode("Error in bluetooth connection, is the service running"), 'query') appuifw.app.body.text((40, 90), unicode("Please restart!")) lock = e32.Ao_lock() lock.wait() self.data = "" self.sock=0 self.lock=0 self.audio=0 pykeygrab.init() if len(self.services)>1: import appuifw choices=self.services.keys() choices.sort() choice=appuifw.popup_menu([unicode(self.services[x])+": "+x for x in choices],u'Choose port:') self.target=(self.address,self.services[choices[choice]]) else: self.target=(self.address,self.services.values()[0]) self.key_capturer = keycapture.KeyCapturer(self.key_callback) self.key_capturer.keys = keycapture.all_keys
435bc094b33608ee5d7f6b66721af0d38228eb4f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2202/435bc094b33608ee5d7f6b66721af0d38228eb4f/istuff_mobile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10921, 67, 2867, 273, 599, 4672, 1172, 315, 267, 1001, 2738, 14437, 775, 30, 309, 12, 23602, 67, 2867, 422, 599, 4672, 365, 18, 2867, 16, 2890, 18, 8387,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10921, 67, 2867, 273, 599, 4672, 1172, 315, 267, 1001, 2738, 14437, 775, 30, 309, 12, 23602, 67, 2867, 422, 599, 4672, 365, 18, 2867, 16, 2890, 18, 8387,...
self.feeds.append(CantoFeed(self.shelf, section, URL, rate, keep))
self.feeds.append(CantoFeed(self.shelf, name, URL, rate, keep))
def parse_feed(self, section): log.debug("Found feed: %s" % section) try: URL = self.get("", section, "URL", "", 1) except: log.info("ERROR: Missing URL for feed %s" % section) return
ebd32b858c287344c0216a2e6aba5eceabfbedcb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12359/ebd32b858c287344c0216a2e6aba5eceabfbedcb/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 7848, 12, 2890, 16, 2442, 4672, 613, 18, 4148, 2932, 2043, 4746, 30, 738, 87, 6, 738, 2442, 13, 775, 30, 1976, 273, 365, 18, 588, 2932, 3113, 2442, 16, 315, 1785, 3113, 234...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7848, 12, 2890, 16, 2442, 4672, 613, 18, 4148, 2932, 2043, 4746, 30, 738, 87, 6, 738, 2442, 13, 775, 30, 1976, 273, 365, 18, 588, 2932, 3113, 2442, 16, 315, 1785, 3113, 234...
'actions': req.perm.permissions(),
'actions': perm.get_actions(),
def render_admin_panel(self, req, cat, page, path_info): perm = PermissionSystem(self.env) all_permissions = perm.get_all_permissions()
5707ab6dcef01ac9ff366d0d7fe97d96af09ebfb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9317/5707ab6dcef01ac9ff366d0d7fe97d96af09ebfb/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 4641, 273, 8509, 3163, 12, 2890, 18, 3074, 13, 777, 67, 9612, 273, 4641, 18, 588, 67, 454,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 3666, 67, 13916, 12, 2890, 16, 1111, 16, 6573, 16, 1363, 16, 589, 67, 1376, 4672, 4641, 273, 8509, 3163, 12, 2890, 18, 3074, 13, 777, 67, 9612, 273, 4641, 18, 588, 67, 454,...
dev.children = [] cfg.Update(instance)
def _ExecD8DiskOnly(self, feedback_fn): """Replace a disk on the primary or secondary for dbrd8.
cff90b79a6d0d95a4694e8c3f4b9fe35f6e54506 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7542/cff90b79a6d0d95a4694e8c3f4b9fe35f6e54506/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 6247, 3386, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 279, 4234, 603, 326, 3354, 578, 9946, 364, 1319, 13623, 28, 18, 2, -100, -100, -100, -100, -100, -100, -...
if reponame in filters or repositories == ['']:
if default_is_alone or (reponame or '(default)') in filters:
def generate_changesets(reponame, repos): repos_resource = Resource('repository', reponame) for _, changesets in groupby(repos.get_changesets(start, stop), key=collapse_changesets): viewable_changesets = [] for cset in changesets: cset_resource = Resource('changeset', cset.rev, parent=repos_resource) if 'CHANGESET_VIEW' in req.perm(cset_resource): repos_for_uid = [reponame] uid = repos.get_changeset_uid(cset.rev) if uid: # uid can be seen in multiple repositories if uid in uids_seen: uids_seen[uid].append(reponame) continue # already viewable, simply append uids_seen[uid] = repos_for_uid viewable_changesets.append((cset, cset_resource, repos_for_uid)) if viewable_changesets: cset = viewable_changesets[-1][0] yield ('changeset', cset.date, cset.author, (viewable_changesets, show_location, show_files))
7c5d87c92d21dd32544eb111409a21d9ca741686 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9317/7c5d87c92d21dd32544eb111409a21d9ca741686/changeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 6329, 2413, 12, 266, 500, 339, 16, 13686, 4672, 13686, 67, 3146, 273, 2591, 2668, 9071, 2187, 283, 500, 339, 13, 364, 389, 16, 3478, 2413, 316, 13126, 12, 15564, 18, 588, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 67, 6329, 2413, 12, 266, 500, 339, 16, 13686, 4672, 13686, 67, 3146, 273, 2591, 2668, 9071, 2187, 283, 500, 339, 13, 364, 389, 16, 3478, 2413, 316, 13126, 12, 15564, 18, 588, 67,...
self.CheckGroups( [ name ], batch = True)
self.CheckGroups( [ name ], batch=True)
def SetSharedDirPermissiveness(self, name = None, permissive = True): """ Set permissive or not permissive the shared directory of the group 'name'. """ if name is None: raise exceptions.BadArgumentError, "You must specify a group name."
f37209229adf6c038cbf9bb8cdfd028d8ffe04c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7650/f37209229adf6c038cbf9bb8cdfd028d8ffe04c2/groups.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1000, 7887, 1621, 52, 1840, 31051, 12, 2890, 16, 508, 273, 599, 16, 293, 1840, 688, 273, 1053, 4672, 3536, 1000, 293, 1840, 688, 578, 486, 293, 1840, 688, 326, 5116, 1867, 434, 326, 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, 1000, 7887, 1621, 52, 1840, 31051, 12, 2890, 16, 508, 273, 599, 16, 293, 1840, 688, 273, 1053, 4672, 3536, 1000, 293, 1840, 688, 578, 486, 293, 1840, 688, 326, 5116, 1867, 434, 326, 10...
RETURN_PDS = markup.parse('Returns', markup='epytext')
RETURN_PDS = markup.parse('Returns:', markup='epytext')
def report_errors(api_doc, docindex, parse_errors, field_warnings): """A helper function for L{parse_docstring()} that reports any markup warnings and field warnings that we encountered while processing C{api_doc}'s docstring.""" if not parse_errors and not field_warnings: return # Get the name of the item containing the error, and the # filename of its containing module. name = api_doc.canonical_name module = api_doc.defining_module if module is not UNKNOWN and module.filename not in (None, UNKNOWN): try: filename = py_src_filename(module.filename) except: filename = module.filename else: filename = '??' # [xx] Don't report markup errors for standard builtins. if (isinstance(api_doc, ValueDoc) and api_doc != module and (api_doc.pyval in __builtin__.__dict__.values() or (module not in (None, UNKNOWN) and module.pyval in (__builtin__, exceptions)))): return # Get the start line of the docstring containing the error. startline = api_doc.docstring_lineno if startline in (None, UNKNOWN): startline = introspect_docstring_lineno(api_doc) if startline in (None, UNKNOWN): startline = None # Display a block header. header = 'File %s, ' % filename if startline is not None: header += 'line %d, ' % startline header += 'in %s' % name log.start_block(header) # Display all parse errors. But first, combine any errors # with duplicate description messages. if startline is None: # remove dups, but keep original order: dups = {} for error in parse_errors: message = error.descr() if message not in dups: log.docstring_warning(message) dups[message] = 1 else: # Combine line number fields for dup messages: messages = {} # maps message -> list of linenum for error in parse_errors: error.set_linenum_offset(startline) message = error.descr() messages.setdefault(message, []).append(error.linenum()) message_items = messages.items() message_items.sort(lambda a,b:cmp(min(a[1]), min(b[1]))) for message, linenums in message_items: linenums = [n for n in linenums if n is not None] if len(linenums) == 0: log.docstring_warning(message) elif len(linenums) == 1: log.docstring_warning("Line %s: %s" % (linenums[0], message)) else: linenums = ', '.join(['%s' % l for l in linenums]) log.docstring_warning("Lines %s: %s" % (linenums, message)) # Display all field warnings. for warning in field_warnings: log.docstring_warning(warning) # End the message block. log.end_block()
7c04ea4a74f09d9288b5a8337b41b01397016295 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3512/7c04ea4a74f09d9288b5a8337b41b01397016295/docstringparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4324, 12, 2425, 67, 2434, 16, 997, 1615, 16, 1109, 67, 4324, 16, 652, 67, 12103, 4672, 3536, 37, 4222, 445, 364, 511, 95, 2670, 67, 24675, 17767, 716, 10557, 1281, 9813, 5599...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 4324, 12, 2425, 67, 2434, 16, 997, 1615, 16, 1109, 67, 4324, 16, 652, 67, 12103, 4672, 3536, 37, 4222, 445, 364, 511, 95, 2670, 67, 24675, 17767, 716, 10557, 1281, 9813, 5599...
def outgoing(oldoutgoing, ui, repo, source="default", **opts):
def outgoing(oldoutgoing, ui, repo, dest=None, **opts):
def outgoing(oldoutgoing, ui, repo, source="default", **opts): if opts.get('bookmarks'): source, branches = hg.parseurl(ui.expandpath(source), opts.get('branch')) other = hg.repository(hg.remoteui(repo, opts), source) ui.status(_('comparing with %s\n') % url.hidepassword(source)) diffbookmarks(ui, other, repo) else: oldoutgoing(ui, repo, source, **opts)
46cbf5262d95e814612d28a11261303ad3d4d284 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/46cbf5262d95e814612d28a11261303ad3d4d284/bookmarks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12902, 12, 1673, 31891, 16, 5915, 16, 3538, 16, 1570, 33, 7036, 16, 2826, 4952, 4672, 309, 1500, 18, 588, 2668, 3618, 17439, 11, 4672, 1084, 16, 11483, 273, 22576, 18, 2670, 718, 12, 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, 12902, 12, 1673, 31891, 16, 5915, 16, 3538, 16, 1570, 33, 7036, 16, 2826, 4952, 4672, 309, 1500, 18, 588, 2668, 3618, 17439, 11, 4672, 1084, 16, 11483, 273, 22576, 18, 2670, 718, 12, 4...
result_data = property(fget=get_result_data, fset=set_result_data, doc="The result data object.")
result_data = property(fget=get_result_data, fset=set_result_data)
def set_result_data(self): self.result_data = result_data
4a027685521f157b2fda025193e1c041f57af85e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7711/4a027685521f157b2fda025193e1c041f57af85e/algorithm_drivers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2088, 67, 892, 12, 2890, 4672, 365, 18, 2088, 67, 892, 273, 563, 67, 892, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 2088, 67, 892, 12, 2890, 4672, 365, 18, 2088, 67, 892, 273, 563, 67, 892, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if why: try: source.connectionLost(failure.Failure(why)) except: log.deferr() self.removeReader(source) self.removeWriter(source) break elif source.disconnected: break self.simulate() return 1
if why: self.removeReader(source) self.removeWriter(source) try: source.connectionLost(failure.Failure(why)) except: log.deferr() log.logOwner.disown(source) self.simulate() return 1
def callback(self, source, condition): methods = [] cbNames = []
08310f9467cdc9f0e5cbeaf8080652c4dd1ff45c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/08310f9467cdc9f0e5cbeaf8080652c4dd1ff45c/gtk2reactor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 1084, 16, 2269, 4672, 2590, 273, 5378, 2875, 1557, 273, 5378, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 2890, 16, 1084, 16, 2269, 4672, 2590, 273, 5378, 2875, 1557, 273, 5378, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
'StatusBar', 'Icon', 'Title', 'Anchors']
'StatusBar', 'StatusBarPane', 'Icon', 'Title', 'Anchors']
def hideDesignTime(self): return BaseFrameDTC.hideDesignTime(self) + ['ToolBar', 'MenuBar', 'StatusBar', 'Icon', 'Title', 'Anchors']
46f420f8c59cbd43dab335e76491b59ef238374e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/46f420f8c59cbd43dab335e76491b59ef238374e/FrameCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 15478, 950, 12, 2890, 4672, 327, 3360, 3219, 9081, 39, 18, 11248, 15478, 950, 12, 2890, 13, 397, 10228, 6364, 5190, 2187, 296, 4599, 5190, 2187, 296, 1482, 5190, 2187, 296, 5554, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 15478, 950, 12, 2890, 4672, 327, 3360, 3219, 9081, 39, 18, 11248, 15478, 950, 12, 2890, 13, 397, 10228, 6364, 5190, 2187, 296, 4599, 5190, 2187, 296, 1482, 5190, 2187, 296, 5554, 2...
ret = codecs.open(filename, "wt", encoding)
ret = codecs.open(filename, "w", encoding)
def open_writer(self, filename, encoding="mbcs"): # A place to put code to open a file with the appropriate encoding. # Does *not* set self.file - just opens and returns a file. # Actually *deletes* the filename asked for and returns a handle to a # temp file - finish_writer then puts everything back in place. This # is so errors don't leave a 1/2 generated file around causing bizarre # errors later. # Could be a classmethod one day... try: os.unlink(filename) except os.error: pass filename = filename + ".temp" if sys.version_info > (3,0): ret = open(filename, "wt", encoding=encoding) else: import codecs # not available in py3k. ret = codecs.open(filename, "wt", encoding) return ret
9547ea608b9ec0cf4ac1acc3dc229c0a6ded667d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/992/9547ea608b9ec0cf4ac1acc3dc229c0a6ded667d/genpy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 6299, 12, 2890, 16, 1544, 16, 2688, 1546, 1627, 2143, 6, 4672, 468, 432, 3166, 358, 1378, 981, 358, 1696, 279, 585, 598, 326, 5505, 2688, 18, 468, 9637, 380, 902, 14, 444, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 67, 6299, 12, 2890, 16, 1544, 16, 2688, 1546, 1627, 2143, 6, 4672, 468, 432, 3166, 358, 1378, 981, 358, 1696, 279, 585, 598, 326, 5505, 2688, 18, 468, 9637, 380, 902, 14, 444, ...
self.target().fastSeek(self.direction)
self.target().suspendAutoHiding() self.fast_seek_func()
def fastSeek_(self, timer): self.target().fastSeek(self.direction) self.resetSeekTimer()
175dc4d66f4bed8491c1f5b985a2d5dcef6a72bc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/175dc4d66f4bed8491c1f5b985a2d5dcef6a72bc/overlay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4797, 16134, 67, 12, 2890, 16, 5441, 4672, 365, 18, 3299, 7675, 87, 18815, 4965, 44, 10415, 1435, 365, 18, 8076, 67, 16508, 67, 644, 1435, 365, 18, 6208, 16134, 6777, 1435, 225, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4797, 16134, 67, 12, 2890, 16, 5441, 4672, 365, 18, 3299, 7675, 87, 18815, 4965, 44, 10415, 1435, 365, 18, 8076, 67, 16508, 67, 644, 1435, 365, 18, 6208, 16134, 6777, 1435, 225, 2, -10...
- ``rc`` - number of rows * number of columns in the state array - ``e`` - exponent of base field
- ``rc`` - number of rows * number of columns in the state array (default: ``None``) - ``e`` - exponent of base field (default: ``None``)
def varstrs(self, name, nr, rc = None, e = None): """ Return a list of strings representing variables in ``self``.
3cd6b553ebc89e43967234049b07b4477c5b3b3d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/3cd6b553ebc89e43967234049b07b4477c5b3b3d/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 24432, 12, 2890, 16, 508, 16, 9884, 16, 4519, 273, 599, 16, 425, 273, 599, 4672, 3536, 2000, 279, 666, 434, 2064, 5123, 3152, 316, 12176, 2890, 68, 8338, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 569, 24432, 12, 2890, 16, 508, 16, 9884, 16, 4519, 273, 599, 16, 425, 273, 599, 4672, 3536, 2000, 279, 666, 434, 2064, 5123, 3152, 316, 12176, 2890, 68, 8338, 2, -100, -100, -100, -100...
f.write(t.strftime("%Y-%m-%d %H:%M:%S") + "," + "NATCHECK_REQUEST_SENT" + "," + str(show_permid(permid)) + "," + str(self.peer) + "\n")
f.write(t.strftime("%Y-%m-%d %H:%M:%S") + "," + "NATCHECK_REQUEST_SENT" + "," + str(show_permid(permid)) + "\n")
def doNatCheckCallback(self, exc, permid): if exc is not None: return False if DEBUG: print >> sys.stderr, "******* NATCHECK_REQUEST was sent to", show_permid_short(permid), exc # Register peerinfo on file f = open("registerlog.txt", "a") t = datetime.datetime.fromtimestamp(time.time()) f.write(t.strftime("%Y-%m-%d %H:%M:%S") + "," + "NATCHECK_REQUEST_SENT" + "," + str(show_permid(permid)) + "," + str(self.peer) + "\n") f.close()
bd2c7f39df1ebedcb5f2a5faa637aef7772883c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9686/bd2c7f39df1ebedcb5f2a5faa637aef7772883c6/NatCheckMsgHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 23779, 1564, 2428, 12, 2890, 16, 3533, 16, 4641, 350, 4672, 309, 3533, 353, 486, 599, 30, 327, 1083, 309, 6369, 30, 1172, 1671, 2589, 18, 11241, 16, 315, 27243, 31395, 10687, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 23779, 1564, 2428, 12, 2890, 16, 3533, 16, 4641, 350, 4672, 309, 3533, 353, 486, 599, 30, 327, 1083, 309, 6369, 30, 1172, 1671, 2589, 18, 11241, 16, 315, 27243, 31395, 10687, 67, ...
"desc_en": xmlify("Automatically generated on %s" % date), "desc_de": xmlify("Automatisch generiert am %s" % date),
"desc_en": wc.XmlUtils.xmlquote("Automatically generated on %s" % date), "desc_de": wc.XmlUtils.xmlquote("Automatisch generiert am %s" % date),
def write_folder (cat, ftype, data, f): print "write", cat, "folder" d = { "charset": ConfigCharset, "title_en": xmlify("%s %s" % (ftype.capitalize(), cat)), "title_de": xmlify("%s %s" % (transtypes[ftype]['de'].capitalize(), transcats[cat]['de'].capitalize())), "desc_en": xmlify("Automatically generated on %s" % date), "desc_de": xmlify("Automatisch generiert am %s" % date), } f.write("""<?xml version="1.0" encoding="%(charset)s"?>
ea210123cf99e19e452cf01342949f702e718584 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/ea210123cf99e19e452cf01342949f702e718584/bl2wc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 5609, 261, 2574, 16, 21219, 16, 501, 16, 284, 4672, 1172, 315, 2626, 3113, 6573, 16, 315, 5609, 6, 302, 273, 288, 315, 9999, 6877, 1903, 9652, 16, 315, 2649, 67, 275, 6877, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 5609, 261, 2574, 16, 21219, 16, 501, 16, 284, 4672, 1172, 315, 2626, 3113, 6573, 16, 315, 5609, 6, 302, 273, 288, 315, 9999, 6877, 1903, 9652, 16, 315, 2649, 67, 275, 6877, ...
tempcache = None
__tempfiles = []
def urlcleanup(): if _urlopener: _urlopener.cleanup()
67b01d98cf14689ce7782ebd05e24aa7e8d4825d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/67b01d98cf14689ce7782ebd05e24aa7e8d4825d/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 16732, 13332, 309, 389, 295, 16884, 708, 30, 389, 295, 16884, 708, 18, 16732, 1435, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 16732, 13332, 309, 389, 295, 16884, 708, 30, 389, 295, 16884, 708, 18, 16732, 1435, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertEquals('::', f('\x00' * 16)) self.assertEquals('::1', f('\x00' * 15 + '\x01'))
self.assertEquals('::', f(b'\x00' * 16)) self.assertEquals('::1', f(b'\x00' * 15 + b'\x01'))
def testStringToIPv6(self): if not hasattr(socket, 'inet_ntop'): return # No inet_ntop() on this platform try: from socket import inet_ntop, AF_INET6, has_ipv6 if not has_ipv6: return except ImportError: return f = lambda a: inet_ntop(AF_INET6, a)
061a09d07749ecdb9ab8f78fe955cf33c9c8cf30 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/061a09d07749ecdb9ab8f78fe955cf33c9c8cf30/test_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 23282, 12775, 26, 12, 2890, 4672, 309, 486, 3859, 12, 7814, 16, 296, 23864, 67, 496, 556, 11, 4672, 327, 468, 2631, 17661, 67, 496, 556, 1435, 603, 333, 4072, 775, 30, 628, 2987,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23282, 12775, 26, 12, 2890, 4672, 309, 486, 3859, 12, 7814, 16, 296, 23864, 67, 496, 556, 11, 4672, 327, 468, 2631, 17661, 67, 496, 556, 1435, 603, 333, 4072, 775, 30, 628, 2987,...
if isinstance(x, (int, long, sage.rings.integer.Integer,
""" TESTS: sage: polygen(AA) / int(3) 1/3*x sage: AA(int(7)) / AA(long(2)) 7/2 """ if isinstance(x, (sage.rings.integer.Integer,
def __init__(self, x): if isinstance(x, (int, long, sage.rings.integer.Integer, sage.rings.rational.Rational)): self._value = x else: raise TypeError, "Illegal initializer for algebraic number rational"
b9cfedeaaa58de5405ca97e4b1900f5ea0403043 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/b9cfedeaaa58de5405ca97e4b1900f5ea0403043/algebraic_real.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 4672, 3536, 22130, 55, 30, 272, 410, 30, 2952, 4338, 275, 12, 5284, 13, 342, 509, 12, 23, 13, 404, 19, 23, 14, 92, 272, 410, 30, 27343, 12, 474,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 619, 4672, 3536, 22130, 55, 30, 272, 410, 30, 2952, 4338, 275, 12, 5284, 13, 342, 509, 12, 23, 13, 404, 19, 23, 14, 92, 272, 410, 30, 27343, 12, 474,...
if speakContentFirst and not speakWithinForLine and role!=controlTypes.ROLE_EDITABLETEXT and controlTypes.STATE_EDITABLE not in states:
if speakContentFirst and speakExitForOther and not speakWithinForLine and role!=controlTypes.ROLE_EDITABLETEXT and controlTypes.STATE_EDITABLE not in states:
def getControlFieldSpeech(attrs,ancestorAttrs,fieldType,formatConfig=None,extraDetail=False,reason=None): if not formatConfig: formatConfig=config.conf["documentFormatting"] childCount=int(attrs['_childcount']) indexInParent=int(attrs['_indexInParent']) parentChildCount=int(attrs['_parentChildCount']) if reason==REASON_FOCUS: name=attrs.get('name',"") else: name="" role=attrs.get('role',controlTypes.ROLE_UNKNOWN) states=attrs.get('states',set()) keyboardShortcut=attrs.get('keyboardShortcut', "") level=attrs.get('level',None) if formatConfig["includeLayoutTables"]: tableLayout=None else: # Find the nearest table. if role==controlTypes.ROLE_TABLE: # This is the nearest table. tableLayout=attrs.get('table-layout',None) else: # Search ancestors for the nearest table. for x in reversed(ancestorAttrs): if x.get("role")==controlTypes.ROLE_TABLE: tableLayout=x.get('table-layout',None) break else: # No table in the ancestors. tableLayout=None if not tableLayout: tableID=attrs.get('table-id') else: tableID=None # Honour verbosity configuration. if reason in (REASON_CARET,REASON_SAYALL,REASON_FOCUS) and ( (role==controlTypes.ROLE_LINK and not formatConfig["reportLinks"]) or (role==controlTypes.ROLE_HEADING and not formatConfig["reportHeadings"]) or (role==controlTypes.ROLE_BLOCKQUOTE and not formatConfig["reportBlockQuotes"]) or (role in (controlTypes.ROLE_TABLE,controlTypes.ROLE_TABLECELL,controlTypes.ROLE_TABLEROWHEADER,controlTypes.ROLE_TABLECOLUMNHEADER) and not formatConfig["reportTables"]) or (role in (controlTypes.ROLE_LIST,controlTypes.ROLE_LISTITEM) and controlTypes.STATE_READONLY in states and not formatConfig["reportLists"]) ): return "" roleText=getSpeechTextForProperties(reason=reason,role=role) stateText=getSpeechTextForProperties(reason=reason,states=states,_role=role) keyboardShortcutText=getSpeechTextForProperties(reason=reason,keyboardShortcut=keyboardShortcut) if config.conf["presentation"]["reportKeyboardShortcuts"] else "" nameText=getSpeechTextForProperties(reason=reason,name=name) levelText=getSpeechTextForProperties(reason=reason,positionInfo_level=level) # Determine under what circumstances this node should be spoken. # speakEntry: Speak when the user enters the control. # speakWithinForLine: When moving by line, speak when the user is already within the control. # speakExitForLine: When moving by line, speak when the user exits the control. # speakExitForOther: When moving by word or character, speak when the user exits the control. speakEntry=speakWithinForLine=speakExitForLine=speakExitForOther=False if ( role in (controlTypes.ROLE_LINK,controlTypes.ROLE_HEADING,controlTypes.ROLE_BUTTON,controlTypes.ROLE_RADIOBUTTON,controlTypes.ROLE_CHECKBOX,controlTypes.ROLE_GRAPHIC,controlTypes.ROLE_MENUITEM,controlTypes.ROLE_TAB,controlTypes.ROLE_COMBOBOX,controlTypes.ROLE_SLIDER,controlTypes.ROLE_SPINBUTTON,controlTypes.ROLE_COMBOBOX) or (role==controlTypes.ROLE_EDITABLETEXT and controlTypes.STATE_MULTILINE not in states and controlTypes.STATE_READONLY not in states) or (role==controlTypes.ROLE_LIST and controlTypes.STATE_READONLY not in states) ): # This node is usually a single line. speakEntry=True speakWithinForLine=True speakExitForOther=True elif role in (controlTypes.ROLE_SEPARATOR,controlTypes.ROLE_EMBEDDEDOBJECT): # This node is only ever a marker; i.e. single character. speakEntry=True elif ( role in (controlTypes.ROLE_BLOCKQUOTE,controlTypes.ROLE_FRAME,controlTypes.ROLE_INTERNALFRAME,controlTypes.ROLE_TOOLBAR,controlTypes.ROLE_MENUBAR,controlTypes.ROLE_POPUPMENU) or (role==controlTypes.ROLE_EDITABLETEXT and not controlTypes.STATE_READONLY in states and controlTypes.STATE_MULTILINE in states) or (role==controlTypes.ROLE_LIST and controlTypes.STATE_READONLY in states) or (role==controlTypes.ROLE_DOCUMENT and controlTypes.STATE_EDITABLE in states) or (role==controlTypes.ROLE_TABLE and tableID) ): # This node is usually a multiline container. speakEntry=True speakExitForLine=True speakExitForOther=True # Determine the order of speech. # speakContentFirst: Speak the content before the control field info. speakContentFirst=reason==REASON_FOCUS and role not in (controlTypes.ROLE_EDITABLETEXT,controlTypes.ROLE_COMBOBOX) and controlTypes.STATE_EDITABLE not in states # speakStatesFirst: Speak the states before the role. speakStatesFirst=role==controlTypes.ROLE_LINK if speakContentFirst and not speakWithinForLine and role!=controlTypes.ROLE_EDITABLETEXT and controlTypes.STATE_EDITABLE not in states: # If content is to be spoken first, don't speak containers at all. speakEntry=False # Determine what text to speak. # Special cases if fieldType=="start_addedToControlFieldStack" and role==controlTypes.ROLE_LIST and controlTypes.STATE_READONLY in states: # List. return roleText+_("with %s items")%childCount elif fieldType=="start_addedToControlFieldStack" and role==controlTypes.ROLE_TABLE and tableID: # Table. return " ".join((roleText, getSpeechTextForProperties(_tableID=tableID, rowCount=attrs.get("table-rowcount"), columnCount=attrs.get("table-columncount")))) elif fieldType=="start_addedToControlFieldStack" and role in (controlTypes.ROLE_TABLECELL,controlTypes.ROLE_TABLECOLUMNHEADER,controlTypes.ROLE_TABLEROWHEADER) and tableID: # Table cell. return getSpeechTextForProperties(_tableID=tableID, rowNumber=attrs.get("table-rownumber"), columnNumber=attrs.get("table-columnnumber")) # General cases elif ( (speakEntry and ((speakContentFirst and fieldType in ("end_relative","end_inControlFieldStack")) or (not speakContentFirst and fieldType in ("start_addedToControlFieldStack","start_relative")))) or (speakWithinForLine and not speakContentFirst and not extraDetail and fieldType=="start_inControlFieldStack") ): return " ".join([x for x in nameText,(stateText if speakStatesFirst else roleText),(roleText if speakStatesFirst else stateText),levelText,keyboardShortcutText if x]) elif fieldType in ("end_removedFromControlFieldStack","end_relative") and roleText and ((not extraDetail and speakExitForLine) or (extraDetail and speakExitForOther)): return _("out of %s")%roleText # Special cases elif not extraDetail and fieldType in ("start_addedToControlFieldStack","start_relative") and controlTypes.STATE_CLICKABLE in states: # Clickable. return getSpeechTextForProperties(states=set([controlTypes.STATE_CLICKABLE])) else: return ""
2443e5738a505cbcb94222359d10fe9871c6f2b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/2443e5738a505cbcb94222359d10fe9871c6f2b2/speech.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27174, 974, 22334, 12, 7039, 16, 28798, 8262, 16, 1518, 559, 16, 2139, 809, 33, 7036, 16, 7763, 6109, 33, 8381, 16, 10579, 33, 7036, 4672, 309, 486, 740, 809, 30, 740, 809, 33, 1425, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 27174, 974, 22334, 12, 7039, 16, 28798, 8262, 16, 1518, 559, 16, 2139, 809, 33, 7036, 16, 7763, 6109, 33, 8381, 16, 10579, 33, 7036, 4672, 309, 486, 740, 809, 30, 740, 809, 33, 1425, ...
(SELECT count(id) FROM mailgate_message WHERE model='crm.helpdesk' AND res_id=c.id AND history=True) AS email,
(SELECT count(id) FROM mailgate_message WHERE model='crm.claim' AND res_id=c.id AND history=True) AS email, (SELECT avg(probability) FROM crm_case_stage WHERE type='claim' AND id=c.stage_id) AS probability,
def init(self, cr):
d1aaeb22512d9ee730e706d950a0421c940f1169 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/d1aaeb22512d9ee730e706d950a0421c940f1169/crm_claim_report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 12, 2890, 16, 4422, 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, 1208, 12, 2890, 16, 4422, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
p0 = array([0,1,.1,.01,.001])
p0 = array([1,.1,.01,.001])
def peval(x, p): return p[0] + p[1]*x + p[2]*x**2 + p[3]*x**3 + p[4]*x**4
4ad6dc8d0b920bb640d4e5dad324a90e5165b493 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12245/4ad6dc8d0b920bb640d4e5dad324a90e5165b493/ledFlickFitGamma.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2804, 1125, 12, 92, 16, 293, 4672, 327, 293, 63, 20, 65, 397, 293, 63, 21, 5772, 92, 397, 293, 63, 22, 5772, 92, 636, 22, 397, 293, 63, 23, 5772, 92, 636, 23, 397, 293, 63, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2804, 1125, 12, 92, 16, 293, 4672, 327, 293, 63, 20, 65, 397, 293, 63, 21, 5772, 92, 397, 293, 63, 22, 5772, 92, 636, 22, 397, 293, 63, 23, 5772, 92, 636, 23, 397, 293, 63, 24, ...
for widget in self.glade.get_widget_prefix(""): setattr(self, "_" + widget.get_name(), widget) self._ProgressBar.unmap() self._OKButton.set_sensitive(False)
self.glade.get_widget('ProgressBar').unmap() self.glade.get_widget('OKButton').set_sensitive(False)
def __init__(self): self.glade = glade.XML(sibpath(__file__,"restore_utility.glade")) self.glade.signal_autoconnect(self)
25189ba51bbf8447fc8dc6c6df68166bd923e18a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13085/25189ba51bbf8447fc8dc6c6df68166bd923e18a/restore_utility.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 365, 18, 7043, 2486, 273, 5118, 2486, 18, 4201, 12, 6044, 803, 12, 972, 768, 972, 10837, 13991, 67, 1367, 560, 18, 7043, 2486, 6, 3719, 365, 18, 7043, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2890, 4672, 365, 18, 7043, 2486, 273, 5118, 2486, 18, 4201, 12, 6044, 803, 12, 972, 768, 972, 10837, 13991, 67, 1367, 560, 18, 7043, 2486, 6, 3719, 365, 18, 7043, ...
original.get()
original.copy_from_system()
def _execute_events(self, events): original = Clipboard() original.get()
dd6b9ce3e4a4f0b9ea91cd661fb9bb66002512f2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6624/dd6b9ce3e4a4f0b9ea91cd661fb9bb66002512f2/action_paste.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8837, 67, 5989, 12, 2890, 16, 2641, 4672, 2282, 273, 385, 3169, 3752, 1435, 2282, 18, 588, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 8837, 67, 5989, 12, 2890, 16, 2641, 4672, 2282, 273, 385, 3169, 3752, 1435, 2282, 18, 588, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
Collection area of units: acre are barn hectare rood section square_chain square_meter township
Collection of units of area: acre are barn hectare rood section square_chain square_meter township
def __getattr__(self, name): """ Return the unit with the given name.
860975ef5915b61f5edf6269dc06fda67c357f91 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/860975ef5915b61f5edf6269dc06fda67c357f91/units.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 3536, 2000, 326, 2836, 598, 326, 864, 508, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 508, 4672, 3536, 2000, 326, 2836, 598, 326, 864, 508, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
recent_completion = []
recent_completion[:] = []
def onActive(window): recent_completion = []
5a481638fe08bf5923637bb7081166a55e65d360 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/5a481638fe08bf5923637bb7081166a55e65d360/keys.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 3896, 12, 5668, 4672, 8399, 67, 11469, 10531, 65, 273, 5378, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 603, 3896, 12, 5668, 4672, 8399, 67, 11469, 10531, 65, 273, 5378, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
EXAMPLES_PATH = '../../../build/JMI/examples'
jmhome = os.environ.get('JMODELICA_HOME') assert jmhome is not None, "You will need to define the JMODELICA_HOME environment variable." EXAMPLES_PATH = '%s/JMI/examples' % jmhome
def get_example_path(examplepath): """Get the relative path (to where this file resides) to the examples directory. @param examplepath: The example path relative the examples directory. """ # Path to example collection root directory EXAMPLES_PATH = '../../../build/JMI/examples' path = os.path.join(EXAMPLES_PATH, examplepath) return path
51cce200bcae1cb17e93d25a05a967a88116f114 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7711/51cce200bcae1cb17e93d25a05a967a88116f114/jmitest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8236, 67, 803, 12, 8236, 803, 4672, 3536, 967, 326, 3632, 589, 261, 869, 1625, 333, 585, 400, 4369, 13, 358, 326, 10991, 1867, 18, 225, 632, 891, 3454, 803, 30, 1021, 3454, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8236, 67, 803, 12, 8236, 803, 4672, 3536, 967, 326, 3632, 589, 261, 869, 1625, 333, 585, 400, 4369, 13, 358, 326, 10991, 1867, 18, 225, 632, 891, 3454, 803, 30, 1021, 3454, ...
("http://www.foo.com:5000/abc;123?a=b
("http://www.foo.com:5000/abc;123?a=b
def test_parse_url(self): for mem in ([ ("https://www.foo.com/abc;123?a=b#4", ("https", "www.foo.com", 443, "/abc;123?a=b")),
e30788a9dacabc7a8a0d8e1a962216cf42816d5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/e30788a9dacabc7a8a0d8e1a962216cf42816d5e/httpclienttest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2670, 67, 718, 12, 2890, 4672, 364, 1663, 316, 23265, 7566, 4528, 2207, 5591, 18, 11351, 18, 832, 19, 18947, 31, 12936, 35, 69, 33, 70, 7, 24, 3113, 7566, 4528, 3113, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2670, 67, 718, 12, 2890, 4672, 364, 1663, 316, 23265, 7566, 4528, 2207, 5591, 18, 11351, 18, 832, 19, 18947, 31, 12936, 35, 69, 33, 70, 7, 24, 3113, 7566, 4528, 3113, 315, ...
for w in self.nodes: for wx in w.exits: wx.alpha = LOGZERO if len(w.entries) == 0: wx.alpha = wx.ascr * aw for vx in w.entries: v = vx.src if lm: lscr = lm.prob(baseword(w.sym), baseword(v.sym))[0] * lw else: lscr = 0 wx.alpha = logadd(wx.alpha, vx.alpha + lscr + wx.ascr * aw)
for wx in self.traverse_edges_breadth(): wx.alpha = LOGZERO if len(wx.src.entries) == 0: wx.alpha = wx.ascr * aw for vx in wx.src.entries: if lm: lscr = lm.prob(baseword(wx.src.sym), baseword(vx.src.sym))[0] * lw else: lscr = 0 wx.alpha = logadd(wx.alpha, vx.alpha + lscr + wx.ascr * aw)
def forward(self, lm=None, lw=1.0, aw=1.0): """ Compute forward variable for all arcs in the lattice.
bc85ab40a9ce65398c35d24d154dd993bc81434d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6303/bc85ab40a9ce65398c35d24d154dd993bc81434d/lattice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5104, 12, 2890, 16, 14966, 33, 7036, 16, 14589, 33, 21, 18, 20, 16, 1690, 33, 21, 18, 20, 4672, 3536, 8155, 5104, 2190, 364, 777, 21569, 316, 326, 16690, 18, 2, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5104, 12, 2890, 16, 14966, 33, 7036, 16, 14589, 33, 21, 18, 20, 16, 1690, 33, 21, 18, 20, 4672, 3536, 8155, 5104, 2190, 364, 777, 21569, 316, 326, 16690, 18, 2, -100, -100, -100, -10...
self.k0_dkc = npy.empty((self.Ndir, self.Nk, 3), int)
k0_dkc = npy.empty((self.Ndir, self.Nk, 3), int)
def __init__(self, nwannier, calc, nbands=None, occupationenergy=None, fixedstates=None, spin=0, verbose=True):
2ac4b9fe09b4902e5b1bcc73a3b1bbce7b323ca5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5572/2ac4b9fe09b4902e5b1bcc73a3b1bbce7b323ca5/wannier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 4264, 5708, 33, 7036, 16, 18928, 367, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 3988, 33, 5510, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 14376, 1072, 2453, 16, 7029, 16, 4264, 5708, 33, 7036, 16, 18928, 367, 15358, 33, 7036, 16, 5499, 7992, 33, 7036, 16, 12490, 33, 20, 16, 3988, 33, 5510, ...
self._debug(NIGHTMARE, "wait")
def feed (self, data): """feed some data to the parser""" if self.state=='parse': # look if we must replay something if self.waited: self.waited = 0 waitbuf, self.waitbuf = self.waitbuf, [] self.replay(waitbuf) if self.state!='parse': self.inbuf.write(data) return data = self.inbuf.getvalue() + data self.inbuf.close() self.inbuf = StringIO() if data: # only feed non-empty data self._debug(NIGHTMARE, "feed", `data`) self.parser.feed(data) else: self._debug(NIGHTMARE, "feed") pass else: # wait state --> put in input buffer self._debug(NIGHTMARE, "wait") self.inbuf.write(data)
5827a6b2fdf9c1202486a8f36e257a6eab010228 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/5827a6b2fdf9c1202486a8f36e257a6eab010228/HtmlParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4746, 261, 2890, 16, 501, 4672, 3536, 7848, 2690, 501, 358, 326, 2082, 8395, 309, 365, 18, 2019, 18920, 2670, 4278, 468, 2324, 309, 732, 1297, 16033, 5943, 309, 365, 18, 7048, 329, 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, 4746, 261, 2890, 16, 501, 4672, 3536, 7848, 2690, 501, 358, 326, 2082, 8395, 309, 365, 18, 2019, 18920, 2670, 4278, 468, 2324, 309, 732, 1297, 16033, 5943, 309, 365, 18, 7048, 329, 30, ...
"""Rescans selected Installers.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Refresh')) menu.AppendItem(menuItem) def Execute(self,event): """Handle selection.""" dir = self.data.dir progress = balt.Progress(_("Refreshing Packages..."),'\n'+' '*60) progress.setFull(len(self.selected)) try: for index,archive in enumerate(self.selected): progress(index,_("Refreshing Packages...\n")+archive.s) installer = self.data[archive] apath = bosh.dirs['installers'].join(archive) installer.refreshBasic(apath,SubProgress(progress,index,index+1),True) self.data.hasChanged = True finally: if progress != None: progress.Destroy() self.data.refresh(what='NSC') self.gTank.RefreshUI()
"""Rescans selected Installers.""" def AppendToMenu(self,menu,window,data): Link.AppendToMenu(self,menu,window,data) menuItem = wx.MenuItem(menu,self.id,_('Refresh')) menu.AppendItem(menuItem) def Execute(self,event): """Handle selection.""" dir = self.data.dir progress = balt.Progress(_("Refreshing Packages..."),'\n'+' '*60) progress.setFull(len(self.selected)) try: for index,archive in enumerate(self.selected): progress(index,_("Refreshing Packages...\n")+archive.s) installer = self.data[archive] apath = bosh.dirs['installers'].join(archive) installer.refreshBasic(apath,SubProgress(progress,index,index+1),True) self.data.hasChanged = True finally: if progress != None: progress.Destroy() self.data.refresh(what='NSC') self.gTank.RefreshUI()
def Execute(self,event): """Handle selection.""" message = _("Attempt to open this as a mod at Fallout3Nexus? This assumes that the trailing digits in the package's name are actually the id number of the mod at Fallout3Nexus. If this assumption is wrong, you'll just get a random mod page (or error notice) at Fallout3Nexus.") if balt.askContinue(self.gTank,message,'bash.installers.openFallout3Nexus',_('Open at Fallout3Nexus')): id = bosh.reFallout3Nexus.search(self.selected[0].s).group(1) os.startfile('http://fallout3nexus.com/downloads/file.php?id='+id)
3ac43907fa076fea1e8d682219e2b28fc7419f7b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/3ac43907fa076fea1e8d682219e2b28fc7419f7b/basher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 3536, 3259, 4421, 12123, 883, 273, 389, 2932, 7744, 358, 1696, 333, 487, 279, 681, 622, 478, 287, 14533, 23, 50, 21029, 35, 1220, 13041, 716, 326, 7341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7903, 12, 2890, 16, 2575, 4672, 3536, 3259, 4421, 12123, 883, 273, 389, 2932, 7744, 358, 1696, 333, 487, 279, 681, 622, 478, 287, 14533, 23, 50, 21029, 35, 1220, 13041, 716, 326, 7341, ...
for obj in (f1, f2, f3, i1, i2, i3, i4, i5, i6):
for obj in (f3, i5, i6):
def test_expired_view(self): f1 = Feed(u'http://example.com/1') f2 = Feed(u'http://example.com/2') f3 = Feed(u'http://example.com/3') f1.setExpiration(u'never', 0) f2.setExpiration(u'system', 0) f3.setExpiration(u'feed', 24)
94d04beeeccc3c92ef763ec096b6fbe2f678a7c9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/94d04beeeccc3c92ef763ec096b6fbe2f678a7c9/itemtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15820, 67, 1945, 12, 2890, 4672, 284, 21, 273, 14013, 12, 89, 11, 2505, 2207, 8236, 18, 832, 19, 21, 6134, 284, 22, 273, 14013, 12, 89, 11, 2505, 2207, 8236, 18, 832, 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, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 15820, 67, 1945, 12, 2890, 4672, 284, 21, 273, 14013, 12, 89, 11, 2505, 2207, 8236, 18, 832, 19, 21, 6134, 284, 22, 273, 14013, 12, 89, 11, 2505, 2207, 8236, 18, 832, 19, ...
depsLogConf = self._job.get("log/dependencies", False) if not depsLogConf: return packages = script.packagesSortedSimple() parts = script.parts variants = script.variants depsLogConf = ExtMap(depsLogConf)
def runLogDependencies(self, script):
9fe10b42be513df41053afa53e91b1f58d06af21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/9fe10b42be513df41053afa53e91b1f58d06af21/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1343, 8053, 12, 2890, 16, 2728, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1343, 8053, 12, 2890, 16, 2728, 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, -10...
tag = Tag(tagname)
tag = Tag(tagname,save_cllbk=self.save)
def new_tag(self,tagname) : #we create a new tag from a name if not self.store.has_key(tagname) : tag = Tag(tagname) self.add_tag(tag) return tag else : return self.store[tagname]
13303fcbf7bee804a4a080c995745885e5d57d24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/13303fcbf7bee804a4a080c995745885e5d57d24/tagstore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 2692, 12, 2890, 16, 2692, 529, 13, 294, 468, 1814, 752, 279, 394, 1047, 628, 279, 508, 309, 486, 365, 18, 2233, 18, 5332, 67, 856, 12, 2692, 529, 13, 294, 1047, 273, 4034, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 2692, 12, 2890, 16, 2692, 529, 13, 294, 468, 1814, 752, 279, 394, 1047, 628, 279, 508, 309, 486, 365, 18, 2233, 18, 5332, 67, 856, 12, 2692, 529, 13, 294, 1047, 273, 4034, ...
weight_units = models.CharField(_("Weight units"), max_length=3, choices=weight_units(), null=True, blank=True, validator_list=[weight_validator])
weight_units = models.CharField(_("Weight units"), max_length=3, choices=weight_units, null=True, blank=True, default=default_weight_unit, validator_list=[weight_validator])
def active(self): return self.filter(active=True)
f11002c782ba8f417d2af8a4d0b18a7becbcb0e0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13656/f11002c782ba8f417d2af8a4d0b18a7becbcb0e0/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2695, 12, 2890, 4672, 327, 365, 18, 2188, 12, 3535, 33, 5510, 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, 2695, 12, 2890, 4672, 327, 365, 18, 2188, 12, 3535, 33, 5510, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
self.selection = SingleSelectionGroup(self, self.senderMapper, self.inspector, self)
self.selection = \ SelectionTags.SingleSelectionGroup(self, self.senderMapper, self.inspector, self)
def refreshCtrl(self): if self.destroying: return
2409984574299440bdc4e3c954b3574ca35f84c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/2409984574299440bdc4e3c954b3574ca35f84c5/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 12418, 12, 2890, 4672, 309, 365, 18, 11662, 310, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4460, 12418, 12, 2890, 4672, 309, 365, 18, 11662, 310, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): return FullTensorProductOfClassicalCrystals(*crystals) else: return FullTensorProductOfCrystals(*crystals)
if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): return FullTensorProductOfClassicalCrystals(*crystals) else: return FullTensorProductOfCrystals(*crystals)
def TensorProductOfCrystals(*crystals, **options): r""" Tensor product of crystals. EXAMPLES: We construct the type $A_2$-crystal generated by $2\otimes 1\otimes 1$: sage: C = CrystalOfLetters(['A',2]) sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)]]) It has $8$ elements sage: T.list() [[2, 1, 1], [2, 1, 2], [2, 1, 3], [3, 1, 3], [3, 2, 3], [3, 1, 1], [3, 1, 2], [3, 2, 2]] sage: C = CrystalOfTableaux(['A',3], shape=[1,1,0]) sage: D = CrystalOfTableaux(['A',3], shape=[1,0,0]) sage: T = TensorProductOfCrystals(C,D, generators=[[C(rows=[[1], [2]]), D(rows=[[1]])], [C(rows=[[2], [3]]), D(rows=[[1]])]]) sage: T.count() 24 sage: T.check() True sage: T.module_generators [[[[1], [2]], [[1]]], [[[2], [3]], [[1]]]] sage: [x.weight() for x in T.module_generators] [(2, 1, 0, 0), (1, 1, 1, 0)] If no module generators are specified, we obtain the full tensor product: sage: C=CrystalOfLetters(['A',2]) sage: T=TensorProductOfCrystals(C,C) sage: T.list() [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]] sage: T.count() 9 For a tensor product of crystals without module generators, the default implementation of module_generators contains all elements in the tensor product of the crystals. If there is a subset of elements in the tensor product that still generates the crystal, this needs to be implemented for the specific crystal separately: sage: T.module_generators.list() [[1, 1], [1, 2], [1, 3], [2, 1], [2, 2], [2, 3], [3, 1], [3, 2], [3, 3]] For classical highest weight crystals, it is also possible to list all highest weight elements: sage: C = CrystalOfLetters(['A',2]) sage: T = TensorProductOfCrystals(C,C,C,generators=[[C(2),C(1),C(1)],[C(1),C(2),C(1)]]) sage: T.highest_weight_vectors() [[2, 1, 1], [1, 2, 1]] """ if options.has_key('generators'): if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): return TensorProductOfClassicalCrystalsWithGenerators(generators=options['generators'], *crystals) else: return TensorProductOfCrystalsWithGenerators(generators=options['generators'], *crystals) else: if all(isinstance(crystal,ClassicalCrystal) for crystal in crystals): return FullTensorProductOfClassicalCrystals(*crystals) else: return FullTensorProductOfCrystals(*crystals)
c5d941975d8524ea910254f690f372b2fde30bea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/c5d941975d8524ea910254f690f372b2fde30bea/tensor_product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13422, 4133, 951, 12893, 1094, 1031, 30857, 3353, 1094, 1031, 16, 2826, 2116, 4672, 436, 8395, 13422, 3017, 434, 4422, 1094, 1031, 18, 225, 5675, 8900, 11386, 30, 225, 1660, 4872, 326, 618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13422, 4133, 951, 12893, 1094, 1031, 30857, 3353, 1094, 1031, 16, 2826, 2116, 4672, 436, 8395, 13422, 3017, 434, 4422, 1094, 1031, 18, 225, 5675, 8900, 11386, 30, 225, 1660, 4872, 326, 618...
"invalid: %(message)s", field=field, message=message))
"invalid: %(message)s", field=field, message=message))
def _validate_ticket(self, req, ticket, force_collision_check=False): valid = True resource = ticket.resource
8a7505f666e8590328936fd32f0bc362d6e2a6a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/8a7505f666e8590328936fd32f0bc362d6e2a6a0/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 67, 16282, 12, 2890, 16, 1111, 16, 9322, 16, 2944, 67, 12910, 1951, 67, 1893, 33, 8381, 4672, 923, 273, 1053, 1058, 273, 9322, 18, 3146, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5662, 67, 16282, 12, 2890, 16, 1111, 16, 9322, 16, 2944, 67, 12910, 1951, 67, 1893, 33, 8381, 4672, 923, 273, 1053, 1058, 273, 9322, 18, 3146, 2, -100, -100, -100, -100, -100, -10...
abs_set = dict((component, i) for i, component in enumerate(abs_path.split('/'))) for i, component in enumerate(reversed(ref_chain)): if component in abs_set: new_components = i * ['..'] new_components.extend(abs_chain[abs_set[component]+1:]) return '/'.join(new_components)
cut_pos = get_last_agreement(ref_chain, abs_chain) go_up = (len(ref_chain) - cut_pos) * ['..'] go_down = abs_chain[cut_pos:] result = u'/'.join(go_up + go_down) if result == '' and abs_slash != '': return './' else: return result + abs_slash
def get_relative(ref_path, abs_path): ref_chain = strip_trailing_slash(ref_path).split('/') if ref_chain == ['']: return abs_path abs_chain = abs_path.split('/') abs_set = dict((component, i) for i, component in enumerate(abs_path.split('/'))) for i, component in enumerate(reversed(ref_chain)): if component in abs_set: new_components = i * ['..'] new_components.extend(abs_chain[abs_set[component]+1:]) return '/'.join(new_components)
aeb3bfb693791705a474407830431b96cfedcb26 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11388/aeb3bfb693791705a474407830431b96cfedcb26/url_manip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 11626, 12, 1734, 67, 803, 16, 2417, 67, 803, 4672, 1278, 67, 5639, 273, 2569, 67, 26453, 67, 12877, 12, 1734, 67, 803, 2934, 4939, 2668, 2473, 13, 309, 1278, 67, 5639, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11626, 12, 1734, 67, 803, 16, 2417, 67, 803, 4672, 1278, 67, 5639, 273, 2569, 67, 26453, 67, 12877, 12, 1734, 67, 803, 2934, 4939, 2668, 2473, 13, 309, 1278, 67, 5639, 422, ...
if course.final.i >= GALSIZE*QUADSIZE: course.final.i = (GALSIZE*QUADSIZE*2) - course.final.i
if icourse.final.i >= GALSIZE*QUADSIZE: icourse.final.i = (GALSIZE*QUADSIZE*2) - icourse.final.i
def newquadrant(noattack): # Leaving quadrant -- allow final enemy attack # Don't do it if being pushed by Nova if len(game.enemies) != 0 and not noattack: newcnd() for enemy in game.enemies: finald = (w - enemy.location).distance() enemy.kavgd = 0.5 * (finald + enemy.kdist) # Stas Sergeev added the condition # that attacks only happen if Klingons # are present and your skill is good. if game.skill > SKILL_GOOD and game.klhere > 0 and not game.state.galaxy[game.quadrant.i][game.quadrant.j].supernova: attack(torps_ok=False) if game.alldone: return # check for edge of galaxy kinks = 0 while True: kink = False if course.final.i < 0: course.final.i = -course.final.i kink = True if course.final.j < 0: course.final.j = -course.final.j kink = True if course.final.i >= GALSIZE*QUADSIZE: course.final.i = (GALSIZE*QUADSIZE*2) - course.final.i kink = True if course.final.j >= GALSIZE*QUADSIZE: course.final.j = (GALSIZE*QUADSIZE*2) - course.final.j kink = True if kink: kinks += 1 else: break if kinks: game.nkinks += 1 if game.nkinks == 3: # Three strikes -- you're out! finish(FNEG3) return skip(1) prout(_("YOU HAVE ATTEMPTED TO CROSS THE NEGATIVE ENERGY BARRIER")) prout(_("AT THE EDGE OF THE GALAXY. THE THIRD TIME YOU TRY THIS,")) prout(_("YOU WILL BE DESTROYED.")) # Compute final position in new quadrant if trbeam: # Don't bother if we are to be beamed return game.quadrant = course.final.quadrant() game.sector = course.final.sector() skip(1) prout(_("Entering Quadrant %s.") % game.quadrant) game.quad[game.sector.i][game.sector.j] = game.ship newqad() if game.skill>SKILL_NOVICE: attack(torps_ok=False)
b8ffe91a83c83c29cc1a574e3fc2d857d582df33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3176/b8ffe91a83c83c29cc1a574e3fc2d857d582df33/sst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 21733, 6890, 12, 2135, 4558, 484, 4672, 468, 3519, 5339, 9474, 6890, 1493, 1699, 727, 570, 351, 93, 13843, 468, 7615, 1404, 741, 518, 309, 3832, 18543, 635, 423, 16739, 309, 562, 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, 394, 21733, 6890, 12, 2135, 4558, 484, 4672, 468, 3519, 5339, 9474, 6890, 1493, 1699, 727, 570, 351, 93, 13843, 468, 7615, 1404, 741, 518, 309, 3832, 18543, 635, 423, 16739, 309, 562, 12...
self._mi.Check(False) else: evt.Skip() def OnShowBrowser(self, evt): """Shows the filebrowser""" if evt.GetId() == ID_FILEBROWSE: mgr = self._mw.GetFrameManager() pane = mgr.GetPane(PANE_NAME).Hide() if Profile_Get('SHOW_FB', 'bool', False) and pane.IsShown(): pane.Hide() Profile_Set('SHOW_FB', False) self._mi.Check(False) else: pane.Show() Profile_Set('SHOW_FB', True) self._mi.Check(True) mgr.Update()
def OnPaneClose(self, evt): """Handles when the pane is closed to update the profile""" pane = evt.GetPane() if pane.name == PANE_NAME: Profile_Set('SHOW_FB', False) self._mi.Check(False) else: evt.Skip()
4d2d5c6e5663d99a3c05e5b2e0520838bb43ee3d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/4d2d5c6e5663d99a3c05e5b2e0520838bb43ee3d/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 8485, 4605, 12, 2890, 16, 6324, 4672, 3536, 8788, 1347, 326, 13618, 353, 4375, 358, 1089, 326, 3042, 8395, 13618, 273, 6324, 18, 967, 8485, 1435, 309, 13618, 18, 529, 422, 453, 125...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 8485, 4605, 12, 2890, 16, 6324, 4672, 3536, 8788, 1347, 326, 13618, 353, 4375, 358, 1089, 326, 3042, 8395, 13618, 273, 6324, 18, 967, 8485, 1435, 309, 13618, 18, 529, 422, 453, 125...
self.env = trac.env.Environment(path)
self.env = Environment(path)
def __init__(self, path): self.env = trac.env.Environment(path) self._db = self.env.get_db_cnx() self._db.autocommit = False self.loginNameCache = {} self.fieldNameCache = {}
d0a718cdc641402f4871e728629c7ce1e81b3158 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/d0a718cdc641402f4871e728629c7ce1e81b3158/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 3074, 273, 7518, 12, 803, 13, 365, 6315, 1966, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 365, 6315, 1966, 18, 585...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 365, 18, 3074, 273, 7518, 12, 803, 13, 365, 6315, 1966, 273, 365, 18, 3074, 18, 588, 67, 1966, 67, 10305, 92, 1435, 365, 6315, 1966, 18, 585...
self.mode_ = None
self.mode_ = mode
def __init__(self, scene, model=None): self.scene_ = scene self.mode_ = None
59720e8500c047dc53a2f7acc4138d6750381259 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/142/59720e8500c047dc53a2f7acc4138d6750381259/annotationscene.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 16, 938, 33, 7036, 4672, 365, 18, 23694, 67, 273, 9065, 365, 18, 3188, 67, 225, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 9065, 16, 938, 33, 7036, 4672, 365, 18, 23694, 67, 273, 9065, 365, 18, 3188, 67, 225, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
continue matched = True if 'ready' in args:
matched = False if 'ready' in wait_for_not:
def WaitNot(self, *args, **kwargs): """Wait for the window to not be in any of the following states:
3041c3cbb3a9cba089ef284c77ea17fa506bba68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/3041c3cbb3a9cba089ef284c77ea17fa506bba68/application.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 1248, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 5480, 364, 326, 2742, 358, 486, 506, 316, 1281, 434, 326, 3751, 5493, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 1248, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 3536, 5480, 364, 326, 2742, 358, 486, 506, 316, 1281, 434, 326, 3751, 5493, 30, 2, -100, -100, -100, -100, -100, -100, -100, ...
msg += '%-24s' % (self.odesc)
if self.long: msg = "%-27s" % ("%s=%s" % (self.cmd, self.odesc)) else: msg += '%-24s' % (self.odesc)
def buildHelpMessage(self): msg = '' if self.cmd: msg = self.cmd.ljust(3) if self.odesc: msg += '%-24s' % (self.odesc) else: msg += '%-24s' % ('') msg += "%s\n" % self.desc return msg
69d2e442b110750e432d3f9f3f0de85318ecf967 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/69d2e442b110750e432d3f9f3f0de85318ecf967/Options.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 6696, 1079, 12, 2890, 4672, 1234, 273, 875, 309, 365, 18, 4172, 30, 1234, 273, 365, 18, 4172, 18, 80, 3732, 12, 23, 13, 309, 365, 18, 369, 742, 30, 309, 365, 18, 5748, 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, 1361, 6696, 1079, 12, 2890, 4672, 1234, 273, 875, 309, 365, 18, 4172, 30, 1234, 273, 365, 18, 4172, 18, 80, 3732, 12, 23, 13, 309, 365, 18, 369, 742, 30, 309, 365, 18, 5748, 30, 12...
for i, identifier in enumerate(name[1:]):
for i, identifier in enumerate(name):
def get_value_from_name(name): """ Given a name, return the corresponding value. """ name = DottedName(name) # Import the module containing `name`. for i in range(len(name)): module = _import('.'.join(name[:i+1])) if (hasattr(module, name[i]) and not isinstance(getattr(module, name[i]), ModuleType)): break # Look up `name` in the module val = module for i, identifier in enumerate(name[1:]): try: val = getattr(val, identifier) except AttributeError: exc_msg = ('Could not import %s:\nNo variable named %s in %s' % (name, identifier, '.'.join(name[:1+i]))) raise ImportError(exc_msg) return val
e93f6faba0519a7aedcd73c5d098e56fd1cfebf8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/e93f6faba0519a7aedcd73c5d098e56fd1cfebf8/docinspector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1132, 67, 2080, 67, 529, 12, 529, 4672, 3536, 16803, 279, 508, 16, 327, 326, 4656, 460, 18, 3536, 508, 273, 17502, 2344, 461, 12, 529, 13, 225, 468, 6164, 326, 1605, 4191, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1132, 67, 2080, 67, 529, 12, 529, 4672, 3536, 16803, 279, 508, 16, 327, 326, 4656, 460, 18, 3536, 508, 273, 17502, 2344, 461, 12, 529, 13, 225, 468, 6164, 326, 1605, 4191, 1...
def set(self, value):
def str2value(self, value):
def set(self, value): try: _val = float(value) except ValueError: raise OptionValueError(self, value, "Floating point number required") else: Option.set(self, _val)
092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 609, 22, 1132, 12, 2890, 16, 460, 4672, 775, 30, 389, 1125, 273, 1431, 12, 1132, 13, 1335, 2068, 30, 1002, 2698, 23610, 12, 2890, 16, 460, 16, 315, 28344, 1634, 1300, 1931, 7923, 469, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 609, 22, 1132, 12, 2890, 16, 460, 4672, 775, 30, 389, 1125, 273, 1431, 12, 1132, 13, 1335, 2068, 30, 1002, 2698, 23610, 12, 2890, 16, 460, 16, 315, 28344, 1634, 1300, 1931, 7923, 469, ...
self.__initialcolor = initialcolor
def __init__(self, master = None, initialcolor = None, databasefile = None, initfile = None, ignore = None, wantspec = None): self.__master = master self.__initialcolor = initialcolor self.__databasefile = databasefile self.__initfile = initfile or os.path.expanduser('~/.pynche') self.__ignore = ignore self.__pw = None self.__wantspec = wantspec
dfc61ba71a7e98557eb823ebb167910736325c81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/dfc61ba71a7e98557eb823ebb167910736325c81/pyColorChooser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 273, 599, 16, 2172, 3266, 273, 599, 16, 2063, 768, 273, 599, 16, 1208, 768, 273, 599, 16, 2305, 273, 599, 16, 2545, 2793, 273, 599, 4672, 365, 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, 1001, 2738, 972, 12, 2890, 16, 4171, 273, 599, 16, 2172, 3266, 273, 599, 16, 2063, 768, 273, 599, 16, 1208, 768, 273, 599, 16, 2305, 273, 599, 16, 2545, 2793, 273, 599, 4672, 365, 16...
Triple-quotes are handled as well.
Triple-quotes are handled as well::
def strip_string_literals(code, state=None): r""" Returns a string with all literal quotes replaced with labels and a dict of labels for re-subsitution. This makes parsing much easier. EXAMPLES: sage: from sage.misc.preparser import strip_string_literals sage: s, literals, state = strip_string_literals(r'''['a', "b", 'c', "d\""]''') sage: s '[%(L1)s, %(L2)s, %(L3)s, %(L4)s]' sage: literals {'L4': '"d\\""', 'L2': '"b"', 'L3': "'c'", 'L1': "'a'"} sage: print s % literals ['a', "b", 'c', "d\""] sage: print strip_string_literals(r'-"\\\""-"\\"-')[0] -%(L1)s-%(L2)s- Triple-quotes are handled as well. sage: s, literals, state = strip_string_literals("[a, '''b''', c, '']") sage: s '[a, %(L1)s, c, %(L2)s]' sage: print s % literals [a, '''b''', c, ''] Comments are subsituted too: sage: s, literals, state = strip_string_literals("code '#' # ccc 't'"); s 'code %(L1)s #%(L2)s' sage: s % literals "code '#' # ccc 't'" A state is returned so one can break strings across multiple calls to this function: sage: s, literals, state = strip_string_literals('s = "some'); s 's = %(L1)s' sage: s, literals, state = strip_string_literals('thing" * 5', state); s '%(L1)s * 5' """ new_code = [] literals = {} counter = 0 start = q = 0 if state is None: in_quote = False raw = False else: in_quote, raw = state while True: sig_q = code.find("'", q) dbl_q = code.find('"', q) hash_q = code.find('#', q) q = min(sig_q, dbl_q) if q == -1: q = max(sig_q, dbl_q) if not in_quote and hash_q != -1 and (q == -1 or hash_q < q): # it's a comment newline = code.find('\n', hash_q) if newline == -1: newline = len(code) counter += 1 label = "L%s" % counter literals[label] = code[hash_q+1:newline] new_code.append(code[start:hash_q].replace('%','%%')) new_code.append("#%%(%s)s" % label) start = q = newline elif q == -1: if in_quote: counter += 1 label = "L%s" % counter literals[label] = code[start:] new_code.append("%%(%s)s" % label) else: new_code.append(code[start:].replace('%','%%')) break elif in_quote: if not raw and code[q-1] == '\\': k = 2 while code[q-k] == '\\': k += 1 if k % 2 == 0: q += 1 if code[q:q+len(in_quote)] == in_quote: counter += 1 label = "L%s" % counter literals[label] = code[start:q+len(in_quote)] new_code.append("%%(%s)s" % label) q += len(in_quote) start = q in_quote = False else: q += 1 else: raw = q>0 and code[q-1] in 'rR' if len(code) >= q+3 and (code[q+1] == code[q] == code[q+2]): in_quote = code[q]*3 else: in_quote = code[q] new_code.append(code[start:q].replace('%', '%%')) start = q q += len(in_quote) return "".join(new_code), literals, (in_quote, raw)
4c126d261314d7f192093d4142f8479a23988a69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/4c126d261314d7f192093d4142f8479a23988a69/preparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 1080, 67, 80, 11235, 12, 710, 16, 919, 33, 7036, 4672, 436, 8395, 2860, 279, 533, 598, 777, 7158, 10681, 8089, 598, 3249, 471, 279, 2065, 434, 3249, 364, 283, 17, 22284, 305,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 1080, 67, 80, 11235, 12, 710, 16, 919, 33, 7036, 4672, 436, 8395, 2860, 279, 533, 598, 777, 7158, 10681, 8089, 598, 3249, 471, 279, 2065, 434, 3249, 364, 283, 17, 22284, 305,...
x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (entry[1], "")))
x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (self.pinlength, "")))
def addEntry(self, list, entry): if entry[0] == "TEXT": #handle every item (text / pin only?) list.append( (entry[1], entry[2]) ) if entry[0] == "PIN": if entry[3] == 1: # masked pins: x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (entry[1], "*"))) else: # unmasked pins: x = configElement_nonSave("", configSequence, [1234], configsequencearg.get("PINCODE", (entry[1], ""))) self["subtitle"].setText(entry[2]) self.pin = getConfigListEntry("",x) list.append( self.pin ) self["bottom"].setText(_("please press OK when ready"))
10bcb34f8993ecc000f027ecc8ce7fc89f0bda2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6652/10bcb34f8993ecc000f027ecc8ce7fc89f0bda2b/Ci.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 1622, 12, 2890, 16, 666, 16, 1241, 4672, 309, 1241, 63, 20, 65, 422, 315, 5151, 6877, 202, 202, 7, 4110, 3614, 761, 261, 955, 342, 7092, 1338, 8535, 666, 18, 6923, 12, 261, 4099...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1622, 12, 2890, 16, 666, 16, 1241, 4672, 309, 1241, 63, 20, 65, 422, 315, 5151, 6877, 202, 202, 7, 4110, 3614, 761, 261, 955, 342, 7092, 1338, 8535, 666, 18, 6923, 12, 261, 4099...
"""Outputs a method deprecation warning. Uses the stack to determine class and name of calling method
"""Decorator to output a method deprecation warning.
def deprecated(instead=None): """Outputs a method deprecation warning. Uses the stack to determine class and name of calling method @param instead: if provided, will be used to specify the replacement @type instead: string """ def decorator(method): def wrapper(*args, **kwargs): funcname = method.func_name classname = args[0].__class__.__name__ if instead: output(u"%s.%s is DEPRECATED, use %s instead." % (classname, funcname, instead), level=WARNING) else: output(u"%s.%s is DEPRECATED." % (classname, funcname), level=WARNING) return method(*args, **kwargs) wrapper.func_name = method.func_name return wrapper return decorator
62aeeabd9e390a5a4520f37df3c5852b651e4753 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/62aeeabd9e390a5a4520f37df3c5852b651e4753/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6849, 12, 8591, 684, 33, 7036, 4672, 3536, 10361, 358, 876, 279, 707, 20097, 3436, 18, 225, 632, 891, 3560, 30, 309, 2112, 16, 903, 506, 1399, 358, 4800, 326, 6060, 632, 723, 3560, 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, 6849, 12, 8591, 684, 33, 7036, 4672, 3536, 10361, 358, 876, 279, 707, 20097, 3436, 18, 225, 632, 891, 3560, 30, 309, 2112, 16, 903, 506, 1399, 358, 4800, 326, 6060, 632, 723, 3560, 30,...
basepath = self.archivePath + "/" + self.name
basepath = os.path.join(self.archivePath, self.name)
def initializeFromPath(self, path, mode="r"): """ initialize object from the file or path given in path
b091d5d304469ddf0ae567cbb191ef4270848859 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9789/b091d5d304469ddf0ae567cbb191ef4270848859/OvfSet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 23064, 12, 2890, 16, 589, 16, 1965, 1546, 86, 6, 4672, 3536, 4046, 733, 628, 326, 585, 578, 589, 864, 316, 589, 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, 4046, 23064, 12, 2890, 16, 589, 16, 1965, 1546, 86, 6, 4672, 3536, 4046, 733, 628, 326, 585, 578, 589, 864, 316, 589, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
realMain()
return realMain()
def realMain(): from application import feedback feedback.initRuntimeLog(Globals.options.profileDir) Globals.chandlerDirectory = Utility.locateChandlerDirectory() os.chdir(Globals.chandlerDirectory) Utility.initLogging(Globals.options)
478758c40b3d2b53ff566c1e5f030905d8a6ee04 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/478758c40b3d2b53ff566c1e5f030905d8a6ee04/Chandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2863, 6376, 13332, 225, 628, 2521, 1930, 10762, 10762, 18, 2738, 5576, 1343, 12, 19834, 18, 2116, 18, 5040, 1621, 13, 225, 18901, 1031, 18, 343, 464, 749, 2853, 273, 13134, 18, 25450, 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, 2863, 6376, 13332, 225, 628, 2521, 1930, 10762, 10762, 18, 2738, 5576, 1343, 12, 19834, 18, 2116, 18, 5040, 1621, 13, 225, 18901, 1031, 18, 343, 464, 749, 2853, 273, 13134, 18, 25450, 78...
raise ParseError('Error during parsing: invalid ' 'syntax (%s, line %d)' % (module_doc.filename, lineno))
raise ParseError('Error during parsing: invalid syntax ' '(%s, line %d, char %d: %r)' % (module_doc.filename, srow, scol, toktext))
def process_file(module_doc): """ Read the given C{ModuleDoc}'s file, and add variables corresponding to any objects defined in that file. In particular, read and tokenize C{module_doc.filename}, and process each logical line using L{process_line()}. """ # Keep track of the current line number: lineno = None # Use this list to collect the tokens on a single logical line: line_toks = [] # This list contains one APIDoc for each indentation level. # The first element is the APIDoc for the module, and each # subsequent element is the APIDoc for the object at that # indentation level. The final element of the list is the # C{APIDoc} for the entity that we're currently processing. parent_docs = [module_doc] # The APIDoc for the object that was defined by the previous # line, if any; or None otherwise. This is used to update # parent_docs when we encounter an indent; and to decide what # object (if any) is described by a docstring. prev_line_doc = module_doc # A list of comments that occur before or on the current # logical line, used to build the comment docstring. Each # element is a tuple (comment_text, comment_lineno). comments = [] # A list of decorator lines that occur before the current # logical line. This is used so we can process a function # declaration line and its decorators all at once. decorators = [] # A list of group names, one for each indentation level. This is # used to keep track groups that are defined by comment markers # START_GROUP_MARKER and END_GROUP_MARKER. groups = [None] # When we encounter a comment start group marker, set this to the # name of the group; but wait until we're ready to process the # next line before we actually set groups[-1] to this value. This # is necessary because at the top of a block, the tokenizer gives # us comments before the INDENT token; but if we encounter a group # start marker at the top of a block, then we want it to apply # inside that block, not outside it. start_group = None # Check if the source file declares an encoding. encoding = _get_encoding(module_doc.filename) # The token-eating loop: module_file = codecs.open(module_doc.filename, 'r', encoding) tok_iter = tokenize.generate_tokens(module_file.readline) for toktype, toktext, (srow,scol), (erow,ecol), line_str in tok_iter: # Error token: abort if toktype == token.ERRORTOKEN: raise ParseError('Error during parsing: invalid ' 'syntax (%s, line %d)' % (module_doc.filename, lineno)) # Indent token: update the parent_doc stack. elif toktype == token.INDENT: if prev_line_doc is None: parent_docs.append(parent_docs[-1]) else: parent_docs.append(prev_line_doc) groups.append(None) # Dedent token: update the parent_doc stack. elif toktype == token.DEDENT: if line_toks == []: parent_docs.pop() groups.pop() else: # This *should* only happen if the file ends on an # indented line, with no final newline. # (otherwise, this is the wrong thing to do.) pass # Line-internal newline token: if we're still at the start of # the logical line, and we've seen one or more comment lines, # then discard them: blank lines are not allowed between a # comment block and the thing it describes. elif toktype == tokenize.NL: if comments and not line_toks: log.warning('Ignoring docstring comment block followed by ' 'a blank line in %r on line %r' % (module_doc.filename, srow-1)) comments = [] # Comment token: add to comments if appropriate. elif toktype == tokenize.COMMENT: if toktext.startswith(COMMENT_DOCSTRING_MARKER): comment_line = toktext[len(COMMENT_DOCSTRING_MARKER):].rstrip() comments.append( [comment_line, srow]) elif toktext.startswith(START_GROUP_MARKER): start_group = toktext[len(START_GROUP_MARKER):].strip() elif toktext.startswith(END_GROUP_MARKER): for i in range(len(groups)-1, -1, -1): if groups[i]: groups[i] = None break else: log.warning("Got group end marker without a corresponding " "start marker in %r on line %r" % (module_doc.filename, srow)) # Normal token: Add it to line_toks. (If it's a non-unicode # string literal, then we need to re-encode using the file's # encoding, to get back to the original 8-bit data; and then # convert that string with 8-bit data to a 7-bit ascii # representation.) elif toktype != token.NEWLINE and toktype != token.ENDMARKER: if lineno is None: lineno = srow if toktype == token.STRING: str_prefixes = re.match('[^\'"]*', toktext).group() if 'u' not in str_prefixes: s = toktext.encode(encoding) toktext = decode_with_backslashreplace(s) line_toks.append( (toktype, toktext) ) # Decorator line: add it to the decorators list. elif line_toks and line_toks[0] == (token.OP, '@'): decorators.append(shallow_parse(line_toks)) line_toks = [] # End of line token: parse the logical line & process it. else: if start_group: groups[-1] = start_group start_group = None if parent_docs[-1] != 'skip_block': try: prev_line_doc = process_line( shallow_parse(line_toks), parent_docs, prev_line_doc, lineno, comments, decorators) except ParseError: raise ParseError('Error during parsing: invalid ' 'syntax (%s, line %d)' % (module_doc.filename, lineno)) # grouping... if groups[-1] and prev_line_doc: if isinstance(prev_line_doc, VariableDoc): add_to_group(prev_line_doc.container, prev_line_doc, groups[-1]) elif isinstance(parent_docs[-1], NamespaceDoc): add_to_group(parent_docs[-1], prev_line_doc, groups[-1]) else: log.warning("Not in a namespace!") else: prev_line_doc = None # Reset line contents. line_toks = [] lineno = None comments = []
76aa87c4f3f84f87b6c947e3387d535503259a2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/76aa87c4f3f84f87b6c947e3387d535503259a2a/docparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 2978, 67, 2434, 4672, 3536, 2720, 326, 864, 385, 95, 3120, 1759, 1713, 87, 585, 16, 471, 527, 3152, 4656, 358, 1281, 2184, 2553, 316, 716, 585, 18, 225, 657, 6826, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 768, 12, 2978, 67, 2434, 4672, 3536, 2720, 326, 864, 385, 95, 3120, 1759, 1713, 87, 585, 16, 471, 527, 3152, 4656, 358, 1281, 2184, 2553, 316, 716, 585, 18, 225, 657, 6826, ...
interesting = [] indices = []
def add_navigation_cues(files): """Add index, nextid and previd data to a list of files/chunks""" # FIXME: this modifies in-place right now, which is kind of ugly interesting = [] indices = [] for i, file in enumerate(files): file['index'] = i k = 1 for j, chunk in enumerate(file['chunks']): if chunk['change'] != 'equal': interesting.append(chunk) indices.append((i, k)) k += 1 file['num_changes'] = k - 1 for chunk, previous, current, next in zip(interesting, [None] + indices[:-1], indices, indices[1:] + [None]): chunk['index'] = current[1] if previous: chunk['previd'] = '%d.%d' % previous if next: chunk['nextid'] = '%d.%d' % next
7d2f39655e3ed3f54b8c5ee8c6ecc06ecd3bbaa6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1600/7d2f39655e3ed3f54b8c5ee8c6ecc06ecd3bbaa6/diffutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 19537, 67, 71, 3610, 12, 2354, 4672, 3536, 986, 770, 16, 1024, 350, 471, 675, 1246, 501, 358, 279, 666, 434, 1390, 19, 14691, 8395, 468, 9852, 30, 333, 23934, 316, 17, 964, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 19537, 67, 71, 3610, 12, 2354, 4672, 3536, 986, 770, 16, 1024, 350, 471, 675, 1246, 501, 358, 279, 666, 434, 1390, 19, 14691, 8395, 468, 9852, 30, 333, 23934, 316, 17, 964, ...
Node.__init__(self, model, parent) def __str__(self): result = self.method + '(' result += dbus_utils.sig_to_string(self.insig) + ')'
if self.outsig: result += ' -> (' + dbus_utils.sig_to_string(self.outsig) + ')'
def __init__(self, model, parent, method, insig, outsig): self.method = method self.insig = insig self.outsig = outsig Node.__init__(self, model, parent)
29e46f4c980daf59bdf05cd501c0d0ab2f17449d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5682/29e46f4c980daf59bdf05cd501c0d0ab2f17449d/introspect_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 938, 16, 982, 16, 707, 16, 2763, 360, 16, 596, 7340, 4672, 365, 18, 2039, 273, 707, 365, 18, 2679, 360, 273, 2763, 360, 365, 18, 659, 7340, 273, 596, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 938, 16, 982, 16, 707, 16, 2763, 360, 16, 596, 7340, 4672, 365, 18, 2039, 273, 707, 365, 18, 2679, 360, 273, 2763, 360, 365, 18, 659, 7340, 273, 596, ...
_debug("Checking robot.txt allowance for\n%s\n%s" % (useragent, url))
_debug("Checking robot.txt allowance for:\n user agent: %s\n url: %s" % (useragent, url))
def can_fetch(self, useragent, url): """using the parsed robots.txt decide if useragent can fetch url""" _debug("Checking robot.txt allowance for\n%s\n%s" % (useragent, url)) if self.disallow_all: return 0 if self.allow_all: return 1 # search for given user agent matches # the first match counts useragent = useragent.lower() url = urllib.quote(urlparse.urlparse(url)[2]) for entry in self.entries: if entry.applies_to(useragent): return entry.allowance(url) # agent not found ==> access granted return 1
9f1a9dabf26f85b849a5ad0caf005e90629a024c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/9f1a9dabf26f85b849a5ad0caf005e90629a024c/robotparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 67, 5754, 12, 2890, 16, 22649, 16, 880, 4672, 3536, 9940, 326, 2707, 29255, 18, 5830, 16288, 309, 22649, 848, 2158, 880, 8395, 389, 4148, 2932, 14294, 14386, 18, 5830, 1699, 1359, 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, 848, 67, 5754, 12, 2890, 16, 22649, 16, 880, 4672, 3536, 9940, 326, 2707, 29255, 18, 5830, 16288, 309, 22649, 848, 2158, 880, 8395, 389, 4148, 2932, 14294, 14386, 18, 5830, 1699, 1359, 3...
for k, v in self.timeout.items():
for k, v in self.timeout.iteritems():
def check_cache(self): # first check for old ones t = time.time() if self.soonest <= t: for k, v in self.timeout.items(): if v < t: self.cache[k].close() del self.cache[k] del self.timeout[k] self.soonest = min(self.timeout.values())
4a475db0fc3dcf0df82a9a200f2e376b30c16cf4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/4a475db0fc3dcf0df82a9a200f2e376b30c16cf4/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2493, 12, 2890, 4672, 468, 1122, 866, 364, 1592, 5945, 268, 273, 813, 18, 957, 1435, 309, 365, 18, 2048, 265, 395, 1648, 268, 30, 364, 417, 16, 331, 316, 365, 18, 4538, 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, 866, 67, 2493, 12, 2890, 4672, 468, 1122, 866, 364, 1592, 5945, 268, 273, 813, 18, 957, 1435, 309, 365, 18, 2048, 265, 395, 1648, 268, 30, 364, 417, 16, 331, 316, 365, 18, 4538, 18, ...
self.__dict__['validate'] = security.DTMLValidate
if self.__dict__.has_key('validate'): first_time_through = 0 else: self.__dict__['validate'] = security.DTMLValidate first_time_through = 1
def __call__(self, client=None, REQUEST={}, RESPONSE=None, **kw): """Render the document given a client object, REQUEST mapping, Response, and key word arguments."""
2f458b2919d206ec2ab6d79cd23c9c6ceff43b92 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/2f458b2919d206ec2ab6d79cd23c9c6ceff43b92/DTMLMethod.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1004, 33, 7036, 16, 12492, 28793, 20645, 33, 7036, 16, 2826, 9987, 4672, 3536, 3420, 326, 1668, 864, 279, 1004, 733, 16, 12492, 2874, 16, 2306, 16, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 2890, 16, 1004, 33, 7036, 16, 12492, 28793, 20645, 33, 7036, 16, 2826, 9987, 4672, 3536, 3420, 326, 1668, 864, 279, 1004, 733, 16, 12492, 2874, 16, 2306, 16, 471, ...
if ((end - start + 1) != len(data)): raise RegionLengthError, ('Range specified does not match ' 'the length of the data given.')
if ((end - start) != len(data)): raise RegionLengthError, (('Range specified (%d-%d) does not match ' 'the length of the data (%d) given.') % (start, end, len(data)))
def __init__(self, start, end, data): ''' Initializer. Can raise InvalidRegionSpecifiedError and RegionDoesNotMatchLengthError. '''
0e78aa9c1a9fe025aa363307313ea4b93b5fce19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5149/0e78aa9c1a9fe025aa363307313ea4b93b5fce19/dataregion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 787, 16, 679, 16, 501, 4672, 9163, 4378, 3926, 18, 4480, 1002, 1962, 5165, 17068, 668, 471, 9164, 10154, 1248, 2060, 1782, 668, 18, 9163, 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, 1001, 2738, 972, 12, 2890, 16, 787, 16, 679, 16, 501, 4672, 9163, 4378, 3926, 18, 4480, 1002, 1962, 5165, 17068, 668, 471, 9164, 10154, 1248, 2060, 1782, 668, 18, 9163, 2, -100, -100, ...
cmd_text = '\t'
cmd_text = '' if command.errors_to > '': cmd_text += '\trm -f ' + command.errors_to + '\n'
def get_text(self): dep_text = '' for key in self.dependencies: if dep_text=='': dep_text = '\t' + key else: dep_text = dep_text + ' ' + key dep_text = dep_text + '\n' cmd_text = '\t' for key in self.commands.sort_by('sort_order'): command = self.commands[key] if command.errors_to > '': cmd_text += 'rm ' + command.errors_to + '; ' cmd_text += command.command if command.output_to > '': cmd_text += ' > ' + command.output_to if command.errors_to > '': cmd_text += ' 2>>' + command.errors_to cmd_text += '\n' return dep_text + cmd_text
a21f3295a49c6467d3614c8da71599e042fcf3e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6947/a21f3295a49c6467d3614c8da71599e042fcf3e1/Makefile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 955, 12, 2890, 4672, 5993, 67, 955, 273, 875, 364, 498, 316, 365, 18, 11037, 30, 309, 5993, 67, 955, 18920, 4278, 5993, 67, 955, 273, 2337, 88, 11, 397, 498, 469, 30, 5993, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 955, 12, 2890, 4672, 5993, 67, 955, 273, 875, 364, 498, 316, 365, 18, 11037, 30, 309, 5993, 67, 955, 18920, 4278, 5993, 67, 955, 273, 2337, 88, 11, 397, 498, 469, 30, 5993, ...
if '%' in cmd: cmd = cmd % filename
if '%s' in cmd: cmd = cmd.replace("%s", filename)
def expandCommandLine(self, cmd): """Expand the command line to include the filename of the buffer""" filename = self.buffer.url.path.get_name() if '%' in cmd: cmd = cmd % filename else: cmd = "%s %s" % (cmd, filename) return cmd
75b07a205b6b59ee9eedb0df4cf1a4d3d9c94b3a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/75b07a205b6b59ee9eedb0df4cf1a4d3d9c94b3a/jobcontrol.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4542, 21391, 12, 2890, 16, 1797, 4672, 3536, 12271, 326, 1296, 980, 358, 2341, 326, 1544, 434, 326, 1613, 8395, 1544, 273, 365, 18, 4106, 18, 718, 18, 803, 18, 588, 67, 529, 1435, 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, 4542, 21391, 12, 2890, 16, 1797, 4672, 3536, 12271, 326, 1296, 980, 358, 2341, 326, 1544, 434, 326, 1613, 8395, 1544, 273, 365, 18, 4106, 18, 718, 18, 803, 18, 588, 67, 529, 1435, 309,...
log.log( "<eddieElvin>elvinTicker.elvinrrd(), notify successful, key %s" % (key), 8 )
log.log( "<eddieElvin4>elvinTicker.elvinrrd(), notify successful, key %s" % (key), 8 )
def send(self, key, data):
aa32b1c20f46510b6908631b429ef7410713743a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3643/aa32b1c20f46510b6908631b429ef7410713743a/eddieElvin4.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 498, 16, 501, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 12, 2890, 16, 498, 16, 501, 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, ...
_USER = 0
_USER = None
def logout(): global _SOCK, _USER, _USERNAME, _SESSION, _DATABASE, _VIEW_CACHE, SECURE if _SOCK and _USER: try: _SEMAPHORE.acquire() try: args = (_DATABASE, _USER, _SESSION, 'common', 'db', 'logout') logging.getLogger('rpc.request').info(repr(args)) _SOCK.sock.settimeout(pysocket.CONNECT_TIMEOUT) _SOCK.send(args) res = _SOCK.receive() logging.getLogger('rpc.result').debug(repr(res)) finally: _SEMAPHORE.release() except: pass _SOCK.disconnect() _SOCK = None _USER = 0 _USERNAME = '' _SESSION = '' _DATABASE = '' _VIEW_CACHE = {} SECURE = False
92c76ea05ac98f48b25e166e881fd70ac3180818 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9151/92c76ea05ac98f48b25e166e881fd70ac3180818/rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12735, 13332, 2552, 389, 3584, 3507, 16, 389, 4714, 16, 389, 21292, 16, 389, 7042, 16, 389, 22366, 16, 389, 12145, 67, 8495, 16, 31418, 4830, 309, 389, 3584, 3507, 471, 389, 4714, 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, 12735, 13332, 2552, 389, 3584, 3507, 16, 389, 4714, 16, 389, 21292, 16, 389, 7042, 16, 389, 22366, 16, 389, 12145, 67, 8495, 16, 31418, 4830, 309, 389, 3584, 3507, 471, 389, 4714, 30, ...
self._position = map(float, (x1, y1))
self._position = (float(x1), float(y1))
def _goto(self, x1, y1): x0, y0 = self._position self._position = map(float, (x1, y1)) if self._filling: self._path.append(self._position) if self._drawing: if self._tracing: dx = float(x1 - x0) dy = float(y1 - y0) distance = hypot(dx, dy) nhops = int(distance) item = self._canvas.create_line(x0, y0, x0, y0, width=self._width, capstyle="round", fill=self._color) try: for i in range(1, 1+nhops): x, y = x0 + dx*i/nhops, y0 + dy*i/nhops self._canvas.coords(item, x0, y0, x, y) self._draw_turtle((x,y)) self._canvas.update() self._canvas.after(self._delay) # in case nhops==0 self._canvas.coords(item, x0, y0, x1, y1) self._canvas.itemconfigure(item, arrow="none") except Tkinter.TclError: # Probably the window was closed! return else: item = self._canvas.create_line(x0, y0, x1, y1, width=self._width, capstyle="round", fill=self._color) self._items.append(item) self._draw_turtle()
2f073a68aebfe15f6967ebba4d6d0ba59563fea6 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/2f073a68aebfe15f6967ebba4d6d0ba59563fea6/turtle.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 75, 6302, 12, 2890, 16, 619, 21, 16, 677, 21, 4672, 619, 20, 16, 677, 20, 273, 365, 6315, 3276, 365, 6315, 3276, 273, 261, 5659, 12, 92, 21, 3631, 1431, 12, 93, 21, 3719, 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, 75, 6302, 12, 2890, 16, 619, 21, 16, 677, 21, 4672, 619, 20, 16, 677, 20, 273, 365, 6315, 3276, 365, 6315, 3276, 273, 261, 5659, 12, 92, 21, 3631, 1431, 12, 93, 21, 3719, 309,...
if go_interactive or os.environ.get('PYTHONINSPECT'): python_startup = os.environ.get('PYTHONSTARTUP')
if go_interactive or os.getenv('PYTHONINSPECT'): python_startup = os.getenv('PYTHONSTARTUP')
def run_it(): import runpy runpy.run_module(sys.argv[0], None, '__main__', True)
0d58b876b1ec78c9bc61907ec8ab0683fbf60bbc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/0d58b876b1ec78c9bc61907ec8ab0683fbf60bbc/app_main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 305, 13332, 1930, 1086, 2074, 1086, 2074, 18, 2681, 67, 2978, 12, 9499, 18, 19485, 63, 20, 6487, 599, 16, 4940, 5254, 972, 2187, 1053, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 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, 1086, 67, 305, 13332, 1930, 1086, 2074, 1086, 2074, 18, 2681, 67, 2978, 12, 9499, 18, 19485, 63, 20, 6487, 599, 16, 4940, 5254, 972, 2187, 1053, 13, 2, -100, -100, -100, -100, -100, -1...
zero = pack("I", 0)
def __doVerify(self): if self.rpmgroup not in (None, RPM_STRING, RPM_I18NSTRING): self.printErr("rpmgroup out of range") self.__verifyWriteHeader(self.hdr.hash, rpmtag, "immutable", self.hdrdata, 1, self.rpmgroup) if self.strict: self.__verifyWriteHeader(self.sig.hash, rpmsigtag, "header_signatures", self.sigdata, 0, None) # disable the utf-8 test per default, should check against self.verbose: if self.strict: for i in ("summary", "description", "changelogtext"): if self[i] == None: continue for j in self[i]: try: j.decode("utf-8") except: self.printErr("not utf-8 in %s" % i) #self.printErr("text: %s" % j) break if (self.strict and self["name"][:6] == "kernel" and self["name"] not in ("kernel-utils", "kernel-doc", "kernel-pcmcia-cs", "kernel-debuginfo", "kernel-ib", "kernel-headers") and not self.isInstallonly()): self.printErr("possible kernel rpm") for i in ("md5",): if not self.sig.has_key(i): self.printErr("sig header is missing: %s" % i) for i in ("name", "version", "release", "arch", "rpmversion"): if not self.hdr.has_key(i): self.printErr("hdr is missing: %s" % i) size_in_sig = self.sig.getOne("size_in_sig") if size_in_sig != None and not isUrl(self.filename): rpmsize = os.stat(self.filename).st_size if rpmsize != 96 + self.sigdatasize + size_in_sig: self.printErr("wrong size in rpm package: %d / %d" % \ (rpmsize, 96 + self.sigdatasize + size_in_sig)) filenames = self.getFilenames() if self.issrc: i = self.getSpecfile(filenames) if i == None: self.printErr("no specfile found in src.rpm") else: if self.strict and not filenames[i].endswith(".spec"): self.printErr("specfile does not end with .spec") #if self.strict and filenames[i] != self["name"] + ".spec": # self.printErr("specfile not using default name: %s" % \ # filenames[i]) if self["sourcerpm"] != None: self.printErr("binary rpm does contain sourcerpm tag") else: if self["sourcerpm"] == None: self.printErr("source rpm does not contain sourcerpm tag") if self["triggerscripts"] != None: if len(self["triggerscripts"]) != len(self["triggerscriptprog"]): self.printErr("wrong trigger lengths") if self.strict: for i in ("-", ":"): if i in self["version"] or i in self["release"]: self.printErr("version/release contains wrong char") for i in (",", " ", "\t"): if (i in self["name"] or i in self["version"] or i in self["release"]): self.printErr("name/version/release contains wrong char") if self["payloadformat"] not in [None, "cpio", "drpm"]: self.printErr("wrong payload format %s" % self["payloadformat"]) if self.strict: if self["payloadcompressor"] not in [None, "gzip"]: self.printErr("no gzip compressor: %s" % \ self["payloadcompressor"]) else: if self["payloadcompressor"] not in [None, "gzip", "bzip2"]: self.printErr("no gzip/bzip2 compressor: %s" % \ self["payloadcompressor"]) if self.strict and self["payloadflags"] not in ["9"]: self.printErr("no payload flags: %s" % self["payloadflags"]) if self.strict and self["os"] not in ["Linux", "linux"]: self.printErr("bad os: %s" % self["os"]) elif self["os"] not in ["Linux", "linux", "darwin"]: self.printErr("bad os: %s" % self["os"]) if self.strict: if self["packager"] not in (None, "Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>", "Fedora Project <http://bugzilla.redhat.com/bugzilla>", "Matthias Saou <matthias@rpmforge.net>"): self.printErr("unknown packager: %s" % self["packager"]) if self["vendor"] not in (None, "Red Hat, Inc.", "Fedora Project", "Livna.org RPMS", "Freshrpms.net"): self.printErr("unknown vendor: %s" % self["vendor"]) if self["distribution"] not in (None, "Red Hat", "Red Hat Linux", "Red Hat FC-3", "Red Hat (FC-3)", "Red Hat (FC-4)", "Red Hat (FC-5)", "Red Hat (FC-6)", "Red Hat (FC-7)", "Fedora Extras", "Red Hat (scratch)", "Red Hat (RHEL-3)", "Red Hat (RHEL-4)", "Red Hat (RHEL-5)"): self.printErr("unknown distribution: %s" % self["distribution"]) arch = self["arch"] if self["rhnplatform"] not in (None, arch): self.printErr("unknown arch for rhnplatform") if self.strict: if os.path.basename(self.filename) != self.getFilename(): self.printErr("bad filename: %s" % self.filename) if self["platform"] not in (None, "", arch + "-redhat-linux-gnu", arch + "-redhat-linux", "--target=${target_platform}", arch + "-unknown-linux", "--target=${TARGET_PLATFORM}", "--target=$TARGET_PLATFORM"): self.printErr("unknown arch %s" % self["platform"]) if self["exclusiveos"] not in (None, ["Linux"], ["linux"]): self.printErr("unknown os %s" % self["exclusiveos"]) if self.strict: if self["buildarchs"] not in (None, ["noarch"]): self.printErr("bad buildarch: %s" % self["buildarchs"]) if self["excludearch"] != None: for i in self["excludearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) if self["exclusivearch"] != None: for i in self["exclusivearch"]: if not possible_archs.has_key(i): self.printErr("new possible arch %s" % i) for (s, p) in (("prein", "preinprog"), ("postin", "postinprog"), ("preun", "preunprog"), ("postun", "postunprog"), ("verifyscript", "verifyscriptprog")): (script, prog) = (self[s], self[p]) if script != None and prog == None: self.printErr("no prog") if self.strict: if ((not isinstance(prog, basestring) and prog != None) or not possible_scripts.has_key(prog)): self.printErr("unknown prog: %s" % prog) if script == None and prog == "/bin/sh": self.printErr("empty script: %s" % s) if script != None and isCommentOnly(script): self.printErr("empty(2) script: %s" % s) # some verify tests are also in these functions: for (n, f, v) in (("providename", "provideflags", "provideversion"), ("requirename", "requireflags", "requireversion"), ("obsoletename", "obsoleteflags", "obsoleteversion"), ("conflictname", "conflictflags", "conflictversion"), ("triggername", "triggerflags", "triggerversion")): self.__verifyDeps(n, f, v) if not self.issrc: provs = self._getDeps("providename", "provideflags", "provideversion") mydep = (self["name"], RPMSENSE_EQUAL, self.getEVR()) ver = self["rpmversion"] # AS2.1 still has compat rpms which need this: if ver != None and ver[:4] < "4.3." and mydep not in provs: provs.append(mydep) if mydep not in provs: self.printErr("no provides for own rpm package, rpm=%s" % ver) self.getTriggers() # Check for /tmp/ and /usr/src in the provides: if self.strict and self["providename"]: for n in self["providename"]: if n.find("/tmp/") != -1 or n.find("/usr/src") != -1: self.printErr("suspicous provides: %s" % n)
e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 8097, 12, 2890, 4672, 309, 365, 18, 86, 7755, 1655, 486, 316, 261, 7036, 16, 534, 12728, 67, 5804, 16, 534, 12728, 67, 45, 2643, 50, 5804, 4672, 365, 18, 1188, 2524, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2896, 8097, 12, 2890, 4672, 309, 365, 18, 86, 7755, 1655, 486, 316, 261, 7036, 16, 534, 12728, 67, 5804, 16, 534, 12728, 67, 45, 2643, 50, 5804, 4672, 365, 18, 1188, 2524, 2932, ...
fixLDPath(*positionalArgs)
fixLDPath( *positionalArgs )
def fixLDPath( root, ldpath, directory): """ This is a utility to fix the LD_LIBRARY_PATH on Grid WNs. The shared libraries from the original LD_LIBRARY_PATH are linked to the locally specified directory. For Windows (and in general) this needs some refurbishment. """ if os.path.exists(directory): shutil.rmtree(directory) start = os.getcwd() os.mkdir(directory) os.chdir(directory) uniqueLD = uniquePath(ldpath) if DEBUG: print 'Unique LD LIBRARY PATH is:' print uniqueLD sys.stdout.flush() ldlist = string.split(uniqueLD,':') if DEBUG: print '' print 'LD List is:' print ldlist print '' sys.stdout.flush() for path in ldlist: if os.path.exists(path): if DEBUG: print 'Searching for shared libraries in:' print path print '-----------------------------------------------' res = shellCall(0,'ls '+path+'/*.so*') if res['OK']: print res['Value'] else: print res print '-----------------------------------------------' output = shellCall(0,'ls '+path+'/*.so*') #must be tidied for Windows (same below) if DEBUG: if not output['OK']: print '**************************' print 'Warning, problem with ls:' print output print '**************************' if not output['Value'][0]: ldlibs = output['Value'][1].split('\n') for lib in ldlibs: if os.path.exists(lib): filename = os.path.basename(lib) output = shellCall(0,'ln -s '+str(lib)+' '+str(filename)) #N.B. for Windows this should be a copy... if DEBUG: if not output['OK']: print '********************************' print 'Warning, problem creating link:' print 'File: ',filename print 'Path: ',lib print output print '********************************' if DEBUG: print 'Searching for rootmap file in:' print path print '-----------------------------------------------' res = shellCall(0,'ls '+path+'/*rootmap*') if res['OK']: print res['Value'] else: print res print '-----------------------------------------------' output = shellCall(0,'ls '+path+'/*rootmap*') if DEBUG: if not output['OK']: print '**************************' print 'Warning, problem with rootmap:' print output print '**************************' if not output['Value'][0]: ldlibs = output['Value'][1].split('\n') for lib in ldlibs: if os.path.exists(lib): if re.search('RELAX',lib) is not None: filename = os.path.basename(lib) output = shellCall(0,'ln -s '+str(lib)+' '+str(filename)) if DEBUG: if not output['OK']: print '********************************' print 'Warning, problem creating link:' print 'File: ',filename print 'Path: ',lib print output print '********************************' os.chdir(start) sys.stdout.flush()
9b8eea7ba28a2770fdfbf806c3e35df73cf645a1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9b8eea7ba28a2770fdfbf806c3e35df73cf645a1/dirac-fix-ld-library-path.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 12069, 743, 12, 1365, 16, 16916, 803, 16, 1867, 4672, 3536, 1220, 353, 279, 12788, 358, 2917, 326, 28083, 67, 2053, 28254, 67, 4211, 603, 7145, 678, 10386, 18, 1021, 5116, 14732, 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, 2917, 12069, 743, 12, 1365, 16, 16916, 803, 16, 1867, 4672, 3536, 1220, 353, 279, 12788, 358, 2917, 326, 28083, 67, 2053, 28254, 67, 4211, 603, 7145, 678, 10386, 18, 1021, 5116, 14732, 6...
self.persistent = True
def save(self): prefix = self.get_fileprefix(saving=True) if self.preview is None: self.preview = gdk.Pixbuf(gdk.COLORSPACE_RGB, False, 8, preview_w, preview_h) self.preview.fill(0xffffffff) # white self.preview.save(prefix + '_prev.png', 'png') brushinfo = self.brushinfo.clone() open(prefix + '.myb', 'w').write(brushinfo.serialize()) self.remember_mtimes() self.persistent = True
3606ad6d6c04adbfdcddc11a94ae35485e1e5e7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/3606ad6d6c04adbfdcddc11a94ae35485e1e5e7c/brushmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 1633, 273, 365, 18, 588, 67, 768, 3239, 12, 87, 5339, 33, 5510, 13, 309, 365, 18, 12102, 353, 599, 30, 365, 18, 12102, 273, 314, 2883, 18, 21816, 4385, 12, 75, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 4672, 1633, 273, 365, 18, 588, 67, 768, 3239, 12, 87, 5339, 33, 5510, 13, 309, 365, 18, 12102, 353, 599, 30, 365, 18, 12102, 273, 314, 2883, 18, 21816, 4385, 12, 75, ...
os.stat(djvu) if not index: import os.path index = os.path.basename(djvu)
if djvu: os.stat(djvu) if not index: import os.path index = os.path.basename(djvu)
def main(): import os index = None djvu = None pages = None # what would have been changed. debug = False ask = False # Parse command line arguments for arg in wikipedia.handleArgs(): if arg.startswith("-debug"): debug = True elif arg.startswith("-ask"): ask = True elif arg.startswith("-djvu:"): djvu = arg[6:] elif arg.startswith("-index:"): index = arg[7:] elif arg.startswith("-pages:"): pages = arg[7:] else: print "Unknown argument %s" % arg # Check the djvu file exists os.stat(djvu) if not index: import os.path index = os.path.basename(djvu) if djvu and index: site = wikipedia.getSite() index_page = wikipedia.Page(site, index) if site.family.name != 'wikisource': raise wikipedia.PageNotFound("Found family '%s'; Wikisource required.") if not index_page.exists() and index_page.namespace() == 0: index_namespace = wikipedia.Page(site, 'MediaWiki:Proofreadpage index namespace').get() index_page = wikipedia.Page(wikipedia.getSite(), u"%s:%s" % (index_namespace, index)) if not index_page.exists(): raise wikipedia.NoPage("Page '%s' does not exist" % index) wikipedia.output("uploading text from %s to %s" % (djvu, index_page) ) bot = DjVuTextBot(djvu, index, pages) if not bot.has_text(): raise ValueError("No text layer in djvu file") bot.ask = ask bot.run() else: wikipedia.showHelp()
e9c45dd98a097293a103007d1b44df4e96ec935d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/e9c45dd98a097293a103007d1b44df4e96ec935d/djvutext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1930, 1140, 770, 273, 599, 19754, 90, 89, 273, 599, 4689, 273, 599, 468, 4121, 4102, 1240, 2118, 3550, 18, 1198, 273, 1083, 6827, 273, 1083, 225, 468, 2884, 1296, 980, 1775,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1930, 1140, 770, 273, 599, 19754, 90, 89, 273, 599, 4689, 273, 599, 468, 4121, 4102, 1240, 2118, 3550, 18, 1198, 273, 1083, 6827, 273, 1083, 225, 468, 2884, 1296, 980, 1775,...
self.SCIMarkerDefine(MARKER_BOOKMARK, SC_MARK_ROUNDRECT) self.SCIMarkerSetBack(MARKER_BOOKMARK, win32api.RGB(0, 0xff, 0xff)) self.SCIMarkerSetFore(MARKER_BOOKMARK, win32api.RGB(0x0, 0x0, 0x0))
self.SCIMarkerDefineAll(MARKER_BOOKMARK, SC_MARK_ROUNDRECT, win32api.RGB(0x0, 0x0, 0x0), win32api.RGB(0, 0xff, 0xff))
def OnInitialUpdate(self): SyntEditViewParent.OnInitialUpdate(self)
bde2b36427952e5a440b69d730492c25914ed5b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/bde2b36427952e5a440b69d730492c25914ed5b9/coloreditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4435, 1891, 12, 2890, 4672, 16455, 496, 4666, 1767, 3054, 18, 1398, 4435, 1891, 12, 2890, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 4435, 1891, 12, 2890, 4672, 16455, 496, 4666, 1767, 3054, 18, 1398, 4435, 1891, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
for mlist in advertised: table.AddRow( [Link(mlist.GetScriptURL('listinfo'), Bold(mlist.real_name)), mlist.description or Italic(_('[no description available]'))])
highlight = 1 for mlist in advertised: table.AddRow( [Link(mlist.GetScriptURL('listinfo'), Bold(mlist.real_name)), mlist.description or Italic(_('[no description available]'))]) if highlight and mm_cfg.WEB_HIGHLIGHT_COLOR: table.AddRowInfo(table.GetCurrentRowIndex(), bgcolor=mm_cfg.WEB_HIGHLIGHT_COLOR) highlight = not highlight
def listinfo_overview(msg=''): # Present the general listinfo overview hostname = Utils.get_domain() # Set up the document and assign it the correct language. The only one we # know about at the moment is the server's default. doc = Document() doc.set_language(mm_cfg.DEFAULT_SERVER_LANGUAGE) legend = _("%(hostname)s Mailing Lists") doc.SetTitle(legend) table = Table(border=0, width="100%") table.AddRow([Center(Header(2, legend))]) table.AddCellInfo(table.GetCurrentRowIndex(), 0, colspan=2, bgcolor=mm_cfg.WEB_HEADER_COLOR) # Skip any mailing lists that isn't advertised. advertised = [] listnames = Utils.list_names() listnames.sort() for name in listnames: mlist = MailList.MailList(name, lock=0) if mlist.advertised: if mm_cfg.VIRTUAL_HOST_OVERVIEW and \ hostname and \ hostname.find(mlist.web_page_url) == -1 and \ mlist.web_page_url.find(hostname) == -1: # List is for different identity of this host - skip it. continue else: advertised.append(mlist) if msg: greeting = FontAttr(msg, color="ff5060", size="+1") else: greeting = FontAttr(_('Welcome!'), size='+2') welcome = [greeting] mailmanlink = Link(mm_cfg.MAILMAN_URL, _('Mailman')).Format() if not advertised: welcome.extend( _('''<p>There currently are no publicly-advertised %(mailmanlink)s mailing lists on %(hostname)s.''')) else: welcome.append( _('''<p>Below is a listing of all the public mailing lists on %(hostname)s. Click on a list name to get more information about the list, or to subscribe, unsubscribe, and change the preferences on your subscription.''')) # set up some local variables adj = msg and _('right') or '' welcome.extend( (_(''' To visit the info page for an unadvertised list, a URL similar to this one, but with a '/' and the %(adj)s list name appended. <p>List administrators, you can visit '''), Link(Utils.ScriptURL('admin'), _('the list admin overview page')), _(''' to find the management interface for your list. <p>Send questions or comments to '''), Link('mailto:' + mm_cfg.MAILMAN_OWNER, mm_cfg.MAILMAN_OWNER), '.<p>')) table.AddRow([apply(Container, welcome)]) table.AddCellInfo(max(table.GetCurrentRowIndex(), 0), 0, colspan=2) if advertised: table.AddRow(['&nbsp;', '&nbsp;']) table.AddRow([Bold(FontAttr(_('List'), size='+2')), Bold(FontAttr(_('Description'), size='+2')) ]) for mlist in advertised: table.AddRow( [Link(mlist.GetScriptURL('listinfo'), Bold(mlist.real_name)), mlist.description or Italic(_('[no description available]'))]) doc.AddItem(table) doc.AddItem('<hr>') doc.AddItem(MailmanLogo()) print doc.Format()
457309d68529d31bbc8ba1ac3fe2bb43e019908e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/457309d68529d31bbc8ba1ac3fe2bb43e019908e/listinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 1376, 67, 26081, 12, 3576, 2218, 11, 4672, 468, 25130, 326, 7470, 666, 1376, 18471, 5199, 273, 6091, 18, 588, 67, 4308, 1435, 468, 1000, 731, 326, 1668, 471, 2683, 518, 326, 3434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 666, 1376, 67, 26081, 12, 3576, 2218, 11, 4672, 468, 25130, 326, 7470, 666, 1376, 18471, 5199, 273, 6091, 18, 588, 67, 4308, 1435, 468, 1000, 731, 326, 1668, 471, 2683, 518, 326, 3434, ...
for j in xrange(10): x = matrix.col([ random.uniform(0,1) for k in xrange(3) ]).normalize()
for j in xrange(n_sub_trials): x = matrix.col([ rnd.random() for k in xrange(3) ]).normalize()
def exercise_ellipsoid(): for i in xrange(100): half_lengths = matrix.col([ random.random() for k in xrange(3) ]) r = scitbx.math.euler_angles_as_matrix( [ random.uniform(0, 360) for i in xrange(3) ], deg=True) u_cart = r.transpose() * matrix.diag([ x**2 for x in half_lengths ]) * r es = adptbx.eigensystem(u_cart.as_sym_mat3()) t = adptbx.sphere_to_ellipsoid_transform(es) m = matrix.sqr(t.matrix()) for j in xrange(10): x = matrix.col([ random.uniform(0,1) for k in xrange(3) ]).normalize() y = m*x c = y.transpose() * u_cart.inverse() * y approx_equal(c[0], 1) r = scitbx.math.euler_angles_as_matrix((30, 115, 260), deg=True) u_cart = r.transpose() * matrix.diag((-1, 0.1, 1)) * r es = adptbx.eigensystem(u_cart.as_sym_mat3()) t = adptbx.sphere_to_ellipsoid_transform(es) assert t.ill_defined() try: t.matrix() except RuntimeError: pass else: raise Exception_expected
41e8b9223bde751cbbe234221497b2044781b980 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/696/41e8b9223bde751cbbe234221497b2044781b980/tst_adptbx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 292, 11693, 839, 13332, 364, 277, 316, 12314, 12, 6625, 4672, 8816, 67, 14907, 273, 3148, 18, 1293, 3816, 2744, 18, 9188, 1435, 364, 417, 316, 12314, 12, 23, 13, 308, 13, 43...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 67, 292, 11693, 839, 13332, 364, 277, 316, 12314, 12, 6625, 4672, 8816, 67, 14907, 273, 3148, 18, 1293, 3816, 2744, 18, 9188, 1435, 364, 417, 316, 12314, 12, 23, 13, 308, 13, 43...
def __init__(self,name): self.name = name self.namespace = '' self.webservice = '' self.typeobj = '' self.ports = [] self.isRequestType = False self.isEmptySequence = False self.isExtension = False self.ExtensionBase = ''
def __init__(self,name): self.name = name self.namespace = '' self.webservice = '' self.typeobj = '' self.ports = [] self.attributes = [] self.hasAttributes = False self.isRequestType = False self.isEmptySequence = False self.isExtension = False self.ExtensionBase = ''
def __init__(self,name): self.name = name self.namespace = '' self.webservice = '' self.typeobj = '' #Enumeration, ComplexType or Method self.ports = [] self.isRequestType = False self.isEmptySequence = False self.isExtension = False self.ExtensionBase = ''
20aa04df673c3b6b6ec0733936c365b6bf28189a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/20aa04df673c3b6b6ec0733936c365b6bf28189a/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 529, 4672, 365, 18, 529, 273, 508, 365, 18, 4937, 273, 875, 365, 18, 1814, 20015, 273, 875, 365, 18, 723, 2603, 273, 875, 282, 468, 21847, 16, 16060, 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, 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, 529, 4672, 365, 18, 529, 273, 508, 365, 18, 4937, 273, 875, 365, 18, 1814, 20015, 273, 875, 365, 18, 723, 2603, 273, 875, 282, 468, 21847, 16, 16060, 5...
pos = 1 for id in views: bits[id] = pos pos = pos * 2 print bits
pos = 0 for viewId in views: bits[viewId] = 1<<pos pos += 1 print " - %s has bit %s" % (viewId, bits[viewId])
def processViews(views, loadDeps, runDeps, output): global classes print ">>> Analysing %s views..." % len(views) classCounts = {} # Generating data structures for possible modules classMods = {} # for id in views: # Hint: IDs # # apiviewer # feedreader # webmail # apiviewer-feedreader # apiviewer-webmail # feedreader-webmail # apiviewer-feedreader-webmail # # Find all classes allIncludes = [] for id in views: allIncludes.extend(views[id]) allClasses = resolveDependencies(allIncludes, [], loadDeps, runDeps) print " - Using %s classes" % len(allClasses) # Caching dependencies of each view deps = {} for viewId in views: # Exclude all features of other views # and handle dependencies the smart way => # also exclude classes only needed by the # already excluded features exclude = [] for subViewId in views: if subViewId != viewId: exclude.extend(views[subViewId]) # Finally resolve the dependencies deps[viewId] = resolveDependencies(views[viewId], exclude, loadDeps, runDeps) print " - %s use %s classes" % (viewId, len(deps[viewId])) # Build bitmask ids for views # 1,2,4,8,16,32,64,128 bits = {} pos = 1 for id in views: bits[id] = pos pos = pos * 2 print bits
81b747f6b630b33c32656070c873a9a09a9e6100 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5718/81b747f6b630b33c32656070c873a9a09a9e6100/generator2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 16, 876, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 9959, 12, 7061, 16, 1262, 14430, 16, 1086, 14430, 16, 876, 4672, 2552, 3318, 225, 1172, 315, 23012, 1922, 3646, 310, 738, 87, 7361, 7070, 738, 562, 12, 7061, 13, 225, 667, 9211, ...
end_time_s = {} end_time_ns = {}
end_time = {}
def populate_inspiral_tables(MBTA_frame, set_keys = MBTA_set_keys, \ event_id_dict = insp_event_id_dict): """ create xml file and populate the SnglInspiral and CoincInspiral tables from a coinc .gwf file from MBTA xmldoc: xml file to append the tables to MBTA_frame: frame file to get info about triggers from set_keys: columns in the SnglInspiral Table to set process_id: process_id event_id_dict: {ifo:event_id} dictionary to assign event_id's coinc_event_id: coinc_event_id detectors: detectors participating in the coinc returns xmldoc and contents of the comment field """ #initialize xml document xmldoc = ligolw.Document() xmldoc.appendChild(ligolw.LIGO_LW()) #dictionaries to store about individual triggers end_time_s = {} end_time_ns = {} snr = {} mass1 = {} mass2 = {} Deff = {} mchirp = {} eta = {} #extract the information from the frame file events = Fr.frgetevent(MBTA_frame) #get the ifos from the event name for event in events: if 'MbtaHLV' in event['name']: detectors = H1L1V1_detlist elif 'MbtaHL' in event['name']: detectors = H1L1_detlist elif 'MbtaHV' in event['name']: detectors = H1V1_detlist elif 'MbtaH' in event['name']: detectors = H1_detlist elif 'MbtaLV' in event['name']: detectors = L1V1_detlist elif 'MbtaL' in event['name']: detectors = L1_detlist elif 'MbtaV' in event['name']: detectors = V1_detlist else: raise ValueError, "Invalid FrEvent name" log_data = event['comment'] + '\n' far = [line.split(':')[1].split()[0] for line in log_data.splitlines() if \ 'False Alarm Rate' in line][0] for ifo in detectors: end_time_s[ifo], end_time_ns[ifo] = str(event[ifo+':end_time']).split('.') snr[ifo] = float(event[ifo+':SNR']) mass1[ifo] = float(event[ifo+':mass1']) mass2[ifo] = float(event[ifo+':mass2']) mchirp[ifo], eta[ifo] = compute_mchirp_eta(mass1[ifo],mass2[ifo]) Deff[ifo] = float(event[ifo+':eff_distance']) #fill the SnglInspiralTable sin_table = lsctables.New(lsctables.SnglInspiralTable) xmldoc.childNodes[0].appendChild(sin_table) process_id = lsctables.ProcessTable.get_next_id() for ifo in detectors: row = sin_table.RowType() row.ifo = ifo row.search = 'MBTA' row.end_time = int(end_time_s[ifo]) row.end_time_ns = int(end_time_ns[ifo]) row.mass1 = mass1[ifo] row.mass2 = mass2[ifo] row.mchirp = mchirp[ifo] row.mtotal = mass1[ifo] + mass2[ifo] row.eta = eta[ifo] row.snr = snr[ifo] row.eff_distance = Deff[ifo] row.event_id = event_id_dict[ifo] row.process_id = process_id row.channel = '' #zero out the rest of the columns #should work in chi2 and chi2cut for key in sin_table.validcolumns.keys(): if key not in set_keys: setattr(row,key,None) sin_table.append(row) #CoincInspiralTable #using the conventions found in: #https://www.lsc-group.phys.uwm.edu/ligovirgo/cbcnote/S6Plan/ #090505160219S6PlanningNotebookCoinc_and_Experiment_Tables_ihope_implementation? #highlight=%28coinc%29|%28table%29 temp_data_loc = None if len(detectors) < 2: return xmldoc, log_data, temp_data_loc #coinc_event_id = coinc_event_id_base + str(UID) cin_table = lsctables.New(lsctables.CoincInspiralTable) xmldoc.childNodes[0].appendChild(cin_table) row = cin_table.RowType() row.set_ifos(detectors) cid = lsctables.CoincTable.get_next_id() row.coinc_event_id = cid row.end_time = int(end_time_s['H1']) row.end_time_ns = int(end_time_ns['H1']) row.mass = (sum(mass1.values()) + sum(mass2.values()))/3 row.mchirp = sum(mchirp.values())/3 #the snr here is really the snr NOT effective snr row.snr = pow(sum([x*x for x in snr.values()]),0.5) #far is triggers/day row.false_alarm_rate = float(far) row.combined_far = 0 cin_table.append(row) xmldoc = populate_coinc_tables(xmldoc,cid,insp_event_id_dict,\ InspiralCoincDef,detectors) return xmldoc, log_data, temp_data_loc
786901062b849410a8247f6881002d3dc4e6cee9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3589/786901062b849410a8247f6881002d3dc4e6cee9/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 67, 267, 1752, 481, 287, 67, 9373, 12, 7969, 9833, 67, 3789, 16, 444, 67, 2452, 273, 17897, 9833, 67, 542, 67, 2452, 16, 521, 871, 67, 350, 67, 1576, 273, 316, 1752, 67, 2575, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6490, 67, 267, 1752, 481, 287, 67, 9373, 12, 7969, 9833, 67, 3789, 16, 444, 67, 2452, 273, 17897, 9833, 67, 542, 67, 2452, 16, 521, 871, 67, 350, 67, 1576, 273, 316, 1752, 67, 2575, ...
verbose_write(str(self) + " started")
def setUp(self): verbose_write(self) self.serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) verbose_write(str(self) + " socket created") global PORT PORT = test_support.bind_port(self.serv, HOST, PORT) verbose_write(str(self) + " start listening") self.serv.listen(1) verbose_write(str(self) + " started")
94c52b456919e43021e0d219db4595f8bac9df47 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/94c52b456919e43021e0d219db4595f8bac9df47/test_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 3988, 67, 2626, 12, 2890, 13, 365, 18, 23039, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 365, 18, 23039, 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, 24292, 12, 2890, 4672, 3988, 67, 2626, 12, 2890, 13, 365, 18, 23039, 273, 2987, 18, 7814, 12, 7814, 18, 6799, 67, 18819, 16, 2987, 18, 3584, 3507, 67, 13693, 13, 365, 18, 23039, 18, ...
if vals.has_key('alarm_id'):
if vals.has_key('alarm_id') or vals.has_key('caldav_alarm_id'):
def write(self, cr, uid, ids, vals, context=None, check=True, update_check=True): if isinstance(ids, (str, int, long)): select = [ids] else: select = ids new_ids = [] for id in select: id = caldav_id2real_id(id) if not id in new_ids: new_ids.append(id) res = super(calendar_event, self).write(cr, uid, new_ids, vals, context=context) if vals.has_key('alarm_id'): alarm_obj = self.pool.get('res.alarm') alarm_obj.do_alarm_create(cr, uid, new_ids, self._name, 'date') return res
1011c0fffa29564de054c4e0235c2e6b107e1fa2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/1011c0fffa29564de054c4e0235c2e6b107e1fa2/caldav.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 16, 866, 33, 5510, 16, 1089, 67, 1893, 33, 5510, 4672, 309, 1549, 12, 2232, 16, 261, 701, 16, 509, 16, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 33, 7036, 16, 866, 33, 5510, 16, 1089, 67, 1893, 33, 5510, 4672, 309, 1549, 12, 2232, 16, 261, 701, 16, 509, 16, 15...
odata = ''.join(np.out.splitlines()[1:-1])
odata = ''.join(np.out.splitlines()[1:-2])
def render(self, req, mimetype, content, filename=None, rev=None): cmdline = self.config.get('mimeviewer', 'php_path') # -n to ignore php.ini so we're using default colors cmdline += ' -sn' self.env.log.debug("PHP command line: %s" % cmdline) content = content_to_unicode(self.env, content, mimetype) content = content.encode('utf-8') np = NaivePopen(cmdline, content, capturestderr=1) if np.errorlevel or np.err: err = 'Running (%s) failed: %s, %s.' % (cmdline, np.errorlevel, np.err) raise Exception, err odata = ''.join(np.out.splitlines()[1:-1]) if odata.startswith('X-Powered-By'): raise TracError, 'You appear to be using the PHP CGI binary. ' \ 'Trac requires the CLI version for syntax ' \ 'highlighting.'
c4383fe7f52e581fd7efd65ae9315ec01aec83a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/c4383fe7f52e581fd7efd65ae9315ec01aec83a8/php.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 4672, 22877, 273, 365, 18, 1425, 18, 588, 2668, 11757, 25256, 2187, 296, 2684, 67, 803, 6134, 468,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 1111, 16, 12595, 16, 913, 16, 1544, 33, 7036, 16, 5588, 33, 7036, 4672, 22877, 273, 365, 18, 1425, 18, 588, 2668, 11757, 25256, 2187, 296, 2684, 67, 803, 6134, 468,...
sage: sr = mq.SR(10,4,4,8)
sage: sr = mq.SR(10, 4, 4, 8)
def base_ring(self): """ Return the base field of self as determined through self.e.
62424369e932ac59629cb4d40b7e47ae2a712293 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/62424369e932ac59629cb4d40b7e47ae2a712293/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1026, 67, 8022, 12, 2890, 4672, 3536, 2000, 326, 1026, 652, 434, 365, 487, 11383, 3059, 365, 18, 73, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1026, 67, 8022, 12, 2890, 4672, 3536, 2000, 326, 1026, 652, 434, 365, 487, 11383, 3059, 365, 18, 73, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if disp == diDNACYLINDER \ and not (self.isAxisChunk() or self.isStrandChunk()): return
def setDisplay(self, disp): # TODO: optimize when self.display == disp, since I just reviewed # all calls and this looks safe. (Ditto with Atom version of this # method.) [bruce comment 080305 @@@@] """ change self's display mode """ if self.display == disp: #bruce 080305 optimization; looks safe after review of all calls; # important (due to avoiding inlined changeapp and display list # remake) if user selects several chunks and changes them all # at once, and some are already set to disp. return
143d4a0d82a1bf301ef6276e2d7206fe7c8584c4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/143d4a0d82a1bf301ef6276e2d7206fe7c8584c4/chunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23512, 12, 2890, 16, 16232, 4672, 468, 2660, 30, 10979, 1347, 365, 18, 5417, 422, 16232, 16, 3241, 467, 2537, 10725, 329, 468, 777, 4097, 471, 333, 10192, 4183, 18, 261, 40, 305, 869, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23512, 12, 2890, 16, 16232, 4672, 468, 2660, 30, 10979, 1347, 365, 18, 5417, 422, 16232, 16, 3241, 467, 2537, 10725, 329, 468, 777, 4097, 471, 333, 10192, 4183, 18, 261, 40, 305, 869, ...
if self.find_text(text) == None:
'''Add item to history (if not duplicate)''' if not text: return if self.find_text(text) != None: return try:
def append_text(self, text): if self.find_text(text) == None:
88d893e9b9e6d9ce389f3a3222d02981eba5c90f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5002/88d893e9b9e6d9ce389f3a3222d02981eba5c90f/filefind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 67, 955, 12, 2890, 16, 977, 4672, 309, 365, 18, 4720, 67, 955, 12, 955, 13, 422, 599, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 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, 714, 67, 955, 12, 2890, 16, 977, 4672, 309, 365, 18, 4720, 67, 955, 12, 955, 13, 422, 599, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.respond("230 User %s logged in." %self.username)
self.respond("230 User %s logged in." %self.username)
def ftp_PASS(self, line): # TODO - brute force protection: 'freeze'/'sleep' (without blocking the main loop) # PI for a certain amount of time if authentication fails. if not self.username: self.respond("503 Login with USER first") return if self.username == 'anonymous': line = '' if self.authorizer.has_user(self.username): if self.authorizer.validate_authentication(self.username, line): if not self.msg_login: self.respond("230 User %s logged in." %self.username) else: self.push("230-%s\r\n" %self.msg_login) self.respond("230 Welcome.") self.authenticated = True self.max_login_attempts[1] = 0 self.fs.root = self.authorizer.get_home_dir(self.username) self.log("User %s logged in." %self.username) else: self.max_login_attempts[1] += 1 if self.max_login_attempts[0] == self.max_login_attempts[1]: self.log("Maximum login attempts. Disconnecting.") self.respond("530 Maximum login attempts. Disconnecting.") self.close() else: self.respond("530 Authentication failed.") self.username = "" else: if self.username.lower() == 'anonymous': self.respond("530 Anonymous access not allowed.") self.log('Authentication failed: anonymous access not allowed.') else: self.respond("530 Authentication failed.") self.log('Authentication failed: unknown username "%s".' %self.username) self.username = ""
cb01c49a66d7848781b76239960b060d1d7dcf4e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7236/cb01c49a66d7848781b76239960b060d1d7dcf4e/FTPServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 10884, 12, 2890, 16, 980, 4672, 468, 2660, 300, 5186, 624, 2944, 17862, 30, 296, 29631, 11, 2473, 19607, 11, 261, 13299, 9445, 326, 2774, 2798, 13, 468, 282, 7024, 364, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13487, 67, 10884, 12, 2890, 16, 980, 4672, 468, 2660, 300, 5186, 624, 2944, 17862, 30, 296, 29631, 11, 2473, 19607, 11, 261, 13299, 9445, 326, 2774, 2798, 13, 468, 282, 7024, 364, 279, ...
ep = {} ep['season'] = season ep['episodeNumber'] = epNumber
ep = Episode() try: ep['season'] = season ep['episodeNumber'] = epNumber except: pass
def getEpisodes(self, series): self.imdb.update(series, 'episodes') eps = [] for season in series['episodes']: for epNumber, episode in series['episodes'][season].items(): ep = {} ep['season'] = season ep['episodeNumber'] = epNumber self.forwardData(ep, 'title', episode, 'title') self.forwardData(ep, 'synopsis', episode, 'plot') self.forwardData(ep, 'series', episode, 'series title') self.forwardData(ep, 'originalAirDate', episode, 'original air date') eps.append(Episode().fromDict(ep)) return eps
e95267c2023089aa52f2b533b286ac9114856a2a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11141/e95267c2023089aa52f2b533b286ac9114856a2a/episodeimdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4774, 84, 27134, 12, 2890, 16, 4166, 4672, 365, 18, 381, 1966, 18, 2725, 12, 10222, 16, 296, 881, 27134, 6134, 7785, 273, 5378, 364, 15874, 316, 4166, 3292, 881, 27134, 3546, 30, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4774, 84, 27134, 12, 2890, 16, 4166, 4672, 365, 18, 381, 1966, 18, 2725, 12, 10222, 16, 296, 881, 27134, 6134, 7785, 273, 5378, 364, 15874, 316, 4166, 3292, 881, 27134, 3546, 30, 364, ...
You can specify the number of known bits or digits with known_bits=k or known_digits=k; Pari is then told to compute the result using .8\*k of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with use_bits=k or use_digits=k. If none of these are specified, then the precision is taken from the input value.
You can specify the number of known bits or digits with ``known_bits=k`` or ``known_digits=k``; Pari is then told to compute the result using `0.8\*k` of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with ``use_bits=k`` or ``use_digits=k``. If none of these are specified, then the precision is taken from the input value.
def algdep(z, n, known_bits=None, use_bits=None, known_digits=None, use_digits=None): """ Returns a polynomial of degree at most `n` which is approximately satisfied by the number `z`. Note that the returned polynomial need not be irreducible, and indeed usually won't be if `z` is a good approximation to an algebraic number of degree less than `n`. You can specify the number of known bits or digits with known_bits=k or known_digits=k; Pari is then told to compute the result using .8\*k of these bits/digits. (The Pari documentation recommends using a factor between .6 and .9, but internally defaults to .8.) Or, you can specify the precision to use directly with use_bits=k or use_digits=k. If none of these are specified, then the precision is taken from the input value. ALGORITHM: Uses the PARI C-library algdep command. INPUT: - ``z`` - real, complex, or `p`-adic number - ``n`` - an integer EXAMPLES:: sage: algdep(1.888888888888888, 1) 9*x - 17 sage: algdep(0.12121212121212,1) 33*x - 4 sage: algdep(sqrt(2),2) x^2 - 2 This example involves a complex number. :: sage: z = (1/2)*(1 + RDF(sqrt(3)) *CC.0); z 0.500000000000000 + 0.866025403784439*I sage: p = algdep(z, 6); p x^5 + x^2 sage: p.factor() (x + 1) * x^2 * (x^2 - x + 1) sage: z^2 - z + 1 1.11022302462516e-16 This example involves a `p`-adic number. :: sage: K = Qp(3, print_mode = 'series') sage: a = K(7/19); a 1 + 2*3 + 3^2 + 3^3 + 2*3^4 + 2*3^5 + 3^8 + 2*3^9 + 3^11 + 3^12 + 2*3^15 + 2*3^16 + 3^17 + 2*3^19 + O(3^20) sage: algdep(a, 1) 19*x - 7 These examples show the importance of proper precision control. We compute a 200-bit approximation to sqrt(2) which is wrong in the 33'rd bit. :: sage: z = sqrt(RealField(200)(2)) + (1/2)^33 sage: p = algdep(z, 4); p 177858662573*x^4 + 59566570004*x^3 - 221308611561*x^2 - 84791308378*x - 317384111411 sage: factor(p) 177858662573*x^4 + 59566570004*x^3 - 221308611561*x^2 - 84791308378*x - 317384111411 sage: algdep(z, 4, known_bits=32) x^2 - 2 sage: algdep(z, 4, known_digits=10) x^2 - 2 sage: algdep(z, 4, use_bits=25) x^2 - 2 sage: algdep(z, 4, use_digits=8) x^2 - 2 """ # TODO -- change to use PARI C library??? from sage.rings.polynomial.polynomial_ring import polygen x = polygen(ZZ) if isinstance(z, (int, long, integer.Integer)): return x - ZZ(z) n = ZZ(n) if isinstance(z, (sage.rings.rational.Rational)): return z.denominator()*x - z.numerator() if isinstance(z, float): z = sage.rings.real_mpfr.RealField()(z) elif isinstance(z, complex): z = sage.rings.complex_field.ComplexField()(z) if isinstance(z, (sage.rings.real_mpfr.RealNumber, sage.rings.complex_number.ComplexNumber)): # We need to specify a precision. Otherwise, Pari will default # to using 80% of the bits in the Pari value; for certain precisions, # this could be very wrong. (On a 32-bit machine, a RealField(33) # value gets translated to a 64-bit Pari value; so Pari would # try to use about 51 bits of our 32-bit value. Similarly # bad things would happen on a 64-bit machine with RealField(65).) log2 = 0.301029995665 digits = int(log2 * z.prec()) - 2 if known_bits is not None: known_digits = log2 * known_bits if known_digits is not None: use_digits = known_digits * 0.8 if use_bits is not None: use_digits = log2 * use_bits if use_digits is not None: digits = int(use_digits) if digits == 0: digits = 1 f = pari(z).algdep(n, digits) else: y = pari(z) f = y.algdep(n) return x.parent()(f)
08206c95546f1db2a947692b19f3ca4ec939d5d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/08206c95546f1db2a947692b19f3ca4ec939d5d9/arith.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11989, 15037, 12, 94, 16, 290, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 4672, 3536, 2860, 279, 16991, 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, 11989, 15037, 12, 94, 16, 290, 16, 4846, 67, 6789, 33, 7036, 16, 999, 67, 6789, 33, 7036, 16, 4846, 67, 16649, 33, 7036, 16, 999, 67, 16649, 33, 7036, 4672, 3536, 2860, 279, 16991, 4...
res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') +data['name']
res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') + \ (data['name'] or '')
def _product_partner_ref(self, cr, uid, ids, name, arg, context={}): res = {} for p in self.browse(cr, uid, ids, context): data = self._get_partner_code_name(cr, uid, [], p.id, context.get('partner_id', None), context) res[p.id] = (data['code'] and ('['+data['code']+'] ') or '') +data['name'] return res
754955a128b92ffe8d7279097ebe9817e9a608f8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/754955a128b92ffe8d7279097ebe9817e9a608f8/product.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5896, 67, 31993, 67, 1734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 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, 389, 5896, 67, 31993, 67, 1734, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 12938, 4672, 400, 273, 2618, 364, 293, 316, 365, 18, 25731, 12, 3353, 16, 4555, 16...
class ResourceCalendarCrowd(ConfigurableCrowd, LeaderCrowd):
class ResourceViewersCrowd(ConfigurableCrowd): setting_key = 'everyone_can_view_resource_info' class ResourceContainerViewersCrowd(ConfigurableCrowd): setting_key = 'everyone_can_view_resource_list' class ResourceCalendarViewersCrowd(ConfigurableCrowd):
def addResourceContainerToApplication(event): event.object['resources'] = ResourceContainer()
e8ef3fd222ab94134bce5924dd389bb80ac674b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7127/e8ef3fd222ab94134bce5924dd389bb80ac674b5/resource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23812, 2170, 774, 3208, 12, 2575, 4672, 871, 18, 1612, 3292, 4683, 3546, 273, 2591, 2170, 1435, 282, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 23812, 2170, 774, 3208, 12, 2575, 4672, 871, 18, 1612, 3292, 4683, 3546, 273, 2591, 2170, 1435, 282, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
iv_names[dev.iv_name] = (dev, dev.children, minors[idx])
minors = [None for dev in instance.disks] logging.debug("Allocated minors %s" % (minors,))
def _ExecD8Secondary(self, feedback_fn): """Replace the secondary node for drbd8.
468b46f9258cc0753a66d6f643c8f930efdb23a3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7542/468b46f9258cc0753a66d6f643c8f930efdb23a3/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 5081, 16410, 28, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1905, 40, 28, 14893, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 5729, 326, 9946, 756, 364, 5081, 16410, 28, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
winInfo = self.getWinInfo( dt.year ) return -( winInfo.bias + self.dst( dt ) ) def dst( self, dt ):
winInfo = self.getWinInfo(dt.year) return -(winInfo.bias + self.dst(dt)) def dst(self, dt):
def utcoffset( self, dt ): "Calculates the utcoffset according to the datetime.tzinfo spec" if dt is None: return winInfo = self.getWinInfo( dt.year ) return -( winInfo.bias + self.dst( dt ) )
59648a863c896e2f14363d0c28a25b3865360d9a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/59648a863c896e2f14363d0c28a25b3865360d9a/win32timezone.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9439, 3348, 12, 365, 16, 3681, 262, 30, 315, 10587, 326, 9439, 3348, 4888, 358, 326, 3314, 18, 12994, 1376, 857, 6, 309, 3681, 353, 599, 30, 327, 5657, 966, 273, 365, 18, 588, 18049, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9439, 3348, 12, 365, 16, 3681, 262, 30, 315, 10587, 326, 9439, 3348, 4888, 358, 326, 3314, 18, 12994, 1376, 857, 6, 309, 3681, 353, 599, 30, 327, 5657, 966, 273, 365, 18, 588, 18049, ...
this = apply(_quickfix.new_NoPosAmt, args)
this = _quickfix.new_NoPosAmt(*args)
def __init__(self, *args): this = apply(_quickfix.new_NoPosAmt, 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, 2279, 1616, 31787, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 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, 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, 2279, 1616, 31787, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, 30, ...
if error is not None:
if not success: parser = None
def parse(text, module=None, support=None, debug=False): create_globals(module, support, debug) lexer.lexdata = [] lexer.lexpos = 0 lexer.lineno = 1 try: parser.parse(text, debug=debug) except Exception, e: global error error = "internal parser error: %s" % str(e) + "\n" + traceback.format_exc() if error is not None: msg = 'could not parse text: "%s"' % error raise ValueError(msg) return m
52f9d9f2ad3225e44f9fd55722b49231f060e2f3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7147/52f9d9f2ad3225e44f9fd55722b49231f060e2f3/refparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 955, 16, 1605, 33, 7036, 16, 2865, 33, 7036, 16, 1198, 33, 8381, 4672, 752, 67, 16227, 12, 2978, 16, 2865, 16, 1198, 13, 8512, 18, 4149, 892, 273, 5378, 8512, 18, 4149, 917...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 955, 16, 1605, 33, 7036, 16, 2865, 33, 7036, 16, 1198, 33, 8381, 4672, 752, 67, 16227, 12, 2978, 16, 2865, 16, 1198, 13, 8512, 18, 4149, 892, 273, 5378, 8512, 18, 4149, 917...
try: import simplejson except ImportError: raise ImportError("Unable to import simplejson, needed for ExportToJson.")
def ExportToJson(self, as_object = False): """Exports a GeoJSON object which represents the Feature. The as_object parameter determines whether the returned value should be a Python object instead of a string. Defaults to False.""" output = {'type':'Feature', 'geometry': self.GetGeometryRef().ExportToJson(as_object=True), 'properties': {} } fid = self.GetFID() if fid: output['id'] = fid for key in self.keys(): output['properties'][key] = self.GetField(key) if not as_object: try: import simplejson except ImportError: raise ImportError("Unable to import simplejson, needed for ExportToJson.") output = simplejson.dumps(output) return output
bf1e2a3fd32658305781e19e94fffbefc9b30e09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10290/bf1e2a3fd32658305781e19e94fffbefc9b30e09/ogr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11054, 774, 3185, 12, 2890, 16, 487, 67, 1612, 273, 1083, 4672, 3536, 15352, 279, 9385, 2986, 733, 1492, 8686, 326, 7881, 18, 1021, 487, 67, 1612, 1569, 12949, 2856, 326, 2106, 460, 1410...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11054, 774, 3185, 12, 2890, 16, 487, 67, 1612, 273, 1083, 4672, 3536, 15352, 279, 9385, 2986, 733, 1492, 8686, 326, 7881, 18, 1021, 487, 67, 1612, 1569, 12949, 2856, 326, 2106, 460, 1410...
u = father
u = parent s = "".join([parent, bit])
def _generate_edges(self, tree, father='', id=''): if father=='': u = 'root' else: u = father try: return self._generate_edges(tree[0], father=father+id, id='0') + \ self._generate_edges(tree[1], father=father+id, id='1') + \ ([(u, father+id)] if (father+id) != '' else [])
08cf8218c91d92b4dcb4602a7135f1d9d706af1e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/08cf8218c91d92b4dcb4602a7135f1d9d706af1e/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 8746, 12, 2890, 16, 2151, 16, 284, 4806, 2218, 2187, 612, 2218, 11, 4672, 309, 284, 4806, 18920, 4278, 582, 273, 296, 3085, 11, 469, 30, 582, 273, 982, 272, 273, 1408, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7163, 67, 8746, 12, 2890, 16, 2151, 16, 284, 4806, 2218, 2187, 612, 2218, 11, 4672, 309, 284, 4806, 18920, 4278, 582, 273, 296, 3085, 11, 469, 30, 582, 273, 982, 272, 273, 1408, ...
IService(self.store).setServiceParent(self) MultiService.privilegedStartService(self)
def reallyStart(): IService(self.store).setServiceParent(self) MultiService.privilegedStartService(self) self.store.transact(reallyStart)
def privilegedStartService(self): self.store = Store(*self.a, **self.k) IService(self.store).setServiceParent(self) MultiService.privilegedStartService(self)
d301332798e6411d5e9b8cab7ac2e60f1f21e2a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6981/d301332798e6411d5e9b8cab7ac2e60f1f21e2a0/store.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11334, 2423, 1685, 1179, 12, 2890, 4672, 365, 18, 2233, 273, 4994, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 79, 13, 467, 1179, 12, 2890, 18, 2233, 2934, 542, 1179, 3054, 12, 2890, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11334, 2423, 1685, 1179, 12, 2890, 4672, 365, 18, 2233, 273, 4994, 30857, 2890, 18, 69, 16, 2826, 2890, 18, 79, 13, 467, 1179, 12, 2890, 18, 2233, 2934, 542, 1179, 3054, 12, 2890, 13, ...
BUF_SIZE=512
def getAttrs (self, headers, url): # weed out the rules that dont apply to this url rules = filter(lambda r, u=url: r.appliesTo(u), self.rules) if not rules: return {} return {'buf': Buf(rules)}
d792f423cab25aa473c86812bb3c8611dd32d0cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/d792f423cab25aa473c86812bb3c8611dd32d0cf/Replacer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 8262, 261, 2890, 16, 1607, 16, 880, 4672, 468, 732, 329, 596, 326, 2931, 716, 14046, 2230, 358, 333, 880, 2931, 273, 1034, 12, 14661, 436, 16, 582, 33, 718, 30, 436, 18, 438, 52...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 8262, 261, 2890, 16, 1607, 16, 880, 4672, 468, 732, 329, 596, 326, 2931, 716, 14046, 2230, 358, 333, 880, 2931, 273, 1034, 12, 14661, 436, 16, 582, 33, 718, 30, 436, 18, 438, 52...
j = int(random() * (n-i))
j = _int(random() * (n-i))
def sample(self, population, k, int=int): """Chooses k unique random elements from a population sequence.
fdbe5223b7402ee34c4f0c06caa6faabd9e73e35 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/fdbe5223b7402ee34c4f0c06caa6faabd9e73e35/random.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 12, 2890, 16, 11209, 16, 417, 16, 509, 33, 474, 4672, 3536, 9636, 538, 281, 417, 3089, 2744, 2186, 628, 279, 11209, 3102, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
failure()
usagefailure("ERROR: VARIABLE '%s' OF INCOMPATIBLE SHAPES (?) IN FILES" % name)
def compare_vars(nc1, nc2, name, tol): from numpy import squeeze # Find variables: try: var1 = squeeze(nc1.variables[name][:]) var2 = squeeze(nc2.variables[name][:]) except: # This can happen if one of the files does not have the variable. failure() try: delta = abs(var1 - var2).max() except: # This can happen if variables have different shapes. failure() # The actual check: if (delta > tol): print "name = %s, delta = %e, tol = %e" % (name, delta, tol) failure()
600c993bfecdc1612e545f1cceece934dd01593b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7383/600c993bfecdc1612e545f1cceece934dd01593b/nccmp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4699, 12, 14202, 21, 16, 8194, 22, 16, 508, 16, 6085, 4672, 628, 3972, 1930, 17173, 468, 4163, 3152, 30, 775, 30, 569, 21, 273, 17173, 12, 14202, 21, 18, 7528, 63, 529, 636...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 67, 4699, 12, 14202, 21, 16, 8194, 22, 16, 508, 16, 6085, 4672, 628, 3972, 1930, 17173, 468, 4163, 3152, 30, 775, 30, 569, 21, 273, 17173, 12, 14202, 21, 18, 7528, 63, 529, 636...