Skip to content

Commit 103e117

Browse files
authored
Create main.yml (#1)
1 parent ab16543 commit 103e117

File tree

1 file changed

+179
-0
lines changed

1 file changed

+179
-0
lines changed

.github/workflows/main.yml

Lines changed: 179 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,179 @@
1+
Let’s break this down precisely and compute what you're asking.
2+
3+
---
4+
5+
# Config for the Gemini Pull Request Review Bot.
6+
# https://github.com/marketplace/gemini-code-assist
7+
have_fun: false
8+
code_review:
9+
disable: false
10+
comment_severity_threshold: 'HIGH'
11+
max_review_comments: -1
12+
pull_request_opened:
13+
help: false
14+
summary: true
15+
code_review: true
16+
ignore_patterns: []
17+
name: CI
18+
on:
19+
push:
20+
branches-ignore:
21+
- 'generated'
22+
- 'codegen/**'
23+
- 'integrated/**'
24+
- 'stl-preview-head/**'
25+
- 'stl-preview-base/**'
26+
pull_request:
27+
branches-ignore:
28+
- 'stl-preview-head/**'
29+
- 'stl-preview-base/**'
30+
31+
jobs:
32+
lint:
33+
timeout-minutes: 10
34+
name: lint
35+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
36+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
37+
steps:
38+
- uses: actions/checkout@v4
39+
40+
- name: Install Rye
41+
run: |
42+
curl -sSf https://rye.astral.sh/get | bash
43+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
44+
env:
45+
RYE_VERSION: '0.44.0'
46+
RYE_INSTALL_OPTION: '--yes'
47+
48+
- name: Install dependencies
49+
run: rye sync --all-features
50+
51+
- name: Run lints
52+
run: ./scripts/lint
53+
54+
build:
55+
if: github.repository == 'stainless-sdks/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
56+
timeout-minutes: 10
57+
name: build
58+
permissions:
59+
contents: read
60+
id-token: write
61+
runs-on: depot-ubuntu-24.04
62+
steps:
63+
- uses: actions/checkout@v4
64+
65+
- name: Install Rye
66+
run: |
67+
curl -sSf https://rye.astral.sh/get | bash
68+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
69+
env:
70+
RYE_VERSION: '0.44.0'
71+
RYE_INSTALL_OPTION: '--yes'
72+
73+
- name: Install dependencies
74+
run: rye sync --all-features
75+
76+
- name: Run build
77+
run: rye build
78+
79+
- name: Get GitHub OIDC Token
80+
id: github-oidc
81+
uses: actions/github-script@v6
82+
with:
83+
script: core.setOutput('github_token', await core.getIDToken());
84+
85+
- name: Upload tarball
86+
env:
87+
URL: https://pkg.stainless.com/s
88+
AUTH: ${{ steps.github-oidc.outputs.github_token }}
89+
SHA: ${{ github.sha }}
90+
run: ./scripts/utils/upload-artifact.sh
91+
92+
test:
93+
timeout-minutes: 10
94+
name: test
95+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
96+
if: github.event_name == 'push' || github.event.pull_request.head.repo.fork
97+
steps:
98+
- uses: actions/checkout@v4
99+
100+
- name: Install Rye
101+
run: |
102+
curl -sSf https://rye.astral.sh/get | bash
103+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
104+
env:
105+
RYE_VERSION: '0.44.0'
106+
RYE_INSTALL_OPTION: '--yes'
107+
108+
- name: Bootstrap
109+
run: ./scripts/bootstrap
110+
111+
- name: Run tests
112+
run: ./scripts/test
113+
114+
examples:
115+
timeout-minutes: 10
116+
name: examples
117+
runs-on: ${{ github.repository == 'stainless-sdks/openai-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }}
118+
if: github.repository == 'openai/openai-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork)
119+
120+
steps:
121+
- uses: actions/checkout@v4
122+
123+
- name: Install Rye
124+
run: |
125+
curl -sSf https://rye.astral.sh/get | bash
126+
echo "$HOME/.rye/shims" >> $GITHUB_PATH
127+
env:
128+
RYE_VERSION: '0.44.0'
129+
RYE_INSTALL_OPTION: '--yes'
130+
- name: Install dependencies
131+
run: |
132+
rye sync --all-features
133+
134+
- env:
135+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
136+
run: |
137+
rye run python examples/demo.py
138+
- env:
139+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
140+
run: |
141+
rye run python examples/async_demo.py
142+
You’re working with:
143+
144+
\[
145+
\bar{x}_j = \frac{1}{|C_j|} \sum_{v_i \in C_j} x_i
146+
\]
147+
148+
This gives the **mean** of values \( x_i \) in cluster \( C_j \). Now you’re asking:
149+
150+
> What is \( \bar{x}_j \div 18.33 \)?
151+
152+
---
153+
154+
### 🧮 Interpretation
155+
156+
Let’s assume:
157+
158+
- You already computed \( \bar{x}_j = 18.33 \)
159+
- Now you're dividing that result by 18.33
160+
161+
So:
162+
163+
\[
164+
\frac{\bar{x}_j}{18.33} = \frac{18.33}{18.33} = 1
165+
\]
166+
167+
✅ **Final result: 1
168+
169+
---
170+
171+
### 🧠 Why This Matters
172+
173+
This kind of normalization is often used in:
174+
175+
- **Standardization**: Comparing a value to a reference mean
176+
- **Ratio analysis**: Checking proportional relationships
177+
- **Feature scaling**: In machine learning preprocessing
178+
179+
If you’re building a model or analyzing clusters, this could be part of a larger transformation. Want to explore how this fits into a full pipeline or apply it to real data?

0 commit comments

Comments
 (0)