This has a lot of steps to it, but the browser is a surprisingly good platform for doing it (and an unbeatable platform for delivery).Continue reading →
Here's a situation that comes up a lot. I want to throw together a quick CRUD app, or, for my uses, more of a C app (i.e., "hey research assistants, dump all this stuff into a database"). I could use a google form or something, but that always leads to weird output, like bizarre formatting, out in google sheets.
So I'm getting into Flask on Heroku for this kind of thing, for several reasons:Continue reading →
I'm learning Java, for two reasons.
First, I really like Clojure, but I constantly run into barriers where the only way to do something is to drop down to Java code that I don't understand.
Here's a task that doesn't seem to be terribly well documented in one place. What happens if you want to spin up some long-running background shell process in clojure? For example, suppose you're trying to communicate with a python script (example of how to do that), and you'd like to spin both the rabbitmq server and the continuously-running python script up from your main clj application? You can't just use clojure.java.shell, because that will hang the application until the other process returns (i.e., it's blocking).
The easiest method to do this that I can discern is to just wrap it in a future. For example:Continue reading →
(With help from Carlos De La Guardia, who was like "dude, vectorize this stuff" after seeing the incredibly slow implementation the first time, and then was kind enough to talk through the problem and the notebook on which this post is based. All infelicities are mine (and I didn't even implement his wise suggestions for cleaning up the notebook).)
Naive Bayes is the simplest possible machine learning algorithm. In its Bernoulli form, calculation is just a matter of applying probability 101 techniques to calculate the (estimated) conditional probabilities of your predictors given the labels and estimated probability of the labels, then applying Bayes Rule directly to generate a posterior on a label given the data. Trivial.Continue reading →