text stringlengths 0 2.87M |
|---|
Capitán América: Civil War (2016) |
Viuda Negra (2021) |
Black Panther (2018) |
Doctor Strange (2016) |
Spider-Man: Homecoming (2017) |
Ant-Man y la Avispa (2018) |
Thor: Ragnarok (2017) |
Vengadores: Infinity War (2018) |
Vengadores: Endgame (2019) |
Spider-Man: Lejos de casa (2019) |
Spider-Man: No Way Home (2021) |
Eternals (2021) |
Shang-Chi and the Legends of the Ten Rings (2021) |
Doctor Strange en el Multiverso de la Locura (2022) |
Thor: Love and Thunder (2022) |
Black Panther: Wakanda Forever (2022) |
Ant-Man and the Wasp: Quantumania (2023) |
De igual manera se recomiendan algunas series de Disney +, para poder entender algunos hechos que impactan a algunas peliculas tales como: |
Bruja Escarlata y Vision / Wandavision (2021) (Serie Disney+): La cual tiene repercusiones en el multiverso y en consecuencias directas con Doctor Strange en el Multiverso de la Locura. |
Loki (2021) (Serie Disney+): La cual tiene consecuencias directas en el multiverso, así como una presentación de Kang: el conquistador, el siguiente gran villano de Marvel.<kinrel><user>Quina és la capital de Catalunya?<user><kinrel>La capital de Catalunya és Barcelona.<kinrel><user>¿Qué opinas sobre el behavioral mark... |
Por un lado, el behavioral marketing permite a los especialistas en marketing recopilar datos precisos sobre el comportamiento de los consumidores, lo que puede ser muy valioso para adaptar los mensajes publicitarios y promociones de productos a las necesidades y preferencias específicas de cada usuario. Además, el beh... |
Sin embargo, también es importante tener en cuenta las preocupaciones de privacidad que pueden surgir con el uso del behavioral marketing. En algunos casos, los consumidores pueden sentirse incómodos al darse cuenta de que sus acciones en línea están siendo rastreadas y analizadas para fines publicitarios. Es fundament... |
from __future__ import annotations |
import sys |
class Letter: |
def __init__(self, letter: str, freq: int): |
self.letter: str = letter |
self.freq: int = freq |
self.bitstring: dict[str, str] = {} |
def __repr__(self) -> str: |
return f"{self.letter}:{self.freq}" |
class TreeNode: |
def __init__(self, freq: int, left: Letter | TreeNode, right: Letter | TreeNode): |
self.freq: int = freq |
self.left: Letter | TreeNode = left |
self.right: Letter | TreeNode = right |
def parse_file(file_path: str) -> list[Letter]: |
""" |
Read the file and build a dict of all letters and their |
frequencies, then convert the dict into a list of Letters. |
""" |
chars: dict[str, int] = {} |
with open(file_path) as f: |
while True: |
c = f.read(1) |
if not c: |
break |
chars[c] = chars[c] + 1 if c in chars else 1 |
return sorted((Letter(c, f) for c, f in chars.items()), key=lambda x: x.freq) |
def build_tree(letters: list[Letter]) -> Letter | TreeNode: |
""" |
Run through the list of Letters and build the min heap |
for the Huffman Tree. |
""" |
response: list[Letter | TreeNode] = letters # type: ignore |
while len(response) > 1: |
left = response.pop(0) |
right = response.pop(0) |
total_freq = left.freq + right.freq |
node = TreeNode(total_freq, left, right) |
response.append(node) |
response.sort(key=lambda x: x.freq) |
return response[0] |
def traverse_tree(root: Letter | TreeNode, bitstring: str) -> list[Letter]: |
""" |
Recursively traverse the Huffman Tree to set each |
Letter's bitstring dictionary, and return the list of Letters |
""" |
if isinstance(root, Letter): |
root.bitstring[root.letter] = bitstring |
return [root] |
treenode: TreeNode = root # type: ignore |
letters = [] |
letters += traverse_tree(treenode.left, bitstring + "0") |
letters += traverse_tree(treenode.right, bitstring + "1") |
return letters |
def huffman(file_path: str) -> None: |
""" |
Parse the file, build the tree, then run through the file |
again, using the letters dictionary to find and print out the |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.