Parameters
        ----------
        str_timestamps_with_sil_conf : [[str, str, str, str]]
            Of the form [[word, starting_sec, ending_sec, confidence]]

        Returns
        -------
        timestamps : [[str, float, float]]
497273
def _timestamp_extractor_cmu(self, staging_audio_basename,
                                 str_timestamps_with_sil_conf):
        
        filter_untimed = filter(lambda x: len(x) == 4,
                                str_timestamps_with_sil_conf)
        if filter_untimed != str_timestamps_with_sil_conf:
            self.__errors[
                (time(), staging_audio_basename)
            ] = str_timestamps_with_sil_conf
        str_timestamps = [
            str_timestamp[:-1]
            for str_timestamp in filter_untimed
            if not any([letter in {"<", ">", "/"}
                        for letter in ''.join(str_timestamp)])]
        timestamps = list([
            _WordBlock(
                word=re.findall("^[^\(]+", x[0])[0],
                start=round(float(x[1]), 2),
                end=round(float(x[2]), 2)
            ) for x in str_timestamps])
        return timestamps
115326
def convert_timestamps(files):
    ''''''

    sentences = []

    for f in files:

        if not f.endswith('.transcription.txt'):
            f = f + '.transcription.txt'

        if os.path.exists(f) is False:
            continue

        with open(f, 'r') as infile:
            lines = infile.readlines()

        lines = [re.sub(r'\(.*?\)', '', l).strip().split(' ') for l in lines]
        lines = [l for l in lines if len(l) == 4]

        seg_start = -1
        seg_end = -1

        for index, line in enumerate(lines):
            word, start, end, conf = line
            if word == '<s>' or word == '<sil>' or word == '</s>':
                if seg_start == -1:
                    seg_start = index
                    seg_end = -1
                else:
                    seg_end = index

                if seg_start > -1 and seg_end > -1:
                    words = lines[seg_start+1:seg_end]
                    start = float(lines[seg_start][1])
                    end = float(lines[seg_end][1])
                    if words:
                        sentences.append({'start': start, 'end': end, 'words': words, 'file': f})
                    if word == '</s>':
                        seg_start = -1
                    else:
                        seg_start = seg_end
                    seg_end = -1

    return sentences
1084223
def parse(timestring):
    
    for parser in _PARSERS:
        match = parser['pattern'].match(timestring)
        if match:
            groups = match.groups()
            ints = tuple(map(int, groups))
            time = parser['factory'](ints)
            return time

    raise TimeError('Unsupported time format {}'.format(timestring))
604050
def local_list(timestamps=True):
    
    init_storage()
    lst = []
    for d in glob(os.path.join(DICTS_PATH, '*.txt')):
        name = d.split('/')[-1].replace('.txt', '')
        lst.append((name, os.path.getmtime(d)) if timestamps else name)

    return lst
323057
def _GetLoadConfigTimestamp(self, pefile_object):
    
    if not hasattr(pefile_object, 'DIRECTORY_ENTRY_LOAD_CONFIG'):
      return None
    timestamp = getattr(
        pefile_object.DIRECTORY_ENTRY_LOAD_CONFIG.struct, 'TimeDateStamp', 0)
    return timestamp
1191665
def _format_return_timestamps(self, return_timestamps=None):
        
        if return_timestamps is None:
            # Build based upon model file Start, Stop times and Saveper
            # Vensim's standard is to expect that the data set includes the `final time`,
            # so we have to add an extra period to make sure we get that value in what
            # numpy's `arange` gives us.
            return_timestamps_array = np.arange(
                self.components.initial_time(),
                self.components.final_time() + self.components.saveper(),
                self.components.saveper(), dtype=np.float64
            )
        elif inspect.isclass(range) and isinstance(return_timestamps, range):
            return_timestamps_array = np.array(return_timestamps, ndmin=1)
        elif isinstance(return_timestamps, (list, int, float, np.ndarray)):
            return_timestamps_array = np.array(return_timestamps, ndmin=1)
        elif isinstance(return_timestamps, _pd.Series):
            return_timestamps_array = return_timestamps.as_matrix()
        else:
            raise TypeError('`return_timestamps` expects a list, array, pandas Series, '
                            'or numeric value')
        return return_timestamps_array
740836
def get_timestamp(str_len=13):
    
    if isinstance(str_len, integer_types) and 0 < str_len < 17:
        return builtin_str(time.time()).replace(".", "")[:str_len]

    raise ParamsError("timestamp length can only between 0 and 16.")
1371528
def _format_strings(self):
        

        values = self.values
        return [val.strftime('%Y-%m-%d %H:%M:%S') if val is not None else self.nat_rep for val in values]
1311537
def rfc_from_timestamp(timestamp):
    
    last_modified_date = datetime.utcfromtimestamp(timestamp)
    last_modified_str = last_modified_date.strftime(
        '%a, %d %b %Y %H:%M:%S GMT')
    return last_modified_str
460215
def unixtime2str(timestamp, fmt='%Y-%m-%d %H:%M:%S'):
    
    dt = None
    try:
        timestamp = time.localtime(timestamp)
        dt = time.strftime(fmt, timestamp)
    except Exception as err:
        print(err)
    return dt
256837
def get_block_from_time(self, timestring, error_margin=10):
        
        known_block = self.get_current_block()['block_num']
        known_block_timestamp = self.block_timestamp(known_block)
        timestring_timestamp = parse_time(timestring).timestamp()
        delta = known_block_timestamp - timestring_timestamp
        block_delta = delta / 3
        guess_block = known_block - block_delta
        guess_block_timestamp = self.block_timestamp(guess_block)
        error = timestring_timestamp - guess_block_timestamp
        while abs(error) > error_margin:
            guess_block += error / 3
            guess_block_timestamp = self.block_timestamp(guess_block)
            error = timestring_timestamp - guess_block_timestamp
        return int(guess_block)
389600
function timestamp () {
  const date = new Date()

  return [
    zeropad(date.getHours()),
    zeropad(date.getMinutes()),
    zeropad(date.getSeconds())
  ].join(':')
}
1334288
def timesince(self, now=None):
        
        return djtimesince(self.timestamp, now).encode('utf8').replace(b'\xc2\xa0', b' ').decode('utf8')
792658
static function sGetMicrotime()
    {
        list ($usec, $sec) = explode(" ", microtime());
        return (( float )$usec + ( float )$sec);
    }
847819
def type_and_times(type_: str, start: Timestamp, end: Timestamp, probability: Number = None) -> str:
    
    if not type_:
        return ''
    if type_ == 'BECMG':
        return f"At {start.dt.hour or 'midnight'} zulu becoming"
    ret = f"From {start.dt.hour or 'midnight'} to {end.dt.hour or 'midnight'} zulu,"
    if probability and probability.value:
        ret += f" there's a {probability.value}% chance for"
    if type_ == 'INTER':
        ret += ' intermittent'
    elif type_ == 'TEMPO':
        ret += ' temporary'
    return ret
786319
def _convert_asset_timestamp_fields(dict_):
    
    for key in _asset_timestamp_fields & viewkeys(dict_):
        value = pd.Timestamp(dict_[key], tz='UTC')
        dict_[key] = None if isnull(value) else value
    return dict_
762553
def initial_security_hash(self, timestamp):
        

        initial_security_dict = {
            'content_type': str(self.target_object._meta),
            'object_pk': str(self.target_object._get_pk_val()),
            'timestamp': str(timestamp),
        }
        return self.generate_security_hash(**initial_security_dict)