SOSTAV = "5C3B2E"
[
"".join(c for c in SOSTAV[0:4] if c not in "1234567890+"),
"",
"".join(c for c in SOSTAV[0:3] if c not in "1234567890+"),
][(0 if SOSTAV[0:2] == u"10" else 1 if SOSTAV[0:2] < u"10" else 2)] + "." + [
"",
"СП",
"ПП",
"ЧП",
][
(
0
if (["9", SOSTAV[0:1]][(0 if SOSTAV[0:2] == "10" else 1)]) < "1"
else 1
if (["9", SOSTAV[0:1]][(0 if SOSTAV[0:2] == "10" else 1)]) <= "4"
else 2
if (["9", SOSTAV[0:1]][(0 if SOSTAV[0:2] == "10" else 1)]) <= "7"
else 3
)
]
p1*(0.1967-1) + p2*0.4561 + p3*0.3321 + p4*0.2982 = 0
p1*0.0750 + p2*(0.0553-1) + p3*0.1986 + p4*0.0325 = 0
p1*0.2239 + p2*0.4863 + p3*(0.0291-1) + p4*0.3382 = 0
p1*1+p2*1+p3*1+p4*1=1
def bundle_data_path(path):
if getattr(sys, 'frozen', False):
bundle_dir = sys._MEIPASS
else:
bundle_dir = os.path.join(
os.path.dirname(os.path.abspath(__file__)),
'data'
)
return os.path.join(bundle_dir, path)
...
# work with data.json
with open(bundle_data_path('data.json')) as data_file:
data = json.load(data_file)
list1 = data['list1']
list2 = data['list2']
pip install <путь к файлу whl>
или
pip wheel <путь к файлу whl>
версию нужно выбирать не по "битности" системы, а по "битности" самого питона.