Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from collections import Counter
- lst = []
- commands = "8ball, analyse, apystats, autojoin, away, awik, back, bargle, botfight, bothug, botslap, botsnack, bytes, calccoverage, checkMessages, chill, choose, commit, ethnologue, ety, f_weather, fcc, fight, follow, following, food, foodvote, generate, get_recent_commit, gitserver, hargle, harglebargle, harglebargleP, head, hs, hug, identlang, imdb, in, information, join, linx, listlangs, listpairs, logs, mailing list reporter, more, nightnight, noexceptions, nsfw, part, particles, perword, pester, pester stop, pesters, pointing, py, queue, quit, randquote, recent, reload, retrieve_commit, seen, slogan, stache, stats, suggest, t, tells, u, uderp, udmurt, unfollow, unsupervised, upgrade, urb, vtluug, w, wadsworth, whereis, wik, wuvt"
- commands = commands.split(", ")
- p = r"C:/Users/Nu11us/Desktop/#apertium/"
- for i in os.listdir(p):
- a = open(p+i, errors="ignore").read()
- for k in commands:
- if "."+k+" " in a:
- lst.append(k)
- elif "begiak: "+k+" " in a:
- lst.append(k)
- elif "."+k+"\n" in a:
- lst.append(k)
- elif "begiak: "+k+"\n" in a:
- lst.append(k)
- output = open("output.csv","w")
- for i in commands:
- output.write(i+", "+str(lst.count(i))+'\n')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement