This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Solver for Buzfeed's "Pyramid Scheme" game | |
import networkx as nx | |
class PyramidSolver: | |
""" Solves pyramid puzzles of base length 5 """ | |
def __init__(self,inputlist,filename_validwords): | |
self.inputlist = inputlist | |
self.letterlist = sum(inputlist, []) | |
self.pyramid_size = 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; Points and lines in Scheme | |
; Data types | |
(define (mk-segment start-point end-point) | |
(cons start-point end-point) | |
) | |
(define (mk-point x-value y-value) | |
(cons x-value y-value) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%% 2D KL-divergence example | |
% William Davis, 02/06/21 | |
clearvars,close all | |
%% Pre-calculating | |
% Distributions | |
P = makedist('Normal','mu',0,'sigma',2); | |
Qvar = @(m,s) makedist('Normal','mu',m,'sigma',s); | |
% Sampling |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.