Skip to content

Instantly share code, notes, and snippets.

View michael81045's full-sized avatar

Michael Chien michael81045

  • NTNU
  • Taiwan
View GitHub Profile
@almeidx
almeidx / markdown-text-101.md
Last active June 2, 2024 19:46 — forked from matthewzring/markdown-text-101.md
A guide to Markdown on Discord.

Markdown Text 101

Want to inject some flavor into your everyday text chat? You're in luck! Discord uses Markdown, a simple plain text formatting system that'll help you make your sentences stand out. Here's how to do it! Just add a few characters before & after your desired text to change your text! I'll show you some examples...

Sweet Styles

Italics *italics* or _italics_

Underline italics __*underline italics*__

所以想請問有經驗的人是用哪一套在local端開發的呢?

local端web server應該用django附的dev server就夠了(./manage.py runserver)
DBMS的部分如果沒有用到特殊field(JSONField那類)的話應該就用SQLite就足夠了

資料如何管控,例如local 端是去存取另外一個資料庫嗎? 如果是另一個資料庫,那deploymenet的時候又要改來改去了。

  1. 你可以分成devlopment用的和production用的settings.py https://gist.github.com/andy23512/6a5c6488c2576be1bf1b659a45c380e5 這個是我為了跑自動化測試而另外寫出的test_settings.py 這樣只要在執行時附加--settings=web.test_settings就可以使用不同的settings
@jcheong0428
jcheong0428 / synchrony03.py
Last active February 7, 2022 04:25
Cross correlation function
def crosscorr(datax, datay, lag=0, wrap=False):
""" Lag-N cross correlation.
Shifted data filled with NaNs
Parameters
----------
lag : int, default 0
datax, datay : pandas.Series objects of equal length
Returns
@suensummit
suensummit / eigenvectors_from_eigenvaluies.R
Created November 16, 2019 15:46
A demo R script of [the paper EIGENVECTORS FROM EIGENVALUES](https://arxiv.org/pdf/1908.03795.pdf), modified from [Yu-Chen Shu](https://www.facebook.com/yuchen.shu/posts/10157876738839228) rewritten in R.
# Generate random matrix with dim = N
N <- 3
A <- matrix(runif(N*N), N, N, byrow=TRUE)
A <- A+t(A)
# Setting up eigenvalues lambda, true eigenvector V and derived eigenvector U
ev <- eigen(A)
(lambda <- ev$values)
(V <- ev$vectors)
U <- matrix(0L, N, N)
@ntuaha
ntuaha / god.ipynb
Created November 16, 2019 17:01
神奇計算
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.