awacke1 commited on
Commit
e15f1b6
ยท
1 Parent(s): fe853b6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -39,19 +39,25 @@ def check_keyword(username, version):
39
  maxrepos = 70000000 #6M user entries * up to 18 per user
40
  currenthitcount=0
41
  currentrepos=0
 
 
 
42
  for repolist in usernames[version]:
 
 
43
  #print(repolist)
44
  repos = usernames[version][repolist]
45
  repo_word = "repository" if len(repos)==1 else "repositories"
46
  #output_md += f"**Yes**, there is code from **{len(repos)} {repo_word}** in The Stack:\n\n"
47
  for repo in repos:
 
48
  currentrepos += 1
49
  if currentrepos > maxrepos:
50
  output_md += f"**Found maximum repos**, Count: **{currentrepos}** in The Stack:\n\n"
51
  return output_md.strip()
52
  if username in repo:
53
  currenthitcount += 1
54
- output_md += f"_<a href=https://github.com/{repo} target=_blank>{repo}</a>_\n\n"
55
  if currenthitcount > maxhitcount:
56
  output_md += f"**Found maximum hits**, Count: **{currenthitcount}** in The Stack:\n\n"
57
  return output_md.strip()
 
39
  maxrepos = 70000000 #6M user entries * up to 18 per user
40
  currenthitcount=0
41
  currentrepos=0
42
+ repocounter=0
43
+ usercounter=0
44
+
45
  for repolist in usernames[version]:
46
+ usercounter += 1
47
+
48
  #print(repolist)
49
  repos = usernames[version][repolist]
50
  repo_word = "repository" if len(repos)==1 else "repositories"
51
  #output_md += f"**Yes**, there is code from **{len(repos)} {repo_word}** in The Stack:\n\n"
52
  for repo in repos:
53
+ repocounter += 1
54
  currentrepos += 1
55
  if currentrepos > maxrepos:
56
  output_md += f"**Found maximum repos**, Count: **{currentrepos}** in The Stack:\n\n"
57
  return output_md.strip()
58
  if username in repo:
59
  currenthitcount += 1
60
+ output_md += f"_<a href=https://github.com/{repo} target=_blank>{repo} repocounter: {repocounter} usercounter: {usercounter}</a>_\n\n"
61
  if currenthitcount > maxhitcount:
62
  output_md += f"**Found maximum hits**, Count: **{currenthitcount}** in The Stack:\n\n"
63
  return output_md.strip()