Abstract layer for Forex Broker integration (already support FXCM and OANDA)
- Broker and account
- Instrument and constants
- Real-time price streaming
- History price data
- Order & trade execution
- Fix protocol trader (phase 2)
# Occurrence Counter in List | |
num_lst = [1, 1, 2, 3, 4, 5, 3, 2, 3, 4, 2, 1, 2, 3] | |
cnt = Counter(num_lst) | |
print(dict(cnt)) | |
# first 2 most occurrence | |
print(dict(cnt.most_common(2))) | |
str_lst = ['blue', 'red', 'green', 'blue', 'red', 'red', 'green'] | |
print(dict(Counter(str_lst))) | |
https://requestbin.com/ | |
RequestBin gives you an instant HTTP endpoint that will collect all the requests sent so that you can interpret them easily to check and validate data. | |
https://cloudcraft.co/ | |
Cloudcraft helps you design and budget your cloud. It has a very cool drag and drop interface to create 3D diagrams, by connecting different cloud infrastructure services (currently only for AWS). |
# -*- coding: utf-8 -*- | |
# SHIFT+CMD+A -> Kite: Tutorial | |
# CMD+P to show function parameter | |
# Welcome to... | |
# | |
# `hmy+. ://: | |
# .mMMMMMNho:` NMMm | |
# :NMMMMMMMMMMMds/.` NMMm :ss: |
import time | |
import types | |
from functools import wraps | |
from abc import ABCMeta | |
def timeit(f): | |
@wraps(f) | |
def wrapper(*args, **kwargs): | |
start = time.time() | |
resp = f(*args, **kwargs) |
from datetime import datetime | |
import boto3 | |
import logging | |
from botocore.exceptions import ClientError | |
from dateutil.relativedelta import relativedelta | |
from django.conf import settings | |
from django.utils import timezone |
# open port | |
firewall-cmd --zone=public --add-port=55555/tcp --permanent | |
firewall-cmd --reload | |
# remove port | |
$ firewall-cmd --zone=public --remove-port=10050/tcp | |
$ firewall-cmd --runtime-to-permanent | |
$ firewall-cmd --reload |
https://stackoverflow.com/questions/56176229/quickfix-how-to-use-ssl-in-python | |
Yes, quickfix as of the time of writing does not support SSL out of the box. You will need to create a SSL tunnel from your machine manually to the host which requires SSL connectivity. You can do this via 'stunnel'. Posting some configuration below which can hopefully explain how it can be setup. | |
STUNNEL CONFIG | |
log = append | |
output = <path where logs will be written> | |
[client] |
from django.core import mail | |
connection = mail.get_connection() | |
connection.open() | |
email1 = mail.EmailMessage( | |
'That’s your subject', | |
'That’s your message body', | |
'[email protected]', |