This file contains 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 requests | |
from twilio.rest import Client | |
import emoji | |
from datetime import date |
This file contains 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
today = date.today() | |
today_converted = date(today.year, today.month, today.day) | |
target_date = date(2020, 1, 6) | |
delta = target_date - today_converted |
This file contains 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
response = requests.get('https://api.nasa.gov/planetary/apod?api_key=XXXXXXXXXX') | |
response_json = response.json() | |
# variables for the text message | |
picture = response_json['url'] | |
title = response_json['title'] | |
rocket = emoji.emojize(":rocket:") |
This file contains 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
# Twilio account credentials | |
account_sid = 'ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
auth_token = '9fxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' | |
client = Client(account_sid, auth_token) | |
# text message setup | |
message = client.messages \ | |
.create( | |
body=f'Today\'s picture is of: {title}! \n\n Btw...T{delta.days} days until we go to NASA! {rocket}', | |
from_='+1xxxxxxxxxx', |
This file contains 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
# modules to import | |
import requests | |
from twilio.rest import Client | |
import emoji | |
from datetime import date | |
# date variables | |
today = date.today() | |
today_converted = date(today.year, today.month, today.day) | |
target_date = date(2020, 1, 6) |
This file contains 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 datetime | |
import logging | |
import azure.functions as func | |
import requests | |
from datetime import date | |
from twilio.rest import Client | |
import emoji |
This file contains 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
# modules to import | |
import datetime | |
import logging | |
import azure.functions as func | |
import requests | |
from datetime import date | |
from twilio.rest import Client | |
import emoji |
This file contains 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
azure-functions | |
requests | |
datetime | |
twilio | |
emoji |
This file contains 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
// 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); |
This file contains 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
if (Input.GetKeyDown("r")) | |
{ | |
SceneManager.LoadScene("SceneOne"); | |
} |
OlderNewer