Skip to content

Instantly share code, notes, and snippets.

var readline = require('readline');
var R = require('ramda');
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var fn = function()
http://jsfiddle.net/ktjvct08/
https://ellie-app.com/v3HGgh8cyra1/0
#r "../fsharp-formatting/RazorEngine.dll"
#r "../fsharp-formatting/FSharp.MetadataFormat.dll"
#r "../fsharp-formatting/FSharp.CodeFormat.dll"
#r "../fsharp-formatting/FSharp.Formatting.Common.dll"
#load "../fsharp-formatting/FSharp.Formatting.fsx"
open FSharp.MetadataFormat
open System.IO
https://jsfiddle.net/undwk7g2/
let nv21ToPPM() =
let clampBetween0And255 v =
if v < 0.0 then
0.0
else if v >= 255.0 then
255.0
else
v
let width = 1280
@codec-abc
codec-abc / floatBitOperations.fs
Last active August 12, 2017 14:52
4 bits floating point number manipulation
//F# Compiler for F# 4.0 (Open Source Edition), Mono 4.2.1
open System
let u : byte = (byte) 0b11110000
let highMask : byte = (byte) 0b11110000
let lowMask : byte = (byte) 0b00001111
let uHigh : byte = u &&& highMask
@codec-abc
codec-abc / Main.cs
Created August 24, 2017 13:21
Test Lib Camera Rust
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
namespace ConsoleApp3
{
class Program
{
const string dllPath = @"C:\DEV\Escapi\escapi\target\debug\escapi_rust.dll";
use "collections"
primitive ErrorHelper
fun orNone[A](getter : {(): A?}): (A | None) =>
try
getter()?
else
None
end
use "files"
use "collections"
use "format"
primitive NoOp
fun noop() =>
let a = "noop"
primitive FileReader
fun read_file_lines(path : String, env : Env) : List[String]? =>