Skip to content

Instantly share code, notes, and snippets.

View BruJu's full-sized avatar
🐓

Julian Bruyat BruJu

🐓
View GitHub Profile
@BruJu
BruJu / wasmify-sophia_Add_Exported_Methods.md
Last active December 2, 2020 10:45
wasmify-sophia : Add exported methods

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 December 1, 2020 01:53
agent.md

Soit un fichier de la forme

4
7 4
4 0
3 4
8 3

Signifiant :

@BruJu
BruJu / languageindex.md
Last active November 29, 2020 23:37
Language Indexing
@BruJu
BruJu / main.cpp
Last active November 28, 2020 18:01
// Trouver tous les noms qui finissent par 5 chiffres
/*******
* Read input from cin
* Use cout << ... to output your result to STDOUT.
* Use cerr << ... to output debugging information to STDERR
* ***/
#include <iostream>
#include <limits>
#include <sstream>
@BruJu
BruJu / MonStructCommaAdd.cpp
Last active October 31, 2020 16:14
MonStructCommaAdd.cpp
#include <iostream>
#include <string>
// Trying to understand / implement myself the magic behind
// https://www.boost.org/doc/libs/1_74_0/libs/assign/doc/index.html#operator+=
template<typename ... Ts>
void Print(const char * format, Ts ... ts) {
char buffer[256];
std::sprintf(buffer, format, ts ...);
@BruJu
BruJu / optionaltest.cpp
Last active October 3, 2020 15:04
Optional Test
#include <iostream>
#include <optional>
struct Contained {
Contained() {
std::cout << "Contained()\n";
}
Contained(const Contained &) {
std::cout << "ContainedConstructor\n";
@BruJu
BruJu / virtualfinaldelete.cpp
Last active September 8, 2020 06:36
virtualfinaldelete.cpp
#include <iostream>
struct MyClass {
// Delete the foo function as we want to make a new interface
// Helps when there are a lot of code relying on an old interface
// we want to delete
virtual void foo() final = delete;
virtual void foo(int x) { std::cout << "newfoo " << x << '\n'; }
void bar() { std::cout << "bar" << '\n'; }
@BruJu
BruJu / Accumulator.rs
Created August 27, 2020 04:51
Method chaining in Rust
// Quick experiment about chaining in Rust
struct Accumulator {
acc: u32
}
impl Accumulator {
fn new() -> Self {
Accumulator{ acc: 0 }
}
@BruJu
BruJu / README.md
Created July 13, 2020 18:01
PRIWA former readme

Former README

This repository is currently a compilation of some of my experiments from my internship at LIRIS in the team TWEAK.

The project I'm working on is to reasoning using a RDF API in Javascript that resorts to

@BruJu
BruJu / ExportPolymorphism.rs
Created July 13, 2020 14:05
ExportPolymorphism.rs
#[wasm_bindgen(js_name=Cat)]
pub struct Cat {
}
#[wasm_bindgen(js_class=Cat)]
impl Cat {
#[wasm_bindgen(constructor)]
pub fn new() -> Cat { Cat{ } }