language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | public void setPDatabaseParent(PhysicalDatabaseParent pDatabaseParent)
{
if (m_pDatabaseParent != null)
m_pDatabaseParent.removePDatabase(this);
m_pDatabaseParent = pDatabaseParent;
if (m_pDatabaseParent != null)
m_pDatabaseParent.addPDatabase(this);
} |
python | def debug_tag(self, tag):
"""Setter for the debug tag.
By default, the tag is the serial of the device, but sometimes it may
be more descriptive to use a different tag of the user's choice.
Changing debug tag changes part of the prefix of debug info emitted by
this object, like... |
python | def get_scatter_queue(self):
"""Returns a :class: `kombu.Queue` instance for receiving broadcast
commands for this actor type."""
return Queue('%s.%s.scatter' % (self.name, self.id),
self.inbox_scatter, auto_delete=True) |
python | def get_service_name_resources(cls, service_name):
""" Get resource models by service name """
from django.apps import apps
resources = cls._registry[service_name]['resources'].keys()
return [apps.get_model(resource) for resource in resources] |
python | def is_json(mimetype):
"""Indicates if this mimetype is JSON or not. By default a request
is considered to include JSON data if the mimetype is
``application/json`` or ``application/*+json``.
"""
if not mimetype:
return False
if ";" in mimetype: # Allow Content-Type header to be passed... |
python | def consume_path_sep(self, i):
"""Consume any consecutive path separators are they count as one."""
try:
if self.bslash_abort:
count = -1
c = '\\'
while c == '\\':
count += 1
c = next(i)
... |
java | public Observable<ListStreamingLocatorsResponseInner> listStreamingLocatorsAsync(String resourceGroupName, String accountName, String assetName) {
return listStreamingLocatorsWithServiceResponseAsync(resourceGroupName, accountName, assetName).map(new Func1<ServiceResponse<ListStreamingLocatorsResponseInner>, Li... |
python | def grid_widgets(self):
"""
Configure all widgets using the grid geometry manager
Automatically called by the :meth:`__init__` method.
Does not have to be called by the user except in extraordinary
cases.
"""
# Categories
for index, label in enumerate(sel... |
java | private boolean matchNoAsterisk(String toMatch, String subpattern) {
if (logger.isLoggable(Level.FINEST)) {
logger.finest("Entering matchNoAsterisk with toMatch = " + toMatch + " and subpattern = " + subpattern);
}
int toMatchLen = toMatch.length();
int subpatternLen = subpattern.length();
if (toMat... |
python | def transform(self, ref, strict=False):
"""Transform a URI reference relative to `self` into a
:class:`SplitResult` representing its target URI.
"""
scheme, authority, path, query, fragment = self.RE.match(ref).groups()
# RFC 3986 5.2.2. Transform References
if scheme i... |
python | def remove_children(self, id_):
"""Removes all childrenfrom an ``Id``.
arg: id (osid.id.Id): the ``Id`` of the node
raise: NotFound - an node identified by the given ``Id`` was
not found
raise: NullArgument - ``id`` is ``null``
raise: OperationFailed - unab... |
python | def new_points(
factory: IterationPointFactory, solution, weights: List[List[float]] = None
) -> List[Tuple[np.ndarray, List[float]]]:
"""Generate approximate set of points
Generate set of Pareto optimal solutions projecting from the Pareto optimal solution
using weights to determine the direction.
... |
python | def _concat(self, egdfs):
"""
Concatenate evaluated group dataframes
Parameters
----------
egdfs : iterable
Evaluated dataframes
Returns
-------
edata : pandas.DataFrame
Evaluated data
"""
egdfs = list(egdfs)
... |
java | public static void debugSummaryMessage(TraceComponent callersTrace, Connection connection, ConversationImpl conversation, String remark, int requestNumber)
{
if(tc.isDebugEnabled() || callersTrace.isDebugEnabled() || SIBMessageTraceJfap.tcjfs.isDebugEnabled())
{
final StringBuffer sb = new Strin... |
python | def render_crispy_form(form, helper=None, context=None):
"""
Renders a form and returns its HTML output.
This function wraps the template logic in a function easy to use in a Django view.
"""
from crispy_forms.templatetags.crispy_forms_tags import CrispyFormNode
if helper is not None:
... |
java | @SuppressWarnings("unchecked")
public static <T> AttributeKey<T> valueOf(String name) {
return (AttributeKey<T>) pool.valueOf(name);
} |
python | def get_list_url_tibiadata(cls, world, town, house_type: HouseType = HouseType.HOUSE):
"""
Gets the URL to the house list on Tibia.com with the specified parameters.
Parameters
----------
world: :class:`str`
The name of the world.
town: :class:`str`
... |
java | public SipPhone createSipPhone(String proxyHost, String proxyProto, int proxyPort, String me)
throws InvalidArgumentException, ParseException {
return new SipPhone(this, proxyHost, proxyProto, proxyPort, me);
} |
python | def _http_error_handler(http_error):
''' Simple error handler for azure.'''
message = str(http_error)
error_code = None
if 'x-ms-error-code' in http_error.respheader:
error_code = http_error.respheader['x-ms-error-code']
message += ' ErrorCode: ' + error_code
if http_error.respbody... |
java | static void tintWidget(@NonNull ProgressBar progressBar, @ColorInt int color) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
ColorStateList tint = ColorStateList.valueOf(color);
progressBar.setIndeterminateTintList(tint);
}
} |
java | public boolean hasDSLSentences() {
if (this.lhs != null) {
for (IPattern pattern : this.lhs) {
if (pattern instanceof DSLSentence) {
return true;
}
}
}
if (this.rhs != null) {
for (IAction action : this.rhs... |
python | def put(self, url, html, cache_info=None):
"""
Put response into cache
:param url: Url to cache
:type url: str | unicode
:param html: HTML content of url
:type html: str | unicode
:param cache_info: Cache Info (default: None)
:type cache_info: floscraper.... |
java | public String getPropertyValue(String key, Object[] parameters) {
if (parameters != null && parameters.length > 0) {
String parameters2[] = new String[parameters.length];
for (int i = 0; i < parameters.length; i++) {
Object parameter = parameters[i];
if (p... |
python | def _set_hyperparameters(self, parameters):
"""Set internal optimization parameters."""
for name, value in parameters.iteritems():
try:
getattr(self, name)
except AttributeError:
raise ValueError(
'Each parameter in parameters m... |
python | def get(self, **kwargs):
'''Return an instance of a model matching the query. A special case is
the query on ``id`` which provides a direct access to the :attr:`session`
instances. If the given primary key is present in the session, the object
is returned directly without performing any query.'''
r... |
python | def set_event_mgr(dinfo, event_mgr, context=None):
"""Wrapper for openjpeg library function opj_set_event_mgr.
"""
argtypes = [ctypes.POINTER(CommonStructType),
ctypes.POINTER(EventMgrType),
ctypes.c_void_p]
OPENJPEG.opj_set_event_mgr.argtypes = argtypes
OPENJPEG.opj_... |
python | def plotRaster (include = ['allCells'], timeRange = None, maxSpikes = 1e8, orderBy = 'gid', orderInverse = False, labels = 'legend', popRates = False,
spikeHist=None, spikeHistBin=5, syncLines=False, lw=2, marker='|', markerSize=5, popColors=None, figSize=(10, 8), fontSize=12,
dpi = 100, saveData = None... |
python | def reconnect(self, exc=None):
"""Schedule reconnect after connection has been unexpectedly lost."""
# Reset protocol binding before starting reconnect
self.protocol = None
if not self.closing:
log.warning('disconnected from Rflink, reconnecting')
self.loop.creat... |
python | def convert_unicode_2_utf8(input):
'''Return a copy of `input` with every str component encoded from unicode to
utf-8.
'''
if isinstance(input, dict):
try:
# python-2.6
return dict((convert_unicode_2_utf8(key), convert_unicode_2_utf8(value))
for ke... |
python | def parse_data_line(self, sline):
"""
Parses the data line and builds the dictionary.
:param sline: a split data line to parse
:returns: the number of rows to jump and parse the next data line or return the code error -1
"""
# if there are less values founded than headers... |
java | private static SymbolTable[] safeCopy(SymbolTable[] imports)
{
if (imports != null && imports.length != 0)
{
imports = imports.clone();
}
return imports;
} |
java | private static byte[] writeCsv(String[] columnHeaders, String[][] rows) throws IOException {
try (ByteArrayOutputStream csvStream = new ByteArrayOutputStream(); OutputStreamWriter streamWriter = new OutputStreamWriter(csvStream, Charset.forName("UTF-8"))) {
CSVWriter csvWriter = new CSVWriter(streamWriter, ',... |
java | @SuppressWarnings("unchecked")
public static <E, T extends E> Collection<E> removeAll(Collection<E> c, T... array){
for(T obj: array)
c.remove(obj);
return c;
} |
python | def append(self, item):
"""
Add the given item as children
"""
if self.url:
raise TypeError('Menu items with URL cannot have childrens')
# Look for already present common node
if not item.is_leaf():
for current_item in self.items:
... |
python | def _post_scrape(self, value, processor=None):
"""Apply processing to the scraped value."""
# Pass each value through the field's clean method
value = [self.process(v) for v in value]
# Filter None values
value = [v for v in value if v is not None]
# Pass each value throu... |
java | protected boolean initURL(String data) {
if (getUrl() == null) {
if (log.isLoggable(Level.FINE)) {
log.fine(String.format("url parameter is null, trying to construct one from %s", data));
}
try {
setUrl(BindingHelper.URL_PARSER.convert(data));
return ... |
python | def type_check(arg_name, pos, reqd_type):
"""
allows type checking at runtime for args or kwargs
"""
def decorator(fn):
# brevity compromised in favour of readability
def logic(*args, **kwargs):
arg_count = len(args)
if arg_count:
if pos < arg_co... |
python | def add_metadata(self, metadata_matrix, meta_index_store):
'''
Returns a new corpus with a the metadata matrix and index store integrated.
:param metadata_matrix: scipy.sparse matrix (# docs, # metadata)
:param meta_index_store: IndexStore of metadata values
:return: TermDocMatr... |
java | public static GraphicInfo createGraphic(ExternalGraphicInfo graphic, int size) {
GraphicInfo graphicInfo = new GraphicInfo();
ChoiceInfo choice = new ChoiceInfo();
choice.setExternalGraphic(graphic);
graphicInfo.getChoiceList().add(choice);
SizeInfo sizeInfo = new SizeInfo();
sizeInfo.setValue(Integer.toStr... |
python | def _make_paging_message(controls):
"""Turns a raw paging controls dict into Protobuf ClientPagingControls.
"""
return client_list_control_pb2.ClientPagingControls(
start=controls.get('start', None),
limit=controls.get('limit', None)) |
python | def _fetchAllChildren(self):
""" Adds a child item for each column
"""
childItems = []
for nr, elem in enumerate(self._sequence):
childItem = _createFromObject(elem, "elem-{}".format(nr), self.fileName)
childItem._iconColor = self.iconColor
childItems.... |
java | protected int getArtefactCount(String artefactType) {
ArtefactInfo info = getArtefactInfo(artefactType);
return info == null ? 0 : info.getClasses().length;
} |
python | def delete(cls, mp, part_number):
"""Get part number."""
return cls.query.filter_by(
upload_id=mp.upload_id,
part_number=part_number
).delete() |
python | def normalizeGlyphUnicodes(value):
"""
Normalizes glyph unicodes.
* **value** must be a ``list``.
* **value** items must normalize as glyph unicodes with
:func:`normalizeGlyphUnicode`.
* **value** must not repeat unicode values.
* Returned value will be a ``tuple`` of ints.
"""
if... |
java | public T setAudioSampleRate(int sample_rate) {
checkArgument(sample_rate > 0, "sample rate must be positive");
this.audio_enabled = true;
this.audio_sample_rate = sample_rate;
return getThis();
} |
python | def action(name, factory, label=None, desc=None):
"""
Annotate a model's action.
@param name: the name of the model's action.
@type name: str or unicode
@param factory: a factory to create actions.
@type factory: IActionFactory
@param label: the action label if specified.
@type label: st... |
java | protected static double change( EllipseRotated_F64 a , EllipseRotated_F64 b ) {
double total = 0;
total += Math.abs(a.center.x - b.center.x);
total += Math.abs(a.center.y - b.center.y);
total += Math.abs(a.a - b.a);
total += Math.abs(a.b - b.b);
// only care about the change of angle when it is not a circ... |
java | @Override
public Options getOptions() {
Options opts = super.getOptions();
opts.addOption(null, "name", true, "tenant name");
opts.addOption(null, "description", true, "tenant description");
opts.addOption(null, "enabled", false, "enabled");
return opts;
} |
java | private PostDocAssociates getPostDocAssociates(
OtherPersonnelDto otherPersonnel) {
PostDocAssociates postDocAssociates = PostDocAssociates.Factory
.newInstance();
if (otherPersonnel != null) {
postDocAssociates.setNumberOfPersonnel(otherPersonnel
... |
java | public static <C> ProgramTargetDescriptor of(C clusterId, JobID jobId, String webInterfaceUrl) {
String clusterIdString;
try {
// check if cluster id has a toString method
clusterId.getClass().getDeclaredMethod("toString");
clusterIdString = clusterId.toString();
} catch (NoSuchMethodException e) {
cl... |
python | def get_validation_fields(self):
'''get_validation_fields returns a list of tuples (each a field)
we only require the exp_id to coincide with the folder name, for the sake
of reproducibility (given that all are served from sample image or Github
organization). All other fields a... |
python | def _finish_pending_requests(self) -> None:
"""Process any requests that were completed by the last
call to multi.socket_action.
"""
while True:
num_q, ok_list, err_list = self._multi.info_read()
for curl in ok_list:
self._finish(curl)
... |
java | @SuppressWarnings("fallthrough")
public int read() throws IOException {
synchronized (lock) {
int c = super.read();
if (skipLF) {
if (c == '\n')
c = super.read();
skipLF = false;
}
switch (c) {
ca... |
python | def patch_namespaced_replica_set(self, name, namespace, body, **kwargs): # noqa: E501
"""patch_namespaced_replica_set # noqa: E501
partially update the specified ReplicaSet # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, ple... |
java | protected MkAppEntry createNewLeafEntry(DBID id, O object, double parentDistance) {
return new MkAppLeafEntry(id, parentDistance, null);
} |
java | public static PaxWicketInjector getInjector() {
String applicationName = Application.get().getApplicationKey();
PaxWicketInjector injector = null;
synchronized (instance.injectorMap) {
injector = instance.injectorMap.get(applicationName);
}
if (injector == null) {
... |
java | protected final PrCuOrSv<RS> lazyGetPrCuOrSv(final Map<String, Object> pAddParam) throws Exception {
String beanName = PrCuOrSv.class.getSimpleName();
@SuppressWarnings("unchecked")
PrCuOrSv<RS> proc = (PrCuOrSv<RS>) this.processorsMap.get(beanName);
if (proc == null) {
proc = new PrCuOrSv<RS>();
... |
python | def get_state_variable_from_storage(
self, address: str, params: Optional[List[str]] = None
) -> str:
"""
Get variables from the storage
:param address: The contract address
:param params: The list of parameters
param types: [position, length] or ["map... |
java | public void reinitialize(InputStream systemIn, PrintStream systemOut, PrintStream systemErr) throws IOException {
if (reader != null) {
reader.shutdown();
}
initialize(systemIn, systemOut, systemErr);
} |
java | public static Object getPrimitiveValue(String value, PrimitiveCategory primitiveCategory) {
if (value != null) {
try {
switch (primitiveCategory) {
case BOOLEAN:
return Boolean.valueOf(value);
case BYTE:
... |
java | public static SessionCommunicationException fromThrowable(String message, Throwable cause) {
return (cause instanceof SessionCommunicationException && Objects.equals(message, cause.getMessage()))
? (SessionCommunicationException) cause
: new SessionCommunicationException(messag... |
java | public static final EnhancementsParser createParser(HttpResponse response) throws EnhancementParserException, IOException {
String type = ContentType.getOrDefault(response.getEntity()).getMimeType();
OutputFormat format = OutputFormat.get(type);
switch (format) {
// case XML:
// case JSON:
////... |
java | @Override
public final List<String> invoke() {
final List<String> messages = new ArrayList<>();
logger.info("Invoke restore");
loader.reloadAll();
messages.add("Reloaded " + loader.details().size() + " datasets");
return messages;
} |
python | async def crawl(self, urls, sem):
"""
:param urls:
:type urls: list/dict
:param sem:
:type sem:
:return:
:rtype:
"""
tasks = [
self._sem_crawl(sem, x)
for x in urls
]
tasks_iter = asyncio.as_completed(tasks)... |
java | public ItemRevision getItemRevision(int itemId, int revisionId) {
return getResourceFactory().getApiResource(
"/item/" + itemId + "/revision/" + revisionId).get(
ItemRevision.class);
} |
python | def no_retry_on_failure(handler):
"""
AWS Lambda retries scheduled lambdas that don't execute succesfully.
This detects this by storing requests IDs in memory and exiting early on
duplicates. Since this is in memory, don't use it on very frequently
scheduled lambdas. It logs a critical message then... |
python | def _process_raw_report(self, raw_report):
"Default raw input report data handler"
if not self.is_opened():
return
if not self.__evt_handlers and not self.__raw_handler:
return
if not raw_report[0] and \
(raw_report[0] not in self.__input... |
java | public UploadResult uploadFile(String path, String fileType)
throws APIConnectionException, APIRequestException {
Preconditions.checkArgument(null != path, "filename is necessary");
Preconditions.checkArgument(fileType.equals("image") || fileType.equals("file") || fileType.equals("voice"), "... |
java | public com.google.api.ads.admanager.axis.v201811.LineItemType getLineItemType() {
return lineItemType;
} |
java | public void checkLocksInDataBase(boolean autoRepair)
{
SecurityHelper.validateSecurityPermission(JCRRuntimePermissions.MANAGE_REPOSITORY_PERMISSION);
ResultSet resultSet = null;
PreparedStatement preparedStatement = null;
Connection jdbcConnection = null;
try
{
... |
java | private String replaceOptionals(String contents) {
if (!replaceOptionals) {
return contents;
}
try {
final Pattern pattern = Pattern.compile("@\\{(.[^}]*)\\}");
final Collection<String> columns = getColumnNames();
columns.add("row.rowNumber");
... |
python | def get_subreddit(self, subreddit_name, *args, **kwargs):
"""Return a Subreddit object for the subreddit_name specified.
The additional parameters are passed directly into the
:class:`.Subreddit` constructor.
"""
sr_name_lower = subreddit_name.lower()
if sr_name_lower =... |
python | def validate(self):
"""Validate that the TernaryConditional is correctly representable."""
if not isinstance(self.predicate, Expression):
raise TypeError(u'Expected Expression predicate, got: {} {}'.format(
type(self.predicate).__name__, self.predicate))
if not isinst... |
python | def network_delete(auth=None, **kwargs):
'''
Delete a network
name_or_id
Name or ID of the network being deleted
CLI Example:
.. code-block:: bash
salt '*' neutronng.network_delete name_or_id=network1
salt '*' neutronng.network_delete name_or_id=1dcac318a83b4610b7a7f7ba01... |
java | public static <T> T executeIn(URL[] urls, Callable<T> callable) throws Exception
{
ClassLoader savedClassLoader = Thread.currentThread().getContextClassLoader();
URLClassLoader newClassLoader = null;
try
{
newClassLoader = new URLClassLoader(urls, savedClassLoader);
return e... |
python | def render(pass_info, saltenv='base', sls='', argline='', **kwargs):
'''
Fetch secret from pass based on pass_path
'''
try:
_get_pass_exec()
except SaltRenderError:
raise
# Make sure environment variable HOME is set, since Pass looks for the
# password-store under ~/.passwor... |
java | private Attributes createAttributes(String[][] parameters)
{
AttributesImpl attributes = new AttributesImpl();
if (parameters != null && parameters.length > 0) {
for (String[] entry : parameters) {
attributes.addAttribute(null, null, entry[0], null, entry[1]);
... |
python | def _score(estimator, X_test, y_test, scorer):
"""Compute the score of an estimator on a given test set."""
if y_test is None:
score = scorer(estimator, X_test)
else:
score = scorer(estimator, X_test, y_test)
if not isinstance(score, numbers.Number):
raise ValueError("scoring mus... |
python | def _proxy(self):
"""
Generate an instance context for the instance, the context is capable of
performing various actions. All instance actions are proxied to the context
:returns: PayloadContext for this PayloadInstance
:rtype: twilio.rest.api.v2010.account.recording.add_on_re... |
java | public static byte[] vleEncodeLong(final long value) {
if (Byte.MIN_VALUE <= value && value <= Byte.MAX_VALUE) {
return new byte[] { (byte) value };
} else if (Short.MIN_VALUE <= value && value <= Short.MAX_VALUE) {
return Bytes.fromShort((short) value);
} else if (Integer.MIN_VALUE <= value && ... |
python | def prepare_dir(app, directory, delete=False):
"""Create apidoc dir, delete contents if delete is True.
:param app: the sphinx app
:type app: :class:`sphinx.application.Sphinx`
:param directory: the apidoc directory. you can use relative paths here
:type directory: str
:param delete: if True, d... |
java | public static boolean copyFile(File source, File dest) {
// if(!source.renameTo(new File(dest,source.getName()))) {
// return false;
// } else {
// return true;
// }
try {
FileInputStream in = new FileInputStream(source);
FileOutputStream out = new FileOutputStream(dest);
try {
FileCh... |
python | def Nsurfs_ads_in_slab(self):
"""
Returns the TOTAL number of adsorbed surfaces in the slab
"""
struct = self.structure
weights = [s.species.weight for s in struct]
center_of_mass = np.average(struct.frac_coords,
weights=weights, axis=... |
java | @Override
public boolean exceedsRateLimitPerFrequency(Task task) {
int rateLimitPerFrequency = task.getRateLimitPerFrequency();
int rateLimitFrequencyInSeconds = task.getRateLimitFrequencyInSeconds();
if (rateLimitPerFrequency <= 0 || rateLimitFrequencyInSeconds <=0) {
logger.debug("Rate limit not applied to ... |
java | @Override
public Date purgeObject(Context context,
String pid,
String logMessage) throws ServerException {
return mgmt.purgeObject(context, pid, logMessage);
} |
java | private static BinaryMemcacheRequest handleTouchRequest(final ChannelHandlerContext ctx, final TouchRequest msg) {
ByteBuf extras = ctx.alloc().buffer();
extras.writeInt(msg.expiry());
byte[] key = msg.keyBytes();
short keyLength = (short) key.length;
byte extrasLength = (byte) ... |
java | public static String getScopedStreamName(String scope, String streamName) {
return getScopedStreamNameInternal(scope, streamName).toString();
} |
python | def find_branches(self, labels=False, unique=False):
"""Recursively constructs a list of pointers of the tree's structure
Args:
labels (bool): If True, returned lists consist of node labels.
If False (default), lists consist of node
poin... |
python | def clean(amount):
"""
Converts a number to a number with decimal point.
:param str amount: The input number.
:rtype: str
"""
# Return empty input immediately.
if not amount:
return amount
if re.search(r'[\. ][0-9]{3},[0-9]{1,2}$', amount):
... |
python | def validate_read_preference_tags(name, value):
"""Parse readPreferenceTags if passed as a client kwarg.
"""
if not isinstance(value, list):
value = [value]
tag_sets = []
for tag_set in value:
if tag_set == '':
tag_sets.append({})
continue
try:
... |
python | def _fmadm_action_fmri(action, fmri):
'''
Internal function for fmadm.repqired, fmadm.replaced, fmadm.flush
'''
ret = {}
fmadm = _check_fmadm()
cmd = '{cmd} {action} {fmri}'.format(
cmd=fmadm,
action=action,
fmri=fmri
)
res = __salt__['cmd.run_all'](cmd)
retco... |
java | public static List<String> getTenantNames(TenantService tenantService) throws ProfileException {
List<Tenant> tenants = tenantService.getAllTenants();
List<String> tenantNames = new ArrayList<>(tenants.size());
if (CollectionUtils.isNotEmpty(tenants)) {
for (Tenant tenant : tenants)... |
python | def confidence_level(self):
"""
Based on the variant's Z-Score, returns a human-readable string that
describes the confidence with which we can say the results are
statistically significant.
"""
z = self.z_score
if isinstance(z, string_types):
return z... |
python | def _get_stddevs(self, C, stddev_types, stddev_shape):
"""
Returns the standard deviations given in Table 2
"""
stddevs = []
for stddev_type in stddev_types:
assert stddev_type in self.DEFINED_FOR_STANDARD_DEVIATION_TYPES
if stddev_type == const.StdDev.TOT... |
python | def delete(self, query_id=None, **kwargs): # pragma: no cover
"""Delete a query job.
Uses the DELETE HTTP method to delete a query job. After calling
this endpoint, it is an error to poll for query results using
the queryId specified here.
Args:
query_id (str): Spe... |
python | def _init_metadata(self):
"""stub"""
SimpleDifficultyItemFormRecord._init_metadata(self)
SourceItemFormRecord._init_metadata(self)
PDFPreviewFormRecord._init_metadata(self)
PublishedFormRecord._init_metadata(self)
ProvenanceFormRecord._init_metadata(self)
super(Me... |
java | @Override
public boolean containsKey(final Object arg0)
{
eagerlyLoadDataCollection();
final Map dataMap = (Map) dataCollection;
boolean result = false;
if (dataMap != null && !(dataMap instanceof ProxyMap) && !dataMap.isEmpty())
{
result = dataMap.containsK... |
python | def call():
"""Execute command line helper."""
args = get_arguments()
if args.debug:
log_level = logging.DEBUG
elif args.quiet:
log_level = logging.WARN
else:
log_level = logging.INFO
setup_logging(log_level)
lupusec = None
if not args.username or not args.pas... |
python | def nl_msg_in_handler_debug(msg, arg):
"""https://github.com/thom311/libnl/blob/libnl3_2_25/lib/handlers.c#L114."""
ofd = arg or _LOGGER.debug
ofd('-- Debug: Received Message:')
nl_msg_dump(msg, ofd)
return NL_OK |
java | public static void main(String[] args) throws Exception {
if (args.length != 9) {
System.out.println("java -cp " + RuntimeConstants.ALLUXIO_JAR
+ " alluxio.examples.Performance "
+ "<MasterIp> <FileNamePrefix> <WriteBlockSizeInBytes> <BlocksPerFile> "
+ "<DebugMode:true/false> <T... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.