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
{"event":{"generic":{"message":"Ir sensor message"}},"time":1580108867703} | |
{"event":{"generic":{"message":"Gyro sensor message"}},"time":1580108867703} | |
{"event":{"lidar":{"scan_points":[{"angle_z_q14":59869,"dist_mm_q2":5992,"quality":188,"flag":1},{"angle_z_q14":49675,"dist_mm_q2":5976,"quality":188,"flag":0},{"angle_z_q14":40777,"dist_mm_q2":0,"quality":0,"flag":0},{"angle_z_q14":30583,"dist_mm_q2":0,"quality":0,"flag":0},{"angle_z_q14":19091,"dist_mm_q2":6368,"quality":188,"flag":0},{"angle_z_q14":8897,"dist_mm_q2":6400,"quality":188,"flag":0},{"angle_z_q14":64238,"dist_mm_q2":6100,"quality":188,"flag":0},{"angle_z_q14":54044,"dist_mm_q2":6212,"quality":188,"flag":0},{"angle_z_q14":43849,"dist_mm_q2":6388,"quality":188,"flag":0},{"angle_z_q14":33655,"dist_mm_q2":6324,"quality":188,"flag":0},{"angle_z_q14":23460,"dist_mm_q2":5916,"quality":188,"flag":0},{"angle_z_q14":13289,"dist_mm_q2":5856,"quality":188,"flag":0},{"angle_z_q14":3094,"dist_mm_q2":5896,"quality":188,"flag":0},{"angle_z_q14":59710,"dist_mm_q |
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
object SchemaToCaseClass { | |
import org.apache.spark.sql.types._ | |
trait Field | |
case class FlatField(name: String, t: String, isNullable: Boolean) extends Field | |
case class CaseClass(name: String, fields: List[Field], isNullable: Boolean) extends Field | |
case class ArrayClass(name: String, field: Field, isNullable: Boolean) extends Field | |
case class PrintField(name: String, typeName: String, isOptional: Boolean) | |
case class PrintClass(name: String, fields: List[PrintField]) |
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
object Printing extends App { | |
trait Test { | |
val name: String | |
} | |
case class TestSingle(name: String, t: String, isOptional: Boolean) extends Test | |
case class NestedTest(name: String, fields: List[Test], isOptional: Boolean) extends Test | |
val testData = NestedTest("main", List( |
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
package backup | |
import java.io.OutputStream | |
import cats.effect._ | |
import cats.effect.implicits._ | |
import cats.implicits._ | |
import fs2.{Chunk, Pipe, Stream, io} | |
import java.util.zip.{ZipEntry, ZipOutputStream} | |
import fs2.concurrent.Queue |
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
//! A chat server that broadcasts a message to all connections. | |
//! | |
//! This example is explicitly more verbose than it has to be. This is to | |
//! illustrate more concepts. | |
//! | |
//! A chat server for telnet clients. After a telnet client connects, the first | |
//! line should contain the client's name. After that, all lines sent by a | |
//! client are broadcasted to all other connected clients. | |
//! | |
//! Because the client is telnet, lines are delimited by "\r\n". |
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
//! A chat server that broadcasts a message to all connections. | |
//! | |
//! This example is explicitly more verbose than it has to be. This is to | |
//! illustrate more concepts. | |
//! | |
//! A chat server for telnet clients. After a telnet client connects, the first | |
//! line should contain the client's name. After that, all lines sent by a | |
//! client are broadcasted to all other connected clients. | |
//! | |
//! Because the client is telnet, lines are delimited by "\r\n". |
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
#![allow(unused)] | |
#[macro_use] | |
extern crate crossbeam_channel; | |
use crossbeam_channel as channel; | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::time; |
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
#![allow(unused)] | |
#[macro_use] | |
extern crate crossbeam_channel; | |
use crossbeam_channel as channel; | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; |
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
#![allow(unused)] | |
use std::io::Write; | |
use std::io; | |
use std::net::{TcpListener, TcpStream}; | |
use std::thread; | |
use std::time; | |
use std::sync::{Arc,RwLock}; | |
// https://github.com/Nervengift/chat-server-example/blob/master/src/main.rs |
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
haskell-lsp:Starting up server ... | |
2018-05-09 12:06:07.689664 [ThreadId 4] - ---> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":36474,"rootPath":"/Users/leonti.bielski/myob/property-testing-demo/payslip-property-testing-haskell/","rootUri":"file:///Users/leonti.bielski/myob/property-testing-demo/payslip-property-testing-haskell/","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true},"didChangeConfiguration":{"dynamicRegistration":false},"didChangeWatchedFiles":{"dynamicRegistration":false},"symbol":{"dynamicRegistration":false},"executeCommand":{"dynamicRegistration":false}},"textDocument":{"synchronization":{"dynamicRegistration":false,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":false,"completionItem":{"snippetSupport":true,"commitCharactersSupport":false},"contextSupport":true},"hover":{"dynamicRegistration":false},"signatureHelp":{"dynamicRegistration":false},"references":{"dynamicRegistration":false},"d |