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
package imp | |
/** | |
* Created by jamesanto on 10/7/15. | |
*/ | |
object imps { | |
implicit val prefix: String = "Hello " | |
//implicit val tt: String = "Text" |
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
package me.socure.service.pipl | |
/** | |
* Created by jamesanto on 10/12/15. | |
*/ | |
object PersonUtil { | |
import scala.language.implicitConversions | |
import com.pipl.api.data.containers.Person | |
import scala.collection.JavaConverters._ |
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
public class MatrixUtils { | |
public static <T> boolean isSquareMatrix(T[][] matrix) { | |
if (matrix.length == 0) return true; | |
for (int i = 0; i < matrix.length; i++) { | |
if (matrix[i].length != matrix.length) return false; | |
} | |
return true; | |
} |
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
public class Elevator { | |
private float location = 0; | |
private Direction direction = Direction.UP; | |
private State state = State.STOPPED; | |
private Door door = Door.CLOSED; | |
private Thread processingThread; | |
private Thread listeningThread; | |
public class Request { | |
public long time; |
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
trait FlatMap[F[_]] { | |
def flatMap[A, B](fa: F[A])(f: A => F[B]): F[B] | |
} | |
object OptionFlatMap extends FlatMap[Option]{ | |
override def flatMap[A, B](fa: Option[A])(f: A => Option[B]): Option[B] = fa.flatMap(f) | |
} | |
//example for option | |
object option { |
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 org.scalatest.{FreeSpec, Matchers} | |
class Filter2FilterTest extends FreeSpec with Matchers with ZioTestSupport { | |
case class JsonErr() | |
case class JsonReq() | |
case class JsonRes() |
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 csv | |
import math | |
import os.path | |
from calendar import monthrange, isleap | |
from datetime import datetime, date | |
from typing import List | |
import lightning as L | |
import torch | |
import torch.nn as nn |