This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.acme; | |
import java.util.Random; | |
public class SentenceGenerator { | |
private static final String[] subjects = {"The cat", "A wizard", "The dragon", "An astronaut", "A pirate"}; | |
private static final String[] verbs = {"jumps over", "casts a spell on", "breathes fire at", "explores", "steals"}; | |
private static final String[] objects = {"the moon", "a treasure chest", "a castle", "a spaceship", "a secret island"}; | |
public static String getSentenceWords(int wordLength) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌───────────────────> 🐠 | |
│quarkus-drools-llm is 📦 v1.0.0-SNAPSHOT | |
└─> java --enable-preview --enable-native-access=ALL-UNNAMED --add-modules jdk.incubator.vector -jar target/quarkus-app/quarkus-run.jar (base) | |
WARNING: Using incubator modules: jdk.incubator.vector | |
__ ____ __ _____ ___ __ ____ ______ | |
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/ | |
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \ | |
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/ | |
2024-11-13 16:43:16,187 INFO [io.quarkus] (main) quarkus-drools-llm 1.0.0-SNAPSHOT on JVM (powered by Quarkus 3.15.1) started in 0.476s. Listening on: http://0.0.0.0:8080 | |
2024-11-13 16:43:16,191 INFO [io.quarkus] (main) Profile prod activated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///usr/bin/env jbang "$0" "$@" ; exit $? | |
//DEPS com.fasterxml.jackson.core:jackson-databind:2.13.3 | |
//DEPS com.fasterxml.jackson.core:jackson-core:2.13.3 | |
//DEPS com.fasterxml.jackson.core:jackson-annotations:2.13.3 | |
import com.fasterxml.jackson.databind.JsonNode; | |
import com.fasterxml.jackson.databind.ObjectMapper; | |
import java.io.BufferedReader; | |
import java.io.InputStreamReader; | |
import java.util.Iterator; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigInteger; | |
import java.util.concurrent.StructuredTaskScope; | |
public class ScopedValue21 { | |
private static final ScopedValue<BigInteger> multiplier = ScopedValue.newInstance(); | |
public static void main(String[] args) throws Exception { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you have already tried something like the following: | |
oc delete project dev --force --grace-period=0 | |
#Most likely Kube is set in the finalizer which does not let the namespace to be removed. here is one way to do it. | |
kubectl get ns PROJECTNAME -o json > tmp.json | |
vi tmp.json | |
#Make sure finalizers are empty as follows | |
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# python request json data loaded from a file | |
import requests | |
# reads 1 line at a time, this is not an array | |
file1 = open('MOCK_DATA.json', 'r') | |
Lines = file1.readlines() | |
header = { | |
'Content-Type': 'application/json' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "waiting for the following arguments: username + max-page-number" | |
exit 1 | |
else | |
name=$1 | |
fi | |
if [ -z "$2" ]; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.acme.rest.json; | |
import io.quarkus.infinispan.client.Remote; | |
import io.reactivex.Observable; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.infinispan.client.hotrod.RemoteCache; | |
import java.util.ArrayList; | |
import java.util.HashSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: infinispan.org/v1 | |
kind: Infinispan | |
metadata: | |
annotations: | |
infinispan.org/monitoring: 'true' | |
infinispan.org/operatorPodTargetLabels: >- | |
com.redhat.component-name,com.redhat.component-type,com.redhat.component-version,com.redhat.product-name,com.redhat.product-version | |
selfLink: /apis/infinispan.org/v1/namespaces/atest/infinispans/example-infinispan | |
resourceVersion: '1195423' | |
name: example-infinispan |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NewerOlder