A method to create a new UDF Long AD.

        Parameters:
         None.
        Returns:
         Nothing.
194112
def new(self, length, blocknum):
        # type: (int, int) -> None
        '''
        
        '''
        if self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Long AD already initialized')

        self.extent_length = length
        self.log_block_num = blocknum
        self.part_ref_num = 0  # FIXME: we should let the user set this
        self.impl_use = b'\x00' * 6

        self._initialized = True
540437
def new(self, bootstrap_with=None, use_timer=False, with_proof=False):
        

        if not self.lingeling:
            self.lingeling = pysolvers.lingeling_new()

            if bootstrap_with:
                for clause in bootstrap_with:
                    self.add_clause(clause)

            self.use_timer = use_timer
            self.call_time = 0.0  # time spent for the last call to oracle
            self.accu_time = 0.0  # time accumulated for all calls to oracle

            if with_proof:
                self.prfile = tempfile.TemporaryFile()
                pysolvers.lingeling_tracepr(self.lingeling, self.prfile)
1355433
def create(self, width=0, depth=0, path=None, flags=0, seed=0):
        
        return self.create_method(self, width, depth, path, flags, seed)
191072
def getOrCreate(cls, conf=None):
        
        with SparkContext._lock:
            if SparkContext._active_spark_context is None:
                SparkContext(conf=conf or SparkConf())
            return SparkContext._active_spark_context
746579
def _create(self, **kwargs):
        '''
        '''

        try:
            return super(Service, self)._create(**kwargs)
        except HTTPError as ex:
            if "The configuration was updated successfully but could not be " \
                    "retrieved" not in ex.response.text:
                raise

            # BIG-IP® will create in Common partition if none is given.
            # In order to create the uri properly in this class's load,
            # drop in Common as the partition in kwargs.
            if 'partition' not in kwargs:
                kwargs['partition'] = 'Common'
            # Pop all but the necessary load kwargs from the kwargs given to
            # create. Otherwise, load may fail.
            kwargs_copy = kwargs.copy()
            for key in kwargs_copy:
                if key not in self._meta_data['required_load_parameters']:
                    kwargs.pop(key)
            # If response was created successfully, do a local_update.
            # If not, call to overridden _load method via load
            return self.load(**kwargs)
592162
def new_(self, df=pd.DataFrame(), db=None, quiet=False,
             nbload_libs=True):
        
        ds2 = Ds(df, db, nbload_libs)
        if quiet is False:
            self.ok("A new instance was created")
        return ds2
734313
def create(cls, d):
        
        move = cls(d['framerate'])
        move._timed_positions.update(d['positions'])
        return move
959521
def record(self):
        # type: () -> bytes
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('UDF Entity ID not initialized')

        return struct.pack(self.FMT, self.flags, self.identifier, self.suffix)
592721
def _create_request_adu(slave_id, req_pdu):
    
    first_part_adu = struct.pack('>B', slave_id) + req_pdu

    return first_part_adu + get_crc(first_part_adu)
1015932
def create_long(self, value: int) -> Long:
        
        self.append((5, value))
        self.append(None)
        return self.get(self.raw_count - 2)
526724
def set_data_length(self, length):
        # type: (int) -> None
        '''
        
        '''
        if not self._initialized:
            raise pycdlibexception.PyCdlibInternalError('Directory Record not yet initialized')

        len_diff = length - self.info_len
        if len_diff > 0:
            # If we are increasing the length, update the last alloc_desc up
            # to the max of 0x3ffff800, and throw an exception if we overflow.
            new_len = self.alloc_descs[-1][0] + len_diff
            if new_len > 0x3ffff800:
                raise pycdlibexception.PyCdlibInvalidInput('Cannot increase the size of a UDF file beyond the current descriptor')
            self.alloc_descs[-1][0] = new_len
        elif len_diff < 0:
            # We are decreasing the length.  It's possible we are removing one
            # or more alloc_descs, so run through the list updating all of the
            # descriptors and remove any we no longer need.
            len_left = length
            alloc_descs_needed = 0
            index = 0
            while len_left > 0:
                this_len = min(len_left, 0x3ffff800)
                alloc_descs_needed += 1
                self.alloc_descs[index][0] = this_len
                index += 1
                len_left -= this_len

            self.alloc_descs = self.alloc_descs[:alloc_descs_needed]

        self.info_len = length
773297
def new(batch_size=None, **options):
    

    if batch_size:
        new_context = AutoContext(batch_size=batch_size, **options)
    else:
        new_context = Context(**options)

    _local.get_local_context().registry.append(new_context)

    return new_context
426631
def create_response_adu(self, meta_data, response_pdu):
        
        response_mbap = pack_mbap(
            transaction_id=meta_data['transaction_id'],
            protocol_id=meta_data['protocol_id'],
            length=len(response_pdu) + 1,
            unit_id=meta_data['unit_id']
        )

        return response_mbap + response_pdu
181697
static LongGauge newNoopLongGauge(
      String name, String description, String unit, List<LabelKey> labelKeys) {
    return NoopLongGauge.create(name, description, unit, labelKeys);
  }
863427
def generate_random_long(signed=True):
    """"""
    return int.from_bytes(os.urandom(8), signed=signed, byteorder='little')
900393
def create(self, cidr_mask, description, **kwargs):
        
        return self._instance._client.acls.create(
            self._instance.name,
            cidr_mask,
            description,
            **kwargs
        )
1283365
def timestamp_long_from_uuid(uuid_arg):
    
    if isinstance(uuid_arg, str):
        uuid_arg = UUID(uuid_arg)
    assert isinstance(uuid_arg, UUID), uuid_arg
    uuid_time = uuid_arg.time
    return uuid_time - 0x01B21DD213814000