brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
import numpy as np | |
import tensorflow as tf | |
__author__ = "Sangwoong Yoon" | |
def np_to_tfrecords(X, Y, file_path_prefix, verbose=True): | |
""" | |
Converts a Numpy array (or two Numpy arrays) into a tfrecord file. | |
For supervised learning, feed training inputs to X and training labels to Y. | |
For unsupervised learning, only feed training inputs to X, and feed None to Y. |
# -*- coding: utf-8 -*- | |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
There's a few reasons.
a) While you are capturePicture()
, the AutoFocus state is stucked at CONTROL_AF_STATE_PASSIVE_FOCUSED
and there is no way to shake it off.
Thus, you'll need to manually restart the focus and get a lock on it again.
b) setRepeatingRequest()
from captureSession
is overwhelming it.
extension Publisher { | |
func toBlockingResult(timeout: Int) -> Result<[Self.Output],BlockingError> { | |
var result : Result<[Self.Output],BlockingError>? | |
let semaphore = DispatchSemaphore(value: 0) | |
let sub = self | |
.collect() | |
.mapError { error in BlockingError.otherError(error) } | |
.timeout( | |
.seconds(timeout), |