Ejemplo n.º 1
0
def run():
    print("Creating whole project")
    index.run()
    e404.run()
    timeline.run()
    contestants.run()
    search.run()
    static_files.run()
Ejemplo n.º 2
0
def run():
    print("Creating the whole project")
    index.run()
    e404.run()
    timeline.run()
    countries.run()
    search.run()
    static_files.run()
Ejemplo n.º 3
0
def run():
    print("Creating whole project")
    index.run()
    e404.run()
    timeline.run()
    countries.run()
    search.run()
    static_files.run()
    backward_compatibility.run()
Ejemplo n.º 4
0
def run():
    print("Creating whole project")
    index.run()
    e404.run()
    timeline.run()
    countries.run()
    search.run()
    static_files.run()
    backward_compatibility.run()
Ejemplo n.º 5
0
def main():
    logging.basicConfig(filename='module.log',
                        format='%(asctime)s %(message)s',
                        datefmt='%m/%d/%Y %I:%M:%S %p',
                        level=logging.INFO)
    gli.run(EnablePorterStemmer=True)
    index.run()
    busca.run(EnablePorterStemmer=True)
    pc.run()
Ejemplo n.º 6
0
 def test_index_run(self):
     run([
         '',
         '--input=small_test.txt',
         '--start=foo',
         '--stop=bar',
         '--finish=007',
         '-s',
         f'--output={file_name}',
     ])
     res = '{\n    "cow": 2,\n    "siamese": 1,\n    "wonderland": 1,\n    "foo": 1,\n    "toothpaste": 1,\n    "milky": 1,\n    "flight-manual": 1,\n    "toothpick": 1\n}'
     with open(file_name, 'r') as file:
         contents = file.read()
         self.assertEqual(res, contents)
Ejemplo n.º 7
0
    def test_index_run_csv(self):
        run([
            '',
            '--input=small_test.txt',
            '--start=foo',
            '--stop=bar',
            '--finish=007',
            '-s',
            f'--output={file_name_csv}',
            '-c',
        ])
        res = 'Name,Count\ncow,2\nsiamese,1\nwonderland,1\nfoo,1\ntoothpaste,1\nmilky,1\nflight-manual,1\ntoothpick,1\n'

        with open(file_name_csv, 'r') as file:
            contents = file.read()
            self.assertEqual(res, contents)
 def test_index_run_twice(self):
     res = [
         ('cow', 'cow', 0),
         ('cow', 'cow', 0),
         ('siamese', 'siamese', 0),
         ('wonderland', 'wonderland', 0),
         ('foo', 'foo', 0),
         ('toothpaste', 'toothpaste', 0),
         ('milky', 'milky', 0),
         ('flight-manual', 'flight-manual', 0),
         ('toothpick', 'toothpick', 0),
         ('cow', 'cow', 0),
         ('cow', 'cow', 0),
         ('siamese', 'siamese', 0),
         ('wonderland', 'wonderland', 0),
         ('foo', 'foo', 0),
         ('toothpaste', 'toothpaste', 0),
         ('milky', 'milky', 0),
         ('flight-manual', 'flight-manual', 0),
         ('toothpick', 'toothpick', 0),
     ]
     run([
         '',
         '--input=small_test.txt',
         '--start=foo',
         '--stop=bar',
         '--finish=007',
     ], db_name, table_name)
     # run a second time
     run([
         '',
         '--input=small_test.txt',
         '--start=foo',
         '--stop=bar',
         '--finish=007',
     ], db_name, table_name)
     conn = connect_db(db_name, table_name)
     cur = conn.cursor()
     cur.execute(f"SELECT word, word2, relation FROM {table_name}")
     result = cur.fetchall()
     close_db(conn)
     self.assertEqual(result, res)
 def getGenre(self,filename):
     filename = self.find(filename,'../../Dataset')
     # print filename
     out = run('nn',filename)
     if out[0][0] == 1:
         print 'classical'
     elif out[0][1] == 1:
         print 'pop'
     elif out[0][2] == 1:
         print 'jazz'
     elif out[0][3] == 1:
         print 'metal'
Ejemplo n.º 10
0
def run():
    index.run()
 def getReco(self,filename,genre):
     print run('reco',filename,genre)
Ejemplo n.º 12
0
def index_page():
  return index.run()
Ejemplo n.º 13
0
import index

index.run(4)
Ejemplo n.º 14
0
def main():
    data = rd.loadData()
    dataIndex = index.run(data)
    loop(data, dataIndex)