rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X%(suffixe)s = %(value)s;\n"%texts
strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X%(suffixe)s = %(value)s;%(comment)s\n"%texts
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
mappedVariableContent += " %s%s\n"%(value, sep)
mappedVariableContent += " %s%s%s\n"%(value, sep, comment)
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
value = str(value) strIndex += " %s%s\n"%(value, sep)
comment = "\t// %s"%str(value) value = "0x%X"%value strIndex += " %s%s%s\n"%(value, sep, comment)
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X_%(name)s%(suffixe)s = %(value)s;\n"%texts
strIndex += " %(subIndexType)s %(NodeName)s_obj%(index)04X_%(name)s%(suffixe)s = %(value)s;%(comment)s\n"%texts
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
UNS32 %(NodeName)s_obj1006 = 0;
UNS32 %(NodeName)s_obj1006 = 0x0; // 0
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
UNS16 %(NodeName)s_obj1017 = 0;
UNS16 %(NodeName)s_obj1017 = 0x0; // 0
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
selected = self.FileOpened.GetSelection()
selected = event.GetSelection()
def OnFileSelectedChanged(self, event): selected = self.FileOpened.GetSelection() # At init selected = -1 if selected >= 0: self.Manager.ChangeCurrentNode(selected) self.RefreshBufferState() self.RefreshProfileMenu() event.Skip()
struct = 3 elif self.radioButton2.GetValue():
def GetValues(self): if self.radioButton1.GetValue(): struct = 1 elif self.radioButton3.GetValue(): struct = 3 elif self.radioButton2.GetValue(): struct = 7 name = self.IndexName.GetValue() index = eval(self.Index.GetValue()) number = eval(self.Number.GetValue()) return index, name, struct, number
text = "\t0x%04X-0x%04X\t\t%s"%(values["minIndex"],values["maxIndex"],values["name"])
text = " 0x%04X-0x%04X %s"%(values["minIndex"],values["maxIndex"],values["name"])
def __init__(self, parent, manager): self._init_ctrls(parent.GetNoteBook()) self.Parent = parent self.Manager = manager self.ListIndex = [] self.ChoiceIndex = [] self.FirstCall = False for values in DictionaryOrganisation: text = "\t0x%04X-0x%04X\t\t%s"%(values["minIndex"],values["maxIndex"],values["name"]) self.PartL...
self.IndexList.Append("0x%04X\t%s"%(index, name))
self.IndexList.Append("0x%04X %s"%(index, name))
def RefreshIndexList(self): selected = self.IndexList.GetSelection() choice = self.IndexChoice.GetStringSelection() choiceindex = self.IndexChoice.GetSelection() if selected != wxNOT_FOUND: selectedindex = self.ListIndex[selected] self.IndexList.Clear() self.IndexChoice.Clear() i = self.PartList.GetSelection() if i < l...
self.IndexChoice.Append("0x%04X\t%s"%(index, name))
self.IndexChoice.Append("0x%04X %s"%(index, name))
def RefreshIndexList(self): selected = self.IndexList.GetSelection() choice = self.IndexChoice.GetStringSelection() choiceindex = self.IndexChoice.GetSelection() if selected != wxNOT_FOUND: selectedindex = self.ListIndex[selected] self.IndexList.Clear() self.IndexChoice.Clear() i = self.PartList.GetSelection() if i < l...
self.Manager.ChangeCurrentNode(selected) self.RefreshBufferState() self.RefreshProfileMenu()
if selected >= 0: self.Manager.ChangeCurrentNode(selected) self.RefreshBufferState() self.RefreshProfileMenu()
def OnFileSelectedChanged(self, event): selected = self.FileOpened.GetSelection() self.Manager.ChangeCurrentNode(selected) self.RefreshBufferState() self.RefreshProfileMenu() event.Skip()
self.PossibleIndexes.Append("0x%04X\t%s"%(index, self.IndexDictionary[index][0]))
self.PossibleIndexes.Append("0x%04X %s"%(index, self.IndexDictionary[index][0]))
def RefreshLists(self): self.PossibleIndexes.Clear() self.CurrentIndexes.Clear() self.AllList = [] for index in self.IndexDictionary.iterkeys(): if index not in self.CurrentList: self.AllList.append(index) self.AllList.sort() for index in self.AllList: self.PossibleIndexes.Append("0x%04X\t%s"%(index, self.IndexDictiona...
self.CurrentIndexes.Append("0x%04X\t%s"%(index, self.IndexDictionary[index][0]))
self.CurrentIndexes.Append("0x%04X %s"%(index, self.IndexDictionary[index][0]))
def RefreshLists(self): self.PossibleIndexes.Clear() self.CurrentIndexes.Clear() self.AllList = [] for index in self.IndexDictionary.iterkeys(): if index not in self.CurrentList: self.AllList.append(index) self.AllList.sort() for index in self.AllList: self.PossibleIndexes.Append("0x%04X\t%s"%(index, self.IndexDictiona...
strDeclareHeader += "%(subIndexType)s %(name)s[%(length)d]%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n"%texts
strDeclareHeader += "extern %(subIndexType)s %(name)s[%(length)d]%(suffixe)s;\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n"%texts
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
mappedVariableContent = "%(subIndexType)s %(name)s[] =\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n {\n"%texts
mappedVariableContent += "%(subIndexType)s %(name)s[] =\t\t// Mapped at index 0x%(index)04X, subindex 0x01 - 0x%(length)02X\n {\n"%texts
def GenerateFileContent(Manager, headerfilepath): global type texts = {} texts["maxPDOtransmit"] = 0 texts["NodeName"], texts["NodeID"], texts["NodeType"] = Manager.GetCurrentNodeInfos() internal_types = {} texts["iam_a_slave"] = 0 if (texts["NodeType"] == "slave"): texts["iam_a_slave"] = 1 # Compiling lists of indexe...
print selected
def OnFileSelectedChanged(self, event): selected = event.GetSelection() # At init selected = -1 print selected if selected >= 0: self.Manager.ChangeCurrentNode(selected) self.RefreshBufferState() self.RefreshProfileMenu() event.Skip()
try: self.__try(fileobj, i, size - offset)
try: self.__try(fileobj, int(i), size - offset)
def __init__(self, fileobj, offset=None): """Parse MPEG stream information from a file-like object.
self.audio.pprint()
self.failUnless(self.audio.pprint())
def test_pprint(self): self.audio.pprint()
strings.append(" %-20s\t%d" % Ex.__name__, i)
strings.append(" %-20s\t%d" % (Ex.__name__, i))
def __str__(self): strings = ["-- Report for %s --" % self.name] if self.files == 0: return strings[0] + "\n" + "No MP3 files found.\n" good = self.files - len(self.errors) strings.append("Loaded %d/%d files (%d%%)" % ( good, self.files, (float(good)/self.files) * 100)) strings.append("%d files with unsynchronized fra...
strings.append("\n" + filename) strings.append(traceback.format_exception(Ex, value, trace))
strings.append("\nReading %s:" % filename) strings.append("".join(traceback.format_exception(Ex, value, trace)[1:]))
def __str__(self): strings = ["-- Report for %s --" % self.name] if self.files == 0: return strings[0] + "\n" + "No MP3 files found.\n" good = self.files - len(self.errors) strings.append("Loaded %d/%d files (%d%%)" % ( good, self.files, (float(good)/self.files) * 100)) strings.append("%d files with unsynchronized fra...
f = open(filename, 'ab+')
f = open(filename, 'ab') f = open(filename, 'rb+')
def save(self, filename=None, v1=1): """Save changes to a file, overwriting an old ID3v2 tag but preserving any other (e.g. MPEG) data. The default filename is the one this tag was created with.
for trak in atoms["moov"].findall("trak"):
for trak in list(atoms["moov"].findall("trak")):
def __init__(self, atoms, fileobj): for trak in atoms["moov"].findall("trak"): hdlr = trak["mdia", "hdlr"] fileobj.seek(hdlr.offset) data = fileobj.read(hdlr.length) if data[16:20] == "soun": break else: raise MP4StreamInfoError("track has no audio data")
"""'Magic' value setter This function tries to guess at what kind of value you want to store. If you pass in a valid UTF-8 or Unicode string, it treats it as a text value. If you pass in a list, it treats it as a list of string/Unicode values. If you pass in a string that is not valid UTF-8, it assumes it is a binary ...
"""'Magic' value setter. This function tries to guess at what kind of value you want to store. If you pass in a valid UTF-8 or Unicode string, it treats it as a text value. If you pass in a list, it treats it as a list of string/Unicode values. If you pass in a string that is not valid UTF-8, it assumes it is a binar...
def __setitem__(self, k, v): """'Magic' value setter
if not self.finished: size -= bool(rem)
if not self.finished and rem == 0: size -= 1
def __size(self): size = 27 # Initial header size for datum in self.data: quot, rem = divmod(len(datum), 255) size += quot + 1 if not self.finished: # Last packet doesn't have a final lacing marker. size -= bool(rem) size += sum(map(len, self.data)) return size
The 'MIME' attribute of an ID3v2.2 attached picture must be either
The 'mime' attribute of an ID3v2.2 attached picture must be either
def __eq__(self, other): return self.offset == other
self[atom.name] = cdata.short(data[16:18])
self[atom.name] = cdata.short_be(data[16:18])
def __parse_tempo(self, atom, data): self[atom.name] = cdata.short(data[16:18])
self[atom.name] = bool(ord(data[16:]))
try: self[atom.name] = bool(ord(data[16:17])) except TypeError: self[atom.name] = False
def __parse_compilation(self, atom, data): self[atom.name] = bool(ord(data[16:]))
"""Multivalue numreical text strings.
"""Multivalue numerical text strings.
def __pos__(self): """Return the numerical value of the string.""" return int(self.text[0])
"""A list of timp stamps.
"""A list of time stamps.
def __pos__(self): return int(self.text[0].split("/")[0])
"""Unsychronised lyrics/text transcription.
"""Unsynchronised lyrics/text transcription.
def __eq__(self, other): return self.data == other
descripton ('desc'), and a block of plain text ('text').
description ('desc'), and a block of plain text ('text').
def __eq__(self, other): return self.data == other
particular, normalzation using ReplayGain.
particular, normalization using ReplayGain.
def _pprint(self): return "%s=%r=%s" % ( self.desc, self.lang, " / ".join(self.text))
Attribues:
Attributes:
def _pprint(self): return "%s=%s %s/255" % ( self.email, self.count, self.rating)
Mutagen does not find tags at seek offets.
Mutagen does not find tags at seek offsets.
def __eq__(self, other): return self.sig == other
import tests
def run(self): import tests import mmap
if tests.unit(self.to_run): if sys.version[:3] == (2, 4, 2): print "You're running Python 2.4.2, which is buggy." raise SystemExit("Test failures are listed above.")
self.__test()
def run(self): import tests import mmap
if tests.unit(self.to_run, uses_mmap): if sys.version[:3] == (2, 4, 2): print "You're running Python 2.4.2, which is buggy." raise SystemExit("Test failures are listed above.")
self.__test(uses_mmap)
def close(self): pass
if tests.unit(self.to_run, uses_mmap):
self.__test(uses_mmap) def __test(self, filter=None): import tests if tests.unit(self.to_run, filter):
def MockMMap2(*args, **kwargs): raise EnvironmentError
print "You're running Python 2.4.2, which is buggy."
print "You're running Python 2.4.2, which has known mmap bugs." elif sys.version[:3] < (2, 5, 2): print ("You're running Python 2.5, which has known unicode " "comparison bugs.")
def MockMMap2(*args, **kwargs): raise EnvironmentError
code = 2
code = 0
def group_padding(blocks): """Replace any padding metadata blocks with a single block at the end, maintaining the same size as the old blocks.""" paddings = filter(lambda x: isinstance(x, Padding), blocks) map(blocks.remove, paddings) padding = Padding() # total padding size is the sum of padding sizes plus 4 bytes # p...
return (self.min_blocksize == other.min_blocksize and self.max_blocksize == other.max_blocksize and self.sample_rate == other.sample_rate and self.channels == other.channels and self.bits_per_sample == other.bits_per_sample and self.total_samples == other.total_samples)
try: return (self.min_blocksize == other.min_blocksize and self.max_blocksize == other.max_blocksize and self.sample_rate == other.sample_rate and self.channels == other.channels and self.bits_per_sample == other.bits_per_sample and self.total_samples == other.total_samples) except: return False
def __eq__(self, other): return (self.min_blocksize == other.min_blocksize and self.max_blocksize == other.max_blocksize and self.sample_rate == other.sample_rate and self.channels == other.channels and self.bits_per_sample == other.bits_per_sample and self.total_samples == other.total_samples)
MetadataBlocks.group_padding(self.metadata_blocks)
MetadataBlock.group_padding(self.metadata_blocks)
def save(self, filename=None): if filename is None: filename = self.filename try: f = open(filename, 'rb+') except IOError, err: from errno import ENOENT if err.errno != ENOENT: raise f = open(filename, 'ab') # create, then reopen f = open(filename, 'rb+')
data = MetadataBlocks.writeblocks(self.metadata_blocks)
data = MetadataBlock.writeblocks(self.metadata_blocks)
def save(self, filename=None): if filename is None: filename = self.filename try: f = open(filename, 'rb+') except IOError, err: from errno import ENOENT if err.errno != ENOENT: raise f = open(filename, 'ab') # create, then reopen f = open(filename, 'rb+')
padding.length = length data = MetadataBlocks.writeblocks(self.metadata_blocks)
padding.length = newlength data = MetadataBlock.writeblocks(self.metadata_blocks)
def save(self, filename=None): if filename is None: filename = self.filename try: f = open(filename, 'rb+') except IOError, err: from errno import ENOENT if err.errno != ENOENT: raise f = open(filename, 'ab') # create, then reopen f = open(filename, 'rb+')
print "Need to resize file" diff = (data - available)
diff = (len(data) - available)
def save(self, filename=None): if filename is None: filename = self.filename try: f = open(filename, 'rb+') except IOError, err: from errno import ENOENT if err.errno != ENOENT: raise f = open(filename, 'ab') # create, then reopen f = open(filename, 'rb+')
fobj.seek(-len(frontbuf), 1)
fobj.seek(offset)
def insert_bytes(fobj, size, offset): """Insert size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or equivalent. Mutagen tries to use mmap to resize the file, but falls back to a significantly slower method if mmap fails. """ assert 0 < size assert 0 <= offset fobj.seek(0, 2) fil...
fobj.seek(-len(buf) - size, 1)
fobj.seek(offset)
def delete_bytes(fobj, size, offset): """Delete size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or equivalent. Mutagen tries to use mmap to resize the file, but falls back to a significantly slower method if mmap fails. """ assert 0 < size assert 0 <= offset fobj.seek(0, 2) fil...
fobj.seek(size, 1)
offset += len(buf) fobj.seek(offset + size)
def delete_bytes(fobj, size, offset): """Delete size bytes of empty space starting at offset. fobj must be an open file object, open rb+ or equivalent. Mutagen tries to use mmap to resize the file, but falls back to a significantly slower method if mmap fails. """ assert 0 < size assert 0 <= offset fobj.seek(0, 2) fil...
return (email, mbox)
return (email.lower(), mbox)
def to_forlife(email): try: mbox, fqdn = email.split('@') except: mbox = email fqdn = PLATAL_DOMAIN if ( fqdn == PLATAL_DOMAIN ) or ( fqdn == PLATAL_DOMAIN2 ): res = mysql_fetchone("""SELECT CONCAT(f.alias, '@%s'), CONCAT(u.prenom, ' ', u.nom) FROM auth_user_md5 AS u INNER JOIN aliases AS f ON (f.id=u.user_id ...
udesc = UserDesc(email, email, None, 0)
udesc = UserDesc(email.lower(), email.lower(), None, 0)
def get_lists(userdesc, perms, vhost, email=None): if email is None: udesc = userdesc else: udesc = UserDesc(email, email, None, 0) prefix = vhost.lower()+VHOST_SEP names = Utils.list_names() names.sort() result = [] for name in names: if not name.startswith(prefix): continue try: mlist = MailList.MailList(name, lock=0...
mlist.ApprovedChangeMemberAddress(from_email, to_email, 0)
mlist.ApprovedChangeMemberAddress(from_email.lower(), to_email.lower(), 0)
def replace_email(userdesc, perms, vhost, listname, from_email, to_email): try: mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(), lock=0) except: return 0 try: if not is_admin_on(userdesc, perms, mlist): return 0 mlist.Lock() mlist.ApprovedChangeMemberAddress(from_email, to_email, 0) mlist.Save() mlist.Unloc...
BASEURL = get_config('Core', 'baseurl')
def get_config(sec, val, default=None): try: return config.get(sec, val)[1:-1] except ConfigParser.NoOptionError, e: if default is None: print e sys.exit(1) else: return default
h = str('').join(re.split('[\x00-\x1f]+', s)) return Utils.uquote(h.replace('&', '&amp;').replace('>', '&gt;').replace('<', '&lt;'))
h = str('').join(re.split('[\x00-\x09\x0B\x1f]+', s)) return Utils.uquote(h.replace('&', '&amp;').replace('>', '&gt;').replace('<', '&lt;'))
def quote(s, is_header=False): if is_header: h = Utils.oneline(s, 'iso-8859-1') else: h = s h = str('').join(re.split('[\x00-\x1f]+', s)) return Utils.uquote(h.replace('&', '&amp;').replace('>', '&gt;').replace('<', '&lt;'))
+ "Liste de diffusion %(real_name)s\n"
+ "Liste de diffusion %(real_name)s\n" \ + "http://listes.polytechnique.org/members/" + inverted_listname
def create_list(userdesc, perms, vhost, listname, desc, advertise, modlevel, inslevel, owners, members): if perms != 'admin': return 0 name = vhost.lower()+VHOST_SEP+listname.lower(); if Utils.list_exists(name): return 0 owner = [] for o in owners: email = to_forlife(o)[0] if email is not None: owner.append(email) if ...
try: mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(), lock=0)
listname = listname.lower() try: mlist = MailList.MailList(vhost+VHOST_SEP+listname, lock=0)
def check_options(userdesc, perms, vhost, listname, correct=False): try: mlist = MailList.MailList(vhost+VHOST_SEP+listname.lower(), lock=0) except: return 0 try: if perms != 'admin': return 0 if correct: mlist.Lock() options = { } for (k, v) in check_opts.iteritems(): if mlist.__dict__[k] != v: options[k] = v, mlist._...
self.cursor.execute(sql,(self.process_id, self.state_vec[(ver,val)], ifo,
self.cursor.execute(sql,(self.process_id, self.state_vec[ifo][(ver,val)], ifo,
def publish_state(self, ifo, start_time, start_time_ns, end_time, end_time_ns, ver, val ): """ Publish a state segment for a state vector in the database """
print ("DEBUG: created a new state vec type (%d,%d), id = " % \ (ver,val)), print tuple([self.state_vec[(ver,val)]]) sv_id = self.state_vec[(ver,val)]
print ("DEBUG: created a new state vec type (%s,%d,%d), id = " % \ (ifo,ver,val)), print tuple([self.state_vec[ifo][(ver,val)]]) sv_id = self.state_vec[ifo][(ver,val)]
def publish_state(self, ifo, start_time, start_time_ns, end_time, end_time_ns, ver, val ): """ Publish a state segment for a state vector in the database """
)]
])
def segmentFindWithMetadata_vx(self, arg): """ Given a list of attributes to query on, the first of which is the segfind client/server communication protocol version. Corresponds to the METASEGSVX method in the LSCsegFindServer RPC protocol.
self.__notifcation = 'never'
self.set_notification('never')
def __init__(self, universe, executable): """ universe = the condor universe to run the job in. executable = the executable to run in the DAG. """ CondorJob.__init__(self, universe, executable, 1) self.__notifcation = 'never' self.__var_args = [] self.__bad_macro_chars = re.compile(r'[-_]')
ligolw += '"'+self.xlat_strtoxml.xlat(str(tupi))+'"'
ligolw += '"'+self.strtoxml.xlat(str(tupi))+'"'
def xml(self): """Convert a table dictionary to LIGO lightweight XML""" if len(self.table) == 0: raise LIGOLwDBError, 'attempt to convert empty table to xml' ligolw = """\
<profile namespace="vds" key="group">%s</group>
<profile namespace="vds" key="group">%s</profile>
def write_dax(self): """ Write all the nodes in the workflow to the DAX file. """ if not self.__dag_file_path: raise CondorDAGError, "No path for DAX file" try: dagfile = open( self.__dag_file_path, 'w' ) except: raise CondorDAGError, "Cannot open file " + self.__dag_file_path
elif i2 == length2:
elif i1 == length1:
def union(self, other): """ Replaces the ScienceSegments contained in this instance of ScienceData with the union of those in the instance other. Returns the number of ScienceSegments in the union. other = ScienceData to use to generate the intersection """
print >> env_file, "GLUE_PREFIX=" + self.prefix
print >> env_file, "GLUE_PREFIX=" + glue_prefix
def run(self):
print >> env_file, "PATH=" + self.install_scripts + ":${PATH}"
print >> env_file, "PATH=" + glue_install_scripts + ":${PATH}"
def run(self):
print >> env_file, "LD_LIBRARY_PATH=" + self.install_platlib + ":${LD_LIBRARY_PATH}" print >> env_file, "DYLD_LIBRARY_PATH=" + self.install_platlib + ":${DYLD_LIBRARY_PATH}"
print >> env_file, "LD_LIBRARY_PATH=" + glue_install_platlib + ":${LD_LIBRARY_PATH}" print >> env_file, "DYLD_LIBRARY_PATH=" + glue_install_platlib + ":${DYLD_LIBRARY_PATH}"
def run(self):
print >> env_file, "setenv GLUE_PREFIX " + self.prefix print >> env_file, "setenv PATH " + self.install_scripts + ":${PATH}"
print >> env_file, "setenv GLUE_PREFIX " + glue_prefix print >> env_file, "setenv PATH " + glue_install_scripts + ":${PATH}"
def run(self):
print >> env_file, " setenv LD_LIBRARY_PATH " + self.install_platlib + ":${LD_LIBRARY_PATH}"
print >> env_file, " setenv LD_LIBRARY_PATH " + glue_install_platlib + ":${LD_LIBRARY_PATH}"
def run(self):
print >> env_file, " setenv LD_LIBRARY_PATH " + self.install_platlib
print >> env_file, " setenv LD_LIBRARY_PATH " + glue_install_platlib
def run(self):
print >> env_file, " setenv DYLD_LIBRARY_PATH " + self.install_platlib + ":${DYLD_LIBRARY_PATH}"
print >> env_file, " setenv DYLD_LIBRARY_PATH " + glue_install_platlib + ":${DYLD_LIBRARY_PATH}"
def run(self):
print >> env_file, " setenv DYLD_LIBRARY_PATH " + self.install_platlib
print >> env_file, " setenv DYLD_LIBRARY_PATH " + glue_install_platlib
def run(self):
def make_chunks(self,length=0,overlap=0,play=0,sl=0):
def make_chunks_bad_play(self,length=0,overlap=0,play=0,sl=0):
def make_chunks(self,length=0,overlap=0,play=0,sl=0): """ Divides the science segment into chunks of length seconds overlapped by overlap seconds. If the play option is set, only chunks that contain S2 playground data are generated. If the user has a more complicated way of generating chunks, this method should be over...
overlap seconds. If the play option is set, only chunks that contain S2 playground data are generated. If the user has a more complicated way of generating chunks, this method should be overriden in a sub-class. Any data at the end of the ScienceSegment that is too short to contain a chunk is ignored. The length of thi...
overlap seconds using the INCORRECT playground algorithm that may miss chunks. If the play option is set, only chunks that contain S2 playground data are generated. If the user has a more complicated way of generating chunks, this method should be overriden in a sub-class. Any data at the end of the ScienceSegment tha...
def make_chunks(self,length=0,overlap=0,play=0,sl=0): """ Divides the science segment into chunks of length seconds overlapped by overlap seconds. If the play option is set, only chunks that contain S2 playground data are generated. If the user has a more complicated way of generating chunks, this method should be over...
seg.make_chunks(length,overlap,play,sl) def make_chunks_from_unused(self,length,trig_overlap,play,min_length,sl=0):
seg.make_chunks_bad_play(length,overlap,play,sl) def make_chunks_from_unused_bad_play( self,length,trig_overlap,play,min_length,sl=0):
def make_chunks(self,length,overlap,play,sl=0): """ Divide each ScienceSegment contained in this object into AnalysisChunks. length = length of chunk in seconds. overlap = overlap between segments. play = if true, only generate chunks that overlap with S2 playground data. sl = slide by sl seconds before determining pla...
segment.
segment using the INCORRECT playground algorithm which may miss some chunks.
def make_chunks_from_unused(self,length,trig_overlap,play,min_length,sl=0): """ Create an extra chunk that uses up the unused data in the science segment. length = length of chunk in seconds. trig_overlap = length of time start generating triggers before the start of the unused data. play = if true, only generate chunk...
def make_chunks_from_unused(self,length,trig_overlap,play,min_length,sl=0): """ Create an extra chunk that uses up the unused data in the science segment. length = length of chunk in seconds. trig_overlap = length of time start generating triggers before the start of the unused data. play = if true, only generate chunk...
def make_chunks_from_unused(self,length,trig_overlap,play,min_length,sl=0): """ Create an extra chunk that uses up the unused data in the science segment. length = length of chunk in seconds. trig_overlap = length of time start generating triggers before the start of the unused data. play = if true, only generate chunk...
"process_id": "ilwd_char", "seg_def_map_id": "ilwd_char",
"process_id": "ilwd:char", "seg_def_map_id": "ilwd:char",
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
"process_id": "ilwd_char",
"process_id": "ilwd:char",
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
site = column(-1)
site = column[-1]
def get_column(self,column): if 'chirp_dist' in column: site = column(-1) return self.get_chirp_dist(site) else: return self.getColumnByName(column).asarray()
def get_chirp_dist(self,ref_mass = 1.40):
def get_chirp_dist(self,site,ref_mass = 1.40):
def get_chirp_dist(self,ref_mass = 1.40): mchirp = self.get_column('mchirp') eff_dist = self.get_column('eff_dist' + site) return eff_dist * (2.**(-1./5) * ref_mass / mchirp)**(5./6)
eff_dist = self.get_column('eff_dist' + site)
eff_dist = self.get_column('eff_dist_' + site)
def get_chirp_dist(self,ref_mass = 1.40): mchirp = self.get_column('mchirp') eff_dist = self.get_column('eff_dist' + site) return eff_dist * (2.**(-1./5) * ref_mass / mchirp)**(5./6)
self.tokenizer = re.compile(r"""(?:"([^"]*)")|(?:([^%s"]+))\s*%s""" % (self.getAttribute("Delimiter"), self.getAttribute("Delimiter")))
self.tokenizer = re.compile(r"""(?:"([^"]*)")\s*%s|(?:([^%s"]+))\s*%s""" % (self.getAttribute("Delimiter"), self.getAttribute("Delimiter"), self.getAttribute("Delimiter")))
def __init__(self, attrs): ligolw.Stream.__init__(self, attrs) self.tokenizer = re.compile(r"""(?:"([^"]*)")|(?:([^%s"]+))\s*%s""" % (self.getAttribute("Delimiter"), self.getAttribute("Delimiter"))) self.__attrindex = 0 self.__row = None self.pcdata = ""
self.__universe = 'scheduler'
self.__universe = 'local'
def __init__(self,cache_dir,log_dir,config_file,dax=0): """ @param cache_dir: the directory to write the output lal cache files to. @param log_dir: the directory to write the stderr file to. @param config_file: ConfigParser object containing the path to the LSCdataFind executable in the [condor] section and a [datafind...
self.cursor.execute(sql,(self.process_id,self.lfn_id,lfn,start,end))
self.cursor.execute(sql,(self.process_id,self.lfn_id[0],lfn,start,end))
def register_lfn(self,lfn,start=None,end=None): """ Start publishing state information for a new logical file name
self.__cp.get('calibration','H2-cal-epoch-boundary')):
self.job().get_config('calibration','H2-cal-epoch-boundary')):
def calibration(self): """ Set the path to the calibration cache file for the given IFO. During S2 the Hanford 2km IFO had two calibration epochs, so if the start time is during S2, we use the correct cache file. """ cal_path = self.job().get_config('calibration','path')
input += f.read(size=max_bytes,waitForBytes=2)
newinput = f.read(size=max_bytes,waitForBytes=2) logger.debug("read %s more chars" % len(newinput)) input += newinput
def handle(self): """ This method does all the work of servicing a request to the server. See the documentation for the standard module SocketServer.
def module_verify(): print "=== test infinity class" def test_inf_cmp(r,a,b): if cmp(a, b) == r: s = "pass: " else: s = "FAIL: " print s + "cmp(" + str(a) + ", " + str(b) + ") = " + str(cmp(a, b)) def test_inf_add(r,a,b): if a + b == r: s = "pass: " else: s = "FAIL: " print s + str(a) + " + " + str(b) + " = " + str...
def contract(self, x): """ For each segment in the list, move both the start and the end a distance x towards the other. Coalesce the result. """ return segmentlist([seg.contract(x) for seg in self]).coalesce()
tableName = "sngl_inspiralgroup:sngl_ringdown:table"
tableName = "sngl_ringdowngroup:sngl_ringdown:table"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
tableName = "sim_inspiralgroup:sim_ringdown:table"
tableName = "sim_ringdowngroup:sim_ringdown:table"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
tableName = "segment:table"
tableName = "segmentgroup:segment:table"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
"segnum": "int_4s", "insertion_time": "int_4s"
"segnum": "int_4s"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
tableName = "segment_def_map:table"
tableName = "segment_def_mapgroup:segment_def_map:table"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
"state_vec_map": "int_4s", "insertion_time": "int_4s"
"state_vec_map": "int_4s"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
tableName = "segment_definer:table"
tableName = "segment_definergroup:segment_definer:table"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
"run": "char_s", "ifos": "char_s",
"run": "lstring", "ifos": "lstring",
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
"state_vec_minor": "int_4s", "insertion_time": "int_4s"
"state_vec_minor": "int_4s"
def set_band(self, band): self.central_freq = (band[0] + band[1])/2.0 self.bandwidth = band.duration()
import from mx.ODBC.DB2 import SQL
else:
def destroy_thread_storage(): del _tss
i = self.childNodes.index(refchild)
for i, childNode in enumerate(self.childNodes): if childNode is refchild: break else: raise ValueError, refchild
def insertBefore(self, newchild, refchild): """ Insert a new child node before an existing child. It must be the case that refchild is a child of this node; if not, ValueError is raised. newchild is returned. """ i = self.childNodes.index(refchild) self.childNodes.insert(i, newchild) newchild.parentNode = self self._ve...
self.childNodes.remove(child)
for i, childNode in enumerate(self.childNodes): if childNode is child: self.childNodes.pop(i) break
def removeChild(self, child): """ Remove a child from this element. The child element is returned, and it's parentNode element is reset. If the child will not be used any more, you should call its unlink() method to promote garbage collection. """ self.childNodes.remove(child) child.parentNode = None return child
on this element to promote garbage collected.
on this element to promote garbage collection.
def unlink(self): """ Break internal references within the document tree rooted on this element to promote garbage collected. """ self.parentNode = None for child in self.childNodes: child.unlink() self.childNodes = []