lines = Files.readAllLines(Paths.get(fileName));
109 | StringBuilder stringBuilder = new StringBuilder();
110 | lines.forEach(
111 | line -> stringBuilder.append(line).append("\n")
112 | );
113 | return stringBuilder.toString();
114 | }
115 | }
116 |
117 |
--------------------------------------------------------------------------------
/src/main/java/com/google/hashcode/utils/Profiler.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.utils;
2 |
3 | import java.time.Duration;
4 | import java.time.Instant;
5 |
6 | /**
7 | * Simplest profiler
8 | *
9 | * @author Grigoriy Lyashenko (Grog).
10 | */
11 | public class Profiler {
12 |
13 | private Instant start;
14 |
15 | public Profiler() {
16 | this.start = Instant.now();
17 | }
18 |
19 | /**
20 | * Calculated difference between start and finish time and output its String representation
21 | *
22 | * @param message optional message before performance output
23 | */
24 | public String measure(String message) {
25 | Instant end = Instant.now();
26 | return message + Duration.between(start, end).toMillis() + "ms";
27 | }
28 |
29 | }
30 |
--------------------------------------------------------------------------------
/src/main/java/com/google/hashcode/utils/SlicingMethods.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.utils;
2 |
3 | import com.google.hashcode.entity.*;
4 | import org.slf4j.Logger;
5 | import org.slf4j.LoggerFactory;
6 |
7 | import java.util.*;
8 | import java.util.stream.Collectors;
9 |
10 | public abstract class SlicingMethods {
11 | private static final Logger LOGGER = LoggerFactory.getLogger(SlicingMethods.class);
12 |
13 | private SlicingMethods() {
14 | }
15 |
16 | /**
17 | * Find all available steps for a given start positions, considering:
18 | * * slice instructions for a given pizza
19 | * * start position + slices should form a rectangle
20 | *
21 | * If there is no steps fo a given start position:
22 | * 1. A start position is valid as a slice and can be cutted -> move it to output slices
23 | * 2. A start position ISN'T valid as a slice -> remove it from startPositions and add all it cells back to a pizza
24 | *
25 | * @param pizza given pizza
26 | * @param startPositions given start positions in the pizza(a slice with cells number 1..max slice cells number)
27 | * @param output list of valid and cutted slices
28 | * @return available steps
29 | */
30 | public static Map> getAvailableSteps(Pizza pizza, List startPositions, List output) {
31 | Map> groupedByAStartPositionSteps = new HashMap<>();
32 | Iterator iterator;
33 | //optimization for big arrays
34 | if (startPositions.size() > 1_000) {
35 | List startPositionsSubset = startPositions.subList(0, 20);
36 | iterator = startPositionsSubset.iterator();
37 | }
38 | //iterate over all the start positions
39 | else {
40 | iterator = startPositions.iterator();
41 | }
42 | while (iterator.hasNext()) {
43 | Slice startPosition = (Slice) iterator.next();
44 |
45 | List steps = new ArrayList<>();
46 | Step stepLeft = startPosition.generateStepLeft(pizza);
47 | Step stepRight = startPosition.generateStepRight(pizza);
48 | Step stepAbove = startPosition.generateStepAbove(pizza);
49 | Step stepBelow = startPosition.generateStepBelow(pizza);
50 |
51 | steps.add(stepRight);
52 | steps.add(stepLeft);
53 | steps.add(stepBelow);
54 | steps.add(stepAbove);
55 | steps = steps.stream()
56 | .filter(Objects::nonNull)
57 | .collect(Collectors.toList());
58 | LOGGER.debug("There is no steps fo a given start position !");
59 | if (steps.isEmpty()) {
60 | LOGGER.debug("A start position is valid as a slice and can be cutted ->" +
61 | " move it to output slices");
62 | if (startPosition.isValid(pizza)) {
63 | output.add(startPosition);
64 | iterator.remove();
65 | } else {
66 | LOGGER.debug("A start position ISN'T valid as a slice -> " +
67 | "remove it from startPositions and add all it cells");
68 | pizza.getCells().addAll(startPosition.cells);
69 | iterator.remove();
70 | }
71 | } else {
72 | groupedByAStartPositionSteps.put(startPosition, steps);
73 | }
74 | }
75 | LOGGER.debug("available steps for" +
76 | "\npizza: " + pizza
77 | + "\nsteps: " + groupedByAStartPositionSteps);
78 | return groupedByAStartPositionSteps;
79 | }
80 |
81 | /**
82 | * Performs a step with a minimal cells delta number and executes it (cut it from a pizza, and add to a slice)
83 | *
84 | * @param pizza given pizza
85 | * @param step step to perform
86 | * @param startPositions given start positions in the pizza(a slice with cells number 1..max slice cells number)
87 | * @param output list of valid and cutted slices
88 | */
89 | public static void performStep(Pizza pizza, Step step, List startPositions, List output) {
90 | //1. Pick ups a steps list with minimal total cells number
91 | LOGGER.debug("STEP TO PERFORM " + step);
92 | //2. Cut all the step delta cells from pizza
93 | LOGGER.debug("pizza before step: " + pizza
94 | + "\ndelta to remove from the pizza: " + step.delta);
95 | pizza.getCells().removeAll(step.delta.cells);
96 | //3. remove step start position from total start positions
97 | startPositions.remove(step.startPosition);
98 | List returnedList = step.startPosition.cells;
99 | returnedList.addAll(step.delta.cells);
100 | Slice finalSlice = new Slice(returnedList);
101 | LOGGER.debug("PIZZA AFTER STEP:" + pizza);
102 | //3. Add the step cells to an output slice if it's valid
103 | if (finalSlice.isValid(pizza)) {
104 | output.add(finalSlice);
105 | }
106 | //4. add start position + delta to start positions
107 | else {
108 | startPositions.add(finalSlice);
109 | }
110 | }
111 |
112 | /**
113 | * Selects a step which start position has minimal delta in all the steps
114 | *
115 | * @param steps available steps
116 | * @return a step with minimal delta
117 | */
118 | public static Step selectStep(Map> steps) {
119 | //TODO test and refactor this peace of shit properly !!
120 | List min = steps.values().stream()
121 | .min(Comparator.comparingLong(value ->
122 | value.stream()
123 | .map(step -> step.delta.cells.size())
124 | .count()))
125 | .get();
126 | if (!min.isEmpty()) {
127 | LOGGER.debug("steps list with minimal number of delta cells: " + min);
128 | return min.get(0);
129 | } else {
130 | Optional> optionalStep = steps.values().stream().filter(steps1 -> !steps1.isEmpty()).findFirst();
131 | if (optionalStep.isPresent()) {
132 | final Step step = optionalStep.get().get(0);
133 | LOGGER.info("Selected step to perform:" + step);
134 | return step;
135 | } else return null;
136 | }
137 | }
138 |
139 | /**
140 | * * Finds a cell type(tomato or mushroom) with minimal cells numbers
141 | * * Generates a list of one cell slices from them
142 | * * Deletes the slices from the pizza
143 | *
144 | * @param pizza given pizza
145 | * @return slices that are start positions for future slicing process
146 | */
147 | public static List cutAllStartPositions(Pizza pizza) {
148 | //1.Finds a cell type(tomato or mushroom) with minimal cells numbers
149 | List mushrooms = pizza.getCells().stream()
150 | .filter(cell -> cell.ingredient.equals(Ingredient.MUSHROOM))
151 | .collect(Collectors.toList());
152 | List tomatoes = pizza.getCells().stream()
153 | .filter(cell -> cell.ingredient.equals(Ingredient.TOMATO))
154 | .collect(Collectors.toList());
155 | LOGGER.info("cutAllStartPositions for pizza: "
156 | + "\n" + pizza
157 | + "\nmushrooms number: " + mushrooms.size()
158 | + "\ntomatoes number: " + tomatoes.size());
159 | List startPositions = null;
160 | if (mushrooms.size() > tomatoes.size()) {
161 | startPositions = tomatoes.stream()
162 | .map(Slice::new)
163 | .collect(Collectors.toList());
164 | pizza.setCells(mushrooms);
165 | } else {
166 | startPositions = mushrooms.stream()
167 | .map(Slice::new)
168 | .collect(Collectors.toList());
169 | pizza.setCells(tomatoes);
170 | }
171 | LOGGER.debug("pizza with removed start positions:"
172 | + "\n" + pizza);
173 | return startPositions;
174 | }
175 |
176 | }
177 |
--------------------------------------------------------------------------------
/src/main/java/com/google/hashcode/utils/StepsComparator.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.utils;
2 |
3 | import com.google.hashcode.entity.Step;
4 |
5 | import java.util.Comparator;
6 | import java.util.List;
7 |
8 | /**
9 | * @author Grigoriy Lyashenko (Grog).
10 | */
11 | //TODO examine this class work by parameterized tests
12 | public class StepsComparator implements Comparator> {
13 |
14 | @Override
15 | public int compare(List o1, List o2) {
16 | long o1CellsCount = o1.stream()
17 | .mapToLong(step -> step.delta.cells.size())
18 | .sum();
19 | long o2CellsCount = o2.stream()
20 | .mapToLong(step -> step.delta.cells.size())
21 | .sum();
22 | return Long.compare(o1CellsCount, o2CellsCount);
23 | }
24 | }
--------------------------------------------------------------------------------
/src/main/resources/logback.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | INFO
7 | ACCEPT
8 | DENY
9 |
10 |
11 |
12 | %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
13 |
14 |
15 |
16 |
17 |
18 | ./pizzaSlicingDebug.log
19 |
20 |
21 | %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
22 |
23 |
24 |
25 |
26 |
27 | ./pizzaSlicingAudit.log
28 |
29 |
30 | %d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
42 |
43 |
44 |
45 |
--------------------------------------------------------------------------------
/src/test/java/com/google/hashcode/AppTest.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode;
2 |
3 | import org.junit.Test;
4 |
5 | import java.io.IOException;
6 |
7 | public class AppTest {
8 |
9 | @Test
10 | public void main() throws IOException {
11 | // App.main(new String[0]);
12 | }
13 |
14 | }
15 |
--------------------------------------------------------------------------------
/src/test/java/com/google/hashcode/entity/PizzaTest.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.entity;
2 |
3 | import com.google.hashcode.utils.IoUtils;
4 | import org.junit.Before;
5 | import org.junit.Test;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.Optional;
10 |
11 | import static com.google.hashcode.utils.FilesPaths.EXAMPLE_INPUT_FILE_PATH;
12 | import static org.junit.Assert.assertEquals;
13 | import static org.junit.Assert.assertFalse;
14 |
15 | /**
16 | * @author Grigoriy Lyashenko (Grog).
17 | */
18 | public class PizzaTest {
19 |
20 | private Pizza examplePizza;
21 |
22 | @Before
23 | public void setup() throws IOException {
24 | examplePizza = new Pizza(new File(EXAMPLE_INPUT_FILE_PATH), IoUtils.parsePizza(EXAMPLE_INPUT_FILE_PATH), IoUtils.parseSliceInstructions(EXAMPLE_INPUT_FILE_PATH));
25 | }
26 |
27 | @Test
28 | public void getCell() throws Exception {
29 | assertEquals(examplePizza.getCell(0, 0), Optional.of(new Cell(0, 0, Ingredient.TOMATO)));
30 | }
31 |
32 | @Test
33 | public void getCellException() throws Exception {
34 | Optional cell = examplePizza.getCell(100500, 0);
35 | assertFalse(cell.isPresent());
36 | }
37 |
38 | @Test
39 | public void testToString() throws IOException {
40 | assertEquals("inputDataSets/example.inSliceInstructions: \n" +
41 | "min 1 ingredient per slice, max 6 cells per slice \n" +
42 | " 0 1 2 3 4\n" +
43 | "0 T T T T T \n" +
44 | "1 T M M M T \n" +
45 | "2 T T T T T", examplePizza.toString());
46 | }
47 |
48 | @Test
49 | public void containsCells() {
50 | //given a slice based on the pizza cells
51 |
52 | }
53 |
54 | }
--------------------------------------------------------------------------------
/src/test/java/com/google/hashcode/entity/SliceTest.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.entity;
2 |
3 | import com.google.hashcode.utils.IoUtils;
4 | import org.junit.Before;
5 | import org.junit.Test;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.ArrayList;
10 | import java.util.Arrays;
11 | import java.util.Collections;
12 |
13 | import static com.google.hashcode.utils.FilesPaths.EXAMPLE_INPUT_FILE_PATH;
14 | import static org.junit.Assert.*;
15 |
16 | /**
17 | * @author Grigoriy Lyashenko (Grog).
18 | */
19 | public class SliceTest {
20 | private Pizza pizza;
21 |
22 | @Before
23 | public void setup() throws IOException {
24 | pizza = new Pizza(new File(EXAMPLE_INPUT_FILE_PATH), IoUtils.parsePizza(EXAMPLE_INPUT_FILE_PATH), IoUtils.parseSliceInstructions(EXAMPLE_INPUT_FILE_PATH));
25 | }
26 |
27 | @Test
28 | public void isValid() throws Exception {
29 | Slice invalidSlice = new Slice(pizza.getCells());
30 | assertFalse(invalidSlice.isValid(pizza));
31 | //create a valid slice
32 | Slice validSlice = new Slice(Arrays.asList(
33 | new Cell(0, 0, Ingredient.TOMATO),
34 | new Cell(0, 1, Ingredient.MUSHROOM)));
35 | assertTrue(validSlice.isValid(pizza));
36 | }
37 |
38 | @Test
39 | public void generateStepDeltaBelow() {
40 | Slice slice = new Slice(Arrays.asList(
41 | new Cell(0, 0, Ingredient.MUSHROOM),
42 | new Cell(0, 1, Ingredient.TOMATO)));
43 | assertEquals(2, slice.generateStepBelow(pizza).delta.cells.size());
44 | }
45 |
46 | @Test
47 | public void centGenerateStepDeltaAbove() {
48 | Slice slice = new Slice(Arrays.asList(
49 | new Cell(0, 0, Ingredient.MUSHROOM),
50 | new Cell(0, 1, Ingredient.TOMATO)));
51 | assertEquals(null, slice.generateStepAbove(pizza));
52 | }
53 |
54 | @Test
55 | public void generateStepDeltaAbove() {
56 | Slice slice = new Slice(Arrays.asList(
57 | new Cell(1, 0, Ingredient.MUSHROOM),
58 | new Cell(1, 1, Ingredient.TOMATO)));
59 | assertEquals(2, slice.generateStepAbove(pizza).delta.cells.size());
60 | }
61 |
62 | @Test
63 | public void generateStepLeft() {
64 | Slice slice = new Slice(new ArrayList<>(Collections.singletonList(
65 | new Cell(1, 1, Ingredient.MUSHROOM))));
66 | assertEquals(2, slice.generateStepLeft(pizza).size());
67 | }
68 |
69 | @Test
70 | public void cantGenerateStepLeft() {
71 | Slice slice = new Slice(Arrays.asList(
72 | new Cell(0, 0, Ingredient.MUSHROOM),
73 | new Cell(0, 1, Ingredient.TOMATO)));
74 | assertEquals(null, slice.generateStepLeft(pizza));
75 | }
76 |
77 | @Test
78 | public void generateStepRight() {
79 | Slice slice = new Slice(Arrays.asList(
80 | new Cell(0, 0, Ingredient.MUSHROOM),
81 | new Cell(0, 1, Ingredient.TOMATO)));
82 | assertEquals(1, slice.generateStepRight(pizza).delta.cells.size());
83 | assertEquals(3, slice.generateStepRight(pizza).size());
84 | }
85 |
86 | @Test
87 | public void testToString() {
88 | Slice slice = new Slice(Arrays.asList(
89 | new Cell(0, 0, Ingredient.MUSHROOM)));
90 | assertEquals("slice : \n" +
91 | " 0\n" +
92 | "0 M", slice.toString());
93 | Slice slice1 = new Slice(Arrays.asList(
94 | new Cell(2, 3, Ingredient.TOMATO),
95 | new Cell(0, 1, Ingredient.MUSHROOM))
96 | );
97 | assertEquals("slice : \n" +
98 | " 0 1 2 3\n" +
99 | "0 M \n" +
100 | "1 \n" +
101 | "2 T", slice1.toString());
102 | }
103 | }
--------------------------------------------------------------------------------
/src/test/java/com/google/hashcode/utils/IoUtilsTest.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.utils;
2 |
3 | import com.google.hashcode.entity.Cell;
4 | import com.google.hashcode.entity.Ingredient;
5 | import com.google.hashcode.entity.Slice;
6 | import org.junit.Test;
7 |
8 | import java.io.IOException;
9 | import java.net.URISyntaxException;
10 | import java.nio.file.Files;
11 | import java.nio.file.Paths;
12 | import java.util.Arrays;
13 | import java.util.List;
14 |
15 | import static org.junit.Assert.assertEquals;
16 |
17 | /**
18 | * @author Grigoriy Lyashenko (Grog).
19 | */
20 | public class IoUtilsTest {
21 | private static final String TEST_OUTPUT_FILE = "testOutput.txt";
22 | private static final String PARAGON_OUTPUT_EXAMPLE_FILE = "src/test/resources/paragonOutputExample.txt";
23 | private static final String EXAMPLE_PIZZA_FILE = FilesPaths.EXAMPLE_INPUT_FILE_PATH;
24 |
25 | private static List createSlicesForParagonOutputExample() {
26 | Slice slice0 = new Slice();
27 | Slice slice1 = new Slice();
28 | Slice slice2 = new Slice();
29 |
30 | slice0.cells.add(new Cell(0, 0, Ingredient.TOMATO));
31 | slice0.cells.add(new Cell(1, 0, Ingredient.TOMATO));
32 | slice0.cells.add(new Cell(2, 0, Ingredient.TOMATO));
33 | slice0.cells.add(new Cell(0, 1, Ingredient.TOMATO));
34 | slice0.cells.add(new Cell(1, 1, Ingredient.MUSHROOM));
35 | slice0.cells.add(new Cell(2, 1, Ingredient.TOMATO));
36 |
37 | slice1.cells.add(new Cell(0, 2, Ingredient.TOMATO));
38 | slice1.cells.add(new Cell(1, 2, Ingredient.MUSHROOM));
39 | slice1.cells.add(new Cell(2, 2, Ingredient.TOMATO));
40 |
41 | slice2.cells.add(new Cell(0, 3, Ingredient.TOMATO));
42 | slice2.cells.add(new Cell(1, 3, Ingredient.MUSHROOM));
43 | slice2.cells.add(new Cell(2, 3, Ingredient.TOMATO));
44 | slice2.cells.add(new Cell(0, 4, Ingredient.TOMATO));
45 | slice2.cells.add(new Cell(1, 4, Ingredient.TOMATO));
46 | slice2.cells.add(new Cell(2, 4, Ingredient.TOMATO));
47 |
48 | return Arrays.asList(slice0, slice1, slice2);
49 | }
50 |
51 | @Test
52 | public void parseExampleInput() throws IOException {
53 | List input = IoUtils.parsePizza(EXAMPLE_PIZZA_FILE);
54 | }
55 |
56 | @Test
57 | public void parseExampleSliceInstructions() throws IOException {
58 | assertEquals("We expect min 1 ingredient per slice", 1,
59 | IoUtils.parseSliceInstructions(EXAMPLE_PIZZA_FILE).getMinNumberOfIngredientPerSlice().intValue());
60 | assertEquals("We expect max 6 cells per slice", 6,
61 | IoUtils.parseSliceInstructions(EXAMPLE_PIZZA_FILE).getMaxNumberOfCellsPerSlice().intValue());
62 | }
63 |
64 | @Test
65 | public void parseSlicesToOutputFormat() throws IOException, URISyntaxException {
66 | //Given a list of slices
67 | List slicesForParagonOutputExample = createSlicesForParagonOutputExample();
68 | //Then parse slices according to the output format
69 | String outputDate = IoUtils.parseSlices(slicesForParagonOutputExample);
70 | IoUtils.writeToFile(TEST_OUTPUT_FILE, outputDate);
71 | assertEquals(IoUtils.readFromFile(PARAGON_OUTPUT_EXAMPLE_FILE), IoUtils.readFromFile(TEST_OUTPUT_FILE));
72 | //clean the file under the test
73 | Files.deleteIfExists(Paths.get(TEST_OUTPUT_FILE));
74 | }
75 | }
--------------------------------------------------------------------------------
/src/test/java/com/google/hashcode/utils/SlicingMethodsTest.java:
--------------------------------------------------------------------------------
1 | package com.google.hashcode.utils;
2 |
3 | import com.google.hashcode.entity.*;
4 | import org.junit.Before;
5 | import org.junit.Test;
6 |
7 | import java.io.File;
8 | import java.io.IOException;
9 | import java.util.ArrayList;
10 | import java.util.Arrays;
11 | import java.util.List;
12 | import java.util.Map;
13 |
14 | import static com.google.hashcode.utils.FilesPaths.EXAMPLE_INPUT_FILE_PATH;
15 | import static org.junit.Assert.assertEquals;
16 |
17 | /**
18 | * @author Grigoriy Lyashenko (Grog).
19 | */
20 | public class SlicingMethodsTest {
21 |
22 | private Pizza pizza;
23 |
24 | @Before
25 | public void setup() throws IOException {
26 | pizza = new Pizza(new File(EXAMPLE_INPUT_FILE_PATH), IoUtils.parsePizza(EXAMPLE_INPUT_FILE_PATH), IoUtils.parseSliceInstructions(EXAMPLE_INPUT_FILE_PATH));
27 | }
28 |
29 | @Test
30 | public void getAvailableSteps() throws IOException {
31 | List output = new ArrayList<>();
32 | Map> actualMap = SlicingMethods.getAvailableSteps(pizza, SlicingMethods.cutAllStartPositions(pizza), output);
33 | assertEquals(3, actualMap.keySet().size());
34 | assertEquals(3, actualMap.get(new Slice(new Cell(1, 1, Ingredient.MUSHROOM))).size());
35 | assertEquals(2, actualMap.get(new Slice(new Cell(1, 2, Ingredient.MUSHROOM))).size());
36 | assertEquals(3, actualMap.get(new Slice(new Cell(1, 3, Ingredient.MUSHROOM))).size());
37 | }
38 |
39 | @Test
40 | public void cutAllStartPositions() throws IOException {
41 | List expected = Arrays.asList(
42 | new Slice(new Cell(1, 1, Ingredient.MUSHROOM)),
43 | new Slice(new Cell(1, 2, Ingredient.MUSHROOM)),
44 | new Slice(new Cell(1, 3, Ingredient.MUSHROOM))
45 | );
46 | assertEquals(expected, SlicingMethods.cutAllStartPositions(pizza));
47 | assertEquals("We expect pizza size reduced to 15-3=12", 12, pizza.getCells().size());
48 | }
49 |
50 | @Test
51 | public void performStep() {
52 | List startPositions = SlicingMethods.cutAllStartPositions(pizza);
53 | List output = new ArrayList<>();
54 | Map> availableSteps = SlicingMethods.getAvailableSteps(pizza, startPositions, output);
55 | SlicingMethods.performStep(pizza, SlicingMethods.selectStep(availableSteps), startPositions, output);
56 | assertEquals(11, pizza.getCells().size());
57 | }
58 | }
--------------------------------------------------------------------------------
/src/test/resources/paragonOutputExample.txt:
--------------------------------------------------------------------------------
1 | 3
2 | 0 0 2 1
3 | 0 2 2 2
4 | 0 3 2 4
--------------------------------------------------------------------------------
/submitResultsViaSelenium:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 | submitResults
8 |
9 |
10 |
11 |
12 | submitResults |
13 |
14 |
15 | type |
16 | //input[@type="file"][1] |
17 | /Users/greg/GIT/GoogleHashCode2017/googleHashCode_Pizza.zip |
18 |
19 |
20 | pause |
21 | 5000 |
22 | |
23 |
24 |
25 | type |
26 | //input[@type="file"][1] |
27 | /Users/greg/GIT/GoogleHashCode2017/outputDataSet/example.txt |
28 |
29 |
30 | pause |
31 | 2000 |
32 | |
33 |
34 |
35 | type |
36 | //input[@type="file"][1] |
37 | /Users/greg/GIT/GoogleHashCode2017/outputDataSet/example.txt |
38 |
39 |
40 | pause |
41 | 2000 |
42 | |
43 |
44 |
45 | type |
46 | //input[@type="file"][1] |
47 | /Users/greg/GIT/GoogleHashCode2017/outputDataSet/example.txt |
48 |
49 |
50 | pause |
51 | 2000 |
52 | |
53 |
54 |
55 | type |
56 | //input[@type="file"][1] |
57 | /Users/greg/GIT/GoogleHashCode2017/outputDataSet/example.txt |
58 |
59 |
60 | pause |
61 | 2000 |
62 | |
63 |
64 |
65 | click |
66 | //md-card[2]/md-card-actions/button[2] |
67 | |
68 |
69 |
70 |
71 |
72 |
--------------------------------------------------------------------------------
/zipSourceCode.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | #removes an existing archive
3 | rm googleHashCode_Pizza.*
4 | #zip all the project code
5 | zip -r googleHashCode_Pizza .
--------------------------------------------------------------------------------
| | | | |