I hereby claim:
- I am rjwebb on github.
- I am rjwebb (https://keybase.io/rjwebb) on keybase.
- I have a public key ASCv0-ae5IB77dqQ1VbY6tdmVD-Ow0Mb2SFWcKn9ZPPbggo
To claim this, I am signing this object:
| """ | |
| A toy Brainfuck implementation in Python. | |
| In this implementation, the length of tape is infinite in both directions (I used two stacks for the left and right | |
| sides of the tape) and the values on the tape are 0 <= x < 256. | |
| """ | |
| def jump_to_closing_bracket(start_i, program): | |
| """ |
| import Control.Monad (liftM) | |
| import Data.List (find) | |
| -- Given a list it returns the consecutive pairs of items in the list | |
| pairs :: [a] -> [(a, a)] | |
| pairs values = zip values (tail values) | |
| -- Given a list, this function returns the first item whose difference | |
| -- between it and the previous item is less than `threshold` |
I hereby claim:
To claim this, I am signing this object:
| import decimal | |
| import math | |
| import random | |
| from matplotlib import pyplot as plt | |
| def bet(p): | |
| return random.random() < p |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| /** | |
| Very simple stack / linked list data structure for | |
| holding integers. | |
| **/ | |
| typedef struct Cell { |
| #include <stdio.h> | |
| int main(void) | |
| { | |
| FILE *fp; | |
| fp = stdin; | |
| int depth = 0; | |
| int c; | |
| use std::fmt; | |
| /* | |
| Made this to experiment with making abstract data structures in Rust. | |
| I'm not entirely convinced that it's necessary to use Box here... | |
| */ | |
| fn flip(p: &Point) -> Point { | |
| Point{ x: p.y, y: p.x } |
| import random | |
| import nltk | |
| from nltk.tokenize import TreebankWordTokenizer | |
| """ | |
| INSTALLATION INSTRUCTIONS: | |
| Install nltk | |
| Use the nltk downloader to install the Penn Treebank corpus | |
| and averaged_perception_tagger |
| #!/usr/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Python dependency injection experiment!! | |
| # Provides a DependencyScope object which lets you declare | |
| # dependencies and inject them in functions à la AngularJS | |
| class DependencyScope: | |
| def __init__(self): | |
| self.dependencies = {} |
| # this code might not be correct | |
| # but i thought the idea was kinda funny | |
| # templating engines are still much better | |
| # the pallets team are doing god's work | |
| # i'm so sorry |