بنقرة واحدة
show-side-by-side
For comparison: display before/after, multiple solutions, diffs side by side for visual comparison.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
For comparison: display before/after, multiple solutions, diffs side by side for visual comparison.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Conducts iterative deep research on any topic using web search, progressive exploration, and structured synthesis. Use when asked for comprehensive research, deep investigation, thorough analysis, or multi-source exploration of any topic. Triggers: research, investigate, deep dive, comprehensive analysis, explore thoroughly, find everything about.
For cross-cutting concerns: add behavior without modifying functions, caching, timing, logging, validation wrappers.
For performance work: measure before changing, profile to find bottlenecks, compare before and after.
For symbolic computation: ASTs, mathematical expressions, code that manipulates code structure, expression transformations.
For ordered processing: A* search, Dijkstra, event simulation, task scheduling. Efficient min/max extraction with heap-based queue.
For dynamic programming: overlapping subproblems, recursive solutions with repeated computations, memoization to avoid redundant work.
| name | show-side-by-side |
| description | For comparison: display before/after, multiple solutions, diffs side by side for visual comparison. |
Print two or more outputs in parallel columns.
def side_by_side(left, right, width=40, labels=('Left', 'Right')):
"""Print two strings side by side."""
left_lines = left.splitlines()
right_lines = right.splitlines()
# Header
print(f"{labels[0]:<{width}} {labels[1]:<{width}}")
print('-' * width + ' ' + '-' * width)
# Content
for l, r in zip_longest(left_lines, right_lines, fillvalue=''):
print(f"{l:<{width}} {r:<{width}}")
# Sudoku.ipynb - puzzle vs solution
def print_side_by_side(left, right, width=20):
"""Print two strings side-by-side, line-by-line."""
for L, R in zip(left.splitlines(), right.splitlines()):
print(L.ljust(width), R.ljust(width))
# Usage
puzzle = '''
4 . . |. . . |8 . 5
. 3 . |. . . |. . .
. . . |7 . . |. . .
------+------+------
. 2 . |. . . |. 6 .
. . . |. 8 . |4 . .
. . . |. 1 . |. . .
------+------+------
. . . |6 . 3 |. 7 .
5 . . |2 . . |. . .
1 . 4 |. . . |. . .
'''
solution = '''
4 1 7 |3 6 9 |8 2 5
6 3 2 |1 5 8 |9 4 7
9 5 8 |7 2 4 |3 1 6
------+------+------
8 2 5 |4 3 7 |1 6 9
7 9 1 |5 8 6 |4 3 2
3 4 6 |9 1 2 |7 5 8
------+------+------
2 8 9 |6 4 3 |5 7 1
5 7 3 |2 9 1 |6 8 4
1 6 4 |8 7 5 |2 9 3
'''
print_side_by_side(puzzle, solution)
# Multiple comparison
def show_algorithms(puzzle, *algorithms):
"""Compare multiple algorithm results."""
results = [algo(puzzle) for algo in algorithms]
names = [algo.__name__ for algo in algorithms]
# Print headers
width = 25
print(' '.join(name.center(width) for name in names))
print(' '.join('-' * width for _ in names))
# Print results line by line
result_lines = [r.splitlines() for r in results]
for lines in zip(*result_lines):
print(' '.join(line.ljust(width) for line in lines))