Exemplo n.º 1
0
class UserCfg(JsonSchemaMixin):
    email: str = field(
        metadata={
            "description": "email of the user e.g. [email protected]"
        })
    password: str = field(metadata={"description": "password for the user "})
    tag: str = field(metadata=JsonSchemaMeta({
        "description":
        "The users tag, expected to be unique between users",
        "examples": [
            "Partisan Right", "White Identitarian", "Provocative Anti-SJW",
            "Anti-theist", "Religious Conservative", "Partisan Left", "MRA",
            "Anti-SJW", "Socialist", "Center/Left MSM", "Libertarian",
            "Conspiracy", "Social Justice"
        ]
    }))
    telephone_number: Optional[str] = field(
        default=None,
        metadata=JsonSchemaMeta(
            description="telephone number to verify account ", required=False))
    notify_discord_user_id: Optional[int] = field(
        default=None,
        metadata=JsonSchemaMeta(
            description=
            "the user id (e.g. 123465448467005488) in discord to notify",
            required=False))
Exemplo n.º 2
0
class Cfg(JsonSchemaMixin):
    '''UserScrape configuration'''

    users: List[UserCfg] = field(metadata={
                                 "description": "the YouTube viewing users in the experiment. Contains credentials and other information"})

    headless: bool = field(metadata={
                           "description": "When true, selenium will run without an interactive browser showing. Must be true when running in a container"})

    discord: DiscordCfg = field(metadata={
        "description": "configuration for the discord bot used to request user validation"})

    seqUrl: str = field(metadata=JsonSchemaMeta({
        "description": "url of your seq instance",
        "examples": ["http://log.recfluence.net/", "http://localhost:5341/"]}))

    store: StoreCfg = field(metadata=JsonSchemaMeta(description="storage configuration"))

    feed_scans: int = field(default=20, metadata=JsonSchemaMeta(
        description="number of times to collect the list of videos in the feed", required=False))

    init_seed_vids: int = field(default=50, metadata=JsonSchemaMeta(
        description="the number of videos to watch when initializing", required=False))
    run_seed_vids: int = field(default=5, metadata=JsonSchemaMeta(
        description="the number of videos to watch when performing a daily run", required=False))
    run_test_vids: Optional[int] = field(default=None, metadata=JsonSchemaMeta(
        description="the number recommendations to collect. Only define if you want to restrict for test purposes", required=False))

    branch_env: str = field(default=None, metadata=JsonSchemaMeta(
        description="a name to prefix/suffix names of environment objects to have clean branch environments", required=False))

    max_watch_secs: int = field(default=300, metadata=JsonSchemaMeta(
        description="the maximum time to watch a seed video for", required=False))
Exemplo n.º 3
0
class StoreCfg(JsonSchemaMixin):

    cs: str = field(metadata=JsonSchemaMeta(
        default="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",
        description="connection string to the azure blob storage account storing the input, and output from scraping.",
        examples=["DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;"],
        required=False
    ))

    container: str = field(default='userscrape', metadata=JsonSchemaMeta(
        description="the name of the container to store data", required=False))

    root_path: str = field(default='', metadata=JsonSchemaMeta(
        description="the root folder path to store data (e.g. folder1/folder2", required=False))