Dynamic languages like python, tcl or alike are taking over in driving many C/C++ codes I/O operations and option parsing due to quick and easy implementation, however it is still possible to use libraries/APIs for parsing options via command line (or XML ) quite efficiently in C/C++. Here is the list of some API/libraries:
Sunday, 18 September 2011
Saturday, 14 May 2011
Operating in Multiple Repository within ant
Ant script can not change its base directory after it is invoked, for that reason if you are handling two repositories under same directory it would be wise to write a secondary wrapper script.
Saturday, 16 April 2011
R Package install order automation
There is a bioconductor tool to generate install order for packages [here].
Initially tool generates graph of CRAN package dependencies (ignoring suggests, because otherwise graph will be acyclic).
Usage Example:
source("http://www.bioconductor.org/biocLite.R ")
biocLite("pkgDepTools")
require('pkgDepTools')
deps <- makeDepGraph("http://cran.r-project.org ", type="source")
a<-getInstallOrder("plyr",deps,needed.only=FALSE)
a$packages
[1] "iterators" "itertools" "plyr"
Initially tool generates graph of CRAN package dependencies (ignoring suggests, because otherwise graph will be acyclic).
Usage Example:
source("http://www.
biocLite("pkgDepTools")
require('pkgDepTools')
deps <- makeDepGraph("http://cran.r-
a<-getInstallOrder("plyr",
a$packages
[1] "iterators" "itertools" "plyr"
Saturday, 9 April 2011
R-plugin for vim
vim is a powerful text editor and R is a powerful environment for statistical computing task. To harness both powers a plug-in for vim is developed. One needs python enabled vim and conqueterm.
Labels:
configuration,
editors,
GNU R,
R programming,
scripting
Friday, 8 April 2011
Ant task with wildcard expansion for svn.
Ant is a popular tool among Java developers but one can use it for some other generic tasks. For example using svn as a task inside an ant script is provided by a library. However wildcard expansion won't work under this task. One way to over come this to use an exec task as follows (in windowz):
<exec executable="cmd.exe">
<arg line=" /C svn --force delete pathtofiles\*.dat
--username=username --password=password">
</arg>
</exec>
Tuesday, 18 January 2011
Python Crash tutorial for experienced programmers
Phython has already became a de-facto scripting language, even taking over Perl (depends who do you ask, of course). Recently I have began to use it and like its approach to OO/D. Here is my very short crash Python notes [txt], in 10 minutes, you can learn the basic facilities.
Wednesday, 5 January 2011
Monitoring IP traffic on a host against denial of service
Long time ago I have given some tips for Cisco routers IoS capability to limit SYN half-open TCP connections [here]. Recently a nice python script [here], provides a mechanism to monitor similar information on regular bases and block IP addresses for a certain period of time automatically. It uses combination of tools : netstat, iptables and python modules. However, tuning thresholds must be done carefully to prevent blocking legitimate traffic.
Labels:
network programming,
python,
scripting,
setup,
system admin
Subscribe to:
Posts (Atom)