Skip to content

Instantly share code, notes, and snippets.

View ncammarata's full-sized avatar

Nick Cammarata ncammarata

View GitHub Profile
const confidenceColor = confidence => {
const rgb = [255 - (confidence / 100) * 255, (confidence / 100) * 255, 0]
return "rgba(" + rgb.join(",") + ", 1)"
}
class Tooltip extends React.Component {
state = { tooltip: null }
componentWillMount() {
window.setTooltip = tooltip => {
/*
* You can find a demo of what these styles look like here:
* https://roamresearch.slack.com/archives/CN5MK4D2M/p1587230089138900
*
*
* NOTE: I previously used Unite to Mac-ify Roam (as noted in the earlier revisions of this gist).
* However, it had weird behavior with links, which would open them up within the Unite desktop
* app rather than within my browser, so I decided to go back to the Roam web app. So instead, I use
* Stylus to apply these styles to Raom.
*
[
{
"name": "conv2d2",
"modules": [
{
"name": "Positive Center",
"neurons": [
29,
70,
38,
[
{
"name": "conv2d1",
"modules": [
{
"name": "Lines",
"neurons": [
51,
52,
14,
[
{
"name": "mixed3a",
"modules": [
{
"name": "Edges",
"neurons": [
46,
47,
23,
[
{
"name": "mixed3b",
"modules": [
{
"name": "Small Text",
"neurons": [
138,
314
]
[
{
"name": "conv2d2",
"modules": [
{
"name": "Curve Texture",
"neurons": [
182,
171,
130,
[
{
"name": "mixed3b",
"modules": [
{
"name": "Textures",
"neurons": [
37,
353,
151,
[
{
"name": "mixed3a",
"modules": [
{
"name": "Small curves",
"neurons": [
71,
145,
147,
[
{
"name": "mixed3a",
"modules": [
{
"name": "Triangles",
"neurons": [
94,
188,
164