Skip to content

Instantly share code, notes, and snippets.

View izikeros's full-sized avatar

Krystian Safjan izikeros

View GitHub Profile
@izikeros
izikeros / matplotlib_animation.py
Created July 3, 2024 11:19
[Animated GIFs from Matplotlib Plots] #visualization
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()
@izikeros
izikeros / cliff.toml
Created June 26, 2024 13:24
[git-cliff config] Configuration for git-cliff #changelog #git-cliff
# 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 = """
@izikeros
izikeros / ragas_azureopenai.py
Created April 11, 2024 08:05
[RAGAS AzureOpenAI boilerplate] #ragas #openai
"""
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=
"""
@izikeros
izikeros / langchain_openai.py
Last active April 11, 2024 08:05
[Langchain OpenAI biolerplate] The small example that can be a test if RAGAS and openai are configured properly and both works #langchain #openai
"""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=
"""
@izikeros
izikeros / azureopenai.py
Created April 11, 2024 08:02
[Azure OpenAI biolerplate] The small example that can be a test if openai is configured properly and works #openai
"""Smoke test for Azure OpenAI API.
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=
"""
@izikeros
izikeros / README.md
Created April 5, 2024 10:09
[release GitHub Action] #github #action

release GitHub Action

  • at 4:55 uses github action that analyse commits and creates versions
    • github.com/EddieHubCommunity/LinkFree/blob/main/.github/workflows/release.yml
@izikeros
izikeros / README.md
Last active April 5, 2024 04:05
[gitversion GitHub Action] GitHub action that support versioning for mono repo #github #action
@izikeros
izikeros / display_all_outputs_from_the_cell.ipynb
Last active March 27, 2024 17:23
[display out outputs from the cell] display out outputs from the cell instead of default last one #pandas
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@izikeros
izikeros / frontmatter.yaml
Last active May 7, 2024 07:56
[quarto notebook frontmatter] Frontmatter added to the first RAW cell in the notebook that define how to render report from the notebook #jupyter #notebook #quarto
---
title: 'Exploratory analysis'
author: 'Krystian Safjan'
date: '2024-01-03'
execute:
echo: false
format:
html:
toc: true
toc-depth: 5
@izikeros
izikeros / ruff.toml
Last active March 23, 2024 04:07
[ruff config] The sane configuration that expands default ruff config #ruff #ruff-config #qa #python #python-qa #configuration
exclude = [
".tox",
".git",
"docs",
"venv",
".venv",
"*.pyc",
".git",
"__pycache__",
]