Skip to content

Instantly share code, notes, and snippets.

View sachaarbonel's full-sized avatar
👨‍💻
Uncovering bugs

Sacha Arbonel sachaarbonel

👨‍💻
Uncovering bugs
View GitHub Profile
@vict0rsch
vict0rsch / streaming_multilabel_f1_score.py
Last active March 16, 2021 03:17
Streaming and Multilabel F1 score in Tensorflow
# From my blog post: http://vict0rsch.github.io/2018/06/06/tensorflow-streaming-multilabel-f1/
import tensorflow as tf
import numpy as np
from tensorflow.python.ops import variable_scope
from tensorflow.python.ops import array_ops
from tensorflow.python.framework import ops
from sklearn.metrics import f1_score
@surma
surma / README.md
Last active January 4, 2025 01:26
webpack-emscripten-wasm

Minimal example making webpack and wasm/Emscripten work together.

Build instructions:

  • Clone this gist
  • npm install
  • npm start
  • Open http://localhost:8080
  • Look at console
@mholt
mholt / macapp.go
Last active April 15, 2025 20:34
Distribute your Go program (or any single binary) as a native macOS application
// Package main is a sample macOS-app-bundling program to demonstrate how to
// automate the process described in this tutorial:
//
// https://medium.com/@mattholt/packaging-a-go-application-for-macos-f7084b00f6b5
//
// Bundling the .app is the first thing it does, and creating the DMG is the
// second. Making the DMG is optional, and is only done if you provide
// the template DMG file, which you have to create beforehand.
//
// Example use:
@pingbird
pingbird / armasm.dart
Created May 9, 2018 09:09
Little ARM assembler in dart
// By PixelToast
var src =
"mov r0, #69\n"
"bx lr\n"
"ldmedeq ip!, {a3-sp}\n"
"strbhi r13, [v2, lr, asr #3]!\n"
"ldrls a3, [sb], sp, asr #0x14\n";
main() {
@crissmoldovan
crissmoldovan / JSON-IR-Example.json
Last active September 11, 2018 15:14
Basic Example of JSON-IR
{
"type": "View",
"name": "Main",
"style": {
"position": "absolute",
"top": 242,
"left": 335,
"width": 395,
"height": 190,
"background": {
@adrianhall
adrianhall / AppSyncAPI.yaml
Last active September 25, 2024 01:43
A CloudFormation template for DynamoDB + Cognito User Pool + AppSync API for the Notes tutorial
---
Description: AWS AppSync Notes API
Parameters:
APIName:
Type: String
Description: Name of the API - used to generate unique names for resources
MinLength: 3
MaxLength: 20
AllowedPattern: '^[a-zA-Z][a-zA-Z0-9_]*$'
@yjbanov
yjbanov / stopwatch_driver_test.dart
Created March 23, 2018 01:30
Performance test for the stopwatch Flutter app
import 'dart:async';
import 'package:flutter_driver/flutter_driver.dart';
import 'package:test/test.dart';
// Run this test using:
//
// flutter drive --profile test_driver/perf.dart
void main() {
group('performance', () {
@amitbet
amitbet / multi-producer-consumer.go
Last active June 4, 2019 08:03
multi producer & consumer example in golang
package main
import (
"fmt"
"runtime"
"strconv"
"time"
)
func main() {
@miguno
miguno / join.sql
Last active August 16, 2018 13:57
Using KSQL to join data sources with different formats, e.g. a stream with JSON and a table with Avro data.
CREATE STREAM pageviews (viewtime BIGINT, user_id VARCHAR, ...) WITH (KAFKA_TOPIC='pageviews-topic', VALUE_FORMAT='AVRO');
CREATE TABLE users (user_id VARCHAR, registertime BIGINT, ...) WITH (KAFKA_TOPIC='users-topic', KEY='user_id', VALUE_FORMAT='JSON');
CREATE STREAM pageviews_enriched AS
SELECT pv.viewtime, pv.userid AS userid, ... FROM pageviews pv
LEFT JOIN users ON users.user_id = pv.user_id;