This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Newtonsoft.Json; | |
using Processing; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using System.Linq; | |
using TMPro; | |
using UnityEngine; | |
using UnityEngine.UI; | |
namespace MorganSS | |
{ | |
public class DialogueBox : MonoBehaviour | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Threading.Tasks; | |
using Processing; | |
namespace EDStatistics | |
{ | |
public class GalaxyDisplay : ProcessingCanvas | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.IO; | |
using Processing; | |
namespace EDStatistics | |
{ | |
public static class GalaxyRenderer | |
{ | |
public static PColor[] DefaultColorMapping = new[] | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var random = new Random(1); // Set seed for consistent results | |
var numbers = new int[50000000]; // Large dataset | |
Console.WriteLine("Generating numbers..."); | |
for (var i = 0; i < numbers.Length; i++) | |
{ | |
numbers[i] = random.Next(); | |
} | |
Console.WriteLine("Creating copies..."); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Drawing; | |
using Processing; | |
namespace Processing_Test | |
{ | |
public class Recursion : ProcessingCanvas | |
{ | |
int maxDepth = 0; | |
public Recursion() => CreateCanvas(1000, 1000, 30); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Command("fib")] | |
[Alias("fibonnaci")] | |
[Syntax("fib <n>")] | |
[RequireRole("staff")] | |
public async Task Fib(int n) | |
{ | |
if (n <= 0) { await ReplyAsync("No."); return; } | |
if (n == 1) { await ReplyAsync("0"); return; } | |
if (n == 2) { await ReplyAsync("1"); return; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client.ChannelCreated += async (a) => DiscordEvent("ChannelCreated", a); | |
Client.ChannelDestroyed += async (a) => DiscordEvent("ChannelDestroyed", a); | |
Client.ChannelUpdated += async (a, b) => DiscordEvent("ChannelUpdated", a, b); | |
Client.Connected += async () => DiscordEvent("Connected"); | |
Client.CurrentUserUpdated += async (a, b) => DiscordEvent("CurrentUserUpdated", a, b); | |
Client.Disconnected += async (a) => DiscordEvent("Disconnected", a); | |
Client.GuildAvailable += async (a) => DiscordEvent("GuildAvailable", a); | |
Client.GuildMembersDownloaded += async (a) => DiscordEvent("GuildMembersDownloaded", a); | |
Client.GuildMemberUpdated += async (a, b) => DiscordEvent("GuildMembersUpdated", a, b); | |
Client.GuildUnavailable += async (a) => DiscordEvent("GuildUnavailable", a); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Command("mandelbrot")] | |
public async Task Mandelbrot() | |
{ | |
var maxToRun = 40; | |
var frames = 3600; | |
var path = @"C:\RenderingTemp\"; | |
var colors = Enumerable.Range(0, maxToRun + 1).Select(i => Paint.Lerp(Paint.White, Paint.Black, i / (float)maxToRun)).ToArray(); | |
if (Directory.Exists(path)) { try { Directory.Delete(path, true); } catch { } } | |
Directory.CreateDirectory(path); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Drawing; | |
using ComputeSharp; | |
using Windows.Devices.SmartCards; | |
namespace EDStatistics_Core | |
{ | |
public readonly struct HeatmapImageGenerationShader : IComputeShader | |
{ | |
public readonly ReadWriteBuffer<int> density; | |
public readonly ReadWriteBuffer<int> image; |