language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def row_contributions(self, X): """Returns the row contributions towards each principal component.""" utils.validation.check_is_fitted(self, 's_') # Check input if self.check_input: utils.check_array(X, dtype=[str, np.number]) # Prepare input X = self._prepa...
java
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.GCMRKRG__XPOS: return getXPOS(); case AfplibPackage.GCMRKRG__YPOS: return getYPOS(); } return super.eGet(featureID, resolve, coreType); }
java
public static double det( DMatrix2x2 mat ) { return mat.a11*mat.a22 - mat.a12*mat.a21; }
java
public boolean isJDBCDriver(String jdbcDriverName) throws Exception { Address addr = Address.root().add(SUBSYSTEM, SUBSYSTEM_DATASOURCES); String haystack = JDBC_DRIVER; return null != findNodeInList(addr, haystack, jdbcDriverName); }
java
public PlacementDescription withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
java
public Word07Writer flush(OutputStream out, boolean isCloseOut) throws IORuntimeException { Assert.isFalse(this.isClosed, "WordWriter has been closed!"); try { this.doc.write(out); out.flush(); } catch (IOException e) { throw new IORuntimeException(e); } finally { if (isCloseOut) { IoUt...
java
private void revertInsertRow(long id, int row, boolean reuseRow) { // INFORM INSIDER insider.uninserting(clazz, id); idColl.cancelId(id); // UNDO CHANGE #1 if (reuseRow) { deleted.add(row); // UNDO CHANGE #2 } else { rows--; // UNDO CHANGE #3 } idColl.delete(id); // UNDO CHANGE #4 size--; // U...
java
@Nullable public Animator createAnimator(@NonNull ViewGroup sceneRoot, @Nullable TransitionValues startValues, @Nullable TransitionValues endValues) { return null; }
python
def _set_frr_cspf_group_computation_mode(self, v, load=False): """ Setter method for frr_cspf_group_computation_mode, mapped from YANG variable /mpls_state/rsvp/sessions/psbs/frr_cspf_group_computation_mode (frr-cspf-group-computation-mode) If this variable is read-only (config: false) in the source YAN...
python
def _gpio_callback(self, gpio): """ Gets triggered whenever the the gpio state changes :param gpio: Number of gpio that changed :type gpio: int :rtype: None """ self.debug(u"Triggered #{}".format(gpio)) try: index = self.gpios.index(gpio) ...
java
public void marshall(TypedLinkFacet typedLinkFacet, ProtocolMarshaller protocolMarshaller) { if (typedLinkFacet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(typedLinkFacet.getName(), NAME_BINDIN...
python
def load_image(file) -> DataAndMetadata.DataAndMetadata: """ Loads the image from the file-like object or string file. If file is a string, the file is opened and then read. Returns a numpy ndarray of our best guess for the most important image in the file. """ if isinstance(file, str) or is...
java
public void setDayFormatter(DayFormatter formatter) { adapter.setDayFormatter(formatter == null ? DayFormatter.DEFAULT : formatter); }
java
public void setCharacterStream(final int parameterIndex, final Reader reader) throws SQLException { if(reader == null) { setNull(parameterIndex, Types.BLOB); return; } try { setParameter(parameterIndex, new BufferedReaderParameter(reader)); } catch (...
java
private void setXPathCharacteristics(IdentifierImpl identifier) throws InvalidXPathSyntaxException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) tc.entry(cclass, "setXPathCharacteristics", "identifier: " + identifier); // Need to set the domain...
python
def get(cls, whitelist_id, whitelist_result_id, note_text_whitelist_result_id, monetary_account_id=None, custom_headers=None): """ :type api_context: context.ApiContext :type user_id: int :type monetary_account_id: int :type whitelist_id: int :type...
python
def get_model(self): ''' `object` of model as a function approximator, which has `lstm_model` whose type is `pydbm.rnn.lstm_model.LSTMModel`. ''' class Model(object): def __init__(self, lstm_model): self.lstm_model = lstm_model return Model(sel...
python
def gnuplot_2d(x, y, filename, title='', x_label='', y_label=''): ''' Function to produce a general 2D plot. Args: x (list): x points. y (list): y points. filename (str): Filename of the output image. title (str): Title of the plot. Default is '' (no title). x_label...
python
def validate(self, value): """ Return True if the choice is an integer; False otherwise. If the value was cast successfully to an int, set the choice that will make its way into the answers dict to the cast int value, not the string representation. """ try: ...
java
public static Object extractWriteArray(final DeviceAttribute da, final AttrWriteType writeType, final AttrDataFormat format) throws DevFailed { if (da == null) { throw DevFailedUtils.newDevFailed(ERROR_MSG_DA); } return InsertExtractFactory.getAttributeExtractor(da.getType()).extractWriteArray(da, writeTyp...
python
def get_versio_versioning_scheme(full_class_path): """Return a class based on it's full path""" module_path = '.'.join(full_class_path.split('.')[0:-1]) class_name = full_class_path.split('.')[-1] try: module = importlib.import_module(module_path) except ImportError: raise RuntimeErr...
python
def html(self, label, *msg): """ Prints html in notebook """ lbl = "[" + label + "] " txt = lbl + " " + " ".join(list(msg)) if self.notebook is True: html = HTML(txt) display(lbl + html) else: print(lbl + txt)
java
private boolean ignoreMethod(String name) { boolean result = false; for (String ignoredName : IGNORED_METHODS) { if (name.matches(ignoredName)) { result = true; break; } } return result; }
python
def update_reimburse(self, card_id, encrypt_code, reimburse_status): """ 报销方更新发票信息 详情请参考 https://mp.weixin.qq.com/wiki?id=mp1496561749_f7T6D :param card_id: 发票卡券的 Card ID :param encrypt_code: 发票卡券的加密 Code :param reimburse_status: 发票报销状态 """ return...
java
public static <T, A> Answer<T> toAnswer(final Answer1<T, A> answer) { return new Answer<T>() { @SuppressWarnings("unchecked") public T answer(InvocationOnMock invocation) throws Throwable { return answer.answer((A)invocation.getArgument(0)); } }; }
python
def publishApp(self, app_info, map_info=None, fsInfo=None): """Publishes apps to AGOL/Portal Args: app_info (list): A list of JSON configuration apps to publish. map_info (list): Defaults to ``None``. fsInfo (list): Defaults to ``None``. Returns: ...
java
public void merge(ExtractionResult extractionResult) { for (Result result : extractionResult.results) { add(result.getObject(), result.getResultName()); } }
java
public static String getMD5Hash(String text) { MessageDigest md; byte[] md5hash = new byte[32]; try { md = MessageDigest.getInstance("MD5"); md.update(text.getBytes("iso-8859-1"), 0, text.length()); md5hash = md.digest(); } catch (NoSuchAlgorithmException e) { e.printStackTrace()...
python
def get_parameters(self): """gets from all wrapped processors""" d = {} for p in self.processors: parameter_names = list(p.PARAMETERS.keys()) parameter_values = [getattr(p, n) for n in parameter_names] d.update(dict(zip(parameter_names, parameter_values))) ...
java
@Override protected void internalExecute() throws MojoExecutionException, MojoFailureException { if ( skipMain ) { getLog().info( "Not compiling main sources" ); return; } super.internalExecute(); if ( outputDirectory.isDirectory() ) ...
python
def approximate_controls(model, verbose=False, steady_state=None, eigmax=1.0-1e-6, solve_steady_state=False, order=1): """Compute first order approximation of optimal controls Parameters: ----------- model: NumericModel Model to be solved verbose: boolean ...
python
def add_episode(db, aid, episode): """Add an episode.""" values = { 'aid': aid, 'type': episode.type, 'number': episode.number, 'title': episode.title, 'length': episode.length, } upsert(db, 'episode', ['aid', 'type', 'number'], values)
java
public static <T1, T2, T3> TriPredicate<T1, T2, T3> spy1st(TriPredicate<T1, T2, T3> predicate, Box<T1> param1) { return spy(predicate, Box.<Boolean>empty(), param1, Box.<T2>empty(), Box.<T3>empty()); }
java
public DateEnd setDateEnd(Date dateEnd, boolean hasTime) { DateEnd prop = (dateEnd == null) ? null : new DateEnd(dateEnd, hasTime); setDateEnd(prop); return prop; }
java
@Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest req = HttpServletRequest.class.cast(request); String url = req.getRequestURI(); LoggerFactory.getLogger(getClass()).debug("Request st...
java
@Override public CPOptionValue findByC_ERC(long companyId, String externalReferenceCode) throws NoSuchCPOptionValueException { CPOptionValue cpOptionValue = fetchByC_ERC(companyId, externalReferenceCode); if (cpOptionValue == null) { StringBundler msg = new StringBundler(6); msg.append(_NO_SUCH_ENTIT...
python
def compile_resource(resource): """ Return compiled regex for resource matching """ return re.compile("^" + trim_resource(re.sub(r":(\w+)", r"(?P<\1>[\w-]+?)", resource)) + r"(\?(?P<querystring>.*))?$")
java
@Override public void open(Configuration configuration) throws Exception { // determine the offset commit mode this.offsetCommitMode = OffsetCommitModes.fromConfiguration( getIsAutoCommitEnabled(), enableCommitOnCheckpoints, ((StreamingRuntimeContext) getRuntimeContext()).isCheckpointingEnabled()); ...
python
def simple_repr(obj: Any, attrnames: List[str], with_addr: bool = False, joiner: str = COMMA_SPACE) -> str: """ Convenience function for :func:`__repr__`. Works its way through a list of attribute names, and creates a ``repr()`` representation assuming that parameters to the constructor ...
python
def argsort2(indexable, key=None, reverse=False): """ Returns the indices that would sort a indexable object. This is similar to np.argsort, but it is written in pure python and works on both lists and dictionaries. Args: indexable (list or dict): indexable to sort by Returns: ...
python
def get_model_class( klass, api = None, use_request_api = True): """ Generates the Model Class based on the klass loads automatically the corresponding json schema file form schemes folder :param klass: json schema filename :param use_request_api: if True autoinitializes request class if api is Non...
java
public static String canonicalize(String str) { if (str == null) return null; int length = str.length(); char ch; StringBuffer buf = new StringBuffer(length); for (int i=0;i<length;i++) { ch = str.charAt(i); if (ch == '_') continue; buf.append( Character.toLowerCase(ch) ); } return buf.toString();...
python
def binary(self): """ return encoded representation """ if isinstance(self.value, int): return b_chr(_TAG_ATOM_CACHE_REF) + b_chr(self.value) elif isinstance(self.value, TypeUnicode): value_encoded = self.value.encode('utf-8') length = len(valu...
python
def precise_diff(d1, d2): """ Calculate a precise difference between two datetimes. :param d1: The first datetime :type d1: datetime.datetime or datetime.date :param d2: The second datetime :type d2: datetime.datetime or datetime.date :rtype: PreciseDiff """ sign = 1 if d1 ==...
java
public Regex group(String name) { return re("(" + (StringUtils.isNotNullOrBlank(name) ? "?<" + name + ">" : StringUtils.EMPTY) + pattern + ")"); }
python
def send_short_lpp_packet(self, dest_id, data): """ Send ultra-wide-band LPP packet to dest_id """ pk = CRTPPacket() pk.port = CRTPPort.LOCALIZATION pk.channel = self.GENERIC_CH pk.data = struct.pack('<BB', self.LPS_SHORT_LPP_PACKET, dest_id) + data self....
python
def join(self): """ Wait for all task to finish """ pending = set() exceptions = set() while len(self._tasks) > 0 or len(pending) > 0: while len(self._tasks) > 0 and len(pending) < self._concurrency: task, args, kwargs = self._tasks.pop(0) ...
python
async def get_participant(self, p_id: int, force_update=False) -> Participant: """ get a participant by its id |methcoro| Args: p_id: participant id force_update (dfault=False): True to force an update to the Challonge API Returns: Participant: None...
java
@Override public Request<DeleteLaunchTemplateVersionsRequest> getDryRunRequest() { Request<DeleteLaunchTemplateVersionsRequest> request = new DeleteLaunchTemplateVersionsRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; }
python
def _url_for_email(endpoint, base_url=None, **kw): """ Create an external url_for by using a custom base_url different from the domain we are on :param endpoint: :param base_url: :param kw: :return: """ base_url = base_url or config("MAIL_EXTERNAL_BASE_URL") _external = True if n...
python
def fast_sync_inspect_snapshot( snapshot_path ): """ Inspect a snapshot Return useful information Return {'status': True, 'signatures': ..., 'payload_size': ..., 'sig_append_offset': ..., 'hash': ...} on success Return {'error': ...} on error """ with open(snapshot_path, 'r') as f: i...
java
public void start() { Preconditions.checkState(Thread.currentThread().equals(ourThread), "Not in the correct thread"); client.addParentWatcher(watcher); }
python
def _ParseProcessingOptions(self, options): """Parses the processing options. Args: options (argparse.Namespace): command line arguments. Raises: BadConfigOption: if the options are invalid. """ self._single_process_mode = getattr(options, 'single_process', False) argument_helper_...
java
public <S extends Storable> void resync(Class<S> type, double desiredSpeed, String filter, Object... filterValues) throws RepositoryException { resync(type, null,...
java
protected List<OUT> executeOnCollections(RuntimeContext ctx, ExecutionConfig executionConfig) throws Exception { @SuppressWarnings("unchecked") InputFormat<OUT, InputSplit> inputFormat = (InputFormat<OUT, InputSplit>) this.formatWrapper.getUserCodeObject(); //configure the input format inputFormat.configure(thi...
java
@Override public CommerceOrderItem fetchByC_S_First(long commerceOrderId, boolean subscription, OrderByComparator<CommerceOrderItem> orderByComparator) { List<CommerceOrderItem> list = findByC_S(commerceOrderId, subscription, 0, 1, orderByComparator); if (!list.isEmpty()) { return list.get(0); } r...
python
def delete(self, id: int): """ Delete asset class """ assert isinstance(id, int) self.open_session() to_delete = self.get(id) self.session.delete(to_delete) self.save()
python
def solve(self,b,overwrite_b=False,check_finite=True, p=None): """ solve A \ b """ if p is None: assert b.shape[:2]==(len(self.solver),self.dof_any) solution = np.empty(b.shape) #This is trivially parallelizable: for p in range(self.P): ...
python
def check_and_set_unreachability(self, hosts, services): """ Check if all dependencies are down, if yes set this object as unreachable. todo: this function do not care about execution_failure_criteria! :param hosts: hosts objects, used to get object in act_depend_of :ty...
java
public long[] asEpochSecondArray(ZoneOffset offset) { long[] output = new long[data.size()]; for (int i = 0; i < data.size(); i++) { LocalDateTime dateTime = PackedLocalDateTime.asLocalDateTime(data.getLong(i)); if (dateTime == null) { output[i] = Long.MIN_VALUE; ...
java
public void copyVendorExtensions(Schema source, Schema target) { if (source.getExtensions() != null) { Map<String, Object> vendorExtensions = source.getExtensions(); for (String extName : vendorExtensions.keySet()) { ((SchemaImpl) target).addExtension_compat(extName, vend...
java
public String compile(JoinableResourceBundle bundle, String content, String path, GeneratorContext context) { JawrLessSource source = new JawrLessSource(bundle, content, path, rsHandler); try { CompilationResult result = compiler.compile(source, lessConfig); addLinkedResources(path, context, source.getLinked...
python
def SLICE_0(self, instr): 'obj[:]' value = self.ast_stack.pop() kw = dict(lineno=instr.lineno, col_offset=0) slice = _ast.Slice(lower=None, step=None, upper=None, **kw) subscr = _ast.Subscript(value=value, slice=slice, ctx=_ast.Load(), **kw) self.ast_stack.append(subscr...
python
def read32(bytestream): """Read 4 bytes from bytestream as an unsigned 32-bit integer.""" dt = np.dtype(np.uint32).newbyteorder('>') return np.frombuffer(bytestream.read(4), dtype=dt)[0]
python
def plot(self, x, y, **kw): """plot x, y values (erasing old plot), for method options see PlotPanel.plot. """ return self.frame.plot(x,y,**kw)
python
def stop_recording(self): """ Stops writing video to file. """ if not self._recording: raise Exception("Cannot stop a video recording when it's not recording!") self._cmd_q.put(('stop',)) self._recording = False
java
@Override public com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion deleteCommerceUserSegmentCriterion( com.liferay.commerce.user.segment.model.CommerceUserSegmentCriterion commerceUserSegmentCriterion) throws com.liferay.portal.kernel.exception.PortalException { return _commerceUserSegmentCrit...
python
def pipe_count(context=None, _INPUT=None, conf=None, **kwargs): """An operator that counts the number of _INPUT items and yields it forever. Not loopable. Parameters ---------- context : pipe2py.Context object _INPUT : pipe2py.modules pipe like object (iterable of items) conf : not used ...
python
def remove(self, rel_path, propagate=False): '''Delete the file from the cache, and from the upstream''' repo_path = os.path.join(self.cache_dir, rel_path) if os.path.exists(repo_path): os.remove(repo_path) if self.upstream and propagate: self.upstream.remove(re...
java
public static <L> Builder<L> builder(Resource<L> template) { return new Builder<L>(template); }
python
def apply_color(self, arr, state): """Apply color formula to an array.""" ops = self.cmd(state) for func in parse_operations(ops): arr = func(arr) return arr
java
public void into(@NonNull RemoteViews remoteViews, @IdRes int viewId, int notificationId, @NonNull Notification notification, @Nullable String notificationTag) { into(remoteViews, viewId, notificationId, notification, notificationTag, null); }
python
def parent(self): "Get this object's parent" if self._parent: return self._parent # auto-compute parent if needed elif getattr(self, '__parent_type__', None): return self._get_subfolder('..' if self._url[2].endswith('/') ...
python
def bioul_tags_to_spans(tag_sequence: List[str], classes_to_ignore: List[str] = None) -> List[TypedStringSpan]: """ Given a sequence corresponding to BIOUL tags, extracts spans. Spans are inclusive and can be of zero length, representing a single word span. Ill-formed spans are n...
java
private String createURLs( String jsonString ) { String urlPattern = "(?:(?:https?|file)://)[^\"\\r\\n]+"; jsonString = jsonString.replaceAll(urlPattern, "<a href=$0>$0</a>"); return jsonString; }
python
def loadUnStructuredGrid(filename): # not tested """Load a ``vtkunStructuredGrid`` object from file and return a ``Actor(vtkActor)`` object.""" reader = vtk.vtkUnstructuredGridReader() reader.SetFileName(filename) reader.Update() gf = vtk.vtkUnstructuredGridGeometryFilter() gf.SetInputConnectio...
python
def FromManagedObject(self): """ Method creates and returns an object of _GenericMO class using the classId and other information from the managed object. """ import os if (isinstance(self.mo, ManagedObject) == True): self.classId = self.mo.classId if self.mo.getattr('Dn'): self.dn = self.mo.get...
java
@Override public ListQualificationRequestsResult listQualificationRequests(ListQualificationRequestsRequest request) { request = beforeClientExecution(request); return executeListQualificationRequests(request); }
java
public ServiceFuture<ExpressRoutePortInner> beginCreateOrUpdateAsync(String resourceGroupName, String expressRoutePortName, ExpressRoutePortInner parameters, final ServiceCallback<ExpressRoutePortInner> serviceCallback) { return ServiceFuture.fromResponse(beginCreateOrUpdateWithServiceResponseAsync(resourceGrou...
python
def accept_project_transfers(access_level,queue,org,share_with_org=None): """ Args: access_level: `str`. Permissions level the new member should have on transferred projects. Should be one of ["VIEW","UPLOAD","CONTRIBUTE","ADMINISTER"]. See https://wiki.dnanexus.com/A...
java
@Override protected void logIncrementalStatsByAccount(String account, RunStats stats) { DuplicationRunStats dstats = (DuplicationRunStats) stats; log.info("Session stats by account (incremental): account={} dups={} deletes={}", account, dstats.getDups(), dstats.getDeletes()); }
java
public Response createCharsetResponse(CloseableHttpResponse httpResponse) throws IOException { HttpEntity entity = httpResponse.getEntity(); Charset charset = ContentType.getOrDefault(httpResponse.getEntity()).getCharset(); charset = (charset == null) ? Charset.defaultCharset() : charset; ...
java
public void uploadDirectoryWithRetries(final String ftpServer, final String username, final String password, final String sourceDirectory, final String targetDirectory, final int maxRetryCount) throws MojoExecutionException { ...
python
def main(argv=None): """Run a Tensorflow model on the Iris dataset.""" args = parse_arguments(sys.argv if argv is None else argv) tf.logging.set_verbosity(tf.logging.INFO) learn_runner.run( experiment_fn=get_experiment_fn(args), output_dir=args.job_dir)
python
def list_tickets(self, **kwargs): """List all tickets, optionally filtered by a view. Specify filters as keyword arguments, such as: filter_name = one of ['all_tickets', 'new_my_open', 'spam', 'deleted', None] (defaults to 'all_tickets'; passing None u...
python
def lemmatize(self): """Return the lemma of each word in this WordList. Currently using NLTKPunktTokenizer() for all lemmatization tasks. This might cause slightly different tokenization results compared to the TextBlob.words property. """ _lemmatizer = PatternParserLem...
python
def reasoning_routine(self, groups, check, priority_flag=3, _top_level=True): """ print routine performed @param list groups: the Result groups @param str check: checker name @param int priority_flag: indicates the weight of the groups @param boo...
python
def _init_org(self): """ Test and refresh credentials to the org specified. """ self.logger.info( "Verifying and refreshing credentials for the specified org: {}.".format( self.org_config.name ) ) orig_config = self.org_config.config.copy() ...
java
protected String formatHTTPURLParameters(HTTPFaxClientSpi faxClientSpi,FaxJob faxJob) { //get URL parameters String urlParametersTemplate=faxClientSpi.getHTTPURLParameters(); //format URL parameters String urlParameters=SpiUtil.formatTemplate(urlParametersTemplate,faxJob,Spi...
java
public static URI getRelativePath(final URI relativePath) { final StringTokenizer tokenizer = new StringTokenizer(relativePath.toString(), URI_SEPARATOR); final StringBuilder buffer = new StringBuilder(); if (tokenizer.countTokens() == 1) { return null; } else { w...
python
def _FormatSocketExToken(self, token_data): """Formats an extended socket token as a dictionary of values. Args: token_data (bsm_token_data_socket_ex): AUT_SOCKET_EX token data. Returns: dict[str, str]: token values. """ if token_data.socket_domain == 10: local_ip_address = self....
python
def validate_request(self, uri, http_method='GET', body=None, headers=None): """Validate a signed OAuth request. :param uri: The full URI of the token request. :param http_method: A valid HTTP verb, i.e. GET, POST, PUT, HEAD, etc. :param body: The request body a...
java
public static final String encode(String str, Charset charset) { return encode(str, charset.name()); }
python
def list_scores(self, update_keys, session=None, lightweight=None): """ Returns a list of current scores for the given events. :param list update_keys: The filter to select desired markets. All markets that match the criteria in the filter are selected e.g. [{'eventId': '28205674', 'las...
java
public SmtpProtocol createSmtpProtocolFromString(EDataType eDataType, String initialValue) { SmtpProtocol result = SmtpProtocol.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return re...
java
public static Class requiredClassAttribute( final XMLStreamReader reader, final String namespace, final String localName) throws XMLStreamException { final String value = reader.getAttributeValue(namespace, localName); if (value != null) { try { ...
java
public ServiceCall<Grammar> getGrammar(GetGrammarOptions getGrammarOptions) { Validator.notNull(getGrammarOptions, "getGrammarOptions cannot be null"); String[] pathSegments = { "v1/customizations", "grammars" }; String[] pathParameters = { getGrammarOptions.customizationId(), getGrammarOptions.grammarName(...
java
public boolean isSpinnerTextSelected(String text) { if(config.commandLogging){ Log.d(config.commandLoggingTag, "isSpinnerTextSelected(\""+text+"\")"); } return checker.isSpinnerTextSelected(text); }
python
def _get_query_argument(args, cell, env): """ Get a query argument to a cell magic. The query is specified with args['query']. We look that up and if it is a BQ query just return it. If it is instead a SqlModule or SqlStatement it may have variable references. We resolve those using the arg parser for the SqlM...
python
def memory(self): """Property to provide reference to `MemoryCollection` instance It is calculated once when the first time it is queried. On refresh, this property gets reset. """ return memory.MemoryCollection( self._conn, utils.get_subresource_path_by(self, 'Memor...