Skip to content

Instantly share code, notes, and snippets.

View racinmat's full-sized avatar
🎨
Playing with Stable Diffusion in spare time.

Matěj Račinský racinmat

🎨
Playing with Stable Diffusion in spare time.
View GitHub Profile
@harubaru
harubaru / wd1-3-release.md
Last active April 20, 2024 04:35
Official Release Notes for Waifu Diffusion 1.3
@antoninkriz
antoninkriz / fastRequests.cs
Last active January 8, 2023 23:58
C# code to quickly send requests to a HTTP server. Can send over ~1500 requests per second to a remote server.
using System.Net;
using System.Net.Http.Headers;
using System.Text;
namespace fastRequests
{
internal static class Program
{
private const string Host = "example.com";
private const string Url = "https://example.com/";
@mjtb49
mjtb49 / MushroomCondition.java
Created September 5, 2020 20:35
A small class to demonstrate an idea for biome seedfinding
/**
* An example of the method for the specific case of finding patterns of mushroom islands. Some things,
* like the layerseed will be hardcoded which should eventually be computed dynamically
* depending on which layer and nextInt call the user wishes to target.
*/
public class MushroomCondition {
final static long SHROOM_LAYER_SEED = -7479281634960481323L; //must be computed for each layer, maybe a LUT?
final static long EPSILON = (1L << 32);

Seed Cracking

Part 1: A little explanation about Java Random

  • java.util.Random, An instance of this class is used to generate a stream of pseudorandom numbers. The class uses a 48-bit seed, which is modified using a linear congruential formula. (See Donald Knuth, The Art of Computer Programming, Volume 2, Section 3.2.1.)

  • This class has 6 nifty functions:

    • nextBoolean()
    • nextDouble()
  • nextFloat()

library(geniusR)
library(tidyverse)
library(tidytext)
album_texty <- genius_album(artist = "The Doors", album = "The Doors")
tidy_album <- album_texty %>%
unnest_tokens(word,lyric) %>%
anti_join(stop_words)
@taddeimania
taddeimania / pickle_rick.py
Created August 14, 2017 01:39
I'M PYTHON PICKLE RICK!!!!
import pickle
class Rick:
def __str__(self):
return "i'm pickle rick!!!!"
pickle_rick = pickle.dumps(Rick())
regular_rick = pickle.loads(pickle_rick)
print(regular_rick)
# >>> i'm pickle rick!!!!
@yrevar
yrevar / imagenet1000_clsidx_to_labels.txt
Last active April 17, 2024 22:50
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
{0: 'tench, Tinca tinca',
1: 'goldfish, Carassius auratus',
2: 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
3: 'tiger shark, Galeocerdo cuvieri',
4: 'hammerhead, hammerhead shark',
5: 'electric ray, crampfish, numbfish, torpedo',
6: 'stingray',
7: 'cock',
8: 'hen',
9: 'ostrich, Struthio camelus',
@mostaphaRoudsari
mostaphaRoudsari / .block
Last active November 26, 2020 04:03
Parallel Coordinates with mouseover highlight and tooltip
license: mit
@pbugnion
pbugnion / ipython_notebook_in_git.md
Last active October 22, 2023 12:25
Keeping IPython notebooks under Git version control

This gist lets you keep IPython notebooks in git repositories. It tells git to ignore prompt numbers and program outputs when checking that a file has changed.

To use the script, follow the instructions given in the script's docstring.

For further details, read this blogpost.

The procedure outlined here is inspired by this answer on Stack Overflow.