-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
trying to edit formatting with autopep8 to conform to pep8 (#58)
* trying to edit formatting with autopep8 to conform to pep8 * fixed several things, among which flake8 version, tox.ini formatting, lots in the source code format, ran it once to make sure it still works Not perfect yet, but merged since it works. Further embellishments or edits can be done in the future
- Loading branch information
Showing
27 changed files
with
746 additions
and
629 deletions.
There are no files selected for viewing
This file contains 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
Binary file not shown.
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,39 @@ | ||
import os | ||
import re | ||
|
||
fp = "/Users/leonardo/IdeaProjects/phenopacket2prompt/prompts/" | ||
|
||
langs = ["en", | ||
"es", | ||
"de", | ||
"it", | ||
"nl", | ||
"tr", | ||
"zh", | ||
] | ||
langs = [ | ||
"en", | ||
"es", | ||
"de", | ||
"it", | ||
"nl", | ||
"tr", | ||
"zh", | ||
] | ||
|
||
promptfiles = {} | ||
for lang in langs: | ||
promptfiles[lang] = [] | ||
for (dirpath, dirnames, filenames) in os.walk(fp+lang): | ||
for dirpath, dirnames, filenames in os.walk(fp + lang): | ||
for fn in filenames: | ||
fn = fn[0:-14] # TODO may be problematic if there are 2 "_" before "{langcode}-" | ||
fn = fn[0:-14] # TODO may be problematic if there are 2 "_" before "{langcode}-" | ||
# Maybe something along the lines of other script disease_avail_knowledge.py | ||
# ppkt_label = ppkt[0].replace('_en-prompt.txt','') | ||
promptfiles[lang].append(fn) | ||
break | ||
|
||
intersection = set() | ||
|
||
enset = set(promptfiles['en']) | ||
esset = set(promptfiles['es']) | ||
deset = set(promptfiles['de']) | ||
itset = set(promptfiles['it']) | ||
nlset = set(promptfiles['nl']) | ||
zhset = set(promptfiles['zh']) | ||
trset = set(promptfiles['tr']) | ||
enset = set(promptfiles["en"]) | ||
esset = set(promptfiles["es"]) | ||
deset = set(promptfiles["de"]) | ||
itset = set(promptfiles["it"]) | ||
nlset = set(promptfiles["nl"]) | ||
zhset = set(promptfiles["zh"]) | ||
trset = set(promptfiles["tr"]) | ||
|
||
intersection = enset & esset & deset & itset & nlset & zhset & trset | ||
|
||
print("Common ppkts are: ", len(intersection)) | ||
print("Common ppkts are: ", len(intersection)) |
Oops, something went wrong.