language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def show(ctx, component):
"""Show the stored, active configuration of a component."""
col = ctx.obj['col']
if col.count({'name': component}) > 1:
log('More than one component configuration of this name! Try '
'one of the uuids as argument. Get a list with "config '
'list"')... |
java | public List<EventSubscriptionInner> listRegionalBySubscriptionForTopicType(String location, String topicTypeName) {
return listRegionalBySubscriptionForTopicTypeWithServiceResponseAsync(location, topicTypeName).toBlocking().single().body();
} |
python | def _get_config_instance(group_or_term, session, **kwargs):
""" Finds appropriate config instance and returns it.
Args:
group_or_term (Group or Term):
session (Sqlalchemy session):
kwargs (dict): kwargs to pass to get_or_create.
Returns:
tuple of (Config, bool):
"""
... |
java | public static Expectations jwtCookieExists(String testAction, WebClient webClient, String jwtCookieName) {
Expectations expectations = new Expectations();
expectations.addExpectation(new CookieExpectation(testAction, webClient, jwtCookieName, JwtFatConstants.JWT_REGEX, JwtFatConstants.NOT_SECURE, JwtFat... |
python | def center_crop(im, min_sz=None):
""" Return a center crop of an image """
r,c,*_ = im.shape
if min_sz is None: min_sz = min(r,c)
start_r = math.ceil((r-min_sz)/2)
start_c = math.ceil((c-min_sz)/2)
return crop(im, start_r, start_c, min_sz) |
java | public int[] getChildIndexes(int index) {
if (index == 0) {
if (isConstant()) {
return new int[0];
} else {
int[] result = new int[subexpressions.size()];
int startIndex = 1;
for (int i = 0; i < subexpressions.size(); i++) {
result[i] = startIndex;
sta... |
python | def send_all_waypoints(self):
'''send all waypoints to vehicle'''
self.master.waypoint_clear_all_send()
if self.wploader.count() == 0:
return
self.loading_waypoints = True
self.loading_waypoint_lasttime = time.time()
self.master.waypoint_count_send(self.wpload... |
java | public alluxio.grpc.CancelPOptions getOptions() {
return options_ == null ? alluxio.grpc.CancelPOptions.getDefaultInstance() : options_;
} |
python | def _download_project(self, activity, project, temp_directory, path_filter):
"""
Download the project with project_name to temp_directory.
:param activity: CopyActivity: info about the copy activity are downloading for
:param project: remotestore.RemoteProject project to download
... |
java | private int beatOffset(int beatNumber) {
if (beatCount == 0) {
throw new IllegalStateException("There are no beats in this beat grid.");
}
if (beatNumber < 1 || beatNumber > beatCount) {
throw new IndexOutOfBoundsException("beatNumber (" + beatNumber + ") must be between ... |
java | public Search search(String partitionKey, String searchIndexId) {
return new Search(client, this, partitionKey, searchIndexId);
} |
java | protected void addEnumList(String key, List<? extends Enum> list) {
optionsMap.put(key, list.stream().map(i -> i.toString()).collect(Collectors.toList()));
} |
java | public static FirmwareVersionInfo getWatchFWVersion(final Context context) {
Cursor c = null;
try {
c = queryProvider(context);
if (c == null || !c.moveToNext()) {
return null;
}
int majorVersion = c.getInt(KIT_STATE_COLUMN_VERSION_MAJOR);
int minorVersion = c.getInt(KIT_STATE_... |
python | def set_dimmer(self, dimmer):
"""Set final dimmer value for task."""
command = {
ATTR_START_ACTION: {
ATTR_DEVICE_STATE: self.state,
ROOT_START_ACTION: [{
ATTR_ID: self.raw[ATTR_ID],
ATTR_LIGHT_DIMMER: di... |
java | public Deserializer getDeserializer(Class cl)
throws HessianProtocolException
{
if (ObjectName.class.equals(cl)) {
return new StringValueDeserializer(cl);
}
else if (ObjectInstance.class.equals(cl)) {
return new ObjectInstanceDeserializer();
}
... |
java | private void addActivationHandler() {
if (m_activationHandlerRegistration == null) {
m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {
public void onMouseDown(MouseDownEvent event) {
// only act on click if not inside the but... |
java | public static int getPageCount(int size, int pageSize, int page) {
int totalPage = size / pageSize;
if (size > pageSize * totalPage) {
totalPage += 1;
}
return totalPage;
} |
python | def _split_ns_by_scatter(cls,
shard_count,
namespace,
raw_entity_kind,
filters,
app):
"""Split a namespace by scatter index into key_range.KeyRange.
TODO(user): Power this with... |
java | public final void ruleXNumberLiteral() throws RecognitionException {
int stackSize = keepStackSize();
try {
// InternalXbase.g:1346:2: ( ( ( rule__XNumberLiteral__Group__0 ) ) )
// InternalXbase.g:1347:2: ( ( rule__XNumberLiteral__Group__0 ) )
{
... |
java | public static RecoveryDirector recoveryDirector() throws InternalLogException
{
if (tc.isEntryEnabled())
Tr.entry(tc, "recoveryDirector");
// If the recovery director is null its an error in JET
if (_recoveryDirector == null)
{
final InternalLogException ile ... |
java | public Type asSuper(Type t, Symbol sym) {
/* Some examples:
*
* (Enum<E>, Comparable) => Comparable<E>
* (c.s.s.d.AttributeTree.ValueKind, Enum) => Enum<c.s.s.d.AttributeTree.ValueKind>
* (c.s.s.t.ExpressionTree, c.s.s.t.Tree) => c.s.s.t.Tree
* (j.u.List<capture#160 ... |
java | public WriteResult<T, K> updateById(K id, DBUpdate.Builder update) throws MongoException {
return this.update(createIdQuery(id), update.serialiseAndGet(objectMapper));
} |
java | public void setLogFileSize(long newSize)
throws ObjectManagerException
{
if (Tracing.isAnyTracingEnabled() && trace.isEntryEnabled())
trace.entry(this, cclass
, "seLogFileSize"
);
objectManagerState.logOutput.setLog... |
java | public Matrix4x3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) {
return rotateTowards(dirX, dirY, dirZ, upX, upY, upZ, this);
} |
java | private void writeHeader(ESRIBounds box, ShapeElementType type, Collection<? extends E> elements) throws IOException {
if (!this.headerWasWritten) {
initializeContentBuffer();
box.ensureMinMax();
//Byte 0 : File Code (9994)
writeBEInt(SHAPE_FILE_CODE);
//Byte 4 : Unused (0)
writeBEInt(0);
//Byt... |
python | def ResolveForCreate(self, document):
"""Resolves the collection for creating the document based on the partition key.
:param dict document:
The document to be created.
:return:
Collection Self link or Name based link which should handle the Create operation.
:r... |
java | public ResultList<MovieBasic> getFavoriteMovies(String sessionId, int accountId) throws MovieDbException {
return tmdbAccount.getFavoriteMovies(sessionId, accountId);
} |
java | public static Job createSubmittableJob(Configuration conf, String[] args)
throws IOException {
conf.setIfUnset("hbase.client.connection.impl",
BigtableConfiguration.getConnectionClass().getName());
conf.setIfUnset(BigtableOptionsFactory.BIGTABLE_RPC_TIMEOUT_MS_KEY, "60000");
TableName tableName = T... |
java | public LabInner update(String resourceGroupName, String labAccountName, String labName, LabFragment lab) {
return updateWithServiceResponseAsync(resourceGroupName, labAccountName, labName, lab).toBlocking().single().body();
} |
java | public static long decodeLong(byte[] src, int srcOffset)
throws CorruptEncodingException
{
try {
return
(((long)(((src[srcOffset ] ) << 24) |
((src[srcOffset + 1] & 0xff) << 16) |
((src[srcOffset + 2] & 0xf... |
java | public TextObject append(Reader reader) throws IOException {
char[] buf = new char[1024];
while (reader.ready() && (maxTextLength==0 || stringBuilder.length()<maxTextLength)) {
int length = reader.read(buf);
append(String.valueOf(buf, 0, length));
}
return this;
... |
python | def remove_brackets(name):
"""Removes brackets form input
:param name: path to fix
:return: inputs with no brackets
"""
name = re.sub(
r"([(\[]).*?([)\]])",
r"\g<1>\g<2>",
name
) # remove anything in between brackets
brackets = "()[]{}" # list of brackets
for b... |
java | public Observable<ServiceResponse<SubscriptionMediaServiceInner>> getBySubscriptionWithServiceResponseAsync(String accountName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
}
... |
java | @XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "operationParameterGroupRef")
public JAXBElement<OperationParameterRefType> createOperationParameterGroupRef(OperationParameterRefType value) {
return new JAXBElement<OperationParameterRefType>(_OperationParameterGroupRef_QNAME, OperationParam... |
java | private synchronized void updateRecordsWrittenMeter() {
if (this.recordsWrittenMeter.isPresent()) {
this.recordsWrittenMeter.get().mark(recordsWritten() - this.recordsWrittenMeter.get().getCount());
}
} |
python | def generate_method_deprecation_message(to_be_removed_in_version, old_method_name, method_name=None, module_name=None):
"""Generate a message to be used when warning about the use of deprecated methods.
:param to_be_removed_in_version: Version of this module the deprecated method will be removed in.
:type ... |
java | public Version<Attributes<T>> getOrCreateVersion()
{
List<Node> nodeList = childNode.get("version");
if (nodeList != null && nodeList.size() > 0)
{
return new VersionImpl<Attributes<T>>(this, "version", childNode, nodeList.get(0));
}
return createVersion();
} |
python | def _load_recursive(self, shape, gen):
"""Recursively create a multidimensional array (as lists of lists)
from a bit generator.
"""
if len(shape) > 0:
ans = []
for i in range(shape[0]):
ans.append(self._load_recursive(shape[1:], gen))
else:... |
python | def io_size_kb(prev, curr, counters):
""" calculate the io size based on bandwidth and throughput
formula: average_io_size = bandwidth / throughput
:param prev: prev resource, not used
:param curr: current resource
:param counters: two stats, bandwidth in MB and throughput count
:return: value,... |
python | def mousePress(self, button):
""" Send a mouse click at the last set position
button: int: [1-n]
"""
log.debug('mousePress %s', button)
buttons = self.buttons | (1 << (button - 1))
self.mouseDown(button)
self.mouseUp(button)
return self |
java | protected double sqDist(double[] v1, double[] v2) {
assert (v1.length == v2.length) : "Lengths do not agree: " + v1.length + " " + v2.length;
double sum = 0;
for(int i = 0; i < v1.length; i++) {
final double diff = v1[i] - v2[i];
sum += diff * diff;
}
++projectedDistances;
return sum... |
java | public ApiSuccessResponse switchToBargeIn(String id, MonitoringScopeData monitoringScopeData) throws ApiException {
ApiResponse<ApiSuccessResponse> resp = switchToBargeInWithHttpInfo(id, monitoringScopeData);
return resp.getData();
} |
java | @Override
public SubmitContainerStateChangeResult submitContainerStateChange(SubmitContainerStateChangeRequest request) {
request = beforeClientExecution(request);
return executeSubmitContainerStateChange(request);
} |
python | def get_times_from_cli(cli_token):
"""Convert a CLI token to a datetime tuple.
Argument:
cli_token (str): an isoformat datetime token ([ISO date]:[ISO date])
or a special value among:
* thisday
* thisweek
* thismonth
* thisyear... |
python | def symmetrically_add_atom(self, specie, point, coords_are_cartesian=False):
"""
Class method for adding a site at a specified point in a slab.
Will add the corresponding site on the other side of the
slab to maintain equivalent surfaces.
Arg:
specie (str): ... |
python | def install_mesos_single_box_mode(distribution):
""" install mesos (all of it) on a single node"""
if 'ubuntu' in distribution:
log_green('adding mesosphere apt-key')
apt_add_key(keyid='E56151BF')
os = lsb_release()
apt_string = 'deb http://repos.mesosphere.io/%s %s main' % (
... |
python | def set_display_label(self, display_label):
"""Seta a display label.
arg: display_label (string): the new display label
raise: InvalidArgument - ``display_label`` is invalid
raise: NoAccess - ``display_label`` cannot be modified
raise: NullArgument - ``display_label`` is `... |
java | private ProtoNetwork failProteinFamilies(final ProtoNetwork pn,
final StringBuilder bldr, String pfLocation, String errorMessage) {
bldr.append("PROTEIN FAMILY RESOLUTION FAILURE in ");
bldr.append(pfLocation);
bldr.append("\n\treason: ");
bldr.append(errorMessage);
s... |
java | public void marshall(DeregisterManagedInstanceRequest deregisterManagedInstanceRequest, ProtocolMarshaller protocolMarshaller) {
if (deregisterManagedInstanceRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMar... |
python | def prior_predictive_to_xarray(self):
"""Convert prior_predictive samples to xarray."""
data = self.prior_predictive
if not isinstance(data, dict):
raise TypeError("DictConverter.prior_predictive is not a dictionary")
return dict_to_dataset(data, library=None, coords=self.co... |
python | def lease(self, ttl=DEFAULT_TIMEOUT):
"""Create a Lease object given a timeout
:param ttl: timeout
:return: Lease object
"""
result = self.post(self.get_url("/lease/grant"),
json={"TTL": ttl, "ID": 0})
return Lease(int(result['ID']), client=sel... |
java | public static Set<AtlasResourceTypes> getAtlasResourceType(String contextPath) {
Set<AtlasResourceTypes> resourceTypes = new HashSet<>();
if (isDebugEnabled) {
LOG.debug("==> getAtlasResourceType for {}", contextPath);
}
String api = getApi(contextPath);
if (api.star... |
python | def get_share_acl(self, share_name, timeout=None):
'''
Gets the permissions for the specified share.
:param str share_name:
Name of existing share.
:param int timeout:
The timeout parameter is expressed in seconds.
:return: A dictionary of access policies... |
java | public Serializer registerClassLoader(String className, ClassLoader classLoader) {
classLoaders.put(className, classLoader);
return this;
} |
python | def cleanup_lines( lines, **kwargs ):
''' Cleans up annotation after syntactic pre-processing and processing:
-- Removes embedded clause boundaries "<{>" and "<}>";
-- Removes CLBC markings from analysis;
-- Removes additional information between < and > from analysis;
-- Removes add... |
java | public static void destroyAll() {
for (Map.Entry<ServerConfig, ProtocolConfig> entry : SERVER_MAP.entrySet()) {
entry.getValue().destory();
}
try {
ProtocolConfig.destroyAll();
} catch (Exception e) {
// NOPMD
}
} |
python | def WriteCronJobRun(self, run_object, cursor=None):
"""Stores a cron job run object in the database."""
query = ("INSERT INTO cron_job_runs "
"(job_id, run_id, write_time, run) "
"VALUES (%s, %s, FROM_UNIXTIME(%s), %s) "
"ON DUPLICATE KEY UPDATE "
"run=VALUES(... |
python | def get_identifier(self):
"""
For methods this is the return type, the name and the (non-pretty)
argument descriptor. For fields it is simply the name.
The return-type of methods is attached to the identifier when
it is a bridge method, which can technically allow two methods
... |
python | def resolve(tor_endpoint, hostname):
"""
This is easier to use via :meth:`txtorcon.Tor.dns_resolve`
:param tor_endpoint: the Tor SOCKS endpoint to use.
:param hostname: the hostname to look up.
"""
if six.PY2 and isinstance(hostname, str):
hostname = unicode(hostname) # noqa
elif ... |
java | public static EntityGetOperation<LocatorInfo> get(String locatorId) {
return new DefaultGetOperation<LocatorInfo>(ENTITY_SET, locatorId,
LocatorInfo.class);
} |
java | protected void definingClass( String className ) {
String baseName = Name.suffix(className,1);
int i = baseName.indexOf("$");
if ( i != -1 )
baseName = baseName.substring(i+1);
String cur = definingClassesBaseNames.get( baseName );
if ( cur != null )
throw... |
java | public String getSmallIconPath(CmsObject cms, CmsUser user) {
return getIconPath(cms, user, IconSize.Small);
} |
java | public synchronized void deleteShareRequests(Destination destination) {
SQLiteDatabase db = null;
try {
db = getWritableDatabase();
int recordsDeleted = db.delete(ShareRequestTable.NAME, WHERE_CLAUSE_BY_DESTINATION,
new String[]{String.valueOf(destination.get... |
java | public EClass getIfcFurnishingElement() {
if (ifcFurnishingElementEClass == null) {
ifcFurnishingElementEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI)
.getEClassifiers().get(259);
}
return ifcFurnishingElementEClass;
} |
java | private String getPart(int pos) {
String value = this.getValue();
if (value == null) {
return null;
}
String[] parts = value.split("/");
return parts.length >= pos + 1 ? parts[pos] : null;
} |
java | @Override
protected void shutDown()
throws Exception {
this.scheduledExecutorPool.shutdown();
this.scheduledExecutorPool.awaitTermination(TERMINATION_TIMEOUT, TimeUnit.SECONDS);
this.jobStatusMonitor.shutDown();
} |
python | def fixed_width_binning(data=None, bin_width: Union[float, int] = 1, *, range=None, includes_right_edge=False, **kwargs) -> FixedWidthBinning:
"""Construct fixed-width binning schema.
Parameters
----------
bin_width: float
range: Optional[tuple]
(min, max)
align: Optional[float]
... |
python | def validate_variable_type(var_name, var_type, value):
"""Ensures the value is the correct variable type.
Args:
var_name (str): The name of the defined variable on a blueprint.
var_type (type): The type that the value should be.
value (obj): The object representing the value provided fo... |
java | public static void getNestedConcats(StringBuilder stb, ImmutableTerm term1, ImmutableTerm term2) {
if (term1 instanceof ImmutableFunctionalTerm) {
ImmutableFunctionalTerm f = (ImmutableFunctionalTerm) term1;
getNestedConcats(stb, f.getTerms().get(0), f.getTerms().get(1));
} else ... |
java | public static String simplifyMolecularFormula(String formula) {
String newFormula = formula;
char thisChar;
if (formula.contains(" ")) {
newFormula = newFormula.replace(" ", "");
}
if (!formula.contains(".")) return breakExtractor(formula);
List<String> list... |
python | def ChangePassword(self, password_old, password_new):
"""
Change the password used to protect the private key.
Args:
password_old (str): the current password used to encrypt the private key.
password_new (str): the new to be used password to encrypt the private key.
... |
java | public static void setLookAtM(float[] rm, int rmOffset,
float eyeX, float eyeY, float eyeZ,
float centerX, float centerY, float centerZ, float upX, float upY,
float upZ) {
// See the OpenGL GLUT documentation for gluLookAt for a description
// of the algorithm.... |
java | public Properties parsePropertiesString(String propertiesAsString) {
final Properties p = new Properties();
try (StringReader reader = new StringReader(propertiesAsString)) {
p.load(reader);
} catch (IOException e) {
throw new IllegalArgumentException("Unable to pars... |
java | private static <V, R extends Serializable> Accumulator<V, R> mergeSingle(Accumulator<?, ?> target,
Accumulator<?, ?> toMerge) {
@SuppressWarnings("unchecked")
Accumulator<V, R> typedTarget = (Accumulator<V, R>) target;
@SuppressWarnings("unchecked")
Accumulator<V, R> typedToMerge = (Accumul... |
python | def fan_speed(self, value):
"""Verifies the value is between 1 and 9 inclusively."""
if value not in range(1, 10):
raise exceptions.RoasterValueError
self._fan_speed.value = value |
java | public Collection<Deployment> findByName(String name)
{
Collection<Deployment> result = new ArrayList<Deployment>();
for (Deployment d : deployments)
{
if (d.getName() != null && d.getName().equals(name))
result.add(d);
}
return Collections.unmodifiableCollection(re... |
python | def _run_vardict_caller(align_bams, items, ref_file, assoc_files,
region=None, out_file=None):
"""Detect SNPs and indels with VarDict.
var2vcf_valid uses -A flag which reports all alleles and improves sensitivity:
https://github.com/AstraZeneca-NGS/VarDict/issues/35#issuecomment-2... |
java | public void insert(final String argin) {
final String[] values = new String[1];
values[0] = argin;
attrval.r_dim.dim_x = 1;
attrval.r_dim.dim_y = 0;
DevVarStringArrayHelper.insert(attrval.value, values);
} |
java | public static ClassLoadInfo classLoadManager() {
ClassLoadingMXBean classLoadingMXBean = ManagementFactory.getClassLoadingMXBean();
int nowLoadedClassCount = classLoadingMXBean.getLoadedClassCount();
long totalLoadedClassCount = classLoadingMXBean.getTotalLoadedClassCount();
long unloade... |
python | def send_request(self, request):
"""
Handles the Blocks option in a outgoing request.
:type request: Request
:param request: the outgoing request
:return: the edited request
"""
assert isinstance(request, Request)
if request.block1 or (request.payload is ... |
java | public static PdfPTable newPdfPTable(int numColumns, List<String> headerNames)
{
PdfPTable table = new PdfPTable(numColumns);
headerNames.stream().forEach(columnHeaderName -> {
PdfPCell header = new PdfPCell();
header.setBackgroundColor(BaseColor.LIGHT_GRAY);
header.setBorderWidth(2);
header.setPhrase(... |
java | public AwsSecurityFindingFilters withRelatedFindingsId(StringFilter... relatedFindingsId) {
if (this.relatedFindingsId == null) {
setRelatedFindingsId(new java.util.ArrayList<StringFilter>(relatedFindingsId.length));
}
for (StringFilter ele : relatedFindingsId) {
this.rel... |
java | @XmlElementDecl(namespace = "", name = "log")
public JAXBElement<LogType> createLog(LogType value) {
return new JAXBElement<>(_Log_QNAME, LogType.class, null, value);
} |
java | public Protein getCauses_protein(int i) {
if (Event_Type.featOkTst && ((Event_Type)jcasType).casFeat_causes_protein == null)
jcasType.jcas.throwFeatMissing("causes_protein", "ch.epfl.bbp.uima.genia.Event");
jcasType.jcas.checkArrayBounds(jcasType.ll_cas.ll_getRefValue(addr, ((Event_Type)jcasType).casFeatC... |
python | def _localize_df(schema_fields, df):
"""Localize any TIMESTAMP columns to tz-aware type.
In pandas versions before 0.24.0, DatetimeTZDtype cannot be used as the
dtype in Series/DataFrame construction, so localize those columns after
the DataFrame is constructed.
"""
for field in schema_fields:
... |
java | public void addDependency(Area main, Area dependent) {
List<Area> set = areasDependency.get(main);
if (set == null) {
set = new ArrayList<Area>();
areasDependency.put(main, set);
}
set.add(dependent);
} |
java | @Override
public GeometryColumns createFeatureTableWithMetadata(
GeometryColumns geometryColumns, BoundingBox boundingBox, long srsId) {
return createFeatureTableWithMetadata(geometryColumns, null, null,
boundingBox, srsId);
} |
java | @Override
public void shutdown(ShutdownModeAmp mode)
{
// jamp/3210
//getReadMailbox().close();
try {
getServiceRefOut().shutdown(mode);
} catch (Throwable e) {
log.log(Level.FINER, e.toString(), e);
}
for (ServiceRefAmp service : _linkServiceMap.values()) {
service.sh... |
python | def list_x(self, key=None):
"""
:param key: Which of key to return from "cid", "type", and "extention"
:return: A list of x 'key'
"""
if key in ("cid", "type"):
return sorted(set(operator.methodcaller(key)(p)
for p in self._processors.val... |
python | def calc_datastore(request, job_id):
"""
Download a full datastore file.
:param request:
`django.http.HttpRequest` object.
:param job_id:
The id of the requested datastore
:returns:
A `django.http.HttpResponse` containing the content
of the requested artifact, if pre... |
java | public static void makeDraggable (HasAllMouseHandlers dragHandle, PopupPanel target)
{
DragHandler dragger = new DragHandler(target);
dragHandle.addMouseDownHandler(dragger);
dragHandle.addMouseUpHandler(dragger);
dragHandle.addMouseMoveHandler(dragger);
} |
java | public static List<String> get(BeanFactory beanFactory) {
try {
return beanFactory.getBean(BEAN, BasePackages.class).get();
}
catch (NoSuchBeanDefinitionException ex) {
throw new IllegalStateException(
"Unable to retrieve @EnableAutoConfiguration base packages");
}
} |
python | def with_args(self, **kwargs):
"""Send these keyword-arguments to the phase when called."""
# Make a copy so we can have multiple of the same phase with different args
# in the same test.
new_info = mutablerecords.CopyRecord(self)
new_info.options = new_info.options.format_strings(**kwargs)
new_... |
python | def top_result(self):
"""Return top `blastn` result
Try to find a 100% identity and coverage result (perfect match).
If one does not exist, then retrieve the result with the highest bitscore.
Returns:
Ordered dict of BLASTN results or None if no BLASTN results generated
... |
python | def set_name(self, name, create_dir=False):
"""
Sets the name of the file to be saved.
@params
name - the name to the file
increment - whether or not to increment the filename if there is an existing file ie test.txt => test1.txt
overwrite - whether or not to... |
python | def get_result(self):
"""
Returns resulting catalogue
@rtype: MessageCatalogue
"""
for domain in self.domains:
if domain not in self.messages:
self._process_domain(domain)
return self.result |
java | public boolean writerObtained() {
if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE)) //306998.15
logger.logp(Level.FINE, CLASS_NAME,"writerObtained"," " + String.valueOf(_gotWriter),"["+this+"]");
return _gotWriter;
} |
java | public JaversType getJaversType(Type javaType) {
argumentIsNotNull(javaType);
if (javaType == Object.class) {
return OBJECT_TYPE;
}
return engine.computeIfAbsent(javaType, j -> typeFactory.infer(j, findPrototype(j)));
} |
java | private Connector findSipConnector(String ipAddress, int port,
String transport) {
Connector connectorToRemove = null;
for (Connector connector : connectors) {
final ProtocolHandler protocolHandler = connector.getProtocolHandler();
if(protocolHandler instanceof SipProtocolHandler) {
final SipProtocolHa... |
python | def _MakeMethodDescriptor(self, method_proto, service_name, package, scope,
index):
"""Creates a method descriptor from a MethodDescriptorProto.
Args:
method_proto: The proto describing the method.
service_name: The name of the containing service.
package: Optional... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.