This file contains hidden or 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
| const ccxt = require('ccxt'); | |
| const colors = require('colors'); | |
| const moment = require('moment-timezone'); | |
| const exchanges = { | |
| bittrex: new ccxt.bittrex(), | |
| binance: new ccxt.binance() | |
| }; | |
| const percentChange = (oldPrice, newPrce) => { | |
| return ((newPrce - oldPrice) / oldPrice) * 100; | |
| }; |
This file contains hidden or 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
| using System; | |
| [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)] | |
| public class CascadeDeleteAttribute : Attribute { } |
This file contains hidden or 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 django.db.models.fields import Field | |
| import types | |
| def patch_model(model_to_patch, class_to_patch_with): | |
| """ | |
| Adapted from http://www.ravelsoft.com/blog/2010/patchmodel-hacky-solution-extending-authuser-class | |
| Monkey patch a django model with additional or replacement fields and methods. | |
| All fields and methods that didn't exist previously are added. |