앱을 실행해 보면 화면에 버튼이 있고 이 버튼으로 모드 설정을 하거나, 해제할 수 있도록 되어 있습니다. 또한 install application 버튼이 있는 데, 이 버튼은 정상적으로 동작을 하게 하려면 디바이스의 설정에서 관리자 권한을 이 앱에 부여하였을 때만 실행이 됩니다.
주의해야 할 부분
디바이스의 설정에서 홈런처를 선택할 수 있습니다. 이때 내가 만든 앱을 고정시킨 후 홈 런처까지 설정을 해 버렸다면, 그걸 풀 수 있는 방법은 공장 초기화 말고는 없을 듯합니다. (물론 앱 안에서 디바이스 설정을 들어갈 수 있도록 해 두었다면 이야기는 달라집니다.)
이런 정도까지의 배움을 할 수 있었습니다. kotlin으로 작성된 source code을 참조해 보고 싶으시면 위 원작자의 링크를 참고해 보시면 됩니다.
제일 바깥쪽에 ConstraintLayout 로 감싸고 그 안에 배치할 것을 추가합니다. 예제에서는 2개의 요소만 배치를 했기 때문에 선언된 것도 2개뿐 입니다만, 여러 개 있다면 그것들을 다 기술해 주어야 합니다. 그리고 각 요소들의 Modifier.constrainAs을 활용하여 위치 지정을 시작합니다.
예제에서는 parent 라고 기술되는 제일 상위 ConstraintLayout으로부터 위치만 지정하도록 구성을 해 보았지만, parent 대신에 이전 요소인 runBtn 등의 이름이 적용될 수 도 있습니다.
이제는 화면 전체에 자유자재로 요소들을 배치하여 유연한 UI도 만들어 볼 수 있을 듯 합니다.
오늘은 챗봇과 스무고개 게임에 대한 이야기를 잠시 해 보았습니다. 챗봇에게 나의 의도를 설명하고 그 놀이를 할 수 있는지 물어보았고, 챗봇은 흔쾌히(?) 가능하다고 합니다. 해서 챗봇과 질문과 응답을 해 보았습니다.
챗봇이 외국계이기 때문에 질문은 영어로 하고 답도 영어로 받습니다. 여기서 번역은 구글 번역기를 활용 했습니다. 혹시나 영어를 잘하는 것으로 오해를 하실까 싶어 미리 밝힙니다. ㅋㅋ~
내가 한 질문: I want to play a question and answer game with you. The method of the game is that you remember the name of an object and I match it. I'm going to ask you 20 questions before you tell me the answer, you have to answer it like this, right, wrong, similar, and after the 20 questions are over, it's a game where you tell me if the answer I'm talking about is right or not. If the answer I said is wrong even after 20 questions, you win the game, and if I got it right, I win the game. can i do it
답 : Yes, I can play the question and answer game with you. Let's get started!
내가한 질문 : Then did you start remembering one thing?
답 : Yes, I have something in mind. You can start asking your questions.
내가한 질문 : is it an animal 답 : No, it is not an animal.
내가한 질문 : is it a thing 답 : Yes, it is a thing.
내가한 질문 : can it ride 답 : Yes, it is possible for this thing to be ridden.
내가한 질문 : is it a car 답 : No, it is not a car.
내가한 질문 : Does it have an engine 답 : Yes, it has an engine.
내가한 질문 : does it have two wheels 답 : Yes, it has two wheels.
내가한 질문 : is it a motorcycle 답 : Yes, it is a motorcycle.
내가한 질문 : Wow... I won, right? 답 : Yes, that's correct! You correctly guessed that the thing I was thinking of is a motorcycle. Congratulations, you win the game!
내가한 질문 : Did my number of questions exceed the first 20? 답 : No, you correctly guessed the answer within the first 6 questions, so we didn't need to go through all 20 questions. Well done!
내가한 질문 : Can you make a game like this with python code 답 : Yes, it is possible to create a similar game using Python code. Here is some sample code to get you started:
import random
# Create a list of items to be guessed items = ["motorcycle", "bicycle", "scooter", "skateboard", "rollerblades", "unicycle"]
# Select a random item from the list selected_item = random.choice(items)
# Define a function to play the game def play_game(item): guesses = 0 max_guesses = 20 while guesses < max_guesses: guesses += 1 guess = input("Guess the item: ") if guess == item: print("Congratulations, you win!") return elif guesses == max_guesses: print(f"Sorry, you've used all {max_guesses} guesses. The item was {item}.") return else: print("Incorrect guess. Please try again.")
# Play the game with the selected item play_game(selected_item)
This code randomly selects an item from a list and allows the user to guess the item within 20 attempts. If the user correctly guesses the item, the program ends with a congratulatory message. If the user uses all 20 guesses and still hasn't correctly guessed the item, the program ends with a message revealing the correct answer. You can modify the list of items to make the game more challenging or interesting.
내가한 질문 : There doesn't seem to be a function in this code to answer a question like you do. Can't you create a code that thinks and answers when you ask a question like I did with you?
답 : Ah, I understand what you're asking now. I apologize for the confusion earlier. What you're describing is a natural language processing (NLP) chatbot that can understand and respond to user input. While it's possible to create a simple NLP chatbot using Python, it's a complex task that requires significant knowledge in machine learning and natural language processing. There are various libraries and frameworks available in Python for developing NLP chatbots, such as spaCy, NLTK, and TensorFlow. However, creating a sophisticated chatbot that can understand and respond to a wide range of user input requires significant development effort and training data. If you'd like to learn more about developing chatbots with Python, there are many online tutorials and resources available that can help you get started.
내가한 질문 : Can you recommend just 20 online tutorials and resources?
답 : Sure, here are 20 online tutorials and resources for learning about chatbot development with Python:
내가한 질문 : thank you so much 답 : You're welcome! Don't hesitate to reach out if you have any further questions or if there's anything else I can help you with.
대화중에 파이썬 코드로 스무고개 게임을 할 수 있는 코드를 구현해 달라고 했더니 그것도 흔쾌히 해 주기는 했습니다만, 나의 의도와 다르길래 그 이야기를 했더니 이해를 했다면서 공부를 해야할 부분에 대한 조언도 해 주었습니다.
그래서 20개의 온라인 자습서나 리소스를 알려 달라고 해서 받았습니다. 다 영어로 되어 있는 정보들이라서... 흠...
#스하리1000명프로젝트, 가끔 외국인 노동자들과 대화가 힘들 때가 있죠? 도움이 되는 간단한 앱을 만들어 봤습니다! 당신은 당신의 언어로 글을 쓰고, 다른 사람들은 그것을 그들의 언어로 봅니다. 설정에 따라 자동 번역됩니다. 쉬운 채팅에 매우 편리합니다. 기회되면 꼭 보세요! https://play.google.com/store/apps/details?id=com.billcoreatech.multichat416
물론 50대 중년 남성이 일자리를 찾을 때 염두에 두어야 할 20가지 사항은 다음과 같습니다.
1. 가장 최근의 업적과 기술을 강조하도록 이력서를 업데이트하십시오. 2. 이전 동료, 친구 및 가족과 네트워크를 형성하여 직업 리드 및 추천을 받으세요. 3. 채용 박람회 및 업계 회의에 참석하여 잠재적인 고용주를 만나고 취업 기회에 대해 알아보세요. 4. 기술을 업데이트하고 시장성을 높이기 위해 직업 훈련이나 인증을 찾는 것을 두려워하지 마십시오. 5. LinkedIn과 같은 소셜 미디어 플랫폼을 활용하여 전문 네트워크를 구축하고 경험을 선보이세요. 6. 경력에 고용 공백이나 경력 변경 사항을 설명할 준비를 하십시오. 7. 잠재적인 고용주를 조사하고 필요에 맞게 이력서와 커버레터를 조정하십시오. 8. 취업 기회를 찾는 데 도움이 되는 채용 담당자 또는 인력 대행사와 협력하는 것을 고려하십시오. 9. 구직 과정 내내 긍정적이고 열정적인 태도를 유지하십시오. 10. 원래 경력 경로와 일치하지 않을 수 있는 직업 기회에 대해 유연하고 열린 마음을 가지십시오. 11. 기꺼이 낮은 수준에서 시작하거나 임시 또는 계약직 역할을 맡아 경험을 쌓고 자신의 가치를 증명하십시오. 12. 면접 기술을 연습하고 어려운 질문에 답할 준비를 하십시오. 13. 전문적인 복장을 하고 인터뷰를 위해 일찍 도착하십시오. 14. 열정을 보여주고 면접 중에 사려 깊은 질문을 하여 직업에 대한 관심을 보여주세요. 15. 인터뷰 후 감사 노트를 작성하여 감사를 표현하고 해당 업무에 대한 관심을 다시 한번 확인하십시오. 16. 참고 문헌 목록을 준비하고 그들이 당신이 구직 중이라는 것을 알고 있는지 확인하십시오. 17. 채용 제안을 받은 후 급여와 혜택을 협상할 준비를 하십시오. 18. 구직이 예상보다 오래 걸리더라도 정신을 차리고 동기를 유지하십시오. 19. 기술을 구축하고 전문 네트워크를 확장하기 위해 자원 봉사나 프리랜서 작업을 고려하십시오. 20. 풍부한 경험, 지식 및 성숙도를 직장에 가져오므로 나이가 자산이 될 수 있음을 기억하십시오.