This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ================== Loading & Exploring JSON ================== # | |
# Load JSON: json_data | |
with open("a_movie.json") as json_file: | |
json_data = json.load(json_file) | |
# Print each key-value pair in json_data | |
for k in json_data.keys(): | |
print(k + ': ', json_data[k]) | |
# ================== Query API & decode JSON data ================== # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input: "image" | |
input_dim: 1 | |
input_dim: 3 | |
input_dim: 1 # This value will be defined at runtime | |
input_dim: 1 # This value will be defined at runtime | |
layer { | |
name: "conv1_1" | |
type: "Convolution" | |
bottom: "image" | |
top: "conv1_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> class Library(object): | |
... def __init__(self): | |
... self.books = { 'title' : object, 'title2' : object, 'title3' : object, } | |
... def __getitem__(self, i): | |
... return self.books[i] | |
... def __iter__(self): | |
... return self.books.itervalues() | |
... | |
>>> library = Library() | |
>>> library['title'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "VGG_ILSVRC_19_layers" | |
input: "data" | |
input_dim: 10 | |
input_dim: 3 | |
input_dim: 224 | |
input_dim: 224 | |
layers { | |
bottom: "data" | |
top: "conv1_1" | |
name: "conv1_1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "VGG_ILSVRC_16_layers" | |
layer { | |
name: "data" | |
type: "Data" | |
include { | |
phase: TRAIN | |
} | |
transform_param { | |
crop_size: 224 | |
mean_value: 104 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "AlexNet" | |
layer { | |
name: "data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
# transform_param { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "ResNet-50" | |
layer { | |
name: "data" | |
type: "Data" | |
top: "data" | |
top: "label" | |
include { | |
phase: TRAIN | |
} | |
transform_param { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib.request import urlopen | |
html = urlopen("http://www.google.com/") | |
print(html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from __future__ import absolute_import, division, print_function | |
import os | |
import matplotlib.pyplot as plt | |
import tensorflow as tf | |
import keras | |
import tensorflow.contrib.eager as tfe |
OlderNewer