<commit_before>/*
	ɓXORƑS[ɂȂ邪A
	ɓ炵([e[g)XOR̂}Y񂶂ȂB
	-> }YۂB

	- - -

	 b1, b2, b3, ... bn  bn, b1, b2, ... b(n-1)  XOR ƁA

	(b1 ^ bn), (b2 ^ b1), (b3 ^ b2), ... (bn, b(n-1))

	// bx  x rbg̗ (x == 1`)

	ŁA

	(b1 ^ bn) ^ (b2 ^ b1) ^ (b3 ^ b2) ^ ... (b(n-1), b(n-2)) == (bn, b(n-1))

	Ȃ̂ŁAx rbg炵 XOR ƍŌ x rbgȊOmĂ΁AŌ x rbgB
*/

#include "C:\Factory\Common\all.h"

//#define SHIFT_B 1
//#define SHIFT_B 2
//#define SHIFT_B 3
#define SHIFT_B 4

static uint Counters[0x10000];

static uint ShiftV(uint v)
{
	return ((v >> SHIFT_B) | (v << (16 - SHIFT_B))) & 0xffff;
}
static void PutV(uint v)
{
	v ^= ShiftV(v);

	Counters[v]++;
}
int main(int argc, char **argv)
{
	uint v;

	for(v = 0x0000; v <= 0xffff; v++)
	{
		PutV(v);
	}
	for(v = 0x0000; v <= 0xffff; v++)
	{
		cout("0x%04x <- %u\n", v, Counters[v]);
	}
}
<commit_msg>daily<commit_after>/*
	ɓXORƑS[ɂȂ邪A
	ɓ炵(Rotate)XOR̂}Y񂶂ȂB
	-> }YۂB

	- - -

	 b1, b2, b3, ... bn  bn, b1, b2, ... b(n-1)  XOR ƁA// bx  N rbg̗ (N == 1`)
	(b1 ^ bn), (b2 ^ b1), (b3 ^ b2), ... (bn, b(n-1))
	ŁA
	(b1 ^ bn) ^ (b2 ^ b1) ^ (b3 ^ b2) ^ ... (b(n-1), b(n-2)) == (bn, b(n-1))
	Ȃ̂ x rbg ROT  XOR ƁuŌ x rbgvȊOmĂ΁uŌ x rbgvB

	- - -
*/

#include "C:\Factory\Common\all.h"

//#define SHIFT_B 1
//#define SHIFT_B 2
//#define SHIFT_B 3
#define SHIFT_B 4

static uint Counters[0x10000];

static uint ShiftV(uint v)
{
	return ((v >> SHIFT_B) | (v << (16 - SHIFT_B))) & 0xffff;
}
static void PutV(uint v)
{
	v ^= ShiftV(v);

	Counters[v]++;
}
int main(int argc, char **argv)
{
	uint v;

	for(v = 0x0000; v <= 0xffff; v++)
	{
		PutV(v);
	}
	for(v = 0x0000; v <= 0xffff; v++)
	{
		cout("0x%04x <- %u\n", v, Counters[v]);
	}
}

{'fraction_non_alphanumeric': 0.2467850581751378, 'fraction_numerical': 0.06001224739742805, 'mean_word_length': 2.6070640176600444, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2940388', 'n_tokens_mistral': 1015, 'n_tokens_neox': 948, 'n_words': 208}