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 streamlit as st | |
| import duckdb | |
| from streamlit_searchbox import st_searchbox | |
| atp_duck = duckdb.connect('atp.duck.db', read_only=True) | |
| def search_players(search_term): | |
| query = ''' | |
| SELECT DISTINCT winner_name AS player | |
| FROM matches |
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
| # Load the contents of the receipt file | |
| receipt_file = open('./receipt_data.bin', 'rb').read() | |
| # Use asn1crypto's cms definitions to parse the PKCS#7 format | |
| from asn1crypto.cms import ContentInfo | |
| pkcs_container = ContentInfo.load(receipt_file) | |
| # Extract the certificates, signature, and receipt_data | |
| certificates = pkcs_container['content']['certificates'] | |
| signer_info = pkcs_container['content']['signer_infos'][0] |