rem
stringlengths
1
226k
add
stringlengths
0
227k
context
stringlengths
6
326k
meta
stringlengths
143
403
input_ids
listlengths
256
256
attention_mask
listlengths
256
256
labels
listlengths
128
128
new_edje.edj.show()
new_edje.edj.show()
def show_details(self, emission, source, param, message, canvas_obj): print "show details called" time = message.timestamp text = str(message.text).encode('utf8') print text new_edje = gui.edje_gui(self.main,'message_details',self.edje_file) new_edje.edj.part_text_set('name-text',str(message.peer).encode('utf8')) new_edje.edj.part_text_set('name-info',str(time)) new_edje.edj.part_text_set('number-text',str(message.peer.value).encode('utf8')) new_edje.edj.part_text_set('message-text',text) new_edje.edj.signal_callback_add("reply", "*", self.reply, message, new_edje) new_edje.edj.signal_callback_add("forward", "*", self.forward, message, new_edje) new_edje.edj.signal_callback_add("close_details", "*", self._close) new_edje.edj.signal_callback_add("delete_message", "*", self.delete_message, message, new_edje,emission, canvas_obj) message.read() new_edje.edj.layer_set(3) if self.standalone: new_edje.edj.size_set(480,600) new_edje.edj.pos_set(0,40) new_edje.edj.show()
25918bc2efce0ef02bb9eb9b253fbd65dc59d594 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/25918bc2efce0ef02bb9eb9b253fbd65dc59d594/people.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2405, 67, 6395, 12, 2890, 16, 801, 19710, 16, 1084, 16, 579, 16, 883, 16, 5953, 67, 2603, 4672, 1172, 315, 4500, 3189, 2566, 6, 813, 273, 883, 18, 5508, 977, 273, 609, 12, 2150, 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, 2405, 67, 6395, 12, 2890, 16, 801, 19710, 16, 1084, 16, 579, 16, 883, 16, 5953, 67, 2603, 4672, 1172, 315, 4500, 3189, 2566, 6, 813, 273, 883, 18, 5508, 977, 273, 609, 12, 2150, 18, ...
"""The minimester sortkey is based on the ordinal value of the start date of a course in the minimester. The start date is normalized by replacing its day of the month with a 1 (e.g. 08/03/2006 -> 08/01/2006). The ordinal value of the date makes them easily sortable, and automatically takes care of the "December needs to come first" problem in the Spring semester, for example. Without the normalization step, we end up with tons of minimester elements, one for each unique start date, which is bad."""
"""The minimester sortkey is based on the ordinal value of the start date of a course in the minimester. The start date is normalized by replacing its day of the month with a 1 (e.g. 08/03/2006 -> 08/01/2006). The ordinal value of the date makes them easily sortable, and automatically takes care of the "December needs to come first" problem in the Spring semester, for example. Without the normalization step, we end up with tons of minimester elements, one for each unique start date, which is bad."""
def format_minimester_sortkey(self, value): """The minimester sortkey is based on the ordinal value of the start date of a course in the minimester. The start date is normalized by replacing its day of the month with a 1 (e.g. 08/03/2006 -> 08/01/2006).
20eab91c91a9f72ec790d8c5d1fb9261b7b89028 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4025/20eab91c91a9f72ec790d8c5d1fb9261b7b89028/formatters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 740, 67, 1154, 4485, 387, 67, 3804, 856, 12, 2890, 16, 460, 4672, 3536, 1986, 1131, 4485, 387, 1524, 856, 353, 2511, 603, 326, 12675, 460, 434, 326, 787, 1509, 434, 279, 4362, 316, 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, 740, 67, 1154, 4485, 387, 67, 3804, 856, 12, 2890, 16, 460, 4672, 3536, 1986, 1131, 4485, 387, 1524, 856, 353, 2511, 603, 326, 12675, 460, 434, 326, 787, 1509, 434, 279, 4362, 316, 326...
loc = settings.LANGUAGE_CODE if loc != startloc: log.warn("Cannot set locale to '%s', using default locale '%s'", startloc, loc)
loc = to_locale(settings.LANGUAGE_CODE) if loc != startloc and loc[:loc.find('_')] != startloc: log.warn("Cannot set locale to '%s'. Using default locale '%s'.", startloc, loc)
def get_locale_conv(loc=None): startloc = loc if not loc: loc = to_locale(get_language()) # '-' is a language delimiter, not a locale, but people often mess that up if loc.find('-') > -1: loc = to_locale(loc) try: log.debug('setting locale: %s', loc) locale.setlocale(locale.LC_ALL, locale.normalize(loc)) return locale.localeconv() except locale.Error: # darn, try a different path pos = loc.find('_') if pos>-1: loc = loc[:pos] return get_locale_conv(loc) else: loc = settings.LANGUAGE_CODE if loc != startloc: log.warn("Cannot set locale to '%s', using default locale '%s'", startloc, loc) return get_locale_conv(loc) else: log.fatal("Cannot set locale to default locale '%s', something is misconfigured", loc) raise ImproperlyConfigured("Bad settings LANGUAGE_CODE")
0bc360df52ec65d9aac684778295ca42158a8868 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/13656/0bc360df52ec65d9aac684778295ca42158a8868/utils.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 6339, 67, 4896, 12, 1829, 33, 7036, 4672, 787, 1829, 273, 1515, 309, 486, 1515, 30, 1515, 273, 358, 67, 6339, 12, 588, 67, 4923, 10756, 225, 468, 4014, 353, 279, 2653, 5654, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6339, 67, 4896, 12, 1829, 33, 7036, 4672, 787, 1829, 273, 1515, 309, 486, 1515, 30, 1515, 273, 358, 67, 6339, 12, 588, 67, 4923, 10756, 225, 468, 4014, 353, 279, 2653, 5654, ...
if not isinstance(drs, PresuppositionDRS):
if not isinstance(drs, PresuppositionDRS) and not isinstance(drs, DrtBooleanExpression):
def accommodation(drs): condition_index = self._get_condition_index(drs, trail) return Reading([(drs, NonPronPresuppositionDRS.Accommodation(self, condition_index))])
fe3fe26cf83f533b7dda8f1b63f4121c377e8d84 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2768/fe3fe26cf83f533b7dda8f1b63f4121c377e8d84/presuppositions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 28217, 1711, 367, 12, 3069, 87, 4672, 2269, 67, 1615, 273, 365, 6315, 588, 67, 4175, 67, 1615, 12, 3069, 87, 16, 15569, 13, 327, 31941, 3816, 12, 3069, 87, 16, 3858, 52, 1949, 12236, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 28217, 1711, 367, 12, 3069, 87, 4672, 2269, 67, 1615, 273, 365, 6315, 588, 67, 4175, 67, 1615, 12, 3069, 87, 16, 15569, 13, 327, 31941, 3816, 12, 3069, 87, 16, 3858, 52, 1949, 12236, ...
wrt('\n\n
wrt('\n
def generateZope2Interface(self, element, **kw): outfile = StringIO() log.info("%sGenerating zope2 interface '%s'.", ' '*self.infoind, element.getName())
6b8384a4ce2f95fc8212385e3ca7b5aeecd8fd91 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11941/6b8384a4ce2f95fc8212385e3ca7b5aeecd8fd91/ArchetypesGenerator.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 62, 1306, 22, 1358, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 8756, 273, 15777, 1435, 613, 18, 1376, 27188, 87, 21755, 998, 1306, 22, 1560, 1995, 87, 14550, 16, 296, 565, 14609, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 62, 1306, 22, 1358, 12, 2890, 16, 930, 16, 2826, 9987, 4672, 8756, 273, 15777, 1435, 613, 18, 1376, 27188, 87, 21755, 998, 1306, 22, 1560, 1995, 87, 14550, 16, 296, 565, 14609, 2...
debug(" third-party Netscape cookie during "
_debug(" third-party Netscape cookie during "
def set_ok_verifiability(self, cookie, request): if request.is_unverifiable() and is_third_party(request): if cookie.version > 0 and self.strict_rfc2965_unverifiable: debug(" third-party RFC 2965 cookie during " "unverifiable transaction") return False elif cookie.version == 0 and self.strict_ns_unverifiable: debug(" third-party Netscape cookie during " "unverifiable transaction") return False return True
feb0a3bdbccc7b45bc8b960aa4c3434838b52d05 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/feb0a3bdbccc7b45bc8b960aa4c3434838b52d05/cookielib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 601, 67, 502, 704, 2967, 12, 2890, 16, 3878, 16, 590, 4672, 309, 590, 18, 291, 67, 318, 502, 8424, 1435, 471, 353, 67, 451, 6909, 67, 21214, 12, 2293, 4672, 309, 3878, 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, 444, 67, 601, 67, 502, 704, 2967, 12, 2890, 16, 3878, 16, 590, 4672, 309, 590, 18, 291, 67, 318, 502, 8424, 1435, 471, 353, 67, 451, 6909, 67, 21214, 12, 2293, 4672, 309, 3878, 18, ...
if edge_soul == NULL:
if edge_soul is None:
def getEdge( self, i ): edge_soul = lgs.pathGetEdge( addressof(self), i ) # reinterpret the error code as an exception if edge_soul == NULL: raise IndexError("%d is out of bounds"%i) return Edge.from_pointer( edge_soul )
3a2d42a888882e42b5836b86138db74f440e1669 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10974/3a2d42a888882e42b5836b86138db74f440e1669/core.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 6098, 12, 365, 16, 277, 262, 30, 3591, 67, 87, 1003, 273, 328, 564, 18, 803, 967, 6098, 12, 1758, 792, 12, 2890, 3631, 277, 262, 225, 468, 283, 24713, 326, 555, 981, 487, 392, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6098, 12, 365, 16, 277, 262, 30, 3591, 67, 87, 1003, 273, 328, 564, 18, 803, 967, 6098, 12, 1758, 792, 12, 2890, 3631, 277, 262, 225, 468, 283, 24713, 326, 555, 981, 487, 392, ...
self.hobj.arr1 = [3.]
def test_assignment(self): # check starting value self.assertEqual(3.1415926, self.hobj.arr1[0]) # check default value self.assertEqual([98.9], self.hobj.trait('arr1').trait_type.default_value) # use unit_convert to perform unit conversion self.hobj.arr1 = [3.] self.hobj.arr2 = convert_units(self.hobj.arr1, self.hobj.trait('arr1').units, 'inch') self.assertAlmostEqual(36., self.hobj.arr2[0], 5)
edf1083fa3e9917f4722345b730b479243081141 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12610/edf1083fa3e9917f4722345b730b479243081141/test_array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12960, 12, 2890, 4672, 468, 866, 5023, 460, 365, 18, 11231, 5812, 12, 23, 18, 3461, 24872, 5558, 16, 365, 18, 76, 2603, 18, 5399, 21, 63, 20, 5717, 468, 866, 805, 460, 365,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 12960, 12, 2890, 4672, 468, 866, 5023, 460, 365, 18, 11231, 5812, 12, 23, 18, 3461, 24872, 5558, 16, 365, 18, 76, 2603, 18, 5399, 21, 63, 20, 5717, 468, 866, 805, 460, 365,...
status.append ('connected')
status.append('connected')
def __repr__ (self): status = [self.__class__.__module__+"."+self.__class__.__name__] if self.accepting and self.addr: status.append ('listening') elif self.connected: status.append ('connected') if self.addr is not None: try: status.append ('%s:%d' % self.addr) except TypeError: status.append (repr(self.addr)) return '<%s at %#x>' % (' '.join (status), id (self))
52c4de7c23c31563e4f0316b68865e17bb8c0f33 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/52c4de7c23c31563e4f0316b68865e17bb8c0f33/asyncore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 261, 2890, 4672, 1267, 273, 306, 2890, 16186, 1106, 972, 16186, 2978, 972, 9078, 1199, 15, 2890, 16186, 1106, 972, 16186, 529, 972, 65, 309, 365, 18, 9436, 310, 471, 36...
args += '-D ' + dir
args += ' -D ' + dir
def execute(self, iterations = 1, dir = None, nprocs = count_cpus(), args = ''): for i in range(iterations): args = args + ' -c '+self.srcdir+'/client.txt' if dir: args += '-D ' + dir args += ' %s' % nprocs system(self.srcdir + '/dbench ' + args)
9e36daf803cc4a94113d2b802f89ad350d798f51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12268/9e36daf803cc4a94113d2b802f89ad350d798f51/dbench.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 1577, 273, 599, 16, 290, 27537, 273, 1056, 67, 20696, 9334, 833, 273, 875, 4672, 364, 277, 316, 1048, 12, 19330, 4672, 833, 273, 833, 397, 296,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1836, 12, 2890, 16, 11316, 273, 404, 16, 1577, 273, 599, 16, 290, 27537, 273, 1056, 67, 20696, 9334, 833, 273, 875, 4672, 364, 277, 316, 1048, 12, 19330, 4672, 833, 273, 833, 397, 296,...
p_objects.sort(lambda x,y: cmp(y.releasedate, x.releasedate) \ or cmp(x.sortorder, y.sortorder))
p_objects.sort(lambda x,y: cmp(x.sortorder, y.sortorder) \ or cmp(y.releasedate, x.releasedate))
def getArchiveListing(self, p_archive): """ """ p_objects = p_archive.getObjects() p_objects.sort(lambda x,y: cmp(y.releasedate, x.releasedate) \ or cmp(x.sortorder, y.sortorder)) return self.get_archive_listing(p_objects)
049334ef9855999ce9f4fd7e3bbca229d4f8cf7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3287/049334ef9855999ce9f4fd7e3bbca229d4f8cf7b/CHMSite.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7465, 19081, 12, 2890, 16, 293, 67, 10686, 4672, 3536, 3536, 293, 67, 6911, 273, 293, 67, 10686, 18, 588, 4710, 1435, 293, 67, 6911, 18, 3804, 12, 14661, 619, 16, 93, 30, 9411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7465, 19081, 12, 2890, 16, 293, 67, 10686, 4672, 3536, 3536, 293, 67, 6911, 273, 293, 67, 10686, 18, 588, 4710, 1435, 293, 67, 6911, 18, 3804, 12, 14661, 619, 16, 93, 30, 9411, ...
newhdu.writeto('out.fits', clobber=True)
def fix_sdss_idr(fits): hdr = fits[0].header if hdr['SIMPLE'] is False: hdr.update('SIMPLE', True, 'FITS compliant (fix-sdss-idr.py)') if hdr.get('SDSS', None) == pyfits.UNDEFINED: hdr['SDSS'] = True print 'Set SDSS to True' print 'UNSIGNED in hdr?', ('UNSIGNED' in hdr) print hdr.get('UNSIGNED', None) print hdr.ascardlist()[6] print type(hdr.ascardlist()[6]) print hdr.ascardlist()[6].key print hdr.ascardlist()[6].value print hdr.ascardlist()[6].comment print hdr[6] if hdr.get('UNSIGNED', None) == pyfits.UNDEFINED: hdr['UNSIGNED'] = True print 'Set UNSIGNED to True' if (not 'BSCALE' in hdr) and (not 'BZERO' in hdr): print 'Adding BZERO = 32768 card' hdr.update('BZERO', 32768, 'Unsigned -> signed') # ?? What if it *doesn't* contain SDSS and UNSIGNED ?? print 'type:', type(fits[0]) print 'data type:', type(fits[0].data) print 'hdu type:', fits[0].header._hdutype print 'card 0:', fits[0].header.ascard[0] fits[0].header._updateHDUtype() print 'hdu type:', fits[0].header._hdutype data = fits[0].data print 'data type:', type(data) print 'data:', data hdr = fits[0].header newhdu = hdr._hdutype(data=data, header=hdr) print 'newhdu:', newhdu newhdu._file = fits[0]._file newhdu._ffile = fits[0]._ffile newhdu._datLoc = fits[0]._datLoc newhdu.__getattr__('data') print 'data:', type(newhdu.data) print 'data:', newhdu.data.dtype print 'data range:', newhdu.data.min(), 'to', newhdu.data.max() newhdu.writeto('out.fits', clobber=True)
b39e4e08bbf236c86881fcfd5557ca0d31fc1d09 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7059/b39e4e08bbf236c86881fcfd5557ca0d31fc1d09/fix-sdss-idr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 6427, 1049, 67, 350, 86, 12, 18352, 4672, 7723, 273, 13351, 63, 20, 8009, 3374, 309, 7723, 3292, 31669, 900, 3546, 353, 1083, 30, 7723, 18, 2725, 2668, 31669, 900, 2187, 1053, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2917, 67, 6427, 1049, 67, 350, 86, 12, 18352, 4672, 7723, 273, 13351, 63, 20, 8009, 3374, 309, 7723, 3292, 31669, 900, 3546, 353, 1083, 30, 7723, 18, 2725, 2668, 31669, 900, 2187, 1053, ...
print 'RECORDSERVER GOT EVENT NOTICE'
def eventNotice(self): print 'RECORDSERVER GOT EVENT NOTICE'
79d05135bad543b5259e46372a050b19d6934859 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/79d05135bad543b5259e46372a050b19d6934859/recordserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 871, 20127, 12, 2890, 4672, 1172, 296, 22261, 4370, 611, 1974, 9964, 29940, 11, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 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, 871, 20127, 12, 2890, 4672, 1172, 296, 22261, 4370, 611, 1974, 9964, 29940, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
required=True)
required=True, on_change=['fiscalyear'])
def _action_open_chart(self, cursor, user, data, context=None): model_data_obj = self.pool.get('ir.model.data') act_window_obj = self.pool.get('ir.action.act_window')
ee36aa0c050e503d571eba48377ed4ab12e84ec3 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9290/ee36aa0c050e503d571eba48377ed4ab12e84ec3/account.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 1128, 67, 3190, 67, 11563, 12, 2890, 16, 3347, 16, 729, 16, 501, 16, 819, 33, 7036, 4672, 938, 67, 892, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 61...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1128, 67, 3190, 67, 11563, 12, 2890, 16, 3347, 16, 729, 16, 501, 16, 819, 33, 7036, 4672, 938, 67, 892, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 481, 18, 2284, 18, 892, 61...
(self.op.os_type, pnode.name),
(self.op.os_type, pnode),
def CheckPrereq(self): """Check prerequisites.
cf26a87a6f249091d1b4e39d90b027e0ab688d45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7542/cf26a87a6f249091d1b4e39d90b027e0ab688d45/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2073, 2050, 822, 85, 12, 2890, 4672, 3536, 1564, 30328, 16608, 2997, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
url, fragment = url_pair
url, fragment = url_pair
def openhtml(self, url_pair):
89c9ad8fa8b4bb95895e6c06ddfc6793a05b0c37 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/89c9ad8fa8b4bb95895e6c06ddfc6793a05b0c37/wcnew.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 2620, 12, 2890, 16, 880, 67, 6017, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1696, 2620, 12, 2890, 16, 880, 67, 6017, 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, ...
factorization of n
a list of integers whose product is n
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...
Get the status of the computation:
Get the status of the computation::
sage: def get_url(url): h = urllib.urlopen(url); data = h.read(); h.close(); return data
a8765ab2874bf9249895c07b41ca32cfb18396c4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9417/a8765ab2874bf9249895c07b41ca32cfb18396c4/twist.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 272, 410, 30, 1652, 336, 67, 718, 12, 718, 4672, 366, 273, 11527, 18, 295, 18589, 12, 718, 1769, 501, 273, 366, 18, 896, 5621, 366, 18, 4412, 5621, 327, 501, 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, 272, 410, 30, 1652, 336, 67, 718, 12, 718, 4672, 366, 273, 11527, 18, 295, 18589, 12, 718, 1769, 501, 273, 366, 18, 896, 5621, 366, 18, 4412, 5621, 327, 501, 2, -100, -100, -100, -100, -10...
self.default = 0
self.default = 0
def __init__(self, *elems): self.default = 0 for i, e in izip(count(0), elems): self[i] = e
3e88e242bebba993bda5dbd167a95f6f979e626d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8158/3e88e242bebba993bda5dbd167a95f6f979e626d/diffengine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 292, 7424, 4672, 365, 18, 1886, 273, 374, 364, 277, 16, 425, 316, 277, 4450, 12, 1883, 12, 20, 3631, 14733, 4672, 365, 63, 77, 65, 273, 425, 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, 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, 380, 292, 7424, 4672, 365, 18, 1886, 273, 374, 364, 277, 16, 425, 316, 277, 4450, 12, 1883, 12, 20, 3631, 14733, 4672, 365, 63, 77, 65, 273, 425, 2, ...
self.log.error('Wiki macro failed', e)
self.log.error('Wiki macro %s failed (%s)' % (name, e))
def render_macro(self, req, name, content): module = self._load_macro(name) try: return module.execute(req and req.hdf, content, self.env) except Exception, e: self.log.error('Wiki macro failed', e) raise e
c7f8d364f53c0d1ead624692e35ffd1012ea0d2b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/c7f8d364f53c0d1ead624692e35ffd1012ea0d2b/macros.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 1605, 273, 365, 6315, 945, 67, 26448, 12, 529, 13, 775, 30, 327, 1605, 18, 8837, 12, 3658, 471, 1111, 18, 26428, 16, 913,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1743, 67, 26448, 12, 2890, 16, 1111, 16, 508, 16, 913, 4672, 1605, 273, 365, 6315, 945, 67, 26448, 12, 529, 13, 775, 30, 327, 1605, 18, 8837, 12, 3658, 471, 1111, 18, 26428, 16, 913,...
'%s ( path = %s, noescape = %s, kwargs = %s ) )' % (self.func, args['path'], args['noescape'], kw) )
'%s ( path = %s, queryargs = %s, noescape = %s, kwargs = %s ) )' % \ (self.func, args['path'], args['queryargs'], args['noescape'], kw) )
def genCode(self, indent, codeout, tagreg, tag): DTCompilerUtil.tagDebug(indent, codeout, tag) args=DTUtil.tagCall(tag, [ ('path'), ('noescape', 'None')], kwcol = 'kw' ) kw=DTCompilerUtil.pyifyKWArgs(tag, args['kw']) args=DTCompilerUtil.pyifyArgs(tag, args)
3d06e3f1aafb477e16e0783740a6d94db7521d07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5832/3d06e3f1aafb477e16e0783740a6d94db7521d07/HTMLTags.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1085, 12, 2890, 16, 3504, 16, 981, 659, 16, 1047, 1574, 16, 1047, 4672, 10696, 9213, 1304, 18, 2692, 2829, 12, 9355, 16, 981, 659, 16, 1047, 13, 833, 33, 9081, 1304, 18, 2692, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3157, 1085, 12, 2890, 16, 3504, 16, 981, 659, 16, 1047, 1574, 16, 1047, 4672, 10696, 9213, 1304, 18, 2692, 2829, 12, 9355, 16, 981, 659, 16, 1047, 13, 833, 33, 9081, 1304, 18, 2692, ...
and type(conversion) is not type(""):
and type(conversion) is not StringType:
def subconvert(self, endchar=None, depth=0): stack = [] line = self.line if DEBUG and endchar: self.err_write( "subconvert(%s)\n line = %s\n" % (`endchar`, `line[:20]`)) while line: if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line return line m = _comment_rx.match(line) if m: text = m.group(1) if text: self.write("(COMMENT\n- %s \n)COMMENT\n-\\n\n" % encode(text)) line = line[m.end():] continue m = _begin_env_rx.match(line) if m: # re-write to use the macro handler line = r"\%s %s" % (m.group(1), line[m.end():]) continue m = _end_env_rx.match(line) if m: # end of environment envname = m.group(1) if envname == "document": # special magic for n in stack[1:]: if n not in self.autoclosing: raise LaTeXFormatError( "open element on stack: " + `n`) # should be more careful, but this is easier to code: stack = [] self.write(")document\n") elif stack and envname == stack[-1]: self.write(")%s\n" % envname) del stack[-1] popping(envname, "a", len(stack) + depth) else: self.err_write("stack: %s\n" % `stack`) raise LaTeXFormatError( "environment close for %s doesn't match" % envname) line = line[m.end():] continue m = _begin_macro_rx.match(line) if m: # start of macro macroname = m.group(1) if macroname == "verbatim": # really magic case! pos = string.find(line, "\\end{verbatim}") text = line[m.end(1):pos] self.write("(verbatim\n") self.write("-%s\n" % encode(text)) self.write(")verbatim\n") line = line[pos + len("\\end{verbatim}"):] continue numbered = 1 opened = 0 if macroname[-1] == "*": macroname = macroname[:-1] numbered = 0 if macroname in self.autoclosing and macroname in stack: while stack[-1] != macroname: top = stack.pop() if top and top not in self.discards: self.write(")%s\n-\\n\n" % top) popping(top, "b", len(stack) + depth) if macroname not in self.discards: self.write("-\\n\n)%s\n-\\n\n" % macroname) popping(macroname, "c", len(stack) + depth - 1) del stack[-1] # if macroname in self.discards: self.push_output(StringIO.StringIO()) else: self.push_output(self.ofp) # params, optional, empty, environ = self.start_macro(macroname) if not numbered: self.write("Anumbered TOKEN no\n") # rip off the macroname if params: if optional and len(params) == 1: line = line[m.end():] else: line = line[m.end(1):] elif empty: line = line[m.end(1):] else: line = line[m.end():] # # Very ugly special case to deal with \item[]. The catch # is that this needs to occur outside the for loop that # handles attribute parsing so we can 'continue' the outer # loop. # if optional and type(params[0]) is type(()): # the attribute name isn't used in this special case pushing(macroname, "a", depth + len(stack)) stack.append(macroname) self.write("(%s\n" % macroname) m = _start_optional_rx.match(line) if m: self.line = line[m.end():] line = self.subconvert("]", depth + len(stack)) line = "}" + line continue # handle attribute mappings here: for attrname in params: if optional: optional = 0 if type(attrname) is type(""): m = _optional_rx.match(line) if m: line = line[m.end():] self.write("A%s TOKEN %s\n" % (attrname, encode(m.group(1)))) elif type(attrname) is type(()): # This is a sub-element; but don't place the # element we found on the stack (\section-like) pushing(macroname, "b", len(stack) + depth) stack.append(macroname) self.write("(%s\n" % macroname) macroname = attrname[0] m = _start_group_rx.match(line) if m: line = line[m.end():] elif type(attrname) is type([]): # A normal subelement: <macroname><attrname>...</>... attrname = attrname[0] if not opened: opened = 1 self.write("(%s\n" % macroname) pushing(macroname, "c", len(stack) + depth) self.write("(%s\n" % attrname) pushing(attrname, "sub-elem", len(stack) + depth + 1) self.line = skip_white(line)[1:] line = self.subconvert("}", len(stack) + depth + 1)[1:] dbgmsg("subconvert() ==> " + `line[:20]`) popping(attrname, "sub-elem", len(stack) + depth + 1) self.write(")%s\n" % attrname) else: m = _parameter_rx.match(line) if not m: raise LaTeXFormatError( "could not extract parameter %s for %s: %s" % (attrname, macroname, `line[:100]`)) value = m.group(1) if _token_rx.match(value): dtype = "TOKEN" else: dtype = "CDATA" self.write("A%s %s %s\n" % (attrname, dtype, encode(value))) line = line[m.end():] if params and type(params[-1]) is type('') \ and (not empty) and not environ: # attempt to strip off next '{' m = _start_group_rx.match(line) if not m: raise LaTeXFormatError( "non-empty element '%s' has no content: %s" % (macroname, line[:12])) line = line[m.end():] if not opened: self.write("(%s\n" % macroname) pushing(macroname, "d", len(stack) + depth) if empty: line = "}" + line stack.append(macroname) self.pop_output() continue if line[0] == endchar and not stack: if DEBUG: self.err_write("subconvert() --> %s\n" % `line[1:21]`) self.line = line[1:] return self.line if line[0] == "}": # end of macro or group macroname = stack[-1] conversion = self.table.get(macroname) if macroname \ and macroname not in self.discards \ and type(conversion) is not type(""): # otherwise, it was just a bare group self.write(")%s\n" % stack[-1]) popping(macroname, "d", len(stack) + depth - 1) del stack[-1] line = line[1:] continue if line[0] == "{": pushing("", "e", len(stack) + depth) stack.append("") line = line[1:] continue if line[0] == "\\" and line[1] in ESCAPED_CHARS: self.write("-%s\n" % encode(line[1])) line = line[2:] continue if line[:2] == r"\\": self.write("(BREAK\n)BREAK\n") line = line[2:] continue m = _text_rx.match(line) if m: text = encode(m.group()) self.write("-%s\n" % text) line = line[m.end():] continue # special case because of \item[] if line[0] == "]": self.write("-]\n") line = line[1:] continue # avoid infinite loops extra = "" if len(line) > 100: extra = "..." raise LaTeXFormatError("could not identify markup: %s%s" % (`line[:100]`, extra)) while stack and stack[-1] in self.autoclosing: self.write("-\\n\n") self.write(")%s\n" % stack[-1]) popping(stack.pop(), "e", len(stack) + depth - 1) if stack: raise LaTeXFormatError("elements remain on stack: " + string.join(stack, ", ")) # otherwise we just ran out of input here...
bf2763cf07522d5ef19fe1c77b99de178484ab7b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bf2763cf07522d5ef19fe1c77b99de178484ab7b/latex2esis.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 720, 6283, 12, 2890, 16, 679, 3001, 33, 7036, 16, 3598, 33, 20, 4672, 2110, 273, 5378, 980, 273, 365, 18, 1369, 309, 6369, 471, 679, 3001, 30, 365, 18, 370, 67, 2626, 12, 315, 1717, ...
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman INPUT: One among the following: - ``string`` -- a string from which the Huffman encoding should be created - ``frequencies`` -- a dictionary associating its frequency or its number of occurrences to each letter of the alphabet. EXAMPLE:: sage: from sage.coding.source_coding.huffman import Huffman sage: str = "Sage is my most favorite general purpose computer algebra system" sage: h = Huffman(str) If both arguments are supplied, an exception is raised :: sage: Huffman(string=str, frequencies={'a':8})
def __init__(self, string=None, table=None): r""" Constructor for Huffman. See the docstring of this class for full documentation. EXAMPLES:: sage: from sage.coding.source_coding.huffman import Huffman sage: str = "Sage is my most favorite general purpose computer algebra system" sage: h = Huffman(str) TESTS: If both arguments are supplied, an exception is raised:: sage: Huffman(string=str, table={'a':8})
def __init__(self, string = None, frequencies = None): r""" Constructor for Huffman
0aa5d0e07206199e4e64708c13056046cecfe083 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9890/0aa5d0e07206199e4e64708c13056046cecfe083/huffman.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 16, 18138, 273, 599, 4672, 436, 8395, 11417, 364, 670, 28581, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 533, 273, 599, 16, 18138, 273, 599, 4672, 436, 8395, 11417, 364, 670, 28581, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
if self.data:
if self.data and self.data.domain.classVar:
def computeBaseScore(self): if self.data: self.baseCurveX, self.baseCurveY = self.computeAddedScore(list(self.curCutPoints))
ae83bc8e1038df87b0fe497ddb634614447ce035 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6366/ae83bc8e1038df87b0fe497ddb634614447ce035/OWDiscretize.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3671, 2171, 7295, 12, 2890, 4672, 309, 365, 18, 892, 471, 365, 18, 892, 18, 4308, 18, 1106, 1537, 30, 365, 18, 1969, 9423, 60, 16, 365, 18, 1969, 9423, 61, 273, 365, 18, 9200, 8602, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3671, 2171, 7295, 12, 2890, 4672, 309, 365, 18, 892, 471, 365, 18, 892, 18, 4308, 18, 1106, 1537, 30, 365, 18, 1969, 9423, 60, 16, 365, 18, 1969, 9423, 61, 273, 365, 18, 9200, 8602, ...
for uid in meeting_ob.participants.uids:
for uid in meeting_ob.participants.attendees.keys():
def jstree_participants(self): """ """ jstree, participants = [], {} site = self.getSite() meeting_config = meeting_module.get_config() meeting_obs = site.getCatalogedObjectsCheckView(meta_type=meeting_config['meta_type'], approved=1)
3bab478c3664912545513ddfb53b89283209c15f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3287/3bab478c3664912545513ddfb53b89283209c15f/reports.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 334, 992, 67, 2680, 27620, 12, 2890, 4672, 3536, 3536, 525, 334, 992, 16, 22346, 273, 5378, 16, 2618, 2834, 273, 365, 18, 588, 4956, 1435, 18721, 310, 67, 1425, 273, 18721, 310, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 525, 334, 992, 67, 2680, 27620, 12, 2890, 4672, 3536, 3536, 525, 334, 992, 16, 22346, 273, 5378, 16, 2618, 2834, 273, 365, 18, 588, 4956, 1435, 18721, 310, 67, 1425, 273, 18721, 310, 6...
os.symlink('/usr/portage/profiles/%s' % self.conf.profile, targ)
os.symlink(self.env['PORTDIR'] + '/profiles/%s' % self.profile, targ)
def make_profile_link(self): targ = self.target_root.pjoin(self.portage_cr + '/etc/make.profile') util.mkdir( os.path.dirname(targ) ) if os.path.lexists(targ): os.unlink(targ) os.symlink('/usr/portage/profiles/%s' % self.conf.profile, targ)
d61d312fbaa024a816b78a716f1e46b883e80de3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13627/d61d312fbaa024a816b78a716f1e46b883e80de3/stage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 5040, 67, 1232, 12, 2890, 4672, 24202, 273, 365, 18, 3299, 67, 3085, 18, 84, 5701, 12, 2890, 18, 655, 410, 67, 3353, 397, 1173, 14175, 19, 6540, 18, 5040, 6134, 1709, 18, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 5040, 67, 1232, 12, 2890, 4672, 24202, 273, 365, 18, 3299, 67, 3085, 18, 84, 5701, 12, 2890, 18, 655, 410, 67, 3353, 397, 1173, 14175, 19, 6540, 18, 5040, 6134, 1709, 18, 2...
logging.info('No need to start PyWebSocket server.')
logging.info('No need to start %s server.' % self._server_name)
def Start(self): if not self._webkit_tests: logging.info('No need to start PyWebSocket server.') return if self.IsRunning(): raise PyWebSocketNotStarted('PyWebSocket is already running.')
1e7c64df25a5fd0d96d40455e10197ad34d0bbbe /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/1e7c64df25a5fd0d96d40455e10197ad34d0bbbe/websocket_server.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 12, 2890, 4672, 309, 486, 365, 6315, 29319, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 738, 87, 1438, 1093, 738, 365, 6315, 3567, 67, 529, 13, 327, 309, 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, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3603, 12, 2890, 4672, 309, 486, 365, 6315, 29319, 67, 16341, 30, 2907, 18, 1376, 2668, 2279, 1608, 358, 787, 738, 87, 1438, 1093, 738, 365, 6315, 3567, 67, 529, 13, 327, 309, 365, 18, ...
yield str(line)
yield line if callable(line) else str(line)
def handleRequest(self, scheme='', netloc='', path='', query='', fragments='', arguments={}, Headers={}, **kwargs):
e27bc26d8eae8a71497398e48140f397fa88f001 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6001/e27bc26d8eae8a71497398e48140f397fa88f001/dynamichtml.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 15713, 12, 2890, 16, 4355, 2218, 2187, 17345, 2218, 2187, 589, 2218, 2187, 843, 2218, 2187, 14656, 2218, 2187, 1775, 28793, 12158, 28793, 2826, 4333, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 15713, 12, 2890, 16, 4355, 2218, 2187, 17345, 2218, 2187, 589, 2218, 2187, 843, 2218, 2187, 14656, 2218, 2187, 1775, 28793, 12158, 28793, 2826, 4333, 4672, 2, -100, -100, -100, -100, -100, ...
550. If all addresses are accepted, then the method will return an
550. If all addresses are accepted, then the method will return an
def sendmail(self, from_addr, to_addrs, msg, mail_options=[], rcpt_options=[]): """This command performs an entire mail transaction.
38138a69a9ce81026584c5df54a7d656104103d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/38138a69a9ce81026584c5df54a7d656104103d9/smtplib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 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, 1366, 4408, 12, 2890, 16, 628, 67, 4793, 16, 358, 67, 23305, 16, 1234, 16, 4791, 67, 2116, 22850, 6487, 4519, 337, 67, 2116, 33, 8526, 4672, 3536, 2503, 1296, 11199, 392, 7278, 4791, 2...
except InvalidOperation:
except (InvalidOperation, UnicodeEncodeError):
def round_decimal(val='0', places=None, roundfactor='0', normalize=True): """ PARTIAL UNIT ROUNDING DECIMAL Converts a valid float, integer, or string to a decimal number with a specified number of decimal places, performs "partial unit rounding", and decimal normalization. METHOD ARGUEMENTS: `val` The value to be converted and optionally formated to decimal. `places` The decimal precision is defined by integer "places" and must be <= the precision defined in the decimal.Decimal context. `roundfactor` (partial unit rounding factor) If purf is between -1 and 1, purf rounds up (positive purf value) or down (negative purf value) in factional "purf" increments. `normalize` If normalize is True (any value other than False), then rightmost zeros are truncated. """ #-- Edit function arguments and set necessary defaults if str(normalize) == 'False': normalize = False #Allow templates to submit False from filter try: roundfactor = Decimal(str(roundfactor)) except (InvalidOperation, ValueError): raise RoundedDecimalError(val=roundfactor, id =1, msg="roundfactor - InvalidOperation or ValueError") #reraise exception and return to caller if not (abs(roundfactor) >= 0 and abs(roundfactor) <= 1): raise RoundedDecimalError(val=roundfactor, id=2, msg="roundfactor - Out of Range - must be between -1 and +1") try: if places != None: places = int(places) except ValueError: raise RoundedDecimalError(val=places, id=3, msg='ValueError, Invalid Integer ') if places > getcontext().prec: raise RoundedDecimalError(val=places, id=4, msg='places Exceeds Decimal Context Precision') try: decval =Decimal(str(val)) except InvalidOperation: raise RoundedDecimalError(val=val, id=5, msg='InvalidOperation - val cannot be converted to Decimal') #-- Round decimal number by the Partial Unit Rounding Factor if roundfactor and decval%roundfactor: if roundfactor < 0: roundby = 0 else: roundby = (decval/abs(decval))*roundfactor #change sign of roudby to decval decval=(decval//roundfactor*roundfactor)+roundby #round up or down by next roundfactor increment #-- Adjust number of decimal places if caller provided decimal places if places != None: decmask = '0.'.ljust(places+2,'0') #i.e. => '.00' if places eq 2 decval=decval.quantize(Decimal(decmask), rounding=ROUND_DOWN) #convert to Decimal and truncate to two decimals #-- normalize - strips the rightmost zeros... i.e. 2.0 => returns as 2 if normalize: # if the number has no decimal portion return just the number with no decimal places # if the number has decimal places (i.e. 3.20), normalize the number (to 3.2) # This check is necesary because normalizing a number which trails in zeros (i.e. 200 or 200.00) normalizes to # scientific notation (2E+2) if decval==decval.to_integral(): decval = decval.quantize(Decimal('1')) else: decval.normalize() return decval
76054867334b211bd56c099d345de3c5e0ab5efd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13656/76054867334b211bd56c099d345de3c5e0ab5efd/numbers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3643, 67, 12586, 12, 1125, 2218, 20, 2187, 12576, 33, 7036, 16, 3643, 6812, 2218, 20, 2187, 3883, 33, 5510, 4672, 3536, 20814, 6365, 28721, 27048, 1360, 25429, 20377, 279, 923, 1431, 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, 3643, 67, 12586, 12, 1125, 2218, 20, 2187, 12576, 33, 7036, 16, 3643, 6812, 2218, 20, 2187, 3883, 33, 5510, 4672, 3536, 20814, 6365, 28721, 27048, 1360, 25429, 20377, 279, 923, 1431, 16, ...
'StatusBar', 'Icon']
'StatusBar', 'StatusBarPane']
def hideDesignTime(self): # Because the Designer is actually a wxFrame pretending to be a # wxDialog, introspection will pick up wxFrame spesific properties # which must be supressed return BaseFrameDTC.hideDesignTime(self) + ['ToolBar', 'MenuBar', 'StatusBar', 'Icon']
46f420f8c59cbd43dab335e76491b59ef238374e /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/46f420f8c59cbd43dab335e76491b59ef238374e/FrameCompanions.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 15478, 950, 12, 2890, 4672, 468, 15191, 326, 29703, 264, 353, 6013, 279, 7075, 3219, 675, 88, 2846, 358, 506, 279, 468, 7075, 6353, 16, 18446, 7017, 903, 6002, 731, 7075, 3219, 169...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6853, 15478, 950, 12, 2890, 4672, 468, 15191, 326, 29703, 264, 353, 6013, 279, 7075, 3219, 675, 88, 2846, 358, 506, 279, 468, 7075, 6353, 16, 18446, 7017, 903, 6002, 731, 7075, 3219, 169...
if self.force or output_file is None or newer(source, output_file)):
if self.force or output_file is None or newer(source, output_file):
def preprocess (self, source, output_file=None, macros=None, include_dirs=None, extra_preargs=None, extra_postargs=None):
912af324ac7f72be9296fb4db6cb4f6bc4bc1bc1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/912af324ac7f72be9296fb4db6cb4f6bc4bc1bc1/unixccompiler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17942, 261, 2890, 16, 1084, 16, 876, 67, 768, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, 1968, 33, 7036, 467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17942, 261, 2890, 16, 1084, 16, 876, 67, 768, 33, 7036, 16, 24302, 33, 7036, 16, 2341, 67, 8291, 33, 7036, 16, 2870, 67, 1484, 1968, 33, 7036, 16, 2870, 67, 2767, 1968, 33, 7036, 467...
assert Version(1,2,3).major == 1 assert Version(1,2,3).minor == 2 assert Version(1,2,3).release == 3 assert Version(1,2,3,'4.5alpha6').additional == '4.5alpha6'
assert Version(1, 2, 3).major == 1 assert Version(1, 2, 3).minor == 2 assert Version(1, 2, 3).release == 3 assert Version(1, 2, 3, '4.5alpha6').additional == '4.5alpha6'
def test_Version(self): Version = wikiutil.Version # test properties assert Version(1,2,3).major == 1 assert Version(1,2,3).minor == 2 assert Version(1,2,3).release == 3 assert Version(1,2,3,'4.5alpha6').additional == '4.5alpha6' # test Version init and Version to str conversion assert str(Version(1)) == "1.0.0" assert str(Version(1,2)) == "1.2.0" assert str(Version(1,2,3)) == "1.2.3" assert str(Version(1,2,3,'4.5alpha6')) == "1.2.3-4.5alpha6" assert str(Version(version='1.2.3')) == "1.2.3" assert str(Version(version='1.2.3-4.5alpha6')) == "1.2.3-4.5alpha6" # test Version comparison, trivial cases assert Version() == Version() assert Version(1) == Version(1) assert Version(1,2) == Version(1,2) assert Version(1,2,3) == Version(1,2,3) assert Version(1,2,3,'foo') == Version(1,2,3,'foo') assert Version(1) != Version(2) assert Version(1,2) != Version(1,3) assert Version(1,2,3) != Version(1,2,4) assert Version(1,2,3,'foo') != Version(1,2,3,'bar') assert Version(1) < Version(2) assert Version(1,2) < Version(1,3) assert Version(1,2,3) < Version(1,2,4) assert Version(1,2,3,'bar') < Version(1,2,3,'foo') assert Version(2) > Version(1) assert Version(1,3) > Version(1,2) assert Version(1,2,4) > Version(1,2,3) assert Version(1,2,3,'foo') > Version(1,2,3,'bar') # test Version comparison, more delicate cases assert Version(1,12) > Version(1,9) assert Version(1,12) > Version(1,1,2) assert Version(1,0,0,'0.0a2') > Version(1,0,0,'0.0a1') assert Version(1,0,0,'0.0b1') > Version(1,0,0,'0.0a9') assert Version(1,0,0,'0.0b2') > Version(1,0,0,'0.0b1') assert Version(1,0,0,'0.0c1') > Version(1,0,0,'0.0b9') assert Version(1,0,0,'1') > Version(1,0,0,'0.0c9') # test Version playing nice with tuples assert Version(1,2,3) == (1,2,3,'') assert Version(1,2,4) > (1,2,3)
9a30ee6d15968be0116f26278c5d291b46fd6b24 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/888/9a30ee6d15968be0116f26278c5d291b46fd6b24/test_wikiutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1444, 12, 2890, 4672, 4049, 273, 9050, 1367, 18, 1444, 468, 1842, 1790, 1815, 4049, 12, 21, 16, 576, 16, 890, 2934, 14019, 422, 404, 1815, 4049, 12, 21, 16, 576, 16, 890, 2...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 1444, 12, 2890, 4672, 4049, 273, 9050, 1367, 18, 1444, 468, 1842, 1790, 1815, 4049, 12, 21, 16, 576, 16, 890, 2934, 14019, 422, 404, 1815, 4049, 12, 21, 16, 576, 16, 890, 2...
makeProject(name,targets)
errcode = makeProject(name,targets) if errcode > 0: errors += [ name ] return errors
def make(names, targets, dbindex=None): '''invoke the make utility to build a set of projects.''' writetext('### make projects "' + ', '.join(names) \ + '" with targets "' + ', '.join(targets) + '"\n') distHost = context.value('distHost') if 'recurse' in targets: targets.remove('recurse') # Recurse through projects that need to be rebuilt first # If no targets have been specified, the default target is to build # projects. Each project in turn has thus to be installed in order # to build the next one in the topological chain. recursiveTargets = targets if len(recursiveTargets) == 0: recursiveTargets = [ 'install' ] names, projects = validateControls(names,dbindex) last = names.pop() for name in names: makeProject(name,recursiveTargets,{ name: projects[name]}) # Make current project if len(targets) > 0: makeProject(last,targets,{ last: projects[last]}) else: linkDependencies({ last: projects[last]}) else: for name in names: makeProject(name,targets)
3eb90d1f8ec09fc84ae921584bd73c951235b43d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1360/3eb90d1f8ec09fc84ae921584bd73c951235b43d/dws.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12, 1973, 16, 5774, 16, 1319, 1615, 33, 7036, 4672, 9163, 14407, 326, 1221, 12788, 358, 1361, 279, 444, 434, 10137, 1093, 6309, 2518, 27830, 2668, 13151, 1221, 10137, 2491, 397, 2265...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 12, 1973, 16, 5774, 16, 1319, 1615, 33, 7036, 4672, 9163, 14407, 326, 1221, 12788, 358, 1361, 279, 444, 434, 10137, 1093, 6309, 2518, 27830, 2668, 13151, 1221, 10137, 2491, 397, 2265...
v.message(self.getMessage('forgive_many', { 'vname' : client.exactName, 'attackers' : string.join(forgave, ', ') }))
v.message(self.getMessage('forgive_many', { 'vname' : v.exactName, 'attackers' : string.join(forgave, ', ') }))
def cmd_forgiveall(self, data, client, cmd=None): """\ - forgive all attackers' tk points """ v = self.getClientTkInfo(client) if len(v.attackers) > 0: forgave = [] for cid,points in v.attackers.items(): if v.isGrudged(cid): continue
b67790568c16792826dd16d5766b1a5c6d64957e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12909/b67790568c16792826dd16d5766b1a5c6d64957e/tk.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 1884, 75, 688, 454, 12, 2890, 16, 501, 16, 1004, 16, 1797, 33, 7036, 4672, 3536, 64, 300, 364, 75, 688, 777, 13843, 414, 11, 13030, 3143, 3536, 331, 273, 365, 18, 588, 1227...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1797, 67, 1884, 75, 688, 454, 12, 2890, 16, 501, 16, 1004, 16, 1797, 33, 7036, 4672, 3536, 64, 300, 364, 75, 688, 777, 13843, 414, 11, 13030, 3143, 3536, 331, 273, 365, 18, 588, 1227...
self.binaryPath = settings["Binaries"]
def getSettings(self, button): # let's try the Registry! try: settings = Blender.Registry.GetKey("BtoR", True) # check everywhere for BtoR settings. except: settings = False if settings: # settings were found, btor was setup previously, let's get the information self.haveSetup = True # I've got the information self.renderer = settings["renderer"] # string self.binaryPath = settings["Binaries"] # string self.shaderPathList = settings["Shaders"] # string self.texturePathList = settings["Textures"] # string self.displayPathList = settings["Displays"] # string self.archivePathList = settings["Archives"] # string self.proceduralPathList = settings["Procedurals"] # string self.outputPath = settings["outputPath"] # string self.use_slparams = settings["use_slparams"] # boolean else: self.haveSetup = False # no info self.renderer = "AQSIS" # this should eventually change to use settings stored in either the blender registry, or something else # default to aqsis, since we've got no actual information if os.name <> "posix" or os.name <> "mac": self.binaryPath = r'C:\Program Files\Aqsis\\bin' self.shaderPathList = r"C:\Program Files\Aqsis\Shaders" self.texturePathList = r"C:\Program Files\Aqsis\Textures" self.displayPathList = r"C:\Program Files\Aqsis\Displays" self.archivePathList = r"C:\Program Files\Aqsis\Archives" self.proceduralPathList = r"C:\Program Files\Aqsis\Procedurals" self.outputPath = r'C:\temp' else: self.binaryPath = r"/usr/aqsis/bin" self.shaderPathList = r"/usr/aqsis/shaders/" self.texturePathList = r"/usr/aqsis/textures" self.displayPathList = r"/usr/aqsis/displays" self.archivePathList = r"/usr/aqsis/archives" self.proceduralPathList = r"/usr/aqsis/procedurals" self.outputPath = r"/temp/" self.use_slparams = True # set this to true by default # surf the environment and get the shader paths from the env vars for this renderer # step one, test the $HOME/shaders thing # news flash: Set this up on failure of the settings load if self.renderers[self.renderer][5] <> None: # the renderer root should have no need of multiple search paths if os.getenv(self.renderers[self.renderer][5]) <> None: self.shaderPathList = self.shaderPathList + (os.getenv(self.renderers[self.renderer][5]) + os.sep + "shaders" + os.sep) + os.pathsep if self.renderers[self.renderer][6] <> None: if os.getenv(self.renderers[self.renderer][6]) <> None: #if self.renderers[self.renderer][6].find self.shaderPathList = self.shaderPathList + os.getenv(self.renderers[self.renderer][6]) # that should be that.
74bddf362fa2502791a0646abd613f6613d08c8a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11560/74bddf362fa2502791a0646abd613f6613d08c8a/BtoRMain.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18283, 12, 2890, 16, 3568, 4672, 468, 2231, 1807, 775, 326, 5438, 5, 775, 30, 1947, 273, 8069, 2345, 18, 4243, 18, 967, 653, 2932, 38, 869, 54, 3113, 1053, 13, 468, 866, 3614, 6051, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 18283, 12, 2890, 16, 3568, 4672, 468, 2231, 1807, 775, 326, 5438, 5, 775, 30, 1947, 273, 8069, 2345, 18, 4243, 18, 967, 653, 2932, 38, 869, 54, 3113, 1053, 13, 468, 866, 3614, 6051, ...
print(current_thread().get_name(), 'died from', e)
print(current_thread().name, 'died from', e)
def writerThread(self, *args, **kwargs): try: self._writerThread(*args, **kwargs) except db.DBLockDeadlockError: if verbose: print(current_thread().get_name(), 'died from', e) else: if verbose: print(current_thread().get_name(), "finished.")
88fde1af31135078d27ea0042c90b633d384d6fa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/88fde1af31135078d27ea0042c90b633d384d6fa/test_thread.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2633, 3830, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 365, 6315, 6299, 3830, 30857, 1968, 16, 2826, 4333, 13, 1335, 1319, 18, 2290, 2531, 11852, 739, 668, 30, 309, 3988, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2633, 3830, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 775, 30, 365, 6315, 6299, 3830, 30857, 1968, 16, 2826, 4333, 13, 1335, 1319, 18, 2290, 2531, 11852, 739, 668, 30, 309, 3988, ...
if self.header: self.header.close()
def close(self): "Close a session, freeing resources." if self.handle: self.handle.close() if self.header: self.header.close() self.handle = None self.header = None self.payload = ""
4572567594c0451a09430bb0de12c8c95beafd10 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10805/4572567594c0451a09430bb0de12c8c95beafd10/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 315, 4605, 279, 1339, 16, 4843, 310, 2703, 1199, 309, 365, 18, 4110, 30, 225, 365, 18, 4110, 18, 4412, 1435, 365, 18, 4110, 273, 599, 365, 18, 3374, 273, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1746, 12, 2890, 4672, 315, 4605, 279, 1339, 16, 4843, 310, 2703, 1199, 309, 365, 18, 4110, 30, 225, 365, 18, 4110, 18, 4412, 1435, 365, 18, 4110, 273, 599, 365, 18, 3374, 273, 599, 3...
self.rel = rel
self.rel = rel
def __init__(self, rel=None, feed_link=None, extension_elements=None, extension_attributes=None, text=None): self.rel = rel self.feed_link = feed_link self.text = text self.extension_elements = extension_elements or [] self.extension_attributes = extension_attributes or {}
220fb3846b34b52b462236a865acc3580b5bf99c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5609/220fb3846b34b52b462236a865acc3580b5bf99c/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1279, 33, 7036, 16, 4746, 67, 1232, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 2878, 273, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1279, 33, 7036, 16, 4746, 67, 1232, 33, 7036, 16, 2710, 67, 6274, 33, 7036, 16, 2710, 67, 4350, 33, 7036, 16, 977, 33, 7036, 4672, 365, 18, 2878, 273, ...
if baseURL is not None: baseURL = NSURL.URLWithString_(unicode(baseURL))
if baseURL is None: baseURL = os.path.join(NSBundle.mainBundle().resourcePath(), "resources") baseURL = NSURL.URLWithString_(unicode(baseURL))
def initWebView(self, initialHTML, sizeHint, baseURL): threads.warnIfNotOnMainThread('ManagedWebView.initWebView') if not self.view: self.view = WebView.alloc().init() #print "***** Creating new WebView %s" % self.view if sizeHint: # We have an estimate of the size that will be assigned to # the view when it is actually inserted in the MainFrame. # Use this to size the view we just created so the HTML # is hopefully rendered to the correct dimensions, instead # of having to be corrected after being displayed. self.view.setFrame_(sizeHint) self.view.setCustomUserAgent_(u"%s/%s (%s)" % \ (config.get(prefs.SHORT_APP_NAME), config.get(prefs.APP_VERSION), config.get(prefs.PROJECT_URL),)) else: #print "***** Using existing WebView %s" % self.view if sizeHint: self.view.setFrame_(sizeHint) self.execQueue = [] self.view.setPolicyDelegate_(self) self.view.setResourceLoadDelegate_(self) self.view.setFrameLoadDelegate_(self) self.view.setUIDelegate_(self)
97d7a92ed0cfa7d01a2bcd73ffd1cc346a6c9fa1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/97d7a92ed0cfa7d01a2bcd73ffd1cc346a6c9fa1/HTMLDisplay.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 4079, 1767, 12, 2890, 16, 2172, 4870, 16, 963, 7002, 16, 17480, 4672, 7403, 18, 8935, 10288, 1398, 6376, 3830, 2668, 10055, 4079, 1767, 18, 2738, 4079, 1767, 6134, 309, 486, 365, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1208, 4079, 1767, 12, 2890, 16, 2172, 4870, 16, 963, 7002, 16, 17480, 4672, 7403, 18, 8935, 10288, 1398, 6376, 3830, 2668, 10055, 4079, 1767, 18, 2738, 4079, 1767, 6134, 309, 486, 365, 1...
def __init__(self, *args, **kwargs): super(FontFactory, self).__init__(*args, **kwargs)
def update(self, count, total): self.frac = 1.0 * count / total
def __init__(self, *args, **kwargs): super(FontFactory, self).__init__(*args, **kwargs)
e331d79c32a1c48a63843972e627a7a7f53d919c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5063/e331d79c32a1c48a63843972e627a7a7f53d919c/comics.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 5711, 1733, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 380, 1968, 16, 2826, 4333, 4672, 2240, 12, 5711, 1733, 16, 365, 2934, 972, 2738, 972, 30857, 1968, 16, 2826, 4333, 13, 2, -100, -100, -100, -100, -100, -...
def _get_wbuf_len(self): buf_len = 0 for x in self._wbuf: buf_len += len(x) return buf_len
def writelines(self, list): # XXX We could do better here for very long lists # XXX Should really reject non-string non-buffers self._wbuf.extend(filter(None, map(str, list))) if (self._wbufsize <= 1 or self._get_wbuf_len() >= self._wbufsize): self.flush()
f15e30d6d795ea98632079ae83cbf2bb21e63ac5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/f15e30d6d795ea98632079ae83cbf2bb21e63ac5/socket.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6004, 1465, 12, 2890, 16, 666, 4672, 468, 11329, 1660, 3377, 741, 7844, 2674, 364, 8572, 1525, 6035, 468, 11329, 9363, 8654, 4925, 1661, 17, 1080, 1661, 17, 28101, 365, 6315, 91, 4385, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6004, 1465, 12, 2890, 16, 666, 4672, 468, 11329, 1660, 3377, 741, 7844, 2674, 364, 8572, 1525, 6035, 468, 11329, 9363, 8654, 4925, 1661, 17, 1080, 1661, 17, 28101, 365, 6315, 91, 4385, 1...
print (Y1-Y2).max()
if verbose > 2: print (Y1-Y2).max()
def test_cdist_correlation_random(self): "Tests cdist(X, 'correlation') on random data." eps = 1e-07 # Get the data: the input matrix and the right output. X1 = eo['cdist-X1'] X2 = eo['cdist-X2'] Y1 = cdist(X1, X2, 'correlation') Y2 = cdist(X1, X2, 'test_correlation') print (Y1-Y2).max() self.failUnless(within_tol(Y1, Y2, eps))
379f39dc44f5ae0fd8f3f6a7e63e65fd4421b6f9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12971/379f39dc44f5ae0fd8f3f6a7e63e65fd4421b6f9/test_distance.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4315, 376, 67, 27325, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 27325, 6134, 603, 2744, 501, 1199, 7785, 273, 404, 73, 17, 8642, 468, 968, 326, 501, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4315, 376, 67, 27325, 67, 9188, 12, 2890, 4672, 315, 14650, 276, 4413, 12, 60, 16, 296, 27325, 6134, 603, 2744, 501, 1199, 7785, 273, 404, 73, 17, 8642, 468, 968, 326, 501, ...
The path can be given as an exact path or as a pattern where '*' - matches everything '?' - matches any single character '[chars]' - matches any character inside square brackets (e.g. '[abc]' matches either 'a', 'b' or 'c') '[!chars]' - matches any character not inside square brackets If the path is a pattern, the keyword returns when an item matching to the pattern is created.
The path can be given as an exact path or as a pattern similarly as with `File Should Exist` keyword. If the path is a pattern, the keyword returns when an item matching to the pattern is created.
def wait_until_created(self, path, timeout='1 minute'): """Waits until the given file or directory is created.
6f8bd1e5c5b0db8d92d174d89dc27677542321fb /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7408/6f8bd1e5c5b0db8d92d174d89dc27677542321fb/OperatingSystem.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 67, 12198, 67, 4824, 12, 2890, 16, 589, 16, 2021, 2218, 21, 8044, 11, 4672, 3536, 26153, 3180, 326, 864, 585, 578, 1867, 353, 2522, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2529, 67, 12198, 67, 4824, 12, 2890, 16, 589, 16, 2021, 2218, 21, 8044, 11, 4672, 3536, 26153, 3180, 326, 864, 585, 578, 1867, 353, 2522, 18, 2, -100, -100, -100, -100, -100, -100, -10...
self.root = root
self.data['root'] = root
def setScopeInfos(self, context, request, showbreadcrumbs): """ set scope and all infos related to scope """ browsedpath = request.get('browsedpath', self.browsedpath) # find browser root and rootpath if undefined if self.root is None : if self.rootpath : self.root = aq_inner(self.portal.restrictedTraverse(self.rootpath)) else : root = aq_inner(context) while not INavigationRoot.providedBy(root) : root = aq_inner(root.aq_parent) self.root = root self.rootpath = '/'.join(root.getPhysicalPath()) # find scope if undefined # by default scope = browsedpath or first parent folderish or context if context is a folder scope = self.scope if scope is None : if browsedpath : self.scope = scope = aq_inner(self.portal.restrictedTraverse(browsedpath)) else : folder = aq_inner(context) if not bool(getattr(aq_base(folder), 'isPrincipiaFolderish', False)) : folder = aq_inner(folder.aq_parent) self.scope = scope = folder self.scopetitle = scope.pretty_title_or_id() self.scopetype = scopetype = scope.portal_type self.scopeiconclass = 'contenttype-%s divicon' % scopetype.lower().replace(' ','-') # set browsedpath and browsed_url self.browsedpath = '/'.join(scope.getPhysicalPath()) self.browsed_url = scope.absolute_url() if scope is not self.root : parentscope = aq_inner(scope.aq_parent) self.parentpath = '/'.join(parentscope.getPhysicalPath()) # set breadcrumbs # TODO : use self.catalog if showbreadcrumbs : crumbs = [] item = scope itempath = self.browsedpath while itempath != self.rootpath : crumb = {} crumb['path'] = itempath crumb['title'] = item.title_or_id() crumbs.append(crumb) item = aq_inner(item.aq_parent) itempath = '/'.join(item.getPhysicalPath()) crumbs.reverse() self.breadcrumbs = crumbs
8d0e1a032cfde6336dbc8c8e4be99c7fcb7c9176 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9052/8d0e1a032cfde6336dbc8c8e4be99c7fcb7c9176/finder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 3876, 7655, 12, 2890, 16, 819, 16, 590, 16, 2405, 31603, 4672, 3536, 444, 2146, 471, 777, 10626, 3746, 358, 2146, 3536, 324, 492, 730, 803, 273, 590, 18, 588, 2668, 70, 492, 730, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3876, 7655, 12, 2890, 16, 819, 16, 590, 16, 2405, 31603, 4672, 3536, 444, 2146, 471, 777, 10626, 3746, 358, 2146, 3536, 324, 492, 730, 803, 273, 590, 18, 588, 2668, 70, 492, 730, ...
n = ht.do_partition2(filename, "")
n = ht.do_partition3(filename, "")
def test_simple_20_12(self): ht = khmer.new_hashtable(20, 4**12+1)
7a5d6f6a5188c5b939b268bf28a0d3c801663adb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11148/7a5d6f6a5188c5b939b268bf28a0d3c801663adb/test_graph.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 67, 3462, 67, 2138, 12, 2890, 4672, 14049, 273, 417, 76, 6592, 18, 2704, 67, 5332, 14544, 12, 3462, 16, 1059, 636, 2138, 15, 21, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 9647, 67, 3462, 67, 2138, 12, 2890, 4672, 14049, 273, 417, 76, 6592, 18, 2704, 67, 5332, 14544, 12, 3462, 16, 1059, 636, 2138, 15, 21, 13, 2, -100, -100, -100, -100, -100, ...
action = ''
action = ''
def _loadJobs(self):
1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2550/1bc3f8ee0f5585b25b04dc37e869f107a4a3f4c1/Trigger.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 945, 7276, 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, 389, 945, 7276, 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...
frontend.RpcClient('/path', None, None, None, None)
frontend.RpcClient('/path', None, None, None, None, None)
def test_init(self): os.environ['LOGNAME'] = 'unittest-user' GLOBAL_CONFIG.override_config_value('SERVER', 'hostname', 'test-host') rpc_client_lib.get_proxy.expect_call( 'http://test-host/path', headers={'AUTHORIZATION': 'unittest-user'}) frontend.RpcClient('/path', None, None, None, None) self.god.check_playback()
3ecbc988dc71d84de6a862a99da534d25b05ec5f /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/3ecbc988dc71d84de6a862a99da534d25b05ec5f/frontend_unittest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2738, 12, 2890, 4672, 1140, 18, 28684, 3292, 4842, 1985, 3546, 273, 296, 4873, 3813, 17, 1355, 11, 7779, 67, 7203, 18, 10601, 67, 1425, 67, 1132, 2668, 4370, 2187, 296, 10358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2738, 12, 2890, 4672, 1140, 18, 28684, 3292, 4842, 1985, 3546, 273, 296, 4873, 3813, 17, 1355, 11, 7779, 67, 7203, 18, 10601, 67, 1425, 67, 1132, 2668, 4370, 2187, 296, 10358, ...
def remove_message():
def remove_message(e=None):
def remove_message(): itop = scanbox.nearest(0) sel = scanbox.curselection() if not sel: dialog(root, "No Message To Remove", "Please select a message to remove", "", 0, "OK") return todo = [] for i in sel: line = scanbox.get(i) if scanparser.match(line) >= 0: todo.append(string.atoi(scanparser.group(1))) mhf.removemessages(todo) rescan() fixfocus(min(todo), itop)
78b0c82535af09fde940d1b040f9da72c20f7c70 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/78b0c82535af09fde940d1b040f9da72c20f7c70/mbox.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2150, 12, 73, 33, 7036, 4672, 518, 556, 273, 4135, 2147, 18, 25785, 12, 20, 13, 357, 273, 4135, 2147, 18, 1397, 10705, 1435, 309, 486, 357, 30, 6176, 12, 3085, 16, 315, 227...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 2150, 12, 73, 33, 7036, 4672, 518, 556, 273, 4135, 2147, 18, 25785, 12, 20, 13, 357, 273, 4135, 2147, 18, 1397, 10705, 1435, 309, 486, 357, 30, 6176, 12, 3085, 16, 315, 227...
if self.wdaymask[i] == rr._wkst or i == self.yearlen:
if self.wdaymask[i] == rr._wkst:
def rebuild(self, year, month): # Every mask is 7 days longer to handle cross-year weekly periods. rr = self.rrule if year != self.lastyear: self.yearlen = 365+calendar.isleap(year) firstyday = datetime.date(year, 1, 1) self.yearordinal = firstyday.toordinal() self.yearweekday = firstyday.weekday()
374b799aa37221c79477d6c1b6d16124f849a63f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8441/374b799aa37221c79477d6c1b6d16124f849a63f/rrule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 12, 2890, 16, 3286, 16, 3138, 4672, 468, 16420, 3066, 353, 2371, 4681, 7144, 358, 1640, 6828, 17, 6874, 4860, 715, 12777, 18, 8354, 273, 365, 18, 523, 725, 309, 3286, 480, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13419, 12, 2890, 16, 3286, 16, 3138, 4672, 468, 16420, 3066, 353, 2371, 4681, 7144, 358, 1640, 6828, 17, 6874, 4860, 715, 12777, 18, 8354, 273, 365, 18, 523, 725, 309, 3286, 480, 365, ...
cb(True)
reactor.callWhenRunning(cb, True)
def cb(first): try: reactor.listenTCP(tcp_port, dfactory, interface='127.0.0.1') except twisted.internet.error.CannotListenError: if first: LOG.warning("TCP bind failed. Killing old process...") if terminate(): LOG.info("Ok. Sleeping...") reactor.callLater(2.0, cb, False) else: LOG.error("Kill failed. Giving up.") reactor.stop() else: LOG.error("Bind failed again. Giving up.") reactor.stop() else: LOG.info("Listening on 127.0.0.1:%d" % tcp_port) dtMain.startConnecting()
926fbfd4a02218bcf5b9d1adf50069871b197317 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8524/926fbfd4a02218bcf5b9d1adf50069871b197317/dtella.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2875, 12, 3645, 4672, 775, 30, 19178, 18, 18085, 13891, 12, 14832, 67, 655, 16, 302, 6848, 16, 1560, 2218, 14260, 18, 20, 18, 20, 18, 21, 6134, 1335, 2339, 25444, 18, 267, 14726, 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, 3645, 4672, 775, 30, 19178, 18, 18085, 13891, 12, 14832, 67, 655, 16, 302, 6848, 16, 1560, 2218, 14260, 18, 20, 18, 20, 18, 21, 6134, 1335, 2339, 25444, 18, 267, 14726, 18, ...
line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if not self.breaks.has_key(line): self.addBreakPoint(line, 1) if self.model.defaultName == 'App': self.model.editor.debugger.debug_file(self.model.filename) elif self.model.app: self.model.editor.debugger.debug_file(self.model.app.filename)
if Preferences.useDebugger == 'new': line = self.LineFromPosition(self.GetCurrentPos()) + 1 self.addBreakPoint(line, temp=1, notify_debugger=0) temp_breakpoint = (path.normcase(path.abspath( self.model.filename)), line) self.model.debug(cont_if_running=1, cont_always=1, temp_breakpoint=temp_breakpoint) elif Preferences.useDebugger == 'old': line = self.LineFromPosition(self.GetCurrentPos()) + 1 if not self.breaks.has_key(line): self.addBreakPoint(line, 1) if self.model.defaultName == 'App': self.model.editor.debugger.debug_file(self.model.filename) elif self.model.app: self.model.editor.debugger.debug_file(self.model.app.filename)
def OnRunToCursor(self, event): line = self.GetLineFromPos(self.GetCurrentPos()) + 1 if not self.breaks.has_key(line): self.addBreakPoint(line, 1) if self.model.defaultName == 'App': self.model.editor.debugger.debug_file(self.model.filename) elif self.model.app: self.model.editor.debugger.debug_file(self.model.app.filename)
ed86f61b9d55619ac440188d57acc292436b0dab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4325/ed86f61b9d55619ac440188d57acc292436b0dab/PySourceView.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1997, 774, 6688, 12, 2890, 16, 871, 4672, 980, 273, 365, 18, 967, 1670, 1265, 1616, 12, 2890, 18, 967, 3935, 1616, 10756, 397, 404, 309, 486, 365, 18, 29292, 18, 5332, 67, 856, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2755, 1997, 774, 6688, 12, 2890, 16, 871, 4672, 980, 273, 365, 18, 967, 1670, 1265, 1616, 12, 2890, 18, 967, 3935, 1616, 10756, 397, 404, 309, 486, 365, 18, 29292, 18, 5332, 67, 856, ...
misc.verbose("using T_%s"%p)
def complement(self, bound=None): """ Return the largest Hecke-stable complement of this space. """ try: return self.__complement except AttributeError: pass if self.is_ambient(): return self.ambient_hecke_module().zero_submodule()
1457e2bd33618da9dc44a10460b353b8f6ae14fb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/1457e2bd33618da9dc44a10460b353b8f6ae14fb/submodule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17161, 12, 2890, 16, 2489, 33, 7036, 4672, 3536, 2000, 326, 12756, 670, 762, 73, 17, 15021, 17161, 434, 333, 3476, 18, 3536, 775, 30, 327, 365, 16186, 2919, 806, 1335, 6394, 30, 1342, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 17161, 12, 2890, 16, 2489, 33, 7036, 4672, 3536, 2000, 326, 12756, 670, 762, 73, 17, 15021, 17161, 434, 333, 3476, 18, 3536, 775, 30, 327, 365, 16186, 2919, 806, 1335, 6394, 30, 1342, ...
_cfunc_refs[tmpval1] = c_cb
def fl_set_form_atactivate(form, py_cb, data): """ fl_set_form_atactivate(form, py_cb, data) -> form atactivate reference """ c_cb = FL_FORM_ATACTIVATE(pycb) retval = _fl_set_form_atactivate(form, c_cb, data) _cfunc_refs[tmpval1] = c_cb return retval
8765c710f695de392f6fc7c664c746ec98668b1d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2429/8765c710f695de392f6fc7c664c746ec98668b1d/xformslib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1183, 67, 542, 67, 687, 67, 396, 299, 954, 12, 687, 16, 2395, 67, 7358, 16, 501, 4672, 3536, 1183, 67, 542, 67, 687, 67, 396, 299, 954, 12, 687, 16, 2395, 67, 7358, 16, 501, 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, 1183, 67, 542, 67, 687, 67, 396, 299, 954, 12, 687, 16, 2395, 67, 7358, 16, 501, 4672, 3536, 1183, 67, 542, 67, 687, 67, 396, 299, 954, 12, 687, 16, 2395, 67, 7358, 16, 501, 13, ...
sys.exit(exit) def help(): print __doc__ sys.exit(0)
PATTERN = ("^(.+?):(\d+): DeprecationWarning: " "classic (int|long|float|complex) division$")
def usage(exit, msg=None): if msg: sys.stderr.write("%s: %s\n" % (sys.argv[0], msg)) sys.stderr.write("Usage: %s warnings\n" % sys.argv[0]) sys.stderr.write("Try `%s -h' for more information.\n" % sys.argv[0]) sys.exit(exit)
8ede8b4f9afacde5e0d6935bdf37d4903968146c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/8ede8b4f9afacde5e0d6935bdf37d4903968146c/fixdiv.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 12, 8593, 16, 1234, 33, 7036, 4672, 309, 1234, 30, 2589, 18, 11241, 18, 2626, 27188, 87, 30, 738, 87, 64, 82, 6, 738, 261, 9499, 18, 19485, 63, 20, 6487, 1234, 3719, 2589, 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, 4084, 12, 8593, 16, 1234, 33, 7036, 4672, 309, 1234, 30, 2589, 18, 11241, 18, 2626, 27188, 87, 30, 738, 87, 64, 82, 6, 738, 261, 9499, 18, 19485, 63, 20, 6487, 1234, 3719, 2589, 18, ...
for repo in self.base.repos.repos.values(): if repo in self.base.repos.listEnabled():
repos = self.base.repos.repos.values() repos.sort() for repo in repos: if repo in self.base.repos.listEnabled() and args in ('', 'enabled'):
def do_repo(self, line): (cmd, args, line) = self.parseline(line) if cmd in ['list', None]: if self.base.repos.repos.values(): self.base.log(2, '%-20.20s %-40.40s status' % ('repo id', 'repo name')) for repo in self.base.repos.repos.values(): if repo in self.base.repos.listEnabled(): self.base.log(2, '%-20.20s %-40.40s enabled' % (repo, repo.name)) else: self.base.log(2, '%-20.20s %-40.40s disabled' % (repo, repo.name)) elif cmd == 'enable': repos = self._shlex_split(args) for repo in repos: try: changed = self.base.repos.enableRepo(repo) except Errors.ConfigError, e: self.base.errorlog(0, e) except Errors.RepoError, e: self.base.errorlog(0, e) else: for repo in changed: try: self.base.doRepoSetup(thisrepo=repo) except Errors.RepoError, e: self.base.errorlog(0, 'Disabling Repository') self.base.repos.disableRepo(repo) return False if hasattr(self.base, 'up'): # reset the updates del self.base.up elif cmd == 'disable': repos = self._shlex_split(args) for repo in repos: try: self.base.repos.disableRepo(repo) except Errors.ConfigError, e: self.base.errorlog(0, e) except Errors.RepoError, e: self.base.errorlog(0, e)
b9d20781cfbcbfbf5431e97fc31a8ee7f39e9551 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/b9d20781cfbcbfbf5431e97fc31a8ee7f39e9551/shell.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7422, 12, 2890, 16, 980, 4672, 261, 4172, 16, 833, 16, 980, 13, 273, 365, 18, 1065, 1786, 558, 12, 1369, 13, 309, 1797, 316, 10228, 1098, 2187, 599, 14542, 309, 365, 18, 196...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 7422, 12, 2890, 16, 980, 4672, 261, 4172, 16, 833, 16, 980, 13, 273, 365, 18, 1065, 1786, 558, 12, 1369, 13, 309, 1797, 316, 10228, 1098, 2187, 599, 14542, 309, 365, 18, 196...
raise RuntimeError, 'data string received from node %s is empty. tag = %s' %( i, tag ) )
raise RuntimeError, 'data string received from node %s is empty. tag = %s' %( i, tag )
def __call__( self, eventdatafilename, nevents, *args): mpiRank = self.mpiRank mpiSize = self.mpiSize
758ce84b4f61fc5ea09c907e219e377969b5b8ff /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4114/758ce84b4f61fc5ea09c907e219e377969b5b8ff/ParallelHistogrammer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 365, 16, 29446, 3459, 16, 1073, 616, 87, 16, 380, 1968, 4672, 225, 6749, 77, 12925, 273, 365, 18, 1291, 77, 12925, 6749, 77, 1225, 273, 365, 18, 1291, 77, 1225, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1991, 972, 12, 365, 16, 29446, 3459, 16, 1073, 616, 87, 16, 380, 1968, 4672, 225, 6749, 77, 12925, 273, 365, 18, 1291, 77, 12925, 6749, 77, 1225, 273, 365, 18, 1291, 77, 1225, ...
no_reference = i18n.translate(domain='plone', msgid='label_no_reference', context=content_instance, default='<no reference>')
no_reference = _(u'label_no_reference', default=u'<no reference>')
def _Vocabulary(self, content_instance): pairs = [] pc = getToolByName(content_instance, 'portal_catalog') uc = getToolByName(content_instance, config.UID_CATALOG) purl = getToolByName(content_instance, 'portal_url')
6bf0b4d803f7a6c42f16af81053d806d99f67096 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12165/6bf0b4d803f7a6c42f16af81053d806d99f67096/Field.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 30747, 12, 2890, 16, 913, 67, 1336, 4672, 5574, 273, 5378, 6125, 273, 336, 6364, 5911, 12, 1745, 67, 1336, 16, 296, 24386, 67, 7199, 6134, 6232, 273, 336, 6364, 5911, 12, 1745, 67...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 30747, 12, 2890, 16, 913, 67, 1336, 4672, 5574, 273, 5378, 6125, 273, 336, 6364, 5911, 12, 1745, 67, 1336, 16, 296, 24386, 67, 7199, 6134, 6232, 273, 336, 6364, 5911, 12, 1745, 67...
s2 = silent_intern(u"unicode spam")
if sys.version[0] == '2': s2 = silent_intern(unicode("unicode spam"))
def test_intern(self): s1 = silent_intern("spam") s2 = silent_intern(u"unicode spam") s3 = silent_intern(42) s4 = silent_intern("spam") assert id(s1) == id(s4)
05c0bc4849ee6e8d82acbe4549292545168774db /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12817/05c0bc4849ee6e8d82acbe4549292545168774db/UtilTests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 267, 798, 12, 2890, 4672, 272, 21, 273, 10404, 67, 267, 798, 2932, 1752, 301, 7923, 225, 309, 2589, 18, 1589, 63, 20, 65, 422, 296, 22, 4278, 272, 22, 273, 10404, 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, 1842, 67, 267, 798, 12, 2890, 4672, 272, 21, 273, 10404, 67, 267, 798, 2932, 1752, 301, 7923, 225, 309, 2589, 18, 1589, 63, 20, 65, 422, 296, 22, 4278, 272, 22, 273, 10404, 67, 267, ...
return [offsetvector for offsetvector in lsctables.table.get_table(dbtables.get_xml(connection), lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())]
return [offsetvector for offsetvector in dbtables.table.get_table(dbtables.get_xml(connection), lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())]
def get_background_offset_vectors(connection): """ Return a list of the non-zero offset vectors extracted from the database at the given connection. Each offset vector is returned as a dictionary mapping instrument name to offset. """ return [offsetvector for offsetvector in lsctables.table.get_table(dbtables.get_xml(connection), lsctables.TimeSlideTable.tableName).as_dict().values() if any(offsetvector.values())]
529b205bd5296bb01f1f290b03f93176180b740e /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3592/529b205bd5296bb01f1f290b03f93176180b740e/db_thinca_rings.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 9342, 67, 3348, 67, 18535, 12, 4071, 4672, 3536, 2000, 279, 666, 434, 326, 1661, 17, 7124, 1384, 10046, 9438, 628, 326, 2063, 622, 326, 864, 1459, 18, 225, 8315, 1384, 3806, 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, 336, 67, 9342, 67, 3348, 67, 18535, 12, 4071, 4672, 3536, 2000, 279, 666, 434, 326, 1661, 17, 7124, 1384, 10046, 9438, 628, 326, 2063, 622, 326, 864, 1459, 18, 225, 8315, 1384, 3806, 3...
if frame.f_exc_traceback is None:
if not frame.f_exc_traceback is arg[2]:
def trace_dispatch(self, frame, event, arg): """ General trace method for thread. """ if (event == 'line'): if frame in self.m_locals_copy: self.update_locals_copy()
5be1a775e76dc2b9968795f506020a56fd27a95d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1662/5be1a775e76dc2b9968795f506020a56fd27a95d/rpdb2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 9544, 2606, 707, 364, 2650, 18, 3536, 225, 309, 261, 2575, 422, 296, 1369, 11, 4672, 309, 2623, 316, 365, 18, 81, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2606, 67, 10739, 12, 2890, 16, 2623, 16, 871, 16, 1501, 4672, 3536, 9544, 2606, 707, 364, 2650, 18, 3536, 225, 309, 261, 2575, 422, 296, 1369, 11, 4672, 309, 2623, 316, 365, 18, 81, ...
"""Delete menu items between INDEX1 and INDEX2 (not included)."""
"""Delete menu items between INDEX1 and INDEX2 (included)."""
def delete(self, index1, index2=None): """Delete menu items between INDEX1 and INDEX2 (not included).""" if index2 is None: index2 = index1 cmds = [] (num_index1, num_index2) = (self.index(index1), self.index(index2)) if (num_index1 is not None) and (num_index2 is not None): for i in range(num_index1, num_index2 + 1): if 'command' in self.entryconfig(i): c = str(self.entrycget(i, 'command')) if c in self._tclCommands: cmds.append(c) self.tk.call(self._w, 'delete', index1, index2) for c in cmds: self.deletecommand(c)
af4f6b5a5786c45d20452bfb4e0dc3be29cb5b19 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/af4f6b5a5786c45d20452bfb4e0dc3be29cb5b19/Tkinter.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 770, 21, 16, 770, 22, 33, 7036, 4672, 3536, 2613, 3824, 1516, 3086, 12425, 21, 471, 12425, 22, 261, 20405, 13, 12123, 309, 770, 22, 353, 599, 30, 770, 22, 273, 77...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1430, 12, 2890, 16, 770, 21, 16, 770, 22, 33, 7036, 4672, 3536, 2613, 3824, 1516, 3086, 12425, 21, 471, 12425, 22, 261, 20405, 13, 12123, 309, 770, 22, 353, 599, 30, 770, 22, 273, 77...
directory. If <name> contains a '%s', it is treated as a filename.
directory. If <name> contains a '%s', it is treated as a filename; if it names a directory, documentation is written for all the contents.
def ready(server): print 'server ready at %s' % server.url
5a804edd3cacf2a790ff3c872adad22f95e7a604 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/5a804edd3cacf2a790ff3c872adad22f95e7a604/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5695, 12, 3567, 4672, 1172, 296, 3567, 5695, 622, 738, 87, 11, 738, 1438, 18, 718, 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, 5695, 12, 3567, 4672, 1172, 296, 3567, 5695, 622, 738, 87, 11, 738, 1438, 18, 718, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
sage: a, b, c, G = alternating_group_bitrade_generators(1) sage: print coset_representatives(a, G) [(), (1,2)(3,4), (1,4)(2,3), (1,3)(2,4)] """ rcosets = gap.RightCosets(G, PermutationGroup([x])) cosetReps = [] for i in range(1, len(rcosets)+1): cosetReps.append(gap.Representative(rcosets[i])) assert gap.Index(G, PermutationGroup([x])) == len(cosetReps) return cosetReps def entry_label(eLabels, C, x): """ ARGUMENTS: eLabels --- list of coset representatives of C in G C --- subgroup G of G x --- element of G RETURNS: integer i such that C*eLabels[i] == C*x EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = alternating_group_bitrade_generators(1) sage: print entry_label(coset_representatives(c, G), gap.Group([c]), a) 1 """ Cx = gap.RightCoset(C, x) for i in range(len(eLabels)): y = eLabels[i] Cy = gap.RightCoset(C, y) if Cx == Cy: return i assert False def bitrade_from_group(a, b, c, G): """ Given group elements a, b, c in G such that abc = 1 and the subgroups <a>, <b>, <c> intersect (pairwise) only in the identity, construct a bitrade (T1, T2) where rows, columns, and symbols correspond to cosets of <a>, <b>, and <c>, respectively. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = alternating_group_bitrade_generators(1) sage: (T1, T2) = bitrade_from_group(a, b, c, G) sage: print T1 [ 0 -1 3 1] [-1 1 0 2] [ 1 3 2 -1] [ 2 0 -1 3] sage: print T2 [ 1 -1 0 3] [-1 0 2 1] [ 2 1 3 -1] [ 0 3 -1 2] """ T1 = {} T2 = {} rLabels = coset_representatives(a, G) cLabels = coset_representatives(b, G) eLabels = coset_representatives(c, G) T1 = LatinSquare(len(rLabels), len(cLabels)) T2 = LatinSquare(len(rLabels), len(cLabels)) for i in range(len(rLabels)): for j in range(len(cLabels)): T1[i, j] = -1 T2[i, j] = -1 A = gap.Group([a]) B = gap.Group([b]) C = gap.Group([c]) for i in range(len(rLabels)): for j in range(len(cLabels)): for k in range(len(eLabels)): cosetRow = gap.RightCoset(A, rLabels[i]) cosetCol = gap.RightCoset(B, cLabels[j]) cosetEnt = gap.RightCoset(C, eLabels[k]) g = gap.Intersection(gap.Elements(cosetRow), gap.Elements(cosetCol), gap.Elements(cosetEnt)) if len(g) == 0: continue g = gap.Intersection(cosetRow, cosetCol) assert len(g) == 1 g = g[1] eIdx = entry_label(eLabels, C, a * g) T1[i, j] = k T2[i, j] = eIdx return (T1, T2) def is_disjoint(T1, T2): """ The partial latin squares T1 and T2 are disjoint if T1[r, c] != T2[r, c] or T1[r, c] == T2[r, c] == -1 for each cell [r, c]. EXAMPLES: sage: from sage.combinat.matrices.latin import is_disjoint, back_circulant, isotopism sage: is_disjoint(back_circulant(2), back_circulant(2)) False
def coset_representatives(x, G): """ For some group element x in G, return a list of the canonical coset representatives for the subgroup <x> in G. EXAMPLES: sage: from sage.combinat.matrices.latin import * sage: a, b, c, G = alternating_group_bitrade_generators(1) sage: print coset_representatives(a, G) [(), (1,2)(3,4), (1,4)(2,3), (1,3)(2,4)] """ rcosets = gap.RightCosets(G, PermutationGroup([x])) cosetReps = [] for i in range(1, len(rcosets)+1): cosetReps.append(gap.Representative(rcosets[i])) assert gap.Index(G, PermutationGroup([x])) == len(cosetReps) return cosetReps
494f2bd1cd82ea9dcc25f8e258b7375812aed1c9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/494f2bd1cd82ea9dcc25f8e258b7375812aed1c9/latin.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4987, 278, 67, 28205, 8785, 12, 92, 16, 611, 4672, 3536, 2457, 2690, 1041, 930, 619, 316, 611, 16, 327, 279, 666, 434, 326, 7378, 4987, 278, 2406, 8785, 364, 326, 720, 1655, 411, 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, 4987, 278, 67, 28205, 8785, 12, 92, 16, 611, 4672, 3536, 2457, 2690, 1041, 930, 619, 316, 611, 16, 327, 279, 666, 434, 326, 7378, 4987, 278, 2406, 8785, 364, 326, 720, 1655, 411, 92, ...
'c:\\python24\\include\\tupleobject.h',
def parse_headers(): for filename in [x for x in glob.glob("c:\\python24\\include\\*.h") if x not in ('c:\\python24\\include\\datetime.h', 'c:\\python24\\include\\descrobject.h', 'c:\\python24\\include\\frameobject.h', 'c:\\python24\\include\\genobject.h', 'c:\\python24\\include\\grammar.h', 'c:\\python24\\include\\listobject.h', 'c:\\python24\\include\\methodobject.h', 'c:\\python24\\include\\node.h', 'c:\\python24\\include\\object.h', 'c:\\python24\\include\\parsetok.h', 'c:\\python24\\include\\pyport.h', 'c:\\python24\\include\\pystate.h', 'c:\\python24\\include\\py_curses.h', 'c:\\python24\\include\\stringobject.h', 'c:\\python24\\include\\structmember.h', 'c:\\python24\\include\\structseq.h', 'c:\\python24\\include\\symtable.h', 'c:\\python24\\include\\traceback.h', 'c:\\python24\\include\\tupleobject.h', 'c:\\python24\\include\\ucnhash.h', )]: print >> sys.stderr, "PROCESSING FILE", filename print "\n\n/* Generated from file %s */\n\n" % filename f = file(filename) filetext = f.read() f.close() parse_filetext(filetext)
cba174af8529b8cdbf6e13a7cda1381797c046f9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11637/cba174af8529b8cdbf6e13a7cda1381797c046f9/makeStructs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1109, 67, 2485, 13332, 364, 1544, 316, 306, 92, 364, 619, 316, 4715, 18, 10581, 2932, 71, 31027, 8103, 3247, 1695, 6702, 1695, 11146, 76, 7923, 309, 619, 486, 316, 7707, 71, 31027, 8103,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2485, 13332, 364, 1544, 316, 306, 92, 364, 619, 316, 4715, 18, 10581, 2932, 71, 31027, 8103, 3247, 1695, 6702, 1695, 11146, 76, 7923, 309, 619, 486, 316, 7707, 71, 31027, 8103,...
self._chunks = []
def _read_member_header(self): """Fills self._chlen and self._chunks by the read header data. """ header = _read_gzip_header(self._fileobj) offset = self._fileobj.tell() if "RA" not in header["extra_field"]: raise IOError("Not an idzip file: %r" % self.name)
1da061d4da3b9f091dd5a7347eba000f3be61b78 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4495/1da061d4da3b9f091dd5a7347eba000f3be61b78/decompressor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 5990, 67, 3374, 12, 2890, 4672, 3536, 28688, 365, 6315, 343, 1897, 471, 365, 6315, 14691, 635, 326, 855, 1446, 501, 18, 3536, 1446, 273, 389, 896, 67, 17380, 67, 3374, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 896, 67, 5990, 67, 3374, 12, 2890, 4672, 3536, 28688, 365, 6315, 343, 1897, 471, 365, 6315, 14691, 635, 326, 855, 1446, 501, 18, 3536, 1446, 273, 389, 896, 67, 17380, 67, 3374, 12...
if self.Context.CurrentProfile.Name == '' or self.Context.CurrentProfile.Name == 'Default': self.ProfileComboBox.set_active(0) else: name = self.Context.CurrentProfile.Name
self.ProfileComboBox.connect("changed", self.ProfileChanged) name = self.Context.CurrentProfile.Name if name in self.Context.Profiles:
def __init__(self, main, context): self.Context = context self.Main = main rightChild = gtk.VBox() rightChild.set_border_width(10)
86a1e14bba01a98701f52f6f2c23ae0fdf19aac4 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/7062/86a1e14bba01a98701f52f6f2c23ae0fdf19aac4/Pages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2774, 16, 819, 4672, 365, 18, 1042, 273, 819, 365, 18, 6376, 273, 2774, 2145, 1763, 273, 22718, 18, 58, 3514, 1435, 2145, 1763, 18, 542, 67, 8815, 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, 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, 2774, 16, 819, 4672, 365, 18, 1042, 273, 819, 365, 18, 6376, 273, 2774, 2145, 1763, 273, 22718, 18, 58, 3514, 1435, 2145, 1763, 18, 542, 67, 8815, 67, ...
Note: See also "%m" and %(MM).
Note: See also %(month).
... def __mod__(self, name):
266414154d280bddea2f15ab5806445fa8e21a4c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7167/266414154d280bddea2f15ab5806445fa8e21a4c/Time.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 1711, 972, 12, 2890, 16, 508, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1372, 377, 1652, 1001, 1711, 972, 12, 2890, 16, 508, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
>>> g = Greenlet(myfunction, arg1, arg2, kwarg1=1)
>>> g = Greenlet(myfunction, 'arg1', 'arg2', kwarg1=1)
def __call__(self, source): if not source.successful(): return GreenletLink.__call__(self, source)
209de130a4c9be0658dc45868219484cd7f379e4 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10423/209de130a4c9be0658dc45868219484cd7f379e4/greenlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 1084, 4672, 309, 486, 1084, 18, 18418, 13332, 327, 17766, 1810, 2098, 16186, 1991, 972, 12, 2890, 16, 1084, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 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, 1991, 972, 12, 2890, 16, 1084, 4672, 309, 486, 1084, 18, 18418, 13332, 327, 17766, 1810, 2098, 16186, 1991, 972, 12, 2890, 16, 1084, 13, 2, -100, -100, -100, -100, -100, -100, -100...
os.spawnlpe(os.P_NOWAIT, '/home/umeboshi/bin/paella-kde-management',
os.spawnlpe(os.P_NOWAIT, 'paella-kde-management',
def run_tbar(self, button=None, data=None): if data == 'profiles': self.workspace[data] = ProfileGenWin(self.conn, self.dbname) elif data == 'machines': self.workspace[data] = MainMachineWin(self.conn) elif data == 'traits': self.workspace[data] = TraitManagerWin(self.conn) elif data == 'families': self.workspace[data] = FamilyWin(self.conn) elif data == 'tdiff': self.workspace[data] = DifferWin(self.conn, 'template') elif data == 'sdiff': self.workspace[data] = DifferWin(self.conn, 'script') elif data == 'fdiff': self.workspace[data] = DifferWin(self.conn, 'family') elif data == 'default_environment': self.workspace[data] = DefEnvEditor(self.conn) elif data == 'clients': self.workspace[data] = ClientManager(self.conn) elif data == 'browser': self.workspace[data] = 'working' print data os.spawnlpe(os.P_NOWAIT, '/home/umeboshi/bin/paella-kde-management', '--display :0', os.environ) print data, 'running' else: dialogs.Message('bad command %s' % data)
a21772ebc1dffdf3bec702c4a5b06184020dfdfd /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2558/a21772ebc1dffdf3bec702c4a5b06184020dfdfd/management.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 67, 88, 3215, 12, 2890, 16, 3568, 33, 7036, 16, 501, 33, 7036, 4672, 309, 501, 422, 296, 18314, 4278, 365, 18, 14915, 63, 892, 65, 273, 11357, 7642, 18049, 12, 2890, 18, 4646, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 67, 88, 3215, 12, 2890, 16, 3568, 33, 7036, 16, 501, 33, 7036, 4672, 309, 501, 422, 296, 18314, 4278, 365, 18, 14915, 63, 892, 65, 273, 11357, 7642, 18049, 12, 2890, 18, 4646, ...
result[meeting_id] = {}
result[meeting_id] = {}
def _get_data(self, cr, uid, ids, name, arg, context): result = {} attendee_obj = self.pool.get('calendar.attendee') alarm_obj = self.pool.get('calendar.alarm') model_obj = self.pool.get('ir.model') model_id = model_obj.search(cr, uid, [('model','=',self._name)])[0] for meeting_id in ids: result[meeting_id] = {} if "attendees" in name: attendee_ids = attendee_obj.search(cr, uid, [('ref','=','%s,%d'%(self._name, meeting_id))]) result[meeting_id]["attendees"] = attendee_obj.export_cal(cr, uid, attendee_ids) if "alarms" in name: alarm_ids = alarm_obj.search(cr, uid, [('model_id','=',model_id), ('res_id','=',meeting_id)]) result[meeting_id]["alarms"] = alarm_obj.export_cal(cr, uid, alarm_ids) return result
75258015cae6ae0d493e7eb6204a16eafed73cd9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/75258015cae6ae0d493e7eb6204a16eafed73cd9/crm_meeting.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 4672, 563, 273, 2618, 27645, 20953, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 11650, 18, 101...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 588, 67, 892, 12, 2890, 16, 4422, 16, 4555, 16, 3258, 16, 508, 16, 1501, 16, 819, 4672, 563, 273, 2618, 27645, 20953, 67, 2603, 273, 365, 18, 6011, 18, 588, 2668, 11650, 18, 101...
self._rws[-1].GetRenderWindow().AddRenderer(self._renderers[-1])
self._rwis[-1].GetRenderWindow().AddRenderer(self._renderers[-1])
def _create_window(self): # create main frame, make sure that when it's closed, it merely hides parent_window = self._module_manager.get_module_view_parent_window() self._view_frame = wxFrame(parent=parent_window, id=-1, title='slice viewer') EVT_CLOSE(self._view_frame, lambda e, s=self: s._view_frame.Show(false))
9b793798dc7232330a2d42bbfc04d416e51d9534 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4494/9b793798dc7232330a2d42bbfc04d416e51d9534/vtk_slice_vwr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2640, 67, 5668, 12, 2890, 4672, 468, 752, 2774, 2623, 16, 1221, 3071, 716, 1347, 518, 1807, 4375, 16, 518, 4045, 2357, 366, 4369, 982, 67, 5668, 273, 365, 6315, 2978, 67, 4181, 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, 2640, 67, 5668, 12, 2890, 4672, 468, 752, 2774, 2623, 16, 1221, 3071, 716, 1347, 518, 1807, 4375, 16, 518, 4045, 2357, 366, 4369, 982, 67, 5668, 273, 365, 6315, 2978, 67, 4181, 18...
table = self.buff.get_tag_table()
self.table = self.buff.get_tag_table()
def __init__(self, buffer=None): gtk.TextView.__init__(self, buffer) self.buff = self.get_buffer() #Buffer init #self.buff.set_text("%s\n"%title) self.link = {'background': 'white', 'foreground': 'blue', 'underline': pango.UNDERLINE_SINGLE} self.active = {'background': 'light gray', 'foreground': 'red', 'underline': pango.UNDERLINE_SINGLE} self.hover = {'background': 'light gray', 'foreground': 'blue', 'underline': pango.UNDERLINE_SINGLE} ##########Tag we will use ####### #We use the tag table (tag are defined here but set in self.modified) table = self.buff.get_tag_table() #tag test for title title_tag = self.buff.create_tag("title",foreground="#12F",scale=1.6,underline=1) title_tag.set_property("pixels-above-lines",10) title_tag.set_property("pixels-below-lines",10) #Tag higligt fluo_tag = self.buff.create_tag("fluo",background="#F0F") #Bullet tag bullet_tag = self.buff.create_tag("bullet",scale=1.6) #start = self.buff.get_start_iter() end = self.buff.get_end_iter() #We have to find a way to keep this tag for the first line #Even when the task is edited
0fda71bc2dd17914a7514ccb17eff3fecc25ec53 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8234/0fda71bc2dd17914a7514ccb17eff3fecc25ec53/taskview.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 1613, 33, 7036, 4672, 22718, 18, 1528, 1767, 16186, 2738, 972, 12, 2890, 16, 1613, 13, 365, 18, 20664, 273, 365, 18, 588, 67, 4106, 1435, 468, 1892, 1208...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1613, 33, 7036, 4672, 22718, 18, 1528, 1767, 16186, 2738, 972, 12, 2890, 16, 1613, 13, 365, 18, 20664, 273, 365, 18, 588, 67, 4106, 1435, 468, 1892, 1208...
debugMsg("Called Plot.__init__()")
def __init__(self, scene): """ Initialisation of abstract Plot class
3149a6e0e27f75d1bb917629b171f730496207fb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8476/3149a6e0e27f75d1bb917629b171f730496207fb/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 10742, 434, 8770, 15211, 667, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 9065, 4672, 3536, 10188, 10742, 434, 8770, 15211, 667, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
for z in points: if len(z) == 3: return self._graphic3d()(points, coerce=coerce, **kwds) xdata.append(float(z[0])) ydata.append(float(z[1]))
xdata = [float(z[0]) for z in points] ydata = [float(z[1]) for z in points]
def __call__(self, points, coerce=True, **kwds): try: return points.plot(**kwds) except AttributeError: pass options = dict(self.options) for k, v in kwds.iteritems(): options[k] = v
c5edf133bb21d7f5cfc91db22517ec94b991331a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c5edf133bb21d7f5cfc91db22517ec94b991331a/plot.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 3143, 16, 12270, 33, 5510, 16, 2826, 25577, 4672, 775, 30, 327, 3143, 18, 4032, 12, 636, 25577, 13, 1335, 6394, 30, 1342, 702, 273, 2065, 12, 2890, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 16, 3143, 16, 12270, 33, 5510, 16, 2826, 25577, 4672, 775, 30, 327, 3143, 18, 4032, 12, 636, 25577, 13, 1335, 6394, 30, 1342, 702, 273, 2065, 12, 2890, 18, ...
print "StreamRequest Refused"
print "StreamRequest REFUSED"
def _process(self): self.result = False self.myAgent.jabber.send(self.iq) #print "SIB SENT:", str(self.iq) msg = self._receive(True, 3) if msg: self.result = False if msg.getType() =="result": print "StreamRequest Agreed" print msg
9f0b7c0364d086fd6fa03dbe1cb839f880130866 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/10121/9f0b7c0364d086fd6fa03dbe1cb839f880130866/Agent.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2890, 4672, 365, 18, 2088, 273, 1083, 365, 18, 4811, 3630, 18, 78, 378, 744, 18, 4661, 12, 2890, 18, 18638, 13, 468, 1188, 315, 9894, 348, 2222, 2773, 16, 609, 12, 289...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 2567, 12, 2890, 4672, 365, 18, 2088, 273, 1083, 365, 18, 4811, 3630, 18, 78, 378, 744, 18, 4661, 12, 2890, 18, 18638, 13, 468, 1188, 315, 9894, 348, 2222, 2773, 16, 609, 12, 289...
for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" list.__init__(self, x)
for i in xrange(len(x)): t=x[i] if not (isinstance(t, tuple) and len(t) == 2): raise TypeError, "input must be a list of tuples of length 2" if not isinstance(t[1],(int, long, Integer)): try: x[i]= (t[0], Integer(t[1])) except TypeError: raise TypeError, "powers of factors must be integers" list.__init__(self, [ (t[0],int(t[1])) for t in x])
def __init__(self, x, unit=None, cr=False, sort=True, simplify=True): if not isinstance(x, list): raise TypeError, "x must be a list" if isinstance(x, Factorization): if unit is None: unit = x.__unit else: unit = x.__unit * unit from sage.rings.integer import Integer for t in x: if not (isinstance(t, tuple) and len(t) == 2 and isinstance(t[1],(int, long, Integer))): raise TypeError, "x must be a list of tuples of length 2" list.__init__(self, x) if unit is None: if len(x) > 0: try: unit = self.base_ring()(1) except AttributeError: unit = Integer(1) else: unit = Integer(1) self.__unit = unit self.__cr = cr if self.is_commutative() and sort: self.sort() if simplify: self.simplify()
7f2d92e1fd3e84624db808bab1b219f27ddaafe0 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/7f2d92e1fd3e84624db808bab1b219f27ddaafe0/factorization.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 2836, 33, 7036, 16, 4422, 33, 8381, 16, 1524, 33, 5510, 16, 16499, 33, 5510, 4672, 309, 486, 1549, 12, 92, 16, 666, 4672, 1002, 3580, 16, 315,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 619, 16, 2836, 33, 7036, 16, 4422, 33, 8381, 16, 1524, 33, 5510, 16, 16499, 33, 5510, 4672, 309, 486, 1549, 12, 92, 16, 666, 4672, 1002, 3580, 16, 315,...
usrp_rate=128e3
usrp_rate=256e3 audio_decim = 8 audio_rate = usrp_rate / audio_decim
def __init__(self,frame,panel,vbox,argv): stdgui2.std_top_block.__init__ (self,frame,panel,vbox,argv)
4371a89e16ac97da2be084311459176a63ee0151 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9733/4371a89e16ac97da2be084311459176a63ee0151/txrx.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 3789, 16, 13916, 16, 90, 2147, 16, 19485, 4672, 2044, 20292, 22, 18, 5084, 67, 3669, 67, 2629, 16186, 2738, 972, 261, 2890, 16, 3789, 16, 13916, 16, 90, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3789, 16, 13916, 16, 90, 2147, 16, 19485, 4672, 2044, 20292, 22, 18, 5084, 67, 3669, 67, 2629, 16186, 2738, 972, 261, 2890, 16, 3789, 16, 13916, 16, 90, ...
timeout triggers, the remote client will be kicked off. - (instance) cmd_channel: the command channel class instance. - (file) file_obj: the file transferred (if any). - (bool) receive: True if channel is used for receiving data. - (bool) transfer_finished: True if transfer completed successfully. - (int) tot_bytes_sent: the total bytes sent. - (int) tot_bytes_received: the total bytes received.
timeout triggers, the remote client will be kicked off (defaults 300). - (int) ac_in_buffer_size: incoming data buffer size (defaults 65536) - (int) ac_out_buffer_size: outgoing data buffer size (defaults 65536)
def appendleft(self, obj): list.insert(self, 0, obj)
da26c0220f6be8e564309ee809d0345ad26f45a4 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3782/da26c0220f6be8e564309ee809d0345ad26f45a4/ftpserver.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 4482, 12, 2890, 16, 1081, 4672, 666, 18, 6387, 12, 2890, 16, 374, 16, 1081, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 714, 4482, 12, 2890, 16, 1081, 4672, 666, 18, 6387, 12, 2890, 16, 374, 16, 1081, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
Spawn a task to capture a movie using the takeSnapshot function.
Spawn a task to capture a movie using the screenshot function.
def movie(self, namePrefix = 'movie', duration = 1.0, fps = 30, format = 'rgb', sd = 4): """ movie(namePrefix = 'movie', duration=1.0, fps=30, format='rgb', sd=4)
0de8ef7f7a6dd9b4c3f4827dde89364fa36e817f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/0de8ef7f7a6dd9b4c3f4827dde89364fa36e817f/ShowBase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21360, 12, 2890, 16, 508, 2244, 273, 296, 8683, 13120, 2187, 3734, 273, 404, 18, 20, 16, 26067, 273, 5196, 16, 740, 273, 296, 10948, 2187, 8349, 273, 1059, 4672, 3536, 21360, 12, 529, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 21360, 12, 2890, 16, 508, 2244, 273, 296, 8683, 13120, 2187, 3734, 273, 404, 18, 20, 16, 26067, 273, 5196, 16, 740, 273, 296, 10948, 2187, 8349, 273, 1059, 4672, 3536, 21360, 12, 529, ...
n = n + 1 if n > 150: raise TestAbortedInOvertime, self.basename simProcess.kill()
def blaberr(): r = str(simProcess.readStderr()) if DEBUG > 1: print "STDERR", r stderr.write(str(simProcess.readStderr()))
3f4a171b835422313ecc0171dd0ab652a7f6a1bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/3f4a171b835422313ecc0171dd0ab652a7f6a1bc/tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2811, 378, 370, 13332, 436, 273, 609, 12, 9812, 2227, 18, 896, 31781, 10756, 309, 6369, 405, 404, 30, 1172, 315, 882, 25617, 3113, 436, 4514, 18, 2626, 12, 701, 12, 9812, 2227, 18, 896...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2811, 378, 370, 13332, 436, 273, 609, 12, 9812, 2227, 18, 896, 31781, 10756, 309, 6369, 405, 404, 30, 1172, 315, 882, 25617, 3113, 436, 4514, 18, 2626, 12, 701, 12, 9812, 2227, 18, 896...
self.balloon.show_toast(_("You may need to check the error log.") % watch.name, balloon_icon, urgency="critical", summary=(_("%s encountered a problem") % watch.name))
self.balloon.show_toast(_("You may need to check the error log."), balloon_icon, urgency="critical", summary=(_("%s encountered a problem") % watch.name))
def mark_watch_status(self, status, id): """ show the right icon for the status from the watch. """ watch = self.specto.watch_db[id] statusbar = self.wTree.get_widget("statusbar1") icon = self.get_icon("error", 50, False)
0a75eb8660defa4f93e12863847cce5f9eb9c964 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10818/0a75eb8660defa4f93e12863847cce5f9eb9c964/notifier.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2267, 67, 7585, 67, 2327, 12, 2890, 16, 1267, 16, 612, 4672, 3536, 2405, 326, 2145, 4126, 364, 326, 1267, 628, 326, 4267, 18, 3536, 4267, 273, 365, 18, 13234, 83, 18, 7585, 67, 1966, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2267, 67, 7585, 67, 2327, 12, 2890, 16, 1267, 16, 612, 4672, 3536, 2405, 326, 2145, 4126, 364, 326, 1267, 628, 326, 4267, 18, 3536, 4267, 273, 365, 18, 13234, 83, 18, 7585, 67, 1966, ...
self.moduleDirectoryViewWin.modulesPath = self.prefDialog.moduleCfgPath.replace("modules.cfg", "")
if self.prefDialog.moduleCfgPath is not None: self.moduleDirectoryViewWin.modulesPath = self.prefDialog.moduleCfgPath.replace("modules.cfg", "")
def __init__(self, parent=None): QtGui.QWidget.__init__(self, parent)
45aab7ffc72ec8cd3e00c1bebddef25f94077175 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2792/45aab7ffc72ec8cd3e00c1bebddef25f94077175/Lockenwickler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 982, 33, 7036, 4672, 23425, 18, 53, 4609, 16186, 2738, 972, 12, 2890, 16, 982, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
self._send_csv(req, ['report', 'title'], rows, mimetype='text/csv',
self._send_csv(req, ['report', 'title', 'description'], rows, mimetype='text/csv',
def _render_list(self, req): """Render the list of available reports.""" sort = req.args.get('sort', 'report') asc = bool(int(req.args.get('asc', 1))) format = req.args.get('format') rows = self.env.db_query(""" SELECT id, title, description FROM report ORDER BY %s %s """ % ('title' if sort == 'title' else 'id', '' if asc else 'DESC')) if format == 'rss': data = {'rows': rows} return 'report_list.rss', data, 'application/rss+xml' elif format == 'csv': self._send_csv(req, ['report', 'title'], rows, mimetype='text/csv', filename='reports.csv') elif format == 'tab': self._send_csv(req, ['report', 'title'], rows, '\t', mimetype='text/tab-separated-values', filename='reports.tsv')
7fc63f101b0e09c3810c48287506c60b90f896d0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2831/7fc63f101b0e09c3810c48287506c60b90f896d0/report.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1098, 12, 2890, 16, 1111, 4672, 3536, 3420, 326, 666, 434, 2319, 10557, 12123, 1524, 273, 1111, 18, 1968, 18, 588, 2668, 3804, 2187, 296, 6006, 6134, 6972, 273, 1426, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 5902, 67, 1098, 12, 2890, 16, 1111, 4672, 3536, 3420, 326, 666, 434, 2319, 10557, 12123, 1524, 273, 1111, 18, 1968, 18, 588, 2668, 3804, 2187, 296, 6006, 6134, 6972, 273, 1426, 12, ...
- A search unit consists of '(operand, pattern, field, type, hitlist)' tuples where
- A search unit consists of '(operand, pattern, field, type, hitset)' tuples where
def create_basic_search_units(req, p, f, m=None): """Splits search pattern and search field into a list of independently searchable units. - A search unit consists of '(operand, pattern, field, type, hitlist)' tuples where 'operand' is set union (|), set intersection (+) or set exclusion (-); 'pattern' is either a word (e.g. muon*) or a phrase (e.g. 'nuclear physics'); 'field' is either a code like 'title' or MARC tag like '100__a'; 'type' is the search type ('w' for word file search, 'a' for access file search). - Optionally, the function accepts the match type argument 'm'. If it is set (e.g. from advanced search interface), then it performs this kind of matching. If it is not set, then a guess is made. 'm' can have values: 'a'='all of the words', 'o'='any of the words', 'p'='phrase/substring', 'r'='regular expression', 'e'='exact value'.""" opfts = [] # will hold (o,p,f,t,h) units ## check arguments: if matching type phrase/string/regexp, do we have field defined? if (m=='p' or m=='r' or m=='e') and not f: m = 'a' print_warning(req, "This matching type cannot be used within <em>any field</em>. I will perform a word search instead." ) print_warning(req, "If you want to phrase/substring/regexp search in a specific field, e.g. inside title, then please choose <em>within title</em> search option.") ## is desired matching type set? if m: ## A - matching type is known; good! if m == 'e': # A1 - exact value: opfts.append(['|',p,f,'a']) # '|' since we have only one unit elif m == 'p': # A2 - phrase/substring: opfts.append(['|',"%"+p+"%",f,'a']) # '|' since we have only one unit elif m == 'r': # A3 - regular expression: opfts.append(['|',p,f,'r']) # '|' since we have only one unit elif m == 'a': # A4 - all of the words: for word in get_words_from_pattern(p): if len(opfts)==0: opfts.append(['|',word,f,'w']) # '|' in the first unit else: opfts.append(['+',word,f,'w']) # '+' in further units elif m == 'o': # A5 - any of the words: for word in get_words_from_pattern(p): opfts.append(['|',word,f,'w']) # '|' in all units else: print_warning(req, "Matching type '%s' is not implemented yet." % m, "Warning") opfts.append(['|',"%"+p+"%",f,'a']) else: ## B - matching type is not known: let us try to determine it by some heuristics if f and p[0]=='"' and p[-1]=='"': ## B0 - does 'p' start and end by double quote, and is 'f' defined? => doing ACC search opfts.append(['|',p[1:-1],f,'a']) elif f and p[0]=="'" and p[-1]=="'": ## B0bis - does 'p' start and end by single quote, and is 'f' defined? => doing ACC search opfts.append(['|','%'+p[1:-1]+'%',f,'a']) elif f and string.find(p, ',') >= 0: ## B1 - does 'p' contain comma, and is 'f' defined? => doing ACC search opfts.append(['|',p,f,'a']) elif f and str(f[0:2]).isdigit(): ## B2 - does 'f' exist and starts by two digits? => doing ACC search opfts.append(['|',p,f,'a']) else: ## B3 - doing WRD search, but maybe ACC too # search units are separated by spaces unless the space is within single or double quotes # so, let us replace temporarily any space within quotes by '__SPACE__' p = sre.sub("'(.*?)'", lambda x: "'"+string.replace(x.group(1), ' ', '__SPACE__')+"'", p) p = sre.sub("\"(.*?)\"", lambda x: "\""+string.replace(x.group(1), ' ', '__SPACEBIS__')+"\"", p) # wash argument: p = re_equal.sub(":", p) p = re_logical_and.sub(" ", p) p = re_logical_or.sub(" |", p) p = re_logical_not.sub(" -", p) p = re_operands.sub(r' \1', p) for pi in split(p): # iterate through separated units (or items, as "pi" stands for "p item") pi = sre.sub("__SPACE__", " ", pi) # replace back '__SPACE__' by ' ' pi = sre.sub("__SPACEBIS__", " ", pi) # replace back '__SPACEBIS__' by ' ' # firstly, determine set operand if pi[0] == '+' or pi[0] == '-' or pi[0] == '|': if len(opfts) or pi[0] == '-': # either not first unit, or '-' for the first unit oi = pi[0] else: oi = "|" # we are in the first unit and operand is not '-', so let us do # set union (with still null result set) pi = pi[1:] else: # okay, there is no operand, so let us decide what to do by default if len(opfts): oi = '+' # by default we are doing set intersection... else: oi = "|" # ...unless we are in the first unit # secondly, determine search pattern and field: if string.find(pi, ":") > 0: fi, pi = split(pi, ":", 1) else: fi, pi = f, pi # look also for old ALEPH field names: if fi and cfg_fields_convert.has_key(string.lower(fi)): fi = cfg_fields_convert[string.lower(fi)] # wash 'pi' argument: if re_quotes.match(pi): # B3a - quotes are found => do ACC search (phrase search) if fi: if re_doublequote.match(pi): pi = string.replace(pi, '"', '') # get rid of quotes opfts.append([oi,pi,fi,'a']) else: pi = string.replace(pi, "'", '') # get rid of quotes opfts.append([oi,"%"+pi+"%",fi,'a']) else: # fi is not defined, look at where we are doing exact or subphrase search (single/double quotes): if pi[0]=='"' and pi[-1]=='"': opfts.append([oi,pi[1:-1],"anyfield",'a']) print_warning(req, "Searching for an exact match inside any field may be slow. You may want to search for words instead, or choose to search within specific field.") else: # nope, subphrase in global index is not possible => change back to WRD search for pii in get_words_from_pattern(pi): # since there may be '-' and other chars that we do not index in WRD opfts.append([oi,pii,fi,'w']) print_warning(req, "The partial phrase search does not work in any field. I'll do a boolean AND searching instead.") print_warning(req, "If you want to do a partial phrase search in a specific field, e.g. inside title, then please choose 'within title' search option.", "Tip") print_warning(req, "If you want to do exact phrase matching, then please use double quotes.", "Tip") elif fi and str(fi[0]).isdigit() and str(fi[0]).isdigit(): # B3b - fi exists and starts by two digits => do ACC search opfts.append([oi,pi,fi,'a']) elif fi and not get_wordsindex_id(fi): # B3c - fi exists but there is no words table for fi => try ACC search opfts.append([oi,pi,fi,'a']) else: # B3d - general case => do WRD search for pii in get_words_from_pattern(pi): opfts.append([oi,pii,fi,'w']) ## sanity check: for i in range(0,len(opfts)): pi = opfts[i][1] if pi == '*': print_warning(req, "Ignoring standalone wildcard word.", "Warning") del opfts[i] ## return search units: return opfts
ecbca079c2ffbb7166e391821982c873c23535a2 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2139/ecbca079c2ffbb7166e391821982c873c23535a2/search_engine.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 13240, 67, 3072, 67, 7705, 12, 3658, 16, 293, 16, 284, 16, 312, 33, 7036, 4672, 3536, 16582, 1623, 1936, 471, 1623, 652, 1368, 279, 666, 434, 14807, 715, 23721, 4971, 18, 300,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 13240, 67, 3072, 67, 7705, 12, 3658, 16, 293, 16, 284, 16, 312, 33, 7036, 4672, 3536, 16582, 1623, 1936, 471, 1623, 652, 1368, 279, 666, 434, 14807, 715, 23721, 4971, 18, 300,...
new_disk.mode = disk_dict['mode']
def Exec(self, feedback_fn): """Modifies an instance.
6ec66eae21cff0afdac3de02d20ff482895c43a2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/6ec66eae21cff0afdac3de02d20ff482895c43a2/cmdlib.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 1739, 5032, 392, 791, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3889, 12, 2890, 16, 10762, 67, 4293, 4672, 3536, 1739, 5032, 392, 791, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.assertEquals("default", get_profile_name(p))
self.assertEquals(current, get_profile_name(p))
def get_profile_name(p): """ Takes a path object to the config xml """ xml = XML(p.text()) props = xml.findall("./properties") for x in props: id = x.attrib["id"] if id == "__ACTIVE__": for y in x.getchildren(): if y.attrib["name"] == "omero.config.profile": return y.attrib["value"]
9afa4804bd521c5e5baf99417db8e18abdb9eb3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12409/9afa4804bd521c5e5baf99417db8e18abdb9eb3b/t_config.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 5040, 67, 529, 12, 84, 4672, 3536, 23004, 279, 589, 733, 358, 326, 642, 2025, 3536, 2025, 273, 3167, 12, 84, 18, 955, 10756, 3458, 273, 2025, 18, 4720, 454, 2932, 18, 19, 47...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 5040, 67, 529, 12, 84, 4672, 3536, 23004, 279, 589, 733, 358, 326, 642, 2025, 3536, 2025, 273, 3167, 12, 84, 18, 955, 10756, 3458, 273, 2025, 18, 4720, 454, 2932, 18, 19, 47...
r = re.compile(rxp, re.UNICODE|re.M)
r = re.compile(rxp, re.UNICODE|re.DOTALL)
def takesettings(self): """ Function to take the settings from the wiki. """ try: if self.settings == None: self.settingsData = None else: x = wikipedia.Page(self.site, self.settings) self.settingsData = list() try: testo = x.get() rxp = r"<------- ------->\n\*[Nn]ame ?= ?['\"](.*?)['\"]\n\*([Ff]ind|[Ff]indonly)=(.*?)\n\*[Ii]magechanges=(.*?)\n\*[Ss]ummary=['\"](.*?)['\"]\n\*[Hh]ead=['\"](.*?)['\"]\n\*[Tt]ext ?= ?['\"](.*?)['\"]\n\*[Mm]ex ?= ?['\"]?(.*?)['\"]?$" r = re.compile(rxp, re.UNICODE|re.M) number = 1 for m in r.finditer(testo): name = str(m.group(1)) find_tipe = str(m.group(2)) find = str(m.group(3)) imagechanges = str(m.group(4)) summary = str(m.group(5)) head = str(m.group(6)) text = str(m.group(7)) mexcatched = str(m.group(8)) tupla = [number, name, find_tipe, find, imagechanges, summary, head, text, mexcatched] self.settingsData += [tupla] number += 1 if self.settingsData == list(): wikipedia.output(u"You've set wrongly your settings, please take a look to the relative page. (run without them)") self.settingsData = None except wikipedia.NoPage: wikipedia.output(u"The settings' page doesn't exist!") self.settingsData = None except wikipedia.Error: # Error? Settings = None wikipedia.output(u'Problems with loading the settigs, run without them.') self.settingsData = None self.some_problem = False if self.settingsData == []: self.settingsData = None # Real-Time page loaded if self.settingsData != None: wikipedia.output(u'\t >> Loaded the real-time page... <<') # No settings found, No problem, continue. else: wikipedia.output(u'\t >> No additional settings found! <<') return self.settingsData # Useless, but it doesn't harm..
c3a948c21ee29f736b04595b152c3dc94be1b5e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/c3a948c21ee29f736b04595b152c3dc94be1b5e3/checkimages.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5530, 278, 1256, 12, 2890, 4672, 3536, 4284, 358, 4862, 326, 1947, 628, 326, 9050, 18, 3536, 775, 30, 309, 365, 18, 4272, 422, 599, 30, 365, 18, 4272, 751, 273, 599, 469, 30, 619, 27...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5530, 278, 1256, 12, 2890, 4672, 3536, 4284, 358, 4862, 326, 1947, 628, 326, 9050, 18, 3536, 775, 30, 309, 365, 18, 4272, 422, 599, 30, 365, 18, 4272, 751, 273, 599, 469, 30, 619, 27...
def _colorize(doc, token, errors, warnings=None, tagName='para'):
def _colorize(doc, token, errors, tagName='para'):
def _colorize(doc, token, errors, warnings=None, tagName='para'): """ Given a string containing the contents of a paragraph, produce a DOM C{Element} encoding that paragraph. Colorized regions are represented using DOM C{Element}s, and text is represented using DOM C{Text}s. @param errors: A list of errors. Any newly generated errors will be appended to this list. @type errors: C{list} of C{string} @param warnings: A list of warnings. Any newly generated warnings will be appended to this list. To ignore warnings, use a value of None. @type warnings: C{list} of C{string} @param tagName: The element tag for the DOM C{Element} that should be generated. @type tagName: C{string} @return: a DOM C{Element} encoding the given paragraph. @returntype: C{Element} """ str = token.contents linenum = 0 if warnings == None: warnings = [] # Maintain a stack of DOM elements, containing the ancestors of # the text currently being analyzed. New elements are pushed when # "{" is encountered, and old elements are popped when "}" is # encountered. stack = [doc.createElement(tagName)] # This is just used to make error-reporting friendlier. It's a # stack parallel to "stack" containing the index of each element's # open brace. openbrace_stack = [0] # Process the string, scanning for '{' and '}'s. start is the # index of the first unprocessed character. Each time through the # loop, we process the text from the first unprocessed character # to the next open or close brace. start = 0 while 1: match = _BRACE_RE.search(str, start) if match == None: break end = match.start() # Open braces start new colorizing elements. When preceeded # by a capital letter, they specify a colored region, as # defined by the _COLORIZING_TAGS dictionary. Otherwise, # use a special "literal braces" element (with tag "litbrace"), # and convert them to literal braces once we find the matching # close-brace. if match.group() == '{': if (end>0) and 'A' <= str[end-1] <= 'Z': if (end-1) > start: stack[-1].appendChild(doc.createTextNode(str[start:end-1])) if not _COLORIZING_TAGS.has_key(str[end-1]): estr = "Unknown inline markup tag." errors.append(ColorizingError(estr, token, end-1)) stack.append(doc.createElement('unknown')) else: tag = _COLORIZING_TAGS[str[end-1]] stack.append(doc.createElement(tag)) else: if end > start: stack[-1].appendChild(doc.createTextNode(str[start:end])) stack.append(doc.createElement('litbrace')) openbrace_stack.append(end) stack[-2].appendChild(stack[-1]) # Close braces end colorizing elements. elif match.group() == '}': # Check for (and ignore) unbalanced braces. if len(stack) <= 1: estr = "Unbalanced '}'." errors.append(ColorizingError(estr, token, end)) start = end + 1 continue # Add any remaining text. if end > start: stack[-1].appendChild(doc.createTextNode(str[start:end])) # Special handling for symbols: if stack[-1].tagName == 'symbol': if (len(stack[-1].childNodes) != 1 or not isinstance(stack[-1].childNodes[0], Text)): estr = "Invalid symbol." errors.append(ColorizingError(estr, token, end)) else: symb = stack[-1].childNodes[0].data if _SYMBOLS.has_key(symb): # It's a symbol symbol = doc.createElement('symbol') stack[-2].removeChild(stack[-1]) stack[-2].appendChild(symbol) symbol.appendChild(doc.createTextNode(symb)) else: estr = "Invalid symbol." errors.append(ColorizingError(estr, token, end)) # Special handling for escape elements: if stack[-1].tagName == 'escape': if (len(stack[-1].childNodes) != 1 or not isinstance(stack[-1].childNodes[0], Text)): estr = "Invalid escape." errors.append(ColorizingError(estr, token, end)) else: escp = stack[-1].childNodes[0].data if _ESCAPES.has_key(escp): # It's an escape from _ESCPAES stack[-2].removeChild(stack[-1]) escp = _ESCAPES[escp] stack[-2].appendChild(doc.createTextNode(escp)) elif len(escp) == 1: # It's a single-character escape (eg E{.}) stack[-2].removeChild(stack[-1]) stack[-2].appendChild(doc.createTextNode(escp)) else: estr = "Invalid escape." errors.append(ColorizingError(estr, token, end)) # Special handling for literal braces elements: if stack[-1].tagName == 'litbrace': children = stack[-1].childNodes stack[-2].removeChild(stack[-1]) stack[-2].appendChild(doc.createTextNode('{')) for child in children: stack[-2].appendChild(child) stack[-2].appendChild(doc.createTextNode('}')) # Special handling for link-type elements: if stack[-1].tagName in _LINK_COLORIZING_TAGS: link = _colorize_link(doc, stack[-1], token, end, warnings, errors) # Pop the completed element. openbrace_stack.pop() stack.pop() start = end+1 # Add any final text. if start < len(str): stack[-1].appendChild(doc.createTextNode(str[start:])) if len(stack) != 1: estr = "Unbalanced '{'." errors.append(ColorizingError(estr, token, openbrace_stack[-1])) return stack[0]
36ace726c8fc4e9c1a450d16c75087d594ead7cf /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/36ace726c8fc4e9c1a450d16c75087d594ead7cf/epytext.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3266, 554, 12, 2434, 16, 1147, 16, 1334, 16, 7196, 2218, 25072, 11, 4672, 3536, 16803, 279, 533, 4191, 326, 2939, 434, 279, 10190, 16, 11402, 279, 4703, 385, 95, 1046, 97, 2688, 7...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 3266, 554, 12, 2434, 16, 1147, 16, 1334, 16, 7196, 2218, 25072, 11, 4672, 3536, 16803, 279, 533, 4191, 326, 2939, 434, 279, 10190, 16, 11402, 279, 4703, 385, 95, 1046, 97, 2688, 7...
u = urllib2.urlopen("http://www.python.org", timeout=None)
u = _urlopen_with_retry("http://www.python.org", timeout=None)
def test_http_NoneNodefault(self): u = urllib2.urlopen("http://www.python.org", timeout=None) self.assertTrue(u.fp._sock.fp._sock.gettimeout() is None)
769d0eefd75e5d921806caf75450c7c3a706bd1c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/769d0eefd75e5d921806caf75450c7c3a706bd1c/test_urllib2net.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2505, 67, 7036, 907, 643, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 3113, 2021, 33, 7036, 13, 365, 18, 11231,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1842, 67, 2505, 67, 7036, 907, 643, 12, 2890, 4672, 582, 273, 389, 295, 18589, 67, 1918, 67, 9620, 2932, 2505, 2207, 5591, 18, 8103, 18, 3341, 3113, 2021, 33, 7036, 13, 365, 18, 11231,...
st.append("%02X"%(int(str(M[x,y].int_repr()))))
st.append("%02X"%(int(str(M[x, y].int_repr()))))
def hex_str_matrix(self, M): """ Return a two-dimensional AES like representation of the matrix M.
26b5b14a2a46b23848ccefac3b41425cf353e86a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/26b5b14a2a46b23848ccefac3b41425cf353e86a/sr.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3827, 67, 701, 67, 5667, 12, 2890, 16, 490, 4672, 3536, 2000, 279, 2795, 17, 31236, 15986, 3007, 4335, 434, 326, 3148, 490, 18, 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, 3827, 67, 701, 67, 5667, 12, 2890, 16, 490, 4672, 3536, 2000, 279, 2795, 17, 31236, 15986, 3007, 4335, 434, 326, 3148, 490, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if type(item) not in [IntType,LongType]: rList.append(str(item))
if type( item ) not in [IntType, LongType]: rList.append( str( item ) )
def getTransformationTasks(self,condDict={},older=None, newer=None, timeStamp='CreationTime', orderAttribute=None, limit=None, inputVector=False, connection=False): connection = self.__getConnection(connection) req = "SELECT %s FROM TransformationTasks %s" % (intListToString(self.TASKSPARAMS),self.buildCondition(condDict, older, newer, timeStamp,orderAttribute,limit)) res = self._query(req,connection) if not res['OK']: return res webList = [] resultList = [] for row in res['Value']: # Prepare the structure for the web rList = [] taskDict = {} count = 0 for item in row: taskDict[self.TASKSPARAMS[count]] = item count += 1 if type(item) not in [IntType,LongType]: rList.append(str(item)) else: rList.append(item) webList.append(rList) if inputVector: taskDict['InputVector'] = '' taskID = taskDict['TaskID'] transID = taskDict['TransformationID'] res = self.getTaskInputVector(transID,taskID) if res['OK']: if res['Value'].has_key(taskID): taskDict['InputVector']=res['Value'][taskID] resultList.append(taskDict) result = S_OK(resultList) result['Records'] = webList result['ParameterNames'] = self.TASKSPARAMS return result
9ad007ea503b29694fc081c1646b7c5ecd07b1f2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/9ad007ea503b29694fc081c1646b7c5ecd07b1f2/TransformationDB.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 15292, 6685, 12, 2890, 16, 10013, 5014, 28793, 1498, 33, 7036, 16, 16069, 33, 7036, 16, 18198, 2218, 29746, 2187, 1353, 1499, 33, 7036, 16, 1800, 33, 7036, 16, 810, 5018, 33, 8381, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15292, 6685, 12, 2890, 16, 10013, 5014, 28793, 1498, 33, 7036, 16, 16069, 33, 7036, 16, 18198, 2218, 29746, 2187, 1353, 1499, 33, 7036, 16, 1800, 33, 7036, 16, 810, 5018, 33, 8381, ...
opts, args = getopt.getopt(sys.argv[1:], 'e:p:')
opts, args = getopt.getopt(sys.argv[1:], 'e:p:P:')
def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-e': extensions.append(a) if o == '-p': prefix = a # locations derived from options binlib = os.path.join(prefix, 'lib/python/lib') incldir = os.path.join(prefix, 'include/Py') config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') makefile_in = os.path.join(binlib, 'Makefile') defines = ['-DHAVE_CONFIG_H', '-DUSE_FROZEN', '-DNO_MAIN', '-DPYTHONPATH=\\"$(PYTHONPATH)\\"'] includes = ['-I' + incldir, '-I' + binlib] # sanity check of directories and files for dir in [prefix, binlib, incldir] + extensions: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) for file in config_c_in, makefile_in, frozenmain_c: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that file arguments exist for arg in args: if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # Actual work starts here... dict = findmodules.findmodules(scriptfile, modules, path) backup = frozen_c + '~' try: os.rename(frozen_c, backup) except os.error: backup = None outfp = open(frozen_c, 'w') try: makefreeze.makefreeze(outfp, dict) finally: outfp.close() if backup: if cmp.cmp(backup, frozen_c): sys.stderr.write('%s not changed, not written\n' % frozen_c) os.rename(backup, frozen_c) builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod] == '<builtin>': builtins.append(mod) elif dict[mod] == '<unknown>': unknown.append(mod) addfiles = [] if unknown: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) builtins.sort() infp = open(config_c_in) backup = config_c + '~' try: os.rename(config_c, backup) except os.error: backup = None outfp = open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() if backup: if cmp.cmp(backup, config_c): sys.stderr.write('%s not changed, not written\n' % config_c) os.rename(backup, config_c) cflags = defines + includes + ['$(OPT)'] libs = [] for n in 'Modules', 'Python', 'Objects', 'Parser': n = 'lib%s.a' % n n = os.path.join(binlib, n) libs.append(n) makevars = parsesetup.getmakevars(makefile_in) somevars = {} for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override files = ['$(OPT)', config_c, frozen_c, frozenmain_c] + \ addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] backup = makefile + '~' try: os.rename(makefile, backup) except os.error: backup = None outfp = open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, target) finally: outfp.close() if backup: if not cmp.cmp(backup, makefile): print 'previous Makefile saved as', backup else: sys.stderr.write('%s not changed, not written\n' % makefile) os.rename(backup, makefile) # Done! print 'Now run make to build the target:', target
bbf003ce64fe627cd70357565d8e6a46983244b7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/bbf003ce64fe627cd70357565d8e6a46983244b7/freeze.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5713, 27621, 819, 1633, 273, 17154, 1082, 202, 7, 444, 2121, 598, 300, 84, 1456, 4418, 273, 5378, 589, 273, 2589, 18, 803, 225, 468, 876, 1390, 12810, 67, 71, 273, 29...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 13332, 468, 5713, 27621, 819, 1633, 273, 17154, 1082, 202, 7, 444, 2121, 598, 300, 84, 1456, 4418, 273, 5378, 589, 273, 2589, 18, 803, 225, 468, 876, 1390, 12810, 67, 71, 273, 29...
def err_exit(title, rc): py_pjsua.perror(THIS_FILE, title, rc) exit(1) def log_cb(level, str, len): if level <= C_LOG_LEVEL: print str, def write_log(level, str): log_cb(level, str + "\n", 0)
def on_call_transfer_request(call_id, dst, code): write_log(3, "Call transfer request from " + `call_id` + " to " + dst + " with code " + `code`)
352b48e8ef2baf84dee8c43d428cc8f554e95eee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1375/352b48e8ef2baf84dee8c43d428cc8f554e95eee/pjsua_app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1991, 67, 13866, 67, 2293, 12, 1991, 67, 350, 16, 3046, 16, 981, 4672, 1045, 67, 1330, 12, 23, 16, 315, 1477, 7412, 590, 628, 315, 397, 1375, 1991, 67, 350, 68, 397, 315, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 1991, 67, 13866, 67, 2293, 12, 1991, 67, 350, 16, 3046, 16, 981, 4672, 1045, 67, 1330, 12, 23, 16, 315, 1477, 7412, 590, 628, 315, 397, 1375, 1991, 67, 350, 68, 397, 315, ...
loadFactory= LoadFactory(False,MreAlch,MreAmmo,MreAppa,MreArmo,MreBook,MreClot,MreIngr,MreKeym,MreLigh,MreMisc,MreSgst,MreSlgm,MreWeap)
loadFactory= LoadFactory(False,MreAlch,MreAmmo,MreArmo,MreBook,MreIngr,MreKeym,MreLigh,MreMisc,MreWeap)
def readFromMod(self,modInfo): """Reads stats from specified mod.""" loadFactory= LoadFactory(False,MreAlch,MreAmmo,MreAppa,MreArmo,MreBook,MreClot,MreIngr,MreKeym,MreLigh,MreMisc,MreSgst,MreSlgm,MreWeap) modFile = ModFile(modInfo,loadFactory) modFile.load(True) mapper = modFile.getLongMapper() for type in self.type_stats: stats, attrs = self.type_stats[type], self.type_attrs[type] for record in getattr(modFile,type).getActiveRecords(): longid = mapper(record.fid) recordGetAttr = record.__getattribute__ stats[longid] = tuple(recordGetAttr(attr) for attr in attrs)
aeca1db1240364fac710811ccc7f19b3a36b644a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/aeca1db1240364fac710811ccc7f19b3a36b644a/bosh.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20876, 1739, 12, 2890, 16, 1711, 966, 4672, 3536, 7483, 3177, 628, 1269, 681, 12123, 1262, 1733, 33, 4444, 1733, 12, 8381, 16, 49, 266, 1067, 343, 16, 49, 266, 37, 7020, 83, 16, 49, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 20876, 1739, 12, 2890, 16, 1711, 966, 4672, 3536, 7483, 3177, 628, 1269, 681, 12123, 1262, 1733, 33, 4444, 1733, 12, 8381, 16, 49, 266, 1067, 343, 16, 49, 266, 37, 7020, 83, 16, 49, ...
return cloudMade.get_url(self.mt_counter, coord, styleID)
return cloudMade.get_url(self.mt_counter, coord, conf.cloudMade_styleID)
def get_url_from_coord(self, coord, layer, conf): self.mt_counter += 1 self.mt_counter = self.mt_counter % NR_MTS # do I really need this empty line? I commented it out. (standa31415) #print try: if not conf.oneDirPerMap: if conf.map_service == MAP_SERVERS[VIRTUAL_EARTH] and (layer != LAYER_TERRAIN): return virtualEarth.get_url(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[OSM] and (layer == LAYER_MAP): return openStreetMaps.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[CLOUDMADE] and (layer == LAYER_MAP): return cloudMade.get_url(self.mt_counter, coord, styleID) elif conf.map_service == MAP_SERVERS[YAHOO] and (layer != LAYER_TERRAIN): return yahoo.get_url(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[INFO_FREEWAY] and (layer == LAYER_MAP): return informationFreeway.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[OPENCYCLEMAP] and (layer == LAYER_MAP): return openCycleMap.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[GOOGLE_MAKER] and (layer == LAYER_MAP): return googleMapMaker.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[YANDEX] and (layer == LAYER_MAP): return yandex.get_url(self.mt_counter, coord) elif conf.map_service == MAP_SERVERS[SEZNAM]: return seznam.get_url_base(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[SEZNAM_HIKING]: return seznam.get_url_hiking(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[SEZNAM_CYCLO]: return seznam.get_url_cyclo(self.mt_counter, coord, layer) elif conf.map_service == MAP_SERVERS[SEZNAM_HIST]: return seznam.get_url_hist(self.mt_counter, coord, layer) else: return googleMaps.get_url(self.mt_counter, coord, layer, conf)
0ea550c4ea64a751e93bd6cec046c79b1ad1145c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5373/0ea550c4ea64a751e93bd6cec046c79b1ad1145c/mapServices.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 718, 67, 2080, 67, 5732, 12, 2890, 16, 2745, 16, 3018, 16, 2195, 4672, 365, 18, 1010, 67, 7476, 1011, 404, 365, 18, 1010, 67, 7476, 273, 365, 18, 1010, 67, 7476, 738, 423, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 718, 67, 2080, 67, 5732, 12, 2890, 16, 2745, 16, 3018, 16, 2195, 4672, 365, 18, 1010, 67, 7476, 1011, 404, 365, 18, 1010, 67, 7476, 273, 365, 18, 1010, 67, 7476, 738, 423, ...
config = loadConfig(overrideFile, config=config) assert(config.get('paths', 'http_mount') == '/tmp/pulp')
config = loadConfig(override_file, config=config) self.assertEqual(config.get('paths', 'local_storage'), '/tmp/pulp')
def test_loadConfig(self): # Setup origFile = '../../etc/pulp.ini' overrideFile = './data/test-override-pulp.ini' # Test & Verify config = loadConfig(origFile) self.assertEqual(config.get('paths', 'http_mount'), '/var/www/pulp')
229c124ea41f8e0597c5d27df37d7bcc680eb620 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10692/229c124ea41f8e0597c5d27df37d7bcc680eb620/test_util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 945, 809, 12, 2890, 4672, 468, 10939, 1647, 812, 273, 296, 16644, 14175, 19, 84, 14290, 18, 8767, 11, 3849, 812, 273, 12871, 892, 19, 3813, 17, 10601, 17, 84, 14290, 18, 8767...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 945, 809, 12, 2890, 4672, 468, 10939, 1647, 812, 273, 296, 16644, 14175, 19, 84, 14290, 18, 8767, 11, 3849, 812, 273, 12871, 892, 19, 3813, 17, 10601, 17, 84, 14290, 18, 8767...
dbh.MySQLHarness(string) string= "%s -i %r -o %r %r -n %r -f %r -m %r -i %r" % ( config.IOWRAPPER, self.iosource.subsystem, self.iosource.make_parameter_list(),config.SLEUTHKIT, iosource_name, self.sk_type, mount_point, "foo" )
def load(self, mount_point, iosource_name): ## Ensure that mount point is normalised: mount_point = os.path.normpath(mount_point) DBFS.load(self, mount_point, iosource_name)
b66e95c10bbb05c6295e85912203a3e850c68770 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5568/b66e95c10bbb05c6295e85912203a3e850c68770/Sleuthkit.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 5344, 67, 1153, 16, 30993, 552, 67, 529, 4672, 7541, 7693, 716, 5344, 1634, 353, 2212, 5918, 30, 5344, 67, 1153, 273, 1140, 18, 803, 18, 7959, 803, 12, 4778, 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, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1262, 12, 2890, 16, 5344, 67, 1153, 16, 30993, 552, 67, 529, 4672, 7541, 7693, 716, 5344, 1634, 353, 2212, 5918, 30, 5344, 67, 1153, 273, 1140, 18, 803, 18, 7959, 803, 12, 4778, 67, ...
dprint(ref)
def is_folder(cls, ref): dprint("ref=%s, type=%s" % (ref, ref.__class__)) if cls.exists(ref): dprint(ref) mime = cls._get_metadata(ref, 'getcontenttype') return mime == "httpd/unix-directory" return False
86f487d201afc0c26ccca3cb3fdfd7f84807d2f7 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/86f487d201afc0c26ccca3cb3fdfd7f84807d2f7/http.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 5609, 12, 6429, 16, 1278, 4672, 302, 1188, 2932, 1734, 5095, 87, 16, 618, 5095, 87, 6, 738, 261, 1734, 16, 1278, 16186, 1106, 972, 3719, 309, 2028, 18, 1808, 12, 1734, 4672, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 5609, 12, 6429, 16, 1278, 4672, 302, 1188, 2932, 1734, 5095, 87, 16, 618, 5095, 87, 6, 738, 261, 1734, 16, 1278, 16186, 1106, 972, 3719, 309, 2028, 18, 1808, 12, 1734, 4672, ...
yield tichy.Service.get('Dialog').dialog(self.main, 'Ussd', msg)
yield tichy.Service.get('Dialog').dialog("window", 'Ussd', msg)
def _incoming_ussd(self, msg): logger.info('incoming ussd registered') yield tichy.Service.get('Dialog').dialog(self.main, 'Ussd', msg)
32c5421812a0b7431beb25eefac6c589c2bc996a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4712/32c5421812a0b7431beb25eefac6c589c2bc996a/paroli-launcher2.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 31033, 67, 5567, 72, 12, 2890, 16, 1234, 4672, 1194, 18, 1376, 2668, 31033, 584, 6427, 4104, 6134, 2824, 268, 1354, 93, 18, 1179, 18, 588, 2668, 6353, 16063, 12730, 2932, 5668, 3113...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 31033, 67, 5567, 72, 12, 2890, 16, 1234, 4672, 1194, 18, 1376, 2668, 31033, 584, 6427, 4104, 6134, 2824, 268, 1354, 93, 18, 1179, 18, 588, 2668, 6353, 16063, 12730, 2932, 5668, 3113...