language
stringclasses
2 values
func_code_string
stringlengths
63
466k
java
private void addPostParams(final Request request) { if (friendlyName != null) { request.addPostParam("FriendlyName", friendlyName); } if (voiceFallbackMethod != null) { request.addPostParam("VoiceFallbackMethod", voiceFallbackMethod.toString()); } if (vo...
java
private void parseNamespaceValidationElements(Element messageElement, XmlMessageValidationContext context) { //check for validate elements, these elements can either have script, xpath or namespace validation information //for now we only handle namespace validation Map<String, String> validateN...
java
Object getValue(int fieldNum) { String attributeName = getAttributeName(fieldNum); ClassDescriptor cld = broker.getClassDescriptor(pc.getClass()); // field could be a primitive typed attribute... AttributeDescriptorBase fld = cld.getFieldDescriptorByName(attributeName)...
java
public MockResponse setChunkedBody(Buffer body, int maxChunkSize) { removeHeader("Content-Length"); headers.add(CHUNKED_BODY_HEADER); Buffer bytesOut = new Buffer(); while (!body.exhausted()) { long chunkSize = Math.min(body.size(), maxChunkSize); bytesOut.writeHexadecimalUnsignedLong(chunk...
python
def delete(self): """Delete the project. >>> from pytodoist import todoist >>> user = todoist.login('john.doe@gmail.com', 'password') >>> project = user.get_project('PyTodoist') >>> project.delete() """ args = {'ids': [self.id]} _perform_command(self.owne...
java
private long getTotalTime(ProjectCalendarDateRanges hours, Date startDate, Date endDate) { long total = 0; if (startDate.getTime() != endDate.getTime()) { Date start = DateHelper.getCanonicalTime(startDate); Date end = DateHelper.getCanonicalTime(endDate); for (DateRange...
java
public SIXAResource createXAResource(boolean useSingleResource) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "createXAResource", new Boolean(useSingleResource)); SIXAResource resource = null; //get the message store resource resource = transactionFactory...
java
public static JSONObject fetchDirectoryObjectJSONObject(JSONObject jsonObject) throws Exception { JSONObject jObj = new JSONObject(); jObj = jsonObject.optJSONObject("responseMsg"); return jObj; }
python
def _set_properties(self, api_response): """Update properties from resource in body of ``api_response`` :type api_response: dict :param api_response: response returned from an API call """ cleaned = api_response.copy() self._scrub_local_properties(cleaned) stati...
python
def stats(self, start_date, end_date, registered_only=False): """Returns a dictionary of visits including: * total visits * unique visits * return ratio * pages per visit (if pageviews are enabled) * time on site for all users, registered use...
java
@Override public int indexOf(int e) { if (e < 0) { throw new IllegalArgumentException("positive integer expected: " + Integer.toString(e)); } if (isEmpty()) { return -1; } int index = wordIndex(e); if (index >= firstEmptyWord || (words[index] & (1 << e)) == 0) { ...
java
public static List<String> transformText(Context context, List<String> permissions) { List<String> textList = new ArrayList<>(); for (String permission : permissions) { switch (permission) { case Permission.READ_CALENDAR: case Permission.WRITE_CALENDAR: { ...
python
def list_groups_in_group_category(self, group_category_id): """ List groups in group category. Returns a list of groups in a group category """ path = {} data = {} params = {} # REQUIRED - PATH - group_category_id """ID""" pat...
java
public static boolean containsTerritory(@Nonnull final String mapcode) throws IllegalArgumentException { checkMapcodeCode("mapcode", mapcode); return PATTERN_TERRITORY.matcher(mapcode.toUpperCase().trim()).find(); }
java
@SuppressWarnings("unchecked") @Override public EList<String> getWarnings() { return (EList<String>) eGet(StorePackage.Literals.LONG_ACTION_STATE__WARNINGS, true); }
java
public Object invoke(String text) { if (_componentType != null) { if (text == null || text.length() == 0) { return null; } else { String[] texts = ARRAY_VALUE_SEPARATOR.split(text); Object array = Array.newInstance(_componentType, texts.len...
python
def format_args_for_target(self, target, target_workdir): """Calculate the arguments to pass to the command line for a single target.""" args = ['--java_out={0}'.format(target_workdir)] # Add all params in payload to args relative_sources, source_roots = self._compute_sources(target) if target.p...
python
def get_child_banks(self, bank_id): """Gets the children of the given bank. arg: bank_id (osid.id.Id): the ``Id`` to query return: (osid.assessment.BankList) - the children of the bank raise: NotFound - ``bank_id`` is not found raise: NullArgument - ``bank_id`` is ``null`` ...
python
def _parse_singlefile(self, desired_type: Type[T], file_path: str, encoding: str, logger: Logger, options: Dict[str, Dict[str, Any]]) -> T: """ Relies on the inner parsing function to parse the file. If _streaming_mode is True, the file will be opened and closed by this...
python
def simxReadCollision(clientID, collisionObjectHandle, operationMode): ''' Please have a look at the function description/documentation in the V-REP user manual ''' collisionState = ct.c_ubyte() return c_ReadCollision(clientID, collisionObjectHandle, ct.byref(collisionState), operationMode), bool(co...
python
def get_obj(ref): """Get object from string reference.""" oid = int(ref) return server.id2ref.get(oid) or server.id2obj[oid]
python
def create_route(self, route_table_id, destination_cidr_block, gateway_id=None, instance_id=None): """ Creates a new route in the route table within a VPC. The route's target can be either a gateway attached to the VPC or a NAT instance in the VPC. :type route_table_id: str ...
java
@Pure public static boolean matchesParameters(Class<?>[] formalParameters, Object... parameterValues) { if (formalParameters == null) { return parameterValues == null; } if (parameterValues != null && formalParameters.length == parameterValues.length) { for (int i = 0; i < formalParameters.length; ++i) { ...
python
def get_unique_document_id(query_str): # type: (str) -> str """Get a unique id given a query_string""" assert isinstance(query_str, string_types), ( "Must receive a string as query_str. Received {}" ).format(repr(query_str)) if query_str not in _cached_queries: _cached_queries[query...
python
def check_ioc_countries(verbosity=1): """ Check if all IOC codes map to ISO codes correctly """ from django_countries.data import COUNTRIES if verbosity: # pragma: no cover print("Checking if all IOC codes map correctly") for key in ISO_TO_IOC: assert COUNTRIES.get(key), "No IS...
python
def humanTime(seconds): ''' Convert seconds to something more human-friendly ''' intervals = ['days', 'hours', 'minutes', 'seconds'] x = deltaTime(seconds=seconds) return ' '.join('{} {}'.format(getattr(x, k), k) for k in intervals if getattr(x, k))
python
def configure_rpc(cls, scheme=None): """ Get methods from scheme. """ scheme = scheme or cls._meta.scheme if not scheme: return if isinstance(scheme, basestring): scheme = importlib.import_module(scheme) cls.scheme_name = scheme.__name__ method...
python
def check_cliches_garner(text): """Check the text. source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY """ err = "cliches.garner" msg = u"'{}' is cliché." cliches = [ "a fate worse than death", "alas and alack", "at the end of the day", ...
java
@Override public SetCognitoEventsResult setCognitoEvents(SetCognitoEventsRequest request) { request = beforeClientExecution(request); return executeSetCognitoEvents(request); }
python
def convert_fragility_model_04(node, fname, fmcounter=itertools.count(1)): """ :param node: an :class:`openquake.commonib.node.Node` in NRML 0.4 :param fname: path of the fragility file :returns: an :class:`openquake.commonib.node.Node` in NRML 0.5 """ convert_type = {"lo...
python
def in4_chksum(proto, u, p): """ As Specified in RFC 2460 - 8.1 Upper-Layer Checksums Performs IPv4 Upper Layer checksum computation. Provided parameters are: - 'proto' : value of upper layer protocol - 'u' : IP upper layer instance - 'p' : the payload of the upper layer provided as a string ...
python
def tokenize(code): """Tokenize the string `code`""" tok_regex = '|'.join('(?P<{}>{})'.format(*pair) for pair in _tokens) tok_regex = re.compile(tok_regex, re.IGNORECASE|re.M) line_num = 1 line_start = 0 for mo in re.finditer(tok_regex, code): kind = mo.lastgroup value = mo.group...
python
def resp2flask(resp): """Convert an oic.utils.http_util instance to Flask.""" if isinstance(resp, Redirect) or isinstance(resp, SeeOther): code = int(resp.status.split()[0]) raise cherrypy.HTTPRedirect(resp.message, code) return resp.message, resp.status, resp.headers
java
public FSDataOutputStream append(Path f, int bufferSize) throws IOException { return append(f, bufferSize, null); }
python
def interface(self): """ Return a list of physical interfaces that the SNMP agent is bound to. :rtype: list(PhysicalInterface) """ nics = set([nic.get('nicid') for nic in \ getattr(self.engine, 'snmp_interface', [])]) return [self.engine.inter...
java
public static autoscalepolicy get(nitro_service service, String name) throws Exception{ autoscalepolicy obj = new autoscalepolicy(); obj.set_name(name); autoscalepolicy response = (autoscalepolicy) obj.get_resource(service); return response; }
python
def usage(): """ Prints usage message. """ print('Usage:', os.path.basename(sys.argv[0]), '[options]') print('Options:') print(' -k, --kval=<int> Value k for generating k-PHP') print(' Available values: [1 .. INT_MAX] (default = 1)') print(...
python
def getFilenames(self,pixels=None): """ Return the requested filenames. Parameters: ----------- pixels : requeseted pixels Returns: -------- filenames : recarray """ logger.debug("Getting filenames...") if pixels is None: ...
java
public java.util.List<String> getHsmsLastActionFailed() { if (hsmsLastActionFailed == null) { hsmsLastActionFailed = new com.amazonaws.internal.SdkInternalList<String>(); } return hsmsLastActionFailed; }
java
public boolean close() { for (Iterator<PageComponent> iter = new HashSet<PageComponent>(pageComponents).iterator(); iter.hasNext();) { PageComponent component = iter.next(); if (!close(component)) return false; } return true; }
python
def get_submission_and_student(uuid, read_replica=False): """ Retrieve a submission by its unique identifier, including the associated student item. Args: uuid (str): the unique identifier of the submission. Kwargs: read_replica (bool): If true, attempt to use the read replica database...
java
@Override public String getLocalName() { try { collaborator.preInvoke(componentMetaData); return request.getLocalName(); } finally { collaborator.postInvoke(); } }
python
def block_header_serialize( inp ): """ Given block header information, serialize it and return the hex hash. inp has: * version (int) * prevhash (str) * merkle_root (str) * timestamp (int) * bits (int) * nonce (int) Based on code from pybitcointools (https://github.com/vbuterin...
java
public final void train(Collection<Tree> trees, double weight) { // scan data for (Tree tree : trees) { train(tree, weight); } }
java
public Observable<ServiceResponse<ReplicationInner>> beginUpdateWithServiceResponseAsync(String resourceGroupName, String registryName, String replicationName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and can...
java
@Override public void setChains(int modelnr, List<Chain> chains){ for (Chain c: chains){ c.setStructure(this); } if (models.size()>modelnr) { models.remove(modelnr); } Model model = new Model(); model.setChains(chains); models.add(modelnr, model); }
java
public static String unifyTerminators(String text) { text = text.replaceAll("[\",:;()\\-]+", " "); // Replace commas, hyphens, quotes etc (count them as spaces) text = text.replaceAll("[\\.!?]", "."); // Unify terminators text = text.replaceAll("\\.[\\. ]+", "."); // Check for duplicated termina...
java
public static int readInt(byte b[], int offset) { int retValue; retValue = ((int)b[offset++]) << 24; retValue |= ((int)b[offset++] & 0xff) << 16; retValue |= ((int)b[offset++] & 0xff) << 8; retValue |= (int)b[offset] & 0xff; return retValue; }
java
void removeBifurcatedConsumerSession(BifurcatedConsumerSessionImpl bifurcatedConsumer) { if (TraceComponent.isAnyTracingEnabled() && CoreSPIConnection.tc.isEntryEnabled()) SibTr.entry(CoreSPIConnection.tc, "removeBifurcatedConsumerSession", new Object[] { this, bifurcated...
java
public void handleCommand() throws IOException { this.currentLine = this.reader.readLine(); if (this.currentLine == null) { LOGGER.severe("Current line is null!"); this.exit(); return; } final StringTokenizer st = new StringTokenizer(this.currentLine...
python
def main(argv=None): """The entry point of the application.""" if argv is None: argv = sys.argv[1:] usage = '\n\n\n'.join(__doc__.split('\n\n\n')[1:]) version = 'Nosey ' + __version__ # Parse options args = docopt(usage, argv=argv, version=version) # Execute return watch(args['...
java
public void prepareClassOptions() { //TaskMonitor monitor, //ObjectRepository repository) { this.classOptionNamesToPreparedObjects = null; Option[] optionArray = getOptions().getOptionArray(); for (Option option : optionArray) { if (option instanceof ClassOption) { ...
java
public static ConfigBuilder configure(Job job) { job.setInputFormatClass(DatasetKeyInputFormat.class); Configuration conf = Hadoop.JobContext.getConfiguration.invoke(job); return new ConfigBuilder(conf); }
python
def compare (v1, v2): """old style __cmp__ function returning -1, 0, 1""" v1_norm = normalize(v1) v2_norm = normalize(v2) if v1_norm < v2_norm: return -1 if v1_norm > v2_norm: return 1 return 0
python
def log(self): """ Return recent log entries as a string. """ logserv = self.system.request_service('LogStoreService') return logserv.lastlog(html=False)
java
public ServerAzureADAdministratorInner createOrUpdate(String resourceGroupName, String serverName, ServerAzureADAdministratorInner properties) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, serverName, properties).toBlocking().last().body(); }
python
def resolve(self, correlation_id): """ Resolves a single component connection. If connections are configured to be retrieved from Discovery service it finds a [[IDiscovery]] and resolves the connection there. :param correlation_id: (optional) transaction id to trace execution through ca...
java
public Collection<CommandHandler> getCommandHandlers(SqlLine sqlLine) { TableNameCompleter tableCompleter = new TableNameCompleter(sqlLine); List<Completer> empty = Collections.emptyList(); final Map<String, OutputFormat> outputFormats = getOutputFormats(sqlLine); final Map<BuiltInProperty, Collection<S...
java
@GwtIncompatible("Array.newArray(Class, int)") public final E[] toArray(Class<E> type) { return Iterables.toArray(iterable, type); }
python
def meta(cls): """Return a dictionary containing meta-information about the given resource.""" if getattr(cls, '__from_class__', None) is not None: cls = cls.__from_class__ attribute_info = {} for name, value in cls.__table__.columns.items(): attribute_inf...
python
def to_xdr_object(self): """Creates an XDR Operation object that represents this :class:`ManageOffer`. """ selling = self.selling.to_xdr_object() buying = self.buying.to_xdr_object() price = Operation.to_xdr_price(self.price) price = Xdr.types.Price(price['n'], p...
java
public String content() throws IllegalArgumentException { StringBuilder b = new StringBuilder(); DockerFileKeyword.FROM.addTo(b, baseImage != null ? baseImage : DockerAssemblyManager.DEFAULT_DATA_BASE_IMAGE); if (maintainer != null) { DockerFileKeyword.MAINTAINER.addTo(b, maintaine...
java
public String words(int count) { StringBuilder s = new StringBuilder(); while (count-- > 0) s.append(randomWord()).append(" "); return s.toString().trim(); }
python
def create_matrix_block_indices(row_to_obs): """ Parameters ---------- row_to_obs: 2D ndarray. There should be one row per observation per available alternative and one column per observation. This matrix maps the rows of the design matrix to the unique observations (on the colum...
java
public void cacheCommand_Clear(boolean waitOnInvalidation, DCache cache) { String template = cache.getCacheName(); synchronized (this) { BatchUpdateList bul = getUpdateList(cache); bul.invalidateByIdEvents.clear(); bul.invalidateByTemplateEvents.clear(); b...
java
int[] peek(int n) throws IOException { int[] buf = new int[n]; Mark m = mark(); boolean seenEOF = false; for (int i = 0; i < buf.length; i++) { if (!seenEOF) { buf[i] = next(); } else { buf[i] = -1; } if (buf[i] == -1) { ...
python
def _request_reports(self, resource_param_name, resources, endpoint_name): """Sends multiples requests for the resources to a particular endpoint. Args: resource_param_name: a string name of the resource parameter. resources: list of of the resources. endpoint_name: ...
python
def sample(self, observations, prior=None): """ Sample a new set of distribution parameters given a sample of observations from the given state. Both the internal parameters and the attached HMM model are updated. Parameters ---------- observations : [ numpy.array with...
python
def QA_util_make_hour_index(day, type_='1h'): """创建股票的小时线的index Arguments: day {[type]} -- [description] Returns: [type] -- [description] """ if QA_util_if_trade(day) is True: return pd.date_range( str(day) + ' 09:30:00', str(day) + ' 11:30:00', ...
java
private void reloadReferencesAndUpdateEO(ModelDiff diff, EngineeringObjectModelWrapper model) { for (ModelDiffEntry entry : diff.getDifferences().values()) { mergeEngineeringObjectWithReferencedModel(entry.getField(), model); } }
java
@Procedure @Description("apoc.couchbase.exists(hostOrKey, bucket, documentId) yield value - check whether a couchbase json document with the given ID does exist.") public Stream<BooleanResult> exists(@Name("hostOrKey") String hostOrKey, @Name("bucket") String bucket, @Nam...
java
@Pure @Inline(value = "StochasticGenerator.generateRandomValue(new TriangularStochasticLaw(($1), ($2), ($3)))", imported = {StochasticGenerator.class, TriangularStochasticLaw.class}) public static double random(double minX, double mode, double maxX) throws MathException { return StochasticGe...
java
@Override public UpdateSecurityGroupRuleDescriptionsIngressResult updateSecurityGroupRuleDescriptionsIngress(UpdateSecurityGroupRuleDescriptionsIngressRequest request) { request = beforeClientExecution(request); return executeUpdateSecurityGroupRuleDescriptionsIngress(request); }
python
def emit_code_from_ir(compound_match_query, compiler_metadata): """Return a MATCH query string from a CompoundMatchQuery.""" # If the compound match query contains only one match query, # just call `emit_code_from_single_match_query` # If there are multiple match queries, construct the query string for ...
java
public void start() // F73234 { final boolean isTraceOn = TraceComponent.isAnyTracingEnabled(); if (isTraceOn && tc.isEntryEnabled()) Tr.entry(tc, "start"); ivScheduledFuture = ivDeferrableScheduledExecutorService.schedule(this, ...
python
def PushItem(self, item, block=True): """Push an item on to the queue. If no ZeroMQ socket has been created, one will be created the first time this method is called. Args: item (object): item to push on the queue. block (Optional[bool]): whether the push should be performed in blocking ...
java
public void marshall(IpSet ipSet, ProtocolMarshaller protocolMarshaller) { if (ipSet == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(ipSet.getIpFamily(), IPFAMILY_BINDING); protocolMars...
java
@Override public int filter(double[] eigenValues) { // determine sum of eigenvalues double totalSum = 0; for(int i = 0; i < eigenValues.length; i++) { totalSum += eigenValues[i]; } double expectedVariance = totalSum / eigenValues.length * walpha; // determine strong and weak eigenpairs ...
python
def multinomial_like(x, n, p): R""" Multinomial log-likelihood. Generalization of the binomial distribution, but instead of each trial resulting in "success" or "failure", each one results in exactly one of some fixed finite number k of possible outcomes over n independent trials. 'x[i]' indica...
java
@Override protected void extractRemainingMetaData(Element element, ParserContext context, MutableBeanMetadata beanMetadata) throws Exception { addPropertyValueFromElement("applicationName", element, context, beanMetadata); }
java
public double d(char[] x, char[] y) { if (weight != null) return weightedEdit(x, y); else if (x.length == 1 || y.length == 1) if (damerauDistance) return damerau(x, y); else return levenshtein(x, y); else return br(x...
python
def parse_port_pin(name_str): """Parses a string and returns a (port, gpio_bit) tuple.""" if len(name_str) < 3: raise ValueError("Expecting pin name to be at least 3 characters") if name_str[:2] != 'GP': raise ValueError("Expecting pin name to start with GP") if not name_str[2:].isdigit(...
python
def app_start_up_time(self, package: str) -> str: '''Get the time it took to launch your application.''' output, _ = self._execute( '-s', self.device_sn, 'shell', 'am', 'start', '-W', package) return re.findall('TotalTime: \d+', output)[0]
python
def replace_greek(self, name): """Replace text representing greek letters with greek letters.""" name = name.replace('gamma-delta', 'gammadelta') name = name.replace('interleukin-1 beta', 'interleukin-1beta') greek_present = False for greek_txt, uni in self.greek2uni.items(): ...
python
def ptmsiReallocationCommand(PTmsiSignature_presence=0): """P-TMSI REALLOCATION COMMAND Section 9.4.7""" a = TpPd(pd=0x3) b = MessageType(mesType=0x10) # 00010000 c = MobileId() d = RoutingAreaIdentification() e = ForceToStandbyAndSpareHalfOctets() packet = a / b / c / d / e if PTmsiSig...
java
public static <T> T toType(Object data, Class<T> type) { try { if (Reflection.instanceOf(data, type)) { return Reflection.cast(data, type); } if (Collection.class.isAssignableFrom(type)) { return toCollectionType(data, type); } ...
java
public OnLineStatistics getOnlineDenseStats() { OnLineStatistics stats = new OnLineStatistics(); double N = getNumNumericalVars(); for(int i = 0; i < size(); i++) stats.add(getDataPoint(i).getNumericalValues().nnz()/N); return stats; }
java
public void loadDirectory( String lexDir ) throws IOException { File path = new File(lexDir); if ( ! path.exists() ) { throw new IOException("Lexicon directory ["+lexDir+"] does'n exists."); } /* * load all the lexicon file under the lexicon path ...
python
def prep_image(image, tile_size): """Takes an image and a tile size and returns a possibly cropped version of the image that is evenly divisible in both dimensions by the tile size. """ w, h = image.size x_tiles = w / tile_size # floor division y_tiles = h / tile_size new_w = x_tiles * tile...
python
def read_all(self): """Read all remaining data in the packet. (Subsequent read() will return errors.) """ result = self._data[self._position:] self._position = None # ensure no subsequent read() return result
java
public static double average(List<? extends Number> values) { if (values == null || values.isEmpty()) return 0D; double sum = 0D; for (Number v : values) sum += v.doubleValue(); return sum / values.size(); }
python
async def create(self) -> 'Wallet': """ Create wallet as configured and store DID, or else re-use any existing configuration. Operation sequence create/store-DID/close does not auto-remove the wallet on close, even if so configured. :return: current object """ L...
java
@Override public Streamlet<R> repartition(int numPartitions) { return this.map((a) -> a).setNumPartitions(numPartitions); }
java
public static Predicate<Matcher> preventLoops() { return new Predicate<Matcher>() { private final Set<Matcher> visited = new HashSet<Matcher>(); public boolean apply(Matcher node) { node = unwrap(node); if (visited.contains(node)) { re...
java
public static void checkSyntax(String fqan) { if (fqan.length() > 255) throw new VOMSError("fqan.length() > 255"); if (!fqanPattern.matcher(fqan).matches()) throw new VOMSError("Syntax error in fqan: " + fqan); }
java
void remove(T obj) { _queue.remove(obj); if (_prioritize == obj) { _prioritize = null; } }
java
public <T extends IRestfulClient> T newRestfulClient(Class<T> theClientType, String theServerBase) { return getRestfulClientFactory().newClient(theClientType, theServerBase); }
java
private static double getRadiusForNucl(NucleotideImpl nuc, Atom atom) { if (atom.getElement().equals(Element.H)) return Element.H.getVDWRadius(); if (atom.getElement().equals(Element.D)) return Element.D.getVDWRadius(); if (atom.getElement()==Element.C) return NUC_CARBON_VDW; if (atom.getElement()==Element.N...
java
public ServiceFuture<ImportExportResponseInner> createImportOperationAsync(String resourceGroupName, String serverName, String databaseName, ImportExtensionRequest parameters, final ServiceCallback<ImportExportResponseInner> serviceCallback) { return ServiceFuture.fromResponse(createImportOperationWithServiceRe...
python
async def login( sess: aiohttp.ClientSession, registry_url: yarl.URL, credentials: dict, scope: str) -> dict: ''' Authorize to the docker registry using the given credentials and token scope, and returns a set of required aiohttp.ClientSession.request() keyword arguments for ...