This file contains hidden or 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
| #pragma once | |
| #include "alphaBufferGenInterface.h" | |
| #include "uvGBufferGenInterface.h" | |
| #include "BakeryHelperInterface.h" | |
| #include "stdint.h" | |
| #include <cstdio> | |
| #include <vector> | |
| #include <string> | |
| namespace Bakery |
This file contains hidden or 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 tensorflow as tf | |
| # The export path contains the name and the version of the model | |
| tf.keras.backend.set_learning_phase(0) # Ignore dropout at inference | |
| model = tf.keras.models.load_model('./inception.h5') | |
| export_path = '../my_image_classifier/1' | |
| # Fetch the Keras session and save the model | |
| # The signature definition is defined by the input and output tensors | |
| # And stored with the default serving key |
This file contains hidden or 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
| # Mostly copied from https://keras.io/applications/#usage-examples-for-image-classification-models | |
| # Changing it to use InceptionV3 instead of ResNet50 | |
| from keras.applications.inception_v3 import InceptionV3, preprocess_input, decode_predictions | |
| from keras.preprocessing import image | |
| import numpy as np | |
| model = InceptionV3() | |
| img_path = 'elephant.jpg' |
This file contains hidden or 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
| Shader "Flipping Normals" { | |
| Properties { | |
| _MainTex ("Base (RGB)", 2D) = "white" {} | |
| } | |
| SubShader { | |
| Tags { "RenderType" = "Opaque" } | |
| Cull Off |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <!-- Directory : [Project]/Assets/Plugins/Android/AndroidManifest.xml --> | |
| <!-- Configure according to your android application information. --> | |
| <manifest | |
| xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.unity3d.player" | |
| android:installLocation="preferExternal" | |
| android:versionCode="1" | |
| android:versionName="1.0"> | |
| <supports-screens |
This file contains hidden or 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
| '''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 file contains hidden or 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
| '''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 file contains hidden or 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
| '''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 file contains hidden or 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
| def convex_hull_graham(points): | |
| ''' | |
| Returns points on convex hull in CCW order according to Graham's scan algorithm. | |
| By Tom Switzer <thomas.switzer@gmail.com>. | |
| ''' | |
| TURN_LEFT, TURN_RIGHT, TURN_NONE = (1, -1, 0) | |
| def cmp(a, b): | |
| return (a > b) - (a < b) |
This file contains hidden or 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 pyaudio | |
| import wave | |
| FORMAT = pyaudio.paInt16 | |
| CHANNELS = 2 | |
| RATE = 44100 | |
| CHUNK = 1024 | |
| RECORD_SECONDS = 5 | |
| WAVE_OUTPUT_FILENAME = "file.wav" | |
NewerOlder