$ docker
Discover gists
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
const tf = require("@tensorflow/tfjs-node"); | |
const automl = require("@tensorflow/tfjs-automl"); | |
// Tensorflow Inference | |
var tfInference = { | |
loadDictionary: function(modelUrl) { | |
const lastIndexOfSlash = modelUrl.lastIndexOf("/"); | |
const prefixUrl = lastIndexOfSlash >= 0 ? modelUrl.slice(0, lastIndexOfSlash + 1) : ""; | |
const dictUrl = path.normalize(path.dirname(modelUrl)+'/dict.txt'); | |
const text = fs.readFileSync(dictUrl, { encoding: "utf-8" }); |
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
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4 |
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
function readEntriesAsync(reader) { | |
return new Promise((resolve, reject) => { | |
reader.readEntries(entries => { | |
resolve(entries); | |
}, error => reject(error)); | |
}) | |
} | |
async function enumerateDirectoryWithManyFiles(directoryEntry) { | |
let reader = directoryEntry.createReader(); |
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
// "License": Public Domain | |
// I, Mathias Panzenböck, place this file hereby into the public domain. Use it at your own risk for whatever you like. | |
// In case there are jurisdictions that don't support putting things in the public domain you can also consider it to | |
// be "dual licensed" under the BSD, MIT and Apache licenses, if you want to. This code is trivial anyway. Consider it | |
// an example on how to get the endian conversion functions on different platforms. | |
#ifndef PORTABLE_ENDIAN_H__ | |
#define PORTABLE_ENDIAN_H__ | |
#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__WINDOWS__) |
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
// For Firefox or other browsers that don't provide WebAssembly.Function APIs, | |
// this polyfill, albeit async, can be used as a substitute. | |
// | |
// Using WASM, this polyfill is accepted by WebAssembly.Tables, and can be inserted | |
// into them without failure | |
if (!WebAssembly.Function) { | |
const vu32 = (x) => { | |
let out = []; | |
do { | |
let byte = x & 0x7F; |
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
{# | |
/** | |
* @file | |
* Theme override to display a view of unformatted rows. | |
* | |
* Available variables: | |
* - title: The title of this group of rows. May be empty. | |
* - rows: A list of the view's row items. | |
* - attributes: The row's HTML attributes. | |
* - content: The row's content. |
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
<Project> | |
<!-- | |
======================================================================= | |
Microsoft.Build.Msix.Packaging.MsixBundle.targets | |
======================================================================= | |
This targets file can be imported at the bottom of the main app project file (.csproj): | |
<Import Project="Microsoft.Build.Msix.Packaging.MsixBundle.targets" /> |
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
{"nightTab":true,"version":"7.3.0","state":{"layout":{"area":{"header":{"width":74,"justify":"center"},"bookmark":{"width":100,"justify":"center"}},"alignment":"center-center","order":"header-bookmark","direction":"horizontal","size":166,"width":100,"padding":32,"gutter":21,"breakpoint":"xl","scrollbar":"none","title":"","favicon":"","overscroll":false},"header":{"item":{"justify":"left"},"greeting":{"show":true,"type":"custom","custom":"Hii! :3","name":"","size":150,"newLine":false},"transitional":{"show":true,"type":"its","size":150,"newLine":false},"clock":{"hour":{"show":true,"display":"number"},"minute":{"show":true,"display":"number"},"second":{"show":false,"display":"number"},"separator":{"show":true,"text":""},"meridiem":{"show":false},"hour24":{"show":false},"size":412,"newLine":true},"date":{"day":{"show":false,"display":"number","weekStart":"sunday","length":"long"},"date":{"show":true,"display":"number","ordinal":true},"month":{"show":true,"display":"word","length":"short","ordinal":true},"year":{ |
NewerOlder