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
# Example command: | |
# python copy_headers.py --headers tensorflow/lite/model.h tensorflow/lite/interpreter.h \ | |
# --destination MyAwesomeProject/include | |
# --include-dirs ../flatbuffers/include # Note that these are relative to --source-dir | |
# --source-dir ../tensorflow/ | |
import argparse | |
import os | |
import subprocess |
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
<!--XSL style sheet to convert EESCHEMA XML Partlist Format to grouped CSV BOM Format | |
Copyright (C) 2014, Wolf Walter. | |
Copyright (C) 2013, Stefan Helmert. | |
Copyright (C) 2018, Kicad developers. | |
Copyright (C) 2019, arturo182. | |
GPL v2. | |
Functionality: | |
Generation of JLCPCB PCBA compatible BOM |
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
# WARNING: These steps seem to not work anymore! | |
#!/bin/bash | |
# Purge existign CUDA first | |
sudo apt --purge remove "cublas*" "cuda*" | |
sudo apt --purge remove "nvidia*" | |
# Install CUDA Toolkit 10 | |
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb |
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
#ifndef BLE400_H | |
#define BLE400_H | |
// LEDs definitions for BLE400 | |
#define LEDS_NUMBER 5 | |
#define LED_START 18 | |
#define LED_1 18 | |
#define LED_2 19 | |
#define LED_3 20 |
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 CoreML | |
import XCTest | |
@testable import mlsample | |
class mlsampleTests: XCTestCase { | |
override func setUp() { | |
super.setUp() | |
} | |
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
package com.example.nileshdeokar.simplevibratedemo; | |
import android.os.Build; | |
import android.os.VibrationEffect; | |
import android.os.Vibrator; | |
import android.support.annotation.RequiresApi; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.widget.Toast; | |
/* |
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/python3 | |
from sys import exit | |
from sys import stdout | |
from sys import path as syspath | |
from os import path as osp | |
from os import stat, makedirs | |
import argparse | |
from shutil import copyfile |
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 pyaudio | |
import numpy as np | |
import time | |
import wave | |
import matplotlib.pyplot as plt | |
# open stream | |
FORMAT = pyaudio.paInt16 | |
CHANNELS = 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
""" | |
Here is a dice loss for keras which is smoothed to approximate a linear (L1) loss. | |
It ranges from 1 to 0 (no error), and returns results similar to binary crossentropy | |
""" | |
# define custom loss and metric functions | |
from keras import backend as K | |
def dice_coef(y_true, y_pred, smooth=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
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
NewerOlder