language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public void remove() throws ProponoException { if (getEditURI() == null) { throw new ProponoException("ERROR: cannot delete unsaved entry"); } final DeleteMethod method = new DeleteMethod(getEditURI()); addAuthentication(method); try { getHttpClient().exec...
python
def get_director_backend(self, service_id, version_number, director_name, backend_name): """Returns the relationship between a Backend and a Director. If the Backend has been associated with the Director, it returns a simple record indicating this. Otherwise, returns a 404.""" content = self._fetch("/service/%s/ver...
java
public RequestRoute to(String url) { Objects.requireNonNull(url, Required.URL.toString()); if ('/' != url.charAt(0)) { url = "/" + url; } this.url = url; return this; }
java
public void marshall(DeleteFleetRequest deleteFleetRequest, ProtocolMarshaller protocolMarshaller) { if (deleteFleetRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(deleteFleetRequest.getNam...
java
protected void putValue(K key, MapEntryValue value) { MapEntryValue oldValue = entries().put(key, value); cancelTtl(oldValue); scheduleTtl(key, value); }
java
public final EObject ruleXOrExpression() throws RecognitionException { EObject current = null; EObject this_XAndExpression_0 = null; EObject lv_rightOperand_3_0 = null; enterRule(); try { // InternalXbaseWithAnnotations.g:853:2: ( (this_XAndExpression_0= ruleXA...
python
def _load_device(self, name, config): """Load a device either from a script or from an installed module""" if config is None: config_dict = {} elif isinstance(config, dict): config_dict = config elif config[0] == '#': # Allow passing base64 encoded js...
java
@SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case AfplibPackage.FNO__RG: getRg().clear(); getRg().addAll((Collection<? extends FNORG>)newValue); return; } super.eSet(featureID, newValue); }
java
void commentFilePath(Runnable closure) { GhprbCommentFilePathContext context = new GhprbCommentFilePathContext(); ContextExtensionPoint.executeInContext(closure, context); extensions.add(new GhprbCommentFile(context.getCommentFilePath())); }
python
def count_residues(self, record, pdb_record): '''Count the number of residues in the chains for the case.''' mutations = self.get_record_mutations(record) pdb_chains = set([m['Chain'] for m in mutations]) assert(len(pdb_chains) == 1) # we expect monomeric cases pdb_chain = pdb_ch...
python
def _run_ids(runner, pcap): """ Runs the specified IDS runner. :param runner: Runner instance to use :param pcap: File path to pcap for analysis :returns: dict of run metadata/alerts """ run = {'name': runner.conf.get('name'), 'module': runner.conf.get('module'), 'rule...
python
def token_operation(table_name): """ Decorator for the check() method on token operations. Make sure that there is a __account_payment_info__ and __account_credit_info__ set. """ def wrap( check ): def wrapped_check( state_engine, token_op, block_id, checked_ops ): rc = check( st...
python
def update_property(self, content_id, property_key, new_property_data, callback=None): """ Updates a content property. The body contains the representation of the content property. Must include the property id, and the new version number. Attempts to create a new content property if the...
java
public static void checkForValidIndex(int index, int size) { if (index < 0) { throw new IndexOutOfBoundsException( "Index "+index+" is negative"); } if (index >= size) { throw new IndexOutOfBoundsException( "In...
python
def diskwarp(src_ds, res=None, extent=None, t_srs=None, r='cubic', outdir=None, dst_fn=None, dst_ndv=None, verbose=True): """Helper function that calls warp for single input Dataset with output to disk (GDAL GeoTiff Driver) """ if dst_fn is None: dst_fn = os.path.splitext(src_ds.GetFileList()[0])[0]...
python
def get_all_completed_tasks(self, api_token, **kwargs): """Return a list of a user's completed tasks. .. warning:: Requires Todoist premium. :param api_token: The user's login api_token. :type api_token: str :param project_id: Filter the tasks by project. :type project_...
java
private CmsSite lookupSitesFolder(String rootPath) { int pos = rootPath.indexOf('/', SITES_FOLDER_POS); if (pos > 0) { // this assumes that the root path may likely start with something like "/sites/default/" // just cut the first 2 directories from the root path and do a direct...
java
public void handle(Data key, String sourceUuid, UUID partitionUuid, long sequence) { // apply invalidation if it's not originated by local member/client (because local // Near Caches are invalidated immediately there is no need to invalidate them twice) if (!localUuid.equals(sourceUuid)) { ...
java
public HttpSession getHttpSession(String name) { synchronized (this.sessions) { for (HttpSession session : sessions) { if (session.getName().equals(name)) { return session; } } } return null; }
java
protected IWord getNextDatetimeWord(IWord word, int entityIdx) throws IOException { IWord dWord = super.next(); if ( dWord == null ) { return null; } String[] entity = dWord.getEntity(); if ( entity == null ) { eWordPool.add(dWord); return...
java
private void delete(DirectoryEntry entry, DeleteMode deleteMode, JimfsPath pathForException) throws IOException { Directory parent = entry.directory(); File file = entry.file(); checkDeletable(file, deleteMode, pathForException); parent.unlink(entry.name()); parent.updateModifiedTime(); ...
java
public void setRange(String range) { String single = range.trim(); int hyphenIndex = range.indexOf('-'); if (hyphenIndex > 0) { this.start = rangeSingle(range.substring(0, hyphenIndex)); this.end = rangeSingle(range.substring(hyphenIndex + 1)); } else { ...
python
def get_relationship_family_session(self, proxy=None): """Gets the ``OsidSession`` to lookup relationship/family mappings. arg: proxy (osid.proxy.Proxy): a proxy return: (osid.relationship.RelationshipFamilySession) - a ``RelationshipFamilySession`` raise: NullArgume...
python
def grab_literal(template, l_del): """Parse a literal from the template""" global _CURRENT_LINE try: # Look for the next tag and move the template to it literal, template = template.split(l_del, 1) _CURRENT_LINE += literal.count('\n') return (literal, template) # There...
java
private SoyValue applyDirective( SoyPrintDirective directive, SoyValue value, List<SoyValue> args, SoyNode node) { // Get directive. if (!(directive instanceof SoyJavaPrintDirective)) { throw RenderException.createWithSource( "Failed to find Soy print directive with name '" ...
python
def aws_env_args(subparsers): """Add command line options for the aws_environment operation""" env_parser = subparsers.add_parser('aws_environment') env_parser.add_argument('vault_path', help='Full path(s) to the AWS secret') export_arg(env_parser) base_args(env_parser)
python
def read_backup(self, p_todolist=None, p_timestamp=None): """ Retrieves a backup for p_timestamp or p_todolist (if p_timestamp is not specified) from backup file and sets timestamp, todolist, archive and label attributes to appropriate data from it. """ if not p_timestamp...
python
def _get_loader(config): """Determine which config file type and loader to use based on a filename. :param config str: filename to config file :return: a tuple of the loader type and callable to load :rtype: (str, Callable) """ if config.endswith('.yml') or config.endswith('.yaml'): if ...
java
static public byte[] zip(InputStream in) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); VariableGZIPOutputStream compress = new VariableGZIPOutputStream(bos, 10240); // is 10k too big? compress.setLevel(Deflater.BEST_COMPRESSION); Writer writer = new OutputStreamWriter(compre...
java
public static void initialize(final Class<?> _class) throws CacheReloadException { if (InfinispanCache.get().exists(Status.UUIDCACHE4GRP)) { InfinispanCache.get().<UUID, Status>getCache(Status.UUIDCACHE4GRP).clear(); } else { InfinispanCache.get().<UUID, Status>getCac...
python
def compute_K_analytical(dataframe, spacing): """Given an electrode spacing, compute geometrical factors using the equation for the homogeneous half-space (Neumann-equation) If a dataframe is given, use the column (a, b, m, n). Otherwise, expect an Nx4 arrray. Parameters ---------- datafra...
python
def format_version(epoch, version, release): ''' Formats a version string for list_pkgs. ''' full_version = '{0}:{1}'.format(epoch, version) if epoch else version if release: full_version += '-{0}'.format(release) return full_version
python
def merge(self, dest, *others): """ Merge one or more :py:class:`HyperLogLog` instances. :param dest: Key to store merged result. :param others: One or more ``HyperLogLog`` instances. """ items = [self.key] items.extend([other.key for other in others]) se...
python
def _extract_game_info(self, games): """ Parse game information from all boxscores. Find the major game information for all boxscores listed on a particular boxscores webpage and return the results in a list. Parameters ---------- games : generator A...
python
def print_token(self, token_node_index): """returns the string representation of a token.""" err_msg = "The given node is not a token node." assert isinstance(self.nodes[token_node_index], TokenNode), err_msg onset = self.nodes[token_node_index].onset offset = self.nodes[token_no...
python
def __fade_in(self): """ Starts the Widget fade in. """ self.__timer.stop() self.__vector = self.__fade_speed self.__timer.start()
java
protected IOException copyRange(Reader reader, PrintWriter writer, long start, long end) { try { reader.skip(start); } catch (IOException e) { return e; } IOException exception = null; long bytesToRead = (end - start) + 1; char[] buffer = new ch...
java
public void dontStoreAuthenticationResultInHttpSession() { m_dontUseSession = true; final Timer timer = new Timer(); timer.schedule(new TimerTask() { @Override public void run() { m_dontUseSession = false; timer.cancel(); } ...
python
def update_cache(self): """Reset the lal cache. This can be used to update the cache if the result may change due to more files being added to the filesystem, for example. """ cache = locations_to_cache(self.frame_src, latest=True) stream = lalframe.FrStreamCacheOpen(cach...
java
@Override public void addTimestamp(final U u, final I i, final Long t) { Map<I, Set<Long>> userTimestamps = userItemTimestamps.get(u); if (userTimestamps == null) { userTimestamps = new HashMap<>(); userItemTimestamps.put(u, userTimestamps); } Set<Long> timest...
python
def from_text_list(name, ttl, rdclass, rdtype, text_rdatas): """Create an RRset with the specified name, TTL, class, and type, and with the specified list of rdatas in text format. @rtype: dns.rrset.RRset object """ if isinstance(name, (str, unicode)): name = dns.name.from_text(name, None)...
python
def create_batch(self, frame): """ :param frame: an (w,h,channels) numpy array (image) :return: DataBatch of (1,channels,data_shape,data_shape) """ frame_resize = mx.nd.array(cv2.resize(frame, (self.data_shape[0], self.data_shape[1]))) #frame_resize = mx.img.imresize(fram...
java
void tos_into_slot( int d, int n, String id ) { // In a copy-on-modify language, only update the local scope, or return val assert d==0 || (d==1 && _display[_tod]==n+1); int idx = _display[_tod-d]+n; // Temporary solution to kill a UDF from global name space. Needs to fix in the future. if (_tod == ...
python
def after(self, context): "Invokes all after functions with context passed to them." self._invoke(self._after, context) run.after_each.execute(context)
python
def create_cache_subnet_group(name, subnets=None, region=None, key=None, keyid=None, profile=None, **args): ''' Create an ElastiCache subnet group Example: .. code-block:: bash salt myminion boto3_elasticache.create_cache_subnet_group name=my-subnet-group \ ...
java
public Before<PartialResponseInsertType<T>> getOrCreateBefore() { Node node = childNode.getOrCreate("before"); Before<PartialResponseInsertType<T>> before = new BeforeImpl<PartialResponseInsertType<T>>(this, "before", childNode, node); return before; }
java
public static ContentSource getOutputContentSource(Configuration conf, String hostName) throws XccConfigException, IOException { String user = conf.get(OUTPUT_USERNAME, ""); String password = conf.get(OUTPUT_PASSWORD, ""); String port = conf.get(OUTPUT_PORT,"8000"); Stri...
python
def convert_response(check_response, project_id): """Computes a http status code and message `CheckResponse` The return value a tuple (code, message, api_key_is_bad) where code: is the http status code message: is the message to return api_key_is_bad: indicates that a given api_key is bad Arg...
java
public ServiceCall<Credentials> getCredentials(GetCredentialsOptions getCredentialsOptions) { Validator.notNull(getCredentialsOptions, "getCredentialsOptions cannot be null"); String[] pathSegments = { "v1/environments", "credentials" }; String[] pathParameters = { getCredentialsOptions.environmentId(), get...
java
public RsFluent withHeader(final CharSequence key, final CharSequence value) { return new RsFluent(new RsWithHeader(this, key, value)); }
java
public void processResponse(ResponseEvent arg0) { synchronized (listeners) { if (((ResponseEventExt) arg0).isRetransmission()) retransmissions++; Iterator iter = listeners.iterator(); while (iter.hasNext() == true) { SipListener listener = (SipListener) iter.next(); listene...
java
public Team createTeam(final String name, final boolean createApiKey) { pm.currentTransaction().begin(); final Team team = new Team(); team.setName(name); //todo assign permissions pm.makePersistent(team); pm.currentTransaction().commit(); if (createApiKey) { ...
java
public Observable<ServiceResponse<DiagnosticCategoryInner>> getSiteDiagnosticCategorySlotWithServiceResponseAsync(String resourceGroupName, String siteName, String diagnosticCategory, String slot) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is r...
python
def wrapping(self): """ Texture wrapping mode """ value = self._wrapping return value[0] if all([v == value[0] for v in value]) else value
python
def start(self): """ Starts this context, a.k.a the phase where you setup everything which will be necessary during the whole lifetime of a transformation. The "ContextCurrifier" is in charge of setting up a decorating stack, that includes both services and context processors, a...
java
public static Field getJoinLeftTable(Class<?> clazz) { if(clazz == null) { throw new NoJoinTableMemberException("clazz is null"); } List<Field> result = _getAnnotationColumns(clazz, JoinLeftTable.class); if(result == null || result.isEmpty()) { throw new NoJoinTableMemberException("class " + clazz.getName...
python
def alias(user_id, previous_id, on_error=None, on_success=None): """ Alias one user id to another. :param str | number user_id: the id you use to identify a user. this will be the user's primary user id. :param str | number previous_id: the id you previously used to identify a user (or the old user id...
java
public Collection<Entity> getEntitiesByConfidenceValue(final Double confidenceValue) { Collection<EntityAnnotation> sortedEas = getEntityAnnotationsByConfidenceValue(confidenceValue); return Collections2.transform(sortedEas, new Function<EntityAnnotation, Entity>() { ...
java
public static ImmutableMap<Symbol, Symbol> mapFrom(Map<String, String> stringMap) { final ImmutableMap.Builder<Symbol, Symbol> ret = ImmutableMap.builder(); for (Map.Entry<String, String> stringEntry : stringMap.entrySet()) { ret.put(Symbol.from(stringEntry.getKey()), Symbol.from(stringEntry.ge...
python
def read(self, filename, filetype=None, include_meta=False, **kwargs): """Read data from the given file into the MOC object. The cell lists read from the file are added to the current object. Therefore if the object already contains some cells, it will be updated to represent the union...
java
public void initFromFile(final String filename) { try (final InputStream is = new FileInputStream(filename)) { init(is); } catch (IOException e) { initBackToDefaults(); } }
python
def main(): """ NAME di_tilt.py DESCRIPTION rotates geographic coordinate dec, inc data to stratigraphic coordinates using the dip and dip direction (strike+90, dip if dip to right of strike) INPUT FORMAT declination inclination dip_direction dip SYNTAX di_til...
python
def save(self, *args, **kwargs): """Override the default ``save`` method.""" if not self.status: self.status = self.DRAFT # Published pages should always have a publication date if self.publication_date is None and self.status == self.PUBLISHED: self.publication_d...
python
def smart_crop(crop_w, crop_h, image_path): """ Return the scaled image size and crop rectangle """ cropping = face_and_energy_detector(image_path) img = Image.open(image_path) w, h = img.size scaled_size = get_crop_size(crop_w, crop_h, *img.size) gravity_x = int(round(scaled_size[0] * c...
java
public <T extends IEntity> void addEntity(T entity, OperationEnum operation, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setOperation(operation); batchItemRequest.setIntuitObject(getIntuitObject(entity)); batchItemRequests.add(...
java
public void accumulate(Object workingMemoryContext, Object context, Tuple leftTuple, InternalFactHandle handle, Declaration[] declarations, Declaration[] innerDeclarations, ...
python
def beacon(config): ''' Watch napalm function and fire events. ''' log.debug('Executing napalm beacon with config:') log.debug(config) ret = [] for mod in config: if not mod: continue event = {} fun = mod.keys()[0] fun_cfg = mod.values()[0] ...
python
def get_spectrogram(self): """Calculate the spectrogram to be plotted This exists as a separate method to allow subclasses to override this and not the entire `get_plot` method, e.g. `Coherencegram`. This method should not apply the normalisation from `args.norm`. """ a...
java
protected boolean openArtworkInfo(@NonNull Artwork artwork) { if (artwork.getWebUri() != null && getContext() != null) { try { Intent intent = new Intent(Intent.ACTION_VIEW, artwork.getWebUri()); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getConte...
java
public void createMQLink( VirtualLinkDefinition vld, MQLinkDefinition mqld, LocalizationDefinition ld) throws SIIncorrectCallException, SIMPDestinationAlreadyExistsException, SIResourceException, SIException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc...
python
def _add_auth(self): """ Add Auth configuration to the Swagger file, if necessary """ if not self.auth: return if self.auth and not self.definition_body: raise InvalidResourceException(self.logical_id, "Auth wor...
python
def row_col_maker(app, fromdocname, all_needs, need_info, need_key, make_ref=False, ref_lookup=False, prefix=''): """ Creates and returns a column. :param app: current sphinx app :param fromdocname: current document :param all_needs: Dictionary of all need objects :param need_info: need_info ob...
java
Observable<ComapiResult<Void>> doIsTyping(@NonNull final String token, @NonNull final String conversationId, final boolean isTyping) { if (isTyping) { return wrapObservable(service.isTyping(AuthManager.addAuthPrefix(token), apiSpaceId, conversationId).map(mapToComapiResult()), log, "Sending is typin...
python
def block(self, userId, minute): """ 封禁用户方法(每秒钟限 100 次) 方法 @param userId:用户 Id。(必传) @param minute:封禁时长,单位为分钟,最大值为43200分钟。(必传) @return code:返回码,200 为正常。 @return errorMessage:错误信息。 """ desc = { "name": "CodeSuccessReslut", "desc": ...
java
@Override public CreateBackupSelectionResult createBackupSelection(CreateBackupSelectionRequest request) { request = beforeClientExecution(request); return executeCreateBackupSelection(request); }
python
def _process_exlist(self, exc, raised): """Remove raised info from exception message and create separate list for it.""" if (not raised) or (raised and exc.endswith("*")): return exc[:-1] if exc.endswith("*") else exc return None
python
def get(self, url, ignore_access_time=False): """ Try to retrieve url from cache if available :param url: Url to retrieve :type url: str | unicode :param ignore_access_time: Should ignore the access time :type ignore_access_time: bool :return: (data, CacheInfo) ...
python
def run_step(self, is_shell): """Run a command. Runs a program or executable. If is_shell is True, executes the command through the shell. Args: is_shell: bool. defaults False. Set to true to execute cmd through the default shell. """ a...
java
public ResultList<Artwork> getCollectionImages(int collectionId, String language) throws MovieDbException { TmdbParameters parameters = new TmdbParameters(); parameters.add(Param.ID, collectionId); parameters.add(Param.LANGUAGE, language); URL url = new ApiUrl(apiKey, MethodBase.COLLECT...
java
protected void deleteRecursively(DirContext ctx, Name name) { NamingEnumeration enumeration = null; try { enumeration = ctx.listBindings(name); while (enumeration.hasMore()) { Binding binding = (Binding) enumeration.next(); LdapName childName = LdapUtils.newLdapName(binding.getName()); childName....
java
public static SparseIntegerVector subview(SparseIntegerVector vector, int offset, int length) { if (vector == null) throw new NullPointerException("Cannot create view of a " + "null vector"); return new...
python
def check_config(config, path): """Validate the config against DEFAULT_CONFIG. Any unknown keys or wrong types will add error messages. Args: config (dict): the running config. path (str): the path to the config file, used in error messages. Returns: list: the error messages f...
java
protected void fireObjectAction ( ObjectActionHandler handler, SceneObject scobj, ActionEvent event) { if (handler == null) { Controller.postAction(event); } else { handler.handleAction(scobj, event); } }
java
public static Collection<HazelcastInstance> getAllHazelcastClients() { Collection<HazelcastClientProxy> values = CLIENTS.values(); return Collections.unmodifiableCollection(new HashSet<HazelcastInstance>(values)); }
python
def delete_command_control(self, val_id): """ Parameters ---------- val_id : str Returns ------- requests.Response """ data = "delete,controlId=" + val_id return self._basic_post(url='commandControlPublic', data=data)
java
public final void loadTexture() { texture = null; texture = AWTTextureIO.newTexture(GLProfile.get(GLProfile.GL2), img, true); if (texture == null) { throw new CasmiRuntimeException("Cannot load texture"); } }
java
protected Set<String> getUpdatedRolesFrom(Set<String> roles) { Set<String> updatedRoles = Sets.newHashSet(roles); updatedRoles.addAll(_rolesAdded); updatedRoles.removeAll(_rolesRemoved); return updatedRoles; }
java
public static CounterAggregate calculateCounterAggregate(Simon simon, SimonFilter filter) { CounterAggregate aggregate = new CounterAggregate(); aggregateCounters(aggregate, simon, filter != null ? filter : SimonFilter.ACCEPT_ALL_FILTER); return aggregate; }
python
def curve(self): """Curve of the super helix.""" return HelicalCurve.pitch_and_radius( self.major_pitch, self.major_radius, handedness=self.major_handedness)
java
public void solve(DenseMatrix B) { if (B.nrows() != L.nrows()) { throw new IllegalArgumentException(String.format("Row dimensions do not agree: A is %d x %d, but B is %d x %d", L.nrows(), L.ncols(), B.nrows(), B.ncols())); } int n = B.nrows(); int nrhs = B.ncols(); ...
python
def generateUnabridgedAPI(self): ''' Generates the unabridged (full) API listing into ``self.unabridged_api_file``. This is necessary as some items may not show up in either hierarchy view, depending on: 1. The item. For example, if a namespace has only one member which is a ...
python
def _print_code(self, code): """Prepare code for string writing.""" # This needs a rewrite --- it doesn't check for match clashes! So sub11 would be replaced by sub1 before being replaced with sub11!! for key in self.variables.keys(): for arg in self.variables[key]: c...
java
public static br_configurebandwidth5x[] configurebandwidth5x(nitro_service client, br_configurebandwidth5x[] resources) throws Exception { if(resources == null) throw new Exception("Null resource array"); if(resources.length == 1) return ((br_configurebandwidth5x[]) resources[0].perform_operatio...
java
@TargetApi(Build.VERSION_CODES.HONEYCOMB) public void transformPage(View view, float position) { //Calculate real position (with padding) position -= (float) ((ViewPager) view.getParent()).getPaddingRight() / (float) view.getWidth(); if (position <= -1.0f || position >= 1.0f) { v...
python
def write(filename, headers, dcols, data, headerlines=[], header_char='H', sldir='.', sep=' ', trajectory=False, download=False): ''' Method for writeing Ascii files. Note the attribute name at position i in dcols will be associated with the column data at index i in data. Also th...
java
public void setDeviceManufacturerSegment(com.google.api.ads.admanager.axis.v201902.DeviceManufacturerTargeting deviceManufacturerSegment) { this.deviceManufacturerSegment = deviceManufacturerSegment; }
java
protected static void submitSuccessfulTableAlter(EventSubmitter eventSubmitter, HiveTable table) { eventSubmitter.submit(TABLE_ALTER+SUCCESS_POSTFIX, getAdditionalMetadata(table, Optional.<HivePartition> absent(), Optional.<Exception> absent())); }
java
protected Content getNavLinkClassIndex() { Content allClassesContent = getHyperLink(pathToRoot.resolve( DocPaths.AllClasses(configuration.frames)), contents.allClassesLabel, "", ""); Content li = HtmlTree.LI(allClassesContent); return li; }
python
def new(self, interchange_level=1, sys_ident='', vol_ident='', set_size=1, seqnum=1, log_block_size=2048, vol_set_ident=' ', pub_ident_str='', preparer_ident_str='', app_ident_str='', copyright_file='', abstract_file='', bibli_file='', vol_expire_date=None, app_use='', jo...
python
def pickled(cls, obj, **kwargs): """ Construct a pickled message, setting :attr:`data` to the serialization of `obj`, and setting remaining fields using `kwargs`. :returns: The new message. """ self = cls(**kwargs) try: self.data = pickle_...