This file contains 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
bdjdhdh |
This file contains 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
namespace Geocoding | |
{ | |
class HttpRequestSender | |
{ | |
public HttpResponseObject SendHttpRequest(string url, Stopwatch watch) | |
{ | |
IPEndPoint remoteIp = null; | |
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(url); | |
request.ServicePoint.BindIPEndPointDelegate = delegate(ServicePoint servicePoint, IPEndPoint remoteEndPoint, int retryCount) | |
{ |
This file contains 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
gpt() { | |
local input=$1 | |
local model="gpt-3.5-turbo" | |
local temperature=0.5 | |
local url="https://api.openai.com/v1/chat/completions" | |
local payload="{\"model\":\"$model\",\"messages\":[{\"role\":\"system\",\"content\":\"You are ChatGPT, a large language model trained by OpenAI.\\nKnowledge cutoff: 2021-09\\nCurrent date and time: $(date +%d/%m/%Y,%H:%M:%S)\"},{\"role\":\"user\",\"content\":\"$input\"}],\"temperature\":$temperature,\"stream\":false}" | |
local gpt=$(curl -s -X POST -H "Content-Type: application/json" -H "Authorization: Bearer $OPEN_AI_KEY" -d "$payload" "$url") | |
echo "$gpt" | sed 's/$/\\n/' | tr -d '\n' | sed -e 's/“/"/g' -e 's/”/"/g' | sed '$ s/\\n$//' | jq -r '.choices[0].message.content' | glow - | |
} |
This file contains 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 React, { useCallback, useState } from "react"; | |
const EnvironmentVariables = () => { | |
const [variables, setVariables] = useState([{ key: '', value: '' }]); | |
const handleInputChange = useCallback((index, field, value) => { | |
setVariables((prevVariables) => { | |
const newVariables = [...prevVariables]; | |
newVariables[index][field] = value; | |
return newVariables; |