This file contains 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 copy | |
import logging | |
import sys | |
import notifiers | |
from notifiers.exceptions import NotifierException | |
from concurrent.futures import ThreadPoolExecutor | |
class NotificationHandler(logging.Handler): |
This file contains 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 <unistd.h> | |
#include "solClient.h" | |
#include "shioaji.h" | |
void expose_api_func(){ | |
solClient_initialize(SOLCLIENT_LOG_DEFAULT_FILTER, NULL); | |
std::cout << "user our library expose function.\n" | |
"inside this library use solclient library.\n"; | |
} |
This file contains 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
CPPFLAGS=-std=c++11 -Wall | |
CPPFLAGS_SHARED=$(CPPFLAGS) -shared -fPIC | |
SOLCLIENT_FOLDER=$(shell pwd)/solclient-7.14.0.8/ | |
CPPFLAGS_SOL=-I $(SOLCLIENT_FOLDER)include/solclient -L $(SOLCLIENT_FOLDER)lib -lsolclient -lstdc++ -lpthread | |
CPPFLAGS_SOL_STATIC_LINK=-I $(SOLCLIENT_FOLDER)include/solclient $(SOLCLIENT_FOLDER)lib/libsolclient.a -lstdc++ -lpthread -lrt | |
all: shioaji simple | |
prepare-solace-lib: | |
curl -L https://products.solace.com/download/C_API_LINUX64 -o solclient.tar.gz |
This file contains 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 "shioaji.h" | |
int main(){ | |
expose_api_func(); | |
} |
This file contains 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 "shioaji.h" | |
void expose_api_func(){ | |
std::cout << "user our library expose function\n"; | |
} |
This file contains 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> | |
void expose_api_func(); |
This file contains 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
simple: | |
g++ main.cpp -o simple | |
clean: | |
- rm simple |
This file contains 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> | |
int main(){ | |
std::cout << "simple executable program.\n"; | |
} |
This file contains 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 pandas as pd | |
import msgpack | |
import zlib | |
with open(f'/data/dataset/qc/msgpack/TXF20190703.msgpack', 'rb') as f: | |
rawdata = msgpack.loads(zlib.decompress(f.read()), raw=False) | |
df_bidask = pd.DataFrame(rawdata['Q/TFE/TXFI9']) | |
df_bidask[df_bidask['Simtrade'] != 1][['Date', 'Time', 'AskPrice', 'AskVolume', 'BidPrice', 'BidVolume']] |
This file contains 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 shioaji as sj | |
import pandas as pd | |
import sys | |
import os | |
import datetime | |
from datetime import datetime as datetime2 | |
from threading import Timer | |
'''user_information & barminute''' | |
min_k=1 |
NewerOlder