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
# upload via ftp | |
ncftpput -R -v -u "login" cluster.address /destination/folder /local/src/folder/* |
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
import sys | |
with open(f'{sys.argv[1]}/GT-{sys.argv[1]}.csv') as file: | |
next(file) | |
for line in file: | |
lst = line.rstrip('\n').split(';') | |
with open(f'{sys.argv[1]}/{lst[0][0:-4]}.txt', 'w') as w_file: | |
w_file.write(f'{lst[-1]} {int((int(lst[3]) + int(lst[5]))/2)} {int((int(lst[4]) + int(lst[6]))/2)} {abs(int(lst[5]) - int(lst[3]))} {abs(int(lst[4]) - int(lst[6]))}') |
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
def dec_to_bin(lst): | |
bin_matrix = [] | |
# kazda wartosc ma nowy wiersz w macierzy | |
for i in lst: | |
bin_matrix.append(list(bin(i)[2:])) | |
bin_matrix_int = [list(map(int, x)) for x in bin_matrix] | |
return bin_matrix_int |