Skip to content

Instantly share code, notes, and snippets.

View robin92's full-sized avatar

Rafal robin92

  • Wroclaw, Poland
  • 22:32 (UTC +02:00)
View GitHub Profile
@robin92
robin92 / README.md
Last active December 9, 2021 22:06
Pokemon breeding probability calculator

Pokemon breeding probability calculator

What is this?

This is a simple command line program written in Python for calculating probability of hatching an egg with fixed number of perfect IVs.

The mechanism of IV inheritance in Pokemon (up to 7th gen) is quite simple. Parnets can pass 3 or 5 (if one holds destiny knot) of their IVs to the offspring. IVs to be passed are selected randomly, with equal probability, and do not overlap (eg. passing Attack from both parents is impossible).

@robin92
robin92 / adl.cpp
Created November 22, 2016 08:26
C++ ADL example
#include <iostream>
namespace other
{
struct Foo {};
void func(const Foo& foo) { std::cout << "yes!\n"; }
} // namespace other
@robin92
robin92 / corporate-linux-desktop-howto.md
Created October 13, 2016 15:20 — forked from anonymous/corporate-linux-desktop-howto.md
How to run Linux desktop in a corporate environment

How to run Linux desktop in a corporate environment

DISCLAIMER

Some of the practices described in this HOWTO are considered to be illegal as they often break internal corporate policies. Anything you do, you do at your own risk.

@robin92
robin92 / is_container.cpp
Last active January 19, 2017 08:46
cpp metaprogramming, is_container (sfinae for templates)
// taken from http://stackoverflow.com/a/31207079
// assuming that only containers have value_type
#include <cassert>
#include <vector>
namespace detail {
// the whole point of this structure is to get template-based sfinae working
template <class... _> struct resolved {};