Skip to content

Instantly share code, notes, and snippets.

import numpy as np
import cv2
import imutils
import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import os
DEBUG = False
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
"""This file contains all the model information: the training steps, the batch size and the model iself."""
import tensorflow as tf
def get_training_steps():
"""Returns the number of batches that will be used to train your solution.
It is recommended to change this value."""
return 50
const getDogs = createResource(
() => axios.get(`https://dog.ceo/dog-api/breed-list`)
);
// Create our component
const Dogs = withCache(props => {
const data = getTodos.read(props.cache);
return <DogList dogs={data} />;
});
@jenyckee
jenyckee / Context.jsx
Last active May 29, 2018 13:42
React Context API
const DogContext = React.createContext([]);
class DogProvider extends React.Component {
constructor() {
super()
this.state = {
data: []
}
}
componentDidMount() {
class A {
public foo(s1: string, s2: string) {
if (s2) {
this.foo2(s1, s2);
} else this.foo1(s1);
}
public foo1(s: string) {
return s;
}
public foo2(s1: string, s2: string) {
class A {
public: void foo(std::string a) {
std::cout << a << "\n";
};
public: void foo(std::string a, std::string b) {
std::cout << a << b << "\n";
};
};
int main(int argc, const char * argv[]) {
A a;
interface List<T> {
first: T;
rest: List<T>;
cons: (T) => List<T>
}
class LinkedList<T> implements List<T> {
public first;
public rest;
constructor(value) {
this.first = value;
interface Shape {
surface: () => Number
}
interface Rectangle {
l: number;
w: number;
}
class Rectangle implements Shape {
constructor(l,w) {
this.l = l;