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
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
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; | |
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
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.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.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
package com.GuyInGrey.Amity; | |
import java.util.ArrayList; | |
import java.util.Random; | |
import java.util.Stack; | |
public class MazeGenerator | |
{ | |
static Random rand; |
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
// Message GuyInGrey if this has issues! | |
const request = require("request-promise-native"); | |
// Note: The EDSM rate limit is 360/hour. More than enough for this server's usage. | |
let apiUrl = "https://www.edsm.net/"; | |
async function getSystemInfo(systemName) { | |
return new Promise(async (fulfill, reject) => { | |
try { |
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
const Augur = require("augurbot"), | |
u = require("../utils/utils"); | |
const request = require("request-promise-native"); | |
function getFromAPI(params) { | |
var url = "https://www.edsm.net/api-v1/" + params; | |
return JSON.parse(request(url)); | |
} | |
const Module = new Augur.Module() |