bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def latexnumber(s): """ Convert a string of the form "d.dddde-dd" to "d.dddd \times 10^{-dd}" """ return re.sub(r"([+-]?[.0-9]+)[Ee]?([+-]?[0-9]+)", r"\1 \\times 10^{\2}", s) | def latexnumber(s): """ Convert a string of the form "d.dddde-dd" to "d.dddd \times 10^{-dd}" """ m, e = floatpattern.match(s).groups() return r"%s \\times 10^{%d}" % (m, int(e)) | 471,700 |
def IMRpeakAmp(m1,m2,spin1z,spin2z,d): """ IMRpeakAmp finds the peak amplitude of the waveform for a given source parameters and the source distance. usage: IMRpeakAmp(m1,m2,spin1z,spin2z,distance) e.g. spawaveApp.IMRpeakAmp(30,40,0.45,0.5,100) """ chi = spawaveform.computechi(m1, m2, spin1z, spin2z) imrfFinal = spa... | def IMRpeakAmp(m1,m2,spin1z,spin2z,d): """ IMRpeakAmp finds the peak amplitude of the waveform for a given source parameters and the source distance. usage: IMRpeakAmp(m1,m2,spin1z,spin2z,distance) e.g. spawaveApp.IMRpeakAmp(30,40,0.45,0.5,100) """ chi = spawaveform.computechi(m1, m2, spin1z, spin2z) imrfFinal = spa... | 471,701 |
def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job) | def __init__(self,job,coinc,cp,opts,dag,ifo,ifonames,p_nodes): pipeline.CondorDAGNode.__init__(self,job) | 471,702 |
def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self... | def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self... | 471,703 |
def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self... | def __init__(self, configfile=None): cp = ConfigParser.ConfigParser() self.cp = cp self.time_now = "_".join([str(i) for i in time_method.gmtime()[0:6]]) self.ini_file=self.time_now + ".ini" home_base = home_dirs() # CONDOR SECTION NEEDED BY THINGS IN INSPIRAL.PY cp.add_section("condor") cp.set("condor","datafind",self... | 471,704 |
def get_signal_vetoes(trigger,bankq=0,bankn=0,autoq=0,auton=0,chiq=0,chin=0,sigmaVals = None,fResp = None): sbvs = {} q = bankq nhigh = bankn q2 = autoq nhigh2 = auton if trigger.chisq == 0: sbvs['BestNR1'] = 0 else: if trigger.chisq < 60: sbvs['BestNR1'] = trigger.snr else: sbvs['BestNR1'] = trigger.snr/((1 + (trigge... | def get_signal_vetoes(trigger,bankq=0,bankn=0,autoq=0,auton=0,chiq=0,chin=0,sigmaVals = None,fResp = None): sbvs = {} q = bankq nhigh = bankn q2 = autoq nhigh2 = auton if trigger.chisq == 0: sbvs['BestNR1'] = 0 else: if trigger.chisq < 60: sbvs['BestNR1'] = trigger.snr else: sbvs['BestNR1'] = trigger.snr/((1 + (trigge... | 471,705 |
def coinc_params_func(events, offsetvector): # # check for coincs that have been vetoed entirely # if len(events) < 2: return None params = {} # # zero-instrument parameters # params["nevents"] = (len(events),) # # one-instrument parameters # for event in events: prefix = "%s_" % event.ifo params["%ssnr2_chi2" %... | def coinc_params_func(events, offsetvector): # # check for coincs that have been vetoed entirely # if len(events) < 2: return None params = {} # # zero-instrument parameters # params["nevents"] = (len(events),) # # one-instrument parameters # for event in events: prefix = "%s_" % event.ifo params["%ssnr2_chi2" %... | 471,706 |
def dt_binning(instrument1, instrument2): dt = 0.005 + inject.light_travel_time(instrument1, instrument2) # seconds return rate.NDBins((rate.ATanBins(-dt, +dt, 3001),)) | def dt_binning(instrument1, instrument2): dt = 0.005 + inject.light_travel_time(instrument1, instrument2) # seconds return rate.NDBins((rate.ATanBins(-dt, +dt, 3001),)) | 471,707 |
def get_coincparamsdistributions(xmldoc): coincparamsdistributions, process_id = ligolw_burca_tailor.coinc_params_distributions_from_xml(xmldoc, u"string_cusp_likelihood") return coincparamsdistributions | def get_coincparamsdistributions(xmldoc, seglists = None): coincparamsdistributions, process_id = ligolw_burca_tailor.coinc_params_distributions_from_xml(xmldoc, u"string_cusp_likelihood") return coincparamsdistributions | 471,708 |
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut... | def load_likelihood_data(filenames, seglists = None, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coi... | 471,709 |
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut... | def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut... | 471,710 |
def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut... | def load_likelihood_data(filenames, verbose = False): coincparamsdistributions = None for n, filename in enumerate(filenames): if verbose: print >>sys.stderr, "%d/%d:" % (n + 1, len(filenames)), xmldoc = utils.load_filename(filename, gz = (filename or "stdin").endswith(".gz"), verbose = verbose) if coincparamsdistribut... | 471,711 |
def __init__(self,opts,cp,dir='',tag_base=''): """ """ self.__executable = string.strip(cp.get('fu-condor','plotmcmc')) self.name = os.path.split(self.__executable.rstrip('/'))[1] self.__universe = "vanilla" | def __init__(self,opts,cp,dir='',tag_base=''): """ """ self.__executable = string.strip(cp.get('fu-condor','plotmcmc')) self.name = os.path.split(self.__executable.rstrip('/'))[1] self.__universe = "vanilla" | 471,712 |
def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass | def run(self): # remove the automatically generated user env scripts for script in ["pylal-user-env.sh", "pylal-user-env.csh"]: log.info("removing " + script ) try: os.unlink(os.path.join("etc", script)) except: pass | 471,713 |
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = ... | def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = 99 #this stuff is only needed for injections self.is_injection = ... | 471,714 |
def get_coincs_from_coinctable(self,files): """ read data from coinc tables (xml format) FIXME: currently assumes one coinc per file!!! """ for file in files: coinc = CoincData() xmldoc = utils.load_filename(file) sngltab = tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName) coinc.set_snr(dict((row.ifo, row.sn... | defif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) get_coincs_from_coinctable(self,files):if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) readif ctab[0].false_alarm_ra... | 471,715 |
def get_coincs_from_coire(self,files): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) #note that it's hardcoded to use snr as the statis... | def get_coincs_from_coire(self,files): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) #note that it's hardcoded to use snr as the statis... | 471,716 |
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = ... | def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = 99 #this stuff is only needed for injections self.is_injection = ... | 471,717 |
def __init__(self): """ here are all the things we need """ #start with data needed for every coinc self.ifo_list = [] self.ifo_coincs = [] self.snr = {} self.gps = {} self.eff_distances = {} self.mass1 = {} self.mass2 = {} self.time = None self.FAR = -1 #this stuff is only needed for injections self.is_injection = ... | def__init__(self):"""hereareallthethingsweneed"""#startwithdataneededforeverycoincself.ifo_list=[]self.ifo_coincs=[]self.snr={}self.gps={}self.eff_distances={}self.mass1={}self.mass2={}self.time=Noneself.FAR=-1#thisstuffisonlyneededforinjectionsself.is_injection=Falseself.latitude_inj=Noneself.longitude_inj=Noneself.ma... | 471,718 |
def get_coincs_from_coinctable(self,files): """ read data from coinc tables (xml format) FIXME: currently assumes one coinc per file!!! """ for file in files: coinc = CoincData() xmldoc = utils.load_filename(file) sngltab = tab.get_table(xmldoc,lsctables.SnglInspiralTable.tableName) coinc.set_snr(dict((row.ifo, row.sn... | defif ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) get_coincs_from_coinctable(self,files):if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) """if ctab[0].false_alarm_rate is not None: coinc.set_FAR(ctab[0].false_alarm_rate) readif ctab[0].false_alarm_ra... | 471,719 |
def getParamsFromCache(fileName,type,ifo=None,time=None): qscanList = [] cacheList = lal.Cache.fromfile(open(fileName)) if not cacheList: return qscanList cacheSelected = cacheList.sieve(description=type,ifos=ifo) if time: cacheSelected = cacheSelected.sieve(segment=segments.segment(math.floor(float(time)), math.ceil(f... | def getParamsFromCache(fileName,type,ifo=None,time=None): qscanList = [] cacheList = lal.Cache.fromfile(open(fileName)) if not cacheList: return qscanList cacheSelected = cacheList.sieve(description=type,ifos=ifo) if time: if math.floor(float(time)) != math.ceil(float(time)): cacheSelected = cacheSelected.sieve(segment... | 471,720 |
def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ... | def __init__( self, table_name, table_param, param_ranges_opt, verbose = False ): """ Parse --param-ranges option. Creates self.param which is the table_name and the table_param appended together (with a '.') and self.param_ranges, which is a list of tuples that give the lower parameter value, whether it is an open or ... | 471,721 |
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row # | def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process, livetime_program): # # store the process row # | 471,722 |
def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row # | def __init__(self, xmldoc, b_b_def, sb_b_def, si_b_def, sb_c_e_def, sb_c_n_def, si_c_e_def, si_c_n_def, process): # # store the process row # | 471,723 |
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)] | def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within window seconds of t. This is not used to define any coincidences, only to provide a short list of burst events for use in more costly comparison tests. """ return self.snglbursttable[bisect.bisect_left(self.snglburstta... | 471,724 |
def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)] | def bursts_near_peaktime(self, t): """ Return a list of the burst events whose peak times are within self.burst_peak_time_window of t. """ return self.snglbursttable[bisect.bisect_left(self.snglbursttable, t - self.burst_peak_time_window):bisect.bisect_right(self.snglbursttable, t + self.burst_peak_time_window)] | 471,725 |
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are d... | def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within window seconds of t. This is not used to define any coincidences, only to provide a short list of coinc events for use in more costly comparison tests. """ # FIXME: t... | 471,726 |
def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are d... | def coincs_near_peaktime(self, t): """ Return a list of the (coinc_event_id, event list) tuples in which at least one burst event's peak time is within self.coinc_peak_time_window of t. """ # FIXME: this test does not consider the time slide # offsets that should be applied to the coinc, but for now # injections are d... | 471,727 |
def StringCuspSnglCompare(sim, burst): """ Return False if the peak time of the injection sim lies within the time interval of burst. """ return SimBurstUtils.time_at_instrument(sim, burst.ifo) not in burst.get_period() | def StringCuspSnglCompare(sim, burst): """ Return False (injection matches event) if an autocorrelation-width window centred on the injection is continuous with the time interval of the burst. """ tinj = SimBurstUtils.time_at_instrument(sim, burst.ifo) window = SimBurstUtils.stringcusp_autocorrelation_width / 2 return ... | 471,728 |
def ExcessPowerSnglCompare(sim, burst): """ Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return StringCuspSnglCompare(sim, burst) or (sim.frequency not in burst.get_band()) | def ExcessPowerSnglCompare(sim, burst): """ Return False (injection matches event) if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return (SimBurstUtils.time_at_instrument(sim, burst.ifo) not in burst.get_period()) or (sim.frequency not in burst.get_band()) | 471,729 |
def OmegaSnglCompare(sim, burst, delta_t = 10.0): """ Return False if the peak time and centre frequency of sim lie within the time-frequency tile of burst. """ return abs(float(SimBurstUtils.time_at_instrument(sim, burst.ifo) - burst.get_peak())) > delta_t | def OmegaSnglCompare(sim, burst, delta_t = 10.0): """ Return False (injection matches event) if the time of the sim and the peak time of the burst event differ by less than or equal to delta_t seconds. """ return abs(float(SimBurstUtils.time_at_instrument(sim, burst.ifo) - burst.get_peak())) > delta_t | 471,730 |
def StringCuspNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ return OmegaNearCoincCompare(sim, burst) | def StringCuspNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ tinj = SimBurstUtils.time_at_instrument(sim, burst.ifo) window = SimBurstUtils.stringcusp_autocorrelation_width / 2 + SimBurstUtils.burst_is_near_injection_window return segm... | 471,731 |
def ExcessPowerNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ return not SimBurstUtils.burst_is_near_injection(sim, burst.start_time, burst.start_time_ns, burst.duration, burst.ifo) | def ExcessPowerNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ return not SimBurstUtils.burst_is_near_injection(sim, burst.start_time, burst.start_time_ns, burst.duration, burst.ifo) | 471,732 |
def OmegaNearCoincCompare(sim, burst): """ Return False if the peak time of the sim is "near" the burst event. """ start_time = burst.get_peak() - burst.duration / 2.0 return not SimBurstUtils.burst_is_near_injection(sim, start_time.seconds, start_time.nanoseconds, burst.duration, burst.ifo) | def OmegaNearCoincCompare(sim, burst): """ Return False (injection matches coinc) if the peak time of the sim is "near" the burst event. """ return OmegaSnglCompare(sim, burst, delta_t = 20.0 + burst.duration / 2) | 471,733 |
def find_sngl_burst_matches(contents, sim, comparefunc): """ Scan the burst table for triggers matching sim. """ return [burst for burst in contents.bursts_near_peaktime(sim.get_time_geocent()) if not comparefunc(sim, burst)] | def find_sngl_burst_matches(contents, sim, comparefunc, sieve_window): """ Scan the burst table for triggers matching sim. sieve_window is used in a bisection search to quickly identify burst events within that many seconds of the injection's peak time at the geocentre; it should be larger than the greatest time diffe... | 471,734 |
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this... | def find_exact_coinc_matches(coincs, sim, comparefunc, seglists): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero l... | 471,735 |
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this... | def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim and to which all instruments on at the time of the sim contributed events. """ # FIXME: this test does not consider the time slide offsets that # should be a... | 471,736 |
def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this... | def find_exact_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which all burst events match sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero lag so this... | 471,737 |
def find_near_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which at least one burst event matches sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero la... | def find_near_coinc_matches(coincs, sim, comparefunc): """ Return a list of the coinc_event_ids of the burst<-->burst coincs in which at least one burst event matches sim. """ # FIXME: this test does not consider the time slide offsets that # should be applied to the coinc, but for now injections are done # at zero la... | 471,738 |
si_c_n_def = si_c_n_def, | si_c_n_def = si_c_n_def, | 471,739 |
si_c_n_def = si_c_n_def, | si_c_n_def = si_c_n_def, | 471,740 |
si_c_n_def = si_c_n_def, | si_c_n_def = si_c_n_def, | 471,741 |
si_c_n_def = si_c_n_def, | si_c_n_def = si_c_n_def, | 471,742 |
si_c_n_def = si_c_n_def, | si_c_n_def = si_c_n_def, | 471,743 |
def get_analyzeQscan_RDS(self): """ """ #analyseQscan.py_FG_RDS_full_data/H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*%s*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coint.ty... | def get_analyzeQscan_RDS(self): """ """ #analyseQscan.py_FG_RDS_full_data/H1-analyseQscan_H1_931176926_116_rds-unspecified-gpstime.cache cacheList=list() cacheFiles=list() for sngl in self.coinc.sngls: timeString=str(float(sngl.time)).replace(".","_") myCacheMask="*%s*/%s-analyseQscan_%s_%s_rds*.cache"%\ (self.coinc.ty... | 471,744 |
def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp) | def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp) | 471,745 |
def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp) | def __init__(self,type=None,ifo=None,time=None,snr=None,chisqr=None,mass1=None,mass2=None,mchirp=None): """ """ self.type=str(type) self.ifo=str(ifo) self.time=float(time) self.snr=float(snr) self.chisqr=float(chisqr) self.mass1=float(mass1) self.mass2=float(mass2) self.mchirp=float(mchirp) | 471,746 |
def get_coincs_from_coire(self,files): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) #note that it's hardcoded to use snr as the statis... | def get_coincs_from_coire(self,files): """ uses CoincInspiralUtils to get data from old-style (coire'd) coincs """ coincTrigs = CoincInspiralUtils.coincInspiralTable() inspTrigs = SnglInspiralUtils.ReadSnglInspiralFromFiles(files, \ mangle_event_id = True,verbose=None) #note that it's hardcoded to use snr as the statis... | 471,747 |
def now(): return datetime.now() | def now(): return datetime.now() | 471,748 |
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace ... | def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace ... | 471,749 |
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace ... | def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace ... | 471,750 |
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_TYPE_MAP JAVA_TYPE_MAP = { # Base types namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', namespace ... | defglobal JAVA_TYPE_MAP JAVA_TYPE_MAP = copy.deepcopy(JAVA_PRIMITIVE_TYPE_MAP) JAVA_TYPE_MAP['NamingConvention'] = 'String' JAVA_TYPE_MAP['PercentFraction'] = 'Double' JAVA_TYPE_MAP['MIMEtype'] = 'String' JAVA_TYPE_MAP['Leader'] = 'Experimenter' JAVA_TYPE_MAP['Contact'] = 'Experimenter' JAVA_TYPE_MAP['Pump'] = 'Laser' ... | 471,751 |
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType | def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType | 471,752 |
def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType | def _get_metadataStoreType(self): # FIXME: No more node #javaType = self.javaType #if javaType[-4:] == "Node": # return "String" return javaType | 471,753 |
def _get_isReference(self): o = self.model.getObjectByName(self.type) if o is not None and o.base == "Reference": return True return False | def _get_isReference(self): o = self.model.getObjectByName(self.type) if o is not None: return o.isReference return False | 471,754 |
def now(): return datetime.now() | def now(): return datetime.now() | 471,755 |
def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_PRIMITIVE_TYPE_MAP JAVA_PRIMITIVE_TYPE_MAP = { namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', nam... | def updateTypeMaps(namespace): """ Updates the type maps with a new namespace. **Must** be executed at least once, **before** node class file generation. """ global JAVA_PRIMITIVE_TYPE_MAP JAVA_PRIMITIVE_TYPE_MAP = { namespace + 'boolean': 'Boolean', namespace + 'dateTime': 'String', namespace + 'string': 'String', nam... | 471,756 |
def _get_javaType(self): try: # Hand back the type of enumerations if self.isEnumeration: javaType = self.name if len(self.delegate.values) == 0: # As we have no directly defined possible values we have # no reason to qualify our type explicitly. return self.type if javaType == "Type": # One of the OME XML unspecific "... | def _get_javaType(self): try: # Hand back the type of enumerations if self.isEnumeration: javaType = self.name if len(self.delegate.values) == 0: # As we have no directly defined possible values we have # no reason to qualify our type explicitly. return self.type if javaType == "Type": # One of the OME XML unspecific "... | 471,757 |
def print_header(): print "\ | def print_header(): print "\ | 471,758 |
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | 471,759 |
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | 471,760 |
def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | def process_readings(): oucode = 0 olcode = 0 for line in open(source,'r'): items = line[:-1].split('\t') try: r = re.match(r'kKorea', items[1]) if r is not None: code = re.sub(r'U\+([0-9A-F]{2})([0-9A-F]{2})',r'\1\t\2',items[0]).split('\t') ucode = int(code[0],16) lcode = int(code[1],16) pron = items[2].split(' ')[0]... | 471,761 |
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES) | def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES) | 471,762 |
def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES) | def __init__(self): self.codepoints = CODEPOINTS self.codepoints.update(JACODES) | 471,763 |
def process_readings(self, source, fout): oucode = 0 | defpmap = { ord(u'â'):'a',ord(u'à'):'a',ord(u'ắ'):'a',ord(u'ă'):'a',ord(u'ấ'):'a', ord(u'ü'):'u',ord(u'ụ'):'u',ord(u'ú'):'u',ord(u'ử'):'u',ord(u'ư'):'u', ord(u'ù'):'u', ord(u'é'):'e', ord(u'ọ'):'o',ord(u'ố'):'o',ord(u'ộ'):'o',ord(u'ơ'):'o',ord(u'ớ'):'o', ord(u'ớ'):'o', } r1 = re.compile(r'U\+([0-9A-F]{2})([0-9A-F]{... | 471,764 |
def process_readings(self, source, fout): oucode = 0 | def process_readings(self, source, fout): oucode = 0 | 471,765 |
def process_readings(self, source, fout): oucode = 0 | def process_readings(self, source, fout): oucode = 0 | 471,766 |
def process_readings(self, source, fout): oucode = 0 | def process_readings(self, source, fout): oucode = 0 | 471,767 |
def expand (file, entry, type = -1): | def expand (file, entry, type = -1): | 471,768 |
def expand (file, entry): | def expand (file, entry): | 471,769 |
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | 471,770 |
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | 471,771 |
def debug(obj): """Write obj to standard error.""" sys.stderr.write("--- " + str(obj) + "\n") | def debug(obj): """Write obj to standard error.""" string = str(obj.encode(get_encoding()) if isinstance(obj, unicode) else obj) sys.stderr.write("--- " + string + "\n") def get_encoding(): return sys.stdout.encoding or locale.getpreferredencoding() | 471,772 |
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | 471,773 |
def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | def main_upload(arguments): """Upload video to Youtube.""" usage = """Usage: %prog [OPTIONS] EMAIL PASSWORD FILE TITLE DESCRIPTION CATEGORY KEYWORDS Upload a video to youtube spliting it if necessary (uses ffmpeg).""" parser = optparse.OptionParser(usage, version=VERSION) parser.add_option('-c', '--get-categories', de... | 471,774 |
def RepositoryName(self): """FullName after removing the local path to the repository. | def RepositoryName(self): """FullName after removing the local path to the repository. | 471,775 |
def RepositoryName(self): """FullName after removing the local path to the repository. | def RepositoryName(self): """FullName after removing the local path to the repository. | 471,776 |
def RepositoryName(self): """FullName after removing the local path to the repository. | def RepositoryName(self): """FullName after removing the local path to the repository. | 471,777 |
def RepositoryName(self): """FullName after removing the local path to the repository. | def RepositoryName(self): """FullName after removing the local path to the repository. | 471,778 |
def id (about, host): # this might turn into a cache that gets dumped to file and # supports more than two fixed hosts in time. cache = IDS_MAIN if host == FLUIDDB_PATH else IDS_SAND return cache[about] | def id(about, host): # this might turn into a cache that gets dumped to file and # supports more than two fixed hosts in time. cache = IDS_MAIN if host == FLUIDDB_PATH else IDS_SAND return cache[about] | 471,779 |
def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http | def _get_http(timeout): try: http = Http(timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http | 471,780 |
def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http () return http | def _get_http(timeout): try: http = Http (timeout=timeout) except TypeError: # The user's version of http2lib is old. Omit the timeout. http = Http() return http | 471,781 |
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url | def _get_url(host, path, hash, kw): url = host + urllib.quote(path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url | 471,782 |
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url | def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode(hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url | 471,783 |
def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode (kw)) return url | def _get_url(host, path, hash, kw): url = host + urllib.quote (path) if hash: url = '%s?%s' % (url, urllib.urlencode (hash)) elif kw: url = '%s?%s' % (url, urllib.urlencode(kw)) return url | 471,784 |
def __init__ (self, hash): for k in hash: self.__dict__[k] = hash[k] | def __init__(self, hash): for k in hash: self.__dict__[k] = hash[k] | 471,785 |
def __str__ (self): keys = self.__dict__.keys () keys.sort () return '\n'.join (['%20s: %s' % (key, str (self.__dict__[key])) for key in keys]) | def __str__(self): keys = self.__dict__.keys() keys.sort() return '\n'.join(['%20s: %s' % (key, str(self.__dict__[key])) for key in keys]) | 471,786 |
def __init__ (self, name, value=None): self.name = name self.value = value | def __init__(self, name, value=None): self.name = name self.value = value | 471,787 |
def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value)))) | def __str__(self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value)))) | 471,788 |
def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value)))) | def __str__ (self): return ('Tag "%s", value "%s" of type %s' % (self.name, str (self.value), str (type (self.value)))) | 471,789 |
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | def __init__(self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pass... | 471,790 |
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file() if os.path.exists(filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.passw... | 471,791 |
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open(filename) lines = f.readlines() self.username = lines[0].strip() self.passwo... | 471,792 |
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | 471,793 |
def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | def __init__ (self, username=None, password=None, id=None, filename=None): if username: self.username = username self.password = password else: if filename == None: filename = get_credentials_file () if os.path.exists (filename): try: f = open (filename) lines = f.readlines () self.username = lines[0].strip () self.pas... | 471,794 |
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % hos... | def __init__(self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host... | 471,795 |
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % hos... | def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials() self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % host... | 471,796 |
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % hos... | def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith('http'): self.host = 'http://%s' % host... | 471,797 |
def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % hos... | def __init__ (self, credentials=None, host=None, debug=False): if credentials == None: credentials = Credentials () self.credentials = credentials if host is None: host = choose_host() self.host = host self.debug = debug self.timeout = choose_http_timeout() if not host.startswith ('http'): self.host = 'http://%s' % hos... | 471,798 |
def set_connection_from_global (self): """Sets the host on the basis of the global variable flags, if that exists. Used to enable the tests to run against alternate hosts.""" self.host = choose_host () self.debug = choose_debug_mode () self.timeout = choose_http_timeout () | def set_connection_from_global(self): """Sets the host on the basis of the global variable flags, if that exists. Used to enable the tests to run against alternate hosts.""" self.host = choose_host () self.debug = choose_debug_mode () self.timeout = choose_http_timeout () | 471,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.