I hereby claim:
- I am rbaron on github.
- I am rbaron (https://keybase.io/rbaron) on keybase.
- I have a public key whose fingerprint is B22D 7692 7828 E780 B3C4 8A20 28F6 64EB A5ED B223
To claim this, I am signing this object:
package objsets | |
import common._ | |
import TweetReader._ | |
/** | |
* A class to represent tweets. | |
*/ | |
class Tweet(val user: String, val text: String, val retweets: Int) { | |
override def toString: String = |
trait Individual[T] { | |
def mate(other: Individual[T]): Individual[T] | |
} | |
class Person[T] extends Individual[T] { | |
// This "overrides nothing": | |
override def mate(other: Person[T]): Person[T] = new Person[T]() | |
} |
trait Indiv[V <: Indiv[V]] { | |
val fitness: Double | |
def reproduce(other: V): V | |
} | |
class RealIndiv[V](override val fitness: Double) extends Indiv[V] { | |
override def reproduce(other: V) = new RealIndiv(fitness + other.fitness) | |
// ^ Cannot resolve symbol fitness (on `other.fitness`) | |
} |
import itertools | |
def take(n, iterable): | |
return list(itertools.islice(iterable, n)) | |
def enum_integers(start): | |
return itertools.count(start) | |
def is_not_divisible_by(n, which): | |
return n%which != 0 |
I hereby claim:
To claim this, I am signing this object:
""" | |
This script is an example of learning parameters of a Bayesian network | |
with hidden variables. The following Bayesian net is analyzed: | |
(hidden) (observable) | |
K -----------> A | |
Where K (knowledge) is not observable and A (answers), which depends on K, is. |
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 21, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"%matplotlib notebook\n", | |
"import collections\n", |
#define N_SAMPLES 64 | |
void setup() | |
{ | |
Serial.begin(9600); | |
while (!Serial) delay(10); | |
} | |
void loop() | |
{ |
""" | |
Detection callback w/ scanner | |
-------------- | |
Example showing what is returned using the callback upon detection functionality | |
Updated on 2020-10-11 by bernstern <bernie@allthenticate.net> | |
""" |