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