Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
@johndpope
johndpope / TENSORFLOW_DEBUG.md
Created May 27, 2017 15:29 — forked from Mistobaan/TENSORFLOW_DEBUG.md
Tensorflow Internals Debugging Techniques

Machine Setup August 2016

Linux Ubuntu 2016.

  • 1080 GTX
  • SDK 8.0
  • CuDNN 5.1

ENABLE Core dumps

ulimit -c unlimited
@johndpope
johndpope / create_hellotensor.py
Created June 8, 2017 13:50 — forked from omimo/create_hellotensor.py
A simple example for saving a tensorflow model and preparing it for using on Android
# Create a simple TF Graph
# By Omid Alemi - Jan 2017
# Works with TF <r1.0
import tensorflow as tf
I = tf.placeholder(tf.float32, shape=[None,3], name='I') # input
W = tf.Variable(tf.zeros_initializer(shape=[3,2]), dtype=tf.float32, name='W') # weights
b = tf.Variable(tf.zeros_initializer(shape=[2]), dtype=tf.float32, name='b') # biases
O = tf.nn.relu(tf.matmul(I, W) + b, name='O') # activation / output
@johndpope
johndpope / create_hellotensor.py
Created June 8, 2017 13:50 — forked from omimo/create_hellotensor.py
A simple example for saving a tensorflow model and preparing it for using on Android
# Create a simple TF Graph
# By Omid Alemi - Jan 2017
# Works with TF <r1.0
import tensorflow as tf
I = tf.placeholder(tf.float32, shape=[None,3], name='I') # input
W = tf.Variable(tf.zeros_initializer(shape=[3,2]), dtype=tf.float32, name='W') # weights
b = tf.Variable(tf.zeros_initializer(shape=[2]), dtype=tf.float32, name='b') # biases
O = tf.nn.relu(tf.matmul(I, W) + b, name='O') # activation / output
@johndpope
johndpope / install-tensorflow-using-anaconda.md
Last active October 9, 2023 13:19 — forked from sethbunke/install-tensorflow-using-anaconda.txt
Create a virtual environment using Anaconda and install various ML tools and TensorFlow
@johndpope
johndpope / install.md
Last active August 6, 2017 17:37 — forked from surjikal/install.md
Presto Installation Instructions for OSX + Zsh
@johndpope
johndpope / 01_mongodb_live_hacking.md
Created September 5, 2017 18:31 — forked from ttrelle/01_mongodb_live_hacking.md
MongoDB Live Hacking Preparations

Download & Run MongoDB

  • Grab the latest stable release from the download page
  • Unzip the archive to a folder called ${MONGO_HOME} on your disk
  • Create a folder /data/db on the same drive/partition
  • Go to ${MONGO_HOME}/bin
  • Execute the binary mongod (or mongod.exe on Windows)

For a more detailed explanation, see the MongoDB installation guide.

@johndpope
johndpope / karhoo_setup.sh
Created September 9, 2017 23:59 — forked from johndpope-karhoo/karhoo_setup.sh
setup OSX.sh
# chmod +x karhoo_setup.sh
#!/bin/bash
#NODE_VERSION=0.4.7
#NPM_VERSION=1.0.94
# Examples
# https://github.com/donnemartin/dev-setup/blob/master/brew.sh
# https://gist.github.com/phatblat/1713458#file-heroku-node-init-sh
# https://gist.github.com/zenorocha/7159780
conda info
conda info --all
conda info --license
# list conda environment
conda info -e
# list all the package in the current environment
conda list
ubuntu@ip-172-31-14-185:~/sfm-docker$ cat docker-compose.yml
version: "2"
services:
db:
image: gwul/sfm-ui-db:1.2.0
environment:
- POSTGRES_PASSWORD
- TZ
logging:
driver: json-file

Using GraphQL with the Apollo iOS client

Were you ever annoyed when working with a REST API because the endpoints didn't give you the data you needed for the views in your app? Getting the right information either required multiple server requests or you had to bug the backend developers to adjust the API? Worry no more, GraphQL and Apollo to the rescue! 🚀

GraphQL is a new API design paradigm that was open-sourced by Facebook in 2015. It introduces a new era for APIs by eliminating a lot of the ineffencies with today's de-facto standard REST. In contrast to REST, GraphQL APIs only expose a single endpoint and the consumer of the API can precisely specify what data they require with every request.

In this tutorial, you're going to build an iPhone app that helps users plan which iOS conferences they'd like to attend. You'll setup your own GraphQL server and interact with it from the app using the [Apollo iOS Client]