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 CreateMLUI | |
let builder = MLImageClassifierBuilder() | |
builder.showInLiveView() |
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
+------------------+--------------+------------------+ | |
| Images Processed | Elapsed Time | Percent Complete | | |
+------------------+--------------+------------------+ | |
| 1 | 8.62s | 0% | | |
| 2 | 8.69s | 0% | | |
| 3 | 8.76s | 0% | | |
| 4 | 8.82s | 0% | | |
... ... ... | |
| 20400 | 21m 49s | 99% | | |
| 20450 | 21m 52s | 99.25% | |
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
let model = try? VNCoreMLModel(for: DogNet().model) | |
let request = VNCoreMLRequest(model: model!) { (request, error) in | |
let results = request.results as! [VNClassificationObservation] | |
for result in results { | |
print("\(result.identifier) | \(result.confidence)") | |
} | |
} | |
let handler = VNImageRequestHandler.init(cgImage: UIImage(named: "Chelsea.JPG")!.cgImage!, options: [:]) | |
try? handler.perform([request]) |
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
n02099601-golden_retriever | 0.88617605 | |
n02104029-kuvasz | 0.027797867 | |
n02099267-flat-coated_retriever | 0.02071613 | |
n02100735-English_setter | 0.011913459 | |
n02102318-cocker_spaniel | 0.010424928 | |
n02102177-Welsh_springer_spaniel | 0.0103628095 | |
... |
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
if ~exist('port','var') | |
ports = serialportlist; | |
port = serialport(ports(end),115200); | |
end | |
configureTerminator(port,"CR"); | |
x = input('Sample Name to Write: \n','s'); | |
count = 1; sample_len = 500; plotWinSize = 100; | |
data = NaN(1,sample_len); plot(data) |
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 numpy as np | |
from os import environ | |
environ["KERAS_BACKEND"] = "plaidml.keras.backend" | |
import keras | |
from keras.layers import Dense | |
from matplotlib import pyplot as plt | |
# Params | |
num_samples = 100000; vect_len = 20; max_int = 10; min_int = 1; |
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
// HackRF lib | |
#include <hackrf.h> | |
// Normal system libs | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <unistd.h> | |
#include <signal.h> | |
// Device object |
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 SoapySDR | |
from SoapySDR import * | |
import numpy | |
import time | |
args = dict(driver="plutosdr", hostname="192.168.2.1") | |
sdr = SoapySDR.Device(args) | |
# Setup device | |
sdr.setSampleRate(SOAPY_SDR_RX, 0, 10e6) |
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 SoapySDR | |
from SoapySDR import * | |
import numpy as np | |
fsamp = 8e6 | |
fcenter = 107.9e6 | |
nsamp = 2**20 | |
# Apparently it takes AGC a while to settle in? | |
throwaway_time = 0.02 |