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 | |
COLA_TRX_CONTRACT_ADDRESS = 'TKH4HPMPjxR2Q93XBVfQrpGiBpyjBwBG6P' | |
USDT_TRX_CONTRACT_ADDRESS = 'TQn9Y2khEsLJW1ChVWFMSMeRDow5KcbLSE' | |
COLA_CONTRACT_ADDRESS = 'TSNWgunSeGUQqBKK4bM31iLw3bn9SBWWTG' | |
USDT_CONTRACT_ADDRESS = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' | |
def fetch_token_balances(token_addresses, pair_address): |
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 | |
PEARL_PEV_CONTRACT_ADDRESS = 'TYCmYzi5c2X5FKhUBgD1FtgRCho8aiKd3j' | |
TAI_PEV_CONTRACT_ADDRESS = 'TNEgrJkG5S1t8p1xqFfqat3LsZaBbKJyVD' | |
SAN_PEV_CONTRACT_ADDRESS = 'TL5WhUrxfdi8G5WTuDDEB6Ai4GthiZ1jLK' | |
USDT_PEV_CONTRACT_ADDRESS = 'TSitoyPGTMb6pR3WrWM2jEtCis6b6QJcF1' | |
USDT_CONTRACT_ADDRESS = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t' | |
PEV_CONTRACT_ADDRESS = 'TQQhxCErnhCQ4XG2fAqP2jG6ZwH5MBFv7X' | |
PEARL_CONTRACT_ADDRESS = 'TGbu32VEGpS4kDmjrmn5ZZJgUyHQiaweoq' |
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 | |
PEV_CONTRACT_ADDRESS = 'TUJrRXdbkHbKEVT8sRs9xdfsaEWe1XHEMC' | |
PEARL_CONTRACT_ADDRESS = 'TJydMBnDJUYccpBPbLqn6oBxaiaCAhxcFd' | |
TAI_CONTRACT_ADDRESS = 'TSdDVvLdt3Vu9TqyEH5m273pJxbpJoqAwR' | |
SAN_CONTRACT_ADDRESS = 'TUU9vEMbEndY4VBm6C6T35EHByvkaMQypc' | |
TOKEN_SYMBOLS = ['USDT', 'PEARL', 'TAI', 'SAN'] | |
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 os | |
import pytest | |
from alembic.command import upgrade | |
from alembic.config import Config | |
from project.factory import create_app | |
from project.database import db as _db | |
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 logging | |
import time | |
from functools import wraps | |
from flask import request, jsonify | |
import redis | |
r = redis.StrictRedis(host='localhost', port=6379, db=0) | |
logger = logging.getLogger(__name__) |
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
CURRENT_DIRECTORY := $(shell pwd) | |
TESTSCOPE = apps | |
TESTFLAGS = --with-timer --timer-top-n 10 --keepdb | |
help: | |
@echo "Docker Compose Help" | |
@echo "-----------------------" | |
@echo "" | |
@echo "Run tests to ensure current state is good:" |
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
How to Fix it: | |
1. Remove wkhtmltopdf and related package | |
$ sudo apt-get remove libqt4-dev qt4-dev-tools wkhtmltopdf | |
$ sudo apt-get autoremove | |
2. Install requirement package for compiling | |
$ sudo apt-get install openssl build-essential libssl-dev libxrender-dev git-core libx11-dev libxext-dev libfontconfig1-dev libfreetype6-dev fontconfig -y |
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
Y组合子是Lambda演算的一部分,也是函数式编程的理论基础。 | |
它是一种方法/技巧,在没有赋值语句的前提下定义递归的匿名函数。 | |
即仅仅通过Lambda表达式这个最基本的“原子”实现循环/迭代。 | |
颇有道生一、一生二、二生三、三生万物的感觉。 | |
虽然Y组合子在理论上很优美,但在实际开发中并不会真的用到。 | |
想要了解Y组合子是什么,请参见维基百科:http://en.wikipedia.org/wiki/Fixed-point_combinator#Y_combinator | |
或者知乎上的回答:http://www.zhihu.com/question/20115649 |
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
# If you don't have Homebrew installed, you should. Do this. | |
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)" | |
# Install DNSMasq from Homebrew | |
brew install dnsmasq | |
# Create a directory for virtual hosts files | |
mkdir -p /usr/local/etc/dnsmasq.d | |
# Create a config for DNSMasq |
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
// reset scaling on iPads on orientation change. author: @axolx | |
if (navigator.userAgent.match(/iPad/i)) { | |
$(window).bind('orientationchange', function(event) { | |
if (window.orientation == 90 || window.orientation == -90 || window.orientation == 270) { | |
$('meta[name="viewport"]').attr('content', 'height=device-width,width=device-height,initial-scale=1.0,maximum-scale=1.0'); | |
$(window).resize(); | |
} else { | |
$('meta[name="viewport"]').attr('content', 'height=device-height,width=device-width,initial-scale=0.8,maximum-scale=0.8'); | |
$(window).resize(); | |
} |
NewerOlder