def qps_data(filename, squarex=False):
  """Load queries per second data from output produced by scaling_eval.py.

  Args:
    filename: string name of file
    squarex: if true, square the x coordinates in the plot.

  Returns:
    x list of values of the x-axis variable (whatever was swept through).
      If squarex = True then these values are squared.
    y list of queries per second
  """
  x = []
  y = []
  for k, line in enumerate(open(DATA_STEM + "_" + filename)):
    if k > 0:  # skip header line
      parts = line.strip().split("\t")
      x.append(float(parts[0]))
      y.append(float(parts[1]))
  if squarex:
    x = [z * z for z in x]
  return x, y
Load queries per second data from output produced by scaling_eval.py.

  Args:
    filename: string name of file
    squarex: if true, square the x coordinates in the plot.

  Returns:
    x list of values of the x-axis variable (whatever was swept through).
      If squarex = True then these values are squared.
    y list of queries per second
  
language/nql/demos/gridworld_scaling/plot_figure1.py