svinota / cxnet Goto Github PK
View Code? Open in Web Editor NEW[DEPRECATED] cxnet -- Python netlink library and more
License: GNU General Public License v3.0
[DEPRECATED] cxnet -- Python netlink library and more
License: GNU General Public License v3.0
Some results of pypy (+JIT) testing.
statfs with pypy-c (PyPy 1.6.0-dev1 with GCC 4.5.2)
# time ls -l /srv/statfs/ >/dev/null
real 0m1.236s
user 0m0.000s
sys 0m0.020s
statfs with Python (Python 2.7.1+)
# time ls -l /srv/statfs/ >/dev/null
real 0m0.742s
user 0m0.000s
sys 0m0.020s
It seems that here PyPy runs slower than plain Python… We need to test if there is a reason to run the code under PyPy at all.
One should use something more reasonable than Queue.Queue. Really. It is tooooo slow.
having ipv6-addresses enabled causes e.g. get_route
to break:
In [4]: iproute2.get_route("8.8.8.8")
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython console> in <module>()
cxnet/cxnet/netlink/iproute2.py in get_route(self, addr, table)
330 for i in ret:
331 if ('dst_prefix' in i.keys()) and ('dst_len' in i.keys()):
--> 332 if dqn_to_int(i['dst_prefix']) == get_base(dst,i['dst_len']):
333 result['static'] = i
334 elif ('dst_len' in i.keys()) and ('src_len' in i.keys()):
cxnet/cxnet/utils.py in dqn_to_int(st)
209 # not extensible at all, but that works faster
210 ###
--> 211 return int("%02x%02x%02x%02x" % (int(st[0]),int(st[1]),int(st[2]),int(st[3])),16)
212
213 def int_to_dqn(st):
ValueError: invalid literal for int() with base 10: '201:foo:bar:02:00:00:00:01'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.