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 requests | |
import time | |
import scrollphathd | |
from scrollphathd.fonts import font3x5 | |
class SETTRADE: | |
def __init__(self): |
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
Show hidden characters
{ | |
// The command to execute for the terminal, leave blank for the OS default | |
// See https://github.com/wbond/sublime_terminal#examples for examples | |
"terminal": "C:\\Dropbox\\Win\\Console2\\Console.exe", | |
// A list of default parameters to pass to the terminal, this can be | |
// overridden by passing the "parameters" key with a list value to the args | |
// dict when calling the "open_terminal" or "open_terminal_project_folder" | |
// commands | |
"parameters": ["-d", "."], |
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
{'packet_full': '005000060332001a283830373337643865613437346331333137323334323734353166393634313030353536393761623108b3f3c4e60510011a18312d3930303031303530372d362d31353537313634333931', 'packet_header': '00', 'packet_size': 80, 'packet_body': b'\x06\x032\x00\x1a(80737d8ea474c131723427451f96410055697ab1\x08\xb3\xf3\xc4\xe6\x05\x10\x01\x1a\x181-900010507-6-1557164391', 'packet_action': 'SEND', 'rom_protocol_id': 6, 'rom_protocol_type': 3, 'rom_protocol_name': 'SceneItem_pb.ItemUse'} | |
{'packet_full': '005000060332001a286236613136303961623336653066343136643664363633613537623237346634373764373039653608d4f3c4e60510011a18312d3930303031303530372d362d31353537313634333931', 'packet_header': '00', 'packet_size': 80, 'packet_body': b'\x06\x032\x00\x1a(b6a1609ab36e0f416d6d663a57b274f477d709e6\x08\xd4\xf3\xc4\xe6\x05\x10\x01\x1a\x181-900010507-6-1557164391', 'packet_action': 'SEND', 'rom_protocol_id': 6, 'rom_protocol_type': 3, 'rom_protocol_name': 'SceneItem_pb.ItemUse'} | |
{'packet_full': '005000060332001a2861613931363635633 |
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
#!/usr/bin/env python | |
import re | |
import requests | |
session = requests.Session() | |
stock = 'T' | |
start = '1547398800' | |
end = '1547485200' |
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
{ | |
"version": 1, | |
"disable_existing_loggers": false, | |
"formatters": { | |
"console-simple": { | |
"()": "ext://coloredlogs.ColoredFormatter", | |
"format": "[%(asctime)s.%(msecs)03d] : %(message)s", | |
"datefmt": "%H:%M:%S", | |
"field_styles": { | |
"asctime": {"color": "green"} |
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
#!/usr/bin/env python3 | |
# -*- encoding : utf-8 -*- | |
from utility.tools import * | |
# DOCUMENT : https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md | |
class BINANCE: | |
def __init__(self, key='', secret=''): | |
self._key = key | |
self._secret = secret |
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
#!/usr/bin/env python3 | |
# -*- encoding : utf-8 -*- | |
import asyncio | |
import json | |
import threading | |
import datetime | |
import time | |
from requests import get as __get__ | |
from collections import OrderedDict |
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 aiohttp | |
import asyncio | |
async def get(index): | |
response = await aiohttp.get('http://httpbin.org/delay/%d' % index) | |
print(index, "Done") | |
response.close() | |
async def doMany(): | |
coros = [] |
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
from twisted.internet.defer import inlineCallbacks | |
from autobahn.twisted.wamp import ApplicationSession, ApplicationRunner | |
import json | |
def onTick(*args): # everytime we get a push message from the polo ticker | |
print(json.dumps(args)) # send json string to stdout | |
class Subscribe2Ticker(ApplicationSession): | |
@inlineCallbacks | |
def onJoin(self, details): |
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 asyncio | |
import json | |
import threading | |
import urllib | |
import urllib.request | |
from collections import OrderedDict | |
import websockets | |
GET_TICKERS_URL = 'https://poloniex.com/public?command=returnTicker' |
NewerOlder