Skip to content

Instantly share code, notes, and snippets.

View dgski's full-sized avatar

David Gorski dgski

View GitHub Profile
#include <iostream>
#include <vector>
#include <chrono>
namespace branchless {
template<typename It>
It lower_bound(It begin, It end, const typename It::value_type& value)
{
auto len = std::distance(begin, end);
#include <iostream>
#include <variant>
#include <string>
#include <vector>
#include <tuple>
struct Error {
std::string message;
Error(std::string _message) : message(std::move(_message)) {}
};
let request = {
"first_name": first_name,
"last_name": last_name,
"email": email,
"address": JSON.parse(address),
"weight_kg": weight_kg,
"target_weight_kg": target_weight_kg,
"height_cm": height_cm,
"activity_level": activity_level,
"gender": gender,
#include <iostream>
#include <variant>
#include <vector>
// Forward Declaration
struct Node;
// Simple
using Int = int;
using String = std::string;
#include <iterator>
namespace compiletime {
template<std::size_t MaxSize = 30>
class string
{
char m_data[MaxSize] = { 0 };
std::size_t m_size;
public:
#include <vector>
#include <string>
#include <list>
#include <deque>
#include <iterator>
#include <algorithm>
#include <numeric>
#include <array>
#include <iostream>
#include <iostream>
#include <fstream>
#include <chrono>
#include <thread>
#include <sstream>
void tail(std::ifstream& f)
{
std::uint64_t lineCount = 0;
auto sleepTime = std::chrono::seconds(0);
body {
margin: 0px;
font-size: 12px;
font-family: Arial, Helvetica, sans-serif;
background-color: #263238;
}
.window {
position: absolute;
width: 100%;
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<div id="viewer" class="window">
<div class="top-bar">
<div>
<span style="color: red; font-size: 18px;">&#x2606;</span>LOG VIEWER
#include "benchmark.h"
#include <iostream>
#include <fstream>
constexpr auto LENGTH = 10000000;
constexpr auto ITERATIONS = 100;
template<int N>
struct LargeOffset {