Skip to content

Instantly share code, notes, and snippets.

View DannyMcwaves's full-sized avatar
🏠
Working from home

Danny Mcwaves DannyMcwaves

🏠
Working from home
View GitHub Profile
@DannyMcwaves
DannyMcwaves / python-es6-comparison.md
Created December 6, 2016 12:59 — forked from revolunet/python-es6-comparison.md
# Python VS ES6 syntax comparison

Python VS ES6 syntax comparison

Python syntax here : 2.7 - online REPL

Javascript ES6 via Babel transpilation - online REPL

Imports

import math
"""
NATURAL LANGUAGE PROCESSING
using the nltk library, i am going to read a pdf file and then remove all the
stop words from the pdf file and then save the rest of the document in a file.
"""
from nltk import wordpunct_tokenize
from nltk.corpus import stopwords
from concurrent import futures
@DannyMcwaves
DannyMcwaves / express.js
Created November 17, 2016 09:15 — forked from azat-co/express.js
Tutorial: REST API with Node.js and MongoDB using Mongoskin and Express.js
var express = require('express')
, mongoskin = require('mongoskin')
var app = express()
app.use(express.bodyParser())
var db = mongoskin.db('localhost:27017/test', {safe:true});
app.param('collectionName', function(req, res, next, collectionName){
req.collection = db.collection(collectionName)