Skip to content

Instantly share code, notes, and snippets.

@vnegi10
Last active August 6, 2023 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vnegi10/281a691a52ca25d0d90bae542efb40cf to your computer and use it in GitHub Desktop.
Save vnegi10/281a691a52ca25d0d90bae542efb40cf to your computer and use it in GitHub Desktop.
function get_hist_gas_usage()
gas_pointer_dict = get_request(GAS_POINTER)
page_end = (gas_pointer_dict["value"] / 32) |> ceil |> Int
all_gas = DataFrame[]
for page = 1:page_end
gas_usage_dict = get_request(gas_usage_ep(page))
df_gas = vcat(DataFrame.(gas_usage_dict["value"])...)
push!(all_gas, df_gas)
end
df_all_gas = vcat(all_gas...)
return filter(row -> row.d != "255-256-65535", df_all_gas)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment