rem
stringlengths
1
322k
add
stringlengths
0
2.05M
context
stringlengths
4
228k
meta
stringlengths
156
215
api_call(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id)
result = api_call(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id) transaction_ids.append(result.transaction.id)
def set_status(self, gtg_status): '''Sets the task status, in GTG terminology''' status = GTG_TO_RTM_STATUS[gtg_status] if status == True: api_call = self.rtm.tasks.uncomplete else: api_call = self.rtm.tasks.complete api_call(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_task...
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
def set_tags(self, tags):
def set_tags(self, tags, transaction_ids = []):
def set_tags(self, tags): ''' Sets a new set of tags to a task. Old tags are deleted. ''' #RTM accept tags without "@" as prefix, and lowercase tags = [tag[1:].lower() for tag in tags] #formatting them in a comma-separated string if len(tags) > 0: tagstxt = reduce(lambda x,y: x + ", " + y, tags) else: tagstxt = "" sel...
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
self.rtm.tasks.setTags(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, tags = tagstxt)
result = self.rtm.tasks.setTags(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, tags = tagstxt) transaction_ids.append(result.transaction.id)
def set_tags(self, tags): ''' Sets a new set of tags to a task. Old tags are deleted. ''' #RTM accept tags without "@" as prefix, and lowercase tags = [tag[1:].lower() for tag in tags] #formatting them in a comma-separated string if len(tags) > 0: tagstxt = reduce(lambda x,y: x + ", " + y, tags) else: tagstxt = "" sel...
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
def set_text(self, text):
def set_text(self, text, transaction_ids = []):
def set_text(self, text): ''' deletes all the old notes in a task and sets a single note with the given text ''' #delete old notes notes = self.rtm_taskseries.notes if notes: note_list = self.__getattr_the_rtm_way(notes, 'note') for note_id in [note.id for note in note_list]: self.rtm.tasksNotes.delete(timeline = self....
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
self.rtm.tasksNotes.delete(timeline = self.timeline, note_id = note_id)
result = self.rtm.tasksNotes.delete(timeline = self.timeline, note_id = note_id) transaction_ids.append(result.transaction.id)
def set_text(self, text): ''' deletes all the old notes in a task and sets a single note with the given text ''' #delete old notes notes = self.rtm_taskseries.notes if notes: note_list = self.__getattr_the_rtm_way(notes, 'note') for note_id in [note.id for note in note_list]: self.rtm.tasksNotes.delete(timeline = self....
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
self.rtm.tasksNotes.add(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, note_title = "", note_text = text)
text = cgi.escape(text) text_cursor_end = len(text) while True: text_cursor_start = text_cursor_end - 1000 if text_cursor_start < 0: text_cursor_start = 0 result = self.rtm.tasksNotes.add(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self....
def set_text(self, text): ''' deletes all the old notes in a task and sets a single note with the given text ''' #delete old notes notes = self.rtm_taskseries.notes if notes: note_list = self.__getattr_the_rtm_way(notes, 'note') for note_id in [note.id for note in note_list]: self.rtm.tasksNotes.delete(timeline = self....
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
def set_due_date(self, due):
def set_due_date(self, due, transaction_ids = []):
def set_due_date(self, due): ''' Sets the task due date ''' if due != None: due_string = self.__time_date_to_rtm(due) self.rtm.tasks.setDueDate(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, parse = 1, \ due=due_string) else: se...
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
due_string = self.__time_date_to_rtm(due) self.rtm.tasks.setDueDate(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, parse = 1, \ due=due_string) else: self.rtm.tasks.setDueDate(timeline = self.timeline, list_id = self....
kwargs['parse'] = 1 kwargs['due'] = self.__time_date_to_rtm(due) result = self.rtm.tasks.setDueDate(**kwargs) transaction_ids.append(result.transaction.id)
def set_due_date(self, due): ''' Sets the task due date ''' if due != None: due_string = self.__time_date_to_rtm(due) self.rtm.tasks.setDueDate(timeline = self.timeline, list_id = self.rtm_list.id, taskseries_id = self.rtm_taskseries.id, task_id = self.rtm_task.id, parse = 1, \ due=due_string) else: se...
abfb6098ab297631b5a39657955ffc083742508d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/abfb6098ab297631b5a39657955ffc083742508d/backend_rtm.py
def sendTask(self, task): """Send a gtg task to hamster-applet""" if task is None: return gtg_title = task.get_title() gtg_tags = tags=[t.lstrip('@').lower() for t in task.get_tags_name()] activity = "Other" if self.preferences['activity'] == 'tag': hamster_activities=set([unicode(x[0]).lower() for x in self.hamster.G...
caa7ebbaca52ef7ec4f36f42d20c5687a074981c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/caa7ebbaca52ef7ec4f36f42d20c5687a074981c/hamster.py
hamster_id=self.hamster.AddFact('%s%s,%s%s'%(activity, category, description, tag_str), 0, 0)
def sendTask(self, task): """Send a gtg task to hamster-applet""" if task is None: return gtg_title = task.get_title() gtg_tags = tags=[t.lstrip('@').lower() for t in task.get_tags_name()] activity = "Other" if self.preferences['activity'] == 'tag': hamster_activities=set([unicode(x[0]).lower() for x in self.hamster.G...
caa7ebbaca52ef7ec4f36f42d20c5687a074981c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/caa7ebbaca52ef7ec4f36f42d20c5687a074981c/hamster.py
ids.append(str(hamster_id))
try: hamster_id=self.hamster.AddFact('%s%s,%s%s'%(activity, category, description, tag_str), 0, 0) ids.append(str(hamster_id)) except dbus.exceptions.DBusException: pass
def sendTask(self, task): """Send a gtg task to hamster-applet""" if task is None: return gtg_title = task.get_title() gtg_tags = tags=[t.lstrip('@').lower() for t in task.get_tags_name()] activity = "Other" if self.preferences['activity'] == 'tag': hamster_activities=set([unicode(x[0]).lower() for x in self.hamster.G...
caa7ebbaca52ef7ec4f36f42d20c5687a074981c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/caa7ebbaca52ef7ec4f36f42d20c5687a074981c/hamster.py
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
new_subtask_mi = self.builder.get_object("new_subtask_mi")
self.new_subtask_mi = self.builder.get_object("new_subtask_mi")
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
new_subtask_mi.add_accelerator("activate", agr, key, mod,\
self.new_subtask_mi.add_accelerator("activate", agr, key, mod,\
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
mark_done_mi = self.builder.get_object('mark_done_mi')
self.mark_done_mi = self.builder.get_object('mark_done_mi')
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
mark_done_mi.add_accelerator(
self.mark_done_mi.add_accelerator(
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
task_dismiss = self.builder.get_object('task_dismiss')
self.dismiss_mi = self.builder.get_object('task_dismiss')
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
task_dismiss.add_accelerator(
self.dismiss_mi.add_accelerator(
def _init_accelerators(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
def connect_changed_signals(self): selection = self.task_tv.get_selection() closed_selection = self.ctask_tv.get_selection() selection.connect("changed", self.on_task_cursor_changed) closed_selection.connect("changed", self.on_taskdone_cursor_changed)
def general_refresh(self): if self.logger: self.logger.debug("Trigger refresh on taskbrowser.") self.tag_modelfilter.refilter() self.task_modelfilter.refilter()
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
self.connect_changed_signals()
def main(self):
c72b6838dcb0b550e4eff4f42194bf7f0922f3e4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/c72b6838dcb0b550e4eff4f42194bf7f0922f3e4/browser.py
print "*** end of refiltering ****" for n in self.virtual_root: self.__update_node(n,True)
def refilter(self): """ rebuilds the tree from scratch. It should be called only when the filter is changed (i.e. only filters_bank should call it). """ self.update_count = 0 self.add_count = 0 self.remove_count = 0 virtual_root2 = [] to_add = [] #self.displayed_nodes = [] self.counted_nodes = [] #If we have only one f...
2e0daae0d12b40f1873bbbf712576f05a9af7283 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/2e0daae0d12b40f1873bbbf712576f05a9af7283/filteredtree.py
rowref = self.get_iter(node_path) if data == 'add': self.row_inserted(node_path, rowref) else: self.row_changed(node_path, rowref) if self.tree.node_has_child(tid): self.row_has_child_toggled(node_path, rowref)
if tid == self.tree.get_node_for_path(node_path): rowref = self.get_iter(node_path) if data == 'add': self.row_inserted(node_path, rowref) else: self.row_changed(node_path, rowref) if self.tree.node_has_child(tid): self.row_has_child_toggled(node_path, rowref)
def update_task(self, tid,paths,data=None):
6d94ec5b6dc1e22f0fd47aeddd33afd70ae86d19 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/6d94ec5b6dc1e22f0fd47aeddd33afd70ae86d19/treemodel.py
def configure_dialog(self, plugin_api):
def configure_dialog(self, plugin_api, manager_dialog):
def configure_dialog(self, plugin_api): self.on_geolocalized_preferences(plugin_api)
7813809bbd4893146300f8f0cc188a5c9ba1c6b6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/7813809bbd4893146300f8f0cc188a5c9ba1c6b6/geolocalized_tasks.py
self.spinner = gtk.Spinner()
try: self.spinner = gtk.Spinner() except AttributeError: self.spinner = gtk.HBox() self.spinner.connect("show", self.on_spinner_show)
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
13b9f1047948d728dd128d8dd7559e32ae982639 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/13b9f1047948d728dd128d8dd7559e32ae982639/configurepanel.py
self.spinner.connect("show", self.on_spinner_show)
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
13b9f1047948d728dd128d8dd7559e32ae982639 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/13b9f1047948d728dd128d8dd7559e32ae982639/configurepanel.py
entry_text = [entry_text.strip()] if not entry_text[0]: error_message = "Please enter a tag name." addtag_error = True
def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("addtag_dialog") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = [entry_text.strip()] # Set up a warning mess...
ebb9640d06d7edd37e2b64bcf514402939ed39c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ebb9640d06d7edd37e2b64bcf514402939ed39c3/browser.py
if "," in entry_text[0]: entry_text = entry_text[0].split(",") for tagname in entry_text: tagname = tagname.strip() if not addtag_error: if " " in tagname: error_message = "Tag name must not contain spaces." addtag_error = True break new_tags.append("@" + tagname) if addtag_error: error_dialog = gtk.MessageDialog(N...
for text in entry_text.split(","): tags = [t.strip() for t in text.split(" ")] for tag in tags: if tag: new_tags.append("@" + tag)
def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("addtag_dialog") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = [entry_text.strip()] # Set up a warning mess...
ebb9640d06d7edd37e2b64bcf514402939ed39c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ebb9640d06d7edd37e2b64bcf514402939ed39c3/browser.py
def on_addtag_confirm(self, widget): tag_entry = self.builder.get_object("tag_entry") addtag_dialog = self.builder.get_object("addtag_dialog") apply_to_subtasks = self.builder.get_object("apply_to_subtasks") addtag_error = False entry_text = tag_entry.get_text() entry_text = [entry_text.strip()] # Set up a warning mess...
ebb9640d06d7edd37e2b64bcf514402939ed39c3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/ebb9640d06d7edd37e2b64bcf514402939ed39c3/browser.py
todis = self.__is_displayed(tid) curdis = self.is_displayed(tid) if todis: if not curdis: self.__add_node(tid)
if tid not in self.node_to_remove: todis = self.__is_displayed(tid) curdis = self.is_displayed(tid) if todis: if not curdis: self.__add_node(tid) else: node = self.get_node(tid) self.update_count += 1 node = self.get_node(tid) self.__root_update(tid,inroot) self.emit("task-modified-inview", tid) for c in node.get_...
def __update_node(self,tid,inroot): todis = self.__is_displayed(tid) curdis = self.is_displayed(tid) if todis: #if the task was not displayed previously but now should #we add it. if not curdis:
bb27ea46263cf1e53ecd519b11ff373a7d58bf01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bb27ea46263cf1e53ecd519b11ff373a7d58bf01/filteredtree.py
node = self.get_node(tid) self.update_count += 1 node = self.get_node(tid) self.__root_update(tid,inroot) self.emit("task-modified-inview", tid) for c in node.get_children(): self.__update_node(c,False) else: if curdis: self.__remove_node(tid) else: self.emit("task-deleted-inview", tid)
if curdis: self.__remove_node(tid) else: self.emit("task-deleted-inview", tid)
def __update_node(self,tid,inroot): todis = self.__is_displayed(tid) curdis = self.is_displayed(tid) if todis: #if the task was not displayed previously but now should #we add it. if not curdis:
bb27ea46263cf1e53ecd519b11ff373a7d58bf01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bb27ea46263cf1e53ecd519b11ff373a7d58bf01/filteredtree.py
isroot = False if tid in self.displayed_nodes: isroot = self.__is_root(self.get_node(tid)) self.remove_count += 1 self.__nodes_count -= 1 self.emit('task-deleted-inview',tid) self.__root_update(tid,False) self.displayed_nodes.remove(tid) self.__reset_cache() parent = self.node_parents(self.get_node(tid)) if not isro...
if tid not in self.node_to_remove: self.node_to_remove.append(tid) isroot = False if tid in self.displayed_nodes: isroot = self.__is_root(self.get_node(tid)) self.remove_count += 1 self.__nodes_count -= 1 self.emit('task-deleted-inview',tid) self.__root_update(tid,False) self.displayed_nodes.remove(tid) self.__reset_ca...
def __remove_node(self,tid): isroot = False if tid in self.displayed_nodes: isroot = self.__is_root(self.get_node(tid)) self.remove_count += 1 self.__nodes_count -= 1 self.emit('task-deleted-inview',tid) self.__root_update(tid,False) self.displayed_nodes.remove(tid) self.__reset_cache() #Test if this is necessary paren...
bb27ea46263cf1e53ecd519b11ff373a7d58bf01 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/7036/bb27ea46263cf1e53ecd519b11ff373a7d58bf01/filteredtree.py
m = MP3(self.media) m.add_tags() m.tags['TIT2'] = id3.TIT2(encoding=2, text=u'text') m.save()
self.mp3.add_tags() self.mp3.tags['TIT2'] = id3.TIT2(encoding=2, text=u'text') self.mp3.save()
def write_tags(self): """Write all ID3v2.4 tags by mapping dub2id3_dict dictionnary with the respect of mutagen classes and methods"""
4acd0bc3913197e431d6567f7892414587484ee3 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/4acd0bc3913197e431d6567f7892414587484ee3/mp3.py
self.metadata = self.get_file_metadata()
try: self.metadata = self.get_file_metadata() except: self.metadata = {'title': '', 'artist': '', 'album': '', 'date': '', 'comment': '', 'genre': '', 'copyright': '', }
def __init__(self, media): self.media = media self.item_id = '' self.source = self.media self.options = {} self.bitrate_default = '192' self.cache_dir = os.sep + 'tmp' self.keys2id3 = {'title': 'TIT2', 'artist': 'TPE1', 'album': 'TALB', 'date': 'TDRC', 'comment': 'COMM', 'genre': 'TCON', 'copyright': 'TCOP', } self.mp3...
ae6bfbe50fa61e7bb273af42ab8fb1027d5dd413 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/ae6bfbe50fa61e7bb273af42ab8fb1027d5dd413/mp3.py
try: self.metadata = self.get_file_metadata() except: self.metadata = {'title': '', 'artist': '', 'album': '', 'date': '', 'comment': '', 'genre': '', 'copyright': '', }
self.metadata = self.get_file_metadata()
def __init__(self, media): self.media = media self.item_id = '' self.source = self.media self.options = {} self.bitrate_default = '192' self.cache_dir = os.sep + 'tmp' self.keys2id3 = {'title': 'TIT2', 'artist': 'TPE1', 'album': 'TALB', 'date': 'TDRC', 'comment': 'COMM', 'genre': 'TCON', 'copyright': 'TCOP', } self.mp3...
348233e0106eeabb559ca54dad7c401f0b498e9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/348233e0106eeabb559ca54dad7c401f0b498e9f/mp3.py
self.mp3.close()
def get_file_metadata(self): metadata = {} for key in self.keys2id3.keys(): try: metadata[key] = self.mp3[key][0] except: metadata[key] = '' self.mp3.close() return metadata
348233e0106eeabb559ca54dad7c401f0b498e9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/348233e0106eeabb559ca54dad7c401f0b498e9f/mp3.py
def get_file_metadata(self): metadata = {} for key in self.keys2id3.keys(): try: metadata[key] = self.mp3[key][0] except: metadata[key] = '' self.mp3.close() return metadata
348233e0106eeabb559ca54dad7c401f0b498e9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/348233e0106eeabb559ca54dad7c401f0b498e9f/mp3.py
def write_tags(self): """Write all ID3v2.4 tags by mapping dub2id3_dict dictionnary with the respect of mutagen classes and methods""" m = MP3(self.media) m.add_tags() m.tags['TIT2'] = id3.TIT2(encoding=2, text=u'text') m.save()
348233e0106eeabb559ca54dad7c401f0b498e9f /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/348233e0106eeabb559ca54dad7c401f0b498e9f/mp3.py
self.osc_controller.add_method('/relay', 'i', self.relay_callback)
self.osc_controller.add_method('/media/relay', 'i', self.relay_callback)
def __init__(self, station, q, logger, m3u): Thread.__init__(self) self.station = station self.q = q self.logger = logger self.channel = shout.Shout() self.id = 999999 self.counter = 0 self.command = 'cat ' self.delay = 0
c766ac59bfe271c6b0a7cd0392acf2335ce5a537 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/c766ac59bfe271c6b0a7cd0392acf2335ce5a537/station.py
if not os.path.exists()self.record_dir):
if not os.path.exists(self.record_dir):
def __init__(self, station, q, logger, m3u): Thread.__init__(self) self.station = station self.q = q self.logger = logger self.channel = shout.Shout() self.id = 999999 self.counter = 0 self.command = 'cat ' self.delay = 0
69254517ca69f86f59c37f950367f5cb6dbc786c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/69254517ca69f86f59c37f950367f5cb6dbc786c/station.py
self.record_callback('/write', [1])
self.record_callback('/record', [1])
def __init__(self, station, q, logger, m3u): Thread.__init__(self) self.station = station self.q = q self.logger = logger self.channel = shout.Shout() self.id = 999999 self.counter = 0 self.command = 'cat ' self.delay = 0
c8c7da7542bc8a76cfdf63955a2dd95611137636 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/c8c7da7542bc8a76cfdf63955a2dd95611137636/station.py
message = 'New track ! %s %s on
message = '
def get_next_media(self): # Init playlist if self.lp != 0: old_playlist = self.playlist new_playlist = self.get_playlist() lp_new = len(new_playlist)
405f01a8022cc1affdcc5406390ab0612fae9635 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/405f01a8022cc1affdcc5406390ab0612fae9635/station.py
self.prefix = '
self.prefix = '
def set_relay_mode(self): self.prefix = '#NowPlaying (relaying *LIVE*) :' song = self.relay_url self.song = song.encode('utf-8') self.artist = 'Various' self.channel.set_metadata({'song': self.short_name + ' relaying : ' + self.song, 'charset': 'utf8',}) self.stream = self.player.relay_read()
8e1466724c6a2bc0f91ae5d26dd365f3233ce05c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/8e1466724c6a2bc0f91ae5d26dd365f3233ce05c/station.py
self.prefix = '
self.prefix = '
def set_read_mode(self): self.prefix = '#NowPlaying :' self.current_media_obj = self.media_to_objs([self.media]) self.title = self.current_media_obj[0].metadata['title'] self.artist = self.current_media_obj[0].metadata['artist'] self.title = self.title.replace('_', ' ') self.artist = self.artist.replace('_', ' ') if no...
8e1466724c6a2bc0f91ae5d26dd365f3233ce05c /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/8e1466724c6a2bc0f91ae5d26dd365f3233ce05c/station.py
self.tinyurl = tinyurl.create_one(self.channel.url + '/m3u/' + self.m3u.split(os.sep)[-1])
def __init__(self, station, q, logger, m3u): Thread.__init__(self) self.station = station self.q = q self.logger = logger self.channel = shout.Shout() self.id = 999999 self.counter = 0 self.command = 'cat ' self.delay = 0
87d8f81153bf6c530a70928e2efc1894f64f8518 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/87d8f81153bf6c530a70928e2efc1894f64f8518/station.py
def __init__(self, username, password):
def __init__(self, access_token_key, access_token_secret):
def __init__(self, username, password): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
7301ae6a07f2fbed4880a8f09edaa3f07fe50743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/7301ae6a07f2fbed4880a8f09edaa3f07fe50743/twitt.py
self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
self.username = TWITTER_CONSUMER_KEY self.password = TWITTER_CONSUMER_SECRET self.access_token_key = access_token_key self.access_token_secret = access_token_secret self.api = twitter.Api(username=self.username, password=self.password, access_token_key=self.access_token_key, access_token_secret=self.access_token_secret...
def __init__(self, username, password): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
7301ae6a07f2fbed4880a8f09edaa3f07fe50743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/7301ae6a07f2fbed4880a8f09edaa3f07fe50743/twitt.py
def post(self, message): try: self.api.PostUpdate(message) except: pass
7301ae6a07f2fbed4880a8f09edaa3f07fe50743 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/7301ae6a07f2fbed4880a8f09edaa3f07fe50743/twitt.py
message = 'New track ! %s
artist_names = artist.split(' ') artist_tags = ' message = 'New track ! %s %s on
def get_next_media(self): # Init playlist if self.lp != 0: old_playlist = self.playlist new_playlist = self.get_playlist() lp_new = len(new_playlist)
5cb409cf08b9f0c40508963f3c0abeb9d2dcb90e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/5cb409cf08b9f0c40508963f3c0abeb9d2dcb90e/station.py
def update_twitter(self): artist_names = self.artist.split(' ') artist_tags = ' message = '♫ %s %s on
def update_twitter(self, message=None): if not message: artist_names = self.artist.split(' ') artist_tags = ' message = '♫ %s %s on
def update_twitter(self): artist_names = self.artist.split(' ') artist_tags = ' #'.join(list(set(artist_names)-set(['&', '-']))) message = '♫ %s %s on #%s #%s' % (self.prefix, self.song, self.short_name, artist_tags) tags = '#' + ' #'.join(self.twitter_tags) message = message + ' ' + tags message = message[:113] + ' ' ...
5cb409cf08b9f0c40508963f3c0abeb9d2dcb90e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/5cb409cf08b9f0c40508963f3c0abeb9d2dcb90e/station.py
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
fbf58caf689fa453dd7750886c0e323a5dfe8288 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/fbf58caf689fa453dd7750886c0e323a5dfe8288/station.py
artist_names = self.artist.split(' ') artist_tags = ' message = '♫ %s %s on tags = ' message = message + ' ' + tags message = message[:107] + ' M3U : ' + self.m3u_tinyurl self.update_twitter(message) self.channel.set_metadata({'song': self.song, 'charset': 'utf8',})
self.update_twitter_current() self.channel.set_metadata({'song': self.song, 'charset': 'utf8',})
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
fbf58caf689fa453dd7750886c0e323a5dfe8288 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/fbf58caf689fa453dd7750886c0e323a5dfe8288/station.py
self.tinyurl = tinyurl.create_one(self.channel.url + '/m3u/' + self.m3u.split(os.sep)[-1])
def __init__(self, station, q, logger, m3u): Thread.__init__(self) self.station = station self.q = q self.logger = logger self.channel = shout.Shout() self.id = 999999 self.counter = 0 self.command = 'cat ' self.delay = 0
001767ee06ae78d68d0da1c4e67bae357420cb09 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/001767ee06ae78d68d0da1c4e67bae357420cb09/deefuzzer.py
message = '
message = '
def get_next_media(self): # Init playlist if self.lp != 0: old_playlist = self.playlist new_playlist = self.get_playlist() lp_new = len(new_playlist)
a79f801564005a521166c0aa9af56c21c88a4050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/a79f801564005a521166c0aa9af56c21c88a4050/station.py
self.prefix = '
self.prefix = '
def set_relay_mode(self): self.prefix = '#nowplaying (relaying *LIVE*) :' song = self.relay_url self.song = song.encode('utf-8') self.artist = 'Various' self.channel.set_metadata({'song': self.short_name + ' relaying : ' + self.song, 'charset': 'utf8',}) self.stream = self.player.relay_read()
a79f801564005a521166c0aa9af56c21c88a4050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/a79f801564005a521166c0aa9af56c21c88a4050/station.py
self.prefix = '
self.prefix = '
def set_read_mode(self): self.prefix = '#nowplaying :' self.current_media_obj = self.media_to_objs([self.media]) self.title = self.current_media_obj[0].metadata['title'] self.artist = self.current_media_obj[0].metadata['artist'] self.title = self.title.replace('_', ' ') self.artist = self.artist.replace('_', ' ') if no...
a79f801564005a521166c0aa9af56c21c88a4050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/a79f801564005a521166c0aa9af56c21c88a4050/station.py
message = message[:107] + ' M3U: ' + self.m3u_tinyurl
message = message[:107] + ' M3U : ' + self.m3u_tinyurl
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
a79f801564005a521166c0aa9af56c21c88a4050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/a79f801564005a521166c0aa9af56c21c88a4050/station.py
self.channel.close() self.channel.open()
try: self.channel.open() except: self.logger.write_error('Station ' + self.short_name + ' : could connect to the server ') continue
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
a79f801564005a521166c0aa9af56c21c88a4050 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/a79f801564005a521166c0aa9af56c21c88a4050/station.py
media.metadata = {'artist': self.artist, 'title': self.title, 'album': self.short_name, 'genre': self.channel.genre}
media.metadata = {'artist': self.artist.encode('utf-8'), 'title': self.title.encode('utf-8'), 'album': self.short_name.encode('utf-8'), 'genre': self.channel.genre.encode('utf-8')}
def record_callback(self, path, value): value = value[0] if value == 1: self.rec_file = self.short_name + '-' + \ datetime.datetime.now().strftime("%x-%X").replace('/', '_') + '.' + self.channel.format self.recorder = Recorder(self.record_dir) self.recorder.open(self.rec_file) elif value == 0: self.recorder.close() if ...
99d0d30e0a54a51d01c1e9f1d29ff3f2bcfd0ae6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/99d0d30e0a54a51d01c1e9f1d29ff3f2bcfd0ae6/station.py
self.channel.set_metadata({'song': self.song, 'charset': 'utf8',})
self.channel.set_metadata({'song': self.song, 'charset': 'utf-8',})
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1 if self.relay_mode: self.set_relay_mode() elif os.path.exists(self.media) and not os.sep+'.' in self.media: if self.lp == 0: self.logger.write_error('Station ' + self.short_name + ' has no media to...
99d0d30e0a54a51d01c1e9f1d29ff3f2bcfd0ae6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/12047/99d0d30e0a54a51d01c1e9f1d29ff3f2bcfd0ae6/station.py
version='0.4.1',
version='0.5',
def _compile_po_files (self): data_files = []
d62ec454fb5f870cad86fc5f3c430c2b4a6437c4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/8584/d62ec454fb5f870cad86fc5f3c430c2b4a6437c4/setup.py
try: advertizer.do_advertize() self.last_error=None except glideinFrontendInterface.MultiExeError, e: self.last_error="Advertizing failed for %i requests: %s"%(len(e.arr),e) except RuntimeError, e: self.last_error="Advertizing failed: %s"%e except: tb = traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],
try: advertizer.do_advertize() self.last_error=None except glideinFrontendInterface.MultiExeError, e: self.last_error="Advertizing failed for %i requests: %s"%(len(e.arr),e) except RuntimeError, e: self.last_error="Advertizing failed: %s"%e except: tb = traceback.format_exception(sys.exc_info()[0],sys.exc_info()[1],
def request_glideins(self): # query job collector pool_status=condorMonitor.CondorStatus() pool_status.load(None,[]) running_glideins=len(pool_status.fetchStored()) del pool_status self.running_glideins=running_glideins
fe664a1249d356a153f3bcaa7d9cf20bc88bbf39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/fe664a1249d356a153f3bcaa7d9cf20bc88bbf39/glideKeeper.py
self.last_error="Advertizing failed: %s"%string.join(tb,'')
self.last_error="Advertizing failed: %s"%string.join(tb,'')
def request_glideins(self): # query job collector pool_status=condorMonitor.CondorStatus() pool_status.load(None,[]) running_glideins=len(pool_status.fetchStored()) del pool_status self.running_glideins=running_glideins
fe664a1249d356a153f3bcaa7d9cf20bc88bbf39 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/fe664a1249d356a153f3bcaa7d9cf20bc88bbf39/glideKeeper.py
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
5ef139cbbd772ffdc63d59f80f520e2cd9912ab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/5ef139cbbd772ffdc63d59f80f520e2cd9912ab9/glideTester.py
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
5ef139cbbd772ffdc63d59f80f520e2cd9912ab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/5ef139cbbd772ffdc63d59f80f520e2cd9912ab9/glideTester.py
condorSubmitFile.write('universe = ' + universe + '\n') condorSubmitFile.write('executable = ' + executable + '\n') condorSubmitFile.write('transfer_executable = ' + transfer_executable + '\n')
condorSubmitFile.write('universe = ' + universe + '\n' + 'executable = ' + executable + '\n' + 'transfer_executable = ' + transfer_executable + '\n' + 'when_to_transfer_output = ' + when_to_transfer_output + '\n' + 'Requirements = ' + requirements + '\n' + '+Owner = ' + owner + '\n' + 'log = ' + logfile + '\n' + 'outpu...
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
5ef139cbbd772ffdc63d59f80f520e2cd9912ab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/5ef139cbbd772ffdc63d59f80f520e2cd9912ab9/glideTester.py
condorSubmitFile.write('when_to_transfer_output = ' + when_to_transfer_output + '\n') condorSubmitFile.write('Requirements = ' + requirements + '\n') condorSubmitFile.write('+Owner = ' + owner + '\n') condorSubmitFile.write('log = ' + logfile + '\n') condorSubmitFile.write('output = ' + outputfile + '\n') condorSubmit...
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
5ef139cbbd772ffdc63d59f80f520e2cd9912ab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/5ef139cbbd772ffdc63d59f80f520e2cd9912ab9/glideTester.py
summDir = workingDir + '/' + startTime + '/summaries/' os.makedirs(summDir) for l in range(0, runs, 1): for k in range(0, len(concurrencyLevel), 1): results=[] hours=[] minutes=[] seconds=[] jobStartInfo=[] jobExecuteInfo=[] jobFinishInfo=[] jobStatus=[] logFile = workingDir + '/' + startTime + '/con_' + concurr...
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
5ef139cbbd772ffdc63d59f80f520e2cd9912ab9 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/5ef139cbbd772ffdc63d59f80f520e2cd9912ab9/glideTester.py
self.add_dir_obj(cWDictFile.symlinkSupport(web_stage_dir,'web',work_dir))
self.add_dir_obj(cWDictFile.symlinkSupport(web_stage_dir,os.path.join(work_dir,'web'),"web"))
def __init__(self,work_dir, web_stage_dir=None): # if None, create a web subdir in the work_dir; someone else need to copy it to the place visible by web_url if web_stage_dir==None: web_stage_dir=os.path.join(work_dir,'web') cvWDictFile.frontendMainDicts.__init__(self,work_dir,web_stage_dir, workdir_name="web",simple_w...
a4baf066d775670a1656865200355b49a69e8c31 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/a4baf066d775670a1656865200355b49a69e8c31/cgkWDictFile.py
header = "
header = "
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
c4143e46cd0128a81fa2b81752c8285d4d0ac334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/c4143e46cd0128a81fa2b81752c8285d4d0ac334/glideTester.py
writeData = str(results[i][0]) + '\t' + str(results[i][1]) + '\t\t' + str(results[i][2]) + '\t\t' + results[i][3] + '\n'
writeData = str(results[i][0]) + '\t' + str(results[i][1]) + '\t' + str(results[i][2]) + '\t' + results[i][3] + '\n'
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
c4143e46cd0128a81fa2b81752c8285d4d0ac334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/c4143e46cd0128a81fa2b81752c8285d4d0ac334/glideTester.py
times = "Concurrency Level = " + concurrencyLevel[k] + "\tExecute Time(Ave/Min/Max) = " + str(aveExeTime) + '/' + str(minExeTime) + '/' + str(maxExeTime) + "\tFinish Time(Ave/Min/Max) = " + str(aveFinTime) + "/" + str(minFinTime) + "/" + str(maxFinTime) + '\n'
times = "Concurrency_Level = " + concurrencyLevel[k] + "\t Execute_Time_(Ave/Min/Max) = " + str(aveExeTime) + '/' + str(minExeTime) + '/' + str(maxExeTime) + "\t Finish_Time_(Ave/Min/Max) = " + str(aveFinTime) + "/" + str(minFinTime) + "/" + str(maxFinTime) + '\n'
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper import condorMonitor,condorManager gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config....
c4143e46cd0128a81fa2b81752c8285d4d0ac334 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/c4143e46cd0128a81fa2b81752c8285d4d0ac334/glideTester.py
FILE.write('executable=' + executable' '\n')
FILE.write('executable=' + executable + '\n')
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
ca2f6eca52bd0078f3908248f0cc9d4106ffe81d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/ca2f6eca52bd0078f3908248f0cc9d4106ffe81d/glideTester.py
totalGlideins = int(int(concurrencyLevel[i]) + .1 * int(concurrencyLevel[i]))
requestedGlideins = int(concurrencyLevel[i]) totalGlideins = int(requestedGlideins + .1 * requestedGlideins))
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
filename = dir1 + 'submit' + '.condor'
filename = dir1 + 'submit.condor'
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
if numberGlideins = totalGlideins:
if numberGlideins = requestedGlideins:
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
while running ! ="false":
while running != "false":
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
final = [totalTime, concurrencyLevel[k]]
final = [totalTime, concurrencyLevel[i]]
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
d2c946461258f53f688b9fda43499bcf847ef650 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/d2c946461258f53f688b9fda43499bcf847ef650/glideTester.py
self.needed_glidein=needed_glideins
self.needed_glideins=needed_glideins
def request_glideins(self,needed_glideins): self.needed_glidein=needed_glideins
461be02362b906a356a91e9092fb75f0a9c5530d /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/461be02362b906a356a91e9092fb75f0a9c5530d/glideKeeper.py
factory_glidein_dict=glideinFrontendInterface.findGlideins(factory_pool_node,self.signature_type,self.factory_constraint,self.proxy_data!=None,get_only_matching=True)
factory_glidein_dict=glideinFrontendInterface.findGlideins(factory_pool_node,factory_identity,self.signature_type,self.factory_constraint,self.proxy_data!=None,get_only_matching=True)
def go_request_glideins(self): # query job collector pool_status=condorMonitor.CondorStatus() pool_status.load(None,[]) running_glideins=len(pool_status.fetchStored()) del pool_status self.running_glideins=running_glideins
e3a6d25da2ce6a5b2572b0b078b5b758290fa05b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/e3a6d25da2ce6a5b2572b0b078b5b758290fa05b/glideKeeper.py
glidein_dict[(factory_pool_node,glidename)]=factory_glidein_dict[glidename]
glidein_el=factory_glidein_dict[glidename] if not glidein_el['attrs'].has_key('PubKeyType'): continue elif glidein_el['attrs']['PubKeyType']=='RSA': try: glidein_el['attrs']['PubKeyObj']=glideinFrontendInterface.pubCrypto.PubRSAKey(str(string.replace(glidein_el['attrs']['PubKeyValue'],'\\n','\n'))) glidein_dict[(fact...
def go_request_glideins(self): # query job collector pool_status=condorMonitor.CondorStatus() pool_status.load(None,[]) running_glideins=len(pool_status.fetchStored()) del pool_status self.running_glideins=running_glideins
e3a6d25da2ce6a5b2572b0b078b5b758290fa05b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/e3a6d25da2ce6a5b2572b0b078b5b758290fa05b/glideKeeper.py
key_obj=key_builder.get_key_obj(self.classad_identity,
key_obj=key_builder.get_key_obj(self.classad_id,
def go_request_glideins(self): # query job collector pool_status=condorMonitor.CondorStatus() pool_status.load(None,[]) running_glideins=len(pool_status.fetchStored()) del pool_status self.running_glideins=running_glideins
e3a6d25da2ce6a5b2572b0b078b5b758290fa05b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/e3a6d25da2ce6a5b2572b0b078b5b758290fa05b/glideKeeper.py
glideinkeeper_id,classad_id,
glidekeeper_id,classad_id,
def __init__(self, web_url,descript_fname,descript_signature, glideinkeeper_id,classad_id, factory_pools,factory_constraint, proxy_fname): threading.Thread.__init__(self) # consts self.signature_type = "sha1" self.max_request=100
2d7f14bff482e8510e2df6a7192d0e3f6857c729 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/2d7f14bff482e8510e2df6a7192d0e3f6857c729/glideKeeper.py
gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature,
gktid=glideKeeper.GlideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature,
def run(config): import glideKeeper gktid=glideKeeper.glideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
7451602de18bd7a953198aea8e1e28a3495a0e95 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/7451602de18bd7a953198aea8e1e28a3495a0e95/glideTester.py
gktid=glideKeeper.GlideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature,
gktid=glideKeeper.GlideKeeperThread(config.webURL,self.descriptName,config.descriptSignature,
def run(config): import glideKeeper gktid=glideKeeper.GlideKeeperThread(config.webUrl,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
368838f67084ab950c64abebc38ba6ba9af47ab6 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/368838f67084ab950c64abebc38ba6ba9af47ab6/glideTester.py
for k in range(0, len(concurrencyLevel), 1): requestedGlideins = int(concurrencyLevel[k]) totalGlideins = int(requestedGlideins + .1 * requestedGlideins) gktid.request_glideins(totalGlideins)
for l in range(0, runs, 1): main_log.write("Iteration %i\n"%l) for k in range(0, len(concurrencyLevel), 1): main_log.write("Concurrency %i\n"%int(concurrencyLevel[k])) requestedGlideins = int(concurrencyLevel[k]) totalGlideins = int(requestedGlideins + .1 * requestedGlideins) gktid.request_glideins(totalGlideins)...
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config.gfactoryNode,config.gfactoryClassad...
13f77d09c8fd6f91a5c39eb71e0cc12ecb53c939 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/13f77d09c8fd6f91a5c39eb71e0cc12ecb53c939/glideTester.py
workingDir = os.getcwd() loop = 0 dir1 = workingDir + '/test' + concurrencyLevel[k] + '/' os.makedirs(dir1) logfile = workingDir + '/test' + concurrencyLevel[k] + '.log' outputfile = 'test' + concurrencyLevel[k] + '.out' errorfile = 'test' + concurrencyLevel[k] + '.err' filename = 'submit.condor' condorSubmitFile = op...
workingDir = os.getcwd() loop = 0 dir1 = workingDir + '/' + startTime + '/concurrency_' + concurrencyLevel[k] + '_run_' + str(l) + '/' os.makedirs(dir1) logfile = workingDir + '/' + startTime + '/con_' + concurrencyLevel[k] + '_run_' + str(l) + '.log' outputfile = 'concurrency_' + concurrencyLevel[k] + '.out' errorfil...
def run(config): os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI' os.environ['X509_USER_PROXY']=config.proxyFile import glideKeeper gktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature, config.runId, config.myClassadID, [(config.gfactoryNode,config.gfactoryClassad...
13f77d09c8fd6f91a5c39eb71e0cc12ecb53c939 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/13f77d09c8fd6f91a5c39eb71e0cc12ecb53c939/glideTester.py
self.gFactoryNode=val
self.gfactoryNode=val
def load_config(self): # first load file, so we check it is readable fd=open(self.config,'r') try: lines=fd.readlines() finally: fd.close()
ac39fdaf6d01f113f2781cf84820984bbcc5ef45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/ac39fdaf6d01f113f2781cf84820984bbcc5ef45/glideTester.py
self.gFactoryConstraint=val
self.gfactoryConstraint=val
def load_config(self): # first load file, so we check it is readable fd=open(self.config,'r') try: lines=fd.readlines() finally: fd.close()
ac39fdaf6d01f113f2781cf84820984bbcc5ef45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/ac39fdaf6d01f113f2781cf84820984bbcc5ef45/glideTester.py
[config.gfactoryNode],config.gFactoryConstraint,
[config.gfactoryNode],config.gfactoryConstraint,
def run(config): import glideKeeper gktid=glideKeeper.GlideKeeperThread(config.webURL,self.descriptName,config.descriptSignature, config.runId, config.gfactoryClassadID, [config.gfactoryNode],config.gFactoryConstraint, config.proxyFile) gktid.start() try: # most of the code goes here # first load the file, so we check...
ac39fdaf6d01f113f2781cf84820984bbcc5ef45 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/ac39fdaf6d01f113f2781cf84820984bbcc5ef45/glideTester.py
threading.Thread(self)
threading.Thread.__init__(self)
def __init__(self, web_url,descript_fname,descript_signature, glideinkeeper_id,classad_id, factory_pools,factory_constraint, proxy_fname): threading.Thread(self) # consts self.signature_type = "sha1" self.max_request=100
91ab4e06e3195454a1e9dfc3ae872f4f2b95885b /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/224/91ab4e06e3195454a1e9dfc3ae872f4f2b95885b/glideKeeper.py
self.assertTrue(e.time > (datetime.datetime.now() + datetime.timedelta(minutes=10)).time(), "The time on the entry is not older than 10 minutes!")
timestamp = datetime.datetime.combine(e.date, e.time) self.assertTrue(timestamp < datetime.datetime.now() - datetime.timedelta(minutes=10), "The time on the entry is not older than 10 minutes!")
def testTimeOutOfRange(self): try: e = get_object_or_404(Entry, pk=1) self.assertTrue(e.time > (datetime.datetime.now() + datetime.timedelta(minutes=10)).time(), "The time on the entry is not older than 10 minutes!") except Http404, e: self.fail("Entry 1 doesn't exist.") res = self.client.get("/undo/1") self.assertEq...
d86024742b3323b9cd80101b16b9ad3cdc4a4c0e /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/d86024742b3323b9cd80101b16b9ad3cdc4a4c0e/tests.py
return HttpResponseRedirect(reverse("program_log.views.showdaily",))
return HttpResponseRedirect(reverse("log-show-daily",))
def addentry(request,slot): s = ProgramSlot.objects.get(pk=slot) if request.POST: n = request.POST['notes'] if n == 'Description': n = '' e = Entry.objects.create(slot=s,notes=n) return HttpResponseRedirect(reverse("program_log.views.showdaily",))
1d7a234f59ac8018158af4244b3322072107c0c7 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/1d7a234f59ac8018158af4244b3322072107c0c7/views.py
return (find_name_email_pairs(row) for row in soup.findAll('tr') if row['class'].startswith('blockTableInnerRow'))
return (find_name_email_pairs(row) for row in soup.findAll('tr'))
def safe_lookup(td): try: return td.a.string.strip().lower() except: return td.string.strip().title()
435e4592f70fb559a32f5b520940ca8a8cfa7063 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/435e4592f70fb559a32f5b520940ca8a8cfa7063/import_user_list.py
prog.refresh_feed()
try: prog.refresh_feed() except: pass
def feed(request, program, feed): prog = get_object_or_404(ProgrammingFeed, pk=feed) prog.refresh_feed() ret = {"feed": prog, "program":program, "entries":prog.programmingaudio_set.all()} return render_to_response("programming/sciam.html", ret, context_instance=RequestContext(request))
93038c522836bcfffaf68abea1c54f5ea40a7ec4 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/93038c522836bcfffaf68abea1c54f5ea40a7ec4/views.py
slots = ProgramSlot.objects.filter(time__start__gte=now).select_related('program', 'time')
slots = ProgramSlot.objects.filter(active=True, time__start__gte=now).select_related('program', 'time')
def next_n_hours(n): now = datetime.now().time() now = time(now.hour) end_hour = now.hour + n end = now.replace(hour=end_hour%24)
4d1862aa1f64db2806f2490069c436df88550740 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/4d1862aa1f64db2806f2490069c436df88550740/models.py
other = ProgramSlot.objects.filter(time__end__lte=end).order_by('time__start')
other = ProgramSlot.objects.filter(active=True, time__end__lte=end).order_by('time__start')
def next_n_hours(n): now = datetime.now().time() now = time(now.hour) end_hour = now.hour + n end = now.replace(hour=end_hour%24)
4d1862aa1f64db2806f2490069c436df88550740 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/4d1862aa1f64db2806f2490069c436df88550740/models.py
def db_restart():
def local_db_restart():
def db_restart(): "Delete and rebuild database on the local" with settings(warn_only=True): local("rm kelpdb") local("python2.6 manage.py syncdb") local("python2.6 manage.py loaddata fixtures/*")
d17cd9688353b6db1135946f0f568dd0cd10eb51 /local1/tlutelli/issta_data/temp/all_python//python/2010_temp/2010/14634/d17cd9688353b6db1135946f0f568dd0cd10eb51/fabfile.py