Skip to content

Instantly share code, notes, and snippets.

💭
🧘‍♂️

Ahmed Fasih fasiha

💭
🧘‍♂️
Block or report user

Report or block fasiha

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View WaniKaniNotes.md

大した

  • おう 大したことねえよ!
    • Your Lie in April, ep. 8
  • 大したことじゃないんだけど
    • Just Because!, ep. 11
  • 大したことじゃないのに
    • Kawai Manor, ep. 3

人工

  • 人工衛星まで落ち始めた!
@fasiha
fasiha / demo_gb1_pymc.py
Created Feb 4, 2020
Attempting to create a Gb1Binomial distribution in PyMC
View demo_gb1_pymc.py
import numpy as np
import theano.tensor as tt
import pymc3 as pm
from scipy.stats import beta, binom
def genGb1Binom(Ndata):
a = 3.3
b = 4.4
d = .333
@fasiha
fasiha / betabin.ipynb
Last active Feb 2, 2020
Code related to Stats Stack Exchange question https://stats.stackexchange.com/q/447367/31187
View betabin.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@fasiha
fasiha / ebisu.py
Created Jan 29, 2020
Single all-in-one pure-Python Ebisu module https://fasiha.github.io/ebisu/
View ebisu.py
# -*- coding: utf-8 -*-
## logsumexp.py
from math import exp, log
def logsumexp(a, b):
a_max = max(a)
s = 0
@fasiha
fasiha / quizHistoryToEbisuToMemorize.py
Last active Jan 29, 2020
Converting a generic history of quizzes (times and results) to an Ebisu model (given initial half-life and model parameters) to a Memorize schedule
View quizHistoryToEbisuToMemorize.py
import ebisu
from memorizesrs import schedule
from datetime import datetime, timedelta
from math import inf
learnTime = datetime(2020, 1, 27, 0, 0, 0)
reviewTimes = [
learnTime + timedelta(hours=1.1), learnTime + timedelta(hours=4.4),
learnTime + timedelta(hours=22.0), learnTime + timedelta(days=2.4)
]
View upload.sh
# while read f; do
for f in $@; do
d=`exiftool -CreateDate "$f" | tail -n1 | cut -d: -f2- | sed -e 's/^ *//' -e 's/ /_/' -e 's/:/-/g'`;
b=$(basename "$f");
final="$d-$b";
echo $final;
/Users/fasih/Downloads/Dropbox-Uploader/dropbox_uploader.sh -q upload "$f" "/Camera Uploads/$final"
done
@fasiha
fasiha / svelte-tutorial.md
Last active Jan 14, 2020
All-in-one Svelte tutorial—for anyone who hates clicking through the tutorial to refresh your memory! Original at https://svelte.dev/tutorial
View svelte-tutorial.md

Generated by running cd svelte/site/content/tutorial && for i in *;do echo "# $i"; for j in $i/*; do echo "## $j"; cat $j/text.md; echo "\n\n"; done;done |grep -v meta.json!

01-introduction

01-introduction/01-basics


title: Basics

Welcome to the Svelte tutorial. This will teach you everything you need to know to build fast, small web applications easily.

View halfwidth-fullwidth-small-katakana.txt
アアァ
イイィ
ウウゥ
エエェ
オオォ
カカ
キキ
クク
ケケ
ココ
@fasiha
fasiha / frequencies.json
Created Oct 18, 2019
Mecab-IPADIC "-O yomi" output of a bunch of Japanese subtitle files, and associated character frequencies (kanji that MeCab couldn't understand deleted). I can't figure out how to get "yomi"-style output out of UNIDIC.
View frequencies.json
[
["\n",300426],
[" ",158830],
["!",638],
["(",2022],
[")",2023],
[",",136462],
["-",136708],
["0",421613],
["1",193907],
You can’t perform that action at this time.