language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | @Override
public void execute(@Nonnull final LifecycleStage lifecycleStage)
{
List<LifecycleListener> lifecycleListeners = listeners.get(lifecycleStage);
if (lifecycleListeners == null) {
throw illegalStage(lifecycleStage);
}
log("Stage '%s' starting...", lifecycleSt... |
java | public IfcTaskDurationEnum createIfcTaskDurationEnumFromString(EDataType eDataType, String initialValue) {
IfcTaskDurationEnum result = IfcTaskDurationEnum.get(initialValue);
if (result == null)
throw new IllegalArgumentException(
"The value '" + initialValue + "' is not a valid enumerator of '" + eData... |
java | public ApiResponse<ApiSuccessResponse> uploadFileWithHttpInfo(String id, UploadData uploadData) throws ApiException {
com.squareup.okhttp.Call call = uploadFileValidateBeforeCall(id, uploadData, null, null);
Type localVarReturnType = new TypeToken<ApiSuccessResponse>(){}.getType();
return apiCli... |
python | def get_value_with_source(self, layer=None):
"""Returns a tuple of the value's source and the value at the specified
layer. If no layer is specified then the outer layer is used.
Parameters
----------
layer : str
Name of the layer to use. If None then the outermost w... |
java | protected void computeVariablesFromObject(MtasParserObject object,
Map<String, List<MtasParserObject>> currentList,
Map<String, Map<String, String>> variables) {
MtasParserType<MtasParserVariable> parserType = object.getType();
String id = object.getId();
if (id != null) {
for (MtasParserV... |
java | @Override
public void setTrailerFields(Supplier<Map<String, String>> supplier) {
_getHttpServletResponse().setTrailerFields(supplier);
} |
python | def _get_call_names_helper(node):
"""Recursively finds all function names."""
if isinstance(node, ast.Name):
if node.id not in BLACK_LISTED_CALL_NAMES:
yield node.id
elif isinstance(node, ast.Subscript):
yield from _get_call_names_helper(node.value)
elif isinstance(node, ast.... |
java | public static String wrap(final String str, final String prefix, final String suffix) {
N.checkArgNotNull(prefix);
N.checkArgNotNull(suffix);
if (N.isNullOrEmpty(str)) {
return prefix + suffix;
} else {
return concat(prefix, str, suffix);
}
} |
java | public final List<T> searchSorted(String searchString, String sort) {
return this.findSortedByQuery(FULLTEXT_QUERY, sort, searchString);
} |
python | def energy_density(self, strain, convert_GPa_to_eV=True):
"""
Calculates the elastic energy density due to a strain
"""
return sum([c.energy_density(strain, convert_GPa_to_eV)
for c in self]) |
python | def registerResearchRegion(regionTypeName, moduleName=None):
"""
Register this region so that NuPIC can later find it.
@param regionTypeName: (str) type name of the region. E.g LanguageSensor.
@param moduleName: (str) location of the region class, only needed if
registering a region that is outside the exp... |
python | def get_analyses(self):
"""Returns a list of analyses from the AR
"""
analyses = self.context.getAnalyses(full_objects=True)
return filter(self.is_analysis_attachment_allowed, analyses) |
java | public Set<Map.Entry<Long,TypeV>> entrySet() {
return new AbstractSet<Map.Entry<Long,TypeV>>() {
public void clear ( ) { NonBlockingHashMapLong.this.clear( ); }
public int size ( ) { return NonBlockingHashMapLong.this.size ( ); }
public boolean remove( final Ob... |
python | def is_state(self, entity_id, state):
"""Checks if the entity has the given state"""
return remote.is_state(self.api, entity_id, state) |
python | def get_user_group(self, id, **kwargs): # noqa: E501
"""Get a specific user group # noqa: E501
# noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.get_user_group(id, async_req... |
java | public RetryPolicy<R> withDelay(long delayMin, long delayMax, ChronoUnit chronoUnit) {
Assert.notNull(chronoUnit, "chronoUnit");
Assert.isTrue(delayMin > 0, "delayMin must be greater than 0");
Assert.isTrue(delayMax > 0, "delayMax must be greater than 0");
Duration delayMinDuration = Duration.of(delayMi... |
python | def forward(self, x: torch.Tensor, mask: torch.Tensor) -> torch.Tensor:
"""Follow Figure 1 (left) for connections."""
x = self.sublayer[0](x, lambda x: self.self_attn(x, x, x, mask))
return self.sublayer[1](x, self.feed_forward) |
python | def scan_pressures(cryst, lo, hi, n=5, eos=None):
'''
Scan the pressure axis from lo to hi (inclusive)
using B-M EOS as the volume predictor.
Pressure (lo, hi) in GPa
'''
# Inverse B-M EOS to get volumes from pressures
# This will work only in limited pressure range p>-B/B'.
# Warning! R... |
java | public static XMLDocument create(XMLStreamEventsSync stream) throws XMLException, IOException {
XMLDocument doc = new XMLDocument();
do {
switch (stream.event.type) {
case DOCTYPE:
if (doc.docType != null)
throw new XMLException(stream.getPosition(), "Unexpected element ", "DOCTYPE");
doc.... |
python | def delete_endpoint(self):
"""Delete an Amazon SageMaker ``Endpoint``.
Raises:
ValueError: If the endpoint does not exist.
"""
self._ensure_latest_training_job(error_message='Endpoint was not created yet')
self.sagemaker_session.delete_endpoint(self.latest_training_j... |
java | public DocumentPage read(long serverTimestamp, ServerTransform transform, Transaction transaction,
boolean withContent, String temporalCollection, String[] uris) {
if (uris == null || uris.length == 0)
throw new IllegalArgumentException("Attempt to call read with no uris");
if ... |
java | public final void synpred6_InternalXbaseWithAnnotations_fragment() throws RecognitionException {
// InternalXbaseWithAnnotations.g:443:5: ( ( () '#' '[' ) )
// InternalXbaseWithAnnotations.g:443:6: ( () '#' '[' )
{
// InternalXbaseWithAnnotations.g:443:6: ( () '#' '[' )
// Int... |
java | public static short getShort(ByteBuffer buf, int index) {
return buf.order() == BIG_ENDIAN ? getShortB(buf, index) : getShortL(buf, index);
} |
python | def shop(self, index):
""" Return's the user shop the indexed item is in
Parameters:
index (int) -- The item index
Returns
UserShopFront - User shop item is in
"""
return UserShopFront(self.usr, item.owner, item.id, str(item.price)) |
python | def after(self, after):
"""
Sets the after of this EnrollmentIdentities.
ID
:param after: The after of this EnrollmentIdentities.
:type: str
"""
if after is None:
raise ValueError("Invalid value for `after`, must not be `None`")
if after is no... |
python | def statistics(self):
"""
Access the statistics
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsList
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsList
"""
if self._st... |
python | def set_network_permission(network_id, usernames, read, write, share,**kwargs):
"""
Set permissions on a network to a list of users, identifed by
their usernames. The read flag ('Y' or 'N') sets read access, the write
flag sets write access. If the read flag is 'N', then there is
aut... |
python | def compare(testsuite, gold, select='i-id i-input mrs'):
"""
Compare two [incr tsdb()] profiles.
Args:
testsuite (str, TestSuite): path to the test [incr tsdb()]
testsuite or a :class:`TestSuite` object
gold (str, TestSuite): path to the gold [incr tsdb()]
testsuite ... |
java | public void marshall(HlsManifestCreateOrUpdateParameters hlsManifestCreateOrUpdateParameters, ProtocolMarshaller protocolMarshaller) {
if (hlsManifestCreateOrUpdateParameters == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
pr... |
java | public java.util.List<String> getPackages() {
if (packages == null) {
packages = new com.amazonaws.internal.SdkInternalList<String>();
}
return packages;
} |
python | def _maybe_strip_extension(number):
"""Strip extension from the end of a number string.
Strips any extension (as in, the part of the number dialled after the
call is connected, usually indicated with extn, ext, x or similar) from
the end of the number, and returns it.
Arguments:
number -- the ... |
java | public static List<Tag<String>> tagValuesToString(List<? extends Tag<?>> tags) {
return Lists.transform(tags, new Function<Tag<?>, Tag<String>>() {
@Nullable @Override public Tag<String> apply(Tag<?> input) {
return input == null ? null : Tag.tagValueToString(input);
}
});
} |
python | def gen_cannon_grad_spec(base_labels, choose, low, high, coeffs, pivots):
""" Generate Cannon gradient spectra
Parameters
----------
labels: default values for [teff, logg, feh, cfe, nfe, afe, ak]
choose: val of cfe or nfe, whatever you're varying
low: lowest val of cfe or nfe, whatever you're ... |
java | public SubResourceSummary withCounters(SummarizedCounter... counters) {
if (this.counters == null) {
setCounters(new java.util.ArrayList<SummarizedCounter>(counters.length));
}
for (SummarizedCounter ele : counters) {
this.counters.add(ele);
}
return this;... |
python | def get_issue_by_ref(self, ref):
"""
Get a :class:`Issue` by ref.
:param ref: :class:`Issue` reference
"""
response = self.requester.get(
'/{endpoint}/by_ref?ref={us_ref}&project={project_id}',
endpoint=Issue.endpoint,
us_ref=ref,
... |
java | public List<String> getMappings(String elementName) {
List<String> result = m_elementMappings.get(elementName);
if (result == null) {
result = Collections.emptyList();
}
return result;
} |
java | public void runPipelineWithHashtag() throws Exception {
DynoJedisPipeline pipeline = client.pipelined();
try {
pipeline.set("pipeline-hashtag1-{bar}", "value-1");
pipeline.set("pipeline-hashtag2-{bar}", "value-2");
pipeline.set("pipeline-hashtag3-{bar}", "value-3");
pipeline.set("pipeline-hashtag4-{ba... |
java | @Override
void dump_i(final int indent_level) {
for (int i = 0; i < indent_level; i++) {
System.out.print(" ");
}
System.out.println("|- Group: " + get_name() + " [" + get_size_i(true) + ":" + get_size_i(false) + "]");
final Iterator it = elements.iterator();
while (it.hasNext()) {
((GroupElement) i... |
python | def flatten(self, obj):
"""Return a list with the field values
"""
return [self._serialize(f, obj) for f in self.fields] |
java | public Credentials toGrgit() {
if (username != null && password != null) {
return new Credentials(username, password);
} else {
return null;
}
} |
python | def get_fragment_generator(self, gp, **kwargs):
"""
Return a fragment generator for a given gp.
:param gp:
:param kwargs:
:return:
"""
collector = FragmentCollector(self.__host, gp)
return collector.get_fragment_generator(**kwargs) |
java | public AppAdminLinks getAdminLinks() {
AppAdminLinks links = new AppAdminLinks(mLog.getName());
links.addAdminLink("JMX Console", "system.teaservlet.JMXConsole");
return links;
} |
python | def plot(self,init=None):
"""Interactive plotting of parsing features."""
if not init:
init=self
init.plotstats={}
init.unitfeats=self._getFeatValDict()
sels=[]
for k,v in sorted(init.unitfeats.items()):
for kk,vv in v.items():
sels.append((k,kk))
conditions={'x':[],'y':[]}
targets=... |
python | def _nn(self, side, v, k = 1, radius = np.inf, eps = 0.0, p = 2):
"""Compute the k nearest neighbors of v in the observed data,
:arg side if equal to DATA_X, search among input data.
if equal to DATA_Y, search among output data.
@return distance and indexes of found neares... |
java | private int skipToken()
throws XMLStreamException
{
int result;
main_switch:
switch (mCurrToken) {
case CDATA:
{
/* 30-Aug-2004, TSa: Need to be careful here: we may
* actually have finished with CDATA, but are just
... |
java | public DependencyCustomizer add(String module, boolean transitive) {
return add(module, null, null, transitive);
} |
java | @Override
public ISeq<Phenotype<G, C>> select(
final Seq<Phenotype<G, C>> population,
final int count,
final Optimize opt
) {
requireNonNull(population, "Population");
requireNonNull(opt, "Optimization");
if (count < 0) {
throw new IllegalArgumentException(format(
"Selection count must be greater o... |
python | def create(cls, cli, src_resource_id, dst_resource_id,
max_time_out_of_sync, name=None, members=None,
auto_initiate=None, hourly_snap_replication_policy=None,
daily_snap_replication_policy=None,
replicate_existing_snaps=None, remote_system=None,
... |
java | public void readExternal(java.io.ObjectInput in)
throws java.io.IOException, ClassNotFoundException
{
_realmName= (String)in.readObject();
_config=(String)in.readObject();
if (_config!=null)
load(_config);
} |
python | def QA_SU_save_stock_week(client=DATABASE, ui_log=None, ui_progress=None):
"""save stock_week
Keyword Arguments:
client {[type]} -- [description] (default: {DATABASE})
"""
stock_list = QA_fetch_get_stock_list().code.unique().tolist()
coll_stock_week = client.stock_week
coll_stock_week.... |
java | public <T> DomainObjectMatch<T> AS(Class<T> domainObjectType) {
CollectExpression ce = (CollectExpression)this.astObject;
DomainObjectMatch<T> ret =APIAccess.createDomainObjectMatch(domainObjectType,
ce.getQueryExecutor().getDomainObjectMatches().size(),
ce.getQueryExecutor().getMappingInfo());
ce.setEnd(... |
java | @Override
public void doExceptionCaught(final long sessionId, final Throwable cause) throws Exception {
ThreadGatewayStats stats = gatewayStats.get();
stats.doExceptionCaught();
} |
java | public static String mapToString(Map map)
{
Set entries = map.entrySet();
Iterator iter = entries.iterator();
StringBuffer buff = new StringBuffer();
while (iter.hasNext())
{
Map.Entry entry = (Map.Entry) iter.next();
buff.append("[" + entry.getKey() +... |
java | public SDVariable selu(String name, SDVariable x) {
validateFloatingPoint("selu", x);
SDVariable ret = f().selu(x);
return updateVariableNameAndReference(ret, name);
} |
python | def create_request(self, reset_gpd_iterator=False):
"""Set a list of download requests
Set a list of DownloadRequests for all images that are under the
given property of the Geopedia's Vector layer.
:param reset_gpd_iterator: When re-running the method this flag is used to reset/keep e... |
python | def find_records(self, collection_name, query={}, sort_by=None,
sort_direction=None, start=0, limit=None):
"""
Return a cursor of records from the given MongoDB collection.
:param collection_name: Name of the MongoDB collection to query.
:param query: Standard Mongo... |
python | def close_log(log, verbose=True):
"""Close log
This method closes and active logging.Logger instance.
Parameters
----------
log : logging.Logger
Logging instance
"""
if verbose:
print('Closing log file:', log.name)
# Send closing message.
log.info('The log file h... |
java | private static void checkExists(FileSystem fs, Path location) {
try {
if (!fs.exists(location)) {
throw new DatasetNotFoundException(
"Descriptor location does not exist: " + location);
}
} catch (IOException ex) {
throw new DatasetIOException(
"Cannot access desc... |
java | public static double getToleranceDistance(View view, GoogleMap map) {
BoundingBox boundingBox = getBoundingBox(map);
double boundingBoxWidth = TileBoundingBoxMapUtils.getLongitudeDistance(boundingBox);
double boundingBoxHeight = TileBoundingBoxMapUtils.getLatitudeDistance(boundingBox);
... |
java | public Object afterInvoke(Object object, String methodName, Object[] arguments, Object result) {
((List) calls.get(methodName)).add(System.currentTimeMillis());
return result;
} |
java | @Nonnull
public Thread newThread (@Nonnull final Runnable aRunnable)
{
ValueEnforcer.notNull (aRunnable, "Runnable");
final Thread t = getWrappedFactory ().newThread (aRunnable);
initializeThread (t);
return t;
} |
java | public static String buildSubscript(Iterable<Object> subscripts) {
StringBuilder sb = new StringBuilder();
for (Object subscript : subscripts) {
String value = toString(subscript);
if (value.isEmpty()) {
throw new RuntimeException("Null subscript not allowed.");... |
java | public static void recognition(List<Vertex> segResult, WordNet wordNetOptimum, WordNet wordNetAll)
{
StringBuilder sbName = new StringBuilder();
int appendTimes = 0;
char[] charArray = wordNetAll.charArray;
DoubleArrayTrie<Character>.LongestSearcher searcher = JapanesePersonDictionar... |
python | def addresses(self):
"""
Access the addresses
:returns: twilio.rest.api.v2010.account.address.AddressList
:rtype: twilio.rest.api.v2010.account.address.AddressList
"""
if self._addresses is None:
self._addresses = AddressList(self._version, account_sid=self._... |
java | public String getCellValue(int rowNumber, int cellNumber) {
String result;
checkRowAndCell(rowNumber, cellNumber);
Sheet sheet = this.workbook.getSheet(this.sheetName);
Row row = sheet.getRow(--rowNumber);
Cell cell = row.getCell(--cellNumber);
switch (cell.getCellTypeEnu... |
python | def get_object(self):
"""
Get the object for publishing
Raises a http404 error if the object is not found.
"""
obj = super(PublishActionView, self).get_object()
if obj:
if not hasattr(obj, 'publish'):
raise http.Http404
return obj |
python | def read_shakemap(self, haz_sitecol, assetcol):
"""
Enabled only if there is a shakemap_id parameter in the job.ini.
Download, unzip, parse USGS shakemap files and build a corresponding
set of GMFs which are then filtered with the hazard site collection
and stored in the datastor... |
python | def docs(self, fileids=None) -> Generator[Dict[str, Any], Dict[str, Any], None]:
"""
Returns the complete text of an Text document, closing the document
after we are done reading it and yielding it in a memory safe fashion.
:return : Python Dictionary of strings or Nested Dictionaries. T... |
python | def tab_complete(input_list):
"""
<Purpose>
Gets the list of all valid tab-complete strings from all enabled modules.
<Arguments>
input_list: The list of words the user entered.
<Side Effects>
None
<Exceptions>
None
<Returns>
A list of valid tab-complete strings
"""
commands = []
f... |
python | def get_rst_excerpt(rst_doc: document, paragraphs: int = 1) -> str:
""" Given rst, parse and return a portion """
texts = []
for count, p in enumerate(rst_doc.traverse(paragraph)):
texts.append(p.astext())
if count + 1 == paragraphs:
break
return ' '.join(texts) |
java | @Override
public void removePortalUID(final int uPortalUID) {
this.transactionOperations.execute(
new TransactionCallbackWithoutResult() {
@Override
protected void doInTransactionWithoutResult(TransactionStatus arg0) {
final St... |
java | @Override
public int nextStartPosition() throws IOException {
// no document
if (docId == -1 || docId == NO_MORE_DOCS) {
throw new IOException("no document");
// finished
} else if (noMorePositions) {
return NO_MORE_POSITIONS;
// littleSpans already at start match, because of check... |
python | def zeros(dur=None):
"""
Zeros/zeroes stream generator.
You may sum your endless stream by this to enforce an end to it.
Parameters
----------
dur :
Duration, in number of samples; endless if not given.
Returns
-------
Stream that repeats "0.0" during a given time duration (if any) or
endlessl... |
java | public void read(File file, Table table) throws IOException
{
//System.out.println("Reading " + file.getName());
InputStream is = null;
try
{
is = new FileInputStream(file);
read(is, table);
}
finally
{
StreamHelper.closeQuietly(is);
}
} |
python | def set_log_level(log_level):
"""
Set logging level of this module. Using
`logbook <https://logbook.readthedocs.io/en/stable/>`__ module for logging.
:param int log_level:
One of the log level of
`logbook <https://logbook.readthedocs.io/en/stable/api/base.html>`__.
Disabled logg... |
python | def _force_read(
self,
element,
value,
text_prefix_before,
text_suffix_before,
text_prefix_after,
text_suffix_after,
data_of
):
"""
Force the screen reader display an information of element with prefixes
or suffixes.
:p... |
java | public static nspbr[] get_filtered(nitro_service service, String filter) throws Exception{
nspbr obj = new nspbr();
options option = new options();
option.set_filter(filter);
nspbr[] response = (nspbr[]) obj.getfiltered(service, option);
return response;
} |
python | def output(self, mode='file', forced=False, context=None):
"""
The general output method, override in subclass if you need to do
any custom modification. Calls other mode specific methods or simply
returns the content directly.
"""
output = '\n'.join(self.filter_input(forced, context=context))
... |
java | @Override
public Runnable createRunnableHandler(final HttpInboundConnection inboundConnection) {
final Dispatcher reqDispatcher = dispatcher;
String uri = inboundConnection.getRequest().getURI();
for (ServletHandler handler : registry.getServlets()) {
if (handler.matches(uri)) ... |
java | protected boolean checkLinkForNewOrChangedLinkSource(
CmsDbContext dbc,
CmsResource resource,
CmsRelation relation,
String link,
CmsProject project,
Map<String, CmsResource> fileLookup) {
boolean isValidLink = true;
// the link is valid...
try {
... |
java | public static boolean lower( double[]T , int indexT , int n ) {
double el_ii;
double div_el_ii=0;
for( int i = 0; i < n; i++ ) {
for( int j = i; j < n; j++ ) {
double sum = T[ indexT + j*n+i];
// todo optimize
for( int k = 0; k < i; k... |
python | def set_volume(self, controller, zone, volume):
""" Set volume for zone to specific value.
Divide the volume by 2 to translate to a range (0..50) as expected by Russound (Even thought the
keypads show 0..100).
"""
_LOGGER.debug("Begin - controller= %s, zone= %s, change volume to... |
python | def _set_no_advertise(self, v, load=False):
"""
Setter method for no_advertise, mapped from YANG variable /interface/fortygigabitethernet/ipv6/ipv6_nd_ra/ipv6_intf_cmds/nd/prefix/lifetime/no_advertise (empty)
If this variable is read-only (config: false) in the
source YANG file, then _set_no_advertise i... |
python | def database_exist(self):
"""Create databases for each engine and return a new :class:`.Mapper`.
"""
binds = {}
for key, engine in self.keys_engines():
key = key if key else 'default'
binds[key] = self._database_exist(engine)
return binds |
python | def get_stoplist(language):
"""Returns an built-in stop-list for the language as a set of words."""
file_path = os.path.join("stoplists", "%s.txt" % language)
try:
stopwords = pkgutil.get_data("justext", file_path)
except IOError:
raise ValueError(
"Stoplist for language '%s'... |
java | private static Map<String, String> getAttributeMap(String source) {
if (!StringUtils.hasText(source)) {
return Collections.emptyMap();
}
Map<String, String> attributes = new HashMap<>();
Matcher matcher = KEY_AND_VALUE_PATTERN.matcher(source);
while (matcher.find()) {
attributes.put(matcher.group(1),... |
python | def apply(self):
"""Apply the rules of the context to its occurrences.
This method executes all the functions defined in
self.tasks in the order they are listed.
Every function that acts as a context task receives the
Context object itself as its only argument.
The con... |
python | def helpdefault(self, cmd, known):
"""Hook called to handle help on a command for which there is no
help handler.
"cmd" is the command name on which help was requested.
"known" is a boolean indicating if this command is known
(i.e. if there is a handler for it).
... |
python | def _verify_cas1(ticket, service):
"""
Verifies CAS 1.0 authentication ticket.
:param: ticket
:param: service
Returns username on success and None on failure.
"""
params = {'ticket': ticket, 'service': service}
url = (urljoin(settings.CAS_SERVER_URL, 'validate') + '?' +
url... |
python | def _reset_bbox(self):
"""This function should only be called internally. It resets
the viewers bounding box based on changes to pan or scale.
"""
scale_x, scale_y = self.get_scale_xy()
pan_x, pan_y = self.get_pan(coord='data')[:2]
win_wd, win_ht = self.get_window_size()... |
java | @Api
public HandlerRegistration addLayerSelectionHandler(final LayerSelectionHandler handler) {
return handlerManager.addHandler(LayerSelectionHandler.TYPE, handler);
} |
python | def _apply_krauss_single_qubit(krauss: Union[Tuple[Any], Sequence[Any]],
args: 'ApplyChannelArgs') -> np.ndarray:
"""Use slicing to apply single qubit channel."""
zero_left = linalg.slice_for_qubits_equal_to(args.left_axes, 0)
one_left = linalg.slice_for_qubits_equal_to(args.left_axes, 1)
zero_r... |
java | @Path("/{dsID}")
@GET
public Response getDatastreamProfile(@PathParam(RestParam.PID) String pid,
@PathParam(RestParam.DSID) String dsID,
@QueryParam(RestParam.AS_OF_DATE_TIME) String dateTime,
... |
java | @XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "baseSurface")
public JAXBElement<SurfacePropertyType> createBaseSurface(SurfacePropertyType value) {
return new JAXBElement<SurfacePropertyType>(_BaseSurface_QNAME, SurfacePropertyType.class, null, value);
} |
java | @Override
public String allParamsAsHidden() {
StringBuffer result = new StringBuffer(512);
Map<String, Object> params = allParamValues();
Iterator<Entry<String, Object>> i = params.entrySet().iterator();
while (i.hasNext()) {
Entry<String, Object> entry = i.next();
... |
python | def do_windowed(self, arg):
"""
windowed <target> [arguments...] - run a windowed program for debugging
"""
if self.cmdprefix:
raise CmdError("prefix not allowed")
cmdline = self.input_command_line(arg)
try:
process = self.debug.execl(arg,
... |
python | def get_cufflinks():
"Download cufflinks GTF files"
for size, md5, url in cufflinks:
cuff_gtf = os.path.join(args.data_dir, os.path.basename(url))
if not _up_to_date(md5, cuff_gtf):
download(url, cuff_gtf) |
python | def plot_transaction_rate_heterogeneity(
model,
suptitle="Heterogeneity in Transaction Rate",
xlabel="Transaction Rate",
ylabel="Density",
suptitle_fontsize=14,
**kwargs
):
"""
Plot the estimated gamma distribution of lambda (customers' propensities to purchase).
Parameters
----... |
java | public void setFeedback(SetFeedbackRequest request) {
checkNotNull(request, "object request should not be null.");
if (request.getEmail() != null && request.getEmail().trim().length() > 0) {
checkIsEmail(request.getEmail());
}
if (request.getType() == null) {
requ... |
python | def touchz(self, path):
"""
To touchz using the web hdfs "write" cmd.
"""
self.client.write(path, data='', overwrite=False) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.