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
| 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" |
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 '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. |
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
| 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' |
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
| LDConfig config = new LDConfig.Builder() | |
| .logging(Components.logging(Logs.basic())) | |
| .build(); | |
| LDClient client = new LDClient(SDK_KEY, config); |
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
| 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"); |
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 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. |
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
| 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" |
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
| # 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 |
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
| # 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 |
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 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 |