asdasdasddsvsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### AWS setup | |
#### General setup | |
1. Make sure python 2.7 is installed: | |
- `python --version` | |
2. Make sure pip is installed | |
- `brew install pip` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Subclass | |
def self.included(base) | |
base.const_set "Subclass", Class.new | |
end | |
end | |
class Foo | |
include Subclass | |
end |
tags: user_id=1028
time total_user_score smartbites_commented_count smartbites_completed_count smartbites_created_count smartbites_consumed_count smartbites_liked_count total_smartbite_score time_spent_minutes
---- ---------------- -------------------------- -------------------------- ------------------------ ------------------------- ---------------------- --------------------- ------------------
1519603200000000000 4
We have user_scores_daily
created every day for every user. Each of these records has a _user_id
tag and some numeric fields.
Each user belongs to multiple "groups" (i.e. teams).
We also want to get group_scores_daily
, which containns the sum of user_scores_daily
fields for all users in each group (per day).
We currently do this in a background job with Ruby. It runs every day and combines data using two separate Influx queries.
- We get a mapping of group_id => user_ids
This is the continuous query we run to get daily aggregations of user_scores. There is a unique record produced per user per day.
SELECT
MEAN(total_user_score) AS total_user_score,
MEAN(smartbites_commented_count) AS smartbites_commented_count,
MEAN(smartbites_completed_count) AS smartbites_completed_count,
MEAN(smartbites_created_count) AS smartbites_created_count,
MEAN(smartbites_consumed_count) AS smartbites_consumed_count,
MEAN(smartbites_liked_count) AS smartbites_liked_count,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Fluent; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
public class RobotDialog : FluentScript | |
{ | |
public override FluentNode Create() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
def a(arg) | |
b(c(arg)) | |
end | |
def b(arg) | |
do_expensive_thing(arg) | |
end | |
def c(arg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"tags": { | |
"org_id": <org id>, | |
"channel_id": <channel id>, | |
"top_cards": [<top cards records>...], | |
"top_contributors": [<top contributors records>...], | |
"top_scoring_users: [<top scoring user records>...], | |
}, | |
"values": [<channel aggregation records>...] |
OlderNewer