Skip to content

Instantly share code, notes, and snippets.

Yuri yurivish

Block or report user

Report or block yurivish

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
@jiahao
jiahao / naivebayes.jl
Last active Apr 28, 2019
Multinomial naive Bayes in Julia, allowing for generic numeric types for the conditional probabilities. When using rational numbers, you can calculate exact probabilities without roundoff error.
View naivebayes.jl
struct MultinomialNaiveBayes{T, V<:AbstractVector}
feature_ratios::V
prior_ratio::T
end
"""
fit(MultinomialNaiveBayes, [T,] features, labels, α = 1) -> MNB
fits a `MultinomialNaiveBayes` classifier `MNB` using the
`features` matrix and `labels` vector of `Bool`s.
@rntz
rntz / tonetheory.ml
Last active Mar 4, 2018
An introduction to tone theory, and subtyping for a fragment of modal Datafun
View tonetheory.ml
(* A quick note about preorders; skip this if you know about them.
*
* A preorder is a relation (a ≤ b) satisfying two rules:
* 1. Reflexivity: a ≤ a.
* 2. Transitivity: if a ≤ b and b ≤ c then a ≤ c.
*
* A good example of a preorder is "lists under containment":
* let (X ≤ Y) if every element of the list X is also in Y.
*
* Preorders are like partial orders, but without requiring antisymmetry.
View pyfft.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View dispatchingNamedTuples.jl
julia> nt_proto_a_names = (:first, :last)
(:first, :last)
julia> nt_proto_b_names = (:larger, :smaller)
(:larger, :smaller)
julia> nt_proto_a = NamedTuple{nt_proto_a_names}
NamedTuple{(:first, :last),T} where T<:Tuple
julia> nt_proto_b = NamedTuple{nt_proto_b_names}
@AlexanderWillner
AlexanderWillner / things.sh
Last active May 2, 2019 — forked from avdgaag/things.sh
Command-line read-only interface to your local Things database of to do items.
View things.sh
Moved to https://github.com/alexanderwillner/things.sh/
@Reedbeta
Reedbeta / cool-game-programming-blogs.opml
Last active Sep 13, 2019
List of cool blogs on game programming, graphics, theoretical physics, and other random stuff
View cool-game-programming-blogs.opml
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Graphics, Games, Programming, and Physics Blogs</title>
</head>
<body>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="http://feeds.arstechnica.com/arstechnica/index/" htmlUrl="https://arstechnica.com"/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="http://www.polygon.com/rss/index.xml" htmlUrl="https://www.polygon.com/"/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="http://www.roadtovr.com/feed" htmlUrl="https://www.roadtovr.com"/>
@rygorous
rygorous / vr_urgh.txt
Last active Oct 6, 2018
What I mean when I say "I think VR is bad news".
View vr_urgh.txt
This just got linked to by the Y combinator news account, without proper context,
so a brief introduction: A month ago (end of May / early June 2014) I had a
Twitter conversation with a bunch of acquaintances. One tweet in the middle
of that thread, with obligatory hyperbole, was me saying that I think VR is
bad news.
Well, that part of the thread (but not the rest that provides context) recently
got retweeted, and then someone asked me if I could explain what I mean by that,
and because Twitter is a great platform for delivering 140 character slogans and
not so great for lengthy explanations, I wrote this. So, obligatory disclaimer:
View oscillo.pl
use warnings;
use Getopt::Std;
getopt('xytGgwsf',\%opts);
# pcm file = $opts{f}
# samples per pixel x
$xscale = $opts{x} // 1200;
You can’t perform that action at this time.