This file contains hidden or 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
# Save in "payload.json" | |
{ | |
"model": "chatgpt-5", | |
"messages": [ | |
{ | |
"role": "system", | |
"content": "Your instructions:\n When prompted with a specific psalm (e.g., \"Psalm 23\" or \"23\"), you will write a six-paragraph abstract of psalm \\(abstract.psalmNumber) by following the $ | |
}, | |
{ |
This file contains hidden or 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
# Prompt | |
curl http://localhost:1234/v1/chat/completions \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"model": "deepseek-coder-v2-lite-instruct-mlx", | |
"messages": [ | |
{ "role": "system", "content": "Answer all English questions in Spanish" }, | |
{ "role": "user", "content": "How are you?" } | |
], |
This file contains hidden or 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
from openai import OpenAI | |
client = OpenAI() | |
response = client.chat.completions.create( | |
model="gpt-4-1106-preview", | |
messages=[ | |
{"role": "system", "content": "You are a helpful AI assistant."}, | |
{"role": "user", "content": "List 3 countries and their capitals."} | |
], |
This file contains hidden or 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
from openai import OpenAI | |
client = OpenAI() | |
stream = client.chat.completions.create( | |
model="gpt-4-1106-preview", # or "gpt-4.1" if that's valid in your setup | |
messages=[ | |
{ | |
"role": "user", | |
"content": "Say 'double bubble bath' ten times fast.", |
This file contains hidden or 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
curl -s -X POST http://192.168.12.135:1234/v1/chat/completions \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"model": "deepseek-coder-v2-lite-instruct-mlx", | |
"messages": [ | |
{"role": "system", "content": "You are an expert programmer."}, | |
{"role": "user", "content": "Write a bash script"} | |
] | |
}' | jq -r '.choices[0].message.content' |
This file contains hidden or 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
// | |
// ContentView.swift | |
// ChatGPTCoreModel_playground | |
// | |
// Created by Xcode Developer on 7/15/25. | |
// | |
import SwiftUI | |
import FoundationModels |
This file contains hidden or 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 SwiftUI | |
struct ContentTestView: View { | |
@State private var psalmValue: Int = 1 | |
@State private var psalmStringValue: String = "1" | |
@FocusState private var isTextFieldFocused: Bool | |
var body: some View { | |
VStack(spacing: 20) { | |
Text("PSALM") |
This file contains hidden or 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 SwiftUI | |
import HighlightSwift | |
struct SwiftSyntaxHighlighting: View { | |
@State private var code: String = """ | |
struct Example { | |
var text = "Hello, world!" | |
func greet() { | |
print(text) | |
} |
This file contains hidden or 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
cd ~/Desktop / PlanetaryHoursSwift | |
sudo ls -l | |
sudo rm -rf .git | |
sudo ls -a | |
git init | |
git add . | |
git commit -m "Initial commit" | |
git remote add origin https: // github.com/theoknock/PlanetaryHoursSwift.git | |
git push -u origin main |
This file contains hidden or 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 SwiftUI | |
import CoreLocation | |
struct ContentView: View { | |
@StateObject private var locationManager = LocationManager() | |
@State private var sunrise: Date = Date().addingTimeInterval(TimeInterval(TimeZone.current.secondsFromGMT(for: Date()))) | |
@State private var sunset: Date = Date().addingTimeInterval(TimeInterval(TimeZone.current.secondsFromGMT(for: Date()))) | |
@State private var nextDaySunrise: Date = Date().addingTimeInterval(TimeInterval(TimeZone.current.secondsFromGMT(for: Date()))) | |
@State private var hours: [PlanetaryHourSegmenter.PlanetaryHourSegment] = [] | |
@State private var longitudes: [LongitudeSegmenter.Segment] = [] |
NewerOlder