language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def stageContent(self, configFiles, dateTimeFormat=None): """Parses a JSON configuration file to stage content. Args: configFiles (list): A list of JSON files on disk containing configuration data for staging content. dateTimeFormat (str): A valid date formatting...
java
private int insertFromBlockingEvent(final Collection<UUID> allEntitlementUUIDs, final BlockingState currentBlockingState, final List<SubscriptionEvent> inputExistingEvents, final SupportForOlderVersionThan_0_17_X backwardCompatibleContext, final InternalTenantContext internalTenantContext, final Collection<Subscription...
java
public Node createProxyNode(Object sourceNodeId, Object targetNodeId, GraphDatabaseService graphDb, EntityMetadata sourceEntityMetadata, EntityMetadata targetEntityMetadata) { String sourceNodeIdColumnName = ((AbstractAttribute) sourceEntityMetadata.getIdAttribute()).getJPAColumnName(); ...
python
def findcorrectionhandling(self, cls): """Find the proper correctionhandling given a textclass by looking in the underlying corrections where it is reused""" if cls == "current": return CorrectionHandling.CURRENT elif cls == "original": return CorrectionHandling.ORIGINAL ...
java
public int replace(final K key, final int value) { int curValue = getValue(key); if (curValue != missingValue) { curValue = put(key, value); } return curValue; }
java
public void setMinusSignString(String minusSignString) { if (minusSignString == null) { throw new NullPointerException("The input minus sign is null"); } this.minusString = minusSignString; if (minusSignString.length() == 1) { this.minusSign = minusSignString.char...
java
public static <C extends Page> String absoluteUrlFor(final Class<C> page, final PageParameters parameters, final boolean withServerPort) { final StringBuilder url = new StringBuilder(); url.append(WicketUrlExtensions.getDomainUrl(withServerPort)); url.append(WicketUrlExtensions.getBaseUrl(page, parameters).can...
python
def init(self): # pylint: disable=too-many-branches """Called by the daemon broker to initialize the module""" if not self.enabled: logger.info(" the module is disabled.") return True try: connections = self.test_connection() except Exception as exp:...
java
private void beginTransaction() { if (currentTransaction == null) { try { currentTransaction = StructrApp.getInstance(securityContext).tx(true, false, false); } catch (FrameworkException fex) { // transaction can fail here (theoretically...) logger.warn("Unable to begin transaction.", fex); }...
java
public static CommerceTierPriceEntry findByGroupId_First(long groupId, OrderByComparator<CommerceTierPriceEntry> orderByComparator) throws com.liferay.commerce.price.list.exception.NoSuchTierPriceEntryException { return getPersistence().findByGroupId_First(groupId, orderByComparator); }
python
def bearing_to_nearest_place(feature, parent): """If the impact layer has a distance field, it will return the bearing to the nearest place in degrees. e.g. bearing_to_nearest_place() -> 280 """ _ = feature, parent # NOQA layer = exposure_summary_layer() if not layer: return None ...
java
boolean scanNoParse() { while (true) { switch (state) { case 300: if (peek() == '#' && next() == '[' && next() == '[') { state = 301; continue ; } return fail(); case 301: for (char c=next(); true; c=next()) { if (c == ']' && buf[forward + 1] == ']' && buf[forward + ...
java
@SuppressWarnings("unchecked") public boolean tryStart(final ProcessorGraphNode processorGraphNode) { this.processorLock.lock(); final boolean canStart; try { if (isRunning(processorGraphNode) || isFinished(processorGraphNode) || !allAreFinished(processorGraph...
python
def var(self, ddof=1, *args, **kwargs): """ Compute variance of groups, excluding missing values. Parameters ---------- ddof : integer, default 1 degrees of freedom """ nv.validate_resampler_func('var', args, kwargs) return self._downsample('v...
java
public void setCharset(String charset) { if (StringUtil.isEmpty(charset)) return; this.charset = CharsetUtil.toCharSet(charset.trim()); }
java
public Set<String> getPropAsCaseInsensitiveSet(String key) { return ImmutableSortedSet.copyOf(String.CASE_INSENSITIVE_ORDER, LIST_SPLITTER.split(getProp(key))); }
java
public Mono<Response<ConfigurationSetting>> getSetting(ConfigurationSetting setting) { // Validate that setting and key is not null. The key is used in the service URL so it cannot be null. validateSetting(setting); return service.getKeyValue(serviceEndpoint, setting.key(), setting.label(), nul...
python
def add_rule(self, name, callable_): """Makes rule 'name' available to all subsequently loaded Jamfiles. Calling that rule wil relay to 'callable'.""" assert isinstance(name, basestring) assert callable(callable_) self.project_rules_.add_rule(name, callable_)
java
public Observable<ExpressRouteCircuitsRoutesTableListResultInner> listRoutesTableAsync(String resourceGroupName, String crossConnectionName, String peeringName, String devicePath) { return listRoutesTableWithServiceResponseAsync(resourceGroupName, crossConnectionName, peeringName, devicePath).map(new Func1<Serv...
python
def sel_list_pres(ds_sfc_x): ''' select proper levels for model level data download ''' p_min, p_max = ds_sfc_x.sp.min().values, ds_sfc_x.sp.max().values list_pres_level = [ '1', '2', '3', '5', '7', '10', '20', '30', '50', '70', '100', '125', '150', '175', '20...
java
public String getPrincipalAttributeValue(final Principal p, final String attributeName) { val attributes = p.getAttributes(); if (attributes.containsKey(attributeName)) { return CollectionUtils.toCollection(attributes.get(attributeName)).iterator().next().toString(); } return...
java
public static double Sinh(double x, int nTerms) { if (nTerms < 2) return x; if (nTerms == 2) { return x + (x * x * x) / 6D; } else { double mult = x * x * x; double fact = 6; int factS = 5; double result = x + mult / fact; ...
java
public String getMatch(final byte[] content) throws IOException { final ByteBuffer buf = readBuffer(content); if (buf == null) { return null; } buf.position(0); final boolean matches = match(buf); if (matches) { final int subLen = this.subEntries.size(); final String myMimeType = getMimeType(); ...
python
def _uncythonized_mb_model(self, beta, mini_batch): """ Creates the structure of the model Parameters ---------- beta : np.array Contains untransformed starting values for latent variables mini_batch : int Size of each mini batch of data Returns...
java
public ResponseWrapper removeChatRoomMembers(long roomId, Members members) throws APIConnectionException, APIRequestException { Preconditions.checkArgument(roomId > 0, "room id is invalid"); Preconditions.checkArgument(members != null, "members should not be empty"); return _httpClie...
java
public static void log( GrayF32 input , GrayF32 output ) { output.reshape(input.width,input.height); if( BoofConcurrency.USE_CONCURRENT ) { ImplPixelMath_MT.log(input,output); } else { ImplPixelMath.log(input,output); } }
java
public static <P extends ModelProperty, T extends ModelClass<P>> void buildProperties(Elements elementUtils, T entity, PropertyFactory<T, P> factoryProperty, AnnotationFilter propertyAnnotationFilter, PropertyCreatedListener<T, P> listener) { List<? extends Element> listA = elementUtils.getAllMembers(entity.get...
java
public DescribeTaskSetsRequest withTaskSets(String... taskSets) { if (this.taskSets == null) { setTaskSets(new com.amazonaws.internal.SdkInternalList<String>(taskSets.length)); } for (String ele : taskSets) { this.taskSets.add(ele); } return this; }
java
public List<MavenBuild> getAllBuilds() throws IOException { String path = "/"; try { List<MavenBuild> builds = client.get(path + "job/" + EncodingUtils.encode(this.getName()) + "?tree=allBuilds[number[*],url[*],queueId[*]]", AllMavenBuilds.class).getAllBuilds(); ...
java
protected Label createLabel(Composite parent, String text, boolean bold) { Label label= new Label(parent, SWT.NONE); if (bold) label.setFont(JFaceResources.getBannerFont()); label.setText(text); GridData gridData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); label.setLayoutData(gridData); retur...
java
public static int[] unbox (Integer[] list) { if (list == null) { return null; } int[] unboxed = new int[list.length]; for (int ii = 0; ii < list.length; ii++) { unboxed[ii] = list[ii]; } return unboxed; }
java
private void setupTrigger() { String label = drpTriggerType.getSelected() + " Trigger"; WFieldLayout layout = new WFieldLayout(); layout.setLabelWidth(LABEL_WIDTH); buildControlPanel.add(layout); switch ((TriggerType) drpTriggerType.getSelected()) { case RadioButtonGroup: trigger = new RadioButtonG...
python
def generateLatticeFile(self, beamline, filename=None, format='elegant'): """ generate simulation files for lattice analysis, e.g. ".lte" for elegant, ".madx" for madx input parameters: :param beamline: keyword for beamline :param filename: name of lte/mad file, ...
java
public static String exampleCheck(Class<?> entityClass) { StringBuilder sql = new StringBuilder(); sql.append("<bind name=\"checkExampleEntityClass\" value=\"@tk.mybatis.mapper.util.OGNL@checkExampleEntityClass(_parameter, '"); sql.append(entityClass.getCanonicalName()); sql.append("')\"...
java
@Override public void part(String reason) { Message partMessage = new Message(MessageType.PART, this.channelName, reason); this.client.getConnection().send(partMessage); this.joined = new CountDownLatch(1); }
python
def validate( self, nanopub: Mapping[str, Any] ) -> Tuple[bool, List[Tuple[str, str]]]: """Validates using the nanopub schema Args: nanopub (Mapping[str, Any]): nanopub dict Returns: Tuple[bool, List[Tuple[str, str]]]: bool: Is valid? Yes = ...
python
def trocar_codigo_de_ativacao(self, novo_codigo_ativacao, opcao=constantes.CODIGO_ATIVACAO_REGULAR, codigo_emergencia=None): """Função ``TrocarCodigoDeAtivacao`` conforme ER SAT, item 6.1.15. Troca do código de ativação do equipamento SAT. :param str novo_codigo_ativacao...
python
def to_best_int_float(val): """Get best type for value between int and float :param val: value :type val: :return: int(float(val)) if int(float(val)) == float(val), else float(val) :rtype: int | float >>> to_best_int_float("20.1") 20.1 >>> to_best_int_float("20.0") 20 >>> to_...
python
def top(self, z: float = 0.0) -> Location: """ :param z: the z distance in mm :return: a Point corresponding to the absolute position of the top-center of the well relative to the deck (with the front-left corner of slot 1 as (0,0,0)). If z is specified, ...
java
public static String getRequiredStringParameter(UimaContext context, String parameter) throws ResourceInitializationException { String value = getOptionalStringParameter(context, parameter); checkForNull(value, parameter); return value; }
java
public static void xmlGlobalExistent(Class<?> aClass) { throw new XmlMappingGlobalExistException(MSG.INSTANCE.message(xmlMappingGlobalExistException, aClass.getSimpleName())); }
java
public final EObject ruleXFeatureCall() throws RecognitionException { EObject current = null; Token otherlv_1=null; Token otherlv_3=null; Token otherlv_5=null; Token lv_explicitOperationCall_7_0=null; Token otherlv_10=null; Token otherlv_12=null; EObject ...
java
public BatchGetAggregateResourceConfigResult withUnprocessedResourceIdentifiers(AggregateResourceIdentifier... unprocessedResourceIdentifiers) { if (this.unprocessedResourceIdentifiers == null) { setUnprocessedResourceIdentifiers(new com.amazonaws.internal.SdkInternalList<AggregateResourceIdentifier...
java
@BetaApi public final TargetPool getTargetPool(ProjectRegionTargetPoolName targetPool) { GetTargetPoolHttpRequest request = GetTargetPoolHttpRequest.newBuilder() .setTargetPool(targetPool == null ? null : targetPool.toString()) .build(); return getTargetPool(request); }
java
@Override public Double unmarshal(String object) { return Double.valueOf(Double.parseDouble(object)); }
java
protected boolean parseDefaultClause( DdlTokenStream tokens, AstNode columnNode ) throws ParsingException { assert tokens != null; assert columnNode != null; // defaultClause // : defaultOption // ; // defaultOption : <literal> ...
java
public void marshall(ProvisioningArtifactProperties provisioningArtifactProperties, ProtocolMarshaller protocolMarshaller) { if (provisioningArtifactProperties == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshalle...
python
def _merge_by_type(lhs, rhs, type_): """Helper for '_merge_chunk'.""" merger = _MERGE_BY_TYPE[type_.code] return merger(lhs, rhs, type_)
python
def read_vocab_file(file_path): """Reads a vocab file to memeory. Args: file_path: Each line of the vocab is in the form "token,example_count" Returns: Two lists, one for the vocab, and one for just the example counts. """ with file_io.FileIO(file_path, 'r') as f: vocab_pd = pd.read_csv( ...
java
@Override public Appendable normalize(CharSequence src, Appendable dest) { if(dest==src) { throw new IllegalArgumentException(); } return normalize(src, dest, UnicodeSet.SpanCondition.SIMPLE); }
python
def add(self, resource, replace=False): """Add a resource or an iterable collection of resources. Will throw a ValueError if the resource (ie. same uri) already exists in the ResourceList, unless replace=True. """ if isinstance(resource, collections.Iterable): for r ...
python
def when(string, timezone='UTC', prefer_dates_from='current_period'): """"Returns a MayaDT instance for the human moment specified. Powered by dateparser. Useful for scraping websites. Examples: 'next week', 'now', 'tomorrow', '300 years ago', 'August 14, 2015' Keyword Arguments: stri...
java
public void setThingGroupNames(java.util.Collection<String> thingGroupNames) { if (thingGroupNames == null) { this.thingGroupNames = null; return; } this.thingGroupNames = new java.util.ArrayList<String>(thingGroupNames); }
java
@Override public EClass getIfcIndexedPolyCurve() { if (ifcIndexedPolyCurveEClass == null) { ifcIndexedPolyCurveEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI) .getEClassifiers().get(319); } return ifcIndexedPolyCurveEClass; }
java
protected String get_asynch_idl_cmd(Request request, String idl_cmd) { return deviceProxyDAO.get_asynch_idl_cmd(this, request, idl_cmd); }
java
public void startLink(final VertexContext startVertex) { if (startVertex == null) { return; } final AbstractLayout<Object, JobGraphLink> graphLayout = _graphContext.getGraphLayout(); final int x = (int) graphLayout.getX(startVertex.getVertex()); final int y = (int) g...
python
def _dump_crawl_stats(self): ''' Dumps flattened crawling stats so the spiders do not have to ''' extras = {} spiders = {} spider_set = set() total_spider_count = 0 keys = self.redis_conn.keys('stats:crawler:*:*:*') for key in keys: #...
python
def compile(self): """ Compile this expression into an ODPS SQL :return: compiled DAG :rtype: str """ from ..engines import get_default_engine engine = get_default_engine(self) return engine.compile(self)
java
public static <T> List<String> sortByPinyin(Collection<String> collection) { return sort(collection, new PinyinComparator()); }
java
public List<Interval> filterIntervals(String columnId) { List<Interval> selected = columnSelectionMap.get(columnId); if (selected == null) { return new ArrayList<>(); } return selected; }
java
Integer getColBufLen(int i) { int size; int type; ColumnSchema column; column = table.getColumn(i); type = column.getDataType().getJDBCTypeCode(); switch (type) { case Types.SQL_CHAR : case Types.SQL_CLOB : case ...
python
def copy(self): """Return a deep copy""" result = Vector3(self.size, self.deriv) result.x.v = self.x.v result.y.v = self.y.v result.z.v = self.z.v if self.deriv > 0: result.x.d[:] = self.x.d result.y.d[:] = self.y.d result.z.d[:] = self...
python
def scan_results(self): """Return the scan result.""" bsses = self._wifi_ctrl.scan_results(self._raw_obj) if self._logger.isEnabledFor(logging.INFO): for bss in bsses: self._logger.info("Find bss:") self._logger.info("\tbssid: %s", bss.bssid)...
python
def applet_get_details(object_id, input_params={}, always_retry=True, **kwargs): """ Invokes the /applet-xxxx/getDetails API method. For more info, see: https://wiki.dnanexus.com/API-Specification-v1.0.0/Details-and-Links#API-method%3A-%2Fclass-xxxx%2FgetDetails """ return DXHTTPRequest('/%s/getDet...
java
@RequirePOST public User doCreateAccount(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { return _doCreateAccount(req, rsp, "signup.jelly"); }
java
public List<CmsAccessControlEntry> getAllAccessControlEntries(CmsRequestContext context) throws CmsException { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); List<CmsAccessControlEntry> result = null; try { result = m_driverManager.getAllAccessControlEntries(dbc); ...
python
def _recv(self, line): """Invoked by the connection manager to process incoming data.""" if line == '': return # Only handle query response messages, which are also sent on remote status # updates (e.g. user manually pressed a keypad button) if line[0] != Lutron.OP_RESPONSE: _LOGGER.debu...
java
public IllegalStateException asJDKException() { IllegalStateException e = new IllegalStateException(getMessage()) { @Override public synchronized Throwable fillInStackTrace() { return this; } }; e.setStackTrace(getStackTrace()); return ...
python
def date(f, *args, **kwargs): """Automatically log progress on function entry and exit with date- and time- stamp. Default logging value: info. *Logging with values contained in the parameters of the decorated function* Message (args[0]) may be a string to be formatted with parameters passed to the...
python
def set_pane_position(self, config_id): """Adjusts the position of a GTK Pane to a value stored in the runtime config file. If there was no value stored, the pane's position is set to a default value. :param config_id: The pane identifier saved in the runtime config file """ def...
java
private void parseJSON(JsonObject jsonObject) { for (JsonObject.Member member : jsonObject) { JsonValue value = member.getValue(); if (value.isNull()) { continue; } try { String memberName = member.getName(); if (me...
java
public static MethodParameter forMethodOrConstructor(Object methodOrConstructor, int parameterIndex) { if (methodOrConstructor instanceof Method) { return new MethodParameter((Method) methodOrConstructor, parameterIndex); } else if (methodOrConstructor instanceof Constructor) { r...
python
def Runtime_setCustomObjectFormatterEnabled(self, enabled): """ Function path: Runtime.setCustomObjectFormatterEnabled Domain: Runtime Method name: setCustomObjectFormatterEnabled WARNING: This function is marked 'Experimental'! Parameters: Required arguments: 'enabled' (type: boolean) ->...
java
public void fillMeasures(String measure, JSONObject jsonContent, Pattern pattern, HashMap<String,Double> i){ String tem = (String)jsonContent.get(measure); if(tem != null){ Matcher tM = pattern.matcher(tem); if(tM.find() && !tM.group(1).isEmpty()){ try{ i.put(measure, Double.valueOf(tM.group(1))); ...
java
@Override public ResourceSet<CompositionHook> read(final TwilioRestClient client) { return new ResourceSet<>(this, client, firstPage(client)); }
java
public synchronized void remoteServerRegistrations(RESTRequest request) { Iterator<Entry<NotificationTargetInformation, List<ServerNotification>>> serverNotificationsIter = serverNotifications.entrySet().iterator(); while (serverNotificationsIter.hasNext()) { Entry<NotificationTargetInformat...
python
def _graphics_equal(gfx1, gfx2): ''' Test if two graphics devices should be considered the same device ''' def _filter_graphics(gfx): ''' When the domain is running, the graphics element may contain additional properties with the default values. This function will strip down the ...
java
static void export(String path, List<Queue> queueList, DbConn cnx) throws JqmXmlException { // Argument tests if (path == null) { throw new IllegalArgumentException("file path cannot be null"); } if (queueList == null || queueList.isEmpty()) { ...
python
def prepare_kernel_string(kernel_name, kernel_string, params, grid, threads, block_size_names): """ prepare kernel string for compilation Prepends the kernel with a series of C preprocessor defines specific to this kernel instance: * the thread block dimensions * the grid dimensions * tunab...
java
private void putPlaceholdersIntoMap( MsgNode originalMsg, Iterable<? extends SoyMsgPart> parts, Map<String, Function<Expression, Statement>> placeholderNameToPutStatement) { for (SoyMsgPart child : parts) { if (child instanceof SoyMsgRawTextPart || child instanceof SoyMsgPluralRemainderPart)...
java
protected void connectToJMS(String clientId) throws MessagingException { // Check to see if already connected // if (connected == true) return; try { // Get a JMS Connection // connection = getConnection(); if(clientId != null) { ...
java
@Override public Collection<String> getCliqueFeatures(PaddedList<IN> cInfo, int loc, Clique clique) { Collection<String> features = new HashSet<String>(); boolean doFE = cInfo.get(0).containsKey(DomainAnnotation.class); String domain = (doFE ? cInfo.get(0).get(DomainAnnotation.class) : null); // ...
python
def register(self, module, *args, **kwargs): """ Register a new module. :param module: Either a string module name, or a module class, or a module instance (in which case args and kwargs are invalid). :param kwargs: Settings for the module. ...
java
public static Window display(final String title, final int width, final int height, final Picture picture) { return play(title, width, height, new Animation() { @Override public Picture getPicture() { return picture; } @Override public void update(final double ti...
python
def tr(text, context='@default'): """We define a tr function alias here since the utilities implementation below is not a class and does not inherit from QObject. .. note:: see http://tinyurl.com/pyqt-differences :param text: String to be translated :type text: str, unicode :param context: A ...
java
@Override public EClass getMessagingSerializerPluginConfiguration() { if (messagingSerializerPluginConfigurationEClass == null) { messagingSerializerPluginConfigurationEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(StorePackage.eNS_URI).getEClassifiers().get(99); } return messagingSerializerPlu...
python
def is_expired_token(self, client): """ For a given client will test whether or not the token has expired. This is for testing a client object and does not look up from client_id. You can use _get_client_from_cache() to lookup a client from client_id. """ ...
java
public static BitmapDescriptor vectorToBitmap(@DrawableRes int drawableRes, @ColorRes int colorRes) { Drawable vectorDrawable = VectorDrawableCompat.create(AbstractApplication.get().getResources(), drawableRes, null); Bitmap bitmap = Bitmap.createBitmap(vectorDrawable.getIntrinsicWidth(), vectorDrawable.getIntrinsi...
python
def get_snapshot_table(account): """Generates a table for printing account summary data""" table = formatting.KeyValueTable(["Name", "Value"], title="Account Snapshot") table.align['Name'] = 'r' table.align['Value'] = 'l' table.add_row(['Company Name', account.get('companyName', '-')]) table.add...
python
def _validate(self): """ Step 5 (1st flow) or Step 4 (2nd flow). Process contract for object. """ # disable methods matching before validation self._disable_patching = True # validation by Invariant.validate self._validate_base(self) # enable methods match...
java
public double getBucketMinimum(int i) { if (i > 0) { return bucketLimits[i - 1]; } else if (getBucketCount(i) == 0) { // Edge case -- first bucket, but it is empty return Double.MIN_VALUE; } else { // First bucket is non-empty return ge...
java
@Override public boolean eIsSet(int featureID) { switch (featureID) { case AfplibPackage.GSMT__MCPT: return MCPT_EDEFAULT == null ? mcpt != null : !MCPT_EDEFAULT.equals(mcpt); } return super.eIsSet(featureID); }
python
def extract_spans(html_string): """ Creates a list of the spanned cell groups of [row, column] pairs. Parameters ---------- html_string : str Returns ------- list of lists of lists of int """ try: from bs4 import BeautifulSoup except ImportError: print("ERRO...
java
public static void runExample(AdWordsServicesInterface adWordsServices, AdWordsSession session) throws IOException { // Get the MediaService. MediaServiceInterface mediaService = adWordsServices.get(session, MediaServiceInterface.class); // Create HTML5 media. byte[] html5Zip = com.google...
python
def platform_information(_linux_distribution=None): """ detect platform information from remote host """ linux_distribution = _linux_distribution or platform.linux_distribution distro, release, codename = linux_distribution() if not distro: distro, release, codename = parse_os_release() if n...
java
@Override public double[] getVotesForInstance(Instance inst) { if (m_weights == null) { return new double[inst.numClasses()]; } double[] result = (inst.classAttribute().isNominal()) ? new double[inst.numClasses()] : new double[1]; ...
python
def _set_current(self, new_current): """ Change the current default prefix, for internal usage Args: new_current(str): Name of the new current prefix, it must already exist Returns: None Raises: PrefixNotFound: if the given p...
java
@Override public String handleEventMessage(String msg, Object msgdoc, Map<String, String> metainfo) throws EventHandlerException { return null; }
python
def bands(self): """ An iterable of all bands in this scale """ if self._bands is None: self._bands = self._compute_bands() return self._bands
python
def encodeAA(seq_vec, maxlen=None, seq_align="start", encode_type="one_hot"): """Convert the Amino-acid sequence into 1-hot-encoding numpy array # Arguments seq_vec: List of strings/amino-acid sequences maxlen: Maximum sequence length. See `pad_sequences` for more detail seq_align: How ...