用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/vamseeachanta/workspace-hub --skill python-pptx-4-table-creation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Write outbound email and external messages in Vamsee Achanta's voice — a subtle offer to help, never bold or rash claims. Load before drafting ANY email, LinkedIn/Collide reply, proposal note, or outreach sent under his name.
Save/publish analysis or computation results from ANY ecosystem repo to Hugging Face as a queryable, viewer-renderable dataset. Use when the user wants to "save results to hugging face", "publish dataset to HF", "hugging face data saving", "save analysis results", "hf dataset", "make results queryable", or "render via datasets-server API". Reshapes nested results into flat parquet tables, writes a dataset card with a viewer `configs:` block and provenance, applies license/public-vs-private routing, enforces a domain data-quality gate (faithful-to-source != correct), publishes to `aceengineer/<repo>-<projection>`, and verifies via the datasets-server API.
Clone, create, fork, configure, and manage GitHub repositories. Manage remotes, secrets, releases, and workflows. Works with gh CLI or falls back to git + GitHub REST API via curl.
正在显示 SKILL.md
基于 SOC 职业分类
| name | python-pptx-4-table-creation |
| description | Sub-skill of python-pptx: 4. Table Creation. |
| version | 1.0.0 |
| category | data |
| type | reference |
| scripts_exempt | true |
"""
Create and format tables in PowerPoint presentations.
"""
from pptx import Presentation
from pptx.util import Inches, Pt
from pptx.dml.color import RgbColor
from pptx.enum.text import PP_ALIGN, MSO_ANCHOR
from pptx.oxml.ns import qn
from pptx.oxml import parse_xml
from typing import List, Any
def set_cell_color(cell, color_hex: str) -> None:
"""Set cell background color."""
cell.fill.solid()
cell.fill.fore_color.rgb = RgbColor(
int(color_hex[0:2], 16),
int(color_hex[2:4], 16),
int(color_hex[4:6], 16)
)
def create_table_slide(
prs: Presentation,
title: str,
headers: List[str],
data: List[List[Any]],
col_widths: List[float] = None
) -> None:
"""Create a slide with a formatted table."""
slide = prs.slides.add_slide(prs.slide_layouts[5]) # Title only
slide.shapes.title.text = title
rows = len(data) + 1 # +1 for header
cols = len(headers)
# Default column widths
if col_widths is None:
total_width = 11
col_widths = [total_width / cols] * cols
# Create table
table_width = sum(col_widths)
left = Inches((13.333 - table_width) / 2) # Center table
top = Inches(1.8)
width = Inches(table_width)
height = Inches(0.5 * rows)
table = slide.shapes.add_table(rows, cols, left, top, width, height).table
# Set column widths
for i, w in enumerate(col_widths):
table.columns[i].width = Inches(w)
# Style header row
for i, header in enumerate(headers):
cell = table.cell(0, i)
cell.text = header
set_cell_color(cell, '2F5496')
# Format text
para = cell.text_frame.paragraphs[0]
para.font.bold = True
para.font.size = Pt(12)
para.font.color.rgb = RgbColor(255, 255, 255)
para.alignment = PP_ALIGN.CENTER
cell.vertical_anchor = MSO_ANCHOR.MIDDLE
# Add data rows
for row_idx, row_data in enumerate(data, start=1):
for col_idx, value in enumerate(row_data):
cell = table.cell(row_idx, col_idx)
cell.text = str(value)
# Alternate row colors
if row_idx % 2 == 0:
set_cell_color(cell, 'D6DCE5')
# Format text
para = cell.text_frame.paragraphs[0]
para.font.size = Pt(11)
para.alignment = PP_ALIGN.CENTER
cell.vertical_anchor = MSO_ANCHOR.MIDDLE
def create_table_presentation(output_path: str) -> None:
"""Create presentation with various table examples."""
prs = Presentation()
# Simple data table
headers = ['Product', 'Q1', 'Q2', 'Q3', 'Q4', 'Total']
data = [
['Widget A', '$150K', '$180K', '$220K', '$250K', '$800K'],
['Widget B', '$80K', '$95K', '$110K', '$130K', '$415K'],
['Widget C', '$200K', '$220K', '$260K', '$290K', '$970K'],
['Total', '$430K', '$495K', '$590K', '$670K', '$2.19M'],
]
create_table_slide(
prs,
"Quarterly Sales Summary",
headers,
data,
col_widths=[2, 1.5, 1.5, 1.5, 1.5, 1.5]
)
# Comparison table
headers = ['Feature', 'Basic Plan', 'Pro Plan', 'Enterprise']
data = [
['Users', '5', '25', 'Unlimited'],
['Storage', '10 GB', '100 GB', '1 TB'],
['Support', 'Email', '24/7 Chat', 'Dedicated'],
['Price/mo', '$9', '$29', '$99'],
]
create_table_slide(
prs,
"Pricing Comparison",
headers,
data,
col_widths=[3, 2.5, 2.5, 2.5]
)
# Schedule/Timeline table
headers = ['Phase', 'Start', 'End', 'Status', 'Owner']
data = [
['Planning', 'Jan 1', 'Jan 15', 'Complete', 'Team A'],
['Development', 'Jan 16', 'Mar 31', 'In Progress', 'Team B'],
['Testing', 'Apr 1', 'Apr 30', 'Pending', 'Team C'],
['Launch', 'May 1', 'May 15', 'Pending', 'Team D'],
]
create_table_slide(
prs,
"Project Timeline",
headers,
data,
col_widths=[2.5, 1.5, 1.5, 2, 2]
)
prs.save(output_path)
print(f"Table presentation saved to {output_path}")
create_table_presentation("table_presentation.pptx")