일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
- leetcode
- github
- AI 경진대회
- 자연어처리
- ChatGPT
- programmers
- 금융문자분석경진대회
- Kaggle
- 캐치카페
- SW Expert Academy
- Real or Not? NLP with Disaster Tweets
- hackerrank
- 맥북
- 백준
- gs25
- 프로그래머스 파이썬
- 프로그래머스
- 우분투
- 데이콘
- 코로나19
- 편스토랑 우승상품
- ubuntu
- Git
- PYTHON
- Docker
- dacon
- Baekjoon
- 더현대서울 맛집
- 파이썬
- 편스토랑
- Today
- Total
목록
반응형
2020/09 (46)
솜씨좋은장씨
심리 성향 예측 AI 경진대회 출처 : DACON - Data Science Competition dacon.io 군에서 근무할 당시에 이런 심리 성향을 예측하는 것에 관심이 있었는데 최근 DACON( 데이콘 ) 에서 관련한 예측 경진대회가 열렸다고 하여 한 번 도전해보려고 합니다. 이상한 이유지만 무엇보다도 배경색이 제가 좋아하는 노란색이어서 그것이 마음에 들어 더더욱 도전해봐야겠다라는 생각이 들었습니다. 사실 처음엔 자연어처리 대회인 것 같아 관심이 갔던 부분이 더 컸기에 조금 아쉬운 부분이 있지만 그동안 나태해진 것 같았던 저를 돌아보며 열심히 해보려고 합니다. 심리 성향 예측에 관심이 있었거나 이런 대회를 해보고 싶었던 분이 있었다면 한 번 도전해보셔도 좋을 것 같습니다~ 그럼 앞으로 시간 날때마..
2020년은 코로나19로 인하여 일상생활에서 많은 부분들이 바뀌었습니다. 그 중 하나는 음식점, 가게 등을 방문할 때 카카오 또는 네이버를 통해 만든 QR 코드를 통하여 방문했었다는 기록을 남기는 전자출입명부가 있습니다. 잠깐 테이크 아웃을 해야하는 경우에도 이 전자출입명부를 활용해야하기 때문에 매번 카카오톡을 열고 # 메뉴에서 QR 코드를 켜는 것이 귀찮을 때도 있습니다. 이 글에서는 ios14에서 업데이트 되면서 추가된 뒷면탭 기능을 활용하여 QR코드로 이동하는 과정을 축소하여 좀 더 편리하게 QR 코드를 열어 사용하는 방법에 대해 적어보려 합니다. ios14 먼저 해당 방법을 활용하기 위해서는 사용하고 있는 아이폰의 OS를 최신 OS인 ios14로 업데이트를 진행하여야 합니다. 업데이트를 완료 후 ..
Given a singly linked list, determine if it is a palindrome. Example 1: Input: 1->2 Output: false Example 2: Input: 1->2->2->1 Output: true Follow up: Could you do it in O(n) time and O(1) space? Solution # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def isPalindrome(self, head: ListNode) -> bool..
Remove all elements from a linked list of integers that have value val. Example: Input: 1->2->6->3->4->5->6, val = 6 Output: 1->2->3->4->5 Solution # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def removeElements(self, head: ListNode, val: int) -> ListNode: while head and head.val == val: head = ..
Given alphanumeric string s. (Alphanumeric string is a string consisting of lowercase English letters and digits). You have to find a permutation of the string where no letter is followed by another letter and no digit is followed by another digit. That is, no two adjacent characters have the same type. Return the reformatted string or return an empty string if it is impossible to reformat the s..
Students are asked to stand in non-decreasing order of heights for an annual photo. Return the minimum number of students that must move in order for all students to be standing in non-decreasing order of height. Notice that when a group of students is selected they can reorder in any possible way between themselves and the non selected students remain on their seats. Example 1: Input: heights =..
Your friend is typing his name into a keyboard. Sometimes, when typing a character c, the key might get long pressed, and the character will be typed 1 or more times. You examine the typed characters of the keyboard. Return True if it is possible that it was your friends name, with some characters (possibly none) being long pressed. Example 1: Input: name = "alex", typed = "aaleex" Output: true ..
논문 : Keywords Extraction with Deep Neural Network Model Keywords extraction with deep neural network model Keywords can express the main content of an article or a sentence. Keywords extraction is a critical issue in many Natural Language Processing (NLP) a… www.sciencedirect.com 영어 단어 뜻 비고 contextual information 문맥 정보 Admittedy 당연히 non-trivial 사소하지 않은 conciseness 간결 hand-crafted feature 머신러닝에서 ..
Given two strings a and b, return the minimum number of times you should repeat string a so that string b is a substring of it. If it is impossible for b to be a substring of a after repeating it, return -1. Notice: string "abc" repeated 0 times is "", repeated 1 time is "abc" and repeated 2 times is "abcabc". Example 1: Input: a = "abcd", b = "cdabcdab" Output: 3 Explanation: We return 3 ..
Given an array of integers arr, write a function that returns true if and only if the number of occurrences of each value in the array is unique. Example 1: Input: arr = [1,2,2,1,1,3] Output: true Explanation: The value 1 has 3 occurrences, 2 has 2 and 3 has 1. No two values have the same number of occurrences. Example 2: Input: arr = [1,2] Output: false Example 3: Input: arr = [-3,0,1,-3,1,1,1,..
There is a robot starting at position (0, 0), the origin, on a 2D plane. Given a sequence of its moves, judge if this robot ends up at (0, 0) after it completes its moves. The move sequence is represented by a string, and the character moves[i] represents its ith move. Valid moves are R (right), L (left), U (up), and D (down). If the robot returns to the origin after it finishes all of its moves..
Python에서 문자열을 다루다보면 특히 한글이 포함된 문자열을 다루게 되면 종종 아래와 같은 에러코드를 만나며 인코딩 문제로 애를 먹는 경우가 많이 있습니다. UnicodeEncodeError: 'cp949' codec can't encode character '\xa0' in position 17678: illegal multibyte sequence 위와 같은 문제를 만났을 때 내가 지금 다루고 있는 문자열 또는 파일속의 데이터가 어떤 인코딩을 사용하는지 확인하고 싶을 경우 방법은 다음과 같습니다. 필요 라이브러리 설치 먼저 인코딩을 확인하기 위해 필요한 chardet 라이브러리를 설치합니다. $ pip install chardet 사용 방법 문자열의 경우 import chardet string =..
가끔씩 데이터를 수집하기 위해서 Python으로 Selenium 을 활용한 크롤링 코드를 작성하고 실행하려하면! 새롭게 세팅한 개발환경이라 webdriver가 아직 존재하지 않거나 기존 컴퓨터에서 사용하고 있는 Chrome( 크롬 )의 버전이 업데이트 되어 기존에 사용하던 webdriver가 버전이 맞지않아 사용이 불가한 경우 직접 Chrome 버전이 무엇인지 확인 후 webdriver를 다운받는 홈페이지로 이동하여 직접 현재 버전에 맞는 파일을 다운로드 받아 사용해야 해서 번거로움이 많았습니다. 여러 페이지의 크롤러를 만들면서 이를 하나로 묶어서 패키지화를 하면 어떨까 고민하던 중 매번 다운로드 받아야하는 webdriver를 python 코드를 활용해 자동으로 설치해주면 어떨까? 라는 생각이 들었고 이..
Folium이 업데이트를 하면서 jupyter notebook 에서 지도에 시각화를 할때 한글을 출력하려고 하면 한글이 아닌 외계어가 출력되는 경우를 볼 수 있습니다. 이를 해결하는 방법은 두 가지가 있습니다. 현재 제가 해결한 Folium 라이브러리의 버전은 0.11.0 버전입니다. 버전 확인은 pip list 명령어를 통해 확인하면 됩니다. 해결방법 1 branca 라이브러리 수정 사항 반영 $ pip install git+https://github.com/python-visualization/branca.git@master
여러 사정으로 인하여 최종 제출은 하지 못하였지만 팀원들과 함께 진행했던 부분 중 제가 진행했던 부분에 대해서 기록해보았습니다. 데이터 시각화 해보기 [COMPAS 고양시] 데이터 시각화 해보기 ( feat. python, folium ) 사용 라이브러리 - pandas, folium, geopandas, geojson, json 시각화에 사용한 데이터 02.자전거스테이션.csv column 명 Station_ID STATION_NAME 거치대 수량 위도 경도 내용 스테이션 고유번호 스테이션 이름.. ideans.tistory.com 인스타그램 속 "피프틴" 확인해보기 "피프틴" 태그가 포함된 인스타그램 게시물 개수 추이와 실제 사용량 비교해보기 1. 필요한 라이브러리 import 하기 import pa..
ubuntu@server:~/PythonHome/TestTA/api$ git push --set-upstream origin master Username for 'https://github.com': SOMJANG-42MARU Password for 'https://SOMJANG-42MARU@github.com': To https://github.com/SOMJANG-42MARU/MaruKeyword.git ! [rejected] master -> master (non-fast-forward) error: failed to push some refs to 'https://github.com/SOMJANG-42MARU/MaruKeyword.git' hint: Updates were rejected beca..
*** System restart required *** The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. The programs included with the Ubuntu system are free software; the exact distribution terms for each ..
Design a class to find the kth largest element in a stream. Note that it is the kth largest element in the sorted order, not the kth distinct element. Your KthLargest class will have a constructor which accepts an integer k and an integer array nums, which contains initial elements from the stream. For each call to the method KthLargest.add, return the element representing the kth largest elemen..
Given a string text, you want to use the characters of text to form as many instances of the word "balloon" as possible. You can use each character in text at most once. Return the maximum number of instances that can be formed. Example 1: Input: text = "nlaebolko" Output: 1 Example 2: Input: text = "loonbalxballpoon" Output: 2 Example 3: Input: text = "leetcode" Output: 0 Constraints: 1
The set S originally contains numbers from 1 to n. But unfortunately, due to the data error, one of the numbers in the set got duplicated to another number in the set, which results in repetition of one number and loss of another number. Given an array nums representing the data status of this set after the error. Your task is to firstly find the number occurs twice and then find the number that..
Write a function that takes an unsigned integer and return the number of '1' bits it has (also known as the Hamming weight). Example 1: Input: 00000000000000000000000000001011 Output: 3 Explanation: The input binary string 00000000000000000000000000001011 has a total of three '1' bits. Example 2: Input: 00000000000000000000000010000000 Output: 1 Explanation: The input binary string 0000000000000..
Design a HashSet without using any built-in hash table libraries. To be specific, your design should include these functions: add(value): Insert a value into the HashSet. contains(value) : Return whether the value exists in the HashSet or not. remove(value): Remove a value in the HashSet. If the value does not exist in the HashSet, do nothing. Example: MyHashSet hashSet = new MyHashSet(); hashSe..
Given an integer array arr. You have to sort the integers in the array in ascending order by the number of 1's in their binary representation and in case of two or more integers have the same number of 1's you have to sort them in ascending order. Return the sorted array. Example 1: Input: arr = [0,1,2,3,4,5,6,7,8] Output: [0,1,2,4,8,3,5,6,7] Explantion: [0] is the only integer with 0 bits. [1,2..
for 문을 한 줄로 작성하는 방법 ex ) 여러개의 단어가 들어있는 리스트 중에서 길이가 3 이상인 단어만 남기고 싶을 경우 words = ["솜씨좋은장씨", "티스토리", "블로그", "파이썬", "for", "프로그래밍", "반복"] new_words = [ "솜씨좋은장씨", "티스토리", "프로그래밍" ] 기존 코드 new_words = [] for word in words: if len(word) > 3: new_words.append(word) 한 줄로 작성 new_words = [ word for word in words if len(word) > 3 ] 이중 for 문을 한 줄로 작성하는 방법 ex ) 여러 단어들이 담겨있는 2차원 리스트에서 각 리스트 별로 길이가 4 이상인 단어만 남기고..
Given an integer array arr, return true if there are three consecutive odd numbers in the array. Otherwise, return false. Example 1: Input: arr = [2,6,4,1] Output: false Explanation: There are no three consecutive odds. Example 2: Input: arr = [1,2,34,3,4,5,7,23,12] Output: true Explanation: [5,7,23] are three consecutive odds. Constraints: 1
Given the array nums, for each nums[i] find out how many numbers in the array are smaller than it. That is, for each nums[i] you have to count the number of valid j's such that j != i and nums[j] < nums[i]. Return the answer in an array. Example 1: Input: nums = [8,1,2,2,3] Output: [4,0,1,1,3] Explanation: For nums[0]=8 there exist four smaller numbers than it (1, 2, 2 and 3). For nums[1]=1 does..
Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below. Example: Input: ["Hello", "Alaska", "Dad", "Peace"] Output: ["Alaska", "Dad"] Note: You may use one character in the keyboard more than once. You may assume the input string will only contain letters of alphabet. Solution class Solution: def findWords(s..
A website domain like "discuss.leetcode.com" consists of various subdomains. At the top level, we have "com", at the next level, we have "leetcode.com", and at the lowest level, "discuss.leetcode.com". When we visit a domain like "discuss.leetcode.com", we will also visit the parent domains "leetcode.com" and "com" implicitly. Now, call a "count-paired domain" to be a count (representing the num..
Given an array A of strings made only from lowercase letters, return a list of all characters that show up in all strings within the list (including duplicates). For example, if a character occurs 3 times in all strings but not 4 times, you need to include that character three times in the final answer. You may return the answer in any order. Example 1: Input: ["bella","label","roller"] Output: ..
형태소 분석기로는 mecab을 주로 사용하다가 kakao에서 만든 khaiii를 활용하여 분석한 결과를 적용하면 현재 하고 있는 작업에서 어떤 변화가 있을까 궁금하여 설치해보게 되었습니다. khaiii는 kakao에서 만든 형태소 분석기로 세종 코퍼스와 그외 오류를 수정한 다양한 코퍼스 그리고 CNN을 기반으로 만들어진 형태소 분석기라고 합니다. kakao/khaiii Kakao Hangul Analyzer III. Contribute to kakao/khaiii development by creating an account on GitHub. github.com 파일 다운로드 $ git clone https://github.com/kakao/khaiii.git 먼저 git clone 명령어를 통해 설치..