// GetRecentActivity return recent activity.
165316
func (i *Instagram) GetRecentActivity() (*RecentActivity, error) {

	endpoint := APIURL + "/news/inbox/?"

	resp, err := i.request("GET", endpoint, nil)
	if err != nil {
		return nil, err
	}

	var object *RecentActivity
	err = json.Unmarshal(resp, &object)
	if err != nil {
		return nil, err
	}

	return object, nil
}
446962
func (i *Import) GetPercent() int {
	if i == nil || i.Percent == nil {
		return 0
	}
	return *i.Percent
}
39528
func (c *Client) RespondActivityTaskCompleted(request RespondActivityTaskCompletedRequest) error {
	err := c.swfReqNoResponse("RespondActivityTaskCompleted", request)
	return err
}
1272763
func CpuRestGetPercent(context *gin.Context) {
	body, err := cpu.ServiceGetPercent()
	util.RestHandleResponse(context, body, err)
}
939021
func (r *RepositoryVulnerabilityAlertEvent) GetAction() string {
	if r == nil || r.Action == nil {
		return ""
	}
	return *r.Action
}
1272462
func (t *trackingConn) UpdateClientActivity() {
	t.Lock()
	defer t.Unlock()
	t.lastActive = t.clock.Now().UTC()
}
320698
func OnActivityCanceled(activityName string, deciders ...Decider) Decider {
	return OnActivityEvents(activityName, []string{
		swf.EventTypeActivityTaskCanceled,
	}, deciders...)
}
1305578
func (c *ConfigurationData) GetUserDeactivationInactivityPeriodDays() time.Duration {
	return time.Duration(c.v.GetInt(varUserDeactivationInactivityPeriodDays)) * 24 * time.Hour
}
1019163
func (e *Element) getCenter() (int, int, error) {
	points, err := e.Dimensions()
	if err != nil {
		return 0, 0, err
	}

	x, y, err := centroid(points)
	if err != nil {
		return 0, 0, err
	}
	return x, y, nil
}
518220
func (r *RepositoryEvent) GetAction() string {
	if r == nil || r.Action == nil {
		return ""
	}
	return *r.Action
}
933945
func OnActivityTimedOut(activityName string, deciders ...Decider) Decider {
	return OnActivityEvents(activityName, []string{
		swf.EventTypeActivityTaskTimedOut,
	}, deciders...)
}
1242653
func getActualResources(client *api.Client, runningAllocs []*api.Allocation, node *api.Node) ([]string, error) {
	// Compute the total
	total := computeNodeTotalResources(node)

	// Get Resources
	var cpu float64
	var mem uint64
	for _, alloc := range runningAllocs {
		// Make the call to the client to get the actual usage.
		stats, err := client.Allocations().Stats(alloc, nil)
		if err != nil {
			return nil, err
		}

		cpu += stats.ResourceUsage.CpuStats.TotalTicks
		mem += stats.ResourceUsage.MemoryStats.RSS
	}

	resources := make([]string, 2)
	resources[0] = "CPU|Memory"
	resources[1] = fmt.Sprintf("%v/%d MHz|%v/%v",
		math.Floor(cpu),
		*total.CPU,
		humanize.IBytes(mem),
		humanize.IBytes(uint64(*total.MemoryMB*bytesPerMegabyte)))

	return resources, nil
}
70091
func (t *Template) GetAllAWSStepFunctionsActivityResources() map[string]*resources.AWSStepFunctionsActivity {
	results := map[string]*resources.AWSStepFunctionsActivity{}
	for name, untyped := range t.Resources {
		switch resource := untyped.(type) {
		case *resources.AWSStepFunctionsActivity:
			results[name] = resource
		}
	}
	return results
}
403227
func (r *Region) GetEndpoint() string {
	return fmt.Sprintf("%s://%s", r.Protocl, r.CurrentUseEndpoint)
}
283584
func (d *DeployKeyEvent) GetAction() string {
	if d == nil || d.Action == nil {
		return ""
	}
	return *d.Action
}
490520
func (c *Client) RespondActivityTaskCanceled(request RespondActivityTaskCanceledRequest) error {
	err := c.swfReqNoResponse("RespondActivityTaskCanceled", request)
	return err
}
1036220
func (pool *ObjectPool) GetNumActive() int {
	return pool.allObjects.Size() - pool.idleObjects.Size()
}