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
'release_summary': 'The latest release of ReadOnlyRest (v1.62.0) addresses ' | |
'critical security vulnerabilities, including ' | |
'CVE-2024-53990, which fixes a high-risk authentication ' | |
'flaw in the AsyncHttpClient library. Additionally, ' | |
'this update introduces support for Elastic APM, ' | |
'enabling real-time application performance monitoring, ' | |
'and ensures compatibility with the latest ' | |
'Elasticsearch and Kibana versions (8.17.1 and 8.16.3). ' | |
'Sysadmins are strongly encouraged to update ' | |
'immediately to mitigate security risks and leverage ' |
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
'release_summary': 'The ReadOnlyRest 1.53.0 release addresses two critical ' | |
'security vulnerabilities: CVE-2023-4586, which could ' | |
'allow MITM attacks due to missing hostname validation ' | |
'in the Hot Rod client, and CVE-2023-5072, a ' | |
'high-severity DoS vulnerability in JSON-Java. ' | |
'Additionally, this release introduces support for the ' | |
'latest Kibana and Elasticsearch versions (8.11.x and ' | |
'7.17.16) and includes several bug fixes, such as ' | |
'resolving login issues in Kibana when deployed using ' | |
'ECK and improving stability during license service ' |
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 tempfile | |
from pathlib import Path | |
import pprint | |
import pdfkit # pip install pdfkit | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import PyPDFLoader | |
from langchain.schema import Document |
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 tempfile | |
from pathlib import Path | |
import pprint | |
import pdfkit # pip install pdfkit | |
from langchain.chat_models import ChatOpenAI | |
from langchain.document_loaders import PyPDFLoader | |
from langchain.schema import Document |
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
""" | |
Deep merging two dictionaries with any level of nesting. | |
Based on solution found at https://stackoverflow.com/a/71024248/7521470 | |
Fixed a bug + mutability issue | |
""" | |
import copy | |
from unittest import TestCase | |
import pprint |
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
# WINDOWS: | |
python -m venv venv_name | |
.\venv_name\Scripts\activate | |
# OS | LINUX: | |
python -m venv venv_name | |
source venv_name/bin/activate | |
# ... | |
pip install -r requirements.txt |
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 asyncio | |
from cryptofeed import FeedHandler | |
from cryptofeed.defines import L2_BOOK | |
from cryptofeed.exchanges import Binance, Huobi | |
def add_feed_test(): | |
# following example from https://github.com/bmoscon/cryptofeed/blob/master/examples/demo_loop.py | |
async def orderbook_watch(book, receipt_timestamp): | |
print(f'{receipt_timestamp}: {book.exchange} - {book.symbol}, {len(book.book)} entries') |
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
'use strict' | |
import { app, BrowserWindow, protocol } from 'electron' | |
import { createProtocol } from 'vue-cli-plugin-electron-builder/lib' | |
import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer' | |
// --- CONTEXT MENU ----- | |
const contextMenu = require('electron-context-menu') | |
contextMenu({ | |
prepend: (defaultActions, params, browserWindow) => [] |