rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
filecontent = form['file'] if hasattr(filecontent, 'read'): filecontent = filecontent.read()
filecontent = file_upload.stream.read()
def do_action(self): """ Load """ status = False _ = self._ form = self.form request = self.request
8a48eeddd62a1a3d8afb20511a4bdda5846a002b /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/8a48eeddd62a1a3d8afb20511a4bdda5846a002b/Load.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1128, 12, 2890, 4672, 3536, 4444, 3536, 1267, 273, 1083, 389, 273, 365, 6315, 646, 273, 365, 18, 687, 590, 273, 365, 18, 2293, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 1128, 12, 2890, 4672, 3536, 4444, 3536, 1267, 273, 1083, 389, 273, 365, 6315, 646, 273, 365, 18, 687, 590, 273, 365, 18, 2293, 2, -100, -100, -100, -100, -100, -100, -100, -10...
system.popPackage()
if package: system.popPackage()
def preprocessDirectory(system, dirpath): package = system.pushPackage(os.path.basename(dirpath), None) for fname in os.listdir(dirpath): fullname = os.path.join(dirpath, fname) if os.path.isdir(fullname) and os.path.exists(os.path.join(fullname, '__init__.py')) and fname != 'test': preprocessDirectory(system, fullname) elif fname.endswith('.py'): modname = os.path.splitext(fname)[0] mod = system.pushModule(modname, None) mod.filepath = fullname mod.processed = False system.popModule() system.popPackage()
5bceda9ef5eafe72c663121fc0c654a77cdfbbc2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5471/5bceda9ef5eafe72c663121fc0c654a77cdfbbc2/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 2853, 12, 4299, 16, 17803, 4672, 2181, 273, 2619, 18, 6206, 2261, 12, 538, 18, 803, 18, 13909, 12, 1214, 803, 3631, 599, 13, 364, 5299, 316, 1140, 18, 1098, 1214, 12, 1214, 803,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 2853, 12, 4299, 16, 17803, 4672, 2181, 273, 2619, 18, 6206, 2261, 12, 538, 18, 803, 18, 13909, 12, 1214, 803, 3631, 599, 13, 364, 5299, 316, 1140, 18, 1098, 1214, 12, 1214, 803,...
print self.table.layout()
def __init__(self, parent=None, signalManager = None): OWWidget.__init__(self, parent, signalManager, 'k-Means Clustering')
b5200d400a472ae12720d7772ce15d5dcc3a721d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6366/b5200d400a472ae12720d7772ce15d5dcc3a721d/OWKMeans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 296, 79, 17, 4667, 634, 29103, 6134,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 16, 4277, 1318, 273, 599, 4672, 18233, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 16, 4277, 1318, 16, 296, 79, 17, 4667, 634, 29103, 6134,...
"patches/pjsip-2553-sip_inv-recv_neg_reply_to_reinvite.patch"]
"patches/pjsip-2553-sip_inv-recv_neg_reply_to_reinvite.patch", "patches/pjsip-2553-sip_inv-dont_disconnect_on_408_reply_to_reinvite.patch"]
def get_svn_revision(svn_dir): svn_info = distutils_exec_process(["svn", "info", svn_dir], True) return int(re.search("Last Changed Rev: (\d+)", svn_info).group(1))
3707847bd51454d1a483cbfc84ba462020873f5d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5703/3707847bd51454d1a483cbfc84ba462020873f5d/setup_pjsip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 31505, 67, 13057, 12, 31505, 67, 1214, 4672, 5893, 82, 67, 1376, 273, 2411, 5471, 67, 4177, 67, 2567, 3816, 6, 31505, 3113, 315, 1376, 3113, 5893, 82, 67, 1214, 6487, 1053, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 31505, 67, 13057, 12, 31505, 67, 1214, 4672, 5893, 82, 67, 1376, 273, 2411, 5471, 67, 4177, 67, 2567, 3816, 6, 31505, 3113, 315, 1376, 3113, 5893, 82, 67, 1214, 6487, 1053, 13...
self.offsource_segment = [offSourceSegment[0], offSourceSegment[1]] self.starttime = offSourceSegment[0] self.endtime = offSourceSegment[1]
if offSourceSegment: self.offsource_segment = [offSourceSegment[0], offSourceSegment[1]] self.starttime = offSourceSegment[0] self.endtime = offSourceSegment[1]
def get_segment_info(self,plot_segments_file = None):
49433c72fbd74772bdd0097fb2679094b1f8a56f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/49433c72fbd74772bdd0097fb2679094b1f8a56f/pylal_exttrig_llutils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9273, 67, 1376, 12, 2890, 16, 4032, 67, 12838, 67, 768, 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, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9273, 67, 1376, 12, 2890, 16, 4032, 67, 12838, 67, 768, 273, 599, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
""" Return an ASCII string representation of a LIGOTimeGPS. """
""" Return an ASCII string representation of a LIGOTimeGPS. """
def __str__(self):
6bd9b206313336554b64d1ec732fcfdde7d0ad94 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3589/6bd9b206313336554b64d1ec732fcfdde7d0ad94/lal.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 701, 972, 12, 2890, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 1001, 701, 972, 12, 2890, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
mode = pkg in obsoleting and "u" or "i"
mode = pkg in upgrading and "u" or "i"
def commit(self, install, remove, pkgpath):
536bae7c38cf762bfb60a0df93e4f1a2e7787bd1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8317/536bae7c38cf762bfb60a0df93e4f1a2e7787bd1/pm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 3799, 16, 1206, 16, 3475, 803, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3294, 12, 2890, 16, 3799, 16, 1206, 16, 3475, 803, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return "Simulated Secondary Source graphic filename place holder" tmp_files = callCommandLine(source % cfile)
return u"Simulated Secondary Source graphic filename place holder" try: command = source % cfile except: self._displayMessage(u"Graphics Secondary source command:\n%s\nRequired information is not available. Here are the variables that are available:\n%s\n" % (source, cfile)) return None tmp_files = callCommandLine(command)
def _getSecondarySourceGraphics(self, cfile, graphic_type, watched=False): '''Download from secondary source such as movieposter.com return None return full qualified path and filename of downloaded graphic ''' if not len(self.config['myth_secondary_sources']): return None
881a9111c0613ff73ff321ac94e0e0ed204b9de1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13713/881a9111c0613ff73ff321ac94e0e0ed204b9de1/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14893, 1830, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 628, 9946, 1084, 4123, 487, 7344, 522, 881, 29811, 18, 832, 327, 599, 3...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 14893, 1830, 17558, 12, 2890, 16, 276, 768, 16, 19548, 67, 723, 16, 23135, 33, 8381, 4672, 9163, 7109, 628, 9946, 1084, 4123, 487, 7344, 522, 881, 29811, 18, 832, 327, 599, 3...
pbuild: $(INIT_TARGET) $(PCH_TARGET) gen_obj $(LLIB_TARGET) $(EFI_FILE)
pbuild: $(INIT_TARGET) $(PCH_TARGET) gen_obj $(LLIB_TARGET) $(EFI_FILE) $(DLL_FILE)
def Append(self, AppendString, Dictionary=None): if Dictionary == None: self.String += AppendString else: while AppendString.find('${BEGIN}') >= 0: Start = AppendString.find('${BEGIN}') End = AppendString.find('${END}') SubString = AppendString[AppendString.find('${BEGIN}'):AppendString.find('${END}')+6] RepeatTime = -1 NewDict = {"BEGIN":"", "END":""} for Key in Dictionary: if SubString.find('$' + Key) >= 0 or SubString.find('${' + Key + '}') >= 0: Value = Dictionary[Key] if type(Value) != type([]): NewDict[Key] = Value continue if RepeatTime < 0: RepeatTime = len(Value) elif RepeatTime != len(Value): raise Exception(Key + " has different repeat time from others!") NewDict[Key] = ""
3707052edccd92c6629eb07e015484b14150f579 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/914/3707052edccd92c6629eb07e015484b14150f579/GenMake.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 12, 2890, 16, 6181, 780, 16, 16447, 33, 7036, 4672, 309, 16447, 422, 599, 30, 365, 18, 780, 1011, 6181, 780, 469, 30, 1323, 6181, 780, 18, 4720, 2668, 18498, 16061, 1713, 13, 154...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6181, 12, 2890, 16, 6181, 780, 16, 16447, 33, 7036, 4672, 309, 16447, 422, 599, 30, 365, 18, 780, 1011, 6181, 780, 469, 30, 1323, 6181, 780, 18, 4720, 2668, 18498, 16061, 1713, 13, 154...
(junkentry, oldhandle) = find_tip_entry('UDP',localip,localport)
oldhandle = find_tipo_commhandle('UDP', localip, localport, False)
def recvmess(localip, localport, function): """ <Purpose> Registers a function as an event handler for incoming messages <Arguments> localip: The local IP or hostname to register the handler on localport: The port to listen on function: The function that messages should be delivered to. It should expect the following arguments: (remoteIP, remoteport, message, commhandle) <Exceptions> None. <Side Effects> Registers an event handler. <Returns> The commhandle for this event handler. """ if not localip or localip == '0.0.0.0': raise Exception("Must specify a local IP address") if type(localport) is not int and type(localport) is not long: raise Exception("Local port number must be an integer") restrictions.assertisallowed('recvmess',localip,localport) nanny.tattle_check('messport',localport) # If they specify an IP, we must use it... if specificIP and localip not in whitelistedIPs and specificIP != localip: raise Exception, "IP '"+localip+"' is not allowed. User restricts outgoing traffic to IP: '"+specificIP+"'" # check if I'm already listening on this port / ip (junkentry, oldhandle) = find_tip_entry('UDP',localip,localport) if oldhandle: # if it was already there, update the function and return comminfo[oldhandle]['function'] = function return oldhandle handle = idhelper.getuniqueid() # we'll need to add it, so add a socket... nanny.tattle_add_item('insockets',handle) # get the socket try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) # reuse the socket if it's "pseudo-availible" s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) s.bind((localip,localport)) nonportable.preparesocket(s) except: try: s.close() except: pass nanny.tattle_remove_item('insockets',handle) raise # set up our table entry comminfo[handle] = {'type':'UDP','localip':localip, 'localport':localport,'function':function,'socket':s, 'outgoing':False} # start the selector if it's not running already check_selector() return handle
2920cf355d747fa3580e3d18326f4b2ed3423971 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7263/2920cf355d747fa3580e3d18326f4b2ed3423971/emulcomm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1950, 3489, 403, 12, 3729, 625, 16, 1191, 655, 16, 445, 4672, 3536, 411, 10262, 4150, 34, 2526, 6045, 279, 445, 487, 392, 871, 1838, 364, 6935, 2743, 225, 411, 4628, 34, 1191, 625, 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, 1950, 3489, 403, 12, 3729, 625, 16, 1191, 655, 16, 445, 4672, 3536, 411, 10262, 4150, 34, 2526, 6045, 279, 445, 487, 392, 871, 1838, 364, 6935, 2743, 225, 411, 4628, 34, 1191, 625, 30,...
return func(*args, **kwargs)
returner = func(*args, **kwargs)
def run_single(self, func, *args, **kwargs): try: return func(*args, **kwargs) except Exception, e: self.__queue_exception_callback(e) return None finally: self.notification.close()
012a6dec95fbcc2a2c70fa89d4b427ee24b82034 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/012a6dec95fbcc2a2c70fa89d4b427ee24b82034/action.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 7526, 12, 2890, 16, 1326, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 327, 264, 273, 1326, 30857, 1968, 16, 2826, 4333, 13, 1335, 1185, 16, 425, 30, 365, 16186, 4000, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 7526, 12, 2890, 16, 1326, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 327, 264, 273, 1326, 30857, 1968, 16, 2826, 4333, 13, 1335, 1185, 16, 425, 30, 365, 16186, 4000, 67, ...
libraries=["fl"] ),
libraries=["fl"] ),
def is_reportlab_installed(): return can_import("reportlab")
b9fe0cc7879d67ad9569a99a670542253f908615 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/b9fe0cc7879d67ad9569a99a670542253f908615/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 6006, 7411, 67, 13435, 13332, 327, 848, 67, 5666, 2932, 6006, 7411, 7923, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 6006, 7411, 67, 13435, 13332, 327, 848, 67, 5666, 2932, 6006, 7411, 7923, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return line def _read_datafile_entry(spg, no, symbol, f):
return line1, line2 def _read_datafile_entry(spg, no, symbol, setting, f):
def _skip_to_nonblank(f, spacegroup): """Read lines from f until a nonblank line not starting with a hash (#) is encountered and returns the line.""" while True: line = f.readline() if not line: raise SpacegroupNotFoundError( 'invalid spacegroup %s, not found in data base'%spacegroup) line.strip() if line and not line.startswith('#'): break return line
85be2a08fb35919f95e36d2aac71cb23f87c260d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1380/85be2a08fb35919f95e36d2aac71cb23f87c260d/spacegroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 7457, 67, 869, 67, 5836, 12111, 12, 74, 16, 3476, 1655, 4672, 3536, 1994, 2362, 628, 284, 3180, 279, 1661, 12111, 980, 486, 5023, 598, 279, 1651, 23885, 13, 353, 9919, 471, 1135, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7457, 67, 869, 67, 5836, 12111, 12, 74, 16, 3476, 1655, 4672, 3536, 1994, 2362, 628, 284, 3180, 279, 1661, 12111, 980, 486, 5023, 598, 279, 1651, 23885, 13, 353, 9919, 471, 1135, ...
if req.authname == 'anonymous':
if not req.authname or req.authname == 'anonymous':
def _do_account(self, req): if req.authname == 'anonymous': req.redirect(self.env.href.wiki()) action = req.args.get('action') delete_enabled = AccountManager(self.env).supports('delete_user') data = {'delete_enabled': delete_enabled} if req.method == 'POST': if action == 'change_password': data.update(self._do_change_password(req)) elif action == 'delete': data.update(self._do_delete(req)) return data
a0ae077f870f23f6acb8e075e8b9185119526535 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6208/a0ae077f870f23f6acb8e075e8b9185119526535/web_ui.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 4631, 12, 2890, 16, 1111, 4672, 309, 486, 1111, 18, 1944, 529, 578, 1111, 18, 1944, 529, 422, 296, 19070, 4278, 1111, 18, 7590, 12, 2890, 18, 3074, 18, 7547, 18, 13044, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 4631, 12, 2890, 16, 1111, 4672, 309, 486, 1111, 18, 1944, 529, 578, 1111, 18, 1944, 529, 422, 296, 19070, 4278, 1111, 18, 7590, 12, 2890, 18, 3074, 18, 7547, 18, 13044, ...
query['sort_on'] = sort_index query['sort_order'] = self.sort_order
if self.sort_withcatalog : query['sort_on'] = sort_index query['sort_order'] = self.sort_order
def finderQuery(self) : """ return query for results depending on some params """ request = self.request if self.query : return self.query elif self.typeview == 'selection': return {'uid' : self.blacklist} elif self.displaywithoutquery or self.searchsubmit : query = {} path = {} if not self.searchsubmit : path['depth'] = 1 path['query'] = self.browsedpath query['path'] = path sort_index = self.sort_on query['sort_on'] = sort_index query['sort_order'] = self.sort_order if self.types : query['portal_type'] = self.types if self.searchsubmit : # TODO : use a dynamic form with different possible searchform fields q = request.get('SearchableText', '') if q : for char in '?-+*': q = q.replace(char, ' ') r=q.split() r = " AND ".join(r) searchterms = _quote_bad_chars(r)+'*' query['SearchableText'] = searchterms #query = {'path': {'query': '/cktest', 'depth': 2}, 'sort_on': 'getObjPositionInParent'} return query
8425648b76d427b339a20c95bee804436301a905 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/8425648b76d427b339a20c95bee804436301a905/finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7532, 1138, 12, 2890, 13, 294, 3536, 327, 843, 364, 1686, 8353, 603, 2690, 859, 3536, 225, 590, 273, 365, 18, 2293, 309, 365, 18, 2271, 294, 327, 365, 18, 2271, 1327, 365, 18, 723, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7532, 1138, 12, 2890, 13, 294, 3536, 327, 843, 364, 1686, 8353, 603, 2690, 859, 3536, 225, 590, 273, 365, 18, 2293, 309, 365, 18, 2271, 294, 327, 365, 18, 2271, 1327, 365, 18, 723, 1...
server = SimpleXMLRPCServer(("localhost", 8000), MathHandler)
server = MathServer(("localhost", 8000))
def export_add(self, x, y): return x + y
296497a20942d024558fc4b2a9158f4567167ac9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/296497a20942d024558fc4b2a9158f4567167ac9/SimpleXMLRPCServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3359, 67, 1289, 12, 2890, 16, 619, 16, 677, 4672, 327, 619, 397, 677, 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, ...
[ 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, 3359, 67, 1289, 12, 2890, 16, 619, 16, 677, 4672, 327, 619, 397, 677, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
'TeX extended ASCII':'d9b29452.enc',
'TeX extended ASCII': 'd9b29452.enc',
def strip_extension (f, ext): (p, e) = os.path.splitext (f) if e == ext: e = '' return p + e
408023b2df5dcfcb3216a73071c42331a5494bfb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11856/408023b2df5dcfcb3216a73071c42331a5494bfb/mftrace.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2569, 67, 6447, 261, 74, 16, 1110, 4672, 261, 84, 16, 425, 13, 273, 1140, 18, 803, 18, 4939, 408, 261, 74, 13, 309, 425, 422, 1110, 30, 425, 273, 875, 327, 293, 397, 425, 282, 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, 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, 2569, 67, 6447, 261, 74, 16, 1110, 4672, 261, 84, 16, 425, 13, 273, 1140, 18, 803, 18, 4939, 408, 261, 74, 13, 309, 425, 422, 1110, 30, 425, 273, 875, 327, 293, 397, 425, 282, 2, ...
'icon' : lambda *a: 'STOCK_OPEN', 'icon_pict': lambda *a: ('stock', ('STOCK_OPEN','ICON_SIZE_MENU')), 'sequence' : lambda *a: 10,
'icon' : 'STOCK_OPEN', 'icon_pict': ('stock', ('STOCK_OPEN','ICON_SIZE_MENU')), 'sequence' : 10,
def _rec_message(self, cr, uid, ids, context=None): return _('Error ! You can not create recursive Menu.')
1f2e340a153c9efaaea39ac7d0a4e24d6f3608b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/1f2e340a153c9efaaea39ac7d0a4e24d6f3608b5/ir_ui_menu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 2150, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 327, 389, 2668, 668, 401, 4554, 848, 486, 752, 5904, 9809, 1093, 13, 2, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3927, 67, 2150, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 819, 33, 7036, 4672, 327, 389, 2668, 668, 401, 4554, 848, 486, 752, 5904, 9809, 1093, 13, 2, -100, -100, -100, -100, ...
e.height = getint(h) e.keycode = getint(k) try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y)
e.height = getint_event(h) e.keycode = getint_event(k) e.state = getint_event(s) e.time = getint_event(t) e.width = getint_event(w) e.x = getint_event(x) e.y = getint_event(y)
def _substitute(self, *args): """Internal function.""" if len(args) != len(self._subst_format): return args getboolean = self.tk.getboolean getint = int nsign, b, f, h, k, s, t, w, x, y, A, E, K, N, W, T, X, Y, D = args # Missing: (a, c, d, m, o, v, B, R) e = Event() e.serial = getint(nsign) e.num = getint(b) try: e.focus = getboolean(f) except TclError: pass e.height = getint(h) e.keycode = getint(k) # For Visibility events, event state is a string and # not an integer: try: e.state = getint(s) except ValueError: e.state = s e.time = getint(t) e.width = getint(w) e.x = getint(x) e.y = getint(y) e.char = A try: e.send_event = getboolean(E) except TclError: pass e.keysym = K e.keysym_num = getint(N) e.type = T try: e.widget = self._nametowidget(W) except KeyError: e.widget = W e.x_root = getint(X) e.y_root = getint(Y) try: e.delta = getint(D) except ValueError: e.delta = 0 return (e,)
851b1c8d466c86af5052fb03f636288f91058f32 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/851b1c8d466c86af5052fb03f636288f91058f32/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 273, 365, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1717, 17207, 12, 2890, 16, 380, 1968, 4672, 3536, 3061, 445, 12123, 309, 562, 12, 1968, 13, 480, 562, 12, 2890, 6315, 1717, 334, 67, 2139, 4672, 327, 833, 336, 6494, 273, 365, 18,...
code = 400 response = "Bad request"
code = 501 response = "Method not implemented"
def FetchResponse(self, path, method): code = 200 response = None
091279045a7638e5d6425a59ffdd7326c5493309 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/091279045a7638e5d6425a59ffdd7326c5493309/ganeti.rapi.client_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 1064, 12, 2890, 16, 589, 16, 707, 4672, 981, 273, 4044, 766, 273, 599, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8065, 1064, 12, 2890, 16, 589, 16, 707, 4672, 981, 273, 4044, 766, 273, 599, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
def PackDEV_BROADCAST(devicetype, rest_fmt, rest_data, extra_data=''):
def PackDEV_BROADCAST(devicetype, rest_fmt, rest_data, extra_data=_make_bytes('')):
def PackDEV_BROADCAST(devicetype, rest_fmt, rest_data, extra_data=''): # It seems a requirement is 4 byte alignment, even for the 'BYTE data[1]' # field (eg, that would make DEV_BROADCAST_HANDLE 41 bytes, but we must # be 44. extra_data += '\0' * (4-len(extra_data)%4) format = "iii" + rest_fmt full_size = struct.calcsize(format) + len(extra_data) data = (full_size, devicetype, 0) + rest_data return struct.pack(format, *data) + extra_data
a909c8b58e524b3c1df5415e90cf7c118248295d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/677/a909c8b58e524b3c1df5415e90cf7c118248295d/win32gui_struct.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7930, 15301, 67, 38, 1457, 1880, 21871, 12, 5206, 335, 5872, 16, 3127, 67, 8666, 16, 3127, 67, 892, 16, 2870, 67, 892, 33, 67, 6540, 67, 3890, 2668, 26112, 30, 468, 2597, 12001, 279, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7930, 15301, 67, 38, 1457, 1880, 21871, 12, 5206, 335, 5872, 16, 3127, 67, 8666, 16, 3127, 67, 892, 16, 2870, 67, 892, 33, 67, 6540, 67, 3890, 2668, 26112, 30, 468, 2597, 12001, 279, ...
if self.tree.openElements[-1].name == "caption": self.parser.parseError()
if self.tree.openElements[-1].name != "caption": self.parser.parseError(_(u"Unexpected end tag (caption). " u"Missing end tags."))
def endTagCaption(self, name): if self.tree.elementInScope(name, True): # AT this code is quite similar to endTagTable in "InTable" self.tree.generateImpliedEndTags() if self.tree.openElements[-1].name == "caption": self.parser.parseError() while self.tree.openElements[-1].name != "caption": self.tree.openElements.pop() self.tree.clearActiveFormattingElements() self.parser.phase = self.parser.phases["inTable"] else: # innerHTML case self.parser.parseError()
c85cacb1789898813b7ecc4da48ba7c38a3f314c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10463/c85cacb1789898813b7ecc4da48ba7c38a3f314c/html5parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 21158, 12, 2890, 16, 508, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 12, 529, 16, 1053, 4672, 468, 14464, 333, 981, 353, 25102, 7281, 358, 29765, 1388, 316, 315, 382, 1388, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 29765, 21158, 12, 2890, 16, 508, 4672, 309, 365, 18, 3413, 18, 2956, 382, 3876, 12, 529, 16, 1053, 4672, 468, 14464, 333, 981, 353, 25102, 7281, 358, 29765, 1388, 316, 315, 382, 1388, ...
return win32com.server.util.wrap(obj)
useDispatcher = None if self.debug: from win32com.server import dispatcher useDispatcher = dispatcher.DefaultDebugDispatcher return win32com.server.util.wrap(obj, useDispatcher=useDispatcher)
def _wrap(self, obj): return win32com.server.util.wrap(obj)
85fd5d7424dc985307c2d2e7db7b54fddd78608e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/677/85fd5d7424dc985307c2d2e7db7b54fddd78608e/connect.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4113, 12, 2890, 16, 1081, 4672, 327, 5657, 1578, 832, 18, 3567, 18, 1367, 18, 4113, 12, 2603, 13, 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, 4113, 12, 2890, 16, 1081, 4672, 327, 5657, 1578, 832, 18, 3567, 18, 1367, 18, 4113, 12, 2603, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if os.name in ('nt', 'os2'):
if os.name in ('nt', 'os2') or sys.platform == 'cygwin':
def setUp(self): TestMailbox.setUp(self) if os.name in ('nt', 'os2'): self._box.colon = '!'
57a74869669ea0c208cdca91822f69fd88f94ab5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/57a74869669ea0c208cdca91822f69fd88f94ab5/test_mailbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 7766, 30239, 18, 542, 1211, 12, 2890, 13, 309, 1140, 18, 529, 316, 7707, 496, 2187, 296, 538, 22, 6134, 578, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 4278, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 24292, 12, 2890, 4672, 7766, 30239, 18, 542, 1211, 12, 2890, 13, 309, 1140, 18, 529, 316, 7707, 496, 2187, 296, 538, 22, 6134, 578, 2589, 18, 9898, 422, 296, 2431, 75, 8082, 4278, 365,...
import lcg_util
import lcg_util
def __importExternals(self): if (self.lcg_util) and (self.gfal): return S_OK() try: import lcg_util infoStr = 'Using lcg_util from: %s' % lcg_util.__file__ gLogger.debug(infoStr) infoStr = "The version of lcg_utils is %s" % lcg_util.lcg_util_version() gLogger.debug(infoStr) except Exception,x: errStr = "SRM2Storage.__init__: Failed to import lcg_util" gLogger.exception(errStr,'',x) ISOK = False return S_ERROR(errStr) try: import gfalthr as gfal infoStr = "Using gfalthr from: %s" % gfal.__file__ gLogger.debug(infoStr) infoStr = "The version of gfalthr is %s" % gfal.gfal_version() gLogger.debug(infoStr) except Exception,x: errStr = "SRM2Storage.__init__: Failed to import gfalthr: %s." % (x) gLogger.warn(errStr) try: import gfal infoStr = "Using gfal from: %s" % gfal.__file__ gLogger.debug(infoStr) infoStr = "The version of gfal is %s" % gfal.gfal_version() gLogger.debug(infoStr) except Exception,x: errStr = "SRM2Storage.__init__: Failed to import gfal" gLogger.exception(errStr,'',x) ISOK = False return S_ERROR(errStr) self.lcg_util = lcg_util self.gfal = gfal return S_OK()
70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 29764, 1031, 12, 2890, 4672, 309, 261, 2890, 18, 17704, 75, 67, 1367, 13, 471, 261, 2890, 18, 75, 74, 287, 4672, 327, 348, 67, 3141, 1435, 775, 30, 1930, 9109, 75, 67, 13...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 5666, 29764, 1031, 12, 2890, 4672, 309, 261, 2890, 18, 17704, 75, 67, 1367, 13, 471, 261, 2890, 18, 75, 74, 287, 4672, 327, 348, 67, 3141, 1435, 775, 30, 1930, 9109, 75, 67, 13...
self.attrs = initStateObjects(self.headers, self.url)
def process_headers(self): # Headers are terminated by a blank line .. now in the regexp, # we want to say it's either a newline at the beginning of # the document, or it's a lot of headers followed by two newlines. # The cleaner alternative would be to read one line at a time # until we get to a blank line... m = re.match(r'^((?:[^\r\n]+\r?\n)*\r?\n)', self.recv_buffer) if not m: return
df1de478c20eda8c306e8db15d03c1d2b49b9eb0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/df1de478c20eda8c306e8db15d03c1d2b49b9eb0/HttpServer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2485, 12, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1207, 67, 2485, 12, 2890, 4672, 468, 12158, 854, 14127, 635, 279, 7052, 980, 6116, 2037, 316, 326, 7195, 16, 468, 732, 2545, 358, 12532, 518, 1807, 3344, 279, 9472, 622, 326, 8435, 434, ...
new=None
def __patchFrameTypeDef__(frametype=None,ifo=None,gpstime=None): """ Temporary patch function, to adjust specfied frame type used in searching the filesystem for files to display in followup. """ if frametype == None: return None if gpstime == None: return None if ifo == None: return None endOfS5=int(875232014) new=None if int(gpstime)<=endOfS5: if not frametype.lower().startswith(ifo.lower()): orig=frametype new=ifo+"_"+frametype return new
90b92f8357c22c5ae1a2f077fa4f8667b43d588a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/90b92f8357c22c5ae1a2f077fa4f8667b43d588a/makeCheckListWiki.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2272, 3219, 559, 3262, 972, 12, 74, 1940, 5872, 33, 7036, 16, 20299, 33, 7036, 16, 6403, 334, 494, 33, 7036, 4672, 3536, 22791, 4729, 445, 16, 358, 5765, 857, 74, 2092, 2623, 618...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2272, 3219, 559, 3262, 972, 12, 74, 1940, 5872, 33, 7036, 16, 20299, 33, 7036, 16, 6403, 334, 494, 33, 7036, 4672, 3536, 22791, 4729, 445, 16, 358, 5765, 857, 74, 2092, 2623, 618...
log( '%s succesfully built in "%s" directory' % ( tool[ 'name' ], tool[ 'build_path' ] ) )
log( '%s succesfully built in "%s" location' % ( tool[ 'name' ], tool[ 'build_path' ] ) )
def build_if_needed( tool, toolset, toolsets ): if os.path.exists( tool[ 'path' ] ): log( 'Found preinstalled "%s"; will use it.' % tool[ 'path' ] ) return log( 'Preinstalled "%s" is not found; building one...' % tool[ 'path' ] ) if toolset is None: if toolsets is not None: toolset = string.split( toolsets, ',' )[0] else: toolset = tool[ 'default_toolset' ] log( 'Warning: No bootstrap toolset for "%s" was specified.' % tool[ 'name' ] ) log( ' Using default toolset for the platform (%s).' % toolset ) if os.path.exists( tool[ 'source_dir' ] ): log( 'Found "%s" source directory "%s"' % ( tool[ 'name' ], tool[ 'source_dir' ] ) ) build_cmd = tool[ 'build_cmd' ]( toolset ) log( 'Building "%s" (%s)...' % ( tool[ 'name'], build_cmd ) ) utils.system( [ 'cd %s' % tool[ 'source_dir' ] , build_cmd ] ) else: raise 'Could not find "%s" source directory "%s"' % ( tool[ 'name' ], tool[ 'source_dir' ] ) if not tool.has_key( 'build_path' ): tool[ 'build_path' ] = os.path.join( tool[ 'build_path_root' ] , toolset, 'release', tool[ 'name' ] ) if not os.path.exists( tool[ 'build_path' ] ): raise 'Failed to find "%s" after build.' % tool[ 'build_path' ] log( '%s succesfully built in "%s" directory' % ( tool[ 'name' ], tool[ 'build_path' ] ) )
44453c319f32ee2a4f9586dfeb8f7b04856f891d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7959/44453c319f32ee2a4f9586dfeb8f7b04856f891d/regression.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 430, 67, 17471, 12, 5226, 16, 5226, 542, 16, 5226, 4424, 262, 30, 309, 1140, 18, 803, 18, 1808, 12, 5226, 63, 296, 803, 11, 308, 262, 30, 613, 12, 296, 2043, 675, 13435, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 67, 430, 67, 17471, 12, 5226, 16, 5226, 542, 16, 5226, 4424, 262, 30, 309, 1140, 18, 803, 18, 1808, 12, 5226, 63, 296, 803, 11, 308, 262, 30, 613, 12, 296, 2043, 675, 13435, ...
process_infix_results()
def test_main(): with check_warnings(("complex divmod.., // and % are deprecated", DeprecationWarning), ("classic (int|long) division", DeprecationWarning), quiet=True): process_infix_results() # now infix_results has two lists of results for every pairing. run_unittest(CoercionTest)
96c4df4532de5b4b223ef4f31aacbe6a97bf65b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/96c4df4532de5b4b223ef4f31aacbe6a97bf65b0/test_coercion.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 5254, 13332, 598, 866, 67, 12103, 12, 2932, 14259, 26105, 838, 16, 368, 471, 738, 854, 6849, 3113, 24041, 3631, 7566, 1106, 335, 261, 474, 96, 5748, 13, 16536, 3113, 24041, 363...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5254, 13332, 598, 866, 67, 12103, 12, 2932, 14259, 26105, 838, 16, 368, 471, 738, 854, 6849, 3113, 24041, 3631, 7566, 1106, 335, 261, 474, 96, 5748, 13, 16536, 3113, 24041, 363...
remove_paths.add(path + '.py')
paths_to_remove.add(path + '.py')
def uninstall(self, auto_confirm=False): assert self.check_if_exists(), "Cannot uninstall requirement %s, not installed" % (self.name,) dist = self.satisfied_by remove_paths = set() remove_from_easy_install_pth = set() easy_install_pth = os.path.join(lib_py, os.path.join('site-packages', 'easy-install.pth'))
83f9d9c18b33d7eaefd25541ebfcc8eb4c825233 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12982/83f9d9c18b33d7eaefd25541ebfcc8eb4c825233/pip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16577, 12, 2890, 16, 3656, 67, 10927, 33, 8381, 4672, 1815, 365, 18, 1893, 67, 430, 67, 1808, 9334, 315, 4515, 16577, 12405, 738, 87, 16, 486, 5876, 6, 738, 261, 2890, 18, 529, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16577, 12, 2890, 16, 3656, 67, 10927, 33, 8381, 4672, 1815, 365, 18, 1893, 67, 430, 67, 1808, 9334, 315, 4515, 16577, 12405, 738, 87, 16, 486, 5876, 6, 738, 261, 2890, 18, 529, 16, 1...
if m.t == 1:
if m.t == True:
def CalculateStats(self): self.Reset() for msg in msginfoDB.db.keys(): self.total += 1 m = self.__empty_msg() m.id = msg msginfoDB._getState(m) if m.c == 's': self.cls_spam += 1 if m.t == 0: self.fp += 1 elif m.c == 'h': self.cls_ham += 1 if m.t == 1: self.fn += 1 elif m.c == 'u': self.cls_unsure += 1 if m.t == 0: self.trn_unsure_ham += 1 elif m.t == 1: self.trn_unsure_spam += 1 if m.t == 1: self.trn_spam += 1 elif m.t == 0: self.trn_ham += 1
ee88fef1c19f439d1e5a902d82f249855d24a552 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9857/ee88fef1c19f439d1e5a902d82f249855d24a552/Stats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9029, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 9029, 4195, 12, 2890, 4672, 365, 18, 7013, 1435, 364, 1234, 316, 1234, 1376, 2290, 18, 1966, 18, 2452, 13332, 365, 18, 4963, 1011, 404, 312, 273, 365, 16186, 5531, 67, 3576, 1435, 312, ...
if Globals.get(attr) is not None: SetConnections.UpdateGlobal(attr, bool)
if Globals.get(attr) is None: SetConnections.UpdateGlobal(attr, bool)
def update_bool_global(attr, bool): """If bool is not None, update Globals.attr accordingly""" if Globals.get(attr) is not None: SetConnections.UpdateGlobal(attr, bool)
e916e92d61832ff4979e4be3e953b982e6371460 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8033/e916e92d61832ff4979e4be3e953b982e6371460/Main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6430, 67, 6347, 12, 1747, 16, 1426, 4672, 3536, 2047, 1426, 353, 486, 599, 16, 1089, 18901, 1031, 18, 1747, 15905, 8395, 309, 18901, 1031, 18, 588, 12, 1747, 13, 353, 486, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 6430, 67, 6347, 12, 1747, 16, 1426, 4672, 3536, 2047, 1426, 353, 486, 599, 16, 1089, 18901, 1031, 18, 1747, 15905, 8395, 309, 18901, 1031, 18, 588, 12, 1747, 13, 353, 486, 59...
extra_args = extra_args or ["."]
def GenerateDiff(self, extra_args): # If no file specified, restrict to the current subdir extra_args = extra_args or ["."] cmd = ["hg", "diff", "--git", "-r", self.base_rev] + extra_args data = RunShell(cmd, silent_ok=True) svndiff = [] filecount = 0 for line in data.splitlines(): m = re.match("diff --git a/(\S+) b/(\S+)", line) if m: # Modify line to make it look like as it comes from svn diff. # With this modification no changes on the server side are required # to make upload.py work with Mercurial repos. # NOTE: for proper handling of moved/copied files, we have to use # the second filename. filename = m.group(2) svndiff.append("Index: %s" % filename) svndiff.append("=" * 67) filecount += 1 logging.info(line) else: svndiff.append(line) if not filecount: ErrorExit("No valid patches found in output from hg diff") return "\n".join(svndiff) + "\n"
8d9e6fdfa4be1189fef2dbcb6daacac225bac5f1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6076/8d9e6fdfa4be1189fef2dbcb6daacac225bac5f1/upload.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 5938, 12, 2890, 16, 2870, 67, 1968, 4672, 468, 971, 1158, 585, 1269, 16, 13108, 358, 326, 783, 16921, 4172, 273, 8247, 26981, 3113, 315, 5413, 3113, 5238, 6845, 3113, 3701, 86, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6654, 5938, 12, 2890, 16, 2870, 67, 1968, 4672, 468, 971, 1158, 585, 1269, 16, 13108, 358, 326, 783, 16921, 4172, 273, 8247, 26981, 3113, 315, 5413, 3113, 5238, 6845, 3113, 3701, 86, 311...
res.setdefault(account_id, 0.0)
res.setdefault(account_id, Decimal('0.0'))
def get_credit_debit(self, cursor, user, ids, name, arg, context=None): res = {} move_line_obj = self.pool.get('account.move.line') company_obj = self.pool.get('company.company') currency_obj = self.pool.get('account.currency')
25065d86d8fded3ac7e7d4396f22f85404ac80f4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/25065d86d8fded3ac7e7d4396f22f85404ac80f4/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 20688, 67, 323, 3682, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 3635, 67, 1369, 67, 2603, 273, 365, 18, 6011, 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, 336, 67, 20688, 67, 323, 3682, 12, 2890, 16, 3347, 16, 729, 16, 3258, 16, 508, 16, 1501, 16, 819, 33, 7036, 4672, 400, 273, 2618, 3635, 67, 1369, 67, 2603, 273, 365, 18, 6011, 18, ...
CopyFile(dstc, PREFIX+"/tmp/y.tab.c") CopyFile(dsth, PREFIX+"/tmp/y.tab.h")
CopyFile(dstc, PREFIX+"/tmp/y.tab.c") CopyFile(dsth, PREFIX+"/tmp/y.tab.h")
def CompileBison(pre,dstc,dsth,src): """ Generate a CXX file from a source YXX file. """ fn = os.path.basename(src) dstc=PREFIX+"/tmp/"+dstc dsth=PREFIX+"/tmp/"+dsth if (older(dstc,src) or older(dsth,src)): CopyFile(PREFIX+"/tmp/", src) if (COMPILER=="MSVC7"): CopyFile(PREFIX+"/tmp/", "thirdparty/win-util/bison.simple") bisonFullPath=os.path.abspath("thirdparty/win-util/bison.exe") oslocalcmd(PREFIX+"/tmp", bisonFullPath+" -y -d -p " + pre + " " + fn) if (COMPILER=="LINUXA"): oslocalcmd(PREFIX+"/tmp", "bison -y -d -p "+pre+" "+fn) CopyFile(dstc, PREFIX+"/tmp/y.tab.c") CopyFile(dsth, PREFIX+"/tmp/y.tab.h") updatefiledate(dstc) updatefiledate(dsth)
549fa07a5d2d772f43a72524c62d5193ff38b720 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7242/549fa07a5d2d772f43a72524c62d5193ff38b720/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 38, 4530, 12, 1484, 16, 11057, 71, 16, 11057, 76, 16, 4816, 4672, 3536, 6654, 279, 385, 5619, 585, 628, 279, 1084, 1624, 5619, 585, 18, 3536, 2295, 273, 1140, 18, 803, 18, 13909...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16143, 38, 4530, 12, 1484, 16, 11057, 71, 16, 11057, 76, 16, 4816, 4672, 3536, 6654, 279, 385, 5619, 585, 628, 279, 1084, 1624, 5619, 585, 18, 3536, 2295, 273, 1140, 18, 803, 18, 13909...
s.wfile.write("</body></html>")
self.wfile.write("</body></html>")
def send_article(s, title): s.send_response(200) s.send_header("Content-type", "text/html; charset=utf-8") s.end_headers()
e4ba8a2e24b5496a53042d7dd8f6c75e869d4292 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6694/e4ba8a2e24b5496a53042d7dd8f6c75e869d4292/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 11480, 12, 87, 16, 2077, 4672, 272, 18, 4661, 67, 2740, 12, 6976, 13, 272, 18, 4661, 67, 3374, 2932, 1350, 17, 723, 3113, 315, 955, 19, 2620, 31, 4856, 33, 3158, 17, 28, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 11480, 12, 87, 16, 2077, 4672, 272, 18, 4661, 67, 2740, 12, 6976, 13, 272, 18, 4661, 67, 3374, 2932, 1350, 17, 723, 3113, 315, 955, 19, 2620, 31, 4856, 33, 3158, 17, 28, ...
return ComplexField(prec)(x).sqrt(all=all)
if x >= 0: return RealField(prec)(x).sqrt(all=all) else: return ComplexField(prec)(x).sqrt(all=all)
def _do_sqrt(self, x, prec=None, extend=True, all=False): if prec and x >= 0: return RealField(prec)(x).sqrt(all=all) if prec: return ComplexField(prec)(x).sqrt(all=all) z = SymbolicComposition(self, SR(x)) if all: return [z, -z] return z
1844b2ec0ea187ac4a1be03fdf33012f2d1c92ef /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1844b2ec0ea187ac4a1be03fdf33012f2d1c92ef/calculus.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2896, 67, 24492, 12, 2890, 16, 619, 16, 13382, 33, 7036, 16, 2133, 33, 5510, 16, 777, 33, 8381, 4672, 309, 13382, 471, 619, 1545, 374, 30, 327, 15987, 974, 12, 4036, 21433, 92, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2896, 67, 24492, 12, 2890, 16, 619, 16, 13382, 33, 7036, 16, 2133, 33, 5510, 16, 777, 33, 8381, 4672, 309, 13382, 471, 619, 1545, 374, 30, 327, 15987, 974, 12, 4036, 21433, 92, ...
vis_cols = self.config.getlist('view', 'columns') if visible: vis_cols.remove(name) else: vis_cols.append(name)
def on_tree_view_column_toggled(self, toggle_action): """Toggle visibility of tree view column and save setting."""
63fa96de6dd75abf75c62089b9ce77b298522113 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12852/63fa96de6dd75abf75c62089b9ce77b298522113/viewer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 3413, 67, 1945, 67, 2827, 67, 88, 23972, 1259, 12, 2890, 16, 10486, 67, 1128, 4672, 3536, 17986, 9478, 434, 2151, 1476, 1057, 471, 1923, 3637, 12123, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 603, 67, 3413, 67, 1945, 67, 2827, 67, 88, 23972, 1259, 12, 2890, 16, 10486, 67, 1128, 4672, 3536, 17986, 9478, 434, 2151, 1476, 1057, 471, 1923, 3637, 12123, 2, -100, -100, -100, -100, ...
dataCreator = createDemoData(dest)
dataCreator = CreateDemoData(dest)
def main(dest, scan): dist = os.path.join(dest, demoDataFn) # Init the various consumers that work on every demo dataCreator = createDemoData(dest) # generator for the demodata.js file dataCreator.send(None) # init it configCreator = createDemoJson() # generator for the config.demo.json file configCreator.send(None) jsFileCopier = copyJsFiles(dest) # generator to copy demos' source JS to script dir jsFileCopier.send(None) # File iterator - go through the demos' .html files for category in os.listdir(scan): if category in [".svn", ".DS_Store"]: continue ext = os.path.splitext(category)[1] if ext == ".html" or ext == ".js": continue for item in os.listdir(os.path.join(scan, category)): if item == ".svn": continue if os.path.splitext(item)[1] != ".html": continue htmlfile = os.path.join(scan, category, item) if not fileCheck(htmlfile): print " - Skipping HTML file: %s" % (htmlfile,) continue dataCreator.send((htmlfile, category, item)) # process this demo for demodata.js configCreator.send(htmlfile) # process this file name for config.demo.json jsFileCopier.send(htmlfile) # copy demo source file to script dir # Finalize dataCreator.send((None, None, None)) # finalize demodata.js dataCreator.close() configCreator.send(None) # finalize config.demo.json configCreator.close() jsFileCopier.send(None) # finalize file copying jsFileCopier.close() return
6509cbe8ab2a15f70cb37269a63c8cebc6467bc5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/6509cbe8ab2a15f70cb37269a63c8cebc6467bc5/gendata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 10488, 16, 4135, 4672, 2411, 273, 1140, 18, 803, 18, 5701, 12, 10488, 16, 21477, 751, 5372, 13, 225, 468, 4378, 326, 11191, 18350, 716, 1440, 603, 3614, 21477, 501, 10636, 282,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10488, 16, 4135, 4672, 2411, 273, 1140, 18, 803, 18, 5701, 12, 10488, 16, 21477, 751, 5372, 13, 225, 468, 4378, 326, 11191, 18350, 716, 1440, 603, 3614, 21477, 501, 10636, 282,...
else: typ = epytext.parse_type_of(val)
else: typ = markup.parse_type_of(val)
def __init__(self, uid, verbosity=0): mod = uid.value() self._tmp_var = {} self._tmp_type = {} self._tmp_groups = {} self._tmp_group_order = [] ObjDoc.__init__(self, uid, verbosity)
7140f1248773f589eaa5826bd2b3d64a09ab01f2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/7140f1248773f589eaa5826bd2b3d64a09ab01f2/objdoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 4555, 16, 11561, 33, 20, 4672, 681, 273, 4555, 18, 1132, 1435, 365, 6315, 5645, 67, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 365, 6315, 5645...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4555, 16, 11561, 33, 20, 4672, 681, 273, 4555, 18, 1132, 1435, 365, 6315, 5645, 67, 1401, 273, 2618, 365, 6315, 5645, 67, 723, 273, 2618, 365, 6315, 5645...
replicas = dq2.listDatasetReplicas(info[0]).values() if len(replicas) == 0: info[5] = getPandaClient().PandaSites[info[5]]["ddm"] else: complete, incomplete = replicas[0].values() info[5] = (complete + incomplete)[0] if info[4][:3] == "ad:": info[4] = info[4][3:] info[0] = subtask_dsname infos.append(",".join(info))
complete, incomplete = replicas[0].values() info[5] = (complete + incomplete)[0] if info[4][:3] == "ad:": info[4] = info[4][3:]
def checkCompletedApp(self, app): task = self._getParent() j = app._getParent() for odat in j.outputdata.outputdata: # Look out: if this is changed, there is anothher one like it below! if 0==len([f for f in j.outputdata.output if ".".join(odat.split(".")[:-1]) in f]): logger.error("Job %s has not produced %s file, only: %s" % (j.id, odat, j.outputdata.output)) return False # if this is the first app to complete the partition... if self.getPartitionStatus(self._app_partition[app.id]) != "completed": task_container, subtask_dsname = task.container_name, self.dataset_name outputdata = DQ2OutputDataset() try: outputdata.create_dataset(subtask_dsname) except DQDatasetExistsException: pass try: infos = [] try: dq2_lock.acquire() for oinfo in j.outputdata.output: info = oinfo.split(",") # get master replica from dataset - info not set to SE; but to ANALY_XYZ from panda master_replica = dq2.getMasterReplicaLocation(info[0]) if master_replica: info[5] = master_replica else: replicas = dq2.listDatasetReplicas(info[0]).values() if len(replicas) == 0: info[5] = getPandaClient().PandaSites[info[5]]["ddm"] else: complete, incomplete = replicas[0].values() info[5] = (complete + incomplete)[0] if info[4][:3] == "ad:": info[4] = info[4][3:] info[0] = subtask_dsname infos.append(",".join(info)) finally: dq2_lock.release()
22eb5f2b77d91912e824961af9976a99bd6842b5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1488/22eb5f2b77d91912e824961af9976a99bd6842b5/AnaTransform.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 9556, 3371, 12, 2890, 16, 595, 4672, 1562, 273, 365, 6315, 588, 3054, 1435, 525, 273, 595, 6315, 588, 3054, 1435, 364, 320, 3404, 316, 525, 18, 2844, 892, 18, 2844, 892, 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, 866, 9556, 3371, 12, 2890, 16, 595, 4672, 1562, 273, 365, 6315, 588, 3054, 1435, 525, 273, 595, 6315, 588, 3054, 1435, 364, 320, 3404, 316, 525, 18, 2844, 892, 18, 2844, 892, 30, 468, ...
def _ppf_tosolve(self, x, q, *args): return apply(self.cdf, (x, )+args) - q
def _ppf_tosolve(self, x, q, *args): return apply(self.cdf, (x, )+args) - q
e30c53e4e1f48dd6cf050ad084549d4fe72837b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12971/e30c53e4e1f48dd6cf050ad084549d4fe72837b5/distributions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11858, 74, 67, 14627, 5390, 12, 2890, 16, 619, 16, 1043, 16, 380, 1968, 4672, 327, 2230, 12, 2890, 18, 24799, 16, 261, 92, 16, 27462, 1968, 13, 300, 1043, 2, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11858, 74, 67, 14627, 5390, 12, 2890, 16, 619, 16, 1043, 16, 380, 1968, 4672, 327, 2230, 12, 2890, 18, 24799, 16, 261, 92, 16, 27462, 1968, 13, 300, 1043, 2, -100, -100, -100, -...
dc.SetPen(wx.Pen('light gray', 1))
dc.SetPen(wx.Pen(wx.BLACK, 1))
def Draw(self, dc): size = self.GetClientSize() width = size.width height = size.height backColour = self.GetBackgroundColour() backBrush = wx.Brush(backColour, wx.SOLID) backPen = wx.Pen(backColour, 0) dc.SetBackground(backBrush) dc.Clear() if not self.data or width < 50 or height < 50: self.empty = True return self.empty = False
1463c7aaacf2479ce4d28e2623a06fda1f6c6436 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1831/1463c7aaacf2479ce4d28e2623a06fda1f6c6436/GanttChart.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 4672, 963, 273, 365, 18, 967, 1227, 1225, 1435, 1835, 273, 963, 18, 2819, 2072, 273, 963, 18, 4210, 225, 1473, 26404, 273, 365, 18, 967, 8199, 26404, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 12, 2890, 16, 6744, 4672, 963, 273, 365, 18, 967, 1227, 1225, 1435, 1835, 273, 963, 18, 2819, 2072, 273, 963, 18, 4210, 225, 1473, 26404, 273, 365, 18, 967, 8199, 26404, 1435, 1...
raise KeyError("Language %s in family %s is obsolete" % (self.lang, self.family.name))
pass
def __init__(self, code, fam=None, user=None, persistent_http = None): self.lang = code.lower() if isinstance(fam, basestring) or fam is None: self.family = Family(fam, fatal = False) else: self.family = fam
c02cc623d4ae8849a3c7c95427bab04cc2077b8e /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4404/c02cc623d4ae8849a3c7c95427bab04cc2077b8e/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 981, 16, 26688, 33, 7036, 16, 729, 33, 7036, 16, 9195, 67, 2505, 273, 599, 4672, 365, 18, 4936, 273, 981, 18, 8167, 1435, 309, 1549, 12, 74, 301, 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, 1001, 2738, 972, 12, 2890, 16, 981, 16, 26688, 33, 7036, 16, 729, 33, 7036, 16, 9195, 67, 2505, 273, 599, 4672, 365, 18, 4936, 273, 981, 18, 8167, 1435, 309, 1549, 12, 74, 301, 16, ...
sage: E=EllipticCurve('14a1')
sage: E = EllipticCurve('14a1')
def has_split_multiplicative_reduction(self): r""" Return True if there is split multiplicative reduction.
e8b4186c4eff9611db149cc7ab3d28774ae15049 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/e8b4186c4eff9611db149cc7ab3d28774ae15049/ell_local_data.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 711, 67, 4939, 67, 7027, 28884, 67, 1118, 4062, 12, 2890, 4672, 436, 8395, 2000, 1053, 309, 1915, 353, 1416, 3309, 28884, 225, 20176, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 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, 711, 67, 4939, 67, 7027, 28884, 67, 1118, 4062, 12, 2890, 4672, 436, 8395, 2000, 1053, 309, 1915, 353, 1416, 3309, 28884, 225, 20176, 18, 2, -100, -100, -100, -100, -100, -100, -100, -10...
self.globalContexts = filter(lambda c: len(c.attributes) + len(c.metas) < mp, self.globalContexts)
self.globalContexts = filter(lambda c: (c.attributes and len(c.attributes) or 0) + (c.metas and len(c.metas) or 0) < mp, self.globalContexts)
def mergeBack(self, widget): if not self.syncWithGlobal: self.globalContexts.extend(getattr(widget, self.localContextName)) mp = self.maxAttributesToPickle self.globalContexts = filter(lambda c: len(c.attributes) + len(c.metas) < mp, self.globalContexts) self.globalContexts.sort(lambda c1,c2: -cmp(c1.time, c2.time)) self.globalContexts = self.globalContexts[:self.maxSavedContexts]
b878d7012c31c1737cb2efb62e2fb806481542b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6366/b878d7012c31c1737cb2efb62e2fb806481542b7/OWContexts.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2691, 2711, 12, 2890, 16, 3604, 4672, 309, 486, 365, 18, 8389, 1190, 5160, 30, 365, 18, 6347, 15518, 18, 14313, 12, 588, 1747, 12, 6587, 16, 365, 18, 3729, 1042, 461, 3719, 6749, 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, 2691, 2711, 12, 2890, 16, 3604, 4672, 309, 486, 365, 18, 8389, 1190, 5160, 30, 365, 18, 6347, 15518, 18, 14313, 12, 588, 1747, 12, 6587, 16, 365, 18, 3729, 1042, 461, 3719, 6749, 273, ...
"""
"""
def fl_create_generic_canvas(canvas_class, type, x, y, w, h, label): """ fl_create_generic_canvas(canvas_class, type, x, y, w, h, label) -> object """ retval = _fl_create_generic_canvas(canvas_class, type, x, y, w, h, label) return retval
9942dac8ce2b35a1e43615a26fd8e7054ef805d3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/9942dac8ce2b35a1e43615a26fd8e7054ef805d3/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 13540, 67, 15424, 12, 15424, 67, 1106, 16, 618, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 13540, 67, 15424, 12, 15424, 67, 110...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 2640, 67, 13540, 67, 15424, 12, 15424, 67, 1106, 16, 618, 16, 619, 16, 677, 16, 341, 16, 366, 16, 1433, 4672, 3536, 1183, 67, 2640, 67, 13540, 67, 15424, 12, 15424, 67, 110...
oscmd("rm -rf linuxroot data.tar.gz control.tar.gz rpmarch.txt panda3d.spec")
if (os.path.exists("/usr/bin/dpkg-deb")): oscmd("dpkg --print-architecture > built/tmp/architecture.txt") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '{%_arch}' > built/tmp/architecture.txt") ARCH=ReadFile("built/tmp/architecture.txt") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
def MakeInstallerLinux(): import compileall PYTHONV=os.path.basename(PYTHONSDK) if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz rpmarch.txt panda3d.spec") oscmd("mkdir -p linuxroot/usr/bin") oscmd("mkdir -p linuxroot/usr/include") oscmd("mkdir -p linuxroot/usr/share/panda3d") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload") oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages") oscmd("mkdir -p linuxroot/etc/ld.so.conf.d") oscmd("sed -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc") oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc") oscmd("cp --recursive built/include linuxroot/usr/include/panda3d") oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct") oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac") oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw") oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py") oscmd("cp --recursive SceneEditor linuxroot/usr/share/panda3d/SceneEditor") oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models") oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples") oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE") oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE") oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes") oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf") oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth") oscmd("cp built/bin/* linuxroot/usr/bin/") for base in os.listdir("built/lib"): oscmd("ln -sf /usr/lib/"+base+" linuxroot/usr/lib/"+PYTHONV+"/lib-dynload/"+base) oscmd("cp built/lib/"+base+" linuxroot/usr/lib/"+base) for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"): if ((base != "extensions") and (base != "extensions_native")): compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base) compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw") compileall.compile_dir("linuxroot/usr/share/panda3d/SceneEditor") oscmd("chmod -R 555 linuxroot/usr/share/panda3d") if (os.path.exists("/usr/bin/dpkg-deb")): txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV) oscmd("mkdir -p linuxroot/DEBIAN") oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums") oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums") WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n") WriteFile("linuxroot/DEBIAN/control",txt) oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_i386.deb") oscmd("chmod -R 755 linuxroot") if (os.path.exists("/usr/bin/rpmbuild")): oscmd("rpm -E '{%_arch}' > rpmarch.txt") arch=ReadFile("rpmarch.txt") oscmd("rm -rf "+arch) txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE) WriteFile("panda3d.spec", txt) oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec") if (os.path.exists(arch+"/panda3d-"+VERSION+"-1."+arch+".rpm")): oscmd("mv "+arch+"/panda3d-"+VERSION+"-1."+arch+".rpm .") oscmd("rm -rf rpmarch.txt "+arch) oscmd("chmod -R 755 linuxroot") oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec")
6338a2c4c448febe6a1ba5735f2e3ce419a80c96 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7242/6338a2c4c448febe6a1ba5735f2e3ce419a80c96/makepanda.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4344, 18678, 19475, 13332, 1930, 4074, 454, 12191, 20131, 58, 33, 538, 18, 803, 18, 13909, 12, 16235, 20131, 22625, 13, 309, 261, 538, 18, 803, 18, 291, 1214, 2932, 20132, 3085, 6, 3719,...
def status(files = [], modified = False, new = False, deleted = False,
def status(files = None, modified = False, new = False, deleted = False,
def status(files = [], modified = False, new = False, deleted = False, conflict = False, unknown = False, noexclude = False): """Show the tree status """ cache_files = __tree_status(files, unknown = True, noexclude = noexclude) all = not (modified or new or deleted or conflict or unknown) if not all: filestat = [] if modified: filestat.append('M') if new: filestat.append('A') filestat.append('N') if deleted: filestat.append('D') if conflict: filestat.append('C') if unknown: filestat.append('?') cache_files = [x for x in cache_files if x[0] in filestat] for fs in cache_files: if all: print '%s %s' % (fs[0], fs[1]) else: print '%s' % fs[1]
9216b6023d6840c457172b375e14443189f7ef89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12366/9216b6023d6840c457172b375e14443189f7ef89/git.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 2354, 273, 599, 16, 4358, 273, 1083, 16, 394, 273, 1083, 16, 4282, 273, 1083, 16, 7546, 273, 1083, 16, 5917, 273, 1083, 16, 1158, 10157, 273, 1083, 4672, 3536, 5706, 326, 215...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1267, 12, 2354, 273, 599, 16, 4358, 273, 1083, 16, 394, 273, 1083, 16, 4282, 273, 1083, 16, 7546, 273, 1083, 16, 5917, 273, 1083, 16, 1158, 10157, 273, 1083, 4672, 3536, 5706, 326, 215...
self.body.append('<em>')
self.body.append(self.starttag(node, 'em', ''))
def visit_emphasis(self, node): self.body.append('<em>')
f363e3bbe6bb59319b53129ca5fa2685b029cc0c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5620/f363e3bbe6bb59319b53129ca5fa2685b029cc0c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 351, 844, 17247, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 32, 351, 1870, 13, 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, 3757, 67, 351, 844, 17247, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 32, 351, 1870, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
def run(self):
def virtualenv_exists(self):
def run(self): path = self.path_resolved if os.path.exists(path) and os.path.exists(os.path.join(path, 'lib')): if self.never_create_virtualenv: self.logger.notify('Skipping virtualenv creation as directory %s exists' % path) return if not self.project.config.getdefault('DEFAULT', 'force_virtualenv'): self.logger.notify('Skipping virtualenv creation as directory %s exists' % path) return else: self.logger.notify('Forcing virtualenv recreation') if self.never_create_virtualenv: self.logger.fatal("Virtualenv at %s does not exist, but should already exist!" % path) raise Exception import virtualenv if not self.different_python: ## FIXME: kind of a nasty hack, but maybe it's okay? virtualenv.logger = self.logger self.logger.level_adjust -= 2 try: virtualenv.create_environment(path, site_packages=self.site_packages) finally: self.logger.level_adjust += 2 else: venv_path = virtualenv.__file__ if not venv_path: self.logger.fatal("Can't find 'virtualenv' binary") return if venv_path.endswith('.pyc') or venv_path.endswith('.pyo'): venv_path = venv_path[:-1] venv_args = [self.different_python, venv_path] if not self.site_packages: venv_args.append('--no-site-packages') venv_args.append(path) self.logger.notify('Subprocess virtualenv creation') proc = subprocess.Popen(venv_args, stdout=subprocess.PIPE) proc.communicate() self.logger.notify('virtualenv created in %s' % path)
e00125250ca18e60e1c670d335c40fc6b9c63a7a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12796/e00125250ca18e60e1c670d335c40fc6b9c63a7a/tasks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26737, 67, 1808, 12, 2890, 4672, 589, 273, 365, 18, 803, 67, 11792, 309, 1140, 18, 803, 18, 1808, 12, 803, 13, 471, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 803, 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, 26737, 67, 1808, 12, 2890, 4672, 589, 273, 365, 18, 803, 67, 11792, 309, 1140, 18, 803, 18, 1808, 12, 803, 13, 471, 1140, 18, 803, 18, 1808, 12, 538, 18, 803, 18, 5701, 12, 803, 16...
from MythTV import MythDB, DBData, Video, MythVideo, MythBE, MythError, MythLog
from MythTV import MythDB, DBData, Video, MythVideo, MythBE, MythError, MythLog, RecordedProgram
def __getattr__(self, attr): """Delegate everything but write to the stream""" return getattr(self.out, attr)
619ac1009ceeb785c0ebdccd1b235661e895634e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13713/619ac1009ceeb785c0ebdccd1b235661e895634e/jamu.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 9586, 7756, 1496, 1045, 358, 326, 1407, 8395, 327, 3869, 12, 2890, 18, 659, 16, 1604, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 588, 1747, 972, 12, 2890, 16, 1604, 4672, 3536, 9586, 7756, 1496, 1045, 358, 326, 1407, 8395, 327, 3869, 12, 2890, 18, 659, 16, 1604, 13, 2, -100, -100, -100, -100, -100, -100, -...
self.beads[i-ii].set_color(self.colors[3])
if bead.max_fade_level > 0: self.beads[i-ii].set_color(self.colors[3])
def move_bead(self, sprite, dy): """ Move a bead (or beads) up or down a rod. """
faafbc3e015d79308b3fb3ec3b28368578ec51d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/faafbc3e015d79308b3fb3ec3b28368578ec51d0/abacus_window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 70, 684, 12, 2890, 16, 16839, 16, 7732, 4672, 3536, 9933, 279, 506, 361, 261, 280, 506, 17318, 13, 731, 578, 2588, 279, 721, 72, 18, 3536, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 67, 70, 684, 12, 2890, 16, 16839, 16, 7732, 4672, 3536, 9933, 279, 506, 361, 261, 280, 506, 17318, 13, 731, 578, 2588, 279, 721, 72, 18, 3536, 2, -100, -100, -100, -100, -100, ...
if self.group.name in self.widget.conversations:
groupname = ' if groupname in self.widget.conversations:
def show(self): """If you don't have a GUI, this is a no-op. """ if self.group.name in self.widget.conversations: self.widget.foregroundConversation = self self.widget.callRemote("show", unicode(self.group.name))
a789faa1e4b879086cb75dae348f7250b22252de /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2289/a789faa1e4b879086cb75dae348f7250b22252de/minchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 12, 2890, 4672, 3536, 2047, 1846, 2727, 1404, 1240, 279, 10978, 16, 333, 353, 279, 1158, 17, 556, 18, 3536, 25329, 273, 296, 309, 25329, 316, 365, 18, 6587, 18, 591, 20494, 30, 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, 2405, 12, 2890, 4672, 3536, 2047, 1846, 2727, 1404, 1240, 279, 10978, 16, 333, 353, 279, 1158, 17, 556, 18, 3536, 25329, 273, 296, 309, 25329, 316, 365, 18, 6587, 18, 591, 20494, 30, 3...
pattern, flags = key
def _compile_typed(type, *key): # internal: compile pattern pattern, flags = key if isinstance(pattern, _pattern_type): if flags: raise ValueError( "Cannot process flags argument with a compiled pattern") return pattern if not sre_compile.isstring(pattern): raise TypeError("first argument must be string or compiled pattern") return sre_compile.compile(pattern, flags) return p
fe479f4d1bd2f50724d0db612bcc9ae01fa36ad3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8125/fe479f4d1bd2f50724d0db612bcc9ae01fa36ad3/re.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 11100, 67, 11585, 12, 723, 16, 380, 856, 4672, 468, 2713, 30, 4074, 1936, 309, 1549, 12, 4951, 16, 389, 4951, 67, 723, 4672, 309, 2943, 30, 1002, 2068, 12, 315, 4515, 1207, 2943, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 11100, 67, 11585, 12, 723, 16, 380, 856, 4672, 468, 2713, 30, 4074, 1936, 309, 1549, 12, 4951, 16, 389, 4951, 67, 723, 4672, 309, 2943, 30, 1002, 2068, 12, 315, 4515, 1207, 2943, ...
if k not in current: cell.append('%s: (no value)'%k) else:
if current.has_key(k):
def history(self, direction='descending', dre=re.compile('\d+')): l = ['<table class="history">' '<tr><th colspan="4" class="header">', _('History'), '</th></tr><tr>', _('<th>Date</th>'), _('<th>User</th>'), _('<th>Action</th>'), _('<th>Args</th>'), '</tr>'] current = {} comments = {} history = self._klass.history(self._nodeid) history.sort() if direction == 'descending': history.reverse() for prop_n in self._props: prop = self[prop_n] if isinstance(prop, HTMLProperty): current[prop_n] = prop.plain() # make link if hrefable if prop_n in self._props and isinstance(self._props[prop_n], hyperdb.Link): classname = self._props[prop_n].classname if os.path.exists(os.path.join(self._db.config.TEMPLATES, classname + '.item')): current[prop_n] = '<a href="%s%s">%s</a>'%(classname, self._klass.get(self._nodeid, prop_n, None), current[prop_n])
8e4fa728a66534e70bb1cfec9fe5df00dd4a1b9b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/8e4fa728a66534e70bb1cfec9fe5df00dd4a1b9b/templating.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2890, 16, 4068, 2218, 5569, 2846, 2187, 302, 266, 33, 266, 18, 11100, 2668, 64, 72, 6797, 3719, 30, 328, 273, 10228, 32, 2121, 667, 1546, 8189, 7918, 2368, 313, 4438, 451, 20...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4927, 12, 2890, 16, 4068, 2218, 5569, 2846, 2187, 302, 266, 33, 266, 18, 11100, 2668, 64, 72, 6797, 3719, 30, 328, 273, 10228, 32, 2121, 667, 1546, 8189, 7918, 2368, 313, 4438, 451, 20...
w['volume'].set_active(0)
w['collection'].set_active(0)
def set_details(self, item=None):#{{{ if item is None: item = {} if 'movie_id' in item and item['movie_id']: self._am_movie_id = item['movie_id'] else: self._am_movie_id = None w = self.widgets['add'] cast_buffer = w['cast'].get_buffer() notes_buffer = w['notes'].get_buffer() plot_buffer = w['plot'].get_buffer() if 'o_title' in item and item['o_title']: w['o_title'].set_text(item['o_title']) else: w['o_title'].set_text('') if 'title' in item and item['title']: w['title'].set_text(item['title']) else: w['title'].set_text('') if 'number' in item and item['number']: w['number'].set_value(int(item['number'])) else: w['number'].set_value(int(gutils.find_next_available(self.db))) if 'title' in item and item['title']: w['title'].set_text(item['title']) if 'year' in item and item['year']: w['year'].set_value( gutils.digits_only(item['year'], 2100)) else: w['year'].set_value(0) if 'resolution' in item and item['resolution']: if self.config.get('use_resolution_alias', True): w['resolution'].set_text(item['resolution']) elif 'height' in item and item['height'] and 'width' in item and item['width']: w['resolution'].set_text("%dx%d" % (item['width'], item['height'])) else: # failback to 'resolution' w['resolution'].set_text(item['resolution']) else: w['resolution'].set_text('') if 'runtime' in item and item['runtime']: w['runtime'].set_value( gutils.digits_only(item['runtime'])) else: w['runtime'].set_value(0) if 'barcode' in item and item['barcode']: w['barcode'].set_text(item['barcode']) else: w['barcode'].set_text('') if 'cameraman' in item and item['cameraman']: w['cameraman'].set_text(item['cameraman']) else: w['cameraman'].set_text('') if 'screenplay' in item and item['screenplay']: w['screenplay'].set_text(item['screenplay']) else: w['screenplay'].set_text('') if 'country' in item and item['country']: w['country'].set_text(item['country']) else: w['country'].set_text('') if 'classification' in item and item['classification']: w['classification'].set_text(item['classification']) else: w['classification'].set_text('') if 'studio' in item and item['studio']: w['studio'].set_text(item['studio']) else: w['studio'].set_text('') if 'o_site' in item and item['o_site']: w['o_site'].set_text(item['o_site']) else: w['o_site'].set_text('') if 'director' in item and item['director']: w['director'].set_text(item['director']) else: w['director'].set_text('') if 'site' in item and item['site']: w['site'].set_text(item['site']) else: w['site'].set_text('') if 'trailer' in item and item['trailer']: w['trailer'].set_text(item['trailer']) else: w['trailer'].set_text('') if 'genre' in item and item['genre']: w['genre'].set_text(item['genre']) else: w['genre'].set_text('') if 'color' in item and item['color']: w['color'].set_active( gutils.digits_only(item['color'], 3)) else: w['color'].set_active( gutils.digits_only(self.config.get('color', 0, section='defaults'), 3)) if 'layers' in item and item['layers']: w['layers'].set_active( gutils.digits_only(item['layers'], 4)) else: w['layers'].set_active( gutils.digits_only(self.config.get('layers', 0, section='defaults'), 4)) if 'region' in item and item['region']>=0: w['region'].set_active( gutils.digits_only(item['region'], 8)) else: w['region'].set_active( gutils.digits_only(self.config.get('region', 0, section='defaults'), 8)) if 'cond' in item and item['cond']>=0: w['condition'].set_active( gutils.digits_only( item['cond'], 5) ) else: w['condition'].set_active( gutils.digits_only( self.config.get('condition', 0, section='defaults'), 5)) if 'media_num' in item and item['media_num']: w['discs'].set_value( gutils.digits_only(item['media_num'])) else: w['discs'].set_value(1) if 'rating' in item and item['rating']: w['rating_slider'].set_value( gutils.digits_only(item['rating'], 10) ) else: w['rating_slider'].set_value(0) if 'seen' in item and item['seen'] is True: w['seen'].set_active(True) else: w['seen'].set_active(False) if 'cast' in item and item['cast']: cast_buffer.set_text(item['cast']) else: cast_buffer.set_text('') if 'notes' in item and item['notes']: notes_buffer.set_text(item['notes']) else: notes_buffer.set_text('') if 'plot' in item and item['plot']: plot_buffer.set_text(item['plot']) else: plot_buffer.set_text('') pos = 0 if 'medium_id' in item and item['medium_id']: pos = gutils.findKey(item['medium_id'], self.media_ids) else: pos = gutils.findKey(int(self.config.get('media', 0, section='defaults')), self.media_ids) if pos is not None: w['media'].set_active(int(pos)) else: w['media'].set_active(0) pos = 0 if 'vcodec_id' in item and item['vcodec_id']: pos = gutils.findKey(item['vcodec_id'], self.vcodecs_ids) else: pos = gutils.findKey(int(self.config.get('vcodec', 0, section='defaults')), self.vcodecs_ids) if pos is not None: w['vcodec'].set_active(int(pos)) else: w['vcodec'].set_active(0) pos = 0 if 'volume_id' in item and item['volume_id']: pos = gutils.findKey(item['volume_id'], self.volume_combo_ids) if pos is not None: w['volume'].set_active(int(pos)) else: w['volume'].set_active(0) pos = 0 if 'collection_id' in item and item['collection_id']: pos = gutils.findKey(item['collection_id'], self.collection_combo_ids) if pos is not None: w['collection'].set_active(int(pos)) else: w['volume'].set_active(0) # tags for tag in self.am_tags: self.am_tags[tag].set_active(False) if 'tags' in item: for tag in item['tags']: i = gutils.findKey(tag.tag_id, self.tags_ids) self.am_tags[i].set_active(True) # languages w['lang_treeview'].get_model().clear() if 'languages' in item and len(item['languages'])>0: for i in item['languages']: self.create_language_row(i) # poster if 'poster_md5' in item and item['poster_md5']: image_path = gutils.get_image_fname(item["poster_md5"], self.db, 'm') if not image_path: image_path = '' # isfile doesn't like bool w['image'].set_text(item['poster_md5']) elif 'image' in item and item['image']: if len(item["image"])==32: # md5 image_path = gutils.get_image_fname(item["image"], self.db, 'm') if not image_path: image_path = '' # isfile doesn't like bool else: w['image'].set_text(item['image']) else: image_path = os.path.join(self.locations['posters'], "m_%s.jpg" % item['image']) log.warn("TODO: image=%s", item['image']) else: w['image'].set_text('') image_path = gutils.get_defaultimage_fname(self) if not os.path.isfile(image_path): image_path = gutils.get_defaultimage_fname(self) w['picture'].set_from_file(image_path) w['notebook'].set_current_page(0) w['o_title'].grab_focus() #}}}
21b0c21af0933dd58e93d6b9ff7376d04bca346b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2687/21b0c21af0933dd58e93d6b9ff7376d04bca346b/add.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 6395, 12, 2890, 16, 761, 33, 7036, 4672, 3642, 12187, 309, 761, 353, 599, 30, 761, 273, 2618, 309, 296, 8683, 13120, 67, 350, 11, 316, 761, 471, 761, 3292, 8683, 13120, 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, 444, 67, 6395, 12, 2890, 16, 761, 33, 7036, 4672, 3642, 12187, 309, 761, 353, 599, 30, 761, 273, 2618, 309, 296, 8683, 13120, 67, 350, 11, 316, 761, 471, 761, 3292, 8683, 13120, 67, ...
if p.protocol == 'irc':
if p.protocol == 'xmpp':
def removeParticipant(self, protocol, nickname, leave_message): """Remove the participant using nickname from the bridge. Raises a NoSuchParticipantException if nickname is not used in the bridge.""" p = self.getParticipant(nickname) if p.protocol == 'both': self.bot.error('===> Debug: "'+nickname+'" was on both sides of bridge "'+str(self)+'" but left '+protocol, debug=True) if protocol == 'xmpp': p.protocol = 'irc' p.createDuplicateOnXMPP() elif protocol == 'irc': p.protocol = 'xmpp' p.createDuplicateOnIRC() else: raise Exception('Internal Error: bad protocol') else: self.bot.error('===> Debug: removing participant "'+nickname+'" from bridge "'+str(self)+'"', debug=True) self.participants.remove(p) p.leave(leave_message) i = 0 for p in self.participants: if p.protocol == 'irc': i += 1 if protocol == 'xmpp' and self.irc_connections_limit >= i: self.switchToNormalMode() del p
9f3b18b017073051cc79b18a6db5d60921f7c71c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9915/9f3b18b017073051cc79b18a6db5d60921f7c71c/bridge.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 22540, 12, 2890, 16, 1771, 16, 19570, 16, 8851, 67, 2150, 4672, 3536, 3288, 326, 14188, 1450, 19570, 628, 326, 10105, 18, 20497, 279, 5823, 22540, 503, 309, 19570, 353, 486, 1399, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 22540, 12, 2890, 16, 1771, 16, 19570, 16, 8851, 67, 2150, 4672, 3536, 3288, 326, 14188, 1450, 19570, 628, 326, 10105, 18, 20497, 279, 5823, 22540, 503, 309, 19570, 353, 486, 1399, ...
line = 'Print( %s );'%line.rstrip().rstrip(';')
line0 = 'Print( %s );'%line.rstrip().rstrip(';') try: return Expect._eval_line_using_file(self, line0, tmp) except RuntimeError, msg: return ''
def _eval_line_using_file(self, line, tmp): i = line.find(':=') if i != -1: j = line.find('"') if j >= 0 and j < i: i = -1 if i == -1: line = 'Print( %s );'%line.rstrip().rstrip(';') return Expect._eval_line_using_file(self, line, tmp)
48dfb3664ef3eafea1a35425b3e0e9c2547500fa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/48dfb3664ef3eafea1a35425b3e0e9c2547500fa/gap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 67, 9940, 67, 768, 12, 2890, 16, 980, 16, 1853, 4672, 277, 273, 980, 18, 4720, 2668, 30, 2218, 13, 309, 277, 480, 300, 21, 30, 525, 273, 980, 18, 4720, 2668, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 8622, 67, 1369, 67, 9940, 67, 768, 12, 2890, 16, 980, 16, 1853, 4672, 277, 273, 980, 18, 4720, 2668, 30, 2218, 13, 309, 277, 480, 300, 21, 30, 525, 273, 980, 18, 4720, 2668, 5...
chunk = self.fp.read(amt)
chunk = self.fp.read(min(amt, MAXAMOUNT))
def _safe_read(self, amt): """Read the number of bytes requested, compensating for partial reads.
80ba8e85490515c293959a4196cbd99b1b3819a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/80ba8e85490515c293959a4196cbd99b1b3819a2/httplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4626, 67, 896, 12, 2890, 16, 25123, 4672, 3536, 1994, 326, 1300, 434, 1731, 3764, 16, 1161, 773, 1776, 364, 4702, 6838, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 4626, 67, 896, 12, 2890, 16, 25123, 4672, 3536, 1994, 326, 1300, 434, 1731, 3764, 16, 1161, 773, 1776, 364, 4702, 6838, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
width=[62,42,20,62,51,50,24]
width=[62,38,29,67,53,53,27]
def repeat_In(self, lst, name, nodes_parent=False,td=False,width=[],value=[],type=[]): self._node.data = '' node = self._find_parent(self._node, nodes_parent or parents) ns = node.nextSibling
43068ba9c8ee694cb16b49778cac85191158d408 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7397/43068ba9c8ee694cb16b49778cac85191158d408/report_account_invoice_layout.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7666, 67, 382, 12, 2890, 16, 9441, 16, 508, 16, 2199, 67, 2938, 33, 8381, 16, 4465, 33, 8381, 16, 2819, 22850, 6487, 1132, 22850, 6487, 723, 33, 8526, 4672, 365, 6315, 2159, 18, 892, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7666, 67, 382, 12, 2890, 16, 9441, 16, 508, 16, 2199, 67, 2938, 33, 8381, 16, 4465, 33, 8381, 16, 2819, 22850, 6487, 1132, 22850, 6487, 723, 33, 8526, 4672, 365, 6315, 2159, 18, 892, ...
return '%s (%s in terms of %s)' % \ (self._name, self.indep_var, ', '.join(self.dep_vars)) class _ArbCoordTrans(_CoordTrans): """ An arbitrary coordinate system transformation. """ def __init__(self, custom_trans, fvar): """
""" Print out a coordinate system :: sage: from sage.plot.plot3d.plot3d import _ArbitraryCoordinates as arb sage: x,y,z=var('x,y,z') sage: c=arb((x+z,y*z,z), z, (x,y)) sage: c Arbitrary Coordinates coordinate transform (z in terms of x, y) sage: c.__dict__['_name'] = 'My Special Coordinates' sage: c My Special Coordinates coordinate transform (z in terms of x, y) """ return '%s coordinate transform (%s in terms of %s)' % \ (self._name, self.dep_var, ', '.join(self.indep_vars)) class _ArbitraryCoordinates(_Coordinates): """ An arbitrary coordinate system. """ _name = "Arbitrary Coordinates" def __init__(self, custom_trans, dep_var, indep_vars): """ Initialize an arbitrary coordinate system.
def __repr__(self): return '%s (%s in terms of %s)' % \ (self._name, self.indep_var, ', '.join(self.dep_vars))
6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/6a6b82f7e5f5e44ecfe79fc9e370831de7c2ec87/plot3d.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 1995, 87, 6142, 87, 316, 6548, 434, 738, 87, 2506, 738, 521, 261, 2890, 6315, 529, 16, 365, 18, 267, 15037, 67, 1401, 16, 2265, 2418, 5701, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 1995, 87, 6142, 87, 316, 6548, 434, 738, 87, 2506, 738, 521, 261, 2890, 6315, 529, 16, 365, 18, 267, 15037, 67, 1401, 16, 2265, 2418, 5701, 12, ...
if len(res['Value']) > 0:
if len(result['Value']) > 0:
def getJobInfo( self, jobID, parameters=[] ): """ Get parameters for job specified by jobID. Parameters can be either job attributes ( fields in the Jobs table ) or those stored in the JobParameters table. The return value is a dictionary of the structure: Dict[Name] = Value """
1003ac61d116370b07cee16aacc54dc3897c4044 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12864/1003ac61d116370b07cee16aacc54dc3897c4044/JobDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 966, 12, 365, 16, 28913, 16, 1472, 33, 8526, 262, 30, 3536, 968, 1472, 364, 1719, 1269, 635, 28913, 18, 7012, 848, 506, 3344, 1719, 1677, 261, 1466, 316, 326, 26909, 1014, 262, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13024, 966, 12, 365, 16, 28913, 16, 1472, 33, 8526, 262, 30, 3536, 968, 1472, 364, 1719, 1269, 635, 28913, 18, 7012, 848, 506, 3344, 1719, 1677, 261, 1466, 316, 326, 26909, 1014, 262, ...
dx, dy = args
if len(args) == 1: dx, dy = args[0], 0 else: dx, dy = args
def parse_transform(self, trafo_string): trafo = self.trafo #print trafo trafo_string = as_latin1(trafo_string) while trafo_string: #print trafo_string match = rx_trafo.match(trafo_string) if match: function = match.group(1) args = string.translate(match.group(2), commatospace) args = map(float, split(args)) trafo_string = trafo_string[match.end(0):] if function == 'matrix': trafo = trafo(apply(Trafo, tuple(args))) elif function == 'scale': trafo = trafo(Scale(args[0])) elif function == 'translate': dx, dy = args trafo = trafo(Translation(dx, dy)) elif function == 'rotate': trafo = trafo(Rotation(args[0] * degrees)) elif function == 'skewX': trafo = trafo(Trafo(1, 0, tan(args[0] * degrees), 1, 0, 0)) elif function == 'skewY': trafo = trafo(Trafo(1, tan(args[0] * degrees), 0, 1, 0, 0)) else: trafo_string = '' #print trafo self.trafo = trafo
07b415634b4274496833d0d5974c224c0a3977eb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3123/07b415634b4274496833d0d5974c224c0a3977eb/svgloader.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6547, 12, 2890, 16, 1284, 617, 67, 1080, 4672, 1284, 617, 273, 365, 18, 2033, 617, 468, 1188, 1284, 617, 1284, 617, 67, 1080, 273, 487, 67, 26578, 21, 12, 2033, 617, 67, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 6547, 12, 2890, 16, 1284, 617, 67, 1080, 4672, 1284, 617, 273, 365, 18, 2033, 617, 468, 1188, 1284, 617, 1284, 617, 67, 1080, 273, 487, 67, 26578, 21, 12, 2033, 617, 67, 10...
self.locOptAttrsToTry = 50
self.locOptAttrsToTry = 50
def __init__(self, visualizationMethod, graph = None): if not graph: if visualizationMethod == SCATTERPLOT: import orngScaleScatterPlotData graph = orngScaleScatterPlotData.orngScaleScatterPlotData() elif visualizationMethod == RADVIZ: import orngScaleLinProjData graph = orngScaleLinProjData.orngScaleLinProjData() graph.normalizeExamples = 1 graph.scalingByVariance = 0 elif visualizationMethod == LINEAR_PROJECTION: import orngScaleLinProjData graph = orngScaleLinProjData.orngScaleLinProjData() graph.normalizeExamples = 0 graph.scalingByVariance = 1 elif visualizationMethod == POLYVIZ: import orngScalePolyvizData graph = orngScalePolyvizData.orngScalePolyvizData() graph.normalizeExamples = 1 graph.scalingByVariance = 0 else: print "an invalid visualization method was specified. VizRank can not run." return
b9e52e096e6043bf925f92bc9842c2a83b088af5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/b9e52e096e6043bf925f92bc9842c2a83b088af5/orngVizRank.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 30056, 1305, 16, 2667, 273, 599, 4672, 309, 486, 2667, 30, 309, 30056, 1305, 422, 8795, 789, 2560, 20485, 56, 30, 1930, 578, 3368, 5587, 1541, 9293, 11532,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 30056, 1305, 16, 2667, 273, 599, 4672, 309, 486, 2667, 30, 309, 30056, 1305, 422, 8795, 789, 2560, 20485, 56, 30, 1930, 578, 3368, 5587, 1541, 9293, 11532,...
lifeTime = gConfig.getValue( "%s/RenewedLifeTime" % self.section, 54000 )
lifeTime = self.am_getOption( "RenewedLifeTime", 54000 )
def __renewProxyForCredentials( self, userDN, userGroup ): lifeTime = gConfig.getValue( "%s/RenewedLifeTime" % self.section, 54000 ) gLogger.info( "Renewing for %s@%s %s secs" % ( userDN, userGroup, lifeTime ) ) retVal = self.proxyDB.renewFromMyProxy( userDN, userGroup, lifeTime = lifeTime ) if not retVal[ 'OK' ]: gLogger.error( "Failed to renew for %s@%s : %s" %( userDN, userGroup, retVal[ 'Message' ] ) ) else: gLogger.info( "Renewed proxy for %s@%s" % ( userDN, userGroup ) )
f98d1fa9bed7bed2dbb44066e964a5e74a8db1af /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/f98d1fa9bed7bed2dbb44066e964a5e74a8db1af/MyProxyRenewalAgent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1187, 359, 3886, 1290, 6163, 12, 365, 16, 729, 8609, 16, 26205, 262, 30, 17140, 950, 273, 365, 18, 301, 67, 588, 1895, 12, 315, 24058, 329, 15315, 950, 3113, 22431, 3784, 262, 31...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1187, 359, 3886, 1290, 6163, 12, 365, 16, 729, 8609, 16, 26205, 262, 30, 17140, 950, 273, 365, 18, 301, 67, 588, 1895, 12, 315, 24058, 329, 15315, 950, 3113, 22431, 3784, 262, 31...
def cb(data): self.logger.info("%s returned" % method) xml = ElementTree.XML(data) if xml.tag == "rsp" and xml.get("stat") == "ok": return xml elif xml.tag == "rsp" and xml.get("stat") == "fail": err = xml.find("err") raise FlickrError(err.get("code"), err.get("msg")) else: raise FlickrError(0, "Invalid response") return self.__call(method, kwargs).addCallback(cb)
return self.__call(method, kwargs).addCallback(self.__cb, method)
def cb(data): self.logger.info("%s returned" % method) xml = ElementTree.XML(data) if xml.tag == "rsp" and xml.get("stat") == "ok": return xml elif xml.tag == "rsp" and xml.get("stat") == "fail": err = xml.find("err") raise FlickrError(err.get("code"), err.get("msg")) else: # Fake an error in this case raise FlickrError(0, "Invalid response")
ae80a02a17b08a0730d7b42bdbb82e5053e4c189 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11023/ae80a02a17b08a0730d7b42bdbb82e5053e4c189/flickrest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 12, 892, 4672, 365, 18, 4901, 18, 1376, 27188, 87, 2106, 6, 738, 707, 13, 2025, 273, 22566, 18, 4201, 12, 892, 13, 309, 2025, 18, 2692, 422, 315, 86, 1752, 6, 471, 2025, 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, 2875, 12, 892, 4672, 365, 18, 4901, 18, 1376, 27188, 87, 2106, 6, 738, 707, 13, 2025, 273, 22566, 18, 4201, 12, 892, 13, 309, 2025, 18, 2692, 422, 315, 86, 1752, 6, 471, 2025, 18, ...
self.interval.setValue(recipe.schedule if recipe.schedule is not None else 1)
self.allow_scheduling = True
def show_recipe(self, index): recipe = self._model.data(index, Qt.UserRole) self.current_recipe = recipe self.title.setText(recipe.title) self.author.setText(_('Created by: ') + recipe.author) self.description.setText(recipe.description if recipe.description else '') self.schedule.setChecked(recipe.schedule is not None) self.interval.setValue(recipe.schedule if recipe.schedule is not None else 1) self.detail_box.setVisible(True) self.account.setVisible(recipe.needs_subscription) self.interval.setEnabled(self.schedule.checkState() == Qt.Checked) key = 'recipe_account_info_%s'%recipe.id account_info = config[key] self.show_password.setChecked(False) if account_info: self.username.blockSignals(True) self.password.blockSignals(True) self.username.setText(account_info[0]) self.password.setText(account_info[1]) self.username.blockSignals(False) self.password.blockSignals(False) d = datetime.utcnow() - recipe.last_downloaded ld = '%.2f'%(d.days + d.seconds/(24.*3600)) if d < timedelta(days=366): self.last_downloaded.setText(_('Last downloaded: %s days ago')%ld) else: self.last_downloaded.setText(_('Last downloaded: never'))
0bb41a00a5980da0882a88d2286bdcc7eee40e69 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9125/0bb41a00a5980da0882a88d2286bdcc7eee40e69/scheduler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 3927, 3151, 12, 2890, 16, 770, 4672, 16100, 273, 365, 6315, 2284, 18, 892, 12, 1615, 16, 7354, 18, 1299, 2996, 13, 365, 18, 2972, 67, 3927, 3151, 273, 16100, 365, 18, 2649, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 3927, 3151, 12, 2890, 16, 770, 4672, 16100, 273, 365, 6315, 2284, 18, 892, 12, 1615, 16, 7354, 18, 1299, 2996, 13, 365, 18, 2972, 67, 3927, 3151, 273, 16100, 365, 18, 2649, ...
vereq(dir(None), dir(Ellipsis))
vereq(dir(object()), dir(Ellipsis))
def getdict(self): return "Not a dict!"
0b6525b470af0f0ae1043238578eb1be23a5c005 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0b6525b470af0f0ae1043238578eb1be23a5c005/test_descr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1576, 12, 2890, 4672, 327, 315, 1248, 279, 2065, 4442, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 1576, 12, 2890, 4672, 327, 315, 1248, 279, 2065, 4442, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
if currentTime - self.lastTime >= 1.0:
if currentTime - self.lastTime >= 1.0 or self.dragging:
def movieShouldTask_(self, movie): currentTime = self.getCurrentTimeInSeconds() if currentTime - self.lastTime >= 1.0: self.setNeedsDisplay_(YES) self.lastTime = currentTime return NO
a1b3933567a85a1dae4ed972fec32cf3381f941a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/a1b3933567a85a1dae4ed972fec32cf3381f941a/frontend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21360, 14309, 2174, 67, 12, 2890, 16, 21360, 4672, 6680, 273, 365, 18, 588, 3935, 950, 17840, 1435, 309, 6680, 300, 365, 18, 2722, 950, 1545, 404, 18, 20, 578, 365, 18, 15997, 1998, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21360, 14309, 2174, 67, 12, 2890, 16, 21360, 4672, 6680, 273, 365, 18, 588, 3935, 950, 17840, 1435, 309, 6680, 300, 365, 18, 2722, 950, 1545, 404, 18, 20, 578, 365, 18, 15997, 1998, 30...
for pandaID,cloud,sourceLabel in res:
for pandaID,cloud,prodSourceLabel in res:
def eraseDispDatasets(ids): _logger.debug("eraseDispDatasets") datasets = [] # get jobs status,jobs = Client.getJobStatus(ids) if status != 0: return # gather dispDBlcoks for job in jobs: # dispatchDS is not a DQ2 dataset in US if job.cloud == 'US': continue # erase disp datasets for production jobs only if job.prodSourceLabel != 'managed': continue for file in job.Files: if file.dispatchDBlock == 'NULL': continue if (not file.dispatchDBlock in datasets) and \ re.search('_dis\d+$',file.dispatchDBlock) != None: datasets.append(file.dispatchDBlock) # erase for dataset in datasets: _logger.debug('erase %s' % dataset) status,out = ddm.DQ2.main('eraseDataset',dataset) _logger.debug(out)
798daddfd952f32dd600620ea4f3ffe2b2807fc5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7525/798daddfd952f32dd600620ea4f3ffe2b2807fc5/copyArchive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22038, 1669, 84, 14305, 2413, 12, 2232, 4672, 389, 4901, 18, 4148, 2932, 264, 448, 1669, 84, 14305, 2413, 7923, 11109, 273, 5378, 468, 336, 6550, 1267, 16, 10088, 273, 2445, 18, 588, 234...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 22038, 1669, 84, 14305, 2413, 12, 2232, 4672, 389, 4901, 18, 4148, 2932, 264, 448, 1669, 84, 14305, 2413, 7923, 11109, 273, 5378, 468, 336, 6550, 1267, 16, 10088, 273, 2445, 18, 588, 234...
self._buf = ""
def flush(self): stuff = string.split(self._buf, '\n') stuff = string.join(stuff, '\r') self.setselection_at_end() self.ted.WEInsert(stuff, None, None) selstart, selend = self.getselection() self._inputstart = selstart self._buf = "" self.ted.WEClearUndo() self.updatescrollbars() if self._parentwindow.wid.GetWindowPort().QDIsPortBuffered(): self._parentwindow.wid.GetWindowPort().QDFlushPortBuffer(None)
7e94a9aae3ac7e1d2726dddaac744315313f218a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/7e94a9aae3ac7e1d2726dddaac744315313f218a/PyConsole.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 10769, 273, 533, 18, 4939, 12, 2890, 6315, 4385, 16, 2337, 82, 6134, 10769, 273, 533, 18, 5701, 12, 334, 3809, 16, 2337, 86, 6134, 365, 18, 542, 10705, 67, 270, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3663, 12, 2890, 4672, 10769, 273, 533, 18, 4939, 12, 2890, 6315, 4385, 16, 2337, 82, 6134, 10769, 273, 533, 18, 5701, 12, 334, 3809, 16, 2337, 86, 6134, 365, 18, 542, 10705, 67, 270, ...
if int(seg.get_value_by_ref_des('IEA01')) != self.gs_count:
if self._int(seg.get_value_by_ref_des('IEA01')) != self.gs_count:
def next(self): """ Iterate over input file segments """ self.errors = [] try: while True: if self.buffer.find(self.seg_term) == -1: # Need more data self.buffer += self.fd.read(DEFAULT_BUFSIZE) while True: # Get first segment in buffer (line, self.buffer) = self.buffer.split(self.seg_term, 1) line = line.strip().replace('\n','').replace('\r','') if line != '': break if line[-1] == self.ele_term: err_str = 'Segment contains trailing element terminators' #self.errors.append(('SEG1', err_str, src_line=self.cur_line+1)) self.errh.seg_error('SEG1', err_str, None, src_line=self.cur_line+1) #seg = string.split(line, self.ele_term) seg = pyx12.segment.segment(line, self.seg_term, self.ele_term, \ self.subele_term) if not seg.is_seg_id_valid(): err_str = 'Segment identifier "%s" is invalid' % (seg.get_seg_id()) self.errh.seg_error('1', err_str, None, src_line=self.cur_line+1) else: break # Found valid segment, so can stop looking except: raise StopIteration
7956012e1977ce74eb452b0f222cacfb52c93c99 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11528/7956012e1977ce74eb452b0f222cacfb52c93c99/x12file.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 3536, 11436, 1879, 810, 585, 5155, 3536, 365, 18, 4324, 273, 5378, 775, 30, 1323, 1053, 30, 309, 365, 18, 4106, 18, 4720, 12, 2890, 18, 5680, 67, 6408, 13, 422, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1024, 12, 2890, 4672, 3536, 11436, 1879, 810, 585, 5155, 3536, 365, 18, 4324, 273, 5378, 775, 30, 1323, 1053, 30, 309, 365, 18, 4106, 18, 4720, 12, 2890, 18, 5680, 67, 6408, 13, 422, ...
classEntry = self._classes[classId] filePath = classEntry['path']
classEntry = self._classes[classId] filePath = classEntry['path']
def fixPng(): return
88faa9b4d3ef633926498ca4c5db46fdbb906194 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5718/88faa9b4d3ef633926498ca4c5db46fdbb906194/Generator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 52, 3368, 13332, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 52, 3368, 13332, 327, 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, -...
stop = time.clock() print "\nFinal maximum global error on numerical derivatives = %g" % max(maxNumDerErrorList) print "Elapsed time: %6.3f\n" % stop-start
print "\nFinal maximum global error on numerical derivatives = %g\n" % max(maxNumDerErrorList)
def relErr(x1, x2, reference): if reference != 0.0: return abs(x1-x2)/reference else: return 10e10
cc3c74edcc16e76752434016e29c0680603c3080 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/885/cc3c74edcc16e76752434016e29c0680603c3080/greeks_in_american.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 2524, 12, 92, 21, 16, 619, 22, 16, 2114, 4672, 309, 2114, 480, 374, 18, 20, 30, 327, 2417, 12, 92, 21, 17, 92, 22, 13176, 6180, 469, 30, 327, 1728, 73, 2163, 225, 2, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1279, 2524, 12, 92, 21, 16, 619, 22, 16, 2114, 4672, 309, 2114, 480, 374, 18, 20, 30, 327, 2417, 12, 92, 21, 17, 92, 22, 13176, 6180, 469, 30, 327, 1728, 73, 2163, 225, 2, -100, ...
if len(factors) != 2:
if len(factors) == 1:
def factor(self, n, factor_digits=None, B1=2000, **kwds): """ Returns a list of all probable prime factors of n, using gmp-ecm.
03000ffd92da6e4411ad09bed68dd970417bd216 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/03000ffd92da6e4411ad09bed68dd970417bd216/ecm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5578, 12, 2890, 16, 290, 16, 5578, 67, 16649, 33, 7036, 16, 605, 21, 33, 17172, 16, 2826, 25577, 4672, 3536, 2860, 279, 666, 434, 777, 3137, 429, 17014, 14490, 434, 290, 16, 1450, 2681...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5578, 12, 2890, 16, 290, 16, 5578, 67, 16649, 33, 7036, 16, 605, 21, 33, 17172, 16, 2826, 25577, 4672, 3536, 2860, 279, 666, 434, 777, 3137, 429, 17014, 14490, 434, 290, 16, 1450, 2681...
a = cPickle.load(open(options['append'], 'rb'))
if os.path.exists(options['append']): a = cPickle.load(open(options['append'], 'rb')) else: a = app.Application(options.subCommand, int(options['uid']), int(options['gid']))
def run(): tapLookup = loadPlugins() options = GeneralOptions(tapLookup) if hasattr(os, 'getgid'): options['uid'] = os.getuid() options['gid'] = os.getgid() try: options.parseOptions(sys.argv[1:]) # XXX - Yea, this is FILTH FILTH FILTH if options['debug'] or options['progress']: tapLookup = loadPlugins(options['debug'], options['progress']) except Exception, e: # XXX: While developing, I find myself frequently disabling # this except block when I want to see what screwed up code # caused my updateApplication crash. That probably means # we're not doing something right here. - KMT if isinstance(e, SystemExit): # We don't really want to catch this at all... raise print str(sys.exc_value) print str(options) sys.exit(2) if options['help'] or not hasattr(options, 'subOptions'): if hasattr(options, 'subOptions'): options.subOptions.opt_help() usage.Options.opt_help(options) sys.exit() mod = getModule(tapLookup, options.subCommand) if not options['append']: a = app.Application(options.subCommand, int(options['uid']), int(options['gid'])) else: a = cPickle.load(open(options['append'], 'rb')) try: mod.updateApplication(a, options.subOptions) except usage.error, ue: print "Usage Error: %s" % ue options.subOptions.opt_help() sys.exit(1) # backwards compatible interface if hasattr(mod, "getPorts"): print "The use of getPorts() is deprecated." for portno, factory in mod.getPorts(): a.listenTCP(portno, factory) # backwards compatibility for old --xml and --source options if options['xml']: options['type'] = 'xml' if options['source']: options['type'] = 'source' a.persistStyle = ({'xml': 'xml', 'source': 'aot', 'pickle': 'pickle'} [options['type']]) if options['encrypted']: try: import Crypto a.save(passphrase=util.getPassword("Encryption passphrase: ")) except ImportError: print "The --encrypt flag requires the PyCrypto module, no file written." else: a.save()
2016c58f385d5769a86f9451621f4e82bb6f53a0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/2016c58f385d5769a86f9451621f4e82bb6f53a0/mktap.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 13332, 13495, 6609, 273, 1262, 9461, 1435, 702, 273, 9544, 1320, 12, 29562, 6609, 13, 309, 3859, 12, 538, 16, 296, 588, 15780, 11, 4672, 702, 3292, 1911, 3546, 273, 1140, 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, 1086, 13332, 13495, 6609, 273, 1262, 9461, 1435, 702, 273, 9544, 1320, 12, 29562, 6609, 13, 309, 3859, 12, 538, 16, 296, 588, 15780, 11, 4672, 702, 3292, 1911, 3546, 273, 1140, 18, 588, ...
"Go to the location of the first blank on the given line."
"""Go to the location of the first blank on the given line, returning the index of the last non-blank character."""
def _end_of_line(self, y): "Go to the location of the first blank on the given line." last = self.maxx while 1: if ascii.ascii(self.win.inch(y, last)) != ascii.SP: last = min(self.maxx, last+1) break elif last == 0: break last = last - 1 return last
e2c1d1b966759d1e7a658c88cedc8d1b260c52a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/e2c1d1b966759d1e7a658c88cedc8d1b260c52a6/textpad.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 409, 67, 792, 67, 1369, 12, 2890, 16, 677, 4672, 3536, 5741, 358, 326, 2117, 434, 326, 1122, 7052, 603, 326, 864, 980, 16, 5785, 326, 770, 434, 326, 1142, 1661, 17, 12111, 3351, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 409, 67, 792, 67, 1369, 12, 2890, 16, 677, 4672, 3536, 5741, 358, 326, 2117, 434, 326, 1122, 7052, 603, 326, 864, 980, 16, 5785, 326, 770, 434, 326, 1142, 1661, 17, 12111, 3351, ...
dsrdtr=None,
dsrdtr=False,
def __init__(self, port = None, # number of device, numbering starts at # zero. if everything fails, the user # can specify a device string, note # that this isn't portable anymore # port will be opened if one is specified baudrate=9600, # baud rate bytesize=EIGHTBITS, # number of data bits parity=PARITY_NONE, # enable parity checking stopbits=STOPBITS_ONE, # number of stop bits timeout=None, # set a timeout value, None to wait forever xonxoff=0, # enable software flow control rtscts=0, # enable RTS/CTS flow control writeTimeout=None, # set a timeout for writes dsrdtr=None, # None: use rtscts setting, dsrdtr override if true or false interCharTimeout=None # Inter-character timeout, None to disable ): """Initialize comm port object. If a port is given, then the port will be opened immediately. Otherwise a Serial port object in closed state is returned."""
58a2aee542fe69edca22d4ef30ddbac418046a7c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2937/58a2aee542fe69edca22d4ef30ddbac418046a7c/serialutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1756, 273, 599, 16, 6647, 468, 1300, 434, 2346, 16, 1300, 310, 2542, 622, 468, 3634, 18, 309, 7756, 6684, 16, 326, 729, 468, 848, 4800, 279, 2346, 533, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 273, 599, 16, 6647, 468, 1300, 434, 2346, 16, 1300, 310, 2542, 622, 468, 3634, 18, 309, 7756, 6684, 16, 326, 729, 468, 848, 4800, 279, 2346, 533, ...
ipo=action.getAllChannelIpos()[bone.name]
def __init__(self, expobj, child, bone=None): self.dataref=None # None if null self.r=[] # 0, 1, 2 or n-1 rotation vectors self.a=[] # rotation angles, 0 or n-1 rotation angles self.t=[] # translation, 0, 1 or n-1 translations self.v=[0,1] # dataref value self.loop=0 # loop value (XPlane 9) self.showhide=[] # show/hide values (show/hide, name, v1, v2) self.anim=None # parent Anim
8181e3de398d7305c5acb60059cb3296f7ea0905 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10896/8181e3de398d7305c5acb60059cb3296f7ea0905/XPlaneExport8.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1329, 2603, 16, 1151, 16, 30823, 33, 7036, 4672, 365, 18, 892, 1734, 33, 7036, 202, 7, 599, 309, 446, 365, 18, 86, 33, 8526, 202, 7, 374, 16, 404, 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, 1001, 2738, 972, 12, 2890, 16, 1329, 2603, 16, 1151, 16, 30823, 33, 7036, 4672, 365, 18, 892, 1734, 33, 7036, 202, 7, 599, 309, 446, 365, 18, 86, 33, 8526, 202, 7, 374, 16, 404, 16...
osm.bsm.addNickChunk( chunks, irc_to_dc(u.inick), new_infoindex)
if new_infoindex == old_infoindex: friendly_change = "well that was pointless" else: friendly_change = "%s -> %s" % ( scfg.chan_umodes.friendly[old_infoindex], scfg.chan_umodes.friendly[new_infoindex]) osm.bsm.addNickChunk( chunks, irc_to_dc(u.inick), new_infoindex)
def setChannelUserModes(self, whoset, u, changes): # changes: dict of {mode -> on_off} if u not in self.chanusers: LOG.error("setChannelUserModes: %r not in channel." % u) return
8bde716b7b0262baf8b4bf105fc0d77ab1f437c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12372/8bde716b7b0262baf8b4bf105fc0d77ab1f437c3/bridge_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 2909, 1299, 18868, 12, 2890, 16, 600, 538, 278, 16, 582, 16, 3478, 4672, 468, 3478, 30, 2065, 434, 288, 3188, 317, 603, 67, 3674, 97, 309, 582, 486, 316, 365, 18, 7472, 5577, 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, 444, 2909, 1299, 18868, 12, 2890, 16, 600, 538, 278, 16, 582, 16, 3478, 4672, 468, 3478, 30, 2065, 434, 288, 3188, 317, 603, 67, 3674, 97, 309, 582, 486, 316, 365, 18, 7472, 5577, 30...
self.body.append('\n')
self._line_block -= 1 if self._line_block == 0: self.body.append('.fi\n') self.body.append('.sp\n') else: self.body.append('.in -2\n')
def depart_line_block(self, node): self.body.append('\n') # separate following paragraphs
0c70e9d508694a8c78001ed892d01ad239f0e0ed /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/0c70e9d508694a8c78001ed892d01ad239f0e0ed/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 365, 6315, 1369, 67, 2629, 3947, 404, 309, 365, 6315, 1369, 67, 2629, 422, 374, 30, 365, 18, 3432, 18, 6923, 2668, 18, 22056, 64, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 26000, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 365, 6315, 1369, 67, 2629, 3947, 404, 309, 365, 6315, 1369, 67, 2629, 422, 374, 30, 365, 18, 3432, 18, 6923, 2668, 18, 22056, 64, ...
self.packagelist.add(name)
if name in self.namerefs: self.namerefs[name] += 1 else: self.namerefs[name] = 1
def _register(self, filename): name, version = self._parse_filename(filename) self.filenames[(name, version)] = filename self.packagelist.add(name)
48c3448cffc32de290e5ff88eff226cfecea9ee6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5275/48c3448cffc32de290e5ff88eff226cfecea9ee6/pool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 4861, 12, 2890, 16, 1544, 4672, 508, 16, 1177, 273, 365, 6315, 2670, 67, 3459, 12, 3459, 13, 365, 18, 19875, 63, 12, 529, 16, 1177, 25887, 273, 1544, 365, 18, 2920, 346, 5449, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 389, 4861, 12, 2890, 16, 1544, 4672, 508, 16, 1177, 273, 365, 6315, 2670, 67, 3459, 12, 3459, 13, 365, 18, 19875, 63, 12, 529, 16, 1177, 25887, 273, 1544, 365, 18, 2920, 346, 5449, 1...
print catfiles
def kill_proc(p, timeout): k = subprocess.Popen(['kill',str(p.pid)]) k.wait() now = time.time() end_time = now + timeout # give it a little time while end_time > now: if p.poll(): return now = time.time() # use the big hammer (and don't bother waiting) subprocess.Popen(['kill','-9', str(p.pid)]) return
97dd26e665e2ca235f4c8596da4b25c90663de32 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6895/97dd26e665e2ca235f4c8596da4b25c90663de32/sub_test.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8673, 67, 9381, 12, 84, 16, 2021, 4672, 417, 273, 6652, 18, 52, 3190, 12, 3292, 16418, 2187, 701, 12, 84, 18, 6610, 13, 5717, 417, 18, 7048, 1435, 2037, 273, 813, 18, 957, 1435, 679,...
activities = Activity.objects.filter(offering = course, status = 'URLS')
activities = Activity.objects.filter(offering = course, status = 'RLS')
def submit(request,course_slug): #TODO: validate group name and activity person = get_object_or_404(Person,userid=request.user.username) course = get_object_or_404(CourseOffering, slug = course_slug) member = Member.objects.get(person = person, offering = course) error_info=None name = request.POST.get('GroupName') #Check if group has a unique name if Group.objects.filter(name=name,courseoffering=course): error_info="Group %s has already exists" % (name) messages.add_message(request, messages.ERROR, error_info) if is_course_student_by_slug(request.user, course_slug): return HttpResponseRedirect(reverse('groups.views.groupmanage', kwargs={'course_slug': course_slug})) elif is_course_staff_by_slug(request.user, course_slug): return HttpResponseRedirect(reverse('groups.views.groupmanage', kwargs={'course_slug': course_slug})) else: group = Group(name = name, manager = member, courseoffering=course) group.save() #LOG EVENT# l = LogEntry(userid=request.user.username, description="created a new group %s for %s." % (group.name, course), related_object=group ) l.save() #Deal with creating the membership if is_course_student_by_slug(request.user, course_slug): activities = Activity.objects.filter(offering = course, status = 'URLS') for activity in activities: activityForm = ActivityForm(request.POST, prefix = activity.slug) if activityForm.is_valid() and activityForm.cleaned_data['selected'] == True: groupMember = GroupMember(group=group, student=member, confirmed=True, activity = activity) groupMember.save() #LOG EVENT# l = LogEntry(userid=request.user.username, description="automatically became a group member of %s for activity %s." % (group.name, groupMember.activity), related_object=groupMember ) l.save() messages.add_message(request, messages.SUCCESS, 'Group Created') return HttpResponseRedirect(reverse('groups.views.groupmanage', kwargs={'course_slug': course_slug})) elif is_course_staff_by_slug(request.user, course_slug): activities = Activity.objects.filter(offering = course, status = 'URLS') students = Member.objects.select_related('person').filter(offering = course, role = 'STUD') for activity in activities: activityForm = ActivityForm(request.POST, prefix = activity.slug) if activityForm.is_valid() and activityForm.cleaned_data['selected'] == True: for student in students: studentForm = StudentForm(request.POST, prefix = student.person.userid) if studentForm.is_valid() and studentForm.cleaned_data['selected'] == True: groupMember = GroupMember(group=group, student=student, confirmed=True, activity = activity) groupMember.save() #LOG EVENT# l = LogEntry(userid=request.user.username, description="added %s as a group member to %s for activity %s." % (student.person.userid,group.name, groupMember.activity), related_object=groupMember ) l.save() messages.add_message(request, messages.SUCCESS, 'Group Created') return HttpResponseRedirect(reverse('groups.views.groupmanage', kwargs={'course_slug': course_slug})) else: return HttpResponseForbidden()
de7d548266726766edb16c26de80996a4cb7722a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6634/de7d548266726766edb16c26de80996a4cb7722a/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2293, 16, 5566, 67, 6436, 4672, 468, 6241, 30, 1954, 1041, 508, 471, 5728, 6175, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 8346, 16, 8339, 33, 2293, 18, 1355, 18, 5053, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4879, 12, 2293, 16, 5566, 67, 6436, 4672, 468, 6241, 30, 1954, 1041, 508, 471, 5728, 6175, 273, 336, 67, 1612, 67, 280, 67, 11746, 12, 8346, 16, 8339, 33, 2293, 18, 1355, 18, 5053, 1...
ParseDbg.add("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver))
self.pdbg("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver)) self.parse_dbg_indent = self.parse_dbg_indent[:-2]
def parse_ver(self): match = re_ver_fun.match(self.buffer) if match: p = match.span(0)[1] self.buffer = self.buffer[p:] ParseDbg.add("parse_ver new buffer = %s" % self.buffer) op = match.group(1) orig_ver = match.group(2) ver = format_version(orig_ver) plugin = C.cname(match.group(3)) expr = "[VER %s %s %s]" % (op, orig_ver, plugin) ParseDbg.add("parse_ver, expr=%s ver=%s" % (expr, ver)) if not plugin in self.active: ParseDbg.add("parse_ver [VER] \"%s\" not active" % plugin) return(False, expr) # file does not exist if self.datadir == None: # this case is reached when doing fromfile checks # and we do not have the actual plugin to check, so # we assume that the plugin matches the given version if op == '=': return(True, expr) else: return(False, expr) desc = plugin_description(self.datadir.find_path(plugin)) match = re_header_version.search(desc) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) ParseDbg.add("parse_ver (header) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: match = re_filename_version.search(plugin) if match: p_ver_orig = match.group(1) p_ver = format_version(p_ver_orig) ParseDbg.add("parse_ver (filename) version(%s) = %s (%s)" % (plugin, p_ver_orig, p_ver)) else: ParseDbg.add("parse_ver no version for %s" % plugin) return(False, expr) ParseDbg.add("parse_ver compare p_ver=%s %s ver=%s" % (p_ver, op, ver)) if op == '=': return(p_ver == ver, expr) elif op == '<': return(p_ver < ver, expr) elif op == '>': return(p_ver > ver, expr) else: self.parse_error(_["Invalid [VER] operator: %s"] % self.buffer) return(None, None) self.parse_error(_["Invalid [VER] function: %s"] % self.buffer) return(None, None)
57b9dbd56a9e011788ef60900e9a91776ddbb48d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2827/57b9dbd56a9e011788ef60900e9a91776ddbb48d/mlox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 502, 12, 2890, 4672, 845, 273, 283, 67, 502, 67, 12125, 18, 1916, 12, 2890, 18, 4106, 13, 309, 845, 30, 293, 273, 845, 18, 3969, 12, 20, 25146, 21, 65, 365, 18, 4106, 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, 1109, 67, 502, 12, 2890, 4672, 845, 273, 283, 67, 502, 67, 12125, 18, 1916, 12, 2890, 18, 4106, 13, 309, 845, 30, 293, 273, 845, 18, 3969, 12, 20, 25146, 21, 65, 365, 18, 4106, 273...
eg c = wmi.WMI () pp = c.Win32_ParallelPort ()[0] for i in pp.associators (wmi_association_class="Win32_PortResource"): print i for i in pp.associators (wmi_result_class="Win32_PnPEntity"): print i
<pre class="code"> c = wmi.WMI () pp = c.Win32_ParallelPort ()[0] for i in pp.associators (wmi_association_class="Win32_PortResource"): print i for i in pp.associators (wmi_result_class="Win32_PnPEntity"): print i </pre>
def associators (self, wmi_association_class="", wmi_result_class=""): """Return a list of objects related to this one, optionally limited either by association class (ie the name of the class which relates them) or by result class (ie the name of the class which would be retrieved)
29410e36515b7678dec1034bc8ba732ed4809ea7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6472/29410e36515b7678dec1034bc8ba732ed4809ea7/wmi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2576, 3062, 261, 2890, 16, 341, 9197, 67, 19358, 67, 1106, 1546, 3113, 341, 9197, 67, 2088, 67, 1106, 1546, 6, 4672, 3536, 990, 279, 666, 434, 2184, 3746, 358, 333, 1245, 16, 8771, 135...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2576, 3062, 261, 2890, 16, 341, 9197, 67, 19358, 67, 1106, 1546, 3113, 341, 9197, 67, 2088, 67, 1106, 1546, 6, 4672, 3536, 990, 279, 666, 434, 2184, 3746, 358, 333, 1245, 16, 8771, 135...
xc=self.browse(cr, uid, [from_currency_id,to_currency_id], context=context)
if not to_currency_id: to_currency_id = from_currency_id xc = self.browse(cr, uid, [from_currency_id,to_currency_id], context=context)
def compute(self, cr, uid, from_currency_id, to_currency_id, from_amount, round=True, context={}, account=None, account_invert=False): if not from_currency_id: from_currency_id = to_currency_id xc=self.browse(cr, uid, [from_currency_id,to_currency_id], context=context) from_currency = (xc[0].id == from_currency_id and xc[0]) or xc[1] to_currency = (xc[0].id == to_currency_id and xc[0]) or xc[1] if from_currency['rate'] == 0 or to_currency['rate'] == 0: date = context.get('date', time.strftime('%Y-%m-%d')) if from_currency['rate'] == 0: code = from_currency.code else: code = to_currency.code raise osv.except_osv(_('Error'), _('No rate found \n' \ 'for the currency: %s \n' \ 'at the date: %s') % (code, date)) rate = to_currency.rate/from_currency.rate if account and (account.currency_mode=='average') and account.currency_id: q = self.pool.get('account.move.line')._query_get(cr, uid, context=context) cr.execute('select sum(debit-credit),sum(amount_currency) from account_move_line l ' \ 'where l.currency_id=%s and l.account_id=%s and '+q, (account.currency_id.id,account.id,)) tot1,tot2 = cr.fetchone() if tot2 and not account_invert: rate = float(tot1)/float(tot2) elif tot1 and account_invert: rate = float(tot2)/float(tot1) if to_currency_id==from_currency_id: if round: return self.round(cr, uid, to_currency, from_amount) else: return from_amount else: if round: return self.round(cr, uid, to_currency, from_amount * rate) else: return (from_amount * rate)
46a57d5bdd0014d5677831f16860ae00b2c7a3e0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/46a57d5bdd0014d5677831f16860ae00b2c7a3e0/res_currency.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 12, 2890, 16, 4422, 16, 4555, 16, 628, 67, 7095, 67, 350, 16, 358, 67, 7095, 67, 350, 16, 628, 67, 8949, 16, 3643, 33, 5510, 16, 819, 28793, 2236, 33, 7036, 16, 2236, 67, 267...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 12, 2890, 16, 4422, 16, 4555, 16, 628, 67, 7095, 67, 350, 16, 358, 67, 7095, 67, 350, 16, 628, 67, 8949, 16, 3643, 33, 5510, 16, 819, 28793, 2236, 33, 7036, 16, 2236, 67, 267...
title = 'class ' + self.bold(name)
if name == realname: title = 'class ' + self.bold(realname) else: title = self.bold(name) + ' = class ' + realname
def docclass(self, object): """Produce text documentation for a given class object.""" name = object.__name__ bases = object.__bases__
a8b37d1a3238fb85be760a30db03672525e8f591 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a8b37d1a3238fb85be760a30db03672525e8f591/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 997, 1106, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 667, 733, 12123, 508, 273, 733, 16186, 529, 972, 8337, 273, 733, 16186, 18602, 972, 2, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 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, 997, 1106, 12, 2890, 16, 733, 4672, 3536, 25884, 977, 7323, 364, 279, 864, 667, 733, 12123, 508, 273, 733, 16186, 529, 972, 8337, 273, 733, 16186, 18602, 972, 2, -100, -100, -100, -100, ...
readmodule_ex(mod, path)
_readmodule(mod, path)
def readmodule_ex(module, path=[], inpackage=None): '''Read a module file and return a dictionary of classes. Search for MODULE in PATH and sys.path, read and parse the module and return a dictionary with one entry for each class found in the module. If INPACKAGE is true, it must be the dotted name of the package in which we are searching for a submodule, and then PATH must be the package search path; otherwise, we are searching for a top-level module, and PATH is combined with sys.path. ''' # Compute the full module name (prepending inpackage if set) if inpackage: fullmodule = "%s.%s" % (inpackage, module) else: fullmodule = module # Check in the cache if fullmodule in _modules: return _modules[fullmodule] # Initialize the dict for this module's contents dict = {} # Check if it is a built-in module; we don't do much for these if module in sys.builtin_module_names and not inpackage: _modules[module] = dict return dict # Check for a dotted module name i = module.rfind('.') if i >= 0: package = module[:i] submodule = module[i+1:] parent = readmodule_ex(package, path, inpackage) if inpackage: package = "%s.%s" % (inpackage, package) return readmodule_ex(submodule, parent['__path__'], package) # Search the path for the module f = None if inpackage: f, file, (suff, mode, type) = imp.find_module(module, path) else: f, file, (suff, mode, type) = imp.find_module(module, path + sys.path) if type == imp.PKG_DIRECTORY: dict['__path__'] = [file] path = [file] + path f, file, (suff, mode, type) = imp.find_module('__init__', [file]) _modules[fullmodule] = dict if type != imp.PY_SOURCE: # not Python source, can't do anything with this module f.close() return dict classstack = [] # stack of (class, indent) pairs g = tokenize.generate_tokens(f.readline) try: for tokentype, token, start, end, line in g: if token == 'def': lineno, thisindent = start tokentype, meth_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] if classstack: # it's a class method cur_class = classstack[-1][0] cur_class._addmethod(meth_name, lineno) else: # it's a function dict[meth_name] = Function(module, meth_name, file, lineno) elif token == 'class': lineno, thisindent = start tokentype, class_name, start, end, line = g.next() if tokentype != NAME: continue # Syntax error # close all classes indented at least as much while classstack and \ classstack[-1][1] >= thisindent: del classstack[-1] # parse what follows the class name tokentype, token, start, end, line = g.next() inherit = None if token == '(': names = [] # List of superclasses # there's a list of superclasses level = 1 super = [] # Tokens making up current superclass while True: tokentype, token, start, end, line = g.next() if token in (')', ',') and level == 1: n = "".join(super) if n in dict: # we know this super class n = dict[n] else: c = n.split('.') if len(c) > 1: # super class is of the form # module.class: look in module for # class m = c[-2] c = c[-1] if m in _modules: d = _modules[m] if c in d: n = d[c] names.append(n) if token == '(': level += 1 elif token == ')': level -= 1 if level == 0: break elif token == ',' and level == 1: pass else: super.append(token) inherit = names cur_class = Class(module, class_name, inherit, file, lineno) dict[class_name] = cur_class classstack.append((cur_class, thisindent)) elif token == 'import' and start[1] == 0: modules = _getnamelist(g) for mod, mod2 in modules: try: # Recursively read the imported module if not inpackage: readmodule_ex(mod, path) else: try: readmodule_ex(mod, path, inpackage) except ImportError: readmodule_ex(mod) except: # If we can't find or parse the imported module, # too bad -- don't die here. pass elif token == 'from' and start[1] == 0: mod, token = _getname(g) if not mod or token != "import": continue names = _getnamelist(g) try: # Recursively read the imported module d = readmodule_ex(mod, path, inpackage) except: # If we can't find or parse the imported module, # too bad -- don't die here. continue # add any classes that were defined in the imported module # to our name space if they were mentioned in the list for n, n2 in names: if n in d: dict[n2 or n] = d[n] elif n == '*': # only add a name if not already there (to mimic # what Python does internally) also don't add # names that start with _ for n in d: if n[0] != '_' and not n in dict: dict[n] = d[n] except StopIteration: pass f.close() return dict
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, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 25...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 855, 2978, 67, 338, 12, 2978, 16, 589, 22850, 6487, 316, 5610, 33, 7036, 4672, 9163, 1994, 279, 1605, 585, 471, 327, 279, 3880, 434, 3318, 18, 225, 5167, 364, 14057, 316, 7767, 471, 25...
self.__cb = cb
def __init__(self, cb): gtk.HBox.__init__(self) combo = gtk.ComboBox(PlayList.lists_model()) cell = gtk.CellRendererText() combo.pack_start(cell, True) combo.add_attribute(cell, 'text', 0) combo.set_active(0) self.pack_start(combo)
9c701556952d3e0476b1cdf1642f5c98851e8063 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4764/9c701556952d3e0476b1cdf1642f5c98851e8063/widgets.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2875, 4672, 22718, 18, 44, 3514, 16186, 2738, 972, 12, 2890, 13, 16778, 273, 22718, 18, 22199, 12, 11765, 682, 18, 9772, 67, 2284, 10756, 2484, 273, 22718,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2875, 4672, 22718, 18, 44, 3514, 16186, 2738, 972, 12, 2890, 13, 16778, 273, 22718, 18, 22199, 12, 11765, 682, 18, 9772, 67, 2284, 10756, 2484, 273, 22718,...
raise NotImplemented, '%s has no "%s" method' % (view, method_name)
message = '%s has no "%s" method' % (view, method_name) raise NotImplemented, message
def check_method(cls, server, context, method_name=None): if method_name is None: method_name = context.request.method # Get the method view = context.view method = getattr(view, method_name, None) if method is None: raise NotImplemented, '%s has no "%s" method' % (view, method_name) context.view_method = method
d5b0efa7c5787bb67b3da6d65bc85a45f5aef914 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12681/d5b0efa7c5787bb67b3da6d65bc85a45f5aef914/server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 2039, 12, 6429, 16, 1438, 16, 819, 16, 707, 67, 529, 33, 7036, 4672, 309, 707, 67, 529, 353, 599, 30, 707, 67, 529, 273, 819, 18, 2293, 18, 2039, 468, 968, 326, 707, 1476,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 2039, 12, 6429, 16, 1438, 16, 819, 16, 707, 67, 529, 33, 7036, 4672, 309, 707, 67, 529, 353, 599, 30, 707, 67, 529, 273, 819, 18, 2293, 18, 2039, 468, 968, 326, 707, 1476,...
<form%s>
<form>
def startFormatting(title, identifier, source): document = """Content-Type:text/html;charset=UTF-8
943afbec53903141cfdc88408bfe2ea256880388 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10248/943afbec53903141cfdc88408bfe2ea256880388/trackerlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 787, 23974, 12, 2649, 16, 2756, 16, 1084, 4672, 1668, 273, 3536, 1350, 17, 559, 30, 955, 19, 2620, 31, 9999, 33, 5159, 17, 28, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
join_system = [{system_arch_map: system_table.c.id == system_arch_map.c.system_id}, {arch_table: arch_table.c.id == system_arch_map.c.arch_id}]
joins = JoinContainer() joins.add_conditional('arch', [{system_arch_map: system_table.c.id == system_arch_map.c.system_id}, {arch_table: arch_table.c.id == system_arch_map.c.arch_id}])
def return_results(self): #Do our joins queri = session.query(System).select_from(self.j) #Execute filter on query object for filter_func in self.filter_funcs: queri = queri.filter(filter_func()) return queri
499b3e2039a176b270b952723b49a680a3df4481 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/499b3e2039a176b270b952723b49a680a3df4481/model.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 4717, 12, 2890, 4672, 468, 3244, 3134, 13471, 21287, 77, 273, 1339, 18, 2271, 12, 3163, 2934, 4025, 67, 2080, 12, 2890, 18, 78, 13, 225, 468, 5289, 1034, 603, 843, 733, 364, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 327, 67, 4717, 12, 2890, 4672, 468, 3244, 3134, 13471, 21287, 77, 273, 1339, 18, 2271, 12, 3163, 2934, 4025, 67, 2080, 12, 2890, 18, 78, 13, 225, 468, 5289, 1034, 603, 843, 733, 364, ...
Iterable.register(bytes)
def __subclasshook__(cls, C): if cls is Iterable: if any("__iter__" in B.__dict__ for B in C.__mro__): return True return NotImplemented
1f1d3a77d58920f672d2e44cc74d42e054a68f23 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/1f1d3a77d58920f672d2e44cc74d42e054a68f23/_abcoll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 10678, 4476, 972, 12, 6429, 16, 385, 4672, 309, 2028, 353, 6725, 30, 309, 1281, 2932, 972, 2165, 14437, 316, 605, 16186, 1576, 972, 364, 605, 316, 385, 16186, 81, 303, 972, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10678, 4476, 972, 12, 6429, 16, 385, 4672, 309, 2028, 353, 6725, 30, 309, 1281, 2932, 972, 2165, 14437, 316, 605, 16186, 1576, 972, 364, 605, 316, 385, 16186, 81, 303, 972, 4672, ...
the URL is None. If the optional xmldoc argument is provided and is not None, the parsed XML tree will be appended to that document, otherwise a new document will be created.
the URL is None.
def load_url(url, verbose = False, gz = False, xmldoc = None, contenthandler = None): """ This function has the same behaviour as load_filename() but accepts a URL instead of a filename. Any source from which Python's urllib2 library can read data is acceptable. stdin is parsed if the URL is None. If the optional xmldoc argument is provided and is not None, the parsed XML tree will be appended to that document, otherwise a new document will be created. Example: >>> from glue.ligolw import utils >>> xmldoc = utils.load_url("file://localhost/tmp/data.xml") """ if verbose: print >>sys.stderr, "reading %s ..." % (url and ("'%s'" % url) or "stdin") if url is not None: scheme, host, path, nul, nul, nul = urlparse.urlparse(url) if scheme.lower() in ("", "file") and host.lower() in ("", "localhost"): fileobj = file(path) else: fileobj = urllib2.urlopen(url) else: fileobj = sys.stdin xmldoc, hexdigest = load_fileobj(fileobj, gz = gz, xmldoc = xmldoc, contenthandler = contenthandler) if verbose: print >>sys.stderr, "md5sum: %s %s" % (hexdigest, url or "") return xmldoc
a6609b0e22abdcb993241fb93f7d83d0e32abf28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5758/a6609b0e22abdcb993241fb93f7d83d0e32abf28/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 718, 12, 718, 16, 3988, 273, 1083, 16, 14136, 273, 1083, 16, 2025, 2434, 273, 599, 16, 913, 4176, 273, 599, 4672, 3536, 1220, 445, 711, 326, 1967, 14273, 487, 1262, 67, 3459,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 67, 718, 12, 718, 16, 3988, 273, 1083, 16, 14136, 273, 1083, 16, 2025, 2434, 273, 599, 16, 913, 4176, 273, 599, 4672, 3536, 1220, 445, 711, 326, 1967, 14273, 487, 1262, 67, 3459,...
return u'[[%s%s:%s]]' % (colon, self._site.lang, title)
title = u'[[%s%s:%s]]' % (colon, self._site.lang, title)
def title(self, underscore=False, savetitle=False, decode=False, withNamespace=True, withSection=True, asUrl=False, asLink=False, allowInterwiki=True, forceInterwiki=False, textlink=False, as_filename=False): """Return the title of this Page, as a Unicode string.
5305fbbed0c6e94064d7131ae6ece7c2583e90ea /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4404/5305fbbed0c6e94064d7131ae6ece7c2583e90ea/wikipedia.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2077, 12, 2890, 16, 13677, 33, 8381, 16, 4087, 278, 1280, 33, 8381, 16, 2495, 33, 8381, 16, 598, 3402, 33, 5510, 16, 598, 5285, 33, 5510, 16, 487, 1489, 33, 8381, 16, 487, 2098, 33, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2077, 12, 2890, 16, 13677, 33, 8381, 16, 4087, 278, 1280, 33, 8381, 16, 2495, 33, 8381, 16, 598, 3402, 33, 5510, 16, 598, 5285, 33, 5510, 16, 487, 1489, 33, 8381, 16, 487, 2098, 33, ...
colspan = 0
def show_view(view, show_heading = False, show_buttons = True, show_footer = True): # Parse display options display_options = html.var("display_options", "") # assume all missing options as active (upper case) for c in "HTBFCEOZRSIX": if c not in display_options and c.lower() not in display_options: display_options += c html.display_options = display_options # [1] Datasource datasource = multisite_datasources[view["datasource"]] tablename = datasource["table"] # [2] Layout layout = multisite_layouts[view["layout"]] # User can override the layout settings via HTML variables (buttons) # which are safed persistently. This is known as "view options" vo = view_options(view["name"]) num_columns = vo.get("num_columns", view.get("num_columns", 1)) browser_reload = vo.get("refresh", view.get("browser_reload", None)) if browser_reload and 'R' in display_options: html.set_browser_reload(browser_reload) # [3] Filters show_filters = [ multisite_filters[fn] for fn in view["show_filters"] ] hide_filters = [ multisite_filters[fn] for fn in view["hide_filters"] ] hard_filters = [ multisite_filters[fn] for fn in view["hard_filters"] ] for varname, value in view["hard_filtervars"]: # shown filters are set, if form is fresh and variable not supplied in URL if not html.var("filled_in") and not html.has_var(varname): html.set_var(varname, value) filterheaders = "" only_sites = None for filt in show_filters + hide_filters + hard_filters: header = filt.filter(tablename) if header.startswith("Sites:"): only_sites = header.strip().split(" ")[1:] else: filterheaders += header query = filterheaders + view.get("add_headers", "") # [4] Sorting sorters = [ (multisite_sorters[sn], reverse) for sn, reverse in view["sorters"] ] # [5] Grouping group_painters = [ (multisite_painters[n], v) for n, v in view["group_painters"] ] # [6] Columns painters = [ (multisite_painters[n], v) for n, v in view["painters"] ] # Now compute this list of all columns we need to query via Livestatus. # Those are: (1) columns used by the sorters in use, (2) columns use by # column- and group-painters in use and - note - (3) columns used to # satisfy external references (filters) of views we link to. The last bit # is the trickiest. Also compute this list of view options use by the # painters columns = [] painter_options = [] for s, r in sorters: columns += s["columns"] for p, v in (group_painters + painters): columns += p["columns"] painter_options += p.get("options", []) if v: linkview = html.available_views.get(v) if linkview: for ef in linkview["hide_filters"]: f = multisite_filters[ef] columns += f.link_columns painter_options = list(set(painter_options)) painter_options.sort() # Add key columns, needed for executing commands columns += datasource["keys"] # Make column list unique and remove (implicit) site column colset = set(columns) if "site" in colset: colset.remove("site") columns = list(colset) # Fetch data. Some views show data only after pressing [Search] if (not view["mustsearch"]) or html.var("search"): # names for additional columns (through Stats: headers) add_columns = datasource.get("add_columns", []) columns, rows = query_data(datasource, columns, add_columns, query, only_sites, get_limit()) sort_data(rows, sorters) else: columns, rows = [], [] # html.write("<pre>%s</pre>" % pprint.pformat((columns, rows))) # Show heading (change between "preview" mode and full page mode) if show_heading: # Show/Hide the header with page title, MK logo, etc. if 'H' in display_options: html.body_start(view_title(view)) if 'T' in display_options: html.top_heading(view_title(view)) has_done_actions = False if show_buttons and 'B' in display_options: show_context_links(view, hide_filters) need_navi = show_buttons and ('F' in display_options or 'C' in display_options or 'O' in display_options or 'E' in display_options) if need_navi: html.write("<table class=navi><tr>\n") colspan = 0 # Filter-button if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): filter_isopen = html.var("search", "") == "" and view["mustsearch"] toggle_button("table_filter", filter_isopen, "Filter", ["filter"]) html.write("<td class=minigap></td>\n") colspan += 2 # Command-button if 'C' in display_options and len(rows) > 0 and config.may("act") and not html.do_actions(): toggle_button("table_actions", False, "Commands") html.write("<td class=minigap></td>\n") colspan += 2 # Painter-Options if len(painter_options) > 0 and config.may("painter_options"): toggle_button("painter_options", False, "Display") html.write("<td class=minigap></td>\n") colspan += 2 # Buttons for view options if 'O' in display_options: if config.user_may(config.user, "view_option_columns"): for col in config.view_option_columns: uri = html.makeuri([("num_columns", col)]) if col == num_columns: addclass = " selected" else: addclass = "" html.write('<td class="left w30%s"><a href="%s">%s</a></td>\n' % (addclass, uri, col)) html.write("<td class=minigap></td>\n") colspan += 2 if 'R' in display_options and config.user_may(config.user, "view_option_refresh"): for ref in config.view_option_refreshes: uri = html.makeuri([("refresh", ref)]) if ref == browser_reload or (not ref and not browser_reload): addclass = " selected" else: addclass = "" if ref: reftext = "%d s" % ref else: reftext = "&#8734;" html.write('<td class="left w40%s"><a href="%s">%s</a></td>\n' % (addclass, uri, reftext)) html.write("<td class=minigap></td>\n") colspan += 2 html.write("<td class=gap></td>\n") colspan += 1 # Customize/Edit view button if 'E' in display_options and config.may("edit_views"): backurl = htmllib.urlencode(html.makeuri([])) html.write('<td class="right" onmouseover="hover_tab(this);" onmouseout="unhover_tab(this);">') if view["owner"] == html.req.user: html.write('<a href="edit_view.py?load_view=%s&back=%s">Edit</a>\n' % (view["name"], backurl)) else: html.write('<a href="edit_view.py?clonefrom=%s&load_view=%s&back=%s">Edit</a>\n' % (view["owner"], view["name"], backurl)) html.write('</td>') colspan += 1 html.write("</tr>") # Filter form if 'F' in display_options and len(show_filters) > 0 and not html.do_actions(): show_filter_form(filter_isopen, show_filters, colspan) # Actions if 'C' in display_options and len(rows) > 0: if html.do_actions() and html.transaction_valid(): # submit button pressed, no reload try: html.write("<tr class=form><td class=whiteborder colspan=%d>" % colspan) # Create URI with all actions variables removed backurl = html.makeuri([]) has_done_actions = do_actions(datasource["infos"][0], rows, backurl) html.write("</td></tr>") except MKUserError, e: html.show_error(e.message) html.write("</td></tr>") html.add_user_error(e.varname, e.message) show_action_form(True, datasource, colspan) else: show_action_form(False, datasource, colspan) if 'O' in display_options and len(painter_options) > 0 and config.may("painter_options"): show_painter_options(painter_options, colspan) # Ende des Bereichs mit den Tabs html.write("</table>\n") # class=navi if not has_done_actions: # Limit exceeded? Show warning count = len(rows) limit = get_limit() if limit != None and count == limit + 1: text = "Your query produced more then %d results. " % limit if html.var("limit", "soft") == "soft" and config.may("ignore_soft_limit"): text += '<a href="%s">Repeat query and allow more results.</a>' % html.makeuri([("limit", "hard")]) elif html.var("limit") == "hard" and config.may("ignore_hard_limit"): text += '<a href="%s">Repeat query without limit.</a>' % html.makeuri([("limit", "none")]) html.show_warning(text) del rows[-1] layout["render"]((columns, rows), view, group_painters, painters, num_columns) # Play alarm sounds, if critical events have been displayed if 'S' in display_options and view.get("play_sounds"): play_alarm_sounds() # In multi site setups error messages of single sites do not block the # output and raise now exception. We simply print error messages here: if config.show_livestatus_errors: for sitename, info in html.live.deadsites.items(): html.show_error("<b>%s - Livestatus error</b><br>%s" % (info["site"]["alias"], info["exception"])) if show_footer: html.bottom_focuscode() if 'Z' in display_options: html.bottom_footer() if 'H' in display_options: html.body_end()
5988dc68b2c4439ac451c483e6643ca4800ad36f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5589/5988dc68b2c4439ac451c483e6643ca4800ad36f/views.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 1945, 12, 1945, 16, 2405, 67, 19948, 273, 1083, 16, 2405, 67, 16016, 273, 1053, 16, 2405, 67, 14723, 273, 1053, 4672, 468, 2884, 2562, 702, 2562, 67, 2116, 273, 1729, 18, 140...
tmp = string.splitfields(GetDialogItemText(h), '\r')
tmp = string.splitfields(h.data, '\r')
def interact(list, pythondir, options, title): """Let the user interact with the dialog""" opythondir = pythondir try: # Try to go to the "correct" dir for GetDirectory os.chdir(pythondir.as_pathname()) except os.error: pass d = GetNewDialog(DIALOG_ID, -1) tp, h, rect = d.GetDialogItem(TITLE_ITEM) SetDialogItemText(h, title) tp, h, rect = d.GetDialogItem(TEXT_ITEM) SetDialogItemText(h, string.joinfields(list, '\r'))
8bd6ef223a9eb6505ab2a1ac958a848a8b88f182 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/8bd6ef223a9eb6505ab2a1ac958a848a8b88f182/EditPythonPrefs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 16592, 12, 1098, 16, 5790, 1214, 16, 702, 16, 2077, 4672, 3536, 24181, 326, 729, 16592, 598, 326, 6176, 8395, 1061, 18490, 1214, 273, 5790, 1214, 775, 30, 468, 6161, 358, 1960, 358, 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, 16592, 12, 1098, 16, 5790, 1214, 16, 702, 16, 2077, 4672, 3536, 24181, 326, 729, 16592, 598, 326, 6176, 8395, 1061, 18490, 1214, 273, 5790, 1214, 775, 30, 468, 6161, 358, 1960, 358, 326,...
def prepare(self, *args): return _tinyWRAP.ProxyAudioConsumer_prepare(self, *args) def start(self): return _tinyWRAP.ProxyAudioConsumer_start(self) def pause(self): return _tinyWRAP.ProxyAudioConsumer_pause(self) def stop(self): return _tinyWRAP.ProxyAudioConsumer_stop(self) def setActivate(self, *args): return _tinyWRAP.ProxyAudioConsumer_setActivate(self, *args)
def prepare(self, *args): return _tinyWRAP.ProxyAudioConsumer_prepare(self, *args)
2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5606/2b3ef33e1cad0b0ba9de339aee59ceb6fe65ef1a/tinyWRAP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 16, 380, 1968, 4672, 327, 389, 88, 11652, 27664, 18, 3886, 12719, 5869, 67, 9366, 12, 2890, 16, 380, 1968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2911, 12, 2890, 16, 380, 1968, 4672, 327, 389, 88, 11652, 27664, 18, 3886, 12719, 5869, 67, 9366, 12, 2890, 16, 380, 1968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...