Skip to content

Instantly share code, notes, and snippets.

View shouya's full-sized avatar

shouya

View GitHub Profile
@jart
jart / rename-pictures.sh
Created December 12, 2023 15:24
Shell script for renaming all images in a folder
#!/bin/sh
# rename-pictures.sh
# Author: Justine Tunney <jtunney@gmail.com>
# License: Apache 2.0
#
# This shell script can be used to ensure all the images in a folder
# have good descriptive filenames that are written in English. It's
# based on the Mistral 7b and LLaVA v1.5 models.
#
# For example, the following command:
@hyperupcall
hyperupcall / settings.jsonc
Last active March 31, 2024 22:52
VSCode config to disable popular extensions' annoyances (telemetry, notifications, welcome pages, etc.)
// I'm tired of extensions that automatically:
// - show welcome pages / walkthroughs
// - show release notes
// - send telemetry
// - recommend things
//
// This disables all of that stuff.
// If you have more config, leave a comment so I can add it!!
{
@ttesmer
ttesmer / AD.hs
Last active March 19, 2024 03:04
Automatic Differentiation in 38 lines of Haskell using Operator Overloading and Dual Numbers. Inspired by conal.net/papers/beautiful-differentiation
{-# LANGUAGE TypeSynonymInstances #-}
data Dual d = D Float d deriving Show
type Float' = Float
diff :: (Dual Float' -> Dual Float') -> Float -> Float'
diff f x = y'
where D y y' = f (D x 1)
class VectorSpace v where
zero :: v
@IGJoshua
IGJoshua / lo me mi moi jbobau.org
Last active August 12, 2023 05:33
The lojban I speak

The lojban I speak

coi ro do mi’e la saski’o tu’a dei cu ve ciksi tu’a lo me mi moi jbobau

Introduction

@MostAwesomeDude
MostAwesomeDude / brismu.md
Last active January 22, 2024 19:24
The relational interpretation of Lojban (la brismu)

0: Introduction

This pamphlet is addressed at folks who know Lojban. They've read not just a tutorial like la karda, the Crash Course, or the Wave Lessons, but also CLL and the BPFK Sections, and some of the various notes from many community members.

I am not aiming to teach the syntax of Lojban, but to radically and fundamentally approach the logical foundations of the semantics of Lojban. We will not start with pronouns, but with relations, and we will always keep the mathematics in mind as we progress.

A common theme in the Lojban community is an uncertainty about what words mean. Since words are treacherous and don't have ultimate meaning, and many Lojbanists are philosophers, it is predictably common for such uncer

@blackgear
blackgear / EN_dfa.in
Last active June 30, 2020 19:00
Linter for Chinese-English mixed content, which hyphenate, space and HTML-escape the content
[0, 0, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 0, 65535, 0, 0, 18520, 0, 0, 0, 0, 1668, 184, 4166, 0, 2184, 184, 4181, 0, 2600, 184, 8021, 0, 2852, 184, 2374, 0, 2732, 184, 15591, 0, 2772, 14064, 24375, 0, 3168, 3304, 24359, 0, 3720, 184, 18566, 0, 3716, 184, 15591, 0, 4180, 21036, 13910, 0, 4364, 184, 20967, 0, 4892, 184, 16713, 0, 5448, 23720, 16713,
@louispan
louispan / ContMonadInterpreter.hs
Last active August 16, 2019 18:03
Continuation monad interpreter
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FunctionalDependencies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeFamilyDependencies #-}
-- Example of interpreting using continuation monad instead of the free monad.
module Main where
@bzamecnik
bzamecnik / cudnn_compatible_gru_example.ipynb
Last active November 26, 2021 11:00
CuDNN-compatible GRU in Keras
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lynn
lynn / lojban.md
Last active July 19, 2023 19:53
The Lojban I speak

The Lojban I speak

by la lalxu (Lynn)

This is a list of ways in which my dialect of Lojban differs from the dialect described in The Complete Lojban Language. Most people on the #lojban IRC channel seem to accept and use most of these changes, as well.

The sections marked with an asterisk are approved as part of “base Lojban” by the BPFK (through a voting process). The other sections are simply unofficial additions that people (including me) like enough to use in daily conversation, because they make the language nicer and simpler.

Morphology

Glides*

In CLL Lojban, cmevla and fu'ivla are allowed to contain consonant-glide-vowel sequences like in kuin (Queen). Because it wasn’t clear where it was a good idea to allow them, the BPFK banned them everywhere! Now you can’t have a glide immediately after a consonant anymore, and you need to insert a vowel, writing kuuín (Ku-ween).

@alanzchen
alanzchen / Sendgrid to Telegram.js
Last active December 12, 2016 17:18
A scriptr.io script to bridge sendgrid notification and telegram.
//First, we'll require the 'http' library to use later for calling a 3rd party webservice
var http = require("http");
//Getting parameters from the request body. For a nested json, we only want the first one.
try {
var parameters = JSON.parse(request.rawBody);
parameters = parameters[0]
var ip = parameters.ip;
var email = parameters.email;