rem stringlengths 2 226k | add stringlengths 0 227k | context stringlengths 8 228k | meta stringlengths 156 215 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
cuts.reverse() print cuts | cuts.reverse() | def cut_file_manually(self, filename): """ Cuts a file manually with Avidemux or VirtualDub and gets cuts from possibly created project files (VD) or from output (AD). returns: error_message, cuts, executable """ program, config_value = self.__get_program(filename, manually=True) if program < 0: return config_value, None, None if program == Program.AVIDEMUX: | fbc07340a2baff436448de20fd2d117057ba6ff1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11048/fbc07340a2baff436448de20fd2d117057ba6ff1/decodeorcut.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6391,
67,
768,
67,
4728,
3452,
12,
2890,
16,
1544,
4672,
3536,
385,
12940,
279,
585,
10036,
598,
432,
6768,
81,
2616,
578,
7269,
40,
373,
471,
5571,
6391,
87,
628,
10016,
2522,
1984,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
6391,
67,
768,
67,
4728,
3452,
12,
2890,
16,
1544,
4672,
3536,
385,
12940,
279,
585,
10036,
598,
432,
6768,
81,
2616,
578,
7269,
40,
373,
471,
5571,
6391,
87,
628,
10016,
2522,
1984,
1... |
heb_maj_animal=fields.get('heb_maj_animal'),\ | def insertHebergementMaj(self): """ ajoute les infos de mise à jour de l'hébergement par le proprio table habergement_maj met dans table hebergement le champ heb_maj_info_etat à 'En attente de confirmation' """ fields = self.context.REQUEST chargeFk=fields.get('heb_maj_charge_fk') hebPk=fields.get('heb_maj_hebpk') hebNom=fields.get('heb_maj_nom') wrapper = getSAWrapper('gites_wallons') session = wrapper.session insertHebergementMaj = wrapper.getMapper('hebergement_maj') newEntry = insertHebergementMaj(heb_maj_hebpk=hebPk,\ heb_maj_nom=fields.get('heb_maj_nom'),\ heb_maj_adresse=fields.get('heb_maj_adresse'),\ heb_maj_localite=fields.get('heb_maj_localite'),\ heb_maj_tenis=fields.get('heb_maj_tenis'),\ heb_maj_nautisme=fields.get('heb_maj_nautisme'),\ heb_maj_sky=fields.get('heb_maj_sky'),\ heb_maj_rando=fields.get('heb_maj_rando'),\ heb_maj_piscine=fields.get('heb_maj_piscine'),\ heb_maj_peche=fields.get('heb_maj_peche'),\ heb_maj_equitation=fields.get('heb_maj_equitation'),\ heb_maj_velo=fields.get('heb_maj_velo',),\ heb_maj_vtt=fields.get('heb_maj_vtt'),\ heb_maj_ravel=fields.get('heb_maj_ravel'),\ heb_maj_animal=fields.get('heb_maj_animal'),\ heb_maj_tarif_we_bs=fields.get('heb_maj_tarif_we_bs'),\ heb_maj_tarif_we_ms=fields.get('heb_maj_tarif_we_ms'),\ heb_maj_tarif_we_hs=fields.get('heb_maj_tarif_we_hs'),\ heb_maj_tarif_sem_bs=fields.get('heb_maj_tarif_sem_bs'),\ heb_maj_tarif_sem_ms=fields.get('heb_maj_tarif_sem_ms'),\ heb_maj_tarif_sem_hs=fields.get('heb_maj_tarif_sem_hs'),\ heb_maj_tarif_garantie=fields.get('heb_maj_tarif_garantie'),\ heb_maj_tarif_divers=fields.get('heb_maj_tarif_divers'),\ heb_maj_descriptif_fr=fields.get('heb_maj_descriptif_fr'),\ heb_maj_pointfort_fr=fields.get('heb_maj_pointfort_fr'),\ heb_maj_fumeur=fields.get('heb_maj_fumeur'),\ heb_maj_tenis_distance=fields.get('heb_maj_tenis_distance', 0),\ heb_maj_nautisme_distance=fields.get('heb_maj_nautisme_distance', 0),\ heb_maj_sky_distance=fields.get('heb_maj_sky_distance', 0),\ heb_maj_rando_distance=fields.get('heb_maj_rando_distance', 0),\ heb_maj_piscine_distance=fields.get('heb_maj_piscine_distance', 0),\ heb_maj_peche_distance=fields.get('heb_maj_peche_distance', 0),\ heb_maj_equitation_distance=fields.get('heb_maj_equitation_distance', 0),\ heb_maj_velo_distance=fields.get('heb_maj_velo_distance', 0),\ heb_maj_vtt_distance=fields.get('heb_maj_vtt_distance', 0),\ heb_maj_ravel_distance=fields.get('heb_maj_ravel_distance', 0),\ heb_maj_confort_tv=fields.get('heb_maj_confort_tv'),\ heb_maj_confort_feu_ouvert=fields.get('heb_maj_confort_feu_ouvert'),\ heb_maj_confort_lave_vaiselle=fields.get('heb_maj_confort_lave_vaiselle'),\ heb_maj_confort_micro_onde=fields.get('heb_maj_confort_micro_onde'),\ heb_maj_confort_lave_linge=fields.get('heb_maj_confort_lave_linge'),\ heb_maj_confort_seche_linge=fields.get('heb_maj_confort_seche_linge'),\ heb_maj_confort_congelateur=fields.get('heb_maj_confort_congelateur'),\ heb_maj_confort_internet=fields.get('heb_maj_confort_internet'),\ heb_maj_taxe_sejour=fields.get('heb_maj_taxe_sejour'),\ heb_maj_taxe_montant=fields.get('heb_maj_taxe_montant', 0),\ heb_maj_forfait_montant=fields.get('heb_maj_forfait_montant', 0),\ heb_maj_tarif_we_3n=fields.get('heb_maj_tarif_we_3n'),\ heb_maj_tarif_we_4n=fields.get('heb_maj_tarif_we_4n'),\ heb_maj_tarif_semaine_fin_annee=fields.get('heb_maj_tarif_semaine_fin_annee'),\ heb_maj_lit_1p=fields.get('heb_maj_lit_1p'),\ heb_maj_lit_2p=fields.get('heb_maj_lit_2p'),\ heb_maj_lit_sup=fields.get('heb_maj_lit_sup'),\ heb_maj_lit_enf=fields.get('heb_maj_lit_enf'),\ heb_maj_distribution_fr=fields.get('heb_maj_distribution_fr'),\ heb_maj_commerce=fields.get('heb_maj_commerce'),\ heb_maj_restaurant=fields.get('heb_maj_restaurant'),\ heb_maj_gare=fields.get('heb_maj_gare'),\ heb_maj_gare_distance=fields.get('heb_maj_gare_distance', 0),\ heb_maj_restaurant_distance=fields.get('heb_maj_restaurant_distance', 0),\ heb_maj_commerce_distance=fields.get('heb_maj_commerce_distance', 0),\ heb_maj_tarif_chmbr_avec_dej_1p=fields.get('heb_maj_tarif_chmbr_avec_dej_1p'),\ heb_maj_tarif_chmbr_avec_dej_2p=fields.get('heb_maj_tarif_chmbr_avec_dej_2p'),\ heb_maj_tarif_chmbr_avec_dej_3p=fields.get('heb_maj_tarif_chmbr_avec_dej_3p'),\ heb_maj_tarif_chmbr_sans_dej_1p=fields.get('heb_maj_tarif_chmbr_sans_dej_1p'),\ heb_maj_tarif_chmbr_sans_dej_2p=fields.get('heb_maj_tarif_chmbr_sans_dej_2p'),\ heb_maj_tarif_chmbr_sans_dej_3p=fields.get('heb_maj_tarif_chmbr_sans_dej_3p'),\ heb_maj_tarif_chmbr_table_hote_1p=fields.get('heb_maj_tarif_chmbr_table_hote_1p'),\ heb_maj_tarif_chmbr_table_hote_2p=fields.get('heb_maj_tarif_chmbr_table_hote_2p'),\ heb_maj_tarif_chmbr_table_hote_3p=fields.get('heb_maj_tarif_chmbr_table_hote_3p'),\ heb_maj_tarif_chmbr_autre_1p=fields.get('heb_maj_tarif_chmbr_autre_1p'),\ heb_maj_tarif_chmbr_autre_2p=fields.get('heb_maj_tarif_chmbr_autre_2p'),\ heb_maj_tarif_chmbr_autre_3p=fields.get('heb_maj_tarif_chmbr_autre_3p'),\ heb_maj_charge_fk=chargeFk) session.save(newEntry) session.flush() | 02e3d343a06c32eda283ba034f898a7e18e49a6c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/10188/02e3d343a06c32eda283ba034f898a7e18e49a6c/hebergement.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
5256,
31317,
820,
49,
4365,
12,
2890,
4672,
3536,
24787,
2571,
18022,
10626,
443,
312,
784,
225,
132,
259,
525,
477,
443,
328,
11,
76,
132,
107,
31317,
820,
779,
884,
2270,
566,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2243,
5256,
31317,
820,
49,
4365,
12,
2890,
4672,
3536,
24787,
2571,
18022,
10626,
443,
312,
784,
225,
132,
259,
525,
477,
443,
328,
11,
76,
132,
107,
31317,
820,
779,
884,
2270,
566,
... | |
self.server = testserver.ThreadServer(port=ports[0]) | self.server = testserver.ThreadServer(port=ports[0], debug=self._debug_flag) | def setUp(self): testhelp.TestCase.setUp(self) | cba97b5deb178aaa0e59d818d1ce40ab2340ac5e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7637/cba97b5deb178aaa0e59d818d1ce40ab2340ac5e/testsuite.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
24292,
12,
2890,
4672,
1842,
5201,
18,
4709,
2449,
18,
542,
1211,
12,
2890,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
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,
24292,
12,
2890,
4672,
1842,
5201,
18,
4709,
2449,
18,
542,
1211,
12,
2890,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
locales = self._job.get("compile-dist/locales", []) translationMaps = self.getTranslationMaps(parts, packages, variants, locales) | def runCompiled(self, parts, packages, boot, variants): if not self._job.get("compile-dist/file"): return | 2830c647c93dff2c883a2b63993fd15ce9de2f71 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/2830c647c93dff2c883a2b63993fd15ce9de2f71/Generator.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
20733,
12,
2890,
16,
2140,
16,
5907,
16,
4835,
16,
12935,
4672,
309,
486,
365,
6315,
4688,
18,
588,
2932,
11100,
17,
4413,
19,
768,
6,
4672,
327,
2,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
20733,
12,
2890,
16,
2140,
16,
5907,
16,
4835,
16,
12935,
4672,
309,
486,
365,
6315,
4688,
18,
588,
2932,
11100,
17,
4413,
19,
768,
6,
4672,
327,
2,
-100,
-100,
-100,
-100,
-100,... | |
args = args + v | args = args + [x for x in search_matches] | def filter(self, search_matches, filterspec, sort=[], group=[]): """Return a list of the ids of the active nodes in this class that match the 'filter' spec, sorted by the group spec and then the sort spec | 7987ffaeb21df04166953de4d0306f8fbdb073dc /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/1906/7987ffaeb21df04166953de4d0306f8fbdb073dc/rdbms_common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
1623,
67,
8436,
16,
1034,
2793,
16,
1524,
22850,
6487,
1041,
33,
8526,
4672,
3536,
990,
279,
666,
434,
326,
3258,
434,
326,
2695,
2199,
316,
333,
667,
716,
845,
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,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1034,
12,
2890,
16,
1623,
67,
8436,
16,
1034,
2793,
16,
1524,
22850,
6487,
1041,
33,
8526,
4672,
3536,
990,
279,
666,
434,
326,
3258,
434,
326,
2695,
2199,
316,
333,
667,
716,
845,
326... |
xml = glade.XML(GLADE, "win_quest_3b", gettext.textdomain()) win = xml.get_widget('win_quest_3b') label = xml.get_widget('label') label.set_text(msg) win.set_transient_for(parent) win.set_icon(TRYTON_ICON) response = win.run() parent.present() win.destroy() | dialog = gtk.Dialog(_('Confirmation'), parent, gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT | gtk.WIN_POS_CENTER_ON_PARENT | gtk.gdk.WINDOW_TYPE_HINT_DIALOG) dialog.set_icon(TRYTON_ICON) dialog.set_size_request(350, 150) hbox = gtk.HBox() image = gtk.Image() image.set_from_stock('tryton-dialog-information', gtk.ICON_SIZE_DIALOG) image.set_padding(15, 15) hbox.pack_start(image, False, False) label = gtk.Label('%s' % (to_xml(msg))) label.set_size_request(200, 60) hbox.pack_start(label, True, True) dialog.vbox.pack_start(hbox) dialog.add_button("gtk-cancel", gtk.RESPONSE_CANCEL) dialog.add_button("gtk-no", gtk.RESPONSE_NO) dialog.add_button("gtk-yes", gtk.RESPONSE_YES | gtk.CAN_DEFAULT | gtk.HAS_DEFAULT) dialog.set_default_response(gtk.RESPONSE_YES) dialog.set_transient_for(parent) dialog.show_all() response = dialog.run() parent.present() dialog.destroy() | def sur_3b(msg, parent): xml = glade.XML(GLADE, "win_quest_3b", gettext.textdomain()) win = xml.get_widget('win_quest_3b') label = xml.get_widget('label') label.set_text(msg) win.set_transient_for(parent) win.set_icon(TRYTON_ICON) response = win.run() parent.present() win.destroy() if response == gtk.RESPONSE_YES: return 'ok' elif response == gtk.RESPONSE_NO: return 'ko' elif response == gtk.RESPONSE_CANCEL: return 'cancel' else: return 'cancel' | bf70d1dcb2e37a22e80a16f76c2a6a9fef3fe232 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9151/bf70d1dcb2e37a22e80a16f76c2a6a9fef3fe232/common.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5056,
67,
23,
70,
12,
3576,
16,
982,
4672,
6176,
273,
22718,
18,
6353,
24899,
2668,
17597,
19899,
982,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
571,
22718,
18,
2565,
18683,
67,
1639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5056,
67,
23,
70,
12,
3576,
16,
982,
4672,
6176,
273,
22718,
18,
6353,
24899,
2668,
17597,
19899,
982,
16,
22718,
18,
2565,
18683,
67,
6720,
1013,
571,
22718,
18,
2565,
18683,
67,
1639,
... |
def champlain_change_marker(self, widget, event, view, marker): if event.button != 1 or event.click_count > 1: return False (latitude, longitude) = view.get_coords_at(int(event.x), int(event.y)) marker.set_position(latitude, longitude) | def champlain_change_marker(self, widget, event, view, marker): if event.button != 1 or event.click_count > 1: return False (latitude, longitude) = view.get_coords_at(int(event.x), int(event.y)) marker.set_position(latitude, longitude) | 28358d1e18c1d639d89e485e6a8c152f5437f2c3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8234/28358d1e18c1d639d89e485e6a8c152f5437f2c3/geolocalized-tasks.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
462,
2475,
530,
67,
3427,
67,
11145,
12,
2890,
16,
3604,
16,
871,
16,
1476,
16,
5373,
4672,
309,
871,
18,
5391,
480,
404,
578,
871,
18,
7475,
67,
1883,
405,
404,
30,
327,
1083,
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,
462,
2475,
530,
67,
3427,
67,
11145,
12,
2890,
16,
3604,
16,
871,
16,
1476,
16,
5373,
4672,
309,
871,
18,
5391,
480,
404,
578,
871,
18,
7475,
67,
1883,
405,
404,
30,
327,
1083,
225,
... | |
if True: | if 1: | def build(platform, clean): if platform == "Win32": dest = os.path.join(ROOT, "tcltk") machine = "X86" elif platform == "x64": dest = os.path.join(ROOT, "tcltk64") machine = "X64" else: raise ValueError(platform) # TCL tcldir = os.path.join(ROOT, TCL) if True: os.chdir(os.path.join(tcldir, "win")) if clean: system(NMAKE + "/f makefile.vc clean") system(NMAKE + "/f makefile.vc") system(NMAKE + "/f makefile.vc INSTALLDIR=%s install" % dest) # TK if True: os.chdir(os.path.join(ROOT, TK, "win")) if clean: system(NMAKE + "/f makefile.vc clean") system(NMAKE + "/f makefile.vc TCLDIR=%s" % tcldir) system(NMAKE + "/f makefile.vc TCLDIR=%s INSTALLDIR=%s install" % (tcldir, dest)) # TIX if True: # python9.mak is available at http://svn.python.org os.chdir(os.path.join(ROOT, TIX, "win")) if clean: system(NMAKE + "/f python9.mak clean") system(NMAKE + "/f python9.mak MACHINE=%s" % machine) system(NMAKE + "/f python9.mak install") | 569f285827fee89b4abb264e83675fbcc31008aa /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12029/569f285827fee89b4abb264e83675fbcc31008aa/build_tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1361,
12,
9898,
16,
2721,
4672,
309,
4072,
422,
315,
18049,
1578,
6877,
1570,
273,
1140,
18,
803,
18,
5701,
12,
9185,
16,
315,
88,
830,
16099,
7923,
5228,
273,
315,
60,
5292,
6,
1327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
12,
9898,
16,
2721,
4672,
309,
4072,
422,
315,
18049,
1578,
6877,
1570,
273,
1140,
18,
803,
18,
5701,
12,
9185,
16,
315,
88,
830,
16099,
7923,
5228,
273,
315,
60,
5292,
6,
1327,
... |
return render_to_response('registry/trial_form_step_4.html', | return render_to_response('registry/trial_form_step_5.html', | def step_5(request, trial_pk): ct = get_object_or_404(ClinicalTrial, id=int(trial_pk)) if request.POST: form = RecruitmentForm(request.POST, instance=ct) if form.is_valid(): form.save() if request.POST.has_key('submit_next'): return HttpResponseRedirect("/rg/step_6/%s/" % trial_pk) # FIXME: use dynamic url return HttpResponseRedirect("/rg/edit/%s/" % trial_pk) else: form = RecruitmentForm(instance=ct) forms = {'main':form} return render_to_response('registry/trial_form_step_4.html', {'forms':forms, 'next_form_title':_('Study Type Form')}) | 217b5d4049606ba36a7f088b345af6a2019e545c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12441/217b5d4049606ba36a7f088b345af6a2019e545c/views2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
67,
25,
12,
2293,
16,
12950,
67,
5465,
4672,
5691,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
2009,
267,
1706,
6251,
287,
16,
612,
33,
474,
12,
17493,
67,
5465,
3719,
225,
309... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2235,
67,
25,
12,
2293,
16,
12950,
67,
5465,
4672,
5691,
273,
336,
67,
1612,
67,
280,
67,
11746,
12,
2009,
267,
1706,
6251,
287,
16,
612,
33,
474,
12,
17493,
67,
5465,
3719,
225,
309... |
return paramre.split(value)[0].lower().strip() | ctype = paramre.split(value)[0].lower().strip() if ctype.count('/') <> 1: return 'text/plain' return ctype | def get_content_type(self): """Returns the message's content type. | a1582f2541853ec773a6d26a0ae0be12e177651f /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/a1582f2541853ec773a6d26a0ae0be12e177651f/Message.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
723,
12,
2890,
4672,
3536,
1356,
326,
883,
1807,
913,
618,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
1745,
67,
723,
12,
2890,
4672,
3536,
1356,
326,
883,
1807,
913,
618,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
def end_array(self): | def end_array(self, data): | def end_array(self): mark = self._marks[-1] del self._marks[-1] # map arrays to Python lists self._stack[mark:] = [self._stack[mark:]] self._value = 0 | cd906440fbd0694e165a09262268a608df82deeb /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/cd906440fbd0694e165a09262268a608df82deeb/xmlrpclib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
1126,
12,
2890,
16,
501,
4672,
2267,
273,
365,
6315,
17439,
18919,
21,
65,
1464,
365,
6315,
17439,
18919,
21,
65,
468,
852,
5352,
358,
6600,
6035,
365,
6315,
3772,
63,
3355,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
679,
67,
1126,
12,
2890,
16,
501,
4672,
2267,
273,
365,
6315,
17439,
18919,
21,
65,
1464,
365,
6315,
17439,
18919,
21,
65,
468,
852,
5352,
358,
6600,
6035,
365,
6315,
3772,
63,
3355,
2... |
if not pypy_option.oldstyle: space.enable_new_style_classes_as_default_metaclass() if self.uselibfile and not pypy_option.uselibfile: | space.enable_new_style_classes_as_default_metaclass() if self.uselibfile: | def run_file(self, space): self._prepare(space) fspath = self.getfspath() assert fspath.check() if self.oldstyle or pypy_option.oldstyle: space.enable_old_style_classes_as_default_metaclass() if self.uselibfile or pypy_option.uselibfile: w_original_faked_file = space.appexec([], '''(): from _file import file prev = __builtins__.file __builtins__.file = __builtins__.open = file return prev ''') try: callex(space, run_file, str(fspath), space) finally: if not pypy_option.oldstyle: space.enable_new_style_classes_as_default_metaclass() if self.uselibfile and not pypy_option.uselibfile: space.appexec([w_original_faked_file], '''(prev): __builtins__.file = __builtins__.open = prev ''') | c59cd873c4c7fc192fb0abeb5e6245a3dba172d7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6934/c59cd873c4c7fc192fb0abeb5e6245a3dba172d7/conftest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
768,
12,
2890,
16,
3476,
4672,
365,
6315,
9366,
12,
2981,
13,
2662,
803,
273,
365,
18,
588,
2556,
803,
1435,
1815,
2662,
803,
18,
1893,
1435,
309,
365,
18,
1673,
4060,
578,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
768,
12,
2890,
16,
3476,
4672,
365,
6315,
9366,
12,
2981,
13,
2662,
803,
273,
365,
18,
588,
2556,
803,
1435,
1815,
2662,
803,
18,
1893,
1435,
309,
365,
18,
1673,
4060,
578,
... |
"Set this if your mail host requires authenticated access"), | "Set this if your mail host requires authenticated access."), | def set(self, value): try: _val = int(value) except ValueError: raise OptionValueError(self, value, "Integer number required") else: Option.set(self, _val) | 092f01b48ed42c60558ac679f8ab88ea5a6f5fbc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1906/092f01b48ed42c60558ac679f8ab88ea5a6f5fbc/configuration.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
444,
12,
2890,
16,
460,
4672,
775,
30,
389,
1125,
273,
509,
12,
1132,
13,
1335,
2068,
30,
1002,
2698,
23610,
12,
2890,
16,
460,
16,
315,
4522,
1300,
1931,
7923,
469,
30,
2698,
18,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
444,
12,
2890,
16,
460,
4672,
775,
30,
389,
1125,
273,
509,
12,
1132,
13,
1335,
2068,
30,
1002,
2698,
23610,
12,
2890,
16,
460,
16,
315,
4522,
1300,
1931,
7923,
469,
30,
2698,
18,
54... |
self._optimizePackages(packageClasses, packageUsers, partPackages, variants, minPackageSize, minPackageSizeForUnshared) | def getPackages(self, partIncludes, smartExclude, classList, collapseParts, variants, jobContext): # Get config settings jobConfig = jobContext["jobconf"] minPackageSize = jobConfig.get("packages/sizes/min-package", 0) minPackageSizeForUnshared = jobConfig.get("packages/sizes/min-package-unshared", None) | e13fa46bae9b46a89002191681f67bac823b3c1a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/e13fa46bae9b46a89002191681f67bac823b3c1a/PartBuilder.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30401,
1023,
12,
2890,
16,
1087,
16815,
16,
13706,
12689,
16,
16035,
16,
13627,
4305,
16,
12935,
16,
1719,
1042,
4672,
468,
968,
642,
1947,
1719,
809,
273,
1719,
1042,
9614,
4688,
3923,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
30401,
1023,
12,
2890,
16,
1087,
16815,
16,
13706,
12689,
16,
16035,
16,
13627,
4305,
16,
12935,
16,
1719,
1042,
4672,
468,
968,
642,
1947,
1719,
809,
273,
1719,
1042,
9614,
4688,
3923,
... | |
return -1, -1, -1, None | def read_netstr(idx, data, tot): ldata = len(data) i = 0 lenstr = "" if ldata - idx < 11: data = data[idx:] + fd.read(8192) ldata = len(data) idx = 0 | cba211f4d1a0d5da31433100af6323330d464458 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/373/cba211f4d1a0d5da31433100af6323330d464458/disco_worker.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
2758,
701,
12,
3465,
16,
501,
16,
9997,
4672,
328,
892,
273,
562,
12,
892,
13,
277,
273,
374,
562,
701,
273,
1408,
309,
328,
892,
300,
2067,
411,
4648,
30,
501,
273,
501,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
2758,
701,
12,
3465,
16,
501,
16,
9997,
4672,
328,
892,
273,
562,
12,
892,
13,
277,
273,
374,
562,
701,
273,
1408,
309,
328,
892,
300,
2067,
411,
4648,
30,
501,
273,
501,
... | |
def image_configure(self, index, cnf={}, **kw): | def image_configure(self, index, cnf=None, **kw): | def image_configure(self, index, cnf={}, **kw): """Configure an embedded image at INDEX.""" if not cnf and not kw: cnf = {} for x in self.tk.split( self.tk.call( self._w, "image", "configure", index)): cnf[x[0][1:]] = (x[0][1:],) + x[1:] return cnf apply(self.tk.call, (self._w, "image", "configure", index) + self._options(cnf, kw)) | c99d182390dc4cd5e3c30aec2f12a94d397d6ea3 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/c99d182390dc4cd5e3c30aec2f12a94d397d6ea3/Tkinter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1316,
67,
14895,
12,
2890,
16,
770,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
3536,
11207,
392,
7488,
1316,
622,
12425,
12123,
309,
486,
23118,
471,
486,
5323,
30,
23118,
273,
2618,
364... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1316,
67,
14895,
12,
2890,
16,
770,
16,
23118,
33,
7036,
16,
2826,
9987,
4672,
3536,
11207,
392,
7488,
1316,
622,
12425,
12123,
309,
486,
23118,
471,
486,
5323,
30,
23118,
273,
2618,
364... |
return Recipe.to_xml(self,recipe,clone) | return Recipe.to_xml(self, recipe, clone, from_recipeset) | def to_xml(self, clone=False): recipe = self.doc.createElement("recipe") for guest in self.guests: recipe.appendChild(guest.to_xml(clone)) return Recipe.to_xml(self,recipe,clone) | 56f3fc24e32c8dc962f68550112df23b35df1d3b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14755/56f3fc24e32c8dc962f68550112df23b35df1d3b/model.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
358,
67,
2902,
12,
2890,
16,
3236,
33,
8381,
4672,
16100,
273,
365,
18,
2434,
18,
2640,
1046,
2932,
3927,
3151,
7923,
364,
13051,
316,
365,
18,
18908,
87,
30,
16100,
18,
6923,
1763,
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,
358,
67,
2902,
12,
2890,
16,
3236,
33,
8381,
4672,
16100,
273,
365,
18,
2434,
18,
2640,
1046,
2932,
3927,
3151,
7923,
364,
13051,
316,
365,
18,
18908,
87,
30,
16100,
18,
6923,
1763,
12... |
lta = 0. | lta = 1e-99 | def recStaltaPy(a, nsta, nlta): """ Recursive STA/LTA (see Withers et al. 1998 p. 98) Bit slower version written in Python. @note: There exists a faster version of this trigger wrapped in C called recstalta in this module! @type a: Numpy ndarray @param a: Seismic Trace @type nsta: Int @param nsta: Length of short time average window in samples @type nlta: Int @param nlta: Length of long time average window in samples @rtype: Numpy ndarray @return: Charactristic function of recursive STA/LTA """ try: a = a.tolist() except: pass ndat = len(a) # compute the short time average (STA) and long time average (LTA) # given by Evans and Allen csta = 1. / nsta clta = 1. / nlta sta = 0. lta = 0. charfct = [0.0]*len(a) icsta = 1 - csta iclta = 1 - clta for i in xrange(1, ndat): sq = a[i] ** 2 sta = csta * sq + icsta * sta lta = clta * sq + iclta * lta charfct[i] = sta / lta if i < nlta: charfct[i] = 0. return np.array(charfct) | ea4c7ece41544c44ddf36d8239db27ef9e2868d1 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10470/ea4c7ece41544c44ddf36d8239db27ef9e2868d1/trigger.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1950,
510,
287,
2351,
9413,
12,
69,
16,
290,
334,
69,
16,
7741,
2351,
4672,
3536,
12707,
2347,
37,
19,
48,
9833,
261,
5946,
3423,
414,
3393,
524,
18,
23673,
28,
293,
18,
24645,
13,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1950,
510,
287,
2351,
9413,
12,
69,
16,
290,
334,
69,
16,
7741,
2351,
4672,
3536,
12707,
2347,
37,
19,
48,
9833,
261,
5946,
3423,
414,
3393,
524,
18,
23673,
28,
293,
18,
24645,
13,
6... |
self._base_ring = GF(q, var) | self._base_ring = GF(q, name=name) | def __init__(self, q, var='a'): q = Integer(q) from sage.rings.arith import valuation t = valuation(q, 2) if 2**t != q or is_even(t): raise ValueError,"The ground field size %s must be an odd power of 2."%q id = 'SuzukiGroup(IsPermGroup,%s)'%q PermutationGroup_generic.__init__(self, id, from_group=True, check=False) self._q = q self._base_ring = GF(q, var) | 20f8599a5c63e0b4aa61487be1933077534aab59 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/20f8599a5c63e0b4aa61487be1933077534aab59/permgroup_named.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1043,
16,
569,
2218,
69,
11,
4672,
1043,
273,
2144,
12,
85,
13,
628,
272,
410,
18,
86,
899,
18,
297,
483,
1930,
21748,
367,
268,
273,
21748,
367,
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,
1043,
16,
569,
2218,
69,
11,
4672,
1043,
273,
2144,
12,
85,
13,
628,
272,
410,
18,
86,
899,
18,
297,
483,
1930,
21748,
367,
268,
273,
21748,
367,
12,
... |
except IOError as e: | except EnvironmentError as e: | def ignoring_eintr(__func, *args, **kwargs): try: return __func(*args, **kwargs) except IOError as e: if e.errno != signal.EINTR: raise return None | 404c68fb7776b9b73a1ef5fd198fadf72a26d832 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/8125/404c68fb7776b9b73a1ef5fd198fadf72a26d832/test_signal.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14398,
67,
13685,
313,
12,
972,
644,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
327,
1001,
644,
30857,
1968,
16,
2826,
4333,
13,
1335,
7518,
668,
487,
425,
30,
309,
425,
18,
19088,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14398,
67,
13685,
313,
12,
972,
644,
16,
380,
1968,
16,
2826,
4333,
4672,
775,
30,
327,
1001,
644,
30857,
1968,
16,
2826,
4333,
13,
1335,
7518,
668,
487,
425,
30,
309,
425,
18,
19088,
... |
self.__graph.SetVertexFilterProperty('') | self.__graph.SetVertexFilterProperty(None) | def purge_vertices(self): """Remove all vertices of the graph which are currently being filtered out, and return to the unfiltered state""" self.__graph.PurgeVertices() self.__graph.SetVertexFilterProperty('') | 3ba46e75d5f664e1e71d425bc56b2a987c3636f2 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/3516/3ba46e75d5f664e1e71d425bc56b2a987c3636f2/core.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
67,
17476,
12,
2890,
4672,
3536,
3288,
777,
6928,
434,
326,
2667,
1492,
854,
4551,
3832,
5105,
596,
16,
471,
327,
358,
326,
640,
12071,
919,
8395,
365,
16186,
4660,
18,
21422,
133... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
11668,
67,
17476,
12,
2890,
4672,
3536,
3288,
777,
6928,
434,
326,
2667,
1492,
854,
4551,
3832,
5105,
596,
16,
471,
327,
358,
326,
640,
12071,
919,
8395,
365,
16186,
4660,
18,
21422,
133... |
pass | pass | def handle_aggregate_stats_in(self, event): """Handler responds to receiving aggregate switch stats. @param event - aggregate stats in event to handle """ #lg.debug( event.__dict__ ) # Get the snapshot list dpid = event.datapath_id # Use the xid as the current collection epoch current_collection_epoch = event.xid #self.collection_epoch | 7ac8a1fbddf31c441a2860afea03f1182e25f717 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11602/7ac8a1fbddf31c441a2860afea03f1182e25f717/monitoring.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
18573,
67,
5296,
67,
267,
12,
2890,
16,
871,
4672,
3536,
1503,
26617,
358,
15847,
7047,
1620,
3177,
18,
632,
891,
871,
300,
7047,
3177,
316,
871,
358,
1640,
3536,
225,
468,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
18573,
67,
5296,
67,
267,
12,
2890,
16,
871,
4672,
3536,
1503,
26617,
358,
15847,
7047,
1620,
3177,
18,
632,
891,
871,
300,
7047,
3177,
316,
871,
358,
1640,
3536,
225,
468,
2... |
if text: if len(text)==1: speakSpelling(text) else: speakText(text,index=index) | if len(text)==1: speakSpelling(text) else: speakText(text,index=index) | def speakTextInfo(info,useCache=True,extraDetail=False,handleSymbols=False,reason=REASON_QUERY,index=None): textList=[] #Fetch the last controlFieldStack, or make a blank one controlFieldStackCache=getattr(info.obj,'_speakTextInfo_controlFieldStackCache',[]) if useCache else {} formatFieldAttributesCache=getattr(info.obj,'_speakTextInfo_formatFieldAttributesCache',{}) if useCache else {} #Make a new controlFieldStack from the textInfo's initialControlFieldAncestry newControlFieldStack=info.initialControlFieldAncestry #Calculate how many fields in the old and new controlFieldStacks are the same commonFieldCount=0 for count in range(min(len(newControlFieldStack),len(controlFieldStackCache))): if newControlFieldStack[count]==controlFieldStackCache[count]: commonFieldCount+=1 else: break #Get speech text for any fields in the old controlFieldStack that are not in the new controlFieldStack for count in reversed(range(commonFieldCount,len(controlFieldStackCache))): text=getControlFieldSpeech(controlFieldStackCache[count],"end_removedFromControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) # The TextInfo should be considered blank if we are only exiting fields (i.e. we aren't entering any new fields and there is no text). textListBlankLen=len(textList) #Get speech text for any fields that are in both controlFieldStacks, if extra detail is not requested if not extraDetail: for count in range(commonFieldCount): text=getControlFieldSpeech(newControlFieldStack[count],"start_inControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) #Get speech text for any fields in the new controlFieldStack that are not in the old controlFieldStack for count in range(commonFieldCount,len(newControlFieldStack)): text=getControlFieldSpeech(newControlFieldStack[count],"start_addedToControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) commonFieldCount+=1 #Fetch the text for format field attributes that have changed between what was previously cached, and this textInfo's initialFormatField. text=getFormatFieldSpeech(info.initialFormatField,formatFieldAttributesCache) if text: if textListBlankLen==len(textList): # If the TextInfo is considered blank so far, it should still be considered blank if there is only formatting thereafter. textListBlankLen+=1 textList.append(text) if handleSymbols: text=" ".join(textList) if text: speakText(text,index=index) text=info.text if text: if len(text)==1: speakSpelling(text) else: speakText(text,index=index) info.obj._speakTextInfo_controlFieldStackCache=list(newControlFieldStack) info.obj._speakTextInfo_formatFieldAttributesCache=formatFieldAttributesCache return #Fetch a command list for the text and fields for this textInfo commandList=info.textWithFields #Move through the command list, getting speech text for all controlStarts, controlEnds and formatChange commands #But also keep newControlFieldStack up to date as we will need it for the ends # Add any text to a separate list, as it must be handled differently. relativeTextList=[] for count in range(len(commandList)): if isinstance(commandList[count],basestring): text=commandList[count] if text: relativeTextList.append(text) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="controlStart": text=getControlFieldSpeech(commandList[count].field,"start_relative",extraDetail,reason=reason) if text: relativeTextList.append(text) newControlFieldStack.append(commandList[count].field) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="controlEnd": text=getControlFieldSpeech(newControlFieldStack[-1],"end_relative",extraDetail,reason=reason) if text: relativeTextList.append(text) del newControlFieldStack[-1] if commonFieldCount>len(newControlFieldStack): commonFieldCount=len(newControlFieldStack) elif isinstance(commandList[count],textHandler.FieldCommand) and commandList[count].command=="formatChange": text=getFormatFieldSpeech(commandList[count].field,formatFieldAttributesCache) if text: relativeTextList.append(text) text=" ".join(relativeTextList) if text and not text.isspace(): textList.append(text) #Finally get speech text for any fields left in new controlFieldStack that are common with the old controlFieldStack (for closing), if extra detail is not requested if not extraDetail: for count in reversed(range(min(len(newControlFieldStack),commonFieldCount))): text=getControlFieldSpeech(newControlFieldStack[count],"end_inControlFieldStack",extraDetail,reason=reason) if text: textList.append(text) # If there is nothing that should cause the TextInfo to be considered non-blank, blank should be reported, unless we are doing a say all. if reason != REASON_SAYALL and len(textList)==textListBlankLen: textList.append(_("blank")) #Cache a copy of the new controlFieldStack for future use if useCache: info.obj._speakTextInfo_controlFieldStackCache=list(newControlFieldStack) info.obj._speakTextInfo_formatFieldAttributesCache=formatFieldAttributesCache text=" ".join(textList) # Only speak if there is speakable text. Reporting of blank text is handled above. if text and not text.isspace(): speakText(text,index=index) | 14578a79b0c0430ea2133aac5282910a25160add /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9340/14578a79b0c0430ea2133aac5282910a25160add/speech.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
1528,
966,
12,
1376,
16,
1202,
1649,
33,
5510,
16,
7763,
6109,
33,
8381,
16,
4110,
14821,
33,
8381,
16,
10579,
33,
29416,
1413,
67,
10753,
16,
1615,
33,
7036,
4672,
977,
68... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
272,
10244,
1528,
966,
12,
1376,
16,
1202,
1649,
33,
5510,
16,
7763,
6109,
33,
8381,
16,
4110,
14821,
33,
8381,
16,
10579,
33,
29416,
1413,
67,
10753,
16,
1615,
33,
7036,
4672,
977,
68... |
expectedText = ( " This line is " | expectedText = ( "This line is " | def testUnwrapUsenetSignature(self): flow = flowtext.FormatText() testText = ( " This line is \n" " quoted and has a couple of soft \n" " breaks in it.\n\n" ">This line is also \n" ">quoted and has an \n" ">example of embaressing wrap\n" "-- \n" "And this is a usenet signature") expectedText = ( " This line is " "quoted and has a couple of soft " "breaks in it.\n\n" ">This line is also " "quoted and has an " "example of embaressing wrap\n" "-- \n" "And this is a usenet signature") debug = False if(debug): print "\n---------------------------\ninput text\n" print testText outputText = flow.unwrap( testText, debug ) if(debug): print "\n---------------------------\nExpected text\n" print expectedText print "\n---------------------------\noutput text\n" print outputText self.assertEqual( expectedText, outputText ) | cc51013487f745756918fc318b0766d15880fb14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2512/cc51013487f745756918fc318b0766d15880fb14/flowtexttests.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
984,
4113,
3477,
31034,
5374,
12,
2890,
4672,
4693,
273,
4693,
955,
18,
1630,
1528,
1435,
1842,
1528,
273,
261,
315,
1220,
980,
353,
521,
82,
6,
315,
9298,
471,
711,
279,
1825,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
984,
4113,
3477,
31034,
5374,
12,
2890,
4672,
4693,
273,
4693,
955,
18,
1630,
1528,
1435,
1842,
1528,
273,
261,
315,
1220,
980,
353,
521,
82,
6,
315,
9298,
471,
711,
279,
1825,
2... |
('/admin/send_message', SiteWideMessage) | ('/admin/send_message', SiteWideMessage), | def main(): session = Session() application = webapp.WSGIApplication([ ('/admin/migrate', MigrateDatastore), ('/admin/message_dispatch', MessageDispatcher), ('/admin/event_message_factory', EventMessageFactory), ('/admin/recommended_events_message_factory', RecommendedEventMessageFactory), ('/admin/send_message', SiteWideMessage) ], debug=True) wsgiref.handlers.CGIHandler().run(application) | 8aa7962138c7e53a9c7eb4b0bf7660080a8368fd /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5139/8aa7962138c7e53a9c7eb4b0bf7660080a8368fd/route.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
1339,
273,
3877,
1435,
2521,
273,
28945,
18,
2651,
13797,
3208,
3816,
7707,
19,
3666,
19,
22083,
2187,
26507,
21191,
3631,
7707,
19,
3666,
19,
2150,
67,
10739,
2187,
2350,
668... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1339,
273,
3877,
1435,
2521,
273,
28945,
18,
2651,
13797,
3208,
3816,
7707,
19,
3666,
19,
22083,
2187,
26507,
21191,
3631,
7707,
19,
3666,
19,
2150,
67,
10739,
2187,
2350,
668... |
return unicodeName(s, language = incode) | return s | def interwikiFormat(links, incode): """Create a suitable string encoding all interwiki links for a wikipedia page. 'links' should be a dictionary with the language names as keys, and either PageLink objects or the link-names of the pages as values. 'incode' should be the name of the wikipedia language that is the target of the string. """ if not links: return '' s = [] ar = links.keys() ar.sort() if mylang in interwiki_putfirst: #In this case I might have to change the order ar2 = [] for code in interwiki_putfirst[mylang]: if code in ar: del ar[ar.index(code)] ar2 = ar2 + [code] ar = ar2 + ar for code in ar: try: s.append(links[code].aslink()) except AttributeError: s.append('[[%s:%s]]' % (code, links[code])) s=config.interwiki_langs_separator.join(s) + '\r\n' return unicodeName(s, language = incode) | 563c8911333c6ae247074fa0f4245297aafa3f5b /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/4404/563c8911333c6ae247074fa0f4245297aafa3f5b/wikipedia.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1554,
13044,
1630,
12,
7135,
16,
316,
710,
4672,
3536,
1684,
279,
10631,
533,
2688,
777,
1554,
13044,
4716,
364,
279,
21137,
1363,
18,
225,
296,
7135,
11,
1410,
506,
279,
3880,
598,
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,
1554,
13044,
1630,
12,
7135,
16,
316,
710,
4672,
3536,
1684,
279,
10631,
533,
2688,
777,
1554,
13044,
4716,
364,
279,
21137,
1363,
18,
225,
296,
7135,
11,
1410,
506,
279,
3880,
598,
326,... |
'name': (procurement.origin or procurement.product_id.name) +': '+(procurement.name or ''), | 'name': '%s:%s' %(procurement.product_id.name or procurement.origin, procurement.name or ''), | def action_produce_assign_service(self, cr, uid, ids, context={}): for procurement in self.browse(cr, uid, ids): sline = self.pool.get('sale.order.line') sale_ids = sline.search(cr, uid, [('procurement_id','=',procurement.id)], context) content = '' l = None project_id = None for line in sline.browse(cr, uid, sale_ids, context=context): content += (line.notes or '') l = line if line.order_id.project_id: content+="\n\n"+line.order_id.project_id.complete_name | 4fbdd7b65e82c2cd9177189b2fe794933365e12a /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7397/4fbdd7b65e82c2cd9177189b2fe794933365e12a/mrp.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1301,
67,
11776,
311,
67,
6145,
67,
3278,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
364,
5418,
594,
475,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
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,
1301,
67,
11776,
311,
67,
6145,
67,
3278,
12,
2890,
16,
4422,
16,
4555,
16,
3258,
16,
819,
12938,
4672,
364,
5418,
594,
475,
316,
365,
18,
25731,
12,
3353,
16,
4555,
16,
3258,
4672,
... |
end_date = dates_lim[-1] | end_date = dates_lims[-1] | def mask_period(data, period=None, start_date=None, end_date=None, inside=True, include_edges=True, inplace=False): """Returns x as an array masked where dates fall outside the selection period, | 79a636b650d9ff431e0d5e5d02f0e3ad98ef1639 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/12971/79a636b650d9ff431e0d5e5d02f0e3ad98ef1639/tseries.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3066,
67,
6908,
12,
892,
16,
3879,
33,
7036,
16,
787,
67,
712,
33,
7036,
16,
679,
67,
712,
33,
7036,
16,
4832,
33,
5510,
16,
2341,
67,
8746,
33,
5510,
16,
11783,
33,
8381,
4672,
35... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3066,
67,
6908,
12,
892,
16,
3879,
33,
7036,
16,
787,
67,
712,
33,
7036,
16,
679,
67,
712,
33,
7036,
16,
4832,
33,
5510,
16,
2341,
67,
8746,
33,
5510,
16,
11783,
33,
8381,
4672,
35... |
def check_status(self, path, | def check_status(self, path, | def __init__(self): """ Creates a new status cache. This will start the necessary worker thread and subprocess for checking. """ self.worker = threading.Thread(target = self._status_update_loop, name = "Status cache thread") | f329d037fe821c4b6490302594758945eefd8ba9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5119/f329d037fe821c4b6490302594758945eefd8ba9/statuscheckerplus.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
4672,
3536,
10210,
279,
394,
1267,
1247,
18,
225,
1220,
903,
787,
326,
4573,
4322,
2650,
471,
6652,
364,
6728,
18,
3536,
365,
18,
10124,
273,
17254,
18,
3830,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1001,
2738,
972,
12,
2890,
4672,
3536,
10210,
279,
394,
1267,
1247,
18,
225,
1220,
903,
787,
326,
4573,
4322,
2650,
471,
6652,
364,
6728,
18,
3536,
365,
18,
10124,
273,
17254,
18,
3830,
... |
if object.im_self: | if object.im_self is not None: | def docroutine(self, object, name=None, mod=None, funcs={}, classes={}, methods={}, cl=None): """Produce HTML documentation for a function or method object.""" realname = object.__name__ name = name or realname anchor = (cl and cl.__name__ or '') + '-' + name note = '' skipdocs = 0 if inspect.ismethod(object): imclass = object.im_class if cl: if imclass is not cl: note = ' from ' + self.classlink(imclass, mod) else: if object.im_self: note = ' method of %s instance' % self.classlink( object.im_self.__class__, mod) else: note = ' unbound %s method' % self.classlink(imclass,mod) object = object.im_func | afa4f485dd43b1c6555abc34505d20deb6aed141 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8546/afa4f485dd43b1c6555abc34505d20deb6aed141/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
15630,
28793,
3318,
28793,
2590,
28793,
927,
33,
7036,
4672,
3536,
25884,
3982,
7323,
364,
279,
445,
578,
707,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
997,
22640,
12,
2890,
16,
733,
16,
508,
33,
7036,
16,
681,
33,
7036,
16,
15630,
28793,
3318,
28793,
2590,
28793,
927,
33,
7036,
4672,
3536,
25884,
3982,
7323,
364,
279,
445,
578,
707,
... |
self.select_callbacks[0]() self.select_callbacks = None | self.invoke_select_callback(success=True) | def on_bus_message(self, bus, message): """receives message posted on the GstBus""" if message.src is not self.playbin: return | 38798d5147968ee4235521865814211dda86b651 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12354/38798d5147968ee4235521865814211dda86b651/gstreamerrenderer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
9274,
67,
2150,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
8606,
3606,
883,
23082,
603,
326,
611,
334,
7086,
8395,
309,
883,
18,
4816,
353,
486,
365,
18,
1601,
4757,
30,
327,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
9274,
67,
2150,
12,
2890,
16,
5766,
16,
883,
4672,
3536,
8606,
3606,
883,
23082,
603,
326,
611,
334,
7086,
8395,
309,
883,
18,
4816,
353,
486,
365,
18,
1601,
4757,
30,
327,
... |
dbg ("Config: no value found in %s."%source.type) | dbg (" TConfig: no value found in '%s'."%source.type) | def __getattr__ (self, keyname): dbg ("Config: Looking for: %s"%keyname) for source in self.sources: try: val = getattr (source, keyname) dbg ("Config: got: %s from a %s"%(val, source.type)) return (val) except: dbg ("Config: no value found in %s."%source.type) pass dbg ("Config: Out of sources") raise (AttributeError) | 97fddf31bc2ef801dda7a7eeec7896241ab0c044 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/6502/97fddf31bc2ef801dda7a7eeec7896241ab0c044/terminatorconfig.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
261,
2890,
16,
27567,
4672,
28966,
7566,
809,
30,
10176,
310,
364,
30,
738,
87,
28385,
856,
529,
13,
364,
1084,
316,
365,
18,
10141,
30,
775,
30,
1244,
273,
3869,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
588,
1747,
972,
261,
2890,
16,
27567,
4672,
28966,
7566,
809,
30,
10176,
310,
364,
30,
738,
87,
28385,
856,
529,
13,
364,
1084,
316,
365,
18,
10141,
30,
775,
30,
1244,
273,
3869,... |
@print_method | def on_iter_n_children(self, rowref): if rowref: if len(rowref) == 1: return 2 else: return None | e44fcb0ae4a01d4be12b33910504e5e994ed9b5b /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/5682/e44fcb0ae4a01d4be12b33910504e5e994ed9b5b/dbus_introspector.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
67,
2165,
67,
82,
67,
5906,
12,
2890,
16,
1027,
1734,
4672,
309,
1027,
1734,
30,
309,
562,
12,
492,
1734,
13,
422,
404,
30,
327,
576,
469,
30,
327,
599,
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,
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,
603,
67,
2165,
67,
82,
67,
5906,
12,
2890,
16,
1027,
1734,
4672,
309,
1027,
1734,
30,
309,
562,
12,
492,
1734,
13,
422,
404,
30,
327,
576,
469,
30,
327,
599,
2,
-100,
-100,
-100,
-... | |
onDeleteEventUpdateUI = onRemoveEventUpdateUI | def onDeleteEventUpdateUI(self, event): """Bug 5717, OnDelete shouldn't be active in a text ctrl on Mac.""" event.arguments['Enable'] = '__WXMAC__' not in wx.PlatformInfo | def onRemoveEventUpdateUI(self, event): (startSelect, endSelect) = self.GetSelection() event.arguments ['Enable'] = startSelect < self.GetLastPosition() | 3b80686b85d22a257e8b475d3ccad048e8d76762 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/3b80686b85d22a257e8b475d3ccad048e8d76762/AttributeEditors.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3288,
1133,
1891,
5370,
12,
2890,
16,
871,
4672,
261,
1937,
3391,
16,
679,
3391,
13,
273,
365,
18,
967,
6233,
1435,
871,
18,
7099,
10228,
8317,
3546,
273,
787,
3391,
411,
365,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
603,
3288,
1133,
1891,
5370,
12,
2890,
16,
871,
4672,
261,
1937,
3391,
16,
679,
3391,
13,
273,
365,
18,
967,
6233,
1435,
871,
18,
7099,
10228,
8317,
3546,
273,
787,
3391,
411,
365,
18,... |
s1 = etree.tostring(doc) | s1 = ToString(doc) | def create_meta(self): root = etree.Element('office:document-meta', attrib=META_NAMESPACE_DICT) doc = etree.ElementTree(root) root = etree.SubElement(root, 'office:meta') el1 = etree.SubElement(root, 'meta:generator') el1.text = 'Docutils/rst2odf.py/%s' % (VERSION, ) s1 = os.environ.get('USER', '') el1 = etree.SubElement(root, 'meta:initial-creator') el1.text = s1 s2 = time.strftime('%Y-%m-%dT%H:%M:%S', time.localtime()) el1 = etree.SubElement(root, 'meta:creation-date') el1.text = s2 el1 = etree.SubElement(root, 'dc:creator') el1.text = s1 el1 = etree.SubElement(root, 'dc:date') el1.text = s2 el1 = etree.SubElement(root, 'dc:language') el1.text = 'en-US' el1 = etree.SubElement(root, 'meta:editing-cycles') el1.text = '1' el1 = etree.SubElement(root, 'meta:editing-duration') el1.text = 'PT00M01S' title = self.visitor.get_title() el1 = etree.SubElement(root, 'dc:title') if title: el1.text = title else: el1.text = '[no title]' s1 = etree.tostring(doc) #doc = minidom.parseString(s1) #s1 = doc.toprettyxml(' ') return s1 | 57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/1278/57ceb741b8ea9b94d9b9e314a03912d12bd3c5c5/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3901,
12,
2890,
4672,
1365,
273,
12031,
18,
1046,
2668,
19789,
30,
5457,
17,
3901,
2187,
5885,
33,
19294,
67,
11368,
67,
31456,
13,
997,
273,
12031,
18,
1046,
2471,
12,
3085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
752,
67,
3901,
12,
2890,
4672,
1365,
273,
12031,
18,
1046,
2668,
19789,
30,
5457,
17,
3901,
2187,
5885,
33,
19294,
67,
11368,
67,
31456,
13,
997,
273,
12031,
18,
1046,
2471,
12,
3085,
... |
sage: db=digraphs.DeBruijn(2,2) | sage: db=digraphs.DeBruijn(2,2); db De Bruijn digraph (n=2, k=2): Looped digraph on 4 vertices | def DeBruijn(self,n,k): r""" Returns the De Bruijn diraph with parameters `n,k`. | 46f46e87efe554dcaf823267adba1246e8d7824d /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/46f46e87efe554dcaf823267adba1246e8d7824d/graph_generators.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1505,
19114,
4881,
78,
82,
12,
2890,
16,
82,
16,
79,
4672,
436,
8395,
2860,
326,
1505,
605,
86,
4881,
78,
82,
4314,
1483,
598,
1472,
1375,
82,
16,
79,
8338,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
1505,
19114,
4881,
78,
82,
12,
2890,
16,
82,
16,
79,
4672,
436,
8395,
2860,
326,
1505,
605,
86,
4881,
78,
82,
4314,
1483,
598,
1472,
1375,
82,
16,
79,
8338,
2,
-100,
-100,
-100,
-100... |
if pkg_name in self.sources['testing']: source = self.sources['testing'][pkg_name] | if pkg_name in sources['testing']: source = sources['testing'][pkg_name] | def doop_source(self, pkg): | 59b36ea1bf248c8b337353565b2ecc0547783fab /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2784/59b36ea1bf248c8b337353565b2ecc0547783fab/britney.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
556,
67,
3168,
12,
2890,
16,
3475,
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,
741,
556,
67,
3168,
12,
2890,
16,
3475,
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,
... |
Retrieves a date field from the named header, returning a tuple compatible with time.mktime(). | Retrieves a date field from the named header, returning a tuple compatible with time.mktime(). | def getdate(self, name): """Retrieve a date field from a header. | 9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/9ec58aaef2d0124bd42e30e6029fe8a7bdb906e7/rfc822.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
712,
12,
2890,
16,
508,
4672,
3536,
5767,
279,
1509,
652,
628,
279,
1446,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
712,
12,
2890,
16,
508,
4672,
3536,
5767,
279,
1509,
652,
628,
279,
1446,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
k = len(G.rows()) | def decode(self, right): r""" Wraps GUAVA's Decodeword. Hamming codes have a special decoding algorithm. Otherwise, syndrome decoding is used. | 90ff33abb51043d1baa7fdf15f610546756cd0b7 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9890/90ff33abb51043d1baa7fdf15f610546756cd0b7/linear_code.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2495,
12,
2890,
16,
2145,
4672,
436,
8395,
678,
7506,
611,
57,
15705,
1807,
6209,
1095,
18,
670,
301,
11987,
6198,
1240,
279,
4582,
13547,
4886,
18,
5272,
16,
6194,
72,
10896,
13547,
353... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2495,
12,
2890,
16,
2145,
4672,
436,
8395,
678,
7506,
611,
57,
15705,
1807,
6209,
1095,
18,
670,
301,
11987,
6198,
1240,
279,
4582,
13547,
4886,
18,
5272,
16,
6194,
72,
10896,
13547,
353... | |
ctrl = _resolve_control(waitnot_criteria) if 'exists' in args: | ctrl = _resolve_control(waitnot_criteria, 0, .01) matched = True if 'exists' in wait_for_not: | def WaitNot(self, *args, **kwargs): """Wait for the window to not be in any of the following states: | 3041c3cbb3a9cba089ef284c77ea17fa506bba68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6953/3041c3cbb3a9cba089ef284c77ea17fa506bba68/application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5838,
1248,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5480,
364,
326,
2742,
358,
486,
506,
316,
1281,
434,
326,
3751,
5493,
30,
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,
5838,
1248,
12,
2890,
16,
380,
1968,
16,
2826,
4333,
4672,
3536,
5480,
364,
326,
2742,
358,
486,
506,
316,
1281,
434,
326,
3751,
5493,
30,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
Digraph on 3 vertices | Subgraph of (Complete graph): Digraph on 3 vertices | def subgraph(self, vertices, inplace=False, create_using=None): """ Returns the subgraph induced by the given vertices. | c6ee9b8c95a50319119e91b8cfe37d340af4ae88 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/9890/c6ee9b8c95a50319119e91b8cfe37d340af4ae88/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21469,
12,
2890,
16,
6928,
16,
11783,
33,
8381,
16,
752,
67,
9940,
33,
7036,
4672,
3536,
2860,
326,
21469,
1547,
26372,
635,
326,
864,
6928,
18,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
21469,
12,
2890,
16,
6928,
16,
11783,
33,
8381,
16,
752,
67,
9940,
33,
7036,
4672,
3536,
2860,
326,
21469,
1547,
26372,
635,
326,
864,
6928,
18,
2,
-100,
-100,
-100,
-100,
-100,
-100,
... |
- ``u`` - vertex at which to start search - ``ignore_direction`` - (default False) only applies to directed graphs. If True, searches across edges in either direction. EXAMPLES:: sage: G = Graph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} } ) | - ``start`` - vertex or list of vertices from which to start the traversal - ``ignore_direction`` - (default False) only applies to directed graphs. If True, searches across edges in either direction. - ``distance`` - the maximum distance from the ``start`` nodes to traverse. The ``start`` nodes are distance zero from themselves. - ``neighbors`` - a function giving the neighbors of a vertex. The function should take a vertex and return a list of vertices. For a graph, ``neighbors`` is by default the :meth:`.neighbors` function of the graph. For a digraph, the ``neighbors`` function defaults to the :meth:`.successors` function of the graph. EXAMPLES:: sage: G = Graph( { 0: [1], 1: [2], 2: [3], 3: [4], 4: [0]} ) | def breadth_first_search(self, u, ignore_direction=False): """ Returns an iterator over vertices in a breadth-first ordering. INPUT: - ``u`` - vertex at which to start search - ``ignore_direction`` - (default False) only applies to directed graphs. If True, searches across edges in either direction. EXAMPLES:: sage: G = Graph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} } ) sage: list(G.breadth_first_search(0)) [0, 1, 4, 2, 3] sage: list(G.depth_first_search(0)) [0, 4, 3, 2, 1] :: sage: D = DiGraph( { 0: {1: 1}, 1: {2: 1}, 2: {3: 1}, 3: {4: 2}, 4: {0: 2} } ) sage: list(D.breadth_first_search(0)) [0, 1, 2, 3, 4] sage: list(D.depth_first_search(0)) [0, 1, 2, 3, 4] :: sage: D = DiGraph({1:[0], 2:[0]}) sage: list(D.breadth_first_search(0)) [0] sage: list(D.breadth_first_search(0, ignore_direction=True)) [0, 1, 2] """ # This function is straight from an old version of networkx if not self._directed or ignore_direction: neighbors=self.neighbor_iterator else: neighbors=self.successor_iterator # nlist=[u] # list of nodes in a BFS order yield u seen={} # nodes seen queue=[u] # FIFO queue seen[u]=True while queue: v=queue.pop(0) # this is expensive, should use a faster FIFO queue for w in neighbors(v): if w not in seen: seen[w]=True queue.append(w) # nlist.append(w) yield w # return nlist | 86c87838982df2cf8d1498df619239da8ff542e3 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/86c87838982df2cf8d1498df619239da8ff542e3/graph.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
25254,
67,
3645,
67,
3072,
12,
2890,
16,
582,
16,
2305,
67,
9855,
33,
8381,
4672,
3536,
2860,
392,
2775,
1879,
6928,
316,
279,
324,
25254,
17,
3645,
9543,
18,
225,
12943,
30,
282,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
324,
25254,
67,
3645,
67,
3072,
12,
2890,
16,
582,
16,
2305,
67,
9855,
33,
8381,
4672,
3536,
2860,
392,
2775,
1879,
6928,
316,
279,
324,
25254,
17,
3645,
9543,
18,
225,
12943,
30,
282,... |
file.Write(" command_buffer::CommandHeader header;\n") | file.Write(" gpu::CommandHeader header;\n") | file.Write(" typedef %s ValueType;\n" % func.name) | a7a27ace0760f1ed19016822a45c6ec5300e861c /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9392/a7a27ace0760f1ed19016822a45c6ec5300e861c/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
585,
18,
3067,
2932,
225,
618,
536,
738,
87,
31718,
9747,
82,
6,
738,
1326,
18,
529,
13,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
585,
18,
3067,
2932,
225,
618,
536,
738,
87,
31718,
9747,
82,
6,
738,
1326,
18,
529,
13,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
tpos=0 | def read_index(file, name, index, vindex, tindex, stop='\377'*8, ltid=z64, start=4, maxoid=z64, recover=0): read=file.read seek=file.seek seek(0,2) file_size=file.tell() if file_size: if file_size < start: raise FileStorageFormatError, file.name seek(0) if read(4) != packed_version: raise FileStorageFormatError, name else: file.write(packed_version) return 4, maxoid, ltid index_get=index.get vndexpos=vindex.get tappend=tindex.append pos=start seek(start) unpack=struct.unpack tpos=0 tid='\0'*7+'\1' while 1: # Read the transaction record h=read(23) if not h: break if len(h) != 23: warn('%s truncated at %s', name, pos) seek(pos) file.truncate() break tid, stl, status, ul, dl, el = unpack(">8s8scHHH",h) if el < 0: el=t32-el if tid <= ltid: warn("%s time-stamp reduction at %s", name, pos) ltid=tid tl=u64(stl) if tl+pos+8 > file_size or status=='c': # Hm, the data were truncated or the checkpoint flag wasn't # cleared. They may also be corrupted, # in which case, we don't want to totally lose the data. warn("%s truncated, possibly due to damaged records at %s", name, pos) _truncate(file, name, pos) break if status not in ' up': warn('%s has invalid status, %s, at %s', name, status, pos) if ul > tl or dl > tl or el > tl or tl < (23+ul+dl+el): # We're in trouble. Find out if this is bad data in the # middle of the file, or just a turd that Win 9x dropped # at the end when the system crashed. # Skip to the end and read what should be the transaction length # of the last transaction. seek(-8, 2) rtl=u64(read(8)) # Now check to see if the redundant transaction length is # reasonable: if file_size - rtl < pos or rtl < 23: nearPanic('%s has invalid transaction header at %s', name, pos) warn("It appears that there is invalid data at the end of the " "file, possibly due to a system crash. %s truncated " "to recover from bad data at end." % name) _truncate(file, name, pos) break else: if recover: return tpos, None, None panic('%s has invalid transaction header at %s', name, pos) if tid >= stop: break tpos=pos tend=tpos+tl if status=='u': # Undone transaction, skip it seek(tend) h=read(8) if h != stl: if recover: return tpos, None, None panic('%s has inconsistent transaction length at %s', name, pos) pos=tend+8 continue pos=tpos+23+ul+dl+el while pos < tend: # Read the data records for this transaction seek(pos) h=read(42) oid,serial,sprev,stloc,vlen,splen = unpack(">8s8s8s8sH8s", h) prev=u64(sprev) tloc=u64(stloc) plen=u64(splen) dlen=42+(plen or 8) tappend((oid,pos)) if vlen: dlen=dlen+16+vlen seek(8,1) pv=u64(read(8)) version=read(vlen) # Jim says: "It's just not worth the bother." #if vndexpos(version, 0) != pv: # panic("%s incorrect previous version pointer at %s", # name, pos) vindex[version]=pos if pos+dlen > tend or tloc != tpos: if recover: return tpos, None, None panic("%s data record exceeds transaction record at %s", name, pos) if index_get(oid,0) != prev: if prev: if recover: return tpos, None, None panic("%s incorrect previous pointer at %s", name, pos) else: warn("%s incorrect previous pointer at %s", name, pos) pos=pos+dlen if pos != tend: if recover: return tpos, None, None panic("%s data records don't add up at %s",name,tpos) # Read the (intentionally redundant) transaction length seek(pos) h=read(8) if h != stl: if recover: return tpos, None, None panic("%s redundant transaction length check failed at %s", name, pos) pos=pos+8 for oid, p in tindex: maxoid=max(maxoid,oid) index[oid]=p # Record the position del tindex[:] return pos, maxoid, ltid | e9aa3bd398cba329c8a421eb6d47f4dba6e400a9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/10048/e9aa3bd398cba329c8a421eb6d47f4dba6e400a9/FileStorage.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1615,
12,
768,
16,
508,
16,
770,
16,
331,
1615,
16,
268,
1615,
16,
2132,
2218,
64,
23,
4700,
11,
14,
28,
16,
13489,
350,
33,
94,
1105,
16,
787,
33,
24,
16,
943,
839,
33,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
1615,
12,
768,
16,
508,
16,
770,
16,
331,
1615,
16,
268,
1615,
16,
2132,
2218,
64,
23,
4700,
11,
14,
28,
16,
13489,
350,
33,
94,
1105,
16,
787,
33,
24,
16,
943,
839,
33,... | |
itself, as the following example shows. EXAMPLES:: | itself, as the following example shows. EXAMPLES:: | def normal_subgroups(self): """ Return the normal subgroups of this group as a (sorted in increasing order) list of permutation groups. The normal subgroups of `H = PSL(2,7)xPSL(2,7)` are `1`, two copies of `PSL(2,7)` and `H` itself, as the following example shows. EXAMPLES:: sage: G = PSL(2,7) sage: D = G.direct_product(G) sage: H = D[0] sage: NH = H.normal_subgroups() sage: len(NH) 4 sage: NH[1].is_isomorphic(G) True sage: NH[2].is_isomorphic(G) True """ ans = [] NS = self._gap_().NormalSubgroups() n = NS.Length() for i in range(1,n+1): ans.append(PermutationGroup(NS[i].GeneratorsOfGroup())) return ans | f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9890/f5f8be9435d58a2a709e6aa602d3c0e6ac097c6a/permgroup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
67,
1717,
4650,
12,
2890,
4672,
3536,
2000,
326,
2212,
720,
4650,
434,
333,
1041,
487,
279,
261,
10350,
316,
21006,
1353,
13,
666,
434,
17440,
3252,
18,
225,
1021,
2212,
720,
4650,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2212,
67,
1717,
4650,
12,
2890,
4672,
3536,
2000,
326,
2212,
720,
4650,
434,
333,
1041,
487,
279,
261,
10350,
316,
21006,
1353,
13,
666,
434,
17440,
3252,
18,
225,
1021,
2212,
720,
4650,... |
arch.set_promisc(self.ins, i) | set_promisc(self.ins, i) | def __init__(self, iface = None, type = ETH_P_ALL, promisc=None, filter=None, nofilter=0): self.type = type self.outs = None self.ins = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(type)) self.ins.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 0) _flush_fd(self.ins) if iface is not None: self.ins.bind((iface, type)) if not nofilter: if conf.except_filter: if filter: filter = "(%s) and not (%s)" % (filter, conf.except_filter) else: filter = "not (%s)" % conf.except_filter if filter is not None: arch.attach_filter(self.ins, filter) if promisc is None: promisc = conf.sniff_promisc self.promisc = promisc if iface is None: self.iff = arch.get_if_list() else: if iface.__class__ is list: self.iff = iface else: self.iff = [iface] if self.promisc: for i in self.iff: arch.set_promisc(self.ins, i) self.ins.setsockopt(socket.SOL_SOCKET, socket.SO_RCVBUF, 2**30) | 14c74c45cca1c3048391b67bd41fd3df4f699bde /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/7311/14c74c45cca1c3048391b67bd41fd3df4f699bde/linux.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9751,
273,
599,
16,
618,
273,
512,
2455,
67,
52,
67,
4685,
16,
3012,
291,
71,
33,
7036,
16,
1034,
33,
7036,
16,
290,
792,
1088,
33,
20,
4672,
365,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
9751,
273,
599,
16,
618,
273,
512,
2455,
67,
52,
67,
4685,
16,
3012,
291,
71,
33,
7036,
16,
1034,
33,
7036,
16,
290,
792,
1088,
33,
20,
4672,
365,
18... |
def test(): import os from reportlab.graphics.testshapes import getAllTestDrawings drawings = [] if not os.path.isdir('pmout'): os.mkdir('pmout') htmlTop = """<html><head><title>renderPM output results</title></head> <body> <h1>renderPM results of output</h1> """ htmlBottom = """</body> </html> """ html = [htmlTop] i = 0 for (drawing, docstring, name) in getAllTestDrawings(): if 1 or i==10: w = int(drawing.width) h = int(drawing.height) html.append('<hr><h2>Drawing %s %d</h2>\n<pre>%s</pre>' % (name, i, docstring)) for k in ['gif','tiff', 'png', 'jpg', 'pct']: | import os from reportlab.graphics.testshapes import getAllTestDrawings drawings = [] if not os.path.isdir('pmout'): os.mkdir('pmout') htmlTop = """<html><head><title>renderPM output results</title></head> <body> <h1>renderPM results of output</h1> """ htmlBottom = """</body> </html> """ html = [htmlTop] i = 0 for (drawing, docstring, name) in getAllTestDrawings(): if 1 or i==10: w = int(drawing.width) h = int(drawing.height) html.append('<hr><h2>Drawing %s %d</h2>\n<pre>%s</pre>' % (name, i, docstring)) for k in ['gif','tiff', 'png', 'jpg', 'pct']: if k in ['gif','png','jpg','pct']: html.append('<p>%s format</p>\n' % string.upper(k)) try: filename = 'renderPM%d.%s' % (i, ext(k)) fullpath = os.path.join('pmout', filename) if os.path.isfile(fullpath): os.remove(fullpath) drawToFile(drawing,fullpath,fmt=k) | def ext(x): if x=='tiff': x='tif' return x | 57278f9d510735cd95902dac2b3e0110df78e4bc /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/7053/57278f9d510735cd95902dac2b3e0110df78e4bc/renderPM.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1110,
12,
92,
4672,
309,
619,
18920,
88,
3048,
4278,
619,
2218,
26922,
11,
327,
619,
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,
1110,
12,
92,
4672,
309,
619,
18920,
88,
3048,
4278,
619,
2218,
26922,
11,
327,
619,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-1... |
long_opts += ['access-key=', 'secret-key=', 'url=', 'help', 'version', 'debug'] | long_opts += ['access-key=', 'secret-key=', 'url=', 'help', 'version', 'debug', 'config='] | def __init__(self, short_opts=None, long_opts=None, is_s3=False, compat=False): | 78e327a29f535e02bb5b03b8f7d4be168c0029d8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12707/78e327a29f535e02bb5b03b8f7d4be168c0029d8/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3025,
67,
4952,
33,
7036,
16,
1525,
67,
4952,
33,
7036,
16,
353,
67,
87,
23,
33,
8381,
16,
4796,
33,
8381,
4672,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3025,
67,
4952,
33,
7036,
16,
1525,
67,
4952,
33,
7036,
16,
353,
67,
87,
23,
33,
8381,
16,
4796,
33,
8381,
4672,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
self._values[author][fx] = fy | self._values[user][fx] = fy | def calculate(self, revision_data): """Calculate statistic.""" assert len(self._wanted_output_modes) > 0 | 91178ff7c7066f1677fe361dc6c11a50dd922186 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2516/91178ff7c7066f1677fe361dc6c11a50dd922186/msvnstats.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4604,
12,
2890,
16,
6350,
67,
892,
4672,
3536,
8695,
21605,
12123,
1815,
562,
12,
2890,
6315,
25861,
67,
2844,
67,
19282,
13,
405,
374,
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,
4604,
12,
2890,
16,
6350,
67,
892,
4672,
3536,
8695,
21605,
12123,
1815,
562,
12,
2890,
6315,
25861,
67,
2844,
67,
19282,
13,
405,
374,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
if isinstance(repository, str): | if isinstance(repository, basestring): | def __init__(self, engine, repository): if isinstance(repository, str): repository = Repository(repository) self.engine = engine self.repository = repository self.meta = MetaData(engine) self.load() | c135f48fbf6a7daf3a123eb00c25156f10ea183d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/149/c135f48fbf6a7daf3a123eb00c25156f10ea183d/schema.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4073,
16,
3352,
4672,
309,
1549,
12,
9071,
16,
10699,
4672,
3352,
273,
6281,
12,
9071,
13,
365,
18,
8944,
273,
4073,
365,
18,
9071,
273,
3352,
365,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
4073,
16,
3352,
4672,
309,
1549,
12,
9071,
16,
10699,
4672,
3352,
273,
6281,
12,
9071,
13,
365,
18,
8944,
273,
4073,
365,
18,
9071,
273,
3352,
365,
18,
... |
def closing(self, node): | def closing(s, node): | def closing(self, node): return u"" | 01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5718/01a99d0db0499777506f7fbf9ecf7a7e70c7a9e2/Packer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7647,
12,
87,
16,
756,
4672,
327,
582,
3660,
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,
7647,
12,
87,
16,
756,
4672,
327,
582,
3660,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
elif processType == 'list' | elif processType == 'list': | def featuredWithInterwiki(fromsite, tosite, template_on_top, pType, quiet): if not fromsite.lang in cache: cache[fromsite.lang]={} if not tosite.lang in cache[fromsite.lang]: cache[fromsite.lang][tosite.lang]={} cc=cache[fromsite.lang][tosite.lang] if nocache: cc={} if pType == 'good': try: templatelist = template_good[tosite.lang] templatelist+= template_good['_default'] except KeyError: templatelist = template_good['_default'] elif pType == 'list': try: templatelist = template_lists[tosite.lang] templatelist+= template_lists['_default'] except KeyError: templatelist = template_lists['_default'] else: try: templatelist = template[tosite.lang] templatelist+= template['_default'] except KeyError: templatelist = template['_default'] findtemplate = '(' + '|'.join(templatelist) + ')' re_Link_FA=re.compile(ur"\{\{%s\|%s\}\}" % (findtemplate.replace(u' ', u'[ _]'), fromsite.lang), re.IGNORECASE) re_this_iw=re.compile(ur"\[\[%s:[^]]+\]\]" % fromsite.lang) arts=featuredArticles(fromsite, pType) pairs=[] for a in arts: if a.title()<afterpage: continue if u"/" in a.title() and a.namespace() != 0: wikipedia.output(u"%s is a subpage" % a.title()) continue if a.title() in cc: wikipedia.output(u"(cached) %s -> %s"%(a.title(), cc[a.title()])) continue if a.isRedirectPage(): a=a.getRedirectTarget() try: if not a.exists(): wikipedia.output(u"source page doesn't exist: %s" % a.title()) continue atrans = findTranslated(a, tosite, quiet) if atrans: text=atrans.get() m=re_Link_FA.search(text) if m: wikipedia.output(u"(already done)") else: # insert just before interwiki if (not interactive or wikipedia.input(u'Connecting %s -> %s. Proceed? [Y/N]'%(a.title(), atrans.title())) in ['Y','y'] ): m=re_this_iw.search(text) if not m: wikipedia.output(u"no interwiki record, very strange") continue site = wikipedia.getSite() if pType == 'good': comment = wikipedia.setAction(wikipedia.translate(site, msg_good) % (fromsite.lang, a.title())) elif pType == 'list': comment = wikipedia.setAction(wikipedia.translate(site, msg_lists) % (fromsite.lang, a.title())) else: comment = wikipedia.setAction(wikipedia.translate(site, msg) % (fromsite.lang, a.title())) ### Moving {{Link FA|xx}} to top of interwikis ### if template_on_top == True: # Getting the interwiki iw = wikipedia.getLanguageLinks(text, site) # Removing the interwiki text = wikipedia.removeLanguageLinks(text, site) text += u"\r\n{{%s|%s}}\r\n"%(templatelist[0], fromsite.lang) # Adding the interwiki text = wikipedia.replaceLanguageLinks(text, iw, site) ### Placing {{Link FA|xx}} right next to corresponding interwiki ### else: text=(text[:m.end()] + (u" {{%s|%s}}" % (templatelist[0], fromsite.lang)) + text[m.end():]) try: atrans.put(text, comment) except wikipedia.LockedPage: wikipedia.output(u'Page %s is locked!' % atrans.title()) cc[a.title()]=atrans.title() except wikipedia.PageNotSaved, e: wikipedia.output(u"Page not saved") | 06d8bf20f1a0392c52b887f8ecd2cae81ee30a13 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/4404/06d8bf20f1a0392c52b887f8ecd2cae81ee30a13/featured.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2572,
72,
1190,
2465,
13044,
12,
2080,
4256,
16,
358,
4256,
16,
1542,
67,
265,
67,
3669,
16,
29171,
16,
10902,
4672,
309,
486,
628,
4256,
18,
4936,
316,
1247,
30,
1247,
63,
2080,
4256,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2572,
72,
1190,
2465,
13044,
12,
2080,
4256,
16,
358,
4256,
16,
1542,
67,
265,
67,
3669,
16,
29171,
16,
10902,
4672,
309,
486,
628,
4256,
18,
4936,
316,
1247,
30,
1247,
63,
2080,
4256,... |
txt = "MLB: Impact Weather Blog updated ("+title+") http://www.srh.noaa.gov/mlb/IMUblog/blog.html" html = "<a href=\"http://www.srh.noaa.gov/mlb/IMUblog/blog.html\">Impact Weather Blog</a> updated ("+title+")" | txt = "MLB: Impact Weather Blog updated ("+title+") http://www.srh.noaa.gov/mlb/IMUblog/blog.php" html = "<a href=\"http://www.srh.noaa.gov/mlb/IMUblog/blog.php\">Impact Weather Blog</a> updated ("+title+")" | def doit(): # Load old timestamp o = open('mlbts.txt').read() oldts = mx.DateTime.strptime(o[:14], "%Y%m%d%H%M%S") logts = oldts # Download RSS req = urllib2.Request("http://www.srh.noaa.gov/mlb/IMUblog/rss.xml") xml = urllib2.urlopen(req).read() # Check timestamps tree = ET.fromstring(xml) a = tree.findall('.//item') for elem in a: title = elem.findtext('title') ts = elem.findtext('pubDate') #Wed, 05 Sep 2007 23:27:20 -0400 if (ts[17:19] == "24"): ts = ts[:17] + "00" + ts[19:] post_ts = mx.DateTime.strptime( ts[5:25], "%d %b %Y %H:%M:%S") if (post_ts > oldts): # Fire alert! txt = "MLB: Impact Weather Blog updated ("+title+") http://www.srh.noaa.gov/mlb/IMUblog/blog.html" html = "<a href=\"http://www.srh.noaa.gov/mlb/IMUblog/blog.html\">Impact Weather Blog</a> updated ("+title+")" jabber.sendMessage(txt,html) if (post_ts > logts): writeTS(post_ts) logts = post_ts | ee19fd2dec96de876632a4f7a03f4af1d113786b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/11180/ee19fd2dec96de876632a4f7a03f4af1d113786b/mlb-blog-alert.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
305,
13332,
468,
4444,
1592,
2858,
320,
273,
1696,
2668,
781,
70,
3428,
18,
5830,
16063,
896,
1435,
1592,
3428,
273,
7938,
18,
5096,
18,
701,
10650,
12,
83,
10531,
3461,
6487,
2213,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
305,
13332,
468,
4444,
1592,
2858,
320,
273,
1696,
2668,
781,
70,
3428,
18,
5830,
16063,
896,
1435,
1592,
3428,
273,
7938,
18,
5096,
18,
701,
10650,
12,
83,
10531,
3461,
6487,
2213,... |
""" @@@MOR In progress | def syncShare(share): """ @@@MOR In progress try: share.sync() except WebDAV.ConnectionError, err: """ | 26224e27871a1ba9e3d0ee406204219f5e382105 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9228/26224e27871a1ba9e3d0ee406204219f5e382105/Sharing.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3792,
9535,
12,
14419,
4672,
225,
775,
30,
7433,
18,
8389,
1435,
1335,
2999,
17735,
18,
28371,
16,
393,
30,
3536,
282,
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,
3792,
9535,
12,
14419,
4672,
225,
775,
30,
7433,
18,
8389,
1435,
1335,
2999,
17735,
18,
28371,
16,
393,
30,
3536,
282,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... | |
help="Output directory for the application folder. (Defaults to the current directory)" ) parser.add_option( "--namespace", dest="namespace", metavar="NAMESPACE", default="custom", help="Applications's top-level namespace. (Defaults to 'custom')" | help="Output directory for the application folder. (Default: %default)" ) parser.add_option( "-s", "--namespace", dest="namespace", metavar="NAMESPACE", default=None, help="Applications's top-level namespace. (Default: APPLICATIONNAME)" | def main(): parser = optparse.OptionParser() parser.set_usage('''\ | 6d5b4b4bd68a6e9dd0865524a270e0c7238f3ff1 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5718/6d5b4b4bd68a6e9dd0865524a270e0c7238f3ff1/create-application.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
2153,
2670,
18,
1895,
2678,
1435,
225,
2082,
18,
542,
67,
9167,
2668,
6309,
64,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2774,
13332,
2082,
273,
2153,
2670,
18,
1895,
2678,
1435,
225,
2082,
18,
542,
67,
9167,
2668,
6309,
64,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
print npyc, ".pyc deleted,", npyo, ".pyo deleted" | print(npyc, ".pyc deleted,", npyo, ".pyo deleted") | def deltree(root): import os from os.path import join npyc = npyo = 0 for root, dirs, files in os.walk(root): for name in files: delete = False if name.endswith('.pyc'): delete = True npyc += 1 elif name.endswith('.pyo'): delete = True npyo += 1 if delete: os.remove(join(root, name)) return npyc, npyo | 907c074dda39c6e68d32578a1510c2be88dcb2de /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8125/907c074dda39c6e68d32578a1510c2be88dcb2de/rmpyc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
3413,
12,
3085,
4672,
1930,
1140,
628,
1140,
18,
803,
1930,
1233,
225,
1130,
93,
71,
273,
1130,
93,
83,
273,
374,
364,
1365,
16,
7717,
16,
1390,
316,
1140,
18,
11348,
12,
3085,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1464,
3413,
12,
3085,
4672,
1930,
1140,
628,
1140,
18,
803,
1930,
1233,
225,
1130,
93,
71,
273,
1130,
93,
83,
273,
374,
364,
1365,
16,
7717,
16,
1390,
316,
1140,
18,
11348,
12,
3085,
... |
[float(x)*HARTREE_TO_EV for x in energy_lines[0].split()[0:2]] | [float(x)*HARTREE for x in energy_lines[0].split()[0:2]] | def read_geom(): opened = False if type(geom) == type(''): geom = open(geom, 'r') opened = True lines = [] line = geom.readline().strip() # Skip header if present if line.startswith('BEGIN header'): while not line.startswith('END header'): line = geom.readline().strip() geom.readline() # skip blank line else: lines.append(line) # Read until next blank line while line != '': line = geom.readline().strip() if line != '': lines.append(line) if opened: geom.close() # Let go of the file if len(lines) <= 1: # Check for EOF raise IOError params = Dictionary() # First line is the time/step params['time'] = float(lines[0]) # Then the energy, in Hartree energy_lines = filter(lambda s: s.endswith('<-- E'), lines) if len(energy_lines) != 1: raise ValueError('Number of energy lines should be exactly one.') params['energy'], params['hamiltonian'] = \ [float(x)*HARTREE_TO_EV for x in energy_lines[0].split()[0:2]] # Lattice is next, in units of Bohr lattice_lines = filter(lambda s: s.endswith('<-- h'), lines) lattice = farray([ [float(x)* BOHR_TO_ANG for x in row[0:3]] for row in map(string.split, lattice_lines) ]) # Then optionally stress tensor (FIXME: units) stress_lines = filter(lambda s: s.endswith('<-- S'), lines) params['stress'] = farray([ [float(x) for x in row[0:3]] for row in map(string.split, stress_lines) ]) # Find positions and forces poslines = filter(lambda s: s.endswith('<-- R'), lines) forcelines = filter(lambda s: s.endswith('<-- F'), lines) if len(poslines) != len(forcelines): raise ValueError('Number of pos lines (%d) != force lines (%d)'\ % (len(poslines), len(forcelines))) result = Atoms(n=len(poslines),lattice=lattice,params=params) # Now parse the positions, converting from units of Bohr field_list = [line.split() for line in poslines] result.species[:] = farray(map(operator.itemgetter(0), field_list)) result.pos[:,:] = farray([ [float(x)* BOHR_TO_ANG for x in row] \ for row in [field[2:5] for field in field_list]]) # And finally the forces, which are in units of hartree/bohr field_list = [line.split() for line in forcelines] force = farray([ [float(x)*HARTREE_TO_EV/BOHR_TO_ANG for x in row] \ for row in [field[2:5] for field in field_list]]) result.add_property('force', force) result.force[:] = force result.add_property('norm_f',norm(force)) return result | 39dd3544f0f8fd6f2cc4ecc741e1de15fbb88db0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8914/39dd3544f0f8fd6f2cc4ecc741e1de15fbb88db0/castep.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
10049,
13332,
10191,
273,
1083,
309,
618,
12,
10049,
13,
422,
618,
2668,
11,
4672,
7364,
273,
1696,
12,
10049,
16,
296,
86,
6134,
10191,
273,
1053,
225,
2362,
273,
5378,
980,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
855,
67,
10049,
13332,
10191,
273,
1083,
309,
618,
12,
10049,
13,
422,
618,
2668,
11,
4672,
7364,
273,
1696,
12,
10049,
16,
296,
86,
6134,
10191,
273,
1053,
225,
2362,
273,
5378,
980,
... |
if os.path.exists(editor.uri): | if editor.uri and os.path.exists(editor.uri): | def editor_opened(editor): editor.connect('file-saved', on_file_saved) if os.path.exists(editor.uri): add_job(editor) | f3a5da1f31ec9aa4c826cf8d8c22bfa4cd1dc71b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14800/f3a5da1f31ec9aa4c826cf8d8c22bfa4cd1dc71b/__init__.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4858,
67,
25304,
12,
9177,
4672,
4858,
18,
3612,
2668,
768,
17,
14077,
2187,
603,
67,
768,
67,
14077,
13,
309,
4858,
18,
1650,
471,
1140,
18,
803,
18,
1808,
12,
9177,
18,
1650,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4858,
67,
25304,
12,
9177,
4672,
4858,
18,
3612,
2668,
768,
17,
14077,
2187,
603,
67,
768,
67,
14077,
13,
309,
4858,
18,
1650,
471,
1140,
18,
803,
18,
1808,
12,
9177,
18,
1650,
4672,
... |
def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15, ): | def download_setuptools(version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15): | def download_setuptools( version=DEFAULT_VERSION, download_base=DEFAULT_URL, to_dir=os.curdir, delay=15, | e7932397a19380975ae6401d2f13f2f5d6ddb716 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/495/e7932397a19380975ae6401d2f13f2f5d6ddb716/distribute_setup.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4224,
67,
542,
30693,
12,
1177,
33,
5280,
67,
5757,
16,
4224,
67,
1969,
33,
5280,
67,
1785,
16,
358,
67,
1214,
33,
538,
18,
1397,
1214,
16,
4624,
33,
3600,
16,
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,
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,
4224,
67,
542,
30693,
12,
1177,
33,
5280,
67,
5757,
16,
4224,
67,
1969,
33,
5280,
67,
1785,
16,
358,
67,
1214,
33,
538,
18,
1397,
1214,
16,
4624,
33,
3600,
16,
2,
-100,
-100,
-100,
... |
pass | if event.type == KEYDOWN and event.key == K_ESCAPE: self.end(0) | def event(self, event): pass | 52775a33db935d2225a5ee278cf4f542fcbf5d70 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/4653/52775a33db935d2225a5ee278cf4f542fcbf5d70/main.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
12,
2890,
16,
871,
4672,
1342,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
12,
2890,
16,
871,
4672,
1342,
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,... |
elif filename.endswith('.pdb'): | elif ext == '.pdb': | def _load(self, filename): try: if filename.endswith('.gz'): f = gzip.open(filename, 'rb') filename = filename[:-4] elif filename.endswith('.bz2'): f = bz2.BZ2File(filename, 'rb') filename = filename[:-4] elif filename.endswith('.zip'): zf = zipfile.ZipFile(filename, 'rb') names = zf.namelist() if len(names) != 1: raise IOError("Zip file does not contain a single file") f = zf.open(names[0], 'rb') filename = names[0] elif filename.endswith('.pdb'): f = plucker.PluckerFile(filename) # XXX: not implemented raise IOError("Plucker supprot not implemented yet.") elif filename.endswith('.txt'): f = open(filename, 'rb') else: raise IOError("Don't know how to open this type of files") | b14075b008cbe5a0fb096ca57a2440f9540a006b /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/14744/b14075b008cbe5a0fb096ca57a2440f9540a006b/model_text.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
945,
12,
2890,
16,
1544,
4672,
775,
30,
309,
1544,
18,
5839,
1918,
2668,
18,
9764,
11,
4672,
284,
273,
10331,
18,
3190,
12,
3459,
16,
296,
6731,
6134,
1544,
273,
1544,
10531,
17,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
945,
12,
2890,
16,
1544,
4672,
775,
30,
309,
1544,
18,
5839,
1918,
2668,
18,
9764,
11,
4672,
284,
273,
10331,
18,
3190,
12,
3459,
16,
296,
6731,
6134,
1544,
273,
1544,
10531,
17,
... |
self.redraw() | redraw = True | def handle_motion( self, x, y ): """do something when mouse pointer is moved | b3f0f284fe7cf2c39975fb13d481a86487f0f911 /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/5180/b3f0f284fe7cf2c39975fb13d481a86487f0f911/Gimpy_Graph_Window.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1640,
67,
81,
8240,
12,
365,
16,
619,
16,
677,
262,
30,
3536,
2896,
5943,
1347,
7644,
4407,
353,
10456,
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,
1640,
67,
81,
8240,
12,
365,
16,
619,
16,
677,
262,
30,
3536,
2896,
5943,
1347,
7644,
4407,
353,
10456,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
key_code = key.GetKeyCode() if key_code == wx.WXK_RETURN: | if key.GetKeyCode() == wx.WXK_RETURN: | def GetPos(self, key): """Update Line/Column information @param key: KeyEvent object | 73a08248e0ffccd1994c16509fff4d1db21b1a6c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3530/73a08248e0ffccd1994c16509fff4d1db21b1a6c/ed_stc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1616,
12,
2890,
16,
498,
4672,
3536,
1891,
5377,
19,
1494,
1779,
632,
891,
498,
30,
23737,
733,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
968,
1616,
12,
2890,
16,
498,
4672,
3536,
1891,
5377,
19,
1494,
1779,
632,
891,
498,
30,
23737,
733,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100... |
elif len(args) == 1: | elif len(self.args) == 1: | def setClient(self, clientListIn = None): """ Set `self.clients`. If not set, a standard client will be instantiated. Then, set the clients used by the commands. :params: :attr:`clientListIn`: a list of client object """ if not isinstance(clientListIn, list): clientListIn = [clientListIn] self.clients = clientListIn commArgs = [] if len(self.clients) == len(self.commands): commArgs = [(self.commands[x], self.clients[x]) for x in range(len(self.commands))] elif len(args) == 1: commArgs = [(self.commands[x], self.clients[0]) for x in range(len(self.commands))] else: raise RSSException, "`clients` provided are nor 1 nor the same number of the commands" for command, client in commArgs: command.setClient(client) | 1820e07a463668de759d1f2154911f00f33b4027 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12864/1820e07a463668de759d1f2154911f00f33b4027/MacroCommand.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26001,
12,
2890,
16,
1004,
682,
382,
273,
599,
4672,
3536,
1000,
1375,
2890,
18,
16931,
8338,
971,
486,
444,
16,
279,
4529,
1004,
903,
506,
17651,
18,
9697,
16,
444,
326,
7712,
1399,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
26001,
12,
2890,
16,
1004,
682,
382,
273,
599,
4672,
3536,
1000,
1375,
2890,
18,
16931,
8338,
971,
486,
444,
16,
279,
4529,
1004,
903,
506,
17651,
18,
9697,
16,
444,
326,
7712,
1399,
6... |
self.WriteGLES2ImplementationDeclaration(func, file) | file.Write("%s %s(%s);\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) file.Write("\n") | def WriteGLES2ImplementationHeader(self, func, file): """Writes the GLES2 Implemention.""" impl_func = func.GetInfo('impl_func') if func.can_auto_generate and (impl_func == None or impl_func == True): file.Write("%s %s(%s) {\n" % (func.return_type, func.original_name, func.MakeTypedOriginalArgString(""))) for arg in func.GetOriginalArgs(): arg.WriteClientSideValidationCode(file) file.Write(" helper_->%s(%s);\n" % (func.name, func.MakeOriginalArgString(""))) file.Write("}\n") file.Write("\n") else: self.WriteGLES2ImplementationDeclaration(func, file) | b8fb1c2876060305792c0b72943407a8dd011c60 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/5060/b8fb1c2876060305792c0b72943407a8dd011c60/build_gles2_cmd_buffer.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
43,
11386,
22,
13621,
1864,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
8368,
326,
611,
11386,
22,
10886,
285,
12123,
9380,
67,
644,
273,
1326,
18,
967,
966,
2668,
11299,
67,
644,
6... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2598,
43,
11386,
22,
13621,
1864,
12,
2890,
16,
1326,
16,
585,
4672,
3536,
8368,
326,
611,
11386,
22,
10886,
285,
12123,
9380,
67,
644,
273,
1326,
18,
967,
966,
2668,
11299,
67,
644,
6... |
"universe":"vanilla" | "universe":"vanilla", | def append_insp_node(self,inspNode,ifo): fileName = str(inspNode.output_file_name) self.add_var_arg("--"+ifo+"-framefile "+str(fileName.replace(".xml",".gwf").strip(".gz"))) if inspNode.validNode: self.add_parent(inspNode) | 9e152961c57c114ca32f6d71b76f936ddd7c7b79 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5758/9e152961c57c114ca32f6d71b76f936ddd7c7b79/fu_Condor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
267,
1752,
67,
2159,
12,
2890,
16,
267,
1752,
907,
16,
20299,
4672,
3968,
273,
609,
12,
267,
1752,
907,
18,
2844,
67,
768,
67,
529,
13,
365,
18,
1289,
67,
1401,
67,
3175,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
714,
67,
267,
1752,
67,
2159,
12,
2890,
16,
267,
1752,
907,
16,
20299,
4672,
3968,
273,
609,
12,
267,
1752,
907,
18,
2844,
67,
768,
67,
529,
13,
365,
18,
1289,
67,
1401,
67,
3175,
... |
if klass._p_changed==0: | if not getattr(klass, '_p_changed', 0): | def rclass(klass): if klass._p_changed==0: get_transaction().register(klass) klass._p_changed=1 | 80231bc0ef06bfb43e729d47cef138e34d229d14 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9658/80231bc0ef06bfb43e729d47cef138e34d229d14/Property.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
1106,
12,
22626,
4672,
309,
486,
3869,
12,
22626,
16,
2070,
84,
67,
6703,
2187,
374,
4672,
336,
67,
7958,
7675,
4861,
12,
22626,
13,
7352,
6315,
84,
67,
6703,
33,
21,
225,
2,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
436,
1106,
12,
22626,
4672,
309,
486,
3869,
12,
22626,
16,
2070,
84,
67,
6703,
2187,
374,
4672,
336,
67,
7958,
7675,
4861,
12,
22626,
13,
7352,
6315,
84,
67,
6703,
33,
21,
225,
2,
-1... |
timeouts = (win32con.MAXDWORD, 0, 0, 0, 1000) | timeouts = (0, 0, 0, 0, 0) | def __init__(self, port, #number of device, numbering starts at #zero. if everything fails, the user #can specify a device string, note #that this isn't portable anymore baudrate=9600, #baudrate bytesize=EIGHTBITS, #number of databits parity=PARITY_NONE, #enable parity checking stopbits=STOPBITS_ONE, #number of stopbits timeout=None, #set a timeout value, None for waiting forever xonxoff=0, #enable software flow control rtscts=0, #enable RTS/CTS flow control ): """initialize comm port""" | d0b8b2733d027e2a68a87df92697e2cb7aa3c79d /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2937/d0b8b2733d027e2a68a87df92697e2cb7aa3c79d/serialwin32.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1756,
16,
5375,
468,
2696,
434,
2346,
16,
1300,
310,
2542,
622,
468,
7124,
18,
309,
7756,
6684,
16,
326,
729,
468,
4169,
4800,
279,
2346,
533,
16,
4721,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
1756,
16,
5375,
468,
2696,
434,
2346,
16,
1300,
310,
2542,
622,
468,
7124,
18,
309,
7756,
6684,
16,
326,
729,
468,
4169,
4800,
279,
2346,
533,
16,
4721,
... |
lineSizer.Add(dirCtrl, 0, wx.LEFT, HALF_SPACE) | lineSizer.Add(dirCtrl, 1, wx.ALIGN_CENTER_VERTICAL|wx.EXPAND) | def OnAddDirToProject(self, event): frame = wx.Dialog(None, -1, _("Add All Files from Directory to Project"), size= (320,200)) borderSizer = wx.BoxSizer(wx.HORIZONTAL) | bbb2889740248dad3f6405367f6382e7cb6cb839 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12725/bbb2889740248dad3f6405367f6382e7cb6cb839/ProjectEditor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
986,
1621,
774,
4109,
12,
2890,
16,
871,
4672,
2623,
273,
7075,
18,
6353,
12,
7036,
16,
300,
21,
16,
389,
2932,
986,
4826,
6471,
628,
8930,
358,
5420,
6,
3631,
963,
33,
261,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2755,
986,
1621,
774,
4109,
12,
2890,
16,
871,
4672,
2623,
273,
7075,
18,
6353,
12,
7036,
16,
300,
21,
16,
389,
2932,
986,
4826,
6471,
628,
8930,
358,
5420,
6,
3631,
963,
33,
261,
31... |
The 'quotetabs' flag indicates whether tabs should be quoted.""" if c == '\t': return not quotetabs return c == ESCAPE or not(' ' <= c <= '~') | The 'quotetabs' flag indicates whether embedded tabs and spaces should be quoted. Note that line-ending tabs and spaces are always encoded, as per RFC 1521. """ if c in ' \t': return quotetabs return c == ESCAPE or not (' ' <= c <= '~') | def needsquoting(c, quotetabs): """Decide whether a particular character needs to be quoted. The 'quotetabs' flag indicates whether tabs should be quoted.""" if c == '\t': return not quotetabs return c == ESCAPE or not(' ' <= c <= '~') | 425bbbb21443c34ba719bc271466c6e3c7cd680c /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/425bbbb21443c34ba719bc271466c6e3c7cd680c/quopri.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4260,
9270,
310,
12,
71,
16,
4914,
278,
5113,
4672,
3536,
1799,
831,
2856,
279,
6826,
3351,
4260,
358,
506,
9298,
18,
225,
1021,
296,
9270,
278,
5113,
11,
2982,
8527,
2856,
7488,
10920,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4260,
9270,
310,
12,
71,
16,
4914,
278,
5113,
4672,
3536,
1799,
831,
2856,
279,
6826,
3351,
4260,
358,
506,
9298,
18,
225,
1021,
296,
9270,
278,
5113,
11,
2982,
8527,
2856,
7488,
10920,
... |
if rm.analysis_method.smaller_score_more_significant==1: do_log10_transformation = True else: do_log10_transformation = False | if hasattr(rm, 'analysis_method'): if rm.analysis_method.smaller_score_more_significant==1: do_log10_transformation = True else: do_log10_transformation = False else: return None | def getResultMethodContent(cls, rm, results_directory=None, min_MAF=0.1, construct_chr_pos2index=False): """ 2008-09-24 add option construct_chr_pos2index 2008-09-16 if result_fname is not a file, return None 2008-09-15 use field smaller_score_more_significant from ResultsMethod to set do_log10_transformation 2008-08-13 split from getGeneID2MostSignificantHit() """ if results_directory: #given a directory where all results are. result_fname = os.path.join(results_directory, os.path.basename(rm.filename)) else: result_fname = rm.filename #based on the analysis method id, whether do -log() or not. it'll affect the later step of taking maximum pvalue out of SNPs associated with one gene if rm.analysis_method.smaller_score_more_significant==1: do_log10_transformation = True else: do_log10_transformation = False pdata = PassingData() pdata.min_MAF = min_MAF pdata.construct_chr_pos2index = construct_chr_pos2index if os.path.isfile(result_fname): genome_wide_result = getGenomeWideResultFromFile(result_fname, do_log10_transformation=do_log10_transformation, pdata=pdata) else: sys.stderr.write("Skip. %s doesn't exist.\n"%result_fname) genome_wide_result = None return genome_wide_result | d2a16d467a466b03daa63dd27037a863a5827a2a /local1/tlutelli/issta_data/temp/all_python//python/2008_temp/2008/9645/d2a16d467a466b03daa63dd27037a863a5827a2a/GeneListRankTest.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8601,
1305,
1350,
12,
6429,
16,
6692,
16,
1686,
67,
5149,
33,
7036,
16,
1131,
67,
5535,
42,
33,
20,
18,
21,
16,
4872,
67,
15182,
67,
917,
22,
1615,
33,
8381,
4672,
3536,
4044,
28,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
8601,
1305,
1350,
12,
6429,
16,
6692,
16,
1686,
67,
5149,
33,
7036,
16,
1131,
67,
5535,
42,
33,
20,
18,
21,
16,
4872,
67,
15182,
67,
917,
22,
1615,
33,
8381,
4672,
3536,
4044,
28,
... |
key_name = ''.join(('gd_auth_token'. unique_key)) | key_name = ''.join(('gd_auth_token', token_key)) | def ae_load(token_key): import gdata.alt.app_engine key_name = ''.join(('gd_auth_token'. unique_key)) token_string = gdata.alt.app_engine.get_token(key_name) if token_string is not None: return token_from_blob(token_string) else: return None | 43098493881a450854c722d6919aa601e3d03aee /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/10620/43098493881a450854c722d6919aa601e3d03aee/gauth.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14221,
67,
945,
12,
2316,
67,
856,
4672,
1930,
314,
892,
18,
2390,
18,
2910,
67,
8944,
498,
67,
529,
273,
875,
18,
5701,
12,
2668,
19016,
67,
1944,
67,
2316,
2187,
1147,
67,
856,
371... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
14221,
67,
945,
12,
2316,
67,
856,
4672,
1930,
314,
892,
18,
2390,
18,
2910,
67,
8944,
498,
67,
529,
273,
875,
18,
5701,
12,
2668,
19016,
67,
1944,
67,
2316,
2187,
1147,
67,
856,
371... |
self.run_cmd_output_gui(gui, " chmod -R -w '%s'" % new_backup) | self.run_cmd_output_gui(gui, "chmod -w '%s'" % new_backup) | def backup(self, gui=True): if gui: backup_button = self.xml.get_widget('backup_button') | c2a6c9ab1e23311dbdda0f5ed73a521e619bcf98 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3798/c2a6c9ab1e23311dbdda0f5ed73a521e619bcf98/flyback.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
16,
13238,
33,
5510,
4672,
309,
13238,
30,
5114,
67,
5391,
273,
365,
18,
2902,
18,
588,
67,
6587,
2668,
9572,
67,
5391,
6134,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5114,
12,
2890,
16,
13238,
33,
5510,
4672,
309,
13238,
30,
5114,
67,
5391,
273,
365,
18,
2902,
18,
588,
67,
6587,
2668,
9572,
67,
5391,
6134,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
""" 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) | e3f257e6819327e40544315cae2ad838de8ff2e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8546/e3f257e6819327e40544315cae2ad838de8ff2e1/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... | |
lines.append('<a href=" % (la, i, mw, i)) | lines.append('<a href=" | def _wrap_tablelinenos(self, inner): dummyoutfile = StringIO.StringIO() lncount = 0 for t, line in inner: if t: lncount += 1 dummyoutfile.write(line) | faf2c6235421a9c57b6fca71a6d815b2084b44e0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6148/faf2c6235421a9c57b6fca71a6d815b2084b44e0/html.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4113,
67,
7032,
80,
292,
267,
275,
538,
12,
2890,
16,
3443,
4672,
9609,
26050,
273,
15777,
18,
780,
4294,
1435,
7211,
1883,
273,
374,
364,
268,
16,
980,
316,
3443,
30,
309,
268,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4113,
67,
7032,
80,
292,
267,
275,
538,
12,
2890,
16,
3443,
4672,
9609,
26050,
273,
15777,
18,
780,
4294,
1435,
7211,
1883,
273,
374,
364,
268,
16,
980,
316,
3443,
30,
309,
268,
... |
if not res: | if res is None: | def parse_proc(self, i): rawdata = self.rawdata end = procclose.search(rawdata, i) if not end: return -1 j = end.start(0) if illegal.search(rawdata, i+2, j): self.syntax_error('illegal character in processing instruction') res = tagfind.match(rawdata, i+2) if not res: raise RuntimeError, 'unexpected call to parse_proc' k = res.end(0) name = res.group(0) if string.find(string.lower(name), 'xml') >= 0: self.syntax_error('illegal processing instruction target name') self.handle_proc(name, rawdata[k:j]) return end.end(0) | 66deea208f1331393577924315dda6e767e376e1 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12029/66deea208f1331393577924315dda6e767e376e1/xmllib.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
9381,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
450,
952,
2061,
18,
3072,
12,
1899,
892,
16,
277,
13,
309,
486,
679,
30,
327,
300,
21,
525,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1109,
67,
9381,
12,
2890,
16,
277,
4672,
1831,
892,
273,
365,
18,
1899,
892,
679,
273,
450,
952,
2061,
18,
3072,
12,
1899,
892,
16,
277,
13,
309,
486,
679,
30,
327,
300,
21,
525,
2... |
if self.cache == 0: if os.path.exists(dir) and os.path.isdir(dir): continue else: try: os.makedirs(dir, mode=0755) except OSError, e: raise Errors.RepoError, \ "Error making cache directory: %s error was: %s" % (dir, e) else: if not os.path.exists(dir): raise Errors.RepoError, \ "Cannot access repository dir %s" % dir | self._dirSetupMkdir_p(dir) | def dirSetup(self): """make the necessary dirs, if possible, raise on failure""" | acc85de7d75ed00616ac79909551b5a19d243d37 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/5445/acc85de7d75ed00616ac79909551b5a19d243d37/yumRepo.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1577,
7365,
12,
2890,
4672,
3536,
6540,
326,
4573,
7717,
16,
309,
3323,
16,
1002,
603,
5166,
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,... | [
1,
1,
1,
1,
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... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1577,
7365,
12,
2890,
4672,
3536,
6540,
326,
4573,
7717,
16,
309,
3323,
16,
1002,
603,
5166,
8395,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... |
msg=nativeOm.ActiveExplorer().selection[0] | msg=self.nativeOm.ActiveExplorer().selection[0] | def event_gainFocus(self): try: msg=nativeOm.ActiveExplorer().selection[0] except: msg=None pass if msg: self.curMessageItem=MessageItem(self,msg) super(MessageList_pre2003,self).event_gainFocus() if msg: eventHandler.executeEvent("gainFocus",self.curMessageItem) | df24f007f7cdc57ed053b5cae9c8a384708700a8 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/9340/df24f007f7cdc57ed053b5cae9c8a384708700a8/outlook.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
25540,
9233,
12,
2890,
4672,
775,
30,
1234,
33,
2890,
18,
13635,
51,
81,
18,
3896,
20938,
7675,
10705,
63,
20,
65,
1335,
30,
1234,
33,
7036,
1342,
309,
1234,
30,
365,
18,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
871,
67,
25540,
9233,
12,
2890,
4672,
775,
30,
1234,
33,
2890,
18,
13635,
51,
81,
18,
3896,
20938,
7675,
10705,
63,
20,
65,
1335,
30,
1234,
33,
7036,
1342,
309,
1234,
30,
365,
18,
13... |
def _handle_stdin_keypress(fd): | def _handle_stdin_keypress(): | def _handle_stdin_keypress(fd): ch = getch() kaa.signals["stdin_key_press_event"].emit(ch) return True | 936a170276321475df54fe6bd517c26684308bc7 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11722/936a170276321475df54fe6bd517c26684308bc7/stdin.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
4110,
67,
21772,
67,
856,
1028,
13332,
462,
273,
336,
343,
1435,
417,
7598,
18,
29659,
9614,
21772,
67,
856,
67,
1028,
67,
2575,
6,
8009,
18356,
12,
343,
13,
327,
1053,
282,
2,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
4110,
67,
21772,
67,
856,
1028,
13332,
462,
273,
336,
343,
1435,
417,
7598,
18,
29659,
9614,
21772,
67,
856,
67,
1028,
67,
2575,
6,
8009,
18356,
12,
343,
13,
327,
1053,
282,
2,
... |
cls = AppBase.find(module_name) | try: cls = AppBase.find(module_name) except: cls = None | def add_app(self, module_name): """ Find the app named *module_name*, instantiate it, and add it to the list of apps to be notified of incoming messages. Return the app instance. """ cls = AppBase.find(module_name) if cls is None: return None | d3222e34043b4b2583d5f5f5e7dbadceda114905 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/11809/d3222e34043b4b2583d5f5f5e7dbadceda114905/router.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
527,
67,
2910,
12,
2890,
16,
1605,
67,
529,
4672,
3536,
4163,
326,
595,
4141,
380,
2978,
67,
529,
14,
16,
10275,
518,
16,
471,
527,
518,
358,
326,
666,
434,
8279,
358,
506,
18791,
43... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
2910,
12,
2890,
16,
1605,
67,
529,
4672,
3536,
4163,
326,
595,
4141,
380,
2978,
67,
529,
14,
16,
10275,
518,
16,
471,
527,
518,
358,
326,
666,
434,
8279,
358,
506,
18791,
43... |
print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") | print_warning(req, "No exact match found, trying similar queries...", "", "<p>","<p>") | def perform_request_search(req=None, cc=cdsname, c=None, p="", f="", rg="10", sf="", so="d", sp="", of="hb", ot="", as="0", p1="", f1="", m1="", op1="", p2="", f2="", m2="", op2="", p3="", f3="", m3="", sc="0", jrec="0", id="-1", idb="-1", sysnb="", search="SEARCH", d1y="", d1m="", d1d="", d2y="", d2m="", d2d=""): """Perform search, without checking for authentication. Return list of recIDs found, if of=id. Otherwise create web page.""" # wash all passed arguments: cc = wash_url_argument(cc, 'str') p = wash_url_argument(p, 'str') f = wash_url_argument(f, 'str') rg = wash_url_argument(rg, 'int') sf = wash_url_argument(sf, 'str') so = wash_url_argument(so, 'str') sp = wash_url_argument(sp, 'string') of = wash_url_argument(of, 'str') if type(ot) is list: ot = string.join(ot,",") ot = wash_url_argument(ot, 'str') as = wash_url_argument(as, 'int') p1 = wash_url_argument(p1, 'str') f1 = wash_url_argument(f1, 'str') m1 = wash_url_argument(m1, 'str') op1 = wash_url_argument(op1, 'str') p2 = wash_url_argument(p2, 'str') f2 = wash_url_argument(f2, 'str') m2 = wash_url_argument(m2, 'str') op2 = wash_url_argument(op2, 'str') p3 = wash_url_argument(p3, 'str') f3 = wash_url_argument(f3, 'str') m3 = wash_url_argument(m3, 'str') sc = wash_url_argument(sc, 'int') jrec = wash_url_argument(jrec, 'int') id = wash_url_argument(id, 'int') idb = wash_url_argument(idb, 'int') sysnb = wash_url_argument(sysnb, 'int') search = wash_url_argument(search, 'str') d1y = wash_url_argument(d1y, 'str') d1m = wash_url_argument(d1m, 'str') d1d = wash_url_argument(d1d, 'str') d2y = wash_url_argument(d2y, 'str') d2m = wash_url_argument(d2m, 'str') d2d = wash_url_argument(d2d, 'str') day1, day2 = wash_dates(d1y, d1m, d1d, d2y, d2m, d2d) # deduce user id: uid = getUid(req) # start output if of.startswith('x'): # we are doing XML output: req.content_type = "text/xml" req.send_http_header() req.write("""<?xml version="1.0" encoding="UTF-8"?>\n""") if of.startswith("xm"): req.write("""<collection xmlns="http://www.loc.gov/MARC21/slim">\n""") else: req.write("""<collection>\n""") elif of.startswith('t') or str(of[0:3]).isdigit(): # we are doing plain text output: req.content_type = "text/plain" req.send_http_header() elif of == "id": # we are passing list of recIDs pass else: # we are doing HTML output: req.content_type = "text/html" req.send_http_header() # write header: req.write(create_header(cc, as, uid)) if sysnb or id>0: ## 1 - detailed record display if sysnb: # ALEPH sysnb is passed, so deduce MySQL id for the record: id = get_mysql_recid_from_aleph_sysno(sysnb) if of=="hb": of = "hd" if record_exists(id): if idb<=id: # sanity check idb=id+1 print_records(req, range(id,idb), -1, -9999, of, ot) else: # record does not exist if of.startswith("h"): (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) print_warning(req, "Requested record does not seem to exist.", None, "<p>") elif search == "Browse": ## 2 - browse needed (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) if as==1 or (p1 or p2 or p3): browse_pattern(req, colls_to_search, p1, f1, rg) browse_pattern(req, colls_to_search, p2, f2, rg) browse_pattern(req, colls_to_search, p3, f3, rg) else: browse_pattern(req, colls_to_search, p, f, rg) else: ## 3 - search needed # wash passed collection arguments: (cc, colls_to_display, colls_to_search) = wash_colls(cc, c, sc) p = wash_pattern(p) f = wash_field(f) # write search box: if of.startswith("h"): out = """<table width="100%%" cellspacing="0" cellpadding="0" border="0"> <tr valign="top"> <td> %s </td> <td class="pagestriperight"> %s </td> </tr> </table>""" % \ (create_search_box(cc, colls_to_display, p, f, rg, sf, so, sp, of, ot, as, p1, f1, m1, op1, p2, f2, m2, op2, p3, f3, m3, sc, d1y, d1m, d1d, d2y, d2m, d2d, search), create_google_box(p, f, p1, p2, p3)) req.write(out) # run search: t1 = os.times()[4] if as == 1 or (p1 or p2 or p3): # 3A - advanced search results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() else: # 3B - simple search search_cache_key = p+"@"+f+"@"+string.join(colls_to_search,",") if search_cache.has_key(search_cache_key): # is the result in search cache? results_final = search_cache[search_cache_key] else: results_final = search_pattern(req, p, f, colls_to_search) search_cache[search_cache_key] = results_final if len(search_cache) > cfg_search_cache_size: # is the cache full? (sanity cleaning) search_cache.clear() # search done; was there a time restriction? if yes, apply it now: if day1 != "": results_of_time_restriction = search_in_bibrec(day1, day2) for coll in colls_to_search: results_final[coll].intersect(results_of_time_restriction) results_final[coll].calculate_nbhits() t2 = os.times()[4] cpu_time = t2 - t1 # find total number of records found in each collection results_final_nb_total = 0 results_final_nb = {} for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # was there at least one hit? if results_final_nb_total == 0: # nope, so try silently dash-slash-etc-less matches first: if as==1 or (p1 or p2 or p3): if re.search(r'\w[^a-zA-Z0-9]\w',p1) or \ re.search(r'\w[^a-zA-Z0-9]\w',p2) or \ re.search(r'\w[^a-zA-Z0-9]\w',p3): if p1.startswith('"') and p1.endswith('"'): # is it ACC query? p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p1) else: # it is WRD query p1 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p1) if p1.startswith('"') and p1.endswith('"'): # is it ACC query? p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p2) else: # it is WRD query p2 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p2) if p3.startswith('"') and p3.endswith('"'): # is it ACC query? p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p3) else: # it is WRD query p3 = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p3) if of.startswith('h'): print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") results_final = search_pattern(req, "", "", colls_to_search) if p1: results_tmp = search_pattern(req, p1, f1, colls_to_search, m1) for coll in colls_to_search: # join results for first advanced search boxen results_final[coll].intersect(results_tmp[coll]) if p2: results_tmp = search_pattern(req, p2, f2, colls_to_search, m2) for coll in colls_to_search: # join results for first and second advanced search boxen if op1 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op1 == "o": # or results_final[coll].union(results_tmp[coll]) elif op1 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") if p3: results_tmp = search_pattern(req, p3, f3, colls_to_search, m3) for coll in colls_to_search: # join results for second and third advanced search boxen if op2 == "a": # add results_final[coll].intersect(results_tmp[coll]) elif op2 == "o": # or results_final[coll].union(results_tmp[coll]) elif op2 == "n": # not results_final[coll].difference(results_tmp[coll]) else: print_warning(req, "Invalid set operation %s." % op1, "Error") for coll in colls_to_search: results_final[coll].calculate_nbhits() results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] else: if re.search(r'\w[^a-zA-Z0-9]\w',p): if p.startswith('"') and p.endswith('"'): # is it ACC query? p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1_\\2", p) else: # it is WRD query p = re.sub(r'(\w)[^a-zA-Z0-9](\w)', "\\1 \\2", p) if of.startswith('h'): print_warning(req, "No match found, trying %s..." % p, "", "<p>","<p>") results_final = search_pattern(req, p, f, colls_to_search, None) for coll in colls_to_search: results_final_nb[coll] = results_final[coll]._nbhits results_final_nb_total += results_final_nb[coll] # once again, was there at least one hit? if results_final_nb_total == 0: # nope, so try similar queries: if of.startswith('h'): print_warning(req, "No match found, trying similar queries...", "", "<p>","<p>") req.write("<p>") if as==1 or (p1 or p2 or p3): if p1: search_pattern(req, p1, f1, colls_to_search, m1, 1) if p2: search_pattern(req, p2, f2, colls_to_search, m2, 1) if p3: search_pattern(req, p3, f3, colls_to_search, m3, 1) else: search_pattern(req, p, f, colls_to_search, None, 1) else: # yes, some hits found, so print results overview: if of == "id": # we have been asked to return list of recIDs results_final_for_all_colls = HitList() for coll in colls_to_search: results_final_for_all_colls.union(results_final[coll]) return results_final_for_all_colls.items() elif of.startswith("h"): req.write(print_results_overview(colls_to_search, results_final_nb_total, results_final_nb, cpu_time)) # print records: if len(colls_to_search)>1: cpu_time = -1 # we do not want to have search time printed on each collection for coll in colls_to_search: if results_final[coll]._nbhits: if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time)) results_final_sorted = results_final[coll].items() if sf: results_final_sorted = sort_records(req, results_final_sorted, sf, so, sp) print_records(req, results_final_sorted, jrec, rg, of, ot) if of.startswith("h"): req.write(print_search_info(p, f, sf, so, sp, of, ot, coll, results_final_nb[coll], jrec, rg, as, p1, p2, p3, f1, f2, f3, m1, m2, m3, op1, op2, d1y, d1m, d1d, d2y, d2m, d2d, cpu_time, 1)) # log query: try: log_query(req.get_remote_host(), req.args, uid) except: # do not log query if req is None (used by CLI interface) pass log_query_info("ss", p, f, colls_to_search, results_final_nb_total) # 4 -- write footer: if of.startswith('h'): req.write(create_footer()) elif of.startswith('x'): req.write("""</collection>\n""") # 5 - return value if of == "id": return [] else: return "\n" | 9abc6750025b014a8ac519a428db93e9918f7e41 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12027/9abc6750025b014a8ac519a428db93e9918f7e41/search_engine.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3073,
67,
2293,
67,
3072,
12,
3658,
33,
7036,
16,
4946,
33,
71,
2377,
529,
16,
276,
33,
7036,
16,
293,
1546,
3113,
284,
1546,
3113,
14524,
1546,
2163,
3113,
9033,
1546,
3113,
1427,
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,
3073,
67,
2293,
67,
3072,
12,
3658,
33,
7036,
16,
4946,
33,
71,
2377,
529,
16,
276,
33,
7036,
16,
293,
1546,
3113,
284,
1546,
3113,
14524,
1546,
2163,
3113,
9033,
1546,
3113,
1427,
154... |
kbMapper[0] = patch + (origMapperLen - len(patch)) * asm('nop') | kbMapper[0] = asmPadToLength(patch, origMapperLen) | def kbPatch(exe): """Patch the Robot Odyssey engine's keyboard decoder.""" # Robot Odyssey has a bug that makes it rather difficult to play # on an AT keyboard, particularly one without a numeric keypad: # While the AT-style ("gray") arrow keys do work for basic # movement, the game can't detect shift-arrow combinations. So, # you can't take single-pixel steps. This makes Robot Odyssey # totally unplayable on a laptop unless you have some kind of # keyboard remapper running externally. # # To understand the problem, we can take a closer look at the # game's keyboard handler. To poll the keyboard, the basic steps # are: # # 1. The game first uses BIOS interrupt 16h to first check # for a key in the keyboard buffer (AH=1), then to retrieve # a key if one exists (AH=0). It also pokes at the BIOS data # area (segment 40h) directly, in order to turn off numlock, # turn on caps lock, and drain the keyboard buffer. # # 2. This function returns with the value of AX from Int 16h # preserved. This means we have a scan code in AH, and a # character code in AL. Now we're in the game's keyboard # mapping function, which we'll be patching here. # # 3. This function stores a translated key in a global variable. # If there are no keys down, it stores zero. For most keys, # it stores an ASCII value. But there are several special # cases: Arrow keys, Shift-Arrow keys, and Insert/Delete. # # This arrow key remapping is of the form: # # if (input_scancode == LEFT) { # if (al == 0) { # output_scancode = TRANSLATED_SHIFT_LEFT; # } else { # output_scancode = TRANSLATED_LEFT; # } # } else { # ... # } # # So, they're relying on the fact that an un-shifted arrow has # no ASCII equivalent, while a shift-arrow on the numpad turns # into a number key when the BIOS translates it. # # This is a clever hack, but it won't do for gray arrow keys. # Instead, we'd rather look at the actual status of the shift # keys. We can get this from the BIOS data area, but that won't # work in a Windows DOS box. Instead, we call a BIOS interrupt. # # This will increase the code size a bit, but we can make room by # removing support for very old legacy scancodes. # XXX: This patcher works on Robot Odyssey, but it does not # work on Gertrude's Secrets, since that game uses different # internal keycode values. # This is the original keyboard handler snippet that we'll be # replacing, starting right after the BIOS polling function # returns, and ending at a point where the translated key is # expected to be in AL. This section has been carefully chosen # to avoid any non-relative addresses. origMapperLen = 137 origMapperPrefix = unhex(""" 75 03 E9 81 00 80 FC 88 74 34 80 FC 4D 74 2B 80 FC 86 74 3A 80 FC 50 74 31 80 FC 87 74 40 80 FC 4B 74 37 80 FC 85 74 46 80 FC 48 74 3D 80 FC 52 74 48 80 FC 53 74 49 EB 54 90 3C 00 74 06 """) kbMapper = exe.find(origMapperPrefix) if not kbMapper: raise CodeMismatchError() print "Found keyboard mapper. Patching..." patch = asm(""" ; On entry: ; ; AH = BIOS Scancode ; AL = ASCII Key ; Z=0 if a key is waiting, ; Z=1 if there is no key. jz no_key cmp ah, 0x48 jz key_up cmp ah, 0x50 jz key_down cmp ah, 0x4B jz key_left cmp ah, 0x4D jz key_right cmp ah, 0x52 ; NB: I don't think these are used by Robot Odyssey, jz key_insert ; but they're used by the shape editor in cmp ah, 0x53 ; Gertrude's Secrets. jz key_delete ; Other key: Leave it in ASCII. Normally we'd be done now... ; However, while we're here, we'll apply another bug fix. ; The game is expecting all keyboard input to be in uppercase. ; It does this by forcing Caps Lock to be on, using the BIOS ; data area. However, this isn't supported by the Windows XP ; DOS box. We can work around this by doing a toupper() on all ; characters here. cmp al, 'a' jb done cmp al, 'z' ja done xor al, 0x20 jmp done | 58adf88851dbac399b94e30cfd6b9f0c2a837016 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/6757/58adf88851dbac399b94e30cfd6b9f0c2a837016/robot_odyssey_patcher.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
9182,
7332,
12,
14880,
4672,
3536,
7332,
326,
19686,
352,
531,
72,
1900,
307,
93,
4073,
1807,
16263,
8320,
12123,
225,
468,
19686,
352,
531,
72,
1900,
307,
93,
711,
279,
7934,
716,
7297,... |
notification_data = TimestampedNotificationData(originator="local") | notification_data = TimestampedNotificationData(proposer="remote") | def _do_reject_proposal(self, reason=None): self._inv.respond_to_reinvite(488) self._change_state("ESTABLISHED") notification_data = TimestampedNotificationData(originator="local") if reason is not None: notification_data.reason = reason self.notification_center.post_notification("SCSessionRejectedStreamProposal", self, notification_data) | 162671821368ca8c42b0810b9b7993f119257f36 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3449/162671821368ca8c42b0810b9b7993f119257f36/session.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
24163,
67,
685,
8016,
12,
2890,
16,
3971,
33,
7036,
4672,
365,
6315,
5768,
18,
17863,
67,
869,
67,
266,
27154,
12,
24,
5482,
13,
365,
6315,
3427,
67,
2019,
2932,
11027,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
2896,
67,
24163,
67,
685,
8016,
12,
2890,
16,
3971,
33,
7036,
4672,
365,
6315,
5768,
18,
17863,
67,
869,
67,
266,
27154,
12,
24,
5482,
13,
365,
6315,
3427,
67,
2019,
2932,
11027,
... |
byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < table_length and byte_increments[table_index] == 0): lineno += line_increments[table_index] table_index += 1 addr = 0 line_incr = 0 | def disassemble(co, lasti=-1): """Disassemble a code object.""" code = co.co_code byte_increments = [ord(c) for c in co.co_lnotab[0::2]] line_increments = [ord(c) for c in co.co_lnotab[1::2]] table_length = len(byte_increments) # == len(line_increments) lineno = co.co_firstlineno table_index = 0 while (table_index < table_length and byte_increments[table_index] == 0): lineno += line_increments[table_index] table_index += 1 addr = 0 line_incr = 0 labels = findlabels(code) n = len(code) i = 0 extended_arg = 0 free = None while i < n: c = code[i] op = ord(c) if i >= addr: lineno += line_incr while table_index < table_length: addr += byte_increments[table_index] line_incr = line_increments[table_index] table_index += 1 if line_incr: break else: addr = sys.maxint if i > 0: print print "%3d"%lineno, else: print ' ', if i == lasti: print '-->', else: print ' ', if i in labels: print '>>', else: print ' ', print `i`.rjust(4), print opname[op].ljust(20), i = i+1 if op >= HAVE_ARGUMENT: oparg = ord(code[i]) + ord(code[i+1])*256 + extended_arg extended_arg = 0 i = i+2 if op == EXTENDED_ARG: extended_arg = oparg*65536L print `oparg`.rjust(5), if op in hasconst: print '(' + `co.co_consts[oparg]` + ')', elif op in hasname: print '(' + co.co_names[oparg] + ')', elif op in hasjrel: print '(to ' + `i + oparg` + ')', elif op in haslocal: print '(' + co.co_varnames[oparg] + ')', elif op in hascompare: print '(' + cmp_op[oparg] + ')', elif op in hasfree: if free is None: free = co.co_cellvars + co.co_freevars print '(' + free[oparg] + ')', print | 0926a285ea497a8bbd894cc9632d19daf14ae35a /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/0926a285ea497a8bbd894cc9632d19daf14ae35a/dis.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
29676,
12,
2894,
16,
1142,
77,
29711,
21,
4672,
3536,
1669,
29676,
279,
981,
733,
12123,
981,
273,
1825,
18,
2894,
67,
710,
225,
1160,
67,
267,
1793,
1346,
273,
306,
517,
12,
71,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1015,
29676,
12,
2894,
16,
1142,
77,
29711,
21,
4672,
3536,
1669,
29676,
279,
981,
733,
12123,
981,
273,
1825,
18,
2894,
67,
710,
225,
1160,
67,
267,
1793,
1346,
273,
306,
517,
12,
71,... | |
os.write(slave, 'Ping!') self.assertEqual(os.read(master, 1024), 'Ping!') | os.write(slave, b'Ping!') self.assertEqual(os.read(master, 1024), b'Ping!') | def test(self): master, slave = os.openpty() if not os.isatty(slave): self.fail("Slave-end of pty is not a terminal.") | aedffb1df3e365df7407ac3eeb8984e54e4aca4c /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/3187/aedffb1df3e365df7407ac3eeb8984e54e4aca4c/test_openpty.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
4171,
16,
11735,
273,
1140,
18,
3190,
825,
1435,
309,
486,
1140,
18,
291,
270,
4098,
12,
27352,
4672,
365,
18,
6870,
2932,
20302,
17,
409,
434,
293,
4098,
353,
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,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1842,
12,
2890,
4672,
4171,
16,
11735,
273,
1140,
18,
3190,
825,
1435,
309,
486,
1140,
18,
291,
270,
4098,
12,
27352,
4672,
365,
18,
6870,
2932,
20302,
17,
409,
434,
293,
4098,
353,
48... |
try: return DateTime.strptime(d, '%Y-%m-%d') except: pass try: return DateTime.strptime(d, '%H:%M:%S') except: pass dashind = string.rindex(d, '-') | for format in ('%Y-%m-%d', '%H:%M:%S', '%H:%M'): try: return DateTime.strptime(d, format) except: pass dashind = d.rfind('-') | def _dateConvertFromDB(d): if d==None: return None try: return DateTime.strptime(d, '%Y-%m-%d') #just Y/M/D except: pass try: return DateTime.strptime(d, '%H:%M:%S') #just hh:mm:ss except: pass dashind = string.rindex(d, '-') tz = d[dashind:] d = d[:dashind] try: return DateTime.strptime(d, '%H:%M:%S'), tz # timetz except: pass # NO -- it was already stripped off, above! -- js Thu Aug 9 11:51:23 2001 #strip off offset from gmt #d = d[:string.rindex(d, '-')] try: return DateTime.strptime(d, '%Y-%m-%d %H:%M:%S') # full date except: #print "date passed to convert function: |%s|" % d raise | 119236e30f6300c964069b6c46f74b6d8a592c68 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/2304/119236e30f6300c964069b6c46f74b6d8a592c68/postconn.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
712,
2723,
1265,
2290,
12,
72,
4672,
309,
302,
631,
7036,
30,
327,
599,
775,
30,
327,
3716,
18,
701,
10650,
12,
72,
16,
1995,
61,
6456,
81,
6456,
72,
6134,
468,
3732,
1624,
19,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
389,
712,
2723,
1265,
2290,
12,
72,
4672,
309,
302,
631,
7036,
30,
327,
599,
775,
30,
327,
3716,
18,
701,
10650,
12,
72,
16,
1995,
61,
6456,
81,
6456,
72,
6134,
468,
3732,
1624,
19,
... |
pth = py_executable + '%s.%s' % ( sys.version_info[0], sys.version_info[1]) if os.path.exists(pth): os.unlink(pth) os.symlink('python', pth) | py_executable_version = '%s.%s' % ( sys.version_info[0], sys.version_info[1]) if not py_executable.endswith(py_executable_version): pth = py_executable + '%s.%s' % ( sys.version_info[0], sys.version_info[1]) if os.path.exists(pth): os.unlink(pth) os.symlink('python', pth) else: pth = join(bin_dir, 'python') if os.path.exists(pth): os.unlink(pth) os.symlink(os.path.basename(py_executable), pth) | def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear): """Install just the base environment, no distutils patches etc""" if sys.executable.startswith(bin_dir): print 'Please use the *system* python to run this script' return if clear: rmtree(lib_dir) ## FIXME: why not delete it? ## Maybe it should delete everything with #!/path/to/venv/python in it logger.notify('Not deleting %s', bin_dir) if hasattr(sys, 'real_prefix'): logger.notify('Using real prefix %r' % sys.real_prefix) prefix = sys.real_prefix else: prefix = sys.prefix mkdir(lib_dir) fix_lib64(lib_dir) stdlib_dirs = [os.path.dirname(os.__file__)] if sys.platform == 'win32': stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), 'DLLs')) elif sys.platform == 'darwin': stdlib_dirs.append(join(stdlib_dirs[0], 'site-packages')) for stdlib_dir in stdlib_dirs: if not os.path.isdir(stdlib_dir): continue if hasattr(os, 'symlink'): logger.info('Symlinking Python bootstrap modules') else: logger.info('Copying Python bootstrap modules') logger.indent += 2 try: for fn in os.listdir(stdlib_dir): if fn != 'site-packages' and os.path.splitext(fn)[0] in REQUIRED_MODULES: copyfile(join(stdlib_dir, fn), join(lib_dir, fn)) finally: logger.indent -= 2 mkdir(join(lib_dir, 'site-packages')) writefile(join(lib_dir, 'site.py'), SITE_PY) writefile(join(lib_dir, 'orig-prefix.txt'), prefix) site_packages_filename = join(lib_dir, 'no-global-site-packages.txt') if not site_packages: writefile(site_packages_filename, '') else: if os.path.exists(site_packages_filename): logger.info('Deleting %s' % site_packages_filename) os.unlink(site_packages_filename) stdinc_dir = join(prefix, 'include', py_version) if os.path.exists(stdinc_dir): copyfile(stdinc_dir, inc_dir) else: logger.debug('No include dir %s' % stdinc_dir) if sys.exec_prefix != prefix: if sys.platform == 'win32': exec_dir = join(sys.exec_prefix, 'lib') elif is_jython: exec_dir = join(sys.exec_prefix, 'Lib') else: exec_dir = join(sys.exec_prefix, 'lib', py_version) for fn in os.listdir(exec_dir): copyfile(join(exec_dir, fn), join(lib_dir, fn)) if is_jython: # Jython has either jython-dev.jar and javalib/ dir, or just # jython.jar for name in 'jython-dev.jar', 'javalib', 'jython.jar': src = join(prefix, name) if os.path.exists(src): copyfile(src, join(home_dir, name)) # XXX: registry should always exist after Jython 2.5rc1 src = join(prefix, 'registry') if os.path.exists(src): copyfile(src, join(home_dir, 'registry'), symlink=False) copyfile(join(prefix, 'cachedir'), join(home_dir, 'cachedir'), symlink=False) mkdir(bin_dir) py_executable = join(bin_dir, os.path.basename(sys.executable)) if 'Python.framework' in prefix: if py_executable.endswith('/Python'): # The name of the python executable is not quite what # we want, rename it. py_executable = os.path.join( os.path.dirname(py_executable), 'python') logger.notify('New %s executable in %s', expected_exe, py_executable) if sys.executable != py_executable: ## FIXME: could I just hard link? executable = sys.executable if sys.platform == 'cygwin' and os.path.exists(executable + '.exe'): # Cygwin misreports sys.executable sometimes executable += '.exe' py_executable += '.exe' logger.info('Executable actually exists in %s' % executable) shutil.copyfile(executable, py_executable) make_exe(py_executable) if sys.platform == 'win32' or sys.platform == 'cygwin': pythonw = os.path.join(os.path.dirname(sys.executable), 'pythonw.exe') if os.path.exists(pythonw): logger.info('Also created pythonw.exe') shutil.copyfile(pythonw, os.path.join(os.path.dirname(py_executable), 'pythonw.exe')) if os.path.splitext(os.path.basename(py_executable))[0] != expected_exe: secondary_exe = os.path.join(os.path.dirname(py_executable), expected_exe) py_executable_ext = os.path.splitext(py_executable)[1] if py_executable_ext == '.exe': # python2.4 gives an extension of '.4' :P secondary_exe += py_executable_ext if os.path.exists(secondary_exe): logger.warn('Not overwriting existing %s script %s (you must use %s)' % (expected_exe, secondary_exe, py_executable)) else: logger.notify('Also creating executable in %s' % secondary_exe) shutil.copyfile(sys.executable, secondary_exe) make_exe(secondary_exe) if 'Python.framework' in prefix: logger.debug('MacOSX Python framework detected') # Make sure we use the the embedded interpreter inside # the framework, even if sys.executable points to # the stub executable in ${sys.prefix}/bin # See http://groups.google.com/group/python-virtualenv/ # browse_thread/thread/17cab2f85da75951 shutil.copy( os.path.join( prefix, 'Resources/Python.app/Contents/MacOS/Python'), py_executable) # Copy the framework's dylib into the virtual # environment virtual_lib = os.path.join(home_dir, '.Python') if os.path.exists(virtual_lib): os.unlink(virtual_lib) copyfile( os.path.join(prefix, 'Python'), virtual_lib) # And then change the install_name of the copied python executable try: call_subprocess( ["install_name_tool", "-change", os.path.join(prefix, 'Python'), '@executable_path/../.Python', py_executable]) except: logger.fatal( "Could not call install_name_tool -- you must have Apple's development tools installed") raise # Some tools depend on pythonX.Y being present pth = py_executable + '%s.%s' % ( sys.version_info[0], sys.version_info[1]) if os.path.exists(pth): os.unlink(pth) os.symlink('python', pth) if sys.platform == 'win32' and ' ' in py_executable: # There's a bug with subprocess on Windows when using a first # argument that has a space in it. Instead we have to quote # the value: py_executable = '"%s"' % py_executable cmd = [py_executable, '-c', 'import sys; print sys.prefix'] logger.info('Testing executable with %s %s "%s"' % tuple(cmd)) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE) proc_stdout, proc_stderr = proc.communicate() proc_stdout = os.path.normcase(os.path.abspath(proc_stdout.strip())) if proc_stdout != os.path.normcase(os.path.abspath(home_dir)): logger.fatal( 'ERROR: The executable %s is not functioning' % py_executable) logger.fatal( 'ERROR: It thinks sys.prefix is %r (should be %r)' % (proc_stdout, os.path.normcase(os.path.abspath(home_dir)))) logger.fatal( 'ERROR: virtualenv is not compatible with this system or executable') sys.exit(100) else: logger.info('Got sys.prefix result: %r' % proc_stdout) pydistutils = os.path.expanduser('~/.pydistutils.cfg') if os.path.exists(pydistutils): logger.notify('Please make sure you remove any previous custom paths from ' 'your %s file.' % pydistutils) ## FIXME: really this should be calculated earlier return py_executable | ba2bd04cd95cb7ca000dc09fc470d6faa721df90 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/12981/ba2bd04cd95cb7ca000dc09fc470d6faa721df90/virtualenv.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
67,
8103,
12,
8712,
67,
1214,
16,
2561,
67,
1214,
16,
7290,
67,
1214,
16,
4158,
67,
1214,
16,
2834,
67,
10308,
16,
2424,
4672,
3536,
6410,
2537,
326,
1026,
3330,
16,
1158,
2411,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3799,
67,
8103,
12,
8712,
67,
1214,
16,
2561,
67,
1214,
16,
7290,
67,
1214,
16,
4158,
67,
1214,
16,
2834,
67,
10308,
16,
2424,
4672,
3536,
6410,
2537,
326,
1026,
3330,
16,
1158,
2411,
... |
if not self.repo.supports_rich_root(): | if self.repo.supports_rich_root(): self.inventory.revision_id = self.revision_id else: | def pre_process_files(self): """Prepare for committing.""" self.revision_id = self.gen_revision_id() # cache of texts for this commit, indexed by file-id self.lines_for_commit = {} | 34f838307f8ac95f0f62732cdd8926ea221b2b18 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/8703/34f838307f8ac95f0f62732cdd8926ea221b2b18/generic_processor.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
675,
67,
2567,
67,
2354,
12,
2890,
4672,
3536,
7543,
364,
3294,
1787,
12123,
365,
18,
13057,
67,
350,
273,
365,
18,
4507,
67,
13057,
67,
350,
1435,
468,
1247,
434,
15219,
364,
333,
329... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
675,
67,
2567,
67,
2354,
12,
2890,
4672,
3536,
7543,
364,
3294,
1787,
12123,
365,
18,
13057,
67,
350,
273,
365,
18,
4507,
67,
13057,
67,
350,
1435,
468,
1247,
434,
15219,
364,
333,
329... |
ret = main() | ret = mymain() | def run_main(main): dohotshot = 0 if len(sys.argv) >= 2 and sys.argv[1] == "--hotshot": dohotshot = 1 sys.argv.pop(1) if dohotshot: import hotshot, hotshot.stats htfilename = mkstemp_file(tmpdir)[1] prof = hotshot.Profile(htfilename) prof.runcall(main) prof.close() # python-only del prof # python-only-end print "Starting profil statistics. This takes some time..." s = hotshot.stats.load(htfilename) s.strip_dirs() s.sort_stats("time").print_stats(100) s.sort_stats("cumulative").print_stats(100) s.sort_stats("calls").print_stats(100) os.unlink(htfilename) else: ret = main() if ret != None: sys.exit(ret) | e88bd7c78ae123c185f17919515d68d29510e836 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/1143/e88bd7c78ae123c185f17919515d68d29510e836/oldpyrpm.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
5254,
12,
5254,
4672,
741,
15224,
2415,
273,
374,
309,
562,
12,
9499,
18,
19485,
13,
1545,
576,
471,
2589,
18,
19485,
63,
21,
65,
422,
5238,
15224,
2415,
6877,
741,
15224,
24... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1086,
67,
5254,
12,
5254,
4672,
741,
15224,
2415,
273,
374,
309,
562,
12,
9499,
18,
19485,
13,
1545,
576,
471,
2589,
18,
19485,
63,
21,
65,
422,
5238,
15224,
2415,
6877,
741,
15224,
24... |
canvas.drawString(vlabels[i], y2+lineskip, x2+block-lineskip, angle=90,font=normal) | canvas.drawString(vlabels[i], x2+block+halfline, y2+block, angle=90,font=normal) | def Matrix(diss, hlabels=[], vlabels=[], sizing = [], margin = 10, hook = 10, block = None, line_size = 2.0, color_mode=0, sizing2 = [], canvas = None, multiplier = 1.0): # prevent divide-by-zero... if len(hlabels) < 2: return canvas ## ADJUST DIMENSIONS ### if canvas == None: tcanvas = piddlePIL.PILCanvas() else: tcanvas = canvas normal = piddle.Font(face="Courier") if len(vlabels) == 0: vlabels = hlabels # vertical labels... # compute the height lineskip = int(line_size*tcanvas.fontHeight(normal)+1) labellen = [tcanvas.stringWidth(s,font=normal) for s in hlabels] vlabellen = [tcanvas.stringWidth(s,font=normal) for s in vlabels] maxlabelx = max(labellen) maxlabely = max(vlabellen) width = int(1 + 2.0*margin + hook + maxlabelx + max(lineskip*(0.5+len(hlabels)) + tcanvas.fontHeight(normal),2*maxlabelx)) height = int(1 + 2.0*margin + hook + maxlabely + max(lineskip*(0.5+len(vlabels)) + tcanvas.fontHeight(normal),2*maxlabely)) if block == None: block = lineskip/2-1 if canvas == None: canvas = piddlePIL.PILCanvas(size=(width,height)) _colorize = colorpicker(color_mode) ### DRAWING ### offsetx = maxlabelx+margin offsety = maxlabely+margin halfline = canvas.fontAscent(normal)/2.0 for i in range(len(vlabels)): x2 = offsetx + lineskip/2 y2 = offsety + lineskip*(i+1) # vertical canvas.drawString(vlabels[i], y2+lineskip, x2+block-lineskip, angle=90,font=normal) # print names for i in range(len(hlabels)): # self.order identifies the label at a particular row x = offsetx - labellen[i] + lineskip y = offsety + lineskip*(i+1) canvas.drawString(hlabels[i], x, y,font=normal) for j in range(len(hlabels)): colo = _colorize(diss[i,j]) x = offsetx+hook+lineskip*(j+1)+block y = offsety+lineskip*(i+1)-halfline if len(sizing) == 0: ss = 1.0 else: ss = min(1,sizing[i][j]) ss *= multiplier canvas.drawRect(x-ss*block,y-ss*block,x+ss*block,y+ss*block,edgeColor=colo,fillColor=colo,edgeWidth=0.5) if len(sizing2) > 0: ss = sizing2[i][j] ss *= multiplier canvas.drawRect(x-ss*block,y-ss*block,x+ss*block,y+ss*block,edgeColor=piddle.black,fillColor=None,edgeWidth=0.5) canvas.flush() return canvas | 431e36b54d4a61a662472721242bd7d54a81c6c0 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/6366/431e36b54d4a61a662472721242bd7d54a81c6c0/orngDendrogram.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7298,
12,
72,
1054,
16,
366,
5336,
22850,
6487,
331,
5336,
22850,
6487,
272,
6894,
273,
5378,
16,
7333,
273,
1728,
16,
3953,
273,
1728,
16,
1203,
273,
599,
16,
980,
67,
1467,
273,
576,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
7298,
12,
72,
1054,
16,
366,
5336,
22850,
6487,
331,
5336,
22850,
6487,
272,
6894,
273,
5378,
16,
7333,
273,
1728,
16,
3953,
273,
1728,
16,
1203,
273,
599,
16,
980,
67,
1467,
273,
576,... |
Search for a keyword in the synopsis lines of all modules. | Search for a keyword in the synopsis lines of all available modules. | def ready(port=port): print 'server ready at http://127.0.0.1:%d/' % port | c59006cf0425a2636c8284ef2601f7f489fad815 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/3187/c59006cf0425a2636c8284ef2601f7f489fad815/pydoc.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5695,
12,
655,
33,
655,
4672,
1172,
296,
3567,
5695,
622,
1062,
2207,
14260,
18,
20,
18,
20,
18,
21,
5319,
72,
2473,
738,
1756,
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,
5695,
12,
655,
33,
655,
4672,
1172,
296,
3567,
5695,
622,
1062,
2207,
14260,
18,
20,
18,
20,
18,
21,
5319,
72,
2473,
738,
1756,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,... |
t += s.replace('<','<') | t += format(s) | def output_text(self, ncols=0, html=True): if ncols and not self.introspect(): s = word_wrap(self.__out, ncols=ncols) else: s = self.__out if html: # Everything not wrapped in <html> ... </html> # should have the <'s replaced by <'s. t = '' while len(s) > 0: i = s.find('<html>') if i == -1: t += s.replace('<','<') break j = s.find('</html>') if j == -1: t += s.replace('<','<') break t += s[:i].replace('<','<') + s[i+6:j] s = s[j+7:] s = t if not self.is_html() and len(s.strip()) > 0: s = '<pre class="shrunk">' + s + '</pre>' return s | 2085e8271e2fac40e6923df66c0b13dc7c8f3319 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9890/2085e8271e2fac40e6923df66c0b13dc7c8f3319/cell.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
955,
12,
2890,
16,
21330,
33,
20,
16,
1729,
33,
5510,
4672,
309,
21330,
471,
486,
365,
18,
474,
26170,
13332,
272,
273,
2076,
67,
4113,
12,
2890,
16186,
659,
16,
21330,
33,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
876,
67,
955,
12,
2890,
16,
21330,
33,
20,
16,
1729,
33,
5510,
4672,
309,
21330,
471,
486,
365,
18,
474,
26170,
13332,
272,
273,
2076,
67,
4113,
12,
2890,
16186,
659,
16,
21330,
33,
... |
raise Abort("patch command failed: %s" % explain_exit(code)) | raise Abort("patch command failed: %s" % explain_exit(code)[0]) | def patch(strip, patchname, ui): """apply the patch <patchname> to the working directory. a list of patched files is returned""" fp = os.popen('patch -p%d < "%s"' % (strip, patchname)) files = {} for line in fp: line = line.rstrip() ui.status("%s\n" % line) if line.startswith('patching file '): pf = parse_patch_output(line) files.setdefault(pf, 1) code = fp.close() if code: raise Abort("patch command failed: %s" % explain_exit(code)) return files.keys() | 793f17c1ab5569a495c045b382c72d7fac0f49ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11312/793f17c1ab5569a495c045b382c72d7fac0f49ee/util.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
6406,
16,
4729,
529,
16,
5915,
4672,
3536,
9010,
326,
4729,
411,
2272,
529,
34,
358,
326,
5960,
1867,
18,
279,
666,
434,
25786,
1390,
353,
2106,
8395,
4253,
273,
1140,
18,
84... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
4729,
12,
6406,
16,
4729,
529,
16,
5915,
4672,
3536,
9010,
326,
4729,
411,
2272,
529,
34,
358,
326,
5960,
1867,
18,
279,
666,
434,
25786,
1390,
353,
2106,
8395,
4253,
273,
1140,
18,
84... |
assert self.type is not None, self.__original | if self.type is None: raise ValueError, "unknown url type: %s" % self.__original | def get_type(self): if self.type is None: self.type, self.__r_type = splittype(self.__original) assert self.type is not None, self.__original return self.type | f9d75b121b170fe3fa4851ed54e57b4b75b9c0d6 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/8125/f9d75b121b170fe3fa4851ed54e57b4b75b9c0d6/urllib2.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
723,
12,
2890,
4672,
309,
365,
18,
723,
353,
599,
30,
365,
18,
723,
16,
365,
16186,
86,
67,
723,
273,
1416,
723,
12,
2890,
16186,
8830,
13,
309,
365,
18,
723,
353,
599,
30... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
336,
67,
723,
12,
2890,
4672,
309,
365,
18,
723,
353,
599,
30,
365,
18,
723,
16,
365,
16186,
86,
67,
723,
273,
1416,
723,
12,
2890,
16186,
8830,
13,
309,
365,
18,
723,
353,
599,
30... |
metodo='highlight'; | metodo='click'; | filecfg+='def test_'+suite_name+'():\n' | 1bc8abf877905eaaeb05988b5daf0b4dd535cdb1 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8218/1bc8abf877905eaaeb05988b5daf0b4dd535cdb1/loading.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
585,
7066,
15,
2218,
536,
1842,
4623,
15,
30676,
67,
529,
6797,
1435,
5581,
82,
11,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
585,
7066,
15,
2218,
536,
1842,
4623,
15,
30676,
67,
529,
6797,
1435,
5581,
82,
11,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
ziplog=open(os.path.join(self.log_full_dir, "_internal_ziplog.txt"), 'w') ziplog.write(zipfile_name) ziplog.close() | def zip_logs(self): '''Zip the rotated log files. Zip files are named as <time>.<logfilename>.zip and placed in the appropriate log subdirectory. Delete rotated log files which are zipped. ''' if not self.subsettings['Log Rotation']['Log Rotation Enable']: lr = LogRotator(self.dir_lock, self.loggername) lr.rotate_logs() zipfile_name = ("%s." + self.logfile_name + ".zip") % \ time.strftime("%Y%m%d_%H%M%S") zipfile_rel_path = os.path.join(self.log_rel_dir, zipfile_name) self.dir_lock.acquire() try: myzip = zipfile.ZipFile(zipfile_rel_path, "w", zipfile.ZIP_DEFLATED) filelist = os.listdir(self.log_rel_dir) # will contain all files just zipped, and thus to be deleted filelist_copy = copy.deepcopy(filelist) for fname in filelist: if self.needs_zipping(fname): myzip.write(os.path.join(self.log_rel_dir, fname)) else: filelist_copy.remove(fname) myzip.close() myzip = zipfile.ZipFile(zipfile_rel_path, "r", zipfile.ZIP_DEFLATED) if myzip.testzip() != None: logging.getLogger('').debug("Warning: zipfile for logger %s " "did not pass integrity test.\n" % self.loggername) else: # if zip checks out, delete files just added to zip. for fname in filelist_copy: os.remove(os.path.join(self.log_rel_dir, fname)) myzip.close() # write the name of the last completed zip file # so that we can check against this when emailing or ftping, # to make sure we do not try to transfer a zipfile which is # in the process of being created ziplog=open(os.path.join(self.log_full_dir, "_internal_ziplog.txt"), 'w') ziplog.write(zipfile_name) ziplog.close() finally: self.dir_lock.release() | 097ae871c66a98b968670a4e657f5c8fed25dfe0 /local1/tlutelli/issta_data/temp/all_python//python/2009_temp/2009/3638/097ae871c66a98b968670a4e657f5c8fed25dfe0/timerthreads.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
3144,
67,
10011,
12,
2890,
4672,
9163,
9141,
326,
22864,
613,
1390,
18,
225,
8603,
1390,
854,
4141,
487,
411,
957,
18652,
32,
1330,
3459,
18652,
4450,
471,
15235,
316,
326,
5505,
613,
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,
3144,
67,
10011,
12,
2890,
4672,
9163,
9141,
326,
22864,
613,
1390,
18,
225,
8603,
1390,
854,
4141,
487,
411,
957,
18652,
32,
1330,
3459,
18652,
4450,
471,
15235,
316,
326,
5505,
613,
29... | |
if len(failureList) > 0: raise JSException("Submission Failed", FailureList = failureList) | if len(failureList) > 0: raise JSException("Submission Failed", FailureList = failureList) | def doSubmit(self): """ _doSubmit_ | c0a06168f6fe707c620d2720874aa30295d4adb5 /local1/tlutelli/issta_data/temp/all_python//python/2007_temp/2007/8887/c0a06168f6fe707c620d2720874aa30295d4adb5/T0LSFSubmitter.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
741,
11620,
12,
2890,
4672,
3536,
389,
2896,
11620,
67,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
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,
741,
11620,
12,
2890,
4672,
3536,
389,
2896,
11620,
67,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-10... |
m = self.get_menustack()[-1] m.choices[m.choices.index(m.selected)] = item m.selected = item | def configure_set_var(self, var): """ Update the variable in var and change the menu. This function is used by 'configure' """ | e29d880d94d54392035abf993d3ebc58250e2320 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/11399/e29d880d94d54392035abf993d3ebc58250e2320/directory.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
67,
542,
67,
1401,
12,
2890,
16,
569,
4672,
3536,
2315,
326,
2190,
316,
569,
471,
2549,
326,
3824,
18,
1220,
445,
353,
1399,
635,
296,
14895,
11,
3536,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
5068,
67,
542,
67,
1401,
12,
2890,
16,
569,
4672,
3536,
2315,
326,
2190,
316,
569,
471,
2549,
326,
3824,
18,
1220,
445,
353,
1399,
635,
296,
14895,
11,
3536,
2,
-100,
-100,
-100,
-100,... | |
return self.chlist | return self.channel_list | def getDownloadedChannelsList( self): # do not re-read downloaded channels list if self.chlist != None: if libgpodder.isDebugging(): print "(localDB) using cached downloaded channels list" return self.chlist self.chlist = [] ifl = self.getIndexFileList() for f in ifl: if isfile( f): # whew! found a index file, parse it and append # if there's a rdb in cache already, use that if f in self.localdbs: rdb = self.localdbs[f] else: rdb = readLocalDB() rdb.parseXML( f) self.localdbs[f] = rdb # append this one to list if len( rdb.channel) > 0: self.chlist.append( rdb.channel) return self.chlist | 923fa5ad3e8e0caf4b46312f8e4df0f9b5e874ee /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/12778/923fa5ad3e8e0caf4b46312f8e4df0f9b5e874ee/liblocaldb.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
995,
4230,
10585,
682,
12,
365,
4672,
468,
741,
486,
283,
17,
896,
13549,
5750,
666,
309,
365,
18,
343,
1098,
480,
599,
30,
309,
2561,
6403,
369,
765,
18,
291,
2829,
1998,
13332,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
2343,
995,
4230,
10585,
682,
12,
365,
4672,
468,
741,
486,
283,
17,
896,
13549,
5750,
666,
309,
365,
18,
343,
1098,
480,
599,
30,
309,
2561,
6403,
369,
765,
18,
291,
2829,
1998,
13332,... |
self.text = wxTextCtrl(self, txID, style=wxTE_PROCESS_ENTER) | self.text = wxTextCtrl(self, txID, style=wxTE_PROCESS_ENTER | wxTE_PROCESS_TAB) | def __init__(self, symbol_table, toplevel, parent = None, id = -1): wxPanel.__init__( self, parent, id, style=wxWANTS_CHARS|wxCLIP_CHILDREN|wxNO_FULL_REPAINT_ON_RESIZE) self.toplevel = toplevel self._symbol_table = symbol_table self.SetAutoLayout(true) self.box = wxBoxSizer(wxVERTICAL) txID = NewId() self.text = wxTextCtrl(self, txID, style=wxTE_PROCESS_ENTER) EVT_KEY_DOWN(self.text, self._OnKey) EVT_TEXT(self, txID, self._OnText) # On win32, the enter key is only caught by the EVT_TEXT_ENTER # On GTK, the enter key is sent directly to EVT_KEY_DOWN if platform == 'win32': EVT_TEXT_ENTER(self, txID, self._OnEnter) EVT_TEXT_TAB(self, txID, self._OnTab) self.box.Add(self.text, 0, wxEXPAND|wxBOTTOM, 5) tID = NewId() self.tree = SymbolTreeCtrl(self, self, tID, wxDefaultPosition, wxDefaultSize, wxTR_HAS_BUTTONS | wxTR_DEFAULT_STYLE) self.box.Add(self.tree, 1, wxEXPAND|wxALL) self.box.RecalcSizes() self.SetSizer(self.box) | 40d2d07da7b00db524d562303d2b244ccd83f1d9 /local1/tlutelli/issta_data/temp/all_python//python/2006_temp/2006/9927/40d2d07da7b00db524d562303d2b244ccd83f1d9/classifier_display.py | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1652,
1001,
2738,
972,
12,
2890,
16,
3273,
67,
2121,
16,
28999,
16,
982,
273,
599,
16,
612,
273,
300,
21,
4672,
7075,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
612,
16,
2154,
33,
27226... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
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,
3273,
67,
2121,
16,
28999,
16,
982,
273,
599,
16,
612,
273,
300,
21,
4672,
7075,
5537,
16186,
2738,
972,
12,
365,
16,
982,
16,
612,
16,
2154,
33,
27226... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.