Ejemplo n.º 1
0
def get_monitor():
    name_ = input_box.get()
    c = Company(name_)
    text_box.insert('end', 'sending email to ' + c.email_list[0] + '\n')
    var.set('sending email to ' + c.email_list[0] + '\n')
    for i in range(1, 10):
        time.sleep(2)
        var.set('sending email to ' + c.email_list[0] + str(i) + '\n')
    c.monitor()
Ejemplo n.º 2
0
import time
from main import Company

apple = Company('google')
print('Ticker: ', apple.ticker)
print('Keyword: ', apple.keyword)
print('The latest Closing price: ', round(apple.price()['Close'].values[0], 2))
print('Summary: ', apple.summary())
print('Prediction: ', apple.prediction())
print('Sending email...')
apple.email()
print('Sending email successfully.')

print('start monitor apple')
apple.monitor()
print(apple)
time.sleep(1)
print(sleep)
time.sleep(1)
time.sleep(1)
print(sleep)
time.sleep(1)
time.sleep(1)
print(sleep)
time.sleep(1)
time.sleep(1)
print(sleep)
time.sleep(1)
iime.sleep(1)
print(sleep)
time.sleep(1)
Ejemplo n.º 3
0
def get_summary():
    name_ = input_box.get()
    text_box.insert('end', 'getting' + name_ + '\'s summarys...\n')
    #     text_box.insert('end',name_+'\n')
    var.set(Company(name_).summary())
Ejemplo n.º 4
0
def get_price():
    name_ = input_box.get()
    text_box.insert('end', name_ + '\n')
    var.set(Company(name_).price().head(7))
Ejemplo n.º 5
0
def get_keyword():
    name_ = input_box.get()
    text_box.insert('end', name_ + '\n')
    var.set(Company(name_).keyword)
Ejemplo n.º 6
0
def get_ticker():
    name_ = input_box.get()
    text_box.insert('end', name_ + '\n')
    var.set(Company(name_).ticker)
Ejemplo n.º 7
0
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker

from main import Base, Customer, Company

engine = create_engine('sqlite:///CustomerDatabase.db')

Base.metadata.bind = engine

DBSession = sessionmaker(bind=engine)

session = DBSession()

customerData = Customer(name='Aditya Chaturvedi')
session.add(customerData)
session.commit()

companyData = Company(name='Watermark Insights')
session.add(companyData)
session.commit()