query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
Creates a new selection of all vertices NOT currently selected. @return itself
[ "function() {\n var newSel = [];\n var vertices = this.mesh.getVertices();\n var l = vertices.length;\n for (var i=0;i<l;i++) {\n\t\t\tvar v = vertices[i];\n if (this.selection.indexOf(v) < 0 ) {\n newSel.push(v);\n }\n }\n this.selectio...
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
display metadata about the table, size, number of rows, columns and their data type
[ "def columnInfo(self):\n \n code = \"proc contents data=\" + self.libref + '.' + self.table + ' ' + self._dsopts() + \";ods select Variables;run;\"\n\n if self.sas.nosub:\n print(code)\n return\n\n if self.results.upper() == 'PANDAS':\n code = \"proc cont...
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
@param array $content @return array
[ "private function normalizeFileInfo(array $content)\n {\n $path = pathinfo($content['Key']);\n\n return [\n 'type' => substr($content['Key'], -1) === '/' ? 'dir' : 'file',\n 'path' => $content['Key'],\n 'timestamp' => Carbon::parse($content['LastModified']...
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
//Preloads preloads relations, don`t touch out
[ "func (s *DB) Preloads(out interface{}) *DB {\n\treturn s.NewScope(out).InstanceSet(\"gorm:only_preload\", 1).callCallbacks(s.parent.callbacks.queries).db\n}" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
// SliceShrinkerOne creates a slice shrinker from a shrinker for the elements of the slice. // The length of the slice will remains unchanged, instead each element is shrunk after the // other.
[ "func SliceShrinkerOne(elementShrinker gopter.Shrinker) gopter.Shrinker {\n\treturn func(v interface{}) gopter.Shrink {\n\t\trv := reflect.ValueOf(v)\n\t\tif rv.Kind() != reflect.Slice {\n\t\t\tpanic(fmt.Sprintf(\"%#v is not a slice\", v))\n\t\t}\n\n\t\tshrinks := make([]gopter.Shrink, 0, rv.Len())\n\t\tfor i := 0;...
[ "def register (g):\n \n assert isinstance(g, Generator)\n id = g.id()\n\n __generators [id] = g\n\n # A generator can produce several targets of the\n # same type. We want unique occurence of that generator\n # in .generators.$(t) in that case, otherwise, it will\n # be tried twice and we'll...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
// Reset resets the timestamp set by Record.
[ "func (tt *timeTracker) Reset(target *querypb.Target) {\n\ttt.mu.Lock()\n\tdefer tt.mu.Unlock()\n\tdelete(tt.timestamps, target)\n}" ]
[ "def openCurrentItem(self):\n \n logger.debug(\"openCurrentItem\")\n _currentItem, currentIndex = self.getCurrentItem()\n if not currentIndex.isValid():\n return\n\n # Expanding the node will call indirectly call RepoTreeModel.fetchMore which will call\n # BaseRt...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Loads the data from the disk into this object. <p> The constructor of the derived class must call this method. (If we do that in the base class, the derived class won't get a chance to set default values.)
[ "public synchronized void load() {\n XmlFile file = getConfigFile();\n if(!file.exists())\n return;\n\n try {\n file.unmarshal(this);\n } catch (IOException e) {\n LOGGER.log(Level.WARNING, \"Failed to load \"+file, e);\n }\n }" ]
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the comment about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code about Software development:" }
A set of monitored resources in the group. Generated from protobuf field <code>repeated .google.api.MonitoredResource members = 1;</code> @param \Google\Api\MonitoredResource[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
[ "public function setMembers($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Api\\MonitoredResource::class);\n $this->members = $arr;\n\n return $this;\n }" ]
[ "public function setAppProfiles($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Cloud\\Bigtable\\Admin\\V2\\AppProfile::class);\n $this->app_profiles = $arr;\n\n return $this;\n }" ]
codesearchnet
{ "query": "Represent the Github text about API documentation:", "pos": "Represent the Github code about API documentation:", "neg": "Represent the Github code about programming:" }
// Distribute provide a function that takes a React and other multiple Publishers and distribute the data from the first Publisher to others
[ "func Distribute(rs Publisher, ms ...Sender) Publisher {\n\treturn rs.React(func(r Publisher, err error, data interface{}) {\n\t\tfor _, mi := range ms {\n\t\t\tgo func(rec Sender) {\n\t\t\t\tif err != nil {\n\t\t\t\t\trec.SendError(err)\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t\trec.Send(data)\n\t\t\t}(mi)\n\t\t}\n\t},...
[ "function onChunk(count) {\n // If chunk read has no bytes than there is nothing left, so end a\n // collection.\n if (count === 0) return next(end)\n\n // Move a offset `position` with `count` towards the end unless\n // position was a `null` in which case we just keep it (`null` means\n ...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about File management:" }
// Redis SCARD command.
[ "func (c *syncClient) Scard(arg0 string) (result int64, err Error) {\n\targ0bytes := []byte(arg0)\n\n\tvar resp Response\n\tresp, err = c.conn.ServiceRequest(&SCARD, [][]byte{arg0bytes})\n\tif err == nil {\n\t\tresult = resp.GetNumberValue()\n\t}\n\treturn result, err\n\n}" ]
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Specifies the {@link NetworkPolicy} to use for this request. You may specify additional policy options using the varargs parameter.
[ "@NonNull\n public RequestCreator networkPolicy(@NonNull NetworkPolicy policy,\n @NonNull NetworkPolicy... additional) {\n data.networkPolicy(policy, additional);\n return this;\n }" ]
[ "func (c *NetworkGetCommand) Info() *cmd.Info {\n\targs := \"<binding-name> [--ingress-address] [--bind-address] [--egress-subnets]\"\n\tdoc := `\nnetwork-get returns the network config for a given binding name. By default\nit returns the list of interfaces and associated addresses in the space for\nthe binding, as...
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
// connect is called internally, lazily, the first time Consume is called. // TODO: need to make sure this is properly synchronised.
[ "func (c *Connection) connect() error {\n\tvar err error\n\tc.AMQPConn, err = amqp.Dial(c.URL)\n\tif err != nil {\n\t\treturn Error(err, \"Failed to connect to RabbitMQ\")\n\t}\n\tc.connected = true\n\treturn nil\n}" ]
[ "public FunctionHandle resolveFunction(Session session, QualifiedName name, List<TypeSignatureProvider> parameterTypes)\n {\n // TODO Actually use session\n // Session will be used to provide information about the order of function namespaces to through resolving the function.\n // This is l...
codesearchnet
{ "query": "Represent the Github description about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
Can be overridden in tests.
[ "public Module getPlumbingModules(final Config config)\n {\n return new Module() {\n @Override\n public void configure(final Binder binder) {\n binder.install(new ConfigModule(config));\n binder.install(getLifecycleModule());\n\n binder.in...
[ "def platform\n # If you are declaring a new platform, you will need to tell\n # Train a bit about it.\n # If you were defining a cloud API, you should say you are a member\n # of the cloud family.\n\n # This plugin makes up a new platform. Train (or rather InSpec) only\n # know how t...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
set attribute_maps to the neighbor.
[ "def set_neighbor_attribute_map(neigh_ip_address, at_maps,\n route_dist=None, route_family=VRF_RF_IPV4):\n \"\"\"\"\"\"\n core = CORE_MANAGER.get_core_service()\n peer = core.peer_manager.get_by_addr(neigh_ip_address)\n\n at_maps_key = const.ATTR_MAPS_LABEL_DEFAULT\n at_...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Returns the primary type value associated with the SqlType argument.
[ "public static int getTypeValForSqlType(SqlType sqlType) throws SQLException {\n\t\tint[] typeVals = typeToValMap.get(sqlType);\n\t\tif (typeVals == null) {\n\t\t\tthrow new SQLException(\"SqlType is unknown to type val mapping: \" + sqlType);\n\t\t}\n\t\tif (typeVals.length == 0) {\n\t\t\tthrow new SQLException(\"...
[ "NameAndType nameType(Symbol sym) {\n return new NameAndType(sym.name, sym.externalType(types), types);\n // the NameAndType is generated from a symbol reference, and the\n // adjustment of adding an additional this$n parameter needs to be made.\n }" ]
codesearchnet
{ "query": "Represent the Github description about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Create the minimal directory structure and prefs.dat for an Opera extension. @param wuid ID of extension as known in widgets.dat
[ "private void createOEXDirectory(String wuid) throws IOException {\n File oexDirectory = new File(directory, wuid);\n if (!oexDirectory.exists() && !oexDirectory.mkdirs()) {\n throw new WebDriverException(\"Unable to create directory path: \" + directory.getPath());\n }\n File prefsDatPath = new Fi...
[ "function(request, modules_root, options){\n var [path, analysis] = normalize_path(request, modules_root, options.relative_path_root);\n var cache_path = path; // define cachepath as path to file with content. For modules, defines path to package.json\n if(analysis.is_a_module) cache_path = \"m...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Checks to see if the chosen shortcut is already being used and if so shows a message warning the user
[ "private void checkDuplicate() {\n\t\tKeyboardShortcut ks = this.getDuplicate();\n\t\tif (ks != null) {\n\t\t\tthis.setFieldValue(FIELD_INFO, Constant.messages.getString(\"keyboard.dialog.warning.dup\", ks.getName()));\n\t\t} else {\n\t\t\tthis.setFieldValue(FIELD_INFO, \"\");\n\t\t}\n\t}" ]
[ "def _restore_clipboard_selection(self, backup: str):\n \"\"\"\"\"\"\n # Pasting takes some time, so wait a bit before restoring the content. Otherwise the restore is done before\n # the pasting happens, causing the backup to be pasted instead of the desired clipboard content.\n\n # Prog...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
// SetPlatformApplicationArn sets the PlatformApplicationArn field's value.
[ "func (s *SetPlatformApplicationAttributesInput) SetPlatformApplicationArn(v string) *SetPlatformApplicationAttributesInput {\n\ts.PlatformApplicationArn = &v\n\treturn s\n}" ]
[ "@NotNull\n @ApiModelProperty(required = true, value = \"Key-value pairs to add as custom property into alert. You can refer here for example values\")\n public Map<String, String> getDetails() {\n return details;\n }" ]
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
* @param {String} key @param {String} value @param {Boolean} [recursive=true] @return {*}
[ "function (key, value, recursive) {\n\n if (arguments.length < 3) {\n recursive = true;\n }\n\n var configuration,\n i, ret;\n\n for (i = 0; i < this.$configurations.length; i++) {\n configuration = ...
[ "function Message(instanceList, // @arg InstanceObject - address list. { id: instance, ... }\n methodName) { // @arg MethodNameString = \"inbox\" - instance[method]\n // @desc MessagePassing implementation.\n this._instanceList = instanceList;\n this._methodName ...
codesearchnet
{ "query": "Represent the summarization about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code:" }
// Create a new project.
[ "func (s *Server) Create(ctx context.Context, q *ProjectCreateRequest) (*v1alpha1.AppProject, error) {\n\tif err := s.enf.EnforceErr(ctx.Value(\"claims\"), rbacpolicy.ResourceProjects, rbacpolicy.ActionCreate, q.Project.Name); err != nil {\n\t\treturn nil, err\n\t}\n\tprojectutil.NormalizePolicies(q.Project)\n\terr...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Weights as described in the FS framework.
[ "def weights(self):\n \"\"\"\"\"\"\n m = self.kernel.feature_log_prob_[self._match_class_pos()]\n u = self.kernel.feature_log_prob_[self._nonmatch_class_pos()]\n\n return self._prob_inverse_transform(numpy.exp(m - u))" ]
[ "function writeTimeBound(type, prmname, boundType, outputType) {\n return utils.parts(type, {\n B : prmname,\n // TODO: is this correct?\n C : boundType+'_'+(type === 'QU' ? 'UBT' : 'LBT')+'(KAF)',\n E : '1MON'\n }, outputType);\n //A=HEXT2014 B=SR-CMN_SR-CMN C=STOR_UBT(KAF) E=1MON F=CAMANCHE R FLOOD...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Converts a message to/from dvorak. Syntax: {command} <--nick <nick>|msg>
[ "def cmd(send, msg, args):\n \n parser = arguments.ArgParser(args['config'])\n parser.add_argument('--nick', action=arguments.NickParser)\n parser.add_argument('msg', nargs='*')\n try:\n cmdargs = parser.parse_args(msg)\n except arguments.ArgumentException as e:\n send(str(e))\n ...
[ "def _init_prtfmt(self, key=\"fmta\"):\n \"\"\"\"\"\"\n prtfmt = self.gosubdag.prt_attr[key]\n return prtfmt.replace(\"{NS}\", \"{NS} {hdr1usr01:2} {num_usrgos:>4} uGOs\")" ]
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
// SetNextToken sets the NextToken field's value.
[ "func (s *DescribeDefaultParametersInput) SetNextToken(v string) *DescribeDefaultParametersInput {\n\ts.NextToken = &v\n\treturn s\n}" ]
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
// SetFetchRelatives sets the FetchRelatives optional argument. // Whether to fetch this nodes ancestors, siblings and children. // Defaults to true.
[ "func (a *GetPartialAXTreeArgs) SetFetchRelatives(fetchRelatives bool) *GetPartialAXTreeArgs {\n\ta.FetchRelatives = &fetchRelatives\n\treturn a\n}" ]
[ "function(){\n return {\n classes: [], \n colonSelectors: [],\n data: [],\n group: null,\n ids: [],\n meta: [],\n\n // fake selectors\n collection: null, // a collection to match against\n filter: null, // filter function\n\n ...
codesearchnet
{ "query": "Represent the Github sentence about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
Prepare a facet plot of frequencies stratified by variant type and status (TP, FP, FN). Makes a nice plot with the output from validate.freq_summary
[ "def facet_freq_plot(freq_csv, caller):\n \n out_file = \"%s.png\" % os.path.splitext(freq_csv)[0]\n plt.ioff()\n sns.set(style='dark')\n df = pd.read_csv(freq_csv)\n g = sns.FacetGrid(df, row=\"vtype\", col=\"valclass\", margin_titles=True,\n col_order=[\"TP\", \"FN\", \"FP\"...
[ "def prt_qualifiers(self, prt=sys.stdout):\n \"\"\"\"\"\"\n # 13 not colocalizes_with (TBD: CHK - Seen in gene2go, but not gafs)\n # 4 not contributes_to (TBD: CHK - Seen in gene2go, but not gafs)\n self._prt_qualifiers(self.associations, prt)" ]
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
// SetResourceId sets the ResourceId field's value.
[ "func (s *GetResourceInput) SetResourceId(v string) *GetResourceInput {\n\ts.ResourceId = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Delete a set of image regions. @param project_id The project id. @param region_ids Regions to delete. Limited to 64. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request.
[ "def delete_image_regions(project_id, region_ids, custom_headers:nil)\n response = delete_image_regions_async(project_id, region_ids, custom_headers:custom_headers).value!\n nil\n end" ]
[ "function(apiClient) {\n this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;\n\n\n this.setApiClient = function(apiClient) {\n this.apiClient = apiClient;\n };\n\n this.getApiClient = function() {\n return this.apiClient;\n };\n\n\n /**\n ...
codesearchnet
{ "query": "Represent the comment about Metadata management:", "pos": "Represent the code about Metadata management:", "neg": "Represent the code about Software development:" }
Create an instance of the daily file log driver. @param array $config @return \Psr\Log\LoggerInterface
[ "protected function createDailyDriver(array $config)\n {\n return new Monolog($this->parseChannel($config), [\n $this->prepareHandler(new RotatingFileHandler(\n $config['path'], $config['days'] ?? 7, $this->level($config),\n $config['bubble'] ?? true, $config['perm...
[ "protected function initDefaultInitialContext()\n {\n\n // initialize the configuration values for the initial context\n $description = new DescriptionNode(new NodeValue('The initial context configuration.'));\n $storage = new StorageNode('AppserverIo\\Storage\\StackableStorage');\n\n ...
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
// VerifyVersion returns ErrLowVersion if the metadata version is lower than the min version
[ "func VerifyVersion(s *data.SignedCommon, minVersion int) error {\n\tif s.Version < minVersion {\n\t\treturn ErrLowVersion{Actual: s.Version, Current: minVersion}\n\t}\n\treturn nil\n}" ]
[ "func getEnterpriseResourceIter(context structs.Context, _ *acl.ACL, namespace, prefix string, ws memdb.WatchSet, state *state.StateStore) (memdb.ResultIterator, error) {\n\t// If we have made it here then it is an error since we have exhausted all\n\t// open source contexts.\n\treturn nil, fmt.Errorf(\"context mus...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Transforms a request @param Request $requestIn The original request object @param Request $requestOut The request object to transform @return Request The transformed request
[ "public function transformRequest(Request $requestIn, Request $requestOut)\n {\n $requestOut = Request::create(\n $requestOut->getUri(),\n $requestOut->getMethod(),\n [],\n [],\n [],\n [],\n json_encode(\n $this->t...
[ "public function body($payload, $mimeType = null)\n {\n $this->mime($mimeType);\n $this->payload = $payload;\n // Iserntentially don't call _serializePayload yet. Wait until\n // we actually send off the request to convert payload to string.\n // At that time, the `serialized_...
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about Programming:" }
Removes all readings but the one that matches the token given. @param token Token to be matched @since 1.5
[ "public void leaveReading(AnalyzedToken token) {\n List<AnalyzedToken> l = new ArrayList<>();\n AnalyzedToken tmpTok = new AnalyzedToken(token.getToken(), token.getPOSTag(), token.getLemma());\n tmpTok.setWhitespaceBefore(isWhitespaceBefore);\n for (AnalyzedToken anTokReading : anTokReadings) {\n i...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Hides the menu. @public
[ "function () {\n if (this.element && this._container && this._outline) {\n var items = this.element.querySelectorAll('.u-menu-item');\n\n // Remove all transition delays; menu items fade out concurrently.\n for (var i = 0; i < items.length; i++) {\n items[i].st...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// SetStartSelectorType sets the StartSelectorType field's value.
[ "func (s *StartSelector) SetStartSelectorType(v string) *StartSelector {\n\ts.StartSelectorType = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Update the final dag status. @param failed true if any of the jobs has failed
[ "private void updateDagStatusInternal(final boolean failed) {\n if (this.status == Status.KILLING) {\n /*\n It's possible that some nodes have failed when the dag is killed.\n Since killing a dag signals an intent from an operator, it is more important to make\n the dag status reflect the res...
[ "def run_objective(objective, _name, raw_output, output_files, threads)\n # output is a, array: [raw_output, output_files].\n # output_files is a hash containing the absolute paths\n # to file(s) output by the target in the format expected by the\n # objective function(s), with keys as the keys ...
codesearchnet
{ "query": "Represent the Github text about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Indexes all datasets of the library. Args: tick_f (callable, optional): callable of one argument. Gets string with index state.
[ "def index_library_datasets(self, tick_f=None):\n \n\n dataset_n = 0\n partition_n = 0\n\n def tick(d, p):\n if tick_f:\n tick_f('datasets: {} partitions: {}'.format(d, p))\n\n for dataset in self.library.datasets:\n\n if self.backend.dataset_i...
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Return the full URL that should be redirected to including query parameters.
[ "private String getRedirectUrl(HttpServletRequest request, String newScheme) {\n String serverName = request.getServerName();\n String uri = request.getRequestURI();\n\n StringBuilder redirect = new StringBuilder(100);\n redirect.append(newScheme);\n redirect.append(\"://\");\n redirect.append(ser...
[ "def uri_from(url)\n # This will raise an InvalidURIError if the URL is very wrong. It will\n # still pass for strings like \"foo\", though.\n url = URI(url)\n\n # We need to check if the URL was either http://, https:// or ftp://,\n # because these are the only ones we can download from. o...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
fields is a sequence of (name, value) elements for regular form fields. files is a sequence of (name, filename, value) elements for data to be uploaded as files Return (content_type, body) ready for httplib.HTTP instance
[ "def encode_multipart_formdata(fields, files):\n \n BOUNDARY = '----------ThIs_Is_tHe_bouNdaRY_$'\n CRLF = '\\r\\n'\n L = []\n for (key, value) in fields:\n L.append('--' + BOUNDARY)\n L.append('Content-Disposition: form-data; name=\"%s\"' % key)\n L.append('')\n L.append(...
[ "def coerce_one(schema=str):\n \n def validate(val):\n \"\"\"Unpack a single item from the inputs sequence and run validation.\n\n NOTE(larsbutler): This code is highly opinionated for bottle, since\n bottle query params are wrapped in a list, even if there is just a\n single value...
codesearchnet
{ "query": "Represent the Github post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
find a component from the Ariane server cache depending on its id :param co_id: the component id to find :return: the component if found and None if not
[ "def find_component(co_id):\n \n LOGGER.debug(\"InjectorCachedComponentService.find_component\")\n ret = None\n if co_id is not None:\n args = {'properties': {'OPERATION': 'PULL_COMPONENT_FROM_CACHE',\n 'REMOTE_COMPONENT': str({'componentId': ...
[ "def reset ():\n \n global __prefixes_suffixes, __suffixes_to_types, __types, __rule_names_to_types, __target_suffixes_cache\n\n __register_features ()\n\n # Stores suffixes for generated targets.\n __prefixes_suffixes = [property.PropertyMap(), property.PropertyMap()]\n\n # Maps suffixes to types...
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Encodes the <i>modified UTF-8</i> bytes corresponding to string {@code s} into the byte array {@code dst}, starting at the given {@code offset}.
[ "public static void encode(byte[] dst, int offset, String s) {\n final int length = s.length();\n for (int i = 0; i < length; i++) {\n char ch = s.charAt(i);\n if (ch != 0 && ch <= 127) { // U+0000 uses two bytes.\n dst[offset++] = (byte) ch;\n } else if...
[ "public static int byteCount(Slice slice, int offset, int length, int codePointCount)\n {\n requireNonNull(slice, \"slice is null\");\n if (length < 0) {\n throw new IllegalArgumentException(\"length must be greater than or equal to zero\");\n }\n if (offset < 0 || offset +...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Sets the HTTP request method or {@code null} for none. @since 1.12
[ "public HttpRequest setRequestMethod(String requestMethod) {\n Preconditions.checkArgument(requestMethod == null || HttpMediaType.matchesToken(requestMethod));\n this.requestMethod = requestMethod;\n return this;\n }" ]
[ "private boolean isCloudantAuthError(Response response) {\n String server = response.header(\"Server\");\n // Cloudant could send `CouchDB/ad97a06 (Erlang OTP/17)` as Server header value\n // Another cloudant server value example: `CouchDB/1.0.2`\n if (server == null || server.indexOf(\"...
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Output message to terminal.
[ "def output_message(text, file=sys.stderr):\n \"\"\"\"\"\"\n if file.encoding is None:\n # If the output file does not support Unicode, encode it to a byte\n # string. On some machines, this occurs when Python is redirecting to\n # file (or piping to something like Vim).\n text = t...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github comment about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code:" }
dump as a comma separated value file
[ "def DumpAsCSV (self, separator=\",\", file=sys.stdout):\r\n \"\"\"\"\"\"\r\n for row in range(1, self.maxRow + 1):\r\n sep = \"\"\r\n for column in range(1, self.maxColumn + 1):\r\n file.write(\"%s\\\"%s\\\"\...
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
// NewService returns the GRPC events server
[ "func NewService(events *exchange.Exchange) api.EventsServer {\n\treturn &service{\n\t\tttService: &ttrpcService{\n\t\t\tevents: events,\n\t\t},\n\t\tevents: events,\n\t}\n}" ]
[ "public H2StreamProcessor startNewInboundSession(Integer streamID) {\n H2StreamProcessor h2s = null;\n h2s = muxLink.createNewInboundLink(streamID);\n return h2s;\n // call the stream processor with the data it needs to then call \"ready\" are the underlying HttpInboundLink\n // (...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
%prog rebuild blocksfile blastfile Rebuild anchors file from pre-built blocks file.
[ "def rebuild(args):\n \n p = OptionParser(rebuild.__doc__)\n p.add_option(\"--header\", default=False, action=\"store_true\",\n help=\"First line is header [default: %default]\")\n p.add_option(\"--write_blast\", default=False, action=\"store_true\",\n help=\"Get blast re...
[ "def index_bowtie(self):\n \"\"\"\"\"\"\n # It returns exit code 1 if the fasta is empty #\n assert self\n # Call the bowtie executable #\n sh.bowtie2_build(self.path, self.path)\n return FilePath(self.path + '.1.bt2')" ]
codesearchnet
{ "query": "Represent the Github text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Brand new logins each day, and total of users each day. :return: data, total 2 lists of dictionaries of the following format [{'x':epoch, 'y': value},]
[ "def newlogins(sessions):\n \n if not sessions:\n return [], []\n users = {}\n dates = {}\n\n for session in sessions:\n user = session.user\n # time value is discarded to aggregate on days only\n date = session.started_at.strftime(\"%Y/%m/%d\")\n # keep the info on...
[ "def QA_fetch_index_list_adv(collections=DATABASE.index_list):\n '''\n \n '''\n index_list_items = QA_fetch_index_list(collections)\n if len(index_list_items) == 0:\n print(\"QA Error QA_fetch_index_list_adv call item for item in collections.find() return 0 item, maybe the DATABASE.index_list ...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Read MSODRAWING record
[ "private function _readMsoDrawing()\r\n\t{\r\n\t\t$length = self::_GetInt2d($this->_data, $this->_pos + 2);\r\n\r\n\t\t// get spliced record data\r\n\t\t$splicedRecordData = $this->_getSplicedRecordData();\r\n\t\t$recordData = $splicedRecordData['recordData'];\r\n\r\n\t\t$this->_drawingData .= $recordData;\r\n\t}" ...
[ "function writeTimeBound(type, prmname, boundType, outputType) {\n return utils.parts(type, {\n B : prmname,\n // TODO: is this correct?\n C : boundType+'_'+(type === 'QU' ? 'UBT' : 'LBT')+'(KAF)',\n E : '1MON'\n }, outputType);\n //A=HEXT2014 B=SR-CMN_SR-CMN C=STOR_UBT(KAF) E=1MON F=CAMANCHE R FLOOD...
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
Returns a new :class:`~pyinter.Interval` representing the intersection of this :class:`~pyinter.Interval` with the other :class:`~pyinter.Interval`
[ "def intersect(self, other):\n \"\"\"\"\"\"\n if self.overlaps(other):\n newlower_value = max(self.lower_value, other.lower_value)\n new_upper_value = min(self._upper_value, other._upper_value)\n new_lower, new_upper = self._get_new_lower_upper(other, self.intersect)\n...
[ "def numericshape(self):\n \"\"\"\"\"\"\n try:\n numericshape = [self.subseqs.seqs.model.numconsts.nmb_stages]\n except AttributeError:\n objecttools.augment_excmessage(\n 'The `numericshape` of a sequence like `%s` depends on the '\n 'configu...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Public method for listing message flags @param string $folder Folder name @param array $uids Message UIDs @param int $mod_seq Optional MODSEQ value (of last flag update) @return array Indexed array with message flags
[ "public function list_flags($folder, $uids, $mod_seq = null)\n {\n if (!strlen($folder)) {\n $folder = $this->folder;\n }\n\n if (!$this->check_connection()) {\n return array();\n }\n\n // @TODO: when cache was synchronized in this request\n // we m...
[ "def initialize(self, id=None, text=None):\n self.id = none_or(id, int)\n \n\n self.text = none_or(text, str)\n \"\"\"\n Username or IP address of the user at the time of the edit : str | None\n \"\"\"" ]
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
Gets the cached query object. The key used for lookup is an object pair containing the query string and a discriminator value which is usually the Class of the cached query object and an optional {@link List} of {@link FieldAccumulator}s.
[ "public <T> T get(String queryString, List<FieldAccumulator> accumulators, Object queryTypeDiscriminator, QueryCreator<T> queryCreator) {\n QueryCacheKey key = new QueryCacheKey(queryString, accumulators, queryTypeDiscriminator);\n return (T) getCache().computeIfAbsent(key, (k) -> queryCreator.create(k.qu...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Get the URI associated with ncname @param ncname:
[ "def get_uri(self, ncname: str) -> Optional[str]:\n \n uri = cu.expand_uri(ncname + ':', self.curi_maps)\n return uri if uri and uri.startswith('http') else None" ]
[ "def getDeviceRole(self):\n \"\"\"\"\"\"\n print '%s call getDeviceRole' % self.port\n return self.__stripValue(self.__sendCommand(WPANCTL_CMD + 'getprop -v Network:NodeType')[0])" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
Manages line reset in the console
[ "def reset_line(text = \"\")\n # Initialise ANSI escape string\n escape = \"\"\n\n # Get terminal window width\n cols = console_columns\n\n # The number of lines the previous message spanned\n lines = @@prev / cols\n\n # If cols == 80 and @@prev == 80, @@prev / cols == 1 but we do...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// serializeUtxoEntry returns the entry serialized to a format that is suitable // for long-term storage. The format is described in detail above.
[ "func serializeUtxoEntry(entry *UtxoEntry) ([]byte, error) {\n\t// Spent outputs have no serialization.\n\tif entry.IsSpent() {\n\t\treturn nil, nil\n\t}\n\n\t// Encode the header code.\n\theaderCode, err := utxoEntryHeaderCode(entry)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\t// Calculate the size needed to...
[ "@Override\n public Message deserialize(ByteBuffer in) throws ProtocolException, IOException {\n // A Bitcoin protocol message has the following format.\n //\n // - 4 byte magic number: 0xfabfb5da for the testnet or\n // 0xf9beb4d9 for production\n //...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Programming:" }
Adds the provided domino to the right end of the board. :param Domino d: domino to add :return: None :raises EndsMismatchException: if the values do not match
[ "def _add_right(self, d):\n '''\n \n '''\n if not self:\n self._left = d.first\n self._right = d.second\n elif d.first == self.right_end():\n self._right = d.second\n elif d.second == self.right_end():\n self._right = d.first\n ...
[ "def solve(self):\n \n # Create a new, empty board.\n board = Board(self.length, self.height)\n\n # Iterate through all combinations of positions.\n permutations = Permutations(self.pieces, self.vector_size)\n for positions in permutations:\n\n # Reuse board but ...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Generate an error of the specified type.
[ "def make_err(self, errtype, message, original, loc, ln=None, reformat=True, *args, **kwargs):\n \"\"\"\"\"\"\n if ln is None:\n ln = self.adjust(lineno(loc, original))\n errstr, index = getline(loc, original), col(loc, original) - 1\n if reformat:\n errstr, index =...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github summarization about Natural Language Processing:", "pos": "Represent the Github code about Natural Language Processing:", "neg": "Represent the Github code:" }
<p>start.</p> @throws java.lang.Exception if any.
[ "public void start() throws Exception {\n logger.trace(Messages.get(\"info.container.starting\"));\n SystemEventBus.publish(new StartEvent(this, application));\n doStart();\n }" ]
[ "public AttributeConfig[] get_attribute_config(TacoTangoDevice tacoDevice, String[] attrnames) throws DevFailed {\n Except.throw_exception(\"Api_TacoFailed\",\n \"Taco protocol not supported\",\n \"TacoTangoDeviceDAODefaultImpl.command_inout()\");\n return null;\n }" ]
codesearchnet
{ "query": "Represent the Github text about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about N/A:" }
Show front page. Retrieve the content of the front page
[ "def show_front_page_groups(self, group_id):\r\n \r\n path = {}\r\n data = {}\r\n params = {}\r\n\r\n # REQUIRED - PATH - group_id\r\n \"\"\"ID\"\"\"\r\n path[\"group_id\"] = group_id\r\n\r\n self.logger.debug(\"GET /api/v1/groups/{group_id}/front_page with qu...
[ "def note(id, type, options = {})\n # Welguisz: No idea why this is here, but keeping it here because it follows other blocks\n _notes\n # Create a new note and place it in the notes 2-D Hash\n @_notes[id][type] = Note.new(id, type, options)\n end" ]
codesearchnet
{ "query": "Represent the comment about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Build values list @return array
[ "public function values()\n {\n $name = $this->config('field');\n $paramName = $this->config('name');\n $param = $this->_dependentParameters[$paramName];\n\n return [\n $name => $this->value(),\n $paramName => $param->value()\n ];\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the sentence about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Inserts the given string at the given position @param int $position @param string $string @return $this @throws \InvalidArgumentException
[ "public function insert($position, $string)\n\t{\n\t\tArgumentValidator::validateUnsignedInteger($position);\n\t\tArgumentValidator::validateScalar($string);\n\t\tif ($position >= $this->length()) {\n\t\t\tthrow new \\InvalidArgumentException('Position invalid');\n\t\t}\n\t\t$this->string = mb_substr($this->string,...
[ "private static function emptyAttributeParameter(Input $definition, string $parameter): self\n {\n $pointer = self::createPointerString($definition->getInput(), $definition->getIndex());\n\n return new self(\"The attribute $parameter is missing:\\n$pointer\");\n }" ]
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Programming:" }
Last chance to handle an unhandled action URI. @return <code>true</code> if this method handled it (by forwarding somewhere or writing to the response).
[ "protected boolean processUnhandledAction( HttpServletRequest request, HttpServletResponse response, String uri )\n throws IOException, ServletException\n {\n //\n // First check to see if we're already in a forwarded fallback request. If so, just bail.\n //\n PageFlowRequestW...
[ "def process_request_thread(self, request, client_address):\n \"\"\"\"\"\"\n # Instantiate the request handler.\n handler = self.RequestHandlerClass(request, client_address, self)\n try:\n # Attempt to handle a request with the handler.\n handler.handle_request()\n self.request_complete_c...
codesearchnet
{ "query": "Represent the Github summarization about NLP:", "pos": "Represent the Github code about NLP:", "neg": "Represent the Github code:" }
Marks a hydration as stopped. Number of hydrated entities and alias map is passed to method. @param int $resultNum @param array $aliasMap
[ "public function stop($resultNum, $aliasMap)\n {\n if ($this->enabled) {\n $this->hydrations[$this->currentHydration]['executionMS'] = microtime(true) - $this->start;\n $this->hydrations[$this->currentHydration]['resultNum'] = $resultNum;\n $this->hydrations[$this->current...
[ "def setTargets(self, targets):\n \n if not self.verifyArguments(targets) and not self.patterned:\n raise NetworkError('setTargets() requires [[...],[...],...] or [{\"layerName\": [...]}, ...].', targets)\n self.targets = targets" ]
codesearchnet
{ "query": "Represent the text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Creates the descriptor if provided property has annotation @column @param $property @return self|$this|EntityDescriptor
[ "private function addDescriptor($property)\n {\n $annotations = $this->inspector\n ->getPropertyAnnotations($property);\n if ($annotations->hasAnnotation('column')) {\n /** @var Column $annotation */\n $annotation = $annotations->getAnnotation('column');\n ...
[ "public @CheckForNull PropertyType getPropertyType(@Nonnull Object instance, @Nonnull String field) {\n // in global.jelly, instance==descriptor\n return instance==this ? getGlobalPropertyType(field) : getPropertyType(field);\n }" ]
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Add a name or namespace preorder record, if it doesn't exist already. DO NOT CALL THIS DIRECTLY.
[ "def namedb_preorder_insert( cur, preorder_rec ):\n \n\n preorder_row = copy.deepcopy( preorder_rec )\n \n assert 'preorder_hash' in preorder_row, \"BUG: missing preorder_hash\"\n\n try:\n preorder_query, preorder_values = namedb_insert_prepare( cur, preorder_row, \"preorders\" )\n except E...
[ "public static MethodInterface[] getAllValues()\n {\n // This list must be created every time, to insure the caller does\n // not modify an internal list. Declaring a static final list does\n // not work, since it only protects the reference to the list, and\n // not the list entries....
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// `Close` syncs the file to disk and then closes the file.
[ "func (a syncOnWrite) Close() error {\n err := a.file.Sync()\n if err != nil {\n return err\n }\n return a.file.Close()\n}" ]
[ "function onChunk(count) {\n // If chunk read has no bytes than there is nothing left, so end a\n // collection.\n if (count === 0) return next(end)\n\n // Move a offset `position` with `count` towards the end unless\n // position was a `null` in which case we just keep it (`null` means\n ...
codesearchnet
{ "query": "Represent the Github text about File management:", "pos": "Represent the Github code about File management:", "neg": "Represent the Github code about File management:" }
Get the factor graph being constructed with this builder. @return
[ "public ParametricFactorGraph build() {\n return new ParametricFactorGraph(new DynamicFactorGraph(variables, constantFactors, constantFactorNames),\n parametricFactors, factorPatterns, parametricFactorNames); \n }" ]
[ "def build(self):\n \"\"\"\"\"\"\n from ambry.orm.config import BuildConfigGroupAccessor\n\n # It is a lightweight object, so no need to cache\n return BuildConfigGroupAccessor(self.dataset, 'buildstate', self._session)" ]
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Register the command. @param string $command @return void
[ "protected function registerMakeProviderCommand($command)\n {\n $this->app->singleton($command, function ($app) {\n return new Generators\\Commands\\ProviderMakeCommand($app);\n });\n }" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github summarization about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Retrieves the highest page of the groups. @return int
[ "public function getHighestGroupPage()\n {\n $max = 1;\n $path = $this->prefixWithNamespace('groupPage');\n $groupPages = $this->argumentsAccessor->get($path, []);\n foreach ($groupPages as $groups) {\n if (!is_array($groups)) continue;\n foreach ($groups as $gro...
[ "public File getExistingFile(final String param) {\n return get(param, getFileConverter(),\n new And<>(new FileExists(), new IsFile()),\n \"existing file\");\n }" ]
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about File management:" }
/* Reads a config file into a specific type. Must match the structure of the type passed in in order to succeed. */
[ "func ReadSpecific(filename string, configObject interface{}) error {\n\tfileContents, err := ioutil.ReadFile(filename)\n\n\tif err == nil {\n\t\tjson.Unmarshal(fileContents, &configObject)\n\t}\n\n\treturn err\n}" ]
[ "@SuppressWarnings(\"unchecked\")\n public <T> Param<T> get(int index) {\n // TODO: Provide a more type safe API. E.g. make index a pojo typed on T which is aligned with the Param<T>\n return (Param<T>) params[index];\n }" ]
codesearchnet
{ "query": "Represent the summarization about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about Software development:" }
Gets all the Image Lists. @param custom_headers [Hash{String => String}] A hash of custom headers that will be added to the HTTP request. @return [Array] operation results.
[ "def get_all_image_lists(custom_headers:nil)\n response = get_all_image_lists_async(custom_headers:custom_headers).value!\n response.body unless response.nil?\n end" ]
[ "function(apiClient) {\n this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;\n\n\n this.setApiClient = function(apiClient) {\n this.apiClient = apiClient;\n };\n\n this.getApiClient = function() {\n return this.apiClient;\n };\n\n\n /**\n ...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Add Carbon copies Works like the 'to' function. @param string $email @param string $name @return self
[ "public function cc( $email, $name = null ) \n\t{\t\n\t\tif ( !is_array( $email ) ) \n\t\t{\n\t\t\t$email = array( $email => $name );\n\t\t}\n\t\t\n\t\tforeach( $email as $address => $name )\n\t\t{\n\t\t\tif ( is_numeric( $address ) && is_string( $name ) )\n\t\t\t{\n\t\t\t\t$this->cc[$name] = null;\n\t\t\t}\n\t\t\t...
[ "protected function processDetails(Buffer &$buffer, Result &$result)\n {\n parent::processDetails($buffer, $result);\n\n // Add in map\n $result->add('mapname', 'Panau');\n $result->add('dedicated', 'true');\n }" ]
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Both the true Python backend and the Python PEP 484 Type Stub backend have to perform the same imports. :param insert_type_ignore: add a MyPy type-ignore comment to the imports in the except: clause.
[ "def generate_imports_for_referenced_namespaces(\n backend, namespace, insert_type_ignore=False):\n # type: (Backend, ApiNamespace, bool) -> None\n \n\n imported_namespaces = namespace.get_imported_namespaces(consider_annotation_types=True)\n if not imported_namespaces:\n return\n\n typ...
[ "def getFilenameSet(self):\n \n result = set(self._mergeFileTiming())\n # Ignore profiling code. __file__ does not always provide consistent\n # results with f_code.co_filename (ex: easy_install with zipped egg),\n # so inspect current frame instead.\n # Get current file fr...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Returns (args, kwargs) to be used when deserializing this parameter.
[ "def serialize_args(self):\n \"\"\"\"\"\"\n\n args, kwargs = super(ListParameter, self).serialize_args()\n args.insert(0, [self.param_type.id, self.param_type.serialize_args()])" ]
[ "def values(*rels):\n '''\n \n '''\n #Action function generator to multiplex a relationship at processing time\n def _values(ctx):\n '''\n Versa action function Utility to specify a list of relationships\n\n :param ctx: Versa context used in processing (e.g. includes the prototyp...
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// SetDistributionId sets the DistributionId field's value.
[ "func (s *ListInvalidationsInput) SetDistributionId(v string) *ListInvalidationsInput {\n\ts.DistributionId = &v\n\treturn s\n}" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Calls webpack middleware in express manner. @param {String} url @returns {Promise}
[ "function (url) {\n return new Promise(function (resolve, reject) {\n middleware(new MockReq(url), new MockRes(url, resolve), reject);\n });\n }" ]
[ "function (err, node, next) {\n var func = node.action + 'Action';\n var obj = eval(func + '(node.params)');\n logger.log('debug', 'M|actionQueue::execute|obj=%j', +obj, meta);\n return null;\n }" ]
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Binds a native event to a callback on the speified target.
[ "function addEvent(target, name, callback, capture) {\n if (target.addEventListener) {\n target.addEventListener(name, callback, capture || false);\n } else if (target.attachEvent) {\n target.attachEvent('on' + name, callback);\n }\n }" ]
[ "function _doLaunchAfterServerReady(initialDoc) {\n // update status\n _setStatus(STATUS_CONNECTING);\n _createLiveDocumentForFrame(initialDoc);\n\n // start listening for requests\n _server.start();\n\n // Install a one-time event handler when connected to the launcher pag...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Write binary file data @param filePath the file path to write @param data the write @throws IOException when IO error occurs
[ "public void writeFile(String filePath, byte[] data) throws IOException\r\n {\r\n Object lock = retrieveLock(filePath); \r\n synchronized (lock) \r\n {\r\n IO.writeFile(filePath, data);\r\n }\r\n }" ]
[ "def set_stream(source, options)\n # Are we going to read from a file, or read from a binary string?\n if options[:bin]\n # Read from the provided binary string:\n @str = source\n else\n # Read from file:\n open_file(source)\n # Read the initial header of the file:\...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Creates an executor that runs the plan locally in a multi-threaded environment. @return A local executor.
[ "public static PlanExecutor createLocalExecutor(Configuration configuration) {\n\t\tClass<? extends PlanExecutor> leClass = loadExecutorClass(LOCAL_EXECUTOR_CLASS);\n\t\t\n\t\ttry {\n\t\t\treturn leClass.getConstructor(Configuration.class).newInstance(configuration);\n\t\t}\n\t\tcatch (Throwable t) {\n\t\t\tthrow n...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the post about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about programming:" }
Provides a function that returns the key of the entry when invoked. @param <K> key type of the entry @param <V> value type of the entry @return a function that when applied to a given entry will return the key
[ "public static <K, V> Function<Map.Entry<K, V>, K> entryToKeyFunction() {\n return EntryToKeyFunction.getInstance();\n }" ]
[ "function Rule(rules) {\n this.rules = rules;\n // Identifies individual rule\n this.name = \"\";\n // Identifies the grammar that this rule belongs to \n this.grammarName = \"\";\n // Identifies types of rules. Rules can have \"types\" that are diff...
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Return output files for the variant calling pipeline.
[ "def _get_files_variantcall(sample):\n \n out = []\n algorithm = sample[\"config\"][\"algorithm\"]\n out = _maybe_add_summary(algorithm, sample, out)\n out = _maybe_add_alignment(algorithm, sample, out)\n out = _maybe_add_callable(sample, out)\n out = _maybe_add_disambiguate(algorithm, sample, ...
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Tries to detect format of $str (json or ser). @param string $str - JSON encoded or PHP serialized data. @return string 'json' | 'ser', or FALSE on failure to detect format.
[ "protected static function serjstype($str)\n {\n $c = substr($str, 0, 1);\n if ('N;' === $str || strpos('sibadO', $c) !== false && substr($str, 1, 1) === ':') {\n $type = 'ser';\n } else {\n $l = substr($str, -1);\n if ('{' == $c && '}' == $l || '[' == $c && ...
[ "private function writeToOutputNow($output)\n {\n if ($this->sendHttpCode() && \\Whoops\\Util\\Misc::canSendHeaders()) {\n $httpCode = $this->sendHttpCode();\n\n if (function_exists('http_response_code')) {\n http_response_code($httpCode);\n } else {\n ...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
// Return index with respect to precision "p".
[ "func (h *HLLPP) getIndex(k uint32, p uint8) uint32 {\n\tif k&1 > 0 {\n\t\treturn sliceBits32(k, 6+h.pp, 1+6+h.pp-p)\n\t} else {\n\t\treturn sliceBits32(k, h.pp, 1+h.pp-p)\n\t}\n}" ]
[ "def transform_cb(self, setting, value):\n \"\"\"\"\"\"\n self.make_callback('transform')\n\n # whence=0 because need to calculate new extents for proper\n # cutout for rotation (TODO: always make extents consider\n # room for rotation)\n whence = 0\n self.redraw(wh...
codesearchnet
{ "query": "Represent the Github description about text processing:", "pos": "Represent the Github code about text processing:", "neg": "Represent the Github code:" }
add item to the end of the item list
[ "def append(self, item):\n \n if not self.items: # was list empty ?\n self.items = item # then this is the new head\n item.insert(self.items)" ]
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the comment:", "pos": "Represent the code:", "neg": "Represent the code:" }
Create an ami from a snapshot CLI Example: .. code-block:: bash salt-cloud -f register_image my-ec2-config ami_name=my_ami description="my description" root_device_name=/dev/xvda snapshot_id=snap-xxxxxxxx
[ "def register_image(kwargs=None, call=None):\n '''\n \n '''\n\n if call != 'function':\n log.error(\n 'The create_volume function must be called with -f or --function.'\n )\n return False\n\n if 'ami_name' not in kwargs:\n log.error('ami_name must be specified t...
[ "def create_flavor(self, name):\n \n self.add_environment_file(user='stack', filename='stackrc')\n self.run('openstack flavor create --id auto --ram 4096 --disk 40 --vcpus 1 baremetal', user='stack', success_status=(0, 1))\n self.run('openstack flavor set --property \"cpu_arch\"=\"x86_64...
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Performs a dynamic query on the database and returns the matching rows. @param dynamicQuery the dynamic query @return the matching rows
[ "@Override\n\tpublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery) {\n\t\treturn cpDisplayLayoutPersistence.findWithDynamicQuery(dynamicQuery);\n\t}" ]
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Compute (alt, az, distance) relative to the observer's horizon.
[ "def _to_altaz(position_au, observer_data, temperature_C, pressure_mbar):\n \n elevation_m = observer_data.elevation_m\n R = observer_data.altaz_rotation\n\n if (elevation_m is None) or (R is None):\n raise ValueError('to compute an altazimuth position, you must'\n ' obser...
[ "def gaussian_window(t, params):\n \n window = suspect.basis.gaussian(t, 0, 0, params[\"line_broadening\"])\n\n # the above gaussian function returns an area 1 fid, for a windowing\n # function we need to be area preserving (first point must be 1)\n return window / window[0]" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
// SetDetectorId sets the DetectorId field's value.
[ "func (s *GetFilterInput) SetDetectorId(v string) *GetFilterInput {\n\ts.DetectorId = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Transforms the default icons used by the Maven Site to Font Awesome icons. @param root root element with the page
[ "public final void transformIcons(final Element root) {\n final Map<String, String> replacements; // Texts to replace and\n // replacements\n\n checkNotNull(root, \"Received a null pointer as root element\");\n\n replacements = new HashMap<>();\n ...
[ "@Override\n public void generatePluginConfig(String serverName, File writeDirectory) {\n // Pass true to utilityRequest since this method will be called from the pluginUtility\n // or by the GeneratePluginConfigListener not by a call to the mbean.\n generatePluginConfig(null,serverName,true...
codesearchnet
{ "query": "Represent the Github description about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise
[ "public boolean isSet(_Fields field) {\n if (field == null) {\n throw new IllegalArgumentException();\n }\n\n switch (field) {\n case TIMESTAMP:\n return isSetTimestamp();\n case SUPER_COLUMN:\n return isSetSuper_column();\n case PREDICATE:\n return isSetPredicate();\n }\n ...
[ "function inflate(object) {\n // check if the object is an object and isn't empty\n if (is(object) && !empty(object)) {\n // create a new object for the result\n let result = {};\n\n // for each key in the object\n Object.keys(object).forEach((path) => {\n // get value from the object\n cons...
codesearchnet
{ "query": "Represent the post about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
// SetChangeToken sets the ChangeToken field's value.
[ "func (s *UpdateRegexMatchSetInput) SetChangeToken(v string) *UpdateRegexMatchSetInput {\n\ts.ChangeToken = &v\n\treturn s\n}" ]
[ "private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {\n GetField fields = in.readFields();\n beginDefaultContext = fields.get(BEGIN_DEFAULT, true);\n\n // Note that further processing is required in JEEMetadataContextProviderImpl.deserializeThreadCo...
codesearchnet
{ "query": "Represent the Github text about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
// TimeoutInMillis sets the timeout in milliseconds.
[ "func (s *DeleteByQueryService) TimeoutInMillis(timeoutInMillis int) *DeleteByQueryService {\n\ts.timeout = fmt.Sprintf(\"%dms\", timeoutInMillis)\n\treturn s\n}" ]
[ "int getMemcachedExpirationTime() {\n if ( !_sticky ) {\n throw new IllegalStateException( \"The memcached expiration time cannot be determined in non-sticky mode.\" );\n }\n if ( _lastMemcachedExpirationTime == 0 ) {\n return 0;\n }\n\n final long timeIdleIn...
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Extracts a section of a string and returns a new string.
[ "function slice(str, beginSlice, endSlice) {\n return GraphemeBreaker.break(str)\n .slice(beginSlice, endSlice)\n .join('');\n}" ]
[ "def _get_generic_schema(self):\n \n schema = Schema(\n vid=ID(stored=True, unique=True), # Object id\n title=NGRAMWORDS(),\n keywords=KEYWORD, # Lists of coverage identifiers, ISO time values and GVIDs, source names, source abbrev\n doc=TEXT) # Generated...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Returns header from given request @param request to search for header @param header name @return header value or null if not found
[ "public static String getHeader(HttpServletRequest request, String header) {\n\n\t\t// noting to search in or nothing to be found\n\t\tif (request == null || StringUtils.isNullOrEmptyTrimmed(header)) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn request.getHeader(header);\n\t}" ]
[ "def _wrap_field(field):\n \"\"\"\"\"\"\n class WrappedField(field):\n def output(self, key, obj):\n value = _fields.get_value(key if self.attribute is None else self.attribute, obj)\n\n # For all fields, when its value was null (None), return null directly,\n # instea...
codesearchnet
{ "query": "Represent the Github comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Packs and base64 encodes this :class:`Transaction` as an XDR string.
[ "def xdr(self):\n \n tx = Xdr.StellarXDRPacker()\n tx.pack_Transaction(self.to_xdr_object())\n return base64.b64encode(tx.get_buffer())" ]
[ "def post_build(self, p, pay):\n \n p += pay\n if self.auxdlen != 0:\n print(\"NOTICE: A properly formatted and complaint V3 Group Record should have an Auxiliary Data length of zero (0).\")\n print(\" Subsequent Group Records are lost!\")\n return p" ]
codesearchnet
{ "query": "Represent the Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "@Override\n\tpublic boolean eIsSet(int featureID)\n\t{\n\t\tswitch (featureID)\n\t\t{\n\t\t\tcase SarlPackage.SARL_SKILL__EXTENDS:\n\t\t\t\treturn extends_ != null;\n\t\t\tcase SarlPackage.SARL_SKILL__IMPLEMENTS:\n\t\t\t\treturn implements_ != null && !implements_.isEmpty();\n\t\t}\n\t\treturn super.eIsSet(feature...
[ "protected function _init($definition=null)\n {\n\n if (!is_null($definition)) {\n $this->_packageXml = simplexml_load_string($definition);\n } else {\n $packageXmlStub = <<<END\n<?xml version=\"1.0\"?>\n<package>\n <name />\n <version />\n <stability />\n <license...
codesearchnet
{ "query": "Represent the post about Text generation:", "pos": "Represent the code about Text generation:", "neg": "Represent the code:" }
@param array $options @return string
[ "public function control(array $options = []) {\n\t\t$options += [\n\t\t\t'label' => ['escape' => false, 'text' => $this->image()],\n\t\t\t'escapeLabel' => false,\n\t\t\t'autocomplete' => 'off',\n\t\t];\n\n\t\treturn $this->Form->control('captcha_result', $options);\n\t}" ]
[ "final protected function c() {return dfc($this, function() {/** @var int|null $id $id */return\n\t\t!($id = $this->o()->getCustomerId()) ? null : df_customer($id)\n\t;});}" ]
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Cleans up job state if the last run is stuck.
[ "def TerminateStuckRunIfNeeded(self, job):\n \"\"\"\"\"\"\n if job.current_run_id and job.last_run_time and job.lifetime:\n now = rdfvalue.RDFDatetime.Now()\n # We add additional 10 minutes to give the job run a chance to kill itself\n # during one of the HeartBeat calls (HeartBeat checks if a ...
[ "def start(self, timeout=None):\n \n\n started = super(Node, self).start(timeout=timeout)\n if started:\n # TODO : return something produced in the context manager passed\n return self._svc_address # returning the zmp url as a way to connect to the node\n # CAR...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
// CurrentLineBeforeCursor returns the text from the start of the line until the cursor.
[ "func (d *Document) CurrentLineBeforeCursor() string {\n\ts := strings.Split(d.TextBeforeCursor(), \"\\n\")\n\treturn s[len(s)-1]\n}" ]
[ "@Nonnull\n public String getLine() {\n if (preLoaded) {\n if (bufferOffset >= 0) {\n int lineStart = bufferOffset;\n if (linePos > 0) {\n lineStart -= linePos - 1;\n }\n int lineEnd = bufferOffset;\n ...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
// TakeUntil takes a function and returns a list of items that // match the checker until the checker returns false. This does not // wait if there are no items in the queue.
[ "func (q *Queue) TakeUntil(checker func(item interface{}) bool) ([]interface{}, error) {\n\tif checker == nil {\n\t\treturn nil, nil\n\t}\n\n\tq.lock.Lock()\n\n\tif q.disposed {\n\t\tq.lock.Unlock()\n\t\treturn nil, ErrDisposed\n\t}\n\n\tresult := q.items.getUntil(checker)\n\tq.lock.Unlock()\n\treturn result, nil\n...
[ "function onChunk(count) {\n // If chunk read has no bytes than there is nothing left, so end a\n // collection.\n if (count === 0) return next(end)\n\n // Move a offset `position` with `count` towards the end unless\n // position was a `null` in which case we just keep it (`null` means\n ...
codesearchnet
{ "query": "Represent the text about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about File management:" }
// PreparedQueryList returns all the prepared queries.
[ "func (s *Store) PreparedQueryList(ws memdb.WatchSet) (uint64, structs.PreparedQueries, error) {\n\ttx := s.db.Txn(false)\n\tdefer tx.Abort()\n\n\t// Get the table index.\n\tidx := maxIndexTxn(tx, \"prepared-queries\")\n\n\t// Query all of the prepared queries in the state store.\n\tqueries, err := tx.Get(\"prepare...
[ "@Override\n public void addElement(Map<String, Object> e, Map<String, AggregatorFactory> a)\n {\n // since we return a constant, no need to read from the event\n }" ]
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
<p> Provides the list of option group memberships for this DB instance. </p> @param optionGroupMemberships Provides the list of option group memberships for this DB instance.
[ "public void setOptionGroupMemberships(java.util.Collection<OptionGroupMembership> optionGroupMemberships) {\n if (optionGroupMemberships == null) {\n this.optionGroupMemberships = null;\n return;\n }\n\n this.optionGroupMemberships = new java.util.ArrayList<OptionGroupMem...
[ "function(apiClient) {\n this.apiClient = apiClient || Configuration.default.getDefaultApiClient() || ApiClient.instance;\n\n\n this.setApiClient = function(apiClient) {\n this.apiClient = apiClient;\n };\n\n this.getApiClient = function() {\n return this.apiClient;\n };\n\n\n /**\n ...
codesearchnet
{ "query": "Represent the Github description about AWS Redshift:", "pos": "Represent the Github code about AWS Redshift:", "neg": "Represent the Github code about Software development:" }
Sets the list of channels. @param channels [Array<Channel>] the list of channels @param conf [Hash] the previously deserialized configuration
[ "def set_channels(channels, conf)\n if channels.nil?\n @channels = [] if @channels.nil?\n return\n end\n @channels = valid!(channels, Channel.deserialize_all(channels, conf),\n :@channels,\n invalid_error: 'invalid channel list %s') { [] }...
[ "function PbfSplicer(options) {\n // tag which will be auto-removed and auto-injected. Usually 'name'\n this.nameTag = options.nameTag;\n // tag that contains JSON initially, and which works as a prefix for multiple values\n this.multiTag = options.multiTag;\n\n // If options.namePicker is given, this class co...
codesearchnet
{ "query": "Represent the Github instruction about Documentation:", "pos": "Represent the Github code about Documentation:", "neg": "Represent the Github code about programming:" }