This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data = """ | |
| """ | |
| def solve1(data): | |
| hpos = 0 | |
| depth = 0 | |
| for instruction in data.splitlines(): | |
| direction, number = instruction.split() | |
| number = int(number) | |
| if direction == "forward": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| map = """\ | |
| ......#...........#...#........ | |
| .#.....#...##.......#.....##... | |
| ......#.#....#................. | |
| ..............#.#.......#...... | |
| .....#.#...##...#.#..#..#..#..# | |
| .......##...#..#...........#... | |
| .......#.##.#...#.#.........#.. | |
| ..#...##............##......#.# | |
| .......#.......##......##.##.#. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package test.picocli; | |
| import io.micronaut.configuration.picocli.PicocliRunner; | |
| import io.micronaut.context.ApplicationContext; | |
| import picocli.CommandLine; | |
| import picocli.CommandLine.Command; | |
| import picocli.CommandLine.Option; | |
| import picocli.CommandLine.Parameters; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>test.picocli</groupId> | |
| <artifactId>test-picocli</artifactId> | |
| <version>0.1</version> | |
| <properties> | |
| <micronaut.version>1.3.0</micronaut.version> | |
| <jdk.version>13</jdk.version> | |
| <maven.compiler.target>${jdk.version}</maven.compiler.target> | |
| <maven.compiler.source>${jdk.version}</maven.compiler.source> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| license: mit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Extracts the user and password for the VPNBook free VPN service | |
| # out of their web site | |
| # URL to the site containing user and password | |
| SITE="http://www.vpnbook.com/freevpn" | |
| # File where VPNBook credentials get stored | |
| AUTH_FILE="/etc/openvpn/vpnbook.auth" | |
| # Path to temporary file | |
| AUTH_FILE_TMP="/tmp/vpnbook.$$" |