本文介绍在Java执行Python脚本3种方法,使用Java实现的Python解析器Jython,使用Runtime运行Shell命令,使用ProcessBuilder创建操作系统进程。
Python
爬取微信小程序内容:以微信指数为例
本文以微信指数为例介绍如何爬取微信小程序上的内容。
数据分析:目录
本文将数据分析相关的笔记整理成目录的形式,便于索引,包括数据获取、Python、数据分析。
Install Pyhton module Fifi, a library for finite field arithmetics
Python Application Notes: pathname manipulations
I usually process simulation results in batch, which is generally associated with pathname manipulations. In this article, I take notes of pathname manipulations from my programming experiences.
Simple regression analysis using Python
This article introduces simple regression analysis illustrated with a simple example and shows how to calculate it using Python.
Calculate connected dominating sets (CDS)
It is believed that the minimum connected dominating set problem cannot be solved in polynomial time. To the best of my knowledge, there is no source code available for approximation algorithms. Therefore, I decide to implement one proposed by M. Rai in 2009.
Python Application Notes: packages, modules and classes
For better structuring a Python project, I decide to learn of packages, modules and classes. This article also shows how to import all modules and classes in a directory.
Read and write CSV files with Python
I am analyzing a trace in GTFS, a collection of CSV files. Each record of a csv file is consisting of one or more fields speparated by commas ,
. It is error-prone to read csv files by simply using [line.split(',') for line in f.readlines()]
for fields might contain commas. Therefore, I decide to switch to the Python module csv.
Python Application Notes: mutable, hashable and iterable
I sometimes encounter problems like TypeError: unhashable type: 'list'
while programming. Therefore, I decide to set aside some time to undertand the important Python concepts, mutable, hashable and iterable.