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
# -*- coding: utf-8 -*- | |
"""Inception V3 model for Keras. | |
Note that the input image format for this model is different than for | |
the VGG16 and ResNet models (299x299 instead of 224x224), | |
and that the input preprocessing function is also different (same as Xception). | |
# Reference | |
- [Rethinking the Inception Architecture for Computer Vision](http://arxiv.org/abs/1512.00567) |
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
For display purposes, 100% is rounded down to 99% | |
O's turn: | |
- - - - - - - | |
- - - - - - - | |
- - - - - - X | |
- - X O - - X | |
- - O X - - O | |
- X O X - - O | |
-------------------- |
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
import concurrent.futures | |
import numpy as np | |
from graphpipe import remote | |
import time | |
GP_SERVER = "http://127.0.0.1:9000" | |
WORKERS = 40 | |
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 bash | |
# we will use the ``euca2ools`` cli tool that wraps the python boto | |
# library to test ec2 compatibility | |
echo "**************************************************" | |
echo "Begin DevStack Exercise: $0" | |
echo "**************************************************" | |
# This script exits on an error so that errors don't compound and you see |
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
-- MySQL dump 10.13 Distrib 5.1.58, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: keystone | |
-- ------------------------------------------------------ | |
-- Server version 5.1.58-1ubuntu1 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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
-- MySQL dump 10.13 Distrib 5.1.54, for debian-linux-gnu (x86_64) | |
-- | |
-- Host: localhost Database: keystone | |
-- ------------------------------------------------------ | |
-- Server version 5.1.54-1ubuntu4 | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; |
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 sqlalchemy import create_engine | |
db = create_engine('mysql://root:[email protected]/keystone') | |
table_query = db.execute("show tables") | |
migration_data = {} | |
for table_name in table_query.fetchall(): | |
table_name = table_name[0] | |
query = db.execute("describe %s" % table_name) |
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
#!/bin/sh | |
set -o xtrace | |
# Install basics for vi and git | |
yum -y --enablerepo=base install gcc make vim-enhanced zlib-devel openssl-devel | |
# Simple but usable vimrc | |
cat > /root/.vimrc <<EOF | |
syntax on | |
se ts=4 |
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
# major version in package, like: nova-vncproxy_2011.1-dev-670_all | |
major_version: 2011.3-rcb | |
# ssh user | |
user: root | |
# use sudo for above user? | |
use_sudo: true | |
# base directory for package building | |
build_to: /srv/packages/build | |
# base directory for package serving | |
serve_to: /srv/packages/serve |
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
--- a/django-openstack/django_openstack/auth/views.py | |
+++ b/django-openstack/django_openstack/auth/views.py | |
@@ -20,13 +20,14 @@ class Login(forms.SelfHandlingForm): | |
def handle(self, request, data): | |
try: | |
token = api.token_create(request, | |
- "", | |
+ data.get('tenant', ''), | |
data['username'], | |
data['password']) |
NewerOlder