Skip to content

Instantly share code, notes, and snippets.

@sanzoghenzo
sanzoghenzo / compare.py
Last active May 10, 2024 04:25
Compare Excel sheets with Pandas
"""
Compare two Excel sheets
Inspired by https://pbpython.com/excel-diff-pandas-update.html
For the documentation, download this file and type:
python compare.py --help
"""
import argparse
import pandas as pd
@rohit-gohri
rohit-gohri / v8Coverage.js
Created April 13, 2022 04:50
Get runtime coverage from V8 in istanbul format
/* eslint-disable global-require, import/no-extraneous-dependencies, @typescript-eslint/no-use-before-define */
/**
* @see https://github.com/bcoe/c8/issues/376
* @see https://github.com/tapjs/processinfo/blob/33c72e547139630cde35a4126bb4575ad7157065/lib/register-coverage.cjs
*/
if (process.env.V8_COVERAGE) {
process.setSourceMapsEnabled(true);
const inspector = require('inspector');
const session = new inspector.Session();
@VictorTaelin
VictorTaelin / promise_monad.md
Last active May 10, 2024 04:22
async/await is just the do-notation of the Promise monad

async/await is just the do-notation of the Promise monad

CertSimple just wrote a blog post arguing ES2017's async/await was the best thing to happen with JavaScript. I wholeheartedly agree.

In short, one of the (few?) good things about JavaScript used to be how well it handled asynchronous requests. This was mostly thanks to its Scheme-inherited implementation of functions and closures. That, though, was also one of its worst faults, because it led to the "callback hell", an seemingly unavoidable pattern that made highly asynchronous JS code almost unreadable. Many solutions attempted to solve that, but most failed. Promises almost did it, but failed too. Finally, async/await is here and, combined with Promises, it solves the problem for good. On this post, I'll explain why that is the case and trace a link between promises, async/await, the do-notation and monads.

First, let's illustrate the 3 styles by implementing

@voluntas
voluntas / webrtc_sfu_dev.rst
Last active May 10, 2024 04:21
WebRTC SFU コトハジメ

WebRTC SFU コトハジメ

日時

2023-12-03

voluntas

バージョン

2023.1

url

https://voluntas.github.io

この記事が良いと思ったらこの記事に Star をお願いします

@Axotla
Axotla / Caballo.java
Created May 10, 2024 03:09 — forked from JRaul/Caballo.java
Problema del caballo
/*
Problema del caballo: http://es.wikipedia.org/wiki/Problema_del_caballo
Resuelto con http://es.wikipedia.org/wiki/Backtracking
*/
public class Caballo {
public static boolean tablero[][]=new boolean[8][8];
public static int [][] recorrido=new int[8][8];
public static long con=0;
public static void DFS(int n,int h,int v){
if(n==64){
@JHibbard
JHibbard / make_table_uris.py
Last active May 10, 2024 04:10
Example function for generating normalized table URIs reflecting the medallion architecture
from pathlib import Path
def make_table_uris(name: str, basepath: str='.'):
"""Example function for generating normalized table URIs
Args:
name: name of table to generate table URIs for
basepath: directory to nest table URIs under
@qoomon
qoomon / conventional_commit_messages.md
Last active May 10, 2024 04:09
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@sroccaserra
sroccaserra / Amiga_samples_conversion.md
Last active May 10, 2024 04:09
Documenting the converstion of old Amiga 8 bit samples

Archive:

These are 8 bit samples often used with the first Amiga trackers of the late 80s and early 90s, like Ultimate Soundtracker. In original and updated formats.

Following the info found in [this other archive][other], I tried to accurately convert the original files to modern & self documenting formats (.wav or .aiff), so they can easily be used in modern DAWs or modern trackers, like

@andreacioni
andreacioni / app.controller-1.ts
Last active May 10, 2024 04:09
NestJS Authentication: Single Sign On with SAML 2.0
@Get('api/auth/sso/saml/login')
@UseGuards(SamlAuthGuard)
async samlLogin() {
//this route is handled by passport-saml
return;
}