language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
private static int computePointerSize() { String bits = System.getProperty("sun.arch.data.model"); if (bits.equals("32")) { return 4; } else if (bits.equals("64")) { return 8; } else { System.err...
python
def stringify_value(value): """Convert any value to string. """ if value is None: return u'' isoformat = getattr(value, 'isoformat', None) if isoformat is not None: value = isoformat() return type(u'')(value)
java
static ResponseList<User> createUserList(HttpResponse res, Configuration conf) throws TwitterException { return createUserList(res.asJSONArray(), res, conf); }
python
def _explore(self, node, visited, skip_father=None): """ Explore the CFG and look for re-entrancy Heuristic: There is a re-entrancy if a state variable is written after an external call node.context will contains the external calls executed ...
python
def get_current_state(self): """Obtain current classification and value map / threshold.""" def clean_state(dictionary): """Clean dictionary from bad value. :param dictionary: Dictionary of value maps or thresholds. :type dictionary: dict :returns: Clean...
python
def find_dunder_version_in_file(self, full_path): # type: (str)-> Dict[str,str] """ Find __version__ in a source file :param full_path: :return: """ versions = {} with self.file_opener.open_this(full_path, "r") as infile: for line in infile: ...
python
def add_series(self, values, **kwargs): """ Adds a series to the chart. :param values: A :py:class:`xltable.Expression` object that evaluates to the data series. :param categories: A :py:class:`xltable.Expression` object that evaluates to the data series. :param name: Na...
python
def uncompress(pub): ''' Input must be hex string, and a valid compressed public key. Check if it's a valid key first, using the validatepubkey() function below, and then verify that the str len is 66. ''' yp = int(pub[:2],16) - 2 x = int(pub[2:],16) a = (pow_mod(x,3,P) + 7) % P y =...
java
public EClass getEPF() { if (epfEClass == null) { epfEClass = (EClass)EPackage.Registry.INSTANCE.getEPackage(AfplibPackage.eNS_URI).getEClassifiers().get(254); } return epfEClass; }
python
def yield_event(self, act): """ Hande completion for a request and return an (op, coro) to be passed to the scheduler on the last completion loop of a proactor. """ if act in self.tokens: coro = act.coro op = self.try_run_act(act, self.tokens[act]) ...
java
private @Nullable CacheWriterException writeAllToCacheWriter(Map<? extends K, ? extends V> map) { if (!configuration.isWriteThrough() || map.isEmpty()) { return null; } List<Cache.Entry<? extends K, ? extends V>> entries = map.entrySet().stream() .map(entry -> new EntryProxy<>(entry.getKey(), ...
python
def copy(self): """Returns a copy of Filter.""" other = ConcurrentMeanStdFilter(self.shape) other.sync(self) return other
java
public com.authy.api.User createUser(String email, String phone) { return createUser(email, phone, DEFAULT_COUNTRY_CODE); }
java
public Acl applyAcl(final String repositoryId, final String objectId, final Acl acl, final AclPropagation aclPropagation) { final App app = StructrApp.getInstance(securityContext); try (final Tx tx = app.tx()) { final AbstractNode node = app.get(AbstractNode.class, objectId); if (node != null) { node....
python
def dict_matches_params_deep(params_dct, dct): """ Filters deeply by comparing dct to filter_dct's value at each depth. Whenever a mismatch occurs the whole thing returns false :param params_dct: dict matching any portion of dct. E.g. filter_dct = {foo: {bar: 1}} would allow {foo: {bar: 1, car: 2}} ...
java
public int removeApplication(App application) { Utility.getLogger().info("removeApp: " + application); m_vApplication.remove(application); // Add code here if (m_applicationDefault == application) m_applicationDefault = null; // Initialization app return m_vApplication...
java
@Override public <T> Stream<T> executeSelectAsStream(IRowMapper<T> rowMapper, String sql, Object... bindValues) { return executeSelectAsStream(rowMapper, -1, sql, bindValues); }
java
private void flushInternal() throws IOException { isClosed(); dfsClient.checkOpen(); long toWaitFor; synchronized (this) { enqueueCurrentPacket(); toWaitFor = lastQueuedSeqno; } waitForAckedSeqno(toWaitFor); }
python
def _process_token(cls, token): """Preprocess the token component of a token definition.""" assert type(token) is _TokenType or callable(token), \ 'token type must be simple type or callable, not %r' % (token,) return token
python
def to_timestamp(self, freq=None, how='start', copy=True): """ Cast to DatetimeIndex of Timestamps, at *beginning* of period. Parameters ---------- freq : str, default frequency of PeriodIndex Desired frequency. how : {'s', 'e', 'start', 'end'} Co...
java
private void writeObject(ObjectOutputStream out) throws IOException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "writeObject"); /* Call the default writeObject */ out.defaultWriteObject(); try { /* Get the flattened version of the message */ Lis...
python
def create_indices(catalog_slug): """Create ES core indices """ # TODO: enable auto_create_index in the ES nodes to make this implicit. # https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html#index-creation # http://support.searchly.com/customer/en/portal/quest...
python
def iterate(f: Callable[[T], T], x: T) -> Iterator[T]: """ Makes infinite iterator that returns the result of successive applications of a function to an element .. math:: iterate(f, x) = [x, f(x), f(f(x)), f(f(f(x))), ...] Examples -------- >>> from delphi.utils.fp import iterate, tak...
python
def load_text_data(dataset, directory, centre=True): """Load in a data set of marker points from the Ohio State University C3D motion capture files (http://accad.osu.edu/research/mocap/mocap_data.htm).""" points, point_names = parse_text(os.path.join(directory, dataset + '.txt'))[0:2] # Remove markers wher...
python
def setlogging(mlogger, defval=None): ''' Configure synapse logging. Args: mlogger (logging.Logger): Reference to a logging.Logger() defval (str): Default log level Notes: This calls logging.basicConfig and should only be called once per process. Returns: None ...
java
static boolean patchShadedLibraryId(InputStream in, OutputStream out, String originalName, String name) throws IOException { byte[] buffer = new byte[8192]; int length; // We read the whole native lib into memory to make it easier to monkey-patch the id. ByteArrayOutputStream...
python
def get_qrcode_url(self, ticket, data=None): """ 通过 ticket 换取二维码地址 详情请参考 https://iot.weixin.qq.com/wiki/new/index.html?page=3-4-4 :param ticket: 二维码 ticket :param data: 额外数据 :return: 二维码地址 """ url = 'https://we.qq.com/d/{ticket}'.format(ticket=tic...
python
def get_block_raw(self, block): """ Args: block: block number (eg: 223212) block hash (eg: 0000000000000000210b10d620600dc1cc2380bb58eb2408f9767eb792ed31fa) word "last" - this will always return the latest block word "first" - this will always ...
java
@Override public Wave status(final Status status) { synchronized (this) { if (this.statusProperty.get() == status) { throw new CoreRuntimeException("The status " + status.toString() + " has been already set for this wave " + toString()); } else { this....
java
@Override public AttachNetworkInterfaceResult attachNetworkInterface(AttachNetworkInterfaceRequest request) { request = beforeClientExecution(request); return executeAttachNetworkInterface(request); }
java
public static Class classForName(String name) throws ClassNotFoundException { try { return Thread.currentThread().getContextClassLoader().loadClass(name); } catch (Exception e) { return Class.forName(name); } }
python
def extend_hierarchy(levels, strength, CF, keep): """Extend the multigrid hierarchy.""" def unpack_arg(v): if isinstance(v, tuple): return v[0], v[1] else: return v, {} A = levels[-1].A # Compute the strength-of-connection matrix C, where larger # C[i,j] den...
java
public static CommerceWishListItem fetchByCommerceWishListId_First( long commerceWishListId, OrderByComparator<CommerceWishListItem> orderByComparator) { return getPersistence() .fetchByCommerceWishListId_First(commerceWishListId, orderByComparator); }
java
public final void setHost(final String host) throws UnknownHostException { this.host = host; final InetAddress[] inetAddresses = InetAddress.getAllByName(host); for (InetAddress address: inetAddresses) { final AddressHostMatcher matcher = new AddressHostMatcher(); matche...
python
def get_all(self): """ Returns all endpoints, indexed by endpoint title for each symbol Notes ----- Only allows JSON format (pandas not supported). """ self.optional_params = {} self.endpoints = self._ENDPOINTS[:10] json_data = self.fetc...
python
def extend(self, elem_seq): """Extends by appending the given iterable. Similar to list.extend().""" if elem_seq is None: return try: elem_seq_iter = iter(elem_seq) except TypeError: if not elem_seq: # silently ignore falsy inputs :-/. # TODO(ptucker): Deprecate this b...
python
def sync_subscriber(subscriber): """Sync a Customer with Stripe api data.""" customer, _created = Customer.get_or_create(subscriber=subscriber) try: customer.sync_from_stripe_data(customer.api_retrieve()) customer._sync_subscriptions() customer._sync_invoices() customer._sync_cards() customer._sync_charges...
java
public List<User> getAllUsers() { List<User> r = new ArrayList<User>(); for (User u : User.getAll()) { if(u.getProperty(Details.class)!=null) r.add(u); } Collections.sort(r); return r; }
java
public static int cudnnGetFilter4dDescriptor( cudnnFilterDescriptor filterDesc, int[] dataType, /** image data type */ int[] format, int[] k, /** number of output feature maps */ int[] c, /** number of input feature maps */ int[] h, /** height of each input filter */ ...
java
public void setRegionOrder(java.util.Collection<String> regionOrder) { if (regionOrder == null) { this.regionOrder = null; return; } this.regionOrder = new com.amazonaws.internal.SdkInternalList<String>(regionOrder); }
java
public final String remove (final OperationalTextKey textKey) { if (textKey == null) { throw new NullPointerException(); } if (!settingsMap.containsKey(textKey)) { throw new IllegalArgumentException("This entry does not exists."); } return settingsMap.remove(textKey); }
python
def parse(self, xml_str): # type: (str) -> List[EndpointDescription] """ Parses an EDEF XML string :param xml_str: An XML string :return: The list of parsed EndpointDescription """ # Parse the document root = ElementTree.fromstring(xml_str) if roo...
java
public Observable<VirtualWANInner> beginUpdateTagsAsync(String resourceGroupName, String virtualWANName, Map<String, String> tags) { return beginUpdateTagsWithServiceResponseAsync(resourceGroupName, virtualWANName, tags).map(new Func1<ServiceResponse<VirtualWANInner>, VirtualWANInner>() { @Override ...
python
def generic_service_main(cls: Type[WindowsService], name: str) -> None: """ Call this from your command-line entry point to manage a service. - Via inherited functions, enables you to ``install``, ``update``, ``remove``, ``start``, ``stop``, and ``restart`` the service. - Via our additional code,...
java
public static OrientationHelperEx createHorizontalHelper( ExposeLinearLayoutManagerEx layoutManager) { return new OrientationHelperEx(layoutManager) { @Override public int getEndAfterPadding() { return mLayoutManager.getWidth() - mLayoutManager.getPaddingRight(); ...
java
public static cacheselector get(nitro_service service, String selectorname) throws Exception{ cacheselector obj = new cacheselector(); obj.set_selectorname(selectorname); cacheselector response = (cacheselector) obj.get_resource(service); return response; }
java
public static List<BundleEntryParts> toListOfEntries(FhirContext theContext, IBaseBundle theBundle) { List<BundleEntryParts> retVal = new ArrayList<>(); RuntimeResourceDefinition def = theContext.getResourceDefinition(theBundle); BaseRuntimeChildDefinition entryChild = def.getChildByName("entry"); List<IBase> ...
java
Observable<ComapiResult<Void>> markDelivered(String conversationId, Set<String> ids) { final List<MessageStatusUpdate> updates = new ArrayList<>(); updates.add(MessageStatusUpdate.builder().setMessagesIds(ids).setStatus(MessageStatus.delivered).setTimestamp(DateHelper.getCurrentUTC()).build()); ...
java
public static int getGraphicsDeviceIndexIsShowingOn(final Component component) { final GraphicsDevice graphicsDevice = getGraphicsDeviceIsShowingOn(component); final GraphicsDevice[] graphicsDevices = getAvailableScreens(); for (int i = 0; i < graphicsDevices.length; i++) { if (graphicsDevices[i].equals(gra...
python
def obfn_g0var(self): """Variable to be evaluated in computing :meth:`.ADMMTwoBlockCnstrnt.obfn_g0`, depending on the ``AuxVarObj`` option value. """ return self.var_y0() if self.opt['AuxVarObj'] else \ self.cnst_A0(None, self.Xf) - self.cnst_c0()
python
def transcriptions(self): """ Access the transcriptions :returns: twilio.rest.api.v2010.account.transcription.TranscriptionList :rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList """ if self._transcriptions is None: self._transcriptions = T...
python
def _create_das_mapping(self): """ das_map = {'lookup' : [{params : {'param1' : 'required', 'param2' : 'optional', 'param3' : 'default_value' ...}, url : 'https://cmsweb.cern.ch:8443/dbs/prod/global/DBSReader/acquisitioneras/', das_map : {'...
python
def Tag(env, target, source, *more_tags, **kw_tags): """ Tag a file with the given arguments, just sets the accordingly named attribute on the file object. TODO: FIXME """ if not target: target=source first_tag=None else: first_tag=source if first_tag: kw_ta...
python
def inverse(self): """Return the pseudoinverse. Examples -------- The inverse is the zero operator if the domain is real: >>> r3 = odl.rn(3) >>> op = ImagPart(r3) >>> op.inverse(op([1, 2, 3])) rn(3).element([ 0., 0., 0.]) This is not a true in...
java
public Point add(Point b) { if (this.isInfinity()) { return b; } if (b.isInfinity()) { return this; } // Check if b = this or b = -this if (this._x.equals(b._x)) { if (this._y.equals(b._y)) { // this = b, i.e. this must be doubled ...
java
@SuppressWarnings("unchecked") public EList<IfcDocumentSelect> getTimeSeriesReferences() { return (EList<IfcDocumentSelect>) eGet( Ifc2x3tc1Package.Literals.IFC_TIME_SERIES_REFERENCE_RELATIONSHIP__TIME_SERIES_REFERENCES, true); }
python
def get_cell_umi_read_string(read_id, sep="_"): ''' extract the umi and cell barcode from the read id (input as a string) using the specified separator ''' try: return (read_id.split(sep)[-1].encode('utf-8'), read_id.split(sep)[-2].encode('utf-8')) except IndexError: rai...
java
public void marshall(DeletePipelineRequest deletePipelineRequest, ProtocolMarshaller protocolMarshaller) { if (deletePipelineRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deletePipelineRe...
java
public T mkfile() throws MkfileException { try { if (exists()) { throw new MkfileException(this); } return writeBytes(); } catch (IOException e) { throw new MkfileException(this, e); } }
java
public SelectRecordsInputStream getRecordsInputStream(SelectObjectContentEventVisitor listener) throws SelectObjectContentEventException { InputStream recordInputStream = new SequenceInputStream(new EventStreamEnumeration(getEventsIterator(), listener)); // Ignore close() calls to the recor...
python
def bytes(self): """Return a byte representation of the message flags.""" flagByte = 0x00 messageType = 0 if self._messageType is not None: messageType = self._messageType << 5 extendedBit = 0 if self._extended is None else self._extended << 4 hopsMax = 0 if s...
java
public static boolean isValidSnapshot(File f) throws IOException { if (f==null || Util.getZxidFromName(f.getName(), "snapshot") == -1) return false; // Check for a valid snapshot RandomAccessFile raf = new RandomAccessFile(f, "r"); // including the header and the last / byte...
python
def noargs(self): "Returns True if the callable takes no arguments" noargs = inspect.ArgSpec(args=[], varargs=None, keywords=None, defaults=None) return self.argspec == noargs
python
def dispatch(self, request, *args, **kwargs): ''' Check that registration is online before proceeding. If this is a POST request, determine whether the response should be provided in JSON form. ''' self.returnJson = (request.POST.get('json') in ['true', True]) regonline...
python
def _str_to_fn(self, fn_as_str): """ If the argument is not a string, return whatever was passed in. Parses a string such as package.module.function, imports the module and returns the function. :param fn_as_str: The string to parse. If not a string, return it. """ ...
python
def check_error(self, response): """ If the service is returning an error, this function should raise an exception. such as SkipThisService """ if response.status_code == 500: raise ServiceError("500 - " + response.content) if response.status_code == 503: ...
java
public ListStackInstancesResult withSummaries(StackInstanceSummary... summaries) { if (this.summaries == null) { setSummaries(new com.amazonaws.internal.SdkInternalList<StackInstanceSummary>(summaries.length)); } for (StackInstanceSummary ele : summaries) { this.summaries...
java
@Override public ServletMethodExecutor getExecutor(ServletProtocolConfiguration protocolConfiguration, ProtocolMetaData metaData, CommandCallback callback) { Collection<HTTPContext> contexts = metaData.getContexts(HTTPContext.class); if (contexts.size() == 0) { throw new IllegalA...
java
void afterExecution() { for (;;) { State currentState = state.get(); switch (currentState) { case REQUESTED: state.set(State.RUNNING); scheduleExecution(); return; case RUNNING: ...
python
def delimited(items, character='|'): """Returns a character delimited version of the provided list as a Python string""" return '|'.join(items) if type(items) in (list, tuple, set) else items
python
def role_get(user): ''' List roles for user user : string username CLI Example: .. code-block:: bash salt '*' rbac.role_get leo ''' user_roles = [] ## read user_attr file (user:qualifier:res1:res2:attr) with salt.utils.files.fopen('/etc/user_attr', 'r') as user_a...
java
@Override public void visitField(Field obj) { if (checkConfusedName(obj.getName(), obj.getSignature())) { bugReporter.reportBug(new BugInstance(this, BugType.CNC_COLLECTION_NAMING_CONFUSION.name(), NORMAL_PRIORITY).addClass(this).addField(this) .addString(obj.getName())); ...
python
def append_code(original, codefile): """Append the contents of one file to another. :param original: name of file that will be appended to :type original: str :param codefile: name of file that will be appende :type codefile: str This function is particularly useful when one wants to replace a...
java
public static ClassFile buildClassFile(String className, Class<?>[] classes, String[] prefixes) { return buildClassFile(className, classes, prefixes, null, OBSERVER_DISABLED); }
java
public final EObject ruleXMemberFeatureCall() throws RecognitionException { EObject current = null; Token otherlv_2=null; Token lv_explicitStatic_3_0=null; Token otherlv_8=null; Token lv_nullSafe_9_0=null; Token lv_explicitStatic_10_0=null; Token otherlv_11=null;...
python
def pop_max(self): """ Remove the maximum value and return it. """ if self.root is NULL: raise KeyError("pop from an empty blackjack") self.root, value = self.root.delete_max() self._len -= 1 return value
python
def www_authenticate(self): """The `WWW-Authenticate` header in a parsed form.""" def on_update(www_auth): if not www_auth and 'www-authenticate' in self.headers: del self.headers['www-authenticate'] elif www_auth: self.headers['WWW-Authenticate'] ...
java
public String[] escape(String name, String[] values) { if (values == null) { return null; } if (m_exceptions.contains(name)) { return values; } boolean cleanHtml = m_cleanHtml.contains(name); String[] result = new String[values.length]; ...
java
void checkMethodRef(ClassFile cf, String clname, CONSTANT_NameAndType_info nti, String msgKey) throws ConstantPoolException { String name = nti.getName(); String type = nti.getType(); clname = nameFromRefType(clname); ...
python
def getfile(object): """Work out which source or compiled file an object was defined in.""" if ismodule(object): if hasattr(object, '__file__'): return object.__file__ raise TypeError, 'arg is a built-in module' if isclass(object): object = sys.modules.get(object.__module...
python
def search_handle(self, **args): ''' Search for handles containing the specified key with the specified value. The search terms are passed on to the reverse lookup servlet as-is. The servlet is supposed to be case-insensitive, but if it isn't, the wrong case will cause a :exc:`~b...
java
@Override public List<Tuple> getTuples(EntityKey[] keys, TupleContext tupleContext) { Objects.requireNonNull( keys ); if ( keys.length == 0 ) { return Collections.emptyList(); } else if ( keys.length == 1 ) { return Collections.singletonList( getTuple( keys[0], tupleContext ) ); } else { final Str...
python
def _full_speed_rumble(self, images, duration): """Simulate the motors running at full.""" while duration > 0: self.microbit.display.show(images[0]) # pylint: disable=no-member time.sleep(0.04) self.microbit.display.show(images[1]) # pylint: disable=no-member ...
python
def parse_model_group_list(path, groups): """Parse a structured list of model groups as obtained from a YAML file Yields reaction IDs. Path can be given as a string or a context. """ context = FilePathContext(path) for model_group in groups: if 'include' in model_group: include...
python
def setup_conn(**kwargs): """ returns a triplestore conncection based on the kwargs. Order of preceedence is as follows: kwargs['conn'] kwargs['tstore_def'] kwargs['triplestore_url'] kwargs['rdflib'] RdfConfigManager.data_tstore RdfConfigManager.TRIPLESTORE_URL ...
java
public static boolean isDao(String groupName) { try { return GroupRouter.singleton.newestDefinition(groupName).isDao(); } catch (GroupUndefinedException e) { throw new RuntimeException("Call GroupJudge.defined() first.", e); } }
java
public alluxio.grpc.RegisterMasterPOptions getOptions() { return options_ == null ? alluxio.grpc.RegisterMasterPOptions.getDefaultInstance() : options_; }
java
public DestinationHandler getAliasDestination(SIBUuid12 gatheringTargetUuid, DestinationHandler baseDest, boolean includeInvisible) throws SITemporaryDestinationNotFoundException, SINotPossibleInCurrentConfigurationException, SIMPDestinationCorruptException, SIResourceException { if (Tra...
java
public static Waehrung of(Currency currency) { String key = currency.getCurrencyCode(); return CACHE.computeIfAbsent(key, t -> new Waehrung(currency)); }
java
<T extends Entity<?, ?>> Builder<BE, T> proceedTo(Relationships.WellKnown over, Class<T> entityType) { return new Builder<>(this, hop(), Query.filter(), entityType).hop(Related.by(over), type(entityType)); }
java
public String createPolicyRuleForExternalId(ComponentService componentService, ExternalId externalId, String policyName) throws IntegrationException { Optional<ComponentVersionView> componentVersionView = componentService.getComponentVersion(externalId); if (!componentVersionView.isPresent()) { ...
python
def action(self, event_type, when, **kwargs): """ Called from within SimuVEX when events happens. This function checks all breakpoints registered for that event and fires the ones whose conditions match. """ l.debug("Event %s (%s) firing...", event_type, when) for k,v in ...
java
@Override public final void decryptFile(final String pEncryptedPath, final String pDecryptedPath) throws Exception { FileInputStream fis = null; byte[] encryptedSsk = null; try { fis = new FileInputStream(pEncryptedPath + ".sken"); ByteArrayOutputStream baus = new ByteArrayOutputStream(); ...
python
def mod_replace(match, sphinx_modules): """Convert Sphinx ``:mod:`` to plain reST link. Args: match (_sre.SRE_Match): A match (from ``re``) to be used in substitution. sphinx_modules (list): List to be track the modules that have been encountered. Returns: s...
java
public static DocPath forPackage(Utils utils, TypeElement typeElement) { return (typeElement == null) ? empty : forPackage(utils.containingPackage(typeElement)); }
python
def guard_reinstate(analysis_request): """Returns whether 'reinstate" transition can be performed or not. Returns True only if this is not a partition or the parent analysis request can be reinstated or is not in a cancelled state """ parent = analysis_request.getParentAnalysisRequest() if not p...
java
public void marshall(Scte35TimeSignalApos scte35TimeSignalApos, ProtocolMarshaller protocolMarshaller) { if (scte35TimeSignalApos == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(scte35TimeSignalApo...
java
Node createThisAliasDeclarationForFunction(String aliasName, Node functionNode) { return createSingleConstNameDeclaration( aliasName, createThis(getTypeOfThisForFunctionNode(functionNode))); }
java
public <I, O> Reflecter<T> exchange(String targetFieldName, String keyFromPropMap, Function<I, O> exchangeFunc) { exchange(targetFieldName, keyFromPropMap); exchangeFuncs.put(keyFromPropMap, exchangeFunc); return this; }
python
def blacklist(ctx, blacklist_account, account): """ Add an account to a blacklist """ account = Account(account, blockchain_instance=ctx.blockchain) print_tx(account.blacklist(blacklist_account))