Skip to content

Instantly share code, notes, and snippets.

Avatar
🐓

Julian Bruyat BruJu

🐓
View GitHub Profile
@BruJu
BruJu / julian.ttl
Last active Apr 1, 2021
julian.ttl
View julian.ttl
<http://bruy.at/julian> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
@BruJu
BruJu / manual_enum_dispatch.rs
Last active Jan 19, 2021
manual_enum_dispatch.rs
View manual_enum_dispatch.rs
/*
The problematic:
I want enum dispatch for a trait.
I could used
https://docs.rs/enum_dispatch/0.3.5/enum_dispatch/
View simple.cpp
#include "../advent_of_code.hpp"
#include "../util/regex_helper.hpp"
#include <map>
// https://adventofcode.com/2015/day/17
namespace {
size_t to(const std::vector<int> & containers, const std::vector<int> & leftovers, int target, size_t i = 0) {
// Solution
@BruJu
BruJu / Graphy And Match.md
Last active Dec 16, 2020
Graphy and match
View Graphy And Match.md

Context : I had trouble to compare Graphy and WasmTree behaviour on match calls, so I tried to understand how Graphy works.

Graphy semmed like it used some cache or lazy matching, so I did some tests

const graphy_factory = require('@graphy/core.data.factory')

const dataset = require('@graphy/memory.dataset.fast')();
@BruJu
BruJu / a_Wasm_Tree_cpp.md
Last active Dec 16, 2020
WasmTreeFrontEnd ... in C++ Experiments
View a_Wasm_Tree_cpp.md
View marche.rs
// https://play.rust-lang.org/
#[derive(Debug)]
struct A {
x: u32
}
fn main() {
let x = A { x: 7 };
@BruJu
BruJu / forEachEval.py
Last active Dec 4, 2020
forEachEvaluation
View forEachEval.py
import json
import numpy
with open('forEachEval.json') as json_file:
data = json.load(json_file)
def avg(l):
s = sum(l)
return s / len(l)
@BruJu
BruJu / wasmify-sophia_Add_Exported_Methods.md
Last active Dec 2, 2020
wasmify-sophia : Add exported methods
View wasmify-sophia_Add_Exported_Methods.md

https://github.com/BruJu/wasmify-sophia

wasm_bindgen_dataset!(TreedDataset, "TreedDataset", SophiaExportDataset);

+use crate::wrapping::*;
+
+#[wasm_bindgen(js_class="TreedDataset")]
+impl SophiaExportDataset {
+    pub fn get_nb_underlying(&self) -> usize {
@BruJu
BruJu / agent.md
Last active Dec 1, 2020
agent.md
View agent.md

Soit un fichier de la forme

4
7 4
4 0
3 4
8 3

Signifiant :

@BruJu
BruJu / languageindex.md
Last active Nov 29, 2020
Language Indexing