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| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
| worker_processes 4; | |
| daemon off; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
| '$status $body_bytes_sent "$http_referer" ' |
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 8000Following the AngularJS PARIS meetup (25/2 à 19h à Paris with @sampaccoud @dzen @_kemar @tchack13 @vinz et @revolunet)
Here's our best AngularJS ressources : twitter, github, articles & blogs. Please comment and add your good stuff !
| /*This function adds a jQuery include, this adds the latest version, instead of the version on wikipedia, which is outdated */ | |
| function addJQuery(callback) { | |
| var script = document.createElement("script"); | |
| script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"); | |
| script.addEventListener('load', function() { | |
| var script = document.createElement("script"); | |
| script.textContent = "(" + callback.toString() + ")();"; | |
| document.body.appendChild(script); | |
| }, false); | |
| document.body.appendChild(script); |
| @function em($target, $context: $base-font-size) { | |
| @if $target == 0 { @return 0 } | |
| @return $target / $context + 0em; | |
| } | |
| $base-font-size: 15px; | |
| h1 { | |
| font-size: em(21px, 15px); // Outputs 1.4em | |
| } |
| import sys | |
| import numpy | |
| from nltk.cluster import KMeansClusterer, GAAClusterer, euclidean_distance | |
| import nltk.corpus | |
| from nltk import decorators | |
| import nltk.stem | |
| stemmer_func = nltk.stem.EnglishStemmer().stem | |
| stopwords = set(nltk.corpus.stopwords.words('english')) |