language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def _compute_include_paths(self, target): """Computes the set of paths that thrifty uses to lookup imports. The IDL files under these paths are not compiled, but they are required to compile downstream IDL files. :param target: the JavaThriftyLibrary target to compile. :return: an ordered set of d...
python
def populate(self): """ Populate this list with all views that take no arguments. """ from django.conf import settings from django.core import urlresolvers self.append(("", "")) urlconf = settings.ROOT_URLCONF resolver = urlresolvers.RegexURLResolver(r'^/', urlco...
python
def get_full_delta_pal(PTRMS, PTRM_Checks, NRM, y_err, y_mean, b, start, end, y_segment): """ input: PTRMS, PTRM_Checks, NRM, y_err, y_mean, b, start, end, y_segment runs full sequence necessary to get delta_pal """ #print "-------" #print "calling get_full_delta_pal in lib" # return 0 PT...
java
@Override public EClass getIfcPropertyTemplateDefinition() { if (ifcPropertyTemplateDefinitionEClass == null) { ifcPropertyTemplateDefinitionEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(479); } return ifcPropertyTemplateDefinitionEClass; }
python
def add_weight(self, weight): """stub""" if weight is None: raise NullArgument('weight cannot be None') if not self.my_osid_object_form._is_valid_decimal( weight, self.get_weight_metadata()): raise InvalidArgument('weight') self.my_osid_object_form...
python
def from_etree(cls, etree_element): """ create a ``TextualRelation`` instance from an etree element representing an <edges> element with xsi:type 'sDocumentStructure:STextualRelation'. """ ins = SaltEdge.from_etree(etree_element) # TODO: this looks dangerous, ask ...
python
def by_zone(self): """ Returns the faceoff win/total breakdown by zone for home and away as .. code:: python { 'home/away': { 'off/def/neut/all': { 'won': won, 'total': total } } } :returns: dict ...
python
def load_match_config(self, match_config: MatchConfig, bot_config_overrides={}): """ Loads the match config into internal data structures, which prepares us to later launch bot processes and start the match. This is an alternative to the load_config method; they accomplish the same thin...
python
def from_ordered_sequence(cls, iseq): """ Return the root of a balanced binary search tree populated with the values in iterable *iseq*. """ seq = list(iseq) # optimize for usually all fits by making longest first bst = cls(seq.pop()) bst._insert_from_orde...
java
@Bean @ConditionalOnProperty(prefix = JavaMelodyConfigurationProperties.PREFIX, name = "spring-monitoring-enabled", matchIfMissing = true) public MonitoringSpringAdvisor monitoringSpringControllerAdvisor() { return new MonitoringSpringAdvisor(new AnnotationMatchingPointcut(Controller.class)); }
python
def on_about_to_process(self, plugin, instance): """Reflect currently running pair in GUI""" if instance is None: instance_item = self.data["models"]["item"].instances[0] else: instance_item = self.data["models"]["item"].instances[instance.id] plugin_item = self...
java
private void build() { this.startNodes = new ArrayList<>(); this.endNodes = new ArrayList<>(); this.parentChildMap = new HashMap<>(); for (DagNode node : this.nodes) { //If a Node has no parent Node, add it to the list of start Nodes if (node.getParentNodes() == null) { this.startNod...
python
def thresholdBlocks(self, blocks, recall_weight=1.5): # pragma: nocover """ Returns the threshold that maximizes the expected F score, a weighted average of precision and recall for a sample of blocked data. Arguments: blocks -- Sequence of tuples of records, where eac...
python
def writeEdgeList(grph, name, extraInfo = True, allSameAttribute = False, _progBar = None): """Writes an edge list of _grph_ at the destination _name_. The edge list has two columns for the source and destination of the edge, `'From'` and `'To'` respectively, then, if _edgeInfo_ is `True`, for each attribute o...
java
public boolean hasOutstandingWork() { if (tc.isEntryEnabled()) Tr.entry(tc, "hasOutstandingWork", this); final boolean retval = (_coord != null) ? _coord.hasWork() : false; if (tc.isEntryEnabled()) Tr.exit(tc, "hasOutstandingWork", retval); return retval; }
python
def get_output_cache_keys(self, placeholder_name, instance): """ .. versionadded:: 0.9 Return the possible cache keys for a rendered item. This method should be overwritten when implementing a function :func:`set_cached_output` method or when implementing a :func:`get_o...
python
def fullmatch(pattern, string, flags=0): """Try to apply the pattern at the start of the string, returning a match object if the whole string matches, or None if no match was found.""" # Build a version of the pattern with a non-capturing group around it. # This is needed to get m.end() to correctly rep...
java
public void marshall(UploadDocumentsRequest uploadDocumentsRequest, ProtocolMarshaller protocolMarshaller) { if (uploadDocumentsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(uploadDocumen...
python
def parse_pac_value(value, socks_scheme=None): """ Parse the return value of ``FindProxyForURL()`` into a list. List elements will either be the string "DIRECT" or a proxy URL. For example, the result of parsing ``PROXY example.local:8080; DIRECT`` is a list containing strings ``http://example.loca...
java
@Override public XBELParameter convert(Parameter source) { if (source == null) return null; Namespace namespace = source.getNamespace(); String value = source.getValue(); XBELParameter xp = new XBELParameter(); if (namespace != null) xp.setNs(namespace.getPrefi...
python
def generate_file(fname, ns_func, dest_dir="."): """generate a constants file from its template""" with open(pjoin(root, 'buildutils', 'templates', '%s' % fname), 'r') as f: tpl = f.read() out = tpl.format(**ns_func()) dest = pjoin(dest_dir, fname) info("generating %s from template" % dest) ...
java
public static <T extends Serializable> ThriftEnvelopeEvent extractEvent(final String eventName, final T thriftObject) { return extractEvent(eventName, new DateTime(), thriftObject); }
java
public Observable<ServiceResponse<List<Tag>>> getTagsWithServiceResponseAsync(UUID projectId, UUID iterationId) { if (projectId == null) { throw new IllegalArgumentException("Parameter projectId is required and cannot be null."); } if (this.client.apiKey() == null) { thro...
python
def clean_html(data, full=True, parser=DEFAULT_PARSER): """ Cleans HTML from XSS vulnerabilities using html5lib If full is False, only the contents inside <body> will be returned (without the <body> tags). """ if full: dom_tree = parser.parse(data) else: dom_tree = parser.par...
python
def plot_ppc(self, nsims=1000, T=np.mean, **kwargs): """ Plots histogram of the discrepancy from draws of the posterior Parameters ---------- nsims : int (default : 1000) How many draws for the PPC T : function A discrepancy measure - e.g. np.mean, np.st...
java
private final ExternalInvalidation internalFilterExternalCacheFragment(String cacheName, InvalidationTableList invalidationTableList, ExternalInvalidation externalCacheFragment) { if (externalCacheFragment == null) { return null; } long timeStamp = externalCacheFragment.getTimeStamp(); if (collision(invalida...
java
@Override public Call<List<List<Span>>> getTraces(QueryRequest request) { if (!searchEnabled) return Call.emptyList(); TimestampRange timestampRange = timestampRange(request); // If we have to make multiple queries, over fetch on indexes as they don't return distinct // (trace id, timestamp) rows. Th...
java
public static void write(XMLOutputter xml, MD5MD5CRC32FileChecksum that ) throws IOException { xml.startTag(MD5MD5CRC32FileChecksum.class.getName()); if (that != null) { xml.attribute("bytesPerCRC", "" + that.bytesPerCRC); xml.attribute("crcPerBlock", "" + that.crcPerBlock); xml.attribut...
java
public Matrix4x3f arcball(float radius, float centerX, float centerY, float centerZ, float angleX, float angleY) { return arcball(radius, centerX, centerY, centerZ, angleX, angleY, this); }
java
public static TxInfo getTransactionInfo(Environment env, Bytes prow, Column pcol, long startTs) { // TODO ensure primary is visible IteratorSetting is = new IteratorSetting(10, RollbackCheckIterator.class); RollbackCheckIterator.setLocktime(is, startTs); Entry<Key, Value> entry = ColumnUtil.checkColum...
python
def _footer_start_thread(self, text, time): """Display given text in the footer. Clears after <time> seconds """ footerwid = urwid.AttrMap(urwid.Text(text), 'footer') self.top.footer = footerwid load_thread = Thread(target=self._loading_thread, args=(time,)) load_thread....
python
def rescale_field(self, new_dim): """ Changes the discretization of the potential field by linear interpolation. This is necessary if the potential field obtained from DFT is strangely skewed, or is too fine or coarse. Obeys periodic boundary conditions at the edges of th...
java
public void marshall(DocumentMetadata documentMetadata, ProtocolMarshaller protocolMarshaller) { if (documentMetadata == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(documentMetadata.getPages(), PA...
python
def create_release_id(short, version, type, bp_short=None, bp_version=None, bp_type=None): """ Create release_id from given parts. :param short: Release short name :type short: str :param version: Release version :type version: str :param version: Release type :type version: str :pa...
java
public static int writeLength(int valueLength, OutputStream out) throws IOException { if (valueLength < 128) { out.write(valueLength); return 1; } else if (valueLength < 16384) { out.write((valueLength >> 8) | 0x80); out.write(valueLength); ...
python
def assert_called(_mock_self): """assert that the mock was called at least once """ self = _mock_self if self.call_count == 0: msg = ("Expected '%s' to have been called." % self._mock_name or 'mock') raise AssertionError(msg)
java
public ServiceFuture<IotHubDescriptionInner> updateAsync(String resourceGroupName, String resourceName, final ServiceCallback<IotHubDescriptionInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, resourceName), serviceCallback); }
java
@NonNull public static Drop dropFunction(@Nullable String keyspace, @NonNull String functionName) { return new DefaultDrop( keyspace == null ? null : CqlIdentifier.fromCql(keyspace), CqlIdentifier.fromCql(functionName), "FUNCTION"); }
python
def should_build(self, fpath, meta): """ Checks if the file should be built or not Only skips layouts which are tagged as INCREMENTAL Rebuilds only those files with mtime changed since previous build """ if meta.get('layout', self.default_template) in self.inc_layout: ...
java
public List<IntegerSolution> doCrossover( double probability, IntegerSolution parent1, IntegerSolution parent2) { List<IntegerSolution> offspring = new ArrayList<IntegerSolution>(2); offspring.add((IntegerSolution) parent1.copy()) ; offspring.add((IntegerSolution) parent2.copy()) ; int i; ...
java
public void suspendFlexResponse() { for (int i = 0; i < m_flexResponseList.size(); i++) { CmsFlexResponse res = m_flexResponseList.get(i); res.setSuspended(true); } }
java
protected Record locateRecord (int key) { int index = Math.abs(key)%_buckets.length; for (Record rec = _buckets[index]; rec != null; rec = rec.next) { if (rec.key == key) { return rec; } } return null; }
java
public static String readStringFromAssets(Context context, String fileName) throws IOException { if (context == null || StringUtils.isEmpty(fileName)) { return null; } StringBuilder s = new StringBuilder(""); InputStreamReader in = new InputStreamReader(context.getReso...
python
def _produce_response(self, key, response): """ Reply to every waiting request matching a configuration key with a response dictionary, deleting the list of waiters when done. :param str key: Result of :meth:`key_from_dict` :param dict response: Response ...
python
def _setColumnCountForContents(self): """ Sets the column count given the current axes and selected RTI. Returns the newly set column count. """ numRtiDims = self.rti.nDims if self.rti and self.rti.isSliceable else 0 colCount = self.COL_FIRST_COMBO + max(numRtiDims, len(self...
java
@Override public DeleteRequestValidatorResult deleteRequestValidator(DeleteRequestValidatorRequest request) { request = beforeClientExecution(request); return executeDeleteRequestValidator(request); }
java
public final Company createCompany(String parent, Company company) { CreateCompanyRequest request = CreateCompanyRequest.newBuilder().setParent(parent).setCompany(company).build(); return createCompany(request); }
python
def get_repository_hierarchy_design_session(self, proxy): """Gets the repository hierarchy design session. arg proxy (osid.proxy.Proxy): a proxy return: (osid.repository.RepositoryHierarchyDesignSession) - a RepostoryHierarchyDesignSession raise: OperationFailed - u...
python
def find_one(self, **kwargs): """ Works just like :py:meth:`find() <dataset.Table.find>` but returns one result, or None. :: row = table.find_one(country='United States') """ kwargs["_limit"] = 1 iterator = self.find(**kwargs) try: return n...
java
protected void setTextDecoration(List<TextDecoration> newTextDecoration) { if (textDecoration == null || !textDecoration.equals(newTextDecoration)) { textDecoration = newTextDecoration; reflectTextDecoration(textDecoration); invalidateCache(); } }
java
public void onUpdateTypes(List<CmsResourceTypeBean> types, List<String> selectedTypes) { m_galleryDialog.getTypesTab().updateContent(types, selectedTypes); }
python
def GetSchema(component): """convience function for finding the parent XMLSchema instance. """ parent = component while not isinstance(parent, XMLSchema): parent = parent._parent() return parent
java
public static void transferDirect(Pipe.Schema pipeSchema, Pipe pipe, Input input, Output output) throws IOException { pipeSchema.transfer(pipe, input, output); }
python
def string(self, units: typing.Optional[str] = None) -> str: """Return a string representation of the pressure, using the given units.""" if not units: _units: str = self._units else: if not units.upper() in CustomPressure.legal_units: raise UnitsError("un...
java
@Override public NodeSet<OWLClass> getDataPropertyDomains(OWLDataProperty pe, boolean direct) throws InconsistentOntologyException, FreshEntitiesException, ReasonerInterruptedException, TimeOutException { throw new ReasonerInternalException( "getData...
java
public void setClientVariant(String context, String variant, CmsClientVariantInfo info) { if (!m_clientVariantInfo.containsKey(context)) { Map<String, CmsClientVariantInfo> variants = new LinkedHashMap<String, CmsClientVariantInfo>(); m_clientVariantInfo.put(context, variants); ...
python
def getApplicationsErrorNameFromEnum(self, error): """Returns a string for an applications error""" fn = self.function_table.getApplicationsErrorNameFromEnum result = fn(error) return result
python
def get_cnot_control_positions(k): """ Returns a list of positions for the controls of the CNOTs used when decomposing uniformly controlled rotations, as outlined in arXiv:quant-ph/0407010. Referencing Fig. 2 in the aforementioned paper, this method uses the convention that, going up from the t...
python
def write_data(self, data, start_position=0): """ Write data from the specified line :param data: string to write, each one on new line :param start_position: starting line :return: """ if len(data) > self.height(): raise ValueError('Data too long (too many strings)') for i in range(len(data)): se...
java
private boolean hasFilter(Filter filter, WhileMatchFilter whileMatchFilter) { if (filter == whileMatchFilter) { return true; } if (filter instanceof FilterList) { FilterList list = (FilterList) filter; for (Filter subFilter : list.getFilters()) { if (hasFilter(subFilter, whileMatc...
python
def host(self, value): """ A string that will be automatically included at the beginning of the url generated for doing each http request. :param value: The host to be connected with, e.g. (http://hostname) or (https://X.X.X.X:port) """ scheme, host, port = get_hostname_paramete...
python
def checkEdges(ringSet, lookup, oatoms): """atoms, lookup -> ring atoms must be in the order of traversal around a ring! break an optimal non N2 node and return the largest ring found """ bondedAtoms = map( None, ringSet[:-1], ringSet[1:] ) bondedAtoms += [ (ringSet[-1], ringSet[0]) ] #...
python
def l2traceroute_result_output_l2_hop_results_l2_hop_ingress_interface_type(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") l2traceroute_result = ET.Element("l2traceroute_result") config = l2traceroute_result output = ET.SubElement(l2traceroute_r...
python
def _get_process(self): """ Create the process by running the specified command. """ command = self._get_command() return subprocess.Popen(command, bufsize=-1, close_fds=True, stdout=subprocess.PIPE, stdin=subprocess...
java
@Deprecated public void copyToMasterPrimaryKey(Storable indexEntry, S master) throws FetchException { getReferenceAccess().copyToMasterPrimaryKey(indexEntry, master); }
java
public static base_response renumber(nitro_service client) throws Exception { nspbrs renumberresource = new nspbrs(); return renumberresource.perform_operation(client,"renumber"); }
java
protected void findCenter() { center = new float[]{0, 0}; int length = points.length; for(int i=0;i<length;i+=2) { center[0] += points[i]; center[1] += points[i + 1]; } center[0] /= (length / 2); center[1] /= (length / 2); }
java
public void translate(float x, float y) { checkPush(); predraw(); GL.glTranslatef(x, y, 0); postdraw(); }
python
def compliance_schedule(self, column=None, value=None, **kwargs): """ A sequence of activities with associated milestones which pertains to a given permit. >>> PCS().compliance_schedule('cmpl_schd_evt', '62099') """ return self._resolve_call('PCS_CMPL_SCHD', column, valu...
java
public static CPRuleAssetCategoryRel findByAssetCategoryId_First( long assetCategoryId, OrderByComparator<CPRuleAssetCategoryRel> orderByComparator) throws com.liferay.commerce.product.exception.NoSuchCPRuleAssetCategoryRelException { return getPersistence() .findByAssetCategoryId_First(assetCategoryId, ...
java
@Override public void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { String sourceFileName = req.getParameter("source"); String styleSheetFileName = req.getParameter("stylesheet"); FileReader sourceFileReader = new FileReader(sourceFileNam...
python
def handle(self, *test_labels, **options): """ Set the default Gherkin test runner. """ if not options.get('testrunner', None): options['testrunner'] = test_runner_class return super(Command, self).handle(*test_labels, **options)
python
def create_s3app(self): """Create S3 infra for s3 applications""" utils.banner("Creating S3 App Infrastructure") primary_region = self.configs['pipeline']['primary_region'] s3obj = s3.S3Apps(app=self.app, env=self.env, region=self.regio...
java
@Override public void removeByLtD_S(Date displayDate, int status) { for (CPInstance cpInstance : findByLtD_S(displayDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
java
public void marshall(GetModelsRequest getModelsRequest, ProtocolMarshaller protocolMarshaller) { if (getModelsRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(getModelsRequest.getRestApiId()...
java
protected Class resolveProxyClass(String[] interfaces) throws IOException, ClassNotFoundException { ClassLoader cl = getClass().getClassLoader(); Class[] cinterfaces = new Class[interfaces.length]; for (int i = 0; i < interfaces.length; i++) { try { cinterfaces[i] = cl.loadClass(interfaces[i]); } catch...
python
def get_dev_asset_details_all(auth, url): """Takes no input to fetch device assett details from HP IMC RESTFUL API :param auth: requests auth object #usually auth.creds from auth pyhpeimc.auth.class :param url: base url of IMC RS interface #usually auth.url from pyhpeimc.auth.authclass :return: list ...
python
def get_config(self, budget): """ Function to sample a new configuration This function is called inside Hyperband to query a new configuration Parameters: ----------- budget: float the budget for which this configuration is scheduled returns: config should return a valid configuration ...
java
public List<PaymentMethod> refreshPaymentMethods(final String pluginName, final Account account, final Iterable<PluginProperty> properties, final CallContext callContext, final InternalCallContext context) throws PaymentApiException { // Don't hold the account lock while fetching the payment methods from the ga...
python
def create_equipamento_roteiro(self): """Get an instance of equipamento_roteiro services facade.""" return EquipamentoRoteiro( self.networkapi_url, self.user, self.password, self.user_ldap)
java
public void marshall(VoiceConnector voiceConnector, ProtocolMarshaller protocolMarshaller) { if (voiceConnector == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(voiceConnector.getVoiceConnectorId(),...
python
def install(name, dst, capture_error=False): """Install the user provided entry point to be executed as follow: - add the path to sys path - if the user entry point is a command, gives exec permissions to the script Args: name (str): name of the script or module. dst (str): path...
java
public Matrix4f orthoLH(float left, float right, float bottom, float top, float zNear, float zFar, boolean zZeroToOne, Matrix4f dest) { if ((properties & PROPERTY_IDENTITY) != 0) return dest.setOrthoLH(left, right, bottom, top, zNear, zFar, zZeroToOne); return orthoLHGeneric(left, right, bot...
java
private double[][] assignPiFactors(IAtomContainerSet setAc) { //a,b,c,denom,chi,q double[][] gasteigerFactors = new double[setAc.getAtomContainerCount()][(setAc.getAtomContainer(0) .getAtomCount() * (STEP_SIZE + 1))]; String AtomSymbol = ""; double[] factors = new double[...
java
private static <E> boolean removeOccurrencesImpl( Multiset<E> multisetToModify, Multiset<?> occurrencesToRemove) { // TODO(user): generalize to removing an Iterable, perhaps checkNotNull(multisetToModify); checkNotNull(occurrencesToRemove); boolean changed = false; Iterator<Entry<E>> entryIte...
python
def getOperationNameForId(i): """ Convert an operation id into the corresponding string """ for key in operations: if int(operations[key]) is int(i): return key return "Unknown Operation ID %d" % i
python
def LOS_CrossProj(VType, Ds, us, kPIns, kPOuts, kRMins, Lplot='In', proj='All', multi=False): """ Compute the parameters to plot the poloidal projection of the LOS """ assert type(VType) is str and VType.lower() in ['tor','lin'] assert Lplot.lower() in ['tot','in'] assert type(proj) i...
python
def expandServices(service_elements): """Take a sorted iterator of service elements and expand it into a sorted iterator of: ([type_uri], uri, service_element) There may be more than one item in the resulting list for each service element if there is more than one URI or type for a service, but...
python
def ParsePageVisitRow(self, parser_mediator, query, row, **unused_kwargs): """Parses a visited row. Args: parser_mediator (ParserMediator): mediates interactions between parsers and other components, such as storage and dfvfs. query (str): query that created the row. row (sqlite3.Ro...
java
public void marshall(DescribeLoadBasedAutoScalingRequest describeLoadBasedAutoScalingRequest, ProtocolMarshaller protocolMarshaller) { if (describeLoadBasedAutoScalingRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { pr...
java
public static String reqExpEscape(String str) { char[] arr = str.toCharArray(); StringBuilder sb = new StringBuilder(str.length() * 2); for (int i = 0; i < arr.length; i++) { sb.append('\\'); sb.append(arr[i]); } return sb.toString(); }
python
def _dumps(self, obj): """ If :prop:serialized is True, @obj will be serialized using :prop:serializer """ if not self.serialized: return obj return self.serializer.dumps(obj)
python
def register(self, itemtype, item_id, handler): ''' register the item in zookeeper /list/ itemtype must be a Zooborg constant item_id must be a string handler: method to call on conf change ''' # Create a node with data #TODO: add system properties in data...
python
def python_sidebar_help(python_input): """ Create the `Layout` for the help text for the current item in the sidebar. """ token = 'class:sidebar.helptext' def get_current_description(): """ Return the description of the selected option. """ i = 0 for category...
python
def remote_delete_user(model, request): """Remove user via remote service. Returns a JSON response containing success state and a message indicating what happened:: { success: true, // respective false message: 'message' } Expected request parameters: id Id of use...
java
public static void runExample( AdManagerServices adManagerServices, AdManagerSession session, List<Long> lineItemIds) throws RemoteException { // Get the ForecastService. ForecastServiceInterface forecastService = adManagerServices.get(session, ForecastServiceInterface.class); DeliveryF...
python
def pdf(self, resource_id): """Update the request URI to get the pdf for this resource. Args: resource_id (integer): The group id. """ self.resource_id(str(resource_id)) self._request_uri = '{}/pdf'.format(self._request_uri)
java
void lowerActiveGetCount( H2ONode h2o ) { assert _key.home(); // Only the HOME node for a key tracks replicas assert h2o != H2O.SELF;// Do not track self as a replica while( true ) { // Repeat, in case racing GETs are bumping the counter int old = _rwlock.get(); // Read the lock-word a...
java
public static void parseInputParameterElement(Element inputParameterElement, IoMapping ioMapping) { String nameAttribute = inputParameterElement.attribute("name"); if(nameAttribute == null || nameAttribute.isEmpty()) { throw new BpmnParseException("Missing attribute 'name' for inputParameter", inputParame...
python
def classify_sources(catalog, sources=None): """ Convert moments_central attribute for source catalog into star/cr flag. This algorithm interprets the central_moments from the source_properties generated for the sources as more-likely a star or a cosmic-ray. It is not intended or expected to be precis...