Skip to content

Instantly share code, notes, and snippets.

@Gwill
Gwill / microgpt.py
Created February 13, 2026 04:46 — forked from karpathy/microgpt.py
microgpt
"""
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

nof1.ai Alpha Arena 提示词工程逆向分析

逆向工程说明: 本文档基于 nof1.ai Alpha Arena 的公开文档、交易行为模式、API 响应格式和社区讨论,系统性地逆向推导出其 System Prompt 和 User Prompt 的完整结构,欢迎各路大佬戳戳评论,一起来进行这个有趣的实验。

GitHub - nof0 Follow @wquguru

目录

@Gwill
Gwill / ib-python-basic.py
Created August 24, 2017 15:36 — forked from Goldtean/ib-python-basic.py
Request IB Data in Python
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)
@Gwill
Gwill / IBAPI.py
Created August 24, 2017 14:29 — forked from sen-saven/IBAPI.py
Interactive Brokers API webinar
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):
@Gwill
Gwill / bla.py
Created August 24, 2017 14:29 — forked from stevenbg/bla.py
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"
# 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:
@Gwill
Gwill / python_parse_set_cookie_headers.py
Created January 8, 2017 05:57 — forked from iximiuz/python_parse_set_cookie_headers.py
Parse Set-Cookie headers in Python

Run Jupyterlab on docker

Build starting from a Jupyter 2.x image.

Build

docker build -t jupyterlab .
@Gwill
Gwill / joins.py
Created October 9, 2016 08:28 — forked from nickretallack/joins.py
How do I do a join without a real foreign key constraint?
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)
@Gwill
Gwill / Exclude_tables.md
Created September 13, 2016 07:50 — forked from utek/Exclude_tables.md
Define ignored tables in alembic.ini

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: