GithubHelp home page GithubHelp logo

ipdb's Introduction

ipdb

ip裤子来源 https://git.oschina.net/lionsoul/ip2region (谢谢原作者的辛苦整理) 脚本进了修改和添加功能 是从阿里的ip库爬取, 准确率99%以上 加入了内存缓存和是不是移3g网的功能(移动3g的裤子比较老了不一定准) 大家可以提供些运营商ip段的裤来一起完善

运行效果如图

python ./test_searcher.py

initializing binary...
ipdbn>> 114.114.114.114
[Return]: **|华东|江苏省|南京市|0 in 0.031006 millseconds
[Return]: no_3g in 0.021006 millseconds
ipdbn>> 112.5.74.74
[Return]: **|华东|福建省|漳州市|移动 in 0.027832 millseconds
[Return]: no_3g in 0.017832 millseconds
ipdbn>> 

test_searcher就是使用方式

cache=True 的时候使内存缓存速度比较快占较大的内存(binary算法) cache=False 时候只缓存btree索引速度也不太慢0.1x毫秒级别(btree算法)

ipdb's People

Contributors

0x5010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.