Skip to content

Instantly share code, notes, and snippets.

View Art's full-sized avatar

Art Scott Art

View GitHub Profile
@KdotJPG
KdotJPG / OpenSimplex2S.java
Last active April 29, 2024 17:30
Visually isotropic coherent noise algorithm based on alternate constructions of the A* lattice.
/**
* K.jpg's OpenSimplex 2, smooth variant ("SuperSimplex")
*
* More language ports, as well as legacy 2014 OpenSimplex, can be found here:
* https://github.com/KdotJPG/OpenSimplex2
*/
public class OpenSimplex2S {
private static final long PRIME_X = 0x5205402B9270C86FL;
@kripken
kripken / hello_world.c
Last active January 17, 2024 12:15
Standalone WebAssembly Example
int doubler(int x) {
return 2 * x;
}
@mathias-brandewinder
mathias-brandewinder / gist:5558573
Last active October 31, 2023 05:05
Stub for F# Machine Learning Dojo
// This F# dojo is directly inspired by the
// Digit Recognizer competition from Kaggle.com:
// http://www.kaggle.com/c/digit-recognizer
// The datasets below are simply shorter versions of
// the training dataset from Kaggle.
// The goal of the dojo will be to
// create a classifier that uses training data
// to recognize hand-written digits, and
// evaluate the quality of our classifier
@cure53
cure53 / wasm.md
Last active October 17, 2023 00:16
Calling alert from WASM

Calling alert from WebAssembly (WASM)

This very simple and minimal tutorial documents in a few easy steps how to play with WebAssembly (WASM) and get first results within minutes.

While the code below is mostly useless, it will show, how to call the alert function from within a WASM file and thus demonstrate how to import and export DOM objects.

Of course, this exercise has no real use. It is just meant to show, that getting started with WASM isn't hard. And there is no need for a complex build-chain, tons of tools or a dedicated VMs. Just use a browser, one online tool and that's it.

And Now?

@cbalint13
cbalint13 / OpenLANE.md
Last active April 1, 2023 16:50
OpenLANE steps
@deepankarsharma
deepankarsharma / modern_opengl_01_triangle.py
Created August 28, 2012 01:50
Modern opengl using Python
from glfwpy.glfw import (AUTO_POLL_EVENTS, OPENED, OPENGL_CORE_PROFILE,
OPENGL_FORWARD_COMPAT, OPENGL_PROFILE, OPENGL_VERSION_MAJOR,
OPENGL_VERSION_MINOR, WINDOW,
Enable, GetWindowParam, Init, OpenWindow, OpenWindowHint,
SetKeyCallback, SetWindowTitle, SwapBuffers, Terminate)
import numpy as np
from OpenGL.arrays import ArrayDatatype
from OpenGL.GL import (GL_ARRAY_BUFFER, GL_COLOR_BUFFER_BIT,
GL_COMPILE_STATUS, GL_FALSE, GL_FLOAT, GL_FRAGMENT_SHADER,
GL_LINK_STATUS, GL_RENDERER, GL_SHADING_LANGUAGE_VERSION,
@palladin
palladin / gist:c5fca07b74da782832cb
Last active September 25, 2021 17:52
Parallel Streams Test
#time
#r "bin/Release/Streams.Core.dll"
open Nessos.Streams.Core
let data = [|1..10000000|] |> Array.map int64
#r "../../packages/FSharp.Collections.ParallelSeq.1.0/lib/net40/FSharp.Collections.ParallelSeq.dll"

Keybase proof

I hereby claim:

  • I am cure53 on github.
  • I am cure53 (https://keybase.io/cure53) on keybase.
  • I have a public key whose fingerprint is F98B 0EC1 8640 2F60 292C 5877 C26C 8580 90F7 0ADA

To claim this, I am signing this object:

@sudipto80
sudipto80 / CollaborativeFiltering.fs
Created January 21, 2016 08:56
Collaborative Filtering
// Learn more about F# at http://fsharp.org
// See the 'F# Tutorial' project for more help.
//Comprehensive coverage of Collaborative Filtering Techniques
//http://www.hindawi.com/journals/aai/2009/421425/
module confusion =
let TP (matches : int [] []) =
matches |> Array.mapi( fun i j -> matches.[i].[i]) |> Array.sum
@ApprenticeGC
ApprenticeGC / SomeClassFSharp.fs
Created October 27, 2012 09:18
Unity 3d editor plugin code in F#
namespace Assembly_FSharp_vs
open UnityEditor
open UnityEngine
type public SomeTool() =
inherit UnityEditor.EditorWindow()
//
[<MenuItem("MySelection/Print Selection")>]
static member ShowWindow() = UnityEditor.EditorWindow.GetWindow(typeof<SomeTool>)