Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
52 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#! /bin/bash | ||
|
||
venv/bin/python -m vim_turing_machine.machines.merge_business_hours.decode_hours "$1" $2 | ||
venv/bin/python -m vim_turing_machine.machines.merge_overlapping_intervals.decode_hours "$1" $2 |
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...merge_business_hours/decode_hours_test.py → ...verlapping_intervals/decode_hours_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...merge_business_hours/encode_hours_test.py → ...verlapping_intervals/encode_hours_test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ envdir = venv | |
commands = | ||
|
||
[flake8] | ||
max-line-length = 119 | ||
max-line-length = 131 | ||
|
||
[pep8] | ||
ignore = E265,E309,E501 |
17 changes: 0 additions & 17 deletions
17
vim_turing_machine/machines/merge_business_hours/vim_merge_business_hours.py
This file was deleted.
Oops, something went wrong.
File renamed without changes.
6 changes: 3 additions & 3 deletions
6
...ines/merge_business_hours/decode_hours.py → ...rge_overlapping_intervals/decode_hours.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...ines/merge_business_hours/encode_hours.py → ...rge_overlapping_intervals/encode_hours.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
vim_turing_machine/machines/merge_overlapping_intervals/vim_merge_overlapping_intervals.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import json | ||
import sys | ||
|
||
from vim_turing_machine.machines.merge_overlapping_intervals.encode_hours import encode_hours | ||
from vim_turing_machine.machines.merge_overlapping_intervals.merge_overlapping_intervals import MergeBusinessHoursGenerator | ||
from vim_turing_machine.vim_machine import VimTuringMachine | ||
|
||
|
||
if __name__ == '__main__': | ||
input_string = json.loads(sys.argv[1]) | ||
num_bits = int(sys.argv[2]) | ||
|
||
initial_tape = encode_hours(input_string, num_bits) | ||
|
||
gen = MergeBusinessHoursGenerator(num_bits) | ||
merge_overlapping_intervals = VimTuringMachine(gen.merge_overlapping_intervals_transitions(), debug=True) | ||
merge_overlapping_intervals.run(initial_tape=initial_tape) |