rem stringlengths 1 226k | add stringlengths 0 227k | context stringlengths 6 326k | meta stringlengths 143 403 | input_ids listlengths 256 256 | attention_mask listlengths 256 256 | labels listlengths 128 128 |
|---|---|---|---|---|---|---|
if '<' in mytag: p = Pattern(mytag) self.__format = lambda song: p.format_list(song) self.tags = p.real_tags(cond=False) title = pattern(mytag) else: title = tag(mytag) self.tags = util.tagsplit(mytag) if mytag[:2] == "~ self.__format = lambda song: [unicode(song(mytag))] else: self.__format = lambda song: song.list_separate(mytag) | title, self.tags, self.__format, \ self.__markup, disp_format = self.__parse_prefs(prefs) | def __init__(self, mytag, next, library): super(PanedBrowser.Pane, self).__init__() self.set_fixed_height_mode(True) | 65c353a2f58dd189cd3918d5836dbf8ca05e5f5f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/4764/65c353a2f58dd189cd3918d5836dbf8ca05e5f5f/paned.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3399,
2692,
16,
1024,
16,
5313,
4672,
2240,
12,
4069,
329,
9132,
18,
8485,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
542,
67,
12429,
67,
4210,
67,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3399,
2692,
16,
1024,
16,
5313,
4672,
2240,
12,
4069,
329,
9132,
18,
8485,
16,
365,
2934,
972,
2738,
972,
1435,
365,
18,
542,
67,
12429,
67,
4210,
67,
... |
self.configXMLString = open(fileName).read() | self.openFile(fileName) | def __init__(self, fileName=None): if fileName: self.configXMLString = open(fileName).read() | 8e16cfd107c373f30f9fc5b591ff15092d8f634e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6393/8e16cfd107c373f30f9fc5b591ff15092d8f634e/gsa_admin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3968,
33,
7036,
4672,
309,
3968,
30,
365,
18,
1425,
4201,
780,
273,
1696,
12,
17812,
2934,
896,
1435,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3968,
33,
7036,
4672,
309,
3968,
30,
365,
18,
1425,
4201,
780,
273,
1696,
12,
17812,
2934,
896,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
tag_list, notag_only = self.get_selected_tags() | if self.tag_active: tag_list, notag_only = self.previous_tag else: tag_list, notag_only = self.get_selected_tags() | def is_task_visible(self, task): """Returns True if the task meets the criterion to be displayed @param task: the task to assess """ | 3de01fe23181b3554804a97d98603435ca30e1cc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/3de01fe23181b3554804a97d98603435ca30e1cc/browser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
353,
67,
4146,
67,
8613,
12,
2890,
16,
1562,
4672,
3536,
1356,
1053,
309,
326,
1562,
1791,
2413,
326,
11498,
358,
506,
10453,
632,
891,
225,
1562,
30,
326,
1562,
358,
1551,
403,
3536,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
353,
67,
4146,
67,
8613,
12,
2890,
16,
1562,
4672,
3536,
1356,
1053,
309,
326,
1562,
1791,
2413,
326,
11498,
358,
506,
10453,
632,
891,
225,
1562,
30,
326,
1562,
358,
1551,
403,
3536,
... |
self.assertEquals(1, mod.a) | self.assertEqual(mod.a, 1) | def test_issue5604(self): # Test cannot cover imp.load_compiled function. # Martin von Loewis note what shared library cannot have non-ascii # character because init_xxx function cannot be compiled # and issue never happens for dynamic modules. # But sources modified to follow generic way for processing pathes. | 9515781585d6d0dd37aa3e1bece0b365380f454b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3187/9515781585d6d0dd37aa3e1bece0b365380f454b/test_imp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
67,
13882,
4313,
3028,
12,
2890,
4672,
468,
7766,
2780,
5590,
1646,
18,
945,
67,
19397,
445,
18,
468,
490,
485,
267,
331,
265,
3176,
359,
291,
4721,
4121,
5116,
5313,
2780,
1240,
... |
if "orm" in new[1][0] and "orm" not in old[1][0]: try: return old[1][0] != new[1][0].split("'")[1].split(".")[1] except IndexError: pass return old[1][0] != new[1][0] | if new[1] and old[1]: if "orm" in new[1][0] and "orm" not in old[1][0]: try: return old[1][0] != new[1][0].split("'")[1].split(".")[1] except IndexError: pass return old[1][0] != new[1][0] else: return old != new | def different_attributes(old, new): # If they're not triples, just do normal comparison if not isinstance(old, (list, tuple)) or not isinstance(new, (list, tuple)): return old != new # If the first bit is different, check it's not by dj.db.models... if old[0] != new[0]: if old[0].startswith("models.") and (new[0].startswith("django.db.models") \ or new[0].startswith("django.contrib.gis")): if old[0].split(".")[-1] != new[0].split(".")[-1]: return True # If the third bits or end of second are different, it really is different. if old[2] != new[2] or old[1][1:] != new[1][1:]: return True if not old[1] and not new[1]: return False # Compare first positional arg if "orm" in new[1][0] and "orm" not in old[1][0]: # Do special comparison to fix #153 try: return old[1][0] != new[1][0].split("'")[1].split(".")[1] except IndexError: pass # Fall back to next comparison return old[1][0] != new[1][0] | 6a1cd3000d2ac8b95282da6d105773186342da04 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/13142/6a1cd3000d2ac8b95282da6d105773186342da04/startmigration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3775,
67,
4350,
12,
1673,
16,
394,
4672,
468,
971,
2898,
4565,
486,
22388,
16,
2537,
741,
2212,
5826,
309,
486,
1549,
12,
1673,
16,
261,
1098,
16,
3193,
3719,
578,
486,
1549,
12,
2704,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3775,
67,
4350,
12,
1673,
16,
394,
4672,
468,
971,
2898,
4565,
486,
22388,
16,
2537,
741,
2212,
5826,
309,
486,
1549,
12,
1673,
16,
261,
1098,
16,
3193,
3719,
578,
486,
1549,
12,
2704,... |
try: port = int(host[i+1:]) except ValueError, msg: raise socket.error, str(msg) | port = int(host[i+1:]) | def _set_hostport(self, host, port): if port is None: i = host.find(':') if i >= 0: try: port = int(host[i+1:]) except ValueError, msg: raise socket.error, str(msg) host = host[:i] else: port = self.default_port self.host = host self.port = port | b8cf8c643debb47b9d1d784ea1fb20cffe27eb26 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/b8cf8c643debb47b9d1d784ea1fb20cffe27eb26/httplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
542,
67,
2564,
655,
12,
2890,
16,
1479,
16,
1756,
4672,
309,
1756,
353,
599,
30,
277,
273,
1479,
18,
4720,
2668,
2497,
13,
309,
277,
1545,
374,
30,
1756,
273,
509,
12,
2564,
63,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2564,
655,
12,
2890,
16,
1479,
16,
1756,
4672,
309,
1756,
353,
599,
30,
277,
273,
1479,
18,
4720,
2668,
2497,
13,
309,
277,
1545,
374,
30,
1756,
273,
509,
12,
2564,
63,... |
self.loadMap(gamedata.get('maplist')[gamedata.get('startingmap')]) | def __init__(self, eventmanager, gamedata): self.evtmngr = eventmanager self.evtmngr.registerObserver(self) pygame.init() screen = pygame.display.set_mode(screensize, DOUBLEBUF | fs) self._tiles = {} self._nothing = pygame.image.load("img/nothing.png").convert() self._missing = pygame.image.load("img/missing.png").convert() self._screen = screen self._sprites = [] self.sprites = [] # This is a temp var, the raw data is loaded here then moved to _sprites self._player = None self._staff = None self._npc = [] self._location = gamedata.get('playerlocation') self._map = [] self._mapinfo = {} self._offset = [0, 0] self._display = True self._displaymsg = False self._msgbox = BottomMessageBox(self._screen, eventmanager) self._messages = () self.ego = None screenSize = self._screen.get_size() self._screenCenter = [ (screenSize[0]/2), (screenSize[1]/2) ] self.loadMap(gamedata.get('maplist')[gamedata.get('startingmap')]) # this is temp I think, probably should be in the game object self.addPlayer(gamedata.get('playerimage'), gamedata.get('playerlocation'), gamedata.get('playerstats')) | 7477df1b6776b8e72264a93acf78b0767356cf82 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11641/7477df1b6776b8e72264a93acf78b0767356cf82/tileengine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
871,
4181,
16,
314,
2808,
396,
4672,
365,
18,
73,
11734,
13607,
3197,
273,
871,
4181,
365,
18,
73,
11734,
13607,
3197,
18,
4861,
11048,
12,
2890,
13,
239... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
871,
4181,
16,
314,
2808,
396,
4672,
365,
18,
73,
11734,
13607,
3197,
273,
871,
4181,
365,
18,
73,
11734,
13607,
3197,
18,
4861,
11048,
12,
2890,
13,
239... | |
self.addnstr(' ', 1) | self.win.addch(' ') | def write_text(self, y, x, txt, color, colorized): """ write the text of a line. """ txt = txt if not colorized: if color: self.win.attron(curses.color_pair(color)) self.addstr(y, x, txt) if color: self.win.attroff(curses.color_pair(color)) | 53a5536cf12cbe8474f37b1c8e31b60489b2b62f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9814/53a5536cf12cbe8474f37b1c8e31b60489b2b62f/window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
955,
12,
2890,
16,
677,
16,
619,
16,
6463,
16,
2036,
16,
2036,
1235,
4672,
3536,
1045,
326,
977,
434,
279,
980,
18,
3536,
6463,
273,
6463,
309,
486,
2036,
1235,
30,
309,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1045,
67,
955,
12,
2890,
16,
677,
16,
619,
16,
6463,
16,
2036,
16,
2036,
1235,
4672,
3536,
1045,
326,
977,
434,
279,
980,
18,
3536,
6463,
273,
6463,
309,
486,
2036,
1235,
30,
309,
20... |
if any(g1): g1 /= p.norm(g1) | if any(g1): g1 /= p.norm(g1) else: p.istop = 103 if p.point(x).isFeas(False) else -103 return | def __solver__(self, p): h0 = self.h0 | 0034fc2438405fabb74c74b111b9b3cfa5ac8601 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6196/0034fc2438405fabb74c74b111b9b3cfa5ac8601/gsubg_oo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
27198,
972,
12,
2890,
16,
293,
4672,
225,
366,
20,
273,
365,
18,
76,
20,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
27198,
972,
12,
2890,
16,
293,
4672,
225,
366,
20,
273,
365,
18,
76,
20,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
is_multiple = getattr(type, 'multiple', False) | def get_form_value(self, name, default=None, type=String): request = self.request | 6e66ffd22957a01d0ee57ad2866ced9cd2ad39b2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12681/6e66ffd22957a01d0ee57ad2866ced9cd2ad39b2/context.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
687,
67,
1132,
12,
2890,
16,
508,
16,
805,
33,
7036,
16,
618,
33,
780,
4672,
590,
273,
365,
18,
2293,
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,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
687,
67,
1132,
12,
2890,
16,
508,
16,
805,
33,
7036,
16,
618,
33,
780,
4672,
590,
273,
365,
18,
2293,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... | |
do_cmd("gcc -Wall -O3 tpmain.c $FLAGS -lm -o tinypy") | do_cmd("gcc $WFLAGS -O3 tpmain.c $FLAGS -lm -o tinypy") | def build_gcc(): #compat = '-compat' in sys.argv #if compat: do_cmd("gcc -std=c89 -Wall -g vmmain.c $FLAGS -lm -o vm-c89") #if compat: do_cmd("g++ -Wall -g vmmain.c $FLAGS -lm -o vm-cpp") #if compat: do_cmd("gcc -std=c89 -Wall -g tpmain.c $FLAGS -lm -o tinypy-c89") #if compat: do_cmd("g++ -Wall -g tpmain.c $FLAGS -lm -o tinypy-cpp") mods = CORE[:] do_chdir(os.path.join(TOPDIR,'tinypy')) if TEST: mods.append('tests') do_cmd("gcc -std=c89 -Wall -g vmmain.c $FLAGS -lm -o vm") do_cmd('python tests.py $SYS') for mod in mods: py2bc('python py2bc.py $SRC $DEST',mod) else: for mod in mods: py2bc('python py2bc.py $SRC $DEST -nopos',mod) if BOOT: do_cmd('$VM tests.tpc $SYS') for mod in mods: py2bc('$VM py2bc.tpc $SRC $DEST',mod) build_bc() do_cmd("gcc -std=c89 -Wall -g tpmain.c $FLAGS -lm -o tinypy") #second pass - builts optimized binaries and stuff if BOOT: do_cmd('$TINYPY tests.py $SYS') for mod in mods: py2bc('$TINYPY py2bc.py $SRC $DEST -nopos',mod) build_bc(True) if BOOT: do_cmd("gcc -std=c89 -Wall -O2 tpmain.c $FLAGS -lm -o tinypy") do_cmd('$TINYPY tests.py $SYS') print("# OK - we'll try -O3 for extra speed ...") do_cmd("gcc -Wall -O3 tpmain.c $FLAGS -lm -o tinypy") do_cmd('$TINYPY tests.py $SYS') do_cmd("gcc -std=c89 -Wall -O3 mymain.c $FLAGS -lm -o ../build/tinypy") do_chdir('..') if TEST: test_mods('./build/tinypy $TESTS') print("# OK") | 50de20088b9b472fa66345155d25e4f1484af0b9 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3895/50de20088b9b472fa66345155d25e4f1484af0b9/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
75,
952,
13332,
468,
16239,
273,
2400,
16239,
11,
316,
2589,
18,
19485,
468,
430,
4796,
30,
741,
67,
4172,
2932,
75,
952,
300,
5084,
33,
71,
6675,
300,
26558,
300,
75,
4268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
75,
952,
13332,
468,
16239,
273,
2400,
16239,
11,
316,
2589,
18,
19485,
468,
430,
4796,
30,
741,
67,
4172,
2932,
75,
952,
300,
5084,
33,
71,
6675,
300,
26558,
300,
75,
4268,
... |
self.sip_address_editor.regexp = re.compile('^[^@]+@.+$') | self.sip_address_editor.regexp = re.compile('^[^@\s]+@[^@\s]+$') | def __init__(self, parent=None): super(AddAccountDialog, self).__init__(parent) with Resources.directory: self.setupUi(self) self.background_frame.setStyleSheet("") self.button_group = QButtonGroup(self) self.button_group.setObjectName("button_group") self.button_group.addButton(self.add_account_button, self.panel_view.indexOf(self.add_account_panel)) self.button_group.addButton(self.create_account_button, self.panel_view.indexOf(self.create_account_panel)) font = self.title_label.font() font.setPointSizeF(self.info_label.fontInfo().pointSizeF() + 3) font.setFamily("Sans Serif") self.title_label.setFont(font) font_metrics = self.create_status_label.fontMetrics() self.create_status_label.setMinimumHeight(font_metrics.height() + 2*(font_metrics.height() + font_metrics.leading())) # reserve space for 3 lines font_metrics = self.email_note_label.fontMetrics() self.email_note_label.setMinimumWidth(font_metrics.width(u'The E-mail address is used when sending voicemail')) # hack to make text justification look nice everywhere self.add_account_button.setChecked(True) self.panel_view.setCurrentWidget(self.add_account_panel) self.new_password_editor.textChanged.connect(self._SH_PasswordTextChanged) self.button_group.buttonClicked[int].connect(self._SH_PanelChangeRequest) self.accept_button.clicked.connect(self._SH_AcceptButtonClicked) self.display_name_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.name_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.username_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.sip_address_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.new_password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.verify_password_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.email_address_editor.statusChanged.connect(self._SH_ValidityStatusChanged) self.display_name_editor.regexp = re.compile('^.*$') self.name_editor.regexp = re.compile('^.+$') self.username_editor.regexp = re.compile('^\w(?<=[^0_])[\w.-]{1,65}(?<=[^_.-])$', re.IGNORECASE) # in order to enable unicode characters add re.UNICODE to flags self.sip_address_editor.regexp = re.compile('^[^@]+@.+$') self.password_editor.regexp = re.compile('^.*$') self.new_password_editor.regexp = re.compile('^.{8,}$') self.verify_password_editor.regexp = re.compile('^$') self.email_address_editor.regexp = re.compile('^[^@]+@.+$') | e17f46711b328aea3e2e75bcdf73b3136cb90ea4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3447/e17f46711b328aea3e2e75bcdf73b3136cb90ea4/accounts.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
4672,
2240,
12,
986,
3032,
6353,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
598,
8128,
18,
5149,
30,
365,
18,
8401,
13943,
12,
2890,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
982,
33,
7036,
4672,
2240,
12,
986,
3032,
6353,
16,
365,
2934,
972,
2738,
972,
12,
2938,
13,
598,
8128,
18,
5149,
30,
365,
18,
8401,
13943,
12,
2890,
1... |
print [type_is_compatible(spec, a) for (spec,a) in zip(newinargs, args)] | def func(*args, **kwargs): logging.debug('Interface %s %s' % (cls, name)) | 285bea0f38d41d837fa13cd788edb2ebb4a1477a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/285bea0f38d41d837fa13cd788edb2ebb4a1477a/oo_fortran.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1326,
30857,
1968,
16,
2826,
4333,
4672,
2907,
18,
4148,
2668,
1358,
738,
87,
738,
87,
11,
738,
261,
6429,
16,
508,
3719,
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,
0,
0,
0,
0,
0,
0,
0,
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,
1326,
30857,
1968,
16,
2826,
4333,
4672,
2907,
18,
4148,
2668,
1358,
738,
87,
738,
87,
11,
738,
261,
6429,
16,
508,
3719,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | |
print realpath, ext_path, lib_filename | ext.install_shared_link = (lib_filename, self.get_ext_filename(ext.name)) | def build_extension(self, ext): if isinstance(ext, LibStatic): self.build_static(ext) elif isinstance(ext, PyXtractExtension): self.build_pyxtract(ext) else: build_ext.build_extension(self, ext) if isinstance(ext, PyXtractSharedExtension): # Make lib{name}.so link to {name}.so from distutils.file_util import copy_file ext_path = self.get_ext_fullpath(ext.name) ext_path, ext_filename = os.path.split(ext_path) realpath = os.path.realpath(os.curdir) print realpath, ext_path try: os.chdir(ext_path) | ad3fbdbed0c9703748367731c313d3ee909fdecd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6366/ad3fbdbed0c9703748367731c313d3ee909fdecd/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
6447,
12,
2890,
16,
1110,
4672,
309,
1549,
12,
408,
16,
10560,
5788,
4672,
365,
18,
3510,
67,
3845,
12,
408,
13,
1327,
1549,
12,
408,
16,
4707,
60,
1575,
3625,
4672,
365,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
67,
6447,
12,
2890,
16,
1110,
4672,
309,
1549,
12,
408,
16,
10560,
5788,
4672,
365,
18,
3510,
67,
3845,
12,
408,
13,
1327,
1549,
12,
408,
16,
4707,
60,
1575,
3625,
4672,
365,
1... |
Optional keyword arguments are given in the following table. +----------+-------------------------------------------------+---------+ | Keyword | Description | Default | +==========+=================================================+=========+ | A | the matrix defining linear equality constraints | None | +----------+-------------------------------------------------+---------+ | rhs | a nonzero right-hand side of the constraints | None | +----------+-------------------------------------------------+---------+ | H | the explicit matrix H (with matvec method) | None | +----------+-------------------------------------------------+---------+ | matvec | a method to compute H-vector products | None | +----------+-------------------------------------------------+---------+ | precon | a preconditioner G (given explicitly) | Identity| +----------+-------------------------------------------------+---------+ | Proj | an existing factorization of the projection | | | | matrix conforming to the LBLContext | None | +----------+-------------------------------------------------+---------+ | abstol | the absolute stopping tolerance | 1.0e-8 | +----------+-------------------------------------------------+---------+ | reltol | the relative stopping tolerance | 1.0e-6 | +----------+-------------------------------------------------+---------+ | maxiter | the maximum number of iterations | 2n | +----------+-------------------------------------------------+---------+ | max_itref| the maximum number of iterative refinement steps| 3 | +----------+-------------------------------------------------+---------+ | itref_tol| the required threshold for the residual after | | | | iterative refinement | 1.0e-6 | +----------+-------------------------------------------------+---------+ | radius | trust-region radius | None | +----------+-------------------------------------------------+---------+ | btol | fraction-to-the-boundary factor | None | +----------+-------------------------------------------------+---------+ | cur_iter | a vector related to btol (see below) | None | +----------+-------------------------------------------------+---------+ | factorize| set to False if calling again with the same A | True | +----------+-------------------------------------------------+---------+ | debug | a boolean indicating debug/verbose mode | False | +----------+-------------------------------------------------+---------+ If specified, a positive factor btol will cause the algorithm to enforce all conjugate gradient iterates to satisfy sk >= btol. Typically, in an interior-point methods calling ppcg(), the step computed at iteration k must be such that | :keywords: :A: the matrix defining linear equality constraints (None) :rhs: a nonzero right-hand side of the constraints (None) :H: the explicit matrix H (with matvec method) (None) :matvec: a method to compute H-vector products (None) :precon: a preconditioner G (given explicitly) (Identity) :Proj: an existing factorization of the projection matrix conforming to the LBLContext (None) :abstol: the absolute stopping tolerance (1.0e-8) :reltol: the relative stopping tolerance (1.0e-6) :maxiter: the maximum number of iterations (2n) :max_itref: the maximum number of iterative refinement steps (3) :itref_tol: the required threshold for the residual after iterative refinement (1.0e-6) :radius: trust-region radius (None) :btol: fraction-to-the-boundary factor (None) :cur_iter: a vector related to btol (see below) (None) :factorize: set to `False` if calling again with the same constraint matrix `A` (True) :debug: a boolean indicating debug/verbose mode (False) If specified, a positive factor `btol` will cause the algorithm to enforce all conjugate gradient iterates to satisfy sk >= btol. Typically, in an interior-point methods calling `ppcg()`, the step computed at iteration k must be such that | def __init__( self, c, **kwargs ): """ Solve the equality-constrained quadratic programming problem | 13d679a16d231ffa56faf4521258f050db7be423 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13857/13d679a16d231ffa56faf4521258f050db7be423/ppcg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
365,
16,
276,
16,
2826,
4333,
262,
30,
3536,
348,
5390,
326,
14958,
17,
591,
31142,
26146,
5402,
11987,
6199,
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,
1001,
2738,
972,
12,
365,
16,
276,
16,
2826,
4333,
262,
30,
3536,
348,
5390,
326,
14958,
17,
591,
31142,
26146,
5402,
11987,
6199,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
log(5, 'Deeply odd, two pkgs of same arch and same version %s - %s' % (name, currentarch)) | log(5, 'Deeply odd, two pkgs of same version but different arch %s - %s and %s' % (name, otherarch, finalarch)) | def getupdatedhdrlist(headernevral, rpmnevral): "returns (name, arch) tuples of updated and uninstalled pkgs" uplist = [] newlist = [] uplist_archdict = {} for (name, arch) in headernevral.NAkeys(): # this is all hard and goofy to deal with pkgs changing arch # if we have the package installed # check to see if we have that specific arch # if so compare that name,arch vs the bestarch in the rpmdb # this deals with us having 2.4.9-31.i686 kernels installed AND 2.4.18-4.athlon kernels installed # b/c a 2.4.18-4.i686 would constantly showed up on an athlon # if its newer then mark it as updateable # if we don't have that specific arch, then if its the best arch in the headernevral, compare # it to what we have, if its newer then mark it as updateable if rpmnevral.exists(name): archlist = archwork.availablearchs(rpmnevral, name) finalarch = archlist.pop() if len(archlist) > 1: log(4, 'multiple archs in rpmdb for pkg: %s' % name) for otherarch in archlist: rc = compareEVR(rpmnevral.evr(name, finalarch), rpmnevral.evr(name, otherarch)) if rc > 0: pass elif rc < 0: finalarch = otherarch elif rc == 0: log(5, 'Deeply odd, two pkgs of same arch and same version %s - %s' % (name, currentarch)) # at this point we know that name+finalarch is the highest version of the pkgname on the system # we compare this best version vs the best version and bestarch in the headernevral # if the headernevral one is newer then we mark it as updateable # the rpmnevral one is newer or the same version then we move along archlist = archwork.availablearchs(headernevral, name) hdr_finalarch = archlist.pop() if len(archlist) > 1: for otherarch in archlist: rc = compareEVR(headernevral.evr(name, hdr_finalarch), headernevral.evr(name, otherarch)) if rc > 0: pass elif rc < 0: hdr_finalarch = otherarch elif rc == 0: log(5, 'Deeply odd, two pkgs of same arch and same version %s - %s' % (name, currentarch)) # we can continue though, b/c if they are same we have an odd state but the same version info # right now we know that name+hdr_finalarch is the best version of the bestarch available in the headerinfo rc = compareEVR(headernevral.evr(name, hdr_finalarch), rpmnevral.evr(name, finalarch) # so we do the comparison to the best we have on the system if (rc > 0): #look it's newer and we don't have it - add it to the list and finish if not uplist_archdict.has_key(name): uplist_archdict[name]=hdr_finalarch #it's newer and we already have one so lets compare them in arch and ver else: rc = compareEVR(headernevral.evr(name, hdr_finalarch), headernevral.evr(name, uplist_archdict[name])) if (rc > 0): updating_finalarch = archwork.bestarch([hdr_finalarch, uplist_archdict[name]]) if updating_finalarch == hdr_finalarch: uplist_archdict[name]=hdr_finalarch else: newlist.append((name, arch)) for name in uplist_archdict.keys(): uplist.append((name,uplist_archdict[name])) nulist=uplist+newlist return (uplist, newlist, nulist) | 9c902b18c74b251a7435b4fb3c9f0b3db4a01184 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5445/9c902b18c74b251a7435b4fb3c9f0b3db4a01184/clientStuff.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
7007,
16587,
1098,
12,
3374,
4644,
18090,
287,
16,
25228,
4644,
18090,
287,
4672,
315,
6154,
261,
529,
16,
6637,
13,
10384,
434,
3526,
471,
640,
13435,
16922,
6,
582,
17842,
273,
53... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
7007,
16587,
1098,
12,
3374,
4644,
18090,
287,
16,
25228,
4644,
18090,
287,
4672,
315,
6154,
261,
529,
16,
6637,
13,
10384,
434,
3526,
471,
640,
13435,
16922,
6,
582,
17842,
273,
53... |
Technically, only a <mailbox> is allowed. In addition, email addresses without a domain are permitted. Addresses will not be modified if they are already quoted (actually if they begin with '<' and end with '>'.""" if re.match('(?s)\A<.*>\Z', addr): | Should be able to handle anything rfc822.parseaddr can handle.""" m=None try: m=rfc822.parseaddr(addr)[1] except AttributeError: pass if not m: | def quoteaddr(addr): """Quote a subset of the email addresses defined by RFC 821. Technically, only a <mailbox> is allowed. In addition, email addresses without a domain are permitted. Addresses will not be modified if they are already quoted (actually if they begin with '<' and end with '>'.""" if re.match('(?s)\A<.*>\Z', addr): return addr localpart = None domain = '' try: at = string.rindex(addr, '@') localpart = addr[:at] domain = addr[at:] except ValueError: localpart = addr pat = re.compile(r'([<>()\[\]\\,;:@\"\001-\037\177])') return '<%s%s>' % (pat.sub(r'\\\1', localpart), domain) | b53321523f44f7b87ad0ed1b092a122fac3ee02a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2120/b53321523f44f7b87ad0ed1b092a122fac3ee02a/smtplib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4914,
684,
3069,
12,
4793,
4672,
3536,
10257,
279,
7931,
434,
326,
2699,
6138,
2553,
635,
8372,
1725,
5340,
18,
225,
9363,
506,
7752,
358,
1640,
6967,
16590,
24532,
18,
2670,
4793,
848,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4914,
684,
3069,
12,
4793,
4672,
3536,
10257,
279,
7931,
434,
326,
2699,
6138,
2553,
635,
8372,
1725,
5340,
18,
225,
9363,
506,
7752,
358,
1640,
6967,
16590,
24532,
18,
2670,
4793,
848,
... |
class TestPageHandler(BaseHTTPServer.BaseHTTPRequestHandler): | class SyncHTTPServer(StoppableHTTPServer): """An HTTP server that handles sync commands.""" def __init__(self, server_address, request_handler_class): import chromiumsync self._sync_handler = chromiumsync.TestServer() StoppableHTTPServer.__init__(self, server_address, request_handler_class) def HandleCommand(self, query, raw_request): return self._sync_handler.HandleCommand(query, raw_request) class BasePageHandler(BaseHTTPServer.BaseHTTPRequestHandler): def __init__(self, request, client_address, socket_server, connect_handlers, get_handlers, post_handlers, put_handlers): self._connect_handlers = connect_handlers self._get_handlers = get_handlers self._post_handlers = post_handlers self._put_handlers = put_handlers BaseHTTPServer.BaseHTTPRequestHandler.__init__( self, request, client_address, socket_server) def log_request(self, *args, **kwargs): pass def _ShouldHandleRequest(self, handler_name): """Determines if the path can be handled by the handler. We consider a handler valid if the path begins with the handler name. It can optionally be followed by "?*", "/*". """ pattern = re.compile('%s($|\?|/).*' % handler_name) return pattern.match(self.path) def do_CONNECT(self): for handler in self._connect_handlers: if handler(): return def do_GET(self): for handler in self._get_handlers: if handler(): return def do_POST(self): for handler in self._post_handlers: if handler(): return def do_PUT(self): for handler in self._put_handlers: if handler(): return class TestPageHandler(BasePageHandler): | def handshake(self, tlsConnection): """Creates the SSL connection.""" try: tlsConnection.handshakeServer(certChain=self.cert_chain, privateKey=self.private_key, sessionCache=self.session_cache, reqCert=self.ssl_client_auth, settings=self.ssl_handshake_settings, reqCAs=self.ssl_client_cas) tlsConnection.ignoreAbruptClose = True return True except tlslite.api.TLSAbruptCloseError: # Ignore abrupt close. return True except tlslite.api.TLSError, error: print "Handshake failure:", str(error) return False | a358fd8076527132d37e0262823abe3807da16b8 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/9392/a358fd8076527132d37e0262823abe3807da16b8/testserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11942,
12,
2890,
16,
6871,
1952,
4672,
3536,
2729,
326,
7419,
1459,
12123,
775,
30,
6871,
1952,
18,
2349,
7478,
2081,
12,
7593,
3893,
33,
2890,
18,
7593,
67,
5639,
16,
11896,
33,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11942,
12,
2890,
16,
6871,
1952,
4672,
3536,
2729,
326,
7419,
1459,
12123,
775,
30,
6871,
1952,
18,
2349,
7478,
2081,
12,
7593,
3893,
33,
2890,
18,
7593,
67,
5639,
16,
11896,
33,
2890,
... |
self.assertEqual(getattr(hashlib, algorithm_name)(u'spam').hexdigest(), expected) self.assertEqual(hashlib.new(algorithm_name, u'spam').hexdigest(), expected) | self.check(algorithm_name, u'spam', expected) | def check_unicode(self, algorithm_name): # Unicode objects are not allowed as input. expected = hashlib.new(algorithm_name, str(u'spam')).hexdigest() self.assertEqual(getattr(hashlib, algorithm_name)(u'spam').hexdigest(), expected) self.assertEqual(hashlib.new(algorithm_name, u'spam').hexdigest(), expected) | 5b0af209671f6b599785bdbb63aeda2084e24898 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12029/5b0af209671f6b599785bdbb63aeda2084e24898/test_hashlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
866,
67,
9124,
12,
2890,
16,
4886,
67,
529,
4672,
468,
9633,
2184,
854,
486,
2935,
487,
810,
18,
2665,
273,
15956,
18,
2704,
12,
12743,
67,
529,
16,
609,
12,
89,
1807,
84,
301,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
9124,
12,
2890,
16,
4886,
67,
529,
4672,
468,
9633,
2184,
854,
486,
2935,
487,
810,
18,
2665,
273,
15956,
18,
2704,
12,
12743,
67,
529,
16,
609,
12,
89,
1807,
84,
301,
6134,... |
print """Program usage: | print("""Program usage: | def get_url(self): return (_REQ_URL + ('&' if _REQ_URL.find('?') > -1 else '?') + urllib.urlencode(self.post) ) | dd568e81c1b8182cd4ce3412e911e6ca45e46cbd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7908/dd568e81c1b8182cd4ce3412e911e6ca45e46cbd/bsag.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
718,
12,
2890,
4672,
327,
261,
67,
20373,
67,
1785,
397,
7707,
26045,
309,
389,
20373,
67,
1785,
18,
4720,
2668,
4899,
13,
405,
300,
21,
469,
6787,
13,
397,
11527,
18,
718,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
718,
12,
2890,
4672,
327,
261,
67,
20373,
67,
1785,
397,
7707,
26045,
309,
389,
20373,
67,
1785,
18,
4720,
2668,
4899,
13,
405,
300,
21,
469,
6787,
13,
397,
11527,
18,
718,
... |
def adjust_video_frame(self): | def get_video_frame(self): | def adjust_video_frame(self): frame = self.view.frame() frame.origin = self.view.convertPoint_toView_(NSZeroPoint, nil) frame.origin.x = 0 frame.origin = self.view.window().convertBaseToScreen_(frame.origin) frame.size = (self.view.window().frame().size.width, frame.size.height) self.video_window.setFrame_display_(frame, YES) | eaca871cffee1fa168c61bbf17ca2b8d57b6b6e2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12354/eaca871cffee1fa168c61bbf17ca2b8d57b6b6e2/video.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9115,
67,
3789,
12,
2890,
4672,
2623,
273,
365,
18,
1945,
18,
3789,
1435,
2623,
18,
10012,
273,
365,
18,
1945,
18,
6283,
2148,
67,
869,
1767,
67,
12,
3156,
7170,
2148,
16,
5... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
9115,
67,
3789,
12,
2890,
4672,
2623,
273,
365,
18,
1945,
18,
3789,
1435,
2623,
18,
10012,
273,
365,
18,
1945,
18,
6283,
2148,
67,
869,
1767,
67,
12,
3156,
7170,
2148,
16,
5... |
makemakefile.makemakefile(outfp, somevars, files, target) | makemakefile.makemakefile(outfp, somevars, files, base_target) | def main(): # overridable context prefix = PREFIX # settable with -p option exec_prefix = None # settable with -P option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:P:') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-e': extensions.append(a) if o == '-p': prefix = a if o == '-P': exec_prefix = a # default exec_prefix if exec_prefix is None: exec_prefix = EXEC_PREFIX if exec_prefix is None: exec_prefix = prefix # locations derived from options binlib = os.path.join(exec_prefix, 'lib/python1.4/config') incldir = os.path.join(prefix, 'include/python1.4') config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') getpath_c = os.path.join(binlib, 'getpath.c') supp_sources = [frozenmain_c, getpath_c] makefile_in = os.path.join(binlib, 'Makefile') defines = ['-DPYTHONPATH=\\"$(PYTHONPATH)\\"'] includes = ['-I' + incldir, '-I' + binlib] # sanity check of directories and files for dir in [prefix, exec_prefix, binlib, incldir] + extensions: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) for file in [config_c_in, makefile_in] + supp_sources: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that the script name ends in ".py" if args[0][-3:] != ".py": usage('the script name must have a .py suffix') # check that file arguments exist for arg in args: if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # Actual work starts here... dict = findmodules.findmodules(scriptfile, modules, path) names = dict.keys() names.sort() print "Modules being frozen:" for name in names: print '\t', name backup = frozen_c + '~' try: os.rename(frozen_c, backup) except os.error: backup = None outfp = open(frozen_c, 'w') try: makefreeze.makefreeze(outfp, dict) finally: outfp.close() if backup: if cmp.cmp(backup, frozen_c): sys.stderr.write('%s not changed, not written\n' % frozen_c) os.rename(backup, frozen_c) builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod] == '<builtin>': builtins.append(mod) elif dict[mod] == '<unknown>': unknown.append(mod) addfiles = [] if unknown: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) builtins.sort() infp = open(config_c_in) backup = config_c + '~' try: os.rename(config_c, backup) except os.error: backup = None outfp = open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() if backup: if cmp.cmp(backup, config_c): sys.stderr.write('%s not changed, not written\n' % config_c) os.rename(backup, config_c) cflags = defines + includes + ['$(OPT)'] libs = [] for n in 'Modules', 'Python', 'Objects', 'Parser': n = 'lib%s.a' % n n = os.path.join(binlib, n) libs.append(n) makevars = parsesetup.getmakevars(makefile_in) somevars = {} for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override files = ['$(OPT)', '$(LDFLAGS)', config_c, frozen_c] + \ supp_sources + addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] backup = makefile + '~' try: os.rename(makefile, backup) except os.error: backup = None outfp = open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, target) finally: outfp.close() if backup: if not cmp.cmp(backup, makefile): print 'previous Makefile saved as', backup else: sys.stderr.write('%s not changed, not written\n' % makefile) os.rename(backup, makefile) # Done! print 'Now run make to build the target:', target | e0f06b7719c1ddb50626fcd0d9e5e27e91b52eb7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/e0f06b7719c1ddb50626fcd0d9e5e27e91b52eb7/freeze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
202,
202,
7,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
1196,
67,
3239,
273,
599,
202,
202,
7,
444,
2121,
598,
300,
52,
1456,
4418,
273,
5378... |
Torsion subgroup of Jacobian of the modular curve associated to the congruence subgroup Gamma0(42) | Torsion subgroup of Abelian variety J0(42) of dimension 5 | def abelian_variety(self): """ Return the abelian variety that this is a finite subgroup of. | eb9efe5a3672197152ba6768f35a60fd75d084aa /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9417/eb9efe5a3672197152ba6768f35a60fd75d084aa/finite_subgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1223,
292,
2779,
67,
4093,
14369,
12,
2890,
4672,
3536,
2000,
326,
1223,
292,
2779,
1394,
14369,
716,
333,
353,
279,
25922,
720,
1655,
434,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
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,
1223,
292,
2779,
67,
4093,
14369,
12,
2890,
4672,
3536,
2000,
326,
1223,
292,
2779,
1394,
14369,
716,
333,
353,
279,
25922,
720,
1655,
434,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
print ReturnCMDStatus | def command(self, cmd, parameter={}, option=[]): """ Send a command with paramters and options to the TS3 Query. @param cmd: The command who wants to send. @type cmd: str @param parameter: A dict with paramters and value. Example: sid=2 --> {'sid':'2'} @type cmd: dict @param option: A list with options. Example: –uid --> ['uid'] @type option: list @return: The answer of the server as tulpe with error code and message. """ telnetCMD = cmd for key in parameter: telnetCMD += " %s=%s" % (key, self.string2escaping(parameter[key])) for i in option: telnetCMD += " -%s" % (i) telnetCMD += '\n' self.telnet.write(telnetCMD) telnetResponse = self.telnet.read_until("msg=ok", self.Timeout) telnetResponse = telnetResponse.split(r'error id=') notParsedCMDStatus = "id=" + telnetResponse[1] print notParsedCMDStatus notParsedInfo = telnetResponse[0].split('|') if (cmd.endswith("list") == True) or (len(notParsedInfo) > 1): returnInfo = [] for notParsedInfoLine in notParsedInfo: ParsedInfo = self.TSRegex.findall(notParsedInfoLine) ParsedInfoDict = {} for ParsedInfoKey in ParsedInfo: ParsedInfoDict[ParsedInfoKey[0]] = self.escaping2string(ParsedInfoKey[1]) returnInfo.append(ParsedInfoDict) else: returnInfo = {} ParsedInfo = self.TSRegex.findall(notParsedInfo[0]) for ParsedInfoKey in ParsedInfo: returnInfo[ParsedInfoKey[0]] = self.escaping2string(ParsedInfoKey[1]) | 1c96c19f4a3cb15e76a9b8ae60d88d5e12386fff /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12780/1c96c19f4a3cb15e76a9b8ae60d88d5e12386fff/PyTS3.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
12,
2890,
16,
1797,
16,
1569,
28793,
1456,
33,
8526,
4672,
3536,
2479,
279,
1296,
598,
579,
5432,
471,
702,
358,
326,
15508,
23,
2770,
18,
632,
891,
1797,
30,
1021,
1296,
10354,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1296,
12,
2890,
16,
1797,
16,
1569,
28793,
1456,
33,
8526,
4672,
3536,
2479,
279,
1296,
598,
579,
5432,
471,
702,
358,
326,
15508,
23,
2770,
18,
632,
891,
1797,
30,
1021,
1296,
10354,
... | |
table_list = subscriber_tables | table_list = ['*.*'] | def subscriber_remove_tables(self, table_list): subscriber_tables = self.get_subscriber_table_list() if not table_list and self.options.all: table_list = subscriber_tables for tbl in table_list: tbl = skytools.fq_name(tbl) if tbl in subscriber_tables: self.log.info("Removing: %s" % tbl) self.subscriber_remove_one_table(tbl) else: self.log.info("Table %s already removed" % tbl) | 284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/14597/284fa9a4cbf1e2c69ebf17bbe3a4fd6ace8a2e18/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9467,
67,
4479,
67,
9373,
12,
2890,
16,
1014,
67,
1098,
4672,
9467,
67,
9373,
273,
365,
18,
588,
67,
26410,
67,
2121,
67,
1098,
1435,
309,
486,
1014,
67,
1098,
471,
365,
18,
2116,
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,
9467,
67,
4479,
67,
9373,
12,
2890,
16,
1014,
67,
1098,
4672,
9467,
67,
9373,
273,
365,
18,
588,
67,
26410,
67,
2121,
67,
1098,
1435,
309,
486,
1014,
67,
1098,
471,
365,
18,
2116,
18... |
be a numeric value in the range 0-1000 or one of ‘ultra-condensed’, ‘extra-condensed’, ‘condensed’, ‘semi-condensed’, ‘normal’, ‘semi-expanded’, ‘expanded’, ‘extra-expanded’ or ‘ultra-expanded’. | be a numeric value in the range 0-1000 or one of 'ultra-condensed', 'extra-condensed', 'condensed', 'semi-condensed', 'normal', 'semi-expanded', 'expanded', 'extra-expanded' or 'ultra-expanded'. | def wrapper(*args, **kwargs): if 'refresh' in kwargs: refresh = kwargs.pop('refresh') else: refresh = True mydata.nesting += 1 try: f(*args, **kwargs) finally: mydata.nesting -= 1 if hasattr(args[0], '_figure'): if refresh and mydata.nesting == 0 and args[0]._figure._auto_refresh: args[0]._figure.canvas.draw() | b79354183407be78e4f08dfa9825e4584a58d1b0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13232/b79354183407be78e4f08dfa9825e4584a58d1b0/decorators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4053,
30857,
1968,
16,
2826,
4333,
4672,
309,
296,
9144,
11,
316,
1205,
30,
4460,
273,
1205,
18,
5120,
2668,
9144,
6134,
469,
30,
4460,
273,
1053,
3399,
892,
18,
82,
10100,
1011,
404,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
16,
2826,
4333,
4672,
309,
296,
9144,
11,
316,
1205,
30,
4460,
273,
1205,
18,
5120,
2668,
9144,
6134,
469,
30,
4460,
273,
1053,
3399,
892,
18,
82,
10100,
1011,
404,
... |
titlestr=_('Structured Text table rendering error') return MessageDialog( title=titlestr, message=""" <b>%s</b> <p> %s <p> %s """ % (titlestr, _(""" Sorry, but a Structured Text table in this page gave an error while rendering. This happens due to incorrect spacing, the wrong number of column separators, etc. Please correct the table, following the Structured Text rules, or remove it, so that this page can be displayed. """), _("To edit this page, click OK."), ), action=self.page_url()+'/editform') | return StructuredTextTable([],'',subs,indent=paragraph.indent) | def doc_table(self, paragraph, expr = re.compile(r'\s*[+|][-+]+[+|]').match): try: text = paragraph.getColorizableTexts()[0] m = expr(text) | 3fb4ec06507d3572964f00d073ef469a13a803e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/5225/3fb4ec06507d3572964f00d073ef469a13a803e9/stx.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
67,
2121,
12,
2890,
16,
10190,
16,
3065,
273,
283,
18,
11100,
12,
86,
8314,
87,
26625,
15,
96,
6362,
17,
15,
3737,
63,
15,
96,
3864,
2934,
1916,
4672,
775,
30,
977,
565,
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,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
67,
2121,
12,
2890,
16,
10190,
16,
3065,
273,
283,
18,
11100,
12,
86,
8314,
87,
26625,
15,
96,
6362,
17,
15,
3737,
63,
15,
96,
3864,
2934,
1916,
4672,
775,
30,
977,
565,
273,
... |
return S_ERROR('Files not found') | req = "UPDATE T_%s SET JobID=%s WHERE FileID IN (%s);" % (transID,jobID,intListToString(fileIDs)) return self._update(req) def removeTransformation(self,transName): """ Remove the transformation specified by name """ res = self.getTransformation(transName) if not res['OK']: return res transID = res['Value']['TransID'] req = "DELETE FROM Transformations WHERE TransformationName='%s';" % transName res = self._update(req) if not res['OK']: return res req = "DROP TABLE IF EXISTS T_%s;" % transID res = self._update(req) if not res['OK']: return res self.filters = self.__getFilters() return S_OK() | def setFileJobID(self,name,jobID,lfns): """ Set file job ID for the given transformation identified by transID for the given stream for files in the list of lfns """ | d1afb271a8b0ccf92b67dfa3afc748418f55f0ce /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/12864/d1afb271a8b0ccf92b67dfa3afc748418f55f0ce/TransformationDB.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
2278,
734,
12,
2890,
16,
529,
16,
4688,
734,
16,
20850,
2387,
4672,
3536,
1000,
585,
1719,
1599,
364,
326,
864,
8620,
9283,
635,
906,
734,
364,
326,
864,
1407,
364,
1390,
316,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
19658,
2278,
734,
12,
2890,
16,
529,
16,
4688,
734,
16,
20850,
2387,
4672,
3536,
1000,
585,
1719,
1599,
364,
326,
864,
8620,
9283,
635,
906,
734,
364,
326,
864,
1407,
364,
1390,
316,
3... |
ImportError: there is no package called 'foobar' | ImportError: ... | def library(self, library_name): """ Load the library library_name into the R interpreter. | dc5d03b72e7d65a6b60083ef9ea58c9206e9393a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/dc5d03b72e7d65a6b60083ef9ea58c9206e9393a/r.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
12,
2890,
16,
5313,
67,
529,
4672,
3536,
4444,
326,
5313,
5313,
67,
529,
1368,
326,
534,
16048,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5313,
12,
2890,
16,
5313,
67,
529,
4672,
3536,
4444,
326,
5313,
5313,
67,
529,
1368,
326,
534,
16048,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
self.close_request(request) | self.shutdown_request(request) | def process_request_thread(self, request, client_address): """Same as in BaseServer but as a thread. | 1504671759885ceab7d3fa573b5bb649b26637bd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8125/1504671759885ceab7d3fa573b5bb649b26637bd/socketserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
67,
5930,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
8650,
487,
316,
3360,
2081,
1496,
487,
279,
2650,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
2293,
67,
5930,
12,
2890,
16,
590,
16,
1004,
67,
2867,
4672,
3536,
8650,
487,
316,
3360,
2081,
1496,
487,
279,
2650,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
def dice(self,x): | def dice(self,data): x=data | def dice(self,x): roll = [] # Dices we still need to roll [add/subtract, dice string] rolled = [] # Dices we have rolled: [add/subtract, dice string, result] | 0c2660358aa59fdccd838709058972b485f435cd /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/13227/0c2660358aa59fdccd838709058972b485f435cd/ropeserve.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
1812,
12,
2890,
16,
892,
4672,
619,
33,
892,
5824,
273,
5378,
468,
463,
1242,
732,
4859,
1608,
358,
5824,
306,
1289,
19,
1717,
1575,
16,
302,
1812,
533,
65,
28693,
273,
5378,
468,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
302,
1812,
12,
2890,
16,
892,
4672,
619,
33,
892,
5824,
273,
5378,
468,
463,
1242,
732,
4859,
1608,
358,
5824,
306,
1289,
19,
1717,
1575,
16,
302,
1812,
533,
65,
28693,
273,
5378,
468,... |
def RadioBox(self, value=0, label="", *args, **kwargs): radioBox = eg.RadioBox(self, -1, label, *args, **kwargs) | def RadioBox(self, value, choices, *args, **kwargs): kwargs["choices"] = choices radioBox = eg.RadioBox(self, *args, **kwargs) | def RadioBox(self, value=0, label="", *args, **kwargs): radioBox = eg.RadioBox(self, -1, label, *args, **kwargs) radioBox.SetValue(value) return radioBox | d6d14736725caf9ea267237a74f0e1115b8256ad /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8076/d6d14736725caf9ea267237a74f0e1115b8256ad/ControlProviderMixin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31552,
3514,
12,
2890,
16,
460,
16,
7246,
16,
380,
1968,
16,
2826,
4333,
4672,
1205,
9614,
11937,
11929,
273,
7246,
13512,
3514,
273,
9130,
18,
19984,
3514,
12,
2890,
16,
380,
1968,
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,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
31552,
3514,
12,
2890,
16,
460,
16,
7246,
16,
380,
1968,
16,
2826,
4333,
4672,
1205,
9614,
11937,
11929,
273,
7246,
13512,
3514,
273,
9130,
18,
19984,
3514,
12,
2890,
16,
380,
1968,
16,
... |
extract_old_files(i[1], path) | self.extract_old_files(i[1], path) | def extract_old_files(self, l, path): for i in l: name = i[0] if type(i[1]) != type([]): # A file. load, exec_addr, length = i[2], i[3], i[4] if filetypes == 0: # Load and execution addresses assumed to be valid. # Create the INF file out_file = os.path.join(path, name) inf_file = os.path.join(path, name) + suffix + "inf" try: out = open(out_file, "wb") out.write(i[1]) out.close() except IOError: print "Couldn't open the file, %s" % out_file try: inf = open(inf_file, "w") load, exec_addr, length = i[2], i[3], i[4] inf.write( "$.%s\t%X\t%X\t%X" % \ ( name, load, exec_addr, length ) ) inf.close() except IOError: print "Couldn't open the file, %s" % inf_file else: # Interpret the load address as a filetype. out_file = os.path.join(path, name) + separator + "%x" % \ ((load >> 8) & 0xfff) try: out = open(out_file, "wb") out.write(i[1]) out.close() except IOError: print "Couldn't open the file, %s" % out_file else: if name != '$': new_path = create_directory(path, name) if new_path != "": extract_old_files(i[1], new_path) else: extract_old_files(i[1], path) | 25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3059/25f0ef7dc7411ab5a651cc7127ed79f5bcd54fc3/ADF2INF.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2608,
67,
1673,
67,
2354,
12,
2890,
16,
328,
16,
589,
4672,
225,
364,
277,
316,
328,
30,
225,
508,
273,
277,
63,
20,
65,
309,
618,
12,
77,
63,
21,
5717,
480,
618,
3816,
65,
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,
2608,
67,
1673,
67,
2354,
12,
2890,
16,
328,
16,
589,
4672,
225,
364,
277,
316,
328,
30,
225,
508,
273,
277,
63,
20,
65,
309,
618,
12,
77,
63,
21,
5717,
480,
618,
3816,
65,
4672,
... |
def hexrepr(t): | def hexrepr(t, precision=4): | def hexrepr(t): if t is None: return 'None' try: len(t) except: return '0x%04x' % t try: return '(' + ', '.join(map(lambda t: '0x%04x' % t, t)) + ')' except TypeError, why: print '* failed to convert %r: %s' % (t, why) raise | 88a416f24d864b5c6b03a1e6abf27f80832face9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/88a416f24d864b5c6b03a1e6abf27f80832face9/gencodec.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3827,
12715,
12,
88,
16,
6039,
33,
24,
4672,
225,
309,
268,
353,
599,
30,
327,
296,
7036,
11,
775,
30,
562,
12,
88,
13,
1335,
30,
327,
296,
20,
92,
9,
3028,
92,
11,
738,
268,
775... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3827,
12715,
12,
88,
16,
6039,
33,
24,
4672,
225,
309,
268,
353,
599,
30,
327,
296,
7036,
11,
775,
30,
562,
12,
88,
13,
1335,
30,
327,
296,
20,
92,
9,
3028,
92,
11,
738,
268,
775... |
resDict = {'AllPut':allSuccessful,'Files':filesPut,'Size':sizePut} return S_OK(resDict) def getDirectory(self,path,localPath=False): | resDict = {'AllPut':allSuccessful, 'Files':filesPut, 'Size':sizePut} return S_OK( resDict ) def getDirectory( self, path, localPath = False ): | def __putDir(self,src_directory,dest_directory): """ Black magic contained within... """ filesPut = 0 sizePut = 0 # Check the local directory exists if not os.path.isdir(src_directory): errStr = "SRM2Storage.__putDir: The supplied directory does not exist." gLogger.error(errStr,src_directory) return S_ERROR(errStr) | 70e66af095cb6701e39b1e701e4a2ce4d012b4f7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/70e66af095cb6701e39b1e701e4a2ce4d012b4f7/SRM2Storage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
458,
1621,
12,
2890,
16,
4816,
67,
5149,
16,
10488,
67,
5149,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
1390,
6426,
273,
374,
963,
6426,
273,
374,
468,
2073,
326,
1191,
1867... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
458,
1621,
12,
2890,
16,
4816,
67,
5149,
16,
10488,
67,
5149,
4672,
3536,
22467,
8146,
7542,
3470,
2777,
3536,
1390,
6426,
273,
374,
963,
6426,
273,
374,
468,
2073,
326,
1191,
1867... |
def containing_module(self): """ @rtype: L{ModuleDoc} or C{None} @return: The API documentation for the module that contains this value, or C{None} if the API documentation is unavailable. This documentation is found by following L{canonical_container} links until a module is found. As a result, it should not be used until after the L{canonical_container} attributes have been set (i.e., after indexing). """ container = self.canonical_container while True: if container in (UNKNOWN, None): return None if isinstance(container, ModuleDoc): return container else: container = container.canonical_container | def valdoc_links(self): raise NotImplementedError('subclasses must implement this') def vardoc_links(self): raise NotImplementedError('subclasses must implement this') def reachable_valdocs(*root): val_queue = list(root) val_set = Set() while val_queue: val_doc = val_queue.pop() val_queue.extend([v for v in val_doc.valdoc_links() if v not in val_set]) val_queue.extend([v.value for v in val_doc.vardoc_links() if v.value not in val_set]) return val_set def contained_valdocs(*root): "Does not include imports" val_queue = list(root) val_set = Set() while val_queue: val_doc = val_queue.pop() val_queue.extend([v.value for v in val_doc.vardoc_links() if (v.value not in val_set and v.is_imported != True)]) return val_set | def containing_module(self): """ @rtype: L{ModuleDoc} or C{None} @return: The API documentation for the module that contains this value, or C{None} if the API documentation is unavailable. This documentation is found by following L{canonical_container} links until a module is found. As a result, it should not be used until after the L{canonical_container} attributes have been set (i.e., after indexing). """ container = self.canonical_container while True: if container in (UNKNOWN, None): return None if isinstance(container, ModuleDoc): return container else: container = container.canonical_container | 9c8a03d00034cbc15bd30659e0adc8628832f614 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3512/9c8a03d00034cbc15bd30659e0adc8628832f614/apidoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
2434,
67,
7135,
12,
2890,
4672,
1002,
11206,
2668,
1717,
4701,
1297,
2348,
333,
6134,
1652,
569,
2434,
67,
7135,
12,
2890,
4672,
1002,
11206,
2668,
1717,
4701,
1297,
2348,
333,
6134,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1244,
2434,
67,
7135,
12,
2890,
4672,
1002,
11206,
2668,
1717,
4701,
1297,
2348,
333,
6134,
1652,
569,
2434,
67,
7135,
12,
2890,
4672,
1002,
11206,
2668,
1717,
4701,
1297,
2348,
333,
6134,... |
while t: | while t is not None: | def setup(self, f, t): self.lineno = None self.stack = [] if t and t.tb_frame is f: t = t.tb_next while f and f is not self.botframe: self.stack.append((f, f.f_lineno)) f = f.f_back self.stack.reverse() self.curindex = max(0, len(self.stack) - 1) while t: self.stack.append((t.tb_frame, t.tb_lineno)) t = t.tb_next if 0 <= self.curindex < len(self.stack): self.curframe = self.stack[self.curindex][0] else: self.curframe = None | 78f163f70a90e1bc231810416408540ec5516549 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/78f163f70a90e1bc231810416408540ec5516549/pdb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3875,
12,
2890,
16,
284,
16,
268,
4672,
365,
18,
17782,
273,
599,
365,
18,
3772,
273,
5378,
309,
268,
471,
268,
18,
18587,
67,
3789,
353,
284,
30,
268,
273,
268,
18,
18587,
67,
4285,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
2890,
16,
284,
16,
268,
4672,
365,
18,
17782,
273,
599,
365,
18,
3772,
273,
5378,
309,
268,
471,
268,
18,
18587,
67,
3789,
353,
284,
30,
268,
273,
268,
18,
18587,
67,
4285,... |
dprint("Context menu over tab %d" % evt.GetSelection()) | """Handle context menu on a tab button. Unlike a traditional notebook control that has a single row of tabs at the top of the control, an AUI notebook may have multiple rows of tab buttons if the control is split. The index number of any particular tab is dependent on which row of tab buttons the event happens. However, there is another index that is invariant and based on the order in which the page was added to the notebook itself. This is the index used by the AuiNotebook.GetPage method. Only this context menu driver is concerned about multiple rows of tab buttons; the index produced by this method and passed to the popup menu as the C{context_tab} key is the invariant index. """ tabctrl = evt.GetEventObject() tab = evt.GetSelection() aui_notebook_page = tabctrl.GetPage(tab) wrapper = aui_notebook_page.window index = self._tabs.GetIdxFromWindow(wrapper) | def OnTabContextMenu(self, evt): dprint("Context menu over tab %d" % evt.GetSelection()) action_classes = [] Publisher().sendMessage('tabs.context_menu', action_classes) dprint(action_classes) tab = evt.GetSelection() wrapper = self.GetPage(tab) options = { 'context_tab': tab, 'wrapper': wrapper, 'mode': wrapper.editwin, } if action_classes: PopupMenu(self.frame, self, None, action_classes, options) #evt.Skip() | 42da9909d01f20dda042340f15f15aa1c4170790 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11522/42da9909d01f20dda042340f15f15aa1c4170790/notebook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
5661,
27315,
12,
2890,
16,
6324,
4672,
3536,
3259,
819,
3824,
603,
279,
3246,
3568,
18,
225,
25448,
279,
1284,
1460,
287,
14718,
3325,
716,
711,
279,
2202,
1027,
434,
10920,
622,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
5661,
27315,
12,
2890,
16,
6324,
4672,
3536,
3259,
819,
3824,
603,
279,
3246,
3568,
18,
225,
25448,
279,
1284,
1460,
287,
14718,
3325,
716,
711,
279,
2202,
1027,
434,
10920,
622,
3... |
context = context | context = {} | def search(self, cr, user, args, offset=0, limit=None, order=None, context=None, count=False): if not context: context = context if not context.get('planning'): return super(project_task,self).search(cr, user, args, offset, limit, order, context) cr.execute(" SELECT t.id, t.name \ from project_task t \ join report_account_analytic_planning_line l on (l.id = t.planning_line_id )\ where l.planning_id=%s",(context.get('planning'),)) ids = map(lambda x: x[0], cr.fetchall()) return ids | e58e5b6cf14829cf6d94c154b88ab0595d45ce3e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/e58e5b6cf14829cf6d94c154b88ab0595d45ce3e/project_planning.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
309,
486,
819,
30,
819,
273,
2618... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1623,
12,
2890,
16,
4422,
16,
729,
16,
833,
16,
1384,
33,
20,
16,
1800,
33,
7036,
16,
1353,
33,
7036,
16,
819,
33,
7036,
16,
1056,
33,
8381,
4672,
309,
486,
819,
30,
819,
273,
2618... |
def processDoctype(self, name, error): self.parser.parseError() | def processDoctype(self, name, error): self.parser.parseError() | e27a65aea89101871a12f3819cbf03afacd3bbcc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4487/e27a65aea89101871a12f3819cbf03afacd3bbcc/parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
3244,
12387,
12,
2890,
16,
508,
16,
555,
4672,
365,
18,
4288,
18,
2670,
668,
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,
... | [
1,
1,
1,
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,
1207,
3244,
12387,
12,
2890,
16,
508,
16,
555,
4672,
365,
18,
4288,
18,
2670,
668,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
canvas.setStrokeColorRGB(1,0,0) | canvas.setStrokeColor(red) | def myFirstPage(canvas, doc): canvas.saveState() canvas.setStrokeColorRGB(1,0,0) canvas.setLineWidth(5) canvas.line(66,72,66,PAGE_HEIGHT-72) canvas.setFont('Times-Bold',24) canvas.drawString(108, PAGE_HEIGHT-108, "PLATYPUS") canvas.setFont('Times-Roman',12) canvas.drawString(4 * inch, 0.75 * inch, "First Page") canvas.restoreState() | 8f742e8a0741d1b7023a78c9d5fbc5fe697c7eeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3878/8f742e8a0741d1b7023a78c9d5fbc5fe697c7eeb/layout.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3399,
3759,
1964,
12,
15424,
16,
997,
4672,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
2957,
12,
1118,
13,
5953,
18,
542,
1670,
2384,
12,
25,
13,
5953,
18,
1369,
12,
6028,
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,
3399,
3759,
1964,
12,
15424,
16,
997,
4672,
5953,
18,
5688,
1119,
1435,
5953,
18,
542,
14602,
2957,
12,
1118,
13,
5953,
18,
542,
1670,
2384,
12,
25,
13,
5953,
18,
1369,
12,
6028,
16,
... |
assert self.parser.innerHTML | def endTagTableRowGroup(self, token): if self.tree.elementInScope(token["name"], variant="table"): self.endTagTr(impliedTagToken("tr")) return token else: # innerHTML case assert self.parser.innerHTML self.parser.parseError() | 099755913ce42735601dddc003fbaed78e6914ee /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10463/099755913ce42735601dddc003fbaed78e6914ee/html5parser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
30650,
1114,
12,
2890,
16,
1147,
4672,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
2316,
9614,
529,
6,
6487,
5437,
1546,
2121,
6,
4672,
365,
18,
409,
1805,
1070,
12,
381,
3110,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
29765,
30650,
1114,
12,
2890,
16,
1147,
4672,
309,
365,
18,
3413,
18,
2956,
382,
3876,
12,
2316,
9614,
529,
6,
6487,
5437,
1546,
2121,
6,
4672,
365,
18,
409,
1805,
1070,
12,
381,
3110,... | |
add_ids = [] | def action_force_extraction(self, cr, uid, data, context): pool = pooler.get_pool(cr.dbname) seg_obj = pool.get('dm.campaign.proposition.segment').browse(cr, uid, data['id']) if seg_obj.segmentation_id: cr.execute(seg_obj.segmentation_id.sql_query) address_ids = map(lambda x: x[0], cr.fetchall()) else: address_ids = [] use_census = seg_obj.use_census cur_time = time.strftime('%Y-%m-%d') add_ids = [] if use_census: start_census = seg_obj.start_census end_census = seg_obj.end_census type_census = seg_obj.type_census t = time.strptime(cur_time, '%Y-%m-%d') d = datetime.datetime(t[0], t[1], t[2]) if type_census == 'months': diff = end_census - start_census start_date = (d - datetime.timedelta(diff*365/12)).date() else: kwargs = {type_census: end_census-start_census} start_date = (d - datetime.timedelta(**kwargs)).date() end_date = cur_time sale_ids = pool.get('sale.order').search(cr, uid, [('partner_invoice_id', 'in', address_ids), ('date_order', '<', end_date), ('date_order', '>', start_date)]) for sale in pool.get('sale.order').browse(cr, uid, sale_ids): address = sale.partner_invoice_id.id add_ids.append(address) pool.get('dm.customers_file').create(cr, uid, {'name': data['form']['name'], 'code': data['form']['code'], 'segmentation_id': seg_obj.segmentation_id.id, 'address_ids': [[6, 0, add_ids]],}) return {} | c632e98077adb2d0f03f666964f4f01b4da2179b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7339/c632e98077adb2d0f03f666964f4f01b4da2179b/wizard_force_extraction.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
5734,
67,
14523,
1128,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
2291,
67,
2603,
273,
2845,
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,
1301,
67,
5734,
67,
14523,
1128,
12,
2890,
16,
4422,
16,
4555,
16,
501,
16,
819,
4672,
2845,
273,
2845,
264,
18,
588,
67,
6011,
12,
3353,
18,
20979,
13,
2291,
67,
2603,
273,
2845,
18... | |
keychanges[key] = newkey for val in input: if not '?' in val: | page, oldKey = map(decode_page, pageAndKey.split('?', 1)) newKey = keys.get(oldKey, oldKey) if not request.user.may.write(page): | def process_meta_changes(request, input): changes = dict() keychanges = dict() keypage = '' # Key changes for key in input: if not key.startswith(':: '): continue newkey = input[key][0] key = key[3:] if key == newkey: continue # Form presents you with ' ' if the key box is empty if not newkey.strip(): newkey = '' # Form keys not autodecoded from utf-8 keychanges[key] = newkey # print repr(keychanges) for val in input: # At least the key 'save' may be there and should be ignored if not '?' in val: continue newvals = input[val] # Form keys not autodecoded from utf-8 keypage, key = map(decode_page, val.split('?')) if not request.user.may.write(keypage): continue keymetas = get_metas(request, keypage, [key], abs_attach=False) oldvals = keymetas[key] if oldvals != newvals or keychanges: changes.setdefault(keypage, dict()) if key in keychanges: # In case of new keys there is no old one if key.strip(): # print 'deleting key', repr(key) # Otherwise, delete contents of old key changes[keypage].setdefault('old', dict())[key] = oldvals changes[keypage].setdefault('new', dict())[key] = \ [''] * len(oldvals) # If new key is empty, don't add anything if keychanges[key].strip(): # print 'adding key', repr(keychanges[key]) if not newvals: newvals = [''] # Otherwise, add old values under new key changes[keypage].setdefault('new', dict())[keychanges[key]]\ = newvals else: if oldvals: changes[keypage].setdefault('old', dict())[key] = oldvals changes[keypage].setdefault('new', dict())[key] = newvals return changes | c61fc4082c5e23696768aeae4e2df3a97e8f3d94 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/888/c61fc4082c5e23696768aeae4e2df3a97e8f3d94/editing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3901,
67,
6329,
12,
2293,
16,
810,
4672,
3478,
273,
2065,
1435,
498,
6329,
273,
2065,
1435,
498,
2433,
273,
875,
225,
468,
1929,
3478,
364,
498,
316,
810,
30,
309,
486,
498,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1207,
67,
3901,
67,
6329,
12,
2293,
16,
810,
4672,
3478,
273,
2065,
1435,
498,
6329,
273,
2065,
1435,
498,
2433,
273,
875,
225,
468,
1929,
3478,
364,
498,
316,
810,
30,
309,
486,
498,
... |
elif arithgroup.is_CongruenceSubgroup(group): if ( rings.Integer(level) != group.level() ): raise ValueError, "group.level() and level do not match." elif group is None: pass else: raise ValueError, "group of unknown type." | def canonical_parameters(group, level, weight, base_ring): """ Given a group, level, weight, and base_ring as input by the user, return a canonicalized version of them, where level is a Sage integer, group really is a group, weight is a Sage integer, and base_ring a Sage ring. Note that we can't just get the level from the group, because we have the convention that the character for Gamma1(N) is None (which makes good sense). INPUT: - ``group`` - int, long, Sage integer, group, dirichlet character, or - ``level`` - int, long, Sage integer, or group - ``weight`` - coercible to Sage integer - ``base_ring`` - commutative Sage ring OUTPUT: - ``level`` - Sage integer - ``group`` - congruence subgroup - ``weight`` - Sage integer - ``ring`` - commutative Sage ring EXAMPLES:: sage: from sage.modular.modform.constructor import canonical_parameters sage: v = canonical_parameters(5, 5, int(7), ZZ); v (5, Congruence Subgroup Gamma0(5), 7, Integer Ring) sage: type(v[0]), type(v[1]), type(v[2]), type(v[3]) (<type 'sage.rings.integer.Integer'>, <class 'sage.modular.arithgroup.congroup_gamma0.Gamma0_class'>, <type 'sage.rings.integer.Integer'>, <type 'sage.rings.integer_ring.IntegerRing_class'>) sage: canonical_parameters( 5, 7, 7, ZZ ) Traceback (most recent call last): ... ValueError: group and level do not match. """ weight = rings.Integer(weight) if weight <= 1: raise NotImplementedError, "weight must be at least 2" if isinstance(group, (int, long, rings.Integer)): if ( rings.Integer(group) != rings.Integer(level) ): raise ValueError, "group and level do not match." group = arithgroup.Gamma0(group) level = rings.Integer(level) elif isinstance(group, dirichlet.DirichletCharacter): if ( group.level() != rings.Integer(level) ): raise ValueError, "group.level() and level do not match." group = group.minimize_base_ring() level = rings.Integer(level) elif arithgroup.is_SL2Z(group) or \ arithgroup.is_Gamma1(group) and group.level() == rings.Integer(1): if ( rings.Integer(level) != rings.Integer(1) ): raise ValueError, "group.level() and level do not match." group = arithgroup.Gamma0(rings.Integer(1)) elif arithgroup.is_CongruenceSubgroup(group): if ( rings.Integer(level) != group.level() ): raise ValueError, "group.level() and level do not match." elif group is None: pass else: raise ValueError, "group of unknown type." if not rings.is_CommutativeRing(base_ring): raise TypeError, "base_ring (=%s) must be a commutative ring"%base_ring # it is *very* important to include the level as part of the data # that defines the key, since dirichlet characters of different # levels can compare equal, but define much different modular # forms spaces. return level, group, weight, base_ring | 099d8ca8e927392556c394b69093afa20550049a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/099d8ca8e927392556c394b69093afa20550049a/constructor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
3977,
12,
1655,
16,
1801,
16,
3119,
16,
1026,
67,
8022,
4672,
3536,
16803,
279,
1041,
16,
1801,
16,
3119,
16,
471,
1026,
67,
8022,
487,
810,
635,
326,
729,
16,
327,
279,
73... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7378,
67,
3977,
12,
1655,
16,
1801,
16,
3119,
16,
1026,
67,
8022,
4672,
3536,
16803,
279,
1041,
16,
1801,
16,
3119,
16,
471,
1026,
67,
8022,
487,
810,
635,
326,
729,
16,
327,
279,
73... | |
self.__skeleton__[table][col_name]['primary_key'] = True | self.__skeleton__[table_name][col_name]['primary_key'] = True | def make_primary_key(self, table, col_name): """ WORD ON THE STREET IS THAT SQLITE IS RETARDED ABOUT *ALTER TABLE* COMMANDS... SO MEANWHILE WE ACCOMPLISH THIS BY CREATING A TEMPORARY TABLE. SUGGESTIONS FOR SPEEDUP ARE WELCOME. (OR JUST SEND A PATCH...) MAKE NOTE IN DOCS THAT TO GET AN AUTO-INCREMENTING PRIMARY KEY, YOU MUST USE THE FULL WORD *INTEGER* INSTEAD OF *INT*. """ if not self.__skeleton__.has_key(table): raise ValueError("Database has no table %s."%table) if not self.__skeleton__[table].has_key(col_name): raise ValueError("Table %s has no column %s."%(table,col_name)) # Update the skeleton: self.__skeleton__[table][col_name]['primary_key'] = True # Get an ordered list (with the primary key info updated): cur_list = skel_to_col_attr_list(self.__skeleton__[table]) new = '' for col in cur_list: new += col[0] +', ' new = new.rstrip(', ') new_attr = '' new_attr = '' for col in cur_list: if col[2]: # If primary key: new_attr += col[0] + ' ' + col[1] + ' primary key, ' else: new_attr += col[0] + ' ' + col[1] + ', ' new_attr = new_attr.rstrip(', ') # Silly SQLite -- we have to make a temp table to hold info... self.__connection__.executescript(""" create temporary table spam(%s); insert into spam select %s from %s; drop table %s; create table %s (%s); """%(new_attr, new, table, table, table,new_attr)) # Update indices in new table new_table_set_col_attr(self.__connection__, table, self.__skeleton__[table]) # Now we can plop our data into the *new* table: self.__connection__.executescript(""" insert into %s select %s from spam; drop table spam; """%(table, new)) self.vacuum() | 5ddf79d83938a9c0191ec3af2f60e264a74ecef9 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/5ddf79d83938a9c0191ec3af2f60e264a74ecef9/database.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
8258,
67,
856,
12,
2890,
16,
1014,
16,
645,
67,
529,
4672,
3536,
21464,
6229,
12786,
2347,
862,
1584,
4437,
7662,
789,
3063,
5398,
4437,
10366,
985,
7660,
10336,
5069,
380,
188... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
8258,
67,
856,
12,
2890,
16,
1014,
16,
645,
67,
529,
4672,
3536,
21464,
6229,
12786,
2347,
862,
1584,
4437,
7662,
789,
3063,
5398,
4437,
10366,
985,
7660,
10336,
5069,
380,
188... |
if name != None: | if hasname(name): | def endElement(self, name): """Handle ways in the OSM data""" | eeaea869cdb2a3a24551fc119eae4d9c25fccd16 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/655/eeaea869cdb2a3a24551fc119eae4d9c25fccd16/osm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14840,
12,
2890,
16,
508,
4672,
3536,
3259,
16226,
316,
326,
5932,
49,
501,
8395,
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,
14840,
12,
2890,
16,
508,
4672,
3536,
3259,
16226,
316,
326,
5932,
49,
501,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
>>> t = Tester(globs={}, verbose=0, isprivate=lambda x,y: 0) | >>> t = Tester(globs={}, verbose=0) | ... def bar(self): | a9d0ce1b94961877c18e5bb3a00e9ec155e09f2c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a9d0ce1b94961877c18e5bb3a00e9ec155e09f2c/doctest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
565,
1652,
4653,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1372,
565,
1652,
4653,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
except HostAttribute.DoesNotExist: | except attribute_model.DoesNotExist: | def delete_attribute(self, attribute): attribute_model, get_args = self._get_attribute_model_and_args( attribute) try: attribute_model.objects.get(**get_args).delete() except HostAttribute.DoesNotExist: pass | 5939614990c14c844680888cf72070e89ef5eece /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12268/5939614990c14c844680888cf72070e89ef5eece/model_logic.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1430,
67,
4589,
12,
2890,
16,
1566,
4672,
1566,
67,
2284,
16,
336,
67,
1968,
273,
365,
6315,
588,
67,
4589,
67,
2284,
67,
464,
67,
1968,
12,
1566,
13,
775,
30,
1566,
67,
2284,
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,
1430,
67,
4589,
12,
2890,
16,
1566,
4672,
1566,
67,
2284,
16,
336,
67,
1968,
273,
365,
6315,
588,
67,
4589,
67,
2284,
67,
464,
67,
1968,
12,
1566,
13,
775,
30,
1566,
67,
2284,
18,
... |
self._permalink_link.hide() | self._dash.hide() | def rebuild_video_details(self): # this removes the child widget if there is one self.remove() | 230af1ffa9b681d6eabc92f1949bc88730a10620 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12354/230af1ffa9b681d6eabc92f1949bc88730a10620/video.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13419,
67,
9115,
67,
6395,
12,
2890,
4672,
468,
333,
7157,
326,
1151,
3604,
309,
1915,
353,
1245,
365,
18,
4479,
1435,
2,
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,
13419,
67,
9115,
67,
6395,
12,
2890,
4672,
468,
333,
7157,
326,
1151,
3604,
309,
1915,
353,
1245,
365,
18,
4479,
1435,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
""" static PyObject *codec_tuple(PyObject *unicode, int len) { PyObject *v,*w; if (unicode == NULL) return NULL; v = PyTuple_New(2); if (v == NULL) { Py_DECREF(unicode); return NULL; } PyTuple_SET_ITEM(v,0,unicode); w = PyInt_FromLong(len); if (w == NULL) { Py_DECREF(v); return NULL; } PyTuple_SET_ITEM(v,1,w); return v; } static PyObject * ucn_decode(PyObject *self, PyObject *args) { const char *data; int size; const char *errors = NULL; PyObject *mapping = NULL; if (!PyArg_ParseTuple(args, "t &data, &size, &errors)) return NULL; if (mapping == Py_None) mapping = NULL; return codec_tuple(PyUnicode_DecodeNamedUnicodeEscape(data, size, errors), size); } static PyMethodDef _codecs_functions[] = { { "ucn_decode", ucn_decode, 1 }, }; DL_EXPORT(void) init_ucn() { Py_InitModule("_ucn", _codecs_functions); } """ | def generate_hash(keys, caseInsensitive=0, minC=None, initC=None, f1Seed=None, f2Seed=None, cIncrement=None, cTries=None): """Print out code for a perfect minimal hash. Input is a list of (key, desired hash value) tuples. """ # K is the number of keys. K = len(keys) # We will be generating graphs of size N, where N = c * K. # The larger C is, the fewer trial graphs will need to be made, but # the resulting table is also larger. Increase this starting value # if you're impatient. After 50 failures, c will be increased by 0.025. if initC is None: initC = 1.5 c = initC if cIncrement is None: cIncrement = 0.0025 if cTries is None: cTries = 50 # Number of trial graphs so far num_graphs = 0 sys.stderr.write('Generating graphs... ') while 1: # N is the number of vertices in the graph G N = int(c*K) num_graphs = num_graphs + 1 if (num_graphs % cTries) == 0: # Enough failures at this multiplier, # increase the multiplier and keep trying.... c = c + cIncrement # Whats good with searching for a better # hash function if we exceed the size # of a function we've generated in the past.... if minC is not None and \ c > minC: c = initC sys.stderr.write(' -- c > minC, resetting c to %0.4f\n' % c) else: sys.stderr.write(' -- increasing c to %0.4f\n' % c) sys.stderr.write('Generating graphs... ') # Output a progress message sys.stderr.write( str(num_graphs) + ' ') sys.stderr.flush() # Create graph w/ N vertices G = Graph(N) # Save the seeds used to generate # the following two hash functions. _seeds = whrandom._inst._seed # Create 2 random hash functions f1 = Hash(N, caseInsensitive) f2 = Hash(N, caseInsensitive) # Set the initial hash function seed values if passed in. # Doing this protects our hash functions from # changes to whrandom's behavior. if f1Seed is not None: f1.seed = f1Seed f1Seed = None fSpecifiedSeeds = 1 if f2Seed is not None: f2.seed = f2Seed f2Seed = None fSpecifiedSeeds = 1 # Connect vertices given by the values of the two hash functions # for each key. Associate the desired hash value with each # edge. for k, v in keys: h1 = f1(k) ; h2 = f2(k) G.connect( h1,h2, v) # Check if the resulting graph is acyclic; if it is, # we're done with step 1. if G.is_acyclic(): break elif fSpecifiedSeeds: sys.stderr.write('\nThe initial f1/f2 seeds you specified didn\'t generate a perfect hash function: \n') sys.stderr.write('f1 seed: %s\n' % f1.seed) sys.stderr.write('f2 seed: %s\n' % f2.seed) sys.stderr.write('multipler: %s\n' % c) sys.stderr.write('Your data has likely changed, or you forgot what your initial multiplier should be.\n') sys.stderr.write('continuing the search for a perfect hash function......\n') fSpecifiedSeeds = 0 # Now we have an acyclic graph, so we assign values to each vertex # such that, for each edge, you can add the values for the two vertices # involved and get the desired value for that edge -- which is the # desired hash key. This task is dead easy, because the graph is acyclic. sys.stderr.write('\nAcyclic graph found; computing vertex values...\n') G.assign_values() sys.stderr.write('Checking uniqueness of hash values...\n') # Sanity check the result by actually verifying that all the keys # hash to the right value. cchMaxKey = 0 maxHashValue = 0 for k, v in keys: hash1 = G.values[ f1(k) ] hash2 = G.values[ f2(k) ] if hash1 > maxHashValue: maxHashValue = hash1 if hash2 > maxHashValue: maxHashValue = hash2 perfecthash = (hash1 + hash2) % N assert perfecthash == v cch = len(k) if cch > cchMaxKey: cchMaxKey = cch sys.stderr.write('Found perfect hash function!\n') sys.stderr.write('\nIn order to regenerate this hash function, \n') sys.stderr.write('you need to pass these following values back in:\n') sys.stderr.write('f1 seed: %s\n' % repr(f1.seed)) sys.stderr.write('f2 seed: %s\n' % repr(f2.seed)) sys.stderr.write('initial multipler: %s\n' % c) return PerfectHash(cchMaxKey, f1, f2, G, N, len(keys), maxHashValue) | ed0a35bf31aa60227d9d36e3a1f8c43516401417 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/ed0a35bf31aa60227d9d36e3a1f8c43516401417/perfect_hash.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2103,
67,
2816,
12,
2452,
16,
648,
21931,
33,
20,
16,
1131,
39,
33,
7036,
16,
1208,
39,
33,
7036,
16,
284,
21,
12702,
33,
7036,
16,
284,
22,
12702,
33,
7036,
16,
276,
10798,
33,
70... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
67,
2816,
12,
2452,
16,
648,
21931,
33,
20,
16,
1131,
39,
33,
7036,
16,
1208,
39,
33,
7036,
16,
284,
21,
12702,
33,
7036,
16,
284,
22,
12702,
33,
7036,
16,
276,
10798,
33,
70... | |
loc = self.stripCommonPrefix(loc, self._relLoc) | loc = posixpath.join(self._relRoot, loc) | def relDstPathOf(self, loc): | 6441c8b68267cd2abdab1ad5a30cd1c04a2e9d27 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6851/6441c8b68267cd2abdab1ad5a30cd1c04a2e9d27/pypager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
15295,
743,
951,
12,
2890,
16,
1515,
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,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1279,
15295,
743,
951,
12,
2890,
16,
1515,
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... |
req["nr_maps"] = str(len(inputs)) else: req["nr_maps"] = str(kw["nr_maps"]) | nr_maps = len(inputs) else: nr_maps = kw["nr_maps"] req["nr_maps"] = str(nr_maps) | def _run(self, **kw): d = lambda x: kw.get(x, Job.defaults[x]) | 0005e52a256b61db76e102156fdd896f42f6ab0d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/373/0005e52a256b61db76e102156fdd896f42f6ab0d/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
12,
2890,
16,
2826,
9987,
4672,
302,
273,
3195,
619,
30,
5323,
18,
588,
12,
92,
16,
3956,
18,
7606,
63,
92,
5717,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2681,
12,
2890,
16,
2826,
9987,
4672,
302,
273,
3195,
619,
30,
5323,
18,
588,
12,
92,
16,
3956,
18,
7606,
63,
92,
5717,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
... xmin=0, ymin=-1, xmax=3, ymax=1, figsize=[2,1], axes=False) | ... xmin=0, ymin=-1, xmax=3, ymax=1, figsize=[2,1], axes=False) | def __mul__(self, other): """ Multiply two animations. This has the effect of appending the two animinations (the second comes after the first). | cda10f9e0887c9e7ea61a247e83c6c71e2727a08 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/cda10f9e0887c9e7ea61a247e83c6c71e2727a08/animate.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
16411,
972,
12,
2890,
16,
1308,
4672,
3536,
5991,
1283,
2795,
25536,
18,
225,
1220,
711,
326,
5426,
434,
19997,
326,
2795,
10536,
10144,
261,
5787,
2205,
14535,
1839,
326,
1122,
2934... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
16411,
972,
12,
2890,
16,
1308,
4672,
3536,
5991,
1283,
2795,
25536,
18,
225,
1220,
711,
326,
5426,
434,
19997,
326,
2795,
10536,
10144,
261,
5787,
2205,
14535,
1839,
326,
1122,
2934... |
if ext: | if newpath.endswith("/index") and ext: | def blosxom_process_path_info(args): """ Process HTTP PATH_INFO for URI according to path specifications, fill in data dict accordingly The paths specification looks like this: - C{/foo.html} and C{/cat/foo.html} - file foo.* in / and /cat - C{/cat} - category - C{/2002} - year - C{/2002/Feb} (or 02) - Year and Month - C{/cat/2002/Feb/31} - year and month day in category. To simplify checking, four digits directory name is not allowed. @param args: dict containing the incoming Request object @type args: L{Pyblosxom.pyblosxom.Request} """ request = args['request'] config = request.getConfiguration() data = request.getData() pyhttp = request.getHttp() logger = tools.getLogger() form = request.getForm() # figure out which flavour to use. the flavour is determined # by looking at the "flav" post-data variable, the "flav" # query string variable, the "default_flavour" setting in the # config.py file, or "html" flav = config.get("default_flavour", "html") if form.has_key("flav"): flav = form["flav"].value data['flavour'] = flav data['pi_yr'] = '' data['pi_mo'] = '' data['pi_da'] = '' path_info = pyhttp.get("PATH_INFO", "") data['path_info'] = list(path_info) data['root_datadir'] = config['datadir'] data["pi_bl"] = path_info # first we check to see if there's a flavour extension newpath, ext = os.path.splitext(path_info) if ext: # there is a flavour-like thing, so that's our new flavour # and we adjust the path_info to the new filename flav = ext[1:] data["flavour"] = flav path_info = newpath if path_info.startswith("/"): path_info = path_info[1:] absolute_path = os.path.join(config["datadir"], path_info) if os.path.isdir(absolute_path): # this is an absolute path data['root_datadir'] = absolute_path data['bl_type'] = 'dir' elif absolute_path.endswith("/index") and \ os.path.isdir(absolute_path[:-6]): # this is an absolute path with /index at the end of it data['root_datadir'] = absolute_path[:-6] data['bl_type'] = 'dir' else: # this is either a file or a date ext = tools.what_ext(data["extensions"].keys(), absolute_path) if ext: # this is a file data["bl_type"] = "file" data["root_datadir"] = absolute_path + "." + ext else: data["bl_type"] = "dir" path_info = path_info.split("/") # it's possible to have category/category/year/month/day # (or something like that) so we pluck off the categories # here. pi_bl = "" while not (len(path_info[0]) == 4 and path_info[0].isdigit()): pi_bl = os.path.join(pi_bl, path_info.pop(0)) # handle the case where we do in fact have a category # preceeding the date. if pi_bl: data["pi_bl"] = pi_bl data["root_datadir"] = os.path.join(config["datadir"], pi_bl) if len(path_info) > 0: item = path_info.pop(0) # handle a year token if len(item) == 4 and item.isdigit(): data['pi_yr'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a month token if item in tools.MONTHS: data['pi_mo'] = item item = "" if (len(path_info) > 0): item = path_info.pop(0) # handle a day token if len(item) == 2 and item.isdigit(): data["pi_da"] = item item = "" if len(path_info) > 0: item = path_info.pop(0) # if the last item we picked up was "index", then we # just ditch it because we don't need it. if item == "index": item = "" # if we picked off an item we don't recognize and/or # there is still stuff in path_info to pluck out, then # it's likely this wasn't a date. if item or len(path_info) > 0: data["bl_type"] = "file" data["root_datadir"] = absolute_path # figure out the blog_title_with_path data variable blog_title = config["blog_title"] if data['pi_bl'] != '': data['blog_title_with_path'] = '%s : %s' % (blog_title, data['pi_bl']) else: data['blog_title_with_path'] = blog_title # construct our final URL data['url'] = '%s/%s' % (config['base_url'], data['pi_bl']) | 316771fad3ecc209bc74d3febc0958d720e40e62 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11836/316771fad3ecc209bc74d3febc0958d720e40e62/pyblosxom.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
225,
1021,
2953,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
383,
30319,
362,
67,
2567,
67,
803,
67,
1376,
12,
1968,
4672,
3536,
4389,
2239,
7767,
67,
5923,
364,
3699,
4888,
358,
589,
21950,
16,
3636,
316,
501,
2065,
15905,
225,
1021,
2953,
... |
canvas.set_data(location.id, ellipse) | def add_from_location(location): global root, canvas group = goocanvas.GroupModel (parent = root) ellipse = goocanvas.EllipseModel (parent = root, center_x = 0, center_y = 0, radius_x = 25, radius_y = 25, fill_color = "blue") ellipse.translate (location.xpos*-1, location.ypos*-1) ellipse.set_data("location", location) canvas.set_data(location.id, ellipse) item = canvas.get_item(ellipse) item.connect("button_press_event", on_button_press) item.connect("button_release_event", on_button_release) item.connect("motion_notify_event", on_motion) if location.invariant: add_text(location.invariant, (location.invariant_xpos*-1), (location.invariant_ypos*-1), group) if location.name: add_text(location.name, (location.name_xpos*-1), (location.name_ypos*-1), group) group.add_child(ellipse, -1) canvas.set_data(location.id+"group", group) | 7ba7a5e1dee5624039398e07355a1aebf17b7600 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/2599/7ba7a5e1dee5624039398e07355a1aebf17b7600/pyuppaal_gui.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2080,
67,
3562,
12,
3562,
4672,
2552,
1365,
16,
5953,
225,
1041,
273,
1960,
504,
304,
4423,
18,
1114,
1488,
261,
2938,
273,
1365,
13,
26838,
273,
1960,
504,
304,
4423,
18,
495... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2080,
67,
3562,
12,
3562,
4672,
2552,
1365,
16,
5953,
225,
1041,
273,
1960,
504,
304,
4423,
18,
1114,
1488,
261,
2938,
273,
1365,
13,
26838,
273,
1960,
504,
304,
4423,
18,
495... | |
{}, _("Similar records"), | {}, _("Similar records"), | def tmpl_records_format_other(self, ln, weburl, rows, format, url_argd): """Returns other formats of the records | d80e9e5b545268d60103014de3d2c09f38531285 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/2139/d80e9e5b545268d60103014de3d2c09f38531285/websearch_templates.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
7094,
67,
2139,
67,
3011,
12,
2890,
16,
7211,
16,
3311,
718,
16,
2595,
16,
740,
16,
880,
67,
3175,
72,
4672,
3536,
1356,
1308,
6449,
434,
326,
3853,
2,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
10720,
67,
7094,
67,
2139,
67,
3011,
12,
2890,
16,
7211,
16,
3311,
718,
16,
2595,
16,
740,
16,
880,
67,
3175,
72,
4672,
3536,
1356,
1308,
6449,
434,
326,
3853,
2,
-100,
-100,
-100,
-... |
args[key] = value.encode('ascii', 'utf8') | args[key] = value.encode('utf8', 'xmlcharrefreplace') | def make_body(self, environ, template, escfunc, comment_escfunc=None): comment_escfunc = comment_escfunc or escfunc args = {'explanation': escfunc(self.explanation), 'detail': escfunc(self.detail), 'comment': comment_escfunc(self.comment)} if HTTPException.template != self.template: for (k, v) in environ.items(): args[k] = escfunc(v) if self.headers: for (k, v) in self.headers: args[k.lower()] = escfunc(v) for key, value in args.items(): if isinstance(value, unicode): args[key] = value.encode('ascii', 'utf8') return template % args | 35e0dd7c68c40b19ea1a07550efe1b85c46f9eeb /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11400/35e0dd7c68c40b19ea1a07550efe1b85c46f9eeb/httpexceptions.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1221,
67,
3432,
12,
2890,
16,
5473,
16,
1542,
16,
2904,
644,
16,
2879,
67,
742,
644,
33,
7036,
4672,
2879,
67,
742,
644,
273,
2879,
67,
742,
644,
578,
2904,
644,
833,
273,
13666,
338... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3432,
12,
2890,
16,
5473,
16,
1542,
16,
2904,
644,
16,
2879,
67,
742,
644,
33,
7036,
4672,
2879,
67,
742,
644,
273,
2879,
67,
742,
644,
578,
2904,
644,
833,
273,
13666,
338... |
0x0413: "nl_NL", 0x0409: "en_US", 0x0809: "en_UK", 0x0c09: "en_AU", 0x1009: "en_CA", 0x1409: "en_NZ", 0x1809: "en_IE", 0x1c09: "en_ZA", | 0x048c: "gbz_AF", 0x0465: "div_MV", 0x0413: "nl_NL", 0x0813: "nl_BE", 0x0409: "en_US", 0x0809: "en_GB", 0x0c09: "en_AU", 0x1009: "en_CA", 0x1409: "en_NZ", 0x1809: "en_IE", 0x1c09: "en_ZA", 0x2009: "en_JA", 0x2409: "en_CB", 0x2809: "en_BZ", 0x2c09: "en_TT", 0x3009: "en_ZW", 0x3409: "en_PH", 0x0425: "et_EE", 0x0438: "fo_FO", 0x0464: "fil_PH", | def getpreferredencoding(do_setlocale = True): """Return the charset that the user is likely using, according to the system configuration.""" if do_setlocale: oldloc = setlocale(LC_CTYPE) setlocale(LC_CTYPE, "") result = nl_langinfo(CODESET) setlocale(LC_CTYPE, oldloc) return result else: return nl_langinfo(CODESET) | b709c2caba3c781d0f4602f28227993e565f0a87 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/b709c2caba3c781d0f4602f28227993e565f0a87/locale.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
23616,
5999,
12,
2896,
67,
542,
6339,
273,
1053,
4672,
3536,
990,
326,
4856,
716,
326,
729,
353,
10374,
1450,
16,
4888,
358,
326,
2619,
1664,
12123,
309,
741,
67,
542,
6339,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
23616,
5999,
12,
2896,
67,
542,
6339,
273,
1053,
4672,
3536,
990,
326,
4856,
716,
326,
729,
353,
10374,
1450,
16,
4888,
358,
326,
2619,
1664,
12123,
309,
741,
67,
542,
6339,
30,
1... |
def fn(): | def fn(flag): | def fn(): from pypy.module.__builtin__.importing import BIN_READMASK fd = os.open(tmpfile, BIN_READMASK, 0666) res = os.read(fd, 4096) os.close(fd) return len(res) | 0a79b2e374bc5f5ecce214c92ef5d970d29dd6e9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/0a79b2e374bc5f5ecce214c92ef5d970d29dd6e9/test_builtin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2295,
12,
6420,
4672,
628,
18951,
93,
18,
2978,
16186,
24553,
25648,
5666,
310,
1930,
18369,
67,
6949,
11704,
5194,
273,
1140,
18,
3190,
12,
5645,
768,
16,
18369,
67,
6949,
11704,
16,
37... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2295,
12,
6420,
4672,
628,
18951,
93,
18,
2978,
16186,
24553,
25648,
5666,
310,
1930,
18369,
67,
6949,
11704,
5194,
273,
1140,
18,
3190,
12,
5645,
768,
16,
18369,
67,
6949,
11704,
16,
37... |
ui.write('%s.%s=%s\n' % (section, name, value)) | sectname = section + '.' + name if values: for v in values: if v == section: ui.write('%s=%s\n' % (sectname, value)) elif v == sectname: ui.write(value, '\n') else: ui.write('%s=%s\n' % (sectname, value)) | def debugconfig(ui, repo): """show combined config settings from all hgrc files""" for section, name, value in ui.walkconfig(): ui.write('%s.%s=%s\n' % (section, name, value)) | 4f8d2f19f5721ba941818a79a82c9a4f7b1bb7e4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/4f8d2f19f5721ba941818a79a82c9a4f7b1bb7e4/commands.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1198,
1425,
12,
4881,
16,
3538,
4672,
3536,
4500,
8224,
642,
1947,
628,
777,
22576,
1310,
1390,
8395,
364,
2442,
16,
508,
16,
460,
316,
5915,
18,
11348,
1425,
13332,
29140,
529,
273,
244... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1425,
12,
4881,
16,
3538,
4672,
3536,
4500,
8224,
642,
1947,
628,
777,
22576,
1310,
1390,
8395,
364,
2442,
16,
508,
16,
460,
316,
5915,
18,
11348,
1425,
13332,
29140,
529,
273,
244... |
conceptNetwork.propagateActivations(state,1) | conceptNetwork.propagateActivations(state,2) | def testPropagation(self): "Test the propagation" conceptNetwork = ConceptNetwork() nodeFrom = Node("From",NodeType("token")) nodeTo1 = Node("To1", NodeType("token")) conceptNetwork.addLink(nodeFrom, nodeTo1) state = State(1) conceptNetwork.addState(state) state.setNodeActivationValue("From",100) conceptNetwork.propagateActivations(state,1) self.assertEqual(True,state.getNodeActivationValue("To1") > 50) | 37e1722caef96c6dc327e46969be6a125d5607a6 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/13131/37e1722caef96c6dc327e46969be6a125d5607a6/ConceptNetworkTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14225,
12,
2890,
4672,
315,
4709,
326,
25686,
6,
12402,
3906,
273,
27842,
3906,
1435,
756,
1265,
273,
2029,
2932,
1265,
3113,
15101,
2932,
2316,
6,
3719,
756,
774,
21,
225,
273,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
14225,
12,
2890,
4672,
315,
4709,
326,
25686,
6,
12402,
3906,
273,
27842,
3906,
1435,
756,
1265,
273,
2029,
2932,
1265,
3113,
15101,
2932,
2316,
6,
3719,
756,
774,
21,
225,
273,
20... |
p7, data = SMIME.load_pkcs7('p7.opaque') | p7, data = SMIME.load_pkcs7('opaque.p7') | def verify_opaque(): print 'test load & verify opaque...', s = SMIME.SMIME() x509 = X509.load_cert('client.pem') sk = X509.X509_Stack() sk.push(x509) s.set_x509_stack(sk) st = X509.X509_Store() st.load_info('ca.pem') s.set_x509_store(st) p7, data = SMIME.load_pkcs7('p7.opaque') v = s.verify(p7, data) if v == ptxt: print 'ok' else: print 'not ok' | 40431475922500ae7929b2bc6c49d3d58098e5cc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/40431475922500ae7929b2bc6c49d3d58098e5cc/test.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3929,
67,
556,
14886,
13332,
1172,
296,
3813,
1262,
473,
3929,
22519,
7821,
16,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
619,
5995,
273,
1139,
5995,
18,
945,
67,
7593,
2668,
2625,
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,
3929,
67,
556,
14886,
13332,
1172,
296,
3813,
1262,
473,
3929,
22519,
7821,
16,
272,
273,
12014,
3114,
18,
7303,
3114,
1435,
619,
5995,
273,
1139,
5995,
18,
945,
67,
7593,
2668,
2625,
18... |
if 'attachment/ticket/' in bundle and bundle[-11:] != '?format=raw': | if sage_trac_re.match(bundle) and bundle.endswith('?format=raw'): | def unbundle(self, bundle, update=True, options=''): """ Apply patches from a hg patch to the repository. | 1bfc9ef29a208ec4aa23dddc222ff420515c1eca /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/1bfc9ef29a208ec4aa23dddc222ff420515c1eca/hg.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
640,
9991,
12,
2890,
16,
3440,
16,
1089,
33,
5510,
16,
702,
2218,
11,
4672,
3536,
5534,
16482,
628,
279,
22576,
4729,
358,
326,
3352,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
640,
9991,
12,
2890,
16,
3440,
16,
1089,
33,
5510,
16,
702,
2218,
11,
4672,
3536,
5534,
16482,
628,
279,
22576,
4729,
358,
326,
3352,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if regex.minLength() == regex.maxLength(): | if regex.__class__ != RegexOr and regex.minLength() == regex.maxLength(): | def _or_(self, regex, reverse): """ Remove duplicate: >>> RegexString("color") | RegexString("color") <RegexString 'color'> | 861ca5bae77cd9250227543995909e9d5127e29a /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/861ca5bae77cd9250227543995909e9d5127e29a/regex.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
280,
67,
12,
2890,
16,
3936,
16,
4219,
4672,
3536,
3581,
6751,
30,
4080,
15078,
780,
2932,
3266,
7923,
571,
15078,
780,
2932,
3266,
7923,
411,
6628,
780,
296,
3266,
29256,
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,
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,
280,
67,
12,
2890,
16,
3936,
16,
4219,
4672,
3536,
3581,
6751,
30,
4080,
15078,
780,
2932,
3266,
7923,
571,
15078,
780,
2932,
3266,
7923,
411,
6628,
780,
296,
3266,
29256,
2,
-100,
... |
"packages": ["hachoir_wx"], "package_dir": {"hachoir_wx": "hachoir_wx"}, | "packages": PACKAGES.keys(), "package_dir": PACKAGES, | def main(): hachoir_wx = load_source("version", path.join("hachoir_wx", "version.py")) install_options = { "name": hachoir_wx.PACKAGE, "version": hachoir_wx.VERSION, "url": hachoir_wx.WEBSITE, "download_url": hachoir_wx.WEBSITE, "license": hachoir_wx.LICENSE, "author": "Cyril Zorin", "description": "hachoir-wx is a wxWidgets GUI that's meant to provide a (more) user-friendly interface to the hachoir binary parsing engine", "long_description": open('README').read(), "classifiers": CLASSIFIERS, "scripts": ["hachoir-wx"], "packages": ["hachoir_wx"], "package_dir": {"hachoir_wx": "hachoir_wx"}, } if use_setuptools: install_options["install_requires"] = ( "hachoir-core>=0.7.0", "hachoir-parser>=0.7.0", "wxPython>=2.6.3") install_options["zip_safe"] = True setup(**install_options) | c44fd2e34b64397b39797b6a5552382bdd5a6ba2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9327/c44fd2e34b64397b39797b6a5552382bdd5a6ba2/setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
366,
497,
83,
481,
67,
27226,
273,
1262,
67,
3168,
2932,
1589,
3113,
589,
18,
5701,
2932,
76,
497,
83,
481,
67,
27226,
3113,
315,
1589,
18,
2074,
6,
3719,
3799,
67,
2116,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
366,
497,
83,
481,
67,
27226,
273,
1262,
67,
3168,
2932,
1589,
3113,
589,
18,
5701,
2932,
76,
497,
83,
481,
67,
27226,
3113,
315,
1589,
18,
2074,
6,
3719,
3799,
67,
2116,
... |
MASTER can be given as a master widget.""" Variable.__init__(self, master) | MASTER can be given as master widget. VALUE is an optional value (defaults to False) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. """ Variable.__init__(self, master, value, name) | def __init__(self, master=None): """Construct a boolean variable. | 72daca43c49dee94d35b25084bba9045bd6d0f49 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/72daca43c49dee94d35b25084bba9045bd6d0f49/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
4672,
3536,
7249,
279,
1250,
2190,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4171,
33,
7036,
4672,
3536,
7249,
279,
1250,
2190,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
if macro.startswith("~"): | if macro.startswith("~") and not self.verbose: | def parse_macro(self): """No recursive macro processing is done here. If a macro is passed as parameter to a macro, then whoever parses the macro replacement will do the macro recursion. Actually - I'm too tired right now to think this through. Maybe it should be done the other way around, starting expansion with the innermost macro? """ params = [] macro = self.read_until("}") if macro[-1] != "}": raise Error(self, "Unclosed macro") return if self.just_parse: # We do not execute any macros or file inclusions. return None | 73c6d924a6523213caeb9b24ab6228b89f06d27d /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9355/73c6d924a6523213caeb9b24ab6228b89f06d27d/wmlparser.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
26448,
12,
2890,
4672,
3536,
2279,
5904,
11522,
4929,
353,
2731,
2674,
18,
971,
279,
11522,
353,
2275,
487,
1569,
358,
279,
11522,
16,
1508,
10354,
6084,
8940,
326,
11522,
6060,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
26448,
12,
2890,
4672,
3536,
2279,
5904,
11522,
4929,
353,
2731,
2674,
18,
971,
279,
11522,
353,
2275,
487,
1569,
358,
279,
11522,
16,
1508,
10354,
6084,
8940,
326,
11522,
6060,
... |
assert self.printInterests() | assert self.printInterestsIfDebug() | def handleInterestDoneMessage(self, di): """ This handles the interest done messages and may dispatch a action based on the ID, Context """ assert self.notify.debugCall() id = di.getUint16() scope = di.getUint32() expect_scope = self.getInterestScopeId(id) print "handleInterestDoneMessage--> Received ID:%s Scope:%s"%(id,scope); if expect_scope == scope: print "handleInterestDoneMessage--> Scope Match:%s Scope:%s"%(id,scope); event = self.getInterestScopeEvent(id) if event is not None: print "handleInterestDoneMessage--> Send Event : %s"%(event); messenger.send(event) else: print "handleInterestDoneMessage--> No Event "; self._ponderRemoveFlaggedInterest(id) else: print "handleInterestDoneMessage--> Scope MisMatch :%s :%s"%(expect_scope,scope); | 5099a543c0f90e219728d219c78bc598ee8e5011 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8543/5099a543c0f90e219728d219c78bc598ee8e5011/DoInterestManager.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
29281,
7387,
1079,
12,
2890,
16,
4314,
4672,
3536,
1220,
7372,
326,
16513,
2731,
2743,
471,
2026,
3435,
279,
1301,
2511,
603,
326,
1599,
16,
1772,
3536,
1815,
365,
18,
12336,
18,
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,
1640,
29281,
7387,
1079,
12,
2890,
16,
4314,
4672,
3536,
1220,
7372,
326,
16513,
2731,
2743,
471,
2026,
3435,
279,
1301,
2511,
603,
326,
1599,
16,
1772,
3536,
1815,
365,
18,
12336,
18,
4... |
def __init__(self, host='127.0.0.1', port=53, platform_settings=platformsettings.get_platform_settings()): | def __init__(self, host='127.0.0.1', port=53, platform_settings=None): if not platformsettings: platformsettings.get_platform_settings() | def __init__(self, host='127.0.0.1', port=53, platform_settings=platformsettings.get_platform_settings()): self.host = host self.platform_settings = platform_settings try: SocketServer.ThreadingUDPServer.__init__( self, (host, port), UdpDnsHandler) except socket.error, (error_number, msg): if error_number == errno.EACCES: raise PermissionDenied raise logging.info('Started DNS server on (%s:%s)...', host, port) platform_settings.set_primary_dns(host) | f09ec731b3354b87d0101881a248e33579ffad28 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/3776/f09ec731b3354b87d0101881a248e33579ffad28/dnsproxy.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
14260,
18,
20,
18,
20,
18,
21,
2187,
1756,
33,
8643,
16,
4072,
67,
4272,
33,
7036,
4672,
309,
486,
4072,
4272,
30,
4072,
4272,
18,
588,
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,
1001,
2738,
972,
12,
2890,
16,
1479,
2218,
14260,
18,
20,
18,
20,
18,
21,
2187,
1756,
33,
8643,
16,
4072,
67,
4272,
33,
7036,
4672,
309,
486,
4072,
4272,
30,
4072,
4272,
18,
588,
67,... |
if len(self.extra_data) > 0: data = self.extra_data self.extra_data = '' | if self.extra_data is not None: data = self.extra_data.read(length) if len(data) > 0: return data self.extra_data.close() self.extra_data = None | def read(self, length = -1): | d1387017305dd7667414e56a07f6db8fbd451b21 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/d1387017305dd7667414e56a07f6db8fbd451b21/Streams.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
769,
273,
300,
21,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
12,
2890,
16,
769,
273,
300,
21,
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,
-... |
cursor.execute("SELECT tc.time, tc.ticket, " " tc.field, tc.oldvalue, tc.newvalue, tc.author " | cursor.execute("SELECT tc.time,tc.ticket,tc.field, " " tc.oldvalue,tc.newvalue,tc.author,t.summary " | def get_timeline_events(self, req, start, stop, filters): if 'ticket_details' in filters: db = self.env.get_db_cnx() cursor = db.cursor() cursor.execute("SELECT tc.time, tc.ticket, " " tc.field, tc.oldvalue, tc.newvalue, tc.author " "FROM ticket_change tc" " LEFT JOIN ticket t ON t.id = tc.ticket " "AND tc.time>=%s AND tc.time<=%s ORDER BY tc.time" % (start, stop)) previous_update = None updates = [] for time,id,field,oldvalue,newvalue,author in cursor: if (time,id,author) != previous_update: if previous_update: updates.append((previous_update,field_changes,comment)) field_changes = [] comment = '' previous_update = (time,id,author) if field == 'comment': comment = newvalue else: field_changes.append(field) if previous_update: updates.append((previous_update,field_changes,comment)) | 3f8ebe11ae78c26fccce599155ca7391f969fb44 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9317/3f8ebe11ae78c26fccce599155ca7391f969fb44/Ticket.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
26237,
67,
5989,
12,
2890,
16,
1111,
16,
787,
16,
2132,
16,
3415,
4672,
309,
296,
16282,
67,
6395,
11,
316,
3415,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
26237,
67,
5989,
12,
2890,
16,
1111,
16,
787,
16,
2132,
16,
3415,
4672,
309,
296,
16282,
67,
6395,
11,
316,
3415,
30,
1319,
273,
365,
18,
3074,
18,
588,
67,
1966,
67,
10305,... |
defines = ['-DHAVE_CONFIG_H', '-DUSE_FROZEN', '-DNO_MAIN', | defines = ['-DHAVE_CONFIG_H', | def main(): # overridable context prefix = PREFIX # settable with -p option extensions = [] path = sys.path # output files frozen_c = 'frozen.c' config_c = 'config.c' target = 'a.out' # normally derived from script name makefile = 'Makefile' # parse command line try: opts, args = getopt.getopt(sys.argv[1:], 'e:p:') except getopt.error, msg: usage('getopt error: ' + str(msg)) # proces option arguments for o, a in opts: if o == '-e': extensions.append(a) if o == '-p': prefix = a # locations derived from options binlib = os.path.join(prefix, 'lib/python/lib') incldir = os.path.join(prefix, 'include/Py') config_c_in = os.path.join(binlib, 'config.c.in') frozenmain_c = os.path.join(binlib, 'frozenmain.c') makefile_in = os.path.join(binlib, 'Makefile') defines = ['-DHAVE_CONFIG_H', '-DUSE_FROZEN', '-DNO_MAIN', '-DPYTHONPATH=\\"$(PYTHONPATH)\\"'] includes = ['-I' + incldir, '-I' + binlib] # sanity check of directories and files for dir in [prefix, binlib, incldir] + extensions: if not os.path.exists(dir): usage('needed directory %s not found' % dir) if not os.path.isdir(dir): usage('%s: not a directory' % dir) for file in config_c_in, makefile_in, frozenmain_c: if not os.path.exists(file): usage('needed file %s not found' % file) if not os.path.isfile(file): usage('%s: not a plain file' % file) for dir in extensions: setup = os.path.join(dir, 'Setup') if not os.path.exists(setup): usage('needed file %s not found' % setup) if not os.path.isfile(setup): usage('%s: not a plain file' % setup) # check that enough arguments are passed if not args: usage('at least one filename argument required') # check that file arguments exist for arg in args: if not os.path.exists(arg): usage('argument %s not found' % arg) if not os.path.isfile(arg): usage('%s: not a plain file' % arg) # process non-option arguments scriptfile = args[0] modules = args[1:] # derive target name from script name base = os.path.basename(scriptfile) base, ext = os.path.splitext(base) if base: if base != scriptfile: target = base else: target = base + '.bin' # Actual work starts here... dict = findmodules.findmodules(scriptfile, modules, path) backup = frozen_c + '~' try: os.rename(frozen_c, backup) except os.error: backup = None outfp = open(frozen_c, 'w') try: makefreeze.makefreeze(outfp, dict) finally: outfp.close() if backup: if cmp.cmp(backup, frozen_c): sys.stderr.write('%s not changed, not written\n' % frozen_c) os.rename(backup, frozen_c) builtins = [] unknown = [] mods = dict.keys() mods.sort() for mod in mods: if dict[mod] == '<builtin>': builtins.append(mod) elif dict[mod] == '<unknown>': unknown.append(mod) addfiles = [] if unknown: addfiles, addmods = \ checkextensions.checkextensions(unknown, extensions) for mod in addmods: unknown.remove(mod) builtins = builtins + addmods if unknown: sys.stderr.write('Warning: unknown modules remain: %s\n' % string.join(unknown)) builtins.sort() infp = open(config_c_in) backup = config_c + '~' try: os.rename(config_c, backup) except os.error: backup = None outfp = open(config_c, 'w') try: makeconfig.makeconfig(infp, outfp, builtins) finally: outfp.close() infp.close() if backup: if cmp.cmp(backup, config_c): sys.stderr.write('%s not changed, not written\n' % config_c) os.rename(backup, config_c) cflags = defines + includes + ['$(OPT)'] libs = [] for n in 'Modules', 'Python', 'Objects', 'Parser': n = 'lib%s.a' % n n = os.path.join(binlib, n) libs.append(n) makevars = parsesetup.getmakevars(makefile_in) somevars = {} for key in makevars.keys(): somevars[key] = makevars[key] somevars['CFLAGS'] = string.join(cflags) # override files = ['$(OPT)', config_c, frozen_c, frozenmain_c] + \ addfiles + libs + \ ['$(MODLIBS)', '$(LIBS)', '$(SYSLIBS)'] backup = makefile + '~' try: os.rename(makefile, backup) except os.error: backup = None outfp = open(makefile, 'w') try: makemakefile.makemakefile(outfp, somevars, files, target) finally: outfp.close() if backup: if not cmp.cmp(backup, makefile): print 'previous Makefile saved as', backup else: sys.stderr.write('%s not changed, not written\n' % makefile) os.rename(backup, makefile) # Done! print 'Now run make to build the target:', target | 57f604396ce498c95df3c2bbf0320a161ae0d372 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/57f604396ce498c95df3c2bbf0320a161ae0d372/freeze.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
4418,
273,
5378,
589,
273,
2589,
18,
803,
225,
468,
876,
1390,
12810,
67,
71,
273,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
468,
5713,
27621,
819,
1633,
273,
17154,
1082,
202,
7,
444,
2121,
598,
300,
84,
1456,
4418,
273,
5378,
589,
273,
2589,
18,
803,
225,
468,
876,
1390,
12810,
67,
71,
273,
29... |
if querytype == 'glob': querytype = '=' executeSQL(cur, "select DISTINCT pkgKey from files where name %s ?" % querytype, (name,)) self._sql_pkgKey2po(rep, cur, results) | def _search_primary_files(self, name): querytype = 'glob' if not misc.re_glob(name): querytype = '=' results = [] for (rep,cache) in self.primarydb.items(): if rep in self._all_excludes: continue cur = cache.cursor() executeSQL(cur, "select DISTINCT pkgKey from files where name %s ?" % querytype, (name,)) self._sql_pkgKey2po(rep, cur, results) | 655adb93b4b680ed47108b0f61edc5f1ad5cc530 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/655adb93b4b680ed47108b0f61edc5f1ad5cc530/sqlitesack.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
3072,
67,
8258,
67,
2354,
12,
2890,
16,
508,
4672,
843,
723,
273,
296,
10581,
11,
309,
486,
20448,
18,
266,
67,
10581,
12,
529,
4672,
843,
723,
273,
5214,
1686,
273,
5378,
225,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3072,
67,
8258,
67,
2354,
12,
2890,
16,
508,
4672,
843,
723,
273,
296,
10581,
11,
309,
486,
20448,
18,
266,
67,
10581,
12,
529,
4672,
843,
723,
273,
5214,
1686,
273,
5378,
225,
... | |
return [cfg.GetFileStorageDir()] | return [[cfg.GetFileStorageDir()]] | def _GetStorageTypeArgs(cfg, storage_type): """Returns the arguments for a storage type. """ # Special case for file storage if storage_type == constants.ST_FILE: return [cfg.GetFileStorageDir()] return [] | a4d138b796da6f9c393620804ec3b3d5dd3d7864 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/7542/a4d138b796da6f9c393620804ec3b3d5dd3d7864/cmdlib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
967,
3245,
559,
2615,
12,
7066,
16,
2502,
67,
723,
4672,
3536,
1356,
326,
1775,
364,
279,
2502,
618,
18,
225,
3536,
468,
13409,
648,
364,
585,
2502,
309,
2502,
67,
723,
422,
6810,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
967,
3245,
559,
2615,
12,
7066,
16,
2502,
67,
723,
4672,
3536,
1356,
326,
1775,
364,
279,
2502,
618,
18,
225,
3536,
468,
13409,
648,
364,
585,
2502,
309,
2502,
67,
723,
422,
6810,... |
gMonitor.registerActivity( "Iteration", "Agent Loops", "TransferAgent", "Loops/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Execute", "Request Processed", "TransferAgent", "Requests/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Done", "Request Completed", "TransferAgent", "Requests/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replicate and register","Replicate and register operations","TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replicate","Replicate operations","TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Put and register","Put and register operations","TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Put","Put operations","TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replication successful","Successful replications","TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Put successful","Successful puts","TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replication failed","Failed replications","TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Put failed","Failed puts","TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replica registration successful","Successful replica registrations","TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity("File registration successful","Successful file registrations","TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity("Replica registration failed","Failed replica registrations","TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity("File registration failed","Failed file registrations","TransferAgent", "Failed/min", gMonitor.OP_SUM ) self.maxNumberOfThreads = self.am_getOption('NumberOfThreads',1) self.threadPoolDepth = self.am_getOption('ThreadPoolDepth',1) self.threadPool = ThreadPool(1,self.maxNumberOfThreads) self.useProxies = self.am_getOption('UseProxies','True').lower() in ( "y", "yes", "true" ) self.proxyLocation = self.am_getOption('ProxyLocation', '' ) | gMonitor.registerActivity( "Iteration", "Agent Loops", "TransferAgent", "Loops/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Execute", "Request Processed", "TransferAgent", "Requests/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Done", "Request Completed", "TransferAgent", "Requests/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replicate and register", "Replicate and register operations", "TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replicate", "Replicate operations", "TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Put and register", "Put and register operations", "TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Put", "Put operations", "TransferAgent", "Attempts/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replication successful", "Successful replications", "TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Put successful", "Successful puts", "TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replication failed", "Failed replications", "TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Put failed", "Failed puts", "TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replica registration successful", "Successful replica registrations", "TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "File registration successful", "Successful file registrations", "TransferAgent", "Successful/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "Replica registration failed", "Failed replica registrations", "TransferAgent", "Failed/min", gMonitor.OP_SUM ) gMonitor.registerActivity( "File registration failed", "Failed file registrations", "TransferAgent", "Failed/min", gMonitor.OP_SUM ) self.maxNumberOfThreads = self.am_getOption( 'NumberOfThreads', 1 ) self.threadPoolDepth = self.am_getOption( 'ThreadPoolDepth', 1 ) self.threadPool = ThreadPool( 1, self.maxNumberOfThreads ) self.useProxies = self.am_getOption( 'UseProxies', 'True' ).lower() in ( "y", "yes", "true" ) self.proxyLocation = self.am_getOption( 'ProxyLocation', '' ) | def initialize(self): | e9b27a9be4536012e60823ee81099deb0a1fbe85 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/e9b27a9be4536012e60823ee81099deb0a1fbe85/TransferAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4046,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print("Looking for rundeps in '%s' of '%s'" % (methodNameFQ, fileId)) | def getMethodDeps(self, fileId, methodNameFQ, variants): # get the fileId class, find the node of methodNameFQ, and extract its # dependencies (can only be runtime deps, since all inFunction) # return the deps print("Looking for rundeps in '%s' of '%s'" % (methodNameFQ, fileId)) | 1b75ceb558792d32e4008f843d518dc3f1db7bc5 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/1b75ceb558792d32e4008f843d518dc3f1db7bc5/DependencyLoader.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6272,
14430,
12,
2890,
16,
21223,
16,
4918,
23032,
16,
12935,
4672,
468,
336,
326,
21223,
667,
16,
1104,
326,
756,
434,
4918,
23032,
16,
471,
2608,
2097,
468,
5030,
261,
4169,
1338,
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,
6272,
14430,
12,
2890,
16,
21223,
16,
4918,
23032,
16,
12935,
4672,
468,
336,
326,
21223,
667,
16,
1104,
326,
756,
434,
4918,
23032,
16,
471,
2608,
2097,
468,
5030,
261,
4169,
1338,
506,... | |
photo_path = os.path.join(album_path, photo.title.text) | photo_name = os.path.split(photo.title.text)[1] photo_path = os.path.join(album_path, photo_name) | def DownloadAlbum(self, base_path, user='default', title=None): """Download an album to the client. Keyword arguments: base_path -- the path on the filesystem to copy albums to. Each album will be stored in base_path/<album title>. If base_path does not exist, it and each non-existent parent directory will be created. user -- the user whose albums are being retrieved. (Default 'default') title -- title that the album should have. (Default None, for all albums) """ entries = self.GetAlbum(user=user, title=title) for album in entries: album_path = os.path.join(base_path, album.title.text) album_concat = 1 if os.path.exists(album_path): base_album_path = album_path while os.path.exists(album_path): album_path + base_album_path + '-%i' % album_concat album_concat += 1 os.makedirs(album_path) f = self.client.GetFeed('/data/feed/api/user/%s/albumid/%s?kind=photo' % (user, album.gphoto_id.text)) for photo in f.entry: photo_path = os.path.join(album_path, photo.title.text) # Check for a file extension, add it if it does not exist. if photo_path.find('.') == -1: t = photo.content.type photo_path += '.' + t[t.find('/')+1:] if os.path.exists(photo_path): base_photo_path = photo_path photo_concat = 1 while os.path.exists(photo_path): photo_path = base_photo_path + '-%i' % photo_concat photo_concat += 1 print 'Downloading %s to %s' % (photo.title.text, photo_path) urllib.urlretrieve(photo.content.src, photo_path) | 4b6651bd810585adf399174b1b738460cf2fc40d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/2899/4b6651bd810585adf399174b1b738460cf2fc40d/service.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
13059,
30330,
12,
2890,
16,
1026,
67,
803,
16,
729,
2218,
1886,
2187,
2077,
33,
7036,
4672,
3536,
7109,
392,
14844,
358,
326,
1004,
18,
225,
18317,
1775,
30,
1026,
67,
803,
1493,
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,
13059,
30330,
12,
2890,
16,
1026,
67,
803,
16,
729,
2218,
1886,
2187,
2077,
33,
7036,
4672,
3536,
7109,
392,
14844,
358,
326,
1004,
18,
225,
18317,
1775,
30,
1026,
67,
803,
1493,
326,
... |
self.failUnlessRaises(AttributeError, operator.attrgetter('foo'), C()) | self.failUnlessRaises(SyntaxError, operator.attrgetter('foo'), C()) | def __getattr(self, name): raise SyntaxError | 6f7e2d0a30ff60122516ecb5120444f87642985c /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8546/6f7e2d0a30ff60122516ecb5120444f87642985c/test_operator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
12,
2890,
16,
508,
4672,
1002,
18453,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
12,
2890,
16,
508,
4672,
1002,
18453,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
self.mimetype = "text/plain" | self.mimetype="application/json" | def encode(self, o): for encoder in get_registered_encoders(): result = encoder.encode(o) | 16f4b880ce3ffa5f11de6ba8417e0ecb96ff3994 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6757/16f4b880ce3ffa5f11de6ba8417e0ecb96ff3994/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
16,
320,
4672,
364,
7261,
316,
336,
67,
14327,
67,
1331,
369,
414,
13332,
563,
273,
7261,
18,
3015,
12,
83,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2017,
12,
2890,
16,
320,
4672,
364,
7261,
316,
336,
67,
14327,
67,
1331,
369,
414,
13332,
563,
273,
7261,
18,
3015,
12,
83,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
signal.signal(signal.SIGCHLD, self._handleSigchld) | signal.signal(signal.SIGCHLD, lambda : self.callLater(0, reapAllProcesses)) | def __init__(self, ctxt): from twisted.internet.main import installReactor self.oreactor = oxidereactor.oxidereactor(ctxt, "oxidereactor") posixbase.PosixReactorBase.__init__(self) installReactor(self) self.installResolver(Resolver(self.oreactor)) signal.signal(signal.SIGCHLD, self._handleSigchld) | 9b8aeb5c7401c0f6869c0f214566459520151358 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/9b8aeb5c7401c0f6869c0f214566459520151358/pyoxidereactor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
14286,
4672,
628,
2339,
25444,
18,
267,
14726,
18,
5254,
1930,
3799,
426,
3362,
365,
18,
479,
3362,
273,
320,
6212,
822,
3362,
18,
21564,
822,
3362,
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,
1001,
2738,
972,
12,
2890,
16,
14286,
4672,
628,
2339,
25444,
18,
267,
14726,
18,
5254,
1930,
3799,
426,
3362,
365,
18,
479,
3362,
273,
320,
6212,
822,
3362,
18,
21564,
822,
3362,
12,
... |
raise AssertionError, "'...%s......' % u'abc' failed to raise an exception" | print "*** formatting failed ...%s......' % u'abc' failed to raise an exception" | test('capwords', u'abc\t def \nghi', u'Abc Def Ghi') | c3f8becf006afaada90834988813606c9d9b78a4 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c3f8becf006afaada90834988813606c9d9b78a4/test_unicode.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1842,
2668,
5909,
3753,
2187,
582,
11,
18947,
64,
88,
282,
1652,
225,
521,
3368,
12266,
2187,
582,
11,
5895,
71,
10922,
611,
12266,
6134,
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,
1842,
2668,
5909,
3753,
2187,
582,
11,
18947,
64,
88,
282,
1652,
225,
521,
3368,
12266,
2187,
582,
11,
5895,
71,
10922,
611,
12266,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
self.using_xds = 1 def drag_end(self, widget, context): if self.using_xds: uri = read_xds_property(context, TRUE) if uri: path = get_local_path(uri) if path: self.window.set_uri(path) else: self.window.set_uri(uri) else: | def drag_data_get(self, widget, context, selection_data, info, time): if info == TARGET_RAW: self.window.send_raw(selection_data) self.data_sent = 1 return elif info != TARGET_XDS: report_error("Bad target requested!") return | b92c716dec32518f9721be20417f7b38721340a8 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4591/b92c716dec32518f9721be20417f7b38721340a8/SaveBox.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8823,
67,
892,
67,
588,
12,
2890,
16,
3604,
16,
819,
16,
4421,
67,
892,
16,
1123,
16,
813,
4672,
309,
1123,
422,
16964,
67,
10821,
30,
365,
18,
5668,
18,
4661,
67,
1899,
12,
10705,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8823,
67,
892,
67,
588,
12,
2890,
16,
3604,
16,
819,
16,
4421,
67,
892,
16,
1123,
16,
813,
4672,
309,
1123,
422,
16964,
67,
10821,
30,
365,
18,
5668,
18,
4661,
67,
1899,
12,
10705,
... | |
gLogger.info("LFCvsSEAgent.execute: Attempting to get contents of %s." % currentDir) res = self.ReplicaManager.getCatalogDirectoryContents(currentDir) | gLogger.info( "LFCvsSEAgent.execute: Attempting to get contents of %s." % currentDir ) res = self.ReplicaManager.getCatalogDirectoryContents( currentDir ) | def execute(self): | ff946fabd16f68b844021b4c5e84a27f3c288165 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/ff946fabd16f68b844021b4c5e84a27f3c288165/LFCvsSEAgent.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1836,
12,
2890,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
GmstTweak(_('UOP Vampire Aging and Face Fix.esp'), _("Duplicate of UOP component that disables vampire aging (fixes a bug). Use instead of 'UOP Vampire Aging & Face Fix.esp' to save an esp slot."), 'iVampirismAgeOffset', ('Fix it!',0), | GmstTweak(_('PipBoy Light Keypress-Delay'), _("Seconds of delay until the PipBoy Light switches on."), ('fPlayerPipBoyLightTimer'), (_('0.3'),0.3), (_('0.4'),0.4), (_('0.5'),0.5), (_('0.6'),0.6), (_('0.7'),0.7), (_('[0.8]'),0.8), (_('1.0'),1.0), ), GmstTweak(_('VATS Playback Delay'), _("Seconds of delay after the VATS Camera finished playback."), ('fVATSPlaybackDelay'), (_('0.01'),0.01), (_('0.05'),0.05), (_('0.10'),0.1), (_('[0.17]'),0.17), (_('0.25'),0.25), | def buildPatch(self,patchFile,keep,log): """Build patch.""" eids = ((self.key,),self.key)[isinstance(self.key,tuple)] for eid,value in zip(eids,self.choiceValues[self.chosen]): gmst = MreGmst(('GMST',0,0,0,0,0)) gmst.eid,gmst.value,gmst.longFids = eid,value,True fid = gmst.fid = keep(gmst.getFallout3Fid()) patchFile.GMST.setRecord(gmst) if len(self.choiceLabels) > 1: log('* %s: %s' % (self.label,self.choiceLabels[self.chosen])) else: log('* ' + self.label) | 5935b8483f13976a5220d49b0ee7a6ac7971f4f0 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/6682/5935b8483f13976a5220d49b0ee7a6ac7971f4f0/bosh.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
7332,
12,
2890,
16,
2272,
812,
16,
10102,
16,
1330,
4672,
3536,
3116,
4729,
12123,
425,
2232,
273,
14015,
2890,
18,
856,
16,
3631,
2890,
18,
856,
25146,
291,
1336,
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,
1361,
7332,
12,
2890,
16,
2272,
812,
16,
10102,
16,
1330,
4672,
3536,
3116,
4729,
12123,
425,
2232,
273,
14015,
2890,
18,
856,
16,
3631,
2890,
18,
856,
25146,
291,
1336,
12,
2890,
18,
... |
"C:\\GROMACS\\cpp.exe", \ | "C:\\GROMACS_3.3.2+HDF5_p2\\MCPP\\bin\\mcpp.exe", \ | def enable_cpp(self, enable = True): """ Enables/disables cpp plugin. | 4f794b71bc494e823c1131003f367fccfea65215 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/11221/4f794b71bc494e823c1131003f367fccfea65215/UserPrefs.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4237,
67,
4057,
84,
12,
2890,
16,
4237,
273,
1053,
4672,
3536,
1374,
1538,
19,
2251,
1538,
3283,
84,
1909,
18,
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,
4237,
67,
4057,
84,
12,
2890,
16,
4237,
273,
1053,
4672,
3536,
1374,
1538,
19,
2251,
1538,
3283,
84,
1909,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
for a in e['authors']: undelete_authors(a) | print e['authors'] authors = [ol.get(akey) for akey in e['authors']] authors = [ol.get(a['location']) if a['type'] == '/type/redirect' else a \ for a in authors] e['authors'] = [a['key'] for a in authors] undelete_authors(authors) | def add_source_records(key, new, thing, data): sr = None e = ol.get(key) if 'source_records' in e: if new in e['source_records']: return e['source_records'].append(new) else: existing = get_mc(key) amazon = 'amazon:' if existing.startswith('ia:'): sr = [existing] elif existing.startswith(amazon): sr = amazon_source_records(existing[len(amazon):]) or [existing] else: m = re_meta_mrc.match(existing) sr = ['marc:' + existing if not m else 'ia:' + m.group(1)] assert new not in sr e['source_records'] = sr + [new] # fix other bits of the record as well new_toc = fix_toc(e) if new_toc: e['table_of_contents'] = new_toc if e.get('subjects', None) and any(has_dot(s) for s in e['subjects']): subjects = [s[:-1] if has_dot(s) else s for s in e['subjects']] e['subjects'] = subjects if 'authors' in e: if any(a=='None' for a in e['authors']): assert len(e['authors']) == 1 new_author = author_from_data(new, data) e['authors'] = [new_author] else: for a in e['authors']: undelete_authors(a) try: print ol.save(key, e, 'found a matching MARC record') except: print e raise if new_toc: new_edition = ol.get(key) # [{u'type': <ref: u'/type/toc_item'>}, ...] assert 'title' in new_edition['table_of_contents'][0] | c86afd92e42ac258f8c92f39004f46439ca07c68 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3913/c86afd92e42ac258f8c92f39004f46439ca07c68/import_marc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3168,
67,
7094,
12,
856,
16,
394,
16,
7757,
16,
501,
4672,
9133,
273,
599,
425,
273,
8793,
18,
588,
12,
856,
13,
309,
296,
3168,
67,
7094,
11,
316,
425,
30,
309,
394,
316,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
3168,
67,
7094,
12,
856,
16,
394,
16,
7757,
16,
501,
4672,
9133,
273,
599,
425,
273,
8793,
18,
588,
12,
856,
13,
309,
296,
3168,
67,
7094,
11,
316,
425,
30,
309,
394,
316,... |
if( current != gst.STATE_PLAYING and current != gst.STATE_PAUSED and current != gst.STATE_READY): | if current == gst.STATE_NULL: return if current not in (gst.STATE_PLAYING, gst.STATE_PAUSED, gst.STATE_READY): | def update( self): #print "update" _, current,_ = self.player.get_state() if( current != gst.STATE_PLAYING and current != gst.STATE_PAUSED and current != gst.STATE_READY): print "I'm out" return if current == gst.STATE_PLAYING: state = 'playing' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'PLAYING') elif current == gst.STATE_PAUSED: state = 'paused' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'PAUSED_PLAYBACK') else: state = 'idle' self.server.av_transport_server.set_variable(self.server.connection_manager_server.lookup_avt_id(self.current_connection_id), 'TransportState', 'STOPPED') | e3c79d4d5e164a9aea8ac1f0cc5631766e9dd86d /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/11626/e3c79d4d5e164a9aea8ac1f0cc5631766e9dd86d/gstreamer_audio_player.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
365,
4672,
468,
1188,
315,
2725,
6,
389,
16,
783,
16,
67,
273,
365,
18,
14872,
18,
588,
67,
2019,
1435,
309,
783,
422,
314,
334,
18,
7998,
67,
8560,
30,
327,
309,
783,
48... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1089,
12,
365,
4672,
468,
1188,
315,
2725,
6,
389,
16,
783,
16,
67,
273,
365,
18,
14872,
18,
588,
67,
2019,
1435,
309,
783,
422,
314,
334,
18,
7998,
67,
8560,
30,
327,
309,
783,
48... |
return task.cont task = taskMgr.add(leakContainer, 'leakContainer-%s' % serialNum()) | taskMgr.doMethodLater(10, leakContainer, 'leakContainer-%s' % serialNum()) if task: return task.done leakContainer() | def leakContainer(task): base = getBase() if not hasattr(base, 'leakContainer'): base.leakContainer = {} # use tuples as keys since they can't be weakref'd, and use an instance # since it can't be repr/eval'd # that will force the leak detector to hold a normal 'non-weak' reference class LeakKey: pass base.leakContainer[(LeakKey(),)] = {} # test the non-weakref object reference handling if random.random() < .01: key = random.choice(base.leakContainer.keys()) ContainerLeakDetector.notify.debug( 'removing reference to leakContainer key %s so it will be garbage-collected' % safeRepr(key)) del base.leakContainer[key] return task.cont | 2144050758ff193ad2f7bd973df523fae0d7fd5c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8543/2144050758ff193ad2f7bd973df523fae0d7fd5c/ContainerLeakDetector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20891,
2170,
12,
4146,
4672,
1026,
273,
8297,
1435,
309,
486,
3859,
12,
1969,
16,
296,
298,
581,
2170,
11,
4672,
1026,
18,
298,
581,
2170,
273,
2618,
468,
999,
10384,
487,
1311,
3241,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
20891,
2170,
12,
4146,
4672,
1026,
273,
8297,
1435,
309,
486,
3859,
12,
1969,
16,
296,
298,
581,
2170,
11,
4672,
1026,
18,
298,
581,
2170,
273,
2618,
468,
999,
10384,
487,
1311,
3241,
... |
Parses all of the percent directives found at the top of a file and returns the input text of self with all of them removed. | Returns a string which consists of the input text of this cell with the percent directives at the top removed. As it's doing this, it computes a list of all the directives and which system (if any) the cell should be run under. | def parse_percent_directives(self): """ Parses all of the percent directives found at the top of a file and returns the input text of self with all of them removed. | 75d274771c3eddd8af9c62f60ae6517eee95be1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/75d274771c3eddd8af9c62f60ae6517eee95be1a/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
8849,
67,
30850,
12,
2890,
4672,
3536,
2280,
2420,
777,
434,
326,
5551,
13877,
1392,
622,
326,
1760,
434,
279,
585,
471,
1135,
326,
810,
977,
434,
365,
598,
777,
434,
2182,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1109,
67,
8849,
67,
30850,
12,
2890,
4672,
3536,
2280,
2420,
777,
434,
326,
5551,
13877,
1392,
622,
326,
1760,
434,
279,
585,
471,
1135,
326,
810,
977,
434,
365,
598,
777,
434,
2182,
3... |
self._db=self._storage=self._tmp=self.new_oid=None | self._db=self._storage=self._tmp=self.new_oid=self._opened=None self._debug_info=() | def close(self): self._incrgc() db=self._db self._db=self._storage=self._tmp=self.new_oid=None db._closeConnection(self) | a2ccfe682ea4437462606a5a717ac50675f30fa6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/a2ccfe682ea4437462606a5a717ac50675f30fa6/Connection.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
6315,
267,
3353,
13241,
1435,
1319,
33,
2890,
6315,
1966,
365,
6315,
1966,
33,
2890,
6315,
5697,
33,
2890,
6315,
5645,
33,
2890,
18,
2704,
67,
839,
33,
2890,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1746,
12,
2890,
4672,
365,
6315,
267,
3353,
13241,
1435,
1319,
33,
2890,
6315,
1966,
365,
6315,
1966,
33,
2890,
6315,
5697,
33,
2890,
6315,
5645,
33,
2890,
18,
2704,
67,
839,
33,
2890,
... |
sage: sqrt(2) in X False | sage: sqrt(2) in X True | def __contains__(self, x): """ Return true if self contains x. | ba54b40bc620a30d71b0cddf2855c9f6694f6fc2 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9417/ba54b40bc620a30d71b0cddf2855c9f6694f6fc2/set.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
619,
4672,
3536,
2000,
638,
309,
365,
1914,
619,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
12298,
972,
12,
2890,
16,
619,
4672,
3536,
2000,
638,
309,
365,
1914,
619,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
self.write("\377\374" + bit[1]) | self.write(IAC + WONT + bit[1]) | def parse_telnet(self, data): odata = data data = re.sub(BareLF, '\\1', data) data = data.replace('\015\000', '') data = data.replace('\000', '') | 74ba678cb4a993882269388a280c38a426475b05 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/74ba678cb4a993882269388a280c38a426475b05/debugserver.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
19261,
2758,
12,
2890,
16,
501,
4672,
320,
892,
273,
501,
501,
273,
283,
18,
1717,
12,
31242,
9105,
16,
3718,
21,
2187,
501,
13,
501,
273,
501,
18,
2079,
2668,
64,
1611,
25... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
19261,
2758,
12,
2890,
16,
501,
4672,
320,
892,
273,
501,
501,
273,
283,
18,
1717,
12,
31242,
9105,
16,
3718,
21,
2187,
501,
13,
501,
273,
501,
18,
2079,
2668,
64,
1611,
25... |
visitor.document.reporter.debug(self.__class__.__name__, | visitor.document.reporter.debug('visit_' + self.__class__.__name__, | def walk(self, visitor): """ Traverse a tree of `Node` objects, calling ``visit_...`` methods of `visitor` when entering each node. If there is no ``visit_particular_node`` method for a node of type ``particular_node``, the ``unknown_visit`` method is called. (The `walkabout()` method is similar, except it also calls ``depart_...`` methods before exiting each node.) | 2b6ac4d8de30eb01ad4af9ea0b327526907ac619 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8194/2b6ac4d8de30eb01ad4af9ea0b327526907ac619/nodes.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
12,
2890,
16,
8000,
4672,
3536,
2197,
2476,
279,
2151,
434,
1375,
907,
68,
2184,
16,
4440,
12176,
11658,
67,
2777,
10335,
2590,
434,
1375,
3516,
1811,
68,
1347,
19014,
1517,
756,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5442,
12,
2890,
16,
8000,
4672,
3536,
2197,
2476,
279,
2151,
434,
1375,
907,
68,
2184,
16,
4440,
12176,
11658,
67,
2777,
10335,
2590,
434,
1375,
3516,
1811,
68,
1347,
19014,
1517,
756,
1... |
build_log.write("Finished with status %s at \n" % (JOBSTATUS.whatis(self.build_status), self.build_end)) | build_log.write("Finished with status %s at %s\n" % (JOBSTATUS.whatis(self.build_status), self.build_end)) | def run(self): """Run job thread, download and build the package""" | ef35322a5a486a7e39a02a81c1e904724f2789ed /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5334/ef35322a5a486a7e39a02a81c1e904724f2789ed/Job.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
12,
2890,
4672,
3536,
1997,
1719,
2650,
16,
4224,
471,
1361,
326,
2181,
8395,
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,
1086,
12,
2890,
4672,
3536,
1997,
1719,
2650,
16,
4224,
471,
1361,
326,
2181,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
str = '</ul>\n' public.write(str); private.write(str) def _write_module_list(self, public, private, modules, groups): """ @return: The HTML code for the module hierarchy tree, containing the given modules. This is used by L{_module_to_html} to list the submodules of a package. @rtype: C{string} | _write_if_nonempty(public, private, uids, '</ul>\n') def _write_module_list(self, public, private, container, modules): """ Write HTML code for a list of the submodules to the given streams. This is used by L{_write_module} to list the submodules in a package. @param public: The output stream for the public version of the page. @param private: The output stream for the private version of the page. @param container: The package that contains the modules (as submodules). C{container} is used to group the modules. @param modules: The modules that should be included in the list. | def _write_module_tree(self, public, private): """ @return: The HTML code for the module hierarchy tree. This is used by L{_trees_to_html} to construct the hiearchy page. @rtype: C{string} """ str = '<ul>\n' public.write(str); private.write(str) # Find all top-level packages. for (uid, doc) in self._docmap.items(): if not isinstance(doc, ModuleDoc): continue pkg = doc.package() if pkg is None or not self._docmap.has_key(pkg): self._write_module_tree_item(public, private, uid) str = '</ul>\n' public.write(str); private.write(str) | 21a6d8c30a29a133335836c07a6da6e2f0b95f2a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11420/21a6d8c30a29a133335836c07a6da6e2f0b95f2a/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2626,
67,
2978,
67,
3413,
12,
2890,
16,
1071,
16,
3238,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
17204,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2626,
67,
2978,
67,
3413,
12,
2890,
16,
1071,
16,
3238,
4672,
3536,
632,
2463,
30,
1021,
3982,
981,
364,
326,
1605,
9360,
2151,
18,
225,
1220,
353,
1399,
635,
511,
95,
67,
17204,
... |
if system in titles: return titles[system] | self.child_start(self.__cmd + ' "' + self.title() + '"') | def title(system): """ Returns the standard name for a machine type """ titles = { 'GB' : 'Nintendo Gameboy (Handheld)', 'GBC' : 'Nintendo Gameboy Color (Handheld)', 'GBA' : 'Nintendo Gameboy Advance (Handheld)', 'VBOY' : 'Nintendo VirtualBoy', 'NES' : 'Nintendo Entertainment System', 'SNES' : 'Super Nintendo', 'N64' : 'Nintendo 64', 'GG' : 'Sega Game Gear (Handheld)', 'SG1K' : 'Sega SG-1000/SC-3000', 'SMS' : 'Sega Master System', 'SMD' : 'Sega Megadrive', 'LYNX' : 'Atari Lynx (Handheld)', '2600' : 'Atari 2600', '5200' : 'Atari 5200', '7800' : 'Atari 7800', 'JAG' : 'Atari Jaguar', 'PCE' : 'NEC PC-Engine', 'SGX' : 'NEC Supergrafx' } if system in titles: return titles[system] log.warning('Unknown machine type %s' % system) return None | 4d7c85d1959bf0ca996460fc95e82e3e12c04632 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/4d7c85d1959bf0ca996460fc95e82e3e12c04632/emu.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2077,
12,
4299,
4672,
3536,
2860,
326,
4529,
508,
364,
279,
5228,
618,
3536,
14693,
273,
288,
296,
5887,
11,
294,
296,
50,
474,
409,
83,
14121,
1075,
93,
261,
1144,
76,
488,
13,
2187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2077,
12,
4299,
4672,
3536,
2860,
326,
4529,
508,
364,
279,
5228,
618,
3536,
14693,
273,
288,
296,
5887,
11,
294,
296,
50,
474,
409,
83,
14121,
1075,
93,
261,
1144,
76,
488,
13,
2187,
... |
print template | def formatTitle(template, title, track): print template template = template.replace("$i", str(track)) print template template = template.replace("$t", title.name) print template template = template.replace("$d", title.descr) print template template = template.replace("$c", str(len(title.chaptermarks)+1)) print template template = template.replace("$f", title.inputfile) print template template = template.replace("$C", title.channel) print template l = title.length lengthstring = "%d:%02d:%02d" % (l/3600, l%3600/60, l%60) template = template.replace("$l", lengthstring) print template if title.timeCreate: template = template.replace("$Y", str(title.timeCreate[0])) template = template.replace("$M", str(title.timeCreate[1])) template = template.replace("$D", str(title.timeCreate[2])) timestring = "%d:%02d" % (title.timeCreate[3], title.timeCreate[4]) template = template.replace("$T", timestring) else: template = template.replace("$Y", "").replace("$M", "").replace("$D", "").replace("$T", "") return template.decode("utf-8") | 911fcb5e5e2bcdeeb8bde259c4fbe7827aa72bf1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6652/911fcb5e5e2bcdeeb8bde259c4fbe7827aa72bf1/Process.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
4247,
12,
3202,
16,
2077,
16,
3298,
4672,
1542,
273,
1542,
18,
2079,
2932,
8,
77,
3113,
609,
12,
4101,
3719,
1542,
273,
1542,
18,
2079,
2932,
8,
88,
3113,
2077,
18,
529,
13,
154... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
740,
4247,
12,
3202,
16,
2077,
16,
3298,
4672,
1542,
273,
1542,
18,
2079,
2932,
8,
77,
3113,
609,
12,
4101,
3719,
1542,
273,
1542,
18,
2079,
2932,
8,
88,
3113,
2077,
18,
529,
13,
154... | |
return urllib.addinfourl(fp, {}, "https:" + url) | return urllib.addinfourl(fp, resp.msg, "https:" + url) | def open_https(self, url, data=None, ssl_context=None): if ssl_context is not None and isinstance(ssl_context, SSL.Context): self.ctx = ssl_context else: self.ctx = SSL.Context(DEFAULT_PROTOCOL) user_passwd = None if type(url) is type(""): host, selector = splithost(url) if host: user_passwd, host = splituser(host) host = unquote(host) realhost = host else: host, selector = url urltype, rest = splittype(selector) url = rest user_passwd = None if string.lower(urltype) != 'http': realhost = None else: realhost, rest = splithost(rest) if realhost: user_passwd, realhost = splituser(realhost) if user_passwd: selector = "%s://%s%s" % (urltype, realhost, rest) #print "proxy via http:", host, selector if not host: raise IOError, ('http error', 'no host given') if user_passwd: import base64 auth = string.strip(base64.encodestring(user_passwd)) else: auth = None # Start here! h = httpslib.HTTPSConnection(host=host, ssl_context=self.ctx) #h.set_debuglevel(1) # Stop here! if data is not None: h.putrequest('POST', selector) h.putheader('Content-type', 'application/x-www-form-urlencoded') h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', selector) if auth: h.putheader('Authorization', 'Basic %s' % auth) for args in self.addheaders: apply(h.putheader, args) h.endheaders() if data is not None: h.send(data + '\r\n') # Here again! resp = h.getresponse() fp = resp.fp return urllib.addinfourl(fp, {}, "https:" + url) # Stop again. | 27987d31a5fc6ee030e946079c09bba59698f5ba /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8055/27987d31a5fc6ee030e946079c09bba59698f5ba/m2urllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1696,
67,
4528,
12,
2890,
16,
880,
16,
501,
33,
7036,
16,
5832,
67,
2472,
33,
7036,
4672,
309,
5832,
67,
2472,
353,
486,
599,
471,
1549,
12,
8157,
67,
2472,
16,
7419,
18,
1042,
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,
1696,
67,
4528,
12,
2890,
16,
880,
16,
501,
33,
7036,
16,
5832,
67,
2472,
33,
7036,
4672,
309,
5832,
67,
2472,
353,
486,
599,
471,
1549,
12,
8157,
67,
2472,
16,
7419,
18,
1042,
4672,... |
self.num_regs=len(regs)/2 | self.num_regs=len(regs) | def match(self, string, pos=0): | af8d2bf4d8643f7da7389a475f364c21836e8afe /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/af8d2bf4d8643f7da7389a475f364c21836e8afe/re.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
845,
12,
2890,
16,
533,
16,
949,
33,
20,
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,
... | [
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,
845,
12,
2890,
16,
533,
16,
949,
33,
20,
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.