This file contains hidden or 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
/** | |
* Prime number generator | |
*/ | |
const Primes = function*(upto: number = Infinity) { | |
const primesList: number[] = []; | |
for (let current = 2; current < upto; current++) { | |
const hasPrimeFactor = Boolean(primesList.find(prime => current % prime === 0)); | |
if (hasPrimeFactor) { | |
continue; | |
} else { |
This file contains hidden or 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 provision = (name: string, namespace: string, location: string, resourceGroup: string) => | |
fetch( | |
`http://localhost:8001/apis/servicecatalog.k8s.io/v1beta1/namespaces/${namespace}/serviceinstances`, | |
{ | |
method: "POST", | |
headers: { | |
"Content-Type": "application/json", | |
}, | |
body: JSON.stringify({ | |
apiVersion: "servicecatalog.k8s.io/v1beta1", |
This file contains hidden or 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
/** | |
* TypeScript Conversion of https://github.com/Jam3/audiobuffer-to-wav | |
* @author Evan Louie <[email protected]> (https://evanlouie.com) | |
*/ | |
export class WavEncoder { | |
/** | |
* @param {AudioBuffer} buffer The AudioBuffer to encode | |
* @param {float32: boolean} options If float32 is true, PCM Floating point at 32-bits/sample will be use; defaults to PCM Integer at 16-bits/sample will be used. | |
* @see http://wavefilegem.com/how_wave_files_work.html | |
*/ |
This file contains hidden or 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 argparse | |
import tensorflow as tf | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--example", help="target TFRecord Example file") | |
parser.add_argument("--sequence_example", | |
help="target TFRecord SequenceExample file") | |
args = parser.parse_args() | |
if args.sequence_example: |
This file contains hidden or 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
# Single pod Ubuntu deployment that will not terminate | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: ubuntu-deployment | |
labels: | |
app: ubuntu | |
spec: | |
replicas: 1 | |
selector: |
This file contains hidden or 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
sequenceDiagram | |
participant AI as Application Insights | |
link AI: JS SDK @ https://docs.microsoft.com/en-us/azure/azure-monitor/app/nodejs | |
link AI: Node.js SDK @ https://docs.microsoft.com/en-us/azure/azure-monitor/app/javascript | |
link AI: Azure Functions Java Distributed Tracing @ https://docs.microsoft.com/en-ca/azure/azure-monitor/app/monitor-functions | |
link AI: AKS App Monitoring @ https://docs.microsoft.com/en-us/azure/azure-monitor/app/kubernetes-codeless | |
link AI: AKS Java Codeless Monitoring @ https://docs.microsoft.com/en-us/azure/azure-monitor/app/java-in-process-agent | |
participant Functions as Azure Functions | |
participant FrontendServer as Frontend | |
participant Storage as Storage Account |
This file contains hidden or 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/ruby | |
# Create display override file to force Mac OS X to use RGB mode for Display | |
# see http://embdev.net/topic/284710 | |
require 'base64' | |
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay` | |
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten | |
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten |
OlderNewer