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
require 'http' | |
require 'json' | |
# Load API Key from ENV | |
API_KEY = ENV['STABILITY'] | |
raise "API key is missing. Set the STABILITY environment variable." if API_KEY.nil? || API_KEY.empty? | |
API_URL = 'https://api.stability.ai/v2beta/image-to-video' | |
# Define the path to your image |
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
require 'googleauth' | |
require 'json' | |
require 'net/http' | |
require 'uri' | |
require 'nokogiri' # to parse the sitemap | |
require 'cgi' | |
SCOPES = ['https://www.googleapis.com/auth/indexing'] | |
ENDPOINT = 'https://indexing.googleapis.com/v3/urlNotifications:publish' | |
JSON_KEY_FILE = 'page-indexing-000000-26ca419af0a4.json' #replace with your json key file |
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 necessary libraries | |
from http.client import HTTPSConnection | |
from base64 import b64encode | |
from json import loads | |
from json import dumps | |
import os | |
from dotenv import load_dotenv | |
import json | |
import pandas as pd |
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 necessary libraries | |
from http.client import HTTPSConnection | |
from base64 import b64encode | |
from json import loads | |
from json import dumps | |
import os | |
from dotenv import load_dotenv | |
import json | |
import pandas as pd |
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
#!/Users/duarte/.asdf/shims/ruby | |
require 'openai' | |
require 'json' | |
require 'tempfile' | |
require 'open3' | |
OpenAI.configure do |config| | |
config.access_token = ENV['OPENAI_API_KEY'] | |
config.organization_id = 'ABC' # Optional, if you belong to multiple organizations |