This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dependency: http://stedolan.github.io/jq/ | |
jq '{total_districts: .[].count, students: [ .[][].data.students | length ]} | .total_students = reduce .students[] as $i (0; . + $i) | .total_students / .total_districts' <(curl -s -u DEMO_KEY: https://api.getclever.com/v1.1/sections) 2>/dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env luajit | |
local string = string | |
local socket = require 'socket' | |
--- Returns the character at index i (just some syntactic sugar for str:gsub(i,i)) | |
-- @usage ('foobar'):c(3) == 'o' -- True | |
-- @string i Index of character within string | |
-- @returns Character at index i within string | |
function string:c(i) |
NewerOlder