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
| #!/usr/bin/env python3 | |
| """ | |
| CodeFlare SDK Connection Debugging Script | |
| This script helps diagnose issues with connecting to KubeRay clusters via CodeFlare SDK. | |
| It tests authentication, cluster discovery, and connection setup. | |
| Usage: | |
| python debug_codeflare_connection.py \ | |
| --cluster-name test-kuberay \ |
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 pandas as pd | |
| entity_df = pd.DataFrame({ | |
| "customer_id": [ | |
| "CUST_000001", | |
| "CUST_000002", | |
| "CUST_000003", | |
| "CUST_000005", | |
| ], | |
| "event_timestamp": [ |
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
| from feast import FeatureService | |
| # Get all feature views | |
| print("Retrieving feature views from registry...") | |
| customer_demographics_fv = fs_banking.get_feature_view("customer_demographics_fv") | |
| customer_behavioral_profile = fs_banking.get_feature_view("customer_behavioral_profile") | |
| transaction_7d_aggregations = fs_banking.get_feature_view("transaction_7d_aggregations") | |
| transaction_30d_aggregations = fs_banking.get_feature_view("transaction_30d_aggregations") | |
| transaction_90d_patterns = fs_banking.get_feature_view("transaction_90d_patterns") | |
| customer_transaction_interaction = fs_banking.get_feature_view("customer_transaction_interaction") |
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
| from feast import FeatureView, Field | |
| from feast.types import Float64, Int64 | |
| from datetime import timedelta | |
| # Get references | |
| transaction_source = fs_banking.get_data_source("transaction_data_source") | |
| customer = fs_banking.get_entity("customer") | |
| customer_high_value_txns = FeatureView( | |
| name="customer_high_value_txns", |
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
| customer_demographics_fv = fs_banking.get_feature_view("customer_demographics_fv") | |
| from feast import Field | |
| from feast.on_demand_feature_view import on_demand_feature_view | |
| from feast.types import Float64 | |
| import pandas as pd | |
| @on_demand_feature_view( | |
| sources=[customer_demographics_fv], | |
| schema=[Field(name="affordability_score", dtype=Float64)], |
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
| # Exmaple 1 : Sample File based data creation | |
| import pandas as pd | |
| from datetime import datetime | |
| from feast import Entity, FeatureView, Feature, ValueType, Field, FileSource | |
| from feast.types import String | |
| df = pd.DataFrame({ | |
| "employee_id": [1, 2], |
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 sys | |
| import xml.etree.ElementTree as ET | |
| tree = ET.parse(sys.argv[1]) | |
| root = tree.getroot() | |
| root.findall('properties') | |
| attrib1 = {'name': 'polarion-group-id', 'value': sys.argv[2]} | |
| ET.SubElement(root.findall('properties')[0],'property',attrib1) | |
| tree.write(sys.argv[1]) |
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
| "Modified from project : https://pypi.org/project/PyHatch/" | |
| import requests | |
| import os | |
| import datetime | |
| import getpass | |
| GITHUB_USER = 'ntkathole' | |
| here = os.path.abspath(os.path.dirname(__file__)) |
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 | |
| import requests | |
| ohsnap="" | |
| satellite="6.5.0" | |
| def main(): | |
| for i in range(1,50): | |
| flag = 0 | |
| release = "{0}/api/releases/{1}/snaps/{2}.0/srpms".format(ohsnap,str(satellite),str(i)) |
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
| #! /bin/bash | |
| name=${hostname} | |
| mkdir ownca | |
| pushd ownca | |
| wget https://raw.githubusercontent.com/ntkathole/ownca/master/openssl.cnf | |
| wget https://raw.githubusercontent.com/ntkathole/ownca/master/generate-ca.sh | |
| wget https://raw.githubusercontent.com/ntkathole/ownca/master/generate-crt.sh | |
| echo 100001 >> serial | |
| chmod 744 *.sh | |
| yes "" | ./generate-ca.sh |
NewerOlder