Skip to content

Instantly share code, notes, and snippets.

View MeiyappanKannappa's full-sized avatar

Karthik Meiyappan MeiyappanKannappa

View GitHub Profile
plugins {
id 'org.springframework.boot' version '2.7.2'
id 'io.spring.dependency-management' version '1.0.12.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
def grpcVersion = "1.39.0"
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
// This widget is the root of your application.
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/groups/public/" }
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
// https://mvnrepository.com/artifact/com.launchdarkly/launchdarkly-java-server-sdk
implementation 'com.launchdarkly:launchdarkly-java-server-sdk:5.10.0'
LDConfig config = new LDConfig.Builder()
.logging(Components.logging(Logs.basic()))
.build();
LDClient client = new LDClient(SDK_KEY, config);
LDUser jsonuser = new LDUser.Builder("admin-user-key")
.name("adminuser")
.build();
LDValue jsonValue = client.jsonValueVariation("sample-feature-json", jsonuser, null);
System.out.println("Feature flag '" + "sample-feature-json" + "' is " + jsonValue + " for this user");
import com.launchdarkly.logging.*;
import com.launchdarkly.sdk.*;
import com.launchdarkly.sdk.server.*;
import java.io.IOException;
public class LDExample {
// Set SDK_KEY to your LaunchDarkly SDK key.
implementation 'edu.stanford.nlp:stanford-corenlp:4.5.2'
implementation "edu.stanford.nlp:stanford-corenlp:4.5.2:models"
implementation "edu.stanford.nlp:stanford-corenlp:4.5.2:models-english"
implementation "edu.stanford.nlp:stanford-corenlp:4.5.2:models-english-kbp"
# Step 1: Get user input
user_input = "red"
# Step 2: Define the Prompt Template
prompt = PromptTemplate(
input_variables=["color"],
template="Define {color} with a real-world example?",
)
# Step 3: Print the Prompt Template
# Step 1: Get user input
user_input = "red"
# Step 2: Define the Prompt Template
prompt = PromptTemplate(
input_variables=["color"],
template="Define {color} for cakes and pastries?",
)
# Step 3: Print the Prompt Template
import os
from langchain.agents import AgentType
from langchain.agents import initialize_agent
from langchain.agents.agent_toolkits.github.toolkit import GitHubToolkit
from langchain.llms import Ollama
from langchain.utilities.github import GitHubAPIWrapper
from langchain.prompts import PromptTemplate
from langchain.chains import LLMChain
# Set your environment variables using os.environ