rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
return WeakValuedItemIterator(self)
for wr in self.data.itervalues(): value = wr() if value is not None: yield wr.key, value
def iteritems(self): return WeakValuedItemIterator(self)
61146790992e0a00b76a6bf6ecc9e53289a1ecd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/61146790992e0a00b76a6bf6ecc9e53289a1ecd7/weakref.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7674, 12, 2890, 4672, 327, 23632, 27558, 1180, 3198, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 7674, 12, 2890, 4672, 327, 23632, 27558, 1180, 3198, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
if not hasattr(poodledata,'users'):
if 'users' not in poodledata:
def updateUsers(self): """uddate user informations """ poodledata = self.getPoodleData() users = self.context.getUsers() choices = poodledata['ids']
9915d722e434c25ea7cc90b5ba2d247d161ef207 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11878/9915d722e434c25ea7cc90b5ba2d247d161ef207/poodle_votes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 6588, 12, 2890, 4672, 3536, 20567, 340, 729, 26978, 3536, 293, 7890, 892, 273, 365, 18, 588, 52, 7890, 751, 1435, 3677, 273, 365, 18, 2472, 18, 588, 6588, 1435, 7246, 273, 293, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 6588, 12, 2890, 4672, 3536, 20567, 340, 729, 26978, 3536, 293, 7890, 892, 273, 365, 18, 588, 52, 7890, 751, 1435, 3677, 273, 365, 18, 2472, 18, 588, 6588, 1435, 7246, 273, 293, 7...
None, _("Unable to save song"),
self, _("Unable to save song"),
def __save_files(self, save, revert, model, parent, watcher): updated = {} deleted = {} added = {} for row in model: if row[EDITED] and not row[DELETED]: if row[ORIGVALUE] is not None: updated.setdefault(row[TAG], []) updated[row[TAG]].append((util.decode(row[VALUE]), util.decode(row[ORIGVALUE]))) else: added.setdefault(row[TAG], []) added[row[TAG]].append(util.decode(row[VALUE])) if row[EDITED] and row[DELETED]: if row[ORIGVALUE] is not None: deleted.setdefault(row[TAG], []) deleted[row[TAG]].append(util.decode(row[ORIGVALUE]))
e17c14923098f5b9bcd8929f8359fdba9ad0bf96 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/e17c14923098f5b9bcd8929f8359fdba9ad0bf96/edittags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5688, 67, 2354, 12, 2890, 16, 1923, 16, 15226, 16, 938, 16, 982, 16, 9527, 4672, 3526, 273, 2618, 4282, 273, 2618, 3096, 273, 2618, 364, 1027, 316, 938, 30, 309, 1027, 63, 10776,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5688, 67, 2354, 12, 2890, 16, 1923, 16, 15226, 16, 938, 16, 982, 16, 9527, 4672, 3526, 273, 2618, 4282, 273, 2618, 3096, 273, 2618, 364, 1027, 316, 938, 30, 309, 1027, 63, 10776,...
def x11(context):
def x11(context, myplatform):
def x11(context): text = ''' #include <X11/Intrinsic.h> #include <X11/Xaw/Label.h> int main(int argc,char* argv[]) { return 0; }\n''' context.Message("checking for X11 headers ... ") INC = context.env.get('XINC','') if type(INC) is not types.ListType: INC = string.split(INC) oldpath = context.env.get('CPPPATH',[]) res = None for path in filter(lambda x: os.path.isfile(os.path.join(x,'X11/Xaw/Label.h')), INC+xinc): context.env['CPPPATH'] = oldpath + [path,] res = context.TryCompile(text,'.c') if res: context.Result(path) context.env['XINC'] = context.env['CPPPATH'] break if not res: context.Result(0) context.env['XINC'] = None return context.Message("checking for X11 libraries ... ") LIB = context.env.get('XLIBPATH','') if type(LIB) is not types.ListType: LIB = string.split(LIB) oldlibpath = context.env.get('LIBPATH',[]) oldlibs = context.env.get('LIBS',[]) XLIBS = context.env.get('XLIBS') if XLIBS: if type(XLIBS) is not types.ListType: XLIBS = string.split(XLIBS) else: if sys.platform[:7] == 'interix': XLIBS = ['Xaw','Xt','Xmu','X11','Xext','SM','ICE'] elif sys.platform[:5] == 'linux': XLIBS = ['Xaw','Xt'] else: XLIBS = ['Xaw','Xt','X11'] res = None for path in filter(os.path.isdir,LIB+xlib): context.env['LIBPATH'] = oldlibpath + [path,] res = context.TryLink(text,'.c') if res: context.Result(path) context.env['XLIBPATH'] = context.env['LIBPATH'] context.env['XLIBS'] = XLIBS break if not res: context.Result(0) context.env['XLIBPATH'] = None context.env['CPPPATH'] = oldpath context.env['LIBPATH'] = oldlibpath context.env['LIBS'] = oldlibs
48f74b0cc7ad87ff031aeb2e4a6d08e2d4a9ecf3 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3143/48f74b0cc7ad87ff031aeb2e4a6d08e2d4a9ecf3/configure.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1652, 619, 2499, 12, 2472, 16, 3399, 9898, 4672, 977, 273, 9163, 468, 6702, 411, 60, 2499, 19, 382, 21760, 18, 76, 34, 468, 6702, 411, 60, 2499, 19, 60, 2219, 19, 2224, 18, 76, 34, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1652, 619, 2499, 12, 2472, 16, 3399, 9898, 4672, 977, 273, 9163, 468, 6702, 411, 60, 2499, 19, 382, 21760, 18, 76, 34, 468, 6702, 411, 60, 2499, 19, 60, 2219, 19, 2224, 18, 76, 34, ...
raise NotImplementedError('MOFile.to_binary is not yet implemented.')
import struct import array output = '' offsets = [] ids = strs = '' entries = self.translated_entries() def cmp(_self, other): if _self.msgid > other.msgid: return 1 elif _self.msgid < other.msgid: return -1 else: return 0 entries.sort(cmp) mentry = self.metadata_as_entry() mentry.msgstr = mentry.msgstr.replace('\\n', '').lstrip() + '\n' entries = [mentry] + entries entries_len = len(entries) for e in entries: offsets.append((len(ids), len(e.msgid), len(strs), len(e.msgstr))) ids += e._decode(e.msgid) + '\0' strs += e._decode(e.msgstr) + '\0' keystart = 7*4+16*entries_len valuestart = keystart + len(ids) koffsets = [] voffsets = [] for o1, l1, o2, l2 in offsets: koffsets += [l1, o1+keystart] voffsets += [l2, o2+valuestart] offsets = koffsets + voffsets output = struct.pack("Iiiiiii", 0x950412de, 0, entries_len, 7*4, 7*4+entries_len*8, 0, 0) output += array.array("i", offsets).tostring() output += ids output += strs return output
def to_binary(self): """Return the mofile binary representation.""" raise NotImplementedError('MOFile.to_binary is not yet implemented.')
418b31415acbfe149b6979cf1e06619eed712454 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9209/418b31415acbfe149b6979cf1e06619eed712454/polib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 358, 67, 8578, 12, 2890, 4672, 3536, 990, 326, 7344, 768, 3112, 4335, 12123, 1002, 11206, 2668, 5980, 812, 18, 869, 67, 8578, 353, 486, 4671, 8249, 1093, 13, 2, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 358, 67, 8578, 12, 2890, 4672, 3536, 990, 326, 7344, 768, 3112, 4335, 12123, 1002, 11206, 2668, 5980, 812, 18, 869, 67, 8578, 353, 486, 4671, 8249, 1093, 13, 2, -100, -100, -100, -100, ...
return '%s %s' % (progName, version)
return 'squish %s' % version
def _getVersionString(self): version = '.'.join(map(str, __version__)) return '%s %s' % (progName, version)
5639a8e438a0ea9a7e8787139f31f28bca24c8f3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3557/5639a8e438a0ea9a7e8787139f31f28bca24c8f3/command.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1444, 780, 12, 2890, 4672, 1177, 273, 2611, 18, 5701, 12, 1458, 12, 701, 16, 1001, 1589, 972, 3719, 327, 1995, 87, 738, 87, 11, 738, 261, 14654, 461, 16, 1177, 13, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 1444, 780, 12, 2890, 4672, 1177, 273, 2611, 18, 5701, 12, 1458, 12, 701, 16, 1001, 1589, 972, 3719, 327, 1995, 87, 738, 87, 11, 738, 261, 14654, 461, 16, 1177, 13, 2, -100,...
return d def requestListGroups(self): """ Request (forward) list groups. @return: A Deferred, the callback for which will be called when the server responds with the list groups. The callback argument will be a tuple with two elements, a dictionary mapping group IDs to group names and the current list version. """ id, d = self._createIDMapping() self.sendLine("LSG %s" % id) return d
def _cb(r): self.changeStatus(STATUS_ONLINE) if r[0] is not None: self.factory.contacts = r[0] return r return d.addCallback(_cb)
def syncList(self, version): """ used for keeping an up-to-date contact list.
9b2b7163e441396d9e5e7f46775cd7809b4655be /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/9b2b7163e441396d9e5e7f46775cd7809b4655be/msn.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 682, 12, 2890, 16, 1177, 4672, 3536, 1399, 364, 19966, 392, 731, 17, 869, 17, 712, 5388, 666, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 682, 12, 2890, 16, 1177, 4672, 3536, 1399, 364, 19966, 392, 731, 17, 869, 17, 712, 5388, 666, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if string.find(f+":"+argd[px], p) > -1: argd[px] = string.replace(f+":"+argd[px], f+":"+p, term)
if string.find(argd[px], f+":"+p) > -1: argd[px] = string.replace(argd[px], f+":"+p, f+":"+term)
def create_nearest_terms_box(urlargd, p, f, t='w', n=5, ln=cdslang, intro_text_p=True): """Return text box containing list of 'n' nearest terms above/below 'p' for the field 'f' for matching type 't' (words/phrases) in language 'ln'. Propose new searches according to `urlargs' with the new words. If `intro_text_p' is true, then display the introductory message, otherwise print only the nearest terms in the box content. """ # load the right message language _ = gettext_set_language(ln) out = "" nearest_terms = [] if not p: # sanity check p = "." # look for nearest terms: if t == 'w': nearest_terms = get_nearest_terms_in_bibwords(p, f, n, n) if not nearest_terms: return "%s %s." % (_("No words index available for"), get_field_i18nname(f, ln)) else: nearest_terms = get_nearest_terms_in_bibxxx(p, f, n, n) if not nearest_terms: return "%s %s." % (_("No phrase index available for"), get_field_i18nname(f, ln)) terminfo = [] for term in nearest_terms: if t == 'w': hits = get_nbhits_in_bibwords(term, f) else: hits = get_nbhits_in_bibxxx(term, f) argd = {} argd.update(urlargd) # check which fields contained the requested parameter, and replace it. for (px, fx) in ('p', 'f'),('p1', 'f1'), ('p2', 'f2'), ('p3', 'f3'): if px in argd: if f == argd[fx] or f == "anyfield" or f == "": if string.find(argd[px], p) > -1: argd[px] = string.replace(argd[px], p, term) break else: if string.find(f+":"+argd[px], p) > -1: argd[px] = string.replace(f+":"+argd[px], f+":"+p, term) break terminfo.append((term, hits, argd)) intro = "" if intro_text_p: # add full leading introductory text if f: intro = _("Search term %(x_term)s inside index %(x_index)s did not match any record. Nearest terms in any collection are:") % \ {'x_term': "<em>" + (p.startswith("%") and p.endswith("%") and p[1:-1] or p) + "</em>", 'x_index': "<em>" + get_field_i18nname(f, ln) + "</em>"} else: intro = _("Search term %s did not match any record. Nearest terms in any collection are:") % \ ("<em>" + (p.startswith("%") and p.endswith("%") and p[1:-1] or p) + "</em>") return websearch_templates.tmpl_nearest_term_box(p=p, ln=ln, f=f, terminfo=terminfo, intro=intro)
2e2f882183c08d6b28e2200bf25e9bb68887b371 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/2e2f882183c08d6b28e2200bf25e9bb68887b371/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 25785, 67, 10112, 67, 2147, 12, 718, 3175, 72, 16, 293, 16, 284, 16, 268, 2218, 91, 2187, 290, 33, 25, 16, 7211, 33, 4315, 2069, 539, 16, 13079, 67, 955, 67, 84, 33, 5510,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 25785, 67, 10112, 67, 2147, 12, 718, 3175, 72, 16, 293, 16, 284, 16, 268, 2218, 91, 2187, 290, 33, 25, 16, 7211, 33, 4315, 2069, 539, 16, 13079, 67, 955, 67, 84, 33, 5510,...
for i in range(self.heightLineCount): step_y = self.height / self.heightLineCount * i result.append( PU(( )) result.append( PR((ul_x, ul_y - step_y)) result.append( PD(( )) result.append( PR((ur_x, ur_y - step_y))
for i in range(self.widthDivisions + 1): step_y = self.height / self.widthDivisions * i result.append(PU( )) result.append(PA((ul_x, ul_y - step_y))) result.append(PD( )) result.append(PA((ur_x, ur_y - step_y)))
def _subcommands(self): ul_x = self.xabsolute - self.referencePoint[0] * self.width bl_x = ul_x ur_x = ul_x + self.width br_x = ur_x
62b6b73b97af490069011e9cc7efc85a83a0a0bb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3716/62b6b73b97af490069011e9cc7efc85a83a0a0bb/grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 7847, 12, 2890, 4672, 7493, 67, 92, 273, 365, 18, 92, 12547, 300, 365, 18, 6180, 2148, 63, 20, 65, 380, 365, 18, 2819, 2811, 67, 92, 273, 7493, 67, 92, 8896, 67, 92, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 7847, 12, 2890, 4672, 7493, 67, 92, 273, 365, 18, 92, 12547, 300, 365, 18, 6180, 2148, 63, 20, 65, 380, 365, 18, 2819, 2811, 67, 92, 273, 7493, 67, 92, 8896, 67, 92, 273...
def testLocker(self):
def testLocker(self):
def testLocker(self): self.assertFalse(JSLocker.actived) self.assertFalse(JSLocker.locked) with JSLocker() as outter_locker: self.assertTrue(JSLocker.actived) self.assertTrue(JSLocker.locked) self.assertTrue(outter_locker) with JSLocker() as inner_locker: self.assertTrue(JSLocker.locked) self.assertTrue(outter_locker) self.assertTrue(inner_locker) with JSUnlocker() as unlocker: self.assertFalse(JSLocker.locked) self.assertTrue(outter_locker) self.assertTrue(inner_locker) self.assertTrue(JSLocker.locked) self.assertTrue(JSLocker.actived) self.assertFalse(JSLocker.locked) locker = JSLocker() with JSContext(): self.assertRaises(RuntimeError, locker.__enter__) self.assertRaises(RuntimeError, locker.__exit__, None, None, None) del locker
d76ea3f452d147f051e65b20fdab9b87a8b84413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2065/d76ea3f452d147f051e65b20fdab9b87a8b84413/PyV8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 2531, 264, 12, 2890, 4672, 365, 18, 11231, 8381, 12, 6479, 2531, 264, 18, 621, 2950, 13, 365, 18, 11231, 8381, 12, 6479, 2531, 264, 18, 15091, 13, 225, 598, 6756, 2531, 264, 1435...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2531, 264, 12, 2890, 4672, 365, 18, 11231, 8381, 12, 6479, 2531, 264, 18, 621, 2950, 13, 365, 18, 11231, 8381, 12, 6479, 2531, 264, 18, 15091, 13, 225, 598, 6756, 2531, 264, 1435...
''' attribute value distribution (for sampling from a distribution): instantiate as AttrDist({"value": prob, "value2": prob2, ...}) (probs are automatically normalized) '''
''' attribute value distribution (for sampling from a distribution): instantiate as AttrDist({"value1": prob1, "value2": prob2, ...}) (probs are automatically normalized) or alternatively using AttrDist(value1=prob1, value2=prob2, ...) '''
def getValues(self): return [self.value]
79203f7a7a15f35dd7c691982572e00e48a1f572 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10261/79203f7a7a15f35dd7c691982572e00e48a1f572/datagen.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13500, 12, 2890, 4672, 327, 306, 2890, 18, 1132, 65, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13500, 12, 2890, 4672, 327, 306, 2890, 18, 1132, 65, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
['d']
'd' >>> nth('abcde', 9) is None True
>>> def unique_justseen(iterable, key=None):
94164023517bb790a71388cfba6051af2bf7efc6 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12029/94164023517bb790a71388cfba6051af2bf7efc6/test_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 3089, 67, 3732, 15156, 12, 15364, 16, 498, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4080, 1652, 3089, 67, 3732, 15156, 12, 15364, 16, 498, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
elif f[:2] == '-l':
elif f[:2] == '-l' and f[-1] != "'":
def get_mpi_flags(): output = _get_mpi_cmd() print output if not output: if sys.platform=='win32': #From Simon Frost #this didn't work on my machine (Vladimir Lazunin on April 7, 2009) #output = "gcc -L$MPICH_DIR\SDK.gcc\lib -lmpich -I$MPICH_DIR\SDK.gcc\include" #"MPICH_DIR" must be set manually in environment variables mpi_dir = os.getenv("MPICH_DIR") #for MPICH2 sdk_prefix = mpi_dir lib_name = "mpi" #for MPICH1 if os.path.exists(sdk_prefix + "\\SDK"): sdk_prefix += "\\SDK" lib_name = "mpich" output = "gcc -L%(sdk_prefix)s\lib -l%(lib_name)s -I%(sdk_prefix)s\include" % {"sdk_prefix" : sdk_prefix, "lib_name" : lib_name} else: output = "cc -L/usr/opt/mpi -lmpi -lelan" # now get the include, library dirs and the libs to link with. flags = string.split(output) flags = uniq_arr(flags) # remove repeated values. inc_dirs = [] lib_dirs = [] libs = [] def_macros = [] undef_macros = [] for f in flags: if f[:2] == '-I': inc_dirs.append(f[2:]) elif f[:2] == '-L': lib_dirs.append(f[2:]) elif f[:2] == '-l': libs.append(f[2:]) elif f[:2] == '-U': undef_macros.append(f[2:]) elif f[:2] == '-D': tmp = string.split(f[2:], '=') if len(tmp) == 1: def_macros.append((tmp[0], None)) else: def_macros.append(tuple(tmp)) return {'inc_dirs': inc_dirs, 'lib_dirs': lib_dirs, 'libs':libs, 'def_macros': def_macros, 'undef_macros': undef_macros}
b4bccb9e1d0699b686498ca8091942d625b2bb2b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9158/b4bccb9e1d0699b686498ca8091942d625b2bb2b/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1291, 77, 67, 7133, 13332, 876, 273, 389, 588, 67, 1291, 77, 67, 4172, 1435, 1172, 876, 309, 486, 876, 30, 309, 2589, 18, 9898, 18920, 8082, 1578, 4278, 468, 1265, 9587, 265, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1291, 77, 67, 7133, 13332, 876, 273, 389, 588, 67, 1291, 77, 67, 4172, 1435, 1172, 876, 309, 486, 876, 30, 309, 2589, 18, 9898, 18920, 8082, 1578, 4278, 468, 1265, 9587, 265, ...
def export_msh(filepath,convert_coords):
def export_msh(filepath,convert_coords,apply_modifiers):
def export_msh(filepath,convert_coords): nonormal=False if os.path.splitext(filepath)[1]=="": filepath=filepath+".msh" file=open(filepath,"w") file.write("MSHX1\n") ngroups=0 for obj in bpy.context.selected_objects: if obj.type=='MESH': ngroups=ngroups+1 file.write("GROUPS {}\n".format(ngroups)) mtrls={} txtrs={} for obj in bpy.context.selected_objects: if obj.type=='MESH': matrix=obj.matrix_world me=obj.data n=0 vtx=[] faces=[] file.write("LABEL {}\n".format(obj.name)) # Adding materials and textures if len(obj.material_slots)!=0: mat=obj.material_slots[0].material if not (mat.name in mtrls): print("Mew material:",mat.name) mtrls[mat.name]=len(mtrls) file.write("MATERIAL {}\n".format(mtrls[mat.name]+1)) #.msh material idxs start from 1 if mat.texture_slots[0]!=None: tex=mat.texture_slots[0].texture if tex.type=="IMAGE": #Texture type must be image if not(tex.name in txtrs): print("New texture:",tex.name) txtrs[tex.name]=len(txtrs) file.write("TEXTURE {}\n".format(txtrs[tex.name]+1))#.msh tex idxs start from 1 else: print("Non-image texture") file.write("TEXTURE 0\n") else: #no tex slots in material file.write("TEXTURE 0\n") else: #no material slots in mesh object file.write("MATERIAL 0\n") #preparing vertices array: coords and normal for vert in me.vertices: vtx.append([matrix*vert.co,vert.normal]) has_uv=True; if len(me.uv_textures)==0: has_uv=False; print("Mesh ",obj.name,"has not UV map" ) #Creating faces array and finishing vtx array with UVs for n in range(len(me.faces)): face=me.faces[n] if has_uv:# 3 UVs changeface=False fc=[]#face to add for i in range(len(face.vertices)): uvs=me.uv_textures[0].data[n].uv_raw[(2*i):(2*i+2)] idx_vert=face.vertices[i] if len(vtx[idx_vert])==2: #no UVs yet, add idx_vert to fc and uvs to vert vtx[idx_vert].append(uvs) fc.append(idx_vert) else: if vtx[idx_vert][2]==uvs:#UVs are equal, just add idx_vert to fc #print("uvs equal") fc.append(idx_vert) else: #uvs differ, add new vtx and use new idx_vert vtx.append([vtx[idx_vert][0],vtx[idx_vert][1],uvs]) fc.append(len(vtx)-1) #Add resulting fc faces.append(fc[:3]) if len(fc)==4: faces.append([fc[2],fc[3],fc[0]]) else:#export just faces without uv faces.append(face.vertices[:3]) #first (or alone) triangle if len(face.vertices)==4: #2nd triangle if face is quad #print("!!!tetragon!!!") faces.append([face.vertices[2],face.vertices[3],face.vertices[0]]) #else: # print("triangle") print("====Mesh Geometry Summary====") if VERBOSE_OUT: for v in vtx: print(v) print("---") print(faces) print("vtx: ",len(vtx)," faces:",len(faces)) #write GEOM section if nonormal: file.write("NONORMAL\n") file.write("GEOM {} {}\n".format(len(vtx),len(faces))) if convert_coords: for v in vtx: file.write("{} {} {}".format(-v[0][0],v[0][2],-v[0][1])) if not nonormal: #I think normal coords should be converted too file.write(" {} {} {}".format(-v[1][0],v[1][2],-v[1][1])) if has_uv: file.write(" {} {}".format(v[2][0],1-v[2][1])) file.write("\n") for f in faces: file.write("{} {} {}\n".format(f[0],f[2],f[1])) else: for v in vtx: file.write("{} {} {}".format(v[0][0],v[0][1],v[0][2])) if not nonormal: file.write(" {} {} {}".format(v[1][0],v[1][1],v[1][2])) if has_uv: file.write(" {} {}".format(v[2][0],1-v[2][1])) file.write("\n") for f in faces: file.write("{} {} {}\n".format(f[0],f[1],f[2])) #write other sections print("===Materials summary====") print(mtrls) print("===Textures summary=====") print(txtrs) #===Write MATERIALS section===== file.write("MATERIALS {}\n".format(len(mtrls))) #just mtrls sorted by values temp_m=sorted(mtrls.items(),key=lambda x: x[1]) for m in temp_m: file.write("{}\n".format(m[0])) for m in temp_m: file.write("MATERIAL {}\n".format(m[0])) mat=bpy.data.materials[m[0]] dc=mat.diffuse_color file.write("{} {} {} {}\n".format(dc[0],dc[1],dc[2],mat.alpha)) file.write("{} {} {} {}\n".format(dc[0],dc[1],dc[2],mat.alpha)) sc=mat.specular_color file.write("{} {} {} {} {}\n".format(sc[0],sc[1],sc[2],mat.specular_alpha,mat.specular_hardness)) file.write("{} {} {} {}\n".format(dc[0]*mat.emit,dc[1]*mat.emit,dc[2]*mat.emit,mat.alpha)) #=====Write TEXTURES section ====== file.write("TEXTURES {}\n".format(len(txtrs))) v=os.path.split(filepath) mshdir=v[0] mshname=os.path.splitext(v[1])[0] texdir=mshname+"tex" texpath=os.path.join(mshdir,texdir) temp_t=sorted(txtrs.items(),key=lambda x: x[1]) for t in temp_t: tex=bpy.data.textures[t[0]] img_fp=tex.image.filepath tex_fname="" if img_fp=="Untitled": #new name from tex name tex_fname=tex.name+"."+tex.image.file_format.lower() tex.image.save_render(os.path.join(texpath,tex_fname)) else: #image file is already saved on disk tex_fname=os.path.split(img_fp)[1] if tex.image.file_format=="":#if no format (dds) it will be saved as png. tex_fname=os.path.splitext(tex_fname)[0]+".png" tex.image.save_render(os.path.join(texpath,tex_fname)) file.write("{}\n".format(ntpath.join(texdir,os.path.splitext(tex_fname)[0]+".dds"))) #local dir + fname+'dds' file.close()
20ccd61bd31aad967d09ed22d0533761affd3f8c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10993/20ccd61bd31aad967d09ed22d0533761affd3f8c/io_orbiter_msh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 81, 674, 12, 10561, 16, 6283, 67, 9076, 16, 9010, 67, 15432, 4672, 225, 1661, 1687, 33, 8381, 225, 309, 1140, 18, 803, 18, 4939, 408, 12, 10561, 25146, 21, 65, 631, 3660, 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, 3359, 67, 81, 674, 12, 10561, 16, 6283, 67, 9076, 16, 9010, 67, 15432, 4672, 225, 1661, 1687, 33, 8381, 225, 309, 1140, 18, 803, 18, 4939, 408, 12, 10561, 25146, 21, 65, 631, 3660, 3...
ok = ok and bool(cr.fetchone()[0])
ok = ok and bool(cr.fetchone())
def test_retenida(self, cr, uid, ids, type, *args): res = self.move_journal_id_payment_get(cr, uid, ids) if not res: return False ok = True
46cd764d4271a45a960f3683bcec28c277eb9dad /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7359/46cd764d4271a45a960f3683bcec28c277eb9dad/invoice.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1349, 275, 350, 69, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 16, 380, 1968, 4672, 400, 273, 365, 18, 8501, 67, 22644, 67, 350, 67, 9261, 67, 588, 12, 3353, 16, 45...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1349, 275, 350, 69, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 618, 16, 380, 1968, 4672, 400, 273, 365, 18, 8501, 67, 22644, 67, 350, 67, 9261, 67, 588, 12, 3353, 16, 45...
self.cv.acquire() self.syncSequenceList = [] self.cv.notify() self.cv.release()
try: self.cv.acquire() self.syncSequenceList = [] self.cv.notify() finally: self.cv.release()
def _handleError(self, error): self.error = error self.cv.acquire() self.syncSequenceList = [] self.cv.notify() self.cv.release()
dc4e5689e88e42c1dc783761a2615aab45312cd6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/197/dc4e5689e88e42c1dc783761a2615aab45312cd6/qmfconsole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4110, 668, 12, 2890, 16, 555, 4672, 365, 18, 1636, 273, 555, 365, 18, 19774, 18, 1077, 1039, 1435, 365, 18, 8389, 4021, 682, 273, 5378, 365, 18, 19774, 18, 12336, 1435, 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, 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, 4110, 668, 12, 2890, 16, 555, 4672, 365, 18, 1636, 273, 555, 365, 18, 19774, 18, 1077, 1039, 1435, 365, 18, 8389, 4021, 682, 273, 5378, 365, 18, 19774, 18, 12336, 1435, 365, 18, ...
elif isinstance(v, (list,tuple)):
elif isinstance(v, (list)):
def remove_member(v): if isinstance(v, (Member, External)): return v.r elif isinstance(v, (gof.Result,Method,Module)): return v elif isinstance(v,(int,bool)): return v elif isinstance(v, (list,tuple)): return map(remove_member,v) elif isinstance(v,dict): for k,vv in v.iteritems(): v[k]=remove_member(vv) return v else:
5ccd963d77d875948a669853ce02337ad41dada7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12438/5ccd963d77d875948a669853ce02337ad41dada7/module.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 5990, 12, 90, 4672, 309, 1549, 12, 90, 16, 261, 4419, 16, 11352, 3719, 30, 327, 331, 18, 86, 1327, 1549, 12, 90, 16, 261, 75, 792, 18, 1253, 16, 1305, 16, 3120, 3719, 30,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 5990, 12, 90, 4672, 309, 1549, 12, 90, 16, 261, 4419, 16, 11352, 3719, 30, 327, 331, 18, 86, 1327, 1549, 12, 90, 16, 261, 75, 792, 18, 1253, 16, 1305, 16, 3120, 3719, 30,...
'name': fields.char('Description', size=64),
'name': fields.char('Description', size=64, required=True),
def name_get(self, cursor, user, ids, context=None): res= [] for o in self.browse(cursor, user, ids, context=context): result = 0.0 res_currency = '' for line in o.line_ids: if line.amount_currency and line.currency_id: result += line.amount_currency res_currency = line.currency_id.code else: result += line.debit - line.credit if res_currency: res_currency = ' ' + res_currency res.append((o.id, '[%.2f'% (result - o.total_new,) + res_currency + ']' )) return res
3a3ded3e6733f98be7615352895f8fcef4f4463d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/3a3ded3e6733f98be7615352895f8fcef4f4463d/account_bank_statement.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 400, 33, 5378, 364, 320, 316, 365, 18, 25731, 12, 9216, 16, 729, 16, 3258, 16, 819, 33, 2472, 4672, 56...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 819, 33, 7036, 4672, 400, 33, 5378, 364, 320, 316, 365, 18, 25731, 12, 9216, 16, 729, 16, 3258, 16, 819, 33, 2472, 4672, 56...
if t.value.lower() == 'or': t.type = 'OR' elif t.value.lower() == 'not': t.type = 'NOT' else: t.type = 'NAME'
try: t.value = float(t.value) t.type = 'NUM' return t except ValueError: if t.value.lower() == 'or': t.type = 'OR' elif t.value.lower() == 'not': t.type = 'NOT' else: t.type = 'NAME'
def t_NAME(t): r'([-\w_]+)|(>=)|>|\+|\*|/' try: t.value = int(t.value) t.type = 'NUM' return t except ValueError: # not a number if t.value.lower() == 'or': t.type = 'OR' elif t.value.lower() == 'not': t.type = 'NOT'
e97b2dd74b4abb2bb757308ada375b5cbb3c3f4c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7008/e97b2dd74b4abb2bb757308ada375b5cbb3c3f4c/gdllex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 1985, 12, 88, 4672, 436, 11, 3816, 6943, 91, 67, 7941, 96, 12, 34, 33, 14047, 34, 8960, 15, 8960, 14, 96, 2473, 225, 775, 30, 268, 18, 1132, 273, 509, 12, 88, 18, 1132, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 67, 1985, 12, 88, 4672, 436, 11, 3816, 6943, 91, 67, 7941, 96, 12, 34, 33, 14047, 34, 8960, 15, 8960, 14, 96, 2473, 225, 775, 30, 268, 18, 1132, 273, 509, 12, 88, 18, 1132, ...
return "%s(\\zeta_{%s})"%(latex(Q), self.__zeta_order)
return "%s(\\zeta_{%s})"%(latex(QQ), self.__zeta_order)
def _latex_(self): return "%s(\\zeta_{%s})"%(latex(Q), self.__zeta_order)
43f8843c72a7b540aa8c8372f583216476d11299 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/43f8843c72a7b540aa8c8372f583216476d11299/number_field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 327, 2213, 87, 24480, 94, 1066, 14147, 9, 87, 12646, 17105, 26264, 12, 53, 53, 3631, 365, 16186, 94, 1066, 67, 1019, 13, 225, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 26264, 67, 12, 2890, 4672, 327, 2213, 87, 24480, 94, 1066, 14147, 9, 87, 12646, 17105, 26264, 12, 53, 53, 3631, 365, 16186, 94, 1066, 67, 1019, 13, 225, 2, -100, -100, -100, -100,...
def play_prev_movie(self):
def play_prev_movie(self, save_current_resume_time=True):
def play_prev_movie(self): self.cancel_update_timer() self.cancel_mark_as_watched() if config.get(prefs.SINGLE_VIDEO_PLAYBACK_MODE): self.stop() else: if save_current_resume_time: self.update_current_resume_time() self.position -= 1 self._play_current()
71ee41e8b2be9f5276a455f797cd79f0978a24c6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/71ee41e8b2be9f5276a455f797cd79f0978a24c6/playback.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 67, 10001, 67, 8683, 13120, 12, 2890, 16, 1923, 67, 2972, 67, 25158, 67, 957, 33, 5510, 4672, 365, 18, 10996, 67, 2725, 67, 12542, 1435, 365, 18, 10996, 67, 3355, 67, 345, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6599, 67, 10001, 67, 8683, 13120, 12, 2890, 16, 1923, 67, 2972, 67, 25158, 67, 957, 33, 5510, 4672, 365, 18, 10996, 67, 2725, 67, 12542, 1435, 365, 18, 10996, 67, 3355, 67, 345, 67, ...
def cleanURLs(urls): matches = map((lambda x : re.match(pattern, x)), urls) matches = filter(lambda x : (not (x == None)), matches) dematched = map(lambda x : x.group(1), matches) dematched = map(lambda entry : re.sub('\+27', "'", entry), dematched) dematched = map(lambda entry : re.sub('\+2d', "-", entry), dematched) dematched = map(lambda entry : re.sub('\+2c', ",", entry), dematched)
def cleanURL(url): url = re.sub('\+27', "'", url) url = re.sub('\+2d', "-", url) url = re.sub('\+2c', ",", url) url = re.sub('_', " ", url) return url def findURLs(urls): matches = [ re.match(pattern, x) for x in urls ] dematched = [ x.group(1) for x in matches if x != None ]
def cleanURLs(urls): matches = map((lambda x : re.match(pattern, x)), urls) matches = filter(lambda x : (not (x == None)), matches) dematched = map(lambda x : x.group(1), matches) dematched = map(lambda entry : re.sub('\+27', "'", entry), dematched) dematched = map(lambda entry : re.sub('\+2d', "-", entry), dematched) dematched = map(lambda entry : re.sub('\+2c', ",", entry), dematched) dematched = filter (lambda x : x not in proscribedEntries, dematched) return dematched
67ee0675ca67ffc57390b47eb704f3c8a3c28ada /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11199/67ee0675ca67ffc57390b47eb704f3c8a3c28ada/lexiconGrapher.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 1785, 12, 718, 4672, 880, 273, 283, 18, 1717, 2668, 64, 15, 5324, 2187, 2491, 3113, 880, 13, 880, 273, 283, 18, 1717, 2668, 64, 15, 22, 72, 2187, 3701, 3113, 880, 13, 880, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2721, 1785, 12, 718, 4672, 880, 273, 283, 18, 1717, 2668, 64, 15, 5324, 2187, 2491, 3113, 880, 13, 880, 273, 283, 18, 1717, 2668, 64, 15, 22, 72, 2187, 3701, 3113, 880, 13, 880, 273,...
(self.site().family != pywikibot.default_family
(self.site().family.name != pywikibot.default_family
def title(self, underscore=False, savetitle=False, withNamespace=True, withSection=True, asUrl=False, asLink=False, allowInterwiki=True, forceInterwiki=False, textlink=False): """Return the title of this Page, as a Unicode string.
6381646ddaab64a57dc046e66dfe1247425a083c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9005/6381646ddaab64a57dc046e66dfe1247425a083c/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2077, 12, 2890, 16, 13677, 33, 8381, 16, 4087, 278, 1280, 33, 8381, 16, 598, 3402, 33, 5510, 16, 598, 5285, 33, 5510, 16, 487, 1489, 33, 8381, 16, 487, 2098, 33, 8381, 16, 1699, 2465...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2077, 12, 2890, 16, 13677, 33, 8381, 16, 4087, 278, 1280, 33, 8381, 16, 598, 3402, 33, 5510, 16, 598, 5285, 33, 5510, 16, 487, 1489, 33, 8381, 16, 487, 2098, 33, 8381, 16, 1699, 2465...
p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) self.assertEqual(p.pow(6,8), 6**8)
try: p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) self.assertEqual(p.pow(6,8), 6**8) except xmlrpclib.ProtocolError, e: self.fail("%s\n%s" % (e, e.headers))
def test_simple1(self): p = xmlrpclib.ServerProxy('http://localhost:%d' % PORT) self.assertEqual(p.pow(6,8), 6**8)
c65a5f1b14ff6bd995d7cb102e5b4577ce0f16e2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/c65a5f1b14ff6bd995d7cb102e5b4577ce0f16e2/test_xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 21, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 365, 18, 11231, 5812, 12, 84, 18, 23509, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 21, 12, 2890, 4672, 293, 273, 2025, 13832, 830, 495, 18, 2081, 3886, 2668, 2505, 2207, 13014, 5319, 72, 11, 738, 20987, 13, 365, 18, 11231, 5812, 12, 84, 18, 23509, 12,...
data_files = dataFiles,
package_data = package_data,
def getPackages(): packages = [PkgName] dataList = [] for dirPath, dirNames, fileNames in os.walk(PkgDir): if ".svn" in dirNames: dirNames.remove(".svn") dirName = os.path.basename(dirPath) print "dirName=", dirName tryInit = os.path.join(dirPath, "__init__.py") print "tryInit=", tryInit if os.path.exists(os.path.join(dirPath, "__init__.py")): pkgName = dirPath.replace("/", ".") packages.append(pkgName) else: # package data dataList += [os.path.join(dirPath, fileName) for fileName in fileNames if not fileName.startswith(".")] return packages, {PkgName: dataList}
c5d05d70f99e84419f0095ca241d96411b82ce77 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6354/c5d05d70f99e84419f0095ca241d96411b82ce77/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30401, 1023, 13332, 5907, 273, 306, 11264, 461, 65, 501, 682, 273, 5378, 364, 15891, 16, 1577, 1557, 16, 27375, 316, 1140, 18, 11348, 12, 11264, 1621, 4672, 309, 3552, 31505, 6, 316, 157...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30401, 1023, 13332, 5907, 273, 306, 11264, 461, 65, 501, 682, 273, 5378, 364, 15891, 16, 1577, 1557, 16, 27375, 316, 1140, 18, 11348, 12, 11264, 1621, 4672, 309, 3552, 31505, 6, 316, 157...
reload(vptf)
reload(compat)
def benchmark(self, prep, func, *args): reload(vptf) self._setUp() prep() t = timing(func, *args) self._tearDown() return t
19657f9c9a01ee6def9aaa885f8df7c19b2548ec /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9738/19657f9c9a01ee6def9aaa885f8df7c19b2548ec/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14128, 12, 2890, 16, 13237, 16, 1326, 16, 380, 1968, 4672, 7749, 12, 16239, 13, 365, 6315, 542, 1211, 1435, 13237, 1435, 268, 273, 15538, 12, 644, 16, 380, 1968, 13, 365, 6315, 736, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14128, 12, 2890, 16, 13237, 16, 1326, 16, 380, 1968, 4672, 7749, 12, 16239, 13, 365, 6315, 542, 1211, 1435, 13237, 1435, 268, 273, 15538, 12, 644, 16, 380, 1968, 13, 365, 6315, 736, 29...
else: while lnum > 0: if string.split(lines[lnum])[:1] == ['def']: break lnum = lnum - 1 return lines, lnum
lnum = object.co_firstlineno - 1 while lnum > 0: if string.split(lines[lnum])[:1] == ['def']: break lnum = lnum - 1 return lines, lnum
def findsource(object): """Return the entire source file and starting line number for an object. The argument may be a module, class, method, function, traceback, frame, or code object. The source code is returned as a list of all the lines in the file and the line number indexes a line in that list. An IOError is raised if the source code cannot be retrieved.""" try: file = open(getsourcefile(object)) lines = file.readlines() file.close() except (TypeError, IOError): raise IOError, 'could not get source code' if ismodule(object): return lines, 0 if isclass(object): name = object.__name__ matches = (['class', name], ['class', name + ':']) for i in range(len(lines)): if string.split(lines[i])[:2] in matches: return lines, i else: raise IOError, 'could not find class definition' if ismethod(object): object = object.im_func if isfunction(object): object = object.func_code if istraceback(object): object = object.tb_frame if isframe(object): object = object.f_code if iscode(object): try: lnum = object.co_firstlineno - 1 except AttributeError: raise IOError, 'could not find function definition' else: while lnum > 0: if string.split(lines[lnum])[:1] == ['def']: break lnum = lnum - 1 return lines, lnum
d6c86dae430f16a4790418f8c96eb8ef11aab251 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/d6c86dae430f16a4790418f8c96eb8ef11aab251/inspect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 16, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1104, 3168, 12, 1612, 4672, 3536, 990, 326, 7278, 1084, 585, 471, 5023, 980, 1300, 364, 392, 733, 18, 225, 1021, 1237, 2026, 506, 279, 1605, 16, 667, 16, 707, 16, 445, 16, 10820, 16, ...
var browser_op, browser_saf, browser_konq, browser_moz, browser_ie, browser_ie5;
var browser_op, browser_saf, browser_konq, browser_moz, browser_ie, browser_ie5, browser_iphone;
def notebook_lib(): s= r"""
12ba828227ecc9ed107eee761d9eba204186bb4d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/12ba828227ecc9ed107eee761d9eba204186bb4d/js.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 14718, 67, 2941, 13332, 272, 33, 436, 8395, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
self.setTabOrder(self.light_z_linedit,self.lighting_restore_defaults_btn)
self.setTabOrder(self.light_z_linedit,self.ms_on_checkbox) self.setTabOrder(self.ms_on_checkbox,self.ms_finish_linedit) self.setTabOrder(self.ms_finish_linedit,self.ms_finish_slider) self.setTabOrder(self.ms_finish_slider,self.ms_shininess_linedit) self.setTabOrder(self.ms_shininess_linedit,self.ms_shininess_slider) self.setTabOrder(self.ms_shininess_slider,self.ms_brightness_linedit) self.setTabOrder(self.ms_brightness_linedit,self.ms_brightness_slider) self.setTabOrder(self.ms_brightness_slider,self.lighting_restore_defaults_btn)
def __init__(self,parent = None,name = None,modal = 0,fl = 0): QDialog.__init__(self,parent,name,modal,fl)
c76684571da81fcba257f890746ab0f891e8a720 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/c76684571da81fcba257f890746ab0f891e8a720/UserPrefsDialog.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 273, 599, 16, 529, 273, 599, 16, 17638, 273, 374, 16, 2242, 273, 374, 4672, 2238, 6353, 16186, 2738, 972, 12, 2890, 16, 2938, 16, 529, 16, 17638, ...
"""Add Builders and construction variables for gfortran to an Environment."""
"""Add Builders and construction variables for sunf77 to an Environment."""
def generate(env): """Add Builders and construction variables for gfortran to an Environment.""" add_all_to_env(env) fcomp = env.Detect(compilers) or 'f77' env['FORTRAN'] = fcomp env['F77'] = fcomp env['SHFORTRAN'] = fcomp env['SHF77'] = fcomp env['SHFORTRANFLAGS'] = SCons.Util.CLVar('$FORTRANFLAGS -fKPIC') env['SHF77FLAGS'] = SCons.Util.CLVar('$F77FLAGS -fKPIC')
e7bc8968a29738577ecc73544f83b9ff181a908c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12817/e7bc8968a29738577ecc73544f83b9ff181a908c/sunf77.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 13887, 74, 4700, 358, 392, 7518, 12123, 527, 67, 454, 67, 869, 67, 3074, 12, 3074, 13, 225, 284, 2919, 273, 1550, 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, 2103, 12, 3074, 4672, 3536, 986, 3998, 414, 471, 16171, 3152, 364, 13887, 74, 4700, 358, 392, 7518, 12123, 527, 67, 454, 67, 869, 67, 3074, 12, 3074, 13, 225, 284, 2919, 273, 1550, 18,...
raise ConvertError("visit_element: Don't support %s element" % name)
self.process_inline(node)
def visit_element(self, node): name = node.localName.lower() func = getattr(self, "process_" + name, None) if func: func(node) elif name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6',): self.process_heading(node) elif name in ('ol', 'ul',): self.process_list(node) else: raise ConvertError("visit_element: Don't support %s element" % name)
d3ceb03eca1651ed051f79cbe00cb3d50e724b81 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/888/d3ceb03eca1651ed051f79cbe00cb3d50e724b81/text_html_text_x_moin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2956, 12, 2890, 16, 756, 4672, 508, 273, 756, 18, 3729, 461, 18, 8167, 1435, 1326, 273, 3869, 12, 2890, 16, 315, 2567, 9548, 397, 508, 16, 225, 599, 13, 309, 1326, 30, 1326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 2956, 12, 2890, 16, 756, 4672, 508, 273, 756, 18, 3729, 461, 18, 8167, 1435, 1326, 273, 3869, 12, 2890, 16, 315, 2567, 9548, 397, 508, 16, 225, 599, 13, 309, 1326, 30, 1326...
sage: g = graphs.RandomInterval(15)
sage: g = graphs.RandomInterval(8)
def RandomInterval(self,n): """ Returns a random interval graph.
845d1d3259a6ce18936d0c0a8ba89f76a4c6bf7b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/845d1d3259a6ce18936d0c0a8ba89f76a4c6bf7b/graph_generators.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8072, 4006, 12, 2890, 16, 82, 4672, 3536, 2860, 279, 2744, 3673, 2667, 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, 8072, 4006, 12, 2890, 16, 82, 4672, 3536, 2860, 279, 2744, 3673, 2667, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def annotatePage(self, name):
def _annotatePage(self, name):
def annotatePage(self, name): ref = self._doc.refAnnotation(name) self._annotationrefs.append(ref)
8fb35ad81aee7f43b67351bc5e5364584ab5eb9e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/8fb35ad81aee7f43b67351bc5e5364584ab5eb9e/canvas.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 18338, 340, 1964, 12, 2890, 16, 508, 4672, 1278, 273, 365, 6315, 2434, 18, 1734, 3257, 12, 529, 13, 365, 6315, 11495, 9316, 18, 6923, 12, 1734, 13, 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, 389, 18338, 340, 1964, 12, 2890, 16, 508, 4672, 1278, 273, 365, 6315, 2434, 18, 1734, 3257, 12, 529, 13, 365, 6315, 11495, 9316, 18, 6923, 12, 1734, 13, 2, -100, -100, -100, -100, -100...
if hasattr(self.fields_type[field], 'selection'):
field_type = self.fields_type[field]['type'] if field_type in ('selection'):
def on_get_value(self, node, column): (i, values) = node[-1] if column: value = values[i][1][column - 1] else: value = values[i][0]
d15df37768a4c23432162af0271f884e4701c03d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/d15df37768a4c23432162af0271f884e4701c03d/view_tree.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 588, 67, 1132, 12, 2890, 16, 756, 16, 1057, 4672, 261, 77, 16, 924, 13, 273, 756, 18919, 21, 65, 309, 1057, 30, 460, 273, 924, 63, 77, 6362, 21, 6362, 2827, 300, 404, 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, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 588, 67, 1132, 12, 2890, 16, 756, 16, 1057, 4672, 261, 77, 16, 924, 13, 273, 756, 18919, 21, 65, 309, 1057, 30, 460, 273, 924, 63, 77, 6362, 21, 6362, 2827, 300, 404, 65, ...
gnome22.addmod('gnome-themes')
gnome22.addmod('gnome-themes', dependencies=['gtk-engines'])
def sfcvsroot(project): return ':pserver:anonymous@cvs.%s.sourceforge.net:/cvsroot/%s' % \ (project, project)
7530091dbe2f82baa5d616a81a27399a645c9cbb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4596/7530091dbe2f82baa5d616a81a27399a645c9cbb/moduleinfo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 7142, 6904, 3085, 12, 4406, 4672, 327, 4290, 84, 3567, 30, 19070, 36, 71, 6904, 7866, 87, 18, 3168, 1884, 908, 18, 2758, 27824, 71, 6904, 3085, 5258, 87, 11, 738, 521, 261, 4406, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 272, 7142, 6904, 3085, 12, 4406, 4672, 327, 4290, 84, 3567, 30, 19070, 36, 71, 6904, 7866, 87, 18, 3168, 1884, 908, 18, 2758, 27824, 71, 6904, 3085, 5258, 87, 11, 738, 521, 261, 4406, ...
gateGump.addText( 70, 70, "Trammel", 12 ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 )
gateGump.addText( 35, 35, "Trammel", 61 ) gateGump.addPageButton( 10, 35, 0x4B9, 0x4BA, 1 ) gateGump.addText( 35, 60, "Felucca" ) gateGump.addPageButton( 10, 60, 0x4B9, 0x4BA, 2 ) gateGump.addText( 35, 85, "Ilshenar" ) gateGump.addPageButton( 10, 85, 0x4B9, 0x4BA, 3 )
def sendGump( char, item ): char.soundeffect( 0x58 ) # noclose, nomove gump gateGump = cGump( 1, 1, 0, 30, 30 ) # trammel gateGump.startPage( 1 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel", 12 ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 5 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 6 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 7 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addButton( 150, 135, 0x837, 0x838, 8 ) gateGump.addText( 170, 150, "Trinsic" ) gateGump.addButton( 150, 155, 0x837, 0x838, 9 ) gateGump.addText( 170, 170, "Vesper" ) gateGump.addButton( 150, 175, 0x837, 0x838, 10 ) gateGump.addText( 170, 190, "Yew" ) gateGump.addButton( 150, 195, 0x837, 0x838, 11 ) gateGump.addText( 170, 210, "Jhelom" ) gateGump.addButton( 150, 215, 0x837, 0x838, 12 ) # felucca gateGump.startPage( 2 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca", 12 ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar" ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # gates gateGump.addText( 170, 70, "Britain" ) gateGump.addButton( 150, 75, 0x837, 0x838, 13 ) gateGump.addText( 170, 90, "Magincia" ) gateGump.addButton( 150, 95, 0x837, 0x838, 14 ) gateGump.addText( 170, 110, "Moonglow" ) gateGump.addButton( 150, 115, 0x837, 0x838, 15 ) gateGump.addText( 170, 130, "Skara Brae" ) gateGump.addButton( 150, 135, 0x837, 0x838, 16 ) gateGump.addText( 170, 150, "Trinsic" ) gateGump.addButton( 150, 155, 0x837, 0x838, 17 ) gateGump.addText( 170, 170, "Vesper" ) gateGump.addButton( 150, 175, 0x837, 0x838, 18 ) gateGump.addText( 170, 190, "Yew" ) gateGump.addButton( 150, 195, 0x837, 0x838, 19 ) gateGump.addText( 170, 210, "Jhelom" ) gateGump.addButton( 150, 215, 0x837, 0x838, 20 ) # ilshenar gateGump.startPage( 3 ) gateGump.addBackground( 9200, 300, 255 ) gateGump.addText( 40, 40, "Pick your destination:" ) gateGump.addButton( 47, 207, 0xFA5, 0xFA7, 0 ) gateGump.addText( 80, 210, "CANCEL" ) # facets gateGump.addText( 70, 70, "Trammel" ) gateGump.addPageButton( 48, 72, 0x4B9, 0x4BA, 1 ) gateGump.addText( 70, 90, "Felucca" ) gateGump.addPageButton( 48, 95, 0x4B9, 0x4BA, 2 ) gateGump.addText( 70, 110, "Ilshenar", 12 ) gateGump.addPageButton( 48, 115, 0x4B9, 0x4BA, 3 ) # #gates gateGump.addText( 170, 70, "Compassion" ) gateGump.addButton( 150, 75, 0x837, 0x838, 21 ) gateGump.addText( 170, 90, "Honesty" ) gateGump.addButton( 150, 95, 0x837, 0x838, 22 ) gateGump.addText( 170, 110, "Honor" ) gateGump.addButton( 150, 115, 0x837, 0x838, 23 ) gateGump.addText( 170, 130, "Humility" ) gateGump.addButton( 150, 135, 0x837, 0x838, 24 ) gateGump.addText( 170, 150, "Justice" ) gateGump.addButton( 150, 155, 0x837, 0x838, 25 ) gateGump.addText( 170, 170, "Sacrifice" ) gateGump.addButton( 150, 175, 0x837, 0x838, 26 ) gateGump.addText( 170, 190, "Spirituality" ) gateGump.addButton( 150, 195, 0x837, 0x838, 27 ) gateGump.addText( 170, 210, "Valor" ) gateGump.addButton( 150, 215, 0x837, 0x838, 28 ) gateGump.addText( 170, 230, "Chaos" ) gateGump.addButton( 150, 235, 0x837, 0x838, 29 ) # set callback function and its arguments gateGump.setCallback( "moongate.gateCallback" ) # send it gateGump.setArgs( [ item ] ) gateGump.setType( 0x87654321 ) gateGump.send( char )
078c28c7a104b7c508f8af153c2fb3023747f514 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/078c28c7a104b7c508f8af153c2fb3023747f514/moongate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 43, 2801, 12, 1149, 16, 761, 262, 30, 1149, 18, 87, 465, 536, 74, 386, 12, 374, 92, 8204, 262, 468, 30601, 2061, 16, 12457, 841, 314, 2801, 12611, 43, 2801, 273, 276, 43, 2801,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 43, 2801, 12, 1149, 16, 761, 262, 30, 1149, 18, 87, 465, 536, 74, 386, 12, 374, 92, 8204, 262, 468, 30601, 2061, 16, 12457, 841, 314, 2801, 12611, 43, 2801, 273, 276, 43, 2801,...
date = date or "%d %d" % (time.time(), time.timezone)
if date: date = util.date_parser(date) else: if time.daylight: offset = time.altzone else: offset = time.timezone date = "%d %d" % (time.time(), offset)
def add(self, manifest, list, desc, transaction, p1=None, p2=None, user=None, date=None): date = date or "%d %d" % (time.time(), time.timezone) list.sort() l = [hex(manifest), user, date] + list + ["", desc] text = "\n".join(l) return self.addrevision(text, transaction, self.count(), p1, p2)
c1bb4f8986d005e0ab0ebb6d31382d0e0e3673d2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/c1bb4f8986d005e0ab0ebb6d31382d0e0e3673d2/hg.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 5643, 16, 666, 16, 3044, 16, 2492, 16, 293, 21, 33, 7036, 16, 293, 22, 33, 7036, 16, 729, 33, 7036, 16, 1509, 33, 7036, 4672, 309, 1509, 30, 1509, 273, 1709, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 5643, 16, 666, 16, 3044, 16, 2492, 16, 293, 21, 33, 7036, 16, 293, 22, 33, 7036, 16, 729, 33, 7036, 16, 1509, 33, 7036, 4672, 309, 1509, 30, 1509, 273, 1709, 18,...
1 + (a + 1)*x/2 - ((a^2 + 2*a + 1)*x^2/8) + (3*a^3 + 9*a^2 + 9*a - 1)*x^3/48
1 + (a + 1)*x/2 - (a^2 + 2*a + 1)*x^2/8 + (3*a^3 + 9*a^2 + 9*a - 1)*x^3/48
def taylor(self, v, a, n): """ Expands self in a truncated Taylor or Laurent series in the variable v around the point a, containing terms through $(x - a)^n$.
7042f0e43d557a3d80ba470d1c31e104f0ec22eb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/7042f0e43d557a3d80ba470d1c31e104f0ec22eb/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 268, 528, 80, 280, 12, 2890, 16, 331, 16, 279, 16, 290, 4672, 3536, 7784, 5708, 365, 316, 279, 15282, 399, 528, 80, 280, 578, 511, 8377, 547, 4166, 316, 326, 2190, 331, 6740, 326, 16...
result = self.handle_join_success(data)
self.handle_join_success(data)
def action_join(self, action, data): result = self.handle_join_success(data) # XXX Return somewhere else, depending on what # handle_join_success returns? return self.context.unrestrictedTraverse('registered')()
5c0fd9b4ac65e57b33b447eb28ff360caf5f7d81 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12186/5c0fd9b4ac65e57b33b447eb28ff360caf5f7d81/register.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 5701, 12, 2890, 16, 1301, 16, 501, 4672, 365, 18, 4110, 67, 5701, 67, 4768, 12, 892, 13, 468, 11329, 2000, 22234, 469, 16, 8353, 603, 4121, 468, 1640, 67, 5701, 67, 4768, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1301, 67, 5701, 12, 2890, 16, 1301, 16, 501, 4672, 365, 18, 4110, 67, 5701, 67, 4768, 12, 892, 13, 468, 11329, 2000, 22234, 469, 16, 8353, 603, 4121, 468, 1640, 67, 5701, 67, 4768, 1...
while fr and back!=0:
while fr and back != 0:
def getlocals(back=2): """Get the local variables some levels back (-1 is top).""" import inspect fr = inspect.currentframe() try: while fr and back!=0: fr1 = fr; fr = fr.f_back back -= 1 except: pass return fr1.f_locals
4f69430b7199d7a36568f5b8c5606ff94d204949 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7472/4f69430b7199d7a36568f5b8c5606ff94d204949/substitute.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 17977, 12, 823, 33, 22, 4672, 3536, 967, 326, 1191, 3152, 2690, 7575, 1473, 24927, 21, 353, 1760, 13, 12123, 1930, 5334, 3812, 273, 5334, 18, 2972, 3789, 1435, 775, 30, 1323, 3812, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17977, 12, 823, 33, 22, 4672, 3536, 967, 326, 1191, 3152, 2690, 7575, 1473, 24927, 21, 353, 1760, 13, 12123, 1930, 5334, 3812, 273, 5334, 18, 2972, 3789, 1435, 775, 30, 1323, 3812, ...
return
return OK else: return OOPS """ ----------------------------- -- POTION FUNCTIONS -- ----------------------------- """ def nightsightPotion( char, potion ): if char.hastag('nightsight'): bonus = char.gettag('nightsight') char.lightbonus = max(0, char.lightbonus - bonus) bonus = min(18, math.floor(18 * (char.skill[MAGERY] / 1000.0))) char.events = ['magic.nightsight'] + char.events char.settag("nightsight", bonus) char.settag("nightsight_start", time.minutes()) char.lightbonus += bonus if char.socket: char.socket.updatelightlevel() char.soundeffect(0x1e3) char.effect(0x376a, 9, 32) consumePotion( char, potion, potions[ potion.gettag('potiontype') ][ POT_RETURN_BOTTLE ] ) return OK def healPotion( char, potion, healtype ): if not canUsePotion( char, potion ) or not checkHealTimer( char ): return OOPS amount = 0 if healtype == 1: amount = randint( POTION_LESSERHEAL_RANGE[0], POTION_LESSERHEAL_RANGE[1] ) elif healtype == 2: amount = randint( POTION_HEAL_RANGE[0], POTION_HEAL_RANGE[1] ) elif healtype == 3: amount = randint( POTION_GREATERHEAL_RANGE[0], POTION_GREATERHEAL_RANGE[1] ) char.hitpoints = min( char.hitpoints + amount, char.maxhitpoints ) char.updatehealth() char.socket.sysmessage( 'You have had ' + str( amount ) + ' hit points of damage healed.', GRAY ) char.action( ANIM_FIDGET3 ) char.soundeffect( SOUND_DRINK1 ) consumePotion( char, potion, potions[ healtype ][ POT_RETURN_BOTTLE ] ) return OK
def effecttimer( time, args ): char = args[0] effecttype = args[1] bonus = args[2] if effecttype == 6 or effecttype == 7: if not char.hastag( 'agility_effect' ): return OOPS char.dexterity = char.dexterity - bonus char.maxstamina = char.maxstamina - bonus if char.stamina > char.maxstamina: char.stamina = char.maxstamina char.deltag( 'agility_effect' ) char.updatestamina() char.updatestats() return elif effecttype == 8 or effecttype == 9: if not char.hastag( 'strength_effect' ): return OOPS char.strength = char.strength - bonus if char.hitpoints > char.maxhitpoints: char.hitpoints = char.maxhitpoints char.deltag( 'strength_effect' ) char.updatehealth() char.updatestats() return elif effecttype == 20 or effecttype == 21: if not char.hastag( 'intelligence_effect' ): return OOPS char.intelligence = char.intelligence - bonus char.maxmana = char.maxmana - bonus if char.mana > char.maxmana: char.mana = char.maxmana char.deltag( 'intelligence_effect' ) char.updatemana() char.updatestats() return
1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2534/1dbb4f996db2ee1cdf189b46c7eeed3786d7b16c/potions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 12542, 12, 813, 16, 833, 262, 30, 1149, 273, 833, 63, 20, 65, 5426, 723, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 225, 309, 5426, 723, 422, 1666, 578, 5426, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5426, 12542, 12, 813, 16, 833, 262, 30, 1149, 273, 833, 63, 20, 65, 5426, 723, 273, 833, 63, 21, 65, 324, 22889, 273, 833, 63, 22, 65, 225, 309, 5426, 723, 422, 1666, 578, 5426, 72...
raise YumError, "Error peforming yum command: %s" % command
raise YumError, "Error performing yum command: %s" % command
def yum(self, cmd): """use yum to install packages/package groups into the chroot""" # mock-helper yum --installroot=rootdir cmd basecmd = '%s --installroot %s' % (self.config['yum'], self.rootdir) self._mount() # check it again command = '%s %s' % (basecmd, cmd) self.debug("yum: command %s" % command)
2eb9b6dcc7170162e3a477a3391056d8951e4c8f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7328/2eb9b6dcc7170162e3a477a3391056d8951e4c8f/mock.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 379, 12, 2890, 16, 1797, 4672, 3536, 1202, 677, 379, 358, 3799, 5907, 19, 5610, 3252, 1368, 326, 462, 3085, 8395, 468, 5416, 17, 4759, 677, 379, 1493, 5425, 3085, 33, 3085, 1214, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 677, 379, 12, 2890, 16, 1797, 4672, 3536, 1202, 677, 379, 358, 3799, 5907, 19, 5610, 3252, 1368, 326, 462, 3085, 8395, 468, 5416, 17, 4759, 677, 379, 1493, 5425, 3085, 33, 3085, 1214, ...
def LoadLibraryClass(XmlLibraryClass):
def LoadLibraryClassSupModuleList(XmlLibraryClass):
def LoadLibraryClass(XmlLibraryClass): XmlTag = "Usage" Usage = XmlAttribute(XmlLibraryClass, XmlTag) if Usage == "ALWAYS_PRODUCED": XmlTag = "SupModuleList" SupModuleList = XmlAttribute(XmlLibraryClass, XmlTag).split() return SupModuleList
e3ad7624a34c23e19c67d615b2919203a867bc02 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/e3ad7624a34c23e19c67d615b2919203a867bc02/LoadFpd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 4444, 9313, 797, 3088, 3120, 682, 12, 4432, 9313, 797, 4672, 5714, 1805, 273, 315, 5357, 6, 10858, 273, 5714, 1499, 12, 4432, 9313, 797, 16, 5714, 1805, 13, 309, 10858, 422, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1850, 1652, 4444, 9313, 797, 3088, 3120, 682, 12, 4432, 9313, 797, 4672, 5714, 1805, 273, 315, 5357, 6, 10858, 273, 5714, 1499, 12, 4432, 9313, 797, 16, 5714, 1805, 13, 309, 10858, 422, 315, ...
print "%d plugin have been loaded." % len(Plugin.__subclasses__())
print "%d plugin have been loaded." % len(Plugin.__subclasses__())
def __init__(self): sys.path.insert(0, siteconfig.ruleset_dir)
6c4d0d1c997d6e6a67b4a3d914aa3799bca4870c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3386/6c4d0d1c997d6e6a67b4a3d914aa3799bca4870c/plugins.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2589, 18, 803, 18, 6387, 12, 20, 16, 10982, 22703, 18, 7482, 278, 67, 1214, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 2589, 18, 803, 18, 6387, 12, 20, 16, 10982, 22703, 18, 7482, 278, 67, 1214, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
if elsePart and thenPart.type == "semicolon" and elsePart.type == "semicolon": thenExpression = getattr(thenPart, "expression", None) elseExpression = getattr(elsePart, "expression", None) if thenExpression and elseExpression: replacement = combineAssignments(condition, thenExpression, elseExpression) or combineExpressions(condition, thenExpression, elseExpression) if replacement: node.parent.replace(node, replacement)
if elsePart: if thenPart.type == "semicolon" and elsePart.type == "semicolon": thenExpression = getattr(thenPart, "expression", None) elseExpression = getattr(elsePart, "expression", None) if thenExpression and elseExpression: replacement = combineAssignments(condition, thenExpression, elseExpression) or combineExpressions(condition, thenExpression, elseExpression) if replacement: node.parent.replace(node, replacement)
def optimize(node, level=0): # Process from inside to outside for child in node: optimize(child, level+1) # Remove unneeded parens if getattr(node, "parenthesized", False) and node.type in expressions: fixParens(node) # Unwrap blocks if node.type == "block": if node.parent.type in ("try", "catch", "finally"): # print("Omit unwrapping of block (try/catch/finally) at #%s" % level) pass elif len(node) == 0: # print("Replace empty block #%s" % level) node.parent.replace(node, Node(node.tokenizer, "semicolon")) elif len(node) == 1: if node.parent.type == "if" and containsIf(node): # print("Omit unwrapping of block (cascaded if blocks) at #%s" % level) pass else: # print("Unwrap block at #%s" % level) node.parent.replace(node, node[0]) # Process all if-statements if node.type == "if": condition = node.condition thenPart = node.thenPart elsePart = getattr(node, "elsePart", None) # Optimize using hook operator if elsePart and thenPart.type == "return" and elsePart.type == "return": # Combine return statement # print("Merge return at #%s" % level) replacement = createReturn(createHook(condition, thenPart.value, elsePart.value)) node.parent.replace(node, replacement) return # Check whether if-part ends with a return statement. Then # We do not need a else statement here and just can wrap the whole content # of the else block inside the parent if elsePart and endsWithReturnOrThrow(thenPart): ifIndex = node.parent.index(node)+1 if elsePart.type == "if": node.parent.insert(ifIndex, elsePart) elif elsePart.type == "block": for child in reversed(elsePart): node.parent.insert(ifIndex, child) # Remove else block from if statement node.remove(elsePart) # Reset elsePart variable as it is now cleaned up elsePart = None # Optimize using "AND" or "OR" operators # Combine multiple semicolon statements into one semicolon statement using an "comma" expression thenPart = combineToCommaExpression(thenPart, level) elsePart = combineToCommaExpression(elsePart, level) # Optimize using hook operator if elsePart and thenPart.type == "semicolon" and elsePart.type == "semicolon": # Combine two assignments or expressions thenExpression = getattr(thenPart, "expression", None) elseExpression = getattr(elsePart, "expression", None) if thenExpression and elseExpression: replacement = combineAssignments(condition, thenExpression, elseExpression) or combineExpressions(condition, thenExpression, elseExpression) if replacement: # print("Merge assignment/expression at #%s" % level) node.parent.replace(node, replacement) elif thenPart.type == "semicolon": compactIf(node, thenPart, condition)
61e9ba307e8bb4d59f0c98365fbdd8ae8f05a09e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/61e9ba307e8bb4d59f0c98365fbdd8ae8f05a09e/BlockReducer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 12, 2159, 16, 1801, 33, 20, 4672, 468, 4389, 628, 4832, 358, 8220, 364, 1151, 316, 756, 30, 10979, 12, 3624, 16, 1801, 15, 21, 13, 282, 468, 3581, 16209, 8033, 30821, 309, 3869,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10979, 12, 2159, 16, 1801, 33, 20, 4672, 468, 4389, 628, 4832, 358, 8220, 364, 1151, 316, 756, 30, 10979, 12, 3624, 16, 1801, 15, 21, 13, 282, 468, 3581, 16209, 8033, 30821, 309, 3869,...
raise ValueError, "can\'t create a read-only file"
raise ValueError, "can't create a read-only file"
def __init__(self, file_name, create=0, read_only=0, stop=None, quota=None):
ad85dfb9cd6957f764453d68c5aa78663f064355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/ad85dfb9cd6957f764453d68c5aa78663f064355/FileStorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 67, 529, 16, 752, 33, 20, 16, 855, 67, 3700, 33, 20, 16, 2132, 33, 7036, 16, 13257, 33, 7036, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 585, 67, 529, 16, 752, 33, 20, 16, 855, 67, 3700, 33, 20, 16, 2132, 33, 7036, 16, 13257, 33, 7036, 4672, 2, -100, -100, -100, -100, -100, -100, -100, ...
str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`uid.module()`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
str += I+'<TH CLASS="navbar">&nbsp;&nbsp;&nbsp;'+\ '<A CLASS="navbar" HREF="'+`uid.module()`+'.html">'+\ 'Module</A>&nbsp;&nbsp;&nbsp;</TH>\n'
def _navbar(self, where, uid=None): """ @param where: What page the navbar is being displayed on.. """ str = self._start_of('Navbar') + \ '<TABLE BORDER="0" WIDTH="100%" '+\ 'CELLPADDING="0" BGCOLOR="WHITE" CELLSPACING="0">\n'+\ '<TR>\n<TD COLSPAN=2 BGCOLOR="#a0c0ff">\n'+\ '<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="1">\n'+\ ' <TR ALIGN="center" VALIGN="top">\n' # Go to Package if self._package is None: pass elif where in ('class', 'module'): pkg = uid.package() if pkg is not None: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`pkg`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='package': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._package, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._package`+'.html">'+\ 'Package</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._package: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Package' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Module if self._module is None: pass elif where=='class': str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`uid.module()`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif where=='module': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif isinstance(self._module, UID): str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">'+\ '<A HREF="'+`self._module`+'.html">'+\ 'Module</A>'+\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' elif 'multiple' == self._module: str += ' <TD>&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Module' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD></B>\n' # Go to Class if where == 'class': str += ' <TD BGCOLOR="#70b0f0">&nbsp;&nbsp;&nbsp;'+\ '<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n' else: str += ' <TD>&nbsp;&nbsp;&nbsp;<B><FONT SIZE="+1">Class' +\ '</FONT></B>&nbsp;&nbsp;&nbsp;</TD>\n'
208b57b68fee425e4ef284675975df62fecdb5ea /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/208b57b68fee425e4ef284675975df62fecdb5ea/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11589, 3215, 12, 2890, 16, 1625, 16, 4555, 33, 7036, 4672, 3536, 632, 891, 1625, 30, 18734, 1363, 326, 8775, 3215, 353, 3832, 10453, 603, 838, 3536, 609, 273, 365, 6315, 1937, 67, ...
elif status == csp.Alternatives(2):
elif status == csp.Alternative(2):
def do_dfs(space): print "do_dfs" status = space.ask() if status == csp.Failed: return None elif status == csp.Succeeded: return space elif status == csp.Alternatives(2): new_space = space.clone() space.commit(1) outcome = do_dfs(space) if outcome is None: new_space.commit(2) return do_dfs(new_space) else: return outcome else: raise StrategyDistributionMismatch()
608cb3cf7db4c35479b9e60d58a47d935b939a65 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/608cb3cf7db4c35479b9e60d58a47d935b939a65/strategies.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 12381, 12, 2981, 4672, 1172, 315, 2896, 67, 12381, 6, 1267, 273, 3476, 18, 835, 1435, 309, 1267, 422, 26475, 18, 2925, 30, 327, 599, 1327, 1267, 422, 26475, 18, 30500, 30, 327...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 12381, 12, 2981, 4672, 1172, 315, 2896, 67, 12381, 6, 1267, 273, 3476, 18, 835, 1435, 309, 1267, 422, 26475, 18, 2925, 30, 327, 599, 1327, 1267, 422, 26475, 18, 30500, 30, 327...
'TeX typewriter text' : '09fbbfac.enc',
'TeX typewriter text': '09fbbfac.enc',
def interpolate (str): str = string.replace (str, '{', '(') str = string.replace (str, '}', ')s') str = string.replace (str, '$', '%') return str
d96cc8339091f674ea0fc313632dcc5c333eeb78 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11856/d96cc8339091f674ea0fc313632dcc5c333eeb78/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13156, 261, 701, 4672, 609, 273, 533, 18, 2079, 261, 701, 16, 2292, 2187, 7321, 13, 609, 273, 533, 18, 2079, 261, 701, 16, 9571, 16, 8624, 87, 6134, 609, 273, 533, 18, 2079, 261, 701...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13156, 261, 701, 4672, 609, 273, 533, 18, 2079, 261, 701, 16, 2292, 2187, 7321, 13, 609, 273, 533, 18, 2079, 261, 701, 16, 9571, 16, 8624, 87, 6134, 609, 273, 533, 18, 2079, 261, 701...
if release_esema: self.esema.release() self.mutex.release() return item
self.not_empty.release()
def get(self, block=True, timeout=None): """Remove and return an item from the queue.
664649f75f8c5918ee8640798839f5366d8dc59c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/664649f75f8c5918ee8640798839f5366d8dc59c/Queue.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 3288, 471, 327, 392, 761, 628, 326, 2389, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 1203, 33, 5510, 16, 2021, 33, 7036, 4672, 3536, 3288, 471, 327, 392, 761, 628, 326, 2389, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
init()
if not inited: init()
def guess_all_extensions(type, strict=True): """Guess the extensions for a file based on its MIME type. Return value is a list of strings giving the possible filename extensions, including the leading dot ('.'). The extension is not guaranteed to have been associated with any particular data stream, but would be mapped to the MIME type `type' by guess_type(). If no extension can be guessed for `type', None is returned. Optional `strict' argument when false adds a bunch of commonly found, but non-standard types. """ init() return guess_all_extensions(type, strict)
ad58b7c9da1f12499d7d926b084135e997ea96ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8546/ad58b7c9da1f12499d7d926b084135e997ea96ad/mimetypes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7274, 67, 454, 67, 9489, 12, 723, 16, 5490, 33, 5510, 4672, 3536, 15977, 326, 4418, 364, 279, 585, 2511, 603, 2097, 13195, 618, 18, 225, 2000, 460, 353, 279, 666, 434, 2064, 21057, 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, 7274, 67, 454, 67, 9489, 12, 723, 16, 5490, 33, 5510, 4672, 3536, 15977, 326, 4418, 364, 279, 585, 2511, 603, 2097, 13195, 618, 18, 225, 2000, 460, 353, 279, 666, 434, 2064, 21057, 326...
if not isinstance(c,COLORREF): raise ValueError("%s is not a COLORREF instance"%c) return cls(c.value&0xff,(c.value<<8)&0xff,(c.value<<16)&0xff)
if isinstance(c,COLORREF): c=c.value return cls(c&0xff,(c>>8)&0xff,(c>>16)&0xff)
def fromCOLORREF(cls,c): """factory method to create an RGB from a COLORREF ctypes instance""" if not isinstance(c,COLORREF): raise ValueError("%s is not a COLORREF instance"%c) return cls(c.value&0xff,(c.value<<8)&0xff,(c.value<<16)&0xff)
dfa1b91a6b6002a16cfc892ac719dcf84fd68a0a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9340/dfa1b91a6b6002a16cfc892ac719dcf84fd68a0a/colors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 10989, 10771, 12, 6429, 16, 71, 4672, 3536, 6848, 707, 358, 752, 392, 11510, 628, 279, 15590, 10771, 6983, 791, 8395, 309, 486, 1549, 12, 71, 16, 10989, 10771, 4672, 1002, 2068, 271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 628, 10989, 10771, 12, 6429, 16, 71, 4672, 3536, 6848, 707, 358, 752, 392, 11510, 628, 279, 15590, 10771, 6983, 791, 8395, 309, 486, 1549, 12, 71, 16, 10989, 10771, 4672, 1002, 2068, 271...
class ShellViewerSTC(FundamentalSTC):
class ShellMode(FundamentalMode):
def GetModify(self): return False
e24f1ead981bf95c6f4aca8d2bc50a20ad2422bb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11522/e24f1ead981bf95c6f4aca8d2bc50a20ad2422bb/shell_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 11047, 12, 2890, 4672, 327, 1083, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 968, 11047, 12, 2890, 4672, 327, 1083, 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, -1...
video = history[i].split(u'\\')
video = history[i].split(DV.history_split)
def update(self): Damnlog('Clearing video history panel.') self.historySizer.DeleteWindows() self.historyPanel.DestroyChildren() history = DV.prefs.geta('damnvid-videohistory','videos') histsize = int(DV.prefs.get('videohistorysize')) Damnlog('Video history is',history,'; history size is',histsize) if not histsize: Damnlog('Histsize is zero.') self.historySizer.Add(wx.StaticText(self.historyPanel, -1, DV.l('The history feature has been disabled in the preferences.'))) elif not len(history): Damnlog('History is empty.') self.historySizer.Add(wx.StaticText(self.historyPanel, -1, DV.l('The history is empty.'))) else: Damnlog('Histsize is not 0, building history.') todrop = [] for i in range(min(histsize,len(history))): video = history[i].split(u'\\') if len(video) != 3: Damnlog('Invalid length', len(video),'for history item', video,'; dropping', i) todrop.append(i) else: self.addHistoryItem(video[0], video[1], video[2]) if len(todrop): Damnlog('Dropping history entries:', todrop) todrop.reverse() for i in todrop: history = history[:i] + history[i+1:] DV.prefs.seta('damnvid-videohistory','videos',history) Damnlog('Done building video history dialog.') self.historyPanel.AdjustScrollbars() self.toppanel.Layout() self.SetClientSize(self.toppanel.GetBestSize())
5b06820b4b76c465dfd13e830392a9df37fda3c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11142/5b06820b4b76c465dfd13e830392a9df37fda3c2/DamnVid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 463, 301, 82, 1330, 2668, 4756, 5968, 6191, 4927, 6594, 1093, 13, 365, 18, 8189, 20512, 18, 2613, 10399, 1435, 365, 18, 8189, 5537, 18, 10740, 4212, 1435, 4927, 273...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 12, 2890, 4672, 463, 301, 82, 1330, 2668, 4756, 5968, 6191, 4927, 6594, 1093, 13, 365, 18, 8189, 20512, 18, 2613, 10399, 1435, 365, 18, 8189, 5537, 18, 10740, 4212, 1435, 4927, 273...
else: discretizer = orange.IntervalDiscretizer(points = customs).constructVariable(attr)
def computeDiscretizer(self, i, idx, onlyDefaults=False): attr = self.data.domain[idx] indiData = self.indiData[idx]
00cb826ec1525492077ee844ef6d53998f8b072c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/00cb826ec1525492077ee844ef6d53998f8b072c/OWDiscretize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 28912, 1349, 1824, 12, 2890, 16, 277, 16, 2067, 16, 1338, 7019, 33, 8381, 4672, 1604, 273, 365, 18, 892, 18, 4308, 63, 3465, 65, 1547, 77, 751, 273, 365, 18, 728, 77, 751, 63, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3671, 28912, 1349, 1824, 12, 2890, 16, 277, 16, 2067, 16, 1338, 7019, 33, 8381, 4672, 1604, 273, 365, 18, 892, 18, 4308, 63, 3465, 65, 1547, 77, 751, 273, 365, 18, 728, 77, 751, 63, ...
self.assertEqual(n_servers, len(self.cluster))
try: n_cpus = multiprocessing.cpu_count() except AttributeError: n_cpus = 1 self.assertEqual(n_servers, len(self.cluster)*n_cpus)
def test_normal(self): logging.debug('') logging.debug('test_normal')
820f346492558f340bcd0fe0ce6d231df361e0e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/820f346492558f340bcd0fe0ce6d231df361e0e8/test_resource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6130, 12, 2890, 4672, 2907, 18, 4148, 2668, 6134, 2907, 18, 4148, 2668, 3813, 67, 6130, 6134, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 6130, 12, 2890, 4672, 2907, 18, 4148, 2668, 6134, 2907, 18, 4148, 2668, 3813, 67, 6130, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
opts = '-background white -coalesce -flatten %(resize)s' % {
opts = '-background white -coalesce -density 100 -flatten %(resize)s' % {
def _convertToCache(self, srcfile, baseurl, name, size=None): """Convert image in file named srcfile to have the given maximum size and additionally convert it to grayscale. Save the converted image in the cache directory for the given baseurl. @returns: filenames of color and grayscale version of converted image @rtype: (basestring, basestring) """ colorpath = self._getCachedImagePath(baseurl, name, size=size, grayscale=False, makedirs=True) opts = '-background white -coalesce -flatten %(resize)s' % { 'resize': '-resize %dx%d' % (size, size) if size is not None else '', } cmd = "%(convert)s %(opts)s '%(src)s[0]' '%(dest)s'" % { 'convert': self.convert_command, 'opts': opts, 'src': srcfile, 'dest': colorpath, } log.info('executing %r' % cmd) rc = os.system(cmd.encode(sys.getfilesystemencoding())) if rc != 0: log.error('Could not convert %r: convert returned %d' % (name, rc)) return None, None graypath = self._getCachedImagePath(baseurl, name, size=size, grayscale=True, makedirs=True) cmd = '%(convert)s -type GrayScale "%(src)s" "%(dest)s"' % { 'convert': self.convert_command, 'src': colorpath, 'dest': graypath, } log.info('executing %r' % cmd) rc = os.system(cmd.encode(sys.getfilesystemencoding())) if rc != 0: log.error('Could not convert %r to grayscale: convert returned %d' % (name, rc)) graypath = None return colorpath, graypath
ccaad980fa5b2100f425d22e7a5d3415ccdb0546 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12391/ccaad980fa5b2100f425d22e7a5d3415ccdb0546/netdb.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6283, 774, 1649, 12, 2890, 16, 1705, 768, 16, 25427, 16, 508, 16, 963, 33, 7036, 4672, 3536, 2723, 1316, 316, 585, 4141, 1705, 768, 358, 1240, 326, 864, 4207, 963, 471, 2719, 1230...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6283, 774, 1649, 12, 2890, 16, 1705, 768, 16, 25427, 16, 508, 16, 963, 33, 7036, 4672, 3536, 2723, 1316, 316, 585, 4141, 1705, 768, 358, 1240, 326, 864, 4207, 963, 471, 2719, 1230...
self.clear_image()
self.clear_image(self.width,self.height)
def load_image(self,path): """Loads an image from file and displays it in the program table""" try: image = PIL.Image.open(path) if image.mode != "RGB": image = image.convert("RGB") except IOError: self.message_handler.handle_error("FILE_NOT_LOADED") return (self.width, self.height) = image.size if self.width>self.max_width or self.height>self.max_height: self.message_handler.handle_error("IMAGE_TOO_BIG") else: self.clear_image() self.pixels = list(image.getdata()) self.initialise_program_table() self.set_current_file(path) self.set_changes_made(False) self.set_window_title(os.path.basename(path))
957e250090c79f4ca933e19b75d4fe9659153717 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1947/957e250090c79f4ca933e19b75d4fe9659153717/ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2730, 12, 2890, 16, 803, 4672, 3536, 7968, 392, 1316, 628, 585, 471, 22461, 518, 316, 326, 5402, 1014, 8395, 775, 30, 1316, 273, 29407, 18, 2040, 18, 3190, 12, 803, 13, 309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 2730, 12, 2890, 16, 803, 4672, 3536, 7968, 392, 1316, 628, 585, 471, 22461, 518, 316, 326, 5402, 1014, 8395, 775, 30, 1316, 273, 29407, 18, 2040, 18, 3190, 12, 803, 13, 309, ...
self.shortop = self.shortop + ":" + field
self.shortop = self.shortop + field + ":"
def __init__(self): """ Sets up appropriate strings and dictionaries. The parameters here should reflect available database fields. """ LSCfileAddMetadataAttr.__init__(self) #Initializes some shorthand variables from the attr dictionary. for field, vals in self.attr.iteritems(): if vals['UserSet']: if vals['Cli_arg_short']: self.cli_short_name[vals['Cli_arg_short']] = field if vals['Cli_arg_long']: self.cli_long_name[vals['Cli_arg_long']] = field # Non-metadata specific fields, e.g. url-type etc. self.shortop = "u:s:h" self.longop = [ "help", "url-type=", "server=" ] # more defaults port = 30010 clientMethodArgDict = { 'urlType': None } # default method OBVIOUSLY NEEDS TO BE CHANGED FOR THIS CLASS clientMethod = 'findFrameURLs' # now collect non-metadata specific args with LSCfileAddMetadataAttr args # for use in getopts for field, vals in self.cli_short_name.iteritems(): self.shortop = self.shortop + ":" + field for field, vals in self.cli_long_name.iteritems(): field = field + "=" self.longop.append(field)
08e4c95267b2490d8ad400cc6c685442327a1a9a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5758/08e4c95267b2490d8ad400cc6c685442327a1a9a/LSCfileAdd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 4672, 3536, 11511, 731, 5505, 2064, 471, 16176, 18, 1021, 1472, 2674, 1410, 3037, 2319, 2063, 1466, 18, 3536, 511, 2312, 768, 986, 2277, 3843, 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, 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, 4672, 3536, 11511, 731, 5505, 2064, 471, 16176, 18, 1021, 1472, 2674, 1410, 3037, 2319, 2063, 1466, 18, 3536, 511, 2312, 768, 986, 2277, 3843, 16186, 2738, 972, ...
print "nextPktNum: New Time"
LOG.debug( "nextPktNum: New Time" )
def nextPktNum(self):
69835a631879faf4f1d962b8382f2deb518e961d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8524/69835a631879faf4f1d962b8382f2deb518e961d/dtella_bridgeserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 7789, 88, 2578, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 7789, 88, 2578, 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, -10...
for outputModule, numDS in outputModulesList:
for outputModule, numDS in outputModulesList.items():
def add(self, workflowFile): """ _add_ Add a dataset to the list of watched datasets. Arguments: workflowFile -- the workflow specification file Return: the datasetId
0da1ec1990eeda9565a89690f732439098716ca6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8887/0da1ec1990eeda9565a89690f732439098716ca6/WatchedDatasets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 6095, 812, 4672, 3536, 389, 1289, 67, 225, 1436, 279, 3709, 358, 326, 666, 434, 23135, 11109, 18, 225, 13599, 30, 225, 6095, 812, 1493, 326, 6095, 7490, 585, 225, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 12, 2890, 16, 6095, 812, 4672, 3536, 389, 1289, 67, 225, 1436, 279, 3709, 358, 326, 666, 434, 23135, 11109, 18, 225, 13599, 30, 225, 6095, 812, 1493, 326, 6095, 7490, 585, 225, 20...
logger.info("CA certificate: %s" % self.cacert_path)
def setup(self, localcert_path, cacert_path, verifypeer): """ Just load the certs in verifypeer mode do nothing in standart mode """ logger = logging.getLogger()
a612e31e3145f09c95d8764790484b48f9f7ae10 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5988/a612e31e3145f09c95d8764790484b48f9f7ae10/xmlrpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 12, 2890, 16, 1191, 7593, 67, 803, 16, 276, 1077, 1051, 67, 803, 16, 1924, 430, 388, 264, 4672, 3536, 12526, 1262, 326, 13870, 316, 1924, 430, 388, 264, 1965, 741, 5083, 316, 128...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3875, 12, 2890, 16, 1191, 7593, 67, 803, 16, 276, 1077, 1051, 67, 803, 16, 1924, 430, 388, 264, 4672, 3536, 12526, 1262, 326, 13870, 316, 1924, 430, 388, 264, 1965, 741, 5083, 316, 128...
return 0, flavorList
return 0, flavorList, []
def _filterByPreferences(self, flavorList, scoreToMatch): preferenceList = self._flavorPreferences if not preferenceList: return 0, flavorList strongList = [ (x.toStrongFlavor(), x) for x in flavorList ] indexedList = list(enumerate(preferenceList[:scoreToMatch + 1])) nomatches = [] minScore = None matchingFlavors = [] import epdb epdb.st('f') for strongFlavor, flavor in strongList: for prefScore, preferenceFlavor in indexedList: if strongFlavor.satisfies(preferenceFlavor): if minScore is None or minScore < prefScore: matchingFlavors = [] elif minScore > prefScore: break minScore = prefScore matchingFlavors.append(flavor) break else: # no matching flavors nomatches.append(flavor) if scoreToMatch >= len(preferenceList) and nomatches: return 0, matchingFlavors + nomatches elif not matchingFlavors: return None, [] elif scoreToMatch >= minScore: return minScore, matchingFlavors + nomatches return None, []
adf01d831ec33eb35a69d047eafd6f0f0f2c9e22 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8747/adf01d831ec33eb35a69d047eafd6f0f0f2c9e22/trovesource.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2188, 858, 12377, 12, 2890, 16, 19496, 682, 16, 4462, 26726, 4672, 11555, 682, 273, 365, 6315, 2242, 9444, 12377, 309, 486, 11555, 682, 30, 327, 374, 16, 19496, 682, 16, 5378, 11773...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2188, 858, 12377, 12, 2890, 16, 19496, 682, 16, 4462, 26726, 4672, 11555, 682, 273, 365, 6315, 2242, 9444, 12377, 309, 486, 11555, 682, 30, 327, 374, 16, 19496, 682, 16, 5378, 11773...
self._controlPoints.Append(control)
self._controlPoints.append(control)
def MakeControlPoints(self): """Make handle control points.""" if self._canvas and self._lineControlPoints: first = self._lineControlPoints[0] last = self._lineControlPoints[-1]
d8f9d612beeee767cc969468c635e494dcbf08df /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/d8f9d612beeee767cc969468c635e494dcbf08df/_lines.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 3367, 5636, 12, 2890, 4672, 3536, 6464, 1640, 3325, 3143, 12123, 309, 365, 6315, 15424, 471, 365, 6315, 1369, 3367, 5636, 30, 1122, 273, 365, 6315, 1369, 3367, 5636, 63, 20, 65, 11...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 3367, 5636, 12, 2890, 4672, 3536, 6464, 1640, 3325, 3143, 12123, 309, 365, 6315, 15424, 471, 365, 6315, 1369, 3367, 5636, 30, 1122, 273, 365, 6315, 1369, 3367, 5636, 63, 20, 65, 11...
'<hr><strong>Error, <em>%s</em>:</strong> %s'
'<strong>Error, <em>%s</em>:</strong> %s'
def manage_test(self, REQUEST):
47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/47eff56d1f2c9cc7ed46d7a29ef15a29fd392e25/DA.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 3813, 12, 2890, 16, 12492, 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, 10680, 67, 3813, 12, 2890, 16, 12492, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
n = sage.rings.integer.Integer(n)
n = Integer(n)
def __call__(self, n, watch=False): n = sage.rings.integer.Integer(n) cmd = 'echo "%s" | %s'%(n, self.__cmd) if watch: t = tmp_filename() os.system('%s | tee %s'%(cmd, t)) ou = open(t).read() os.unlink(t) else: i,o,e = os.popen3(cmd) i.close() ou = e.read() + '\n' + o.read() if 'command not found' in ou: err = ou + '\n' + 'You must install GMP-ECM.\n' err += sage.misc.package.package_mesg('ecm-6.0.1') raise RuntimeError, err return ou
03000ffd92da6e4411ad09bed68dd970417bd216 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/03000ffd92da6e4411ad09bed68dd970417bd216/ecm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 290, 16, 4267, 33, 8381, 4672, 290, 273, 2144, 12, 82, 13, 1797, 273, 296, 12946, 2213, 87, 6, 571, 738, 87, 11, 17105, 82, 16, 365, 16186, 4172, 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, 1001, 1991, 972, 12, 2890, 16, 290, 16, 4267, 33, 8381, 4672, 290, 273, 2144, 12, 82, 13, 1797, 273, 296, 12946, 2213, 87, 6, 571, 738, 87, 11, 17105, 82, 16, 365, 16186, 4172, 13, ...
logger.error("Job %d is in an unsupported status %s and so the merge can not continue. '\ 'Supported statuses are 'completed', 'failed' or 'killed' (if the ignorefailed flag is set).", j.id, j.status)
logger.error("Job %s is in an unsupported status %s and so the merge can not continue. '\ 'Supported statuses are 'completed', 'failed' or 'killed' (if the ignorefailed flag is set).", j.fqid, j.status)
def merge(self, jobs, outputdir = None, ignorefailed = None, overwrite = None): """ Method to merge the output of jobs. jobs may be a single job instance or a sequence of Jobs outputdir is the name of the directry to put the merge results in. It will be created if needed. ignorefailed and overwrite have the same meaning as in the schema, but override the schema values.
e22fb79dc6db84ce7b972b3d6370e43de872b397 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/e22fb79dc6db84ce7b972b3d6370e43de872b397/Merger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 12, 2890, 16, 6550, 16, 876, 1214, 273, 599, 16, 2305, 7307, 273, 599, 16, 6156, 273, 599, 4672, 3536, 2985, 358, 2691, 326, 876, 434, 6550, 18, 225, 6550, 2026, 506, 279, 2202, ...
inifile.write ("[metadata]\n")
lines.append ("[metadata]")
def create_inifile (self): # Create an inifile containing data describing the installation. # This could be done without creating a real file, but # a file is (at least) useful for debugging bdist_wininst.
0d2bc4c32a4cb17344d3f3bcb1d31f939cf47269 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/0d2bc4c32a4cb17344d3f3bcb1d31f939cf47269/bdist_wininst.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 267, 430, 398, 261, 2890, 4672, 468, 1788, 392, 316, 430, 398, 4191, 501, 16868, 326, 13193, 18, 468, 1220, 3377, 506, 2731, 2887, 4979, 279, 2863, 585, 16, 1496, 468, 279, 58...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 267, 430, 398, 261, 2890, 4672, 468, 1788, 392, 316, 430, 398, 4191, 501, 16868, 326, 13193, 18, 468, 1220, 3377, 506, 2731, 2887, 4979, 279, 2863, 585, 16, 1496, 468, 279, 58...
data = [ ]
data = []
def writeTimecourse(self): data = [ ]
b5ab00002c7fede604a02d48b2c2f43134f4529f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12742/b5ab00002c7fede604a02d48b2c2f43134f4529f/logger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 950, 5566, 12, 2890, 4672, 501, 273, 306, 308, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 950, 5566, 12, 2890, 4672, 501, 273, 306, 308, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
try: hash(C1()) except TypeError: pass else: raise TestFailed, "hash(C1()) should raise an exception"
check_exc("hash(C1())", TypeError)
def __cmp__(self, other): return 0
3a313e36555a3416799f3c049b8ebb41e9edeb8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/3a313e36555a3416799f3c049b8ebb41e9edeb8a/test_class.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 374, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 9625, 972, 12, 2890, 16, 1308, 4672, 327, 374, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.logger.verbose( '_query:', res )
self.logger.debug( '_query:', res )
def _query( self, cmd, conn = False ): """ execute MySQL query command return S_OK structure with fetchall result as tuple it returns an empty tuple if no matching rows are found return S_ERROR upon error """ self.logger.verbose( '_query:', cmd)
dbbfc2e9691b79636765e7ead3e5df27861504bc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/dbbfc2e9691b79636765e7ead3e5df27861504bc/MySQL.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2271, 12, 365, 16, 1797, 16, 1487, 273, 1083, 262, 30, 3536, 1836, 13485, 843, 1296, 327, 348, 67, 3141, 3695, 598, 24780, 563, 487, 3193, 518, 1135, 392, 1008, 3193, 309, 1158, 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, 389, 2271, 12, 365, 16, 1797, 16, 1487, 273, 1083, 262, 30, 3536, 1836, 13485, 843, 1296, 327, 348, 67, 3141, 3695, 598, 24780, 563, 487, 3193, 518, 1135, 392, 1008, 3193, 309, 1158, 3...
(typ, mpkt.l3_src, mpkt.l4_src, mpkt.l3_dst, mpkt.l4_dst,
(typ, src[0], src[1], dst[0], dst[1],
def report(self, mpkt, typ, username, password): self.manager.user_msg( 'HTTP %s : %s:%d <-> %s:%d USERNAME: %s PASSWORD: %s' % \ (typ, mpkt.l3_src, mpkt.l4_src, mpkt.l3_dst, mpkt.l4_dst, username, password), 6, HTTP_NAME)
3fb255ed48360292f1710d2071fd434368a54a24 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11468/3fb255ed48360292f1710d2071fd434368a54a24/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 16, 312, 5465, 88, 16, 3815, 16, 2718, 16, 2201, 4672, 365, 18, 4181, 18, 1355, 67, 3576, 12, 296, 3693, 738, 87, 294, 738, 87, 5319, 72, 411, 2122, 738, 87, 5319, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 12, 2890, 16, 312, 5465, 88, 16, 3815, 16, 2718, 16, 2201, 4672, 365, 18, 4181, 18, 1355, 67, 3576, 12, 296, 3693, 738, 87, 294, 738, 87, 5319, 72, 411, 2122, 738, 87, 5319, ...
self.connect(self.shownAttribsLB, SIGNAL('doubleClicked(QListBoxItem *)'), self.flipAttribute)
self.connect(self.shownAttribsLB, SIGNAL('itemDoubleClicked(QListWidgetItem*)'), self.flipAttribute)
def __init__(self,parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, "Parallel Coordinates", TRUE)
1d7ff7c42353f97cd7b538cda9a8cb045bc947f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/1d7ff7c42353f97cd7b538cda9a8cb045bc947f0/OWParallelCoordinates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 315, 13056, 10320, 4174, 3113, 5383, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2938, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 315, 13056, 10320, 4174, 3113, 5383, ...
if href.startswith('http://') or href.startswith('https://'):
if urlparse.urlparse(href)[0] in supported_schemes:
def visitNode_a_href(self, node): self.visitNodeDefault(node) href = node.getAttribute('href') if href.startswith('http://') or href.startswith('https://'): if node.childNodes[0].data != href: self.writer('\\footnote{%s}' % latexEscape(href)) elif href.startswith('mailto:'): pass else: if href.startswith('#'): href = self.filename + href ref = href.replace('#', 'HASH') self.writer(' (page \\pageref{%s})' % ref)
73f607dfc2f93f840940f2fe486de7d15ab94b17 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/73f607dfc2f93f840940f2fe486de7d15ab94b17/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 907, 67, 69, 67, 7547, 12, 2890, 16, 756, 4672, 365, 18, 11658, 907, 1868, 12, 2159, 13, 3897, 273, 756, 18, 588, 1499, 2668, 7547, 6134, 309, 15185, 18, 718, 2670, 12, 7547, 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, 3757, 907, 67, 69, 67, 7547, 12, 2890, 16, 756, 4672, 365, 18, 11658, 907, 1868, 12, 2159, 13, 3897, 273, 756, 18, 588, 1499, 2668, 7547, 6134, 309, 15185, 18, 718, 2670, 12, 7547, 2...
"""This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
"""This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed. A stale response is sent iff "stale" is present in the request path. """
def AuthDigestHandler(self): """This handler tests 'Digest' authentication. It just sends a page with title 'user/pass' if you succeed."""
5fd949eabe62eab5418762466dd6beb6d808908e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/5fd949eabe62eab5418762466dd6beb6d808908e/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3123, 9568, 1503, 12, 2890, 4672, 3536, 2503, 1838, 7434, 296, 9568, 11, 5107, 18, 225, 2597, 2537, 9573, 279, 1363, 598, 2077, 296, 1355, 19, 5466, 11, 309, 1846, 12897, 12123, 2, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3123, 9568, 1503, 12, 2890, 4672, 3536, 2503, 1838, 7434, 296, 9568, 11, 5107, 18, 225, 2597, 2537, 9573, 279, 1363, 598, 2077, 296, 1355, 19, 5466, 11, 309, 1846, 12897, 12123, 2, -100,...
return U, A
return U, calc_area(pointlist)
def get_poly_UA(pointlist, points_as_Vec2d=True): """Calculates the circumference and area of a given polygon Use calc_area() to get the area instead of this method :deprecated: Scheduled for deletion in pymunk 0.8.5+ :return: U, A """ p1 = p2 = None U = 0 A = 0 for p in pointlist: if p1 == None: p1 = p else: p2 = p # Extract x and y if points_as_Vec2d: x1, y1 = p1[X], p1[Y] x2, y2 = p2[X], p2[Y] else: x1, y1 = p1 x2, y2 = p2 # Get distance between the two Points dx = fabs(x2 - x1) dy = fabs(y2 - y1) # U += c = sqrt(a^2+b^2) | A += (a*b)/2 U += sqrt((dx*dx) + (dy*dy)) A += ((dx*dy)/2) # Current End Point becomes Next Start Point p1 = p2 return U, A
5be592bbdb45ec9159f0909799a355674e7a5cdd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8535/5be592bbdb45ec9159f0909799a355674e7a5cdd/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 16353, 67, 28203, 12, 1153, 1098, 16, 3143, 67, 345, 67, 12991, 22, 72, 33, 5510, 4672, 3536, 10587, 326, 29951, 1134, 471, 5091, 434, 279, 864, 7154, 225, 2672, 7029, 67, 503...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16353, 67, 28203, 12, 1153, 1098, 16, 3143, 67, 345, 67, 12991, 22, 72, 33, 5510, 4672, 3536, 10587, 326, 29951, 1134, 471, 5091, 434, 279, 864, 7154, 225, 2672, 7029, 67, 503...
gc.collect() [0]*10000 traceback.format_exception(*e)
self.assertEquals(e, (None, None, None))
def __del__(self): nonlocal e e = sys.exc_info()
36389cade76841adddaa947e5fe463f835dfaed0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/36389cade76841adddaa947e5fe463f835dfaed0/test_exceptions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 1661, 3729, 425, 425, 273, 2589, 18, 10075, 67, 1376, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 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, 1001, 3771, 972, 12, 2890, 4672, 1661, 3729, 425, 425, 273, 2589, 18, 10075, 67, 1376, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print str(_sock.getsockid())
def get_connection(self,dev_mac): # fire up a connection # don't forget to set up your phone not to ask for a connection # (at least for this computer) #args = ["rfcomm", "connect" ,"1", dev_mac, str(self.config['device_channel']), ">/dev/null"] #cmd = "/usr/bin/rfcomm" #self.procid = os.spawnv(os.P_NOWAIT, cmd, args) try: self.procid = 1 _sock = bluez.btsocket() self.sock = bluetooth.BluetoothSocket( bluetooth.RFCOMM , _sock ) self.sock.connect((dev_mac, self.config['device_channel'])) print str(_sock.getsockid()) except: self.procid = 0 pass
292ea9a752d1ca23cb7824ce8772c523e1e39454 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/61/292ea9a752d1ca23cb7824ce8772c523e1e39454/proximity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 4071, 12, 2890, 16, 5206, 67, 5821, 4672, 468, 4452, 731, 279, 1459, 468, 2727, 1404, 13776, 358, 444, 731, 3433, 7353, 486, 358, 6827, 364, 279, 1459, 468, 261, 270, 4520, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4071, 12, 2890, 16, 5206, 67, 5821, 4672, 468, 4452, 731, 279, 1459, 468, 2727, 1404, 13776, 358, 444, 731, 3433, 7353, 486, 358, 6827, 364, 279, 1459, 468, 261, 270, 4520, 36...
str = []
s = []
def set_str(self, s): assert len(s) == 0 or s[-1] == '\n' if isinstance(s, str): # The parse functions have no idea what to do with Unicode, so # replace all Unicode characters with "x". This is "safe" # so long as the only characters germane to parsing the structure # of Python are 7-bit ASCII. It's *necessary* because Unicode # strings don't have a .translate() method that supports # deletechars. uniphooey = s str = [] push = s.append for raw in map(ord, uniphooey): push(raw < 127 and chr(raw) or "x") s = "".join(s) self.str = s self.study_level = 0
e4e539960df65768e68c711ae80b2e7bf77a9855 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/e4e539960df65768e68c711ae80b2e7bf77a9855/PyParse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 701, 12, 2890, 16, 272, 4672, 1815, 562, 12, 87, 13, 422, 374, 578, 272, 18919, 21, 65, 422, 2337, 82, 11, 309, 1549, 12, 87, 16, 609, 4672, 468, 1021, 1109, 4186, 1240, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 701, 12, 2890, 16, 272, 4672, 1815, 562, 12, 87, 13, 422, 374, 578, 272, 18919, 21, 65, 422, 2337, 82, 11, 309, 1549, 12, 87, 16, 609, 4672, 468, 1021, 1109, 4186, 1240, 1...
if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'):
if fn.rfind('.c') != -1 or fn.rfind('.C') != -1 or fn.rfind('.cpp') != -1:
def _get_filetype(fn): if fn.rfind('.c') or fn.rfind('.C') or fn.rfind('.cpp'): return 1 # assimble file type if fn.rfind('.s') or fn.rfind('.S'): return 2 # header type if fn.rfind('.h'): return 5 # other filetype return 5
e5bc98306b904544bb2f1c1fa8bc8b6cd4b71fc3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1834/e5bc98306b904544bb2f1c1fa8bc8b6cd4b71fc3/project.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7540, 5872, 12, 4293, 4672, 309, 2295, 18, 86, 4720, 2668, 18, 71, 6134, 480, 300, 21, 578, 2295, 18, 86, 4720, 2668, 18, 39, 6134, 480, 300, 21, 578, 2295, 18, 86, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 7540, 5872, 12, 4293, 4672, 309, 2295, 18, 86, 4720, 2668, 18, 71, 6134, 480, 300, 21, 578, 2295, 18, 86, 4720, 2668, 18, 39, 6134, 480, 300, 21, 578, 2295, 18, 86, 4...
- This function is based on Cliquer, [1].
This function is based on Cliquer [NisOst2003]_.
def clique_maximum(self): """ Returns the vertex set of a maximal order complete subgraph. NOTE: - Currently only implemented for undirected graphs. Use to_undirected to convert a digraph to an undirected graph. ALGORITHM: - This function is based on Cliquer, [1]. REFERENCE:
9e5b138b9189031c2c258c6596d3a3b7fdafb7d0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/9e5b138b9189031c2c258c6596d3a3b7fdafb7d0/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31380, 67, 15724, 12, 2890, 4672, 3536, 2860, 326, 5253, 444, 434, 279, 943, 2840, 1353, 3912, 21469, 18, 225, 5219, 30, 225, 300, 15212, 1338, 8249, 364, 640, 26830, 19422, 18, 2672, 35...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31380, 67, 15724, 12, 2890, 4672, 3536, 2860, 326, 5253, 444, 434, 279, 943, 2840, 1353, 3912, 21469, 18, 225, 5219, 30, 225, 300, 15212, 1338, 8249, 364, 640, 26830, 19422, 18, 2672, 35...
sage: n = 100000000 + randint(0,100000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
sage: n = 1000000000 + randint(0,1000000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0
def number_of_partitions(n,k=None, algorithm='default'): r""" Returns the size of partitions_list(n,k). INPUT: n -- an integer k -- (default: None); if specified, instead returns the cardinality of the set of all (unordered) partitions of the positive integer n into sums with k summands. algorithm -- (default: 'default') 'default' -- if k is given use Gap. Otherwise, on x86 when n > 3000, use 'bober' On non x86 use 'pari'. 'bober' -- use Jonathon Bober's implementation 'gap' -- use GAP (VERY *slow*) 'pari' -- use PARI. Speed seems the same as GAP until $n$ is in the thousands, in which case PARI is faster. *But* PARI has a bug, e.g., on 64-bit Linux PARI-2.3.2 outputs numbpart(147007)%1000 as 536, but it should be 533!. So do not use this option. IMPLEMENTATION: Wraps GAP's NrPartitions or PARI's numbpart function. Use the function \code{partitions(n)} to return a generator over all partitions of $n$. It is possible to associate with every partition of the integer n a conjugacy class of permutations in the symmetric group on n points and vice versa. Therefore p(n) = NrPartitions(n) is the number of conjugacy classes of the symmetric group on n points. EXAMPLES: sage: v = list(partitions(5)); v [(1, 1, 1, 1, 1), (1, 1, 1, 2), (1, 2, 2), (1, 1, 3), (2, 3), (1, 4), (5,)] sage: len(v) 7 sage: number_of_partitions(5, algorithm='gap') 7 sage: number_of_partitions(5, algorithm='pari') 7 sage: number_of_partitions(5, algorithm='bober') 7 The input must be a nonnegative integer or a ValueError is raised. sage: number_of_partitions(-5) Traceback (most recent call last): ... ValueError: n (=-5) must be a nonnegative integer sage: number_of_partitions(10,2) 5 sage: number_of_partitions(10) 42 sage: number_of_partitions(3) 3 sage: number_of_partitions(10) 42 sage: number_of_partitions(3, algorithm='pari') 3 sage: number_of_partitions(10, algorithm='pari') 42 sage: number_of_partitions(40) 37338 sage: number_of_partitions(100) 190569292 sage: number_of_partitions(100000) 27493510569775696512677516320986352688173429315980054758203125984302147328114964173055050741660736621590157844774296248940493063070200461792764493033510116079342457190155718943509725312466108452006369558934464248716828789832182345009262853831404597021307130674510624419227311238999702284408609370935531629697851569569892196108480158600569421098519 A generating function for p(n) is given by the reciprocal of Euler's function: \[ \sum_{n=0}^\infty p(n)x^n = \prod_{k=1}^\infty \left(\frac {1}{1-x^k} \right). \] We use SAGE to verify that the first several coefficients do instead agree: sage: q = PowerSeriesRing(QQ, 'q', default_prec=9).gen() sage: prod([(1-q^k)^(-1) for k in range(1,9)]) ## partial product of 1 + q + 2*q^2 + 3*q^3 + 5*q^4 + 7*q^5 + 11*q^6 + 15*q^7 + 22*q^8 + O(q^9) sage: [number_of_partitions(k) for k in range(2,10)] [2, 3, 5, 7, 11, 15, 22, 30] REFERENCES: http://en.wikipedia.org/wiki/Partition_%28number_theory%29 TESTS: sage: n = 500 + randint(0,500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1500 + randint(0,1500) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 1000000 + randint(0,1000000) sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True sage: n = 100000000 + randint(0,100000000) # takes a long time sage: number_of_partitions( n - (n % 385) + 369) % 385 == 0 True Another consistency test for n up to 500: sage: len([n for n in [1..500] if number_of_partitions(n) != number_of_partitions(n,algorithm='pari')]) 0 """ n = ZZ(n) if n < 0: raise ValueError, "n (=%s) must be a nonnegative integer"%n elif n == 0: return ZZ(1) global first_warning PROCESSOR = os.uname()[-1] bober_is_good = 'x86' in PROCESSOR if k is not None: algorithm = 'gap' elif algorithm == 'default': if bober_is_good: algorithm = 'bober' elif PROCESSOR in ['x86', 'Power Macintosh']: algorithm = 'pari' else: algorithm = 'gap' if algorithm == 'gap': if k is None: ans=gap.eval("NrPartitions(%s)"%(ZZ(n))) else: ans=gap.eval("NrPartitions(%s,%s)"%(ZZ(n),ZZ(k))) return ZZ(ans) if k is not None: raise ValueError, "only the GAP algorithm works if k is specified." if algorithm == 'bober': if not bober_is_good: if first_warning: print "*WARNING*: bober's implementation is broken on this platform or this size of n." first_warning=False return partitions_ext.number_of_partitions(n) elif algorithm == 'pari': if n > 3000 and 'x86_64' in PROCESSOR: if first_warning: print "*WARNING*: Pari's numbpart is very buggy on x86_64 (fixed in svn, so don't report to pari-dev)" first_warning = False return ZZ(pari(ZZ(n)).numbpart()) raise ValueError, "unknown algorithm '%s'"%algorithm
f0f9a1fa3f7057ce6c279f53361876ef7f50795f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/f0f9a1fa3f7057ce6c279f53361876ef7f50795f/combinat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 792, 67, 21275, 12, 82, 16, 79, 33, 7036, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2860, 326, 963, 434, 10060, 67, 1098, 12, 82, 16, 79, 2934, 225, 12943, 30, 290, 1493, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1300, 67, 792, 67, 21275, 12, 82, 16, 79, 33, 7036, 16, 4886, 2218, 1886, 11, 4672, 436, 8395, 2860, 326, 963, 434, 10060, 67, 1098, 12, 82, 16, 79, 2934, 225, 12943, 30, 290, 1493, ...
instruments = [] for c in self.cache: if c.observatory != None: instruments.extend([ins for ins in c.observatory.split(",") if ins not in instruments]) instruments.sort() return [CacheEntry(",".join(instruments), None, segments.segmentlist([c.segment for c in self.cache if c.segment != None]).extent(), "file://localhost" + os.path.abspath(self._AnalysisNode__output))]
if not self.output_cache: instruments = set() for c in self.input_cache: if c.observatory is not None: instruments |= set([ins for ins in c.observatory.split(",")]) instruments = list(instruments) instruments.sort() self.output_cache = [CacheEntry(",".join(instruments), None, segments.segmentlist([c.segment for c in self.input_cache if c.segment is not None]).extent(), "file://localhost" + os.path.abspath(self._AnalysisNode__output))] return self.output_cache
def get_output_cache(self): instruments = [] for c in self.cache: if c.observatory != None: instruments.extend([ins for ins in c.observatory.split(",") if ins not in instruments]) instruments.sort() return [CacheEntry(",".join(instruments), None, segments.segmentlist([c.segment for c in self.cache if c.segment != None]).extent(), "file://localhost" + os.path.abspath(self._AnalysisNode__output))]
a6f51cd0e257501ea4f0864483cd73ad05576b37 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5758/a6f51cd0e257501ea4f0864483cd73ad05576b37/power.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2844, 67, 2493, 12, 2890, 4672, 29555, 273, 5378, 364, 276, 316, 365, 18, 2493, 30, 309, 276, 18, 12199, 90, 8452, 480, 599, 30, 29555, 18, 14313, 3816, 2679, 364, 2763, 316, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 2844, 67, 2493, 12, 2890, 4672, 29555, 273, 5378, 364, 276, 316, 365, 18, 2493, 30, 309, 276, 18, 12199, 90, 8452, 480, 599, 30, 29555, 18, 14313, 3816, 2679, 364, 2763, 316, ...
def urlparse(url, scheme = '', allow_fragments = 1):
def urlparse(url, scheme='', allow_fragments=1):
def urlparse(url, scheme = '', allow_fragments = 1): """Parse a URL into 6 components: <scheme>://<netloc>/<path>;<params>?<query>#<fragment> Return a 6-tuple: (scheme, netloc, path, params, query, fragment). Note that we don't break the components up in smaller bits (e.g. netloc is a single string) and we don't expand % escapes.""" key = url, scheme, allow_fragments cached = _parse_cache.get(key, None) if cached: return cached if len(_parse_cache) >= MAX_CACHE_SIZE: # avoid runaway growth clear_cache() netloc = params = query = fragment = '' i = url.find(':') if i > 0: if url[:i] == 'http': # optimize the common case scheme = url[:i].lower() url = url[i+1:] if url[:2] == '//': i = url.find('/', 2) if i < 0: i = len(url) netloc = url[2:i] url = url[i:] if allow_fragments: i = url.rfind('#') if i >= 0: fragment = url[i+1:] url = url[:i] i = url.find('?') if i >= 0: query = url[i+1:] url = url[:i] i = url.find(';') if i >= 0: params = url[i+1:] url = url[:i] tuple = scheme, netloc, url, params, query, fragment _parse_cache[key] = tuple return tuple for c in url[:i]: if c not in scheme_chars: break else: scheme, url = url[:i].lower(), url[i+1:] if scheme in uses_netloc: if url[:2] == '//': i = url.find('/', 2) if i < 0: i = len(url) netloc, url = url[2:i], url[i:] if allow_fragments and scheme in uses_fragment: i = url.rfind('#') if i >= 0: url, fragment = url[:i], url[i+1:] if scheme in uses_query: i = url.find('?') if i >= 0: url, query = url[:i], url[i+1:] if scheme in uses_params: i = url.find(';') if i >= 0: url, params = url[:i], url[i+1:] tuple = scheme, netloc, url, params, query, fragment _parse_cache[key] = tuple return tuple
25350d7d3dc12d7365aaee887c8eb007dd4b7826 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/25350d7d3dc12d7365aaee887c8eb007dd4b7826/urlparse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15185, 12, 718, 16, 4355, 2218, 2187, 1699, 67, 29528, 33, 21, 4672, 3536, 3201, 279, 1976, 1368, 1666, 4085, 30, 411, 9068, 34, 2207, 32, 2758, 1829, 16893, 32, 803, 34, 31, 32, 2010,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15185, 12, 718, 16, 4355, 2218, 2187, 1699, 67, 29528, 33, 21, 4672, 3536, 3201, 279, 1976, 1368, 1666, 4085, 30, 411, 9068, 34, 2207, 32, 2758, 1829, 16893, 32, 803, 34, 31, 32, 2010,...
ALLFunc(ModuleFile, PlatformFile, ewb, a, b, c)
OtherFunc(ModuleFile, PlatformFile, ewb, a, b, c, t)
def Process(ModuleFile, PlatformFile, ewb, opt, args, StartTime): t = str(' '.join(args)) GenC = 0 GenMake = 0 CleanAll = 0 for t in args: t = t.lower() if t == 'genc': GenC = 1 elif t == 'genmake': GenMake = 1 elif t == 'cleanall': CleanAll = 1
f6fa8f13c92899402ca363e2f27f994ff988148c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/f6fa8f13c92899402ca363e2f27f994ff988148c/Bld.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 2153, 16, 833, 16, 28043, 4672, 225, 268, 273, 609, 2668, 2418, 5701, 12, 1968, 3719, 10938, 39, 273, 374, 10938, 6464, 273, 374...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4389, 12, 3120, 812, 16, 11810, 812, 16, 22722, 70, 16, 2153, 16, 833, 16, 28043, 4672, 225, 268, 273, 609, 2668, 2418, 5701, 12, 1968, 3719, 10938, 39, 273, 374, 10938, 6464, 273, 374...
def name(self, new=''):
def name(self, new=None):
def name(self, new=''): """ Returns the name of the (di)graph. INPUT: new -- if not None, then this becomes the new name of the (di)graph. set_to_none -- if True, removes any name EXAMPLE: sage: d = {0: [1,4,5], 1: [2,6], 2: [3,7], 3: [4,8], 4: [9], 5: [7, 8], 6: [8,9], 7: [9]} sage: G = Graph(d); G Graph on 10 vertices sage: G.name("Petersen Graph"); G 'Petersen Graph' Petersen Graph: Graph on 10 vertices sage: G.name(""); G Graph on 10 vertices
9b368fb88ddf0fac8cebd732c548b8d8573c94ef /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/9b368fb88ddf0fac8cebd732c548b8d8573c94ef/graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 508, 12, 2890, 16, 394, 33, 7036, 4672, 3536, 2860, 326, 508, 434, 326, 261, 3211, 13, 4660, 18, 225, 12943, 30, 394, 1493, 309, 486, 599, 16, 1508, 333, 12724, 326, 394, 508, 434, 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, 508, 12, 2890, 16, 394, 33, 7036, 4672, 3536, 2860, 326, 508, 434, 326, 261, 3211, 13, 4660, 18, 225, 12943, 30, 394, 1493, 309, 486, 599, 16, 1508, 333, 12724, 326, 394, 508, 434, 3...
s = re.sub (r'http://video.google.com/videoplay\?docid=(\d+)(\S*)',
s = re.sub (r'http://video\.google\.com/videoplay\?docid=(\d+)(\S*)',
def videolinks (s): """Expand video links.""" if 'youtube.com/' in s: s = re.sub (r'http://(www\.)?youtube.com/watch\?v=([\-\w]+)(\S*)', __sv_youtube, s) if 'vimeo.com/' in s: s = re.sub (r'http://(www\.)?vimeo.com/(\d+)', __sv_vimeo, s) if 'http://www.ustream.tv/recorded/' in s: s = re.sub (r'http://www.ustream.tv/recorded/(\d+)', __sv_ustream, s) if 'http://www.dailymotion.' in s: s = re.sub (r'http://www.dailymotion.[a-z]{2,3}/video/([\-\w]+)_(\S*)', __sv_dailymotion, s) if 'http://www.metacafe.com/' in s: s = re.sub (r'http://www.metacafe.com/(w|watch)/(\d+)/(\S*)', __sv_metacafe, s) if 'twitvid.com/' in s: s = re.sub (r'http://(www\.)?twitvid.com/(\w+)', __sv_twitvid, s) if 'collegehumor.com/video:' in s: s = re.sub (r'http://www.collegehumor.com/video:(\d+)', __sv_chtv, s) if 'http://video.google.com/videoplay?docid=' in s: s = re.sub (r'http://video.google.com/videoplay\?docid=(\d+)(\S*)', __sv_googlevideo, s) return s
69a5c88b012b01393ce0f08a65627f7c030d4417 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12402/69a5c88b012b01393ce0f08a65627f7c030d4417/expand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 831, 355, 754, 87, 261, 87, 4672, 3536, 12271, 6191, 4716, 12123, 309, 296, 31749, 18, 832, 2473, 316, 272, 30, 272, 273, 283, 18, 1717, 261, 86, 11, 2505, 2207, 12, 5591, 5834, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 331, 831, 355, 754, 87, 261, 87, 4672, 3536, 12271, 6191, 4716, 12123, 309, 296, 31749, 18, 832, 2473, 316, 272, 30, 272, 273, 283, 18, 1717, 261, 86, 11, 2505, 2207, 12, 5591, 5834, ...
self.close_request(request)
self.shutdown_request(request)
def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread.
84b8a05ca671f2c19025918b3f3d678ae285a707 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3187/84b8a05ca671f2c19025918b3f3d678ae285a707/SocketServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 18, 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, 1207, 67, 2293, 67, 5930, 12, 2890, 16, 590, 16, 1004, 67, 2867, 4672, 3536, 8650, 487, 316, 3360, 2081, 1496, 487, 279, 2650, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
table_args + [str(x) for x in sub_ids2])
table_args + sub_ids2)
def __where_calc(self, cursor, user, args, tables, tables_args, context=None): if context is None: context = {} i = 0 joins = [] while i < len(args): if args[i][1] not in ( 'child_of', '=', 'like', 'ilike', '', '!=', 'in', '<=', '>=', '<', '>'): raise Exception('ValidateError', 'Argument "%s" not supported' \ % args[i][1])
847ad56dcb0d96db1f940870b7342bd487a2a34c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/847ad56dcb0d96db1f940870b7342bd487a2a34c/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6051, 67, 12448, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 4606, 16, 4606, 67, 1968, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 277, 273, 374, 13471, 273,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 6051, 67, 12448, 12, 2890, 16, 3347, 16, 729, 16, 833, 16, 4606, 16, 4606, 67, 1968, 16, 819, 33, 7036, 4672, 309, 819, 353, 599, 30, 819, 273, 2618, 277, 273, 374, 13471, 273,...
safile = os.path.join(dir, fil + ext)
safile = os.path.normpath(dir+"/"+fil+ext)
def fileSaveMovie(self): """Save a copy of the current movie file loaded in the Movie Player. """ # Make sure there is a moviefile to save. if not self.assy.current_movie or not self.assy.current_movie.filename \ or not os.path.exists(self.assy.current_movie.filename): msg = redmsg("Save Movie File: No movie file to save.") self.history.message(msg) msg = "To create a movie, click on the <b>Simulator</b> <img source=\"simicon\"> icon." QMimeSourceFactory.defaultFactory().setPixmap( "simicon", self.simSetupAction.iconSet().pixmap() ) self.history.message(msg) return self.history.message(greenmsg("Save Movie File:")) if self.assy.filename: sdir = self.assy.filename else: sdir = globalParms['WorkingDirectory']
8cff0b0f67da31a7e9fb48a5c40eb462afd641ff /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/8cff0b0f67da31a7e9fb48a5c40eb462afd641ff/movieMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 4755, 16727, 13120, 12, 2890, 4672, 3536, 4755, 279, 1610, 434, 326, 783, 21360, 585, 4203, 316, 326, 26963, 19185, 18, 3536, 468, 4344, 3071, 1915, 353, 279, 21360, 768, 358, 1923, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 585, 4755, 16727, 13120, 12, 2890, 4672, 3536, 4755, 279, 1610, 434, 326, 783, 21360, 585, 4203, 316, 326, 26963, 19185, 18, 3536, 468, 4344, 3071, 1915, 353, 279, 21360, 768, 358, 1923, ...
self.hline = '-' * self.hlen + '\n' self.format = '%-5d %8.1e %7.1e %5d %8.1e %8.1e %4s\n' self.format0= '%-5d %8.1e %7.1e %5s %8s %8.1e %4s\n'
self.hline = '-' * self.hlen self.format = '%-5d %8.1e %7.1e %5d %8.1e %8.1e %4s' self.format0= '%-5d %8.1e %7.1e %5s %8s %8.1e %4s'
def __init__(self, nlp, TR, TrSolver, **kwargs):
4de75bbc3302057d43a9a4c346b057a119fe89ed /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/4de75bbc3302057d43a9a4c346b057a119fe89ed/trunk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 7741, 84, 16, 4235, 16, 840, 27721, 16, 2826, 4333, 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, ...
[ 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 7741, 84, 16, 4235, 16, 840, 27721, 16, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
MelModel(), MelString('ICON','iconPath'), MelString('MICO','mico'),
MelGroup('model', MelString('MODL','modPath'), MelBase('MODT','modt_p'), MelGroups('alternateTextures', MelBase('MODS','mods_p') ), MelOptStruct('MODD','B','facegenModelFlag')), MelGroup('icon', MelString('ICON','iconPath'), MelString('MICO','mico') ),
def loadData(self,record,ins,type,size,readId): if size == 102: MelStruct.loadData(self,record,ins,type,size,readId) return elif size == 86: #--Else 86 byte record (skips dispVelocity, #-- dispFalloff, dispDampner, dispSize, and damage #-- Two junk? bytes are tacked onto the end #-- Hex editing and the CS confirms that it is NOT #-- damage, so it is probably just filler unpacked = ins.unpack('11f3Bs3Bs3BsB3s6f2s',size,readId) elif size == 62: #--Else 62 byte record (skips most everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('11f3Bs3Bs3BsB3s2s',size,readId) elif size == 42: #--Else 42 byte record (skips most everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('10f2s',size,readId) elif size == 2: #--Else 2 byte record (skips everything #-- Two junk? bytes are tacked onto the end #-- No testing done, but assumed that its the same as the #-- previous truncated record. unpacked = ins.unpack('2s',size,readId) else: raise "Unexpected size encountered for WATR subrecord: %s" % size unpacked = unpacked[:-1] unpacked += self.defaults[len(unpacked):] setter = record.__setattr__ for attr,value,action in zip(self.attrs,unpacked,self.actions): if callable(action): value = action(value) setter(attr,value) if self._debug: print unpacked
ec436cca9d8872ad29348c1e128d6ab64bbcc1c9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/ec436cca9d8872ad29348c1e128d6ab64bbcc1c9/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 21822, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29422, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, 16, 896, 548, 4672, 309, 963, 422, 21822, 30, 490, 292, 3823, 18, 945, 751, 12, 2890, 16, 3366, 16, 2679, 16, 723, 16, 1467, ...
self.gnucap_timer = gtk.timeout_add(self.gnucap_timer_interval, self.call_gnucap)
self.gnucap_timer = gobject.timeout_add(self.gnucap_timer_interval, self.call_gnucap)
def run_simulation(self): if not self.gnucap_binary: return
36ffbab600fc135abd08551835331076ae3eab04 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11306/36ffbab600fc135abd08551835331076ae3eab04/electric.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 9812, 6234, 12, 2890, 4672, 309, 486, 365, 18, 1600, 5286, 438, 67, 8578, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 9812, 6234, 12, 2890, 4672, 309, 486, 365, 18, 1600, 5286, 438, 67, 8578, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print charset
def pt_edit(self, text, content_type, keep_output_encoding=False):
a4f57c3a9dc9677420ec24e2ab70f40ecc5cc78e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/a4f57c3a9dc9677420ec24e2ab70f40ecc5cc78e/ZopePageTemplate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5818, 67, 4619, 12, 2890, 16, 977, 16, 913, 67, 723, 16, 3455, 67, 2844, 67, 5999, 33, 8381, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5818, 67, 4619, 12, 2890, 16, 977, 16, 913, 67, 723, 16, 3455, 67, 2844, 67, 5999, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
setattr_default(Repr, 'rtype_' + opname, missing_rtype_operation)
make_missing_op(Repr, opname)
def setattr_default(obj, attr, value): if not hasattr(obj, attr): setattr(obj, attr, value)
fada066eceedcd482197dcf10ac1b99cf9098c56 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/fada066eceedcd482197dcf10ac1b99cf9098c56/rmodel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9241, 67, 1886, 12, 2603, 16, 1604, 16, 460, 4672, 309, 486, 3859, 12, 2603, 16, 1604, 4672, 9241, 12, 2603, 16, 1604, 16, 460, 13, 225, 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, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9241, 67, 1886, 12, 2603, 16, 1604, 16, 460, 4672, 309, 486, 3859, 12, 2603, 16, 1604, 4672, 9241, 12, 2603, 16, 1604, 16, 460, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, ...
def __init__(self, text):
def __init__(self, text, fileclass=StringIO.StringIO):
def __init__(self, text): self.text = text
771007b8da369d1b6a5ddd26650c3d0819471178 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/771007b8da369d1b6a5ddd26650c3d0819471178/test_httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 977, 16, 585, 1106, 33, 780, 4294, 18, 780, 4294, 4672, 365, 18, 955, 273, 977, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1001, 2738, 972, 12, 2890, 16, 977, 16, 585, 1106, 33, 780, 4294, 18, 780, 4294, 4672, 365, 18, 955, 273, 977, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
end_time = datetime.now()
end_time = datetime.utcnow()
def ago(start_time): """ Return time since starting time as a rounded, human readable string. E.g., "3 hours ago" """ granularities = ['century', 'decade', 'year', 'month', 'day', 'hour', 'minute'] end_time = datetime.now() while True: granularity = granularities.pop() ago = date.distance_of_time_in_words( start_time, end_time, granularity, round=True) rounded_to_one_granularity = 'and' not in ago if rounded_to_one_granularity: break return ago + ' ago'
d549fe9ac7e839cdd55784b9c27cf557c762845e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1036/d549fe9ac7e839cdd55784b9c27cf557c762845e/helpers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20325, 12, 1937, 67, 957, 4672, 3536, 2000, 813, 3241, 5023, 813, 487, 279, 16729, 16, 8672, 7471, 533, 18, 512, 18, 75, 12990, 315, 23, 7507, 20325, 6, 3536, 225, 15889, 2490, 1961, 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, 20325, 12, 1937, 67, 957, 4672, 3536, 2000, 813, 3241, 5023, 813, 487, 279, 16729, 16, 8672, 7471, 533, 18, 512, 18, 75, 12990, 315, 23, 7507, 20325, 6, 3536, 225, 15889, 2490, 1961, 2...
or publicId in ("+//silmaril//dtd html pro v0r11 19970101//en", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//en", "-//as//dtd html 3.0 aswedit + extensions//en", "-//ietf//dtd html 2.0 level 1//en", "-//ietf//dtd html 2.0 level 2//en", "-//ietf//dtd html 2.0 strict level 1//en", "-//ietf//dtd html 2.0 strict level 2//en", "-//ietf//dtd html 2.0 strict//en", "-//ietf//dtd html 2.0//en", "-//ietf//dtd html 2.1e//en", "-//ietf//dtd html 3.0//en", "-//ietf//dtd html 3.0//en//", "-//ietf//dtd html 3.2 final//en", "-//ietf//dtd html 3.2//en", "-//ietf//dtd html 3//en", "-//ietf//dtd html level 0//en", "-//ietf//dtd html level 0//en//2.0", "-//ietf//dtd html level 1//en", "-//ietf//dtd html level 1//en//2.0", "-//ietf//dtd html level 2//en", "-//ietf//dtd html level 2//en//2.0", "-//ietf//dtd html level 3//en", "-//ietf//dtd html level 3//en//3.0", "-//ietf//dtd html strict level 0//en", "-//ietf//dtd html strict level 0//en//2.0", "-//ietf//dtd html strict level 1//en", "-//ietf//dtd html strict level 1//en//2.0", "-//ietf//dtd html strict level 2//en", "-//ietf//dtd html strict level 2//en//2.0", "-//ietf//dtd html strict level 3//en", "-//ietf//dtd html strict level 3//en//3.0", "-//ietf//dtd html strict//en", "-//ietf//dtd html strict//en//2.0", "-//ietf//dtd html strict//en//3.0", "-//ietf//dtd html//en", "-//ietf//dtd html//en//2.0", "-//ietf//dtd html//en//3.0", "-//metrius//dtd metrius presentational//en", "-//microsoft//dtd internet explorer 2.0 html strict//en", "-//microsoft//dtd internet explorer 2.0 html//en", "-//microsoft//dtd internet explorer 2.0 tables//en", "-//microsoft//dtd internet explorer 3.0 html strict//en", "-//microsoft//dtd internet explorer 3.0 html//en", "-//microsoft//dtd internet explorer 3.0 tables//en", "-//netscape comm. corp.//dtd html//en", "-//netscape comm. corp.//dtd strict html//en", "-//o'reilly and associates//dtd html 2.0//en", "-//o'reilly and associates//dtd html extended 1.0//en", "-//o'reilly and associates//dtd html extended relaxed 1.0//en", "-//spyglass//dtd html 2.0 extended//en", "-//sq//dtd html 2.0 hotmetal + extensions//en", "-//sun microsystems corp.//dtd hotjava html//en", "-//sun microsystems corp.//dtd hotjava strict html//en", "-//w3c//dtd html 3 1995-03-24//en", "-//w3c//dtd html 3.2 draft//en", "-//w3c//dtd html 3.2 final//en", "-//w3c//dtd html 3.2//en", "-//w3c//dtd html 3.2s draft//en", "-//w3c//dtd html 4.0 frameset//en", "-//w3c//dtd html 4.0 transitional//en", "-//w3c//dtd html experimental 19960712//en", "-//w3c//dtd html experimental 970421//en", "-//w3c//dtd w3 html//en", "-//w3o//dtd w3 html 3.0//en", "-//w3o//dtd w3 html 3.0//en//", "-//w3o//dtd w3 html strict 3.0//en//", "-//webtechs//dtd mozilla html 2.0//en", "-//webtechs//dtd mozilla html//en", "-/w3c/dtd html 4.0 transitional/en", "html") or (publicId in ("-//w3c//dtd html 4.01 frameset//EN", "-//w3c//dtd html 4.01 transitional//EN") and systemId == None) or (systemId != None and systemId == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd")):
or publicId.startswith( ("+//silmaril//dtd html pro v0r11 19970101//", "-//advasoft ltd//dtd html 3.0 aswedit + extensions//", "-//as//dtd html 3.0 aswedit + extensions//", "-//ietf//dtd html 2.0 level 1//", "-//ietf//dtd html 2.0 level 2//", "-//ietf//dtd html 2.0 strict level 1//", "-//ietf//dtd html 2.0 strict level 2//", "-//ietf//dtd html 2.0 strict//", "-//ietf//dtd html 2.0//", "-//ietf//dtd html 2.1e//", "-//ietf//dtd html 3.0//", "-//ietf//dtd html 3.2 final//", "-//ietf//dtd html 3.2//", "-//ietf//dtd html 3//", "-//ietf//dtd html level 0//", "-//ietf//dtd html level 1//", "-//ietf//dtd html level 2//", "-//ietf//dtd html level 3//", "-//ietf//dtd html strict level 0//", "-//ietf//dtd html strict level 1//", "-//ietf//dtd html strict level 2//", "-//ietf//dtd html strict level 3//", "-//ietf//dtd html strict//", "-//ietf//dtd html//", "-//metrius//dtd metrius presentational//", "-//microsoft//dtd internet explorer 2.0 html strict//", "-//microsoft//dtd internet explorer 2.0 html//", "-//microsoft//dtd internet explorer 2.0 tables//", "-//microsoft//dtd internet explorer 3.0 html strict//", "-//microsoft//dtd internet explorer 3.0 html//", "-//microsoft//dtd internet explorer 3.0 tables//", "-//netscape comm. corp.//dtd html//", "-//netscape comm. corp.//dtd strict html//", "-//o'reilly and associates//dtd html 2.0//", "-//o'reilly and associates//dtd html extended 1.0//", "-//o'reilly and associates//dtd html extended relaxed 1.0//", "-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//", "-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//", "-//spyglass//dtd html 2.0 extended//", "-//sq//dtd html 2.0 hotmetal + extensions//", "-//sun microsystems corp.//dtd hotjava html//", "-//sun microsystems corp.//dtd hotjava strict html//", "-//w3c//dtd html 3 1995-03-24//", "-//w3c//dtd html 3.2 draft//", "-//w3c//dtd html 3.2 final//", "-//w3c//dtd html 3.2//", "-//w3c//dtd html 3.2s draft//", "-//w3c//dtd html 4.0 frameset//", "-//w3c//dtd html 4.0 transitional//", "-//w3c//dtd html experimental 19960712//", "-//w3c//dtd html experimental 970421//", "-//w3c//dtd w3 html//", "-//w3o//dtd w3 html 3.0//", "-//webtechs//dtd mozilla html 2.0//", "-//webtechs//dtd mozilla html//")) or publicId in ("-//w3o//dtd w3 html strict 3.0//en//", "-/w3c/dtd html 4.0 transitional/en", "html") or publicId.startswith( ("-//w3c//dtd html 4.01 frameset//", "-//w3c//dtd html 4.01 transitional//")) and systemId == None or systemId and systemId.lower() == "http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"):
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...
mypref_stats = self.mypref_db.getMyPrefStats(torrent_id) if mypref_stats is not None and torrent_id in mypref_stats: print >> sys.stderr, " torrent['myDownloadHistory'] = True data = mypref_stats[torrent_id] torrent['download_started'] = data[0] torrent['progress'] = data[1] torrent['destdir'] = data[2] torrent['channel_permid'] = "" torrent['channel_name'] = ""
def searchNames(self,kws,local=True): t1 = time() value_name = ['torrent_id', 'infohash', 'name', 'torrent_file_name', 'length', 'creation_date', 'num_files', 'thumbnail', 'insert_time', 'secret', 'relevance', 'source_id', 'category_id', 'status_id', 'num_seeders', 'num_leechers', 'comment'] #import re #kws = kws.lower() #words = re.split(r'\s+', kws) sql = "" count = 0 for word in kws: word = word.lower() count += 1 sql += " select torrent_id from InvertedIndex where word='" + word + "' " if count < len(kws): sql += " intersect " torrent_list = [] mainsql = "select * from Torrent where torrent_id in (" + sql + ") order by num_seeders desc" if not local: mainsql += " limit 20" results = self._db.fetchall(mainsql) # print >> sys.stderr, "mainsql results:", len(results) t2 = time() sql = "select mod_id, sum(vote), count(*) from VoteCast group by mod_id order by 2 desc" votecast_records = self._db.fetchall(sql) votes = {} for vote in votecast_records: votes[vote[0]] = (vote[1], vote[2]) t3 = time() for result in results: a = time() torrent = dict(zip(value_name,result)) try: torrent['source'] = self.id2src[torrent['source_id']] except: print_exc() # Arno: RSS subscription and id2src issue torrent['source'] = 'http://some/RSS/feed' torrent['category'] = [self.id2category[torrent['category_id']]] torrent['status'] = self.id2status[torrent['status_id']] torrent['simRank'] = ranksfind(None,torrent['infohash']) torrent['infohash'] = str2bin(torrent['infohash']) #torrent['num_swarm'] = torrent['num_seeders'] + torrent['num_leechers'] torrent['last_check_time'] = 0 #torrent['last_check'] #del torrent['last_check'] del torrent['source_id'] del torrent['category_id'] del torrent['status_id'] torrent_id = torrent['torrent_id'] mypref_stats = self.mypref_db.getMyPrefStats(torrent_id) #print >> sys.stderr, "my_pref:", repr(mypref_stats) #print >> sys.stderr, "torrent_id:", torrent_id #print >> sys.stderr, "status:", torrent['status'] if mypref_stats is not None and torrent_id in mypref_stats: # add extra info for torrent in mypref print >> sys.stderr, "# add extra info for torrent in mypref" torrent['myDownloadHistory'] = True data = mypref_stats[torrent_id] #(create_time,progress,destdir) torrent['download_started'] = data[0] torrent['progress'] = data[1] torrent['destdir'] = data[2] # now, add the details of channel to which the torrent belongs, if any torrent['channel_permid'] = "" torrent['channel_name'] = "" torrent['neg_votes']=0 torrent['subscriptions']=0 sql = "select publisher_id, publisher_name from ChannelCast where infohash='" + bin2str(torrent['infohash']) + "'" #note that.. above, its in bin format records = self._db.fetchall(sql) if records is not None and len(records)>0: if len(records)>1: # if more than 1 channel has this torrent, select most popular channel. # For spam, resultant votes limit = -6 NEG = -6 # if the effective vote count is less than -5, it is considered as SPAM max_votes = NEG for record in records: if record[0] not in votes: continue sum, count = votes[record[0]] negvotes = (sum + count)/3 numsubscriptions = (2*count-sum)/3 if max_votes<numsubscriptions-negvotes: max_votes = numsubscriptions-negvotes torrent['channel_permid'] = record[0] torrent['channel_name'] = record[1] torrent['neg_votes']=negvotes torrent['subscriptions']=numsubscriptions if max_votes==NEG: # if none of the channels has more than -6 votes, continue elif records[0][0] in votes: sum, count = votes[records[0][0]] negvotes = (sum + count)/3 numsubscriptions = (2*count-sum)/3 torrent['channel_permid'] = records[0][0] torrent['channel_name'] = records[0][1] torrent['neg_votes'] = negvotes torrent['subscriptions'] = numsubscriptions torrent_list.append(torrent) #print >> sys.stderr, "hello.. %.3f,%.3f" %((time()-a), time()) #print >> sys.stderr, "# hits:%d; search time:%.3f,%.3f,%.3f" % (len(torrent_list),t2-t1, t3-t2, time()-t3 ) return torrent_list
6493f7e81b05a2e100cd426f0d5ef7fe6d9fbd3b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9686/6493f7e81b05a2e100cd426f0d5ef7fe6d9fbd3b/SqliteCacheDBHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1623, 1557, 12, 2890, 16, 79, 4749, 16, 3729, 33, 5510, 4672, 268, 21, 273, 813, 1435, 460, 67, 529, 273, 10228, 13039, 547, 67, 350, 2187, 296, 1376, 2816, 2187, 296, 529, 2187, 296, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1557, 12, 2890, 16, 79, 4749, 16, 3729, 33, 5510, 4672, 268, 21, 273, 813, 1435, 460, 67, 529, 273, 10228, 13039, 547, 67, 350, 2187, 296, 1376, 2816, 2187, 296, 529, 2187, 296, ...
elif content.has_key(attr):
elif hasattr(content,'__iter__') and attr in content:
def get_value(self, content, column): attr = column['attr'] sort_index = column['sort_index'] transform = column['transform'] value = u'' if hasattr(content, attr): value = getattr(content, attr) elif content.has_key(attr): value = content[attr] return transform(content, value)
81be2f1477a52d095a807f27b7abbf3edd21db6f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12920/81be2f1477a52d095a807f27b7abbf3edd21db6f/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1132, 12, 2890, 16, 913, 16, 1057, 4672, 1604, 273, 1057, 3292, 1747, 3546, 1524, 67, 1615, 273, 1057, 3292, 3804, 67, 1615, 3546, 2510, 273, 1057, 3292, 6547, 3546, 225, 460, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1132, 12, 2890, 16, 913, 16, 1057, 4672, 1604, 273, 1057, 3292, 1747, 3546, 1524, 67, 1615, 273, 1057, 3292, 3804, 67, 1615, 3546, 2510, 273, 1057, 3292, 6547, 3546, 225, 460, ...