Exemple #1
0
def interactive_testing():
    """Interactive testing"""
    # %%
    # noinspection PyUnresolvedReferences
    runfile("test.py")  # pylint: disable=undefined-variable
    redis_conn = redis.Redis(host='localhost', port=6379, db=0)
    # %%
    col = cocktail_col(redis_conn)
    # %%
    populate_cocktails(col)
    # %%
    sexpr1 = sch.FacetEq(f("ingredients"), "vodka")
    sexpr2 = sch.FacetEq(f("ingredients"), "rum")
    # %%
    sch.run_search(col, sexpr1)
    # %%
    or_expr = sch.Or(sexpr1, sexpr2)
    results = sch.run_search(col, or_expr)
    print(results)
    # %%
    and_expr = sch.And(sexpr1, sexpr2)
    print(sch.run_search(col, and_expr))
    # %%
    print(
        sch.run_search(
            col,
            sch.And(sch.FacetEq(f("ingredients"), "vodka"),
                    sch.FacetEq(f("ingredients"), "cointreau"))))
Exemple #2
0
def main():

    menu = ['HOME', 'KOSPI & KOSDAQ', 'DJI & NASDAQ', '종목검색']

    choice = st.sidebar.selectbox('메뉴', menu)

    if choice == 'HOME':
        st.header('주가 예측 앱')
        st.write('한국 , 미국 증시 시세')
        st.write('KOSPI, KOSDAQ 종목 시세 및 예측')
        st.header('''
    
                ''')

        img = Image.open('data/pic.jpg')
        st.image(img)

    if choice == 'KOSPI & KOSDAQ':
        run_kospi()

    if choice == 'DJI & NASDAQ':
        run_america()

    if choice == '종목검색':
        run_search()
Exemple #3
0
def testing_qxt(col):
    """testing with el quikote"""
    # %%
    reload(sch)
    reload(idx)
    expr = sch.ContainsToken("cobre")
    print(sch.run_search(col, expr))
    col.redis.ping()
    # %%
    col.redis.sscan(b'qxt/text_tokens', count=1000000)
Exemple #4
0
from search import run_search

run_search('python', 'text.txt')
Exemple #5
0
 def test_Search(self):
     import search
     self.assertTrue(
         search.run_search('search', args="query=austin submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=MB700 submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=MW800 submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=MI705 submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=MI205 submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=801 submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=SF01f submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=LR02c submit=1") != '')
     self.assertTrue(
         search.run_search('search', args="id=LS03c submit=1") != '')
     self.assertTrue(search.run_search('search', args="id= submit=1") != '')
     self.assertTrue(search.run_search('search', args="submit=1") != '')