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 json | |
class IcebergSchemaFlattener: | |
def __init__(self): | |
self.flattened_fields = [] | |
def flatten_schema(self, columns): | |
for column in columns: | |
self._process_column(column, parent_path=[]) |
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
-----BEGIN CERTIFICATE----- | |
MIIEBTCCAu2gAwIBAgIUYem6IP2M6fawN09msj1M3/PgIx8wDQYJKoZIhvcNAQEL | |
BQAwgZExCzAJBgNVBAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMQ8wDQYDVQQHDAZM | |
b25kb24xDTALBgNVBAoMBEpQTUMxDDAKBgNVBAsMA0lDQjEVMBMGA1UEAwwManBt | |
Y2hhc2UuY29tMSswKQYJKoZIhvcNAQkBFhxmYXJzaGlkLmFzaG91cmlAanBtb3Jn | |
YW4uY29tMB4XDTI1MDIyMzAyMjcwM1oXDTI2MDIyMzAyMjcwM1owgZExCzAJBgNV | |
BAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMQ8wDQYDVQQHDAZMb25kb24xDTALBgNV | |
BAoMBEpQTUMxDDAKBgNVBAsMA0lDQjEVMBMGA1UEAwwManBtY2hhc2UuY29tMSsw | |
KQYJKoZIhvcNAQkBFhxmYXJzaGlkLmFzaG91cmlAanBtb3JnYW4uY29tMIIBIjAN | |
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw+IOl00NNUTFK8ppfkpfX3+/7BFQ |
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
{ | |
"schemas": [ | |
{ | |
"group": "admin", | |
"schema": "core_banking", | |
"owner": true | |
}, | |
{ | |
"group": "silver_access", | |
"schema": "core_banking", |
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
""" | |
PROCESS EXPLANATION: | |
-------------------- | |
1. The `PackageGenerator` creates new packages and sends them to the `DeliveryManager`. | |
2. The `DeliveryManager` receives new packages and then checks if there are available `Deliverer` workers. | |
3. The `Deliverer` workers pick up packages, attempt to deliver them, and report back success or failure. | |
4. When a package delivery fails, it is re-inserted into the front of the queue by the `DeliveryManager`. | |
5. The system continues until the package queue is empty, all packages are delivered, and the generator | |
has signaled that it is done generating packages. | |
6. The `DeliveryManager` provides a condition variable (`cv`) to wait until all packages are delivered. |
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 random | |
class EndToEndEncryption: | |
""" | |
A simplified End-to-End Encryption example with Diffie-Hellman key exchange and a | |
basic keystream-based XOR encryption. | |
This class includes: | |
1. Prime number generation for Diffie-Hellman parameters. |
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
# Variables | |
PYTHON = python3.12 | |
VENV = .venv | |
PIP = $(VENV)/bin/pip | |
PYTHON_BIN = $(VENV)/bin/python | |
ISORT = $(VENV)/bin/isort | |
BLACK = $(VENV)/bin/black | |
MYPY = $(VENV)/bin/mypy | |
PYTEST = $(VENV)/bin/pytest |
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
# Variables | |
PYTHON = python3.12 | |
VENV = .venv | |
PIP = $(VENV)/bin/pip | |
PYTHON_BIN = $(VENV)/bin/python | |
ISORT = $(VENV)/bin/isort | |
BLACK = $(VENV)/bin/black | |
MYPY = $(VENV)/bin/mypy | |
PYTEST = $(VENV)/bin/pytest |
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
from selenium.common.exceptions import NoSuchElementException, ElementClickInterceptedException | |
from selenium import webdriver | |
import time | |
import pandas as pd | |
def get_jobs(keyword, num_jobs, verbose): | |
'''Gathers jobs as a dataframe, scraped from Glassdoor''' | |
# Initializing the webdriver |
NewerOlder