Auto Topic: def
auto_def | topic
Coverage Score
1
Mentioned Chunks
73
Mentioned Docs
16
Required Dimensions
definitionpros_cons
Covered Dimensions
definitionpros_cons
Keywords
def
Relations
| Source | Type | Target | W |
|---|---|---|---|
| Auto Topic: def | CO_OCCURS | Auto Topic: self | 56 |
| Auto Topic: def | CO_OCCURS | Auto Topic: rows | 36 |
| Auto Topic: def | CO_OCCURS | Auto Topic: row | 34 |
| Auto Topic: cols | CO_OCCURS | Auto Topic: def | 34 |
| Auto Topic: col | CO_OCCURS | Auto Topic: def | 21 |
| Auto Topic: def | CO_OCCURS | Auto Topic: len | 18 |
| Auto Topic: def | CO_OCCURS | Auto Topic: fill | 17 |
| Auto Topic: copy | CO_OCCURS | Auto Topic: def | 17 |
| Auto Topic: def | CO_OCCURS | Auto Topic: pack | 16 |
| Auto Topic: def | CO_OCCURS | Auto Topic: perform_move | 15 |
| Auto Topic: def | CO_OCCURS | Auto Topic: int | 14 |
| Auto Topic: def | CO_OCCURS | Auto Topic: tkinter | 14 |
| Auto Topic: def | CO_OCCURS | Auto Topic: padx | 13 |
| Auto Topic: canvas | CO_OCCURS | Auto Topic: def | 13 |
| Auto Topic: def | CO_OCCURS | Auto Topic: vertical | 12 |
| Auto Topic: def | CO_OCCURS | Auto Topic: raise | 11 |
| Auto Topic: def | CO_OCCURS | Auto Topic: valueerror | 11 |
| Auto Topic: def | CO_OCCURS | Auto Topic: get_board | 11 |
| Auto Topic: def | CO_OCCURS | Auto Topic: square_size | 10 |
| Auto Topic: config | CO_OCCURS | Auto Topic: def | 10 |
| Auto Topic: def | CO_OCCURS | Auto Topic: import | 9 |
| Auto Topic: def | CO_OCCURS | Auto Topic: scene | 9 |
| Auto Topic: def | CO_OCCURS | Auto Topic: master | 9 |
| Auto Topic: def | CO_OCCURS | Auto Topic: idx | 7 |
| Auto Topic: def | CO_OCCURS | Auto Topic: menu | 7 |
| Auto Topic: def | CO_OCCURS | Auto Topic: legal_moves | 7 |
| Auto Topic: def | CO_OCCURS | Auto Topic: imports | 6 |
| Auto Topic: def | CO_OCCURS | Auto Topic: isinstance | 6 |
| Auto Topic: def | CO_OCCURS | Auto Topic: is_legal_move | 6 |
| Auto Topic: def | CO_OCCURS | Auto Topic: lst | 5 |
| Auto Topic: def | CO_OCCURS | Breadth-First Search | 5 |
| Auto Topic: def | CO_OCCURS | Auto Topic: disabled | 5 |
| Auto Topic: def | CO_OCCURS | Auto Topic: messagebox | 5 |
| Auto Topic: def | CO_OCCURS | Auto Topic: dominoesgame | 5 |
| Auto Topic: abs | CO_OCCURS | Auto Topic: def | 5 |
| Auto Topic: def | CO_OCCURS | Auto Topic: margin | 4 |
| Auto Topic: def | CO_OCCURS | Auto Topic: goal_pos | 4 |
| Auto Topic: def | CO_OCCURS | Auto Topic: heap | 4 |
| Auto Topic: def | CO_OCCURS | Auto Topic: start_and_goal | 4 |
| Auto Topic: def | CO_OCCURS | Auto Topic: grid_size | 4 |
Evidence Chunks
| Source | Confidence | Mentions | Snippet |
|---|---|---|---|
assignments CIS5210-Assignments/M3/homework3-empty.py | 0.67 | 11 | ... ############################################### # Section 1: Tile Puzzle ############################################################ def create_tile_puzzle(rows, cols): pass class TilePuzzle(object): # Required def __init__(self, board): pass def get_board(self): pass def perfor ... |
assignments CIS5210-Assignments/M1/homework1.py | 0.67 | 9 | c] for c in text if c in DIGIT_MAP) def to_mixed_case(name): words = [w for w in name.split('_') if w] if not words: return "" return words[0].lower() + "".join(w.capitalize() for w in words[1:]) ############################################################ # Section 6: Polynomial ... |
assignments CIS5210-Assignments/M1/homework1.py | 0.67 | 8 | def every_other(seq): return seq[::2] ############################################################ # Section 4: Combinatorial Algorithms ############################################################ def prefixes(seq): for i in range(len(seq) + 1): yield seq[:i] def suffixes(seq): ... |
assignments CIS5210-Assignments/M2/homework2.py | 0.67 | 7 | elf._board) self._cols = len(self._board[0]) if self._rows else 0 def get_board(self): return self._board def perform_move(self, row, col): b = self._board rows = self._rows cols = self._cols b[row][col] = not b[row][col] if row > 0: b[row - 1][col] = not b[row - 1][col] if row + ... |
assignments CIS5210-Assignments/M3/homework3.py | 0.67 | 7 | gr) + abs(c - gc) def _manhattan(self, state): total = 0 for idx, tile in enumerate(state): if tile: total += self._tile_dist(tile, idx) return total def get_board(self): return self._board def perform_move(self, direction): delta = self._MOVE.get(direction) if delta is None: ret ... |
assignments CIS5210-Assignments/M1/homework1.py | 0.65 | 6 | ... ########################################### # Section 2: Working with Lists ############################################################ def extract_and_apply(lst, p, f): return [f(x) for x in lst if p(x)] def concatenate(seqs): return [elem for seq in seqs for elem in seq] def t ... |
assignments CIS5210-Assignments/M2/homework2_gui.py | 0.65 | 6 | d in self.__buttons.winfo_children(): child.config(state=tk.DISABLED) def __solve_finish(self): self.__solving = False for child in self.__buttons.winfo_children(): child.config(state=tk.NORMAL) def __update(self): self.__canvas.delete(tk.ALL) board = self.__puzzle.get_board() fo ... |
assignments CIS5210-Assignments/M3/homework3.py | 0.65 | 6 | ... ( self.size, self._goal_state, self._idx_to_rc, self._goal_pos, self._neighbors, ) = cache self._empty = self._find_empty() def _find_empty(self): for r, row in enumerate(self._board): for c, val in enumerate(row): if val == 0: return (r, c) return (0, 0) def _state(self): retur ... |
assignments CIS5210-Assignments/M3/homework3_tile_puzzle_gui.py | 0.65 | 6 | ... t>", lambda event: self.perform_move("left")) self.bind("<Right>", lambda event: self.perform_move("right")) self.focus_set() def perform_move(self, direction): self.puzzle.perform_move(direction) self.update_tiles() def update_tiles(self): puzzle_board = self.puzzle.get_board() ... |
assignments CIS5210-Assignments/M4/homework4.py | 0.65 | 6 | :] for row in self.board]) def successors(self, vertical): for move in self.legal_moves(vertical): new_game = self.copy() new_game.perform_move(move[0], move[1], vertical) yield (move, new_game) def get_random_move(self, vertical): moves = list(self.legal_moves(vertical)) if not ... |
assignments CIS5210-Assignments/M5/homework5_sudoku_gui.py | 0.65 | 6 | def dict2list(self, board_dict): for key, value in board_dict.items(): if len(value) == 1: self.game.puzzle[key[0]][key[1]] = list(value)[0] else: self.game.puzzle[key[0]][key[1]] = list(value) def solve_click_infer_ac3(self): board_dict = self.list2dict() SUDOKU = Sudoku(board_d ... |
assignments CIS5210-Assignments/M2/homework2.py | 0.63 | 5 | iag1 or (row + col) in diag2: return False cols.add(col) diag1.add(row - col) diag2.add(row + col) return True def n_queens_solutions(n): if n < 0: raise ValueError("n must be non-negative.") limit = (1 << n) - 1 board = [0] * n solutions = [] append = solutions.append def dfs(ro ... |
assignments CIS5210-Assignments/M3/homework3_grid_navigation_gui.py | 0.63 | 5 | ... tags="goal") self.start_and_goal[1] = point if point == self.start_and_goal[0]: self.delete("start") self.start_and_goal[0] = None def draw_point(self, point, color="black", tags=""): x, y = self.transform(point[0], point[1]) radius = self.square_size / 4.0 return self.create_ov ... |
assignments CIS5210-Assignments/M4/homework4.py | 0.63 | 5 | class DominoesGame(object): def __init__(self, board): if board is None: raise ValueError("board cannot be None") if not isinstance(board, list): raise TypeError("board must be a list of rows") self.rows = len(board) self.cols = len(board[0]) if self.rows else 0 for row in board: ... |
assignments CIS5210-Assignments/M4/homework4.py | 0.63 | 5 | l]) and (not b[row + 1][col]) if col + 1 >= self.cols: return False return (not b[row][col]) and (not b[row][col + 1]) def legal_moves(self, vertical): vertical = bool(vertical) b = self.board if vertical: for r in range(self.rows - 1): row = b[r] row2 = b[r + 1] for c in range(s ... |
assignments CIS5210-Assignments/M4/hw4-optimized.py | 0.63 | 5 | = ('board', 'rows', 'cols') def __init__(self, board): if board is None: raise ValueError("board cannot be None") if not isinstance(board, list): raise TypeError("board must be a list of rows") self.rows = len(board) self.cols = len(board[0]) if self.rows else 0 for row in board: ... |
assignments CIS5210-Assignments/M4/hw4-optimized.py | 0.63 | 5 | ... cols - 1 for r in range(rows): row = b[r] for c in range(col_limit): if not row[c] and not row[c + 1]: return False return True def copy(self): return DominoesGame([row[:] for row in self.board]) def successors(self, vertical): for move in self.legal_moves(vertical): new_game = ... |
assignments CIS5210-Assignments/M2/homework2.py | 0.61 | 4 | ... ################################################# # Section 1: N-Queens ############################################################ def num_placements_all(n): if n < 0: raise ValueError("n must be non-negative.") return math.comb(n * n, n) def num_placements_one_per_row(n): if n ... |