The most important TCP tuning areas since kernel 4.9 are:
- packet pacing
- dynamic TSO sizing
- TCP small queues
- BBR TCP congestion algorithm
- Gb = gigabit
| import requests | |
| data = requests.get('https://api.binance.com/api/v1/exchangeInfo').json() | |
| data = filter(lambda x: x['isMarginTradingAllowed'], data['symbols']) | |
| symbols = map(lambda x: 'BINANCE:{}'.format(x['symbol']), data) | |
| symbols = filter(lambda x: 'BTC' in x, symbols) | |
| print(','.join(symbols)) |
| import ccxt | |
| import pandas as pd | |
| import time | |
| bfx = ccxt.bitfinex2() | |
| def fetch(since, limit=1000): | |
| header = ['Timestamp', 'Open', 'High', 'Low', 'Close', 'Volume'] | |
| data = bfx.fetch_ohlcv('BTC/USD', '1h', since=since, limit=limit) | |
| df = pd.DataFrame(data, columns=header).set_index('Timestamp') |
| BINANCE:ETHBTC | |
| BINANCE:LTCBTC | |
| BINANCE:BNBBTC | |
| BINANCE:NEOBTC | |
| BINANCE:BCCBTC | |
| BINANCE:GASBTC | |
| BINANCE:HSRBTC | |
| BINANCE:MCOBTC | |
| BINANCE:WTCBTC | |
| BINANCE:LRCBTC |
| import asyncio | |
| import ccxt.async as ccxt | |
| import logging | |
| import pandas as pd | |
| from pyti.simple_moving_average import simple_moving_average as sma | |
| logger = logging.getLogger() | |
| handler = logging.StreamHandler() | |
| formatter = logging.Formatter('%(asctime)s %(name)-12s %(levelname)-8s %(message)s') |
| import sys | |
| import websockets | |
| import asyncio | |
| import json | |
| import signal | |
| from datetime import datetime | |
| from datetime import timezone | |
| class bcolors: |
| import requests | |
| data = requests.get('https://api.binance.com/api/v1/ticker/24hr').json() | |
| print("ticker,volume,trade_count") | |
| for pair in data: | |
| symbol = pair['symbol'] | |
| volume = pair['volume'] | |
| trade_cnt = pair['count'] | |
| print("{},{},{}".format(symbol, volume, trade_cnt)) |
| import pickle | |
| from math import log | |
| from pprint import pprint | |
| from bittrex import bittrex as btr | |
| from bittrex.bittrex import Bittrex | |
| import networkx as nx | |
| from numpy import roll | |
| import requests | |
| data = requests.get('https://api.binance.com/api/v1/exchangeInfo').json() | |
| symbols = map(lambda x: 'BINANCE:{}'.format(x['symbol']), data['symbols']) | |
| symbols = filter(lambda x: 'BTC' in x, symbols) | |
| print(','.join(symbols)) |
| import io.undertow.Handlers; | |
| import io.undertow.Undertow; | |
| import io.undertow.server.handlers.*; | |
| import io.undertow.util.Headers; | |
| import org.apache.logging.log4j.LogManager; | |
| import org.apache.logging.log4j.Logger; | |
| public class UndertowServer { | |
| public static void main(String[] args) { | |
| Logger logger = LogManager.getLogger(UndertowServer.class); |