Created
January 7, 2025 11:37
-
-
Save llandsmeer/45337066eea6f093a308e469b6c50806 to your computer and use it in GitHub Desktop.
NeuroML-DB stats
This file contains hidden or 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
for model in paper_experiments/nml_standalones/*/ | |
do | |
echo -n "$(basename "${model}")" | |
for fun in log exp sqrt sin cos tan sinh cosh tanh abs ceil factorial random | |
do | |
if rg \ | |
-q \ | |
-i \ | |
-g '*.nml' \ | |
'\b'"${fun}"'\b' \ | |
"${model}" | |
then | |
echo -n " ${fun}" | |
fi | |
done | |
echo | |
done |
This file contains hidden or 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
https://zenodo.org/record/5974932 |
This file contains hidden or 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
import glob | |
import collections | |
import re | |
c = collections.Counter() | |
for fn in glob.glob('./paper_experiments/sims/sims/*/Cell_type_0_code.gen.c'): | |
with open(fn) as f: | |
src = f.read() | |
doit = src.split('doit', 1)[1] | |
m = set(re.findall(r'([a-z_A-Z]+?)[0-9]*f?[0-9]* *\(', doit)) | |
if 'i' in m: m.remove('i') | |
if 'for' in m: m.remove('for') | |
c.update(m) | |
c['files'] += 1 | |
for k, v in c.items(): | |
print(k, v, round(v/c['files']*100, 2), '%') | |
# eden-processed neuroml database | |
# which amount of models use which function? | |
# function count percentage | |
# exp 1055 97.78 % | |
# pow 1052 97.5 % | |
# log 1041 96.48 % | |
# sqrt 4 0.37 % | |
# total files: 1079 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment