Skip to content

Instantly share code, notes, and snippets.

Flexing with style transfer.

Matěj Račinský racinmat

Flexing with style transfer.
View GitHub Profile
antoninkriz / fastRequests.cs
Last active Jan 19, 2021
C# code to quickly send requests to a HTTP server. ~1.5k requests per second to a remote server with i3-7100U, NetCore 3.1 and 100/100Mb connection.
View fastRequests.cs
using System;
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
namespace TestProject
internal static class Program
mjtb49 /
Created Sep 5, 2020
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()

View thedoors.R
album_texty <- genius_album(artist = "The Doors", album = "The Doors")
tidy_album <- album_texty %>%
unnest_tokens(word,lyric) %>%
taddeimania /
Created Aug 14, 2017
import pickle
class Rick:
def __str__(self):
return "i'm pickle rick!!!!"
pickle_rick = pickle.dumps(Rick())
regular_rick = pickle.loads(pickle_rick)
# >>> i'm pickle rick!!!!
yrevar / imagenet1000_clsidx_to_labels.txt
Last active Sep 29, 2022
text: imagenet 1000 class idx to human readable labels (Fox, E., & Guestrin, C. (n.d.). Coursera Machine Learning Specialization.)
View imagenet1000_clsidx_to_labels.txt
{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 / .block
Last active Nov 26, 2020
Parallel Coordinates with mouseover highlight and tooltip
View .block
license: mit
pbugnion /
Last active Sep 30, 2022
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.

d11wtq / docker-ssh-forward.bash
Created Jan 29, 2014
How to SSH agent forward into a docker container
View docker-ssh-forward.bash
docker run -rm -t -i -v $(dirname $SSH_AUTH_SOCK) -e SSH_AUTH_SOCK=$SSH_AUTH_SOCK ubuntu /bin/bash
aras-p / preprocessor_fun.h
Last active Sep 29, 2022
Things to commit just before leaving your job
View preprocessor_fun.h
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,