Skip to content

Instantly share code, notes, and snippets.

View darkvertex's full-sized avatar

Alan Fregtman darkvertex

  • Felix & Paul Studios
  • Montreal, Canada
  • 15:39 (UTC -04:00)
  • X @alanwritescode
View GitHub Profile
@yoavg
yoavg / LLMs.md
Last active September 27, 2024 03:03

Some remarks on Large Language Models

Yoav Goldberg, January 2023

Audience: I assume you heard of chatGPT, maybe played with it a little, and was imressed by it (or tried very hard not to be). And that you also heard that it is "a large language model". And maybe that it "solved natural language understanding". Here is a short personal perspective of my thoughts of this (and similar) models, and where we stand with respect to language understanding.

Intro

Around 2014-2017, right within the rise of neural-network based methods for NLP, I was giving a semi-academic-semi-popsci lecture, revolving around the story that achieving perfect language modeling is equivalent to being as intelligent as a human. Somewhere around the same time I was also asked in an academic panel "what would you do if you were given infinite compute and no need to worry about labour costs" to which I cockily responded "I would train a really huge language model, just to show that it doesn't solve everything!". We

@jimmydo
jimmydo / ubuntu-server-multicast-dns.md
Last active October 6, 2024 07:53
Enable multicast DNS on Ubuntu Server

Enabling multicast DNS (mDNS) on a server allows other hosts on the local network to address the server as <hostname>.local.

mDNS is disabled by default in Ubuntu Server:

$ resolvectl mdns
Global: no
Link 2 (eno1): no
@Akxe
Akxe / PortAwareSharedWorker.ts
Last active September 13, 2024 00:01
PortAwareSharedWorker, shared worker that know who is still connected and who is not
/// <reference lib="webworker" />
type SharedWorkerPort = MessagePort | DedicatedWorkerGlobalScope;
class PortAwareSharedWorkerPort<T extends SharedWorkerPort = SharedWorkerPort, D = any> {
private readonly weakRef: WeakRef<T>;
private disconnected = false;
constructor(
port: T,
onMessage: (eventData: D) => void,
module srtp
go 1.15
require (
github.com/pion/rtp v1.6.1
github.com/pion/srtp v1.5.2
github.com/pion/webrtc/v3 v3.0.0-beta.13
)
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>
@natowi
natowi / audio2midi.md
Last active October 15, 2024 07:50
List of open source audio to midi packages
@alexanderson1993
alexanderson1993 / lighting.js
Created December 13, 2019 02:37
Sending DMX messages to an ENTTEC Pro USB controller over WebUSB
async function setUpLights() {
const lightingDevice = await navigator.usb.requestDevice({ filters: [] });
await lightingDevice.open();
await lightingDevice.claimInterface(0);
// This comes from https://github.com/NERDDISCO/webusb-dmx512-controller
lightingDevice.controlTransferOut({
// It's a USB class request
requestType: "class",
// The destination of this request is the interface
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DavidWells
DavidWells / clean-secret-from-url.js
Created October 24, 2018 21:43
Clean your access token from URL to guard against user accidentally copy + pasting url elsewhere
function removeAccessTokenFromUrl() {
const { history, location } = window
const { search } = location
if (search && search.indexOf('access_token') !== -1 && history && history.replaceState) {
// remove access_token from url
const cleanSearch = search.replace(/(\&|\?)access_token([_A-Za-z0-9=\.%]+)/g, '').replace(/^&/, '?')
// replace search params with clean params
const cleanURL = location.toString().replace(search, cleanSearch)
// use browser history API to clean the params
history.replaceState({}, '', cleanURL)
@tinogomes
tinogomes / DNS_TO_LOCALHOST.markdown
Last active September 17, 2024 08:30
Public DNS Pointing to localhost (127.0.0.1)

Available Public Wildcard DNS Domains pointing to localhost (127.0.0.1)

The best way to safely and securely use local domains pointing to 127.0.0.1 is to edit your local settings (/etc/hosts) and add your own settings. Keep in mind if you want to use subdomains, you need to enter all variations.

Example:

# Adding bottom of your current file /etc/hosts
################# MY LOCAL DOMAINS
127.0.0.1 local.com admin.local.com
127.0.0.1 domain1.com