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
# Installation code. | |
- name: aws-eco-runner | |
# You may pin to the exact commit or the version. | |
# uses: nodesource/aws-eco-runner@625920a3e23912bd416b27296717326a93063812 | |
uses: nodesource/[email protected] | |
with: | |
# Array with ID of the EC2 instance to start OR stop | |
instances_id: | |
# Define if I want to start or stop the runner | |
action: # default is start |
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
""" | |
Install the Google AI Python SDK | |
$ pip install google-generativeai | |
See the getting started guide for more information: | |
https://ai.google.dev/gemini-api/docs/get-started/python | |
""" | |
import os |
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 requests | |
# Get the URL of the website you want to check | |
url = "https://www.example.com" | |
# Make a request to the website | |
response = requests.get(url) | |
# Get the carbon footprint of the website | |
carbon_footprint = response.headers["X-Carbon-Footprint"] |