Skip to content

Instantly share code, notes, and snippets.

View Theoistic's full-sized avatar

Theodor Solbjorg Theoistic

View GitHub Profile
@Theoistic
Theoistic / Network.cs
Created September 1, 2017 14:24
Neural Network
public class Network
{
public double LearnRate { get; set; }
public double Momentum { get; set; }
public List<Neuron> InputLayer { get; set; }
public List<List<Neuron>> HiddenLayers { get; set; }
public List<Neuron> OutputLayer { get; set; }
private static readonly Random Random = new Random();
@Theoistic
Theoistic / nBook.cs
Last active August 26, 2018 21:36
Booking Sketch
public static List<TimeSlot> GetAvailableTimeSlots(this ServiceEntry service, DateTime start, DateTime end, TimeSpan duration, Func<ResourceEntry, bool> resourcePredicate)
{
var Unavailable = service.Bookings.Where(x => resourcePredicate(x.Resource)).Select(y => y.Period);
List<TimeSlot> OriginalAvail = new List<TimeSlot>();
DateTime setTime = start;
while (setTime < end)
{
if ((setTime.Hour < start.Hour) || (setTime.Hour > end.Hour))
{
setTime = setTime.Add(duration);
@Theoistic
Theoistic / PackageManager.cs
Last active August 11, 2019 20:33
Nuget Package Resolver from https://Cursive.Dev (the cursive .NET language) - taken from version 0.8.4
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Net;
using System.Threading.Tasks;
using System.Xml.Linq;
namespace Cursive
@Theoistic
Theoistic / WeirdDiceGame.cs
Created May 14, 2020 17:44
This is some weird game.
public class Player
{
public string Username;
public int Score;
public Player(string name)
{
this.Username = name;
}
}
using System;
namespace Data_Projekt_2020_EUX
{
class Program
{
/* public boolean that is accessable from all functions. its good to just throw this outside the scope,
* because it will allow all methods in the future to read what your program is at .. at the moment.*/
public static bool Done = false;
using System.Collections.Generic;
using System.IO;
using System.Linq;
namespace Test44
{
public class License
{
public string ID { get; set; }
@Theoistic
Theoistic / TikTok Android Manifest
Last active December 6, 2023 04:17
TikTok Android Manifest Version 16.6.4
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:amazon="http://schemas.amazon.com/apk/res/android" xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="160604" android:versionName="16.6.4" android:installLocation="auto" android:compileSdkVersion="28" android:compileSdkVersionCodename="9" package="com.ss.android.ugc.trill" platformBuildVersionCode="28" platformBuildVersionName="9">
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
@Theoistic
Theoistic / LinqGoneWrong.cs
Created November 30, 2020 19:53
Linq Gone Wrong
var _w = new List<object>();
weeks.ForEach(x =>
{
var locations = new List<object>();
x.GroupBy(c => c.Location.Name).ForEach(l => {
var eh = new
{
Answers = l.GroupBy(n => n.Value)
.Select(n => new
@Theoistic
Theoistic / QuBit.cs
Created February 6, 2021 19:08
The QuBit interpreter ..
using System;
using System.IO;
using System.Linq;
namespace qubit
{
public class QuBitInterpreter {
public static byte[] stack;
public static int pointer;
@Theoistic
Theoistic / Pandas.asm
Last active February 21, 2021 08:33
Some TikTok Panda Stuff
.intel_syntax noprefix
.global main
pandas:
.string "PANDA"
.zero 4
.string "THUNDER"
.zero 2
.string "TENT"
.zero 5