Skip to content

Instantly share code, notes, and snippets.

View coreyoconnor's full-sized avatar

Corey O'Connor coreyoconnor

View GitHub Profile
2023.01.29 06:55:44 INFO compiling 3 Scala sources to /home/coconnor/Development/glngn/server/jvm/target/scala-2.13/classes ...
Jan 29, 2023 6:55:44 AM org.eclipse.lsp4j.jsonrpc.RemoteEndpoint handleCancellation
WARNING: Unmatched cancel notification for request id 296
2023.01.29 06:55:44 ERROR [E1] server/shared/src/main/scala/glngn/server/node/PreludeInit.scala
not found: type ProviderId
L38: final case class ProviderAvailable(providerId: ProviderId)
^
2023.01.29 06:55:44 ERROR server/shared/src/main/scala/glngn/server/node/PreludeInit.scala: L38 [E1]
2023.01.29 06:55:44 INFO Legend: Ln = line n, Cn = column n, En = error n
2023.01.29 06:55:44 INFO time: compiled glngn-server in 0.48s
/* The goal is to replicate a rotating cable "tie".
* I have one for reference but I lost where I got the orignal from *shrug*
* units in mm.
*/
height = 40;
gap = 0.25; // printing with a 0.6 mm nozzle. The original seems to be < 0.1
inner_radius= 13;
inner_contact_radius = 4;
module pot() {
translate([0, 0, -0.1]) {
cylinder(d = 84, h = 200);
cylinder(d1 = 104, d2 = 84, h = 15);
}
}
module stand_outside() {
cylinder(d1 = 220, d2 = 85, h = 100);
}
/* An attempt at a direct translation of the `$` mechanism.
*
* In the book `lazy` can annotate the implementation of a method. The result of a `lazy` method is a
* suspension of the result type but the type is still the same. In pseudo code
*
* trait A { val someMethod: Int }
* class Impl extends A { def lazy someImplementation: Int }
*
* The result type in the interface is `Int` but the implementation's result is a suspension of
* type `Int`. I don't see a way to achieve in scala.
| => gat scala.collection.mutable.AnyRefMap$ExceptionDefault.apply(AnyRefMap.scala:508)
at scala.collection.mutable.AnyRefMap$ExceptionDefault.apply(AnyRefMap.scala:507)
at scala.collection.mutable.AnyRefMap.apply(AnyRefMap.scala:207)
at scala.tools.nsc.backend.jvm.BCodeSkelBuilder$PlainSkelBuilder$locals$.load(BCodeSkelBuilder.scala:428)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:361)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.$anonfun$genLoadArguments$1(BCodeBodyBuilder.scala:926)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoadArguments(BCodeBodyBuilder.scala:926)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genApply(BCodeBodyBuilder.scala:656)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genLoad(BCodeBodyBuilder.scala:303)
at scala.tools.nsc.backend.jvm.BCodeBodyBuilder$PlainBodyBuilder.genBlock(
@coreyoconnor
coreyoconnor / out.scala
Created January 9, 2022 20:47
var$macro$74$lzy
lazy <artifact> val var$macro$74$lzy: scala.runtime.LazyRef[zio.schema.Schema.CaseClass2[String,String,glngn.server.model.Identity]] = new scala.runtime.LazyRef[zio.schema.Schema.CaseClass2[String,String,glngn.server.model.Identity]]();
<artifact> private def var$macro$74$lzycompute(): zio.schema.Schema.CaseClass2[String,String,glngn.server.model.Identity] = var$macro$74$lzy.synchronized[zio.schema.Schema.CaseClass2[String,String,glngn.server.model.Identity]](if (var$macro$74$lzy.initialized())
var$macro$74$lzy.value()
else
interp.load.ivy(
("org.platanios" %% "tensorflow" % "0.4.1").withClassifier("linux-cpu-x86_64")
)
import $ivy.`org.plotly-scala::plotly-almond:0.7.6`
import $ivy.`org.platanios::tensorflow:0.4.1`
import plotly._
import plotly.element._
import plotly.layout._
import plotly.Almond._
# nix-shell . -A env
let
pkgs = import <nixpkgs> {};
stdenv = pkgs.stdenv;
in rec {
env = pkgs.stdenv.mkDerivation rec {
name = "env";
shellHook = ''
alias cls=clear
'';
diff --git a/pkgs/development/libraries/opencv/4.x.nix b/pkgs/development/libraries/opencv/4.x.nix
index 9fffd3d9477..66dc997afc3 100644
--- a/pkgs/development/libraries/opencv/4.x.nix
+++ b/pkgs/development/libraries/opencv/4.x.nix
@@ -249,6 +249,7 @@ stdenv.mkDerivation {
"-DCUDA_FAST_MATH=ON"
"-DCUDA_HOST_COMPILER=${cudatoolkit.cc}/bin/cc"
"-DCUDA_NVCC_FLAGS=--expt-relaxed-constexpr"
+ "-DBUILD_opencv_cudaoptflow=OFF"
] ++ lib.optionals stdenv.isDarwin [
lazy val site = glngn.sbt.Site("my-business-service")