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
| require 'csv' | |
| csv_text = File.read('test.csv') | |
| csv = CSV.parse(csv_text, :headers => true) | |
| csv.each do |row| | |
| puts "Name: #{row['name']} - Age: #{row['age']} - Sex: #{row['sex']}" | |
| end |
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
| require 'set' | |
| #create array | |
| a = [1,2,3,4] | |
| b = [2,3,5,6] | |
| #convert to set | |
| a.to_set | |
| b.to_set | |
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 os | |
| from openai import OpenAI | |
| from dotenv import load_dotenv | |
| import time | |
| import requests | |
| # Load environment variables | |
| load_dotenv() | |
| # Initialize OpenAI client |