Skip to content

Instantly share code, notes, and snippets.

@rabimba
rabimba / checkstatus.py
Created July 18, 2016 16:58
A simple python status checker for checking accessibility of websites
#!/usr/bin/env python
# sample usage: checkstatus.py twitter.com google.com youtube.com
import pickle, os, sys, logging
from httplib import HTTPConnection, socket
from smtplib import SMTP
def email_alert(message, status):
fromaddr = 'you@gmail.com'
@rabimba
rabimba / Sync gh-pages + master branches
Created December 28, 2015 11:17 — forked from mandiwise/Sync gh-pages + master branches
Keep gh-pages up to date with a master branch
// Reference: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/
$ git add .
$ git status // to see what changes are going to be commited
$ git commit -m 'Some descriptive commit message'
$ git push origin master
$ git checkout gh-pages // go to the gh-pages branch
$ git rebase master // bring gh-pages up to date with master
$ git push origin gh-pages // commit the changes
""" this is the implementation for modified apriori algorithm (kuok's algorithm)
minsupport and minconfidence are assumed
"""
from copy import deepcopy
from fuzzysubset import *
minsupport=0.2 # minimum support required to obtain fuzzy rules
minconfidence=0.4 # minimum confidence required to obtain fuzzy rules
#data is in the format of [{1:2, 2:4 , 3:4.5 , 4: 1.2 }]
# attributeinfo gives the relevant information about the attribute format is {1:[low1 , medium1 ], 2:[low, high, medium] }.etc
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
import random
from random import randrange
import sys
from time import time
from datetime import datetime
whole_fsc_dict={}
whole_imp_v=[]