rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
opts, fnames = getopt(sys.argv[1:], "d:hbqu")
opts, fnames = getopt(sys.argv[1:], "d:hbqux")
def redo(self, p_name): """ Restores module declarations. Intended for built-in modules and thus does not handle import statements. """ self.out("# encoding: utf-8", 0) # NOTE: maybe encoding should be selectable if hasattr(self.module, "__name__"): mod_name = " calls itself " + self.module.__name__ else: mod_name = " does not know its name" self.out("# module " + p_name + mod_name, 0) if hasattr(self.module, "__file__"): self.out("# from file " + self.module.__file__, 0) self.outDocAttr(self.module, 0) # find whatever other self.imported_modules the module knows; effectively these are imports for item_name in self.module.__dict__: item = self.module.__dict__[item_name] if isinstance(item, type(sys)): self.imported_modules[item_name] = item if hasattr(item, "__name__"): self.out("import " + item.__name__ + " as " + item_name + " # refers to " + str(item)) else: self.out(item_name + " = None # XXX name unknown, refers to " + str(item)) self.out("", 0) # empty line after imports # group what else we have into buckets vars_simple = {} vars_complex = {} funcs = {} classes = {} reexports = {} # contains not real objects, but qualified id strings, like "sys.stdout" # for item_name in self.module.__dict__: if item_name in ("__dict__", "__doc__", "__module__", "__file__", "__name__"): continue try: item = getattr(self.module, item_name) # let getters do the magic except: item = self.module.__dict__[item_name] # have it raw # check if it has percolated from an imported module imported_name = self.findImportedName(item) if imported_name is not None: reexports[item_name] = imported_name else: if isinstance(item, type) or item is FakeClassObj: # some classes are callable, check them before functions classes[item_name] = item elif isCallable(item): funcs[item_name] = item elif isinstance(item, type(sys)): continue # self.imported_modules handled above already else: if isinstance(item, SIMPLEST_TYPES): vars_simple[item_name] = item else: vars_complex[item_name] = item # # sort and output every bucket if reexports: self.out("# reexported imports", 0) self.out("", 0) for item_name in sortedNoCase(reexports.keys()): item = reexports[item_name] self.out(item_name + " = " + item, 0) self._defined[item_name] = True self.out("", 0) # empty line after group # if vars_simple: prefix = "" # try to group variables by common prefix PREFIX_LEN = 2 # default prefix length if we can't guess better self.out("# Variables with simple values", 0) for item_name in sortedNoCase(vars_simple.keys()): item = vars_simple[item_name] # track the prefix if len(item_name) >= PREFIX_LEN: prefix_pos = string.rfind(item_name, "_") # most prefixes end in an underscore if prefix_pos < 1: prefix_pos = PREFIX_LEN beg = item_name[0:prefix_pos] if prefix != beg: self.out("", 0) # space out from other prefix prefix = beg else: prefix = "" # output replacement = self.REPLACE_MODULE_VALUES.get((p_name, item_name), None) if replacement is not None: self.out(item_name + " = " + replacement + " # real value of type "+ str(type(item)) + " replaced", 0) elif self.isSkippedInModule(p_name, item_name): self.out(item_name + " = None # real value of type "+ str(type(item)) + " skipped", 0) else: self.fmtValue(item, 0, prefix = item_name + " = " ) self._defined[item_name] = True self.out("", 0) # empty line after vars # if funcs: self.out("# functions", 0) self.out("", 0) for item_name in sortedNoCase(funcs.keys()): item = funcs[item_name] self.redoFunction(item, item_name, 0, p_modname=p_name) self._defined[item_name] = True self.out("", 0) # empty line after each item else: self.out("# no functions", 0) # if classes: self.out("# classes", 0) self.out("", 0) # sort classes so that inheritance order is preserved cls_list = [] # items are (class_name, mro_tuple) for cls_name in sortedNoCase(classes.keys()): cls = classes[cls_name] ins_index = len(cls_list) for i in range(ins_index): maybe_child_bases = cls_list[i][1] if cls in maybe_child_bases: ins_index = i # we could not go farther than current ins_index break # ...and need not go fartehr than first known child cls_list.insert(ins_index, (cls_name, getMRO(cls))) for item_name in [cls_item[0] for cls_item in cls_list]: item = classes[item_name] self.redoClass(item, item_name, 0, p_modname=p_name) self._defined[item_name] = True self.out("", 0) # empty line after each item else: self.out("# no classes", 0) # if vars_complex: self.out("# variables with complex values", 0) self.out("", 0) for item_name in sortedNoCase(vars_complex.keys()): item = vars_complex[item_name] replacement = self.REPLACE_MODULE_VALUES.get((p_name, item_name), None) if replacement is not None: self.out(item_name + " = " + replacement + " # real value of type "+ str(type(item)) + " replaced", 0) elif self.isSkippedInModule(p_name, item_name): self.out(item_name + " = None # real value of type "+ str(type(item)) + " skipped", 0) else: self.fmtValue(item, 0, prefix = item_name + " = " , as_name = item_name) self._defined[item_name] = True self.out("", 0) # empty line after each item
5a42132c2870715e5770dea6869bcadcb796418c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12157/5a42132c2870715e5770dea6869bcadcb796418c/generator3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24524, 12, 2890, 16, 293, 67, 529, 4672, 3536, 6320, 3485, 1605, 12312, 18, 657, 8140, 364, 6650, 17, 267, 4381, 471, 12493, 1552, 486, 1640, 1930, 6317, 18, 3536, 365, 18, 659, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24524, 12, 2890, 16, 293, 67, 529, 4672, 3536, 6320, 3485, 1605, 12312, 18, 657, 8140, 364, 6650, 17, 267, 4381, 471, 12493, 1552, 486, 1640, 1930, 6317, 18, 3536, 365, 18, 659, 2932, ...
value = ''
value = []
def _read_chunked(self, amt): assert self.chunked != _UNKNOWN chunk_left = self.chunk_left value = ''
f452ebf522b48878e10b0aabbe1fcf6bb0894c49 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/f452ebf522b48878e10b0aabbe1fcf6bb0894c49/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 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, 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, 896, 67, 6551, 329, 12, 2890, 16, 25123, 4672, 1815, 365, 18, 6551, 329, 480, 389, 14737, 2441, 67, 4482, 273, 365, 18, 6551, 67, 4482, 460, 273, 875, 2, -100, -100, -100, -100, ...
descr = macro_provider.get_macro_description(macro_name) yield (macro_name, descr or '')
try: descr = macro_provider.get_macro_description(macro_name) descr = wiki_to_html(descr or '', self.env, req) except Exception, e: descr = Markup(system_message( "Error: Can't get description for macro %s" \ % macro_name, e)) yield (macro_name, descr)
def get_macro_descr(): for macro_provider in wiki.macro_providers: for macro_name in macro_provider.get_macros(): if content and macro_name != content: continue descr = macro_provider.get_macro_description(macro_name) yield (macro_name, descr or '')
3d2807f23ca7d22e27e3f04574a60c31be7d49a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/3d2807f23ca7d22e27e3f04574a60c31be7d49a4/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26448, 67, 28313, 13332, 364, 11522, 67, 6778, 316, 9050, 18, 26448, 67, 17520, 30, 364, 11522, 67, 529, 316, 11522, 67, 6778, 18, 588, 67, 5821, 6973, 13332, 309, 913, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 26448, 67, 28313, 13332, 364, 11522, 67, 6778, 316, 9050, 18, 26448, 67, 17520, 30, 364, 11522, 67, 529, 316, 11522, 67, 6778, 18, 588, 67, 5821, 6973, 13332, 309, 913, 471, 1...
supress_keyborad_interrupt_message()
suppress_keyboard_interrupt_message()
def new_hook(type, value, traceback): if type != exceptions.KeyboardInterrupt: old_excepthook(type, value, traceback) else: pass
b782f7c4328ce0501adb3a55909c6423db48b72a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8331/b782f7c4328ce0501adb3a55909c6423db48b72a/scout-cmd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 4476, 12, 723, 16, 460, 16, 10820, 4672, 309, 618, 480, 4798, 18, 17872, 14126, 30, 1592, 67, 14137, 4476, 12, 723, 16, 460, 16, 10820, 13, 469, 30, 1342, 2, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 394, 67, 4476, 12, 723, 16, 460, 16, 10820, 4672, 309, 618, 480, 4798, 18, 17872, 14126, 30, 1592, 67, 14137, 4476, 12, 723, 16, 460, 16, 10820, 13, 469, 30, 1342, 2, -100, -100, -10...
self.dex = Indexer('test-index')
self.dex = Indexer(db)
def setUp(self): if os.path.exists('test-index'): shutil.rmtree('test-index') os.mkdir('test-index') os.mkdir('test-index/files') from roundup.backends.indexer_dbm import Indexer self.dex = Indexer('test-index') self.dex.load_index()
1f1f57233a8fc6f9a82cdc84875756f0899d5188 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/1f1f57233a8fc6f9a82cdc84875756f0899d5188/test_indexer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 309, 1140, 18, 803, 18, 1808, 2668, 3813, 17, 1615, 11, 4672, 11060, 18, 86, 17371, 2668, 3813, 17, 1615, 6134, 1140, 18, 26686, 2668, 3813, 17, 1615, 6134, 1140, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 309, 1140, 18, 803, 18, 1808, 2668, 3813, 17, 1615, 11, 4672, 11060, 18, 86, 17371, 2668, 3813, 17, 1615, 6134, 1140, 18, 26686, 2668, 3813, 17, 1615, 6134, 1140, ...
try: g._extend_axes(min(xdata), max(xdata), min(ydata), max(ydata)) except ValueError: pass
def _from_xdata_ydata(self, xdata, ydata, coerce, options): if coerce: xdata, ydata = self._coerce(xdata, ydata) g = Graphics() g._Graphics__objects.append(GraphicPrimitive_Line(xdata, ydata, options)) try: g._extend_axes(min(xdata), max(xdata), min(ydata), max(ydata)) except ValueError: pass return g
4cdc64d73e24ddcdf396a7b5f766f02774b0c237 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/4cdc64d73e24ddcdf396a7b5f766f02774b0c237/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2080, 67, 92, 892, 67, 93, 892, 12, 2890, 16, 25363, 16, 29175, 16, 12270, 16, 702, 4672, 309, 12270, 30, 25363, 16, 29175, 273, 365, 6315, 2894, 2765, 12, 92, 892, 16, 29175, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2080, 67, 92, 892, 67, 93, 892, 12, 2890, 16, 25363, 16, 29175, 16, 12270, 16, 702, 4672, 309, 12270, 30, 25363, 16, 29175, 273, 365, 6315, 2894, 2765, 12, 92, 892, 16, 29175, 1...
name = ft["name"]
name = str (ft["name"])
def parseSchema (self, ch, codec): """ Parse a received schema-description message. """ self.decOutstanding (ch) packageName = codec.read_str8 () className = codec.read_str8 () hash = codec.read_bin128 () configCount = codec.read_uint16 () instCount = codec.read_uint16 () methodCount = codec.read_uint16 () eventCount = codec.read_uint16 ()
00ad6c2f3a752d5e4d4798e1400a9afdc6e43f71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/00ad6c2f3a752d5e4d4798e1400a9afdc6e43f71/management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3078, 261, 2890, 16, 462, 16, 9196, 4672, 3536, 2884, 279, 5079, 1963, 17, 3384, 883, 18, 3536, 365, 18, 4924, 1182, 15167, 261, 343, 13, 9929, 273, 9196, 18, 896, 67, 701, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 3078, 261, 2890, 16, 462, 16, 9196, 4672, 3536, 2884, 279, 5079, 1963, 17, 3384, 883, 18, 3536, 365, 18, 4924, 1182, 15167, 261, 343, 13, 9929, 273, 9196, 18, 896, 67, 701, 28, ...
return '[\n' + ',\n'.join([str(x) for x in self]) + '\n]'
""" EXAMPLES: sage: s = Sequence([1,2,3], cr=False) sage: str(s) '[1, 2, 3]' sage: repr(s) '[1, 2, 3]' sage: print s [1, 2, 3] sage: s = Sequence([1,2,3], cr=True) sage: str(s) '[\n1,\n2,\n3\n]' """ if self.__cr: return '[\n' + ',\n'.join([str(x) for x in self]) + '\n]' else: return list.__str__(self)
def __str__(self): return '[\n' + ',\n'.join([str(x) for x in self]) + '\n]'
17c3af957ec12a8f8095e3285241d09f4ae7542c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/17c3af957ec12a8f8095e3285241d09f4ae7542c/sequence.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 5271, 64, 82, 11, 397, 2265, 64, 82, 10332, 5701, 3816, 701, 12, 92, 13, 364, 619, 316, 365, 5717, 397, 2337, 82, 3864, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 327, 5271, 64, 82, 11, 397, 2265, 64, 82, 10332, 5701, 3816, 701, 12, 92, 13, 364, 619, 316, 365, 5717, 397, 2337, 82, 3864, 2, -100, -100, -100, -100...
sh("python setupegg.py bdist_mpkg")
sh("python setupegg.py bdist_mpkg")
def bdist_mpkg(): sh("python setupegg.py bdist_mpkg")
0dc3ac827934f3cdc0f5f06ca1eff69684fd4830 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14925/0dc3ac827934f3cdc0f5f06ca1eff69684fd4830/pavement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 4413, 67, 1291, 14931, 13332, 699, 2932, 8103, 444, 89, 9001, 75, 18, 2074, 324, 4413, 67, 1291, 14931, 7923, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 324, 4413, 67, 1291, 14931, 13332, 699, 2932, 8103, 444, 89, 9001, 75, 18, 2074, 324, 4413, 67, 1291, 14931, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for i, (objN, (x,y,z), size) in enumerate(objs): for j, (objN2, (x2,y2,z2), size) in enumerate(objs):
if tp == 0: continue for i, (objN, (x,y,z), size, objInt) in enumerate(objs): for j, (objN2, (x2,y2,z2), size2, objInt2) in enumerate(objs):
def clusterObjects(self, objects): """ Create clustering of objects """ combine = [] clustered = {} clusteredObjN = {} for tp,objs in enumerate(objects): for i, (objN, (x,y,z), size) in enumerate(objs): for j, (objN2, (x2,y2,z2), size) in enumerate(objs): if objN == objN2: continue if objN in clusteredObjN: continue if objN2 in clusteredObjN: continue if (tp,objN) in clustered or (tp,objN2) in clustered: continue d = math.sqrt(((x2-x) * self.spacing[0])**2 + ((y2-y) * self.spacing[1])**2 + ((z2-z) * self.spacing[2])**2) if d < self.parameters["ClusterDistance"]: if random.random()*100 < self.parameters["ClusterPercentage"]: combine.append((tp,objN,i,objN2,j)) clustered[(tp,objN2)]=1 clustered[(tp,objN)]=1 clusteredObjN[objN]=1 clusteredObjN[objN2]=1
b23cf9117065fb863e61cb5faab5ad9ae47fcd09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2877/b23cf9117065fb863e61cb5faab5ad9ae47fcd09/TestData.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2855, 4710, 12, 2890, 16, 2184, 4672, 3536, 1788, 18743, 434, 2184, 3536, 8661, 273, 5378, 2855, 329, 273, 2618, 2855, 329, 2675, 50, 273, 2618, 225, 364, 8071, 16, 18093, 316, 4241, 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, 2855, 4710, 12, 2890, 16, 2184, 4672, 3536, 1788, 18743, 434, 2184, 3536, 8661, 273, 5378, 2855, 329, 273, 2618, 2855, 329, 2675, 50, 273, 2618, 225, 364, 8071, 16, 18093, 316, 4241, 12,...
return agendas.filter(pk=id)
try: return agendas.get(pk=id) except Agenda.DoesNotExist: return rc.NOT_FOUND
def read(self, request, **kwargs): agendas = Agenda.objects.get_relevant_for_user(user=None) # Handle API calls of type /agenda/[agenda_id] id = None if 'id' in kwargs: id = kwargs['id'] if id is not None: return agendas.filter(pk=id) # Handle API calls of type /agenda/vote/[vote_id] # Used to return the agendas ascribed to a specific vote object_id = None ctype = None if 'object_id' in kwargs and 'object_type' in kwargs: object_id = kwargs['object_id'] try: ctype = ContentType.objects.get(model=kwargs['object_type']) except ContentType.DoesNotExist: pass if object_id and (ctype == 'vote'): return agendas.filter(votes__id=object_id) else: return agendas
7a137ad3e8b6cd94cd0908a9ccdb1a2446b16d32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1866/7a137ad3e8b6cd94cd0908a9ccdb1a2446b16d32/handlers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 12, 2890, 16, 590, 16, 2826, 4333, 4672, 1737, 409, 345, 273, 5495, 18883, 18, 6911, 18, 588, 67, 27719, 67, 1884, 67, 1355, 12, 1355, 33, 7036, 13, 225, 468, 5004, 1491, 4097, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 590, 16, 2826, 4333, 4672, 1737, 409, 345, 273, 5495, 18883, 18, 6911, 18, 588, 67, 27719, 67, 1884, 67, 1355, 12, 1355, 33, 7036, 13, 225, 468, 5004, 1491, 4097, ...
self.paths[rev] = (paths, parents)
def parselogentry(orig_paths, revnum, author, date, message): self.ui.debug("parsing revision %d (%d changes)\n" % (revnum, len(orig_paths)))
c6a1068cdcfcb9641c61c95fff848144537955b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11312/c6a1068cdcfcb9641c61c95fff848144537955b7/subversion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 4099, 12, 4949, 67, 4481, 16, 5588, 2107, 16, 2869, 16, 1509, 16, 883, 4672, 365, 18, 4881, 18, 4148, 2932, 24979, 6350, 738, 72, 6142, 72, 3478, 5153, 82, 6, 738, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 779, 1786, 717, 4099, 12, 4949, 67, 4481, 16, 5588, 2107, 16, 2869, 16, 1509, 16, 883, 4672, 365, 18, 4881, 18, 4148, 2932, 24979, 6350, 738, 72, 6142, 72, 3478, 5153, 82, 6, 738, 26...
o.write("From: %s\r\n" % from_email)
o.write("From: %s\n" % from_email)
def sendmailme(to_email, msg, email_subject=None, from_email=None, html=True, sendmail=SENDMAIL): """ Quick and dirty, pipe a message to sendmail. Can only work on UNIX type systems with sendmail. Will need the path to sendmail - defaults to the 'SENDMAIL' constant. ``to_email`` can be a single email address, *or* a list of addresses. *Assumes* you are sending an html email created by ``createhtmlmail``. If this isn't the case then set ``html=False``. """ if not isinstance(to_email, list): to_email = [to_email] o = os.popen("%(a)s -t -f %(b)s" % {'a':sendmail, 'b':from_email},"w") o.write("To: %s\r\n" % ','.join(to_email)) if from_email: o.write("From: %s\r\n" % from_email) if not html and email_subject: o.write("Subject: %s\r\n" % email_subject) o.write("\r\n") o.write("%s\r\n" % msg) o.close()
ded8e8d2c7e2d693b382726a6d565ddb6855e3b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7008/ded8e8d2c7e2d693b382726a6d565ddb6855e3b7/cgiutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 3501, 12, 869, 67, 3652, 16, 1234, 16, 2699, 67, 7857, 33, 7036, 16, 628, 67, 3652, 33, 7036, 16, 1729, 33, 5510, 16, 1366, 4408, 33, 21675, 18191, 4672, 3536, 19884, 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, 1366, 4408, 3501, 12, 869, 67, 3652, 16, 1234, 16, 2699, 67, 7857, 33, 7036, 16, 628, 67, 3652, 33, 7036, 16, 1729, 33, 5510, 16, 1366, 4408, 33, 21675, 18191, 4672, 3536, 19884, 471, ...
cur_report_errors.add("This error was already printed " "in some other test, see 'hash=
cur_report_errors.add("This error was already printed in " "some other test, see 'hash=
def Report(self, files, check_sanity=False): '''Reads in a set of files and prints Memcheck report.
093ae2e104899325a1bacee5ad1990f44305506e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/093ae2e104899325a1bacee5ad1990f44305506e/memcheck_analyze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 12, 2890, 16, 1390, 16, 866, 67, 87, 10417, 33, 8381, 4672, 9163, 7483, 316, 279, 444, 434, 1390, 471, 14971, 5890, 1893, 2605, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8706, 12, 2890, 16, 1390, 16, 866, 67, 87, 10417, 33, 8381, 4672, 9163, 7483, 316, 279, 444, 434, 1390, 471, 14971, 5890, 1893, 2605, 18, 2, -100, -100, -100, -100, -100, -100, -100, -...
resourceList = self._resourceHandler.findAllResources([lib], None)
resourceList = self._resourceHandler.findAllResources1([lib], None)
def addCombinedImage(combinedResource, combinedId, combinedObj): '''this does basically what processCombinedImg does, but with no side effects''' # Read the .meta file # it doesn't seem worth to apply caching here meta_fname = os.path.splitext(combinedResource)[0]+'.meta' meta_content = filetool.read(meta_fname) imgDict = json.loads(meta_content) embeddedDict = {}
a21e93984f807980160d939e8a7f1f7a6fe90405 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/a21e93984f807980160d939e8a7f1f7a6fe90405/CodeGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 27994, 2040, 12, 27458, 1420, 16, 8224, 548, 16, 8224, 2675, 4672, 9163, 2211, 1552, 23772, 4121, 1207, 27994, 12804, 1552, 16, 1496, 598, 1158, 4889, 16605, 26418, 468, 2720, 326, 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, 527, 27994, 2040, 12, 27458, 1420, 16, 8224, 548, 16, 8224, 2675, 4672, 9163, 2211, 1552, 23772, 4121, 1207, 27994, 12804, 1552, 16, 1496, 598, 1158, 4889, 16605, 26418, 468, 2720, 326, 26...
leftOfLeft = max([x for x in points if x <= left])
leftOfLeft = max([x for x in points if x < left])
def SnapSelectionToFadePoints(self, event): if len(self.event.audioFadePoints) < 2: #not enough levels return points = [x[0] for x in self.event.audioFadePoints] left, right = self.event.selection leftOfLeft = max([x for x in points if x <= left]) rightOfLeft = min([x for x in points if x >= left]) leftOfRight = max([x for x in points if x <= right]) rightOfRight = min([x for x in points if x >= right]) if abs(leftOfLeft - left) < abs(rightOfLeft - left): leftChooses = leftOfLeft else: leftChooses = rightOfLeft
005410d48dc77ca205ebb2ce32f601d2594680fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10033/005410d48dc77ca205ebb2ce32f601d2594680fb/EventViewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 2322, 6233, 774, 42, 2486, 5636, 12, 2890, 16, 871, 4672, 309, 562, 12, 2890, 18, 2575, 18, 11509, 42, 2486, 5636, 13, 411, 576, 30, 468, 902, 7304, 7575, 327, 225, 3143, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 348, 2322, 6233, 774, 42, 2486, 5636, 12, 2890, 16, 871, 4672, 309, 562, 12, 2890, 18, 2575, 18, 11509, 42, 2486, 5636, 13, 411, 576, 30, 468, 902, 7304, 7575, 327, 225, 3143, 273, 3...
""" fl_create_glcanvas(type, x, y, w, h, label) -> object ref.
""" fl_create_glcanvas(type, x, y, w, h, label) -> object
def fl_create_glcanvas(type, x, y, w, h, label): """ fl_create_glcanvas(type, x, y, w, h, label) -> object ref. """ retval = _fl_create_glcanvas(type, x, y, w, h, label) return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 7043, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 7043, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 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, 1183, 67, 2640, 67, 7043, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 7043, 15424, 12, 723, 16, 619, 16, 677, 16, 341, 16, 366, 16...
print 'handling', e
def key_down(self, when, event): super(GraphWidget, self).key_down(when, event) if when == 'post': return False e = event.pygame_event if (e.mod & pygame.KMOD_CTRL): print 'handling', e self.handle_control_key(e) return True else: return False
951fd62b0fb90afdc8decf0dc9d28c1dd9f32a43 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/951fd62b0fb90afdc8decf0dc9d28c1dd9f32a43/GraphWidget.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 2378, 12, 2890, 16, 1347, 16, 871, 4672, 2240, 12, 4137, 4609, 16, 365, 2934, 856, 67, 2378, 12, 13723, 16, 871, 13, 309, 1347, 422, 296, 2767, 4278, 327, 1083, 225, 425, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 67, 2378, 12, 2890, 16, 1347, 16, 871, 4672, 2240, 12, 4137, 4609, 16, 365, 2934, 856, 67, 2378, 12, 13723, 16, 871, 13, 309, 1347, 422, 296, 2767, 4278, 327, 1083, 225, 425, 27...
return S_ERROR()
if doNotExit: return S_ERROR() error = 'MySQL not properly Installed' gLogger.error( error ) if exitOnError: exit( -1 ) return S_ERROR( error )
def mysqlInstalled(): """ Check if MySQL is already installed """ if os.path.exists( mysqlDbDir ) or os.path.exists( mysqlLogDir ): return S_OK() return S_ERROR()
19ec07f0c2998016b3e98f643782f5cf2dff8b15 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/19ec07f0c2998016b3e98f643782f5cf2dff8b15/InstallTools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7219, 16747, 13332, 3536, 2073, 309, 13485, 353, 1818, 5876, 3536, 225, 309, 1140, 18, 803, 18, 1808, 12, 7219, 4331, 1621, 262, 578, 1140, 18, 803, 18, 1808, 12, 7219, 1343, 1621, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7219, 16747, 13332, 3536, 2073, 309, 13485, 353, 1818, 5876, 3536, 225, 309, 1140, 18, 803, 18, 1808, 12, 7219, 4331, 1621, 262, 578, 1140, 18, 803, 18, 1808, 12, 7219, 1343, 1621, 262, ...
allocator.mc.MOV(loc, srcop)
try: allocator.mc.MOV(loc, srcop) except FailedToImplement: tmpop = allocator.create_scratch_reg(srcop) allocator.mc.MOV(loc, tmpop) allocator.end_clobber(tmpop)
def generate(self, allocator): assert allocator.operation_result_is_used(self), "place not absorbed!" loc = allocator._use_another_stack_loc() allocator._created(self, loc) if self.x is not None: srcop = allocator.get_operand(self.x) allocator.mc.MOV(loc, srcop) allocator.release(self.x) self.x = None # hack to avoid that the Place keeps a lot of # memory around self.offset = loc.ofs_relative_to_ebp()
58ea92aa7188f83f0d4df7d77469d0b4b3f568b8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/58ea92aa7188f83f0d4df7d77469d0b4b3f568b8/regalloc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 16, 26673, 4672, 1815, 26673, 18, 7624, 67, 2088, 67, 291, 67, 3668, 12, 2890, 3631, 315, 964, 486, 2417, 280, 2992, 4442, 1515, 273, 26673, 6315, 1202, 67, 304, 3011, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 2890, 16, 26673, 4672, 1815, 26673, 18, 7624, 67, 2088, 67, 291, 67, 3668, 12, 2890, 3631, 315, 964, 486, 2417, 280, 2992, 4442, 1515, 273, 26673, 6315, 1202, 67, 304, 3011, ...
return cls(path, slow, allow_oom, tmflags, valgrind)
return cls(path, slow, allow_oom, tmflags, valgrind or options.valgrind_all)
def from_file(cls, path, options): slow = allow_oom = valgrind = False tmflags = ''
f8466b6f9b9714813f0e5143095ffb499b6a3b39 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11102/f8466b6f9b9714813f0e5143095ffb499b6a3b39/trace-test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 768, 12, 6429, 16, 589, 16, 702, 4672, 11816, 273, 1699, 67, 4252, 273, 1244, 3197, 728, 273, 1083, 6118, 7133, 273, 875, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 67, 768, 12, 6429, 16, 589, 16, 702, 4672, 11816, 273, 1699, 67, 4252, 273, 1244, 3197, 728, 273, 1083, 6118, 7133, 273, 875, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
(1/5 + 2/5*T + 2/5*T^2)/(1 - 3*T + 2*T^2)
(2/5*T^2 + 2/5*T + 1/5)/(2*T^2 - 3*T + 1)
def zeta_function(self,mode=None): """ Returns the Duursma zeta function of the code. mode = "dual" computes both the zeta function of C and that of C* mode = "normalized" computes the normalized zeta function of C, zeta_C(T)*T(1-genus(C)) (NOTE: if xi(T,C) denotes the normalized zeta function then xi(T,C*) = xi(1/(qT),C) is equivalent to zeta_{C*}(T) = zeta_C(1/(qT))*q^(gamma-1)T^(gamma+gamma*-2), where gamma = gamma(C) and gamma* = gamma(C*).)
3f2502b7e616a90e4647903a0572f6e04040241f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/3f2502b7e616a90e4647903a0572f6e04040241f/linear_code.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 998, 1066, 67, 915, 12, 2890, 16, 3188, 33, 7036, 4672, 3536, 2860, 326, 463, 89, 25152, 2540, 998, 1066, 445, 434, 326, 981, 18, 225, 1965, 273, 315, 72, 1462, 6, 15881, 3937, 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, 998, 1066, 67, 915, 12, 2890, 16, 3188, 33, 7036, 4672, 3536, 2860, 326, 463, 89, 25152, 2540, 998, 1066, 445, 434, 326, 981, 18, 225, 1965, 273, 315, 72, 1462, 6, 15881, 3937, 326, ...
self.func = lambda y, t: hstack([func(ooT.vector2point(hstack((y, t)))) for func in Funcs]) self.derivative = lambda y, t: vstack([ooT.pointDerivative2array(func.D(ooT.vector2point(hstack((y, t))))) for func in Funcs])
def func (y, t): tmp = dict(ooT.vector2point(y)) tmp[timeVariable] = t return hstack([func(tmp) for func in Funcs]) self.func = func def derivative(y, t): tmp = dict(ooT.vector2point(y)) tmp[timeVariable] = t return vstack([ooT.pointDerivative2array(func.D(tmp)) for func in Funcs]) self.derivative = derivative
def __init__(self, equations, startPoint, timeVariable, timeArray, *args, **kwargs): if len(args) > 0: FuncDesignerException('incorrect ode definition, too many args are obtained') if not isinstance(equations, dict): raise FuncDesignerException('1st argument of ode constructor should be Python dict')
86780e6a1c8ff8db89bad73d3145404217dc7c42 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/86780e6a1c8ff8db89bad73d3145404217dc7c42/ode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 30369, 16, 787, 2148, 16, 813, 3092, 16, 813, 1076, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 405, 374, 30, 225, 6165, 15478, 264, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 30369, 16, 787, 2148, 16, 813, 3092, 16, 813, 1076, 16, 380, 1968, 16, 2826, 4333, 4672, 309, 562, 12, 1968, 13, 405, 374, 30, 225, 6165, 15478, 264, 5...
def syncHandBoard(self):
def syncHandBoard(self, tileName=None):
def syncHandBoard(self): pass
9489a557ae7db013d2ca169da4d05057d465488f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1679/9489a557ae7db013d2ca169da4d05057d465488f/game.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 1144, 22233, 12, 2890, 16, 4769, 461, 33, 7036, 4672, 1342, 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, 3792, 1144, 22233, 12, 2890, 16, 4769, 461, 33, 7036, 4672, 1342, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self.assertEqual(tarinfo.mtime, os.path.getmtime(path))
self.assertEqual(tarinfo.mtime, int(os.path.getmtime(path)))
def test_extractall(self): # Test if extractall() correctly restores directory permissions # and times (see issue1735). tar = tarfile.open(tarname, encoding="iso8859-1") try: directories = [t for t in tar if t.isdir()] tar.extractall(TEMPDIR, directories) for tarinfo in directories: path = os.path.join(TEMPDIR, tarinfo.name) if sys.platform != "win32": # Win32 has no support for fine grained permissions. self.assertEqual(tarinfo.mode & 0o777, os.stat(path).st_mode & 0o777) self.assertEqual(tarinfo.mtime, os.path.getmtime(path)) finally: tar.close()
453106bf4853f8ee668f2737b8c553462a50a392 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/453106bf4853f8ee668f2737b8c553462a50a392/test_tarfile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8004, 454, 12, 2890, 4672, 468, 7766, 309, 2608, 454, 1435, 8783, 3127, 3485, 1867, 4371, 468, 471, 4124, 261, 5946, 5672, 4033, 4763, 2934, 8232, 273, 25857, 18, 3190, 12, 117...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8004, 454, 12, 2890, 4672, 468, 7766, 309, 2608, 454, 1435, 8783, 3127, 3485, 1867, 4371, 468, 471, 4124, 261, 5946, 5672, 4033, 4763, 2934, 8232, 273, 25857, 18, 3190, 12, 117...
if len(w_value.digits) == 1: if w_value.digits[0] & SIGN_MASK == 0: return space.newint(int(w_value.digits[0]) * w_value.sign) elif w_value.sign == -1 and w_value.digits[0] & NONSIGN_MASK == 0: return space.newint(intmask(w_value.digits[0])) return long__Long(space, w_value)
try: x = _AsLong(w_value) except OverflowError: return long__Long(space, w_value) else: return space.newint(x)
def int__Long(space, w_value): if len(w_value.digits) == 1: if w_value.digits[0] & SIGN_MASK == 0: return space.newint(int(w_value.digits[0]) * w_value.sign) elif w_value.sign == -1 and w_value.digits[0] & NONSIGN_MASK == 0: return space.newint(intmask(w_value.digits[0])) #subtypes of long are converted to long! return long__Long(space, w_value)
ad929a678777d2ef2df66adef7cd3564d723bca6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/ad929a678777d2ef2df66adef7cd3564d723bca6/longobject.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 509, 972, 3708, 12, 2981, 16, 341, 67, 1132, 4672, 309, 562, 12, 91, 67, 1132, 18, 16649, 13, 422, 404, 30, 309, 341, 67, 1132, 18, 16649, 63, 20, 65, 473, 12057, 67, 11704, 422, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 509, 972, 3708, 12, 2981, 16, 341, 67, 1132, 4672, 309, 562, 12, 91, 67, 1132, 18, 16649, 13, 422, 404, 30, 309, 341, 67, 1132, 18, 16649, 63, 20, 65, 473, 12057, 67, 11704, 422, 3...
and OpenSSL functions that expect BIO *. If you wish to manipulate files in Python, use Python's file object."""
and OpenSSL functions that expect BIO *. For general file manipulation in Python, use Python's file object."""
def read_all(self): try: return m2.bio_read(self.bio, m2.bio_ctrl_pending(self.bio)) except: return ''
5fae622b3e57f5376d76a6820f3aaa8c50cce5d5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/5fae622b3e57f5376d76a6820f3aaa8c50cce5d5/BIO.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 454, 12, 2890, 4672, 775, 30, 327, 312, 22, 18, 21010, 67, 896, 12, 2890, 18, 21010, 16, 312, 22, 18, 21010, 67, 16277, 67, 9561, 12, 2890, 18, 21010, 3719, 1335, 30, 327, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 454, 12, 2890, 4672, 775, 30, 327, 312, 22, 18, 21010, 67, 896, 12, 2890, 18, 21010, 16, 312, 22, 18, 21010, 67, 16277, 67, 9561, 12, 2890, 18, 21010, 3719, 1335, 30, 327, ...
None, [cty.POINTER(FL_OBJECT), STRING, STRING],
None, [cty.POINTER(FL_OBJECT), STRING, STRING],
def fl_set_xyplot_grid_linestyle(obj, style): """ fl_set_xyplot_grid_linestyle(obj, style) -> num. """ retval = _fl_set_xyplot_grid_linestyle(obj, style) 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, 67, 542, 67, 1698, 4032, 67, 5222, 67, 7511, 19706, 12, 2603, 16, 2154, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 5222, 67, 7511, 19706, 12, 2603, 16, 2154, 13, 317, 818, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 542, 67, 1698, 4032, 67, 5222, 67, 7511, 19706, 12, 2603, 16, 2154, 4672, 3536, 1183, 67, 542, 67, 1698, 4032, 67, 5222, 67, 7511, 19706, 12, 2603, 16, 2154, 13, 317, 818, ...
self.assertRaises(ValueError, rmltopdf_test, 'pdf/11.xml')
self.assertRaises((IndexError, ValueError), rmltopdf_test, 'pdf/11.xml')
def test_error(self): self.assertRaises(ValueError, rmltopdf_test, 'pdf/11.xml')
651db1d6311ba7b43baa789921305d2f65fde308 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/651db1d6311ba7b43baa789921305d2f65fde308/test_pdf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1636, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 436, 781, 3669, 2180, 67, 3813, 16, 296, 7699, 19, 2499, 18, 2902, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1636, 12, 2890, 4672, 365, 18, 11231, 12649, 6141, 12, 23610, 16, 436, 781, 3669, 2180, 67, 3813, 16, 296, 7699, 19, 2499, 18, 2902, 6134, 2, -100, -100, -100, -100, -100, -1...
def _isDeadEnd(self, obj):
def _isDeadEnd(self, obj, objName=None):
def _isDeadEnd(self, obj): if type(obj) in (types.BooleanType, types.BuiltinFunctionType, types.BuiltinMethodType, types.ComplexType, types.FloatType, types.IntType, types.LongType, types.NoneType, types.NotImplementedType, types.TypeType, types.CodeType, types.FunctionType): return True # if it's an internal object, ignore it if id(obj) in ContainerLeakDetector.PrivateIds: return True if id(obj) in self._id2ref: return True return False
88950518abcce43f6828c7e417218c4bdb6988d8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/88950518abcce43f6828c7e417218c4bdb6988d8/ContainerLeakDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 11852, 1638, 12, 2890, 16, 1081, 16, 1081, 461, 33, 7036, 4672, 309, 618, 12, 2603, 13, 316, 261, 2352, 18, 5507, 559, 16, 1953, 18, 28032, 2083, 559, 16, 1953, 18, 28032, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 11852, 1638, 12, 2890, 16, 1081, 16, 1081, 461, 33, 7036, 4672, 309, 618, 12, 2603, 13, 316, 261, 2352, 18, 5507, 559, 16, 1953, 18, 28032, 2083, 559, 16, 1953, 18, 28032, ...
hexobj = re.compile('0x[0123456789abcdef]+')
hexobj = re.compile('0x[0123456789abcdef]+L?')
def method(self): pass
bd17bf2510b4dd5b92130a4fdaade1bbb8272302 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/bd17bf2510b4dd5b92130a4fdaade1bbb8272302/test__greenlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 707, 12, 2890, 4672, 1342, 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, 707, 12, 2890, 4672, 1342, 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...
r = len(v) == len(w)
try: r = len(v) == len(w) except TypeError: print 'info: comparing different types in Vec (%s)' % v.__class__.__name__ return False
def __eq__(v, w): r = len(v) == len(w) for a, b in zip(v, w): if not r: break r = r and eq(a, b, v.eqMargin) return r
01766ba4dd04bc77b0640dd736c36fcde5c8bc17 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14814/01766ba4dd04bc77b0640dd736c36fcde5c8bc17/GeomTypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 11253, 972, 12, 90, 16, 341, 4672, 775, 30, 436, 273, 562, 12, 90, 13, 422, 562, 12, 91, 13, 1335, 3580, 30, 1172, 296, 1376, 30, 17553, 3775, 1953, 316, 12969, 6142, 87, 2506,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11253, 972, 12, 90, 16, 341, 4672, 775, 30, 436, 273, 562, 12, 90, 13, 422, 562, 12, 91, 13, 1335, 3580, 30, 1172, 296, 1376, 30, 17553, 3775, 1953, 316, 12969, 6142, 87, 2506,...
return html.UL( [html.LI(isinstance(elt, tuple) and html(html.STRONG(elt[0]), render_groups(elt[1])) or html.A(wiki.format_page_name(elt), href=formatter.href.wiki(elt)))
return tag.ul( [tag.li(isinstance(elt, tuple) and tag(tag.strong(elt[0]), render_groups(elt[1])) or tag.a(wiki.format_page_name(elt), href=formatter.href.wiki(elt)))
def render_groups(groups): return html.UL( [html.LI(isinstance(elt, tuple) and html(html.STRONG(elt[0]), render_groups(elt[1])) or html.A(wiki.format_page_name(elt), href=formatter.href.wiki(elt))) for elt in groups])
323d0e18c5ae20ddb3266c249630f97ce431aab8 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2831/323d0e18c5ae20ddb3266c249630f97ce431aab8/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4650, 12, 4650, 4672, 327, 1047, 18, 332, 12, 306, 2692, 18, 549, 12, 291, 1336, 12, 20224, 16, 3193, 13, 471, 1047, 12, 2692, 18, 9110, 12, 20224, 63, 20, 65, 3631, 1743, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 4650, 12, 4650, 4672, 327, 1047, 18, 332, 12, 306, 2692, 18, 549, 12, 291, 1336, 12, 20224, 16, 3193, 13, 471, 1047, 12, 2692, 18, 9110, 12, 20224, 63, 20, 65, 3631, 1743, ...
def setup_pxe_boot(self): """ Sets up a PXE boot environment using the built in qemu TFTP server. Copies the PXE Linux bootloader pxelinux.0 from the host (needs the pxelinux package or equivalent for your distro), and vmlinuz and initrd.img files from the CD to a directory that qemu will serve trough TFTP to the VM. """ print "Setting up PXE boot using TFTP root %s" % self.tftp pxe_file = None pxe_paths = ['/usr/lib/syslinux/pxelinux.0', '/usr/share/syslinux/pxelinux.0'] for path in pxe_paths: if os.path.isfile(path): pxe_file = path break if not pxe_file: raise SetupError('Cannot find PXE boot loader pxelinux.0. Make ' 'sure pxelinux or equivalent package for your ' 'distro is installed.') pxe_dest = os.path.join(self.tftp, 'pxelinux.0') shutil.copyfile(pxe_file, pxe_dest)
def setup_cdrom(self): """ Mount cdrom and copy vmlinuz and initrd.img. """ print "Copying vmlinuz and initrd.img from cdrom" m_cmd = ('mount -t iso9660 -v -o loop,ro %s %s' % (self.cdrom_cd1, self.cdrom_cd1_mount)) run(m_cmd, info='Could not mount CD image %s.' % self.cdrom_cd1)
def setup_pxe_boot(self): """ Sets up a PXE boot environment using the built in qemu TFTP server. Copies the PXE Linux bootloader pxelinux.0 from the host (needs the pxelinux package or equivalent for your distro), and vmlinuz and initrd.img files from the CD to a directory that qemu will serve trough TFTP to the VM. """ print "Setting up PXE boot using TFTP root %s" % self.tftp
05c7b87678411674e1b8b8228fe97a5b64354c3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10349/05c7b87678411674e1b8b8228fe97a5b64354c3b/unattended.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 4430, 73, 67, 7137, 12, 2890, 4672, 3536, 11511, 731, 279, 453, 60, 41, 4835, 3330, 1450, 326, 6650, 316, 1043, 24995, 399, 17104, 1438, 18, 28506, 606, 326, 453, 60, 41, 133...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 4430, 73, 67, 7137, 12, 2890, 4672, 3536, 11511, 731, 279, 453, 60, 41, 4835, 3330, 1450, 326, 6650, 316, 1043, 24995, 399, 17104, 1438, 18, 28506, 606, 326, 453, 60, 41, 133...
cmd = 'tar cfz '+tarname+'.tar.gz '+' -C '+directory+' '+tarname
cmd = 'tar cfz ' + tarname + '.tar.gz ' + ' -C ' + directory + ' ' + tarname
def _resolveInputSandbox(self, inputSandbox): """ Internal function.
50b3322668816ba92ea3f9b253d993dc34c53a21 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/50b3322668816ba92ea3f9b253d993dc34c53a21/Job.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10828, 1210, 17881, 12, 2890, 16, 810, 17881, 4672, 3536, 3186, 445, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 10828, 1210, 17881, 12, 2890, 16, 810, 17881, 4672, 3536, 3186, 445, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
plus = patch.rsplit('+', 1) if len(plus) > 1: res = partial_name(plus[0])
plus = patch.rfind('+') if plus >= 0: res = partial_name(patch[:plus])
def partial_name(s): if s in self.series: return s matches = [x for x in self.series if s in x] if len(matches) > 1: self.ui.warn(_('patch name "%s" is ambiguous:\n') % s) for m in matches: self.ui.warn(' %s\n' % m) return None if matches: return matches[0] if len(self.series) > 0 and len(self.applied) > 0: if s == 'qtip': return self.series[self.series_end()-1] if s == 'qbase': return self.series[0] return None
8b8bd89e1ae17638b0d3e852258b8807f49a2222 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/8b8bd89e1ae17638b0d3e852258b8807f49a2222/mq.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4702, 67, 529, 12, 87, 4672, 309, 272, 316, 365, 18, 10222, 30, 327, 272, 1885, 273, 306, 92, 364, 619, 316, 365, 18, 10222, 309, 272, 316, 619, 65, 309, 562, 12, 8436, 13, 405, 40...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4702, 67, 529, 12, 87, 4672, 309, 272, 316, 365, 18, 10222, 30, 327, 272, 1885, 273, 306, 92, 364, 619, 316, 365, 18, 10222, 309, 272, 316, 619, 65, 309, 562, 12, 8436, 13, 405, 40...
self.SetCellBackgroundColour(row, col, "WhiteSmoke")
self.SetCellBackgroundColour(row, col, wx.Colour(245, 245, 245))
def RefreshLedger(self, focusEntry=None, sync=True, sort=True): col = None if sort: col = self.sortByCol self.GetTable().RefreshLedger(focusEntry=focusEntry, sync=sync, sortByCol=col) for row in xrange(self.GetNumberRows()): for col in xrange(self.GetNumberCols()): if row % 2: self.SetCellBackgroundColour(row, col, "WhiteSmoke")
0c41b27bb303681293679c0cf5c9ec589d758627 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2380/0c41b27bb303681293679c0cf5c9ec589d758627/accountLedger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14179, 28731, 12, 2890, 16, 7155, 1622, 33, 7036, 16, 3792, 33, 5510, 16, 1524, 33, 5510, 4672, 645, 273, 599, 309, 1524, 30, 645, 273, 365, 18, 3804, 858, 914, 365, 18, 967, 1388, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14179, 28731, 12, 2890, 16, 7155, 1622, 33, 7036, 16, 3792, 33, 5510, 16, 1524, 33, 5510, 4672, 645, 273, 599, 309, 1524, 30, 645, 273, 365, 18, 3804, 858, 914, 365, 18, 967, 1388, 7...
major = config.get(sect, 'define-major') minor = config.get(sect, 'define-minor') subrel = config.get(sect, 'define-subrelease') buildnum = config.get(sect, 'define-buildnumber')
if config.has_option(sect, 'define-major'): major = config.get(sect, 'define-major') if config.has_option(sect, 'define-minor'): minor = config.get(sect, 'define-minor') if config.has_option(sect, 'define-subrelease'): subrel = config.get(sect, 'define-subrelease') if config.has_option(sect, 'define-buildnumber'): buildnum = config.get(sect, 'define-buildnumber')
def process_CDefine(filename, config, sect): '''Read version number information for setting it into C/C++ #defines.''' ver = config.get(sect, 'version') file = config.get(sect, 'path') desc = config.get(sect, 'description') # Macro names to use major = config.get(sect, 'define-major') minor = config.get(sect, 'define-minor') subrel = config.get(sect, 'define-subrelease') buildnum = config.get(sect, 'define-buildnumber') if len(major) == 0 and len(minor) == 0 and len(subrel) == 0: print ' ERROR: You must set at least one of major/minor/subrelease version numbers.' return False print '%s : %s' % (sect, desc) print ' File: ' + file print ' Version: ' + ver print ' Macros:' print ' Major: ' + major print ' Minor: ' + minor print ' Subrelease: ' + subrel print ' Buildnumber: ' + buildnum inidir = os.path.dirname(filename) cfile = os.path.join(inidir, file) ret = set_CDefine_ver(cfile, ver, major, minor, subrel, buildnum) return ret
2bfe942d97e7c5ace17408eefdad90dbb4f5b229 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/618/2bfe942d97e7c5ace17408eefdad90dbb4f5b229/SetVersions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 39, 11644, 12, 3459, 16, 642, 16, 29140, 4672, 9163, 1994, 1177, 1300, 1779, 364, 3637, 518, 1368, 385, 19, 39, 9904, 468, 536, 1465, 1093, 6309, 225, 1924, 273, 642, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 39, 11644, 12, 3459, 16, 642, 16, 29140, 4672, 9163, 1994, 1177, 1300, 1779, 364, 3637, 518, 1368, 385, 19, 39, 9904, 468, 536, 1465, 1093, 6309, 225, 1924, 273, 642, 18, 588...
while (True):
while True:
def read_from_client(client_address,server_address): while (True): # if this client or server is not connected break try: this_client = client[client_address][server_address] this_server = server[server_address] except KeyError: print "stopping read thread for client: "+client_address+" to server: "+server_address break # read from the client the amount specified in server_buff_size buffer_avialable = this_client['server_buff_size'] data='' try: data = this_client['socket'].recv(buffer_avialable) except Exception, e: if "socket" not in str(type(e)) and "Socket" not in str(e): raise print "SocketError occured reading from client: "+client_address drop_client(client_address,server_address) print "Dropped client: "+client_address break #stops this thread # if data is non null send it to the to_server_buffer if (len(data) != 0): frame = NATFrame() frame.initAsDataFrame(client_address,data) if TRACE: print "recived "+data+" from client" # send the frame as a string to the outgoing buffer this_server['to_server_buff'].append(frame.toString()) #decrement server_buf_size by len(data) (make atomic) this_client['buff_size_lock'].acquire() this_client['server_buff_size'] -= len(data) this_client['buff_size_lock'].release() sleep(SAMPLE_TIME)
af7b0bcb583945cc32ce1e6ac1cd2acbd599a1e9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/af7b0bcb583945cc32ce1e6ac1cd2acbd599a1e9/forwarder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2080, 67, 2625, 12, 2625, 67, 2867, 16, 3567, 67, 2867, 4672, 377, 1323, 1053, 30, 225, 468, 309, 333, 1004, 578, 1438, 353, 486, 5840, 898, 775, 30, 333, 67, 2625, 273, 100...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 67, 2080, 67, 2625, 12, 2625, 67, 2867, 16, 3567, 67, 2867, 4672, 377, 1323, 1053, 30, 225, 468, 309, 333, 1004, 578, 1438, 353, 486, 5840, 898, 775, 30, 333, 67, 2625, 273, 100...
systemId != None):
systemId != None and systemId != "about:legacy-compat"):
def processDoctype(self, token):
5ffcb84f153ade0b8b7a2d4cdfb6f77a05ee5232 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4487/5ffcb84f153ade0b8b7a2d4cdfb6f77a05ee5232/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3244, 12387, 12, 2890, 16, 1147, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 3244, 12387, 12, 2890, 16, 1147, 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, -1...
elif self.plate is not None: return list(self.conn.listFiles("plate", self.plate.id)) elif self.screen is not None: return list(self.conn.listFiles("screen", self.screen.id))
def listFiles(self): if self.image is not None: return list(self.conn.listFiles("image", self.image.id)) elif self.dataset is not None: return list(self.conn.listFiles("dataset", self.dataset.id)) elif self.project is not None: return list(self.conn.listFiles("project", self.project.id)) elif self.plate is not None: return list(self.conn.listFiles("plate", self.plate.id)) elif self.screen is not None: return list(self.conn.listFiles("screen", self.screen.id))
9d3645a071be54765cc11a84ebab08417b86e6e7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12409/9d3645a071be54765cc11a84ebab08417b86e6e7/container.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17852, 12, 2890, 4672, 309, 365, 18, 2730, 353, 486, 599, 30, 327, 666, 12, 2890, 18, 4646, 18, 1098, 2697, 2932, 2730, 3113, 365, 18, 2730, 18, 350, 3719, 1327, 365, 18, 8682, 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, 17852, 12, 2890, 4672, 309, 365, 18, 2730, 353, 486, 599, 30, 327, 666, 12, 2890, 18, 4646, 18, 1098, 2697, 2932, 2730, 3113, 365, 18, 2730, 18, 350, 3719, 1327, 365, 18, 8682, 353, ...
if pkg["name"] in self.always_install: self.opresolver.append(pkg) else: self.opresolver.append(pkg)
self.__appendPkg(self.pkgs[i]) i += 1
def runDepRes(self): # Add packages to be updated to our operation resolver self.opresolver = RpmResolver(self.pydb.getPkgList(), OP_UPDATE) for pkg in self.pkgs: if self.command in ("update", "upgrade", "groupupdate", "groupupgrade"): name = pkg["name"] for ipkg in self.pydb.getPkgList(): if ipkg["name"] == name: if name in self.always_install: self.opresolver.append(pkg) else: self.opresolver.append(pkg) break else: if pkg["name"] in self.always_install: self.opresolver.append(pkg) else: self.opresolver.append(pkg) # Look for obsoletes and add them to our update packages for repo in self.repos: for pkg in repo.getList(): if pkg in self.pkgs: continue for u in pkg["obsoletes"]: s = self.opresolver.searchDependency(u) if len(s) > 0: self.opresolver.append(pkg) del self.pkgs self.pkgs = [] self.__runDepResolution()
11e31557ed329a80c28dc4dd5f98950a5e67f5da /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1143/11e31557ed329a80c28dc4dd5f98950a5e67f5da/yum.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 16316, 607, 12, 2890, 4672, 468, 1436, 5907, 358, 506, 3526, 225, 358, 3134, 1674, 5039, 365, 18, 556, 14122, 273, 534, 7755, 4301, 12, 2890, 18, 2074, 1966, 18, 588, 11264, 682, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 16316, 607, 12, 2890, 4672, 468, 1436, 5907, 358, 506, 3526, 225, 358, 3134, 1674, 5039, 365, 18, 556, 14122, 273, 534, 7755, 4301, 12, 2890, 18, 2074, 1966, 18, 588, 11264, 682, ...
module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name]
module = _normalizeModule(module) tests = _findTests(module, "") test = [doc for (tname, doc, f, l) in tests if tname == name]
def testsource(module, name): """Extract the doctest examples from a docstring. Provide the module (or dotted name of the module) containing the tests to be extracted, and the name (within the module) of the object with the docstring containing the tests to be extracted. The doctest examples are returned as a string containing Python code. The expected output blocks in the examples are converted to Python comments. """ module = _normalize_module(module) tests = _find_tests(module, "") test = [doc for (tname, doc, dummy, dummy) in tests if tname == name] if not test: raise ValueError(name, "not found in tests") test = test[0] examples = [source + _expect(expect) for source, expect, dummy in _extract_examples(test)] return '\n'.join(examples)
1323871f770a1332c44031c18abe670abdf6c641 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/1323871f770a1332c44031c18abe670abdf6c641/doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 3168, 12, 2978, 16, 508, 4672, 3536, 4976, 326, 31263, 395, 10991, 628, 279, 14525, 18, 225, 26569, 326, 1605, 261, 280, 20965, 508, 434, 326, 1605, 13, 4191, 326, 7434, 358, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3168, 12, 2978, 16, 508, 4672, 3536, 4976, 326, 31263, 395, 10991, 628, 279, 14525, 18, 225, 26569, 326, 1605, 261, 280, 20965, 508, 434, 326, 1605, 13, 4191, 326, 7434, 358, 506, ...
curses.wrapper (hyltMain, config["documentation"]["documentation_root"]) curses.reset_prog_mode () curses.curs_set(1) curses.curs_set(0) main_needs_redraw = True
current_directory = os.getcwd() hyltMain(meta_screen,config["documentation"]["documentation_root"]) os.chdir(current_directory)
def hyltMain (meta_screen, starting_filename): """The core Hylt functionality. Contains the main input and display loops, lots of initialization, and so on. """ curses.curs_set(0) # Remember: Parameters are in the order of (y, x). meta_y, meta_x = meta_screen.getmaxyx() core_state = {"y": meta_y, "x": meta_x} # Change to the base path. os.chdir (os.path.dirname (starting_filename)) core_state["curr_base_path"] = "" # There are three windows: a top status bar, a primary screen, and a bottom # status bar. There is also the main screen, of course. Create them. top = meta_screen.subwin (1, meta_x, 0, 0) main = meta_screen.subwin (meta_y - 2, meta_x, 1, 0) bottom = meta_screen.subwin (1, meta_x, meta_y - 1, 0) # Read in the configuration. config = core_state["config"] = generateConfiguration () editor = config["pyui"]["editor"] # Okay. History's actually a bad name for this right now, but it'll have # to do. This is a list of pages; it normally tracks history, but can # also track search results. At the beginning, the only element in the # history is the starting page; others will be added, subtracted, etc. core_state["history"] = [] historyAdd(core_state, os.path.basename (starting_filename)) core_state["history_position"] = 0 fresh_page = True done = False curses.def_prog_mode () main_needs_redraw = True while not done: current_loc = core_state["history"][core_state["history_position"]] if fresh_page: filename = current_loc["filename"] core_state["curr_base_path"] = os.path.dirname (filename) readHyltFile (filename, core_state)
abaed14eedb676b0ff096e2bb515f66b65bcfdd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2254/abaed14eedb676b0ff096e2bb515f66b65bcfdd6/hylt.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4855, 5618, 6376, 261, 3901, 67, 9252, 16, 5023, 67, 3459, 4672, 3536, 1986, 2922, 14881, 5618, 14176, 18, 225, 8398, 326, 2774, 810, 471, 2562, 14075, 16, 328, 6968, 434, 10313, 16, 471...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4855, 5618, 6376, 261, 3901, 67, 9252, 16, 5023, 67, 3459, 4672, 3536, 1986, 2922, 14881, 5618, 14176, 18, 225, 8398, 326, 2774, 810, 471, 2562, 14075, 16, 328, 6968, 434, 10313, 16, 471...
print "Executing nmake over the ssl makefiles..."
makeCommand = "nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile) print "Executing ssl makefiles:", makeCommand
def main(): build_all = "-a" in sys.argv if sys.argv[1] == "Release": arch = "x86" debug = False configure = "VC-WIN32" do_script = "ms\\do_masm" makefile = "ms\\nt.mak" elif sys.argv[1] == "Debug": arch = "x86" debug = True configure = "VC-WIN32" do_script = "ms\\do_masm" makefile="ms\\d32.mak" elif sys.argv[1] == "ReleaseItanium": arch = "ia64" debug = False configure = "VC-WIN64I" do_script = "ms\\do_win64i" makefile = "ms\\nt.mak" os.environ["VSEXTCOMP_USECL"] = "MS_ITANIUM" elif sys.argv[1] == "ReleaseAMD64": arch="amd64" debug=False configure = "VC-WIN64A" do_script = "ms\\do_win64a" makefile = "ms\\nt.mak" os.environ["VSEXTCOMP_USECL"] = "MS_OPTERON" make_flags = "" if build_all: make_flags = "-a" # perl should be on the path, but we also look in "\perl" and "c:\\perl" # as "well known" locations perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"]) perl = find_working_perl(perls) if perl is None: sys.exit(1) print "Found a working perl at '%s'" % (perl,) sys.stdout.flush() # Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live. ssl_dir = find_best_ssl_dir(("..\\..",)) if ssl_dir is None: sys.exit(1) old_cd = os.getcwd() try: os.chdir(ssl_dir) # If the ssl makefiles do not exist, we invoke Perl to generate them. if not os.path.isfile(makefile): print "Creating the makefiles..." sys.stdout.flush() # Put our working Perl at the front of our path os.environ["PATH"] = os.path.dirname(perl) + \ os.pathsep + \ os.environ["PATH"] if arch=="x86" and debug: # the do_masm script in openssl doesn't generate a debug # build makefile so we generate it here: os.system("perl util\mk1mf.pl debug "+configure+" >"+makefile) run_configure(configure, do_script) # Now run make. print "Executing nmake over the ssl makefiles..." sys.stdout.flush() rc = os.system("nmake /nologo PERL=\"%s\" -f \"%s\"" %(perl, makefile)) if rc: print "Executing "+makefile+" failed" print rc sys.exit(rc) finally: os.chdir(old_cd) # And finally, we can build the _ssl module itself for Python. defs = "SSL_DIR=\"%s\"" % (ssl_dir,) if debug: defs = defs + " " + "DEBUG=1" makeCommand = 'nmake /nologo -f _ssl.mak ' + defs + " " + make_flags print "Executing:", makeCommand sys.stdout.flush() rc = os.system(makeCommand) sys.exit(rc)
552262409dffc06b57c64ca8bfe011b8a10b2453 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/552262409dffc06b57c64ca8bfe011b8a10b2453/build_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 6637, 273, 315, 92, 5292, 6, 1198, 273, 1083, 5068, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 1361, 67, 454, 273, 3701, 69, 6, 316, 2589, 18, 19485, 309, 2589, 18, 19485, 63, 21, 65, 422, 315, 7391, 6877, 6637, 273, 315, 92, 5292, 6, 1198, 273, 1083, 5068, 273, 3...
t.average_number_of_triplets_per_reflection() new_phases = t.refine_phases(MillerIndices.H, e_values, phases)
tprs.average_number_of_triplets_per_reflection() new_phases = tprs.refine_phases(MillerIndices.H, e_values, phases)
def exercise(SgInfo, number_of_point_atoms = 10, d_min=1., e_min=1.2, loop_k_equiv=0, use_weights=0, verbose=0): elements = ["const"] * number_of_point_atoms xtal = debug_utils.random_structure( SgInfo, elements, volume_per_atom=50., min_distance=1.5, general_positions_only=0, no_random_u=1) print xtal.UnitCell debug_utils.print_sites(xtal) MillerIndices = xutils.build_miller_indices(xtal, friedel_flag=1,d_min=d_min) Fcalc = xutils.calculate_structure_factors(MillerIndices, xtal, abs_F=1) e_values = Fcalc.F inplace_divide( e_values, math.sqrt(xtal.SgOps.OrderZ() * number_of_point_atoms)) dmtbx.inplace_sort(MillerIndices.H, e_values, 1) s = shared.statistics(e_values) print "mean2:", s.mean2() print "number of structure factors:", e_values.size() erase_small(MillerIndices.H, e_values, e_min) print "number of structure factors:", e_values.size() Fcalc = xutils.calculate_structure_factors(MillerIndices, xtal, abs_F=0) dummy, phases = ampl_phase_rad(Fcalc.F) Fcalc.F = e_values if (0 or verbose): debug_utils.print_structure_factors(Fcalc) t = dmtbx.triplet_invariants( xtal.SgInfo, MillerIndices.H, e_values, loop_k_equiv, use_weights) print "total_number_of_triplets:", \ t.total_number_of_triplets() print "average_number_of_triplets_per_reflection:", \ t.average_number_of_triplets_per_reflection() new_phases = t.refine_phases(MillerIndices.H, e_values, phases) sum_w_phase_error = 0 sum_w = 0 for i in xrange(MillerIndices.H.size()): phase_error = debug_utils.phase_error( phases[i], new_phases[i], deg=0) * 180/math.pi if (0 or verbose): print MillerIndices.H[i], "%.3f %.3f %.3f" % ( phases[i], new_phases[i], phase_error) sum_w_phase_error += e_values[i] * phase_error sum_w += e_values[i] print "mean weighted phase error: %.2f" % (sum_w_phase_error / sum_w,) print
af60c03796349ce44c17b4c2775b9af7ba928487 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/af60c03796349ce44c17b4c2775b9af7ba928487/dbg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 12, 55, 75, 966, 16, 1300, 67, 792, 67, 1153, 67, 14937, 273, 1728, 16, 302, 67, 1154, 33, 21, 12990, 425, 67, 1154, 33, 21, 18, 22, 16, 2798, 67, 79, 67, 14298, 427, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24165, 12, 55, 75, 966, 16, 1300, 67, 792, 67, 1153, 67, 14937, 273, 1728, 16, 302, 67, 1154, 33, 21, 12990, 425, 67, 1154, 33, 21, 18, 22, 16, 2798, 67, 79, 67, 14298, 427, 33, ...
def do_turn(pw): my_strongest = -1 their_weakest = 99999999 for x in range (0, len(pw.planets)): planet = pw.planets[x] if planet.owner == 1 and planet.num_ships > my_strongest: my_strongest = x elif planet.owner != 1 and planet.num_ships < their_weakest: their_weakest = x
class StringUtils: @staticmethod def input(): string = stdin.readline() return string
def do_turn(pw): my_strongest = -1 their_weakest = 99999999 for x in range (0, len(pw.planets)): planet = pw.planets[x] if planet.owner == 1 and planet.num_ships > my_strongest: my_strongest = x elif planet.owner != 1 and planet.num_ships < their_weakest: their_weakest = x if my_strongest != -1 and their_weakest != 99999999: pw.issue_order(my_strongest, their_weakest, pw.planets[my_strongest].num_ships / 2) pw.end_turn()
302ec9497e372d08f7b2e2e956a195678352374b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13129/302ec9497e372d08f7b2e2e956a195678352374b/planetwars.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 667, 5778, 30, 632, 3845, 2039, 1652, 810, 13332, 533, 273, 8801, 18, 896, 1369, 1435, 327, 533, 225, 309, 3399, 67, 9110, 395, 480, 300, 21, 471, 3675, 67, 26008, 395, 480, 23841, 11984, 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, 667, 5778, 30, 632, 3845, 2039, 1652, 810, 13332, 533, 273, 8801, 18, 896, 1369, 1435, 327, 533, 225, 309, 3399, 67, 9110, 395, 480, 300, 21, 471, 3675, 67, 26008, 395, 480, 23841, 11984, 30...
availwidth = self.colwidth - indent_amount else: availwidth = pdfstyles.print_width - indent_amount
availwidth = self.colwidth - 2 * pdfstyles.cell_padding else: availwidth = pdfstyles.print_width
def getAvailWidth(self): indent_amount = self.paraIndentLevel * pdfstyles.para_left_indent \ + self.listIndentation * pdfstyles.list_left_indent if self.table_nesting > 1 and self.colwidth !=0: availwidth = self.colwidth - indent_amount else: availwidth = pdfstyles.print_width - indent_amount return availwidth
757adc3bc0068dbcac10fc3524d173ee6173270a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12390/757adc3bc0068dbcac10fc3524d173ee6173270a/rlwriter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 3769, 671, 2384, 12, 2890, 4672, 3504, 67, 8949, 273, 365, 18, 25072, 7790, 2355, 380, 8169, 10218, 18, 25072, 67, 4482, 67, 9355, 521, 397, 365, 18, 1098, 24438, 380, 8169, 10218, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3769, 671, 2384, 12, 2890, 4672, 3504, 67, 8949, 273, 365, 18, 25072, 7790, 2355, 380, 8169, 10218, 18, 25072, 67, 4482, 67, 9355, 521, 397, 365, 18, 1098, 24438, 380, 8169, 10218, ...
repositoryData.append(libraryData)
repositoryData.append(libraryData)
def buildAllDemos(self, buildTarget="build", demoBrowser=None, copyDemos=False): if demoBrowser: demoBrowser = os.path.abspath(demoBrowser) console.info("Generating demos for all known libraries") repositoryData = [] console.indent() for libraryName in self.libraries: library = self.libraries[libraryName] libraryData = { "classname": libraryName, "children" : [] } validDemo = False for versionName in library: version = library[versionName] versionData = { "classname" : versionName, #"tags" : [libraryName], "tests" : [], "manifest" : version.getManifest() } qxVersions = version.getManifest()["info"]["qooxdoo-versions"] #for ver in qxVersions: # versionData["tags"].append("qxVersion_" + ver) # getting the library's top-level readme here since we only have path # information for the library versions if not "readme" in libraryData: libDir = os.path.dirname(version.path) readme = self.getReadmeContent(libDir) if readme: libraryData["readme"] = readme else: libraryData["readme"] = "No readme file found." # get the version's readme if not "readme" in versionData: readme = self.getReadmeContent(version.path) if readme: versionData["readme"] = readme else: versionData["readme"] = "No readme file found." if not version.hasDemoDir: continue buildStatus = [] for variant in version.demos: if buildTarget == "build": #get the compatible qooxdoo versions of the library version for qxVersion in qxVersions: macro = { "BUILD_PATH" : "./" + qxVersion, "QOOXDOO_PATH" : "../../../../qooxdoo/" + qxVersion } status = variant.build("build", macro) status["qxVersion"] = qxVersion status["variant"] = variant.name buildStatus.append(status) else: status = variant.build(buildTarget) buildStatus.append(status) if demoBrowser: if copyDemos: demoBrowserBase = os.path.split(demoBrowser)[0] for demoStatus in buildStatus: qxVersion = demoStatus["qxVersion"] if demoStatus["buildError"]: console.warn("%s %s demo %s %s generation against qooxdoo %s failed!" %(libraryName, versionName, variant.name, buildTarget, qxVersion)) console.warn(demoStatus["buildError"]) continue sourceDir = os.path.join(version.path, "demo", variant.name, qxVersion) targetDir = os.path.join(demoBrowser, "demo", libraryName, versionName, variant.name) console.debug("Copying from %s to %s" %(sourceDir, targetDir)) copier = CopyTool() copier.parse_args(["-u", sourceDir, targetDir]) copier.do_work() #self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowserBase, qxVersion, local=True) demoData = self.getDemoData(libraryName, versionName, variant.name, qxVersion) demoData["manifest"] = version.getDemoManifest(variant.name) versionData["tests"].append(demoData) else: self.copyHtmlFile(libraryName, versionName, variant.name, buildTarget, demoBrowser) demoData = self.getDemoData(libraryName, versionName, variant.name) versionData["tests"].append(demoData) #demoData["manifest"] = version.getDemoManifest(variant.name) #if copyDemos: # demoData["manifest"]["linkedAgainst"] = [] # for demoStatus in buildStatus: # if not demoStatus["buildError"]: # demoData["manifest"]["linkedAgainst"].append(demoStatus["qxVersion"]) libraryData["children"].append(versionData) repositoryData.append(libraryData)
22de2c8cf078403311eb9034400e79fc75345d29 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/22de2c8cf078403311eb9034400e79fc75345d29/repository.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 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, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 1595, 15058, 538, 12, 2890, 16, 1361, 2326, 1546, 3510, 3113, 21477, 9132, 33, 7036, 16, 1610, 15058, 538, 33, 8381, 4672, 309, 21477, 9132, 30, 21477, 9132, 273, 1140, 18, 803, 18...
rc, output, m = self.shell.cmd1('%s%s' % (self.__get_cmd_prefix_hack__(binary=True),cmd),allowed_exit=[0,255])
rc, output, m = self.shell.cmd1('%s%s' % (self.__get_cmd_prefix_hack__(binary=exec_bin),cmd),allowed_exit=[0,255])
def get_output(self,jobid,directory,wms_proxy=False): '''Retrieve the output of a job on the grid'''
ccdaf9c21baff52cb6e7248f0892c69ca3083c28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/ccdaf9c21baff52cb6e7248f0892c69ca3083c28/Grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2844, 12, 2890, 16, 4688, 350, 16, 5149, 16, 91, 959, 67, 5656, 33, 8381, 4672, 9163, 5767, 326, 876, 434, 279, 1719, 603, 326, 3068, 26418, 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, 336, 67, 2844, 12, 2890, 16, 4688, 350, 16, 5149, 16, 91, 959, 67, 5656, 33, 8381, 4672, 9163, 5767, 326, 876, 434, 279, 1719, 603, 326, 3068, 26418, 2, -100, -100, -100, -100, -100, ...
buildExample("ClassicalField/Diffusion/LinearConvergenceTest") buildExample("ClassicalField/Diffusion/QuadraticConvergenceTest") buildExample("ClassicalField/Diffusion/CubicConvergenceTest")
logExample(path="ClassicalField/Diffusion/LinearConvergenceTest") logExample(path="ClassicalField/Diffusion/QuadraticConvergenceTest") logExample(path="ClassicalField/Diffusion/CubicConvergenceTest")
def logExample(path) : global logDir,logs; intellibrarylog=[] gnulibrarylog=[] intelexamplelog=[] gnuexamplelog=[] inteltestlog=[] gnutestlog=[] for log in logs : if log.startswith('intel_library_build') : intellibrarylog=log.split('|'); if log.startswith('gnu_library_build') : gnulibrarylog=log.split('|'); if log.startswith('intel_'+path+'_build') : intelexamplelog=log.split('|'); if log.startswith('gnu_'+path+'_build') : gnuexamplelog=log.split('|'); if log.startswith('intel_'+path+'_test') : inteltestlog=log.split('|'); if log.startswith('gnu_'+path+'_test') : gnutestlog=log.split('|'); newDir = logDir; for folder in path.split('/') : newDir = newDir + '/' + folder if not os.path.isdir(newDir): os.mkdir(newDir) os.chdir(logDir+"/"+path) if os.path.exists(newDir + "/history.html") : os.remove(newDir + "/history.html") f = open(newDir + "/history.html","w") f.write("<h2>Testing Status:</h2>\n") f.write("<table><tr><td/><td>Status</td><td>Latest Execution Time</td></tr>\n") f.write("<tr><td><b>Intel Build</b></td><td/><td/></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/build-intel'>OpenCMISS Library</a></td>") if(intellibrarylog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+intellibrarylog[2]+"</td></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/build-intel'>Example Build</a></td>") if(intelexamplelog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+intelexamplelog[2]+"</td></tr>") if(len(inteltestlog)>1) : f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/test1-intel'>Example Test</a></td>") if(inteltestlog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+inteltestlog[2]+"</td></tr>") f.write("<tr><td><b>GNU Build</b></td><td/><td/></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/build-gnu'>OpenCMISS Library</a></td>") if(gnulibrarylog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnulibrarylog[2]+"</td></tr>") f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/build-gnu'>Example Build</a></td>") if(gnuexamplelog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnuexamplelog[2]+"</td></tr>") if(len(gnutestlog)>1) : f.write("<tr><td><a href='"+rootUrl+"logs_x86_64-linux/"+path+"/test1-gnu'>Example Test</a></td>") if(gnutestlog[1].startswith('success')) : f.write("<td><font color='green'>Success</font></td>") else : f.write("<td><font color='red'>Fail</font></td>") f.write("<td>"+gnutestlog[2]+"</td></tr>") f.write("</table>") f.close() return;
70f8678a1bce22fff817b706f77a4aa5408aff32 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1766/70f8678a1bce22fff817b706f77a4aa5408aff32/examplesLogger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 10908, 12, 803, 13, 294, 2552, 31101, 16, 10011, 31, 509, 1165, 495, 3345, 1330, 33, 8526, 22908, 332, 495, 3345, 1330, 33, 8526, 509, 292, 338, 2475, 12970, 33, 8526, 314, 13053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 613, 10908, 12, 803, 13, 294, 2552, 31101, 16, 10011, 31, 509, 1165, 495, 3345, 1330, 33, 8526, 22908, 332, 495, 3345, 1330, 33, 8526, 509, 292, 338, 2475, 12970, 33, 8526, 314, 13053, ...
newscript = open(os.path.join(src,newscriptpath), "w") newclient = open(os.path.join(src, newclientpath), "w") langfile = open(path)
newscript = codecs.open(os.path.join(src,newscriptpath), "w", encoding="utf_8_sig") newclient = codecs.open(os.path.join(src, newclientpath), "w", encoding="utf_8_sig") langfile = codecs.open(path, "r", encoding="utf_8_sig")
def _localize_buildout(src, langdir): """Make a localized version of the build dir. That is, with one script.js for each language, with a prefix suffix for each language src: directory containing the finished build language: dir containing language files. NOT in build dir! Note, this function knows much more than it should about the structure of the build. The whole thing should possibly be refactored :( """ scriptpath = os.path.normpath(os.path.join(src, "script/dragonfly.js")) fp = open(scriptpath) script_data = fp.read() fp.close() clientpath = os.path.normpath(os.path.join(src, "client-en.xml")) fp = open(clientpath) clientdata = fp.read() fp.close() for lang, newscriptpath, newclientpath, path in [ (f[11:13], "script/dragonfly-"+f[11:13]+".js", "client-"+f[11:13]+".xml", os.path.join(langdir, f)) for f in os.listdir(langdir) if f.startswith("ui_strings-") and f.endswith(".js") ]: newscript = open(os.path.join(src,newscriptpath), "w") newclient = open(os.path.join(src, newclientpath), "w") langfile = open(path) newscript.write(_concatcomment % path) newscript.write(langfile.read()) newscript.write(script_data) newclient.write(clientdata.replace("dragonfly.js", "dragonfly" + "-" + lang +".js")) newclient.close() langfile.close() newscript.close() os.unlink(os.path.join(src, "script/dragonfly.js"))
6ecc6fe7502c9c4430389a2eaf650b256a17f163 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10922/6ecc6fe7502c9c4430389a2eaf650b256a17f163/dfbuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3729, 554, 67, 3510, 659, 12, 4816, 16, 3303, 1214, 4672, 3536, 6464, 279, 13596, 1177, 434, 326, 1361, 1577, 18, 12466, 353, 16, 598, 1245, 2728, 18, 2924, 364, 1517, 2653, 16, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3729, 554, 67, 3510, 659, 12, 4816, 16, 3303, 1214, 4672, 3536, 6464, 279, 13596, 1177, 434, 326, 1361, 1577, 18, 12466, 353, 16, 598, 1245, 2728, 18, 2924, 364, 1517, 2653, 16, 5...
resources = [ r['slug'] for r in rel_info['resources'] ]
resources = [ '.'.join([r['project_slug'], r['slug']]) for r in rel_info['resources'] ]
def _auto_remote(path_to_tx, url): """ Initialize a remote release/project/resource to the current directory. """ utils.MSG("Auto configuring local project from remote URL...") type, vars = utils.parse_tx_url(url) prj = project.Project(path_to_tx) username, password = prj.getset_host_credentials(vars['hostname']) if type == 'project': utils.MSG("Getting details for project %s" % vars['project']) proj_info = utils.get_project_details(vars['hostname'], username, password, vars['project']) resources = [ r['slug'] for r in proj_info['resources'] ] utils.MSG("%s resources found. Configuring..." % len(resources)) elif type == 'release': utils.MSG("Getting details for release %s" % vars['release']) rel_info = utils.get_release_details(vars['hostname'], username, password, vars['project'], vars['release']) resources = [ r['slug'] for r in rel_info['resources'] ] utils.MSG("%s resources found. Configuring..." % len(resources)) elif type == 'resource': utils.MSG("Getting details for resource %s" % vars['resource']) resources = [vars['resource']] else: raise("Url '%s' is not recognized." % url) for resource in resources: utils.MSG("Configuring resource %s." % resource) res_info = utils.get_resource_details(vars['hostname'], username, password, vars['project'], resource) try: source_lang = res_info['source_language']['code'] i18n_type = res_info['i18n_type'] except KeyError: raise Exception("Remote server seems to be running an unsupported version" " of Transifex. Either update your server software of fallback" " to a previous version of transifex-client.") prj.set_remote_resource( resource='.'.join([vars['project'], resource]), host = vars['hostname'], source_lang = source_lang, i18n_type = i18n_type) prj.save()
3f70d3d1ad6f69aa4c60fda46133f74a8468a8a6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11326/3f70d3d1ad6f69aa4c60fda46133f74a8468a8a6/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6079, 67, 7222, 12, 803, 67, 869, 67, 978, 16, 880, 4672, 3536, 9190, 279, 2632, 3992, 19, 4406, 19, 3146, 358, 326, 783, 1867, 18, 3536, 2990, 18, 11210, 2932, 4965, 642, 4017, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6079, 67, 7222, 12, 803, 67, 869, 67, 978, 16, 880, 4672, 3536, 9190, 279, 2632, 3992, 19, 4406, 19, 3146, 358, 326, 783, 1867, 18, 3536, 2990, 18, 11210, 2932, 4965, 642, 4017, ...
else
else:
def __init__(data = None) if data == None: quickfix.StringField.__init__(self, 144) else quickfix.StringField.__init__(self, 144, data)
484890147d4b23aac4b9d0e85e84fceab7e137c3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8819/484890147d4b23aac4b9d0e85e84fceab7e137c3/quickfix_fields.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 30457, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 892, 273, 599, 13, 309, 501, 422, 599, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972, 12, 2890, 16, 30457, 13, 469, 30, 9549, 904, 18, 780, 974, 16186, 2738, 972...
parser.set_defaults(dryrun=False, nosrc=False, nounzip=False)
parser.add_option("--progress", action="store_true", dest="progress", help="Report download progress") parser.set_defaults(dryrun=False, nosrc=False, nounzip=False, progress=False)
def downloadkit(version): global headers global options urlbase = 'http://developer.symbian.org/main/tools_and_kits/downloads/' viewid = 5 # default to Symbian^3 if version[0] == 2: viewid= 1 # Symbian^2 if version[0] == 3: viewid= 5 # Symbian^3 url = urlbase + ('view.php?id=%d'% viewid) + 'vId=' + version req = urllib2.Request(url, None, headers) response = urllib2.urlopen(req) doc=response.read() # BeatifulSoup chokes on some javascript, so we cut away everything before the <body> try: bodystart=doc.find('<body>') doc = doc[bodystart:] except: pass threadlist = [] # let's hope the HTML format never changes... # <a href='download.php?id=27&cid=60&iid=270' title='src_oss_mw.zip'> ...</a> soup=BeautifulSoup(doc) results=soup.findAll('a', href=re.compile("^download"), title=re.compile("\.(zip|xml)$")) results.sort(orderResults) for result in results: downloadurl = urlbase + result['href'] filename = result['title'] if options.nosrc and re.match(r"(src_sfl|src_oss)", filename) : continue # no snapshots of Mercurial source thanks... if download_file(filename, downloadurl) != True : continue # download failed # unzip the file (if desired) if re.match(r"patch", filename): complete_outstanding_unzips() # ensure that the thing we are patching is completed first if re.match(r"(bin|tools).*\.zip", filename): schedule_unzip(filename, 1, 0) # unzip once, don't delete elif re.match(r"src_.*\.zip", filename): schedule_unzip(filename, 1, 1) # zip of zips, delete top level elif re.match(r"build_BOM.zip", filename): schedule_unzip(filename, 1, 1) # unpack then delete zip as it's not needed again # wait for the unzipping threads to complete complete_outstanding_unzips() return 1
251bf8eaf341d307725143abf0794e0a25cb9e43 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4206/251bf8eaf341d307725143abf0794e0a25cb9e43/downloadkit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 8691, 12, 1589, 4672, 2552, 1607, 2552, 702, 880, 1969, 273, 296, 2505, 2207, 23669, 18, 9009, 1627, 2779, 18, 3341, 19, 5254, 19, 6642, 67, 464, 67, 79, 1282, 19, 7813, 87, 2473...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4224, 8691, 12, 1589, 4672, 2552, 1607, 2552, 702, 880, 1969, 273, 296, 2505, 2207, 23669, 18, 9009, 1627, 2779, 18, 3341, 19, 5254, 19, 6642, 67, 464, 67, 79, 1282, 19, 7813, 87, 2473...
return ExpatParser()
return xml.sax.make_parser()
def _getParser(): return ExpatParser()
b798c0109f56dc077bdd7d24fefb7b2c44afe98b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b798c0109f56dc077bdd7d24fefb7b2c44afe98b/pulldom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 2678, 13332, 327, 2025, 18, 87, 651, 18, 6540, 67, 4288, 1435, 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, ...
[ 1, 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, 389, 588, 2678, 13332, 327, 2025, 18, 87, 651, 18, 6540, 67, 4288, 1435, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
results = asGrammar.source.parseString(src) for obj in results: self.model.append(obj) if obj.getType() == "package": if obj.getName() in self.__packages: curPkg = self.__packages[obj.getName()] for cls in obj.getClasses().items(): if curPkg.hasClass(cls[1].getName()): pass else: curPkg.addClass(cls[1]) else: self.__packages[obj.getName()] = obj return results def getPackage(self,name): return self.__packages.get(name,None) def getPackages(self): return self.__packages def hasPackage(self,name): return name in self.__packages
asGrammar.PROGRAM.parseString(src) pkg = asGrammar.package asGrammar.package = asModel.ASPackage() print pkg.classes if pkg.name in self.packages: print pkg.classes for cls in pkg.classes.values(): self.packages[pkg.name].classes[cls.name] = cls else: self.packages[pkg.name] = pkg
def parseSource(self,src): self.sources.append( src ) results = asGrammar.source.parseString(src) for obj in results: self.model.append(obj) if obj.getType() == "package": # Test if package currently exists in dictionary if obj.getName() in self.__packages: curPkg = self.__packages[obj.getName()] for cls in obj.getClasses().items(): if curPkg.hasClass(cls[1].getName()): # Do nothing if class already exists pass else: curPkg.addClass(cls[1]) else: # Add package object to dictionary using the # package name as the key. self.__packages[obj.getName()] = obj return results
e0b470097dfecc092fb724d07cc417651aac2b76 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/886/e0b470097dfecc092fb724d07cc417651aac2b76/asBuilder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 1830, 12, 2890, 16, 4816, 4672, 365, 18, 10141, 18, 6923, 12, 1705, 262, 1686, 273, 487, 18576, 18, 3168, 18, 2670, 780, 12, 4816, 13, 225, 364, 1081, 316, 1686, 30, 365, 18, 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, 1109, 1830, 12, 2890, 16, 4816, 4672, 365, 18, 10141, 18, 6923, 12, 1705, 262, 1686, 273, 487, 18576, 18, 3168, 18, 2670, 780, 12, 4816, 13, 225, 364, 1081, 316, 1686, 30, 365, 18, 2...
idstring = "$Id: notation3.py,v 1.48 2001-01-19 03:56:17 timbl Exp $"
idstring = "$Id: notation3.py,v 1.49 2001-01-22 02:02:39 timbl Exp $"
def startDoc(self):
09b971391fd0cd45214449804ce2b02cb5724bab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3308/09b971391fd0cd45214449804ce2b02cb5724bab/notation3.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 1759, 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, 787, 1759, 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...
sys.stdin.readline()
unittest.main()
def setUpGIT(self): """Creates git repositories and start the servers.""" assert not self.gitdaemon join = os.path.join root = join(self.repos_dir, 'git') rmtree(root) os.mkdir(root) # Repo 1 repo = join(root, 'repo_1') subprocess.check_call(['git', 'init', '-q', repo]) write(join(repo, 'DEPS'), """
84585302b34d4580994a4cb364d190689cb455ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/84585302b34d4580994a4cb364d190689cb455ed/gclient_smoketest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 43, 1285, 12, 2890, 4672, 3536, 2729, 5071, 14531, 471, 787, 326, 7084, 12123, 1815, 486, 365, 18, 6845, 21511, 1233, 273, 1140, 18, 803, 18, 5701, 1365, 273, 1233, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 43, 1285, 12, 2890, 4672, 3536, 2729, 5071, 14531, 471, 787, 326, 7084, 12123, 1815, 486, 365, 18, 6845, 21511, 1233, 273, 1140, 18, 803, 18, 5701, 1365, 273, 1233, 12, 2890, 18, ...
return config[section][item_name]
return self.config[section][item_name]
def get_item(self, section, item_name): return config[section][item_name]
86a4df03ea2633950c42e84a6675c5a28d0dd16c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7705/86a4df03ea2633950c42e84a6675c5a28d0dd16c/config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1726, 12, 2890, 16, 2442, 16, 761, 67, 529, 4672, 327, 642, 63, 3464, 6362, 1726, 67, 529, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 1726, 12, 2890, 16, 2442, 16, 761, 67, 529, 4672, 327, 642, 63, 3464, 6362, 1726, 67, 529, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print " /* %-6s */ {" % (pixel_depth_name(B)),
print ' /* %-6s */ {' % (pixel_depth_name(B)),
def print_function_table_name(filename, function_table): print "" print "char *%s_name[%d][%d][%d][%d] = {" % (functionnameify(filename), len(composite_modes), len(pixel_format)-1, len(pixel_format)-1, len(pixel_format)-1) for mode in composite_modes: print " { /* %s */" % (mode) for A in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): print " { /* A = %s */" % (pixel_depth_name(A)) for B in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): print " /* %-6s */ {" % (pixel_depth_name(B)), for D in filter(lambda pf: pf != "GIMP_PIXELFORMAT_ANY", pixel_format): key = "%s_%s_%s_%s" % (string.lower(mode), pixel_depth_name(A), pixel_depth_name(B), pixel_depth_name(D)) if function_table.has_key(key): print '"%s", ' % (function_table[key][0]), else: print '"%s", ' % (""), pass pass print "}," pass print " }," pass print " }," pass print "};\n" return
9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11058/9d2b63962e152dcb9fc4a73e6b91c9ae2c358d95/make-gimp-composite-dispatch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 915, 67, 2121, 67, 529, 12, 3459, 16, 445, 67, 2121, 4672, 225, 1172, 1408, 1172, 315, 3001, 380, 9, 87, 67, 529, 14451, 72, 6362, 9, 72, 6362, 9, 72, 6362, 9, 72, 65, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 915, 67, 2121, 67, 529, 12, 3459, 16, 445, 67, 2121, 4672, 225, 1172, 1408, 1172, 315, 3001, 380, 9, 87, 67, 529, 14451, 72, 6362, 9, 72, 6362, 9, 72, 6362, 9, 72, 65, ...
d = readmodule(n, path, inpackage)
d = readmodule_ex(n, path, inpackage)
def readmodule_ex(module, path=[], inpackage=0): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module.''' dict = {} i = module.rfind('.') if i >= 0: # Dotted module name package = module[:i].strip() submodule = module[i+1:].strip() parent = readmodule(package, path, inpackage) child = readmodule(submodule, parent['__path__'], 1) return child if _modules.has_key(module): # we've seen this module before... return _modules[module] if module in sys.builtin_module_names: # this is a built-in module _modules[module] = dict return dict # search the path for the module f = None if inpackage: try: f, file, (suff, mode, type) = \ imp.find_module(module, path) except ImportError: f = None if f is None: fullpath = list(path) + sys.path f, file, (suff, mode, type) = imp.find_module(module, fullpath) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] _modules[module] = dict path = [file] + path f, file, (suff, mode, type) = \ imp.find_module('__init__', [file]) if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() _modules[module] = dict return dict _modules[module] = dict classstack = [] # stack of (class, indent) pairs src = f.read() f.close() # To avoid having to stop the regexp at each newline, instead # when we need a line number we simply string.count the number of # newlines in the string since the last time we did this; i.e., # lineno = lineno + \ # string.count(src, '\n', last_lineno_pos, here) # last_lineno_pos = here countnl = string.count lineno, last_lineno_pos = 1, 0 i = 0 while 1: m = _getnext(src, i) if not m: break start, i = m.span() if m.start("Method") >= 0: # found a method definition or function thisindent = _indent(m.group("MethodIndent")) meth_name = m.group("MethodName") lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function f = Function(module, meth_name, file, lineno) dict[meth_name] = f elif m.start("String") >= 0: pass elif m.start("Class") >= 0: # we found a class definition thisindent = _indent(m.group("ClassIndent")) # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] lineno = lineno + \ countnl(src, '\n', last_lineno_pos, start) last_lineno_pos = start class_name = m.group("ClassName") inherit = m.group("ClassSupers") if inherit: # the class inherits from other classes inherit = inherit[1:-1].strip() names = [] for n in inherit.split(','): n = n.strip() if dict.has_key(n): # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class # is of the # form module.class: # look in # module for class m = c[-2] c = c[-1] if _modules.has_key(m): d = _modules[m] if d.has_key(c): n = d[c] names.append(n) inherit = names # remember this class cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif m.start("Import") >= 0: # import module for n in m.group("ImportList").split(','): n = n.strip() try: # recursively read the imported module d = readmodule(n, path, inpackage) except: ##print 'module', n, 'not found' pass elif m.start("ImportFrom") >= 0: # from module import stuff mod = m.group("ImportFromPath") names = m.group("ImportFromList").split(',') try: # recursively read the imported module d = readmodule(mod, path, inpackage) except: ##print 'module', mod, 'not found' continue # add any classes that were defined in the # imported module to our name space if they # were mentioned in the list for n in names: n = n.strip() if d.has_key(n): dict[n] = d[n] elif n == '*': # only add a name if not # already there (to mimic what # Python does internally) # also don't add names that # start with _ for n in d.keys(): if n[0] != '_' and \ not dict.has_key(n): dict[n] = d[n] else: assert 0, "regexp _getnext found something unexpected" return dict
cb5da4b4d7bf5db97d84f27e38144505c7ff2458 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/cb5da4b4d7bf5db97d84f27e38144505c7ff2458/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 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, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 20, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 2589...
msg += ex
msg += str(ex)
def publishStatusToDashboard(self, jobSpecId, data): """ _publishStatusToDashboard_
5a5dbe1212c44c83bc3260919c0ce68f5227766a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8887/5a5dbe1212c44c83bc3260919c0ce68f5227766a/CondorG.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 1482, 774, 14830, 12, 2890, 16, 1719, 1990, 548, 16, 501, 4672, 3536, 389, 6543, 1482, 774, 14830, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 1482, 774, 14830, 12, 2890, 16, 1719, 1990, 548, 16, 501, 4672, 3536, 389, 6543, 1482, 774, 14830, 67, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if self.shuffle == 2:
if self.shuffle == 1: random.shuffle(self.__playlist) elif (self.shuffle == 2 and (len(self.__playlist) == len(self.__orig_playlist))):
def __get_song(self): self.__lock.acquire() if self.shuffle == 2: # weighted random plist = self.__orig_playlist total_rating = sum([song.get("~#rating", 2) for song in plist]) choice = random.random() * total_rating current = 0.0 for song in plist: current += song.get("~#rating", 2) if current >= choice: break else: song = self.__playlist.pop(0) if self.shuffle: random.shuffle(self.__playlist) fn = song['~filename'] config.set("memory", "song", fn) try: player = self.__output.open(song) except Exception, err: sys.stderr.write(str(err) + "\n") player = None self.paused = True self.info.missing(song) else: self.info.song_started(song) self.__played.append(song) self.__lock.release() return song, player
ab0a30594392d00f9a751ac7aed7f9420ff50a8b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/ab0a30594392d00f9a751ac7aed7f9420ff50a8b/player.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 816, 75, 12, 2890, 4672, 365, 16186, 739, 18, 1077, 1039, 1435, 309, 365, 18, 31980, 422, 404, 30, 2744, 18, 31980, 12, 2890, 16186, 1601, 1098, 13, 1327, 261, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 67, 816, 75, 12, 2890, 4672, 365, 16186, 739, 18, 1077, 1039, 1435, 309, 365, 18, 31980, 422, 404, 30, 2744, 18, 31980, 12, 2890, 16186, 1601, 1098, 13, 1327, 261, 2890, 18,...
self._spacegroup = sg_node.getElementsbyTagName(
self._spacegroup = sg_node.getElementsByTagName(
def decide_spacegroup(self): '''Given data indexed in the correct pointgroup, have a guess at the spacegroup.'''
28ac80475963d52a8047b79fafa31fd10219b03b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3290/28ac80475963d52a8047b79fafa31fd10219b03b/Pointless.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16288, 67, 2981, 1655, 12, 2890, 4672, 9163, 6083, 501, 8808, 316, 326, 3434, 1634, 1655, 16, 1240, 279, 7274, 622, 326, 3476, 1655, 1093, 6309, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 16288, 67, 2981, 1655, 12, 2890, 4672, 9163, 6083, 501, 8808, 316, 326, 3434, 1634, 1655, 16, 1240, 279, 7274, 622, 326, 3476, 1655, 1093, 6309, 2, -100, -100, -100, -100, -100, -100, -1...
unittest.TestResult.addFailure(self, test, err)
self.failures.append((test, err))
def addFailure(self, test, err): unittest.TestResult.addFailure(self, test, err) if self.showAll: self.stream.writeln("DIFFER") elif self.dots: self.stream.write("D")
ecb742f904067814aade339e0a35903ae04887ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1296/ecb742f904067814aade339e0a35903ae04887ab/gstestutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5247, 12, 2890, 16, 1842, 16, 393, 4672, 365, 18, 26268, 18, 6923, 12443, 3813, 16, 393, 3719, 309, 365, 18, 4500, 1595, 30, 365, 18, 3256, 18, 5363, 292, 82, 2932, 2565, 9303, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5247, 12, 2890, 16, 1842, 16, 393, 4672, 365, 18, 26268, 18, 6923, 12443, 3813, 16, 393, 3719, 309, 365, 18, 4500, 1595, 30, 365, 18, 3256, 18, 5363, 292, 82, 2932, 2565, 9303, ...
self.handle_UIUpdate('speed')
self.handle_UIUpdate('virtualSpeed')
def updateAll(self): self.handle_UIUpdate('funds') self.handle_UIUpdate('date') self.handle_UIUpdate('history') self.handle_UIUpdate('evaluation') self.handle_UIUpdate('paused') self.handle_UIUpdate('speed') self.handle_UIUpdate('demand') self.handle_UIUpdate('options') self.handle_UIUpdate('gamelevel') self.handle_UIUpdate('cityname') self.updateMapView()
14b2acc074530e8a6710261615202e97b1b8b23b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12485/14b2acc074530e8a6710261615202e97b1b8b23b/micropolisturbogearsengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1595, 12, 2890, 4672, 365, 18, 4110, 67, 5370, 1891, 2668, 74, 19156, 6134, 365, 18, 4110, 67, 5370, 1891, 2668, 712, 6134, 365, 18, 4110, 67, 5370, 1891, 2668, 8189, 6134, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 1595, 12, 2890, 4672, 365, 18, 4110, 67, 5370, 1891, 2668, 74, 19156, 6134, 365, 18, 4110, 67, 5370, 1891, 2668, 712, 6134, 365, 18, 4110, 67, 5370, 1891, 2668, 8189, 6134, 365, ...
for scheme_id in self.list_fs_skinfiles(portal_meta, skin_id, True): for file_id in self.list_fs_schemefiles(portal_meta, skin_id, scheme_id, ftype='styles'):
for scheme_id in self.list_fs_skinfiles(portal, skin_id, True): for file_id in self.list_fs_schemefiles(portal, skin_id, scheme_id, ftype='styles'):
def updateLayoutForms(self, portal, locator, skin_id, f_action, file_id): """ reload Naaya portal layout files""" report = {} portal_path = portal.absolute_url(1) portal_meta = portal.meta_type file_custom = [] for fid in file_id.split(','): file_custom.append(fid.strip())
0116da894b0fd06e2befe1c4b6331ce460957cbc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3287/0116da894b0fd06e2befe1c4b6331ce460957cbc/NaayaUpdater.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 3744, 18529, 12, 2890, 16, 11899, 16, 8871, 16, 18705, 67, 350, 16, 284, 67, 1128, 16, 585, 67, 350, 4672, 3536, 7749, 16350, 528, 69, 11899, 3511, 1390, 8395, 2605, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 3744, 18529, 12, 2890, 16, 11899, 16, 8871, 16, 18705, 67, 350, 16, 284, 67, 1128, 16, 585, 67, 350, 4672, 3536, 7749, 16350, 528, 69, 11899, 3511, 1390, 8395, 2605, 273, 2618, 1...
attrs = {"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY: [None]}
attrs = {"IAccessible::role": [oleacc.ROLE_SYSTEM_PUSHBUTTON, oleacc.ROLE_SYSTEM_RADIOBUTTON, oleacc.ROLE_SYSTEM_CHECKBUTTON, oleacc.ROLE_SYSTEM_COMBOBOX, oleacc.ROLE_SYSTEM_LIST, oleacc.ROLE_SYSTEM_OUTLINE, oleacc.ROLE_SYSTEM_TEXT], "IAccessible::state_%s" % oleacc.STATE_SYSTEM_READONLY: [None]}
def _searchableAttribsForNodeType(self,nodeType): if nodeType in ("link", "unvisitedLink"): attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_LINK]} elif nodeType=="table": attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_TABLE]} elif nodeType.startswith("heading") and nodeType[7:].isdigit(): attrs = {"acrobat::stdname": ["H%s" % nodeType[7:]]} elif nodeType == "heading": attrs = {"acrobat::stdname": ["H1", "H2", "H3", "H4", "H5", "H6"]} elif nodeType == "formField": attrs = {"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY: [None]} elif nodeType == "list": attrs = {"acrobat::stdname": ["L"]} elif nodeType == "listItem": attrs = {"acrobat::stdname": ["LI"]} elif nodeType=="button": attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_PUSHBUTTON]} elif nodeType=="edit": attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_TEXT],"IAccessible::state_%s"%oleacc.STATE_SYSTEM_READONLY:[None]} elif nodeType=="radioButton": attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_RADIOBUTTON]} elif nodeType=="checkBox": attrs={"IAccessible::role":[oleacc.ROLE_SYSTEM_CHECKBUTTON]} elif nodeType == "blockQuote": attrs = {"acrobat::stdname": ["BlockQuote"]} elif nodeType=="focusable": attrs={"IAccessible::state_%s"%oleacc.STATE_SYSTEM_FOCUSABLE:[1]} else: return None return attrs
7fc998b68c659a01304f9e743f36448134f67046 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/7fc998b68c659a01304f9e743f36448134f67046/adobeAcrobat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 429, 12399, 28388, 15101, 12, 2890, 16, 2159, 559, 4672, 309, 9507, 316, 7566, 1232, 3113, 315, 318, 30129, 2098, 6, 4672, 3422, 5899, 6, 45, 10451, 2866, 4615, 6877, 63, 790,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3072, 429, 12399, 28388, 15101, 12, 2890, 16, 2159, 559, 4672, 309, 9507, 316, 7566, 1232, 3113, 315, 318, 30129, 2098, 6, 4672, 3422, 5899, 6, 45, 10451, 2866, 4615, 6877, 63, 790,...
mod_line, last_char = revert_unicode_line(document, i, last_char, insets, spec_chars)
mod_line = revert_unicode_line(document, i, insets, spec_chars)
def revert_unicode(document): '''Transform unicode characters that can not be written using the
b03bc9691212caf7dc3f524e4163b2cb73a6a9f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7514/b03bc9691212caf7dc3f524e4163b2cb73a6a9f0/lyx_1_5.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 9124, 12, 5457, 4672, 9163, 4059, 5252, 3949, 716, 848, 486, 506, 5941, 1450, 326, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15226, 67, 9124, 12, 5457, 4672, 9163, 4059, 5252, 3949, 716, 848, 486, 506, 5941, 1450, 326, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def _precompute(self, how_many=10): try: f = self._f except AttributeError: self._f = recur_gen2(331635635998274737472200656430763,1510028911088401971189590305498785,1,1) f = self._f self._b += [f.next() for i in range(how_many)] def _eval(self, n): if len(self._b) <= n: self._precompute(n - len(self._b) + 1) return self._b[n] def list(self, n): self._eval(n) return self._b[:n] class A083105(SloaneSequence): r""" Second-order linear recurrence sequence with $a(n) = a(n-1) + a(n-2)$. $a(0) = 62638280004239857$, $a(1) = 49463435743205655$. This is the second-order linear recurrence sequence with $a(0)$ and $a(1)$ co-prime. It was found by Donald Knuth in 1990. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A083105;a Second-order linear recurrence sequence with a(n) = a(n-1) + a(n-2). sage: a(1) 49463435743205655 sage: a(2) 112101715747445512 sage: a(3) 161565151490651167 sage: a.offset 0 sage: a(8) 1853029790662436896 sage: a(20) 596510791500513098192 sage: a.list(4) [62638280004239857, 49463435743205655, 112101715747445512, 161565151490651167] AUTHOR: -- Jaap Spies (2007-01-23) """ def __init__(self):
class A083105(RecurrenceSequence2): def __init__(self): r""" Second-order linear recurrence sequence with $a(n) = a(n-1) + a(n-2)$. $a(0) = 62638280004239857$, $a(1) = 49463435743205655$. This is the second-order linear recurrence sequence with $a(0)$ and $a(1)$ co-prime. It was found by Donald Knuth in 1990. INPUT: n -- non negative integer OUTPUT: integer -- function value EXAMPLES: sage: a = sloane.A083105;a Second-order linear recurrence sequence with a(n) = a(n-1) + a(n-2). sage: a(1) 49463435743205655 sage: a(2) 112101715747445512 sage: a(3) 161565151490651167 sage: a.offset 0 sage: a(8) 1853029790662436896 sage: a(20) 596510791500513098192 sage: a.list(4) [62638280004239857, 49463435743205655, 112101715747445512, 161565151490651167] AUTHOR: -- Jaap Spies (2007-01-23) """
def _precompute(self, how_many=10): try: f = self._f except AttributeError: self._f = recur_gen2(331635635998274737472200656430763,1510028911088401971189590305498785,1,1) f = self._f self._b += [f.next() for i in range(how_many)]
69a199217d612e1c590af73e16003812c85b93ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/69a199217d612e1c590af73e16003812c85b93ec/sloane_functions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1484, 9200, 12, 2890, 16, 3661, 67, 9353, 33, 2163, 4672, 775, 30, 284, 273, 365, 6315, 74, 1335, 6394, 30, 365, 6315, 74, 273, 8112, 67, 4507, 22, 12, 3707, 30886, 4313, 4763, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1484, 9200, 12, 2890, 16, 3661, 67, 9353, 33, 2163, 4672, 775, 30, 284, 273, 365, 6315, 74, 1335, 6394, 30, 365, 6315, 74, 273, 8112, 67, 4507, 22, 12, 3707, 30886, 4313, 4763, ...
name = self.create_tmp_folder(ftp_ip,ftp_login,ftp_password,ftp_folder)
try: name = self.create_tmp_folder(ftp_ip,ftp_login,ftp_password,ftp_folder) except ExtractError, error: show_error(error.message) return
def extract_xiso(self): self.extracted_filename = None
a6ef4f25fa15a2156938c04a6c69e5a33e8780ad /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2692/a6ef4f25fa15a2156938c04a6c69e5a33e8780ad/gxiso.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2608, 67, 5674, 83, 12, 2890, 4672, 365, 18, 8004, 329, 67, 3459, 273, 599, 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...
[ 1, 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, 2608, 67, 5674, 83, 12, 2890, 4672, 365, 18, 8004, 329, 67, 3459, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
self._send_method_frame(0, (10, 60), args)
self._send_method_frame((10, 60), args)
def close(self, reply_code=0, reply_text='', method_sig=(0, 0)): """ request a connection close
53019bb5fd2a3405591b5928a9feefa8d7b950c8 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10764/53019bb5fd2a3405591b5928a9feefa8d7b950c8/client_0_8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 16, 4332, 67, 710, 33, 20, 16, 4332, 67, 955, 2218, 2187, 707, 67, 7340, 28657, 20, 16, 374, 3719, 30, 3536, 590, 279, 1459, 1746, 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, 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, 1746, 12, 2890, 16, 4332, 67, 710, 33, 20, 16, 4332, 67, 955, 2218, 2187, 707, 67, 7340, 28657, 20, 16, 374, 3719, 30, 3536, 590, 279, 1459, 1746, 2, -100, -100, -100, -100, -100, -1...
os.system('mkisofs %s %s %s -o %s/%s %s' % (mkisofsargs, volname, bootargs, isofile, self.topdir))
os.system('mkisofs %s %s %s -o %s %s' % (mkisofsargs, volname, bootargs, isofile, self.topdir))
def doCreateIsos(self): anaruntime = '/usr/lib/anaconda-runtime/boot' discinfofile = os.path.join(self.topdir, '.discinfo') # we use this a fair amount mkisofsargs = '-v -U -J -R -T -V' # common mkisofs flags bootargs = '' x86bootargs = '-b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table' ia64bootargs = '-b images/boot.img -no-emul-boot' ppcbootargs = '-part -hfs -r -l -sysid PPC -map %s -magic %s -no-desktop -allow-multidot -chrp-boot -hfs-bless' % (os.path.join(anaruntime, 'mapping'), os.path.join(anaruntime, 'magic')) os.makedirs(self.isodir) isolist=[] for disc in range(1, self.config.getint('default', 'discs') + 1): # cycle through the CD isos volname = '"%s %s %s Disc %s"' % (self.config.get('default', 'product_name'), self.config.get('default', 'version'), self.config.get('default', 'arch'), disc) # hacky :/ isoname = '%s-%s-%s-disc%s.iso' % (self.config.get('default', 'iso_basename'), self.config.get('default', 'version'), self.config.get('default', 'arch'), disc) if disc == 1: # if this is the first disc, we want to set boot flags if self.config.get('default', 'arch') == 'i386' or self.config.get('default', 'arch') == 'x86_64': bootargs = x86bootargs elif self.config.get('default', 'arch') == 'ia64': bootargs = ia64bootargs elif self.config.get('default', 'arch') == 'ppc': bootargs = "%s %s" % (ppcbootargs, os.path.join('%s-disc%s' % (self.topdir, disc), "ppc/mac")) else: bootargs = '' # clear out any existing bootargs
8bb0495b634407cc85cacc920c1c45873db6ed6e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8489/8bb0495b634407cc85cacc920c1c45873db6ed6e/pungi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 1684, 2520, 538, 12, 2890, 4672, 392, 297, 29332, 273, 1173, 13640, 19, 2941, 19, 13848, 591, 2414, 17, 9448, 19, 7137, 11, 19169, 1376, 768, 273, 1140, 18, 803, 18, 5701, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1684, 2520, 538, 12, 2890, 4672, 392, 297, 29332, 273, 1173, 13640, 19, 2941, 19, 13848, 591, 2414, 17, 9448, 19, 7137, 11, 19169, 1376, 768, 273, 1140, 18, 803, 18, 5701, 12, 289...
result = t.absfile( result )
result = T.absfile( result )
def get_local( self, existing=0 ): """ Return a valid, absolute path. Either the existing original or with all substitutions for which environment variables exist. This function is time consuming (absfile - os.realpath is the culprit). @param existing: don't return a non-existing path @type existing: 0|1 @return: valid absolute path in current environment @rtype: str @raise LocalPathError: if existing==1 and no existing path can be constructed via environment variables """ result = string.join( [ f[0] for f in self.fragments ], '' ) result = t.absfile( result )
3c3e49363a7a3c916b648c6154d8aef255c31d3e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/482/3c3e49363a7a3c916b648c6154d8aef255c31d3e/LocalPath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3729, 12, 365, 16, 2062, 33, 20, 262, 30, 3536, 2000, 279, 923, 16, 4967, 589, 18, 14635, 326, 2062, 2282, 578, 598, 777, 23368, 364, 1492, 3330, 3152, 1005, 18, 1220, 445, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 365, 16, 2062, 33, 20, 262, 30, 3536, 2000, 279, 923, 16, 4967, 589, 18, 14635, 326, 2062, 2282, 578, 598, 777, 23368, 364, 1492, 3330, 3152, 1005, 18, 1220, 445, ...
if not found:
if not any(loc.lower().startswith("en") for loc in localeSet):
def setLocaleSet(self, localeSet=None, fallback=True): """ Resets the c{I18nManager locale set c{List}.
c9efc6d061529bd9cd11f7029c50fd2b6b69b7d9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9228/c9efc6d061529bd9cd11f7029c50fd2b6b69b7d9/i18nmanager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 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, 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, 19848, 694, 12, 2890, 16, 2573, 694, 33, 7036, 16, 5922, 33, 5510, 4672, 3536, 1124, 2413, 326, 276, 95, 45, 2643, 82, 1318, 2573, 444, 276, 95, 682, 5496, 2, -100, -100, -100, -100, ...
import pdb;pdb.set_trace()
def test_getPAZ(self): """ Test for the Client.getPAZ function. As reference the EHZ channel of MANZ is taken, the result is compared to the entries of the local response file of the Bavarian network. """ # reference values zeros = [0j, 0j] poles = [-3.700400e-02 + 3.701600e-02j, -3.700400e-02 - 3.701600e-02j, - 2.513300e+02 + 0.000000e+00j, -1.310400e+02 - 4.672900e+02j, - 1.310400e+02 + 4.672900e+02j] gain = 6.0077e+07 sensitivity = 2.5168e+09 # initialize client client = Client() start = UTCDateTime(2009, 1, 1) end = start + 1 # fetch poles and zeros paz = client.getPAZ('BW', 'MANZ', '', 'EHZ', start, end) self.assertEqual(gain, paz['gain']) self.assertEqual(poles, paz['poles']) self.assertEqual(zeros, paz['zeros']) # can only compare four decimal places self.assertAlmostEqual(sensitivity / 1e9, paz['sensitivity'] / 1e9, places=4) import pdb;pdb.set_trace()
ae6b97446ca425e5af726d7660005e5203d1dc9f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/ae6b97446ca425e5af726d7660005e5203d1dc9f/test_client.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 588, 4066, 62, 12, 2890, 4672, 3536, 7766, 364, 326, 2445, 18, 588, 4066, 62, 445, 18, 225, 2970, 2114, 326, 512, 44, 62, 1904, 434, 20972, 62, 353, 9830, 16, 326, 563, 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, 1842, 67, 588, 4066, 62, 12, 2890, 4672, 3536, 7766, 364, 326, 2445, 18, 588, 4066, 62, 445, 18, 225, 2970, 2114, 326, 512, 44, 62, 1904, 434, 20972, 62, 353, 9830, 16, 326, 563, 353...
v[1] = list(sorted((si, se) for (si, (se, void)) in v[1].iteritems()))
v[1] = sorted((si, se) for (si, (se, void)) in v[1].iteritems())
def keyfunc((k, v), ltrs=uppercase+'_'): # hack: mutate the subitems dicts to a list v[1] = list(sorted((si, se) for (si, (se, void)) in v[1].iteritems())) # now calculate the key letter = k[0].upper() if letter in ltrs: return letter else: # get all other symbols under one heading return 'Symbols'
eb6bc55cf6a2f60dae70f2c9c0dff83addc51cae /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5620/eb6bc55cf6a2f60dae70f2c9c0dff83addc51cae/environment.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 644, 12443, 79, 16, 331, 3631, 328, 28007, 33, 5797, 3593, 6797, 4623, 4672, 468, 11769, 30, 15887, 326, 720, 3319, 15838, 358, 279, 666, 331, 63, 21, 65, 273, 3115, 12443, 7722, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 498, 644, 12443, 79, 16, 331, 3631, 328, 28007, 33, 5797, 3593, 6797, 4623, 4672, 468, 11769, 30, 15887, 326, 720, 3319, 15838, 358, 279, 666, 331, 63, 21, 65, 273, 3115, 12443, 7722, ...
self.log.verbose( 'Priority for TaskQueue: %s' % taskQueuePriority ) taskQueueCPU = taskQueueDict['CPUTime'] self.log.verbose( 'CPUTime for TaskQueue: %s' % taskQueueCPU )
self.log.verbose( 'Priority for TaskQueue %s:' % taskQueueID, taskQueuePriority ) taskQueueCPU = max( taskQueueDict['CPUTime'], self.am_getOption('lowestCPUBoost') ) self.log.verbose( 'CPUTime for TaskQueue %s:' % taskQueueID, taskQueueCPU )
def submitPilotsForTaskQueue(self, taskQueueDict, waitingPilots, pilotsPerPriority ):
6271afc9c4bbb66e2201ad46655c110521589002 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/6271afc9c4bbb66e2201ad46655c110521589002/TaskQueueDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 1290, 2174, 3183, 12, 2890, 16, 1562, 3183, 5014, 16, 7336, 52, 330, 6968, 16, 24970, 6968, 2173, 8183, 262, 30, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 52, 330, 6968, 1290, 2174, 3183, 12, 2890, 16, 1562, 3183, 5014, 16, 7336, 52, 330, 6968, 16, 24970, 6968, 2173, 8183, 262, 30, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
import profile, pstats
try: import cProfile as profile profile except ImportError: import profile import pstats
def publish_module_profiled(module_name, stdin=sys.stdin, stdout=sys.stdout, stderr=sys.stderr, environ=os.environ, debug=0, request=None, response=None): import profile, pstats global _pstat _plock.acquire() try: if request is not None: path_info=request.get('PATH_INFO') else: path_info=environ.get('PATH_INFO') if path_info[-14:]=='manage_profile': return _pfunc(module_name, stdin=stdin, stdout=stdout, stderr=stderr, environ=environ, debug=debug, request=request, response=response) pobj=profile.Profile() pobj.runcall(pm, module_name, stdin, stdout, stderr, environ, debug, request, response) result=sys._pr_ pobj.create_stats() if _pstat is None: from cStringIO import StringIO stream = StringIO() _pstat = sys._ps_ = pstats.Stats(pobj, stream=stream) else: _pstat.add(pobj) finally: _plock.release() if result is None: try: error=sys.exc_info() file=open(_pfile, 'w') file.write( "See the url " "http://www.python.org/doc/current/lib/module-profile.html" "\n for information on interpreting profiler statistics.\n\n" ) sys.stdout=file _pstat.strip_dirs().sort_stats('cumulative').print_stats(250) _pstat.strip_dirs().sort_stats('time').print_stats(250) file.flush() file.close() except: pass raise error[0], error[1], error[2] return result
7c6f7af213e492374a6b6e0ffb53acf21bb7a155 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9658/7c6f7af213e492374a6b6e0ffb53acf21bb7a155/Publish.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 2978, 67, 5040, 72, 12, 2978, 67, 529, 16, 8801, 33, 9499, 18, 21772, 16, 3909, 33, 9499, 18, 10283, 16, 4514, 33, 9499, 18, 11241, 16, 5473, 33, 538, 18, 28684, 16, 1198, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3808, 67, 2978, 67, 5040, 72, 12, 2978, 67, 529, 16, 8801, 33, 9499, 18, 21772, 16, 3909, 33, 9499, 18, 10283, 16, 4514, 33, 9499, 18, 11241, 16, 5473, 33, 538, 18, 28684, 16, 1198, ...
outl.color=CreateCMYKColor(0, 0, 0, ord(chunk.data[offset+0x38]) /255.0)
outl.color=CreateCMYKColor(0, 0, 0, 1.0 - ord(chunk.data[offset+0x38]) /255.0)
def process_outline(self, chunk, usual): cdr_version=self.cdr_version outl = Outline() outl.outlineIndex='%02X'%ord(chunk.data[0]) + '%02X'%ord(chunk.data[1]) + '%02X'%ord(chunk.data[2]) + '%02X'%ord(chunk.data[3])
955d280f53fe166578f3136fa19c88305fad76c7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3123/955d280f53fe166578f3136fa19c88305fad76c7/cdrloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 25134, 12, 2890, 16, 2441, 16, 25669, 4672, 276, 3069, 67, 1589, 33, 2890, 18, 71, 3069, 67, 1589, 596, 80, 273, 2976, 1369, 1435, 596, 80, 18, 25134, 1016, 28713, 3103, 60, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 25134, 12, 2890, 16, 2441, 16, 25669, 4672, 276, 3069, 67, 1589, 33, 2890, 18, 71, 3069, 67, 1589, 596, 80, 273, 2976, 1369, 1435, 596, 80, 18, 25134, 1016, 28713, 3103, 60, ...
if line == '\n' or line == '':
if line == '\n' or not line:
def _install_message(self, message): """Write message contents and return (start, stop).""" start = self._file.tell() if isinstance(message, BabylMessage): special_labels = [] labels = [] for label in message.get_labels(): if label in self._special_labels: special_labels.append(label) else: labels.append(label) self._file.write('1') for label in special_labels: self._file.write(', ' + label) self._file.write(',,') for label in labels: self._file.write(' ' + label + ',') self._file.write(os.linesep) else: self._file.write('1,,' + os.linesep) if isinstance(message, email.message.Message): orig_buffer = StringIO.StringIO() orig_generator = email.generator.Generator(orig_buffer, False, 0) orig_generator.flatten(message) orig_buffer.seek(0) while True: line = orig_buffer.readline() self._file.write(line.replace('\n', os.linesep)) if line == '\n' or line == '': break self._file.write('*** EOOH ***' + os.linesep) if isinstance(message, BabylMessage): vis_buffer = StringIO.StringIO() vis_generator = email.generator.Generator(vis_buffer, False, 0) vis_generator.flatten(message.get_visible()) while True: line = vis_buffer.readline() self._file.write(line.replace('\n', os.linesep)) if line == '\n' or line == '': break else: orig_buffer.seek(0) while True: line = orig_buffer.readline() self._file.write(line.replace('\n', os.linesep)) if line == '\n' or line == '': break while True: buffer = orig_buffer.read(4096) # Buffer size is arbitrary. if buffer == '': break self._file.write(buffer.replace('\n', os.linesep)) elif isinstance(message, str): body_start = message.find('\n\n') + 2 if body_start - 2 != -1: self._file.write(message[:body_start].replace('\n', os.linesep)) self._file.write('*** EOOH ***' + os.linesep) self._file.write(message[:body_start].replace('\n', os.linesep)) self._file.write(message[body_start:].replace('\n', os.linesep)) else: self._file.write('*** EOOH ***' + os.linesep + os.linesep) self._file.write(message.replace('\n', os.linesep)) elif hasattr(message, 'readline'): original_pos = message.tell() first_pass = True while True: line = message.readline() self._file.write(line.replace('\n', os.linesep)) if line == '\n' or line == '': self._file.write('*** EOOH ***' + os.linesep) if first_pass: first_pass = False message.seek(original_pos) else: break while True: buffer = message.read(4096) # Buffer size is arbitrary. if buffer == '': break self._file.write(buffer.replace('\n', os.linesep)) else: raise TypeError('Invalid message type: %s' % type(message)) stop = self._file.tell() return (start, stop)
3ae5cf1ce9baf6330ccf73291ebfeaee2c111013 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/3ae5cf1ce9baf6330ccf73291ebfeaee2c111013/mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5425, 67, 2150, 12, 2890, 16, 883, 4672, 3536, 3067, 883, 2939, 471, 327, 261, 1937, 16, 2132, 13, 12123, 787, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 1549, 12, 2150, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5425, 67, 2150, 12, 2890, 16, 883, 4672, 3536, 3067, 883, 2939, 471, 327, 261, 1937, 16, 2132, 13, 12123, 787, 273, 365, 6315, 768, 18, 88, 1165, 1435, 309, 1549, 12, 2150, 16, ...
`G`. The columns represent the the conjugacy classes of
`G`. The columns represent the conjugacy classes of
def character_table(self): r""" Returns the matrix of values of the irreducible characters of a permutation group `G` at the conjugacy classes of `G`. The columns represent the the conjugacy classes of `G` and the rows represent the different irreducible characters in the ordering given by GAP. EXAMPLES:: sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3)]]) sage: G.order() 12 sage: G.character_table() [ 1 1 1 1] [ 1 1 -zeta3 - 1 zeta3] [ 1 1 zeta3 -zeta3 - 1] [ 3 -1 0 0] sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3)]]) sage: CT = gap(G).CharacterTable() Type ``print gap.eval("Display(%s)"%CT.name())`` to display this nicely. :: sage: G = PermutationGroup([[(1,2),(3,4)], [(1,2,3,4)]]) sage: G.order() 8 sage: G.character_table() [ 1 1 1 1 1] [ 1 -1 -1 1 1] [ 1 -1 1 -1 1] [ 1 1 -1 -1 1] [ 2 0 0 0 -2] sage: CT = gap(G).CharacterTable() Again, type ``print gap.eval("Display(%s)"%CT.name())`` to display this nicely. :: sage: SymmetricGroup(2).character_table() [ 1 -1] [ 1 1] sage: SymmetricGroup(3).character_table() [ 1 -1 1] [ 2 0 -1] [ 1 1 1] sage: SymmetricGroup(5).character_table() [ 1 -1 1 1 -1 -1 1] [ 4 -2 0 1 1 0 -1] [ 5 -1 1 -1 -1 1 0] [ 6 0 -2 0 0 0 1] [ 5 1 1 -1 1 -1 0] [ 4 2 0 1 -1 0 -1] [ 1 1 1 1 1 1 1] sage: list(AlternatingGroup(6).character_table()) [(1, 1, 1, 1, 1, 1, 1), (5, 1, 2, -1, -1, 0, 0), (5, 1, -1, 2, -1, 0, 0), (8, 0, -1, -1, 0, zeta5^3 + zeta5^2 + 1, -zeta5^3 - zeta5^2), (8, 0, -1, -1, 0, -zeta5^3 - zeta5^2, zeta5^3 + zeta5^2 + 1), (9, 1, 0, 0, 1, -1, -1), (10, -2, 1, 1, 0, 0, 0)] Suppose that you have a class function `f(g)` on `G` and you know the values `v_1, ..., v_n` on the conjugacy class elements in ``conjugacy_classes_representatives(G)`` = `[g_1, \ldots, g_n]`. Since the irreducible characters `\rho_1, \ldots, \rho_n` of `G` form an `E`-basis of the space of all class functions (`E` a "sufficiently large" cyclotomic field), such a class function is a linear combination of these basis elements, `f = c_1\rho_1 + \cdots + c_n\rho_n`. To find the coefficients `c_i`, you simply solve the linear system ``character_table_values(G)``\*`[v_1, ..., v_n] = [c_1, ..., c_n]`, where `[v_1, ...,v_n]` = ``character_table_values(G)`` `^{-1}[c_1, ...,c_n]`. AUTHORS: - David Joyner and William Stein (2006-01-04)
1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1a05983ebb3835bbd44e7ffd0287f6bbaee2ac36/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3351, 67, 2121, 12, 2890, 4672, 436, 8395, 2860, 326, 3148, 434, 924, 434, 326, 9482, 1118, 5286, 1523, 3949, 434, 279, 17440, 1041, 1375, 43, 68, 622, 326, 10550, 637, 3505, 3318, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3351, 67, 2121, 12, 2890, 4672, 436, 8395, 2860, 326, 3148, 434, 924, 434, 326, 9482, 1118, 5286, 1523, 3949, 434, 279, 17440, 1041, 1375, 43, 68, 622, 326, 10550, 637, 3505, 3318, 434, ...
colfuncs[name.lower()] = (self._ambiguous_processor(origname), i, "ambiguous")
colfuncs[origname.lower()] = (self._ambiguous_processor(origname), i, "ambiguous")
def getcol(row): return processor(row[index])
463f73f80dcc3a35d9b4fe114445aa41bc2e933b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1074/463f73f80dcc3a35d9b4fe114445aa41bc2e933b/base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1293, 12, 492, 4672, 327, 6659, 12, 492, 63, 1615, 5717, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1293, 12, 492, 4672, 327, 6659, 12, 492, 63, 1615, 5717, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
originalDepth = lfnDict.get('AncestorDepth',1) ancestors = lfnDict.get('Ancestors',[])
originalDepth = lfnDict.get( 'AncestorDepth', 1 ) ancestors = lfnDict.get( 'Ancestors', [] )
def _populateFileAncestors(self,lfns,connection=False): connection = self._getConnection(connection) successful = {} failed = {} for lfn,lfnDict in lfns.items(): originalFileID = lfnDict['FileID'] originalDepth = lfnDict.get('AncestorDepth',1) ancestors = lfnDict.get('Ancestors',[]) if lfn in ancestors: ancestors.remove(lfn) if not ancestors: successful[lfn] = True continue res = self._findFiles(ancestors,connection=connection) if res['Value']['Failed']: failed[lfn] = "Failed to resolve ancestor files" continue ancestorIDs = res['Value']['Successful'] fileIDLFNs = {} toInsert = {} for ancestor in ancestorIDs.keys(): fileIDLFNs[ancestorIDs[ancestor]['FileID']] = ancestor toInsert[ancestorIDs[ancestor]['FileID']] = originalDepth res = self._getFileAncestors(fileIDLFNs.keys()) if not res['OK']: failed[lfn] = "Failed to obtain all ancestors" continue fileIDAncestorDict = res['Value'] for fileID,fileIDDict in fileIDAncestorDict.items(): for ancestorID,relativeDepth in fileIDDict.items(): toInsert[ancestorID] = relativeDepth+originalDepth res = self._insertFileAncestors(originalFileID,toInsert,connection=connection) if not res['OK']: failed[lfn] = "Failed to insert ancestor files" else: successful[lfn] = True return S_OK({'Successful':successful,'Failed':failed})
26c5008a7adbc1c761e2409bed59b7710e5f2c74 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/26c5008a7adbc1c761e2409bed59b7710e5f2c74/FileManagerBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 19936, 812, 28304, 12, 2890, 16, 20850, 2387, 16, 4071, 33, 8381, 4672, 1459, 273, 365, 6315, 588, 1952, 12, 4071, 13, 6873, 273, 2618, 2535, 273, 2618, 364, 328, 4293, 16, 80, 42...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19936, 812, 28304, 12, 2890, 16, 20850, 2387, 16, 4071, 33, 8381, 4672, 1459, 273, 365, 6315, 588, 1952, 12, 4071, 13, 6873, 273, 2618, 2535, 273, 2618, 364, 328, 4293, 16, 80, 42...
hostbuf, _c.NI_MAXHOST, portbuf, _c.NI_MAXSERV, flags)
hostbuf, maxhost, portbuf, _c.size_t(_c.NI_MAXSERV), flags)
def getnameinfo(space, w_sockaddr, flags): """getnameinfo(sockaddr, flags) --> (host, port) Get host and port for a sockaddr.""" w_flowinfo = w_scope_id = space.wrap(0) sockaddr_len = space.int_w(space.len(w_sockaddr)) if sockaddr_len == 2: w_host, w_port = space.unpackiterable(w_sockaddr, 2) elif sockaddr_len == 3: w_host, w_port, w_flowinfo = space.unpackiterable(w_sockaddr, 3) elif sockaddr_len == 4: w_host, w_port, w_flowinfo, w_scope_id = space.unpackiterable(w_sockaddr, 4) else: raise OperationError(space.w_TypeError, space.wrap('argument 1 should be 2-4 items (%d given)' % sockaddr_len)) host = space.str_w(w_host) port = space.int_w(w_port) flowinfo = space.int_w(w_flowinfo) scope_id = space.int_w(w_scope_id) res = _c.addrinfo_ptr() hints = _c.addrinfo() hints.ai_family = _c.AF_UNSPEC hints.ai_socktype = _c.SOCK_DGRAM retval = _c.getaddrinfo(host, str(port), ctypes.pointer(hints), ctypes.pointer(res)) if retval != 0: raise w_get_socketgaierror(space, None, retval) family = res.contents.ai_family if family == _c.AF_INET: if sockaddr_len != 2: if res: _c.freeaddrinfo(res) raise OperationError(space.w_TypeError, space.wrap('argument 1 should be 2 items (%d given)' % sockaddr_len)) elif family == _c.AF_INET6: sin6_ptr = ctypes.cast(res.contents.ai_addr, ctypes.POINTER(_c.sockaddr_in6)) sin6_ptr.contents.sin6_flowinfo = flowinfo sin6_ptr.contents.sin6_scope_id = scope_id hostbuf = ctypes.create_string_buffer(_c.NI_MAXHOST) portbuf = ctypes.create_string_buffer(_c.NI_MAXSERV) error = _c.getnameinfo(res.contents.ai_addr, res.contents.ai_addrlen, hostbuf, _c.NI_MAXHOST, portbuf, _c.NI_MAXSERV, flags) if res: _c.freeaddrinfo(res) if error: raise w_get_socketgaierror(space, None, error) return space.newtuple([space.wrap(hostbuf.value), space.wrap(portbuf.value)])
88948e99d98ca6bfcb16333811cc2a968de45870 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/88948e99d98ca6bfcb16333811cc2a968de45870/interp_socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 529, 1376, 12, 2981, 16, 341, 67, 15031, 4793, 16, 2943, 4672, 3536, 588, 529, 1376, 12, 15031, 4793, 16, 2943, 13, 15431, 261, 2564, 16, 1756, 13, 225, 968, 1479, 471, 1756, 364,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 529, 1376, 12, 2981, 16, 341, 67, 15031, 4793, 16, 2943, 4672, 3536, 588, 529, 1376, 12, 15031, 4793, 16, 2943, 13, 15431, 261, 2564, 16, 1756, 13, 225, 968, 1479, 471, 1756, 364,...
print 'b', len(tmp)
def load_strokemap_from_file(self, f, translate_x, translate_y): assert not self.strokes brushes = [] while True: t = f.read(1) if t == 'b': length, = struct.unpack('>I', f.read(4)) tmp = f.read(length) brushes.append(zlib.decompress(tmp)) print 'b', len(tmp) elif t == 's': brush_id, length = struct.unpack('>II', f.read(2*4)) stroke = strokemap.StrokeShape() tmp = f.read(length) stroke.init_from_string(tmp, translate_x, translate_y) stroke.brush_string = brushes[brush_id] self.strokes.append(stroke) print 's', len(tmp) elif t == '}': break else: assert False, 'invalid strokemap'
52d49c8b4081c4cd637f92f1af8841571f79b3ec /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7129/52d49c8b4081c4cd637f92f1af8841571f79b3ec/layer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 334, 3250, 25248, 67, 2080, 67, 768, 12, 2890, 16, 284, 16, 4204, 67, 92, 16, 4204, 67, 93, 4672, 1815, 486, 365, 18, 334, 3250, 281, 5186, 1218, 281, 273, 5378, 1323, 1053...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 334, 3250, 25248, 67, 2080, 67, 768, 12, 2890, 16, 284, 16, 4204, 67, 92, 16, 4204, 67, 93, 4672, 1815, 486, 365, 18, 334, 3250, 281, 5186, 1218, 281, 273, 5378, 1323, 1053...
dest_repo = repository(ui, dest, create=True)
try: dest_repo = repository(ui, dest, create=True) except OSError, inst: if inst.errno == errno.EEXIST: dir_cleanup.close() raise util.Abort(_("destination '%s' already exists") % dest) raise
def force_copy(src, dst): try: util.copyfiles(src, dst) except OSError, inst: if inst.errno != errno.ENOENT: raise
75ba4db3dbc6e6e42055ad13295a0ede358f5b00 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11312/75ba4db3dbc6e6e42055ad13295a0ede358f5b00/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 3530, 12, 4816, 16, 3046, 4672, 775, 30, 1709, 18, 3530, 2354, 12, 4816, 16, 3046, 13, 1335, 10002, 16, 1804, 30, 309, 1804, 18, 19088, 480, 8402, 18, 1157, 51, 2222, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2944, 67, 3530, 12, 4816, 16, 3046, 4672, 775, 30, 1709, 18, 3530, 2354, 12, 4816, 16, 3046, 13, 1335, 10002, 16, 1804, 30, 309, 1804, 18, 19088, 480, 8402, 18, 1157, 51, 2222, 30, 1...
request.theme.add_msg('<strong>%s</strong><br>%s' % (
request.theme.add_msg('<strong>%s</strong><br>' % (
def send_page(self, **keywords): """ Output the formatted page.
06a4349c3d48a551cc02c2bfe66bcd631ddce69e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/06a4349c3d48a551cc02c2bfe66bcd631ddce69e/Page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2433, 12, 2890, 16, 2826, 11771, 4672, 3536, 3633, 326, 4955, 1363, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 2433, 12, 2890, 16, 2826, 11771, 4672, 3536, 3633, 326, 4955, 1363, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if self.timeout <= 0.0 or self.fd < 0:
if self.timeout <= 0.0 or self.fd == _c.INVALID_SOCKET:
def _select(self, for_writing): """Returns 0 when reading/writing is possible, 1 when timing out and -1 on error.""" if self.timeout <= 0.0 or self.fd < 0: # blocking I/O or no socket. return 0 tv = rffi.make(_c.timeval) rffi.setintfield(tv, 'tv_sec', int(self.timeout)) rffi.setintfield(tv, 'tv_usec', int((self.timeout-int(self.timeout)) * 1000000)) fds = rffi.make(_c.fd_set) rffi.setintfield(fds, 'fd_count', 1) fds.fd_array[0] = rffi.cast(socketfd_type, self.fd) null = lltype.nullptr(fd_set) if for_writing: n = _c.select(self.fd + 1, null, fds, null, tv) else: n = _c.select(self.fd + 1, fds, null, null, tv) lltype.free(fds, flavor='raw') lltype.free(tv, flavor='raw') if n < 0: return -1 if n == 0: return 1 return 0
7d6fe35b18e8a20cd02bce56209ad0aa1f4cf1f0 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6934/7d6fe35b18e8a20cd02bce56209ad0aa1f4cf1f0/rsocket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4025, 12, 2890, 16, 364, 67, 14345, 4672, 3536, 1356, 374, 1347, 6453, 19, 14345, 353, 3323, 16, 404, 1347, 15538, 596, 471, 300, 21, 603, 555, 12123, 309, 365, 18, 4538, 1648, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4025, 12, 2890, 16, 364, 67, 14345, 4672, 3536, 1356, 374, 1347, 6453, 19, 14345, 353, 3323, 16, 404, 1347, 15538, 596, 471, 300, 21, 603, 555, 12123, 309, 365, 18, 4538, 1648, 37...
L2 = L
L2 = L[:]
def test_long(self): self.assertEqual(long(314), 314L) self.assertEqual(long(3.14), 3L) self.assertEqual(long(314L), 314L) # Check that conversion from float truncates towards zero self.assertEqual(long(-3.14), -3L) self.assertEqual(long(3.9), 3L) self.assertEqual(long(-3.9), -3L) self.assertEqual(long(3.5), 3L) self.assertEqual(long(-3.5), -3L) self.assertEqual(long("-3"), -3L) if have_unicode: self.assertEqual(long(unicode("-3")), -3L) # Different base: self.assertEqual(long("10",16), 16L) if have_unicode: self.assertEqual(long(unicode("10"),16), 16L) # Check conversions from string (same test set as for int(), and then some) LL = [ ('1' + '0'*20, 10L**20), ('1' + '0'*100, 10L**100) ] L2 = L if have_unicode: L2 += [ (unicode('1') + unicode('0')*20, 10L**20), (unicode('1') + unicode('0')*100, 10L**100), ] for s, v in L2 + LL: for sign in "", "+", "-": for prefix in "", " ", "\t", " \t\t ": ss = prefix + sign + s vv = v if sign == "-" and v is not ValueError: vv = -v try: self.assertEqual(long(ss), long(vv)) except v: pass
8451455586a8a1e8d8beeda491e0c5f1f6bdbbac /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/8451455586a8a1e8d8beeda491e0c5f1f6bdbbac/test_builtin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5748, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 5748, 12, 23, 3461, 3631, 890, 3461, 48, 13, 365, 18, 11231, 5812, 12, 5748, 12, 23, 18, 3461, 3631, 890, 48, 13, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5748, 12, 2890, 4672, 365, 18, 11231, 5812, 12, 5748, 12, 23, 3461, 3631, 890, 3461, 48, 13, 365, 18, 11231, 5812, 12, 5748, 12, 23, 18, 3461, 3631, 890, 48, 13, 365, 18, ...
backrefname = column4ID.backref_make_name( klas, k)
backrefname = column4ID.backref_make_name( klas, attr_name)
def fix_one2many_relations( klas, builder, mapcontext): dbg = 'table' in config.debug or 'relation' in config.debug if dbg: print 'make_one2many_table_columns', klas for k,collect_klas in mapcontext.iter_attr_local( klas, attr_base_klas= relation.Collection, dbg=dbg ): child_klas = collect_klas.assoc_klas if isinstance( child_klas, str): try: child_klas = builder.klasi[ child_klas] except KeyError: assert 0, '''undefined relation/association class %(child_klas)r in %(klas)s.%(name)s''' % locals() #one2many rels can be >1 between 2 tables #and many classes can relate to one child klas with relation with same name backref = collect_klas.backref if backref: #if isinstance( backref, dict): backrefname = backref[ 'name'] #else: backrefname = backref else: backrefname = column4ID.backref_make_name( klas, k) collect_klas.backrefname = backrefname fk_column_name = backrefname fk_column = make_table_column4struct_reference( klas, fk_column_name, klas, mapcontext) if dbg: print ' attr:', k, 'child_klas:', repr(child_klas), 'fk_column:', repr(fk_column) child_tbl = builder.tables[ child_klas] child_tbl.append_column( fk_column) class assoc_details: primary_key= True nullable= True relation_attr= k relation._associate( child_klas, klas, assoc_details, fk_column)
ffae4ebf3afc515593a27491b1fb2ace02f918c3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10808/ffae4ebf3afc515593a27491b1fb2ace02f918c3/builder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 476, 22, 9353, 67, 15018, 12, 417, 9521, 16, 2089, 16, 852, 2472, 4672, 28966, 273, 296, 2121, 11, 316, 642, 18, 4148, 578, 296, 5488, 11, 316, 642, 18, 4148, 309, 28966, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 476, 22, 9353, 67, 15018, 12, 417, 9521, 16, 2089, 16, 852, 2472, 4672, 28966, 273, 296, 2121, 11, 316, 642, 18, 4148, 578, 296, 5488, 11, 316, 642, 18, 4148, 309, 28966, 3...
success = success and compile_dir(dir, maxlevels, None, force)
success = success and compile_dir(dir, maxlevels, None, force, quiet=quiet)
def compile_path(skip_curdir=1, maxlevels=0, force=0): """Byte-compile all module on sys.path. Arguments (all optional): skip_curdir: if true, skip current directory (default true) maxlevels: max recursion level (default 0) force: as for compile_dir() (default 0) """ success = 1 for dir in sys.path: if (not dir or dir == os.curdir) and skip_curdir: print 'Skipping current directory' else: success = success and compile_dir(dir, maxlevels, None, force) return success
83a4dbbe38faea87784738af8d69e340d796bf47 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/83a4dbbe38faea87784738af8d69e340d796bf47/compileall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 803, 12, 7457, 67, 1397, 1214, 33, 21, 16, 943, 12095, 33, 20, 16, 2944, 33, 20, 4672, 3536, 3216, 17, 11100, 777, 1605, 603, 2589, 18, 803, 18, 225, 13599, 261, 454, 3129,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4074, 67, 803, 12, 7457, 67, 1397, 1214, 33, 21, 16, 943, 12095, 33, 20, 16, 2944, 33, 20, 4672, 3536, 3216, 17, 11100, 777, 1605, 603, 2589, 18, 803, 18, 225, 13599, 261, 454, 3129,...
if kw.get(field): if current_val != True: activity = SystemActivity(identity.current.user, 'WEBUI', 'Changed', field, current_val, "True" ) system.activity.append(activity) else: if current_val != False: activity = SystemActivity(identity.current.user, 'WEBUI', 'Changed', field, current_val, "False" ) system.activity.append(activity)
new_val = str(kw.get(field) or False) if current_val != new_val: activity = SystemActivity(identity.current.user, 'WEBUI', 'Changed', field, current_val, new_val ) system.activity.append(activity)
def save(self, **kw): if kw.get('id'): try: system = System.by_id(kw['id'],identity.current.user) except InvalidRequestError: flash( _(u"Unable to save %s" % kw['id']) ) redirect("/") system.fqdn = kw['fqdn'] else: if System.query().filter(System.fqdn == kw['fqdn']).count() != 0: flash( _(u"%s already exists!" % kw['fqdn']) ) redirect("/") system = System(fqdn=kw['fqdn'],owner=identity.current.user)
9a849996b6c948aa2626749fdacccc2303455431 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/9a849996b6c948aa2626749fdacccc2303455431/controllers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 2826, 9987, 4672, 309, 5323, 18, 588, 2668, 350, 11, 4672, 775, 30, 2619, 273, 2332, 18, 1637, 67, 350, 12, 9987, 3292, 350, 17337, 10781, 18, 2972, 18, 1355, 13, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 12, 2890, 16, 2826, 9987, 4672, 309, 5323, 18, 588, 2668, 350, 11, 4672, 775, 30, 2619, 273, 2332, 18, 1637, 67, 350, 12, 9987, 3292, 350, 17337, 10781, 18, 2972, 18, 1355, 13, ...
charset = 'CHARSET ' + charset typ, dat = apply(self._simple_command, (name, charset) + criteria)
typ, dat = apply(self._simple_command, (name, 'CHARSET', charset) + criteria) else: typ, dat = apply(self._simple_command, (name,) + criteria)
def search(self, charset, *criteria): """Search mailbox for matching messages.
e214b2c6633ccc3350e1aa71f3b25bdfc09a38d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/e214b2c6633ccc3350e1aa71f3b25bdfc09a38d2/imaplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4856, 16, 380, 9714, 4672, 3536, 2979, 14187, 364, 3607, 2743, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 12, 2890, 16, 4856, 16, 380, 9714, 4672, 3536, 2979, 14187, 364, 3607, 2743, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
class EXTCREATEFONTINDIRECTW(EMR_UNKNOWN):
class _EXTCREATEFONTINDIRECTW(_EMR_UNKNOWN):
def __init__(self,bounds=(0,0,0,0)): EMR_UNKNOWN.__init__(self) self.setBounds(bounds)
688318604ffe18a54bb261a3bde4bf6e1784a8de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8136/688318604ffe18a54bb261a3bde4bf6e1784a8de/pyemf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10576, 28657, 20, 16, 20, 16, 20, 16, 20, 3719, 30, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 5694, 12, 10576, 13, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 10576, 28657, 20, 16, 20, 16, 20, 16, 20, 3719, 30, 7141, 54, 67, 14737, 16186, 2738, 972, 12, 2890, 13, 365, 18, 542, 5694, 12, 10576, 13, 2, -100, ...
if (total-1)/items_per_page * page != 0:
if (total-1)/(items_per_page * page) != 0:
def search_in_author(request, lang, tag, response_type, items_per_page, page, start_index, main_title): ''' search only by authors''' tags = Tag.objects.all().order_by("name") langs = available_languages() author = request.GET['author'] if not author: return no_results(request, response_type, main_title) main_title['author'] = author #TODO language in author_search authors = SEARCH_ENGINE.author_search(author=author, lang=lang, tag=tag, max_length=10) if not authors: return no_results(request, response_type, main_title, authors.suggestion) total = len(authors) next = None if (total-1)/items_per_page * page != 0: next = page+1 if response_type == "atom": return render_response(request, 'book/opds/authors_search_response.xml', {'authors': authors[start_index:start_index+items_per_page], 'title': main_title, 'curr': page, 'next':next, 'author': author, 'items_per_page':items_per_page, 'total':total }) if response_type == "xhtml": return render_response(request, 'book/xhtml/authors_search_response.xml', {'authors': authors, 'author': author, 'title':main_title, 'items_per_page':items_per_page, 'tags': tags, 'langs':langs, 'suggestions':authors.suggestion}, context_instance=RequestContext(request))
8262e603b5f1869c1f8573176613bbfab195b4b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4508/8262e603b5f1869c1f8573176613bbfab195b4b6/search_views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 267, 67, 4161, 12, 2293, 16, 3303, 16, 1047, 16, 766, 67, 723, 16, 1516, 67, 457, 67, 2433, 16, 1363, 16, 787, 67, 1615, 16, 2774, 67, 2649, 4672, 9163, 1623, 1338, 635, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 67, 267, 67, 4161, 12, 2293, 16, 3303, 16, 1047, 16, 766, 67, 723, 16, 1516, 67, 457, 67, 2433, 16, 1363, 16, 787, 67, 1615, 16, 2774, 67, 2649, 4672, 9163, 1623, 1338, 635, ...
elif self.displayHint and self.__octetString.isSuperTypeOf(self):
elif self.displayHint and self.__octetString.isSuperTypeOf(value):
def prettyOut(self, value): # override asn1 type method """Implements DISPLAY-HINT evaluation""" if self.displayHint and self.__integer.isSuperTypeOf(self): t, f = apply(lambda t, f=0: (t, f), split(self.displayHint, '-')) if t == 'x': return '0x%x' % value elif t == 'd': try: return '%.*f' % (int(f), float(value)/pow(10, int(f))) except StandardError, why: raise error.SmiError( 'float num evaluation error: %s' % why ) elif t == 'o': return '0%o' % value elif t == 'b': v = value; r = ['B'] while v: r.insert(0, '%d' % (v&0x01)) v = v>>1 return join(r, '') else: raise error.SmiError( 'Unsupported numeric type spec: %s' % t ) elif self.displayHint and self.__octetString.isSuperTypeOf(self): r = '' v = str(self) d = self.displayHint while v and d: # 1 if d[0] == '*': repeatIndicator = repeatCount = int(v[0]) d = d[1:]; v = v[1:] else: repeatCount = 1; repeatIndicator = None # 2 octetLength = '' while d and d[0] in digits: octetLength = octetLength + d[0] d = d[1:] try: octetLength = int(octetLength) except StandardError, why: raise error.SmiError( 'Bad octet length: %s' % octetLength ) if not d: raise error.SmiError( 'Short octet length: %s' % self.displayHint ) # 3 displayFormat = d[0] d = d[1:]
6e0ae426aa8f975a3b82a43b5a44ff5a4f9bf178 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/587/6e0ae426aa8f975a3b82a43b5a44ff5a4f9bf178/SNMPv2-TC.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 1182, 12, 2890, 16, 460, 4672, 225, 468, 3849, 12211, 21, 618, 707, 3536, 17516, 25214, 17, 44, 3217, 9873, 8395, 309, 365, 18, 5417, 7002, 471, 365, 16186, 7745, 18, 291, 8051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7517, 1182, 12, 2890, 16, 460, 4672, 225, 468, 3849, 12211, 21, 618, 707, 3536, 17516, 25214, 17, 44, 3217, 9873, 8395, 309, 365, 18, 5417, 7002, 471, 365, 16186, 7745, 18, 291, 8051, ...
in and be registered by your system administrator for \ this kind of task. If you have a login, use the link \
in and be authorized for this kind of task. If you have a \ login, use the link \
def please_login(req, journal_name, ln="en", title="", message="", backlink=""): """ """ _ = gettext_set_language(ln) if title == "": title_out = _("Please login to perform this action.") else: title_out = title if message == "": message_out = _("In order to publish webjournal issues you must be logged \ in and be registered by your system administrator for \ this kind of task. If you have a login, use the link \ below to login.") else: message_out = message if backlink == "": backlink_out = "%s/journal/issue_control?name=%s" % (weburl, journal_name) else: backlink_out = backlink title_msg = _("We need you to login") body_out = '''<div style="text-align: center;"> <fieldset style="width:400px; margin-left: auto; margin-right: auto;background: url('%s/img/blue_gradient.gif') top left repeat-x;"> <legend style="color:#a70509;background-color:#fff;"><i>%s</i></legend> <p style="text-align:center;">%s</p> <br/> <p><a href="%s/youraccount/login?referer=%s">Login</a></p> <br/> <div style="text-align:right;">Mail<a href="mailto:%s"> the Administrator.</a></div> </fieldset> </div> ''' % (weburl, title_msg, message_out, weburl, backlink_out, adminemail) return page(title = title_out, body = body_out, description = "", keywords = "", language = ln, req = req)
95302ea88121546ed68c8b38bb6cd6cf4b324cd0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12027/95302ea88121546ed68c8b38bb6cd6cf4b324cd0/webjournal_utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9582, 67, 5819, 12, 3658, 16, 13001, 67, 529, 16, 7211, 1546, 275, 3113, 2077, 1546, 3113, 883, 1546, 3113, 1473, 1232, 1546, 6, 4672, 3536, 3536, 389, 273, 24972, 67, 542, 67, 4923, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9582, 67, 5819, 12, 3658, 16, 13001, 67, 529, 16, 7211, 1546, 275, 3113, 2077, 1546, 3113, 883, 1546, 3113, 1473, 1232, 1546, 6, 4672, 3536, 3536, 389, 273, 24972, 67, 542, 67, 4923, 1...
percent = taskcount*100./total_tasks
if total_tasks: percent = taskcount*100./total_tasks else: percent = 0
def stats_processing(request): """ Returns stats about processings """ total_tasks = Processing_task.objects.all().count() kinds = Processing_kind.objects.all().order_by('name') tasks_per_kind = [] for k in kinds: taskcount = Processing_task.objects.filter(kind = k).count() percent = taskcount*100./total_tasks tasks_per_kind.append({'kind': str(k.name), 'count': int(taskcount), 'percent': percent}) failed_tasks = Processing_task.objects.filter(success = 0).count() data = { 'tasksTotal' : int(total_tasks), 'failedTasks' : int(failed_tasks), 'tasksPerKind' : tasks_per_kind, } return HttpResponse(str({'info': data}), mimetype = 'text/plain')
ba7bf8d363e4769fb521f2cb22cf10a9cccf6214 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11651/ba7bf8d363e4769fb521f2cb22cf10a9cccf6214/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3177, 67, 10632, 12, 2293, 4672, 3536, 2860, 3177, 2973, 1207, 899, 3536, 225, 2078, 67, 9416, 273, 19652, 67, 4146, 18, 6911, 18, 454, 7675, 1883, 1435, 21961, 273, 19652, 67, 9224, 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, 3177, 67, 10632, 12, 2293, 4672, 3536, 2860, 3177, 2973, 1207, 899, 3536, 225, 2078, 67, 9416, 273, 19652, 67, 4146, 18, 6911, 18, 454, 7675, 1883, 1435, 21961, 273, 19652, 67, 9224, 18,...