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
%%{ | |
utf8 = | |
( 0..127 | 192..223 128..191 | 224..239 128..191 128..191 | 240..247 128..191 128..191 128..191 ) | |
- ( 244 144..191 any any | 245..247 any any any ) # over U+10FFFF | |
- ( 0xC0..0xC1 any ) # overlong 2-byte encodings | |
- ( 224 128..159 any ) # overlong 3-byte encodings | |
- ( 240 128..143 any any ) # overlong 4-byte encodings | |
- ( 237 160..191 any ) # invalid utf-16 surrogate pairs | |
; | |
main := utf8* ; |
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
// libdivide.h - Optimized integer division | |
// https://libdivide.com | |
// | |
// Copyright (C) 2010 - 2021 ridiculous_fish, <libdivide@ridiculousfish.com> | |
// Copyright (C) 2016 - 2021 Kim Walisch, <kim.walisch@gmail.com> | |
// | |
// libdivide is dual-licensed under the Boost or zlib licenses. | |
// You may use libdivide under the terms of either of these. | |
// See LICENSE.txt for more details. |
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
package main | |
import ( | |
"encoding" | |
"fmt" | |
"reflect" | |
"regexp" | |
"strconv" | |
"time" | |
) |
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
DECLARE check_running_jobs DEFAULT ( | |
SELECT IF(COUNT(*) > 1, ERROR('query already running'), NULL) | |
FROM `region-name`.INFORMATION_SCHEMA.JOBS_BY_PROJECT | |
WHERE state <> 'DONE' | |
); |
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
package main | |
import ( | |
"encoding/binary" | |
"fmt" | |
"hash/maphash" | |
"math/rand" | |
) | |
type Comparable[T any] interface { |
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
package reflect_test | |
// Extracted from https://go-review.googlesource.com/c/go/+/401434 | |
import ( | |
"fmt" | |
"reflect" | |
"unsafe" | |
) |
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
package shortstring | |
import ( | |
"reflect" | |
"runtime" | |
"unsafe" | |
) | |
type shortstring struct { | |
ptr unsafe.Pointer |
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 <immintrin.h> | |
static int lut32x(int32_t *inout, __m512i lutk[], __m512i lutv[], int nlut) { | |
__m512i bin = _mm512_set1_epi32(*inout); | |
for (int i=0; i<nlut; i++) { | |
__mmask16 mask = _mm512_cmpeq_epi32_mask(bin, lutk[i]); | |
if (mask == 0) continue; | |
__m512i bout = _mm512_maskz_compress_epi32(mask, lutv[i]); | |
*inout = _mm_extract_epi32(_mm512_extracti32x4_epi32(bout, 0), 0); |
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
package container | |
type BijectiveMap[A, B comparable] struct { | |
m1 map[A]B | |
m2 map[B]A | |
} | |
func (m *BijectiveMap[A, B]) GetB(a A) (B, bool) { | |
if m.m1 == nil { | |
var zero B |
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
// ==UserScript== | |
// @name La Stampa/Repubblica Adblock Modal Remover | |
// @name:it La Stampa/Repubblica Elimina Messaggio Adblock | |
// @namespace http://tampermonkey.net/ | |
// @version 0.1 | |
// @description Remove the adblock modal on lastampa.it and repubblica.it | |
// @description:it Elimina il messaggio modale che impedisce l'uso dei siti di La Stampa (lastampa.it) e Repubblica (repubblica.it) in caso di presenza di adblocker | |
// @author CAFxX | |
// @match https://*.lastampa.it/* | |
// @match https://*.repubblica.it/* |