Skip to content

Instantly share code, notes, and snippets.

// Tray with 4 compartments and magnet voids
// Dimensions: 50mm x 50mm
// Parameters
tray_width = 50;
tray_length = 50;
wall_height = 5;
wall_thickness = 1.2;
base_thickness = 3;
@mikolak-net
mikolak-net / extract_frame_ref_blog_3_moondream_description_data_interval_10.csv
Created October 8, 2024 19:10
MWO Blog – "readymades" - moondream example outputs
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
,max_offset,size,description
0,1,[95 94],"The image features a robot or a large, dark-colored figure standing in the middle of a dark area, possibly a desert or a field. The robot is surrounded by a red frame, which makes it stand out in the scene."
1,1,[95 94],"The image features a robot or a large, dark-colored figure standing in the middle of a dark area, possibly a desert or a field. The robot is surrounded by a red frame, which makes it stand out in the scene."
2,1,[95 94],"The image features a robot or a large, dark-colored figure standing in the middle of a dark area, possibly a desert or a field. The robot is surrounded by a red frame, which makes it stand out in the scene."
3,1,[95 94],"The image features a robot or a large, dark-colored figure standing in the middle of a dark area, possibly a desert or a field. The robot is surrounded by a red frame, which makes it stand out in the scene."
4,1,[95 94],"The image features a robot or a large, dark-colored figure standing in the middle of a dark area,
@mikolak-net
mikolak-net / blog_15.nasm
Created March 29, 2023 23:05
blog_15.nasm
//...
// access flags 0x1
public sanityCheckForDef()V
L0
LINENUMBER 15 L0
ALOAD 0
GETSTATIC domain/Message$Numeric$.MODULE$ : Ldomain/Message$Numeric$;
SIPUSH 255
INVOKEVIRTUAL domain/Message$Numeric$.apply (I)I
INVOKEVIRTUAL MainSanityCheckForDef$.getThing (I)I
@mikolak-net
mikolak-net / blog_14.scala
Created March 29, 2023 23:05
blog_14.scala
//...
def getThing[A](text: A): A = text
def getThing[A <: Int](text: A): A = text
//...
@mikolak-net
mikolak-net / blog_13.scala
Created March 29, 2023 23:05
blog_13.scala
val text: Numeric = getThing(Numeric(255))
@mikolak-net
mikolak-net / blog_12.scala
Created March 29, 2023 23:05
blog_12.scala
[error] 20 | println(text.value)
[error] | ^^^^^^^^^^
[error] | value value is not a member of Int
@mikolak-net
mikolak-net / blog_11.scala
Created March 29, 2023 23:05
blog_11.scala
opaque type Numeric <: Int = Int
@mikolak-net
mikolak-net / blog_10.scala
Created March 29, 2023 23:04
blog_10.scala
opaque type T >: L <: U = R
@mikolak-net
mikolak-net / blog_9.nasm
Created March 29, 2023 23:04
blog_9.nasm
// access flags 0x1
// signature <A:Ljava/lang/Object;>(TA;)TA;
// declaration: A getThing<A>(A)
public getThing(Ljava/lang/Object;)Ljava/lang/Object;
// parameter final text
L0
LINENUMBER 8 L0
ALOAD 1
ARETURN
L1
@mikolak-net
mikolak-net / blog_8.scala
Created March 29, 2023 23:04
blog_8.scala
import domain.Message.Numeric
object MainSanityCheckForDef:
// needs to be in this scope now,
// otherwise gets the "already defined" error with:
// "Note that overloaded methods must all be defined in the same group of toplevel definitions"
def getThing[A](text: A): A = text
def getThing(text: Int): Int = text