Exemplo n.º 1
0
Arquivo: try.py Projeto: ronfe/emerios
__author__ = 'ronfe'
import sys, random
import string, datetime
sys.path.append('..')
from wheels import dc
import calendar

mock_events = dc.dbs('mockEvents')
user_attr = dc.dbs('userAttr')
user_list = user_attr.distinct("userId")

def send_point(data):
    mock_events.insert_one(data)


def randomword(length):
   return ''.join(random.choice(string.lowercase) for i in range(length))

def randomuser(times):
    global user_list
    # user_list = users.distinct("_id")
    return random.sample(user_list, times)

chains = ["enterGuidePage", "clickUserLogBtn"]

ceiling = 1000
random_chains = [1000]
for i in range(1):
    a = random.randint(1, ceiling)
    ceiling = a
    random_chains.append(a)
Exemplo n.º 2
0
__author__ = 'ronfe'

import networkx as nx
import sys, random
import string, datetime
sys.path.append('..')
from wheels import dc
import numpy as np

mock_events = dc.dbs('mockEvents')


def send_point(data):
    mock_events.insert_one(data)


dg = nx.DiGraph()

#-1 for quit app
dg.add_node(-1)

# 0 push notification alert 0-1 for "YES"/0.4 0-2 for "Dont allow"/0.6
dg.add_nodes_from([0, 1, 2])
dg.add_weighted_edges_from([(0, 1, 0.4), (0, 2, 0.6)])

# 3 guide page 1-3/1.0 2-3/1.0
# point 3 = enterGuidePage
# 4 for "start now" 5 for "register/login"
# 3-4/0.8 3-5/0.15 3--1/0.05
# point 4 = clickExperience
# point 5 = clickUserLogBtn
Exemplo n.º 3
0
__author__ = 'ronfe'

import networkx as nx
import sys, random
import string, datetime
sys.path.append('..')
from wheels import dc
import numpy as np

mock_events = dc.dbs('mockEvents')

def send_point(data):
    mock_events.insert_one(data)

dg = nx.DiGraph()

#-1 for quit app
dg.add_node(-1)

# 0 push notification alert 0-1 for "YES"/0.4 0-2 for "Dont allow"/0.6
dg.add_nodes_from([0,1,2])
dg.add_weighted_edges_from([(0,1,0.4), (0,2,0.6)])

# 3 guide page 1-3/1.0 2-3/1.0
# point 3 = enterGuidePage
# 4 for "start now" 5 for "register/login"
# 3-4/0.8 3-5/0.15 3--1/0.05
# point 4 = clickExperience
# point 5 = clickUserLogBtn
dg.add_nodes_from([3,4,5])
dg.add_weighted_edges_from([(1,3,1.0), (2,3,1.0)])
Exemplo n.º 4
0
Arquivo: try.py Projeto: ronfe/emerios
__author__ = 'ronfe'
import sys, random
import string, datetime
sys.path.append('..')
from wheels import dc
import calendar

mock_events = dc.dbs('mockEvents')
user_attr = dc.dbs('userAttr')
user_list = user_attr.distinct("userId")


def send_point(data):
    mock_events.insert_one(data)


def randomword(length):
    return ''.join(random.choice(string.lowercase) for i in range(length))


def randomuser(times):
    global user_list
    # user_list = users.distinct("_id")
    return random.sample(user_list, times)


chains = ["enterGuidePage", "clickUserLogBtn"]

ceiling = 1000
random_chains = [1000]
for i in range(1):