From 26550469a975b717631c8175dc7870d24b786e7b Mon Sep 17 00:00:00 2001 From: wacksientrist <82042695+wacksientrist@users.noreply.github.com> Date: Tue, 9 May 2023 11:23:32 -0400 Subject: [PATCH] Add files via upload --- Orchid/Code/Comp1/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp1/Instance.c | 95 +++++++++++++++ .../Comp1/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp1/Instrc_r1.txt | 1 + Orchid/Code/Comp1/Instrc_r2.txt | 1 + Orchid/Code/Comp1/Instrc_r3.txt | 1 + Orchid/Code/Comp1/Instrc_s.txt | 1 + Orchid/Code/Comp1/start.sh | 10 ++ Orchid/Code/Comp2/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp2/Instance.c | 95 +++++++++++++++ .../Comp2/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp2/Instrc_r1.txt | 1 + Orchid/Code/Comp2/Instrc_r2.txt | 1 + Orchid/Code/Comp2/Instrc_r3.txt | 1 + Orchid/Code/Comp2/Instrc_s.txt | 1 + Orchid/Code/Comp2/start.sh | 10 ++ Orchid/Code/Comp3/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp3/Instance.c | 95 +++++++++++++++ .../Comp3/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp3/Instrc_r1.txt | 1 + Orchid/Code/Comp3/Instrc_r2.txt | 1 + Orchid/Code/Comp3/Instrc_r3.txt | 1 + Orchid/Code/Comp3/Instrc_s.txt | 1 + Orchid/Code/Comp3/start.sh | 10 ++ Orchid/Code/Comp4/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp4/Instance.c | 95 +++++++++++++++ .../Comp4/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp4/Instrc_r1.txt | 1 + Orchid/Code/Comp4/Instrc_r2.txt | 1 + Orchid/Code/Comp4/Instrc_r3.txt | 1 + Orchid/Code/Comp4/Instrc_s.txt | 1 + Orchid/Code/Comp4/start.sh | 10 ++ Orchid/Code/Comp5/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp5/Instance.c | 95 +++++++++++++++ .../Comp5/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp5/Instrc_r1.txt | 1 + Orchid/Code/Comp5/Instrc_r2.txt | 1 + Orchid/Code/Comp5/Instrc_r3.txt | 1 + Orchid/Code/Comp5/Instrc_s.txt | 1 + Orchid/Code/Comp5/start.sh | 10 ++ Orchid/Code/Comp6/Instance | Bin 0 -> 33909 bytes Orchid/Code/Comp6/Instance.c | 95 +++++++++++++++ .../Comp6/Instance.dSYM/Contents/Info.plist | 20 +++ .../Contents/Resources/DWARF/Instance | Bin 0 -> 12275 bytes Orchid/Code/Comp6/Instrc_r1.txt | 1 + Orchid/Code/Comp6/Instrc_r2.txt | 1 + Orchid/Code/Comp6/Instrc_r3.txt | 1 + Orchid/Code/Comp6/Instrc_s.txt | 1 + Orchid/Code/Comp6/start.sh | 10 ++ Orchid/Code/Instrc_s.txt | 0 Orchid/Code/Public/Compiler.py | 36 ++++++ Orchid/Code/Public/Dig1.py | 115 ++++++++++++++++++ Orchid/Code/Public/Lib1.py | 41 +++++++ Orchid/Code/Public/Sample.py | 12 ++ .../Public/__pycache__/Lib1.cpython-310.pyc | Bin 0 -> 1189 bytes .../Public/__pycache__/Lib1.cpython-311.pyc | Bin 0 -> 1822 bytes .../Public/__pycache__/Paths.cpython-310.pyc | Bin 0 -> 357 bytes .../Public/__pycache__/Paths.cpython-311.pyc | Bin 0 -> 527 bytes Orchid/Code/Public/lib.c | 72 +++++++++++ Orchid/Code/__pycache__/Lib1.cpython-311.pyc | Bin 0 -> 2323 bytes Orchid/Code/__pycache__/Paths.cpython-311.pyc | Bin 0 -> 631 bytes Orchid/compile.py | 39 ++++++ Orchid/int.sh | 21 ++++ Orchid/start.sh | 2 + 69 files changed, 1112 insertions(+) create mode 100644 Orchid/Code/Comp1/Instance create mode 100644 Orchid/Code/Comp1/Instance.c create mode 100644 Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp1/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp1/Instrc_r1.txt create mode 100644 Orchid/Code/Comp1/Instrc_r2.txt create mode 100644 Orchid/Code/Comp1/Instrc_r3.txt create mode 100644 Orchid/Code/Comp1/Instrc_s.txt create mode 100644 Orchid/Code/Comp1/start.sh create mode 100644 Orchid/Code/Comp2/Instance create mode 100644 Orchid/Code/Comp2/Instance.c create mode 100644 Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp2/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp2/Instrc_r1.txt create mode 100644 Orchid/Code/Comp2/Instrc_r2.txt create mode 100644 Orchid/Code/Comp2/Instrc_r3.txt create mode 100644 Orchid/Code/Comp2/Instrc_s.txt create mode 100644 Orchid/Code/Comp2/start.sh create mode 100644 Orchid/Code/Comp3/Instance create mode 100644 Orchid/Code/Comp3/Instance.c create mode 100644 Orchid/Code/Comp3/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp3/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp3/Instrc_r1.txt create mode 100644 Orchid/Code/Comp3/Instrc_r2.txt create mode 100644 Orchid/Code/Comp3/Instrc_r3.txt create mode 100644 Orchid/Code/Comp3/Instrc_s.txt create mode 100644 Orchid/Code/Comp3/start.sh create mode 100644 Orchid/Code/Comp4/Instance create mode 100644 Orchid/Code/Comp4/Instance.c create mode 100644 Orchid/Code/Comp4/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp4/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp4/Instrc_r1.txt create mode 100644 Orchid/Code/Comp4/Instrc_r2.txt create mode 100644 Orchid/Code/Comp4/Instrc_r3.txt create mode 100644 Orchid/Code/Comp4/Instrc_s.txt create mode 100644 Orchid/Code/Comp4/start.sh create mode 100644 Orchid/Code/Comp5/Instance create mode 100644 Orchid/Code/Comp5/Instance.c create mode 100644 Orchid/Code/Comp5/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp5/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp5/Instrc_r1.txt create mode 100644 Orchid/Code/Comp5/Instrc_r2.txt create mode 100644 Orchid/Code/Comp5/Instrc_r3.txt create mode 100644 Orchid/Code/Comp5/Instrc_s.txt create mode 100644 Orchid/Code/Comp5/start.sh create mode 100644 Orchid/Code/Comp6/Instance create mode 100644 Orchid/Code/Comp6/Instance.c create mode 100644 Orchid/Code/Comp6/Instance.dSYM/Contents/Info.plist create mode 100644 Orchid/Code/Comp6/Instance.dSYM/Contents/Resources/DWARF/Instance create mode 100644 Orchid/Code/Comp6/Instrc_r1.txt create mode 100644 Orchid/Code/Comp6/Instrc_r2.txt create mode 100644 Orchid/Code/Comp6/Instrc_r3.txt create mode 100644 Orchid/Code/Comp6/Instrc_s.txt create mode 100644 Orchid/Code/Comp6/start.sh create mode 100644 Orchid/Code/Instrc_s.txt create mode 100644 Orchid/Code/Public/Compiler.py create mode 100644 Orchid/Code/Public/Dig1.py create mode 100644 Orchid/Code/Public/Lib1.py create mode 100644 Orchid/Code/Public/Sample.py create mode 100644 Orchid/Code/Public/__pycache__/Lib1.cpython-310.pyc create mode 100644 Orchid/Code/Public/__pycache__/Lib1.cpython-311.pyc create mode 100644 Orchid/Code/Public/__pycache__/Paths.cpython-310.pyc create mode 100644 Orchid/Code/Public/__pycache__/Paths.cpython-311.pyc create mode 100644 Orchid/Code/Public/lib.c create mode 100644 Orchid/Code/__pycache__/Lib1.cpython-311.pyc create mode 100644 Orchid/Code/__pycache__/Paths.cpython-311.pyc create mode 100644 Orchid/compile.py create mode 100644 Orchid/int.sh create mode 100644 Orchid/start.sh diff --git a/Orchid/Code/Comp1/Instance b/Orchid/Code/Comp1/Instance new file mode 100644 index 0000000000000000000000000000000000000000..40d864a5a138db6117b4f259bb8dbf0d1a44fe77 GIT binary patch literal 33909 zcmeI5Yitx%6oBvSwpeN@i!D%6ZC7Xo33j$GX$iz#=mHIoma>f%5~kbTX?L^TM|ZcS z1;i}`MII)NkdT-l{7`ID69Fas5o$07OpFi%8jMYg(X=rQDz5^8dd{7hc6LQE(ZoOJ zG-vKP=iWJU?{{bW@7($N-pIo=#smgp0G$SEPGW2qGlRw0EYOvpl2mP5Vc%e{slsTy z@SEd9fATQTZWt&@4tt#=zMJ1~jgK+aPlhlmOo@vmMdkLW>Ohm2Z^2?^F{8K`5cE}3 z2_&(YVklQhibPu*BIBXNe0eV^`H%q$`ucn+YCd4dMUq^RXxJNQ8u#PZ+pOkWrS_w* z7kzGwOHylKvp3+Dyn)6b_v7=OPM9D1i8=K7aUTxxJQX&FOgF*d#DeHJNzNR#&cFWv{5z-jP_syue3kRbL34 z4}X7nl(7=VVmLqCWn5>m>K_6h=YnjqKre!i@49IR*w8)+S`CUaSydd1as52Ojgx^+ z#RBg3m1j#XjYIm>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&IhyW2F z0z`la5CI}U1c(3;AOimrfw6PKrQtaS|EOf_zWs7i_sy#0?gv{ZbwAiCbS=EFyJlh1 zk?=qkGv%6%mosLuYHSCM89k>MJ8;v;dZ18|_hIZf#BM>%nl&-57h<;|W>&}9vX}*P zybtjk5Fc23X^@YWadCWSD5L8!bP;(bCZRZSgLBT z5n7IW<>1UZZ!5WV&*bsX zZpG(bl90Px&0PYm#;Fi&HqSH83CHlgf&DmoBR(J0n#OU+M<2MGq1Ez1{pkT#KEWNw z@O-eRoxjEBn~wMExI(=z&j+=!-Ve`QW|4d|SrGWyE;Hm_ z;r1k*ovO3bb@o#_dxm0H2B0+DC4~zMqENyfW}08bea$P@dlBwzW|hmAfIiD?Y&~1U zDwO)*r`7)h`W9<_u@)HifNQ>5UyeT35T`*6ut}{henMbs6}2g*l=7NlO0BRd#_Nrl zDW(iC!Ox3JOljy!1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&I zhyW2F0z`la5CI}U1c(3;AOb{y2oM1xKm>>Y5g-CYfCvx)B0vO)01+SpM1Tko0U|&I zhyW2F0z`la{MQ7`kgyum1B%}|*MHVqJs<$0%D2S1q1jd#ZPg;meF7XHAi&4Z1vr#I zfRB|6@DXwW&MRP&Ga77UQe%@GjX)C&$pL6Wt>`tm+M-Ot!x8);EuA2-$^0+^gXH%} za=YwmjmnZocDm&-OZGdx0hVuMz3u9F&A_?4bqlbgujPccEy3>uzY$h^!nuJD!&?jB zf@dh8{W)l!&c|3D=%{i~0w1$Bps2u25_;9%WSynef<8q z-nS(93ln@elOt|Ce!m{S1wRE8zezt86le2SaWj)1!CT_I|M3=zwGlZS5eqGrB1>7Z zSRqGz(O^id3cEaBx7ig8b(o99WkI(L7k{Wwp)T9NRS-^W&_8jME>?_)p`YOCanB}lW%P6_l@ki zIQNXZe9__K7tQYuCv7@hw`W7|I7wq@7V zPxr2TbHTC4^_%xz_-a~x&aq$n=C_{w{^&0oZ=U_6ulKU$j5Ry>);B*s+%C`FWAD%O z4h`LP++Q(o&HkTXZ#&+9=e-|(y0I@~-8& +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp1/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp1/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..1390a5ad0c316a9e3ec93128ad43b9e433c28dee GIT binary patch literal 12275 zcmeHNeQZ1*5AvAv_e7eZdqeC2_8 zBKes@Lq!?v*fuy@$?aQbW4a`Pp;{yWMaigpGrD%JzvV4jQf|>8L@}`BXi~?CDoQ#t z7EEWM{QlLg)%;No^kVeq5dM%!UKAyi&ZMI8p{zW6yfNW#lhEfAqi@nF%2<3)G#*x> z@koNpv;Cd>kpAWSr~7b<`)O|*Y*W_v-anw-jaD(4KnoQcK&o`FFg4Jxp@iW!KrZah zkG6Utd%e(9HB48-JnQMYe^W<$mp(@(MZYL06+v;Ed7=LB`6FZ+-!KB9KU>@SHwYBu zM4lh7rn+9P(P9wlA3aM{6eX+%$A*+xG_GoLVSh7va4)rb|C05W2=PYw{hN7I>tCsu z05eP8-xq0ge}PmWKBT7Sj8}SG^QY%us+*rbG0o=qTPggNiJP`^p8f*CU`pLR_kOH9 zt@ZCyB7f^XJ-`0p;o=SR^QSy1{E7T2pZPFixUu`{41KS~CM? z2FwhY8891GLR8w`f0xXbV`)WybX1zqF$r9ahx6YG^E@D#L0ZtfrVU z8i>X}*^Zjg%nXm z++{@Q?*Ih&dZNKpAhpleuI^T2iKLqHtxt@O2IAo!oMsLt60x*zpnX%?_xV7mcVJsX zIy~YVOQ(F%cqld&R@uk2_XSd;AKOQIA5P`E;^|Bv9#R|lkySbqjwTw0X^1$q&++_- z3^@KIqUb!1a?vCf4QlNfE3xW-8L5#xrPex+;{~bOv0Cz=N;an>BbD5+AGF)t2kqVZ zwUqOQ>*4E?=f*42!oyODy<3v()6-IkZF<7-=5?v;hW)%P)D4C0PMF!Yp9k%>!-8wJ za7`0wdd}OLG)>NzeHu|`c`uAuUAWKsoT(R#h4tyI{?$Vf`?jSICwhfTbJlRP&KeCj z&oOKj2F)V2g@tcb5<69t8)HZn}uCV&R6S{;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LYiPsTSaT7B_*@gX zSOPbfF8XM;fobdSZ+k!)=-S?)3_j4;p(renNkmvUF&4zYhC;hDtaG5P6SJ6a5QysE z{%RN=ACw0tPLI>}jPIC0X`@BOXiIXw?QImj4SktS6%Pt8SQ8M_jx|BTKPNaX7THjt z_!@WnHWmWD)gzg{Z6!+Iw$kM8`}sTX{a}B4W@-JdV=HebZ~7;voPWBuT^_iW{O4;| z4(tzkPmX(ctbTV#`sk(aymWZ{neYAf-B)4v2I@Pg^q#6iy$`h?HHtck`c2dyqSA7B zNl*~JNaK9ET^fo);_D*8v|IvS{M^m26HMzQ!L)SNG4{mPI@HSAAt#D|4w*Fq8Nm}{|ruQ1)t|K*I7^7DK!SouzBfqif%2tBuZAmb_Kmm83y*WTI zy=MugB@<4z{`sND2&OfbU|LxLSDkqwOfW6a1k-8__~N0??-EQeWP<4pjeb879pO&s T6-6*D@Z@CIi})~ke$(QAaJ^}A literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp1/Instrc_r1.txt b/Orchid/Code/Comp1/Instrc_r1.txt new file mode 100644 index 0000000..74e0f12 --- /dev/null +++ b/Orchid/Code/Comp1/Instrc_r1.txt @@ -0,0 +1 @@ +! \ No newline at end of file diff --git a/Orchid/Code/Comp1/Instrc_r2.txt b/Orchid/Code/Comp1/Instrc_r2.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/Orchid/Code/Comp1/Instrc_r2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Orchid/Code/Comp1/Instrc_r3.txt b/Orchid/Code/Comp1/Instrc_r3.txt new file mode 100644 index 0000000..beed0e6 --- /dev/null +++ b/Orchid/Code/Comp1/Instrc_r3.txt @@ -0,0 +1 @@ +IF= \ No newline at end of file diff --git a/Orchid/Code/Comp1/Instrc_s.txt b/Orchid/Code/Comp1/Instrc_s.txt new file mode 100644 index 0000000..c137216 --- /dev/null +++ b/Orchid/Code/Comp1/Instrc_s.txt @@ -0,0 +1 @@ +F \ No newline at end of file diff --git a/Orchid/Code/Comp1/start.sh b/Orchid/Code/Comp1/start.sh new file mode 100644 index 0000000..85e78d8 --- /dev/null +++ b/Orchid/Code/Comp1/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd Comp1 +gcc -Ofast -g Instance.c -o Instance + + +while true +do +./Instance +#python3 Instance.py +done \ No newline at end of file diff --git a/Orchid/Code/Comp2/Instance b/Orchid/Code/Comp2/Instance new file mode 100644 index 0000000000000000000000000000000000000000..b3353ef0f08fe50d3ada9f78f5f3d1c2204e21d6 GIT binary patch literal 33909 zcmeI5Z%k8H6u{4GfgwXI0~Nyto&V{nH2?Pz53XR9P-BTvfcTxT1`rks@x6 z4E@QYJiBqAEIW#;9g*GQetTpLR6iEOq&OuZvK(@^g;WQd=zNQxQx-Eui$Nh@HI+aN zgcU=%%5pH&vMD$biq1Fpc_kk)AR%9$FJ8@u428(DGZ+eZymb?PtRn@ox5bU9!hp>l1!tzSB|jBR@KaK0oclQIV&p&`~I_C|g^p?1o)^39uCs)fzEK zN_%BOmE}60ZX3{la6T)J6=GNJS3QVBgH)5r_w0p|wQGutO0;(*95pZWNm|qwg61RM z9}xw}1qjppXqRc7IjVmYeVPlgNkhGaKE3Ov9cW|wC~7$>$rM#-EXDQnL^nbPIsml2 z*LNhLV@9PuOG_|dY4mKexY`?C=#!+Q(mWhhO;xvk&)#rgF#TNS-Ks-2jG0lDHPJ6~ zs<4SYNV&#E*ogI!kFpTgM|tQy*9$#&2`cp|@52K88A+3K!TD6S2Se_rtmRoaFV80B z?)lhI{tID%cx<0ied0y(1S<6pAh#pRBq_|o1egF5U;<2l2`~XBzyz286JP>NfC(@G zCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@G zCcp%k025#WOn?dePXxx#NtcJ`7@EdpW7o}>V!B4lV!Q5bjqAGihSZsVad$<2%<;fL z8kjQ8#w#hapq$!4V@mg@0Eb77(2a$PqK{&|7`uTnd)nl<9*o_@m{}cHmJSa6V^Da~xa!bP&%GGnFYaDr-=O3lX; zRXa~=?n_ebWU0B(0FD8lmOHh37v>&Vulduv-yk3Rw__V`-Wo#_b|jy&X2~3eE42azAfY9GqK+FLzBUN8w{COg&n7} z6LfZx&VEd1&rs|VFP4ToNfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO z1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO z1em~oO~8x^%Teo5>09Ue&w8r|1YlJ8mbfr9+m55{T12@|!UF^({P?+qhZ0Emv2qDN zLN4KX1t8aie6=9g*11DLYqE za?ADZ8kai&u}w7|FU&JSPn$YkGidHE-2#fq*K%Up8s&GOUyCd5tyw3A(XCl{p)(Z7 zK94$A=TmGh>X>p+f*7+ls$c(n8a7SBQzKC5-WjOVbmQsl26U-Q$ZWjoefs{o-nT~i z`B6Te$q_N0zF$w@f}e^?-=v?0O0)T^xEbUJ@RkMdf4qg3s-Qa%v}9YYHtUicOOZR+ z5c2sgWdUcs$7Oc<{Ox9&Wrfe>#!HjmW)UZ0)OellEGJl6YXX*9Un6dF&=ShC)NOWc zY0jH zG&RPl7{hImI=~PEV8B0s8q{i352Nt+22ynkxfw*H3edoL|G z<0@EstoM@no#B`b$EtVkKiRs}clLwVdp@f6eKB0y7xV4q%MFII>e%sZA8*^T^SjUX zt=_Zv`)|Gb!%rjoQ(k=g`or@7+y2V<`LC2-Ng5taEt%bYaObuBw~}8S Qsi}QB +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp2/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp2/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..39655eaa6168b7783ab895b37b3e6b35f2c2efb6 GIT binary patch literal 12275 zcmeHNeQZpoA!a!eMoGY)@>bHLF)R~D$rnsF6!9t+;^Y- z;<#WzjDe&un?DQQ+K=k%uyFU=cV|7$e>TdIxANYA33y_O)&7*xu3K3n8cIzH-1E zk^D@dp{fpcY#W@dORW+3! z3#2koZvX1m>i#GPMlt)d3xCKYFRB_$rIV4^P)43T-l*`mN$7Kl**ED_bu6|g5(}x3 zSUAq*+5XObNdI#E(|tI_{j|3YwyEoT?;p_bMyr@ip!tdwAXU0om>THUP~3DIAm{hz zLtCSey-{eYnx?C1p7nIyzp10W%a|jRqF)r0ilDg7yikAm{1GyZZy15lpRH~E8w3h+ zBFB$MS6wgHX)y@(kDetesv6P)V?$~*64P`!zrPtHxQAN3f64fZ2YI91{>?n9_pek; zfSD!l?~62sKY!968`4s9#w$Or`!n({*UitLm}YbQtrY&s#7$c{Pk;VEAgS%1dq38l z*8BG5asK(Xo)mKBm3bpB(+zK2rN|D%TZDrTwv>*1(UfQt416-Y`r<#G!qb z=SO6~@h1`0;Bl0TCecVhZ_ikX#rVrejqEP9)Vb|1$kq1MvKv*lI_zn=o%^XoHtz$UzgoCUXd3bmP>5ivTU24mP@SD6ZSW+%Vjrg=dHnRD6DtF%)0$NXtxa( zT(gC1nn=@g-rA&Vvc7E7h&s!Ae#GL$eKzJyyOE zPu@jKB6iU;kDwNIqSGf1kOu`NY*O%NP1x@RZzO=)nOt*L5q_(({#%=cT}#$i>y+S+ zny|kJ{*npH^}if|uC{ZPF~yBO<+d-u;e8PY?R*+J8GR148g-XwIu2^~l6h*#r8N3H z)ROHtc)IYPu@|%ADzHD{Vlf4=9AESbNo6zmcn4DTFGz9;sp8ipl?%!FN0JnhWIEh` zokaT|5J7$x>}3*5xcGOlZ;@EaMM~>c5*=LZhWKw1EB{Kao`d)viEa{YGDNA0*y5+* zdRlxZWS9CaM=%jKOHF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/Code/Comp2/Instrc_r1.txt new file mode 100644 index 0000000..f89d5ed --- /dev/null +++ b/Orchid/Code/Comp2/Instrc_r1.txt @@ -0,0 +1 @@ +wC \ No newline at end of file diff --git a/Orchid/Code/Comp2/Instrc_r2.txt b/Orchid/Code/Comp2/Instrc_r2.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/Orchid/Code/Comp2/Instrc_r2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Orchid/Code/Comp2/Instrc_r3.txt b/Orchid/Code/Comp2/Instrc_r3.txt new file mode 100644 index 0000000..beed0e6 --- /dev/null +++ b/Orchid/Code/Comp2/Instrc_r3.txt @@ -0,0 +1 @@ +IF= \ No newline at end of file diff --git a/Orchid/Code/Comp2/Instrc_s.txt b/Orchid/Code/Comp2/Instrc_s.txt new file mode 100644 index 0000000..c137216 --- /dev/null +++ b/Orchid/Code/Comp2/Instrc_s.txt @@ -0,0 +1 @@ +F \ No newline at end of file diff --git a/Orchid/Code/Comp2/start.sh b/Orchid/Code/Comp2/start.sh new file mode 100644 index 0000000..14f3f53 --- /dev/null +++ b/Orchid/Code/Comp2/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd Comp2 +gcc -Ofast -g Instance.c -o Instance + + +while true +do +./Instance +#python3 Instance.py +done \ No newline at end of file diff --git a/Orchid/Code/Comp3/Instance b/Orchid/Code/Comp3/Instance new file mode 100644 index 0000000000000000000000000000000000000000..70d01ad0c59811d9b5c8830cad9bd5d2b9edd4e1 GIT binary patch literal 33909 zcmeI5Yitx%6vyxEwpdDmMcx7F%0rM~XZt`Xk+6l9N07F*Tdj~Vl+fp9F z7J?!VlVV9oOb|XOwyBAL8omfMsDTfL5(7kyO^eaAF(fLl0)hHJcV_79iejRPU(RXH z+;h&obLQUPo$a@C=fd4<4^o6s1jGg%1$8C}u}e5%2{9469I9!BIm_}^=M@!DG*;xz zv7tYClxH^vYMLjn)Dzn+?{~+>gyAP5Oo}N<(X@!KF=9Aq;`7a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2`~XBzyz286JP>NfC(@G zCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5U;<2l2`~XBzyz286JP>NfC(@G zCcp&#YXVLrEQD4;>09U4&w3jN1R$z^OI#YJ?Z#-g8PV@kaDae5GKX1Z#Z(G`02QRhBnIghq!W)YO{k6ip13hY{GcnkvoL=qs;} z__Qitnb#K*i8W>ZfS6$y?TyBG)1bL~Eepsa-^_`&A0G3 ze*v9t@hLVP+OHp!Ajjm#^;@4$!$vANH3CBSj)RW0jHk03;8K^AskmBw`u@7rcg6Yh z;(VOR5i_2?Ur*nH9}cB&(vO7FZ2l_l6xt(rYm)ar-a@q`>-A=2HH7C^SA{dOE1%DDK`Luik4ooe(7n&i%SzAodeeeJpDh*%x!aY}0U`%s znvBOFhHX)rge^e`8~%hSgO)-`a3si%Zl_IR(<6U-b(_74ITMln!O1tac2!^7(>e3B zH+#Y1Ylu=G5+4( zJDz*XX06))^Xm=AyKcYt!%x@ujehB!YmdwSZ~Gg+>|efU`{~fID;IK`XSQ5!znYxC R_S@nE*`2G@$p>Ce`2!jes-XY? literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp3/Instance.c b/Orchid/Code/Comp3/Instance.c new file mode 100644 index 0000000..f8d6d0d --- /dev/null +++ b/Orchid/Code/Comp3/Instance.c @@ -0,0 +1,95 @@ +#include +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp3/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp3/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp3/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp3/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp3/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..37760bfd608af2fe569ac7a900418ee5d83adf11 GIT binary patch liter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--- /dev/null +++ b/Orchid/Code/Comp3/Instrc_r1.txt @@ -0,0 +1 @@ +qwL \ No newline at end of file diff --git a/Orchid/Code/Comp3/Instrc_r2.txt b/Orchid/Code/Comp3/Instrc_r2.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/Orchid/Code/Comp3/Instrc_r2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Orchid/Code/Comp3/Instrc_r3.txt b/Orchid/Code/Comp3/Instrc_r3.txt new file mode 100644 index 0000000..beed0e6 --- /dev/null +++ b/Orchid/Code/Comp3/Instrc_r3.txt @@ -0,0 +1 @@ +IF= \ No newline at end of file diff --git a/Orchid/Code/Comp3/Instrc_s.txt b/Orchid/Code/Comp3/Instrc_s.txt new file mode 100644 index 0000000..c137216 --- /dev/null +++ b/Orchid/Code/Comp3/Instrc_s.txt @@ -0,0 +1 @@ +F \ No newline at end of file diff --git a/Orchid/Code/Comp3/start.sh b/Orchid/Code/Comp3/start.sh new file mode 100644 index 0000000..d21976e --- /dev/null +++ b/Orchid/Code/Comp3/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd Comp3 +gcc -Ofast -g Instance.c -o Instance + + +while true +do +./Instance +#python3 Instance.py +done \ No newline at end of file diff --git a/Orchid/Code/Comp4/Instance b/Orchid/Code/Comp4/Instance new file mode 100644 index 0000000000000000000000000000000000000000..f7b37093af2a61f83944e7e5463e769f4b9974d1 GIT binary patch literal 33909 zcmeI5Yiv|S6oBXMwpeN@i!G(3NSBu&!R~gu2qhACp#>U**0Plf3Bz_D?WWyF_fc9v z+?Jq~he=~eNQ?+S6x-AUL=As{8VrFSM2G>S#-`P1+7N=ut3aThGxy&1?uuffiGR*% z&Yg44%sqGJo4fsY=6-eW+QSUSBnF}bodjx3VQd#Og2mWW&{d$ESJ+pUZYZrR$7rI6 zn-fES@-R<34CLHVTJ1>e7Wdl{V@&Z=A&d%B62f`Z(;QVCXp-|SctKvwFfIlJeZ`am zDJ(7<@|E*QG*%NC4J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l*LGi= zd&*tB zdse-*;K<|pjeE{tn6!ENkzae~$Buu0`0B=+r$6iMxokdV%L~5!^-m9XcxLV{?aTHJ z4&HU#Upa5hzF*#GI@WjRgCBmru{Z1GcdtDz|G({jW!m+&_ss3y^~aaA +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp4/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp4/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp4/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp4/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp4/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..988534ebc2fe3bb58fe783e0d5ec590ac5273a90 GIT binary patch literal 12275 zcmeHNeQZpoA!a!eMoGY)@>bHLF)R~D$rnsF6!9t+;^Y- z;<#WzjDe&un?DQQ+K=k%uyFU=cV|7$e>TdIxANYA33y_O)&7*xu3K3n8cIzH-1E zk^D@dp{fpcY#W@dORW+3! z3#2koZvX1m>i#GPMlt)d3xCKYFRB_$rIV4^P)43T-l*`mN$7Kl**ED_bu6|g5(}x3 zSUAq*+5XObNdI#E(|tI_{j|3YwyEoT?;p_bMyr@ip!tdwAXU0om>THUP~3DIAm{hz zLtCSey-{eYnx?C1p7nIyzp10W%a|jRqF)r0ilDg7yikAm{1GyZZy15lpRH~E8w3h+ zBFB$MS6wgHX)y@(kDetesv6P)V?$~*64P`!zrPtHxQAN3f64fZ2YI91{>?n9_pek; zfSD!l?~62sKY!968`4s9#w$Or`!n({*UitLm}YbQtrY&s#7$c{Pk;VEAgS%1dq38l z*8BG5asK(Xo)mKBm3bpB(+zK2rN|D%TZDrTwv>*1(UfQt416-Y`r<#G!qb z=SO6~@h1`0;Bl0TCecVhZ_ikX#rVrejqEP9)Vb|1$kq1MvK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}cnTzmvq)4~7h^Qrz_j)Ew>_W^bZzfY2OsF`P*vtn$HOcX9}8e$L&4o?);ZADiCN4y2t}8w&y7>XA&}wi2apTWNCl{rsKxez3niy|jMUv6Z(IH+_>+jz3-7t_)mD{PVRd z2lfX&C&xWIR=>L=b@bAAUOGJf%=do#?yInS1N9wLdQa7%-iO+c8bO^z{U+)UQE556 zBq#`9q;WpoE)PW@@pX}4S}p-Ee(vVi38rA*KWh=q-wj`Kdpn$v2-W(v9 z-m?VLk_jhU|NPKn1k)NzFs-bBtIoU-BAAwEf@!q|eDP4{cL}B!GQsqQM!%nkjBqFP TiXxa6cyhAqMSPe%ziIJ5e0yni literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp4/Instrc_r1.txt b/Orchid/Code/Comp4/Instrc_r1.txt new file mode 100644 index 0000000..544584b --- /dev/null +++ b/Orchid/Code/Comp4/Instrc_r1.txt @@ -0,0 +1 @@ +qqw. \ No newline at end of file diff --git a/Orchid/Code/Comp4/Instrc_r2.txt b/Orchid/Code/Comp4/Instrc_r2.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/Orchid/Code/Comp4/Instrc_r2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Orchid/Code/Comp4/Instrc_r3.txt b/Orchid/Code/Comp4/Instrc_r3.txt new file mode 100644 index 0000000..beed0e6 --- /dev/null +++ b/Orchid/Code/Comp4/Instrc_r3.txt @@ -0,0 +1 @@ +IF= \ No newline at end of file diff --git a/Orchid/Code/Comp4/Instrc_s.txt b/Orchid/Code/Comp4/Instrc_s.txt new file mode 100644 index 0000000..c137216 --- /dev/null +++ b/Orchid/Code/Comp4/Instrc_s.txt @@ -0,0 +1 @@ +F \ No newline at end of file diff --git a/Orchid/Code/Comp4/start.sh b/Orchid/Code/Comp4/start.sh new file mode 100644 index 0000000..ca79ead --- /dev/null +++ b/Orchid/Code/Comp4/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd Comp4 +gcc -Ofast -g Instance.c -o Instance + + +while true +do +./Instance +#python3 Instance.py +done \ No newline at end of file diff --git a/Orchid/Code/Comp5/Instance b/Orchid/Code/Comp5/Instance new file mode 100644 index 0000000000000000000000000000000000000000..4b6c2d53ed2912181e499bc09ebab35f8bbe8416 GIT binary patch literal 33909 zcmeI5Yitx%6vyxEwpg$&i{(*Lr7I6Xg55rWqQotlFa|ytX$+WPtVN?~V@On91p@Vd?##5aD~gFGemSQ( zbI&>V&Y63EcedZoov-d(y`LzAA|Mv%7^po?i0#4-ONfckB~Vo@Em&N%s;I1lqR}F6 zjt>3FqdYq?P*q(;<*w*%dA~C{CUid@VNy&!ucn z6A{hOuBsXeH?9v2g<|tfeO}8)3`oc~=S$G@fuR&ttqg^OUVrtFAHCi>J>OEjpM0~J zb5mSZ8~q!+ez)rNR|TXWo$pl4{K${ZVa`wca6slMEN~U53rm)-(00SAzXWKd#I#lf zNolWaP*trCn6?4_gY#u#tQ4nqzwU_Z2hxk5x}ezeQ9&K%u80H5YUY*L{Y;M2Qq+X@@)qtH?)$w*ykEXB?9gc~KjtwI=k zZ|+EjV~0|oqcIe8)OpuC+|6}v_#|minulwpZ{@Auv)1mtl6E%z?#ef_5wkNfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO1egF5U;<2l2`~XB zzyz286JP>NfC>Ch1P0G4-ThN6z5&(Re)FZc_Uk3_?e{j1Xur2jX`6F?XW5*%!@=HE zVN17LFQ!ZsrPN-rrgVHP#J=lR(Sbrm*+;Qsh}}TUnL0eK6S13!+4XS+sUnkdyodNT z#CsQuwpI}-`@uTC;~-*vDFvtcM-k#R~!Dgj&0M|tP0x))P?Q+Qx^EZu&v9gUNS$gmhzjPhuUHJyeo*+lZ~?0 za|w~MzBJKntWmi==t5oU*qx)I;{^kQQEPF<-H6UT zKPGp+o;w$6v_?MEpY9X+!`x|%%!fT~ z{Vh7*IJ)1&74^O{A8KQV@}bsupGX*j1 z{r`ZurCMLA1;!poou=29lTS6oiKqd#>D9%LC_=BIwnem3URy+~6}ClWy|J)Gv;j8! zyre|5hObP32`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO z1egF5U;<2l2`~XBzyz286JP>NfC(@GCcp%k025#WOn?b60Vco%m;e)C0!)AjFaajO z1em~oO~8(XrO+BEee2x(S#SM-07SKKiA%$$z}s1@Nrl~AjyJ>d|VK)uJ0roNH9>dL0DQ0Z_4U%in|QN>7k7=cCg)u^70p326s zN3HQxxIIA;@2l|o#Wbtv+^CN?44S*!w16V=jhtwkV*FP4Rao)yidAwL-I{?5ouNSX z=g_GppJG#?1KL3ea?J9We)IEb*k}c(MnLG^@zBwx@pN_rT=X%&_@AuRY4q5@hDCBcy(TYK#miA{_A?bT`YD#lDi{`)6(Z0V`Jy6eL9 z)9(Cv2ajE_AL@@=d$4@_o}*3k0%tyWwexs+;EVpMuDEZyyK5~a{qm=~ zm%Kjf=)?N$yU%|)X5FNtzjn=RJn`+3Ushi~^HEpl#mv*rw7?r*|9HQ}GkI50&sc9? z-)-03#WR-e{rR<~V?DRt{qCo0ds1F}=jy}q|J(i~k9TiN-QknHZ>`Qy?jLD+`}@n5 R;*_LMx@*=v>tA!|+#jM9s)hgn literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp5/Instance.c b/Orchid/Code/Comp5/Instance.c new file mode 100644 index 0000000..f8d6d0d --- /dev/null +++ b/Orchid/Code/Comp5/Instance.c @@ -0,0 +1,95 @@ +#include +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp5/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp5/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp5/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp5/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp5/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..d8440b1526e9c64cf60d17e3f8f98ba124d80c03 GIT binary patch literal 12275 zcmeHNeQZpoA!a!eMoGY)@>bHLF)R~D$rnsF6!9t+;^Y- z;<#WzjDe&un?DQQ+K=k%uyFU=cV|7$e>TdIxANYA33y_O)&7*xu3K3n8cIzH-1E zk^D@dp{fpcY#W@dORW+3! z3#2koZvX1m>i#GPMlt)d3xCKYFRB_$rIV4^P)43T-l*`mN$7Kl**ED_bu6|g5(}x3 zSUAq*+5XObNdI#E(|tI_{j|3YwyEoT?;p_bMyr@ip!tdwAXU0om>THUP~3DIAm{hz zLtCSey-{eYnx?C1p7nIyzp10W%a|jRqF)r0ilDg7yikAm{1GyZZy15lpRH~E8w3h+ zBFB$MS6wgHX)y@(kDetesv6P)V?$~*64P`!zrPtHxQAN3f64fZ2YI91{>?n9_pek; zfSD!l?~62sKY!968`4s9#w$Or`!n({*UitLm}YbQtrY&s#7$c{Pk;VEAgS%1dq38l z*8BG5asK(Xo)mKBm3bpB(+zK2rN|D%TZDrTwv>*1(UfQt416-Y`r<#G!qb z=SO6~@h1`0;Bl0TCecVhZ_ikX#rVrejqEP9)Vb|1$kq1MvKv*lI_zn=o%^XoHtz$UzgoCUXd3bmP>5ivTU24mP@SD6ZSW+%Vjrg=dHnRD6DtF%)0$NXtxa( zT(gC1nn=@g-rA&Vvc7E7h&s!Ae#GL$eKzJyyOE zPu@jKB6iU;kDwNIqSGf1kOu`NY*O%NP1x@RZzO=)nOt*L5q_(({#%=cT}#$i>y+S+ zny|kJ{*npH^}if|uC{ZPF~yBO<+d-u;e8PY?R*+J8GR148g-XwIu2^~l6h*#r8N3H z)ROHtc)IYPu@|%ADzHD{Vlf4=9AESbNo6zmcn4DTFGz9;sp8ipl?%!FN0JnhWIEh` zokaT|5J7$x>}3*5xcGOlZ;@EaMM~>c5*=LZhWKw1EB{Kao`d)viEa{YGDNA0*y5+* zdRlxZWS9CaM=%jKOHFpE&vLv%SJxmZ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L@+JS1k-8__~N0??-EQeWP<4pjeb878R1Uo T6-6*D@Z@CIi})~ke$(QAfMscR literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp5/Instrc_r1.txt b/Orchid/Code/Comp5/Instrc_r1.txt new file mode 100644 index 0000000..5b4ee05 --- /dev/null +++ b/Orchid/Code/Comp5/Instrc_r1.txt @@ -0,0 +1 @@ +qqqwQ \ No newline at end of file diff --git a/Orchid/Code/Comp5/Instrc_r2.txt b/Orchid/Code/Comp5/Instrc_r2.txt new file mode 100644 index 0000000..56a6051 --- /dev/null +++ b/Orchid/Code/Comp5/Instrc_r2.txt @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/Orchid/Code/Comp5/Instrc_r3.txt b/Orchid/Code/Comp5/Instrc_r3.txt new file mode 100644 index 0000000..beed0e6 --- /dev/null +++ b/Orchid/Code/Comp5/Instrc_r3.txt @@ -0,0 +1 @@ +IF= \ No newline at end of file diff --git a/Orchid/Code/Comp5/Instrc_s.txt b/Orchid/Code/Comp5/Instrc_s.txt new file mode 100644 index 0000000..c137216 --- /dev/null +++ b/Orchid/Code/Comp5/Instrc_s.txt @@ -0,0 +1 @@ +F \ No newline at end of file diff --git a/Orchid/Code/Comp5/start.sh b/Orchid/Code/Comp5/start.sh new file mode 100644 index 0000000..c567002 --- /dev/null +++ b/Orchid/Code/Comp5/start.sh @@ -0,0 +1,10 @@ +#!/bin/bash +cd Comp5 +gcc -Ofast -g Instance.c -o Instance + + +while true +do +./Instance +#python3 Instance.py +done \ No newline at end of file diff --git a/Orchid/Code/Comp6/Instance b/Orchid/Code/Comp6/Instance new file mode 100644 index 0000000000000000000000000000000000000000..ba6e8319f258e4d0fecac3ead75322b11adf2168 GIT binary patch literal 33909 zcmeI5Yitx%6vyxEwpeOu7YhYar7I6Xg5B){+M>iQv_ONUwQOSr!?bj_4@-C3-EAop zaf?BaS5k$9#024kV4Ip)QNtIY24moZ5n{kZB55_6HiksyRUlCR=gv$!yP}wA;+J!p zGxwZx@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%tFjq*F-*I>oHRcquhx-}gaIzxf% zFQBtbKE-B1hqZ$eup|YiMnLG^6ljuZJe}PDm%60Pz}4*2_t(w7Gs@42 z@^L0d#CZCCJ$(y)0+hZP4&tA(SrD&VN`Z@@MO9iat|+Kryg z&DnLn1s+dkc55)Vp)Q!2SGzFV38`&zxE*wE2HpEiRbEDBPHwtiXtTv4A$P7M^nu6$ zm12u*tE#sUR_47V$4M3eQzxK^*Iez)bFKe%#{>qVtq1)xYnXAMbDV&e&CWWm5g% z;BEKa<#UVo{`_WZ@0DBcfB)09J;^V=d-Y-Y|84&(Q`(9rzrDAzd)~;#qe+3h%aw7? RlvhvY?hChD5}&mM{{V=VrvLx| literal 0 HcmV?d00001 diff --git a/Orchid/Code/Comp6/Instance.c b/Orchid/Code/Comp6/Instance.c new file mode 100644 index 0000000..f8d6d0d --- /dev/null +++ b/Orchid/Code/Comp6/Instance.c @@ -0,0 +1,95 @@ +#include +#include +#include +#include + +int main(int argc, char const *argv[]) +{ + FILE *A_fil = fopen("Instrc_r1.txt", "r"); + FILE *B_fil = fopen("Instrc_r2.txt", "r"); + FILE *Type_fil = fopen("Instrc_r3.txt", "r"); + FILE *O_fil = fopen("Instrc_s.txt", "w"); + + char A_char[5]; + char B_char[5]; + char Type_char[5]; + char O_char[5]; + + double A_Float; + double B_Float; + double O_Float; + + fgets(Type_char, 4, Type_fil); + + if (strcmp(Type_char, "IF=") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "T"); + } + else + { + strcpy(O_char, "F"); + } + } + if (strcmp(Type_char, "IF!") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + if (strcmp(A_char, B_char) == 0) + { + strcpy(O_char, "F"); + } + else + { + strcpy(O_char, "T"); + } + } + if (strcmp(Type_char, "A") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float + B_Float), 4, O_char); + } + if (strcmp(Type_char, "S") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float - B_Float), 4, O_char); + } + if (strcmp(Type_char, "M") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float * B_Float), 4, O_char); + } + if (strcmp(Type_char, "D") == 0) + { + fgets(A_char, 4, A_fil); + fgets(B_char, 4, B_fil); + + A_Float = atof(A_char); + B_Float = atof(B_char); + + gcvt((A_Float / B_Float), 4, O_char); + } + fprintf(O_fil, "%s",O_char); + + return 0; +} \ No newline at end of file diff --git a/Orchid/Code/Comp6/Instance.dSYM/Contents/Info.plist b/Orchid/Code/Comp6/Instance.dSYM/Contents/Info.plist new file mode 100644 index 0000000..1b60105 --- /dev/null +++ b/Orchid/Code/Comp6/Instance.dSYM/Contents/Info.plist @@ -0,0 +1,20 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.xcode.dsym.Instance + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + dSYM + CFBundleSignature + ???? + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/Orchid/Code/Comp6/Instance.dSYM/Contents/Resources/DWARF/Instance b/Orchid/Code/Comp6/Instance.dSYM/Contents/Resources/DWARF/Instance new file mode 100644 index 0000000000000000000000000000000000000000..58da723c840a2e71f019b2faa32e2eab055ca301 GIT binary patch literal 12275 zcmeHNeQZ^8{9NX9q zU(Fx`iqZ}SRm(={S}KigUDr-(wM~>poA!a!eMoGY)@>bHLF)R~D$rmJUDUDPx$i#v z#c|uLmHL-2+;`6ToqNu?_q_Y=yUu+V|MSj&os3Bgr4-eU`ehqQdRYWggF3i*bo2DT zR_r)-WzjDe&uo6YQQ+K=k%uyFU=cV|7$e>TdK+jhYA33y_O)&3*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6L!UG@LzQ*jo{y=HU|}DmBAmXRMvuj zhw#HS$~vR{!}SU+s4m=M>!eQ^1Yb`4BhAWo@QaCmv{mtgUq$@aI+Y>t4-tQ~PlS&i6QJa{hCM(JiO>?r5NSqB$u91aI#Wp{JLRSlxsVHUdK!r`D!;&zvzZI_#bW{4H^abM*E zsmpx_I_|!mTUWW!rUmi>2?``-3E;cYdLadJIM#q=tc|`7^8};#y3VspOQs_6m}f;( zgRjBospsgOE1GL0>)h;XMd zH4tWMG!RZj_CW~7<0BEG(Rd0ZiL*%T;5BUocF9N@&{%-ss4|`OgN3)Tz!>af{2GNS z5FODy#lzv0mS$tIRAeZoAsIB%)NnkRrVjD;0YAmy&BKX!N+nImpTsw`Dy+GPLEO~@ zE*i(prHe6|tzg>v``aE+2fDU(sDlsmb*L)yr{iH3ijM^_u%Y0tH0vB_>%=VP8w8@p zx4$}u#|P!X1Ew&dQb)T#zMv9J>nvI?n=T(A znBIQ`(+Y>yXY23bnWUwkV0y0s?mAKfhB0~-5KONTJn|cwu52Ng-j)Q@3lwno+35j- z={-v@Etzn#<?!" + password = input("Enter a password less than 6 digits: \t") + + if len(password) > 6: + print("Your password is greater than 6 digits!") + + Proc1 = Process(target=D1, args=(alp, password, C1)) + Proc2 = Process(target=D2, args=(alp, password, C2)) + Proc3 = Process(target=D3, args=(alp, password, C3)) + Proc4 = Process(target=D4, args=(alp, password, C4)) + Proc5 = Process(target=D5, args=(alp, password, C5)) + Proc6 = Process(target=D6, args=(alp, password, C6)) + + Proc1.start() + Proc2.start() + Proc3.start() + Proc4.start() + Proc5.start() + Proc6.start() \ No newline at end of file diff --git a/Orchid/Code/Public/Lib1.py b/Orchid/Code/Public/Lib1.py new file mode 100644 index 0000000..3cbef3c --- /dev/null +++ b/Orchid/Code/Public/Lib1.py @@ -0,0 +1,41 @@ +import time + +class Instance(): + def __init__(self, UUID): + self.UUID = UUID + def Process(self, A, B, Type): + A_fil = open("Comp"+str(self.UUID)+"/Instrc_r1.txt", "w") + B_fil = open("Comp"+str(self.UUID)+"/Instrc_r2.txt", "w") + Type_fil = open("Comp"+str(self.UUID)+"/Instrc_r3.txt", "w") + if Type == "IF=": + A_fil.write(str(A)) + B_fil.write(str(B)) + elif Type == "IF!": + A_fil.write(str(A)) + B_fil.write(str(B)) + else: + A_fil.write(str(float(A))) + B_fil.write(str(float(B))) + A_fil.close() + B_fil.close() + Type_fil.write(str(Type)) + Type_fil.close() + def Read(self): + time.sleep(0.1) + A_fil = open("Comp"+str(self.UUID)+"/Instrc_s.txt", "r") + while(True): + A_str = A_fil.read() + if A_str == "": + pass + else: + if A_str == "F": + A_fil.close() + + return False + if A_str == "T": + A_fil.close() + + return True + A_fil.close() + + return A_str \ No newline at end of file diff --git a/Orchid/Code/Public/Sample.py b/Orchid/Code/Public/Sample.py new file mode 100644 index 0000000..b7b2025 --- /dev/null +++ b/Orchid/Code/Public/Sample.py @@ -0,0 +1,12 @@ +from Lib1 import Instance + +C1 = Instance("1") +C2 = Instance("2") + +for i in range(100): + C1.Process(i, 3, "M") + C2.Process(str(C1.Read()), 9, "A") + + print(i) + print(C1.Read()) + print(C2.Read()) diff --git a/Orchid/Code/Public/__pycache__/Lib1.cpython-310.pyc b/Orchid/Code/Public/__pycache__/Lib1.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7dd6a80f28a9e93cc96aeff7535bac5f1d4e574a GIT binary patch literal 1189 zcmZuw&rj4q6rPz*x23X*NP=QQqR~SyG+sOz0U;2KS&0jmy);W_77E>Vndt^;meX?d zAJEfs^y1xr!n<=bCMF)edh)%NWr^V>@0<6t^X8jrRV%;X>Cpy=~0%rwO zF8~N4XhK?KlL#iPb0VxEYf(X)#OJ>uPZ|;8bz$JFfa)gzl0Y?SF+l}8CoM}@g2T#% zEo!jZ!htWj#@$MF-cBPKVfR?jMqLBdIP`!HNC-1Q4{i9=@ZH_5b)OloWztbN_-CTv zOyuwDU{_0}gTr=|?FH*nALUsuSj&VAn|Z&}3AR;sD5G2lZ&h>_i3X{U_(tU4%G+|+8^7uB{e@h&x9pi5@iKVAv^!TC^Ql>5lMrvf>!Ci4LCTqdAm`m zf+kk+1^6boeGr!r{ z`90s)v^W9z_>+q)qY&~tIz0hj$l*nJtP@5UEs=u%qy;LG_Xv}25+?6RgzUl3mx9FT zG|4G{pqn?lyW&B+&S4gebz+eMWd!4Il7fs_1%=6=Ri*%f>P08ZwliNgEi*ueM6_l2 z9i9*{N?@k<}QHK$jYHTMBGKPxid zo?5{BQVy9(`z3*MjbrqN}VhQ4emhHUJzM>2qp>r)Ms8%>PqtnMh}aS5HbzpF$J+g z5mGop)Dls38SU^XB~bNfk3rcTu=WCv0!?s)c~8+ROVyfo0ly+Q4L3H;dE%Kr- zFlMDvwaT6h=VDBrdYu;?%Tvu##kO)Pj{vMk$2>ajDKj^!a582r6iYVFA&bJJ7!jG` z71OfqS~{3mcLxFN1yBw0>tJSM_B*|$?8i3q+xhmX*AFhYPmTYqw+F909K5osy6Kba ziLVmh>P>og;+u))o9)c`AEpobcW3u!+nJGr$#&-L2dteLZ>RN#Y5kY9-p#n9t!b-b zalBJzFhg(xCQQL@m1qSc`9r+)1saR#X4Vx{j3WA9AxV z-;Zy_H7ZTZv6=TWf0WtLK}^&a+TOurr_Q!@s!l{E}rDUfeL2Dr~ugcG57uSe`HWCp-qd z@Bvg=P`gAVi|fXbe?p;QkAZ3gt0U3a3mpmlv0<(8e+L5(GaVn3{WU|T>XiAkN)OBl==&I CFmlrX literal 0 HcmV?d00001 diff --git a/Orchid/Code/Public/__pycache__/Paths.cpython-310.pyc b/Orchid/Code/Public/__pycache__/Paths.cpython-310.pyc new file mode 100644 index 0000000000000000000000000000000000000000..2c113fa50946ac6607c88de812f0be7b995ec0bb GIT binary patch literal 357 zcmYjMO-sW-5Z&2?c9Hf62-15Fy7b^picl|JYC%K@UeZiLx1`y!lc@FV4{4A7rM-Ic zFL-jc5!!)yZ{F@>KJ0LKCOA}jjV1GU5T_wo+;Y+d0}6ynq#Z*FC^7mJsYG}bN&LeO zG0OvXIOA`Btw&deY)+~L` z)Ks{}4_vXfuLZSbY2Lqt3lk3TJJC<hXWArxpv{ zjnQ-NPFI_)SNFAPf{Me!;r0Ol zw|I(DbMwnmi%ZkeGAmXxdx(Ql zS6FN=z)%q +#include +#include +#include + +#define BUF_SIZE 1024 + +typedef struct Instance { + char UUID[BUF_SIZE]; +} Instance; + +void Instance_Init(Instance* instance, char* UUID) { + strcpy(instance->UUID, UUID); +} + +void Instance_Process(Instance* instance, int A, int B, char* Type) { + char instrc_n_path[BUF_SIZE], instrc_r_path[BUF_SIZE], instrc_s_path[BUF_SIZE]; + snprintf(instrc_n_path, BUF_SIZE, "Comp%s/Instrc_n.txt", instance->UUID); + snprintf(instrc_r_path, BUF_SIZE, "Comp%s/Instrc_r.txt", instance->UUID); + snprintf(instrc_s_path, BUF_SIZE, "Comp%s/Instrc_s.txt", instance->UUID); + + FILE* instrc_n_file = fopen(instrc_n_path, "w"); + fprintf(instrc_n_file, "n"); + fclose(instrc_n_file); + + FILE* instrc_r_file = fopen(instrc_r_path, "w"); + FILE* instrc_s_file = fopen(instrc_s_path, "w"); + fprintf(instrc_s_file, "P"); + fclose(instrc_s_file); + + instrc_s_file = fopen(instrc_s_path, "r"); + fprintf(instrc_r_file, "%d %d %s", A, B, Type); + fclose(instrc_r_file); + + char buf[BUF_SIZE]; + do { + fseek(instrc_s_file, 0, SEEK_SET); + fread(buf, sizeof(char), BUF_SIZE, instrc_s_file); + usleep(10000); + } while (buf[0] == 'P'); + + instrc_n_file = fopen(instrc_n_path, "w"); + fclose(instrc_n_file); +} + +char* Instance_Read(Instance* instance) { + usleep(100000); + char instrc_s_path[BUF_SIZE]; + snprintf(instrc_s_path, BUF_SIZE, "Comp%s/Instrc_s.txt", instance->UUID); + FILE* instrc_s_file = fopen(instrc_s_path, "r"); + char* result = NULL; + while (1) { + char buf[BUF_SIZE]; + fgets(buf, BUF_SIZE, instrc_s_file); + if (buf[0] == '\0') { + continue; + } else { + if (buf[0] == 'F') { + fclose(instrc_s_file); + return "False"; + } else if (buf[0] == 'T') { + fclose(instrc_s_file); + return "True"; + } else { + result = strdup(buf); + break; + } + } + } + fclose(instrc_s_file); + return result; +} diff --git a/Orchid/Code/__pycache__/Lib1.cpython-311.pyc b/Orchid/Code/__pycache__/Lib1.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dd75cc9a0e9cc711583355d484566444f3a1aaf5 GIT binary patch literal 2323 zcmdT_&1)M+6rWkGY<+Diw@u>MR;$pKL^QT)+)$dh4YphxLl91EhekDBl$~`gThgkt z>%`WqzSLSG4)xd7cv1`lrAGn_T8WLDEP z$2%Az?}B&hP2r_L3q%F3PKi!{OTdu`?6nrq0cY zK9)&kQ>Mj}mcb_mbaTcsauYFw=@aKuSGv1$^R`D-VTq-x`Ien*x^`4kV@NI zH`!w9COli9AllCEp@6|f#*456OT^mQ2T)skzHHjz89jz}f{JLlkC?OqUe+B?#l7*I z)y&1@#?xW$Jj@ozH0CY{W!5CHxpD1vxgZxY_kCo&wyP@8#!Q$8eKo9jC07wktSY#W zZ?vZbqI!1y?{X`^t~(+n)*FsMrbQj2%)I-)&Ua80Q7QiTbKF9^X=L_FI;GXHi@3Q7Bn_kN|AFoqB9y=2iB@}Hap=e(&H;}ZF(es9uOh-q!@fA;I z%;?CxHDzSCho0{4Xig})^f^6@q4EI{3QHYoF5T08EI-u=9oy!*w|(CH_k(;HLe z(7Dafxu>C_C!wLo^5fBR=)z{`Lh0h=a_Dj?@#SVhD~GfaGs_{fG&@&ro!@MozvZq3 z4=?$@^WTdV>Gy+o2a6wCvTfN6*G^x#N>xS-GRX9E@!SW2Inh+u~d0 zwsK2(7JU7-x70RWnlUzKta6)GCFCj{kX{hdF0kb@=_Mh6F!2gMZGiSq#D!|`(EhY;|_;X#BJ0GskL8*t2~gM$$d$D4rT|9~GxID&8#0T0%ext?Ua z4cLfFGy@N#8oB^l#>D&8=>hp7EX^xU1E7dWn7;u0ht*$|0xg}D@Ouw^%f9=82Z1~8 zN_)82|HIikXDi`%e}CuXYHYc;*jqW-`Lq8=|C;hhSyd|0o>i;zH&Y+3&Z0a2vj4vF zKq)Gf6Q_!S>M@8Ssy!ZQ!e3c7nbB3%_Ni*dV6$oD1FHJPmejFhJuttQj zxE?tEVFVy!4gf4TPgSDcx2wc~CfSRPw+DTPyq#6DAL;?nC7ew=h7iYy3f_r;y($u@ td3x(ff6BW+hwW<)15{m<(hBh|h^In)3*xEDM=3MxnT=#BsY literal 0 HcmV?d00001 diff --git a/Orchid/Code/__pycache__/Paths.cpython-311.pyc b/Orchid/Code/__pycache__/Paths.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..c37c459826ddf4019bc432972ddaeea7e6ebf8cc GIT binary patch literal 631 zcmZ3^%ge<81XjxGDYZcQF^B^LOi;#W86aaiLkdF*V-742AvjAoXOaM%$FqW_(1hQCQ>}5dJtKm8r zsbXddQx(v7bdysUK)&)T0$EnYp&wA1l#`jPugQ9gxwx|U7E3{5NyaU<%)H{%qLN!o z`Ng-`l1qzHGK*F+d6dwWKq1rqIiKt5lwu7)J1Xai!3@@gu-E`dd|+l|WW2$^*#L$&7`Ph1 Q@B<4IqwWU=Oag2o05{isaR2}S literal 0 HcmV?d00001 diff --git a/Orchid/compile.py b/Orchid/compile.py new file mode 100644 index 0000000..929f8ba --- /dev/null +++ b/Orchid/compile.py @@ -0,0 +1,39 @@ +import py_compile +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig1_0.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig1_1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig1_1.pyc", optimize=2) + +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_0.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_1.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_2.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_2.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_3.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig2_3.pyc", optimize=2) + +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_0.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_1.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_2.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_2.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_3.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_3.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_4.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_5.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_5.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_6.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_6.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_7.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig3_7.pyc", optimize=2) + +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_2.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_3.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_4.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_5.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_6.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_7.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_8.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_9.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_10.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_11.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_12.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_13.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_14.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4_15.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig4.pyc", optimize=2) + +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig5.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig5.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig6.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Code/Dig6.pyc", optimize=2) +py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Interperet/Test.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/Computer1/Interperet/Test.pyc", optimize=2) +#py_compile.compile('C:/Users/Administrator/Desktop/Code/Orchestrator/REF/Lib1.py',"C:/Users/Administrator/Desktop/Code/Orchestrator/REF/Lib1.pyc", optimize=2) \ No newline at end of file diff --git a/Orchid/int.sh b/Orchid/int.sh new file mode 100644 index 0000000..73a7fc3 --- /dev/null +++ b/Orchid/int.sh @@ -0,0 +1,21 @@ +cd Code +chmod +x Comp1/start.sh +chmod +x Comp2/start.sh +chmod +x Comp3/start.sh +chmod +x Comp4/start.sh +chmod +x Comp5/start.sh + +chmod +x Comp1/Instance +chmod +x Comp2/Instance +chmod +x Comp3/Instance +chmod +x Comp4/Instance +chmod +x Comp5/Instance +chmod +x Comp6/Instance + + +./Comp1/start.sh & +./Comp2/start.sh & +./Comp3/start.sh & +./Comp4/start.sh & +./Comp5/start.sh & +./Comp6/start.sh & \ No newline at end of file diff --git a/Orchid/start.sh b/Orchid/start.sh new file mode 100644 index 0000000..9b0adf0 --- /dev/null +++ b/Orchid/start.sh @@ -0,0 +1,2 @@ +cd Code +python3 Public/Dig1.py \ No newline at end of file