bugged
stringlengths
4
228k
fixed
stringlengths
0
96.3M
__index_level_0__
int64
0
481k
def closeRequest(self, workflowFile): """ _closeRequest_
def closeRequest(self, workflowFile): """ _closeRequest_
465,500
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,501
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,502
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
def main(argv) : """ prepareRelValworkflows prepare workflows for chained processing of RelVal samples - parse file holding cmsDriver commands for 1st and 2nd steps - prepare workflows - prepare WorkflowInjector:Input script - prepare ForceMerge script - prepare DBSMigrationToGlobal script - prepare PhEDExInjection ...
465,503
def publishStatusToDashboard(self, jobSpecId, data): """ _publishStatusToDashboard_
def publishStatusToDashboard(self, jobSpecId, data): """ _publishStatusToDashboard_
465,504
def __init__(self, stagein=False): StageOutImpl.__init__(self, stagein) self.numRetries = 5 self.retryPause = 300
def __init__(self, stagein=False): StageOutImpl.__init__(self, stagein) self.numRetries = 5 self.retryPause = 300
465,505
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,506
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,507
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,508
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,509
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
def createOutputDirectory(self, targetPFN): """ _createOutputDirectory_
465,510
def createDir(self, directory, mode): """ _createDir_
def checkDirExists(self, directory): """ _checkDirExists_ Check if directory exists (will fail if it exists as a file) """ command = "rfstat %s 2> /dev/null | grep Protection" % directory print "Check dir existence : %s" % command try: exitCode, output = runCommandWithOutput(command) except Exception, ex: msg = "Erro...
465,511
def createDir(self, directory, mode): """ _createDir_
def createDir(self, directory, mode): """ _createDir_
465,512
def setFileClass(self, directory, fileclass): """ _setFileClass_
defsetFileClass(self,directory,fileclass):"""_setFileClass_
465,513
def httpPost(self, analysisFile): """ _httpPost_
def httpPost(self, analysisFile): """ _httpPost_
465,514
def httpPost(self, analysisFile): """ _httpPost_
def httpPost(self, analysisFile): """ _httpPost_
465,515
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """ project_toolbar = gtk.Toolbar() custom_slide_toolbar = gtk.Toolbar() custom_stator_toolbar = gtk.Toolbar() edit_toolbar = gtk.Toolbar()
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """ project_toolbar = gtk.Toolbar() custom_slide_toolbar = gtk.Toolbar() custom_stator_toolbar = gtk.Toolbar() edit_toolbar = gtk.Toolbar()
465,516
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """ project_toolbar = gtk.Toolbar() custom_slide_toolbar = gtk.Toolbar() custom_stator_toolbar = gtk.Toolbar() edit_toolbar = gtk.Toolbar()
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """ project_toolbar = gtk.Toolbar() custom_slide_toolbar = gtk.Toolbar() custom_stator_toolbar = gtk.Toolbar() edit_toolbar = gtk.Toolbar()
465,517
def _copy_cb(self, arg=None): """ Copy a number to the clipboard from the active slide. """ clipBoard = gtk.Clipboard() if self.sr.last is not None: data = self.sr.last.labels[0] if data is not None: clipBoard.set_text(str(data)) return
def _copy_cb(self, arg=None): """ Copy a number to the clipboard from the active slide. """ clipBoard = gtk.Clipboard() if self.sr.last is None and self.sr.last.labels[0] is not None: clipBoard.set_text(self.sr.last.labels[0]) return
465,518
def _show_slides(self, top, bottom, function): self._hide_all() self._top_combo.set_active(_SLIDES.index(top)) self.set_slide() self._bottom_combo.set_active(_STATORS.index(bottom)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_label()
def _show_slides(self, slide, stator, function): self._hide_all() self._top_combo.set_active(_SLIDES.index(top)) self.set_slide() self._bottom_combo.set_active(_STATORS.index(bottom)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_label...
465,519
def _show_slides(self, top, bottom, function): self._hide_all() self._top_combo.set_active(_SLIDES.index(top)) self.set_slide() self._bottom_combo.set_active(_STATORS.index(bottom)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_label()
def _show_slides(self, top, bottom, function): self._hide_all() self._slide_combo.set_active(_SLIDES.index(slide)) self.set_slide() self._bottom_combo.set_active(_STATORS.index(bottom)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_lab...
465,520
def _show_slides(self, top, bottom, function): self._hide_all() self._top_combo.set_active(_SLIDES.index(top)) self.set_slide() self._bottom_combo.set_active(_STATORS.index(bottom)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_label()
def _show_slides(self, top, bottom, function): self._hide_all() self._top_combo.set_active(_SLIDES.index(top)) self.set_slide() self._stator_combo.set_active(_STATORS.index(stator)) self.set_stator() self._function_combo.set_active(_FUNCTIONS.index(function)) self.sr.update_slide_labels() self.sr.update_results_label()
465,521
def show_l(self): """ linear scale """ self.sr.active_slide = self.sr.name_to_slide('L') self.sr.active_stator = self.sr.name_to_stator('L2') self._show_slides(_L, _L2, _FL)
def show_l(self): """ linear scale """ self.sr.active_slide = self.sr.name_to_slide('L') self.sr.active_stator = self.sr.name_to_stator('L2') self._show_slides(_L, _L2, _FL)
465,522
def _top_combo_cb(self, arg=None): """ Read value from slide combo box """ _top_dictionary = {_C: 'C', _CI: 'CI', _A: 'A', _K: 'K', _S: 'S', _T: 'T', _L: 'L', _LL0: 'LL0', _LLn: 'LLn', _UD: 'custom'} self.sr.active_slide = self.sr.name_to_slide(_top_dictionary[ _SLIDES[self._top_combo.get_active()]]) function = self._p...
def _slide_combo_cb(self, arg=None): """ Read value from slide combo box """ _top_dictionary = {_C: 'C', _CI: 'CI', _A: 'A', _K: 'K', _S: 'S', _T: 'T', _L: 'L', _LL0: 'LL0', _LLn: 'LLn', _UD: 'custom'} self.sr.active_slide = self.sr.name_to_slide(_top_dictionary[ _SLIDES[self._top_combo.get_active()]]) function = self....
465,523
def _top_combo_cb(self, arg=None): """ Read value from slide combo box """ _top_dictionary = {_C: 'C', _CI: 'CI', _A: 'A', _K: 'K', _S: 'S', _T: 'T', _L: 'L', _LL0: 'LL0', _LLn: 'LLn', _UD: 'custom'} self.sr.active_slide = self.sr.name_to_slide(_top_dictionary[ _SLIDES[self._top_combo.get_active()]]) function = self._p...
def _top_combo_cb(self, arg=None): """ Read value from slide combo box """ _top_dictionary = {_C: 'C', _CI: 'CI', _A: 'A', _K: 'K', _S: 'S', _T: 'T', _L: 'L', _LL0: 'LL0', _LLn: 'LLn', _UD: 'custom'} self.sr.active_slide = self.sr.name_to_slide(_top_dictionary[ _SLIDES[self._slide_combo.get_active()]]) function = self....
465,524
def _bottom_combo_cb(self, arg=None): """ Read value from stator combo box """ _bottom_dictionary = {_D: 'D', _DI: 'DI', _L: 'L2', _B: 'B', _K: 'K2', _S: 'S2', _T: 'T2', _LL0: 'LL02', _LLn: 'LLn2', _UD: 'custom2'} self.sr.active_stator = self.sr.name_to_stator(_bottom_dictionary[ _STATORS[self._bottom_combo.get_active(...
def _stator_combo_cb(self, arg=None): """ Read value from stator combo box """ _bottom_dictionary = {_D: 'D', _DI: 'DI', _L: 'L2', _B: 'B', _K: 'K2', _S: 'S2', _T: 'T2', _LL0: 'LL02', _LLn: 'LLn2', _UD: 'custom2'} self.sr.active_stator = self.sr.name_to_stator(_bottom_dictionary[ _STATORS[self._bottom_combo.get_active(...
465,525
def _bottom_combo_cb(self, arg=None): """ Read value from stator combo box """ _bottom_dictionary = {_D: 'D', _DI: 'DI', _L: 'L2', _B: 'B', _K: 'K2', _S: 'S2', _T: 'T2', _LL0: 'LL02', _LLn: 'LLn2', _UD: 'custom2'} self.sr.active_stator = self.sr.name_to_stator(_bottom_dictionary[ _STATORS[self._bottom_combo.get_active(...
def _bottom_combo_cb(self, arg=None): """ Read value from stator combo box """ _bottom_dictionary = {_D: 'D', _DI: 'DI', _L: 'L2', _B: 'B', _K: 'K2', _S: 'S2', _T: 'T2', _LL0: 'LL02', _LLn: 'LLn2', _UD: 'custom2'} self.sr.active_stator = self.sr.name_to_stator(_bottom_dictionary[ _STATORS[self._stator_combo.get_active(...
465,526
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """
465,527
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """
def _setup_toolbars(self, have_toolbox): """ Setup the toolbars.. """
465,528
def find_sprite(self, pos): list = self.list list.reverse() for spr in list: if spr.hit(pos): return spr return None
def find_sprite(self, pos): list = self.list[:] list.reverse() for spr in list: if spr.hit(pos): return spr return None
465,529
def _copy_cb(self, arg=None): """ Copy a number to the clipboard from the active slide. """ clipBoard = gtk.Clipboard() if self.sr.last is None and self.sr.last.labels[0] is not None: clipBoard.set_text(self.sr.last.labels[0]) return
def _copy_cb(self, arg=None): """ Copy a number to the clipboard from the active slide. """ clipBoard = gtk.Clipboard() if self.sr.last is not None and self.sr.last.labels[0] is not None: clipBoard.set_text(self.sr.last.labels[0]) return
465,530
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except Value...
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._domain_min[slide].set_text('NaN') return try: max_value = float(max_text) exce...
465,531
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except Value...
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except Value...
465,532
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except Value...
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text, slide): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except Value...
465,533
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if string is not None: svg += ' <text style="font-s...
465,534
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: log = (log10 - offset) * SCALE * scale + OFFSET else: log = offset * SCALE * scale + OFFSET if str...
465,535
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
465,536
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
465,537
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12px;fill:#0000ff;">\n' svg += ' <tspan\n...
465,538
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: log = (log10 - offset) * SCALE * scale + OFFSET else: log = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:...
465,539
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
465,540
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
def special_mark(self, offset, height3, height2, height1, string, flip=False, scale=1.0): """ Plot special marks, e.g., e and pi """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET svg += ' <text style="font-size:12...
465,541
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if string is not None: svg += ' <text style="font-s...
465,542
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' scale *= float(SWIDTH - 2 * OFFSET) / SCALE if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if strin...
def mark(self, offset, height3, height2, height1, string=None, flip=False, scale=1.0): """ Plot marks in a range from 1 to 10 along the length of the slide """ svg = '' if flip: ln = (log10 - offset) * SCALE * scale + OFFSET else: ln = offset * SCALE * scale + OFFSET if string is not None: svg += ' <text style="font-s...
465,543
def label_function(x): return math.exp(x / 1000.)
def label_function(x): return math.exp(x / 1000.)
465,544
def round(x, precision=2): if precision == 2: return(float(int(x * 100 + 0.5) / 100.)) elif precision == 1: return(float(int(x * 10 + 0.5) / 10.)) elif precision == 0: return(int(x + 0.5)) else: y = math.pow(10, precision) return(float(int(x * y + 0.5) / y))
def round(x, precision=2): if precision == 2: return(float(int(x * 100 + 0.5) / 100.)) elif precision == 1: return(float(int(x * 10 + 0.5) / 10.)) elif precision == 0: return(int(x + 0.5)) else: y = pow(10, precision) return(float(int(x * y + 0.5) / y))
465,545
def _calc_log(dx): """ C and D scales """ rescale = 1 if dx < 0: rescale = 0.1 dx += SWIDTH - (2.0 * OFFSET) return round(math.exp(dx / SCALE) * rescale)
def _calc_log(dx): """ C and D scales """ rescale = 1 if dx < 0: rescale = 0.1 dx += SWIDTH - (2.0 * OFFSET) return round(exp(dx / SCALE) * rescale)
465,546
def _calc_inverse_log(dx): """ CI and DI scales """ rescale = 1 if dx < 0: rescale = 0.1 dx += SWIDTH - (2.0 * OFFSET) return round(10.0/ math.exp(dx / SCALE) * rescale)
def _calc_inverse_log(dx): """ CI and DI scales """ rescale = 1 if dx < 0: rescale = 0.1 dx += SWIDTH - (2.0 * OFFSET) return round(10.0 / exp(dx / SCALE) * rescale)
465,547
def _calc_log_squared(dx): """ A and B scales """ rescale = 1 if dx < 0: dx += SWIDTH - (2.0 * OFFSET) rescale = 0.01 A = math.exp(2 * dx / SCALE) * rescale if A > 50: return round(A, 1) else: return round(A)
def _calc_log_squared(dx): """ A and B scales """ rescale = 1 if dx < 0: dx += SWIDTH - (2.0 * OFFSET) rescale = 0.01 A = exp(2 * dx / SCALE) * rescale if A > 50: return round(A, 1) else: return round(A)
465,548
def _calc_log_cubed(dx): """ K scale """ rescale = 1 if dx < 0: rescale = 0.001 dx += SWIDTH - (2.0 * OFFSET) K = math.exp(3 * dx / SCALE) * rescale if K > 500: return round(K, 0) elif K > 50: return round(K, 1) else: return round(K)
def _calc_log_cubed(dx): """ K scale """ rescale = 1 if dx < 0: rescale = 0.001 dx += SWIDTH - (2.0 * OFFSET) K = exp(3 * dx / SCALE) * rescale if K > 500: return round(K, 0) elif K > 50: return round(K, 1) else: return round(K)
465,549
def _calc_log_log(dx): """ LL0 scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) LL0 = math.exp(math.exp(dx / SCALE) / 1000) if LL0 > 1.002: return round(LL0, 5) else: return round(LL0, 6)
def _calc_log_log(dx): """ LL0 scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) LL0 = exp(exp(dx / SCALE) / 1000) if LL0 > 1.002: return round(LL0, 5) else: return round(LL0, 6)
465,550
def _calc_linear(dx): """ L scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) return round(10 * ((dx / SCALE) / math.log(10) - 1.0)) else: return round(10 * (dx / SCALE) / math.log(10))
def _calc_linear(dx): """ L scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) return round(10 * ((dx / SCALE) / log(10) - 1.0)) else: return round(10 * (dx / SCALE) / math.log(10))
465,551
def _calc_linear(dx): """ L scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) return round(10 * ((dx / SCALE) / math.log(10) - 1.0)) else: return round(10 * (dx / SCALE) / math.log(10))
def _calc_linear(dx): """ L scale """ if dx < 0: dx += SWIDTH - (2.0 * OFFSET) return round(10 * ((dx / SCALE) / math.log(10) - 1.0)) else: return round(10 * (dx / SCALE) / log(10))
465,552
def _calc_sine(dx): """ S scale """ dx /= SCALE s = math.exp(dx)/10 if s > 1.0: s = 1.0 S = 180.0 * math.asin(s) / math.pi if S > 60: return round(S, 1) else: return round(S)
def _calc_sine(dx): """ S scale """ dx /= SCALE s = exp(dx)/10 if s > 1.0: s = 1.0 S = 180.0 * math.asin(s) / math.pi if S > 60: return round(S, 1) else: return round(S)
465,553
def _calc_sine(dx): """ S scale """ dx /= SCALE s = math.exp(dx)/10 if s > 1.0: s = 1.0 S = 180.0 * math.asin(s) / math.pi if S > 60: return round(S, 1) else: return round(S)
def _calc_sine(dx): """ S scale """ dx /= SCALE s = math.exp(dx)/10 if s > 1.0: s = 1.0 S = 180.0 * asin(s) / pi if S > 60: return round(S, 1) else: return round(S)
465,554
def _calc_tangent(dx): """ T scale """ dx /= SCALE t = math.exp(dx)/10 if t > 1.0: t = 1.0 return round(180.0 * math.atan(t) / math.pi)
def _calc_tangent(dx): """ T scale """ dx /= SCALE t = exp(dx)/10 if t > 1.0: t = 1.0 return round(180.0 * math.atan(t) / math.pi)
465,555
def _calc_tangent(dx): """ T scale """ dx /= SCALE t = math.exp(dx)/10 if t > 1.0: t = 1.0 return round(180.0 * math.atan(t) / math.pi)
def _calc_tangent(dx): """ T scale """ dx /= SCALE t = math.exp(dx)/10 if t > 1.0: t = 1.0 return round(180.0 * atan(t) / pi)
465,556
def __init__(self, canvas, path, parent=None): """ Handle launch from both within and without of Sugar environment. """ SLIDES = {'C':[C_slide, self._calc_C], 'CI':[CI_slide, self._calc_CI], 'A':[A_slide, self._calc_A], 'K':[K_slide, self._calc_K], 'S':[S_slide, self._calc_S], 'T':[T_slide, self._calc_T], 'L':[L_slide,...
def __init__(self, canvas, path, parent=None): """ Handle launch from both within and without of Sugar environment. """ SLIDES = {'C':[C_slide, self._calc_C], 'CI':[CI_slide, self._calc_CI], 'A':[A_slide, self._calc_A], 'K':[K_slide, self._calc_K], 'S':[S_slide, self._calc_S], 'T':[T_slide, self._calc_T], 'L':[L_slide,...
465,557
def __init__(self, canvas, path, parent=None): """ Handle launch from both within and without of Sugar environment. """ SLIDES = {'C':[C_slide, self._calc_C], 'CI':[CI_slide, self._calc_CI], 'A':[A_slide, self._calc_A], 'K':[K_slide, self._calc_K], 'S':[S_slide, self._calc_S], 'T':[T_slide, self._calc_T], 'L':[L_slide,...
def __init__(self, canvas, path, parent=None): """ Handle launch from both within and without of Sugar environment. """ SLIDES = {'C':[C_slide, self._calc_C], 'CI':[CI_slide, self._calc_CI], 'A':[A_slide, self._calc_A], 'K':[K_slide, self._calc_K], 'S':[S_slide, self._calc_S], 'T':[T_slide, self._calc_T], 'L':[L_slide,...
465,558
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k == 'a': self.parent.show_a() elif k == 'k': self.parent.show_k() elif k == 'c' or k == 'asterisk' or k == 'x': self.parent.show_c() elif k == 'i': self.p...
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k in ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'period', 'minus', 'Return', 'BackSpace']: if self.reticule.match(self.last): if self.last == self....
465,559
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k == 'a': self.parent.show_a() elif k == 'k': self.parent.show_k() elif k == 'c' or k == 'asterisk' or k == 'x': self.parent.show_c() elif k == 'i': self.p...
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k == 'a': self.parent.show_a() elif k == 'k': self.parent.show_k() elif k == 'c' or k == 'asterisk' or k == 'x': self.parent.show_c() elif k == 'i': self.p...
465,560
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k == 'a': self.parent.show_a() elif k == 'k': self.parent.show_k() elif k == 'c' or k == 'asterisk' or k == 'x': self.parent.show_c() elif k == 'i': self.p...
def _keypress_cb(self, area, event): """ Keypress: moving the slides with the arrow keys """ k = gtk.gdk.keyval_name(event.keyval) if self.parent == None: return if k == 'a': self.parent.show_a() elif k == 'k': self.parent.show_k() elif k == 'c' or k == 'asterisk' or k == 'x': self.parent.show_c() elif k == 'i': self.p...
465,561
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.parent....
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min_value = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.p...
465,562
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.parent....
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max_value = float(max_text) except ValueError: self.p...
465,563
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.parent....
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.parent....
465,564
def make_custom_slide(self, offset_text, label_text, calculate_text, min_text, max_text, step_text): """ Create custom slide and stator from text entered on toolbar. """ try: min = float(min_text) except ValueError: self.parent._min_entry.set_text('NaN') return try: max = float(max_text) except ValueError: self.parent....
defmake_custom_slide(self,offset_text,label_text,calculate_text,min_text,max_text,step_text):"""Createcustomslideandstatorfromtextenteredontoolbar."""try:min=float(min_text)exceptValueError:self.parent._min_entry.set_text('NaN')returntry:max=float(max_text)exceptValueError:self.parent._max_entry.set_text('NaN')returntr...
465,565
myf = "def f(x): return " + label_text.replace('import','')
myf = "def f(x): return " + label_text.replace('import','')
465,566
myf = "def f(x): return " + label_text.replace('import','')
myf = "def f(x): return " + label_text.replace('import','')
465,567
def _update_top(self, function): v_left = function() if self.active_stator.name == 'L2': v_right = 10 + v_left elif self.active_stator.name == 'D': v_right = v_left * 10. elif self.active_stator.name == 'B': v_right = v_left * 100. elif self.active_stator.name == 'K2': v_right = v_left * 1000. elif self.active_stator.n...
def _update_top(self, function): v_left = function() if self.active_stator.name == 'L2': v_right = 10 + v_left elif self.active_stator.name == 'D': v_right = v_left * 10. elif self.active_stator.name == 'B': v_right = v_left * 100. elif self.active_stator.name == 'K2': v_right = v_left * 1000. elif self.active_stator.n...
465,568
def header(): c.slackslog = request.POST if ('submit' in request.POST and request.POST['submit'] == _gettext('Search')): redirect( url( controller = 'root', action = 'template', templatefile = 'docs', parameter1 = request.POST['search'].replace(' ', '').lower() ), code = 303 ) c.loop.languages = { 'ch': { 'title': u'中文...
def header(): c.slackslog = request.POST if ('submit' in request.POST and request.POST['submit'] == _gettext('Search')): redirect( url( controller = 'root', action = 'template', templatefile = 'docs', parameter1 = request.POST['search'].replace(' ', '').lower() ), code = 303 ) c.loop.languages = { 'es': { 'title': u'Es...
465,569
def header(): c.slackslog = request.POST if ('submit' in request.POST and request.POST['submit'] == _gettext('Search')): redirect( url( controller = 'root', action = 'template', templatefile = 'docs', parameter1 = request.POST['search'].replace(' ', '').lower() ), code = 303 ) c.loop.languages = { 'ch': { 'title': u'中文...
def header(): c.slackslog = request.POST if ('submit' in request.POST and request.POST['submit'] == _gettext('Search')): redirect( url( controller = 'root', action = 'template', templatefile = 'docs', parameter1 = request.POST['search'].replace(' ', '').lower() ), code = 303 ) c.loop.languages = { 'ch': { 'title': u'中文...
465,570
def format(string): string = templating.getvariable(string, '.', c) return escape(json.dumps(string, sort_keys=True, indent=4))
def format(string): string = templating.getvariable(string, '.', c) return json.dumps(string, sort_keys=True, indent=4)
465,571
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
465,572
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
465,573
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
def docs(): c.loop.articles = [ { 'articles': [ { 'title': 'Getting Started', 'url': 'gettingstarted' }, { 'title': 'Comparison of SUIT to its Alternatives', 'url': 'comparison' }, { 'title': 'Features', 'url': 'features' }, { 'title': 'Reading Docs', 'url': 'readingdocs' }, { 'title': 'Rules', 'url': 'rules' }, { 'tit...
465,574
def __init__(self, context, request): super(BlockView, self).__init__(context, request) self.portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state') self.sl_portal_url = self.portal_state.portal_url() blockconf = IBlockConfig(self.context) self.image_layout = blockconf.image_layout
def __init__(self, context, request): super(BlockView, self).__init__(context, request) self.portal_state = getMultiAdapter((self.context, self.request), name=u'plone_portal_state') self.sl_portal_url = self.portal_state.portal_url() blockconf = IBlockConfig(self.context) self.image_layout = blockconf.image_layout
465,575
def getBlockHeight(self): blockconf = IBlockConfig(self.context) return blockconf.block_height or ''
def getBlockHeight(self): blockconf = IBlockConfig(self.context) return blockconf.block_height or ''
465,576
def getImageTag(self): alt = unicode(self.context.getImageAltText(), self.context.getCharset()) title = unicode(self.context.getImageCaption(), self.context.getCharset())
def def image_wrapper_style(self): """ sets width of the div wrapping the image, so the caption linebreaks """ blockconf = IBlockConfig(self.context) width, height = blockconf.image_dimension return "width: %spx" % width getImageTag(self): def image_wrapper_style(self): """ sets width of the div wrapping the image, s...
465,577
def render_timeline_event(self, context, field, event): changesets, show_location, show_files = event[3] cset, cset_resource, repos_for_uid = changesets[0] message = cset.message or '' reponame = cset_resource.parent.id rev_b, rev_a = cset.rev, cset.rev #? FIXME
def render_timeline_event(self, context, field, event): changesets, show_location, show_files = event[3] cset, cset_resource, repos_for_uid = changesets[0] message = cset.message or '' reponame = cset_resource.parent.id rev_b, rev_a = cset.rev, cset.rev #? FIXME
465,578
def expand_macro(self, formatter, name, content): min_depth, max_depth = 1, 6 title = None inline = 0 if content: argv = [arg.strip() for arg in content.split(',')] if len(argv) > 0: depth = argv[0] if '-' in depth: min_depth, max_depth = [int(d) for d in depth.split('-', 1)] else: min_depth = max_depth = int(depth) if...
def expand_macro(self, formatter, name, content): min_depth, max_depth = 1, 6 title = None inline = 0 if content: argv = [arg.strip() for arg in content.split(',')] if len(argv) > 0: depth = argv[0] if '-' in depth: min_depth, max_depth = [int(d) for d in depth.split('-', 1)] else: min_depth = max_depth = int(depth) if...
465,579
def expand_macro(self, formatter, name, content): # args will be null if the macro is called without parenthesis. if not content: return '' # parse arguments # we expect the 1st argument to be a filename (filespec) args = content.split(',') if len(args) == 0: raise Exception("No argument.") filespec = args.pop(0)
def expand_macro(self, formatter, name, content): # args will be null if the macro is called without parenthesis. if not content: return '' # parse arguments # we expect the 1st argument to be a filename (filespec) args = content.split(',') if len(args) == 0: raise Exception("No argument.") filespec = args.pop(0)
465,580
def expand_macro(self, formatter, name, content): # args will be null if the macro is called without parenthesis. if not content: return '' # parse arguments # we expect the 1st argument to be a filename (filespec) args = content.split(',') if len(args) == 0: raise Exception("No argument.") filespec = args.pop(0)
def expand_macro(self, formatter, name, content): # args will be null if the macro is called without parenthesis. if not content: return '' # parse arguments # we expect the 1st argument to be a filename (filespec) args = content.split(',') if len(args) == 0: raise Exception("No argument.") filespec = args.pop(0)
465,581
def _dispatch_request(req, env, env_error): resp = [] # fixup env.abs_href if `[trac] base_url` was not specified if env and not env.abs_href.base: env._abs_href = req.abs_href try: if not env and env_error: raise HTTPInternalError(env_error) try: dispatcher = RequestDispatcher(env) dispatcher.dispatch(req) except Re...
def _dispatch_request(req, env, env_error): resp = [] # fixup env.abs_href if `[trac] base_url` was not specified if env and not env.abs_href.base: env._abs_href = req.abs_href try: if not env and env_error: raise HTTPInternalError(env_error) try: dispatcher = RequestDispatcher(env) dispatcher.dispatch(req) except Re...
465,582
def render_ticket_action_control(self, req, ticket, action):
def render_ticket_action_control(self, req, ticket, action):
465,583
def _sync(self, reponame, rev, clean): rm = RepositoryManager(self.env) if reponame == '*': if rev is not None: raise TracError(_('Cannot synchronize a single revision ' 'on multiple repositories')) repositories = rm.get_real_repositories() else: if is_default(reponame): reponame = '' repos = rm.get_repository(reponame...
def _sync(self, reponame, rev, clean): rm = RepositoryManager(self.env) if reponame == '*': if rev is not None: raise TracError(_('Cannot synchronize a single revision ' 'on multiple repositories')) repositories = rm.get_real_repositories() else: if is_default(reponame): reponame = '' repos = rm.get_repository(reponame...
465,584
def __new__(mcs, name, bases, d): """Create the component class."""
def __new__(mcs, name, bases, d): """Create the component class."""
465,585
def maybe_init(self, compmgr, init=init, cls=new_class): if cls not in compmgr.components: compmgr.components[cls] = self if init: try: init(self) except: del compmgr.components[cls] raise
def maybe_init(self, compmgr, init=init, cls=new_class): if cls not in compmgr.components: compmgr.components[cls] = self if init: try: init(self) except: del compmgr.components[cls] raise
465,586
def _prep_session_table(db, spread_visits=False): """ Populate the session table with known values. Return a tuple of lists: (auth_list, anon_list, all_list) """ cursor = db.cursor() cursor.execute("DELETE FROM session") cursor.execute("DELETE FROM session_attribute") last_visit_base = time.mktime(datetime(2010, 1, 1)...
def _prep_session_table(db, spread_visits=False): """ Populate the session table with known values. Return a tuple of lists: (auth_list, anon_list, all_list) """ cursor = db.cursor() cursor.execute("DELETE FROM session") cursor.execute("DELETE FROM session_attribute") last_visit_base = time.mktime(datetime(2010, 1, 1)...
465,587
def _render_repository_index(self, context, all_repositories, order, desc): # Color scale for the age column timerange = custom_colorizer = None if self.color_scale: custom_colorizer = self.get_custom_colorizer()
def _render_repository_index(self, context, all_repositories, order, desc): # Color scale for the age column timerange = custom_colorizer = None if self.color_scale: custom_colorizer = self.get_custom_colorizer()
465,588
def _render_repository_index(self, context, all_repositories, order, desc): # Color scale for the age column timerange = custom_colorizer = None if self.color_scale: custom_colorizer = self.get_custom_colorizer()
def _render_repository_index(self, context, all_repositories, order, desc): # Color scale for the age column timerange = custom_colorizer = None if self.color_scale: custom_colorizer = self.get_custom_colorizer()
465,589
def repo_order((reponame, repoinfo, repos, youngest, err)): return youngest and youngest.date
def repo_order((reponame, repoinfo, repos, youngest, err)): return youngest and youngest.date
465,590
def file_order(a): return changes[a.rev].date
def file_order(a): return changes[a.rev].date
465,591
def file_order(a): return changes[a.rev].author.lower()
def file_order(a): return changes[a.rev].author.lower()
465,592
def display_html(self, req, query): db = self.env.get_db_cnx()
def display_html(self, req, query): db = self.env.get_db_cnx()
465,593
def __init__(self, input, correct, file, line, setup=None, teardown=None, context=None): unittest.TestCase.__init__(self, 'test') self.title, self.input = input.split('\n', 1) if self.title: self.title = self.title.strip() self.correct = correct self.file = file self.line = line self._setup = setup self._teardown = tea...
def __init__(self, title, input, correct, file, line, setup=None, teardown=None, context=None): unittest.TestCase.__init__(self, 'test') self.title, self.input = input.split('\n', 1) if self.title: self.title = self.title.strip() self.correct = correct self.file = file self.line = line self._setup = setup self._teardow...
465,594
def __init__(self, input, correct, file, line, setup=None, teardown=None, context=None): unittest.TestCase.__init__(self, 'test') self.title, self.input = input.split('\n', 1) if self.title: self.title = self.title.strip() self.correct = correct self.file = file self.line = line self._setup = setup self._teardown = tea...
def __init__(self, input, correct, file, line, setup=None, teardown=None, context=None): unittest.TestCase.__init__(self, 'test') self.title = title self.input = input self.correct = correct self.file = file self.line = line self._setup = setup self._teardown = teardown
465,595
def test(self): """Testing WikiFormatter""" formatter = self.formatter() v = unicode(formatter.generate(**self.generate_opts)).replace('\r','') try: self.assertEquals(self.correct, v) except AssertionError, e: msg = to_unicode(e) import re match = re.match(r"u?'(.*)' != u?'(.*)'", msg) if match: g1 = ["%s\n" % x for x ...
def test(self): """Testing WikiFormatter""" formatter = self.formatter() v = unicode(formatter.generate(**self.generate_opts)).replace('\r','') try: self.assertEquals(self.correct, v) except AssertionError, e: msg = to_unicode(e) match = re.match(r"u?'(.*)' != u?'(.*)'", msg) if match: g1 = ["%s\n" % x for x in match.g...
465,596
def suite(data=None, setup=None, file=__file__, teardown=None, context=None): suite = unittest.TestSuite() if not data: file = os.path.join(os.path.split(file)[0], 'wiki-tests.txt') data = open(file, 'r').read().decode('utf-8') tests = data.split('=' * 30) next_line = 1 line = 0 for test in tests: if line != next_line:...
def suite(data=None, setup=None, file=__file__, teardown=None, context=None): suite = unittest.TestSuite() def add_test_cases(data, filename): tests = re.compile('^(%s.*)$' % ('=' * 30), re.MULTILINE).split(data) next_line = 1 line = 0 for title, test in zip(tests[1::2], tests[2::2]): title = title.lstrip('=').strip() ...
465,597
def open_environment(env_path=None, use_cache=False): """Open an existing environment object, and verify that the database is up to date. :param env_path: absolute path to the environment directory; if ommitted, the value of the `TRAC_ENV` environment variable is used :param use_cache: whether the environment should b...
def open_environment(env_path=None, use_cache=False): """Open an existing environment object, and verify that the database is up to date. :param env_path: absolute path to the environment directory; if ommitted, the value of the `TRAC_ENV` environment variable is used :param use_cache: whether the environment should b...
465,598
def open_environment(env_path=None, use_cache=False): """Open an existing environment object, and verify that the database is up to date. :param env_path: absolute path to the environment directory; if ommitted, the value of the `TRAC_ENV` environment variable is used :param use_cache: whether the environment should b...
def open_environment(env_path=None, use_cache=False): """Open an existing environment object, and verify that the database is up to date. :param env_path: absolute path to the environment directory; if ommitted, the value of the `TRAC_ENV` environment variable is used :param use_cache: whether the environment should b...
465,599