Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| from django.core.cache import cache | |
| from django.db import models | |
| EMPTY = '-' # Not "None" | |
| class MyModel(models.Model): | |
| @classmethod | |
| def _cache_key(cls, key): | |
| return 'mymodel:{}'.format(key) | |
| #!/bin/bash | |
| USERNAME="toranb" | |
| FULLNAME="Toran Billups" | |
| PASSWORD="put something fun here ????" | |
| SECONDARY_GROUPS="" #non-admin user | |
| if [[ $UID -ne 0 ]]; then echo "Please run $0 as root." && exit 1; fi |
Our goal is to run python -c "import caffe" without crashing. For anyone who doesn't spend most of their time with build systems, getting to this point can be extremely difficult on OS X. Instead of providing a list of steps to follow, I'll try to explain why each step happens.
This page has OS X specific install instructions.
I assume:
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
| # Code for the merge subroutine | |
| def merge(a,b): | |
| """ Function to merge two arrays """ | |
| c = [] | |
| while len(a) != 0 and len(b) != 0: | |
| if a[0] < b[0]: | |
| c.append(a[0]) | |
| a.remove(a[0]) | |
| else: |
| import Ember from 'ember'; | |
| import hbs from 'htmlbars-inline-precompile'; | |
| import connect from 'ember-redux/components/connect'; | |
| var stateToComputed = (state) => { | |
| return { | |
| users: state.users.all | |
| }; | |
| }; |
| # -*- coding: utf-8 -*- | |
| """Example Google style docstrings. | |
| This module demonstrates documentation as specified by the `Google Python | |
| Style Guide`_. Docstrings may extend over multiple lines. Sections are created | |
| with a section header and a colon followed by a block of indented text. | |
| Example: | |
| Examples can be given using either the ``Example`` or ``Examples`` | |
| sections. Sections support any reStructuredText formatting, including |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |
| '''This script goes along the blog post | |
| "Building powerful image classification models using very little data" | |
| from blog.keras.io. | |
| It uses data that can be downloaded at: | |
| https://www.kaggle.com/c/dogs-vs-cats/data | |
| In our setup, we: | |
| - created a data/ folder | |
| - created train/ and validation/ subfolders inside data/ | |
| - created cats/ and dogs/ subfolders inside train/ and validation/ | |
| - put the cat pictures index 0-999 in data/train/cats |