Skip to content

Instantly share code, notes, and snippets.

View yanisurbis's full-sized avatar
🍞
Converting energy to experience

Yanis Urbis yanisurbis

🍞
Converting energy to experience
View GitHub Profile
const baseClient = defaultClient.pipe(
Http.client.filterStatusOk,
Http.client.mapRequest(clientRequest =>
pipe(clientRequest, Http.request.prependUrl(config.creditSafeApiUrl)),
),
)
const client = pipe(
baseClient,
Http.client.mapRequestEffect(clientRequest =>
<prompt_explanation>
You are an expert software tester tasked with thoroughly testing a given piece of code. Your goal is to generate a
comprehensive set of test cases that will exercise the code and uncover any potential bugs or issues.
First, carefully analyze the provided code. Understand its purpose, inputs, outputs, and any key logic or
calculations it performs. Spend significant time considering all the different scenarios and edge cases that need to
be tested.
Next, brainstorm a list of test cases you think will be necessary to fully validate the correctness of the code. For
each test case, specify the following in a table:
<improvement_suggestions_section>
<header>Improvement Suggestions:</header>
<suggestion>
<original_text>Its inception dates back to the early days of Mesopotamia, where farmers borrowed seeds with the
promise of repayment alongside interest upon a successful harvest.</original_text>
<revised_text>The concept of debt dates back to ancient Mesopotamia, where farmers borrowed seeds and agreed to
repay the lender with interest after a successful harvest.</revised_text>
<explanation>The revised text simplifies the sentence structure and makes it more concise without losing the
essential information. It improves clarity and readability.</explanation>
</suggestion>
<prompt_explanation>
You are a skilled editor and writing expert. Your task is to take a given text and provide suggestions to improve
its clarity, coherence, and overall effectiveness.
First, carefully read through the text and identify areas that could be improved. Consider factors such as:
Clarity: Is the meaning clear and easily understood by the intended audience?
Conciseness: Can the text be made more concise without losing critical information?
Logical flow: Do the ideas flow logically from one to the next?
Grammar and punctuation: Are there any grammatical errors or punctuation issues?
import { Effect } from 'effect'
import { PrismaClientTx } from 'server/modules/prisma-client-tx/interface'
import { runInsideTransaction } from 'server/modules/prisma-client-tx/live'
import { PrismaClient } from 'server/modules/prisma-client/interface'
import { PrismaClientLayerLive } from 'server/modules/prisma-client/live'
import { testHelpers } from 'lib/tests'
const { it, beforeAll, afterEach } = testHelpers(PrismaClientLayerLive)
const tokens = ['foo', 'bar']
// explore layers in more details, https://effect-ts.github.io/io/modules/Layer.ts.html
import { Context, Effect, Layer } from 'effect'
type A = {
a: (x: number) => Effect.Effect<never, never, number>
}
const A = Context.Tag<A>()
type B = {
// cache
// use segment address to send file, make segment available for other threads right after exit
// the error is in this function
int send_file_through_shm(cache_thread_ctx *ctx) {
long maxBytesToRead = ctx->seg_size - 1;
long n_loops = ctx->file_size / maxBytesToRead;
n_loops += (ctx->file_size % maxBytesToRead) == 0 ? 0 : 1;
long res = 0;
package main
import (
"bytes"
"fmt"
"log"
"net"
"os"
"strings"
"time"
package main
import (
"bytes"
"fmt"
"log"
"net"
"os"
"strings"
"time"
package main
import (
"fmt"
"log"
"net"
"os"
"os/exec"
"strings"
"sync"