일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
- PYTHON
- Git
- Real or Not? NLP with Disaster Tweets
- leetcode
- 데이콘
- 맥북
- ChatGPT
- Kaggle
- 금융문자분석경진대회
- gs25
- 프로그래머스
- 자연어처리
- 코로나19
- 편스토랑 우승상품
- Docker
- 더현대서울 맛집
- 우분투
- SW Expert Academy
- github
- 파이썬
- ubuntu
- 캐치카페
- Baekjoon
- 편스토랑
- AI 경진대회
- dacon
- 프로그래머스 파이썬
- 백준
- hackerrank
- programmers
- Today
- Total
목록
반응형
분류 전체보기 (1651)
솜씨좋은장씨
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 명령어를 통해 설치..
nipa에서 지원 받은 서버에 카카오에서 딥러닝 기반으로 개발한 Khaiii 형태소 분석기를 설치하려고 하던 중 (PythonHome) ubuntu@nipa2020-0000:~/somjang-utils/khaiii/build$ cmake .. CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.10 or higher is required. You are running version 3.5.1 -- Configuring incomplete, errors occurred! 위와 같이 CMake의 버전이 3.5.1 로 설치 시 요구되는 3.1.0 버전 보다 하위 버전이어서 설치 진행이 불가했습니다. $ sudo apt-get install up..
Implement strStr(). Return the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. Example 1: Input: haystack = "hello", needle = "ll" Output: 2 Example 2: Input: haystack = "aaaaa", needle = "bba" Output: -1 Clarification: What should we return when needle is an empty string? This is a great question to ask during an interview. For the purpose of this p..
Given a m * n matrix mat of ones (representing soldiers) and zeros (representing civilians), return the indexes of the k weakest rows in the matrix ordered from the weakest to the strongest. A row i is weaker than row j, if the number of soldiers in row i is less than the number of soldiers in row j, or they have the same number of soldiers but i is less than j. Soldiers are always stand in the ..
Given an array of integers arr, replace each element with its rank. The rank represents how large the element is. The rank has the following rules: Rank is an integer starting from 1. The larger the element, the larger the rank. If two elements are equal, their rank must be the same. Rank should be as small as possible. Example 1: Input: arr = [40,10,20,30] Output: [4,1,2,3] Explanation: 40 is t..
은전한닢 프로젝트 - Winows 설치 방법 koshort/pyeunjeon 은전한닢 프로젝트와 mecab 기반의 한국어 형태소 분석기의 독립형 python 인터페이스 - koshort/pyeunjeon github.com Windows에서 mecab을 활용하여 작업을 할 일이 생겨 설치를 해야하여 찾아보던 중 pyeunjeon 이라는 패키지를 발견하여 설치를 진행해보니 잘 동작하는 것을 확인하였습니다. 그동안 윈도우에서는 설치가 어렵다! 라고만 들었는데 생각보다 쉽게 설치가 가능하여 조금 놀랐습니다. 설치방법은 다음과 같습니다. 설치 방법 > pip install eunjeon 여기서 설치 간 error: Microsoft Visual C++ 14.0 is required. 오류가 나는 경우에는 [Py..
윈도우에서 mecab을 사용할 일이 있어 mecab을 윈도우에서도 사용할 수 있도록 만든 eunjeon 패키지를 pip install eunjeon 명령어로 설치를 시도하였습니다. 그런데 순조롭게 진행되고 있는 줄 알고 있다가 다시 확인해보니 붉은색 오류가 저를 반겨주고 있었습니다. error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools" : https://visualstudio.microsoft.com/downloads/ 원인 이 문제의 원인은 Microsoft Visual C++ Build Tools 가 설치 되어있지 않아서 발생하는 오류 입니다. 해결방법 오류 문구에서 안내해주는 주소로 이동..
Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal". Example 1: Input: [5, 4, 3, 2, 1] Output: ["Gold Medal", "Silver Medal", "Bronze Medal", "4", "5"] Explanation: The first three athletes got the top three highest scores, so they got "Gold Medal", "Silver Medal" and "..
Given a date string in the form Day Month Year, where: Day is in the set {"1st", "2nd", "3rd", "4th", ..., "30th", "31st"}. Month is in the set {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}. Year is in the range [1900, 2100]. Convert the date string to the format YYYY-MM-DD, where: YYYY denotes the 4 digit year. MM denotes the 2 digit month. DD denotes the ..
요즘! idEANS ( ideans.tistory.com ) 팀원들과 함께 LH 공사에서 주최하는 COMPAS 고양시 공공자전거 스테이션 최적 위치 선정 공모전을 도전해보고 있어 오랜만에 다시 Folium 라이브러리를 활용하여 이것 저것 데이터를 시각화 해보고 있습니다. 그러던 중 화성시 공모전 때와 동일하게 인구수 데이터를 활용하여 지도 위에 동 별 인구수를 시각화 할 필요가 있었습니다. 그러나 이전에 시각화 당시 Choropleth 의 legend가 너무 많이 그려지는 문제가 있었습니다. 그 당시에는 이 문제를 해결하지 못했었는데 이번에 다시 동일한 문제를 해결하기 위해 구글링을 해보니 Choropleth legends being part of the layer · Issue #1052 · pytho..
Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2. Note: The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9. Both num1 and num2 does not contain any leading zero. You must not use any built-in BigInteger library or convert the inputs to integer directly. Solution class Solution(object): def addStrings(self, n..
Given a string S, return the "reversed" string where all characters that are not a letter stay in the same place, and all letters reverse their positions. Example 1: Input: "ab-cd" Output: "dc-ba" Example 2: Input: "a-bC-dEf-ghIj" Output: "j-Ih-gfE-dCba" Example 3: Input: "Test1ng-Leet=code-Q!" Output: "Qedo1ct-eeLg=ntse-T!" Note: S.length
디스크 용량 확인 명령어 GB 단위로 확인 $ df -h MB 단위로 확인 $ df -m KB 단위로 확인 $ df -k 실행중인 프로세스 확인 전체 프로세스 확인 $ ps -ef 메모리 사용순으로 정렬하여 보기 ( 사용량이 많은 순서 ) $ ps -ef --sort -rss 메모리 사용순 상위 10개 $ ps -ef --sort -rss | head -n 11 메모리 사용량 표시하여 확인 $ ps -eo user,pid,ppid,rss,size,vsize,pmem,pcpu,time,cmd --sort -rss | head -n 11 메모리 사용량 표시하여 확인 ( 명령어 제외 ) $ ps -eo user,pid,ppid,rss,size,vsize,pmem,pcpu,time,comm --sort -rss..
Given an array of characters, compress it in-place. The length after compression must always be smaller than or equal to the original array. Every element of the array should be a character (not int) of length 1. After you are done modifying the input array in-place, return the new length of the array. Follow up: Could you solve it using only O(1) extra space? Example 1: Input: ["a","a","b","b",..
Given an array nums. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i]). Return the running sum of nums. Example 1: Input: nums = [1,2,3,4] Output: [1,3,6,10] Explanation: Running sum is obtained as follows: [1, 1+2, 1+2+3, 1+2+3+4]. Example 2: Input: nums = [1,1,1,1,1] Output: [1,2,3,4,5] Explanation: Running sum is obtained as follows: [1, 1+1, 1+1+1, 1+1+1+1, 1+1+1+1+..
A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128 % 2 == 0, and 128 % 8 == 0. Also, a self-dividing number is not allowed to contain the digit zero. Given a lower and upper number bound, output a list of every possible self dividing number, including the bounds if possible. Example 1: Input: left ..
Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order. Example 1: Input: [-4,-1,0,3,10] Output: [0,1,9,16,100] Example 2: Input: [-7,-3,2,3,11] Output: [4,9,9,49,121] Note: 1
Given an integer number n, return the difference between the product of its digits and the sum of its digits. Example 1: Input: n = 234 Output: 15 Explanation: Product of digits = 2 * 3 * 4 = 24 Sum of digits = 2 + 3 + 4 = 9 Result = 24 - 9 = 15 Example 2: Input: n = 4421 Output: 21 Explanation: Product of digits = 4 * 4 * 2 * 1 = 32 Sum of digits = 4 + 4 + 2 + 1 = 11 Result = 32 - 11 = 21 Const..
Given an integer n, add a dot (".") as the thousands separator and return it in string format. Example 1: Input: n = 987 Output: "987" Example 2: Input: n = 1234 Output: "1.234" Example 3: Input: n = 123456789 Output: "123.456.789" Example 4: Input: n = 0 Output: "0" Constraints: 0 str: if len(str(n)) < 4: return str(n) else: len_str = len(str(n)) loop_num = len_str // 3 mod_num_list = [] for i ..
Implement function ToLowerCase() that has a string parameter str, and returns the same string in lowercase. Example 1: Input: "Hello" Output: "hello" Example 2: Input: "here" Output: "here" Example 3: Input: "LOVELY" Output: "lovely" Solution class Solution: def toLowerCase(self, string: str) -> str: return string.lower() SOMJANG/CODINGTEST_PRACTICE 1일 1문제 since 2020.02.07. Contribute to SOMJANG..
Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only include 2, 3, 5. Example 1: Input: 6 Output: true Explanation: 6 = 2 × 3 Example 2: Input: 8 Output: true Explanation: 8 = 2 × 2 × 2 Example 3: Input: 14 Output: false Explanation: 14 is not ugly since it includes another prime factor 7. Note: 1 is typically treated as an..
Given an array nums with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non-decreasing if nums[i]
Write a function that reverses a string. The input string is given as an array of characters char[]. Do not allocate extra space for another array, you must do this by modifying the input array in-place with O(1) extra memory. You may assume all the characters consist of printable ascii characters. Example 1: Input: ["h","e","l","l","o"] Output: ["o","l","l","e","h"] Example 2: Input: ["H","a","..
Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (i.e., buy one and sell one share of the stock), design an algorithm to find the maximum profit. Note that you cannot sell a stock before you buy one. Example 1: Input: [7,1,5,3,6,4] Output: 5 Explanation: Buy on day 2 (price = 1) and sell on day ..
Given a string s and a string t, check if s is subsequence of t. A subsequence of a string is a new string which is formed from the original string by deleting some (can be none) of the characters without disturbing the relative positions of the remaining characters. (ie, "ace" is a subsequence of "abcde" while "aec" is not). Follow up: If there are lots of incoming S, say S1, S2, ... , Sk where..
csv로 되어있는 파일을 전달 받아 Windows에서 엑셀프로그램으로 해당 파일을 열었을때 위와 같이 파일 내의 내용이 깨져서 나오는 경우가 종종 있습니다. 원인 원인은 전달 받은 파일이 utf-8 또는 다른 형식으로 인코딩이 되어있기 때문입니다. 해결방법 해결방법은 다음과 같습니다. 먼저 전달받거나 다운로드 받은 파일을 바로 열지말고 엑셀 프로그램을 먼저 실행합니다. 메뉴에서 데이터 > 텍스트/CSV 를 선택합니다. 그러면 열리는 창에서 열어보려고 하는 csv파일을 선택합니다. 파일 원본 항목에서 65001: 유니코드(UTF-8)을 선택하고 로드를 클릭하면 위와 같이 데이터가 정상적으로 로드되어 보여지는 것을 확인할 수 있습니다. 만약 위처럼 데이터 > 텍스트/CSV 메뉴가 없는 경우에는 데이터 > 새..
We are given two arrays A and B of words. Each word is a string of lowercase letters. Now, say that word b is a subset of word a if every letter in b occurs in a, including multiplicity. For example, "wrr" is a subset of "warrior", but is not a subset of "world". Now say a word a from A is universal if for every b in B, b is a subset of a. Return a list of all universal words in A. You can retur..
You are given a string representing an attendance record for a student. The record only contains the following three characters: 'A' : Absent. 'L' : Late. 'P' : Present. A student could be rewarded if his attendance record doesn't contain more than one 'A' (absent) or more than two continuous 'L' (late). You need to return whether the student could be rewarded according to his attendance record...