language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public TwoColors getTexturedButtonBorderColors(CommonControlState type) { switch (type) { case DISABLED: return texturedButtonBorderDisabled; case DISABLED_SELECTED: return texturedButtonBorderDisabledSelected; case ENABLED: return texturedButtonBor...
java
public List<MessageConstructionInterceptor> getMessageConstructionInterceptors() { return messageConstructionInterceptors.stream() .filter(interceptor -> !(interceptor instanceof DataDictionary) || ((DataDictionary) interceptor).isGlobalScope()) .collect(Collectors.toList()); ...
python
def simple_atmo(rgb, haze, contrast, bias): """ A simple, static (non-adaptive) atmospheric correction function. Parameters ---------- haze: float Amount of haze to adjust for. For example, 0.03 contrast : integer Enhances the intensity differences between the lighter and darker...
python
def replace_free_shipping_by_id(cls, free_shipping_id, free_shipping, **kwargs): """Replace FreeShipping Replace all attributes of FreeShipping This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async=True >>> thread = api....
java
public static boolean isWhitespace(String str) { if (str == null) { return false; } int sz = str.length(); for (int i = 0; i < sz; i++) { if ((Character.isWhitespace(str.charAt(i)) == false)) { return false; } } return true; }
java
public void marshall(UpdateServerRequest updateServerRequest, ProtocolMarshaller protocolMarshaller) { if (updateServerRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateServerRequest.ge...
java
public void setValue(char[] chars, int offset, int len) { checkNotNull(chars); if (offset < 0 || len < 0 || offset > chars.length - len) { throw new IndexOutOfBoundsException(); } ensureSize(len); System.arraycopy(chars, offset, this.value, 0, len); this.len = len; this.hashCode = 0; }
python
def get_authorizations_by_genus_type(self, authorization_genus_type): """Gets an ``AuthorizationList`` corresponding to the given authorization genus ``Type`` which does not include authorizations of genus types derived from the specified ``Type``. In plenary mode, the returned list contains all known ...
python
def get_type_data(name): """Return dictionary representation of type. Can be used to initialize primordium.type.primitives.Type """ name = name.upper() if name in CALENDAR_TYPES: domain = 'Calendar Types' calendar_name = CALENDAR_TYPES[name] elif name in ANCIENT_CALENDAR_TYPES:...
python
def widgets_from_abbreviations(self, seq): """Given a sequence of (name, abbrev, default) tuples, return a sequence of Widgets.""" result = [] for name, abbrev, default in seq: widget = self.widget_from_abbrev(abbrev, default) if not (isinstance(widget, ValueWidget) or is...
java
public Observable<Page<RunbookInner>> listByAutomationAccountAsync(final String resourceGroupName, final String automationAccountName) { return listByAutomationAccountWithServiceResponseAsync(resourceGroupName, automationAccountName) .map(new Func1<ServiceResponse<Page<RunbookInner>>, Page<RunbookIn...
python
def string(self): """ Return the first string term in the conjunction, or `None`. """ for term in self._terms: if isinstance(term, String): return str(term) return None
java
static String getQuality(float quality) { quality -= 1; if (quality == -1) { return null; //Quality missing } else { String q = Float.toString(quality); if (q.endsWith(".0")){ return q.substring(0, q.lastIndexOf(".")); } else { ...
python
def remove_product_version_from_build_configuration(id=None, name=None, product_version_id=None): """ Remove a ProductVersion from association with a BuildConfiguration """ data = remove_product_version_from_build_configuration_raw(id, name, product_version_id) if data: return utils.format_j...
python
def read_register(self, addr, numBytes): """Reads @numBytes bytes from the grizzly starting at @addr. Due to packet format, cannot read more than 127 packets at a time. Returns a byte array of the requested data in little endian. @addr should be from the Addr class e.g. Addr.Speed""" ...
java
public String getString(String key) throws LazyException{ LazyNode token=getFieldToken(key); return token.getStringValue(); }
python
def _add_warc_action_log(self, path, url): '''Add the action log to the WARC file.''' _logger.debug('Adding action log record.') actions = [] with open(path, 'r', encoding='utf-8', errors='replace') as file: for line in file: actions.append(json.loads(line)) ...
python
def remove_files(): """ Removes any pre-existing tracks that were not just downloaded """ logger.info("Removing local track files that were not downloaded...") files = [f for f in os.listdir('.') if os.path.isfile(f)] for f in files: if f not in fileToKeep: os.remove(f)
java
public JsonResponse apiGet(ApiAction action, Map<String, Object> data) throws IOException { return httpRequestJson(action, HttpRequestMethod.GET, data); }
python
def endpoint_from_model_data(self, model_s3_location, deployment_image, initial_instance_count, instance_type, name=None, role=None, wait=True, model_environment_vars=None, model_vpc_config=None, accelerator_type=None): """Create and deploy to an...
python
def sighandler(signals): """Sets the decorated function as signal handler of given *signals*. *signals* can be either a single signal or a list/tuple of multiple ones. """ def wrap(function): set_signal_handlers(signals, function) @wraps(function) def wrapper(*args, **kwar...
python
async def close_interface(self, conn_id, interface): """Close an interface on this IOTile device. See :meth:`AbstractDeviceAdapter.close_interface`. """ adapter_id = self._get_property(conn_id, 'adapter') await self.adapters[adapter_id].close_interface(conn_id, interface)
python
def find_holes(db_module, db, table_name, column_name, _range, filter=None): """ FIND HOLES IN A DENSE COLUMN OF INTEGERS RETURNS A LIST OF {"min"min, "max":max} OBJECTS """ if not filter: filter = {"match_all": {}} _range = wrap(_range) params = { "min": _range.min, ...
java
protected String generateDefinitionId(DeploymentEntity deployment, DefinitionEntity newDefinition, DefinitionEntity latestDefinition) { String nextId = idGenerator.getNextId(); String definitionKey = newDefinition.getKey(); int definitionVersion = newDefinition.getVersion(); String definitionId = defi...
python
def ensure_sphinx_astropy_installed(): """ Make sure that sphinx-astropy is available, installing it temporarily if not. This returns the available version of sphinx-astropy as well as any paths that should be added to sys.path for sphinx-astropy to be available. """ # We've split out the Sphin...
java
private static int countBits(long v) { // // the strategy is to shift until we get a non-zero sign bit // then shift until we have no bits left, counting the difference. // we do byte shifting as a hack. Hope it helps. // if (v == 0L) return 0; while ((v & highbyte) == 0L) { v <<= 8;...
java
public void mapOverridingMethods() { for (String key : elementReferenceMap.keySet()) { ReferenceNode node = elementReferenceMap.get(key); if (node instanceof MethodReferenceNode) { MethodReferenceNode methodNode = (MethodReferenceNode) node; if (methodNode.declared && !methodNode.invoked...
python
def main(request, query, hproPk=None, returnMenuOnly=False): """ Main method called for main page""" if settings.PIAPI_STANDALONE: global plugIt, baseURI # Check if settings are ok if settings.PIAPI_ORGAMODE and settings.PIAPI_REALUSERS: return gen404(request, baseURI, ...
python
def get_mem(device_handle): """Get GPU device memory consumption in percent.""" try: memory_info = pynvml.nvmlDeviceGetMemoryInfo(device_handle) return memory_info.used * 100.0 / memory_info.total except pynvml.NVMLError: return None
java
private void highlightLinesAfter( String content, int line ) throws BadLocationException { int offset = _root.getElement( line ).getEndOffset(); // Start/End delimiter not found, nothing to do int startDelimiter = indexOf( content, getStartDelimiter(), offset ); int endDelimiter = indexOf( content...
python
def urlopen(link): """Return urllib2 urlopen """ try: return urllib2.urlopen(link) except urllib2.URLError: pass except ValueError: return "" except KeyboardInterrupt: print("") raise SystemExit()
python
def is_allowed(self, name_or_class, mask): # pragma: no cover """Return True is a new connection is allowed""" if isinstance(name_or_class, type): name = name_or_class.type else: name = name_or_class info = self.connections[name] limit = self.config[name ...
python
def sync_one(self, aws_syncr, amazon, key): """Make sure this key is as defined""" key_info = amazon.kms.key_info(key.name, key.location) if not key_info: amazon.kms.create_key(key.name, key.description, key.location, key.grant, key.policy.document) else: amazon.k...
python
def lookup_domain(self, domain, nameserver=None, log_prefix=''): """Most basic DNS primitive that looks up a domain, waits for a second response, then returns all of the results :param domain: the domain to lookup :param nameserver: the nameserver to use :param log_prefix: ...
python
def connection(self, shareable=True): """Get a steady, cached DB-API 2 connection from the pool. If shareable is set and the underlying DB-API 2 allows it, then the connection may be shared with other threads. """ if shareable and self._maxshared: self._lock.acquire...
python
def _heapqmergesorted(key=None, *iterables): """Return a single iterator over the given iterables, sorted by the given `key` function, assuming the input iterables are already sorted by the same function. (I.e., the merge part of a general merge sort.) Uses :func:`heapq.merge` for the underlying impleme...
python
def sh(cmd): """ Run the given command in a shell. The command should be a single string containing a shell command. If the command contains the names of any local variables enclosed in braces, the actual values of the named variables will be filled in. (Note that this works on variables defi...
python
def save(self, *args, **kwargs): """ **uid**: :code:`division:{parentuid}_{levelcode}-{code}` """ slug = "{}:{}".format(self.level.uid, self.code) if self.parent: self.uid = "{}_{}".format(self.parent.uid, slug) else: self.uid = slug self.s...
python
def do_capacity(self, line): "capacity {tablename} {read_units} {write_units}" args = self.getargs(line) table = self.get_table(args[0]) read_units = int(args[1]) write_units = int(args[2]) desc = self.conn.describe_table(table.name) prov = desc['Table']['Provis...
python
def ensure_dir(path): """Ensures a directory exists""" if not (os.path.exists(path) and os.path.isdir(path)): os.mkdir(path)
python
def IsActiveOn(self, date, date_object=None): """Test if this service period is active on a date. Args: date: a string of form "YYYYMMDD" date_object: a date object representing the same date as date. This parameter is optional, and present only for performance ...
python
def get_epoch_price_divisor( block_height, namespace_id, units ): """ what's the name price divisor for this epoch? Not all epochs have one---if this epoch does NOT have BLOCKSTACK_INT_DIVISION set, use get_epoch_price_multiplier() instead. """ try: assert units in [TOKEN_TYPE_STACKS, 'B...
java
public SelectBuilder leftJoin(Class<?> entityClass) { currentTable = rootTable.leftJoin(entityClass, currentTable.entityClass); return this; }
java
private void authorize(Activity activity, String[] permissions, int activityCode, SessionLoginBehavior behavior, final DialogListener listener) { checkUserSession("authorize"); pendingOpeningSession = new Session.Builder(activity). setApplicationId(mAppId). ...
python
def get_appliance_event_after_time(self, location_id, since, per_page=None, page=None, min_power=None): """Get appliance events by location Id after defined time. Args: location_id (string): hexadecimal id of the sensor to query, e.g. ``0x0013A20040B65FAD`` since (string):...
java
@Deprecated public final void reset(String str) { int length = 0; if (str != null) { length = str.length(); } reset(str, 0, length); }
java
@BetaApi public final Operation updateUrlMap( ProjectGlobalUrlMapName urlMap, UrlMap urlMapResource, List<String> fieldMask) { UpdateUrlMapHttpRequest request = UpdateUrlMapHttpRequest.newBuilder() .setUrlMap(urlMap == null ? null : urlMap.toString()) .setUrlMapResource(urlM...
python
def dangling(prune=False, force=False): ''' Return top-level images (those on which no other images depend) which do not have a tag assigned to them. These include: - Images which were once tagged but were later untagged, such as those which were superseded by committing a new copy of an existing...
python
def median_interval(self, name, alpha=_alpha, **kwargs): """ Median including bayesian credible interval. """ data = self.get(name,**kwargs) return median_interval(data,alpha)
java
public static BufferedImage toImage(String base64) throws IORuntimeException { byte[] decode = Base64.decode(base64, CharsetUtil.CHARSET_UTF_8); return toImage(decode); }
java
private Func1<List<Parameter>, Observable<T>> executeOnce() { return new Func1<List<Parameter>, Observable<T>>() { @Override public Observable<T> call(final List<Parameter> params) { if (jdbcQuery.sql().equals(QueryUpdateOnSubscribe.BEGIN_TRANSACTION)) { ...
python
def scan_for_valid_codon(codon_span, strand, seqid, genome, type='start'): """ Given a codon span, strand and reference seqid, scan upstream/downstream to find a valid in-frame start/stop codon """ s, e = codon_span[0], codon_span[1] while True: if (type == 'start' and strand == '+') or ...
python
def create_project(self, name, client_id, budget = None, budget_by = 'none', notes = None, billable = True): '''Creates a Project with the given information.''' project = {'project':{ 'name': name, 'client_id': client_id, 'budget_by': budget_by, 'budg...
java
void setFilters(Map<Object, Object> filters) { for (Object column : filters.keySet()) { Object filterValue = filters.get(column); if ((filterValue != null) && !filterValue.toString().isEmpty() && !m_table.isColumnCollapsed(column)) { m_table.setFilterFieldValue(column, f...
python
def makeRecord(self, name, level, fn, lno, msg, args, exc_info, func=None, extra=None, sinfo=None): """Override default logger to allow overriding of internal attributes.""" # See below commented section for a simple example of what the docstring refers to if six.PY2: rv = logging.Lo...
python
def validate(self, value): """Return a boolean if the choice is a number in the enumeration""" if value in list(self.choices.keys()): self._choice = value return True try: self._choice = list(self.choices.keys())[int(value)] return True exc...
java
public java.util.List<String> getInclude() { if (include == null) { include = new com.amazonaws.internal.SdkInternalList<String>(); } return include; }
python
def full_clean(self): """ Clean the form, including all formsets and add formset errors to the errors dict. Errors of nested forms and formsets are only included if they actually contain errors. """ super(SuperFormMixin, self).full_clean() for field_name, composit...
java
public Observable<Void> provisionAsync(String vaultName, String resourceGroupName, String fabricName, String containerName, String protectedItemName, String recoveryPointId, ILRRequestResource resourceILRRequest) { return provisionWithServiceResponseAsync(vaultName, resourceGroupName, fabricName, containerName,...
python
def init(): """Initiates a new website""" print("Blended: Static Website Generator -\n") checkConfig() if (sys.version_info > (3, 0)): wname = input("Website Name: ") wdesc = input("Website Description: ") wlan = input("Website Language: ") wlic = input("Website Licens...
java
public void replace(BlockVector writeList) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "replace", writeList); boolean pushed = false; // examine lowest and highest stamp of writeList int wlength = writeList.size(); long fstamp = ((RangeObject) w...
python
def fermat_potential(self, x_image, y_image, x_source, y_source, kwargs_lens, k=None): """ fermat potential (negative sign means earlier arrival time) :param x_image: image position :param y_image: image position :param x_source: source position :param y_source: source p...
python
def collectRecords( self, column ): """ Collects records for the inputed column to choose from. :param column | <orb.Column> :return [<orb.Table>, ..] """ model = column.referenceModel() if ( not model ): return [...
python
def _load_csv(self, value): """Return a class:`csv.DictReader` instance for value passed in. :param str value: The CSV value :rtype: csv.DictReader """ csv = self._maybe_import('csv') buff = io.StringIO() if _PYTHON3 else io.BytesIO() buff.write(value) b...
java
public static Collection<URI> stringCollectionAsURIs( Collection<String> names) { Collection<URI> uris = new ArrayList<URI>(names.size()); for(String name : names) { try { uris.add(stringAsURI(name)); } catch (IOException e) { LOG.error("Error while ...
java
@Override public Map<Integer, Integer> pGetRanges(int partition) { Map<Integer, Integer> ranges = new TreeMap<Integer, Integer>(); Integer first = null; // start of the very first token on the ring Integer start = null; // start of a range UnmodifiableIterator<Map.Entry<Integer,Integ...
python
def predict_proba(estimator, X): # type: (Any, Any) -> Optional[np.ndarray] """ Return result of predict_proba, if an estimator supports it, or None. """ if is_probabilistic_classifier(estimator): try: proba, = estimator.predict_proba(X) return proba except NotImp...
python
def set_custom_boundary(doc): """Set the sentence boundaries based on the already separated sentences. :param doc: doc.user_data should have a list of Sentence. :return doc: """ if doc.user_data == {}: raise AttributeError("A list of Sentence is not attached to doc.user_data.") # Set eve...
python
def encode_fetch_request(cls, client_id, correlation_id, payloads=None, max_wait_time=100, min_bytes=4096): """ Encodes some FetchRequest structs Arguments: client_id: string correlation_id: int payloads: list of FetchRequest ...
java
public static String buildDynamicKey(final Object[] paramNames, final Object[] paramValues) { return Arrays.toString(paramNames).concat(Arrays.toString(paramValues)); }
java
private ParseTree parseContinueStatement() { SourcePosition start = getTreeStartLocation(); eat(TokenType.CONTINUE); IdentifierToken name = null; if (!peekImplicitSemiColon()) { name = eatIdOpt(); } eatPossibleImplicitSemiColon(); return new ContinueStatementTree(getTreeLocation(start)...
java
public static UploadAttachmentResponse uploadAttachment( AttachmentType attachmentType, String attachmentUrl) { AttachmentPayload payload = new AttachmentPayload(attachmentUrl, true); Attachment attachment = new Attachment(attachmentType, payload); AttachmentMessage message = new AttachmentMessage(attachment);...
python
def _get_sorted_methods(self, methods): """Get a copy of 'methods' sorted the way they would be on the live server. Args: methods: JSON configuration of an API's methods. Returns: The same configuration with the methods sorted based on what order they'll be checked by the server. """...
java
private void sendMessage(String aspectPath, boolean fired) { if (Boolean.valueOf(_config.getValue(SystemConfiguration.Property.REFOCUS_ENABLED))) { int refreshMaxTimes = Integer.parseInt(_config.getValue(Property.REFOCUS_CONNECTION_REFRESH_MAX_TIMES.getName(), Property.REFOCUS_CONNECTION_REFRESH_MAX_TIMES.getDefau...
python
def arc_consistency_3(domains, constraints): """ Makes a CSP problem arc consistent. Ignores any constraint that is not binary. """ arcs = list(all_arcs(constraints)) pending_arcs = set(arcs) while pending_arcs: x, y = pending_arcs.pop() if revise(domains, (x, y), constrain...
python
def _validate_generic_parameters(self, args): """Validate the generic request parameters. @param args: Parsed schema arguments. @raises APIError: In the following cases: - Action is not included in C{self.actions} - SignatureVersion is not included in C{self.signature_ve...
python
def _get_value_opc_attr(self, attr_name, prec_decimals=2): """Return sensor attribute with precission, or None if not present.""" try: value = getattr(self, attr_name) if value is not None: return round(value, prec_decimals) except I2cVariableNotImplemente...
java
private void highlightSlice(PieModel _Slice) { int color = _Slice.getColor(); _Slice.setHighlightedColor(Color.argb( 0xff, Math.min((int) (mHighlightStrength * (float) Color.red(color)), 0xff), Math.min((int) (mHighlightStrength * (float) Color.green(colo...
java
public ArrayList<OvhLinePhoneAssociable> billingAccount_line_serviceName_listAssociablePhones_GET(String billingAccount, String serviceName) throws IOException { String qPath = "/telephony/{billingAccount}/line/{serviceName}/listAssociablePhones"; StringBuilder sb = path(qPath, billingAccount, serviceName); Strin...
python
def _templates_match(t, family_file): """ Return True if a tribe matches a family file path. :type t: Tribe :type family_file: str :return: bool """ return t.name == family_file.split(os.sep)[-1].split('_detections.csv')[0]
java
public static final boolean parseBoolean(String value, String errorMsgOnParseFailure) { // avoiding Boolean.valueOf() to have more checks: makes it easy to spot wrong type in cfg. if (value == null) { throw new SearchException(errorMsgOnParseFailure); } else if ("false".equalsIgnoreCase(value...
python
def subscribe(self, client): """Subscribe a client to the channel.""" self.clients.append(client) log("Subscribed client {} to channel {}".format(client, self.name))
java
private Node linkFirst(E e) { final Node<E> newNode = newNode(Objects.requireNonNull(e)); restartFromHead: for (;;) for (Node<E> h = head, p = h, q;;) { if ((q = p.prev) != null && (q = (p = q).prev) != null) // Check for head ...
java
public static String getValueClassName(StorageService storageService, DataSource ds, String sql) throws Exception { try { if ((sql != null) && !sql.trim().equals("")) { Connection con = null; try { con = ConnectionUtil.createConnection(storageServ...
python
def get(self, dismiss=True): """Extract the object this key points to. Objects are not read or decompressed until this function is explicitly called. """ try: return _classof(self._context, self._fClassName).read(self._source, self._cursor.copied(), self._context, self) ...
java
private void findPath(Map<Spec, SpecExecutor> specExecutorInstanceMap, Spec spec) { inMemoryWeightGraphGenerator(); FlowSpec flowSpec = (FlowSpec) spec; if (optionalUserSpecifiedPath.isPresent()) { log.info("Starting to evaluate user's specified path ... "); if (userSpecifiedPathVerificator(spec...
java
public static com.github.bordertech.wcomponents.Image createThumbnail(final InputStream is, final String name, final Dimension scaledSize, final String mimeType) { final Dimension scale = scaledSize == null ? THUMBNAIL_SCALE_SIZE : scaledSize; // Generate thumbnail for image files if (is != null && mimeTyp...
java
@Override public boolean isSingular() { for( int i = 0; i < m; i++ ) { if( Math.abs(dataLU[i* n +i]) < UtilEjml.EPS ) return true; } return false; }
python
def load_sound_font(self, sf2): """Load a sound font. Return True on success, False on failure. This function should be called before your audio can be played, since the instruments are kept in the sf2 file. """ self.sfid = self.fs.sfload(sf2) return not self.sf...
python
def select_warp_gates(action, action_space, select_add): """Select all warp gates.""" del action_space action.action_ui.select_warp_gates.selection_add = select_add
python
def migrate(gandi, resource, force, background, finalize): """ Migrate a virtual machine to another datacenter. """ if not gandi.iaas.check_can_migrate(resource): return if not force: proceed = click.confirm('Are you sure you want to migrate VM %s ?' % resour...
java
protected void openLaunchpad() throws JspException { try { openWorkplaceLink( OpenCms.getSystemInfo().getWorkplaceContext() + "#!" + CmsAppHierarchyConfiguration.APP_ID); } catch (Exception e) { // forward failed throw new JspException(e.getMessage(),...
java
public String getTableName() { getEntityType(); return this.entityType != null && !StringUtils.isBlank(((AbstractManagedType) this.entityType).getTableName()) ? ((AbstractManagedType) this.entityType) .getTableName() : tableName; }
java
protected String generatePathList(final Collection<? extends BasicInclude> elements) { final StringBuilder msg = new StringBuilder(); msg.append("["); for (final Iterator<? extends BasicInclude> elementItr = elements.iterator(); elementItr.hasNext();) { msg.append(elementItr.next().g...
python
def lane_info(self): """Retrieves the lane info of the incident/incidents from the output response Returns: lane_info(namedtuple): List of named tuples of lane info of the incident/incidents """ resource_list = self.traffic_incident() lane_info = ...
python
def hid_device_path_exists(device_path, guid = None): """Test if required device_path is still valid (HID device connected to host) """ # expecing HID devices if not guid: guid = winapi.GetHidGuid() info_data = winapi.SP_DEVINFO_DATA() info_data.cb_size = sizeof(win...
python
def box_plot(x, y, xlabel=LABEL_DEFAULT, ylabel=LABEL_DEFAULT, title=LABEL_DEFAULT): """ Plots the data in `x` on the X axis and the data in `y` on the Y axis in a 2d box and whiskers plot, and returns the resulting Plot object. The function x as SArray of dtype str and y as SArray of dtype: int, f...
java
public final void synpred27_InternalPureXbase_fragment() throws RecognitionException { // InternalPureXbase.g:2725:4: ( ( () 'synchronized' '(' ) ) // InternalPureXbase.g:2725:5: ( () 'synchronized' '(' ) { // InternalPureXbase.g:2725:5: ( () 'synchronized' '(' ) // InternalPu...
python
def _set_logger(logger_name, level=logging.INFO): """ Convenience function to quickly configure full debug output to go to the console. """ log = logging.getLogger(logger_name) log.setLevel(level) ch = logging.StreamHandler(None) ch.setLevel(level) ...
python
def resolve_reference(target_reference, project): """ Given a target_reference, made in context of 'project', returns the AbstractTarget instance that is referred to, as well as properties explicitly specified for this reference. """ # Separate target name from properties override assert isinsta...