<commit_before>__author__ = 'chris'
import redis, json
import time, datetime

class Activity_stream(object):
    #def __init__(self):
        #self.created = str(datetime.datetime.now())

    def activity(self, actor, verb, target, user_id):
        published = str(datetime.datetime.now())

        # Necesito inicializar una lista desde redis ????
        r = redis.StrictRedis(host='localhost', port=6379, db=0)
        #r.set("counter", 0)
        #activity_list=[]


        counter = int(r.get("counter")) + 1
        r.set("counter", counter)
        user_string = user_id +":"+ str(counter)
        d = {"user:"+user_string:{"published":published,
                                                    "actor":{"objectType":actor, "id":user_id},
                                            "verb":verb,
                                            "object":{"objectType":"evospaceApp",
                                                                    "displayName":"evospace interactive"},
                                            "target": {"objectType": target,
                                                          "displayName": target}}}
        r.lpush("activity_list", str(d))
        #print "$$$$$$$$$$$$$$$$$$$$$$"
        #print "activity list"
        r.lpush("user:"+user_id, str(d))


        #user_activity = r.lrange("activity_list", 0, -1)

        #print "################"
        #user_list = r.lrange("user:"+user_id, 0, -1)

        m = "user activity added!"

        #print m
        #print user_list
        #print user_activity
        #print len()

<commit_msg>static root url<commit_after>__author__ = 'chris'
import  json
import time, datetime
from store import redis
r=redis

class Activity_stream(object):
    #def __init__(self):
        #self.created = str(datetime.datetime.now())

    def activity(self, actor, verb, target, user_id):
        published = str(datetime.datetime.now())

        # Necesito inicializar una lista desde redis ????
        #r = redis.StrictRedis(host='localhost', port=6379, db=0)
        #r.set("counter", 0)
        #activity_list=[]


        counter = int(r.get("counter")) + 1
        r.set("counter", counter)
        user_string = user_id +":"+ str(counter)
        d = {"user:"+user_string:{"published":published,
                                                    "actor":{"objectType":actor, "id":user_id},
                                            "verb":verb,
                                            "object":{"objectType":"evospaceApp",
                                                                    "displayName":"evospace interactive"},
                                            "target": {"objectType": target,
                                                          "displayName": target}}}
        r.lpush("activity_list", str(d))
        #print "$$$$$$$$$$$$$$$$$$$$$$"
        #print "activity list"
        r.lpush("user:"+user_id, str(d))


        #user_activity = r.lrange("activity_list", 0, -1)

        #print "################"
        #user_list = r.lrange("user:"+user_id, 0, -1)

        m = "user activity added!"

        #print m
        #print user_list
        #print user_activity
        #print len()


{'fraction_non_alphanumeric': 0.15187132694092176, 'fraction_numerical': 0.006804825239715435, 'mean_word_length': 1.5872, 'pattern_counts': {'":': 24, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1316045', 'n_tokens_mistral': 877, 'n_tokens_neox': 835, 'n_words': 176}