Skip to content

Instantly share code, notes, and snippets.

View aprilspeight's full-sized avatar
💋

April Speight aprilspeight

💋
View GitHub Profile
# --------------------
# PROMPT AND DOCUMENT ATTACK
# --------------------
import os
from dotenv import load_dotenv
import requests
load_dotenv()
@aprilspeight
aprilspeight / groundedness.py
Last active May 7, 2024 19:23
Groundedness
# --------------------
# Groundedness Q&A
# --------------------
import os
from dotenv import load_dotenv
import requests
load_dotenv()
@aprilspeight
aprilspeight / InstantiateRandomPosition.cs
Created July 18, 2022 21:26
Instantiate a prefab at a random position on key press.
// Assign the prefab in the editor
public GameObject prefab;
void Update()
{
// Define range for random values
int spawnPointX = Random.Range(-2, 2);
int spawnPointY = Random.Range(-2, 2);
int spawnPointZ = Random.Range(-2, 2);
Vector3 spawnPosition = new Vector3(spawnPointX, spawnPointY, spawnPointZ);
@aprilspeight
aprilspeight / InstantiateKeyPress.cs
Created July 18, 2022 21:23
Instantiate a prefab on key press.
// Assign the prefab in the editor
public GameObject prefab;
void Update()
{
// Spawns a prefab when a key is pressed
if (Input.GetKeyDown("space"))
{
Instantiate(prefab);
}
@aprilspeight
aprilspeight / InstantiatePosition.cs
Created July 18, 2022 21:19
Instantiate a prefab at a specific position.
// Assign the prefab in the editor
public GameObject prefab;
void Start()
{
// Spawns a prefab at a specific position with no rotation
Instantiate(prefab, new Vector3(2, 2, -2), Quaternion.identity);
}
@aprilspeight
aprilspeight / InstantiatePrefab.cs
Created July 18, 2022 21:17
Instantiate a prefab.
// Assign the prefab in the editor
public GameObject prefab;
void Start()
{
// Spawns a prefab at the default position 0, 0, 0 with a default rotation 0, 0, 0
Instantiate(prefab);
}
@aprilspeight
aprilspeight / SwitchScenes.cs
Created July 18, 2022 19:20
Switch between scenes on key press.
if (Input.GetKeyDown("1"))
{
SceneManager.LoadScene("SceneOne");
}
else if (Input.GetKeyDown("2"))
{
SceneManager.LoadScene("SceneTwo");
}
@aprilspeight
aprilspeight / LoadSceneKeyPress.cs
Created July 18, 2022 19:19
Change scene on key press.
if (Input.GetKeyDown("r"))
{
SceneManager.LoadScene("SceneOne");
}
@aprilspeight
aprilspeight / SpawnPrefab.cs
Last active July 18, 2022 19:17
Spawns a prefab at a random position.
// Assign the prefab in the editor
public GameObject prefab;
void Update()
{
// Define range for random values
int spawnPointX = Random.Range(-2, 2);
int spawnPointY = Random.Range(-2, 2);
int spawnPointZ = Random.Range(-2, 2);
Vector3 spawnPosition = new Vector3(spawnPointX, spawnPointY, spawnPointZ);
azure-functions
requests
datetime
twilio
emoji