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| """Count words.""" | |
| count={} | |
| def count_words(s, n): | |
| """Return the n most frequently occuring words in s.""" | |
| wordlist = s.split() | |
| wordfreq = [wordlist.count(p) for p in wordlist] | |
| zip_l=dict(zip(wordlist,wordfreq)) | |
| sort=sorted(zip_l.iteritems(),key=lambda(k,v):(-v,k)) |
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| var debug = process.env.NODE_ENV !== "production"; | |
| var webpack = require('webpack'); | |
| module.exports = { | |
| context: __dirname, | |
| devtool: debug ? "inline-sourcemap" : null, | |
| entry: "./js/scripts.js", | |
| output: { | |
| path: __dirname + "/js", | |
| filename: "scripts.min.js" |