Skip to content

Instantly share code, notes, and snippets.

@goraj
goraj / ctest_pareto_segfault.log
Created June 12, 2024 11:01
ctest_pareto_segfault
Run ctest -j --build-config Release -VV
UpdateCTestConfiguration from :D:/a/pareto/pareto/build/DartConfiguration.tcl
Parse Config file:D:/a/pareto/pareto/build/DartConfiguration.tcl
UpdateCTestConfiguration from :D:/a/pareto/pareto/build/DartConfiguration.tcl
Parse Config file:D:/a/pareto/pareto/build/DartConfiguration.tcl
Test project D:/a/pareto/pareto/build
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
@goraj
goraj / config_network
Created June 6, 2024 10:01
OpenWRT Telekom VDSL2 bridge
# /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd00:ab:cd::/48'
from struct import calcsize
import polars as pl
def scid_parse_trades(filepath: str) -> pl.DataFrame:
"""Sierrachart's SCID format. Must be configured to record single trade ticks."""
intraday_record_struct = np.dtype(
[
("timestamp", "<q"),
("open", "<f"),
("ask_price", "<f"),
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goraj
goraj / exchanges.json
Created January 31, 2023 01:59
exchanges.json
{
"results": [
{
"id": 1,
"type": "exchange",
"asset_class": "stocks",
"locale": "us",
"name": "NYSE American, LLC",
"acronym": "AMEX",
"mic": "XASE",
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goraj
goraj / openeye_bug.ipynb
Created March 31, 2022 14:38
openeye_bug.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@goraj
goraj / nautilus_parquet_example.py
Last active February 19, 2022 19:59
nautilus parquet example
from nautilus_trader.backtest.data.wranglers import BarDataWrangler
from nautilus_trader.persistence.external.readers import ParquetReader
from nautilus_trader.persistence.catalog import DataCatalog
from functools import partial
from nautilus_trader.core.datetime import dt_to_unix_nanos
from nautilus_trader.model.c_enums.bar_aggregation import BarAggregation
from nautilus_trader.model.data.bar import Bar, BarType, BarSpecification
from nautilus_trader.model.enums import AggregationSource, PriceType
from nautilus_trader.persistence.external.core import process_files, write_objects
@goraj
goraj / st_rerun.py
Last active April 2, 2021 19:15 — forked from demmerichs/st_rerun.py
Rerun a Streamlit 0.57.3 app from the top! See https://discuss.streamlit.io/t/update-sidebar/531
import streamlit.ReportThread as ReportThread
from streamlit.ScriptRequestQueue import RerunData
from streamlit.ScriptRunner import RerunException
from streamlit.server.Server import Server
def rerun():
"""Rerun a Streamlit app from the top!"""
widget_states = _get_widget_states()
raise RerunException(RerunData(widget_states))
{
"smarts": "[#9,#17,#35,#53]-[*:1]",
"limit": 10,
"offset": 0,
"search_conditions": [
{
"condition": "and_",
"filters": [
{
"kind": "location",