This file contains 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.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Configs; | |
using BenchmarkDotNet.Filters; | |
namespace NetPlayground; | |
[MemoryDiagnoser] |
This file contains 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.Reflection; | |
using CrashKonijn.Goap.Behaviours; | |
using CrashKonijn.Goap.Classes.Builders; | |
using CrashKonijn.Goap.Interfaces; | |
using UnityEngine; | |
namespace Megaspell.AI.Capabilities | |
{ |
This file contains 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
import json | |
import os | |
from pathlib import Path | |
# Remove story files with ratings that's not whitelisted | |
whitelisted_ratings = set(['everyone', 'teen']) | |
with open('index.json', 'r', encoding='utf-8') as f: | |
index = json.loads(f.read()) |
This file contains 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
import os | |
import sys | |
import glob | |
from more_itertools import chunked | |
from multiprocessing import Pool | |
from epub2txt import epub2txt | |
from pathlib import Path | |
# Pre: | |
# pip install more-itertools |
This file contains 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.Runtime.Serialization; | |
using System.Runtime.Serialization.Formatters.Binary; | |
/// <summary> | |
/// Use to edit Besti friend save file. | |
/// Tested on version 9.100 | |
/// |
This file contains 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
import kotlin.math.ceil | |
import kotlin.math.floor | |
import kotlin.math.roundToInt | |
import kotlin.math.sqrt | |
const val PRECISION: Double = 0.1 | |
fun main() { | |
val case0 = Conditions( | |
sizeX = 3, sizeY = 2, sizeZ = 2, |
This file contains 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
import java.lang.IllegalArgumentException as ИсключениеНезаконногоАргумента | |
import java.lang.StringBuilder as СборщикСтроки | |
import kotlin.Int as ЦелоеЧисло | |
import kotlin.String as Строка | |
/** | |
* Никогда так не делайте. | |
*/ | |
fun main() { | |
val результат = `Создать строку из Н повторений строки С, но не больше М символов`(с = "Боже", н = 100, м = 398) |
This file contains 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.shimmermare.playgroundjava.misc; | |
import java.util.ArrayList; | |
import java.util.Arrays; | |
import java.util.List; | |
import java.util.Random; | |
// Union-find problem | |
public class NumberofIslands2 { | |
public static void main(String[] args) { |
This file contains 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.shimmermare.playgroundjava.misc; | |
import java.util.ArrayList; | |
import java.util.List; | |
import java.util.Random; | |
public class BombEnemy { | |
public static void main(String[] args) { | |
testCase(10000, 10000, 0.05F, 0.1F, 0); | |
} |
This file contains 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
!!! DON'T USE REGEX TO PARSE HTML UNLESS YOU ABSOLUTELY HAVE TO !!! | |
Match full tag: <\s*(\w+)(?:\s*\w+=(?:"[^"]*"|'[^']*'))*?\s*>(.*?)<\s*\/\s*\1\s*> | |
Group 1: tag name | |
Group 2: tag content | |
! Uses repeated captures, thus isn't supported by Python's re - use this https://pypi.org/project/regex/ ! | |
Match self-closing tag: <\s*(\w+)(?:\s*\w+=(?:"[^"]*"|:'[^']*'))*?\s*\/\s*> | |
Group 1: tag name |