query
stringlengths
10
2k
document
stringlengths
20
51.2k
metadata
dict
negatives
listlengths
0
101
negative_scores
listlengths
0
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Creates a fully connected nn layer. The layer is initialized with random numbers from normal distribution.
def fc_layer(input, size_in, size_out): w = tf.Variable(tf.truncated_normal([size_in, size_out], stddev=0.1)) # var name needed later for variable filtering b = tf.Variable(tf.truncated_normal([size_out], stddev=0.1), name='bias') return tf.nn.relu(tf.matmul(input, w) + b)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_fully_connected(in_features: int, out_features: int, width: int = 16, depth: int = 4) -> hessQuik.networks.NN:\n f = net.fullyConnectedNN([in_features] + depth * [width] + [out_features], act=act.tanhActivation())\n return f", "def layer_fully_connected(x_tensor, num_outputs):\n weights = tf.V...
[ "0.65838283", "0.64536804", "0.6241156", "0.6200363", "0.6200363", "0.6200363", "0.6164746", "0.6160886", "0.613335", "0.61173534", "0.6109451", "0.6079118", "0.6062221", "0.60093826", "0.60090894", "0.5995305", "0.5961215", "0.5957275", "0.59463173", "0.59338635", "0.5900377...
0.0
-1
Assert that two lists of L{Project}s are equal.
def assertProjectsEqual(self, observedProjects, expectedProjects): self.assertEqual(len(observedProjects), len(expectedProjects)) observedProjects = sorted(observedProjects, key=operator.attrgetter('directory')) expectedProjects = sorted(expectedProjects, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def assertProjectsEqual(self, observedProjects, expectedProjects):\n self.assertEqual(len(observedProjects), len(expectedProjects))\n observedProjects = sorted(\n observedProjects, key=operator.attrgetter(\"directory\")\n )\n expectedProjects = sorted(\n expectedPr...
[ "0.7359227", "0.73328876", "0.6994209", "0.696267", "0.69351625", "0.65774673", "0.65192145", "0.65192145", "0.6508537", "0.6452453", "0.6420661", "0.6392122", "0.63602877", "0.6321427", "0.6298714", "0.6287265", "0.62575305", "0.62445533", "0.6238674", "0.62175125", "0.61552...
0.73238105
2
L{NewsBuilder._today} returns today's date in YYYYMMDD form.
def test_today(self): self.assertEquals( self.builder._today(), date.today().strftime('%Y-%m-%d'))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_date_today() -> str:\n return datetime.now().strftime(\"%Y-%m-%d\")", "def _today() -> datetime.date:\n return datetime.today().date()", "def get_today_date():\n return date.today()", "def today(self):\n return(datetime.date.today().isoformat())", "def formalDateToday():\n re...
[ "0.8440958", "0.82832986", "0.8239", "0.81939584", "0.81907797", "0.8088009", "0.7958119", "0.79346824", "0.7927932", "0.7870749", "0.7866216", "0.7842673", "0.77180356", "0.7711714", "0.77079123", "0.76718366", "0.7618882", "0.7522119", "0.7519648", "0.7518403", "0.74870956"...
0.7404429
21
L{NewsBuilder._changeVersions} gets the release date for a given version of a project as a string.
def test_changeVersionInNews(self): builder = NewsBuilder() builder._today = lambda: '2009-12-01' project = self.createFakeTwistedProject() builder.buildAll(project) newVersion = Version('TEMPLATE', 7, 7, 14) coreNews = project.child('topfiles').child('NEWS') # tw...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_version(version=VERSION, date=DATE):\n return \"JoMRS v{} Modular Rigging System | last update {}\".format(\n \".\".join([i for i in version]), \"/\".join([x for x in date])\n )", "def format_release_version(version, build_id_to_inject):\n subs = version.split(\".\")\n subs[-1] = build...
[ "0.65968317", "0.64388627", "0.63052136", "0.61849445", "0.6169329", "0.6135379", "0.60916495", "0.6046848", "0.6036391", "0.6031029", "0.5974384", "0.59587777", "0.595306", "0.58617705", "0.5846427", "0.5839148", "0.5838535", "0.58280134", "0.58069897", "0.58003837", "0.5797...
0.5346981
71
Gets the mcc of this PlmnId.
def mcc(self): return self._mcc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def cmid(self):\n return self[\"cmid\"]", "def getMcnpId(self):\n raise NotImplementedError", "def getMcc3Id(self):\n return self.mcc3id", "def getMcc3Id(self):\n return self.mcc3id", "def getMcc3Id(self):\n return self.mcc3id", "def getMcc3Id(self):\n return sel...
[ "0.728196", "0.7034053", "0.6948093", "0.6948093", "0.6948093", "0.6948093", "0.69142497", "0.6790559", "0.6696211", "0.6696211", "0.6696211", "0.6696211", "0.65415114", "0.6532205", "0.65096843", "0.649239", "0.6450314", "0.64094085", "0.63972324", "0.6307852", "0.6227797", ...
0.8369424
0
Sets the mcc of this PlmnId.
def mcc(self, mcc): if mcc is None: raise ValueError("Invalid value for `mcc`, must not be `None`") # noqa: E501 if mcc is not None and not re.search(r'^\d{3}$', mcc): # noqa: E501 raise ValueError("Invalid value for `mcc`, must be a follow pattern or equal to `/^\d{3}$/`") # ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mcc(self):\n return self._mcc", "def __init__(self, mcc=None, mnc=None): # noqa: E501\n self.openapi_types = {\n 'mcc': str,\n 'mnc': str\n }\n\n self.attribute_map = {\n 'mcc': 'mcc',\n 'mnc': 'mnc'\n }\n\n self._mcc = mc...
[ "0.6285387", "0.606716", "0.59180474", "0.56803393", "0.56803393", "0.5513417", "0.54811925", "0.53776187", "0.5370556", "0.5262815", "0.5262815", "0.5262815", "0.5262815", "0.5220506", "0.52132547", "0.52022827", "0.5159226", "0.5147124", "0.5119479", "0.5119479", "0.5119479...
0.7213802
0
Gets the mnc of this PlmnId.
def mnc(self): return self._mnc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getMcnpId(self):\n raise NotImplementedError", "def cmid(self):\n return self[\"cmid\"]", "def getMcnpId(self):\n return \"{0:d}000\".format(self.z)", "def mcc(self):\n return self._mcc", "def getMcnpId(self):\n z, a = self.z, self.a\n\n if z == 95 and a == 242...
[ "0.74033445", "0.68260247", "0.6694582", "0.6648079", "0.6566111", "0.6261092", "0.6249055", "0.6249055", "0.6249055", "0.6249055", "0.62347484", "0.617528", "0.60628474", "0.60331774", "0.59423983", "0.59423983", "0.58387274", "0.5833314", "0.57913786", "0.57879454", "0.5728...
0.81993204
0
Sets the mnc of this PlmnId.
def mnc(self, mnc): if mnc is None: raise ValueError("Invalid value for `mnc`, must not be `None`") # noqa: E501 if mnc is not None and not re.search(r'^\d{2,3}$', mnc): # noqa: E501 raise ValueError("Invalid value for `mnc`, must be a follow pattern or equal to `/^\d{2,3}$/`")...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mnc(self):\n return self._mnc", "def __init__(self, mcc=None, mnc=None): # noqa: E501\n self.openapi_types = {\n 'mcc': str,\n 'mnc': str\n }\n\n self.attribute_map = {\n 'mcc': 'mcc',\n 'mnc': 'mnc'\n }\n\n self._mcc = mc...
[ "0.62061363", "0.5720771", "0.5542143", "0.5532331", "0.5532331", "0.552551", "0.5312673", "0.52811646", "0.5231023", "0.51675767", "0.5107128", "0.50956124", "0.4996401", "0.49920717", "0.4988115", "0.49680015", "0.49680015", "0.4951965", "0.494844", "0.4929445", "0.4903124"...
0.73868823
0
Return Flask test client that is configured for testing. Testing configuration should be placed in `tests/.env` file.
def client(): from csuibot import app app.config['TESTING'] = True return app.test_client()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def client(app: Flask) -> FlaskClient:\n return app.test_client()", "def client():\n return app.test_client()", "def test_client_factory():\n\tapp = make_app(blueprints.api_server, settings.TestingConfig)\n\treturn app.test_client()", "def client(app):\n return app.test_client()", "def client(app)...
[ "0.82063615", "0.7843259", "0.7725718", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.7572749", "0.75372267", "0.7523216", "0.7498469", "0.7451521", "0.7451521", "0.73919874", "0.73548245", "0.73514926", "0.7217295"...
0.7443915
17
r""" Return the maximal trace for semi definite forms, which are considered to be below this precision.
def _indefinite_content_bound(self) : return 2 * self.index() // 3
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def mamajek08_logRpHK_max():\n return -3.8918287373004357", "def max_ntf(self):\n deg_diffs = set()\n for k in self.get_fd_part_j(self.id):\n deg_diff = (self.degree(k) - self.degree(self.id)) % 6\n deg_diffs.add(deg_diff)\n if not (deg_diffs <= {0, 1}):\n ...
[ "0.5811232", "0.5618018", "0.55806446", "0.55423427", "0.5493342", "0.547986", "0.5454903", "0.54544437", "0.5442834", "0.53105986", "0.529677", "0.529616", "0.52954596", "0.5290553", "0.52738386", "0.52718884", "0.52689016", "0.5250481", "0.524353", "0.522934", "0.52152437",...
0.0
-1
Takes an option named argument ``queryset`` as the base queryset used in the ``get_queryset`` method.
def __init__(self, *args, **kwargs): self.queryset = kwargs.pop('queryset', None) super(BaseChangeListForm, self).__init__(*args, **kwargs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n assert self.queryset is not None, (\n \"'%s' should either include a `queryset` attribute, \"\n \"or override the `get_queryset()` method.\"\n % self.__class__.__name__\n )\n\n queryset = self.queryset\n if isinstanc...
[ "0.7078679", "0.69924366", "0.6932436", "0.68967795", "0.6876814", "0.68474334", "0.6781993", "0.67646444", "0.6708174", "0.6708174", "0.6624345", "0.661172", "0.6554527", "0.64866805", "0.64866805", "0.637765", "0.63491666", "0.63331366", "0.6332388", "0.6257969", "0.6216849...
0.6358767
16
If the form was initialized with a queryset, this method returns that queryset. Otherwise it returns ``Model.objects.all()`` for whatever model was defined for the form.
def get_queryset(self): if self.queryset is None: return self.model.objects.all() return self.queryset
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_queryset(self):\n if self.queryset is not None:\n queryset = self.queryset\n if hasattr(queryset, '_clone'):\n queryset = queryset._clone()\n elif self.model is not None:\n queryset = self.model._default_manager.all()\n else:\n ...
[ "0.7936899", "0.7876319", "0.77187526", "0.76707315", "0.749273", "0.73866355", "0.726711", "0.7254133", "0.7253884", "0.7056347", "0.694931", "0.68266034", "0.67965055", "0.6784161", "0.6777045", "0.6724608", "0.6724608", "0.67002565", "0.66747195", "0.66747195", "0.66678715...
0.7751719
2
Returns an ordered queryset, sorted based on the values submitted in the sort parameter.
def get_queryset(self): qs = super(SortForm, self).get_queryset() qs = self.pre_sort(qs) # Ensure that the form is valid if not self.is_valid(): return qs # Do Sorting sorts = self.cleaned_data.get('sort', []) order_by = [] for sort in sorts...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def pre_sort(self, qs):\n return qs", "def ordering(self, qs):\n request = self.request\n # Number of columns that are used in sorting\n try:\n i_sorting_cols = int(request.REQUEST.get('iSortingCols', 0))\n except ValueError:\n i_sorting_cols = 0\n\n ...
[ "0.7736099", "0.75997627", "0.74764633", "0.74379766", "0.72574294", "0.7254057", "0.7078339", "0.7053527", "0.7005069", "0.68938166", "0.6891692", "0.68695945", "0.68547904", "0.68325645", "0.6824646", "0.67742336", "0.67532146", "0.6700546", "0.6673186", "0.66535544", "0.66...
0.78090596
0
Helper function for CsvForm class that retrieves a value from an object described by a djangostyle query path. The value can be a model field, property method, foreign key field, or instance method on the model.
def csv_getvalue(obj, path): path = path.split('__', 1) attr_name = path[0] if obj is None: # Record object is empty, return None return None if len(path) == 1: # Return the last leaf of the path after evaluation attr = csv_getattr(obj, attr_name) if isinstance(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get(self, request, app, model, field_path, *args, **kwargs):\n Model = apps.get_model(app, model)\n field = get_fields_from_path(Model, field_path)[-1]\n qs = self.get_queryset(Model, field_path)\n if field.is_relation:\n results = self.get_relation_choices(field, qs, fie...
[ "0.64917433", "0.6085007", "0.60781825", "0.5982327", "0.59347993", "0.5859937", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", "0.57110614", ...
0.6950882
0
Returns the objects in the form's current queryset as csv content.
def csv_content(self): if not hasattr(self, 'CSV_COLUMNS'): raise NotImplementedError('Child classes of CsvForm must implement the CSV_COLUMNS constant') # Get column fields and headers csv_columns = [i['column'] for i in self.CSV_COLUMNS] csv_headers = [i['title'].encode('u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def queryset_to_csv(self):\n csv_data = []\n custom_fields = []\n\n # Start with the column headers\n headers = self.queryset.model.csv_headers.copy()\n\n # Add custom field headers, if any\n if hasattr(self.queryset.model, 'get_custom_fields'):\n for custom_fie...
[ "0.7850295", "0.7681796", "0.75288653", "0.7510355", "0.7337889", "0.73138684", "0.68725055", "0.6434539", "0.6412522", "0.6195746", "0.6081931", "0.6030229", "0.6027381", "0.59883904", "0.5977921", "0.59635276", "0.5957708", "0.59288156", "0.5900067", "0.5867559", "0.5813132...
0.7058413
6
Get the column that is the argument number in the sequence.
def GetColumnByOrder(self, column_order): return self.columns[column_order]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def column(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"column\")", "def column(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"column\")", "def column(self) -> pulumi.Input[int]:\n return pulumi.get(self, \"column\")", "def column(self) -> pulumi.Input[int]:\n ...
[ "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7567843", "0.7546979", "0.7053613", "0.69885933", "0.69619435", "0.6897609", "0.6857228", ...
0.5603892
93
Get the column bundle associated with this data source.
def GetColumnBundle(self): raise NotImplementedError('Implement this')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getColumn(self):\n return _libsbml.SBasePlugin_getColumn(self)", "def getColumn(self):\n return _libsbml.SBase_getColumn(self)", "def get_source_column(self, column):\n return self._source.columns.get_loc(self._dataframe.columns[column])", "def column(self):\n return self[\"co...
[ "0.66047144", "0.629552", "0.6238524", "0.6187327", "0.61378264", "0.61298835", "0.6079711", "0.6035194", "0.59662366", "0.59021765", "0.5896817", "0.5889622", "0.58879983", "0.5880965", "0.58738106", "0.58111835", "0.5803687", "0.5770644", "0.57428133", "0.5730934", "0.57268...
0.7764243
0
Close this data source.
def Close(self): raise NotImplementedError('Implement this')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _close_data_source(self):\n # As the library openpyxl does not provide explicit close() methods. we\n # just set all internal variables to None\n self.ds_reader = None\n self.ds_table = None\n self.ds_file = None", "def close(self):\n self.data.close()", "def close...
[ "0.77661043", "0.75543904", "0.74022055", "0.71808314", "0.71808314", "0.6735405", "0.67009634", "0.670018", "0.670018", "0.6689567", "0.6688277", "0.66845614", "0.6675374", "0.66414756", "0.6638702", "0.6628197", "0.66208875", "0.66024727", "0.65947205", "0.65922314", "0.658...
0.0
-1
validates the given filename value
def _validate_filename(self, key, filename): if filename is None: raise TypeError("FileLink.filename can not be None") if not isinstance(filename, (str, unicode)): raise TypeError("FileLink.filename should be a str or unicode, " "not %s" % fil...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _validateFilename(self, filePath):\n # assert True\n raise NotImplementedError", "def verify_filename(filename):\n\n if is_fileobj(filename):\n raise ValueError(\"%r not a filename\" % filename)", "def _isvalid_file(filename):\r\n thisisavalidfile = True\r\n if (filename[0] ==...
[ "0.7689872", "0.7598142", "0.75814885", "0.75314397", "0.7428798", "0.7382082", "0.73750144", "0.7344815", "0.73321706", "0.72921723", "0.7247949", "0.7233608", "0.71933174", "0.71806496", "0.7172675", "0.71544874", "0.70951825", "0.7055731", "0.70520896", "0.7042163", "0.703...
0.7609433
1
Return taxirides pandas dataframe.
def taxi_rides(path, storage_options=None): # transformation function for proper datetime type date_parser = lambda col: pd.to_datetime(col, format="%m/%d/%Y %I:%M:%S %p") # transformation function for proper monetary columns to_decimal = lambda x: decimal.Decimal("{:.2f}".format(round(float(x), 2))) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def taxa_data_frame(self):\n cols = list(self._taxa.keys())\n cols.remove(\"uid\")\n cols.remove(\"object\")\n df = DataFrame(self._taxa, columns=cols, index=self._taxa[\"uid\"])\n df.index.name = \"uid\"\n\n return df", "def get_df(self):\n data = self.load_data(...
[ "0.7665801", "0.5815429", "0.57725686", "0.57136816", "0.56967413", "0.5624629", "0.5622868", "0.5621966", "0.56008077", "0.55986047", "0.559678", "0.5579322", "0.5550897", "0.55386984", "0.5530808", "0.55189556", "0.54842484", "0.5482448", "0.547334", "0.5470035", "0.5466266...
0.6802421
1
Generates a pie chart, representing the last 5000 messages in the specified channel.
async def chatchart(self, ctx, channel: Optional[discord.TextChannel] = None, messages:int = 5000): if channel is None: channel = ctx.channel # --- Early terminations if channel.permissions_for(ctx.message.author).read_messages is False: return await ctx.send("You're not...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def serverchart(self, ctx: commands.Context, messages: int = 1000):\n if messages < 5:\n return await ctx.send(\"Don't be silly.\")\n channel_list = []\n blacklisted_channels = await self.config.guild(ctx.guild).channel_deny()\n for channel in ctx.guild.text_channels:\n...
[ "0.5835213", "0.5779543", "0.5589654", "0.5564116", "0.55611694", "0.54764813", "0.54701215", "0.54608804", "0.5432896", "0.52753663", "0.52004474", "0.515726", "0.5109461", "0.5087616", "0.50271916", "0.5006948", "0.4982323", "0.49795395", "0.49745178", "0.4963208", "0.49226...
0.6006158
0
Set points that will be used to calculate displacements. If `points` is None and a `method` has aready been set on this `pyIDI` instance, the `method` object's `get_point` is used to get methodappropriate points.
def set_points(self, points=None, method=None, **kwargs): if points is None: if not hasattr(self, 'method'): if method is not None: self.set_method(method) else: raise ValueError("Invalid arguments. Please input points, or set t...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addPoints(self, points):\r\n self.points = points", "def add_points(self, points):\n pass", "def set_points(self, val=None):\r\n self._points = self.nx*self.ny*self.nz", "def set_points(self, points):\n self.slmm = SlidingWindowMinMax()\n self.front = self.length - 1\n ...
[ "0.63826764", "0.6375824", "0.61529124", "0.60980785", "0.6075058", "0.6013995", "0.5982021", "0.59295905", "0.57785976", "0.5703592", "0.56461304", "0.56232435", "0.5589645", "0.5560915", "0.5560007", "0.5551836", "0.5551836", "0.5549659", "0.5546624", "0.5546528", "0.553917...
0.8024203
0
Matches the first repeater in the string and removes it. Does not touch the repeaters after the first match.
def _match_and_remove_repeater(self, s: str) -> str: return self._repeater_count_regexp.sub('', s, 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _process_repeaters(self, s: str) -> str:\r\n while self._color_and_repeater_regexp.search(s):\r\n s = self._insert_reset_char(s)\r\n s = self._match_and_remove_repeater(s)\r\n\r\n return s", "def remove_repeating_characters(text):\n return RegexFilters.replace_repea...
[ "0.671037", "0.6227007", "0.59823185", "0.58933026", "0.55559707", "0.5478481", "0.54069", "0.53969634", "0.538384", "0.5281415", "0.5246729", "0.5229812", "0.52234834", "0.52061564", "0.51480293", "0.5137465", "0.5136164", "0.5125606", "0.5119636", "0.5118939", "0.5106384", ...
0.7853476
0
Append item to end of linked list.
def append(self, data): new_node = Node(data) if self.head is None: self.head = new_node return last_node = self.head while last_node.next: last_node = last_node.next last_node.next = new_node
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def append(self, item):\n \n n = Node(item)\n current = self.head\n \n # Special case - empty list\n if current is None:\n self.head = n\n else:\n # Find the last node\n while current.get_next() is not None:\n current ...
[ "0.8266678", "0.81806177", "0.79883355", "0.78563845", "0.7603289", "0.7556654", "0.7541728", "0.7522274", "0.7452091", "0.7426839", "0.73605233", "0.7339325", "0.7310235", "0.7292294", "0.7286239", "0.7257267", "0.721313", "0.7201036", "0.7191494", "0.7177629", "0.7172214", ...
0.69840044
43
Function that returns the index page and all its data
def index(): entertainment_news = get_sources('entertainment') fashion_news = get_sources('fashion') title = 'Vnews' return render_template('index.html', title=title, fashion=fashion_news, entertainment=entertainment_news)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def index():\n\n return {\n 'page': 'index',\n }", "def main():\n page = get_page_arg()\n\n items = load_data(page)\n total_pages = get_total_pages()\n context = {\"current_page\": page,\n \"total_pages\": total_pages,\n \"items\": items}\n\n return render_...
[ "0.85199696", "0.76600766", "0.74465674", "0.73561424", "0.7331338", "0.73275995", "0.73263806", "0.7221385", "0.7212406", "0.72095037", "0.71808803", "0.7171474", "0.7171474", "0.7171474", "0.71706176", "0.71339273", "0.7121554", "0.71199703", "0.71142286", "0.7103472", "0.7...
0.0
-1
Selects the parents randomly. Later, these parents will mate to produce the offspring.
def random_selection(self, fitness, num_parents): if self.gene_type_single == True: parents = numpy.empty((num_parents, self.population.shape[1]), dtype=self.gene_type[0]) else: parents = numpy.empty((num_parents, self.population.shape[1]), dtype=object) rand_indices = ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def select_parents(self, population):\n random.shuffle(population)\n return population", "def make_parents(self):\r\n self.parents = []\r\n \r\n for loopindex in range(0, int(self.population_size * 0.6)):\r\n while True:\r\n if loopindex < int(self.pop...
[ "0.75552964", "0.74631226", "0.73463005", "0.70745945", "0.6897127", "0.6814762", "0.67624736", "0.6756805", "0.6739713", "0.6707115", "0.6419159", "0.6378802", "0.632511", "0.63050073", "0.62330586", "0.6223498", "0.6220056", "0.62200254", "0.62165505", "0.6209252", "0.61756...
0.6385169
11
Returns a list of keys sorted by their values. Keys with the highest values will appear first. >>> a = Counter() >>> a['first'] = 2 >>> a['second'] = 4 >>> a['third'] = 1 >>> a.sortedKeys() ['second', 'third', 'first']
def sortedKeys(self): sortedItems = self.items() compare = lambda x, y: sign(y[1] - x[1]) sortedItems.sort(cmp=compare) return [x[0] for x in sortedItems]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sortedKeys(self):\n sortedItems = list(self.items())\n\n def compare(x, y): return sign(y[1] - x[1])\n sortedItems.sort(cmp=compare)\n return [x[0] for x in sortedItems]", "def sorted_keys(self):\n keys = self.data.keys()\n keys.sort(key=lambda x:-len(self[x]))\n ...
[ "0.76473737", "0.7400908", "0.7173844", "0.7133614", "0.7077604", "0.69163054", "0.68053555", "0.6681926", "0.665005", "0.6550057", "0.64845437", "0.64467335", "0.6422366", "0.6420075", "0.63758653", "0.6201112", "0.61731327", "0.6018685", "0.6015968", "0.5956273", "0.5913844...
0.7506466
1
Returns the sum of counts for all keys.
def totalCount(self): return sum(self.values())
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def total_count(count):\n return sum(count.values())", "def totalcounts(self):\n return self.datacounts + self.bkgdcounts", "def get_count(name, key):\n total = 0\n query = CounterShard.all().filter('name = ', name).filter('reference_key = ', key)\n for counter in query:\n ...
[ "0.718206", "0.6880847", "0.6810029", "0.6695799", "0.66415733", "0.663198", "0.65938187", "0.65352434", "0.6529951", "0.6481646", "0.6461681", "0.642291", "0.64196306", "0.64196306", "0.63727325", "0.6367173", "0.63383484", "0.63346845", "0.63323027", "0.63252246", "0.632522...
0.7338761
2
Get the reaction type designation from the reaction class.
def typ(rxn_class): return rxn_class[0]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reverse_reaction_class(rxn_class):\n return REVERSE_REACTION_DCT.get(rxn_class, None)", "def getTypeCode(self):\n return _libsbml.Reaction_getTypeCode(self)", "def get_type(self):\n return self.type", "def get_type(self):\n return self.type", "def get_type(self) -> str:\n ...
[ "0.6328494", "0.6257245", "0.62447095", "0.62447095", "0.62003934", "0.6142866", "0.60968935", "0.60956967", "0.60956967", "0.6057968", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", "0.60093075", ...
0.62529427
2
Keep pushing characters on to a stack till a ")" is collected. Once it is collected we keep popping from the stack till a "(" is obtained. We then pop the sign which is either the next top of the stack or we take it as a "+" We open the brackets and push the result on top of the stack again Finally, pop all the charact...
def simplify(expression): q = [] for x in expression: if x != ")": q.append(x) else: subexp = "" while q: #print(q) c = q.pop() if c == "(": if len(q) and (q[-1] == "+" or q[-1] == "-"): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def toPostfix(infix):\n output = \"\" # Output stack - the numbers in our expression\n operators = \"\" # Operator stack (using string for ease but could be a list)\n precedence = {\"*\": 100, \"/\": 90, \"+\": 80, \"-\": 70, \"(\": 60, \")\": 50} # Operator precedence dictionary - operator characters ma...
[ "0.70811635", "0.70106375", "0.6971359", "0.6862161", "0.683258", "0.6787613", "0.6772963", "0.6729979", "0.66971433", "0.6673992", "0.6663553", "0.66268504", "0.66172343", "0.6616178", "0.660237", "0.65735954", "0.6501266", "0.64648277", "0.6433687", "0.6400735", "0.63920915...
0.76580936
0
Initialisation of profiles superclass Initialises the quantities used in the class
def __init__(self): self.rho=[] self.te=[] self.ti=[] self.ne=[] self.ni=[] self.ni1=[] self.ni2=[] self.ni3=[] self.vtor=[] self.zeff=[] self.nion=1 self.Z=[] self.A=[] self.coll_mode=[]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _init_profiles(self):\n self._profiles = {\n k: np.zeros((len(self.hybrid_time_index), len(self.hybrid_meta)),\n dtype=np.float32)\n for k in OUTPUT_PROFILE_NAMES}", "def __init__(self, velocity, vorticity, prof_coords, \n direction, beginMe...
[ "0.63501114", "0.6295864", "0.6253771", "0.6251196", "0.6221176", "0.6209591", "0.61729836", "0.61729836", "0.61729836", "0.6148173", "0.6135914", "0.6117318", "0.6099664", "0.6097138", "0.60441494", "0.6032268", "0.6014388", "0.5963317", "0.595801", "0.59539086", "0.59500736...
0.0
-1
Create a Resource or subclass thereof from a dictionary. The new Resource's rkey and location must be handed in explicitly. The difference between this and simply intializing a Resource object is that from_dict will introspect the attrs passed in and create whatever kind of Resource matches attrs['kind'] so for example...
def from_dict(cls: Type[R], rkey: str, location: str, serialization: Optional[str], attrs: Dict) -> R: # So this is a touch odd but here we go. We want to use the Kind here to find # the correct type. ambassador = sys.modules['ambassador'] resource_class: Type[R] = getattr(ambassador, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_dict(cls, _dict: Dict) -> 'Resource':\n args = {}\n if 'attributes' in _dict:\n args['attributes'] = [Attribute.from_dict(x) for x in _dict.get('attributes')]\n return cls(**args)", "def from_resource(cls: Type[R], other: R,\n rkey: Optional[str]=None...
[ "0.743612", "0.67693067", "0.66140085", "0.6573382", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0.634552", "0....
0.7918301
0
Create a Resource from a YAML serialization. The new Resource's rkey and location must be handed in explicitly, and of course in this case the serialization is mandatory. Raises an exception if the serialization is not parseable.
def from_yaml(cls: Type[R], rkey: str, location: str, serialization: str) -> R: attrs = parse_yaml(serialization) return cls.from_dict(rkey, location, serialization, attrs)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _from_yaml(cls, loader: yaml.Loader, node: yaml.Node) -> \"BotoError\":\n value = loader.construct_mapping(node, deep=True)\n return cls(value)", "def from_yaml(cls, b):\n return cls.from_dict(yaml.safe_load(b))", "def _from_yaml(cls, loader: yaml.Loader, node: yaml.Node) -> \"ToJson\"...
[ "0.65293074", "0.643999", "0.6372699", "0.6233396", "0.617768", "0.6132939", "0.612246", "0.6100841", "0.60873455", "0.6014488", "0.6005695", "0.5897076", "0.58631533", "0.5861946", "0.5842951", "0.5787686", "0.57846904", "0.571654", "0.57030666", "0.55484045", "0.55461496", ...
0.81506383
0
Initialise a pySlip instance. parent reference to parent object tile_dir the root tile directory start_level initial tile level to start at min_level the minimum tile level to use max_level the maximum tile level to use kwargs keyword args for Panel
def __init__(self, parent, tile_dir=None, start_level=None, min_level=None, max_level=None, **kwargs): # create and initialise the base panel wx.Panel.__init__(self, parent=parent, id=wx.ID_ANY, **kwargs) self.SetBackgroundColour(pySlip.BackgroundColour) # get tile inf...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, tile_dir):\n\n # open top-level info file\n self.tile_dir = tile_dir\n info_file = os.path.join(tile_dir, self.TileInfoFilename)\n try:\n fd = open(info_file, 'rb')\n (self.extent, self.tile_size,\n sel...
[ "0.6360639", "0.5965736", "0.59497225", "0.5935533", "0.58347094", "0.5803722", "0.5768731", "0.57167184", "0.5711916", "0.5694782", "0.5654527", "0.56288", "0.56206685", "0.5583578", "0.55427796", "0.55426157", "0.5508138", "0.5458691", "0.5453321", "0.5442195", "0.54406834"...
0.78247696
0
Hide a layer. id the layer id
def hideLayer(self, id): #log.debug('hideLayer: hiding layer %s' % str(id)) self.layer_mapping[id].visible = False self.Refresh()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide(id):\r\n if type(id) is int: # shapeID\r\n g.hide(g.database[id])\r\n else: # id refers to hypothetical shape\r\n shapeID=pickShape(local_vars[id])\r\n g.hide(g.database[shapeID])", "def hide(id):\n if type(id) is int: # shapeID\n g.hide(g.database[id])\n else: # ...
[ "0.7394393", "0.7385488", "0.7109449", "0.6853672", "0.6661525", "0.6339119", "0.62931347", "0.62590903", "0.59546", "0.59103674", "0.5825434", "0.58110154", "0.57821417", "0.57198274", "0.5709647", "0.5689238", "0.56711596", "0.5668008", "0.5644972", "0.5644972", "0.56433225...
0.8886411
0
weighted correlation with default ddof assumes variables in columns and observations in rows
def corrcoef(self): return self.cov / self.std / self.std[:, None]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weighted_corr(x, y, dim=None, weights=None, return_p=True):\n\n valid_values = x.notnull() & y.notnull()\n x = x.where(valid_values)\n y = y.where(valid_values)\n numerator = weighted_cov(x, y, dim, weights)\n denominator = np.sqrt(weighted_cov(x, x, dim, weights) * weighted_cov(y, y, dim, weigh...
[ "0.6441923", "0.59898734", "0.56081176", "0.5598199", "0.5492722", "0.5452093", "0.541864", "0.541643", "0.5397263", "0.5379481", "0.5352804", "0.5308242", "0.5305181", "0.5288513", "0.5279307", "0.5258209", "0.5258209", "0.52478284", "0.5243936", "0.52372", "0.5221937", "0...
0.47563192
87
Compute quantiles for a weighted sample.
def quantile(self, probs, return_pandas=True): import pandas as pd probs = np.asarray(probs) probs = np.atleast_1d(probs) if self.data.ndim == 1: rslt = self._quantile(self.data, probs) if return_pandas: rslt = pd.Series(rslt, index=probs) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def weighted_quantile(values, quantiles, sample_weight=None, values_sorted=False, old_style=False):\n values = np.array(values)\n quantiles = np.array(quantiles)\n if sample_weight is None:\n sample_weight = np.ones(len(values))\n sample_weight = np.array(sample_weight)\n assert np.all(quanti...
[ "0.75085753", "0.74910057", "0.7471163", "0.7471163", "0.71036875", "0.70795774", "0.6928313", "0.6904284", "0.6439687", "0.6395362", "0.6281827", "0.62393016", "0.62376153", "0.62263536", "0.61690843", "0.61224836", "0.61220604", "0.60915524", "0.6080542", "0.6055984", "0.60...
0.0
-1
Testing success add to wallet.
async def test_success( self, conn, user_with_wallet, user_with_wallet_data, ): amount = Decimal(2.5) new_balance = await add_to_wallet( conn, wallet_id=user_with_wallet[1], amount=amount, ) assert new_balance == amo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_wallets_put(self):\n pass", "def test_wallets_post(self):\n pass", "async def test_success(\n self,\n conn,\n user_with_wallet,\n user_with_wallet_data,\n ):\n amount = Decimal('0.1')\n new_balance = await get_from_wallet(\n conn,\n...
[ "0.7667904", "0.74661136", "0.7026578", "0.6733449", "0.6726548", "0.65997297", "0.6407913", "0.6288156", "0.6239645", "0.6176022", "0.61644983", "0.6164274", "0.613371", "0.6124592", "0.6099608", "0.60589296", "0.6030545", "0.6020666", "0.60066026", "0.5994878", "0.59700376"...
0.80333555
0
Testing success add to wallet.
async def test_success( self, conn, user_with_wallet, user_with_wallet_data, ): amount = Decimal('0.1') new_balance = await get_from_wallet( conn, wallet_id=user_with_wallet[1], amount=amount, ) assert new_balance ==...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def test_success(\n self,\n conn,\n user_with_wallet,\n user_with_wallet_data,\n ):\n amount = Decimal(2.5)\n new_balance = await add_to_wallet(\n conn,\n wallet_id=user_with_wallet[1],\n amount=amount,\n )\n assert n...
[ "0.8034115", "0.7668974", "0.7466641", "0.6734877", "0.672624", "0.6600258", "0.6408301", "0.6289291", "0.6240422", "0.6176132", "0.6163817", "0.6163189", "0.6134905", "0.61240226", "0.60996693", "0.6059342", "0.603162", "0.6020867", "0.6007446", "0.5993692", "0.59702635", ...
0.7028044
3
Test to update existing song
def test_update_song(): target_song = { "artist": "Heng", "song": "I can do all things", "genre": "Hip-Hop", "lyrics": "Like Steph said I can do all things In...", "year": get_timestamp_year(), "timestamp": get_timestamp() } update_song(target_song) upd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_update_a_song(self):\n self.login_client('test_user', 'testing')\n # hit the API endpoint\n response = self.make_a_request(\n kind=\"put\",\n id=2,\n data=self.valid_data\n )\n self.assertEqual(response.data, self.valid_data)\n sel...
[ "0.7944716", "0.7883418", "0.743463", "0.69309306", "0.6862517", "0.6846239", "0.6846239", "0.6846239", "0.6838062", "0.6805066", "0.6755024", "0.673743", "0.6719135", "0.66186804", "0.6610433", "0.65483487", "0.65441066", "0.6534617", "0.6534026", "0.6530974", "0.6527355", ...
0.8028702
0
List all courses that are registered on eventex
def list_course(request, template="core/list_course.html"): response = { 'morning': Course.objects.at_morning(), 'afternoon': Course.objects.at_afternoon(), } return direct_to_template(request, template, response)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_all_courses(request):\r\n courses = Course.objects.all()\r\n courses = [dict(course_name = c.course_name, course_code = c.course_code, course_year = c.year,\r\n course_url = '/course/%s/' % c.course_code.lower()) for c in courses]\r\n\r\n response = {'courses': courses}\r\n\r\n...
[ "0.70941615", "0.6950283", "0.686628", "0.67610705", "0.67441595", "0.671117", "0.6684754", "0.666783", "0.66610575", "0.6631861", "0.6559467", "0.6553202", "0.65302134", "0.64756036", "0.64633054", "0.6425861", "0.6413465", "0.62762314", "0.6250935", "0.62244254", "0.6208607...
0.70996803
0
Checks validity of supplied doi. If whitespace is True (default False), allows supplied doi to contain whitespace.
def check_doi(self, doi, whitespace=False): result_doi = find_doi_in_string(doi, whitespace=False) if result_doi is None: raise BadDOI('Supplied DOI "%s" fails doi check' % doi) return doi
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_valid(self, doi):\n doi = self.normalise(doi, include_prefix=True)\n\n if doi is None or match(\"^doi:10\\\\..+/.+$\", doi) is None:\n return False\n else:\n if not doi in self._data or self._data[doi] is None:\n return self.__doi_exists(doi)\n ...
[ "0.6077393", "0.5479238", "0.5447448", "0.54218566", "0.52605265", "0.5221199", "0.5212951", "0.5185334", "0.50733185", "0.50124353", "0.50094277", "0.4966431", "0.49488258", "0.49428543", "0.49054754", "0.49045965", "0.48856467", "0.48710638", "0.4866625", "0.4843063", "0.48...
0.75467116
0
Test index route when upload service has an error.
def test_route_with_upload_service_error(self, mocker): client = wsgi.application.test_client(mocker) url = '/' upload_response = requests.HTTPError( mocker.Mock(status=404), 'not found' ) mocker.patch('wsgi._retryable', side_effect=upload_response) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_route_with_upload_service_absent(self, mocker):\n client = wsgi.application.test_client(mocker)\n\n url = '/'\n\n response = client.get(url)\n\n output = {\n \"message\": \"upload-service not operational\",\n \"status\": \"Error\",\n \"version\"...
[ "0.7071677", "0.67416227", "0.64081436", "0.63842356", "0.6374016", "0.63328224", "0.6332343", "0.63275504", "0.6312531", "0.62103826", "0.6199679", "0.6196392", "0.6135647", "0.6134511", "0.61217135", "0.6101505", "0.60789794", "0.6055757", "0.6021531", "0.6019487", "0.60096...
0.69953835
1
Test index route when upload service is absent.
def test_route_with_upload_service_absent(self, mocker): client = wsgi.application.test_client(mocker) url = '/' response = client.get(url) output = { "message": "upload-service not operational", "status": "Error", "version": wsgi.VERSION } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_index_loads_properly(self):\n response = self.client.get('localhost:8000')\n self.assertEqual(response.status_code, 404)", "def test_nonexistant_index_file(self):\n # Send the request\n request = webhttp.message.Request()\n request.method = \"GET\"\n request.uri...
[ "0.67005056", "0.66597116", "0.6420942", "0.6270383", "0.62585324", "0.62503916", "0.6243407", "0.6241023", "0.62369686", "0.62307173", "0.61476785", "0.61234355", "0.60746855", "0.6065247", "0.60375744", "0.6006061", "0.5925443", "0.5916495", "0.59100264", "0.59082246", "0.5...
0.7783082
0
Load an image given it's file path (numpy ndarray of dimension n_images x height x width x n_channels)
def load_image(file_path): return Image.open(file_path)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def load(path):\n print(\"path\", path)\n print(Path(path).is_file())\n if Path(path).is_file():\n img = image.imread(path)\n print(f\"Loading image of dimensions {img.shape[0]} x \"\n f\"{img.shape[1]}\")\n return np.array(img)\n raise ...
[ "0.8146869", "0.79818004", "0.7778522", "0.7608338", "0.7573117", "0.7570187", "0.75691617", "0.74936146", "0.74797475", "0.74283546", "0.7387448", "0.7343644", "0.72848815", "0.7283993", "0.72809917", "0.7209921", "0.7206979", "0.7206979", "0.7197862", "0.718841", "0.7142359...
0.73602027
11
Plots some images (useful when working in notebooks)
def show(images, concat=True, return_plots=False): if concat: images = np.concatenate([img_to_rgb(img) for img in images], axis=1) return show([images], concat=False, return_plots=return_plots) else: plots = [] for img in images: fig = plt.figure(figsize=(15, 7...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def visualize(**images):\n n = len(images)\n plt.figure(figsize=(16, 5))\n for i, (name, image) in enumerate(images.items()):\n plt.subplot(1, n, i + 1)\n plt.xticks([])\n plt.yticks([])\n plt.title(' '.join(name.split('_')).title())\n plt.imshow(image)\n plt.show()\n...
[ "0.7933343", "0.766327", "0.766327", "0.766327", "0.74573267", "0.7414237", "0.7354884", "0.724112", "0.71944755", "0.71898305", "0.71785593", "0.7174218", "0.7174218", "0.7174218", "0.71459705", "0.71425194", "0.71261764", "0.71213293", "0.70681906", "0.7001811", "0.6984117"...
0.6688345
58
Apply contrast limited adaptive histogram equalization (CLAHE) to an input image
def apply_clahe(img, clip_limit=2.0, tile_grid_size=(8, 8)): shape = img.shape if len(shape) > 2 and shape[2] == 1: img = img.reshape(shape[:2]) assert img.dtype == np.uint8, '0 to 255 uint8 for pixel values are expected' assert len(img.shape) == 2, 'only on one channel' clahe = cv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enhance_contrast(img):\n # CLAHE (Contrast Limited Adaptive Histogram Equalization)\n clahe = cv2.createCLAHE(clipLimit=3., tileGridSize=(8, 8))\n\n lab = cv2.cvtColor(img, cv2.COLOR_BGR2LAB) # convert from BGR to LAB color space\n l, a, b = cv2.split(lab) # split on 3 different channels\n\n l...
[ "0.81869", "0.7743078", "0.72423345", "0.7236002", "0.6930185", "0.68155605", "0.65591663", "0.6471757", "0.64632344", "0.64152837", "0.6378416", "0.62844145", "0.62634516", "0.62104905", "0.6105494", "0.6066735", "0.6019525", "0.6017419", "0.59927285", "0.5922594", "0.591380...
0.6722255
6
Return the module version for a given Agent version. >>> mods = [GoModule("."), GoModule("pkg/util/log")] >>> [mod.__version("7.27.0") for mod in mods] ["v7.27.0", "v0.27.0"]
def __version(self, agent_version): if self.path == ".": return "v" + agent_version return "v0" + agent_version[1:]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_module_version(module_name):\n mod = __import__(module_name)\n return getattr(mod, '__version__', getattr(mod, 'VERSION', None))", "def get_version():\n version_module_path = os.path.join(\n os.path.dirname(__file__), \"renamer\", \"_version.py\")\n # The version module contains a vari...
[ "0.66018605", "0.6547241", "0.6420678", "0.6420557", "0.63419193", "0.6315831", "0.6312832", "0.62013525", "0.61989623", "0.60789406", "0.6076399", "0.6044218", "0.6042582", "0.6026852", "0.60208166", "0.6011533", "0.6000099", "0.59501934", "0.59453845", "0.5916846", "0.59168...
0.63332415
5
Return the absolute path of the Go module.
def full_path(self): return os.path.abspath(self.path)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def module_path():\n return os.path.dirname(unicode(__file__, sys.getfilesystemencoding( )))", "def _get_module_path():\n\n return os.path.dirname(os.path.realpath(__file__))", "def get_module_path(module):\n return pathlib.Path(os.path.dirname(os.path.abspath(inspect.getfile(module))))", "def go_mo...
[ "0.80166584", "0.7908224", "0.77740574", "0.7750319", "0.7653624", "0.7587882", "0.7520737", "0.7441956", "0.73321056", "0.725379", "0.71816033", "0.71192634", "0.71102333", "0.7065501", "0.7063331", "0.70627683", "0.7054323", "0.7010632", "0.6996409", "0.6991925", "0.6959183...
0.64160764
69
Return the absolute path of the Go module go.mod file.
def go_mod_path(self): return self.full_path() + "/go.mod"
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def module_path():\n return os.path.dirname(unicode(__file__, sys.getfilesystemencoding( )))", "def _get_module_path():\n\n return os.path.dirname(os.path.realpath(__file__))", "def module_path():\n from sys import path\n from os import getcwd\n from os.path import basename,exists\n from insp...
[ "0.75294846", "0.7493527", "0.7483199", "0.72785497", "0.7249449", "0.7074034", "0.7021906", "0.7014036", "0.69773954", "0.6876765", "0.6860117", "0.6858643", "0.67778265", "0.67518437", "0.67333883", "0.67214864", "0.6716913", "0.6644459", "0.6628152", "0.65870345", "0.64627...
0.8614053
0
Compute attention for 2dimensional queries (batch x hidden).
def forward_2d(self, query, keys, values, mask=None): query = query.unsqueeze(1) # (B, 1, H) context_vectors, weights = self.forward_3d(query, keys, values, mask=mask) context_vectors = context_vectors.squeeze(1) weights = weights.squeeze(1) return context_vectors, weights
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def attention(query, step):\n \n if nest.is_sequence(query): # If the query is a tuple, flatten it.\n query_list = nest.flatten(query)\n query = array_ops.concat(query_list, 1)\n _tmp = math_ops.matmul(query, w) + b\n _tmp = array_ops.resha...
[ "0.7771222", "0.7114242", "0.70485926", "0.6950163", "0.66308886", "0.6578838", "0.6548845", "0.6464339", "0.64113617", "0.63293755", "0.6302551", "0.62915266", "0.6268303", "0.62190884", "0.6216596", "0.6211071", "0.62042516", "0.6155263", "0.60527354", "0.59789556", "0.5966...
0.0
-1
Compute attention for 3dimensional input (batch x step x hidden).
def forward_3d(self, query, keys, values, mask=None): B = query.shape[0] head_dim = self._hidden_size // self._num_head transformed_query = self.linear_Q(query) if self.relative_posmatrix is not None: T2 = query.shape[1] T1 = keys.shape[1] pos = torch....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _attention(self, inputs):\n attn_weights = K.batch_dot(x=inputs,\n y=K.permute_dimensions(inputs,\n pattern=(0, 2, 1)))\n return K.permute_dimensions(attn_weights, (0, 2, 1))", "def attention(query, step)...
[ "0.7259609", "0.70202136", "0.67105246", "0.65564626", "0.6397242", "0.6347776", "0.62830824", "0.6262901", "0.62333703", "0.6227883", "0.61883694", "0.6182892", "0.6170554", "0.6159105", "0.61478716", "0.61472255", "0.6076734", "0.60606", "0.6054937", "0.6027124", "0.6022023...
0.0
-1
Test that turning off `spatial_squeeze` changes the output shape. Also try setting different values for `dropout_keep_prob` and snt.BatchNorm `is_training`.
def testModelShapesWithoutSqueeze(self): i3d_model = i3d.InceptionI3d( num_classes=_NUM_CLASSES, spatial_squeeze=False, final_endpoint='Predictions') inp = tf.placeholder(tf.float32, [None, 64, _IMAGE_SIZE, _IMAGE_SIZE, 3]) predictions, end_points = i3d_model( inp, is_training=False,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def testModelShapesWithSqueeze(self):\n i3d_model = i3d.InceptionI3d(\n num_classes=_NUM_CLASSES, final_endpoint='Predictions')\n inp = tf.placeholder(tf.float32, [None, 64, _IMAGE_SIZE, _IMAGE_SIZE, 3])\n predictions, end_points = i3d_model(\n inp, is_training=True, dropout_keep_prob=0.5)\n...
[ "0.68306565", "0.6178674", "0.6161824", "0.6145363", "0.6087118", "0.6051122", "0.6043302", "0.6040517", "0.60268104", "0.60052943", "0.5978523", "0.5959493", "0.5949557", "0.5931597", "0.592495", "0.58656013", "0.58514225", "0.5845749", "0.5822011", "0.5788778", "0.57682407"...
0.70255846
0
Returns the number of attributes in the data set.
def getNumAttributes(self): return self.numAttributes
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_num_attributes(self) -> int:\n return self._num_attributes", "def getNumAttributes(self):\n\n return len(self._attributes)", "def getNumAttributes(self):\n return _libsbml.XMLAttributes_getNumAttributes(self)", "def AttributeCount(self):\n ret = libxml2mod.xmlTextReaderAtt...
[ "0.846202", "0.8095692", "0.75625193", "0.7485791", "0.74504465", "0.72663426", "0.726516", "0.71674794", "0.69731325", "0.6937061", "0.6928069", "0.6926428", "0.6899551", "0.6893666", "0.689213", "0.68915886", "0.68915886", "0.68462926", "0.6811813", "0.67925686", "0.6791973...
0.82214403
1
Calculates inverval in seconds between two datetime.time objects.
def interval(start, end): return seconds_since_midnight(end) - seconds_since_midnight(start)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def time_difference(time1: Time, time2: Time) -> float:\n dsec = time1.sec - time2.sec\n dnanosec = time1.nanosec - time2.nanosec\n dt = dsec + dnanosec/(10**9)\n return dt", "def diff_secs(self, other):\n if not isinstance(other, datetime):\n types = (type(other), datetime)\n raise Type...
[ "0.7365684", "0.72946465", "0.72879434", "0.7151525", "0.7107327", "0.6918762", "0.6803006", "0.680009", "0.67707527", "0.672666", "0.6667754", "0.66074747", "0.65792024", "0.6552553", "0.6552553", "0.65494645", "0.6527671", "0.65218365", "0.65097123", "0.6490022", "0.6484557...
0.7037316
5
Calculate seconds of worked days in month.
def bussines_days(year_month): year, month = year_month date = datetime( year, month, calendar.monthrange(year, month)[1] ) return sum([ 1 for x in xrange(1, date.day) if datetime(year, month, x).weekday() < 5 ]) * (60 * 60 * 8)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def calculate_seconds_in_days(days):\n return int(days * 86400)", "def calculate_days(time):\n return int(time / 86400)", "def days_in_month(self):\n return calendar.monthrange(self.year, self.month)[1]", "def _clock_day(self):\n return int(self._shifted_time / 86400)", "def runtime_cal...
[ "0.6509216", "0.6270076", "0.62632626", "0.6155513", "0.612984", "0.61108404", "0.6108658", "0.6061195", "0.60405797", "0.6038891", "0.60180604", "0.58791983", "0.58727103", "0.58680207", "0.586754", "0.5789541", "0.5762172", "0.5760224", "0.5755207", "0.5730819", "0.56684434...
0.0
-1
sets tab with to 4 spaces, std everywhere
def tab_width(self, pad, *args): pad.insert(GUI.INSERT, ' ' * 4) return 'break'
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def tab(self):\n self._write('\\t')", "def add_tab(self):\n if(self.tab):\n return '\\t'\n return ''", "def tabing_tool(code):\n for i, line in enumerate(code):\n code[i] = ' '*4 + line\n return code", "def tab(self):\n self.write(self.ASCII_TAB)\n s...
[ "0.7873234", "0.7302737", "0.72136486", "0.7207288", "0.7128487", "0.6939038", "0.6784599", "0.6670579", "0.66588163", "0.64802307", "0.6468251", "0.64467114", "0.64314663", "0.63625544", "0.63554513", "0.6349103", "0.63080907", "0.6293214", "0.6272492", "0.62159073", "0.6215...
0.7399885
1
hides the output console
def hide_outputpad(self, frame2, outputpad): frame2.pack_forget() outputpad.pack_forget()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hide(self) -> None:\n thr_is_alive = self._spin_thread and self._spin_thread.is_alive()\n if self._hide_spin is None:\n raise RuntimeError(\"hide_spin is None\")\n\n if thr_is_alive and not self._hide_spin.is_set():\n with self._stdout_lock:\n # set the...
[ "0.739349", "0.73313683", "0.7318921", "0.7196621", "0.71079767", "0.7082714", "0.6987291", "0.69280136", "0.6760157", "0.6747856", "0.6693398", "0.66793716", "0.6619533", "0.66136855", "0.65344995", "0.65285915", "0.65070796", "0.6379064", "0.6377341", "0.636664", "0.6364515...
0.6278526
27
adds words to trie
def add_to_trie(self, frame2, pad, lb, *args): global FLAG FLAG = 1 frame2.pack_forget() pad.edit_separator() r = pad.get('1.0', GUI.END) r = map(str, r.split()) if not MyDict.contains(r[-1]): MyDict.insert(self.remove_punc(r[-1]))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def addWord(self, word):\n ptr = self.root\n for k in word:\n if k in ptr.child:\n ptr = ptr.child[k]\n else:\n ptr.child[k] = TrieNode()\n ptr = ptr.child[k]\n ptr.isEnd = True", "def addWord(self, word):\n cur = self.root\n for c in word:\n if c ...
[ "0.833775", "0.8337518", "0.8281062", "0.8241015", "0.82100433", "0.8204306", "0.81782717", "0.815861", "0.8121535", "0.80776346", "0.79693544", "0.78432727", "0.7790806", "0.7790502", "0.7787745", "0.77787876", "0.77285063", "0.77069306", "0.7706347", "0.7693062", "0.7691399...
0.0
-1
Acquire a buffer of a particular size. If we've got one in cache, returns it.
def acquire(capacity): if capacity <= StringCache.MAX_BUILDER_SIZE: b = StringCache.buf if b is not None: if capacity <= len(b): StringCache.buf = None b[0] = 0 return b return _ffi.new(f"unsigned char[{c...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def malloc(self, size, wait=True):\n page_num = int(math.ceil(size / self._page_size))\n size = page_num * self._page_size\n\n start = None\n ct = 0\n errmsg = ''\n while True:\n self._locker.acquire()\n try:\n start = self._allocator.m...
[ "0.5736923", "0.5689424", "0.5452159", "0.5403151", "0.5398184", "0.5396522", "0.53699315", "0.5344922", "0.52944624", "0.5278125", "0.5264344", "0.52607244", "0.5254927", "0.5236071", "0.523054", "0.52267474", "0.51858824", "0.5182913", "0.5182913", "0.5115811", "0.5110459",...
0.61803746
0
Return whether or not given value is a valid URL.
def is_valid_url(value): regex = re.compile( r'^(?:http|ftp)s?://' r'(?:(?:[A-Z0-9](?:[A-Z0-9-]{0,61}[A-Z0-9])?\.)+(?:[A-Z]{2,6}\.?|[A-Z0-9-]{2,}\.?)|' r'localhost|' r'\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}|' r'\[?[A-F0-9]*:[A-F0-9:]+\]?)' r'(?::\d+)?' r'(?:/?|[/?...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def check_url(value):\n\n valid = validators.url(value)\n if valid != True:\n return False", "def check_url(value):\n\n valid = validators.url(value)\n if valid is not True:\n return False", "def ISURL(value):\n value = value.strip()\n if ' ' in value: # Disallow spaces insid...
[ "0.8945292", "0.89336956", "0.86363506", "0.833403", "0.80891055", "0.8016021", "0.8013145", "0.7976426", "0.7971342", "0.79660726", "0.79437566", "0.7933303", "0.7930985", "0.78874505", "0.7847995", "0.7791371", "0.77582973", "0.7752336", "0.7704198", "0.7695279", "0.7681015...
0.8542149
3
This test should fetch empty cart contents. This test should assert that cart is indeed empty. Also, this test should assert the response code. Which should equal to `200`.
def test_show_cart_empty(client): raise NotImplemented('Acceptance test failed')
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_shopping_cart_is_empty(self):\n response = self.client.get(self.SHOP_CART_URL)\n self.assertEqual(response.status_code, 200)\n self.assertContains(response, \"Your shopping cart is empty.\")\n self.assertQuerysetEqual(response.context['contents'], [])", "def test_shopping_car...
[ "0.86692333", "0.83612365", "0.81460863", "0.7857268", "0.77408904", "0.75758094", "0.72323555", "0.7111639", "0.6991345", "0.68820786", "0.6834001", "0.67459446", "0.67302716", "0.6667395", "0.6650811", "0.66039854", "0.6566601", "0.6550943", "0.6540767", "0.6537925", "0.652...
0.8059633
3
Returns a data reader of input test data.
def input_feeds(self, num_test_inputs, name2shape): input_data_list = [] for _ in range(num_test_inputs): inputs = {} for name, shape in name2shape.items(): inputs.update({name: np.random.randint(-1, 2, shape).astype(np.float32)}) input_data_list.exten...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def DataReader(name, data_source=None, start=None, end=None,\n retry_count=3, pause=0.001, session=None, access_key=None):\n if data_source == \"yahoo\":\n return YahooDailyReader(symbols=name, start=start, end=end,\n adjust_price=False, chunksize=25,\n ...
[ "0.64664453", "0.62711567", "0.6268117", "0.62235665", "0.6124419", "0.6077513", "0.6057523", "0.6039861", "0.60373574", "0.59895915", "0.5920952", "0.5863684", "0.58293986", "0.5804447", "0.5798207", "0.57708186", "0.5710802", "0.5684713", "0.5612126", "0.56068283", "0.56005...
0.57777774
15
Constructs an ONNX model containing a single ConvTranspose node, and saves the model to the specified output path.
def construct_model(self, output_model_path): input_tensor = helper.make_tensor_value_info("input", TensorProto.FLOAT, [1, 1, 7, 7]) output_tensor = helper.make_tensor_value_info("output", TensorProto.FLOAT, [1, 1, 8, 8]) ini_w = helper.make_tensor("weight", TensorProto.FLOAT, [1, 1, 2, 2], [1....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encode(self, model: nn.Module, dummy_input: torch.Tensor):\n _, path = tempfile.mkstemp()\n\n try:\n torch.onnx.export(model, dummy_input, path, verbose=True)\n with open(path, \"rb\") as fd:\n converted_model = fd.read()\n except Exception as e:\n ...
[ "0.6432265", "0.6071627", "0.6050657", "0.5938958", "0.5919945", "0.5811057", "0.57478637", "0.56945294", "0.5687591", "0.56267476", "0.55953103", "0.5580114", "0.557387", "0.5570985", "0.5559052", "0.55586994", "0.55422646", "0.5495592", "0.5473051", "0.54601747", "0.536238"...
0.81432015
0
Find the spacing for a row number
def _find_spacing(self, row, ordering, max_width): return max_width / (len(ordering[row]) + 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_row_spacing(self) -> tuple:\r\n\r\n # Get the y coordinate of the line through each of the\r\n # field's rows at the middle of the image\r\n ys = [line[0] * (self.get_picture().get_size()[0] / 2) + line[1]\r\n for line in self.lines]\r\n\r\n # Get the distances betw...
[ "0.69096696", "0.6384748", "0.6254906", "0.60232013", "0.5978723", "0.5932838", "0.58801854", "0.58661723", "0.58081794", "0.57250667", "0.5710119", "0.5703703", "0.56816995", "0.56480587", "0.5641308", "0.5635114", "0.56308746", "0.56238216", "0.56198883", "0.56056", "0.5604...
0.76282686
0
Get the input layers in order
def _get_input_layers_in_order(self, layer_names): return [ layer_name for layer_name in self.input_bank_order if layer_name in layer_names ]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_layers(self) :\n \n return self._layers", "def _get_input_layer_names(self, layer):\n if self._is_functional_model(self.model):\n inbound_nodes = layer['inbound_nodes']\n return [connection_info[0] for connection_info in inbound_nodes[0]]\n else: # Sequential model.\n ...
[ "0.7197633", "0.69969034", "0.6969171", "0.68873334", "0.6871849", "0.6864357", "0.67285705", "0.66489995", "0.66415143", "0.65711105", "0.6509601", "0.6439614", "0.6404326", "0.6333879", "0.63297206", "0.6326694", "0.63065046", "0.625705", "0.6254661", "0.62529874", "0.62281...
0.72805643
0
Initializes the blocks at the discrete grid of blocks, representatives of the character.
def init_blocks(self): length = self.physics.len_blocks rect = Rectangle(Vector(self.rpos.x, self.rpos.y), Vector(self.rpos.x + length, self.rpos.y + length)) self.rects.append(rect) self.physics.add_block(rect, self.stype)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def init_blocks(self):\n length = self.physics.len_blocks\n rect = Rectangle(self.rpos, self.rpos + Vector(length, length))\n self.rects.append(rect)\n self.physics.add_block(rect, 'bomberman')", "def initialize_grid(self) -> None:\n for i in range(self.grid_size[0]):\n ...
[ "0.70875365", "0.7000485", "0.68156326", "0.6767118", "0.6639368", "0.66042787", "0.6536832", "0.63887024", "0.6330122", "0.62875104", "0.62067527", "0.6200331", "0.61686856", "0.61663455", "0.61608684", "0.6135693", "0.6131745", "0.6130611", "0.6124941", "0.6099519", "0.6098...
0.69526136
2
Test that when user unchecks some of the scopes the token is issued with the checked scopes only.
def test_post_with_restricted_scopes_issues_token_with_same_scopes(self): # create a user self._create_user('anna', '123456') # create a couple of capabilities capability_a = self._create_capability('Capability A', []) capability_b = self._create_capability('Capability B', []) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_remove_scopes(self):\n self.basic_login()\n cassette_name = self.cassette_name(\"remove_scopes\")\n with self.recorder.use_cassette(cassette_name):\n auth = self.gh.authorize(\n username=self.user,\n password=self.password,\n sco...
[ "0.6450823", "0.6244965", "0.6242748", "0.6150639", "0.60488254", "0.5905029", "0.5891297", "0.5836062", "0.5710077", "0.56743044", "0.56611335", "0.56488514", "0.5634179", "0.5590344", "0.5577032", "0.54995817", "0.5486316", "0.5469917", "0.544634", "0.54316676", "0.5406259"...
0.6108017
4
Test authorization related to different, beneficiary "share_demographic_scopes", application.require_demographic_scopes, and requested scopes values. The "VIEW_OAUTH2_SCOPES_TEST_CASES" dictionary of test cases for the different values is used.
def testing_post_with_share_demographic_scopes(self): # create a user self._create_user('anna', '123456') # create an application and add some extra capabilities application = self._create_application( 'an app', grant_type=Application.GRANT_AUTHORIZATION_CODE, re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_assessor_access_limited(self):\n assessor = get_or_create_default_assessor()\n self.client.login(assessor.email)\n # This assessor doesn't belong to a group\n self.assertTrue(is_assessor(assessor))\n self.assertFalse(get_user_assessor_groups(assessor))\n\n # forbi...
[ "0.61260533", "0.59650105", "0.59547234", "0.5871457", "0.57039833", "0.5693247", "0.5666599", "0.5623782", "0.5566544", "0.5537858", "0.5505194", "0.54915684", "0.5468904", "0.546036", "0.5449884", "0.5425313", "0.53948027", "0.5386263", "0.53741294", "0.53556746", "0.534894...
0.7729871
0
Return a list of campaigns.
def get(self): query = Campaign.query return paginate(Campaign.__tablename__, query, self.schema), HTTPStatus.OK
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def list_campaigns(self, **kwargs) -> ApiResponse:\n return self._request(kwargs.pop('path'), params=kwargs)", "def get_list_of_campaigns(self, limit=0, offset=0):\n logger.info(\"Function call: get_list_of_campaigns\")\n return self.__handle_result(self.__send_request('campaigns', 'GET', {...
[ "0.8337779", "0.82184273", "0.802648", "0.7846518", "0.78249216", "0.7703851", "0.7462576", "0.73897094", "0.72668624", "0.7219239", "0.71732503", "0.7154105", "0.66930544", "0.66249907", "0.6618477", "0.64489293", "0.62438524", "0.62408686", "0.62371016", "0.61986697", "0.61...
0.69809026
12
Return the campaign with the given id. The id in this case is the mailchimp id for the campaign.
def get(self, campaign_id): campaign = Campaign.query.filter_by(mailchimp_id=campaign_id).first() if campaign is None: return {"message": "Campaign could not be found."}, HTTPStatus.NOT_FOUND return self.schema.dump(campaign), HTTPStatus.OK
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_campaign(self, campaign_id: str) -> dict:\n return self.http_request(\"GET\", f'/campaign/{campaign_id}')", "def get_campaign_info(self, id):\n logger.info(\"Function call: get_campaign_info from: {}\".format(id, ))\n return self.__handle_error(\"Empty campaign id\") if not id else s...
[ "0.81772023", "0.7734692", "0.7314094", "0.7238", "0.7116823", "0.7004171", "0.69258183", "0.6845276", "0.6778696", "0.65816367", "0.65385413", "0.6459682", "0.624268", "0.622983", "0.6138636", "0.60859853", "0.59823877", "0.59127486", "0.58494455", "0.58261406", "0.5817465",...
0.7899279
1
Gets the id of this CallListItem.
def id(self): return self._id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def get_id(self):\n return self._id", "def item_id(self):\n ...
[ "0.66965383", "0.66965383", "0.66965383", "0.66965383", "0.66965383", "0.66965383", "0.66951835", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904", "0.66813904"...
0.6610813
90
Sets the id of this CallListItem.
def id(self, id): self._id = id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_id(self, id_):\n\n self.id_ = id_", "def SetId(self, id):\n self.id = int(id)", "def set_id(self, id):\n self.data['id'] = id", "def set_id(self, id):\n self.__id = id", "def setID(self, id):\n self._id = id\n return self.callRemote('setID', id)", "def id...
[ "0.70275354", "0.7002776", "0.68936", "0.68798953", "0.6758317", "0.6626925", "0.6626925", "0.6626925", "0.65732664", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", "0.6535122", ...
0.6425514
51
Gets the ticket_id of this CallListItem.
def ticket_id(self): return self._ticket_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def thread_id(self):\n return self._thread_id", "def team_id(self):\n return self._team_id", "def determine_ticket_ID(self):\n hashid = hashids.Hashids(salt=self.config.idSalt, alphabet=self.config.idAlphabet, min_length=self.config.idMinLength)\n\n # See if hashid is set in headers...
[ "0.58206487", "0.5809294", "0.5651373", "0.5638327", "0.5601449", "0.5556359", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", "0.5525525", ...
0.76246595
0
Sets the ticket_id of this CallListItem.
def ticket_id(self, ticket_id): self._ticket_id = ticket_id
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_ticket(self, ticket: str) -> None:\n LOG.info(f\"Setting ticket to {ticket}\")\n self.ticket = ticket", "def ticket_id(self):\n return self._ticket_id", "def team_id(self, team_id):\n\n self._team_id = team_id", "def team_id(self, team_id):\n\n self._team_id = team_...
[ "0.67271", "0.6194996", "0.5853419", "0.5853419", "0.5853419", "0.5853419", "0.58381265", "0.58381265", "0.58381265", "0.5419474", "0.5419474", "0.54041475", "0.5318585", "0.5286626", "0.5234258", "0.52304024", "0.522067", "0.520685", "0.5187011", "0.5141225", "0.51128846", ...
0.78924155
0
Gets the type of this CallListItem. I incoming, O outgoing, T internal
def type(self): return self._type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getType(self,):\n\t\treturn self.type;", "def GetItemType(self, item):\r\n\r\n return item.GetType()", "def getType(self):\n return self.type_", "def getType(self):\n return self.type", "def get_type(self):\n return self.type", "def get_type(self):\n return self.typ...
[ "0.6867277", "0.68127507", "0.6795744", "0.6773241", "0.6771774", "0.6771774", "0.67694676", "0.6757262", "0.67342013", "0.67342013", "0.6701821", "0.6685534", "0.6601195", "0.6601195", "0.6514379", "0.6485629", "0.64425886", "0.6348494", "0.6319774", "0.63032454", "0.6297438...
0.6497407
27
Sets the type of this CallListItem. I incoming, O outgoing, T internal
def type(self, type): allowed_values = ["I", "O", "T"] if type not in allowed_values: raise ValueError( "Invalid value for `type`, must be one of {0}" .format(allowed_values) ) self._type = type
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self.type = type", "def set_type(self, type):\n self._type = type", "def SetType(self, ct_type):\r\n\r\n self._type = ct_type", "def type(self, type):\n self._type = type", "def type(self, type)...
[ "0.7076085", "0.7076085", "0.69701076", "0.6866162", "0.6830501", "0.6830501", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", "0.6791703", ...
0.6271223
44
Gets the from_number of this CallListItem.
def from_number(self): return self._from_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_from(self, ):\n return self.get_parameter.get('from')", "def fromaddr(self):\n return self._from", "def get_from(self, data):\n from_data = data['from'][0]\n return from_data", "def cfrom(self):\n cfrom = -1\n try:\n if self.lnk.type == Lnk.CHARSPA...
[ "0.65277725", "0.61697054", "0.6097581", "0.58500445", "0.56161535", "0.55913126", "0.55899906", "0.55899906", "0.55899906", "0.55599827", "0.5530862", "0.54601836", "0.5451157", "0.53867257", "0.53566575", "0.53566575", "0.53566575", "0.5326995", "0.5300137", "0.52618486", "...
0.6132567
2
Sets the from_number of this CallListItem.
def from_number(self, from_number): self._from_number = from_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _from(self, _from):\n if _from is None:\n raise ValueError(\"Invalid value for `_from`, must not be `None`\") # noqa: E501\n\n self.__from = _from", "def date_from(self, date_from):\n\n self._date_from = date_from", "def token_id_from(self, token_id_from):\n\n self._...
[ "0.64902705", "0.63472265", "0.61758995", "0.6079123", "0.6079123", "0.6059055", "0.6059055", "0.6059055", "0.6059055", "0.6001933", "0.59535944", "0.56794274", "0.5661566", "0.5525257", "0.54113543", "0.54113543", "0.54113543", "0.54113543", "0.536335", "0.5362561", "0.53401...
0.7612102
0
Gets the from_name of this CallListItem.
def from_name(self): return self._from_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_name(self) -> \"str\":\n return self._attrs.get(\"fromName\")", "def from_name(self) -> \"str\":\n return self._attrs.get(\"fromName\")", "def from_name(self):\n return self.getattr('from_name')", "def get_from(self, ):\n return self.get_parameter.get('from')", "def fro...
[ "0.73137546", "0.73137546", "0.68412054", "0.65898836", "0.61578804", "0.61086017", "0.6094609", "0.6094609", "0.6094609", "0.6002164", "0.59960425", "0.59960425", "0.59687537", "0.5885989", "0.5883376", "0.57759666", "0.57759666", "0.57759666", "0.5707007", "0.5676105", "0.5...
0.6725211
3
Sets the from_name of this CallListItem.
def from_name(self, from_name): self._from_name = from_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def from_name(self, from_name: \"str\"):\n self._attrs[\"fromName\"] = from_name", "def from_name(self, from_name: \"str\"):\n self._attrs[\"fromName\"] = from_name", "def _from(self, _from):\n if _from is None:\n raise ValueError(\"Invalid value for `_from`, must not be `None`\...
[ "0.78088856", "0.78088856", "0.6536223", "0.64234585", "0.6289965", "0.6217999", "0.6217999", "0.6217999", "0.6217999", "0.61273193", "0.61273193", "0.58992255", "0.585353", "0.58121794", "0.577343", "0.5620639", "0.5591383", "0.5461444", "0.5441158", "0.53775233", "0.5312694...
0.76628995
2
Gets the to_number of this CallListItem.
def to_number(self): return self._to_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_to(self, data):\n to = data['to'][0]\n return to", "def get_to(self, ):\n return self.get_parameter('to')", "def transport_call_sequence_number(self) -> TransportCallSequenceNumber:\n return self._transport_call_sequence_number", "def phone_number(self):\n\n return ...
[ "0.63942033", "0.63177234", "0.6094486", "0.59933895", "0.5960944", "0.5931038", "0.5836664", "0.582135", "0.5653289", "0.5622817", "0.5575106", "0.55303836", "0.55275184", "0.54932183", "0.54932183", "0.54932183", "0.5464536", "0.54602724", "0.54514515", "0.5424262", "0.5416...
0.47821584
70
Gets the to_name of this CallListItem.
def to_name(self): return self._to_name
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def name(self):\n name = self.__telegram_info.message.from_user.name\n return name[0].upper() + name[1::]", "def contact_name(self) -> str:\n return pulumi.get(self, \"contact_name\")", "def get_to(self, ):\n return self.get_parameter('to')", "def __str__(self):\n r...
[ "0.6330516", "0.630748", "0.6202558", "0.6124209", "0.6124209", "0.6104552", "0.6037653", "0.5997362", "0.59755284", "0.59741443", "0.5965222", "0.59368575", "0.59270173", "0.5890599", "0.5865212", "0.5822439", "0.5819699", "0.5819699", "0.5808778", "0.5808778", "0.57872623",...
0.6500618
0
Gets the via_number of this CallListItem.
def via_number(self): return self._via_number
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def phone_number(self):\n\n return self._phone_number", "def transport_call_sequence_number(self) -> TransportCallSequenceNumber:\n return self._transport_call_sequence_number", "def number(self):\n return str(self._phone)", "def phone(self):\n return self._phone", "def phon...
[ "0.60675365", "0.5854985", "0.57744956", "0.5732639", "0.5732639", "0.5732639", "0.57245046", "0.5723318", "0.55629283", "0.55443054", "0.55060726", "0.548749", "0.5459082", "0.5436846", "0.5431167", "0.5426473", "0.5360146", "0.5348311", "0.53114325", "0.5300232", "0.5295063...
0.6369222
0
Gets the date_created of this CallListItem.
def date_created(self): return self._date_created
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def created_date(self):\n return self._created_date", "def created_date(self):\n return self._created_date", "def date_created(self) -> datetime:\n return self._date_created", "def date_created(self) -> str:\n return pulumi.get(self, \"date_created\")", "def GetDateCreated(self)...
[ "0.78299934", "0.78299934", "0.777951", "0.7599143", "0.7549592", "0.7330967", "0.72599846", "0.7246369", "0.7224562", "0.7224562", "0.7224562", "0.714797", "0.70896244", "0.7082229", "0.7082229", "0.70676786", "0.7039554", "0.70296186", "0.70048314", "0.697786", "0.697786", ...
0.78931427
1
Gets the date_answered of this CallListItem.
def date_answered(self): return self._date_answered
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_answered(self, date_answered):\n self._date_answered = date_answered", "def get_date(self):\n return self.date", "def get_date(self):\n return self.date", "def get_date(self):\n return self.date", "def get_date(self):\n return self.date", "def date(self):\n ...
[ "0.6941474", "0.59940416", "0.59940416", "0.59940416", "0.59940416", "0.5990774", "0.5960328", "0.5960328", "0.5960328", "0.59554875", "0.5916211", "0.58603734", "0.58173716", "0.559049", "0.5579556", "0.55514914", "0.55514914", "0.55514914", "0.55182767", "0.54777294", "0.54...
0.8389939
0
Sets the date_answered of this CallListItem.
def date_answered(self, date_answered): self._date_answered = date_answered
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_answered(self):\n return self._date_answered", "def selected_date(self, selected_date):\n\n self._selected_date = selected_date", "def set_date(self, date):\n self.date = date\n return", "def set_date(self, date):\n self.date = date", "def date(self, date):\n ...
[ "0.7169455", "0.6099093", "0.6096052", "0.60948527", "0.5960784", "0.59458643", "0.59458643", "0.59458643", "0.59458643", "0.59458643", "0.5860938", "0.5848481", "0.58026487", "0.577827", "0.577827", "0.57484233", "0.5743357", "0.5725496", "0.5725496", "0.5712484", "0.5703133...
0.88456696
0
Gets the date_finished of this CallListItem.
def date_finished(self): return self._date_finished
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def date_done(self):\n return datetime.datetime.fromtimestamp(self.fields['doneDate'])", "def date_finished(self, date_finished):\n self._date_finished = date_finished", "def time_finished(self):\n return self._time_finished", "def get_datetime_finish(self):\n return self.get_t_se...
[ "0.63933814", "0.6381637", "0.634343", "0.62661165", "0.6139178", "0.6018496", "0.59918374", "0.59918374", "0.59918374", "0.5857004", "0.5857004", "0.58326346", "0.5799961", "0.5768983", "0.5745926", "0.5641909", "0.5601877", "0.5601877", "0.5579959", "0.5557416", "0.553273",...
0.802348
0
Returns true if both objects are equal
def __eq__(self, other): return self.__dict__ == other.__dict__
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self, other):\n return are_equal(self, other)", "def __eq__(self,other):\n try: return self.object==other.object and isinstance(self,type(other))\n except: return False", "def __eq__(self, other):\n if i...
[ "0.8088132", "0.8088132", "0.8054589", "0.7982687", "0.7961088", "0.7961088", "0.79433626", "0.79303336", "0.7926563", "0.7897525", "0.78826123", "0.78826123", "0.78806067", "0.7872423", "0.7868354", "0.78668815", "0.7825702", "0.7819993", "0.78162885", "0.78078854", "0.78068...
0.79670393
44
Returns true if both objects are not equal
def __ne__(self, other): return not self == other
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __ne__(self, other: object) -> bool:\n if self.__eq__(other):\n return False\n return True", "def __ne__(self, other: object) -> bool:\n return not self.__eq__(other)", "def __ne__(self, other) -> bool:\n return not self.__eq__(other)", "def __eq__(self, other):\n ...
[ "0.8456063", "0.83918154", "0.8144437", "0.8140196", "0.8132038", "0.8093834", "0.80918837", "0.80918837", "0.80918837", "0.80852824", "0.80852824", "0.807626", "0.807626", "0.80657643" ]
0.0
-1
The name of the resource.
def name(self) -> str: return pulumi.get(self, "name")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_resource_name(self):\n return self._resource_name", "def name(self):\n return self.raw_resource[\"name\"]", "def name(self):\n\n return self.resource[\"metadata\"][\"name\"]", "def resource_name(self) -> Optional[str]:\n return pulumi.get(self, \"resource_name\")", "def ...
[ "0.8797532", "0.8770644", "0.8469626", "0.8306927", "0.8306927", "0.8075097", "0.8075097", "0.8075097", "0.8075097", "0.8075097", "0.77082634", "0.76422197" ]
0.0
-1
Provisioning state of the resource.
def provisioning_state(self) -> str: return pulumi.get(self, "provisioning_state")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def provisioning_state(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_state(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"provisioning_state\")", "def provisioning_state(self) -> pulumi.Output[str]:\n return pulumi.get(self, \"...
[ "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.77640796", "0.76253724", "0.7464884", "0.7464884", "0.7464884", "0.7464884", "0.7464884", "0.7355461", "0...
0.78685683
19
The type of the resource.
def type(self) -> str: return pulumi.get(self, "type")
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def resource_type(cls):\n pass", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[str]:\n return pulumi.get(self, \"resource_type\")", "def resource_type(self) -> Optional[pulumi.Input[str]]:\n return pu...
[ "0.8790311", "0.8584338", "0.8584338", "0.8426086", "0.8426086", "0.8426086", "0.8426086", "0.8426086", "0.822566", "0.7959503", "0.7784566", "0.77579516", "0.7718755", "0.7687279", "0.7682253", "0.7670671", "0.76512825", "0.76381993", "0.763588", "0.7635162", "0.7618553", ...
0.7832202
47
Tests whether ``put_terms_of_service_url_into`` is working as intended.
def test__put_terms_of_service_url_into(): for input_, defaults, expected_output in ( (None, False, {}), ('https://orindance.party/', False, {'terms_of_service_url': 'https://orindance.party/'}), ): data = put_terms_of_service_url_into(input_, {}, defaults) vampytest.assert_eq(da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_PUT(self):\n if not self.url:\n return\n response = self.client.put(self.url, {}, format='json')\n self.assertIn(response.status_code, [status.HTTP_405_METHOD_NOT_ALLOWED,\n status.HTTP_401_UNAUTHORIZED])", "def _checkServiceURL...
[ "0.58874404", "0.58609647", "0.5741624", "0.5713708", "0.5700164", "0.5573783", "0.5559801", "0.55180854", "0.5492193", "0.5470215", "0.5457328", "0.54038733", "0.54013985", "0.53937185", "0.53834164", "0.53681314", "0.53631926", "0.53623325", "0.53622884", "0.5342906", "0.53...
0.805514
0
Return True if ptvsd is enabled.
def debug(self) -> bool: return self._data[ATTR_DEBUG]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_vtd_supported(self):\n\t\treturn bool(call_sdk_function('PrlSrvCfg_IsVtdSupported', self.handle))", "def is_enabled(self):\n\t\treturn bool(call_sdk_function('PrlVmDev_IsEnabled', self.handle))", "def enable_tpu(self) -> bool:\n return pulumi.get(self, \"enable_tpu\")", "def has_stp_cli(self):\...
[ "0.70406586", "0.6777216", "0.6489988", "0.6423801", "0.6340392", "0.6263748", "0.62279993", "0.6220572", "0.6220572", "0.6150328", "0.6132302", "0.6123662", "0.6046996", "0.6022004", "0.6021632", "0.6003074", "0.6003074", "0.6003074", "0.6003074", "0.6003074", "0.6003074", ...
0.0
-1
Set system log level.
def logging(self, value: LogLevel) -> None: self._data[ATTR_LOGGING] = value self.modify_log_level()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setLogLevel(self,value):\n self.PDFreactorConfiguration.in1[\"logLevel\"] = value", "def set_log_level(self, level):\n if level == 'info':\n level = logging.INFO\n if level == 'debug':\n level = logging.DEBUG\n if level == 'error':\n level = loggin...
[ "0.7574005", "0.74587125", "0.74230707", "0.73990035", "0.7301315", "0.72857887", "0.727972", "0.7241539", "0.7182793", "0.71713084", "0.7165455", "0.71012807", "0.7087825", "0.7064343", "0.70207053", "0.69004536", "0.6897497", "0.6874428", "0.68666625", "0.6852083", "0.68448...
0.650471
36
Return Supervisor data path.
def path_supervisor(self) -> Path: return SUPERVISOR_DATA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def data_path(self):\n raise NotImplementedError", "def getDataPath():\n\treturn \"..\" + os.sep + \"data\" + os.sep", "def get_data_path():\n\treturn _paths[_DATA_DIRECTORY_KEY]", "def dataPath(self):\n return ''", "def path_addons_data(self) -> Path:\n return self.path_supervisor / A...
[ "0.7532984", "0.7464877", "0.7355922", "0.73048973", "0.7245151", "0.7244039", "0.72311586", "0.7162154", "0.7159068", "0.7000519", "0.69675845", "0.69675714", "0.6962142", "0.6959504", "0.6942586", "0.69159347", "0.69159347", "0.6897409", "0.68914384", "0.680368", "0.6721985...
0.7971628
0
Return Supervisor data path external for Docker.
def path_extern_supervisor(self) -> PurePath: return PurePath(os.environ[ENV_SUPERVISOR_SHARE])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_data_path(name):\n js = open('config.json').read()\n data = json.loads(js)\n return os.path.expanduser(data[name]['data_path'])", "def path_config_docker(self):\n return HOMEASSISTANT_CONFIG.format(HASSIO_SHARE_EXT)", "def getDataPath():\n\treturn \"..\" + os.sep + \"data\" + os.sep", ...
[ "0.6503076", "0.64918864", "0.6384072", "0.6381124", "0.63731563", "0.6308543", "0.6271308", "0.618402", "0.6174797", "0.6159042", "0.6155917", "0.6141418", "0.6132674", "0.6118175", "0.6113413", "0.60775036", "0.6072097", "0.60714626", "0.6051642", "0.6043977", "0.60285205",...
0.6351083
5
Return config path inside supervisor.
def path_homeassistant(self) -> Path: return self.path_supervisor / HOMEASSISTANT_CONFIG
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def configPath(self):\n return os.path.dirname(__file__)", "def get_instance_config_path():\n return join(settings.PROJECT_DIR, \"conf\", \"eoxserver.conf\")", "def get_config_path(config):\n section = config.sections()[0]\n return Path(config.get(section, \"path\")).expanduser().absolute()", ...
[ "0.73482144", "0.71827084", "0.7102637", "0.7015559", "0.70092297", "0.6979841", "0.69114286", "0.69023687", "0.68887746", "0.681355", "0.6752051", "0.67507976", "0.673824", "0.67243755", "0.6689632", "0.6686329", "0.6685923", "0.66779625", "0.6664221", "0.6628404", "0.662286...
0.65045613
24
Return root Addon data folder.
def path_addons_data(self) -> Path: return self.path_supervisor / ADDONS_DATA
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def datadir():\n return '../data/'", "def get_data_dir():\n return Path(current_app.config[\"USER_DIR\"]) / \"data\"", "def data_directory(self):\n\n return self.get_raw(\"data_directory\")", "def get_data_folder():\n data_folder = './MedData/'\n\n if not os.path.isdir(data_folder):\n ...
[ "0.7804759", "0.780448", "0.7762616", "0.7634224", "0.7586334", "0.75666666", "0.7536979", "0.75168467", "0.74836075", "0.7480287", "0.7440785", "0.74113214", "0.74068487", "0.73966765", "0.7325237", "0.7311329", "0.7287202", "0.7281683", "0.7267615", "0.7258434", "0.7258434"...
0.7104662
28