This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Usage example: | |
@timer_decorator | |
def sum_list(numbers): | |
return sum(numbers) | |
numbers = list(range(1, 1000000)) # Create a list of numbers from 1 to 999999 | |
result = sum_list(numbers) | |
print(f"Sum: {result}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; this is not a complete tox.ini file but just one env!!! | |
[testenv:coverage] | |
; it requires 'setup.py' or 'pyproject.toml' to have package installable. | |
deps = -rrequirements.txt | |
-rtox-reqs/coverage.txt | |
; usedevelop - fix problems with 0% coverage https://stackoverflow.com/a/69462954/3247880 | |
usedevelop=True | |
commands = | |
pytest --cov trend_classifier/ --cov-report html --cov-fail-under=70 tests/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pytest | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will upload a Python Package using Twine when a release is created | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries | |
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Upload Python Package |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Tests with Tox | |
on: | |
push: | |
branches: | |
- '*' # This will trigger the action on push to any branch | |
jobs: | |
test: | |
runs-on: ubuntu-latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Check links in README | |
# from: unixorn/git-extra-commands | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ '*' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.animation import FuncAnimation | |
from PIL import Image | |
def create_plot(i): | |
plt.clf() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git-cliff ~ default configuration file | |
# https://git-cliff.org/docs/configuration | |
# | |
# Lines starting with "#" are comments. | |
# Configuration options are organized into tables and keys. | |
# See documentation for more information on available options. | |
[changelog] | |
# template for the changelog footer | |
header = """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Requires the following environment variables (you can use it as .env_template): | |
COMPLETION_DEPLOYMENT_NAME= | |
EMBEDDING_DEPLOYMENT_NAME= | |
AZURE_OPENAI_API_KEY= | |
AZURE_OPENAI_ENDPOINT= | |
AZURE_OPENAI_API_VERSION= | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Smoke test for the Azure OpenAI model from langchain_openai. | |
Check if the API is working as expected and all the required environment variables are set. | |
Requires the following environment variables (you can use it as .env_template): | |
AZURE_OPENAI_API_KEY= | |
AZURE_OPENAI_API_VERSION= | |
AZURE_OPENAI_ENDPOINT= | |
COMPLETION_DEPLOYMENT_NAME= | |
""" |
NewerOlder