Skip to content

Instantly share code, notes, and snippets.

View shimst3r's full-sized avatar

Nils shimst3r

  • OEDIV
  • Bielefeld
View GitHub Profile
@shimst3r
shimst3r / minio_storage.py
Created March 23, 2025 18:32
A Django custom Storage implementation for the MinIO object store
from io import BytesIO
from django.conf import settings
from django.core.files import File
from django.core.files.storage import Storage
from minio_storage.minio import S3Error, create_client
class MinIOStorage(Storage):
@shimst3r
shimst3r / tera_types_per_pokemon.md
Last active September 3, 2023 21:42
Pokemon VGC Regulation D - Limitless Metagame August 2023 - Tera Types per Pokemon

Tera Type Per Pokemon (Top 20 Pokemon)

The following table contains an overview of all Tera types used during the August 2023 Limitless metagame for VGC, based on Regulation D. Only the 20 most played Pokemon were taken into account.

Name TeraType TeraShare
Amoonguss water 86.6071
Amoonguss dark 4.6875
Amoonguss steel 3.57143
Amoonguss fairy 1.4881
@shimst3r
shimst3r / top20_pokemon_usage_stats.md
Created September 3, 2023 20:24
Pokemon VGC Regulation D - Limitless Metagame August 2023 - Metagame Share of Top 20 Pokemon

Metagame Share of Top 20 Pokemon

The following table describes the usage share of the Top 20 Pokemon used during the August 2023 Limitless metagame for VGC, based on Regulation D. Columns Name (Top8) and PokeShare (Top8) only take Top8 placements into account.

Rank Name PokeShare Name (Top8) PokeShare (Top8)
1 Flutter Mane 10.4091 Flutter Mane 10.8757
2 Rapid Strike Urshifu 7.40741 Rapid Strike Urshifu 7.74818
3 Iron Hands 6.38667 Iron Hands 6.98144
4 Tornadus 6.12846 Amoonguss 6.21469
@shimst3r
shimst3r / top_items_per_pokemon.md
Created September 3, 2023 19:32
Pokemon VGC Regulation D - Limitless Metagame August 2023 - Top Items per Pokemon

Items Per Pokemon (Top 20 Pokemon)

The following table contains an overview of all items used during the August 2023 Limitless metagame for VGC, based on Regulation D. Only the 20 most played Pokemon were taken into account.

Name Item ItemCount
Amoonguss Rocky Helmet 921
Amoonguss Sitrus Berry 302
Amoonguss Mental Herb 65
Amoonguss Aguav Berry 16
@shimst3r
shimst3r / gist:77f31b01143c78fdcb01eccb0a56619a
Created July 17, 2022 15:45
Diff of jit-log-opt output for onemillioninsertions.py based on my base type adaption optimisation
1,2c1,28
< [d412573b4c54e] {jit-log-opt-loop
< # Loop 1 (__get__;<builtin>/frozen _structseq:23-25~#0 LOAD_FAST) : entry bridge with 55 ops
---
> [d41225d29d5d1] {jit-log-opt-loop
> # Loop 1 (tuple.contains [str]) : entry bridge with 21 ops
> [i0, p1, p2]
> debug_merge_point(0, 0, 'tuple.contains [str]')
> +219: p3 = getarrayitem_gc_r(p1, i0, descr=<ArrayP 8>)
> +238: guard_class(p3, ConstClass(W_UnicodeObject), descr=<Guard0x7fce484275e0>) [i0, p2, p1, p3]
@shimst3r
shimst3r / wordle_expert.py
Created January 7, 2022 08:44
A simple helper tool for the Wordle word game
"""
MIT License
Copyright (c) 2021 Nils Müller
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
@shimst3r
shimst3r / ssh_client.py
Created December 29, 2021 12:58
PoC of Python client library
from contextlib import contextmanager
from dataclasses import dataclass
from paramiko import AutoAddPolicy, SSHClient
@dataclass
class User:
username: str
password: str
/*
* ununsplash parses the "Say thanks" link you get when downloading a photo from
* unsplash.com and returns it in a markdown-friendly format. With this script,
* you can avoid a lot of manual work if you use Unsplash a lot. :)
*
* Example:
* $ pbpaste | ununsplash
* Photo by [Louie Martinez](https://unsplash.com/@thetalkinglens?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/tokyo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)
*/
package main
#!/usr/bin/env python3
#
# ununsplash parses the "Say thanks" link you get when downloading a photo from
# unsplash.com and returns it in a markdown-friendly format. With this script,
# you can avoid a lot of manual work if you use Unsplash a lot. :)
#
# Example:
# $ pbpaste | ununsplash
# Photo by [Louie Martinez](https://unsplash.com/@thetalkinglens?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/tokyo?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText)
@shimst3r
shimst3r / garlic_poll.ipynb
Created June 16, 2020 19:12
Messy code for my Garlic Poll visualization
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.