Questions tagged [bisect]

the "bisect" subcommand of Git or the "bisect" module of Python

105 questions
0
votes
1 answer

how to do bisect to find a good commit from upsteam linux kernel?

I am using bisect to find the good commit which fix a S4 issue from upstream kernel codes. But I meet a confusing issue when I do like this : git bisect start git bisect bad v4.8-rc1 git bisect good v4.7 it will take 13 steps to finish the…
0
votes
1 answer

Bisection or Hashtable Method in Python

I'd like to speed up the execution time of my function in python. I read that a good way to do this is using a Bisection or Hashtable method. Do you know how I can do this with this function? from time import time import csv f =…
0
votes
1 answer

Why is this custom bisect function on endless loop?

I have a long script in which I was initially using bisect in. This was part of it (worked perfectly fine and as intended): portfolios = [[1], [0.9], [0.8], [0.7], [0.6]] #Fills up list to avoid "index out of range" error later on in code add_sharpe…
Alex McLean
  • 2,524
  • 5
  • 30
  • 53
0
votes
1 answer

Sqlite ascending order doesnt seem to work with bisect

I am using the bisect module to search for and insert sha256 hashes into a list. I have about 8,000,000 items to search and add to, and they are stored in an sqlite database, I want to read them into the list so I can search them quicker. The issue…
Deano123
  • 161
  • 1
  • 9
0
votes
0 answers

python bisect on an array of floats

I was wondering how to use bisect or any other binary search method on an array of floats. So for instance let us say that I have an array of floats such as list_floats = [11.1,22.2,33.3,44.5,55.6,66.7] and I want to find the position another…
user1718064
  • 475
  • 1
  • 9
  • 23
0
votes
1 answer

Bisect to find the commit that _fixed_ a bug

The normal use case for 'git bisect' is to declare the tip of the reference the 'bad' state, and search the history for the lastest 'good' state. This makes sense when searching for a commit that introduced a bug. However, sometimes a bug is…
gcbenison
  • 11,723
  • 4
  • 44
  • 82
0
votes
2 answers

How to use ivy integration versions against old versions of code?

My organization is looking into using Apache Ivy for dependency management in a multi-project configuration. We have a main project (call it MAIN) where most development takes place and a few helper library projects (call it LIBPROJ) which we keep…
QuercusMax
  • 31
  • 2
-1
votes
1 answer

Python bisect behaviour with lists

I've been playing with bisect and I'm confused with the following behaviour: Input: test = 1 print(test) bisect.insort([test], 6) Output: 1 1 If I change when I define test as a list, I get a different response: Input: test =…
Mr. Meeseeks
  • 239
  • 1
  • 3
  • 12
-1
votes
1 answer

How to use git bisect on a remote repository?

I'm creating a Python module that would allow for users to run git bisect on a user specified repository, but I don't quite know how to make git bisect work for a remote repository, one that is not on the machine calling the function. I don't want…
-1
votes
1 answer

Could someone explain what an SVN bisect algorithm is? Theoretically and through code snippet

I want to understand what an SVN bisect / git-bisect algorithm is..I have tried to search online resources but unable to get a good problem statement and solution.
-1
votes
1 answer

An alternative for binary search on a frozenset in Python

I need to perform binary search on a frozenset, but as indexing doesn't work on frozenset, I cannot use the bisect library. I thought of converting the frozenset to a list to make things easy, but the problem is that the conversion…
-1
votes
2 answers

Bisection search

Possible Duplicate: Using bisection search to determine I have posted other thread but it did not receive answers thus i'm trying to provide some of my work to make more clear. I need to use bisection method to determine monthly payment in order…
Contempt
  • 189
  • 2
  • 5
  • 14
-2
votes
2 answers

How to find a bug in origin with git tools

I develop my app locally (in my own branch), but I can only test it on a remote dev server, by pushing to a git repo (my own branch) on the server, and then testing a working copy there. As I can't find out why my web app crashed, I want to find the…
Konst54
  • 175
  • 9
-2
votes
1 answer

Bisect search using varying hi lo

I am trying to figure out how to use a bisect search to find: Monthly payment made to clear loan amount Monthly interest rate = (Annual interest rate) / 12 Monthly payment lower bound = Balance / 12 Monthly payment upper bound = (Balance x (1 +…
-4
votes
1 answer

How come bisect doesn't find my intent?

I'm using bisect to find first occurence of datapoint > -6, but when I run my script it only finds the second (and last) occurence. import bisect kk = [-9, -6, -4, -6, -8, -8, -7, -7, -6, -6, -5] first = bisect.bisect(kk, -6) …
Blochio
  • 11
1 2 3 4 5 6
7