Skip to content

Instantly share code, notes, and snippets.

View ourway's full-sized avatar
🏆

Farshid Ashouri ourway

🏆
View GitHub Profile
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=[])
We couldn’t find that file to show.
-----BEGIN CERTIFICATE-----
MIIEBTCCAu2gAwIBAgIUYem6IP2M6fawN09msj1M3/PgIx8wDQYJKoZIhvcNAQEL
BQAwgZExCzAJBgNVBAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMQ8wDQYDVQQHDAZM
b25kb24xDTALBgNVBAoMBEpQTUMxDDAKBgNVBAsMA0lDQjEVMBMGA1UEAwwManBt
Y2hhc2UuY29tMSswKQYJKoZIhvcNAQkBFhxmYXJzaGlkLmFzaG91cmlAanBtb3Jn
YW4uY29tMB4XDTI1MDIyMzAyMjcwM1oXDTI2MDIyMzAyMjcwM1owgZExCzAJBgNV
BAYTAkdCMRAwDgYDVQQIDAdFbmdsYW5kMQ8wDQYDVQQHDAZMb25kb24xDTALBgNV
BAoMBEpQTUMxDDAKBgNVBAsMA0lDQjEVMBMGA1UEAwwManBtY2hhc2UuY29tMSsw
KQYJKoZIhvcNAQkBFhxmYXJzaGlkLmFzaG91cmlAanBtb3JnYW4uY29tMIIBIjAN
BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw+IOl00NNUTFK8ppfkpfX3+/7BFQ
{
"schemas": [
{
"group": "admin",
"schema": "core_banking",
"owner": true
},
{
"group": "silver_access",
"schema": "core_banking",
"""
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.
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.
@ourway
ourway / Makefile
Last active June 24, 2024 00:55
Content of Makefile
# 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
@ourway
ourway / Makefile
Created June 24, 2024 00:19
Content of Makefile
# 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
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
@ourway
ourway / pandas cheat sheet.md
Created April 20, 2023 16:09 — forked from fabsta/pandas cheat sheet.md
pandas cheat sheet

[TOC]

Preliminaries/Import

import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
from pandas import DataFrame, Series