Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Alexandre Plateau SuperFola

🏠
Working from home
View GitHub Profile
@SuperFola
SuperFola / cpp17-std-parallelism.cpp
Last active May 17, 2021
A demonstration of how to add parallelism using only standard C++ 17
View cpp17-std-parallelism.cpp
#include <iostream>
#include <future>
#include <vector>
#include <array>
#include <numeric> // needed for the std::iota part of the example
using VecIt = std::vector<int>::iterator;
int task(std::size_t task_id, VecIt begin, std::size_t count)
{
@SuperFola
SuperFola / kruskal.cpp
Created Apr 26, 2021
kruskal algorithm implementation
View kruskal.cpp
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
class Edge
{
public:
Edge(int s, int d, int w) :
m_s(s), m_d(d), m_w(w)
View keybase.md

Keybase proof

I hereby claim:

  • I am SuperFola on github.
  • I am superfola (https://keybase.io/superfola) on keybase.
  • I have a public key whose fingerprint is BCA1 F845 E043 2EF2 E9D9 839B 95F9 CA97 C6D4 91AD

To claim this, I am signing this object:

@SuperFola
SuperFola / git_changelog.py
Last active Aug 16, 2020
A Python script to generate a CHANGELOG.md file using git history
View git_changelog.py
import subprocess
import os
ADDED_WORDS = "added".split(' ')
CHANGED_WORDS = "updated changed enhanced".split(' ')
REMOVED_WORDS = "removed deleted".split(' ')
NAMES = ['added', 'changed', 'removed', 'unclassified changes']
def get_msg_type(msg):
@SuperFola
SuperFola / CMakeLists.txt
Last active Jul 2, 2019
a default cmakelists for... anything (nearly)
View CMakeLists.txt
cmake_minimum_required(VERSION 3.8) # using the latest version atm
project(project_name)
set(LIB_NAME lib_${PROJECT_NAME})
if (CMAKE_BUILD_TYPE MATCHES Debug)
if (CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -g -no-pie")
elseif (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MTd")
View namegen.py
import sys
import string
import random
syllable_patterns = [
# _ => consonant
# -, + => vowel
"_-"
, "_-+"
, "__-"
View Table des keys.md
KeyASCII ASCII Common Name
K_BACKSPACE \b backspace
K_TAB \t tab
K_CLEAR clear
K_RETURN \r return
K_PAUSE pause
K_ESCAPE ^[ escape
K_SPACE space
K_EXCLAIM ! exclaim