Skip to content

Instantly share code, notes, and snippets.

@Skybladev2
Skybladev2 / doc2vec.py
Created May 12, 2019 19:57
Measuring the similarity of books using TF-IDF, Doc2vec and TensorFlow
import collections
import math
import os
import pickle
import random
import re
import time
import urllib.request
import matplotlib.pyplot as plt
@Skybladev2
Skybladev2 / FrustumPlanes.cs
Created April 23, 2019 19:05 — forked from ssell/FrustumPlanes.cs
Implementation of a Unity ECS instanced Sprite renderer with basic frustum culling.
using Unity.Mathematics;
using Unity.Rendering;
using UnityEngine;
namespace Realms
{
/// <summary>
/// Based on Unity.Rendering.FrustumPlanes since those aren't public for some reason.
/// </summary>
public struct FrustumPlanes
@Skybladev2
Skybladev2 / ExecutionOrderManager.cs
Last active June 29, 2023 11:20
Explicit script exection order for Unity scripts
using System;
using UnityEditor;
[InitializeOnLoad]
public class ExecutionOrderManager : Editor
{
static ExecutionOrderManager()
{
foreach (MonoScript monoScript in MonoImporter.GetAllRuntimeMonoScripts())
{
@Skybladev2
Skybladev2 / UT2004 web stat regex
Created May 7, 2012 16:51
Regular expression for parsing Unreal Tournament 2004 utdbstat player page.
#region killingSpreesRegex
killingSpreesRegexPattern = "<table cellpadding=\"\\d+?\" cellspacing=\"\\d+?\" border=\"\\d+?\" width=\"\\d+?\">\\s*?" +
"<tr>\\s*?" +
"<td class=\"\\w+?\" align=\"\\w+?\" colspan=\"\\d+?\">Killing Sprees by Type</td>\\s*?" +
"</tr>\\s*?" +
"<tr>\\s*?" +
"<td class=\"\\w+?\" align=\"\\w+?\" width=\"\\d+?\">Spree Type</td>\\s*?" +
"<td class=\"\\w+?\" align=\"\\w+?\" width=\"\\d+?\"># of Sprees</td>\\s*?" +
"<td class=\"\\w+?\" align=\"\\w+?\" width=\"\\d+?\">(Total Time \\(min\\)|Min\\. In Spree)</td>\\s*?" +
"<td class=\"\\w+?\" align=\"\\w+?\" width=\"\\d+?\">Total Kills</td>\\s*?" +