This file contains hidden or 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
// The class is visible from outside the package | |
// the class itself is not the object but is the | |
// description of its behaviour and its data structure. | |
// (The PROJECT) | |
public class Animal { | |
private String race = "Uknown"; | |
private int age; |
This file contains hidden or 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/perl | |
my @myLangs = qw( de it fr ); | |
# STOP WORDS FOLDER | |
my $stp = "/home/andrea/Downloads/DataMining/code/data/"; | |
# STOP WORDS FILE | |
my $stf = "/stopwords.txt"; | |
# DATA MAIN PATH |
This file contains hidden or 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
[ -z "$PS1" ] && return | |
export EDITOR=/usr/bin/nano | |
export SHELL=/bin/bash | |
# Pretty-print of some PATH variables: | |
alias path='echo -e ${PATH//:/\\n}' | |
alias libpath='echo -e ${LD_LIBRARY_PATH//:/\\n}' | |
alias mkdir='mkdir -p' |
This file contains hidden or 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
#!/bin/bash | |
# This software comes without any kind of warranty or license, use it at your own risk. | |
# | |
# Author: Andrea Galloni | |
# E-mail: andreagalloni92[at]gmail{dot}com | |
# | |
# Works on TP-Link 300M Wireless N ADSL2+ Modem Router TD-W8960N | |
# Firmware Version: 1.3.6 Build 100825 Rel.68770n | |
# |
This file contains hidden or 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 collections import defaultdict | |
from itertools import imap, combinations | |
def get_frequent_items_sets(transactions,min_support,steps=0): | |
frequent_itemsets = [] | |
items = defaultdict(lambda: 0) | |
[inc(items,item,1) for transaction in transactions for item in transaction] | |
items = set(item for item, support in items.iteritems() | |
if support >= min_support) | |
[frequent_itemsets.append(item) for item in items] |
NewerOlder