Skip to content

Instantly share code, notes, and snippets.

@zurez
zurez / ajax.ts
Created May 19, 2020 21:08
Code I wrote for talking with server
import axios from 'axios';
import { AwsAuth } from './aws';
const baseUrl = process.env.API_URL;
interface AjaxRequest {
url: string;
queryParams?: object;
body?: object;
headers?: object;
auth?: boolean;
@zurez
zurez / README.md
Created January 5, 2020 10:46 — forked from willprice/README.md
Install OpenCV 4.1.2 for Raspberry Pi 3 or 4 (Raspbian Buster)

Install OpenCV 4.1.2 on Raspbian Buster

$ chmod +x *.sh
$ ./download-opencv.sh
$ ./install-deps.sh
$ ./build-opencv.sh
$ cd ~/opencv/opencv-4.1.2/build
$ sudo make install
@zurez
zurez / .env
Last active August 16, 2019 10:10
APP_ENV=local
APP_DEBUG=true
APP_KEY=ibXjzma17W6BhqYjGcrtYjx4UT2pXTih
DB_CONNECTION=mysql
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
console.log('You have successfully printed out ');
@zurez
zurez / ba.sh
Created March 25, 2017 15:21 — forked from bvolpato/ba.sh
Install Chrome Driver with Xvfb (Ubuntu Server)
#!/bin/bash
# Chrome Repo
sudo apt-get install fonts-liberation xdg-utils libxss1 libappindicator1 libindicator7
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome*.deb
sudo apt-get update
# Download

Text Classification

To demonstrate text classification with Scikit Learn, we'll build a simple spam filter. While the filters in production for services like Gmail will obviously be vastly more sophisticated, the model we'll have by the end of this chapter is effective and surprisingly accurate.

Spam filtering is the "hello world" of document classification, but something to be aware of is that we aren't limited to two classes. The classifier we will