language stringclasses 2
values | func_code_string stringlengths 63 466k |
|---|---|
java | @Override
public EClass getIfcCableCarrierFitting() {
if (ifcCableCarrierFittingEClass == null) {
ifcCableCarrierFittingEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc4Package.eNS_URI)
.getEClassifiers().get(69);
}
return ifcCableCarrierFittingEClass;
} |
java | public void process(ImageGray disparity , BufferedImage color ) {
cloudRgb.setMaxSize(disparity.width*disparity.height);
cloudXyz.setMaxSize(disparity.width*disparity.height*3);
cloudRgb.reset();
cloudXyz.reset();
if( disparity instanceof GrayU8)
process((GrayU8)disparity,color);
else
process((GrayF3... |
java | public static String prependIfMissingIgnoreCase(final String str, final CharSequence prefix, final CharSequence... prefixes) {
return prependIfMissing(str, prefix, true, prefixes);
} |
python | def convert_magicc_to_openscm_regions(regions, inverse=False):
"""
Convert MAGICC regions to OpenSCM regions
Parameters
----------
regions : list_like, str
Regions to convert
inverse : bool
If True, convert the other way i.e. convert OpenSCM regions to MAGICC7
regions
... |
java | private void setCorsPolicy(String bucketName, List<String> allowedOrigins, String dcHost) {
// If list is null or empty, add a default value
if (null == allowedOrigins || allowedOrigins.isEmpty()) {
allowedOrigins = new ArrayList<>();
allowedOrigins.add("https://*");
} el... |
python | def _version_checker(module, minver):
"""Checks that module has a higher version that minver.
params:
- module: a module to test
- minver: a tuple of versions
"""
# We could use LooseVersion, but distutils imports imp which is deprecated
version_regexp = r'[a-z]?((?:\d|\.)+\d+)(?:\.dev[0-... |
python | def location(args):
"""
%prog location bedfile fastafile
Given SNP locations, summarize the locations in the sequences. For example,
find out if there are more 3`-SNPs than 5`-SNPs.
"""
from jcvi.formats.bed import BedLine
from jcvi.graphics.histogram import stem_leaf_plot
p = OptionPa... |
java | public static long current(Context context, String tag) {
Long appRxValue = sReceivedBytes.get(tag);
Long appTxValue = sSendBytes.get(tag);
if (appRxValue == null || appTxValue == null) {
if (DEBUG) {
LogUtils.w(TAG, "current() appRxValue or appTxValue is null.");
... |
java | public void sendQuickReplyPayload(String payload) {
MessageEnvelope envelope = new MessageEnvelope();
QuickReply quickReply = new QuickReply("Sample", payload);
ReceivedMessage message = new ReceivedMessage();
message.setQuickReply(quickReply);
envelope.setMessage(message);
envelope.setSender(new User(face... |
python | def _fetch(self, params, required, defaults):
"""Make the NVP request and store the response."""
defaults.update(params)
pp_params = self._check_and_update_params(required, defaults)
pp_string = self.signature + urlencode(pp_params)
response = self._request(pp_string)
res... |
python | def closeView(self, view=None):
"""
Closes the inputed view.
:param view | <int> || <XView> || None
"""
if type(view) == int:
view = self.widget(view)
elif view == None:
view = self.currentView()
index = self.indexOf(... |
python | def addMibSource(self, *mibSources):
"""Adds path to repository to search PySNMP MIB files.
Parameters
----------
*mibSources :
one or more paths to search or Python package names to import
and search for PySNMP MIB modules.
Returns
-------
... |
python | def load_manifest(self, path):
"""
Loads a plugin manifest from a given path
:param path: The folder to load the plugin manifest from
"""
manifest_path = os.path.join(path, "plugin.json")
self._logger.debug("Attempting to load plugin manifest from {}.".format(manifest_pa... |
java | public static String toAbsoluteUrl(String absoluteBasePath, String relativePath) {
try {
URL absoluteUrl = new URL(absoluteBasePath);
return new URL(absoluteUrl, relativePath).toString();
} catch (Exception e) {
throw new UtilException(e, "To absolute url [{}] base [{}] error!", relativePath, absolute... |
java | JCVariableDecl variableDeclarator(JCModifiers mods, JCExpression type, boolean reqInit, Comment dc) {
return variableDeclaratorRest(token.pos, mods, type, ident(), reqInit, dc);
} |
java | public void remove(String key) {
int i = indexOfKey(key);
if (i != NotFound)
remove(i);
} |
java | public static void assertThatEndMethodCheckFileExists(String uniqueFileName) throws IOException {
Enumeration<URL> resources = ClassLoader.getSystemResources(uniqueFileName);
if(!resources.hasMoreElements()) {
throw new AssertionError("End method check uniqueFileName named: " + uniqueFileName + " doesn't exist.\... |
python | def cprint_map(text, cmap, **kwargs):
"""
Print colorize text.
cmap is a dict mapping keys to color options.
kwargs are passed to print function
Example:
cprint_map("Hello world", {"Hello": "red"})
"""
try:
print(colored_map(text, cmap), **kwargs)
except TypeError:
... |
java | public static void executeMojo(Plugin plugin, String goal, Xpp3Dom configuration, ExecutionEnvironment env) throws MojoExecutionException {
if (configuration == null) {
throw new NullPointerException("configuration may not be null");
}
try {
String executionId = null;
if (goal != null && goal.l... |
python | def separate_resources(self):
# type: () -> None
"""Move contents of resources key in internal dictionary into self.resources
Returns:
None
"""
self._separate_hdxobjects(self.resources, 'resources', 'name', hdx.data.resource.Resource) |
python | def serve(self, liveport=None, host=None, restart_delay=2):
"""Start serve the server with the given port.
:param liveport: live reload on this port
:param host: serve on this hostname, default is 127.0.0.1
:param open_url_delay: open webbrowser after the delay seconds
"""
... |
python | def collision_encode(self, src, id, action, threat_level, time_to_minimum_delta, altitude_minimum_delta, horizontal_minimum_delta):
'''
Information about a potential collision
src : Collision data source (uint8_t)
id ... |
python | def link_head(self, node):
'''Add a node to the head. '''
assert not node.tail
old_head = self.head
if old_head:
assert old_head.tail == self
old_head.tail = node
node.head = old_head
node.tail = self
self.head = node |
python | def process_runner(quantity=1, queue=None, backend=None):
'''
Process queued runners
quantity
number of runners to process
queue
queue to insert the runner reference into
backend
backend that to use for the queue
CLI Example:
.. code-block:: bash
salt-ru... |
python | def read_nwchem(basis_lines, fname):
'''Reads NWChem-formatted file data and converts it to a dictionary with the
usual BSE fields
Note that the nwchem format does not store all the fields we
have, so some fields are left blank
'''
skipchars = '#'
basis_lines = [l for l in basis_l... |
python | def makepipebranch(idf, bname):
"""make a branch with a pipe
use standard inlet outlet names"""
# make the pipe component first
pname = "%s_pipe" % (bname,)
apipe = makepipecomponent(idf, pname)
# now make the branch with the pipe in it
abranch = idf.newidfobject("BRANCH", Name=bname)
ab... |
java | @Override
public void removeByCommerceDiscountId(long commerceDiscountId) {
for (CommerceDiscountRule commerceDiscountRule : findByCommerceDiscountId(
commerceDiscountId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) {
remove(commerceDiscountRule);
}
} |
python | def _SignedVarintSize(value):
"""Compute the size of a signed varint value."""
if value < 0: return 10
if value <= 0x7f: return 1
if value <= 0x3fff: return 2
if value <= 0x1fffff: return 3
if value <= 0xfffffff: return 4
if value <= 0x7ffffffff: return 5
if value <= 0x3ffffffffff: return 6
if value <... |
python | def _request_with_error_ignored(self, rd):
"""Send smt request, log and ignore any errors."""
try:
return self._request(rd)
except Exception as err:
# log as warning and ignore namelist operation failures
LOG.warning(six.text_type(err)) |
java | public Version getVersion(String rawVersion)
{
Version version = this.versions.get(rawVersion);
if (version == null) {
version = new DefaultVersion(rawVersion);
this.versions.put(rawVersion, version);
}
return version;
} |
python | def initialize_baremetal_switch_interfaces(self, interfaces):
"""Initialize Nexus interfaces and for initial baremetal event.
This get/create port channel number, applies channel-group to
ethernet interface, and initializes trunking on interface.
:param interfaces: Receive a list of in... |
python | def main():
"""Main program."""
global totalMethod
formatNames = list(formats.keys())
formatNames.sort()
themeNames = list(themes.keys())
themeNames.sort()
labelNames = list(labels.keys())
labelNames.sort()
optparser = optparse.OptionParser(
usage="\n\t%prog [options] [f... |
python | def clear_solution(self):
"""stub"""
if 'solution' not in self.my_osid_object_form._my_map:
raise NotFound()
self.my_osid_object_form._my_map['solution'] = \
dict(self._solution_metadata['default_string_values'][0]) |
java | public void validate(FileItem fi, boolean isdefault) throws CmsIllegalArgumentException {
// check the input directory and the HTTP upload file
if (fi == null) {
if (CmsStringUtil.isEmptyOrWhitespaceOnly(m_inputDir) && !isdefault) {
throw new CmsIllegalArgumentException(
... |
java | public synchronized boolean sendClose() {
if (closed.compareAndSet(false, true)) {
try {
if (listeners == null) {
buffer.addLast(CLOSE_MARKER);
} else if (listeners.length == 1) {
listeners[0].onPacket(null, cause, true);
} else {
for (PacketListener listener : listeners) {
... |
java | @Override
public UpdateRateBasedRuleResult updateRateBasedRule(UpdateRateBasedRuleRequest request) {
request = beforeClientExecution(request);
return executeUpdateRateBasedRule(request);
} |
java | public MarkerOptions createMarkerOptions(FeatureRow featureRow) {
return StyleUtils.createMarkerOptions(featureStyleExtension, featureRow, density, iconCache);
} |
python | def get_random_number_generator_and_set_seed(seed=None):
"""Get a JAX random number generator and set random seed everywhere."""
random.seed(seed)
# While python random accepts None as seed and uses time/os seed then,
# some other functions expect integers so we create one here.
if seed is None:
seed = ra... |
java | private Transformer createIndentingTransformer() throws TransformerConfigurationException {
Transformer transformer = createTransformer();
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
return transformer;
... |
python | def transformer_ae_base():
"""Set of hyperparameters."""
hparams = transformer_ae_small()
hparams.batch_size = 2048
hparams.hidden_size = 512
hparams.filter_size = 4096
hparams.num_hidden_layers = 6
return hparams |
python | def console_list_load_xp(
filename: str
) -> Optional[List[tcod.console.Console]]:
"""Return a list of consoles from a REXPaint `.xp` file."""
tcod_list = lib.TCOD_console_list_from_xp(filename.encode("utf-8"))
if tcod_list == ffi.NULL:
return None
try:
python_list = []
lib.T... |
python | async def _send_to_messenger_profile(self, page, content):
"""
The messenger profile API handles all meta-information about the bot,
like the menu. This allows to submit data to this API endpoint.
:param page: page dict from the configuration
:param content: content to be sent t... |
java | @Override
public StreamT<W,T> takeWhile(final Predicate<? super T> p) {
return (StreamT<W,T>) FoldableTransformerSeq.super.takeWhile(p);
} |
java | protected static TypedPropertyDescriptor _buildPropertyDescriptor(
String propertyName, Class beanClass, String getterName, String setterName )
{
try
{
return new TypedPropertyDescriptor( propertyName, beanClass, getterName, setterName );
}
catch( IntrospectionException e )
{
throw... |
java | @Override
public void init(FilterConfig filterConfig) throws ServletException {
try {
expiration = Long.valueOf(filterConfig.getInitParameter(CacheConfigParameter.EXPIRATION.getName()));
} catch (NumberFormatException e) {
throw new ServletException(new StringBuilder("The ini... |
java | public final MediaStatus getMediaStatus() throws IOException {
Application runningApp = getRunningApp();
if (runningApp == null) {
throw new ChromeCastException("No application is running in ChromeCast");
}
return channel().getMediaStatus(getTransportId(runningApp));
} |
python | def receive(self):
""" receive the next PDU from the watchman service
If the client has activated subscriptions or logs then
this PDU may be a unilateral PDU sent by the service to
inform the client of a log event or subscription change.
It may also simply be the response porti... |
java | @SuppressWarnings("unused")
public static void changeCredentials(String accountID, String token) {
changeCredentials(accountID, token, null);
} |
python | def undepend(self, *args, **kwargs):
'''Remove specific (or all) job dependencies from this job:
job.remove(jid1, jid2)
job.remove(all=True)'''
if kwargs.get('all', False):
return self.client('depends', self.jid, 'off', 'all') or False
else:
retur... |
python | def calc_power_density(self):
"""
Solar cell power density
The output power density is calculated according to a slight modification of Shockley & Queisser's :cite:`10.1063/1.1736034` Eq. 2.4. This method returns values of type :class:`astropy.units.Quantity` with units of [W m^-2].
"""... |
java | public MedicationOrder addReasonCode(CodeableConcept t) { //3
if (t == null)
return this;
if (this.reasonCode == null)
this.reasonCode = new ArrayList<CodeableConcept>();
this.reasonCode.add(t);
return this;
} |
java | @Nullable
public static <T> T findEnclosingNode(TreePath path, Class<T> klass) {
path = findPathFromEnclosingNodeToTopLevel(path, klass);
return (path == null) ? null : klass.cast(path.getLeaf());
} |
java | public Drawer append(@NonNull Drawer result) {
if (mUsed) {
throw new RuntimeException("you must not reuse a DrawerBuilder builder");
}
if (mDrawerGravity == null) {
throw new RuntimeException("please set the gravity for the drawer");
}
//set that this bu... |
python | def crypttab(config='/etc/crypttab'):
'''
List the contents of the crypttab
CLI Example:
.. code-block:: bash
salt '*' cryptdev.crypttab
'''
ret = {}
if not os.path.isfile(config):
return ret
with salt.utils.files.fopen(config) as ifile:
for line in ifile:
... |
java | @Override
public StopDeploymentResult stopDeployment(StopDeploymentRequest request) {
request = beforeClientExecution(request);
return executeStopDeployment(request);
} |
java | protected Logger buildLogger(String fileStr) throws IOException {
String loggerName = buildLoggerName();
Appender appender = buildAppender(loggerName, fileStr);
// Create the logger and add to the map of loggers using our factory
Logger logger = loggerContext.getLogger(loggerName);
logger.addAppender(appende... |
java | public CMAArray<CMAEntry> fetchAll(String spaceId, String environmentId) {
return fetchAll(spaceId, environmentId, new HashMap<>());
} |
java | public RouteInner createOrUpdate(String resourceGroupName, String routeTableName, String routeName, RouteInner routeParameters) {
return createOrUpdateWithServiceResponseAsync(resourceGroupName, routeTableName, routeName, routeParameters).toBlocking().last().body();
} |
java | public final boolean defineDeclaredProperty(String propertyName,
JSType type, Node propertyNode) {
boolean result = defineProperty(propertyName, type, false, propertyNode);
// All property definitions go through this method
// or defineInferredProperty. Because the properties defined an an
// obje... |
python | def child_count(self, path):
"""
returns the child count under path (deals with znodes going away as it's
traversing the tree).
"""
stat = self.stat(path)
if not stat:
return 0
count = stat.numChildren
for _, _, stat in self.tree(path, 0, incl... |
python | def lon360to180(lon):
"""Convert longitude from (0, 360) to (-180, 180)
"""
if np.any(lon > 360.0) or np.any(lon < 0.0):
print("Warning: lon outside expected range")
lon = wraplon(lon)
#lon[lon > 180.0] -= 360.0
#lon180 = (lon+180) - np.floor((lon+180)/360)*360 - 180
lon = lon - ... |
java | public static Entry javaObject(String classname, String constructorArgument, Dn baseDn) {
Dn dn = LdapUtils.concatDn(SchemaConstants.JAVA_CLASS_NAME_ATTRIBUTE, classname, baseDn);
Entry entry = new DefaultEntry(dn);
try {
entry.add(SchemaConstants.OBJECT_CLASS_ATTRIBUTE, SchemaConsta... |
java | protected void delete(ColumnFamilyHandle cfh, WriteOptions writeOptions, byte[] key)
throws RocksDbException {
if (readOnly) {
throw new RocksDbException.ReadOnlyException("delete");
}
if (cfh == null) {
throw new RocksDbException.ColumnFamilyNotExists();
... |
java | private Object retry4ConfDownload(RemoteUrl remoteUrl, File localTmpFile, int retryTimes, int sleepSeconds)
throws Exception {
Exception ex = null;
for (URL url : remoteUrl.getUrls()) {
// 可重试的下载
UnreliableInterface unreliableImpl = new FetchConfFile(url, localTmpFil... |
python | def __update(self, task_source):
""" Recheck next start of tasks from the given one only
:param task_source: source to check
:return: None
"""
next_start = task_source.next_start()
if next_start is not None:
if next_start.tzinfo is None or next_start.tzinfo != timezone.utc:
raise ValueError('Inval... |
java | public com.google.api.ads.admanager.axis.v201811.Money getGrossRate() {
return grossRate;
} |
python | def pipe_sort(context=None, _INPUT=None, conf=None, **kwargs):
"""An operator that sorts the input source according to the specified key.
Not loopable. Not lazy.
Parameters
----------
context : pipe2py.Context object
_INPUT : pipe2py.modules pipe like object (iterable of items)
kwargs -- ot... |
java | public JsHandlerRegistration addGeometryEditMoveHandler(final GeometryEditMoveHandler handler) {
org.geomajas.plugin.editing.client.event.GeometryEditMoveHandler h;
h = new org.geomajas.plugin.editing.client.event.GeometryEditMoveHandler() {
public void onGeometryEditMove(GeometryEditMoveEvent event) {
List... |
python | def _warn_silly_options(cls, args):
'''Print warnings about any options that may be silly.'''
if 'page-requisites' in args.span_hosts_allow \
and not args.page_requisites:
_logger.warning(
_('Spanning hosts is allowed for page requisites, '
'... |
python | def losing_abbr(self):
"""
Returns a ``string`` of the losing team's abbreviation, such as 'LAD'
for the Los Angeles Dodgers.
"""
if self.winner == HOME:
return utils._parse_abbreviation(self._away_name)
return utils._parse_abbreviation(self._home_name) |
java | private Entity innerRetrieveEntityFromRepository(Root root, Entity retEntDO, String uniqueId, boolean isAllowOperationIfReposDown,
Set<String> failureRepositoryIds) throws WIMException {
String METHODNAME = "retrieveEntityFromRepository";
List<String... |
python | def get_definition(self):
'''Returns definition'''
definition = parsers.get_definition(self.__chebi_id)
if definition is None:
definition = parsers.get_definition(self.get_parent_id())
if definition is None:
for parent_or_child_id in self.__get_all_ids():
... |
java | public void declareCursor(SqlSelect select, SqlValidatorScope parentScope) {
cursorSet.add(select);
// add the cursor to a map that maps the cursor to its select based on
// the position of the cursor relative to other cursors in that call
FunctionParamInfo funcParamInfo = functionCallStack.peek();
Map<Integ... |
python | def _try_load_module(path, import_name=None):
"""Try to programmatically load a python module by path.
Path should point to a python file (optionally without the .py) at the
end. If it ends in a :<name> then name must point to an object defined in
the module, which is returned instead of the module it... |
python | def update_fallbackserver(self, serverid, data):
"""Update Fallback server"""
return self.api_call(
ENDPOINTS['fallbackservers']['update'],
dict(serverid=serverid),
body=data) |
python | def showerror(title=None, message=None, **options):
"""Original doc: Show an error message"""
return psidialogs.error(title=title, message=message) |
java | private void enableUnsafeSSLRenegotiationCheckBoxActionPerformed(java.awt.event.ActionEvent evt) {
boolean enabled = enableUnsafeSSLRenegotiationCheckBox.isSelected();
if (enabled) {
JOptionPane.showMessageDialog(null, new String[] {
Constant.messages.getString("options.cert.label.enableunsafess... |
java | @GET
@Path("stack")
@Produces(MediaType.TEXT_PLAIN)
public String getThreadDump() {
if (LOG.isDebugEnabled()) {
LOG.debug("==> AdminResource.getThreadDump()");
}
ThreadGroup topThreadGroup = Thread.currentThread().getThreadGroup();
while (topThreadGroup.getParen... |
java | public void setSecureSiteUrl(String secureSiteUrl) {
this.secureSiteUrl = StringUtils.isBlank(secureSiteUrl) ? new ServerSiteUrlConfig() : new ServerSiteUrlConfig(secureSiteUrl);
} |
python | def peer_relation_id():
'''Get the peers relation id if a peers relation has been joined, else None.'''
md = metadata()
section = md.get('peers')
if section:
for key in section:
relids = relation_ids(key)
if relids:
return relids[0]
return None |
python | def from_float_26(f):
"""Converts a float to a decimal number, exactly.
Note that Decimal.from_float(0.1) is not the same as Decimal('0.1').
Since 0.1 is not exactly representable in binary floating point, the
value is stored as the nearest representable value which is
0x1.999999999999ap-4. The ex... |
python | def centroid_refine_triangulation_by_vertices(self, vertices):
"""
return points defining a refined triangulation obtained by bisection of all edges
in the triangulation connected to any of the vertices in the list provided
"""
triangles = self.identify_vertex_triangles(vertices... |
python | def import_to_gluon(model_file, ctx):
"""
Imports the ONNX model files, passed as a parameter, into Gluon SymbolBlock object.
Parameters
----------
model_file : str
ONNX model file name
ctx : Context or list of Context
Loads the model into one or many context(s).
Returns
... |
java | public ValueType get(final KeyType... keys) {
if (ArrayUtils.isEmpty(keys)) {
return null;
}
int keysLength = keys.length;
if (keysLength == 1) {
return get(keys[0]);
} else {
StorageComponent<KeyType, ValueType> storageComponent = this;
... |
python | async def undo_check_in(self):
""" Undo the check in for this participant
|methcoro|
Warning:
|unstable|
Raises:
APIException
"""
res = await self.connection('POST', 'tournaments/{}/participants/{}/undo_check_in'.format(self._tournament_id, sel... |
python | def _ParseTypeCheckString(type_check_string, stack_location, self_name):
"""Convert string version of a type_check into a python instance.
Type checks can be either defined directly in python code or in a string.
The syntax is exactly the same since we use eval to parse the string.
:param int stack_location: ... |
java | public static vpnsessionpolicy[] get(nitro_service service) throws Exception{
vpnsessionpolicy obj = new vpnsessionpolicy();
vpnsessionpolicy[] response = (vpnsessionpolicy[])obj.get_resources(service);
return response;
} |
java | public static CoronaProxyJobTrackerService.Client
getPJTClient(CoronaConf conf) throws IOException {
InetSocketAddress address =
NetUtils.createSocketAddr(conf.getProxyJobTrackerThriftAddress());
TFramedTransport transport = new TFramedTransport(
new TSocket(address.getHostName(), address.getPor... |
java | public int equivalenceCode()
{
int result =
29 + (STRUCTURE_FORMAT != null ? STRUCTURE_FORMAT.hashCode() : 0);
result = 29 * result +
(STRUCTURE_DATA != null ? STRUCTURE_DATA.hashCode() : 0);
return result;
} |
python | def map_over_glob(fn, path, pattern):
"""map a function over a glob pattern, relative to a directory"""
return [fn(x) for x in glob.glob(os.path.join(path, pattern))] |
python | def del_rules(cls, *names, attr=None):
"""Delete algebraic rules used by :meth:`create`
Remove the rules with the given `names`, or all rules if no names are
given
Args:
names (str): Names of rules to delete
attr (None or str): Name of the class attribute from w... |
java | public void add(DepTreeNode child) {
if (children == null) {
children = new HashMap<String, DepTreeNode>();
}
children.put(child.getName(), child);
child.setParent(this);
} |
java | public static EntryElement makeEntryElement(Object value) {
Class<?> type = ClassUtils.primitiveToWrapper(value.getClass());
return new EntryElement(type.getName(), value.toString());
} |
python | def get_slot_value(handler_input, slot_name):
# type: (HandlerInput, str) -> AnyStr
"""Return the slot value from intent request.
The method retrieves the slot value from the input intent request
for the given ``slot_name``. More information on the slots can be
found here :
https://developer.am... |
python | def get_authorize_url(self, redirect_uri, **kw):
'''
return the authorization url that the user should be redirected to.
'''
redirect = redirect_uri if redirect_uri else self._redirect_uri
if not redirect:
raise APIError('21305', 'Parameter absent: redirect_uri', 'OAu... |
java | public static int fromString (String dirstr)
{
for (int ii = 0; ii < FINE_DIRECTION_COUNT; ii++) {
if (DIR_STRINGS[ii].equals(dirstr)) {
return ii;
}
}
return NONE;
} |
python | def sasdata2dataframeCSV(self, table: str, libref: str ='', dsopts: dict = None, tempfile: str=None, tempkeep: bool=False, **kwargs) -> '<Pandas Data Frame object>':
"""
This method exports the SAS Data Set to a Pandas Data Frame, returning the Data Frame object.
table - the name of the SAS Data Se... |
python | def _build_ds_from_instruction(instruction, ds_from_file_fn):
"""Map an instruction to a real datasets for one particular shard.
Args:
instruction: A `dict` of `tf.Tensor` containing the instruction to load
the particular shard (filename, mask,...)
ds_from_file_fn: `fct`, function which returns the d... |
java | @PublicEvolving
public DataStreamSink<T> printToErr() {
PrintSinkFunction<T> printFunction = new PrintSinkFunction<>(true);
return addSink(printFunction).name("Print to Std. Err");
} |
java | public WSKeyStore getWSKeyStore(String keyStoreName) throws SSLException {
if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
Tr.entry(tc, "getWSKeyStore: " + keyStoreName);
if (keyStoreName == null) {
throw new SSLException("No keystore name provided.");
}... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.