Skip to content

Instantly share code, notes, and snippets.

View dacr's full-sized avatar
🕷️

Crosson David dacr

🕷️
View GitHub Profile
@dacr
dacr / tapir-zio-stream.sc
Created May 24, 2024 15:12
Streamed hello world / published by https://github.com/dacr/code-examples-manager #ee6c3275-18d1-4651-a6fa-7b27371d09b2/44a93a8d89c768e21de3484f7de4ab303ef84293
// summary : Streamed hello world
// keywords : scala, zio, tapir, http, zhttp, stream, @testable, @exclusive
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : ee6c3275-18d1-4651-a6fa-7b27371d09b2
// created-on : 2024-05-15T09:53:10+02:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
// test-with : curl http://127.0.0.1:8080/hello
@dacr
dacr / scala3-feature-macro-3-inline-if.scala
Created April 20, 2024 13:35
scala3 feature examples - macros - inline if / published by https://github.com/dacr/code-examples-manager #2caea6b8-340f-45a1-923c-ac671afb6491/ce18ac780a6d11949a8ea1180d342a65aa5d914c
// summary : scala3 feature examples - macros - inline if
// keywords : scala3, tutorial, macros, inline, meta-programming, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 2caea6b8-340f-45a1-923c-ac671afb6491
// created-on : 2024-03-17T08:46:55+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / scala3-feature-macro-4-inline-matches.scala
Created April 20, 2024 13:35
scala3 feature examples - macros - inline matches / published by https://github.com/dacr/code-examples-manager #d1f6d051-2dd9-4fbb-bf5a-dc855cd17c47/fb6236c9c1bc5fc308a437448faff2ea48bcfd80
// summary : scala3 feature examples - macros - inline matches
// keywords : scala3, tutorial, macros, inline, meta-programming, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : d1f6d051-2dd9-4fbb-bf5a-dc855cd17c47
// created-on : 2024-03-17T11:11:11+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / scala3-feature-macro-5-programs-as-values.scala
Created April 20, 2024 13:35
scala3 feature examples - macros - programs as values / published by https://github.com/dacr/code-examples-manager #9073c9cf-9998-4ee6-983f-fbe3acf48d94/f9d203c76b8fc226312cca9998cd86a560b40e8d
// summary : scala3 feature examples - macros - programs as values
// keywords : scala3, tutorial, macros, inline, meta-programming, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 9073c9cf-9998-4ee6-983f-fbe3acf48d94
// created-on : 2024-03-17T11:11:11+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / scala3-feature-macro-0-simple.scala
Created April 20, 2024 13:35
scala3 feature examples - macros - inline / published by https://github.com/dacr/code-examples-manager #7919a7e2-aafd-4f7f-9702-acd157ef9bfc/5fc690b8f59e434eac9b14f4c0f860e2837c49c7
// summary : scala3 feature examples - macros - inline
// keywords : scala3, tutorial, macros, inline, meta-programming, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 7919a7e2-aafd-4f7f-9702-acd157ef9bfc
// created-on : 2024-03-17T08:32:29+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / iron-basic.sc
Created April 20, 2024 13:35
iron refined type simplest usage example / published by https://github.com/dacr/code-examples-manager #355b00cf-7e9a-47ca-93c7-8c76a36d71cc/2624a86d0a0a459ba76dffd2b3366d1944df9d64
// summary : iron refined type simplest usage example
// keywords : scala, iron, refined, @testable
// publish : gist
// authors : chimney
// license : Apache2
// id : 355b00cf-7e9a-47ca-93c7-8c76a36d71cc
// created-on : 2024-02-16T08:42:10+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / scala3-feature-macro-2-inline-def.scala
Created April 20, 2024 13:35
scala3 feature examples - macros - inline def / published by https://github.com/dacr/code-examples-manager #4dc9d4a2-bd4a-4f02-abea-29412c842854/2cc2bced629cfe532298023410773f2088d0d1eb
// summary : scala3 feature examples - macros - inline def
// keywords : scala3, tutorial, macros, inline, meta-programming, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 4dc9d4a2-bd4a-4f02-abea-29412c842854
// created-on : 2024-03-17T08:18:10+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / djl-gpu-info.sc
Created February 18, 2024 18:00
get some gpu information / published by https://github.com/dacr/code-examples-manager #2823b304-e6a7-47fb-80b2-4ca33fb3cc3d/41d101f2fdddace3e2432b14729c4b3834a99aeb
// summary : get some gpu information
// keywords : djl, machine-learning, gpu, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 2823b304-e6a7-47fb-80b2-4ca33fb3cc3d
// created-on : 2024-02-18T11:58:44+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / djl-hugging-face-mistral-refactored.sc
Created February 18, 2024 18:00
using mistral with DJL refactored / published by https://github.com/dacr/code-examples-manager #2c2815f3-f004-4532-b47f-4f664516e0b5/ce322c0b4f914aed73accd8045830345ab2c1684
// summary : using mistral with DJL refactored
// keywords : djl, machine-learning, llm, mistral, ai, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 2c2815f3-f004-4532-b47f-4f664516e0b5
// created-on : 2024-02-18T11:13:34+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / djl-hugging-face-mistral.sc
Last active February 18, 2024 18:00
using mistral with DJL / published by https://github.com/dacr/code-examples-manager #389e67ca-de9a-4f47-a1c0-504564fb2dbe/d8a4fd23108a58830d86f5c8bac5315045f00167
// summary : using mistral with DJL
// keywords : djl, machine-learning, llm, mistral, ai, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 389e67ca-de9a-4f47-a1c0-504564fb2dbe
// created-on : 2024-02-03T14:34:48+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file