Skip to content

Commit

Permalink
update remove recursion into dupredir + sort csv
Browse files Browse the repository at this point in the history
* sorts the output csvs in the infrastructure/Makefile
* I don't think we should recurse into dupredirnode because it seems
  like those are the parameters of the redirection
  • Loading branch information
EtomicBomb authored and vagos committed Dec 29, 2024
1 parent 59b25e2 commit 9f2e4f7
Show file tree
Hide file tree
Showing 6 changed files with 194 additions and 199 deletions.
2 changes: 2 additions & 0 deletions infrastructure/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
__pycache__/
.venv
venv
6 changes: 3 additions & 3 deletions infrastructure/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ STATIC_OUTPUTS = target/lines_of_code.csv target/nodes_in_scripts.csv target/scr
static: $(STATIC_OUTPUTS)

target/scripts_to_benchmark.csv: scripts_to_benchmark.py
python3 $< > $@
python3 $< | sort > $@

target/lines_of_code.csv: count_lines_of_code.py
python3 $< > $@
python3 $< | sort > $@

target/nodes_in_scripts.csv: count_nodes_in_scripts.py syntax_analysis.py
python3 $< > $@
python3 $< | sort > $@

static-test: tests/test_syntax_analysis.py
python3 -m unittest $<
Expand Down
1 change: 0 additions & 1 deletion infrastructure/syntax_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ def count_nodes(asts, count: Counter[NodeVariant]):
count_nodes(argchars, count)
case DupRedirNode(arg=argchars):
count[NodeVariant.DUP_REDIRECTION] += 1
count_nodes(argchars, count)
case HeredocRedirNode(arg=argchars):
count[NodeVariant.HEREDOC_REDIRECTION] += 1
count_nodes(argchars, count)
Expand Down
128 changes: 63 additions & 65 deletions infrastructure/target/lines_of_code.csv
Original file line number Diff line number Diff line change
@@ -1,100 +1,98 @@
covid-mts/scripts/3.sh,10
covid-mts/scripts/2.sh,10
covid-mts/scripts/1.sh,9
covid-mts/scripts/2.sh,10
covid-mts/scripts/3.sh,10
covid-mts/scripts/4.sh,9
covid-mts/scripts/5.sh,15
file-enc/scripts/compress_files.sh,7
file-enc/scripts/encrypt_files.sh,11
log-analysis/scripts/nginx.sh,19
log-analysis/scripts/pcaps.sh,16
max-temp/scripts/temp-analytics.sh,17
media-conv/scripts/to_mp3.sh,11
media-conv/scripts/img_convert.sh,11
media-conv/scripts/to_mp3.sh,11
nlp/scripts/bigrams_appear_twice.sh,20
nlp/scripts/bigrams.sh,19
nlp/scripts/compare_exodus_genesis.sh,21
nlp/scripts/uppercase_by_type.sh,10
nlp/scripts/sort.sh,10
nlp/scripts/count_consonant_seq.sh,10
nlp/scripts/syllable_words_2.sh,10
nlp/scripts/uppercase_by_token.sh,10
nlp/scripts/merge_upper.sh,10
nlp/scripts/count_words.sh,10
nlp/scripts/sort_words_by_num_of_syllables.sh,19
nlp/scripts/syllable_words_1.sh,10
nlp/scripts/bigrams_appear_twice.sh,20
nlp/scripts/words_no_vowels.sh,10
nlp/scripts/sort_words_by_rhyming.sh,10
nlp/scripts/count_morphs.sh,10
nlp/scripts/count_trigrams.sh,21
nlp/scripts/count_vowel_seq.sh,10
nlp/scripts/count_words.sh,10
nlp/scripts/find_anagrams.sh,19
nlp/scripts/letter_words.sh,11
nlp/scripts/count_vowel_seq.sh,10
nlp/scripts/verses_2om_3om_2instances.sh,12
nlp/scripts/merge_upper.sh,10
nlp/scripts/sort.sh,10
nlp/scripts/sort_words_by_folding.sh,10
nlp/scripts/sort_words_by_num_of_syllables.sh,19
nlp/scripts/sort_words_by_rhyming.sh,10
nlp/scripts/syllable_words_1.sh,10
nlp/scripts/syllable_words_2.sh,10
nlp/scripts/trigram_rec.sh,21
nlp/scripts/bigrams.sh,19
nlp/scripts/uppercase_by_token.sh,10
nlp/scripts/uppercase_by_type.sh,10
nlp/scripts/verses_2om_3om_2instances.sh,12
nlp/scripts/vowel_sequencies_gr_1K.sh,10
nlp/scripts/count_trigrams.sh,21
nlp/scripts/sort_words_by_folding.sh,10
oneliners/scripts/sort.sh,2
oneliners/scripts/set-diff.sh,11
oneliners/scripts/spell.sh,11
oneliners/scripts/diff.sh,10
nlp/scripts/words_no_vowels.sh,10
oneliners/scripts/bi-gram.aux.sh,61
oneliners/scripts/wf.sh,2
oneliners/scripts/icfp-spell.sh,5
oneliners/scripts/top-n.sh,2
oneliners/scripts/sort-sort.sh,2
oneliners/scripts/bi-grams.sh,9
oneliners/scripts/diff.sh,10
oneliners/scripts/nfa-regex.sh,2
sklearn/run.sh,50
riker/scripts/vim/build.sh,23
riker/scripts/xz/build.sh,19
riker/scripts/redis/build.sh,20
riker/scripts/xz-clang/build.sh,19
oneliners/scripts/set-diff.sh,11
oneliners/scripts/sort.sh,2
oneliners/scripts/sort-sort.sh,2
oneliners/scripts/spell.sh,11
oneliners/scripts/top-n.sh,2
oneliners/scripts/wf.sh,2
riker/scripts/lua/build.sh,9
riker/scripts/memcached/build.sh,15
riker/scripts/redis/build.sh,20
riker/scripts/sqlite/build.sh,41
uniq-ips/run.sh,1
unix50/scripts/30.sh,2
unix50/scripts/3.sh,2
unix50/scripts/35.sh,2
unix50/scripts/27.sh,1
unix50/scripts/18.sh,2
unix50/scripts/33.sh,2
unix50/scripts/2.sh,2
riker/scripts/vim/build.sh,23
riker/scripts/xz/build.sh,19
riker/scripts/xz-clang/build.sh,19
sklearn/scripts/run.sh,50
uniq-ips/scripts/run.sh,1
unix50/scripts/10.sh,2
unix50/scripts/11.sh,2
unix50/scripts/12.sh,2
unix50/scripts/13.sh,2
unix50/scripts/14.sh,2
unix50/scripts/15.sh,2
unix50/scripts/8.sh,2
unix50/scripts/16.sh,2
unix50/scripts/6.sh,2
unix50/scripts/9.sh,2
unix50/scripts/28.sh,2
unix50/scripts/12.sh,2
unix50/scripts/17.sh,2
unix50/scripts/18.sh,2
unix50/scripts/19.sh,2
unix50/scripts/1.sh,2
unix50/scripts/31.sh,2
unix50/scripts/21.sh,2
unix50/scripts/26.sh,2
unix50/scripts/36.sh,2
unix50/scripts/20.sh,2
unix50/scripts/7.sh,2
unix50/scripts/11.sh,2
unix50/scripts/14.sh,2
unix50/scripts/13.sh,2
unix50/scripts/21.sh,2
unix50/scripts/22.sh,1
unix50/scripts/32.sh,2
unix50/scripts/17.sh,2
unix50/scripts/25.sh,2
unix50/scripts/4.sh,2
unix50/scripts/19.sh,2
unix50/scripts/34.sh,2
unix50/scripts/10.sh,2
unix50/scripts/24.sh,2
unix50/scripts/23.sh,2
unix50/scripts/24.sh,2
unix50/scripts/25.sh,2
unix50/scripts/26.sh,2
unix50/scripts/27.sh,1
unix50/scripts/28.sh,2
unix50/scripts/29.sh,2
unix50/scripts/2.sh,2
unix50/scripts/30.sh,2
unix50/scripts/31.sh,2
unix50/scripts/32.sh,2
unix50/scripts/33.sh,2
unix50/scripts/34.sh,2
unix50/scripts/35.sh,2
unix50/scripts/36.sh,2
unix50/scripts/3.sh,2
unix50/scripts/4.sh,2
unix50/scripts/5.sh,2
unix50/scripts/6.sh,2
unix50/scripts/7.sh,2
unix50/scripts/8.sh,2
unix50/scripts/9.sh,2
web-index/scripts/bigrams_aux.sh,8
web-index/scripts/extract_text.sh,6
web-index/scripts/ngrams.sh,39
web-index/scripts/p1.sh,9
web-index/scripts/p2.sh,11
web-index/scripts/trigrams_aux.sh,13
web-index/scripts/web-index-aux.sh,111
web-index/scripts/p1.sh,9
web-index/scripts/bigrams_aux.sh,8
web-index/scripts/web-index.sh,116
web-index/scripts/p2.sh,11
test/test.sh,1
Loading

0 comments on commit 9f2e4f7

Please sign in to comment.