rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
body = context.root.forbidden(context)
view = context.root.forbidden body = view.GET(here, context)
def GET(self, context): request, response = context.request, context.response # This is a safe method context.commit = False # Our canonical URLs never end with an slash if context.uri.path.endswith_slash: goto = copy(context.uri) goto.path.endswith_slash = False return 302, goto # Traverse status, here, view, method = self.traverse(context) if status == 200: # Check modification time mtime = view.get_mtime(here) if mtime is not None: mtime = mtime.replace(microsecond=0) response.set_header('last-modified', mtime) if request.method == 'GET': if request.has_header('if-modified-since'): msince = request.get_header('if-modified-since') if mtime <= msince: return 304, None # Call the method try: body = method(here, context) except Forbidden: if context.user is None: status = 401 body = context.site_root.unauthorized(context) else: status = 403 body = context.root.forbidden(context)
df6345ab0cc3fbeb96abe81c3b0974ebe7344a40 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/df6345ab0cc3fbeb96abe81c3b0974ebe7344a40/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 16, 819, 4672, 590, 16, 766, 273, 819, 18, 2293, 16, 819, 18, 2740, 468, 1220, 353, 279, 4183, 707, 819, 18, 7371, 273, 1083, 468, 29613, 7378, 10414, 5903, 679, 598, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4978, 12, 2890, 16, 819, 4672, 590, 16, 766, 273, 819, 18, 2293, 16, 819, 18, 2740, 468, 1220, 353, 279, 4183, 707, 819, 18, 7371, 273, 1083, 468, 29613, 7378, 10414, 5903, 679, 598, ...
setattr(self.REFERENCE_CONTENT_INSTANCE_NAME,self.contentType(REFERENCE_CONTENT_INSTANCE_NAME)) getattr(self.REFERENCE_CONTENT_INSTANCE_NAME)._md=PersistentMapping()
setattr(self, REFERENCE_CONTENT_INSTANCE_NAME, self.contentType(REFERENCE_CONTENT_INSTANCE_NAME)) getattr(self, REFERENCE_CONTENT_INSTANCE_NAME)._md=PersistentMapping()
def addHook(self, *args, **kw): #creates the content instance if type(self.contentType) in (type(''),type(u'')): #type given as string tt=getToolByName(self,'portal_types') tt.constructContent(self.contentType,self,REFERENCE_CONTENT_INSTANCE_NAME) else: #type given as class setattr(self.REFERENCE_CONTENT_INSTANCE_NAME,self.contentType(REFERENCE_CONTENT_INSTANCE_NAME)) getattr(self.REFERENCE_CONTENT_INSTANCE_NAME)._md=PersistentMapping()
6fa00df5229755950a713cb30a2bac9402a30a9c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/6fa00df5229755950a713cb30a2bac9402a30a9c/ReferenceEngine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5394, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 468, 19787, 326, 913, 791, 309, 618, 12, 2890, 18, 22194, 13, 316, 261, 723, 2668, 19899, 723, 12, 89, 6309, 3719, 30, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 5394, 12, 2890, 16, 380, 1968, 16, 2826, 9987, 4672, 468, 19787, 326, 913, 791, 309, 618, 12, 2890, 18, 22194, 13, 316, 261, 723, 2668, 19899, 723, 12, 89, 6309, 3719, 30, 468, ...
self.AutoCompShow(string.join(list, ' '))
self.AutoCompShow(string.join(lst, ' '))
def checkCodeComp(self): pos = self.GetCurrentPos() lnNo = self.GetCurrentLine() lnStPs = self.GetLineStartPos(lnNo) line = self.GetCurrentLineText()[0] piv = pos - lnStPs start, length = idWord(line, piv, lnStPs) startLine = start-lnStPs word = line[startLine:startLine+length]
30c5b445955ab6c843b5ae49ae2fca620b4c4550 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/30c5b445955ab6c843b5ae49ae2fca620b4c4550/PySourceView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1085, 2945, 12, 2890, 4672, 949, 273, 365, 18, 967, 3935, 1616, 1435, 7211, 2279, 273, 365, 18, 967, 3935, 1670, 1435, 7211, 510, 18124, 273, 365, 18, 967, 1670, 1685, 1616, 12, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 1085, 2945, 12, 2890, 4672, 949, 273, 365, 18, 967, 3935, 1616, 1435, 7211, 2279, 273, 365, 18, 967, 3935, 1670, 1435, 7211, 510, 18124, 273, 365, 18, 967, 1670, 1685, 1616, 12, 2...
this = apply(_quickfix.new_FirmTradeID, args)
this = _quickfix.new_FirmTradeID(*args)
def __init__(self, *args): this = apply(_quickfix.new_FirmTradeID, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 42, 3985, 22583, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 42, 3985, 22583, 734, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2211, 13, 1335, ...
test, args_tuple = pending.popleft() except IndexError:
test, args_tuple = next(pending) except StopIteration:
def work(): # A worker thread. try: while True: try: test, args_tuple = pending.popleft() except IndexError: output.put((None, None, None, None)) return # -E is needed by some tests, e.g. test_import popen = Popen([sys.executable, '-E', '-m', 'test.regrtest', '--slaveargs', json.dumps(args_tuple)], stdout=PIPE, stderr=PIPE, universal_newlines=True, close_fds=True) stdout, stderr = popen.communicate() # Strip last refcount output line if it exists, since it # comes from the shutdown of the interpreter in the subcommand. stderr = debug_output_pat.sub("", stderr) stdout, _, result = stdout.strip().rpartition("\n") result = json.loads(result) if not quiet: stdout = test+'\n'+stdout output.put((test, stdout.rstrip(), stderr.rstrip(), result)) except BaseException: output.put((None, None, None, None)) raise
d8172be4a3d1ea42b76faa6f634faf7700fb632c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/d8172be4a3d1ea42b76faa6f634faf7700fb632c/regrtest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 1024, 12, 9561, 13, 1335, 16179, 30, 876, 18, 458, 12443, 7036, 16, 599, 16, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1440, 13332, 468, 432, 4322, 2650, 18, 775, 30, 1323, 1053, 30, 775, 30, 1842, 16, 833, 67, 8052, 273, 1024, 12, 9561, 13, 1335, 16179, 30, 876, 18, 458, 12443, 7036, 16, 599, 16, 59...
])
]) + ","
def forwards_code(self): "Produces the code snippet that gets put into forwards()" field_defs = ",\n ".join([ "(%r, %s)" % (name, defn) for name, defn in self.triples_to_defs(self.model_def).items() ]) return self.FORWARDS_TEMPLATE % { "model_name": self.model._meta.object_name, "table_name": self.model._meta.db_table, "app_label": self.model._meta.app_label, "field_defs": field_defs, }
a8dba0a4826ccd2db052857638c89809c5fdcfc7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13142/a8dba0a4826ccd2db052857638c89809c5fdcfc7/actions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24578, 67, 710, 12, 2890, 4672, 315, 27291, 326, 981, 13016, 716, 5571, 1378, 1368, 24578, 10031, 652, 67, 12537, 273, 31726, 82, 5411, 3552, 5701, 3816, 7751, 9, 86, 16, 738, 87, 2225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24578, 67, 710, 12, 2890, 4672, 315, 27291, 326, 981, 13016, 716, 5571, 1378, 1368, 24578, 10031, 652, 67, 12537, 273, 31726, 82, 5411, 3552, 5701, 3816, 7751, 9, 86, 16, 738, 87, 2225, ...
where5 = where4 + [('ressource_id','=',self.res_id)] dirids = dirids + dirobj.search(cr,uid, where5)
def _child_get(self, cr, name=None, domain=None): dirobj = self.context._dirobj
0cb5ccb45d72356e72b0fb025b06360d62a3fbf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/0cb5ccb45d72356e72b0fb025b06360d62a3fbf6/nodes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 4422, 16, 508, 33, 7036, 16, 2461, 33, 7036, 4672, 4314, 303, 441, 273, 365, 18, 2472, 6315, 3211, 303, 441, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3624, 67, 588, 12, 2890, 16, 4422, 16, 508, 33, 7036, 16, 2461, 33, 7036, 4672, 4314, 303, 441, 273, 365, 18, 2472, 6315, 3211, 303, 441, 2, -100, -100, -100, -100, -100, -100, ...
def __init__( self, stdout=sys.stdout, stderr=sys.stderr, *args, **kwds ):
def __init__( self, direct_io=False, stdout=sys.stdout, stderr=sys.stderr, *args, **kwds ):
def __init__( self, stdout=sys.stdout, stderr=sys.stderr, *args, **kwds ): unittest.TestCase.__init__( self ) self.stdout = stdout self.stderr = stderr
3a832a04bb025372241cfa1c838afe2f3f4ff843 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7199/3a832a04bb025372241cfa1c838afe2f3f4ff843/15_makextreemfs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 2657, 67, 1594, 33, 8381, 16, 3909, 33, 9499, 18, 10283, 16, 4514, 33, 9499, 18, 11241, 16, 380, 1968, 16, 2826, 25577, 262, 30, 2836, 3813, 18, 4709, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 365, 16, 2657, 67, 1594, 33, 8381, 16, 3909, 33, 9499, 18, 10283, 16, 4514, 33, 9499, 18, 11241, 16, 380, 1968, 16, 2826, 25577, 262, 30, 2836, 3813, 18, 4709, 2...
self.nodeStack = [self.AddRoot("Root")]
self._root = self.AddRoot("Root") self.nodeStack = [self._root]
def __init__(self, parent, ID): wx.TreeCtrl.__init__(self, parent, ID) self.nodeStack = [self.AddRoot("Root")]
d531898b100dd9eb62ac37e1f10e0537d5747c18 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/d531898b100dd9eb62ac37e1f10e0537d5747c18/XMLtreeview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 16, 1599, 4672, 7075, 18, 2471, 12418, 16186, 2738, 972, 12, 2890, 16, 982, 16, 1599, 13, 365, 18, 2159, 2624, 273, 306, 2890, 18, 986, 2375, 2932, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 982, 16, 1599, 4672, 7075, 18, 2471, 12418, 16186, 2738, 972, 12, 2890, 16, 982, 16, 1599, 13, 365, 18, 2159, 2624, 273, 306, 2890, 18, 986, 2375, 2932, ...
state = _("Unknown")
state = i18n("Unknown")
def update_job (self, job, data): iter = self.jobiters[job] self.jobs[job] = data
2e12362d2411a0846a395cd899c27375d9eddefe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1682/2e12362d2411a0846a395cd899c27375d9eddefe/printer-applet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 4688, 261, 2890, 16, 1719, 16, 501, 4672, 1400, 273, 365, 18, 4688, 27270, 63, 4688, 65, 365, 18, 10088, 63, 4688, 65, 273, 501, 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, 0, 0, 0, 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, 1089, 67, 4688, 261, 2890, 16, 1719, 16, 501, 4672, 1400, 273, 365, 18, 4688, 27270, 63, 4688, 65, 365, 18, 10088, 63, 4688, 65, 273, 501, 2, -100, -100, -100, -100, -100, -100, -100, ...
if fsapi.is_backup_file(path) : logging.debug("%s: discarding Inotify event on %s, it's a backup file." % (self.getName(), styles.stylize(styles.ST_PATH, path)))
if os.path.islink(path) or fsapi.is_backup_file(path) : logging.debug("%s: discarding Inotify event on %s, it's a symlink or a backup file." % (self.getName(), styles.stylize(styles.ST_PATH, path)))
def process_event(self, basename, event, gid, dirname): """ Process Gamin events and apply ACLs on the fly. """
22b958d12b7da10fcbe44b3c7cd50e351ee1a290 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7650/22b958d12b7da10fcbe44b3c7cd50e351ee1a290/internals.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2575, 12, 2890, 16, 4882, 16, 871, 16, 11399, 16, 4283, 4672, 3536, 4389, 611, 301, 267, 2641, 471, 2230, 10098, 87, 603, 326, 21434, 18, 3536, 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, 1207, 67, 2575, 12, 2890, 16, 4882, 16, 871, 16, 11399, 16, 4283, 4672, 3536, 4389, 611, 301, 267, 2641, 471, 2230, 10098, 87, 603, 326, 21434, 18, 3536, 2, -100, -100, -100, -100, -10...
raise ValueError for i in range(1, len(sub)): if sub[i] != self[index+i]: raise ValueError return index
pass try: index = self._dict[sub[0]] for i in range(1, len(sub)): if sub[i] != self[index+i]: raise ValueError return index except TypeError: pass raise ValueError
def index(sub, start=0, end=-1): """ This runs in O(len(sub)) """ index %= len(self) try: index = self._dict[sub] except KeyError: raise ValueError for i in range(1, len(sub)): if sub[i] != self[index+i]: raise ValueError return index
a01f2baa7c6c3cc56949290f99e3b37028467eda /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5397/a01f2baa7c6c3cc56949290f99e3b37028467eda/setlist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 770, 12, 1717, 16, 787, 33, 20, 16, 679, 29711, 21, 4672, 3536, 1220, 7597, 316, 531, 12, 1897, 12, 1717, 3719, 3536, 770, 30582, 562, 12, 2890, 13, 775, 30, 770, 273, 365, 6315, 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, 770, 12, 1717, 16, 787, 33, 20, 16, 679, 29711, 21, 4672, 3536, 1220, 7597, 316, 531, 12, 1897, 12, 1717, 3719, 3536, 770, 30582, 562, 12, 2890, 13, 775, 30, 770, 273, 365, 6315, 157...
def copy_to_temp(copy_to="subdownloader_cli"):
def copy_to_temp(copy_to="/tmp/subdownloader"):
def copy_to_temp(copy_to="subdownloader_cli"): sys.stdout.write("Copying current path contents to '%s'..."% copy_to) sys.stdout.flush() #os.mkdir("subdownloader_cli") shutil.copytree(".", os.path.join(".", copy_to)) sys.stdout.write(" done\n") sys.stdout.flush() sys.stdout.write("Cleaning '%s'..."% copy_to) sys.stdout.flush() for root, dirs, fileNames in os.walk("./subdownloader_cli"): # check for unwanted directories if os.path.split(root)[-1] in exclude_dirs: shutil.rmtree(root) continue # check for unwanted files for fileName in fileNames: for ext in exclude_files: if re.search("%s$"% ext, fileName): os.remove(os.path.join(root, fileName)) sys.stdout.write(" done\n") sys.stdout.flush()
349f70d226e5e00114f208b05ba78fb124915afc /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1108/349f70d226e5e00114f208b05ba78fb124915afc/build_cli_tarball.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 869, 67, 5814, 12, 3530, 67, 869, 1546, 19, 5645, 19, 1717, 2378, 6714, 6, 4672, 2589, 18, 10283, 18, 2626, 2932, 2951, 310, 783, 589, 2939, 358, 1995, 87, 11, 7070, 9, 161...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1610, 67, 869, 67, 5814, 12, 3530, 67, 869, 1546, 19, 5645, 19, 1717, 2378, 6714, 6, 4672, 2589, 18, 10283, 18, 2626, 2932, 2951, 310, 783, 589, 2939, 358, 1995, 87, 11, 7070, 9, 161...
if updateCallback and updateCallback(msg=_(u"Removing from collection: '%s'") % item.getItemDisplayName()):
if updateCallback and updateCallback( msg=_(u"Removing from collection: '%(name)s'") % { 'name' : item.getItemDisplayName() } ):
def _get(self, previousView=None, updateCallback=None, getPhrase = None):
605c9a710d3cc2be6b6a5c80a93045d5ce1c927d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/605c9a710d3cc2be6b6a5c80a93045d5ce1c927d/Sharing.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 12, 2890, 16, 2416, 1767, 33, 7036, 16, 1089, 2428, 33, 7036, 16, 21735, 5648, 273, 599, 4672, 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, 389, 588, 12, 2890, 16, 2416, 1767, 33, 7036, 16, 1089, 2428, 33, 7036, 16, 21735, 5648, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
url = 'http://www.google.com/search?btnI=I&' + urllib.urlencode({'q' : query}) request = urllib2.Request(url) request.add_header('User-Agent', 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)') result = urllib2.build_opener(NoRedirects, NoErrors).open(request) if isinstance(result, str): return '%s: %s = %s' % (nick, query, result) else: raise Exception('No matches for ' + query) o
return '%s: %s' % (nick, self.google.lucky(query))
def response(self, **kwargs): nick = kwargs['nick'] args = kwargs['args']
78b0eb8aef80361cff80af37d7ce4e220a272807 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/10942/78b0eb8aef80361cff80af37d7ce4e220a272807/google.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 766, 12, 2890, 16, 2826, 4333, 4672, 10909, 273, 1205, 3292, 17091, 3546, 833, 273, 1205, 3292, 1968, 3546, 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, 766, 12, 2890, 16, 2826, 4333, 4672, 10909, 273, 1205, 3292, 17091, 3546, 833, 273, 1205, 3292, 1968, 3546, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if self.md.litter_mode=='constant yearly':
if not self.simulation or self.md.litter_mode=='constant yearly':
def _predict(self, sc, initial, litter, climate): """ processes the input data before calling the model and then runs the model sc -- non-woody / size of the woody material modelled initial -- system state at the beginning of the timestep litter -- litter input for the timestep climate -- climate conditions for the timestep draw -- should the values be drawn from the distribution or not """ # model parameters if self.ml_run: # maximum likelihood estimates for the model parameters self.param = self._model_param[0,:] elif self.draw: pind = random.randint(0, self._model_param.shape[0]-1) self.param = self._model_param[pind,:] # and mean values for the initial state and input if self.ml_run: initial = self._draw_from_distr(initial, VALUESPEC, False) self.infall[sc] = self._draw_from_distr(litter, VALUESPEC, False) elif self.draw: initial = self._draw_from_distr(initial, VALUESPEC, True) self.infall[sc] = self._draw_from_distr(litter, VALUESPEC, True) else: # initial values drawn randomly only for the "draw" run # i.e. for the first run after maximum likelihood run initial = self._draw_from_distr(initial, VALUESPEC, False) if self.md.litter_mode!='constant yearly': # if litter input is a timeseries, drawn at each step # for constant input the values drawn at the beginning used self.infall[sc] = self._draw_from_distr(litter, VALUESPEC, True) # climate na = numpy.array f32 = numpy.float32 par = na(self.param, dtype=f32) dur = climate['duration'] init = na(initial, dtype=f32) # convert input to yearly input in all cases if self.md.litter_mode=='constant yearly': inf = na(self.infall[sc], dtype=f32) else: inf = na(self.infall[sc], dtype=f32) / dur cl = na([climate['temp'], climate['rain'], climate['amplitude']], dtype=f32) endstate = y07.yasso.mod5c(par, dur, cl, init, inf, sc) self.ts_initial += sum(initial) self.ts_infall += sum(self.infall[sc]) return init, endstate
62654e19e802932b4f79e4fd8d72c70335d16ba8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1832/62654e19e802932b4f79e4fd8d72c70335d16ba8/modelcall.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 14491, 12, 2890, 16, 888, 16, 2172, 16, 328, 6132, 16, 927, 4988, 4672, 3536, 8488, 326, 810, 501, 1865, 4440, 326, 938, 471, 1508, 7597, 326, 938, 888, 1493, 1661, 17, 6933, 973,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 14491, 12, 2890, 16, 888, 16, 2172, 16, 328, 6132, 16, 927, 4988, 4672, 3536, 8488, 326, 810, 501, 1865, 4440, 326, 938, 471, 1508, 7597, 326, 938, 888, 1493, 1661, 17, 6933, 973,...
======= param = [SV.FIELDDROP, 0] v.SetParam(param) >>>>>>> 1.7
def main(): format = SV.RGB8_FRAMES qsize = 2 audio = 0 rate = 2 width = 0 norecord = 0 drop = 0 mono = 0 grey = 0 monotreshold = -1 opts, args = getopt.getopt(sys.argv[1:], 'aq:r:w:ndgmM:') for opt, arg in opts: if opt == '-a': audio = 1 elif opt == '-q': qsize = string.atoi(arg) elif opt == '-r': rate = string.atoi(arg) if rate < 2: sys.stderr.write('-r rate must be >= 2\n') sys.exit(2) elif opt == '-w': width = string.atoi(arg) elif opt == '-n': norecord = 1 elif opt == '-d': drop = 1 elif opt == '-g': grey = 1 elif opt == '-m': mono = 1 elif opt == '-M': mono = 1 monotreshold = string.atoi(arg) if args[2:]: sys.stderr.write('usage: Vrec [options] [file [audiofile]]\n') sys.exit(2) if args: filename = args[0] else: filename = 'film.video' if args[1:] and not audio: sys.stderr.write('-a turned on by appearance of 2nd file\n') audio = 1 if audio: if args[1:]: audiofilename = args[1] else: audiofilename = 'film.aiff' else: audiofilename = None if norecord: filename = audiofilename = '' v = sv.OpenVideo() # Determine maximum window size based on signal standard param = [SV.BROADCAST, 0] v.GetParam(param) if param[1] == SV.PAL: x = SV.PAL_XMAX y = SV.PAL_YMAX elif param[1] == SV.NTSC: x = SV.NTSC_XMAX y = SV.NTSC_YMAX else: print 'Unknown video standard', param[1] sys.exit(1) gl.foreground() gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) if width: gl.prefsize(width, width*3/4) win = gl.winopen(filename) if width: gl.maxsize(x, y) gl.keepaspect(x, y) gl.stepunit(8, 6) gl.winconstraints() x, y = gl.getsize() print x, 'x', y v.SetSize(x, y)
cc4967ad870844fcd568bf1e374c367ab53cff8d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/cc4967ad870844fcd568bf1e374c367ab53cff8d/Vrec.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 740, 273, 29537, 18, 11343, 28, 67, 15072, 55, 1043, 1467, 273, 576, 7447, 273, 374, 4993, 273, 576, 1835, 273, 374, 290, 479, 901, 273, 374, 3640, 273, 374, 6921, 83, 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, 2774, 13332, 740, 273, 29537, 18, 11343, 28, 67, 15072, 55, 1043, 1467, 273, 576, 7447, 273, 374, 4993, 273, 576, 1835, 273, 374, 290, 479, 901, 273, 374, 3640, 273, 374, 6921, 83, 273...
EXAMPLES:
Returns a generator object which iterates through the elements of self. The order in which the elements are generated is based on a 'weight' of a matrix which is the number of iterations on the base ring that are required to reach that matrix. The ordering is similar to a degree negative lexicographic order in monomials in a multivariate polynomial ring. EXAMPLES: Consider the case of 2 x 2 matrices over GF(5). sage: list( GF(5) ) [0, 1, 2, 3, 4] sage: MS = MatrixSpace(GF(5), 2, 2) sage: l = list(MS) Then, consider the following matrices: sage: A = MS([2,1,0,1]); A [2 1] [0 1] sage: B = MS([1,2,1,0]); B [1 2] [1 0] sage: C = MS([1,2,0,0]); C [1 2] [0 0] A appears before B since the weight of one of A's entries exceeds the weight of the corresponding entry in B earliest in the list. sage: l.index(A) 41 sage: l.index(B) 46 However, A would come after the matrix C since C has a lower weight than A. sage: l.index(A) 41 sage: l.index(C) 19 The weights of matrices over other base rings are not as obvious. For example, the weight of sage: MS = MatrixSpace(ZZ, 2, 2) sage: MS([-1,0,0,0]) [-1 0] [ 0 0] is 2 since sage: i = iter(ZZ) sage: i.next() 0 sage: i.next() 1 sage: i.next() -1 Some more examples:
def __iter__(self): """ EXAMPLES: sage: MS = MatrixSpace(GF(2),2) sage: a = list(MS) sage: len(a) 16 sage: a[0] [0 0] [0 0]
a9bc25bbff6ced4ab4129004d351c292201a2b8d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/a9bc25bbff6ced4ab4129004d351c292201a2b8d/matrix_space.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2165, 972, 12, 2890, 4672, 3536, 2860, 279, 4456, 733, 1492, 16960, 3059, 326, 2186, 434, 365, 18, 225, 1021, 1353, 316, 1492, 326, 2186, 854, 4374, 353, 2511, 603, 279, 296, 4865,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2165, 972, 12, 2890, 4672, 3536, 2860, 279, 4456, 733, 1492, 16960, 3059, 326, 2186, 434, 365, 18, 225, 1021, 1353, 316, 1492, 326, 2186, 854, 4374, 353, 2511, 603, 279, 296, 4865,...
return result
if self.data.has_key("datasets"): for dsEntry in self.data['datasets'][2].keys(): content = self.data['datasets'][2][dsEntry][2] output = {} for key, value in content.items(): output[key] = value[2].replace("\"", "") result.append(output) return result
def datasets(self): """ _datasets_
87fd39351bb9c9c6d972cc0cd212fd6b513fa35b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8886/87fd39351bb9c9c6d972cc0cd212fd6b513fa35b/OutputModule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11109, 12, 2890, 4672, 3536, 389, 21125, 67, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 11109, 12, 2890, 4672, 3536, 389, 21125, 67, 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...
opts, args = getopt.getopt(sys.argv[1:], 'k:p:w')
if sys.platform in ['mac', 'win', 'win32', 'nt'] and not sys.argv[1:]: gui() return opts, args = getopt.getopt(sys.argv[1:], 'gk:p:w')
def cli(): import getopt class BadUsage: pass try: opts, args = getopt.getopt(sys.argv[1:], 'k:p:w') writing = 0 for opt, val in opts: if opt == '-k': apropos(lower(val)) break if opt == '-p': try: port = int(val) except ValueError: raise BadUsage def ready(port=port): print 'server ready at http://127.0.0.1:%d/' % port serve(('127.0.0.1', port), ready) break if opt == '-w': if not args: raise BadUsage writing = 1 else: if args: for arg in args: try: if os.path.isfile(arg): arg = importfile(arg) if writing: if os.path.isdir(arg): writedocs(arg) else: writedoc(arg) else: man(arg) except DocImportError, value: print 'problem in %s - %s' % ( value.filename, value.args) else: if sys.platform in ['mac', 'win', 'win32', 'nt']: # GUI platforms with threading import threading ready = threading.Event() address = ('127.0.0.1', 12346) threading.Thread( target=serve, args=(address, ready.set)).start() ready.wait() import webbrowser webbrowser.open('http://127.0.0.1:12346/') else: raise BadUsage except (getopt.error, BadUsage): print """%s <name> ... Show documentation on something. <name> may be the name of a Python function, module, or package, or a dotted reference to a class or function within a module or module in a package, or the filename of a Python module to import.
bb384e153d6614fce08e58bada5e06402dc8b3e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/bb384e153d6614fce08e58bada5e06402dc8b3e4/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 13332, 1930, 336, 3838, 667, 6107, 5357, 30, 1342, 225, 775, 30, 309, 2589, 18, 9898, 316, 10228, 5821, 2187, 296, 8082, 2187, 296, 8082, 1578, 2187, 296, 496, 3546, 471, 486, 2589...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4942, 13332, 1930, 336, 3838, 667, 6107, 5357, 30, 1342, 225, 775, 30, 309, 2589, 18, 9898, 316, 10228, 5821, 2187, 296, 8082, 2187, 296, 8082, 1578, 2187, 296, 496, 3546, 471, 486, 2589...
return cwd[len(self.root) + 1:]
common_prefix_len = len(self.root) if not self.root.endswith(os.sep): common_prefix_len += 1 return cwd[common_prefix_len:]
def getcwd(self): cwd = os.getcwd() if cwd == self.root: return '' return cwd[len(self.root) + 1:]
78cdc108028c85d354380d4df3f7e2a0b2d9b490 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/78cdc108028c85d354380d4df3f7e2a0b2d9b490/dirstate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13323, 12, 2890, 4672, 7239, 273, 1140, 18, 588, 11089, 1435, 309, 7239, 422, 365, 18, 3085, 30, 327, 875, 327, 7239, 63, 1897, 12, 2890, 18, 3085, 13, 397, 404, 26894, 2, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13323, 12, 2890, 4672, 7239, 273, 1140, 18, 588, 11089, 1435, 309, 7239, 422, 365, 18, 3085, 30, 327, 875, 327, 7239, 63, 1897, 12, 2890, 18, 3085, 13, 397, 404, 26894, 2, -100, -100, ...
inst = Dummy() setInstanceState(inst, self.d) self.protocol.setObject(self.count, inst) self.deferred.callback(inst) return inst
obj = self.factory() obj.setCopyableState(self.d) self.protocol.setObject(self.count, obj) self.deferred.callback(obj) return obj
def receiveClose(self): # TODO: TASTE HERE IF YOU WANT TO LIVE! inst = Dummy() #inst.__classname__ = self.classname setInstanceState(inst, self.d) self.protocol.setObject(self.count, inst) self.deferred.callback(inst) return inst
a0261369e6bfc18290805793a4b07e48888ff7c1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/a0261369e6bfc18290805793a4b07e48888ff7c1/flavors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6798, 4605, 12, 2890, 4672, 468, 2660, 30, 399, 9053, 41, 670, 29340, 11083, 1624, 26556, 678, 6856, 8493, 511, 5354, 5, 1804, 273, 28622, 1435, 468, 8591, 16186, 18340, 972, 273, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6798, 4605, 12, 2890, 4672, 468, 2660, 30, 399, 9053, 41, 670, 29340, 11083, 1624, 26556, 678, 6856, 8493, 511, 5354, 5, 1804, 273, 28622, 1435, 468, 8591, 16186, 18340, 972, 273, 365, 1...
logging.error("Invalid weight specified: %r" % weight)
logging.error("Invalid weight specified: %r" % self.request.get('weight')
def post(self): user_info = _get_current_user_info() weight_data = WeightData(user_info) datestr = self.request.get('date')
34f251fd4ba612514695008bb2518d3d3c6115e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6443/34f251fd4ba612514695008bb2518d3d3c6115e2/weightmeter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 729, 67, 1376, 273, 389, 588, 67, 2972, 67, 1355, 67, 1376, 1435, 3119, 67, 892, 273, 15437, 751, 12, 1355, 67, 1376, 13, 7811, 313, 273, 365, 18, 2293, 18, 588...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1603, 12, 2890, 4672, 729, 67, 1376, 273, 389, 588, 67, 2972, 67, 1355, 67, 1376, 1435, 3119, 67, 892, 273, 15437, 751, 12, 1355, 67, 1376, 13, 7811, 313, 273, 365, 18, 2293, 18, 588...
out += create_html_link(self.build_search_url(query, jrec=jrec+rg,
out += create_html_link(self.build_search_url(query, jrec=jrec+rg,
def img(gif, txt): return '<img src="%(weburl)s/img/%(gif)s.gif" alt="%(txt)s" border="0">' % { 'txt': txt, 'gif': gif, 'weburl': weburl}
d80e9e5b545268d60103014de3d2c09f38531285 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/d80e9e5b545268d60103014de3d2c09f38531285/websearch_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3774, 12, 13905, 16, 6463, 4672, 327, 2368, 6081, 1705, 11613, 12, 4875, 718, 13, 87, 19, 6081, 5258, 12, 13905, 13, 87, 18, 13905, 6, 3770, 11613, 12, 5830, 13, 87, 6, 5795, 1546, 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, 3774, 12, 13905, 16, 6463, 4672, 327, 2368, 6081, 1705, 11613, 12, 4875, 718, 13, 87, 19, 6081, 5258, 12, 13905, 13, 87, 18, 13905, 6, 3770, 11613, 12, 5830, 13, 87, 6, 5795, 1546, 2...
text = text.replace("\n", "<br>/n") text = "<nobr>" + text + "</nobr>"
text = text.replace("\n", "<br>\n")
def write(self, text): # is this some extra info for debuging #if len(text) > 7 and text[0:7] == "<extra>": # if not self.printExtraOutput: return # text = text[7:] if text == "\n": return
b2656ae570f7b3421360ebf79830008e8b88da06 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/b2656ae570f7b3421360ebf79830008e8b88da06/orngOutput.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 977, 4672, 468, 353, 333, 2690, 2870, 1123, 364, 1198, 310, 468, 430, 562, 12, 955, 13, 405, 2371, 471, 977, 63, 20, 30, 27, 65, 422, 3532, 7763, 2984, 30, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 977, 4672, 468, 353, 333, 2690, 2870, 1123, 364, 1198, 310, 468, 430, 562, 12, 955, 13, 405, 2371, 471, 977, 63, 20, 30, 27, 65, 422, 3532, 7763, 2984, 30, 468, ...
formWrapper = getMultiAdapter((context, request), name=formname) form = formWrapper.form(context, request)
if not formname.startswith('@@') and not formname.startswith('++'): formname = '@@' + formname formWrapper = context.restrictedTraverse(formname) form = formWrapper.form_instance
def validate_input(self, formname, fieldname, fieldset=None, value=None): """Given a form (view) name, a field name and the submitted value, validate the given field. """
f79b88dacbdb4002e5709304baa7665612e87351 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12252/f79b88dacbdb4002e5709304baa7665612e87351/validation.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2630, 12, 2890, 16, 646, 529, 16, 14680, 16, 16885, 33, 7036, 16, 460, 33, 7036, 4672, 3536, 6083, 279, 646, 261, 1945, 13, 508, 16, 279, 652, 508, 471, 326, 9638, 460, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1954, 67, 2630, 12, 2890, 16, 646, 529, 16, 14680, 16, 16885, 33, 7036, 16, 460, 33, 7036, 4672, 3536, 6083, 279, 646, 261, 1945, 13, 508, 16, 279, 652, 508, 471, 326, 9638, 460, 16,...
dict = readmodule_ex(module, path)
dict = _readmodule(module, path)
def readmodule(module, path=[]): '''Backwards compatible interface. Call readmodule_ex() and then only keep Class objects from the resulting dictionary.''' dict = readmodule_ex(module, path) res = {} for key, value in dict.items(): if isinstance(value, Class): res[key] = value return res
2b8200b51961eb9d362ebd1b3649bc1732ccc1cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/2b8200b51961eb9d362ebd1b3649bc1732ccc1cc/pyclbr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 33, 8526, 4672, 9163, 2711, 6397, 7318, 1560, 18, 225, 3049, 855, 2978, 67, 338, 1435, 471, 1508, 1338, 3455, 1659, 2184, 628, 326, 8156, 3880, 1093, 6309, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 12, 2978, 16, 589, 33, 8526, 4672, 9163, 2711, 6397, 7318, 1560, 18, 225, 3049, 855, 2978, 67, 338, 1435, 471, 1508, 1338, 3455, 1659, 2184, 628, 326, 8156, 3880, 1093, 6309, ...
self.df.setText(self.df_template.arg("Connected: "+info[0])\ .arg(info[1]).arg(info[2]))
def establish_connection(self): self.window.setCursor(Qt.WaitCursor) self.status("Connecting to device") try: info = self.dev.get_device_information(end_session=False) except DeviceBusy: self.status("Device is in use by another application") self.window.setCursor(Qt.ArrowCursor) return except DeviceError, err: traceback.print_exc(err) self.dev.reconnect() self.thread().msleep(100) return self.establish_connection() except ProtocolError, e: traceback.print_exc(e) qFatal("Unable to connect to device. Please try unplugging and"+\ " reconnecting it") self.df.setText(self.df_template.arg("Connected: "+info[0])\ .arg(info[1]).arg(info[2])) self.update_availabe_space(end_session=False) self.card = self.dev.card() if self.card: self.device_tree.hide_card(False) else: self.device_tree.hide_card(True) self.device_tree.hide_reader(False) self.status("Loading media list from SONY Reader") self.reader_model.set_data(self.dev.books(end_session=False)) if self.card: self.status("Loading media list from Storage Card") self.card_model.set_data(self.dev.books(oncard=True)) self.progress(100) self.window.setCursor(Qt.ArrowCursor)
7530d37ae22039f068e7b7919728110f375672db /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9125/7530d37ae22039f068e7b7919728110f375672db/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18312, 67, 4071, 12, 2890, 4672, 365, 18, 5668, 18, 542, 6688, 12, 23310, 18, 5480, 6688, 13, 365, 18, 2327, 2932, 30049, 358, 2346, 7923, 775, 30, 1123, 273, 365, 18, 5206, 18, 588, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18312, 67, 4071, 12, 2890, 4672, 365, 18, 5668, 18, 542, 6688, 12, 23310, 18, 5480, 6688, 13, 365, 18, 2327, 2932, 30049, 358, 2346, 7923, 775, 30, 1123, 273, 365, 18, 5206, 18, 588, ...
def SimpleTest(self, module, name, cmd_args=None): cmd = self._DefaultCommand(module, name)
def SimpleTest(self, module, name, valgrind_test_args=None, cmd_args=None): cmd = self._DefaultCommand(module, name, valgrind_test_args)
def SimpleTest(self, module, name, cmd_args=None): cmd = self._DefaultCommand(module, name) self._ReadGtestFilterFile(name, cmd) if cmd_args: cmd.extend(cmd_args) return common.RunSubprocess(cmd, 0)
7e40f180b28951bc84ba636d93929d0494747619 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/7e40f180b28951bc84ba636d93929d0494747619/chrome_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4477, 4709, 12, 2890, 16, 1605, 16, 508, 16, 1244, 3197, 728, 67, 3813, 67, 1968, 33, 7036, 16, 1797, 67, 1968, 33, 7036, 4672, 1797, 273, 365, 6315, 1868, 2189, 12, 2978, 16, 508, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4477, 4709, 12, 2890, 16, 1605, 16, 508, 16, 1244, 3197, 728, 67, 3813, 67, 1968, 33, 7036, 16, 1797, 67, 1968, 33, 7036, 4672, 1797, 273, 365, 6315, 1868, 2189, 12, 2978, 16, 508, 1...
prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix
s1 = min(m) s2 = max(m) n = min(len(s1), len(s2)) for i in xrange(n): if s1[i] != s2[i]: return s1[:i] return s1[:n]
def commonprefix(m): "Given a list of pathnames, returns the longest common leading component" if not m: return '' prefix = m[0] for item in m: for i in range(len(prefix)): if prefix[:i+1] != item[:i+1]: prefix = prefix[:i] if i == 0: return '' break return prefix
bc1fd7285cd96d8b687f08ff7c66148f29086962 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/bc1fd7285cd96d8b687f08ff7c66148f29086962/posixpath.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2975, 3239, 12, 81, 4672, 315, 6083, 279, 666, 434, 589, 1973, 16, 1135, 326, 12163, 2975, 7676, 1794, 6, 309, 486, 312, 30, 327, 875, 272, 21, 273, 1131, 12, 81, 13, 272, 22, 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, 2975, 3239, 12, 81, 4672, 315, 6083, 279, 666, 434, 589, 1973, 16, 1135, 326, 12163, 2975, 7676, 1794, 6, 309, 486, 312, 30, 327, 875, 272, 21, 273, 1131, 12, 81, 13, 272, 22, 273, ...
universal_newlines=universal_newlines)
universal_newlines=universal_newlines, silent_ok=True)
def GetBaseFile(self, filename): status = self.GetStatus(filename) base_content = None new_content = None
eb832f5bde044b8ab2c68c9bb98940bdbe9b728b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/476/eb832f5bde044b8ab2c68c9bb98940bdbe9b728b/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 2171, 812, 12, 2890, 16, 1544, 4672, 1267, 273, 365, 18, 967, 1482, 12, 3459, 13, 1026, 67, 1745, 273, 599, 394, 67, 1745, 273, 599, 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, 0, 0, 0, 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, 2171, 812, 12, 2890, 16, 1544, 4672, 1267, 273, 365, 18, 967, 1482, 12, 3459, 13, 1026, 67, 1745, 273, 599, 394, 67, 1745, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, ...
return r_dict.send_message(hop, 'll_set', can_raise=r_dict.custom_eq_hash)
return r_dict.send_message(hop, 'll_set', can_raise=r_dict.custom_eq_hash, v_args=vlist)
def rtype_setitem((r_dict, r_key), hop): v_dict, v_key, v_value = hop.inputargs(r_dict, r_dict.key_repr, r_dict.value_repr) if not r_dict.custom_eq_hash: hop.exception_cannot_occur() # XXX: maybe should we move this inside send_message? return r_dict.send_message(hop, 'll_set', can_raise=r_dict.custom_eq_hash)
35e3203c5df06b0ad979a6790bbc733c1f49374e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/35e3203c5df06b0ad979a6790bbc733c1f49374e/rdict.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9328, 67, 542, 1726, 12443, 86, 67, 1576, 16, 436, 67, 856, 3631, 19055, 4672, 331, 67, 1576, 16, 331, 67, 856, 16, 331, 67, 1132, 273, 19055, 18, 2630, 1968, 12, 86, 67, 1576, 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, 9328, 67, 542, 1726, 12443, 86, 67, 1576, 16, 436, 67, 856, 3631, 19055, 4672, 331, 67, 1576, 16, 331, 67, 856, 16, 331, 67, 1132, 273, 19055, 18, 2630, 1968, 12, 86, 67, 1576, 16, ...
if unrenderedCount > 0: (controlWidth, controlHeight) = control.GetClientSize() controlWidth -= 22;
addrOnlyString = u'' indicatorString = u'' unrenderedFormat = u'[+%d]' (controlWidth, controlHeight) = control.GetClientSize() if unrenderedCount > 0 and controlWidth > 0: controlWidth -= wx.SystemSettings.GetMetric(wx.SYS_VSCROLL_X); def addressFitsInControl(addr): return (control.GetTextExtent(addr)[0] < controlWidth)
def shortenAddressList(self, list, control): """ Parse a string with a list of email addresses (no validity check, just commas) and return both a new string with a list that will fit in the given control's bounds, and the number of omitted addresses, in a tuple. """ (ign, addressList, ign2) = Mail.EmailAddress.parseEmailAddresses(self.item, list) unrenderedCount = len(addressList) addrString = u'' if unrenderedCount > 0: (controlWidth, controlHeight) = control.GetClientSize()
f3d20a7fee11911c22e533f8d71feebe9a12e2c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/f3d20a7fee11911c22e533f8d71feebe9a12e2c0/AttributeEditors.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19651, 1887, 682, 12, 2890, 16, 666, 16, 3325, 4672, 3536, 2884, 279, 533, 598, 279, 666, 434, 2699, 6138, 261, 2135, 13800, 866, 16, 2537, 23528, 13, 471, 327, 3937, 279, 394, 533, 59...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 19651, 1887, 682, 12, 2890, 16, 666, 16, 3325, 4672, 3536, 2884, 279, 533, 598, 279, 666, 434, 2699, 6138, 261, 2135, 13800, 866, 16, 2537, 23528, 13, 471, 327, 3937, 279, 394, 533, 59...
self.set_parameter_options(name, stepsize=stepsize, stepdelay=stepdelay)
self.set_parameter_options(name, maxstep=stepsize, stepdelay=stepdelay)
def set_parameter_rate(self, name, stepsize, stepdelay): ''' Change the rate properties for a channel.
4a57d00edf8a353e0ddfa46f6e11b23fc9615479 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6471/4a57d00edf8a353e0ddfa46f6e11b23fc9615479/instrument.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6775, 67, 5141, 12, 2890, 16, 508, 16, 2235, 1467, 16, 2235, 10790, 4672, 9163, 7576, 326, 4993, 1790, 364, 279, 1904, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6775, 67, 5141, 12, 2890, 16, 508, 16, 2235, 1467, 16, 2235, 10790, 4672, 9163, 7576, 326, 4993, 1790, 364, 279, 1904, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
changed_cb=self.prefs_notiflocation_changed)
changed_cb=self._notiflocation_changed)
def extras_tab(self, popuptimes, prefs_notif_toggled, prefs_crossfade_changed, prefs_crossfade_toggled): """Construct and layout the extras tab""" if not self.scrobbler.imported(): self.config.as_enabled = False as_label = ui.label(markup='<b>' + _('Extras') + '</b>') extras_frame = gtk.Frame() extras_frame.set_label_widget(as_label) extras_frame.set_shadow_type(gtk.SHADOW_NONE)
7d41f2105c0d58643150b6472b6b9676150f38e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2312/7d41f2105c0d58643150b6472b6b9676150f38e3/preferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11875, 67, 7032, 12, 2890, 16, 1843, 3648, 4485, 16, 15503, 67, 902, 430, 67, 88, 23972, 1259, 16, 15503, 67, 14653, 507, 323, 67, 6703, 16, 15503, 67, 14653, 507, 323, 67, 88, 23972, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11875, 67, 7032, 12, 2890, 16, 1843, 3648, 4485, 16, 15503, 67, 902, 430, 67, 88, 23972, 1259, 16, 15503, 67, 14653, 507, 323, 67, 6703, 16, 15503, 67, 14653, 507, 323, 67, 88, 23972, ...
path = o.path if o.fragment: self.fragment = o.fragment
path = o_path o_fragment = o[5] if o_fragment: self.fragment = o_fragment
def fetch(self, url): o = urlparse.urlparse(url) if o.port: port = int(o.port) else: port = 80 if o.query: path = o.path + '?' + o.query else: path = o.path if o.fragment: self.fragment = o.fragment if self.fragment: path += '#' + self.fragment if not path: path = '/' self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) if o.scheme == 'http': self.sock.connect((o.hostname,port)) elif o.scheme == 'https': ctx = OpenSSL.SSL.Context(OpenSSL.SSL.SSLv23_METHOD) self.sock = OpenSSL.SSL.Connection(ctx, sock) else: raise ValueError("unknown protocol: %s" % o.scheme) if self.debug: log('>> HEAD %s HTTP/1.1' % path) log('>> Host: %s' % o.hostname) self.sock.send('HEAD %s HTTP/1.1\n' % path) self.sock.send('Host: %s\n' % o.hostname) self.sock.send('\n') data = self.read() self.sock.close() return data
444b609184a8825cf6ec712d4c0c553b3e23c70c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8937/444b609184a8825cf6ec712d4c0c553b3e23c70c/integrity.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 12, 2890, 16, 880, 4672, 320, 273, 15185, 18, 718, 2670, 12, 718, 13, 309, 320, 18, 655, 30, 1756, 273, 509, 12, 83, 18, 655, 13, 469, 30, 1756, 273, 8958, 309, 320, 18, 2271...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2158, 12, 2890, 16, 880, 4672, 320, 273, 15185, 18, 718, 2670, 12, 718, 13, 309, 320, 18, 655, 30, 1756, 273, 509, 12, 83, 18, 655, 13, 469, 30, 1756, 273, 8958, 309, 320, 18, 2271...
def saveEvts(self, compn, newBody): """ For every event definition not defined in source add an empty method to the bottom of the class """ for evt in compn.textEventList: if evt.trigger_meth != '(delete)': newBody.append(bodyIndent + evt.asText()) if not self.model.module.classes[\ self.model.main].methods.has_key(evt.trigger_meth): self.model.module.addMethod(self.model.main, evt.trigger_meth, 'self, event', [' pass']) def saveDepsForCtrl(self, ctrlName, depLinks, newBody): if depLinks.has_key(ctrlName): for prop in depLinks[ctrlName]: newBody.append(bodyIndent + prop.asText())
def saveEvts(self, compn, newBody): """ For every event definition not defined in source add an empty method to the bottom of the class """ for evt in compn.textEventList: if evt.trigger_meth != '(delete)': newBody.append(bodyIndent + evt.asText()) if not self.model.module.classes[\ self.model.main].methods.has_key(evt.trigger_meth): self.model.module.addMethod(self.model.main, evt.trigger_meth, 'self, event', [' pass'])
929119b7ba576880ddd09a9ae89e96345b94dae4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/929119b7ba576880ddd09a9ae89e96345b94dae4/Designer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 20861, 3428, 12, 2890, 16, 1161, 82, 16, 394, 2250, 4672, 3536, 2457, 3614, 871, 2379, 486, 2553, 316, 1084, 527, 392, 1008, 707, 358, 326, 5469, 434, 326, 667, 3536, 225, 364, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1923, 20861, 3428, 12, 2890, 16, 1161, 82, 16, 394, 2250, 4672, 3536, 2457, 3614, 871, 2379, 486, 2553, 316, 1084, 527, 392, 1008, 707, 358, 326, 5469, 434, 326, 667, 3536, 225, 364, 6...
def test_make_stack_from_der(self):
def test_make_stack_from_der(self):
def test_make_stack_from_der(self): f = open("tests/der_encoded_seq.b64") b64 = f.read(1304) seq = base64.decodestring(b64) stack = X509.new_stack_from_der(seq) cert = stack.pop() subject = cert.get_subject() assert str(subject) == "/DC=org/DC=doegrids/OU=Services/CN=host/bosshog.lbl.gov"
1971668db0b53cb7bb7fd709977d69001aed4ffb /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8055/1971668db0b53cb7bb7fd709977d69001aed4ffb/test_x509.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6540, 67, 3772, 67, 2080, 67, 765, 12, 2890, 4672, 284, 273, 1696, 2932, 16341, 19, 765, 67, 10787, 67, 5436, 18, 70, 1105, 7923, 324, 1105, 273, 284, 18, 896, 12, 3437, 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, 1842, 67, 6540, 67, 3772, 67, 2080, 67, 765, 12, 2890, 4672, 284, 273, 1696, 2932, 16341, 19, 765, 67, 10787, 67, 5436, 18, 70, 1105, 7923, 324, 1105, 273, 284, 18, 896, 12, 3437, 30...
class file(plotitem): """a plotitem representing a file that contains gnuplot data.""" _option_list = plotitem._option_list.copy()
class File(PlotItem): """A PlotItem representing a file that contains gnuplot data.""" _option_list = PlotItem._option_list.copy()
def __del__(self): """Delete the referenced file."""
1ad1a64c1cb68257b9fa744cb8c97d06c68365e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9569/1ad1a64c1cb68257b9fa744cb8c97d06c68365e4/PlotItems.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 3771, 972, 12, 2890, 4672, 3536, 2613, 326, 8042, 585, 12123, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 3536, 2613, 326, 8042, 585, 12123, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
customizationExists = template in container
customizationExists = templatePath in container
def inspectViewlet(self, viewlethash): """ Display detailed information about a particular viewlet. """ logger.debug("in inspectViewlet") # Unhash the viewlet info unhashedViewletInfo = unhashViewletInfo(viewlethash) # Get the registration information for this viewlet reg = findTemplateViewRegistrationFromHash(viewlethash) viewName = unhashedViewletInfo['viewletName'] managerName = unhashedViewletInfo['managerName'] cls = registration.getViewClassFromRegistration(reg) className = "%s.%s" % (cls.__module__, cls.__name__) try: viewRegistrationInfo = list(registration.templateViewRegistrationInfos([reg]))[0] except IndexError: # For some reason, there's no registration with portal_view_cusomtizations, # this appears to happen when there's no template defined for the viewlet and it instead # uses a "render" method. customizationExists = False customizationAllowed = False templatePath = "" else: template = viewRegistrationInfo['zptfile'] templatePath = registration.generateIdFromRegistration(reg) container = queryUtility(IViewTemplateContainer) customizationExists = template in container customizationAllowed = True template = ViewPageTemplateFile('panel_inspect_viewlet.pt') # Wrap it so that Zope knows in what context it's being called # Otherwise, we get an "AttributeError: 'str' object has no attribute 'other'" error template = template.__of__(self) out = template(viewName = viewName, managerName = managerName, template = template, className = className, templatePath = templatePath, customizationExists = customizationExists, customizationAllowed = customizationAllowed, viewletHash = viewlethash) # Dump the output to the output panel self.updatePanelBodyContent(out) # Highlight this element ksscore = self.getCommandSet('core') self.highlightElement(ksscore.getCssSelector('.kssattr-viewlethash-%s' % viewlethash)) # And in the nav tree (Should this be here or in the nav tree viewlet code?) self.highlightInNavTree(ksscore.getCssSelector('#glowormPanelNavTree .kssattr-forviewlet-%s' % viewlethash)) return self.render()
8b3e9a94c7c4b5fef49c49746cc166a4a2061e78 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12128/8b3e9a94c7c4b5fef49c49746cc166a4a2061e78/inspector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5334, 1767, 1810, 12, 2890, 16, 1476, 80, 546, 961, 4672, 3536, 9311, 6864, 1779, 2973, 279, 6826, 1476, 1810, 18, 3536, 1194, 18, 4148, 2932, 267, 5334, 1767, 1810, 7923, 225, 468, 1351...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5334, 1767, 1810, 12, 2890, 16, 1476, 80, 546, 961, 4672, 3536, 9311, 6864, 1779, 2973, 279, 6826, 1476, 1810, 18, 3536, 1194, 18, 4148, 2932, 267, 5334, 1767, 1810, 7923, 225, 468, 1351...
if 'who' in event: reply = reply.replace('$who', event['who']) if 'channel' in event: reply = reply.replace('$channel', event['channel'])
reply = reply.replace('$who', event.sender['nick']) reply = reply.replace('$channel', event.channel)
def remote_get(self, name, number=None, pattern=None, is_regex=None, event={}): session = ibid.databases.ibid() factoid = get_factoid(session, name, number, pattern, is_regex) session.close()
739ce618ea043322b77109974c84a8b3c80f7950 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12048/739ce618ea043322b77109974c84a8b3c80f7950/factoid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2632, 67, 588, 12, 2890, 16, 508, 16, 1300, 33, 7036, 16, 1936, 33, 7036, 16, 353, 67, 7584, 33, 7036, 16, 871, 12938, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 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, 2632, 67, 588, 12, 2890, 16, 508, 16, 1300, 33, 7036, 16, 1936, 33, 7036, 16, 353, 67, 7584, 33, 7036, 16, 871, 12938, 4672, 1339, 273, 9834, 350, 18, 3404, 19684, 18, 495, 350, 1435...
return externalpatch(patcher, args, patchname, ui, strip, cwd, files)
return externalpatch(patcher, patchname, ui, strip, cwd, files)
def patch(patchname, ui, strip=1, cwd=None, files=None, eolmode='strict'): """Apply <patchname> to the working directory. 'eolmode' specifies how end of lines should be handled. It can be: - 'strict': inputs are read in binary mode, EOLs are preserved - 'crlf': EOLs are ignored when patching and reset to CRLF - 'lf': EOLs are ignored when patching and reset to LF - None: get it from user settings, default to 'strict' 'eolmode' is ignored when using an external patcher program. Returns whether patch was applied with fuzz factor. """ patcher = ui.config('ui', 'patch') args = [] if files is None: files = {} try: if patcher: return externalpatch(patcher, args, patchname, ui, strip, cwd, files) return internalpatch(patchname, ui, strip, cwd, files, eolmode) except PatchError, err: s = str(err) if s: raise util.Abort(s) else: raise util.Abort(_('patch failed to apply'))
5fa420a2a2858de74ae86c5d9337ab239fb155b3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11312/5fa420a2a2858de74ae86c5d9337ab239fb155b3/patch.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 16, 1390, 33, 7036, 16, 14775, 3188, 2218, 13948, 11, 4672, 3536, 7001, 411, 2272, 529, 34, 358, 326, 5960, 1867, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4729, 12, 2272, 529, 16, 5915, 16, 2569, 33, 21, 16, 7239, 33, 7036, 16, 1390, 33, 7036, 16, 14775, 3188, 2218, 13948, 11, 4672, 3536, 7001, 411, 2272, 529, 34, 358, 326, 5960, 1867, ...
def __init__(self, x, unit=None, cr=False, sort=True):
def __init__(self, x, unit=None, cr=False, sort=True, simplify=True):
def __init__(self, x, unit=None, cr=False, sort=True): if not isinstance(x, list): raise TypeError, "x must be a list" if isinstance(x, Factorization): if unit is None: unit = x.__unit else: unit = x.__unit * unit from sage.rings.integer import Integer for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" if unit is None: if len(x) > 0: try: unit = x[0][0].parent()(1) except AttributeError: unit = Integer(1) else: unit = Integer(1) list.__init__(self, x) self.__unit = unit self.__cr = cr if sort: self.sort()
cb1429dcb61ee11943f1a81fd06026cfcd41d30e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/cb1429dcb61ee11943f1a81fd06026cfcd41d30e/factorization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 2836, 33, 7036, 16, 4422, 33, 8381, 16, 1524, 33, 5510, 16, 16499, 33, 5510, 4672, 309, 486, 1549, 12, 92, 16, 666, 4672, 1002, 3580, 16, 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, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 2836, 33, 7036, 16, 4422, 33, 8381, 16, 1524, 33, 5510, 16, 16499, 33, 5510, 4672, 309, 486, 1549, 12, 92, 16, 666, 4672, 1002, 3580, 16, 315,...
self.row_size = x
def refresh_screen(self): """ Redraws the whole screen with the current channel window set to channel """ width, height = self.ui.get_cols_rows()
cf0b1fe13eba43ab7567307bb554e1832896a5aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5568/cf0b1fe13eba43ab7567307bb554e1832896a5aa/Hexeditor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 9252, 12, 2890, 4672, 3536, 4621, 1899, 87, 326, 7339, 5518, 598, 326, 783, 1904, 2742, 444, 358, 1904, 3536, 1835, 16, 2072, 273, 365, 18, 4881, 18, 588, 67, 6842, 67, 3870,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4460, 67, 9252, 12, 2890, 4672, 3536, 4621, 1899, 87, 326, 7339, 5518, 598, 326, 783, 1904, 2742, 444, 358, 1904, 3536, 1835, 16, 2072, 273, 365, 18, 4881, 18, 588, 67, 6842, 67, 3870,...
self.parentBlock.widget, -1, self, font)
self.parentBlock.widget, Block.getWidgetID(self), self, font)
def instantiateWidget(self): """ Ask our attribute editor to create a widget for us. """ existingWidget = getattr(self, 'widget', None) if existingWidget is not None: return existingWidget forEditing = getattr(self, 'forEditing', False)
0c9c25ae95bf029bcbc524438c1e4bfb6a7dc80b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/0c9c25ae95bf029bcbc524438c1e4bfb6a7dc80b/ControlBlocks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 4609, 12, 2890, 4672, 3536, 25747, 3134, 1566, 4858, 358, 752, 279, 3604, 364, 584, 18, 3536, 2062, 4609, 273, 3869, 12, 2890, 16, 296, 6587, 2187, 599, 13, 309, 2062, 4609, 353, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10275, 4609, 12, 2890, 4672, 3536, 25747, 3134, 1566, 4858, 358, 752, 279, 3604, 364, 584, 18, 3536, 2062, 4609, 273, 3869, 12, 2890, 16, 296, 6587, 2187, 599, 13, 309, 2062, 4609, 353, ...
font = self.__loadfont__(fname.replace('_bold', 'bd'), ptsize) if font: break
def __getfont__(self, filename, ptsize): ptsize = int(ptsize / 0.7) # XXX pygame multiplies by 0.7 for some reason
f3f68590c26a78dac15ba4fc7631e38b13e4645b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/f3f68590c26a78dac15ba4fc7631e38b13e4645b/osd.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 5776, 972, 12, 2890, 16, 1544, 16, 5818, 1467, 4672, 5818, 1467, 273, 509, 12, 1092, 554, 342, 374, 18, 27, 13, 225, 468, 11329, 2395, 13957, 3309, 5259, 635, 374, 18, 27, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 5776, 972, 12, 2890, 16, 1544, 16, 5818, 1467, 4672, 5818, 1467, 273, 509, 12, 1092, 554, 342, 374, 18, 27, 13, 225, 468, 11329, 2395, 13957, 3309, 5259, 635, 374, 18, 27, ...
if 'b' in msg.args[1] or 'd' in msg.args[1]: i = 2 plusmin = False for c in msg.args[1]: if c == '-': plusmin = False elif c == '+': plusmin = True else: if c == 'b': if plusmin: comment = self.getHostFromBan(irc, msg, msg.args[i]) self.doKickban(irc, channel, msg.nick, msg.args[i], extra_comment=comment) else: self.doUnban(irc,channel, msg.nick, msg.args[i]) i += 1 if c == 'd': if plusmin: self.doKickban(irc, channel, msg.nick, msg.args[i] + ' (realname)') else: self.doUnban(irc,channel, msg.nick, msg.args[i] + ' (realname)') i += 1
modes = ircutils.separateModes(msg.args[1:]) for param in modes: if param == '+b': comment = self.getHostFromBan(irc, msg, msg.args[i]) self.doKickban(irc, channel, msg.nick, msg.args[i], extra_comment=comment) elif param == '-b': self.doUnban(irc,channel, msg.nick, msg.args[i]) elif param == '+d': self.doKickban(irc, channel, msg.nick, msg.args[i] + ' (realname)') elif param == '-d': self.doUnban(irc,channel, msg.nick, msg.args[i] + ' (realname)')
def doMode(self, irc, msg): channel = msg.args[0] if irc.isChannel(channel) and msg.args[1:]: self.doLog(irc, channel, '*** %s sets mode: %s %s\n' % (msg.nick or msg.prefix, msg.args[1], ' '.join(msg.args[2:]))) if 'b' in msg.args[1] or 'd' in msg.args[1]: i = 2 plusmin = False for c in msg.args[1]: if c == '-': plusmin = False elif c == '+': plusmin = True else: if c == 'b': if plusmin: comment = self.getHostFromBan(irc, msg, msg.args[i]) self.doKickban(irc, channel, msg.nick, msg.args[i], extra_comment=comment) else: self.doUnban(irc,channel, msg.nick, msg.args[i]) i += 1 if c == 'd': if plusmin: self.doKickban(irc, channel, msg.nick, msg.args[i] + ' (realname)') else: self.doUnban(irc,channel, msg.nick, msg.args[i] + ' (realname)') i += 1
118c820e160bab6a4a762bc5506e50504883344c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3106/118c820e160bab6a4a762bc5506e50504883344c/plugin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2309, 12, 2890, 16, 277, 1310, 16, 1234, 4672, 1904, 273, 1234, 18, 1968, 63, 20, 65, 309, 277, 1310, 18, 291, 2909, 12, 4327, 13, 471, 1234, 18, 1968, 63, 21, 30, 14542, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 2309, 12, 2890, 16, 277, 1310, 16, 1234, 4672, 1904, 273, 1234, 18, 1968, 63, 20, 65, 309, 277, 1310, 18, 291, 2909, 12, 4327, 13, 471, 1234, 18, 1968, 63, 21, 30, 14542, 365, ...
self.assertRaises(TypeError, list, ifilterfalse(isEven, N(s)))
self.assertRaises(TypeError, ifilterfalse, isEven, N(s))
def test_ifilterfalse(self): for s in (range(10), range(0), range(1000), (7,11), xrange(2000,2200,5)): for g in (G, I, Ig, S, L, R): self.assertEqual(list(ifilterfalse(isEven, g(s))), filter(isOdd, g(s))) self.assertRaises(TypeError, ifilterfalse, isEven, X(s)) self.assertRaises(TypeError, list, ifilterfalse(isEven, N(s))) self.assertRaises(ZeroDivisionError, list, ifilterfalse(isEven, E(s)))
8690c4ed3fa1f1889459249c7e50e11c2052b340 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/8690c4ed3fa1f1889459249c7e50e11c2052b340/test_itertools.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 430, 1088, 5743, 12, 2890, 4672, 364, 272, 316, 261, 3676, 12, 2163, 3631, 1048, 12, 20, 3631, 1048, 12, 18088, 3631, 261, 27, 16, 2499, 3631, 12314, 12, 17172, 16, 3787, 713...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 430, 1088, 5743, 12, 2890, 4672, 364, 272, 316, 261, 3676, 12, 2163, 3631, 1048, 12, 20, 3631, 1048, 12, 18088, 3631, 261, 27, 16, 2499, 3631, 12314, 12, 17172, 16, 3787, 713...
utt.verify_grad(self.op, inputs)
utt.verify_grad(self.op, inputs, mode=self.mode)
def test_grad(self): for testname, inputs in self.grad.items(): inputs = [copy(input) for input in inputs] inputrs = [value(input) for input in inputs] try: utt.verify_grad(self.op, inputs) except: type, exc_value, traceback = sys.exc_info() err_msg = "Test %s::%s: Error occurred while computing the gradient on the following inputs: %s" \ % (self.op, testname, inputs) exc_value.args = exc_value.args + (err_msg, ) raise type, exc_value, traceback
460debbf46c41dbcd844a3347818877671d9d7ae /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12438/460debbf46c41dbcd844a3347818877671d9d7ae/test_basic.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9974, 12, 2890, 4672, 364, 1842, 529, 16, 4540, 316, 365, 18, 9974, 18, 3319, 13332, 4540, 273, 306, 3530, 12, 2630, 13, 364, 810, 316, 4540, 65, 316, 11938, 28007, 273, 306,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9974, 12, 2890, 4672, 364, 1842, 529, 16, 4540, 316, 365, 18, 9974, 18, 3319, 13332, 4540, 273, 306, 3530, 12, 2630, 13, 364, 810, 316, 4540, 65, 316, 11938, 28007, 273, 306,...
for tag, tag_value in tagged_values.items():
for tag_name, tag_value in tagged_values.items():
def permissionsDefinitions(self): """ return a list of dictionaries with permission definitions
80417bf8beb7c50c744178210856637b0ae6c9b1 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11941/80417bf8beb7c50c744178210856637b0ae6c9b1/WorkflowGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4371, 7130, 12, 2890, 4672, 3536, 327, 279, 666, 434, 16176, 598, 4132, 6377, 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, 4371, 7130, 12, 2890, 4672, 3536, 327, 279, 666, 434, 16176, 598, 4132, 6377, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
opcodes = diff2._get_opcodes(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
opcodes = Diff._get_opcodes(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'],
def test_grouped_opcodes_context1(self): opcodes = diff2._get_opcodes(['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H'], ['A', 'B', 'C', 'd', 'e', 'f', 'G', 'H']) groups = diff2._group_opcodes(opcodes, n=1) group = groups.next() self.assertEqual(('equal', 2, 3, 2, 3), group[0]) self.assertEqual(('replace', 3, 6, 3, 6), group[1]) self.assertEqual(('equal', 6, 8, 6, 8), group[2])
38e384d376102113c1e3a6caf204ad89dc23aa61 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/38e384d376102113c1e3a6caf204ad89dc23aa61/diff.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 25472, 67, 556, 7000, 67, 2472, 21, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 2187, 296, 39, 2187, 296, 40, 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, 1842, 67, 25472, 67, 556, 7000, 67, 2472, 21, 12, 2890, 4672, 1061, 7000, 273, 13008, 6315, 588, 67, 556, 7000, 12, 3292, 37, 2187, 296, 38, 2187, 296, 39, 2187, 296, 40, 2187, 296, ...
os.remove(self.path)
os.remove(self.path + '.dir') os.remove(self.path + '.dat') os.remove(self.path + '.bak')
def teardown(self): os.remove(self.path)
caf7f843fe05560c6027645b7ae8a9a5b58dd52e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1127/caf7f843fe05560c6027645b7ae8a9a5b58dd52e/testjobstores.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28196, 12, 2890, 4672, 1140, 18, 4479, 12, 2890, 18, 803, 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, 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, 28196, 12, 2890, 4672, 1140, 18, 4479, 12, 2890, 18, 803, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
SIPURI(self.credentials.uri.host), route, contact_uri, call_id=call_id,
SIPURI(self.credentials.uri.host), route, contact_uri=contact_uri, call_id=call_id,
def _make_and_send_request(self, contact_uri, route, timeout, do_register): prev_request = self._current_request or self._last_request if prev_request is not None: call_id = prev_request.call_id cseq = prev_request.cseq + 1 else: call_id = None cseq = 1 request = Request("REGISTER", self.credentials, self.credentials.uri, SIPURI(self.credentials.uri.host), route, contact_uri, call_id=call_id, cseq=cseq, extra_headers={"Expires": str(int(self.duration) if do_register else 0)}) self._notification_center.add_observer(self, sender=request) if self._current_request is not None: # we are trying to send something already, cancel whatever it is self._current_request.terminate() self._current_request = None try: request.send(timeout=timeout) except: self._notification_center.remove_observer(self, sender=request) raise self._unregistering = not do_register self._current_request = request
0af9a78e8f1386a4089ce836e299fc410d6029ee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/0af9a78e8f1386a4089ce836e299fc410d6029ee/primitives.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 464, 67, 4661, 67, 2293, 12, 2890, 16, 5388, 67, 1650, 16, 1946, 16, 2021, 16, 741, 67, 4861, 4672, 2807, 67, 2293, 273, 365, 6315, 2972, 67, 2293, 578, 365, 6315, 272...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6540, 67, 464, 67, 4661, 67, 2293, 12, 2890, 16, 5388, 67, 1650, 16, 1946, 16, 2021, 16, 741, 67, 4861, 4672, 2807, 67, 2293, 273, 365, 6315, 2972, 67, 2293, 578, 365, 6315, 272...
print 'Content-type: text/html\n'
charset = Utils.GetCharSet(mlist.preferred_language) print 'Content-type: text/html; charset=' + charset + '\n\n'
def loginpage(mlist, scriptname, msg='', frontpage=None): url = mlist.GetScriptURL(scriptname) if frontpage: actionurl = url else: actionurl = Utils.GetRequestURI(url) if msg: msg = FontAttr(msg, color='#ff0000', size='+1').Format() print 'Content-type: text/html\n' print Utils.maketext( # Should really be admlogin.html :/ 'admlogin.txt', {'listname': mlist.real_name, 'path' : actionurl, 'message' : msg, })
6b0b92ba1b12cbac6eaa3ec633feaad143b18355 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/6b0b92ba1b12cbac6eaa3ec633feaad143b18355/Auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 2433, 12, 781, 376, 16, 2728, 529, 16, 1234, 2218, 2187, 6641, 2433, 33, 7036, 4672, 880, 273, 312, 1098, 18, 967, 3651, 1785, 12, 4263, 529, 13, 309, 6641, 2433, 30, 1301, 718, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3925, 2433, 12, 781, 376, 16, 2728, 529, 16, 1234, 2218, 2187, 6641, 2433, 33, 7036, 4672, 880, 273, 312, 1098, 18, 967, 3651, 1785, 12, 4263, 529, 13, 309, 6641, 2433, 30, 1301, 718, ...
Return type of the last xref obtained by [RD]first/next[B0] functions.
Return type of the last xref obtained by [RD]first/next[B0] functions.
def XrefType(): """ Return type of the last xref obtained by [RD]first/next[B0] functions. @return: constants fl_* or dr_* """ raise DeprecatedIDCError, "use XrefsFrom() XrefsTo() from idautils instead."
f6eb09ba783822659c8520f1385c89f40cdd4a71 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6984/f6eb09ba783822659c8520f1385c89f40cdd4a71/idc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1139, 1734, 559, 13332, 3536, 2000, 618, 434, 326, 1142, 15187, 12700, 635, 306, 20403, 65, 3645, 19, 4285, 63, 38, 20, 65, 4186, 18, 225, 632, 2463, 30, 6810, 1183, 67, 14, 578, 5081,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1139, 1734, 559, 13332, 3536, 2000, 618, 434, 326, 1142, 15187, 12700, 635, 306, 20403, 65, 3645, 19, 4285, 63, 38, 20, 65, 4186, 18, 225, 632, 2463, 30, 6810, 1183, 67, 14, 578, 5081,...
user_permissions = UserPermission.objects.filter(username = request.session.get('user_id')) districts = District.objects.none() for user_permission in user_permissions: if(user_permission.role=='A'): districts = districts | District.objects.all() if(user_permission.role=='D'): states = State.objects.filter(region = user_permission.region_operated) districts = districts | District.objects.filter(state__in = states) if(user_permission.role=='F'): districts = districts | District.objects.filter(district_name = user_permission.district_operated) return districts
user_permissions = UserPermission.objects.filter(username = request.session.get('user_id')) districts = District.objects.none() for user_permission in user_permissions: if(user_permission.role=='A'): districts = districts | District.objects.all() if(user_permission.role=='D'): states = State.objects.filter(region = user_permission.region_operated) districts = districts | District.objects.filter(state__in = states) if(user_permission.role=='F'): districts = districts | District.objects.filter(district_name = user_permission.district_operated) return districts
def get_user_districts(request): user_permissions = UserPermission.objects.filter(username = request.session.get('user_id')) districts = District.objects.none() for user_permission in user_permissions: if(user_permission.role=='A'): districts = districts | District.objects.all() if(user_permission.role=='D'): states = State.objects.filter(region = user_permission.region_operated) districts = districts | District.objects.filter(state__in = states) if(user_permission.role=='F'): districts = districts | District.objects.filter(district_name = user_permission.district_operated) return districts
7759d6eb08a7e6568691e648ed314450c8afa48e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11995/7759d6eb08a7e6568691e648ed314450c8afa48e/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 1355, 67, 22602, 87, 12, 2293, 4672, 729, 67, 9612, 273, 2177, 5041, 18, 6911, 18, 2188, 12, 5053, 273, 590, 18, 3184, 18, 588, 2668, 1355, 67, 350, 26112, 1015, 5792, 87, 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, 336, 67, 1355, 67, 22602, 87, 12, 2293, 4672, 729, 67, 9612, 273, 2177, 5041, 18, 6911, 18, 2188, 12, 5053, 273, 590, 18, 3184, 18, 588, 2668, 1355, 67, 350, 26112, 1015, 5792, 87, 2...
""" Fail unless the two objects are identical
""" Fail unless the two objects are identical.
def failUnlessIs(self, first, second, msg=None): """ Fail unless the two objects are identical
f197f660de27f119c9000bdd2c634e6960ce4fd0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4939/f197f660de27f119c9000bdd2c634e6960ce4fd0/scaffold.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2321, 984, 2656, 2520, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 8911, 3308, 326, 2795, 2184, 854, 12529, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 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, 2321, 984, 2656, 2520, 12, 2890, 16, 1122, 16, 2205, 16, 1234, 33, 7036, 4672, 3536, 8911, 3308, 326, 2795, 2184, 854, 12529, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
typeinfo_name = 'CMFDefault: Document (Document)')
typeinfo_name = 'CMFDefault: Document')
def commonAfterSetUp(self): portal = self.portal # create the Database Adaptor (DA) if self.db_name == 'Postgre': portal.manage_addProduct['ZPsycopgDA'].manage_addZPsycopgConnection( id = connection_id, title = 'PostgreSQL Archetypes Storage', connection_string = connectors[self.db_name], zdatetime = 1, check = 1) elif self.db_name == 'MySQL': portal.manage_addProduct['ZMySQLDA'].manage_addZMySQLConnection( id = connection_id, title = 'MySQL Archetypes Storage', connection_string = connectors[self.db_name], check = 1) elif self.db_name == 'Gadfly': portal.manage_addProduct['ZGadflyDA'].manage_addZGadflyConnection( id = connection_id, title = 'Gadfly Archetypes Storage', connection = connectors[self.db_name], check = 1) # add type information for Dummy tt = portal.portal_types tt.manage_addTypeInformation( FactoryTypeInformation.meta_type, id = 'Dummy', typeinfo_name = 'CMFDefault: Document (Document)') # set archetype_tool default connection at = getToolByName(portal, TOOL_NAME) at.setDefaultConn(connection_id) # create storage instance and schema storage_class = getattr(SQLStorage, self.db_name + 'SQLStorage') gen_dummy(storage_class) self._storage_class = storage_class # create a object instance obj = Dummy(oid = 'dummy') portal._setObject('dummy', obj) obj = getattr(portal, 'dummy') self._dummy = obj # set meta_type for renaming obj.__factory_meta_type__ = 'Archetypes Content' # Is It really needed? obj.meta_type = 'Archetypes Content'
5b73d9d96dccae6374f8e655859eba4f03f956f4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12165/5b73d9d96dccae6374f8e655859eba4f03f956f4/test_sqlstorage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2975, 4436, 694, 1211, 12, 2890, 4672, 225, 11899, 273, 365, 18, 24386, 225, 468, 752, 326, 5130, 22792, 280, 261, 9793, 13, 309, 365, 18, 1966, 67, 529, 422, 296, 3349, 11556, 4278, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2975, 4436, 694, 1211, 12, 2890, 4672, 225, 11899, 273, 365, 18, 24386, 225, 468, 752, 326, 5130, 22792, 280, 261, 9793, 13, 309, 365, 18, 1966, 67, 529, 422, 296, 3349, 11556, 4278, 1...
if reader is not None and \ reader.encryption_meta.is_encrypted(raster_cover): return
def get_cover(opf, opf_path, stream, reader=None): import posixpath from calibre.ebooks import render_html_svg_workaround from calibre.utils.logging import default_log raster_cover = opf.raster_cover stream.seek(0) zf = ZipFile(stream) if raster_cover: if reader is not None and \ reader.encryption_meta.is_encrypted(raster_cover): return base = posixpath.dirname(opf_path) cpath = posixpath.normpath(posixpath.join(base, raster_cover)) try: member = zf.getinfo(cpath) except: pass else: f = zf.open(member) data = f.read() f.close() zf.close() return data cpage = opf.first_spine_item() if not cpage: return if reader is not None and reader.encryption_meta.is_encrypted(cpage): return with TemporaryDirectory('_epub_meta') as tdir: with CurrentDir(tdir): zf.extractall() opf_path = opf_path.replace('/', os.sep) cpage = os.path.join(tdir, os.path.dirname(opf_path), cpage) if not os.path.exists(cpage): return return render_html_svg_workaround(cpage, default_log)
8a4f0d80a3359bc3f2f5a0b543fd1405c6ccf4b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/8a4f0d80a3359bc3f2f5a0b543fd1405c6ccf4b9/epub.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3165, 12, 556, 74, 16, 1061, 74, 67, 803, 16, 1407, 16, 2949, 33, 7036, 4672, 1930, 16366, 803, 628, 26139, 266, 18, 73, 12567, 1930, 1743, 67, 2620, 67, 11451, 67, 1252, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 3165, 12, 556, 74, 16, 1061, 74, 67, 803, 16, 1407, 16, 2949, 33, 7036, 4672, 1930, 16366, 803, 628, 26139, 266, 18, 73, 12567, 1930, 1743, 67, 2620, 67, 11451, 67, 1252, 12...
return S_OK((fids,lfns)) def __getFileIDsForLfns(self,lfns,connection=False):
return S_OK( ( fids, lfns ) ) def __getFileIDsForLfns( self, lfns, connection = False ):
def __getAllFileIDs(self,connection=False): """ Get all the fileIDs for the supplied list of lfns """ req = "SELECT LFN,FileID FROM DataFiles;" res = self._query(req,connection) if not res['OK']: return res fids = {} lfns = {} for lfn,fileID in res['Value']: fids[fileID] = lfn lfns[lfn] = fileID return S_OK((fids,lfns))
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1595, 812, 5103, 12, 2890, 16, 4071, 33, 8381, 4672, 3536, 968, 777, 326, 585, 5103, 364, 326, 4580, 666, 434, 18594, 2387, 3536, 1111, 273, 315, 4803, 18803, 50, 16, 812, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1595, 812, 5103, 12, 2890, 16, 4071, 33, 8381, 4672, 3536, 968, 777, 326, 585, 5103, 364, 326, 4580, 666, 434, 18594, 2387, 3536, 1111, 273, 315, 4803, 18803, 50, 16, 812, 7...
return server._refresh() return defer.succeed(None)
try: yield server._refresh() except: yield self._delServer(name)
def _refreshServer(self, name): if hasattr(self, name): server = getattr(self, name) return server._refresh() return defer.succeed(None)
375a836d99fda7e94fd3e2bc4d60708c52cfeab9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9965/375a836d99fda7e94fd3e2bc4d60708c52cfeab9/wrappers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 9144, 2081, 12, 2890, 16, 508, 4672, 309, 3859, 12, 2890, 16, 508, 4672, 1438, 273, 3869, 12, 2890, 16, 508, 13, 327, 1438, 6315, 9144, 1435, 327, 2220, 18, 87, 5286, 5288, 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, 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, 9144, 2081, 12, 2890, 16, 508, 4672, 309, 3859, 12, 2890, 16, 508, 4672, 1438, 273, 3869, 12, 2890, 16, 508, 13, 327, 1438, 6315, 9144, 1435, 327, 2220, 18, 87, 5286, 5288, 12, ...
help=_('Show copyright information'))]
help=_('show copyright information and exit')), make_option('--authors', action='callback', callback=print_authors, help=_('show author information and exit'))]
def _get_cmd_function(self, arg): """Returns the function for `arg`""" if arg.startswith('--'): # strip of the first to shlashes name = '_cmd_%s' % arg[2:] # and replace remaining slashes with underscores name = name.replace('-', '_') function = getattr(self, name) return function
4a1b0e39c0e8f9263a36e8e53943e18224245734 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2215/4a1b0e39c0e8f9263a36e8e53943e18224245734/tel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 358,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4172, 67, 915, 12, 2890, 16, 1501, 4672, 3536, 1356, 326, 445, 364, 1375, 3175, 68, 8395, 309, 1501, 18, 17514, 1918, 2668, 413, 11, 4672, 468, 2569, 434, 326, 1122, 358,...
value[field] = field_value
if self._columns[field]._type in ('many2one', 'one2one'): obj = self.pool.get(self._columns[field]._obj) if not obj.search(cr, uid, [('id', '=', field_value)]): continue if self._columns[field]._type in ('one2many', 'many2many'): obj = self.pool.get(self._columns[field]._obj) obj_ids = obj.search(cr, uid, [('id', 'in', field_value)]) field_value = obj_ids value[field] = field_value
def default_get(self, cr, uid, fields, context=None): if not context: context={} value = {} # get the default values for the inherited fields for t in self._inherits.keys(): value.update(self.pool.get(t).default_get(cr, uid, fields, context))
c51ac0093d1781c86ceb00f8c420d23fb1dfa901 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7397/c51ac0093d1781c86ceb00f8c420d23fb1dfa901/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 460, 273, 2618, 468, 336, 326, 805, 924, 364, 326, 12078, 1466, 364, 268...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 805, 67, 588, 12, 2890, 16, 4422, 16, 4555, 16, 1466, 16, 819, 33, 7036, 4672, 309, 486, 819, 30, 819, 12938, 460, 273, 2618, 468, 336, 326, 805, 924, 364, 326, 12078, 1466, 364, 268...
out.write(" (head %s)\n" % (vec2str(bone.head['BONESPACE']),))
out.write(" (head %s)\n" % (vec2str(64*bone.head['BONESPACE']),))
def export_armature(out, armature): out.write(";; -*- scheme -*-\n") out.write("(armature\n") out.write(" (name \"%s\")\n" % armature.name) out.write(" (bones\n") for bone in armature.bones.values(): if bone.name[:3] == "IK_": # ignore helper bones out.write(" ;; ignoring bone: %s\n" % bone.name) out.write("\n") else: if bone.parent: out.write(" (bone\n") else: out.write(" (bone ;; a root bone\n") out.write(" (name \"%s\")\n" % bone.name) out.write(" (children %s)\n" % list2str(map(lambda b: b.name, bone.children))) # If a bone lacks parent its head is in armature space, # else in local bonespace if bone.parent: out.write(" (parent \"%s\")\n" % bone.parent.name) out.write(" (head %s)\n" % (vec2str(bone.head['BONESPACE']),)) else: out.write(" (parent )\n") out.write(" (head %s)\n" % (vec2str(bone.head['ARMATURESPACE']),)) out.write(" (length %s)\n" % (bone.length*64)) out.write(" (matrix %s)\n" % matrix2str(" "*16, bone.matrix['BONESPACE'])) out.write(" (quat %s)\n" % quat2str(bone.matrix['BONESPACE'].toQuat())) out.write(" (euler %s)\n" % euler2str(bone.matrix['BONESPACE'].toEuler())) # out.write("### BoneSpace:" # out.write(bone.matrix['BONESPACE'] # print # out.write(" ArmatureSpace:" # out.write(bone.matrix['ARMATURESPACE'] out.write(" )\n\n") out.write(" ) ;; bones\n") out.write(" ) ;; armature\n")
559b49f03654ec3d2ae10f82ed05e0a4ef82d62d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2372/559b49f03654ec3d2ae10f82ed05e0a4ef82d62d/bone_export.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 4610, 1231, 12, 659, 16, 23563, 1231, 4672, 596, 18, 2626, 2932, 25708, 300, 14, 17, 4355, 300, 14, 6943, 82, 7923, 596, 18, 2626, 2932, 12, 4610, 1231, 64, 82, 7923, 596, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 4610, 1231, 12, 659, 16, 23563, 1231, 4672, 596, 18, 2626, 2932, 25708, 300, 14, 17, 4355, 300, 14, 6943, 82, 7923, 596, 18, 2626, 2932, 12, 4610, 1231, 64, 82, 7923, 596, ...
this = apply(_quickfix.new_CalculatedCcyLastQty, args)
this = _quickfix.new_CalculatedCcyLastQty(*args)
def __init__(self, *args): this = apply(_quickfix.new_CalculatedCcyLastQty, args) try: self.this.append(this) except: self.this = this
7e632099fd421880c8c65fb0cf610d338d115ee9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8819/7e632099fd421880c8c65fb0cf610d338d115ee9/quickfix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 4844, 690, 39, 2431, 3024, 53, 4098, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 4672, 333, 273, 389, 19525, 904, 18, 2704, 67, 4844, 690, 39, 2431, 3024, 53, 4098, 30857, 1968, 13, 775, 30, 365, 18, 2211, 18, 6923, 12, 2...
obj = cls( )
obj = object.__new__( cls )
def create(cls , specgrid , zcorn , coord , actnum , mapaxes = None ): obj = cls( ) gridhead = ecl_kw.EclKW.new( "GRIDHEAD" , 4 , 3 ) gridhead[0] = 1 for i in (range(3)): gridhead[i+1] = specgrid[i]
d01f86d13f8bb053a33fddc24986fef7c80cd517 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10268/d01f86d13f8bb053a33fddc24986fef7c80cd517/ecl_grid.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 12, 6429, 269, 857, 5222, 269, 998, 3850, 82, 269, 2745, 269, 1328, 2107, 269, 852, 10855, 273, 599, 262, 30, 1081, 273, 733, 16186, 2704, 972, 12, 2028, 262, 3068, 1978, 273, 425...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12, 6429, 269, 857, 5222, 269, 998, 3850, 82, 269, 2745, 269, 1328, 2107, 269, 852, 10855, 273, 599, 262, 30, 1081, 273, 733, 16186, 2704, 972, 12, 2028, 262, 3068, 1978, 273, 425...
timeouts = (timeout*1000, 0, timeout*1000, 0, 0)
timeouts = (0, 0, timeout*1000, 0, timeout*1000)
def __init__(self, port, #number of device, numbering starts at #zero. if everything fails, the user #can specify a device string, note #that this isn't portable anymore baudrate=9600, #baudrate bytesize=EIGHTBITS, #number of databits parity=PARITY_NONE, #enable parity checking stopbits=STOPBITS_ONE, #number of stopbits timeout=None, #set a timeout value, None for waiting forever xonxoff=0, #enable software flow control rtscts=0, #enable RTS/CTS flow control ): """initialize comm port"""
b1fc8fc41e22552a48d101be35223167ab3cb746 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10955/b1fc8fc41e22552a48d101be35223167ab3cb746/serialwin32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 5375, 468, 2696, 434, 2346, 16, 1300, 310, 2542, 622, 468, 7124, 18, 309, 7756, 6684, 16, 326, 729, 468, 4169, 4800, 279, 2346, 533, 16, 4721, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 16, 5375, 468, 2696, 434, 2346, 16, 1300, 310, 2542, 622, 468, 7124, 18, 309, 7756, 6684, 16, 326, 729, 468, 4169, 4800, 279, 2346, 533, 16, 4721, ...
curdisk.clear()
del(curdisk) curdisk = list()
def set_disk_layout(self, vm): if vm.part == '': if vm.hypervisor.preferred_storage == VMBuilder.hypervisor.STORAGE_FS_IMAGE: vm.add_filesystem(size='%dM' % vm.rootsize, type='ext3', mntpnt='/') vm.add_filesystem(size='%dM' % vm.swapsize, type='swap', mntpnt=None) if vm.optsize > 0: vm.add_filesystem(size='%dM' % optsize, type='ext3', mntpnt='/opt') else: size = vm.rootsize + vm.swapsize + vm.optsize disk = vm.add_disk(size='%dM' % size) offset = 0 disk.add_part(offset, vm.rootsize, 'ext3', '/') offset += vm.rootsize disk.add_part(offset, vm.swapsize, 'swap', 'swap') offset += vm.swapsize if vm.optsize > 0: disk.add_part(offset, vm.optsize, 'ext3', '/opt') else: # We need to parse the file specified if vm.hypervisor.preferred_storage == VMBuilder.hypervisor.STORAGE_FS_IMAGE: try: for x in file (vm.part): pair = x.strip().split(' ',1) if pair[0] == 'root': vm.add_filesystem(size='%dM' % int(pair[1]), type='ext3', mntpnt='/') elif pair[0] == 'swap': vm.add_filesystem(size='%dM' % int(pair[1]), type='swap', mntpnt=None) #elif pair[0] == '---': # not much to do in this case as I do not know how to handle # multi disk on xen type storage. Help welcome :) else: vm.add_filesystem(size='%dM' % int(pair[1]), type='ext3', mntpnt=pair[0]) except IOError: vm.optparser.error("Error %s parsing %s: %s" % (errno, vm.part, strerror)) else: try: curdisk = dict() size = 0 for x in file(vm.part): pair = x.strip().split(' ',1) if pair[0] == '---': self.do_disk(vm, curdisk, size) curdisk.clear() size = 0 elif pair[0] != '': logging.debug("part: %s, size: %d" % (pair[0], int(pair[1]))) curdisk[pair[0]] = pair[1] size += int(pair[1])
ce089bf64685deca7fc8ba6d0a7ff0950b4bb989 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1496/ce089bf64685deca7fc8ba6d0a7ff0950b4bb989/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 10863, 67, 6741, 12, 2890, 16, 4268, 4672, 309, 4268, 18, 2680, 422, 875, 30, 309, 4268, 18, 17203, 10227, 18, 23616, 67, 5697, 422, 8251, 1263, 18, 17203, 10227, 18, 19009, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 10863, 67, 6741, 12, 2890, 16, 4268, 4672, 309, 4268, 18, 2680, 422, 875, 30, 309, 4268, 18, 17203, 10227, 18, 23616, 67, 5697, 422, 8251, 1263, 18, 17203, 10227, 18, 19009, 6...
return Application.generic_run(self)
return generic_run(self)
def run(self): return Application.generic_run(self)
3309f17a1fbf226cd9b1dfebc975a8e24f945678 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7167/3309f17a1fbf226cd9b1dfebc975a8e24f945678/Applications.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 327, 4257, 18, 13540, 67, 2681, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 4672, 327, 4257, 18, 13540, 67, 2681, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self.stress.write('%20.10e%20.10e%20.10e' % v*(10.0*GPA)/at.cell_volume()) it += 1
self.stress.write('%20.10e%20.10e%20.10e\n' % tuple(v*(10.0*GPA)/at.cell_volume())) self.it += 1
def write(self, at):
aa058d12f01c015ff4496d1d7d2c6865e46f4066 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/aa058d12f01c015ff4496d1d7d2c6865e46f4066/sio2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 622, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 12, 2890, 16, 622, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
(milestone.encode('utf-8')))
(milestone.encode('utf-8'),))
def setMilestoneList(self, m, key): """Remove all milestones, set them to `m`""" self.assertNoTickets() c = self.db().cursor() c.execute("DELETE FROM milestone") for ms in m: milestone = ms[key] print " inserting milestone '%s'" % (milestone) c.execute("INSERT INTO milestone (name) VALUES (%s)", (milestone.encode('utf-8'))) self.db().commit()
bd2683d7d784b9e1b9c29a288e6a9e3b50174dd7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/bd2683d7d784b9e1b9c29a288e6a9e3b50174dd7/bugzilla2trac.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15430, 18270, 682, 12, 2890, 16, 312, 16, 498, 4672, 3536, 3288, 777, 312, 14849, 5322, 16, 444, 2182, 358, 1375, 81, 68, 8395, 365, 18, 11231, 2279, 6264, 2413, 1435, 225, 276, 273, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15430, 18270, 682, 12, 2890, 16, 312, 16, 498, 4672, 3536, 3288, 777, 312, 14849, 5322, 16, 444, 2182, 358, 1375, 81, 68, 8395, 365, 18, 11231, 2279, 6264, 2413, 1435, 225, 276, 273, 3...
self.nonce_count += 1
if nonce == self.last_nonce: self.nonce_count += 1 else: self.nonce_count = 1 self.last_nonce = nonce
def get_authorization(self, req, chal): try: realm = chal['realm'] nonce = chal['nonce'] qop = chal.get('qop') algorithm = chal.get('algorithm', 'MD5') # mod_digest doesn't send an opaque, even though it isn't # supposed to be optional opaque = chal.get('opaque', None) except KeyError: return None
648435c4061765059e6105e4c0b6badd9b0905b0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/648435c4061765059e6105e4c0b6badd9b0905b0/urllib2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 12218, 12, 2890, 16, 1111, 16, 462, 287, 4672, 775, 30, 11319, 273, 462, 287, 3292, 24056, 3546, 7448, 273, 462, 287, 3292, 12824, 3546, 1043, 556, 273, 462, 287, 18, 588, 266...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12218, 12, 2890, 16, 1111, 16, 462, 287, 4672, 775, 30, 11319, 273, 462, 287, 3292, 24056, 3546, 7448, 273, 462, 287, 3292, 12824, 3546, 1043, 556, 273, 462, 287, 18, 588, 266...
[(u'factory 1',None), (u'factory 2',None)]
[(u'factory 1',u''), (u'factory 2',u'')]
def test_csv_upload(self): self.failUnlessEqual( [(i.name, i.category) for i in Location.objects.all()], [(u'factory 1',None), (u'factory 2',None)] ) try: data = tempfile.TemporaryFile(mode='w+b') print >>data, 'name, category' print >>data, 'Test Location 1, cat1' print >>data, 'Test Location 2,' data.seek(0) response = self.client.post('/admin/input/location/', {'csv_file': data}) self.assertRedirects(response, '/admin/input/location/') finally: data.close() self.failUnlessEqual( [(i.name, i.category) for i in Location.objects.all()], [(u'factory 1',None), (u'factory 2',None), (u'Test Location 1',u'cat1'), (u'Test Location 2',u'')] )
ef3b3e55c3c8679797c231902beb75d716a1fc46 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8604/ef3b3e55c3c8679797c231902beb75d716a1fc46/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6715, 67, 6327, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 5812, 12, 306, 12, 77, 18, 529, 16, 277, 18, 4743, 13, 364, 277, 316, 7050, 18, 6911, 18, 454, 1435, 6487, 306, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 6715, 67, 6327, 12, 2890, 4672, 365, 18, 6870, 984, 2656, 5812, 12, 306, 12, 77, 18, 529, 16, 277, 18, 4743, 13, 364, 277, 316, 7050, 18, 6911, 18, 454, 1435, 6487, 306, ...
if class_.encoding & AMF3ObjectTypes.VALUE:
if class_.encoding & AMF3.VALUE:
def readObject(self): type = self.readInteger() if type & 0x01 == 0: return self.obj_refs[type >> 1] class_ref = (type >> 1) & 0x01 == 0 type >>= 2 if class_ref: class_ = self.class_refs[type] else: class_ = AMF3Class(); class_.name, class_.encoding, class_.attrs = self.readString(), (type & 0x03), [] type >>= 2 obj = self._created(AMF3Object(class_) if class_.name else AMF3Object(), self.obj_refs) if class_.encoding & AMF3.EXTERNALIZABLE: if not class_ref: self.class_refs.append(class_) obj.__amf_externalized_data = self.read() # TODO: implement externalizeable interface here else: if class_.encoding & AMF3ObjectTypes.VALUE: if not class_ref: self.class_refs.append(class_) attr = self.readString() while attr != '': class_.attrs.append(attr) setattr(obj, attr, self.read()) attr = self.readString() else: if not class_ref: for i in range(type): class_.attrs.append(self.readString()) self.class_refs.append(class_) for attr in class_.attrs: setattr(obj, attr, self.read()) return obj
9d03762f9f9b1af5f9ff43c01402b044f8e7a2b9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10498/9d03762f9f9b1af5f9ff43c01402b044f8e7a2b9/amf.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17362, 12, 2890, 4672, 618, 273, 365, 18, 896, 4522, 1435, 309, 618, 473, 374, 92, 1611, 422, 374, 30, 327, 365, 18, 2603, 67, 9316, 63, 723, 1671, 404, 65, 667, 67, 1734, 273, 261, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17362, 12, 2890, 4672, 618, 273, 365, 18, 896, 4522, 1435, 309, 618, 473, 374, 92, 1611, 422, 374, 30, 327, 365, 18, 2603, 67, 9316, 63, 723, 1671, 404, 65, 667, 67, 1734, 273, 261, ...
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/$PYTHONV/site-packages/panda3d.pth
echo "/usr/share/panda3d" > $RPM_BUILD_ROOT/usr/lib/PYTHONV/site-packages/panda3d.pth
def printUsage(): sys.exit("usage: maketarball [version]")
8bd6db44da649dd6fdbc553d5d3c634af77202f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/8bd6db44da649dd6fdbc553d5d3c634af77202f2/maketarball.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 5357, 13332, 2589, 18, 8593, 2932, 9167, 30, 29796, 278, 23846, 306, 1589, 4279, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1172, 5357, 13332, 2589, 18, 8593, 2932, 9167, 30, 29796, 278, 23846, 306, 1589, 4279, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
pass
listData += '<value>' + value + '</value>'
def syncToServer(dav, item): from Dav import DAV url = unicode(dav.url) # set them here, even though we have to set them again later item.sharedVersion = item._version kind = item.itsKind # build a giant property string and then do a PROPPATCH props = makePropString('kind', '//core', kind.itsPath) + \ makePropString('uuid', '//core', item.itsUUID.str16()) for (name, value) in item.iterAttributeValues(): # don't export these local attributes if name in ['etag', 'lastModified', 'sharedURL']: continue # the attribute's namespace is its path... namespace = kind.getAttribute(name).itsPath[0:-1] atype = item.getAttributeAspect(name, 'type') acard = item.getAttributeAspect(name, 'cardinality') if acard == 'list': listData = '' for i in value: if isinstance(i, Item): defaultURL = dav.url.join(i.itsUUID.str16()) durl = i.getAttributeValue('sharedURL', default=defaultURL) # mmm, recursion DAV(durl).put(i) listData += '<itemref>' + unicode(durl) + '</itemref>' else: # XXX TODO add literal list stuff here pass props += makePropString(name, namespace, listData) elif acard == 'single': if isinstance(value, Item): defaultURL = dav.url.join(i.itsUUID.str16()) durl = i.getAttributeValue('sharedURL', default=defaultURL) DAV(durl).put(value) props += makePropString(name, namespace, '<itemref>%s</itemref>' % (unicode(durl))) else: atypepath = "%s" % (atype.itsPath) props += makePropString(name, namespace, atype.makeString(value)) elif acard == 'dict': # XXX implement me pass else: raise Exception # # XXX refactor this code with the code above # if item.isItemOf(Globals.repository.findPath('//parcels/osaf/contentmodel/ItemCollection')): listData = '' for i in item: # mmm, recursion defaultURL = dav.url.join(i.itsUUID.str16()) durl = i.getAttributeValue('sharedURL', default=defaultURL) DAV(durl).put(i) listData += '<itemref>' + unicode(durl) + '</itemref>' props += makePropString('results', '//special/case', listData) # # End refactor # r = dav.newConnection().setprops2(url, props) #print url, r.status, r.reason #print r.read()
382c83efe50ff03d6c701005d031e962aecc3cfb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/382c83efe50ff03d6c701005d031e962aecc3cfb/Sync.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 774, 2081, 12, 20752, 16, 761, 4672, 628, 463, 842, 1930, 463, 5856, 880, 273, 5252, 12, 20752, 18, 718, 13, 225, 468, 444, 2182, 2674, 16, 5456, 11376, 732, 1240, 358, 444, 2182...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 774, 2081, 12, 20752, 16, 761, 4672, 628, 463, 842, 1930, 463, 5856, 880, 273, 5252, 12, 20752, 18, 718, 13, 225, 468, 444, 2182, 2674, 16, 5456, 11376, 732, 1240, 358, 444, 2182...
queryparser = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/QueryParser.py'
def generateDocs(options, outputDir): if options.verbose: verbosity = 4 else: verbosity = 1 if sys.platform == 'cygwin' or os.name == 'nt': chandlerdb = 'release/bin/Lib/site-packages/chandlerdb' queryparser = 'release/bin/Lib/site-packages/QueryParser.py' pyicu = 'release/bin/Lib/site-packages/PyICU.py' pylucene = 'release/bin/Lib/site-packages/PyLucene.py' elif sys.platform == 'darwin': chandlerdb = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/chandlerdb' queryparser = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/QueryParser.py' pyicu = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PyICU.py' pylucene = 'release/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/PyLucene.py' else: chandlerdb = 'release/lib/python2.4/site-packages/chandlerdb' queryparser = 'release/lib/python2.4/site-packages/QueryParser.py' pyicu = 'release/lib/python2.4/site-packages/PyICU.py' pylucene = 'release/lib/python2.4/site-packages/PyLucene.py' chandlerBin = os.getenv('CHANDLERBIN') chandlerdb = os.path.join(chandlerBin, chandlerdb) queryparser = os.path.join(chandlerBin, queryparser) pyicu = os.path.join(chandlerBin, pyicu) pylucene = os.path.join(chandlerBin, pylucene) targetDir = os.path.join(outputDir, 'api') if not os.path.isdir(targetDir): _mkdirs(targetDir) # This is the options dictionary # It is used by most of the epydoc routines and # the contents were determined by examining epydoc/gui.py # and epydoc/cli.py e_options = { 'target': targetDir, 'verbosity': verbosity, 'prj_name': 'Chandler', 'action': 'html', 'tests': { 'basic': 1 }, 'show_imports': 0, 'frames': 1, 'private': 0, 'debug': 0, 'docformat': None, 'top': None, 'inheritance': "listed", 'alphabetical': 1, 'ignore_param_mismatch': 1, 'list_classes_separately': 0, 'modules': ['application', 'i18n', 'parcels/feeds', 'parcels/osaf', 'parcels/osaf/app', 'parcels/osaf/examples', 'parcels/osaf/framework', 'parcels/osaf/mail', 'parcels/osaf/pim', 'parcels/osaf/servlets', 'parcels/osaf/sharing', 'parcels/osaf/tests', 'parcels/osaf/views', 'parcels/photos', 'repository', 'samples/skeleton', 'tools', 'util', 'Chandler.py', 'version.py', chandlerdb, # This comes from internal queryparser, # This comes from external pyicu, # This comes from external pylucene, # This comes from external ], } # based on the code in epydoc's gui.py # with subtle changes made to make it work :) from epydoc.html import HTMLFormatter from epydoc.objdoc import DocMap, report_param_mismatches from epydoc.imports import import_module, find_modules from epydoc.objdoc import set_default_docformat set_default_docformat('epytext') try: modules = [] module_names = e_options['modules'] # walk thru list of modules and expand # any packages found for name in module_names[:]: if os.path.isdir(name): index = module_names.index(name) new_modules = find_modules(name) if new_modules: module_names[index:index+1] = new_modules elif options.verbose: print 'Error: %s is not a package' % name # basic regex to exclude directories from consideration exc = re.compile(".*tests.*|.*scripts.*") for name in module_names: if exc.match(name): continue if options.verbose: print 'IMPORT: %s' % name # try importing the module and # add it to the list if successful try: module = import_module(name) if module not in modules: modules.append(module) elif options.verbose: print ' (duplicate)' except ImportError, e: if options.verbose: print e if len(modules) == 0: print 'Error: no modules successfully loaded!' sys.exit(1) document_bases = 1 document_autogen_vars = 1 inheritance_groups = (e_options['inheritance'] == 'grouped') inherit_groups = (e_options['inheritance'] != 'grouped') # let epydoc create an empty document map d = DocMap(verbosity, document_bases, document_autogen_vars, inheritance_groups, inherit_groups) # walk the module list and let epydoc build the documentation for (module, num) in zip(modules, range(len(modules))): if options.verbose: print '\n***Building docs for %s***' % module.__name__ try: d.add(module) except Exception, e: print "Internal Error: %s" % e except: print "Internal Error" if not e_options['ignore_param_mismatch']: if not report_param_mismatches(d): print ' (To supress these warnings, use --ignore-param-mismatch)' htmldoc = HTMLFormatter(d, **e_options) numfiles = htmldoc.num_files() def progress_callback(path): (dir, file) = os.path.split(path) (root, d) = os.path.split(dir) if d in ('public', 'private'): fname = os.path.join(d, file) else: fname = file if options.verbose: print '\n***Writing %s***' % fname # Write the documentation. print "\n***Saving to %s" % targetDir htmldoc.write(targetDir, progress_callback) except Exception, e: print 'Internal error: ', e raise except: raise
fb002db03d47b9ce762eb7c6c81d990b789b7a03 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/fb002db03d47b9ce762eb7c6c81d990b789b7a03/gen_docs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12656, 12, 2116, 16, 21412, 4672, 309, 702, 18, 11369, 30, 11561, 273, 1059, 469, 30, 11561, 273, 404, 225, 309, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 11, 578, 1140, 18, 529,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12656, 12, 2116, 16, 21412, 4672, 309, 702, 18, 11369, 30, 11561, 273, 1059, 469, 30, 11561, 273, 404, 225, 309, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 11, 578, 1140, 18, 529,...
xsize = int((lrx - ulx) / geotransform[1]) ysize = int((lry - uly) / geotransform[5])
xsize = int((lrx - ulx) / geotransform[1] + 0.5) ysize = int((lry - uly) / geotransform[5] + 0.5)
def Usage(): print 'Usage: gdal_merge.py [-o out_filename] [-of out_format] [-co NAME=VALUE]*' print ' [-ps pixelsize_x pixelsize_y] [-separate] [-v] [-pct]' print ' [-ul_lr ulx uly lrx lry] [-n nodata_value] [-init value]' print ' [-ot datatype] [-createonly] input_files' print
b00dee5d2f1e88163e2359e795d6a610a6429260 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10289/b00dee5d2f1e88163e2359e795d6a610a6429260/gdal_merge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 1172, 296, 5357, 30, 15551, 287, 67, 2702, 18, 2074, 23059, 83, 596, 67, 3459, 65, 23059, 792, 596, 67, 2139, 65, 23059, 2894, 6048, 33, 4051, 65, 4035, 1172, 296, 5397, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10858, 13332, 1172, 296, 5357, 30, 15551, 287, 67, 2702, 18, 2074, 23059, 83, 596, 67, 3459, 65, 23059, 792, 596, 67, 2139, 65, 23059, 2894, 6048, 33, 4051, 65, 4035, 1172, 296, 5397, ...
print db.rjust(25),': Not installed'
print db.rjust( 25 ), ': Not installed'
def do_show(self,args): """ Add a record to the File Catalog usage: show software - show components for which software is available show installed - show components installed in the host show status - show status of the installed components show database - show the status of the databases show mysql - show the status of the MySQL server show log <system> <service|agent> show info - show version of software and setup """ argss = args.split() option = argss[0] del argss[0] if option == 'software': client = SystemAdministratorClient(self.host) result = client.getSoftwareComponents() if not result['OK']: print "ERROR:",result['Message'] else: serviceCount = 0 agentCount = 0 for compType in result['Value']: for system in result['Value'][compType]: for component in result['Value'][compType][system]: print compType.ljust(8),system.ljust(28),component.ljust(28) if compType == 'Services': serviceCount += 1 if compType == 'Agents': agentCount += 1 print "Total: %d services, %d agents" % (serviceCount,agentCount) elif option == 'installed': client = SystemAdministratorClient(self.host) result = client.getSetupComponents() if not result['OK']: print "ERROR:",result['Message'] else: serviceCount = 0 agentCount = 0 for compType in result['Value']: for system in result['Value'][compType]: for component in result['Value'][compType][system]: print compType.ljust(8),system.ljust(28),component.ljust(28) if compType == 'Services': serviceCount += 1 if compType == 'Agents': agentCount += 1 print "Total: %d services, %d agents" % (serviceCount,agentCount) elif option == 'status': client = SystemAdministratorClient(self.host) result = client.getOverallStatus() if not result['OK']: print "ERROR:",result['Message'] else: rDict = result['Value'] print " System",' '*20,'Name',' '*5,'Type',' '*23,'Setup Installed Runit Uptime PID' print '-'*116 for compType in rDict: for system in rDict[compType]: for component in rDict[compType][system]: if rDict[compType][system][component]['Installed']: print system.ljust(28),component.ljust(28),compType.lower()[:-1].ljust(7), if rDict[compType][system][component]['Setup']: print 'SetUp'.rjust(12), else: print 'NotSetup'.rjust(12), if rDict[compType][system][component]['Installed']: print 'Installed'.rjust(12), else: print 'NotInstalled'.rjust(12), print str(rDict[compType][system][component]['RunitStatus']).ljust(7), print str(rDict[compType][system][component]['Timeup']).rjust(7), print str(rDict[compType][system][component]['PID']).rjust(8), print elif option == 'database' or option == 'databases': client = SystemAdministratorClient(self.host) result = client.getDatabases(self.rootPwd) if not result['OK']: print "ERROR:",result['Message'] return if result.has_key('MySQLPassword'): self.rootPwd = result['MySQLPassword'] resultSW = client.getSoftwareDatabases() if not resultSW['OK']: print "ERROR:",resultSW['Message'] return sw = resultSW['Value'] installed = result['Value'] print for db in sw: if db in installed: print db.rjust(25),': Installed' else: print db.rjust(25),': Not installed' if not sw: print "No database found" elif option == 'mysql': client = SystemAdministratorClient(self.host) result = client.getMySQLStatus() if not result['OK']: print "ERROR:",result['Message'] elif result['Value']: for par,value in result['Value'].items(): print par.rjust(28),':',value else: print "No MySQL database found" elif option == "log": self.getLog(argss) elif option == "info": client = SystemAdministratorClient(self.host) result = client.getInfo() if not result['OK']: print "ERROR:",result['Message'] print "Setup:", result['Value']['Setup'] print "DIRAC version:",result['Value']['DIRAC'] if result['Value']['Extensions']: for e,v in result['Value']['Extensions'].items(): print "%s version" % e,v else: print "Unknown option:",option
b68208f4ea74e3c61aead9e641ff73054212c46c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/b68208f4ea74e3c61aead9e641ff73054212c46c/SystemAdministratorClientCLI.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4500, 12, 2890, 16, 1968, 4672, 3536, 1436, 279, 1409, 358, 326, 1387, 14953, 225, 4084, 30, 225, 2405, 17888, 1377, 300, 2405, 4085, 364, 1492, 17888, 353, 2319, 2405, 5876, 37...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 4500, 12, 2890, 16, 1968, 4672, 3536, 1436, 279, 1409, 358, 326, 1387, 14953, 225, 4084, 30, 225, 2405, 17888, 1377, 300, 2405, 4085, 364, 1492, 17888, 353, 2319, 2405, 5876, 37...
from trac.Browser import BrowserModule
from trac.versioncontrol.web_ui import BrowserModule
def render_macro(self, req, name, content): # args will be null if the macro is called without parenthesis. if not content: return '' # parse arguments # we expect the 1st argument to be a filename (filespec) args = content.split(',') if len(args) == 0: raise Exception("No argument.") filespec = args[0] size_re = re.compile('^[0-9]+%?$') align_re = re.compile('^(?:left|right|top|bottom)$') keyval_re = re.compile('^([-a-z0-9]+)([=:])(.*)') quoted_re = re.compile("^(?:&#34;|')(.*)(?:&#34;|')$") attr = {} style = {} for arg in args[1:]: arg = arg.strip() if size_re.search(arg): # 'width' keyword attr['width'] = arg continue if align_re.search(arg): # 'align' keyword attr['align'] = arg continue match = keyval_re.search(arg) if match: key = match.group(1) sep = match.group(2) val = match.group(3) m = quoted_re.search(val) # unquote &#34; character " if m: val = m.group(1) if sep == '=': attr[key] = val; elif sep == ':': style[key] = val
036f8356557b45a69ceb2ac5d9bf8910b5b561ab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/036f8356557b45a69ceb2ac5d9bf8910b5b561ab/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 468, 833, 903, 506, 446, 309, 326, 11522, 353, 2566, 2887, 22311, 18, 309, 486, 913, 30, 327, 875, 468, 1109, 1775, 468, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 468, 833, 903, 506, 446, 309, 326, 11522, 353, 2566, 2887, 22311, 18, 309, 486, 913, 30, 327, 875, 468, 1109, 1775, 468, ...
assert not namespace_module.namespaceGroupModule(), 'Error referencing %s from %s' % (namespace, self)
def referenceNamespace (self, namespace, module_type=None): assert module_type is None if pyxb.namespace.XMLSchema == namespace: return 'pyxb.namespace.XMLSchema' if isinstance(self, NamespaceModule) and (self.namespace() == namespace): return 'Namespace' namespace_module = self.ForNamespace(namespace) if namespace_module is None: return 'pyxb.namespace.NamespaceForURI(%s)' % (repr(namespace.uri()),) self._importModule(namespace_module) assert not namespace_module.namespaceGroupModule(), 'Error referencing %s from %s' % (namespace, self) return '%s.Namespace' % (namespace_module.modulePath(),)
afd1ba8b0b1795162d7736006ab1c8b1cac44ba9 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7171/afd1ba8b0b1795162d7736006ab1c8b1cac44ba9/generate.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2114, 3402, 261, 2890, 16, 1981, 16, 1605, 67, 723, 33, 7036, 4672, 1815, 1605, 67, 723, 353, 599, 309, 2395, 6114, 18, 4937, 18, 4201, 3078, 422, 1981, 30, 327, 296, 2074, 6114, 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, 2114, 3402, 261, 2890, 16, 1981, 16, 1605, 67, 723, 33, 7036, 4672, 1815, 1605, 67, 723, 353, 599, 309, 2395, 6114, 18, 4937, 18, 4201, 3078, 422, 1981, 30, 327, 296, 2074, 6114, 18, ...
gLogger.error(errStr,file) return S_ERROR(errStr)
gLogger.error( errStr, file ) return S_ERROR( errStr )
def putAndRegister(self,lfn,file,diracSE,guid=None,path=None,checksum=None,catalog=None): """ Put a local file to a Storage Element and register in the File Catalogues
9fabceb719d19d46d8b75011d2932552dbe360f9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9fabceb719d19d46d8b75011d2932552dbe360f9/ReplicaManager.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1378, 1876, 3996, 12, 2890, 16, 80, 4293, 16, 768, 16, 3211, 8836, 1090, 16, 14066, 33, 7036, 16, 803, 33, 7036, 16, 15149, 33, 7036, 16, 7199, 33, 7036, 4672, 3536, 4399, 279, 1191, ...
para_start = _BULLET_RE.match(lines[start], bullet_indent).end() bcontents = lines[start][bullet_indent:para_start].strip()
def _tokenize_listart(lines, start, bullet_indent, tokens, warnings): """ Construct L{Token}s for the bullet and the first paragraph of the list item (or field) starting at C{lines[start]}, and append them to C{tokens}. C{bullet_indent} should be the indentation of the list item. Any warnings generated while tokenizing will be appended to C{warnings}. @param lines: The list of lines to be tokenized @param start: The index into C{lines} of the first line of the list item to be tokenized. @param bullet_indent: The indentation of C{lines[start]}. This is the indentation of the list item. @param warnings: A list of the warnings generated by parsing. Any new warnings generated while will tokenizing this paragraph will be appended to this list. @return: The line number of the first line following the list item's first paragraph. @type lines: C{list} of C{string} @type start: C{int} @type bullet_indent: C{int} @type tokens: C{list} of L{Token} @type warnings: C{list} of L{ParseError} @rtype: C{int} """ linenum = start + 1 para_indent = None brace_level = lines[start].count('{') - lines[start].count('}') if brace_level < 0: brace_level = 0 while linenum < len(lines): # Find the indentation of this line. line = lines[linenum] indent = len(line) - len(line.lstrip()) # A blank line ends the token if indent == len(line): break # Dedenting past bullet_indent ends the list item. if indent < bullet_indent: break # A line beginning with a bullet ends the token. if brace_level == 0 and _LIST_BULLET_RE.match(line, indent): if para_indent and indent == para_indent: estr = ("Sublists should be indented or separated "+ "by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break brace_level += line.count('{') brace_level -= line.count('}') if brace_level < 0: brace_level = 0 if indent == bullet_indent: if brace_level == 0 and _BULLET_RE.match(line, indent): # Don't complain if it's a field.?? break else: estr = ("List item contents should be indented; "+ "Paragraphs should be separated from "+ "lists by blank lines.") warnings.append(TokenizationError(estr, linenum, line)) break # If this is the second line, set the paragraph indentation, or # end the token, as appropriate. if para_indent == None: para_indent = indent # A change in indentation ends the token if indent != para_indent: break # Go on to the next line. linenum += 1 # Add the bullet token. para_start = _BULLET_RE.match(lines[start], bullet_indent).end() bcontents = lines[start][bullet_indent:para_start].strip() tokens.append(Token(Token.BULLET, start, bcontents, bullet_indent)) # Add the paragraph token. pcontents = ([lines[start][para_start:].strip()] + [line.strip() for line in lines[start+1:linenum]]) pcontents = ' '.join(pcontents).strip() if pcontents: tokens.append(Token(Token.PARA, start, pcontents, para_indent)) # Return the linenum after the paragraph token ends. return linenum
151adf65fde535b5a72c9d869ebf835ce8123891 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/151adf65fde535b5a72c9d869ebf835ce8123891/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2316, 554, 67, 1098, 485, 12, 3548, 16, 787, 16, 31650, 67, 9355, 16, 2430, 16, 5599, 4672, 3536, 14291, 511, 95, 1345, 97, 87, 364, 326, 31650, 471, 326, 1122, 10190, 434, 326, ...
if self.frame is None or filename != filenames[self.frame]:
if self.frame is None or filename != filenames[self.frame] or filename is None:
def set_frame(self, frame=None, focus=False, init=False): if frame is None: frame = self.frame
1439ca317d3802bb6cf2a1035810de8de5833b0c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/1439ca317d3802bb6cf2a1035810de8de5833b0c/view.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 3789, 12, 2890, 16, 2623, 33, 7036, 16, 7155, 33, 8381, 16, 1208, 33, 8381, 4672, 309, 2623, 353, 599, 30, 2623, 273, 365, 18, 3789, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 444, 67, 3789, 12, 2890, 16, 2623, 33, 7036, 16, 7155, 33, 8381, 16, 1208, 33, 8381, 4672, 309, 2623, 353, 599, 30, 2623, 273, 365, 18, 3789, 2, -100, -100, -100, -100, -100, -100, -...
print vh
def previousRevision(self): """Return the revision id for the previous revision of this Page.""" vh = self.getVersionHistory(revCount=2) print vh return vh[1][0]
27c99c4a91bdb2dd91926c9b8bebd1fbb75a275a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/27c99c4a91bdb2dd91926c9b8bebd1fbb75a275a/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2416, 7939, 12, 2890, 4672, 3536, 990, 326, 6350, 612, 364, 326, 2416, 6350, 434, 333, 3460, 12123, 331, 76, 273, 365, 18, 588, 1444, 5623, 12, 9083, 1380, 33, 22, 13, 327, 331, 76, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2416, 7939, 12, 2890, 4672, 3536, 990, 326, 6350, 612, 364, 326, 2416, 6350, 434, 333, 3460, 12123, 331, 76, 273, 365, 18, 588, 1444, 5623, 12, 9083, 1380, 33, 22, 13, 327, 331, 76, ...
print 'HTTPS server started on port %d...' % server.server_port
print 'HTTPS server started on port %d...' % port
def main(options, args): logfile = open('testserver.log', 'w') sys.stdout = FileMultiplexer(sys.stdout, logfile) sys.stderr = FileMultiplexer(sys.stderr, logfile) port = options.port if options.server_type == SERVER_HTTP: if options.cert: # let's make sure the cert file exists. if not os.path.isfile(options.cert): print 'specified server cert file not found: ' + options.cert + \ ' exiting...' return for ca_cert in options.ssl_client_ca: if not os.path.isfile(ca_cert): print 'specified trusted client CA file not found: ' + ca_cert + \ ' exiting...' return server = HTTPSServer(('127.0.0.1', port), TestPageHandler, options.cert, options.ssl_client_auth, options.ssl_client_ca, options.ssl_bulk_cipher) print 'HTTPS server started on port %d...' % server.server_port else: server = StoppableHTTPServer(('127.0.0.1', port), TestPageHandler) print 'HTTP server started on port %d...' % server.server_port server.data_dir = MakeDataDir() server.file_root_url = options.file_root_url server._sync_handler = None listen_port = server.server_port # means FTP Server else: my_data_dir = MakeDataDir() # Instantiate a dummy authorizer for managing 'virtual' users authorizer = pyftpdlib.ftpserver.DummyAuthorizer() # Define a new user having full r/w permissions and a read-only # anonymous user authorizer.add_user('chrome', 'chrome', my_data_dir, perm='elradfmw') authorizer.add_anonymous(my_data_dir) # Instantiate FTP handler class ftp_handler = pyftpdlib.ftpserver.FTPHandler ftp_handler.authorizer = authorizer # Define a customized banner (string returned when client connects) ftp_handler.banner = ("pyftpdlib %s based ftpd ready." % pyftpdlib.ftpserver.__ver__) # Instantiate FTP server class and listen to 127.0.0.1:port address = ('127.0.0.1', port) server = pyftpdlib.ftpserver.FTPServer(address, ftp_handler) listen_port = server.socket.getsockname()[1] print 'FTP server started on port %d...' % listen_port # Notify the parent that we've started. (BaseServer subclasses # bind their sockets on construction.) if options.startup_pipe is not None: if sys.platform == 'win32': fd = msvcrt.open_osfhandle(options.startup_pipe, 0) else: fd = options.startup_pipe startup_pipe = os.fdopen(fd, "w") # Write the listening port as a 2 byte value. This is _not_ using # network byte ordering since the other end of the pipe is on the same # machine. startup_pipe.write(struct.pack('@H', listen_port)) startup_pipe.close() try: server.serve_forever() except KeyboardInterrupt: print 'shutting down server' server.stop = True
ea993c2cb08e5e8915b369fb17087d29776cad1f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/ea993c2cb08e5e8915b369fb17087d29776cad1f/testserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2116, 16, 833, 4672, 15204, 273, 1696, 2668, 3813, 3567, 18, 1330, 2187, 296, 91, 6134, 2589, 18, 10283, 273, 1387, 8438, 92, 264, 12, 9499, 18, 10283, 16, 15204, 13, 2589, 1...
def NAMESPACEE(self, args): """Returns the name of the namespace the current page resides in. (quoted)""" return urlquote(self.NAMESPACE(args))
NAMESPACEE = _quoted(NAMESPACE)
def NAMESPACEE(self, args): """Returns the name of the namespace the current page resides in. (quoted)""" return urlquote(self.NAMESPACE(args))
b84fcb106b1dc6f3f55e2c6f9bde6419128e9fba /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12391/b84fcb106b1dc6f3f55e2c6f9bde6419128e9fba/magics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18494, 41, 12, 2890, 16, 833, 4672, 3536, 1356, 326, 508, 434, 326, 1981, 326, 783, 1363, 400, 4369, 316, 18, 261, 15179, 15574, 327, 880, 6889, 12, 2890, 18, 11368, 12, 1968, 3719, 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, 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, 18494, 41, 12, 2890, 16, 833, 4672, 3536, 1356, 326, 508, 434, 326, 1981, 326, 783, 1363, 400, 4369, 316, 18, 261, 15179, 15574, 327, 880, 6889, 12, 2890, 18, 11368, 12, 1968, 3719, 2,...
print getruntime(),"Server Conn.",remoteip,remoteport
if DEBUG2: print getruntime(),"Server Conn.",remoteip,remoteport
def new_server(remoteip, remoteport, sock, thiscommhandle, listencommhandle): # DEBUG print getruntime(),"Server Conn.",remoteip,remoteport # Get the connection ID id = FORWARDER_STATE["Next_Conn_ID"] # Increment the global ID counter FORWARDER_STATE["Next_Conn_ID"] += 1 # Initialize the multiplexing socket with this socket mux = Multiplexer(sock, {"localip":FORWARDER_STATE["ip"], "localport":SERVER_PORT, "remoteip":remoteip, "remoteport":remoteport}) # Helper wrapper function def rpc_wrapper(remoteip, remoteport, client_sock, thiscommhandle, listencommhandle): new_rpc(id, client_sock) # Set the RPC waitforconn mux.waitforconn(RPC_VIRTUAL_IP, RPC_VIRTUAL_PORT, rpc_wrapper) # Create an entry for the server _connection_entry(id,sock,mux,remoteip,remoteport,"server")
e3dc312b8230075bb3de5f288eaa2936b99fd577 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7995/e3dc312b8230075bb3de5f288eaa2936b99fd577/forwarder_rpc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 394, 67, 3567, 12, 7222, 625, 16, 2632, 655, 16, 7313, 16, 333, 5702, 4110, 16, 6514, 5702, 4110, 4672, 468, 6369, 309, 6369, 22, 30, 1172, 336, 9448, 9334, 6, 2081, 6683, 1199, 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, 394, 67, 3567, 12, 7222, 625, 16, 2632, 655, 16, 7313, 16, 333, 5702, 4110, 16, 6514, 5702, 4110, 4672, 468, 6369, 309, 6369, 22, 30, 1172, 336, 9448, 9334, 6, 2081, 6683, 1199, 16, ...
def check_cdata_content(self):
def test_cdata_content(self):
def check_cdata_content(self): s = """<script> <!-- not a comment --> &not-an-entity-ref; </script>""" self._run_check(s, [ ("starttag", "script", []), ("data", " <!-- not a comment --> &not-an-entity-ref; "), ("endtag", "script"), ]) s = """<script> <not a='start tag'> </script>""" self._run_check(s, [ ("starttag", "script", []), ("data", " <not a='start tag'> "), ("endtag", "script"), ])
742542a88fb7dc018e41593629baf7f75f78c1e6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/742542a88fb7dc018e41593629baf7f75f78c1e6/test_htmlparser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 892, 67, 1745, 12, 2890, 4672, 272, 273, 3536, 32, 4263, 34, 5719, 413, 486, 279, 2879, 15431, 473, 902, 17, 304, 17, 1096, 17, 1734, 31, 7765, 4263, 2984, 3660, 365, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 71, 892, 67, 1745, 12, 2890, 4672, 272, 273, 3536, 32, 4263, 34, 5719, 413, 486, 279, 2879, 15431, 473, 902, 17, 304, 17, 1096, 17, 1734, 31, 7765, 4263, 2984, 3660, 365, 6...
self.connect(self, SIGNAL('editTextChanged(QString)'), self.text_edited_slot)
def initialize(self, opt_name, colorize=False, help_text=_('Search')): self.as_you_type = config['search_as_you_type'] self.opt_name = opt_name self.addItems(QStringList(list(set(config[opt_name])))) self.help_text = help_text self.colorize = colorize self.clear_to_help() self.connect(self, SIGNAL('editTextChanged(QString)'), self.text_edited_slot)
544b4648e115ccda84344bf2aec0dde18d661973 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9125/544b4648e115ccda84344bf2aec0dde18d661973/search_box.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 2153, 67, 529, 16, 21077, 33, 8381, 16, 2809, 67, 955, 33, 67, 2668, 2979, 26112, 30, 365, 18, 345, 67, 19940, 67, 723, 273, 642, 3292, 3072, 67, 345, 67, 19940, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 2890, 16, 2153, 67, 529, 16, 21077, 33, 8381, 16, 2809, 67, 955, 33, 67, 2668, 2979, 26112, 30, 365, 18, 345, 67, 19940, 67, 723, 273, 642, 3292, 3072, 67, 345, 67, 19940, ...
while current_rev:
while current_rev is not None:
def sync(self): self.log.debug("Checking whether sync with repository is needed") youngest_stored = self.repos.get_youngest_rev_in_cache(self.db) if youngest_stored != str(self.repos.youngest_rev): kindmap = dict(zip(_kindmap.values(), _kindmap.keys())) actionmap = dict(zip(_actionmap.values(), _actionmap.keys())) self.log.info("Syncing with repository (%s to %s)" % (youngest_stored, self.repos.youngest_rev)) cursor = self.db.cursor() if youngest_stored: current_rev = self.repos.next_rev(youngest_stored) else: current_rev = self.repos.oldest_rev while current_rev: changeset = self.repos.get_changeset(current_rev) cursor.execute("INSERT INTO revision (rev,time,author,message) " "VALUES (%s,%s,%s,%s)", (current_rev, changeset.date, changeset.author, changeset.message)) for path,kind,action,base_path,base_rev in changeset.get_changes(): self.log.debug("Caching node change in [%s]: %s" % (current_rev, (path, kind, action, base_path, base_rev))) kind = kindmap[kind] action = actionmap[action] cursor.execute("INSERT INTO node_change (rev,path,kind," "change,base_path,base_rev) " "VALUES (%s,%s,%s,%s,%s,%s)", (current_rev, path, kind, action, base_path, base_rev)) current_rev = self.repos.next_rev(current_rev) self.db.commit()
7916e509f30f1d1c4c9fb71bfb6656b63152336e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2831/7916e509f30f1d1c4c9fb71bfb6656b63152336e/cache.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 2890, 4672, 365, 18, 1330, 18, 4148, 2932, 14294, 2856, 3792, 598, 3352, 353, 3577, 7923, 677, 465, 17592, 67, 22601, 273, 365, 18, 15564, 18, 588, 67, 93, 465, 17592, 67, 90...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 2890, 4672, 365, 18, 1330, 18, 4148, 2932, 14294, 2856, 3792, 598, 3352, 353, 3577, 7923, 677, 465, 17592, 67, 22601, 273, 365, 18, 15564, 18, 588, 67, 93, 465, 17592, 67, 90...
for vec,color in [ (V(1,0,0),red), (V(0,1,0),green), (V(0,0,1),blue) ]:
for vec, color in [ (V(1,0,0), red), (V(0,1,0), green), (V(0,0,1), blue) ]:
def trans(screenpos): return glpane.pov + oldquat.unrot(screenpos)
55ac4fdc2a170bd52fcbe417587721669a976b6f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11221/55ac4fdc2a170bd52fcbe417587721669a976b6f/test_animation_mode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 906, 12, 9252, 917, 4672, 327, 5118, 29009, 18, 84, 1527, 397, 1592, 372, 270, 18, 318, 8342, 12, 9252, 917, 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, 906, 12, 9252, 917, 4672, 327, 5118, 29009, 18, 84, 1527, 397, 1592, 372, 270, 18, 318, 8342, 12, 9252, 917, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
output.trace('Return: %r' % ret)
output.trace('Return: %s' % repr(ret))
def run(self, output, namespace): handler = namespace.get_handler(self.handler_name) if handler.type == 'user': handler.init_user_keyword(namespace.variables) self.name = self._get_name(handler.longname, namespace.variables) self.doc = handler.shortdoc self.starttime = utils.get_timestamp() output.start_keyword(self) if self.doc.startswith('*DEPRECATED*'): msg = self.doc.replace('*DEPRECATED*', '', 1).strip() name = self.name.split('} = ', 1)[-1] # Remove possible variable output.warn("Keyword '%s' is deprecated. %s" % (name, msg)) try: ret = self._run(handler, output, namespace) output.trace('Return: %r' % ret) except ExecutionFailed, err: self.status = 'FAIL' else: self.status = 'PASS' self.endtime = utils.get_timestamp() self.elapsedtime = utils.get_elapsed_time(self.starttime, self.endtime) output.end_keyword(self) if self.status == 'FAIL': raise err return ret
de93ae4d2f57d96289ac304fdd0a5b938559ffa1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6988/de93ae4d2f57d96289ac304fdd0a5b938559ffa1/keywords.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 876, 16, 1981, 4672, 1838, 273, 1981, 18, 588, 67, 4176, 12, 2890, 18, 4176, 67, 529, 13, 309, 1838, 18, 723, 422, 296, 1355, 4278, 1838, 18, 2738, 67, 1355, 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, 1086, 12, 2890, 16, 876, 16, 1981, 4672, 1838, 273, 1981, 18, 588, 67, 4176, 12, 2890, 18, 4176, 67, 529, 13, 309, 1838, 18, 723, 422, 296, 1355, 4278, 1838, 18, 2738, 67, 1355, 67, ...
if self.traymenu.get_property('visible') and self.traytips.notif_handler <> -1:
if self.traymenu.get_property('visible') and self.traytips.notif_handler != -1:
def tooltip_show_manually(self): # Since there is no signal to connect to when the user puts their # mouse over the trayicon, we will check the mouse position # manually and show/hide the window as appropriate. This is called # every iteration. Note: This should not occur if self.traytips.notif_ # handler has a value, because that means that the tooltip is already # visible, and we don't want to override that setting simply because # the user's cursor is not over the tooltip. if self.traymenu.get_property('visible') and self.traytips.notif_handler <> -1: self.traytips._remove_timer() elif not self.traytips.notif_handler: pointer_screen, px, py, _ = self.window.get_screen().get_display().get_pointer() icon_screen, icon_rect, icon_orient = self.statusicon.get_geometry() x = icon_rect[0] y = icon_rect[1] width = icon_rect[2] height = icon_rect[3] if px >= x and px <= x+width and py >= y and py <= y+height: self.traytips._start_delay(self.statusicon) else: self.traytips._remove_timer()
5178d7eb73657d7ee78706340fbf0fc5d779c7ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/5178d7eb73657d7ee78706340fbf0fc5d779c7ee/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11915, 67, 4500, 67, 4728, 3452, 12, 2890, 4672, 468, 7897, 1915, 353, 1158, 4277, 358, 3077, 358, 1347, 326, 729, 8200, 3675, 468, 7644, 1879, 326, 268, 435, 3950, 16, 732, 903, 866, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11915, 67, 4500, 67, 4728, 3452, 12, 2890, 4672, 468, 7897, 1915, 353, 1158, 4277, 358, 3077, 358, 1347, 326, 729, 8200, 3675, 468, 7644, 1879, 326, 268, 435, 3950, 16, 732, 903, 866, ...
"""Work out the current kernel architecture (as a kernel arch)"""
""" Work out the current kernel architecture (as a kernel arch) """
def get_kernel_build_arch(self, arch=None): """Work out the current kernel architecture (as a kernel arch)""" if not arch: arch = get_current_kernel_arch() if re.match('i.86', arch): return 'i386' elif re.match('sun4u', arch): return 'sparc64' elif re.match('arm.*', arch): return 'arm' elif re.match('sa110', arch): return 'arm' elif re.match('s390x', arch): return 's390' elif re.match('parisc64', arch): return 'parisc' elif re.match('ppc.*', arch): return 'powerpc' elif re.match('mips.*', arch): return 'mips' else: return arch
6348fc2543d50cb8a902b2d7d91b2093deaf8f94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/6348fc2543d50cb8a902b2d7d91b2093deaf8f94/kernel.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8111, 67, 3510, 67, 991, 12, 2890, 16, 6637, 33, 7036, 4672, 3536, 4147, 596, 326, 783, 5536, 27418, 261, 345, 279, 5536, 6637, 13, 3536, 309, 486, 6637, 30, 6637, 273, 336, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8111, 67, 3510, 67, 991, 12, 2890, 16, 6637, 33, 7036, 4672, 3536, 4147, 596, 326, 783, 5536, 27418, 261, 345, 279, 5536, 6637, 13, 3536, 309, 486, 6637, 30, 6637, 273, 336, ...
if not self.propertyMap(): return '' if not allprop and not vals:
if not allprop and not names:
def dav__propstat(self, allprop, vals, join=string.join): # The dav__propstat method returns a chunk of xml containing # one or more propstat elements indicating property names, # values, errors and status codes. This is called by some # of the WebDAV support machinery. If a property set does # not support WebDAV, just override this method to return # an empty string. propstat='<d:propstat%s>\n' \ ' <d:prop>\n' \ '%s\n' \ ' </d:prop>\n' \ ' <d:status>HTTP/1.1 %s</d:status>\n' \ '</d:propstat>\n' result=[] if not self.propertyMap(): return '' if not allprop and not vals: # propname request for name in self.propertyIds(): result.append(' <ns0:%s/>' % name) result=join(result, '\n') nsdef=' xmlns:ns0="%s"' % self.xml_namespace() return propstat % (nsdef, result, '200 OK') elif allprop: for name, value in self.propertyItems(): prop=' <ns0:%s>%s</ns0:%s>' % (name, value, name) result.append(prop) result=join(result, '\n') nsdef=' xmlns:ns0="%s"' % self.xml_namespace() return propstat % (nsdef, result, '200 OK') else: xml_ns=self.xml_namespace() propdict=self.propdict() nsdef=' xmlns:ns0="%s"' % self.xml_namespace() for name, ns in vals: if ns==xml_ns: if propdict.has_key(name): value=self.getProperty(name) prop=' <ns0:%s>%s</ns0:%s>' % (name, value, name) result.append(propstat % (nsdef, prop, '200 OK')) else: prop=' <ns0:%s/>' % name result.append(propstat % (nsdef, prop,'404 Not Found')) return join(result, '\n')
62ae26da026a782b337b19b00b172786a89e5123 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/62ae26da026a782b337b19b00b172786a89e5123/PropertySheets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 842, 972, 5986, 5642, 12, 2890, 16, 777, 5986, 16, 5773, 16, 1233, 33, 1080, 18, 5701, 4672, 468, 1021, 302, 842, 972, 5986, 5642, 707, 1135, 279, 2441, 434, 2025, 4191, 468, 1245...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 302, 842, 972, 5986, 5642, 12, 2890, 16, 777, 5986, 16, 5773, 16, 1233, 33, 1080, 18, 5701, 4672, 468, 1021, 302, 842, 972, 5986, 5642, 707, 1135, 279, 2441, 434, 2025, 4191, 468, 1245...
if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg
if errno != ENOENT and errno != ENOTDIR: raise raise error, (errno, msg)
def _execvpe(file, args, env=None): if env is not None: func = execve argrest = (args, env) else: func = execv argrest = (args,) env = environ global _notfound head, tail = path.split(file) if head: apply(func, (file,) + argrest) return if 'PATH' in env: envpath = env['PATH'] else: envpath = defpath PATH = envpath.split(pathsep) if not _notfound: if sys.platform[:4] == 'beos': # Process handling (fork, wait) under BeOS (up to 5.0) # doesn't interoperate reliably with the thread interlocking # that happens during an import. The actual error we need # is the same on BeOS for posix.open() et al., ENOENT. try: unlink('/_#.# ## #.#') except error, _notfound: pass else: import tempfile t = tempfile.mktemp() # Exec a file that is guaranteed not to exist try: execv(t, ('blah',)) except error, _notfound: pass exc, arg = error, _notfound for dir in PATH: fullname = path.join(dir, file) try: apply(func, (fullname,) + argrest) except error, (errno, msg): if errno != arg[0]: exc, arg = error, (errno, msg) raise exc, arg
fe2895e361895d034781d7843c51a48c3a5c20d8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/fe2895e361895d034781d7843c51a48c3a5c20d8/os.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4177, 90, 347, 12, 768, 16, 833, 16, 1550, 33, 7036, 4672, 309, 1550, 353, 486, 599, 30, 1326, 273, 1196, 537, 1501, 8792, 273, 261, 1968, 16, 1550, 13, 469, 30, 1326, 273, 1196...
print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error) try: print >>sys.stderr, """ The specified output encoding (%s) cannot handle all of the output.""" % error.encoding except AttributeError: print >>sys.stderr, """ The specified output encoding cannot handle all of the output.""" print """\ Try setting "--output-encoding-error-handler" to * "xmlcharrefreplace" (for HTML & XML output);"""
sys.stderr.write( '%s: %s\n' '\n' 'The specified output encoding (%s) cannot\n' 'handle all of the output.\n' 'Try setting "--output-encoding-error-handler" to\n' '\n' '* "xmlcharrefreplace" (for HTML & XML output);\n' % (error.__class__.__name__, error, self.settings.output_encoding))
def report_UnicodeError(self, error): print >>sys.stderr, '%s: %s' % (error.__class__.__name__, error)
0f66cf23ae004c0fe6e0b8e22fcead8e08f23a32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1532/0f66cf23ae004c0fe6e0b8e22fcead8e08f23a32/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2605, 67, 16532, 668, 12, 2890, 16, 555, 4672, 1172, 1671, 9499, 18, 11241, 16, 1995, 87, 30, 738, 87, 11, 738, 261, 1636, 16186, 1106, 972, 16186, 529, 972, 16, 555, 13, 2, -100, -1...
f = _open(self._file_name, "w", self._mode)
f = _open(self._file_name, "wb", self._mode)
def sync(self): self._check_writable() f = _open(self._file_name, "w", self._mode) pickle.dump(self._dict, f, 1) f.close() self._needs_sync = 00000
f0d4023e13cb15db14bd9d210f50f9a4aa7f8d4b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/696/f0d4023e13cb15db14bd9d210f50f9a4aa7f8d4b/dblite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 2890, 4672, 365, 6315, 1893, 67, 15699, 1435, 284, 273, 389, 3190, 12, 2890, 6315, 768, 67, 529, 16, 315, 9464, 3113, 365, 6315, 3188, 13, 13379, 18, 8481, 12, 2890, 6315, 15...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3792, 12, 2890, 4672, 365, 6315, 1893, 67, 15699, 1435, 284, 273, 389, 3190, 12, 2890, 6315, 768, 67, 529, 16, 315, 9464, 3113, 365, 6315, 3188, 13, 13379, 18, 8481, 12, 2890, 6315, 15...
def testSimpleSSLwrap(self):
def test_sslwrap_simple(self):
def testSimpleSSLwrap(self): # A crude test for the legacy API try: ssl.sslwrap_simple(socket.socket(socket.AF_INET)) except IOError, e: if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that pass else: raise try: ssl.sslwrap_simple(socket.socket(socket.AF_INET)._sock) except IOError, e: if e.errno == 32: # broken pipe when ssl_sock.do_handshake(), this test doesn't care about that pass else: raise
f08683542eada763321715f558eac5b2baec28e9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/f08683542eada763321715f558eac5b2baec28e9/test_ssl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 8157, 4113, 67, 9647, 12, 2890, 4672, 468, 432, 4422, 1317, 1842, 364, 326, 8866, 1491, 775, 30, 5832, 18, 8157, 4113, 67, 9647, 12, 7814, 18, 7814, 12, 7814, 18, 6799, 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, 1842, 67, 8157, 4113, 67, 9647, 12, 2890, 4672, 468, 432, 4422, 1317, 1842, 364, 326, 8866, 1491, 775, 30, 5832, 18, 8157, 4113, 67, 9647, 12, 7814, 18, 7814, 12, 7814, 18, 6799, 67, ...