teleren/devto huggingface dataset:
Zalance - Payments and subscriptions for Indie Games
Tags: monetization, games, payments, subscriptions
Published: 2024-04-01 18:06:29

Zalance is the premier way for Indie game developers to monetize their games. We provide payment services, in-app purchases, and subscriptions to help generate the revenue your game deserves. We make it easy to create in-game stores and manage your product catalog. Start selling from your own website, browser game, or PC game. Build anywhere and monetize everywhere. Get started for free!

[https://zalance.net](https://zalance.net)
📎 Extending #SemanticKernel using OllamaSharp for chat and text completion
Tags: englishpost, codesample, llama2
Published: 2024-04-01 16:29:29

---
title: 📎 Extending #SemanticKernel using OllamaSharp for chat and text completion
published: true
date: 2024-04-01 18:00:00 UTC
tags: EnglishPost,CodeSample,EnglishPost,Llama2
canonical_url: 
---

Hi!

In previous posts I shared how to host and chat with a Llama 2 model hosted locally with Ollama. ([view post](https://dev.to/azure/semantickernel-chat-service-demo-running-llama2-llm-locally-in-ubuntu-med)).

And then I also found [OllamaSharp (nuget package and repo)](https://github.com/awaescher/OllamaSharp).

_OllamaSharp is a .NET binding for the Ollama API, making it easy to interact with Ollama using your favorite .NET languages.

So, I decided to try it, and create a Chat Completion and a Text Generation specific implementation for Semantic Kernel using this library.

The full test is a console app using both services with Semantic Kernel.

![demo with the console showing the output from the test](https://elbruno.com/wp-content/uploads/2024/04/image.png?w=1024)

## Text Generation Service

The Text Generation Service is an easy one. Just implement the interface **_Microsoft.SemanticKernel.TextGeneration.ITextGenerationService_** , and the generated code looks like this:

{% gist  https://gist.github.com/elbruno/28e0fb9b47955e52461e0d4762d4727b %}
## Chat Completion Service

The chat completion, requires the implementation of the interface: **_IChatCompletionService_**. The code looks like this:

{% gist  https://gist.github.com/elbruno/e268ebff8ef3efb73cf9ecf3d9ceb0bd %}

## Test Chat Completion and Text Generation Services

With both services implemented, we can now code with Semantic Kernel to access these services.

The following code:

- Creates 2 services: text and chat, both with ollamasharp implementation
- Create a semantic kernel builder, register both services, and build a kernel.
- Using the kernel run a text generation sample, and later a chat history sample.
- In the chat sample, it also uses a System Message to define the chat behavior for the conversation.
- This is a test, there are a lot of improvements that can be made here.

{% gist  https://gist.github.com/elbruno/2203a908eef1deb2c48538c123840964 %} 
The full code is available here: [https://github.com/elbruno/semantickernel-localLLMs](https://github.com/elbruno/semantickernel-localLLMs). And the main readme of the repo also needs to be updated.

Happy coding!

Greetings

El Bruno

More posts in my blog [ElBruno.com](https://www.elbruno.com).

More info in [https://beacons.ai/elbruno](https://beacons.ai/elbruno)

* * *
Building a Microservices Architecture with gRPC and Kafka in Golang
Published: 2024-04-01 17:52:11

Today, I want to take you through the journey of building a robust microservices architecture using gRPC for efficient internal communication and Kafka for reliable event streaming. One of my biggest challenges, which often made me feel like an imposter, was understanding microservices and gRPC and how to set them up correctly. This project is my first approach into constructing a microservices architecture, and I’m excited to share the learnings and outcomes with you.

The concepts and setup explained here were heavily influenced by https://www.youtube.com/@anthonygg_, who provided an excellent foundation and clear guidance that I could build upon.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggzxqjeeshcyji1506eh.png)

## What’s Under the Hood?

The architecture is composed of several key services:

- `gateway`: The entry point for all client requests, translating JSON HTTP requests to gRPC.
- `producer-micro`: Handles incoming driver data and produces messages to Kafka.
- `consumer-micro`: Consumes messages from Kafka and persists them into the database.
- `write-db-micro`: Microservice responsible for database write operations.
- `read-db-micro`: Microservice responsible for database read operations.
- `distance-micro`: Calculates the distance traveled by drivers.
- `spam`: This is a simple spam services that spams the gateway with locations.

## Build and Run

Getting everything up and running is a breeze with the provided Makefile. Each microservice can be built and started with simple commands.

- Build and run gateway: `make gate`
- Build and run producer-micro: `make prod`
- Build and run consumer-micro: `make con`
- Build and run write-db-micro: `make write`
- Build and run read-db-micro: `make read`
- Build and run distance-micro: `make dist`
- Build and run spam: `make spam`

To generate gRPC code from `.proto` files, run: `make proto`

## Docker Setup

This project includes a `docker-compose` file for easy setup of the microservices and MongoDB as containers. The `docker-compose` file orchestrates the creation and interconnection of all the necessary containers.

- Build the container : `docker-compose up -d`

## API Endpoint

The following endpoint is available on the gateway for drivers to send their data:

```
- http://localhost:3000/api/v1/drivers

- http://localhost:3000/api/v1/drivers/1
```
Feel free to dive into the README on [GitHub](https://github.com/pyrolass/grpc-microservice-go) for more detailed instructions on building and running the services.

## Dive Into the Code

The complete code for this project is available on GitHub. Check it out, give it a star if you like it, and contribute if you have ideas on how to improve it!

(https://github.com/pyrolass/grpc-microservice-go)
Earn your C# Certification with new Learning Series
Tags: csharp, programming, beginners, codenewbie
Published: 2024-04-01 17:09:40

We are excited to announce our new C# for Certification email learning series.

🚀 **Sign up for the learning series: [https://aka.ms/learningseries/csharp/signup](https://aka.ms/learningseries/csharp/signup)** 

This eight-week email series is intended to provide you with all the resources you need to complete the Foundational C# Certification training and take the exam. The learning series will give you a structured learning path and new content to learn each week.  

## How does the C# Certification learning series work? 

1. Sign up for the learning series: [https://aka.ms/learningseries/csharp/signup](https://aka.ms/learningseries/csharp/signup) 
1. Check your inbox each week to find a new lesson with a structured learning path, and additional resources. 
1. Complete the learning path and hands-on projects.
1. Take the exam and earn your certification!

## What is C#? 

C# (pronounced "See Sharp") is a modern, object-oriented, and type-safe programming language. C# enables developers to build many types of secure and robust applications that run in .NET. With C#, you can build... 

- Business applications to capture, analyze, and process data 
- Dynamic web applications that can be accessed from a web browser 
- Games, both 2D and 3D 
- Financial and scientific applications 
- Cloud-based applications 
- Mobile applications 

...and more!  

{% embed https://www.youtube.com/embed/9THmGiSPjBQ?si=GY8cI5a262ZvZd5y %} 

## The C# Roadmap 

As a C# beginner, it can be difficult to know where to start. The C# Roadmap below was created by experts at Microsoft.  

1. Get started! 
1. Write your first code using C#  
1. Create and run simple C# console applications  
1. Add logic to C# console applications 
1. Work with variable data in C# console applications 
1. Create methods in C# console applications 
1. Debug C# console applications 
1. Wrap up and additional learning resources 

🚀 **Begin earning your C# Certification today: [https://aka.ms/learningseries/csharp/signup](https://aka.ms/learningseries/csharp/signup)**  

*Not ready to sign up for the series?* Get access to the content through the Foundational C# Certification page: [https://aka.ms/csharp/certification](https://aka.ms/csharp/certification)
Managing NuGets in VS Code
Published: 2024-04-01 17:00:58

I do most of my app building on a MacBook with Visual Studio Code, and that means I am learning new ways of doing things in the absence of an IDE. 

One of the main things I miss about using an IDE is the NuGet package manager. Actually, I hesitate to say "miss" because I never liked the package manager experiences anyway. I would only use them to see versions, and then I would hand edit my `csproj` file before doing a `dotnet restore` or just building. 

In most cases I can open NuGet.org to look for the version information of the package in question, but that means changing context from VS Code which bums me out. I asked [GitHub Copilot](https://github.com/features/copilot) how I could do this in VS Code, and it pointed me to a .NET CLI tool called [`dotnet-outdated-tool`](https://www.nuget.org/packages/dotnet-outdated-tool).

To install: 

```
dotnet tool install --global dotnet-outdated-tool 
```

Running the `outdated` command from the terminal evals my project/solution and tells me what versions are available. Sweet!

```cli
dotnet outdated
```

![image of the terminal output in visual studio code listing all the packages and versions of the project](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o4hghrh9tfpmia0ttc2i.png)

From there I can update one ore more packages, or return to editing the `csproj` as I prefer to do. And this tool does more. I can filter on a partial or full package name like `Microsoft`.

![image of the terminal output in visual studio code listing only the packages from the project that include Microsoft in the name](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0jpzexqr1fh24bjpc7mp.png)

To view all the options, run `dotnet outdated --help`.

https://github.com/dotnet-outdated/dotnet-outdated

## Just dotnet please

You can (of course) do all this with the .NET CLI and not use that tool. It's a bit more typing. Here I filter down to the iOS target framework.

```
dotnet list package --include-prerelease --framework net8.0-ios17.2 --outdated
```

![image of the terminal output in visual studio code listing NuGet packages by target framework](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7s889uc9ewcegzx9mzu7.png)

I do like the visibility this gives me to the sources being used. I can even restrict to a specific source.

See [`dotnet list package`](https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-list-package) docs for more info.

With these commands I can be productive managing my NuGets in VS Code developing .NET MAUI apps. And as [Maddy Montaquila](https://twitter.com/maddymontaquila) says, working with the command line "makes me feel like a real developer". :)
Free Online OCR | Image to Text | Convert Handwriting | LaTeX
Tags: ai, orc
Published: 2024-04-01 16:58:48


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0pj4lwxfzdwql6diayyc.jpeg)
Welcome to **[Grabtext](https://www.grabtext.ai/)**, where innovation meets convenience. Our AI-powered tool transforms the way you interact with handwritten text. Say goodbye to manual transcription and hello to seamless conversion.
Deep Linking for Andriod and Apple in React.js
Tags: react, webdev, javascript
Published: 2024-04-01 16:53:10

Today I will discuss about how to create Android & Apple Deeplinking.

## For Android 

1. You have `assetlinks.json` file .
2. Create "assetlinks.json" file. Include the file inside `public/.well-known` folder .
3. The route is --> `domainname/.well-known/assetlinks.json` .

## For Apple
Unable to host static file apple-app-site-association from the react project root in locally . 

## Solutions : 
 Need two file and paste this json on this file:
   
   1. `public/.well-known/apple-app-site-association.`
   2. `public/.well-known/apple-app-site-association.json`

```
{
  "applinks": {
    "apps": [
      
    ],
    "details": [
      {
        "appID": "xxxxxxxx-xxxxxxxx",
        "paths": [
          "*",
          "/"
        ]
      }
    ]
  }
}

```
   
Using 
 1 . AWS Amplify
I added the following to the top of my redirects on amplify

    {
        "source": "/.well-known/apple-app-site-association",
        "target": "/.well-known/apple-app-site-association.json",
        "status": "200",
        "condition": null
    },



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/q8mw2to22mb2ndmwry9b.png)

##  Add a redirect
Finally, Apple expects this file to exist at the exact path `yourdomain.com/.well-known/apple-app-site-association`.



## Test your app
First, you'll need to make sure you publish your website on the domain you used.

Thanks for reading
My Free Resources for Learning CSS
Published: 2024-04-01 16:37:23

Folks, I know learning CSS is not an easy task. I'd like to help you. Catch my resources!

## CSS isn't magic newsletter
Periodically I meet developers who write tons of code to center elements. I have only one question "Why?"

They just don't understand CSS is a really simple language. So simple it becomes hard. It's why my newsletter is here! I want to help you understand CSS isn't magic.

[https://cssisntmagic.substack.com/archive](https://cssisntmagic.substack.com/archive)

## You Should Know CSS
CSS is a language with a bunch of topics. There is a developer who knows all unlikely. Honestly, we don't need to know it to do our job. But there is a piece of CSS without that we can't do. It is the goal of my questions.

These questions aren't suitable for beginners. You should have at least one year of experience. Two years is better. This time is enough to understand why I wrote these questions.

[https://github.com/melnik909/you-should-know-css](https://github.com/melnik909/you-should-know-css)

## CSS Live Cheat sheets
CSS Live Cheat sheets — is a live Codepen Cheat sheets that help you to learn the CSS pitfalls.

[https://github.com/melnik909/css-live-cheatsheets](https://github.com/melnik909/css-live-cheatsheets)
Building a Game Engine Using Java with LWJGL
Tags: java, gamedev, lwjgl, gameengine
Published: 2024-04-01 16:35:59

In this step-by-step guide, we'll walk through the process of creating a game engine using Java with LWJGL (Lightweight Java Game Library). LWJGL provides bindings to OpenGL, OpenAL, and other libraries, making it a powerful choice for developing games in Java.

## Prerequisites

Before we begin, make sure you have the following installed:

- Java Development Kit (JDK)
- IntelliJ IDEA or any preferred Java IDE
- LWJGL library

## Step 1: Set Up Your Project

1. Create a new Java project in IntelliJ IDEA.
2. Download the latest LWJGL binaries from the [official website](https://www.lwjgl.org/).
3. Extract the LWJGL binaries into a folder in your project directory.

## Step 2: Configure LWJGL Dependencies

1. In IntelliJ IDEA, right-click on your project and select "Open Module Settings."
2. Click on "Modules" and then select the "Dependencies" tab.
3. Click the "+" icon and add the LWJGL JAR files from the extracted folder.

## Step 3: Create Your Main Class

1. Create a new Java class for your main game engine.
2. Import the necessary LWJGL classes:

```java
import org.lwjgl.glfw.GLFW;
import org.lwjgl.opengl.GL;
import static org.lwjgl.glfw.GLFW.*;
import static org.lwjgl.opengl.GL11.*;
```

**Set up your main method and GLFW window:**

```java
public class Main {
    public static void main(String[] args) {
        // Initialize GLFW
        if (!glfwInit()) {
            throw new IllegalStateException("Unable to initialize GLFW");
        }

        // Create a windowed mode window and its OpenGL context
        long window = glfwCreateWindow(800, 600, "My Game", 0, 0);
        if (window == 0) {
            glfwTerminate();
            throw new RuntimeException("Failed to create the GLFW window");
        }

        // Make the OpenGL context current
        glfwMakeContextCurrent(window);
        GL.createCapabilities();

        // Set the clear color
        glClearColor(0.0f, 0.0f, 0.0f, 0.0f);

        // Main loop
        while (!glfwWindowShouldClose(window)) {
            // Poll for window events
            glfwPollEvents();

            // Render here
            glClear(GL_COLOR_BUFFER_BIT);

            // Swap the buffers
            glfwSwapBuffers(window);
        }

        // Terminate GLFW
        glfwTerminate();
    }
}
```

## Step 4: Run Your Game Engine

1. Run your main class.
2. You should see a blank window titled "My Game" appear.
3. Congratulations! You've created the foundation of your game engine using Java with LWJGL.

## Conclusion

In this guide, we've covered the basics of creating a game engine using Java with LWJGL. From setting up your project to configuring LWJGL dependencies and creating a main class, you're now ready to start building your own game engine and bring your game ideas to life. Happy coding!
Gibby Law Firm PLLC
Published: 2024-04-01 16:23:01



![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yq1ebcq4m7ikcm5i5d77.png)


We have been serving Northwest Arkansas residents since 2007. Our law firm primarily focuses on estate planning and business formation. This has enabled us to become very knowledgeable and effective in these areas of the law while still relying on our broad experience to advise our clients in many areas of their lives. As a member of Wealth Counsel, Darrell Gibby is equipped with extensive information, resources, and tools that greatly enhance his ability to serve his clients. We pride ourselves in helping clients experience the peace of mind that comes with establishing and maintaining a quality estate plan.

Gibby Law Firm PLLC
Address: [903 Southeast 22nd Street, Bentonville, Arkansas, 72712](https://www.google.com/maps?cid=16413461398143942704)
Phone: 14792718898
Website: [https://gibbylawfirm.com/](https://gibbylawfirm.com/)

Our services:
Estate Planning
Probate
Business Formation
Real Estate
Learning AWS Day by Day — Day 23 — S3 Introduction — Part 1
Tags: aws, cloud, cloudcomputing, beginners
Published: 2024-04-01 16:33:36

Exploring AWS !!

Day 23:

S3 Introduction — Part 1

Amazon Simple Storage Service — S3 is storage that can be maintained and accessed over internet.
S3 provides web services that can be used to store and retrieve unlimited amount of data. Same can be done programmatically using Amazon provided APIs.

S3 Data Consistency Model -
- provides highly durable and available solution by replicating all data in multiple data centers in a region.
- data uploaded in particular region never leaves it.
- read after write consistency.
- eventual consistency.

Consistent Read —
- No stale reads.
- Higher comparative read latency.
- Read throughput is comparatively lower.

Eventual Consistent Read - - Stale reads are possible.
- Lower comparative read latency.
- Read throughput is higher.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9xw19y1iyafh89sn6db1.png)



Storage Hierarchy - - S3 follows as storage hierarchy while keeping data (docs, img, files, etc.)
- Management console or S3 APIs can be used to manage buckets and objects.

Buckets — folder which stores data
- Total 100 can be created, else you need to increase and request for same.
- Communicating using SDK — while using SDKs, first a client is created, and then this client is used to send request for creating bucket. The client is created by specifying AWS region and client uses endpoint to communicate with S3.
Example: If a client is created by specifying N.Virginia region, then following endpoint is used to communicate with Amazon S3 → S3.amazonaws.com
For other regions → s3<region-name>.amazonaws.com
Knowing Mathematics
Tags: math, exactsciences, education
Published: 2024-04-01 16:30:03

Consider the following expression:

![W(2e²) + e^iπ](https://cacilhas.info/img/math/w2e2+eipi.svg)

If you’re not a Mathematician, Physicist, Astronomer, or anything in hard sciences, you are not obliged to know how to solve it – no one has taught you it at school.

However, if I give you the required tools in this very post, and you still can’t solve it by using school algebra, it means you have no fitness for Exact Sciences – which is okay, that’s nothing wrong; it doesn’t make you worse or better than anyone else, maybe you got aptitude for something else.

But we can call **WRONG** people deeply debating about Physics, Astrophysics, Astronomy, Chemistry, and even Math sometimes, like they were misunderstood geniuses. (Yeah… I’m writing this post ’cause I’m fed up with those people.) 😖

No, kid! You aren’t a new “Einstein,” able to understand things that no expert can. It’s just the [Dunning-Kruger effect](https://www.abebooks.com/9786130693619/DunningKruger-Effect-6130693613/plp) preventing you from realising you haven’t gotten even the basics.

By the way, here are all the tools you need to solve the expression above:

![W(zeᶻ) = z](https://cacilhas.info/img/math/lamberts-W-function.svg)

![eᶿⁱ = cosθ + i sinθ](https://cacilhas.info/img/math/euler.svg)

![sinπ = 0](https://cacilhas.info/img/math/sinpi.svg)

![cosπ = -1](https://cacilhas.info/img/math/cospi.svg)

Only school algebra and these definitions are enough to reach the result; if you still need to google it or to refer to [Wolfram Alpha](https://www.wolframalpha.com/), Exact Sciences aren’t for you.

I must reiterate: that doesn’t mean you are less than anyone! Maybe you fit into Social Sciences! Just in the same way some Exact Sciences people are fully witless when it comes to politics and other social subjects. Just don’t try to refute `E² = (mc²)² + (pc)²` if you didn’t get.

-----

Original post at [ℳontegasppα And Giulia C.’S Thoughts](https://montegasppa.cacilhas.info/2024/04/knowing-math.html).
Turn Your Junk into Cash with Cash For Cars: Lawrence's Premier Junk Car Buyer!
Published: 2024-04-01 16:25:16

Looking to sell your [junk car in Lawrence](https://cashforcars-junkcars.com/cash-for-cars-lawrence-kansas/)? Look no further! Cash For Cars offers top dollar for your old vehicles. We buy all makes and models, running or not. Visit our website at [cashforcars-junkcars.com](https://cashforcars-junkcars.com/) to get a quote today and turn your junk into cash!