language
stringclasses
2 values
func_code_string
stringlengths
63
466k
python
def rate_limited(max_per_hour: int, *args: Any) -> Callable[..., Any]: """Decorator to limit function to N calls/hour.""" min_interval = 3600.0 / float(max_per_hour) def _decorate(func: Callable[..., Any]) -> Callable[..., Any]: things = [func.__name__] things.extend(args) key = ""....
python
def create_session(self, username, prekeybundle, autotrust=False): """ :param username: :type username: str :param prekeybundle: :type prekeybundle: PreKeyBundle :return: :rtype: """ logger.debug("create_session(username=%s, prekeybunder=[omitted],...
java
public void clientConnected(RespokeClient client) { if (null != pushToken) { registerPushServices(); } if (!factoryStaticInitialized) { // Perform a one-time WebRTC global initialization PeerConnectionFactory.initializeAndroidGlobals(context, true, true, true...
java
private DiscountCurve createDiscountCurve(String discountCurveName) { DiscountCurve discountCurve = model.getDiscountCurve(discountCurveName); if(discountCurve == null) { discountCurve = DiscountCurveInterpolation.createDiscountCurveFromDiscountFactors(discountCurveName, new double[] { 0.0 }, new double[] { 1.0 ...
java
public String getStringAttribute(String name, String defaultValue) { return getValue(stringAttributes, name, defaultValue); }
python
def vb_list_machines(**kwargs): ''' Which machines does the hypervisor have @param kwargs: Passed to vb_xpcom_to_attribute_dict to filter the attributes @type kwargs: dict @return: Untreated dicts of the machines known to the hypervisor @rtype: [{}] ''' manager = vb_get_manager() mac...
python
def from_config(cls, cp, model, nprocesses=1, use_mpi=False): """ Loads the sampler from the given config file. For generating the temperature ladder to be used by emcee_pt, either the number of temperatures (provided by the option 'ntemps'), or the path to a file storing invers...
python
def read_namespaced_pod(self, name, namespace, **kwargs): # noqa: E501 """read_namespaced_pod # noqa: E501 read the specified Pod # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread ...
java
@NonNull @CheckResult @Override public Flowable<DeleteResults<T>> asRxFlowable(@NonNull BackpressureStrategy backpressureStrategy) { return RxJavaUtils.createFlowable(storIOSQLite, this, backpressureStrategy); }
python
def _decoherence_noise_model(gates, T1=30e-6, T2=30e-6, gate_time_1q=50e-9, gate_time_2q=150e-09, ro_fidelity=0.95): """ The default noise parameters - T1 = 30 us - T2 = 30 us - 1q gate time = 50 ns - 2q gate time = 150 ns are currently typical for near-term de...
python
def select_graphic_rendition(self, *attrs): """Set display attributes. :param list attrs: a list of display attributes to set. """ replace = {} # Fast path for resetting all attributes. if not attrs or attrs == (0, ): self.cursor.attrs = self.default_char ...
python
def file_fingerprint(fullpath): """ Get a metadata fingerprint for a file """ stat = os.stat(fullpath) return ','.join([str(value) for value in [stat.st_ino, stat.st_mtime, stat.st_size] if value])
java
public Collection storeObjects(Collection objects) { try { /* One possibility of storing objects is to use the current transaction associated with the container */ Transaction tx = odmg.currentTransaction(); for (Iterator iterator = objects.ite...
python
def do_mag_map(date, lon_0=0, alt=0, file="", mod="cals10k",resolution='low'): """ returns lists of declination, inclination and intensities for lat/lon grid for desired model and date. Parameters: _________________ date = Required date in decimal years (Common Era, negative for Before Common E...
java
public boolean getIsXml() { if (m_isXml == null) { m_isXml = Boolean.valueOf( CmsResourceTypeXmlPage.isXmlPage(this) || CmsResourceTypeXmlContent.isXmlContent(this)); } return m_isXml.booleanValue(); }
java
public static boolean isRegistered(@Nonnull Item item) { ItemDeletion instance = instance(); if (instance == null) { return false; } instance.lock.readLock().lock(); try { return instance.registrations.contains(item); } finally { instan...
java
public static void renameSubreportsInMaster(List<JcrFile> jasperFiles, String id) { if (jasperFiles.size() > 1) { JcrFile masterFile = jasperFiles.get(0); try { String masterContent = new String(masterFile.getDataProvider().getBytes(), "UTF-8"); List<String> subreportsContent = new ArrayL...
python
def _to_dict(self): """Return a json dictionary representing this model.""" _dict = {} if hasattr(self, 'collection_id') and self.collection_id is not None: _dict['collection_id'] = self.collection_id if hasattr(self, 'status') and self.status is not None: _dict['...
python
def adjust_text(x, y, texts, ax=None, expand_text=(1.2, 1.2), expand_points=(1.2, 1.2), autoalign=True, va='center', ha='center', force_text=1., force_points=1., lim=100, precision=0, only_move={}, text_from_text=True, text_from_points=True, save_steps=Fa...
java
private Integer getIntegerTimeInMinutes(Date date) { Integer result = null; if (date != null) { Calendar cal = DateHelper.popCalendar(date); int time = cal.get(Calendar.HOUR_OF_DAY) * 60; time += cal.get(Calendar.MINUTE); DateHelper.pushCalendar(cal); re...
python
def auto2unicode(text): """ This function tries to identify encode in available encodings. If it finds, then it will convert text into unicode string. Author : Arulalan.T 04.08.2014 """ _all_unique_encodes_, _all_common_encodes_ = _get_unique_common_encodes() # get unique...
python
def loadValues(self, values): """ Loads the values from the inputed dictionary to the widget. :param values | <dict> """ table = self.tableType() if table: schema = table.schema() else: schema = None ...
java
protected void recoveryCompleted(Transaction transaction) throws ObjectManagerException { throw new InvalidStateException(this, InternalTransaction.stateTerminated, InternalTransaction.stateNames[InternalTransaction.stateTerminated]); }
java
@Override public void visitCode() { if (injectedTraceAnnotationVisitor == null && classAdapter.isInjectedTraceAnnotationRequired()) { AnnotationVisitor av = visitAnnotation(INJECTED_TRACE_TYPE.getDescriptor(), true); av.visitEnd(); } super.visitCode(); // La...
java
public static CommerceWarehouseItem fetchByCommerceWarehouseId_First( long commerceWarehouseId, OrderByComparator<CommerceWarehouseItem> orderByComparator) { return getPersistence() .fetchByCommerceWarehouseId_First(commerceWarehouseId, orderByComparator); }
java
private boolean hoistIfExtern(CompilerInput input) { if (input.getHasExternsAnnotation()) { // If the input file is explicitly marked as an externs file, then move it out of the main // JS root and put it with the other externs. externsRoot.addChildToBack(input.getAstRoot(this)); JSModule m...
python
def findattr(self, name, resolved=True): """ Find an attribute type definition. @param name: An attribute name. @type name: basestring @param resolved: A flag indicating that the fully resolved type should be returned. @type resolved: boolean @return: ...
python
def masking_noise(data, sess, v): """Apply masking noise to data in X. In other words a fraction v of elements of X (chosen at random) is forced to zero. :param data: array_like, Input data :param sess: TensorFlow session :param v: fraction of elements to distort, float :return: transformed...
python
def parse_lines(stream, separator=None): """ Takes each line of a stream, creating a generator that yields tuples of line, row - where row is the line split by separator (or by whitespace if separator is None. :param stream: :param separator: (optional) :return: generator """ separa...
java
public void declareInternalData(int maxRows, int maxCols) { this.maxRows = maxRows; this.maxCols = maxCols; U_tran = new DMatrixRMaj(maxRows,maxRows); Qm = new DMatrixRMaj(maxRows,maxRows); r_row = new double[ maxCols ]; }
python
def ensure_coordinator_ready(self): """Block until the coordinator for this group is known (and we have an active connection -- java client uses unsent queue). """ with self._client._lock, self._lock: while self.coordinator_unknown(): # Prior to 0.8.2 there w...
java
public String getSelectionInfo(){ StringBuilder result = new StringBuilder(); result.append( "SelectionInfo: "+this.getClass().toString() +"\n" ); result.append( "Page:"+ CITInfo( pageHandling )+"\n" ); result.append( "FirstParagraph:" +CITInfo( firstParagraphHandling )+"\n"); for( String key: sectionHandl...
java
public int getStatementCount() { int ret = 0; for (final StatementGroup sg : statementGroups) { ret += sg.getAllStatements().size(); } return ret; }
python
def columnise(rows, padding=2): """Print rows of entries in aligned columns.""" strs = [] maxwidths = {} for row in rows: for i, e in enumerate(row): se = str(e) nse = len(se) w = maxwidths.get(i, -1) if nse > w: maxwidths[i] = nse...
java
@Override public Response attachStatement(String CorpNum, int ItemCode, String MgtKey, int SubItemCode, String SubMgtKey) throws PopbillException{ DocRequest request = new DocRequest(); request.ItemCode = SubItemCode; request.MgtKey = SubMgtKey; String PostData = toJsonString(request); r...
java
@Override public IEntityGroup newInstance(Class entityType) throws GroupsException { log.warn("Unsupported method accessed: SmartLdapGroupStore.newInstance"); throw new UnsupportedOperationException(UNSUPPORTED_MESSAGE); }
python
def get_status(api_subject): ''' Gets a string representing the status of the Api subject (role or service) based on the health summary and health checks. ''' summary = api_subject.healthSummary if summary is None: return None # status string always starts with "<nagios code>: <summary>" status = ...
java
public static void applyRegisteredControls(final Request request, final boolean useRequestValues) { Set<String> controls = getRegisteredSubordinateControls(); if (controls == null) { return; } // Process Controls for (String controlId : controls) { // Find the Component for this ID ComponentWithCon...
java
public ServiceFuture<PublicIPAddressInner> beginUpdateTagsAsync(String resourceGroupName, String publicIpAddressName, Map<String, String> tags, final ServiceCallback<PublicIPAddressInner> serviceCallback) { return ServiceFuture.fromResponse(beginUpdateTagsWithServiceResponseAsync(resourceGroupName, publicIpAddr...
python
def flux_components_bottom(self): '''Compute the contributions to the downwelling flux to surface due to emissions from each level.''' N = self.lev.size atmComponents = np.zeros_like(self.Tatm) flux_down_top = np.zeros_like(self.Ts) # same comment as above... would be ni...
python
def check_levels(imls, imt, min_iml=1E-10): """ Raise a ValueError if the given levels are invalid. :param imls: a list of intensity measure and levels :param imt: the intensity measure type :param min_iml: minimum intensity measure level (default 1E-10) >>> check_levels([0.1, 0.2], 'PGA') # ...
python
def on_disconnect(self, client, userdata, result_code): """ Callback when the MQTT client is disconnected. In this case, the server waits five seconds before trying to reconnected. :param client: the client being disconnected. :param userdata: unused. :param result_code: res...
python
def calc_distance_to_border(polygons, template_raster, dst_raster, overwrite=False, keep_interim_files=False): """Calculate the distance of each raster cell (in and outside the polygons) to the next polygon border. Arguments: polygons {str} -- Filename to a geopandas-rea...
python
def post(self, request, *args, **kwargs): """ Handles POST requests. """ return self.subscribe(request, *args, **kwargs)
python
def _set_show_mpls_ldp(self, v, load=False): """ Setter method for show_mpls_ldp, mapped from YANG variable /brocade_mpls_rpc/show_mpls_ldp (rpc) If this variable is read-only (config: false) in the source YANG file, then _set_show_mpls_ldp is considered as a private method. Backends looking to popu...
java
private void createSet( char[] customCharsArray ) { // If there are custom chars then I expand the font texture twice if (customCharsArray != null && customCharsArray.length > 0) { textureWidth *= 2; } // In any case this should be done in other way. Texture with size 512x512 // can maintain on...
java
public static Object[] getEnumValues(Class<? extends Enum<?>> clazz) { Object[] enums=clazz.getEnumConstants(); if (enums == null) { Method[] mthds = clazz.getDeclaredMethods(); Method mthd = null; for (Method mth : mthds) { if (mth.getName().equals("values")) { mthd = mth; break; } } ...
python
def prepare_search_body(self, should_terms=None, must_terms=None, must_not_terms=None, search_text='', start=None, end=None): """ Prepare body for elasticsearch query Search parameters ^^^^^^^^^^^^^^^^^ These parameters are dictionaries and have format: <term>: [<value 1>, <val...
java
@Override public URL getURL() throws IOException { URL url = this.servletContext.getResource(this.path); if (url == null) { throw new FileNotFoundException(getDescription() + " cannot be resolved to URL because it does not exist"); } return url; }
python
def fcoe_get_interface_output_fcoe_intf_list_fcoe_intf_rx_disc_solicitations(self, **kwargs): """Auto Generated Code """ config = ET.Element("config") fcoe_get_interface = ET.Element("fcoe_get_interface") config = fcoe_get_interface output = ET.SubElement(fcoe_get_interfa...
java
@GwtIncompatible("incompatible method") public static long getFragmentInHours(final Date date, final int fragment) { return getFragment(date, fragment, TimeUnit.HOURS); }
python
def debug(self, request, message, extra_tags='', fail_silently=False): """Add a message with the ``DEBUG`` level.""" add(self.target_name, request, constants.DEBUG, message, extra_tags=extra_tags, fail_silently=fail_silently)
python
def request(self, method, url, query_params=None, headers=None, body=None, post_params=None): """ :param method: http request method :param url: http request url :param query_params: query parameters in the url :param headers: http request headers :param b...
python
def rename_dimension(self, old_name, new_name): """Returns a copy where one dimension is renamed.""" if old_name not in self.dimension_names: raise ValueError("Shape %s does not have dimension named %s" % (self, old_name)) return Shape( [Dimension(new_name, d.size) if d....
java
@Override public SofaResponse invoke(SofaRequest request) throws SofaRpcException { SofaResponse response = null; Throwable throwable = null; try { RpcInternalContext.pushContext(); RpcInternalContext context = RpcInternalContext.getContext(); context.setP...
java
@Override public void visitCode(Code obj) { collectionGroups.clear(); groupToIterator.clear(); loops.clear(); buildVariableEndScopeMap(); super.visitCode(obj); }
python
def custom_repo(distro, args, cd_conf, rlogger, install_ceph=None): """ A custom repo install helper that will go through config checks to retrieve repos (and any extra repos defined) and install those ``cd_conf`` is the object built from argparse that holds the flags and information needed to dete...
java
public static void main(String[] args) throws RunnerException { new Runner(new OptionsBuilder() .include(WILDCARD + SuperClassInvocationBenchmark.class.getSimpleName() + WILDCARD) .include(WILDCARD + StubInvocationBenchmark.class.getSimpleName() + WILDCARD) .inclu...
java
public <T> void restartableFirst(int restartableId, final Func0<Observable<T>> observableFactory, final Action2<View, T> onNext, @Nullable final Action2<View, Throwable> onError) { restartable(restartableId, new Func0<Subscription>() { @Override public Subscription call() { ...
python
def is_resource_protected(self, request, **kwargs): """ Returns true if and only if the resource's URL is *not* exempt and *is* protected. """ exempt_urls = self.get_exempt_url_patterns() protected_urls = self.get_protected_url_patterns() path = request.path_info.lstrip('...
python
def minimize(func, x0, data=None, method=None, lower_bounds=None, upper_bounds=None, constraints_func=None, nmr_observations=None, cl_runtime_info=None, options=None): """Minimization of one or more variables. For an easy wrapper of function maximization, see :func:`maximize`. All boundary co...
java
public synchronized Map<String, String> getConnectionListeners() { Map<String, String> result = new TreeMap<>(); for (Map.Entry<ConnectionListener, Exception> entry : listeners.entrySet()) { String id = Integer.toHexString(System.identityHashCode(entry.getKey())); StringBuilder s...
java
protected KieBase getKnowledgeBase(String name, String version) throws ActivityException { return getKnowledgeBase(name, version, null); }
java
public void build(final Class<?> clazz, final Field field, final DeviceImpl device, final Object businessObject) throws DevFailed { xlogger.entry(); BuilderUtils.checkStatic(field); Method getter; final String stateName = field.getName(); final String getterName = Bui...
python
def _get_bases(type_): # type: (type) -> Tuple[type, type] """Get the base and meta classes to use in creating a subclass. Args: type_: The type to subclass. Returns: A tuple containing two values: a base class, and a metaclass. """ try: ...
python
def repeat(self, target, sender, **kwargs): "will repeat whatever yo say" if target.startswith("#"): self.message(target, kwargs["msg"]) else: self.message(sender, kwargs["msg"])
java
public void save(final InputStream templateXlsIn, final OutputStream xlsOut, final Object beanObj) throws XlsMapperException, IOException { saver.save(templateXlsIn, xlsOut, beanObj); }
python
def afx_adafactor(): """Adafactor with recommended learning rate schedule.""" hparams = afx_adam() hparams.optimizer = "Adafactor" hparams.learning_rate_schedule = "rsqrt_decay" hparams.learning_rate_warmup_steps = 10000 return hparams
python
def request(self, action, data={}, headers={}, method='GET'): """ Append the REST headers to every request """ headers = { "Authorization": "Bearer " + self.token, "Content-Type": "application/json", "X-Version": "1", "Accept": "application...
java
public JsonObject exportForFts() { JsonObject result = JsonObject.create(); for (MutationToken token : tokens) { String tokenKey = token.vbucketID() + "/" + token.vbucketUUID(); Long seqno = result.getLong(tokenKey); if (seqno == null || seqno < token.sequenceNumber()...
java
public String getPositionInString(ModificationFeature mf) { Set vals = SITE_ACC.getValueFromBean(mf); if (!vals.isEmpty()) { int x = ((Integer) vals.iterator().next()); if (x > 0) return "@" + x; } vals = INTERVAL_BEGIN_ACC.getValueFromBean(mf); if (!vals.isEmpty()) { int begin = ((Integer) v...
java
@Override public final void sample() { long count = _count.getAndSet(0); long time = _time.getAndSet(0); if (count == 0) _value = 0; else _value = time / (double) count; }
java
private void readTableBlock(int startIndex, int blockLength) { for (int index = startIndex; index < (startIndex + blockLength - 11); index++) { if (matchPattern(TABLE_BLOCK_PATTERNS, index)) { int offset = index + 7; int nameLength = FastTrackUtility.getInt(m_buf...
java
private void fixAdditionalKeyBindings(GameSettings settings) { if (this.additionalKeys == null) { return; // No extra keybindings to add. } // The keybindings are stored in GameSettings as a java built-in array. // There is no way to append to such arrays, so...
python
def cmd_iter( self, tgt, fun, arg=(), timeout=None, tgt_type='glob', ret='', kwarg=None, **kwargs): ''' Execute a single command via the salt-ssh subsystem and return a generator ...
python
async def delete_chat_sticker_set(self, chat_id: typing.Union[base.Integer, base.String]) -> base.Boolean: """ Use this method to delete a group sticker set from a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Use t...
java
@SneakyThrows public static DataSource createDataSource(final File yamlFile) { YamlRootEncryptRuleConfiguration config = YamlEngine.unmarshal(yamlFile, YamlRootEncryptRuleConfiguration.class); return EncryptDataSourceFactory.createDataSource(config.getDataSource(), new EncryptRuleConfigurationYamlSw...
java
@Override public double getWeight(double distance, double max, double stddev) { if(max <= 0) { return 1.0; } double relativedistance = distance / max; // the scaling was picked such that getWeight(a,a,0) is 0.1 // since erfc(1.1630871536766736) == 1.0 return NormalDistribution.erfc(1.163...
java
private int endCheckLoop() { Node n; int rv = END_UNREACHED; // To find the loop body, we look at the second to last node of the // loop node, which should be the predicate that the loop should // satisfy. // The target of the predicate is the loop-body for all 4 kin...
java
private void cleanUp(final DataSet ds) { Set<String> indexedKeys = Sets.newHashSet(); for (String key : ds.getDataView().keySet()) { // Search for indexed entries if (key.contains("#")) { // Remember key (without index) indexedKeys.add(key.substring(0, key.indexOf("#"))); } } // Remove...
python
def _dlinear_seaborn_(self, label=None, style=None, opts=None): """ Returns a Seaborn linear regression plot with marginal distribution """ color, size = self._get_color_size(style) try: fig = sns.jointplot(self.x, self.y, color=color, ...
python
def get_col_row_tot_array_from_data_record_array(array): # TODO: max ToT '''Convert raw data array to column, row, and ToT array. Parameters ---------- array : numpy.array Raw data array. Returns ------- Tuple of arrays. ''' def get_col_row_tot_1_array_from_dat...
python
def change_host_snapshot_command(self, host, snapshot_command): """Modify host snapshot command Format of the line that triggers function call:: CHANGE_HOST_SNAPSHOT_COMMAND;<host_name>;<event_handler_command> :param host: host to modify snapshot command :type host: alignak.obj...
java
protected int getSelectedTextColor(Context ctx) { return ColorHolder.color(getSelectedTextColor(), ctx, R.attr.material_drawer_selected_text, R.color.material_drawer_selected_text); }
java
public synchronized XAttribute get(Object key) { if(size == 0) { return null; } else { try { XAttributeMap map = deserialize(); return map.get(key); } catch (IOException e) { e.printStackTrace(); return null; } } }
java
public void validateUpdateFile(Long configId, String fileName) { // // config // Config config = valideConfigExist(configId); // // value // try { if (!config.getName().equals(fileName)) { throw new Exception(); }...
java
@Override public String getLocalAddr() { try { collaborator.preInvoke(componentMetaData); return request.getLocalAddr(); } finally { collaborator.postInvoke(); } }
java
private boolean onLoad(Cursor cursor, T entity) { if (cursor == null) { if (log.isLoggable(Level.FINEST)) { log.finest(L.l("{0} load returned null", _entityInfo)); } _entityInfo.loadFail(entity); return false; } else { _entityInfo.load(cursor, entity); ...
python
def parse_cif_structure(self): """Parse a `StructureData` from the cleaned `CifData` returned by the `CifSelectCalculation`.""" from aiida_codtools.workflows.functions.primitive_structure_from_cif import primitive_structure_from_cif if self.ctx.cif.has_unknown_species: self.ctx.exit...
java
@Override public int compare(BugInstance lhs, BugInstance rhs) { // Attributes of BugInstance. // Compare abbreviation // Compare class and method annotations (ignoring line numbers). // Compare field annotations. int cmp; BugPattern lhsPattern = lhs.getBugPattern()...
java
protected void configureTwitterClient(final Collection<BaseClient> properties) { val twitter = pac4jProperties.getTwitter(); if (StringUtils.isNotBlank(twitter.getId()) && StringUtils.isNotBlank(twitter.getSecret())) { val client = new TwitterClient(twitter.getId(), twitter.getSecret(), twit...
java
public void updateDataSegmentPosition(long iPosition, final int iDataSegmentId, final long iDataSegmentPosition) throws IOException { iPosition = iPosition * RECORD_SIZE; acquireExclusiveLock(); try { final long[] pos = fileSegment.getRelativePosition(iPosition); final OFile f ...
java
@NonNull public RequestCreator networkPolicy(@NonNull NetworkPolicy policy, @NonNull NetworkPolicy... additional) { data.networkPolicy(policy, additional); return this; }
python
def activate_shepherd(driver): """ Allows you to use Shepherd Tours with SeleniumBase http://github.hubspot.com/shepherd/docs/welcome/ """ shepherd_js = constants.Shepherd.MIN_JS sh_theme_arrows_css = constants.Shepherd.THEME_ARROWS_CSS sh_theme_arrows_fix_css = constants.Shepherd.THEME_ARR_...
python
def Pack(self): """Returns this message in an over-the-wire format.""" return struct.pack(self.format, self.command, self.arg0, self.arg1, len(self.data), self.checksum, self.magic)
python
def MX(domain, resolve=False, nameserver=None): ''' Return a list of lists for the MX of ``domain``. If the 'resolve' argument is True, resolve IPs for the servers. It's limited to one IP, because although in practice it's very rarely a round robin, it is an acceptable configuration and pulling ju...
java
public void marshall(CreateApplicationRequest createApplicationRequest, ProtocolMarshaller protocolMarshaller) { if (createApplicationRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(createA...
java
public static boolean isKnownByteFormat( BufferedImage image ) { int type = image.getType(); return type != BufferedImage.TYPE_BYTE_INDEXED && type != BufferedImage.TYPE_BYTE_BINARY && type != BufferedImage.TYPE_CUSTOM; }
python
def purge_metadata(self, force=False): """Instance-based version of ProcessMetadataManager.purge_metadata_by_name() that checks for process liveness before purging metadata. :param bool force: If True, skip process liveness check before purging metadata. :raises: `ProcessManager.MetadataError` when OSE...
python
def get_instructions(self): """ Get all instructions from a basic block. :rtype: Return all instructions in the current basic block """ tmp_ins = [] idx = 0 for i in self.method.get_instructions(): if idx >= self.start and idx < self.end: ...