逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。
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
| """ | |
| The most atomic way to train and inference a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
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 ibapi.wrapper import EWrapper | |
| from ibapi.client import EClient | |
| from ibapi.utils import iswrapper | |
| from ibapi.common import * | |
| from ibapi.contract import * | |
| from ibapi.ticktype import * | |
| # Request IB Data in less than 50 lines of code | |
| class BasicApp(EWrapper, EClient): | |
| def __init__(self): | |
| EClient.__init__(self,self) |
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 ibapi.client import EClient | |
| from ibapi.wrapper import EWrapper | |
| from ibapi.common import * | |
| from ibapi.contract import * | |
| class TestApp(EClient, EWrapper): | |
| def __init__(self): | |
| EClient.__init__(self, self) | |
| def error(self, reqId:TickerId, errorCode:int, errorString:str): |
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 | |
| from ibapi.contract import * | |
| from ibapi.order import Order | |
| from ibapi import wrapper | |
| from ibapi.client import EClient | |
| contract = Contract() | |
| contract.symbol = "SIE" | |
| contract.secType = "STK" |
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
| # Gist example of IB wrapper ... | |
| # | |
| # Download API from http://interactivebrokers.github.io/# | |
| # | |
| # Install python API code /IBJts/source/pythonclient $ python3 setup.py install | |
| # | |
| # Note: The test cases, and the documentation refer to a python package called IBApi, | |
| # but the actual package is called ibapi. Go figure. | |
| # | |
| # Get the latest version of the gateway: |
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 sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy import Column, ForeignKey, Integer, String, ForeignKeyConstraint | |
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, relationship | |
| Model = declarative_base() | |
| class Parent(Model): | |
| __tablename__ = 'parent' | |
| id = Column(Integer, primary_key=True) |
Add this in your ini file:
[alembic:exclude]
tables = spatial_ref_sys
In env.py:
def exclude_tables_from_config(config_):
tables_ = config_.get("tables", None)
if tables_ is not None:
NewerOlder