Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wacksientrist authored May 3, 2023
1 parent 2c6af14 commit f546e9e
Show file tree
Hide file tree
Showing 74 changed files with 1,272 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Orchid/Code/Comp1/Instance.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Instance</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
52 changes: 52 additions & 0 deletions Orchid/Code/Comp1/Instance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from time import sleep

while True:
if open("Instrc_n.txt", 'r').read() == "n":

sleep(0.1)

fil1 = open("Instrc_r.txt", "r").read()
fil2 = open("Instrc_s.txt", "w")
fil2.write("P")
fil2.close()
fil2 = open("Instrc_s.txt", "w")
print(fil1)
fil1 = fil1.split(" ")
print(fil1)
A = fil1[0]
B = fil1[1]
Type = fil1[2]


if Type == "A":
Out = float(A)+float(B)
if Type == "S":
Out = float(A)-float(B)
if Type == "M":
Out = float(A)*float(B)
if Type == "D":
Out = float(A)/float(B)
if Type == "IF=":
print(A)
print(B)
if A == B:
Out = "T"
else:
Out = "F"
if Type == "IF!":
if A == B:
Out = "F"
else:
Out = "T"
if Type == "IF>":
if A > B:
Out = "T"
else:
Out = "F"
if Type == "IF<":
if A < B:
Out = "T"
else:
Out = "F"
fil2.write(str(Out))
fil2.close()
Empty file added Orchid/Code/Comp1/Instrc_n.txt
Empty file.
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_r.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
! 123 IF=
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/Instrc_s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F
7 changes: 7 additions & 0 deletions Orchid/Code/Comp1/start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@ECHO OFF

W:
cd Code
python3 ./Comp1/Instance.py

PAUSE
1 change: 1 addition & 0 deletions Orchid/Code/Comp1/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3 Instance.py
Binary file added Orchid/Code/Comp2/Instance
Binary file not shown.
87 changes: 87 additions & 0 deletions Orchid/Code/Comp2/Instance.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main() {
while (1) {
FILE *file;
file = fopen("Instrc_n.txt", "r");
char content[10];
fgets(content, 10, file);

if (strcmp(content, "n\n") == 0) {
fclose(file);
usleep(100000);

FILE *fil1, *fil2;
fil1 = fopen("Instrc_r.txt", "r");
fil2 = fopen("Instrc_s.txt", "w");

char str[100], *token;
fgets(str, 100, fil1);

token = strtok(str, "!!!!!!!");
float A = atof(token);
token = strtok(NULL, "!!!!!!!");
float B = atof(token);
token = strtok(NULL, "!!!!!!!");
char *Type = token;

float Out;
if (strcmp(Type, "A") == 0) {
Out = A + B;
}
else if (strcmp(Type, "S") == 0) {
Out = A - B;
}
else if (strcmp(Type, "M") == 0) {
Out = A * B;
}
else if (strcmp(Type, "D") == 0) {
Out = A / B;
}
else if (strcmp(Type, "IF=") == 0) {
if (A == B) {
Out = 'T';
}
else {
Out = 'F';
}
}
else if (strcmp(Type, "IF!") == 0) {
if (A == B) {
Out = 'F';
}
else {
Out = 'T';
}
}
else if (strcmp(Type, "IF>") == 0) {
if (A > B) {
Out = 'T';
}
else {
Out = 'F';
}
}
else if (strcmp(Type, "IF<") == 0) {
if (A < B) {
Out = 'T';
}
else {
Out = 'F';
}
}
char Out1[6];
gcvt(Out, 6, Out1);
fprintf(fil2, "%s", Out1);
fclose(fil1);
fclose(fil2);
}
else {
fclose(file);
}
}
return 0;
}
20 changes: 20 additions & 0 deletions Orchid/Code/Comp2/Instance.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Instance</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
53 changes: 53 additions & 0 deletions Orchid/Code/Comp2/Instance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
from time import sleep

while True:
if open("Instrc_n.txt", 'r').read() == "n":

sleep(0.1)

fil1 = open("Instrc_r.txt", "r").read()
fil2 = open("Instrc_s.txt", "w")
fil2.write("P")
fil2.close()
fil2 = open("Instrc_s.txt", "w")
print(fil1)
fil1 = fil1.split(" ")
#fil1 = fil1.split("| "+r"\n*\n"+" |")
print(fil1)
A = fil1[0]
B = fil1[1]
Type = fil1[2]


if Type == "A":
Out = float(A)+float(B)
if Type == "S":
Out = float(A)-float(B)
if Type == "M":
Out = float(A)*float(B)
if Type == "D":
Out = float(A)/float(B)
if Type == "IF=":
print(A)
print(B)
if A == B:
Out = "T"
else:
Out = "F"
if Type == "IF!":
if A == B:
Out = "F"
else:
Out = "T"
if Type == "IF>":
if A > B:
Out = "T"
else:
Out = "F"
if Type == "IF<":
if A < B:
Out = "T"
else:
Out = "F"
fil2.write(str(Out))
fil2.close()
Empty file added Orchid/Code/Comp2/Instrc_n.txt
Empty file.
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_r.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
p! 123 IF=
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/Instrc_s.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F
4 changes: 4 additions & 0 deletions Orchid/Code/Comp2/start.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@ECHO OFF

cd W:/Code/Orchid/Code/
W:/Code/python.exe W:/Code/Orchid/Code/Comp2/Instance.py
1 change: 1 addition & 0 deletions Orchid/Code/Comp2/start.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
python3 Instance.py
Binary file added Orchid/Code/Comp3/Instance
Binary file not shown.
89 changes: 89 additions & 0 deletions Orchid/Code/Comp3/Instance.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

int main() {
while (1) {
FILE *file;
file = fopen("Instrc_n.txt", "r");
char content[10];
fgets(content, 10, file);

if (strcmp(content, "n\n") == 0) {
fclose(file);
usleep(100000);

FILE *fil1, *fil2;
fil1 = fopen("Instrc_r.txt", "r");
fil2 = fopen("Instrc_s.txt", "w");

char str[100], *token;
fgets(str, 100, fil1);

token = strtok(str, "!!!!!!!");
float A = atof(token);
token = strtok(NULL, "!!!!!!!");
float B = atof(token);
token = strtok(NULL, "!!!!!!!");
char *Type = token;

int Out;
if (strcmp(Type, "A") == 0) {
Out = A + B;
}
else if (strcmp(Type, "S") == 0) {
Out = A - B;
}
else if (strcmp(Type, "M") == 0) {
Out = A * B;
}
else if (strcmp(Type, "D") == 0) {
Out = A / B;
}
char Out2;
if (strcmp(Type, "IF=") == 0) {
if (A == B) {
Out2 = "T";
}
else {
Out2 = "F";
}
}
else if (strcmp(Type, "IF!") == 0) {
if (A == B) {
Out2 = "F";
}
else {
Out2 = "T";
}
}
else if (strcmp(Type, "IF>") == 0) {
if (A > B) {
Out2 = "T";
}
else {
Out2 = "F";
}
}
else if (strcmp(Type, "IF<") == 0) {
if (A < B) {
Out2 = "T";
}
else {
Out2 = "F";
}
}
char Out1[6];
gcvt(Out, 6, Out1);
fprintf(fil2, "%s", Out1);
fprintf(fil2, "%c", Out2);
fclose(fil1);
fclose(fil2);
}
else {
fclose(file);
}
}
return 0;
}
20 changes: 20 additions & 0 deletions Orchid/Code/Comp3/Instance.dSYM/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.Instance</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Binary file not shown.
Loading

0 comments on commit f546e9e

Please sign in to comment.