A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
- Emphasis
- Deletions
<?php | |
/**Display Bitbucket wiki pages with SimpleWiki parser. | |
* A rough script for refactoring. | |
* | |
* @copyright Copyright Nick Freear, 29 April 2011. | |
* @uses http://simplewiki.org/language#patterns | |
*/ | |
ini_set('display_errors', 1); | |
header('Content-Type: text/html; charset=utf-8'); |
# Ben's Magical Perceptron | |
def dot_product(a, b): | |
return sum([a[i]*b[i] for i in range(len(a))]) | |
def decision( x, w, theta ): | |
return (dot_product(x, w) > theta) | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Title</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |