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
Taxi App Development 7.3
RentALL-Airbnb clone script 1.8.0
VisualNEO Web 19.4.5
PHP Ecommerce Script 1.3.2
dbForge Studio for PostgreSQL 2.1
Rentonn - Airbnb clone 1.0
VisualNEO for Windows 18.08.31.0
SentiVeillance SDK Trial 7.0.191272
dbForge SQL Complete 6.1
Uber for E-Scooters 1.0
ODBC Driver for MySQL 2.4
dbForge Schema Compare for MySQL 4.4
dbForge Studio for MySQL 8.1
dbForge Query Builder for MySQL 4.4
dbForge Data Compare for MySQL 5.5
Top Code
MATLAB Support Package for Arduino (aka ArduinoIO Package) 1.0
Taxi App Development 7.3
Online Vacation Rental Booking Website Script 4.3.0
Library Management System 1.0
PHP Ecommerce Script 1.0.4
Beremiz 1.0
OptimPID: an optimal PID controller design interface 1.0
GnuWin64 64
Java-2-Pseudo 1.0
Online Book Rental System
Azizi search engine script PHP 4.1.10
Faculty Evaluation System 1.1
MLM Software ONE 1.5.46
RentALL-Airbnb clone script 1.8.0
HTML::Lint 1.21
Top Rated
Paste phpSoftPro 1.4.1
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
PHP GZ Blog Script 1.1
ATN Jobs Software 4.0
ATN Mall 2.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