This file contains hidden or 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
Welcome to Mezzanine v. 0.2.0! Privately think of a criterion concerning | |
natural numbers not greater than 50. This program will attempt to efficiently | |
infer the nature of the criterion by asking you whether specific numbers do or | |
do not have the property of satisfying the criterion. | |
Size of hypothesis space: 21984 | |
This program's belief distribution (over 21984 remaining hypotheses) has an | |
entropy of 14.424 bits. Learning whether 18 has the property is expected to | |
reduce the entropy by 1.000 bits. | |
Does 18 have the property? [Y/n] >> n | |
On the question of whether 18 has the property, you said false. |
This file contains hidden or 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
https://docs.google.com/forms/d/1fkTXWOjVLirPuX0VO8AhDLWRM-lbfGD0ERshGSuTQbI/viewform |
This file contains hidden or 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
in [200]: by_first_component[:100] | |
Out[200]: | |
[('u', -1.9398326), | |
('parameter', -1.8654854), | |
('1-p', -1.8631597), | |
('f', -1.8552135), | |
('T', -1.7352118), | |
('q', -1.6937695), | |
('F', -1.6872095), | |
('Pr', -1.6614704), |
This file contains hidden or 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
import csv | |
import logging | |
import bleach | |
import textblob | |
import gensim | |
from sklearn.decomposition import PCA | |
from numpy import dot | |
from numpy.linalg import norm |
This file contains hidden or 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
break | |
} | |
panic(err) | |
} | |
log.Printf("request is %#+v", req) | |
switch req := req.(type) { | |
case *fuse.StatfsRequest: | |
stats, err := mountHandle.Statfs() |
This file contains hidden or 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
#/usr/bin/env python3 | |
from enum import Enum | |
from random import choice, randint | |
from datetime import datetime | |
from operator import add, sub, mul # binary operations as functions! | |
# Enums were introduced in 3.4! | |
Operation = Enum('Operation', ('add', 'subtract', 'multiply')) |
This file contains hidden or 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
pub fn singular_value_decomp(&self) -> (Matrix<T>, Matrix<T>, Matrix<T>) { | |
let ata = self.transpose() * self; | |
let (ata_eigenvals, ata_eigvecs) = ata.eigendecomp(); | |
// (index, √λ) pairs (indices being order of return from `.eigendecomp`) | |
let mut enumerated_singular_vals = ata_eigenvals.iter() | |
.map(|s| s.sqrt()) | |
.enumerate() | |
.collect::<Vec<_>>(); |
This file contains hidden or 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
package main | |
import ( | |
"bytes" | |
"encoding/json" | |
"fmt" | |
"io" | |
"net/http" | |
"os" | |
) |
This file contains hidden or 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
in [1]: import ast; from ast import * | |
in [2]: m = ast.parse('def at(): print("@")') | |
in [3]: m.body[0].name = "@" | |
in [4]: exec(compile(m, "<string>", 'exec')) | |
in [5]: globals()['@'] | |
Out[5]: <function __main__.@> |
This file contains hidden or 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
in [1]: import ast; from ast import * | |
in [2]: m = ast.parse('def at(): print("@")') | |
in [3]: m.body[0].name = "@" | |
in [4]: exec(compile(m, "<string>", 'exec')) | |
in [5]: globals()['@'] | |
Out[5]: <function __main__.@> |