Skip to content

Instantly share code, notes, and snippets.

View Felk's full-sized avatar
👑

Felix König Felk

👑
  • Germany
View GitHub Profile
@Felk
Felk / possible_emoji.regex
Created December 6, 2020 19:18
A UTF-16-compatible (e.g. C#, JavaScript) regular expression that matches a superset of all possibly valid emojis as specified in the Unicode® Technical Standard #51 Section 1.4.9 'EBNF and Regex': https://www.unicode.org/reports/tr51/#EBNF_and_Regex
(?:\uD83C[\uDDE6-\uDDFF]) (?:\uD83C[\uDDE6-\uDDFF])
| (?:[\u0023\u002A\u0030-\u0039\u00A9\u00AE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|(?:\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\u
@Felk
Felk / testscript.py
Created July 23, 2020 21:31
some example script for the experimental dolphin build with python scripting support
# test script for https://github.com/Felk/dolphin/tree/scripting
import dolphin_event as event
import dolphin_memory as memory
import dolphin_aevent as aevent
i = 0
def onframeadvance():
global i
coro = aevent.frameadvance()
print(f"frameadvance1: {coro.send(None)}")
{
"actions": [],
"bets": [],
"feed": [
{
"datetime": "2020-01-22 19:33:08.803000",
"text": "Team Red\u0027s ARTICUNO is exerting its Pressure!"
},
{
"datetime": "2020-01-22 19:33:11.189000",
{
"actions": [],
"bets": [],
"feed": [
{
"datetime": "2020-01-22 19:17:23.861000",
"text": "Team Blue\u0027s SHUPPET vanished instantly!"
},
{
"datetime": "2020-01-22 19:17:25.081000",
This file has been truncated, but you can view the full file.
{
"_id" : 36030,
"bets" : [],
"feed" : [
[
ISODate("2020-01-19T13:20:40.237Z"),
"Blue's MANKEY used Endeavor!"
],
[
ISODate("2020-01-19T13:20:43.691Z"),
@Felk
Felk / ffmpeg_example.py
Last active May 21, 2020 20:24
example of lightweight ffmpeg wrapper in python
pipeline = ffmpeg.Pipeline()
silence, = pipeline.input(Filter("aevalsrc", 0, 1, filter_options=[ # using anullsrc corrupts the audio
"0", "channel_layout=stereo", "sample_rate=44100"
]))
color, = pipeline.input(Filter("color", 0, 1, filter_options=[
"color=0x009999",
"duration=" + str(duration),
"rate=" + str(config.framerate),
"size=1920x1080",
]))
/** Usage:
* final BytecodeClassLoader classLoader = new BytecodeClassLoader(bytecode);
* final Class<?> newClass = classLoader.loadClass("com.example.SomeClass");
*/
public class BytecodeClassLoader extends ClassLoader {
private byte[] bytes;
public BytecodeClassLoader(byte[] bytes) {
super();
this.bytes = bytes;
package de.soptim.egon;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.ListIterator;
public class LinkedHashSetList<T> extends LinkedHashSet<T> implements List<T> {
# 1: Addarash1 $ 13,661,422
# 2: axieu $ 5,544,383
# 3: RoysOurKing $ 5,460,577
# 4: Sandoz1 $ 3,798,447
# 5: DeadOpsArcadeCafe $ 3,509,790
# 6: boombafunk $ 3,323,819
# 7: Egobuff $ 2,151,330
# 8: Mencee $ 2,139,215
# 9: twisparkz $ 2,121,228
# 10: Hexate3 $ 2,081,331
Madden '95 (UE), gb, started at 2017-02-09 21:41:07.539000
Street Racer (U), gb, started at 2017-02-09 21:46:03.818000
Lucky Luke (U) (M4), gbc, started at 2017-02-09 21:47:41.679000
Monster Rancher Battle Card GB (U), gbc, started at 2017-02-09 21:51:03.839000
College Slam (U), gb, started at 2017-02-09 22:01:03.908000
WWF WrestleMania 2000 (U), gbc, started at 2017-02-09 22:06:03.933000
Max (UE), gb, started at 2017-02-09 22:07:53.578000
Aladdin (U), gb, started at 2017-02-09 22:12:49.830000
Star Wars - Super Return of the Jedi (U), gb, started at 2017-02-09 22:17:49.863000
Lost World, The - Jurassic Park (U), gb, started at 2017-02-09 22:22:49.880000