Skip to content

Instantly share code, notes, and snippets.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@abirjameel
abirjameel / scale.py
Created June 16, 2018 14:23
Function for Normalizing pandas DataFrame
def normalize(df):
"""
Function for min-max Scaling a pandas DataFrame
@param:
Takes a pandas DataFrame: df
Returns: a normalized DataFrame
along with a dict containing rescaling
coef which can be used in below function.
"""
result = df.copy()
@cast42
cast42 / Basic timeseries exploration.ipynb
Last active August 10, 2018 01:16
Exploration of basic timeseries approach to forecast sales in the Rossman Kaggle competition
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@iandanforth
iandanforth / kmeansExample.py
Last active May 13, 2024 14:00
A pure python implementation of K-Means clustering. Optional cluster visualization using plot.ly.
#############################################################################
# Full Imports
from __future__ import division
import math
import random
"""
This is a pure Python implementation of the K-means Clustering algorithmn. The
original can be found here:
@samuel
samuel / check_redis.py
Last active October 19, 2019 11:16
Redis health and memory check for Nagios
#!/usr/bin/python
#
# LICENSE: MIT
#
# Copyright (C) 2014 Samuel Stauffer
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation