fixed some file bugs
This commit is contained in:
parent
700cfbde66
commit
7bab2084eb
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
build
|
build
|
||||||
frames
|
frames
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
.vscode
|
|
@ -1,4 +1,7 @@
|
||||||
with open('input.txt', 'r') as input:
|
import os
|
||||||
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
with open(path+'/input.txt', 'r') as input:
|
||||||
counter = 0
|
counter = 0
|
||||||
text = input.readline()
|
text = input.readline()
|
||||||
for char in text :
|
for char in text :
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
with open('input.txt', 'r') as input:
|
import os
|
||||||
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
with open(path+'/input.txt', 'r') as input:
|
||||||
pos = 0
|
pos = 0
|
||||||
char_pos = 0
|
char_pos = 0
|
||||||
text = input.readline()
|
text = input.readline()
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
with open("input.txt", "r") as commands:
|
import os
|
||||||
|
path = os.path.dirname(os.path.abspath(__file__))
|
||||||
|
|
||||||
|
with open(path+"/input.txt", "r") as commands:
|
||||||
x = 0
|
x = 0
|
||||||
y = 0
|
y = 0
|
||||||
history = []
|
history = []
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
|
||||||
let input = fs.readFileSync('input.txt', 'utf-8').split('\n').sort((a, b) => val(a).getTime() - val(b).getTime());
|
let input = fs.readFileSync(`${__dirname}/input.txt`, 'utf-8').split('\n').sort((a, b) => val(a).getTime() - val(b).getTime());
|
||||||
|
|
||||||
function val(a) {
|
function val(a) {
|
||||||
let time = new Date(a.match(/\[(.*)\]/)[1]);
|
let time = new Date(a.match(/\[(.*)\]/)[1]);
|
||||||
|
|
Loading…
Reference in a new issue