Ejemplo n.º 1
0
def get_data_follow(input_file) : 
  global graph, set_terminal, set_non_terminal, first_table, root, follow_table
  graph, set_terminal, set_non_terminal, first_table, root = first.get_data(input_file)

  execute_external(input_file)

  return graph, set_terminal, set_non_terminal, first_table, follow_table, root
Ejemplo n.º 2
0
def get_data_follow(
        input_file):  # this is by follow to return data to other files
    global graph, set_terminal, set_non_terminal, first_table, root, follow_table, serial_productions
    graph, set_terminal, set_non_terminal, first_table, root, serial_productions = first.get_data(
        input_file)

    execute_external(input_file)

    return graph, set_terminal, set_non_terminal, first_table, follow_table, root, serial_productions
Ejemplo n.º 3
0
def get_data(input_file):
    global graph, set_terminal, set_non_terminal, first_table, root, serial_productions
    graph, set_terminal, set_non_terminal, first_table, root, serial_productions = first.get_data(
        input_file)
Ejemplo n.º 4
0
def get_data(input_file) : 
  global graph, set_terminal, set_non_terminal, first_table, root
  graph, set_terminal, set_non_terminal, first_table, root = first.get_data()
Ejemplo n.º 5
0
            mark_point=["max", "min"],
            mark_line=["average"])

    page.add(bar)

    df3 = df2.sort_values(["分数差"], axis=0, ascending=[False])

    attr = [x for x in df3.高考省份][:20]
    v1 = [x for x in df3.分数差][:20]
    bar2 = Bar("分数差计算统计")
    bar2.add("分数差",
             attr,
             v1,
             is_datazoom_show=True,
             is_datazoom_extra_show=True,
             mark_point=["max", "min"],
             mark_line=["average"])
    page.add(bar2)

    print("render page to 12-24-bar.html")

    # 生成 html 文件
    page.render("12-24-bar.html")

    df3.to_json("test.json")


df = get_data()
df2 = comput_data(df)
plot_data(df2)