🏳️⚧️
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
// | |
// Created by Neuron on 2021/10/20. | |
// | |
#include "hash_table.h" | |
HashTable *initHashTable(uint64_t size) { | |
HashTable *hashTable = (HashTable *) malloc(sizeof(HashTable)); | |
hashTable->count = size; | |
hashTable->node = (Node **) calloc(size, sizeof(Node *)); |
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
#include <iostream> | |
#include <regex> | |
int main() { | |
std::string input = "你好,world!"; | |
std::smatch matches; | |
auto regex = std::regex("([\\x00-\\x7F]|([\\xC0-\\xF7][\\x80-\\xBF]*))"); | |
std::sregex_iterator begin(input.begin(),input.end(),regex); | |
std::sregex_iterator end; | |
for (auto i = begin;i!=end;++i) { |
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
// | |
// Created by cryolitia on 24-1-16. | |
// | |
#include <iostream> | |
#include <vector> | |
#include <utility> | |
#include <unordered_set> | |
#include <cassert> | |
#include <memory> |
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
# Visualize GnuPG Trust Web | |
# usage: gpg --list-sigs | python3 ./sig2dot.py | |
import fileinput | |
import re | |
import networkx | |
from matplotlib import pyplot | |
lines = [i for i in fileinput.input() if not i.startswith('sub')] | |
# lines = [i for i in open("gpg.txt", "r").readlines() if not i.startswith('sub')] |