Get the state(s) of an account at a particular point in history
        Returns [{...}]
977322
def GET_account_at(self, path_info, account_addr, block_height):
        
        if not check_account_address(account_addr):
            return self._reply_json({'error': 'Invalid address'}, status_code=400)

        try:
            block_height = int(block_height)
            assert check_block(block_height)
        except:
            return self._reply_json({'error': 'Invalid block height'}, status_code=400)

        blockstackd_url = get_blockstackd_url()
        res = blockstackd_client.get_account_at(account_addr, block_height, hostport=blockstackd_url)
        if json_is_error(res):
            log.error("Failed to list account history for {} at {}: {}".format(account_addr, block_height, res['error']))
            return self._reply_json({'error': 'Failed to get account state for {} at {}'.format(account_addr, block_height)}, status_code=res.get('http_status', 500))

        self._reply_json(res)
        return
1008772
def GET_account_record(self, path_info, account_addr, token_type):
        
        if not check_account_address(account_addr):
            return self._reply_json({'error': 'Invalid address'}, status_code=400)

        if not check_token_type(token_type):
            return self._reply_json({'error': 'Invalid token type'}, status_code=400)

        blockstackd_url = get_blockstackd_url()
        res = blockstackd_client.get_account_record(account_addr, token_type, hostport=blockstackd_url)
        if json_is_error(res):
            log.error("Failed to get account state for {} {}: {}".format(account_addr, token_type, res['error']))
            return self._reply_json({'error': 'Failed to get account record for {} {}: {}'.format(token_type, account_addr, res['error'])}, status_code=res.get('http_status', 500))

        self._reply_json(res)
        return
146542
def state(self):
        
        return dict(
            (attr, getattr(self, attr))
            for attr in (
                'consumer_key', 'consumer_secret', 'callback_uri',
                'verified', 'oauth_token', 'oauth_token_secret',
                'oauth_session_handle', 'oauth_expires_at',
                'oauth_authorization_expires_at', 'scope'
            )
            if getattr(self, attr) is not None
        )
279737
function getHistory(context) {
  if (!historyMap.has(context)) {
    clear(context);
  }
  return historyMap.get(context);
}
287601
function(s){
      var currentState = history[historyIndex];
      if(typeof s === 'function'){
        s = s( history[historyIndex].toJS() );
      }

      var newState = currentState.merge(s);
      history = history.slice(0,historyIndex + 1);
      history.push(newState);
      historyIndex++;
      return new Immutable.Map(history[historyIndex]).toJS();
    }
1208674
def get_state(self, caller):
        

        if caller in self.state:
            return self.state[caller]
        else:
            rv = self.state[caller] = DictObject()
            return rv
95023
def previous(self):
        
        return self.model.state.get_entity(
            self.entity_type, self.entity_id, self._history_index - 1,
            connected=False)
153407
def rpc_get_account_history(self, address, page, **con_info):
        
        if not check_account_address(address):
            return {'error': 'Invalid address', 'http_status': 400}

        if not check_count(page):
            return {'error': 'Invalid page', 'http_status': 400}

        # must be b58
        if is_c32_address(address):
            address = c32ToB58(address)

        db = get_db_state(self.working_dir)
        page_size = 20
        account_history = db.get_account_history(address, offset=(page * page_size), count=page_size)
        db.close()

        # return credit_value and debit_value as strings, so the unwitting JS developer doesn't get confused
        # as to why large balances get mysteriously converted to doubles.
        ret = [self.export_account_state(hist) for hist in account_history]
        return self.success_response({'history': ret})
636598
function getState(ruleId) {
      var ranges = ruleId ? scope[ruleId] : globals

      if (ranges && ranges.length !== 0) {
        return ranges[ranges.length - 1].state
      }

      if (!ruleId) {
        return !reset
      }

      if (reset) {
        return enable.indexOf(ruleId) !== -1
      }

      return disable.indexOf(ruleId) === -1
    }
1201786
def get_account_history(self, address, offset=None, count=None):
        
        cur = self.db.cursor()
        return namedb_get_account_history(cur, address, offset=offset, count=count)
399857
function state(list, sortMethod)
{
  var isNamedList = !Array.isArray(list)
    , initState =
    {
      index    : 0,
      keyedList: isNamedList || sortMethod ? Object.keys(list) : null,
      jobs     : {},
      results  : isNamedList ? {} : [],
      size     : isNamedList ? Object.keys(list).length : list.length
    }
    ;

  if (sortMethod)
  {
    // sort array keys based on it's values
    // sort object's keys just on own merit
    initState.keyedList.sort(isNamedList ? sortMethod : function(a, b)
    {
      return sortMethod(list[a], list[b]);
    });
  }

  return initState;
}
1167183
def get_review_history_statuses(instance, reverse=False):
    
    review_history = getReviewHistory(instance, reverse=reverse)
    return map(lambda event: event["review_state"], review_history)
490193
function getInitialState() {
  if (!window.localStorage) {
    return undefined;
  }

  const storedState = window.localStorage.getItem(storeKey);

  if (!storedState) {
    return undefined;
  }

  const normalisedState = storedState.replace(new RegExp('"isFetching":true', 'g'), '"isFetching":false');
  return JSON.parse(normalisedState);
}
133931
def history(self):
        ''' 
        '''
        url= 'https://coincheck.com/api/exchange/orders/transactions'
        headers = make_header(url,access_key=self.access_key,secret_key=self.secret_key)
        r = requests.get(url,headers=headers)
        return json.loads(r.text)
67052
def history(self, dates=None, linreg_since=None, lin_reg_days=20):
        '''
        
        '''
        dates = dates or self.get_dates_range()
        vals = [self.on_date(dt, only_count=True) for dt in dates]
        ret = Series(vals, index=dates)
        if linreg_since is not None:
            ret = self._linreg_future(ret, linreg_since, lin_reg_days)
        return ret.sort_index()
986642
def get_history(self):
        """"""
        self.load_history()
        return map(lambda x: (x, self.history[x]), self.ordered_history)
992351
function getAccountStoreModel(accountStore) {
  var provider = accountStore.provider;

  return {
    href: accountStore.href,
    name: accountStore.name,
    provider: {
      href: provider.href,
      providerId: provider.providerId,
      callbackUri: provider.callbackUri,
      clientId: provider.clientId
    }
  };
}