Skip to content

Instantly share code, notes, and snippets.

@echo-ray
echo-ray / price_markets_analysis.py
Created April 15, 2018 07:52
analyse price in diffrent markets
import csv
import time
import ccxt
import pandas as pd
import matplotlib.pyplot as plt
#%matplotlib inline
def get_common_pairs(*exchanges):
# 获取交易所间的共同交易对
# 必须输入两个或两个以上交易所的完整名称
@echo-ray
echo-ray / main.py
Created May 6, 2018 17:15 — forked from littlecodersh/main.py
Main script behind itchat robot
#coding=utf8
import itchat
# tuling plugin can be get here:
# https://github.com/littlecodersh/EasierLife/tree/master/Plugins/Tuling
from tuling import get_response
@itchat.msg_register('Text')
def text_reply(msg):
if u'作者' in msg['Text'] or u'主人' in msg['Text']:
return u'你可以在这里了解他:https://github.com/littlecodersh'
@echo-ray
echo-ray / WeChatCheckFriend.py
Created May 6, 2018 17:15 — forked from littlecodersh/WeChatCheckFriend.py
Demo of checking friends' status of wechat.
#coding=utf8
import itchat
CHATROOM_NAME = 'friend'
CHATROOM = None
HELP_MSG = u'''\
好友状态监测
* 发送名片将会返回好友状态
* 请确有名为%s的未使用的群聊
* 并将该群聊保存到通讯录
@echo-ray
echo-ray / 1token_utils.py
Created September 1, 2018 17:12
get 1token.trade histtick data
import json
import gzip
import requests
import pandas as pd
#%matplotlib inline
def get_all_symbol(date='2018-08-05'):
# 获取某一天的所有可下载 symbol
url = f'http://alihz-net-0.qbtrade.org/contracts?date={date}&format=json'
@echo-ray
echo-ray / bitcoin_rich.py
Created November 1, 2018 17:00
获取比特币富豪榜
import pandas as pd
import requests
url = 'https://bitinfocharts.com/zh/top-100-richest-bitcoin-addresses.html'
header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
}