def check(inf, tid, item, s, o): argv = ['cmdname'] argv.append(inf) argv.append(tid) argv.append(item) argv.append(s) argv.append(o) args = margs.Margs( argv, "i=,x=,O=,tid=,item=,class=,taxo=,type=,s=,S=,sx=,Sx=,g=,p=,-uniform,l=,u=,top=,T=,-replaceTaxo" ) try: #print(dir(mitemset)) nt.mitemset(**(args.kvmap())).run() dir = o.split("=")[1] for line in open(dir + "/patterns.csv"): sys.stdout.write(line) except Exception as err: print(err) #extTake.lcmtrans("/tmp/__MTEMP_25238_4411333656_0","p","cfvdf") return None
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args=margs.Margs(sys.argv,"ei=,ef=,eo=,th=,sim=,th2=,sim2=,kn=,kn2=,sup=,iter=,log=","ei=,ef=,th=") nt.mbipolish(**args.kvmap()).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs(sys.argv, "ei=,ef=,ni=,nf=,-all,o=,l=,u=,log=", "ei=,ef=") nt.mclique(**(args.kvmap())).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args=margs.Margs(sys.argv,"ni=,nf=,ei=,ef=,eo=,no=,sim=,rank=,dir=,-directed,-udout","ei=,ef=,sim=") nt.mfriends(**(args.kvmap())).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import re import nysol.util.margs as margs import nysol.take.graph as ntg import nysol.take as nt args = margs.Margs( sys.argv, "ni=,nf=,ei=,ef=,-indirect,eo=,no=,th=,sim=,sup=,iter=,log=,O=", "ei=,ef=,th=") ei = args.str("ei=") ni = args.str("ni=", None) ef = args.str("ef=", None, ",") nf = args.str("nf=", None) if len(ef) != 2: raise Exception("ef size is 2") gi = ntg.graph(edgeFile=ei, title1=ef[0], title2=ef[1], nodeFile=ni, title=nf) para = {} para["gi"] = gi for k, v in args.keyValue.items(): if k == "ei=" or k == "ef=" or k == "nf=" or k == "ni=" or k == "eo=" or k == "no=": continue if re.match(r'^-', k): para[re.sub(r'^-', "", k)] = v else: para[re.sub(r'=$', "", k)] = v
"i=":"iFile", "c=":"cFile", "class=":"cNames", "-maximal":"maximal" } if "-help" in sys.argv or "--help" in sys.argv: print(helpMSG) exit() flat =[] for para in paraList: flat.extend(para) #args=margs.Margs(sys.argv,",".join(flat),"i=,sid=,item=,time=,maxSize=,O=") args=margs.Margs(sys.argv,",".join(flat),"i=,sid=,item=,time=,O=") ##make パラメータ #ipara iParams={} for p in paraList[0] : val = None if paraType[p] == "int": val = args.int(p) elif paraType[p] == "str": val = args.str(p) elif paraType[p] == "fldstr": if args.str(p) != None: val = args.str(p).split(",")
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.mining.mgnfeatures as nmm args = margs.Margs( sys.argv, "I=,ei=,ef=,ni=,nf=,ew=,O=,mode=,-directed,-normalize,-verbose,mp=", "ef=,O=") nmm.mgnfeatures(**(args.kvmap())).run(msg="on")
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.mining.mgfeatures as nmm args = margs.Margs( sys.argv, "I=,ei=,ef=,ni=,nf=,o=,O=,diameter=,graph_density=,average_shortest_path,-verbose,-directed,mp=", "ef=,O=") nmm.mgfeatures(**(args.kvmap())).run(msg="on")
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.mining.mgpmetis as nmm args = margs.Margs( sys.argv, "ei=,ef=,ew=,ni=,nf=,nw=,o=,kway=,ptype=,balance=,ncuts=,dat=,map=,-noexe,seed=,T=,-verbose,T=", "kway=,ei=") nmm.mgpmetis(**(args.kvmap())).run(msg="on")
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs( sys.argv, "i=,no=,eo=,log=,tid=,item=,s=,S=,sim=,th=,-node_support,T=,-num", "i=,tid=,item=,eo=") nt.mtra2gc(**(args.kvmap())).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs( sys.argv, "i=,tid=,item=,ro=,eo=,no=,s=,S=,filter=,lb=,ub=,sim=,dir=,rank=,-prune,-num,-verbose", "i=,tid=,item=,eo=,no=") nt.mpal(**args.kvmap()).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- #!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.mining.msketchsort as nmm args=margs.Margs(sys.argv,"e=,tid=,i=,dist=,th=,mr=,wf=,ws=,o=,T=,seed=,-uc","e=,tid=,i=") nmm.msketchsort(**(args.kvmap())).run(msg="on")
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs(sys.argv, "ei=,ef=,o=,l=,u=,-edge", "ei=") nt.mbiclique(**args.kvmap()).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs( sys.argv, "i=,x=,O=,tid=,item=,cls=,taxo=,type=,s=,S=,sx=,Sx=,g=,p=,-uniform,l=,u=,top=,T=,-replaceTaxo" ) nt.mitemset(**(args.kvmap())).run()
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import nysol.util.margs as margs import nysol.take as nt args = margs.Margs( sys.argv, "i=,c=,x=,O=,tid=,time=,item=,cls=,taxo=,s=,S=,sx=,Sx=,g=,p=,-uniform,l=,u=,top=,gap=,win=,-padding,T=,-mcmdenv", "i=") nt.msequence(**(args.kvmap())).run()