- 5760 CUDA cores
- 12 GB of memory
- 3072 CUDA cores
- Big Maxwell
- 12GB of RAM
| proxy_cache_path /var/cache/nginx levels=1:2 keys_zone=microcache:5m max_size=1000m; | |
| server { | |
| listen 80; | |
| server_name cache.example.ru; | |
| # кешируемый адрес | |
| location / { | |
| # кеш включен по умолчанию | |
| set $no_cache ""; | |
| # отключаем кеш для всех методов, кроме GET и HEAD | |
| if ($request_method !~ ^(GET|HEAD)$) { |
| // | |
| // Apply extends the Functor Typeclass by adding a method `ap` which | |
| // is similar to `map` from Functor in that it takes a functor that | |
| // that has a function in it and another functor and extracts that | |
| // function from the first functor and then maps it over the second | |
| // one | |
| // | |
| // Alternatively, you can say `ap` lets you apply a function in a | |
| // context to a value in a context | |
| // |
| // | |
| // Validation[E, A] represents either: | |
| // - Success[A] | |
| // - Failure[E] | |
| // | |
| // Isomporphic to scala.Either[E, A] and scalaz.\/[E, A] | |
| // | |
| // Unlike \/[E, A], Validation is not a Monad, but an Applicative | |
| // Functor. So if you want to use it as a Monad you can convert back | |
| // and forth using the `validation` and `disjunction` method |
| // | |
| // Disjunction - aka Scalaz Either | |
| // \/[A, B] is an alternative to Either[A, B] | |
| // -\/ is Left (usually represents failure by convention) | |
| // \/- is Right (usually represents success by convention) | |
| // Left or Right - which side of the Disjunction does the "-" appear? | |
| // | |
| // Prefer infix notation to express Disjunction Type v: String \/ Double | |
| // | |
| // References |
| // | |
| // (1). Use a trait, companion object and private class that | |
| // implements trait within the companion object | |
| // | |
| sealed trait Point { | |
| def x: Int | |
| def y: Int | |
| } | |
| object Point { |
| // | |
| // private members are visible to the companion class/trait | |
| // and other instances of the class, but private[this] | |
| // members are not | |
| // | |
| // A class member marked private: `private val x: Int = ...` | |
| // is visible to all instances of that class (but not their | |
| // subclasses). In most cases, you want private[this]. | |
| // | |
| // `private[this] val x: Int = ...` limits visibility to the |
| // | |
| // NonEmptyList (Nel) | |
| // - A singly-linked list that is guaranteed to be non-empty | |
| // - https://github.com/scalaz/scalaz/blob/series/7.2.x/core/src/main/scala/scalaz/NonEmptyList.scala | |
| // | |
| final class NonEmptyList[+A](val head: A, val tail: List[A]) { | |
| ... | |
| } | |
| // |
| // | |
| // Foldable | |
| // - fold a data structure | |
| // - usually, fold F[A] given a Monoid[A] | |
| // | |
| trait Foldable[F[_]] { self => | |
| def foldRight[A, B](fa: F[A], z: => B)(f: (A, => B) => B): B | |
| def foldLeft[A, B](fa: F[A], z: B)(f: (B, A) => B): B = { |
| // References | |
| // - http://docs.scala-lang.org/overviews/reflection/typetags-manifests.html | |
| // - http://stackoverflow.com/questions/12218641/scala-what-is-a-typetag-and-how-do-i-use-it | |
| // - http://blogs.atlassian.com/2012/12/scala-and-erasure/ | |
| // - http://www.scala-blogs.org/2008/10/manifests-reified-types.html | |
| // - http://stackoverflow.com/questions/3587286/how-does-scalas-2-8-manifest-work | |
| // - http://stackoverflow.com/questions/3213510/what-is-a-manifest-in-scala-and-when-do-you-need-it | |
| // |