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
@JanTvrdik
JanTvrdik / FormMacros.php
Created June 12, 2010 10:49 — forked from janmarek/FormMacros.php
Macros for manual form rendering in Nette Framework
<?php
namespace Nette\Templates;
use Nette;
use Nette\String;
use Nette\Forms\Form;
/**
* Form macros
*
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)
@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);
@mostaphaRoudsari
mostaphaRoudsari / .block
Last active November 26, 2020 04:03
Parallel Coordinates with mouseover highlight and tooltip
license: mit
@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/";
@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!!!!
@webdestroya
webdestroya / RichardIsAFuckingIdiot.cs
Created January 4, 2012 01:27
RichardIsAFuckingIdiot
//Code sanitized to protect the foolish.
using System;
using System.Collections.Generic;
using System.Text;
using System.Reflection;
using System.Web.UI;
namespace Mobile.Web.Control
{
/// <summary>
@jcppkkk
jcppkkk / gist:6409139
Last active September 30, 2023 15:49
Cookie clicker assistant (Bookmarklet) store the code as a bookmark, then click it when you are in Cookie clicker.
javascript: (function () {
function loadScript(b, c) {
var a = document.createElement("script");
a.type = "text/javascript";
if (a.readyState) {
a.onreadystatechange = function () {
if (a.readyState == "loaded" || a.readyState == "complete")
{a.onreadystatechange = null; c() } }
} else {a.onload = function () {c() } } a.src = b;
document.getElementsByTagName("head")[0].appendChild(a)
@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.

@larsmans
larsmans / hellinger.py
Created July 15, 2012 13:25
Hellinger distance for discrete probability distributions in Python
"""
Three ways of computing the Hellinger distance between two discrete
probability distributions using NumPy and SciPy.
"""
import numpy as np
from scipy.linalg import norm
from scipy.spatial.distance import euclidean