Skip to content

Instantly share code, notes, and snippets.

View Deleplace's full-sized avatar

Valentin Deleplace Deleplace

View GitHub Profile
@Deleplace
Deleplace / main.dart
Created July 22, 2023 12:46
poetic-neutron-6668
void main() {
var m = {
"one": 1,
"two": 2
};
final k = m.keys;
print(k);
}
def items = ["bleen", "fuligin", "garrow", "grue", "hooloovoo"]
def x = items.last()
println x
def x = ["bleen", "fuligin", "garrow", "grue", "hooloovoo"]
def a = x.shuffled().first()
println a
@Deleplace
Deleplace / main.dart
Last active June 24, 2023 08:52
Clear map
void main() {
var m = {
"one": 1,
"two": 2
};
var p = m;
print(m);
print(p);
@Deleplace
Deleplace / mapfunc_test.go
Created November 17, 2022 13:01
Is there a performance penalty when taking a func argument instead of a value argument, in concurrent maps operations?
package mapfunc
import (
"sync"
"testing"
"github.com/puzpuzpuz/xsync/v2"
)
const (
@Deleplace
Deleplace / gist:869094a77a5292b40511704482e3e7d8
Created November 9, 2022 10:07
URL for Google Images search, to be used in Chrome in Settings > Search engine > Add
https://www.google.com/search?q=%s&tbm=isch
@Deleplace
Deleplace / stablesort_test.go
Last active November 7, 2022 16:32
Overhead of stable sorting, in Go
package stablesort
import (
"math/rand"
"sort"
"testing"
"golang.org/x/exp/slices"
)