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
| // alterkeys.c | |
| // http://osxbook.com | |
| // | |
| // Complile using the following command line: | |
| // gcc -Wall -o alterkeys alterkeys.c -framework ApplicationServices | |
| // | |
| // You need superuser privileges to create the event tap, unless accessibility | |
| // is enabled. To do so, select the "Enable access for assistive devices" | |
| // checkbox in the Universal Access system preference pane. |
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 UIKit | |
| import AVFoundation | |
| class ViewController: UIViewController { | |
| override func viewDidAppear(_ animated: Bool) { | |
| super.viewDidAppear(animated) | |
| switch AVCaptureDevice.authorizationStatus(for: .video) { | |
| case .notDetermined: |
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
| #!/bin/bash | |
| set -o errexit | |
| set -o pipefail | |
| set -o nounset | |
| setup_opencv() | |
| { | |
| printf "*********************************\n${FUNCNAME[0]}\n" | |
| local readonly PARENT_FOLDER=${1:-third_party} |
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
| SDK = xcrun -sdk macosx | |
| all: compute.metallib compute | |
| compute.metallib: Compute.metal | |
| # Metal intermediate representation (.air) | |
| $(SDK) metal -c -Wall -Wextra -std=osx-metal2.0 -o /tmp/Compute.air $^ | |
| # Metal library (.metallib) | |
| $(SDK) metallib -o $@ /tmp/Compute.air |
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
| // Copyright 2019 Google LLC. | |
| // SPDX-License-Identifier: Apache-2.0 | |
| // Polynomial approximation in GLSL for the Turbo colormap | |
| // Original LUT: https://gist.github.com/mikhailov-work/ee72ba4191942acecc03fe6da94fc73f | |
| // Authors: | |
| // Colormap Design: Anton Mikhailov ([email protected]) | |
| // GLSL Approximation: Ruofei Du ([email protected]) |
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 android.opengl.GLES30; | |
| import android.util.Log; | |
| import java.nio.Buffer; | |
| import java.nio.ByteBuffer; | |
| import java.nio.ByteOrder; | |
| import java.nio.FloatBuffer; | |
| /** | |
| * Created by izzy on 6/24/15. TransformFeedback is a example of how |