language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
@Override protected void configureFindbugsEngine() { addBoolOption("-formatDates", formatDates); addBoolOption("-noTabs", noTabs); addBoolOption("-summary", summary); addArg(inputFile.getName()); if (outputFile != null) { // Don't use .getName() because it discard...
python
def serialize(self, request): """ Serialize the given object into into simple data types (e.g. lists, dictionaries, strings). """ def serialize(anything): def serialize_dictionary(dictionary): """Dictionaries are serialized recursively.""" ...
java
public void showAlertAddDialog(HistoryReference ref) { if (dialogAlertAdd == null || !dialogAlertAdd.isVisible()) { dialogAlertAdd = new AlertAddDialog(getView().getMainFrame(), false); dialogAlertAdd.setVisible(true); dialogAlertAdd.setHistoryRef(ref); } }
java
public GeoLocation search(double deltaNM, GeoSearch... searches) { List<GeoLocation> list = search(false, searches); if (!list.isEmpty() && GeoDB.isUnique(list, deltaNM)) { return list.get(0); } else { list.removeIf((gl)->!gl.match(tru...
java
public void bytesOfCount(final int count, @SuppressWarnings("rawtypes") final PropertyDestination dest){ new RWHelper(){ @SuppressWarnings("unchecked") @Override public void read(EndianAwareDataInputStream is, ThirdPartyParseable bean) throws IOException{ byte [] data = new byte[count]; if...
java
private void onEmbeddedColumns(CQLTranslator translator, TableInfo tableInfo, StringBuilder queryBuilder, List compositeEmbeddables) { List<EmbeddedColumnInfo> embeddedColumns = tableInfo.getEmbeddedColumnMetadatas(); for (EmbeddedColumnInfo embColInfo : embeddedColumns) { ...
java
@Override public InputStream getInputStream() throws IOException { if ( (zipEntryData == null) || zipEntryData.isDirectory() ) { return null; } final ZipFileHandle zipFileHandle = rootContainer.getZipFileHandle(); // throws IOException ZipFile zipFile = zipFileHandle.op...
java
public RuleMetadata getMetaData(String attributeName) { if (metadataList != null && attributeName != null) { for (int i = 0; i < metadataList.length; i++) { if (attributeName.equals(metadataList[i].getAttributeName())) { return metadataList[i]; } ...
java
protected void validateHeader(final String[] sourceHeader, final String[] definedHeader) { // check column size. if(sourceHeader.length != definedHeader.length) { final CsvContext context = new CsvContext(1, 1, 1); throw new SuperCsvNoMatchColumnSizeException(source...
java
public RouteTableInner updateTags(String resourceGroupName, String routeTableName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, routeTableName, tags).toBlocking().last().body(); }
python
def _parse_simple_fault_geometry_surface(self, node): """ Parses a simple fault geometry surface """ spacing = node["spacing"] usd, lsd, dip = (~node.upperSeismoDepth, ~node.lowerSeismoDepth, ~node.dip) # Parse the geometry coords = split_...
python
def unique_slug(manager, slug_field, slug): """ Ensure slug is unique for the given manager, appending a digit if it isn't. """ max_length = manager.model._meta.get_field(slug_field).max_length slug = slug[:max_length] i = 0 while True: if i > 0: if i > 1: ...
python
def run(self, conn, tmp, module_name, module_args, inject): ''' transfer the given module name, plus the async module, then run it ''' # shell and command module are the same if module_name == 'shell': module_name = 'command' module_args += " #USE_SHELL" (module...
python
def _laplace_fit(self,obj_type): """ Performs a Laplace approximation to the posterior Parameters ---------- obj_type : method Whether a likelihood or a posterior Returns ---------- None (plots posterior) """ # Get Mode and Inverse H...
python
def PlaceVOffsetT(self, x): """PlaceVOffsetT prepends a VOffsetT to the Builder, without checking for space. """ N.enforce_number(x, N.VOffsetTFlags) self.head = self.head - N.VOffsetTFlags.bytewidth encode.Write(packer.voffset, self.Bytes, self.Head(), x)
java
public static base_response add(nitro_service client, responderpolicy resource) throws Exception { responderpolicy addresource = new responderpolicy(); addresource.name = resource.name; addresource.rule = resource.rule; addresource.action = resource.action; addresource.undefaction = resource.undefaction; ad...
java
protected void process(T input) { try { Optional.ofNullable(this.transformFunction.apply(input)) .ifPresent(this.outputPublisher::submit); } catch (Exception e) { JMExceptionManager.handleException(log, e, "process", input); } }
python
def end_prov_graph(self): """ Finalize prov recording with end time """ endTime = Literal(datetime.now()) self.prov_g.add((self.entity_d, self.prov.generatedAtTime, endTime)) self.prov_g.add((self.activity, self.prov.endedAtTime, endTime))
python
def start(self): """ Starts listening to the socket :return: True if the socket has been created """ # Create the multicast socket (update the group) self._socket, self._group = create_multicast_socket(self._group, ...
python
def plot_seebeck_temp(self, doping='all', output='average'): """ Plot the Seebeck coefficient in function of temperature for different doping levels. Args: dopings: the default 'all' plots all the doping levels in the analyzer. Specify a list of doping ...
java
public static <Input extends ImageGray<Input>,Output extends ImageGray<Output>> void distortSingle(Input input, Output output, boolean renderAll, PixelTransform<Point2D_F32> transform, InterpolatePixelS<Input> interp) { Class<Output> inputType = (Class<Output>)input.getClass(); ImageDistort<Input,...
java
protected void invokeInvariants() { ClassContractHandle h = contracts.getClassHandle(ContractKind.INVARIANT); if (h == null) { return; } MethodNode contractMethod = injectContractMethod(h); Label skipInvariants = new Label(); if (isConstructor) { loadThis(); invokeVirtual(thi...
java
public void setReplicationInstances(java.util.Collection<ReplicationInstance> replicationInstances) { if (replicationInstances == null) { this.replicationInstances = null; return; } this.replicationInstances = new java.util.ArrayList<ReplicationInstance>(replicationInsta...
java
public static CompletableFuture<IMessageReceiver> createMessageReceiverFromConnectionStringBuilderAsync(ConnectionStringBuilder amqpConnectionStringBuilder, ReceiveMode receiveMode) { Utils.assertNonNull("amqpConnectionStringBuilder", amqpConnectionStringBuilder); return createMessageReceiverFromEntityP...
java
public TypeChecker createTypeChecker(CompilationUnit unit) { TypeChecker typeChecker = super.createTypeChecker(unit); CompileListener typeCheckerListener = getTypeCheckerListener(); if (typeCheckerListener != null) { typeChecker.addCompileListener(typeCheckerListener); } ...
python
def timestamp_file(): """Opens a file for tracking the time of the last version check""" config_dir = os.path.join( os.path.expanduser("~"), BaseGlobalConfig.config_local_dir ) if not os.path.exists(config_dir): os.mkdir(config_dir) timestamp_file = os.path.join(config_dir, "cumulu...
java
public static double floatToDoubleLower(float f) { if(Float.isNaN(f)) { return Double.NaN; } if(Float.isInfinite(f)) { return f < 0 ? Double.NEGATIVE_INFINITY : Double.longBitsToDouble(0x47efffffffffffffL); } long bits = Double.doubleToRawLongBits((double) f); if((bits & 0x8000000000...
python
def lookUpReportsByCountry(self, countryName): """ looks up a country by it's name Inputs countryName - name of the country to get reports list. """ code = self.findCountryTwoDigitCode(countryName) if code is None: raise Exception("Invalid country...
java
public List<Slice> getUnloadedSlices(List<Slice> slices) { List<Slice> unloadedSlices = new ArrayList<>(slices); unloadedSlices.removeAll(loadedSlices); unloadedSlices.removeAll(inProgressSlices); return unloadedSlices; }
java
public final void mT__74() throws RecognitionException { try { int _type = T__74; int _channel = DEFAULT_TOKEN_CHANNEL; // InternalXbaseWithAnnotations.g:72:7: ( 'typeof' ) // InternalXbaseWithAnnotations.g:72:9: 'typeof' { match("typeof");...
java
protected CmsResource readResource(CmsDbContext dbc, CmsUUID structureID, CmsResourceFilter filter) throws CmsException { // read the resource from the VFS CmsResource resource = m_driverManager.readResource(dbc, structureID, filter); // check if the user has read access to the resource ...
python
def get_column_info(connection, table_name): """ Return an in order list of (name, type) tuples describing the columns in the given table. """ cursor = connection.cursor() cursor.execute("SELECT sql FROM sqlite_master WHERE type == 'table' AND name == ?", (table_name,)) statement, = cursor.fetchone() coldefs = ...
python
def is_url_connectable(port): """ Tries to connect to the HTTP server at /status path and specified port to see if it responds successfully. :Args: - port - The port to connect. """ try: from urllib import request as url_request except ImportError: import urllib2 as url...
python
def Upload(cls, filename): """ 文件上传, 非原生input @todo: some upload.exe not prepared @param file: 文件名(文件必须存在在工程resource目录下), upload.exe工具放在工程tools目录下 """ raise Exception("to do") TOOLS_PATH = "" RESOURCE_PATH = "" tool_4path = os.path....
java
protected final void useResultSet( ResultSet pResultSet ) throws SQLException { boolean lFirst = true; if( !pResultSet.next() ) { handleEmptyResultSet(); } else { while( lFirst || pResultSet.next() ) { lFirst = false; useResultSetRow( pResultSet ); } ...
python
def get_all(self, request, notifications, mark_as_read=False): """ return all notifications with pagination """ return self.list(request, notifications)
python
def check_list_errors(self, checkFunc, lst): """Validation helper function.""" # check for errors on each subitem, filter only subitems with errors results = (checkFunc(i) for i in lst) return [err for err in results if err]
java
public static RedisClusterClient create(String uri) { LettuceAssert.notEmpty(uri, "URI must not be empty"); return create(RedisClusterURIUtil.toRedisURIs(URI.create(uri))); }
python
def get_bucket_files(glob_pattern, base_dir, force=False, pattern_slice=slice(None)): """Helper function to download files from Google Cloud Storage. Args: glob_pattern (str or list): Glob pattern string or series of patterns used to search for on Google Cloud Storage. The pattern should ...
python
def get_cse_code(self, exprs, basename=None, dummy_groups=(), arrayify_groups=()): """ Get arrayified code for common subexpression. Parameters ---------- exprs : list of sympy expressions basename : str Stem of variable names (default: cse). ...
python
def get_question(self, assessment_section_id, item_id): """Gets the ``Question`` specified by its ``Id``. arg: assessment_section_id (osid.id.Id): ``Id`` of the ``AssessmentSection`` arg: item_id (osid.id.Id): ``Id`` of the ``Item`` return: (osid.assessment.Questio...
java
public static <T> Set<T> getRandomSubsetMax(Set<T> set, int maxCount) { int count = rand.nextInt(maxCount) + 1; return getRandomSubset(set, count); }
java
@RequestMapping(method = RequestMethod.POST) public ResponseEntity<E> save(HttpServletRequest request) { final String simpleClassName = getEntityClass().getSimpleName(); final String errorMessagePrefix = "Error when saving entity of type " + simpleClassName + ": "; BufferedRead...
java
public void run() { logger.trace("BlockingConsumer " + this + " starting data processing"); int length; char cs[] = new char[256]; Reader reader = pair.getReader(); while (!stopRequested && !foundEOF) { try { logger.trace("BlockingConsumer " + this +...
java
public static boolean isOnlyEmojis(@Nullable final String text) { if (!TextUtils.isEmpty(text)) { final String inputWithoutSpaces = SPACE_REMOVAL.matcher(text).replaceAll(Matcher.quoteReplacement("")); return EmojiManager.getInstance() .getEmojiRepetitivePattern() .matcher(input...
java
public List<ICalComponent> setComponent(ICalComponent component) { return components.replace(component.getClass(), component); }
java
public final void mCLOSE_PAREN() throws RecognitionException { try { int _type = CLOSE_PAREN; int _channel = DEFAULT_TOKEN_CHANNEL; // BELStatement.g:275:12: ( ')' ) // BELStatement.g:276:5: ')' { match(')'); } st...
java
public Observable<ManagedClusterInner> beginCreateOrUpdateAsync(String resourceGroupName, String resourceName, ManagedClusterInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, resourceName, parameters).map(new Func1<ServiceResponse<ManagedClusterInner>, ManagedClusterInner...
python
def _restore_slim(self, variables): """ Restore from tf-slim file (usually a ImageNet pre-trained model). """ variables_to_restore = self.get_variables_in_checkpoint_file(self.flags['RESTORE_SLIM_FILE']) variables_to_restore = {self.name_in_checkpoint(v): v for v in variables if (self.name_in_ch...
java
public static <T> T[] candidates(T[] items, Class<?>[][] signatures, boolean[] varArgs, Class<?>[] argTypes) { final int[] indices = candidateMatches(signatures, varArgs, argTypes); T[] result = newArray(items.getClass().getComponentType(), indices.length); for (int i = 0; i < indices.length;...
java
public void marshall(ListFragmentsRequest listFragmentsRequest, ProtocolMarshaller protocolMarshaller) { if (listFragmentsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(listFragmentsReques...
java
@Deprecated public static <K, V> Function<Map.Entry<K, V>, V> getEntryValue() { return entryValueFunction(); }
python
def _create_function(name, doc=""): """Create a PySpark function by its name""" def _(col): sc = SparkContext._active_spark_context jc = getattr(sc._jvm.functions, name)(col._jc if isinstance(col, Column) else col) return Column(jc) _.__name__ = name _.__doc__ = doc return _
python
def decompress_decoder(inputs, hparams, strides=(2, 2), kernel=(3, 3), name=None): """Decoder that decompresses 2-D inputs by 2**num_compress_steps. Args: inputs: Tensor of shape [batch, compress_height, compress_width,...
python
def to_ipa(s, delimiter=' ', all_readings=False, container='[]'): """Convert a string's Chinese characters to IPA. *s* is a string containing Chinese characters. *delimiter* is the character used to indicate word boundaries in *s*. This is used to differentiate between words and characters so that a m...
python
def _get_project_conf(): """Loads configuration from project config file.""" config_settings = {} project_root = find_vcs_root(".") if project_root is None: return config_settings for conf_dir in PROJECT_CONF_DIRS: conf_dir = conf_dir.lstrip("./") joined_dir = os.path.join(...
python
def remove_volume(self, name, force=False): """ Remove a volume. Similar to the ``docker volume rm`` command. Args: name (str): The volume's name force (bool): Force removal of volumes that were already removed out of band by the volume driver plugin. ...
java
public boolean hasNextValue() throws IOException { if (_parser == null) { return false; } JsonToken t = _parser.getCurrentToken(); if (t == null) { // un-initialized or cleared; find next t = _parser.nextToken(); // If EOF, no more if (t ==...
java
protected void initEditHandler(Element handlerElement) { String editHandlerClass = handlerElement.attributeValue(APPINFO_ATTR_CLASS); Map<String, String> params = Maps.newHashMap(); Element paramsElement = handlerElement.element(APPINFO_PARAMETERS); if (paramsElement != null) { ...
java
@Override public Optional<Map<String, Object>> getParameters() { if (instance instanceof ArtifactParams) { return ((ArtifactParams) instance).getParameters(); } return Optional.absent(); }
python
def cached_property(getter): """ Decorator that converts a method into memoized property. The decorator works as expected only for classes with attribute '__dict__' and immutable properties. """ def decorator(self): key = "_cached_property_" + getter.__name__ if not hasattr(self...
java
public <T extends Entity<ID>, ID extends Serializable> T newInstance(final Class<T> clazz, final ID id) { EntityType type = getEntityType(clazz); @SuppressWarnings("unchecked") T entity = (T) type.newInstance(); try { PropertyUtils.setProperty(entity, type.getIdName(), id); } catch (Exception ...
python
def get_var(name, default=None): """ Returns the variable with the provided key from the table specified by _State.vars_table_name. """ alchemytypes = {"text": lambda x: x.decode('utf-8'), "big_integer": lambda x: int(x), "date": lambda x: x.decode('utf-8'), ...
java
public static <T> void writeWorkBook(File file, int excelType, List<T> beans, List<String> properties, List<String> titles, String dateFormat) throws WriteExcelException { Workbook workbook = null; if (XLSX == excelType) { workbook = new XSSFWorkbook(...
java
public void setCustomProperties() { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "setCustomProperties", this); // Set the properties that belong to the bus /* * List props = * ((ConfigObject)getEObject()).getObjectList(CT_SIBus.PROPERTIES_NAME); * for (Iterator ite...
python
def swappable_setting(app_label, model): """ Returns the setting name to use for the given model (i.e. AUTH_USER_MODEL) """ prefix = _prefixes.get(app_label, app_label) setting = "{prefix}_{model}_MODEL".format( prefix=prefix.upper(), model=model.upper() ) # Ensure this attr...
python
def _move_leadership(self, state): """Attempt to move a random partition to a random broker. If the chosen movement is not possible, None is returned. :param state: The starting state. :return: The resulting State object if a leader change is found. None if no change is fou...
java
private void doUpdateComponent() throws PageException { admin.updateComponentDeepSearch(getBoolObject("admin", action, "deepSearch")); admin.updateBaseComponent(getString("admin", action, "baseComponentTemplateCFML"), getString("admin", action, "baseComponentTemplateLucee")); admin.updateComponentDumpTemplate(getSt...
java
public static <E> Page<E> startPage(int pageNum, int pageSize) { return startPage(pageNum, pageSize, DEFAULT_COUNT); }
java
@Override public void modifyAttributes(Name name, int modOp, Attributes attrs) throws NamingException { throw new UnsupportedOperationException(NOT_IMPLEMENTED); }
java
public static Time parseTime(String pStr) { TimeFormat tf = TimeFormat.getInstance(); return tf.parse(pStr); }
python
def extend_from_instances(self, params: Params, instances: Iterable['adi.Instance'] = ()) -> None: """ Extends an already generated vocabulary using a collection of instances. """ min_count = params.pop("min_count", None) ...
python
def dtw(x, y, dist, warp=1, w=inf, s=1.0): """ Computes Dynamic Time Warping (DTW) of two sequences. :param array x: N1*M array :param array y: N2*M array :param func dist: distance used as cost measure :param int warp: how many shifts are computed. :param int w: window size limiting the ma...
java
public static NotificationDeleter deleter(final String pathAccountSid, final String pathCallSid, final String pathSid) { return new NotificationDeleter(pathAccountSid, pathCallSid, pathSid); }
java
public static Context current() { Context current = storage().current(); if (current == null) { return ROOT; } return current; }
java
@Override public CreateInstanceResult createInstance(CreateInstanceRequest request) { request = beforeClientExecution(request); return executeCreateInstance(request); }
python
def make_wcs(self, naxis=2, proj='CAR', energies=None, oversample=2): """ Make a WCS projection appropirate for this HPX pixelization """ w = WCS(naxis=naxis) skydir = self.get_ref_dir(self._region, self.coordsys) if self.coordsys == 'CEL': w.wcs.ctype[0] = 'RA---%s'...
python
def _get_alerts(self) -> List[str]: """ Reports alerts :return: the list of alerts """ global ALERTS cur_time = time.monotonic() if cur_time < self._next_alert_time: return [] alerts = [] if self._alert_count < len(ALERTS): ...
python
def step(self, closure=None): """Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model and returns the loss. """ loss = None if closure is not None: loss = closure() for...
python
def del_key(self, key, key_to_delete): "Delete the `key_to_delete` for the record found with `key`." v = self.get(key) if key_to_delete in v: del v[key_to_delete] self.set(key, v)
java
private ResultSet getVersionColumnsOrBestRowIdentifier() throws SQLException { String sql = VERSION_AND_IDENTIFIER_COLUMNS_SELECT_STATEMENT + FROM_STATEMENT_WITHOUT_RESULTS; CloudSpannerPreparedStatement statement = prepareStatement(sql); return statement.executeQuery(); }
python
def _verify_student_input(self, student_input, locked): """If the student's answer is correct, returns the normalized answer. Otherwise, returns None. """ guesses = [student_input] try: guesses.append(repr(ast.literal_eval(student_input))) except Exception: ...
python
def fetch_time_output(marker, format_s, ins): """ Fetch the output /usr/bin/time from a. Args: marker: The marker that limits the time output format_s: The format string used to parse the timings ins: A list of lines we look for the output. Returns: A list of timing tup...
python
def check_time(value): """check that it's a value like 03:45 or 1:1""" try: h, m = value.split(':') h = int(h) m = int(m) if h >= 24 or h < 0: raise ValueError if m >= 60 or m < 0: raise ValueError except ValueError: raise TimeDefinitio...
python
def get_epoch_number( block_height ): """ Which epoch are we in? Return integer (>=0) on success """ global EPOCHS if block_height <= EPOCHS[0]['end_block']: return 0 for i in xrange(1, len(EPOCHS)): if EPOCHS[i-1]['end_block'] < block_height and (block_height <= EPOCHS[i][...
python
def get_variants_in_region(self, chrom, start, end): """Iterate over variants in a region.""" if self.chrom is not None and chrom == self.chrom: # We are going to search for 'NA' since the chromosome was set chrom = "NA" iterator = self._bgen.iter_variants_in_region( ...
python
def toDict(self): """ Get information about this read in a dictionary. @return: A C{dict} with keys/values for the attributes of self. """ if six.PY3: result = super().toDict() else: result = AARead.toDict(self) result.update({ ...
java
@SafeVarargs public static <K, V> Map<K, V> map(final Entry<? extends K, ? extends V>... entries) { final Map<K, V> map = new LinkedHashMap<K, V>(entries.length); for (final Entry<? extends K, ? extends V> entry : entries) { map.put(entry.getKey(), entry.getValue()); } re...
java
private void processKeyUpdateDirective(String issuer, String ssd) { try { /** * Get unverified part of the JWT to extract issuer. * */ //PlainJWT jwt_unverified = PlainJWT.parse(ssd); SignedJWT jwt_signed = SignedJWT.parse(ssd); String jwt_issuer = (String) jwt_sig...
python
def mount(self, url, app): "Mount a sub-app at the url of current app." # Inspired by Bottle. It might seem that dispatching to # subapps would rather be handled by normal routes, but # arguably, that's less efficient. Taking into account # that paradigmatically there's differenc...
python
def sample(self, n): """ Samples data into a Pandas DataFrame. Args: n: number of sampled counts. Returns: A dataframe containing sampled data. Raises: Exception if n is larger than number of rows. """ row_total_count = 0 row_counts = [] for file in self.files: w...
python
def fit(self, X, y=None, **fit_params): """Fits the inverse covariance model according to the given training data and parameters. Parameters ----------- X : 2D ndarray, shape (n_features, n_features) Input data. Returns ------- self "...
java
@Override public Object create(String application, String module, String beanName, String interfaceName) throws EJBException, RemoteException { if (application == null) throw new IllegalArgumentExc...
java
public BigDecimal BigDecimalValue(MathContext mc) { /* numerator and denominator individually rephrased */ BigDecimal n = new BigDecimal(a); BigDecimal d = new BigDecimal(b); return n.divide(d, mc); }
python
def program_page(self, address, bytes): """! @brief Flash one or more pages. @exception FlashProgramFailure """ assert self._active_operation == self.Operation.PROGRAM # prevent security settings from locking the device bytes = self.override_security_bit...
java
public String readString(URI uri, Charset charset) { return searchForSupportedProcessor(uri).readString(uri, charset); }
python
def from_project_file(controller, project_file, track_path=None, log_level=logging.ERROR): """Create rocket instance using project file connector""" rocket = Rocket(controller, track_path=track_path, log_level=log_level) rocket.connector = ProjectFileConnector(project_file, ...
java
public int fieldChanged(boolean bDisplayOption, int iMoveMode) { String string = this.getOwner().toString(); if (Utility.isNumeric(string)) { Task task = null; if (this.getOwner() != null) if (this.getOwner().getRecord() != null) if...
java
@Override public ImmutableList<E> subList(int fromIndex, int toIndex) { checkPositionIndexes(fromIndex, toIndex, size()); int length = toIndex - fromIndex; if (length == size()) { return this; } switch (length) { case 0: return of(); case 1: return of(get(fromInde...
python
def start(self, path=None, format=None, outputMode=None, partitionBy=None, queryName=None, **options): """Streams the contents of the :class:`DataFrame` to a data source. The data source is specified by the ``format`` and a set of ``options``. If ``format`` is not specified, the d...