<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# *********************************************************************
# featureExtract() function will extract subgraph features
# *********************************************************************

# import the modules needed to run the script
import os,sys

# subgraph size(2,3,4,234)
subgraphSize = str(sys.argv[1]) 
dbEnd = int(sys.argv[2])  # the end number of the database

# valid subgraph size
validSize=['2','3','4','234']
if subgraphSize in validSize:
    print '\n*********************************************************************\n'
    print "Subgraph size: ",subgraphSize,' is valid!\n'
else:
    print '\n*********************************************************************\n'
    print "Invalid subgraph size, system exit! "
    print '\n*********************************************************************\n'
    raise SystemExit

# subgraph size 234 is the combination of subgraph size 2, 3 and 4<commit_msg>Update featureExtract.py<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

# *********************************************************************
# featureExtract() function will extract subgraph features
# *********************************************************************

# import the modules needed to run the script
import os,sys

subgraphSize = str(sys.argv[1])  # subgraph size(2,3,4,234)
dbEnd = int(sys.argv[2])  # the end number of the database

# valid subgraph size
validSize=['2','3','4','234']
if subgraphSize in validSize:
    print '\n*********************************************************************\n'
    print "Subgraph size: ",subgraphSize,' is valid!\n'
else:
    print '\n*********************************************************************\n'
    print "Invalid subgraph size, system exit! "
    print '\n*********************************************************************\n'
    raise SystemExit

# subgraph size 234 is the combination of subgraph size 2, 3 and 4
{'fraction_non_alphanumeric': 0.43099152964623816, 'fraction_numerical': 0.02092675635276532, 'mean_word_length': 6.249097472924188, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7632117', 'n_tokens_mistral': 518, 'n_tokens_neox': 464, 'n_words': 148}