반응형
반응형

[python] Django 설치

 conda create -n p_django python=3.11

 

 

Django 설치 확인

 python -m django --version

반응형
반응형

 

프로젝트를 다른 시스템(예: 동료 개발자의 컴퓨터 또는 배포 서버)으로 옮길 때, 동일한 파이썬 버전과 패키지를 정확히 맞춰야 하는 번거로움이 있습니다. 가상환경 내 설치된 패키지 목록을 requirements.txt로 저장하고, 이를 다른 환경에서 설치하면 동일한 실행 환경을 쉽게 재현할 수 있습니다.

현재 가상환경 패키지 목록 저장하려면 다음과 같이 실행합니다.

pip freeze > requirements.txt

다른 환경에서 패키지를 설치하려면 다음과 같이 실행합니다.

pip install -r requirements.txt

 

 

반응형
반응형

https://www.newsis.com/view/NISX20250120_0003038003

 

을사년 설 연휴 6일간 궁·능 무료 개방

[서울=뉴시스] 이수지 기자 = 국가유산청 궁능유적본부)는 오는 25일부터 30일까지 설 연휴기간 궁궐과 왕릉을 무료 개방한다. 설 연휴기간 4대궁, 종묘, 조선왕릉 등 22개소가 휴무일 없이 무료개

www.newsis.com

 

오는 25일부터 30일까지 설 연휴기간 궁궐과 왕릉을 무료 개방한다.

설 연휴기간 4대궁, 종묘, 조선왕릉 등 22개소가 휴무일 없이 무료개방된다. 평소 예약제로 운영되는 종묘도 같은 기간 자유롭게 관람할 수 있다.



다만, 이번 무료개방 기간 다음날인 오는 31일은 4대궁, 종묘, 조선왕릉 모두 문을 닫는다.

[서울=뉴시스] 을사년 세화전 (사진=국가유산청 제공) 2025.01.20. photo@newsis.com *재판매 및 DB 금지


궁능유적본부는 국가유산진흥원과 오는 28일부터 30일까지 경복궁 흥례문 광장에서 '2025년 을사년 설맞이 세화 나눔' 행사를 개최한다.

세화는 질병이나 재난 등 불행을 예방하고 한 해 동안 행운이 깃들기를 바라는 마음이 담긴 그림이다. 조선시대 새해를 맞아 왕이 신하들에게 그림을 하사하던 것이 유래되어 점차 민간 풍습으로 자리 잡았다.



올해 세화는, 특유의 색감과 기법으로 그린 고양이 민화로 많은 사랑을 받는 손유영 작가와 협업한다. '푸른 뱀이 그려진 깃발을 잡고 위풍당당하게 선 수문장과 고양이들'이란 주제로 제작됐다.

이 행사에는 수문장과 수문군들의 근무 교대를 재현하는 '수문장 교대의식' 종료 후 하루 2회 세화 6000부를 회당 1000부씩 선착순으로 배포한다.

세화는 국가유산진흥원 웹사이트와 행사 현장에 비치된 QR코드를 통해서 디지털 그림으로도 내려받을 수 있다.

오는 27일 카카오톡 검색창에서 ‘국가유산진흥원’을 검색해 채널을 추가하면 '수문장 교대의식 캐릭터' 무료 이모티콘 2만 5000개도 선착순으로 받을 수 있다.

반응형
반응형

Here is the image representing the year 2025 with the theme of the 'blue snake zodiac.' Let me know if you would like any adjustments or additional details!

반응형
반응형

[python] Scatter plot animated using python, ffmpeg

 

""" 
An animated scatter plot can be created using Python's matplotlib library with its animation module. 
Here's an example of how to create an animated scatter plot, where points move dynamically over time.
"""

import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation

# Generate random initial data for the scatter plot
num_points = 50
x_data = np.random.rand(num_points)
y_data = np.random.rand(num_points)
colors = np.random.rand(num_points)
sizes = np.random.rand(num_points) * 100

# Function to update scatter plot
def update(frame):
    global x_data, y_data
    x_data += (np.random.rand(num_points) - 0.5) * 0.1  # Randomly move x
    y_data += (np.random.rand(num_points) - 0.5) * 0.1  # Randomly move y
    scatter.set_offsets(np.c_[x_data, y_data])  # Update positions
    scatter.set_sizes(np.random.rand(num_points) * 100)  # Update sizes
    scatter.set_array(np.random.rand(num_points))  # Update colors
    return scatter,

# Create the figure and scatter plot
fig, ax = plt.subplots()
scatter = ax.scatter(x_data, y_data, c=colors, s=sizes, cmap='viridis', alpha=0.6)
ax.set_xlim(0, 1)
ax.set_ylim(0, 1)
ax.set_title("Animated Scatter Plot")

# Create animation
ani = FuncAnimation(fig, update, frames=100, interval=50, blit=True)

# Show the animation
plt.show()

import matplotlib.animation as animation
animation.FFMpegWriter = animation.writers['ffmpeg']

""" 
Install FFmpeg: FFmpeg is required to save animations in video formats like .mp4. Install it as follows:

Windows:

Download the FFmpeg executable from https://ffmpeg.org/download.html.
Add the bin folder to your system’s PATH environment variable.

1.EXE  파일 다운받아서  *.7z 파일 다운로드. 

2.압축 풀고,  시스템 환경 변수에 추가. 

3.  ffmpeg -version  으로 실행되는지 확인 

"""

ani.save("animated_scatter.mp4", writer="ffmpeg", fps=30)  # Save as MP4

반응형
반응형

やはり, やっぱり(야하리, 얏파리), さすが(사스가) 

 

やはり, やっぱり(야하리, 얏파리)  : '역시'라는 뜻

 

사스가는 (긍정이든 부정이든) 예상을 뛰어넘거나 명성대로일때, 야하리는 예상대로의 결과일때 사용한다. 

 

 

반응형

+ Recent posts