Ejemplo n.º 1
0
def get_user_info_search(hashtag, number_of_tweets=150):

    # Get tweets based on hashtag
    try:
        results = TwitterSearchOrder()
        results.set_keywords([hashtag])
        results.set_include_entities(False)

        # it's about time to create a TwitterSearch object with our secret tokens
        search = TwitterSearch(
            consumer_key=get_env_variable('BqFjugffuK0CKMXoXmrkmcTVK'),
            consumer_secret=get_env_variable(
                'nOaTOkz1qGmDshOXJMSVo0qZBjFNYi8qRC8XqBYy0HXIFe89uv'),
            access_token=get_env_variable(
                '790574704302129152-Opnh5Mb4bGjET8QqmSuxkrDoXSflbwn'),
            access_token_secret=get_env_variable(
                'Jl5fU3gCcOWniVekuGgiXDjW3hf6joq61bhpVu3xNXoYi'))

        # get tweet information
        for tweet in search.search_tweets_iterable(results):
            print('@%s tweeted: %s' %
                  (tweet['user']['screen_name'], tweet['text']))

    except TwitterSearchException as e:  # take care of all those ugly errors if there are some
        print(e)
Ejemplo n.º 2
0
import dj_database_url
from .base import *
from settings import get_env_variable

SOCIAL_AUTH_EVENTBRITE_KEY = get_env_variable('SOCIAL_AUTH_EVENTBRITE_KEY')
SOCIAL_AUTH_EVENTBRITE_SECRET = get_env_variable(
    'SOCIAL_AUTH_EVENTBRITE_SECRET')

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql_psycopg2',
        'NAME': 'todo_list',
        'USER': '******',
        'PASSWORD': '',
        'PORT': '',
    }
}

DB_FROM_ENV = dj_database_url.config(conn_max_age=500)

DATABASES['default'].update(DB_FROM_ENV)

ALLOWED_HOSTS = ['frozen-waters-14364.herokuapp.com']
Ejemplo n.º 3
0
from settings import get_env_variable

INVALID_SIGN_DATE = '5678'
INVALID_RECOUP_AMOUNT = '1234A'
INVALID_PAYMENT_DATE = '28 DE OCTUBRE'

STATUS_INVESTED = 'INVESTED'
STATUS_COMMITED_APPROVED = 'COMMITED/APPROVED'

STATUS = [
    (STATUS_COMMITED_APPROVED, 'COMMITED/APPROVED'),
    (STATUS_INVESTED, 'INVESTED'),
]

SF_USERNAME = get_env_variable('SF_USERNAME')
SF_PASSWORD = get_env_variable('SF_PASSWORD')
SF_SECURITY_TOKEN = get_env_variable('SF_SECURITY_TOKEN')
SF_DOMAIN = get_env_variable('SF_DOMAIN')

LINK_TO_REPORT_EVENTS = "https://www.evbqa.com/myevent/{}/reports/attendee/"
LINK_TO_RECOUPS = "https://admin.eventbrite.com/admin/upfront_recoups/manage"
LINK_TO_SEARCH_EVENT_OR_USER = "******"

BASIC_CONDITIONS = ('Promissory Note', 'Bank Details', 'Payment Date',
                    'Funds Available')

SUPERSET_QUERY_DATE_FORMAT = "%Y-%m-%d"
SUPERSET_DEFAULT_CURRENCY = 'BRL'

ITEMS_PER_PAGE = 15
Ejemplo n.º 4
0
import os
from settings import get_env_variable
from settings.base import *  # noqa

DEBUG = True

SOCIAL_AUTH_EVENTBRITE_KEY = get_env_variable('SOCIAL_AUTH_EVENTBRITE_KEY')
SOCIAL_AUTH_EVENTBRITE_SECRET = get_env_variable(
    'SOCIAL_AUTH_EVENTBRITE_SECRET', )

DEFAULT_FILE_STORAGE = 'storages.backends.dropbox.DropBoxStorage'
DROPBOX_OAUTH2_TOKEN = get_env_variable('DROPBOX_OAUTH2_TOKEN')
DROPBOX_ROOT_PATH = '/Backup_Files'