language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
python | def mount_http_adapter(self, protocol=None, max_retries=None,
status_forcelist=None, host=None):
"""Mount an HTTP adapter to the
:class:`ArchiveSession <ArchiveSession>` object.
:type protocol: str
:param protocol: HTTP protocol to mount your adapter to (e.g. ... |
python | def cli(env):
"""Summary info about tickets."""
mask = ('openTicketCount, closedTicketCount, '
'openBillingTicketCount, openOtherTicketCount, '
'openSalesTicketCount, openSupportTicketCount, '
'openAccountingTicketCount')
account = env.client['Account'].getObject(mask=ma... |
java | @Override
public void setTrafficClass(int trafficClass) {
try {
channel.socket().setTrafficClass(trafficClass);
} catch (SocketException e) {
throw new RuntimeIoException(e);
}
} |
java | @NonNull
public EmailIntentBuilder cc(@NonNull String cc) {
checkEmail(cc);
this.cc.add(cc);
return this;
} |
java | public WrappedByteBuffer put(byte[] v, int offset, int length) {
_autoExpand(length);
for (int i = 0; i < length; i++) {
_buf.put(v[offset + i]);
}
return this;
} |
python | def poll_for_server_running(job_id):
"""
Poll for the job to start running and post the SERVER_READY_TAG.
"""
sys.stdout.write('Waiting for server in {0} to initialize ...'.format(job_id))
sys.stdout.flush()
desc = dxpy.describe(job_id)
# Keep checking until the server has begun or it has fa... |
java | public void parameterizeChannel(Channel channel) {
if (this.ordering != null) {
channel.setLocalStrategy(LocalStrategy.SORT, this.ordering.getInvolvedIndexes(), this.ordering.getFieldSortDirections());
} else if (this.groupedFields != null) {
boolean[] dirs = new boolean[this.groupedFields.size()];
Arrays.... |
java | public com.google.appengine.v1.ScriptHandlerOrBuilder getScriptOrBuilder() {
if (handlerTypeCase_ == 3) {
return (com.google.appengine.v1.ScriptHandler) handlerType_;
}
return com.google.appengine.v1.ScriptHandler.getDefaultInstance();
} |
python | def strip_tashkeel(text):
"""Strip vowels from a text, include Shadda.
The striped marks are :
- FATHA, DAMMA, KASRA
- SUKUN
- SHADDA
- FATHATAN, DAMMATAN, KASRATAN, , , .
@param text: arabic text.
@type text: unicode.
@return: return a striped text.
@rty... |
java | public void marshall(AuthenticationResultType authenticationResultType, ProtocolMarshaller protocolMarshaller) {
if (authenticationResultType == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(authent... |
java | public void deletePersistentAttributes() {
if (persistenceAdapter == null) {
throw new IllegalStateException("Attempting to delete persistence attributes without a configured persistence adapter");
}
if (persistenceAttributesSet) {
persistenceAdapter.deleteAttributes(requ... |
python | def _is_catalysis(bpe):
"""Return True if the element is Catalysis."""
if isinstance(bpe, _bp('Catalysis')) or \
isinstance(bpe, _bpimpl('Catalysis')):
return True
else:
return False |
java | public TRMFacade getTRMFacade()
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.entry(tc, "getTRMFacade", this);
// Instantiate DA manager to interface to WLM
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
SibTr.exit(tc, "getTRMFacade",_trmFacade);
... |
java | @Override
protected void initializeImpl(Map<String,String> configuration)
{
//create configuration holder
ConfigurationHolder configurationHolder=new ConfigurationHolderImpl(configuration);
this.fileContentParameter=configurationHolder.getConfigurationValue(HTTPRequestParserConfiguratio... |
python | def runExperiment(args):
"""
Run experiment. What did you think this does?
args is a dict representing the parameters. We do it this way to support
multiprocessing. args contains one or more of the following keys:
@param featureNoise (float) Noise level to add to the features
d... |
java | public void connectionReleased(IManagedConnectionEvent<C> event) {
IPhynixxManagedConnection<C> proxy = event.getManagedConnection();
if (!proxy.hasCoreConnection()) {
return;
} else {
this.releaseConnection(proxy);
}
if (LOG.isDebugEnabled()) {
... |
java | public Tuple3<ReadOnlyStyledDocument<PS, SEG, S>, RichTextChange<PS, SEG, S>, MaterializedListModification<Paragraph<PS, SEG, S>>> replace(
int from, int to, ReadOnlyStyledDocument<PS, SEG, S> replacement) {
return replace(from, to, x -> replacement);
} |
python | def _set_cngn_mon_del_pkt(self, v, load=False):
"""
Setter method for cngn_mon_del_pkt, mapped from YANG variable /tm_state/cngn_mon_del_pkt (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_cngn_mon_del_pkt is considered as a private
method. Backends looki... |
java | public static void writeHeader(Writer writer, int dpi, String rankDir, String id, List<String> attribLines) throws IOException {
// Default settings
if (attribLines == null) {
attribLines = new ArrayList<>();
} else {
attribLines = new ArrayList<>(attribLines);
}
... |
java | public void marshall(AlgorithmStatusItem algorithmStatusItem, ProtocolMarshaller protocolMarshaller) {
if (algorithmStatusItem == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(algorithmStatusItem.ge... |
java | private void ensureCapacity(final int index, final int length)
{
if (index < 0)
{
throw new IndexOutOfBoundsException("index cannot be negative: index=" + index);
}
final long resultingPosition = index + (long)length;
final int currentArrayLength = byteArray.leng... |
java | public Nfs3MkdirResponse sendMkdir(NfsMkdirRequest request) throws IOException {
Nfs3MkdirResponse response = new Nfs3MkdirResponse();
_rpcWrapper.callRpcNaked(request, response);
return response;
} |
python | def _get(self, route, stream=False):
"""
run a get request against an url. Returns the response which can optionally be streamed
"""
log.debug("Running GET request against %s" % route)
return r.get(self._url(route), auth=c.auth, stream=stream) |
java | public void merge(String parity, String source, String codecId, int[] checksums)
throws IOException {
if(FSNamesystem.LOG.isDebugEnabled()) {
FSNamesystem.LOG.debug("merge " + parity + " to " + source);
}
if (isInSafeMode()) {
throw new SafeModeException("merge: cannot merge " + parity + " ... |
python | def removeSubscriber(self, email):
"""Remove a subscriber from this workitem
If the subscriber has not been added, no more actions will be
performed.
:param email: the subscriber's email
"""
headers, raw_data = self._perform_subscribe()
missing_flag, raw_data =... |
java | public Map<X500Principal, SigningPolicy> parse(Reader reader)
throws SigningPolicyException {
Map<X500Principal, SigningPolicy> policies = new HashMap<X500Principal, SigningPolicy>();
BufferedReader bufferedReader = new BufferedReader(reader);
try {
String line;
... |
java | public static boolean isTodoItem(final Document todoItemDoc) {
return todoItemDoc.containsKey(ID_KEY)
&& todoItemDoc.containsKey(TASK_KEY)
&& todoItemDoc.containsKey(CHECKED_KEY);
} |
python | def _get_md_files(self):
"""Get all markdown files."""
all_f = _all_files_matching_ext(os.getcwd(), "md")
exclusions = [
"*.egg/*",
"*.eggs/*",
"*build/*"
] + self.exclusions
return sorted([f for f in all_f if not _is_excluded(f, exclusions)]) |
java | @Override
public DefaultJsonWriter value( JavaScriptObject value ) {
if (value == null) {
return nullValue();
}
writeDeferredName();
beforeValue(false);
out.append(stringify( value ));
return this;
} |
java | protected void initialize() {
if (m_folderList != null) {
// ensure folders are sorted starting with parent folders
Collections.sort(m_folderList, I_CmsResource.COMPARE_ROOT_PATH);
}
if (m_fileList != null) {
// ensure files are sorted starting with files in... |
java | public static Geometry singleSideBuffer(Geometry geometry, double distance){
if(geometry==null){
return null;
}
return computeSingleSideBuffer(geometry, distance, new BufferParameters());
} |
python | def coords(self) -> Iterator[Tuple[float, float, float]]:
"""Iterates on longitudes, latitudes and altitudes.
"""
data = self.data[self.data.longitude.notnull()]
yield from zip(data["longitude"], data["latitude"], data["altitude"]) |
python | def get_venv(self, requirements=None, interpreter='', uuid='', options=None):
"""Find a venv that serves these requirements, if any."""
lines = self._read_cache()
return self._select(lines, requirements, interpreter, uuid=uuid, options=options) |
python | def tvd(x0, rho, gamma):
"""
Proximal operator for the total variation denoising penalty
Requires scikit-image be installed
Parameters
----------
x0 : array_like
The starting or initial point used in the proximal update step
rho : float
Momentum parameter for the proximal ... |
python | def _set_required_secrets(self, required_secrets, token_secrets):
"""
Sets required secrets
"""
if self.user_params.build_type.value == BUILD_TYPE_ORCHESTRATOR:
required_secrets += token_secrets
if not required_secrets:
return
secrets = self.temp... |
java | public static boolean isValueReference(String expression)
{
if (null != expression)
{
int start = expression.indexOf("#{");
if ((start >= 0) && (expression.indexOf('}', start + 1) >= 0))
{
return true;
}
}
return false;
} |
python | def easeInOutCubic(n):
"""A cubic tween function that accelerates, reaches the midpoint, and then decelerates.
Args:
n (float): The time progress, starting at 0.0 and ending at 1.0.
Returns:
(float) The line progress, starting at 0.0 and ending at 1.0. Suitable for passing to getPointOnLine().... |
java | public static boolean copyFile(final File source, final File destination)
throws IOException, FileIsADirectoryException
{
return copyFile(source, destination, true);
} |
python | def iterate_elements(parent):
"""
Helper function that iterates over child Nodes/Elements of parent Node/Element.
:param parent: object of Element class, representing parent element.
"""
element = parent.firstChild
while element is not None:
yield element
... |
python | def _init_helper(self, vars_):
"""Overwrite defaults (if they exist) with arguments passed to constructor"""
for k in vars_:
if k == 'kwargs':
for kwarg in vars_[k]:
setattr(self, kwarg, vars_[k][kwarg])
elif k != 'self':
setatt... |
java | @Programmatic // for use by fixtures
public SummernoteEditorToDoItem newToDo(
final String description,
final SummernoteEditorToDoItem.Category category,
final SummernoteEditorToDoItem.Subcategory subcategory,
final String userName,
final LocalDate dueBy,
... |
python | def list_more(fn, offset, size, batch_size, *args):
"""list all data using the fn
"""
if size < 0:
expected_total_size = six.MAXSIZE
else:
expected_total_size = size
batch_size = min(size, batch_size)
response = None
total_count_got = 0
while True:
ret = fn(*... |
java | public double getAccumulatedExecutionTimeCurrentThread(Device device) {
KernelProfile profile = KernelManager.instance().getProfile(getClass());
synchronized (profile) {
KernelDeviceProfile deviceProfile = profile.getDeviceProfile(device);
if (deviceProfile == null) {
return Double.NaN... |
python | def _compute(self, seed, gsim, num_events, imt):
"""
:param seed: a random seed or None if the seed is already set
:param gsim: a GSIM instance
:param num_events: the number of seismic events
:param imt: an IMT instance
:returns: (gmf(num_sites, num_events), stddev_inter(... |
python | def close(self):
"""
Cleans up resources and closes connection
:return:
"""
if self._closed:
return
self._closed = True
self.queue("close", None)
if not self._flushed.wait(timeout=self._max_flush_time):
raise ValueError("close timed... |
python | def _assemble_and_send_request(self):
"""
Fires off the Fedex request.
@warning: NEVER CALL THIS METHOD DIRECTLY. CALL send_request(),
WHICH RESIDES ON FedexBaseService AND IS INHERITED.
"""
# We get an exception like this when specifying an IntegratorId:
... |
java | @Override
public List<CommerceNotificationAttachment> findAll(int start, int end) {
return findAll(start, end, null);
} |
python | def Get(self, project_id):
"""Returns an existing emulator instance for the provided project_id.
If an emulator instance doesn't yet exist, it creates one.
Args:
project_id: project ID
Returns:
a DatastoreEmulator
"""
if project_id in self._emulators:
return self._emulators[... |
python | def print(self):
"""Print self."""
print(
'{dim}Identifier:{none} {cyan}{identifier}{none}\n'
'{dim}Name:{none} {name}\n'
'{dim}Description:{none}\n{description}'.format(
dim=Style.DIM,
cyan=Fore.CYAN,
none=Style.RESET_A... |
python | def getSQLQuery(self, count = False) :
"Returns the query without performing it. If count, the query returned will be a SELECT COUNT() instead of a SELECT"
sqlFilters = []
sqlValues = []
# print self.filters
for f in self.filters :
filt = []
for k, vv in f.iteritems() :
if type(vv) is types.ListType... |
java | public void activate() {
if (appender instanceof OptionHandler) {
((OptionHandler) appender).activateOptions();
if (LoggingLogger.ROOT_LOGGER.isDebugEnabled()) {
LoggingLogger.ROOT_LOGGER.debugf("Invoking OptionHandler.activateOptions() on appender %s (%s)", appender.getN... |
python | def clean_jobs(self, link, job_dict=None, clean_all=False):
""" Clean up all the jobs associated with this link.
Returns a `JobStatus` enum
"""
failed = False
if job_dict is None:
job_dict = link.jobs
for job_details in job_dict.values():
# clean... |
java | public static Predicate<InetAddress> ofCidr(InetAddress baseAddress, String subnetMask) {
requireNonNull(baseAddress, "baseAddress");
requireNonNull(subnetMask, "subnetMask");
checkArgument(NetUtil.isValidIpV4Address(subnetMask),
"subnetMask: %s (expected: an IPv4 address s... |
java | @SuppressWarnings("unchecked")
void fetchFromRepository(Collection<ProductDefinition> installDefinition) throws RepositoryException {
Collection<ResourceType> interestingTypes = new HashSet<ResourceType>();
interestingTypes.add(ResourceType.FEATURE);
interestingTypes.add(ResourceType.OPENSOU... |
java | public void combine(IntSummaryStatistics other) {
count += other.count;
sum += other.sum;
min = Math.min(min, other.min);
max = Math.max(max, other.max);
} |
python | def get_shelveset_work_items(self, shelveset_id):
"""GetShelvesetWorkItems.
Get work items associated with a shelveset.
:param str shelveset_id: Shelveset's unique ID
:rtype: [AssociatedWorkItem]
"""
query_parameters = {}
if shelveset_id is not None:
q... |
java | public static Token<EsTokenIdentifier> obtainToken(RestClient client, User user) {
EsToken esToken = obtainEsToken(client, user);
return EsTokenIdentifier.createTokenFrom(esToken);
} |
python | def config(self, charm_id, channel=None):
'''Get the config data for a charm.
@param charm_id The charm's id.
@param channel Optional channel name.
'''
url = '{}/{}/meta/charm-config'.format(self.url, _get_path(charm_id))
data = self._get(_add_channel(url, channel))
... |
python | def do_ctrlc(self, arg):
''' Ctrl-C sends a STOP command to the arm. '''
print('STOP')
if self.arm.is_connected():
self.arm.write('STOP') |
java | public int synthesis_blockin(Block vb){
// Shift out any PCM/multipliers that we returned previously
// centerW is currently the center of the last block added
if(centerW>vi.blocksizes[1]/2&&pcm_returned>8192){
// don't shift too much; we need to have a minimum PCM buffer of
// 1/2 long block
... |
python | def local_position_ned_encode(self, time_boot_ms, x, y, z, vx, vy, vz):
'''
The filtered local position (e.g. fused computer vision and
accelerometers). Coordinate frame is right-handed,
Z-axis down (aeronautical frame, NED / north-east-down
... |
java | public double process(Point2D_F64 a , Point2D_F64 b , Se3_F64 a_to_b ,
Point3D_F64 Xa )
{
PerspectiveOps.convertNormToPixel(intrinsicA,a.x,a.y,pixelN);
PerspectiveOps.convertNormToPixel(intrinsicA,Xa.x/Xa.z, Xa.y/Xa.z,pixelX);
double error = pixelN.distance2(pixelX);
a_to_b.transform(Xa,Xb);
Perspe... |
java | @PostConstruct
public void onInit() {
isExecutorAvailable = isExecutorOnClasspath();
if (identityProvider.isUnsatisfied()) {
setIdentityProvider(new EJBContextIdentityProvider(context));
} else {
setIdentityProvider(identityProvider.get());
}
setManagerFactory(new RuntimeManagerFactoryImpl());
... |
python | def _adjust_inferential_results_for_parameter_constraints(self,
constraints):
"""
Ensure that parameters that were constrained during estimation do not
have any values showed for inferential results. After all, no inference
wa... |
python | def guess_segments_lines(segments, lines, nearline_tolerance=5.0):
"""
given segments, outputs a array of line numbers, or -1 if it
doesn't belong to any
"""
ys = segments[:, 1]
closeness = numpy.abs(numpy.subtract.outer(ys, lines)) # each row a y, each collumn a distance to each line
line_... |
java | public DatabaseMetaData filterDataBaseMetaData(JdbcTemplate jdbcTemplate, Connection con,
DatabaseMetaData databaseMetaData) throws Exception {
return databaseMetaData;
} |
java | private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
// read values
in.defaultReadObject();
OutputStream output = getOutputStream();
if (cachedContent != null) {
output.write(cachedContent);
}
output.close();
cac... |
python | def ListOf(cls, **kwargs):
"""A property that is a list of `cls`."""
def _list_load(value):
return [cls.load(d) for d in value]
return Property(types=list, load=_list_load, default=list, **kwargs) |
java | public void columns(int numOfColumns) {
int columns = checkColumns(numOfColumns, 0, 0);
String reason = NO_ELEMENT_FOUND;
if (columns < 0 && getElement().is().present()) {
reason = "Element not table";
}
assertTrue(reason, columns >= 0);
assertEquals("Number o... |
python | def exists(name, attributes):
'''
Make sure the given attributes exist on the file/directory
name
The path to the file/directory
attributes
The attributes that should exist on the file/directory, this is accepted as
an array, with key and value split with an equals sign, if you... |
python | def get_service_instance_from_managed_object(mo_ref, name='<unnamed>'):
'''
Retrieves the service instance from a managed object.
me_ref
Reference to a managed object (of type vim.ManagedEntity).
name
Name of managed object. This field is optional.
'''
if not name:
name... |
java | private String escapeToken(String token) {
String newToken = (String) escMap.get(token);
if (newToken == null)
return token;
return newToken;
} |
python | def post_soup(self, *args, **kwargs):
"""
Shortcut for ``post`` which returns a ``BeautifulSoup`` element
"""
return BeautifulSoup(self.post(*args, **kwargs).text) |
java | public EClass getGSFLW() {
if (gsflwEClass == null) {
gsflwEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(475);
}
return gsflwEClass;
} |
java | public void removeDuplicateRules() {
int prod1, prod2;
int[] tmp1, tmp2;
for (prod1 = getProductionCount() - 1; prod1 >= 0; prod1--) {
tmp1 = getProduction(prod1);
for (prod2 = prod1 - 1; prod2 >= 0; prod2--) {
tmp2 = getProduction(prod2);
... |
python | def simple_vertex_array(self, program, buffer, *attributes,
index_buffer=None, index_element_size=4) -> 'VertexArray':
'''
Create a :py:class:`VertexArray` object.
Args:
program (Program): The program used when rendering.
buffe... |
java | public static void frustumM(float[] m, int offset,
float left, float right, float bottom, float top,
float near, float far) {
if (left == right) {
throw new IllegalArgumentException("left == right");
}
if (top == bottom) {
throw new IllegalA... |
python | def recordbatch(self, auth, resource, entries, defer=False):
""" Records a list of historical entries to the resource specified.
Calls a function that bulids a request that writes a list of historical entries to the
specified resource.
Args:
auth: Takes the device cik
... |
java | public static Collection<Info> getPendingCollaborations(BoxAPIConnection api) {
URL url = PENDING_COLLABORATIONS_URL.build(api.getBaseURL());
BoxAPIRequest request = new BoxAPIRequest(api, url, "GET");
BoxJSONResponse response = (BoxJSONResponse) request.send();
JsonObject responseJSON ... |
python | def proxy_callback_allowed(service, pgturl):
"""Check if a given proxy callback is allowed for the given service identifier."""
if hasattr(settings, 'MAMA_CAS_SERVICES'):
return _is_allowed('proxy_callback_allowed', service, pgturl)
return _is_valid_service_url(service) |
python | def connect(self, index):
"""Connect signals needed for dependency updates.
Pre- and post-delete signals have to be handled separately, as:
* in the pre-delete signal we have the information which
objects to rebuild, but affected relations are still
presented, so rebu... |
java | public final <T> ConfigurationModule setMultiple(final Param<T> opt, final Iterable<String> values) {
ConfigurationModule c = deepCopy();
for (final String val : values) {
c = c.set(opt, val);
}
return c;
} |
python | def retry(default=None):
"""Retry functions after failures"""
def decorator(func):
"""Retry decorator"""
@functools.wraps(func)
def _wrapper(*args, **kw):
for pos in range(1, MAX_RETRIES):
try:
return func(*args, **kw)
exc... |
python | def decrypt_seal(self, data: bytes) -> bytes:
"""
Decrypt bytes data with a curve25519 version of the ed25519 key pair
:param data: Encrypted data
:return:
"""
curve25519_public_key = libnacl.crypto_sign_ed25519_pk_to_curve25519(self.vk)
curve25519_secret_key = ... |
python | def intersects_segment(self, other):
"""
Returns True if the intersection of self and the segment
other is not the null set, otherwise returns False. The
algorithm is O(log n). Requires the list to be coalesced.
"""
i = _bisect_left(self, other)
return ((i != 0) and (other[0] < self[i-1][1])) or ((i != ... |
java | public static void extract(InputStream is, File outputFolder) throws IOException {
ZipInputStream zis = new ZipInputStream(is);
ZipEntry entry;
byte[] buffer = new byte[1024];
while ((entry = zis.getNextEntry()) != null) {
File outputFile = new File(outputFolder.getCanonical... |
java | @Override
@SuppressWarnings("ReferenceEquality")
protected boolean evaluateDependencies(final Dependency dependency, final Dependency nextDependency, final Set<Dependency> dependenciesToRemove) {
Dependency main;
//CSOFF: InnerAssignment
if ((main = getMainGemspecDependency(dependency, n... |
java | public Version getBaseVersion() throws UnsupportedRepositoryOperationException, RepositoryException
{
checkValid();
if (!this.isNodeType(Constants.MIX_VERSIONABLE))
{
throw new UnsupportedRepositoryOperationException("Node is not versionable " + getPath());
}
PropertyData bvP... |
java | void processAMDModules(Iterable<CompilerInput> inputs) {
for (CompilerInput input : inputs) {
input.setCompiler(this);
Node root = checkNotNull(input.getAstRoot(this));
new TransformAMDToCJSModule(this).process(null, root);
}
} |
java | private StructuredProxyPushSupplier getStructuredProxyPushSupplier(String channelName)
throws DevFailed {
StructuredProxyPushSupplier structuredProxyPushSupplier =
StructuredProxyPushSupplierHelper.narrow(proxySupplier);
if (structuredProxyPushSupplier == null) {
... |
java | @Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case AfplibPackage.BNG__PGRP_NAME:
return PGRP_NAME_EDEFAULT == null ? pGrpName != null : !PGRP_NAME_EDEFAULT.equals(pGrpName);
case AfplibPackage.BNG__TRIPLETS:
return triplets != null && !triplets.isEmpty();
}
return super.eIsS... |
python | def get_iter(self, path):
"""
:param path: the :obj:`Gtk.TreePath`-struct
:type path: :obj:`Gtk.TreePath`
:raises: :class:`ValueError` if `path` doesn't exist
:returns: a :obj:`Gtk.TreeIter`
:rtype: :obj:`Gtk.TreeIter`
Returns an iterator pointing to `path`. If ... |
java | public LexiconEntryInfo replaceCategory(CcgCategory newCategory) {
return new LexiconEntryInfo(newCategory, lexiconTrigger, lexiconIndex, spanStart, spanEnd,
triggerSpanStart, triggerSpanEnd);
} |
python | def erase_display(self, method=EraseMethod.ALL_MOVE):
""" Clear the screen or part of the screen.
Arguments:
method: One of these possible values:
EraseMethod.END or 0:
Clear from cursor to the end of the screen.
... |
python | def read_byte(self, addr):
"""Read a single byte from static memory area (blocks 0-14).
"""
if addr < 0 or addr > 127:
raise ValueError("invalid byte address")
log.debug("read byte at address {0} ({0:02X}h)".format(addr))
cmd = "\x01" + chr(addr) + "\x00" + self.uid
... |
python | def intent(self, intent):
''' Decorator to register intent handler'''
def _handler(func):
self._handlers['IntentRequest'][intent] = func
return func
return _handler |
java | @Override
public void configureMachine( TargetHandlerParameters parameters, String machineId )
throws TargetException {
this.logger.fine( "Configuring machine '" + machineId + "': nothing to configure." );
} |
java | public static LogEntry of(String logName, MonitoredResource resource, Payload<?> payload) {
return newBuilder(payload).setLogName(logName).setResource(resource).build();
} |
python | def hpimpute(self, data: ['SASdata', str] = None,
code: str = None,
freq: str = None,
id: str = None,
impute: str = None,
input: [str, list, dict] = None,
performance: str = None,
procopts: str = None,... |
java | public java.util.List<java.util.List<TagFilter>> getOnPremisesTagSetList() {
if (onPremisesTagSetList == null) {
onPremisesTagSetList = new com.amazonaws.internal.SdkInternalList<java.util.List<TagFilter>>();
}
return onPremisesTagSetList;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.