This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <iostream> | |
#include <cstdint> | |
// 1/1/1900 -> Monday | |
uint64_t days_in_year(uint64_t y) { | |
bool div4 = (y & 0x3) == 0; | |
bool div16 = (y & 0xf) == 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------ | |
import sys | |
import N10X | |
import subprocess | |
import re | |
import os | |
import shutil | |
""" | |
black python formatter for 10x (10xeditor.com) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------ | |
import sys | |
import N10X | |
import subprocess | |
import re | |
import os | |
""" | |
autopep8 python formatter for 10x (10xeditor.com) | |
Version: 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ------------------------------------------------------------------------ | |
import N10X | |
import subprocess | |
import json | |
import re | |
import xml.etree.ElementTree as ET | |
import os | |
import operator | |
import hashlib | |
import copy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Format: <SettingName>: <Settingvalue> | |
# Setting name must appear at start of line and there must be whitespace after the colon. | |
# Multiple values can be comma separated or on subsequent lines. | |
# | |
# Valid settings for colour rules: | |
# REGEX() A regular expression. Colours entire match or first group. | |
# WORD() Matches a word (case sensitive) | |
# WORDI() Matches a word (case insensitive) | |
# TEXT() Match any text in the line (case sensitive) | |
# TEXTI() Match any text in the line (case insensitive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module; | |
import <array>; | |
import <vector>; | |
import <tuple>; | |
import <bit>; | |
export module struct_of_arrays; | |
export { | |
/* | |
A barebones struct of arrays base structure |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module; | |
import <cstdint>; | |
import <cstring>; | |
export module wheathash; | |
/* | |
Wheathash takes (optimally) 32-bit inputs and produces a 64-bit hash as its result. | |
It is a slightly-edited version of Waterhash, which is an edited version of wyhash. | |
It is meant to use very similar code to Waterhash, which produces a 32-bit hash. | |
Original Author: Wang Yi <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string_view> | |
struct arguments { | |
int argc = {}; | |
int contiguous_argc = {}; | |
const char** argv = {}; | |
size_t last_argument_size = {}; | |
arguments(int arg_count, const char* arg_values[]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <string> | |
#include <filesystem> | |
//needs utf8-cpp! | |
void string_from(std::string& buf, const std::filesystem::path& path) | |
{ | |
// buf.clear(); | |
if constexpr (std::is_same_v<std::filesystem::path::string_type, std::string>) { | |
// buf.insert(buf.end(), path.native().data(), path.native().data() + path.native().size()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
#include <cstdint> | |
namespace rng::utils { | |
struct debiased_u64 { | |
uint64_t bits = {}; | |
uint32_t bit_count = {}; | |
}; | |
struct debiased_bool { |
NewerOlder