Skip to content

Instantly share code, notes, and snippets.

View firstfu's full-sized avatar
:octocat:
ai

firstfu firstfu

:octocat:
ai
  • Taiwan
View GitHub Profile
# 使用官方 Python 镜像作为基础镜像
FROM python:3.12
# 设置工作目录
WORKDIR /app
# 将 requirements.txt 复制到工作目录
COPY requirements.txt /app/
# 安装依赖项
version: "3.8"
services:
db:
image: postgres:latest
restart: always
volumes:
- ./docker/postgres_data_test:/var/lib/postgresql/data
environment:
- POSTGRES_DB=miracle_kingdom
Django
django-browser-reload==1.13.0
djangorestframework==3.15.2
django-ckeditor==6.7.1
django-imagekit==5.0.0
psycopg2-binary
Pillow
@firstfu
firstfu / cloudSettings
Last active September 4, 2020 06:52
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-09-04T06:52:38.927Z","extensionVersion":"v3.4.3"}
## 判断是否为isNaN
let n1 = NaN
let n2 = 'NaN'
console.log(Number.isNaN(n1))
console.log(Number.isNaN(n2))
getDay()返回一星期中的某一天(0-6)
getDate()返回一个月中的某一天(1-31)
getDate (date) {
return {
year: date.getFullYear(),
month: date.getMonth(),
day: date.getDay(),
date: date.getDate()
}
import tensorflow as tf
import pandas as pd
import numpy as np
from scipy import stats
import itertools
import matplotlib.pylab as plt
# 白努力分配
size = 10000
p = 0.4
import pandas as pd
dataDic = {
'Weather': [
'Sunny',
'Overcast',
'Rainy',
'Sunny',
'Sunny',
'Overcast',
from scipy import stats
# 常態分佈檢定
staRs = stats.shapiro(df2["正面統計"])
if staRs[1] > 0.05:
print('為常態分佈')
else:
print('不為常態分佈')