برچسب: Thomas

  • Pandas v Psycopg. A Postgres database speed test. Who… | by Thomas Reid


    Two racing cars in a race, one represents Pandas, the other Psycopg2
    Image by Author

    Following on from a story I wrote comparing the speed of Pandas and Polars libraries in terms of reading and writing data — from and to — a Postgres database I thought it might be interesting to do a similar comparison between Pandas and Psycopg2.

    If you need to get data from or to a Postgres database table from or to a local file, read on for the winner.

    You can find the Pandas v Polars article at the link below:

    Pandas

    I don’t think I need to explain much about what Pandas is. Its use in Python code is ubiquitous and is one of the main tools that people use to load, explore, visualise and process large amounts of data in Python.

    Psycopg

    Psycopg is one of the most popular PostgreSQL database libraries for the Python programming language. It implements the Python Database API Specification v2.0, allowing Python applications to communicate with PostgreSQL databases.



    Source link

  • Calling AWS Bedrock from code. Using Python in a Jupyter notebook | by Thomas Reid


    Image by Author

    Using Python in a Jupyter notebook

    Many of you will know that every man and his dog are producing AI products or LLM’s and integrating them with their products. Not surprisingly AWS — the biggest cloud services provider — is also getting in on the act.

    What is bedrock?

    Its AI offering is called Bedrock and the following blurb from it’s website describes what Bedrock is.

    Amazon Bedrock is a fully managed service that offers a choice of high-performing foundation models (FMs) from leading AI companies like AI21 Labs, Anthropic, Cohere, Meta, Stability AI, and Amazon via a single API, along with a broad set of capabilities you need to build generative AI applications, simplifying development while maintaining privacy and security. With Amazon Bedrock’s comprehensive capabilities, you can easily experiment with a variety of top FMs, privately customize them with your data using techniques such as fine-tuning and retrieval augmented generation (RAG), and create managed agents that execute complex business tasks — from booking travel and processing insurance claims to creating ad campaigns and managing inventory — all without writing any code. Since Amazon Bedrock is serverless, you don’t have to manage any infrastructure, and you can securely integrate and deploy generative AI…



    Source link