Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/usr/bin/python | |
| # crf.py (by Graham Neubig) | |
| # This script trains conditional random fields (CRFs) | |
| # stdin: A corpus of WORD_POS WORD_POS WORD_POS sentences | |
| # stdout: Feature vectors for emission and transition properties | |
| from collections import defaultdict | |
| from math import log, exp | |
| import sys |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000| #!/bin/bash | |
| # | |
| # Steam installer for Debian wheezy (32- and 64-bit) | |
| # | |
| # Place into empty directory and run. | |
| # | |
| download() { | |
| local url="$1" | |
| local filename="$(basename "$url")" |
| #用正则简单过滤html的<>标签 | |
| import re | |
| str = "<img /><a>srcd</a>hello</br><br/>" | |
| str = re.sub(r'</?\w+[^>]*>','',str) | |
| print str |