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
| BASE_NAME = paper | |
| INPUTS = $(wildcard *.tex) *.bib | |
| LATEX = latex | |
| PDFLATEX = pdflatex | |
| BIBTEX = bibtex | |
| MAKEINDEX = makeindex | |
| pdf: $(BASE_NAME).pdf | |
| ps: $(BASE_NAME).ps |
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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
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
| # @ -> our hero | |
| # G -> ghosts | |
| # P -> pills | |
| # . -> empty spaces | |
| # | and - -> walls | |
| map = [ | |
| "|--------|", | |
| "|G..|..G.|", | |
| "|...PP...|", | |
| "|G...@.|.|", |
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
| import com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.PrintWriter; |
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
| import com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.Node; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.util.HashSet; |
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
| import com.github.javaparser.StaticJavaParser; | |
| import com.github.javaparser.ast.CompilationUnit; | |
| import com.github.javaparser.ast.expr.MethodCallExpr; | |
| import com.github.javaparser.ast.visitor.ModifierVisitor; | |
| import com.github.javaparser.ast.visitor.Visitable; | |
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.util.HashSet; | |
| import java.util.Set; |
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
| public static void main(String[] args) throws FileNotFoundException { | |
| CompilationUnit cu = StaticJavaParser.parse(new FileInputStream("/Users/mauricioaniche/workspace/logremoval/fixture/A.java")); | |
| cu.accept(new ModifierVisitor<Void>() { | |
| @Override | |
| public Visitable visit(final MethodCallExpr n, Void arg) { | |
| boolean isALogClass = n.getScope().isPresent() && (logClasses.stream().anyMatch(x -> n.getScope().get().toString().startsWith(x))); | |
| boolean isALogMethod = logMethods.contains(n.getName().asString()); |
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
| def bf_queen(m): | |
| return bf_queen_rec(m, 0) | |
| def check(r, v): | |
| pos_1, pos_2 = v, v | |
| for j in r: | |
| pos_1 = pos_1 - 1 | |
| if m[j] == pos_1: | |
| return False |
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
| import builtins | |
| input_values = [] | |
| print_values = [] | |
| def mock_input(s): | |
| print_values.append(s) | |
| return input_values.pop(0) |
NewerOlder