Return the Location decoding this id_dict and run
15057
def _from_deprecated_son(cls, id_dict, run):
        
        course_key = CourseLocator(
            id_dict['org'],
            id_dict['course'],
            run,
            id_dict['revision'],
            deprecated=True,
        )
        return cls(course_key, id_dict['category'], id_dict['name'], deprecated=True)
723644
def decode(self, ids):
    """"""
    ids = text_encoder.pad_decr(ids)
    subword_ids = ids
    del ids

    subwords = []

    # Some ids correspond to bytes. Because unicode characters are composed of
    # possibly multiple bytes, we attempt to decode contiguous lists of bytes
    # all together. Invalid byte sequences are replaced with the unicode
    # replacement (i.e. unknown) character U+FFFD.
    prev_bytes = []

    def consume_prev_bytes():
      if prev_bytes:
        bytestr = b"".join(prev_bytes)
        bytes_text = bytestr.decode("utf-8", "replace")
        subwords.append(bytes_text)
      return []

    for subword_id in subword_ids:
      subword = self._id_to_subword(subword_id)
      if isinstance(subword, six.binary_type):
        # Byte-encoded
        prev_bytes.append(subword)
      else:
        # If there were bytes previously, convert to unicode.
        prev_bytes = consume_prev_bytes()
        trimmed, add_space = _trim_underscore_and_tell(subword)
        subwords.append(trimmed)
        if add_space:
          subwords.append(" ")
    # If there were trailing bytes, convert to unicode.
    prev_bytes = consume_prev_bytes()

    return tf.compat.as_text("".join(subwords))
909827
def todict(self):
        '''
        '''
        r = {}
        r.update(self._buf)
        if self.start_addr:
            r['start_addr'] = self.start_addr
        return r
67887
def location (self, pos):
    
    result = ''
    if self.filename:
      result += self.filename + ':'
    if pos:
      result += str(pos)
    return result
107088
def get(self, run_id):
        
        config = _read_json(_path_to_config(self.directory, run_id))
        run = _read_json(_path_to_run(self.directory, run_id))
        try:
            info = _read_json(_path_to_info(self.directory, run_id))
        except IOError:
            info = {}

        return _create_run(run_id, run, config, info)
1019190
def get_jid(jid):
    '''
    
    '''
    serv = _get_serv(ret=None)

    sql = "select id, full_ret from returns where jid = '{0}'".format(jid)

    data = serv.query(sql)
    ret = {}
    if data:
        points = data[0]['points']
        for point in points:
            ret[point[3]] = salt.utils.json.loads(point[2])

    return ret
1170487
def location_id=(location_id)
      if location_id.nil?
        fail ArgumentError, "location_id cannot be nil"
      end

      if location_id.to_s.length < 1
        fail ArgumentError, "invalid value for 'location_id', the character length must be great than or equal to 1."
      end

      @location_id = location_id
    end
520718
def location(self):
        
        if not hasattr(self, '_loc'):
            self._loc = conf.lib.clang_getCursorLocation(self)

        return self._loc
53639
def _get_stored_location(self):
        
        location_storage = storage_class(request=self.request, response=None)
        return location_storage.get()
1209132
def location(self):
        """"""
        try:
            return self.data.get('identity').get('location')
        except (KeyError, AttributeError):
            return self.device_status_simple('')
458942
def getuname(self, uid):
        
        uid = int(uid)
        try:
            return self.uidsmap[uid]
        except KeyError:
            pass

        try:
            name = pwd.getpwuid(uid)[0]
        except (KeyError, AttributeError):
            name = "uid=%d" % uid

        self.uidsmap[uid] = name
        return name
1215060
def runGetDataset(self, id_):
        
        dataset = self.getDataRepository().getDataset(id_)
        return self.runGetRequest(dataset)
11260
def location(ip=None, key=None, field=None):
    '''  
    '''

    if field and (field not in field_list):
        return 'Invalid field'

    if field:
        if ip:
            url = 'https://ipapi.co/{}/{}/'.format(ip, field)
        else:
            url = 'https://ipapi.co/{}/'.format(field)
    else:
        if ip:
            url = 'https://ipapi.co/{}/json/'.format(ip)
        else:
            url = 'https://ipapi.co/json/'

    if key or API_KEY:
        url = '{}?key={}'.format(url, (key or API_KEY))

    response = get(url, headers=headers)

    if field:
        return response.text
    else:
        return response.json()
560844
function() {
                    var hash = window.location.hash.substring(1),
                        params = {};

                    if (hash.length < 5) {
                        return params;
                    }

                    var vars = hash.split('&');
                    for (var i = 0; i < vars.length; i++) {
                        if (!vars[i]) {
                            continue;
                        }
                        var pair = vars[i].split('=');
                        if (pair.length < 2) {
                            continue;
                        }
                        params[pair[0]] = pair[1];
                    }

                    if (params.gid) {
                        params.gid = parseInt(params.gid, 10);
                    }

                    return params;
                }
758228
def get_processed_path(self):
        
        location = self.get_storage().location
        return self.get_processed_key_name()[len(location):]
673901
def getLocalID(self):
        """"""
        # I looked at this conditional and thought "ah-hah! there's the bug!"
        # but Python actually makes that one big expression somehow, i.e.
        # "x is x is x" is not the same thing as "(x is x) is x".
        # That's pretty weird, dude.  -- kmt, 1/07
        if (self.local_id is self.canonicalID is None):
            return self.claimed_id
        else:
            return self.local_id or self.canonicalID
1162418
def _locate(self, idx):
        
        start = idx * self._width
        end = (idx + 1) * self._width
        sbyte, sbit = divmod(start, 8)
        ebyte = BinInt(end).ceildiv(8)
        return sbyte, sbit, ebyte