Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
Bancie committed Sep 9, 2024
1 parent 04efb15 commit 3aa3fac
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 138 deletions.
47 changes: 1 addition & 46 deletions app/tests/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,56 +6,11 @@
import shutil
import glob

# data.backup('/Users/chibangnguyen/Documents/TiLearn/app/tests', '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup')

lists = [
pl.List(file_path='/Users/chibangnguyen/Documents/TiLearn/app/tests/data.csv', prec=0),
pl.List(file_path='/Users/chibangnguyen/Documents/TiLearn/app/tests/data2.csv', prec=1),
pl.List(file_path='/Users/chibangnguyen/Documents/TiLearn/app/tests/data3.csv', prec=1)
]

# print(pl.location(lists, type='row'))
# for row in lists[pl.location(lists, type='sub')].run():
# print(row)

# print(tl.file_seek(lists, '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup'))

# opt_list = lists[pl.location(lists, type='sub')].path
# print(opt_list)
# print(pl.location(lists, type='sub'))

# tl.optimal_list(lists, '/Users/chibangnguyen/Documents/TiLearn/app/tests', '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup')
# print(tl.optimal_list(lists, '/Users/chibangnguyen/Documents/TiLearn/app/tests', '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup'))
for row in tl.optimal_list(lists, '/Users/chibangnguyen/Documents/TiLearn/app/tests', '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup'):
print(row)

# row_list = pl.location(lists, type='row')
# opt_file = lists[pl.location(lists, type='sub')].path

# print(row_list, opt_file)
# print(data.prec(opt_file, row_list))
# rows = data.none(opt_file, row_list)
# print(rows)

# data.updated(opt_file, prec=1, opt_row=row_list)
# data.clear('/Users/chibangnguyen/Documents/TiLearn/app/tests/backup')

# print(tl.set_const(lists, prec=1))


# data.clear('/Users/chibangnguyen/Documents/TiLearn/app/tests/backup')

# for row in tl.optimal_list(lists,'/Users/chibangnguyen/Documents/TiLearn/app/tests', '/Users/chibangnguyen/Documents/TiLearn/app/tests/backup'):
# print(row)

# data.updated('/Users/chibangnguyen/Documents/TiLearn/app/tests/backup/data.csv', prec=1, opt_row=1)

# print(pl.ja_all('/Users/chibangnguyen/Documents/TiLearn/app/tests', lists))
# print(tl.set_const(lists, prec=1))

# for sublist in lists:
# print(sublist.path())
# print(lists[1].path)

# for sublist in lists:
# print(sublist.path)
print(row)
70 changes: 0 additions & 70 deletions app/tests/list.py

This file was deleted.

15 changes: 1 addition & 14 deletions app/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,7 @@
['luyen de', 2, 0, 7, 1],
['final', 6, 0, 2, 2]]

# schedule = tl.wspt(data)

# schedule = tl.c_time(data)
# full_schedule = tl.lateness(data)

# schedule = tl.edd(data)

schedule = tl.wspt_prec(data)

for row in schedule:
print(row)

print('\n')

max_value = max([row[5] for row in data])

print(max_value)
print(row)
11 changes: 3 additions & 8 deletions app/tilearn/_list/_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

def set_prec(lists, op, row):
set = tl.list_gen(row, 6)
# opt_list = lists[pl.location(lists, type='sub')].run()
for i in range(len(set)):
for j in range(len(set[i])):
if i == 0 and j == 0:
Expand All @@ -15,8 +14,6 @@ def set_prec(lists, op, row):

def set(lists, op, row):
set = tl.list_gen(1, 6)
# opt_list = lists[pl.location(lists, type='sub')].run()
# opt_row = pl.location(lists, type='row')-1
fix_row = row
for i in range(len(set)):
for j in range(len(set[i])):
Expand Down Expand Up @@ -48,17 +45,15 @@ def optimal_list(lists, path, backup_path):
opt_file = lists[pl.location(lists, type='sub')].path
check = lists[pl.location(lists, type='sub')].check()
if check == 1:
# if file_seek(lists, path=backup_path) == 1:
# set_j.extend(opt_list)
# break
if file_seek(lists, path=backup_path) == 1:
set_j.extend(opt_list)
break
set_j.extend(set_const(lists, prec=1, op=opt_list, row=row_list+1))
data.updated(opt_file, prec=1, opt_row=row_list)
jc -= row_list+1
elif check == 0:
set_j.extend(set_const(lists, prec=0, op=opt_list, row=row_list))
data.updated(opt_file, prec=0, opt_row=row_list)
jc -= 1
# print(file_seek(lists, path=backup_path))
# print(set_j, '\n')
data.clear(backup_path)
return set_j

0 comments on commit 3aa3fac

Please sign in to comment.