Models | Examples |
---|---|
Display ads | Yahoo! |
Search ads |
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
sudo pvcreate /dev/sdc | |
vgextend vg0 /dev/sdc | |
lvcreate -n lv_cache --type cache-pool -l 100%FREE vg0 /dev/sdc | |
lvconvert --type cache --cachemode writeback --cachepool vg0/lv_cache vg0/lv_root | |
https://znoxx.me/2017/01/04/lvm-cache-na-ssd/ | |
https://www.it-world24.ru/software/lvm-cache-prozrachnoe-keshirovanie-hdd-ispolzuya-ssd.html | |
# switch off cache | |
lvconvert --splitcache vg0/lv_root |
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 http://stackoverflow.com/a/6811241 | |
def rolling_window(a, window): | |
shape = a.shape[:-1] + (a.shape[-1] - window + 1, window) | |
strides = a.strides + (a.strides[-1],) | |
return np.lib.stride_tricks.as_strided(a, shape=shape, strides=strides) |
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
""" | |
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): |
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
# -*- coding: utf-8 -*- | |
from __future__ import unicode_literals | |
from itertools import chain | |
AGGREGATES_DEPENDENCIES = { | |
"revenuePerUser": ["sumRevenue", "visits"], | |
"ctr": ["clicks", "shows"], | |
"cpc": ["budget", "clicks"], | |
"GoalsMetrics.cpa": ["budget", "sumGoalReachesAny"], |
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
TerminalWindow .notebook { | |
padding: 0; | |
border-width: 0; | |
} | |
TerminalWindow, | |
TerminalWindow.background { | |
background-image: none; | |
background-color: #6e6e6e; | |
color: #000000; |
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
# coding: utf-8 | |
import collections | |
# http://habrahabr.ru/post/111361/ | |
gr1 = { | |
1: {2: 10, 3: 30, 4: 50, 5: 10}, | |
2: {}, | |
3: {5: 10}, | |
4: {3: 20, 2: 40}, |
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 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 |