Commandline tool for running SQL queries against JSON, CSV, Excel, Parquet, and more
不過就不是綁 SQLite 了 (雖然還是有關),從範例可以看到他是獨立的程式:
$ dsq testdata.json "SELECT * FROM {} WHERE x > 10"
Under the hood dsq uses DataStation as a library and under that hood DataStation uses SQLite to power these kinds of SQL queries on arbitrary (structured) data.
Reliable 1-5 hours a month of downtime. There are months where it's literally 1 nine of uptime. Their status page was actually down for a while (I think they forgot to renew it?)
另外一個有很趣的是很奇耙的設計:
Booleans in the API are `true` or `undefined`. Seriously.
Score = Lower bound of Wilson score confidence interval for a Bernoulli parameter
但實際的運算其實沒那麼複雜,像是 Ruby 的程式碼可以看出大多都是系統內的運算就可以算出來。其中的 z 在大多數的情況下是常數。
require 'statistics2'
def ci_lower_bound(pos, n, confidence)
if n == 0
return 0
end
z = Statistics2.pnormaldist(1-(1-confidence)/2)
phat = 1.0*pos/n
(phat + z*z/(2*n) - z * Math.sqrt((phat*(1-phat)+z*z/(4*n))/n))/(1+z*z/n)
end
The z-score in this function never changes, so if you don't have a statistics package handy or if performance is an issue you can always hard-code a value here for z. (Use 1.96 for a confidence level of 0.95.)