Skip to content

Instantly share code, notes, and snippets.

@moyix
moyix / CodeGen_GPTJ_Conversion.md
Last active January 5, 2024 12:50
How to convert the SalesForce CodeGen models to GPT-J

Using Linear Algebra to Convert a Large Code Model

Background

The SalesForce CodeGen models are a family of large language models trained on a large amount of natural language data and then fine-tuned on specialized datasets of code. Models of size 350M, 2B, 6B, and 16B parameters are provided in three flavors:

  • nl, the base model trained on The Pile, a large natural language dataset compiled by EleutherAI
  • multi, which is fine-tuned from the nl model on a dataset of code in multiple languages, scraped from GitHub, and
  • mono, which is fine-tuned from the multi model on Python code only.
@netshade
netshade / frame_decoder.c
Created February 2, 2022 19:04
Godot GDNative FFMPEG Streaming
#include <gdnative_api_struct.gen.h>
#include <libavcodec/avcodec.h>
#include <libavutil/avutil.h>
#include <libavformat/avformat.h>
#include <libavutil/imgutils.h>
#include <pthread.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@apollo13
apollo13 / pyproject.toml
Last active June 2, 2023 10:13
OwnCloud/NextCloud emulator
[tool.poetry]
name = "owncloudemulator"
version = "0.1.0"
description = ""
authors = ["Florian Apolloner <florian@apolloner.eu>"]
[tool.poetry.dependencies]
python = "^3.7"
starlette = "^0.13.0"
uvicorn = "^0.10.8"
@573
573 / readme.js
Created April 30, 2019 11:04
Add this bookmarklet for archive.today
javascript:void(open('http://archive.today/?run=1&url='+encodeURIComponent(document.location)))
@cart
cart / FXAA.tscn
Last active January 30, 2024 18:17
Godot Nvidia FXAA 3.11 Port
[gd_scene load_steps=3 format=2]
[sub_resource type="Shader" id=1]
code = "shader_type canvas_item;
// Godot Nvidia FXAA 3.11 Port
// Usage: Drop this in to any 3D scene for FXAA! This is a port of the \"PC High Quality Preset 39\". However the medium quality
// parameters are also included. For medium quality, just comment out sections \"PS 6\" and above and uncomment the \"med 13\" variables.
@Calinou
Calinou / CHANGELOG.md
Last active May 25, 2023 19:07
Godot 4.0 preliminary changelog (does not list changes that were also backported to Godot 3.x)

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog.

[4.0] - TBD

Added

@natrim
natrim / convert.sh
Last active April 27, 2024 20:01
Simple conversion script that converts Godot html5 export to gzipped version, with decompressing wasm and pck files using pako
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
game="$1"
fi
pkgname=mutter
pkgver=3.26.1
pkgrel=1
pkgdesc="A window manager for GNOME"
url="https://git.gnome.org/browse/mutter"
arch=(i686 x86_64)
license=(GPL)
depends=(dconf gobject-introspection-runtime gsettings-desktop-schemas
libcanberra startup-notification zenity libsm gnome-desktop upower
libxkbcommon-x11 gnome-settings-daemon libgudev libinput)