Skip to content

Instantly share code, notes, and snippets.

View mtrencseni's full-sized avatar

Marton Trencseni mtrencseni

View GitHub Profile
#include <asio.hpp>
#include <iostream>
#include <unordered_map>
#include <vector>
#include <deque>
#include <string>
#include "json.hpp"
using asio::ip::tcp;
using json = nlohmann::json;
#include <iostream>
#include <string>
#include <asio.hpp>
#include <asio/io_context.hpp>
#include <signal.h>
#include "Utils.hpp"
#include "MessageQueue.hpp"
using asio::awaitable;
using asio::co_spawn;
#ifndef __MESSAGEQUEUE_HPP__
#define __MESSAGEQUEUE_HPP__
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <deque>
#include <asio.hpp>
#include "Utils.hpp"
#ifndef __UTILS_HPP__
#define __UTILS_HPP__
#include <map>
#include <regex>
#include <sstream>
#include <vector>
#include <string>
#include <algorithm>
#include <functional>
#include <map>
#include <regex>
#include <iostream>
#include <sstream>
#include <vector>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <algorithm>
#include <cctype>
#include <iostream>
#include <string>
#include <asio.hpp>
#include <asio/io_context.hpp>
using asio::awaitable;
using asio::co_spawn;
using asio::detached;
using asio::ip::tcp;
using asio::use_awaitable;
__ __ ___ ___
| \/ | |_ _| | _ )
| |\/| | | | | _ \
|_| |_|ore|___|ncredible|___/ash - V3.3.3 "Bentley Edition - BYG24"
______________________________________________________________________
NOT FOR COMMERCIAL USE - IF YOU BOUGHT THIS YOU GOT RIPPED OFF
Logging_MU1452-MHI2_ER_POG11_P5176-JTB-07403.01.20119200BE:
HW Number: 055 - PN: 9P1035041R
from time import time
from random import random
from statistics import mean, stdev
def coin_flip(bias=0.5):
if random() < bias:
return 1
else:
return 0
# regex pattern: [\w.%+-]+@[\w.-]+\.[a-zA-Z]{2,6}
# equivalent rxe code:
username = rxe.one_or_more(rxe.set([rxe.alphanumeric(), '.', '%', '+', '-']))
domain = (rxe
.one_or_more(rxe.set([rxe.alphanumeric(), '.', '-']))
.literal('.')
.at_least_at_most(2, 6, rxe.set([rxe.range('a', 'z'), rxe.range('A', 'Z')]))
)
email = (rxe
torch.set_default_tensor_type('torch.cuda.FloatTensor')