query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
To destroy a VM from the VMware environment CLI Example: .. code-block:: bash salt-cloud -d vmname salt-cloud --destroy vmname salt-cloud -a destroy vmname
[ "def destroy(name, call=None):\n '''\n \n '''\n if call == 'function':\n raise SaltCloudSystemExit(\n 'The destroy action must be called with -d, --destroy, '\n '-a or --action.'\n )\n\n __utils__['cloud.fire_event'](\n 'event',\n 'destroying instance...
[ "def docker(gandi, vm, args):\n \n if not [basedir for basedir in os.getenv('PATH', '.:/usr/bin').split(':')\n if os.path.exists('%s/docker' % basedir)]:\n gandi.echo(\"\"\"'docker' not found in $PATH, required for this command \\\nto work\nSee https://docs.docker.com/installation/#installat...
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Writes any object to the output stream.
[ "@Override\n public void writeObject(Object object)\n throws IOException\n {\n if (object == null) {\n writeNull();\n return;\n }\n\n Serializer serializer = findSerializerFactory().getObjectSerializer(object.getClass());\n\n serializer.writeObject(obje...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the post about writing:", "pos": "Represent the code about writing:", "neg": "Represent the code about programming:" }
Sort the array by the provided user function. @param callable $callback The callback function to use. @param string $path The sub path to be sorted. @return void
[ "public function uasort($callback, $path = '/')\n {\n $value = $this->get($path);\n if (null === $value || !is_array($value)) {\n return;\n }\n\n uasort($value, $callback);\n\n $this->set($path, $value);\n }" ]
[ "public static function instanceKey(array $path): string\n {\n return (new Collection($path))\n ->filter(function ($path): bool {\n // Ignore numeric path entries, as those signify an array of fields.\n // Combining the queries for those is the very purpose of the\...
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software Development:" }
Fills details about resource types of the document type into the given item. <p> @param item the list item to fill @param detailId the id for the detail to fill
[ "private void fillDetailResourceTypes(CmsListItem item, String detailId) {\n\n CmsSearchManager searchManager = OpenCms.getSearchManager();\n StringBuffer html = new StringBuffer();\n\n String doctypeName = (String)item.get(LIST_COLUMN_NAME);\n CmsSearchDocumentType docType = searchManag...
[ "@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 post about document management:", "pos": "Represent the Github code about document management:", "neg": "Represent the Github code:" }
Starts a new privilege-escalated environment, execute a closure, and shut it down.
[ "public static <V,T extends Throwable> V execute(TaskListener listener, String rootUsername, String rootPassword, final Callable<V, T> closure) throws T, IOException, InterruptedException {\n VirtualChannel ch = start(listener, rootUsername, rootPassword);\n try {\n return ch.call(closure);...
[ "def _shutdown_broker(self):\n \n if self.broker:\n self.broker.shutdown()\n self.broker.join()\n self.broker = None\n self.router = None\n\n # #420: Ansible executes \"meta\" actions in the top-level process,\n # meaning \"reset_connec...
codesearchnet
{ "query": "Represent the Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
TODO: break up method
[ "def build_clone(options)\n to_env = options[:environment]\n version = options[:version]\n content_view = options[:content_view] || to_env.default_content_view\n to_version = version || content_view.version(to_env)\n\n fail _(\"Cannot clone into the Default Content View\") if c...
[ "def star_sep_check(self, original, loc, tokens):\n \"\"\"\"\"\"\n return self.check_py(\"3\", \"keyword-only argument separator (add 'match' to front to produce universal code)\", original, loc, tokens)" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
****************** Event handlers ******************
[ "function onServices() {\n //debug('onServices');\n var numServices = Object.keys(this.services).length;\n if (!this.properties.tethering && numServices > 0) {\n //debug('update servicesCache');\n _servicesCache = this.services;\n }\n}" ]
[ "def closeEvent(self, event):\n \n\n self.save_config(self.gui_settings['gui_settings'])\n self.script_thread.quit()\n self.read_probes.quit()\n event.accept()\n\n print('\\n\\n======================================================')\n print('================= Closin...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// SetHealthCheck sets the HealthCheck field's value.
[ "func (s *GetHealthCheckOutput) SetHealthCheck(v *HealthCheck) *GetHealthCheckOutput {\n\ts.HealthCheck = 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 sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Return target file's content from resource's path.<br> Resource is used caller class. @param path resource's path @return read result
[ "public static String readResource(String path)\n {\n Class<?> callerClass = resolveCaller();\n if (callerClass == null)\n {\n return null;\n }\n\n return readResource(resolveCaller(), path);\n }" ]
[ "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 instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
@param string $slug @param string $state @return mixed @throws \Exception
[ "public function getDocumentBySlug($slug, $state = 'published')\n {\n if (!in_array($state, Document::$DOCUMENT_STATES, true)) {\n throw new \\RuntimeException('Unsupported document state: ' . $state);\n }\n $path = '/' . $slug;\n\n return $this->repository->getContentRepos...
[ "public function onDelete()\n {\n $this->validateRequestTheme();\n\n $type = Request::input('templateType');\n\n $this->loadTemplate($type, trim(Request::input('templatePath')))->delete();\n\n /*\n * Extensibility - documented above\n */\n $this->fireSystemEvent...
codesearchnet
{ "query": "Represent the Github instruction about PHP:", "pos": "Represent the Github code about PHP:", "neg": "Represent the Github code about Programming:" }
Processes a raw query. @param $expression <String> @param $type <Integer> @access protected @return <Mixed>
[ "protected function runQueryWithExpression(String $expresison, int $type=1)\n\t{\n\t\t$query = $this->builder()->query($expresison, $type);\n\t\tScheme::destroyColumns();\n\t\treturn $query;\n\t}" ]
[ "protected function parseExpressionHtmlLine( Line$line ):self\n\t{\n\t\t$content= $line->slice(1);\n\n\t\treturn $this->openNode(new StringNode($this,$line))->appendLine(\"<?$content?>\");\n\t}" ]
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// RunSelector executes the command.
[ "func (o *SetSelectorOptions) RunSelector() error {\n\tr := o.ResourceFinder.Do()\n\n\treturn r.Visit(func(info *resource.Info, err error) error {\n\t\tpatch := &Patch{Info: info}\n\t\tCalculatePatch(patch, scheme.DefaultJSONEncoder(), func(obj runtime.Object) ([]byte, error) {\n\t\t\tselectErr := updateSelectorFor...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
For the exception comment with embedded @link tags return the array of TagImpls consisting of SeeTagImpl(s) and text containing TagImpl(s). @return TagImpl[] Array of tags with inline SeeTagImpls. @see TagImpl#inlineTags() @see ParamTagImpl#inlineTags()
[ "@Override\n public Tag[] inlineTags() {\n if (inlineTags == null) {\n inlineTags = Comment.getInlineTags(holder, exceptionComment());\n }\n return inlineTags;\n }" ]
[ "public static OriginIdElement addOriginId(Message message) {\n OriginIdElement originId = new OriginIdElement();\n message.addExtension(originId);\n // TODO: Find solution to have both the originIds stanzaId and a nice to look at incremental stanzaID.\n // message.setStanzaId(originId.g...
codesearchnet
{ "query": "Represent the instruction about text processing:", "pos": "Represent the code about text processing:", "neg": "Represent the code about Software development:" }
This function checks if a child entry is related to the parent entry. This is done by comparing the reference and sequence numbers.
[ "def _is_related(parent_entry, child_entry):\n ''''''\n if parent_entry.header.mft_record == child_entry.header.base_record_ref and \\\n parent_entry.header.seq_number == child_entry.header.base_record_seq:\n return True\n else:\n return False" ]
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Converts HpsShippingInfo into expected format for Cardinal @param HpsShippingInfo $shipping shipping information @return array<string, string>
[ "protected function hydrateShippingInfo(HpsShippingInfo $shipping)\n {\n return array(\n 'ShippingAddress1' => $shipping->address->address,\n 'ShippingCity' => $shipping->address->city,\n 'ShippingCountryCode' => $shipping->countryCode,\n 'ShippingFirs...
[ "func (m *Strings) ToRawInfo() interface{} {\n\tinfo := yaml.MapSlice{}\n\tif m == nil {\n\t\treturn info\n\t}\n\t// &{Name:additionalProperties Type:NamedString StringEnumValues:[] MapType:string Repeated:true Pattern: Implicit:true Description:}\n\treturn info\n}" ]
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
@param mixed $fieldsMap @throws \InvalidArgumentException
[ "private function checkFieldsMapType($fieldsMap)\n {\n if (!is_array($fieldsMap) && !$fieldsMap instanceof \\ArrayAccess) {\n throw new \\InvalidArgumentException(sprintf(\n 'Parameter fieldsMap passed to %s should be an array or \\ArrayAccess.'\n .' Given: %s',\n ...
[ "protected final function AddCssClassField()\n {\n $name = 'CssClass';\n $this->AddField(Input::Text($name, $this->Content()->GetCssClass()), false, Trans(\"Core.ContentForm.$name\"));\n }" ]
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code:" }
Group together realizations with the same unique identifier (uid) and yield the first representative of each group.
[ "def get_effective_rlzs(rlzs):\n \n effective = []\n for uid, group in groupby(rlzs, operator.attrgetter('uid')).items():\n rlz = group[0]\n if all(path == '@' for path in rlz.lt_uid): # empty realization\n continue\n effective.append(\n Realization(rlz.value, su...
[ "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 Github instruction about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Runs the health check with the given name. @param name the health check's name @return the result of the health check @throws NoSuchElementException if there is no health check with the given name
[ "public HealthCheck.Result runHealthCheck(String name) throws NoSuchElementException {\n final HealthCheck healthCheck = healthChecks.get(name);\n if (healthCheck == null) {\n throw new NoSuchElementException(\"No health check named \" + name + \" exists\");\n }\n return healt...
[ "func (c StatusSetCmd) Info() *cmd.Info {\n\treturn jujucmd.Info(&cmd.Info{\n\t\tName: StatusSetCmdName,\n\t\tArgs: \"<class> <id> <status>\",\n\t\tPurpose: \"update the status of a payload\",\n\t\tDoc: `\n\"payload-status-set\" is used to update the current status of a registered payload.\nThe <class> and <i...
codesearchnet
{ "query": "Represent the Github sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
// Warnln logs the args at the Warn level.
[ "func (entry *Entry) Warnln(args ...interface{}) {\n\tif logger.Level >= logrus.WarnLevel {\n\t\tentry.Entry.Warnln(args...)\n\t}\n}" ]
[ "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 description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
This function will handle our server creation, as well as waiting for the server to come online after we've created it.
[ "function handleServerResponse(err, server) {\r\n if (err) {\r\n console.dir(err);\r\n return;\r\n }\r\n\r\n console.log('SERVER CREATED: ' + server.name + ', waiting for active status');\r\n\r\n // Wait for status: ACTIVE on our server, and then callback\r\n server.setWait({ status: server.STATUS.runnin...
[ "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 summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Finalizes the setup process.
[ "public function doFinalInitialization()\n {\n // add the referrers for the foreign keys\n $this->setupTableReferrers();\n\n // execute database behaviors\n foreach ($this->getBehaviors() as $behavior) {\n $behavior->modifyDatabase();\n }\n\n // execute table ...
[ "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 text:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Debugging used by Debug::show() @return string HTML data representing this object
[ "public function debug()\n {\n $class = static::class;\n $val = \"<h3>Database record: {$class}</h3>\\n<ul>\\n\";\n if ($this->record) {\n foreach ($this->record as $fieldName => $fieldVal) {\n $val .= \"\\t<li>$fieldName: \" . Debug::text($fieldVal) . \"</li>\\n\";...
[ "function make_event(event, target) {\n return string_p(event)? Event.make(event, target)\n : /* otherwise */ event }" ]
codesearchnet
{ "query": "Represent the Github sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
Facotory method to call the handler methods @param string $method @param array $args @return mixed
[ "protected static function runCallback($method, $args)\n\t{\n\t\t$instance = static::resolveFacadeInstance();\n\n\t\tif(empty($args))\n\t\t{\n\t\t\tthrow new InvalidArgumentException(\"Please provide an argument to this method\");\n\t\t\t\n\t\t}\n\n\t\tswitch (count($args))\n\t\t{\n\t\t\tcase 0:\n\t\t\t\treturn $in...
[ "@Help(help = \"Create the object of type {#}\")\n public T create(final T object) throws SDKException {\n return (T) requestPost(object);\n }" ]
codesearchnet
{ "query": "Represent the post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Get the high order bits from the mantissa. Equivalent to adding and subtracting HEX_40000 but also works for very large numbers @param d the value to split @return the high order part of the mantissa
[ "private static double doubleHighPart(double d) {\n if (d > -Precision.SAFE_MIN && d < Precision.SAFE_MIN){\n return d; // These are un-normalised - don't try to convert\n }\n long xl = Double.doubleToLongBits(d);\n xl = xl & MASK_30BITS; // Drop low order bits\n return...
[ "def signed_mult(a, b):\n \n a, b = as_wires(a), as_wires(b)\n final_len = len(a) + len(b)\n # sign extend both inputs to the final target length\n a, b = a.sign_extended(final_len), b.sign_extended(final_len)\n # the result is the multiplication of both, but truncated\n # TODO: this may make e...
codesearchnet
{ "query": "Represent the Github comment about Blockchain:", "pos": "Represent the Github code about Blockchain:", "neg": "Represent the Github code about programming:" }
// SetHook set hook for logging action
[ "func SetHook(hook Hook) {\n\tsingltonLock.RLock()\n\tdefer singltonLock.RUnlock()\n\n\tblog.SetHook(hook)\n}" ]
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Hide the tooltip
[ "function () {\n\t\tvar tooltip = this,\n\t\t\thoverPoints;\n\t\t\n\t\tclearTimeout(this.hideTimer); // disallow duplicate timers (#1728, #1766)\n\t\tif (!this.isHidden) {\n\t\t\thoverPoints = this.chart.hoverPoints;\n\n\t\t\tthis.hideTimer = setTimeout(function () {\n\t\t\t\ttooltip.label.fadeOut();\n\t\t\t\ttoolt...
[ "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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
This only works with some shells.
[ "def get_shell_history():\n \n # try for ipython\n if 'get_ipython' in globals():\n a = list(get_ipython().history_manager.input_hist_raw)\n a.reverse()\n return a\n\n elif 'SPYDER_SHELL_ID' in _os.environ:\n try:\n p = _os.path.join(_settings.path_user, \".spyder2...
[ "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 description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Get the value from <code>array</code> at <code>index</code> @param array the array @param index the index @return the value returned from <code>Array.get(array, index)</code>
[ "protected final Object arrayLookup(Object array, int index) {\n LOGGER.trace(\"get value from array index \" + index);\n return Array.get(array, index);\n }" ]
[ "function(c, i, array) {\n if (c === undefined || c === null) return;\n // c is the component, type is dimension|attribute,\n // level is dataset|series|observation, i is index,\n // array is the component array\n failed += !iterator.call(context, c, type, level, i, array);\n }" ]
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
"Add" the task, not possible for QueueEmailTask @return void
[ "public function add() {\n\t\t$this->err('Queue Email Task cannot be added via Console.');\n\t\t$this->out('Please use createJob() on the QueuedTask Model to create a Proper Email Task.');\n\t\t$this->out('The Data Array should look something like this:');\n\t\t$this->out(var_export([\n\t\t\t'settings' => [\n\t\t\t...
[ "def postloop(self):\n \n cmd.Cmd.postloop(self) # Clean up command completion\n d1_cli.impl.util.print_info(\"Exiting...\")" ]
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Training function.
[ "def train():\n \"\"\"\"\"\"\n trainer = gluon.Trainer(model.collect_params(), args.optimizer, {'learning_rate': args.lr})\n\n train_data_loader, val_data_loader, test_data_loader \\\n = dataprocessor.make_dataloader(data_train, data_val, data_test, args)\n\n best_valid_bleu = 0.0\n for epoch_...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Executes simple query which returns a single column. @param query: Query string. @return: Query result string.
[ "def _simpleQuery(self, query):\n \n cur = self._conn.cursor()\n cur.execute(query)\n row = cur.fetchone()\n return util.parse_value(row[0])" ]
[ "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 sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
ensure no double-callbacks happen
[ "function cb (err) {\n if (cb.done) return\n cb.done = true\n if (err) {\n log.warn('install', 'got an error, rolling back install')\n // roll-back the install if anything went wrong\n gyp.commands.remove([ release.versionDir ], function () {\n callback(err)\n })\n } else {\n ...
[ "def set_identifiers(self, data):\n \n for id_info in self._details.identifiers:\n var_name = id_info['var_name']\n self._data[var_name] = data.get(var_name)\n\n # FIXME: This needs to likely kick off invalidating/rebuilding\n # relations.\n # F...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
随机获得列表中的一定量的不重复元素,返回Set @param <T> 元素类型 @param collection 列表 @param count 随机取出的个数 @return 随机元素 @throws IllegalArgumentException 需要的长度大于给定集合非重复总数
[ "public static <T> Set<T> randomEleSet(Collection<T> collection, int count) {\r\n\t\tArrayList<T> source = new ArrayList<>(new HashSet<>(collection));\r\n\t\tif (count > source.size()) {\r\n\t\t\tthrow new IllegalArgumentException(\"Count is larger than collection distinct size !\");\r\n\t\t}\r\n\r\n\t\tfinal HashS...
[ "protected static void fixResultByRule(List<Vertex> linkedArray)\n {\n\n //--------------------------------------------------------------------\n //Merge all seperate continue num into one number\n mergeContinueNumIntoOne(linkedArray);\n\n //-------------------------------------------...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code about text processing:" }
Returns a collection of lists within this site :rtype: list[SharepointList]
[ "def get_lists(self):\n \n url = self.build_url(self._endpoints.get('get_lists'))\n\n response = self.con.get(url)\n if not response:\n return []\n\n data = response.json()\n\n return [self.list_constructor(parent=self, **{self._cloud_data_key: lst}) for lst in d...
[ "def changeTo(self, path):\n '''\n '''\n dictionary = DictSingle(Pair('PATH', StringSingle(path)))\n self.value = [dictionary]" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// Add a new User in InfluxDB
[ "func (c *Client) Add(ctx context.Context, u *chronograf.User) (*chronograf.User, error) {\n\t_, err := c.Query(ctx, chronograf.Query{\n\t\tCommand: fmt.Sprintf(`CREATE USER \"%s\" WITH PASSWORD '%s'`, u.Name, u.Passwd),\n\t})\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tfor _, p := range u.Permissions {\n\t\tif...
[ "@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 description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
/* ------------------------------------------------------------
[ "private void includeFile(File file)\n throws IOException\n {\n if (!file.exists())\n throw new FileNotFoundException(file.toString());\n \n if (file.isDirectory())\n {\n List list = new List(List.Unordered); \n String[] ls = file.list();\...
[ "public function description()\n {\n //====================================================================//\n // Stack Trace\n Splash::log()->trace();\n\n //====================================================================//\n // Build & Return Widget Description Array\n ...
codesearchnet
{ "query": "Represent the Github instruction about N/A:", "pos": "Represent the Github code about N/A:", "neg": "Represent the Github code about Software Development:" }
Populate axis limits GUI with current plot values.
[ "def set_xlimits_widgets(self, set_min=True, set_max=True):\n \"\"\"\"\"\"\n xmin, xmax = self.tab_plot.ax.get_xlim()\n if set_min:\n self.w.x_lo.set_text('{0}'.format(xmin))\n if set_max:\n self.w.x_hi.set_text('{0}'.format(xmax))" ]
[ "def surface(self, canvas, X, Y, Z, color=None, label=None, **kwargs):\n \n raise NotImplementedError(\"Implement all plot functions in AbstractPlottingLibrary in order to use your own plotting library\")" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
Parse the encoded extension
[ "private void parseExtension(Extension ext) throws IOException {\n try {\n Class<?> extClass = OIDMap.getClass(ext.getExtensionId());\n if (extClass == null) { // Unsupported extension\n if (ext.isCritical()) {\n unsupportedCritExt = true;\n ...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github sentence about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
Initialize an individual series, called internally before render time
[ "function initSeries(options) {\r\n\t\tvar type = options.type || optionsChart.type || optionsChart.defaultSeriesType,\r\n\t\t\ttypeClass = seriesTypes[type],\r\n\t\t\tserie,\r\n\t\t\thasRendered = chart.hasRendered;\r\n\r\n\t\t// an inverted chart can't take a column series and vice versa\r\n\t\tif (hasRendered) {...
[ "@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 text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Entry point for the script
[ "def main():\n \"\"\"\"\"\"\n\n desc = 'Converts between geodetic, modified apex, quasi-dipole and MLT'\n parser = argparse.ArgumentParser(description=desc, prog='apexpy')\n\n parser.add_argument('source', metavar='SOURCE',\n choices=['geo', 'apex', 'qd', 'mlt'],\n ...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Text. @param buf the buf @param start the start @param len the len @return serializer @throws IOException Signals that an I/O exception has occurred.
[ "public XMLSerializer text(char[] buf, int start, int len) throws IOException {\n\t\tif (startTagIncomplete || setPrefixCalled)\n\t\t\tcloseStartTag();\n\t\tif (doIndent && seenTag)\n\t\t\tseenTag = false;\n\t\twriteElementContent(buf, start, len, out);\n\t\treturn this;\n\t}" ]
[ "@Override\n public int getHeaderLength() {\n try {\n final byte b = this.headers.getByte(0);\n // length is encoded as the number of 32-bit words, so to get number of bytes we must multiply by 4\n return (b & 0x0F) * 4;\n } catch (final IOException e) {\n ...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Get HTML code for a element. @return string HTML code for the element. @SuppressWarnings(PHPMD.UnusedLocalVariable)
[ "public function getHTML()\n {\n $details = $this->getHTMLDetails();\n extract($details);\n\n $ret = null;\n foreach ($this['values'] as $val) {\n $id .= $val;\n $item = $onlyValue = htmlentities($val, ENT_QUOTES, $this->characterEncoding);\n $value =...
[ "private function getLateLoadPropertyDeclaration()\n {\n\n $this->class->classComponents[] = new VariableDeclaration(\n 'lateLoadProperty',\n new Sformatf( <<<'PHP'\n /**\n * The property used for lateLoading\n * @var string\n ...
codesearchnet
{ "query": "Represent the Github comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// InstanceExistsByProviderID returns true if the instance with the given provider id still exists and is running. // If false is returned with no error, the instance will be immediately deleted by the cloud controller manager.
[ "func (pc *PCCloud) InstanceExistsByProviderID(ctx context.Context, providerID string) (bool, error) {\n\treturn false, cloudprovider.NotImplemented\n}" ]
[ "func (p *provisioningIdentityMapper) UserFor(info authapi.UserIdentityInfo) (kuser.Info, error) {\n\t// Retrying up to three times lets us handle race conditions with up to two conflicting identity providers without returning an error\n\t// * A single race is possible on user creation for every conflicting identit...
codesearchnet
{ "query": "Represent the Github post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Returns set of items. :param path: Regex filter on item path. :return: List of Item class objects.
[ "def items(self, path=None):\n \n items = list(self.iteritems())\n if path is not None:\n path += '$'\n regex = re.compile(path)\n items = [i for i in items if regex.match(i.path)]\n return items" ]
[ "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 Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
This adds a compile "task" for when the compiler of semantics (JCI) is called later on with compileAll()\ which actually does the compiling. The ErrorHandler is required to map the errors back to the element that caused it.
[ "public void addClassCompileTask(final String className,\n final BaseDescr descr,\n final String text,\n final MemoryResourceReader src,\n final ErrorHandler handler) {\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 post:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Test if this variable has a fuzzy member. <p> @param memberName the fuzzy member name @return true/false
[ "public boolean haveMember(String memberName) {\n\t\treturn members.stream().anyMatch((member) -> (member.getName().equals(memberName)));\n\t}" ]
[ "function run(booleanOrString, anyDataType, functionOrObject, aNumber, anArray) {\n /*\n * if expectations aren't met, args checker will throw appropriate exceptions\n * notifying the user regarding the errors of the arguments.\n * */\n \targs.expect(arguments, ['boolean|string', '*',...
codesearchnet
{ "query": "Represent the text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
This class implements a combinator library for matcher functions. The combinators are described at: https://developer.mozilla.org/en-US/docs/Web/CSS/Value_definition_syntax#Component_value_combinators
[ "function Matcher(matchFunc, toString) {\n this.match = function(expression) {\n // Save/restore marks to ensure that failed matches always restore\n // the original location in the expression.\n var result;\n expression.mark();\n result = matchFunc(expression);\n if (re...
[ "def get_metaschema(): # type: () -> Tuple[Names, List[Dict[Text, Any]], Loader]\n \"\"\"\"\"\"\n loader = ref_resolver.Loader({\n \"Any\": \"https://w3id.org/cwl/salad#Any\",\n \"ArraySchema\": \"https://w3id.org/cwl/salad#ArraySchema\",\n \"Array_symbol\": \"https://w3id.org/cwl/salad#...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Always return a valid sort - even if the userid column is missing. @return array column name => SORT_... constant.
[ "public function get_sort_columns() {\n $result = parent::get_sort_columns();\n\n $assignment = $this->assignment->get_instance();\n if (empty($assignment->blindmarking)) {\n $result = array_merge($result, array('userid' => SORT_ASC));\n } else {\n $result = array_m...
[ "def getSampleTypeTitles(self):\n \n sample_types = self.getSampleTypes()\n sample_type_titles = map(lambda obj: obj.Title(), sample_types)\n\n # N.B. This is used only for search purpose, because the catalog does\n # not add an entry to the Keywordindex for an empty list.\n ...
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Puts each data field into a tensor. :param batch: The input data batch. :type batch: list of (features, feature_weights) pair :return: Preprocessed data. :rtype: list of torch.Tensor with torch.Tensor (Optional)
[ "def _collate(self, batch):\n \n\n Y_batch = None\n if isinstance(batch[0], tuple):\n batch, Y_batch = list(zip(*batch))\n Y_batch = self._cuda(torch.Tensor(Y_batch))\n\n f_batch, v_batch = list(zip(*batch))\n\n f_batch, _ = pad_batch(f_batch, 0)\n v_b...
[ "def ensure_dtraj(dtraj):\n \n\n \"\"\"\n if is_int_vector(dtraj):\n return dtraj\n elif is_list_of_int(dtraj):\n return np.array(dtraj, dtype=int)\n else:\n raise TypeError('Argument dtraj is not a discrete trajectory - only list of integers or int-ndarrays are allowed. Check ty...
codesearchnet
{ "query": "Represent the Github sentence about Natural Language Processing:", "pos": "Represent the Github code about Natural Language Processing:", "neg": "Represent the Github code:" }
Renders the comments list for a given content. Comment form might also be included. @param \eZ\Publish\API\Repository\Values\Content\ContentInfo $contentInfo @param \Symfony\Component\HttpFoundation\Request $request @param array $options @return string
[ "public function renderForContent(ContentInfo $contentInfo, Request $request, array $options = array())\n {\n $foo = $this->locationService->loadLocation($contentInfo->mainLocationId);\n\n return $this->doRender(\n $options + array(\n 'app_id' => $this->appId,\n ...
[ "protected function validateCriterionInput(Criterion $criterion)\n {\n /** @var $criterion \\eZ\\Publish\\API\\Repository\\Values\\Content\\Query\\Criterion\\LogicalOperator */\n if (!isset($criterion->criteria[0]) || (count($criterion->criteria) > 1)) {\n throw new RuntimeException('Inv...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Sets the current tab. @param index the new current tab
[ "private void setCurrentTab(final int index)\n\t{\n\t\tif (this.currentTab == index)\n\t\t{\n\t\t\t// already current\n\t\t\treturn;\n\t\t}\n\t\tthis.currentTab = index;\n\n\t\tfinal Component component;\n\n\t\tif ((currentTab == -1) || tabs.isEmpty() || !getVisiblityCache().isVisible(currentTab))\n\t\t{\n\t\t\t// ...
[ "public void setPage(int page) {\n if(page < 0)\n throw new IllegalArgumentException(Bundle.getErrorString(\"PagerModel_IllegalPage\"));\n\n /* todo: need to check that the new 'current' page is in range given the first/last boundaries */\n _currentRow = new Integer(page * getPageSiz...
codesearchnet
{ "query": "Represent the Github text about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Returns true if the lifecycle init method should be called for the node with the given init index.
[ "function shouldCallLifecycleInitHook(view, initState, index) {\n if ((view.state & 1792 /* InitState_Mask */) === initState && view.initIndex <= index) {\n view.initIndex = index + 1;\n return true;\n }\n return false;\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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
New method added as an alternative of getUserFromUniqueId method of WSSecurityPropagationHelper
[ "private String getUserFromUniqueID(String id) {\n if (id == null) {\n return \"\";\n }\n id = id.trim();\n int realmDelimiterIndex = id.indexOf(\"/\");\n if (realmDelimiterIndex < 0) {\n return \"\";\n } else {\n return id.substring(realmDe...
[ "Observable<ComapiResult<String>> doCreateFbOptInState(@NonNull final String token) {\n return wrapObservable(service.createFbOptInState(AuthManager.addAuthPrefix(token), apiSpaceId, new Object()).map(mapToComapiResult()), log, \"Creating fb opt in state.\");\n }" ]
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
return basic descriptive stats of some numerical sample
[ "function descStats(sample) {\n var S = [].concat(sample);\n S.sort(function sortOrder(a, b) {\n return a - b;\n });\n var N = S.length;\n var q1 = S[Math.floor(0.25 * N)];\n var q2 = S[Math.floor(0.50 * N)];\n var q3 = S[Math.floor(0.70 * N)];\n var iqr = q3 - q1;\n var tol = 3 * ...
[ "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 instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
// OrderByAggregation creates a bucket ordering strategy which sorts buckets // based on a single-valued calc get.
[ "func (a TermsAggregation) OrderByAggregation(aggName string, asc bool) TermsAggregation {\n\t// {\n\t// \"aggs\" : {\n\t// \"genders\" : {\n\t// \"terms\" : {\n\t// \"field\" : \"gender\",\n\t// \"order\" : { \"avg_height\" : \"desc\" }\n\t// },\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 post about AWS S3:", "pos": "Represent the Github code about AWS S3:", "neg": "Represent the Github code:" }
_updateObject(self, xref, text, page=None) -> PyObject *
[ "def _updateObject(self, xref, text, page=None):\n \"\"\"\"\"\"\n if self.isClosed or self.isEncrypted:\n raise ValueError(\"operation illegal for closed / encrypted doc\")\n\n return _fitz.Document__updateObject(self, xref, text, page)" ]
[ "def changeTo(self, path):\n '''\n '''\n dictionary = DictSingle(Pair('PATH', StringSingle(path)))\n self.value = [dictionary]" ]
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Get ElasticSearch instance for given resource.
[ "def elastic(self, resource=None):\n \"\"\"\"\"\"\n px = self._resource_prefix(resource)\n\n if px not in self.elastics:\n url = self._resource_config(resource, 'URL')\n assert url, 'no url for %s' % px\n self.elastics[px] = get_es(url, **self.kwargs)\n\n ...
[ "@Override\n\tpublic void validateSetup(Server server, Query query) throws ValidationException {\n\t\tlogger.info(\"Starting Stackdriver writer connected to '{}', proxy {} ...\", gatewayUrl, proxy);\n\t}" ]
codesearchnet
{ "query": "Represent the Github summarization about Elasticsearch:", "pos": "Represent the Github code about Elasticsearch:", "neg": "Represent the Github code about Programming:" }
Change client queue counter helper @param int $queueCounter
[ "protected function changeQueueCount($queueCounter)\n {\n if ($queueCounter < 0) {\n $queueCounter = 0;\n }\n $this->_poolClientQueueCounter = $queueCounter;\n //Automatically change client state to `ClientInterface::CLIENT_POOL_STATE_READY` on empty queue\n if ($thi...
[ "def postloop(self):\n \n cmd.Cmd.postloop(self) # Clean up command completion\n d1_cli.impl.util.print_info(\"Exiting...\")" ]
codesearchnet
{ "query": "Represent the description:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Generator for an XML row
[ "def xml_row(row, lang):\n '''\n \n '''\n for elem in row:\n name = elem.get('name')\n child = elem[0]\n ftype = re.sub(r'\\{[^}]+\\}', '', child.tag)\n if ftype == 'literal':\n ftype = '{}, {}'.format(ftype, child.attrib.get(XML_LANG, 'none'))\n yield (name...
[ "@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:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Creates a new Single Key to Object Pool @param factory the factory which creates new Objects (T) when needed @return IKeyedObjectPool
[ "public static <K, T> IKeyedObjectPool.Single<K, T> createPool(IPoolObjectFactory<K, T> factory) {\n\treturn new KeyedSingleObjectPool<K, T>(factory);\n }" ]
[ "protected Expression instantiate(Object oldInstance, Encoder out)\n {\n //\n // An implementation instance is actually constructed at decode time by calling\n // ControlBean.ensureControl on the parent bean. This will create a new impl\n // instance and run the impl initializer on i...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Execute using a child_process exec, for any async command
[ "function execSpawn(command, args, resultMsg, errorMsg) {\n return superspawn.spawn(command, args).then(function(result) {\n return resultMsg + result;\n }, function(error) {\n return errorMsg + error;\n });\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 Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// newBuilder creates a new roundrobin balancer builder.
[ "func newBuilder() balancer.Builder {\n\treturn base.NewBalancerBuilderWithConfig(Name, &rrPickerBuilder{}, base.Config{HealthCheck: true})\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 text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Adds an option. @param string $name The name @param mixed $default An optional default value @throws \InvalidArgumentException
[ "protected function addOption($name, $default = null)\n {\n if (array_key_exists($name, $this->options)) {\n throw new \\InvalidArgumentException(sprintf('The option \\'%s\\' already exists.', $name));\n }\n\n $this->options[$name] = $default;\n }" ]
[ "public static function setDefaultMode(int $mode) : void\n {\n if (in_array($mode, [self::MODE_REGEX, self::MODE_STRING])) {\n self::$mode = $mode;\n return;\n }\n\n // Unknown mode\n throw new \\UnexpectedValueException('Invalid route mode');\n }" ]
codesearchnet
{ "query": "Represent the post about PHP:", "pos": "Represent the code about PHP:", "neg": "Represent the code about Programming:" }
Processes the number format definition for the provided locale. @param string $locale The locale. @param array $definition The definition @return array The processed definition.
[ "protected function processDefinition($locale, array $definition)\n {\n $definition['locale'] = $locale;\n // The generation script strips all keys that have the same values\n // as the ones in 'en'.\n if ($definition['locale'] != 'en') {\n $definitions = $this->getDefiniti...
[ "public function initializeArguments()\n {\n $this->registerArgument('value', 'string', 'The input value. If not given, the evaluated child nodes will be used', false, null);\n $this->registerArgument('mode', 'string', 'The case to apply, must be one of this\\' CASE_* constants. Defaults to upperca...
codesearchnet
{ "query": "Represent the post about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Programming:" }
Run datporod and return the estimated Porod volume. Returns: Radius of gyration found in the input file I0 found in the input file Vporod: the estimated Porod volume
[ "def datporod(gnomoutfile):\n \n results = subprocess.check_output(['datporod', gnomoutfile]).decode('utf-8').strip().split()\n return float(results[0]), float(results[1]), float(results[2])" ]
[ "def normalize(self, inplace=True):\n \n phi = self if inplace else self.copy()\n\n # The pdf of a Joint Gaussian distrinution is always\n # normalized. Hence, no changes.\n if not inplace:\n return phi" ]
codesearchnet
{ "query": "Represent the sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
the hook is triggered when the basket item list contained in the basket deletes an article. @param TShopBasketArticle $oBasketItemRemoved
[ "public function OnBasketItemDeleteEvent($oBasketItemRemoved)\n {\n $event = new \\ChameleonSystem\\ShopBundle\\objects\\TShopBasket\\BasketItemEvent(\n TdbDataExtranetUser::GetInstance(),\n $this,\n $oBasketItemRemoved\n );\n $this->getEventDispatcher()->dis...
[ "public function handle(PublishThePost $event) {\n $this->sendEmailsFromList->sendEmails($event->data['id']['listID'], $event->data['id']);\n \\Log::info('Lasallecms\\Lasallecmsapi\\Listeners\\TriggerLaSalleCRMList listener completed');\n }" ]
codesearchnet
{ "query": "Represent the Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Invokes postRemove callbacks and events for given document.
[ "public function postRemove(ClassMetadata $class, object $document) : void\n {\n $class->invokeLifecycleCallbacks(Events::postRemove, $document, [new LifecycleEventArgs($document, $this->dm)]);\n $this->evm->dispatchEvent(Events::postRemove, new LifecycleEventArgs($document, $this->dm));\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 Github sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Log a message at fatal level. @param message the message to log @param exception the exception that caused the message to be generated
[ "public void fatal(Object message, Throwable exception) {\n log(Level.FATAL, message, exception);\n }" ]
[ "function LoggerContext() {\n LifeCycle.call(this);\n\n /**\n * Context start time\n */\n this.startTime = new Date();\n\n /**\n * The list of trace levels that the logger context knows about\n */\n this.logLevel = new LogLevel();\n\n /**\n * Root logger, final ancestor of all ...
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
// IsDir returns true if the named entity is a directory
[ "func (s *Store) IsDir(ctx context.Context, name string) bool {\n\tpath := filepath.Join(s.path, filepath.Clean(name))\n\tisDir := fsutil.IsDir(path)\n\tout.Debug(ctx, \"fs.Isdir(%s) - %s -> %t\", name, path, isDir)\n\treturn isDir\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 Github instruction about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
获取POST过来的二进制数据,与手机端交互 @param bool $formatJson 获取的数据是否为json并格式化为数组 @param string $jsonField 获取json格式化为数组的字段多维数组用.分隔 如top.son.son2 @return bool|mixed|null|string
[ "public static function getBinaryData($formatJson = false, $jsonField = '')\n {\n if (isset($GLOBALS['HTTP_RAW_POST_DATA']) && !empty($GLOBALS['HTTP_RAW_POST_DATA'])) {\n $data = $GLOBALS['HTTP_RAW_POST_DATA'];\n } else {\n $data = file_get_contents('php://input');\n }\...
[ "public Select parseSelect(MySqlSelectQueryBlock query) throws SqlParseException {\n\n Select select = new Select();\n /*zhongshu-comment SqlParser类没有成员变量,里面全是方法,所以将this传到WhereParser对象时是无状态的,\n 即SqlParser对象并没有给WhereParser传递任何属性,也不存在WhereParser修改SqlParser的成员变量值这一说\n ...
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Handles parsing response structure and translating API Exceptions
[ "def meta_request(func):\n \n def inner(self, resource, *args, **kwargs):\n serialize_response = kwargs.pop('serialize', True)\n try:\n resp = func(self, resource, *args, **kwargs)\n except ApiException as e:\n raise api_exception(e)\n if serialize_response:\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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Return a formatted error linked to pug source. @param \Throwable $error @param string $code @param string $path @throws \Throwable @return LocatedException|\Throwable
[ "public function getDebugError($error, $code, $path = null)\n {\n /** @var \\Throwable $error */\n $line = $this->getSourceLine($error);\n if ($line === false) {\n return $error;\n }\n $source = explode(\"\\n\", $code, max(2, $line));\n array_pop($source);\n ...
[ "private function handleErrorUnit(Invoke\\Error $unit): Result\\AbstractResult\n {\n return new Result\\Error(null, $unit->getBaseException());\n }" ]
codesearchnet
{ "query": "Represent the summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Add subselect queries to count the relations. @param mixed $relations @return $this
[ "public function withCount( $relations )\n\t{\n\t\tif ( is_null( $this->query->columns ) )\n\t\t{\n\t\t\t$this->query->select( ['*'] );\n\t\t}\n\n\t\t$relations = is_array( $relations ) ? $relations : func_get_args();\n\n\t\tforeach ( $this->parseWithRelations( $relations ) as $name => $constraints )\n\t\t{\n\t\t\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 sentence about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code about programming:" }
Update the event mask for a callback.
[ "def update_callback(self, handle, events):\n \"\"\"\"\"\"\n if self._poll is None:\n raise RuntimeError('poll instance is closed')\n if not has_callback(self, handle):\n raise ValueError('no such callback')\n if events & ~(READABLE|WRITABLE):\n raise Val...
[ "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 Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// LoadPluginsGo loads the plugins.go file into memory.
[ "func LoadPluginsGo() error {\n\tp := filepath.Join(\"plugins.go\")\n\tokVal := fmt.Sprintf(\"open %s: no such file or directory\", p)\n\tcontents, err := ioutil.ReadFile(p)\n\tif err != nil && err.Error() != okVal {\n\t\treturn err\n\t}\n\tvar val []byte\n\tvar foundStart bool\n\tvar nestLvl int\n\tfor _, b := ran...
[ "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 summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Shortcut method to add a numeric value @param nIndex The index where the member should be added. Must be &ge; 0. @param fValue The value to be added. @return this
[ "@Nonnull\n public CSSExpression addNumber (@Nonnegative final int nIndex, final float fValue)\n {\n return addMember (nIndex, new CSSExpressionMemberTermSimple (fValue));\n }" ]
[ "function(c, i, array) {\n if (c === undefined || c === null) return;\n // c is the component, type is dimension|attribute,\n // level is dataset|series|observation, i is index,\n // array is the component array\n failed += !iterator.call(context, c, type, level, i, array);\n }" ]
codesearchnet
{ "query": "Represent the instruction about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Check if the required lock columns have been added to the database. This prevents people upgrading from seeing 500 errors in their logs. @param \Concrete\Core\Database\Connection\Connection $db @return bool
[ "private function lockColumnsExist(Connection $db)\n {\n $schema = $db->getSchemaManager()->listTableColumns($this->table);\n return isset($schema['lockid']);\n }" ]
[ "public function Upgrade182to183()\n {\n $this->_batch->addTask('Db_CreateNewTables');\n $this->_batch->addTask('Db_AddPatches', 61);\n\n // Use AddTask task to execute after patches\n $this->_batch->addTask('AddTask', 'Echo', $this->_('Make sure to read the changelog as it contains i...
codesearchnet
{ "query": "Represent the Github post about Software Development:", "pos": "Represent the Github code about Software Development:", "neg": "Represent the Github code:" }
URL decode a string
[ "private static String URLDecode(String text) {\n String result = null;\n try {\n result = URLDecoder.decode(text, \"UTF8\");\n } catch (UnsupportedEncodingException e) {\n // Should never happen - all JDKs must support UTF8\n FFDCFilter.processException(e, \"co...
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Given a free-standing function 'callable', return a new callable that will call 'callable' and report all exceptins, using 'call_and_report_errors'.
[ "def make_wrapper(self, callable_):\n \"\"\"\"\"\"\n assert callable(callable_)\n def wrapper(*args, **kw):\n return self.call_and_report_errors(callable_, *args, **kw)\n return wrapper" ]
[ "def reset_exiter(cls, exiter):\n \n assert(isinstance(exiter, Exiter))\n # NB: mutate the class variables! This is done before mutating the exception hook, because the\n # uncaught exception handler uses cls._exiter to exit.\n cls._exiter = exiter\n # NB: mutate process-global state!\n sys.exc...
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Copy a file or folder to the repository. Will mount if needed. Args: filename: Path to copy. destination: Remote path to copy file to.
[ "def _copy(self, filename, destination):\n \n super(MountedRepository, self)._copy(filename, destination)" ]
[ "function Uploadfs() {\n var tempPath, imageSizes;\n var scaledJpegQuality;\n var self = this;\n /**\n * Initialize uploadfs. The init method passes options to the backend and invokes a callback when the backend is ready.\n * @param {Object} options: backend, imageSizes, orientOriginals, tempPath, copyOr...
codesearchnet
{ "query": "Represent the Github post about file transfer:", "pos": "Represent the Github code about file transfer:", "neg": "Represent the Github code:" }
Get full class name from key @param string $name @return string @throws \Osf\Exception\ArchException
[ "public static function getClass(string $name)\n {\n if (!isset(static::$classes[$name])) {\n throw new ArchException('Unable to find class from key [' . $name . ']');\n }\n return static::$classes[$name];\n }" ]
[ "function validateService($pluginInstance)\n {\n if (! is_object($pluginInstance) )\n throw new \\Exception(sprintf('Can`t resolve to (%s) Instance.', $pluginInstance));\n\n if (!$pluginInstance instanceof aGrantRequest)\n throw new exContainerInvalidServiceType('Invalid Plugi...
codesearchnet
{ "query": "Represent the sentence about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about Software development:" }
// compareSegmentType ranks the segments by their type specificity
[ "func compareSegmentType(a, b segment) int {\n\tsegs := []segment{a, b}\n\tranks := make([]int, 2)\n\tfor i, seg := range segs {\n\t\tswitch seg.(type) {\n\t\tcase literal:\n\t\t\tranks[i] = 3\n\t\tcase glob:\n\t\t\tranks[i] = 2\n\t\tcase alternation:\n\t\t\tranks[i] = 1\n\t\tcase fullglob:\n\t\t\tranks[i] = 0\n\t\...
[ "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 Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Core FNV hash algorithm used in FNV0 and FNV1.
[ "def fnv(data, hval_init, fnv_prime, fnv_size):\n \n assert isinstance(data, bytes)\n\n hval = hval_init\n for byte in data:\n hval = (hval * fnv_prime) % fnv_size\n hval = hval ^ _get_byte(byte)\n return hval" ]
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
[TARGET query(QueryJobConfiguration, JobOption...)]
[ "public void runQuery() throws InterruptedException {\n // [START bigquery_query]\n // BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();\n String query = \"SELECT corpus FROM `bigquery-public-data.samples.shakespeare` GROUP BY corpus;\";\n QueryJobConfiguration queryConfig = QueryJo...
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
start server return True of False
[ "def start(self, timeout=300):\n \"\"\"\"\"\"\n if self.is_alive:\n return True\n try:\n dbpath = self.cfg.get('dbpath')\n if dbpath and self._is_locked:\n # repair if needed\n logger.info(\"Performing repair on locked dbpath %s\", ...
[ "def precmd(self, line):\n \"\"\"\"\"\"\n if line.startswith('help'):\n if not q(\"`help in key`.q\"):\n try:\n q(\"\\\\l help.q\")\n except kerr:\n return '-1\"no help available - install help.q\"'\n if line == 'hel...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Check that fit can be called on reference data
[ "def check(self, feature):\n \"\"\"\"\"\"\n mapper = feature.as_dataframe_mapper()\n mapper.fit(self.X, y=self.y)" ]
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Map 1D cell index to a 2D coordinate :param i: integer 1D cell index :return: (x, y), a 2D coordinate
[ "def relayIndextoCoord(self, i):\n \n x = i % self.relayWidth\n y = i / self.relayWidth\n return x, y" ]
[ "def label(self, input_grid):\n \n marked = self.find_local_maxima(input_grid)\n marked = np.where(marked >= 0, 1, 0)\n # splabel returns two things in a tuple: an array and an integer\n # assign the first thing (array) to markers\n markers = splabel(marked)[0]\n ret...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Add a plain character to the prefix.
[ "function handlePlainCharacter(element, char) {\n const prefix = element[typedPrefixKey] || '';\n element[typedPrefixKey] = prefix + char;\n element.selectItemWithTextPrefix(element[typedPrefixKey]);\n setPrefixTimeout(element);\n}" ]
[ "public String filePath(int index, String savePath) {\n // not calling the corresponding swig function because internally,\n // the use of the function GetStringUTFChars does not consider the case of\n // a copy not made\n return savePath + File.separator + fs.file_path(index);\n }" ]
codesearchnet
{ "query": "Represent the Github instruction about Writing:", "pos": "Represent the Github code about Writing:", "neg": "Represent the Github code about programming:" }
Returns the associated value of a given key. Returns null if the key doesn't exist in the trie. @param key the key. @return the associated value or null.
[ "public V get(K[] key) {\r\n Node child = root.get(key[0]);\r\n if (child != null) {\r\n return child.getChild(key, 1);\r\n }\r\n return null;\r\n }" ]
[ "function () {\n __objCount++;\n /**\n * Counter to be used as an index in each map. Is incremented each time a new entry is added to the object.\n * @protected\n * @type Number\n */\n this._nextIndex = 0;\n /**\n ...
codesearchnet
{ "query": "Represent the description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// GetClass is a shortcut for returning the string value of the current // class on a given row. // // IMPORTANT: GetClass will panic if the number of ClassAttributes is // set to anything other than one.
[ "func GetClass(from DataGrid, row int) string {\n\n\t// Get the Attribute\n\tclassAttrs := from.AllClassAttributes()\n\tif len(classAttrs) > 1 {\n\t\tpanic(\"More than one class defined\")\n\t} else if len(classAttrs) == 0 {\n\t\tpanic(\"No class defined!\")\n\t}\n\tclassAttr := classAttrs[0]\n\n\t// Fetch and conv...
[ "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 description about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Returns all the commerce price lists where companyId = &#63;. @param companyId the company ID @return the matching commerce price lists
[ "@Override\n\tpublic List<CommercePriceList> findByCompanyId(long companyId) {\n\t\treturn findByCompanyId(companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS,\n\t\t\tnull);\n\t}" ]
[ "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 comment about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about Software development:" }
Execute the console command. @return mixed
[ "public function handle()\n {\n $prefix = trim($this->option('prefix'));\n $max = trim($this->option('max'));\n $next = trim($this->option('next'));\n\n /**\n * @var Client\n */\n $client = $this->mns;\n if (!$client) {\n $this->error('请先配置阿里云M...
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Set the font size to the desired size, in pt or px.
[ "def set_font_size(self, pt=None, px=None):\n \"\"\"\"\"\"\n self.font.set_size(pt, px)\n\n self._render()" ]
[ "def data_class_detection(self, data):\n \n assert(isinstance(data, list) or isinstance(data, tuple))\n if not isinstance(self, (LineChart, BarChart, ScatterChart)):\n # From the link above:\n # Simple encoding is suitable for all other types of chart\n # re...
codesearchnet
{ "query": "Represent the instruction:", "pos": "Represent the code:", "neg": "Represent the code:" }
// String returns a string that uniquely identifies the Upstream. Used for // identifying the upstream in log output and map keys.
[ "func (uc *UpstreamConfig) String() string {\n\treturn fmt.Sprintf(\"%s:%d->%s:%s/%s\", uc.LocalBindAddress, uc.LocalBindPort,\n\t\tuc.DestinationType, uc.DestinationNamespace, uc.DestinationName)\n}" ]
[ "func (r *controller) Update(ctx context.Context, t *api.Task) error {\n\t// TODO(stevvooe): While assignment of tasks is idempotent, we do allow\n\t// updates of metadata, such as labelling, as well as any other properties\n\t// that make sense.\n\treturn nil\n}" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
// SetNextToken sets the NextToken field's value.
[ "func (s *ListBranchesInput) SetNextToken(v string) *ListBranchesInput {\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 instruction about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Get property node @param string $key @return mixed
[ "private function getPropertyNodeValue(string $key)\n {\n $data = $this->toArray();\n if (strpos($key,'/')===false){\n return $data[$key] ?? NULL;\n }\n $node_keys = explode('/', $key);\n $node = $data;\n while(($node_key = array_shift($node_keys)) && (count($...
[ "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 description about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
路由反解析函数 @param string $name 路由配置表名称 @param array $value 路由填充值 @param string $prefix 最终合成路径的前缀 @return string
[ "public function url($name, array $value = NULL, $prefix = NULL) {\n $route = $this->routingTable[$name];\n\n if(!$route) {\n return '';\n }\n //交换数组键值\n $pattern = [];\n foreach ($route['params'] as $row) {\n $pattern[$row] = isset($value[$row]) ? $va...
[ "private static function appRun(){\n // echo \"runing\";\n // 当有get参数传递时 获取get参数\n if(isset($_GET['s'])){\n // 更加\"/\"将get参数分割成数组\n $info = explode('/',$_GET['s']);\n\n // 获取模块名称 转换成小写\n $m = strtolower($info[0]);\n // 获取控制器名称 转换成小写\n ...
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Visit OP_ADD and OP_CLOSE, they are almost the same @param editsOpCode op code to visit
[ "private void visit_OP_ADD_or_OP_CLOSE(FSEditLogOpCodes editsOpCode)\n throws IOException {\n visitTxId();\n if (!LayoutVersion.supports(Feature.EDITLOG_OP_OPTIMIZATION, editsVersion)) {\n IntToken opAddLength = v.visitInt(EditsElement.LENGTH);\n // this happens if the edits is not prop...
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Generate a Calc object for each requested parameter combination.
[ "def create_calcs(self):\n \"\"\"\"\"\"\n specs = self._combine_core_aux_specs()\n for spec in specs:\n spec['dtype_out_time'] = _prune_invalid_time_reductions(spec)\n return [Calc(**sp) for sp in specs]" ]
[ "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 text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Flush the output @return bool
[ "public function stream_flush()\n {\n if ($this->fileHandle === null) {\n return false;\n }\n self::restore();\n $success = fflush($this->fileHandle);\n self::register();\n return $success;\n }" ]
[ "def postloop(self):\n \n cmd.Cmd.postloop(self) # Clean up command completion\n d1_cli.impl.util.print_info(\"Exiting...\")" ]
codesearchnet
{ "query": "Represent the Github summarization about Computer Science:", "pos": "Represent the Github code about Computer Science:", "neg": "Represent the Github code about Software development:" }