Music Theory - Genetic Algorithms and Python  


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink
Theme For BootStrap on http://bootswatch.com/ 
http://wrapbootstrap.com/preview/WB00U99JJ

or use http://html5boilerplate.com/


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink
Introduction to Node.js with Ryan Dahl  


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink
Richard Stallman Lecture  




[ add comment ] ( 11 views )   |  [ 0 trackbacks ]   |  permalink
AngularJS MTV Meetup: AngularJS + Yeoman (2012-10-9)  


[ add comment ] ( 11 views )   |  [ 0 trackbacks ]   |  permalink
AngularJS end-to-end web app tutorial Part I + II 




[ add comment ] ( 11 views )   |  [ 0 trackbacks ]   |  permalink
Google I/O 2012 - Better Web App Development Through Tooling 


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink
d3: D3 for Beginners Part II: Vadim Ogievetsky on Developing in D3  


[ add comment ] ( 9 views )   |  [ 0 trackbacks ]   |  permalink
python: Practical threaded programming with Python 
With Python, there is no shortage of options for concurrency, the standard library includes support for threading, processes, and asynchronous I/O. In many cases Python has removed much of the difficulty in using these various methods of concurrency by creating high-level modules such as asynchronous, threading, and subprocess. Outside of the standard library, there are third solutions such as twisted, stackless, and the processing module, to name a few. This article focuses exclusively on threading in Python, using practicle examples. There are many great resources online that document the threading API, but this article attempts to provide practicle examples of common threading usage patterns.


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink  |  related link
python: regexp search for ip and print progress as percentage counter  

#!/usr/local/bin/python

import re
import sys

account_all = []
account_uniq = []
account_info = re.compile('.* ([\d]+\.[\d]+\.[\d]+\.[\d]+).*CONNECT ([^ ]*).* xxx.*')

file_name = "/var/log/clc/2013-04-03/files/xxx.log"
len = len(open(file_name).readlines())
file = open(file_name, "r")

print "please wait..."
count = 0
for line in file:
count += 1.0
res = account_info.search(line)
if res is not None:
sys.stdout.write("\r parsing data %d%% (%d/%d)" % ( (count / ( len / 100 ) ), count, len ) )
sys.stdout.flush()
account_all.append(res.groups())

sys.stdout.write("\n")
print "please wait..."
account_uniq = list(set(account_all))

for ip, dest in account_uniq:
print "%s %s" % (ip, dest)


[ add comment ] ( 10 views )   |  [ 0 trackbacks ]   |  permalink

<<First <Back | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | Next> Last>>