Chris Albon: Machine Learning @ Wikimedia

Notes On Using
Data Science & Machine Learning
To Fight For Something That Matters

I am the Director of Machine Learning at the Wikimedia Foundation. I have spent over a decade applying statistical learning, artificial intelligence, and software engineering to political, social, and humanitarian efforts.

Learning machine learning? Check out my Machine Learning Flashcards, my book (Machine Learning With Python Cookbook), or come study with me.

How To Set Up a Firewall with UFW on Ubuntu 18.04

Step 1 — Using IPv6 with UFW (Optional)

This tutorial is written with IPv4 in mind, but will work for IPv6 as well as long as you enable it. If your Ubuntu server has IPv6 enabled, ensure that UFW is configured to support IPv6 so that it will manage firewall rules for IPv6 in addition to IPv4. To do this, open the UFW configuration with nano or your favorite editor.

  • sudo nano /etc/default/ufw

Then make sure the value of IPV6 is yes. It should look like this:

/etc/default/ufw excerpt
IPV6=yes

Save and close the file. Now, when UFW is enabled, it will be configured to write both IPv4 and IPv6 firewall rules. However, before enabling UFW, we will want to ensure that your firewall is configured to allow you to connect via SSH. Let’s start with setting the default policies.

  • sudo ufw allow 443
  • sudo ufw allow https

 

Step 4 — Enabling UFW

To enable UFW, use this command:

  • sudo ufw enable

You will receive a warning that says the command may disrupt existing SSH connections. We already set up a firewall rule that allows SSH connections, so it should be fine to continue. Respond to the prompt with y and hit ENTER.

Javascript OCR Pdf-to-text

PDF-TO-TEXT

PDF-to-Text is an OCR, Pure Javascript by tesseract.js api, mobile-ready that convert PDF text-image to text.

Tech

PDF-to-Text uses a number of open source projects to work properly:

  • [JavaScript] – awesome!
  • [HTML] – HTML enhanced for web apps!
  • [CSS] – Fence!
  • [Magic] – that”s nice!

Installation

PDF-to-Text requires Node.js v4+ or any server enviroment to run.

Start the server.

$ npm install http-server -g
$ cd pdf-to-text-master
$ http-server