language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
public static RevocationStatus check(X509Certificate cert, X509Certificate issuerCert, URI responderURI, X509Certificate responderCert, Date date) t...
python
def p_throw_statement(self, p): """throw_statement : THROW expr SEMI | THROW expr AUTOSEMI """ p[0] = self.asttypes.Throw(expr=p[2]) p[0].setpos(p)
python
def extract(self, node, condition, skip=0): """ Extract a single node that matches the provided condition, otherwise a TypeError is raised. An optional skip parameter can be provided to specify how many matching nodes are to be skipped over. """ for child in sel...
python
def suggestions(self, word): """Returns a list of suggestions for a misspelled word. Args: word: The word to check. Returns: List of zero or more suggested replacements for word. """ suggestions = set(self._misspelling_dict.get(word, [])).union( set(self._misspelling_dict.get(w...
java
Rectangle getBoxSize(String boxName) { PdfRectangle r = (PdfRectangle)thisBoxSize.get(boxName); if (r != null) return r.getRectangle(); return null; }
python
def get_metadata_for_nifti(in_file, bids_dir=None, validate=True): """Fetch metadata for a given nifti file >>> metadata = get_metadata_for_nifti( ... datadir / 'ds054' / 'sub-100185' / 'fmap' / 'sub-100185_phasediff.nii.gz', ... validate=False) >>> metadata['Manufacturer'] 'SIEMENS' ...
java
public SDVariable huberLoss(String name, @NonNull SDVariable label, @NonNull SDVariable predictions, double delta) { return huberLoss(name, label, predictions, null, LossReduce.MEAN_BY_NONZERO_WEIGHT_COUNT, delta); }
java
@Override protected void insertDefaults() throws EFapsException { super.insertDefaults(); if (!getExist()[1] && getGeneralID() != null) { try { final ConnectionResource res = Context.getThreadContext().getConnectionResource(); Context.getDbType...
python
def get_bios_settings(irmc_info): """Get the current BIOS settings on the server :param irmc_info: node info. :returns: a list of dictionary BIOS settings """ bios_config = backup_bios_config(irmc_info)['bios_config'] bios_config_data = bios_config['Server']['SystemConfig']['BiosConfig'] s...
python
def dumps(): """Returns a string representation of the FILTERS dictionary.""" d = {} for k, v in FILTERS.items(): d[dr.get_name(k)] = list(v) return _dumps(d)
java
@Override public DescribeMetricFiltersResult describeMetricFilters(DescribeMetricFiltersRequest request) { request = beforeClientExecution(request); return executeDescribeMetricFilters(request); }
java
private static boolean parseInputArgs(String[] args) { CommandLineParser parser = new DefaultParser(); CommandLine cmd; try { cmd = parser.parse(OPTIONS, args); } catch (ParseException e) { System.out.println("Failed to parse input args: " + e); return false; } sHelp = cmd.hasO...
python
def from_config(cls, cp, data=None, delta_f=None, delta_t=None, gates=None, recalibration=None, **kwargs): """Initializes an instance of this class from the given config file. Parameters ---------- cp : WorkflowConfigParser Config file parser to read. ...
java
public static String tagHtmlContent(String tag, String... content) { return openTagHtmlContent(tag, null, null, content) + closeTag(tag); }
java
public DescribeConfigurationSettingsResult withConfigurationSettings(ConfigurationSettingsDescription... configurationSettings) { if (this.configurationSettings == null) { setConfigurationSettings(new com.amazonaws.internal.SdkInternalList<ConfigurationSettingsDescription>(configurationSettings.leng...
python
def update(self, newinfo): '''update the image''' self.text = newinfo.text if self.textctrl is not None: self.textctrl.Clear() self.textctrl.WriteText(self.text) self._resize()
java
public static List<CmsEditableDataJSO> getAllEditableDataForPage() { List<Element> elems = CmsDomUtil.getElementsByClass(CmsGwtConstants.CLASS_EDITABLE, Tag.div); List<CmsEditableDataJSO> result = Lists.newArrayList(); for (Element elem : elems) { String jsonData = elem.getAttribute...
java
public static SQLXML createSQLXML(final Connection conn) { try { return conn.createSQLXML(); } catch (SQLException e) { throw new UroborosqlRuntimeException(e); } }
python
def cublasCgemv(handle, trans, m, n, alpha, A, lda, x, incx, beta, y, incy): """ Matrix-vector product for complex general matrix. """ status = _libcublas.cublasCgemv_v2(handle, _CUBLAS_OP[trans], m, n, ctypes.byref(cuda.cuF...
java
private final String renderContentTemplate(final ST contentTemplate, final Map<String, Object> values, final ErrorBuffer error, boolean inErrorState) { if (contentTemplate != null) { // it has to be possible to use a layout without defining a template try (Writer sw = new StringBuilderWriter()) { ...
python
def _getEventsByWeek(self, request, year, month): """ Return the events in this site for the given month grouped by week. """ home = request.site.root_page return getAllEventsByWeek(request, year, month, home=home)
python
def centroid_sort(centroids): """ Sort centroids. This is required so that the same cluster centroid is always the 0th one. It should also be the \ most negative. Order defined by the Euclidean distance between the centroid and an arbitrary "small" point \ [-100, -100] (in each dimension) to...
java
public static String caseCanonicalize(String s) { for (int i = 0, n = s.length(); i < n; ++i) { char ch = s.charAt(i); char cu = caseCanonicalize(ch); if (cu != ch) { StringBuilder sb = new StringBuilder(s); sb.setCharAt(i, cu); while (++i < n) { sb.setCharAt(i, c...
python
def extract_version(): """Return ggplot.__version__ without importing ggplot. Extracts version from ggplot/__init__.py without importing ggplot, which requires dependencies to be installed. """ with open('ggplot/__init__.py') as fd: ns = {} for line in fd: if line.st...
java
@Override public void perform() throws PortalException { Element plfNode = HandlerUtils.getPLFNode(ilfNode, person, false, false); if (plfNode == null) return; changeRestriction(Constants.ATT_MOVE_ALLOWED, plfNode, moveAllowed); changeRestriction(Constants.ATT_MOVE_ALLOWED, ilfNode...
python
def stock_image(width: Union[int, str] = 1920, height: Union[int, str] = 1080, keywords: Optional[List[str]] = None, writable: bool = False) -> Union[str, bytes]: """Generate random stock image (JPEG) hosted on Unsplash. .. note:: This method ...
python
def _assemble_influence(stmt): """Assemble an Influence statement into text.""" subj_str = _assemble_agent_str(stmt.subj.concept) obj_str = _assemble_agent_str(stmt.obj.concept) # Note that n is prepended to increase to make it "an increase" if stmt.subj.delta['polarity'] is not None: subj_...
java
@Override public String getFormattedMessage() { String result = localizedMessage==null ? rawMessage : localizedMessage; if (parameters != null) { try { return MessageFormat.format(result, parameters); } catch (IllegalArgumentException iae) { // In case of problem with positional parameters fall throu...
java
private static int fill(char[] buf, Reader r) throws IOException { int offset = 0; int read = 0; do { read = r.read(buf, offset, buf.length - offset); if (read > 0) offset += read; } while (offset < buf.length && read >= 0); return offset; }
java
public void parse(InputSource is, DefaultHandler dh) throws SAXException, IOException { if (is == null) { throw new IllegalArgumentException("InputSource cannot be null"); } XMLReader reader = this.getXMLReader(); if (dh != null) { reader.setContentHandle...
python
def get_tenant(self, tenant_id): """GetTenant. [Preview API] :param str tenant_id: :rtype: :class:`<TenantInfo> <azure.devops.v5_0.identity.models.TenantInfo>` """ route_values = {} if tenant_id is not None: route_values['tenantId'] = self._serialize.u...
java
public Class<? extends org.eclipse.xtext.parser.antlr.Lexer> bindLexer() { return org.eclipse.xtext.xtext.generator.parser.antlr.splitting.parser.antlr.internal.InternalSimpleExpressionsLexer.class; }
python
def handle_message(self, message): """Handle a message received off of the underlying consumer. If the message has an eta, delay it. Otherwise, put it on the work queue. """ try: if "eta" in message.options: self.logger.debug("Pushing message %r onto ...
java
@Override public boolean persist(TaskRecord updates, TaskRecord expected) throws Exception { StringBuilder update = new StringBuilder(220) .append("UPDATE Task t SET "); if (updates != null) { if (updates.hasIdentifierOfClassLoader()) update.append...
java
final void postComplete() { /* * On each step, variable f holds current dependents to pop * and run. It is extended along only one path at a time, * pushing others to avoid unbounded recursion. */ CompletableFuture<?> f = this; Completion h; while ((h = f.sta...
python
def get_buffer_size_in_pages(cls, address, size): """ Get the number of pages in use by the given buffer. @type address: int @param address: Aligned memory address. @type size: int @param size: Buffer size. @rtype: int @return: Buffer size in number ...
java
public ScreenParent makeScreen(ScreenLoc itsLocation, ComponentParent parentScreen, int iDocMode, Map<String,Object> properties) { ScreenParent screen = null; if ((iDocMode & ScreenConstants.DOC_MODE_MASK) == PROCESS_DETAIL_MODE) screen = Record.makeNewScreen(MessageProcessInfo.MESSAGE_P...
java
public static ProcessInitException newInstance(String prefix, IOException e) { String m = e.getMessage(); if (m == null) { return null; } int i = m.lastIndexOf(BEFORE_CODE); if (i == -1) { return null; } int j = m.indexOf(AFTER_CODE, i); if (j == -1) { return null; ...
java
public Swagger2MarkupConfigBuilder withTagOrdering(OrderBy orderBy) { Validate.notNull(orderBy, "%s must not be null", "orderBy"); Validate.isTrue(orderBy != OrderBy.CUSTOM, "You must provide a custom comparator if orderBy == OrderBy.CUSTOM"); config.tagOrderBy = orderBy; return this; ...
python
def get_gears_cache_size(): """ :return: the Ariane gears cache size defined by InjectorCachedGearService.cache_id """ LOGGER.debug("InjectorCachedGearService.get_gears_cache_size") ret = None args = {'properties': {'OPERATION': 'COUNT_GEARS_CACHE', ...
java
public JSONArray getQueryResponse() throws HygieiaException { synchronized (this.v1Service) { Object obj = this.v1Service.executePassThroughQuery(this.getBasicQuery()); if (obj == null) { throw new HygieiaException( "FAILED: There was a problem pa...
python
def main(args): """API with args object containing configuration parameters""" global logging, log args = parse_args(args) logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG if args.verbose else logging.INFO, stream=sys.stdout) df = cat_tweets...
python
def guess_fill_char( left_comp, right_comp ): """ For the case where there is no annotated synteny we will try to guess it """ # No left component, obiously new return "*" # First check that the blocks have the same src (not just species) and # orientation if ( left_comp.src == right_co...
python
def info(self): """ Get session information. """ if self._session_url is None: return None resp = self.get(self._session_url) resp.raise_for_status() return response_to_json_dict(resp)
java
public BeanId getBeanId() { final byte[] rowkey = getRowKey(); final byte[] sid = new byte[] { rowkey[0], rowkey[1] }; final byte[] iid = new byte[] { rowkey[2], rowkey[3], rowkey[4], rowkey[5] }; final String schemaName = uids.getUsid().getName(sid); final String instanceId = ui...
java
public OvhPayment refund_refundId_payment_GET(String refundId) throws IOException { String qPath = "/me/refund/{refundId}/payment"; StringBuilder sb = path(qPath, refundId); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, OvhPayment.class); }
java
public static long long_from_julian( String s ) throws jsqlite.Exception { try { double d = Double.valueOf(s).doubleValue(); return long_from_julian(d); } catch (java.lang.Exception ee) { throw new jsqlite.Exception("not a julian date: " + s + ": " + ee); } ...
java
@Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case SarlPackage.SARL_SCRIPT: return createSarlScript(); case SarlPackage.SARL_FIELD: return createSarlField(); case SarlPackage.SARL_BREAK_EXPRESSION: return createSarlBreakExpression(); case SarlPackage.SARL_CONTINU...
python
def cookies(self): """Cookies in dict""" c = Cookie.SimpleCookie(self.getheader('set-cookie')) return dict((i.key, i.value) for i in c.values())
java
private static Map<String, String> getActors(GitRequest pr) { Map<String, String> actors = new HashMap<>(); if (!StringUtils.isEmpty(pr.getMergeAuthorLDAPDN())) { actors.put(pr.getMergeAuthor(), pr.getMergeAuthorLDAPDN()); } Optional.ofNullable(pr.getCommits()).orElse(Collect...
java
protected void setValue(int newPosition, T1[] values, int number, boolean currentExisting) { if (number > 0) { T1 valueSum = null; T2 valueSumOfLogs = null; T1 valueSumOfSquares = null; T1 valueMin = null; T1 valueMax = null; for (int i = 0; i < number; i++) { value...
python
def _addr_in_exec_memory_regions(self, addr): """ Test if the address belongs to an executable memory region. :param int addr: The address to test :return: True if the address belongs to an exectubale memory region, False otherwise :rtype: bool """ for start, en...
python
def upload(self, localfile: str, remotefile: str, overwrite: bool = True, permission: str = '', **kwargs): """ This method uploads a local file to the SAS servers file system. localfile - path to the local file to upload remotefile - path to remote file to create or overwrite overwrite ...
java
public static void addCacheControlAndEtagToResult(Result result, String etag, ApplicationConfiguration configuration) { String maxAge = configuration.getWithDefault(HTTP_CACHE_CONTROL_MAX_AGE, HTTP_CACHE_CONTROL_DEFAULT); if ("0".equals(maxAge)) { result.with(HeaderNames.CAC...
java
private void validatePathExists(String[] paths, String optType) throws FileNotFoundException { for (String path : paths) { validatePathExists(path, optType); } }
python
def get_all_destinations(self, server_id): """ Return all listener destinations in a WBEM server. This function contacts the WBEM server and retrieves the listener destinations by enumerating the instances of CIM class "CIM_ListenerDestinationCIMXML" in the Interop namespace of ...
python
def delete(self, filename=''): """Deletes given file or directory. If no filename is passed, current directory is removed. """ self._raise_if_none() fn = path_join(self.path, filename) try: if isfile(fn): remove(fn) else: ...
python
def get_spectra(data, filt_method=dict(lb=0.1, filt_order=256), spect_method=dict(NFFT=1024, n_overlap=1023, BW=2), phase_zero=None, line_broadening=None, zerofill=None): """ Derive the spectra from MRS data Parameters ---------- data : nitime TimeSeries class instan...
java
ServerResponse respond(ClientChallenge clientChallenge) throws GeneralSecurityException { SecretKeySpec authKey = generateKey(clientChallenge.kdf, clientChallenge.iterations, clientChallenge.nonce, clientChallenge.keyLength); initializeForAuth(clientChallenge.cipher, clientChallenge.nonce, authKey); ...
python
async def _lease_shard(self): """ 申请一个新分片,从小到大[0,4095]寻找一个为占用的分片 """ prefix = self._prefix + '/shards/' self._lease = await self._client.grant_lease(ttl=self._shard_ttl) timestamp_bytes = (0).to_bytes(4, byteorder='big') retries = 0 while True: shard_subidx...
python
def _join_index_objects(self, axis, other_index, how, sort=True): """Joins a pair of index objects (columns or rows) by a given strategy. Args: axis: The axis index object to join (0 for columns, 1 for index). other_index: The other_index to join on. how: The type of...
java
public boolean await(Object taskGroupId, long timeout, TimeUnit unit) { CountDownLatch latch = taskKeyToLatch.get(taskGroupId); if (latch == null) throw new IllegalArgumentException( "Unknown task group: " + taskGroupId); try { if (latch.await(timeout, uni...
python
def subscribe( self, requested_timeout=None, auto_renew=False, event_queue=None): """Subscribe to the service's events. Args: requested_timeout (int, optional): If requested_timeout is provided, a subscription valid for that number of seconds will...
python
def stem(self): """ Stem tokens with Porter Stemmer. """ def s(tokens): return [PorterStemmer().stem(t) for t in tokens] self.stems = list(map(s, self.tokens))
java
public static byte[] encodeBcd(String data, int num_bytes) { // allocate buffer byte buf[] = new byte[num_bytes]; // if length of addr is odd, then add an F onto the end of it if ((data.length() % 2) != 0) { data += "F"; } int index = 0; for (int i =...
python
def dynamic_content_item_create(self, data, **kwargs): "https://developer.zendesk.com/rest_api/docs/core/dynamic_content#create-item" api_path = "/api/v2/dynamic_content/items.json" return self.call(api_path, method="POST", data=data, **kwargs)
java
private org.ironjacamar.core.connectionmanager.listener.ConnectionListener associateConnectionListener(Credential credential, Object connection) throws ResourceException { log.tracef("associateConnectionListener(%s, %s)", credential, connection); if (isShutdown()) { throw new ...
java
@XmlElementDecl(namespace = "http://www.opengis.net/gml", name = "ArcString", substitutionHeadNamespace = "http://www.opengis.net/gml", substitutionHeadName = "_CurveSegment") public JAXBElement<ArcStringType> createArcString(ArcStringType value) { return new JAXBElement<ArcStringType>(_ArcString_QNAME, Arc...
java
public Rational add(Rational value) { if (denominator == value.getDenominator()) { return new Rational(numerator + value.getNumerator(), denominator); } else { return new Rational(numerator * value.getDenominator() + value.getNumerator() * denominator,...
python
def p_funcall_expr(p): """expr : expr LPAREN expr_list RPAREN | expr LPAREN RPAREN """ if (len(p) == 5 and len(p[3]) == 1 and p[3][0].__class__ is node.expr and p[3][0].op == ":" and not p[3][0].args): # foo(:) => ravel(foo) p[0] = node.funcall( func_expr=...
python
def BackAssign(cls, other_entity_klass, this_entity_backpopulate_field, other_entity_backpopulate_field, is_many_to_one=False): """ Assign defined one side mapping relationship to other side. For example, each employee ...
python
def lg_solubility_ratio(electrolytes, gas, units=None, warn=True): """ Returns the log10 value of the solubilty ratio Implements equation 16, p 156. from Schumpe (1993) Parameters ---------- electrolytes : dict Mapping substance key (one in ``p_ion_rM``) to concentration. gas : str ...
java
private JScrollPane getJScrollPane() { if (jScrollPane == null) { jScrollPane = new JScrollPane(); jScrollPane.setViewportView(getTreeParam()); jScrollPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 0, 0, 0)); } return jScrollPane...
java
public static String retrieveVendorId() { if (MapboxTelemetry.applicationContext == null) { return updateVendorId(); } SharedPreferences sharedPreferences = obtainSharedPreferences(MapboxTelemetry.applicationContext); String mapboxVendorId = sharedPreferences.getString(MAPBOX_SHARED_PREFERENCE_KE...
python
def poll(self, timeout_ms=None, future=None): """Try to read and write to sockets. This method will also attempt to complete node connections, refresh stale metadata, and run previously-scheduled tasks. Arguments: timeout_ms (int, optional): maximum amount of time to wait (...
java
public void setAttributeValue(final AttributeValue attributeValue) { deviceAttribute_3 = new DeviceAttribute_3(attributeValue); use_union = false; attributeValue_5.name = attributeValue.name; attributeValue_5.quality = attributeValue.quality; attributeValue_5.data_format = AttrDataFormat.FMT_UNKNOWN; attrib...
java
@ExceptionHandler(Exception.class) @RequestMapping(value = "api/edit/server/{id}", method = RequestMethod.POST) public @ResponseBody ServerRedirect updateServer(Model model, @PathVariable int id, @RequestParam(required = false) Boolean enabled) throws Exception { ...
java
@Override public Wave relatedWave(final Wave relatedWave) { this.relatedWave = relatedWave; this.relatedWave.isRelated(true); return this; }
python
def display_annotations(self): """Mark all the bookmarks/events, from annotations. This function is similar to display_markers, but they are called at different stages (f.e. when loading annotations file), so we keep them separate """ for rect in self.idx_annot: ...
python
def cache_file(filename, reload_on_change=False, opts=default_opts): """Cache filename if it is not already cached. Return the expanded filename for it in the cache or nil if we can not find the file.""" filename = pyc2py(filename) if filename in file_cache: if reload_on_change: checkcache(f...
java
public com.squareup.okhttp.Call getCharactersCharacterIdPortraitAsync(Integer characterId, String datasource, String ifNoneMatch, final ApiCallback<CharacterPortraitResponse> callback) throws ApiException { com.squareup.okhttp.Call call = getCharactersCharacterIdPortraitValidateBeforeCall(character...
python
def remove_permission(self, label, callback=None): """ Remove a permission from a queue. :type label: str or unicode :param label: The unique label associated with the permission being removed. :rtype: bool :return: True if successful, False otherwise. """ ...
java
public void setRawFragment(char[] escapedFragment) throws URIException { if (escapedFragment == null || escapedFragment.length == 0) { _fragment = escapedFragment; hash = 0; return; } if (!validate(escapedFragment, fragment)) { throw new URIExcepti...
python
def section_areas(neurites, neurite_type=NeuriteType.all): '''section areas in a collection of neurites''' return map_sections(sectionfunc.section_area, neurites, neurite_type=neurite_type)
python
def display(self, image): """ Takes a 1-bit :py:mod:`PIL.Image` and dumps it to the OLED display. :param image: Image to display. :type image: :py:mod:`PIL.Image` """ assert(image.mode == self.mode) assert(image.size == self.size) image = self.pr...
java
public String map(String name) { String mapped = super.get(name); if (mapped == null) { mapped = String.format("%s%03d", BASENAME, count.incrementAndGet()); super.put(name, mapped); } return mapped; }
java
private ObjectNode objectNodeFromElement(final AtlasElement element) { final boolean isEdge = element instanceof AtlasEdge; final boolean showTypes = mode == AtlasGraphSONMode.EXTENDED; final List<String> propertyKeys = isEdge ? this.edgePropertyKeys : this.vertexPropertyKeys; final Elem...
java
public void marshall(DeleteTranscriptionJobRequest deleteTranscriptionJobRequest, ProtocolMarshaller protocolMarshaller) { if (deleteTranscriptionJobRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.m...
python
def _set_global_rsvp_hello_acknowledgements(self, v, load=False): """ Setter method for global_rsvp_hello_acknowledgements, mapped from YANG variable /mpls_config/router/mpls/mpls_cmds_holder/rsvp/global_rsvp_hello_acknowledgements (empty) If this variable is read-only (config: false) in the source YANG...
java
public @Nullable <T> T findUniqueOrNull(@NotNull Class<T> cl, @NotNull SqlQuery query) { return findOptional(cl, query).orElse(null); }
python
def list( self, **kwargs ): """ Get a list of all Accounts authorized for the provided token. Args: Returns: v20.response.Response containing the results from submitting the request """ request = Request( 'GET', ...
python
def get_task_db(self, fs_id): '''从数据库中查询fsid的信息. 如果存在的话, 就返回这条记录; 如果没有的话, 就返回None ''' sql = 'SELECT * FROM tasks WHERE fsid=?' req = self.cursor.execute(sql, [fs_id, ]) if req: return req.fetchone() else: None
java
public boolean isSupported(String fileName) { String extension = getExtension(fileName); return isInternalSupported(extension) || isExternalSupported(extension); }
java
@Override public final E poll() { LinkedQueueNode<E> currConsumerNode = lpConsumerNode(); // don't load twice, it's alright LinkedQueueNode<E> nextNode = currConsumerNode.lvNext(); if (nextNode != null) { return getSingleConsumerNodeValue(currConsumerNode, nextNode); ...
python
def write(self, login, bot_account=True, edit_summary='', entity_type='item', property_datatype='string', max_retries=10, retry_after=30): """ Writes the WD item Json to WD and after successful write, updates the object with new ids and hashes generated by WD. For new items, also r...
python
def ext(self, extension): """ Match files with an extension - e.g. 'js', 'txt' """ new_pathq = copy(self) new_pathq._pattern.ext = extension return new_pathq
java
public List<Variable> getUsedVariables() { ArrayList<Variable> vars = new ArrayList<Variable>(); for (Operand o : getOperands()) { o.addUsedVariables(vars); } return vars; }
python
def _preprocess_typecheck(argSig, argspecs, slf_or_clsm = False): """From a PEP 484 style type-tuple with types for *varargs and/or **kw this returns a type-tuple containing Tuple[tp, ...] and Dict[str, kw-tp] instead. """ # todo: Maybe move also slf-logic here vargs = argspecs.varargs try: ...
python
def vertex_graph(entities): """ Given a set of entity objects generate a networkx.Graph that represents their vertex nodes. Parameters -------------- entities : list Objects with 'closed' and 'nodes' attributes Returns ------------- graph : networkx.Graph Graph where...
java
@Override public T transformElement(Pair<Map<String, ByteBuffer>, Map<String, ByteBuffer>> elem, CassandraDeepJobConfig<T> config) { Map<String, Cell> columnDefinitions = ((CassandraDeepJobConfig) config).columnDefinitions(); Class<T> entityClass = config.getEntityClas...