Skip to content

Instantly share code, notes, and snippets.

View Damercy's full-sized avatar
:octocat:
Living a lie.

Dayamoy Adhikari Damercy

:octocat:
Living a lie.
View GitHub Profile
@Damercy
Damercy / KotlinSample.kt
Created January 8, 2021 20:42
Kotlin sample code
// Playground code link - https://pl.kotl.in/8XKnzisvF
/**
* You can edit, run, and share this code.
* play.kotlinlang.org
*/
fun main() {
val tim = Player(name="Tim",level=4,lives=8)
val louise = Player("Louise",2,5,1000)
let nodes = [];
let nodesBegin = [];
let nodesEnd = [];
let nodesDist = [];
let paths = [];
let filtered = [];
let exponent = 4; // Determines the curve
let x = 0.0; // Current x-coordinate
let y = 0.0; // Current y-coordinate
@Damercy
Damercy / network_animation_neuron_2.js
Last active September 1, 2023 17:43
Basic representation of a neural network layer in web canvas
let nodes=[];
function setup() {
createCanvas(600, 400);
const numNodes = 3;
for(let i=0;i<numNodes;i++)
nodes.push(new Node());
}
function draw() {
nodes.forEach((node,idx) => {
@Damercy
Damercy / network_animation_neuron_1.js
Created November 3, 2020 22:25
Network animation for DumbTF.
const done = false;
let moveX1 = 1;
let moveX2 = 1;
const recWidthPad=20+2;
function setup() {
createCanvas(600, 400);
noStroke();
}