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\)
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.