Skip to content

Instantly share code, notes, and snippets.

View Impulsleistung's full-sized avatar
🎧
Focusing

Kevin Ostheimer Impulsleistung

🎧
Focusing
View GitHub Profile
@Impulsleistung
Impulsleistung / smd.py
Created February 1, 2025 20:14
animation of spring-mass-damper system with realistic physics
import pygame
import pymunk
import pymunk.pygame_util
import numpy as np
from scipy.signal import sawtooth
# Initialisierung
pygame.init()
WIDTH, HEIGHT = 800, 600
window = pygame.display.set_mode((WIDTH, HEIGHT))
@Impulsleistung
Impulsleistung / perplexity-api-test-files.py
Created September 18, 2024 06:48
Usage of llama-3.1-sonar-small-128k-online
import os
import sys
from dotenv import load_dotenv
from langchain_community.chat_models import ChatPerplexity
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.output_parsers import StrOutputParser
# Load environment variables
load_dotenv()