Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
XNAT-Group
XNAT_Query_Client_XSA
Commits
d760888d
Commit
d760888d
authored
Jun 25, 2015
by
Franziska Koehn
Browse files
filtered empty strings
parent
469f5b79
Changes
1
Show whitespace changes
Inline
Side-by-side
xsa/chart.py
View file @
d760888d
...
...
@@ -22,8 +22,12 @@ def count_substrings(substrings, strings):
if
strings
==
[]:
return
[]
subs
=
list
(
set
(
substrings
))
results
=
defaultdict
(
int
)
for
sub
,
string
in
product
(
substrings
,
strings
):
for
sub
,
string
in
product
(
subs
,
strings
):
if
sub
==
''
:
continue
results
[
sub
]
# create key
if
sub
.
lower
()
in
string
.
lower
():
results
[
sub
]
+=
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment