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

SourceTypeTargetW
Auto Topic: defCO_OCCURSAuto Topic: self56
Auto Topic: defCO_OCCURSAuto Topic: rows36
Auto Topic: defCO_OCCURSAuto Topic: row34
Auto Topic: colsCO_OCCURSAuto Topic: def34
Auto Topic: colCO_OCCURSAuto Topic: def21
Auto Topic: defCO_OCCURSAuto Topic: len18
Auto Topic: defCO_OCCURSAuto Topic: fill17
Auto Topic: copyCO_OCCURSAuto Topic: def17
Auto Topic: defCO_OCCURSAuto Topic: pack16
Auto Topic: defCO_OCCURSAuto Topic: perform_move15
Auto Topic: defCO_OCCURSAuto Topic: int14
Auto Topic: defCO_OCCURSAuto Topic: tkinter14
Auto Topic: defCO_OCCURSAuto Topic: padx13
Auto Topic: canvasCO_OCCURSAuto Topic: def13
Auto Topic: defCO_OCCURSAuto Topic: vertical12
Auto Topic: defCO_OCCURSAuto Topic: raise11
Auto Topic: defCO_OCCURSAuto Topic: valueerror11
Auto Topic: defCO_OCCURSAuto Topic: get_board11
Auto Topic: defCO_OCCURSAuto Topic: square_size10
Auto Topic: configCO_OCCURSAuto Topic: def10
Auto Topic: defCO_OCCURSAuto Topic: import9
Auto Topic: defCO_OCCURSAuto Topic: scene9
Auto Topic: defCO_OCCURSAuto Topic: master9
Auto Topic: defCO_OCCURSAuto Topic: idx7
Auto Topic: defCO_OCCURSAuto Topic: menu7
Auto Topic: defCO_OCCURSAuto Topic: legal_moves7
Auto Topic: defCO_OCCURSAuto Topic: imports6
Auto Topic: defCO_OCCURSAuto Topic: isinstance6
Auto Topic: defCO_OCCURSAuto Topic: is_legal_move6
Auto Topic: defCO_OCCURSAuto Topic: lst5
Auto Topic: defCO_OCCURSBreadth-First Search5
Auto Topic: defCO_OCCURSAuto Topic: disabled5
Auto Topic: defCO_OCCURSAuto Topic: messagebox5
Auto Topic: defCO_OCCURSAuto Topic: dominoesgame5
Auto Topic: absCO_OCCURSAuto Topic: def5
Auto Topic: defCO_OCCURSAuto Topic: margin4
Auto Topic: defCO_OCCURSAuto Topic: goal_pos4
Auto Topic: defCO_OCCURSAuto Topic: heap4
Auto Topic: defCO_OCCURSAuto Topic: start_and_goal4
Auto Topic: defCO_OCCURSAuto Topic: grid_size4

Evidence Chunks

SourceConfidenceMentionsSnippet
assignments
CIS5210-Assignments/M3/homework3-empty.py
0.6711... ############################################### # 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.679c] 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.678def 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.677elf._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.677gr) + 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.656... ########################################### # 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.656d 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.656... ( 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.656... 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.656:] 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.656def 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.635iag1 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.635... 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.635class 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.635l]) 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.635= ('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.635... 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.614... ################################################# # 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 ...