Skip to content

Instantly share code, notes, and snippets.

Avatar

shouya

View GitHub Profile
View gpt3-lojban.txt
------------ (
I will show you how to translate lojban into English.
Lojban: coi rodo
English: Hi, everyone.
Lojban: mi citka lo plise
English: I eat the apple.
Lojban: lo plise cu se cikta mi
@shouya
shouya / lo-balmle-tamca.md
Last active Sep 7, 2020
loi selsa'a bau lo jbobau
View lo-balmle-tamca.md

ni'o loi balmle tamca

i lo xadni poi tolpinta je melbi

gi'e lo se dasni poi xunre

gi'e lo panci poi slari je titla

cu se ckaji loi balmle tamca i loi tamca

View compose.org

Composition of Functors/Applicatives/Monads*

Functor

A functor is a map between categories.

fmap :: (Functor f) => (a -> b) -> f a -> f b
@shouya
shouya / keybase.md
Created Feb 13, 2020
Keybase Proof
View keybase.md

Keybase proof

I hereby claim:

  • I am shouya on github.
  • I am shou (https://keybase.io/shou) on keybase.
  • I have a public key ASCmnqGO0FcviJ7Q-dUi3MxM1lTtvAbw38gGLA-HqITCmQo

To claim this, I am signing this object:

@shouya
shouya / Lens.hs
Created Oct 21, 2019
Proof that (s -> a, s -> b -> t) is indeed isomorphic to forall f. Functor f => (a -> f b) -> (s -> f t)
View Lens.hs
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE TypeSynonymInstances #-}
{-# LANGUAGE InstanceSigs #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE AllowAmbiguousTypes #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE FunctionalDependencies #-}
@shouya
shouya / prng.hs
Created Aug 30, 2019
quick & dirty PRNG
View prng.hs
rnd = 123:map (\x -> (1664525 * x + 1013904223) `mod` 65536) rnd
@shouya
shouya / x.ruleset
Last active Jan 15, 2019
uMatrix ruleset
View x.ruleset
! uMatrix: Ruleset recipes 1.0
! Title: Shou's Ruleset
! Maintainer: Shou Ya
! CDN
* ajax.googleapis.com script allow
* cdn.bootcss.com script allow
* cdn.ravenjs.com script allow
* cdn.sstatic.net script allow
* cdnjs.cloudflare.com script allow
View gist:a289ac7e7077ae0043a14523519b42a4
1. drivers in lspci -k
2. bluetooth
3. wireless
4. docker
5. cpu scheduler
6. bbr
7. systemd
8. coretemp
9. ext2 & ext3
10. acpi (https://wiki.gentoo.org/wiki/Power_management/Guide)
@shouya
shouya / cracked_163_webapi_encryption.js
Last active Dec 5, 2017
Having fun with crossword games!
View cracked_163_webapi_encryption.js
// extracted from: https://s3.music.126.net/sep/s/2/core.js
// rsa.e: exp
// rsa.m: modulus
function modpow(rsa, str) {
for (var f, g, h, i, j, k, l, c = new Array, d = str.length, e = 0; d > e; ) {
c[e] = str.charCodeAt(e);
e++;
for (; 0 != c.length % a.chunkSize; ) {
c[e++] = 0;
@shouya
shouya / 1_numpy_net.ipynb
Last active Jul 11, 2017
plain numpy, torch.autograd and torch.nn implementation of a simple nn
View 1_numpy_net.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.