start new:
tmux
start new with session name:
tmux new -s myname
| """ | |
| Demo of json_required decorator for API input validation/error handling | |
| """ | |
| import inspect | |
| import functools | |
| import json | |
| from traceback import format_exception | |
| from flask import jsonify, request | |
| import sys |
| /* | |
| This example uses Scala. Please see the MLlib documentation for a Java example. | |
| Try running this code in the Spark shell. It may produce different topics each time (since LDA includes some randomization), but it should give topics similar to those listed above. | |
| This example is paired with a blog post on LDA in Spark: http://databricks.com/blog | |
| Spark: http://spark.apache.org/ | |
| */ | |
| import scala.collection.mutable |
| #!/usr/bin/env python | |
| """ | |
| urlnorm.py - URL normalisation routines | |
| urlnorm normalises a URL by; | |
| * lowercasing the scheme and hostname | |
| * taking out default port if present (e.g., http://www.foo.com:80/) | |
| * collapsing the path (./, ../, etc) | |
| * removing the last character in the hostname if it is '.' |