Pelican Post Template Controls

How to selectively show comments block

Synopsis

This post will cover how to control templates from articles. In specific, how to enable or disable comments block in posts.

Motivation

We are using Pelican static website framework with Pelican Comment System. However, we wanted to disable for some of the articles …

more ...

Astrophysics Research Python Programming

The Productive Research

Introduction

Recently I helped a group of astrophysicists convert a set of IDL programs to Python. This set was to classify stars by analyzing ROTSE-I and ROTSE-III data. In this insert I would share the experience of moving IDL code to python. The insert is only attempt …

more ...

Python Ordered Class

Maintain Ordered of Fields in Class

Introduction

We saw many questions on the WEB regarding having Python class maintain order of its fields. Reason being that __dict__ is dict, therefore, class doesn't register the order of the fields presented to it.

We decided to share our version of such a …

more ...

Python Print Directory Tree

Mimicking Linux Tree Utility

Introduction

Many blogs are showing how to print directory tree using Python. Drawing from those examples, we built our version. The primary drivers were:

  1. Compatibility with Python3
  2. Print symbolic links
  3. Limit depth of tree

Example output:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10 …
more ...