Skip to content

Instantly share code, notes, and snippets.

View corymaklin's full-sized avatar

Cory Maklin corymaklin

  • Ottawa, Ontario
View GitHub Profile
using UnityEngine;
namespace _Project.Scripts
{
public class Singleton<T> : MonoBehaviour where T : MonoBehaviour
{
private static T instance;
public static T Instance {
get
{
---
version: '2'
services:
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
kafka:
@corymaklin
corymaklin / App.js
Created March 20, 2019 10:18
IndexedDB Example Storing Image As Blob
import React, { Component } from 'react';
import { default as localforage } from 'localforage';
class App extends Component {
constructor(props) {
super(props);
this.p = null;
this.img = null;
@corymaklin
corymaklin / App.js
Created March 20, 2019 01:12
IndexedDB Example
import React, { Component } from 'react';
import { default as localforage } from 'localforage';
class App extends Component {
constructor(props) {
super(props);
this.p = null;
this.state = {
import * as tfvis from '@tensorflow/tfjs-vis';
const data = [
{ index: 0, value: 50 },
{ index: 1, value: 100 },
{ index: 2, value: 150 },
];
// Get a surface
const surface = tfvis.visor().surface({ name: 'Barchart', tab: 'Charts' });
{
"scripts": {
"start": "parcel index.html --open"
},
"dependencies": {
"@tensorflow/tfjs": "^0.14.1",
"@tensorflow/tfjs-vis": "^0.4.0"
},
"devDependencies": {
"@babel/core": "^7.2.2",
{
"presets": [
[
"env",
{
"esmodules": false,
"targets": {
"browsers": [
"> 3%"
]
import * as tfvis from '@tensorflow/tfjs-vis';
const data = [
{ index: 0, value: 50 },
{ index: 1, value: 100 },
{ index: 2, value: 150 },
];
// Get a surface
const surface = tfvis.visor().surface({ name: 'Barchart', tab: 'Charts' });
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<div id='container'>
</div>
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import Amplify from 'aws-amplify';
import aws_exports from './aws-exports';
import SignInForm from './SignInForm';
import SignUpForm from './SignUpForm';
Amplify.configure(aws_exports);
class App extends Component {