Skip to content

Instantly share code, notes, and snippets.

@irsal
irsal / gpl-license.rs
Created January 7, 2022 20:31
OAK Blockchain GPL License
// This file is part of OAK Network.
// Copyright (C) 2020-2021 OAK Network.
// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
@irsal
irsal / license.rs
Created January 7, 2022 20:29
OAK Blockchain License Gist
// This file is part of OAK Blockchain.
// Copyright (C) 2021 OAK Network
// SPDX-License-Identifier: Apache-2.0
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
@irsal
irsal / gvis_sample
Created October 7, 2014 21:52
A first hack at Rook with googleVis
install.packages('Rook', 'googleVis')
library(Rook)
library(googleVis)
server <- Rhttpd$new()
server$start(quiet=TRUE)
server$print()
tbl1 <- gvisTable(Population)
plot(tbl1) ## Opens a new window in your default web browser
@irsal
irsal / QuickSort.cs
Last active December 20, 2015 16:29
Quick Sort Recursion
/// <summary>
/// Pseudo-randomization of the partition
/// </summary>
public int Partition(Particle[] a, int index, int start, int end)
{
float pValue = a[index].depth;
Particle temp1 = a[index];
a[index] = a[end];
a[end] = temp1;
@irsal
irsal / binary_heap.cs
Last active April 3, 2023 13:36
Binary Heap Implementation C#
using System;
namespace PathPlanner
{
/// <summary>
/// A min-type priority queue of Nodes
/// </summary>
public class BinaryHeap
{
#region Instance variables