일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- leetcode
- github
- 프로그래머스 파이썬
- gs25
- 편스토랑 우승상품
- 더현대서울 맛집
- 파이썬
- 백준
- SW Expert Academy
- 금융문자분석경진대회
- PYTHON
- AI 경진대회
- programmers
- hackerrank
- Real or Not? NLP with Disaster Tweets
- 맥북
- Docker
- Baekjoon
- ubuntu
- 코로나19
- 자연어처리
- Git
- ChatGPT
- 편스토랑
- 데이콘
- 캐치카페
- dacon
- 우분투
- 프로그래머스
- Kaggle
- Today
- Total
목록
반응형
전체 글 (1651)
솜씨좋은장씨
Given an array of unique integers salary where salary[i] is the salary of the employee i. Return the average salary of employees excluding the minimum and maximum salary. Example 1: Input: salary = [4000,3000,1000,2000] Output: 2500.00000 Explanation: Minimum salary and maximum salary are 1000 and 4000 respectively. Average salary excluding minimum and maximum salary is (2000+3000)/2= 2500 Examp..
Given two non-negative integers low and high. Return the count of odd numbers between low and high (inclusive). Example 1: Input: low = 3, high = 7 Output: 3 Explanation: The odd numbers between 3 and 7 are [3,5,7]. Example 2: Input: low = 8, high = 10 Output: 1 Explanation: The odd numbers between 8 and 10 are [9]. Constraints: 0
Given an array arr of positive integers sorted in a strictly increasing order, and an integer k. Find the kth positive integer that is missing from this array. Example 1: Input: arr = [2,3,4,7,11], k = 5 Output: 9 Explanation: The missing positive integers are [1,5,6,8,9,10,12,13,...]. The 5th missing positive integer is 9. Example 2: Input: arr = [1,2,3,4], k = 2 Output: 6 Explanation: The miss..
Reverse a linked list from position m to n. Do it in one-pass. Note: 1 ≤ m ≤ n ≤ length of list. Example: Input: 1->2->3->4->5->NULL, m = 2, n = 4 Output: 1->4->3->2->5->NULL 첫번째 시도 # Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def reverseBetween(self, head: ListNode, m: int, n: int) -> ListNode:..
최근 Github이 master branch에서 main branch로 이름이 바뀌면서 git도 업데이트가 필요했습니다. 먼저 본인의 git 버전이 어떤 버전인지 확인해봅니다. $ git version git version 2.7.4 main branch를 기본 branch로 설정할 수있는 git의 버전은 2.28.0 이상이라고 합니다. 업데이트를 하기위해서 $ sudo apt-get upgrade 위의 명령어로 설치를 시도하였으나 실패하여 찾아보니 아래의 방법으로 업데이트가 가능했습니다. $ sudo add-apt-repository ppa:git-core/ppa -y $ sudo apt-get update $ sudo apt-get install git -y 설치 후 다시 git 버전을 확인해보면 $..
1일 1문제 280일차! 오늘의 문제는 프로그래머스의 최고의 집합 문제입니다. 코딩테스트 연습 - 최고의 집합 자연수 n 개로 이루어진 중복 집합(multi set, 편의상 이후에는 집합으로 통칭) 중에 다음 두 조건을 만족하는 집합을 최고의 집합이라고 합니다. 각 원소의 합이 S가 되는 수의 집합 위 조건을 만족 programmers.co.kr Solution def solution(n, s): answer = [] if s // n < 1: answer = [-1] else: s_n = s // n for i in range(n): answer.append(s_n) s_p_n = s % n idx = len(answer) - 1 for i in range(s_p_n): answer[idx-i] = a..
Elasticsearch에서 종종 reindexing 을 할 경우가 있습니다. 최근 프로젝트를 진행하면서 기존에 ES 서버에 인덱싱되어있는 인덱스를 새롭게 만든 서버에서 인덱싱을 할 일이 있었습니다. kibana에서 reindex 명령어를 입력하여 시도를 하였는데 Not whitelisted in reindex.remote.whitelist 위와 같은 오류를 만나게 되었습니다. 이를 해결하는 방법은 다음과 같습니다. 먼저 elasticsearch가 설치된 곳으로 이동합니다. 거기서 elasticsearch.yml 파일을 찾아 한 줄을 추가해주면 됩니다. reindex.remote.whitelist: "0.0.0.0:9200" reindex.remote.whitelist: "원하는IP:PORT" 그리고 나..
각 페이지별 이미지 변환 ( pdf to jpg ) - pdf2image 활용 여러 페이지로 구성되어있는 pdf 파일을 각 페이지별 이미지로 변환하는 방법에 대해서 적어보려 합니다. 먼저 이 과정을 진행하기 위해서 필요한 라이브러리를 설치합니다. pdf2image A wrapper around the pdftoppm and pdftocairo command line tools to convert PDF to a PIL Image list. pypi.org pip install pdf2image 그 다음 아래의 코드를 활용하여 pdf파일의 각 페이지를 jpg 이미지로 변환하면 됩니다. #-*- coding:utf-8 -*- from pdf2image import convert_from_path file_n..