Category Archives: Programming

Programming – C/C++, Java, Ksh, Python, ML

nex – Linux netlink programming for kernel and user spaces

There are ways to communicate with Linux kernel, including /proc, debugfs, syscall and etc. Most of them are unidirectional, from the kernel to the user space. /proc could be used to ‘write’ to the kernel but mostly in small data … Continue reading

Posted in Dave's Tools, OS, Programming | Tagged , , | Leave a comment

relay – linux kernel relay filesystem

Relay (Relay filesystem) is a mechanisim used to transfer the data from the kernel space to the user space within the Linux OS. The advantage of relay comparing with other means like debugfs or proc is its ability to handle … Continue reading

Posted in OS, Programming | Tagged , , , , | Leave a comment

Some pitfalls in Python ~ remove, recursion and sign

This post is the summary of some pitfalls of Python programming I have encountered. May it help:) 1. remove() List’s remove function is used to remove certain item from the list. However, remove function always removes the first item it … Continue reading

Posted in Programming | Tagged | Leave a comment

myssh – an interactive ssh management tool

Inspired by the putty manager on Windows system, I have spent the whole afternoon to write ‘myssh’ – an interactive ssh management tool providing the ability to save, display, choose and connect your ssh connection automatically. I am not sure … Continue reading

Posted in Dave's Tools, Programming | Tagged , , , | 3 Comments

Pointer in Python

There is no pointers in Python but there are pointers in Python indeed. Among different kinds of pointer implementation in Python, this post demonstrate an elegant way to use pointers, especially object pointers when doing Python OOP. Detailed ‘ctypes’ module … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Jython – Combination of Java and Python

This post is used for final project of CIS610 – Teaching Effectiveness in CIS dept at UO, dedicated to the students with background of CIS122 – Intro to Algorithms and Problem Solving Using Python. Background of Java is not mandatory … Continue reading

Posted in Programming | Tagged , , , , | 1 Comment

tmt – Tomcat monitor tool

Our Tomcat server sometimes crushes either process killed or no response from httpd. Before falling into the ‘long-term’ debugging, we have implemented ‘tmt’, which is used to moniter the status of Tomcat process and httpd by restarting the Tomcat timely. … Continue reading

Posted in Dave's Tools, Programming | Tagged , , , , , , , , , | 1 Comment

Python learning – Sieve of Eratosthenes

Get all the information about ‘Sieve of Eratosthenes’ on wikipedia (http://en.wikipedia.org/wiki/Sieve_of_Eratosthenes). This algorithm does tell us there should be some algorithms with better time complexcity or space complexcity. Fun! (pic took from Wikipedia) [daveti@aimlab python]$ cat sea.py #!/bin/env python # … Continue reading

Posted in Programming | Tagged , , | Leave a comment

Python learning – Caesar Cipher

Get all the information about the old, famous and interesing Caesar Cipher (http://en.wikipedia.org/wiki/Caeser_cipher). In this post we will implement the Caeser Cipher Encoder (cce.py), Caeser Cipher Decoder (ccd.py) and Caeser Cipher Brute Force Decipher (ccbfd.py). Have FUN:) (BTW, I have … Continue reading

Posted in Programming | Tagged , , , | Leave a comment

Python learning – regular expression

Right now, I am a teaching assistent in University of Oregon (UO) for CIS-122 (Introduction to Programming and Algorithms Using Python). We would like our students to make full use of CScircles of CS department at University of Waterloo (http://cscircles.cemc.uwaterloo.ca/), … Continue reading

Posted in Programming | Tagged , , , | Leave a comment