Find Microsoft .NET Framework versions.

        Parameters
        ----------
        bits: int
            Platform number of bits: 32 or 64.
964764
def _find_dot_net_versions(self, bits):
        
        # Find actual .NET version in registry
        reg_ver = self.ri.lookup(self.ri.vc, 'frameworkver%d' % bits)
        dot_net_dir = getattr(self, 'FrameworkDir%d' % bits)
        ver = reg_ver or self._use_last_dir_name(dot_net_dir, 'v') or ''

        # Set .NET versions for specified MSVC++ version
        if self.vc_ver >= 12.0:
            frameworkver = (ver, 'v4.0')
        elif self.vc_ver >= 10.0:
            frameworkver = ('v4.0.30319' if ver.lower()[:2] != 'v4' else ver,
                            'v3.5')
        elif self.vc_ver == 9.0:
            frameworkver = ('v3.5', 'v2.0.50727')
        if self.vc_ver == 8.0:
            frameworkver = ('v3.0', 'v2.0.50727')
        return frameworkver
244335
def get_software_version(self, x=255, y=255, processor=0):
        
        sver = self._send_scp(x, y, processor, SCPCommands.sver)

        # Format the result
        # arg1 => p2p address, physical cpu, virtual cpu
        p2p = sver.arg1 >> 16
        p2p_address = (p2p >> 8, p2p & 0x00ff)
        pcpu = (sver.arg1 >> 8) & 0xff
        vcpu = sver.arg1 & 0xff

        # arg2 => version number (parsed separately) and buffer size
        buffer_size = (sver.arg2 & 0xffff)

        software_name, version, version_labels = \
            unpack_sver_response_version(sver)

        return CoreInfo(p2p_address, pcpu, vcpu, version, buffer_size,
                        sver.arg3, software_name, version_labels)
950017
def get_platform():
    
    platform_data = {
        'os_name': None,
        'os_bits': None
    }
    os_name = platform.system()
    normalize_os = {
        'Windows': 'windows',
        'Linux': 'linux',
        'Darwin': 'mac'
    }
    if os_name in normalize_os.keys():
        platform_data['os_name'] = normalize_os[os_name]
    else:
        raise Exception('Could not normalize os name {}'.format(os_name))
    # try to get the os bits
    maxsize = sys.maxsize
    if maxsize == EXPECTED_MAXSIZE_32:
        platform_data['os_bits'] = '32'
    elif maxsize == EXPECTED_MAXSIZE_64:
        platform_data['os_bits'] = '64'
    else:
        platform_data['os_bits'] = '64'
        logger.warning('could not determine os bits, setting default to 64')
    return platform_data
490698
def get_bin_version(bin_path, version_flag='-v', kw={}):
    

    version_str = get_bin_version_str(bin_path, version_flag, kw)
    if version_str:
        return tuple(int(i) for i in version_str.split('.'))
699451
@Benchmark int setBitSetX64(int reps) {
    long count = 64L * reps;
    for (int i = 0; i < count; i++) {
      bitSet.set(i & 0x3F, true);
    }
    return bitSet.hashCode();
  }
1172676
def get_software_version(self, cabinet, frame, board):
        
        sver = self._send_scp(cabinet, frame, board, SCPCommands.sver)

        # Format the result
        # arg1
        code_block = (sver.arg1 >> 24) & 0xff
        frame_id = (sver.arg1 >> 16) & 0xff
        can_id = (sver.arg1 >> 8) & 0xff
        board_id = sver.arg1 & 0xff

        # arg2 (version field unpacked separately)
        buffer_size = (sver.arg2 & 0xffff)

        software_name, version, version_labels = \
            unpack_sver_response_version(sver)

        return BMPInfo(code_block, frame_id, can_id, board_id, version,
                       buffer_size, sver.arg3, software_name, version_labels)
619186
def get_version(full=False):
    
    version = '.'.join([str(bit) for bit in __version__[:3]])

    if full:
        version = '-'.join([version] + list(__version__[3:]))

    return version
296012
def version_binary(self):
        '''
        
        '''
        # Under MSI 'Version' is a 'REG_DWORD' which then sets other registry
        # values like DisplayVersion to x.x.x to the same value.
        # However not everyone plays by the rules, so we need to check first.
        # version_binary_data will be None if the reg value does not exist.
        # Some installs set 'Version' to REG_SZ (string) which is not
        # the MSI standard
        try:
            item_value, item_type = self.__reg_query_value(self.__reg_uninstall_handle, 'version')
        except pywintypes.error as exc:  # pylint: disable=no-member
            if exc.winerror == winerror.ERROR_FILE_NOT_FOUND:
                # Not Found
                return '', ''

        version_binary_text = ''
        version_src = ''
        if item_value:
            if item_type == win32con.REG_DWORD:
                if isinstance(item_value, six.integer_types):
                    version_binary_raw = item_value
                if version_binary_raw:
                    # Major.Minor.Build
                    version_binary_text = '{0}.{1}.{2}'.format(
                        version_binary_raw >> 24 & 0xff,
                        version_binary_raw >> 16 & 0xff,
                        version_binary_raw & 0xffff)
                    version_src = 'binary-version'

            elif (item_type == win32con.REG_SZ and
                    isinstance(item_value, six.string_types) and
                    self.__version_pattern.match(item_value) is not None):
                # Hey, version should be a int/REG_DWORD, an installer has set
                # it to a string
                version_binary_text = item_value.strip(' ')
                version_src = 'binary-version (string)'

        return (version_binary_text, version_src)
397354
def get_version():
    
    major_value = ctypes.c_int(0)
    major = ctypes.pointer(major_value)
    minor_value = ctypes.c_int(0)
    minor = ctypes.pointer(minor_value)
    rev_value = ctypes.c_int(0)
    rev = ctypes.pointer(rev_value)
    _glfw.glfwGetVersion(major, minor, rev)
    return major_value.value, minor_value.value, rev_value.value
826300
static void makeVersionInfoBits(Version version, BitArray bits) throws WriterException {
    bits.appendBits(version.getVersionNumber(), 6);
    int bchCode = calculateBCHCode(version.getVersionNumber(), VERSION_INFO_POLY);
    bits.appendBits(bchCode, 12);

    if (bits.getSize() != 18) {  // Just in case.
      throw new WriterException("should not happen but we got: " + bits.getSize());
    }
  }
350232
def get_platform():
    """"""
    plat = platform_detect.platform_detect()
    if plat == platform_detect.RASPBERRY_PI:
        # Check for version 1 or 2 of the pi.
        version = platform_detect.pi_version()
        if version == 1:
            from . import Raspberry_Pi
            return Raspberry_Pi
        elif version == 2:
            from . import Raspberry_Pi_2
            return Raspberry_Pi_2
        elif version == 3:
            """Use Pi 2 driver even though running on Pi 3"""
            from . import Raspberry_Pi_2
            return Raspberry_Pi_2
        else:
            raise RuntimeError('No driver for detected Raspberry Pi version available!')
    elif plat == platform_detect.BEAGLEBONE_BLACK:
        from . import Beaglebone_Black
        return Beaglebone_Black
    else:
        raise RuntimeError('Unknown platform.')
896442
def get_version(self):
        """"""
        _, version = misc.get_version(self.confdir)
        if version is None:
            return "Can't get the version."
        else:
            return "cslbot - %s" % version
345873
def FrameworkDir64(self):
        
        # Default path
        guess_fw = os.path.join(self.WinDir, r'Microsoft.NET\Framework64')

        # Try to get path from registry, if fail use default path
        return self.ri.lookup(self.ri.vc, 'frameworkdir64') or guess_fw
812420
public static int numberOf7BitBlocksToRepresent(final long l) {
		if (l < 0xffffffff) {
			return numberOf7BitBlocksToRepresent((int) l);
		}
		// 35 bits
		else if (l < 0x800000000L) {
			return 5;
		}
		// 42 bits
		else if (l < 0x40000000000L) {
			return 6;
		}
		// 49 bits
		else if (l < 0x2000000000000L) {
			return 7;
		}
		// 56 bits
		else if (l < 0x100000000000000L) {
			return 8;
		}
		// 63 bits
		else if (l < 0x8000000000000000L) {
			return 9;
		}
		// 70 bits
		else {
			// long, 64 bits
			return 10;
		}
	}
1271698
public int getBit(int index) {
        assert index >= 0 && index < numBits;
        int i = index >> 6;                // div 64
        int bit = index & 0x3f;            // mod 64
        return ((int)(bits[i]>>>bit)) & 0x01;
    }
1309631
def get_full_python_version():
    
    # Get version part, e.g. `3.5.1.final.0`
    version_part = '.'.join(str(x) for x in sys.version_info)

    # Get integer width, e.g. 32 or 64
    int_width = struct.calcsize('P') * 8

    # Get integer width part, e.g. `64bit` or `32bit`
    int_width_part = str(int_width) + 'bit'

    # Return full Python version
    return version_part + '.' + int_width_part
304218
def get_supported_binary_ops():
    '''
    
    '''
    binary_ops = {}
    binary_ops[np.add.__name__] = '+'
    binary_ops[np.subtract.__name__] = '-'
    binary_ops[np.multiply.__name__] = '*'
    binary_ops[np.divide.__name__] = '/'
    return binary_ops