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
//> using scala 3.3.1 | |
//> using dep com.softwaremill.sttp.tapir::tapir-core:1.10.3 | |
//> using dep com.softwaremill.sttp.tapir::tapir-json-circe:1.10.3 | |
//> using dep com.softwaremill.sttp.tapir::tapir-openapi-docs:1.10.3 | |
//> using dep com.softwaremill.sttp.tapir::tapir-jdkhttp-server:1.10.3 | |
//> using dep com.softwaremill.sttp.apispec::openapi-circe-yaml::0.8.0 | |
//> using dep com.softwaremill.sttp.apispec::openapi-circe-yaml::0.8.0 | |
import sttp.tapir.* | |
import sttp.tapir.json.circe.* |
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
//> using platform native | |
//> using nativeVersion 0.4.17 | |
//> using nativeMode debug | |
//> using dep com.armanbilge::epollcat::0.1.6 | |
//> using toolkit typelevel:0.1.25 | |
//> using dep org.typelevel::log4cats-noop::2.6.0 | |
//> using dep org.http4s::http4s-dsl::0.23.26 | |
//> using dep org.http4s::http4s-ember-server::0.23.26 | |
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
module.exports = grammar({ | |
name: 'pluscal', | |
extras: $ => [ | |
/\s|\r?\n/ | |
], | |
rules: { | |
pcal_source_file: $ => $.pcal_algorithm, |
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
" basics | |
set encoding=utf-8 | |
set number | |
filetype plugin on | |
syntax on | |
set relativenumber | |
set tabstop=4 | |
set shiftwidth=4 | |
set expandtab | |
set smartcase |
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
// Специальный тип, который утверждает, что для T есть схема | |
// и экземпляр T можно превратить в record | |
trait AvroRecord[T] { | |
val getSchema: String | |
def toRecord(value: T): String | |
} | |
// моделируем какие-то наши данные | |
case class SourcedPoint(someData: String) |
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
struct Solution {} | |
impl Solution { | |
pub fn move_zeroes(nums: &mut Vec<i32>) { | |
let mut next_zero_opt: Option<usize> = None; | |
for i in 0..nums.len() { | |
let num = nums[i]; | |
if num != 0 && next_zero_opt.is_some() { | |
let next_zero = next_zero_opt.unwrap(); |
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
import java.util.Properties | |
import cats.data.EitherNel | |
import cats.syntax.parallel._ | |
import cats.syntax.either._ | |
import cats.syntax.option._ | |
import cats.instances.parallel._ | |
import scala.util.Try |
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
import java.util.Properties | |
import cats.data.EitherNel | |
import cats.syntax.parallel._ | |
import cats.syntax.either._ | |
import cats.syntax.option._ | |
import cats.instances.parallel._ | |
import scala.util.Try |
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
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.stream.{ActorMaterializer, Materializer} | |
import korolev._ | |
import korolev.akkahttp._ | |
import korolev.execution._ | |
import korolev.server._ | |
import korolev.state.javaSerialization._ | |
import scala.concurrent.Future |
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
import akka.actor.ActorSystem | |
import akka.http.scaladsl.Http | |
import akka.stream.{ActorMaterializer, Materializer} | |
import korolev._ | |
import korolev.akkahttp._ | |
import korolev.execution._ | |
import korolev.server._ | |
import korolev.state.javaSerialization._ | |
import scala.concurrent.Future |
NewerOlder