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 os | |
import re | |
import time | |
from typing import List, Literal | |
import dotenv | |
from bs4 import BeautifulSoup | |
from google import genai | |
from google.genai import types | |
from playwright.sync_api import sync_playwright |
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
# Video: https://www.youtube.com/watch?v=PRkVIBqC-is | |
import time | |
import pandas as pd | |
from bs4 import BeautifulSoup | |
from playwright.sync_api import sync_playwright | |
from quantbrasil.models.asset import get_ticker_map | |
from quantbrasil.models.portfolio import add_assets, create, remove_all |
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
function merge(arr1, arr2) { | |
var result = []; // Array where elements will be added | |
var i1 = 0; // Index for arr1 | |
var i2 = 0; // Index for arr2 | |
// Iterate over arrays until reach the end of one of them | |
while ( i1 < arr1.length && i2 < arr2.length ) { | |
arr1[i1] < arr2[i2] ? result.push(arr1[i1++]) : result.push(arr2[i2++]) // Push the smallest and increment | |
} |