This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| # Query Gerrit relation chain of certain patch set with SSH | |
| # Used for Gerrit + Jenkins auto-verify multiple commits (pushed together) | |
| # Usage ./query_relation_chain.py <ssh_destination> <port> <project> <gerrit_id> <patch_set> | |
| help_msg = "SYNOPSIS: {} <ssh_destination> <port> <project> <gerrit_id> <patch_set>" | |
| import logging | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/usr/bin/env python3 | |
| # Reverse lowest 'bit_count' bit of num | |
| def reflect(num, bit_count): | |
| result = 0 | |
| mask = 1 | |
| for i in range(bit_count): | |
| mask = 1 << i | |
| if (mask & num) != 0: | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #include <opencv2/core/core.hpp> | |
| #include <opencv2/highgui/highgui.hpp> | |
| #include "opencv2/imgproc/imgproc.hpp" | |
| #include <iostream> | |
| using namespace cv; | |
| using namespace std; | |
| int main( int argc, char** argv ) |