rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
str = '<font size="-1"><b class="breadcrumbs">\n ' str += ' ::\n '.join(crumbs) str += '</b></font></br>\n'
str = ' <font size="-1"><b class="breadcrumbs">\n ' str += ' ::\n '.join(crumbs) str += '\n </b></font></br>\n'
def _breadcrumbs(self, uid): """ @return: The HTML code for a series of links to the parents of C{uid}. @rtype: C{string} """ #if not uid.parent(): return '</br>\n' if uid.is_package(): crumbs = ['Package&nbsp;%s' % uid.shortname()] elif uid.is_module(): crumbs = ['Module&nbsp;%s' % uid.shortname()] elif uid.is_class(): crumbs = ['Class&nbsp;%s' % uid.shortname()] uid = uid.parent() while uid is not None: if uid.is_package(): label = 'Package&nbsp;%s' % uid.shortname() elif uid.is_module(): label = 'Module&nbsp;%s' % uid.shortname() elif uid.is_class(): label = 'Class&nbsp;%s' % uid.shortname() else: raise ValueError('Bad uid type for breadcrumbs') crumbs.append(self._uid_to_href(uid, label, code=0)) uid = uid.parent() crumbs.reverse() str = '<font size="-1"><b class="breadcrumbs">\n ' str += ' ::\n '.join(crumbs) str += '</b></font></br>\n' return str
dad6dd09c82d3878a78d977cc13da79d4420db2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/dad6dd09c82d3878a78d977cc13da79d4420db2b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 31603, 12, 2890, 16, 4555, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 4166, 434, 4716, 358, 326, 6298, 434, 385, 95, 1911, 5496, 632, 86, 723, 30, 385, 95, 1080, 97, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 31603, 12, 2890, 16, 4555, 4672, 3536, 632, 2463, 30, 1021, 3982, 981, 364, 279, 4166, 434, 4716, 358, 326, 6298, 434, 385, 95, 1911, 5496, 632, 86, 723, 30, 385, 95, 1080, 97, ...
def proxy_bypass(host): return 0
proxy_bypass = proxy_bypass_environment
def proxy_bypass(host): try: import _winreg import re except ImportError: # Std modules, so should be around - but you never know! return 0 try: internetSettings = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, r'Software\Microsoft\Windows\CurrentVersion\Internet Settings') proxyEnable = _winreg.QueryValueEx(internetSettings, 'ProxyEnable')[0] proxyOverride = str(_winreg.QueryValueEx(internetSettings, 'ProxyOverride')[0]) # ^^^^ Returned as Unicode but problems if not converted to ASCII except WindowsError: return 0 if not proxyEnable or not proxyOverride: return 0 # try to make a host list from name and IP address. rawHost, port = splitport(host) host = [rawHost] try: addr = socket.gethostbyname(rawHost) if addr != rawHost: host.append(addr) except socket.error: pass try: fqdn = socket.getfqdn(rawHost) if fqdn != rawHost: host.append(fqdn) except socket.error: pass # make a check value list from the registry entry: replace the # '<local>' string by the localhost entry and the corresponding # canonical entry. proxyOverride = proxyOverride.split(';') i = 0 while i < len(proxyOverride): if proxyOverride[i] == '<local>': proxyOverride[i:i+1] = ['localhost', '127.0.0.1', socket.gethostname(), socket.gethostbyname( socket.gethostname())] i += 1 # print proxyOverride # now check if we match one of the registry values. for test in proxyOverride: test = test.replace(".", r"\.") # mask dots test = test.replace("*", r".*") # change glob sequence test = test.replace("?", r".") # change glob char for val in host: # print "%s <--> %s" %( test, val ) if re.match(test, val, re.I): return 1 return 0
2235011d49bc543ced855804ac9b87c0e98a7b19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/2235011d49bc543ced855804ac9b87c0e98a7b19/urllib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 29604, 12, 2564, 4672, 775, 30, 1930, 389, 8082, 1574, 1930, 283, 1335, 11308, 30, 468, 6276, 4381, 16, 1427, 1410, 506, 6740, 300, 1496, 1846, 5903, 5055, 5, 327, 374, 775, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2889, 67, 29604, 12, 2564, 4672, 775, 30, 1930, 389, 8082, 1574, 1930, 283, 1335, 11308, 30, 468, 6276, 4381, 16, 1427, 1410, 506, 6740, 300, 1496, 1846, 5903, 5055, 5, 327, 374, 775, ...
get_params = '&'.join(['%s=%s' % (x[0],','.join(x[1])) for x in context['request'].GET.iteritems() if (not x[0] == 'page' and not x[0] == 'per_page')])
get_params = '&'.join(['%s=%s' % (x[0], x[1]) for x in context['request'].GET.iteritems() if (x[0] != 'page' and x[0] != 'per_page')])
def pagination(context, adjacent_pages=1): """ Return the list of A tags with links to pages. """ page_list = range( max(1,context['page'] - adjacent_pages), min(context['pages'],context['page'] + adjacent_pages) + 1) lower_page = None higher_page = None if not 1 == context['page']: lower_page = context['page'] - 1 if not 1 in page_list: page_list.insert(0,1) if not 2 in page_list: page_list.insert(1,'.') if not context['pages'] == context['page']: higher_page = context['page'] + 1 if not context['pages'] in page_list: if not context['pages'] - 1 in page_list: page_list.append('.') page_list.append(context['pages']) get_params = '&'.join(['%s=%s' % (x[0],','.join(x[1])) for x in context['request'].GET.iteritems() if (not x[0] == 'page' and not x[0] == 'per_page')]) if get_params: get_params = '?%s&' % get_params else: get_params = '?' return { 'get_params': get_params, 'lower_page': lower_page, 'higher_page': higher_page, 'page': context['page'], 'pages': context['pages'], 'page_list': page_list, 'per_page': context['per_page'], }
a9442044d420ca63a1bbbac213577f53eca1314c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13701/a9442044d420ca63a1bbbac213577f53eca1314c/forum_extras.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8842, 12, 2472, 16, 16335, 67, 7267, 33, 21, 4672, 3536, 2000, 326, 666, 434, 432, 2342, 598, 4716, 358, 4689, 18, 3536, 225, 1363, 67, 1098, 273, 1048, 12, 943, 12, 21, 16, 2472, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8842, 12, 2472, 16, 16335, 67, 7267, 33, 21, 4672, 3536, 2000, 326, 666, 434, 432, 2342, 598, 4716, 358, 4689, 18, 3536, 225, 1363, 67, 1098, 273, 1048, 12, 943, 12, 21, 16, 2472, 32...
fw = codecs.open(fn, 'wub', 'utf-8')
fw = codecs.open(fn, 'w', 'utf-8')
def _writeLabelAssignment(self): self._backupLabelAssignment() fn = self.labelFilename() if os.path.exists(fn): os.remove(fn) fw = codecs.open(fn, 'wub', 'utf-8') for msg_iid, labels in sorted(self.message_iid2labels.items()): msg_fn = self.message_iid2fn.get(msg_iid) if msg_fn is None: # We are unable do determine the filename for msg_iid continue print >> fw, '%s\t%s' % (msg_fn, self._escapeLabels(labels)) fw.close()
88f0fc499da7f927e28b71862c6f18acbe1879c8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3616/88f0fc499da7f927e28b71862c6f18acbe1879c8/gmb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2626, 2224, 7729, 12, 2890, 4672, 365, 6315, 9572, 2224, 7729, 1435, 2295, 273, 365, 18, 1925, 5359, 1435, 309, 1140, 18, 803, 18, 1808, 12, 4293, 4672, 1140, 18, 4479, 12, 4293, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2626, 2224, 7729, 12, 2890, 4672, 365, 6315, 9572, 2224, 7729, 1435, 2295, 273, 365, 18, 1925, 5359, 1435, 309, 1140, 18, 803, 18, 1808, 12, 4293, 4672, 1140, 18, 4479, 12, 4293, ...
self.tab = vim.eval('tabpagenr()') bzr_instances[self.tab] = self
vim.command("let t:bzr_id='" + str(id(self)) + "'") bzr_instances[id(self)] = self
def __init__(self, path):
6b724488e059523d102dcaaa3f84fff69fc4bde1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1604/6b724488e059523d102dcaaa3f84fff69fc4bde1/bzr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 589, 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,...
return self.__str__()
return str(self)
def __repr__(self): return self.__str__()
d3360650260167e99d819d46c099993d6e0f1f9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3755/d3360650260167e99d819d46c099993d6e0f1f9e/predictsplits.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 16186, 701, 972, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 365, 16186, 701, 972, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.length = 0L
self.length = 0
def __init__(self,wl): """Initialisation. wl = wordlength (in bits) of the RadioGatun hash method between 1 and 64 (default = 64) """
7b516f8fe1f3a2988cacd3343c2fa51aae031fd3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8009/7b516f8fe1f3a2988cacd3343c2fa51aae031fd3/pyradiogatun.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 21504, 4672, 3536, 4435, 10742, 18, 225, 19564, 273, 2076, 2469, 261, 267, 4125, 13, 434, 326, 31552, 43, 270, 318, 1651, 707, 3086, 404, 471, 5178, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 21504, 4672, 3536, 4435, 10742, 18, 225, 19564, 273, 2076, 2469, 261, 267, 4125, 13, 434, 326, 31552, 43, 270, 318, 1651, 707, 3086, 404, 471, 5178, 261, ...
elif fine("PASS"):
elif find("PASS"):
def lineReceived(self, line): """Error Conditions""" uline = line.upper() find = lambda s: uline.find(s) != -1
39e728aaf1bac3da695312e6034825bae5f913a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/39e728aaf1bac3da695312e6034825bae5f913a0/pop3testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 980, 8872, 12, 2890, 16, 980, 4672, 3536, 668, 23261, 8395, 7493, 558, 273, 980, 18, 5797, 1435, 1104, 273, 3195, 272, 30, 7493, 558, 18, 4720, 12, 87, 13, 480, 300, 21, 2, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 980, 8872, 12, 2890, 16, 980, 4672, 3536, 668, 23261, 8395, 7493, 558, 273, 980, 18, 5797, 1435, 1104, 273, 3195, 272, 30, 7493, 558, 18, 4720, 12, 87, 13, 480, 300, 21, 2, -100, -10...
def setAmount(self, amount): self.queue.put(("amount", [amount]))
def __init__(self, queue, pseudo_file): TestResult.__init__(self) self.queue = queue self.pseudo_file = pseudo_file
5695744521085e073cc0200a034b3083fcaadb9d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14942/5695744521085e073cc0200a034b3083fcaadb9d/qtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2389, 16, 12454, 67, 768, 4672, 7766, 1253, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4000, 273, 2389, 365, 18, 26023, 67, 768, 273, 12454, 67, 768, 225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2389, 16, 12454, 67, 768, 4672, 7766, 1253, 16186, 2738, 972, 12, 2890, 13, 365, 18, 4000, 273, 2389, 365, 18, 26023, 67, 768, 273, 12454, 67, 768, 225, ...
try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option)
return option in self.options(section)
def has_option(self, section, option): """Return whether the given section has the given option.""" try: opts = self.__sections[section] except KeyError: raise NoSectionError(section) return opts.has_key(option)
2a37f9f862b81056601584f53a2d5ef88c85d566 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/2a37f9f862b81056601584f53a2d5ef88c85d566/ConfigParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 990, 2856, 326, 864, 2442, 711, 326, 864, 1456, 12123, 775, 30, 1500, 273, 365, 16186, 11657, 63, 3464, 65, 1335, 4999, 30, 100...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 3482, 12, 2890, 16, 2442, 16, 1456, 4672, 3536, 990, 2856, 326, 864, 2442, 711, 326, 864, 1456, 12123, 775, 30, 1500, 273, 365, 16186, 11657, 63, 3464, 65, 1335, 4999, 30, 100...
self.setXObjects(page) self.setAnnotations(page)
self._setXObjects(page) self._setAnnotations(page)
def showPage(self): """This is where the fun happens""" page = pdfdoc.PDFPage() page.pagewidth = self._pagesize[0] page.pageheight = self._pagesize[1] page.hasImages = self._currentPageHasImages page.pageTransitionString = self._pageTransitionString page.setCompression(self._pageCompression) #print stream page.setStream([self._preamble] + self._code) self.setXObjects(page) self.setAnnotations(page) self._doc.addPage(page) #now get ready for the next one self._pageNumber = self._pageNumber + 1 self.restartAccumulators()
8fb35ad81aee7f43b67351bc5e5364584ab5eb9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/8fb35ad81aee7f43b67351bc5e5364584ab5eb9e/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1964, 12, 2890, 4672, 3536, 2503, 353, 1625, 326, 9831, 10555, 8395, 1363, 273, 8169, 2434, 18, 17508, 1964, 1435, 1363, 18, 9095, 14434, 273, 365, 6315, 7267, 554, 63, 20, 65, 136...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 1964, 12, 2890, 4672, 3536, 2503, 353, 1625, 326, 9831, 10555, 8395, 1363, 273, 8169, 2434, 18, 17508, 1964, 1435, 1363, 18, 9095, 14434, 273, 365, 6315, 7267, 554, 63, 20, 65, 136...
(_('A01 Naughty Nightwear'), '%s%02d '), (_('A01. Naughty Nightwear'), '%s%02d. '), (_('A01 - Naughty Nightwear'),'%s%02d - '), (_('(A01) Naughty Nightwear'),'(%s%02d) '),
(_('A01 Naughty Nightwear'), '\x07\x07\x07%s%02d '), (_('A01. Naughty Nightwear'), '\x07\x07\x07%s%02d. '), (_('A01 - Naughty Nightwear'),'\x07\x07\x07%s%02d - '), (_('(A01) Naughty Nightwear'),'\x07\x07\x07(%s%02d) '),
def buildPatch(self,log,progress,patchFile): """Edits patch file as desired. Will write to log.""" count = {} format = self.choiceValues[self.chosen][0] showStat = '%02d' in format keep = patchFile.getKeeper() codes = getattr(patchFile,'weaponTags','BESMUTL') #ammoFormat = format.replace('%02d','',1) # for record in patchFile.AMMO.records: # if not record.full: continue # if record.full[0] in '+-=.()[]': continue # record.full = ammoFormat % 'A' + record.full # keep(record.fid) # srcMod = record.fid[0] # count[srcMod] = count.get(srcMod,0) + 1 for record in patchFile.WEAP.records: if not record.full: continue if record.full[0] in '+-=.()[]': continue if not record.etype in range(0,7): continue type = codes[record.etype] if showStat: record.full = format % (type,record.damage) + record.full else: record.full = format % type + record.full keep(record.fid) srcMod = record.fid[0] count[srcMod] = count.get(srcMod,0) + 1 #--Log log(_('* %s: %d') % (self.label,sum(count.values()))) for srcMod in modInfos.getOrdered(count.keys()): log(' * %s: %d' % (srcMod.s,count[srcMod]))
4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/4fadd0bfb0cf32a8a2e9f4326637b84f096a9c39/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 7332, 12, 2890, 16, 1330, 16, 8298, 16, 2272, 812, 4672, 3536, 2671, 1282, 4729, 585, 487, 6049, 18, 9980, 1045, 358, 613, 12123, 1056, 273, 2618, 740, 273, 365, 18, 11569, 1972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7332, 12, 2890, 16, 1330, 16, 8298, 16, 2272, 812, 4672, 3536, 2671, 1282, 4729, 585, 487, 6049, 18, 9980, 1045, 358, 613, 12123, 1056, 273, 2618, 740, 273, 365, 18, 11569, 1972, ...
systems = sys_search.return_results() new_systems = System.all(identity.current.user,system = systems) return new_systems
return sys_search.return_results()
def _system_search(self,kw,sys_search,use_custom_columns = False): for search in kw['systemsearch']: #clsinfo = System.get_dict()[search['table']] #Need to change this class_field_list = search['table'].split('/') cls_ref = search_utility.SystemSearch.translate_name(class_field_list[0]) col = class_field_list[1] #If value id False or True, let's convert them to if class_field_list[0] != 'Key': sys_search.append_results(cls_ref,search['value'],col,search['operation']) else: sys_search.append_results(cls_ref,search['value'],col,search['operation'],keyvalue=search['keyvalue'])
4ca7700265af8d7a7c519d2d573f1cbd8ce829a3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/4ca7700265af8d7a7c519d2d573f1cbd8ce829a3/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4299, 67, 3072, 12, 2890, 16, 9987, 16, 9499, 67, 3072, 16, 1202, 67, 3662, 67, 5112, 273, 1083, 4672, 364, 1623, 316, 5323, 3292, 4299, 3072, 3546, 30, 468, 6429, 1376, 273, 2332...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4299, 67, 3072, 12, 2890, 16, 9987, 16, 9499, 67, 3072, 16, 1202, 67, 3662, 67, 5112, 273, 1083, 4672, 364, 1623, 316, 5323, 3292, 4299, 3072, 3546, 30, 468, 6429, 1376, 273, 2332...
s = r%60 m = r/60 remaining = _("%d:%02d left") % (m,s)
if r < 0 or r>60*60: remaining = "Error" else: s = r%60 m = r/60 remaining = _("%d:%02d left") % (m,s)
def set_progress(self, done_so_far, total, current_file=""): if (total==0) or (done_so_far==0): self.progressbar.set_text(" ") self.progressbar.set_fraction(0.0) self.progressbar.pulse() return self.progresstitle.set_text(_("Converting")) if time.time() < self.progress_time + 0.10: # ten updates per second should be enough return self.progress_time = time.time() self.progressfile.set_markup("<i><small>%s</small></i>" % current_file) fraction = float(done_so_far) / total self.progressbar.set_fraction(fraction) t = time.time() - self.converter.run_start_time - self.converter.paused_time #if (t<5): # wait a bit not to display crap # self.progressbar.pulse() # return r = (t / fraction - t) s = r%60 m = r/60 remaining = _("%d:%02d left") % (m,s) self.display_progress(remaining)
22d1e7ad80cc65fde8b898f1b831bf1746448e63 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2369/22d1e7ad80cc65fde8b898f1b831bf1746448e63/soundconverter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8298, 12, 2890, 16, 2731, 67, 2048, 67, 31246, 16, 2078, 16, 783, 67, 768, 1546, 6, 4672, 309, 261, 4963, 631, 20, 13, 578, 261, 8734, 67, 2048, 67, 31246, 631, 20, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 8298, 12, 2890, 16, 2731, 67, 2048, 67, 31246, 16, 2078, 16, 783, 67, 768, 1546, 6, 4672, 309, 261, 4963, 631, 20, 13, 578, 261, 8734, 67, 2048, 67, 31246, 631, 20, 4672, ...
time.sleep(35)
ret_value = openDHTadvertise.lookup(key)
def main(): """ <Purpose> Program's main. <Arguments> None. <Exceptions> All exceptions are caught. <Side Effects> None. <Returns> None. """ # setup the gmail user/password to use when sending email success,explanation_str = send_gmail.init_gmail() if not success: log(explanation_str) sys.exit(0) key = random.randint(4,2**30) value = random.randint(4,2**30) ttlval = 60 # put(key,value) with ttlval into OpenDHT log("calling openDHTadvertise.announce(key: " + str(key) + ", val: " + str(value) + ", ttl: " + str(ttlval) + ")") try: openDHTadvertise.announce(key,value,ttlval) except: handle_exception("openDHTadvertise.announce() failed") sys.exit(0) # a 30 second timer to email the notify_list on slow lookups lookup_timedout_timer = threading.Timer(30, lookup_timedout) # start the lookup timer lookup_timedout_timer.start() # get(key) from OpenDHT log("calling openDHTadvertise.lookup(key: " + str(key) + ")") try: # ret_value = openDHTadvertise.lookup(key) time.sleep(35) # TODO: check the return value as well # ret_value = int(ret_value[0]) except: handle_exception("openDHTadvertise.lookup() failed") sys.exit(0) lookup_timedout_timer.cancel() lookup_done_event.set() return
57f02801fcf7f58fd6760c48d9c187a8f8281562 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7995/57f02801fcf7f58fd6760c48d9c187a8f8281562/opendhtputget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 13586, 1807, 2774, 18, 225, 411, 4628, 34, 599, 18, 225, 411, 11416, 34, 4826, 4798, 854, 13537, 18, 225, 411, 8895, 30755, 87, 34, 599, 18, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 411, 10262, 4150, 34, 13586, 1807, 2774, 18, 225, 411, 4628, 34, 599, 18, 225, 411, 11416, 34, 4826, 4798, 854, 13537, 18, 225, 411, 8895, 30755, 87, 34, 599, 18, 22...
old_lineage= nodes[y];
in_1.update([y]); in_1_alive.update([y]); in_0_alive_copy=in_0_alive.copy(); random_list=range(len(in_0_alive)); for i in range(len(in_0_alive)): random_list[i]=in_0_alive_copy.pop(); random.shuffle(random_list); if len(random_list)==0: random_index_0=-1; else: random_index_0=random_list[0]; index_to_birth=random_index_0; old_lineage= nodes[index_to_birth];
def Migration(y,time,nodes, direction, in_0, in_0_alive): """ Input Paramters --------------- y the index of the node migrating time the time of migration nodes the node map from node index to [Time of Birth (0), Parent node (1), region (2), migration_times (3), Time of Death (4), related_to (5)] direction if 1, the migration is occuring boreal to tropical, if 0, the migration is occuring tropical to boreal Return Value(s) -------------- updated nodes """ nodes[y][2]=direction; times=nodes[y][3]; times.append([time,direction]);
c872827e6167f1bc33108444aa076f7378184a7e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7945/c872827e6167f1bc33108444aa076f7378184a7e/bd_simple.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15309, 12, 93, 16, 957, 16, 4690, 16, 4068, 16, 316, 67, 20, 16, 316, 67, 20, 67, 11462, 4672, 3536, 2741, 3014, 5432, 300, 17908, 677, 6647, 326, 770, 434, 326, 756, 4196, 1776, 813...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15309, 12, 93, 16, 957, 16, 4690, 16, 4068, 16, 316, 67, 20, 16, 316, 67, 20, 67, 11462, 4672, 3536, 2741, 3014, 5432, 300, 17908, 677, 6647, 326, 770, 434, 326, 756, 4196, 1776, 813...
class sorted_dict(_sorted_dict): __slots__ = () def __setitem__(self, key, value): super(sorted_dict, self).__setitem__(key, value) if key not in self._list: self._list.append(key)
def itervalues(self): for i in iter(self._list): yield self[i]
baf7916ad9bd4d0edbcc14198edc55764978ff46 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5794/baf7916ad9bd4d0edbcc14198edc55764978ff46/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24607, 12, 2890, 4672, 364, 277, 316, 1400, 12, 2890, 6315, 1098, 4672, 2824, 365, 63, 77, 65, 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, 24607, 12, 2890, 4672, 364, 277, 316, 1400, 12, 2890, 6315, 1098, 4672, 2824, 365, 63, 77, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
svg += ' x="%0.2f"\n' % (ln)
svg += ' x="%0.2f"\n' % (log)
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12px;fill:#0000ff;">\n' svg += ' <tspan\n' svg += ' x="%0.2f"\n' % (ln) svg += ' y="%d"\n' % (height3) svg += ' style="font-size:12px;text-align:center;text-anchor:middle;font-family:Bitstream Vera Sans;">%s</tspan></text>\n' % (string) svg += ' <path\n' svg += ' d="M %0.2f,%d,%0.2f,%d"\n' % (ln, height1, ln, height2) svg += ' style="fill:none;stroke:#0000ff;stroke-width:1px;stroke-linecap:square;stroke-linejoin:miter;stroke-opacity:1" />\n' return svg
165ca7c39e7dc341d61764ed36821e9d89caebd7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5595/165ca7c39e7dc341d61764ed36821e9d89caebd7/genslides.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4582, 67, 3355, 12, 2890, 16, 1384, 16, 2072, 23, 16, 2072, 22, 16, 2072, 21, 16, 533, 16, 9668, 33, 8381, 16, 3159, 33, 21, 18, 20, 4672, 3536, 15211, 4582, 13999, 16, 425, 18, 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, 4582, 67, 3355, 12, 2890, 16, 1384, 16, 2072, 23, 16, 2072, 22, 16, 2072, 21, 16, 533, 16, 9668, 33, 8381, 16, 3159, 33, 21, 18, 20, 4672, 3536, 15211, 4582, 13999, 16, 425, 18, 75...
ns.internFrag("lastElement", BI_lastElem)
def register(store):
75387a1f12d10dbdc767946c5487001ec3960bef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3308/75387a1f12d10dbdc767946c5487001ec3960bef/cwm_list.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2233, 4672, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1744, 12, 2233, 4672, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
res = self.transClient.setTransformationParameter(transID,'Status','Deleted')
res = self.transClient.setTransformationParameter( transID, 'Status', 'Deleted' )
def cleanTransformation( self, transID ): """ This removes any mention of the supplied transformation """ gLogger.info( "Cleaning transformation %s" % transID ) res = self.getTransformationDirectories( transID ) if not res['OK']: gLogger.error('Problem obtaining directories for transformation %s with result "%s"' %(transID,res)) return S_OK() directories = res['Value'] # Clean the jobs in the WMS and any failover requests found res = self.cleanTransformationTasks( transID ) if not res['OK']: return res # Clean the log files for the jobs for directory in directories: if re.search( '/LOG/', directory ): res = self.cleanTransformationLogFiles(directory) if not res['OK']: return res res = self.cleanCatalogContents(directory) if not res['OK']: return res res = self.cleanStorageContents(directory) if not res['OK']: return res # Clean ALL the possible remnants found in the BK res = self.cleanMetadataCatalogFiles( transID,directories) if not res['OK']: return res # Clean the transformation DB of the files and job information res = self.transClient.cleanTransformation( transID ) if not res['OK']: return res gLogger.info( "Successfully cleaned transformation %d" % transID ) # Change the status of the transformation to deleted res = self.transClient.setTransformationParameter(transID,'Status','Deleted') if not res['OK']: gLogger.error( "Failed to update status of transformation %s to Deleted" % ( transID ), res['Message'] ) return res gLogger.info( "Updated status of transformation %s to Deleted" % ( transID ) ) return S_OK()
c3853ad0438058db66814335a87076cdaecd2d33 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/c3853ad0438058db66814335a87076cdaecd2d33/TransformationCleaningAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 15292, 12, 365, 16, 906, 734, 262, 30, 3536, 1220, 7157, 1281, 15823, 434, 326, 4580, 8620, 3536, 314, 3328, 18, 1376, 12, 315, 7605, 310, 8620, 738, 87, 6, 738, 906, 734, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 15292, 12, 365, 16, 906, 734, 262, 30, 3536, 1220, 7157, 1281, 15823, 434, 326, 4580, 8620, 3536, 314, 3328, 18, 1376, 12, 315, 7605, 310, 8620, 738, 87, 6, 738, 906, 734, 262, ...
if len(self.PluginList) == 0:
if len (self.PluginList) == 0:
def Wait(self): if len(self.PluginList) == 0: return False gobject.idle_add(self.ParseSettings) return True
d41d2649e29df75d37782fcada647667abe8b68b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1272/d41d2649e29df75d37782fcada647667abe8b68b/Utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 12, 2890, 4672, 309, 562, 261, 2890, 18, 3773, 682, 13, 422, 374, 30, 327, 1083, 225, 314, 1612, 18, 20390, 67, 1289, 12, 2890, 18, 3201, 2628, 13, 225, 327, 1053, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5838, 12, 2890, 4672, 309, 562, 261, 2890, 18, 3773, 682, 13, 422, 374, 30, 327, 1083, 225, 314, 1612, 18, 20390, 67, 1289, 12, 2890, 18, 3201, 2628, 13, 225, 327, 1053, 225, 2, -100...
info = "DATA" , 'CD [%s]' % label, None, None
info = "DATA" , '%s [%s]' % (media.drivename, label), None, None
def identify(self, media):
62f25d68d43fd4e0d2686f97cc191ded413172f6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/62f25d68d43fd4e0d2686f97cc191ded413172f6/identifymedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9786, 12, 2890, 16, 3539, 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, 9786, 12, 2890, 16, 3539, 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...
r = self.newConnection().propfind(unicode(self.url), body, depth)
r = self.__request('propfind', unicode(self.url), body, depth)
def getProps(self, body, depth=0): """ Perform a WebDAV PROPFIND operation """ r = self.newConnection().propfind(unicode(self.url), body, depth) if r.status == 404: raise NotFound return r
94656b00029a28c4923880205f978ac79e105ba4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/94656b00029a28c4923880205f978ac79e105ba4/Dav.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3570, 1121, 12, 2890, 16, 1417, 16, 3598, 33, 20, 4672, 3536, 11217, 279, 2999, 17735, 16258, 42, 2356, 1674, 3536, 436, 273, 365, 16186, 2293, 2668, 5986, 4720, 2187, 5252, 12, 2890, 18...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3570, 1121, 12, 2890, 16, 1417, 16, 3598, 33, 20, 4672, 3536, 11217, 279, 2999, 17735, 16258, 42, 2356, 1674, 3536, 436, 273, 365, 16186, 2293, 2668, 5986, 4720, 2187, 5252, 12, 2890, 18...
EXAMPLE:
EXAMPLE::
def _repr_(self): """ EXAMPLE: sage: mq.SBox(7,6,0,4,2,5,1,3) #indirect doctest (7, 6, 0, 4, 2, 5, 1, 3) """ return "(" + ", ".join(map(str,list(self))) + ")"
16527da1ddc0ac750f609cd58858c5b45d932696 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/16527da1ddc0ac750f609cd58858c5b45d932696/sbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 5675, 21373, 2866, 225, 272, 410, 30, 18327, 18, 55, 3514, 12, 27, 16, 26, 16, 20, 16, 24, 16, 22, 16, 25, 16, 21, 16, 23, 13, 468, 728, 867...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12715, 67, 12, 2890, 4672, 3536, 5675, 21373, 2866, 225, 272, 410, 30, 18327, 18, 55, 3514, 12, 27, 16, 26, 16, 20, 16, 24, 16, 22, 16, 25, 16, 21, 16, 23, 13, 468, 728, 867...
z.run(execfile,(fn,_globals.copy()))
z.run(execfile,(fn,g))
def find_test_files(L,d,N): n = os.path.basename(d) if n!='test' : return for n in filter(lambda n: n[-3:]=='.py',N): fn = os.path.normcase(os.path.normpath(os.path.join(d,n))) if os.path.isfile(fn): L.append(fn)
d144de574b55b6230e50ff50376a0264613d6725 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/d144de574b55b6230e50ff50376a0264613d6725/runtests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 3813, 67, 2354, 12, 48, 16, 72, 16, 50, 4672, 290, 273, 1140, 18, 803, 18, 13909, 12, 72, 13, 309, 290, 5, 2218, 3813, 11, 294, 327, 364, 290, 316, 1034, 12, 14661, 290, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 67, 3813, 67, 2354, 12, 48, 16, 72, 16, 50, 4672, 290, 273, 1140, 18, 803, 18, 13909, 12, 72, 13, 309, 290, 5, 2218, 3813, 11, 294, 327, 364, 290, 316, 1034, 12, 14661, 290, ...
context.update({'uom': uom})
context.update(uom=uom, compute_child=False)
def fill_inventory(self, cr, uid, ids, context): """ To fill stock inventory according to products available in the selected locations. @param self: The object pointer. @param cr: A database cursor @param uid: ID of the user currently logged in @param ids: the ID or list of IDs if we want more than one @param context: A standard dictionary @return: """ inventory_line_obj = self.pool.get('stock.inventory.line') location_obj = self.pool.get('stock.location') product_obj = self.pool.get('product.product') stock_location_obj = self.pool.get('stock.location') for fill_inventory in self.browse(cr, uid, ids): res = {} res_location = {} if fill_inventory.recursive : location_ids = location_obj.search(cr, uid, [('location_id', 'child_of', fill_inventory.location_id.id)]) for location in location_ids : res = location_obj._product_get(cr, uid, location) res_location[location] = res else: context.update({'compute_child': False}) res = location_obj._product_get(cr, uid, fill_inventory.location_id.id, context=context) res_location[fill_inventory.location_id.id] = res
ee198c29abe9a56dd9876afe53ca52b2a0e1a063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/ee198c29abe9a56dd9876afe53ca52b2a0e1a063/stock_fill_inventory.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 67, 26024, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 3536, 2974, 3636, 12480, 13086, 4888, 358, 10406, 2319, 316, 326, 3170, 7838, 18, 632, 891, 365, 30, 1021, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3636, 67, 26024, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 4672, 3536, 2974, 3636, 12480, 13086, 4888, 358, 10406, 2319, 316, 326, 3170, 7838, 18, 632, 891, 365, 30, 1021, 733, ...
def GenerateSConscript(output_filename, spec):
def GenerateSConscript(output_filename, spec, build_file):
def GenerateSConscript(output_filename, spec): """ Generates a SConscript file for a specific target. This generates a SConscript file suitable for building any or all of the target's configurations. A SConscript file may be called multiple times to generate targets for multiple configurations. Consequently, it needs to be ready to build the target for any requested configuration, and therefore contains information about the settings for all configurations (generated into the SConscript file at gyp configuration time) as well as logic for selecting (at SCons build time) the specific configuration being built. The general outline of a generated SConscript file is: -- Header -- Import 'env'. This contains a $CONFIG_NAME construction variable that specifies what configuration to build (e.g. Debug, Release). -- Configurations. This is a dictionary with settings for the different configurations (Debug, Release) under which this target can be built. The values in the dictionary are themselves dictionaries specifying what construction variables should added to the local copy of the imported construction environment (Append), should be removed (FilterOut), and should outright replace the imported values (Replace). -- Clone the imported construction environment and update with the proper configuration settings. -- Initialize the lists of the targets' input files and prerequisites. -- Target-specific actions and rules. These come after the input file and prerequisite initializations because the outputs of the actions and rules may affect the input file list (process_outputs_as_sources) and get added to the list of prerequisites (so that they're guaranteed to be executed before building the target). -- Call the Builder for the target itself. -- Arrange for any copies to be made into installation directories. -- Set up the gyp_target_{name} Alias (phony Node) for the target as the primary handle for building all of the target's pieces. -- Use env.Require() to make sure the prerequisites (explicitly specified, but also including the actions and rules) are built before the target itself. -- Return the gyp_target_{name} Alias to the calling SConstruct file so it can be added to the list of default targets. """ gyp_dir = os.path.split(output_filename)[0] if not gyp_dir: gyp_dir = '.' gyp_dir = os.path.abspath(gyp_dir) fp = open(output_filename, 'w') fp.write(header) fp.write('\nImport("env")\n') # fp.write('\n') fp.write('configurations = {\n') for config_name, config in spec['configurations'].iteritems(): fp.write(' \'%s\' : {\n' % config_name) fp.write(' \'Append\' : dict(\n') GenerateConfig(fp, spec, config, ' '*12) fp.write(' ),\n') fp.write(' \'FilterOut\' : dict(\n' ) for key, var in config.get('scons_remove', {}).iteritems(): fp.write(' %s = %s,\n' % (key, repr(var))) fp.write(' ),\n') fp.write(' \'Replace\' : dict(\n' ) scons_settings = config.get('scons_settings', {}) for key in sorted(scons_settings.keys()): val = pprint.pformat(scons_settings[key]) fp.write(' %s = %s,\n' % (key, val)) fp.write(' ),\n') fp.write(' },\n') fp.write('}\n') # fp.write('\n') fp.write('env = env.Clone()') fp.write('\n') fp.write('config = configurations[env[\'CONFIG_NAME\']]\n') fp.write('env.Append(**config[\'Append\'])\n') fp.write('env.FilterOut(**config[\'FilterOut\'])\n') fp.write('env.Replace(**config[\'Replace\'])\n') # sources = spec.get('sources') if sources: pre = '\ninput_files = ChromeFileList([\n ' WriteList(fp, map(repr, sources), preamble=pre, postamble=',\n])\n') else: fp.write('\ninput_files = []\n') fp.write('\n') fp.write('target_files = []\n') prerequisites = spec.get('scons_prerequisites', []) fp.write('prerequisites = %s\n' % pprint.pformat(prerequisites)) actions = spec.get('actions', []) for action in actions: a = ['cd', gyp_dir, '&&'] + action['action'] message = action.get('message') if message: message = repr(message) fp.write(_command_template % { 'inputs' : pprint.pformat(action.get('inputs', [])), 'outputs' : pprint.pformat(action.get('outputs', [])), 'action' : pprint.pformat(a), 'message' : message, }) if action.get('process_outputs_as_sources'): fp.write('input_files.extend(_outputs)\n') fp.write('prerequisites.extend(_outputs)\n') rules = spec.get('rules', []) for rule in rules: name = rule['rule_name'] a = ['cd', gyp_dir, '&&'] + rule['action'] message = rule.get('message') if message: message = repr(message) fp.write(_rule_template % { 'inputs' : pprint.pformat(rule.get('inputs', [])), 'outputs' : pprint.pformat(rule.get('outputs', [])), 'action' : pprint.pformat(a), 'extension' : rule['extension'], 'name' : name, 'message' : message, }) if rule.get('process_outputs_as_sources'): fp.write(' input_files.Replace(%s_file, _outputs)\n' % name) fp.write('prerequisites.extend(_outputs)\n') SConsTypeWriter[spec.get('type')](fp, spec) copies = spec.get('copies', []) for copy in copies: destdir = copy['destination'] files = copy['files'] fmt = '\n_outputs = env.Install(%s,\n %s\n)\n' fp.write(fmt % (repr(destdir), pprint.pformat(files))) fp.write('prerequisites.extend(_outputs)\n') fmt = "\ngyp_target = env.Alias('gyp_target_%s', target_files)\n" fp.write(fmt % spec['target_name']) dependencies = spec.get('scons_dependencies', []) if dependencies: WriteList(fp, dependencies, preamble='env.Requires(gyp_target, [\n ', postamble='\n])\n') fp.write('env.Requires(gyp_target, prerequisites)\n') fp.write('Return("gyp_target")\n') fp.close()
563cc2f4cde353f790f4f8561c6b37041c9674eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6220/563cc2f4cde353f790f4f8561c6b37041c9674eb/scons.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 55, 442, 4263, 12, 2844, 67, 3459, 16, 857, 16, 1361, 67, 768, 4672, 3536, 31902, 279, 348, 442, 4263, 585, 364, 279, 2923, 1018, 18, 225, 1220, 6026, 279, 348, 442, 4263, 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, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 55, 442, 4263, 12, 2844, 67, 3459, 16, 857, 16, 1361, 67, 768, 4672, 3536, 31902, 279, 348, 442, 4263, 585, 364, 279, 2923, 1018, 18, 225, 1220, 6026, 279, 348, 442, 4263, 585, ...
classes = set([doc for doc in self.valdocs if isinstance(doc, ClassDoc)]) if not classes: return for doc in self.valdocs: if isinstance(doc, ClassDoc) and doc.bases != UNKNOWN:
if not self.class_list: return class_set = self.class_set.copy() for doc in self.class_list: if doc.bases != UNKNOWN:
def write_class_tree(self, out): """ Write HTML code for a nested list showing the base/subclass relationships between all documented classes. Each element of the top-level list is a class with no (documented) bases; and under each class is listed all of its subclasses. Note that in the case of multiple inheritance, a class may appear multiple times. This is used by L{write_trees} to write the class hierarchy. @todo: For multiple inheritance, don't repeat subclasses the second time a class is mentioned; instead, link to the first mention. """ # [XX] sort? and backref for multiple inheritance? classes = set([doc for doc in self.valdocs if isinstance(doc, ClassDoc)]) if not classes: return
28d88ae14617650a4a829fae94668100dc4e2b05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/28d88ae14617650a4a829fae94668100dc4e2b05/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1106, 67, 3413, 12, 2890, 16, 596, 4672, 3536, 2598, 3982, 981, 364, 279, 4764, 666, 17253, 326, 1026, 19, 10678, 11499, 3086, 777, 23051, 3318, 18, 225, 8315, 930, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 67, 1106, 67, 3413, 12, 2890, 16, 596, 4672, 3536, 2598, 3982, 981, 364, 279, 4764, 666, 17253, 326, 1026, 19, 10678, 11499, 3086, 777, 23051, 3318, 18, 225, 8315, 930, 434, 326, ...
file = open(getsourcefile(object)) except (TypeError, IOError): raise IOError, 'could not get source code' lines = file.readlines()
if hasattr(os, 'system') and os.system('more %s' % filename) == 0: return lambda text: pipepager(text, 'more') else: return ttypager finally: os.unlink(filename) def pipepager(text, cmd): """Page through text by feeding it to another program.""" pipe = os.popen(cmd, 'w') try: pipe.write(text) pipe.close() except IOError: pass def tempfilepager(text, cmd): """Page through text by invoking a program on a temporary file.""" import tempfile filename = tempfile.mktemp() file = open(filename, 'w') file.write(text)
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is raised if the source code cannot be retrieved.""" try: file = open(getsourcefile(object)) except (TypeError, IOError): raise IOError, 'could not get source code' lines = file.readlines() file.close() if ismodule(object): return lines, 0 if isclass(object): name = object.__name__ pat = re.compile(r'^\s*class\s*' + name + r'\b') for i in range(len(lines)): if pat.match(lines[i]): return lines, i else: raise IOError, 'could not find class definition' if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): if not hasattr(object, 'co_firstlineno'): raise IOError, 'could not find function definition' lnum = object.co_firstlineno - 1 pat = re.compile(r'^\s*def\s') while lnum > 0: if pat.match(lines[lnum]): break lnum = lnum - 1 return lines, lnum
4caa3a554805c295c44d1854ad0112769036d6d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2807/4caa3a554805c295c44d1854ad0112769036d6d6/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 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, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 16, ...
........ >>> import numpy as N
-------- >>> import numpy as NP
def optimize_function(x, optfunc_args): """ cost = optimize_function(x, optfunc_args) --- OR --- cost, joint_histogram = optimize_function(x, optfunc_args) computes the alignment between 2 volumes using cross correlation or mutual information metrics. In both the 8 bit joint histogram of the 2 images is computed. The 8 bit scaling is done using an integrated histogram method and is called prior to this. Parameters ....... x : {nd_array} this is the current (6-dim) array with 3 angles and 3 translations. optfunc_args : {tuple} this is a tuple of 8 elements that is formed in the scipy.optimize powell and cg (conjugate gradient) functions. this is why the elements need to be a tuple. The elements of optfunc_args are: image_F : {dictionary} image_F is the source image to be remapped during the registration. it is a dictionary with the data as an ndarray in the ['data'] component. image_G : {dictionary} image_G is the reference image that image_F gets mapped to. sample_vector : {nd_array} sample in x,y,x. should be (1,1,1) fwhm : {nd_array} Gaussian sigma do_lite : {0, 1} lite of 1 is to jitter both images during resampling. 0 is to not jitter. jittering is for non-aliased volumes. smooth : {0, 1} flag for joint histogram low pass filtering. 0 for no filter, 1 for do filter. method : {'nmi', 'mi', 'ncc', 'ecc'} flag for type of registration metric. nmi is normalized mutual information; mi is mutual information; ecc is entropy cross correlation; ncc is normalized cross correlation. ret_histo : {0, 1} if 0 return is: cost if 0 return is: cost, joint_histogram Returns ....... cost : {float} the negative of one of the mutual information metrics or negative cross correlation. use negative as the optimization is minimization. --- OR --- (if ret_histo = 1) cost : {float} the negative of one of the mutual information metrics or negative cross correlation. use negative as the optimization is minimization. joint_histogram : {nd_array} the 2D (256x256) joint histogram of the two volumes Examples ........ >>> import numpy as N >>> import _registration as reg >>> anat_desc = reg.load_anatMRI_desc() >>> image1 = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img') >>> image2 = reg.load_volume(anat_desc, imagename='ANAT1_V0001.img') >>> imdata = reg.build_structs() >>> image1['fwhm'] = reg.build_fwhm(image1['mat'], imdata['step']) >>> image2['fwhm'] = reg.build_fwhm(image2['mat'], imdata['step']) >>> method = 'ncc' >>> lite = 1 >>> smhist = 0 >>> ret_histo = 1 >>> optfunc_args = (image1, image2, imdata['step'], imdata['fwhm'], lite, smhist, method, ret_histo) >>> x = N.zeros(6, dtype=N.float64) >>> return cost, joint_histogram = reg.optimize_function(x, optfunc_args) """ image_F = optfunc_args[0] image_G = optfunc_args[1] sample_vector = optfunc_args[2] fwhm = optfunc_args[3] do_lite = optfunc_args[4] smooth = optfunc_args[5] method = optfunc_args[6] ret_histo = optfunc_args[7] rot_matrix = build_rotate_matrix(x) cost = 0.0 epsilon = 2.2e-16 # image_G is base image # image_F is the to-be-rotated image # rot_matrix is the 4x4 constructed (current angles and translates) transform matrix # sample_vector is the subsample vector for x-y-z F_inv = N.linalg.inv(image_F['mat']) composite = N.dot(F_inv, image_G['mat']) composite = N.dot(composite, rot_matrix) # allocate memory for 2D histogram joint_histogram = N.zeros([256, 256], dtype=N.float64); if do_lite: R.register_histogram_lite(image_F['data'], image_G['data'], composite, sample_vector, joint_histogram) else: R.register_histogram(image_F['data'], image_G['data'], composite, sample_vector, joint_histogram) # smooth the histogram if smooth: p = N.ceil(2*fwhm[0]).astype(int) x = N.array(range(-p, p+1)) kernel1 = smooth_kernel(fwhm[0], x) p = N.ceil(2*fwhm[1]).astype(int) x = N.array(range(-p, p+1)) kernel2 = smooth_kernel(fwhm[1], x) output=None # 2D filter in 1D separable stages axis = 0 result = NDI.correlate1d(joint_histogram, kernel1, axis, output) axis = 1 joint_histogram = NDI.correlate1d(result, kernel1, axis, output) joint_histogram += epsilon # prevent log(0) # normalize the joint histogram joint_histogram /= joint_histogram.sum() # get the marginals marginal_col = joint_histogram.sum(axis=0) marginal_row = joint_histogram.sum(axis=1) if method == 'mi': # mutual information marginal_outer = N.outer(marginal_col, marginal_row) H = joint_histogram * N.log(joint_histogram / marginal_outer) mutual_information = H.sum() cost = -mutual_information elif method == 'ecc': # entropy correlation coefficient marginal_outer = N.outer(marginal_col, marginal_row) H = joint_histogram * N.log(joint_histogram / marginal_outer) mutual_information = H.sum() row_entropy = marginal_row * N.log(marginal_row) col_entropy = marginal_col * N.log(marginal_col) ecc = -2.0*mutual_information/(row_entropy.sum() + col_entropy.sum()) cost = -ecc elif method == 'nmi': # normalized mutual information row_entropy = marginal_row * N.log(marginal_row) col_entropy = marginal_col * N.log(marginal_col) H = joint_histogram * N.log(joint_histogram) nmi = (row_entropy.sum() + col_entropy.sum()) / (H.sum()) cost = -nmi elif method == 'ncc': # cross correlation from the joint histogram r, c = joint_histogram.shape i = N.array(range(1,c+1)) j = N.array(range(1,r+1)) m1 = (marginal_row * i).sum() m2 = (marginal_col * j).sum() sig1 = N.sqrt((marginal_row*(N.square(i-m1))).sum()) sig2 = N.sqrt((marginal_col*(N.square(j-m2))).sum()) [a, b] = N.mgrid[1:c+1, 1:r+1] a = a - m1 b = b - m2 # element multiplies in the joint histogram and grids H = ((joint_histogram * a) * b).sum() ncc = H / (N.dot(sig1, sig2)) cost = -ncc if ret_histo: return cost, joint_histogram else: return cost
de681f926e982b0212f2f58bf637917926737f89 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/de681f926e982b0212f2f58bf637917926737f89/_registration.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 4672, 3536, 6991, 273, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 13, 565, 9948, 4869, 9948, 6991, 16, 15916, 67, 22702, 273, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 4672, 3536, 6991, 273, 10979, 67, 915, 12, 92, 16, 2153, 644, 67, 1968, 13, 565, 9948, 4869, 9948, 6991, 16, 15916, 67, 22702, 273, 1...
self.inside_csp.get_static_pad("src").link(videomixer_sink_1)
self.inside_capsfilter.get_static_pad("src").link(videomixer_sink_1)
def __init__(self, colorspace): gst.Bin.__init__(self)
ecdf44e11ac18aec2eeed3e887d07be5dbfd7265 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7705/ecdf44e11ac18aec2eeed3e887d07be5dbfd7265/videomixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 5740, 909, 4672, 314, 334, 18, 9913, 16186, 2738, 972, 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, ...
[ 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 5740, 909, 4672, 314, 334, 18, 9913, 16186, 2738, 972, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.body.append(self.context.pop()) self.context.append('') self.body.append(self.starttag(node, 'thead', valign='bottom'))
self.inTableHead = True
def visit_thead(self, node): self.write_colspecs() self.body.append(self.context.pop()) # '</colgroup>\n' # There may or may not be a <thead>; this is for <tbody> to use: self.context.append('') self.body.append(self.starttag(node, 'thead', valign='bottom'))
6375238ab8247c4cfacf9efad70324a50b6c7ce8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5620/6375238ab8247c4cfacf9efad70324a50b6c7ce8/OOwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 24604, 12, 2890, 16, 756, 4672, 365, 18, 2626, 67, 1293, 15115, 1435, 365, 18, 3432, 18, 6923, 12, 2890, 18, 2472, 18, 5120, 10756, 468, 4357, 1293, 1655, 5333, 82, 11, 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, 3757, 67, 24604, 12, 2890, 16, 756, 4672, 365, 18, 2626, 67, 1293, 15115, 1435, 365, 18, 3432, 18, 6923, 12, 2890, 18, 2472, 18, 5120, 10756, 468, 4357, 1293, 1655, 5333, 82, 11, 468, ...
path = path[len(self.homedir)+1:] if len(path) <= 0: return True for filter in self.filters: if re.search(filter[1],path) != None: action = filter[0] if action == ACTION_KEEP: debug('Keep path: ' + path,DEBUG_HIGH) return False elif action == ACTION_LOST: debug('Lost path: ' + path,DEBUG_HIGH) move(path, self.deposit) return False elif action == ACTION_RESTORE or action == ACTION_ERASE: return True debug('Keep path (default): ' + path,DEBUG_HIGH) return False
path = path[len(self.homedir)+1:] if len(path) <= 0: return True for filter in self.filters: if re.search(filter[1],path) != None: action = filter[0] if action == ACTION_KEEP: debug('Keep path: ' + path,DEBUG_HIGH) return False elif action == ACTION_LOST: debug('Lost path: ' + path,DEBUG_HIGH) move(path, self.deposit) return False elif action == ACTION_RESTORE or action == ACTION_ERASE: return True debug('Keep path (default): ' + path,DEBUG_HIGH) return False
def __restore_or_erase(self,path): "Returns True to carry on or erase and False to maintain" #Do nothing with the deposit if it's inside a home directory if path.startswith(self.deposit): debug('Deposit path: ' + path,DEBUG_MEDIUM) return False
22402be8c9e687a268ba384a5fd0ddf6e932fb57 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6139/22402be8c9e687a268ba384a5fd0ddf6e932fb57/TFuser_frozen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 13991, 67, 280, 67, 264, 448, 12, 2890, 16, 803, 4672, 315, 1356, 1053, 358, 9331, 603, 578, 22038, 471, 1083, 358, 17505, 6, 225, 468, 3244, 5083, 598, 326, 443, 1724, 309, 518,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13991, 67, 280, 67, 264, 448, 12, 2890, 16, 803, 4672, 315, 1356, 1053, 358, 9331, 603, 578, 22038, 471, 1083, 358, 17505, 6, 225, 468, 3244, 5083, 598, 326, 443, 1724, 309, 518,...
filename = os.path.join(sys.prefix, "Scripts", "pywin32_postinstall.py")
filename = os.path.join(self.prefix, "Scripts", "pywin32_postinstall.py")
def run(self): install.run(self) # Custom script we run at the end of installing - this is the same script # run by bdist_wininst # This child process won't be able to install the system DLLs until our # process has terminated (as distutils imports win32api!), so we must use # some 'no wait' executor - spawn seems fine! We pass the PID of this # process so the child will wait for us. # XXX - hmm - a closer look at distutils shows it only uses win32api # if _winreg fails - and this never should. Need to revisit this! # If self.root has a value, it means we are being "installed" into # some other directory than Python itself (eg, into a temp directory # for bdist_wininst to use) - in which case we must *not* run our # installer if not self.dry_run and not self.root: # We must run the script we just installed into Scripts, as it # may have had 2to3 run over it. filename = os.path.join(sys.prefix, "Scripts", "pywin32_postinstall.py") if not os.path.isfile(filename): raise RuntimeError("Can't find '%s'" % (filename,)) print "Executing post install script..." # What executable to use? This one I guess. os.spawnl(os.P_NOWAIT, sys.executable, sys.executable, filename, "-quiet", "-wait", str(os.getpid()), "-install")
73bdce3192a6fc8054823d994bd2a0cb1a1cabf9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/992/73bdce3192a6fc8054823d994bd2a0cb1a1cabf9/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3799, 18, 2681, 12, 2890, 13, 468, 6082, 2728, 732, 1086, 622, 326, 679, 434, 3799, 310, 300, 333, 353, 326, 1967, 2728, 468, 1086, 635, 324, 4413, 67, 8082, 8591...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 3799, 18, 2681, 12, 2890, 13, 468, 6082, 2728, 732, 1086, 622, 326, 679, 434, 3799, 310, 300, 333, 353, 326, 1967, 2728, 468, 1086, 635, 324, 4413, 67, 8082, 8591...
test = poller['Processing'] - procThres
test = poller['Processing'] - procThresh
def __call__(self): """ _operator()_
47a6028d668fe39b06ffe7da18863c318f75f645 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/47a6028d668fe39b06ffe7da18863c318f75f645/SimpleMonitors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 3536, 389, 9497, 1435, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 3536, 389, 9497, 1435, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def errQuit(message):
def errQuit(msg):
def errQuit(message): print >>sys.stderr, msg sys.exit(1)
30baf79b5f318bedbadf4be5ca320d6c53a4f066 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6926/30baf79b5f318bedbadf4be5ca320d6c53a4f066/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 393, 25365, 12, 3576, 4672, 1172, 1671, 9499, 18, 11241, 16, 1234, 2589, 18, 8593, 12, 21, 13, 225, 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, 393, 25365, 12, 3576, 4672, 1172, 1671, 9499, 18, 11241, 16, 1234, 2589, 18, 8593, 12, 21, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
,"bad" : [(0.8,"all","VAR_aggressor_nickp and VAR_defender_nickp eradicate each other in VAR_system_system\\In a sudden strike by the VAR_aggressor_nick VAR_aggressor_FG fleet, a well planned strategic missile assault went astray and both sides ended up fighting in a close, brutal beam battle. No starships were left in tact and survivors are making their ways to their respective bases in escape pods. Privateers would be encouraged to assist transporting stray VAR_aggressor_possessive pilots to their respective stations if in the VAR_system_system in the VAR_system_sector.\\\\\\GNN -- \"We care for our people too.\"")]
,"bad" : [(0.8,"all","VAR_aggressor_nickp and VAR_defender_nickp eradicate each other in VAR_system_system\\In a sudden strike by the VAR_aggressor_nicks VAR_aggressor_FG fleet, a well planned strategic missile assault went astray and both sides ended up fighting in a close, brutal beam battle. No starships were left in tact and survivors are making their ways to their respective bases in escape pods. Privateers would be encouraged to assist transporting stray VAR_aggressor_possessive pilots to their respective stations if in the VAR_system_system in the VAR_system_sector.\\\\\\GNN -- \"We care for our people too.\"")]
def allNews():
b35d196e59d7e40f4bc7237c909bb57f3adc6312 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2883/b35d196e59d7e40f4bc7237c909bb57f3adc6312/dynamic_news_content.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 17948, 13332, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 777, 17948, 13332, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
raw = self.wiki.latestDump(self.dbName, -2)
raw = self.wiki.latestDump(-2)
def reportPreviousDump(self, done): """Produce a link to the previous dump, if any""" try: raw = self.wiki.latestDump(self.dbName, -2) except: return "No prior dumps of this database stored."; date = prettyDate(raw) if done: prefix = "" message = "Last dumped on" else: prefix = "This dump is in progress; see also the " message = "previous dump from" return "%s<a href=\"../%s/\">%s %s</a>" % (prefix, raw, message, date)
ace9f02ecf09a1cdcca9c238e4f7bea4fcc101f1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9870/ace9f02ecf09a1cdcca9c238e4f7bea4fcc101f1/worker.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 8351, 10628, 12, 2890, 16, 2731, 4672, 3536, 25884, 279, 1692, 358, 326, 2416, 4657, 16, 309, 1281, 8395, 775, 30, 1831, 273, 365, 18, 13044, 18, 13550, 10628, 19236, 22, 13, 1335,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 8351, 10628, 12, 2890, 16, 2731, 4672, 3536, 25884, 279, 1692, 358, 326, 2416, 4657, 16, 309, 1281, 8395, 775, 30, 1831, 273, 365, 18, 13044, 18, 13550, 10628, 19236, 22, 13, 1335,...
\code{cusp\_only} is True, return only a basis for the cuspidal
``cusp_only`` is True, return only a basis for the cuspidal
def victor_miller_basis(k, prec=10, cusp_only=False, var='q'): r""" Compute and return the Victor-Miller basis for modular forms of weight k and level 1 to precision $O(q^prec)$. if \code{cusp\_only} is True, return only a basis for the cuspidal subspace. INPUT: k -- an integer prec -- (default: 10) a positive integer cusp_only -- bool (default: False) var -- string (default: 'q' OUTPUT: A sequence whose entries are power series in ZZ[[var]]. EXAMPLES: sage: victor_miller_basis(1, 6) [] sage: victor_miller_basis(0, 6) [ 1 + O(q^6) ] sage: victor_miller_basis(2, 6) [] sage: victor_miller_basis(4, 6) [ 1 + 240*q + 2160*q^2 + 6720*q^3 + 17520*q^4 + 30240*q^5 + O(q^6) ] sage: victor_miller_basis(6, 6, var='w') [ 1 - 504*w - 16632*w^2 - 122976*w^3 - 532728*w^4 - 1575504*w^5 + O(w^6) ] sage: victor_miller_basis(6, 6) [ 1 - 504*q - 16632*q^2 - 122976*q^3 - 532728*q^4 - 1575504*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6) [ 1 + 196560*q^2 + 16773120*q^3 + 398034000*q^4 + 4629381120*q^5 + O(q^6), q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(12, 6, cusp_only=True) [ q - 24*q^2 + 252*q^3 - 1472*q^4 + 4830*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6, cusp_only=True) [ q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(24, 6) [ 1 + 52416000*q^3 + 39007332000*q^4 + 6609020221440*q^5 + O(q^6), q + 195660*q^3 + 12080128*q^4 + 44656110*q^5 + O(q^6), q^2 - 48*q^3 + 1080*q^4 - 15040*q^5 + O(q^6) ] sage: victor_miller_basis(32, 6) [ 1 + 2611200*q^3 + 19524758400*q^4 + 19715347537920*q^5 + O(q^6), q + 50220*q^3 + 87866368*q^4 + 18647219790*q^5 + O(q^6), q^2 + 432*q^3 + 39960*q^4 - 1418560*q^5 + O(q^6) ] sage: victor_miller_basis(40,200)[1:] == victor_miller_basis(40,200,cusp_only=True) True sage: victor_miller_basis(200,40)[1:] == victor_miller_basis(200,40,cusp_only=True) True """ k = Integer(k) if k%2 == 1 or k==2: return Sequence([]) elif k < 0: raise ValueError, "k must be non-negative" elif k == 0: return Sequence([PowerSeriesRing(ZZ,var)(1).add_bigoh(prec)], cr=True) e = k.mod(12) if e == 2: e += 12 n = (k-e) // 12 if n == 0 and cusp_only: return Sequence([]) # If prec is less than or equal to the dimension of the space of # cusp forms, which is just n, then we know the answer, and we # simply return it. if prec <= n: q = PowerSeriesRing(ZZ,var).gen(0) err = bigO(q**prec) ls = [0] * (n+1) if not cusp_only: ls[0] = 1 + err for i in range(1,prec): ls[i] = q**i + err for i in range(prec,n+1): ls[i] = err return Sequence(ls, cr=True) F6 = ((-504)*eisenstein_series_qexp(6,prec,var=var)).change_ring(ZZ) if e == 0: A = F6.parent()(1) elif e == 4: A = (240*eisenstein_series_qexp(4,prec,var=var)).change_ring(ZZ) elif e == 6: A = F6 elif e == 8: A = (480*eisenstein_series_qexp(8,prec,var=var)).change_ring(ZZ) elif e == 10: A = (-264*eisenstein_series_qexp(10,prec,var=var)).change_ring(ZZ) else: # e == 14 A = (-24*eisenstein_series_qexp(14,prec,var=var)).change_ring(ZZ) if n == 0: return Sequence([A], cr=True) F6_squared = F6**2 D = delta_qexp(prec,var=var) Fprod = F6_squared Dprod = D R = A.parent() if cusp_only: ls = [R(0)] + [A] * n start = 1 else: ls = [A] * (n+1) start = 0 for i in range(1,n+1): ls[n-i] *= Fprod ls[i] *= Dprod Fprod *= F6_squared Dprod *= D Dprod = Dprod.add_bigoh(prec) if cusp_only: M = Matrix(ZZ, n, prec, [x.list() for x in ls[1:]]) for i in range(n): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i+1]) else: M = Matrix(ZZ, n+1, prec, [x.list() for x in ls]) for i in range(1,n+1): for j in range(i): M.add_multiple_of_row(j,i,-M[j][i]) return Sequence([ R(x.list()).add_bigoh(prec) for x in M.rows() ], cr=True)
6979dcbcafec9b2fb144201f22f8a230eb5b364d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6979dcbcafec9b2fb144201f22f8a230eb5b364d/vm_basis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28873, 280, 67, 81, 24462, 67, 23774, 12, 79, 16, 13382, 33, 2163, 16, 27964, 84, 67, 3700, 33, 8381, 16, 569, 2218, 85, 11, 4672, 436, 8395, 8155, 471, 327, 326, 776, 933, 280, 17, ...
class capture_server(threading.Thread): def run(self): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) global PORT PORT = test_support.bind_port(sock, HOST, PORT) sock.listen(1) conn, client = sock.accept() self.captured = "" while 1:
def capture_server(evt, buf): serv = socket.socket(socket.AF_INET, socket.SOCK_STREAM) serv.settimeout(3) serv.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) serv.bind(("", PORT)) serv.listen(5) try: conn, addr = serv.accept() except socket.timeout: pass else: n = 200 while n > 0:
def handle_error(self): self.error_handled = True
dd84c30abb9991f454be17968df61db451c62b5d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/dd84c30abb9991f454be17968df61db451c62b5d/test_asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 1636, 12, 2890, 4672, 365, 18, 1636, 67, 14387, 273, 1053, 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, 1640, 67, 1636, 12, 2890, 4672, 365, 18, 1636, 67, 14387, 273, 1053, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def column_module(self): """ Return the free module over the base ring spanned by the columns of this matrix. """ return self.transpose().row_space() def decomposition(self, is_diagonalizable=False, dual=False): """ Returns the decomposition of the free module on which this matrix acts from the right, along with whether this matrix acts irreducibly on each factor. The factors are guaranteed to be sorted in the same way as the corresponding factors of the characteristic polynomial. Let A be the matrix acting from the on the vector space V of column vectors. Assume that A is square. This function computes maximal subspaces W_1, ..., W_n corresponding to Galois conjugacy classes of eigenvalues of A. More precisely, let f(X) be the characteristic polynomial of A. This function computes the subspace $W_i = ker(g_(A)^n)$, where g_i(X) is an irreducible factor of f(X) and g_i(X) exactly divides f(X). If the optional parameter is_diagonalizable is True, then we let W_i = ker(g(A)), since then we know that ker(g(A)) = $ker(g(A)^n)$. If dual is True, also returns the corresponding decomposition of V under the action of the transpose of A. The factors are guarenteed to correspond. OUTPUT: list -- list of pairs (V,t), where V is a vector spaces and t is a bool, and t is True exactly when the charpoly of self on V is irreducible. (optional) list -- list of pairs (W,t), where W is a vector space and t is a bool, and t is True exactly when the charpoly of the transpose of self on W is irreducible. EXAMPLES: sage: MS1 = MatrixSpace(ZZ,4) sage: MS2 = MatrixSpace(QQ,6) sage: A = MS1.matrix([3,4,5,6,7,3,8,10,14,5,6,7,2,2,10,9]) sage: B = MS2(range(36)) sage: B*11 [-11 22 -11 -11 -11 -11] [ 11 -22 -11 -22 11 11] [-11 -11 -11 -22 -22 -11] [-22 22 -22 22 -11 11] [ 22 -11 11 -22 11 22] [ 11 11 11 -22 22 22] sage: decomposition(A) [(Ambient free module of rank 4 over the principal ideal domain Integer Ring, True)] sage: decomposition(B) [(Vector space of degree 6 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -5 4] [ 0 1 0 0 -4 3] [ 0 0 1 0 -3 2] [ 0 0 0 1 -2 1], False), (Vector space of degree 6 and dimension 2 over Rational Field Basis matrix: [ 1 0 -1 -2 -3 -4] [ 0 1 2 3 4 5], True)] """ if not self.is_square(): raise ArithmeticError, "self must be a square matrix" if self.nrows() == 0: return [] f = self.charpoly() E = []
def column_module(self): """ Return the free module over the base ring spanned by the columns of this matrix. """ return self.transpose().row_space() def decomposition(self, is_diagonalizable=False, dual=False): """ Returns the decomposition of the free module on which this matrix acts from the right, along with whether this matrix acts irreducibly on each factor. The factors are guaranteed to be sorted in the same way as the corresponding factors of the characteristic polynomial. Let A be the matrix acting from the on the vector space V of column vectors. Assume that A is square. This function computes maximal subspaces W_1, ..., W_n corresponding to Galois conjugacy classes of eigenvalues of A. More precisely, let f(X) be the characteristic polynomial of A. This function computes the subspace $W_i = ker(g_(A)^n)$, where g_i(X) is an irreducible factor of f(X) and g_i(X) exactly divides f(X). If the optional parameter is_diagonalizable is True, then we let W_i = ker(g(A)), since then we know that ker(g(A)) = $ker(g(A)^n)$. If dual is True, also returns the corresponding decomposition of V under the action of the transpose of A. The factors are guarenteed to correspond. OUTPUT: list -- list of pairs (V,t), where V is a vector spaces and t is a bool, and t is True exactly when the charpoly of self on V is irreducible. (optional) list -- list of pairs (W,t), where W is a vector space and t is a bool, and t is True exactly when the charpoly of the transpose of self on W is irreducible. EXAMPLES: sage: MS1 = MatrixSpace(ZZ,4) sage: MS2 = MatrixSpace(QQ,6) sage: A = MS1.matrix([3,4,5,6,7,3,8,10,14,5,6,7,2,2,10,9]) sage: B = MS2(range(36)) sage: B*11 [-11 22 -11 -11 -11 -11] [ 11 -22 -11 -22 11 11] [-11 -11 -11 -22 -22 -11] [-22 22 -22 22 -11 11] [ 22 -11 11 -22 11 22] [ 11 11 11 -22 22 22] sage: decomposition(A) [(Ambient free module of rank 4 over the principal ideal domain Integer Ring, True)] sage: decomposition(B) [(Vector space of degree 6 and dimension 4 over Rational Field Basis matrix: [ 1 0 0 0 -5 4] [ 0 1 0 0 -4 3] [ 0 0 1 0 -3 2] [ 0 0 0 1 -2 1], False), (Vector space of degree 6 and dimension 2 over Rational Field Basis matrix: [ 1 0 -1 -2 -3 -4] [ 0 1 2 3 4 5], True)] """ if not self.is_square(): raise ArithmeticError, "self must be a square matrix" if self.nrows() == 0: return [] f = self.charpoly() E = [] if dual: Edual = [] F = f.factor() if len(F) == 1: V = sage.modules.free_module.FreeModule( self.base_ring(), self.nrows()) m = F[0][1]
def column_module(self): """ Return the free module over the base ring spanned by the columns of this matrix. """ return self.transpose().row_space()
02d53b0592cc4acfb96bdf79debba1ab9872c797 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/02d53b0592cc4acfb96bdf79debba1ab9872c797/matrix_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1057, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 4843, 1605, 1879, 326, 1026, 9221, 1694, 10041, 635, 326, 2168, 434, 333, 3148, 18, 3536, 327, 365, 18, 2338, 4150, 7675, 492, 67, 2981, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1057, 67, 2978, 12, 2890, 4672, 3536, 2000, 326, 4843, 1605, 1879, 326, 1026, 9221, 1694, 10041, 635, 326, 2168, 434, 333, 3148, 18, 3536, 327, 365, 18, 2338, 4150, 7675, 492, 67, 2981, ...
candidates.remove(site)
tmpSites.remove(site)
def __resolveSiteCandidates(self,job,candidateSites,bannedSites,gridRequirements): """This method takes all client-provided inputs and resolves them into a list of candidate sites by checking against the allowed site mask for the Grid being used. """ #assume user knows what they're doing and avoid site mask e.g. sam jobs if gridRequirements: return S_OK(gridRequirements)
e9c6e257474666d8ef672b7bd24ccb56727e03bf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/e9c6e257474666d8ef672b7bd24ccb56727e03bf/PilotDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10828, 4956, 18455, 12, 2890, 16, 4688, 16, 19188, 17055, 16, 70, 10041, 17055, 16, 5222, 15465, 4672, 3536, 2503, 707, 5530, 777, 1004, 17, 29206, 4540, 471, 17385, 2182, 1368, 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, 1001, 10828, 4956, 18455, 12, 2890, 16, 4688, 16, 19188, 17055, 16, 70, 10041, 17055, 16, 5222, 15465, 4672, 3536, 2503, 707, 5530, 777, 1004, 17, 29206, 4540, 471, 17385, 2182, 1368, 279,...
'query': (self.command_query, _('Usage: /query <nick>\nQuery: Open a private conversation with <nick>. This nick has to be present in the room you\'re currently in.')),
'query': (self.command_query, _('Usage: /query <nick> [message]\nQuery: Open a private conversation with <nick>. This nick has to be present in the room you\'re currently in. If you specified a message after the nickname, it will immediately be sent to this user')),
def __init__(self, stdscr=None, muc=None): self.init_curses(stdscr) self.stdscr = stdscr self.window = Window(stdscr) self.rooms = [Room('Info', '', self.window)] self.ignores = {}
2b19ec1cff9435dc5608def7d1ef9050f66763ac /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/2b19ec1cff9435dc5608def7d1ef9050f66763ac/gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2044, 24638, 33, 7036, 16, 4129, 71, 33, 7036, 4672, 365, 18, 2738, 67, 1397, 2420, 12, 5084, 24638, 13, 365, 18, 5084, 24638, 273, 2044, 24638, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2044, 24638, 33, 7036, 16, 4129, 71, 33, 7036, 4672, 365, 18, 2738, 67, 1397, 2420, 12, 5084, 24638, 13, 365, 18, 5084, 24638, 273, 2044, 24638, 365, 18,...
${D3} == {'a':1, 'c':3}
${D3} == {'a': 1, 'c': 3}
def remove_from_dictionary(self, dictionary, *keys): """Removes the given keys from the dictionary.
2f5075140c0afeaf5bda26b5924aceb3478d1a14 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/2f5075140c0afeaf5bda26b5924aceb3478d1a14/Collections.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2080, 67, 15556, 12, 2890, 16, 3880, 16, 380, 2452, 4672, 3536, 6220, 326, 864, 1311, 628, 326, 3880, 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, 1206, 67, 2080, 67, 15556, 12, 2890, 16, 3880, 16, 380, 2452, 4672, 3536, 6220, 326, 864, 1311, 628, 326, 3880, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.skin = easyCIconfigMenu.skin
def __init__(self, session, ci_slot="9"): ci=ci_slot CIconfigMenu.__init__(self, session, ci_slot) self.skin = easyCIconfigMenu.skin
7ac3daaddd1d808a9238391cd14613931900e4f9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6652/7ac3daaddd1d808a9238391cd14613931900e4f9/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 9039, 67, 14194, 1546, 29, 6, 4672, 9039, 33, 8450, 67, 14194, 17166, 1425, 4599, 16186, 2738, 972, 12, 2890, 16, 1339, 16, 9039, 67, 14194, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1339, 16, 9039, 67, 14194, 1546, 29, 6, 4672, 9039, 33, 8450, 67, 14194, 17166, 1425, 4599, 16186, 2738, 972, 12, 2890, 16, 1339, 16, 9039, 67, 14194, 13...
if tr_enc: if tr_enc.lower() != 'chunked': raise UnknownTransferEncoding()
if tr_enc and tr_enc.lower() == "chunked":
def begin(self): if self.msg is not None: # we've already started reading the response return
1381888c4a9d8d0cb461873dc2fda58594d747e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/1381888c4a9d8d0cb461873dc2fda58594d747e9/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 12, 2890, 4672, 309, 365, 18, 3576, 353, 486, 599, 30, 468, 732, 8081, 1818, 5746, 6453, 326, 766, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2376, 12, 2890, 4672, 309, 365, 18, 3576, 353, 486, 599, 30, 468, 732, 8081, 1818, 5746, 6453, 326, 766, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
"""
type -- 'spreadsheet' or 'text' """ if type is None: body = self.get_body() if body is None: raise ValueError, "document type not found" type = {'office:spreadsheet': 'spreadsheet', 'office:text': 'text'}.get(body.get_tagname()) if type is None: raise ValueError, "document type not supported for images"
def set_cell_image(self, coordinates, image_frame): """Do all the magic to display an image in the cell at the given coordinates.
d4837f0d521813ba71c2eda66aabaa88a8ceca00 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10612/d4837f0d521813ba71c2eda66aabaa88a8ceca00/table.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3855, 67, 2730, 12, 2890, 16, 5513, 16, 1316, 67, 3789, 4672, 3536, 3244, 777, 326, 8146, 358, 2562, 392, 1316, 316, 326, 2484, 622, 326, 864, 5513, 18, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3855, 67, 2730, 12, 2890, 16, 5513, 16, 1316, 67, 3789, 4672, 3536, 3244, 777, 326, 8146, 358, 2562, 392, 1316, 316, 326, 2484, 622, 326, 864, 5513, 18, 2, -100, -100, -100, ...
document.body[i] = document.body[i].replace('\\begin_inset Space \\leftarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'leftarrowfill{}\n\\end_layout\n\n\\end_inset\n\n')
subst = document.body[i].replace('\\begin_inset Space \\leftarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'leftarrowfill{}\n\\end_layout\n\n\\end_inset\n\n') subst = subst.split('\n') document.body[i : i+1] = subst i += len(subst)
def revert_leftarrowfill(document): ' Revert \\begin_inset Space \\leftarrowfill{} to ERT ' i = 0 while True: i = find_token(document.body, '\\begin_inset Space \\leftarrowfill{}', i) if i == -1: return j = find_end_of_inset(document.body, i) if j == -1: document.warning("Malformed LyX document: Could not find end of space inset.") continue del document.body[j] document.body[i] = document.body[i].replace('\\begin_inset Space \\leftarrowfill{}', \ '\\begin_inset ERT\nstatus collapsed\n\n' \ '\\begin_layout Standard\n\n\n\\backslash\n' \ 'leftarrowfill{}\n\\end_layout\n\n\\end_inset\n\n')
a97fbaa6858229f4bef56786ffb07688ef5a4d82 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7514/a97fbaa6858229f4bef56786ffb07688ef5a4d82/lyx_1_6.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 4482, 7815, 5935, 12, 5457, 4672, 296, 868, 1097, 1736, 10086, 67, 267, 542, 14059, 1736, 4482, 7815, 5935, 2916, 358, 4232, 56, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 4482, 7815, 5935, 12, 5457, 4672, 296, 868, 1097, 1736, 10086, 67, 267, 542, 14059, 1736, 4482, 7815, 5935, 2916, 358, 4232, 56, 296, 277, 273, 374, 1323, 1053, 30, 277, 273, ...
box.pack_start(gtk.Label("1"),True, True, 0)
def __init__(self, controls): print "Create tray icon conf" box = gtk.VBox(False, 0) box.hide() self.tray_icon_button = gtk.CheckButton(label=_("Show tray icon"), use_underline=True) self.tray_icon_button.connect("clicked", self.on_show_tray_icon) self.close_button = gtk.RadioButton(None, label=_("On close window - close player"))
e95e221c9cac0e529d9add9d2d672f92e7ce78b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/e95e221c9cac0e529d9add9d2d672f92e7ce78b9/tray_icon.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11022, 4672, 225, 1172, 315, 1684, 268, 435, 4126, 2195, 6, 3919, 273, 22718, 18, 58, 3514, 12, 8381, 16, 374, 13, 3919, 18, 11248, 1435, 225, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 11022, 4672, 225, 1172, 315, 1684, 268, 435, 4126, 2195, 6, 3919, 273, 22718, 18, 58, 3514, 12, 8381, 16, 374, 13, 3919, 18, 11248, 1435, 225, 365, 18, ...
struct_type_def= XtreemFSJavaStructTypeTraits.getStructTypeDef( self )
struct_type_def= XtreemFSJavaStructTypeTraits._getTypeDef( self )
def getTypeDef( self ): type_name = self.type.name struct_type_def= XtreemFSJavaStructTypeTraits.getStructTypeDef( self ) return """\
a13e3312e87896dc80e92179d58f5b4755689053 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7199/a13e3312e87896dc80e92179d58f5b4755689053/generate_xtreemfs_java.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3130, 3262, 12, 365, 262, 30, 618, 67, 529, 273, 365, 18, 723, 18, 529, 1958, 67, 723, 67, 536, 33, 1139, 27427, 351, 4931, 5852, 3823, 559, 30370, 6315, 588, 559, 3262, 12, 365, 262...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3130, 3262, 12, 365, 262, 30, 618, 67, 529, 273, 365, 18, 723, 18, 529, 1958, 67, 723, 67, 536, 33, 1139, 27427, 351, 4931, 5852, 3823, 559, 30370, 6315, 588, 559, 3262, 12, 365, 262...
def rcpt(self,recip):
def rcpt(self,recip,options=[]):
def rcpt(self,recip): """ SMTP 'rcpt' command. Indicates 1 recipient for this mail. """ self.putcmd("rcpt","to:%s" % quoteaddr(recip)) return self.getreply()
9cc6c7b00f7761dd722ad6a9440a98985710edf2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/9cc6c7b00f7761dd722ad6a9440a98985710edf2/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4519, 337, 12, 2890, 16, 266, 3449, 16, 2116, 33, 8526, 4672, 3536, 18102, 296, 1310, 337, 11, 1296, 18, 18336, 404, 8027, 364, 333, 4791, 18, 3536, 365, 18, 458, 4172, 2932, 1310, 337...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4519, 337, 12, 2890, 16, 266, 3449, 16, 2116, 33, 8526, 4672, 3536, 18102, 296, 1310, 337, 11, 1296, 18, 18336, 404, 8027, 364, 333, 4791, 18, 3536, 365, 18, 458, 4172, 2932, 1310, 337...
sctpath = hasattr(settings.LIB_PATH) and settings.LIB_PATH or '.'
sctpath = hasattr(settings,'LIB_PATH') and settings.LIB_PATH or '.'
def pdf_generate(self): """ Generates the PDF for this snip and stores it into cachedir. """ cachefile = self.pdf_get_cachefile() xmlfile = cachefile + '.xhtml'
6de982425fff7ae5c8dd37d637236e0c1a68cf83 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11563/6de982425fff7ae5c8dd37d637236e0c1a68cf83/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 67, 7163, 12, 2890, 4672, 3536, 31902, 326, 12667, 364, 333, 4556, 625, 471, 9064, 518, 1368, 3472, 481, 18, 3536, 1247, 768, 273, 365, 18, 7699, 67, 588, 67, 2493, 768, 1435, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8169, 67, 7163, 12, 2890, 4672, 3536, 31902, 326, 12667, 364, 333, 4556, 625, 471, 9064, 518, 1368, 3472, 481, 18, 3536, 1247, 768, 273, 365, 18, 7699, 67, 588, 67, 2493, 768, 1435, 20...
if [i for i in moin_link_schemes if refuri.lstrip().startswith(i)]:
if [scheme for scheme in moin_link_schemes if refuri.lstrip().startswith(scheme)]:
def visit_reference(self, node): target = None # These are the special link schemes that MoinMoin supports. We let # MoinMoin handle these types. moin_link_schemes = ['wiki:', 'attachment:', 'inline:', 'drawing:'] # Do I need to lstrip? TODO: Find this out. Doesn't look like I need to # since I don't when assigning target. if 'refuri' in node.attributes: refuri = node['refuri'] if [i for i in moin_link_schemes if refuri.lstrip().startswith(i)]: target = refuri # What is this? TODO: Figure this out and comment elif ('name' in node.attributes and fully_normalize_name(node['name']) == refuri): target = ':%s:' % (node['name']) # The node should have a whitespace normalized name if the docutlis # restructured text parser would normally fully normalize the name. elif ':' not in refuri: target = ':%s:' % (refuri) if target: self.strip_paragraph = 1 # inline is special. We're not doing a link really, we need # moinmoin to actually insert the attachment. if target.startswith('inline:'): self.wikiparser.raw = target self.wikiparser.format(self.formatter) else: # Sometimes a newline will creep in to the node's text. This # throws the moinmoin regex so a link will not get processed. node_text = node.astext().replace('\n', ' ') self.wikiparser.raw = '[%s %s]' % (target, node_text) self.wikiparser.format(self.formatter) self.strip_paragraph = 0 raise docutils.nodes.SkipNode return html4css1.HTMLTranslator.visit_reference(self, node)
531c379099d2b78f3c83756e295ecd3e6990f0ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/531c379099d2b78f3c83756e295ecd3e6990f0ec/rst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 1018, 273, 599, 225, 468, 8646, 854, 326, 4582, 1692, 20436, 716, 490, 885, 49, 885, 6146, 18, 1660, 2231, 468, 490, 885, 49, 885, 1640, 4259, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 6180, 12, 2890, 16, 756, 4672, 1018, 273, 599, 225, 468, 8646, 854, 326, 4582, 1692, 20436, 716, 490, 885, 49, 885, 6146, 18, 1660, 2231, 468, 490, 885, 49, 885, 1640, 4259, ...
if self.rule:
if self.rule is None: self.folder.end_data(name) else:
def end_element (self, name): self.cmode = None if self.rule: self.rule.end_data(name) if name in rulenames: if self.compile_data: self.rule.compile_data() elif name=='folder': if self.compile_data: self.folder.compile_data()
3b1dd0c1c8226016f7131228333bb2ac1bd852ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/3b1dd0c1c8226016f7131228333bb2ac1bd852ed/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 679, 67, 2956, 261, 2890, 16, 508, 4672, 365, 18, 71, 3188, 273, 599, 309, 365, 18, 5345, 353, 599, 30, 365, 18, 5609, 18, 409, 67, 892, 12, 529, 13, 469, 30, 365, 18, 5345, 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, 679, 67, 2956, 261, 2890, 16, 508, 4672, 365, 18, 71, 3188, 273, 599, 309, 365, 18, 5345, 353, 599, 30, 365, 18, 5609, 18, 409, 67, 892, 12, 529, 13, 469, 30, 365, 18, 5345, 18, ...
\
\
def parse(self, text, lineno, memo, parent): """ Return 2 lists: nodes (text and inline elements), and system_messages.
9fe47ec4311156cad473d8ed8bf0dba5fd73c14e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/9fe47ec4311156cad473d8ed8bf0dba5fd73c14e/states.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 1109, 12, 2890, 16, 977, 16, 7586, 16, 11063, 16, 982, 4672, 3536, 2000, 576, 6035, 30, 2199, 261, 955, 471, 6370, 2186, 3631, 471, 2619, 67, 6833, 18, 2, -100, -100, -100, -100, -100,...
os.system('foobnix --prev')
thread.start_new_thread(os.system,("foobnix --prev",))
def on_mediakey(comes_from, what): """ gets called when multimedia keys are pressed down. """ if what in ['Stop', 'Play', 'Next', 'Previous']: if what == 'Stop': os.system('foobnix --stop') elif what == 'Play': os.system('foobnix --play') elif what == 'Next': os.system('foobnix --next') elif what == 'Previous': os.system('foobnix --prev') else: print ('Got a multimedia key...')
486ba87cdfca52d09c74ac28da083e37ee35da92 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14563/486ba87cdfca52d09c74ac28da083e37ee35da92/foobnix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5660, 581, 402, 12, 10127, 67, 2080, 16, 4121, 4672, 3536, 5571, 2566, 1347, 1778, 381, 1980, 1311, 854, 19504, 2588, 18, 3536, 309, 4121, 316, 10228, 4947, 2187, 296, 11765, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 5660, 581, 402, 12, 10127, 67, 2080, 16, 4121, 4672, 3536, 5571, 2566, 1347, 1778, 381, 1980, 1311, 854, 19504, 2588, 18, 3536, 309, 4121, 316, 10228, 4947, 2187, 296, 11765, 21...
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process):
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process, livetime_program):
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row #
f23162e4f63afbd6a2032de2d75ca44643717584 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3592/f23162e4f63afbd6a2032de2d75ca44643717584/ligolw_binjfind.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2025, 2434, 16, 324, 67, 70, 67, 536, 16, 2393, 67, 70, 67, 536, 16, 7533, 67, 70, 67, 536, 16, 2393, 67, 71, 67, 73, 67, 536, 16, 2393, 67, 71, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2025, 2434, 16, 324, 67, 70, 67, 536, 16, 2393, 67, 70, 67, 536, 16, 7533, 67, 70, 67, 536, 16, 2393, 67, 71, 67, 73, 67, 536, 16, 2393, 67, 71, ...
c.registerFont0(Type1Font('Helvetica-WinAnsi', 'Helvetica-Oblique', WinAnsiEncoding))
c.addFont(Type1Font('Helvetica-WinAnsi', 'Helvetica-Oblique', WinAnsiEncoding))
def testFonts(): # make a custom encoded font. import reportlab.pdfgen.canvas c = reportlab.pdfgen.canvas.Canvas('testfonts.pdf') c.setPageCompression(0) c.setFont('Helvetica', 12) c.drawString(100, 700, 'The text below should be in a custom encoding in which all vowels become "z"') # invent a new language where vowels are replaced with letter 'z' zenc = SingleByteEncoding('WinAnsiEncoding') for ch in 'aeiou': zenc[ord(ch)] = 'z' for ch in 'AEIOU': zenc[ord(ch)] = 'Z' f = Type1Font('FontWithoutVowels', 'Helvetica-Oblique', zenc) c.registerFont0(f) c.setFont('FontWithoutVowels', 12) c.drawString(125, 675, "The magic word is squamish ossifrage") # now demonstrate adding a Euro to MacRoman, which lacks one c.setFont('Helvetica', 12) c.drawString(100, 650, "MacRoman encoding lacks a Euro. We'll make a Mac font with the Euro at #219:") # WinAnsi Helvetica c.registerFont0(Type1Font('Helvetica-WinAnsi', 'Helvetica-Oblique', WinAnsiEncoding)) c.setFont('Helvetica-WinAnsi', 12) c.drawString(125, 625, 'WinAnsi with Euro: character 128 = "\200"') c.registerFont0(Type1Font('MacHelvNoEuro', 'Helvetica-Oblique', MacRomanEncoding)) c.setFont('MacHelvNoEuro', 12) c.drawString(125, 600, 'Standard MacRoman, no Euro: Character 219 = "\333"') # oct(219)=0333 # now make our hacked encoding euroMac = SingleByteEncoding('MacRomanEncoding') euroMac[219] = 'Euro' c.registerFont0(Type1Font('MacHelvWithEuro', 'Helvetica-Oblique', euroMac)) c.setFont('MacHelvWithEuro', 12) c.drawString(125, 575, 'Hacked MacRoman with Euro: Character 219 = "\333"') # oct(219)=0333 # now test width setting with and without _rl_accel - harder # make an encoding where 'm' becomes 'i' c.setFont('Helvetica', 12) c.drawString(100, 500, "Recode 'm' to 'i' and check we can measure widths. Boxes should surround letters.") sample = 'Mmmmm. ' * 6 + 'Mmmm' c.setFont('Helvetica-Oblique',12) c.drawString(125, 475, sample) w = c.stringWidth(sample, 'Helvetica-Oblique', 12) c.rect(125, 475, w, 12) narrowEnc = SingleByteEncoding('WinAnsiEncoding') narrowEnc[ord('m')] = 'i' narrowEnc[ord('M')] = 'I' c.registerFont0(Type1Font('narrow', 'Helvetica-Oblique', narrowEnc)) c.setFont('narrow', 12) c.drawString(125, 450, sample) w = c.stringWidth(sample, 'narrow', 12) c.rect(125, 450, w, 12) c.setFont('Helvetica', 12) c.drawString(100, 400, "Symbol & Dingbats fonts - check we still get valid PDF in StandardEncoding") c.setFont('Symbol', 12) c.drawString(100, 375, 'abcdefghijklmn') c.setFont('ZapfDingbats', 12) c.drawString(300, 375, 'abcdefghijklmn') c.save() print 'saved testfonts.pdf'
56032c17c526ce850cb9256ea218a8cc0ff7b668 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/56032c17c526ce850cb9256ea218a8cc0ff7b668/pdfmetrics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 5711, 87, 13332, 468, 1221, 279, 1679, 3749, 3512, 18, 1930, 2605, 7411, 18, 22353, 2137, 275, 18, 15424, 276, 273, 2605, 7411, 18, 22353, 2137, 275, 18, 15424, 18, 12971, 2668, 38...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5711, 87, 13332, 468, 1221, 279, 1679, 3749, 3512, 18, 1930, 2605, 7411, 18, 22353, 2137, 275, 18, 15424, 276, 273, 2605, 7411, 18, 22353, 2137, 275, 18, 15424, 18, 12971, 2668, 38...
del fakeRec
fakeRec = None
def getServiceType(ref): # helper function to get a service type of a service reference serviceInfo = serviceHandler.info(ref) serviceInfo = serviceInfo and serviceInfo.getInfoObject(ref, iServiceInformation.sTransponderData) if serviceInfo: return { "Satellite" : "DVB-S", "Cable" : "DVB-C", "Terrestrial" : "DVB-T"}[serviceInfo["type"]]
24ec7ceb4ddd2749c60716f35f3f01ba0e2fcc13 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/24ec7ceb4ddd2749c60716f35f3f01ba0e2fcc13/TimerSanityCheck.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6373, 559, 12, 1734, 4672, 468, 4222, 445, 358, 336, 279, 1156, 618, 434, 279, 1156, 2114, 1156, 966, 273, 1156, 1503, 18, 1376, 12, 1734, 13, 1156, 966, 273, 1156, 966, 471, 1156, 966...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6373, 559, 12, 1734, 4672, 468, 4222, 445, 358, 336, 279, 1156, 618, 434, 279, 1156, 2114, 1156, 966, 273, 1156, 1503, 18, 1376, 12, 1734, 13, 1156, 966, 273, 1156, 966, 471, 1156, 966...
return "{method '%s' of '%s' objects}" % (w_function.name, w_arg.w_class.name)
return "{method '%s' of '%s' objects}" % (w_function.name, class_name)
def create_spec(space, w_arg): if isinstance(w_arg, Method): w_function = w_arg.w_function assert isinstance(w_function, Function) return "{method '%s' of '%s' objects}" % (w_function.name, w_arg.w_class.name) elif isinstance(w_arg, Function): module = space.str_w(w_arg.w_module) if module == '__builtin__': module = '' else: module += '.' return '{%s%s function}' % (module, w_arg.name) else: return '{!!!unknown!!!}'
43f264e5b6f63b60be5b3efb4c0afbecc069882e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6934/43f264e5b6f63b60be5b3efb4c0afbecc069882e/interp_lsprof.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2793, 12, 2981, 16, 341, 67, 3175, 4672, 309, 1549, 12, 91, 67, 3175, 16, 2985, 4672, 341, 67, 915, 273, 341, 67, 3175, 18, 91, 67, 915, 1815, 1549, 12, 91, 67, 915, 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, 752, 67, 2793, 12, 2981, 16, 341, 67, 3175, 4672, 309, 1549, 12, 91, 67, 3175, 16, 2985, 4672, 341, 67, 915, 273, 341, 67, 3175, 18, 91, 67, 915, 1815, 1549, 12, 91, 67, 915, 16, ...
assert self._waiter_job.poll('run') == 'run'
assert self._waiter_job.poll('run') == 'run', '_waiter_job must live'
def kill_all(self, *throw_args): assert self._waiter_job.poll('run') == 'run' for job in self._jobs: g = job.greenlet if g is not None: api.get_hub().schedule_call(0, g.throw, *throw_args) api.sleep(0)
2ea50a175781db413892ace970a0e6314607e240 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10078/2ea50a175781db413892ace970a0e6314607e240/coros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 454, 12, 2890, 16, 380, 12849, 67, 1968, 4672, 1815, 365, 6315, 7048, 264, 67, 4688, 18, 13835, 2668, 2681, 6134, 422, 296, 2681, 2187, 2070, 7048, 264, 67, 4688, 1297, 8429, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 454, 12, 2890, 16, 380, 12849, 67, 1968, 4672, 1815, 365, 6315, 7048, 264, 67, 4688, 18, 13835, 2668, 2681, 6134, 422, 296, 2681, 2187, 2070, 7048, 264, 67, 4688, 1297, 8429, ...
matches = filter(self._filtersrc, exactmatched + matched)
matches = filter(self._filtersrcdebug, exactmatched + matched)
def getPackageObjects(self): """Cycle through the list of packages, get package object matches, and resolve deps.
cbe47772c9a4d49027c12f375d4069b4beef4ce5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8489/cbe47772c9a4d49027c12f375d4069b4beef4ce5/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11506, 4710, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 5907, 16, 336, 2181, 733, 1885, 16, 471, 2245, 8740, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11506, 4710, 12, 2890, 4672, 3536, 13279, 3059, 326, 666, 434, 5907, 16, 336, 2181, 733, 1885, 16, 471, 2245, 8740, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
indent = self.GetIndentLevel() * 5 width = self.GetMaxDepth() * 5
dayWidth = self._calendarCanvas.dayWidth if self._calendarCanvas.parent.blockItem.dayMode: maxDepth = self.GetMaxDepth() width = dayWidth / (maxDepth + 1) indent = width * self.GetIndentLevel() else: indent = self.GetIndentLevel() * 5 width = dayWidth - self.GetMaxDepth() * 5
def UpdateDrawingRects(self): item = self.GetItem() indent = self.GetIndentLevel() * 5 width = self.GetMaxDepth() * 5 self._boundsRects = list(self.GenerateBoundsRects(self._calendarCanvas, item.startTime, item.endTime, indent, width)) self._bounds = self._boundsRects[0]
0a21fbc721d5f69b99123eda1ebecfea3afa001f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0a21fbc721d5f69b99123eda1ebecfea3afa001f/CalendarCanvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 26885, 6120, 87, 12, 2890, 4672, 761, 273, 365, 18, 967, 1180, 1435, 2548, 2384, 273, 365, 6315, 11650, 12971, 18, 2881, 2384, 309, 365, 6315, 11650, 12971, 18, 2938, 18, 2629, 118...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2315, 26885, 6120, 87, 12, 2890, 4672, 761, 273, 365, 18, 967, 1180, 1435, 2548, 2384, 273, 365, 6315, 11650, 12971, 18, 2881, 2384, 309, 365, 6315, 11650, 12971, 18, 2938, 18, 2629, 118...
0xA0000005: "Special Folder Info", 0xA0000007: "Custom Icon Details",
0xA0000004: "Console Codepage Information", 0xA0000005: "Special Folder Info", 0xA0000006: "DarwinID (Windows Installer ID) Information", 0xA0000007: "Custom Icon Details",
def createValue(self): return self["data"].value
2078f158e6614c23c8bcfb26762a3370d667c630 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/2078f158e6614c23c8bcfb26762a3370d667c630/lnk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 620, 12, 2890, 4672, 327, 365, 9614, 892, 6, 8009, 1132, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 620, 12, 2890, 4672, 327, 365, 9614, 892, 6, 8009, 1132, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
indent = next_indentation(self.s, self.config.tab_length)
indent = repl.next_indentation(self.s, self.config.tab_length)
def reevaluate(self): """Clear the buffer, redraw the screen and re-evaluate the history"""
590ff5594c63ceb9b19d19a62db266bfdad13eae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6932/590ff5594c63ceb9b19d19a62db266bfdad13eae/cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 21024, 12, 2890, 4672, 3536, 9094, 326, 1613, 16, 16540, 326, 5518, 471, 283, 17, 21024, 326, 4927, 8395, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 283, 21024, 12, 2890, 4672, 3536, 9094, 326, 1613, 16, 16540, 326, 5518, 471, 283, 17, 21024, 326, 4927, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
tooltips.set_tip(self.button_connect, _('Connect or reconnect the Tryton server'))
tooltips.set_tip(self.button_connect, _('Connect the Tryton server'))
def __init__(self, parent): self.dialog = gtk.Dialog(title=_('Login'), parent=parent, flags=gtk.DIALOG_MODAL|gtk.DIALOG_DESTROY_WITH_PARENT) self.dialog.set_size_request(500, 301) self.dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) self.dialog.set_has_separator(False) self.dialog.set_icon(TRYTON_ICON) tooltips = gtk.Tooltips() button_cancel = gtk.Button(_('_Cancel')) img_cancel = gtk.Image() img_cancel.set_from_stock('tryton-cancel', gtk.ICON_SIZE_BUTTON) button_cancel.set_image(img_cancel) tooltips.set_tip(button_cancel, _('Cancel connection or reconnection to the Tryton server')) self.dialog.add_action_widget(button_cancel, gtk.RESPONSE_CANCEL) self.button_connect = gtk.Button(_('C_onnect')) img_connect = gtk.Image() img_connect.set_from_stock('tryton-connect', gtk.ICON_SIZE_BUTTON) self.button_connect.set_image(img_connect) self.button_connect.set_flags(gtk.CAN_DEFAULT) tooltips.set_tip(self.button_connect, _('Connect or reconnect the Tryton server')) self.dialog.add_action_widget(self.button_connect, gtk.RESPONSE_OK) self.dialog.set_default_response(gtk.RESPONSE_OK) dialog_vbox = gtk.VBox() vbox_image = gtk.VBox() image = gtk.Image() image.set_from_file(os.path.join(PIXMAPS_DIR, 'tryton.png')) image.set_size_request(500, 129) vbox_image.pack_start(image) dialog_vbox.pack_start(vbox_image) table_main = gtk.Table(4, 3, False) table_main.set_border_width(10) table_main.set_row_spacings(3) table_main.set_col_spacings(3) vbox_image.pack_start(table_main, True, True, 0) vbox_combo = gtk.VBox() self.combo_database = gtk.ComboBox() self.combo_label = gtk.Label() self.combo_label.set_use_markup(True) self.combo_label.set_alignment(0, 1) vbox_combo.pack_start(self.combo_database, True, True, 0) vbox_combo.pack_start(self.combo_label, False, False, 0) table_main.attach(vbox_combo, 1, 3, 1, 2) self.entry_password = gtk.Entry() self.entry_password.set_visibility(False) self.entry_password.set_activates_default(True) table_main.attach(self.entry_password, 1, 3, 3, 4) self.entry_login = gtk.Entry() self.entry_login.set_text("admin") self.entry_login.set_activates_default(True) table_main.attach(self.entry_login, 1, 3, 2, 3) label_server = gtk.Label() label_server.set_text(_("Server:")) label_server.set_alignment(1, 0.5) label_server.set_padding(3, 3) table_main.attach(label_server, 0, 1, 0, 1, xoptions=gtk.FILL) label_database = gtk.Label() label_database.set_text(_("Database:")) label_database.set_alignment(1, 0.5) label_database.set_padding(3, 3) table_main.attach(label_database, 0, 1, 1, 2, xoptions=gtk.FILL) self.entry_server = gtk.Entry() table_main.attach(self.entry_server, 1, 2, 0, 1) self.entry_server.set_sensitive(False) self.entry_server.unset_flags(gtk.CAN_FOCUS) self.entry_server.set_editable(False) self.entry_server.set_text("localhost") self.entry_server.set_activates_default(True) self.entry_server.set_width_chars(16) self.button_server = gtk.Button(label=_("C_hange"), stock=None, use_underline=True) tooltips.set_tip(self.button_server, _('Configure the Tryton server connection preferences')) table_main.attach(self.button_server, 2, 3, 0, 1, xoptions=gtk.FILL) label_password = gtk.Label(str = _("Password:")) label_password.set_justify(gtk.JUSTIFY_RIGHT) label_password.set_alignment(1, 0.5) label_password.set_padding(3, 3) table_main.attach(label_password, 0, 1, 3, 4, xoptions=gtk.FILL) label_username = gtk.Label(str = _("User name:")) label_username.set_alignment(1, 0.5) label_username.set_padding(3, 3) table_main.attach(label_username, 0, 1, 2, 3, xoptions=gtk.FILL) self.entry_password.grab_focus() self.dialog.vbox.pack_start(dialog_vbox)
8f1f859f7371704c71e0e9038dfc22e1ff53b197 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/8f1f859f7371704c71e0e9038dfc22e1ff53b197/dblogin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 4672, 365, 18, 12730, 273, 22718, 18, 6353, 12, 2649, 33, 67, 2668, 5358, 19899, 982, 33, 2938, 16, 2943, 33, 4521, 79, 18, 2565, 18683, 67, 6720, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 4672, 365, 18, 12730, 273, 22718, 18, 6353, 12, 2649, 33, 67, 2668, 5358, 19899, 982, 33, 2938, 16, 2943, 33, 4521, 79, 18, 2565, 18683, 67, 6720, ...
cron_line="@reboot /usr/bin/python " + cron_tab_dir + "/canonicaltoonepercent_manyevents.py >> " + cron_log_dir + "/cron_log.canonicaltoonepercent_manyevents 2>&1" + os.linesep
cron_line="@reboot /usr/bin/python " + cron_tab_dir + "/canonicaltoonepercent_manyevents.py >> " + cron_log_dir + "/cron_log.canonicaltoonepercent_manyevents 2>&1" + os.linesep
def main(): checkArgs() #setup some variables for cron setup cron_setup = False log_dir = "" # -c means we have to setup the crontab with a new cron job if sys.argv[1] == '-c': cron_setup = True sys.argv = sys.argv[1:] checkArgs(cron_setup) log_dir = sys.argv[2] if not( os.path.isdir(log_dir) ): help_exit("given log_foldername is not a directory") #set up all the variables about directory information current_dir = os.getcwd() #ensures that the backslashes and forward slashes are proper for the OS target_dir = os.path.normpath(sys.argv[1]) #make sure svn is up to date and start up preparetest os.chdir(os.path.normpath(current_dir + "/../trunk")) os.system("svn up") os.chdir(current_dir) preparetest.main() if not( os.path.isdir(target_dir) ): help_exit("given foldername is not a directory") #change to target directory and clean up the target directory folder os.chdir(target_dir) files_to_remove = glob.glob("*") for f in files_to_remove: if os.path.isdir(f): shutil.rmtree(f) else: os.remove(f) os.chdir(current_dir) #the next few lines is necessary unless the file is manually copied over preparetest.copy_to_target("../trunk/www/node_state_transitions/*", target_dir) # set working dir to target os.chdir(target_dir) # call the process_mix function to process all mix files in the target directory preparetest.process_mix("repypp.py") #check to see if cron setup was requested, if yes run cron_setup if cron_setup: #create the absolute path for the log file and the file needed for the #cron job cron_tab_dir=os.path.normpath(current_dir + "/" + target_dir) cron_log_dir=os.path.normpath(current_dir + "/" + log_dir) cron_line="@reboot /usr/bin/python " + cron_tab_dir + "/donationtocanonical.py >> " + cron_log_dir + "/cron_log.donationtocanonical 2>&1" + os.linesep #setup the cron job setup_crontab.add_crontab(cron_line, "donationtocanonical") cron_line="@reboot /usr/bin/python " + cron_tab_dir + "/canonicaltoonepercent_manyevents.py >> " + cron_log_dir + "/cron_log.canonicaltoonepercent_manyevents 2>&1" + os.linesep #setup the cron job setup_crontab.add_crontab(cron_line, "canonicaltoonepercent_manyevents") cron_line="@reboot /usr/bin/python " + cron_tab_dir + "/onepercenttoonepercent_manyevents.py >> " + cron_log_dir + "/cron_log.onepercenttoonepercent_manyevents 2>&1" + os.linesep #setup the cron job setup_crontab.add_crontab(cron_line, "onepercenttoonepercent_manyevents")
97d71747ed0f089056dc6b21681a5dfcf33b3761 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/97d71747ed0f089056dc6b21681a5dfcf33b3761/deploy_state_transitions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 866, 2615, 1435, 225, 468, 8401, 2690, 3152, 364, 9998, 3875, 9998, 67, 8401, 273, 1083, 613, 67, 1214, 273, 1408, 225, 468, 300, 71, 4696, 732, 1240, 358, 3875, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 225, 866, 2615, 1435, 225, 468, 8401, 2690, 3152, 364, 9998, 3875, 9998, 67, 8401, 273, 1083, 613, 67, 1214, 273, 1408, 225, 468, 300, 71, 4696, 732, 1240, 358, 3875, 326, ...
spmap = pixelMap2subPixelMap(geomap)
if crackEdges: spmap = pixelMap2subPixelMap( geomap, 0.5, labelImageSize = (geomap.cellImage.size()-Size2D(3,3))/2) else: spmap = pixelMap2subPixelMap(geomap)
def pixelMap2subPixelMap(geomap, scale = 1.0, offset = Vector2(0, 0)): nodes, edges = pixelMapData(geomap, offset, scale) return Map(nodes, edges, geomap.cellImage.size() * scale)
8a4b243de44be7b611228d95d7601eef8d0040d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10394/8a4b243de44be7b611228d95d7601eef8d0040d7/pixelmap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4957, 863, 22, 1717, 9037, 863, 12, 10049, 438, 16, 3159, 273, 404, 18, 20, 16, 1384, 273, 5589, 22, 12, 20, 16, 374, 3719, 30, 2199, 16, 5231, 273, 4957, 863, 751, 12, 10049, 438, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4957, 863, 22, 1717, 9037, 863, 12, 10049, 438, 16, 3159, 273, 404, 18, 20, 16, 1384, 273, 5589, 22, 12, 20, 16, 374, 3719, 30, 2199, 16, 5231, 273, 4957, 863, 751, 12, 10049, 438, ...
if nodeName_ == 'node':
if nodeName_ == 'node':
def buildChildren(self, child_, nodeName_, from_subclass=False): if nodeName_ == 'node': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <node> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'node', obj_) self.content_.append(obj_) if hasattr(self, 'add_node'): self.add_node(obj_.value) elif hasattr(self, 'set_node'): self.set_node(obj_.value) elif nodeName_ == 'edge': type_name_ = child_.attrib.get('{http://www.w3.org/2001/XMLSchema-instance}type') if type_name_ is None: type_name_ = child_.attrib.get('type') if type_name_ is not None: type_names_ = type_name_.split(':') if len(type_names_) == 1: type_name_ = type_names_[0] else: type_name_ = type_names_[1] class_ = globals()[type_name_] obj_ = class_.factory() obj_.build(child_) else: raise NotImplementedError( 'Class not implemented for <edge> element') obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'edge', obj_) self.content_.append(obj_) if hasattr(self, 'add_edge'): self.add_edge(obj_.value) elif hasattr(self, 'set_edge'): self.set_edge(obj_.value) elif nodeName_ == 'set': obj_ = NodeAndRootEdgeAndEdgeSet.factory() obj_.build(child_) obj_ = self.mixedclass_(MixedContainer.CategoryComplex, MixedContainer.TypeNone, 'set', obj_) self.content_.append(obj_) if hasattr(self, 'add_set'): self.add_set(obj_.value) elif hasattr(self, 'set_set'): self.set_set(obj_.value) if not from_subclass and child_.tail is not None: obj_ = self.mixedclass_(MixedContainer.CategoryText, MixedContainer.TypeNone, '', child_.tail) self.content_.append(obj_) super(AbstractNetwork, self).buildChildren(child_, nodeName_, True)
9c12e50d449fa27d6f8f3415ece228ae97bb0266 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14016/9c12e50d449fa27d6f8f3415ece228ae97bb0266/_nexml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 9...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 4212, 12, 2890, 16, 1151, 67, 16, 7553, 67, 16, 628, 67, 10678, 33, 8381, 4672, 309, 7553, 67, 422, 296, 2159, 4278, 618, 67, 529, 67, 273, 1151, 27799, 14588, 18, 588, 2668, 9...
debuglogger = logging.getLogger("pywiki."+component)
if component: debuglogger = logging.getLogger("pywiki."+component) else: debuglogger = logging.getLogger("pywiki")
def init_handlers(strm=None): """Initialize logging system for terminal-based bots. This function must be called before using pywikibot.output(); and must be called again if the destination stream is changed. @param strm: Output stream. If None, re-uses the last stream if one was defined, otherwise uses sys.stderr """ # All user output is routed through the logging module. # Each type of output is handled by an appropriate handler object. # This structure is used to permit eventual development of other # user interfaces (GUIs) without modifying the core bot code. # The following output levels are defined: # DEBUG - only for file logging; debugging messages # STDOUT - output that must be sent to sys.stdout (for bots that may # have their output redirected to a file or other destination) # VERBOSE - optional progress information for display to user # INFO - normal (non-optional) progress information for display to user # INPUT - prompts requiring user response # WARN - user warning messages # ERROR - user error messages # CRITICAL - fatal error messages # Accordingly, do ''not'' use print statements in bot code; instead, # use pywikibot.output function. global _stream if strm: _stream = strm else: try: _stream except NameError: _stream = sys.stderr moduleName = calledModuleName() if not moduleName: moduleName = "terminal-interface" logging.addLevelName(VERBOSE, "VERBOSE") # for messages to be displayed on terminal at "verbose" setting # use INFO for messages to be displayed even on non-verbose setting logging.addLevelName(STDOUT, "STDOUT") # for messages to be displayed to stdout logging.addLevelName(INPUT, "INPUT") # for prompts requiring user response root_logger = logging.getLogger("pywiki") root_logger.setLevel(DEBUG+1) # all records except DEBUG go to logger root_logger.handlers = [] # remove any old handlers # configure default handler for VERBOSE and INFO levels default_handler = ui.OutputHandlerClass(strm=_stream) if config.verbose_output: default_handler.setLevel(VERBOSE) else: default_handler.setLevel(INFO) default_handler.addFilter(MaxLevelFilter(INPUT)) default_handler.setFormatter(LoggingFormatter(fmt="%(message)s")) root_logger.addHandler(default_handler) # if user has enabled file logging, configure file handler if moduleName in config.log or '*' in config.log: if config.logfilename: logfile = config.datafilepath(config.logfilename) else: logfile = config.datafilepath("%s-bot.log" % moduleName) file_handler = RotatingFileHandler( filename=logfile, maxBytes=2 << 20, backupCount=5) file_handler.setLevel(DEBUG) form = LoggingFormatter( fmt="%(asctime)s %(filename)18s, %(lineno)d: " "%(levelname)-8s %(message)s", datefmt="%Y-%m-%d %H:%M:%S" ) file_handler.setFormatter(form) root_logger.addHandler(file_handler) for component in config.debug_log: debuglogger = logging.getLogger("pywiki."+component) debuglogger.setLevel(DEBUG) debuglogger.addHandler(file_handler) # handler for level STDOUT output_handler = ui.OutputHandlerClass(strm=sys.stdout) output_handler.setLevel(STDOUT) output_handler.addFilter(MaxLevelFilter(STDOUT)) output_handler.setFormatter(LoggingFormatter(fmt="%(message)s")) root_logger.addHandler(output_handler) # handler for levels WARNING and higher warning_handler = ui.OutputHandlerClass(strm=_stream) warning_handler.setLevel(logging.WARNING) warning_handler.setFormatter( LoggingFormatter(fmt="%(levelname)s: %(message)s")) root_logger.addHandler(warning_handler)
3e3f53a2cc95c95c5803a48534ce2ecbdb57525c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9005/3e3f53a2cc95c95c5803a48534ce2ecbdb57525c/bot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 11046, 12, 701, 81, 33, 7036, 4672, 3536, 7520, 2907, 2619, 364, 8651, 17, 12261, 2512, 87, 18, 225, 1220, 445, 1297, 506, 2566, 1865, 1450, 2395, 11999, 495, 352, 18, 2844, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 67, 11046, 12, 701, 81, 33, 7036, 4672, 3536, 7520, 2907, 2619, 364, 8651, 17, 12261, 2512, 87, 18, 225, 1220, 445, 1297, 506, 2566, 1865, 1450, 2395, 11999, 495, 352, 18, 2844, ...
mapper = cls.sequence_mapper or cls.getDBI().sequence_mapper return mapper(cls.table, field)
mapper = cls.sequence_mapper or getattr(cls.getDBI(), 'sequence_mapper', None) if mapper: return mapper(cls.table, field)
def _sequence_for(cls, field): mapper = cls.sequence_mapper or cls.getDBI().sequence_mapper return mapper(cls.table, field)
ad235148da6e384a9d8904f2bc3a6ef7d22c9fe5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/ad235148da6e384a9d8904f2bc3a6ef7d22c9fe5/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6178, 67, 1884, 12, 6429, 16, 652, 4672, 5815, 273, 2028, 18, 6178, 67, 13919, 578, 3869, 12, 6429, 18, 588, 2290, 45, 9334, 296, 6178, 67, 13919, 2187, 599, 13, 309, 5815, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6178, 67, 1884, 12, 6429, 16, 652, 4672, 5815, 273, 2028, 18, 6178, 67, 13919, 578, 3869, 12, 6429, 18, 588, 2290, 45, 9334, 296, 6178, 67, 13919, 2187, 599, 13, 309, 5815, 30, ...
s = re.escape(s)
def caseInsensitivePattern(s): """ Creates a pattern that matches the string case-insensitively. """ s = re.escape(s) return ur'(?:%s)' % u''.join([u'[%s%s]' % (c.upper(), c.lower()) for c in s])
9e5aa0c150c4bff47a81eeb76a00691bbd5d559a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/9e5aa0c150c4bff47a81eeb76a00691bbd5d559a/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 648, 21931, 3234, 12, 87, 4672, 3536, 10210, 279, 1936, 716, 1885, 326, 533, 648, 17, 2679, 773, 305, 4492, 18, 3536, 327, 8896, 11, 3680, 5319, 87, 2506, 738, 582, 6309, 18, 5701, 381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 648, 21931, 3234, 12, 87, 4672, 3536, 10210, 279, 1936, 716, 1885, 326, 533, 648, 17, 2679, 773, 305, 4492, 18, 3536, 327, 8896, 11, 3680, 5319, 87, 2506, 738, 582, 6309, 18, 5701, 381...
if os.path.basename(self.path) == self.indexName: request.setResponseCode(http.MOVED_PERMANENTLY) request.setHeader("location","http://%s%s.idx" % ( request.getHeader("host"), (string.split(request.uri,'?')[0]))) return ' '
def render(self, request): "You know what you doing." try: mode, ino, dev, nlink, uid, gid, size, atime, mtime, ctime =\ os.stat(self.path) except OSError: # This part is quite hacky, but it gets the job done. What I'm # saying here is to redirect to .idx (the directory index) if this # is supposed to be an index.html but no index.html actually # exists. if os.path.basename(self.path) == self.indexName: request.setResponseCode(http.MOVED_PERMANENTLY) request.setHeader("location","http://%s%s.idx" % ( request.getHeader("host"), (string.split(request.uri,'?')[0]))) return ' ' return error.NoResource().render(request) if stat.S_ISDIR(mode): # tack a '/' on to the response -- this isn't exactly correct, but # works for the avg. case now. If you're looking for an index # which doesn't exist, tack on a "/.idx" instead, which will cause # the directory index to be loaded. if os.path.exists(os.path.join(self.path,self.indexName)): loc = '' else: loc = '.idx' request.setHeader("location","http://%s%s/%s" % ( request.getHeader("host"), (string.split(request.uri,'?')[0]), loc)) request.setResponseCode(http.MOVED_PERMANENTLY) return " " request.setHeader('accept-ranges','bytes') request.setHeader('last-modified', server.date_time_string(mtime)) if self.type: request.setHeader('content-type', self.type) if self.encoding: request.setHeader('content-encoding', self.encoding) # caching headers support modified_since = request.getHeader('if-modified-since') if modified_since is not None: # check if file has been modified and if not don't return the file modified_since = server.string_date_time(modified_since) if modified_since >= mtime: request.setResponseCode(http.NOT_MODIFIED) return '' f = open(self.path,'rb') try: range = request.getHeader('range') if range is not None: # This is a request for partial data... bytesrange = string.split(range, '=') assert bytesrange[0] == 'bytes',\ "Syntactically invalid http range header!" start, end = string.split(bytesrange[1],'-') if start: f.seek(int(start)) if end: end = int(end) size = end else: end = size request.setResponseCode(http.PARTIAL_CONTENT) request.setHeader('content-range',"bytes %s-%s/%s " % ( str(start), str(end), str(size))) else: request.setHeader('content-length',size) except: traceback.print_exc(file=log.logfile)
e419d4581d33aee4ae2286e8dac97739a0d0ac11 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/e419d4581d33aee4ae2286e8dac97739a0d0ac11/static.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 315, 6225, 5055, 4121, 1846, 9957, 1199, 775, 30, 1965, 16, 316, 83, 16, 4461, 16, 290, 1232, 16, 4555, 16, 11399, 16, 963, 16, 622, 494, 16, 13158, 16...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 12, 2890, 16, 590, 4672, 315, 6225, 5055, 4121, 1846, 9957, 1199, 775, 30, 1965, 16, 316, 83, 16, 4461, 16, 290, 1232, 16, 4555, 16, 11399, 16, 963, 16, 622, 494, 16, 13158, 16...
else: self._closer.socket_close()
def close(self): if self._closer is None: self._real_close() else: self._closer.socket_close()
5632861bff7fa6411b4628799710688d14756ec1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/5632861bff7fa6411b4628799710688d14756ec1/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 309, 365, 6315, 27736, 353, 599, 30, 365, 6315, 7688, 67, 4412, 1435, 469, 30, 365, 6315, 27736, 18, 7814, 67, 4412, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 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, 1746, 12, 2890, 4672, 309, 365, 6315, 27736, 353, 599, 30, 365, 6315, 7688, 67, 4412, 1435, 469, 30, 365, 6315, 27736, 18, 7814, 67, 4412, 1435, 2, -100, -100, -100, -100, -100, -100, ...
raise nodes.SkipNode visit_copyright = depart_copyright = lambda self,node: None
raise nodes.SkipNode def visit_copyright(self, node): raise nodes.SkipNode
def visit_contact(self, node): # TODO: map to {doctype}info/author/email # (if other needed parts of author are present) raise nodes.SkipNode
d2ea2631a31ca67e6d03da659353adf4e941a9bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/d2ea2631a31ca67e6d03da659353adf4e941a9bc/docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 8994, 12, 2890, 16, 756, 4672, 468, 2660, 30, 852, 358, 288, 2896, 12387, 97, 1376, 19, 4161, 19, 3652, 468, 261, 430, 1308, 3577, 2140, 434, 2869, 854, 3430, 13, 1002, 2199,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3757, 67, 8994, 12, 2890, 16, 756, 4672, 468, 2660, 30, 852, 358, 288, 2896, 12387, 97, 1376, 19, 4161, 19, 3652, 468, 261, 430, 1308, 3577, 2140, 434, 2869, 854, 3430, 13, 1002, 2199,...
revs = None if opts['rev']: revs = [other.lookup(rev) for rev in opts['rev']]
def incoming(ui, repo, source="default", **opts): """show new changesets found in source Show new changesets found in the specified path/URL or the default pull location. These are the changesets that would be pulled if a pull was requested. For remote repository, using --bundle avoids downloading the changesets twice if the incoming is followed by a pull. See pull for valid source format details. """ source = ui.expandpath(source) setremoteconfig(ui, opts) other = hg.repository(ui, source) incoming = repo.findincoming(other, force=opts["force"]) if not incoming: ui.status(_("no changes found\n")) return cleanup = None try: fname = opts["bundle"] if fname or not other.local(): # create a bundle (uncompressed if other repo is not local) cg = other.changegroup(incoming, "incoming") bundletype = other.local() and "HG10BZ" or "HG10UN" fname = cleanup = changegroup.writebundle(cg, fname, bundletype) # keep written bundle? if opts["bundle"]: cleanup = None if not other.local(): # use the created uncompressed bundlerepo other = bundlerepo.bundlerepository(ui, repo.root, fname) revs = None if opts['rev']: revs = [other.lookup(rev) for rev in opts['rev']] o = other.changelog.nodesbetween(incoming, revs)[0] if opts['newest_first']: o.reverse() displayer = cmdutil.show_changeset(ui, other, opts) for n in o: parents = [p for p in other.changelog.parents(n) if p != nullid] if opts['no_merges'] and len(parents) == 2: continue displayer.show(changenode=n) finally: if hasattr(other, 'close'): other.close() if cleanup: os.unlink(cleanup)
b16e76c35f2fc5af6d8aded567152efa862726ad /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/b16e76c35f2fc5af6d8aded567152efa862726ad/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 12, 4881, 16, 3538, 16, 1084, 1546, 1886, 3113, 2826, 4952, 4672, 3536, 4500, 394, 3478, 2413, 1392, 316, 1084, 225, 9674, 394, 3478, 2413, 1392, 316, 326, 1269, 589, 19, 1785, 578...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6935, 12, 4881, 16, 3538, 16, 1084, 1546, 1886, 3113, 2826, 4952, 4672, 3536, 4500, 394, 3478, 2413, 1392, 316, 1084, 225, 9674, 394, 3478, 2413, 1392, 316, 326, 1269, 589, 19, 1785, 578...
if self._chrome: try: self._chrome.kill() self._chrome.wait() self._chrome = None except AttributeError: pass
try: os.kill(self._chrome.pid, signal.SIGTERM) except AttributeError: if platform.version() == "Windows": import ctypes PROCESS_TERMINATE = 1 handle = ctypes.windll.kernel32.OpenProcess(PROCESS_TERMINATE, False, self._chrome.pid) ctypes.windll.kernel32.TerminateProcess(handle, -1) ctypes.windll.kernel32.CloseHandle(handle) self._chrome = None
def stop(self): if self._chrome: try: self._chrome.kill() self._chrome.wait() self._chrome = None except AttributeError: # POpen.kill is a python 2.6 API... pass
e474f441b10a13d9a67358685e0a01f8158c57a7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/215/e474f441b10a13d9a67358685e0a01f8158c57a7/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2132, 12, 2890, 4672, 309, 365, 6315, 343, 10896, 30, 775, 30, 365, 6315, 343, 10896, 18, 16418, 1435, 365, 6315, 343, 10896, 18, 7048, 1435, 365, 6315, 343, 10896, 273, 599, 1335, 6394,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2132, 12, 2890, 4672, 309, 365, 6315, 343, 10896, 30, 775, 30, 365, 6315, 343, 10896, 18, 16418, 1435, 365, 6315, 343, 10896, 18, 7048, 1435, 365, 6315, 343, 10896, 273, 599, 1335, 6394,...
minor, device, control = parseDeviceString(stdout)
if rc != 0: err = stderr.read(); out = stdout.read(); stdout.close(); stderr.close(); raise Exception, 'Failed to create device.\n stdout: %s\n stderr: %s\nCheck that target \"%s\" exists and that blktap2 driver installed in dom0.' % (out.rstrip(), err.rstrip(), file); minor, device, control = parseDeviceString(stdout.readline()) stdout.close(); stderr.close();
def createDevice(self, config):
c3619b4a778c71d1f9f46448f1a9738fbc22ec34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/c3619b4a778c71d1f9f46448f1a9738fbc22ec34/BlktapController.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3654, 12, 2890, 16, 642, 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,...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 3654, 12, 2890, 16, 642, 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,...
def connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs):
def connect_s3(self, aws_access_key_id=None, aws_secret_access_key=None, **kwargs):
def connect_s3(aws_access_key_id=None, aws_secret_access_key=None, **kwargs): if aws_access_key_id == None: aws_access_key_id = self.config.get("Credentials", "aws_access_key_id") if aws_secret_access_key == None: aws_secret_access_key = self.config.get("Credentials", "aws_secret_access_key") return boto.connect_s3(aws_access_key_id, aws_access_key_id, **kwargs)
ca6d8cd5334c879c346dc0576450e57a18f6fef1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10599/ca6d8cd5334c879c346dc0576450e57a18f6fef1/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 87, 23, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 2826, 4333, 4672, 309, 2287, 67, 3860, 67, 856, 67,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3077, 67, 87, 23, 12, 2890, 16, 2287, 67, 3860, 67, 856, 67, 350, 33, 7036, 16, 2287, 67, 5875, 67, 3860, 67, 856, 33, 7036, 16, 2826, 4333, 4672, 309, 2287, 67, 3860, 67, 856, 67,...
hsb = Tkinter.Scrollbar(self.scrollFrame, orient="horizontal") hsb.grid(row=1, column=0, sticky="ew") self._hscrollbar = hsb vsb = Tkinter.Scrollbar(self.scrollFrame, orient="vertical") vsb.grid(row=0, column=1, sticky="ns")
self.hsb = Tkinter.Scrollbar(self.scrollFrame, orient="horizontal") self.hsb.grid(row=1, column=0, sticky="ew") self._hscrollbar = self.hsb self.vsb = Tkinter.Scrollbar(self.scrollFrame, orient="vertical") self.vsb.grid(row=0, column=1, sticky="ns")
def __init__(self, master, width = 300, height = 300,
f870c1cad3a3b5e0bf7a944f567c872510c0ef3f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6236/f870c1cad3a3b5e0bf7a944f567c872510c0ef3f/GrayImageDispWdg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 1835, 273, 11631, 16, 2072, 273, 11631, 16, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4171, 16, 1835, 273, 11631, 16, 2072, 273, 11631, 16, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
def do_convert_real(self, func_args, successfull = True):
def do_convert_real(self, func_args, successful=True):
def do_convert_real(self, func_args, successfull = True): try: ret = convert(*func_args) except error, e: if successfull: self.fail("fails with parse error: %s" % e) else: return if successfull: return ret else: self.fail("don't fail with parse error")
48a902dba6c459970f408ead7b21337ee64389ca /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/48a902dba6c459970f408ead7b21337ee64389ca/test_converter_text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6283, 67, 7688, 12, 2890, 16, 1326, 67, 1968, 16, 6873, 33, 5510, 4672, 775, 30, 325, 273, 1765, 30857, 644, 67, 1968, 13, 1335, 555, 16, 425, 30, 309, 2216, 2854, 30, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 6283, 67, 7688, 12, 2890, 16, 1326, 67, 1968, 16, 6873, 33, 5510, 4672, 775, 30, 325, 273, 1765, 30857, 644, 67, 1968, 13, 1335, 555, 16, 425, 30, 309, 2216, 2854, 30, 365, ...
tools.convert_xml_import(cr, m, fp, idref, noupdate=True, **kwargs)
tools.convert_xml_import(cr, m, fp, idref, mode=mode, noupdate=True, **kwargs)
def load_module_graph(cr, graph, status=None, perform_checks=True, **kwargs): # **kwargs is passed directly to convert_xml_import if not status: status = {} status = status.copy() package_todo = [] statusi = 0 pool = pooler.get_pool(cr.dbname) # update the graph with values from the database (if exist) ## First, we set the default values for each package in graph additional_data = dict.fromkeys([p.name for p in graph], {'id': 0, 'state': 'uninstalled', 'dbdemo': False, 'installed_version': None}) ## Then we get the values from the database cr.execute('SELECT name, id, state, demo AS dbdemo, latest_version AS installed_version' ' FROM ir_module_module' ' WHERE name in (%s)' % (','.join(['%s'] * len(graph))), additional_data.keys() ) ## and we update the default values with values from the database additional_data.update(dict([(x.pop('name'), x) for x in cr.dictfetchall()])) for package in graph: for k, v in additional_data[package.name].items(): setattr(package, k, v) migrations = MigrationManager(cr, graph) check_rules = False modobj = None for package in graph: status['progress'] = (float(statusi)+0.1) / len(graph) m = package.name mid = package.id migrations.migrate_module(package, 'pre') register_class(m) logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading objects' % m) modules = pool.instanciate(m, cr) if modobj is None: modobj = pool.get('ir.module.module') if modobj and perform_checks: modobj.check(cr, 1, [mid]) idref = {} status['progress'] = (float(statusi)+0.4) / len(graph) if hasattr(package, 'init') or hasattr(package, 'update') or package.state in ('to install', 'to upgrade'): check_rules = True init_module_objects(cr, m, modules) for kind in ('init', 'update'): for filename in package.data.get('%s_xml' % kind, []): mode = 'update' if hasattr(package, 'init') or package.state == 'to install': mode = 'init' logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading %s' % (m, filename)) name, ext = os.path.splitext(filename) fp = tools.file_open(opj(m, filename)) if ext == '.csv': tools.convert_csv_import(cr, m, os.path.basename(filename), fp.read(), idref, mode=mode) elif ext == '.sql': queries = fp.read().split(';') for query in queries: new_query = ' '.join(query.split()) if new_query: cr.execute(new_query) else: tools.convert_xml_import(cr, m, fp, idref, mode=mode, **kwargs) fp.close() if hasattr(package, 'demo') or (package.dbdemo and package.state != 'installed'): status['progress'] = (float(statusi)+0.75) / len(graph) for xml in package.data.get('demo_xml', []): name, ext = os.path.splitext(xml) logger.notifyChannel('init', netsvc.LOG_INFO, 'module %s: loading %s' % (m, xml)) fp = tools.file_open(opj(m, xml)) if ext == '.csv': tools.convert_csv_import(cr, m, os.path.basename(xml), fp.read(), idref, noupdate=True) else: tools.convert_xml_import(cr, m, fp, idref, noupdate=True, **kwargs) fp.close() cr.execute('update ir_module_module set demo=%s where id=%s', (True, mid)) package_todo.append(package.name) ver = release.major_version + '.' + package.data.get('version', '1.0') # update the installed version in database... #cr.execute("update ir_module_module set state='installed', latest_version=%s where id=%s", (ver, mid,)) # Set new modules and dependencies modobj.write(cr, 1, [mid], {'state': 'installed', 'latest_version': ver}) cr.commit() # Update translations for all installed languages if modobj: modobj.update_translations(cr, 1, [mid], None) cr.commit() migrations.migrate_module(package, 'post') statusi += 1 if perform_checks and check_rules: cr.execute("""select model,name from ir_model where id not in (select model_id from ir_model_access)""") for (model, name) in cr.fetchall(): logger.notifyChannel('init', netsvc.LOG_WARNING, 'object %s (%s) has no access rules!' % (model, name)) cr.execute('select model from ir_model where state=%s', ('manual',)) for model in cr.dictfetchall(): pool.get('ir.model').instanciate(cr, 1, model['model'], {}) pool.get('ir.model.data')._process_end(cr, 1, package_todo) cr.commit()
2b1ecd58d65406803cdc279c6cfc52635b945107 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/2b1ecd58d65406803cdc279c6cfc52635b945107/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2978, 67, 4660, 12, 3353, 16, 2667, 16, 1267, 33, 7036, 16, 3073, 67, 12366, 33, 5510, 16, 2826, 4333, 4672, 468, 2826, 4333, 353, 2275, 5122, 358, 1765, 67, 2902, 67, 5666, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2978, 67, 4660, 12, 3353, 16, 2667, 16, 1267, 33, 7036, 16, 3073, 67, 12366, 33, 5510, 16, 2826, 4333, 4672, 468, 2826, 4333, 353, 2275, 5122, 358, 1765, 67, 2902, 67, 5666, ...
es.server.cmd('es_xgive %d item_defuser' % userid)
es.delayed(0, 'es_xgive %d item_defuser' % userid)
def player_spawn(event_var): userid = int(event_var['userid']) gungamePlayer = gungamelib.getPlayer(userid) if gungamelib.isSpectator(userid): return if gungamelib.isDead(userid): return # Reset AFK status if not es.isbot(userid): gamethread.delayed(0.6, gungamePlayer.resetPlayerLocation, ()) # Check to see if the WarmUp Round is Active if not gungamelib.getGlobal('isWarmup'): # Since the WarmUp Round is not Active, give the player the weapon relevant to their level gungamePlayer.giveWeapon() levelInfoHint(userid) if gungamelib.getVariableValue('gg_map_obj') > 1: # Check to see if this player is a CT if int(event_var['es_userteam']) == 3: # Are we in a de_ map and want to give defuser? if gungamelib.getGlobal('gungame_currentmap_prefix') == 'de' and gungamelib.getVariableValue('gg_player_defuser') > 0: # Get player object playerlibPlayer = playerlib.getPlayer(userid) # Make sure the player doesn't already have a defuser if not playerlibPlayer.get('defuser'): es.server.cmd('es_xgive %d item_defuser' % userid)
9b470b7202a121a30dd97ab7be2c671ba0254bb7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4575/9b470b7202a121a30dd97ab7be2c671ba0254bb7/gungame.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7291, 67, 1752, 9533, 12, 2575, 67, 1401, 4672, 6709, 273, 509, 12, 2575, 67, 1401, 3292, 8339, 19486, 31475, 13957, 12148, 273, 314, 20651, 9925, 495, 18, 588, 12148, 12, 8339, 13, 225,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7291, 67, 1752, 9533, 12, 2575, 67, 1401, 4672, 6709, 273, 509, 12, 2575, 67, 1401, 3292, 8339, 19486, 31475, 13957, 12148, 273, 314, 20651, 9925, 495, 18, 588, 12148, 12, 8339, 13, 225,...
shape_exp,
setup.shape_exponent,
def __init__(self): from pyrticle.units import SI units = SI() self.units = SI()
3e4fbee45aed0d13e798595c2b362af459254399 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12869/3e4fbee45aed0d13e798595c2b362af459254399/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 628, 2395, 3797, 3711, 18, 7705, 1930, 5705, 4971, 273, 5705, 1435, 365, 18, 7705, 273, 5705, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 628, 2395, 3797, 3711, 18, 7705, 1930, 5705, 4971, 273, 5705, 1435, 365, 18, 7705, 273, 5705, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
self.vboxlayout7 = QtGui.QVBoxLayout(self.parms_grpbox) self.vboxlayout7.setMargin(4) self.vboxlayout7.setSpacing(1) self.vboxlayout7.setObjectName("vboxlayout7") self.hboxlayout4 = QtGui.QHBoxLayout() self.hboxlayout4.setMargin(0) self.hboxlayout4.setSpacing(6) self.hboxlayout4.setObjectName("hboxlayout4")
self.vboxlayout5 = QtGui.QVBoxLayout(self.parms_grpbox) self.vboxlayout5.setMargin(4) self.vboxlayout5.setSpacing(1) self.vboxlayout5.setObjectName("vboxlayout5") self.hboxlayout5 = QtGui.QHBoxLayout() self.hboxlayout5.setMargin(0) self.hboxlayout5.setSpacing(6) self.hboxlayout5.setObjectName("hboxlayout5")
def setupUi(self, MinimizeEnergyPropDialog): MinimizeEnergyPropDialog.setObjectName("MinimizeEnergyPropDialog") MinimizeEnergyPropDialog.resize(QtCore.QSize(QtCore.QRect(0,0,400,842).size()).expandedTo(MinimizeEnergyPropDialog.minimumSizeHint()))
4cf7d69a606c10cf896a0045c5df06ba517408f0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4cf7d69a606c10cf896a0045c5df06ba517408f0/MinimizeEnergyPropDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 13943, 12, 2890, 16, 5444, 10153, 664, 31920, 4658, 6353, 4672, 5444, 10153, 664, 31920, 4658, 6353, 18, 542, 16707, 2932, 2930, 10153, 664, 31920, 4658, 6353, 7923, 5444, 10153, 664, ...
if (os.path.exists(os.path.join(root_dir, ".git")) or os.path.exists(os.path.join(root_dir, ".hg"))): prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:]
if (os.path.exists(os.path.join(root_dir, ".git")) or os.path.exists(os.path.join(root_dir, ".hg"))): prefix = os.path.commonprefix([root_dir, project_dir]) return fullname[len(prefix) + 1:]
def RepositoryName(self): """FullName after removing the local path to the repository.
6398fa6347e060183166e271d96f790f94d16767 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10279/6398fa6347e060183166e271d96f790f94d16767/cpplint.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6281, 461, 12, 2890, 4672, 3536, 19223, 1839, 9427, 326, 1191, 589, 358, 326, 3352, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6281, 461, 12, 2890, 4672, 3536, 19223, 1839, 9427, 326, 1191, 589, 358, 326, 3352, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
bugs = bugzilla_cache.get_value(key=str(query), expiretime=900,
key = '%s_%s_%s' % (collection, version, package) now = datetime.now() bugs = bugzilla_cache.get_value(key=key, expiretime=900,
def query_bugs(self, start_row=None, rows_per_page=10, order=-1, sort_col='number', filters=None, **params): if not filters: filters = {} filters = self._query_bugs_filter.filter(filters, conn=self) collection = filters.get('collection', 'Fedora') version = filters.get('version', '')
ff2940bcee4a265a2c8f527b8a7a841c057ca527 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12732/ff2940bcee4a265a2c8f527b8a7a841c057ca527/bugzillaconnector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 19381, 12, 2890, 16, 787, 67, 492, 33, 7036, 16, 2595, 67, 457, 67, 2433, 33, 2163, 16, 1353, 29711, 21, 16, 1524, 67, 1293, 2218, 2696, 2187, 3415, 33, 7036, 16, 2826, 2010...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 843, 67, 19381, 12, 2890, 16, 787, 67, 492, 33, 7036, 16, 2595, 67, 457, 67, 2433, 33, 2163, 16, 1353, 29711, 21, 16, 1524, 67, 1293, 2218, 2696, 2187, 3415, 33, 7036, 16, 2826, 2010...
print "clicked non-link in %r" % self
print "clicked non-link in %r for %r, text starts %r" % (self, self.__widget, (self.__text or "")[:27])
def clicked(self, link): # this runs when user clicks on a hyperlink in the help text, with 'link' being the link text (href attribute) link = str(link) # QString to string (don't know if this is needed, guess yes) # note: link is not a real URL, but either false or "Feature:<featurename>" # (whether or not wiki_help_url() still hardcodes "Feature:" or some other prefix). if link: if debug_whatsthis_links: print "clicked hyperlink in %r, href text is %r" % (self,link) # change link text to URL, and open browser to help page (see wiki_help.py) if link.startswith("Feature:"): from wiki_help import wiki_help_url, open_wiki_help_URL featurename = link[len("Feature:"):] # not exactly the featurename, since we already turned ' ' into '_', but close enough (doing it twice won't hurt) url = wiki_help_url( featurename) # presently this just redundantly turns ' ' into '_' and re-prepends "Feature:" worked = open_wiki_help_URL(url, whosdoingthis = "What's This link") ## close_dialog = worked # let it stay open if it fails (not sure why since it'll go away soon anyway) close_dialog = True # close it even on failure so user knows something happened and looks at history else: print "bug: invalid What's This pseudo-url %r" % link # even if not debug_whatsthis_links ## close_dialog = False close_dialog = True else: # happens for clicking any empty part or other text in that popup dialog if debug_whatsthis_links: print "clicked non-link in %r" % self close_dialog = True return close_dialog ## return True to make help text widget go away, or False to keep it around (with no change in contents)
332ca0f030cec7eaf4ccc60b91df95e83a712776 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/332ca0f030cec7eaf4ccc60b91df95e83a712776/whatsthis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17688, 12, 2890, 16, 1692, 4672, 468, 333, 7597, 1347, 729, 27659, 603, 279, 9512, 1232, 316, 326, 2809, 977, 16, 598, 296, 1232, 11, 3832, 326, 1692, 977, 261, 7547, 1566, 13, 1692, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17688, 12, 2890, 16, 1692, 4672, 468, 333, 7597, 1347, 729, 27659, 603, 279, 9512, 1232, 316, 326, 2809, 977, 16, 598, 296, 1232, 11, 3832, 326, 1692, 977, 261, 7547, 1566, 13, 1692, 2...
if not strm:
if strm is None:
def __init__(self, strm=None): """ Initialize the handler.
c49bb67e7a3212109f74a1d8b159b6445a4edb4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/c49bb67e7a3212109f74a1d8b159b6445a4edb4c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 609, 81, 33, 7036, 4672, 3536, 9190, 326, 1838, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 609, 81, 33, 7036, 4672, 3536, 9190, 326, 1838, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Return the matching part of the encoded Metar report. regexp: the regexp needed to extract this part. Return the first matching string or None. WARNING: Some Metar reports may contain several matching
Return the matching part of the encoded Metar report. regexp: the regexp needed to extract this part. Return the first matching string or None. WARNING: Some Metar reports may contain several matching
def match_WeatherPart(self, regexp) : """ Return the matching part of the encoded Metar report. regexp: the regexp needed to extract this part. Return the first matching string or None. WARNING: Some Metar reports may contain several matching strings, only the first one is taken into account! """ matches=[] if self.Report.code is not None : rg = re.compile(regexp) for wpart in self.Report.getRawMetarCode().split() : match = rg.match(wpart) if match: matches.append(match.string[match.start(0) : match.end(0)]) return matches
432e464601ad8d6fd1d2454b664a04836415266c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4602/432e464601ad8d6fd1d2454b664a04836415266c/pymetar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 3218, 4806, 1988, 12, 2890, 16, 7195, 13, 294, 3536, 2000, 326, 3607, 1087, 434, 326, 3749, 21604, 297, 2605, 18, 7195, 30, 326, 7195, 3577, 358, 2608, 333, 1087, 18, 2000, 32...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 845, 67, 3218, 4806, 1988, 12, 2890, 16, 7195, 13, 294, 3536, 2000, 326, 3607, 1087, 434, 326, 3749, 21604, 297, 2605, 18, 7195, 30, 326, 7195, 3577, 358, 2608, 333, 1087, 18, 2000, 32...
if not val: print "val is null; key is '%s'" % key
assert val is not None
def writexml(self, stream, indent='', addindent='', newl='', strip=0, nsprefixes={}, namespace=''): # write beginning ALLOWSINGLETON = ('img', 'br', 'hr', 'base', 'meta', 'link', 'param', 'area', 'input', 'col', 'basefont', 'isindex', 'frame') BLOCKELEMENTS = ('html', 'head', 'body', 'noscript', 'ins', 'del', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'script', 'ul', 'ol', 'dl', 'pre', 'hr', 'blockquote', 'address', 'p', 'div', 'fieldset', 'table', 'tr', 'form', 'object', 'fieldset', 'applet', 'map') FORMATNICELY = ('tr', 'ul', 'ol', 'head')
c3400948e4b84a189bcada598574ea9ac8a80d33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/c3400948e4b84a189bcada598574ea9ac8a80d33/microdom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 338, 781, 12, 2890, 16, 1407, 16, 3504, 2218, 2187, 527, 9355, 2218, 2187, 394, 80, 2218, 2187, 2569, 33, 20, 16, 3153, 17777, 28793, 1981, 2218, 11, 4672, 468, 1045, 8435, 7981, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2518, 338, 781, 12, 2890, 16, 1407, 16, 3504, 2218, 2187, 527, 9355, 2218, 2187, 394, 80, 2218, 2187, 2569, 33, 20, 16, 3153, 17777, 28793, 1981, 2218, 11, 4672, 468, 1045, 8435, 7981, ...
patch = Patch(name, self.__patch_dir)
patch = Patch(name, self.__patch_dir, self.__refs_dir)
def delete_patch(self, name): """Deletes a patch """ patch = Patch(name, self.__patch_dir)
844a164019385f19d8607754b3ae130eee1dfd89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/844a164019385f19d8607754b3ae130eee1dfd89/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 67, 2272, 12, 2890, 16, 508, 4672, 3536, 7551, 279, 4729, 3536, 4729, 273, 12042, 12, 529, 16, 365, 16186, 2272, 67, 1214, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 1430, 67, 2272, 12, 2890, 16, 508, 4672, 3536, 7551, 279, 4729, 3536, 4729, 273, 12042, 12, 529, 16, 365, 16186, 2272, 67, 1214, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
response = self.client.get('/accounts/logout/') self.assertRedirects(response, prefix + '/',
response = self.client.get('/accounts/logout/?next=%s' % (prefix+'/checkout/')) self.assertRedirects(response, prefix + '/checkout/',
def test_logout(self): """The logout view should remove the user and contact id from the session. """ user = User.objects.create_user('teddy', 'sometester@example.com', 'guz90tyc') self.client.login(username='teddy', password='guz90tyc') response = self.client.get('/accounts/') # test logged in status self.assertContains(response, "the user you've logged in as doesn't have any contact information.", status_code=200) self.test_cart_adding() self.client.post(prefix + '/checkout/', get_step1_post_data(self.US)) self.assert_(self.client.session.get(CUSTOMER_ID) is not None) response = self.client.get('/accounts/logout/') self.assertRedirects(response, prefix + '/', status_code=302, target_status_code=200) self.assert_(self.client.session.get(CUSTOMER_ID) is None) response = self.client.get('/accounts/') # test logged in status self.assertRedirects(response, '/accounts/login/?next=/accounts/', status_code=302, target_status_code=200)
9341444ef4e559d5a8276253b4a0d6074b1b009e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/171/9341444ef4e559d5a8276253b4a0d6074b1b009e/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 21229, 12, 2890, 4672, 3536, 1986, 12735, 1476, 1410, 1206, 326, 729, 471, 5388, 612, 628, 326, 1339, 18, 3536, 729, 273, 2177, 18, 6911, 18, 2640, 67, 1355, 2668, 2344, 15680,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21229, 12, 2890, 4672, 3536, 1986, 12735, 1476, 1410, 1206, 326, 729, 471, 5388, 612, 628, 326, 1339, 18, 3536, 729, 273, 2177, 18, 6911, 18, 2640, 67, 1355, 2668, 2344, 15680,...
self.bbl = self.cube1.getBadBandList(self.cube2) self.lines = self.cube1.lines self.bands = self.cube1.bands self.samples = self.cube1.samples self.dtype = numpy.find_common_type([self.cube1.data_type, self.cube2.data_type], [])
def __init__(self,c1,c2): if c1.bands!=c2.bands or c1.lines!=c2.lines or c1.samples!=c2.samples: raise ValueError("Cubes don't have same dimensions") self.cube1=c1 self.cube2=c2 self.histogram=None self.hashPrintCount=100000 # Parameters common to both cubes self.bbl = self.cube1.getBadBandList(self.cube2) self.lines = self.cube1.lines self.bands = self.cube1.bands self.samples = self.cube1.samples # The data type that can hold both types without losing precision self.dtype = numpy.find_common_type([self.cube1.data_type, self.cube2.data_type], [])
9cc281a7c8026f3be4d9fe9fd8900a244ecb43ea /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11522/9cc281a7c8026f3be4d9fe9fd8900a244ecb43ea/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 71, 21, 16, 71, 22, 4672, 309, 276, 21, 18, 29714, 5, 33, 71, 22, 18, 29714, 578, 276, 21, 18, 3548, 5, 33, 71, 22, 18, 3548, 578, 276, 21, 18, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 71, 21, 16, 71, 22, 4672, 309, 276, 21, 18, 29714, 5, 33, 71, 22, 18, 29714, 578, 276, 21, 18, 3548, 5, 33, 71, 22, 18, 3548, 578, 276, 21, 18, 7...
title = pids[pid] if 'bsd' in sys.platform: procname = os.path.basename(sys.executable) title = ' '.join([t for t in title.split(' ') if procname not in t])
title = self._clean_up_title(pids[pid])
def test_setproctitle(self): """setproctitle() can set the process title, duh.""" rv = self.run_script(r""" import setproctitle setproctitle.setproctitle('Hello, world!')
314b19159c7a6ba3ba3ddfd81959defba1d5a163 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11588/314b19159c7a6ba3ba3ddfd81959defba1d5a163/setproctitle_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 542, 685, 299, 1280, 12, 2890, 4672, 3536, 542, 685, 299, 1280, 1435, 848, 444, 326, 1207, 2077, 16, 9978, 76, 12123, 5633, 273, 365, 18, 2681, 67, 4263, 12, 86, 8395, 1930, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 542, 685, 299, 1280, 12, 2890, 4672, 3536, 542, 685, 299, 1280, 1435, 848, 444, 326, 1207, 2077, 16, 9978, 76, 12123, 5633, 273, 365, 18, 2681, 67, 4263, 12, 86, 8395, 1930, ...
"would cause its has value to change." % other)
"would cause its hash value to change." % other)
def merge_and_overwrite(self, other, ignore_hash_conflict=False): """ Combine C{self} and C{other} into a X{merged object}, such that any changes made to one will affect the other. Any attributes that C{other} had before merging will be discarded. This is accomplished by copying C{self.__dict__} over C{other.__dict__} and C{self.__class__} over C{other.__class__}.
23a8e90fe2f49e3d572e52a6c57e90e94713adce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3512/23a8e90fe2f49e3d572e52a6c57e90e94713adce/apidoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 464, 67, 19274, 12, 2890, 16, 1308, 16, 2305, 67, 2816, 67, 20340, 33, 8381, 4672, 3536, 23949, 385, 95, 2890, 97, 471, 385, 95, 3011, 97, 1368, 279, 1139, 95, 15459, 733, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 67, 464, 67, 19274, 12, 2890, 16, 1308, 16, 2305, 67, 2816, 67, 20340, 33, 8381, 4672, 3536, 23949, 385, 95, 2890, 97, 471, 385, 95, 3011, 97, 1368, 279, 1139, 95, 15459, 733, ...
id=thread.get_ident()
id=get_id()
def abort(self):
1128202c6b4dfd09b57108947d145ce11d93bcd3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/1128202c6b4dfd09b57108947d145ce11d93bcd3/Transaction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6263, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6263, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
'BuildRoot: %{_tmppath}/%{name}-buildroot',
'BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot',
def _make_spec_file(self): """Generate the text of an RPM spec file and return it as a list of strings (one per line). """ # definitions and headers spec_file = [ '%define name ' + self.distribution.get_name(), '%define version ' + self.distribution.get_version(), '%define release ' + self.release, '', 'Summary: ' + self.distribution.get_description(), ]
cadc4c7155b7259e616a80dac1c91d8333b3b4cb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cadc4c7155b7259e616a80dac1c91d8333b3b4cb/bdist_rpm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6540, 67, 2793, 67, 768, 12, 2890, 4672, 3536, 4625, 326, 977, 434, 392, 534, 12728, 857, 585, 471, 327, 518, 487, 279, 666, 434, 2064, 261, 476, 1534, 980, 2934, 3536, 468, 6377,...
self.o = self.win.glpane
self.o = self.win.glpane self.currentWorkingDirectory = env.prefs[workingDirectory_prefs_key]
def __init__( self, parentCommand ): """ Constructor for the property manager. """
9d41b2cd870d307725ed114f7386d64196b1cd1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/9d41b2cd870d307725ed114f7386d64196b1cd1c/ColorScheme_PropertyManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 982, 2189, 262, 30, 3536, 11417, 364, 326, 1272, 3301, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 972, 12, 365, 16, 982, 2189, 262, 30, 3536, 11417, 364, 326, 1272, 3301, 18, 3536, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
return [Graph(g) for g in os.popen("nauty-geng %s"%(options) ).read().split()]
return [graph.Graph(g) for g in os.popen("nauty-geng %s"%(options) ).read().split()]
def nauty_geng(self, options=""): r""" Calls the geng program in the optional nauty spkg to generate graphs. The options argument is passed straight to nauty. INPUT: options -- a string passed to the command line of geng. You *must* pass the number of vertices you desire. EXAMPLES: sage: graph_list = graphs.nauty_geng("-q 3") # requires the optional nauty package sage: len(graph_list) # requires the optional nauty package 4 """ from sage.misc.package import is_package_installed if not is_package_installed("nauty"): raise TypeError, "the optional nauty package is not installed" return [Graph(g) for g in os.popen("nauty-geng %s"%(options) ).read().split()]
d57eb2ac8763003f7c50d711196d5fcfcb11f19b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/d57eb2ac8763003f7c50d711196d5fcfcb11f19b/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 5854, 93, 67, 4507, 75, 12, 2890, 16, 702, 1546, 6, 4672, 436, 8395, 23665, 326, 3157, 75, 5402, 316, 326, 3129, 290, 5854, 93, 1694, 14931, 358, 2103, 19422, 18, 225, 1021, 702, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 290, 5854, 93, 67, 4507, 75, 12, 2890, 16, 702, 1546, 6, 4672, 436, 8395, 23665, 326, 3157, 75, 5402, 316, 326, 3129, 290, 5854, 93, 1694, 14931, 358, 2103, 19422, 18, 225, 1021, 702, ...