Skip to content

Instantly share code, notes, and snippets.

@spzm
spzm / serializer.py
Created December 16, 2019 22:43 — forked from quozd/serializer.py
Typehints-based deserializer
def _create_config_hierarchy(config_cls: Type[TConfig], config_data: Mapping) -> TConfig:
sig = signature(config_cls)
cls_data_attributes = getmembers(config_cls, lambda a: isinstance(a, GenericDescriptor))
if len(cls_data_attributes) != len(sig.parameters):
raise TypeError(
'Type {type_name} has invalid __init__.\n'
'Init parameters count should equal to data descriptors count.\n'
'Init parameters: [{init_params}], data descriptors: [{data_descriptors}]'.format(
from rasa_nlu.featurizers import Featurizer
import tensorflow_hub as hub
import tensorflow as tf
class UniversalSentenceEncoderFeaturizer(Featurizer):
"""Appends a universal sentence encoding to the message's text_features."""
# URL of the TensorFlow Hub Module
1. Книга Эрика Эванса "The Big Blue Book"
https://www.amazon.com/Domain-Driven-Design-Tackling-Complexity-Software/dp/0321125215
Порядок чтения: https://twitter.com/renoirb/status/248847526910894081?lang=en
2. Книга Vaughn Vernon "The Red Book"
https://www.amazon.com/Implementing-Domain-Driven-Design-Vaughn-Vernon/dp/0321834577
3. Алексей Мерсон — Domain-driven design: рецепт для прагматика.
Свежий доклад с очень хорошим объяснением деталей. Упор на моделирование.
https://www.youtube.com/watch?v=CR9mLGN9jh0&list=PL48wL0ANkqzTgr6QBblkom0wg7IFXufn0&index=2&t=1990s
@spzm
spzm / tutorial.md
Created July 17, 2018 21:06 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

{-# LANGUAGE NamedFieldPuns #-}
module Filter where
import Prelude hiding (floor)
import qualified Prelude
import Predicate
data Bezirk
@spzm
spzm / nodejs-fatal-flow.md
Created February 26, 2018 18:12 — forked from obenjiro/nodejs-fatal-flow.md
Фатальный недостаток Node.js
@spzm
spzm / lazy.js
Created January 27, 2018 14:40 — forked from kana/lazy.js
Lazy evaluation in JavaScript
function delay(expressionAsFunction) {
var result;
var isEvaluated = false;
return function () {
if (!isEvaluated)
result = expressionAsFunction();
return result;
};
}
@spzm
spzm / Links
Last active December 23, 2017 12:08
Links for Modular applications with frint.js presentation
@spzm
spzm / Enhance.js
Created June 26, 2017 12:21 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@spzm
spzm / introrx.md
Created June 6, 2017 21:13 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing