Upload files to ""
This commit is contained in:
commit
d50a70b33f
37
langsmoke
Normal file
37
langsmoke
Normal file
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Get input argument
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "Usage: langsmoke <file>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -r $1 ] || [ -d $1 ]; then
|
||||
echo "Error: $1 is not a readable file"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Get size of input in MB
|
||||
size=$(du -sm $1 | cut -f1)
|
||||
let "size++"
|
||||
|
||||
src=$1
|
||||
bz3=$(bzip3 -vf $1 /dev/null 2>&1 | grep -oE "[0-9]+ bytes" | grep -oE "[0-9]+")
|
||||
|
||||
function do_stat {
|
||||
# 20MB cutoff.
|
||||
l_stat=$(cat ref_$1 $src | head -c 20000000 | bzip3 -eb $size | wc -c)
|
||||
l_ref=$2
|
||||
sim=$(python3 -c "print(100*(1-($l_stat - min($l_ref, $bz3)) / (max($l_ref, $bz3))))")
|
||||
echo $sim
|
||||
}
|
||||
|
||||
echo "C: $(do_stat c 34248)"
|
||||
echo "C++: $(do_stat cpp 33606)"
|
||||
echo "Java: $(do_stat java 61196)"
|
||||
echo "6502: $(do_stat 6502 7978)"
|
||||
echo "Z80: $(do_stat z80 20182)"
|
||||
echo "APL: $(do_stat apl 29173)"
|
||||
echo "x86: $(do_stat x86 25753)"
|
||||
echo "x64: $(do_stat x64 13671)"
|
||||
echo "Shell: $(do_stat sh 44144)"
|
11
ref.md
Normal file
11
ref.md
Normal file
|
@ -0,0 +1,11 @@
|
|||
|
||||
Dataset sources:
|
||||
- C: https://github.com/kspalaiologos/asm2ws, https://github.com/Mashpoe/c-hashmap, https://github.com/kspalaiologos/modern-rzip, Raylib
|
||||
- C++: https://github.com/ThePhD/sol2, LLVM libcxx
|
||||
- Java: https://github.com/kspalaiologos/cask, https://github.com/kspalaiologos/kamilalisp, https://github.com/Anuken/Mindustry, https://github.com/openjdk/jdk
|
||||
- 6502: Chess by Peter Jennings, Day Of Week by Paul Guertin, Sweet Interpreter by Apple Computer, Mini Multitasking 6502 kernel (Joachim Deboy)
|
||||
- Z80: TSE by Michael Vincent & Robin Kay, CSX: Copyright (c) 2004, Sean McLaughlin, Megaman and Mario clones from TI Archive (TI83+, Mirage OS).
|
||||
- APL: Lambda Calculus, apl-misc-math, apl-logic, dx by Kamila Szewczyk. https://github.com/the-carlisle-group/Text2Date. https://github.com/Dyalog/Jarvis.
|
||||
- x86: Various bits of my private code (Kamila Szewczyk), Flat Assembler by Tomasz Grysztar, DOS 2.0 chkdsk by Microsoft, basicdos: https://github.com/jeffpar/basicdos
|
||||
- x64: kspalaiologos/elf-infection, https://github.com/Sakib2263/64-Bit-NASM-Assembly-Code-Examples, https://github.com/GugaDozero/asm64-tictactoe, https://github.com/nuid64/asmerver, https://github.com/CorruptedByCPU/Cyjon
|
||||
- shell: oh my zsh, autoconf, docker pi hole
|
1094
service.asm
Normal file
1094
service.asm
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user