This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.dwmkerr.com/learn-docker-by-building-a-microservice/ | |
docker pull hypriot/rpi-mysql:latest | |
docker images | |
docker run --name db -d -e MYSQL_ROOT_PASSWORD=root -p 3306:3306 hypriot/rpi-mysql | |
docker ps | |
docker exec -it db /bin/bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install scipy | |
pip install scikit-learn | |
pip install jupyter | |
pip install matplotlib | |
pip install pandas | |
pip install seaborn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sudo apt-get --yes update | |
# install mysql | |
#echo "******* Installing MySql *******" | |
sudo apt-get --yes --force-yes install mysql-server | |
sudo apt-get --yes --force-yes install mysql-client | |
sudo apt-get --yes --force-yes install python-mysqldb | |
sudo apt-get --yes --force-yes install libmysqlclient-dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import time | |
from sklearn.naive_bayes import MultinomialNB | |
from sklearn.svm import LinearSVC | |
from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer | |
from sklearn.model_selection import StratifiedKFold | |
import pandas as pd | |
from sklearn import metrics | |
from sklearn.linear_model import LogisticRegression | |
from stemming.porter2 import stem |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from sklearn.base import BaseEstimator, TransformerMixin | |
class RemoveEllipseTransformer(TransformerMixin): | |
@staticmethod | |
def _preprocess_data(data_series): | |
""" | |
inspired from: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This #include statement was automatically added by the Particle IDE. | |
#include <SHT1x.h> | |
// This #include statement was automatically added by the Particle IDE. | |
#include <blynk.h> | |
// Distributed with a free-will license. | |
// Use it any way you want, profit or free, provided it fits in the licenses of its associated works. | |
// HCPA-5V-U3 | |
// This code is designed to work with the HCPA-5V-U3_I2CS I2C Mini Module available from ControlEverything.com. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/265960/best-way-to-strip-punctuation-from-a-string-in-python | |
import string | |
def remove_punctuation(x): | |
table = str.maketrans({key: None for key in string.punctuation}) | |
return x.translate(table) | |
# mydoc = Appearance: Deep Amber with medium bubbles and an off-white head settles quick with even lacing. Head upon initial pour rose to about one finger's length. | |
# print(remove_punctuation(mydoc) | |
# Appearance Deep Amber with medium bubbles and an offwhite head settles quick with even lacing Head upon initial pour rose to about one fingers length |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from bs4 import BeautifulSoup | |
import re | |
""" | |
This script will help take a creative-tim theme, and convert it to a jinja2 template that can be used in a Flask | |
application. | |
It essentially takes all of the href to files, and wraps them in a url_for to the static directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import glob | |
from bs4 import BeautifulSoup | |
import re | |
""" | |
This script will help take a creative-tim theme, and convert it to a jinja2 template that can be used in a Flask | |
application. | |
It essentially takes all of the href to files, and wraps them in a url_for to the static directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from scipy.spatial import distance as dist | |
import matplotlib.pyplot as plt | |
import numpy as np | |
import argparse | |
import glob | |
import cv2 | |
""" | |
https://www.pyimagesearch.com/2014/07/14/3-ways-compare-histograms-using-opencv-python/ |