Perform the call and return the peak date and how many users
766583
def get_result(self):
        """"""
        result = get_json_from_remote_server(self.call)
        if result:
            date, value = max(result.iteritems(), key=itemgetter(1))
            return {'date': date, 'users': value}
        else:
            return {'date': "No Data", 'users': 0}
428780
def obStatus
     sendRequest( :obStatus )
     @serverVersion = getResponseElement("version")
     @serverUsers = getResponseElement("users")
     @serverGroups = getResponseElement("groups")
     @serverDatabases = getResponseElement("databases")
     @serverUptime = getResponseElement("uptime")
     @serverUpdays = getResponseElement("updays")
     @serverStatus = {
     "version" => @serverVersion.text,
     "users" => @serverUsers.text, 
     "groups" => @serverGroups.text, 
     "databases" => @serverDatabases.text, 
     "uptime" => @serverUptime.text, 
     "updays" => @serverUpdays.text 
     } 
   end
1187107
function call() {
		$args = func_get_args(); $fn = array_shift($args);
		try {
			$val = call_user_func_array($fn, $args);
			if ($val instanceof \Generator) return $this->spawn($val);
			$val = Promise::interpret( $val );
			if ($val instanceof PromiseInterface) {
				if ( $val->getState() === self::REJECTED ) $this->reject( GP\inspect($val)['reason'] );
				else $val->then( array($this,'resolve'), array($this,'reject') );
			} else {
				$this->resolve($val);
				return $val;
			}
		} catch (\Exception $e) {
			$this->reject($e);
		} catch (\Throwable $t) {
			$this->reject($t);
		}
		return $this;
	}
828878
def update(call_time, exclusive_time = nil)
      self.call_count += 1
      self.total_call_time += call_time
      self.total_exclusive_time += exclusive_time

      t = @scoped ? exclusive_time : call_time
      self.min_call_time = t if call_count == 0 || t < min_call_time
      self.max_call_time = t if t > max_call_time
    end
79949
def current(self):
        
        if not has_request_context():
            return self.no_req_ctx_user_stack.top
        user_stack = getattr(_request_ctx_stack.top, 'user_stack', None)
        if user_stack and user_stack.top:
            return user_stack.top
        return _get_user()
228296
public function call() {
    $sessionId = $this->getApp()->getRequest()->headers('SESSION');
    
    $foundSession = call_user_func($this->sessionModelClass . '::init', $this->getApp());
    if($foundSession->findById($sessionId)) {
      $this->session = $foundSession;
      $this->getApp()->getRequest()->session = $this->session;
      $now = new \DateTime('now');
      $this->session->lastAccessed = $now;

      $user = User::init($this->getApp());
      $user->findById($this->session->userId);
      $user->lastAccessed = $now;
      $user->save();

      $this->session->user = $user;
    }

    if (!empty($this->next)) {
      $this->next->call();
    }
  }
970819
def log_api_call(self):
        """"""
        history = self.get_history()
        history.amount_api_calls += 1
        self._history = history.save()
        return history
1105952
def num_signups(self):
        """"""
        return EighthSignup.objects.filter(scheduled_activity__block=self, user__in=User.objects.get_students()).count()
1010053
def calls(self, call):
        
        exp = self._get_current_call()
        exp.call_replacement = call
        return self
1003948
public int getNbOfSmsByAppAndAccountAndDate(final Application application, final Account account,
						final Date startDate, final Date endDate) {
		final Session currentSession = getCurrentSession();
		final Criteria criteria = currentSession.createCriteria(Sms.class);
		criteria.add(Restrictions.eq(Sms.PROP_APP, application));
		criteria.add(Restrictions.eq(Sms.PROP_ACC, account));
		criteria.add(Restrictions.between(Sms.PROP_DATE, startDate, endDate));
		
		criteria.setProjection(Projections.rowCount());
		final Integer count = (Integer) criteria.uniqueResult();
		return count.intValue();
	}
1284311
def call( severity, time, progname, msg )
      return if msg.blank? || _silence?( msg )

      msg = [
        _tagged( time, :timestamp ),
        _tagged( progname, :progname ),
        formatted_severity_tag( severity ),
        formatted_message( severity, msg )
      ].compact.join(" ")

      super severity, time, progname, msg
    end
1374141
public function call()
    {
        if (empty($this->callback) || !is_callable($this->callback)) {
            return false;
        }
        $params = array_merge($this->params, func_get_args());

        return call_user_func_array($this->callback, $params);
    }
1181524
def call(severity, time, progname, msg)
      sprintf("%s: %s\n", time.strftime("%H:%M:%S"), hide_inputs(msg2str(msg)))
    end
297374
def fetch(self):
        
        params = values.of({})

        payload = self._version.fetch(
            'GET',
            self._uri,
            params=params,
        )

        return CallSummaryInstance(self._version, payload, call_sid=self._solution['call_sid'], )
1348463
async def runs(self, date: datetime.date = None, days: int = None) -> list:
        """"""
        endpoint = 'watering/past'

        if date and days:
            endpoint = '{0}/{1}/{2}'.format(
                endpoint, date.strftime('%Y-%m-%d'), days)

        data = await self._request('get', endpoint)
        return data['pastValues']
625240
def _perform_call(self, query_url, default_response=None, timeout=10):
        """"""
        try:
            response = requests.get(query_url, timeout=timeout)
        except socket.timeout:
            current_plugin.logger.warning("Timeout contacting Piwik server")
            return default_response
        except Exception:
            current_plugin.logger.exception("Unable to connect")
            return default_response
        return response.content
5491
def _call(self, x):
        """"""
        return sum(fi(xi) for xi, fi in zip(x, self.functionals))