language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | @Override
public TransactionalSharedLuceneLock obtainLock(Directory dir, String lockName) throws IOException {
if (!(dir instanceof DirectoryLucene)) {
throw new UnsupportedOperationException("TransactionalSharedLuceneLock can only be used with DirectoryLucene, got: " + dir);
}
DirectoryLu... |
java | public boolean createJob(String slurmScript, String heronExec,
String[] commandArgs, String topologyWorkingDirectory,
long containers) {
return createJob(slurmScript, heronExec, commandArgs,
topologyWorkingDirectory, containers, null);
} |
java | @SuppressWarnings("SimplifiableIfStatement")
@RestrictTo(RestrictTo.Scope.LIBRARY)
public boolean propagateToChildren(String key, int depth) {
if ("__container".equals(key)) {
return true;
}
return depth < keys.size() - 1 || keys.get(depth).equals("**");
} |
java | public Filter getQueueFilter(PermissionManager permissionManager) {
if (permissionManager.hasPermission(FixedPermissions.TECHSUPPORT) || permissionManager.hasPermission(FixedPermissions.ADMIN)) {
return null;
}
Set<String> visibleQueues = getVisibleQueues(permissionManager);
Filter filters[] = new Filter[vis... |
java | public void runSyncOnNewThread(Thread newThread) {
lock.writeLock().lock();
try {
if (this.timeoutTask == null) {
throw new IllegalStateException(Tr.formatMessage(tc, "internal.error.CWMFT4999E"));
}
stop();
this.stopped = false;
... |
python | def layer(output_shape=None, new_parameters=None):
"""Create a layer class from a function."""
def layer_decorator(call):
"""Decorating the call function."""
def output_shape_fun(self, input_shape):
if output_shape is None:
return input_shape
kwargs = self._init_kwargs # pylint: disable... |
python | def parse(self, valstr):
# type: (bytes) -> bool
'''
A method to parse an El Torito Boot Catalog out of a string.
Parameters:
valstr - The string to parse the El Torito Boot Catalog out of.
Returns:
Nothing.
'''
if self._initialized:
... |
python | def format_output(self, rendered_widgets):
"""
Render the ``icekit_events/recurrence_rule_widget/format_output.html``
template with the following context:
preset
A choice field for preset recurrence rules.
natural
An input field for natura... |
java | private static boolean isOutFile(final File filePathName, final File inputMap) {
final File relativePath = FileUtils.getRelativePath(inputMap.getAbsoluteFile(), filePathName.getAbsoluteFile());
return !(relativePath.getPath().length() == 0 || !relativePath.getPath().startsWith(".."));
} |
python | def bestseqs(self,thresh=None):
"""
m.bestseqs(,thresh=None) -- Return all k-mers that match motif with a score >= thresh
"""
if not thresh:
if self._bestseqs:
return self._bestseqs
if not thresh: thresh = 0.8 * self.maxscore
self._bestseqs = ... |
python | def filter(self, *args, **kwargs):
"""
Works just like the default Manager's :func:`filter` method, but
you can pass an additional keyword argument named ``path`` specifying
the full **path of the folder whose immediate child objects** you
want to retrieve, e.g. ``"path/to/folder... |
java | public static Double getDouble(String propertyName) {
return NumberUtil.toDoubleObject(System.getProperty(propertyName), null);
} |
java | public static void configureSARLProject(IProject project, boolean addNatures,
boolean configureJavaNature, boolean createFolders, IProgressMonitor monitor) {
try {
final SubMonitor subMonitor = SubMonitor.convert(monitor, 11);
// Add Natures
final IStatus status = Status.OK_STATUS;
if (addNatures) {
... |
java | public List<Step<JobXMLDescriptor>> getAllStep()
{
List<Step<JobXMLDescriptor>> list = new ArrayList<Step<JobXMLDescriptor>>();
List<Node> nodeList = model.get("step");
for(Node node: nodeList)
{
Step<JobXMLDescriptor> type = new StepImpl<JobXMLDescriptor>(this, "step", model, node)... |
python | def get_value_from_set(self, key):
"""
Get a value from previously reserved value set.
"""
#TODO: This should be done locally.
# We do not really need to call centralised server if the set is already
# reserved as the data there is immutable during execution
key ... |
java | public static int getPropertyValueEnum(int property, CharSequence valueAlias) {
int propEnum = UPropertyAliases.INSTANCE.getPropertyValueEnum(property, valueAlias);
if (propEnum == UProperty.UNDEFINED) {
throw new IllegalIcuArgumentException("Invalid name: " + valueAlias);
}
... |
python | def get(self, name, interval, **kwargs):
'''
Get the set of values for a named timeseries and interval. If timestamp
supplied, will fetch data for the period of time in which that timestamp
would have fallen, else returns data for "now". If the timeseries
resolution was not defined, then returns a s... |
python | def minimum_needs_unit(field, feature, parent):
"""Retrieve units of the given minimum needs field name.
For instance:
* minimum_needs_unit('minimum_needs__clean_water') -> 'l/weekly'
"""
_ = feature, parent # NOQA
field_definition = definition(field, 'field_name')
if field_definition:
... |
java | private boolean isBareS3NBucketWithoutTrailingSlash(String s) {
String s2 = s.toLowerCase();
Matcher m = Pattern.compile("s3n://[^/]*").matcher(s2);
return m.matches();
} |
java | public static <T> T read(Class<T> clazz, Object id) {
return execute(new ReadEntityTransaction<T>(clazz, id));
} |
java | public static Boolean isNotSet(String value) {
return null == value || value.isEmpty() || value.trim().length() == 0;
} |
python | def _name_to_index(self, channels):
"""
Return the channel indices for the specified channel names.
Integers contained in `channel` are returned unmodified, if they
are within the range of ``self.channels``.
Parameters
----------
channels : int or str or list of... |
java | private N overflowTreatment(N node, IndexTreePath<E> path) {
if(settings.getOverflowTreatment().handleOverflow(this, node, path)) {
return null;
}
return split(node);
} |
python | def for_category(self, category, live_only=False):
"""
Returns queryset of EntryTag instances for specified category.
:param category: the Category instance.
:param live_only: flag to include only "live" entries.
:rtype: django.db.models.query.QuerySet.
"""
filte... |
python | def __write_record(self, record_type, data):
"""Write single physical record."""
length = len(data)
crc = crc32c.crc_update(crc32c.CRC_INIT, [record_type])
crc = crc32c.crc_update(crc, data)
crc = crc32c.crc_finalize(crc)
self.__writer.write(
struct.pack(_HEADER_FORMAT, _mask_crc(crc),... |
python | def run(self):
"""
Run the plugin.
This plugin extracts the operator manifest files from an image, saves
them as a zip archive, and returns its path
:return: str, path to operator manifests zip file
"""
if not self.should_run():
return
manif... |
python | def namedb_row_factory( cursor, row ):
"""
Row factor to enforce some additional types:
* force 'revoked' to be a bool
"""
d = {}
for idx, col in enumerate( cursor.description ):
if col[0] in ['revoked', 'locked', 'receive_whitelisted']:
if row[idx] == 0:
d[co... |
python | def resume_follow(self, index, body=None, params=None):
"""
`<https://www.elastic.co/guide/en/elasticsearch/reference/current/ccr-post-resume-follow.html>`_
:arg index: The name of the follow index to resume following.
:arg body: The name of the leader index and other optional ccr relat... |
java | private void appendValue(StringBuilder builder, Class fieldClazz, Object value)
{
if (fieldClazz != null
&& value != null
&& (fieldClazz.isAssignableFrom(String.class) || fieldClazz.isAssignableFrom(char.class)
|| fieldClazz.isAssignableFrom(Character... |
python | def run_score(self):
"""
Run checks on self.files, printing raw percentage to stdout.
"""
diffs = 0
lines = 0
for file in self.files:
try:
results = self._check(file)
except Error as e:
termcolor.cprint(e.msg, "yell... |
python | def find_field_generator_templates(obj):
"""
Return dictionary with the names and instances of
all tohu.BaseGenerator occurring in the given
object's class & instance namespaces.
"""
cls_dict = obj.__class__.__dict__
obj_dict = obj.__dict__
#debug_print_dict(cls_dict, 'cls_dict')
#d... |
python | def load_data_source(local_path,
remote_source_list,
open_method,
open_method_kwargs=dict(),
remote_kwargs=dict(),
verbose=True):
'''Flexible data retreiver to download and cache the data files locally.
Usage example (this makes a local... |
python | def _parseNetDirectory(self, rva, size, magic = consts.PE32):
"""
Parses the NET directory.
@see: U{http://www.ntcore.com/files/dotnetformat.htm}
@type rva: int
@param rva: The RVA where the NET directory starts.
@type size: int
@param size: The... |
python | def set_client_info(cls, client_id, client_ver):
"""
.. py:function:: set_client_info(cls, client_id, client_ver)
设置调用api的客户端信息, 非必调接口
:param client_id: str, 客户端标识
:param client_ver: int, 客户端版本号
:return: None
:example:
.. code:: python
from ... |
python | def get_as_datetime(self, key):
"""
Converts map element into a Date or returns the current date if conversion is not possible.
:param key: an index of element to get.
:return: Date value ot the element or the current date if conversion is not supported.
"""
value = sel... |
java | @Nonnull
public static List<TimerTask> unwraps(@Nullable Collection<? extends TimerTask> tasks) {
if (null == tasks) return Collections.emptyList();
List<TimerTask> copy = new ArrayList<TimerTask>();
for (TimerTask task : tasks) {
if (!(task instanceof TtlTimerTask)) copy.add(ta... |
java | public byte[] requestMFPSchemata(byte[] schemaData)
throws SIConnectionLostException,
SIConnectionDroppedException,
SIConnectionUnavailableException,
SIErrorException
{
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "requestMFPSchemata");... |
java | public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl)
throws TransformerException
{
Enumeration decls = nsSupport.getDeclaredPrefixes();
while (decls.hasMoreElements())
{
String prefix = (String) decls.nextElement();
if (null == m_declaredPrefixes)
m_... |
python | def _watch_folder(folder, destination, compiler_args):
"""Compares "modified" timestamps against the "compiled" dict, calls compiler
if necessary."""
for dirpath, dirnames, filenames in os.walk(folder):
for filename in filenames:
# Ignore filenames starting with ".#" for Emacs compatibil... |
python | def initialize(self):
"""Instantiates the cache area to be ready for updates"""
self.Base.metadata.create_all(self.session.bind)
logger.debug("initialized sqlalchemy orm tables") |
python | def into_view(self):
"""Converts the index into a view"""
try:
return View._from_ptr(rustcall(
_lib.lsm_index_into_view,
self._get_ptr()))
finally:
self._ptr = None |
java | public static Attr[] toAttrArray(Document doc, Object o) throws PageException {
// Node[]
if (o instanceof Node[]) {
Node[] nodes = (Node[]) o;
if (_isAllOfSameType(nodes, Node.ATTRIBUTE_NODE)) return (Attr[]) nodes;
Attr[] attres = new Attr[nodes.length];
for (int i = 0; i < nodes.length; i++) {... |
python | def get_ratefactor(self, base, code):
"""
Return the Decimal currency exchange rate factor of 'code' compared to 1 'base' unit, or RuntimeError
Yahoo currently uses USD as base currency, but here we detect it with get_baserate
"""
raise RuntimeError("%s Deprecated: API withdrawn ... |
python | def change_parent(sender, instance, **kwargs):
"""
When the given flashcard has changed. Look at term and context and change
the corresponding item relation.
"""
if instance.id is None:
return
if len({'term', 'term_id'} & set(instance.changed_fields)) != 0:
diff = instance.diff
... |
python | def signature(self, name, file_name, file_type, file_text, **kwargs):
"""Add Signature data to Batch object.
Valid file_types:
+ Snort ®
+ Suricata
+ YARA
+ ClamAV ®
+ OpenIOC
+ CybOX ™
+ Bro
+ Regex
+ SPL - Splunk ® Search Process... |
java | public static void setInt(MemorySegment[] segments, int offset, int value) {
if (inFirstSegment(segments, offset, 4)) {
segments[0].putInt(offset, value);
} else {
setIntMultiSegments(segments, offset, value);
}
} |
java | public final <K> Date parse(K value) {
if (value == null) {
return null;
}
try {
if (value instanceof Date) {
Date date = (Date) value;
if (date.getTime() == Long.MAX_VALUE || date.getTime() == Long.MIN_VALUE) {
return... |
java | public static <T> BigInteger sumOfBigInteger(Iterable<T> iterable, Function<? super T, BigInteger> function)
{
if (iterable instanceof List)
{
return ListIterate.sumOfBigInteger((List<T>) iterable, function);
}
if (iterable != null)
{
return IterableIt... |
java | @Override
public void init(CollectorManager collectorMgr) {
try {
this.collectorMgr = collectorMgr;
this.collectorMgr.subscribe(this, sourceIds);
} catch (Exception e) {
}
} |
python | def get_prepared_include_exclude(attributes):
"""Return tuple with prepared __include__ and __exclude__ attributes.
:type attributes: dict
:rtype: tuple
"""
attrs = dict()
for attr in ('__include__', '__exclude__'):
attrs[attr] = tuple([item.name for item in
... |
java | private void completeMultipart(String bucketName, String objectName, String uploadId, Part[] parts)
throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException,
InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
Int... |
python | def seq_seqhash(seq, normalize=True):
"""returns 24-byte Truncated Digest sequence `seq`
>>> seq_seqhash("")
'z4PhNX7vuL3xVChQ1m2AB9Yg5AULVxXc'
>>> seq_seqhash("ACGT")
'aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2'
>>> seq_seqhash("acgt")
'aKF498dAxcJAqme6QYQ7EZ07-fiw8Kw2'
>>> seq_seqhash("acgt"... |
python | def _grains():
'''
Get the grains from the proxied device
'''
(username, password) = _find_credentials()
r = salt.modules.dracr.system_info(host=__pillar__['proxy']['host'],
admin_username=username,
admin_password=password... |
java | public static <K, V> V createIfAbsentUnchecked(final ConcurrentMap<K, V> map,
final K key, final ConcurrentInitializer<V> init) {
try {
return createIfAbsent(map, key, init);
} catch (final ConcurrentException cex) {
throw new ConcurrentRuntimeException(cex.getCause()... |
java | private void evictMap(SampleableConcurrentHashMap<?, ?> map, int triggeringEvictionSize, int afterEvictionSize) {
map.purgeStaleEntries();
int mapSize = map.size();
if (mapSize - triggeringEvictionSize >= 0) {
for (SampleableConcurrentHashMap.SamplingEntry entry : map.getRandomSample... |
python | def once(ctx, name):
"""Run kibitzr checks once and exit"""
from kibitzr.app import Application
app = Application()
sys.exit(app.run(once=True, log_level=ctx.obj['log_level'], names=name)) |
java | public static int checkEncodedDataLengthInChars(String data, int[] mainTable, int[] extentionTable) {
if (data == null)
return 0;
if (mainTable == null)
return 0;
int cnt = 0;
for (int i1 = 0; i1 < data.length(); i1++) {
char c = data.charAt(i1);
... |
java | private String removePrefix(String key) {
if (key.startsWith(PREFIX_TYPE)) {
return key.substring(PREFIX_TYPE.length());
}
return key;
} |
java | @TargetApi(Build.VERSION_CODES.FROYO)
public static File getExternalFilesDirForDownloads(Context context) {
return context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
} |
java | @Override
public EClass getObjectAdded() {
if (objectAddedEClass == null) {
objectAddedEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(37);
}
return objectAddedEClass;
} |
python | def getPutData(request):
"""Adds raw post to the PUT and DELETE querydicts on the request so they behave like post
:param request: Request object to add PUT/DELETE to
:type request: Request
"""
dataDict = {}
data = request.body
for n in urlparse.parse_qsl(data):
dataDict[n[0]] = n[... |
python | def command(self, ns, raw, **kw):
""" Executes command.
{ "op" : "c",
"ns" : "testdb.$cmd",
"o" : { "drop" : "fs.files"}
}
"""
try:
dbname = raw['ns'].split('.', 1)[0]
self.dest[dbname].command(raw['o'], check=True)
... |
python | def convert_boxed_text_elements(self):
"""
Textual material that is part of the body of text but outside the
flow of the narrative text, for example, a sidebar, marginalia, text
insert (whether enclosed in a box or not), caution, tip, note box, etc.
<boxed-text> elements for PLo... |
java | public void activate(InetAddress host, int port, Collection<String> nonProxyHosts) {
for (String scheme : new String[] {"http", "https"}) {
String currentProxyHost = System.getProperty(scheme + ".proxyHost");
String currentProxyPort = System.getProperty(scheme + ".proxyPort");
... |
java | private void visitFrameAfterMethodReturnCallback() {
if (!visitFramesAfterCallbacks)
return;
Type returnType = getReturnTypeForTrace();
if (!Type.VOID_TYPE.equals(getReturnTypeForTrace()) && !isConstructor()) {
Object typeDescriptor = null;
switch (returnType... |
python | def complex_filter(self, filter_obj):
"""
Returns a new QuerySet instance with filter_obj added to the filters.
filter_obj can be a Q object (or anything with an add_to_query()
method) or a dictionary of keyword lookup arguments.
This exists to support framework features such a... |
python | def reader(self):
"""
Reads raw text from the connection stream.
Ensures proper exception handling.
:return bytes: request
"""
request_stream = ''
with self.connect() as request:
if request.msg != 'OK':
raise HTTPError
requ... |
python | def remove_old_dumps(connection, container: str, days=None):
"""Remove dumps older than x days
"""
if not days:
return
if days < 20:
LOG.error('A minimum of 20 backups is stored')
return
options = return_file_objects(connection, container)
for dt, o_info in options:
... |
java | private UsernamePasswordCredentials getCreds(String url) throws Exception {
url = normalizeURL(url);
url = url.substring(url.indexOf("/") + 2);
UsernamePasswordCredentials longestMatch = null;
int longestMatchLength = 0;
Iterator<String> iter = m_creds.keySet().iterator();
... |
java | public static <T1, T2, T3, R> BiFunction<T1, T2, R> compose(Function<T3, R> unary, BiFunction<T1, T2, T3> binary) {
dbc.precondition(unary != null, "cannot compose a null unary function");
dbc.precondition(binary != null, "cannot compose a null binary function");
return binary.andThen(unary);
... |
java | public static CompressionMetadata create(String dataFilePath)
{
Descriptor desc = Descriptor.fromFilename(dataFilePath);
return new CompressionMetadata(desc.filenameFor(Component.COMPRESSION_INFO), new File(dataFilePath).length(), desc.version.hasPostCompressionAdlerChecksums);
} |
python | def create_resource(self, parent_id=""):
"""Create the specified resource.
Args:
parent_id (str): The resource ID of the parent resource in API Gateway
"""
resource_name = self.trigger_settings.get('resource', '')
resource_name = resource_name.replace('/', '')
... |
java | @Override
protected void onValidation(final String contactNode, final String defaultPort)
{
if (contactNode != null)
{
// allow configuration as comma-separated list of host:port
// addresses without the default port
boolean allAddressesHaveHostAndPort = true;... |
java | public static Map<?, ?> parseJson(String body) {
JSONReader jr = new JSONValidatingReader();
Object obj = jr.read(body);
if (obj instanceof Map<?, ?>) {
return (Map<?, ?>) obj;
} else {
return null;
}
} |
python | def close(self, virtual_account_id, data={}, **kwargs):
""""
Close Virtual Account from given Id
Args:
virtual_account_id :
Id for which Virtual Account objects has to be Closed
"""
url = "{}/{}".format(self.base_url, virtual_account_id)
data[... |
java | public ApiResponse<List<Object>> initializePostWithHttpInfo(InitializeRequest request) throws ApiException {
com.squareup.okhttp.Call call = initializePostValidateBeforeCall(request, null, null);
Type localVarReturnType = new TypeToken<List<Object>>(){}.getType();
return apiClient.execute(call, ... |
python | def is_all_field_none(self):
"""
:rtype: bool
"""
if self._user_alias is not None:
return False
if self._alias is not None:
return False
if self._counterparty_alias is not None:
return False
if self._status is not None:
... |
java | protected boolean isAccessPermitted(String resourceName) {
return !resourceName.startsWith(JawrConstant.WEB_INF_DIR_PREFIX)
&& !resourceName.startsWith(JawrConstant.META_INF_DIR_PREFIX);
} |
python | def dispose(self):
"""Disposes of this events writer manager, making it no longer usable.
Call this method when this object is done being used in order to clean up
resources and handlers. This method should ever only be called once.
"""
self._lock.acquire()
self._events_writer.Close()
self.... |
python | def split_path(path_):
"""
Split the requested path into (locale, path).
locale will be empty if it isn't found.
"""
path = path_.lstrip('/')
# Use partitition instead of split since it always returns 3 parts
first, _, rest = path.partition('/')
lang = first.lower()
if lang in set... |
java | @Override
public void storeBundle(String bundleName, JoinableResourceBundleContent bundleResourcesContent) {
// Text version
String bundleContent = bundleResourcesContent.getContent().toString();
storeBundle(bundleName, bundleContent, false, textDirPath);
// binary version
storeBundle(bundleName, bundleCon... |
python | def _decode_next_layer(self, dict_, proto=None, length=None, *, version=4, ipv6_exthdr=None):
"""Decode next layer extractor.
Positional arguments:
* dict_ -- dict, info buffer
* proto -- str, next layer protocol name
* length -- int, valid (not padding) length
... |
java | public void putObject(String bucketName, String objectName, InputStream stream, long size,
ServerSideEncryption sse)
throws InvalidBucketNameException, NoSuchAlgorithmException, IOException,
InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException,
... |
python | def infer_type(expr, scope):
"""Try to infer the type of x.y if y is a known value (literal)."""
# Do we know what the member is?
if isinstance(expr.member, ast.Literal):
member = expr.member.value
else:
return protocol.AnyType
container_type = infer_type(expr.obj, scope)
try:
... |
java | public String oppositeField(String fldName) {
if (lhs.isFieldName() && lhs.asFieldName().equals(fldName)
&& rhs.isFieldName())
return rhs.asFieldName();
if (rhs.isFieldName() && rhs.asFieldName().equals(fldName)
&& lhs.isFieldName())
return lhs.asFieldName();
return null;
} |
python | def setUserKeyCredentials(self, username, public_key=None, private_key=None):
"""Set these properties in ``disk.0.os.credentials``."""
self.setCredentialValues(username=username, public_key=public_key, private_key=private_key) |
python | def audit_1_12(self):
"""1.12 Ensure no root account access key exists (Scored)"""
for row in self.credential_report:
if row["user"] == "<root_account>":
self.assertFalse(json.loads(row["access_key_1_active"]))
self.assertFalse(json.loads(row["access_key_2_act... |
python | def getProjectionForQueryName(self, query_name):
""" TODO: DOCUMENT !!
Returns None if no such projection exists
"""
projectionFileName = query_name + '.pyql'
projectionText = self._getText(projectionFileName)
return projectionText |
python | def delete_store_credit_by_id(cls, store_credit_id, **kwargs):
"""Delete StoreCredit
Delete an instance of StoreCredit by its ID.
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async=True
>>> thread = api.delete_store_c... |
python | def subdivide(vertices,
faces,
face_index=None):
"""
Subdivide a mesh into smaller triangles.
Note that if `face_index` is passed, only those faces will
be subdivided and their neighbors won't be modified making
the mesh no longer "watertight."
Parameters
------... |
python | def get_attributes(self, template_pack=TEMPLATE_PACK):
"""
Used by crispy_forms_tags to get helper attributes
"""
items = {
'form_method': self.form_method.strip(),
'form_tag': self.form_tag,
'form_style': self.form_style.strip(),
'form_sho... |
java | public void setAttachedDiskMapping(java.util.Map<String, java.util.List<DiskMap>> attachedDiskMapping) {
this.attachedDiskMapping = attachedDiskMapping;
} |
python | def hil_rc_inputs_raw_encode(self, time_usec, chan1_raw, chan2_raw, chan3_raw, chan4_raw, chan5_raw, chan6_raw, chan7_raw, chan8_raw, chan9_raw, chan10_raw, chan11_raw, chan12_raw, rssi):
'''
Sent from simulation to autopilot. The RAW values of the RC channels
received. T... |
python | def normalized_mutual_info_score(self, reference_clusters):
"""
Calculates the normalized mutual information w.r.t. the reference clusters (explicit evaluation)
:param reference_clusters: Clusters that are to be used as reference
:return: The resulting normalized mutual information scor... |
python | def _list(self):
"""List all the objects saved in the namespace.
:param search_from: TBI
:param search_to: TBI
:param offset: TBI
:param limit: max number of values to be shows.
:return: list with transactions.
"""
all = self.driver.instance.metadata.get(... |
java | public void init(FieldTable table, String strStartDateTimeField, String strEndDateTimeField, String strDescriptionField, String strStatusField)
{
super.init(table);
m_strStartDateTimeField = strStartDateTimeField;
m_strEndDateTimeField = strEndDateTimeField;
m_strDescriptionField = ... |
java | @Override
public CommerceWarehouse findByGroupId_First(long groupId,
OrderByComparator<CommerceWarehouse> orderByComparator)
throws NoSuchWarehouseException {
CommerceWarehouse commerceWarehouse = fetchByGroupId_First(groupId,
orderByComparator);
if (commerceWarehouse != null) {
return commerceWarehous... |
python | def solveOneCycle(agent,solution_last):
'''
Solve one "cycle" of the dynamic model for one agent type. This function
iterates over the periods within an agent's cycle, updating the time-varying
parameters and passing them to the single period solver(s).
Parameters
----------
agent : AgentT... |
python | def _execute(self, parts, expectation=None, format_callback=None):
"""Really execute a redis command
:param list parts: The list of command parts
:param mixed expectation: Optional response expectation
:rtype: :class:`~tornado.concurrent.Future`
:raises: :exc:`~tredis.exception... |
python | def buildProtocol(self, addr):
"""Get a new LLRP client protocol object.
Consult self.antenna_dict to look up antennas to use.
"""
self.resetDelay() # reset reconnection backoff state
clargs = self.client_args.copy()
# optionally configure antennas from self.antenna_di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.