Steps and Tips for Python Packaging
Packaging a set of python scripts as a package is easy, and it makes your work more accessible to users. Moreover, you can better track the usage of your package over time!
Using Souceforge.net to Host large files
A lot of times my GitHub repositories will depend on some external large binary files. These files can range anywhere from trained deep learning model parameters, or resources for a demo/test. Because GitHub will by default track files, and not easily accessible by a URL, making it not really ideal for hosting large files.
A note on writing a PhD thesis in MS Word
Below is a simple note on a few formatting tricks in Microsoft Word for PhD thesis writing. Briefly, this needs to account for how to make a proper page numbering, table of contents, and references to list of figures and tables.
use “Layout” –> “Breaks” to insert “Sections/Continous” to separate different Chapters into different sections.
Go to the very first page. Under “Insert”, use “Page Number” –> “Bottom of Page” –> “Plain Number 2”. We shall return to format the prefix into Roman numbering later in a few steps.
Find the first page of Chapter 1, then double-click on the footer page number; this will pop up a ribbon “Design” on top. In “Design” tab, find the highlighted “Link to Previous”, click to uncheck it. This will allow the page numbering to start fresh for this section.
In the “Design” tab, find “Page Number” –> “Format Page Numbers”, then in the poped-up window, set “Start at: 1”. Now the Prefix and Chapters have separated numbering.
Go back to the first page of the Prefix, again use “Format Page Numbers” and set “Number Format” to Roman Numbering for the Prefix.
Format the Section and Subsection heading by “Home” –> “Heading 1/2/3”.
In the ToC page, click “References” –> “Table of Contents”.
In “Home” tab, right-click on the “Heading 1/2/3” and “Modify..” to change the heading to the same style of the main texts. This includes font, bold, and paragraph (which usually is double spacing).
Set cursor at the first chapter location (e.g. “Chapter 1”), then in “Home” tab, select “Multilevel list” –> “Chapter”. (“Multilevel list” is in “Home/Paragraph” group and above “Aligning” buttons.) This will create a list for all chapters and the corresponding sections/subsections.
Select the caption of a particular figure, then “References” –> “Insert Caption”. In “Numbering..”, select “Including chapter number”, and set “Use separator” is “. period”. Make sure the label is “Figure” as not to be mixed with “Tables”.
In the Prefix/List of Figures page, from “References” –> “Table of Figure Dialog”, insert the list.
Format the Caption in “Home” tab, similar to the above.
So today I decided to give it another try for documentation genration for my new package Darts. I previously tried Sphinx for CLAM, but that didn’t work out well. Since I am now a bit smarter to have successfully compiled a pypi and Anaconda packages, I think maybe it’s time to write down my experience for Sphinx, so that next time I could simply follow the dummie’s guide for Python documentation site generation, and hopefully help others save some time.
The Great Sphinx of Giza, Egypt.
Figure 1. Overview of LRC-CPPT data in a) treatment and b) control groups. Figure from Jin and Rubin 2008.
In this post, we will generalize over one-way ANOVA to two-way and multi-way ANOVA, and discuss a few solutions to test for interaction terms when there is no replication.
ANOVA is parametrized by a regression framework. \(Y = X \cdot \beta + \epsilon\)
2018.08.11 - 2018.08.18, 黄石一周之旅。我们拍的大棱镜(Grand Prismatic).
Tensorflow is arguably the most popular deep-learning framework nowadays. Want to install and check it out? Sure! just a few google clicks away.
However, sometimes you will have an outdated CUDA installed in your group or your company’s GPU server that is no longer valid in most online tutorials (as of now, CUDA 9.0 is in every doc), but do not have the permission to update it. If you encounter cases like the one I am facing now, you will need to find an old source to install Tensorflow.
If you are using Anaconda 64-bit Ver. Dec. 20 2016 and try to start jupyter notebook by typing in your shell:
ipython notebook
This will likely throw an error message “ImportError: No module named shutil_get_terminal_size”. To solve this problem, simply do the following 3 steps:
Bayes Factor (BF) is a quantity for the evidence in observed data to support one model against another, where the two models are usually a “null”/$M_1$ vs an “alternative”/$M_2$. If you don’t like to read the maths, jump to 1.2 for an intuitive example.
2016,1215-1224
我们是从洛杉矶飞往奥兰多,由于加州和佛罗里达有三小时时差,所以我们虽然是早上8点半的飞机,降落奥兰多国际机场时已经是当地时间下午4点半了(5小时飞行时间再加上佛罗里达时间早三小时)。所以这天几乎不能有任何出行安排,取车之后决定去Costco买些之后几天的水和能量bar, 然后就到预定的酒店入住。Zijun觉得在SUV后备箱备上一大箱水和小零食,然后去公路旅行的感觉也特别棒!
3.19
连着两天把黑客帝国三部曲看完了。确实挺刺激的,而且有些话似乎是导演故意玩深沉,让帅帅的主角、神道的先知说些关于选择啊方向啊目的啊之类的玄乎其玄的人生大道理。这个暂且不做讨论,因为讨论这些大多数时候也没大意义,兴许哪天心情好就码几个字,今天就只写点黑客帝国中的科技背景吧。
首先是意识与身体分离的问题。
大概从人类开始发现意识不过是大脑皮层中的神经元的冲动,是膜电位的极化和去极化,从过去不可知的意识也能被仪器记录并且有规律可循开始,聪明的科学家们就在构想有一天能人为的操控意识,因为我们已经有了强大的电脑,足以精确的计算、模拟并给出人类任何需要的“感觉”,以至于你认为你看到的、听到的、触摸到的其实都是被操控的膜电位变化——神经冲动。而给出一切、操控一切的就是基于AI,这个人们既期盼又恐惧的东西。