<jupyter_start><jupyter_text>First Query<jupyter_code>lp_variables = []
for i in range(numRows):
    lp_variables.append(LpVariable("t_{}".format(i+1), 0, 1, cat='Integer'))
prob1 = LpProblem("firstQuery", LpMaximize)
prob1 += lpDot(lp_variables, df1['count_order'])
constraint1 = (lpDot(lp_variables, df1['sum_base_price']) <= 15469853.7043)
constraint2 = (lpDot(lp_variables, df1['sum_disc_price']) <= 45279795.0584)
constraint3 = (lpDot(lp_variables, df1['sum_charge']) <= 95250227.7918)
constraint4 = (lpDot(lp_variables, df1['avg_qty']) <= 50.353948653)
constraint5 = (lpDot(lp_variables, df1['avg_price']) <= 68677.5852459)
constraint6 = (lpDot(lp_variables, df1['avg_disc']) <= 0.110243522496)
constraint7 = (lpDot(lp_variables, df1['sum_qty']) <= 77782.028739)
constraint8 = (lpSum(lp_variables) >= 1)
prob1 += constraint1
prob1 += constraint2
prob1 += constraint3
prob1 += constraint4
prob1 += constraint5
prob1 += constraint6
prob1 += constraint7
prob1 += constraint8
status = prob1.solve()
LpStatus[status]
ans = [value(v) for v in lp_variables]
for i, val in enumerate(ans):
    if val > 0:
        print(i, val)<jupyter_output>673672 1.0
831267 1.0<jupyter_text>Second Query<jupyter_code>prob2 = LpProblem("secondQuery", LpMinimize)
lp_variables = []
for i in range(numRows):
    lp_variables.append(LpVariable("t_{}".format(i+1), 0, 1, cat='Integer'))

objective_prob = lpDot(lp_variables, df1['ps_min_supplycost'])

constraint1 = (lpDot(lp_variables, df1['p_size']) <= 8)
constraint2 = (lpSum(lp_variables) >= 1)
prob2 += objective_prob
prob2 += constraint1
prob2 += constraint2
status1 = prob2.solve()
print(LpStatus[status1])
ans = [value(v) for v in lp_variables]
for i, val in enumerate(ans):
    if val > 0:
        print(i, val)<jupyter_output>112677 1.0<jupyter_text>Third Query<jupyter_code>prob3 = LpProblem("thirdQuery", LpMinimize)
lp_variables = []
for i in range(numRows):
    lp_variables.append(LpVariable("t_{}".format(i+1), 0, 1, cat='Integer'))

objective_prob = lpSum(lp_variables)

constraint1 = (lpDot(lp_variables, df1['revenue']) >= 413930.849506)
constraint2 = (lpSum(lp_variables) >= 1)
prob3 += objective_prob
prob3 += constraint1
prob3 += constraint2
status3 = prob3.solve()
print(LpStatus[status3])
ans = [value(v) for v in lp_variables]
for i, val in enumerate(ans):
    if val > 0:
        print(i, val)<jupyter_output>Optimal
9670 1.0
572518 1.0<jupyter_text>Forth Query<jupyter_code>prob4 = LpProblem("forthQuery", LpMinimize)
lp_variables = []
for i in range(numRows):
    lp_variables.append(LpVariable("t_{}".format(i+1), 0, 1, cat='Integer'))

objective_prob = lpSum(lp_variables)

constraint1 = (lpDot(lp_variables, df1['o_totalprice']) <= 453998.242103)
constraint2 = (lpDot(lp_variables, df1['o_shippriority']) >= 3)
constraint3 = (lpSum(lp_variables) >= 1)
prob4 += objective_prob
prob4 += constraint1
prob4 += constraint2
prob4 += constraint3
status4 = prob4.solve()
print(LpStatus[status4])
ans = [value(v) for v in lp_variables]
for i, val in enumerate(ans):
    if val > 0:
        print(i, val)<jupyter_output>Optimal
240854 1.0
867379 1.0
{'fraction_non_alphanumeric': 0.15198451113262343, 'fraction_numerical': 0.08357534688609229, 'mean_word_length': 6.506053268765133, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '416327', 'license': 'MIT', 'n_tokens_mistral': 1310, 'n_tokens_neox': 1175, 'n_words': 239, 'path': 'direct_method.ipynb', 'repo_name': 'tfang94/paql-project', 'size': '3099'}