This file contains 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
import numpy as np | |
from utils import load_encoder_hparams_and_params | |
def softmax(x): | |
exp_x = np.exp(x - np.max(x, axis=-1, keepdims=True)) | |
return exp_x / np.sum(exp_x, axis=-1, keepdims=True) | |
def layer_norm(x, g, b, eps: float = 1e-5): | |
mean = np.mean(x, axis=-1, keepdims=True) | |
variance = np.var(x, axis=-1, keepdims=True) |
This file contains 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
/* | |
Copyright (c) 2023 Yaroslav Sergienko | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
This file contains 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
import random | |
terms_sizes = [] | |
terms_labels = [] | |
terms_colors = [] | |
random.seed(0) | |
for i in range(200): | |
terms_sizes.append(random.random()) | |
# terms_labels.append(''.join(random.choices(['abcdefgh ', 'cdefg ', 'gh '], k=random.randint(1, 2))).strip()) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
0 - Слушайте плейлист, чтобы цифра на счётчике начала расти | |
1 - Начинаем отсчёт дней с вашим плейлистом! Включайте сейчас и не забудьте послушать завтра | |
2 - Два дня подряд. Продолжайте, чтобы не потерять прогресс | |
3 - Вы слушаете плейлист третий день подряд. Не останавливайтесь! | |
4 - Уже четыре дня с плейлистом. Не забывайте слушать каждый день! | |
5 - Пять дней, полёт нормальный! Слушайте дальше, чтобы не потерять прогресс | |
6 - Идём на рекорд! Послушали сегодня — включайте завтра, чтобы не потерять прогресс | |
7 - Уже неделя с этим плейлистом. Продолжайте в том же духе! | |
8 - Восьмой день. Завтра будет девятый, если начнёте день с плейлиста | |
9 - День № 9. Слушайте сейчас и завтра, чтобы сделать цифру двузначной |
This file contains 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
абсолютный | |
аккуратный | |
активный | |
американский | |
английский | |
армейский | |
атомный | |
багровый | |
бедный | |
безнадежный |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
# see also this gist for preprocessing source: https://gist.github.com/pallada-92/0c2bb28255b861f2d365de3d2bc8f748 | |
import math | |
import cairo | |
cmap = plt.get_cmap('gist_rainbow') | |
days_of_week = ['Monday', 'Tuesday', 'Wednesday', | |
'Thursday', 'Friday', 'Saturday', 'Sunday'] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder