Skip to content

Instantly share code, notes, and snippets.

View zakhar's full-sized avatar

Zakhar Zibarov zakhar

  • Yandex
  • Saint-Petersberg, Russia
View GitHub Profile
@zakhar
zakhar / gist:8295150
Last active January 2, 2016 11:09
AES encryption
from Crypto.Cipher import AES
import base64
import os
# the block size for the cipher object; must be 16, 24, or 32 for AES
BLOCK_SIZE = 32
# the character used for padding--with a block cipher such as AES, the value
# you encrypt must be a multiple of BLOCK_SIZE in length. This character is
# used to ensure that your value is always a multiple of BLOCK_SIZE

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
"""
This is a batched LSTM forward and backward pass
"""
import numpy as np
import code
class LSTM:
@staticmethod
def init(input_size, hidden_size, fancy_forget_bias_init = 3):