query
stringlengths
16
255
pos
list
neg
list
task
stringclasses
1 value
instruction
dict
For any request URL other than the context root, delegate to the appropriate handler. If no handler is available, a 404 will be set into the response. @param request @param response @param pathInfo @throws IOException
[ "private void handleWithDelegate(final HttpServletRequest request, final HttpServletResponse response) throws IOException {\n //Delegate to handler\n boolean foundHandler = REST_HANDLER_CONTAINER.handleRequest(new ServletRESTRequestImpl(request), new ServletRESTResponseImpl(response));\n //REST...
[ "@Route(method= HttpMethod.GET, uri=\"/{id}\")\n public Result get(@Parameter(\"id\") String id) {\n // The value of id is computed from the {id} url fragment.\n return ok(id);\n }" ]
codesearchnet
{ "query": "Represent the Github text about PHP:", "pos": "Represent the Github code about PHP:", "neg": "Represent the Github code about Programming:" }
Get servicegroups list :return: comma separated list of servicegroups :rtype: str
[ "def get_groupnames(self, sgs):\n \n return ','.join([sgs[sg].get_name() for sg in self.servicegroups])" ]
[ "def get(self, name):\n \n # do import here to keep soft dependency\n import requests\n\n # append base url to requested name\n url = urljoin(self.base_url, name)\n # fetch the data from the remote url\n response = requests.get(url)\n # return the bytes of the...
codesearchnet
{ "query": "Represent the Github text about Documentation:", "pos": "Represent the Github code about Documentation:", "neg": "Represent the Github code about Programming:" }
Find and reply the current SRE. @return the current SRE, never {@code null}. @throws IllegalStateException if a SRE cannot be found.
[ "@Pure\n\tpublic static SREBootstrap getBootstrap() {\n\t\tsynchronized (SRE.class) {\n\t\t\tif (currentSRE == null) {\n\t\t\t\tfinal Iterator<SREBootstrap> iterator = getServiceLoader().iterator();\n\t\t\t\tif (iterator.hasNext()) {\n\t\t\t\t\tcurrentSRE = iterator.next();\n\t\t\t\t} else {\n\t\t\t\t\tcurrentSRE =...
[ "private <T> AutoBean<T> checkStreamsNotCrossed(final T object) {\n final AutoBean<T> bean = AutoBeanUtils.getAutoBean(object);\n if (bean == null) {\n // Unexpected; some kind of foreign implementation?\n throw new IllegalArgumentException(object.getClass().getName());\n }\n\n final State oth...
codesearchnet
{ "query": "Represent the Github sentence about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
// Calculates the integral (history) component of the trust value
[ "func (tm *TrustMetric) calcHistoryValue() float64 {\n\tvar hv float64\n\n\tfor i := 0; i < tm.numIntervals; i++ {\n\t\thv += tm.fadedMemoryValue(i) * tm.historyWeights[i]\n\t}\n\n\treturn hv / tm.historyWeightSum\n}" ]
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Get all the payment methods, that are available for the merchant by mPAY24 @return ListPaymentMethodsResponse
[ "public function listPaymentMethods()\n {\n $request = new ListPaymentMethods($this->config->getMerchantId());\n\n $this->request = $request->getXml();\n\n $this->send();\n\n $result = new ListPaymentMethodsResponse($this->response);\n\n return $result;\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 instruction about API documentation:", "pos": "Represent the code about API documentation:", "neg": "Represent the code about Programming:" }
.. versionadded:: 2015.8.0 Get Operation Status, based on a request ID CLI Example: .. code-block:: bash salt-cloud -f get_operation_status my-azure id=0123456789abcdef0123456789abcdef
[ "def get_operation_status(kwargs=None, conn=None, call=None):\n '''\n \n '''\n if call != 'function':\n raise SaltCloudSystemExit(\n 'The show_instance function must be called with -f or --function.'\n )\n\n if kwargs is None:\n kwargs = {}\n\n if 'id' not in kwargs...
[ "def can_access_api(self):\n \n try:\n version_dict = self.get_version()\n except Exception, e:\n msg = 'An exception was raised when connecting to REST API: \"%s\"'\n raise APIException(msg % e)\n else:\n \"\"\"\n This is an example...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Documentation:" }
Expands the lookup table to accommodate more elements. Does this by adding the expansion increment to the current capacity.
[ "@SuppressWarnings(\"unchecked\")\n private void expandTable() {\n int newCapacity = currentCapacity + increment;\n if (newCapacity < currentCapacity) {\n throw new IllegalStateException(\n \"Attempt to expand LookupTable beyond maximum capacity\");\n }\...
[ "def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):\n '''\n '''\n # Note the \"[0] +\" : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluato...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about Natural Language Processing:" }
Create a keystone tenant CLI Examples: .. code-block:: bash salt '*' keystone.tenant_create nova description='nova tenant' salt '*' keystone.tenant_create test enabled=False
[ "def tenant_create(name, description=None, enabled=True, profile=None,\n **connection_args):\n '''\n \n '''\n kstone = auth(profile, **connection_args)\n new = getattr(kstone, _TENANTS, None).create(name, description, enabled)\n return tenant_get(new.id, profile=profile, **connect...
[ "def openstack_undercloud_install(self):\n \n instack_undercloud_ver, _ = self.run('repoquery --whatprovides /usr/share/instack-undercloud/puppet-stack-config/puppet-stack-config.pp')\n if instack_undercloud_ver.rstrip('\\n') == 'instack-undercloud-0:2.2.0-1.el7ost.noarch':\n LOG.war...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// Human, when set to true, returns time and byte-values in human-readable format.
[ "func (s *IndicesSegmentsService) Human(human bool) *IndicesSegmentsService {\n\ts.human = &human\n\treturn s\n}" ]
[ "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 text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about programming:" }
Disconnect @slot from the signal
[ "def disconnect(self, slot, *extra_args):\n \n slot = Slot(slot, *extra_args)\n if slot in self._functions:\n self._functions.remove(slot)\n elif slot in self._after_functions:\n self._after_functions.remove(slot)" ]
[ "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 comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Software development:" }
Needs to be thread-safe
[ "private static Stream<Node> streamAttributes(Node node) {\n final NamedNodeMap attributes = node.getAttributes();\n if (attributes == null) return Stream.empty();\n return IntStream.range(0, attributes.getLength()).mapToObj(attributes::item);\n }" ]
[ "func (rl *resignLeadership) Execute(state State) (*State, error) {\n\t// TODO(fwereade): this hits a lot of interestingly intersecting problems.\n\t//\n\t// 1) we can't yet create a sufficiently dumbed-down hook context for a\n\t// leader-deposed hook to run as specced. (This is the proximate issue,\n\t// an...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
update the state of this Identifiers with the undeclared and declared identifiers of the given node.
[ "def check_declared(self, node):\n \"\"\"\"\"\"\n\n for ident in node.undeclared_identifiers():\n if ident != 'context' and\\\n ident not in self.declared.union(self.locally_declared):\n self.undeclared.add(ident)\n for ident in node.declared_identif...
[ "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 post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
method to parse byte array @param inputStream - stream to get value @param size - size of the value in bytes @return - parsed value as array of bytes @throws IOException - in case of IO error
[ "public static byte[] parseBinary(InputStream inputStream, final int size) throws IOException {\n byte value[] = new byte[size];\n int i = value.length;\n while (i != 0) {\n i -= inputStream.read(value, value.length - i, i);\n }\n\n return value;\n }" ]
[ "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:" }
Adds validation rule to not accept inactive users if such feature is toggled on in module configuration. @param \DevGroup\Users\models\LoginForm $loginForm @return array
[ "protected function inactiveUsers(LoginForm &$loginForm)\n {\n if (UsersModule::module()->allowLoginInactiveAccounts === false) {\n return [];\n }\n return [\n 'username',\n function ($attribute) use (&$loginForm) {\n if ($loginForm->user !== n...
[ "public function upgradeDatabase()\n {\n $this->refreshDatabaseTables([\n 'FailedLoginAttempts',\n 'LoginControlIpRanges',\n ]);\n $this->connection->executeQuery('DROP TABLE IF EXISTS SignupRequests');\n $this->connection->executeQuery('DROP TABLE IF EXISTS User...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
@inheritdoc @param ServiceLocatorInterface $serviceLocator @return ResolverByModuleContextMap @throws \Nnx\EntryNameResolver\Exception\RuntimeException @throws \Zend\ServiceManager\Exception\ServiceNotFoundException
[ "public function createService(ServiceLocatorInterface $serviceLocator)\n {\n $appServiceLocator = $serviceLocator;\n if ($serviceLocator instanceof AbstractPluginManager) {\n $appServiceLocator = $serviceLocator->getServiceLocator();\n }\n\n /** @var ModuleOptionsPluginMan...
[ "protected function registerModelInformationInterfaceBindings()\n {\n $this->app->singleton(RepositoriesContracts\\ModelInformationRepositoryInterface::class, Repositories\\ModelInformationRepository::class);\n $this->app->singleton(ModelInfoContracts\\Collector\\ModelInformationFileReaderInterface...
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// SetStatusDetails sets the StatusDetails field's value.
[ "func (s *Command) SetStatusDetails(v string) *Command {\n\ts.StatusDetails = &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:" }
// GetBuild mocks base method
[ "func (m *MockBuildsClient) GetBuild(ctx context.Context, in *GetBuildRequest, opts ...grpc.CallOption) (*Build, error) {\n\tm.ctrl.T.Helper()\n\tvarargs := []interface{}{ctx, in}\n\tfor _, a := range opts {\n\t\tvarargs = append(varargs, a)\n\t}\n\tret := m.ctrl.Call(m, \"GetBuild\", varargs...)\n\tret0, _ := ret[...
[ "@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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// dockerLogsToFile dumps container logs to file
[ "func dockerLogsToFile(containerid string, numlines int) {\n\t// TODO: need to get logs from api\n\n\tfname := filepath.Join(os.TempDir(), fmt.Sprintf(\"%s.container.log\", containerid))\n\tf, e := os.Create(fname)\n\tif e != nil {\n\t\tplog.WithError(e).WithFields(log.Fields{\n\t\t\t\"file\": fname,\n\t\t}).Debug(...
[ "func NewHTTPCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {\n\tcom, err := cobrafy.Command(http.NewMain())\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tcom.Use = `http`\n\tcom.Short = `listens for and indexes arbitrary JSON data in Pilosa`\n\tcom.Long = `\npdk http listens for and indexes arbitra...
codesearchnet
{ "query": "Represent the Github description:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
// processUnowned either reverse maps or validates the values for an unowned column.
[ "func (ins *Insert) processUnowned(vcursor VCursor, vindexColumnsKeys [][]sqltypes.Value, colVindex *vindexes.ColumnVindex, bv map[string]*querypb.BindVariable, ksids [][]byte) error {\n\tvar reverseIndexes []int\n\tvar reverseKsids [][]byte\n\tvar verifyIndexes []int\n\tvar verifyKeys []sqltypes.Value\n\tvar verif...
[ "@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 instruction about Database management:", "pos": "Represent the code about Database management:", "neg": "Represent the code:" }
Set a field. @param name the name of the field @param list the List value of the field. If null the field is cleared.
[ "public void put(String name,List list)\n {\n if (list==null || list.size()==0)\n {\n remove(name);\n return;\n }\n \n Object v=list.get(0);\n if (v!=null)\n put(name,v.toString());\n else\n remove(name);\n \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 summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
Checks when we the reader can continue to read.
[ "private boolean canContinueReading() throws IOException, InterruptedException {\n //If the reader is not ready, gives it some milliseconds\n //It is important to do that, because the ready method guarantees that the readline will not be blocking\n if (!this.reader.ready()) {\n Threa...
[ "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 sentence:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
[float] 当前最新一天的日收益
[ "def daily_returns(self):\n \n if self._static_unit_net_value == 0:\n return np.nan\n return 0 if self._static_unit_net_value == 0 else self.unit_net_value / self._static_unit_net_value - 1" ]
[ "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 Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about text processing:" }
Returns the Channel object matching the given name. @param string $name @throws Exception @return Channel
[ "public function channelGetByName($name)\n {\n foreach($this->channelList() as $channel)\n {\n if($channel[\"channel_name\"] == $name) return $channel;\n }\n\n throw new Exception(\"invalid channelID\", 0x300);\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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about Software development:" }
Fetches information pertaining to the valiator's status.
[ "async def fetch_status(self, request):\n ''''''\n\n response = await self._query_validator(\n Message.CLIENT_STATUS_GET_REQUEST,\n client_status_pb2.ClientStatusGetResponse,\n client_status_pb2.ClientStatusGetRequest())\n\n return self._wrap_response(\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 post:", "pos": "Represent the code:", "neg": "Represent the code about Software development:" }
Check to see if the all the properties in the model are valid @return true if the model is valid
[ "def valid?\n return false if @status.nil?\n status_validator = EnumAttributeValidator.new('String', ['error'])\n return false unless status_validator.valid?(@status)\n return false if @errors.nil?\n true\n end" ]
[ "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:" }
// Parse an address from fields.
[ "func (addr *Address) Parse(fields []interface{}) error {\n\tif len(fields) < 4 {\n\t\treturn errors.New(\"Address doesn't contain 4 fields\")\n\t}\n\n\tif s, err := ParseString(fields[0]); err == nil {\n\t\taddr.PersonalName, _ = decodeHeader(s)\n\t}\n\tif s, err := ParseString(fields[1]); err == nil {\n\t\taddr.A...
[ "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 post about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Build the request document body.
[ "protected function build()\n {\n $operation = $this->buildOperation('DeleteProfile');\n\n $merchantID = $this->document->createElement(\n 'merchantID',\n $this->merchantId\n );\n $operation->appendChild($merchantID);\n\n $customerId = $this->document->cre...
[ "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 text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Adds the hparams used by get_standardized_layers.
[ "def add_standard_attention_hparams(hparams):\n \"\"\"\"\"\"\n # All hyperparameters ending in \"dropout\" are automatically set to 0.0\n # when not in training mode.\n\n # hparams used and which should have been defined outside (in\n # common_hparams):\n # Global flags\n # hparams.mode\n # hparams.hidden_s...
[ "def optimizer(self) -> Union[mx.optimizer.Optimizer, SockeyeOptimizer]:\n \n # TODO: Push update to MXNet to expose the optimizer (Module should have a get_optimizer method)\n return self.current_module._optimizer" ]
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
// SetPrefix sets the output prefix for the logger.
[ "func (me *Logger) SetPrefix(prefix string) {\n\tme.prefix = prefix\n\tme.logger.SetPrefix(prefix)\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 comment about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code:" }
Fetch the Message attachment @param object $structure @param mixed $partNumber @throws Exceptions\ConnectionFailedException
[ "protected function fetchAttachment($structure, $partNumber) {\n\n $oAttachment = new Attachment($this, $structure, $partNumber);\n\n if ($oAttachment->getName() !== null) {\n if ($oAttachment->getId() !== null) {\n $this->attachments->put($oAttachment->getId(), $oAttachment)...
[ "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 description about PHP programming:", "pos": "Represent the code about PHP programming:", "neg": "Represent the code about Software development:" }
Generates the extended newick string NHX with extra data about a node.
[ "def _get_features_string(self, features=None):\n \n string = \"\"\n if features is None:\n features = []\n elif features == []:\n features = self.features\n\n for pr in features:\n if hasattr(self, pr):\n raw = getattr(self, pr)\n if type(raw) in ITERABLE_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 sentence:", "pos": "Represent the code:", "neg": "Represent the code:" }
Returns True if x is explicitly defined in kwargs
[ "def _has_x(self, kwargs):\n ''''''\n return (('x' in kwargs) or (self._element_x in kwargs) or\n (self._type == 3 and self._element_1mx in kwargs))" ]
[ "def path(self, path):\n \"\"\"\"\"\"\n\n # pylint: disable=attribute-defined-outside-init\n self._path = copy_.copy(path)\n\n # The provided path is shallow copied; it does not have any attributes\n # with mutable types.\n\n # We perform this check after the initialization...
codesearchnet
{ "query": "Represent the instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Get next sibling @return NodeAbstraction @nestedSetMethod
[ "public function getNextSibling()\n\t{\n\t\t$left = $this->getRightValue() + 1;\n\t\t$searchCondition = $this->repository->createSearchCondition()\n\t\t\t\t->leftEqualsTo($left);\n\n\t\t$nextSibling = $this->repository->search($searchCondition);\n\t\tif ( ! isset($nextSibling[0])) {\n\t\t\treturn null;\n\t\t}\n\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 instruction about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
// WaitService waits for all of a service's instances to satisfy a particular // state.
[ "func WaitService(cancel <-chan struct{}, conn client.Connection, poolID, serviceID string, checkCount func(count int) bool, checkState func(s *State, exists bool) bool) error {\n\tbasepth := \"\"\n\tif poolID != \"\" {\n\t\tbasepth = path.Join(\"/pools\", poolID)\n\t}\n\tpth := path.Join(basepth, \"/services\", se...
[ "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 description about Programming:", "pos": "Represent the Github code about Programming:", "neg": "Represent the Github code about programming:" }
// ReferenceStats returns the index statistics for the given reference and true // if the statistics are valid.
[ "func (i *Index) ReferenceStats(id int) (stats index.ReferenceStats, ok bool) {\n\ts := i.refs[id].stats\n\tif s == nil {\n\t\treturn index.ReferenceStats{}, false\n\t}\n\treturn *s, 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 description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Drain all idle connections and close them. Connections that are currently borrowed will not be closed here.
[ "private void discardIdleConnections() {\n List<Connection<CL>> connections = Lists.newArrayList();\n availableConnections.drainTo(connections);\n activeCount.addAndGet(-connections.size());\n\n for (Connection<CL> connection : connections) {\n try {\n closedCon...
[ "@Override\n public void close() throws IOException {\n if (open.compareAndSet(true, false)) {\n onClose.run();\n\n Throwable thrown = null;\n do {\n for (Closeable resource : resources) {\n try {\n resource.close();\n } catch (Throwable e) {\n if (t...
codesearchnet
{ "query": "Represent the Github comment about Computer Networking:", "pos": "Represent the Github code about Computer Networking:", "neg": "Represent the Github code:" }
It builds syncData @param array $input Validated input @return mixed
[ "protected function buildSyncData(array $input)\n {\n $syncData = [];\n foreach ($input['data'] as $item) {\n $syncData[$item['id']] = ['weight' => isset($item['weight']) ? $item['weight'] : 0];\n }\n return $syncData;\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 about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
上传临时素材 @param string $filePath @param string $type @return array @throws Exception
[ "protected function uploadTemp($filePath, $type)\n {\n $url = sprintf(self::MEDIA_TEMP_UPLOAD_URL, $this->getAccessTokenString(), $type);\n $client = $this->getHttpClient();\n $client->setUrl($url);\n $client->setMethod(Client::METHOD_UPLOAD);\n\n $basename = basename($filePath...
[ "public function antiLight(array $req): void\n {\n $this->isConfigDebug ? print('anti light') : null;\n $this->log(configDefault('anti/light', 'log', 'anti', 'light'), $req);\n }" ]
codesearchnet
{ "query": "Represent the comment about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Add another consumer from a :class:`Consumer` instance.
[ "def add_consumer(self, consumer):\n \"\"\"\"\"\"\n consumer.backend = self.backend\n self.consumers.append(consumer)" ]
[ "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 description:", "pos": "Represent the code:", "neg": "Represent the code:" }
获取公众号关联的小程序 @since 2.8.18 @param access_token access_token @return result
[ "public static WxamplinkgetResult wxamplinkget(String access_token){\r\n\t\tHttpUriRequest httpUriRequest = RequestBuilder.post()\r\n\t\t\t\t.setHeader(jsonHeader)\r\n\t\t\t\t.setUri(BASE_URI+\"/cgi-bin/wxopen/wxamplinkget\")\r\n\t\t\t\t.addParameter(PARAM_ACCESS_TOKEN, API.accessToken(access_token))\r\n\t\t\t\t.bu...
[ "function hot(backendTplServer) {\n backendTplServer.app.get('/news/hot', function(request, response) {\n var data = Mock.mock({\n 'news|0-10': [news]\n });\n\n // 如果对象中有方法的定义, 最好不要放在 Mock.mock 中, 因为他会将方法定义变成直接的属性值(方法的返回值)\n data.__helper = __helper;\n\n response.ren...
codesearchnet
{ "query": "Represent the summarization about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Parse nested child input paths @param {Build} build
[ "function parseChildInputpaths(build) {\n function parse(build) {\n let inputpaths = [];\n\n build.forEach(build => {\n inputpaths = inputpaths.concat(build.inputpaths, build.builds ? parse(build.builds) : []);\n });\n\n return inputpaths;\n }\n\n build.childInputpaths = parse(build.builds);\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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Resolves definition decorator arguments. @param ContainerBuilder $container The ContainerBuilder @param array $arguments An array of arguments @param bool $isRoot If we are processing the root definitions or not @return array
[ "private function resolveArguments(ContainerBuilder $container, array $arguments, $isRoot = false)\n {\n foreach ($arguments as $k => $argument) {\n if ($isRoot) {\n // yes, we are specifically fetching the definition from the\n // container to ensure we are not op...
[ "public function initializeArguments()\n {\n $this->registerArgument('path', 'string', 'Location of the resource, can be either a path relative to the Public resource directory of the package or a resource://... URI', false, null);\n $this->registerArgument('package', 'string', 'Target package key....
codesearchnet
{ "query": "Represent the sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Returns the content bean (values) of the current dialog.<p> @return the content bean (values) of the current dialog
[ "public CmsPostUploadDialogPanelBean getUpdatedValues() {\r\n\r\n CmsPostUploadDialogPanelBean bean = new CmsPostUploadDialogPanelBean(\r\n m_values.getStructureId(),\r\n m_values.getInfoBean());\r\n\r\n if (!m_values.equals(bean)) {\r\n m_values = bean;\r\n }\r...
[ "function WidgetDef(config, endFunc, out) {\n this.type = config.type; // The widget module type name that is passed to the factory\n this.id = config.id; // The unique ID of the widget\n this.config = config.config; // Widget config object (may be null)\n this.state = config.state; // Widget state obje...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
// SetAutomatedUpdateDate sets the AutomatedUpdateDate field's value.
[ "func (s *ServiceSoftwareOptions) SetAutomatedUpdateDate(v time.Time) *ServiceSoftwareOptions {\n\ts.AutomatedUpdateDate = &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 comment about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Execute a single :class:`Poller` wait, dispatching any IO events that caused the wait to complete. :param float timeout: If not :data:`None`, maximum time in seconds to wait for events.
[ "def _loop_once(self, timeout=None):\n \n _vv and IOLOG.debug('%r._loop_once(%r, %r)',\n self, timeout, self.poller)\n #IOLOG.debug('readers =\\n%s', pformat(self.poller.readers))\n #IOLOG.debug('writers =\\n%s', pformat(self.poller.writers))\n for side,...
[ "def decorate_callable(self, callable_):\n \"\"\"\"\"\"\n @wraps(callable_)\n def decorated(*args, **kwargs):\n # Extract timeout from request itself or use default for ioloop wrapper\n timeout = kwargs.get('timeout')\n return self.call_in_ioloop(callable_, args...
codesearchnet
{ "query": "Represent the sentence about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
// CountLoginSources returns total number of login sources.
[ "func CountLoginSources() int64 {\n\tcount, _ := x.Count(new(LoginSource))\n\treturn count + int64(localLoginSources.Len())\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 instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
// SetPassword sets the Password field's value.
[ "func (s *CreateUserRequest) SetPassword(v string) *CreateUserRequest {\n\ts.Password = &v\n\treturn s\n}" ]
[ "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 programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
// SetStorageClass sets the StorageClass field's value.
[ "func (s *Location) SetStorageClass(v string) *Location {\n\ts.StorageClass = &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 text about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code:" }
Returns true if the class is assignable from the argument.
[ "public boolean isAssignableFrom(Class cl)\n {\n if (getName().equals(cl.getName()))\n return true;\n\n Class []ifc = cl.getInterfaces();\n\n for (int i = 0; i < ifc.length; i++) {\n if (isAssignableFrom(ifc[i]))\n return true;\n }\n\n if (cl.getSuperclass() != null)\n return i...
[ "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 instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
This function finds rings and uses aromaticity detection code to aromatize the molecule. @param mol input molecule
[ "public static void aromatizeMolecule(IAtomContainer mol) {\n\n // need to find rings and aromaticity again since added H's\n\n IRingSet ringSet = null;\n try {\n AllRingsFinder arf = new AllRingsFinder();\n ringSet = arf.findAllRings(mol);\n\n // SSSRFinder s =...
[ "def path_from_structure(cls, ndivsm, structure):\n \"\"\"\"\"\"\n return cls._path(ndivsm, structure=structure, comment=\"K-path generated automatically from structure\")" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Programming:" }
// ControllerInstances is specified in the Environ interface.
[ "func (e *manualEnviron) ControllerInstances(ctx context.ProviderCallContext, controllerUUID string) ([]instance.Id, error) {\n\tif !isRunningController() {\n\t\t// Not running inside the controller, so we must\n\t\t// verify the host.\n\t\tif err := e.verifyBootstrapHost(); err != nil {\n\t\t\treturn nil, err\n\t\...
[ "@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 post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
{@inheritdoc} @throws ComponentNotFound If an unsupported element type is given.
[ "public function create($model, string $column): Component\n {\n if (!isset($this->panelElementTypes[$model->type])) {\n throw ComponentNotFound::forModel($model);\n }\n\n $className = $this->panelElementTypes[$model->type];\n\n return new $className(\n $model,\n...
[ "@SuppressWarnings(\"unused\")\n @Internal\n protected final void warnMissingProperty(Class type, String method, String property) {\n if (LOG.isWarnEnabled()) {\n LOG.warn(\"Configuration property [{}] could not be set as the underlying method [{}] does not exist on builder [{}]. This usuall...
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:" }
// interface Seqable members
[ "func (v *PVector) Seq() iseq.Seq {\n\tif cs := v.chunkedSeq(); cs != nil {\n\t\t// avoid the dreaded nil interface problem\n\t\treturn cs\n\t}\n\treturn nil\n}" ]
[ "def property_(getter: Map[Domain, Range]) -> property:\n \n return property(map_(WeakKeyDictionary())(getter))" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
return the content of the XML document as a byte string suitable for writing
[ "def tobytes(\r\n self,\r\n root=None,\r\n encoding='UTF-8',\r\n doctype=None,\r\n canonicalized=True,\r\n xml_declaration=True,\r\n pretty_print=True,\r\n with_comments=True,\r\n ):\r\n \"\"\"\"\"\"\r\n if root is None:\r\n root = ...
[ "def GetDictToFormat(self):\n \"\"\"\"\"\"\n d = {}\n for k, v in self.__dict__.items():\n # TODO: Better handling of unicode/utf-8 within Schedule objects.\n # Concatinating a unicode and utf-8 str object causes an exception such\n # as \"UnicodeDecodeError: 'ascii' codec can't decode byte ...
codesearchnet
{ "query": "Represent the post:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Deletes a saved a dashboard record
[ "protected function deleteDashboard()\n {\n $this->controlAccess('dashboard_edit');\n\n if ($this->dashboard->delete($this->data_dashboard['dashboard_id'])) {\n $message = $this->text('Your dashboard has been reset');\n $this->redirect('', $message, 'success');\n }\n\n ...
[ "protected function addSynchronizationInformation()\n {\n $this->html->pInfo($this->_(\n 'Check source for new surveys, changes in survey status and survey deletion. Can also perform maintenance on some sources, e.g. by changing the number of attributes.'\n ));\n $this...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code about Data synchronization:" }
Works like removeChild, but don't update oldNode references. @param {basis.dom.wrapper.AbstractNode} oldNode
[ "function(oldNode){\n var nodes = this.nodes;\n if (arrayRemove(nodes, oldNode))\n {\n this.first = nodes[0] || null;\n this.last = nodes[nodes.length - 1] || null;\n oldNode.groupNode = null;\n\n this.emit_childNodesModified({ deleted: [oldNode] });\n }\n\n if (...
[ "function onPatchesDerive() {\n\t\tvar patches = this.patches;\n\t\tthis.patches = [];\n\t\tqueues.enqueueByQueue(this.handlers.getNode([]), this.currentList, [patches, this.currentList], null,[\"Apply patches\", patches]);\n\t}" ]
codesearchnet
{ "query": "Represent the instruction about Software Development:", "pos": "Represent the code about Software Development:", "neg": "Represent the code about software development:" }
Add the order to query builder according to the configuration. @param ORMFilterEvent $event
[ "public function addOrder(ORMFilterEvent $event)\n {\n $queryBuilder = $event->getQueryBuilder();\n $admin = $event->getAdmin();\n $actionConfiguration = $admin->getAction()->getConfiguration();\n\n $request = $this->requestStack->getMasterRequest();\n $sort = $request->get('so...
[ "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 Github summarization about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code:" }
:rtype: dict[int, list of ProtocolTreeItem]
[ "def protocol_tree_items(self):\n \n result = {}\n for i, group in enumerate(self.rootItem.children):\n result[i] = [child for child in group.children]\n\n return result" ]
[ "def property_(getter: Map[Domain, Range]) -> property:\n \n return property(map_(WeakKeyDictionary())(getter))" ]
codesearchnet
{ "query": "Represent the Github instruction about AWS Route 53:", "pos": "Represent the Github code about AWS Route 53:", "neg": "Represent the Github code:" }
Method: cancelHover Callback from the handlers.hover set up when <hover> selection is on
[ "function() {\n if (this.hoverResponse) {\n this.protocol.abort(this.hoverResponse);\n this.hoverResponse = null;\n\n OpenLayers.Element.removeClass(this.map.viewPortDiv, \"olCursorWait\");\n }\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 description:", "pos": "Represent the code:", "neg": "Represent the code:" }
Delete folder. @param Request $request @return ResultResponse @Route("/delete", name="mediamanager_folder_delete")
[ "public function deleteAction(Request $request)\n {\n $volumeId = $request->get('site_id');\n $folderId = $request->get('folder_id');\n\n $volume = $this->getVolume($volumeId);\n $folder = $volume->findFolder($folderId);\n\n if ($folder->isRoot()) {\n return new Resu...
[ "public function make(ICategory $category)\r\n {\r\n //$category->setResponse($this->response->view('admin.categorys.view', compact('category')));\r\n $category->setResponse($this->response->view(\\OogleeBConfig::get('config.category_view.view'), compact('category')));\r\n }" ]
codesearchnet
{ "query": "Represent the text about Metadata management:", "pos": "Represent the code about Metadata management:", "neg": "Represent the code about Computer Science:" }
!@attribute [r] vertices @return [Array]
[ "def vertices\n\t (0...2*Math::PI).step(2*Math::PI/edge_count).map {|angle| center + Point[Math::cos(angle), Math::sin(angle)]*radius }\n\tend" ]
[ "final static function sn(M $m) {return dfcf(function(M $m) {return df_new(\n\t\tdf_con_heir($m, __CLASS__), $m\n\t);}, [$m]);}" ]
codesearchnet
{ "query": "Represent the Github post about Software development:", "pos": "Represent the Github code about Software development:", "neg": "Represent the Github code about programming:" }
----------------------------------------
[ "private function _getUrl()\n {\n return new Url(sprintf(\n '%s://%s:%d%s',\n $this->_getScheme(),\n $this->_server['SERVER_NAME'],\n $this->_getPort(),\n $this->_uriRelativeToHost($this->_server['REQUEST_URI'])\n ));\n }" ]
[ "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 instruction about language and writing:", "pos": "Represent the code about language and writing:", "neg": "Represent the code:" }
Append an integer as a four byte number.
[ "public void appendInt(int x) {\n elems = ArrayUtils.ensureCapacity(elems, length + 3);\n elems[length ] = (byte)((x >> 24) & 0xFF);\n elems[length+1] = (byte)((x >> 16) & 0xFF);\n elems[length+2] = (byte)((x >> 8) & 0xFF);\n elems[length+3] = (byte)((x ) & 0xFF);\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 description about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
process an HTML get or post. @exception ServletException From inherited class. @exception IOException From inherited class.
[ "@Override\n public void service(HttpServletRequest req, HttpServletResponse res) \n throws ServletException, IOException\n {\n \tString sourceFileName = req.getParameter(\"source\");\n \tString styleSheetFileName = req.getParameter(\"stylesheet\");\n \tFileReader sourceFileReader = new FileRe...
[ "public void reinitialize( HttpServletRequest request, HttpServletResponse response, ServletContext servletContext )\n {\n //\n // Cache the associated ModuleConfig. This is used throughout the code, in places where the request\n // isn't available to do a lazy initialization.\n //\n...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
@param ServerRequestInterface $request @param Tree $tree @return ResponseInterface
[ "public function select2Submitter(ServerRequestInterface $request, Tree $tree): ResponseInterface\n {\n $page = (int) $request->get('page');\n $query = $request->get('q', '');\n\n // Fetch one more row than we need, so we can know if more rows exist.\n $offset = $page * self::RESULTS...
[ "public static function bindToObject(TelegramResponse $data, LoggerInterface $logger): TelegramTypes\n {\n return new File($data->getResult(), $logger);\n }" ]
codesearchnet
{ "query": "Represent the description about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
// newDNSController creates a controller for CoreDNS.
[ "func newdnsController(kubeClient kubernetes.Interface, opts dnsControlOpts) *dnsControl {\n\tdns := dnsControl{\n\t\tclient: kubeClient,\n\t\tselector: opts.selector,\n\t\tnamespaceSelector: opts.namespaceSelector,\n\t\tstopCh: make(chan struct{}),\n\t\tzones: opts.zones,...
[ "@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 post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Depreciated. Use svd.
[ "def SVD(stream_list, full=False):\n \n warnings.warn('Depreciated, use svd instead.')\n return svd(stream_list=stream_list, full=full)" ]
[ "def :\n \"\"\"\"\"\"\n CheckParent(self)\n\n return _fitz.Annot_" ]
codesearchnet
{ "query": "Represent the Github post:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Parse a raw dictionary to create a resource. :type raw: Dict[str, Any]
[ "def _parse_raw(self, raw):\n \n self.raw = raw\n if not raw:\n raise NotImplementedError(\"We cannot instantiate empty resources: %s\" % raw)\n dict2resource(raw, self, self._options, self._session)" ]
[ "def _parse_singlefile(self, desired_type: Type[T], file_path: str, encoding: str, logger: Logger,\n options: Dict[str, Dict[str, Any]]) -> T:\n \n raise Exception('Not implemented since this is a MultiFileParser')" ]
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Software development:" }
Patches a property in `object`. @param object $object - the entity to update @param string $property - the property to update @param mixed $data - the data that must be set @param array $options - an array of options
[ "public function replace($object, $property, $data, array $options = [])\n {\n $methodName = 'set'.ucfirst($property);\n\n if (!method_exists($object, $methodName)) {\n throw new \\LogicException(\n sprintf('You have requested a non implemented action \\'set\\' on %s (look...
[ "function DefaultChangeRequestInterceptor(saveContext, saveBundle) {\n /**\n Prepare and return the save data for an entity change-set.\n\n The adapter calls this method for each entity in the change-set,\n after it has prepared a \"change request\" for that object.\n\n The method can do anything...
codesearchnet
{ "query": "Represent the instruction about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
// Prekey and signed prekey store
[ "func (s *store) preKeysFilePath(id uint32) string {\n\treturn filepath.Join(s.preKeysDir, idToFilename(id))\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 Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
The list of ancestors is very long. Trim it down to just the length of the class we are looking for. Takes an optional block method to transform the result with a map operation
[ "def ancestors_until(until_class)\n # trim down the list\n ancestors_list = all_ancestors[0..all_ancestors.index(until_class)]\n\n # map to the fully qualified class name\n ancestors_list.map { |klass| yield(klass) }\n end" ]
[ "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 about Computer Science:", "pos": "Represent the code about Computer Science:", "neg": "Represent the code:" }
将文件中配置信息填充到properties对象中(用指定的ClassLoader) @param fileName @param cl @return Properties对象 @author liuzeyin
[ "public static Properties fillProperties(String fileName, ClassLoader cl) {\n\n if (!fileName.endsWith(\".properties\")) {\n fileName = fileName + \".properties\";\n }\n\n Properties properties = new Properties();\n\n if (filePropMapping.containsKey(fileName)) {\n p...
[ "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 Github sentence:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
@Override {@inheritdoc}
[ "function getHeader($header)\n {\n if (! $this->hasHeader($header)) {\n if (strtolower($header) === 'host'\n && ($this->uri && $this->uri->getHost())\n )\n return array($this->_getHostFromUri());\n\n return array();\n }\n\n $head...
[ "@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 sentence about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code:" }
Start the threaded retrieval of items. Populates the ``items`` list with :class:`Item <boto.sdb.item.Item>` objects.
[ "def run(self):\n \n for item_name in self.item_names:\n item = self.conn.get_attributes(self.domain_name, item_name)\n self.items.append(item)" ]
[ "def requests(self):\n ''''''\n path = pathjoin(self.path, self.name, Request.path)\n response = self.service.send(SRequest('GET', path))\n # a bin behaves as a push-down store --- better to return the requests\n # in order of appearance\n return list(reversed(Request.from_...
codesearchnet
{ "query": "Represent the Github instruction:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
update xy limits of a plot, as used with .update_line()
[ "def set_viewlimits(self, panel='top'):\n \n this_panel = self.get_panel(panel)\n\n xmin, xmax, ymin, ymax = this_panel.conf.set_viewlimits()[0]\n # print(\"Set ViewLimits \", xmin, xmax, ymin, ymax)\n # make top/bottom panel follow xlimits\n if this_panel == self.panel:\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 post:", "pos": "Represent the code:", "neg": "Represent the code:" }
Reusable copier, always overwrites
[ "function copy(source, destination, callback) {\n cp(source, destination, {overwrite: true}, function done(err) {\n if (err) callback(err)\n else callback()\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 description:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Convenience method for requesting to google with proper cookies/params.
[ "def post(self, url, postParameters=None, urlParameters=None):\n \n if self.authorized_client:\n if urlParameters:\n getString = self.getParameters(urlParameters)\n req = urllib2.Request(url + \"?\" + getString)\n else:\n req = urllib2...
[ "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:" }
Get the Geometry Columns, should only return one or no value @return geometry columns
[ "public GeometryColumns getGeometryColumns() {\n\t\tGeometryColumns result = null;\n\t\tif (geometryColumns.size() > 1) {\n\t\t\t// This shouldn't happen with the unique table name constraint on\n\t\t\t// geometry columns\n\t\t\tthrow new GeoPackageException(\n\t\t\t\t\t\"Unexpected state. More than one GeometryCol...
[ "def check_arrange_act_spacing(self) -> typing.Generator[AAAError, None, None]:\n \n yield from self.check_block_spacing(\n LineType.arrange,\n LineType.act,\n 'AAA03 expected 1 blank line before Act block, found {}',\n )" ]
codesearchnet
{ "query": "Represent the comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code:" }
Creates a POLYLINEM shape. Lines is a collection of lines, each made up of a list of xym values. If the m (measure) value is not included, it defaults to None (NoData).
[ "def linem(self, lines):\r\n \"\"\"\"\"\"\r\n shapeType = POLYLINEM\r\n self._shapeparts(parts=lines, shapeType=shapeType)" ]
[ "def _validate_simple_fault_geometry(self, node, _float_re):\n \n try:\n # Parse the geometry\n coords = split_coords_2d(~node.LineString.posList)\n trace = geo.Line([geo.Point(*p) for p in coords])\n except ValueError:\n # If the geometry cannot be c...
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
Do recursive validity checking
[ "def recursive_valid?(target, context, state)\n valid = state\n target.each do |key, prop|\n if prop.is_a?(Array)\n prop.each do |item|\n if item.validatable?\n valid = recursive_valid?(item, context, valid) && valid\n end\n end\n elsif pr...
[ "def rs_calc_syndromes(msg, nsym, fcr=0, generator=2):\n '''\n '''\n # Note the \"[0] +\" : we add a 0 coefficient for the lowest degree (the constant). This effectively shifts the syndrome, and will shift every computations depending on the syndromes (such as the errors locator polynomial, errors evaluato...
codesearchnet
{ "query": "Represent the Github description about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Natural Language Processing:" }
This method saves the XML version of this plugin in DB, for this pageId Automatically called from savePageSession listenner in PageEdition
[ "public function savePluginConfigToXml($parameters)\n {\n $xmlValueFormatted = '';\n\n // Something has been saved, let's generate an XML for DB\n $xmlValueFormatted = \"\\t\" . '<' . $this->pluginXmlDbKey . ' id=\"' . $parameters['melisPluginId'] . '\">' .\n $xmlValueFormatted .\...
[ "@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 summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code about programming:" }
Gets the list of all branches, for all projects, which are properly configured for SVN.
[ "protected Stream<Branch> getSVNConfiguredBranches() {\n return structureService.getProjectList()\n .stream()\n // ...which have a SVN configuration\n .filter(project -> propertyService.hasProperty(project, SVNProjectConfigurationPropertyType.class))\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:" }
Determine whether the form element with the given name has any validation errors @param string $name @return bool
[ "private function hasErrors($name)\n {\n if (is_null($this->session) || !$this->session->has('errors')) {\n return false;\n }\n // Get errors session\n $errors = $this->getErrorsSession();\n\n return $errors->has($this->transformKey($name));\n }" ]
[ "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 post about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about programming:" }
Sets an uncaught exception handler. This will make the process exit with exit code 1 if a thread exits due to an uncaught exception.
[ "public static void makeProcessExitOnUncaughtException(final Log log) {\n Thread.setDefaultUncaughtExceptionHandler(\n new Thread.UncaughtExceptionHandler() {\n @Override\n public void uncaughtException(Thread t, Throwable e) {\n log.error(\"UNCAUGHT: Thread \" + t.getName() +\n ...
[ "function startDeamon () {\n // ps aux | grep yourscript\n // kill -s SIGINT [process_id]\n process.stdin.resume()\n process.on('SIGINT', function (err) {\n // An easy way to send the SIGINT signal is with Control-C in most terminal programs.\n // Note:\n // SIGUSR1 is reserved by node.js to start th...
codesearchnet
{ "query": "Represent the Github comment:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }
rubocop:disable Metrics/MethodLength, Metrics/AbcSize
[ "def parse(args)\n args = build_opts(args)\n\n OptionParser.new do |opts|\n opts.banner = 'Usage: undercover [options]'\n\n opts.on_tail('-h', '--help', 'Prints this help') do\n puts(opts)\n exit\n end\n\n opts.on_tail('--version', 'Show version') do\n ...
[ "def plugins():\n \n return (\n ClassFactoring,\n ConstantLogic,\n ExceptStatements,\n FutureCompatibility,\n ImportOrder,\n Indentation,\n MissingContextManager,\n NewStyleClasses,\n Newlines,\n PrintStatements,\n TrailingWhitespace,\n PEP8VariableNames,\n PyflakesChecker,\...
codesearchnet
{ "query": "Represent the summarization:", "pos": "Represent the code:", "neg": "Represent the code:" }
Adapter::increment Increment a raw value offset. @param string $key Cache item key. @param int $step Increment step to add. @return mixed Returns the incremented value on success and FALSE on failure.
[ "public function increment($key, $step = 1)\r\n {\r\n $success = false;\r\n\r\n return wincache_ucache_inc($this->prefixKey . $key, $step, $success);\r\n }" ]
[ "public static function insert(array $data)\n {\n $self = static::getInstance();\n\n $data = static::filterColumns($data);\n\n if (!\\count($data)) {\n throw new DbException(\n \"Invalid field names of table `{$self->name}`. Please check use of `insert()` method\"\n...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code about Programming:" }
// generatePrefix creates the key prefix for the given priority level.
[ "func (pq *PriorityQueue) generatePrefix(level uint8) []byte {\n\t// priority + prefixSep = 1 + 1 = 2\n\tprefix := make([]byte, 2)\n\tprefix[0] = byte(level)\n\tprefix[1] = prefixSep[0]\n\treturn prefix\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 sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Get the recipients of the given message. @param mixed $notifiable @param \Illuminate\Notifications\Notification $notification @param \Illuminate\Notifications\Messages\MailMessage $message @return mixed
[ "protected function getRecipients($notifiable, $notification, $message)\n {\n if (is_string($recipients = $notifiable->routeNotificationFor('mail', $notification))) {\n $recipients = [$recipients];\n }\n\n return collect($recipients)->mapWithKeys(function ($recipient, $email) {\n ...
[ "public function register()\n {\n $this->app->singleton('Collective\\Bus\\Dispatcher', function ($app) {\n return new Dispatcher($app, function () use ($app) {\n return $app['Illuminate\\Contracts\\Queue\\Queue'];\n });\n });\n\n $this->app->alias(\n ...
codesearchnet
{ "query": "Represent the summarization about Programming:", "pos": "Represent the code about Programming:", "neg": "Represent the code about Software development:" }
Emulate setting filepath in a file input. @param string $path file path
[ "public function setFile($path)\n {\n $this->con->executeStep(\n sprintf('_sahi._setFile(%s, %s)', $this->getAccessor(), json_encode($path))\n );\n }" ]
[ "def execPath(self):\n \"\"\"\"\"\"\n vers = self.version.label if self.version else None # executables in Versions folder are stored by baseVersion (modified by game data patches)\n return self.installedApp.exec_path(vers)" ]
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code:" }
Check manifest param on callable. @param string $name @param string $plugin @param mixed $callback @return bool
[ "protected static function _isCallablePluginData($name, $plugin, $callback)\n {\n if (Arr::in($name, self::$_manifestEvents) &&\n !isset(self::$_eventList[$name][$plugin]) &&\n is_callable($callback)\n ) {\n return true;\n }\n\n return false;\n }" ]
[ "public function onSniff(GenericEvent $event)\n {\n $context = $event->getArguments();\n\n $this->logger->debug('Visiting SNIFF, process {method} {sniff}', $context);\n }" ]
codesearchnet
{ "query": "Represent the text about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Does the POST Request @param id specifies the entity on which to perform the post request @return a String containing the response content @throws SDKException if the request fails
[ "public String requestPost(final String id) throws SDKException {\n CloseableHttpResponse response = null;\n HttpPost httpPost = null;\n checkToken();\n\n try {\n log.debug(\"pathUrl: \" + pathUrl);\n log.debug(\"id: \" + pathUrl + \"/\" + id);\n\n // call the api here\n log.debug(\"...
[ "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 comment about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about programming:" }
Returns true if both expressions are in the specified schema. @see Expression#isApplicableTo(Schema)
[ "@Override\r\n\tpublic boolean isApplicableTo(Schema sch) {\r\n\t\treturn lhs.isApplicableTo(sch) && rhs.isApplicableTo(sch);\r\n\t}" ]
[ "@Override\n public AccessPlan fromView(XsStringVal schema, XsStringVal view) {\n return new AccessPlanSubImpl(this, \"op\", \"from-view\", new Object[]{ schema, view });\n }" ]
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
Gets the serialized data file size of the Trie. This is used during trie data reading for size checking purposes. @return size size of serialized trie data file in terms of the number of bytes
[ "public int getSerializedDataSize()\n {\n // includes signature, option, dataoffset and datalength output\n int result = (4 << 2);\n result += (m_dataOffset_ << 1);\n if (isCharTrie()) {\n result += (m_dataLength_ << 1);\n }\n else if (isIntTrie()) {\n ...
[ "@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 description:", "pos": "Represent the code:", "neg": "Represent the code about Programming:" }
// Get the logger for a firewall
[ "func (fw *FirewallSSO) logger(ctx context.Context) log15.Logger {\n\tctx = log.AddToLogContext(ctx, \"firewall-id\", fw.PfconfigHashNS)\n\treturn log.LoggerWContext(ctx)\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 description about programming:", "pos": "Represent the code about programming:", "neg": "Represent the code about programming:" }
Detect filenames in upload parameters @param mixed $input The data or file name to parse @return null|string
[ "protected function _buildBinaryBody($input)\n {\n if (// is it a file, a readable one?\n @file_exists($input)\n && @is_readable($input)\n ) {\n // try to read the file\n $data = @file_get_contents($input);\n if ($data !== false && strlen($data) !== 0) {\n return $data;\n ...
[ "public function reduceFilePath($varValue, \\DataContainer $dc)\n {\n $doc = $dc->activeRecord;\n\n $path = \\FilesModel::findByUuid($varValue)->path;\n\n $arrFileNameParts = \\Document::splitFileName(substr($path, strlen(\\DmsConfig::getBaseDirectory(true))));\n\n // TODO (#33): reset the new fileType...
codesearchnet
{ "query": "Represent the post about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Partial flush action, flushes Magento URLs matching "pattern" in POST data @return null
[ "public function flushPartialAction() {\n $postData = $this->getRequest()->getPost();\n if ( ! isset($postData['pattern'])) {\n $this->_getSession()->addError($this->__('Missing URL post data'));\n } else {\n $pattern = $postData['pattern'];\n Mage::dispatchEven...
[ "def requests(self):\n ''''''\n path = pathjoin(self.path, self.name, Request.path)\n response = self.service.send(SRequest('GET', path))\n # a bin behaves as a push-down store --- better to return the requests\n # in order of appearance\n return list(reversed(Request.from_...
codesearchnet
{ "query": "Represent the text:", "pos": "Represent the code:", "neg": "Represent the code:" }
// Apply use the V2 API to create/update the application settings and // eventually uploads the application bits. // // If multiple buildpacks are being applied to the application, the V3 API is // used to set those buildpacks.
[ "func (actor Actor) Apply(config ApplicationConfig, progressBar ProgressBar) (<-chan ApplicationConfig, <-chan Event, <-chan Warnings, <-chan error) {\n\tconfigStream := make(chan ApplicationConfig)\n\teventStream := make(chan Event)\n\twarningsStream := make(chan Warnings)\n\terrorStream := make(chan error)\n\n\tg...
[ "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 summarization about Software development:", "pos": "Represent the code about Software development:", "neg": "Represent the code about Software development:" }
Returns the next <code>Node</code> in the result set. @return the next <code>Node</code> in the result set. @throws NoSuchElementException if iteration has no more <code>Node</code>s.
[ "public Node nextNode() throws NoSuchElementException\n {\n initialize();\n if (next == null)\n {\n throw new NoSuchElementException();\n }\n NodeImpl n = next;\n fetchNext();\n return n;\n }" ]
[ "protected void createGenModelAnnotations()\n\t{\n\t\tString source = \"http://www.eclipse.org/emf/2002/GenModel\";\t\n\t\taddAnnotation\n\t\t (jvmIdentifiableElementEClass.getEOperations().get(0), \n\t\t source, \n\t\t new String[] \n\t\t {\n\t\t\t \"documentation\", \"<p>The identifier of a JvmIdentifiable...
codesearchnet
{ "query": "Represent the Github sentence about programming:", "pos": "Represent the Github code about programming:", "neg": "Represent the Github code about Text generation:" }
Handle callback related to image scaling.
[ "def scale_cb(self, setting, value):\n \"\"\"\"\"\"\n zoomlevel = self.zoom.calc_level(value)\n self.t_.set(zoomlevel=zoomlevel)\n\n self.redraw(whence=0)" ]
[ "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 instruction:", "pos": "Represent the code:", "neg": "Represent the code about programming:" }
Check that the python interpreter has 'pythonw'.
[ "def is_pythonw(filename):\r\n \"\"\"\"\"\"\r\n pattern = r'.*python(\\d\\.?\\d*)?w(.exe)?$'\r\n if re.match(pattern, filename, flags=re.I) is None:\r\n return False\r\n else:\r\n return True" ]
[ "def dir_cmd(argv):\n \"\"\"\"\"\"\n env = parse_envname(argv, lambda : sys.exit('You must provide a valid virtualenv to target'))\n print(workon_home / env)" ]
codesearchnet
{ "query": "Represent the Github summarization:", "pos": "Represent the Github code:", "neg": "Represent the Github code:" }