Skip to content

Instantly share code, notes, and snippets.

View callumvanzyl's full-sized avatar
🏠
Stuck @ Home

Callum Van Zyl callumvanzyl

🏠
Stuck @ Home
View GitHub Profile
@callumvanzyl
callumvanzyl / FetchPackagingDependencies.kt
Created August 7, 2022 21:10
A Gradle plugin which creates tasks to download platform-specific JRE distributions from Adoptium
package com.project.build
import org.gradle.api.Plugin
import org.gradle.api.Project
import java.io.File
import java.io.FileOutputStream
import java.net.URL
import java.nio.channels.Channels
import java.nio.file.Files
import java.nio.file.Path
@callumvanzyl
callumvanzyl / SigmoidFunction.lua
Created October 21, 2021 19:37
A simple Lua class that can generate a Sigmoid function and transform input based on its parameters.
local e = 2.7182818284590
local SigmoidFunction = {}
SigmoidFunction.__index = SigmoidFunction
function SigmoidFunction:transform(x)
return (1 / (1 + (e ^ ((x * self.steepness) + self.offset))))
end
function SigmoidFunction:calculateOdds(difficulty, luck)

Keybase proof

I hereby claim:

  • I am callumvanzyl on github.
  • I am callumvanzyl (https://keybase.io/callumvanzyl) on keybase.
  • I have a public key whose fingerprint is DF60 ED37 716E 7686 29F5 28B8 48BC 2D17 BAF1 3383

To claim this, I am signing this object: