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 {GetAccessToken, ClaimSet} from "./GoogleAuth"; | |
const projectID = "XXXXXX"; | |
// session-id can apparently be set to an arbitrary value, eg. "abcd1234-abcd-abcd-abcd-abcd12345678". | |
const sessionID = "XXXXXX"; | |
const serviceAccountEmail = `XXXXXX@${projectID}.iam.gserviceaccount.com`; | |
const serviceAccountPrivateKey = `-----BEGIN PRIVATE KEY-----\nXXXXXX\n-----END PRIVATE KEY-----`; | |
export async function ConvertSpeechToText(audioData_str_opus: string): Promise<string> { | |
const claimSet = new ClaimSet(["https://www.googleapis.com/auth/cloud-platform"], serviceAccountEmail); |
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 fs = require("fs-extra"); | |
webpackConfig.plugins.push({ | |
apply(compiler) { | |
console.log(`Valid hook names: ${Object.keys(compiler.hooks)}`); | |
//compiler.hooks.beforeRun.tap("CopyPlugin_Custom", params=>{ | |
compiler.hooks.shouldEmit.tap("CopyPlugin_Custom", params=>{ | |
console.log(`Copying some difficult files (eg. *.wasm) from "node_modules/..." to "Resources/FromNodeModules/...".`); |
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
declare global { | |
interface String { | |
/** | |
* Reformats a multi-line string to represent the actual intended "block" of text. | |
* @param desiredIndent How much to indent each line. (after removal of the first-line indent-length from each of them) | |
*/ | |
AsMultiline(desiredIndent: number): string; | |
} | |
} | |
String.prototype.AsMultiline = function(this: string, desiredIndent: number = null) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapp"> | |
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher android:label="@string/app_name" | |
android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> | |
<service android:name=".ForegroundService" android:enabled="true" android:exported="true"></service> | |
<activity | |
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" |
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
// Raw chart text obtained by simple copy-paste from: https://en.wikipedia.org/wiki/Hepburn_romanization#Romanization_charts | |
const rawChartText = ` | |
あ ア a い イ i う ウ u え エ e お オ o | |
か カ ka き キ ki く ク ku け ケ ke こ コ ko きゃ キャ kya きゅ キュ kyu きょ キョ kyo | |
さ サ sa し シ shi す ス su せ セ se そ ソ so しゃ シャ sha しゅ シュ shu しょ ショ sho | |
た タ ta ち チ chi つ ツ tsu て テ te と ト to ちゃ チャ cha ちゅ チュ chu ちょ チョ cho | |
な ナ na に ニ ni ぬ ヌ nu ね ネ ne の ノ no にゃ ニャ nya にゅ ニュ nyu にょ ニョ nyo | |
は ハ ha ひ ヒ hi ふ フ fu へ ヘ he ほ ホ ho ひゃ ヒャ hya ひゅ ヒュ hyu ひょ ヒョ hyo | |
ま マ ma み ミ mi む ム mu め メ me も モ mo みゃ ミャ mya みゅ ミュ myu みょ ミョ myo | |
や ヤ ya ゆ ユ yu よ ヨ yo |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"/> | |
<title>Join vs Template - Venryx</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/benchmark/1.0.0/benchmark.min.js"></script> | |
<script src="./suite.js"></script> | |
</head> | |
<body> | |
<h1>Open the console to view the results</h1> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!</h1> | |
<!-- All of the Node.js APIs are available in this renderer process. --> | |
We are using Node.js <script>document.write(process.versions.node)</script>, |
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 { MapNodeL3 } from "Store/firebase/nodes/@MapNode"; | |
import { GetNodeChildrenL2, GetNodeChildrenL3 } from "Store/firebase/nodes"; | |
import {MapNodeL2, Polarity, LayerPlusAnchorParentSet} from "../nodes/@MapNode"; | |
import {IsSpecialEmptyArray, emptyArray_forLoading} from "../../../Frame/Store/ReducerUtils"; | |
import {GetFinalPolarity} from "../nodes/$node"; | |
import {MapNodeType} from "../nodes/@MapNodeType"; | |
import { Lerp } from "js-vextensions"; | |
import { ArgumentType } from "Store/firebase/nodes/@MapNodeRevision"; | |
export function RS_CalculateTruthScore(node: MapNodeL3) { |
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 { MapNodeL3 } from "Store/firebase/nodes/@MapNode"; | |
import { GetNodeChildrenL2, GetNodeChildrenL3 } from "Store/firebase/nodes"; | |
import {MapNodeL2, Polarity} from "../nodes/@MapNode"; | |
import {IsSpecialEmptyArray, emptyArray_forLoading} from "../../../Frame/Store/ReducerUtils"; | |
import {GetFinalPolarity} from "../nodes/$node"; | |
import {MapNodeType} from "../nodes/@MapNodeType"; | |
export function RS_CalculateTruthScore(node: MapNodeL3) { | |
Assert(node.type == MapNodeType.Claim, "RS truth-score can only be calculated for a claim."); |