Workshop
Dr. Yves J. Hilpisch | The Python Quants GmbH | @dyjh
House of Finance, Goethe University, 23. June 2018
(short link to this Gist: http://bit.ly/ffm_workshop)
Workshop
Dr. Yves J. Hilpisch | The Python Quants GmbH | @dyjh
House of Finance, Goethe University, 23. June 2018
(short link to this Gist: http://bit.ly/ffm_workshop)
First of all, please note that token expiration and revoking are two different things.
A JWT token that never expires is dangerous if the token is stolen then someone can always access the user's data.
Quoted from JWT RFC:
| /* Polyfill indexOf. */ | |
| var indexOf; | |
| if (typeof Array.prototype.indexOf === 'function') { | |
| indexOf = function (haystack, needle) { | |
| return haystack.indexOf(needle); | |
| }; | |
| } else { | |
| indexOf = function (haystack, needle) { | |
| var i = 0, length = haystack.length, idx = -1, found = false; |
| import collections | |
| import math | |
| def build(CNF): | |
| G = collections.defaultdict(list) | |
| for left, right, p in CNF: | |
| G[right].append((left, math.log(p))) | |
| return G | |
| def show_cell(T, i, j): |
| var mongo = require('mongodb'), | |
| EventEmitter = require('events').EventEmitter; | |
| function Connector(settings) { | |
| settings.port = settings.port || mongo.Connection.DEFAULT_PORT; | |
| this.settings = settings; | |
| this.server = new mongo.Server(settings.host, settings.port); | |
| this.db = new mongo.Db(settings.database, this.server, {native_parser: true}); | |
| } |