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 math | |
def is_mad_based_outlier(points, compare_to, thresh=3.5): | |
if len(points.shape) == 1: | |
points = points[:,None] | |
median = np.median(points, axis=0) | |
diff = np.sum((points - median)**2, axis=-1) |
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 pandas as pd | |
data_1 = { | |
'date': [ '2014-05-01 18:47:05.069722', | |
'2014-05-01 18:47:05.119994', | |
'2014-05-02 18:47:05.178768', | |
'2014-05-02 18:47:05.230071', | |
'2014-05-02 18:47:05.230071', | |
'2014-05-02 18:47:05.280592', | |
'2014-05-03 18:47:05.332662', |
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/python | |
# -*- coding: utf-8 -*- | |
"""Import and generate clone of an OVA file in virtualbox | |
""" | |
import re | |
import sys | |
import uuid | |
import random |
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 python | |
# This a simple smtp server for testing on localhost | |
# The original version is on https://coderwall.com/p/ufjgwa/smtp-server-on-python-for-development-with-storing-emails | |
# This version is more verbose on what is doing, with more parameters and fail safe checks. | |
import argparse | |
import asyncore | |
import smtpd | |
import time |
NewerOlder