전체 글
-
Flask, form 예제카테고리 없음 2023. 5. 28. 17:15
Form 1 Name: Email: Form 2 Username: Password: from flask import Flask, request, render_template app = Flask(__name__) @app.route('/form1', methods=['GET', 'POST']) def handle_form1(): if request.method == 'POST': name = request.form.get('name') email = request.form.get('email') print(name, email) # Process the form data for form1 return f"Form 1: Name - {name}, Email - {email}" return render_te..
-
우분투에서 microsoft-edge 사용하기카테고리 없음 2023. 5. 6. 17:55
sudo apt update sudo apt install software-properties-common apt-transport-https wget wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" sudo apt install microsoft-edge-dev
-
안드로이드 앱에서 이미지 파일 선택하여 보여주기카테고리 없음 2023. 4. 21. 13:18
public class MainActivity extends AppCompatActivity { private final int GET_GALLERY_IMAGE = 200; private ImageView imageview; private Button pickButton; @SuppressLint("MissingInflatedId") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); pickButton = (Button)findViewById(R.id.pickButton); pickButton.setOnCli..
-
승무지시서 좌표값읽어오기카테고리 없음 2023. 4. 18. 16:16
import io import os import re from google.cloud import vision_v1 from google.cloud.vision_v1 import types def detect_text(path, target_strings): client = vision_v1.ImageAnnotatorClient() with io.open(path, 'rb') as image_file: content = image_file.read() image = types.Image(content=content) # Vision API를 사용하여 이미지에서 텍스트 감지 response = client.text_detection(image=image) # 감지된 문자 리스트로 변환 texts = res..
-
flask서버를 이용한 안드로이드앱 전송카테고리 없음 2023. 4. 3. 19:54
import flask app = flask.Flask(__name__) @app.route('/', methods=['GET', 'POST']) def handle_request(): postBody = flask.request.get_data() postBodyStr = postBody.decode('utf-8') print("Post Body:", postBodyStr) return "Flask Server & Android are Working Successfully" if __name__ == '__main__': app.run(host="192.168.168.163", port=5000, debug=True) implementation 'com.squareup.okhttp3:okhttp:3.4..
-
chatGPT 테스트 php 코드카테고리 없음 2023. 3. 12. 20:14
"gpt-3.5-turbo", "messages" => array( array( "role" => "user", "content" => $prompt ) ), "max_tokens" => 3000, "temperature" => 0.5,);$data_string = json_encode($data);$ch = curl_init();curl_setopt($ch, CURLOPT_URL, $url);curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);curl_setopt($ch, CURLOPT_POST, true);curl_setopt($ch, CURLOPT_P..
-
chatGPT 테스트 python 코드카테고리 없음 2023. 3. 12. 15:17
https://platform.openai.com/ OpenAI API An API for accessing new AI models developed by OpenAI platform.openai.com 가입하여 key를 발급 받는다. 그런데, 테스트는 할수 있고, 사용하려면 돈 내야 한다. import openai # Setting API key # You can obtain your key via # https://platform.openai.com/account/api-keys openai.api_key = "" # ChatGPT Context context = {"role": "system", "content": "Hello World!"} messages = [context] # Colors ..