- OS - High Sierra 10.13
- Tensorflow - 1.4
- Xcode command line tools - 8.2 (Download from here: Xcode - Support - Apple Developer & Switch to different clang version: sudo xcode-select --switch/Library/Developer/CommandLineTools & check version: clang -v)
- Cmake - 3.7
- Bazel - 0.7.0
This gist summarises the tensorflow related steps I took to get the above combo working.
When its all tested in c++ I'll update the instructions fully (and add anything I forgot below).
But in summary ( with the current master dd06643cf098ed362212ce0f76ee746951466e81 ):
I have uploaded the pip wheel which I believe should work if you have the same setup but no promises (built for compute capability 3.5, 5.2, 6.0 and named tensorflow-gpu
).
Install with (not sure dropbox allows this direct linking):
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
def weighted_log_loss(yt, yp): | |
'''Log loss that weights false positives or false negatives more. | |
Punish the false negatives if you care about making sure all the neurons | |
are found and don't mind some false positives. Vice versa for punishing | |
the false positives. Concept taken from the UNet paper where they | |
weighted boundary errors to get cleaner boundaries.''' | |
emphasis = 'fn' | |
assert emphasis in ['fn', 'fp'] | |
m = 2 |
A simple App using Vue.js & Firebase with Auth.
See the DEMO.
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
<script> | |
// 5 octaves + 9 semitones under A440Hz is Midi Key Zero | |
const MidiKeyZero = 440/(Math.pow(2, 5) * Math.pow(2, 9/12)) ; | |
const ctx = new AudioContext(); | |
const oscis = new Map(); | |
const volumeCtrl = ctx.createGain(); | |
volumeCtrl.gain.value = 0; | |
volumeCtrl.connect(ctx.destination); |
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
// Implements stale-while-revalidate | |
self.addEventListener('fetch', event => { | |
const cached = caches.match(event.request); | |
const fetched = fetch(event.request); | |
const fetchedCopy = fetched.then(resp => resp.clone()); | |
// Call respondWith() with whatever we get first. | |
// If the fetch fails (e.g disconnected), wait for the cache. | |
// If there’s nothing in cache, wait for the fetch. | |
// If neither yields a response, return a 404. |
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
// Licensed under a CC0 1.0 Universal (CC0 1.0) Public Domain Dedication | |
// http://creativecommons.org/publicdomain/zero/1.0/ | |
(function (win, doc) { | |
'use strict'; | |
if (!win.XMLHttpRequest || !win.FormData || !win.addEventListener || !doc.querySelectorAll) { | |
// doesn't cut the mustard. | |
return; | |
} | |
function hijaxForm (formElement) { | |
var progressBar; |
Just migrated it from Codepen.io to markdown. Credit goes to David Conner.
Working with DOM | Working with JS | Working With Functions |
---|---|---|
Accessing Dom Elements | Add/Remove Array Item | Add Default Arguments to Function |
Grab Children/Parent Node(s) | Add/Remove Object Properties | Throttle/Debounce Functions |
Create DOM Elements | Conditionals |
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
Show hidden characters
{ | |
// Copy any modified settings to `User/Emmet.sublime-settings` | |
// otherwise modifications will not survive updates. | |
// Path to folder where Emmet should look for extensions | |
// http://docs.emmet.io/customization/ | |
"extensions_path": "~/emmet", | |
// Disable completions of HTML attributes | |
// with this option disabled, you can get attribute list completions |
NewerOlder