(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Long Polling (Recommened Technique - Creates An Open Connection To Server ∴ Fast) | |
(function poll(){ | |
$.ajax({ url: "server", success: function(data){ | |
//Update your dashboard gauge | |
salesGauge.setValue(data.value); | |
}, dataType: "json", complete: poll, timeout: 30000 }); | |
})(); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
""" | |
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
BSD License | |
""" | |
import numpy as np | |
# data I/O | |
data = open('input.txt', 'r').read() # should be simple plain text file | |
chars = list(set(data)) | |
data_size, vocab_size = len(data), len(chars) |
# AES helper class for pycrypto | |
# Copyright (c) Dennis Lee | |
# Date 22 Mar 2017 | |
# Description: | |
# Python helper class to perform AES encryption, decryption with CBC Mode & PKCS7 Padding | |
# References: | |
# https://www.dlitz.net/software/pycrypto/api/2.6/ | |
# http://japrogbits.blogspot.my/2011/02/using-encrypted-data-between-python-and.html |
import asyncio | |
import random | |
import time | |
async def worker(name, queue): | |
while True: | |
# Get a "work item" out of the queue. | |
sleep_for = await queue.get() |