bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
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...
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...
463,800
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...
def set_tags(self, tags, transaction_ids = []): ''' 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) ...
463,801
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...
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...
463,802
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....
def set_text(self, text, transaction_ids = []): ''' 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.d...
463,803
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....
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]: result = self.rtm.tasksNotes.delete(timelin...
463,804
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....
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....
463,805
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...
def set_due_date(self, due, transaction_ids = []): ''' 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, \ du...
463,806
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...
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...
463,807
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...
defsendTask(self,task):"""Sendagtgtasktohamster-applet"""iftaskisNone:returngtg_title=task.get_title()gtg_tags=tags=[t.lstrip('@').lower()fortintask.get_tags_name()]activity="Other"ifself.preferences['activity']=='tag':hamster_activities=set([unicode(x[0]).lower()forxinself.hamster.GetActivities()])activity_candidates=...
463,808
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...
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...
463,809
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...
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...
463,810
def _init_accelerators(self):
def_init_accelerators(self):
463,811
def _init_accelerators(self):
def _init_accelerators(self):
463,812
def _init_accelerators(self):
def _init_accelerators(self):
463,813
def _init_accelerators(self):
def _init_accelerators(self):
463,814
def _init_accelerators(self):
def _init_accelerators(self):
463,815
def _init_accelerators(self):
def _init_accelerators(self):
463,816
def _init_accelerators(self):
def _init_accelerators(self):
463,817
def general_refresh(self): if self.logger: self.logger.debug("Trigger refresh on taskbrowser.") self.tag_modelfilter.refilter() self.task_modelfilter.refilter()
def general_refresh(self): if self.logger: self.logger.debug("Trigger refresh on taskbrowser.") self.tag_modelfilter.refilter() self.task_modelfilter.refilter()
463,818
def main(self):
def main(self):
463,819
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...
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...
463,820
def update_task(self, tid,paths,data=None):
def update_task(self, tid,paths,data=None):
463,821
def configure_dialog(self, plugin_api): self.on_geolocalized_preferences(plugin_api)
def configure_dialog(self, plugin_api, manager_dialog): self.on_geolocalized_preferences(plugin_api)
463,822
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
463,823
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
def _fill_top_hbox(self, hbox): ''' Helper function to fill an hbox with an image, a spinner and three labels
463,824
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...
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...
463,825
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...
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...
463,826
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...
defon_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=Falseentry_text=tag_entry.get_text()entry_text=[entry_text.strip()]#Setupawarningmessageiftheuserleavesthetexte...
463,827
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:
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:
463,828
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:
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:
463,829
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...
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...
463,830
def write_tags(self): """Write all ID3v2.4 tags by mapping dub2id3_dict dictionnary with the respect of mutagen classes and methods"""
def write_tags(self): """Write all ID3v2.4 tags by mapping dub2id3_dict dictionnary with the respect of mutagen classes and methods"""
463,831
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...
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...
463,832
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...
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...
463,833
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
def get_file_metadata(self): metadata = {} for key in self.keys2id3.keys(): try: metadata[key] = self.mp3[key][0] except: metadata[key] = '' return metadata
463,834
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
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
463,835
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()
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()
463,836
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
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
463,837
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
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
463,838
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
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
463,839
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)
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)
463,840
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()
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()
463,841
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...
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...
463,842
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
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
463,843
def __init__(self, username, password): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
def __init__(self, access_token_key, access_token_secret): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
463,844
def __init__(self, username, password): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
def __init__(self, username, password): import twitter self.username = username self.password = password self.api = twitter.Api(username=self.username, password=self.password)
463,845
def post(self, message): try: self.api.PostUpdate(message) except: pass
defpost(self,message):try:self.api.PostUpdate(message)except:pass
463,846
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)
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)
463,847
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] + ' ' ...
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] + ' ' ...
463,848
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
defrun(self):whileself.run_mode:self.q.get(1)self.next_media=0self.media=self.get_next_media()self.counter+=1
463,849
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
def run(self): while self.run_mode: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
463,850
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
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
463,851
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)
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)
463,852
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()
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()
463,853
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...
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...
463,854
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
463,855
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
def run(self): while True: self.q.get(1) self.next_media = 0 self.media = self.get_next_media() self.counter += 1
463,856
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 ...
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 ...
463,857
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...
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...
463,858
def _compile_po_files (self): data_files = []
def _compile_po_files (self): data_files = []
463,859
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
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
463,860
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
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
463,861
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....
defrun(config):os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI'os.environ['X509_USER_PROXY']=config.proxyFileimportglideKeeperimportcondorMonitor,condorManagergktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature,config.runId,config.myClassadID,[(config.gfactoryNod...
463,862
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....
defrun(config):os.environ['_CONDOR_SEC_DEFAULT_AUTHENTICATION_METHODS']='GSI'os.environ['X509_USER_PROXY']=config.proxyFileimportglideKeeperimportcondorMonitor,condorManagergktid=glideKeeper.GlideKeeperThread(config.webURL,config.descriptFile,config.descriptSignature,config.runId,config.myClassadID,[(config.gfactoryNod...
463,863
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....
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....
463,864
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....
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....
463,865
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....
def 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_' + conc...
463,866
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...
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...
463,867
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....
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....
463,868
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....
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....
463,869
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....
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....
463,870
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...
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...
463,871
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...
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...
463,872
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...
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...
463,873
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...
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...
463,874
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...
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...
463,875
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...
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...
463,876
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...
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...
463,877
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...
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...
463,878
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...
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...
463,879
def request_glideins(self,needed_glideins): self.needed_glidein=needed_glideins
def request_glideins(self,needed_glideins): self.needed_glidein=needed_glideins
463,880
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
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
463,881
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
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
463,882
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
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
463,883
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
def __init__(self, web_url,descript_fname,descript_signature, glidekeeper_id,classad_id, factory_pools,factory_constraint, proxy_fname): threading.Thread.__init__(self) # consts self.signature_type = "sha1" self.max_request=100
463,884
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...
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...
463,885
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...
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...
463,886
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...
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...
463,887
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...
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...
463,888
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()
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()
463,889
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()
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()
463,890
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...
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...
463,891
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
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
463,892
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...
def testTimeOutOfRange(self): try: e = get_object_or_404(Entry, pk=1) 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!") except Http404, e: self.fail("Entry 1 doesn't exist.") ...
463,893
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",))
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("log-show-daily",))
463,894
def safe_lookup(td): try: return td.a.string.strip().lower() except: return td.string.strip().title()
def safe_lookup(td): try: return td.a.string.strip().lower() except: return td.string.strip().title()
463,895
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))
def feed(request, program, feed): prog = get_object_or_404(ProgrammingFeed, pk=feed) try: prog.refresh_feed() except: pass ret = {"feed": prog, "program":program, "entries":prog.programmingaudio_set.all()} return render_to_response("programming/sciam.html", ret, context_instance=RequestContext(request))
463,896
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)
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)
463,897
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)
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)
463,898
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/*")
def local_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/*")
463,899