rem
stringlengths
2
226k
add
stringlengths
0
227k
context
stringlengths
8
228k
meta
stringlengths
156
215
input_ids
list
attention_mask
list
labels
list
dc.SetPen(wx.Pen(busyColour, 1, wx.SOLID))
dc.SetPen(self.busyColourPen)
def DrawMonth(self, dc, startDate, y, highlightDate = False): """ draw a single month return the updated value of y """ dc.SetTextForeground(wx.BLACK);
b4bffc7cad7daee9a037b7296130e65ad5d69367 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/b4bffc7cad7daee9a037b7296130e65ad5d69367/minical.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 5445, 12, 2890, 16, 6744, 16, 12572, 16, 677, 16, 8839, 1626, 273, 1083, 4672, 3536, 3724, 279, 2202, 3138, 327, 326, 3526, 460, 434, 677, 3536, 6744, 18, 694, 1528, 23206, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10184, 5445, 12, 2890, 16, 6744, 16, 12572, 16, 677, 16, 8839, 1626, 273, 1083, 4672, 3536, 3724, 279, 2202, 3138, 327, 326, 3526, 460, 434, 677, 3536, 6744, 18, 694, 1528, 23206, 12, ...
for (msgid, id_user_from, user_from_nick,
for (msgid, id_user_from, user_from_nick,
def tmpl_display_inbox(self, messages, infos=[], warnings=[], nb_messages=0, no_quota=0, ln=cdslang): """ Displays a list of messages, with the appropriate links and buttons @param messages: a list of tuples: [(message_id, user_from_id, user_from_nickname, subject, sent_date, status=] @param infos: a list of informations to print on top of page @param warnings: a list of warnings to display @param nb_messages: number of messages user has @param no_quota: 1 if user has no quota (admin) or 0 else. @param ln: language of the page. @return the list in HTML format """ _ = gettext_set_language(ln) dummy = 0 inbox = self.tmpl_warning(warnings, ln) inbox += self.tmpl_infobox(infos, ln) if not(no_quota): inbox += self.tmpl_quota(nb_messages, ln) inbox += """
f4a9e182650614f9c75111360ff7aaa98e5eeb52 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/f4a9e182650614f9c75111360ff7aaa98e5eeb52/webmessage_templates.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10720, 67, 5417, 67, 267, 2147, 12, 2890, 16, 2743, 16, 10626, 22850, 6487, 5599, 22850, 6487, 4264, 67, 6833, 33, 20, 16, 1158, 67, 23205, 33, 20, 16, 7211, 33, 4315, 2069, 539, 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, 10720, 67, 5417, 67, 267, 2147, 12, 2890, 16, 2743, 16, 10626, 22850, 6487, 5599, 22850, 6487, 4264, 67, 6833, 33, 20, 16, 1158, 67, 23205, 33, 20, 16, 7211, 33, 4315, 2069, 539, 4672,...
test_web_page_content(weburl + '/help/search?ln=fr', expected_text="Aide de recherche"))
test_web_page_content(weburl + '/help/?ln=fr', expected_text="Centre d'aide"))
def test_search_help_page_availability(self): """websearch - availability of Search Help page"""
42003ffa21687e27c800e993fd921c88e39b7a4f /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12027/42003ffa21687e27c800e993fd921c88e39b7a4f/websearch_regression_tests.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3072, 67, 5201, 67, 2433, 67, 24318, 12, 2890, 4672, 3536, 4875, 3072, 300, 13395, 434, 5167, 11288, 1363, 8395, 2, 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, 1842, 67, 3072, 67, 5201, 67, 2433, 67, 24318, 12, 2890, 4672, 3536, 4875, 3072, 300, 13395, 434, 5167, 11288, 1363, 8395, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
def set_data(self, data):
def set_data(self, data, skip=[]):
def set_data(self, data): assert self.context assert self.form_fields
3b878b790d3441ad053d77f9bdd2cbffe8f40e81 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6273/3b878b790d3441ad053d77f9bdd2cbffe8f40e81/edit_profile.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 892, 12, 2890, 16, 501, 16, 2488, 33, 8526, 4672, 1815, 365, 18, 2472, 1815, 365, 18, 687, 67, 2821, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 892, 12, 2890, 16, 501, 16, 2488, 33, 8526, 4672, 1815, 365, 18, 2472, 1815, 365, 18, 687, 67, 2821, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
print "recipe ID %s moved from Processed to Aborted" % recipe.id
log.info("recipe ID %s moved from Processed to Aborted" % recipe.id)
def processed_recipesets(*args): recipesets = RecipeSet.query()\ .join(['recipes','status'])\ .filter(Recipe.status==TaskStatus.by_name(u'Processed')) for recipeset in recipesets: bad_l_controllers = set() # We only need to do this processing on multi-host recipes if len(recipeset.recipes) == 1: print "recipe ID %s moved from Processed to Queued" % recipeset.recipes[0].id recipeset.recipes[0].Queue() continue # Find all the lab controllers that this recipeset may run. rsl_controllers = set(LabController.query()\ .join(['systems', 'queued_recipes', 'recipeset'])\ .filter(RecipeSet.id==recipeset.id).all()) # Any lab controllers that are not associated to all recipes in the # recipe set must have those systems on that lab controller removed # from any recipes. For multi-host all recipes must be schedulable # on one lab controller for recipe in recipeset.recipes: rl_controllers = set(LabController.query()\ .join(['systems', 'queued_recipes'])\ .filter(Recipe.id==recipe.id).all()) bad_l_controllers = bad_l_controllers.union(rl_controllers.difference(rsl_controllers)) for l_controller in rsl_controllers: enough_systems = False for recipe in recipeset.recipes: systems = recipe.dyn_systems.filter( System.lab_controller==l_controller ).all() if len(systems) < len(recipeset.recipes): break else: # There are enough choices We don't need to worry about dead # locks enough_systems = True if not enough_systems: # Eliminate bad choices. for recipe in recipeset.recipes_orderby(l_controller)[:]: for tmprecipe in recipeset.recipes: systemsa = set(recipe.dyn_systems.filter( System.lab_controller==l_controller ).all()) systemsb = set(tmprecipe.dyn_systems.filter( System.lab_controller==l_controller ).all()) if systemsa.difference(systemsb): for rem_system in systemsa.intersection(systemsb): print "Removing %s from recipe id %s" % (rem_system, recipe.id) recipe.systems.remove(rem_system) for recipe in recipeset.recipes: count = 0 systems = recipe.dyn_systems.filter( System.lab_controller==l_controller ).all() for tmprecipe in recipeset.recipes: tmpsystems = tmprecipe.dyn_systems.filter( System.lab_controller==l_controller ).all() if recipe != tmprecipe and \ systems == tmpsystems: count += 1 if len(systems) <= count: # Remove all systems from this lc on this rs. bad_l_controllers = bad_l_controllers.union([l_controller]) # Remove systems that are on bad lab controllers # This means one of the recipes can be fullfilled on a lab controller # but not the rest of the recipes in the recipeSet. # This could very well remove ALL systems from all recipes in this # recipeSet. If that happens then the recipeSet cannot be scheduled # and will be aborted by the abort process. for recipe in recipeset.recipes: for l_controller in bad_l_controllers: systems = (recipe.dyn_systems.filter( System.lab_controller==l_controller ).all() ) for system in systems: print "Removing %s from recipe id %s" % (system, recipe.id) recipe.systems.remove(system) if recipe.systems: # Set status to Queued print "recipe ID %s moved from Processed to Queued" % recipe.id recipe.Queue() else: # Set status to Aborted print "recipe ID %s moved from Processed to Aborted" % recipe.id recipe.recipeset.Abort('Recipe ID %s does not match any systems' % recipe.id) session.flush()
21152319496607664b89fa38802612b4f8236938 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14755/21152319496607664b89fa38802612b4f8236938/recipes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5204, 67, 266, 3449, 281, 2413, 30857, 1968, 4672, 5863, 281, 2413, 273, 7776, 3151, 694, 18, 2271, 1435, 64, 263, 5701, 12, 3292, 266, 3449, 281, 17023, 2327, 3546, 5153, 263, 2188, 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, 5204, 67, 266, 3449, 281, 2413, 30857, 1968, 4672, 5863, 281, 2413, 273, 7776, 3151, 694, 18, 2271, 1435, 64, 263, 5701, 12, 3292, 266, 3449, 281, 17023, 2327, 3546, 5153, 263, 2188, 12,...
widget.font_size.final = widget.font_size.final * zoom
widget.pos.final = widget.center_pos(False) widget.size.final = widget.size.final * zoom widget.pos.final -= widget.size.final * 0.5
def zoom(self, zoom): for widget in self.widgets: widget.font_size.final = widget.font_size.final * zoom self._paint(None)
ac7753ad77f6ae5d076e57dbbc937da080f4869e /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5406/ac7753ad77f6ae5d076e57dbbc937da080f4869e/GraphApp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 12, 2890, 16, 7182, 4672, 364, 3604, 316, 365, 18, 18148, 30, 3604, 18, 917, 18, 6385, 273, 3604, 18, 5693, 67, 917, 12, 8381, 13, 3604, 18, 1467, 18, 6385, 273, 3604, 18, 1467...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7182, 12, 2890, 16, 7182, 4672, 364, 3604, 316, 365, 18, 18148, 30, 3604, 18, 917, 18, 6385, 273, 3604, 18, 5693, 67, 917, 12, 8381, 13, 3604, 18, 1467, 18, 6385, 273, 3604, 18, 1467...
self.tooltips.set_tip(self.expander, self.cursonglabel1.get_text() + "\n" + self.cursonglabel2.get_text())
self.expander.set_tooltip_text(self.cursonglabel1.get_text() + "\n" + self.cursonglabel2.get_text())
def update_cursong(self): if self.conn and self.status and self.status['state'] in ['play', 'pause']: # We must show the trayprogressbar and trayalbumeventbox # before changing self.cursonglabel (and consequently calling # self.on_currsong_notify()) in order to ensure that the notification # popup will have the correct height when being displayed for # the first time after a stopped state. if self.show_progress: self.trayprogressbar.show() self.traycursonglabel2.show() if self.show_covers: self.trayalbumeventbox.show() self.trayalbumimage2.show()
5178d7eb73657d7ee78706340fbf0fc5d779c7ee /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/2312/5178d7eb73657d7ee78706340fbf0fc5d779c7ee/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1397, 816, 75, 12, 2890, 4672, 309, 365, 18, 4646, 471, 365, 18, 2327, 471, 365, 18, 2327, 3292, 2019, 3546, 316, 10228, 1601, 2187, 296, 19476, 3546, 30, 468, 1660, 1297, 24...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1089, 67, 1397, 816, 75, 12, 2890, 4672, 309, 365, 18, 4646, 471, 365, 18, 2327, 471, 365, 18, 2327, 3292, 2019, 3546, 316, 10228, 1601, 2187, 296, 19476, 3546, 30, 468, 1660, 1297, 24...
if (rhs && (rhs.type == ARRAY_INIT || rhs.type == OBJECT_INIT))
if (rhs and (rhs.type == ARRAY_INIT or rhs.type == OBJECT_INIT))
def checkDestructuring(tokenizer, compilerContext, node, simpleNamesOnly, data) { if (node.type == ARRAY_COMP) raise SyntaxError("Invalid array comprehension left-hand side") if (node.type != ARRAY_INIT && node.type != OBJECT_INIT) return
58afad4d3cade0a037f53f0a04cb23589df417b1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12949/58afad4d3cade0a037f53f0a04cb23589df417b1/Parser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 6305, 8813, 4017, 12, 2316, 1824, 16, 5274, 1042, 16, 756, 16, 4143, 1557, 3386, 16, 501, 13, 288, 309, 261, 2159, 18, 723, 422, 14884, 67, 10057, 13, 1002, 18453, 2932, 1941, 526...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 6305, 8813, 4017, 12, 2316, 1824, 16, 5274, 1042, 16, 756, 16, 4143, 1557, 3386, 16, 501, 13, 288, 309, 261, 2159, 18, 723, 422, 14884, 67, 10057, 13, 1002, 18453, 2932, 1941, 526...
self.assertEqual(f.myfileobj.mode, 'rb')
self.assertTrue(f.myfileobj.mode.startswith('r'))
def test_mode(self): self.test_write() f = gzip.GzipFile(self.filename, 'r') self.assertEqual(f.myfileobj.mode, 'rb') f.close()
66bdfef11799df6f3aee63a9fbc559c03697a7f5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12029/66bdfef11799df6f3aee63a9fbc559c03697a7f5/test_gzip.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 365, 18, 3813, 67, 2626, 1435, 284, 273, 10331, 18, 27825, 812, 12, 2890, 18, 3459, 16, 296, 86, 6134, 365, 18, 11231, 5510, 12, 74, 18, 4811, 768, 26...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 3188, 12, 2890, 4672, 365, 18, 3813, 67, 2626, 1435, 284, 273, 10331, 18, 27825, 812, 12, 2890, 18, 3459, 16, 296, 86, 6134, 365, 18, 11231, 5510, 12, 74, 18, 4811, 768, 26...
c.push("hello world\nI'm not dead yet!\n")
c.push(b"hello world\nI'm not dead yet!\n")
def test_close_when_done(self): s = echo_server() s.start() time.sleep(0.5) # Give server time to initialize c = echo_client(b'\n') c.push("hello world\nI'm not dead yet!\n") c.push(SERVER_QUIT) c.close_when_done() asyncore.loop(use_poll=self.usepoll, count=300, timeout=.01) s.join()
1e2d7a7d38ab97e40a6337fd362ee72ff01f2cac /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/1e2d7a7d38ab97e40a6337fd362ee72ff01f2cac/test_asynchat.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 4412, 67, 13723, 67, 8734, 12, 2890, 4672, 272, 273, 3376, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 20, 18, 25, 13, 468, 22374, 1438, 813, 358, 4046, 276, 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, 4412, 67, 13723, 67, 8734, 12, 2890, 4672, 272, 273, 3376, 67, 3567, 1435, 272, 18, 1937, 1435, 813, 18, 19607, 12, 20, 18, 25, 13, 468, 22374, 1438, 813, 358, 4046, 276, 2...
def add_cover_image(key, ia): if has_cover_retry(key): print key, 'has_cover' return
def add_cover_image(ekey, ia): h1 = httplib.HTTPConnection('openlibrary.org') body = json.dumps(dict(username='ImportBot', password=rc['ImportBot'])) headers = {'Content-Type': 'application/json'} h1.request('POST', 'http://openlibrary.org/account/login', body, headers) res = h1.getresponse() res.read() assert res.status == 200 cookies = res.getheader('set-cookie').split(',') cookie = ';'.join([c.split(';')[0] for c in cookies])
def add_cover_image(key, ia): if has_cover_retry(key): print key, 'has_cover' return cover_url = 'http://www.archive.org/download/' + ia + '/page/' + ia + '_preview.jpg' post_data = urllib.urlencode({"url": cover_url}) if key.startswith('/b/'): key = '/books/' + key[3:] ol._request(key + "/add-cover.json", method="POST", data=post_data) return ret = find_img(ia) if not ret: return print 'cover image:', ret post(key, ia, ret)
59b5a71db4e51206e38fd477ef6908aff537e146 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3913/59b5a71db4e51206e38fd477ef6908aff537e146/load.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3165, 67, 2730, 12, 73, 856, 16, 20389, 4672, 565, 366, 21, 273, 15851, 6673, 18, 3693, 1952, 2668, 3190, 12083, 18, 3341, 6134, 1417, 273, 1163, 18, 13302, 1121, 12, 1576, 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, 527, 67, 3165, 67, 2730, 12, 73, 856, 16, 20389, 4672, 565, 366, 21, 273, 15851, 6673, 18, 3693, 1952, 2668, 3190, 12083, 18, 3341, 6134, 1417, 273, 1163, 18, 13302, 1121, 12, 1576, 12...
c.privmsg(target, parser.titles[0])
c.privmsg(target, parser.titles[0].strip())
def handle_data(self, text): if self.intitle: self.title.append(text) elif self.indesc: self.desc.append(text)
e89ce141f98c5c816f6395bbc11016ea2390e8fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10627/e89ce141f98c5c816f6395bbc11016ea2390e8fa/events.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1640, 67, 892, 12, 2890, 16, 977, 4672, 309, 365, 18, 474, 1280, 30, 365, 18, 2649, 18, 6923, 12, 955, 13, 1327, 365, 18, 728, 742, 30, 365, 18, 5569, 18, 6923, 12, 955, 13, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1640, 67, 892, 12, 2890, 16, 977, 4672, 309, 365, 18, 474, 1280, 30, 365, 18, 2649, 18, 6923, 12, 955, 13, 1327, 365, 18, 728, 742, 30, 365, 18, 5569, 18, 6923, 12, 955, 13, 2, -...
f_type = ('numeric', 'NUMERIC')
f_type = ('numeric', 'NUMERIC', None)
def get_pg_type(f): ''' returns a tuple (type returned by postgres when the column was created, type expression to create the column) ''' type_dict = { fields.boolean: 'bool', fields.integer: 'int4', fields.integer_big: 'int8', fields.text: 'text', fields.date: 'date', fields.time: 'time', fields.datetime: 'timestamp', fields.binary: 'bytea', fields.many2one: 'int4', } if type(f) in type_dict: f_type = (type_dict[type(f)], type_dict[type(f)]) elif isinstance(f, fields.float): if f.digits: f_type = ('numeric', 'NUMERIC') else: f_type = ('float8', 'DOUBLE PRECISION') elif isinstance(f, (fields.char, fields.reference)): f_type = ('varchar', 'VARCHAR(%d)' % (f.size,)) elif isinstance(f, fields.selection): if isinstance(f.selection, list) and isinstance(f.selection[0][0], (str, unicode)): f_size = reduce(lambda x, y: max(x, len(y[0])), f.selection, f.size or 16) elif isinstance(f.selection, list) and isinstance(f.selection[0][0], int): f_size = -1 else: f_size = getattr(f, 'size', None) or 16 if f_size == -1: f_type = ('int4', 'INTEGER') else: f_type = ('varchar', 'VARCHAR(%d)' % f_size) elif isinstance(f, fields.function) and eval('fields.'+(f._type), globals()) in type_dict: t = eval('fields.'+(f._type), globals()) f_type = (type_dict[t], type_dict[t]) elif isinstance(f, fields.function) and f._type == 'float': if f.digits: f_type = ('numeric', 'NUMERIC') else: f_type = ('float8', 'DOUBLE PRECISION') elif isinstance(f, fields.function) and f._type == 'selection': f_type = ('text', 'text') elif isinstance(f, fields.function) and f._type == 'char': f_type = ('varchar', 'VARCHAR(%d)' % (f.size)) else: _logger.warning('%s type not supported!' % (type(f))) f_type = None return f_type
1273b880acb46f1ed80608d5835a5c72c0e54036 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12853/1273b880acb46f1ed80608d5835a5c72c0e54036/orm.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 8365, 67, 723, 12, 74, 4672, 9163, 1135, 279, 3193, 261, 723, 2106, 635, 1603, 14107, 1347, 326, 1057, 1703, 2522, 16, 618, 2652, 358, 752, 326, 1057, 13, 9163, 225, 618, 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, 336, 67, 8365, 67, 723, 12, 74, 4672, 9163, 1135, 279, 3193, 261, 723, 2106, 635, 1603, 14107, 1347, 326, 1057, 1703, 2522, 16, 618, 2652, 358, 752, 326, 1057, 13, 9163, 225, 618, 67, ...
class ListCalendarsQuery(CalendarQuery): def __init__(self, userId=None, text_query=None, params=None, categories=None): if userId is None: userId = 'default' CalendarQuery.__init__(self, feed='http://www.google.com/calendar/feeds/' +userId, text_query=text_query, params=params, categories=categories) class EventCalendarQuery(CalendarQuery): def __init__(self, userId=None, text_query=None, params=None, categories=None): if userId is None: userId = 'default' CalendarQuery.__init__(self, feed='http://www.google.com/calendar/feeds/'+ userId+'/private/full', text_query=text_query, params=params, categories=categories)
def _SetRecurrenceExpansionEnd(self, val): self['recurrence-expansion-end'] = val
4285872dbc13b17065561fb8c6137c474ae14faf /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6580/4285872dbc13b17065561fb8c6137c474ae14faf/gcalendar_service.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 694, 426, 17131, 2966, 12162, 1638, 12, 2890, 16, 1244, 4672, 365, 3292, 266, 17131, 17, 2749, 12162, 17, 409, 3546, 273, 1244, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 694, 426, 17131, 2966, 12162, 1638, 12, 2890, 16, 1244, 4672, 365, 3292, 266, 17131, 17, 2749, 12162, 17, 409, 3546, 273, 1244, 2, -100, -100, -100, -100, -100, -100, -100, -100, -1...
_GetLogicalDriveStringsA(nBufferLength, ctypes.byref(lpBuffer))
_GetLogicalDriveStringsA(nBufferLength, lpBuffer)
def GetLogicalDriveStringsA(): _GetLogicalDriveStringsA = windll.kernel32.GetLogicalDriveStringsA _GetLogicalDriveStringsA.argtypes = [DWORD, LPSTR] _GetLogicalDriveStringsA.restype = DWORD _GetLogicalDriveStringsA.errcheck = RaiseIfZero nBufferLength = 0x1000 lpBuffer = ctypes.create_string_buffer('', nBufferLength) _GetLogicalDriveStringsA(nBufferLength, ctypes.byref(lpBuffer)) return lpBuffer.value
cc47fb9e15593c438e2b218967fc7d0ec04946a8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7261/cc47fb9e15593c438e2b218967fc7d0ec04946a8/kernel32.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 17955, 24681, 7957, 37, 13332, 389, 967, 17955, 24681, 7957, 37, 273, 17064, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 37, 389, 967, 17955, 24681, 7957, 37, 18, 3175, 2352, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 17955, 24681, 7957, 37, 13332, 389, 967, 17955, 24681, 7957, 37, 273, 17064, 2906, 18, 8111, 1578, 18, 967, 17955, 24681, 7957, 37, 389, 967, 17955, 24681, 7957, 37, 18, 3175, 2352, ...
if item == nulls[names[i]] or item.lower() == 'null': item = 'NaN'
if item.lower() == 'null' and nulls[names[i]] <> 'null': if nulls[names[i]] == '': print "WARNING: found unexpected 'null' value. Setting null value for column "+names[i]+" to 'null'" nulls[names[i]] = 'null' nulls_given = True else: raise Exception("null value for column "+names[i]+" is set to "+nulls[i]+" but found value 'null'")
def ipac_read(self, filename, definition=3): ''' Read a table from a IPAC file
a922711531ca24317f7aee3f86db35827a26af34 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13233/a922711531ca24317f7aee3f86db35827a26af34/ipactable.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2359, 1077, 67, 896, 12, 2890, 16, 1544, 16, 2379, 33, 23, 4672, 9163, 2720, 279, 1014, 628, 279, 2971, 2226, 585, 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, 2359, 1077, 67, 896, 12, 2890, 16, 1544, 16, 2379, 33, 23, 4672, 9163, 2720, 279, 1014, 628, 279, 2971, 2226, 585, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return (False, "OS rename script failed (%s), last lines in the" " log file:\n%s" % (result.fail_reason, "\n".join(lines)))
_Fail("OS rename script failed (%s), last lines in the" " log file:\n%s", result.fail_reason, "\n".join(lines), log=False)
def RunRenameInstance(instance, old_name): """Run the OS rename script for an instance. @type instance: L{objects.Instance} @param instance: Instance whose OS is to be installed @type old_name: string @param old_name: previous instance name @rtype: boolean @return: the success of the operation """ inst_os = OSFromDisk(instance.os) rename_env = OSEnvironment(instance) rename_env['OLD_INSTANCE_NAME'] = old_name logfile = "%s/rename-%s-%s-%s-%d.log" % (constants.LOG_OS_DIR, instance.os, old_name, instance.name, int(time.time())) result = utils.RunCmd([inst_os.rename_script], env=rename_env, cwd=inst_os.path, output=logfile) if result.failed: logging.error("os create command '%s' returned error: %s output: %s", result.cmd, result.fail_reason, result.output) lines = [utils.SafeEncode(val) for val in utils.TailFile(logfile, lines=20)] return (False, "OS rename script failed (%s), last lines in the" " log file:\n%s" % (result.fail_reason, "\n".join(lines))) return (True, "Rename successful")
afdc3985644be8d2b91d9f0e37dfda391a30d036 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/afdc3985644be8d2b91d9f0e37dfda391a30d036/backend.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 16019, 1442, 12, 1336, 16, 1592, 67, 529, 4672, 3536, 1997, 326, 5932, 6472, 2728, 364, 392, 791, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1939, 16019, 1442, 12, 1336, 16, 1592, 67, 529, 4672, 3536, 1997, 326, 5932, 6472, 2728, 364, 392, 791, 18, 225, 632, 723, 791, 30, 511, 95, 6911, 18, 1442, 97, 632, 891, 791, 30, 51...
if not time and nickname != self.own_nick and self.joined and nickname is not None:
if not time and nickname.encode('utf-8') != self.own_nick and self.joined and nickname is not None:
def do_highlight(self, txt, time, nickname): """ Set the tab color and returns the txt color """ color = None if not time and nickname != self.own_nick and self.joined and nickname is not None: # do the highlight try: if self.own_nick.encode('utf-8') in txt: self.set_color_state(common.ROOM_STATE_HL) color = 4 except UnicodeDecodeError: try: if self.own_nick in txt: self.set_color_state(common.ROOM_STATE_HL) color = 4 except: pass else: highlight_words = config.get('highlight_on', '').split(':') for word in highlight_words: if word.lower() in txt.lower() and word != '': self.set_color_state(common.ROOM_STATE_HL) color = 4 break return color
eb36e08e11e8acac2db6a0422b5c9bd5ec9ab395 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/eb36e08e11e8acac2db6a0422b5c9bd5ec9ab395/room.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 741, 67, 15978, 12, 2890, 16, 6463, 16, 813, 16, 19570, 4672, 3536, 1000, 326, 3246, 2036, 471, 1135, 326, 6463, 2036, 3536, 2036, 273, 599, 309, 486, 813, 471, 19570, 18, 3015, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15978, 12, 2890, 16, 6463, 16, 813, 16, 19570, 4672, 3536, 1000, 326, 3246, 2036, 471, 1135, 326, 6463, 2036, 3536, 2036, 273, 599, 309, 486, 813, 471, 19570, 18, 3015, 2668, ...
host = stripsite(url)[0]
def jsScriptSrc (self, url, language): """Start a background download for <script src=""> tags""" assert self.state[0]=='parse', "non-parse state %s" % self.state ver = get_js_ver(language) if self.base_url: url = urlparse.urljoin(self.base_url, url) else: url = urlparse.urljoin(self.url, url) # unquote and norm url = url_norm(url) self.state = ('wait', url) self.waited = 1 self.js_src = True self.js_client = HttpProxyClient(self.jsScriptData, (url, ver)) host = stripsite(url)[0] headers = get_wc_client_headers(host) # note: some javascript servers do not specify content encoding # so only accept non-encoded content here headers['Accept-Encoding'] = 'identity\r' ClientServerMatchmaker(self.js_client, "GET %s HTTP/1.0" % url_quote(url), # request headers, '', # content mime="application/x-javascript", )
b59797240acc502c65dc2183de8e33ea48f3212d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3948/b59797240acc502c65dc2183de8e33ea48f3212d/HtmlParser.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3828, 3651, 7740, 261, 2890, 16, 880, 16, 2653, 4672, 3536, 1685, 279, 5412, 4224, 364, 411, 4263, 1705, 1546, 6441, 2342, 8395, 1815, 365, 18, 2019, 63, 20, 65, 18920, 2670, 2187, 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, 3828, 3651, 7740, 261, 2890, 16, 880, 16, 2653, 4672, 3536, 1685, 279, 5412, 4224, 364, 411, 4263, 1705, 1546, 6441, 2342, 8395, 1815, 365, 18, 2019, 63, 20, 65, 18920, 2670, 2187, 315, ...
m = ones((n,n),int) a = mask_func(m,k)
m = ones((n,n), int) a = mask_func(m, k)
def mask_indices(n,mask_func,k=0): """ Return the indices to access (n, n) arrays, given a masking function. Assume `mask_func` is a function that, for a square array a of size ``(n, n)`` with a possible offset argument `k`, when called as ``mask_func(a, k)`` returns a new array with zeros in certain locations (functions like `triu` or `tril` do precisely this). Then this function returns the indices where the non-zero values would be located. Parameters ---------- n : int The returned indices will be valid to access arrays of shape (n, n). mask_func : callable A function whose call signature is similar to that of `triu`, `tril`. That is, ``mask_func(x, k)`` returns a boolean array, shaped like `x`. `k` is an optional argument to the function. k : scalar An optional argument which is passed through to `mask_func`. Functions like `triu`, `tril` take a second argument that is interpreted as an offset. Returns ------- indices : tuple of arrays. The `n` arrays of indices corresponding to the locations where ``mask_func(np.ones((n, n)), k)`` is True. See Also -------- triu, tril, triu_indices, tril_indices Notes ----- .. versionadded:: 1.4.0 Examples -------- These are the indices that would allow you to access the upper triangular part of any 3x3 array: >>> iu = np.mask_indices(3, np.triu) For example, if `a` is a 3x3 array: >>> a = np.arange(9).reshape(3, 3) >>> a array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) >>> a[iu] array([0, 1, 2, 4, 5, 8]) An offset can be passed also to the masking function. This gets us the indices starting on the first diagonal right of the main one: >>> iu1 = np.mask_indices(3, np.triu, 1) with which we now extract only three elements: >>> a[iu1] array([1, 2, 5]) """ m = ones((n,n),int) a = mask_func(m,k) return where(a != 0)
4d40dff448b1b368af6752fa8b9a93716db76b3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14925/4d40dff448b1b368af6752fa8b9a93716db76b3f/twodim_base.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3066, 67, 6836, 12, 82, 16, 4455, 67, 644, 16, 79, 33, 20, 4672, 3536, 2000, 326, 4295, 358, 2006, 261, 82, 16, 290, 13, 5352, 16, 864, 279, 3066, 310, 445, 18, 225, 15983, 1375, 4...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3066, 67, 6836, 12, 82, 16, 4455, 67, 644, 16, 79, 33, 20, 4672, 3536, 2000, 326, 4295, 358, 2006, 261, 82, 16, 290, 13, 5352, 16, 864, 279, 3066, 310, 445, 18, 225, 15983, 1375, 4...
return '%s
container_url = self.url(obj.canonical_container) if container_url is None: return None return '%s
def url(self, obj): """ Return the URL for the given object, which can be a C{VariableDoc}, a C{ValueDoc}, or a C{DottedName}. """ if isinstance(obj, ModuleDoc): if obj not in self.docindex.contained_valdocs: return None return '%s-module.html' % obj.canonical_name elif isinstance(obj, ClassDoc): if obj not in self.docindex.contained_valdocs: return None return '%s-class.html' % obj.canonical_name elif isinstance(obj, VariableDoc): val_doc = obj.value if isinstance(val_doc, (ModuleDoc, ClassDoc)): return self.url(val_doc) elif obj.container in (None, UNKNOWN): return self.url(val_doc) else: return '%s#%s' % (self.url(obj.container), obj.name) elif isinstance(obj, ValueDoc): if obj.canonical_container in (None, UNKNOWN): return None # [xx] hmm... else: return '%s#%s' % (self.url(obj.canonical_container), obj.canonical_name[-1]) elif isinstance(obj, DottedName): val_doc = self.docindex.get_valdoc(obj) if val_doc is not None: return self.url(val_doc) else: return None # [xx] hmm... elif obj == 'indices': return 'indices.html' elif obj == 'help': return 'help.html' elif obj == 'trees': return 'trees.html' else: raise ValueError, "Don't know what to do with %r" % obj
2e826daab46d77983d35e6a38ceacf1289828f6b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/2e826daab46d77983d35e6a38ceacf1289828f6b/html.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 880, 12, 2890, 16, 1081, 4672, 3536, 2000, 326, 1976, 364, 326, 864, 733, 16, 1492, 848, 506, 279, 385, 95, 3092, 1759, 5779, 279, 385, 95, 620, 1759, 5779, 578, 279, 385, 95, 10412, ...
cmds = [ '''select _Marker_key, _Refs_key from MRK_Reference %s''', ]
cmds = [ '''select distinct mr._Marker_key, mr._Refs_key from MRK_Reference mr, MRK_Marker m where mr._Marker_key = m._Marker_key and m._Marker_Status_key != 2 %s''', ]
def getKeyClause (self): # Purpose: we override this method to provide information # about how to retrieve data for a single marker or # reference, rather than for all records
a304ff96b61bd107ad5b8e94a8aadb621237abc2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/536/a304ff96b61bd107ad5b8e94a8aadb621237abc2/markerToReferenceGatherer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 7044, 261, 2890, 4672, 468, 14466, 4150, 30, 732, 3849, 333, 707, 358, 5615, 1779, 468, 202, 21071, 3661, 358, 4614, 501, 364, 279, 2202, 5373, 578, 468, 202, 6180, 16, 9178, 2353,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3579, 7044, 261, 2890, 4672, 468, 14466, 4150, 30, 732, 3849, 333, 707, 358, 5615, 1779, 468, 202, 21071, 3661, 358, 4614, 501, 364, 279, 2202, 5373, 578, 468, 202, 6180, 16, 9178, 2353,...
prec = tokens[i-1] mbefore = prec.line == t.line and prec.end == t.col succ = tokens[i+1] mafter = succ.line == t.line and t.end == succ.col
mbefore = t.prec.line == t.line and t.prec.end == t.col mafter = t.succ.line == t.line and t.end == t.succ.col
def check_missing_spaces_around(tokens, lines, warnings): "Check for missing spaces around <, >, =, etc." operators = '<', '>', '&&', '||', '?', '{' for i, t in enumerate(tokens): if t.typ != Token.punct: continue if t.string not in operators and t.string.find('=') == -1: continue prec = tokens[i-1] mbefore = prec.line == t.line and prec.end == t.col succ = tokens[i+1] mafter = succ.line == t.line and t.end == succ.col w = (None, 'Missing space before `%s\' (col %d): %s', 'Missing space after `%s\' (col %d): %s', 'Missing spaces around `%s\' (col %d): %s')[mbefore + 2*mafter] if w: warnings.append((t.line, w % (t.string, t.col, lines[t.line])))
ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6171/ecf9bde6b618739f9ef7098da2a7ad267a2f3d5f/check-coding-style.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 7337, 67, 9554, 67, 12716, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 3315, 7292, 6740, 411, 16, 405, 16, 273, 16, 5527, 1199, 12213, 273, 2368, 2187, 7481, 16, 5183,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 67, 7337, 67, 9554, 67, 12716, 12, 7860, 16, 2362, 16, 5599, 4672, 315, 1564, 364, 3315, 7292, 6740, 411, 16, 405, 16, 273, 16, 5527, 1199, 12213, 273, 2368, 2187, 7481, 16, 5183,...
def build(self): """ """ _modules.append(self)
def build(self): """ """ _modules.append(self)
ac21cc92daef44fc5432499cc95ece6b63810224 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/ac21cc92daef44fc5432499cc95ece6b63810224/distribution.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 4672, 3536, 3536, 389, 6400, 18, 6923, 12, 2890, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1361, 12, 2890, 4672, 3536, 3536, 389, 6400, 18, 6923, 12, 2890, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if output is 'html': return GetStatsTableHtml(params)
if output in ['html', 'xhr']: return GetStatsDataTemplatized(params, 'table') elif output == 'csv': return GetStatsDataTemplatized(params, 'csv')
def GetStats(request, test_set, output='html', opt_tests=None, use_memcache=True): """Returns the stats table. Args: request: a request object. test_set: a TestSet instance. output: Output type html or pickle or else you get a dict of params. opt_tests: list of tests. use_memcache: Use memcache or not. """ logging.info('GetStats for %s' % test_set.category) version_level = request.GET.get('v', 'top') # Check for static mode here to enable other optimizations. override_static_mode = request.GET.get('sc') # sc for skip cache static_mode = False if (test_set.category in settings.STATIC_CATEGORIES and output == 'html' and not override_static_mode): static_mode = True if not static_mode: ua_by_param = request.GET.get('ua') if ua_by_param: user_agent_strings = [ua_by_param] else: user_agent_strings = UserAgentGroup.GetStrings(version_level) #logging.info('GetStats: v: %s, uas: %s' % (version_level, # user_agent_strings)) tests = opt_tests or test_set.tests params_str = None if test_set.default_params: params_str = str(test_set.default_params) # Enables a "static" pickle mode so that we still run the data through # the template processor (enabling us to display a user's test results) # but read the datastore-heavy data part from a static, pickled file. if static_mode: if settings.STATIC_SRC == 'local': pickle_file = ('static_mode/%s_%s.py' % (test_set.category, version_level)) f = open(pickle_file, 'r') stats_data = pickle.load(f) f.close() else: url = ('%s/%s_%s.py' % (settings.STATIC_SRC, test_set.category, version_level)) result = urlfetch.fetch(url) pickled_data = result.content stats_data = pickle.loads(pickled_data) # TODO(elsigh): figure out why my string casts in other spots don't # make this redundant. user_agent_strings = [str(ua) for ua in stats_data.keys()] user_agent_strings.sort(key=str.lower) #logging.info('Pickled stats_data: %s' % stats_data) #logging.info('pickled ua_strings: %s' % user_agent_strings) else: stats_data = GetStatsData(test_set.category, tests, user_agent_strings, params_str, use_memcache, version_level) #logging.info('GetStats got stats_data: %s' % stats_data) # If the output is pickle, we are done and need to return a string. if output == 'pickle': return pickle.dumps(stats_data) # Reset tests now to only be "visible" tests. tests = [test for test in tests if not hasattr(test, 'is_hidden_stat') or not test.is_hidden_stat] # Looks for a category_results=test1=X,test2=X url GET param. results = None results_str = request.GET.get('%s_results' % test_set.category, '') if results_str: results = dict((x['key'], x) for x in test_set.ParseResults(results_str, is_import_or_uri_results_str=True)) # Set current_ua_string to one in user_agent_strings current_ua = UserAgent.factory(request.META['HTTP_USER_AGENT']) current_ua_string = current_ua.pretty() for ua_string in user_agent_strings: if current_ua_string.startswith(ua_string): current_ua_string = ua_string break else: # current_ua_string was not found in user_agent_strings. if results: user_agent_strings.append(str(current_ua_string)) user_agent_strings.sort(key=str.lower) # Adds the current results into the stats_data dict. if results: stats_data.setdefault(current_ua_string, {}) current_results = {} stats_data[current_ua_string]['current_results'] = current_results current_ua_score = 0 medians = dict((test.key, results[test.key]['score']) for test in tests) for test in tests: if test.key in results: median = medians[test.key] score, display = GetScoreAndDisplayValue( test, median, medians, is_uri_result=True) stats_data[current_ua_string]['current_results'][test.key] = { 'median': median, 'score': score, 'display': display, 'expando': results[test.key].get('expando', None), } current_score, current_display = test_set.GetRowScoreAndDisplayValue( current_results) current_score = Convert100to10Base(current_score) stats_data[current_ua_string]['current_score'] = current_score stats_data[current_ua_string]['current_display'] = current_display #logging.info('stats_data now: %s' % stats_data) #logging.info('user_agent_strings: %s' % user_agent_strings) params = { 'category': test_set.category, 'category_name': test_set.category_name, 'tests': tests, 'v': version_level, 'user_agents': user_agent_strings, 'request_path': request.get_full_path(), 'current_user_agent': current_ua_string, 'stats': stats_data, 'params': test_set.default_params, 'results_uri_string': results_str } #logging.info("GetStats got params: %s", str(params)) if output is 'html': return GetStatsTableHtml(params) else: return params
90f0e9b2212f7936175289bedbe6b3ae97c1d849 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5745/90f0e9b2212f7936175289bedbe6b3ae97c1d849/util.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4195, 12, 2293, 16, 1842, 67, 542, 16, 876, 2218, 2620, 2187, 2153, 67, 16341, 33, 7036, 16, 999, 67, 3917, 2493, 33, 5510, 4672, 3536, 1356, 326, 3177, 1014, 18, 6634, 30, 590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 968, 4195, 12, 2293, 16, 1842, 67, 542, 16, 876, 2218, 2620, 2187, 2153, 67, 16341, 33, 7036, 16, 999, 67, 3917, 2493, 33, 5510, 4672, 3536, 1356, 326, 3177, 1014, 18, 6634, 30, 590, ...
if self._py.has_key('refer_blacklist'): bad_list = string.split(self._py['refer_blacklist'],',') for pat in bad_list: if re.search(pat, url): return
def addReferer(self, uri): # process - if uri == '-': return
682b4c34c9e4ad10233c8c07d60353f7247ab1f0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/682b4c34c9e4ad10233c8c07d60353f7247ab1f0/logstats.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 426, 18459, 12, 2890, 16, 2003, 4672, 468, 1207, 300, 309, 2003, 422, 4014, 30, 327, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 527, 426, 18459, 12, 2890, 16, 2003, 4672, 468, 1207, 300, 309, 2003, 422, 4014, 30, 327, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
ui.write("% 6d % 9d % 7d % 6d % 7d %s.. %s.. %s..\n" % (
ui.write("% 6d % 9d % 7d % 6d % 7d %s %s %s\n" % (
def debugindex(ui, file_): """dump the contents of an index file""" r = hg.revlog(hg.opener(""), file_, "") ui.write(" rev offset length base linkrev" + " p1 p2 nodeid\n") for i in range(r.count()): e = r.index[i] ui.write("% 6d % 9d % 7d % 6d % 7d %s.. %s.. %s..\n" % ( i, e[0], e[1], e[2], e[3], hg.hex(e[4][:5]), hg.hex(e[5][:5]), hg.hex(e[6][:5])))
976d739be5cc3e817981a18b19beb0976b308c07 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/976d739be5cc3e817981a18b19beb0976b308c07/commands.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1198, 1615, 12, 4881, 16, 585, 67, 4672, 3536, 8481, 326, 2939, 434, 392, 770, 585, 8395, 436, 273, 22576, 18, 9083, 1330, 12, 26981, 18, 25098, 2932, 6, 3631, 585, 67, 16, 1408, 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, 1198, 1615, 12, 4881, 16, 585, 67, 4672, 3536, 8481, 326, 2939, 434, 392, 770, 585, 8395, 436, 273, 22576, 18, 9083, 1330, 12, 26981, 18, 25098, 2932, 6, 3631, 585, 67, 16, 1408, 13, ...
self.gridEnv = self.am_setOption( "maxPilotWaitingHours", '')
self.gridEnv = self.am_getOption( "GridEnv", '')
def initialize( self ): """ Standard constructor """ self.am_setOption( "PollingTime", 60.0 ) self.am_setOption( "maxPilotWaitingHours", 6 ) # Get the site description dictionary siteName = self.am_getOption('Site','Unknown') if siteName == 'Unknown': siteName = gConfig.getValue('/DIRAC/Site','Unknown') if siteName == 'Unknown': return S_ERROR('Unknown site') self.siteName = siteName self.gridEnv = self.am_setOption( "maxPilotWaitingHours", '') self.genericPilotDN = self.am_getOption('GenericPilotDN','Unknown') self.genericPilotGroup = self.am_getOption('GenericPilotGroup','Unknown') self.pilot = DIRAC_PILOT self.install = DIRAC_INSTALL self.workingDirectory = self.am_getOption('WorkDirectory','') # Flags self.updateStatus = self.am_getOption('UpdatePilotStatus',True) self.getOutput = self.am_getOption('GetPilotOutput',True) self.localhost = socket.getfqdn() self.proxy = '' self.queueDict = {} result = self.getQueues() if not result['OK']: return result return S_OK()
de53db04094ffe536f00b063457d17fbef5ab7b7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/de53db04094ffe536f00b063457d17fbef5ab7b7/SiteDirector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 3536, 8263, 3885, 3536, 365, 18, 301, 67, 542, 1895, 12, 315, 24767, 950, 3113, 4752, 18, 20, 262, 365, 18, 301, 67, 542, 1895, 12, 315, 1896, 52, 22797, 1594...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 12, 365, 262, 30, 3536, 8263, 3885, 3536, 365, 18, 301, 67, 542, 1895, 12, 315, 24767, 950, 3113, 4752, 18, 20, 262, 365, 18, 301, 67, 542, 1895, 12, 315, 1896, 52, 22797, 1594...
self.updateBox(self.curLineNumber+1, str(lineTokens), self.screen, self.infoBox)
def main(self): i = 0 line = ""
543ec7978794ecc1dd38f569f6c58527aae41648 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11578/543ec7978794ecc1dd38f569f6c58527aae41648/repl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 277, 273, 374, 980, 273, 1408, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2774, 12, 2890, 4672, 277, 273, 374, 980, 273, 1408, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
This implements definition 1 (p. 254) from Pager, 1975."""
This implements definition 1 (p. 254) from Pager, 1977."""
def _is_compatible(S, T): """Check whether S and T can be merged.
2c48a1c6bebbb036a285e60452edd2016a613f49 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11302/2c48a1c6bebbb036a285e60452edd2016a613f49/lr1.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 10943, 12, 55, 16, 399, 4672, 3536, 1564, 2856, 348, 471, 399, 848, 506, 5384, 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,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 291, 67, 10943, 12, 55, 16, 399, 4672, 3536, 1564, 2856, 348, 471, 399, 848, 506, 5384, 18, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
trackdir = TrackDir(path) self.subdirs.append(trackdir)
trackdir = TrackDir(dir=path) if trackdir.tracks or trackdir.subdirs: self.subdirs.append(trackdir)
def scan(self): import tools for filename, path in sorted(tools.listDir(self.dir)): #print 'PATH', path if os.path.isdir(path): trackdir = TrackDir(path) self.subdirs.append(trackdir) elif isSupported(filename): track = getTrackFromFile(path) self.tracks.append(track)
a9684175a5a2ca7635eba1411e5103a344ccbb2b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1737/a9684175a5a2ca7635eba1411e5103a344ccbb2b/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 4672, 1930, 8513, 364, 1544, 16, 589, 316, 3115, 12, 6642, 18, 1098, 1621, 12, 2890, 18, 1214, 3719, 30, 468, 1188, 296, 4211, 2187, 589, 309, 1140, 18, 803, 18, 291, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4135, 12, 2890, 4672, 1930, 8513, 364, 1544, 16, 589, 316, 3115, 12, 6642, 18, 1098, 1621, 12, 2890, 18, 1214, 3719, 30, 468, 1188, 296, 4211, 2187, 589, 309, 1140, 18, 803, 18, 291, ...
if a2.molecule != self.selected_chunk:
if a2.molecule != a1.molecule:
def make_bonds(self): "Make bonds between all bondable pairs of singlets" self.bondable_pairs_atoms = [] self.merged_chunks = [] not_bonded = 0 # Bondable pairs not bonded counter
f2621bfb8c8fbaf55c74ea81309b850ca7387098 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11221/f2621bfb8c8fbaf55c74ea81309b850ca7387098/fusechunksMode.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1221, 67, 70, 4096, 12, 2890, 4672, 315, 6464, 15692, 3086, 777, 8427, 429, 5574, 434, 4864, 17307, 6, 225, 365, 18, 26425, 429, 67, 11545, 67, 14937, 273, 5378, 365, 18, 15459, 67, 14...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 70, 4096, 12, 2890, 4672, 315, 6464, 15692, 3086, 777, 8427, 429, 5574, 434, 4864, 17307, 6, 225, 365, 18, 26425, 429, 67, 11545, 67, 14937, 273, 5378, 365, 18, 15459, 67, 14...
self.assert_(grp.getgrgid(e.gr_gid) in entriesbygid[e.gr_gid]) self.assert_(grp.getgrnam(e.gr_name) in entriesbyname[e.gr_name])
e2 = grp.getgrgid(e.gr_gid) self.check_value(e2) self.assert_(max([self.valueseq(e2, x) \ for x in entriesbygid[e.gr_gid]])) e2 = grp.getgrnam(e.gr_name) self.check_value(e2) self.assert_(max([self.valueseq(e2, x) \ for x in entriesbyname[e.gr_name]]))
def test_values(self): entries = grp.getgrall() entriesbyname = {} entriesbygid = {}
ce07c8a9bf67b608c03c91fd7b115922ab25f51c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/ce07c8a9bf67b608c03c91fd7b115922ab25f51c/test_grp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 2372, 12, 2890, 4672, 3222, 273, 14295, 18, 588, 3197, 454, 1435, 3222, 1637, 529, 273, 2618, 3222, 1637, 15780, 273, 2618, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 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, 2372, 12, 2890, 4672, 3222, 273, 14295, 18, 588, 3197, 454, 1435, 3222, 1637, 529, 273, 2618, 3222, 1637, 15780, 273, 2618, 2, -100, -100, -100, -100, -100, -100, -100, -100, -...
env['CXX'] = 'cxx'
env['CXX'] = 'c++'
def generate(env): cppTool.generate(env) if not env.get('CXXVERSION'): try: line = os.popen("/bin/bash -c 'gcc --version 2>&1'").readline() env['CXXVERSION'] = re.compile(r'[^(]*[^)]*\) ([^\n ]*)').findall(line)[0] except: env['CXXVERSION'] = '4.2.1' env['COMPILER'] = 'gcc-' + env['CXXVERSION'] env['CXXFLAGS'] = CLVar('-Wall -fno-strict-aliasing -Woverloaded-virtual -ftemplate-depth-200 -frounding-math') if is64Bit(): env.Append(CPPDEFINES=CLVar('OS_64BIT')) if env['DEBUG']: env.Append(CXXFLAGS=['-g', '-O0']) else: env.Append(CXXFLAGS=['-O3', '-finline-limit=500']) if env['OPENMP']: env.Append(CXXFLAGS=['-fopenmp']) if env['PARALLEL']: env['CXX'] = 'mpicxx' env.Append(CXXFLAGS=['-DFVM_PARALLEL']) #bug fix for mpich env.Append(CXXFLAGS=['-DMPICH_IGNORE_CXX_SEEK']) else: env['CXX'] = 'cxx' env['CCFLAGS'] = env['CXXFLAGS'] env['SHCXXFLAGS'] = CLVar('$CXXFLAGS -fPIC')
1dae15e0d33418629a399dcf9456967c284a9d3f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5963/1dae15e0d33418629a399dcf9456967c284a9d3f/g++.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3283, 84, 6364, 18, 7163, 12, 3074, 13, 225, 309, 486, 1550, 18, 588, 2668, 39, 5619, 5757, 11, 4672, 775, 30, 980, 273, 1140, 18, 84, 3190, 2932, 19, 4757, 19,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2103, 12, 3074, 4672, 3283, 84, 6364, 18, 7163, 12, 3074, 13, 225, 309, 486, 1550, 18, 588, 2668, 39, 5619, 5757, 11, 4672, 775, 30, 980, 273, 1140, 18, 84, 3190, 2932, 19, 4757, 19,...
jobDB = JobDB()
jobDB = JobDB()
def initializeMatcherHandler( serviceInfo ): """ Matcher Service initialization """ global jobDB global jobLoggingDB global taskQueueDB jobDB = JobDB() jobLoggingDB = JobLoggingDB() taskQueueDB = TaskQueueDB() gMonitor.registerActivity( 'matchTime', "Job matching time", 'Matching', "secs" ,gMonitor.OP_MEAN, 300 ) gMonitor.registerActivity( 'matchTaskQueues', "Task queues checked per job", 'Matching', "task queues" ,gMonitor.OP_MEAN, 300 ) gMonitor.registerActivity( 'matchesDone', "Job Matches", 'Matching', "matches" ,gMonitor.OP_MEAN, 300 ) gMonitor.registerActivity( 'numTQs', "Number of Task Queues", 'Matching', "tqsk queues" ,gMonitor.OP_MEAN, 300 ) taskQueueDB.recalculateTQSharesForAll() gThreadScheduler.addPeriodicTask( 120, taskQueueDB.recalculateTQSharesForAll ) gThreadScheduler.addPeriodicTask( 120, sendNumTaskQueues ) sendNumTaskQueues() return S_OK()
059c4744ef6766e0575a5cd4d6f09d892a66a7df /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/059c4744ef6766e0575a5cd4d6f09d892a66a7df/MatcherHandler.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 6286, 1503, 12, 1156, 966, 262, 30, 3536, 225, 9757, 1956, 10313, 3536, 225, 2552, 1719, 2290, 2552, 1719, 7735, 2290, 2552, 1562, 3183, 2290, 225, 1719, 2290, 273, 3956, 2290, 1435,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4046, 6286, 1503, 12, 1156, 966, 262, 30, 3536, 225, 9757, 1956, 10313, 3536, 225, 2552, 1719, 2290, 2552, 1719, 7735, 2290, 2552, 1562, 3183, 2290, 225, 1719, 2290, 273, 3956, 2290, 1435,...
EXAMPLE: sage: G2 = WeylCharacterRing(['G',2]) sage: [fw1,fw2] = G2.lattice().fundamental_weights() sage: 2*G2(2*fw1+fw2) 2*G2(4,-1,-3) sage: 2*G2(4,-1,-3) 2*G2(4,-1,-3) sage: G2(4,-1,-3).degree() 189
EXAMPLES: sage: G2 = WeylCharacterRing(['G',2]) sage: [fw1,fw2] = G2.lattice().fundamental_weights() sage: 2*G2(2*fw1+fw2) 2*G2(4,-1,-3) sage: 2*G2(4,-1,-3) 2*G2(4,-1,-3) sage: G2(4,-1,-3).degree() 189
def parent(self): return self._parent
585641b32ec9003014ab40e39d632a05e840e883 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/585641b32ec9003014ab40e39d632a05e840e883/weyl_characters.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 982, 12, 2890, 4672, 327, 365, 6315, 2938, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 982, 12, 2890, 4672, 327, 365, 6315, 2938, 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...
if (original, percent) in translation.formatted: translated = translation.formatted[(original, percent)]
key = (original, percent) if key in translation.formatted: translated = translation.formatted[key] if translated is None: logging.error("i18n: formatting a %r text that is already being formatted: %r" % (lang, original)) translated = original + u'*'
def getText(original, request, lang, **kw): """ Return a translation of some original text. @param original: the original (english) text @param request: the request object @lang: the target language for the translation @keyword formatted: True to use the wiki parser/formatter on the translation result, False to return the translation result "as is" @keyword percent: True if we need special escaping because we use the translation result as the left side of a % operator: e.g. % chars need to become %% for that usage. This will only escape generated % chars, e.g. in wiki links to non-ascii pagenames (%XX%XX%XX). False, if we don't use it as a left-side of % operator. Only specify this option for formatted==True, it doesn't do anything for formatted==False. """ formatted = kw.get('formatted', True) # TODO: change to False, review all _() calls percent = kw.get('percent', False) # TODO: review all _() calls if original == u"": return u"" # we don't want to get *.po files metadata! global translations if not lang in translations: # load translation if needed t = Translation(lang) t.loadLanguage(request) translations[lang] = t # get the matching entry in the mapping table translated = original translation = translations[lang] if original in translation.raw: translated = translation.raw[original] if formatted: if (original, percent) in translation.formatted: translated = translation.formatted[(original, percent)] else: translated = translation.formatMarkup(request, translated, percent) translation.formatted[(original, percent)] = translated # remember it else: try: language = languages[lang]['x-language-in-english'] dictpagename = "%sDict" % language dicts = request.dicts if dicts.has_dict(dictpagename): userdict = dicts.dict(dictpagename) translated = userdict[original] else: raise KeyError except KeyError: # do not simply return trans with str, but recursively call # to get english translation, maybe formatted. # if we don't find an english "translation", we just format it # on the fly (this is needed for cfg.editor_quickhelp). if lang != 'en': logging.debug("i18n: fallback to english, requested string not in %r translation: %r" % (lang, original)) translated = getText(original, request, 'en', formatted=formatted, percent=percent) elif formatted: translated = translations[lang].formatMarkup(request, original, percent) return translated
db4dc04b40aec35034bab0376d543edbfb347f22 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/db4dc04b40aec35034bab0376d543edbfb347f22/__init__.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6701, 12, 8830, 16, 590, 16, 3303, 16, 2826, 9987, 4672, 3536, 2000, 279, 4794, 434, 2690, 2282, 977, 18, 225, 632, 891, 2282, 30, 326, 2282, 261, 275, 13740, 13, 977, 632, 891, 590, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 6701, 12, 8830, 16, 590, 16, 3303, 16, 2826, 9987, 4672, 3536, 2000, 279, 4794, 434, 2690, 2282, 977, 18, 225, 632, 891, 2282, 30, 326, 2282, 261, 275, 13740, 13, 977, 632, 891, 590, ...
for trip in trips_info: if trip['startdate'] < photos['startdate'] and trip['finishdate'] > photos['finishdate']:
for trip in trips_info['trip']: if trip['startdate'] < photoset['photoset']['startdate'] \ and trip['finishdate'] > photoset['photoset']['startdate']:
def get(self, set_id): logging.debug("Set page") session = get_session()
5f421934a354bf9e0ca638a842eaf6d1af4965ad /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11110/5f421934a354bf9e0ca638a842eaf6d1af4965ad/main.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 444, 67, 350, 4672, 2907, 18, 4148, 2932, 694, 1363, 7923, 1339, 273, 336, 67, 3184, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 12, 2890, 16, 444, 67, 350, 4672, 2907, 18, 4148, 2932, 694, 1363, 7923, 1339, 273, 336, 67, 3184, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
print "Cluster: %s {"%ce.get('GlueClusterName','Unknown')
print "Cluster: %s {" % ce.get( 'GlueClusterName', 'Unknown' )
def usage(): Script.showHelp() DIRAC.exit(2)
40957c9469f95df287fecb405ef9863b11a43afd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/40957c9469f95df287fecb405ef9863b11a43afd/dirac-admin-bdii-cluster.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4084, 13332, 7739, 18, 4500, 6696, 1435, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 4084, 13332, 7739, 18, 4500, 6696, 1435, 18544, 2226, 18, 8593, 12, 22, 13, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
self.includes = ['miro.compiled_templates']
self.includes.add('miro.compiled_templates')
def setup_distribution(self): self.distribution.app = ['Miro.py'] self.distribution.ext_modules = list() self.distribution.ext_modules.append(self.get_idletime_ext()) self.distribution.ext_modules.append(self.get_keychain_ext()) self.distribution.ext_modules.append(self.get_qtcomp_ext()) self.distribution.ext_modules.append(self.get_database_ext()) self.distribution.ext_modules.append(self.get_sorts_ext()) self.distribution.ext_modules.append(self.get_fasttypes_ext()) self.distribution.ext_modules.append(self.get_libtorrent_ext())
203e6f9b6b2e8e7890c640ecb7d4e1260c3447a5 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/203e6f9b6b2e8e7890c640ecb7d4e1260c3447a5/setup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 16279, 12, 2890, 4672, 365, 18, 16279, 18, 2910, 273, 10228, 49, 11373, 18, 2074, 3546, 365, 18, 16279, 18, 408, 67, 6400, 273, 666, 1435, 365, 18, 16279, 18, 408, 67, 6400, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 16279, 12, 2890, 4672, 365, 18, 16279, 18, 2910, 273, 10228, 49, 11373, 18, 2074, 3546, 365, 18, 16279, 18, 408, 67, 6400, 273, 666, 1435, 365, 18, 16279, 18, 408, 67, 6400, ...
svcArgs = string.join(args[1:])
svcArgs = " ".join(args[1:])
def HandleCommandLine(cls, serviceClassString = None, argv = None, customInstallOptions = "", customOptionHandler = None): """Utility function allowing services to process the command line. Allows standard commands such as 'start', 'stop', 'debug', 'install' etc. Install supports 'standard' command line options prefixed with '--', such as --username, --password, etc. In addition, the function allows custom command line options to be handled by the calling function. """ err = 0 if argv is None: argv = sys.argv if len(argv)<=1: usage() serviceName = cls._svc_name_ serviceDisplayName = cls._svc_display_name_ if serviceClassString is None: serviceClassString = GetServiceClassString(cls) # Pull apart the command line import getopt try: opts, args = getopt.getopt(argv[1:], customInstallOptions,["password=","username=","startup=","perfmonini=", "perfmondll=", "interactive", "wait="]) except getopt.error, details: print details usage() userName = None password = None perfMonIni = perfMonDll = None startup = None interactive = None waitSecs = 0 for opt, val in opts: if opt=='--username': userName = val elif opt=='--password': password = val elif opt=='--perfmonini': perfMonIni = val elif opt=='--perfmondll': perfMonDll = val elif opt=='--interactive': interactive = 1 elif opt=='--startup': map = {"manual": win32service.SERVICE_DEMAND_START, "auto" : win32service.SERVICE_AUTO_START, "disabled": win32service.SERVICE_DISABLED} try: startup = map[string.lower(val)] except KeyError: print "'%s' is not a valid startup option" % val elif opt=='--wait': try: waitSecs = int(val) except ValueError: print "--wait must specify an integer number of seconds." usage() arg=args[0] knownArg = 0 # First we process all arguments which pass additional args on if arg=="start": knownArg = 1 print "Starting service %s" % (serviceName) try: StartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) except win32service.error, exc: print "Error starting service: %s" % exc.strerror elif arg=="restart": knownArg = 1 print "Restarting service %s" % (serviceName) RestartService(serviceName, args[1:]) if waitSecs: WaitForServiceStatus(serviceName, win32service.SERVICE_RUNNING, waitSecs) elif arg=="debug": knownArg = 1 if not hasattr(sys, "frozen"): # non-frozen services use pythonservice.exe which handles a # -debug option svcArgs = string.join(args[1:]) try: exeName = LocateSpecificServiceExe(serviceName) except win32api.error, exc: if exc[0] == winerror.ERROR_FILE_NOT_FOUND: print "The service does not appear to be installed." print "Please install the service before debugging it." sys.exit(1) raise try: os.system("%s -debug %s %s" % (exeName, serviceName, svcArgs)) # ^C is used to kill the debug service. Sometimes Python also gets # interrupted - ignore it... except KeyboardInterrupt: pass else: # py2exe services don't use pythonservice - so we simulate # debugging here. DebugService(cls, args) if not knownArg and len(args)!=1: usage() # the rest of the cmds don't take addn args if arg=="install": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description = cls._svc_description_ except AttributeError: description = None print "Installing service %s" % (serviceName,) # Note that we install the service before calling the custom option # handler, so if the custom handler fails, we have an installed service (from NT's POV) # but is unlikely to work, as the Python code controlling it failed. Therefore # we remove the service if the first bit works, but the second doesnt! try: InstallService(serviceClassString, serviceName, serviceDisplayName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service installed" except win32service.error, exc: if exc.winerror==winerror.ERROR_SERVICE_EXISTS: arg = "update" # Fall through to the "update" param! else: print "Error installing service: %s (%d)" % (exc.strerror, exc.winerror) err = hr except ValueError, msg: # Can be raised by custom option handler. print "Error installing service: %s" % str(msg) err = -1 # xxx - maybe I should remove after _any_ failed install - however, # xxx - it may be useful to help debug to leave the service as it failed. # xxx - We really _must_ remove as per the comments above... # As we failed here, remove the service, so the next installation # attempt works. try: RemoveService(serviceName) except win32api.error: print "Warning - could not remove the partially installed service." if arg == "update": knownArg = 1 try: serviceDeps = cls._svc_deps_ except AttributeError: serviceDeps = None try: exeName = cls._exe_name_ except AttributeError: exeName = None # Default to PythonService.exe try: exeArgs = cls._exe_args_ except AttributeError: exeArgs = None try: description=cls._svc_description_ except AttributeError: description=None print "Changing service configuration" try: ChangeServiceConfig(serviceClassString, serviceName, serviceDeps = serviceDeps, startType=startup, bRunInteractive=interactive, userName=userName,password=password, exeName=exeName, displayName = serviceDisplayName, perfMonIni=perfMonIni,perfMonDll=perfMonDll,exeArgs=exeArgs,description=description) if customOptionHandler: customOptionHandler(*(opts,)) print "Service updated" except win32service.error, exc: print "Error changing service configuration: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="remove": knownArg = 1 print "Removing service %s" % (serviceName) try: RemoveService(serviceName) print "Service removed" except win32service.error, exc: print "Error removing service: %s (%d)" % (exc.strerror,exc.winerror) err = hr elif arg=="stop": knownArg = 1 print "Stopping service %s" % (serviceName) try: if waitSecs: StopServiceWithDeps(serviceName, waitSecs = waitSecs) else: StopService(serviceName) except win32service.error, exc: print "Error stopping service: %s (%d)" % (exc.strerror,exc.winerror) err = hr if not knownArg: err = -1 print "Unknown command - '%s'" % arg usage() return err
fbd8d4fd61408af6605030a3bee01f3edf61da43 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/992/fbd8d4fd61408af6605030a3bee01f3edf61da43/win32serviceutil.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5004, 21391, 12, 6429, 16, 1156, 797, 780, 273, 599, 16, 5261, 273, 599, 16, 1679, 6410, 1320, 273, 23453, 1679, 1895, 1503, 273, 599, 4672, 3536, 6497, 445, 15632, 4028, 358, 1207, 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, 5004, 21391, 12, 6429, 16, 1156, 797, 780, 273, 599, 16, 5261, 273, 599, 16, 1679, 6410, 1320, 273, 23453, 1679, 1895, 1503, 273, 599, 4672, 3536, 6497, 445, 15632, 4028, 358, 1207, 326,...
return self.__get(relative=remote,
return self.__get(url=basepath, relative=remote,
def getPackage(self, package, checkfunc = None, text = None, cache = True): remote = package.returnSimple('relativepath') local = package.localPkg() return self.__get(relative=remote, local=local, checkfunc=checkfunc, text=text, cache=cache )
9343f0430b72553f3fe0dea2ea3293acf06d6981 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/9343f0430b72553f3fe0dea2ea3293acf06d6981/yumRepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11506, 12, 2890, 16, 2181, 16, 866, 644, 273, 599, 16, 977, 273, 599, 16, 1247, 273, 1053, 4672, 2632, 273, 2181, 18, 2463, 5784, 2668, 11626, 803, 6134, 1191, 273, 2181, 18, 3729, 112...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 11506, 12, 2890, 16, 2181, 16, 866, 644, 273, 599, 16, 977, 273, 599, 16, 1247, 273, 1053, 4672, 2632, 273, 2181, 18, 2463, 5784, 2668, 11626, 803, 6134, 1191, 273, 2181, 18, 3729, 112...
self.debian_patch()
def __call__(self): import tempfile self.dir = tempfile.mkdtemp(prefix = 'genorig', dir = 'debian') try: self.upstream_extract() self.upstream_patch() self.debian_patch() self.tar() finally: shutil.rmtree(self.dir)
9cda81e415fe8c5163c945db8447651a4ce7009b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5794/9cda81e415fe8c5163c945db8447651a4ce7009b/genorig.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1930, 13275, 365, 18, 1214, 273, 13275, 18, 24816, 72, 5814, 12, 3239, 273, 296, 4507, 4949, 2187, 1577, 273, 296, 31888, 2779, 6134, 775, 30, 365, 18, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1991, 972, 12, 2890, 4672, 1930, 13275, 365, 18, 1214, 273, 13275, 18, 24816, 72, 5814, 12, 3239, 273, 296, 4507, 4949, 2187, 1577, 273, 296, 31888, 2779, 6134, 775, 30, 365, 18, ...
"h0": "real_4",
def set_time_geocent(self, gps): self.time_geocent_gps, self.time_geocent_gps_ns = gps.seconds, gps.nanoseconds
1e417875df599164387b80881718193afca10a11 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3589/1e417875df599164387b80881718193afca10a11/lsctables.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 957, 67, 908, 504, 319, 12, 2890, 16, 20985, 4672, 365, 18, 957, 67, 908, 504, 319, 67, 75, 1121, 16, 365, 18, 957, 67, 908, 504, 319, 67, 75, 1121, 67, 2387, 273, 20985, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 444, 67, 957, 67, 908, 504, 319, 12, 2890, 16, 20985, 4672, 365, 18, 957, 67, 908, 504, 319, 67, 75, 1121, 16, 365, 18, 957, 67, 908, 504, 319, 67, 75, 1121, 67, 2387, 273, 20985, ...
from paste.tests.fixture import setup_module
from paste.fixture import setup_module
def setup_module(module=None): """ This is used by py.test if it is in the module, so you can import this directly. Use like:: from paste.tests.fixture import setup_module """ if module is None: # The module we were called from must be the module... module = sys._getframe().f_back.f_globals['__name__'] if isinstance(module, (str, unicode)): module = sys.modules[module] if hasattr(module, 'reset_state'): module.reset_state()
3710eb7974cf55018257a613314ece658784d79d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11400/3710eb7974cf55018257a613314ece658784d79d/fixture.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2978, 12, 2978, 33, 7036, 4672, 3536, 1220, 353, 1399, 635, 2395, 18, 3813, 309, 518, 353, 316, 326, 1605, 16, 1427, 1846, 848, 1930, 333, 5122, 18, 225, 2672, 3007, 2866, 22...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 67, 2978, 12, 2978, 33, 7036, 4672, 3536, 1220, 353, 1399, 635, 2395, 18, 3813, 309, 518, 353, 316, 326, 1605, 16, 1427, 1846, 848, 1930, 333, 5122, 18, 225, 2672, 3007, 2866, 22...
if 'registration' in self.getprops(force): return self.getprops()['registration']
if self.registration(): return long(self.registration().strftime('%Y%m%d%H%M%S')) else: return 0 def registration(self, force=False): """ Return registration date for this user as a pywikibot.Timestamp object, or None if the date is unknown. @param force: if True, forces reloading the data from API @type force: bool """ reg = self.getprops(force).get('registration') if reg: return pywikibot.Timestamp.fromISOformat(reg)
def registrationTime(self, force=False): """ Return registration time for this user, as a Unicode string in ISO8601 format, or None if the date is unknown.
7e07f8a9fa71ca906e1d8e565fb6fdb99e4b4cf6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9005/7e07f8a9fa71ca906e1d8e565fb6fdb99e4b4cf6/page.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7914, 950, 12, 2890, 16, 2944, 33, 8381, 4672, 3536, 2000, 7914, 813, 364, 333, 729, 16, 487, 279, 9633, 533, 316, 9351, 14181, 740, 16, 578, 599, 309, 326, 1509, 353, 5917, 18, 2, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 7914, 950, 12, 2890, 16, 2944, 33, 8381, 4672, 3536, 2000, 7914, 813, 364, 333, 729, 16, 487, 279, 9633, 533, 316, 9351, 14181, 740, 16, 578, 599, 309, 326, 1509, 353, 5917, 18, 2, -...
if j.application.atlas_release[:2] >= "13": j.application.extraArgs=' digiSeedOffset1=%s digiSeedOffset2=%s ' % (random.randint(1,2**15),random.randint(1,2**15))
if j.application.atlas_release[:2] >= "13" and not "digiSeedOffset" in j.application.extraArgs: j.application.extraArgs += ' digiSeedOffset1=%s digiSeedOffset2=%s ' % (random.randint(1,2**15),random.randint(1,2**15))
def getJobsForPartitions(self, partitions): jl = super(SimulTransform, self).getJobsForPartitions(partitions) for j in jl: if j.application.atlas_release[:2] >= "13": j.application.extraArgs=' digiSeedOffset1=%s digiSeedOffset2=%s ' % (random.randint(1,2**15),random.randint(1,2**15)) return jl
14fda46f35adcef0c29a2de83945923242470ded /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1488/14fda46f35adcef0c29a2de83945923242470ded/MCTransforms.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 7276, 1290, 13738, 12, 2890, 16, 10060, 4672, 525, 80, 273, 2240, 12, 7993, 332, 4059, 16, 365, 2934, 588, 7276, 1290, 13738, 12, 21275, 13, 364, 525, 316, 525, 80, 30, 309, 525, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7276, 1290, 13738, 12, 2890, 16, 10060, 4672, 525, 80, 273, 2240, 12, 7993, 332, 4059, 16, 365, 2934, 588, 7276, 1290, 13738, 12, 21275, 13, 364, 525, 316, 525, 80, 30, 309, 525, ...
defaults = StackedObjectProxy(default=dict(charset=None, errors='strict',
defaults = StackedObjectProxy(default=dict(charset=None, errors='replace',
def __repr__(self): return '<Proxy for WSGI environ %r key>' % self.key
b48669fbd0156ee8fed46262bb6406d885ad0568 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11400/b48669fbd0156ee8fed46262bb6406d885ad0568/wsgiwrappers.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 12715, 972, 12, 2890, 4672, 327, 2368, 3886, 364, 7649, 13797, 5473, 738, 86, 498, 1870, 738, 365, 18, 856, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 12715, 972, 12, 2890, 4672, 327, 2368, 3886, 364, 7649, 13797, 5473, 738, 86, 498, 1870, 738, 365, 18, 856, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
session.exchange_unbind(exchange='myXml', queue='q1', binding_key='x') except qpid.session.SessionException, e: if (530 == e.args[0].error_code): self.fail("ACL should allow exchange unbind request for exchange='myXml', queue='q1', binding_key='x'");
session.exchange_unbind(exchange='myEx', queue='q1', binding_key='x') except qpid.session.SessionException, e: if (530 == e.args[0].error_code): self.fail("ACL should allow exchange unbind request for exchange='myEx', queue='q1', binding_key='x'"); try: session.exchange_unbind(exchange='myEx', queue='q2', binding_key='rk1') except qpid.session.SessionException, e: if (530 == e.args[0].error_code): self.fail("ACL should allow exchange unbind request for exchange='myEx', queue='q2', binding_key='rk1'");
def test_exchange_acl(self): """ Test various modes for exchange acl """ aclf = ACLFile() aclf.write('acl deny bob@QPID create exchange name=testEx durable=true passive=true\n') aclf.write('acl deny bob@QPID create exchange name=ex1 type=direct\n') aclf.write('acl deny bob@QPID access exchange name=myEx\n') aclf.write('acl deny bob@QPID bind exchange name=myEx queuename=q1 routingkey=rk1\n') aclf.write('acl deny bob@QPID unbind exchange name=myEx queuename=q1 routingkey=rk1\n') aclf.write('acl deny bob@QPID delete exchange name=myEx\n') aclf.write('acl allow all all') aclf.close() self.reload_acl() session = self.get_session('bob','bob') try: session.exchange_declare(exchange='testEx', durable='true', passive='true') self.fail("ACL should deny exchange create request with name=testEx durable=true passive=true"); except qpid.session.SessionException, e: self.assertEqual(530,e.args[0].error_code) session = self.get_session('bob','bob') try: session.exchange_declare(exchange='ex1', type='direct') self.fail("ACL should deny exchange create request with name=ex1 type=direct"); except qpid.session.SessionException, e: self.assertEqual(530,e.args[0].error_code) session = self.get_session('bob','bob') try: session.exchange_declare(exchange='myXml', type='direct') session.queue_declare(queue='q1') except qpid.session.SessionException, e: if (530 == e.args[0].error_code): self.fail("ACL should allow exchange create request for myXml with any parameter");
45a65deb5c6f5ed4b18891b623102d9061fa1213 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/198/45a65deb5c6f5ed4b18891b623102d9061fa1213/acl.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 16641, 67, 10150, 12, 2890, 4672, 3536, 7766, 11191, 12382, 364, 7829, 7895, 3536, 7895, 74, 273, 10098, 812, 1435, 7895, 74, 18, 2626, 2668, 10150, 17096, 800, 70, 36, 53, 165...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16641, 67, 10150, 12, 2890, 4672, 3536, 7766, 11191, 12382, 364, 7829, 7895, 3536, 7895, 74, 273, 10098, 812, 1435, 7895, 74, 18, 2626, 2668, 10150, 17096, 800, 70, 36, 53, 165...
statusline = resp.splitlines()[0].split(" ",2) if statusline[0] not in ("HTTP/1.0","HTTP/1.1"): self.close() raise GeneralProxyError((1,_generalerrors[1]))
statusline = resp.splitlines()[0].split(" ", 2) if statusline[0] not in ("HTTP/1.0", "HTTP/1.1"): self.close() raise GeneralProxyError((1, _generalerrors[1]))
def __negotiatehttp(self,destaddr,destport): """__negotiatehttp(self,destaddr,destport) Negotiates a connection through an HTTP server. """ # If we need to resolve locally, we do this now if self.__proxy[3] == False: addr = socket.gethostbyname(destaddr) else: addr = destaddr self.sendall("CONNECT " + addr + ":" + str(destport) + " HTTP/1.1\r\n" + "Host: " + destaddr + "\r\n\r\n") # We read the response until we get the string "\r\n\r\n" resp = self.recv(1) while resp.find("\r\n\r\n")==-1: resp = resp + self.recv(1) # We just need the first line to check if the connection # was successful statusline = resp.splitlines()[0].split(" ",2) if statusline[0] not in ("HTTP/1.0","HTTP/1.1"): self.close() raise GeneralProxyError((1,_generalerrors[1])) try: statuscode = int(statusline[1]) except ValueError: self.close() raise GeneralProxyError((1,_generalerrors[1])) if statuscode != 200: self.close() raise HTTPError((statuscode,statusline[2])) self.__proxysockname = ("0.0.0.0",0) self.__proxypeername = (addr,destport)
9c2eaf1c9f74544afe20a86fa591d97eeaa8921c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13138/9c2eaf1c9f74544afe20a86fa591d97eeaa8921c/socks.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 16020, 279, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 4672, 3536, 972, 14518, 352, 3840, 2505, 12, 2890, 16, 10488, 4793, 16, 10488, 655, 13, 423, 27445, 16020, 279, 1...
/// \\brief Constructor.
/// \\\\brief Constructor.
def class_member_functions(self): result = [] index = 1 for p in self.parameters(): result.append(member_function(str(p), index)) index = index + 1 return result
d079e6d28e77fd0f0202558e8995a3f6507dcb7f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/1522/d079e6d28e77fd0f0202558e8995a3f6507dcb7f/mcrl2_classes.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 667, 67, 5990, 67, 10722, 12, 2890, 4672, 563, 273, 5378, 770, 273, 404, 364, 293, 316, 365, 18, 3977, 13332, 563, 18, 6923, 12, 5990, 67, 915, 12, 701, 12, 84, 3631, 770, 3719, 770,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 667, 67, 5990, 67, 10722, 12, 2890, 4672, 563, 273, 5378, 770, 273, 404, 364, 293, 316, 365, 18, 3977, 13332, 563, 18, 6923, 12, 5990, 67, 915, 12, 701, 12, 84, 3631, 770, 3719, 770,...
if self.needResample(wavelen, wavelen_min, wavelen_max, wavelen_step):
if self.needResample(wavelen=wavelen, wavelen_min=wavelen_min, wavelen_max=wavelen_max, wavelen_step=wavelen_step):
def writeSED(self, filename, print_header=None, print_fnu=False, wavelen_min=None, wavelen_max=None, wavelen_step=None): """Write SED (wavelen, flambda, optional fnu) out to file. Option of adding a header line (such as version info) to output file. Does not alter self, regardless of grid or presence/absence of fnu""" # This can be useful for debugging or recording an SED. f = open(filename, 'w') wavelen = self.wavelen flambda = self.flambda # See if need to regrid data (if regrid, new memory copy). if self.needResample(wavelen, wavelen_min, wavelen_max, wavelen_step): wavelen, flambda = self.resampleSED(wavelen, flambda, wavelen_min, wavelen_max, wavelen_step) # Then just use this gridded wavelen/flambda to calculate fnu. # Print header. if print_header != None: print >>f, "#", print_header # Print standard header info. if print_fnu: wavelen, fnu = self.flambdaTofnu(wavelen, flambda, wavelen_min, wavelen_max, wavelen_step) print >>f, "# Wavelength(nm) Flambda(ergs/cm^s/s/nm) Fnu(Jansky)" else: print >>f, "# Wavelength(nm) Flambda(ergs/cm^s/s/nm)" for i in range(0, len(wavelen), 1): if print_fnu: print >> f, self.wavelen[i], self.flambda[i], self.fnu[i] else: #print >> f, self.wavelen[i], self.flambda[i] print >> f "%.2f %.7g" %(self.wavelen[i], self.flambda[i]) # Done writing, close file. f.close() return
891a786375901d734d3598820c476bc62ff95fb2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/91/891a786375901d734d3598820c476bc62ff95fb2/Sed.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1045, 18204, 12, 2890, 16, 1544, 16, 1172, 67, 3374, 33, 7036, 16, 1172, 67, 4293, 89, 33, 8381, 16, 341, 7882, 275, 67, 1154, 33, 7036, 16, 341, 7882, 275, 67, 1896, 33, 7036, 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, 1045, 18204, 12, 2890, 16, 1544, 16, 1172, 67, 3374, 33, 7036, 16, 1172, 67, 4293, 89, 33, 8381, 16, 341, 7882, 275, 67, 1154, 33, 7036, 16, 341, 7882, 275, 67, 1896, 33, 7036, 16, ...
elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable
def SdkLocatePython(force_use_sys_executable = False): if (PkgSkip("PYTHON")==0): if (sys.platform == "win32" and not force_use_sys_executable): SDK["PYTHON"] = "thirdparty/win-python" if (GetOptimize() <= 2): SDK["PYTHON"] += "-dbg" if (platform.architecture()[0] == "64bit" and os.path.isdir(SDK["PYTHON"] + "-x64")): SDK["PYTHON"] += "-x64" SDK["PYTHONEXEC"] = SDK["PYTHON"] + "/python" if (GetOptimize() <= 2): SDK["PYTHONEXEC"] += "_d.exe" else: SDK["PYTHONEXEC"] += ".exe" if (not os.path.isfile(SDK["PYTHONEXEC"])): exit("Could not find %s!" % SDK["PYTHONEXEC"]) os.system(SDK["PYTHONEXEC"].replace("/", "\\") + " -V > "+OUTPUTDIR+"/tmp/pythonversion 2>&1") pv=ReadFile(OUTPUTDIR+"/tmp/pythonversion") if (pv.startswith("Python ")==0): exit("python -V did not produce the expected output") pv = pv[7:10] SDK["PYTHONVERSION"]="python"+pv elif (sys.platform == "win32"): SDK["PYTHON"] = os.path.dirname(sysconfig.get_python_inc()) SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable elif (sys.platform == "darwin"): SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHON"] = sysconfig.get_python_inc() SDK["PYTHONVERSION"] = "python" + sysconfig.get_python_version() SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable)) elif (sys.platform == "darwin"): SDK["PYTHONEXEC"] = sys.executable else: SDK["PYTHONEXEC"] = os.path.join(os.path.dirname(sys.executable), os.readlink(sys.executable))
2af783dc286e912ed77b5320b3e0e1b147ac4521 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8543/2af783dc286e912ed77b5320b3e0e1b147ac4521/makepandacore.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 15774, 12, 5734, 67, 1202, 67, 9499, 67, 17751, 273, 1083, 4672, 309, 261, 11264, 6368, 2932, 16235, 20131, 7923, 631, 20, 4672, 309, 261, 9499, 18, 9898, 422, 315, 8082...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3426, 1333, 340, 15774, 12, 5734, 67, 1202, 67, 9499, 67, 17751, 273, 1083, 4672, 309, 261, 11264, 6368, 2932, 16235, 20131, 7923, 631, 20, 4672, 309, 261, 9499, 18, 9898, 422, 315, 8082...
__redirect_stream(1, self.stdout) __redirect_stream(2, self.stderr)
_redirect_stream(1, self.stdout) _redirect_stream(2, self.stderr)
def redirect_output(self): if self.stdprint: if self.subdir: tag = os.path.basename(self.subdir) __redirect_stream_tee(1, self.stdout, tag) __redirect_stream_tee(2, self.stderr, tag) else: __redirect_stream(1, self.stdout) __redirect_stream(2, self.stderr)
c003b92241dd560e0d13bfeb5a557e18ea6191ee /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12268/c003b92241dd560e0d13bfeb5a557e18ea6191ee/subcommand.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3136, 67, 2844, 12, 2890, 4672, 309, 365, 18, 5084, 1188, 30, 309, 365, 18, 1717, 1214, 30, 1047, 273, 1140, 18, 803, 18, 13909, 12, 2890, 18, 1717, 1214, 13, 1001, 7590, 67, 3256, 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, 3136, 67, 2844, 12, 2890, 4672, 309, 365, 18, 5084, 1188, 30, 309, 365, 18, 1717, 1214, 30, 1047, 273, 1140, 18, 803, 18, 13909, 12, 2890, 18, 1717, 1214, 13, 1001, 7590, 67, 3256, 6...
res['nextproduction'] = int(res['amount'] + res['nextproduction'] -
res['nextproduction'] = int(res['nextproduction'] -
def resourcereport(self): report = [] if self.resources: mlist = self.resources.manifestlist(['people','id','quatloos']) for resource in mlist: res = {} res['name'] = resource res['amount'] = mlist[resource] res['nextproduction'] = self.nextproduction(resource,self.resources.people) res['nextproduction'] = int(res['amount'] + res['nextproduction'] - self.resources.people) if res['nextproduction'] < 0: res['negative'] = 1 else: res['negative'] = 0 report.append(res) return report
2cc617eff586864d6dc7d8d3b0d8dca2c4db5e75 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2020/2cc617eff586864d6dc7d8d3b0d8dca2c4db5e75/models.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31174, 822, 655, 12, 2890, 4672, 2605, 273, 5378, 309, 365, 18, 4683, 30, 312, 1098, 273, 365, 18, 4683, 18, 14357, 1098, 12, 3292, 28035, 17023, 350, 17023, 372, 270, 383, 538, 19486, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 31174, 822, 655, 12, 2890, 4672, 2605, 273, 5378, 309, 365, 18, 4683, 30, 312, 1098, 273, 365, 18, 4683, 18, 14357, 1098, 12, 3292, 28035, 17023, 350, 17023, 372, 270, 383, 538, 19486, ...
('sortbyartist', None, _('By') + ' ' + _('Artist'), None, None, self.on_sort_by_artist), ('sortbyalbum', None, _('By') + ' ' + _('Album'), None, None, self.on_sort_by_album), ('sortbytitle', None, _('By') + ' ' + _('Song Title'), None, None, self.on_sort_by_title), ('sortbyfile', None, _('By') + ' ' + _('File Name'), None, None, self.on_sort_by_file),
('sortbyartist', None, _('By Artist'), None, None, self.on_sort_by_artist), ('sortbyalbum', None, _('By Album'), None, None, self.on_sort_by_album), ('sortbytitle', None, _('By Song Title'), None, None, self.on_sort_by_title), ('sortbyfile', None, _('By File Name'), None, None, self.on_sort_by_file),
def __init__(self, window=None, sugar=False):
afd9bf2910e3b9f164c46fc074a7b7ae9600e641 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2312/afd9bf2910e3b9f164c46fc074a7b7ae9600e641/sonata.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 2742, 33, 7036, 16, 26178, 33, 8381, 4672, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 1001, 2738, 972, 12, 2890, 16, 2742, 33, 7036, 16, 26178, 33, 8381, 4672, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
moderated = self.getValueFor('moderated')
moderated = group.getValueFor('moderated')
def send_email(self, REQUEST, RESPONSE, group_id, email_address, email_id, message, subject=''): """ Send an email to the group. """ list_manager = self.get_xwfMailingListManager() sec = getSecurityManager() user = sec.getUser() if email_address not in user.get_emailAddresses(): raise 'Forbidden', 'Only the authenticated owner of an email address may use it to post' group = getattr(list_manager, group_id)
c5729558c58feb30cc51d77dd3bea85131b565e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6274/c5729558c58feb30cc51d77dd3bea85131b565e4/XWFVirtualMailingListArchive.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 2890, 16, 12492, 16, 20645, 16, 1041, 67, 350, 16, 2699, 67, 2867, 16, 225, 2699, 67, 350, 16, 225, 883, 16, 3221, 2218, 11, 4672, 3536, 2479, 392, 2699, 358, 326...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1366, 67, 3652, 12, 2890, 16, 12492, 16, 20645, 16, 1041, 67, 350, 16, 2699, 67, 2867, 16, 225, 2699, 67, 350, 16, 225, 883, 16, 3221, 2218, 11, 4672, 3536, 2479, 392, 2699, 358, 326...
req.outcookie['trac_auth']['path'] = req.base_path or '/'
req.outcookie['trac_auth']['path'] = self.auth_cookie_path \ or req.base_path or '/'
def store_session_cookie(db): cursor = db.cursor() cursor.execute("INSERT INTO auth_cookie (cookie,name,ipnr,time) " "VALUES (%s, %s, %s, %s)", (cookie, remote_user, req.remote_addr, int(time.time())))
8de0d5d0558224868808381918e8f7f0230974d2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9317/8de0d5d0558224868808381918e8f7f0230974d2/auth.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1707, 67, 3184, 67, 8417, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 11356, 12421, 1357, 67, 8417, 261, 8417, 16, 529, 16, 625, 11611, 16, 957, 13, 315, 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, 1707, 67, 3184, 67, 8417, 12, 1966, 4672, 3347, 273, 1319, 18, 9216, 1435, 3347, 18, 8837, 2932, 11356, 12421, 1357, 67, 8417, 261, 8417, 16, 529, 16, 625, 11611, 16, 957, 13, 315, 315...
return len(self._raw_body)
return len(self.encode(self._body))
def __len__(self): return len(self._raw_body)
0e5dc35e899e8dc3f566cb050f31b0a3bd570a66 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/0e5dc35e899e8dc3f566cb050f31b0a3bd570a66/message.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 1897, 972, 12, 2890, 4672, 327, 562, 12, 2890, 6315, 1899, 67, 3432, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 1897, 972, 12, 2890, 4672, 327, 562, 12, 2890, 6315, 1899, 67, 3432, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
adelie = Animal.insert().execute(Species='Adelie Penguin', Legs=2,
adelie = Animal.insert().execute(Species=u'Adelie Penguin', Legs=2,
def test_1a_populate(self): Zoo = metadata.tables['Zoo'] Animal = metadata.tables['Animal'] wap = Zoo.insert().execute(Name='Wild Animal Park', Founded=datetime.date(2000, 1, 1), # 59 can give rounding errors with divmod, which # AdapterFromADO needs to correct. Opens=datetime.time(8, 15, 59), LastEscape=datetime.datetime(2004, 7, 29, 5, 6, 7), Admission=4.95, ).last_inserted_ids()[0] sdz = Zoo.insert().execute(Name = 'San Diego Zoo', Founded = datetime.date(1935, 9, 13), Opens = datetime.time(9, 0, 0), Admission = 0, ).last_inserted_ids()[0] Zoo.insert().execute( Name = u'Montr\xe9al Biod\xf4me', Founded = datetime.date(1992, 6, 19), Opens = datetime.time(9, 0, 0), Admission = 11.75, ) seaworld = Zoo.insert().execute( Name = 'Sea_World', Admission = 60).last_inserted_ids()[0] # Let's add a crazy futuristic Zoo to test large date values. lp = Zoo.insert().execute(Name = 'Luna Park', Founded = datetime.date(2072, 7, 17), Opens = datetime.time(0, 0, 0), Admission = 134.95, ).last_inserted_ids()[0] # Animals leopardid = Animal.insert().execute(Species='Leopard', Lifespan=73.5, ).last_inserted_ids()[0] Animal.update(Animal.c.ID==leopardid).execute(ZooID=wap, LastEscape=datetime.datetime(2004, 12, 21, 8, 15, 0, 999907)) lion = Animal.insert().execute(Species='Lion', ZooID=wap).last_inserted_ids()[0] Animal.insert().execute(Species='Slug', Legs=1, Lifespan=.75) tiger = Animal.insert().execute(Species='Tiger', ZooID=sdz ).last_inserted_ids()[0] # Override Legs.default with itself just to make sure it works. Animal.insert().execute(Species='Bear', Legs=4) Animal.insert().execute(Species='Ostrich', Legs=2, Lifespan=103.2) Animal.insert().execute(Species='Centipede', Legs=100) emp = Animal.insert().execute(Species='Emperor Penguin', Legs=2, ZooID=seaworld).last_inserted_ids()[0] adelie = Animal.insert().execute(Species='Adelie Penguin', Legs=2, ZooID=seaworld).last_inserted_ids()[0] Animal.insert().execute(Species='Millipede', Legs=1000000, ZooID=sdz) # Add a mother and child to test relationships bai_yun = Animal.insert().execute(Species='Ape', Name='Bai Yun', Legs=2).last_inserted_ids()[0] Animal.insert().execute(Species='Ape', Name='Hua Mei', Legs=2, MotherID=bai_yun)
4d7f279d14ca4dd275de58ba11fe28a28a09dc46 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1074/4d7f279d14ca4dd275de58ba11fe28a28a09dc46/zoomark.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 21, 69, 67, 19936, 12, 2890, 4672, 2285, 5161, 273, 1982, 18, 9373, 3292, 62, 5161, 3546, 1922, 2840, 273, 1982, 18, 9373, 3292, 979, 2840, 3546, 225, 341, 438, 273, 2285, 51...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 21, 69, 67, 19936, 12, 2890, 4672, 2285, 5161, 273, 1982, 18, 9373, 3292, 62, 5161, 3546, 1922, 2840, 273, 1982, 18, 9373, 3292, 979, 2840, 3546, 225, 341, 438, 273, 2285, 51...
self.assertEquals("", Everything.test_unichar("")) self.assertEquals("\xe2\x99\xa5", Everything.test_unichar("\xe2\x99\xa5"))
if sys.version_info < (3, 0): self.assertEquals(UNICHAR, Everything.test_unichar(PY2_UNICODE_UNICHAR)) self.assertEquals(UNICHAR, Everything.test_unichar(UNICHAR)) self.assertRaises(TypeError, Everything.test_unichar, "") self.assertRaises(TypeError, Everything.test_unichar, "morethanonechar")
def test_unichar(self): self.assertEquals("c", Everything.test_unichar("c")) self.assertEquals("", Everything.test_unichar("")) self.assertEquals("\xe2\x99\xa5", Everything.test_unichar("\xe2\x99\xa5"))
5de88b4bcffdafcf8c7c20033cdf95dc690199ce /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8659/5de88b4bcffdafcf8c7c20033cdf95dc690199ce/test_everything.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 318, 1354, 297, 12, 2890, 4672, 365, 18, 11231, 8867, 2932, 71, 3113, 26553, 18, 3813, 67, 318, 1354, 297, 2932, 71, 6, 3719, 365, 18, 11231, 8867, 2932, 3113, 26553, 18, 381...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 318, 1354, 297, 12, 2890, 4672, 365, 18, 11231, 8867, 2932, 71, 3113, 26553, 18, 3813, 67, 318, 1354, 297, 2932, 71, 6, 3719, 365, 18, 11231, 8867, 2932, 3113, 26553, 18, 381...
_SubList.draw(self, master, allow_add_remove=False)
_SubList.draw(self, master, allow_add_remove=True)
def draw(self, master): """Draw the parent copy and related list Control, side by side in the given master. """ _SubList.draw(self, master, allow_add_remove=False) # Add callbacks to handle changes in parent self.add_callbacks()
2740391cfaff6affdb488c151c83110652336efb /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4675/2740391cfaff6affdb488c151c83110652336efb/control.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3724, 12, 2890, 16, 4171, 4672, 3536, 6493, 326, 982, 1610, 471, 3746, 666, 8888, 16, 4889, 635, 4889, 316, 326, 864, 4171, 18, 3536, 389, 1676, 682, 18, 9446, 12, 2890, 16, 4171, 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, 3724, 12, 2890, 16, 4171, 4672, 3536, 6493, 326, 982, 1610, 471, 3746, 666, 8888, 16, 4889, 635, 4889, 316, 326, 864, 4171, 18, 3536, 389, 1676, 682, 18, 9446, 12, 2890, 16, 4171, 16, ...
self.last_event_y = event.y - self.get_transformed_position()[1] self.scroller_position = event.y - self.get_transformed_position()[1]
self.last_event_y = event.y - self.get_transformed_position()[1] - self.border self.scroller_position = event.y - self.get_transformed_position()[1] - self.border
def on_scroll_move(self, source, event): if self.last_event_y is None: return clutter.grab_pointer(self.scroller) self.last_event_y = event.y - self.get_transformed_position()[1] self.scroller_position = event.y - self.get_transformed_position()[1] self.queue_relayout()
26fa15c71a9f14e6abdd60c21c681293f96ba26a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5279/26fa15c71a9f14e6abdd60c21c681293f96ba26a/scrollbar.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 12033, 67, 8501, 12, 2890, 16, 1084, 16, 871, 4672, 309, 365, 18, 2722, 67, 2575, 67, 93, 353, 599, 30, 327, 927, 18220, 18, 2752, 70, 67, 10437, 12, 2890, 18, 1017, 1539, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 67, 12033, 67, 8501, 12, 2890, 16, 1084, 16, 871, 4672, 309, 365, 18, 2722, 67, 2575, 67, 93, 353, 599, 30, 327, 927, 18220, 18, 2752, 70, 67, 10437, 12, 2890, 18, 1017, 1539, ...
raise error.LookupError(p1, self.indexfile,
raise error.LookupError(p, self.indexfile,
def chunkpositer(): for chunk in changegroup.chunkiter(bundlefile): pos = bundlefile.tell() yield chunk, pos - len(chunk)
8190fc2ee42fdf5743787fe95c7f524574407443 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11312/8190fc2ee42fdf5743787fe95c7f524574407443/bundlerepo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2441, 1724, 264, 13332, 364, 2441, 316, 2549, 1655, 18, 6551, 2165, 12, 9991, 768, 4672, 949, 273, 3440, 768, 18, 88, 1165, 1435, 2824, 2441, 16, 949, 300, 562, 12, 6551, 13, 2, 0, 0...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2441, 1724, 264, 13332, 364, 2441, 316, 2549, 1655, 18, 6551, 2165, 12, 9991, 768, 4672, 949, 273, 3440, 768, 18, 88, 1165, 1435, 2824, 2441, 16, 949, 300, 562, 12, 6551, 13, 2, -100, ...
self.body.append('\n')
pass
def visit_line_block(self, node): self.body.append('\n')
574809f8db3eb899fe06e96f6014d4b7770fa935 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5620/574809f8db3eb899fe06e96f6014d4b7770fa935/manpage.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 6134, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3757, 67, 1369, 67, 2629, 12, 2890, 16, 756, 4672, 365, 18, 3432, 18, 6923, 2668, 64, 82, 6134, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
except TypeError:
except (AttributeError, TypeError):
def cantset(obj, name, value): verify(hasattr(obj, name)) # Otherwise it's probably a typo try: setattr(obj, name, value) except TypeError: pass else: raise TestFailed, "shouldn't be able to set %s to %r" % (name, value) try: delattr(obj, name) except TypeError: pass else: raise TestFailed, "shouldn't be able to del %s" % name
df8902c81e6eb4fcbf46b9a79be8e214b937e033 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/df8902c81e6eb4fcbf46b9a79be8e214b937e033/test_funcattrs.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 88, 542, 12, 2603, 16, 508, 16, 460, 4672, 3929, 12, 5332, 1747, 12, 2603, 16, 508, 3719, 468, 5272, 518, 1807, 8656, 279, 3815, 83, 775, 30, 9241, 12, 2603, 16, 508, 16, 460, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 848, 88, 542, 12, 2603, 16, 508, 16, 460, 4672, 3929, 12, 5332, 1747, 12, 2603, 16, 508, 3719, 468, 5272, 518, 1807, 8656, 279, 3815, 83, 775, 30, 9241, 12, 2603, 16, 508, 16, 460, ...
if not self._preview:
if not self._previewing:
def _poll_canvas(self): """Show the poll canvas where children vote on an existing poll.""" self._current_view = 'poll' canvasbox = self._canvas_root()
96d7a3e2e2c337e1e11897013d8080b5b48f1a0d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/6691/96d7a3e2e2c337e1e11897013d8080b5b48f1a0d/poll.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 13835, 67, 15424, 12, 2890, 4672, 3536, 5706, 326, 7672, 5953, 1625, 2325, 12501, 603, 392, 2062, 7672, 12123, 365, 6315, 2972, 67, 1945, 273, 296, 13835, 11, 5953, 2147, 273, 365, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 13835, 67, 15424, 12, 2890, 4672, 3536, 5706, 326, 7672, 5953, 1625, 2325, 12501, 603, 392, 2062, 7672, 12123, 365, 6315, 2972, 67, 1945, 273, 296, 13835, 11, 5953, 2147, 273, 365, ...
def test_flags_in_ptr(self): TestGI.flags_in_ptr(TestGI.Flags.VALUE2) self.assertRaises(TypeError, TestGI.flags_in_ptr, None)
def test_flags_in_ptr(self): TestGI.flags_in_ptr(TestGI.Flags.VALUE2)
aefac8c5f64bf059dd6652f8a843d17b34fa0854 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8659/aefac8c5f64bf059dd6652f8a843d17b34fa0854/test_gi.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 7133, 67, 267, 67, 6723, 12, 2890, 4672, 7766, 13797, 18, 7133, 67, 267, 67, 6723, 12, 4709, 13797, 18, 5094, 18, 4051, 22, 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, 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, 1842, 67, 7133, 67, 267, 67, 6723, 12, 2890, 4672, 7766, 13797, 18, 7133, 67, 267, 67, 6723, 12, 4709, 13797, 18, 5094, 18, 4051, 22, 13, 2, -100, -100, -100, -100, -100, -100, -100, ...
print>>outstream, iso3166 + '\tcn' + hist_name
print>>outstream, iso3166.upper() + '\tcn' + '\t' + hist_name
def print_hist_names(self, outstream): '''Prints historical name data to outstream using standardized format.''' for hist_name in self.hist_names: for iso3166 in self.hist_names[hist_name]: print>>outstream, iso3166 + '\tcn' + hist_name
d91f413a0317774872780433041439c32bc7421a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8937/d91f413a0317774872780433041439c32bc7421a/HistoricalCountryNames_preprocessor.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1172, 67, 11488, 67, 1973, 12, 2890, 16, 596, 3256, 4672, 9163, 15402, 23922, 508, 501, 358, 596, 3256, 1450, 4529, 1235, 740, 1093, 6309, 364, 5356, 67, 529, 316, 365, 18, 11488, 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, 1172, 67, 11488, 67, 1973, 12, 2890, 16, 596, 3256, 4672, 9163, 15402, 23922, 508, 501, 358, 596, 3256, 1450, 4529, 1235, 740, 1093, 6309, 364, 5356, 67, 529, 316, 365, 18, 11488, 67, ...
return ('UNIX', self.socket.getsockname())
return ('UNIX', repr(self.socket.getsockname()))
def getHost(self): """Returns a tuple of ('UNIX', fileName)
b179b298195f5b78c8f637eca6973ab49e6d0b89 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12595/b179b298195f5b78c8f637eca6973ab49e6d0b89/unix.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8580, 12, 2890, 4672, 3536, 1356, 279, 3193, 434, 7707, 10377, 60, 2187, 3968, 13, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
[ 1, 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, 8580, 12, 2890, 4672, 3536, 1356, 279, 3193, 434, 7707, 10377, 60, 2187, 3968, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
return get_data(self.on_pulse)
return self.get_data(self.on_pulse)
def get_on_pulse(self): """Return numpy array of on-pulse regions concatenated together. """ return get_data(self.on_pulse)
85757f42705bec2908745238e6e063202f0ff80d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3485/85757f42705bec2908745238e6e063202f0ff80d/pulse.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 336, 67, 265, 67, 84, 24667, 12, 2890, 4672, 3536, 990, 3972, 526, 434, 603, 17, 84, 24667, 10085, 22080, 9475, 18, 3536, 327, 365, 18, 588, 67, 892, 12, 2890, 18, 265, 67, 84, 24667...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 336, 67, 265, 67, 84, 24667, 12, 2890, 4672, 3536, 990, 3972, 526, 434, 603, 17, 84, 24667, 10085, 22080, 9475, 18, 3536, 327, 365, 18, 588, 67, 892, 12, 2890, 18, 265, 67, 84, 24667...
for paths in pathnames: type_code = paths[0] type_str = None if type_code == 'file': type_str = _('File') elif type_code == 'folder': type_str = _('Folder') else: raise RuntimeError("Invalid type code: '%s'" % type_code) path = paths[1] liststore.append( [ type_str, path ] )
if None != pathnames: for paths in pathnames: type_code = paths[0] type_str = None if type_code == 'file': type_str = _('File') elif type_code == 'folder': type_str = _('Folder') else: raise RuntimeError("Invalid type code: '%s'" % type_code) path = paths[1] liststore.append( [ type_str, path ] )
def remove_whitelist_path_cb(button): """Callback for removing a path""" treeselection = treeview.get_selection() (model, _iter) = treeselection.get_selected() if None == _iter: # nothing selected return pathname = model[_iter][1] liststore.remove(_iter) for this_pathname in pathnames: if this_pathname[1] == pathname: pathnames.remove(this_pathname) options.set_whitelist_paths(pathnames)
f6aad18bc2144f56a2b2871da8bd4c1f4e55e6c2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7853/f6aad18bc2144f56a2b2871da8bd4c1f4e55e6c2/GuiPreferences.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1206, 67, 20409, 67, 803, 67, 7358, 12, 5391, 4672, 3536, 2428, 364, 9427, 279, 589, 8395, 11491, 292, 794, 273, 2151, 1945, 18, 588, 67, 10705, 1435, 261, 2284, 16, 389, 2165, 13, 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, 1206, 67, 20409, 67, 803, 67, 7358, 12, 5391, 4672, 3536, 2428, 364, 9427, 279, 589, 8395, 11491, 292, 794, 273, 2151, 1945, 18, 588, 67, 10705, 1435, 261, 2284, 16, 389, 2165, 13, 273...
try: 1 not in a check(0, "not in base_set did not raise error") except TypeError: pass
self.assertRaises(TypeError, lambda: None in 'abc')
def check(ok, *args): if not ok: raise TestFailed, " ".join(map(str, args))
a5a67e669b57a43ff3266b63863ffe4af30713d7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3187/a5a67e669b57a43ff3266b63863ffe4af30713d7/test_contains.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 601, 16, 380, 1968, 4672, 309, 486, 1529, 30, 1002, 7766, 2925, 16, 315, 3552, 5701, 12, 1458, 12, 701, 16, 833, 3719, 225, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 866, 12, 601, 16, 380, 1968, 4672, 309, 486, 1529, 30, 1002, 7766, 2925, 16, 315, 3552, 5701, 12, 1458, 12, 701, 16, 833, 3719, 225, 2, -100, -100, -100, -100, -100, -100, -100, -100, ...
if user == 1:
if user == 0:
def domain_get(self, cursor, user, model_name): # root user above constraint if user == 1: return '', []
43f347876bc1aa4a5faf1c87181219cf7dcc82b6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9266/43f347876bc1aa4a5faf1c87181219cf7dcc82b6/rule.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2461, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 938, 67, 529, 4672, 468, 1365, 729, 5721, 4954, 309, 729, 422, 374, 30, 327, 10226, 5378, 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, 2461, 67, 588, 12, 2890, 16, 3347, 16, 729, 16, 938, 67, 529, 4672, 468, 1365, 729, 5721, 4954, 309, 729, 422, 374, 30, 327, 10226, 5378, 2, -100, -100, -100, -100, -100, -100, -100, ...
e_data = events.data(e.__dict__)
e_data = events.data(**e.__dict__)
def setupText(e): if e.text.startswith('\x01') and e.text.endswith('\x01'): e_data = events.data(e.__dict__) e_data.text = e.text[1:-1] tokens = e_data.text.split(' ') e_data.name = tokens[0] e_data.args = tokens[1:] events.trigger('Ctcp', e_data) events.halt()
6b6a84bbc916ec63d584036463a7481082856fd6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10693/6b6a84bbc916ec63d584036463a7481082856fd6/ctcp.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3875, 1528, 12, 73, 4672, 309, 425, 18, 955, 18, 17514, 1918, 2668, 64, 92, 1611, 6134, 471, 425, 18, 955, 18, 5839, 1918, 2668, 64, 92, 1611, 11, 4672, 425, 67, 892, 273, 2641, 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, 3875, 1528, 12, 73, 4672, 309, 425, 18, 955, 18, 17514, 1918, 2668, 64, 92, 1611, 6134, 471, 425, 18, 955, 18, 5839, 1918, 2668, 64, 92, 1611, 11, 4672, 425, 67, 892, 273, 2641, 18, ...
newSnpData = SNPData(col_id_ls=copy.deepcopy(snpData.col_id_ls), row_id_ls=[]) newSnpData.data_matrix = num.zeros([no_of_rows, no_of_cols], num.int8)
new_col_id_ls = copy.deepcopy(snpData.col_id_ls) new_row_id_ls = [] new_data_matrix = num.zeros([no_of_rows, no_of_cols], num.int8)
def keepRowsByRowID(cls, snpData, row_id_ls): """ 2009-05-19 keep certain rows in snpData given row_id_ls """ sys.stderr.write("Keeping rows given row_id_ls ...") no_of_rows = len(row_id_ls) row_id_wanted_set = set(row_id_ls) no_of_cols = len(snpData.col_id_ls) newSnpData = SNPData(col_id_ls=copy.deepcopy(snpData.col_id_ls), row_id_ls=[]) newSnpData.data_matrix = num.zeros([no_of_rows, no_of_cols], num.int8) row_index = 0 for i in range(len(snpData.row_id_ls)): row_id = snpData.row_id_ls[i] if row_id in row_id_wanted_set: newSnpData.row_id_ls.append(row_id) newSnpData.data_matrix[row_index] = snpData.data_matrix[i] row_index += 1 newSnpData.no_of_rows_filtered_by_mismatch = len(snpData.row_id_ls)-no_of_rows sys.stderr.write("%s rows discarded. Done.\n"%(newSnpData.no_of_rows_filtered_by_mismatch)) return newSnpData
254211f49fa61cb0238f804701edac97473331a0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9645/254211f49fa61cb0238f804701edac97473331a0/SNP.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3455, 4300, 858, 1999, 734, 12, 6429, 16, 28648, 751, 16, 1027, 67, 350, 67, 3251, 4672, 3536, 4044, 29, 17, 6260, 17, 3657, 3455, 8626, 2595, 316, 28648, 751, 864, 1027, 67, 350, 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, 3455, 4300, 858, 1999, 734, 12, 6429, 16, 28648, 751, 16, 1027, 67, 350, 67, 3251, 4672, 3536, 4044, 29, 17, 6260, 17, 3657, 3455, 8626, 2595, 316, 28648, 751, 864, 1027, 67, 350, 67, ...
parent = self.curNode node.parentNode = parent
node.parentNode = self.curNode
def startElement(self, name, attrs): node = self.document.createElement(name)
87e48ef0a12be7fca2480ca8f7557916899a9bb6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/87e48ef0a12be7fca2480ca8f7557916899a9bb6/pulldom.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 4672, 756, 273, 365, 18, 5457, 18, 2640, 1046, 12, 529, 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, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 13591, 12, 2890, 16, 508, 16, 3422, 4672, 756, 273, 365, 18, 5457, 18, 2640, 1046, 12, 529, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
installed.add(pkg)
def assertResult(self, pkgs, optional_pkgs=[]): """Check if "system" contains the given pkgs. pkgs must be present, optional_pkgs may be. Any other pkgs result in an error. Pkgs are present if they are in the rpmdb and are not REMOVEd or they are INSTALLed. """ errors = ["assertResult:\n"] pkgs = set(pkgs) optional_pkgs = set(optional_pkgs) installed = set()
f25f72993890e58ea961460b48b2d4f94d313b70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5445/f25f72993890e58ea961460b48b2d4f94d313b70/testbase.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 1253, 12, 2890, 16, 16922, 16, 3129, 67, 25376, 33, 8526, 4672, 3536, 1564, 309, 315, 4299, 6, 1914, 326, 864, 16922, 18, 16922, 1297, 506, 3430, 16, 3129, 67, 25376, 2026, 506, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1815, 1253, 12, 2890, 16, 16922, 16, 3129, 67, 25376, 33, 8526, 4672, 3536, 1564, 309, 315, 4299, 6, 1914, 326, 864, 16922, 18, 16922, 1297, 506, 3430, 16, 3129, 67, 25376, 2026, 506, ...
later imposes a limit on the width of the picture. Technically, ``tightpage`` adds
latter imposes a limit on the width of the picture. Technically, ``tightpage`` adds ::
def view(objects, title='SAGE', debug=False, sep='', tiny=False, pdflatex=None, viewer = None, tightpage = None, **kwds): r"""nodetex Compute a latex representation of each object in objects, compile, and display typeset. If used from the command line, this requires that latex be installed. INPUT: - ``objects`` - list (or object) - ``title`` - string (default: 'Sage'): title for the document - ``debug`` - bool (default: False): print verbose output - ``sep`` - string (default: ''): separator between math objects - ``tiny`` - bool (default: False): use tiny font. - ``pdflatex`` - bool (default: False): use pdflatex. - ``viewer`` -- string or None (default: None): specify a viewer to use; currently the only options are None and 'pdf'. - ``tightpage`` - bool (default: False): use the LaTeX package 'preview' with the 'tightpage' option. OUTPUT: Display typeset objects. This function behaves differently depending on whether in notebook mode or not. If note in notebook mode, the output is displayed in a separate viewer displaying a dvi (or pdf) file, with the following: the title string is printed, centered, at the top. Beneath that, each object in ``objects`` is typeset on its own line, with the string ``sep`` inserted between these lines. The value of ``sep`` is inserted between each element of the list ``objects``; you can, for example, add vertical space between objects with ``sep='\\vspace{15mm}'``, while ``sep='\\hrule'`` adds a horizontal line between objects, and ``sep='\\newpage'`` inserts a page break between objects. If ``pdflatex`` is ``True``, then this produces a pdf file. Otherwise, it produces a dvi file, and if the program dvipng is installed, it checks the dvi file by trying to convert it to a png file. If this conversion fails, the dvi file probably contains some postscript special commands or it has other issues which might make displaying it a problem; in this case, the file is converted to a pdf file, which is then displayed. Setting ``viewer`` to ``'pdf'`` forces the use of a separate viewer, even in notebook mode. This also sets ``pdflatex`` to ``True``. Setting the option ``tightpage`` to ``True`` tells LaTeX to use the package 'preview' with the 'tightpage' option. Then, each object is typeset in its own page, and that page is cropped to exactly the size of the object. This is typically useful for very large pictures (like graphs) generated with tikz. This only works when using a separate viewer. Note that the object are currently typeset in plain math mode rather than displaymath, because the later imposes a limit on the width of the picture. Technically, ``tightpage`` adds \\usepackage[tightpage,active]{preview} \\PreviewEnvironment{page} to the `\LaTeX` preamble, and replaces the ``\\[`` and ``\\]`` around each object by ``\\begin{page}$`` and ``$\\end{page}``. If in notebook mode with ``viewer`` equal to ``None``, this usually uses jsMath -- see the next paragraph for the exception -- to display the output in the notebook. Only the first argument, ``objects``, is relevant; the others are ignored. If ``objects`` is a list, each object is printed on its own line. In the notebook, this *does* *not* use jsMath if the LaTeX code for ``objects`` contains a string in :meth:`latex.jsmath_avoid_list() <Latex.jsmath_avoid_list>`. In this case, it creates and displays a png file. EXAMPLES:: sage: sage.misc.latex.EMBEDDED_MODE = True sage: view(3) <html><span class="math">\newcommand{\Bold}[1]{\mathbf{#1}}3</span></html> sage: sage.misc.latex.EMBEDDED_MODE = False """ if isinstance(objects, LatexExpr): s = str(objects) else: if tightpage == True: latex_options = {'extra_preamble':'\\usepackage[tightpage,active]{preview}\\PreviewEnvironment{page}', 'math_left':'\\begin{page}$', 'math_right':'$\\end{page}'} else: latex_options = {} s = _latex_file_(objects, title=title, sep=sep, tiny=tiny, debug=debug, **latex_options) # notebook if EMBEDDED_MODE and viewer is None: jsMath_okay = True for t in latex.jsmath_avoid_list(): if s.find(t) != -1: jsMath_okay = False if not jsMath_okay: break if jsMath_okay: print JSMath().eval(objects, mode='inline') # put comma at end of line? else: base_dir = os.path.abspath("") png_file = graphics_filename(ext='png') png_link = "cell://" + png_file png(objects, os.path.join(base_dir, png_file), debug=debug, do_in_background=False, pdflatex=pdflatex) print '<html><img src="%s"></html>'%png_link # put comma at end of line? return # command line if viewer == "pdf": pdflatex = True if pdflatex is None: pdflatex = _Latex_prefs._option["pdflatex"] tmp = tmp_dir('sage_viewer') tex_file = os.path.join(tmp, "sage.tex") open(tex_file,'w').write(s) suffix = _run_latex_(tex_file, debug=debug, pdflatex=pdflatex, png=False) if suffix == "pdf": from sage.misc.viewer import pdf_viewer viewer = pdf_viewer() elif suffix == "dvi": from sage.misc.viewer import dvi_viewer viewer = dvi_viewer() else: print "Latex error" return output_file = os.path.join(tmp, "sage." + suffix) os.system('sage-native-execute %s %s'%(viewer, output_file)) return
570220c4977ed6a61f4c844c765e92ce08fe1ba5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/570220c4977ed6a61f4c844c765e92ce08fe1ba5/latex.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 6911, 16, 2077, 2218, 55, 2833, 2187, 1198, 33, 8381, 16, 5478, 2218, 2187, 24405, 33, 8381, 16, 8169, 26264, 33, 7036, 16, 14157, 273, 599, 16, 26066, 2433, 273, 599, 16, 28...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1476, 12, 6911, 16, 2077, 2218, 55, 2833, 2187, 1198, 33, 8381, 16, 5478, 2218, 2187, 24405, 33, 8381, 16, 8169, 26264, 33, 7036, 16, 14157, 273, 599, 16, 26066, 2433, 273, 599, 16, 28...
url=cgi.escape(ll[0])
url=ll[0]
def create_net_menu(self): mm = gtk.Menu() links=self.__m.get_current().get('links',u'').split(u'\n') for l in links: ll=l.split(u'\t',1) url=cgi.escape(ll[0]) if len(ll)>1: t=cgi.escape(ll[1]) else: t=url i= gtk.MenuItem(t) i.connect("activate", self.net_menu_cb,url) i.show() mm.add(i) self.net_menu.set_submenu(mm)
be1ce6d3401df60adefdf8ade0ad2a5da413a2e8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9462/be1ce6d3401df60adefdf8ade0ad2a5da413a2e8/MonajatScreenlet.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 752, 67, 2758, 67, 5414, 12, 2890, 4672, 9740, 273, 22718, 18, 4599, 1435, 4716, 33, 2890, 16186, 81, 18, 588, 67, 2972, 7675, 588, 2668, 7135, 2187, 89, 6309, 2934, 4939, 12, 89, 8314...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2758, 67, 5414, 12, 2890, 4672, 9740, 273, 22718, 18, 4599, 1435, 4716, 33, 2890, 16186, 81, 18, 588, 67, 2972, 7675, 588, 2668, 7135, 2187, 89, 6309, 2934, 4939, 12, 89, 8314...
def set_rod_value(self, r, v): """ Move beads on rod r to represent value v """ o = self.bot_beads - self.bead_count[r] + 2 for i in range(beads): if self.beads[bead_index+i].state: self.beads[bead_index+i].move((0, o*BHEIGHT*self.abacus.scale)) self.beads[bead_index+i].state = 0 for i in range(v): self.beads[bead_index+i].move_relative((0, -o*BHEIGHT*self.abacus.scale)) self.beads[bead_index+i].state = 1 def move_bead(self, bead, dy): """ Override to account for short rods """ i = self.beads.index(bead) count = 0 for r in range(len(self.bead_count)): count += self.bead_count[r] if i < count: break o = self.bot_beads - self.bead_count[r] + 2 b = i - (count-self.bead_count[r]) n = self.bead_count[r] if dy < 0 and bead.state == 0: bead.move_relative((0, -o*BHEIGHT*self.abacus.scale)) bead.state = 1 for ii in range(b+1): if self.beads[i-ii].state == 0: self.beads[i-ii].move_relative((0, -o*BHEIGHT*self.abacus.scale)) self.beads[i-ii].state = 1 elif dy > 0 and bead.state == 1: bead.move_relative((0, o*BHEIGHT*self.abacus.scale)) bead.state = 0 for ii in range(n-b): if self.beads[i+ii].state == 1: self.beads[i+ii].move_relative((0, o*BHEIGHT*self.abacus.scale)) self.beads[i+ii].state = 0
def value(self, count_beads=False): """ Override to account for fractions """ string = '' v = [] value = 0 for r in range(self.num_rods+1): # +1 for overflow v.append(0)
fa60a06795f92967c0f5d82d623ad43d79cdc87b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7608/fa60a06795f92967c0f5d82d623ad43d79cdc87b/abacus_window.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 12, 2890, 16, 1056, 67, 70, 684, 87, 33, 8381, 4672, 3536, 1439, 358, 2236, 364, 8330, 87, 3536, 533, 273, 875, 331, 273, 5378, 460, 273, 374, 364, 436, 316, 1048, 12, 2890, 18,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 460, 12, 2890, 16, 1056, 67, 70, 684, 87, 33, 8381, 4672, 3536, 1439, 358, 2236, 364, 8330, 87, 3536, 533, 273, 875, 331, 273, 5378, 460, 273, 374, 364, 436, 316, 1048, 12, 2890, 18,...
file.Write(" Validate%s(this, arg_count%s);\n" %
file.Write(" Validate%s(this, immediate_data_size%s);\n" %
def WriteServiceImplementation(self, func, file): """Overrriden from TypeHandler.""" file.Write( "parse_error::ParseError GLES2DecoderImpl::Handle%s(\n" % func.name) file.Write( " unsigned int arg_count, const gles2::%s& c) {\n" % func.name) args = func.GetOriginalArgs() for arg in args: arg.WriteGetCode(file)
3975916c448229deb7fa73586d80d6aebe8671fa /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5060/3975916c448229deb7fa73586d80d6aebe8671fa/build_gles2_cmd_buffer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2598, 1179, 13621, 12, 2890, 16, 1326, 16, 585, 4672, 3536, 22042, 1691, 275, 628, 1412, 1503, 12123, 585, 18, 3067, 12, 315, 2670, 67, 1636, 2866, 21004, 611, 11386, 22, 7975, 2828, 286...
self.run('cp /etc/environment /etc/environment.orig', notify=False, exit_on_error=False)
if not os.path.exists("/etc/environment.orig"): self.run('cp /etc/environment /etc/environment.orig', notify=False, exit_on_error=False)
def add_env(self, key, value): """ Add an environemnt variable For Ubuntu, the best place is /etc/environment. Values placed here do not need to be exported. """ boto.log.info('Adding env variable: %s=%s' % (key, value)) self.run('cp /etc/environment /etc/environment.orig', notify=False, exit_on_error=False) fp = open('/etc/environment', 'a') fp.write('\n%s=%s' % (key, value)) fp.close() os.environ[key] = value
df25d04a5bc69db107765c0e31c01515ea515bdf /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/1098/df25d04a5bc69db107765c0e31c01515ea515bdf/installer.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 527, 67, 3074, 12, 2890, 16, 498, 16, 460, 4672, 3536, 1436, 392, 5473, 351, 496, 2190, 2457, 587, 70, 25348, 16, 326, 3796, 3166, 353, 342, 14175, 19, 10274, 18, 225, 6876, 15235, 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, 527, 67, 3074, 12, 2890, 16, 498, 16, 460, 4672, 3536, 1436, 392, 5473, 351, 496, 2190, 2457, 587, 70, 25348, 16, 326, 3796, 3166, 353, 342, 14175, 19, 10274, 18, 225, 6876, 15235, 267...
promote (None, R, Q, B, N), capture (True, False), hybrid (True, False), check (None, check, mate).
promote (None, R, Q, B, N), capture (True, False), hybrid, i.e. 'going to hybrid' (True, False), check (None, check, mate).
def move(self, sym, src, dst, options): """(parsed) move is: (piece, src, dst, options), where dict options may contain the following keys: promote (None, R, Q, B, N), capture (True, False), hybrid (True, False), check (None, check, mate). all keys except 'promote' may be ignored""" src_piece = self.locs[src] if src_piece == E: raise IllegalMove, ("source position %s is empty" % str(src)) (src_sym, src_col) = src_piece if src_col != self.turn: raise IllegalMove, "attempt to move ememy's piece" movingPiece = pieceObjects[sym] NotImplemented
d9a1240ac0cf1077059e66044287f42b14b968af /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5164/d9a1240ac0cf1077059e66044287f42b14b968af/board.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 12, 2890, 16, 5382, 16, 1705, 16, 3046, 16, 702, 4672, 3536, 12, 10817, 13, 3635, 353, 30, 261, 30100, 16, 1705, 16, 3046, 16, 702, 3631, 1625, 2065, 702, 2026, 912, 326, 3751, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 3635, 12, 2890, 16, 5382, 16, 1705, 16, 3046, 16, 702, 4672, 3536, 12, 10817, 13, 3635, 353, 30, 261, 30100, 16, 1705, 16, 3046, 16, 702, 3631, 1625, 2065, 702, 2026, 912, 326, 3751, ...
res, jsontext = upload.post_multipart(self.site, path, params, (('file', params['filename'].encode(self.site.encoding()), cont),), self.cookies(sysop=sysop)
res, jsontext = upload.post_multipart(site, path, params, (('file', params['filename'].encode(site.encoding()), cont),), site.cookies(sysop=sysop)
def GetData(params, site = None, useAPI = True, retryCount = 5, encodeTitle = True, sysop = False, back_response = False): """Get data from the query api, and convert it into a data object """ if not site: site = wikipedia.getSite() if wikipedia.verbose: wikipedia.output("====API PARAMS====") for k,v in params.iteritems(): if not IsString(v): params[k] = unicode(v) if wikipedia.verbose: if type(v) != int: if v.count('|') == 0 and len(v) > 40: wikipedia.output("[%s]: %s (total %d char)" % (k,v[0:30], lev(v)) ) elif v.count('|') > 8: wikipedia.output("[%s]: %s (and more %d values)" % (k,v[0:v.index('|')], len(v.split('|')) ) ) else: wikipedia.output("[%s]: %s" % (k,v) ) elif k == u'format': continue else: wikipedia.output("[%s]: %s" % (k,v) ) if wikipedia.verbose: wikipedia.output("==================") if 'format' not in params: params['format'] = 'json' if not useAPI: params['noprofile'] = '' for k,v in params.iteritems(): if type(v) == type(u''): params[k] = ToUtf8(v) # Titles param might be long, case convert it to post request data = None titlecount = 0 for pLongKey in ['titles', 'pageids', 'ucusers', 'ususers']: # if pLongKey in params: titlecount = params[pLongKey].count('|') + 1 if encodeTitle: data = {pLongKey : params[pLongKey]} del params[pLongKey] postAC = [ 'edit', 'login', 'purge', 'rollback', 'delete', 'undelete', 'protect', 'block', 'unblock', 'move', 'emailuser','import', 'userrights', 'upload', ] if useAPI: if params['action'] in postAC: path = site.api_address() cont = '' else: path = site.api_address() + urllib.urlencode(params.items()) else: path = site.query_address() + urllib.urlencode(params.items()) if wikipedia.verbose: if titlecount > 1: wikipedia.output(u"Requesting %d %s from %s" % (titlecount, data.keys()[0], site)) else: wikipedia.output(u"Requesting API query from %s" % site) lastError = None retry_idle_time = 1 while retryCount >= 0: try: jsontext = "Nothing received" if params['action'] == 'upload' and ('file' in params or cont): import upload if not cont: cont = params['file'] del params['file'] res, jsontext = upload.post_multipart(self.site, path, params, (('file', params['filename'].encode(self.site.encoding()), cont),), self.cookies(sysop=sysop) ) elif site.hostname() in wikipedia.config.authenticate.keys(): params["Content-type"] = "application/x-www-form-urlencoded" params["User-agent"] = useragent res = urllib2.urlopen(urllib2.Request(site.protocol() + '://' + site.hostname() + address, site.urlEncode(params))) jsontext = res.read() elif params['action'] in postAC: res, jsontext = site.postForm(path, params, sysop, site.cookies(sysop = sysop) ) else: if back_response: res, jsontext = site.getUrl( path, retry=True, data=data, sysop=sysop, back_response=True) else: jsontext = site.getUrl( path, retry=True, sysop=sysop, data=data) # This will also work, but all unicode strings will need to be converted from \u notation # decodedObj = eval( jsontext ) if back_response: return res, json.loads( jsontext ) else: return json.loads( jsontext ) except ValueError, error: if 'Wikimedia Error' in jsontext: #wikimedia server error raise wikipedia.ServerError retryCount -= 1 wikipedia.output(u"Error downloading data: %s" % error) wikipedia.output(u"Request %s:%s" % (site.lang, path)) lastError = error if retryCount >= 0: wikipedia.output(u"Retrying in %i minutes..." % retry_idle_time) time.sleep(retry_idle_time*60) # Next time wait longer, but not longer than half an hour retry_idle_time *= 2 if retry_idle_time > 30: retry_idle_time = 30 else: wikipedia.debugDump('ApiGetDataParse', site, str(error) + '\n%s\n%s' % (site.hostname(), path), jsontext) raise lastError
d13245a0ad1f2116cdc9dec160f440b4e6c3c070 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/d13245a0ad1f2116cdc9dec160f440b4e6c3c070/query.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 2010, 16, 2834, 273, 599, 16, 999, 2557, 273, 1053, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 16, 2589, 556, 273, 1083, 16, 1473, 67, 2740, 273, 1083, 4672, 3536, 967...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 30837, 12, 2010, 16, 2834, 273, 599, 16, 999, 2557, 273, 1053, 16, 30084, 273, 1381, 16, 2017, 4247, 273, 1053, 16, 2589, 556, 273, 1083, 16, 1473, 67, 2740, 273, 1083, 4672, 3536, 967...
return not self.is_zero()
""" Returns True if this is Laurent series is a unit in this ring. EXAMPLES: sage: R.<t> = LaurentSeriesRing(QQ) sage: (2+t).is_unit() True sage: f = 2+t^2+O(t^10); f.is_unit() True sage: 1/f 1/2 - 1/4*t^2 + 1/8*t^4 - 1/16*t^6 + 1/32*t^8 + O(t^10) sage: R(0).is_unit() False sage: R.<s> = LaurentSeriesRing(ZZ) sage: f = 2 + s^2 + O(s^10) sage: f.is_unit() False sage: 1/f Traceback (most recent call last): ... ArithmeticError: division not defined ALGORITHM: A Laurent series is a unit if and only if its "unit part" is a unit. """ return self.__u.is_unit()
def is_unit(self): return not self.is_zero()
5bf1dbe6855b9b0ddc372f3677dca47afc93ccda /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/5bf1dbe6855b9b0ddc372f3677dca47afc93ccda/laurent_series_ring_element.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 4873, 12, 2890, 4672, 327, 486, 365, 18, 291, 67, 7124, 1435, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 353, 67, 4873, 12, 2890, 4672, 327, 486, 365, 18, 291, 67, 7124, 1435, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
Return True if this group is a normal subgroup of other.
Return ``True`` if this group is a normal subgroup of ``other``.
def is_normal(self, other): """ Return True if this group is a normal subgroup of other. EXAMPLES:: sage: AlternatingGroup(4).is_normal(SymmetricGroup(4)) True sage: H = PermutationGroup(['(1,2,3)(4,5)']) sage: G = PermutationGroup(['(1,2,3)(4,5)', '(1,2,3,4,5)']) sage: H.is_normal(G) False """ if not(self.is_subgroup(other)): raise TypeError("%s must be a subgroup of %s"%(self,other)) return other._gap_().IsNormal(self._gap_()).bool()
6ac30ecf5071d4fb909072e90d2311932d8c2165 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/6ac30ecf5071d4fb909072e90d2311932d8c2165/permgroup.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 353, 67, 6130, 12, 2890, 16, 1308, 4672, 3536, 2000, 12176, 5510, 10335, 309, 333, 1041, 353, 279, 2212, 720, 1655, 434, 12176, 3011, 68, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, 41...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6130, 12, 2890, 16, 1308, 4672, 3536, 2000, 12176, 5510, 10335, 309, 333, 1041, 353, 279, 2212, 720, 1655, 434, 12176, 3011, 68, 8338, 225, 5675, 8900, 11386, 2866, 225, 272, 41...
raise 'InvalidRequestError'
raise InvalidRequestError
def resetPassword(self, userid, randomstring, password): """Set the password (in 'password') for the user who maps to the string in 'randomstring' iff the entered 'userid' is equal to the mapped userid. (This can be turned off with the 'toggleUserCheck' method.)
489bf001853502ab2475f5de200186dc8fe65457 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12219/489bf001853502ab2475f5de200186dc8fe65457/PasswordResetTool.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 3913, 12, 2890, 16, 6709, 16, 2744, 1080, 16, 2201, 4672, 3536, 694, 326, 2201, 261, 267, 296, 3664, 6134, 364, 326, 729, 10354, 7565, 358, 326, 533, 316, 296, 9188, 1080, 11, 21...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 2715, 3913, 12, 2890, 16, 6709, 16, 2744, 1080, 16, 2201, 4672, 3536, 694, 326, 2201, 261, 267, 296, 3664, 6134, 364, 326, 729, 10354, 7565, 358, 326, 533, 316, 296, 9188, 1080, 11, 21...
array.array.__init__(typecode)
array.array.__init__(self, typecode)
def __init__(self, typecode, newarg=None): array.array.__init__(typecode)
cf03ac0c64dba3ec33f9c3af1cbe7b387d1ca534 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8546/cf03ac0c64dba3ec33f9c3af1cbe7b387d1ca534/test_array.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1001, 2738, 972, 12, 2890, 16, 618, 710, 16, 394, 3175, 33, 7036, 4672, 526, 18, 1126, 16186, 2738, 972, 12, 723, 710, 13, 2, 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, 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, 1001, 2738, 972, 12, 2890, 16, 618, 710, 16, 394, 3175, 33, 7036, 4672, 526, 18, 1126, 16186, 2738, 972, 12, 723, 710, 13, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100...
nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] if nc.variables.get('TotalEnergy', None)[-1] > 1E36: log.warn("Total energy > 1E36. NC file is incomplete. \ calc.restart required") self.restart()
if os.path.exists(self.nc): nc = netCDF(self.nc, 'r') number_ionic_steps = nc.dimensions['number_ionic_steps'] frame = number_ionic_steps -1 nc.close()
def _set_frame_number(self, frame=None): 'set framenumber in the netcdf file' if frame is None: nc = netCDF(self.nc, 'r') if 'TotalEnergy' in nc.variables: frame = nc.variables['TotalEnergy'].shape[0] # make sure the last energy is reasonable. Sometime # the field is empty if the calculation ran out of # walltime for example. Empty values get returned as # 9.6E36. Dacapos energies should always be negative, # so if the energy is > 1E36, there is definitely # something wrong and a restart is required. if nc.variables.get('TotalEnergy', None)[-1] > 1E36: log.warn("Total energy > 1E36. NC file is incomplete. \ calc.restart required") self.restart() else: frame = 1 nc.close() log.info("Current frame number is: %i" % (frame-1)) self._frame = frame-1 #netCDF starts counting with 1
aabaca6c3ff2bc9a7f87d3884bfc98e39475d6b2 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5735/aabaca6c3ff2bc9a7f87d3884bfc98e39475d6b2/jacapo.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 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, 542, 67, 3789, 67, 2696, 12, 2890, 16, 2623, 33, 7036, 4672, 296, 542, 21799, 21998, 316, 326, 2901, 24799, 585, 11, 225, 309, 2623, 353, 599, 30, 8194, 273, 2901, 39, 4577, 12, ...
if sd < 0.1:
if sd < 0.05:
def bin(values, width): '''Bin values in bins of given width, computing the error (standard deviation) in the bin on the Y values. This is messy...''' # do not really want to warn about this... if len(values) % width and False: raise RuntimeError, 'num values not multiple of width (%d %d)' % \ (len(values), width) result = [] for j in range(len(values) / width): block = values[j * width:(j + 1) * width] mean, sd = meansd([b[1] for b in block]) if sd < 0.1: sd = 0.05 result.append((meansd([b[0] for b in block])[0], (mean, sd))) return result
a36e5d6443b0bdceccdf0c33ce66049138803434 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3290/a36e5d6443b0bdceccdf0c33ce66049138803434/CCP4IntraRadiationDamageDetector.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4158, 12, 2372, 16, 1835, 4672, 9163, 9913, 924, 316, 8963, 434, 864, 1835, 16, 20303, 326, 555, 261, 10005, 17585, 13, 316, 326, 4158, 603, 326, 1624, 924, 18, 1220, 353, 12755, 93, 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, 4158, 12, 2372, 16, 1835, 4672, 9163, 9913, 924, 316, 8963, 434, 864, 1835, 16, 20303, 326, 555, 261, 10005, 17585, 13, 316, 326, 4158, 603, 326, 1624, 924, 18, 1220, 353, 12755, 93, 7...
def _RealPrefix(path): """Determine longest directory prefix and whether path contains a symlink. Given an absolute path PATH, figure out the longest prefix of PATH where every component of the prefix is a directory -- not a file or symlink.
def _RealPrefixWithinClientRoot(client_root, path): """Determine longest directory prefix of PATH and whether PATH contains a symlink. Given an absolute path CLIENT_ROOT and an absolute path PATH that is interpreted as relative to CLIENT_ROOT, figure out the longest prefix of PATH such that every component of the prefix is a directory -- not a file or symlink -- when interpreted relative to CLIENT_ROOT.
def _RealPrefix(path): """Determine longest directory prefix and whether path contains a symlink. Given an absolute path PATH, figure out the longest prefix of PATH where every component of the prefix is a directory -- not a file or symlink. Args: path: a string starting with '/' Returns: a pair consisting of - the prefix - a bool, which is True iff PATH contained a symlink. """ prefix = "/" parts = path.split('/') while prefix != path: part = parts.pop(0) last_prefix = prefix prefix = os.path.join(prefix, part) if os.path.islink(prefix): return last_prefix, True if not os.path.isdir(prefix): return last_prefix, False return path, False
a92f6458ee0d0ec18eb75f96ad74a1bfd349438f /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/4521/a92f6458ee0d0ec18eb75f96ad74a1bfd349438f/compiler_defaults.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 389, 6955, 2244, 18949, 1227, 2375, 12, 2625, 67, 3085, 16, 589, 4672, 3536, 8519, 12163, 1867, 1633, 434, 7767, 471, 2856, 7767, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 16395, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6955, 2244, 18949, 1227, 2375, 12, 2625, 67, 3085, 16, 589, 4672, 3536, 8519, 12163, 1867, 1633, 434, 7767, 471, 2856, 7767, 1914, 279, 10563, 18, 225, 16803, 392, 4967, 589, 16395, ...
assert isinstance(result, W_Root)
def wrapper(*args): from pypy.module.cpyext.pyobject import make_ref, from_ref from pypy.module.cpyext.pyobject import BorrowedPair from pypy.module.cpyext.pyobject import NullPointerException # we hope that malloc removal removes the newtuple() that is # inserted exactly here by the varargs specializer llop.gc_stack_bottom(lltype.Void) # marker for trackgcroot.py rffi.stackcounter.stacks_counter += 1 retval = fatal_value boxed_args = () try: if not we_are_translated() and DEBUG_WRAPPER: print >>sys.stderr, callable, assert len(args) == len(callable.api_func.argtypes) for i, (typ, is_wrapped) in argtypes_enum_ui: arg = args[i] if typ is PyObject and is_wrapped: if arg: arg_conv = from_ref(space, arg) else: arg_conv = None else: arg_conv = arg boxed_args += (arg_conv, ) state = space.fromcache(State) try: result = callable(space, *boxed_args) if not we_are_translated() and DEBUG_WRAPPER: print >>sys.stderr, " DONE" except OperationError, e: failed = True state.set_exception(e) except BaseException, e: failed = True state.set_exception(OperationError(space.w_SystemError, space.wrap(str(e)))) if not we_are_translated(): import traceback traceback.print_exc() else: failed = False
91d83cf499e40b5f96bce7a30f7dc736bc83273f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6934/91d83cf499e40b5f96bce7a30f7dc736bc83273f/api.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 30857, 1968, 4672, 628, 18951, 93, 18, 2978, 18, 71, 2074, 408, 18, 2074, 1612, 1930, 1221, 67, 1734, 16, 628, 67, 1734, 628, 18951, 93, 18, 2978, 18, 71, 2074, 408, 18, 2074, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 4053, 30857, 1968, 4672, 628, 18951, 93, 18, 2978, 18, 71, 2074, 408, 18, 2074, 1612, 1930, 1221, 67, 1734, 16, 628, 67, 1734, 628, 18951, 93, 18, 2978, 18, 71, 2074, 408, 18, 2074, ...
cl_sum = make_cl_func(t.yast)
cl_sum = make_cl_func(t.yast, [list])
def test_yast(self): cl_sum = make_cl_func(t.yast) # yet another sum test assert cl_sum(range(12)) == 66
8ffd7291fa465c8814312b8d21eca597906b79fc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/8ffd7291fa465c8814312b8d21eca597906b79fc/test_cltrans.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 93, 689, 12, 2890, 4672, 927, 67, 1364, 273, 1221, 67, 830, 67, 644, 12, 88, 18, 93, 689, 16, 306, 1098, 5717, 468, 4671, 4042, 2142, 1842, 1815, 927, 67, 1364, 12, 3676, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1842, 67, 93, 689, 12, 2890, 4672, 927, 67, 1364, 273, 1221, 67, 830, 67, 644, 12, 88, 18, 93, 689, 16, 306, 1098, 5717, 468, 4671, 4042, 2142, 1842, 1815, 927, 67, 1364, 12, 3676, ...
self.gui.logger.debug("visible="+visible+" , correction_visible="+self.correction_visible)
self.gui.logger.debug("visible="+str(visible)+" , correction_visible="+str(self.correction_visible))
def notify_toogle_correction(self,visible): self.gui.logger.debug("notify_toogle_correction") self.gui.logger.debug("visible="+visible+" , correction_visible="+self.correction_visible) if visible != self.correction_visible: self.toggle_correction()
1451429266615c198bcf32ecc9e9247df989a734 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11741/1451429266615c198bcf32ecc9e9247df989a734/gui_controller.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 869, 2968, 67, 20916, 12, 2890, 16, 8613, 4672, 365, 18, 20292, 18, 4901, 18, 4148, 2932, 12336, 67, 869, 2968, 67, 20916, 7923, 365, 18, 20292, 18, 4901, 18, 4148, 2932, 861...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 5066, 67, 869, 2968, 67, 20916, 12, 2890, 16, 8613, 4672, 365, 18, 20292, 18, 4901, 18, 4148, 2932, 12336, 67, 869, 2968, 67, 20916, 7923, 365, 18, 20292, 18, 4901, 18, 4148, 2932, 861...
if options.autogen: config.alwaysautogen = True if options.clean: config.makeclean = True
def run(self, config, options, args, help=None): config.buildscript = 'autobuild'
0df2830eb1dafa80ce7beb676446f74813410aa5 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4596/0df2830eb1dafa80ce7beb676446f74813410aa5/autobuild.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 1086, 12, 2890, 16, 642, 16, 702, 16, 833, 16, 2809, 33, 7036, 4672, 642, 18, 3510, 4263, 273, 296, 5854, 947, 680, 11, 2, 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, 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, 1086, 12, 2890, 16, 642, 16, 702, 16, 833, 16, 2809, 33, 7036, 4672, 642, 18, 3510, 4263, 273, 296, 5854, 947, 680, 11, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
if tab.isGuide() and url.startswith(tab.obj.getURL()):
if tab and tab.isGuide() and url.startswith(tab.obj.getURL()):
def onURLLoad(self, url): #print "DTV: got %s" % url try: # Special-case non-'action:'-format URL if url.startswith ("template:"): self.dispatchAction ('switchTemplate', name = url[len("template:"):]) return False
93890986e413d094bcd503af953a856d346e48b5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12354/93890986e413d094bcd503af953a856d346e48b5/app.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1785, 2563, 12, 2890, 16, 880, 4672, 468, 1188, 315, 9081, 58, 30, 2363, 738, 87, 6, 738, 880, 775, 30, 468, 13409, 17, 3593, 1661, 6627, 1128, 2497, 17, 2139, 1976, 309, 880, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 603, 1785, 2563, 12, 2890, 16, 880, 4672, 468, 1188, 315, 9081, 58, 30, 2363, 738, 87, 6, 738, 880, 775, 30, 468, 13409, 17, 3593, 1661, 6627, 1128, 2497, 17, 2139, 1976, 309, 880, 1...
<unittest.TestResult run=3 errors=0 failures=2>
<unittest.TestResult run=3 errors=0 failures=1>
>>> def tearDown(t):
f64d03329635452b58e14cce2f11b70c7098962c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/f64d03329635452b58e14cce2f11b70c7098962c/test_doctest.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 268, 2091, 4164, 12, 88, 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...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 4080, 1652, 268, 2091, 4164, 12, 88, 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...
return cram(cleanid(repr(x)), self.maxstring)
return cram(stripid(repr(x)), self.maxstring)
def repr_instance(self, x, level): try: return cram(cleanid(repr(x)), self.maxstring) except: return self.escape('<%s instance>' % x.__class__.__name__)
1d384634bf8f9e6180839048207bfd3539bbbc51 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/1d384634bf8f9e6180839048207bfd3539bbbc51/pydoc.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 8480, 67, 1336, 12, 2890, 16, 619, 16, 1801, 4672, 775, 30, 327, 276, 1940, 12, 6406, 350, 12, 12715, 12, 92, 13, 3631, 365, 18, 1896, 1080, 13, 1335, 30, 327, 365, 18, 6939, 2668, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 8480, 67, 1336, 12, 2890, 16, 619, 16, 1801, 4672, 775, 30, 327, 276, 1940, 12, 6406, 350, 12, 12715, 12, 92, 13, 3631, 365, 18, 1896, 1080, 13, 1335, 30, 327, 365, 18, 6939, 2668, ...
def manage_exportObject(self,id=None,download=None,RESPONSE=None):
def manage_exportObject(self, id='', download=None, RESPONSE=None):
def manage_exportObject(self,id=None,download=None,RESPONSE=None): """Exports an object to a file and returns that file.""" if id is None: o=self else: o=getattr(self,id) if download: f=StringIO() o._p_jar.export_file(o,f) RESPONSE.setHeader('Content-type','application/data') RESPONSE.setHeader('Content-Disposition', 'inline;filename=%s.bbe' % id) return f.getvalue() f=Globals.data_dir+'/%s.bbe' % id o._p_jar.export_file(o,f) if RESPONSE is not None: return MessageDialog( title="Object exported", message="<EM>%s</EM> sucessfully\ exported to <pre>%s</pre>." % (id,f), action="manage_main")
b94b21d273bd0349b78f6576694ee29f9744529a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/b94b21d273bd0349b78f6576694ee29f9744529a/Folder.py
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 6530, 921, 12, 2890, 16, 612, 2218, 2187, 4224, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 15352, 392, 733, 358, 279, 585, 471, 1135, 716, 585, 12123, 309, 612, 353, 599, 30...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 1652, 10680, 67, 6530, 921, 12, 2890, 16, 612, 2218, 2187, 4224, 33, 7036, 16, 20645, 33, 7036, 4672, 3536, 15352, 392, 733, 358, 279, 585, 471, 1135, 716, 585, 12123, 309, 612, 353, 599, 30...