ruby
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 62 columns, instead of 13. in line 1.
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
time,_card_id,_user_id,analytics_version,assigned_to_user_id,attributes,average_rating,card_author_full_name,card_author_id,card_bookmark_id,card_duration,card_id,card_level,card_rating,card_resource_url,card_state,card_subtype,card_title,card_type,changed_column,channel_id,channel_name,comment_id,comment_message,comment_type,ecl_id,ecl_source_name,event,event_recorder,is_admin_request,is_card_promoted,is_channel_curated,is_channel_featured,is_channel_public,is_correct,is_live_stream,is_public,is_system_generated,is_user_generated,journey_id,journey_name,new_val,old_val,org_hostname,org_id,org_name,pathway_id,pathway_name,pin_id,platform,platform_version_number,poll_option_id,poll_option_label,quiz_option_id,quiz_option_label,readable_card_type,shared_to_user_id,team_id,user_agent,user_full_name,user_handle,user_id | |
2019-04-19T01:44:05.408710236Z,3554232,115112,2.0.0,4,SOME USER,112319,0,3554232,https://www.youtube.com/watch?v=5FUdrBq-WFo,published,video,Selenium Tutorial For Beginners | What Is Selenium? | Se |
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
1970-01-01 - card_added_to_channel | |
2015-12-03 - channel_followed | |
2015-12-03 - user_followed | |
2016-01-06 - user_unfollowed | |
2016-04-06 - group_user_added | |
2016-09-02 - card_assigned | |
2016-12-06 - channel_created | |
2016-12-23 - channel_unfollowed | |
2017-01-03 - group_created | |
2017-01-04 - card_added_to_pathway |
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
package main | |
import "fmt" | |
type myType struct { | |
fn func(int) int | |
} | |
func main () { | |
inst := myType{fn: func(i int) int { return i }} |
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
( | |
SELECT | |
SUM(smartbites_created_count) AS smartbites_created, | |
SUM(smartbites_consumed_count) AS smartbites_consumed, | |
AVG(user_metrics_aggregations.time_spent_minutes) AS average_session, | |
COUNT(DISTINCT(teams_users.user_id)) AS total_users, | |
teams.id AS team_id, | |
COUNT(DISTINCT(teams_users.user_id)) AS active_users, | |
COUNT(DISTINCT(teams_users.user_id)) AS new_users | |
FROM user_metrics_aggregations |
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
SELECT | |
'' AS smartbites_created, | |
'' AS smartbites_consumed, | |
'' AS average_session, | |
'' AS total_users, | |
teams.id AS team_id, | |
COUNT(DISTINCT(teams_users.user_id)) AS active_users | |
FROM user_metrics_aggregations | |
INNER JOIN users ON users.id = user_metrics_aggregations.user_id | |
INNER JOIN teams_users ON teams_users.user_id = users.id |
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>...] |
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
using Fluent; | |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using System.Linq; | |
public class RobotDialog : FluentScript | |
{ | |
public override FluentNode Create() |
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
NewerOlder