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 / vscode-config.json
Last active February 9, 2018 08:02
vscode-config.json
// 将设置放入此文件中以覆盖默认设置
{
"workbench.colorTheme": "Solarized Dark",
"workbench.iconTheme": "vs-seti",
"editor.fontFamily": "'Operator Mono', Menlo, Monaco, 'Courier New', monospace",
"editor.fontSize": 20,
"editor.renderWhitespace": "boundary",
"files.trimTrailingWhitespace": true,
"extensions.ignoreRecommendations": true,
"files.exclude": {
@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 / TokenBucket.py
Last active April 26, 2017 02:25
TokenBucket
from time import time
class TokenBucket(object):
"""TokenBucket 流控算法
>>> bucket = TokenBucket(80, 0.5)
>>> print bucket.consume(10)
True
>>> print bucket.consume(90)
False
@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
@Gwill
Gwill / fingerprinting-and-audio-recognition-with-python.md
Created December 15, 2016 06:35
fingerprinting-and-audio-recognition-with-python.md

用 Python 和 Numpy 实现音频数字指纹特征识别

我第一次用 Shazam 的时候,简直惊呆了。除了 GPS 功能和从楼梯摔下仍然没坏之外,能用一段音频片段识别歌曲是我所见过我手机能做到的最不可思议的事了。识别是通过一个叫音频特征识别的过程来实现的,例子包括: