rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
def train(h, path, is_spam, force, trainnew):
def train(h, path, is_spam, force, trainnew, removetrained):
def train(h, path, is_spam, force, trainnew): if not os.path.exists(path): raise ValueError("Nonexistent path: %s" % path) elif os.path.isfile(path): mbox_train(h, path, is_spam, force) elif os.path.isdir(os.path.join(path, "cur")): maildir_train(h, os.path.join(path, "cur"), is_spam, force) if trainnew: maildir_train(h, os.path.join(path, "new"), is_spam, force) elif os.path.isdir(path): mhdir_train(h, path, is_spam, force) else: raise ValueError("Unable to determine mailbox type: " + path)
0927af8f2c4fb18ef58c0b4fef71b468f866dfb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/0927af8f2c4fb18ef58c0b4fef71b468f866dfb6/mboxtrain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4691, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 16, 4691, 2704, 16, 2797, 30710, 1920, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 1002, 2068, 2932, 3989, 19041, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4691, 12, 76, 16, 589, 16, 353, 67, 1752, 301, 16, 2944, 16, 4691, 2704, 16, 2797, 30710, 1920, 4672, 309, 486, 1140, 18, 803, 18, 1808, 12, 803, 4672, 1002, 2068, 2932, 3989, 19041, ...
return self.__get_field('top')
return self._get_field('top')
def get_top(self): return self.__get_field('top')
8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/8fe7e9f08ae6fe49cec66a8034e8495cbf77c6f3/stack.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3669, 12, 2890, 4672, 327, 365, 16186, 588, 67, 1518, 2668, 3669, 6134, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3669, 12, 2890, 4672, 327, 365, 16186, 588, 67, 1518, 2668, 3669, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
clevel = level
def get_outline(source): last_start = 0 last_line = 1 cpath = (None,) cname = None clevel = None for match in matcher.finditer(source): last_line = last_line + source.count('\n', last_start, match.start()) last_start = match.start() level, name = match.group('level', 'name') level = len(level) if clevel is None or level < clevel: cpath = cpath[:-1] elif level > clevel: cpath += (cname,) yield cpath, name, last_line clevel = level cname = name
0638edeac7762d759a398fa42eca3f90189a0e56 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/0638edeac7762d759a398fa42eca3f90189a0e56/outline.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 25134, 12, 3168, 4672, 1142, 67, 1937, 273, 374, 1142, 67, 1369, 273, 404, 276, 803, 273, 261, 7036, 16, 13, 18290, 273, 599, 1619, 941, 273, 599, 364, 845, 316, 4546, 18, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 25134, 12, 3168, 4672, 1142, 67, 1937, 273, 374, 1142, 67, 1369, 273, 404, 276, 803, 273, 261, 7036, 16, 13, 18290, 273, 599, 1619, 941, 273, 599, 364, 845, 316, 4546, 18, 4...
confgr.add_data_dir('docs')
confgr.add_data_dir('doc')
def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs nxheader = join(get_numpy_include_dirs()[0],'numpy',) confgr = Configuration('timeseries',parent_package,top_path) sources = join('src', 'cseries.c') confgr.add_extension('cseries', sources=[sources,], include_dirs=[nxheader], ) confgr.add_data_dir('docs') confgr.add_subpackage('addons') confgr.add_subpackage('io') confgr.add_subpackage('plotlib') confgr.add_subpackage('tests') return confgr
acdf6865dd391581b3ad14053e04bf8c3324f1fc /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/acdf6865dd391581b3ad14053e04bf8c3324f1fc/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 16, 336, 67, 15974, 67, 6702, 67, 8291, 9264, 3374, 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, 1664, 12, 2938, 67, 5610, 2218, 2187, 3669, 67, 803, 33, 7036, 4672, 628, 3972, 18, 4413, 5471, 18, 23667, 67, 1367, 1930, 4659, 16, 336, 67, 15974, 67, 6702, 67, 8291, 9264, 3374, 273...
for ref in search.find_shortlinks(commit.message):
for ref in search.find_shortlinks(cobj.message):
def refresh_commit(routing_key, data): h.set_context(data['project_id'], data['mount_point']) repo = pylons.c.app.repo hash = data['hash'] log.info('Refresh commit %s', hash) c_from, c_to = hash.split('..') for commit in repo.repository.iter_commits(rev=hash): cobj = GM.GitCommit(commit.sha) aref = cobj.dump_ref() for ref in search.find_shortlinks(commit.message): M.ArtifactReference(ref.artifact_reference).to_artifact().backreferences['git_%s' % hash] = aref
28fee34b31e8a4650c813371d954523a5b3909de /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/28fee34b31e8a4650c813371d954523a5b3909de/reactors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 7371, 12, 16529, 67, 856, 16, 501, 4672, 366, 18, 542, 67, 2472, 12, 892, 3292, 4406, 67, 350, 17337, 501, 3292, 4778, 67, 1153, 19486, 3538, 273, 2395, 80, 7008, 18, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 7371, 12, 16529, 67, 856, 16, 501, 4672, 366, 18, 542, 67, 2472, 12, 892, 3292, 4406, 67, 350, 17337, 501, 3292, 4778, 67, 1153, 19486, 3538, 273, 2395, 80, 7008, 18, 71, 1...
dictkey = WBobj.webservice + "." + visobj.name
portname = visobj.name dictkey = WBobj.webservice + "." + portname
def unwrapRequestobj(self,libobj,visobj):
e9368545125e52555ba7689c2af0897fc82a6772 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6341/e9368545125e52555ba7689c2af0897fc82a6772/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11014, 691, 2603, 12, 2890, 16, 2941, 2603, 16, 3516, 2603, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11014, 691, 2603, 12, 2890, 16, 2941, 2603, 16, 3516, 2603, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
pattern = join(self.packageResourceFolder, pat)
pattern = join(self.resourceFolder, pat)
def _addResources(self): "Add Welcome/ReadMe/License files, .lproj folders and scripts."
18f917dac1d0c4373b8f3ea1de666a7605f47d91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/18f917dac1d0c4373b8f3ea1de666a7605f47d91/buildpkg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 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, 389, 1289, 3805, 12, 2890, 4672, 315, 986, 678, 16312, 19, 1994, 4667, 19, 13211, 1390, 16, 263, 80, 17995, 9907, 471, 8873, 1199, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100...
fileDeps = lsl = True
fileDeps = lsl = tags = True
def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None, showAllTroves = False, weakRefs = False, showTroveFlags = False, alwaysDisplayHeaders = False, # job options showChanges = False, asJob = False): if all: deps = tags = recurse = showTroveFlags = showAllTroves = True if ls: fileDeps = lsl = True if showChanges: lsl = True client = conaryclient.ConaryClient(cfg) repos = client.getRepos() if not asJob and not showChanges and cs.isAbsolute(): changeSetSource = trovesource.ChangesetFilesTroveSource(None) changeSetSource.addChangeSet(cs) if not troveSpecs: troveTups = cs.getPrimaryTroveList() primary = True if not troveTups: log.warning('No primary troves in changeset, listing all troves') troveTups = [(x.getName(), x.getNewVersion(), x.getNewFlavor())\ for x in cs.iterNewTroveList()] else: troveTups, primary = query.getTrovesToDisplay(changeSetSource, troveSpecs) querySource = trovesource.stack(changeSetSource, client.getRepos()) dcfg = display.DisplayConfig(querySource, client.db) dcfg.setTroveDisplay(deps=deps, info=info, fullFlavors=cfg.fullFlavors, showLabels=cfg.showLabels, baseFlavors=cfg.flavor) dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags, fileDeps=fileDeps, fileVersions=fileVersions) recurseOne = showTroves or showAllTroves or weakRefs if recurse is None and not recurseOne: # if we didn't explicitly set recurse and we're not recursing one # level explicitly recurse = True in (ls, lsl, ids, sha1s, tags, deps, fileDeps, fileVersions) dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne, showNotByDefault = showAllTroves, showWeakRefs = weakRefs, showTroveFlags = showTroveFlags, displayHeaders = alwaysDisplayHeaders or showTroveFlags) if primary: dcfg.setPrimaryTroves(set(troveTups)) formatter = display.TroveFormatter(dcfg) display.displayTroves(dcfg, formatter, troveTups) else: changeSetSource = trovesource.ChangeSetJobSource(repos, trovesource.stack(db, repos)) changeSetSource.addChangeSet(cs) jobs = getJobsToDisplay(changeSetSource, troveSpecs) dcfg = display.JobDisplayConfig(changeSetSource, client.db) dcfg.setJobDisplay(showChanges=showChanges, compressJobs=not cfg.showComponents) dcfg.setTroveDisplay(deps=deps, info=info, fullFlavors=cfg.fullFlavors, showLabels=cfg.showLabels, baseFlavors=cfg.flavor) dcfg.setFileDisplay(ls=ls, lsl=lsl, ids=ids, sha1s=sha1s, tags=tags, fileDeps=fileDeps, fileVersions=fileVersions) recurseOne = showTroves or showAllTroves or weakRefs if recurse is None and not recurseOne: # if we didn't explicitly set recurse and we're not recursing one # level explicitly and we specified troves (so everything won't # show up at the top level anyway), guess at whether to recurse recurse = True in (ls, lsl, ids, sha1s, tags, deps, fileDeps, fileVersions) dcfg.setChildDisplay(recurseAll = recurse, recurseOne = recurseOne, showNotByDefault = showAllTroves, showWeakRefs = weakRefs, showTroveFlags = showTroveFlags) formatter = display.JobFormatter(dcfg) display.displayJobs(dcfg, formatter, jobs)
0bc435f0ac3ac18fa0c6982931c2e3c4b857b049 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8747/0bc435f0ac3ac18fa0c6982931c2e3c4b857b049/showchangeset.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 21565, 12, 1966, 16, 2873, 16, 23432, 537, 15999, 16, 2776, 16, 468, 23432, 537, 702, 1123, 273, 1083, 16, 3097, 8267, 87, 273, 1083, 16, 8740, 273, 1083, 16, 2405, 3116, 6113, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2562, 21565, 12, 1966, 16, 2873, 16, 23432, 537, 15999, 16, 2776, 16, 468, 23432, 537, 702, 1123, 273, 1083, 16, 3097, 8267, 87, 273, 1083, 16, 8740, 273, 1083, 16, 2405, 3116, 6113, 8...
system('echo %d > /proc/sys/vm/nr_hugepages' % \ pages_requested)
autotest_utils.write_one_line('/proc/sys/vm/nr_hugepages', str(pages_requested))
def execute(self, dir = None, pages_requested = 20): check_kernel_ver("2.6.16")
885957f8484bf2881b2ea0bdc55b022f29cd0bfe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12268/885957f8484bf2881b2ea0bdc55b022f29cd0bfe/libhugetlbfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1577, 273, 599, 16, 4689, 67, 19065, 273, 4200, 4672, 866, 67, 8111, 67, 502, 2932, 22, 18, 26, 18, 2313, 7923, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 1577, 273, 599, 16, 4689, 67, 19065, 273, 4200, 4672, 866, 67, 8111, 67, 502, 2932, 22, 18, 26, 18, 2313, 7923, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
coldef = '153, 255, 255'
coldef = create_col(coldict['analong'])
coldef = '153, 255, 255'
220a011764b979db0735a926a9c357f113032bd5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/220a011764b979db0735a926a9c357f113032bd5/pylal_exttrig_llutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 645, 536, 273, 296, 30305, 16, 4561, 16, 4561, 11, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 645, 536, 273, 296, 30305, 16, 4561, 16, 4561, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.body_suffix = ['\n']
self.body_suffix = ['\n\\end{document}\n']
def __init__(self, document): nodes.NodeVisitor.__init__(self, document) self.settings = settings = document.settings self.latex_encoding = self.to_latex_encoding(settings.output_encoding) self.use_latex_toc = settings.use_latex_toc self.use_latex_docinfo = settings.use_latex_docinfo self.use_latex_footnotes = settings.use_latex_footnotes self._use_latex_citations = settings.use_latex_citations self.embed_stylesheet = settings.embed_stylesheet self._reference_label = settings.reference_label self.hyperlink_color = settings.hyperlink_color self.compound_enumerators = settings.compound_enumerators self.font_encoding = settings.font_encoding self.section_prefix_for_enumerators = ( settings.section_prefix_for_enumerators) self.section_enumerator_separator = ( settings.section_enumerator_separator.replace('_', '\\_')) if self.hyperlink_color == '0': self.hyperlink_color = 'black' self.colorlinks = 'false' else: self.colorlinks = 'true' if self.settings.literal_block_env != '': self.settings.use_verbatim_when_possible = True if self.settings.use_bibtex: self.bibtex = self.settings.use_bibtex.split(',',1) # TODO avoid errors on not declared citations. else: self.bibtex = None # language: labels, bibliographic_fields, and author_separators. # to allow writing labes for specific languages. self.language = languages.get_language(settings.language_code) self.babel = Babel(settings.language_code) self.author_separator = self.language.author_separators[0] self.d_options = self.settings.documentoptions if self.babel.get_language(): self.d_options += ',%s' % self.babel.get_language() self.latex_equivalents[u'\u00A0'] = self.babel.nobr
e6dd1bf37f940e4bb62e65a85b414caa9a5c54aa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/e6dd1bf37f940e4bb62e65a85b414caa9a5c54aa/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 365, 18, 26264, 67, 5999, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1668, 4672, 2199, 18, 907, 7413, 16186, 2738, 972, 12, 2890, 16, 1668, 13, 365, 18, 4272, 273, 1947, 273, 1668, 18, 4272, 365, 18, 26264, 67, 5999, 273, ...
if prec is None: prec = context.prec ans = Decimal(self) ans = ans._fixexponents(prec, rounding, folddown=folddown, context=context)
prec = context.prec ans = self._fixexponents(prec, context)
def _fix(self, prec=None, rounding=None, folddown=None, context=None): """Round if it is necessary to keep self within prec precision.
7154a51f157717174dff89f44508046f6876db74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/7154a51f157717174dff89f44508046f6876db74/decimal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 12, 2890, 16, 13382, 33, 7036, 16, 13885, 33, 7036, 16, 28420, 449, 995, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 11066, 309, 518, 353, 4573, 358, 3455, 365, 3470, 13382, 603...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 904, 12, 2890, 16, 13382, 33, 7036, 16, 13885, 33, 7036, 16, 28420, 449, 995, 33, 7036, 16, 819, 33, 7036, 4672, 3536, 11066, 309, 518, 353, 4573, 358, 3455, 365, 3470, 13382, 603...
<form name="add_new_borrower_step2_form" action="%s/admin2/bibcirculation/add_new_borrower_step3" method="get" >
<form name="add_new_borrower_step2_form" action="%s/admin2/bibcirculation/add_new_borrower_step3" method="post" >
def tmpl_add_new_borrower_step2(self, tup_infos, infos, ln=CFG_SITE_LANG):
648f0875a183c65548d6b2535cea8cf25a2a9827 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12027/648f0875a183c65548d6b2535cea8cf25a2a9827/bibcirculation_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 1289, 67, 2704, 67, 70, 15318, 264, 67, 4119, 22, 12, 2890, 16, 15822, 67, 18227, 16, 10626, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 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, 10720, 67, 1289, 67, 2704, 67, 70, 15318, 264, 67, 4119, 22, 12, 2890, 16, 15822, 67, 18227, 16, 10626, 16, 7211, 33, 19727, 67, 20609, 67, 10571, 4672, 2, -100, -100, -100, -100, -100...
dprint("response_cache miss: %s" % str(ref))
if cls.debug: dprint("response_cache miss: %s" % str(ref))
def _propfind(cls, ref): ref, client = cls._get_client(ref) if ref in cls.response_cache: status, responses = cls.response_cache[ref] dprint("response_cache hit: %s" % str(ref)) else: dprint("response_cache miss: %s" % str(ref)) path = str(ref.path) responses = client.propfind(path, depth=1) if client.response.status == 301: #dprint(client.response.status) #dprint(pp.pformat(responses)) #dprint(client.response.body) match = cls.re301.search(client.response.body) if match: newpath = match.group(1) responses = client.propfind(newpath, depth=1) cls.remap301[ref] = get_reference(newpath) status = client.response.status dprint("response_cache miss: storing status=%s, response=%s" % (status, responses)) if responses is not None: dprint(ref) newref = cls._copy_reference_without_username(ref) cls.response_cache[newref] = (status, responses) return ref, status, responses
23c171bfd81964bb1a082d8d21ffb71c855ace35 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/23c171bfd81964bb1a082d8d21ffb71c855ace35/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5986, 4720, 12, 6429, 16, 1278, 4672, 1278, 16, 1004, 273, 2028, 6315, 588, 67, 2625, 12, 1734, 13, 309, 1278, 316, 2028, 18, 2740, 67, 2493, 30, 1267, 16, 7220, 273, 2028, 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, 389, 5986, 4720, 12, 6429, 16, 1278, 4672, 1278, 16, 1004, 273, 2028, 6315, 588, 67, 2625, 12, 1734, 13, 309, 1278, 316, 2028, 18, 2740, 67, 2493, 30, 1267, 16, 7220, 273, 2028, 18, ...
'modified_katakana':opt_conv["boolean"][option5.get_active()],
'modified_katakana': opt_conv["boolean"][option5.get_active()],
def callback(widget,special=None): if special=="save": #Update the configuration. self.param.write({ 'basic_hiragana':opt_conv["boolean"][option1.get_active()], 'basic_hiragana_portions':kanaPortions[0], 'modified_hiragana':opt_conv["boolean"][option2.get_active()], 'modified_hiragana_portions':kanaPortions[1], 'contracted_hiragana':opt_conv["boolean"][option3.get_active()], 'contracted_hiragana_portions':kanaPortions[2], 'basic_katakana':opt_conv["boolean"][option4.get_active()], 'basic_katakana_portions':kanaPortions[3], 'modified_katakana':opt_conv["boolean"][option5.get_active()], 'modified_katakana_portions':kanaPortions[4], 'contracted_katakana':opt_conv["boolean"][option6.get_active()], 'contracted_katakana_portions':kanaPortions[5], 'additional_katakana':opt_conv["boolean"][option7.get_active()], 'additional_katakana_portions':kanaPortions[6], 'transcription_system':opt_conv["transcription_system"][ option8.get_active()], 'answer_mode':opt_conv["answer_mode"][option9.get_active()], 'list_size':option10.get_active()+2, 'rand_answer_sel_range':opt_conv["rand_answer_sel_range"][ option11.get_active()], 'length':int(option12.get_value()), 'kana_no_repeat':opt_conv["boolean"][option13.get_active()], 'lang':opt_conv["lang"][option14.get_active()] }) self.main(box) #Go back to the ``main".
64cfb9e0b60a3a976c72fa9d5d722987641133b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3073/64cfb9e0b60a3a976c72fa9d5d722987641133b9/gtk_gui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 6587, 16, 9371, 33, 7036, 4672, 309, 4582, 31713, 5688, 6877, 468, 1891, 326, 1664, 18, 365, 18, 891, 18, 2626, 12590, 296, 13240, 67, 76, 481, 346, 13848, 4278, 3838, 67, 48...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1348, 12, 6587, 16, 9371, 33, 7036, 4672, 309, 4582, 31713, 5688, 6877, 468, 1891, 326, 1664, 18, 365, 18, 891, 18, 2626, 12590, 296, 13240, 67, 76, 481, 346, 13848, 4278, 3838, 67, 48...
fvalue_gen = SetGen(self.__getattr__(f))
fvalue_gen = SetGen(self.__getattr__(f),_iterpacket=0)
def getlayer(self, cls, nb=1, _track=None): """Return the nb^th layer that is an instance of cls.""" if type(cls) is str and "." in cls: ccls,fld = cls.split(".",1) else: ccls,fld = cls,None if self.__class__ == cls or self.__class__.name == ccls: if nb == 1: if fld is None: return self else: return getattr(self, fld) else: nb -=1 for f in self.fields_desc: fvalue_gen = SetGen(self.__getattr__(f)) for fvalue in fvalue_gen: if isinstance(fvalue, Packet): track=[] ret = fvalue.getlayer(cls, nb, _track=track) if ret is not None: return ret nb = track[0] return self.payload.getlayer(cls,nb,_track=_track)
46665161f3ba1598ceedac57149027a35ad8e72d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7311/46665161f3ba1598ceedac57149027a35ad8e72d/scapy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6363, 12, 2890, 16, 2028, 16, 4264, 33, 21, 16, 389, 4101, 33, 7036, 4672, 3536, 990, 326, 4264, 66, 451, 3018, 716, 353, 392, 791, 434, 2028, 12123, 309, 618, 12, 6429, 13, 353...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6363, 12, 2890, 16, 2028, 16, 4264, 33, 21, 16, 389, 4101, 33, 7036, 4672, 3536, 990, 326, 4264, 66, 451, 3018, 716, 353, 392, 791, 434, 2028, 12123, 309, 618, 12, 6429, 13, 353...
del old['id'] old['user_id'] = uid old['ref_id'] = ids[0] nid = self.pool.get('ir.ui.view.custom').create(cr, uid, old) result = self.pool.get('ir.ui.view.custom').write(cr, uid, [nid], vals) return result else: nid = vids result = self.pool.get('ir.ui.view.custom').write(cr, uid, nid, vals) result = super(view, self).write(cr, uid, vids, vals, context) return result result = super(view, self).write(cr, uid, ids, vals, context) cr.commit() return result
return result return super(view, self).write(cr, uid, ids, vals, context)
def write(self, cr, uid, ids, vals, context={}): exist = self.pool.get('ir.ui.view').browse(cr, uid, ids[0]) if exist.model == 'board.board': vids = self.pool.get('ir.ui.view.custom').search(cr, uid, [('user_id','=',uid), ('ref_id','=',ids[0])]) if not vids: old = self.pool.get('ir.ui.view').read(cr, uid, ids)[0]
cceeb1734633a40d073f1ab37c9f29d2c3677b9e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12853/cceeb1734633a40d073f1ab37c9f29d2c3677b9e/ir_ui_view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 12938, 4672, 1005, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4881, 18, 1945, 16063, 25731, 12, 3353, 16, 4555, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 5773, 16, 819, 12938, 4672, 1005, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 4881, 18, 1945, 16063, 25731, 12, 3353, 16, 4555, 16, ...
return "installer.exe"
if version.startswith('3.0'): return "installer.exe" else: return "exe"
def getFileExtension(platform): if isLinux(platform): return "tar.bz2" if isMac(platform): return "dmg" if isWin(platform): return "installer.exe" return None
e36822b26ce81ba3f89d96443ec62c28dbd6e70f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10262/e36822b26ce81ba3f89d96443ec62c28dbd6e70f/partner-repacks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6034, 3625, 12, 9898, 4672, 309, 353, 19475, 12, 9898, 4672, 327, 315, 11718, 18, 25292, 22, 6, 309, 353, 9990, 12, 9898, 4672, 327, 315, 10956, 75, 6, 309, 353, 18049, 12, 9898, 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, 6034, 3625, 12, 9898, 4672, 309, 353, 19475, 12, 9898, 4672, 327, 315, 11718, 18, 25292, 22, 6, 309, 353, 9990, 12, 9898, 4672, 327, 315, 10956, 75, 6, 309, 353, 18049, 12, 9898, 4672,...
letter = letter.encode('utf8')
letter = letter.encode('utf-8')
def word2ASCII(self, unicode_text): index = 0 prebase_letter = "" ascii_text="" self.direction = "u2a" self.rulesDict = self.LoadRules() while index < len(unicode_text): '''കൂട്ടക്ഷരങ്ങള്‍ക്കൊരു കുറുക്കുവഴി''' for charNo in [3,2,1]: letter = unicode_text[index:index+charNo] if letter in self.rulesDict: ascii_letter = self.rulesDict[letter] letter = letter.encode('utf8') '''കിട്ടിയ അക്ഷരങ്ങളുടെ അപ്പുറത്തും ഇപ്പുറത്തും സ്വരചിഹ്നങ്ങള്‍ ഫിറ്റ് ചെയ്യാനുള്ള ബദ്ധപ്പാട്''' if letter == 'ൈ': # പിറകില്‍ രണ്ടു സാധനം പിടിപ്പിക്കുക ascii_text = ascii_text[:-1] + ascii_letter*2 + ascii_text[-1:] elif (letter == 'ോ') | (letter == 'ൊ') | (letter == 'ൌ'): #മുമ്പിലൊന്നും പിറകിലൊന്നും ascii_text = ascii_text[:-1] + ascii_letter[0] + ascii_text[-1:] + ascii_letter[1] elif (letter == 'െ') | (letter == 'േ') |(letter == '്ര'): #പിറകിലൊന്നുമാത്രം ascii_text = ascii_text[:-1] + ascii_letter + ascii_text[-1:] else: ascii_text = ascii_text + ascii_letter index = index+charNo break else: if(charNo==1): index=index+1 ascii_text = ascii_text + letter break; '''നോക്കിയിട്ടു കിട്ടുന്നില്ല ബായി''' ascii_letter = letter #ascii_text = ascii_text + ascii_letter #index = index+1
a3bff0e63dd6adc098bcb44538b3d8adff8a4984 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7930/a3bff0e63dd6adc098bcb44538b3d8adff8a4984/payyan.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 22, 13756, 12, 2890, 16, 5252, 67, 955, 4672, 770, 273, 374, 675, 1969, 67, 13449, 273, 1408, 11384, 67, 955, 1546, 6, 365, 18, 9855, 273, 315, 89, 22, 69, 6, 365, 18, 7482, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2076, 22, 13756, 12, 2890, 16, 5252, 67, 955, 4672, 770, 273, 374, 675, 1969, 67, 13449, 273, 1408, 11384, 67, 955, 1546, 6, 365, 18, 9855, 273, 315, 89, 22, 69, 6, 365, 18, 7482, ...
'hachoir_core==1.2', 'hachoir_metadata==1.2', 'hachoir_parser==1.2'
'hachoir_core', 'hachoir_metadata', 'hachoir_parser'
def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
5e3d1698219b029cfb50311be099fb7f529b5a5c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11482/5e3d1698219b029cfb50311be099fb7f529b5a5c/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 30857, 86, 1973, 4672, 327, 1696, 12, 538, 18, 803, 18, 5701, 12, 538, 18, 803, 18, 12287, 12, 972, 768, 972, 3631, 380, 86, 1973, 13, 2934, 896, 1435, 225, 2, -100, -100, -100,...
mixerwidget = DummyMixer( w )
mixerwidget = Dummy( w )
def updatePanels(self): log.debug("PanelManager::updatePanels()") nbDevices = self.devmgr.getNbDevices() #self.statusBar().showMessage("Reconfiguring the mixer panels...")
292550b35debc3a6c705abb4e6e176f31111e4cb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11526/292550b35debc3a6c705abb4e6e176f31111e4cb/panelmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5537, 87, 12, 2890, 4672, 613, 18, 4148, 2932, 5537, 1318, 2866, 2725, 5537, 87, 1435, 7923, 4264, 10053, 273, 365, 18, 323, 3489, 3197, 18, 588, 22816, 10053, 1435, 468, 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, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 5537, 87, 12, 2890, 4672, 613, 18, 4148, 2932, 5537, 1318, 2866, 2725, 5537, 87, 1435, 7923, 4264, 10053, 273, 365, 18, 323, 3489, 3197, 18, 588, 22816, 10053, 1435, 468, 2890, 18,...
return hlr_wavelength_to_scalar_k.wavelength_to_scalar_k(wavelength_final) def calc_E_final(config, wavelength_final):
return hlr_wavelength_to_scalar_k.wavelength_to_scalar_k(config.wavelength_final) def calc_E_final(config):
def calc_k_final(config, wavelength_final): """Step 16. Calculate final wavevector using function 3.24.""" import hlr_wavelength_to_scalar_k return hlr_wavelength_to_scalar_k.wavelength_to_scalar_k(wavelength_final)
29efc361c4183443dc2b83ffa4d0ef8288a4d580 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/763/29efc361c4183443dc2b83ffa4d0ef8288a4d580/amorphous_reduction.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 79, 67, 6385, 12, 1425, 16, 21410, 67, 6385, 4672, 3536, 4160, 2872, 18, 9029, 727, 10794, 7737, 1450, 445, 890, 18, 3247, 12123, 225, 1930, 366, 10826, 67, 91, 16775, 67, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7029, 67, 79, 67, 6385, 12, 1425, 16, 21410, 67, 6385, 4672, 3536, 4160, 2872, 18, 9029, 727, 10794, 7737, 1450, 445, 890, 18, 3247, 12123, 225, 1930, 366, 10826, 67, 91, 16775, 67, 86...
if src_ds is None:
if src_ds is None or src_ds == 'NULL':
def RGBFile2PCTFile( src_filename, dst_filename ): src_ds = Open(src_filename) if src_ds is None: return 1 ct = ColorTable() err = ComputeMedianCutPCT( src_ds.GetRasterBand(1), src_ds.GetRasterBand(2), src_ds.GetRasterBand(3), 256, ct ) if err <> 0: return err gtiff_driver = GetDriverByName('GTiff') if gtiff_driver is None: return 1 dst_ds = gtiff_driver.Create( dst_filename, src_ds.RasterXSize, src_ds.RasterYSize ) dst_ds.GetRasterBand(1).SetRasterColorTable( ct ) err = DitherRGB2PCT( src_ds.GetRasterBand(1), src_ds.GetRasterBand(2), src_ds.GetRasterBand(3), dst_ds.GetRasterBand(1), ct ) dst_ds = None src_ds = None return 0
c1192124f4df195ddc4f693c4557b0eb1cfa40fd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10290/c1192124f4df195ddc4f693c4557b0eb1cfa40fd/gdal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11510, 812, 22, 52, 1268, 812, 12, 1705, 67, 3459, 16, 3046, 67, 3459, 262, 30, 1705, 67, 2377, 273, 3502, 12, 4816, 67, 3459, 13, 309, 1705, 67, 2377, 353, 599, 578, 1705, 67, 2377,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11510, 812, 22, 52, 1268, 812, 12, 1705, 67, 3459, 16, 3046, 67, 3459, 262, 30, 1705, 67, 2377, 273, 3502, 12, 4816, 67, 3459, 13, 309, 1705, 67, 2377, 353, 599, 578, 1705, 67, 2377,...
loader.write(open(channel.cover_file, 'rb').read())
def __get_cover(self, channel, url, async=False, avoid_downloading=False): if not async and avoid_downloading and not os.path.exists(channel.cover_file): return (channel.url, None)
9a08d06d774ac750277102c930380813044b486e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/9a08d06d774ac750277102c930380813044b486e/services.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 3165, 12, 2890, 16, 1904, 16, 880, 16, 4326, 33, 8381, 16, 4543, 67, 7813, 310, 33, 8381, 4672, 309, 486, 4326, 471, 4543, 67, 7813, 310, 471, 486, 1140, 18, 803, 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, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 3165, 12, 2890, 16, 1904, 16, 880, 16, 4326, 33, 8381, 16, 4543, 67, 7813, 310, 33, 8381, 4672, 309, 486, 4326, 471, 4543, 67, 7813, 310, 471, 486, 1140, 18, 803, 18, ...
def __new__(cls, e): obj = str.__new__(cls, e[1])
def __new__(cls, e, append_msg=''): obj = str.__new__(cls, e[1] + append_msg)
def __new__(cls, e): obj = str.__new__(cls, e[1]) obj.code = int(e[0]) obj.module = e.__module__ obj.exception = e.__class__.__name__ return obj
3e7136da0bd083da87e989023dd322f8dce9152f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8798/3e7136da0bd083da87e989023dd322f8dce9152f/mysqlconnection.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 425, 16, 714, 67, 3576, 2218, 11, 4672, 1081, 273, 609, 16186, 2704, 972, 12, 6429, 16, 425, 63, 21, 65, 397, 714, 67, 3576, 13, 1081, 18, 710, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2704, 972, 12, 6429, 16, 425, 16, 714, 67, 3576, 2218, 11, 4672, 1081, 273, 609, 16186, 2704, 972, 12, 6429, 16, 425, 63, 21, 65, 397, 714, 67, 3576, 13, 1081, 18, 710, 273, ...
sys.exit(1)
raise UnsupportedException
def copy_volume(self, image_path, volume_path, excludes, generate_fstab, fstab_path): mount_point, loop_dev = self.mount_image(image_path)
be99daf4b6f697762bb053d60594aa73fb866280 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12707/be99daf4b6f697762bb053d60594aa73fb866280/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 9491, 12, 2890, 16, 1316, 67, 803, 16, 3940, 67, 803, 16, 13644, 16, 2103, 67, 74, 334, 378, 16, 20223, 378, 67, 803, 4672, 5344, 67, 1153, 16, 2798, 67, 5206, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 9491, 12, 2890, 16, 1316, 67, 803, 16, 3940, 67, 803, 16, 13644, 16, 2103, 67, 74, 334, 378, 16, 20223, 378, 67, 803, 4672, 5344, 67, 1153, 16, 2798, 67, 5206, 273, 365, ...
gump.addText(50, 313, tr("Previous Menu"), 0x480)
gump.addText(50, 313, tr("Previous Menu"), enabbledhue)
def addbuttons(self, gump, player, arguments, submenu = 0): # Allow repairing items. if self.allowrepair: gump.addButton(350, 310, 4005, 4007, 10) gump.addText(385, 313, tr("Repair Item"), 0x480)
0d89a4bc8e80f0d0c5ebc39da765d50080b61588 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/0d89a4bc8e80f0d0c5ebc39da765d50080b61588/makemenus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 16016, 12, 2890, 16, 314, 2801, 16, 7291, 16, 1775, 16, 27539, 273, 374, 4672, 468, 7852, 20994, 310, 1516, 18, 309, 365, 18, 5965, 266, 6017, 30, 314, 2801, 18, 1289, 3616, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 16016, 12, 2890, 16, 314, 2801, 16, 7291, 16, 1775, 16, 27539, 273, 374, 4672, 468, 7852, 20994, 310, 1516, 18, 309, 365, 18, 5965, 266, 6017, 30, 314, 2801, 18, 1289, 3616, 12, ...
"hp:b:rxec", ["help", "port=", "baud=", "rtscts", "xonxoff", "echo", "cr"])
"hp:b:rxP", ["help", "port=", "baud=", "rtscts", "xonxoff", "localport"])
def usage(): print >>sys.stderr, """USAGE: %s [options] Simple Terminal Programm for the serial port. options: -p, --port=PORT: serial port, a number, defualt = 0 or a device name -b, --baud=BAUD: baudrate, default 9600 -r, --rtscts: enable RTS/CTS flow control (default off) -x, --xonxoff: enable software flow control (default off) -P, --localport: TCP/IP port on which to run the server (default 7777) """ % sys.argv[0]
d1bc025a5ffd45b7cb45bdc2b2b0210119acfd93 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/d1bc025a5ffd45b7cb45bdc2b2b0210119acfd93/tcp_serial_redirect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 1172, 1671, 9499, 18, 11241, 16, 3536, 29550, 30, 738, 87, 306, 2116, 65, 4477, 18778, 13586, 81, 364, 326, 2734, 1756, 18, 225, 702, 30, 300, 84, 16, 1493, 655, 33, 6354,...
print "Using as seed", x, y, z, pixelidx self.itkfilter.AddSeed(pixelidx) print "Threshold=", self.parameters["Lower"], self.parameters["Upper"]
self.itkfilter.AddSeed(pixelidx)
def execute(self, inputs, update = 0, last = 0): """ Created: 29.05.2006, KP Description: Execute the filter with given inputs and return the output """ if not ProcessingFilter.ProcessingFilter.execute(self, inputs): return None image = self.getInput(1)
6d7b572696d4ecdce2049b45a6e109836f3272c9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2877/6d7b572696d4ecdce2049b45a6e109836f3272c9/SegmentationFilters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 12899, 18, 6260, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 4540, 16, 1089, 273, 374, 16, 1142, 273, 374, 4672, 3536, 12953, 30, 12899, 18, 6260, 18, 6976, 26, 16, 1475, 52, 6507, 30, 7903, 326, 1034, 598, 864, 4540, 471, ...
for fileObj, targetPath in delayedRestores[targetPtrId]: sourcePath = ptrMap[targetPtrId] fileObj.restore( filecontents.FromFilesystem(destdir + sourcePath), destdir, destdir + targetPath) for linkGroup in linkGroups: for path in linkGroups[linkGroup]: initialPath = linkGroupFirstPath[linkGroup] if path == initialPath: continue util.createLink(destdir + initialPath, destdir + path)
for root, fileObj, targetPath in delayedRestores[targetPtrId]: linkGroup = fileObj.linkGroup() if linkGroup in linkGroups: util.createLink(destdir + linkGroups[linkGroup], destdir + targetPath) else: sourcePath = ptrMap[targetPtrId] fileObj.restore( filecontents.FromFilesystem(root + sourcePath), root, root + targetPath) if linkGroup: linkGroups[linkGroup] = targetPath
def _expandChangeset(self): destdir = self.macros.destdir
bf1e72ee2b72891b3212d17590a07a0ffdab40e5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/bf1e72ee2b72891b3212d17590a07a0ffdab40e5/derivedrecipe.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12320, 29743, 12, 2890, 4672, 1570, 1214, 273, 365, 18, 5821, 6973, 18, 10488, 1214, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 12320, 29743, 12, 2890, 4672, 1570, 1214, 273, 365, 18, 5821, 6973, 18, 10488, 1214, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
wh = (nonzero(stepi > 0))[0]
wh = (numpy.nonzero(stepi > 0))[0]
def fdjac2(self, fcn, x, fvec, step=None, ulimited=None, ulimit=None, dside=None, epsfcn=None, autoderivative=1, functkw=None, xall=None, ifree=None, dstep=None):
14558c711c4693ee25ced2a48d6eaf300224bc75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/682/14558c711c4693ee25ced2a48d6eaf300224bc75/mpfit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5194, 31390, 22, 12, 2890, 16, 8036, 82, 16, 619, 16, 284, 8799, 16, 2235, 33, 7036, 16, 7493, 1038, 329, 33, 7036, 16, 7493, 1038, 33, 7036, 16, 3780, 831, 33, 7036, 16, 7785, 7142,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5194, 31390, 22, 12, 2890, 16, 8036, 82, 16, 619, 16, 284, 8799, 16, 2235, 33, 7036, 16, 7493, 1038, 329, 33, 7036, 16, 7493, 1038, 33, 7036, 16, 3780, 831, 33, 7036, 16, 7785, 7142,...
print 'Finding labels unused by:'
def _query_unused(self, builder, args): targets = [] print 'query unused %s'%args if args: for thing in args: if thing == '_all': raise utils.Failure("It does not make sense to ask for" " 'muddle query unused _all'") targets.append(depend.Label.from_string(thing)) else: print 'Using default deployables:' targets = builder.invocation.default_labels[:] print 'Finding labels unused by:' for label in targets: print ' %s'%label
7cae59a956217eb6aa76a859ba3b00f286939656 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4427/7cae59a956217eb6aa76a859ba3b00f286939656/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 14375, 12, 2890, 16, 2089, 16, 833, 4672, 5774, 273, 5378, 1172, 296, 2271, 10197, 738, 87, 11, 9, 1968, 309, 833, 30, 364, 7757, 316, 833, 30, 309, 7757, 422, 2070, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 67, 14375, 12, 2890, 16, 2089, 16, 833, 4672, 5774, 273, 5378, 1172, 296, 2271, 10197, 738, 87, 11, 9, 1968, 309, 833, 30, 364, 7757, 316, 833, 30, 309, 7757, 422, 2070, 4...
ks = KeyStatistic(r[0], r[1], _('viruses'))
key_name = r[0] if not key_name or key_name == '': key_name = _('Unknown') ks = KeyStatistic(key_name, r[1], _('viruses'))
def get_graph(self, end_date, report_days, host=None, user=None, email=None): if email: return None
e3bd9ff326663a60b6e32123547458ef772a5cdc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/87/e3bd9ff326663a60b6e32123547458ef772a5cdc/untangle_base_virus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4660, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 2699, 30, 327, 599, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 4660, 12, 2890, 16, 679, 67, 712, 16, 2605, 67, 9810, 16, 1479, 33, 7036, 16, 729, 33, 7036, 16, 2699, 33, 7036, 4672, 309, 2699, 30, 327, 599, 2, -100, -100, -100, -100, ...
sync.acquire() try: sync.wait() finally: sync.release()
sync.wait()
def _AcquireShared(ev): if not self.sl.acquire(shared=1, timeout=None): return
51e3bb9294fc333e07af4f26257738e4caa6e99e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/51e3bb9294fc333e07af4f26257738e4caa6e99e/ganeti.locking_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27761, 7887, 12, 14965, 4672, 309, 486, 365, 18, 2069, 18, 1077, 1039, 12, 11574, 33, 21, 16, 2021, 33, 7036, 4672, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 27761, 7887, 12, 14965, 4672, 309, 486, 365, 18, 2069, 18, 1077, 1039, 12, 11574, 33, 21, 16, 2021, 33, 7036, 4672, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def encrypt_file(self, cipher, in_file, out_file) :
def crypt_file(self, cipher, in_file, out_file) :
def encrypt_file(self, cipher, in_file, out_file) : while 1: buf=in_file.read(IMAGE_IO_CHUNK) if not buf: break out_file.write(cipher.update(buf)) out_file.write(cipher.final())
4626c80707c4f952d795b45391f8bc8f8ed7bdc1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12707/4626c80707c4f952d795b45391f8bc8f8ed7bdc1/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13231, 67, 768, 12, 2890, 16, 5867, 16, 316, 67, 768, 16, 596, 67, 768, 13, 294, 1323, 404, 30, 1681, 33, 267, 67, 768, 18, 896, 12, 13603, 67, 4294, 67, 26464, 13, 309, 486, 1681,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13231, 67, 768, 12, 2890, 16, 5867, 16, 316, 67, 768, 16, 596, 67, 768, 13, 294, 1323, 404, 30, 1681, 33, 267, 67, 768, 18, 896, 12, 13603, 67, 4294, 67, 26464, 13, 309, 486, 1681,...
contents = re.sub(search_string + "\n","",contents)
contents = re.sub(search_string, "", contents) contents = re.sub('^[\r\n]*','',contents)
def findpage(t): search_string = titlestart + "(.*?)" + titleend try: location = re.search(starttext+"\n([^\Z]*?)"+endtext,t) if include: contents = location.group() else: contents = location.group(1) except AttributeError: print 'Start or end marker not found.' return try: title = re.search(search_string, contents).group(1) except AttributeError: wikipedia.output(u"No title found - skipping a page.") return else: page = wikipedia.Page(mysite, title) wikipedia.output(page.title()) if notitle: #Remove title (to allow creation of redirects) contents = re.sub(search_string + "\n","",contents) if page.exists(): if append == "Top": old_text = page.get() contents = contents + old_text commenttext_top = commenttext + " - " + wikipedia.translate(mysite,msg_top) wikipedia.output(u"Page %s already exists, appending on top!"%title) page.put(contents, comment = commenttext_top, minorEdit = False) elif append == "Bottom": old_text = page.get() contents = old_text + contents commenttext_bottom = commenttext + " - " + wikipedia.translate(mysite,msg_bottom) wikipedia.output(u"Page %s already exists, appending on bottom!"%title) page.put(contents, comment = commenttext_bottom, minorEdit = False) elif force: commenttext_force = commenttext + " *** " + wikipedia.translate(mysite,msg_force) + " ***" wikipedia.output(u"Page %s already exists, ***overwriting!"%title) page.put(contents, comment = commenttext_force, minorEdit = False) else: wikipedia.output(u"Page %s already exists, not adding!"%title) else: page.put(contents, comment = commenttext, minorEdit = False) findpage(t[location.end()+1:]) return
57c315648163600a1999280e3533b89d4bb1dc01 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4404/57c315648163600a1999280e3533b89d4bb1dc01/pagefromfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2433, 12, 88, 4672, 1623, 67, 1080, 273, 268, 305, 80, 27893, 397, 315, 7444, 35, 2225, 397, 2077, 409, 775, 30, 2117, 273, 283, 18, 3072, 12, 1937, 955, 9078, 64, 82, 19042, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 2433, 12, 88, 4672, 1623, 67, 1080, 273, 268, 305, 80, 27893, 397, 315, 7444, 35, 2225, 397, 2077, 409, 775, 30, 2117, 273, 283, 18, 3072, 12, 1937, 955, 9078, 64, 82, 19042, 6...
self.known_plugins = conf.get('plugins', 'known_plugins')
self.known_plugins = conf.get('plugins', 'known_plugins').split(',') self.known_plugins = [x.strip("[]' ") for x in self.known_plugins]
def settings_load_real(self, library_set_data): """Load configuration from file""" # Load config conf = ConfigParser.ConfigParser() misc.create_dir('~/.config/sonata/') if os.path.isfile(os.path.expanduser('~/.config/sonata/sonatarc')): conf.read(os.path.expanduser('~/.config/sonata/sonatarc')) else: return # Compatibility with previous versions of Sonata: # -------------------------------------------------------------------- if conf.has_option('connection', 'host'): self.host[0] = conf.get('connection', 'host') if conf.has_option('connection', 'port'): self.port[0] = int(conf.get('connection', 'port')) if conf.has_option('connection', 'password'): self.password[0] = conf.get('connection', 'password') if conf.has_option('connection', 'musicdir'): self.musicdir[0] = misc.sanitize_musicdir(conf.get('connection', 'musicdir')) # -------------------------------------------------------------------- if conf.has_option('connection', 'auto'): self.autoconnect = conf.getboolean('connection', 'auto') if conf.has_option('connection', 'profile_num'): self.profile_num = conf.getint('connection', 'profile_num') if conf.has_option('player', 'x'): self.x = conf.getint('player', 'x') if conf.has_option('player', 'y'): self.y = conf.getint('player', 'y') if conf.has_option('player', 'w'): self.w = conf.getint('player', 'w') if conf.has_option('player', 'h'): self.h = conf.getint('player', 'h') if conf.has_option('player', 'expanded'): self.expanded = conf.getboolean('player', 'expanded') if conf.has_option('player', 'withdrawn'): self.withdrawn = conf.getboolean('player', 'withdrawn') if conf.has_option('player', 'screen'): self.screen = conf.getint('player', 'screen') if conf.has_option('player', 'covers'): self.show_covers = conf.getboolean('player', 'covers') if conf.has_option('player', 'covers_type'): self.covers_type = conf.getint('player', 'covers_type') if conf.has_option('player', 'stop_on_exit'): self.stop_on_exit = conf.getboolean('player', 'stop_on_exit') if conf.has_option('player', 'minimize'): self.minimize_to_systray = conf.getboolean('player', 'minimize') if conf.has_option('player', 'initial_run'): self.initial_run = conf.getboolean('player', 'initial_run') if conf.has_option('player', 'statusbar'): self.show_statusbar = conf.getboolean('player', 'statusbar') if conf.has_option('player', 'lyrics'): self.show_lyrics = conf.getboolean('player', 'lyrics') if conf.has_option('player', 'sticky'): self.sticky = conf.getboolean('player', 'sticky') if conf.has_option('player', 'ontop'): self.ontop = conf.getboolean('player', 'ontop') if conf.has_option('player', 'decorated'): self.decorated = conf.getboolean('player', 'decorated') if conf.has_option('player', 'notification'): self.show_notification = conf.getboolean('player', 'notification') if conf.has_option('player', 'popup_time'): self.popup_option = conf.getint('player', 'popup_time') if conf.has_option('player', 'update_on_start'): self.update_on_start = conf.getboolean('player', 'update_on_start') if conf.has_option('player', 'notif_location'): self.traytips_notifications_location = conf.getint('player', 'notif_location') if conf.has_option('player', 'playback'): self.show_playback = conf.getboolean('player', 'playback') if conf.has_option('player', 'progressbar'): self.show_progress = conf.getboolean('player', 'progressbar') if conf.has_option('player', 'crossfade'): crossfade = conf.getint('player', 'crossfade') # Backwards compatibility: self.xfade = crossfade if conf.has_option('player', 'xfade'): self.xfade = conf.getint('player', 'xfade') if conf.has_option('player', 'xfade_enabled'): self.xfade_enabled = conf.getboolean('player', 'xfade_enabled') if conf.has_option('player', 'covers_pref'): self.covers_pref = conf.getint('player', 'covers_pref') # Specifying remote artwork first is too confusing and probably # rarely used, so we're removing this option and defaulting users # back to the default 'local, then remote' option. if self.covers_pref > consts.ART_LOCAL_REMOTE: self.covers_pref = consts.ART_LOCAL_REMOTE if conf.has_option('player', 'use_infofile'): self.use_infofile = conf.getboolean('player', 'use_infofile') if conf.has_option('player', 'infofile_path'): self.infofile_path = conf.get('player', 'infofile_path') if conf.has_option('player', 'trayicon'): self.show_trayicon = conf.getboolean('player', 'trayicon') if conf.has_option('player', 'search_num'): self.last_search_num = conf.getint('player', 'search_num') if conf.has_option('player', 'art_location'): self.art_location = conf.getint('player', 'art_location') if conf.has_option('player', 'art_location_custom_filename'): self.art_location_custom_filename = conf.get('player', 'art_location_custom_filename') if conf.has_option('player', 'lyrics_location'): self.lyrics_location = conf.getint('player', 'lyrics_location') if conf.has_option('player', 'info_song_expanded'): self.info_song_expanded = conf.getboolean('player', 'info_song_expanded') if conf.has_option('player', 'info_lyrics_expanded'): self.info_lyrics_expanded = conf.getboolean('player', 'info_lyrics_expanded') if conf.has_option('player', 'info_album_expanded'): self.info_album_expanded = conf.getboolean('player', 'info_album_expanded') if conf.has_option('player', 'info_song_more'): self.info_song_more = conf.getboolean('player', 'info_song_more') if conf.has_option('player', 'columnwidths'): self.columnwidths = [int(col) for col in conf.get('player', 'columnwidths').split(",")] if conf.has_option('player', 'show_header'): self.show_header = conf.getboolean('player', 'show_header') if conf.has_option('player', 'tabs_expanded'): self.tabs_expanded = conf.getboolean('player', 'tabs_expanded') if conf.has_option('player', 'browser'): self.url_browser = conf.get('player', 'browser') if conf.has_option('player', 'info_art_enlarged'): self.info_art_enlarged = conf.getboolean('player', 'info_art_enlarged') if conf.has_option('player', 'existing_playlist'): self.existing_playlist_option = conf.getint('player', 'existing_playlist')
a6fcf949389fc65a61e05b0398d7f3e319ae9dd9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/a6fcf949389fc65a61e05b0398d7f3e319ae9dd9/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1947, 67, 945, 67, 7688, 12, 2890, 16, 5313, 67, 542, 67, 892, 4672, 3536, 2563, 1664, 628, 585, 8395, 468, 4444, 642, 2195, 273, 25076, 18, 809, 2678, 1435, 20448, 18, 2640, 67, 1214,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1947, 67, 945, 67, 7688, 12, 2890, 16, 5313, 67, 542, 67, 892, 4672, 3536, 2563, 1664, 628, 585, 8395, 468, 4444, 642, 2195, 273, 25076, 18, 809, 2678, 1435, 20448, 18, 2640, 67, 1214,...
textarea.cycleFocus() textarea.cycleFocus()
def checkSingleLine(): text = '' textarea.cycleFocus() textarea.cycleFocus() self.ta2.setText('') while True: self.assert_(len(text) < 60) textarea.keyCharPressed('X') text = text + 'X' if text != self.ta2.getText(): break
380a150da225130d15320d2204d36d246ffed6fd /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7300/380a150da225130d15320d2204d36d246ffed6fd/PythonTest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 5281, 1670, 13332, 977, 273, 875, 365, 18, 2351, 22, 18, 542, 1528, 2668, 6134, 1323, 1053, 30, 365, 18, 11231, 67, 12, 1897, 12, 955, 13, 411, 4752, 13, 19691, 18, 856, 2156, 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, 866, 5281, 1670, 13332, 977, 273, 875, 365, 18, 2351, 22, 18, 542, 1528, 2668, 6134, 1323, 1053, 30, 365, 18, 11231, 67, 12, 1897, 12, 955, 13, 411, 4752, 13, 19691, 18, 856, 2156, 2...
pc.data = [[10,12,14,16,14,12], [6,8,10,12,9,11]]
pc.data = [[10,12,14,16,14,12], [6,8,10,12,9,15],[7,8,17,4,12,8,3]]
def sample1(): "Make a simple spider chart" d = Drawing(400, 400) pc = SpiderChart() pc.x = 50 pc.y = 50 pc.width = 300 pc.height = 300 pc.data = [[10,12,14,16,14,12], [6,8,10,12,9,11]] pc.labels = ['a','b','c','d','e','f'] d.add(pc) return d
5130e273e1910e8bcd7f7573c7c822ebaec823fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/5130e273e1910e8bcd7f7573c7c822ebaec823fb/spider.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 21, 13332, 315, 6464, 279, 4143, 28022, 4980, 6, 225, 302, 273, 10184, 310, 12, 16010, 16, 7409, 13, 225, 6125, 273, 5878, 3585, 7984, 1435, 6125, 18, 92, 273, 6437, 6125, 18, 93...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3296, 21, 13332, 315, 6464, 279, 4143, 28022, 4980, 6, 225, 302, 273, 10184, 310, 12, 16010, 16, 7409, 13, 225, 6125, 273, 5878, 3585, 7984, 1435, 6125, 18, 92, 273, 6437, 6125, 18, 93...
dbs = glob.glob(os.path.expanduser(self.profile_dir + '/*.sqlite')) for path in dbs:
for path in FileUtilities.expand_glob_join(self.profile_dir, "*.sqlite"):
def other_cleanup(self, really_delete = False): # URL history if self.options['url_history'][1] and not self.options["places"][1]: paths = glob.glob(os.path.expanduser(self.profile_dir + "/places.sqlite")) for path in paths: if really_delete: oldsize = os.path.getsize(path) self.delete_url_history(path) newsize = os.path.getsize(path) yield (oldsize - newsize, path) else: yield path
170e35e8a777578e4dbf851cadc49c5fe2b91366 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7853/170e35e8a777578e4dbf851cadc49c5fe2b91366/CleanerBackend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1308, 67, 16732, 12, 2890, 16, 8654, 67, 3733, 273, 1083, 4672, 468, 1976, 4927, 309, 365, 18, 2116, 3292, 718, 67, 8189, 3546, 63, 21, 65, 471, 486, 365, 18, 2116, 9614, 11350, 6, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1308, 67, 16732, 12, 2890, 16, 8654, 67, 3733, 273, 1083, 4672, 468, 1976, 4927, 309, 365, 18, 2116, 3292, 718, 67, 8189, 3546, 63, 21, 65, 471, 486, 365, 18, 2116, 9614, 11350, 6, 6...
if self.endPos and self._getPTS()* 1000> self.endPos:
if self.endPos and self._getPTS()> self.endPos:
def _readerLoop( self ): f= None try: while self.exitFlag== 0: if self.playingFile== None: time.sleep( 0.01 ) continue self.length= self.frameNum= -1 # Initialize demuxer and read small portion of the file to have more info on the format self.clearError() if type( self.playingFile ) in ( str, unicode ): try: f= open( self.playingFile, 'rb' ) format= self.playingFile.split( '.' )[ -1 ].lower() except: traceback.print_exc() self.err.append( sys.exc_info() ) self.playingFile= None continue else: format= self.fileFormat f= self.playingFile try: dm= muxer.Demuxer( format ) s= f.read( FILE_CHUNK ) r= dm.parse( s ) except: traceback.print_exc() self.err.append( sys.exc_info() ) self.playingFile= None continue try: self.metaData= dm.getHeaderInfo() except: self.metaData= {} # This seek sets the seeking position already at the desired offset from the beginning if self.startPos: self.seekTo( self.startPos ) # Setup video( only first matching stream will be used ) self.clearError() self.vindex= -1 streams= filter( lambda x: x, dm.streams ) for st in streams: if st and st[ 'type' ]== muxer.CODEC_TYPE_VIDEO: self._initVideo( st ) self.vindex= list( streams ).index( st ) break # Setup audio( only first matching stream will be used ) self.aindex= -1 self.aPTS= None for st in streams: if st and st[ 'type' ]== muxer.CODEC_TYPE_AUDIO: self._initAudio( st ) self.aindex= list( streams ).index( st ) break # Open current file for playing currentFile= self.playingFile if self.vindex>= 0: self._getVStreamParams( self.vindex, streams[ self.vindex ], r ) self._getStreamLength( format, dm, f, r ) # Play until no exit flag, not eof, no errs and file still the same while len(s) and len( self.err )== 0 and \ self.exitFlag== 0 and self.playingFile and len( streams ) and \ self.playingFile== currentFile: if self.isPaused(): time.sleep( PAUSE_SLEEP ) continue for d in r: if self.playingFile!= currentFile: break # Seeking stuff if self.seek>= 0: # Find the file position first if self.length> 0 and self.fileSize> 0: #print self.seek, self.length, self.fileSize, ( float( self.seek ) / self.length )* self.fileSize f.seek( ( float( self.seek ) / self.length )* self.fileSize, 0 ) else: f.seek( self.seek* self.getBitRate()/ 8, 0 ) #print self.seek, self.getBitRate(), f.tell() #print 'seek to', self.seek, f.tell() seek= self.seek self.aDecodedFrames= [] if self.ac: self.ac.reset() if self.snd: self.snd.stop() self.rawFrames= [] self.decodedFrames= [] if self.vc: self.vc.reset() dm.reset() if self.vindex== -1: # Seek immediately if only audio stream is available self.seek= -1 self.aDelta= seek else: # Wait for a key video frame to arrive self.seek= SEEK_IN_PROGRESS break # See if we reached the end position of the video clip if self.endPos and self._getPTS()* 1000> self.endPos: # Seek at the end and close the reading loop instantly f.seek( 0, 2 ) break try: # Update length if not set already if self.getLength()== -1 and self.getBitRate()> 0: # Check file size against length and bitrates self.length= self.fileSize/ ( self.getBitRate()/ 8 ) # Demux file into streams if d[ 0 ]== self.vindex: # Process video frame seek= self.seek self._processVideoFrame( d ) if self.seek!= SEEK_IN_PROGRESS and seek== SEEK_IN_PROGRESS: # If key frame was found, change the time position self.videoPTS= ( float( f.tell() )/ self.fileSize )* self.length self.aDelta= self.videoPTS+ self.initADelta #print '---->position', f.tell(), self.aDelta elif d[ 0 ]== self.aindex and self.seek!= SEEK_IN_PROGRESS: # Decode and play audio frame self._processAudioFrame( d ) except: traceback.print_exc() self.err.append( sys.exc_info() ) self.playingFile= None break # Read next encoded chunk and demux it try: s= f.read( 512 ) r= dm.parse( s ) except: traceback.print_exc() self.err.append( sys.exc_info() ) self.playingFile= None continue if f: f.close()
c3a3c2f30c4310861582df4d5b48de338da7e8d1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2107/c3a3c2f30c4310861582df4d5b48de338da7e8d1/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10530, 6452, 12, 365, 262, 30, 284, 33, 599, 775, 30, 1323, 365, 18, 8593, 4678, 631, 374, 30, 309, 365, 18, 1601, 310, 812, 631, 599, 30, 813, 18, 19607, 12, 374, 18, 1611, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10530, 6452, 12, 365, 262, 30, 284, 33, 599, 775, 30, 1323, 365, 18, 8593, 4678, 631, 374, 30, 309, 365, 18, 1601, 310, 812, 631, 599, 30, 813, 18, 19607, 12, 374, 18, 1611, 2...
scampId = post['ScampId']
taskId = post.get('TaskId', '')
def __getCondorSubmissionFile(self, request, idList): """ Generates a suitable Condor submission for processing images on the cluster.
956a405efe3c1dc92e7f01c48718b70944da47db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/956a405efe3c1dc92e7f01c48718b70944da47db/scamp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 12441, 280, 17865, 812, 12, 2890, 16, 590, 16, 29174, 4672, 3536, 31902, 279, 10631, 735, 72, 280, 8515, 364, 4929, 4602, 603, 326, 2855, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 12441, 280, 17865, 812, 12, 2890, 16, 590, 16, 29174, 4672, 3536, 31902, 279, 10631, 735, 72, 280, 8515, 364, 4929, 4602, 603, 326, 2855, 18, 2, -100, -100, -100, -100, -100, ...
""" INPUT: A -- a WeylCharacterRing. Creates an auxiliary ring for the weights of a representation. This ring is associated with a WeylCharacterRing. The weights of a representation of a Lie group G or algebra are the characters of the characters of a Cartan subgroup T or subalgebra that occur when the representation is restricted to that Cartan. If a linear combination of weights is invariant under the Weyl group, then it is a linear combination of characters of G. As with the WeylCharacterRing, you may want to make sure that the prefix matches the name that you assign the ring, so that the __call__ method can parse the ring's own output. If you do not assign a prefix, one is automatically generated by changing the case of the prefix to the associated WeylCharacterRing, from upper case to lower case. However you may assign your own prefixes to both rings. EXAMPLE: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: wd = prod(a2(x/2)-a2(-x/2) for x in a2.lattice().positive_roots()); wd -a2(-1,0,1) + a2(-1,1,0) + a2(0,-1,1) - a2(0,1,-1) - a2(1,-1,0) + a2(1,0,-1) sage: chi = A2([5,3,0]); chi A2(5,3,0) sage: a2(chi) a2(0,3,5) + a2(0,4,4) + a2(0,5,3) + a2(1,2,5) + 2*a2(1,3,4) + 2*a2(1,4,3) + a2(1,5,2) + a2(2,1,5) + 2*a2(2,2,4) + 3*a2(2,3,3) + 2*a2(2,4,2) + a2(2,5,1) + a2(3,0,5) + 2*a2(3,1,4) + 3*a2(3,2,3) + 3*a2(3,3,2) + 2*a2(3,4,1) + a2(3,5,0) + a2(4,0,4) + 2*a2(4,1,3) + 2*a2(4,2,2) + 2*a2(4,3,1) + a2(4,4,0) + a2(5,0,3) + a2(5,1,2) + a2(5,2,1) + a2(5,3,0) sage: a2(chi)*wd -a2(-1,3,6) + a2(-1,6,3) + a2(3,-1,6) - a2(3,6,-1) - a2(6,-1,3) + a2(6,3,-1) sage: sum((-1)^w.length()*a2([6,3,-1]).weyl_group_action(w) for w in a2.lattice().weyl_group()) -a2(-1,3,6) + a2(-1,6,3) + a2(3,-1,6) - a2(3,6,-1) - a2(6,-1,3) + a2(6,3,-1) sage: a2(chi)*wd == sum((-1)^w.length()*a2([6,3,-1]).weyl_group_action(w) for w in a2.lattice().weyl_group()) True In the above example, we create a WeylCharacterRing A2 whose objects are the characters. Attached to this is a second WeightRing called a2. The Weyl denominator is created and labeled wd. This is the product of factors a2(alpha/2)-a2(-alpha/2) where alpha runs through the postive roots. Then character chi with highest weight [5,3,0] is created and coerced into a2. It has many terms. It is multiplied by wd and compared with the alternating sum of its images under Weyl group elements. These are equal, illustrating the Weyl character formula. EXAMPLE: sage: R = WeylCharacterRing(['G',2], prefix = "R", base_ring = QQ) sage: S = WeightRing(R, prefix = "S") sage: L = S.lattice() sage: vc = [sum(S(1/2)*S(f).weyl_group_action(w) for w in L.weyl_group()) for f in L.fundamental_weights()]; vc [S(-1,0,1) + S(-1,1,0) + S(0,-1,1) + S(0,1,-1) + S(1,-1,0) + S(1,0,-1), S(-2,1,1) + S(-1,-1,2) + S(-1,2,-1) + S(1,-2,1) + S(1,1,-2) + S(2,-1,-1)] sage: [v.character() for v in vc] [-R(0,0,0) + R(1,0,-1), -R(0,0,0) - R(1,0,-1) + R(2,-1,-1)] """
def character(self): """ Assuming that self is invariant under the Weyl group, this will express it as a linear combination of characters. If self is not Weyl group invariant, this method will not terminate. EXAMPLE: sage: A2 = WeylCharacterRing(['A',2]) sage: a2 = WeightRing(A2) sage: W = a2.lattice().weyl_group() sage: mu = a2(2,1,0) sage: nu = sum(mu.weyl_group_action(w) for w in W) sage: nu a2(0,1,2) + a2(0,2,1) + a2(1,0,2) + a2(1,2,0) + a2(2,0,1) + a2(2,1,0) sage: nu.character() -2*A2(1,1,1) + A2(2,1,0) """ return WeylCharacter(self._parent._parent, self._parent._parent.char_from_weights(self._mdict), self._mdict)
0a30ee9b10542e4dc66149f6ffe87504cb679b84 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/0a30ee9b10542e4dc66149f6ffe87504cb679b84/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3351, 12, 2890, 4672, 3536, 4725, 21249, 716, 365, 353, 22514, 3613, 326, 678, 402, 80, 1041, 16, 333, 903, 16947, 518, 487, 279, 9103, 10702, 434, 3949, 18, 971, 365, 353, 486, 678, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3351, 12, 2890, 4672, 3536, 4725, 21249, 716, 365, 353, 22514, 3613, 326, 678, 402, 80, 1041, 16, 333, 903, 16947, 518, 487, 279, 9103, 10702, 434, 3949, 18, 971, 365, 353, 486, 678, 4...
if create:
self._file = None if not create: try: self._file = open(file_name, read_only and 'rb' or 'r+b') except IOError, exc: if exc.errno == errno.EFBIG: raise if exc.errno == errno.ENOENT: create = 1 if os.path.exists(file_name): raise else: create = 1 if self._file is None and create:
def __init__(self, file_name, create=0, read_only=0, stop=None, quota=None):
ad85dfb9cd6957f764453d68c5aa78663f064355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/ad85dfb9cd6957f764453d68c5aa78663f064355/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 67, 529, 16, 752, 33, 20, 16, 855, 67, 3700, 33, 20, 16, 2132, 33, 7036, 16, 13257, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 67, 529, 16, 752, 33, 20, 16, 855, 67, 3700, 33, 20, 16, 2132, 33, 7036, 16, 13257, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, ...
K = NumberField_absolute(polynomial, name, None, check, embedding, latex_name=latex_name)
K = NumberField_absolute(polynomial, name, latex_name, check, embedding)
def NumberField(polynomial, name=None, check=True, names=None, cache=True, embedding=None, latex_name=None): r""" Return *the* number field defined by the given irreducible polynomial and with variable with the given name. If check is True (the default), also verify that the defining polynomial is irreducible and over `\QQ`. INPUT: - ``polynomial`` - a polynomial over `\QQ` or a number field, or a list of polynomials. - ``name`` - a string (default: 'a'), the name of the generator - ``check`` - bool (default: True); do type checking and irreducibility checking. - ``embedding`` - image of the generator in an ambient field (default: None) EXAMPLES:: sage: z = QQ['z'].0 sage: K = NumberField(z^2 - 2,'s'); K Number Field in s with defining polynomial z^2 - 2 sage: s = K.0; s s sage: s*s 2 sage: s^2 2 Constructing a relative number field:: sage: K.<a> = NumberField(x^2 - 2) sage: R.<t> = K[] sage: L.<b> = K.extension(t^3+t+a); L Number Field in b with defining polynomial t^3 + t + a over its base field sage: L.absolute_field('c') Number Field in c with defining polynomial x^6 + 2*x^4 + x^2 - 2 sage: a*b a*b sage: L(a) a sage: L.lift_to_base(b^3 + b) -a Constructing another number field:: sage: k.<i> = NumberField(x^2 + 1) sage: R.<z> = k[] sage: m.<j> = NumberField(z^3 + i*z + 3) sage: m Number Field in j with defining polynomial z^3 + i*z + 3 over its base field Number fields are globally unique:: sage: K.<a>= NumberField(x^3-5) sage: a^3 5 sage: L.<a>= NumberField(x^3-5) sage: K is L True Having different defining polynomials makes the fields different:: sage: x = polygen(QQ, 'x'); y = polygen(QQ, 'y') sage: k.<a> = NumberField(x^2 + 3) sage: m.<a> = NumberField(y^2 + 3) sage: k Number Field in a with defining polynomial x^2 + 3 sage: m Number Field in a with defining polynomial y^2 + 3 One can also define number fields with specified embeddings, may be used for arithmetic and deduce relations with other number fields which would not be valid for an abstract number field:: sage: K.<a> = NumberField(x^3-2, embedding=1.2) sage: RR.coerce_map_from(K) Composite map: From: Number Field in a with defining polynomial x^3 - 2 To: Real Field with 53 bits of precision Defn: Generic morphism: From: Number Field in a with defining polynomial x^3 - 2 To: Real Lazy Field Defn: a -> 1.259921049894873? then Conversion via _mpfr_ method map: From: Real Lazy Field To: Real Field with 53 bits of precision sage: RR(a) 1.25992104989487 sage: 1.1 + a 2.35992104989487 sage: b = 1/(a+1); b 1/3*a^2 - 1/3*a + 1/3 sage: RR(b) 0.442493334024442 sage: L.<b> = NumberField(x^6-2, embedding=1.1) sage: L(a) b^2 sage: a + b b^2 + b Note that the image only needs to be specified to enough precision to distinguish roots, and is exactly computed to any needed precision:: sage: RealField(200)(a) 1.2599210498948731647672106072782283505702514647015079800820 One can embed into any other field:: sage: K.<a> = NumberField(x^3-2, embedding=CC.gen()-0.6) sage: CC(a) -0.629960524947436 + 1.09112363597172*I sage: L = Qp(5) sage: f = polygen(L)^3 - 2 sage: K.<a> = NumberField(x^3-2, embedding=f.roots()[0][0]) sage: a + L(1) 4 + 2*5^2 + 2*5^3 + 3*5^4 + 5^5 + 4*5^6 + 2*5^8 + 3*5^9 + 4*5^12 + 4*5^14 + 4*5^15 + 3*5^16 + 5^17 + 5^18 + 2*5^19 + O(5^20) sage: L.<b> = NumberField(x^6-x^2+1/10, embedding=1) sage: K.<a> = NumberField(x^3-x+1/10, embedding=b^2) sage: a+b b^2 + b sage: CC(a) == CC(b)^2 True sage: K.coerce_embedding() Generic morphism: From: Number Field in a with defining polynomial x^3 - x + 1/10 To: Number Field in b with defining polynomial x^6 - x^2 + 1/10 Defn: a -> b^2 The ``QuadraticField`` and ``CyclotomicField`` constructors create an embedding by default unless otherwise specified. :: sage: K.<zeta> = CyclotomicField(15) sage: CC(zeta) 0.913545457642601 + 0.406736643075800*I sage: L.<sqrtn3> = QuadraticField(-3) sage: K(sqrtn3) 2*zeta^5 + 1 sage: sqrtn3 + zeta 2*zeta^5 + zeta + 1 An example involving a variable name that defines a function in PARI:: sage: theta = polygen(QQ, 'theta') sage: M.<z> = NumberField([theta^3 + 4, theta^2 + 3]); M Number Field in z0 with defining polynomial theta^3 + 4 over its base field TESTS:: sage: x = QQ['x'].gen() sage: y = ZZ['y'].gen() sage: K = NumberField(x^3 + x + 3, 'a'); K Number Field in a with defining polynomial x^3 + x + 3 sage: K.defining_polynomial().parent() Univariate Polynomial Ring in x over Rational Field :: sage: L = NumberField(y^3 + y + 3, 'a'); L Number Field in a with defining polynomial y^3 + y + 3 sage: L.defining_polynomial().parent() Univariate Polynomial Ring in y over Rational Field :: sage: sage.rings.number_field.number_field._nf_cache = {} sage: K.<x> = CyclotomicField(5)[] sage: W.<a> = NumberField(x^2 + 1); W Number Field in a with defining polynomial x^2 + 1 over its base field sage: sage.rings.number_field.number_field._nf_cache = {} sage: W1 = NumberField(x^2+1,'a') sage: K.<x> = CyclotomicField(5)[] sage: W.<a> = NumberField(x^2 + 1); W Number Field in a with defining polynomial x^2 + 1 over its base field """ if name is None and names is None: raise TypeError, "You must specify the name of the generator." if not names is None: name = names if isinstance(polynomial, (list, tuple)): return NumberFieldTower(polynomial, name) name = sage.structure.parent_gens.normalize_names(1, name) if not isinstance(polynomial, polynomial_element.Polynomial): try: polynomial = polynomial.polynomial(QQ) except (AttributeError, TypeError): raise TypeError, "polynomial (=%s) must be a polynomial."%repr(polynomial) # convert ZZ to QQ R = polynomial.base_ring() Q = polynomial.parent().base_extend(R.fraction_field()) polynomial = Q(polynomial) if cache: key = (polynomial, polynomial.base_ring(), name, embedding, embedding.parent() if embedding is not None else None) if _nf_cache.has_key(key): K = _nf_cache[key]() if not K is None: return K if isinstance(R, NumberField_generic): S = R.extension(polynomial, name, check=check) if cache: _nf_cache[key] = weakref.ref(S) return S if polynomial.degree() == 2: K = NumberField_quadratic(polynomial, name, check, embedding, latex_name=latex_name) else: K = NumberField_absolute(polynomial, name, None, check, embedding, latex_name=latex_name) if cache: _nf_cache[key] = weakref.ref(K) return K
6d9aae795dc714b459dfe86a8e73ff40a00a49c0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6d9aae795dc714b459dfe86a8e73ff40a00a49c0/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3588, 974, 12, 3915, 13602, 16, 508, 33, 7036, 16, 866, 33, 5510, 16, 1257, 33, 7036, 16, 1247, 33, 5510, 16, 15853, 33, 7036, 16, 25079, 67, 529, 33, 7036, 4672, 436, 8395, 2000, 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, 3588, 974, 12, 3915, 13602, 16, 508, 33, 7036, 16, 866, 33, 5510, 16, 1257, 33, 7036, 16, 1247, 33, 5510, 16, 15853, 33, 7036, 16, 25079, 67, 529, 33, 7036, 4672, 436, 8395, 2000, 38...
x0 = self.sites_cart[i]
x0 = sites_cart[i]
def __init__(self, xray_structure, name='??', **kwds): self.xray_structure = xs = xray_structure super(xray_structure_viewer, self).__init__( unit_cell=xray_structure.unit_cell(), orthographic=True, light_position=(-1, 1, 1, 0), **kwds) self.setWindowTitle("%s in %s" % (name, xs.space_group().type().hall_symbol())) sites_frac = xs.sites_frac() self.set_extent(sites_frac.min(), sites_frac.max())
7b4aa27a341f89acf7dfa5d6063d19a40f686bbc /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/696/7b4aa27a341f89acf7dfa5d6063d19a40f686bbc/xray_structure_viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 435, 67, 7627, 16, 508, 2218, 14646, 2187, 2826, 25577, 4672, 365, 18, 92, 435, 67, 7627, 273, 9280, 273, 619, 435, 67, 7627, 2240, 12, 92, 435, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 435, 67, 7627, 16, 508, 2218, 14646, 2187, 2826, 25577, 4672, 365, 18, 92, 435, 67, 7627, 273, 9280, 273, 619, 435, 67, 7627, 2240, 12, 92, 435, 6...
genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Icn", libraries=["IconServicesLib"], libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
def genpluginproject(architecture, module, project=None, projectdir=None, sources=[], sourcedirs=[], libraries=[], extradirs=[], extraexportsymbols=[], outputdir=":::Lib:lib-dynload", libraryflags=None, stdlibraryflags=None, prefixname=None): if architecture == "all": # For the time being we generate two project files. Not as nice as # a single multitarget project, but easier to implement for now. genpluginproject("ppc", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) genpluginproject("carbon", module, project, projectdir, sources, sourcedirs, libraries, extradirs, extraexportsymbols, outputdir, libraryflags, stdlibraryflags, prefixname) return templatename = "template-%s" % architecture targetname = "%s.%s" % (module, architecture) dllname = "%s.%s.slb" % (module, architecture) if not project: if architecture != "ppc": project = "%s.%s.mcp"%(module, architecture) else: project = "%s.mcp"%module if not projectdir: projectdir = PROJECTDIR if not sources: sources = [module + 'module.c'] if not sourcedirs: for moduledir in MODULEDIRS: if '%' in moduledir: # For historical reasons an initial _ in the modulename # is not reflected in the folder name if module[0] == '_': modulewithout_ = module[1:] else: modulewithout_ = module moduledir = moduledir % modulewithout_ fn = os.path.join(projectdir, os.path.join(moduledir, sources[0])) if os.path.exists(fn): moduledir, sourcefile = os.path.split(fn) sourcedirs = [relpath(projectdir, moduledir)] sources[0] = sourcefile break else: print "Warning: %s: sourcefile not found: %s"%(module, sources[0]) sourcedirs = [] if prefixname: pass elif architecture == "carbon": prefixname = "mwerks_carbonplugin_config.h" else: prefixname = "mwerks_plugin_config.h" dict = { "sysprefix" : relpath(projectdir, sys.prefix), "sources" : sources, "extrasearchdirs" : sourcedirs + extradirs, "libraries": libraries, "mac_outputdir" : outputdir, "extraexportsymbols" : extraexportsymbols, "mac_targetname" : targetname, "mac_dllname" : dllname, "prefixname" : prefixname, } if libraryflags: dict['libraryflags'] = libraryflags if stdlibraryflags: dict['stdlibraryflags'] = stdlibraryflags mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, force=FORCEREBUILD, templatename=templatename)
150f9fc415d529faf327290ae61f0a86035b25ed /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/150f9fc415d529faf327290ae61f0a86035b25ed/genpluginprojects.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4094, 4406, 12, 991, 18123, 16, 1605, 16, 1984, 33, 7036, 16, 1984, 1214, 33, 7036, 16, 5550, 22850, 6487, 1084, 8291, 22850, 6487, 14732, 22850, 6487, 7582, 361, 10539, 22850, 6487,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 4094, 4406, 12, 991, 18123, 16, 1605, 16, 1984, 33, 7036, 16, 1984, 1214, 33, 7036, 16, 5550, 22850, 6487, 1084, 8291, 22850, 6487, 14732, 22850, 6487, 7582, 361, 10539, 22850, 6487,...
m = re.match("\s*(%s)\s+(.*)" % NAME_RE, arg)
m = re.match("(?s)\s*(%s)\s+(.*)\Z" % NAME_RE, arg)
def emitRepeat(self, arg): m = re.match("\s*(%s)\s+(.*)" % NAME_RE, arg) if not m: raise TALError("invalid repeat syntax: " + `repeat`) name, expr = m.group(1, 2) cexpr = self.compileExpression(expr) program = self.popProgram() self.emit("loop", name, cexpr, program)
32ec6e8b6ad0137829e1048e4eb5bd754c010480 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/32ec6e8b6ad0137829e1048e4eb5bd754c010480/TALGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 16750, 12, 2890, 16, 1501, 4672, 312, 273, 283, 18, 1916, 2932, 3680, 87, 5153, 87, 14, 9275, 87, 5153, 87, 15, 27816, 62, 6, 738, 6048, 67, 862, 16, 1501, 13, 309, 486, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3626, 16750, 12, 2890, 16, 1501, 4672, 312, 273, 283, 18, 1916, 2932, 3680, 87, 5153, 87, 14, 9275, 87, 5153, 87, 15, 27816, 62, 6, 738, 6048, 67, 862, 16, 1501, 13, 309, 486, 312, ...
lb_added.artist.set(metadata.authors[0])
def _update_iTunes_metadata(self, metadata, db_added, lb_added, this_book): ''' ''' if DEBUG: self.log.info(" ITUNES._update_iTunes_metadata()")
4751389672c39516c9628cc4280a92d690e8552b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/4751389672c39516c9628cc4280a92d690e8552b/driver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2725, 67, 77, 56, 27490, 67, 4165, 12, 2890, 16, 1982, 16, 1319, 67, 9665, 16, 7831, 67, 9665, 16, 333, 67, 3618, 4672, 9163, 9163, 309, 6369, 30, 365, 18, 1330, 18, 1376, 2932,...
flags = []
flags = 0
sage: 'divisors' in _search_src_or_doc('src', '^ *def prime', interact=False)
2d8dd972b7654687a2e8843501b1e511c530c8b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/2d8dd972b7654687a2e8843501b1e511c530c8b7/sagedoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 296, 2892, 291, 1383, 11, 316, 389, 3072, 67, 4816, 67, 280, 67, 2434, 2668, 4816, 2187, 10731, 380, 536, 17014, 2187, 16592, 33, 8381, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 296, 2892, 291, 1383, 11, 316, 389, 3072, 67, 4816, 67, 280, 67, 2434, 2668, 4816, 2187, 10731, 380, 536, 17014, 2187, 16592, 33, 8381, 13, 2, -100, -100, -100, -100, -100, -10...
while GetFv():
while self.__GetFv():
def ParseFile(self):
2f743f829e2c9e634d3e62f83c6af106a22f6583 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/2f743f829e2c9e634d3e62f83c6af106a22f6583/FdfParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2884, 812, 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, ...
[ 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, 2884, 812, 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, -1...
pat = re.compile( "^(.+?):(\d+): DeprecationWarning: classic ([a-z]+) division$")
prog = re.compile(PATTERN)
def readwarnings(warningsfile): pat = re.compile( "^(.+?):(\d+): DeprecationWarning: classic ([a-z]+) division$") try: f = open(warningsfile) except IOError, msg: sys.stderr.write("can't open: %s\n" % msg) return warnings = {} while 1: line = f.readline() if not line: break m = pat.match(line) if not m: if line.find("division") >= 0: sys.stderr.write("Warning: ignored input " + line) continue file, lineno, what = m.groups() list = warnings.get(file) if list is None: warnings[file] = list = [] list.append((int(lineno), intern(what))) f.close() files = warnings.keys() files.sort() for file in files: process(file, warnings[file])
1411e89cd48fda4dab58a672e67677772c9670ec /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1411e89cd48fda4dab58a672e67677772c9670ec/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12103, 12, 12103, 768, 4672, 11243, 273, 283, 18, 11100, 12, 10831, 13, 775, 30, 284, 273, 1696, 12, 12103, 768, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 2932, 416...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12103, 12, 12103, 768, 4672, 11243, 273, 283, 18, 11100, 12, 10831, 13, 775, 30, 284, 273, 1696, 12, 12103, 768, 13, 1335, 8340, 16, 1234, 30, 2589, 18, 11241, 18, 2626, 2932, 416...
return super(Wiki, self).copy_data(cr, uid, id, {'wiki_id': False}, context)
return super(wiki_wiki2, self).copy_data(cr, uid, id, {'wiki_id': False}, context)
def copy_data(self, cr, uid, id, default=None, context=None):
e7837995a5fa985e5381ef0804ed93e6255c2235 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e7837995a5fa985e5381ef0804ed93e6255c2235/wiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 612, 16, 805, 33, 7036, 16, 819, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self._port_handle.Write(data)
try: self._port_handle.Write(data) except System.TimeoutException, e: raise writeTimeoutError
def write(self, data): """Output the given string over the serial port.""" if not self._port_handle: raise portNotOpenError if not isinstance(data, str): raise TypeError('expected str, got %s' % type(data)) self._port_handle.Write(data)
d40fa4acd709af2126b92f5562e2ffdd28a1926e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10955/d40fa4acd709af2126b92f5562e2ffdd28a1926e/serialcli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 501, 4672, 3536, 1447, 326, 864, 533, 1879, 326, 2734, 1756, 12123, 309, 486, 365, 6315, 655, 67, 4110, 30, 1002, 1756, 1248, 3678, 668, 309, 486, 1549, 12, 892, 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, 1045, 12, 2890, 16, 501, 4672, 3536, 1447, 326, 864, 533, 1879, 326, 2734, 1756, 12123, 309, 486, 365, 6315, 655, 67, 4110, 30, 1002, 1756, 1248, 3678, 668, 309, 486, 1549, 12, 892, 16...
f = theano.function([a,b],updates={s:s-lr1*(s*.0002+T.dot(a,b))}).maker.env.toposort()
f = theano.function([a,b],updates={s:s-lr1*(s*.0002+T.dot(a,b))},mode=mode_not_fast_compile).maker.env.toposort()
def test_factorised_scalar(self): a=T.matrix() b=T.matrix() c=T.matrix() s=theano.shared(numpy.zeros((5,5)))
aebaa276afd1df4e8c4e992e3e5f93aea43b9040 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/aebaa276afd1df4e8c4e992e3e5f93aea43b9040/test_blas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6812, 5918, 67, 8748, 12, 2890, 4672, 279, 33, 56, 18, 5667, 1435, 324, 33, 56, 18, 5667, 1435, 276, 33, 56, 18, 5667, 1435, 272, 33, 5787, 31922, 18, 11574, 12, 15974, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6812, 5918, 67, 8748, 12, 2890, 4672, 279, 33, 56, 18, 5667, 1435, 324, 33, 56, 18, 5667, 1435, 276, 33, 56, 18, 5667, 1435, 272, 33, 5787, 31922, 18, 11574, 12, 15974, 18,...
nuninst[arch] = packages.split()
nuninst[arch] = set(packages.split())
def read_nuninst(self): """Read the non-installable report""" f = open(self.options.noninst_status) nuninst = {} for r in f: if ":" not in r: continue arch, packages = r.strip().split(":", 1) if arch.split("+", 1)[0] in self.options.architectures: nuninst[arch] = packages.split() return nuninst
469d67fca2e47a8c81512c4f86db64b0f50e5032 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2784/469d67fca2e47a8c81512c4f86db64b0f50e5032/britney.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 82, 318, 8591, 12, 2890, 4672, 3536, 1994, 326, 1661, 17, 5425, 429, 2605, 8395, 284, 273, 1696, 12, 2890, 18, 2116, 18, 5836, 8591, 67, 2327, 13, 290, 318, 8591, 273, 2618, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 82, 318, 8591, 12, 2890, 4672, 3536, 1994, 326, 1661, 17, 5425, 429, 2605, 8395, 284, 273, 1696, 12, 2890, 18, 2116, 18, 5836, 8591, 67, 2327, 13, 290, 318, 8591, 273, 2618, ...
err = hr
err = exc.winerror
def HandleCommandLine(cls, serviceClassString = None, argv = None, customInstallOptions = "", customOptionHandler = None): """Utility function allowing services to process the command line. Allows standard commands such as 'start', 'stop', 'debug', 'install' etc. Install supports 'standard' command line options prefixed with '--', such as --username, --password, etc. In addition, the function allows custom command line options to be handled by the calling function. """ err = 0 if argv is None: argv = sys.argv if len(argv)<=1: usage() serviceName = cls._svc_name_ serviceDisplayName = cls._svc_display_name_ if serviceClassString is None: serviceClassString = GetServiceClassString(cls) # Pull apart the command line import getopt try: opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll=", "interactive", "wait="]) except getopt.error, details: print details usage() userName = None password = None perfMonIni = perfMonDll = None startup = None interactive = None waitSecs = 0 for opt, val in opts: if opt=='--username': userName = val elif opt=='--password': password = val elif opt=='--perfmonini': perfMonIni = val elif opt=='--perfmondll': perfMonDll = val elif opt=='--interactive': interactive = 1 elif opt=='--startup': map = {"manual": win32service.SERVICE_DEMAND_START, "auto" : win32service.SERVICE_AUTO_START, "disabled": win32service.SERVICE_DISABLED} try: startup = map[string.lower(val)] except KeyError: print "'%s' is not a valid startup option" % val elif opt=='--wait': try: waitSecs = int(val) except ValueError: print "--wait must specify an integer number of seconds." usage() arg=args[0] knownArg = 0 # First we process all arguments which pass additional args on if arg=="start": knownArg = 1 print "Starting service %s" % (serviceName) try: StartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) except win32service.error, exc: print "Error starting service: %s" % exc.strerror elif arg=="restart": knownArg = 1 print "Restarting service %s" % (serviceName) RestartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) elif arg=="debug": knownArg = 1 if not hasattr(sys, "frozen"): # non-frozen services use pythonservice.exe which handles a # -debug option svcArgs = string.join(args[1:]) try: exeName = LocateSpecificServiceExe(serviceName) except win32api.error, exc: if exc[0] == winerror.ERROR_FILE_NOT_FOUND: print "The service does not appear to be installed." print "Please install the service before debugging it." sys.exit(1) raise try: os.system("%s -debug %s %s" % (exeName, serviceName, svcArgs)) # ^C is used to kill the debug service. Sometimes Python also gets # interrupted - ignore it... except KeyboardInterrupt: pass else: # py2exe services don't use pythonservice - so we simulate # debugging here. DebugService(cls, args) if not knownArg and len(args)!=1: usage() # the rest of the cmds don't take addn args if arg=="install": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description = cls._svc_description_ except AttributeError: description = None print "Installing service %s" % (serviceName,) # Note that we install the service before calling the custom option # handler, so if the custom handler fails, we have an installed service (from NT's POV) # but is unlikely to work, as the Python code controlling it failed. Therefore # we remove the service if the first bit works, but the second doesnt! try: InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service installed" except win32service.error, exc: if exc.winerror==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: print "Error installing service: %s (%d)" % (exc.strerror, exc.winerror) err = hr except ValueError, msg: # Can be raised by custom option handler. print "Error installing service: %s" % str(msg) err = -1 # xxx - maybe I should remove after _any_ failed install - however, # xxx - it may be useful to help debug to leave the service as it failed. # xxx - We really _must_ remove as per the comments above... # As we failed here, remove the service, so the next installation # attempt works. try: RemoveService(serviceName) except win32api.error: print "Warning - could not remove the partially installed service." if arg == "update": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description=cls._svc_description_ except AttributeError: description=None print "Changing service configuration" try: ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service updated" except win32service.error, exc: print "Error changing service configuration: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="remove": knownArg = 1 print "Removing service %s" % (serviceName) try: RemoveService(serviceName) print "Service removed" except win32service.error, exc: print "Error removing service: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="stop": knownArg = 1 print "Stopping service %s" % (serviceName) try: if waitSecs: StopServiceWithDeps(serviceName, waitSecs = waitSecs) else: StopService(serviceName) except win32service.error, exc: print "Error stopping service: %s (%d)" % (exc.strerror,exc.winerror) err = hr if not knownArg: err = -1 print "Unknown command - '%s'" % arg usage() return err
fbd8d4fd61408af6605030a3bee01f3edf61da43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/fbd8d4fd61408af6605030a3bee01f3edf61da43/win32serviceutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 21391, 12, 6429, 16, 1156, 797, 780, 273, 599, 16, 5261, 273, 599, 16, 1679, 6410, 1320, 273, 23453, 1679, 1895, 1503, 273, 599, 4672, 3536, 6497, 445, 15632, 4028, 358, 1207, 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, 5004, 21391, 12, 6429, 16, 1156, 797, 780, 273, 599, 16, 5261, 273, 599, 16, 1679, 6410, 1320, 273, 23453, 1679, 1895, 1503, 273, 599, 4672, 3536, 6497, 445, 15632, 4028, 358, 1207, 326,...
for r in self.read(cr,uid,ids,['invoice_ids']):
for r in self.read(cr, uid, ids, ['invoice_ids']):
def action_cancel(self, cr, uid, ids, context={}): ok = True sale_order_line_obj = self.pool.get('sale.order.line') for sale in self.browse(cr, uid, ids): for pick in sale.picking_ids: if pick.state not in ('draft','cancel'): raise osv.except_osv( _('Could not cancel sale order !'), _('You must first cancel all packing attached to this sale order.')) for r in self.read(cr,uid,ids,['picking_ids']): for pick in r['picking_ids']: wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'stock.picking', pick, 'button_cancel', cr) for inv in sale.invoice_ids: if inv.state not in ('draft','cancel'): raise osv.except_osv( _('Could not cancel this sale order !'), _('You must first cancel all invoices attached to this sale order.')) for r in self.read(cr,uid,ids,['invoice_ids']): for inv in r['invoice_ids']: wf_service = netsvc.LocalService("workflow") wf_service.trg_validate(uid, 'account.invoice', inv, 'invoice_cancel', cr) sale_order_line_obj.write(cr, uid, [l.id for l in sale.order_line], {'state': 'cancel'}) self.write(cr,uid,ids,{'state':'cancel'}) return True
fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/fa29dc7d9e6d87f49bc3316e2b56fa977448ad6c/sale.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1529, 273, 1053, 272, 5349, 67, 1019, 67, 1369, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 87, 5349, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 10996, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 12938, 4672, 1529, 273, 1053, 272, 5349, 67, 1019, 67, 1369, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 87, 5349, ...
spec.FromTypelib(tlb, typelibCLSID)
spec.FromTypelib(tlb, str(typelibCLSID))
def GenerateFromTypeLibSpec(typelibInfo, file = None, verboseLevel = None, progressInstance = None, bUnicodeToString=1, bQuiet = None, bGUIProgress = None ): if bQuiet is not None or bGUIProgress is not None: print "Please dont use the bQuiet or bGUIProgress params" print "use the 'verboseLevel', and 'progressClass' params" if verboseLevel is None: verboseLevel = 0 # By default, we use a gui, and no verbose level! if type(typelibInfo)==type(()): # Tuple typelibCLSID, lcid, major, minor = typelibInfo tlb = pythoncom.LoadRegTypeLib(typelibCLSID, major, minor, lcid) spec = selecttlb.TypelibSpec(typelibCLSID, lcid, major, minor) spec.FromTypelib(tlb, typelibCLSID) typelibs = [(tlb, spec)] elif type(typelibInfo)==types.InstanceType: tlb = pythoncom.LoadRegTypeLib(typelibInfo.clsid, typelibInfo.major, typelibInfo.minor, typelibInfo.lcid) typelibs = [(tlb, typelibInfo)] else: typelibs = GetTypeLibsForSpec(typelibInfo) if progressInstance is None: progressInstance = GUIProgress(verboseLevel) progress = progressInstance bToGenDir = (file is None) for typelib, info in typelibs: if file is None: outputName = gencache.GetGeneratedFileName(info.clsid, info.lcid, info.major, info.minor) outputName = os.path.join(gencache.GetGeneratePath(), outputName) + ".py" progress.LogBeginGenerate(outputName) fileUse = open(outputName, "wt") else: fileUse = file gen = genpy.Generator(typelib, info.dll, progress, bUnicodeToString=bUnicodeToString) gen.generate(fileUse) if file is None: fileUse.close() if bToGenDir: progress.SetDescription("Importing module") gencache.AddModuleToCache(info.clsid, info.lcid, info.major, info.minor) progress.Close()
4c29594950d18e807d9dea82819b2a9e914c1c51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/992/4c29594950d18e807d9dea82819b2a9e914c1c51/makepy.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 1265, 559, 5664, 1990, 12, 12846, 30575, 966, 16, 585, 273, 599, 16, 3988, 2355, 273, 599, 16, 4007, 1442, 273, 599, 16, 324, 16532, 5808, 33, 21, 16, 324, 16457, 273, 599, 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, 6654, 1265, 559, 5664, 1990, 12, 12846, 30575, 966, 16, 585, 273, 599, 16, 3988, 2355, 273, 599, 16, 4007, 1442, 273, 599, 16, 324, 16532, 5808, 33, 21, 16, 324, 16457, 273, 599, 16, ...
if foo==bar: raise TestFailed
if foo==bar: raise TestFailed
def temp(): print 1
033daa49eafae52f0b88085117e1bdf1cff2fe16 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/033daa49eafae52f0b88085117e1bdf1cff2fe16/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1906, 13332, 1172, 404, 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, 1906, 13332, 1172, 404, 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, ...
doc="""The property's MetadataStore type.""")
doc="""The property's MetadataStore type.""")
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType
8f9e8d2e2e54bb6661b3348cad502cc36e858dc4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12127/8f9e8d2e2e54bb6661b3348cad502cc36e858dc4/fu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4165, 2257, 559, 12, 2890, 4672, 468, 9852, 30, 2631, 1898, 756, 468, 6290, 559, 273, 365, 18, 6290, 559, 468, 430, 29877, 18919, 24, 26894, 422, 315, 907, 6877, 468, 202...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4165, 2257, 559, 12, 2890, 4672, 468, 9852, 30, 2631, 1898, 756, 468, 6290, 559, 273, 365, 18, 6290, 559, 468, 430, 29877, 18919, 24, 26894, 422, 315, 907, 6877, 468, 202...
@precondition ttl must be > 0 and <= MAXUINT8.: (ttl > 0) and (ttl <= MAXUINT8): "ttl: %s" % str(ttl)
Precondition: ttl must be > 0 and <= MAXUINT8.: (ttl > 0) and (ttl <= MAXUINT8): "ttl: %s" % str(ttl)
def sendPing(self, ttl): """ @precondition ttl must be > 0 and <= MAXUINT8.: (ttl > 0) and (ttl <= MAXUINT8): "ttl: %s" % str(ttl) """ assert (ttl > 0) and (ttl <= MAXUINT8), "ttl must be > 0 and <= MAXUINT8." + " -- " + "ttl: %s" % str(ttl) log.msg("%s.sendPing(%s)" % (str(self), str(ttl),)) self.sendDescriptor(self._nextDescriptorId(), PINGPD, ttl, "")
839a8f2cc7db04e43b435c51dd43208f74b68ce6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/839a8f2cc7db04e43b435c51dd43208f74b68ce6/gnutella.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 17223, 12, 2890, 16, 6337, 4672, 3536, 2962, 4175, 30, 6337, 1297, 506, 405, 374, 471, 1648, 4552, 57, 3217, 28, 29710, 261, 12546, 405, 374, 13, 471, 261, 12546, 1648, 4552, 57, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 17223, 12, 2890, 16, 6337, 4672, 3536, 2962, 4175, 30, 6337, 1297, 506, 405, 374, 471, 1648, 4552, 57, 3217, 28, 29710, 261, 12546, 405, 374, 13, 471, 261, 12546, 1648, 4552, 57, ...
if pat.match(lines[i]): return lines, i
match = pat.match(lines[i]) if match: if lines[i][0] == 'c': return lines, i candidates.append((match.group(1), i)) if candidates: candidates.sort() return lines, candidates[0][1]
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.""" file = getsourcefile(object) or getfile(object) module = getmodule(object, file) if module: lines = linecache.getlines(file, module.__dict__) else: lines = linecache.getlines(file) if not lines: raise IOError('could not get source code') 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)|(.*(?<!\w)lambda(:|\s))|^(\s*@)') while lnum > 0: if pat.match(lines[lnum]): break lnum = lnum - 1 return lines, lnum raise IOError('could not find code object')
bec9f6027f5924ff1411304496084e6797e53c8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bec9f6027f5924ff1411304496084e6797e53c8f/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, ...
self.image.signalDeviceModel('pci-ins', 'pci-inserted', bdf_str)
self.image.signalDeviceModel('pci-ins', 'pci-inserted', bdf_str) vslot = xstransact.Read("/local/domain/0/device-model/%i/parameter" % self.getDomid()) else: vslot = new_dev['vslot'] return vslot
def hvm_pci_device_create(self, dev_config): log.debug("XendDomainInfo.hvm_pci_device_create: %s" % scrub_password(dev_config))
30339f2af4dc617af3b9c770bbab984f3bb4fb6b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6195/30339f2af4dc617af3b9c770bbab984f3bb4fb6b/XendDomainInfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 3489, 67, 2436, 77, 67, 5964, 67, 2640, 12, 2890, 16, 4461, 67, 1425, 4672, 613, 18, 4148, 2932, 60, 409, 3748, 966, 18, 76, 3489, 67, 2436, 77, 67, 5964, 67, 2640, 30, 738, 8...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 366, 3489, 67, 2436, 77, 67, 5964, 67, 2640, 12, 2890, 16, 4461, 67, 1425, 4672, 613, 18, 4148, 2932, 60, 409, 3748, 966, 18, 76, 3489, 67, 2436, 77, 67, 5964, 67, 2640, 30, 738, 8...
"""Returns local for passed user and content object.
"""Returns local roles for passed user and content object.
def get_local_roles(obj, principal): """Returns local for passed user and content object. """ ctype = ContentType.objects.get_for_model(obj) if isinstance(principal, User): return [prr.role for prr in PrincipalRoleRelation.objects.filter( user=principal, content_id=obj.id, content_type=ctype)] else: return [prr.role for prr in PrincipalRoleRelation.objects.filter( group=principal, content_id=obj.id, content_type=ctype)]
660968fa5963812f729deb2499435b216dd54d6d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9984/660968fa5963812f729deb2499435b216dd54d6d/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3729, 67, 7774, 12, 2603, 16, 8897, 4672, 3536, 1356, 1191, 4900, 364, 2275, 729, 471, 913, 733, 18, 3536, 11920, 273, 11691, 18, 6911, 18, 588, 67, 1884, 67, 2284, 12, 2603, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3729, 67, 7774, 12, 2603, 16, 8897, 4672, 3536, 1356, 1191, 4900, 364, 2275, 729, 471, 913, 733, 18, 3536, 11920, 273, 11691, 18, 6911, 18, 588, 67, 1884, 67, 2284, 12, 2603, ...
DEFAULTDB = os.path.expanduser(options.hammiefilter_persistent_storage_file)
DEFAULTDB = os.path.expanduser(options["Storage", "persistent_storage_file"])
def bool(val): return not not val
fbd4792d308ae3f223ab1c4b876d8cf7c84fc2bf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6126/fbd4792d308ae3f223ab1c4b876d8cf7c84fc2bf/hammiebulk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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, 1426, 12, 1125, 4672, 327, 486, 486, 1244, 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...
def set_context(self, objects, data, ids, report_type = None): super(pos_invoice, self).set_context(objects, data, ids, report_type)
def preprocess(self, objects, data, ids): super(pos_invoice, self).preprocess(objects, data, ids)
def __init__(self, cr, uid, name, context): super(pos_invoice, self).__init__(cr, uid, name, context) self.localcontext.update({ 'time': time, })
ce3a161ec0f11ec9579ff83c9c18377ae00e0d4c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/ce3a161ec0f11ec9579ff83c9c18377ae00e0d4c/pos_invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 819, 4672, 2240, 12, 917, 67, 16119, 16, 365, 2934, 972, 2738, 972, 12, 3353, 16, 4555, 16, 508, 16, 819, 13, 365, 18, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4422, 16, 4555, 16, 508, 16, 819, 4672, 2240, 12, 917, 67, 16119, 16, 365, 2934, 972, 2738, 972, 12, 3353, 16, 4555, 16, 508, 16, 819, 13, 365, 18, 3...
source = ""
def main(): """Main function """ read_options(sys.argv[1:]) # Ontology check if _OPTIONS["check_ontology"]: print >> sys.stdout, ("Checking ontology file %s" % _OPTIONS["ontology_file"]) # End of ontology check. # Initialize cache get_regular_expressions(_OPTIONS["ontology_file"], _OPTIONS["rebuild_cache"], _OPTIONS["no_cache"]) for entry in _OPTIONS["text_files"]: text_lines = None source = "" if os.path.isdir(entry): for filename in os.listdir(entry): if (os.path.isfile(entry + filename) and is_pdf(entry + filename)): source = filename text_lines = text_lines_from_local_file(entry + filename) elif os.path.isfile(entry): text_lines = text_lines_from_local_file(entry) source = os.path.basename(entry) else: # Treat as a URL. text_lines = text_lines_from_url(entry) source = entry.split("/")[-1] if text_lines is not None: print >> sys.stdout, source print >> sys.stdout, get_keywords_from_text(text_lines, output_mode=_OPTIONS["output_mode"], output_limit=_OPTIONS["output_limit"], spires=_OPTIONS["spires"], match_mode=_OPTIONS["match_mode"], with_explicit=_OPTIONS["with_explicit"])
b7a42590308deb38aca52c76bec6ae7be3ae88f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2594/b7a42590308deb38aca52c76bec6ae7be3ae88f5/bibclassify_cli.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 3536, 6376, 445, 3536, 855, 67, 2116, 12, 9499, 18, 19485, 63, 21, 30, 5717, 225, 468, 29683, 866, 309, 389, 12422, 9614, 1893, 67, 1580, 4676, 11929, 30, 1172, 1671, 2589, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6376, 445, 3536, 855, 67, 2116, 12, 9499, 18, 19485, 63, 21, 30, 5717, 225, 468, 29683, 866, 309, 389, 12422, 9614, 1893, 67, 1580, 4676, 11929, 30, 1172, 1671, 2589, ...
user = _validate_and_get_geniuser(request)
try: user = _validate_and_get_geniuser(request) except LoggedInButFailedGetGeniUserError: return _show_failed_get_geniuser_page(request)
def get_resources(request): user = _validate_and_get_geniuser(request) # the request must be via POST. if not, bounce user back to My Vessels page if not request.method == 'POST': return myvessels(request) # try and grab form from POST. if it can't, bounce user back to My Vessels page get_form = forms.gen_get_form(user, request.POST) if get_form is None: return myvessels(request) action_summary = "" action_detail = "" if get_form.is_valid(): vessel_num = get_form.cleaned_data['num'] vessel_type = get_form.cleaned_data['env'] try: acquired_vessels = interface.acquire_vessels(user, vessel_num, vessel_type) except UnableToAcquireResourcesError, err: action_summary = "Couldn't acquire resources at this time." action_detail += str(err) except InsufficientUserResourcesError: action_summary = "You do not have enough vessel credits to fufill this request." # return a My Vessels page with the updated vessels/vessel acquire details/errors return myvessels(request, get_form, action_summary=action_summary, action_detail=action_detail)
f4fae4ee5e41faa500fcd1401c1644e384f32b77 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/f4fae4ee5e41faa500fcd1401c1644e384f32b77/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4683, 12, 2293, 4672, 775, 30, 729, 273, 389, 5662, 67, 464, 67, 588, 67, 4507, 77, 1355, 12, 2293, 13, 1335, 1827, 2423, 382, 31167, 2925, 967, 7642, 77, 1299, 668, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4683, 12, 2293, 4672, 775, 30, 729, 273, 389, 5662, 67, 464, 67, 588, 67, 4507, 77, 1355, 12, 2293, 13, 1335, 1827, 2423, 382, 31167, 2925, 967, 7642, 77, 1299, 668, 30, 327...
charser = charset.strip()
charset = charset.strip()
def next_entry(self): # Load the next line line_type, value = self.next_line()
09505fab670af27b92eed82cb315604399573c1f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12681/09505fab670af27b92eed82cb315604399573c1f/PO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 4099, 12, 2890, 4672, 468, 4444, 326, 1024, 980, 980, 67, 723, 16, 460, 273, 365, 18, 4285, 67, 1369, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 67, 4099, 12, 2890, 4672, 468, 4444, 326, 1024, 980, 980, 67, 723, 16, 460, 273, 365, 18, 4285, 67, 1369, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
cty.c_int, [cty.POINTER(FL_IMAGE), cty.c_uint, cty.c_uint],
cty.c_int, [cty.POINTER(FL_IMAGE), cty.c_uint, cty.c_uint],
def flimage_crop(pImage, p2, p3, p4, p5): """ flimage_crop(pImage, p2, p3, p4, p5) -> num. """ retval = _flimage_crop(pImage, p2, p3, p4, p5) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 13758, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 2730, 67, 13758, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 16, 293, 24, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 2730, 67, 13758, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 16, 293, 24, 16, 293, 25, 4672, 3536, 1183, 2730, 67, 13758, 12, 84, 2040, 16, 293, 22, 16, 293, 23, 16, 293, 24, 1...
(options.rignum.get(),options.CatPort.get(),nHz)
(options.rignum.get(),options.CatPort.get(),nHzLO)
def update(): global root_geom,isec0,im,pim,ndbm0,nsec0,a,ftx0,nin0,nout0, \ receiving,transmitting,newdat,nscroll,newspec,scale0,offset0, \ modpixmap0,tw,s0,c0,fmid,fmid0,loopall,ntr0,txmsg,iband0, \ bandmap,bm,t0,nreject,gain,phdeg tsec=time.time() utc=time.gmtime(tsec) nsec=int(tsec) nsec0=nsec ns120=nsec % 120 try: f0.set(float(sf0.get())) ftx.set(float(sftx.get())) except: pass isec=utc[5] twait=120.0 - (tsec % 120.0) if iband.get()!=iband0 or advanced.fset.get(): advanced.fset.set(0) f0.set(freq0[iband.get()]) t="%.6f" % (f0.get(),) sf0.set(t) ftx.set(freqtx[iband.get()]) t="%.6f" % (ftx.get(),) sftx.set(t) if options.cat_enable.get(): if advanced.encal.get(): nHz=int(advanced.Acal.get() + \ f0.get()*(1000000.0 + advanced.Bcal.get()) + 0.5) else: nHz=int(1000000.0*f0.get() + 0.5) if options.rignum.get()==901: nHzLO=4*(nHz - iq.fiq.get()) cmd="CMDSR -f %d" % (nHzLO,) elif options.rignum.get()==2509: cmd="rigctl -m %d -r %s F %d" % \ (options.rignum.get(),options.CatPort.get(),nHz) else: cmd="rigctl -m %d -r %s -s %d -C data_bits=%s -C stop_bits=%s -C serial_handshake=%s F %d" % \ (options.rignum.get(),options.CatPort.get(), \ options.serial_rate.get(),options.databits.get(), \ options.stopbits.get(),options.serial_handshake.get(), nHz) ierr=os.system(cmd) if ierr==0: bandmap=[] bm={} text1.configure(state=NORMAL) text1.delete('1.0',END) text1.configure(state=DISABLED) iband0=iband.get() else: print 'Error attempting to set rig frequency.\a' print cmd + '\a' iband.set(iband0) f0.set(freq0[iband.get()]) t="%.6f" % (f0.get(),) sf0.set(t) ftx.set(freqtx[iband.get()]) t="%.6f" % (ftx.get(),) sftx.set(t) else: iband0=iband.get() freq0[iband.get()]=f0.get() freqtx[iband.get()]=ftx.get() if isec != isec0: #Do once per second isec0=isec t=time.strftime('%Y %b %d\n%H:%M:%S',utc) ldate.configure(text=t) root_geom=root.geometry() utchours=utc[3]+utc[4]/60.0 + utc[5]/3600.0 try: if options.dBm.get()!=ndbm0: ndbm0=options.dBm.get() options.dbm_balloon() except: pass put_params() nndf=int(1000000.0*(ftx.get()-f0.get()) + 0.5) - 1500 ndb=int(w.acom1.xdb1-41.0) if ndb<-30: ndb=-30 if iq.iqmode.get(): ndb2=int(w.acom1.xdb2-41.0) if ndb2<-30: ndb2=-30 t='Rx Noise: %3d %3d dB' % (ndb,ndb2) else: t='Rx Noise: %3d dB' % (ndb,) bg='gray85' r=SUNKEN if w.acom1.receiving: if ndb>10 and ndb<=20: bg='yellow' elif ndb<-20 or ndb>20: bg='red' else: t='' r=FLAT msg1.configure(text=t,bg=bg,relief=r) gain=w.acom1.gain phdeg=57.2957795*w.acom1.phase nreject=int(w.acom1.reject) t='Bal: %6.4f Pha: %6.1f >%3d dB' % (gain,phdeg,nreject) iq.lab1.configure(text=t)
f41fef5858a544f41bea63d63493074842638a35 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2394/f41fef5858a544f41bea63d63493074842638a35/wspr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 381, 16, 84, 381, 16, 82, 1966, 81, 20, 16, 82, 3321, 20, 16, 69, 16, 74, 978, 20, 16, 82, 267, 20, 16, 82, 659, 20, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 13332, 2552, 1365, 67, 10049, 16, 291, 557, 20, 16, 381, 16, 84, 381, 16, 82, 1966, 81, 20, 16, 82, 3321, 20, 16, 69, 16, 74, 978, 20, 16, 82, 267, 20, 16, 82, 659, 20, 1...
self.assertEqual(p.stdout.read(),
self.assertEqual(p.communicate()[0],
def test_comma_separated_warnings(self): newenv = os.environ.copy() newenv["PYTHONWARNINGS"] = ("ignore::DeprecationWarning," "ignore::UnicodeWarning") p = subprocess.Popen([sys.executable, "-c", "import sys; sys.stdout.write(str(sys.warnoptions))"], stdout=subprocess.PIPE, env=newenv) self.assertEqual(p.stdout.read(), "['ignore::DeprecationWarning', 'ignore::UnicodeWarning']")
cdd98fb4634f6d3fc0815bfe490e1076e8b6ee9e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/cdd98fb4634f6d3fc0815bfe490e1076e8b6ee9e/test_warnings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25034, 67, 24622, 67, 12103, 12, 2890, 4672, 394, 3074, 273, 1140, 18, 28684, 18, 3530, 1435, 394, 3074, 9614, 16235, 20131, 9511, 55, 11929, 273, 7566, 6185, 2866, 758, 13643, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 25034, 67, 24622, 67, 12103, 12, 2890, 4672, 394, 3074, 273, 1140, 18, 28684, 18, 3530, 1435, 394, 3074, 9614, 16235, 20131, 9511, 55, 11929, 273, 7566, 6185, 2866, 758, 13643, ...
if isinstance(domain[i], list):
arg = domain[i] if isinstance(arg, tuple) or \ (isinstance(arg, list) and len(arg) > 2 and \ arg[1] in OPERATORS): if arg[0] == 'active': active_found = True elif isinstance(arg, list):
def process(domain): i = 0 active_found = False while i < len(domain): if isinstance(domain[i], list): domain[i] = process(domain[i]) if isinstance(domain[i], tuple): if domain[i][0] == 'active': active_found = True i += 1 if not active_found: if domain and ((isinstance(domain[0], basestring) \ and domain[0] == 'AND') \ or (not isinstance(domain[0], basestring))): domain.append(('active', '=', 1)) else: domain = ['AND', domain, ('active', '=', 1)] return domain
2f637ec05c781e19ccac485cd1c3948943d76c7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9266/2f637ec05c781e19ccac485cd1c3948943d76c7c/modelstorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 4308, 4672, 277, 273, 374, 2695, 67, 7015, 273, 1083, 1323, 277, 411, 562, 12, 4308, 4672, 1501, 273, 2461, 63, 77, 65, 225, 309, 1549, 12, 3175, 16, 3193, 13, 578, 521, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 12, 4308, 4672, 277, 273, 374, 2695, 67, 7015, 273, 1083, 1323, 277, 411, 562, 12, 4308, 4672, 1501, 273, 2461, 63, 77, 65, 225, 309, 1549, 12, 3175, 16, 3193, 13, 578, 521, 26...
def _load_testfile(filename, package, module_relative):
def _load_testfile(filename, package, module_relative, encoding):
def _load_testfile(filename, package, module_relative): if module_relative: package = _normalize_module(package, 3) filename = _module_relative_path(package, filename) if hasattr(package, '__loader__'): if hasattr(package.__loader__, 'get_data'): return package.__loader__.get_data(filename).decode('utf-8'), filename return open(filename, encoding="utf-8").read(), filename
29ab5d113a721bdd86a00f83d3ae239a6bfd2080 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/29ab5d113a721bdd86a00f83d3ae239a6bfd2080/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 16, 2688, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 67, 3813, 768, 12, 3459, 16, 2181, 16, 1605, 67, 11626, 16, 2688, 4672, 309, 1605, 67, 11626, 30, 2181, 273, 389, 12237, 67, 2978, 12, 5610, 16, 890, 13, 1544, 273, 389, 29...
return tex.textTokens(re.sub(r'\$\{\s*(\w+)(?:\.(\w+))?\s*\}', counterValue, format))
t = re.sub(r'\$\{\s*(\w+)(?:\.(\w+))?\s*\}', counterValue, format) t = re.sub(r'\b0[^\d]+', r'', t) return tex.textTokens(t)
def counterValue(m): """ Replace the counter values """ name = m.group(1)
75c4b2444154fa6ddb87bbf859aca7af64567b74 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7864/75c4b2444154fa6ddb87bbf859aca7af64567b74/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3895, 620, 12, 81, 4672, 3536, 6910, 326, 3895, 924, 3536, 508, 273, 312, 18, 1655, 12, 21, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3895, 620, 12, 81, 4672, 3536, 6910, 326, 3895, 924, 3536, 508, 273, 312, 18, 1655, 12, 21, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
run(config, *args, **kwargs) mod_python(run, apache_request)
return run(config, *args, **kwargs) return mod_python(run_mod_python, apache_request)
def run_mod_python(*args, **kwargs): run(config, *args, **kwargs)
56a86f1918f536071b5bab9657a3ad89c7ef4e29 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6188/56a86f1918f536071b5bab9657a3ad89c7ef4e29/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1711, 67, 8103, 30857, 1968, 16, 2826, 4333, 4672, 1086, 12, 1425, 16, 380, 1968, 16, 2826, 4333, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 1711, 67, 8103, 30857, 1968, 16, 2826, 4333, 4672, 1086, 12, 1425, 16, 380, 1968, 16, 2826, 4333, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
re_plugin = re.compile(r'^(\S[^\[]*?\.es[mp]\b)([\s]*)', re.IGNORECASE)
re_plugin = re.compile(r'^(\S.*?\.es[mp]\b)([\s]*)', re.IGNORECASE)
def __setattr__(self, item, value): self.__setitem__(item, value)
0c7708b87116943b23e6bb107953538e831fc31c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2827/0c7708b87116943b23e6bb107953538e831fc31c/mlox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 542, 1747, 972, 12, 2890, 16, 761, 16, 460, 4672, 365, 16186, 542, 1726, 972, 12, 1726, 16, 460, 13, 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, 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, 1001, 542, 1747, 972, 12, 2890, 16, 761, 16, 460, 4672, 365, 16186, 542, 1726, 972, 12, 1726, 16, 460, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
pagelink += "?action=diff&rev2=%i&rev1=%i" % tuple(revisions[-2:])
pagelink += "?action=diff&rev2=%i&rev1=%i" % tuple(revisions[:2])
def _sendNotification(self, comment, emails, email_lang, revisions, trivial): """ Send notification email for a single language. @param comment: editor's comment given when saving the page @param emails: list of email addresses @param email_lang: language of emails @param revisions: revisions of this page @param trivial: the change is marked as trivial @rtype: int @return: sendmail result """ _ = lambda s, formatted=True, r=self.request, l=email_lang: r.getText(s, formatted=formatted, lang=l)
a7899bec4e80d4578f090e29c678a2fd9dbc03c7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/a7899bec4e80d4578f090e29c678a2fd9dbc03c7/PageEditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 4386, 12, 2890, 16, 2879, 16, 14255, 16, 2699, 67, 4936, 16, 18325, 16, 433, 20109, 4672, 3536, 2479, 3851, 2699, 364, 279, 2202, 2653, 18, 632, 891, 2879, 30, 4858, 1807, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4661, 4386, 12, 2890, 16, 2879, 16, 14255, 16, 2699, 67, 4936, 16, 18325, 16, 433, 20109, 4672, 3536, 2479, 3851, 2699, 364, 279, 2202, 2653, 18, 632, 891, 2879, 30, 4858, 1807, 2...
if os.path.exists(self.srcdir):
if os.path.exists(self.get_checkoutdir()):
def checkout(self, buildscript): if os.path.exists(self.srcdir): self._update(buildscript) else: self._checkout(buildscript)
b4bbd2714686ef6f394af020e8eac959d0f5d51f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4596/b4bbd2714686ef6f394af020e8eac959d0f5d51f/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13926, 12, 2890, 16, 1361, 4263, 4672, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 588, 67, 17300, 1214, 1435, 4672, 365, 6315, 2725, 12, 3510, 4263, 13, 469, 30, 365, 6315, 17300, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13926, 12, 2890, 16, 1361, 4263, 4672, 309, 1140, 18, 803, 18, 1808, 12, 2890, 18, 588, 67, 17300, 1214, 1435, 4672, 365, 6315, 2725, 12, 3510, 4263, 13, 469, 30, 365, 6315, 17300, 12,...
self.__PopulateAccountsList(account)
if not self.__PopulateAccountsList(account): wx.CallAfter(self.OnCancel, None)
def compare(x, y): if x[0] == y[0]: return 0
b1d959dcb6ea3064db41fef843c06b239e066a69 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9228/b1d959dcb6ea3064db41fef843c06b239e066a69/AccountPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 12, 92, 16, 677, 4672, 309, 619, 63, 20, 65, 422, 677, 63, 20, 14542, 327, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3400, 12, 92, 16, 677, 4672, 309, 619, 63, 20, 65, 422, 677, 63, 20, 14542, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
def __init__(data = None)
def __init__(data = None):
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 324) else quickfix.StringField.__init__(self, 324, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 890, 3247, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 4672, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 890, 3247, 13, 469, 9549, 904, 18, 780, 974, 16186, 2738, 9...
_engines.append(SearchEngineInfo(u"all", u"Search All", u"", -1))
_engines.append(SearchEngineInfo(u"all", _("Search All"), u"", -1))
def create_engines(): global _engines delete_engines() engines = search_for_search_engines(resources.path("searchengines")) engines_dir = os.path.join(config.get(prefs.SUPPORT_DIRECTORY), "searchengines") engines.update(search_for_search_engines(engines_dir)) if config.get(prefs.THEME_NAME): theme_engines_dir = resources.theme_path(config.get(prefs.THEME_NAME), 'searchengines') engines.update(search_for_search_engines(theme_engines_dir)) for fn in engines.itervalues(): load_search_engine(fn) _engines.append(SearchEngineInfo(u"all", u"Search All", u"", -1)) _engines.sort(lambda a, b: cmp((a.sort_order, a.name, a.title), (b.sort_order, b.name, b.title))) # SEARCH_ORDERING is a comma-separated list of search engine names to # include. An * as the last engine includes the rest of the engines. if config.get(prefs.SEARCH_ORDERING): search_names = config.get(prefs.SEARCH_ORDERING).split(',') new_engines = [] if '*' in search_names and '*' in search_names[:-1]: raise RuntimeError('wildcard search ordering must be at the end') for name in search_names: if name != '*': engine = get_engine_for_name(name) if not engine: warn(__file__, 'Invalid search name: %r' % name) else: new_engines.append(engine) _engines.remove(engine) else: new_engines.extend(_engines) _engines = new_engines
df1ada4342357c1dbdf3a12b77bd02a9e6b9356b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/df1ada4342357c1dbdf3a12b77bd02a9e6b9356b/searchengines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 275, 14660, 13332, 2552, 389, 275, 14660, 1430, 67, 275, 14660, 1435, 20504, 273, 1623, 67, 1884, 67, 3072, 67, 275, 14660, 12, 4683, 18, 803, 2932, 3072, 275, 14660, 6, 3719, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 275, 14660, 13332, 2552, 389, 275, 14660, 1430, 67, 275, 14660, 1435, 20504, 273, 1623, 67, 1884, 67, 3072, 67, 275, 14660, 12, 4683, 18, 803, 2932, 3072, 275, 14660, 6, 3719, ...
fields_names = self._columns.keys() + self._inherit_fields.keys()
fields_names = self._columns.keys() + \ exclude(self._inherit_fields.keys(), self._columns.keys())
def read(self, cursor, user, ids, fields_names=None, context=None, load='_classic_read'): self.pool.get('ir.model.access').check(cursor, user, self._name, 'read') if not fields_names: fields_names = self._columns.keys() + self._inherit_fields.keys() select = ids if isinstance(ids, (int, long)): select = [ids] result = self._read_flat(cursor, user, select, fields_names, context, load) for i in result: for key, j in i.items(): if j == None: i[key] = False if isinstance(ids, (int, long)): return result[0] return result
61f89954c0c5633d5ea8f0f2e6269866bc5cd8bb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/61f89954c0c5633d5ea8f0f2e6269866bc5cd8bb/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1466, 67, 1973, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 365, 18, 6011, 18, 588, 2668, 481, 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, 855, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 1466, 67, 1973, 33, 7036, 16, 819, 33, 7036, 16, 1262, 2218, 67, 1106, 335, 67, 896, 11, 4672, 365, 18, 6011, 18, 588, 2668, 481, 18...
current_clients = [c.current_interaction for c in Client.objects.active(timestamp)]
current_clients = [c.current_interaction for c in Client.objects.active(timestamp)]
def bad_item_index(request, timestamp = 'now', type=TYPE_BAD): timestamp = timestamp.replace("@"," ") if type == TYPE_BAD: mod_or_bad = "bad" else: mod_or_bad = "modified" current_clients = [c.current_interaction for c in Client.objects.active(timestamp)] item_list_dict = {} for x in Entries_interactions.objects.select_related().filter(interaction__in=current_clients, type=type).distinct(): if item_list_dict.get(x.entry.kind, None): item_list_dict[x.entry.kind].append(x) else: item_list_dict[x.entry.kind] = [x] item_list_pseudodict = item_list_dict.items() if timestamp == 'now': timestamp = datetime.now().isoformat('@') return render_to_response('config_items/listing.html', {'item_list_pseudodict':item_list_pseudodict, 'mod_or_bad':mod_or_bad, 'timestamp' : timestamp, 'timestamp_date' : timestamp[:10], 'timestamp_time' : timestamp[11:19]})
926c2d83ef9832a687b9c5276f9c06b453f75a11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11867/926c2d83ef9832a687b9c5276f9c06b453f75a11/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 67, 1726, 67, 1615, 12, 2293, 16, 2858, 273, 296, 3338, 2187, 618, 33, 2399, 67, 16234, 4672, 2858, 273, 2858, 18, 2079, 2932, 36, 15937, 9369, 309, 618, 422, 3463, 67, 16234, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5570, 67, 1726, 67, 1615, 12, 2293, 16, 2858, 273, 296, 3338, 2187, 618, 33, 2399, 67, 16234, 4672, 2858, 273, 2858, 18, 2079, 2932, 36, 15937, 9369, 309, 618, 422, 3463, 67, 16234, 30...
first_data.data = string.lstrip(first_data.data[4:])
first_data.data = first_data.data[4:].lstrip()
def create_module_info(doc, section): # Heavy. node = extract_first_element(section, "modulesynopsis") if node is None: return set_tagName(node, "synopsis") lastchild = node.childNodes[-1] if lastchild.nodeType == TEXT \ and lastchild.data[-1:] == ".": lastchild.data = lastchild.data[:-1] modauthor = extract_first_element(section, "moduleauthor") if modauthor: set_tagName(modauthor, "author") modauthor.appendChild(doc.createTextNode( modauthor.getAttribute("name"))) modauthor.removeAttribute("name") platform = extract_first_element(section, "platform") if section.tagName == "section": modinfo_pos = 2 modinfo = doc.createElement("moduleinfo") moddecl = extract_first_element(section, "declaremodule") name = None if moddecl: modinfo.appendChild(doc.createTextNode("\n ")) name = moddecl.attributes["name"].value namenode = doc.createElement("name") namenode.appendChild(doc.createTextNode(name)) modinfo.appendChild(namenode) type = moddecl.attributes.get("type") if type: type = type.value modinfo.appendChild(doc.createTextNode("\n ")) typenode = doc.createElement("type") typenode.appendChild(doc.createTextNode(type)) modinfo.appendChild(typenode) versionadded = extract_first_element(section, "versionadded") if versionadded: modinfo.setAttribute("added", versionadded.getAttribute("version")) title = get_first_element(section, "title") if title: children = title.childNodes if len(children) >= 2 \ and children[0].nodeName == "module" \ and children[0].childNodes[0].data == name: # this is it; morph the <title> into <short-synopsis> first_data = children[1] if first_data.data[:4] == " ---": first_data.data = string.lstrip(first_data.data[4:]) set_tagName(title, "short-synopsis") if children[-1].nodeType == TEXT \ and children[-1].data[-1:] == ".": children[-1].data = children[-1].data[:-1] section.removeChild(title) section.removeChild(section.childNodes[0]) title.removeChild(children[0]) modinfo_pos = 0 else: ewrite("module name in title doesn't match" " <declaremodule/>; no <short-synopsis/>\n") else: ewrite("Unexpected condition: <section/> without <title/>\n") modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(node) if title and not contents_match(title, node): # The short synopsis is actually different, # and needs to be stored: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(title) if modauthor: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(modauthor) if platform: modinfo.appendChild(doc.createTextNode("\n ")) modinfo.appendChild(platform) modinfo.appendChild(doc.createTextNode("\n ")) section.insertBefore(modinfo, section.childNodes[modinfo_pos]) section.insertBefore(doc.createTextNode("\n "), modinfo) # # The rest of this removes extra newlines from where we cut out # a lot of elements. A lot of code for minimal value, but keeps # keeps the generated *ML from being too funny looking. # section.normalize() children = section.childNodes for i in range(len(children)): node = children[i] if node.nodeName == "moduleinfo": nextnode = children[i+1] if nextnode.nodeType == TEXT: data = nextnode.data if len(string.lstrip(data)) < (len(data) - 4): nextnode.data = "\n\n\n" + string.lstrip(data)
0572f502bec39f741f2ea3d4e8871d02a15520b9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0572f502bec39f741f2ea3d4e8871d02a15520b9/docfixer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2978, 67, 1376, 12, 2434, 16, 2442, 4672, 468, 8264, 23935, 18, 756, 273, 2608, 67, 3645, 67, 2956, 12, 3464, 16, 315, 6400, 878, 29522, 7923, 309, 756, 353, 599, 30, 327, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2978, 67, 1376, 12, 2434, 16, 2442, 4672, 468, 8264, 23935, 18, 756, 273, 2608, 67, 3645, 67, 2956, 12, 3464, 16, 315, 6400, 878, 29522, 7923, 309, 756, 353, 599, 30, 327, 4...
sourceBlocks.append(self.generateSourcePackageCode(parts, packages, boot, globalCodes, format))
sourceBlocks.append(self.generateBootCode(parts, packages, boot, variants={}, settings={}, bootCode=None, globalCodes=globalCodes, format=format))
def runSource(self, parts, packages, boot, variants, classList, libs, classes): if not self._job.get("compile-source/file"): return
3978f530a7d64dbbf06451cc3ce692ba259795e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/3978f530a7d64dbbf06451cc3ce692ba259795e9/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1830, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 16035, 16, 15042, 16, 3318, 4672, 309, 486, 365, 6315, 4688, 18, 588, 2932, 11100, 17, 3168, 19, 768, 6, 4672, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 1830, 12, 2890, 16, 2140, 16, 5907, 16, 4835, 16, 12935, 16, 16035, 16, 15042, 16, 3318, 4672, 309, 486, 365, 6315, 4688, 18, 588, 2932, 11100, 17, 3168, 19, 768, 6, 4672, 327, ...
raise BadValue("accepts only values in %s" % self.list,
raise BadValue("accepts only values in %s" % repr(self.list),
def __call__(self, obj, col, value): if value not in self.list: raise BadValue("accepts only values in %s" % self.list, obj, col, value)
8ef5b579dbbc6a18a7297f8d2a11b9b910e2a631 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8798/8ef5b579dbbc6a18a7297f8d2a11b9b910e2a631/constraints.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1081, 16, 645, 16, 460, 4672, 309, 460, 486, 316, 365, 18, 1098, 30, 1002, 6107, 620, 2932, 9436, 87, 1338, 924, 316, 738, 87, 6, 738, 8480, 12, 2890, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1081, 16, 645, 16, 460, 4672, 309, 460, 486, 316, 365, 18, 1098, 30, 1002, 6107, 620, 2932, 9436, 87, 1338, 924, 316, 738, 87, 6, 738, 8480, 12, 2890, ...
if partition.getFlag(parted.PARTITION_SWAP):
if partition.type == parted.PARTITION_SWAP:
def __init__(self, partition): self.partition = partition self.size = partition.getSize() self.start = partition.geometry.start self.end = partition.geometry.end self.description = "" self.used_space = "" if partition.number != -1: self.name = partition.path if partition.fileSystem is None: # no filesystem, check flags if partition.getFlag(parted.PARTITION_SWAP): self.type = ("Linux swap") elif partition.getFlag(parted.PARTITION_RAID): self.type = ("RAID") elif partition.getFlag(parted.PARTITION_LVM): self.type = ("Linux LVM") elif partition.getFlag(parted.PARTITION_HPSERVICE): self.type = ("HP Service") elif partition.getFlag(parted.PARTITION_PALO): self.type = ("PALO") elif partition.getFlag(parted.PARTITION_PREP): self.type = ("PReP") elif partition.getFlag(parted.PARTITION_MSFT_RESERVED): self.type = ("MSFT Reserved") elif partition.getFlag(parted.PARTITION_EXTENDED): self.type = ("Extended Partition") elif partition.getFlag(parted.PARTITION_LOGICAL): self.type = ("Logical Partition") elif partition.getFlag(parted.PARTITION_FREESPACE): self.type = ("Free Space") else: self.type =("Unknown") else: self.type = partition.fileSystem.type else: self.type = "" self.name = _("unallocated")
c4993745f76e2dbbb7e80145e7a6166e91f08d7e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1953/c4993745f76e2dbbb7e80145e7a6166e91f08d7e/screen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3590, 4672, 365, 18, 10534, 273, 3590, 365, 18, 1467, 273, 3590, 18, 588, 1225, 1435, 365, 18, 1937, 273, 3590, 18, 14330, 18, 1937, 365, 18, 409, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3590, 4672, 365, 18, 10534, 273, 3590, 365, 18, 1467, 273, 3590, 18, 588, 1225, 1435, 365, 18, 1937, 273, 3590, 18, 14330, 18, 1937, 365, 18, 409, 273, ...
e.start_cfg(log_level=settings.logging.pjsip_level if trace_pjsip or trace_pjsip_stdout else 0,
e.start_cfg(enable_sound=not disable_sound, log_level=settings.logging.pjsip_level if trace_pjsip or trace_pjsip_stdout else 0,
def do_invite(account_id, config_file, target_uri, disable_sound, trace_sip, trace_sip_stdout, trace_pjsip, trace_pjsip_stdout, auto_answer, auto_hangup): global user_quit, lock, queue # acquire settings cm = ConfigurationManager() cm.start(ConfigFileBackend(config_file)) settings = SIPSimpleSettings() # select account am = AccountManager() am.start() if account_id is None: account = am.default_account else: try: account = am.get_account(account_id) if not account.enabled: raise KeyError() except KeyError: print "Account not found: %s" % account_id print "Available and enabled accounts: %s" % ", ".join(sorted(account.id for account in am.get_accounts() if account.enabled)) return if account is None: raise RuntimeError("No account configured") for other_account in am.iter_accounts(): if other_account != account: other_account.enabled = False print "Using account %s" % account.id # set up logger if trace_sip is None: trace_sip = settings.logging.trace_sip trace_sip_stdout = False if trace_pjsip is None: trace_pjsip = settings.logging.trace_pjsip trace_pjsip_stdout = False logger = Logger(trace_sip, trace_sip_stdout, trace_pjsip, trace_pjsip_stdout) logger.start() if logger.sip_to_file: print "Logging SIP trace to file '%s'" % logger._siptrace_filename if logger.pjsip_to_file: print "Logging PJSIP trace to file '%s'" % logger._pjsiptrace_filename # set up default ringtones if settings.ringtone.inbound is None: settings.ringtone.inbound = get_default_ringtone_path("ring_inbound.wav") if settings.ringtone.outbound is None: settings.ringtone.outbound = get_default_ringtone_path("ring_outbound.wav") # start engine e = Engine() handler = EventHandler(e) e.start_cfg(log_level=settings.logging.pjsip_level if trace_pjsip or trace_pjsip_stdout else 0, trace_sip=trace_sip or trace_sip_stdout) e.codecs = list(account.audio.codec_list) # start the session manager (for incoming calls) sm = SessionManager() # pre-lookups if isinstance(account, BonjourAccount): # print listening addresses for transport in settings.sip.transports: local_uri = SIPURI(user=account.contact.username, host=account.contact.domain, port=getattr(e, "local_%s_port" % transport), parameters={"transport": transport} if transport != "udp" else None) print 'Listening on "%s"' % local_uri if target_uri is None: routes = None else: # setup routes if not target_uri.startswith("sip:") and not target_uri.startswith("sips:"): target_uri = "sip:%s" % target_uri target_uri = e.parse_sip_uri(target_uri) routes = lookup_routes_for_sip_uri(target_uri, settings.sip.transports) else: # lookup STUN servers, as we don't support doing this asynchronously yet if account.stun_servers: account.stun_servers = tuple((gethostbyname(stun_host), stun_port) for stun_host, stun_port in account.stun_servers) else: account.stun_servers = lookup_service_for_sip_uri(SIPURI(host=account.id.domain), "stun") # setup routes if target_uri is not None: target_uri = e.parse_sip_uri(format_cmdline_uri(target_uri, account.id.domain)) if account.outbound_proxy is None: routes = lookup_routes_for_sip_uri(SIPURI(host=account.id.domain), settings.sip.transports) else: proxy_uri = SIPURI(host=account.outbound_proxy.host, port=account.outbound_proxy.port, parameters={"transport": account.outbound_proxy.transport}) routes = lookup_routes_for_sip_uri(proxy_uri, settings.sip.transports) if routes is not None and len(routes) == 0: raise RuntimeError('No route found to SIP proxy for "%s"' % target_uri) # start thread and process user input start_new_thread(read_queue, (e, settings, am, account, logger, target_uri, routes, auto_answer, auto_hangup)) atexit.register(termios_restore) ctrl_d_pressed = False try: while True: char = getchar() if char == "\x04": if not ctrl_d_pressed: queue.put(("eof", None)) ctrl_d_pressed = True else: queue.put(("user_input", char)) except KeyboardInterrupt: if user_quit: print "Ctrl+C pressed, exiting instantly!" queue.put(("quit", True)) lock.acquire()
92e5f066dbe011018cd8e6f5604abc65236f36e5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/92e5f066dbe011018cd8e6f5604abc65236f36e5/sip_audio_session.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 27154, 12, 4631, 67, 350, 16, 642, 67, 768, 16, 1018, 67, 1650, 16, 4056, 67, 29671, 16, 2606, 67, 28477, 16, 2606, 67, 28477, 67, 10283, 16, 2606, 67, 84, 2924, 625, 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, 741, 67, 27154, 12, 4631, 67, 350, 16, 642, 67, 768, 16, 1018, 67, 1650, 16, 4056, 67, 29671, 16, 2606, 67, 28477, 16, 2606, 67, 28477, 67, 10283, 16, 2606, 67, 84, 2924, 625, 16, ...
scripts = ['webcleaner', 'webcleaner-certificates'],
scripts = scripts,
def create_conf_file (self, data, directory=None): """create local config file from given data (list of lines) in the directory (or current directory if not given) """ data.insert(0, "# this file is automatically created by setup.py") data.insert(0, "# -*- coding: iso-8859-1 -*-") if directory is None: directory = os.getcwd() filename = self.get_conf_filename(directory) # add metadata metanames = ("name", "version", "author", "author_email", "maintainer", "maintainer_email", "url", "license", "description", "long_description", "keywords", "platforms", "fullname", "contact", "contact_email", "fullname") for name in metanames: method = "get_" + name cmd = "%s = %r" % (name, getattr(self.metadata, method)()) data.append(cmd) data.append('appname = "WebCleaner"') data.append("has_crypto = %s" % str(has_crypto)) data.append("has_pil = %s" % str(has_pil)) data.append("has_ssl = %s" % str(has_ssl)) util.execute(write_file, (filename, data), "creating %s" % filename, self.verbose>=1, self.dry_run)
1799c5e967ddd8901b4af589616ffe9f52933134 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/1799c5e967ddd8901b4af589616ffe9f52933134/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3923, 67, 768, 261, 2890, 16, 501, 16, 1867, 33, 7036, 4672, 3536, 2640, 1191, 642, 585, 628, 864, 501, 261, 1098, 434, 2362, 13, 316, 326, 1867, 261, 280, 783, 1867, 309, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 3923, 67, 768, 261, 2890, 16, 501, 16, 1867, 33, 7036, 4672, 3536, 2640, 1191, 642, 585, 628, 864, 501, 261, 1098, 434, 2362, 13, 316, 326, 1867, 261, 280, 783, 1867, 309, 4...
if programming_languages.has_key(code_type): attrs = (('linenumbering', show), ('startinglinenumber', str(start)), ('language', programming_languages[code_type]), ('format', 'linespecific'), ) return self._handleNode("programlisting", on, attributes=attrs) elif code_type is None:
if code_type is None:
def code_area(self, on, code_id, code_type=None, show=0, start=-1, step=-1): # We can discard the code_id, since it's just used for some javascript # magic on the html side of things. We can't use it directly as an ID # anyway since it can start with a number. It's good that we don't need # to. :) if not on: return self._handleNode(None, on)
973ab3cb8fc2e619f5ca2fefd6bad76db43cebbe /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/973ab3cb8fc2e619f5ca2fefd6bad76db43cebbe/text_docbook.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 981, 67, 5036, 12, 2890, 16, 603, 16, 981, 67, 350, 16, 981, 67, 723, 33, 7036, 16, 2405, 33, 20, 16, 787, 29711, 21, 16, 2235, 29711, 21, 4672, 468, 1660, 848, 10388, 326, 981, 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, 981, 67, 5036, 12, 2890, 16, 603, 16, 981, 67, 350, 16, 981, 67, 723, 33, 7036, 16, 2405, 33, 20, 16, 787, 29711, 21, 16, 2235, 29711, 21, 4672, 468, 1660, 848, 10388, 326, 981, 67...
sage: print t3
sage: t3
def tau3(T1, T2, cells_map): """ The definition of tau1 is: tau1 : T1 -> T1 tau1 = beta\^(-1)_3 beta_1 (composing left to right) where beta_i : T2 -> T1 changes just the i-th coordinate of a triple. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: T1 = back_circulant(5) sage: x = isotopism( (0,1,2,3,4) ) sage: y = isotopism(5) # identity sage: z = isotopism(5) # identity sage: T2 = T1.apply_isotopism(x, y, z) sage: print is_bitrade(T1, T2) True sage: (cells_map, t1, t2, t3) = tau123(T1, T2) sage: t3 = tau3(T1, T2, cells_map) sage: print t3 [10, 6, 7, 8, 9, 15, 11, 12, 13, 14, 20, 16, 17, 18, 19, 25, 21, 22, 23, 24, 5, 1, 2, 3, 4] sage: print t3.to_cycles() [(1, 10, 14, 18, 22), (2, 6, 15, 19, 23), (3, 7, 11, 20, 24), (4, 8, 12, 16, 25), (5, 9, 13, 17, 21)] """ # The cells_map has both directions, i.e. integer to # cell and cell to integer, so the size of T1 is # just half of len(cells_map). x = (int(len(cells_map)/2) + 1) * [-1] for r in range(T1.nrows()): for c in range(T1.ncols()): e = T1[r, c] if e < 0: continue (r2, c2, e2) = beta1( (r,c,e), T1, T2) (r3, c3, e3) = beta2( (r2,c2,e2), T2, T1) x[ cells_map[(r,c)] ] = cells_map[ (r3,c3) ] x.pop(0) # remove the head of the list since we # have permutations on 1..(something). return Permutation(x)
79588eb9f6225f31a0fe90ef3cb590193d4561c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/79588eb9f6225f31a0fe90ef3cb590193d4561c1/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 23, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 21, 353, 30, 225, 12284, 21, 294, 399, 21, 317, 399, 21, 12284, 21, 273, 6796, 64, 66, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 12284, 23, 12, 56, 21, 16, 399, 22, 16, 5983, 67, 1458, 4672, 3536, 1021, 2379, 434, 12284, 21, 353, 30, 225, 12284, 21, 294, 399, 21, 317, 399, 21, 12284, 21, 273, 6796, 64, 66, 1...
xyz.readFromList(questionableXyz)
raise Exception, type(questionableXyz)
def compare(self, questionableXyz, knownGoodXyzFile, lengthTolerance, angleTolerance): todo("handle multiple-frame xyz files from animations") xyz = XyzFile() if type(questionableXyz) == types.StringType: xyz.read(questionableXyz) else: xyz.readFromList(questionableXyz) L1, A1 = self.getLAfromXYZ(xyz) xyz = XyzFile() xyz.read(knownGoodXyzFile) L2, A2 = self.getLAfromXYZ(xyz) for len1, len2 in map(None, L1, L2): if LIST_EVERYTHING: print len1 elif not len1.closeEnough(len2, lengthTolerance): raise LengthMismatch(repr(len1) + " expected " + repr(len2)) for ang1, ang2 in map(None, A1, A2): if LIST_EVERYTHING: print ang1 elif not ang1.closeEnough(ang2, angleTolerance): raise AngleMismatch(repr(ang1) + " expected " + repr(ang2))
453c84165bfc7177a8f4c3f56f17d1719b00b642 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/453c84165bfc7177a8f4c3f56f17d1719b00b642/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 12, 2890, 16, 5073, 429, 60, 93, 94, 16, 4846, 18195, 60, 93, 94, 812, 16, 769, 22678, 16, 5291, 22678, 4672, 10621, 2932, 4110, 3229, 17, 3789, 14779, 1390, 628, 25536, 7923, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3400, 12, 2890, 16, 5073, 429, 60, 93, 94, 16, 4846, 18195, 60, 93, 94, 812, 16, 769, 22678, 16, 5291, 22678, 4672, 10621, 2932, 4110, 3229, 17, 3789, 14779, 1390, 628, 25536, 7923, 14...
for i in range(len(boolarr)):
for i, boolstr in enumerate(boolarr):
def get_boolean_array(self, verb, args): boolarr = self.get_string_array(verb, args) for i in range(len(boolarr)): if ("true" == boolstr): boolarr[i] = True continue if ("false" == boolstr): boolarr[i] = False continue raise ValueError, "result is neither 'true' nor 'false': " + boolarr[i] return boolarr
43ef7cf39a3a59b8c657339b665214df426e1264 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3504/43ef7cf39a3a59b8c657339b665214df426e1264/selenium.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6494, 67, 1126, 12, 2890, 16, 6405, 16, 833, 4672, 1426, 5399, 273, 365, 18, 588, 67, 1080, 67, 1126, 12, 16629, 16, 833, 13, 364, 277, 16, 1426, 701, 316, 4241, 12, 6430, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6494, 67, 1126, 12, 2890, 16, 6405, 16, 833, 4672, 1426, 5399, 273, 365, 18, 588, 67, 1080, 67, 1126, 12, 16629, 16, 833, 13, 364, 277, 16, 1426, 701, 316, 4241, 12, 6430, ...
else: H1=[self(0)] for m in range(1,ni[1]): H1.append(H1[-1]+pts[1]) return [P+Q for P in H0 for Q in H1]
H1=[self(0)] for m in range(1,ni[1]): H1.append(H1[-1]+pts[1]) return [P+Q for P in H0 for Q in H1]
def _points_via_group_structure(self): """ Return a list of all the points on the curve, for prime fields only (see points() for the general case)
7d1be908fa4ff218ecc0b495c4f3068b7f857055 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/7d1be908fa4ff218ecc0b495c4f3068b7f857055/ell_finite_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4139, 67, 21985, 67, 1655, 67, 7627, 12, 2890, 4672, 3536, 2000, 279, 666, 434, 777, 326, 3143, 603, 326, 8882, 16, 364, 17014, 1466, 1338, 261, 5946, 3143, 1435, 364, 326, 7470, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4139, 67, 21985, 67, 1655, 67, 7627, 12, 2890, 4672, 3536, 2000, 279, 666, 434, 777, 326, 3143, 603, 326, 8882, 16, 364, 17014, 1466, 1338, 261, 5946, 3143, 1435, 364, 326, 7470, ...
self._db.create_collation("unicode", lambda a, b: cmp(a.lower().replace('the ', ''), b.lower().replace('the ', '')))
self._db.create_collation("UNICODE", lambda a, b: cmp(a.lower().replace('the ', ''), b.lower().replace('the ', '')))
def db(self): if self._db is None: self._db = sqlite.connect(self.settings['database'], check_same_thread=False) self._db.create_collation("unicode", lambda a, b: cmp(a.lower().replace('the ', ''), b.lower().replace('the ', ''))) self.log('Connected') return self._db
1ddb6ff2eff4ced6a4fcee6032fb17fc933e2399 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12778/1ddb6ff2eff4ced6a4fcee6032fb17fc933e2399/dbsqlite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 12, 2890, 4672, 309, 365, 6315, 1966, 353, 599, 30, 365, 6315, 1966, 273, 16184, 18, 3612, 12, 2890, 18, 4272, 3292, 6231, 17337, 866, 67, 14307, 67, 5930, 33, 8381, 13, 365, 631...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1319, 12, 2890, 4672, 309, 365, 6315, 1966, 353, 599, 30, 365, 6315, 1966, 273, 16184, 18, 3612, 12, 2890, 18, 4272, 3292, 6231, 17337, 866, 67, 14307, 67, 5930, 33, 8381, 13, 365, 631...
import scipy.special ans = str(scipy.special.sph_jn(int(n),float(var))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans)
from scipy.special.specfun import sphj return sphj(int(n), float(var))[1][-1]
def spherical_bessel_J(n, var, algorithm="maxima"): r""" Returns the spherical Bessel function of the first kind for integers n -1. Reference: AS 10.1.8 page 437 and AS 10.1.15 page 439. EXAMPLES:: sage: spherical_bessel_J(2,x) ((3/x^2 - 1)*sin(x) - 3*cos(x)/x)/x """ if algorithm=="scipy": import scipy.special ans = str(scipy.special.sph_jn(int(n),float(var))) ans = ans.replace("(","") ans = ans.replace(")","") ans = ans.replace("j","*I") return sage_eval(ans) elif algorithm == 'maxima': _init() return meval("spherical_bessel_j(%s,%s)"%(ZZ(n),var)) else: raise ValueError, "unknown algorithm '%s'"%algorithm
69426fc5c3f874bbd499adc1e1970c6590c5cf4f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9417/69426fc5c3f874bbd499adc1e1970c6590c5cf4f/special.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 21570, 67, 70, 403, 292, 67, 46, 12, 82, 16, 569, 16, 4886, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 1122, 3846, 364, 12321, 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, 272, 21570, 67, 70, 403, 292, 67, 46, 12, 82, 16, 569, 16, 4886, 1546, 1896, 13888, 6, 4672, 436, 8395, 2860, 326, 272, 21570, 605, 403, 292, 445, 434, 326, 1122, 3846, 364, 12321, 2...
self.add_widget_row(table, 0, "File name:", hbox) self.address = self.add_entry_row(table, 1, "Save address:", 6) self.address.connect("activate", self.accept_cb) self.length = self.add_entry_row(table, 2, "Number of bytes:", 6) self.length.connect("activate", self.accept_cb) def select_file_cb(self, widget):
table, self.dialog = create_table_dialog(parent, "Save from memory", 3) table_add_widget_row(table, 0, "File name:", hbox) self.address = table_add_entry_row(table, 1, "Save address:", 6) self.address.connect("activate", dialog_accept_cb, self.dialog) self.length = table_add_entry_row(table, 2, "Number of bytes:", 6) self.length.connect("activate", dialog_accept_cb, self.dialog) def _select_file_cb(self, widget):
def add_table_content(self, table): entry = gtk.Entry() entry.set_width_chars(12) entry.set_editable(False) self.file = entry button = create_button("Select...", self.select_file_cb) hbox = gtk.HBox() hbox.add(entry) hbox.pack_start(button, False, False)
5c46ebd953f1a4b6b2f257db33484ce37c6b09af /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8501/5c46ebd953f1a4b6b2f257db33484ce37c6b09af/debugui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2121, 67, 1745, 12, 2890, 16, 1014, 4672, 1241, 273, 22718, 18, 1622, 1435, 1241, 18, 542, 67, 2819, 67, 7549, 12, 2138, 13, 1241, 18, 542, 67, 19653, 12, 8381, 13, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 2121, 67, 1745, 12, 2890, 16, 1014, 4672, 1241, 273, 22718, 18, 1622, 1435, 1241, 18, 542, 67, 2819, 67, 7549, 12, 2138, 13, 1241, 18, 542, 67, 19653, 12, 8381, 13, 365, 18,...
for idx, val in ndenumerate(mat): if( math.isnan(val)):
for idx, val in ndenumerate(mat): if( isnan(val)):
def sanitize(mat, matname): for idx, val in ndenumerate(mat): if( math.isnan(val)): mat[idx] = 0
05f732982c648a0be21438a0ddb5855b509a05ba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10712/05f732982c648a0be21438a0ddb5855b509a05ba/nnmf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8881, 12, 7373, 16, 4834, 529, 4672, 364, 2067, 16, 1244, 316, 5346, 7924, 12600, 12, 7373, 4672, 225, 309, 12, 16796, 12, 1125, 3719, 30, 4834, 63, 3465, 65, 273, 374, 225, 2, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8881, 12, 7373, 16, 4834, 529, 4672, 364, 2067, 16, 1244, 316, 5346, 7924, 12600, 12, 7373, 4672, 225, 309, 12, 16796, 12, 1125, 3719, 30, 4834, 63, 3465, 65, 273, 374, 225, 2, -100, ...