Skip to content

Instantly share code, notes, and snippets.

View Langenhoven's full-sized avatar

Christopher Langenhoven Langenhoven

View GitHub Profile
import anthropic
client = anthropic.Anthropic(
# defaults to os.environ.get("ANTHROPIC_API_KEY")
api_key="my_api_key",
)
message = client.messages.create(
model="claude-3-opus-20240229",
max_tokens=1000,
temperature=1,
To install all currently supported python versions (python 3.6 is already pre-installed) including pip for Ubuntu 18.04 do the following:
# Install Python 3.8 System wide
echo "Installing Python 3.8..."
sudo -S add-apt-repository ppa:deadsnakes/ppa -y
sudo -S apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3.8 \
python3.8-dev \
@Langenhoven
Langenhoven / ussd.cs
Created August 22, 2021 22:44 — forked from JaniKibichi/ussd.cs
USSD on c#
/*
A few things to note about USSD:
USSD is session driven. Every request we send you will contain a sessionId, and this will be maintained until that session is completed
You will need to let the Mobile Service Provider know whether the session is complete or not. If the session is ongoing, please begin your response with CON. If this is the last response for that session, begin your response with END.
If we get a HTTP error response (Code 40X) from your script, or a malformed response (does not begin with CON or END, we will terminate the USSD session gracefully.
using visual studio 2013 or Greater
go to file > new > project
in the projects window choose web under C#
select ASP.NET Web Application and name your project as you like