Skip to content

Instantly share code, notes, and snippets.


Yuri yurivish

View GitHub Profile
rmitton / hipparchus.c
Created Aug 30, 2020
Mandelbrot set rendered from a first-person viewpoint
View hipparchus.c
// I don't know what I'm looking at here.
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <math.h>
#define OUTPUT "hipparchus.pgm"
#define WIDTH 1024
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}
fit(MultinomialNaiveBayes, [T,] features, labels, α = 1) -> MNB
fits a `MultinomialNaiveBayes` classifier `MNB` using the
`features` matrix and `labels` vector of `Bool`s.
rntz /
Last active Mar 4, 2018
An introduction to tone theory, and subtyping for a fragment of modal Datafun
(* 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}
View noise4.jl
# Perlin noise ported from:
# with the license:
Copyright (c) 2008 Casey Duncan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
AlexanderWillner /
Last active Nov 8, 2020 — forked from avdgaag/
Command-line read-only interface to your local Things database of to do items.
Moved to
Reedbeta / cool-game-programming-blogs.opml
Last active Oct 12, 2020
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">
<title>Graphics, Games, Programming, and Physics Blogs</title>
<outline text="Tech News" title="Tech News">
<outline type="rss" text="Ars Technica" title="Ars Technica" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Polygon - Full" title="Polygon - Full" xmlUrl="" htmlUrl=""/>
<outline type="rss" text="Road to VR" title="Road to VR" xmlUrl="" htmlUrl=""/>
You can’t perform that action at this time.