Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
OrgChart JS 4.9.7
iScripts CyberMatch 1.3.3
AnyGantt JS Gantt Charts 8.7.0
Database Workbench Pro 5.6.8
Devart SSIS Data Flow Components 1.10.1
SentiMask SDK Trial 2.0.193121
dbForge Studio for SQL Server 5.8
ODBC Driver for ASE 2.1.2
The C# OCR Library 4.4.0
ODBC Driver for xBase 2.1
Rapid PHP 2018 15.5
IBDAC 6.4
Online Course Booking Script 1.3.3
Job Portal Script 1.3.2
The C# PDF Library 5.2
Top Code
Azizi search engine script PHP 4.1.10
Faculty Evaluation System 1.1
16-APSK Simulink Block 1.0
SecureBridge 8.0
War Game V4
Moving Star Field 1.1
Active Shape Model (ASM) and Active Appearance Model (AAM) 1.0
ICGroupDeal - Daily deals site 1.0
DTMF tones detection 1.0
Devart SSIS Data Flow Components 1.0
DTMF Encoder/Decoder with GUI using FFT,goertzel,Filter Banks 1.0
TGPS 1.11
Newest MySQL manual in HTML Help (.chm) 4.1.1-alpha
Rapid PHP 2018 15.5
asciprnt.zip 3.02
Top Rated
VisualNEO Web 2018.12.15
Azizi search engine script PHP 4.1.10
Paste phpSoftPro 1.4.1
Extreme Injector 3.7
Deals and Discounts Website Script 1.0.2
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
Classified Ad Lister 1.0
Aglowsoft SQL Query Tools 8.2
Invoice Manager by PHPJabbers 3.0
ICPennyBid Penny Auction Script 4.0
PHP Review Script 1.0
ATN Resume Finder 2.0
ATN Site Builder 3.0
Availability Booking Calendar PHP 1.0
Binary Search with the bisect Module 
File ID: 66206






Binary Search with the bisect Module 
Download Binary Search with the bisect Module http://code.activestate.com/recipes/389169-binary-search-with-the-bisect-module/?in=lang-pythonReport Error Link
License: Freeware
Downloads: 57
Submit Rating:
Binary Search with the bisect Module  Description
Description: Writing a binary search algorithm is surprisingly error-prone. The solution: trick the built-in bisect module into doing it for you.

The documentation for bisect says that it works on lists, but it really works on anything with a __getitem__ method. You can exploit this fact to make bisect work in ways that you may not have thought of.

Example: Using a library that controls a digital video camera, I wanted to do a poor-man's auto-exposure. The goal is to find the exposure time, in milliseconds, that makes the mean pixel value about 128 (out of 0 to 255).

The trick is to create an object that "looks like" a list to the bisect module.

License: Freeware

Related: Shortcuts

O/S:Windows

Downloads: 57



More Similar Code

OpenLayers Proximity enables geographical proximity search for the OpenLayers module (6.x-2.x). The module exposes a filter to the Views module where users can specify starting point and radius of the proximity search. The starting point can be specified by simply providing the name of its location. Search radius can be given in kilometers or miles and it's easy, for external modules, to specify their own units of measurement.
Views...



An interactive binary search tree. The user may interact with the tree by performing rotations, balancing, insertions, and deletions. For educational purposes



With the MOD/ module for PHP-Nuke, you will be able to embed a real-time chatroom with PHP-Nuke database integrated into your Website. Requires installation of 123 Flash Chat Server software [http://www.123flashchat.com/download.html] 123flashchat...



This module gives the ability to add extra markers from a views to pre-existing map made with the GMap Module.

To use:

1. This module must be used a page that has a Gmap Map on it. It doesn't create an actual map.
2....



The uc_webform_productize module is designed to be paired with the webform_associate module. Currently the code is alpha and appears to be working. The objective is to create a uc product node that is paired with content types used by...



This module has being merged with the linkchecker module and will no longer be maintained.
This module checks the weblinks created by the link module for cck

The module...
1) Queries all links for a status code
2) Stores...



oyoaha Liquid Layout provides a simplified, powerful layout and styling implementation for use with the Views module. Now one module controls all the html output styling for all your Views instead of the previously cumbersome process of creating a...



The CAPTCHA Pack module contains several CAPTCHA types for use with the CAPTCHA module. The CAPTCHA Pack module is meant to provide lightweight, yet effective alternatives for the traditional image CAPTCHA, which is undesirable in certain...



This module provides issue tracking for projects created with the project module.

It allows users to submit issues (bug reports, feature requests, tasks, etc) and enables teams to track their progress. It provides e-mail notifications...



The provision boost module provides Drush hooks to automatically setup multi-site Drupal instances (or single sites) with the Boost module. It takes care of all the nitty-gritty configuration fixes that need to be applied in the backend so it...

User Review for Binary Search with the bisect Module
- required fields
     

Please enter text on the image