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 PIL import Image | |
| import sys | |
| BOT_GEN_CODE = "\n};\n" | |
| def determine_color_set(imgobj, color_prof): | |
| # This makes a new palette based on the colors used in the image itself, no altering |
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
| #include <SDL3/SDL.h> | |
| #include <SDL3/SDL_main.h> | |
| #include <cmath> | |
| #include <iostream> | |
| #include <cstdlib> // For rand() | |
| // Global settings | |
| const float SAMPLE_RATE = 48000.0f; | |
| const float PI = 3.14159265f; |
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
| #include <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
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
| #include <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
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 PIL import Image | |
| import sys | |
| BOT_GEN_CODE = "\n}\n" | |
| ALL_BLACK_PX = (0, 0, 0) | |
| ALL_GRAY_PX = (127, 127, 127) | |
| ALL_WHITE_PX = (255, 255, 255) | |
| """ |
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
| #include <iostream> | |
| #include <cassert> | |
| #include <cstdint> | |
| #include <cstdio> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <string> |
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
| #include <SDL3/SDL.h> | |
| #include <iostream> | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <cmath> | |
| #include <cstdlib> | |
| #include <cstring> | |
| #include <vector> | |
| #include <utility> | |
| #include <algorithm> |
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 alpaca.data.historical import StockHistoricalDataClient | |
| from alpaca.data.requests import StockSnapshotRequest | |
| from alpaca.data.enums import DataFeed | |
| from alpaca.data.historical import OptionHistoricalDataClient | |
| from alpaca.data.requests import OptionChainRequest, StockBarsRequest, OptionBarsRequest, OptionSnapshotRequest | |
| from alpaca.data.enums import OptionsFeed | |
| from alpaca.trading.enums import ContractType, AssetClass | |
| from alpaca.trading.enums import QueryOrderStatus, OrderSide, OrderClass, TimeInForce, OrderStatus, OrderType | |
| from alpaca.trading.client import TradingClient | |
| from alpaca.trading.requests import GetOrdersRequest, LimitOrderRequest, TakeProfitRequest, StopLimitOrderRequest, GetOptionContractsRequest |
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 alpaca.data.historical import StockHistoricalDataClient | |
| from alpaca.data.requests import StockSnapshotRequest | |
| from alpaca.data.enums import DataFeed | |
| from alpaca.data.historical import OptionHistoricalDataClient | |
| from alpaca.data.requests import OptionChainRequest, OptionBarsRequest | |
| from alpaca.data.enums import OptionsFeed | |
| from alpaca.trading.enums import ContractType, AssetClass | |
| from alpaca.trading.enums import QueryOrderStatus, OrderSide, OrderClass, TimeInForce, OrderStatus, OrderType | |
| from alpaca.trading.client import TradingClient | |
| from alpaca.trading.requests import GetOrdersRequest, LimitOrderRequest, TakeProfitRequest, StopLimitOrderRequest, GetOptionContractsRequest |
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 alpaca.data.requests import OptionBarsRequest | |
| >>> from alpaca.data.timeframe import TimeFrame | |
| >>> bars_request = OptionBarsRequest(symbol_or_symbols='QQQ260702C00750000', timeframe=TimeFrame.Day) | |
| >>> bars = client.get_option_bars(bars_request) | |
| >>> bars | |
| {'data': {}} | |
| >>> from datetime import datetime | |
| >>> bars_request = OptionBarsRequest(symbol_or_symbols='QQQ260702C00750000', timeframe=TimeFrame.Day, start=datetime(2026, 6, 1), end=datetime(2026, 6, 5)) | |
| >>> bars = client.get_option_bars(bars_request) | |
| >>> bars |