Add files via upload

This commit is contained in:
Silviu Marian Udrescu 2020-03-23 03:35:19 -04:00 committed by GitHub
parent 5a301e2f48
commit f0cc7dfcaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 1210 additions and 182 deletions

View file

@ -0,0 +1,27 @@
# runs BF on data and saves the best RPN expressions in results.dat
# all the .dat files are created after I run this script
# the .scr are needed to run the fortran code
import numpy as np
import os
import shutil
import subprocess
from subprocess import call
import sys
import csv
import sympy as sp
from sympy.parsing.sympy_parser import parse_expr
def brute_force_number(pathdir,filename):
try_time = 2
file_type = "10ops.txt"
try:
os.remove("results.dat")
except:
pass
subprocess.call(["./brute_force_oneFile_v1.scr", file_type, "%s" %try_time, pathdir+filename])
return 1